Program: 118598
Project: 118598
Buggy source:
@Override public void refresh(IElementParameter param,boolean check){
  GenericElementParameter gParam=(GenericElementParameter)param;
  ComponentReferenceProperties props=(ComponentReferenceProperties)gParam.getWidget().getContent();
  String paramName=param.getName();
  CCombo combo=(CCombo)hashCurControls.get(paramName);
  if (combo == null || combo.isDisposed()) {
    return;
  }
  INode currentNode=(INode)elem;
  List<INode> refNodes=getRefNodes(param,props);
  List<String> itemsLabel=new ArrayList<>();
  List<String> itemsValue=new ArrayList<>();
  itemsLabel.add("String_Node_Str");
  itemsValue.add(currentNode.getUniqueName());
  String selectedValue;
  Object referenceType=props.referenceType.getValue();
  if (referenceType != null && referenceType.equals(ComponentReferenceProperties.ReferenceType.COMPONENT_INSTANCE)) {
    selectedValue=currentNode.getUniqueName();
  }
 else {
    selectedValue=TalendTextUtils.removeQuotes(props.componentInstanceId.getStringValue());
  }
  for (  INode node : refNodes) {
    final String uniqueName=node.getUniqueName();
    if (uniqueName.equals(currentNode.getUniqueName())) {
      continue;
    }
    String displayName=(String)node.getElementParameter(EParameterName.LABEL.getName()).getValue();
    if (displayName == null) {
      displayName=uniqueName + "String_Node_Str" + displayName;
    }
    if (displayName.indexOf("String_Node_Str") != -1) {
      displayName=displayName.replaceAll("String_Node_Str",uniqueName);
    }
 else {
      displayName=uniqueName + "String_Node_Str" + displayName;
    }
    itemsLabel.add(displayName);
    itemsValue.add(uniqueName);
  }
  param.setListItemsDisplayName(itemsLabel.toArray(new String[0]));
  param.setListItemsDisplayCodeName(itemsLabel.toArray(new String[0]));
  param.setListItemsValue(itemsValue.toArray(new String[0]));
  combo.setItems(itemsLabel.toArray(new String[0]));
  String iLabel=null;
  int selection=0;
  for (int i=0; i < itemsValue.size(); i++) {
    String iValue=itemsValue.get(i);
    if ((selectedValue == null && iValue == null) || (selectedValue != null && selectedValue.equals(iValue))) {
      iLabel=itemsLabel.get(i);
      break;
    }
    selection++;
  }
  if (StringUtils.isNotEmpty(iLabel)) {
    combo.setText(iLabel);
    combo.select(selection);
  }
}

Fixed version (ground truth):
@Override public void refresh(IElementParameter param,boolean check){
  GenericElementParameter gParam=(GenericElementParameter)param;
  ComponentReferenceProperties props=(ComponentReferenceProperties)gParam.getWidget().getContent();
  String paramName=param.getName();
  CCombo combo=(CCombo)hashCurControls.get(paramName);
  if (combo == null || combo.isDisposed()) {
    return;
  }
  INode currentNode=(INode)elem;
  List<INode> refNodes=getRefNodes(param,props);
  List<String> itemsLabel=new ArrayList<>();
  List<String> itemsValue=new ArrayList<>();
  itemsLabel.add("String_Node_Str");
  itemsValue.add(currentNode.getUniqueName());
  String selectedValue;
  Object referenceType=props.referenceType.getValue();
  if (referenceType != null && referenceType.equals(ComponentReferenceProperties.ReferenceType.COMPONENT_INSTANCE)) {
    selectedValue=TalendTextUtils.removeQuotes(props.componentInstanceId.getStringValue());
  }
 else {
    selectedValue=currentNode.getUniqueName();
  }
  for (  INode node : refNodes) {
    final String uniqueName=node.getUniqueName();
    if (uniqueName.equals(currentNode.getUniqueName())) {
      continue;
    }
    String displayName=(String)node.getElementParameter(EParameterName.LABEL.getName()).getValue();
    if (displayName == null) {
      displayName=uniqueName + "String_Node_Str" + displayName;
    }
    if (displayName.indexOf("String_Node_Str") != -1) {
      displayName=displayName.replaceAll("String_Node_Str",uniqueName);
    }
 else {
      displayName=uniqueName + "String_Node_Str" + displayName;
    }
    itemsLabel.add(displayName);
    itemsValue.add(uniqueName);
    labelToValueMap.put(displayName,uniqueName);
  }
  param.setListItemsDisplayName(itemsLabel.toArray(new String[0]));
  param.setListItemsDisplayCodeName(itemsLabel.toArray(new String[0]));
  param.setListItemsValue(itemsValue.toArray(new String[0]));
  combo.setItems(itemsLabel.toArray(new String[0]));
  String iLabel=null;
  int selection=0;
  for (int i=0; i < itemsValue.size(); i++) {
    String iValue=itemsValue.get(i);
    if ((selectedValue == null && (((INode)elem).getUniqueName()).equals(iValue)) || (selectedValue != null && selectedValue.equals(iValue))) {
      iLabel=itemsLabel.get(i);
      break;
    }
    selection++;
  }
  if (StringUtils.isNotEmpty(iLabel)) {
    combo.setText(iLabel);
    combo.select(selection);
  }
}