Class FingerprintComparator


  • public class FingerprintComparator
    extends Object
    Scorer that compares two method fingerprints into a weighted similarity score with a confidence estimate.
    • Constructor Detail

      • FingerprintComparator

        public FingerprintComparator()
    • Method Detail

      • compare

        public FingerprintMatch compare​(MethodFingerprint a,
                                        MethodFingerprint b)
        Compares two fingerprints level by level, using exact hash equality or feature similarity per level.
        Parameters:
        a - the first fingerprint
        b - the second fingerprint
        Returns:
        a match with the weighted score, confidence, and per-level scores
      • isLikelyMatch

        public boolean isLikelyMatch​(FingerprintMatch match,
                                     double threshold)
        Decides whether a match is likely, requiring the given score threshold and confidence at least 0.5.
        Parameters:
        match - the match to test
        threshold - the minimum acceptable score
        Returns:
        true if the match clears both thresholds
      • isDefiniteMatch

        public boolean isDefiniteMatch​(FingerprintMatch match)
        Decides whether a match is near-certain, requiring score at least 0.95 and confidence at least 0.8.
        Parameters:
        match - the match to test
        Returns:
        true if the match clears both fixed thresholds