CPD Results

The following document contains the results of PMD's CPD

Duplications

FileLine
org/apache/geronimo/gbuild/report/Section.java117
org/apache/geronimo/gbuild/report/SectionManager.java137
    }

    public long getTotalTime() {
        return totalTime;
    }

    public String getTotalTimeString() {
        return ReportUtil.formatTime(getTotalTime());
    }

    public boolean isPassed() {
        return testCases.size() > 0 && failureCount == 0 && errorCount == 0;
    }

    public int getPassPercentage() {
        if (testCases.isEmpty()) {
            return 0;
        }
        return (int) ((0.0 + getPassCount()) * 100 / testCases.size());
    }

    public int getPassBarSize() {
        return getPassPercentage() * 2;
    }

    public int getFailBarSize() {
        return 200 - getPassBarSize();
    }

    public boolean isNewResult() {
        return newResult;
    }
}

FileLine
org/apache/geronimo/gbuild/report/GenerateReport.java107
org/apache/geronimo/gbuild/report/WorkDirReport.java66
        new WorkDirReport(workDir, outputDir).execute();
        System.out.println("Elapsed time: " + (System.currentTimeMillis() - processStart) / 1000 + " sec");
    }


    public void execute() throws Exception {
        // load all of the result from your working directory
        ReportFileLocator reportFileLocator = new ReportFileLocator(workDir);
        long begin;
        SortedSet workTestCases = new TreeSet();
        if (workDir != null) {
            begin = System.currentTimeMillis();
            WorkDirLoader workDirLoader = new WorkDirLoader(workDir, true, reportFileLocator);
            workTestCases = workDirLoader.loadTestCases();
            System.out.println("Loaded " + workTestCases.size() + " tests from " + workDir.getName() + " in " + (System.currentTimeMillis() - begin) / 1000 + " sec");
        }