private void renderScopes()

in reports/src/main/java/nl/obren/sokrates/reports/generators/statichtml/ConcernsReportGenerator.java [127:188]


    private void renderScopes(String key, AspectAnalysisResults aspectAnalysisResults) {
        String name = aspectAnalysisResults.getName();
        if (name.equalsIgnoreCase("Multiple Classifications")) {
            return;
        }
        if (name.equalsIgnoreCase("Unclassified")) {
            return;
        }
        concernCounter++;
        List<NumericMetric> fileCountPerExtension = aspectAnalysisResults.getFileCountPerExtension();
        List<NumericMetric> linesOfCodePerExtension = aspectAnalysisResults.getLinesOfCodePerExtension();

        ScopesRenderer renderer = new ScopesRenderer();
        renderer.setLinesOfCodeInMain(codeAnalysisResults.getMainAspectAnalysisResults().getLinesOfCode());

        String title = "<span style='color: grey; font-size: 90%'>" + key + "</span><br>";
        title += groupCounter + "." + concernCounter + " " + name.replace(" - ", " Multiple Classifications");
        renderer.setTitle(title);
        renderer.setDescription("");
        if (name.equalsIgnoreCase("Unclassified")) {
            renderer.setDescription("This concern include all files that are not included in any of the previously described concerns in this group.");
        }
        if (name.equalsIgnoreCase("Multiple Classifications")) {
            renderer.setDescription("This concern include all files that are included in two or more concerns in this group.");
        }

        renderer.setFileCountPerComponent(fileCountPerExtension);
        renderer.setAspect(aspectAnalysisResults.getAspect());
        renderer.setLinesOfCode(linesOfCodePerExtension);
        renderer.setMaxFileCount(codeAnalysisResults.getMainAspectAnalysisResults().getFilesCount());
        int mainLoc = codeAnalysisResults.getMainAspectAnalysisResults().getLinesOfCode();
        renderer.setMaxLinesOfCode(mainLoc);
        renderer.setTotalNumberOfRegexMatches(aspectAnalysisResults.getNumberOfRegexLineMatches());

        double relativeSizeInPerc = 100.0 * aspectAnalysisResults.getLinesOfCode() / mainLoc;
        int numberOfFiles = aspectAnalysisResults.getFilesCount();
        int linesOfCode = aspectAnalysisResults.getLinesOfCode();

        report.startSubSection(renderer.getTitle(), "");
        String fileListPath = aspectAnalysisResults.getAspect().getFileSystemFriendlyName(DataExportUtils.getConcernFilePrefix(key));
        report.addContentInDiv(getOverviewCodePercentageSvg(relativeSizeInPerc, numberOfFiles, linesOfCode,
                200, 20, fileListPath, isDerivedConcern(name)), fileListPath);

        if (name.contains(" - ") && name.contains(" AND ")) {
            List<Double> percentages = extractPercentages(name);
            if (percentages.size() == 2) {
                String svg = getOverlapSvg(percentages);
                report.addParagraph(svg);
            }
        } else {
            renderer.renderDetails(report, false);
        }

        report.startShowMoreBlock("details...");
        codeAnalysisResults.getLogicalDecompositionsAnalysisResults()
                .forEach(logicalDecompositionAnalysisResults -> {
                    renderConcernPerComponent(aspectAnalysisResults, mainLoc, logicalDecompositionAnalysisResults);
                });
        report.endShowMoreBlock();

        report.endSection();
    }