nus-yam/ex-repair huggingface dataset:
Program: 127680
Project: 127680
Buggy source:
/** 
 * Only accept nodes if their type is matching some enabled/visible content provider type
 */
@SuppressWarnings("String_Node_Str") @Override public boolean select(Viewer viewer,Object parentElement,Object element){
  if (viewer instanceof CommonViewer && element instanceof RepositoryNode) {
    final CommonViewer commonViewer=(CommonViewer)viewer;
    final INavigatorContentService navigatorContentService=commonViewer.getNavigatorContentService();
    final RepositoryNode node=(RepositoryNode)element;
    if (isUnderRecycleBinNode(node)) {
      ERepositoryObjectType contextType=findRealContextType(node);
      if (contextType != null) {
        IRepositoryNode contextNode=node.getRoot().getRootRepositoryNode(contextType);
        Set contentExtensions=navigatorContentService.findContentExtensionsByTriggerPoint(contextNode);
        if (contentExtensions.isEmpty()) {
          return false;
        }
      }
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Only accept nodes if their type is matching some enabled/visible content provider type
 */
@SuppressWarnings("String_Node_Str") @Override public boolean select(Viewer viewer,Object parentElement,Object element){
  INavigatorContentService navigatorContentService=null;
  if (viewer instanceof CommonViewer) {
    navigatorContentService=((CommonViewer)viewer).getNavigatorContentService();
  }
 else   if (viewer instanceof IRepoNavigatorContentService) {
    navigatorContentService=((IRepoNavigatorContentService)viewer).getNavigatorContentService();
  }
  if (navigatorContentService != null && element instanceof RepositoryNode) {
    final RepositoryNode node=(RepositoryNode)element;
    if (isUnderRecycleBinNode(node)) {
      ERepositoryObjectType contextType=findRealContextType(node);
      if (contextType != null) {
        IRepositoryNode contextNode=node.getRoot().getRootRepositoryNode(contextType);
        Set contentExtensions=navigatorContentService.findContentExtensionsByTriggerPoint(contextNode);
        if (contentExtensions.isEmpty()) {
          return false;
        }
      }
    }
  }
  return true;
}
Program: 127681
Project: 127681
Buggy source:
protected TreeViewer createTreeViewer(final Composite parent,final int style){
  return new RepoCommonViewer(getViewId(),parent,style);
}

Fixed version (ground truth):
@Override protected TreeViewer createTreeViewer(final Composite parent,final int style){
  return new RepoCommonViewer(getViewId(),parent,style);
}
Program: 127682
Project: 127682
Buggy source:
protected void checkSorter(TreeViewer treeViewer){
  treeViewer.setSorter(new CommonViewerSorter());
}

Fixed version (ground truth):
@Override protected void checkSorter(TreeViewer treeViewer){
  treeViewer.setSorter(new CommonViewerSorter());
}
Program: 127683
Project: 127683
Buggy source:
protected void doFilterForCommonViewer(TreeViewer treeViewer){
  if (treeViewer instanceof IRepoNavigatorContentService) {
    INavigatorContentService navigatorContentService=((IRepoNavigatorContentService)treeViewer).getNavigatorContentService();
    IWorkbenchWindow activeWorkbenchWindow=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    if (activeWorkbenchWindow != null) {
      IWorkbenchPage activePage=activeWorkbenchWindow.getActivePage();
      if (activePage != null) {
        PerspectiveFilterHelper helper=new PerspectiveFilterHelper();
        helper.setTreeViewer(treeViewer);
        helper.setNavigatorContentService(navigatorContentService);
        helper.setActionProviderId(PerspectiveFilterActionProvider.ID);
        String perspectiveId=activePage.getPerspective().getId();
        helper.doFiltering(perspectiveId);
      }
    }
  }
}

Fixed version (ground truth):
protected void doFilterForCommonViewer(TreeViewer treeViewer){
  if (treeViewer instanceof IRepoNavigatorContentService) {
    INavigatorContentService navigatorContentService=((IRepoNavigatorContentService)treeViewer).getNavigatorContentService();
    IWorkbenchWindow activeWorkbenchWindow=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    if (activeWorkbenchWindow != null) {
      IWorkbenchPage activePage=activeWorkbenchWindow.getActivePage();
      if (activePage != null) {
        PerspectiveFilterHelper helper=new PerspectiveFilterHelper();
        helper.setTreeViewer(treeViewer);
        helper.setNavigatorContentService(navigatorContentService);
        helper.setActionProviderId(PerspectiveFilterActionProvider.ID);
        String perspectiveId=activePage.getPerspective().getId();
        helper.doFiltering(perspectiveId);
      }
    }
    INavigatorFilterService filterService=navigatorContentService.getFilterService();
    ViewerFilter[] visibleFilters=filterService.getVisibleFilters(true);
    for (    ViewerFilter visibleFilter : visibleFilters) {
      treeViewer.addFilter(visibleFilter);
    }
  }
}
Program: 127684
Project: 127684
Buggy source:
public static String addQuotesWithSpaceField(String fieldName,String dbType){
  if (fieldName == null) {
    fieldName="String_Node_Str";
  }
  if (fieldName.startsWith("String_Node_Str") && fieldName.endsWith("String_Node_Str")) {
    return fieldName;
  }
  boolean b=true;
  for (int i=0; i < fieldName.length(); i++) {
    char c=fieldName.charAt(i);
    b=b && c >= '0' && c <= '9';
  }
  EDatabaseTypeName name=EDatabaseTypeName.getTypeFromDbType(dbType);
  boolean isCheck=!CorePlugin.getDefault().getPreferenceStore().getBoolean(ITalendCorePrefConstants.SQL_ADD_QUOTE);
  if (!b) {
    if (isCheck && isPSQLSimilar(name)) {
      return fieldName;
    }
  }
  String newFieldName=fieldName;
  String quote=getQuoteByDBType(name);
  if (!newFieldName.contains(quote)) {
    newFieldName=addQuotes(newFieldName,quote);
  }
  return newFieldName;
}

Fixed version (ground truth):
public static String addQuotesWithSpaceField(String fieldName,String dbType){
  if (fieldName == null) {
    fieldName="String_Node_Str";
  }
  if (fieldName.startsWith("String_Node_Str") && fieldName.endsWith("String_Node_Str")) {
    return fieldName;
  }
  boolean b=true;
  for (int i=0; i < fieldName.length(); i++) {
    char c=fieldName.charAt(i);
    b=b && c >= '0' && c <= '9';
  }
  EDatabaseTypeName name=EDatabaseTypeName.getTypeFromDbType(dbType);
  if (name.equals(EDatabaseTypeName.MYSQL) && fieldName.contains(JAVA_END_STRING)) {
    String newFieldName=TalendQuoteUtils.addQuotes(fieldName);
    return newFieldName;
  }
  boolean isCheck=!CorePlugin.getDefault().getPreferenceStore().getBoolean(ITalendCorePrefConstants.SQL_ADD_QUOTE);
  if (!b) {
    if (isCheck && isPSQLSimilar(name)) {
      return fieldName;
    }
  }
  String newFieldName=fieldName;
  String quote=getQuoteByDBType(name);
  if (!newFieldName.contains(quote)) {
    newFieldName=addQuotes(newFieldName,quote);
  }
  return newFieldName;
}
Program: 127686
Project: 127686
Buggy source:
private void initToolBar(Composite parent){
  Composite toolBarComp=new Composite(parent,SWT.BORDER);
  GridLayout layout=new GridLayout();
  layout.numColumns=4;
  GridData data=new GridData(GridData.FILL_HORIZONTAL);
  toolBarComp.setLayout(layout);
  toolBarComp.setLayoutData(data);
  AddTreeNodeButton addTreeNodeBtn=new AddTreeNodeButton(toolBarComp,this);
  RemoveTreeNodeButton removeNodeBtn=new RemoveTreeNodeButton(toolBarComp,this);
  MoveUpTreeNodeButton moveUpBtn=new MoveUpTreeNodeButton(toolBarComp,this);
  MoveDownTreeNodeButton moveDown=new MoveDownTreeNodeButton(toolBarComp,this);
}

Fixed version (ground truth):
private void initToolBar(Composite parent){
  Composite toolBarComp=new Composite(parent,SWT.BORDER);
  GridLayout layout=new GridLayout();
  layout.numColumns=4;
  GridData data=new GridData(GridData.FILL_HORIZONTAL);
  toolBarComp.setLayout(layout);
  toolBarComp.setLayoutData(data);
  addTreeNodeBtn=new AddTreeNodeButton(toolBarComp,this);
  removeNodeBtn=new RemoveTreeNodeButton(toolBarComp,this);
  moveUpBtn=new MoveUpTreeNodeButton(toolBarComp,this);
  moveDown=new MoveDownTreeNodeButton(toolBarComp,this);
}
Program: 127687
Project: 127687
Buggy source:
private void addSchemaViewer(final Composite mainComposite,final int width,final int height){
  final Group group=Form.createGroup(mainComposite,1,"String_Node_Str",height);
  schemaButton=new Button(group,SWT.PUSH);
  schemaButton.setText("String_Node_Str");
  schemaButton.setToolTipText("String_Node_Str");
  schemaViewer=new TableViewer(group);
  XmlFileTableViewerProvider provider=new XmlFileTableViewerProvider();
  schemaViewer.setContentProvider(provider);
  schemaViewer.setLabelProvider(provider);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  Table table=schemaViewer.getTable();
  if (isReadOnly()) {
    table.setEnabled(false);
  }
  table.setHeaderVisible(true);
  org.eclipse.swt.widgets.TableColumn column=new org.eclipse.swt.widgets.TableColumn(table,SWT.LEFT);
  column.setText("String_Node_Str");
  column.setWidth(100);
  table.setLayoutData(gridData);
}

Fixed version (ground truth):
private void addSchemaViewer(final Composite mainComposite,final int width,final int height){
  final Group group=Form.createGroup(mainComposite,1,"String_Node_Str",height);
  schemaButton=new Button(group,SWT.PUSH);
  schemaButton.setText("String_Node_Str");
  schemaButton.setToolTipText("String_Node_Str");
  schemaViewer=new TableViewer(group);
  XmlFileTableViewerProvider provider=new XmlFileTableViewerProvider();
  schemaViewer.setContentProvider(provider);
  schemaViewer.setLabelProvider(provider);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  Table table=schemaViewer.getTable();
  if (isReadOnly()) {
    table.setEnabled(false);
  }
  table.setHeaderVisible(true);
  org.eclipse.swt.widgets.TableColumn column=new org.eclipse.swt.widgets.TableColumn(table,SWT.LEFT);
  column.setText("String_Node_Str");
  column.setWidth(100);
  table.setLayoutData(gridData);
  table.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      addTreeNodeBtn.getButton().setEnabled(false);
      removeNodeBtn.getButton().setEnabled(false);
      moveUpBtn.getButton().setEnabled(false);
      moveDown.getButton().setEnabled(false);
    }
  }
);
}
Program: 127688
Project: 127688
Buggy source:
private void initToolBar(Composite parent){
  Composite toolBarComp=new Composite(parent,SWT.BORDER);
  GridLayout layout=new GridLayout();
  layout.numColumns=4;
  GridData data=new GridData(GridData.FILL_HORIZONTAL);
  toolBarComp.setLayout(layout);
  toolBarComp.setLayoutData(data);
  AddTreeNodeButton addTreeNodeBtn=new AddTreeNodeButton(toolBarComp,this);
  RemoveTreeNodeButton removeNodeBtn=new RemoveTreeNodeButton(toolBarComp,this);
  MoveUpTreeNodeButton moveUpBtn=new MoveUpTreeNodeButton(toolBarComp,this);
  MoveDownTreeNodeButton moveDown=new MoveDownTreeNodeButton(toolBarComp,this);
}

