nus-yam/ex-repair huggingface dataset:
Program: 123544
Project: 123544
Buggy source:
private static void executeUpdate(UpdateResult result,IProgressMonitor monitor){
  if (result.isReadOnlyProcess()) {
    return;
  }
  Command command=null;
switch (result.getUpdateType()) {
case NODE_PROPERTY:
case NODE_SCHEMA:
case NODE_QUERY:
case NODE_SAP_IDOC:
case NODE_SAP_FUNCTION:
case NODE_VALIDATION_RULE:
    command=new UpdateNodeParameterCommand(result);
  break;
case JOB_PROPERTY_EXTRA:
case JOB_PROPERTY_STATS_LOGS:
case JOB_PROPERTY_HEADERFOOTER:
command=new UpdateMainParameterCommand(result);
break;
case CONTEXT:
command=executeContextUpdates(result);
break;
case CONTEXT_GROUP:
command=executeContextGroupUpdates(result);
break;
case JOBLET_RENAMED:
case JOBLET_SCHEMA:
case RELOAD:
command=executeJobletNodesUpdates(result);
break;
case JOBLET_CONTEXT:
command=new Command(){
}
;
break;
default :
break;
}
if (command != null) {
SubProgressMonitor subMonitor=new SubProgressMonitor(monitor,1 * UpdatesConstants.SCALE,SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
subMonitor.beginTask(UpdatesConstants.EMPTY,1);
subMonitor.subTask(getResultTaskInfor(result));
Object job=result.getJob();
boolean executed=false;
if (job != null) {
if (job instanceof IProcess2) {
IProcess2 process=(IProcess2)job;
process.getCommandStack().execute(command);
executed=true;
}
}
if (!executed) {
command.execute();
}
if (result.isFromItem() || result.getResultType() == EUpdateResult.JOBLET_UPDATE) {
saveModifiedItem(result);
}
subMonitor.worked(1);
}
}

Fixed version (ground truth):
private static void executeUpdate(UpdateResult result,IProgressMonitor monitor){
  if (result.isReadOnlyProcess()) {
    return;
  }
  Command command=null;
switch (result.getUpdateType()) {
case NODE_PROPERTY:
case NODE_SCHEMA:
case NODE_QUERY:
case NODE_SAP_IDOC:
case NODE_SAP_FUNCTION:
case NODE_VALIDATION_RULE:
    command=new UpdateNodeParameterCommand(result);
  break;
case JOB_PROPERTY_EXTRA:
case JOB_PROPERTY_STATS_LOGS:
case JOB_PROPERTY_HEADERFOOTER:
command=new UpdateMainParameterCommand(result);
break;
case CONTEXT:
command=executeContextUpdates(result);
break;
case CONTEXT_GROUP:
command=executeContextGroupUpdates(result);
break;
case JOBLET_RENAMED:
case JOBLET_SCHEMA:
case RELOAD:
command=executeJobletNodesUpdates(result);
break;
case JOBLET_CONTEXT:
command=new Command(){
}
;
break;
default :
break;
}
if (command != null) {
SubProgressMonitor subMonitor=new SubProgressMonitor(monitor,1 * UpdatesConstants.SCALE,SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
subMonitor.beginTask(UpdatesConstants.EMPTY,1);
subMonitor.subTask(getResultTaskInfor(result));
Object job=result.getJob();
boolean executed=false;
boolean isSaveModifiedItem=false;
if (job != null) {
if (job instanceof IProcess2) {
IProcess2 process=(IProcess2)job;
process.getCommandStack().execute(command);
if (process.getEditor() != null) {
isSaveModifiedItem=true;
}
executed=true;
}
}
if (!executed) {
command.execute();
}
if (result.isFromItem() || !isSaveModifiedItem) {
saveModifiedItem(result);
}
subMonitor.worked(1);
}
}
Program: 123545
Project: 123545
Buggy source:
public void run(){
  INode node=null;
  String msg=null;
  if (!selection.isEmpty()) {
    try {
      final RepositoryNode repositoryNode=(RepositoryNode)selection.getFirstElement();
      if (SQLBuilderRepositoryNodeManager.getRepositoryType(repositoryNode) == RepositoryNodeType.FOLDER) {
        return;
      }
      sessionTreeNode=nodeManager.getSessionTreeNode(repositoryNode,selectedContext);
      node=nodeManager.convert2INode(repositoryNode,selectedContext,sessionTreeNode);
    }
 catch (    Exception e) {
      msg=e.getMessage();
      SqlBuilderPlugin.log(msg,e);
    }
    final INode argNode=node;
    final String argMsg=msg;
    dbDetailsComposite.setSelectedNode(argNode,argMsg);
    wapperDriver=sessionTreeNode.getWapperDriver();
    ExtractMetaDataUtils.closeConnection();
    if (wapperDriver != null) {
      try {
        wapperDriver.connect("String_Node_Str",null);
      }
 catch (      SQLException e) {
      }
    }
  }
}

Fixed version (ground truth):
public void run(){
  INode node=null;
  String msg=null;
  if (!selection.isEmpty()) {
    try {
      final RepositoryNode repositoryNode=(RepositoryNode)selection.getFirstElement();
      if (SQLBuilderRepositoryNodeManager.getRepositoryType(repositoryNode) == RepositoryNodeType.FOLDER) {
        return;
      }
      sessionTreeNode=nodeManager.getSessionTreeNode(repositoryNode,selectedContext);
      node=nodeManager.convert2INode(repositoryNode,selectedContext,sessionTreeNode);
    }
 catch (    Exception e) {
      msg=e.getMessage();
      SqlBuilderPlugin.log(msg,e);
    }
    final INode argNode=node;
    final String argMsg=msg;
    dbDetailsComposite.setSelectedNode(argNode,argMsg);
    wapperDriver=sessionTreeNode.getWapperDriver();
    String dbType=sessionTreeNode.getDatabaseConnection().getDatabaseType();
    String driverClassName=sessionTreeNode.getDatabaseConnection().getDriverClass();
    if (wapperDriver != null && (driverClassName.equals(EDatabase4DriverClassName.JAVADB_EMBEDED.getDriverClass()) || dbType.equals(EDatabaseTypeName.JAVADB_EMBEDED.getDisplayName()) || dbType.equals(EDatabaseTypeName.JAVADB_DERBYCLIENT.getDisplayName())|| dbType.equals(EDatabaseTypeName.JAVADB_JCCJDBC.getDisplayName()))) {
      try {
        wapperDriver.connect("String_Node_Str",null);
      }
 catch (      SQLException e) {
      }
    }
  }
}
Program: 123547
Project: 123547
Buggy source:
public void undo(){
  this.process.removeNodeContainer(this.nodeContainer);
  process.checkStartNodes();
  Problems.clearAll(nodeContainer.getNode());
  Problems.refreshProblemTreeView();
}

Fixed version (ground truth):
@Override public void undo(){
  this.process.removeNodeContainer(this.nodeContainer);
  process.checkStartNodes();
  Problems.clearAll(nodeContainer.getNode());
  Problems.refreshProblemTreeView();
}
Program: 123548
Project: 123548
Buggy source:
public void redo(){
  this.execute();
}

Fixed version (ground truth):
@Override public void redo(){
  this.execute();
}
Program: 123549
Project: 123549
Buggy source:
public void execute(){
  if (this.location != null) {
    this.nodeContainer.getNode().setLocation(this.location);
  }
  AbstractProcessProvider provider=AbstractProcessProvider.findProcessProviderFromPID(nodeContainer.getNode().getComponent().getPluginExtension());
  if (provider == null || (provider != null && provider.containNodeInMemoryNotProcess())) {
    this.process.addNodeContainer(this.nodeContainer);
    process.checkStartNodes();
    nodeContainer.getNode().checkAndRefreshNode();
    if (nodeContainer.getNode().getComponent().getComponentType() == EComponentType.JOBLET) {
      process.getUpdateManager().update(EUpdateItemType.JOBLET_CONTEXT);
    }
  }
 else {
    String name=provider.getComponentProcess().getName() + "String_Node_Str" + provider.getComponentProcess().getVersion();
    MessageDialog warningMessageDialog=new MessageDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),"String_Node_Str",null,"String_Node_Str" + name + "String_Node_Str",MessageDialog.OK,new String[]{"String_Node_Str"},0);
    warningMessageDialog.open();
  }
}

