Program: 143403
Project: 143403
Buggy source:
@Override public void dataProviderOrRecordChanged(final IRecordInternal record,final String dataProvider,final boolean isFormDP,final boolean isGlobalDP,boolean fireChangeEvent){
  IDataProviderLookup dpLookup=new FormAndTableDataProviderLookup(servoyDataConverterContext.getApplication().getFlattenedSolution(),servoyDataConverterContext.getForm().getForm(),record != null ? record.getParentFoundSet().getTable() : null);
  Collection<PropertyDescription> properties=formElement.getWebComponentSpec().getProperties(TypesRegistry.getType("String_Node_Str"));
  for (  PropertyDescription formatPd : properties) {
    Object formatConfig=formatPd.getConfig();
    if (formatConfig instanceof String[] && Arrays.asList((String[])formatConfig).indexOf(dpPD.getName()) != -1) {
      INGApplication application=servoyDataConverterContext.getApplication();
      String format=(String)formElement.getPropertyValue(formatPd.getName());
      if (format != null) {
        fieldFormat=ComponentFormat.getComponentFormat(format,dataProviderID,dpLookup,application);
        break;
      }
    }
  }
  if (fieldFormat != null) {
    typeOfDP=NGUtils.getDataProviderPropertyDescription(fieldFormat.uiType,getDataProviderConfig().hasParseHtml());
  }
 else {
    typeOfDP=NGUtils.getDataProviderPropertyDescription(dataProviderID,servoyDataConverterContext.getApplication().getFlattenedSolution(),servoyDataConverterContext.getForm().getForm(),record != null ? record.getParentFoundSet().getTable() : null,getDataProviderConfig().hasParseHtml());
  }
  if (globalRelationName != null) {
    try {
      IFoundSetInternal newRelatedFoundset=servoyDataConverterContext.getApplication().getFoundSetManager().getGlobalRelatedFoundSet(globalRelationName);
      if (newRelatedFoundset != globalRelatedFoundset) {
        if (globalRelatedFoundset != null) {
          globalRelatedFoundset.removeFoundSetEventListener(globalRelatedFoundsetListener);
        }
        globalRelatedFoundset=newRelatedFoundset;
        globalRelatedFoundset.addFoundSetEventListener(globalRelatedFoundsetListener);
      }
    }
 catch (    Exception ex) {
      Debug.error(ex);
    }
  }
  if (relatedFoundsetSelectionListener != null) {
    try {
      IFoundSetInternal newRelatedFoundset=record.getRelatedFoundSet(relationName);
      if (newRelatedFoundset != relatedFoundset) {
        if (relatedFoundset != null) {
          ((ISwingFoundSet)relatedFoundset).getSelectionModel().removeListSelectionListener(relatedFoundsetSelectionListener);
        }
        relatedFoundset=newRelatedFoundset;
        ((ISwingFoundSet)relatedFoundset).getSelectionModel().addListSelectionListener(relatedFoundsetSelectionListener);
      }
    }
 catch (    Exception ex) {
      Debug.error(ex);
    }
  }
  String dpID=dataProviderID;
  if (dpLookup != null) {
    IDataProvider dp;
    try {
      dp=dpLookup.getDataProvider(dataProviderID);
      if (dp != null) {
        dpID=dp.getDataProviderID();
      }
    }
 catch (    RepositoryException e) {
      Debug.error(e);
    }
  }
  Object v=com.servoy.j2db.dataprocessing.DataAdapterList.getValueObject(record,servoyDataConverterContext.getForm().getFormScope(),dpID);
  if (v == Scriptable.NOT_FOUND)   v=null;
  if (fieldFormat != null && !findMode) {
    v=ComponentFormat.applyUIConverterToObject(v,dataProviderID,servoyDataConverterContext.getApplication().getFoundSetManager(),fieldFormat);
  }
  v=replaceTagsIfNeeded(v);
  if (v instanceof UUID)   v=v.toString();
  boolean changed=((v != value) && (v == null || !v.equals(value)));
  value=v;
  if (changed) {
    jsonValue=null;
  }
  if (fireChangeEvent && changed) {
    changeMonitor.valueChanged();
  }
}