Fixed version (ground truth):
private void initToolBar(Composite parent){
  Composite toolBarComp=new Composite(parent,SWT.BORDER);
  GridLayout layout=new GridLayout();
  layout.numColumns=4;
  GridData data=new GridData(GridData.FILL_HORIZONTAL);
  toolBarComp.setLayout(layout);
  toolBarComp.setLayoutData(data);
  addTreeNodeBtn=new AddTreeNodeButton(toolBarComp,this);
  removeNodeBtn=new RemoveTreeNodeButton(toolBarComp,this);
  moveUpBtn=new MoveUpTreeNodeButton(toolBarComp,this);
  moveDown=new MoveDownTreeNodeButton(toolBarComp,this);
}
Program: 127689
Project: 127689
Buggy source:
private void addSchemaViewer(final Composite mainComposite,final int width,final int height){
  final Group group=Form.createGroup(mainComposite,1,"String_Node_Str",height);
  schemaButton=new Button(group,SWT.PUSH);
  schemaButton.setText("String_Node_Str");
  schemaButton.setToolTipText("String_Node_Str");
  schemaViewer=new TableViewer(group);
  XmlFileTableViewerProvider provider=new XmlFileTableViewerProvider();
  schemaViewer.setContentProvider(provider);
  schemaViewer.setLabelProvider(provider);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  Table table=schemaViewer.getTable();
  if (isReadOnly()) {
    table.setEnabled(false);
  }
  table.setHeaderVisible(true);
  org.eclipse.swt.widgets.TableColumn column=new org.eclipse.swt.widgets.TableColumn(table,SWT.LEFT);
  column.setText("String_Node_Str");
  column.setWidth(100);
  table.setLayoutData(gridData);
}