Fixed version (ground truth):
@Override public void execute(){
  if (this.location != null) {
    this.nodeContainer.getNode().setLocation(this.location);
  }
  AbstractProcessProvider provider=AbstractProcessProvider.findProcessProviderFromPID(nodeContainer.getNode().getComponent().getPluginExtension());
  IElementParameter ep=nodeContainer.getNode().getElementParameter(EParameterName.UNIQUE_NAME.getName());
  process.addUniqueNodeName(ep.getValue().toString());
  if (provider == null || (provider != null && provider.containNodeInMemoryNotProcess())) {
    this.process.addNodeContainer(this.nodeContainer);
    process.checkStartNodes();
    nodeContainer.getNode().checkAndRefreshNode();
    if (nodeContainer.getNode().getComponent().getComponentType() == EComponentType.JOBLET) {
      process.getUpdateManager().update(EUpdateItemType.JOBLET_CONTEXT);
    }
  }
 else {
    String name=provider.getComponentProcess().getName() + "String_Node_Str" + provider.getComponentProcess().getVersion();
    MessageDialog warningMessageDialog=new MessageDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),"String_Node_Str",null,"String_Node_Str" + name + "String_Node_Str",MessageDialog.OK,new String[]{"String_Node_Str"},0);
    warningMessageDialog.open();
  }
}
Program: 123551
Project: 123551
Buggy source:
public void execute(){
  if (this.location != null) {
    this.nodeContainer.getNode().setLocation(this.location);
  }
  AbstractProcessProvider provider=AbstractProcessProvider.findProcessProviderFromPID(nodeContainer.getNode().getComponent().getPluginExtension());
  if (provider == null || (provider != null && provider.containNodeInMemoryNotProcess())) {
    this.process.addNodeContainer(this.nodeContainer);
    process.checkStartNodes();
    nodeContainer.getNode().checkAndRefreshNode();
    if (nodeContainer.getNode().getComponent().getComponentType() == EComponentType.JOBLET) {
      process.getUpdateManager().update(EUpdateItemType.JOBLET_CONTEXT);
    }
  }
 else {
    String name=provider.getComponentProcess().getName() + "String_Node_Str" + provider.getComponentProcess().getVersion();
    MessageDialog warningMessageDialog=new MessageDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),"String_Node_Str",null,"String_Node_Str" + name + "String_Node_Str",MessageDialog.OK,new String[]{"String_Node_Str"},0);
    warningMessageDialog.open();
  }
}

Fixed version (ground truth):
public void execute(){
  if (this.location != null) {
    this.nodeContainer.getNode().setLocation(this.location);
  }
  AbstractProcessProvider provider=AbstractProcessProvider.findProcessProviderFromPID(nodeContainer.getNode().getComponent().getPluginExtension());
  IElementParameter ep=nodeContainer.getNode().getElementParameter(EParameterName.UNIQUE_NAME.getName());
  process.addUniqueNodeName(ep.getValue().toString());
  if (provider == null || (provider != null && provider.containNodeInMemoryNotProcess())) {
    this.process.addNodeContainer(this.nodeContainer);
    process.checkStartNodes();
    nodeContainer.getNode().checkAndRefreshNode();
    if (nodeContainer.getNode().getComponent().getComponentType() == EComponentType.JOBLET) {
      process.getUpdateManager().update(EUpdateItemType.JOBLET_CONTEXT);
    }
  }
 else {
    String name=provider.getComponentProcess().getName() + "String_Node_Str" + provider.getComponentProcess().getVersion();
    MessageDialog warningMessageDialog=new MessageDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),"String_Node_Str",null,"String_Node_Str" + name + "String_Node_Str",MessageDialog.OK,new String[]{"String_Node_Str"},0);
    warningMessageDialog.open();
  }
}
Program: 123552
Project: 123552
Buggy source:
public void run(){
  INode node=null;
  String msg=null;
  if (!selection.isEmpty()) {
    try {
      final RepositoryNode repositoryNode=(RepositoryNode)selection.getFirstElement();
      if (SQLBuilderRepositoryNodeManager.getRepositoryType(repositoryNode) == RepositoryNodeType.FOLDER) {
        return;
      }
      sessionTreeNode=nodeManager.getSessionTreeNode(repositoryNode,selectedContext);
      node=nodeManager.convert2INode(repositoryNode,selectedContext,sessionTreeNode);
    }
 catch (    Exception e) {
      msg=e.getMessage();
      SqlBuilderPlugin.log(msg,e);
    }
    final INode argNode=node;
    final String argMsg=msg;
    dbDetailsComposite.setSelectedNode(argNode,argMsg);
    wapperDriver=sessionTreeNode.getWapperDriver();
    ExtractMetaDataUtils.closeConnection();
    if (wapperDriver != null) {
      try {
        wapperDriver.connect("String_Node_Str",null);
      }
 catch (      SQLException e) {
      }
    }
  }
}

