nus-yam/ex-repair huggingface dataset:
Program: 143423
Project: 143423
Buggy source:
public static Object applyUIConverterToObject(Object component,Object value,String dataProviderID,IFoundSetManagerInternal foundsetManager){
  if (component instanceof IScriptableProvider && ((IScriptableProvider)component).getScriptObject() instanceof IFormatScriptComponent) {
    ComponentFormat cf=((IFormatScriptComponent)((IScriptableProvider)component).getScriptObject()).getComponentFormat();
    if (cf != null && cf.parsedFormat.getUIConverterName() != null) {
      IUIConverter conv=foundsetManager.getUIConverterManager().getConverter(cf.parsedFormat.getUIConverterName());
      if (conv == null) {
        throw new IllegalStateException(Messages.getString("String_Node_Str",new Object[]{cf.parsedFormat.getUIConverterName()}));
      }
      try {
        return conv.convertToObject(cf.parsedFormat.getUIConverterProperties(),cf.dpType,value);
      }
 catch (      Exception e) {
        throw new IllegalArgumentException(Messages.getString("String_Node_Str",new Object[]{dataProviderID,Column.getDisplayTypeString(cf.dpType),value}),e);
      }
    }
  }
  return value;
}

Fixed version (ground truth):
/** 
 * @param value
 * @param dataProviderID
 * @param foundsetManager
 * @param cf
 */
public static Object applyUIConverterToObject(Object value,String dataProviderID,IFoundSetManagerInternal foundsetManager,ComponentFormat cf){
  if (cf != null && cf.parsedFormat.getUIConverterName() != null) {
    IUIConverter conv=foundsetManager.getUIConverterManager().getConverter(cf.parsedFormat.getUIConverterName());
    if (conv == null) {
      throw new IllegalStateException(Messages.getString("String_Node_Str",new Object[]{cf.parsedFormat.getUIConverterName()}));
    }
    try {
      return conv.convertToObject(cf.parsedFormat.getUIConverterProperties(),cf.dpType,value);
    }
 catch (    Exception e) {
      throw new IllegalArgumentException(Messages.getString("String_Node_Str",new Object[]{dataProviderID,Column.getDisplayTypeString(cf.dpType),value}),e);
    }
  }
  return value;
}
Program: 143424
Project: 143424
Buggy source:
public static Object applyUIConverterFromObject(Object component,Object obj,String dataProviderID,IFoundSetManagerInternal foundsetManager){
  if (component instanceof IScriptableProvider && ((IScriptableProvider)component).getScriptObject() instanceof IFormatScriptComponent) {
    ComponentFormat cf=((IFormatScriptComponent)((IScriptableProvider)component).getScriptObject()).getComponentFormat();
    if (cf != null && cf.parsedFormat.getUIConverterName() != null) {
      IUIConverter conv=foundsetManager.getUIConverterManager().getConverter(cf.parsedFormat.getUIConverterName());
      if (conv == null) {
        throw new IllegalStateException(Messages.getString("String_Node_Str",new Object[]{cf.parsedFormat.getUIConverterName()}));
      }
      try {
        return conv.convertFromObject(cf.parsedFormat.getUIConverterProperties(),cf.dpType,obj);
      }
 catch (      Exception e) {
        throw new IllegalArgumentException(Messages.getString("String_Node_Str",new Object[]{dataProviderID,Column.getDisplayTypeString(cf.dpType),obj}),e);
      }
    }
  }
  return obj;
}

Fixed version (ground truth):
/** 
 * @param obj
 * @param dataProviderID
 * @param foundsetManager
 * @param cf
 */
public static Object applyUIConverterFromObject(Object obj,String dataProviderID,IFoundSetManagerInternal foundsetManager,ComponentFormat cf){
  if (cf != null && cf.parsedFormat.getUIConverterName() != null) {
    IUIConverter conv=foundsetManager.getUIConverterManager().getConverter(cf.parsedFormat.getUIConverterName());
    if (conv == null) {
      throw new IllegalStateException(Messages.getString("String_Node_Str",new Object[]{cf.parsedFormat.getUIConverterName()}));
    }
    try {
      return conv.convertFromObject(cf.parsedFormat.getUIConverterProperties(),cf.dpType,obj);
    }
 catch (    Exception e) {
      throw new IllegalArgumentException(Messages.getString("String_Node_Str",new Object[]{dataProviderID,Column.getDisplayTypeString(cf.dpType),obj}),e);
    }
  }
  return obj;
}
Program: 143425
Project: 143425
Buggy source:
protected String getMediaUrl(Object value,FlattenedSolution flattenedSolution,INGApplication application){
  String url=null;
  Media media=null;
  if (value instanceof Integer) {
    media=flattenedSolution.getMedia(((Integer)value).intValue());
  }
 else   if (value instanceof String && ((String)value).toLowerCase().startsWith(MediaURLStreamHandler.MEDIA_URL_DEF)) {
    media=flattenedSolution.getMedia(((String)value).substring(MediaURLStreamHandler.MEDIA_URL_DEF.length()));
  }
 else {
    UUID uuid=Utils.getAsUUID(value,false);
    if (uuid != null)     media=(Media)flattenedSolution.searchPersist(uuid);
  }
  if (media != null) {
    url="String_Node_Str" + MediaResourcesServlet.FLATTENED_SOLUTION_ACCESS + "String_Node_Str"+ media.getRootObject().getName()+ "String_Node_Str"+ media.getName();
    Dimension imageSize=ImageLoader.getSize(media.getMediaData());
    boolean paramsAdded=false;
    if (imageSize != null) {
      paramsAdded=true;
      url+="String_Node_Str" + imageSize.width + "String_Node_Str"+ imageSize.height;
    }
    if (application != null) {
      Solution sc=flattenedSolution.getSolutionCopy(false);
      if (sc != null && sc.getMedia(media.getName()) != null) {
        if (paramsAdded)         url+="String_Node_Str";
 else         url+="String_Node_Str";
        url+="String_Node_Str" + application.getWebsocketSession().getUuid() + "String_Node_Str"+ sc.getLastModifiedTime();
      }
    }
  }
  return url;
}

