Program: 143406
Project: 143406
Buggy source:
private Object getSabloValue(Object formElementValue,PropertyDescription pd,FormElement formElement,INGApplication application){
  if (formElementValue == NGConversions.IDesignToFormElement.TYPE_DEFAULT_VALUE_MARKER || formElementValue == DESIGN_DEFAULT) {
    formElementValue=null;
  }
  if (formElementValue instanceof String || formElementValue == null) {
    String dataproviderId=null;
    if (pd.getConfig() instanceof String[]) {
      for (      String element : (String[])pd.getConfig()) {
        PropertyDescription forProperty=formElement.getWebComponentSpec().getProperty(element);
        if (forProperty != null) {
          if (forProperty.getType() instanceof DataproviderPropertyType) {
            dataproviderId=(String)formElement.getPropertyValue(element);
            break;
          }
 else           if (forProperty.getType() instanceof ValueListPropertyType) {
            Object id=formElement.getPropertyValue(element);
            int valuelistID=Utils.getAsInteger(id);
            ValueList val=null;
            if (valuelistID > 0) {
              val=application.getFlattenedSolution().getValueList(valuelistID);
            }
 else {
              UUID uuid=Utils.getAsUUID(id,false);
              if (uuid != null)               val=(ValueList)application.getFlattenedSolution().searchPersist(uuid);
            }
            if (val != null) {
              int dpType=IColumnTypes.TEXT;
              IDataProvider dataProvider=null;
              ITable table;
              try {
                if (val.getRelationName() != null) {
                  Relation[] relations=application.getFlattenedSolution().getRelationSequence(val.getRelationName());
                  table=relations[relations.length - 1].getForeignTable();
                }
 else {
                  table=val.getTable();
                }
                if (table != null) {
                  String dp=null;
                  int showDataProviders=val.getShowDataProviders();
                  if (showDataProviders == 1) {
                    dp=val.getDataProviderID1();
                  }
 else                   if (showDataProviders == 2) {
                    dp=val.getDataProviderID2();
                  }
 else                   if (showDataProviders == 4) {
                    dp=val.getDataProviderID3();
                  }
                  if (dp != null) {
                    dataProvider=application.getFlattenedSolution().getDataProviderForTable((Table)table,dp);
                  }
                  if (dataProvider != null) {
                    dpType=dataProvider.getDataProviderType();
                  }
                  return ComponentFormat.getComponentFormat((String)formElementValue,dpType,application);
                }
              }
 catch (              Exception ex) {
                Debug.error(ex);
              }
            }
          }
        }
      }
    }
    ComponentFormat format=ComponentFormat.getComponentFormat((String)formElementValue,dataproviderId,application.getFlattenedSolution().getDataproviderLookup(application.getFoundSetManager(),formElement.getForm()),application);
    return format;
  }
  return formElementValue;
}

Fixed version (ground truth):
private Object getSabloValue(Object formElementValue,PropertyDescription pd,WebFormComponent component){
  FormElement formElement=component.getFormElement();
  IApplication application=component.getDataConverterContext().getApplication();
  if (formElementValue == NGConversions.IDesignToFormElement.TYPE_DEFAULT_VALUE_MARKER || formElementValue == DESIGN_DEFAULT) {
    formElementValue=null;
  }
  if (formElementValue instanceof String || formElementValue == null) {
    String dataproviderId=null;
    if (pd.getConfig() instanceof String[]) {
      for (      String element : (String[])pd.getConfig()) {
        PropertyDescription forProperty=formElement.getWebComponentSpec().getProperty(element);
        if (forProperty != null) {
          if (forProperty.getType() instanceof DataproviderPropertyType) {
            dataproviderId=(String)formElement.getPropertyValue(element);
            break;
          }
 else           if (forProperty.getType() instanceof ValueListPropertyType) {
            Object id=formElement.getPropertyValue(element);
            int valuelistID=Utils.getAsInteger(id);
            ValueList val=null;
            if (valuelistID > 0) {
              val=application.getFlattenedSolution().getValueList(valuelistID);
            }
 else {
              UUID uuid=Utils.getAsUUID(id,false);
              if (uuid != null)               val=(ValueList)application.getFlattenedSolution().searchPersist(uuid);
            }
            if (val != null) {
              int dpType=IColumnTypes.TEXT;
              IDataProvider dataProvider=null;
              ITable table;
              try {
                if (val.getRelationName() != null) {
                  Relation[] relations=application.getFlattenedSolution().getRelationSequence(val.getRelationName());
                  table=relations[relations.length - 1].getForeignTable();
                }
 else {
                  table=val.getTable();
                }
                if (table != null) {
                  String dp=null;
                  int showDataProviders=val.getShowDataProviders();
                  if (showDataProviders == 1) {
                    dp=val.getDataProviderID1();
                  }
 else                   if (showDataProviders == 2) {
                    dp=val.getDataProviderID2();
                  }
 else                   if (showDataProviders == 4) {
                    dp=val.getDataProviderID3();
                  }
                  if (dp != null) {
                    dataProvider=application.getFlattenedSolution().getDataProviderForTable((Table)table,dp);
                  }
                  if (dataProvider != null) {
                    dpType=dataProvider.getDataProviderType();
                  }
                  return ComponentFormat.getComponentFormat((String)formElementValue,dpType,application);
                }
              }
 catch (              Exception ex) {
                Debug.error(ex);
              }
            }
          }
        }
      }
    }
    ComponentFormat format=ComponentFormat.getComponentFormat((String)formElementValue,dataproviderId,application.getFlattenedSolution().getDataproviderLookup(application.getFoundSetManager(),component.getDataConverterContext().getForm().getForm()),application);
    return format;
  }
  return formElementValue;
}