Program: 143741
Project: 143741
Buggy source:
/** 
 * @param firstTime
 * @param lookup
 * @throws RepositoryException
 * @throws RemoteException
 */
public void fill(IRecordInternal parentState,String dataProviderID,String filter,boolean firstTime) throws ServoyException {
  int prevSize=alReal.size();
  IRecordInternal realState=parentState;
  alReal.clear();
  alDisplay.clear();
  String txt=(filter == null || firstTime) ? "String_Node_Str" : filter.toLowerCase();
  int index=dataProviderID.lastIndexOf('.');
  if (index != -1 && realState != null) {
    IFoundSetInternal relatedFoundSet=realState.getRelatedFoundSet(dataProviderID.substring(0,index));
    if (relatedFoundSet != null && relatedFoundSet.getSize() != 0) {
      realState=relatedFoundSet.getRecord(relatedFoundSet.getSelectedIndex());
    }
  }
  if (lookup instanceof GlobalMethodValueList) {
    GlobalMethodValueList clist=(GlobalMethodValueList)lookup;
    clist.fill(realState,txt,null);
    for (int i=0; i < clist.getSize(); i++) {
      Object display=clist.getElementAt(i);
      if (display == null)       continue;
      alDisplay.add(display);
      alReal.add(clist.getRealElementAt(i));
    }
    hadMoreRows=true;
  }
 else   if (lookup instanceof CustomValueList) {
    CustomValueList clist=(CustomValueList)lookup;
    for (int i=0; i < clist.getSize(); i++) {
      Object display=clist.getElementAt(i);
      if (display == null)       continue;
      if (txt == "String_Node_Str" || display.toString().toLowerCase().startsWith(txt)) {
        alDisplay.add(display);
        alReal.add(clist.getRealElementAt(i));
      }
    }
  }
 else   if (lookup instanceof LookupValueList) {
    if ("String_Node_Str".equals(txt) && lookup.getAllowEmptySelection()) {
      alReal.add(null);
      alDisplay.add("String_Node_Str");
    }
    if (((LookupValueList)lookup).getValueList().getDatabaseValuesType() == ValueList.TABLE_VALUES) {
      fillDBValueListValues(txt);
    }
 else {
      fillRelatedValueListValues(realState,txt);
    }
  }
 else {
    fillDBColumnValues(dataProviderID,txt);
  }
  fireChanges(prevSize);
}

Fixed version (ground truth):
/** 
 * @param firstTime
 * @param lookup
 * @throws RepositoryException
 * @throws RemoteException
 */
public void fill(IRecordInternal parentState,String dataProviderID,String filter,boolean firstTime) throws ServoyException {
  int prevSize=alReal.size();
  IRecordInternal realState=parentState;
  alReal.clear();
  alDisplay.clear();
  String txt=(filter == null || firstTime) ? "String_Node_Str" : filter.toLowerCase();
  if (dataProviderID != null && !dataProviderID.startsWith(ScriptVariable.GLOBAL_DOT_PREFIX)) {
    int index=dataProviderID.lastIndexOf('.');
    if (index != -1 && realState != null) {
      IFoundSetInternal relatedFoundSet=realState.getRelatedFoundSet(dataProviderID.substring(0,index));
      if (relatedFoundSet != null && relatedFoundSet.getSize() != 0) {
        realState=relatedFoundSet.getRecord(relatedFoundSet.getSelectedIndex());
      }
    }
  }
  if (lookup instanceof GlobalMethodValueList) {
    GlobalMethodValueList clist=(GlobalMethodValueList)lookup;
    clist.fill(realState,txt,null);
    for (int i=0; i < clist.getSize(); i++) {
      Object display=clist.getElementAt(i);
      if (display == null)       continue;
      alDisplay.add(display);
      alReal.add(clist.getRealElementAt(i));
    }
    hadMoreRows=true;
  }
 else   if (lookup instanceof CustomValueList) {
    CustomValueList clist=(CustomValueList)lookup;
    for (int i=0; i < clist.getSize(); i++) {
      Object display=clist.getElementAt(i);
      if (display == null)       continue;
      if (txt == "String_Node_Str" || display.toString().toLowerCase().startsWith(txt)) {
        alDisplay.add(display);
        alReal.add(clist.getRealElementAt(i));
      }
    }
  }
 else   if (lookup instanceof LookupValueList) {
    if ("String_Node_Str".equals(txt) && lookup.getAllowEmptySelection()) {
      alReal.add(null);
      alDisplay.add("String_Node_Str");
    }
    if (((LookupValueList)lookup).getValueList().getDatabaseValuesType() == ValueList.TABLE_VALUES) {
      fillDBValueListValues(txt);
    }
 else {
      fillRelatedValueListValues(realState,txt);
    }
  }
 else {
    fillDBColumnValues(dataProviderID,txt);
  }
  fireChanges(prevSize);
}