Fixed version (ground truth):
protected String getMediaUrl(Object value,FlattenedSolution flattenedSolution,INGApplication application){
  String url=null;
  Media media=null;
  if (value instanceof CharSequence) {
    value=((CharSequence)value).toString();
  }
  if (value instanceof Integer) {
    media=flattenedSolution.getMedia(((Integer)value).intValue());
  }
 else   if (value instanceof String && ((String)value).toLowerCase().startsWith(MediaURLStreamHandler.MEDIA_URL_DEF)) {
    media=flattenedSolution.getMedia(((String)value).substring(MediaURLStreamHandler.MEDIA_URL_DEF.length()));
  }
 else {
    UUID uuid=Utils.getAsUUID(value,false);
    if (uuid != null)     media=(Media)flattenedSolution.searchPersist(uuid);
  }
  if (media != null) {
    url="String_Node_Str" + MediaResourcesServlet.FLATTENED_SOLUTION_ACCESS + "String_Node_Str"+ media.getRootObject().getName()+ "String_Node_Str"+ media.getName();
    Dimension imageSize=ImageLoader.getSize(media.getMediaData());
    boolean paramsAdded=false;
    if (imageSize != null) {
      paramsAdded=true;
      url+="String_Node_Str" + imageSize.width + "String_Node_Str"+ imageSize.height;
    }
    if (application != null) {
      Solution sc=flattenedSolution.getSolutionCopy(false);
      if (sc != null && sc.getMedia(media.getName()) != null) {
        if (paramsAdded)         url+="String_Node_Str";
 else         url+="String_Node_Str";
        url+="String_Node_Str" + application.getWebsocketSession().getUuid() + "String_Node_Str"+ sc.getLastModifiedTime();
      }
    }
  }
  return url;
}
Program: 143426
Project: 143426
Buggy source:
@Override public JSONWriter toTemplateJSONValue(JSONWriter writer,String key,Object formElementValue,PropertyDescription pd,DataConversion browserConversionMarkers,FlattenedSolution fs,FormElementContext formElementContext) throws JSONException {
  if (fs != null) {
    String url=getMediaUrl(formElementValue,fs,null);
    if (url != null) {
      return toJSON(writer,key,new MediaWrapper(formElementValue,url),browserConversionMarkers,null);
    }
  }
  return writer;
}

Fixed version (ground truth):
@Override public JSONWriter toTemplateJSONValue(JSONWriter writer,String key,Object formElementValue,PropertyDescription pd,DataConversion browserConversionMarkers,FlattenedSolution fs,FormElementContext formElementContext) throws JSONException {
  if (fs != null) {
    String url=getMediaUrl(formElementValue,fs,null);
    if ("String_Node_Str".equals(url)) {
      int a=1 / 2;
    }
    if (url != null) {
      return toJSON(writer,key,new MediaWrapper(formElementValue,url),browserConversionMarkers,null);
    }
  }
  return writer;
}
Program: 143428
Project: 143428
Buggy source:
protected String getMediaUrl(Object value,FlattenedSolution flattenedSolution,INGApplication application){
  String url=null;
  Media media=null;
  if (value instanceof CharSequence) {
    value=((CharSequence)value).toString();
  }
  if (value instanceof Integer) {
    media=flattenedSolution.getMedia(((Integer)value).intValue());
  }
 else   if (value instanceof String && ((String)value).toLowerCase().startsWith(MediaURLStreamHandler.MEDIA_URL_DEF)) {
    media=flattenedSolution.getMedia(((String)value).substring(MediaURLStreamHandler.MEDIA_URL_DEF.length()));
  }
 else {
    UUID uuid=Utils.getAsUUID(value,false);
    if (uuid != null)     media=(Media)flattenedSolution.searchPersist(uuid);
  }
  if (media != null) {
    url="String_Node_Str" + MediaResourcesServlet.FLATTENED_SOLUTION_ACCESS + "String_Node_Str"+ media.getRootObject().getName()+ "String_Node_Str"+ media.getName();
    Dimension imageSize=ImageLoader.getSize(media.getMediaData());
    boolean paramsAdded=false;
    if (imageSize != null) {
      paramsAdded=true;
      url+="String_Node_Str" + imageSize.width + "String_Node_Str"+ imageSize.height;
    }
    if (application != null) {
      Solution sc=flattenedSolution.getSolutionCopy(false);
      if (sc != null && sc.getMedia(media.getName()) != null) {
        if (paramsAdded)         url+="String_Node_Str";
 else         url+="String_Node_Str";
        url+="String_Node_Str" + application.getWebsocketSession().getUuid() + "String_Node_Str"+ sc.getLastModifiedTime();
      }
    }
  }
  return url;
}

