Class FullTextFingerprint


  • public class FullTextFingerprint
    extends Object
    Creates a fingerprint of the specified issue using the source code at the affected line. The fingerprint is computed using the 1:1 content of a small number of lines before and after the affected line (see LINES_LOOK_AHEAD).
    Author:
    Ullrich Hafner
    • Constructor Detail

      • FullTextFingerprint

        public FullTextFingerprint()
        Creates a new instance of FullTextFingerprint.
    • Method Detail

      • compute

        public String compute​(String fileName,
                              int line,
                              Charset charset)
                       throws IOException
        Creates a fingerprint of the specified issue using the source code at the affected line. The fingerprint is computed using the 1:1 content of a small number of lines before and after the affected line (see LINES_LOOK_AHEAD).
        Parameters:
        fileName - the absolute path of the affected file
        line - the line of the issue
        charset - the encoding to be used when reading the affected file
        Returns:
        a fingerprint of the selected range of source code lines (if the file could not be read then the fingerprint actually is the hashcode of the filename)
        Throws:
        IOException - if the file could not be read