Program: 186626
Project: 186626
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;
  }
  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);
}

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> <p>This might not work as expected for interface methods. To check if this method implements an interface method even if the class of this method does not implement the interface, use  {@link #implementsMethod(MethodRef)} instead.</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 superClass=superMethod.getClassInfo();
  if (superClass == null) {
    throw new AppInfoError("String_Node_Str" + superMethod + "String_Node_Str");
  }
  if (superClass.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(superClass)) {
      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);
}