Program: 186632
Project: 186632
Buggy source:
/** 
 * Check if this method is the same as or overrides a given method. <p> This checks the class of the reference if checkSignature is true, so even if the reference resolves to this method, this returns false if the reference refers to a subclass of this method's class. </p>
 * @param superMethod the superMethod to check, must refer to a known class.
 * @param checkSignature if true, check if the given method has the same signature and if the reference refers toa superclass of this method's class. If this is false, it is assumed that the signatures match and this method's class is a subclass of the referred class.
 * @return true if this method overrides the given method and can access the method.
 */
public boolean overrides(MethodRef superMethod,boolean checkSignature){
  ClassInfo classRef=superMethod.getClassInfo();
  if (classRef == null) {
    throw new AppInfoError("String_Node_Str" + superMethod + "String_Node_Str");
  }
  if (classRef.equals(getClassInfo())) {
    if (checkSignature && !getMethodSignature().equals(superMethod.getMethodSignature())) {
      return false;
    }
    return true;
  }
  if (isStatic()) {
    return false;
  }
  if (checkSignature) {
    if (!getMethodSignature().equals(superMethod.getMethodSignature())) {
      return false;
    }
    if (!getClassInfo().isSubclassOf(superMethod.getClassInfo())) {
      return false;
    }
  }
  MethodInfo sm=superMethod.getMethodInfo();
  if (sm == null) {
    throw new AppInfoError("String_Node_Str" + superMethod + "String_Node_Str");
  }
  if (sm.isStatic()) {
    logger.warn("String_Node_Str" + getMemberID() + "String_Node_Str"+ sm.getMemberID());
  }
  return getClassInfo().canAccess(sm);
}

Fixed version (ground truth):
/** 
 * Check if this method is the same as or overrides a given method. <p> This checks the class of the reference if checkSignature is true, so even if the reference resolves to this method, this returns false if the reference refers to a subclass of this method's class. </p>
 * @param superMethod the superMethod to check, must refer to a known class.
 * @param checkSignature if true, check if the given method has the same signature and if the reference refers toa superclass of this method's class. If this is false, it is assumed that the signatures match and this method's class is a subclass of the referred class.
 * @return true if this method overrides the given method and can access the method.
 */
public boolean overrides(MethodRef superMethod,boolean checkSignature){
  ClassInfo classRef=superMethod.getClassInfo();
  if (classRef == null) {
    throw new AppInfoError("String_Node_Str" + superMethod + "String_Node_Str");
  }
  if (classRef.equals(getClassInfo())) {
    if (checkSignature && !getMethodSignature().equals(superMethod.getMethodSignature())) {
      return false;
    }
    return true;
  }
  if (isStatic()) {
    return false;
  }
  MethodInfo sm=superMethod.getMethodInfo();
  if (this.equals(sm)) {
    return true;
  }
  if (checkSignature) {
    if (!getMethodSignature().equals(superMethod.getMethodSignature())) {
      return false;
    }
    if (!getClassInfo().isSubclassOf(superMethod.getClassInfo())) {
      return false;
    }
  }
  if (sm == null) {
    throw new AppInfoError("String_Node_Str" + superMethod + "String_Node_Str");
  }
  if (sm.isStatic()) {
    logger.warn("String_Node_Str" + getMemberID() + "String_Node_Str"+ sm.getMemberID());
  }
  return getClassInfo().canAccess(sm);
}