Program: 186643
Project: 186643
Buggy source:
/** 
 * Get all non-abstract methods (including this method if it is not abstract) overriding this method.
 * @see AppInfo#findImplementations(CallString)
 * @see AppInfo#findImplementations(MethodRef)
 * @param checkAccess if false, find all non-abstract methods with same signature even if they do notoverride this method.
 * @return a collection of all implementations of this method.
 */
public List<MethodInfo> getImplementations(final boolean checkAccess){
  final List<MethodInfo> implementations=new LinkedList<MethodInfo>();
  if (checkAccess && (isPrivate() || isStatic())) {
    if (isAbstract()) {
      throw new JavaClassFormatError("String_Node_Str" + toString());
    }
    implementations.add(this);
    return implementations;
  }
  ClassVisitor visitor=new ClassVisitor(){
    public boolean visitClass(    ClassInfo classInfo){
      MethodInfo m=classInfo.getMethodInfo(getMethodSignature());
      if (m != null) {
        if (m.isPrivate() && !isPrivate()) {
          logger.error("String_Node_Str" + m.getMethodSignature() + "String_Node_Str"+ classInfo.getClassName()+ "String_Node_Str"+ getClassInfo().getClassName());
        }
        if (!m.isAbstract() && (!checkAccess || m.overrides(MethodInfo.this,false))) {
          implementations.add(m);
        }
      }
      return true;
    }
    public void finishClass(    ClassInfo classInfo){
    }
  }
;
  new ClassHierarchyTraverser(visitor).traverseDown(getClassInfo());
  return implementations;
}

Fixed version (ground truth):
/** 
 * Get all non-abstract methods (including this method if it is not abstract) overriding this method.
 * @see AppInfo#findImplementations(CallString)
 * @see AppInfo#findImplementations(MethodRef)
 * @param checkAccess if false, find all non-abstract methods with same signature even if they do notoverride this method.
 * @return a collection of all implementations of this method.
 */
public List<MethodInfo> getImplementations(final boolean checkAccess){
  final List<MethodInfo> implementations=new LinkedList<MethodInfo>();
  if (checkAccess && (isPrivate() || isStatic())) {
    if (isAbstract()) {
      throw new JavaClassFormatError("String_Node_Str" + toString());
    }
    implementations.add(this);
    return implementations;
  }
  if ("String_Node_Str".equals(getShortName())) {
    if (isAbstract()) {
      throw new JavaClassFormatError("String_Node_Str" + toString());
    }
    implementations.add(this);
    return implementations;
  }
  ClassVisitor visitor=new ClassVisitor(){
    public boolean visitClass(    ClassInfo classInfo){
      MethodInfo m=classInfo.getMethodInfo(getMethodSignature());
      if (m != null) {
        if (m.isPrivate() && !isPrivate()) {
          logger.error("String_Node_Str" + m.getMethodSignature() + "String_Node_Str"+ classInfo.getClassName()+ "String_Node_Str"+ getClassInfo().getClassName());
        }
        if (!m.isAbstract() && (!checkAccess || m.overrides(MethodInfo.this,false))) {
          implementations.add(m);
        }
      }
      return true;
    }
    public void finishClass(    ClassInfo classInfo){
    }
  }
;
  new ClassHierarchyTraverser(visitor).traverseDown(getClassInfo());
  return implementations;
}