nus-yam/ex-repair huggingface dataset:
Program: 122816
Project: 122816
Buggy source:
public Command createCommand(Button button){
  IElementParameter elementParameter=this.curParameter.getElement().getElementParameter("String_Node_Str");
  Command command=null;
  if (elementParameter != null) {
    String filePath=new Path(PathExtractor.extractPath(elementParameter.getValue().toString())).toOSString();
    if (filePath != null && new File(filePath).exists()) {
      TnsEditorDialog tnsDialog=new TnsEditorDialog(composite.getShell(),new File(filePath));
      if (tnsDialog.open() == Window.OK) {
        TnsInfo tnsInfo=tnsDialog.getTnsInfo();
        command=new TnsPropertyCommand(tnsInfo,this.elem);
      }
    }
 else {
      MessageBox mBox=new MessageBox(composite.getShell(),SWT.ICON_ERROR);
      mBox.setText("String_Node_Str");
      mBox.setMessage("String_Node_Str");
      mBox.open();
    }
  }
  return command;
}

Fixed version (ground truth):
public Command createCommand(Button button){
  IElementParameter elementParameter=this.curParameter.getElement().getElementParameter("String_Node_Str");
  Command command=null;
  if (elementParameter != null) {
    String filePath=new Path(PathExtractor.extractPath(elementParameter.getValue().toString())).toOSString();
    if (filePath != null && new File(filePath).exists()) {
      boolean flag=false;
      try {
        TnsParser tnsparser=new TnsParser(new File(filePath));
        if (tnsparser.getTree().getChildren().size() == 0) {
          flag=true;
        }
      }
 catch (      Exception e) {
        flag=true;
      }
      if (flag) {
        Display.getDefault().syncExec(new Runnable(){
          @Override public void run(){
            MessageDialog.openInformation(composite.getShell(),"String_Node_Str","String_Node_Str");
          }
        }
);
      }
 else {
        TnsEditorDialog tnsDialog=new TnsEditorDialog(composite.getShell(),new File(filePath));
        if (tnsDialog.open() == Window.OK) {
          TnsInfo tnsInfo=tnsDialog.getTnsInfo();
          command=new TnsPropertyCommand(tnsInfo,this.elem);
        }
      }
    }
 else {
      MessageBox mBox=new MessageBox(composite.getShell(),SWT.ICON_ERROR);
      mBox.setText("String_Node_Str");
      mBox.setMessage("String_Node_Str");
      mBox.open();
    }
  }
  return command;
}
Program: 122817
Project: 122817
Buggy source:
@Override protected Control createDialogArea(Composite parent){
  TnsParser tnsparser=new TnsParser(tnsFile);
  treeViewer=new TreeViewer(parent);
  Tree tree=treeViewer.getTree();
  tree.setHeaderVisible(true);
  tree.setLinesVisible(true);
  GridData layoutData=new GridData(GridData.FILL_BOTH);
  layoutData.heightHint=400;
  layoutData.widthHint=300;
  tree.setLayoutData(layoutData);
  TreeColumn column1st=new TreeColumn(tree,SWT.NONE);
  column1st.setText(Messages.getString("String_Node_Str"));
  column1st.setWidth(200);
  TreeColumn column2nd=new TreeColumn(tree,SWT.NONE);
  column2nd.setText(Messages.getString("String_Node_Str"));
  column2nd.setWidth(200);
  treeViewer.setContentProvider(new TnsContentProvider());
  treeViewer.setLabelProvider(new TnsTableProvider());
  treeViewer.setInput(tnsparser.getTree());
  treeViewer.expandAll();
  treeViewer.addDoubleClickListener(new IDoubleClickListener(){
    public void doubleClick(    DoubleClickEvent event){
      okPressed();
    }
  }
);
  if (tnsparser.getTree().getChildren().size() == 0) {
    MessageDialog.openInformation(getParentShell(),"String_Node_Str","String_Node_Str");
  }
  return tree;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(Composite parent){
  TnsParser tnsparser=new TnsParser(tnsFile);
  treeViewer=new TreeViewer(parent);
  Tree tree=treeViewer.getTree();
  tree.setHeaderVisible(true);
  tree.setLinesVisible(true);
  GridData layoutData=new GridData(GridData.FILL_BOTH);
  layoutData.heightHint=400;
  layoutData.widthHint=300;
  tree.setLayoutData(layoutData);
  TreeColumn column1st=new TreeColumn(tree,SWT.NONE);
  column1st.setText(Messages.getString("String_Node_Str"));
  column1st.setWidth(200);
  TreeColumn column2nd=new TreeColumn(tree,SWT.NONE);
  column2nd.setText(Messages.getString("String_Node_Str"));
  column2nd.setWidth(200);
  treeViewer.setContentProvider(new TnsContentProvider());
  treeViewer.setLabelProvider(new TnsTableProvider());
  treeViewer.setInput(tnsparser.getTree());
  treeViewer.expandAll();
  treeViewer.addDoubleClickListener(new IDoubleClickListener(){
    public void doubleClick(    DoubleClickEvent event){
      okPressed();
    }
  }
);
  return tree;
}
Program: 122819
Project: 122819
Buggy source:
public boolean isStart(){
  return false;
}

Fixed version (ground truth):
@Override public boolean isStart(){
  return false;
}
Program: 122820
Project: 122820
Buggy source:
public boolean isThereLinkWithHash(){
  return false;
}

Fixed version (ground truth):
@Override public boolean isThereLinkWithHash(){
  return false;
}
Program: 122821
Project: 122821
Buggy source:
public void setActivateSubjob(Node node,boolean active,boolean oneComponent){
  setActivate(false);
  setActivateSubjob(node,active,node,oneComponent);
  setActivate(true);
}

Fixed version (ground truth):
public void setActivateSubjob(Node node,boolean active,boolean oneComponent){
  setActivate(false);
  List chekedNodes=new ArrayList();
  setActivateSubjob(node,active,node,oneComponent,chekedNodes);
  setActivate(true);
}
Program: 122822
Project: 122822
Buggy source:
public void dragEnter(DropTargetEvent event){
}

Fixed version (ground truth):
@Override public void dragEnter(DropTargetEvent event){
}
Program: 122824
Project: 122824
Buggy source:
protected Control createContents(Composite parent){
  Control control=super.createContents(parent);
  getTableViewer().getTable().showSelection();
  return control;
}

Fixed version (ground truth):
@Override protected Control createContents(Composite parent){
  Control control=super.createContents(parent);
  getTableViewer().getTable().showSelection();
  return control;
}
Program: 122828
Project: 122828
Buggy source:
public boolean isEnabled(DropTargetEvent e){
  if (PluginChecker.isCDCPluginLoaded()) {
    ICDCProviderService service=(ICDCProviderService)GlobalServiceRegister.getDefault().getService(ICDCProviderService.class);
    Object obj=getSelection().getFirstElement();
    if (obj instanceof RepositoryNode) {
      RepositoryNode sourceNode=(RepositoryNode)obj;
      if (service != null && (service.isSubscriberTableNode(sourceNode) || service.isSystemSubscriberTable(sourceNode))) {
        return false;
      }
    }
  }
  return !this.editor.getProcess().isReadOnly();
}

Fixed version (ground truth):
@Override public boolean isEnabled(DropTargetEvent e){
  if (PluginChecker.isCDCPluginLoaded()) {
    ICDCProviderService service=(ICDCProviderService)GlobalServiceRegister.getDefault().getService(ICDCProviderService.class);
    Object obj=getSelection().getFirstElement();
    if (obj instanceof RepositoryNode) {
      RepositoryNode sourceNode=(RepositoryNode)obj;
      if (service != null && (service.isSubscriberTableNode(sourceNode) || service.isSystemSubscriberTable(sourceNode))) {
        return false;
      }
    }
  }
  return !this.editor.getProcess().isReadOnly();
}
Program: 122829
Project: 122829
Buggy source:
public void dragLeave(DropTargetEvent event){
}

Fixed version (ground truth):
@Override public void dragLeave(DropTargetEvent event){
}
Program: 122830
Project: 122830
Buggy source:
public void dropAccept(DropTargetEvent event){
}

Fixed version (ground truth):
@Override public void dropAccept(DropTargetEvent event){
}
Program: 122832
Project: 122832
Buggy source:
public void dragOperationChanged(DropTargetEvent event){
}

Fixed version (ground truth):
@Override public void dragOperationChanged(DropTargetEvent event){
}
Program: 122835
Project: 122835
Buggy source:
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  final EventLoopProgressMonitor progressMonitor=new EventLoopProgressMonitor(monitor);
  progressMonitor.beginTask(Messages.getString("String_Node_Str"),IProgressMonitor.UNKNOWN);
  if (nodes != null && nodes.size() > 0) {
    int size=nodes.size();
    if (size == 1) {
      if (jobVersion != null && jobVersion.equals(JobScriptsExportWizardPage.ALL_VERSIONS)) {
        String[] allVersions=JobVersionUtils.getAllVersions(nodes.get(0));
        for (        String version : allVersions) {
          monitor.subTask(Messages.getString("String_Node_Str",nodes.get(0).getLabel(),version));
          if (!exportJobScript(nodes,version,bundleVersion,progressMonitor)) {
            return;
          }
        }
      }
 else {
        if (!exportJobScript(nodes,jobVersion,bundleVersion,progressMonitor)) {
          return;
        }
        monitor.subTask(Messages.getString("String_Node_Str",nodes.get(0).getLabel(),jobVersion));
      }
    }
 else     if (size > 1) {
      if (!exportJobScript(nodes,jobVersion,bundleVersion,progressMonitor)) {
        return;
      }
      monitor.subTask(Messages.getString("String_Node_Str"));
    }
  }
  progressMonitor.done();
}

