Program: 127456
Project: 127456
Buggy source:
/** 
 * ggu Comment method "isOpenedItemInEditor". for jobs/joblets/business diagrams/routines/sql patterns
 */
public static boolean isOpenedItemInEditor(IRepositoryViewObject objectToMove){
  try {
    if (objectToMove != null) {
      IWorkbenchWindow activeWorkbenchWindow=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
      if (activeWorkbenchWindow != null) {
        IWorkbenchPage activePage=activeWorkbenchWindow.getActivePage();
        if (activePage != null) {
          IEditorReference[] editorReferences=activePage.getEditorReferences();
          if (editorReferences != null) {
            for (            IEditorReference editorReference : editorReferences) {
              IEditorInput editorInput=editorReference.getEditorInput();
              if ((editorInput != null && editorInput instanceof IRepositoryEditorInput)) {
                IRepositoryEditorInput rInput=(IRepositoryEditorInput)editorInput;
                Property openedProperty=rInput.getItem().getProperty();
                if (openedProperty.getId().equals(objectToMove.getId()) && VersionUtils.compareTo(openedProperty.getVersion(),objectToMove.getVersion()) == 0) {
                  return true;
                }
              }
 else               if (objectToMove.getProperty().getItem() instanceof BusinessProcessItem) {
                Object obj=editorInput.getAdapter(IRepositoryEditorInput.class);
                if (obj instanceof IRepositoryEditorInput) {
                  IRepositoryEditorInput rInput=(IRepositoryEditorInput)obj;
                  Property openedProperty=rInput.getItem().getProperty();
                  if (openedProperty.getId().equals(objectToMove.getId()) && VersionUtils.compareTo(openedProperty.getVersion(),objectToMove.getVersion()) == 0) {
                    return true;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
 catch (  PartInitException e) {
    ExceptionHandler.process(e);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * ggu Comment method "isOpenedItemInEditor". for jobs/joblets/business diagrams/routines/sql patterns
 */
public static boolean isOpenedItemInEditor(IRepositoryViewObject objectToMove){
  try {
    if (objectToMove != null) {
      IWorkbenchWindow activeWorkbenchWindow=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
      if (activeWorkbenchWindow != null) {
        IWorkbenchPage activePage=activeWorkbenchWindow.getActivePage();
        if (activePage != null) {
          IEditorReference[] editorReferences=activePage.getEditorReferences();
          if (editorReferences != null) {
            for (            IEditorReference editorReference : editorReferences) {
              IEditorInput editorInput=editorReference.getEditorInput();
              if ((editorInput != null && editorInput instanceof IRepositoryEditorInput)) {
                IRepositoryEditorInput rInput=(IRepositoryEditorInput)editorInput;
                Property openedProperty=rInput.getItem().getProperty();
                if (openedProperty.getId().equals(objectToMove.getId()) && VersionUtils.compareTo(openedProperty.getVersion(),objectToMove.getVersion()) == 0) {
                  return true;
                }
              }
 else               if (objectToMove.getProperty().getItem() instanceof BusinessProcessItem) {
                Object obj=editorInput.getAdapter(IRepositoryEditorInput.class);
                if (obj instanceof IRepositoryEditorInput) {
                  IRepositoryEditorInput rInput=(IRepositoryEditorInput)obj;
                  Property openedProperty=rInput.getItem().getProperty();
                  if (openedProperty.getId().equals(objectToMove.getId()) && VersionUtils.compareTo(openedProperty.getVersion(),objectToMove.getVersion()) == 0) {
                    return true;
                  }
                }
              }
 else               if (objectToMove.getProperty().getItem() instanceof JobScriptItem && editorInput instanceof FileEditorInput) {
                FileEditorInput rInput=(FileEditorInput)editorInput;
                IPath path=rInput.getPath();
                String[] seg=path.lastSegment().split("String_Node_Str");
                if (objectToMove.getProperty().getItem().getProperty().getLabel().equals(seg[0])) {
                  return true;
                }
              }
            }
          }
        }
      }
    }
  }
 catch (  PartInitException e) {
    ExceptionHandler.process(e);
  }
  return false;
}