Program: 117817
Project: 117817
Buggy source:
@Override public void reloadComponent(IComponent component,Map<String,Object> parameters,boolean isUpdate){
  this.isUpdate=isUpdate;
  reloadingComponent=true;
  currentStatus=0;
  oldStatus=0;
  Object obj=parameters.get(INode.RELOAD_PARAMETER_ELEMENT_PARAMETERS);
  Map<String,Object> storeValueMap=storeValue(obj);
  if (UnifiedComponentUtil.isDelegateComponent(getDelegateComponent())) {
    setComponentProperties(null);
  }
  init(component);
  IElementParameter param=getElementParameter(EParameterName.REPOSITORY_ALLOW_AUTO_SWITCH.getName());
  if (param != null) {
    param.setValue(Boolean.TRUE);
  }
  boolean isJobletNode=false;
  if (PluginChecker.isJobLetPluginLoaded()) {
    IJobletProviderService service=(IJobletProviderService)GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);
    if (service != null && service.isJobletComponent(this)) {
      isJobletNode=true;
    }
  }
  if (obj != null) {
    if (UnifiedComponentUtil.isDelegateComponent(getDelegateComponent())) {
      Object object=parameters.get(INode.OLD_UNIFIED_COMPONENT);
      String oldComponent=object == null ? null : object.toString();
      UnifiedComponentUtil.switchComponent(this,component,oldComponent,(List<? extends IElementParameter>)obj);
    }
 else {
      List<? extends IElementParameter> oldElementParameters=(List<? extends IElementParameter>)obj;
      for (      IElementParameter sourceParam : oldElementParameters) {
        IElementParameter targetParam=getElementParameter(sourceParam.getName());
        String sourceParamName=sourceParam.getName();
        if (isJobletNode && (EParameterName.PROCESS_TYPE_VERSION.getName()).equals(sourceParamName)) {
          Object versionObj=storeValueMap.get(sourceParamName);
          if (versionObj != null && !versionObj.equals(sourceParam.getValue())) {
            sourceParam.setValue(versionObj);
          }
        }
        if (targetParam != null) {
          if (sourceParam.getName().equals(EParameterName.LABEL.getName()) && (sourceParam.getValue() == null || "String_Node_Str".equals(sourceParam.getValue()))) {
            setPropertyValue(sourceParam.getName(),component.getProcess().getName());
          }
 else {
            setPropertyValue(sourceParam.getName(),sourceParam.getValue());
          }
          if (targetParam.getFieldType() == EParameterFieldType.TABLE) {
            targetParam.setListItemsValue(sourceParam.getListItemsValue());
          }
          for (          String name : targetParam.getChildParameters().keySet()) {
            IElementParameter targetChildParam=targetParam.getChildParameters().get(name);
            IElementParameter sourceChildParam=sourceParam.getChildParameters().get(name);
            if (sourceChildParam == null) {
              continue;
            }
            String pname=sourceParam.getName() + "String_Node_Str" + sourceChildParam.getName();
            if (storeValueMap.get(pname) != null) {
              setPropertyValue(pname,storeValueMap.get(pname));
            }
 else {
              setPropertyValue(pname,sourceChildParam.getValue());
            }
            if (targetChildParam.getFieldType() == EParameterFieldType.TABLE) {
              targetChildParam.setListItemsValue(sourceChildParam.getListItemsValue());
            }
 else             if (targetChildParam.getFieldType() == EParameterFieldType.CONNECTION_LIST) {
              if (((getPropertyValue(pname) == null || getPropertyValue(pname).toString().length() == 0)) && component.getProcess() instanceof IProcess2 && storeValueMap.containsKey(sourceParam.getName())&& !storeValueMap.containsKey(pname)) {
                storeConn(sourceParam,pname);
              }
            }
          }
        }
      }
    }
  }
  obj=parameters.get(INode.RELOAD_PARAMETER_METADATA_LIST);
  if (obj != null) {
    setMetadataList((List<IMetadataTable>)obj);
  }
  obj=parameters.get(INode.RELOAD_PARAMETER_EXTERNAL_BYTES_DATA);
  if (obj != null && isExternalNode()) {
    if (obj instanceof IExternalData) {
      getExternalNode().setExternalData((IExternalData)obj);
    }
    getExternalNode().initialize();
  }
  obj=parameters.get(INode.RELOAD_PARAMETER_CONNECTORS);
  if (obj != null) {
    List<? extends INodeConnector> connectors=(List<? extends INodeConnector>)obj;
    if (isJobletNode) {
      listConnector=connectors;
    }
 else {
      for (      INodeConnector currentConnector : listConnector) {
        for (        INodeConnector connector : connectors) {
          if (currentConnector.getName().equals(connector.getName())) {
            currentConnector.setCurLinkNbInput(connector.getCurLinkNbInput());
            currentConnector.setCurLinkNbOutput(connector.getCurLinkNbOutput());
            break;
          }
        }
      }
    }
  }
  reloadingComponent=false;
  this.isUpdate=false;
}

