Program: 65609
Project: 65609
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 objectAlias){
  ObjectRelationalDataTypeDescriptor ordt=(ObjectRelationalDataTypeDescriptor)orProject.getDescriptorForAlias(objectAlias);
  if (ordt == null) {
    ordt=buildAndAddNewObjectRelationalDataTypeDescriptor(orProject,objectAlias);
  }
  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()) {
        if (fType.getDataType() instanceof ObjectType) {
          String targetTypeName2=fType.getDataType().getTypeName();
          String alias=targetTypeName2.toLowerCase();
          ObjectRelationalDataTypeDescriptor ordt2=(ObjectRelationalDataTypeDescriptor)orProject.getDescriptorForAlias(alias);
          if (ordt2 == null) {
            ordt2=buildAndAddNewObjectRelationalDataTypeDescriptor(orProject,alias);
            addToORProjectForObjectTypeArg(fType.getDataType(),orProject,alias);
          }
          buildAndAddStructureMapping(ordt,lFieldName,fieldName,ordt2.getJavaClassName());
        }
      }
 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 objectAlias){
  ObjectRelationalDataTypeDescriptor ordt=(ObjectRelationalDataTypeDescriptor)orProject.getDescriptorForAlias(objectAlias);
  if (ordt == null) {
    ordt=buildAndAddNewObjectRelationalDataTypeDescriptor(orProject,objectAlias);
  }
  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) {
            addToORProjectForObjectTypeArg(fType.getDataType(),orProject,alias);
          }
          buildAndAddStructureMapping(ordt,lFieldName,fieldName,ordt2.getJavaClassName());
        }
 else         if (fType.getDataType() instanceof VArrayType) {
          if (buildDescriptor) {
            addToORProjectForVArrayArg(fType.getDataType(),orProject,targetTypeName2,alias);
          }
          buildAndAddArrayMapping(ordt,lFieldName,fieldName,getStructureNameForField(fType,null));
        }
      }
 else {
        DirectToFieldMapping dfm=new DirectToFieldMapping();
        dfm.setFieldName(fieldName);
        dfm.setAttributeName(lFieldName);
        ordt.addMapping(dfm);
      }
    }
  }
}