Program: 25756
Project: 25756
Buggy source:
private int compareSignature(String desc,int[] argTypes,int[] argDims,String[] argClassNames) throws CompileError {
  int result=YES;
  int i=1;
  int nArgs=argTypes.length;
  if (nArgs != Descriptor.numOfParameters(desc))   return NO;
  int len=desc.length();
  for (int n=0; i < len; ++n) {
    char c=desc.charAt(i++);
    if (c == ')')     return (n == nArgs ? result : NO);
 else     if (n >= nArgs)     return NO;
    int dim=0;
    while (c == '[') {
      ++dim;
      c=desc.charAt(i++);
    }
    if (argTypes[n] == NULL) {
      if (dim == 0 && c != 'L')       return NO;
      if (c == 'L')       i=desc.indexOf(';',i) + 1;
    }
 else     if (argDims[n] != dim) {
      if (!(dim == 0 && c == 'L' && desc.startsWith("String_Node_Str",i)))       return NO;
      i=desc.indexOf(';',i) + 1;
      result=MAYBE;
      if (i <= 0)       return NO;
    }
 else     if (c == 'L') {
      int j=desc.indexOf(';',i);
      if (j < 0 || argTypes[n] != CLASS)       return NO;
      String cname=desc.substring(i,j);
      if (!cname.equals(argClassNames[n])) {
        CtClass clazz=lookupClassByJvmName(argClassNames[n]);
        try {
          if (clazz.subtypeOf(lookupClassByJvmName(cname)))           result=MAYBE;
 else           return NO;
        }
 catch (        NotFoundException e) {
          result=MAYBE;
        }
      }
      i=j + 1;
    }
 else {
      int t=descToType(c);
      int at=argTypes[n];
      if (t != at)       if (t == INT && (at == SHORT || at == BYTE || at == CHAR))       result=MAYBE;
 else       return NO;
    }
  }
  return NO;
}

Fixed version (ground truth):
private int compareSignature(String desc,int[] argTypes,int[] argDims,String[] argClassNames) throws CompileError {
  int result=YES;
  int i=1;
  int nArgs=argTypes.length;
  if (nArgs != Descriptor.numOfParameters(desc))   return NO;
  int len=desc.length();
  for (int n=0; i < len; ++n) {
    char c=desc.charAt(i++);
    if (c == ')')     return (n == nArgs ? result : NO);
 else     if (n >= nArgs)     return NO;
    int dim=0;
    while (c == '[') {
      ++dim;
      c=desc.charAt(i++);
    }
    if (argTypes[n] == NULL) {
      if (dim == 0 && c != 'L')       return NO;
      if (c == 'L')       i=desc.indexOf(';',i) + 1;
    }
 else     if (argDims[n] != dim) {
      if (!(dim == 0 && c == 'L' && desc.startsWith("String_Node_Str",i)))       return NO;
      i=desc.indexOf(';',i) + 1;
      result++;
      if (i <= 0)       return NO;
    }
 else     if (c == 'L') {
      int j=desc.indexOf(';',i);
      if (j < 0 || argTypes[n] != CLASS)       return NO;
      String cname=desc.substring(i,j);
      if (!cname.equals(argClassNames[n])) {
        CtClass clazz=lookupClassByJvmName(argClassNames[n]);
        try {
          if (clazz.subtypeOf(lookupClassByJvmName(cname)))           result++;
 else           return NO;
        }
 catch (        NotFoundException e) {
          result++;
        }
      }
      i=j + 1;
    }
 else {
      int t=descToType(c);
      int at=argTypes[n];
      if (t != at)       if (t == INT && (at == SHORT || at == BYTE || at == CHAR))       result++;
 else       return NO;
    }
  }
  return NO;
}