Fixed version (ground truth):
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  try {
    final EventLoopProgressMonitor progressMonitor=new EventLoopProgressMonitor(monitor);
    progressMonitor.beginTask(Messages.getString("String_Node_Str"),IProgressMonitor.UNKNOWN);
    if (nodes != null && nodes.size() > 0) {
      int size=nodes.size();
      if (size == 1) {
        if (jobVersion != null && jobVersion.equals(JobScriptsExportWizardPage.ALL_VERSIONS)) {
          String[] allVersions=JobVersionUtils.getAllVersions(nodes.get(0));
          for (          String version : allVersions) {
            monitor.subTask(Messages.getString("String_Node_Str",nodes.get(0).getLabel(),version));
            if (!exportJobScript(nodes,version,bundleVersion,progressMonitor)) {
              return;
            }
          }
        }
 else {
          if (!exportJobScript(nodes,jobVersion,bundleVersion,progressMonitor)) {
            return;
          }
          monitor.subTask(Messages.getString("String_Node_Str",nodes.get(0).getLabel(),jobVersion));
        }
      }
 else       if (size > 1) {
        if (!exportJobScript(nodes,jobVersion,bundleVersion,progressMonitor)) {
          return;
        }
        monitor.subTask(Messages.getString("String_Node_Str"));
      }
    }
    progressMonitor.done();
  }
  finally {
    ProcessorUtilities.resetExportConfig();
  }
}
Program: 122836
Project: 122836
Buggy source:
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  final EventLoopProgressMonitor progressMonitor=new EventLoopProgressMonitor(monitor);
  progressMonitor.beginTask(Messages.getString("String_Node_Str",type),IProgressMonitor.UNKNOWN);
  if (nodes != null && nodes.size() > 0) {
    int size=nodes.size();
    if (size == 1) {
      if (jobVersion != null && jobVersion.equals(JobScriptsExportWizardPage.ALL_VERSIONS)) {
        String[] allVersions=JobVersionUtils.getAllVersions(nodes.get(0));
        for (        String version : allVersions) {
          monitor.subTask(Messages.getString("String_Node_Str",type,nodes.get(0).getLabel(),version));
          if (!exportJobScript(nodes,version,bundleVersion,progressMonitor)) {
            return;
          }
        }
      }
 else {
        if (!exportJobScript(nodes,jobVersion,bundleVersion,progressMonitor)) {
          return;
        }
        monitor.subTask(Messages.getString("String_Node_Str",type,nodes.get(0).getLabel(),jobVersion));
      }
    }
 else     if (size > 1) {
      if (!exportJobScript(nodes,jobVersion,bundleVersion,progressMonitor)) {
        return;
      }
      monitor.subTask(Messages.getString("String_Node_Str","String_Node_Str"));
    }
  }
  progressMonitor.done();
}

