Program: 125693
Project: 125693
Buggy source:
@Override public void resourceChanged(IResourceChangeEvent event){
  if (viewer == null || resourcevisitors == null || resourcevisitors.isEmpty()) {
    return;
  }
  final Control ctrl=viewer.getControl();
  if (ctrl == null || ctrl.isDisposed()) {
    return;
  }
  final Collection<Runnable> runnables=new HashSet<>();
  final Collection<ResourceNode> pathToRefresh=new HashSet<>();
  for (  IResourceDeltaVisitor visitor : resourcevisitors) {
    if (visitor instanceof RunnableResourceVisitor) {
      ((RunnableResourceVisitor)visitor).setRunnables(runnables);
    }
    if (visitor instanceof ResourceCollectorVisitor) {
      ((ResourceCollectorVisitor)visitor).setRunnables(pathToRefresh);
    }
    try {
      event.getDelta().accept(visitor);
    }
 catch (    CoreException e) {
    }
  }
  if (!runnables.isEmpty()) {
    if (ctrl.getDisplay().getThread() == Thread.currentThread()) {
      runUpdates(runnables);
    }
 else {
      ctrl.getDisplay().asyncExec(new Runnable(){
        @Override public void run(){
          Control ctrl2=viewer.getControl();
          if (ctrl2 == null || ctrl2.isDisposed()) {
            return;
          }
          runUpdates(runnables);
        }
      }
);
    }
  }
  if (!pathToRefresh.isEmpty()) {
    Display.getDefault().asyncExec(new Runnable(){
      @Override public void run(){
        for (        ResourceNode resourceNode : pathToRefresh) {
          XmiResourceManager xrm=new XmiResourceManager();
          if (xrm.isPropertyFile(resourceNode.getPath())) {
            List<IRepositoryNode> nodes=new ArrayList<>();
            for (            Object object : viewer.getExpandedElements()) {
              if (object instanceof IRepositoryNode) {
                nodes.add((IRepositoryNode)object);
              }
            }
            IFile file=ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(resourceNode.getPath()));
            Property property=xrm.loadProperty(file);
            IRepositoryNode itemNode=findItemNode(property.getId(),nodes);
            if (itemNode != null) {
              IRepositoryViewObject object=itemNode.getObject();
              if (object != null) {
                object.getProperty();
              }
              if (itemNode != null && viewer != null && !viewer.getTree().isDisposed()) {
                viewer.refresh(itemNode,true);
              }
            }
          }
 else {
            String folder=resourceNode.getPath().replace(resourceNode.getTopNodePath(),"String_Node_Str");
            IRepositoryNode nodeToRefresh=findFolder(folder,resourceNode.getTopNode());
            if (nodeToRefresh != null) {
              if (nodeToRefresh != null && viewer != null && !viewer.getTree().isDisposed()) {
                viewer.refresh(nodeToRefresh,false);
              }
            }
          }
        }
      }
    }
);
  }
}

Fixed version (ground truth):
@Override public void resourceChanged(IResourceChangeEvent event){
  if (viewer == null || resourcevisitors == null || resourcevisitors.isEmpty()) {
    return;
  }
  final Control ctrl=viewer.getControl();
  if (ctrl == null || ctrl.isDisposed()) {
    return;
  }
  final Collection<Runnable> runnables=new HashSet<>();
  final Collection<ResourceNode> pathToRefresh=new HashSet<>();
  for (  IResourceDeltaVisitor visitor : resourcevisitors) {
    if (visitor instanceof RunnableResourceVisitor) {
      ((RunnableResourceVisitor)visitor).setRunnables(runnables);
    }
    if (visitor instanceof ResourceCollectorVisitor) {
      ((ResourceCollectorVisitor)visitor).setRunnables(pathToRefresh);
    }
    try {
      event.getDelta().accept(visitor);
    }
 catch (    CoreException e) {
    }
  }
  if (!runnables.isEmpty()) {
    if (ctrl.getDisplay().getThread() == Thread.currentThread()) {
      runUpdates(runnables);
    }
 else {
      ctrl.getDisplay().asyncExec(new Runnable(){
        @Override public void run(){
          Control ctrl2=viewer.getControl();
          if (ctrl2 == null || ctrl2.isDisposed()) {
            return;
          }
          runUpdates(runnables);
        }
      }
);
    }
  }
  if (!pathToRefresh.isEmpty()) {
    Display.getDefault().asyncExec(new Runnable(){
      @Override public void run(){
        for (        ResourceNode resourceNode : pathToRefresh) {
          XmiResourceManager xrm=new XmiResourceManager();
          if (xrm.isPropertyFile(resourceNode.getPath())) {
            List<IRepositoryNode> nodes=new ArrayList<>();
            for (            Object object : viewer.getExpandedElements()) {
              if (object instanceof IRepositoryNode) {
                nodes.add((IRepositoryNode)object);
              }
            }
            IFile file=ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(resourceNode.getPath()));
            Property property=xrm.loadProperty(file);
            if (property != null) {
              IRepositoryNode itemNode=findItemNode(property.getId(),nodes);
              if (itemNode != null) {
                IRepositoryViewObject object=itemNode.getObject();
                if (object != null) {
                  object.getProperty();
                }
                if (itemNode != null && viewer != null && !viewer.getTree().isDisposed()) {
                  viewer.refresh(itemNode,true);
                }
              }
            }
          }
 else {
            String folder=null;
            if (resourceNode.getPath().startsWith(resourceNode.getTopNodePath())) {
              folder=resourceNode.getPath().replace(resourceNode.getTopNodePath(),"String_Node_Str");
            }
 else {
              folder="String_Node_Str";
            }
            IRepositoryNode nodeToRefresh=findFolder(folder,resourceNode.getTopNode());
            if (nodeToRefresh != null) {
              if (nodeToRefresh != null && viewer != null && !viewer.getTree().isDisposed()) {
                viewer.refresh(nodeToRefresh,false);
              }
            }
          }
        }
      }
    }
);
  }
}