Program: 65434
Project: 65434
Buggy source:
/** 
 * Build descriptor and mappings for an Object type argument.  The newly created descriptor will be added to the given OX project.
 */
protected void addToOXProjectForObjectTypeArg(DatabaseType dbType,Project oxProject,String objectName,String objectAlias){
  XMLDescriptor xdesc=(XMLDescriptor)oxProject.getDescriptorForAlias(objectAlias);
  if (xdesc == null) {
    xdesc=buildAndAddNewXMLDescriptor(oxProject,objectAlias,objectName,nct.generateSchemaAlias(objectAlias),buildCustomQName(objectName,dbwsBuilder).getNamespaceURI());
  }
  ObjectType oType=(ObjectType)dbType;
  for (  FieldType field : oType.getFields()) {
    String lFieldName=field.getFieldName().toLowerCase();
    if (xdesc.getMappingForAttributeName(lFieldName) == null) {
      if (field.isComposite()) {
        String targetTypeName2=field.getDataType().getTypeName();
        String alias=targetTypeName2.toLowerCase();
        XMLDescriptor xdesc2=(XMLDescriptor)oxProject.getDescriptorForAlias(alias);
        boolean buildDescriptor=xdesc2 == null;
        if (buildDescriptor) {
          xdesc2=buildAndAddNewXMLDescriptor(oxProject,alias,nct.generateSchemaAlias(alias),buildCustomQName(targetTypeName2,dbwsBuilder).getNamespaceURI());
        }
        if (field.getDataType() instanceof ObjectType) {
          if (buildDescriptor) {
            xdesc2.setJavaClassName(getGeneratedJavaClassName(alias,dbwsBuilder.getProjectName()));
            addToOXProjectForObjectTypeArg(field.getDataType(),oxProject,xdesc2.getJavaClassName(),alias);
          }
          buildAndAddXMLCompositeObjectMapping(xdesc,lFieldName,xdesc2.getJavaClassName());
        }
 else         if (field.getDataType() instanceof VArrayType) {
          if (buildDescriptor) {
            xdesc2.setJavaClassName(getGeneratedJavaClassName(alias,dbwsBuilder.getProjectName()));
            addToOXProjectForVArrayArg(field.getDataType(),oxProject,xdesc2.getJavaClassName(),alias);
          }
          buildAndAddXMLCompositeDirectCollectionMapping(xdesc,lFieldName,lFieldName + SLASH + TEXT,getAttributeClassForDatabaseType(field.getDataType()));
        }
      }
 else {
        addDirectMappingForFieldType(xdesc,lFieldName,field);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Build descriptor and mappings for an Object type argument.  The newly created descriptor will be added to the given OX project.
 */
protected void addToOXProjectForObjectTypeArg(DatabaseType dbType,Project oxProject,String objectName,String objectAlias){
  XMLDescriptor xdesc=(XMLDescriptor)oxProject.getDescriptorForAlias(objectAlias);
  if (xdesc == null) {
    xdesc=buildAndAddNewXMLDescriptor(oxProject,objectAlias,objectName,nct.generateSchemaAlias(objectAlias),buildCustomQName(objectName,dbwsBuilder).getNamespaceURI());
  }
  ObjectType oType=(ObjectType)dbType;
  for (  FieldType field : oType.getFields()) {
    String lFieldName=field.getFieldName().toLowerCase();
    if (xdesc.getMappingForAttributeName(lFieldName) == null) {
      if (field.isComposite()) {
        String targetTypeName2=field.getDataType().getTypeName();
        String alias=targetTypeName2.toLowerCase();
        XMLDescriptor xdesc2=(XMLDescriptor)oxProject.getDescriptorForAlias(alias);
        boolean buildDescriptor=xdesc2 == null;
        if (buildDescriptor) {
          xdesc2=buildAndAddNewXMLDescriptor(oxProject,alias,nct.generateSchemaAlias(alias),buildCustomQName(targetTypeName2,dbwsBuilder).getNamespaceURI());
        }
        if (field.getDataType() instanceof ObjectType) {
          if (buildDescriptor) {
            xdesc2.setJavaClassName(getGeneratedJavaClassName(alias,dbwsBuilder.getProjectName()));
            addToOXProjectForObjectTypeArg(field.getDataType(),oxProject,xdesc2.getJavaClassName(),alias);
          }
          buildAndAddXMLCompositeObjectMapping(xdesc,lFieldName,xdesc2.getJavaClassName());
        }
 else         if (field.getDataType() instanceof VArrayType) {
          if (buildDescriptor) {
            xdesc2.setJavaClassName(getGeneratedJavaClassName(alias,dbwsBuilder.getProjectName()));
            addToOXProjectForVArrayArg(field.getDataType(),oxProject,xdesc2.getJavaClassName(),alias);
          }
          buildAndAddXMLCompositeDirectCollectionMapping(xdesc,lFieldName,lFieldName + SLASH + TEXT,getAttributeClassForDatabaseType(field.getDataType()));
        }
 else         if (field.getDataType() instanceof ObjectTableType) {
          if (buildDescriptor) {
            xdesc2.setJavaClassName(getGeneratedJavaClassName(alias,dbwsBuilder.getProjectName()));
          }
          String nestedTypeAlias=((ObjectTableType)field.getDataType()).getEnclosedType().getTypeName().toLowerCase();
          String nestedTypeName=getGeneratedJavaClassName(nestedTypeAlias,dbwsBuilder.getProjectName());
          buildAndAddXMLCompositeCollectionMapping(xdesc,lFieldName,lFieldName + SLASH + ITEM_MAPPING_NAME,nestedTypeName);
        }
      }
 else {
        addDirectMappingForFieldType(xdesc,lFieldName,field);
      }
    }
  }
}