Fixed version (ground truth):
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  try {
    final EventLoopProgressMonitor progressMonitor=new EventLoopProgressMonitor(monitor);
    progressMonitor.beginTask(Messages.getString("String_Node_Str",type),IProgressMonitor.UNKNOWN);
    if (nodes != null && nodes.size() > 0) {
      int size=nodes.size();
      if (size == 1) {
        if (jobVersion != null && jobVersion.equals(JobScriptsExportWizardPage.ALL_VERSIONS)) {
          String[] allVersions=JobVersionUtils.getAllVersions(nodes.get(0));
          for (          String version : allVersions) {
            monitor.subTask(Messages.getString("String_Node_Str",type,nodes.get(0).getLabel(),version));
            if (!exportJobScript(nodes,version,bundleVersion,progressMonitor)) {
              return;
            }
          }
        }
 else {
          if (!exportJobScript(nodes,jobVersion,bundleVersion,progressMonitor)) {
            return;
          }
          monitor.subTask(Messages.getString("String_Node_Str",type,nodes.get(0).getLabel(),jobVersion));
        }
      }
 else       if (size > 1) {
        if (!exportJobScript(nodes,jobVersion,bundleVersion,progressMonitor)) {
          return;
        }
        monitor.subTask(Messages.getString("String_Node_Str","String_Node_Str"));
      }
    }
    progressMonitor.done();
  }
  finally {
    ProcessorUtilities.resetExportConfig();
  }
}
Program: 122837
Project: 122837
Buggy source:
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  final EventLoopProgressMonitor progressMonitor=new EventLoopProgressMonitor(monitor);
  progressMonitor.beginTask(Messages.getString("String_Node_Str",type),IProgressMonitor.UNKNOWN);
  if (nodes != null && nodes.size() > 0) {
    int size=nodes.size();
    if (size == 1) {
      if (jobVersion != null && jobVersion.equals(JobScriptsExportWizardPage.ALL_VERSIONS)) {
        String[] allVersions=JobVersionUtils.getAllVersions(nodes.get(0));
        for (        String version : allVersions) {
          monitor.subTask(Messages.getString("String_Node_Str",type,nodes.get(0).getLabel(),version));
          if (!exportJobScript(nodes,version,bundleVersion,progressMonitor)) {
            return;
          }
        }
      }
 else {
        if (!exportJobScript(nodes,jobVersion,bundleVersion,progressMonitor)) {
          return;
        }
        monitor.subTask(Messages.getString("String_Node_Str",type,nodes.get(0).getLabel(),jobVersion));
      }
    }
 else     if (size > 1) {
      if (!exportJobScript(nodes,jobVersion,bundleVersion,progressMonitor)) {
        return;
      }
      monitor.subTask(Messages.getString("String_Node_Str","String_Node_Str"));
    }
  }
  progressMonitor.done();
}

Fixed version (ground truth):
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  try {
    final EventLoopProgressMonitor progressMonitor=new EventLoopProgressMonitor(monitor);
    progressMonitor.beginTask(Messages.getString("String_Node_Str",type),IProgressMonitor.UNKNOWN);
    if (nodes != null && nodes.size() > 0) {
      int size=nodes.size();
      if (size == 1) {
        if (jobVersion != null && jobVersion.equals(JobScriptsExportWizardPage.ALL_VERSIONS)) {
          String[] allVersions=JobVersionUtils.getAllVersions(nodes.get(0));
          for (          String version : allVersions) {
            monitor.subTask(Messages.getString("String_Node_Str",type,nodes.get(0).getLabel(),version));
            if (!exportJobScript(nodes,version,bundleVersion,progressMonitor)) {
              return;
            }
          }
        }
 else {
          if (!exportJobScript(nodes,jobVersion,bundleVersion,progressMonitor)) {
            return;
          }
          monitor.subTask(Messages.getString("String_Node_Str",type,nodes.get(0).getLabel(),jobVersion));
        }
      }
 else       if (size > 1) {
        if (!exportJobScript(nodes,jobVersion,bundleVersion,progressMonitor)) {
          return;
        }
        monitor.subTask(Messages.getString("String_Node_Str","String_Node_Str"));
      }
    }
    progressMonitor.done();
  }
  finally {
    ProcessorUtilities.resetExportConfig();
  }
}
Program: 122840
Project: 122840
Buggy source:
private void addButtons(Composite middleComposite){
  Composite btnComposite=new Composite(middleComposite,SWT.NONE);
  btnComposite.setLayout(new GridLayout(1,true));
  GridData data=new GridData(GridData.FILL_BOTH);
  data.verticalAlignment=GridData.CENTER;
  btnComposite.setLayoutData(data);
  removeBtn=new Button(btnComposite,SWT.NONE);
  removeBtn.setImage(ImageProvider.getImage(EImage.LEFT_ICON));
  removeBtn.setToolTipText(Messages.getString("String_Node_Str"));
  removeBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      TableItem[] selections=itemTable.getSelection();
      itemTable.setRedraw(false);
      for (      TableItem item : selections) {
        Object data=item.getData();
        checkedObjects.remove(data);
        removeTableItem(item);
      }
      itemTable.setRedraw(true);
      refreshCheckedTreeView();
      refreshTableItems();
    }
  }
);
  removeBtn.setEnabled(false);
}

Fixed version (ground truth):
private void addButtons(Composite middleComposite){
  Composite btnComposite=new Composite(middleComposite,SWT.NONE);
  btnComposite.setLayout(new GridLayout(1,true));
  GridData data=new GridData(GridData.FILL_BOTH);
  data.verticalAlignment=GridData.CENTER;
  btnComposite.setLayoutData(data);
  removeBtn=new Button(btnComposite,SWT.NONE);
  removeBtn.setImage(ImageProvider.getImage(EImage.LEFT_ICON));
  removeBtn.setToolTipText(Messages.getString("String_Node_Str"));
  removeBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      TableItem[] selections=itemTable.getSelection();
      itemTable.setRedraw(false);
      for (      TableItem item : selections) {
        Object data=item.getData();
        checkedObjects.remove(data);
        removeTableItem(item);
      }
      itemTable.setRedraw(true);
      refreshCheckedTreeView();
      refreshTableItems();
      checkButtonsState(false);
    }
  }
);
  removeBtn.setEnabled(false);
}
Program: 122841
Project: 122841
Buggy source:
private void checkButtonsState(){
  TableItem[] selections=itemTable.getSelection();
  if (selections != null && selections.length > 0) {
    removeBtn.setEnabled(true);
  }
 else {
    removeBtn.setEnabled(false);
  }
}

