Program: 28739
Project: 28739
Buggy source:
private void setHomeTargetMethodInfo(InvocationInfo invInfo,boolean isLocal) throws EJBException {
  Class homeIntfClazz=isLocal ? javax.ejb.EJBLocalHome.class : javax.ejb.EJBHome.class;
  Class methodClass=invInfo.method.getDeclaringClass();
  Class[] paramTypes=invInfo.method.getParameterTypes();
  String methodName=invInfo.method.getName();
  try {
    Method m=homeIntfClazz.getMethod(methodName,paramTypes);
    String[] params={m.toString(),invInfo.method.toString()};
    _logger.log(Level.WARNING,"String_Node_Str",params);
    invInfo.ejbIntfOverride=true;
    return;
  }
 catch (  NoSuchMethodException nsme) {
  }
  try {
    if (invInfo.startsWithCreate) {
      String extraCreateChars=methodName.substring("String_Node_Str".length());
      invInfo.targetMethod1=ejbClass.getMethod("String_Node_Str" + extraCreateChars,paramTypes);
      adjustHomeTargetMethodInfo(invInfo,methodName,paramTypes);
    }
 else     if (invInfo.startsWithFind) {
      String extraFinderChars=methodName.substring("String_Node_Str".length());
      invInfo.targetMethod1=ejbClass.getMethod("String_Node_Str" + extraFinderChars,paramTypes);
    }
 else {
      String upperCasedName=methodName.substring(0,1).toUpperCase() + methodName.substring(1);
      invInfo.targetMethod1=ejbClass.getMethod("String_Node_Str" + upperCasedName,paramTypes);
    }
  }
 catch (  NoSuchMethodException nsme) {
    if ((methodClass == localBusinessHomeIntf) || (methodClass == remoteBusinessHomeIntf) || (methodClass == ejbOptionalLocalBusinessHomeIntf || (methodClass == GenericEJBHome.class))) {
    }
 else     if (isStatelessSession || isSingleton) {
    }
 else {
      Method initMethod=null;
      if (isSession) {
        EjbSessionDescriptor sessionDesc=(EjbSessionDescriptor)ejbDescriptor;
        for (        EjbInitInfo next : sessionDesc.getInitMethods()) {
          MethodDescriptor beanMethod=next.getBeanMethod();
          Method m=beanMethod.getMethod(sessionDesc);
          if (next.getCreateMethod().getName().equals(methodName) && TypeUtil.sameParamTypes(m,invInfo.method)) {
            initMethod=m;
            break;
          }
        }
      }
      if (initMethod != null) {
        invInfo.targetMethod1=initMethod;
      }
 else {
        Object[] params={logParams[0],(isLocal ? "String_Node_Str" : "String_Node_Str"),invInfo.method.toString()};
        _logger.log(Level.WARNING,"String_Node_Str",params);
        invInfo.targetMethod1=null;
        invInfo.targetMethod2=null;
      }
    }
  }
}

Fixed version (ground truth):
private void setHomeTargetMethodInfo(InvocationInfo invInfo,boolean isLocal) throws EJBException {
  Class homeIntfClazz=isLocal ? javax.ejb.EJBLocalHome.class : javax.ejb.EJBHome.class;
  Class methodClass=invInfo.method.getDeclaringClass();
  Class[] paramTypes=invInfo.method.getParameterTypes();
  String methodName=invInfo.method.getName();
  try {
    Method m=homeIntfClazz.getMethod(methodName,paramTypes);
    String[] params={m.toString(),invInfo.method.toString()};
    _logger.log(Level.WARNING,"String_Node_Str",params);
    invInfo.ejbIntfOverride=true;
    return;
  }
 catch (  NoSuchMethodException nsme) {
  }
  try {
    if (invInfo.startsWithCreate) {
      String extraCreateChars=methodName.substring("String_Node_Str".length());
      invInfo.targetMethod1=ejbClass.getMethod("String_Node_Str" + extraCreateChars,paramTypes);
      adjustHomeTargetMethodInfo(invInfo,methodName,paramTypes);
    }
 else     if (invInfo.startsWithFind) {
      String extraFinderChars=methodName.substring("String_Node_Str".length());
      invInfo.targetMethod1=ejbClass.getMethod("String_Node_Str" + extraFinderChars,paramTypes);
    }
 else {
      String upperCasedName=methodName.substring(0,1).toUpperCase(Locale.US) + methodName.substring(1);
      invInfo.targetMethod1=ejbClass.getMethod("String_Node_Str" + upperCasedName,paramTypes);
    }
  }
 catch (  NoSuchMethodException nsme) {
    if ((methodClass == localBusinessHomeIntf) || (methodClass == remoteBusinessHomeIntf) || (methodClass == ejbOptionalLocalBusinessHomeIntf || (methodClass == GenericEJBHome.class))) {
    }
 else     if (isStatelessSession || isSingleton) {
    }
 else {
      Method initMethod=null;
      if (isSession) {
        EjbSessionDescriptor sessionDesc=(EjbSessionDescriptor)ejbDescriptor;
        for (        EjbInitInfo next : sessionDesc.getInitMethods()) {
          MethodDescriptor beanMethod=next.getBeanMethod();
          Method m=beanMethod.getMethod(sessionDesc);
          if (next.getCreateMethod().getName().equals(methodName) && TypeUtil.sameParamTypes(m,invInfo.method)) {
            initMethod=m;
            break;
          }
        }
      }
      if (initMethod != null) {
        invInfo.targetMethod1=initMethod;
      }
 else {
        Object[] params={logParams[0],(isLocal ? "String_Node_Str" : "String_Node_Str"),invInfo.method.toString()};
        _logger.log(Level.WARNING,"String_Node_Str",params);
        invInfo.targetMethod1=null;
        invInfo.targetMethod2=null;
      }
    }
  }
}