Fixed version (ground truth):
@Override public void reloadComponent(IComponent component,Map<String,Object> parameters,boolean isUpdate){
  this.isUpdate=isUpdate;
  reloadingComponent=true;
  currentStatus=0;
  oldStatus=0;
  Object obj=parameters.get(INode.RELOAD_PARAMETER_ELEMENT_PARAMETERS);
  Map<String,Object> storeValueMap=storeValue(obj);
  if (UnifiedComponentUtil.isDelegateComponent(getDelegateComponent())) {
    setComponentProperties(null);
  }
  init(component);
  IElementParameter param=getElementParameter(EParameterName.REPOSITORY_ALLOW_AUTO_SWITCH.getName());
  if (param != null) {
    param.setValue(Boolean.TRUE);
  }
  boolean isJobletNode=false;
  if (PluginChecker.isJobLetPluginLoaded()) {
    IJobletProviderService service=(IJobletProviderService)GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);
    if (service != null && service.isJobletComponent(this)) {
      isJobletNode=true;
    }
  }
  if (obj != null) {
    if (UnifiedComponentUtil.isDelegateComponent(getDelegateComponent())) {
      Object object=parameters.get(INode.OLD_UNIFIED_COMPONENT);
      String oldComponent=object == null ? null : object.toString();
      Object metadatObj=parameters.get(INode.SWITCH_NODE_METADATA_LIST);
      List<IMetadataTable> oldTables=null;
      if (metadatObj != null) {
        oldTables=(List<IMetadataTable>)metadatObj;
      }
      Object connectorObj=parameters.get(INode.SWITCH_NODE_CONNECTORS);
      List<INodeConnector> oldConnectors=null;
      if (metadatObj != null) {
        oldConnectors=(List<INodeConnector>)connectorObj;
      }
      UnifiedComponentUtil.switchComponent(this,component,oldComponent,(List<? extends IElementParameter>)obj,oldTables,oldConnectors);
    }
 else {
      List<? extends IElementParameter> oldElementParameters=(List<? extends IElementParameter>)obj;
      for (      IElementParameter sourceParam : oldElementParameters) {
        IElementParameter targetParam=getElementParameter(sourceParam.getName());
        String sourceParamName=sourceParam.getName();
        if (isJobletNode && (EParameterName.PROCESS_TYPE_VERSION.getName()).equals(sourceParamName)) {
          Object versionObj=storeValueMap.get(sourceParamName);
          if (versionObj != null && !versionObj.equals(sourceParam.getValue())) {
            sourceParam.setValue(versionObj);
          }
        }
        if (targetParam != null) {
          if (sourceParam.getName().equals(EParameterName.LABEL.getName()) && (sourceParam.getValue() == null || "String_Node_Str".equals(sourceParam.getValue()))) {
            setPropertyValue(sourceParam.getName(),component.getProcess().getName());
          }
 else {
            setPropertyValue(sourceParam.getName(),sourceParam.getValue());
          }
          if (targetParam.getFieldType() == EParameterFieldType.TABLE) {
            targetParam.setListItemsValue(sourceParam.getListItemsValue());
          }
          for (          String name : targetParam.getChildParameters().keySet()) {
            IElementParameter targetChildParam=targetParam.getChildParameters().get(name);
            IElementParameter sourceChildParam=sourceParam.getChildParameters().get(name);
            if (sourceChildParam == null) {
              continue;
            }
            String pname=sourceParam.getName() + "String_Node_Str" + sourceChildParam.getName();
            if (storeValueMap.get(pname) != null) {
              setPropertyValue(pname,storeValueMap.get(pname));
            }
 else {
              setPropertyValue(pname,sourceChildParam.getValue());
            }
            if (targetChildParam.getFieldType() == EParameterFieldType.TABLE) {
              targetChildParam.setListItemsValue(sourceChildParam.getListItemsValue());
            }
 else             if (targetChildParam.getFieldType() == EParameterFieldType.CONNECTION_LIST) {
              if (((getPropertyValue(pname) == null || getPropertyValue(pname).toString().length() == 0)) && component.getProcess() instanceof IProcess2 && storeValueMap.containsKey(sourceParam.getName())&& !storeValueMap.containsKey(pname)) {
                storeConn(sourceParam,pname);
              }
            }
          }
        }
      }
    }
  }
  obj=parameters.get(INode.RELOAD_PARAMETER_METADATA_LIST);
  if (obj != null) {
    setMetadataList((List<IMetadataTable>)obj);
  }
  obj=parameters.get(INode.RELOAD_PARAMETER_EXTERNAL_BYTES_DATA);
  if (obj != null && isExternalNode()) {
    if (obj instanceof IExternalData) {
      getExternalNode().setExternalData((IExternalData)obj);
    }
    getExternalNode().initialize();
  }
  obj=parameters.get(INode.RELOAD_PARAMETER_CONNECTORS);
  if (obj != null) {
    List<? extends INodeConnector> connectors=(List<? extends INodeConnector>)obj;
    if (isJobletNode) {
      listConnector=connectors;
    }
 else {
      for (      INodeConnector currentConnector : listConnector) {
        for (        INodeConnector connector : connectors) {
          if (currentConnector.getName().equals(connector.getName())) {
            currentConnector.setCurLinkNbInput(connector.getCurLinkNbInput());
            currentConnector.setCurLinkNbOutput(connector.getCurLinkNbOutput());
            break;
          }
        }
      }
    }
  }
  reloadingComponent=false;
  this.isUpdate=false;
}