Fixed version (ground truth):
private void checkButtonsState(boolean isEnable){
  boolean flag=isEnable;
  TableItem[] items=itemTable.getItems();
  for (  TableItem item : items) {
    if (item.getData() instanceof ItemVersionObject) {
      ItemVersionObject itemVersionObj=(ItemVersionObject)item.getData();
      RepositoryNode repositoryNode=itemVersionObj.getRepositoryNode();
      if (repositoryNode != null && (ERepositoryObjectType.PROCESS).equals(repositoryNode.getContentType())) {
        flag=true;
      }
    }
  }
  alldependcies.setEnabled(flag);
  subjobs.setEnabled(flag);
}
Program: 122842
Project: 122842
Buggy source:
@Override public void mouseDown(MouseEvent e){
  checkedObjects.remove(object);
  removeTableItem(tableItem);
  refreshCheckedTreeView();
  checkButtonsState();
}

Fixed version (ground truth):
@Override public void mouseDown(MouseEvent e){
  checkedObjects.remove(object);
  removeTableItem(tableItem);
  refreshCheckedTreeView();
  checkButtonsState();
  checkButtonsState(false);
}
Program: 122846
Project: 122846
Buggy source:
public void checkStateChanged(CheckStateChangedEvent event){
  RepositoryNode node=(RepositoryNode)event.getElement();
  List<ItemVersionObject> objects=new ArrayList<ItemVersionObject>();
  processItems(objects,node);
  if (!objects.isEmpty()) {
    if (event.getChecked()) {
      checkedObjects.addAll(objects);
    }
 else {
      checkedObjects.removeAll(objects);
      removeItemElements(objects);
    }
    researchMaxVersion();
    refreshTableItems();
  }
}

Fixed version (ground truth):
public void checkStateChanged(CheckStateChangedEvent event){
  RepositoryNode node=(RepositoryNode)event.getElement();
  List<ItemVersionObject> objects=new ArrayList<ItemVersionObject>();
  processItems(objects,node);
  if (!objects.isEmpty()) {
    if (event.getChecked()) {
      checkedObjects.addAll(objects);
    }
 else {
      checkedObjects.removeAll(objects);
      removeItemElements(objects);
    }
    if (node != null && (ERepositoryObjectType.PROCESS).equals(node.getContentType())) {
      boolean isEnable=false;
      if (event.getChecked()) {
        isEnable=true;
      }
      checkButtonsState(isEnable);
    }
    researchMaxVersion();
    refreshTableItems();
  }
}
Program: 122849
Project: 122849
Buggy source:
@Override public void handleEvent(Event e){
  super.handleEvent(e);
  Widget source=e.widget;
  if (source instanceof Combo) {
    String destination=((Combo)source).getText();
    if (getDialogSettings() != null) {
      IDialogSettings section=getDialogSettings().getSection(DESTINATION_FILE);
      if (section == null) {
        section=getDialogSettings().addNewSection(DESTINATION_FILE);
      }
      section.put(DESTINATION_FILE,destination);
    }
  }
}

Fixed version (ground truth):
@Override public void handleEvent(Event e){
  super.handleEvent(e);
  Widget source=e.widget;
  if (source instanceof Combo) {
    String destination=((Combo)source).getText();
    if (getDialogSettings() != null) {
      IDialogSettings section=getDialogSettings().getSection(DESTINATION_FILE);
      if (section == null) {
        section=getDialogSettings().addNewSection(DESTINATION_FILE);
      }
      section.put(DESTINATION_FILE,destination);
    }
    if (destination != null) {
      if (!destination.endsWith(getOutputSuffix())) {
        destination+=getOutputSuffix();
      }
      saDestinationFilePath=destination;
    }
  }
}
Program: 122850
Project: 122850
Buggy source:
protected ExportTreeViewer getExportTree(){
  return new ExportTreeViewer(selection,this){
    @Override protected void checkSelection(){
      checkExport();
    }
  }
;
}

Fixed version (ground truth):
@Override protected ExportTreeViewer getExportTree(){
  return new ExportTreeViewer(selection,this){
    @Override protected void checkSelection(){
      checkExport();
    }
  }
;
}
Program: 122854
Project: 122854
Buggy source:
protected void restoreWidgetValuesForPetalsESB(){
  IDialogSettings settings=getDialogSettings();
  if (settings != null) {
    String[] directoryNames=settings.getArray(STORE_DESTINATION_NAMES_ID);
    String saName=getPetalsDefaultSaName();
    if (directoryNames != null && directoryNames.length > 0) {
      for (int i=0; i < directoryNames.length; i++) {
        if (directoryNames[i].toLowerCase().endsWith("String_Node_Str")) {
          directoryNames[i]=(directoryNames[i].charAt(0) + "String_Node_Str").toUpperCase() + directoryNames[i].substring(1);
          addDestinationItem(directoryNames[i]);
        }
      }
      File file=new File(directoryNames[0]);
      File dest=new File(file.getParentFile(),saName);
      setDestinationValue(dest.getAbsolutePath());
    }
 else {
      String userDir=System.getProperty("String_Node_Str");
      IPath path=new Path(userDir).append(saName);
      setDestinationValue(path.toOSString());
    }
    saDestinationFilePath=this.getDestinationValue();
    sourceButton.setSelection(settings.getBoolean(STORE_SOURCE_ID));
    userRoutineButton.setSelection(settings.getBoolean(STORE_USER_ROUTINE_ID));
    zipOption="String_Node_Str";
  }
  if (getProcessItem() != null) {
    List<String> contextNames=getJobContexts(getProcessItem());
    contextCombo.setItems(contextNames.toArray(new String[contextNames.size()]));
    contextCombo.setVisibleItemCount(contextNames.size());
    if (contextNames.size() > 0)     contextCombo.select(0);
  }
}

