Program: 185431
Project: 185431
Buggy source:
public MethodReferenceSearchRequestor(MethodPattern pattern,SearchRequestor requestor,SearchParticipant participant){
  this.requestor=requestor;
  this.participant=participant;
  this.methodName=String.valueOf(pattern.selector);
  String[] parameterTypeSignatures=getParameterTypeSignatures(pattern);
  IType declaringType=(IType)ReflectionUtils.getPrivateField(MethodPattern.class,"String_Node_Str",pattern);
  char[] declaringQualifiedName=null;
  try {
    if (pattern.focus instanceof IMethod && supportsOverride((IMethod)pattern.focus)) {
      LinkedList<IMethod> methods=new LinkedList<>();
      if (declaringType == null)       declaringType=((IMethod)pattern.focus).getDeclaringType();
      for (      IType superType : declaringType.newSupertypeHierarchy(null).getAllSupertypes(declaringType)) {
        IMethod superMeth=superType.getMethod(methodName,parameterTypeSignatures);
        if (superMeth.exists() && supportsOverride(superMeth)) {
          methods.add(superMeth);
        }
      }
      if (!methods.isEmpty()) {
        IType type=methods.getLast().getDeclaringType();
        char[] superTypeName=type.getElementName().toCharArray();
        char[] packageName=type.getPackageFragment().getElementName().toCharArray();
        declaringQualifiedName=CharOperation.concat(packageName,superTypeName,'.');
      }
    }
  }
 catch (  Exception e) {
    Util.log(e);
  }
  if (declaringQualifiedName == null) {
    declaringQualifiedName=CharOperation.concat(pattern.declaringQualification,pattern.declaringSimpleName,'.');
    if (declaringQualifiedName == null) {
      if (declaringType != null) {
        declaringQualifiedName=CharOperation.concat(declaringType.getPackageFragment().getElementName().toCharArray(),declaringType.getElementName().toCharArray(),'.');
      }
 else {
        declaringQualifiedName=CharOperation.NO_CHAR;
      }
    }
  }
  declaringTypeName=String.valueOf(declaringQualifiedName);
  parameterTypeNames=getParameterTypeNames(pattern,parameterTypeSignatures,declaringType);
  findDeclarations=(Boolean)ReflectionUtils.getPrivateField(MethodPattern.class,"String_Node_Str",pattern);
  findReferences=(Boolean)ReflectionUtils.getPrivateField(MethodPattern.class,"String_Node_Str",pattern);
}

Fixed version (ground truth):
public MethodReferenceSearchRequestor(MethodPattern pattern,SearchRequestor requestor,SearchParticipant participant){
  this.requestor=requestor;
  this.participant=participant;
  this.methodName=String.valueOf(pattern.selector);
  String[] parameterTypeSignatures=getParameterTypeSignatures(pattern);
  IType declaringType=(IType)ReflectionUtils.getPrivateField(MethodPattern.class,"String_Node_Str",pattern);
  char[] declaringQualifiedName=null;
  try {
    if (pattern.focus instanceof IMethod && supportsOverride((IMethod)pattern.focus)) {
      LinkedList<IMethod> methods=new LinkedList<>();
      if (declaringType == null)       declaringType=((IMethod)pattern.focus).getDeclaringType();
      for (      IType superType : declaringType.newSupertypeHierarchy(null).getAllSupertypes(declaringType)) {
        IMethod superMeth=superType.getMethod(methodName,parameterTypeSignatures);
        if (superMeth.exists() && supportsOverride(superMeth)) {
          methods.add(superMeth);
        }
      }
      if (!methods.isEmpty()) {
        IType type=methods.getLast().getDeclaringType();
        char[] superTypeName=type.getElementName().toCharArray();
        char[] packageName=type.getPackageFragment().getElementName().toCharArray();
        declaringQualifiedName=CharOperation.concat(packageName,superTypeName,'.');
      }
    }
  }
 catch (  Exception e) {
    Util.log(e);
  }
  if (declaringQualifiedName == null) {
    declaringQualifiedName=CharOperation.concat(pattern.declaringQualification,pattern.declaringSimpleName,'.');
    if (declaringQualifiedName == null) {
      if (declaringType != null) {
        declaringQualifiedName=CharOperation.concat(declaringType.getPackageFragment().getElementName().toCharArray(),declaringType.getElementName().toCharArray(),'.');
      }
 else {
        declaringQualifiedName=CharOperation.NO_CHAR;
      }
    }
  }
  declaringTypeName=String.valueOf(declaringQualifiedName);
  parameterTypeNames=getParameterTypeNames(pattern,parameterTypeSignatures,declaringType);
  findReferences=(Boolean)ReflectionUtils.getPrivateField(MethodPattern.class,"String_Node_Str",pattern);
  findDeclarations=(Boolean)ReflectionUtils.getPrivateField(MethodPattern.class,"String_Node_Str",pattern);
}