nus-yam/ex-repair huggingface dataset:
Program: 137869
Project: 137869
Buggy source:
@Override public Map<String,List<String>> getRoutineAndJars(){
  throw new UnsupportedOperationException();
}

Fixed version (ground truth):
@Override public Map<String,List<LibraryInfo>> getRoutineAndJars(){
  throw new UnsupportedOperationException();
}
Program: 137870
Project: 137870
Buggy source:
/** 
 * Save item with dependencies.
 * @param element
 */
protected ReturnCode saveWithDependencies(Item item,ModelElement element){
  ReturnCode rc=new ReturnCode();
  addDependencies(element);
  addResourceContent(element.eResource(),element);
  Map<EObject,Collection<Setting>> find=EcoreUtil.ExternalCrossReferencer.find(element.eResource());
  Set<Resource> needSaves=new HashSet<Resource>();
  for (  EObject object : find.keySet()) {
    Resource re=object.eResource();
    if (re == null) {
      continue;
    }
    needSaves.add(re);
  }
  try {
    ProxyRepositoryFactory.getInstance().save(item);
  }
 catch (  PersistenceException e) {
    log.error(e,e);
    rc.setOk(Boolean.FALSE);
    rc.setMessage(e.getMessage());
  }
  AbstractResourceChangesService resChangeService=TDQServiceRegister.getInstance().getResourceChangeService(AbstractResourceChangesService.class);
  if (resChangeService != null) {
    for (    Resource toSave : needSaves) {
      EcoreUtil.resolveAll(toSave);
      resChangeService.saveResourceByEMFShared(toSave);
    }
  }
  return rc;
}

Fixed version (ground truth):
/** 
 * Save item with dependencies.
 * @param element
 */
protected ReturnCode saveWithDependencies(Item item,ModelElement element){
  ReturnCode rc=new ReturnCode();
  addDependencies(element);
  addResourceContent(element.eResource(),element);
  Map<EObject,Collection<Setting>> find=EcoreUtil.ExternalCrossReferencer.find(element.eResource());
  Set<Resource> needSaves=new HashSet<Resource>();
  for (  EObject object : find.keySet()) {
    Resource re=object.eResource();
    if (re == null) {
      continue;
    }
    EcoreUtil.resolveAll(re);
    needSaves.add(re);
  }
  try {
    ProxyRepositoryFactory.getInstance().save(item);
  }
 catch (  PersistenceException e) {
    log.error(e,e);
    rc.setOk(Boolean.FALSE);
    rc.setMessage(e.getMessage());
  }
  AbstractResourceChangesService resChangeService=TDQServiceRegister.getInstance().getResourceChangeService(AbstractResourceChangesService.class);
  if (resChangeService != null) {
    for (    Resource toSave : needSaves) {
      resChangeService.saveResourceByEMFShared(toSave);
    }
  }
  return rc;
}
Program: 137871
Project: 137871
Buggy source:
/** 
 * DOC xqliu Comment method "moveHiddenFolders".
 * @param srcFolder
 * @param tarFolder
 */