Fixed version (ground truth):
protected void restoreWidgetValuesForPetalsESB(){
  IDialogSettings settings=getDialogSettings();
  if (settings != null) {
    String[] directoryNames=settings.getArray(STORE_DESTINATION_NAMES_ID);
    String saName=getPetalsDefaultSaName();
    if (directoryNames != null && directoryNames.length > 0) {
      for (int i=0; i < directoryNames.length; i++) {
        if (directoryNames[i].toLowerCase().endsWith("String_Node_Str")) {
          directoryNames[i]=(directoryNames[i].charAt(0) + "String_Node_Str").toUpperCase() + directoryNames[i].substring(1);
          addDestinationItem(directoryNames[i]);
        }
      }
      File file=new File(directoryNames[0]);
      File dest=new File(file.getParentFile(),saName);
      setDestinationValue(dest.getAbsolutePath());
    }
 else {
      String userDir=System.getProperty("String_Node_Str");
      IPath path=new Path(userDir).append(saName);
      setDestinationValue(path.toOSString());
    }
    saDestinationFilePath=this.getDestinationValue();
    sourceButton.setSelection(settings.getBoolean(STORE_SOURCE_ID));
    userRoutineButton.setSelection(settings.getBoolean(STORE_USER_ROUTINE_ID));
    zipOption="String_Node_Str";
  }
  if (getProcessItem() != null) {
    List<String> contextNames=getJobContexts(getProcessItem());
    contextCombo.setItems(contextNames.toArray(new String[contextNames.size()]));
    contextCombo.setVisibleItemCount(contextNames.size());
    if (contextNames.size() > 0) {
      contextCombo.select(0);
    }
  }
}
Program: 122856
Project: 122856
Buggy source:
@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]);
    }
  }
}

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 (    String directoryName : directoryNames) {
      addDestinationItem(directoryName);
    }
  }
}
Program: 122858
Project: 122858
Buggy source:
private void addButtons(Composite middleComposite){
  Composite btnComposite=new Composite(middleComposite,SWT.NONE);
  btnComposite.setLayout(new GridLayout(1,true));
  GridData data=new GridData(GridData.FILL_BOTH);
  data.verticalAlignment=GridData.CENTER;
  btnComposite.setLayoutData(data);
  removeBtn=new Button(btnComposite,SWT.NONE);
  removeBtn.setImage(ImageProvider.getImage(EImage.LEFT_ICON));
  removeBtn.setToolTipText(Messages.getString("String_Node_Str"));
  removeBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      TableItem[] selections=itemTable.getSelection();
      itemTable.setRedraw(false);
      for (      TableItem item : selections) {
        Object data=item.getData();
        checkedObjects.remove(data);
        removeTableItem(item);
      }
      itemTable.setRedraw(true);
      refreshCheckedTreeView();
      refreshTableItems();
    }
  }
);
  removeBtn.setEnabled(false);
}

Fixed version (ground truth):
private void addButtons(Composite middleComposite){
  Composite btnComposite=new Composite(middleComposite,SWT.NONE);
  btnComposite.setLayout(new GridLayout(1,true));
  GridData data=new GridData(GridData.FILL_BOTH);
  data.verticalAlignment=GridData.CENTER;
  btnComposite.setLayoutData(data);
  removeBtn=new Button(btnComposite,SWT.NONE);
  removeBtn.setImage(ImageProvider.getImage(EImage.LEFT_ICON));
  removeBtn.setToolTipText(Messages.getString("String_Node_Str"));
  removeBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      TableItem[] selections=itemTable.getSelection();
      itemTable.setRedraw(false);
      for (      TableItem item : selections) {
        Object data=item.getData();
        checkedObjects.remove(data);
        removeTableItem(item);
      }
      itemTable.setRedraw(true);
      refreshCheckedTreeView();
      refreshTableItems();
      checkButtonsState(false);
    }
  }
);
  removeBtn.setEnabled(false);
}
Program: 122859
Project: 122859
Buggy source:
private void checkButtonsState(){
  TableItem[] selections=itemTable.getSelection();
  if (selections != null && selections.length > 0) {
    removeBtn.setEnabled(true);
  }
 else {
    removeBtn.setEnabled(false);
  }
}

Fixed version (ground truth):
private void checkButtonsState(boolean isEnable){
  boolean flag=isEnable;
  TableItem[] items=itemTable.getItems();
  for (  TableItem item : items) {
    if (item.getData() instanceof ItemVersionObject) {
      ItemVersionObject itemVersionObj=(ItemVersionObject)item.getData();
      RepositoryNode repositoryNode=itemVersionObj.getRepositoryNode();
      if (repositoryNode != null && (ERepositoryObjectType.PROCESS).equals(repositoryNode.getContentType())) {
        flag=true;
      }
    }
  }
  alldependcies.setEnabled(flag);
  subjobs.setEnabled(flag);
}
Program: 122860
Project: 122860
Buggy source:
@Override public void mouseDown(MouseEvent e){
  checkedObjects.remove(object);
  removeTableItem(tableItem);
  refreshCheckedTreeView();
  checkButtonsState();
}

Fixed version (ground truth):
@Override public void mouseDown(MouseEvent e){
  checkedObjects.remove(object);
  removeTableItem(tableItem);
  refreshCheckedTreeView();
  checkButtonsState();
  checkButtonsState(false);
}
Program: 122864
Project: 122864
Buggy source:
public void checkStateChanged(CheckStateChangedEvent event){
  RepositoryNode node=(RepositoryNode)event.getElement();
  List<ItemVersionObject> objects=new ArrayList<ItemVersionObject>();
  processItems(objects,node);
  if (!objects.isEmpty()) {
    if (event.getChecked()) {
      checkedObjects.addAll(objects);
    }
 else {
      checkedObjects.removeAll(objects);
      removeItemElements(objects);
    }
    researchMaxVersion();
    refreshTableItems();
  }
}

