public int addMatch(ASTNode node, int matchLevel) {
   int maskedLevel = matchLevel & PatternLocator.MATCH_LEVEL_MASK;
   switch (maskedLevel) {
     case PatternLocator.INACCURATE_MATCH:
       if (matchLevel != maskedLevel) {
         addTrustedMatch(
             node,
             new Integer(SearchMatch.A_INACCURATE + (matchLevel & PatternLocator.FLAVORS_MASK)));
       } else {
         addTrustedMatch(node, POTENTIAL_MATCH);
       }
       break;
     case PatternLocator.POSSIBLE_MATCH:
       addPossibleMatch(node);
       break;
     case PatternLocator.ERASURE_MATCH:
       if (matchLevel != maskedLevel) {
         addTrustedMatch(
             node,
             new Integer(
                 SearchPattern.R_ERASURE_MATCH + (matchLevel & PatternLocator.FLAVORS_MASK)));
       } else {
         addTrustedMatch(node, ERASURE_MATCH);
       }
       break;
     case PatternLocator.ACCURATE_MATCH:
       if (matchLevel != maskedLevel) {
         addTrustedMatch(
             node,
             new Integer(SearchMatch.A_ACCURATE + (matchLevel & PatternLocator.FLAVORS_MASK)));
       } else {
         addTrustedMatch(node, EXACT_MATCH);
       }
       break;
   }
   return matchLevel;
 }
 public void addTrustedMatch(ASTNode node, boolean isExact) {
   addTrustedMatch(node, isExact ? EXACT_MATCH : POTENTIAL_MATCH);
 }