public static void moveHiddenFolders(File srcFolder,File tarFolder){
  if (srcFolder == null || tarFolder == null) {
    return;
  }
  File[] listFiles=srcFolder.listFiles();
  for (  File file : listFiles) {
    if (file.isDirectory()) {
      if (file.getName().startsWith("String_Node_Str")) {
        FilesUtils.copyDirectory(file,tarFolder);
      }
 else {
        moveHiddenFolders(file,getTargetFile(file,srcFolder,tarFolder));
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC xqliu Comment method "moveHiddenFolders".
 * @param srcFolder
 * @param tarFolder
 */
public static void moveHiddenFolders(File srcFolder,File tarFolder){
  if (srcFolder == null || tarFolder == null) {
    return;
  }
  File[] listFiles=srcFolder.listFiles();
  for (  File file : listFiles) {
    if (file.isDirectory()) {
      if (file.getName().startsWith("String_Node_Str")) {
        if (file.getName().equals("String_Node_Str")) {
          continue;
        }
        FilesUtils.copyDirectory(file,tarFolder);
      }
 else {
        moveHiddenFolders(file,getTargetFile(file,srcFolder,tarFolder));
      }
    }
  }
}
Program: 137872
Project: 137872
Buggy source:
/** 
 * when the drill down is : invalid, should find all rows which not start with 1~9,and 0. this include: null, and not digitals.
 * @return
 */
private String getInvalidClause(){
  String value="String_Node_Str";
  if (isSybase()) {
    return columnName + "String_Node_Str" + this.columnName+ "String_Node_Str"+ dbmsLanguage.like()+ "String_Node_Str";
  }
 else   if (isPostGreSQL()) {
    return columnName + "String_Node_Str" + columnName+ "String_Node_Str";
  }
 else   if (isTeradata()) {
    return columnName + "String_Node_Str" + columnName+ "String_Node_Str";
  }
 else   if (isOracle()) {
    value="String_Node_Str" + dbmsLanguage.like() + "String_Node_Str";
  }
  return columnName + "String_Node_Str" + columnName+ value;
}

Fixed version (ground truth):
/** 
 * when the drill down is : invalid, should find all rows which not start with 1~9,and 0. this include: null, and not digitals.
 * @return
 */
private String getInvalidClause(){
  String value="String_Node_Str";
  if (isSybase()) {
    return columnName + "String_Node_Str" + this.columnName+ "String_Node_Str"+ dbmsLanguage.like()+ "String_Node_Str";
  }
 else   if (isPostGreSQL()) {
    return columnName + "String_Node_Str" + columnName+ "String_Node_Str";
  }
 else   if (isTeradata()) {
    return columnName + "String_Node_Str" + columnName+ "String_Node_Str";
  }
 else   if (isOracle()) {
    return columnName + "String_Node_Str" + "String_Node_Str"+ columnName+ "String_Node_Str";
  }
 else   if (isDB2()) {
    value="String_Node_Str";
  }
 else   if (isSqlServer()) {
    value="String_Node_Str" + dbmsLanguage.like() + "String_Node_Str";
  }
 else   if (isInformix()) {
    value="String_Node_Str" + dbmsLanguage.like() + "String_Node_Str";
  }
  return columnName + "String_Node_Str" + columnName+ value;
}
Program: 137874
Project: 137874
Buggy source:
/** 
 * paint dragging column. MOD sizhaoliu TDQ-6010 extract this method so that it can be customized.
 * @param gc
 * @param offset 
 * @param alpha 
 */
protected void paintDraggingColumn(GC gc,int offset,int alpha){
  int y=0;
  gc.setAlpha(alpha);
  columnBeingPushed.getHeaderRenderer().setSelected(true);
  int height=0;
  if (columnBeingPushed.getColumnGroup() != null) {
    height=headerHeight - groupHeaderHeight;
    y=groupHeaderHeight;
  }
 else {
    height=headerHeight;
    y=0;
  }
  columnBeingPushed.getHeaderRenderer().setBounds(currentHeaderDragX - columnBeingPushed.getWidth() / 2 + offset,y,columnBeingPushed.getWidth(),height);
  columnBeingPushed.getHeaderRenderer().paint(gc,columnBeingPushed);
  columnBeingPushed.getHeaderRenderer().setSelected(false);
  gc.setAlpha(-1);
  gc.setAdvanced(false);
}

Fixed version (ground truth):
/** 
 * paint dragging column. MOD sizhaoliu TDQ-6010 extract this method so that it can be customized.
 * @param gc
 * @param offset 
 * @param alpha 
 */
protected void paintDraggingColumn(GC gc,int offset,int alpha){
  int y=0;
  gc.setAlpha(alpha);
  columnBeingPushed.getHeaderRenderer().setSelected(true);
  int height=0;
  if (columnBeingPushed.getColumnGroup() != null) {
    height=headerHeight - groupHeaderHeight;
    y=groupHeaderHeight;
  }
 else {
    height=headerHeight;
    y=0;
  }
  columnBeingPushed.getHeaderRenderer().setBounds(currentHeaderDragX - columnBeingPushed.getWidth() / 2 + offset,y,columnBeingPushed.getWidth(),height);
  columnBeingPushed.getHeaderRenderer().paint(gc,columnBeingPushed);
  gc.setAlpha(-1);
  gc.setAdvanced(false);
}
Program: 137877
Project: 137877
Buggy source:
public Job initializeTemplates(){
  return null;
}

Fixed version (ground truth):
@Override public Job initializeTemplates(){
  return null;
}
Program: 137878
Project: 137878
Buggy source:
public void deleteAllJobs(boolean fromPluginModel){
}

Fixed version (ground truth):
@Override public void deleteAllJobs(boolean fromPluginModel){
}
Program: 137879
Project: 137879
Buggy source:
public boolean getContextFlagFromQueryUtils(){
  return false;
}

Fixed version (ground truth):
@Override public boolean getContextFlagFromQueryUtils(){
  return false;
}
Program: 137880
Project: 137880
Buggy source:
public void syncAllBeans() throws SystemException {
}

Fixed version (ground truth):
@Override public void syncAllBeans() throws SystemException {
}
Program: 137881
Project: 137881
Buggy source:
public IMetadataTable convert(MetadataTable originalTable){
  return null;
}

Fixed version (ground truth):
@Override public IMetadataTable convert(MetadataTable originalTable){
  return null;
}
Program: 137882
Project: 137882
Buggy source:
public void synchronizeSapLib(){
}

Fixed version (ground truth):
@Override public void synchronizeSapLib(){
}
Program: 137883
Project: 137883
Buggy source:
public boolean checkJob(String name) throws BusinessException {
  return false;
}

Fixed version (ground truth):
@Override public boolean checkJob(String name) throws BusinessException {
  return false;
}
Program: 137884
Project: 137884
Buggy source:
public String getContextFileNameForPerl(String projectName,String jobName,String version,String context){
  return null;
}

Fixed version (ground truth):
@Override public String getContextFileNameForPerl(String projectName,String jobName,String version,String context){
  return null;
}
Program: 137885
Project: 137885
Buggy source:
public String getLanTypeString(){
  return null;
}

Fixed version (ground truth):
@Override public String getLanTypeString(){
  return null;
}
Program: 137886
Project: 137886
Buggy source:
public void removeJobLaunch(IRepositoryViewObject objToDelete){
}

Fixed version (ground truth):
@Override public void removeJobLaunch(IRepositoryViewObject objToDelete){
}
Program: 137887
Project: 137887
Buggy source:
public void deleteBeanfile(IRepositoryViewObject objToDelete){
}

Fixed version (ground truth):
@Override public void deleteBeanfile(IRepositoryViewObject objToDelete){
}
Program: 137888
Project: 137888
Buggy source:
public void componentsReset(){
}

Fixed version (ground truth):
@Override public void componentsReset(){
}
Program: 137889
Project: 137889
Buggy source:
public String getJavaJobFolderName(String jobName,String version){
  return null;
}

Fixed version (ground truth):
@Override public String getJavaJobFolderName(String jobName,String version){
  return null;
}
Program: 137890
Project: 137890
Buggy source:
public List<ColumnNameChanged> getRemoveMetadataColumns(IMetadataTable oldTable,IMetadataTable newTable){
  return null;
}

Fixed version (ground truth):
@Override public List<ColumnNameChanged> getRemoveMetadataColumns(IMetadataTable oldTable,IMetadataTable newTable){
  return null;
}
Program: 137891
Project: 137891
Buggy source:
public void resetUniservLibraries(){
}

Fixed version (ground truth):
@Override public void resetUniservLibraries(){
}
Program: 137892
Project: 137892
Buggy source:
public Image getImageWithDocExt(String extension){
  return null;
}

Fixed version (ground truth):
@Override public Image getImageWithDocExt(String extension){
  return null;
}
Program: 137893
Project: 137893
Buggy source:
public String validateValueForDBType(String columnName){
  return null;
}

Fixed version (ground truth):
@Override public String validateValueForDBType(String columnName){
  return null;
}
Program: 137894
Project: 137894
Buggy source:
public void createStatsLogAndImplicitParamter(Project project){
}

Fixed version (ground truth):
@Override public void createStatsLogAndImplicitParamter(Project project){
}
Program: 137895
Project: 137895
Buggy source:
public String getLastUser(){
  return null;
}

Fixed version (ground truth):
@Override public String getLastUser(){
  return null;
}
Program: 137896
Project: 137896
Buggy source:
public void syncAllRoutines() throws SystemException {
}

Fixed version (ground truth):
@Override public void syncAllRoutines() throws SystemException {
}
Program: 137897
Project: 137897
Buggy source:
public void deleteRoutinefile(IRepositoryViewObject objToDelete){
}

Fixed version (ground truth):
@Override public void deleteRoutinefile(IRepositoryViewObject objToDelete){
}
Program: 137898
Project: 137898
Buggy source:
public void syncAllRules(){
}

Fixed version (ground truth):
@Override public void syncAllRules(){
}
Program: 137899
Project: 137899
Buggy source:
public String getRootProjectNameForPerl(Item item){
  return null;
}

Fixed version (ground truth):
@Override public String getRootProjectNameForPerl(Item item){
  return null;
}
Program: 137900
Project: 137900
Buggy source:
public boolean isKeyword(String word){
  return false;
}

Fixed version (ground truth):
@Override public boolean isKeyword(String word){
  return false;
}
Program: 137901
Project: 137901
Buggy source:
public List<ColumnNameChanged> getNewMetadataColumns(IMetadataTable oldTable,IMetadataTable newTable){
  return null;
}

Fixed version (ground truth):
@Override public List<ColumnNameChanged> getNewMetadataColumns(IMetadataTable oldTable,IMetadataTable newTable){
  return null;
}
Program: 137902
Project: 137902
Buggy source:
public boolean isContainContextParam(String code){
  return false;
}

Fixed version (ground truth):
@Override public boolean isContainContextParam(String code){
  return false;
}
Program: 137903
Project: 137903
Buggy source:
public String getJavaProjectFolderName(Item item){
  return null;
}

Fixed version (ground truth):
@Override public String getJavaProjectFolderName(Item item){
  return null;
}
Program: 137904
Project: 137904
Buggy source:
public IResource getSpecificResourceInJavaProject(IPath path) throws CoreException {
  return null;
}

Fixed version (ground truth):
@Override public IResource getSpecificResourceInJavaProject(IPath path) throws CoreException {
  return null;
}
Program: 137905
Project: 137905
Buggy source:
public void updatePalette(){
}

Fixed version (ground truth):
@Override public void updatePalette(){
}
Program: 137906
Project: 137906
Buggy source:
public boolean isOpenedItemInEditor(IRepositoryViewObject object){
  return false;
}

Fixed version (ground truth):
@Override public boolean isOpenedItemInEditor(IRepositoryViewObject object){
  return false;
}
Program: 137907
Project: 137907
Buggy source:
public List<String> readWorkspaceTasksDone(){
  return new ArrayList<String>();
}

Fixed version (ground truth):
@Override public List<String> readWorkspaceTasksDone(){
  return new ArrayList<String>();
}
Program: 137908
Project: 137908
Buggy source:
public List<ColumnNameChanged> getColumnNameChanged(IMetadataTable oldTable,IMetadataTable newTable){
  return null;
}

Fixed version (ground truth):
@Override public List<ColumnNameChanged> getColumnNameChanged(IMetadataTable oldTable,IMetadataTable newTable){
  return null;
}
Program: 137909
Project: 137909
Buggy source:
public void synchronizeMapptingXML(){
}

Fixed version (ground truth):
@Override public void synchronizeMapptingXML(){
}
Program: 137910
Project: 137910
Buggy source:
public void initializeForTalendStartupJob(){
}

Fixed version (ground truth):
@Override public void initializeForTalendStartupJob(){
}
Program: 137911
Project: 137911
Buggy source:
public String filterSpecialChar(String input){
  return null;
}

Fixed version (ground truth):
@Override public String filterSpecialChar(String input){
  return null;
}
Program: 137912
Project: 137912
Buggy source:
public IResource getSpecificResourceInPerlProject(IPath path) throws CoreException {
  return null;
}

Fixed version (ground truth):
@Override public IResource getSpecificResourceInPerlProject(IPath path) throws CoreException {
  return null;
}
Program: 137913
Project: 137913
Buggy source:
public void syncLibraries(IProgressMonitor... monitorWrap){
}

Fixed version (ground truth):
@Override public void syncLibraries(IProgressMonitor... monitorWrap){
}
Program: 137914
Project: 137914
Buggy source:
public String getTemplateString(){
  return null;
}

Fixed version (ground truth):
@Override public String getTemplateString(){
  return null;
}
Program: 137915
Project: 137915
Buggy source:
public MenuManager[] getRepositoryContextualsActionGroups(){
  return null;
}

Fixed version (ground truth):
@Override public MenuManager[] getRepositoryContextualsActionGroups(){
  return null;
}
Program: 137916
Project: 137916
Buggy source:
public boolean isAlreadyBuilt(Project project){
  return false;
}

Fixed version (ground truth):
@Override public boolean isAlreadyBuilt(Project project){
  return false;
}
Program: 137917
Project: 137917
Buggy source:
public String getParameterUNIQUENAME(NodeType node){
  return null;
}

Fixed version (ground truth):
@Override public String getParameterUNIQUENAME(NodeType node){
  return null;
}
Program: 137918
Project: 137918
Buggy source:
public IPreferenceStore getPreferenceStore(){
  return CorePlugin.getDefault().getPreferenceStore();
}

Fixed version (ground truth):
@Override public IPreferenceStore getPreferenceStore(){
  return CorePlugin.getDefault().getPreferenceStore();
}
Program: 137919
Project: 137919
Buggy source:
public ImageDescriptor getImageWithSpecial(Image source){
  return null;
}

Fixed version (ground truth):
@Override public ImageDescriptor getImageWithSpecial(Image source){
  return null;
}
Program: 137920
Project: 137920
Buggy source:
public Map<String,List<URI>> getRoutineAndJars(){
  return null;
}

Fixed version (ground truth):
@Override public Map<String,List<String>> getRoutineAndJars(){
  return null;
}
Program: 137921
Project: 137921
Buggy source:
public void initializeComponents(IProgressMonitor monitor){
}

Fixed version (ground truth):
@Override public void initializeComponents(IProgressMonitor monitor){
}
Program: 137922
Project: 137922
Buggy source:
public void setFlagForQueryUtils(boolean flag){
}

Fixed version (ground truth):
@Override public void setFlagForQueryUtils(boolean flag){
}
Program: 137923
Project: 137923
Buggy source:
public void addWorkspaceTaskDone(String task){
}

Fixed version (ground truth):
@Override public void addWorkspaceTaskDone(String task){
}
Program: 137924
Project: 137924
Buggy source:
public void removeItemRelations(Item item){
}

Fixed version (ground truth):
@Override public void removeItemRelations(Item item){
}
Program: 137925
Project: 137925
Buggy source:
@Override public Map<String,List<URI>> getRoutineAndJars(){
  throw new UnsupportedOperationException();
}

Fixed version (ground truth):
@Override public Map<String,List<String>> getRoutineAndJars(){
  throw new UnsupportedOperationException();
}
Program: 137926
Project: 137926
Buggy source:
/** 
 * Resize event handler.
 */
private void onResize(){
  scrollValuesObsolete=true;
  topIndex=-1;
  bottomIndex=-1;
}

Fixed version (ground truth):
/** 
 * Resize event handler.
 */
private void onResize(){
  scrollValuesObsolete=true;
  topIndex=-1;
  bottomIndex=-1;
  startColumnIndex=-1;
  endColumnIndex=-1;
}
Program: 137927
Project: 137927
Buggy source:
/** 
 * Scrollbar selection event handler.
 */
private void onScrollSelection(){
  topIndex=-1;
  bottomIndex=-1;
  refreshHoverState();
  redraw(getClientArea().x,getClientArea().y,getClientArea().width,getClientArea().height,false);
}

Fixed version (ground truth):
/** 
 * Scrollbar selection event handler.
 */
private void onScrollSelection(){
  topIndex=-1;
  bottomIndex=-1;
  startColumnIndex=-1;
  endColumnIndex=-1;
  refreshHoverState();
  redraw(getClientArea().x,getClientArea().y,getClientArea().width,getClientArea().height,false);
}
Program: 137928
Project: 137928
Buggy source:
private void onMouseMove(MouseEvent e){
  Point cell=getCell(new Point(e.x,e.y));
  if (cell != null && cell.x != 0) {
    GridVisibleRange range=getVisibleRange();
    for (    GridItem item : range.getItems()) {
      int i=indexOf(item);
      if (i == cell.y) {
        item.setBackground(0,yellow);
      }
 else {
        item.setBackground(0,gray);
      }
      for (int j=1; j < getColumns().length; j++) {
        if (i == cell.y && j == cell.x) {
          item.setBackground(j,yellow);
        }
 else         if (i == cell.y && j < cell.x || j == cell.x && i < cell.y) {
          item.setBackground(j,lightYellow);
        }
 else {
          item.setBackground(j,null);
        }
      }
    }
    for (int j=0; j < getColumnCount(); j++) {
      getColumn(j).getHeaderRenderer().setSelected(j == cell.x);
    }
  }
}

Fixed version (ground truth):
private void onMouseMove(MouseEvent e){
  Point cell=getCell(new Point(e.x,e.y));
  if (cell != null && cell.x != 0) {
    GridVisibleRange range=getVisibleRange();
    for (    GridItem item : range.getItems()) {
      int i=indexOf(item);
      if (i == cell.y) {
        item.setBackground(0,yellow);
      }
 else {
        item.setBackground(0,gray);
      }
      for (      GridColumn column : range.getColumns()) {
        int j=indexOf(column);
        if (i == cell.y && j == cell.x) {
          item.setBackground(j,yellow);
        }
 else         if (i == cell.y && j < cell.x || j == cell.x && i < cell.y) {
          item.setBackground(j,lightYellow);
        }
 else {
          item.setBackground(j,null);
        }
      }
    }
    for (int j=0; j < getColumnCount(); j++) {
      getColumn(j).getHeaderRenderer().setSelected(j == cell.x);
    }
  }
}
Program: 137929
Project: 137929
Buggy source:
/** 
 * if these items in recycle bin are depended by others which is not in recycle bin,show a warning and return.
 * @param allNodes
 * @return
 */
public static boolean canEmptyRecyBin(List<IRepositoryNode> allNodes){
  for (  IRepositoryNode node : allNodes) {
    List<ModelElement> dependencies=EObjectHelper.getDependencyClients(node);
    if (dependencies == null || dependencies.isEmpty()) {
      continue;
    }
    for (    ModelElement mod : dependencies) {
      Property property=PropertyHelper.getProperty(mod);
      if (property == null) {
        continue;
      }
      Item item=property.getItem();
      if (item != null && !item.getState().isDeleted()) {
        return false;
      }
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * if these items in recycle bin are depended by others which is not in recycle bin,show a warning and return.
 * @param allNodes
 * @return
 */
public static boolean canEmptyRecyBin(List<IRepositoryNode> allNodes){
  if (allNodes == null) {
    return false;
  }
  for (  IRepositoryNode node : allNodes) {
    List<ModelElement> dependencies=EObjectHelper.getDependencyClients(node);
    if (dependencies == null || dependencies.isEmpty()) {
      continue;
    }
    for (    ModelElement mod : dependencies) {
      Property property=PropertyHelper.getProperty(mod);
      if (property == null) {
        continue;
      }
      Item item=property.getItem();
      if (item != null && !item.getState().isDeleted()) {
        return false;
      }
    }
  }
  return true;
}
Program: 137930
Project: 137930
Buggy source:
/** 
 * get the link files which link to the Report Generated Doc File.
 * @param file Report file
 * @return
 */
public static List<IFile> getRepDocLinkFiles(IFile file){
  List<IFile> linkFiles=new ArrayList<IFile>();
  try {
    IResource[] reportListFiles=ReportUtils.getReportListFiles(file);
    for (    IResource res : reportListFiles) {
      IFile linkFile=ResourceManager.getRoot().getFile(res.getFullPath());
      if (linkFile.exists() && linkFile.isLinked()) {
        linkFiles.add(linkFile);
      }
    }
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
  return linkFiles;
}

Fixed version (ground truth):
/** 
 * get the link files which link to the Report Generated Doc File.
 * @param file Report file
 * @return
 */
public static List<IFile> getRepDocLinkFiles(IFile file){
  List<IFile> linkFiles=new ArrayList<IFile>();
  if (file != null) {
    try {
      IResource[] reportListFiles=ReportUtils.getReportListFiles(file);
      for (      IResource res : reportListFiles) {
        IFile linkFile=ResourceManager.getRoot().getFile(res.getFullPath());
        if (linkFile.exists() && linkFile.isLinked()) {
          linkFiles.add(linkFile);
        }
      }
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
  }
  return linkFiles;
}
Program: 137931
Project: 137931
Buggy source:
private boolean allowDND(IRepositoryNode sourceNode,IRepositoryNode targetNode){
  IPath sourcePath=WorkbenchUtils.getPath((RepositoryNode)sourceNode);
  IPath targetPath=WorkbenchUtils.getPath((RepositoryNode)targetNode);
  int sourceCount=sourcePath.segmentCount();
  int targetCount=targetPath.segmentCount();
  if (sourceCount == 1 || targetCount == 1) {
    return false;
  }
  if (isForbidNode(sourceNode)) {
    return false;
  }
  if (isSubObjectType(sourceNode,targetNode)) {
    return false;
  }
  IRepositoryViewObject object=sourceNode.getObject();
  if (object != null) {
    if (object.getProperty().getItem().getState().isLocked()) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean allowDND(IRepositoryNode sourceNode,IRepositoryNode targetNode){
  IPath sourcePath=WorkbenchUtils.getPath(sourceNode);
  IPath targetPath=WorkbenchUtils.getPath(targetNode);
  int sourceCount=sourcePath.segmentCount();
  int targetCount=targetPath.segmentCount();
  if (sourceCount == 1 || targetCount == 1) {
    return false;
  }
  if (isForbidNode(sourceNode)) {
    return false;
  }
  if (isSubObjectType(sourceNode,targetNode)) {
    return false;
  }
  IRepositoryViewObject object=sourceNode.getObject();
  if (object != null) {
    if (object.getProperty().getItem().getState().isLocked()) {
      return false;
    }
  }
  return true;
}
Program: 137933
Project: 137933
Buggy source:
/** 
 * move the IRepositoryViewObject from the sourceNode to targetNode, don't refresh the source and target node, user need to refresh the dq repository view tree by hand.
 * @param objectToMove
 * @param sourceNode
 * @param targetNode
 * @param basePath
 */
public void moveObject(IRepositoryViewObject objectToMove,IRepositoryNode sourceNode,IRepositoryNode targetNode,IPath basePath){
  IPath targetPath=WorkbenchUtils.getPath((RepositoryNode)targetNode);
  try {
    IPath makeRelativeTo=Path.EMPTY;
    if (!basePath.isEmpty()) {
      makeRelativeTo=targetPath.makeRelativeTo(basePath);
    }
    factory.moveObject(objectToMove,makeRelativeTo,Path.EMPTY);
  }
 catch (  PersistenceException e) {
    Log.error(sourceNode,e);
  }
catch (  BusinessException e) {
    Log.error(sourceNode,e);
  }
}

Fixed version (ground truth):
/** 
 * move the IRepositoryViewObject from the sourceNode to targetNode, don't refresh the source and target node, user need to refresh the dq repository view tree by hand.
 * @param objectToMove
 * @param sourceNode
 * @param targetNode
 * @param basePath
 */
public void moveObject(IRepositoryViewObject objectToMove,IRepositoryNode sourceNode,IRepositoryNode targetNode,IPath basePath){
  IPath targetPath=WorkbenchUtils.getPath(targetNode);
  try {
    IPath makeRelativeTo=Path.EMPTY;
    if (!basePath.isEmpty()) {
      makeRelativeTo=targetPath.makeRelativeTo(basePath);
    }
    factory.moveObject(objectToMove,makeRelativeTo,Path.EMPTY);
  }
 catch (  PersistenceException e) {
    Log.error(sourceNode,e);
  }
catch (  BusinessException e) {
    Log.error(sourceNode,e);
  }
}
Program: 137934
Project: 137934
Buggy source:
private void closeEditorIfOpened(IRepositoryNode fileNode){
  IWorkbenchPage activePage=CorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
  IEditorReference[] editorReferences=activePage.getEditorReferences();
  for (  IEditorReference reference : editorReferences) {
    try {
      IEditorInput editorInput=reference.getEditorInput();
      if (editorInput instanceof AbstractItemEditorInput) {
        AbstractItemEditorInput fileInput=(AbstractItemEditorInput)editorInput;
        if (fileNode.getObject().getLabel().equals(fileInput.getItem().getProperty().getLabel())) {
          activePage.closeEditor(reference.getEditor(false),false);
          break;
        }
      }
    }
 catch (    PartInitException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
private void closeEditorIfOpened(IRepositoryNode fileNode){
  if (CorePlugin.getDefault() != null && CorePlugin.getDefault().getWorkbench() != null && CorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow() != null) {
    IWorkbenchPage activePage=CorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
    if (activePage != null) {
      IEditorReference[] editorReferences=activePage.getEditorReferences();
      if (editorReferences != null) {
        for (        IEditorReference reference : editorReferences) {
          try {
            IEditorInput editorInput=reference.getEditorInput();
            if (editorInput instanceof AbstractItemEditorInput) {
              AbstractItemEditorInput fileInput=(AbstractItemEditorInput)editorInput;
              if (fileNode.getObject().getLabel().equals(fileInput.getItem().getProperty().getLabel())) {
                activePage.closeEditor(reference.getEditor(false),false);
                break;
              }
            }
          }
 catch (          PartInitException e) {
            e.printStackTrace();
          }
        }
      }
    }
  }
}
Program: 137936
Project: 137936
Buggy source:
/** 
 * remove the report node (remove the report generate doc folder also).
 * @param sourceNode
 * @param targetNode
 * @throws PersistenceException
 */
private void moveReportRepNode(IRepositoryNode sourceNode,IRepositoryNode targetNode) throws PersistenceException {
  relocateJrxmlTemplates(sourceNode,targetNode);
  IFolder outputFolder=ReportUtils.getOutputFolder((ReportRepNode)sourceNode);
  File sourceFile=WorkspaceUtils.ifolderToFile(outputFolder);
  IRepositoryViewObject objectToMove=sourceNode.getObject();
  IPath fullPath=ResourceManager.getReportsFolder().getFullPath();
  if (targetNode.getType() == ENodeType.SIMPLE_FOLDER) {
    moveObject(objectToMove,sourceNode,targetNode,fullPath.makeRelativeTo(ResourceManager.getRootProject().getFullPath()));
  }
 else   if (targetNode.getType() == ENodeType.SYSTEM_FOLDER) {
    moveObject(objectToMove,sourceNode,targetNode,Path.EMPTY);
  }
  IFolder targetFolder=RepositoryNodeHelper.getIFolder(targetNode);
  if (targetFolder != null) {
    File targetFile=WorkspaceUtils.ifolderToFile(targetFolder);
    FilesUtils.copyDirectory(sourceFile,targetFile);
    FilesUtils.deleteFile(sourceFile,true);
    ReportUtils.updateReportListFile(outputFolder,targetFolder);
    CorePlugin.getDefault().refreshDQView(targetNode.getParent());
  }
}

Fixed version (ground truth):
/** 
 * remove the report node (remove the report generate doc folder also).
 * @param sourceNode
 * @param targetNode
 * @throws PersistenceException
 */
private void moveReportRepNode(IRepositoryNode sourceNode,IRepositoryNode targetNode) throws PersistenceException {
  relocateJrxmlTemplates(sourceNode,targetNode);
  IFolder outputFolder=ReportUtils.getOutputFolder((ReportRepNode)sourceNode);
  File sourceFile=WorkspaceUtils.ifolderToFile(outputFolder);
  IRepositoryViewObject objectToMove=sourceNode.getObject();
  IPath fullPath=ResourceManager.getReportsFolder().getFullPath();
  if (targetNode.getType() == ENodeType.SIMPLE_FOLDER) {
    moveObject(objectToMove,sourceNode,targetNode,fullPath.makeRelativeTo(ResourceManager.getRootProject().getFullPath()));
  }
 else   if (targetNode.getType() == ENodeType.SYSTEM_FOLDER) {
    moveObject(objectToMove,sourceNode,targetNode,Path.EMPTY);
  }
  IFolder targetFolder=RepositoryNodeHelper.getIFolder(targetNode);
  if (targetFolder != null) {
    File targetFile=WorkspaceUtils.ifolderToFile(targetFolder);
    if (sourceFile.exists()) {
      if (targetFile.exists()) {
        FilesUtils.copyDirectory(sourceFile,targetFile);
      }
      FilesUtils.deleteFile(sourceFile,true);
    }
    ReportUtils.updateReportListFile(outputFolder,targetFolder);
    CorePlugin.getDefault().refreshDQView(targetNode.getParent());
  }
}
Program: 137937
Project: 137937
Buggy source:
@Override public IStatus handleDrop(CommonDropAdapter aDropAdapter,DropTargetEvent aDropTargetEvent,Object aTarget){
  IRepositoryNode targetNode=null;
  try {
    IRepositoryNode[] selectedRepositoryNodes=null;
    targetNode=(IRepositoryNode)aTarget;
    if (aDropAdapter.getCurrentTarget() == null || aDropTargetEvent.data == null) {
      return Status.CANCEL_STATUS;
    }
    TransferData currentTransfer=aDropAdapter.getCurrentTransfer();
    if (LocalSelectionTransfer.getTransfer().isSupportedType(currentTransfer)) {
      selectedRepositoryNodes=getSelectedRepositoryNodes();
    }
    computeRepNodeType(selectedRepositoryNodes,targetNode);
    if (DQRepositoryNode.isOnFilterring()) {
      RepositoryNodeHelper.fillTreeList(null);
      RepositoryNodeHelper.setFilteredNode(RepositoryNodeHelper.getRootNode(ERepositoryObjectType.TDQ_DATA_PROFILING,true));
    }
  }
 catch (  PersistenceException e) {
    if (log.isInfoEnabled()) {
      log.info(e.toString());
    }
  }
  ProxyRepositoryManager.getInstance().refresh();
  return Status.OK_STATUS;
}

Fixed version (ground truth):
@Override public IStatus handleDrop(CommonDropAdapter aDropAdapter,DropTargetEvent aDropTargetEvent,Object aTarget){
  IRepositoryNode targetNode=null;
  try {
    IRepositoryNode[] selectedRepositoryNodes=null;
    targetNode=(IRepositoryNode)aTarget;
    if (aDropAdapter.getCurrentTarget() == null || aDropTargetEvent.data == null) {
      return Status.CANCEL_STATUS;
    }
    TransferData currentTransfer=aDropAdapter.getCurrentTransfer();
    if (LocalSelectionTransfer.getTransfer().isSupportedType(currentTransfer)) {
      selectedRepositoryNodes=getSelectedRepositoryNodes();
    }
    moveRepositoryNodes(selectedRepositoryNodes,targetNode);
    if (DQRepositoryNode.isOnFilterring()) {
      RepositoryNodeHelper.fillTreeList(null);
      RepositoryNodeHelper.setFilteredNode(RepositoryNodeHelper.getRootNode(ERepositoryObjectType.TDQ_DATA_PROFILING,true));
    }
  }
 catch (  PersistenceException e) {
    if (log.isInfoEnabled()) {
      log.info(e.toString());
    }
  }
  ProxyRepositoryManager.getInstance().refresh();
  return Status.OK_STATUS;
}
Program: 137938
Project: 137938
Buggy source:
private boolean isSameType(IRepositoryNode sourceNode,IRepositoryNode targetNode){
  IPath sourcePath=WorkbenchUtils.getPath((RepositoryNode)sourceNode);
  IPath targetPath=WorkbenchUtils.getPath((RepositoryNode)targetNode);
  int sourceCount=sourcePath.segmentCount();
  int targetCount=targetPath.segmentCount();
  String sourceString=sourcePath.removeLastSegments(sourceCount - 2).toOSString();
  String targetString=targetPath.removeLastSegments(targetCount - 2).toOSString();
  ERepositoryObjectType sourceType=sourceNode.getContentType();
  ERepositoryObjectType targetentType=targetNode.getContentType();
  if (sourceType == null || targetentType == null || !sourceType.equals(targetentType)) {
    return false;
  }
  return sourceString.equals(targetString);
}

Fixed version (ground truth):
private boolean isSameType(IRepositoryNode sourceNode,IRepositoryNode targetNode){
  IPath sourcePath=WorkbenchUtils.getPath(sourceNode);
  IPath targetPath=WorkbenchUtils.getPath(targetNode);
  int sourceCount=sourcePath.segmentCount();
  int targetCount=targetPath.segmentCount();
  String sourceString=sourcePath.removeLastSegments(sourceCount - 2).toOSString();
  String targetString=targetPath.removeLastSegments(targetCount - 2).toOSString();
  ERepositoryObjectType sourceType=sourceNode.getContentType();
  ERepositoryObjectType targetentType=targetNode.getContentType();
  if (sourceType == null || targetentType == null || !sourceType.equals(targetentType)) {
    return false;
  }
  return sourceString.equals(targetString);
}
Program: 137939
Project: 137939
Buggy source:
/** 
 * if these items in recycle bin are depended by others which is not in recycle bin,show a warning and return.
 * @param allNodes
 * @return
 */
public static boolean canEmptyRecyBin(List<IRepositoryNode> allNodes){
  for (  IRepositoryNode node : allNodes) {
    List<ModelElement> dependencies=EObjectHelper.getDependencyClients(node);
    if (dependencies == null || dependencies.isEmpty()) {
      continue;
    }
    for (    ModelElement mod : dependencies) {
      Property property=PropertyHelper.getProperty(mod);
      if (property == null) {
        continue;
      }
      Item item=property.getItem();
      if (item != null && !item.getState().isDeleted()) {
        return false;
      }
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * if these items in recycle bin are depended by others which is not in recycle bin,show a warning and return.
 * @param allNodes
 * @return
 */
public static boolean canEmptyRecyBin(List<IRepositoryNode> allNodes){
  if (allNodes == null) {
    return false;
  }
  for (  IRepositoryNode node : allNodes) {
    List<ModelElement> dependencies=EObjectHelper.getDependencyClients(node);
    if (dependencies == null || dependencies.isEmpty()) {
      continue;
    }
    for (    ModelElement mod : dependencies) {
      Property property=PropertyHelper.getProperty(mod);
      if (property == null) {
        continue;
      }
      Item item=property.getItem();
      if (item != null && !item.getState().isDeleted()) {
        return false;
      }
    }
  }
  return true;
}
Program: 137940
Project: 137940
Buggy source:
/** 
 * get the link files which link to the Report Generated Doc File.
 * @param file Report file
 * @return
 */
public static List<IFile> getRepDocLinkFiles(IFile file){
  List<IFile> linkFiles=new ArrayList<IFile>();
  try {
    IResource[] reportListFiles=ReportUtils.getReportListFiles(file);
    for (    IResource res : reportListFiles) {
      IFile linkFile=ResourceManager.getRoot().getFile(res.getFullPath());
      if (linkFile.exists() && linkFile.isLinked()) {
        linkFiles.add(linkFile);
      }
    }
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
  return linkFiles;
}

Fixed version (ground truth):
/** 
 * get the link files which link to the Report Generated Doc File.
 * @param file Report file
 * @return
 */
public static List<IFile> getRepDocLinkFiles(IFile file){
  List<IFile> linkFiles=new ArrayList<IFile>();
  if (file != null) {
    try {
      IResource[] reportListFiles=ReportUtils.getReportListFiles(file);
      for (      IResource res : reportListFiles) {
        IFile linkFile=ResourceManager.getRoot().getFile(res.getFullPath());
        if (linkFile.exists() && linkFile.isLinked()) {
          linkFiles.add(linkFile);
        }
      }
    }
 catch (    Exception e) {
      log.error(e.getMessage(),e);
    }
  }
  return linkFiles;
}
Program: 137941
Project: 137941
Buggy source:
private boolean allowDND(IRepositoryNode sourceNode,IRepositoryNode targetNode){
  IPath sourcePath=WorkbenchUtils.getPath((RepositoryNode)sourceNode);
  IPath targetPath=WorkbenchUtils.getPath((RepositoryNode)targetNode);
  int sourceCount=sourcePath.segmentCount();
  int targetCount=targetPath.segmentCount();
  if (sourceCount == 1 || targetCount == 1) {
    return false;
  }
  if (isForbidNode(sourceNode)) {
    return false;
  }
  if (isSubObjectType(sourceNode,targetNode)) {
    return false;
  }
  IRepositoryViewObject object=sourceNode.getObject();
  if (object != null) {
    if (object.getProperty().getItem().getState().isLocked()) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean allowDND(IRepositoryNode sourceNode,IRepositoryNode targetNode){
  IPath sourcePath=WorkbenchUtils.getPath(sourceNode);
  IPath targetPath=WorkbenchUtils.getPath(targetNode);
  int sourceCount=sourcePath.segmentCount();
  int targetCount=targetPath.segmentCount();
  if (sourceCount == 1 || targetCount == 1) {
    return false;
  }
  if (isForbidNode(sourceNode)) {
    return false;
  }
  if (isSubObjectType(sourceNode,targetNode)) {
    return false;
  }
  IRepositoryViewObject object=sourceNode.getObject();
  if (object != null) {
    if (object.getProperty().getItem().getState().isLocked()) {
      return false;
    }
  }
  return true;
}
Program: 137943
Project: 137943
Buggy source:
/** 
 * move the IRepositoryViewObject from the sourceNode to targetNode, don't refresh the source and target node, user need to refresh the dq repository view tree by hand.
 * @param objectToMove
 * @param sourceNode
 * @param targetNode
 * @param basePath
 */
public void moveObject(IRepositoryViewObject objectToMove,IRepositoryNode sourceNode,IRepositoryNode targetNode,IPath basePath){
  IPath targetPath=WorkbenchUtils.getPath((RepositoryNode)targetNode);
  try {
    IPath makeRelativeTo=Path.EMPTY;
    if (!basePath.isEmpty()) {
      makeRelativeTo=targetPath.makeRelativeTo(basePath);
    }
    factory.moveObject(objectToMove,makeRelativeTo,Path.EMPTY);
  }
 catch (  PersistenceException e) {
    Log.error(sourceNode,e);
  }
catch (  BusinessException e) {
    Log.error(sourceNode,e);
  }
}

Fixed version (ground truth):
/** 
 * move the IRepositoryViewObject from the sourceNode to targetNode, don't refresh the source and target node, user need to refresh the dq repository view tree by hand.
 * @param objectToMove
 * @param sourceNode
 * @param targetNode
 * @param basePath
 */
public void moveObject(IRepositoryViewObject objectToMove,IRepositoryNode sourceNode,IRepositoryNode targetNode,IPath basePath){
  IPath targetPath=WorkbenchUtils.getPath(targetNode);
  try {
    IPath makeRelativeTo=Path.EMPTY;
    if (!basePath.isEmpty()) {
      makeRelativeTo=targetPath.makeRelativeTo(basePath);
    }
    factory.moveObject(objectToMove,makeRelativeTo,Path.EMPTY);
  }
 catch (  PersistenceException e) {
    Log.error(sourceNode,e);
  }
catch (  BusinessException e) {
    Log.error(sourceNode,e);
  }
}
Program: 137944
Project: 137944
Buggy source:
private void closeEditorIfOpened(IRepositoryNode fileNode){
  IWorkbenchPage activePage=CorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
  IEditorReference[] editorReferences=activePage.getEditorReferences();
  for (  IEditorReference reference : editorReferences) {
    try {
      IEditorInput editorInput=reference.getEditorInput();
      if (editorInput instanceof AbstractItemEditorInput) {
        AbstractItemEditorInput fileInput=(AbstractItemEditorInput)editorInput;
        if (fileNode.getObject().getLabel().equals(fileInput.getItem().getProperty().getLabel())) {
          activePage.closeEditor(reference.getEditor(false),false);
          break;
        }
      }
    }
 catch (    PartInitException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
private void closeEditorIfOpened(IRepositoryNode fileNode){
  if (CorePlugin.getDefault() != null && CorePlugin.getDefault().getWorkbench() != null && CorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow() != null) {
    IWorkbenchPage activePage=CorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
    if (activePage != null) {
      IEditorReference[] editorReferences=activePage.getEditorReferences();
      if (editorReferences != null) {
        for (        IEditorReference reference : editorReferences) {
          try {
            IEditorInput editorInput=reference.getEditorInput();
            if (editorInput instanceof AbstractItemEditorInput) {
              AbstractItemEditorInput fileInput=(AbstractItemEditorInput)editorInput;
              if (fileNode.getObject().getLabel().equals(fileInput.getItem().getProperty().getLabel())) {
                activePage.closeEditor(reference.getEditor(false),false);
                break;
              }
            }
          }
 catch (          PartInitException e) {
            e.printStackTrace();
          }
        }
      }
    }
  }
}
Program: 137946
Project: 137946
Buggy source:
/** 
 * remove the report node (remove the report generate doc folder also).
 * @param sourceNode
 * @param targetNode
 * @throws PersistenceException
 */
private void moveReportRepNode(IRepositoryNode sourceNode,IRepositoryNode targetNode) throws PersistenceException {
  relocateJrxmlTemplates(sourceNode,targetNode);
  IFolder outputFolder=ReportUtils.getOutputFolder((ReportRepNode)sourceNode);
  File sourceFile=WorkspaceUtils.ifolderToFile(outputFolder);
  IRepositoryViewObject objectToMove=sourceNode.getObject();
  IPath fullPath=ResourceManager.getReportsFolder().getFullPath();
  if (targetNode.getType() == ENodeType.SIMPLE_FOLDER) {
    moveObject(objectToMove,sourceNode,targetNode,fullPath.makeRelativeTo(ResourceManager.getRootProject().getFullPath()));
  }
 else   if (targetNode.getType() == ENodeType.SYSTEM_FOLDER) {
    moveObject(objectToMove,sourceNode,targetNode,Path.EMPTY);
  }
  IFolder targetFolder=RepositoryNodeHelper.getIFolder(targetNode);
  if (targetFolder != null) {
    File targetFile=WorkspaceUtils.ifolderToFile(targetFolder);
    FilesUtils.copyDirectory(sourceFile,targetFile);
    FilesUtils.deleteFile(sourceFile,true);
    ReportUtils.updateReportListFile(outputFolder,targetFolder);
    CorePlugin.getDefault().refreshDQView(targetNode.getParent());
  }
}

Fixed version (ground truth):
/** 
 * remove the report node (remove the report generate doc folder also).
 * @param sourceNode
 * @param targetNode
 * @throws PersistenceException
 */
private void moveReportRepNode(IRepositoryNode sourceNode,IRepositoryNode targetNode) throws PersistenceException {
  relocateJrxmlTemplates(sourceNode,targetNode);
  IFolder outputFolder=ReportUtils.getOutputFolder((ReportRepNode)sourceNode);
  File sourceFile=WorkspaceUtils.ifolderToFile(outputFolder);
  IRepositoryViewObject objectToMove=sourceNode.getObject();
  IPath fullPath=ResourceManager.getReportsFolder().getFullPath();
  if (targetNode.getType() == ENodeType.SIMPLE_FOLDER) {
    moveObject(objectToMove,sourceNode,targetNode,fullPath.makeRelativeTo(ResourceManager.getRootProject().getFullPath()));
  }
 else   if (targetNode.getType() == ENodeType.SYSTEM_FOLDER) {
    moveObject(objectToMove,sourceNode,targetNode,Path.EMPTY);
  }
  IFolder targetFolder=RepositoryNodeHelper.getIFolder(targetNode);
  if (targetFolder != null) {
    File targetFile=WorkspaceUtils.ifolderToFile(targetFolder);
    if (sourceFile.exists()) {
      if (targetFile.exists()) {
        FilesUtils.copyDirectory(sourceFile,targetFile);
      }
      FilesUtils.deleteFile(sourceFile,true);
    }
    ReportUtils.updateReportListFile(outputFolder,targetFolder);
    CorePlugin.getDefault().refreshDQView(targetNode.getParent());
  }
}
Program: 137947
Project: 137947
Buggy source:
@Override public IStatus handleDrop(CommonDropAdapter aDropAdapter,DropTargetEvent aDropTargetEvent,Object aTarget){
  IRepositoryNode targetNode=null;
  try {
    IRepositoryNode[] selectedRepositoryNodes=null;
    targetNode=(IRepositoryNode)aTarget;
    if (aDropAdapter.getCurrentTarget() == null || aDropTargetEvent.data == null) {
      return Status.CANCEL_STATUS;
    }
    TransferData currentTransfer=aDropAdapter.getCurrentTransfer();
    if (LocalSelectionTransfer.getTransfer().isSupportedType(currentTransfer)) {
      selectedRepositoryNodes=getSelectedRepositoryNodes();
    }
    computeRepNodeType(selectedRepositoryNodes,targetNode);
    if (DQRepositoryNode.isOnFilterring()) {
      RepositoryNodeHelper.fillTreeList(null);
      RepositoryNodeHelper.setFilteredNode(RepositoryNodeHelper.getRootNode(ERepositoryObjectType.TDQ_DATA_PROFILING,true));
    }
  }
 catch (  PersistenceException e) {
    if (log.isInfoEnabled()) {
      log.info(e.toString());
    }
  }
  ProxyRepositoryManager.getInstance().refresh();
  return Status.OK_STATUS;
}

Fixed version (ground truth):
@Override public IStatus handleDrop(CommonDropAdapter aDropAdapter,DropTargetEvent aDropTargetEvent,Object aTarget){
  IRepositoryNode targetNode=null;
  try {
    IRepositoryNode[] selectedRepositoryNodes=null;
    targetNode=(IRepositoryNode)aTarget;
    if (aDropAdapter.getCurrentTarget() == null || aDropTargetEvent.data == null) {
      return Status.CANCEL_STATUS;
    }
    TransferData currentTransfer=aDropAdapter.getCurrentTransfer();
    if (LocalSelectionTransfer.getTransfer().isSupportedType(currentTransfer)) {
      selectedRepositoryNodes=getSelectedRepositoryNodes();
    }
    moveRepositoryNodes(selectedRepositoryNodes,targetNode);
    if (DQRepositoryNode.isOnFilterring()) {
      RepositoryNodeHelper.fillTreeList(null);
      RepositoryNodeHelper.setFilteredNode(RepositoryNodeHelper.getRootNode(ERepositoryObjectType.TDQ_DATA_PROFILING,true));
    }
  }
 catch (  PersistenceException e) {
    if (log.isInfoEnabled()) {
      log.info(e.toString());
    }
  }
  ProxyRepositoryManager.getInstance().refresh();
  return Status.OK_STATUS;
}