Program: 82846
Project: 82846
Buggy source:
private HasEnclosingType parseJsniRef(SourceInfo info,String ident){
  String[] parts=ident.substring(1).split("String_Node_Str");
  assert(parts.length == 2);
  String className=parts[0];
  JReferenceType type=null;
  if (!className.equals("String_Node_Str")) {
    type=program.getFromTypeMap(className);
    if (type == null) {
      reportJsniError(info,methodDecl,"String_Node_Str" + className + "String_Node_Str");
      return null;
    }
  }
  String rhs=parts[1];
  int parenPos=rhs.indexOf('(');
  if (parenPos < 0) {
    if (type == null) {
      if (rhs.equals("String_Node_Str")) {
        return program.getNullField();
      }
    }
 else {
      for (int i=0; i < type.fields.size(); ++i) {
        JField field=type.fields.get(i);
        if (field.getName().equals(rhs)) {
          return field;
        }
      }
    }
    reportJsniError(info,methodDecl,"String_Node_Str" + rhs + "String_Node_Str"+ className+ "String_Node_Str");
  }
 else {
    String almostMatches=null;
    String methodName=rhs.substring(0,parenPos);
    if (type == null) {
      if (rhs.equals("String_Node_Str")) {
        return program.getNullMethod();
      }
    }
 else {
      for (int i=0; i < type.methods.size(); ++i) {
        JMethod method=type.methods.get(i);
        if (method.getName().equals(methodName)) {
          String jsniSig=getJsniSig(method);
          if (jsniSig.equals(rhs)) {
            return method;
          }
 else           if (almostMatches == null) {
            almostMatches="String_Node_Str" + jsniSig + "String_Node_Str";
          }
 else {
            almostMatches+="String_Node_Str" + jsniSig + "String_Node_Str";
          }
        }
      }
    }
    if (almostMatches == null) {
      reportJsniError(info,methodDecl,"String_Node_Str" + methodName + "String_Node_Str"+ className+ "String_Node_Str");
    }
 else {
      reportJsniError(info,methodDecl,"String_Node_Str" + methodName + "String_Node_Str"+ className+ "String_Node_Str"+ almostMatches+ "String_Node_Str");
    }
  }
  return null;
}

Fixed version (ground truth):
private HasEnclosingType parseJsniRef(SourceInfo info,String ident){
  String[] parts=ident.substring(1).split("String_Node_Str");
  assert(parts.length == 2);
  String className=parts[0];
  JReferenceType type=null;
  if (!className.equals("String_Node_Str")) {
    type=program.getFromTypeMap(className);
    if (type == null) {
      reportJsniError(info,methodDecl,"String_Node_Str" + className + "String_Node_Str");
      return null;
    }
  }
  String rhs=parts[1];
  int parenPos=rhs.indexOf('(');
  if (parenPos < 0) {
    if (type == null) {
      if (rhs.equals("String_Node_Str")) {
        return program.getNullField();
      }
    }
 else {
      for (int i=0; i < type.fields.size(); ++i) {
        JField field=type.fields.get(i);
        if (field.getName().equals(rhs)) {
          return field;
        }
      }
    }
    reportJsniError(info,methodDecl,"String_Node_Str" + rhs + "String_Node_Str"+ className+ "String_Node_Str");
  }
 else {
    String almostMatches=null;
    String methodName=rhs.substring(0,parenPos);
    if (type == null) {
      if (rhs.equals("String_Node_Str")) {
        return program.getNullMethod();
      }
    }
 else {
      for (int i=0; i < type.methods.size(); ++i) {
        JMethod method=type.methods.get(i);
        if (method.getName().equals(methodName)) {
          String jsniSig=JProgram.getJsniSig(method);
          if (jsniSig.equals(rhs)) {
            return method;
          }
 else           if (almostMatches == null) {
            almostMatches="String_Node_Str" + jsniSig + "String_Node_Str";
          }
 else {
            almostMatches+="String_Node_Str" + jsniSig + "String_Node_Str";
          }
        }
      }
    }
    if (almostMatches == null) {
      reportJsniError(info,methodDecl,"String_Node_Str" + methodName + "String_Node_Str"+ className+ "String_Node_Str");
    }
 else {
      reportJsniError(info,methodDecl,"String_Node_Str" + methodName + "String_Node_Str"+ className+ "String_Node_Str"+ almostMatches+ "String_Node_Str");
    }
  }
  return null;
}