Program: 183770
Project: 183770
Buggy source:
/** 
 * Match this filter against an Intent's data (type, scheme and path). If the filter does not specify any types and does not specify any schemes/paths, the match will only succeed if the intent does not also specify a type or data. <p>Note that to match against an authority, you must also specify a base scheme the authority is in.  To match against a data path, both a scheme and authority must be specified.  If the filter does not specify any types or schemes that it matches against, it is considered to be empty (any authority or data path given is ignored, as if it were empty as well).
 * @param type The desired data type to look for, as returned byIntent.resolveType().
 * @param scheme The desired data scheme to look for, as returned byIntent.getScheme().
 * @param data The full data string to match against, as supplied inIntent.data.
 * @return Returns either a valid match constant (a combination of{@link #MATCH_CATEGORY_MASK} and {@link #MATCH_ADJUSTMENT_MASK}), or one of the error codes   {@link #NO_MATCH_TYPE} if the type didn't matchor  {@link #NO_MATCH_DATA} if the scheme/path didn't match.
 * @see #match
 */
public final int matchData(String type,String scheme,Uri data){
  final ArrayList<String> types=mDataTypes;
  final ArrayList<String> schemes=mDataSchemes;
  final ArrayList<AuthorityEntry> authorities=mDataAuthorities;
  final ArrayList<PatternMatcher> paths=mDataPaths;
  int match=MATCH_CATEGORY_EMPTY;
  if (types == null && schemes == null) {
    return ((type == null && data == null) ? (MATCH_CATEGORY_EMPTY + MATCH_ADJUSTMENT_NORMAL) : NO_MATCH_DATA);
  }
  if (schemes != null) {
    if (schemes.contains(scheme != null ? scheme : "String_Node_Str")) {
      match=MATCH_CATEGORY_SCHEME;
    }
 else {
      return NO_MATCH_DATA;
    }
    if (authorities != null) {
      int authMatch=matchDataAuthority(data);
      if (authMatch >= 0) {
        if (paths == null) {
          match=authMatch;
        }
 else         if (hasDataPath(data.getPath())) {
          match=MATCH_CATEGORY_PATH;
        }
 else {
          return NO_MATCH_DATA;
        }
      }
 else {
        return NO_MATCH_DATA;
      }
    }
  }
 else {
    if (scheme != null && !"String_Node_Str".equals(scheme) && !"String_Node_Str".equals(scheme) && !"String_Node_Str".equals(scheme)) {
      return NO_MATCH_DATA;
    }
  }
  if (types != null) {
    if (findMimeType(type)) {
      match=MATCH_CATEGORY_TYPE;
    }
 else {
      return NO_MATCH_TYPE;
    }
  }
 else {
    if (type != null) {
      return NO_MATCH_TYPE;
    }
  }
  return match + MATCH_ADJUSTMENT_NORMAL;
}

Fixed version (ground truth):
/** 
 * Match this filter against an Intent's data (type, scheme and path). If the filter does not specify any types and does not specify any schemes/paths, the match will only succeed if the intent does not also specify a type or data. <p>Be aware that to match against an authority, you must also specify a base scheme the authority is in.  To match against a data path, both a scheme and authority must be specified.  If the filter does not specify any types or schemes that it matches against, it is considered to be empty (any authority or data path given is ignored, as if it were empty as well). <p><em>Note: MIME type, Uri scheme, and host name matching in the Android framework is case-sensitive, unlike the formal RFC definitions. As a result, you should always write these elements with lower case letters, and normalize any MIME types or Uris you receive from outside of Android to ensure these elements are lower case before supplying them here.</em></p>
 * @param type The desired data type to look for, as returned byIntent.resolveType().
 * @param scheme The desired data scheme to look for, as returned byIntent.getScheme().
 * @param data The full data string to match against, as supplied inIntent.data.
 * @return Returns either a valid match constant (a combination of{@link #MATCH_CATEGORY_MASK} and {@link #MATCH_ADJUSTMENT_MASK}), or one of the error codes   {@link #NO_MATCH_TYPE} if the type didn't matchor  {@link #NO_MATCH_DATA} if the scheme/path didn't match.
 * @see #match
 */
public final int matchData(String type,String scheme,Uri data){
  final ArrayList<String> types=mDataTypes;
  final ArrayList<String> schemes=mDataSchemes;
  final ArrayList<AuthorityEntry> authorities=mDataAuthorities;
  final ArrayList<PatternMatcher> paths=mDataPaths;
  int match=MATCH_CATEGORY_EMPTY;
  if (types == null && schemes == null) {
    return ((type == null && data == null) ? (MATCH_CATEGORY_EMPTY + MATCH_ADJUSTMENT_NORMAL) : NO_MATCH_DATA);
  }
  if (schemes != null) {
    if (schemes.contains(scheme != null ? scheme : "String_Node_Str")) {
      match=MATCH_CATEGORY_SCHEME;
    }
 else {
      return NO_MATCH_DATA;
    }
    if (authorities != null) {
      int authMatch=matchDataAuthority(data);
      if (authMatch >= 0) {
        if (paths == null) {
          match=authMatch;
        }
 else         if (hasDataPath(data.getPath())) {
          match=MATCH_CATEGORY_PATH;
        }
 else {
          return NO_MATCH_DATA;
        }
      }
 else {
        return NO_MATCH_DATA;
      }
    }
  }
 else {
    if (scheme != null && !"String_Node_Str".equals(scheme) && !"String_Node_Str".equals(scheme) && !"String_Node_Str".equals(scheme)) {
      return NO_MATCH_DATA;
    }
  }
  if (types != null) {
    if (findMimeType(type)) {
      match=MATCH_CATEGORY_TYPE;
    }
 else {
      return NO_MATCH_TYPE;
    }
  }
 else {
    if (type != null) {
      return NO_MATCH_TYPE;
    }
  }
  return match + MATCH_ADJUSTMENT_NORMAL;
}