Skip to content

See warnings from multiple automated static analysis tools in one visualization.

License

Notifications You must be signed in to change notification settings

ClintonCao/UnifiedASATVisualizer

Repository files navigation

Unified ASAT Visualizer   Build Status Coverage Status MIT license

About

This tool is for creating a visualization of the warnings/defects that were generated by the ASATs (Automated Static Analysis Tools). With this visualization you can get information about the following things:

  • From which ASAT most of the warnings are from.
  • From which packages (and also classes) most of the warnings are from.
  • From which of the three categories (Functional Defects, Maintainability Defects and Other) most of the warnings are from. (Please take a look at this paper for more information on the three categories.)

Requirements:

  • One of the following internet browsers: Google Chrome or Safari.
  • Java JDK 1.8 (Update 40 or higher).
  • ASATs version:
    • Checkstyle 6.1.1, PMD 5.2.3 and FindBugs 3.0.1. (CheckStyle 6.17 and PMD version 5.3.2 also work).
  • Users must have Maven (IDE plugin or standalone app) installed to run mvn site.
  • The project that is going to be analyzed must be a Maven Project.
  • The project that is going to be analyzed must support the execution of ASATs. We support FindBugs, Checkstyle, PMD.

Building

  • Run mvn package.
  • If you want to contribute to UAV's development, please install Lombok to auto-generate getters and setters. (Via java -jar lib/lombok.jar install path/to/your/ide)

Running the Program:

Running UAV is simple: After building it, the latest executable Jar has been conviently placed in the project's base folder. All you have to do is:

  • Start UAV via java -jar UnifiedASATVisualizer-1.1.2.jar
  • Follow the instruction on UAV's User Interface.
  • Select the top-level project directory (on your computer) that you want to visualize.
  • Click the Visualize button. Depending on the project's size and number of warnings, this may take some time to generate the HTML visualization.
  • If the visualization does not open automatically (known problems with Linux) or the Java application appears to have crashed, manually open ./visualization/main.html in Chrome or Safari.

UAV requires you to run on a Java project with ASAT warnings generated via maven site. Many famous projects include this already, but if you want to analyze a project which does not, here is how you do it:

  • Add the following snippet to the project's pom.xml file that you want to analyze:
 <reporting>
    <plugins>
    
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.17</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>checkstyle</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>3.7</version>
      </plugin>
    
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>3.0.4</version>
      </plugin>
    
    </plugins>
 </reporting>

Copy the whole snippet only if you do not have <reporting> in your pom.xml. If you do, then just copy the plugins. For more information on how to exclude certain files or how to use specific rulesets, please check the following links: (FindBugs, CheckStyle, PMD)

  • Run mvn site on the project you want to analyze (this generates the ASAT reports which are read-in by UAV).