Package edu.hm.hafner.analysis
Class FullTextFingerprint
- java.lang.Object
-
- edu.hm.hafner.analysis.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 (seeLINES_LOOK_AHEAD).- Author:
- Ullrich Hafner
-
-
Constructor Summary
Constructors Constructor Description FullTextFingerprint()Creates a new instance ofFullTextFingerprint.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringcompute(String fileName, int line, Charset charset)Creates a fingerprint of the specified issue using the source code at the affected line.
-
-
-
Constructor Detail
-
FullTextFingerprint
public FullTextFingerprint()
Creates a new instance ofFullTextFingerprint.
-
-
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 (seeLINES_LOOK_AHEAD).- Parameters:
fileName- the absolute path of the affected fileline- the line of the issuecharset- 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
-
-