Program: 65427
Project: 65427
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.getEnclosedType().getTypeName();
        String alias=targetTypeName2.toLowerCase();
        ObjectRelationalDataTypeDescriptor ordt2=(ObjectRelationalDataTypeDescriptor)orProject.getDescriptorForAlias(alias);
        boolean buildDescriptor=ordt2 == null;
        if (buildDescriptor) {
          ordt2=buildAndAddNewObjectRelationalDataTypeDescriptor(orProject,alias);
        }
        if (fType.getEnclosedType().isObjectType()) {
          if (buildDescriptor) {
            ordt2.setJavaClassName(getGeneratedJavaClassName(alias,dbwsBuilder.getProjectName()));
            addToORProjectForObjectTypeArg(fType.getEnclosedType(),orProject,ordt2.getJavaClassName(),alias);
          }
          buildAndAddStructureMapping(ordt,lFieldName,fieldName,ordt2.getJavaClassName());
        }
 else         if (fType.getEnclosedType().isVArrayType()) {
          if (buildDescriptor) {
            ordt2.setJavaClassName(getGeneratedJavaClassName(alias,dbwsBuilder.getProjectName()));
            addToORProjectForVArrayArg(fType.getEnclosedType(),orProject,ordt2.getJavaClassName(),alias);
          }
          buildAndAddArrayMapping(ordt,lFieldName,fieldName,getStructureNameForField(fType,null));
        }
 else         if (fType.getEnclosedType().isObjectTableType()) {
          if (buildDescriptor) {
            ordt2.setJavaClassName(getGeneratedJavaClassName(alias,dbwsBuilder.getProjectName()));
          }
          ObjectType nestedType=(ObjectType)((ObjectTableType)fType.getEnclosedType()).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);
      }
    }
  }
}

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.getEnclosedType().getTypeName();
        String alias=targetTypeName2.toLowerCase();
        ObjectRelationalDataTypeDescriptor ordt2=(ObjectRelationalDataTypeDescriptor)orProject.getDescriptorForAlias(alias);
        boolean buildDescriptor=ordt2 == null;
        if (buildDescriptor) {
          ordt2=buildAndAddNewObjectRelationalDataTypeDescriptor(orProject,alias);
        }
        if (fType.getEnclosedType().isObjectType()) {
          if (buildDescriptor) {
            ordt2.setJavaClassName(getGeneratedJavaClassName(alias,dbwsBuilder.getProjectName()));
            addToORProjectForObjectTypeArg(fType.getEnclosedType(),orProject,ordt2.getJavaClassName(),alias);
          }
          buildAndAddStructureMapping(ordt,lFieldName,fieldName,ordt2.getJavaClassName());
        }
 else         if (fType.getEnclosedType().isVArrayType()) {
          if (buildDescriptor) {
            ordt2.setJavaClassName(getGeneratedJavaClassName(alias,dbwsBuilder.getProjectName()));
            addToORProjectForVArrayArg(fType.getEnclosedType(),orProject,ordt2.getJavaClassName(),alias);
          }
          buildAndAddArrayMapping(ordt,lFieldName,fieldName,getStructureNameForField(fType,null));
        }
 else         if (fType.getEnclosedType().isObjectTableType()) {
          if (buildDescriptor) {
            ordt2.setJavaClassName(getGeneratedJavaClassName(alias,dbwsBuilder.getProjectName()));
            addToORProjectForObjectTableTypeArg(fType.getEnclosedType(),orProject,targetTypeName2,alias);
          }
          ObjectType nestedType=(ObjectType)((ObjectTableType)fType.getEnclosedType()).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);
      }
    }
  }
}