Program: 129651
Project: 129651
Buggy source:
private void duplicateSingleVersionItem(final Item item,final IPath path,final String newName){
  RepositoryWorkUnit<Object> rwu=new RepositoryWorkUnit<Object>(this.getText(),this){
    @Override protected void run() throws LoginException, PersistenceException {
      try {
        final Item newItem=factory.copy(item,path,true);
        newItem.getProperty().setLabel(newName);
        newItem.getProperty().setDisplayName(newName);
        if (newItem instanceof RoutineItem) {
          synDuplicatedRoutine((RoutineItem)newItem);
        }
        ICamelDesignerCoreService service=null;
        if (GlobalServiceRegister.getDefault().isServiceRegistered(ICamelDesignerCoreService.class)) {
          service=(ICamelDesignerCoreService)GlobalServiceRegister.getDefault().getService(ICamelDesignerCoreService.class);
        }
        if (service != null && service.isInstanceofCamelBeans(item)) {
          synDuplicatedBean(newItem);
        }
        if (newItem instanceof ProcessItem) {
          RelationshipItemBuilder.getInstance().addOrUpdateItem(newItem);
        }
        if (newItem instanceof ConnectionItem) {
          ConnectionItem connectionItem=(ConnectionItem)newItem;
          connectionItem.getConnection().getSupplierDependency().clear();
        }
        factory.save(newItem);
      }
 catch (      Exception e) {
        ExceptionHandler.process(e);
      }
    }
  }
;
  rwu.setAvoidUnloadResources(true);
  factory.executeRepositoryWorkUnit(rwu);
}

Fixed version (ground truth):
private void duplicateSingleVersionItem(final Item item,final IPath path,final String newName){
  final IWorkspaceRunnable op=new IWorkspaceRunnable(){
    public void run(    IProgressMonitor monitor) throws CoreException {
      try {
        final Item newItem=factory.copy(item,path,true);
        newItem.getProperty().setLabel(newName);
        newItem.getProperty().setDisplayName(newName);
        if (newItem instanceof RoutineItem) {
          synDuplicatedRoutine((RoutineItem)newItem);
        }
        ICamelDesignerCoreService service=null;
        if (GlobalServiceRegister.getDefault().isServiceRegistered(ICamelDesignerCoreService.class)) {
          service=(ICamelDesignerCoreService)GlobalServiceRegister.getDefault().getService(ICamelDesignerCoreService.class);
        }
        if (service != null && service.isInstanceofCamelBeans(item)) {
          synDuplicatedBean(newItem);
        }
        if (newItem instanceof ProcessItem) {
          RelationshipItemBuilder.getInstance().addOrUpdateItem(newItem);
        }
        if (newItem instanceof ConnectionItem) {
          ConnectionItem connectionItem=(ConnectionItem)newItem;
          connectionItem.getConnection().getSupplierDependency().clear();
        }
        factory.save(newItem);
      }
 catch (      PersistenceException e) {
        throw new CoreException(new Status(IStatus.ERROR,"String_Node_Str","String_Node_Str",e));
      }
catch (      BusinessException e) {
        throw new CoreException(new Status(IStatus.ERROR,"String_Node_Str","String_Node_Str",e));
      }
    }
  }
;
  IRunnableWithProgress iRunnableWithProgress=new IRunnableWithProgress(){
    public void run(    IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
      IWorkspace workspace=ResourcesPlugin.getWorkspace();
      try {
        ISchedulingRule schedulingRule=workspace.getRoot();
        workspace.run(op,schedulingRule,IWorkspace.AVOID_UPDATE,monitor);
      }
 catch (      CoreException e) {
        throw new InvocationTargetException(e);
      }
    }
  }
;
  try {
    new ProgressMonitorDialog(null).run(false,false,iRunnableWithProgress);
  }
 catch (  InvocationTargetException e) {
    ExceptionHandler.process(e);
  }
catch (  InterruptedException e) {
  }
}