Fixed version (ground truth):
public void run(){
  INode node=null;
  String msg=null;
  if (!selection.isEmpty()) {
    try {
      final RepositoryNode repositoryNode=(RepositoryNode)selection.getFirstElement();
      if (SQLBuilderRepositoryNodeManager.getRepositoryType(repositoryNode) == RepositoryNodeType.FOLDER) {
        return;
      }
      sessionTreeNode=nodeManager.getSessionTreeNode(repositoryNode,selectedContext);
      node=nodeManager.convert2INode(repositoryNode,selectedContext,sessionTreeNode);
    }
 catch (    Exception e) {
      msg=e.getMessage();
      SqlBuilderPlugin.log(msg,e);
    }
    final INode argNode=node;
    final String argMsg=msg;
    dbDetailsComposite.setSelectedNode(argNode,argMsg);
    wapperDriver=sessionTreeNode.getWapperDriver();
    String dbType=sessionTreeNode.getDatabaseConnection().getDatabaseType();
    String driverClassName=sessionTreeNode.getDatabaseConnection().getDriverClass();
    if (wapperDriver != null && (driverClassName.equals(EDatabase4DriverClassName.JAVADB_EMBEDED.getDriverClass()) || dbType.equals(EDatabaseTypeName.JAVADB_EMBEDED.getDisplayName()) || dbType.equals(EDatabaseTypeName.JAVADB_DERBYCLIENT.getDisplayName())|| dbType.equals(EDatabaseTypeName.JAVADB_JCCJDBC.getDisplayName()))) {
      try {
        wapperDriver.connect("String_Node_Str",null);
      }
 catch (      SQLException e) {
      }
    }
  }
}
Program: 123554
Project: 123554
Buggy source:
/** 
 * DOC amaumont ProcessMessageManager constructor comment.
 */
public ProcessMessageManager(){
  super();
  String line=RunProcessPlugin.getDefault().getPluginPreferences().getString(RunprocessConstants.CONSOLE_LINE_LIMIT_COUNT);
  if (!"String_Node_Str".equals(line) && line != null) {
    lineLimit=(Integer.parseInt(line));
    messages=new BoundedFifoBuffer(lineLimit);
  }
 else {
    messages=new BoundedFifoBuffer(LIMIT_MESSAGES);
  }
  pcsDelegate=new PropertyChangeSupport(this);
}

Fixed version (ground truth):
/** 
 * DOC amaumont ProcessMessageManager constructor comment.
 */
public ProcessMessageManager(){
  super();
  String line=RunProcessPlugin.getDefault().getPluginPreferences().getString(RunprocessConstants.CONSOLE_LINE_LIMIT_COUNT);
  if (!"String_Node_Str".equals(line) && line != null) {
    lineLimit=(Integer.parseInt(line));
    if (lineLimit <= 0) {
      lineLimit=1;
    }
    messages=new BoundedFifoBuffer(lineLimit);
  }
 else {
    messages=new BoundedFifoBuffer(LIMIT_MESSAGES);
  }
  pcsDelegate=new PropertyChangeSupport(this);
}
Program: 123558
Project: 123558
Buggy source:
private RepositoryNode getInput(){
  IContentProvider contentProvider=getRepView().getViewer().getContentProvider();
  if (contentProvider instanceof RepositoryContentProvider) {
    return typeProcessor.getInputRoot((RepositoryContentProvider)contentProvider);
  }
  return null;
}

Fixed version (ground truth):
private RepositoryNode getInput(){
  getRepView().refresh();
  IContentProvider contentProvider=getRepView().getViewer().getContentProvider();
  if (contentProvider instanceof RepositoryContentProvider) {
    return typeProcessor.getInputRoot((RepositoryContentProvider)contentProvider);
  }
  return null;
}
Program: 123561
Project: 123561
Buggy source:
public void clearAllData(){
  deletedItems.clear();
  if (!CommonsPlugin.isHeadless() || !ProjectManager.getInstance().getCurrentProject().isLocal()) {
    cache.clear();
  }
  treeBuilder.clear();
  xmiResourceManager.unloadResources();
  xmiResourceManager.resetResourceSet();
  projects.clear();
}

Fixed version (ground truth):
public void clearAllData(){
  deletedItems.clear();
  if ((!CommonsPlugin.isSameProjectLogonCommline() && CommonsPlugin.isHeadless()) || !CommonsPlugin.isHeadless() || !ProjectManager.getInstance().getCurrentProject().isLocal()) {
    cache.clear();
  }
  treeBuilder.clear();
  xmiResourceManager.unloadResources();
  xmiResourceManager.resetResourceSet();
  projects.clear();
}
Program: 123564
Project: 123564
Buggy source:
public void clearAllData(){
  deletedItems.clear();
  if (!CommonsPlugin.isHeadless() || !ProjectManager.getInstance().getCurrentProject().isLocal()) {
    cache.clear();
  }
  treeBuilder.clear();
  xmiResourceManager.unloadResources();
  xmiResourceManager.resetResourceSet();
  projects.clear();
}

