Program: 143416
Project: 143416
Buggy source:
private Object getSabloValue(Object formElementValue,PropertyDescription pd,FormElement formElement,DataAdapterList dataAdapterList){
  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);
            INGApplication application=dataAdapterList.getApplication();
            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();
                  }
                }
              }
 catch (              Exception ex) {
                Debug.error(ex);
              }
              return ComponentFormat.getComponentFormat((String)formElementValue,dpType,application);
            }
          }
        }
      }
    }
    ComponentFormat format=ComponentFormat.getComponentFormat((String)formElementValue,dataproviderId,dataAdapterList.getApplication().getFlattenedSolution().getDataproviderLookup(dataAdapterList.getApplication().getFoundSetManager(),dataAdapterList.getForm().getForm()),dataAdapterList.getApplication());
    return format;
  }
  return formElementValue;
}

Fixed version (ground truth):
private Object getSabloValue(Object formElementValue,PropertyDescription pd,FormElement formElement,DataAdapterList dataAdapterList){
  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);
            INGApplication application=dataAdapterList.getApplication();
            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,dataAdapterList.getApplication().getFlattenedSolution().getDataproviderLookup(dataAdapterList.getApplication().getFoundSetManager(),dataAdapterList.getForm().getForm()),dataAdapterList.getApplication());
    return format;
  }
  return formElementValue;
}