Fixed version (ground truth):
private void addSchemaViewer(final Composite mainComposite,final int width,final int height){
  final Group group=Form.createGroup(mainComposite,1,"String_Node_Str",height);
  schemaButton=new Button(group,SWT.PUSH);
  schemaButton.setText("String_Node_Str");
  schemaButton.setToolTipText("String_Node_Str");
  schemaViewer=new TableViewer(group);
  XmlFileTableViewerProvider provider=new XmlFileTableViewerProvider();
  schemaViewer.setContentProvider(provider);
  schemaViewer.setLabelProvider(provider);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  Table table=schemaViewer.getTable();
  if (isReadOnly()) {
    table.setEnabled(false);
  }
  table.setHeaderVisible(true);
  org.eclipse.swt.widgets.TableColumn column=new org.eclipse.swt.widgets.TableColumn(table,SWT.LEFT);
  column.setText("String_Node_Str");
  column.setWidth(100);
  table.setLayoutData(gridData);
  table.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      addTreeNodeBtn.getButton().setEnabled(false);
      removeNodeBtn.getButton().setEnabled(false);
      moveUpBtn.getButton().setEnabled(false);
      moveDown.getButton().setEnabled(false);
    }
  }
);
}
Program: 127691
Project: 127691
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  archiveRadioSelected();
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  if (addLogsButton.getSelection() == false && sysConfigButton.getSelection() == false) {
    setPageComplete(false);
  }
 else {
    setPageComplete(true);
  }
}
Program: 127693
Project: 127693
Buggy source:
private boolean validResourcePath(IResourceDelta delta,IPath topLevelNodeWorkspaceRelativePath,boolean refMerged){
  if (ingoreResource(delta)) {
    return false;
  }
  IResourceDelta[] affectedChildren=delta.getAffectedChildren();
  IResource res=delta.getResource();
  IPath path=delta.getFullPath();
  boolean noChild=(affectedChildren == null || (affectedChildren.length == 0));
  if (path != null && noChild && (FileConstants.PROPERTIES_EXTENSION.equals(path.getFileExtension()) || (res instanceof IContainer))) {
    if (isMatchedPath(topLevelNodeWorkspaceRelativePath,path)) {
      return true;
    }
 else     if (refMerged) {
      if (res != null) {
        path=res.getProjectRelativePath();
      }
 else {
        path=path.removeFirstSegments(1);
      }
      IPath relativePath=topLevelNodeWorkspaceRelativePath.removeFirstSegments(1);
      if (isMatchedPath(relativePath,path)) {
        return true;
      }
    }
  }
  if (affectedChildren != null) {
    for (    IResourceDelta child : affectedChildren) {
      if (validResourcePath(child,topLevelNodeWorkspaceRelativePath,refMerged)) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean validResourcePath(IResourceDelta delta,IPath topLevelNodeWorkspaceRelativePath,boolean refMerged){
  if (ingoreResource(delta)) {
    return false;
  }
  IResourceDelta[] affectedChildren=delta.getAffectedChildren();
  IResource res=delta.getResource();
  IPath path=delta.getFullPath();
  boolean noChild=(affectedChildren == null || (affectedChildren.length == 0));
  if (!noChild && affectedChildren != null && affectedChildren.length == 1 && FilesUtils.isSVNFolder(affectedChildren[0].getResource())) {
    noChild=true;
  }
  if (path != null && noChild && (FileConstants.PROPERTIES_EXTENSION.equals(path.getFileExtension()) || (res instanceof IContainer))) {
    if (isMatchedPath(topLevelNodeWorkspaceRelativePath,path)) {
      return true;
    }
 else     if (refMerged) {
      if (res != null) {
        path=res.getProjectRelativePath();
      }
 else {
        path=path.removeFirstSegments(1);
      }
      IPath relativePath=topLevelNodeWorkspaceRelativePath.removeFirstSegments(1);
      if (isMatchedPath(relativePath,path)) {
        return true;
      }
    }
  }
  if (affectedChildren != null) {
    for (    IResourceDelta child : affectedChildren) {
      if (validResourcePath(child,topLevelNodeWorkspaceRelativePath,refMerged)) {
        return true;
      }
    }
  }
  return false;
}
Program: 127694
Project: 127694
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public boolean select(Viewer viewer,Object parentElement,Object element){
  if (viewer instanceof CommonViewer && element instanceof RepositoryNode) {
    final CommonViewer commonViewer=(CommonViewer)viewer;
    final INavigatorContentService navigatorContentService=commonViewer.getNavigatorContentService();
    final RepositoryNode node=(RepositoryNode)element;
    if (isUnderRecycleBinNode(node)) {
      ERepositoryObjectType contextType=findRealContextType(node);
      if (contextType != null) {
        IRepositoryNode contextNode=node.getRoot().getRootRepositoryNode(contextType);
        Set contentExtensions=navigatorContentService.findContentExtensionsByTriggerPoint(contextNode);
        if (contentExtensions.isEmpty()) {
          return false;
        }
      }
    }
  }
  return true;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public boolean select(Viewer viewer,Object parentElement,Object element){
  INavigatorContentService navigatorContentService=null;
  if (viewer instanceof CommonViewer) {
    navigatorContentService=((CommonViewer)viewer).getNavigatorContentService();
  }
 else   if (viewer instanceof IRepoNavigatorContentService) {
    navigatorContentService=((IRepoNavigatorContentService)viewer).getNavigatorContentService();
  }
  if (navigatorContentService != null && element instanceof RepositoryNode) {
    final RepositoryNode node=(RepositoryNode)element;
    if (isUnderRecycleBinNode(node)) {
      ERepositoryObjectType contextType=findRealContextType(node);
      if (contextType != null) {
        IRepositoryNode contextNode=node.getRoot().getRootRepositoryNode(contextType);
        Set contentExtensions=navigatorContentService.findContentExtensionsByTriggerPoint(contextNode);
        if (contentExtensions.isEmpty()) {
          return false;
        }
      }
    }
  }
  return true;
}
Program: 127695
Project: 127695
Buggy source:
protected TreeViewer createTreeViewer(final Composite parent,final int style){
  return new RepoCommonViewer(getViewId(),parent,style);
}

Fixed version (ground truth):
@Override protected TreeViewer createTreeViewer(final Composite parent,final int style){
  return new RepoCommonViewer(getViewId(),parent,style);
}
Program: 127696
Project: 127696
Buggy source:
protected void checkSorter(TreeViewer treeViewer){
  treeViewer.setSorter(new CommonViewerSorter());
}

Fixed version (ground truth):
@Override protected void checkSorter(TreeViewer treeViewer){
  treeViewer.setSorter(new CommonViewerSorter());
}
Program: 127697
Project: 127697
Buggy source:
protected void doFilterForCommonViewer(TreeViewer treeViewer){
  if (treeViewer instanceof IRepoNavigatorContentService) {
    INavigatorContentService navigatorContentService=((IRepoNavigatorContentService)treeViewer).getNavigatorContentService();
    IWorkbenchWindow activeWorkbenchWindow=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    if (activeWorkbenchWindow != null) {
      IWorkbenchPage activePage=activeWorkbenchWindow.getActivePage();
      if (activePage != null) {
        PerspectiveFilterHelper helper=new PerspectiveFilterHelper();
        helper.setTreeViewer(treeViewer);
        helper.setNavigatorContentService(navigatorContentService);
        helper.setActionProviderId(PerspectiveFilterActionProvider.ID);
        String perspectiveId=activePage.getPerspective().getId();
        helper.doFiltering(perspectiveId);
      }
    }
  }
}

Fixed version (ground truth):
protected void doFilterForCommonViewer(TreeViewer treeViewer){
  if (treeViewer instanceof IRepoNavigatorContentService) {
    INavigatorContentService navigatorContentService=((IRepoNavigatorContentService)treeViewer).getNavigatorContentService();
    IWorkbenchWindow activeWorkbenchWindow=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    if (activeWorkbenchWindow != null) {
      IWorkbenchPage activePage=activeWorkbenchWindow.getActivePage();
      if (activePage != null) {
        PerspectiveFilterHelper helper=new PerspectiveFilterHelper();
        helper.setTreeViewer(treeViewer);
        helper.setNavigatorContentService(navigatorContentService);
        helper.setActionProviderId(PerspectiveFilterActionProvider.ID);
        String perspectiveId=activePage.getPerspective().getId();
        helper.doFiltering(perspectiveId);
      }
    }
    INavigatorFilterService filterService=navigatorContentService.getFilterService();
    ViewerFilter[] visibleFilters=filterService.getVisibleFilters(true);
    for (    ViewerFilter visibleFilter : visibleFilters) {
      treeViewer.addFilter(visibleFilter);
    }
  }
}
Program: 127698
Project: 127698
Buggy source:
private void initToolBar(Composite parent){
  Composite toolBarComp=new Composite(parent,SWT.BORDER);
  GridLayout layout=new GridLayout();
  layout.numColumns=4;
  GridData data=new GridData(GridData.FILL_HORIZONTAL);
  toolBarComp.setLayout(layout);
  toolBarComp.setLayoutData(data);
  AddTreeNodeButton addTreeNodeBtn=new AddTreeNodeButton(toolBarComp,this);
  RemoveTreeNodeButton removeNodeBtn=new RemoveTreeNodeButton(toolBarComp,this);
  MoveUpTreeNodeButton moveUpBtn=new MoveUpTreeNodeButton(toolBarComp,this);
  MoveDownTreeNodeButton moveDown=new MoveDownTreeNodeButton(toolBarComp,this);
}

Fixed version (ground truth):
private void initToolBar(Composite parent){
  Composite toolBarComp=new Composite(parent,SWT.BORDER);
  GridLayout layout=new GridLayout();
  layout.numColumns=4;
  GridData data=new GridData(GridData.FILL_HORIZONTAL);
  toolBarComp.setLayout(layout);
  toolBarComp.setLayoutData(data);
  addTreeNodeBtn=new AddTreeNodeButton(toolBarComp,this);
  removeNodeBtn=new RemoveTreeNodeButton(toolBarComp,this);
  moveUpBtn=new MoveUpTreeNodeButton(toolBarComp,this);
  moveDown=new MoveDownTreeNodeButton(toolBarComp,this);
}
Program: 127699
Project: 127699
Buggy source:
private void addSchemaViewer(final Composite mainComposite,final int width,final int height){
  final Group group=Form.createGroup(mainComposite,1,"String_Node_Str",height);
  schemaButton=new Button(group,SWT.PUSH);
  schemaButton.setText("String_Node_Str");
  schemaButton.setToolTipText("String_Node_Str");
  schemaViewer=new TableViewer(group);
  XmlFileTableViewerProvider provider=new XmlFileTableViewerProvider();
  schemaViewer.setContentProvider(provider);
  schemaViewer.setLabelProvider(provider);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  Table table=schemaViewer.getTable();
  if (isReadOnly()) {
    table.setEnabled(false);
  }
  table.setHeaderVisible(true);
  org.eclipse.swt.widgets.TableColumn column=new org.eclipse.swt.widgets.TableColumn(table,SWT.LEFT);
  column.setText("String_Node_Str");
  column.setWidth(100);
  table.setLayoutData(gridData);
}

Fixed version (ground truth):
private void addSchemaViewer(final Composite mainComposite,final int width,final int height){
  final Group group=Form.createGroup(mainComposite,1,"String_Node_Str",height);
  schemaButton=new Button(group,SWT.PUSH);
  schemaButton.setText("String_Node_Str");
  schemaButton.setToolTipText("String_Node_Str");
  schemaViewer=new TableViewer(group);
  XmlFileTableViewerProvider provider=new XmlFileTableViewerProvider();
  schemaViewer.setContentProvider(provider);
  schemaViewer.setLabelProvider(provider);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  Table table=schemaViewer.getTable();
  if (isReadOnly()) {
    table.setEnabled(false);
  }
  table.setHeaderVisible(true);
  org.eclipse.swt.widgets.TableColumn column=new org.eclipse.swt.widgets.TableColumn(table,SWT.LEFT);
  column.setText("String_Node_Str");
  column.setWidth(100);
  table.setLayoutData(gridData);
  table.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      addTreeNodeBtn.getButton().setEnabled(false);
      removeNodeBtn.getButton().setEnabled(false);
      moveUpBtn.getButton().setEnabled(false);
      moveDown.getButton().setEnabled(false);
    }
  }
);
}
Program: 127700
Project: 127700
Buggy source:
private boolean validResourcePath(IResourceDelta delta,IPath topLevelNodeWorkspaceRelativePath,boolean refMerged){
  if (ingoreResource(delta)) {
    return false;
  }
  IResourceDelta[] affectedChildren=delta.getAffectedChildren();
  IResource res=delta.getResource();
  IPath path=delta.getFullPath();
  boolean noChild=(affectedChildren == null || (affectedChildren.length == 0));
  if (path != null && noChild && (FileConstants.PROPERTIES_EXTENSION.equals(path.getFileExtension()) || (res instanceof IContainer))) {
    if (isMatchedPath(topLevelNodeWorkspaceRelativePath,path)) {
      return true;
    }
 else     if (refMerged) {
      if (res != null) {
        path=res.getProjectRelativePath();
      }
 else {
        path=path.removeFirstSegments(1);
      }
      IPath relativePath=topLevelNodeWorkspaceRelativePath.removeFirstSegments(1);
      if (isMatchedPath(relativePath,path)) {
        return true;
      }
    }
  }
  if (affectedChildren != null) {
    for (    IResourceDelta child : affectedChildren) {
      if (validResourcePath(child,topLevelNodeWorkspaceRelativePath,refMerged)) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean validResourcePath(IResourceDelta delta,IPath topLevelNodeWorkspaceRelativePath,boolean refMerged){
  if (ingoreResource(delta)) {
    return false;
  }
  IResourceDelta[] affectedChildren=delta.getAffectedChildren();
  IResource res=delta.getResource();
  IPath path=delta.getFullPath();
  boolean noChild=(affectedChildren == null || (affectedChildren.length == 0));
  if (!noChild && affectedChildren != null && affectedChildren.length == 1 && FilesUtils.isSVNFolder(affectedChildren[0].getResource())) {
    noChild=true;
  }
  if (path != null && noChild && (FileConstants.PROPERTIES_EXTENSION.equals(path.getFileExtension()) || (res instanceof IContainer))) {
    if (isMatchedPath(topLevelNodeWorkspaceRelativePath,path)) {
      return true;
    }
 else     if (refMerged) {
      if (res != null) {
        path=res.getProjectRelativePath();
      }
 else {
        path=path.removeFirstSegments(1);
      }
      IPath relativePath=topLevelNodeWorkspaceRelativePath.removeFirstSegments(1);
      if (isMatchedPath(relativePath,path)) {
        return true;
      }
    }
  }
  if (affectedChildren != null) {
    for (    IResourceDelta child : affectedChildren) {
      if (validResourcePath(child,topLevelNodeWorkspaceRelativePath,refMerged)) {
        return true;
      }
    }
  }
  return false;
}
Program: 127701
Project: 127701
Buggy source:
/** 
 * Only accept nodes if their type is matching some enabled/visible content provider type
 */
@SuppressWarnings("String_Node_Str") @Override public boolean select(Viewer viewer,Object parentElement,Object element){
  if (viewer instanceof CommonViewer && element instanceof RepositoryNode) {
    final CommonViewer commonViewer=(CommonViewer)viewer;
    final INavigatorContentService navigatorContentService=commonViewer.getNavigatorContentService();
    final RepositoryNode node=(RepositoryNode)element;
    if (isUnderRecycleBinNode(node)) {
      ERepositoryObjectType contextType=findRealContextType(node);
      if (contextType != null) {
        IRepositoryNode contextNode=node.getRoot().getRootRepositoryNode(contextType);
        Set contentExtensions=navigatorContentService.findContentExtensionsByTriggerPoint(contextNode);
        if (contentExtensions.isEmpty()) {
          return false;
        }
      }
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Only accept nodes if their type is matching some enabled/visible content provider type
 */
@SuppressWarnings("String_Node_Str") @Override public boolean select(Viewer viewer,Object parentElement,Object element){
  INavigatorContentService navigatorContentService=null;
  if (viewer instanceof CommonViewer) {
    navigatorContentService=((CommonViewer)viewer).getNavigatorContentService();
  }
 else   if (viewer instanceof IRepoNavigatorContentService) {
    navigatorContentService=((IRepoNavigatorContentService)viewer).getNavigatorContentService();
  }
  if (navigatorContentService != null && element instanceof RepositoryNode) {
    final RepositoryNode node=(RepositoryNode)element;
    if (isUnderRecycleBinNode(node)) {
      ERepositoryObjectType contextType=findRealContextType(node);
      if (contextType != null) {
        IRepositoryNode contextNode=node.getRoot().getRootRepositoryNode(contextType);
        Set contentExtensions=navigatorContentService.findContentExtensionsByTriggerPoint(contextNode);
        if (contentExtensions.isEmpty()) {
          return false;
        }
      }
    }
  }
  return true;
}
Program: 127702
Project: 127702
Buggy source:
protected TreeViewer createTreeViewer(final Composite parent,final int style){
  return new RepoCommonViewer(getViewId(),parent,style);
}

Fixed version (ground truth):
@Override protected TreeViewer createTreeViewer(final Composite parent,final int style){
  return new RepoCommonViewer(getViewId(),parent,style);
}
Program: 127703
Project: 127703
Buggy source:
protected void checkSorter(TreeViewer treeViewer){
  treeViewer.setSorter(new CommonViewerSorter());
}

Fixed version (ground truth):
@Override protected void checkSorter(TreeViewer treeViewer){
  treeViewer.setSorter(new CommonViewerSorter());
}
Program: 127704
Project: 127704
Buggy source:
protected void doFilterForCommonViewer(TreeViewer treeViewer){
  if (treeViewer instanceof IRepoNavigatorContentService) {
    INavigatorContentService navigatorContentService=((IRepoNavigatorContentService)treeViewer).getNavigatorContentService();
    IWorkbenchWindow activeWorkbenchWindow=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    if (activeWorkbenchWindow != null) {
      IWorkbenchPage activePage=activeWorkbenchWindow.getActivePage();
      if (activePage != null) {
        PerspectiveFilterHelper helper=new PerspectiveFilterHelper();
        helper.setTreeViewer(treeViewer);
        helper.setNavigatorContentService(navigatorContentService);
        helper.setActionProviderId(PerspectiveFilterActionProvider.ID);
        String perspectiveId=activePage.getPerspective().getId();
        helper.doFiltering(perspectiveId);
      }
    }
  }
}

Fixed version (ground truth):
protected void doFilterForCommonViewer(TreeViewer treeViewer){
  if (treeViewer instanceof IRepoNavigatorContentService) {
    INavigatorContentService navigatorContentService=((IRepoNavigatorContentService)treeViewer).getNavigatorContentService();
    IWorkbenchWindow activeWorkbenchWindow=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    if (activeWorkbenchWindow != null) {
      IWorkbenchPage activePage=activeWorkbenchWindow.getActivePage();
      if (activePage != null) {
        PerspectiveFilterHelper helper=new PerspectiveFilterHelper();
        helper.setTreeViewer(treeViewer);
        helper.setNavigatorContentService(navigatorContentService);
        helper.setActionProviderId(PerspectiveFilterActionProvider.ID);
        String perspectiveId=activePage.getPerspective().getId();
        helper.doFiltering(perspectiveId);
      }
    }
    INavigatorFilterService filterService=navigatorContentService.getFilterService();
    ViewerFilter[] visibleFilters=filterService.getVisibleFilters(true);
    for (    ViewerFilter visibleFilter : visibleFilters) {
      treeViewer.addFilter(visibleFilter);
    }
  }
}
Program: 127706
Project: 127706
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  archiveRadioSelected();
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  if (addLogsButton.getSelection() == false && sysConfigButton.getSelection() == false) {
    setPageComplete(false);
  }
 else {
    setPageComplete(true);
  }
}
Program: 127708
Project: 127708
Buggy source:
public void keyTraversed(TraverseEvent e){
  if (e.detail == SWT.TRAVERSE_RETURN) {
    e.doit=false;
    lastPath=archivePathField.getText().trim();
  }
}

Fixed version (ground truth):
@Override public void keyTraversed(TraverseEvent e){
  if (e.detail == SWT.TRAVERSE_RETURN) {
    e.doit=false;
    lastPath=archivePathField.getText().trim();
  }
}
Program: 127709
Project: 127709
Buggy source:
public void createControl(Composite parent){
  Composite workArea=new Composite(parent,SWT.NONE);
  setControl(workArea);
  workArea.setLayout(new GridLayout());
  workArea.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL));
  createLogsRoot(workArea);
}

Fixed version (ground truth):
@Override public void createControl(Composite parent){
  Composite workArea=new Composite(parent,SWT.NONE);
  setControl(workArea);
  workArea.setLayout(new GridLayout());
  workArea.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL));
  createLogsRoot(workArea);
}
Program: 127712
Project: 127712
Buggy source:
@Override public void run(){
  FOXTreeNode node=(FOXTreeNode)this.getStructuredSelection().getFirstElement();
  if (createChildNode(node)) {
    form.redrawLinkers();
  }
  form.updateConnection();
  form.updateStatus();
}

Fixed version (ground truth):
@Override public void run(){
  FOXTreeNode node=(FOXTreeNode)this.getStructuredSelection().getFirstElement();
  if (node != null && createChildNode(node)) {
    form.redrawLinkers();
  }
  form.updateConnection();
  form.updateStatus();
}
Program: 127713
Project: 127713
Buggy source:
@Override public Object getComponentValue(Connection connection,String value,IMetadataTable table){
  if (value != null && canHandle(connection)) {
    ExampleDemoConnection demoConn=(ExampleDemoConnection)connection;
    if ("String_Node_Str".equals(value)) {
      return Boolean.TRUE;
    }
 else     if ("String_Node_Str".equals(value)) {
      return "String_Node_Str";
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public Object getComponentValue(Connection connection,String value,IMetadataTable table,String targetComponent){
  return null;
}
Program: 127715
Project: 127715
Buggy source:
@Override protected boolean visit(IResourceDelta delta,Collection<Runnable> runnables){
  VisitResourceHelper visitHelper=new VisitResourceHelper(delta);
  boolean merged=false;
  Set<RepositoryNode> topLevelNodes=getTopLevelNodes();
  for (  final RepositoryNode repoNode : topLevelNodes) {
    IProjectRepositoryNode root=repoNode.getRoot();
    if (!merged && root instanceof ProjectRepositoryNode) {
      merged=((ProjectRepositoryNode)root).getMergeRefProject();
    }
    IPath topLevelNodeWorkspaceRelativePath=topLevelNodeToPathMap.get(repoNode);
    if (topLevelNodeWorkspaceRelativePath != null && visitHelper.valid(topLevelNodeWorkspaceRelativePath,merged)) {
      if (viewer instanceof RepoViewCommonViewer) {
        runnables.add(new Runnable(){
          @Override public void run(){
            refreshTopLevelNode(repoNode);
          }
        }
);
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
@Override protected boolean visit(IResourceDelta delta,Collection<Runnable> runnables){
  VisitResourceHelper visitHelper=new VisitResourceHelper(delta);
  boolean merged=ProjectRepositoryNode.getInstance().getMergeRefProject();
  Set<RepositoryNode> topLevelNodes=getTopLevelNodes();
  for (  final RepositoryNode repoNode : topLevelNodes) {
    IPath topLevelNodeWorkspaceRelativePath=topLevelNodeToPathMap.get(repoNode);
    if (topLevelNodeWorkspaceRelativePath != null && visitHelper.valid(topLevelNodeWorkspaceRelativePath,merged)) {
      if (viewer instanceof RepoViewCommonViewer) {
        runnables.add(new Runnable(){
          @Override public void run(){
            refreshTopLevelNode(repoNode);
          }
        }
);
      }
      return false;
    }
 else {
      return true;
    }
  }
  return false;
}
Program: 127716
Project: 127716
Buggy source:
private boolean validResourcePath(IResourceDelta delta,IPath topLevelNodeWorkspaceRelativePath,boolean refMerged){
  if (ingoreResource(delta)) {
    return false;
  }
  IResourceDelta[] affectedChildren=delta.getAffectedChildren();
  IPath path=delta.getFullPath();
  if (path != null && (affectedChildren.length == 0) && (FileConstants.PROPERTIES_EXTENSION.equals(path.getFileExtension()) || (delta instanceof IContainer))) {
    if (isMatchedPath(topLevelNodeWorkspaceRelativePath,path)) {
      return true;
    }
 else     if (refMerged) {
      path=path.removeFirstSegments(1);
      IPath relativePath=topLevelNodeWorkspaceRelativePath.removeFirstSegments(1);
      if (isMatchedPath(relativePath,path)) {
        return true;
      }
    }
  }
  if (affectedChildren != null) {
    for (    IResourceDelta child : affectedChildren) {
      if (validResourcePath(child,topLevelNodeWorkspaceRelativePath,refMerged)) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean validResourcePath(IResourceDelta delta,IPath topLevelNodeWorkspaceRelativePath,boolean refMerged){
  if (ingoreResource(delta)) {
    return false;
  }
  IResourceDelta[] affectedChildren=delta.getAffectedChildren();
  IResource res=delta.getResource();
  IPath path=delta.getFullPath();
  boolean noChild=(affectedChildren == null || (affectedChildren.length == 0));
  if (path != null && noChild && (FileConstants.PROPERTIES_EXTENSION.equals(path.getFileExtension()) || (res instanceof IContainer))) {
    if (isMatchedPath(topLevelNodeWorkspaceRelativePath,path)) {
      return true;
    }
 else     if (refMerged) {
      if (res != null) {
        path=res.getProjectRelativePath();
      }
 else {
        path=path.removeFirstSegments(1);
      }
      IPath relativePath=topLevelNodeWorkspaceRelativePath.removeFirstSegments(1);
      if (isMatchedPath(relativePath,path)) {
        return true;
      }
    }
  }
  if (affectedChildren != null) {
    for (    IResourceDelta child : affectedChildren) {
      if (validResourcePath(child,topLevelNodeWorkspaceRelativePath,refMerged)) {
        return true;
      }
    }
  }
  return false;
}
Program: 127718
Project: 127718
Buggy source:
@Override protected void addFields(){
  Composite mainComposite=Form.startNewGridLayout(this,2);
  addGroupDelimitedFileSettings(mainComposite,400,100);
  addGroupRowsToSkip(mainComposite,300,100);
  addGroupEscapeChar(mainComposite,400,105);
  addGroupLimit(mainComposite,300,105);
  addGroupFileViewer(this,700,200);
  if (!isInWizard()) {
    Composite compositeBottomButton=Form.startNewGridLayout(this,2,false,SWT.CENTER,SWT.CENTER);
    cancelButton=new UtilsButton(compositeBottomButton,Messages.getString("String_Node_Str"),WIDTH_BUTTON_PIXEL,HEIGHT_BUTTON_PIXEL);
  }
}

Fixed version (ground truth):
@Override protected void addFields(){
  Composite mainComposite=Form.startNewGridLayout(this,2);
  addGroupDelimitedFileSettings(mainComposite,400,105);
  addGroupRowsToSkip(mainComposite,300,105);
  addGroupEscapeChar(mainComposite,400,110);
  addGroupLimit(mainComposite,300,110);
  addGroupFileViewer(this,700,200);
  if (!isInWizard()) {
    Composite compositeBottomButton=Form.startNewGridLayout(this,2,false,SWT.CENTER,SWT.CENTER);
    cancelButton=new UtilsButton(compositeBottomButton,Messages.getString("String_Node_Str"),WIDTH_BUTTON_PIXEL,HEIGHT_BUTTON_PIXEL);
  }
}
Program: 127719
Project: 127719
Buggy source:
@Override protected void addFields(){
  Composite mainComposite=Form.startNewGridLayout(this,2);
  addGroupDelimitedFileSettings(mainComposite,280,80);
  addGroupRowsToSkip(mainComposite,300,80);
  addGroupDieOnErrorSettings(mainComposite,280,60);
  addGroupLimit(mainComposite,300,60);
  Composite mainComposite2=Form.startNewGridLayout(this,1);
  addGroupFileViewer(mainComposite2,600,200);
  if (!isInWizard()) {
    Composite compositeBottomButton=Form.startNewGridLayout(this,2,false,SWT.CENTER,SWT.CENTER);
    cancelButton=new UtilsButton(compositeBottomButton,Messages.getString("String_Node_Str"),WIDTH_BUTTON_PIXEL,HEIGHT_BUTTON_PIXEL);
  }
}

Fixed version (ground truth):
@Override protected void addFields(){
  Composite mainComposite=Form.startNewGridLayout(this,2);
  addGroupDelimitedFileSettings(mainComposite,280,120);
  addGroupRowsToSkip(mainComposite,300,120);
  addGroupDieOnErrorSettings(mainComposite,280,67);
  addGroupLimit(mainComposite,300,67);
  Composite mainComposite2=Form.startNewGridLayout(this,1);
  addGroupFileViewer(mainComposite2,600,200);
  if (!isInWizard()) {
    Composite compositeBottomButton=Form.startNewGridLayout(this,2,false,SWT.CENTER,SWT.CENTER);
    cancelButton=new UtilsButton(compositeBottomButton,Messages.getString("String_Node_Str"),WIDTH_BUTTON_PIXEL,HEIGHT_BUTTON_PIXEL);
  }
}
Program: 127722
Project: 127722
Buggy source:
/** 
 * yzhang Comment method "filterPalette".
 * @param filer
 */
public static void filterPalette(String filer){
  CorePlugin.getDefault().getDesignerCoreService().setPaletteFilter(filer);
  if (faState) {
    ComponentUtilities.updatePalette(true);
  }
 else   ComponentUtilities.updatePalette(false);
  markEmptyDrawer(paletteRoot);
  emptyEntry.clear();
  recordEmptyDrawer(paletteRoot);
  removeEmptyDrawer();
}

Fixed version (ground truth):
/** 
 * yzhang Comment method "filterPalette".
 * @param filer
 */
public static void filterPalette(String filer){
  CorePlugin.getDefault().getDesignerCoreService().setPaletteFilter(filer);
  if (faState) {
    ComponentUtilities.updatePalette(true);
  }
 else {
    ComponentUtilities.updatePalette(false);
  }
  markEmptyDrawer(paletteRoot);
  emptyEntry.clear();
  recordEmptyDrawer(paletteRoot);
  removeEmptyDrawer();
}
Program: 127723
Project: 127723
Buggy source:
private static void addUsedComponents(Set<String> components,List<IRepositoryViewObject> allProcess){
  for (  IRepositoryViewObject object : allProcess) {
    Item item=object.getProperty().getItem();
    List parameters=null;
    ProcessType processType=null;
    if (item instanceof ProcessItem) {
      processType=((ProcessItem)item).getProcess();
    }
 else     if (item instanceof JobletProcessItem) {
      processType=((JobletProcessItem)item).getJobletProcess();
    }
    if (processType != null) {
      for (      Object oNode : processType.getNode()) {
        NodeType node=(NodeType)oNode;
        IComponent component=ComponentsFactoryProvider.getInstance().get(node.getComponentName());
        if (component != null) {
          String originalFamilyName=component.getOriginalFamilyName();
          String original[]=originalFamilyName.split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX);
          for (int i=0; i < original.length; i++) {
            components.add(original[i] + FAMILY_SPEARATOR + component.getName());
          }
        }
      }
      if (processType.getParameters() != null) {
        parameters=processType.getParameters().getElementParameter();
      }
    }
    if (parameters != null) {
      Set<String> inStatsLogsAndImplicit=getComponentsInStatsLogsAndImplicit(parameters);
      if (inStatsLogsAndImplicit != null) {
        components.addAll(inStatsLogsAndImplicit);
      }
    }
  }
}

Fixed version (ground truth):
private static void addUsedComponents(Set<String> components,List<IRepositoryViewObject> allProcess){
  for (  IRepositoryViewObject object : allProcess) {
    Item item=object.getProperty().getItem();
    List parameters=null;
    ProcessType processType=null;
    if (item instanceof ProcessItem) {
      processType=((ProcessItem)item).getProcess();
    }
 else     if (item instanceof JobletProcessItem) {
      processType=((JobletProcessItem)item).getJobletProcess();
    }
    if (processType != null) {
      for (      Object oNode : processType.getNode()) {
        NodeType node=(NodeType)oNode;
        IComponent component=ComponentsFactoryProvider.getInstance().get(node.getComponentName());
        if (component != null) {
          String originalFamilyName=component.getOriginalFamilyName();
          String original[]=originalFamilyName.split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX);
          for (          String element : original) {
            components.add(element + FAMILY_SPEARATOR + component.getName());
          }
        }
      }
      if (processType.getParameters() != null) {
        parameters=processType.getParameters().getElementParameter();
      }
    }
    if (parameters != null) {
      Set<String> inStatsLogsAndImplicit=getComponentsInStatsLogsAndImplicit(parameters);
      if (inStatsLogsAndImplicit != null) {
        components.addAll(inStatsLogsAndImplicit);
      }
    }
  }
}
Program: 127725
Project: 127725
Buggy source:
@Override protected boolean visit(IResourceDelta delta,Collection<Runnable> runnables){
  VisitResourceHelper visitHelper=new VisitResourceHelper(delta);
  boolean merged=false;
  Set<RepositoryNode> topLevelNodes=getTopLevelNodes();
  for (  final RepositoryNode repoNode : topLevelNodes) {
    IProjectRepositoryNode root=repoNode.getRoot();
    if (!merged && root instanceof ProjectRepositoryNode) {
      merged=((ProjectRepositoryNode)root).getMergeRefProject();
    }
    IPath topLevelNodeWorkspaceRelativePath=topLevelNodeToPathMap.get(repoNode);
    if (topLevelNodeWorkspaceRelativePath != null && visitHelper.valid(topLevelNodeWorkspaceRelativePath,merged)) {
      if (viewer instanceof RepoViewCommonViewer) {
        runnables.add(new Runnable(){
          @Override public void run(){
            refreshTopLevelNode(repoNode);
          }
        }
);
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
@Override protected boolean visit(IResourceDelta delta,Collection<Runnable> runnables){
  VisitResourceHelper visitHelper=new VisitResourceHelper(delta);
  boolean merged=ProjectRepositoryNode.getInstance().getMergeRefProject();
  Set<RepositoryNode> topLevelNodes=getTopLevelNodes();
  for (  final RepositoryNode repoNode : topLevelNodes) {
    IPath topLevelNodeWorkspaceRelativePath=topLevelNodeToPathMap.get(repoNode);
    if (topLevelNodeWorkspaceRelativePath != null && visitHelper.valid(topLevelNodeWorkspaceRelativePath,merged)) {
      if (viewer instanceof RepoViewCommonViewer) {
        runnables.add(new Runnable(){
          @Override public void run(){
            refreshTopLevelNode(repoNode);
          }
        }
);
      }
      return false;
    }
 else {
      return true;
    }
  }
  return false;
}