Fixed version (ground truth):
public String getMediaUrl(Object value,FlattenedSolution flattenedSolution,INGApplication application){
  String url=null;
  Media media=null;
  if (value instanceof CharSequence) {
    value=((CharSequence)value).toString();
  }
  if (value instanceof Integer) {
    media=flattenedSolution.getMedia(((Integer)value).intValue());
  }
 else   if (value instanceof String && ((String)value).toLowerCase().startsWith(MediaURLStreamHandler.MEDIA_URL_DEF)) {
    media=flattenedSolution.getMedia(((String)value).substring(MediaURLStreamHandler.MEDIA_URL_DEF.length()));
  }
 else {
    UUID uuid=Utils.getAsUUID(value,false);
    if (uuid != null)     media=(Media)flattenedSolution.searchPersist(uuid);
  }
  if (media != null) {
    url="String_Node_Str" + MediaResourcesServlet.FLATTENED_SOLUTION_ACCESS + "String_Node_Str"+ media.getRootObject().getName()+ "String_Node_Str"+ media.getName();
    Dimension imageSize=ImageLoader.getSize(media.getMediaData());
    boolean paramsAdded=false;
    if (imageSize != null) {
      paramsAdded=true;
      url+="String_Node_Str" + imageSize.width + "String_Node_Str"+ imageSize.height;
    }
    if (application != null) {
      Solution sc=flattenedSolution.getSolutionCopy(false);
      if (sc != null && sc.getMedia(media.getName()) != null) {
        if (paramsAdded)         url+="String_Node_Str";
 else         url+="String_Node_Str";
        url+="String_Node_Str" + application.getWebsocketSession().getUuid() + "String_Node_Str"+ sc.getLastModifiedTime();
      }
    }
  }
  return url;
}
Program: 143429
Project: 143429
Buggy source:
@Override public void dataProviderOrRecordChanged(IRecordInternal record,String dataProvider,boolean isFormDP,boolean isGlobalDP,boolean fireChangeEvent){
  if (typeOfDP == null) {
    typeOfDP=NGUtils.getDataProviderPropertyDescription(dataProviderID,servoyDataConverterContext.getApplication().getFlattenedSolution(),servoyDataConverterContext.getForm().getForm(),record.getParentFoundSet().getTable(),getDataProviderConfig().hasParseHtml());
  }
  String dpID=dataProviderID;
  IDataProviderLookup dpLookup=servoyDataConverterContext.getApplication().getFlattenedSolution().getDataproviderLookup(servoyDataConverterContext.getApplication().getFoundSetManager(),servoyDataConverterContext.getForm().getForm());
  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;
  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(IRecordInternal record,String dataProvider,boolean isFormDP,boolean isGlobalDP,boolean fireChangeEvent){
  if (typeOfDP == null) {
    typeOfDP=NGUtils.getDataProviderPropertyDescription(dataProviderID,servoyDataConverterContext.getApplication().getFlattenedSolution(),servoyDataConverterContext.getForm().getForm(),record != null ? record.getParentFoundSet().getTable() : null,getDataProviderConfig().hasParseHtml());
  }
  String dpID=dataProviderID;
  IDataProviderLookup dpLookup=servoyDataConverterContext.getApplication().getFlattenedSolution().getDataproviderLookup(servoyDataConverterContext.getApplication().getFoundSetManager(),servoyDataConverterContext.getForm().getForm());
  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;
  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();
  }
}
Program: 143431
Project: 143431
Buggy source:
@Override protected void doOldShow(String formName,boolean closeAll,boolean legacyV3Behavior){
  IWebFormController controller=getApplication().getFormManager().getForm(formName);
  if (controller != null) {
    getApplication().getFormManager().showFormInContainer(formName,this,getTitle(),true,windowName);
    this.formName=formName;
    controller.getFormUI().setParentWindowName(getName());
    switchForm(controller);
  }
  Form form=getApplication().getFlattenedSolution().getForm(formName);
  String titleArg=getTitle();
  titleArg=titleArg == null ? form.getName() : titleArg;
  getApplication().getWebsocketSession().getClientService(NGRuntimeWindowManager.WINDOW_SERVICE).executeAsyncServiceCall("String_Node_Str",new Object[]{getName(),form.getName(),titleArg});
  if (windowType == JSWindow.MODAL_DIALOG && getApplication().getWebsocketSession().getEventDispatcher() != null) {
    try {
      getApplication().getWebsocketSession().getEventDispatcher().suspend(this,IEventDispatcher.EVENT_LEVEL_DEFAULT,IEventDispatcher.NO_TIMEOUT);
    }
 catch (    CancellationException e) {
      throw e;
    }
catch (    TimeoutException e) {
      Debug.error("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override protected void doOldShow(String formName,boolean closeAll,boolean legacyV3Behavior){
  IWebFormController controller=getApplication().getFormManager().getForm(formName);
  if (controller != null) {
    getApplication().getFormManager().showFormInContainer(formName,this,getTitle(),true,windowName);
    this.formName=formName;
    controller.getFormUI().setParentWindowName(getName());
    switchForm(controller);
  }
  String titleArg=getTitle();
  titleArg=titleArg == null ? formName : titleArg;
  getApplication().getWebsocketSession().getClientService(NGRuntimeWindowManager.WINDOW_SERVICE).executeAsyncServiceCall("String_Node_Str",new Object[]{getName(),formName,titleArg});
  if (windowType == JSWindow.MODAL_DIALOG && getApplication().getWebsocketSession().getEventDispatcher() != null) {
    try {
      getApplication().getWebsocketSession().getEventDispatcher().suspend(this,IEventDispatcher.EVENT_LEVEL_DEFAULT,IEventDispatcher.NO_TIMEOUT);
    }
 catch (    CancellationException e) {
      throw e;
    }
catch (    TimeoutException e) {
      Debug.error("String_Node_Str");
    }
  }
}
Program: 143432
Project: 143432
Buggy source:
public static void generateRecordViewForm(PrintWriter writer,Form form,IServoyDataConverterContext context,boolean responsiveMode,boolean design,boolean highlight){
  generateFormStartTag(writer,form,responsiveMode,design);
  Iterator<Part> it=form.getParts();
  if (design) {
    while (it.hasNext()) {
      Part part=it.next();
      if (!Part.rendersOnlyInPrint(part.getPartType())) {
        writer.print("String_Node_Str");
        writer.print(PartWrapper.getName(part));
        writer.println("String_Node_Str");
        generateEndDiv(writer);
      }
    }
  }
  it=form.getParts();
  while (it.hasNext()) {
    Part part=it.next();
    if (!Part.rendersOnlyInPrint(part.getPartType())) {
      if (!design && !responsiveMode) {
        writer.print("String_Node_Str");
        writer.print(PartWrapper.getName(part));
        writer.println("String_Node_Str");
      }
      for (      BaseComponent bc : PartWrapper.getBaseComponents(part,form,context,design)) {
        FormElement fe=FormElementHelper.INSTANCE.getFormElement(bc,context,null);
        if (!responsiveMode)         generateFormElementWrapper(writer,fe,design,form);
        generateFormElement(writer,fe,false,highlight);
        if (!responsiveMode)         generateEndDiv(writer);
      }
      if (!design && !responsiveMode)       generateEndDiv(writer);
    }
  }
  generateEndDiv(writer);
}

Fixed version (ground truth):
public static void generateRecordViewForm(PrintWriter writer,Form form,String realFormName,IServoyDataConverterContext context,boolean responsiveMode,boolean design,boolean highlight){
  generateFormStartTag(writer,form,realFormName,responsiveMode,design);
  Iterator<Part> it=form.getParts();
  if (design) {
    while (it.hasNext()) {
      Part part=it.next();
      if (!Part.rendersOnlyInPrint(part.getPartType())) {
        writer.print("String_Node_Str");
        writer.print(PartWrapper.getName(part));
        writer.println("String_Node_Str");
        generateEndDiv(writer);
      }
    }
  }
  it=form.getParts();
  while (it.hasNext()) {
    Part part=it.next();
    if (!Part.rendersOnlyInPrint(part.getPartType())) {
      if (!design && !responsiveMode) {
        writer.print("String_Node_Str");
        writer.print(PartWrapper.getName(part));
        writer.println("String_Node_Str");
      }
      for (      BaseComponent bc : PartWrapper.getBaseComponents(part,form,context,design)) {
        FormElement fe=FormElementHelper.INSTANCE.getFormElement(bc,context,null);
        if (!responsiveMode)         generateFormElementWrapper(writer,fe,design,form);
        generateFormElement(writer,fe,false,highlight);
        if (!responsiveMode)         generateEndDiv(writer);
      }
      if (!design && !responsiveMode)       generateEndDiv(writer);
    }
  }
  generateEndDiv(writer);
}
Program: 143433
Project: 143433
Buggy source:
public static void generateFormStartTag(PrintWriter writer,Form form,boolean responsiveMode,boolean design){
  writer.print(String.format("String_Node_Str",form.getName()));
  if (Utils.getAsBoolean(Settings.getInstance().getProperty("String_Node_Str","String_Node_Str"))) {
    writer.print(String.format("String_Node_Str",form.getName()));
  }
  if (!form.isResponsiveLayout() && !responsiveMode) {
    writer.print("String_Node_Str");
  }
 else   if (design) {
    writer.print("String_Node_Str");
  }
  writer.print("String_Node_Str");
  if (!isTableOrListView(form)) {
    writer.print("String_Node_Str");
  }
  if (form.getStyleClass() != null) {
    writer.print("String_Node_Str");
    writer.print(form.getStyleClass());
    writer.print("String_Node_Str");
  }
  writer.println("String_Node_Str");
}

Fixed version (ground truth):
public static void generateFormStartTag(PrintWriter writer,Form form,String realFormName,boolean responsiveMode,boolean design){
  writer.print(String.format("String_Node_Str",realFormName));
  if (Utils.getAsBoolean(Settings.getInstance().getProperty("String_Node_Str","String_Node_Str"))) {
    writer.print(String.format("String_Node_Str",realFormName));
  }
  if (!form.isResponsiveLayout() && !responsiveMode) {
    writer.print("String_Node_Str");
  }
 else   if (design) {
    writer.print("String_Node_Str");
  }
  writer.print("String_Node_Str");
  if (!isTableOrListView(form)) {
    writer.print("String_Node_Str");
  }
  if (form.getStyleClass() != null) {
    writer.print("String_Node_Str");
    writer.print(form.getStyleClass());
    writer.print("String_Node_Str");
  }
  writer.println("String_Node_Str");
}
Program: 143434
Project: 143434
Buggy source:
public static void generateLayout(Form form,ServoyDataConverterContext context,PrintWriter writer,boolean design,boolean highlight){
  try {
    FormLayoutGenerator.generateFormStartTag(writer,form,false,design);
    Iterator<IPersist> components=form.getAllObjects(PositionComparator.XY_PERSIST_COMPARATOR);
    while (components.hasNext()) {
      IPersist component=components.next();
      if (component instanceof LayoutContainer) {
        generateLayoutContainer((LayoutContainer)component,context,writer,design,highlight);
      }
 else       if (component instanceof IFormElement) {
        FormLayoutGenerator.generateFormElement(writer,FormElementHelper.INSTANCE.getFormElement((IFormElement)component,context,null),design,highlight);
      }
    }
    FormLayoutGenerator.generateFormEndTag(writer);
  }
 catch (  Exception e) {
    Debug.error(e);
  }
}

Fixed version (ground truth):
public static void generateLayout(Form form,String realFormName,ServoyDataConverterContext context,PrintWriter writer,boolean design,boolean highlight){
  try {
    FormLayoutGenerator.generateFormStartTag(writer,form,realFormName,false,design);
    Iterator<IPersist> components=form.getAllObjects(PositionComparator.XY_PERSIST_COMPARATOR);
    while (components.hasNext()) {
      IPersist component=components.next();
      if (component instanceof LayoutContainer) {
        generateLayoutContainer((LayoutContainer)component,context,writer,design,highlight);
      }
 else       if (component instanceof IFormElement) {
        FormLayoutGenerator.generateFormElement(writer,FormElementHelper.INSTANCE.getFormElement((IFormElement)component,context,null),design,highlight);
      }
    }
    FormLayoutGenerator.generateFormEndTag(writer);
  }
 catch (  Exception e) {
    Debug.error(e);
  }
}
Program: 143436
Project: 143436
Buggy source:
@Override public void dataProviderOrRecordChanged(IRecordInternal record,String dataProvider,boolean isFormDP,boolean isGlobalDP,boolean fireChangeEvent){
  if (typeOfDP == null) {
    typeOfDP=NGUtils.getDataProviderPropertyDescription(dataProviderID,servoyDataConverterContext.getApplication().getFlattenedSolution(),servoyDataConverterContext.getForm().getForm(),record.getParentFoundSet().getTable(),getDataProviderConfig().hasParseHtml());
  }
  Object v=com.servoy.j2db.dataprocessing.DataAdapterList.getValueObject(record,servoyDataConverterContext.getForm().getFormScope(),dataProviderID);
  if (v == Scriptable.NOT_FOUND)   v=null;
  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(IRecordInternal record,String dataProvider,boolean isFormDP,boolean isGlobalDP,boolean fireChangeEvent){
  if (typeOfDP == null) {
    typeOfDP=NGUtils.getDataProviderPropertyDescription(dataProviderID,servoyDataConverterContext.getApplication().getFlattenedSolution(),servoyDataConverterContext.getForm().getForm(),record.getParentFoundSet().getTable(),getDataProviderConfig().hasParseHtml());
  }
  Object v=com.servoy.j2db.dataprocessing.DataAdapterList.getValueObject(record,servoyDataConverterContext.getForm().getFormScope(),dataProviderID != null ? dataProviderID.toLowerCase() : null);
  if (v == Scriptable.NOT_FOUND)   v=null;
  boolean changed=((v != value) && (v == null || !v.equals(value)));
  value=v;
  if (changed) {
    jsonValue=null;
  }
  if (fireChangeEvent && changed) {
    changeMonitor.valueChanged();
  }
}
Program: 143437
Project: 143437
Buggy source:
@Override public JSONWriter toTemplateJSONValue(JSONWriter writer,String key,String formElementValue,PropertyDescription pd,DataConversion browserConversionMarkers,FlattenedSolution fs,FormElementContext formElementContext) throws JSONException {
  if (formElementValue != null && valueInTemplate(formElementValue,pd,formElementContext)) {
    JSONUtils.addKeyIfPresent(writer,key);
    writer.value(formElementValue);
  }
  return writer;
}

Fixed version (ground truth):
@Override public JSONWriter toTemplateJSONValue(JSONWriter writer,String key,String formElementValue,PropertyDescription pd,DataConversion browserConversionMarkers,FlattenedSolution fs,FormElementContext formElementContext) throws JSONException {
  JSONUtils.addKeyIfPresent(writer,key);
  if (formElementValue != null && valueInTemplate(formElementValue,pd,formElementContext)) {
    writer.value(formElementValue);
  }
 else {
    writer.value("String_Node_Str");
  }
  return writer;
}
Program: 143438
Project: 143438
Buggy source:
@Override public JSONWriter toTemplateJSONValue(JSONWriter writer,String key,String formElementValue,PropertyDescription pd,DataConversion browserConversionMarkers,FlattenedSolution fs,FormElementContext formElementContext) throws JSONException {
  TagStringConfig config=getConfig(pd);
  if (formElementValue != null && valueInTemplate(formElementValue,pd,formElementContext)) {
    JSONUtils.addKeyIfPresent(writer,key);
    if (HtmlUtils.startsWithHtml(formElementValue)) {
      writer.value("String_Node_Str");
    }
 else     writer.value(formElementValue);
  }
  return writer;
}

Fixed version (ground truth):
@Override public JSONWriter toTemplateJSONValue(JSONWriter writer,String key,String formElementValue,PropertyDescription pd,DataConversion browserConversionMarkers,FlattenedSolution fs,FormElementContext formElementContext) throws JSONException {
  if (formElementValue != null && valueInTemplate(formElementValue,pd,formElementContext)) {
    JSONUtils.addKeyIfPresent(writer,key);
    writer.value(formElementValue);
  }
  return writer;
}
Program: 143439
Project: 143439
Buggy source:
@Override public boolean valueInTemplate(String formElementVal,PropertyDescription pd,FormElementContext formElementContext){
  if (formElementVal == null)   return true;
  TagStringConfig config=((TagStringConfig)pd.getConfig());
  return !((wouldLikeToParseTags(config,formElementContext.getFormElement()) && formElementVal.contains("String_Node_Str")) || formElementVal.startsWith("String_Node_Str"));
}

Fixed version (ground truth):
@Override public boolean valueInTemplate(String formElementVal,PropertyDescription pd,FormElementContext formElementContext){
  if (formElementVal == null)   return true;
  TagStringConfig config=((TagStringConfig)pd.getConfig());
  return !((wouldLikeToParseTags(config,formElementContext.getFormElement()) && formElementVal.contains("String_Node_Str")) || formElementVal.startsWith("String_Node_Str") || HtmlUtils.startsWithHtml(formElementVal));
}
Program: 143440
Project: 143440
Buggy source:
protected static void fillProperty(Object propertyValue,Object formElementValue,PropertyDescription propertySpec,WebFormComponent component){
  String propName=propertySpec.getName();
  if (propertyValue != null) {
    boolean templatevalue=true;
    if (propertySpec.getType() instanceof ISupportTemplateValue) {
      templatevalue=((ISupportTemplateValue)propertySpec.getType()).valueInTemplate(formElementValue,propertySpec,component.getFormElement());
    }
    if (templatevalue) {
      component.setDefaultProperty(propName,propertyValue);
    }
 else {
      component.setProperty(propName,propertyValue);
    }
  }
}

Fixed version (ground truth):
protected static void fillProperty(Object propertyValue,Object formElementValue,PropertyDescription propertySpec,WebFormComponent component){
  String propName=propertySpec.getName();
  if (propertyValue != null) {
    boolean templatevalue=true;
    if (propertySpec.getType() instanceof ISupportTemplateValue) {
      templatevalue=((ISupportTemplateValue)propertySpec.getType()).valueInTemplate(formElementValue,propertySpec,new FormElementContext(component.getFormElement(),null));
    }
    if (templatevalue) {
      component.setDefaultProperty(propName,propertyValue);
    }
 else {
      component.setProperty(propName,propertyValue);
    }
  }
}
Program: 143442
Project: 143442
Buggy source:
public JSONWriter propertiesAsTemplateJSON(JSONWriter writer) throws JSONException {
  TypedData<Map<String,Object>> propertiesTypedData=propertiesForTemplateJSON();
  JSONWriter propertyWriter=(writer != null ? writer : new JSONStringer());
  try {
    propertyWriter.object();
    JSONUtils.writeDataWithConversions(new FormElementToJSON(fs),propertyWriter,propertiesTypedData.content,propertiesTypedData.contentType,this);
    return propertyWriter.endObject();
  }
 catch (  JSONException|IllegalArgumentException e) {
    Debug.error("String_Node_Str" + getTagname() + "String_Node_Str",e);
    throw e;
  }
}

Fixed version (ground truth):
public JSONWriter propertiesAsTemplateJSON(JSONWriter writer,FormElementContext context) throws JSONException {
  TypedData<Map<String,Object>> propertiesTypedData=propertiesForTemplateJSON();
  JSONWriter propertyWriter=(writer != null ? writer : new JSONStringer());
  try {
    propertyWriter.object();
    JSONUtils.writeDataWithConversions(new FormElementToJSON(fs),propertyWriter,propertiesTypedData.content,propertiesTypedData.contentType,context);
    return propertyWriter.endObject();
  }
 catch (  JSONException|IllegalArgumentException e) {
    Debug.error("String_Node_Str" + getTagname() + "String_Node_Str",e);
    throw e;
  }
}
Program: 143443
Project: 143443
Buggy source:
public String getPropertiesString() throws JSONException {
  return propertiesAsTemplateJSON(null).toString();
}

Fixed version (ground truth):
public String getPropertiesString() throws JSONException {
  return propertiesAsTemplateJSON(null,new FormElementContext(this,null)).toString();
}
Program: 143444
Project: 143444
Buggy source:
public FormElement getFormElement(IFormElement formElement,FlattenedSolution fs,PropertyPath propertyPath,final boolean designer){
  if (designer || (fs.getSolutionCopy(false) != null)) {
    if (propertyPath == null) {
      propertyPath=new PropertyPath();
      propertyPath.setShouldAddElementName();
    }
    if (formElement instanceof BodyPortal)     return createBodyPortalFormElement((BodyPortal)formElement,fs,designer);
 else     return new FormElement(formElement,fs,propertyPath,designer);
  }
  FormElement persistWrapper=persistWrappers.get(formElement);
  if (persistWrapper == null) {
    if (propertyPath == null) {
      propertyPath=new PropertyPath();
      propertyPath.setShouldAddElementName();
    }
    if (formElement instanceof BodyPortal)     persistWrapper=createBodyPortalFormElement((BodyPortal)formElement,getSharedFlattenedSolution(fs),designer);
 else     persistWrapper=new FormElement(formElement,getSharedFlattenedSolution(fs),propertyPath,false);
    FormElement existing=persistWrappers.putIfAbsent(formElement,persistWrapper);
    if (existing != null) {
      persistWrapper=existing;
    }
  }
  return persistWrapper;
}

Fixed version (ground truth):
public FormElement getFormElement(IFormElement formElement,FlattenedSolution fs,PropertyPath propertyPath,final boolean designer){
  if (designer || (fs.getSolutionCopy(false) != null)) {
    if (propertyPath == null) {
      propertyPath=new PropertyPath();
      propertyPath.setShouldAddElementName();
    }
    if (formElement instanceof BodyPortal)     return createBodyPortalFormElement((BodyPortal)formElement,fs,designer,fs);
 else     return new FormElement(formElement,fs,propertyPath,designer);
  }
  FormElement persistWrapper=persistWrappers.get(formElement);
  if (persistWrapper == null) {
    if (propertyPath == null) {
      propertyPath=new PropertyPath();
      propertyPath.setShouldAddElementName();
    }
    if (formElement instanceof BodyPortal)     persistWrapper=createBodyPortalFormElement((BodyPortal)formElement,getSharedFlattenedSolution(fs),designer,fs);
 else     persistWrapper=new FormElement(formElement,getSharedFlattenedSolution(fs),propertyPath,false);
    FormElement existing=persistWrappers.putIfAbsent(formElement,persistWrapper);
    if (existing != null) {
      persistWrapper=existing;
    }
  }
  return persistWrapper;
}
Program: 143446
Project: 143446
Buggy source:
@Override public JSONWriter toTemplateJSONValue(final JSONWriter writer,String key,ComponentTypeFormElementValue formElementValue,PropertyDescription pd,DataConversion conversionMarkers,FlattenedSolution fs,FormElement formElement) throws JSONException {
  if (conversionMarkers != null)   conversionMarkers.convert(ComponentPropertyType.TYPE_NAME);
  final FormElement fe=formElementValue.element;
  JSONUtils.addKeyIfPresent(writer,key);
  writer.object();
  writeTemplateJSONContent(writer,formElementValue,forFoundsetTypedPropertyName(pd),fe,new IModelWriter(){
    @Override public void writeComponentModel() throws JSONException {
      TypedData<Map<String,Object>> modelProperties=fe.propertiesForTemplateJSON();
      writer.object();
      JSONUtils.writeDataWithConversions(new FormElementToJSON(fe.getFlattendSolution()),writer,modelProperties.content,modelProperties.contentType,fe);
      writer.endObject();
    }
  }
,formElementValue.recordBasedProperties);
  writer.endObject();
  return writer;
}

Fixed version (ground truth):
@Override public JSONWriter toTemplateJSONValue(final JSONWriter writer,String key,ComponentTypeFormElementValue formElementValue,PropertyDescription pd,DataConversion conversionMarkers,FlattenedSolution fs,final FormElementContext formElementContext) throws JSONException {
  FlattenedSolution clientFlattenedSolution=(formElementContext != null && formElementContext.getContext() != null) ? formElementContext.getContext().getSolution() : null;
  if (!formElementValue.isSecurityViewable(clientFlattenedSolution)) {
    return writer;
  }
  if (conversionMarkers != null)   conversionMarkers.convert(ComponentPropertyType.TYPE_NAME);
  final FormElementContext feContext=new FormElementContext(formElementValue.element,formElementContext.getContext());
  JSONUtils.addKeyIfPresent(writer,key);
  writer.object();
  writeTemplateJSONContent(writer,formElementValue,forFoundsetTypedPropertyName(pd),feContext,new IModelWriter(){
    @Override public void writeComponentModel() throws JSONException {
      TypedData<Map<String,Object>> modelProperties=feContext.getFormElement().propertiesForTemplateJSON();
      writer.object();
      JSONUtils.writeDataWithConversions(new FormElementToJSON(feContext.getFormElement().getFlattendSolution()),writer,modelProperties.content,modelProperties.contentType,feContext);
      writer.endObject();
    }
  }
,formElementValue.recordBasedProperties);
  writer.endObject();
  return writer;
}
Program: 143448
Project: 143448
Buggy source:
@Override public ComponentTypeSabloValue toSabloComponentValue(ComponentTypeFormElementValue formElementValue,PropertyDescription pd,FormElement formElement,WebFormComponent component,DataAdapterList dal){
  return new ComponentTypeSabloValue(formElementValue,pd,forFoundsetTypedPropertyName(pd));
}

Fixed version (ground truth):
@Override public ComponentTypeSabloValue toSabloComponentValue(ComponentTypeFormElementValue formElementValue,PropertyDescription pd,FormElement formElement,WebFormComponent component,DataAdapterList dal){
  if (!formElementValue.isSecurityViewable(dal.getApplication().getFlattenedSolution())) {
    return null;
  }
  return new ComponentTypeSabloValue(formElementValue,pd,forFoundsetTypedPropertyName(pd));
}
Program: 143450
Project: 143450
Buggy source:
@Override public void writeComponentModel() throws JSONException {
  writer.object();
  DataConversion dataConversion=new DataConversion();
  JSONUtils.writeData(new FormElementToJSON(fe.getFlattendSolution()),writer,formElementProperties.content,formElementProperties.contentType,dataConversion,fe);
  JSONUtils.writeData(JSONUtils.FullValueToJSONConverter.INSTANCE,writer,runtimeProperties.content,runtimeProperties.contentType,dataConversion,childComponent);
  JSONUtils.writeClientConversions(writer,dataConversion);
  writer.endObject();
}

Fixed version (ground truth):
@Override public void writeComponentModel() throws JSONException {
  writer.object();
  DataConversion dataConversion=new DataConversion();
  JSONUtils.writeData(new FormElementToJSON(fe.getFlattendSolution()),writer,formElementProperties.content,formElementProperties.contentType,dataConversion,formElementContext);
  JSONUtils.writeData(JSONUtils.FullValueToJSONConverter.INSTANCE,writer,runtimeProperties.content,runtimeProperties.contentType,dataConversion,childComponent);
  JSONUtils.writeClientConversions(writer,dataConversion);
  writer.endObject();
}
Program: 143451
Project: 143451
Buggy source:
public boolean isReadOnly(){
  return !isEnabled();
}

Fixed version (ground truth):
public boolean isReadOnly(){
  return !isEditable();
}
Program: 143452
Project: 143452
Buggy source:
protected IDataLinkedPropertyRegistrationListener getDataLinkedPropertyRegistrationListener(){
  return dataLinkedPropertyRegistrationListener=new IDataLinkedPropertyRegistrationListener(){
    @Override public void dataLinkedPropertyRegistered(    WebFormComponent component,    String propertyName,    TargetDataLinks targetDataLinks){
      if (component == childComponent) {
        if (targetDataLinks.recordLinked && !recordBasedProperties.contains(propertyName)) {
          recordBasedProperties.add(propertyName);
          recordBasedPropertiesChanged=true;
          recordBasedPropertiesChangedFromTemplate=true;
          monitor.valueChanged();
        }
      }
    }
    @Override public void dataLinkedPropertyUnregistered(    WebFormComponent component,    String propertyName){
      if (component == childComponent) {
        if (recordBasedProperties.remove(propertyName)) {
          recordBasedPropertiesChanged=true;
          recordBasedPropertiesChangedFromTemplate=true;
          monitor.valueChanged();
        }
      }
    }
  }
;
}

Fixed version (ground truth):
protected IDataLinkedPropertyRegistrationListener getDataLinkedPropertyRegistrationListener(){
  return dataLinkedPropertyRegistrationListener=new IDataLinkedPropertyRegistrationListener(){
    @Override public void dataLinkedPropertyRegistered(    WebFormComponent component,    String propertyName,    TargetDataLinks targetDataLinks){
      if (component == childComponent && targetDataLinks != TargetDataLinks.NOT_LINKED_TO_DATA) {
        if (targetDataLinks.recordLinked && !recordBasedProperties.contains(propertyName)) {
          recordBasedProperties.add(propertyName);
          recordBasedPropertiesChanged=true;
          recordBasedPropertiesChangedFromTemplate=true;
          monitor.valueChanged();
        }
      }
    }
    @Override public void dataLinkedPropertyUnregistered(    WebFormComponent component,    String propertyName){
      if (component == childComponent) {
        if (recordBasedProperties.remove(propertyName)) {
          recordBasedPropertiesChanged=true;
          recordBasedPropertiesChangedFromTemplate=true;
          monitor.valueChanged();
        }
      }
    }
  }
;
}
Program: 143453
Project: 143453
Buggy source:
@Override public void dataLinkedPropertyRegistered(WebFormComponent component,String propertyName,TargetDataLinks targetDataLinks){
  if (component == childComponent) {
    if (targetDataLinks.recordLinked && !recordBasedProperties.contains(propertyName)) {
      recordBasedProperties.add(propertyName);
      recordBasedPropertiesChanged=true;
      recordBasedPropertiesChangedFromTemplate=true;
      monitor.valueChanged();
    }
  }
}

Fixed version (ground truth):
@Override public void dataLinkedPropertyRegistered(WebFormComponent component,String propertyName,TargetDataLinks targetDataLinks){
  if (component == childComponent && targetDataLinks != TargetDataLinks.NOT_LINKED_TO_DATA) {
    if (targetDataLinks.recordLinked && !recordBasedProperties.contains(propertyName)) {
      recordBasedProperties.add(propertyName);
      recordBasedPropertiesChanged=true;
      recordBasedPropertiesChangedFromTemplate=true;
      monitor.valueChanged();
    }
  }
}
Program: 143454
Project: 143454
Buggy source:
/** 
 * Resumes listening normally to row updates.
 */
protected void resumeRowUpdateListener(){
  this.ignoreUpdateOnPkHash=null;
}

Fixed version (ground truth):
/** 
 * Resumes listening normally to row updates.
 * @deprecated disabled for now. Should we really do this? when an update comes from client who's to say a data change handler or something won't\change other properties of the componen/values of the record that should get sent to client?
 */
@Deprecated protected void resumeRowUpdateListener(){
}
Program: 143456
Project: 143456
Buggy source:
/** 
 * Ignores update record events for the record with given pkHash.
 */
protected void pauseRowUpdateListener(String pkHash){
  this.ignoreUpdateOnPkHash=pkHash;
}

Fixed version (ground truth):
/** 
 * Ignores update record events for the record with given pkHash.
 * @deprecated disabled for now. Should we really do this? when an update comes from client who's to say a data change handler or something won't\change other properties of the componen/values of the record that should get sent to client?
 */
@Deprecated protected void pauseRowUpdateListener(String pkHash){
}
Program: 143457
Project: 143457
Buggy source:
public void toJSON(JSONWriter writer,String key,DataConversion clientConversion,IDataConverterContext dataConverterContext) throws JSONException {
  if (value instanceof UUID || value instanceof UUID) {
    value=value.toString();
  }
  JSONUtils.addKeyIfPresent(writer,key);
  if (jsonValue == null) {
    if (findMode) {
      jsonValue=value instanceof String ? value : (value != null ? String.valueOf(value) : "String_Node_Str");
    }
 else     if (typeOfDP != null) {
      EmbeddableJSONWriter ejw=new EmbeddableJSONWriter(true);
      DataConversion jsonDataConversion=new DataConversion();
      FullValueToJSONConverter.INSTANCE.toJSONValue(ejw,null,value,typeOfDP,jsonDataConversion,dataConverterContext.getWebObject());
      if (jsonDataConversion.getConversions().size() == 0)       jsonDataConversion=null;
      String str=ejw.toJSONString();
      if (str == null || "String_Node_Str".equals(str)) {
        System.err.println(str);
      }
      jsonValue=new JSONStringWithConversions(ejw.toJSONString(),jsonDataConversion);
    }
 else {
      jsonValue=value;
    }
  }
  writer.value(jsonValue);
  if (jsonValue instanceof IJSONStringWithConversions)   clientConversion.convert(((IJSONStringWithConversions)jsonValue).getDataConversions());
}

Fixed version (ground truth):
public void toJSON(JSONWriter writer,String key,DataConversion clientConversion,IDataConverterContext dataConverterContext) throws JSONException {
  if (value instanceof UUID || value instanceof UUID) {
    value=value.toString();
  }
  JSONUtils.addKeyIfPresent(writer,key);
  if (jsonValue == null) {
    if (findMode) {
      jsonValue=value instanceof String ? value : (value != null ? String.valueOf(value) : "String_Node_Str");
    }
 else     if (typeOfDP != null) {
      EmbeddableJSONWriter ejw=new EmbeddableJSONWriter(true);
      DataConversion jsonDataConversion=new DataConversion();
      FullValueToJSONConverter.INSTANCE.toJSONValue(ejw,null,value,typeOfDP,jsonDataConversion,dataConverterContext.getWebObject());
      if (jsonDataConversion.getConversions().size() == 0)       jsonDataConversion=null;
      String str=ejw.toJSONString();
      if (str == null || str.trim().length() == 0) {
        Debug.error("String_Node_Str" + typeOfDP + "String_Node_Str"+ value+ "String_Node_Str");
        str="String_Node_Str";
      }
      jsonValue=new JSONStringWithConversions(str,jsonDataConversion);
    }
 else {
      jsonValue=value;
    }
  }
  writer.value(jsonValue);
  if (jsonValue instanceof IJSONStringWithConversions)   clientConversion.convert(((IJSONStringWithConversions)jsonValue).getDataConversions());
}
Program: 143459
Project: 143459
Buggy source:
protected IDataLinkedPropertyRegistrationListener getDataLinkedPropertyRegistrationListener(){
  return dataLinkedPropertyRegistrationListener=new IDataLinkedPropertyRegistrationListener(){
    @Override public void dataLinkedPropertyRegistered(    WebFormComponent component,    String propertyName,    TargetDataLinks targetDataLinks){
      if (component == childComponent) {
        if (targetDataLinks.recordLinked && !recordBasedProperties.contains(propertyName)) {
          recordBasedProperties.add(propertyName);
          recordBasedPropertiesChanged=true;
          recordBasedPropertiesChangedFromTemplate=true;
          monitor.valueChanged();
        }
      }
    }
    @Override public void dataLinkedPropertyUnregistered(    WebFormComponent component,    String propertyName){
      if (component == childComponent) {
        if (recordBasedProperties.remove(propertyName)) {
          recordBasedPropertiesChanged=true;
          recordBasedPropertiesChangedFromTemplate=true;
          monitor.valueChanged();
        }
      }
    }
  }
;
}

Fixed version (ground truth):
protected IDataLinkedPropertyRegistrationListener getDataLinkedPropertyRegistrationListener(){
  return dataLinkedPropertyRegistrationListener=new IDataLinkedPropertyRegistrationListener(){
    @Override public void dataLinkedPropertyRegistered(    WebFormComponent component,    String propertyName,    TargetDataLinks targetDataLinks){
      if (component == childComponent && targetDataLinks != TargetDataLinks.NOT_LINKED_TO_DATA) {
        if (targetDataLinks.recordLinked && !recordBasedProperties.contains(propertyName)) {
          recordBasedProperties.add(propertyName);
          recordBasedPropertiesChanged=true;
          recordBasedPropertiesChangedFromTemplate=true;
          monitor.valueChanged();
        }
      }
    }
    @Override public void dataLinkedPropertyUnregistered(    WebFormComponent component,    String propertyName){
      if (component == childComponent) {
        if (recordBasedProperties.remove(propertyName)) {
          recordBasedPropertiesChanged=true;
          recordBasedPropertiesChangedFromTemplate=true;
          monitor.valueChanged();
        }
      }
    }
  }
;
}
Program: 143460
Project: 143460
Buggy source:
@Override public void dataLinkedPropertyRegistered(WebFormComponent component,String propertyName,TargetDataLinks targetDataLinks){
  if (component == childComponent) {
    if (targetDataLinks.recordLinked && !recordBasedProperties.contains(propertyName)) {
      recordBasedProperties.add(propertyName);
      recordBasedPropertiesChanged=true;
      recordBasedPropertiesChangedFromTemplate=true;
      monitor.valueChanged();
    }
  }
}

Fixed version (ground truth):
@Override public void dataLinkedPropertyRegistered(WebFormComponent component,String propertyName,TargetDataLinks targetDataLinks){
  if (component == childComponent && targetDataLinks != TargetDataLinks.NOT_LINKED_TO_DATA) {
    if (targetDataLinks.recordLinked && !recordBasedProperties.contains(propertyName)) {
      recordBasedProperties.add(propertyName);
      recordBasedPropertiesChanged=true;
      recordBasedPropertiesChangedFromTemplate=true;
      monitor.valueChanged();
    }
  }
}