Class CSVReporter

  • All Implemented Interfaces:
    ICrySLPerformanceListener, ICrySLResultsListener

    public class CSVReporter
    extends Reporter
    This class extends the class Reporter by generating an analysis report and write it into a csv file. Compared to the CSVSummaryReporter, this reporter writes each error from the analysis into a single line. If the statistics are enabled, each line is extended by the corresponding statistic fields. Since the statistics are computed for the whole analysis, each value for the different fields are the same in all lines.
    • Constructor Detail

      • CSVReporter

        public CSVReporter​(String reportDir,
                           String softwareId,
                           List<CrySLRule> rules,
                           long callGraphConstructionTime,
                           boolean includeStatistics)
        Subclass of Reporter. Creates an instance of CSVReporter, which can be used to create a csv file containing the analysis report.
        Parameters:
        reportDir - A String path giving the location of the report directory. The reportPath should end without an ending file separator.
        softwareId - A String for the analyzed software.
        rules - A List of CrySLRule containing the rules the program is analyzed with.
        callGraphConstructionTime - The time in milliseconds for the construction of the callgraph.
        includeStatistics - Set this value to true, if the analysis report should contain some analysis statistics (e.g. the callgraph construction time). If this value is set to false, no statistics will be output.
    • Method Detail

      • handleAnalysisResults

        public void handleAnalysisResults()
        Description copied from class: Reporter
        This method is called after the analysis is finished and all statistics have been computed. A subclass can override this method to extend the actions after the analysis, e.g. creating an analysis report and write it into a file.
        Specified by:
        handleAnalysisResults in class Reporter