Program: 140495
Project: 140495
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public IStatus handleDrop(CommonDropAdapter aDropAdapter,DropTargetEvent aDropTargetEvent,Object target){
  if (aDropAdapter.getCurrentTarget() == null || aDropTargetEvent.data == null) {
    return Status.CANCEL_STATUS;
  }
  IResource[] resources=null;
  TransferData currentTransfer=aDropAdapter.getCurrentTransfer();
  if (LocalSelectionTransfer.getTransfer().isSupportedType(currentTransfer)) {
    resources=getSelectedResources();
  }
 else   if (ResourceTransfer.getInstance().isSupportedType(currentTransfer)) {
    resources=(IResource[])aDropTargetEvent.data;
  }
  if ((target instanceof IFile)) {
    TdReport findReport=RepResourceFileHelper.getInstance().findReport(((IFile)target));
    if (resources != null && resources.length > 0) {
      List<Analysis> anaList=new ArrayList<Analysis>();
      for (      IResource res : resources) {
        Analysis findAnalysis=AnaResourceFileHelper.getInstance().findAnalysis((IFile)res);
        if (findAnalysis != null) {
          anaList.add(findAnalysis);
        }
      }
      ReportHelper.addAnalyses(anaList,findReport);
      RepResourceFileHelper.getInstance().save(findReport);
    }
  }
 else   if ((target instanceof IFolder)) {
    IFolder folder=(IFolder)target;
    for (    IResource res : resources) {
      if (res.getType() != IResource.FILE) {
        return null;
      }
      String name=res.getName();
      IFile fileRes=(IFile)res;
      IFile movedIFile=folder.getFile(name);
      if (!DQStructureManager.getInstance().getModelElementSuffixs().contains(fileRes.getFileExtension())) {
        try {
          fileRes.move(movedIFile.getFullPath(),false,null);
          fileRes.getParent().refreshLocal(IResource.DEPTH_INFINITE,null);
          folder.refreshLocal(IResource.DEPTH_INFINITE,null);
        }
 catch (        CoreException e) {
          ExceptionHandler.process(e);
        }
        return Status.OK_STATUS;
      }
      List<ModelElement> oldDependencySuppliers=EObjectHelper.getDependencySuppliers(fileRes);
      List<ModelElement> oldDependencyClients=EObjectHelper.getDependencyClients(fileRes);
      EObjectHelper.removeDependencys(new IResource[]{fileRes});
      IContainer srcParent=fileRes.getParent();
      URI srcUri=URI.createPlatformResourceURI((fileRes).getFullPath().toString(),false);
      ResourceSet rs=EMFSharedResources.getSharedEmfUtil().getResourceSet();
      Resource resource=rs.getResource(srcUri,true);
      if (resource != null) {
        URI desUri=URI.createPlatformResourceURI(folder.getFullPath().toString(),false);
        EMFUtil.changeUri(resource,desUri);
        EMFSharedResources.getSharedEmfUtil().saveSingleResource(resource);
      }
      try {
        fileRes.delete(true,null);
        srcParent.refreshLocal(IResource.DEPTH_INFINITE,null);
        folder.refreshLocal(IResource.DEPTH_INFINITE,null);
      }
 catch (      CoreException e) {
        ExceptionHandler.process(e);
      }
      movedIFile=folder.getFile(name);
      EObjectHelper.addDependenciesForFile(movedIFile,oldDependencySuppliers);
      EObjectHelper.addDependenciesForFile(movedIFile,oldDependencyClients);
      for (      ModelElement element : oldDependencySuppliers) {
        EMFSharedResources.getSharedEmfUtil().saveSingleResource(element.eResource());
      }
      for (      ModelElement element : oldDependencyClients) {
        EMFSharedResources.getSharedEmfUtil().saveSingleResource(element.eResource());
      }
    }
  }
  ((DQRespositoryView)CorePlugin.getDefault().findView(DQRespositoryView.ID)).getCommonViewer().refresh();
  return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public IStatus handleDrop(CommonDropAdapter aDropAdapter,DropTargetEvent aDropTargetEvent,Object target){
  if (aDropAdapter.getCurrentTarget() == null || aDropTargetEvent.data == null) {
    return Status.CANCEL_STATUS;
  }
  IResource[] resources=null;
  TransferData currentTransfer=aDropAdapter.getCurrentTransfer();
  if (LocalSelectionTransfer.getTransfer().isSupportedType(currentTransfer)) {
    resources=getSelectedResources();
  }
 else   if (ResourceTransfer.getInstance().isSupportedType(currentTransfer)) {
    resources=(IResource[])aDropTargetEvent.data;
  }
  if ((target instanceof IFile)) {
    TdReport findReport=RepResourceFileHelper.getInstance().findReport(((IFile)target));
    if (resources != null && resources.length > 0) {
      List<Analysis> anaList=new ArrayList<Analysis>();
      for (      IResource res : resources) {
        Analysis findAnalysis=AnaResourceFileHelper.getInstance().findAnalysis((IFile)res);
        if (findAnalysis != null) {
          anaList.add(findAnalysis);
        }
      }
      ReportHelper.addAnalyses(anaList,findReport);
      RepResourceFileHelper.getInstance().save(findReport);
    }
  }
 else   if ((target instanceof IFolder)) {
    IFolder folder=(IFolder)target;
    for (    IResource res : resources) {
      if (res.getType() != IResource.FILE) {
        return null;
      }
      String name=res.getName();
      IFile fileRes=(IFile)res;
      IFile movedIFile=folder.getFile(name);
      if (!DQStructureManager.getInstance().getModelElementSuffixs().contains(fileRes.getFileExtension())) {
        try {
          fileRes.move(movedIFile.getFullPath(),false,null);
          fileRes.getParent().refreshLocal(IResource.DEPTH_INFINITE,null);
          folder.refreshLocal(IResource.DEPTH_INFINITE,null);
        }
 catch (        CoreException e) {
          ExceptionHandler.process(e);
        }
        return Status.OK_STATUS;
      }
      List<ModelElement> oldDependencySuppliers=EObjectHelper.getDependencySuppliers(fileRes);
      List<ModelElement> oldDependencyClients=EObjectHelper.getDependencyClients(fileRes);
      EObjectHelper.removeDependencys(new IResource[]{fileRes});
      IContainer srcParent=fileRes.getParent();
      URI srcUri=URI.createPlatformResourceURI((fileRes).getFullPath().toString(),false);
      ResourceSet rs=EMFSharedResources.getSharedEmfUtil().getResourceSet();
      Resource resource=rs.getResource(srcUri,true);
      if (resource != null) {
        URI desUri=URI.createPlatformResourceURI(folder.getFullPath().toString(),false);
        EMFUtil.changeUri(resource,desUri);
        EMFSharedResources.getSharedEmfUtil().saveSingleResource(resource);
      }
      try {
        fileRes.delete(true,null);
        srcParent.refreshLocal(IResource.DEPTH_INFINITE,null);
        folder.refreshLocal(IResource.DEPTH_INFINITE,null);
      }
 catch (      CoreException e) {
        ExceptionHandler.process(e);
      }
      movedIFile=folder.getFile(name);
      EObjectHelper.addDependenciesForFile(movedIFile,oldDependencySuppliers);
      EObjectHelper.addDependenciesForModelElement(movedIFile,oldDependencyClients);
      for (      ModelElement element : oldDependencySuppliers) {
        EMFSharedResources.getSharedEmfUtil().saveSingleResource(element.eResource());
      }
      for (      ModelElement element : oldDependencyClients) {
        EMFSharedResources.getSharedEmfUtil().saveSingleResource(element.eResource());
      }
    }
  }
  ((DQRespositoryView)CorePlugin.getDefault().findView(DQRespositoryView.ID)).getCommonViewer().refresh();
  return null;
}