Program: 65433
Project: 65433
Buggy source:
/** 
 * Build descriptor and mappings for an Object type argument.  The newly created descriptor will be added to the given OX project.
 */
@SuppressWarnings("String_Node_Str") protected void addToORProjectForObjectTypeArg(DatabaseType dbType,Project orProject,String objectName,String objectAlias){
  ObjectRelationalDataTypeDescriptor ordt=(ObjectRelationalDataTypeDescriptor)orProject.getDescriptorForAlias(objectAlias);
  if (ordt == null) {
    ordt=buildAndAddNewObjectRelationalDataTypeDescriptor(orProject,objectAlias,objectName);
  }
  ObjectType oType=(ObjectType)dbType;
  for (  FieldType fType : oType.getFields()) {
    String fieldName=fType.getFieldName();
    String lFieldName=fieldName.toLowerCase();
    boolean found=false;
    Vector orderedFields=ordt.getOrderedFields();
    for (Iterator i=orderedFields.iterator(); i.hasNext(); ) {
      Object o=i.next();
      if (o instanceof DatabaseField) {
        DatabaseField field=(DatabaseField)o;
        if (field.getName().equalsIgnoreCase(fieldName)) {
          found=true;
          break;
        }
      }
    }
    if (!found) {
      ordt.addFieldOrdering(fieldName);
    }
    if (ordt.getMappingForAttributeName(lFieldName) == null) {
      if (fType.isComposite()) {
        String targetTypeName2=fType.getDataType().getTypeName();
        String alias=targetTypeName2.toLowerCase();
        ObjectRelationalDataTypeDescriptor ordt2=(ObjectRelationalDataTypeDescriptor)orProject.getDescriptorForAlias(alias);
        boolean buildDescriptor=ordt2 == null;
        if (buildDescriptor) {
          ordt2=buildAndAddNewObjectRelationalDataTypeDescriptor(orProject,alias);
        }
        if (fType.getDataType() instanceof ObjectType) {
          if (buildDescriptor) {
            ordt2.setJavaClassName(getGeneratedJavaClassName(alias,dbwsBuilder.getProjectName()));
            addToORProjectForObjectTypeArg(fType.getDataType(),orProject,ordt2.getJavaClassName(),alias);
          }
          buildAndAddStructureMapping(ordt,lFieldName,fieldName,ordt2.getJavaClassName());
        }
 else         if (fType.getDataType() instanceof VArrayType) {
          if (buildDescriptor) {
            ordt2.setJavaClassName(getGeneratedJavaClassName(alias,dbwsBuilder.getProjectName()));
            addToORProjectForVArrayArg(fType.getDataType(),orProject,ordt2.getJavaClassName(),alias);
          }
          buildAndAddArrayMapping(ordt,lFieldName,fieldName,getStructureNameForField(fType,null));
        }
      }
 else {
        DirectToFieldMapping dfm=new DirectToFieldMapping();
        dfm.setFieldName(fieldName);
        dfm.setAttributeName(lFieldName);
        ordt.addMapping(dfm);
      }
    }
  }
}

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.
 */
@SuppressWarnings("String_Node_Str") protected void addToORProjectForObjectTypeArg(DatabaseType dbType,Project orProject,String objectName,String objectAlias){
  ObjectRelationalDataTypeDescriptor ordt=(ObjectRelationalDataTypeDescriptor)orProject.getDescriptorForAlias(objectAlias);
  if (ordt == null) {
    ordt=buildAndAddNewObjectRelationalDataTypeDescriptor(orProject,objectAlias,objectName);
  }
  ObjectType oType=(ObjectType)dbType;
  for (  FieldType fType : oType.getFields()) {
    String fieldName=fType.getFieldName();
    String lFieldName=fieldName.toLowerCase();
    boolean found=false;
    Vector orderedFields=ordt.getOrderedFields();
    for (Iterator i=orderedFields.iterator(); i.hasNext(); ) {
      Object o=i.next();
      if (o instanceof DatabaseField) {
        DatabaseField field=(DatabaseField)o;
        if (field.getName().equalsIgnoreCase(fieldName)) {
          found=true;
          break;
        }
      }
    }
    if (!found) {
      ordt.addFieldOrdering(fieldName);
    }
    if (ordt.getMappingForAttributeName(lFieldName) == null) {
      if (fType.isComposite()) {
        String targetTypeName2=fType.getDataType().getTypeName();
        String alias=targetTypeName2.toLowerCase();
        ObjectRelationalDataTypeDescriptor ordt2=(ObjectRelationalDataTypeDescriptor)orProject.getDescriptorForAlias(alias);
        boolean buildDescriptor=ordt2 == null;
        if (buildDescriptor) {
          ordt2=buildAndAddNewObjectRelationalDataTypeDescriptor(orProject,alias);
        }
        if (fType.getDataType() instanceof ObjectType) {
          if (buildDescriptor) {
            ordt2.setJavaClassName(getGeneratedJavaClassName(alias,dbwsBuilder.getProjectName()));
            addToORProjectForObjectTypeArg(fType.getDataType(),orProject,ordt2.getJavaClassName(),alias);
          }
          buildAndAddStructureMapping(ordt,lFieldName,fieldName,ordt2.getJavaClassName());
        }
 else         if (fType.getDataType() instanceof VArrayType) {
          if (buildDescriptor) {
            ordt2.setJavaClassName(getGeneratedJavaClassName(alias,dbwsBuilder.getProjectName()));
            addToORProjectForVArrayArg(fType.getDataType(),orProject,ordt2.getJavaClassName(),alias);
          }
          buildAndAddArrayMapping(ordt,lFieldName,fieldName,getStructureNameForField(fType,null));
        }
 else         if (fType.getDataType() instanceof ObjectTableType) {
          if (buildDescriptor) {
            ordt2.setJavaClassName(getGeneratedJavaClassName(alias,dbwsBuilder.getProjectName()));
          }
          ObjectType nestedType=(ObjectType)((ObjectTableType)fType.getDataType()).getEnclosedType();
          String nestedTypeAlias=nestedType.getTypeName().toLowerCase();
          String nestedTypeName=getGeneratedJavaClassName(nestedTypeAlias,dbwsBuilder.getProjectName());
          buildAndAddObjectArrayMapping(ordt,lFieldName,fieldName,nestedTypeName,nestedTypeAlias.toUpperCase());
        }
      }
 else {
        DirectToFieldMapping dfm=new DirectToFieldMapping();
        dfm.setFieldName(fieldName);
        dfm.setAttributeName(lFieldName);
        ordt.addMapping(dfm);
      }
    }
  }
}