Fixed version (ground truth):
public void checkStateChanged(CheckStateChangedEvent event){
  RepositoryNode node=(RepositoryNode)event.getElement();
  List<ItemVersionObject> objects=new ArrayList<ItemVersionObject>();
  processItems(objects,node);
  if (!objects.isEmpty()) {
    if (event.getChecked()) {
      checkedObjects.addAll(objects);
    }
 else {
      checkedObjects.removeAll(objects);
      removeItemElements(objects);
    }
    if (node != null && (ERepositoryObjectType.PROCESS).equals(node.getContentType())) {
      boolean isEnable=false;
      if (event.getChecked()) {
        isEnable=true;
      }
      checkButtonsState(isEnable);
    }
    researchMaxVersion();
    refreshTableItems();
  }
}
Program: 122865
Project: 122865
Buggy source:
private void addButtons(Composite middleComposite){
  Composite btnComposite=new Composite(middleComposite,SWT.NONE);
  btnComposite.setLayout(new GridLayout(1,true));
  GridData data=new GridData(GridData.FILL_BOTH);
  data.verticalAlignment=GridData.CENTER;
  btnComposite.setLayoutData(data);
  removeBtn=new Button(btnComposite,SWT.NONE);
  removeBtn.setImage(ImageProvider.getImage(EImage.LEFT_ICON));
  removeBtn.setToolTipText(Messages.getString("String_Node_Str"));
  removeBtn.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      TableItem[] selections=itemTable.getSelection();
      itemTable.setRedraw(false);
      for (      TableItem item : selections) {
        Object data=item.getData();
        checkedObjects.remove(data);
        removeTableItem(item);
      }
      itemTable.setRedraw(true);
      refreshCheckedTreeView();
      refreshTableItems();
    }
  }
);
  removeBtn.setEnabled(false);
}

Fixed version (ground truth):
private void addButtons(Composite middleComposite){
  Composite btnComposite=new Composite(middleComposite,SWT.NONE);
  btnComposite.setLayout(new GridLayout(1,true));
  GridData data=new GridData(GridData.FILL_BOTH);
  data.verticalAlignment=GridData.CENTER;
  btnComposite.setLayoutData(data);
  removeBtn=new Button(btnComposite,SWT.NONE);
  removeBtn.setImage(ImageProvider.getImage(EImage.LEFT_ICON));
  removeBtn.setToolTipText(Messages.getString("String_Node_Str"));
  removeBtn.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      TableItem[] selections=itemTable.getSelection();
      itemTable.setRedraw(false);
      for (      TableItem item : selections) {
        Object data=item.getData();
        checkedObjects.remove(data);
        removeTableItem(item);
      }
      itemTable.setRedraw(true);
      refreshCheckedTreeView();
      refreshTableItems();
      checkButtonsState(false);
    }
  }
);
  removeBtn.setEnabled(false);
}
Program: 122866
Project: 122866
Buggy source:
private void checkButtonsState(){
  TableItem[] selections=itemTable.getSelection();
  if (selections != null && selections.length > 0) {
    removeBtn.setEnabled(true);
  }
 else {
    removeBtn.setEnabled(false);
  }
}

Fixed version (ground truth):
private void checkButtonsState(boolean isEnable){
  boolean flag=isEnable;
  TableItem[] items=itemTable.getItems();
  for (  TableItem item : items) {
    if (item.getData() instanceof ItemVersionObject) {
      ItemVersionObject itemVersionObj=(ItemVersionObject)item.getData();
      RepositoryNode repositoryNode=itemVersionObj.getRepositoryNode();
      if (repositoryNode != null && (ERepositoryObjectType.PROCESS).equals(repositoryNode.getContentType())) {
        flag=true;
      }
    }
  }
  alldependcies.setEnabled(flag);
  subjobs.setEnabled(flag);
}
Program: 122867
Project: 122867
Buggy source:
@Override public void mouseDown(MouseEvent e){
  checkedObjects.remove(object);
  removeTableItem(tableItem);
  refreshCheckedTreeView();
  checkButtonsState();
}

Fixed version (ground truth):
@Override public void mouseDown(MouseEvent e){
  checkedObjects.remove(object);
  removeTableItem(tableItem);
  refreshCheckedTreeView();
  checkButtonsState();
  checkButtonsState(false);
}
Program: 122871
Project: 122871
Buggy source:
public void checkStateChanged(CheckStateChangedEvent event){
  RepositoryNode node=(RepositoryNode)event.getElement();
  List<ItemVersionObject> objects=new ArrayList<ItemVersionObject>();
  processItems(objects,node);
  if (!objects.isEmpty()) {
    if (event.getChecked()) {
      checkedObjects.addAll(objects);
    }
 else {
      checkedObjects.removeAll(objects);
      removeItemElements(objects);
    }
    researchMaxVersion();
    refreshTableItems();
  }
}

Fixed version (ground truth):
public void checkStateChanged(CheckStateChangedEvent event){
  RepositoryNode node=(RepositoryNode)event.getElement();
  List<ItemVersionObject> objects=new ArrayList<ItemVersionObject>();
  processItems(objects,node);
  if (!objects.isEmpty()) {
    if (event.getChecked()) {
      checkedObjects.addAll(objects);
    }
 else {
      checkedObjects.removeAll(objects);
      removeItemElements(objects);
    }
    if (node != null && (ERepositoryObjectType.PROCESS).equals(node.getContentType())) {
      boolean isEnable=false;
      if (event.getChecked()) {
        isEnable=true;
      }
      checkButtonsState(isEnable);
    }
    researchMaxVersion();
    refreshTableItems();
  }
}
Program: 122874
Project: 122874
Buggy source:
public Rectangle getNodeMarkRectangle(){
  Point nodeLocation;
  nodeLocation=node.getLocation();
  Dimension nodeSize;
  Dimension labelSize;
  Dimension errorNodeSize;
  Dimension progressNodeSize;
  nodeSize=node.getSize();
  Rectangle nodeRectangle=new Rectangle(nodeLocation,nodeSize);
  Rectangle statusRectangle=prepareCleanStatus(nodeLocation,nodeSize);
  labelSize=nodeLabel.getLabelSize();
  errorNodeSize=nodeError.getErrorSize();
  progressNodeSize=nodeProgressBar.getProgressSize();
  Rectangle finalRect;
  finalRect=nodeRectangle.getUnion(statusRectangle);
  finalRect.height+=labelSize.height;
  if (node.isErrorFlag()) {
    finalRect.height+=errorNodeSize.height;
  }
  if (node.isFileScaleComponent()) {
    finalRect.height+=progressNodeSize.height;
  }
  return finalRect;
}

