Program: 124453
Project: 124453
Buggy source:
private Map<String,String> checkSuperAnnotations(final String methodName,JavaClass curClass,final String annoationName,int nDepth,final int maxRecursive) throws ClassNotFoundException {
  nDepth++;
  Map<String,String> curAnnotationsValues=null;
  Method curMethod=null;
  Method[] methods=curClass.getMethods();
  for (int j=0; j < methods.length; j++) {
    if (methods[j].getName().equals(methodName)) {
      curMethod=methods[j];
      break;
    }
  }
  if (curMethod != null) {
    Attribute[] attributes=curMethod.getAttributes();
    curAnnotationsValues=getAnnotationsValues(attributes);
    Set<Entry<String,String>> entrySet=curAnnotationsValues.entrySet();
    Iterator<Entry<String,String>> iterator=entrySet.iterator();
    while (iterator.hasNext()) {
      Entry<String,String> next=iterator.next();
      String key=next.getKey();
      if (key.contains(annoationName))       return curAnnotationsValues;
    }
  }
 else   curAnnotationsValues=new LinkedHashMap<String,String>();
  if (nDepth >= maxRecursive)   return curAnnotationsValues;
  JavaClass[] interfaces=curClass.getInterfaces();
  for (int i=0; i < interfaces.length; i++) {
    JavaClass javaClass=interfaces[i];
    Map<String,String> returnedAnnotation=checkSuperAnnotations(methodName,javaClass,annoationName,nDepth,maxRecursive);
    mergeAnno(curAnnotationsValues,returnedAnnotation,annoationName);
  }
  JavaClass superClass=curClass.getSuperClass();
  if (superClass != null && superClass.getClassName().contains("String_Node_Str") == false) {
    Map<String,String> returnedAnnotation=checkSuperAnnotations(methodName,superClass,annoationName,nDepth,maxRecursive);
    mergeAnno(curAnnotationsValues,returnedAnnotation,annoationName);
  }
  return curAnnotationsValues;
}

Fixed version (ground truth):
private Map<String,String> checkSuperAnnotations(final Method method,JavaClass curClass,final String annoationName,int nDepth,final int maxRecursive) throws ClassNotFoundException {
  String methodName=method.getName();
  nDepth++;
  Map<String,String> curAnnotationsValues=null;
  Method curMethod=null;
  Method[] methods=curClass.getMethods();
  for (int j=0; j < methods.length; j++) {
    if (methods[j].getName().equals(methodName) && methods[j].getArgumentTypes().length == method.getArgumentTypes().length) {
      curMethod=methods[j];
      break;
    }
  }
  if (curMethod != null) {
    Attribute[] attributes=curMethod.getAttributes();
    curAnnotationsValues=getAnnotationsValues(attributes);
    Set<Entry<String,String>> entrySet=curAnnotationsValues.entrySet();
    Iterator<Entry<String,String>> iterator=entrySet.iterator();
    while (iterator.hasNext()) {
      Entry<String,String> next=iterator.next();
      String key=next.getKey();
      if (key.contains(annoationName))       return curAnnotationsValues;
    }
  }
 else   curAnnotationsValues=new LinkedHashMap<String,String>();
  if (nDepth >= maxRecursive)   return curAnnotationsValues;
  JavaClass[] interfaces=curClass.getInterfaces();
  for (int i=0; i < interfaces.length; i++) {
    JavaClass javaClass=interfaces[i];
    Map<String,String> returnedAnnotation=checkSuperAnnotations(method,javaClass,annoationName,nDepth,maxRecursive);
    mergeAnno(curAnnotationsValues,returnedAnnotation,annoationName);
  }
  JavaClass superClass=curClass.getSuperClass();
  if (superClass != null && superClass.getClassName().contains("String_Node_Str") == false) {
    Map<String,String> returnedAnnotation=checkSuperAnnotations(method,superClass,annoationName,nDepth,maxRecursive);
    mergeAnno(curAnnotationsValues,returnedAnnotation,annoationName);
  }
  return curAnnotationsValues;
}