private void addCodeVolumeSummarySection()

in reports/src/main/java/nl/obren/sokrates/reports/generators/statichtml/TrendReportGenerator.java [89:138]


    private void addCodeVolumeSummarySection(RichTextReport report, List<CodeAnalysisResults> analysisResultsList, List<String> labels, int maxTotalLoc) {
        report.startSection("Summary: Code Volume Change", "");
        report.startDiv("width: 100%; overflow-x: auto");
        report.startTable();
        report.addTableHeader("", "Main LOC", "", "Test LOC", "Duplication");

        int index[] = {0};
        analysisResultsList.forEach(refData -> {
            int mainLoc = refData.getMainAspectAnalysisResults().getLinesOfCode();
            int testLoc = refData.getTestAspectAnalysisResults().getLinesOfCode();
            double duplicationPercentage = refData.getDuplicationAnalysisResults().getOverallDuplication().getDuplicationPercentage().doubleValue();

            report.startTableRow();
            report.addTableCell(labels.get(index[0]));
            report.addTableCell(FormattingUtils.getFormattedCount(mainLoc), "text-align: right");
            report.addTableCell(getVolumeSvgBarChart(maxTotalLoc, mainLoc, testLoc));
            report.addTableCell(FormattingUtils.getFormattedCount(testLoc), "text-align: right");
            report.addTableCell(getDuplicationChart(duplicationPercentage));
            report.endTableRow();
            index[0]++;
        });
        report.endTable();
        report.addLineBreak();
        report.addParagraph("See the details (TXT):");
        report.startUnorderedList();
        report.startListItem();
        report.addNewTabLink("all metrics", "../data/text/metrics_trend.txt");
        report.endListItem();
        report.startListItem();
        report.addNewTabLink("lines of code per extension", "../data/text/metrics_trend_loc_per_extension.txt");
        report.endListItem();
        report.startListItem();
        report.addNewTabLink("lines of code per logical component", "../data/text/metrics_trend_loc_logical_decompositions.txt");
        report.endListItem();
        report.startListItem();
        report.addNewTabLink("duplicated lines", "../data/text/metrics_trend_loc_duplication.txt");
        report.endListItem();
        report.startListItem();
        report.addNewTabLink("lines of code per file size category", "../data/text/metrics_trend_loc_file_size.txt");
        report.endListItem();
        report.startListItem();
        report.addNewTabLink("lines of code per unit size category", "../data/text/metrics_trend_unit_size_loc.txt");
        report.endListItem();
        report.startListItem();
        report.addNewTabLink("lines of code per conditional complexity catagory", "../data/text/metrics_trend_conditional_complexity_loc.txt");
        report.endListItem();
        report.endUnorderedList();
        report.endDiv();
        report.endSection();
    }