Fixed version (ground truth):
public void clearAllData(){
  deletedItems.clear();
  if ((!CommonsPlugin.isSameProjectLogonCommline() && CommonsPlugin.isHeadless()) || !CommonsPlugin.isHeadless() || !ProjectManager.getInstance().getCurrentProject().isLocal()) {
    cache.clear();
  }
  treeBuilder.clear();
  xmiResourceManager.unloadResources();
  xmiResourceManager.resetResourceSet();
  projects.clear();
}
Program: 123570
Project: 123570
Buggy source:
@Override protected boolean calculateEnabled(){
  if (getSelectedObjects().isEmpty()) {
    return false;
  }
  Object s=getSelectedObjects().get(0);
  if (s instanceof List && !((List)s).isEmpty()) {
    List selectedarts=(List)s;
    Object obj=selectedarts.get(selectedarts.size() - 1);
    if (obj instanceof OutputTreeNodeEditPart) {
      nodePart=(OutputTreeNodeEditPart)obj;
      OutputTreeNode model=(OutputTreeNode)nodePart.getModel();
      if (NodeType.NAME_SPACE.equals(model.getNodeType()) || !(model.eContainer() instanceof OutputTreeNode) || model.isChoice()|| model.isSubstitution()) {
        return false;
      }
      if (!XmlMapUtil.isExpressionEditable(model)) {
        return false;
      }
      AbstractInOutTree abstractTree=XmlMapUtil.getAbstractInOutTree(model);
      if (abstractTree instanceof OutputXmlTree) {
        OutputXmlTree outputTree=((OutputXmlTree)abstractTree);
        if (outputTree.isAllInOne()) {
          return false;
        }
        if (outputTree.isMultiLoops()) {
          return false;
        }
      }
      if (!model.isAggregate()) {
        setText("String_Node_Str");
      }
 else {
        setText("String_Node_Str");
      }
    }
 else {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
@Override protected boolean calculateEnabled(){
  if (getSelectedObjects().isEmpty()) {
    return false;
  }
  Object s=getSelectedObjects().get(0);
  if (s instanceof List && !((List)s).isEmpty()) {
    List selectedarts=(List)s;
    Object obj=selectedarts.get(selectedarts.size() - 1);
    if (obj instanceof OutputTreeNodeEditPart) {
      nodePart=(OutputTreeNodeEditPart)obj;
      OutputTreeNode model=(OutputTreeNode)nodePart.getModel();
      if (NodeType.NAME_SPACE.equals(model.getNodeType()) || !(model.eContainer() instanceof OutputTreeNode) || model.isChoice()|| model.isSubstitution()) {
        return false;
      }
      if (!XmlMapUtil.isExpressionEditable(model)) {
        return false;
      }
      boolean isInputMultiLoops=false;
      if (mapperManager.getMainInputTree() != null && mapperManager.getMainInputTree().isMultiLoops()) {
        isInputMultiLoops=true;
      }
      AbstractInOutTree abstractTree=XmlMapUtil.getAbstractInOutTree(model);
      if (abstractTree instanceof OutputXmlTree) {
        OutputXmlTree outputTree=((OutputXmlTree)abstractTree);
        if (outputTree.isAllInOne()) {
          return false;
        }
        if (isInputMultiLoops && outputTree.isMultiLoops()) {
          return false;
        }
      }
      if (!model.isAggregate()) {
        setText("String_Node_Str");
      }
 else {
        setText("String_Node_Str");
      }
    }
 else {
      return false;
    }
  }
  return true;
}
Program: 123572
Project: 123572
Buggy source:
@Override public void notifyChanged(Notification notification){
  int type=notification.getEventType();
  int featureId=notification.getFeatureID(XmlmapPackage.class);
switch (type) {
case Notification.ADD:
case Notification.REMOVE:
case Notification.REMOVE_MANY:
switch (featureId) {
case XmlmapPackage.OUTPUT_XML_TREE__NODES:
      refreshChildren();
    break;
case XmlmapPackage.ABSTRACT_IN_OUT_TREE__FILTER_INCOMING_CONNECTIONS:
  refreshTargetConnections();
break;
}
break;
case Notification.SET:
switch (featureId) {
case XmlmapPackage.OUTPUT_XML_TREE__NODES:
refreshChildren();
case XmlmapPackage.OUTPUT_XML_TREE__REJECT:
case XmlmapPackage.OUTPUT_XML_TREE__REJECT_INNER_JOIN:
case XmlmapPackage.OUTPUT_XML_TREE__EXPRESSION_FILTER:
case XmlmapPackage.OUTPUT_XML_TREE__MINIMIZED:
case XmlmapPackage.OUTPUT_XML_TREE__ALL_IN_ONE:
case XmlmapPackage.OUTPUT_XML_TREE__ENABLE_EMPTY_ELEMENT:
((OutputXmlTreeFigure)getFigure()).update(featureId);
break;
case XmlmapPackage.TREE_NODE__EXPRESSION:
((OutputXmlTreeFigure)getFigure()).update(XmlmapPackage.TREE_NODE__TYPE);
break;
case XmlmapPackage.ABSTRACT_IN_OUT_TREE__MULTI_LOOPS:
OutputXmlTree model=(OutputXmlTree)getModel();
if (model.isMultiLoops()) {
boolean changed=cleanAggregateAndGroup(model.getNodes());
if (changed) {
refreshChildren();
}
}
}
}
}

Fixed version (ground truth):
@Override public void notifyChanged(Notification notification){
  int type=notification.getEventType();
  int featureId=notification.getFeatureID(XmlmapPackage.class);
switch (type) {
case Notification.ADD:
case Notification.REMOVE:
case Notification.REMOVE_MANY:
switch (featureId) {
case XmlmapPackage.OUTPUT_XML_TREE__NODES:
      refreshChildren();
    break;
case XmlmapPackage.ABSTRACT_IN_OUT_TREE__FILTER_INCOMING_CONNECTIONS:
  refreshTargetConnections();
break;
}
break;
case Notification.SET:
switch (featureId) {
case XmlmapPackage.OUTPUT_XML_TREE__NODES:
refreshChildren();
case XmlmapPackage.OUTPUT_XML_TREE__REJECT:
case XmlmapPackage.OUTPUT_XML_TREE__REJECT_INNER_JOIN:
case XmlmapPackage.OUTPUT_XML_TREE__EXPRESSION_FILTER:
case XmlmapPackage.OUTPUT_XML_TREE__MINIMIZED:
case XmlmapPackage.OUTPUT_XML_TREE__ALL_IN_ONE:
case XmlmapPackage.OUTPUT_XML_TREE__ENABLE_EMPTY_ELEMENT:
((OutputXmlTreeFigure)getFigure()).update(featureId);
break;
case XmlmapPackage.TREE_NODE__EXPRESSION:
((OutputXmlTreeFigure)getFigure()).update(XmlmapPackage.TREE_NODE__TYPE);
break;
case XmlmapPackage.ABSTRACT_IN_OUT_TREE__MULTI_LOOPS:
OutputXmlTree model=(OutputXmlTree)getModel();
boolean changed=false;
if (model.isMultiLoops()) {
changed=cleanGroup(model.getNodes());
}
if (model.isMultiLoops() && getParent() instanceof XmlMapDataEditPart) {
List childPart=((XmlMapDataEditPart)getParent()).getChildren();
for (Object o : childPart) {
if (o instanceof InputXmlTreeEditPart) {
InputXmlTree inputTree=(InputXmlTree)((InputXmlTreeEditPart)o).getModel();
if (inputTree.isMultiLoops() && !inputTree.isLookup()) {
changed=cleanAggregate(model.getNodes()) || changed;
break;
}
}
}
}
if (changed) {
refreshChildren();
}
}
}
}
Program: 123576
Project: 123576
Buggy source:
public void widgetSelected(SelectionEvent e){
  exportDependencies.setEnabled(jobItemButton.getSelection());
  if (!jobItemButton.getSelection()) {
    exportDependencies.setSelection(false);
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  exportDependencies.setEnabled(jobItemButton.getSelection());
  if (!jobItemButton.getSelection()) {
    exportDependencies.setSelection(false);
  }
}
Program: 123577
Project: 123577
Buggy source:
protected boolean validateOptionsGroup(){
  boolean isValid=false;
  if (super.validateOptionsGroup()) {
    boolean hasAttachment=false;
    for (int i=0; !hasAttachment && currentCtxTypes != null && i < currentCtxTypes.size(); i++) {
      ContextTypeDefinition def=currentCtxTypes.get(i);
      hasAttachment=def.getExportType() != ContextExportType.NOT_EXPORTED || def.getExportType() != ContextExportType.PARAMETER;
    }
    if (hasAttachment && PetalsTemporaryOptionsKeeper.INSTANCE.isValidateByWsdl()) {
      setErrorMessage(Messages.getString("String_Node_Str"));
      isValid=false;
    }
 else {
      setErrorMessage(null);
      isValid=true;
    }
  }
  setPageComplete(isValid);
  return isValid;
}

Fixed version (ground truth):
@Override protected boolean validateOptionsGroup(){
  boolean isValid=false;
  if (super.validateOptionsGroup()) {
    boolean hasAttachment=false;
    for (int i=0; !hasAttachment && currentCtxTypes != null && i < currentCtxTypes.size(); i++) {
      ContextTypeDefinition def=currentCtxTypes.get(i);
      hasAttachment=def.getExportType() != ContextExportType.NOT_EXPORTED || def.getExportType() != ContextExportType.PARAMETER;
    }
    if (hasAttachment && PetalsTemporaryOptionsKeeper.INSTANCE.isValidateByWsdl()) {
      setErrorMessage(Messages.getString("String_Node_Str"));
      isValid=false;
    }
 else {
      setErrorMessage(null);
      isValid=true;
    }
  }
  setPageComplete(isValid);
  return isValid;
}
Program: 123578
Project: 123578
Buggy source:
protected void restoreWidgetValues(){
  IDialogSettings settings=getDialogSettings();
  if (settings != null) {
    String[] directoryNames=settings.getArray(PETALS_EXPORT_DESTINATIONS);
    if (directoryNames == null || directoryNames.length == 0)     return;
    if (directoryNames[0].endsWith(getPetalsDefaultSaName())) {
      setDestinationValue(directoryNames[0]);
      saDestinationFilePath=directoryNames[0];
    }
    for (int i=0; i < directoryNames.length; i++) {
      addDestinationItem(directoryNames[i]);
    }
  }
}

Fixed version (ground truth):
@Override protected void restoreWidgetValues(){
  IDialogSettings settings=getDialogSettings();
  if (settings != null) {
    String[] directoryNames=settings.getArray(PETALS_EXPORT_DESTINATIONS);
    if (directoryNames == null || directoryNames.length == 0)     return;
    if (directoryNames[0].endsWith(getPetalsDefaultSaName())) {
      setDestinationValue(directoryNames[0]);
      saDestinationFilePath=directoryNames[0];
    }
    for (int i=0; i < directoryNames.length; i++) {
      addDestinationItem(directoryNames[i]);
    }
  }
}
Program: 123579
Project: 123579
Buggy source:
public JobExportType getCurrentExportType1(){
  if (exportTypeCombo != null && !exportTypeCombo.getText().equals("String_Node_Str")) {
    return JobExportType.getTypeFromLabel(exportTypeCombo.getText());
  }
 else {
    IDialogSettings settings=getDialogSettings();
    if (settings != null && settings.get(STORE_EXPORTTYPE_ID) != null) {
      return JobExportType.getTypeFromString(settings.get(STORE_EXPORTTYPE_ID));
    }
  }
  return JobExportType.POJO;
}

Fixed version (ground truth):
@Override public JobExportType getCurrentExportType1(){
  if (exportTypeCombo != null && !exportTypeCombo.getText().equals("String_Node_Str")) {
    return JobExportType.getTypeFromLabel(exportTypeCombo.getText());
  }
 else {
    IDialogSettings settings=getDialogSettings();
    if (settings != null && settings.get(STORE_EXPORTTYPE_ID) != null) {
      return JobExportType.getTypeFromString(settings.get(STORE_EXPORTTYPE_ID));
    }
  }
  return JobExportType.POJO;
}
Program: 123581
Project: 123581
Buggy source:
public boolean performFinish(){
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
  try {
    if (creation) {
      String nextId=factory.getNextId();
      connectionProperty.setId(nextId);
      factory.create(connectionItem,propertiesWizardPage.getDestinationPath());
    }
 else {
      RepositoryUpdateManager.updateFileConnection(connectionItem);
      factory.save(connectionItem);
      closeLockStrategy();
    }
  }
 catch (  PersistenceException e) {
    String detailError=e.toString();
    new ErrorDialogWidthDetailArea(getShell(),PID,"String_Node_Str",detailError);
    return false;
  }
  return true;
}

Fixed version (ground truth):
public boolean performFinish(){
  final IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
  try {
    if (creation) {
      String nextId=factory.getNextId();
      connectionProperty.setId(nextId);
      factory.create(connectionItem,propertiesWizardPage.getDestinationPath());
    }
 else {
      RepositoryUpdateManager.updateFileConnection(connectionItem);
      IWorkspace workspace=ResourcesPlugin.getWorkspace();
      IWorkspaceRunnable operation=new IWorkspaceRunnable(){
        public void run(        IProgressMonitor monitor) throws CoreException {
          try {
            factory.save(connectionItem);
            closeLockStrategy();
          }
 catch (          PersistenceException e) {
            throw new CoreException(new Status(IStatus.ERROR,"String_Node_Str","String_Node_Str",e));
          }
        }
      }
;
      workspace.run(operation,null);
    }
  }
 catch (  Exception e) {
    String detailError=e.toString();
    new ErrorDialogWidthDetailArea(getShell(),PID,"String_Node_Str",detailError);
    return false;
  }
  return true;
}
Program: 123584
Project: 123584
Buggy source:
@Override public void start(BundleContext context) throws Exception {
  super.start(context);
  plugin=this;
  registerAllAdapters();
}

Fixed version (ground truth):
@Override public void start(BundleContext context) throws Exception {
  super.start(context);
  plugin=this;
}
Program: 123585
Project: 123585
Buggy source:
@Override protected void doRun(){
  ISelection selection=getSelection();
  Object obj=((IStructuredSelection)selection).getFirstElement();
  RepositoryNode node=(RepositoryNode)obj;
  ERepositoryObjectType objectType=null;
  IPath path=null;
  path=RepositoryNodeUtilities.getPath(node);
  if (RepositoryConstants.isSystemFolder(path.toString())) {
    return;
  }
  objectType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (objectType != null) {
    FolderWizard processWizard=new FolderWizard(path,objectType,null);
    Shell activeShell=Display.getCurrent().getActiveShell();
    WizardDialog dialog=new WizardDialog(activeShell,processWizard);
    dialog.setPageSize(400,60);
    dialog.create();
  }
}

Fixed version (ground truth):
@Override protected void doRun(){
  ISelection selection=getSelection();
  Object obj=((IStructuredSelection)selection).getFirstElement();
  RepositoryNode node=(RepositoryNode)obj;
  ERepositoryObjectType objectType=null;
  IPath path=null;
  path=RepositoryNodeUtilities.getPath(node);
  if (RepositoryConstants.isSystemFolder(path.toString())) {
    return;
  }
  objectType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (objectType != null) {
    FolderWizard processWizard=new FolderWizard(path,objectType,null);
    Shell activeShell=Display.getCurrent().getActiveShell();
    WizardDialog dialog=new WizardDialog(activeShell,processWizard);
    dialog.setPageSize(400,60);
    dialog.create();
    dialog.open();
  }
}
Program: 123586
Project: 123586
Buggy source:
@Override protected void doRun(){
  ISelection selection=getSelection();
  Object obj=((IStructuredSelection)selection).getFirstElement();
  RepositoryNode node=(RepositoryNode)obj;
  String firstChildOpen=getFirstOpenedChild(node);
  if (firstChildOpen != null) {
    MessageDialog.openWarning(new Shell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str",firstChildOpen,node.getProperties(EProperties.LABEL)));
    return;
  }
  ERepositoryObjectType objectType=null;
  IPath path=null;
  path=RepositoryNodeUtilities.getPath(node);
  objectType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (objectType != null) {
    FolderWizard processWizard=new FolderWizard(path,objectType,node.getObject().getLabel());
    Shell activeShell=Display.getCurrent().getActiveShell();
    WizardDialog dialog=new WizardDialog(activeShell,processWizard);
    dialog.setPageSize(400,60);
    dialog.create();
  }
}

Fixed version (ground truth):
@Override protected void doRun(){
  ISelection selection=getSelection();
  Object obj=((IStructuredSelection)selection).getFirstElement();
  RepositoryNode node=(RepositoryNode)obj;
  String firstChildOpen=getFirstOpenedChild(node);
  if (firstChildOpen != null) {
    MessageDialog.openWarning(new Shell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str",firstChildOpen,node.getProperties(EProperties.LABEL)));
    return;
  }
  ERepositoryObjectType objectType=null;
  IPath path=null;
  path=RepositoryNodeUtilities.getPath(node);
  objectType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (objectType != null) {
    FolderWizard processWizard=new FolderWizard(path,objectType,node.getObject().getLabel());
    Shell activeShell=Display.getCurrent().getActiveShell();
    WizardDialog dialog=new WizardDialog(activeShell,processWizard);
    dialog.setPageSize(400,60);
    dialog.create();
    dialog.open();
  }
}
Program: 123588
Project: 123588
Buggy source:
private List<UpdateResult> checkJobletNodeReload(boolean onlySimpleShow){
  if (getProcess() == null || jobletProcessProvider == null) {
    return Collections.emptyList();
  }
  List<UpdateResult> nodeResults=new ArrayList<UpdateResult>();
  for (  INode node : this.getProcess().getGraphicalNodes()) {
    final Item jobletItem=jobletProcessProvider.getJobletItem(node);
    if (jobletItem != null) {
      final Property property=jobletItem.getProperty();
      final String id=property.getId();
      final Date modificationDate=property.getModificationDate();
      boolean isReload=false;
      final Property propertyProcess=this.getProcess().getProperty();
      final Date modificationDateProcess=propertyProcess.getModificationDate();
      if (modificationDate != null && modificationDateProcess != null && !modificationDate.equals(modificationDateProcess) && modificationDate.compareTo(modificationDateProcess) > 0) {
        isReload=true;
      }
      if ((isReload || onlySimpleShow) && !getProcess().getId().equals(id)) {
        List<INode> jobletNodes=findRelatedJobletNode(getProcess(),property.getLabel(),null);
        if (jobletNodes != null && !jobletNodes.isEmpty()) {
          String source=UpdatesConstants.JOBLET + UpdatesConstants.COLON + property.getLabel();
          UpdateCheckResult result=new UpdateCheckResult(jobletNodes);
          result.setResult(EUpdateItemType.RELOAD,EUpdateResult.RELOAD,jobletItem,source);
          result.setJob(getProcess());
          setConfigrationForReadOnlyJob(result);
          nodeResults.add(result);
        }
      }
    }
  }
  return nodeResults;
}

Fixed version (ground truth):
private List<UpdateResult> checkJobletNodeReload(boolean onlySimpleShow){
  if (getProcess() == null || jobletProcessProvider == null) {
    return Collections.emptyList();
  }
  List<UpdateResult> nodeResults=new ArrayList<UpdateResult>();
  for (  INode node : this.getProcess().getGraphicalNodes()) {
    final Item jobletItem=jobletProcessProvider.getJobletItem(node);
    if (jobletItem != null) {
      final Property property=jobletItem.getProperty();
      final String id=property.getId();
      final Date modificationDate=property.getModificationDate();
      final Date oldDate=this.jobletReferenceMap.get(id);
      if (((oldDate != null && !modificationDate.equals(oldDate)) || onlySimpleShow) && !getProcess().getId().equals(id)) {
        List<INode> jobletNodes=findRelatedJobletNode(getProcess(),property.getLabel(),null);
        if (jobletNodes != null && !jobletNodes.isEmpty()) {
          String source=UpdatesConstants.JOBLET + UpdatesConstants.COLON + property.getLabel();
          UpdateCheckResult result=new UpdateCheckResult(jobletNodes);
          result.setResult(EUpdateItemType.RELOAD,EUpdateResult.RELOAD,jobletItem,source);
          result.setJob(getProcess());
          setConfigrationForReadOnlyJob(result);
          nodeResults.add(result);
        }
      }
    }
  }
  return nodeResults;
}
Program: 123589
Project: 123589
Buggy source:
private static void executeUpdate(UpdateResult result,IProgressMonitor monitor){
  if (result.isReadOnlyProcess()) {
    return;
  }
  Command command=null;
switch (result.getUpdateType()) {
case NODE_PROPERTY:
case NODE_SCHEMA:
case NODE_QUERY:
case NODE_SAP_IDOC:
case NODE_SAP_FUNCTION:
case NODE_VALIDATION_RULE:
    command=new UpdateNodeParameterCommand(result);
  break;
case JOB_PROPERTY_EXTRA:
case JOB_PROPERTY_STATS_LOGS:
case JOB_PROPERTY_HEADERFOOTER:
command=new UpdateMainParameterCommand(result);
break;
case CONTEXT:
command=executeContextUpdates(result);
break;
case CONTEXT_GROUP:
command=executeContextGroupUpdates(result);
break;
case JOBLET_RENAMED:
case JOBLET_SCHEMA:
case RELOAD:
command=executeJobletNodesUpdates(result);
break;
case JOBLET_CONTEXT:
command=new Command(){
}
;
break;
default :
break;
}
if (command != null) {
SubProgressMonitor subMonitor=new SubProgressMonitor(monitor,1 * UpdatesConstants.SCALE,SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
subMonitor.beginTask(UpdatesConstants.EMPTY,1);
subMonitor.subTask(getResultTaskInfor(result));
Object job=result.getJob();
boolean executed=false;
if (job != null) {
if (job instanceof IProcess2) {
IProcess2 process=(IProcess2)job;
process.getCommandStack().execute(command);
executed=true;
}
}
if (!executed) {
command.execute();
}
if (result.isFromItem()) {
saveModifiedItem(result);
}
subMonitor.worked(1);
}
}

Fixed version (ground truth):
private static void executeUpdate(UpdateResult result,IProgressMonitor monitor){
  if (result.isReadOnlyProcess()) {
    return;
  }
  Command command=null;
switch (result.getUpdateType()) {
case NODE_PROPERTY:
case NODE_SCHEMA:
case NODE_QUERY:
case NODE_SAP_IDOC:
case NODE_SAP_FUNCTION:
case NODE_VALIDATION_RULE:
    command=new UpdateNodeParameterCommand(result);
  break;
case JOB_PROPERTY_EXTRA:
case JOB_PROPERTY_STATS_LOGS:
case JOB_PROPERTY_HEADERFOOTER:
command=new UpdateMainParameterCommand(result);
break;
case CONTEXT:
command=executeContextUpdates(result);
break;
case CONTEXT_GROUP:
command=executeContextGroupUpdates(result);
break;
case JOBLET_RENAMED:
case JOBLET_SCHEMA:
case RELOAD:
command=executeJobletNodesUpdates(result);
break;
case JOBLET_CONTEXT:
command=new Command(){
}
;
break;
default :
break;
}
if (command != null) {
SubProgressMonitor subMonitor=new SubProgressMonitor(monitor,1 * UpdatesConstants.SCALE,SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
subMonitor.beginTask(UpdatesConstants.EMPTY,1);
subMonitor.subTask(getResultTaskInfor(result));
Object job=result.getJob();
boolean executed=false;
if (job != null) {
if (job instanceof IProcess2) {
IProcess2 process=(IProcess2)job;
process.getCommandStack().execute(command);
executed=true;
}
}
if (!executed) {
command.execute();
}
if (result.isFromItem() || result.getResultType() == EUpdateResult.JOBLET_UPDATE) {
saveModifiedItem(result);
}
subMonitor.worked(1);
}
}
Program: 123591
Project: 123591
Buggy source:
/** 
 * ftang Comment method "getAllVersions".
 * @return
 */
public static String[] getAllVersions(RepositoryNode repositoryNode){
  List<String> versionList=new ArrayList<String>();
  try {
    List<IRepositoryViewObject> allVersion=ProxyRepositoryFactory.getInstance().getAllVersion(repositoryNode.getRoot().getProject(),repositoryNode.getId(),false);
    for (    IRepositoryViewObject repositoryObject : allVersion) {
      versionList.add(repositoryObject.getVersion());
    }
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
  return versionList.toArray(new String[versionList.size()]);
}

Fixed version (ground truth):
/** 
 * ftang Comment method "getAllVersions".
 * @return
 */
public static String[] getAllVersions(RepositoryNode repositoryNode){
  List<String> versionList=new ArrayList<String>();
  String nodeID="String_Node_Str";
  if (repositoryNode.getObject() != null && !repositoryNode.getObject().getRepositoryObjectType().equals(ERepositoryObjectType.FOLDER)) {
    nodeID=repositoryNode.getId();
  }
 else {
    nodeID=getCurrentID(repositoryNode);
  }
  try {
    List<IRepositoryViewObject> allVersion=ProxyRepositoryFactory.getInstance().getAllVersion(repositoryNode.getRoot().getProject(),nodeID,false);
    for (    IRepositoryViewObject repositoryObject : allVersion) {
      versionList.add(repositoryObject.getVersion());
    }
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
  return versionList.toArray(new String[versionList.size()]);
}
Program: 123592
Project: 123592
Buggy source:
/** 
 * ftang Comment method "getCurrentJobVersion".
 * @return
 */
public static String getCurrentVersion(RepositoryNode repositoryNode){
  try {
    List<IRepositoryNode> nodeChildren=repositoryNode.getChildren();
    if ("String_Node_Str".equals(repositoryNode.getObject().getRepositoryObjectType() + "String_Node_Str") || ("String_Node_Str".equals(repositoryNode.getId()) && nodeChildren != null) && (nodeChildren.size() == 1)) {
      return ProxyRepositoryFactory.getInstance().getLastVersion(nodeChildren.get(0).getId()).getVersion();
    }
 else {
      return ProxyRepositoryFactory.getInstance().getLastVersion(repositoryNode.getId()).getVersion();
    }
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * ftang Comment method "getCurrentJobVersion".
 * @return
 */
public static String getCurrentVersion(RepositoryNode repositoryNode){
  try {
    if (repositoryNode.getObject() != null && !repositoryNode.getObject().getRepositoryObjectType().equals(ERepositoryObjectType.FOLDER)) {
      return ProxyRepositoryFactory.getInstance().getLastVersion(repositoryNode.getId()).getVersion();
    }
    List<IRepositoryNode> nodeChildren=repositoryNode.getChildren();
    if (nodeChildren != null) {
      for (      IRepositoryNode node : nodeChildren) {
        if (node.getObject() != null && node.getObject().getRepositoryObjectType().equals(ERepositoryObjectType.FOLDER)) {
          String currentVersion=getCurrentVersion((RepositoryNode)node);
          if (currentVersion != null && !"String_Node_Str".equals(currentVersion)) {
            return currentVersion;
          }
        }
 else {
          if (node.getObject() != null) {
            return ProxyRepositoryFactory.getInstance().getLastVersion(node.getId()).getVersion();
          }
        }
      }
    }
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
  return "String_Node_Str";
}
Program: 123593
Project: 123593
Buggy source:
/** 
 * ftang Comment method "getAllVersions".
 * @return
 */
public static String[] getAllVersions(RepositoryNode repositoryNode){
  List<String> versionList=new ArrayList<String>();
  try {
    List<IRepositoryViewObject> allVersion=ProxyRepositoryFactory.getInstance().getAllVersion(repositoryNode.getRoot().getProject(),repositoryNode.getId(),false);
    for (    IRepositoryViewObject repositoryObject : allVersion) {
      versionList.add(repositoryObject.getVersion());
    }
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
  return versionList.toArray(new String[versionList.size()]);
}

Fixed version (ground truth):
/** 
 * ftang Comment method "getAllVersions".
 * @return
 */
public static String[] getAllVersions(RepositoryNode repositoryNode){
  List<String> versionList=new ArrayList<String>();
  String nodeID="String_Node_Str";
  if (repositoryNode.getObject() != null && !repositoryNode.getObject().getRepositoryObjectType().equals(ERepositoryObjectType.FOLDER)) {
    nodeID=repositoryNode.getId();
  }
 else {
    nodeID=getCurrentID(repositoryNode);
  }
  try {
    List<IRepositoryViewObject> allVersion=ProxyRepositoryFactory.getInstance().getAllVersion(repositoryNode.getRoot().getProject(),nodeID,false);
    for (    IRepositoryViewObject repositoryObject : allVersion) {
      versionList.add(repositoryObject.getVersion());
    }
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
  return versionList.toArray(new String[versionList.size()]);
}
Program: 123594
Project: 123594
Buggy source:
/** 
 * ftang Comment method "getCurrentJobVersion".
 * @return
 */
public static String getCurrentVersion(RepositoryNode repositoryNode){
  try {
    List<IRepositoryNode> nodeChildren=repositoryNode.getChildren();
    if ("String_Node_Str".equals(repositoryNode.getObject().getRepositoryObjectType() + "String_Node_Str") || ("String_Node_Str".equals(repositoryNode.getId()) && nodeChildren != null) && (nodeChildren.size() == 1)) {
      return ProxyRepositoryFactory.getInstance().getLastVersion(nodeChildren.get(0).getId()).getVersion();
    }
 else {
      return ProxyRepositoryFactory.getInstance().getLastVersion(repositoryNode.getId()).getVersion();
    }
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * ftang Comment method "getCurrentJobVersion".
 * @return
 */
public static String getCurrentVersion(RepositoryNode repositoryNode){
  try {
    if (repositoryNode.getObject() != null && !repositoryNode.getObject().getRepositoryObjectType().equals(ERepositoryObjectType.FOLDER)) {
      return ProxyRepositoryFactory.getInstance().getLastVersion(repositoryNode.getId()).getVersion();
    }
    List<IRepositoryNode> nodeChildren=repositoryNode.getChildren();
    if (nodeChildren != null) {
      for (      IRepositoryNode node : nodeChildren) {
        if (node.getObject() != null && node.getObject().getRepositoryObjectType().equals(ERepositoryObjectType.FOLDER)) {
          String currentVersion=getCurrentVersion((RepositoryNode)node);
          if (currentVersion != null && !"String_Node_Str".equals(currentVersion)) {
            return currentVersion;
          }
        }
 else {
          if (node.getObject() != null) {
            return ProxyRepositoryFactory.getInstance().getLastVersion(node.getId()).getVersion();
          }
        }
      }
    }
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
  return "String_Node_Str";
}
Program: 123595
Project: 123595
Buggy source:
private List<UpdateResult> checkJobletNodeReload(boolean onlySimpleShow){
  if (getProcess() == null || jobletProcessProvider == null) {
    return Collections.emptyList();
  }
  List<UpdateResult> nodeResults=new ArrayList<UpdateResult>();
  for (  INode node : this.getProcess().getGraphicalNodes()) {
    final Item jobletItem=jobletProcessProvider.getJobletItem(node);
    if (jobletItem != null) {
      final Property property=jobletItem.getProperty();
      final String id=property.getId();
      final Date modificationDate=property.getModificationDate();
      boolean isReload=false;
      final Property propertyProcess=this.getProcess().getProperty();
      final Date modificationDateProcess=propertyProcess.getModificationDate();
      if (modificationDate != null && modificationDateProcess != null && !modificationDate.equals(modificationDateProcess) && modificationDate.compareTo(modificationDateProcess) > 0) {
        isReload=true;
      }
      if ((isReload || onlySimpleShow) && !getProcess().getId().equals(id)) {
        List<INode> jobletNodes=findRelatedJobletNode(getProcess(),property.getLabel(),null);
        if (jobletNodes != null && !jobletNodes.isEmpty()) {
          String source=UpdatesConstants.JOBLET + UpdatesConstants.COLON + property.getLabel();
          UpdateCheckResult result=new UpdateCheckResult(jobletNodes);
          result.setResult(EUpdateItemType.RELOAD,EUpdateResult.RELOAD,jobletItem,source);
          result.setJob(getProcess());
          setConfigrationForReadOnlyJob(result);
          nodeResults.add(result);
        }
      }
    }
  }
  return nodeResults;
}

Fixed version (ground truth):
private List<UpdateResult> checkJobletNodeReload(boolean onlySimpleShow){
  if (getProcess() == null || jobletProcessProvider == null) {
    return Collections.emptyList();
  }
  List<UpdateResult> nodeResults=new ArrayList<UpdateResult>();
  for (  INode node : this.getProcess().getGraphicalNodes()) {
    final Item jobletItem=jobletProcessProvider.getJobletItem(node);
    if (jobletItem != null) {
      final Property property=jobletItem.getProperty();
      final String id=property.getId();
      final Date modificationDate=property.getModificationDate();
      final Date oldDate=this.jobletReferenceMap.get(id);
      if (((oldDate != null && !modificationDate.equals(oldDate)) || onlySimpleShow) && !getProcess().getId().equals(id)) {
        List<INode> jobletNodes=findRelatedJobletNode(getProcess(),property.getLabel(),null);
        if (jobletNodes != null && !jobletNodes.isEmpty()) {
          String source=UpdatesConstants.JOBLET + UpdatesConstants.COLON + property.getLabel();
          UpdateCheckResult result=new UpdateCheckResult(jobletNodes);
          result.setResult(EUpdateItemType.RELOAD,EUpdateResult.RELOAD,jobletItem,source);
          result.setJob(getProcess());
          setConfigrationForReadOnlyJob(result);
          nodeResults.add(result);
        }
      }
    }
  }
  return nodeResults;
}