Fixed version (ground truth):
@Override public void dataProviderOrRecordChanged(final IRecordInternal record,final String dataProvider,final boolean isFormDP,final boolean isGlobalDP,boolean fireChangeEvent){
  IDataProviderLookup dpLookup=new FormAndTableDataProviderLookup(servoyDataConverterContext.getApplication().getFlattenedSolution(),servoyDataConverterContext.getForm().getForm(),record != null ? record.getParentFoundSet().getTable() : null);
  Collection<PropertyDescription> properties=formElement.getWebComponentSpec().getProperties(TypesRegistry.getType("String_Node_Str"));
  for (  PropertyDescription formatPd : properties) {
    Object formatConfig=formatPd.getConfig();
    if (formatConfig instanceof String[] && Arrays.asList((String[])formatConfig).indexOf(dpPD.getName()) != -1) {
      INGApplication application=servoyDataConverterContext.getApplication();
      String format=(String)formElement.getPropertyValue(formatPd.getName());
      if (format != null) {
        fieldFormat=ComponentFormat.getComponentFormat(format,dataProviderID,dpLookup,application);
        break;
      }
    }
  }
  if (fieldFormat != null) {
    typeOfDP=NGUtils.getDataProviderPropertyDescription(fieldFormat.uiType,getDataProviderConfig().hasParseHtml());
  }
 else {
    typeOfDP=NGUtils.getDataProviderPropertyDescription(dataProviderID,servoyDataConverterContext.getApplication().getFlattenedSolution(),servoyDataConverterContext.getForm().getForm(),record != null ? record.getParentFoundSet().getTable() : null,getDataProviderConfig().hasParseHtml());
  }
  if (globalRelationName != null) {
    try {
      IFoundSetInternal newRelatedFoundset=servoyDataConverterContext.getApplication().getFoundSetManager().getGlobalRelatedFoundSet(globalRelationName);
      if (newRelatedFoundset != globalRelatedFoundset) {
        if (globalRelatedFoundset != null) {
          globalRelatedFoundset.removeFoundSetEventListener(globalRelatedFoundsetListener);
        }
        globalRelatedFoundset=newRelatedFoundset;
        globalRelatedFoundset.addFoundSetEventListener(globalRelatedFoundsetListener);
      }
    }
 catch (    Exception ex) {
      Debug.error(ex);
    }
  }
  if (relatedFoundsetSelectionListener != null) {
    try {
      IFoundSetInternal newRelatedFoundset=record != null ? record.getRelatedFoundSet(relationName) : null;
      if (newRelatedFoundset != relatedFoundset) {
        if (relatedFoundset != null) {
          ((ISwingFoundSet)relatedFoundset).getSelectionModel().removeListSelectionListener(relatedFoundsetSelectionListener);
        }
        relatedFoundset=newRelatedFoundset;
        ((ISwingFoundSet)relatedFoundset).getSelectionModel().addListSelectionListener(relatedFoundsetSelectionListener);
      }
    }
 catch (    Exception ex) {
      Debug.error(ex);
    }
  }
  String dpID=dataProviderID;
  if (dpLookup != null) {
    IDataProvider dp;
    try {
      dp=dpLookup.getDataProvider(dataProviderID);
      if (dp != null) {
        dpID=dp.getDataProviderID();
      }
    }
 catch (    RepositoryException e) {
      Debug.error(e);
    }
  }
  Object v=com.servoy.j2db.dataprocessing.DataAdapterList.getValueObject(record,servoyDataConverterContext.getForm().getFormScope(),dpID);
  if (v == Scriptable.NOT_FOUND)   v=null;
  if (fieldFormat != null && !findMode) {
    v=ComponentFormat.applyUIConverterToObject(v,dataProviderID,servoyDataConverterContext.getApplication().getFoundSetManager(),fieldFormat);
  }
  v=replaceTagsIfNeeded(v);
  if (v instanceof UUID)   v=v.toString();
  boolean changed=((v != value) && (v == null || !v.equals(value)));
  value=v;
  if (changed) {
    jsonValue=null;
  }
  if (fireChangeEvent && changed) {
    changeMonitor.valueChanged();
  }
}