Program: 118335
Project: 118335
Buggy source:
@Override public void undo(){
  IElementParameter currentParam=elem.getElementParameter(propName);
  if (repositoryValueWasUsed) {
    if (currentParam.getFieldType() == EParameterFieldType.MEMO_SQL) {
      elem.setPropertyValue(EParameterName.QUERYSTORE_TYPE.getName(),EmfComponent.REPOSITORY);
    }
 else {
      elem.setPropertyValue(propertyTypeName,EmfComponent.REPOSITORY);
    }
    for (    IElementParameter param : elem.getElementParameters()) {
      String repositoryValue=param.getRepositoryValue();
      if (param.isShow(elem.getElementParameters()) && (repositoryValue != null) && param.getCategory().equals(currentParam.getCategory())) {
        param.setRepositoryValueUsed(true);
      }
    }
  }
  elem.setPropertyValue(propName,oldValue);
  if (propName.contains(EParameterName.PROCESS_TYPE_PROCESS.getName())) {
    ProcessItem processItem=ItemCacheManager.getProcessItem((String)oldValue);
    if (processItem != null) {
      currentParam.getParentParameter().setValue(processItem.getProperty().getLabel());
    }
  }
  for (  IElementParameter param : oldElementValues.keySet()) {
    param.setValue(oldElementValues.get(param));
  }
  if (toUpdate) {
    elem.setPropertyValue(updataComponentParamName,Boolean.TRUE);
  }
  if (changeMetadataCommands != null) {
    int size=changeMetadataCommands.size();
    for (int i=size - 1; 0 <= i; i--) {
      ChangeMetadataCommand changeMetadataCommand=changeMetadataCommands.get(i);
      changeMetadataCommand.undo();
    }
  }
  CodeView.refreshCodeView(elem);
  ComponentSettings.switchToCurComponentSettingsView();
  JobSettings.switchToCurJobSettingsView();
  refreshTraceConnections();
  refreshResumingConnections();
  if (elem instanceof Node) {
    ((Node)elem).checkAndRefreshNode();
  }
  refreshMR(propName);
}

Fixed version (ground truth):
@Override public void undo(){
  IElementParameter currentParam=elem.getElementParameter(propName);
  if (repositoryValueWasUsed) {
    if (currentParam.getFieldType() == EParameterFieldType.MEMO_SQL) {
      elem.setPropertyValue(EParameterName.QUERYSTORE_TYPE.getName(),EmfComponent.REPOSITORY);
    }
 else {
      elem.setPropertyValue(propertyTypeName,EmfComponent.REPOSITORY);
    }
    for (    IElementParameter param : elem.getElementParameters()) {
      String repositoryValue=param.getRepositoryValue();
      if (param.isShow(elem.getElementParameters()) && (repositoryValue != null) && param.getCategory().equals(currentParam.getCategory())) {
        param.setRepositoryValueUsed(true);
      }
    }
  }
  elem.setPropertyValue(propName,oldValue);
  if (propName.contains(EParameterName.PROCESS_TYPE_PROCESS.getName())) {
    ProcessItem processItem=ItemCacheManager.getProcessItem((String)oldValue);
    if (processItem != null) {
      currentParam.getParentParameter().setValue(processItem.getProperty().getLabel());
    }
  }
  for (  IElementParameter param : oldElementValues.keySet()) {
    param.setValue(oldElementValues.get(param));
  }
  if (toUpdate) {
    elem.setPropertyValue(updataComponentParamName,Boolean.TRUE);
  }
  if (changeMetadataCommands != null) {
    int size=changeMetadataCommands.size();
    for (int i=size - 1; 0 <= i; i--) {
      ChangeMetadataCommand changeMetadataCommand=changeMetadataCommands.get(i);
      changeMetadataCommand.undo();
    }
  }
  if (updateELTMapComponentCommand != null) {
    updateELTMapComponentCommand.undo();
  }
  CodeView.refreshCodeView(elem);
  ComponentSettings.switchToCurComponentSettingsView();
  JobSettings.switchToCurJobSettingsView();
  refreshTraceConnections();
  refreshResumingConnections();
  if (elem instanceof Node) {
    ((Node)elem).checkAndRefreshNode();
  }
  refreshMR(propName);
}