Program: 53950
Project: 53950
Buggy source:
/** 
 * Create the shim instance of the AutoBean's peer type that lets us hijack the method calls. Using a shim type, as opposed to making the AutoBean implement the peer type directly, means that there can't be any conflicts between methods in the peer type and methods declared in the AutoBean implementation.
 */
private void writeShim(SourceWriter sw,AutoBeanType type) throws UnableToCompleteException {
  sw.println("String_Node_Str",type.getPeerType().getQualifiedSourceName());
  sw.indent();
  for (  AutoBeanMethod method : type.getMethods()) {
    JMethod jmethod=method.getMethod();
    String methodName=jmethod.getName();
    JParameter[] parameters=jmethod.getParameters();
    if (isObjectMethodImplementedByShim(jmethod)) {
      continue;
    }
    StringBuilder arguments=new StringBuilder();
{
      for (      JParameter param : parameters) {
        arguments.append("String_Node_Str").append(param.getName());
      }
      if (arguments.length() > 0) {
        arguments=arguments.deleteCharAt(0);
      }
    }
    sw.println("String_Node_Str",getBaseMethodDeclaration(jmethod));
    sw.indent();
    sw.println("String_Node_Str",type.getSimpleSourceName());
switch (method.getAction()) {
case GET:
      sw.println("String_Node_Str",AutoBeanFactoryModel.ensureBaseType(jmethod.getReturnType()).getQualifiedSourceName(),methodName,type.getSimpleSourceName());
    writeReturnWrapper(sw,type,method);
  sw.println("String_Node_Str");
break;
case SET:
sw.println("String_Node_Str",type.getSimpleSourceName());
sw.println("String_Node_Str",type.getSimpleSourceName(),methodName,parameters[0].getName());
sw.println("String_Node_Str",type.getSimpleSourceName(),methodName,parameters[0].getName());
break;
case CALL:
if (JPrimitiveType.VOID.equals(jmethod.getReturnType())) {
sw.println("String_Node_Str",type.getSimpleSourceName(),methodName,arguments);
sw.println("String_Node_Str",type.getSimpleSourceName(),methodName,arguments.length() > 0 ? "String_Node_Str" : "String_Node_Str",arguments);
}
 else {
sw.println("String_Node_Str",AutoBeanFactoryModel.ensureBaseType(jmethod.getReturnType()).getQualifiedSourceName(),type.getSimpleSourceName(),methodName,arguments);
writeReturnWrapper(sw,type,method);
sw.println("String_Node_Str",type.getSimpleSourceName(),methodName,arguments.length() > 0 ? "String_Node_Str" : "String_Node_Str",arguments);
sw.println("String_Node_Str");
}
break;
default :
throw new RuntimeException();
}
sw.outdent();
sw.println("String_Node_Str");
}
sw.println("String_Node_Str");
sw.indentln("String_Node_Str");
sw.println("String_Node_Str");
sw.println("String_Node_Str");
sw.indentln("String_Node_Str");
sw.println("String_Node_Str");
sw.println("String_Node_Str");
sw.indentln("String_Node_Str");
sw.println("String_Node_Str");
sw.outdent();
sw.println("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Create the shim instance of the AutoBean's peer type that lets us hijack the method calls. Using a shim type, as opposed to making the AutoBean implement the peer type directly, means that there can't be any conflicts between methods in the peer type and methods declared in the AutoBean implementation.
 */
private void writeShim(SourceWriter sw,AutoBeanType type) throws UnableToCompleteException {
  sw.println("String_Node_Str",type.getPeerType().getQualifiedSourceName());
  sw.indent();
  for (  AutoBeanMethod method : type.getMethods()) {
    JMethod jmethod=method.getMethod();
    String methodName=jmethod.getName();
    JParameter[] parameters=jmethod.getParameters();
    if (isObjectMethodImplementedByShim(jmethod)) {
      continue;
    }
    StringBuilder arguments=new StringBuilder();
{
      for (      JParameter param : parameters) {
        arguments.append("String_Node_Str").append(param.getName());
      }
      if (arguments.length() > 0) {
        arguments=arguments.deleteCharAt(0);
      }
    }
    sw.println("String_Node_Str",getBaseMethodDeclaration(jmethod));
    sw.indent();
    sw.println("String_Node_Str",type.getSimpleSourceName());
switch (method.getAction()) {
case GET:
      sw.println("String_Node_Str",ModelUtils.getQualifiedBaseName(jmethod.getReturnType()),methodName,type.getSimpleSourceName());
    writeReturnWrapper(sw,type,method);
  sw.println("String_Node_Str");
break;
case SET:
sw.println("String_Node_Str",type.getSimpleSourceName());
sw.println("String_Node_Str",type.getSimpleSourceName(),methodName,parameters[0].getName());
sw.println("String_Node_Str",type.getSimpleSourceName(),methodName,parameters[0].getName());
break;
case CALL:
if (JPrimitiveType.VOID.equals(jmethod.getReturnType())) {
sw.println("String_Node_Str",type.getSimpleSourceName(),methodName,arguments);
sw.println("String_Node_Str",type.getSimpleSourceName(),methodName,arguments.length() > 0 ? "String_Node_Str" : "String_Node_Str",arguments);
}
 else {
sw.println("String_Node_Str",ModelUtils.ensureBaseType(jmethod.getReturnType()).getQualifiedSourceName(),type.getSimpleSourceName(),methodName,arguments);
writeReturnWrapper(sw,type,method);
sw.println("String_Node_Str",type.getSimpleSourceName(),methodName,arguments.length() > 0 ? "String_Node_Str" : "String_Node_Str",arguments);
sw.println("String_Node_Str");
}
break;
default :
throw new RuntimeException();
}
sw.outdent();
sw.println("String_Node_Str");
}
sw.println("String_Node_Str");
sw.indentln("String_Node_Str");
sw.println("String_Node_Str");
sw.println("String_Node_Str");
sw.indentln("String_Node_Str");
sw.println("String_Node_Str");
sw.println("String_Node_Str");
sw.indentln("String_Node_Str");
sw.println("String_Node_Str");
sw.outdent();
sw.println("String_Node_Str");
}