Fixed version (ground truth):
public Rectangle getNodeMarkRectangle(){
  Point nodeLocation;
  nodeLocation=node.getLocation();
  Dimension nodeSize;
  Dimension labelSize;
  Dimension errorNodeSize;
  Dimension progressNodeSize;
  nodeSize=node.getSize();
  Rectangle nodeRectangle=new Rectangle(nodeLocation,nodeSize);
  Rectangle statusRectangle=prepareCleanStatus(nodeLocation,nodeSize);
  labelSize=nodeLabel.getLabelSize();
  errorNodeSize=nodeError.getErrorSize();
  progressNodeSize=nodeProgressBar.getProgressSize();
  Rectangle finalRect;
  finalRect=nodeRectangle.getUnion(statusRectangle);
  finalRect.height+=labelSize.height / 2;
  if (node.isErrorFlag()) {
    finalRect.height+=errorNodeSize.height;
  }
  if (node.isFileScaleComponent()) {
    finalRect.height+=progressNodeSize.height;
  }
  return finalRect;
}
Program: 122879
Project: 122879
Buggy source:
protected boolean checkExistConnections(IMetadataConnection metadataConnection){
  java.sql.Connection connection=null;
  ConnectionStatus connectionStatus=new ConnectionStatus();
  connectionStatus.setResult(false);
  try {
    List list=new ArrayList();
    list=ExtractMetaDataUtils.connect(metadataConnection.getDbType(),metadataConnection.getUrl(),metadataConnection.getUsername(),metadataConnection.getPassword(),metadataConnection.getDriverClass(),metadataConnection.getDriverJarPath(),metadataConnection.getDbVersionString(),metadataConnection.getAdditionalParams());
    if (list != null && list.size() > 0) {
      for (int i=0; i < list.size(); i++) {
        if (list.get(i) instanceof Connection) {
          connection=(java.sql.Connection)list.get(i);
        }
      }
    }
  }
 catch (  SQLException e) {
    return false;
  }
catch (  Exception e) {
    return false;
  }
 finally {
    try {
      if (connection != null && !connection.isClosed()) {
        connection.close();
      }
    }
 catch (    SQLException e) {
    }
  }
  return true;
}

Fixed version (ground truth):
protected boolean checkExistConnections(IMetadataConnection metadataConnection){
  java.sql.Connection connection=null;
  try {
    List list=new ArrayList();
    list=ExtractMetaDataUtils.connect(metadataConnection.getDbType(),metadataConnection.getUrl(),metadataConnection.getUsername(),metadataConnection.getPassword(),metadataConnection.getDriverClass(),metadataConnection.getDriverJarPath(),metadataConnection.getDbVersionString(),metadataConnection.getAdditionalParams());
    if (list != null && list.size() > 0) {
      for (int i=0; i < list.size(); i++) {
        if (list.get(i) instanceof Connection) {
          connection=(java.sql.Connection)list.get(i);
        }
      }
    }
  }
 catch (  SQLException e) {
    return false;
  }
catch (  Exception e) {
    return false;
  }
 finally {
    try {
      if (connection != null && !connection.isClosed()) {
        connection.close();
      }
    }
 catch (    SQLException e) {
    }
  }
  return true;
}
Program: 122880
Project: 122880
Buggy source:
private void createToolbar(){
  TreeToolBarLayout manager=new TreeToolBarLayout();
  manager.setVertical(false);
  manager.setSpacing(5);
  this.setLayoutManager(manager);
  if (abstractTree instanceof OutputXmlTree) {
    setLoopFunctionButton=new SetLoopFunctionButton(ImageProviderMapper.getImage(ImageInfo.SETLOOPFUNCTION_BUTTON));
    this.add(setLoopFunctionButton);
    if (inputMainTable == null || !inputMainTable.isMultiLoops()) {
      setLoopFunctionButton.setVisible(false);
    }
  }
  condensedButton=new CondensedButton(ImageProviderMapper.getImage(ImageInfo.CONDENSED_TOOL_ICON));
  condensedButton.setSelected(abstractTree.isActivateCondensedTool());
  this.add(condensedButton);
  expressionFilterButton=new ExpressionFilterButton(ImageProviderMapper.getImage(ImageInfo.ACTIVATE_FILTER_ICON));
  expressionFilterButton.setSelected(abstractTree.isActivateExpressionFilter());
  this.add(expressionFilterButton);
  boolean isErrorReject=false;
  if (abstractTree instanceof OutputXmlTree) {
    isErrorReject=((OutputXmlTree)abstractTree).isErrorReject();
  }
  if (isErrorReject) {
    condensedButton.setEnabled(false);
    expressionFilterButton.setEnabled(false);
  }
  Image image=null;
  if (abstractTree.isMinimized()) {
    image=restorImage;
  }
 else {
    image=miniImage;
  }
  min_size=new MinSizeButton(image);
  this.add(min_size);
  setTooltips();
}

