nus-yam/ex-repair huggingface dataset:
Program: 138174
Project: 138174
Buggy source:
private void selectPagesAllIndicator(){
  IIndicatorNode[] branchNodes=IndicatorTreeModelBuilder.buildIndicatorCategory();
  for (  ModelElementIndicator modelEleIndi : getResult()) {
    List<IndicatorEnum> tempIndicator=modelEleIndi.getTempIndicator();
    if (null != tempIndicator) {
      tempIndicator.clear();
    }
    for (    IIndicatorNode iIndicatorNode : branchNodes) {
      addModelElementIndicator(modelEleIndi,iIndicatorNode);
    }
  }
}

Fixed version (ground truth):
private void selectPagesAllIndicator(boolean selected){
  if (selected) {
    IIndicatorNode[] branchNodes=IndicatorTreeModelBuilder.buildIndicatorCategory();
    for (    ModelElementIndicator modelEleIndi : getResult()) {
      List<IndicatorEnum> tempIndicator=modelEleIndi.getTempIndicator();
      if (null != tempIndicator) {
        tempIndicator.clear();
      }
      for (      IIndicatorNode iIndicatorNode : branchNodes) {
        addModelElementIndicator(modelEleIndi,iIndicatorNode);
      }
    }
  }
 else {
    for (    ModelElementIndicator modelEleIndi : getResult()) {
      modelEleIndi.getTempIndicator().clear();
    }
  }
}
Program: 138176
Project: 138176
Buggy source:
/** 
 * DOC yyi 2010-05-19 select all enabled indicators on Ctrl+Shift+[A|N] is down or other case.
 * @param selected
 */
public void selectAllIndicators(boolean selected){
  for (  Button checkButton : checkButtons) {
    if (checkButton.isDisposed()) {
      continue;
    }
    if (checkButton.isEnabled() && selected != checkButton.getSelection()) {
      checkButton.setSelection(selected);
      Listener[] listeners=checkButton.getListeners(SWT.Selection);
      if (listeners.length > 0) {
        TypedListener typedListener=(TypedListener)checkButton.getListeners(SWT.Selection)[0];
        if (typedListener.getEventListener() instanceof ButtonSelectionListener) {
          ButtonSelectionListener listener=(ButtonSelectionListener)typedListener.getEventListener();
          Event e=new Event();
          e.widget=checkButton;
          listener.widgetSelected(new SelectionEvent(e));
        }
      }
    }
  }
  if (isUsePaging()) {
    selectPagesAllIndicator();
  }
}

Fixed version (ground truth):
/** 
 * DOC yyi 2010-05-19 select all enabled indicators on Ctrl+Shift+[A|N] is down or other case.
 * @param selected
 */
public void selectAllIndicators(boolean selected){
  for (  Button checkButton : checkButtons) {
    if (checkButton.isDisposed()) {
      continue;
    }
    if (checkButton.isEnabled() && selected != checkButton.getSelection()) {
      checkButton.setSelection(selected);
      Listener[] listeners=checkButton.getListeners(SWT.Selection);
      if (listeners.length > 0) {
        TypedListener typedListener=(TypedListener)checkButton.getListeners(SWT.Selection)[0];
        if (typedListener.getEventListener() instanceof ButtonSelectionListener) {
          ButtonSelectionListener listener=(ButtonSelectionListener)typedListener.getEventListener();
          Event e=new Event();
          e.widget=checkButton;
          listener.widgetSelected(new SelectionEvent(e));
        }
      }
    }
  }
  if (isUsePaging()) {
    selectPagesAllIndicator(selected);
  }
}
Program: 138177
Project: 138177
Buggy source:
/** 
 * when user paging from page1 to page10 ,if we turn to the last page ,the page2-page9 have not been loaded ,and this method is used to load temp indicators on those(2-9) pages. DOC gdbu Comment method "loadPageTempIndicator".
 * @param toPage
 */
private void loadPageTempIndicator(int toPage){
  if (this.currentPage < toPage) {
    while (this.currentPage < toPage) {
      this.currentPage++;
      int from=(this.currentPage - 1) * this.pageSize;
      int end=this.currentPage * this.pageSize;
      for (int i=from; i < end; i++) {
        List<IndicatorEnum> tempIndicator=getResult()[i].getTempIndicator();
        if (null != tempIndicator && tempIndicator.isEmpty()) {
          getResult()[i].copyOldIndicatorEnum();
        }
      }
    }
  }
 else   if (this.currentPage > toPage) {
    while (this.currentPage > toPage) {
      this.currentPage--;
      int from=(this.currentPage - 1) * this.pageSize;
      int end=this.currentPage * this.pageSize;
      for (int i=from; i > end; i--) {
        List<IndicatorEnum> tempIndicator=getResult()[i].getTempIndicator();
        if (null != tempIndicator && tempIndicator.isEmpty()) {
          getResult()[i].copyOldIndicatorEnum();
        }
      }
    }
  }
 else {
    return;
  }
}

Fixed version (ground truth):
/** 
 * when user paging from page1 to page10 ,if we turn to the last page ,the page2-page9 have not been loaded ,and this method is used to load temp indicators on those(2-9) pages. DOC gdbu Comment method "loadPageTempIndicator".
 * @param toPage
 */
private void loadPageTempIndicator(int toPage){
  if (this.currentPage < toPage) {
    while (this.currentPage < toPage) {
      this.currentPage++;
      int from=(this.currentPage - 1) * this.pageSize;
      int end=this.currentPage * this.pageSize < this.allColumnsCountSize ? this.currentPage * this.pageSize : this.allColumnsCountSize;
      for (int i=from; i < end; i++) {
        List<IndicatorEnum> tempIndicator=getResult()[i].getTempIndicator();
        if (null != tempIndicator && tempIndicator.isEmpty()) {
          getResult()[i].copyOldIndicatorEnum();
        }
      }
    }
  }
 else   if (this.currentPage > toPage) {
    while (this.currentPage > toPage) {
      this.currentPage--;
      int from=(this.currentPage - 1) * this.pageSize;
      int end=this.currentPage * this.pageSize < this.allColumnsCountSize ? this.currentPage * this.pageSize : this.allColumnsCountSize;
      for (int i=from; i > end; i--) {
        List<IndicatorEnum> tempIndicator=getResult()[i].getTempIndicator();
        if (null != tempIndicator && tempIndicator.isEmpty()) {
          getResult()[i].copyOldIndicatorEnum();
        }
      }
    }
  }
 else {
    return;
  }
}
Program: 138179
Project: 138179
Buggy source:
/** 
 * Test method for   {@link org.talend.dataprofiler.core.migration.impl.RefactMdmMetadataTask#doExecute()}.
 */
