Class CPDReport

  • public class CPDReport
    extends Object
    The result of a CPD analysis. This is rendered by a CPDReportRenderer.
    • Method Detail

      • getMatches

        public List<Match> getMatches()
        Return the list of duplication matches found by the CPD analysis.
      • getNumberOfTokensPerFile

        public Map<FileId,​Integer> getNumberOfTokensPerFile()
        Return a map containing the number of tokens by processed file.
      • getSourceCodeSlice

        public Chars getSourceCodeSlice​(Mark mark)
        Return the slice of source code where the mark was found. This returns the entire lines from the start to the end line of the mark.
      • filterMatches

        public CPDReport filterMatches​(Predicate<Match> filter)
        Creates a new CPD report taking all the information from this report, but filtering the matches. Note that the token count map is not filtered.
        filter - when true, the match will be kept.
        copy of this report
      • getDisplayName

        public String getDisplayName​(FileId fileId)
        Return the display name of the given file.