Program: 128958
Project: 128958
Buggy source:
@Override public void moveObject(IRepositoryViewObject objToMove,IPath newPath) throws PersistenceException {
  Project project=getRepositoryContext().getProject();
  IProject fsProject=ResourceModelUtils.getProject(project);
  String folderName=ERepositoryObjectType.getFolderName(objToMove.getRepositoryObjectType()) + IPath.SEPARATOR + newPath;
  IFolder folder=ResourceUtils.getFolder(fsProject,folderName,true);
  ERepositoryObjectType itemType=ERepositoryObjectType.getItemType(objToMove.getProperty().getItem());
  FolderItem folderItem=getFolderItem(project,itemType,newPath);
  List<IRepositoryViewObject> objects=getSerializableFromFolder(project,folderItem,null,itemType,false,false,true,true,false);
  for (  IRepositoryViewObject oject : objects) {
    if (oject.getLabel().equalsIgnoreCase(objToMove.getLabel())) {
      throw new PersistenceException("String_Node_Str" + oject.getLabel() + "String_Node_Str"+ newPath.toPortableString());
    }
  }
  List<IRepositoryViewObject> allVersionToMove=getAllVersion(getRepositoryContext().getProject(),objToMove.getId(),false);
  for (  IRepositoryViewObject obj : allVersionToMove) {
    Item currentItem=obj.getProperty().getItem();
    if (currentItem.getParent() instanceof FolderItem) {
      ((FolderItem)currentItem.getParent()).getChildren().remove(currentItem);
    }
    FolderItem newFolderItem=getFolderItem(project,objToMove.getRepositoryObjectType(),newPath);
    newFolderItem.getChildren().add(currentItem);
    currentItem.setParent(newFolderItem);
    ItemState state=obj.getProperty().getItem().getState();
    state.setPath(newPath.toString());
    xmiResourceManager.saveResource(state.eResource());
    List<Resource> affectedResources=xmiResourceManager.getAffectedResources(obj.getProperty());
    for (    Resource resource : affectedResources) {
      xmiResourceManager.saveResource(resource);
    }
    for (    Resource resource : affectedResources) {
      IPath path=folder.getFullPath().append(resource.getURI().lastSegment());
      Map<EObject,Collection<Setting>> find=EcoreUtil.ExternalCrossReferencer.find(resource);
      List<Resource> needSaves=new ArrayList<Resource>();
      for (      EObject object : find.keySet()) {
        Resource re=object.eResource();
        if (re == null) {
          continue;
        }
        EcoreUtil.resolveAll(re);
        needSaves.add(re);
      }
      xmiResourceManager.moveResource(resource,path);
      AbstractResourceChangesService resChangeService=TDQServiceRegister.getInstance().getResourceChangeService(AbstractResourceChangesService.class);
      if (resChangeService != null) {
        for (        Resource toSave : needSaves) {
          resChangeService.saveResourceByEMFShared(toSave);
        }
      }
    }
    affectedResources=xmiResourceManager.getAffectedResources(obj.getProperty());
    for (    Resource resource : affectedResources) {
      xmiResourceManager.saveResource(resource);
    }
  }
  saveProject(project);
}

Fixed version (ground truth):
@Override public void moveObject(IRepositoryViewObject objToMove,IPath newPath) throws PersistenceException {
  Project project=getRepositoryContext().getProject();
  IProject fsProject=ResourceModelUtils.getProject(project);
  String folderName=ERepositoryObjectType.getFolderName(objToMove.getRepositoryObjectType()) + IPath.SEPARATOR + newPath;
  IFolder folder=ResourceUtils.getFolder(fsProject,folderName,true);
  ERepositoryObjectType itemType=ERepositoryObjectType.getItemType(objToMove.getProperty().getItem());
  FolderItem folderItem=getFolderItem(project,itemType,newPath);
  List<IRepositoryViewObject> objects=getSerializableFromFolder(project,folderItem,null,itemType,false,false,true,true,false);
  for (  IRepositoryViewObject oject : objects) {
    if (oject.getLabel().equalsIgnoreCase(objToMove.getLabel())) {
      throw new PersistenceException("String_Node_Str" + oject.getLabel() + "String_Node_Str"+ newPath.toPortableString());
    }
  }
  List<IRepositoryViewObject> allVersionToMove=getAllVersion(getRepositoryContext().getProject(),objToMove.getId(),false);
  for (  IRepositoryViewObject obj : allVersionToMove) {
    Item currentItem=obj.getProperty().getItem();
    if (currentItem.getParent() instanceof FolderItem) {
      ((FolderItem)currentItem.getParent()).getChildren().remove(currentItem);
    }
    FolderItem newFolderItem=getFolderItem(project,objToMove.getRepositoryObjectType(),newPath);
    newFolderItem.getChildren().add(currentItem);
    currentItem.setParent(newFolderItem);
    ItemState state=obj.getProperty().getItem().getState();
    state.setPath(newPath.toString());
    xmiResourceManager.saveResource(state.eResource());
    List<Resource> affectedResources=xmiResourceManager.getAffectedResources(obj.getProperty());
    for (    Resource resource : affectedResources) {
      xmiResourceManager.saveResource(resource);
    }
    for (    Resource resource : affectedResources) {
      IPath path=folder.getFullPath().append(resource.getURI().lastSegment());
      Map<EObject,Collection<Setting>> find=EcoreUtil.ExternalCrossReferencer.find(resource);
      List<Resource> needSaves=new ArrayList<Resource>();
      for (      EObject object : find.keySet()) {
        Resource re=object.eResource();
        if (re == null) {
          continue;
        }
        EcoreUtil.resolveAll(re);
        needSaves.add(re);
      }
      moveResource(resource,path);
      AbstractResourceChangesService resChangeService=TDQServiceRegister.getInstance().getResourceChangeService(AbstractResourceChangesService.class);
      if (resChangeService != null) {
        for (        Resource toSave : needSaves) {
          resChangeService.saveResourceByEMFShared(toSave);
        }
      }
    }
    affectedResources=xmiResourceManager.getAffectedResources(obj.getProperty());
    for (    Resource resource : affectedResources) {
      xmiResourceManager.saveResource(resource);
    }
  }
  saveProject(project);
}