@Test public void testDoExecute(){
  ArrayList<IMigrationTask> taskList=new ArrayList<IMigrationTask>();
  taskList.add(MigrationTaskManager.findMigrationTaskByPID("String_Node_Str"));
  MigrationTaskManager.doMigrationTask(taskList);
}

Fixed version (ground truth):
/** 
 * Test method for   {@link org.talend.dataprofiler.core.migration.impl.RefactMdmMetadataTask#doExecute()}.
 */
@Test public void testDoExecute(){
  try {
    RefactMdmMetadataTask refactMdmMetadataTask=new RefactMdmMetadataTask();
    refactMdmMetadataTask.doExecute();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 138180
Project: 138180
Buggy source:
/** 
 * Test method for   {@link org.talend.dataprofiler.core.migration.AMigrationTask#execute()}.
 */
@Test public void testExecute(){
  ArrayList<IMigrationTask> taskList=new ArrayList<IMigrationTask>();
  taskList.add(MigrationTaskManager.findMigrationTaskByPID("String_Node_Str"));
  MigrationTaskManager.doMigrationTask(taskList);
}

Fixed version (ground truth):
/** 
 * Test method for   {@link org.talend.dataprofiler.core.migration.AMigrationTask#execute()}.
 */
@Test public void testExecute(){
  try {
    SplitSysIndicatorTask splitSysIndicatorTask=new SplitSysIndicatorTask();
    splitSysIndicatorTask.doExecute();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 138182
Project: 138182
Buggy source:
@Override public List<IRepositoryNode> getChildren(){
  if (!super.getChildren().isEmpty()) {
    return filterResultsIfAny(super.getChildren());
  }
  IRepositoryViewObject object=this.getParent().getObject();
  createRepositoryNodeTableFolderNode(super.getChildren(),object);
  return filterResultsIfAny(super.getChildren());
}

Fixed version (ground truth):
@Override public List<IRepositoryNode> getChildren(){
  if (!super.getChildren().isEmpty()) {
    if (DQRepositoryNode.isUntilSchema()) {
      return super.getChildren();
    }
    return filterResultsIfAny(super.getChildren());
  }
  IRepositoryViewObject object=this.getParent().getObject();
  createRepositoryNodeTableFolderNode(super.getChildren(),object);
  if (DQRepositoryNode.isUntilSchema()) {
    return super.getChildren();
  }
  return filterResultsIfAny(super.getChildren());
}
Program: 138183
Project: 138183
Buggy source:
@Override public List<IRepositoryNode> getChildren(){
  List<IRepositoryNode> repsNodes=new ArrayList<IRepositoryNode>();
  IRepositoryViewObject object=this.getParent().getObject();
  createRepositoryNodeViewFolderNode(repsNodes,object);
  return filterResultsIfAny(repsNodes);
}

Fixed version (ground truth):
@Override public List<IRepositoryNode> getChildren(){
  List<IRepositoryNode> repsNodes=new ArrayList<IRepositoryNode>();
  IRepositoryViewObject object=this.getParent().getObject();
  createRepositoryNodeViewFolderNode(repsNodes,object);
  if (DQRepositoryNode.isUntilSchema()) {
    return repsNodes;
  }
  return filterResultsIfAny(repsNodes);
}
Program: 138184
Project: 138184
Buggy source:
public void run(){
  boolean save=DQRepositoryNode.isOnFilterring();
  String value=DQRepositoryNode.getFilterStr();
  boolean untilSchema=false;
  boolean untilTable=false;
  try {
    if (DIALOG_TYPE_TABLE == getDialogType()) {
      untilSchema=DQRepositoryNode.isUntilSchema();
    }
 else     if (isfViewer) {
      untilTable=DQRepositoryNode.isUntilTable();
    }
    DQRepositoryNode.setFilterStr(filter);
    if (filter.equals("String_Node_Str")) {
      DQRepositoryNode.setFiltering(false);
      if (isfViewer) {
        fViewer.refresh();
      }
 else {
        sTableViewer.refresh();
      }
    }
 else {
      DQRepositoryNode.setFiltering(true);
      if (isfViewer) {
        if (DIALOG_TYPE_TABLE == getDialogType()) {
          DQRepositoryNode.setUntilSchema(true);
        }
 else {
          DQRepositoryNode.setUntilTable(true);
        }
        fViewer.refresh();
        fViewer.expandAll();
      }
 else {
        sTableViewer.refresh();
      }
    }
  }
  finally {
    DQRepositoryNode.setFiltering(save);
    DQRepositoryNode.setFilterStr(value);
    if (isfViewer) {
      DQRepositoryNode.setUntilTable(untilTable);
    }
    if (DIALOG_TYPE_TABLE == getDialogType()) {
      DQRepositoryNode.setUntilSchema(untilSchema);
    }
  }
  updateOKStatus();
}

Fixed version (ground truth):
public void run(){
  boolean save=DQRepositoryNode.isOnFilterring();
  String value=DQRepositoryNode.getFilterStr();
  boolean untilSchema=false;
  boolean untilTable=false;
  try {
    if (DIALOG_TYPE_TABLE == getDialogType()) {
      untilSchema=DQRepositoryNode.isUntilSchema();
    }
 else     if (isfViewer) {
      untilTable=DQRepositoryNode.isUntilTable();
    }
    DQRepositoryNode.setFilterStr(filter);
    if (filter.equals("String_Node_Str")) {
      DQRepositoryNode.setFiltering(false);
      if (isfViewer) {
        fViewer.refresh();
      }
 else {
        unfoldToCheckedElements();
        sTableViewer.refresh();
      }
    }
 else {
      DQRepositoryNode.setFiltering(true);
      if (isfViewer) {
        if (DIALOG_TYPE_TABLE == getDialogType()) {
          DQRepositoryNode.setUntilSchema(true);
        }
 else {
          DQRepositoryNode.setUntilTable(true);
        }
        fViewer.refresh();
        fViewer.expandAll();
      }
 else {
        sTableViewer.refresh();
      }
    }
  }
  finally {
    DQRepositoryNode.setFiltering(save);
    DQRepositoryNode.setFilterStr(value);
    if (isfViewer) {
      DQRepositoryNode.setUntilTable(untilTable);
    }
    if (DIALOG_TYPE_TABLE == getDialogType()) {
      DQRepositoryNode.setUntilSchema(untilSchema);
    }
  }
  updateOKStatus();
}
Program: 138186
Project: 138186
Buggy source:
@Override public IndicatorParameters getParameters(){
  if (null == super.getParameters()) {
    parameters=IndicatorsFactory.eINSTANCE.createIndicatorParameters();
  }
  if (null == parameters.getTextParameter()) {
    parameters.setTextParameter(IndicatorsFactory.eINSTANCE.createTextParameters());
  }
  return parameters;
}

Fixed version (ground truth):
@Override public IndicatorParameters getParameters(){
  if (null == super.getParameters()) {
    setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());
  }
  if (null == parameters.getTextParameter()) {
    parameters.setTextParameter(IndicatorsFactory.eINSTANCE.createTextParameters());
  }
  return parameters;
}
Program: 138187
Project: 138187
Buggy source:
/** 
 * DOC bZhou Comment method "updateIndicatorItem".
 * @param file
 * @throws URISyntaxException
 * @throws IOException
 */
private void updateIndicatorItem(File file) throws IOException, URISyntaxException {
  if (file.getName().endsWith(FactoriesUtil.ANA)) {
    Analysis analysis=(Analysis)getModelElement(file);
    Collection<Indicator> indicators=IndicatorHelper.getIndicators(analysis.getResults());
    for (    Indicator indicator : indicators) {
      String fragment=null;
      IndicatorDefinition indicatorDefinition=indicator.getIndicatorDefinition();
      if (indicatorDefinition != null) {
        if (indicatorDefinition.eIsProxy()) {
          URI uri=((InternalEObject)indicatorDefinition).eProxyURI();
          fragment=uri.lastSegment();
        }
 else {
          fragment=indicatorDefinition.eResource().getURI().lastSegment();
        }
        if (fragment != null && !fragment.contains(FILE_NAME_FLAG)) {
          String replace=fragment.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str",FILE_NAME_FLAG);
          FileUtils.replaceInFile(file.getAbsolutePath(),fragment,replace);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "updateIndicatorItem".
 * @param file
 * @throws URISyntaxException
 * @throws IOException
 */
private void updateIndicatorItem(File file) throws IOException, URISyntaxException {
  if (file.getName().endsWith(FactoriesUtil.ANA)) {
    Analysis analysis=(Analysis)getModelElement(file);
    Collection<Indicator> indicators=IndicatorHelper.getIndicators(analysis.getResults());
    for (    Indicator indicator : indicators) {
      String fragment=null;
      IndicatorDefinition indicatorDefinition=indicator.getIndicatorDefinition();
      if (indicatorDefinition != null) {
        if (indicatorDefinition.eIsProxy()) {
          URI uri=((InternalEObject)indicatorDefinition).eProxyURI();
          fragment=uri.lastSegment();
        }
 else {
          fragment=indicatorDefinition.eResource().getURI().lastSegment();
        }
        if (fragment != null && !fragment.contains(FILE_NAME_FLAG) && !DefinitionHandler.FILENAME.equals(fragment)) {
          String replace=fragment.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str",FILE_NAME_FLAG);
          FileUtils.replaceInFile(file.getAbsolutePath(),fragment,replace);
        }
      }
    }
  }
}
Program: 138188
Project: 138188
Buggy source:
/** 
 * DOC bZhou Comment method "clearUnloadResources".
 */
private void clearUnloadResources(){
  Iterator<Resource> it=EMFSharedResources.getInstance().getResourceSet().getResources().iterator();
  while (it.hasNext()) {
    Resource resource=it.next();
    if (!resource.isLoaded() || resource.getContents().isEmpty()) {
      it.remove();
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "clearUnloadResources".
 */
private void clearUnloadResources(){
  Iterator<Resource> it=EMFSharedResources.getInstance().getResourceSet().getResources().iterator();
  while (it.hasNext()) {
    Resource resource=it.next();
    boolean isNotPlatformExist=!resource.getURI().isPlatform() || !ResourceManager.getRoot().getFile(new Path(resource.getURI().toPlatformString(false))).exists();
    if (!resource.isLoaded() || resource.getContents().isEmpty() || isNotPlatformExist) {
      it.remove();
    }
  }
}
Program: 138189
Project: 138189
Buggy source:
private boolean isConflict(Property p1,Property p2){
  if (p1 != null && p2 != null) {
    return p1.getId().equals(p2.getId()) || p1.getLabel().equals(p2.getLabel());
  }
  return false;
}

Fixed version (ground truth):
private boolean isConflict(Property p1,Property p2){
  if (p1 != null && p2 != null) {
    boolean isConflict=ResourceHelper.getUUID(p1).equals(ResourceHelper.getUUID(p2));
    boolean isExisted=p1.getId().equals(p2.getId()) || p1.getLabel().equals(p2.getLabel());
    return isConflict || isExisted;
  }
  return false;
}
Program: 138191
Project: 138191
Buggy source:
public static DQRepositoryNode getPreviouFilteredNode(DQRepositoryNode dqNode){
  if (!allFilteredNode.isEmpty()) {
    DQRepositoryNode findFilteredNode=findPreviouFilteredNode(dqNode);
    if (null != findFilteredNode) {
      return findFilteredNode;
    }
 else {
      DQRepositoryNode findFilteredNodeByMemorySave=findPreviouFilteredNode(getFilteredNode());
      if (null != findFilteredNodeByMemorySave) {
        return findFilteredNodeByMemorySave;
      }
    }
    return null;
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * DOC gdbu Comment method "getPreviouFilteredNode".
 * @param repoNode
 * @return
 */
public static IRepositoryNode getPreviouFilteredNode(IRepositoryNode repoNode){
  if (!allFilteredNodeList.isEmpty()) {
    IRepositoryNode findFilteredNode=findPreviouFilteredNode(repoNode);
    if (null != findFilteredNode) {
      return findFilteredNode;
    }
 else {
    }
    return null;
  }
 else {
    return null;
  }
}
Program: 138192
Project: 138192
Buggy source:
private static DQRepositoryNode findNextFilteredNode(DQRepositoryNode dqNode){
  for (int i=0; i < allFilteredNode.size(); i++) {
    if (allFilteredNode.get(i).equals(dqNode)) {
      if (i != (allFilteredNode.size() - 1)) {
        DQRepositoryNode dqRepositoryNode=allFilteredNode.get(i + 1);
        setFilteredNode(dqRepositoryNode);
        return dqRepositoryNode;
      }
 else {
        DQRepositoryNode dqRepositoryNode=allFilteredNode.get(0);
        setFilteredNode(dqRepositoryNode);
        return dqRepositoryNode;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
private static IRepositoryNode findNextFilteredNode(IRepositoryNode dqNode){
  boolean findGivenNode=false;
  for (int i=0; i < allFilteredNodeList.size(); i++) {
    if (allFilteredNodeList.get(i).equals(dqNode) || findGivenNode) {
      if (!findGivenNode) {
        findGivenNode=true;
        continue;
      }
      if (allFilteredNodeList.get(i).getLabel().toLowerCase().contains(DQRepositoryNode.getFilterStr())) {
        return allFilteredNodeList.get(i);
      }
    }
  }
  return null;
}
Program: 138193
Project: 138193
Buggy source:
public static List<IRepositoryNode> getUdisRepositoryNodes(boolean withDeleted){
  RepositoryNode node=getRootNode(ERepositoryObjectType.TDQ_LIBRARIES);
  List<IRepositoryNode> udisNodes=new ArrayList<IRepositoryNode>();
  if (node != null) {
    List<IRepositoryNode> childrens=node.getChildren();
    for (    IRepositoryNode subNode : childrens) {
      if (EResourceConstant.INDICATORS.getName().equals((subNode.getObject().getLabel())) || EResourceConstant.RULES.getName().equals((subNode.getObject().getLabel()))) {
        List<IRepositoryNode> subChildren=subNode.getChildren();
        for (        IRepositoryNode udisNode : subChildren) {
          if (udisNode instanceof UserDefIndicatorFolderRepNode || udisNode instanceof RulesFolderRepNode) {
            udisNodes.addAll(getModelElementFromFolder(udisNode,withDeleted));
          }
        }
      }
    }
  }
  return udisNodes;
}

Fixed version (ground truth):
public static List<IRepositoryNode> getUdisRepositoryNodes(boolean withDeleted){
  RepositoryNode node=getRootNode(ERepositoryObjectType.TDQ_LIBRARIES);
  List<IRepositoryNode> udisNodes=new ArrayList<IRepositoryNode>();
  if (node != null) {
    List<IRepositoryNode> childrens=node.getChildren();
    for (    IRepositoryNode subNode : childrens) {
      if (EResourceConstant.INDICATORS.getName().equals((subNode.getObject().getLabel())) || EResourceConstant.RULES.getName().equals((subNode.getObject().getLabel()))) {
        List<IRepositoryNode> subChildren=subNode.getChildren();
        for (        IRepositoryNode udisNode : subChildren) {
          if (udisNode instanceof UserDefIndicatorFolderRepNode || udisNode instanceof RulesSQLFolderRepNode) {
            udisNodes.addAll(getModelElementFromFolder(udisNode,withDeleted));
          }
        }
      }
    }
  }
  return udisNodes;
}
Program: 138194
Project: 138194
Buggy source:
public static List<RuleRepNode> getRuleRepNodes(IRepositoryNode parrentNode,boolean recursiveFind,boolean withDeleted){
  List<RuleRepNode> result=new ArrayList<RuleRepNode>();
  if (parrentNode != null && (parrentNode instanceof RulesFolderRepNode || parrentNode instanceof RulesSubFolderRepNode)) {
    List<IRepositoryNode> children=parrentNode.getChildren(withDeleted);
    if (children.size() > 0) {
      for (      IRepositoryNode inode : children) {
        if (inode instanceof RuleRepNode) {
          result.add((RuleRepNode)inode);
        }
 else         if (inode instanceof RulesFolderRepNode || inode instanceof RulesSubFolderRepNode) {
          if (recursiveFind) {
            result.addAll(getRuleRepNodes(inode,recursiveFind,withDeleted));
          }
        }
      }
    }
  }
  return result;
}

Fixed version (ground truth):
public static List<RuleRepNode> getRuleRepNodes(IRepositoryNode parrentNode,boolean recursiveFind,boolean withDeleted){
  List<RuleRepNode> result=new ArrayList<RuleRepNode>();
  if (parrentNode != null && (parrentNode instanceof RulesSQLFolderRepNode || parrentNode instanceof RulesSubFolderRepNode)) {
    List<IRepositoryNode> children=parrentNode.getChildren(withDeleted);
    if (children.size() > 0) {
      for (      IRepositoryNode inode : children) {
        if (inode instanceof RuleRepNode) {
          result.add((RuleRepNode)inode);
        }
 else         if (inode instanceof RulesSQLFolderRepNode || inode instanceof RulesSubFolderRepNode) {
          if (recursiveFind) {
            result.addAll(getRuleRepNodes(inode,recursiveFind,withDeleted));
          }
        }
      }
    }
  }
  return result;
}
Program: 138195
Project: 138195
Buggy source:
private static DQRepositoryNode findPreviouFilteredNode(DQRepositoryNode dqNode){
  for (int i=0; i < allFilteredNode.size(); i++) {
    if (allFilteredNode.get(i).equals(dqNode)) {
      if (i != 0) {
        DQRepositoryNode dqRepositoryNode=allFilteredNode.get(i - 1);
        setFilteredNode(dqRepositoryNode);
        return dqRepositoryNode;
      }
 else {
        DQRepositoryNode dqRepositoryNode=allFilteredNode.get(allFilteredNode.size() - 1);
        setFilteredNode(dqRepositoryNode);
        return dqRepositoryNode;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
private static IRepositoryNode findPreviouFilteredNode(IRepositoryNode dqNode){
  boolean findGivenNode=false;
  for (int i=allFilteredNodeList.size() - 1; i >= 0; i--) {
    if (allFilteredNodeList.get(i).equals(dqNode) || findGivenNode) {
      if (!findGivenNode) {
        findGivenNode=true;
        continue;
      }
      if (allFilteredNodeList.get(i).getLabel().toLowerCase().contains(DQRepositoryNode.getFilterStr())) {
        return allFilteredNodeList.get(i);
      }
    }
  }
  return null;
}
Program: 138196
Project: 138196
Buggy source:
public static DBColumnRepNode recursiveFindTdColumn(TdColumn tdColumn){
  if (tdColumn == null) {
    return null;
  }
  String uuidTdColumn=ResourceHelper.getUUID(tdColumn);
  if (uuidTdColumn == null) {
    return null;
  }
  IRepositoryNode columnSetNode=recursiveFind(ColumnHelper.getColumnOwnerAsColumnSet(tdColumn));
  if (columnSetNode == null) {
    return null;
  }
  List<IRepositoryNode> children=columnSetNode.getChildren().get(0).getChildren();
  IRepositoryNode iRepositoryNode=children.get(0);
  if (iRepositoryNode != null && iRepositoryNode instanceof DBColumnRepNode) {
    for (    IRepositoryNode childNode : children) {
      if (childNode != null && childNode instanceof DBColumnRepNode) {
        DBColumnRepNode dbColumnRepNode=(DBColumnRepNode)childNode;
        if (uuidTdColumn.equals(ResourceHelper.getUUID(dbColumnRepNode.getTdColumn()))) {
          return dbColumnRepNode;
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public static DBColumnRepNode recursiveFindTdColumn(TdColumn tdColumn){
  if (tdColumn == null) {
    return null;
  }
  String uuidTdColumn=ResourceHelper.getUUID(tdColumn);
  if (uuidTdColumn == null) {
    return null;
  }
  IRepositoryNode columnSetNode=recursiveFind(ColumnHelper.getColumnOwnerAsColumnSet(tdColumn));
  if (columnSetNode == null) {
    return null;
  }
  if (!columnSetNode.hasChildren()) {
    return null;
  }
  if (!columnSetNode.getChildren().get(0).hasChildren()) {
    return null;
  }
  List<IRepositoryNode> children=columnSetNode.getChildren().get(0).getChildren();
  IRepositoryNode iRepositoryNode=children.get(0);
  if (iRepositoryNode != null && iRepositoryNode instanceof DBColumnRepNode) {
    for (    IRepositoryNode childNode : children) {
      if (childNode != null && childNode instanceof DBColumnRepNode) {
        DBColumnRepNode dbColumnRepNode=(DBColumnRepNode)childNode;
        if (uuidTdColumn.equals(ResourceHelper.getUUID(dbColumnRepNode.getTdColumn()))) {
          return dbColumnRepNode;
        }
      }
    }
  }
  return null;
}
Program: 138197
Project: 138197
Buggy source:
/** 
 * get RepositoryNode which contains a ModelElment(include: Analysis, Report, IndicatorDefinition, Pattern, DqRule) under the parentNode.
 * @param parentNode
 * @param recursive
 * @return
 */
public static List<RepositoryNode> getModelElementRepNodes(RepositoryNode parentNode,boolean recursive){
  List<RepositoryNode> result=new ArrayList<RepositoryNode>();
  List<IRepositoryNode> children=parentNode.getChildren();
  for (  IRepositoryNode node : children) {
    ModelElement modelElementFromRepositoryNode=RepositoryNodeHelper.getModelElementFromRepositoryNode(node);
    if (modelElementFromRepositoryNode != null) {
      result.add((RepositoryNode)node);
    }
 else {
      boolean isFolder=false;
      if (node instanceof AnalysisFolderRepNode) {
        AnalysisFolderRepNode anaFolderRepNode=(AnalysisFolderRepNode)node;
        isFolder=!anaFolderRepNode.isVirtualFolder();
      }
 else       if (node instanceof ReportFolderRepNode) {
        ReportFolderRepNode repFolderRepNode=(ReportFolderRepNode)node;
        isFolder=!repFolderRepNode.isVirtualFolder();
      }
 else       if (node instanceof UserDefIndicatorFolderRepNode || node instanceof PatternRegexFolderRepNode || node instanceof PatternRegexSubFolderRepNode|| node instanceof PatternSqlFolderRepNode|| node instanceof PatternSqlSubFolderRepNode|| node instanceof RulesFolderRepNode) {
        isFolder=true;
      }
      if (isFolder && recursive) {
        result.addAll(getModelElementRepNodes((RepositoryNode)node,recursive));
      }
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * get RepositoryNode which contains a ModelElment(include: Analysis, Report, IndicatorDefinition, Pattern, DqRule) under the parentNode.
 * @param parentNode
 * @param recursive
 * @return
 */
public static List<RepositoryNode> getModelElementRepNodes(RepositoryNode parentNode,boolean recursive){
  List<RepositoryNode> result=new ArrayList<RepositoryNode>();
  List<IRepositoryNode> children=parentNode.getChildren();
  for (  IRepositoryNode node : children) {
    ModelElement modelElementFromRepositoryNode=RepositoryNodeHelper.getModelElementFromRepositoryNode(node);
    if (modelElementFromRepositoryNode != null) {
      result.add((RepositoryNode)node);
    }
 else {
      boolean isFolder=false;
      if (node instanceof AnalysisFolderRepNode) {
        AnalysisFolderRepNode anaFolderRepNode=(AnalysisFolderRepNode)node;
        isFolder=!anaFolderRepNode.isVirtualFolder();
      }
 else       if (node instanceof ReportFolderRepNode) {
        ReportFolderRepNode repFolderRepNode=(ReportFolderRepNode)node;
        isFolder=!repFolderRepNode.isVirtualFolder();
      }
 else       if (node instanceof UserDefIndicatorFolderRepNode || node instanceof PatternRegexFolderRepNode || node instanceof PatternRegexSubFolderRepNode|| node instanceof PatternSqlFolderRepNode|| node instanceof PatternSqlSubFolderRepNode|| node instanceof RulesSQLFolderRepNode) {
        isFolder=true;
      }
      if (isFolder && recursive) {
        result.addAll(getModelElementRepNodes((RepositoryNode)node,recursive));
      }
    }
  }
  return result;
}
Program: 138198
Project: 138198
Buggy source:
public static DQRepositoryNode getNextFilteredNode(DQRepositoryNode dqNode){
  if (!allFilteredNode.isEmpty()) {
    DQRepositoryNode findFilteredNode=findNextFilteredNode(dqNode);
    if (null != findFilteredNode) {
      return findFilteredNode;
    }
 else {
      DQRepositoryNode findFilteredNodeByMemorySave=findNextFilteredNode(getFilteredNode());
      if (null != findFilteredNodeByMemorySave) {
        return findFilteredNodeByMemorySave;
      }
    }
    return null;
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * DOC gdbu Comment method "getNextFilteredNode".
 * @param repoNode
 * @return
 */
public static IRepositoryNode getNextFilteredNode(IRepositoryNode repoNode){
  if (!allFilteredNodeList.isEmpty()) {
    IRepositoryNode findFilteredNode=findNextFilteredNode(repoNode);
    if (null != findFilteredNode) {
      return findFilteredNode;
    }
 else {
    }
    return null;
  }
 else {
    return null;
  }
}
Program: 138199
Project: 138199
Buggy source:
public static DQRepositoryNode getFirstFilteredNode(){
  if (!allFilteredNode.isEmpty()) {
    DQRepositoryNode dqRepositoryNode=allFilteredNode.get(0);
    setFilteredNode(dqRepositoryNode);
    return dqRepositoryNode;
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * DOC gdbu Comment method "getFirstFilteredNode".
 * @return
 */
public static IRepositoryNode getFirstFilteredNode(){
  if (!allFilteredNodeList.isEmpty()) {
    for (    IRepositoryNode iNode : allFilteredNodeList) {
      if (iNode.getLabel().toLowerCase().contains(DQRepositoryNode.getFilterStr())) {
        return iNode;
      }
    }
    return null;
  }
 else {
    return null;
  }
}
Program: 138200
Project: 138200
Buggy source:
@Override public String getLabel(){
  if (getObject() == null) {
    return this.getProperties(EProperties.LABEL).toString();
  }
  return this.getObject().getLabel();
}

Fixed version (ground truth):
@Override public String getLabel(){
  if (getObject() == null) {
    return this.getProperties(EProperties.LABEL).toString();
  }
  return this.getNodeName();
}
Program: 138201
Project: 138201
Buggy source:
public boolean canMatch(){
  boolean returnVal=false;
  String label=getLabel();
  if (isUntilSchema()) {
    label=getObject().getLabel();
  }
  if (label.toLowerCase().contains(getFilterStr())) {
    RepositoryNodeHelper.setAllFilterNodeList(this);
    if (!isUntilSchema()) {
      return true;
    }
 else {
      returnVal=true;
    }
  }
  DQRepositoryNode childNode=null;
  for (  IRepositoryNode child : getChildren()) {
    childNode=(DQRepositoryNode)child;
    if (isUntilSchema()) {
      if (childNode instanceof DBTableFolderRepNode || childNode instanceof DBViewFolderRepNode) {
        return returnVal ? true : false;
      }
      if (childNode instanceof DBTableRepNode || childNode instanceof DBViewRepNode || childNode instanceof DFTableRepNode|| childNode instanceof MDMSchemaRepNode|| childNode instanceof MDMXmlElementRepNode) {
        continue;
      }
    }
    if (isUntilTable()) {
      if (childNode instanceof DBColumnFolderRepNode) {
        continue;
      }
    }
    if (childNode.canMatch()) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean canMatch(){
  boolean returnVal=false;
  String label=getLabel();
  if (isUntilSchema()) {
    label=getObject().getLabel();
  }
 else {
    if (null != this.getObject() && this.getObject().isDeleted()) {
      label=this.getProperties(EProperties.LABEL).toString();
    }
 else {
      label=getLabel().toLowerCase();
    }
  }
  if (label.toLowerCase().contains(getFilterStr())) {
    if (!isUntilSchema()) {
      return true;
    }
 else {
      returnVal=true;
    }
  }
  DQRepositoryNode childNode=null;
  for (  IRepositoryNode child : getChildren()) {
    childNode=(DQRepositoryNode)child;
    if (isUntilSchema()) {
      if (childNode instanceof DBTableFolderRepNode || childNode instanceof DBViewFolderRepNode) {
        return returnVal ? true : false;
      }
      if (childNode instanceof DBTableRepNode || childNode instanceof DBViewRepNode || childNode instanceof DFTableRepNode|| childNode instanceof MDMSchemaRepNode|| childNode instanceof MDMXmlElementRepNode) {
        continue;
      }
    }
    if (isUntilTable()) {
      if (childNode instanceof DBColumnFolderRepNode) {
        continue;
      }
    }
    if (childNode.canMatch()) {
      return true;
    }
  }
  return false;
}
Program: 138203
Project: 138203
Buggy source:
@Override public IndicatorParameters getParameters(){
  if (parameters != null) {
    TextParameters textParameters=parameters.getTextParameter();
    if (textParameters == null) {
      textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
    }
    textParameters.setUseNulls(false);
    textParameters.setUseBlank(true);
    parameters.setTextParameter(textParameters);
  }
  return parameters;
}

Fixed version (ground truth):
@Override public IndicatorParameters getParameters(){
  parameters=super.getParameters();
  parameters.getTextParameter().setUseNulls(false);
  parameters.getTextParameter().setUseBlank(true);
  return parameters;
}
Program: 138204
Project: 138204
Buggy source:
@Override public IndicatorParameters getParameters(){
  if (parameters != null) {
    TextParameters textParameters=parameters.getTextParameter();
    if (textParameters == null) {
      textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
    }
    textParameters.setUseNulls(true);
    textParameters.setUseBlank(true);
    parameters.setTextParameter(textParameters);
  }
  return parameters;
}

Fixed version (ground truth):
@Override public IndicatorParameters getParameters(){
  parameters=super.getParameters();
  parameters.getTextParameter().setUseNulls(true);
  parameters.getTextParameter().setUseBlank(true);
  return parameters;
}
Program: 138205
Project: 138205
Buggy source:
@Override public IndicatorParameters getParameters(){
  if (parameters != null) {
    TextParameters textParameters=parameters.getTextParameter();
    if (textParameters == null) {
      textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
    }
    textParameters.setUseNulls(true);
    textParameters.setUseBlank(false);
    parameters.setTextParameter(textParameters);
  }
  return parameters;
}

Fixed version (ground truth):
@Override public IndicatorParameters getParameters(){
  parameters=super.getParameters();
  parameters.getTextParameter().setUseNulls(true);
  parameters.getTextParameter().setUseBlank(false);
  return parameters;
}
Program: 138206
Project: 138206
Buggy source:
@Override public boolean handle(Object data){
  count++;
  if (data == null) {
    nullCount++;
  }
 else {
    String str=(String)data;
    sumLength+=str.length();
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean handle(Object data){
  if (data == null) {
    nullCount++;
    count++;
  }
 else {
    String str=(String)data;
    sumLength+=str.length();
    if (str.length() > 0) {
      count++;
    }
  }
  return true;
}
Program: 138207
Project: 138207
Buggy source:
@Override public IndicatorParameters getParameters(){
  if (parameters != null) {
    TextParameters textParameters=parameters.getTextParameter();
    if (textParameters == null) {
      textParameters=IndicatorsFactory.eINSTANCE.createTextParameters();
    }
    textParameters.setUseNulls(false);
    textParameters.setUseBlank(true);
    parameters.setTextParameter(textParameters);
  }
  return parameters;
}

Fixed version (ground truth):
@Override public IndicatorParameters getParameters(){
  parameters=super.getParameters();
  parameters.getTextParameter().setUseNulls(false);
  parameters.getTextParameter().setUseBlank(true);
  return parameters;
}
Program: 138208
Project: 138208
Buggy source:
@Override public void stop(BundleContext context) throws Exception {
  this.bundle=null;
  plugin=null;
}

Fixed version (ground truth):
public void stop(BundleContext context) throws Exception {
  this.bundle=null;
  plugin=null;
}
Program: 138209
Project: 138209
Buggy source:
@Override public void start(BundleContext context) throws Exception {
  this.bundle=context.getBundle();
  plugin=this;
}

Fixed version (ground truth):
public void start(BundleContext context) throws Exception {
  this.bundle=context.getBundle();
  plugin=this;
}
Program: 138210
Project: 138210
Buggy source:
@Override public IMigrationTask[] getMigrationTasks(){
  return allTaskList.toArray(new IMigrationTask[allTaskList.size()]);
}

Fixed version (ground truth):
public IMigrationTask[] getMigrationTasks(){
  return allTaskList.toArray(new IMigrationTask[allTaskList.size()]);
}
Program: 138213
Project: 138213
Buggy source:
/** 
 * get MDM software Version.
 * @return
 */
public String getVersion(){
  String versionStr=PluginConstant.EMPTY_STRING;
  try {
    XtentisBindingStub stub=getXtentisBindingStub();
    WSVersion wsVersion=stub.getComponentVersion(new WSGetComponentVersion(WSComponent.DataManager,null));
    versionStr=wsVersion.getMajor() + PluginConstant.DOT_STRING + wsVersion.getMinor()+ PluginConstant.DOT_STRING+ wsVersion.getRevision();
  }
 catch (  Exception e) {
    log.error(e,e);
  }
  return versionStr;
}

Fixed version (ground truth):
/** 
 * get MDM software Version.
 * @return
 */
public String getVersion(){
  String versionStr=PluginConstant.EMPTY_STRING;
  try {
    if (!checkDatabaseConnection().isOk()) {
      return versionStr;
    }
    XtentisBindingStub stub=getXtentisBindingStub();
    WSVersion wsVersion=stub.getComponentVersion(new WSGetComponentVersion(WSComponent.DataManager,null));
    versionStr=wsVersion.getMajor() + PluginConstant.DOT_STRING + wsVersion.getMinor()+ PluginConstant.DOT_STRING+ wsVersion.getRevision();
  }
 catch (  Exception e) {
    log.error(e,e);
  }
  return versionStr;
}
Program: 138214
Project: 138214
Buggy source:
public Collection<TdXmlSchema> createConnection(Connection dataProvider){
  List<TdXmlSchema> xmlDocs=new ArrayList<TdXmlSchema>();
  MDMConnection mdmConn=(MDMConnection)dataProvider;
  String datamodel=mdmConn.getDatamodel();
  try {
    XtentisBindingStub stub=getXtentisBindingStub();
    WSDataModelPK[] pks=stub.getDataModelPKs(new WSRegexDataModelPKs(PluginConstant.EMPTY_STRING));
    String techXSDFolderName=getTechXSDFolderName();
    for (    WSDataModelPK pk : pks) {
      if (datamodel.equals(pk.getPk())) {
        adaptToCWMDocument(xmlDocs,stub,pk.getPk(),techXSDFolderName,dataProvider);
      }
    }
  }
 catch (  Exception e) {
    log.error(e);
    return null;
  }
  return xmlDocs;
}

Fixed version (ground truth):
public Collection<TdXmlSchema> createConnection(Connection dataProvider){
  List<TdXmlSchema> xmlDocs=new ArrayList<TdXmlSchema>();
  MDMConnection mdmConn=(MDMConnection)dataProvider;
  String datamodel=mdmConn.getDatamodel();
  try {
    if (!checkDatabaseConnection().isOk()) {
      return null;
    }
    XtentisBindingStub stub=getXtentisBindingStub();
    WSDataModelPK[] pks=stub.getDataModelPKs(new WSRegexDataModelPKs(PluginConstant.EMPTY_STRING));
    String techXSDFolderName=getTechXSDFolderName();
    for (    WSDataModelPK pk : pks) {
      if (datamodel.equals(pk.getPk())) {
        adaptToCWMDocument(xmlDocs,stub,pk.getPk(),techXSDFolderName,dataProvider);
      }
    }
  }
 catch (  Exception e) {
    log.error(e);
    return null;
  }
  return xmlDocs;
}
Program: 138215
Project: 138215
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void fillContextMenu(IMenuManager menu){
  if (!isShowMenu()) {
    return;
  }
  TreeSelection currentSelection=((TreeSelection)this.getContext().getSelection());
  if (isSelectedColumnLevel(currentSelection) || isSelectedMdmColumn(currentSelection)) {
    IMenuManager submenu=new MenuManager(DefaultMessagesImpl.getString("String_Node_Str"),NEW_MENU_NAME);
    menu.insertAfter(ICommonMenuConstants.GROUP_NEW,submenu);
    analyzeColumnAction.setColumnSelection(currentSelection);
    submenu.add(analyzeColumnAction);
  }
  if (isSelectedColumnLevel(currentSelection) || isSelectedMdmColumn(currentSelection)) {
    analyzeColumnSetAction.setColumnSelection(currentSelection);
    menu.add(analyzeColumnSetAction);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void fillContextMenu(IMenuManager menu){
  if (!isShowMenu()) {
    return;
  }
  TreeSelection currentSelection=((TreeSelection)this.getContext().getSelection());
  if (isSelectedColumnLevel(currentSelection)) {
    IMenuManager submenu=new MenuManager(DefaultMessagesImpl.getString("String_Node_Str"),NEW_MENU_NAME);
    menu.insertAfter(ICommonMenuConstants.GROUP_NEW,submenu);
    analyzeColumnAction.setColumnSelection(currentSelection);
    submenu.add(analyzeColumnAction);
  }
  if (isSelectedColumnLevel(currentSelection) || isSelectedMdmColumn(currentSelection)) {
    analyzeColumnSetAction.setColumnSelection(currentSelection);
    menu.add(analyzeColumnSetAction);
  }
}
Program: 138217
Project: 138217
Buggy source:
public Map<String,String> getQueryMap(){
  boolean isSqlEngine=ExecutionLanguage.SQL.equals(this.analysis.getParameters().getExecutionLanguage());
  Map<String,String> map=new HashMap<String,String>();
switch (this.indicatorEnum) {
case AverageLengthIndicatorEnum:
    map.put(MENU_VIEW_ROWS,isSqlEngine ? getComment(MENU_VIEW_ROWS) + getAverageLengthRowsStatement() : null);
  break;
case MinLengthIndicatorEnum:
case MaxLengthIndicatorEnum:
case MinLengthWithBlankIndicatorEnum:
case MinLengthWithBlankNullIndicatorEnum:
case MinLengthWithNullIndicatorEnum:
case MaxLengthWithBlankIndicatorEnum:
case MaxLengthWithBlankNullIndicatorEnum:
case MaxLengthWithNullIndicatorEnum:
case AverageLengthWithBlankIndicatorEnum:
case AverageLengthWithNullBlankIndicatorEnum:
case AverageLengthWithNullIndicatorEnum:
map.put(MENU_VIEW_ROWS,isSqlEngine ? getComment(MENU_VIEW_ROWS) + getTextRowsStatement() : null);
break;
default :
}
return map;
}

Fixed version (ground truth):
public Map<String,String> getQueryMap(){
  boolean isSqlEngine=ExecutionLanguage.SQL.equals(this.analysis.getParameters().getExecutionLanguage());
  Map<String,String> map=new HashMap<String,String>();
switch (this.indicatorEnum) {
case AverageLengthIndicatorEnum:
case AverageLengthWithBlankIndicatorEnum:
case AverageLengthWithNullBlankIndicatorEnum:
case AverageLengthWithNullIndicatorEnum:
    map.put(MENU_VIEW_ROWS,isSqlEngine ? getComment(MENU_VIEW_ROWS) + getAverageLengthRowsStatement() : null);
  break;
case MinLengthIndicatorEnum:
case MaxLengthIndicatorEnum:
case MinLengthWithBlankIndicatorEnum:
case MinLengthWithBlankNullIndicatorEnum:
case MinLengthWithNullIndicatorEnum:
case MaxLengthWithBlankIndicatorEnum:
case MaxLengthWithBlankNullIndicatorEnum:
case MaxLengthWithNullIndicatorEnum:
map.put(MENU_VIEW_ROWS,isSqlEngine ? getComment(MENU_VIEW_ROWS) + getTextRowsStatement() : null);
break;
default :
}
return map;
}
Program: 138218
Project: 138218
Buggy source:
public boolean computeColumnValueLength(List<Object[]> newColumnElementList){
  List<Integer> maxLength=new ArrayList<Integer>();
  for (  Object[] columnValue : newColumnElementList) {
    maxLength.add(columnValue.length);
  }
  return (Integer)Collections.max(maxLength) == Collections.min(maxLength);
}

Fixed version (ground truth):
public boolean computeColumnValueLength(List<Object[]> newColumnElementList){
  List<Integer> maxLength=new ArrayList<Integer>();
  for (  Object[] columnValue : newColumnElementList) {
    maxLength.add(columnValue.length);
  }
  if (maxLength.size() == 0 || maxLength == null) {
    return true;
  }
  return (Integer)Collections.max(maxLength) == Collections.min(maxLength);
}
Program: 138219
Project: 138219
Buggy source:
/** 
 * DOC xqliu Comment method "canParallel".
 * @return
 */
private boolean canParallel(){
  try {
    TypedReturnCode<Connection> typedReturnCode=this.getConnection(cachedAnalysis);
    Connection connection=typedReturnCode.getObject();
    DatabaseMetaData connectionMetadata=org.talend.utils.sql.ConnectionUtils.getConnectionMetadata(connection);
    if (connectionMetadata.getDriverName() != null && connectionMetadata.getDriverName().toLowerCase().startsWith(DatabaseConstant.ODBC_DRIVER_NAME)) {
      return false;
    }
  }
 catch (  SQLException e) {
    log.warn(e,e);
  }
  return this.parallel;
}

Fixed version (ground truth):
/** 
 * DOC xqliu Comment method "canParallel".
 * @return
 */
private boolean canParallel(){
  try {
    TypedReturnCode<Connection> typedReturnCode=this.getConnection(cachedAnalysis);
    Connection connection=typedReturnCode.getObject();
    DatabaseMetaData connectionMetadata=org.talend.utils.sql.ConnectionUtils.getConnectionMetadata(connection);
    if (connectionMetadata.getDriverName() != null && connectionMetadata.getDriverName().toLowerCase().startsWith(DatabaseConstant.ODBC_DRIVER_NAME)) {
      return false;
    }
    if ("String_Node_Str".equals(connection.getMetaData().getDatabaseProductName())) {
      return false;
    }
  }
 catch (  SQLException e) {
    log.warn(e,e);
  }
  return this.parallel;
}
Program: 138221
Project: 138221
Buggy source:
public void run(){
  tree.setFocus();
}

Fixed version (ground truth):
public void run(){
  Rectangle bounds=tree.getBounds();
  tree.setBounds(bounds.x,bounds.y,bounds.width,bounds.height - 1);
  tree.setBounds(bounds.x,bounds.y,bounds.width,bounds.height + 1);
}
Program: 138222
Project: 138222
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void fillContextMenu(IMenuManager menu){
  if (!isShowMenu()) {
    return;
  }
  TreeSelection currentSelection=((TreeSelection)this.getContext().getSelection());
  if (isSelectedColumnLevel(currentSelection) || isSelectedMdmColumn(currentSelection)) {
    IMenuManager submenu=new MenuManager(DefaultMessagesImpl.getString("String_Node_Str"),NEW_MENU_NAME);
    menu.insertAfter(ICommonMenuConstants.GROUP_NEW,submenu);
    analyzeColumnAction.setColumnSelection(currentSelection);
    submenu.add(analyzeColumnAction);
  }
  if (isSelectedTdColumn(currentSelection)) {
    analyzeColumnSetAction.setColumnSelection(currentSelection);
    menu.add(analyzeColumnSetAction);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void fillContextMenu(IMenuManager menu){
  if (!isShowMenu()) {
    return;
  }
  TreeSelection currentSelection=((TreeSelection)this.getContext().getSelection());
  if (isSelectedColumnLevel(currentSelection) || isSelectedMdmColumn(currentSelection)) {
    IMenuManager submenu=new MenuManager(DefaultMessagesImpl.getString("String_Node_Str"),NEW_MENU_NAME);
    menu.insertAfter(ICommonMenuConstants.GROUP_NEW,submenu);
    analyzeColumnAction.setColumnSelection(currentSelection);
    submenu.add(analyzeColumnAction);
  }
  if (isSelectedColumnLevel(currentSelection) || isSelectedMdmColumn(currentSelection)) {
    analyzeColumnSetAction.setColumnSelection(currentSelection);
    menu.add(analyzeColumnSetAction);
  }
}