Arcan is available both from Terminal and GUI. Usage examples are presented below:

AS Detection Example

Download the zip file from the download page and go inside the extracted folder. Arcan analyzes the project contained in my_project_location, stores the generated graph database at my_database_location, and performs the detection of all architectural smells (Cyclic Dependency, Hub-like dependency and Unstable dependency), with filtered results, and computation of metrics at class and package level (i.e. fan-in, CBO, LCOM ), through the following command:

 java -jar Arcan-1.1.0.jar -p my_project_location -neo4j -d my_database_location -all -filter

Summarized Documentation of Terminal Commands

Few parameters are needed to run Arcan. To specify what project has to be analyzed, use option -p and add the folder which contains it. Arcan supports three different kinds of input: a folder of compiled java files, a jar files, and a folder of jar files. Use respectively options -CL, -JR and -FJ to set the input type.

The dependency graph resulting from the analysis can be stored in a database using the command -neo4j, otherwise a default in-memory one will be instantiated. Use command -d followed by the database location to save the graph in it (only Neo4j is supported currently), otherwise will stored inside in a folder inside the project path.

Once the project to analyze and the database folder are set, use the analysis options to choose which analyses should be performed: architectural smells and/or metrics.

The output csv files will be stored in a specified folder using the -out parameter, otherwise will be created by default a sub-folder in the project called ArcanOutput.

The tool supports the following main command line parameters:

  • -help, -h: lists all Arcan commands.
  • -projectFolder, -p: the project folder containing the binaries to be analyzed.
  • -dbFolder, -d: the folder of the database that will contain the dependency graph.
  • -class, -CL: specifies that the input is a folder of .class files.
  • -jar, -JR: specifies that the input type is a jar file.
  • -folderOfJars, -FJ: specifies that the input type is a folder of jar files.
  • -cycle, -CD: enables the detection of Cyclic Dependency smell.
  • -UnstableDependencies, -UD: enables the detection of Unstable Dependency smell.
  • -HubLikeDependencies, -HL: enables the detection of Hub-Like class smell.
  • -PackageMetrics, -PM: enables the computation of Martin's metrics on the packages of the project.
  • -ClassMetrics, -CM: enables the computation of the basic metric at class level.
  • -out: the output for the csv files
  • -neo4j: if specified will be saved the graph in a Neo4j db
  • -filter: filtering of the results after architectural smells detection

Use parameter -h to resume the command list with associated description. This is the result for Arcan v1.1.0:

$ java -jar Arcan-1.1.0.jar -h
Usage: <main class> [options]                                                              
  Options:                                                                                 
    -ClassMetrics, -CM                                                                     
       Compute the metrics on classes                                                      
       Default: false                                                                      
    -HubLikeDependencies, -HL                                                              
       Search for Hub-Like dependencies                                                    
       Default: false                                                                      
    -PackageMetrics, -PM                                                                   
       Compute the Martin metrics on packages                                              
       Default: false                                                                      
    -UnstableDependencies, -UD                                                             
       Search for Unstable dependencies                                                    
       Default: false                                                                      
    -class, -CL                                                                            
       classes file                                                                        
       Default: true                                                                       
    -cycle, -CD                                                                            
       Calculates the class and package cycles of the graph. If the graph is               
       already written and it is specified the project folder it will be read from      
       the db folder.                                                                      
       Default: false                                                                      
    -dbFolder, -d                                                                          
       Database folder (default here_path\Neo4j\default.graphdb)                           
       Default: .\Neo4j\default.graphdb               
    -filter, -F                                                                            
       Filter the results of the smells detection                                          
       Default: true                                                                       
    -folderOfJars, -FJ                                                                     
       Folder of jars                                                                      
       Default: false                                                                      
    -help, -h                                                                              
       Print this help                                                                     
       Default: false                                                                      
    -jar, -JR                                                                              
       One Jar                                                                             
       Default: false                                                                      
    -neo4j                                                                                 
       if set write the neo4j database                                                     
       Default: false                                                                      
    -outputDir, -out                                                                       
       output dir of results                                                               
    -projectFolder, -p                                                                     
       Project folder (folder of class files)                                              
    -log, -verbose, -v                                                                     
       Level of verbosity                                                                  
       Default: 0                                                                          

Video tutorial of Arcan GUI

Video tutorial of Arcan is available on YouTube: