Program: 93242
Project: 93242
Buggy source:
/** 
 * Returns null if we fail to resolve all types used in the method signature, for instance generic return types etc...
 */
public Optional<IMethodName> toRecMethod(@Nullable IMethod jdtMethod){
  if (jdtMethod == null) {
    return absent();
  }
  if (!jdtMethod.exists()) {
    return absent();
  }
  JdtUtils.resolveJavaElementProxy(jdtMethod);
  IMethodName recMethod=(IMethodName)cache.inverse().get(jdtMethod);
  if (recMethod == null) {
    try {
      final IType jdtDeclaringType=jdtMethod.getDeclaringType();
      final String[] unresolvedParameterTypes=jdtMethod.getParameterTypes();
      final String[] resolvedParameterTypes=new String[unresolvedParameterTypes.length];
      for (int i=resolvedParameterTypes.length; i-- > 0; ) {
        final String unresolved=unresolvedParameterTypes[i];
        final int arrayCount=Signature.getArrayCount(unresolved);
        String resolved=resolveUnqualifiedTypeNamesAndStripOffGenericsAndArrayDimension(unresolved,jdtDeclaringType).or(Signature.SIG_VOID);
        resolved=resolved + StringUtils.repeat("String_Node_Str",arrayCount);
        resolvedParameterTypes[i]=resolved;
      }
      String resolvedReturnType=null;
      final String unresolvedReturnType=jdtMethod.getReturnType();
      try {
        final int returnTypeArrayCount=Signature.getArrayCount(unresolvedReturnType);
        resolvedReturnType=JavaModelUtil.getResolvedTypeName(unresolvedReturnType,jdtDeclaringType) + StringUtils.repeat("String_Node_Str",returnTypeArrayCount);
      }
 catch (      final JavaModelException e) {
        LOG.error("String_Node_Str",e);
      }
      if (resolvedReturnType == null) {
        LOG.warn("String_Node_Str",unresolvedReturnType,jdtDeclaringType.getFullyQualifiedName(),jdtMethod.getElementName(),jdtMethod.getSignature());
        return absent();
      }
      final String methodSignature=Names.src2vmMethod(jdtMethod.isConstructor() ? "String_Node_Str" : jdtMethod.getElementName(),resolvedParameterTypes,resolvedReturnType);
      final ITypeName recDeclaringType=toRecType(jdtDeclaringType);
      recMethod=VmMethodName.get(recDeclaringType.getIdentifier(),methodSignature);
      registerRecJdtElementPair(recMethod,jdtMethod);
    }
 catch (    final Exception e) {
      LOG.error("String_Node_Str",jdtMethod,e.getMessage(),e);
      return absent();
    }
  }
  return fromNullable(recMethod);
}

Fixed version (ground truth):
/** 
 * Returns null if we fail to resolve all types used in the method signature, for instance generic return types etc...
 */
public Optional<IMethodName> toRecMethod(@Nullable IMethod jdtMethod){
  if (jdtMethod == null) {
    return absent();
  }
  if (!jdtMethod.exists()) {
    return absent();
  }
  JdtUtils.resolveJavaElementProxy(jdtMethod);
  IMethodName recMethod=(IMethodName)cache.inverse().get(jdtMethod);
  if (recMethod == null) {
    try {
      final IType jdtDeclaringType=jdtMethod.getDeclaringType();
      final String[] unresolvedParameterTypes=jdtMethod.getParameterTypes();
      final String[] resolvedParameterTypes=new String[unresolvedParameterTypes.length];
      for (int i=resolvedParameterTypes.length; i-- > 0; ) {
        final String unresolved=unresolvedParameterTypes[i];
        final int arrayCount=Signature.getArrayCount(unresolved);
        String resolved=JdtUtils.resolveUnqualifiedTypeNamesAndStripOffGenericsAndArrayDimension(unresolved,jdtDeclaringType).or(Signature.SIG_VOID);
        resolved=resolved + StringUtils.repeat("String_Node_Str",arrayCount);
        resolvedParameterTypes[i]=resolved;
      }
      String resolvedReturnType=null;
      final String unresolvedReturnType=jdtMethod.getReturnType();
      try {
        final int returnTypeArrayCount=Signature.getArrayCount(unresolvedReturnType);
        resolvedReturnType=JavaModelUtil.getResolvedTypeName(unresolvedReturnType,jdtDeclaringType) + StringUtils.repeat("String_Node_Str",returnTypeArrayCount);
      }
 catch (      final JavaModelException e) {
        LOG.error("String_Node_Str",e);
      }
      if (resolvedReturnType == null) {
        LOG.warn("String_Node_Str",unresolvedReturnType,jdtDeclaringType.getFullyQualifiedName(),jdtMethod.getElementName(),jdtMethod.getSignature());
        return absent();
      }
      final String methodSignature=Names.src2vmMethod(jdtMethod.isConstructor() ? "String_Node_Str" : jdtMethod.getElementName(),resolvedParameterTypes,resolvedReturnType);
      final ITypeName recDeclaringType=toRecType(jdtDeclaringType);
      recMethod=VmMethodName.get(recDeclaringType.getIdentifier(),methodSignature);
      registerRecJdtElementPair(recMethod,jdtMethod);
    }
 catch (    final Exception e) {
      LOG.error("String_Node_Str",jdtMethod,e.getMessage(),e);
      return absent();
    }
  }
  return fromNullable(recMethod);
}