Class FingerprintMatch


  • public class FingerprintMatch
    extends Object
    The result of comparing two method fingerprints: an overall score, a confidence, and per-level scores.
    • Constructor Detail

      • FingerprintMatch

        public FingerprintMatch​(String sourceId,
                                String targetId,
                                double score,
                                double confidence,
                                double[] levelScores)
        Creates a match result.
        Parameters:
        sourceId - the queried method id
        targetId - the matched method id
        score - the weighted overall similarity score
        confidence - the confidence in the score
        levelScores - the per-level similarity scores, copied; null becomes all zeros
    • Method Detail

      • getSourceId

        public String getSourceId()
        Returns:
        the source id
      • getTargetId

        public String getTargetId()
        Returns:
        the target id
      • getScore

        public double getScore()
        Returns:
        the score
      • getConfidence

        public double getConfidence()
        Returns:
        the confidence
      • getLevelScores

        public double[] getLevelScores()
        Returns:
        a copy of the per-level similarity scores, indexed by level
      • getLevelScore

        public double getLevelScore​(FingerprintLevel level)
        Parameters:
        level - the fingerprint level to read
        Returns:
        the similarity score at that level