Fixed version (ground truth):
private void createToolbar(){
  TreeToolBarLayout manager=new TreeToolBarLayout();
  manager.setVertical(false);
  manager.setSpacing(5);
  this.setLayoutManager(manager);
  if (abstractTree instanceof OutputXmlTree) {
    setLoopFunctionButton=new SetLoopFunctionButton(ImageProviderMapper.getImage(ImageInfo.SETLOOPFUNCTION_BUTTON));
    this.add(setLoopFunctionButton);
    if (inputMainTable == null || !inputMainTable.isMultiLoops()) {
      setLoopFunctionButton.setVisible(false);
    }
  }
  if (abstractTree instanceof OutputXmlTree || (abstractTree instanceof InputXmlTree && ((InputXmlTree)abstractTree).isLookup())) {
    condensedButton=new CondensedButton(ImageProviderMapper.getImage(ImageInfo.CONDENSED_TOOL_ICON));
    condensedButton.setSelected(abstractTree.isActivateCondensedTool());
    this.add(condensedButton);
    expressionFilterButton=new ExpressionFilterButton(ImageProviderMapper.getImage(ImageInfo.ACTIVATE_FILTER_ICON));
    expressionFilterButton.setSelected(abstractTree.isActivateExpressionFilter());
    this.add(expressionFilterButton);
  }
  boolean isErrorReject=false;
  if (abstractTree instanceof OutputXmlTree) {
    isErrorReject=((OutputXmlTree)abstractTree).isErrorReject();
  }
  if (isErrorReject) {
    condensedButton.setEnabled(false);
    expressionFilterButton.setEnabled(false);
  }
  Image image=null;
  if (abstractTree.isMinimized()) {
    image=restorImage;
  }
 else {
    image=miniImage;
  }
  min_size=new MinSizeButton(image);
  this.add(min_size);
  setTooltips();
}
Program: 122881
Project: 122881
Buggy source:
private void createToolbar(){
  TreeToolBarLayout manager=new TreeToolBarLayout();
  manager.setVertical(false);
  manager.setSpacing(5);
  this.setLayoutManager(manager);
  if (abstractTree instanceof OutputXmlTree) {
    setLoopFunctionButton=new SetLoopFunctionButton(ImageProviderMapper.getImage(ImageInfo.SETLOOPFUNCTION_BUTTON));
    this.add(setLoopFunctionButton);
    if (inputMainTable == null || !inputMainTable.isMultiLoops()) {
      setLoopFunctionButton.setVisible(false);
    }
  }
  condensedButton=new CondensedButton(ImageProviderMapper.getImage(ImageInfo.CONDENSED_TOOL_ICON));
  condensedButton.setSelected(abstractTree.isActivateCondensedTool());
  this.add(condensedButton);
  expressionFilterButton=new ExpressionFilterButton(ImageProviderMapper.getImage(ImageInfo.ACTIVATE_FILTER_ICON));
  expressionFilterButton.setSelected(abstractTree.isActivateExpressionFilter());
  this.add(expressionFilterButton);
  boolean isErrorReject=false;
  if (abstractTree instanceof OutputXmlTree) {
    isErrorReject=((OutputXmlTree)abstractTree).isErrorReject();
  }
  if (isErrorReject) {
    condensedButton.setEnabled(false);
    expressionFilterButton.setEnabled(false);
  }
  Image image=null;
  if (abstractTree.isMinimized()) {
    image=restorImage;
  }
 else {
    image=miniImage;
  }
  min_size=new MinSizeButton(image);
  this.add(min_size);
  setTooltips();
}

Fixed version (ground truth):
private void createToolbar(){
  TreeToolBarLayout manager=new TreeToolBarLayout();
  manager.setVertical(false);
  manager.setSpacing(5);
  this.setLayoutManager(manager);
  if (abstractTree instanceof OutputXmlTree) {
    setLoopFunctionButton=new SetLoopFunctionButton(ImageProviderMapper.getImage(ImageInfo.SETLOOPFUNCTION_BUTTON));
    this.add(setLoopFunctionButton);
    if (inputMainTable == null || !inputMainTable.isMultiLoops()) {
      setLoopFunctionButton.setVisible(false);
    }
  }
  if (abstractTree instanceof OutputXmlTree || (abstractTree instanceof InputXmlTree && ((InputXmlTree)abstractTree).isLookup())) {
    condensedButton=new CondensedButton(ImageProviderMapper.getImage(ImageInfo.CONDENSED_TOOL_ICON));
    condensedButton.setSelected(abstractTree.isActivateCondensedTool());
    this.add(condensedButton);
    expressionFilterButton=new ExpressionFilterButton(ImageProviderMapper.getImage(ImageInfo.ACTIVATE_FILTER_ICON));
    expressionFilterButton.setSelected(abstractTree.isActivateExpressionFilter());
    this.add(expressionFilterButton);
  }
  boolean isErrorReject=false;
  if (abstractTree instanceof OutputXmlTree) {
    isErrorReject=((OutputXmlTree)abstractTree).isErrorReject();
  }
  if (isErrorReject) {
    condensedButton.setEnabled(false);
    expressionFilterButton.setEnabled(false);
  }
  Image image=null;
  if (abstractTree.isMinimized()) {
    image=restorImage;
  }
 else {
    image=miniImage;
  }
  min_size=new MinSizeButton(image);
  this.add(min_size);
  setTooltips();
}
Program: 122883
Project: 122883
Buggy source:
protected boolean isConnectionExist(){
  Object username=elem.getPropertyValue("String_Node_Str");
  Object password=elem.getPropertyValue("String_Node_Str");
  Object host=elem.getPropertyValue("String_Node_Str");
  Object port=elem.getPropertyValue("String_Node_Str");
  if (username != null && password != null && host != null && port != null) {
    if (username.toString().length() > 2 && password.toString().length() > 2 && host.toString().length() > 2 && port.toString().length() > 2) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
protected boolean isConnectionExist(){
  setAllConnectionParameters(null,elem);
  ISQLBuilderService service=(ISQLBuilderService)GlobalServiceRegister.getDefault().getService(ISQLBuilderService.class);
  DatabaseConnection connection=service.createConnection(connParameters);
  if (connection != null) {
    String contextId=connection.getContextId();
    if (contextId == null || "String_Node_Str".equals(contextId)) {
      IMetadataConnection metadataConnection=null;
      metadataConnection=ConvertionHelper.convert(connection);
      return checkExistConnections(metadataConnection);
    }
  }
  return false;
}
Program: 122886
Project: 122886
Buggy source:
@Override protected List getModelSourceConnections(){
  return ((VarNode)getModel()).getOutgoingConnections();
}

Fixed version (ground truth):
@Override protected List getModelSourceConnections(){
  List modelSourceConnection=new ArrayList();
  modelSourceConnection.addAll(((VarNode)getModel()).getOutgoingConnections());
  modelSourceConnection.addAll(((VarNode)getModel()).getFilterOutGoingConnections());
  return modelSourceConnection;
}
Program: 122887
Project: 122887
Buggy source:
public IFigure getOwner(){
  return super.getOwner();
}

Fixed version (ground truth):
@Override public IFigure getOwner(){
  return super.getOwner();
}
Program: 122888
Project: 122888
Buggy source:
public ConnectionAnchor getTargetConnectionAnchor(Request request){
  IFigure figure=null;
  figure=getFigure();
  return new ColumnAnchor(this,figure,false);
}

Fixed version (ground truth):
@Override public ConnectionAnchor getTargetConnectionAnchor(Request request){
  return new ColumnAnchor(this,getFigure(),false);
}