Program: 121580
Project: 121580
Buggy source:
@Override public void init(final IEditorSite site,IEditorInput editorInput) throws PartInitException {
  setSite(site);
  setInput(editorInput);
  site.setSelectionProvider(new MultiPageTalendSelectionProvider(this));
  getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(this);
  IRepositoryService service=CorePlugin.getDefault().getRepositoryService();
  final IProxyRepositoryFactory repFactory=service.getProxyRepositoryFactory();
  processEditorInput=(JobEditorInput)editorInput;
  final IProcess2 currentProcess=processEditorInput.getLoadedProcess();
  if (!currentProcess.isReadOnly()) {
    try {
      Property property=processEditorInput.getItem().getProperty();
      propertyInformation=new ArrayList(property.getInformations());
      property.eAdapters().add(dirtyListener);
      repFactory.addRepositoryWorkUnitListener(repositoryWorkListener);
      repFactory.lock(currentProcess);
      boolean locked=repFactory.getStatus(currentProcess) == ERepositoryStatus.LOCK_BY_USER;
      if (!locked) {
        setReadOnly(true);
      }
      revisionChanged=true;
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
catch (    BusinessException e) {
      ExceptionHandler.process(e);
    }
  }
 else {
    setReadOnly(true);
    Bundle bundle=FrameworkUtil.getBundle(AbstractMultiPageTalendEditor.class);
    final Display display=getSite().getShell().getDisplay();
    this.lockService=bundle.getBundleContext().registerService(EventHandler.class.getName(),new EventHandler(){
      @Override public void handleEvent(      Event event){
        if (event.getProperty(Constant.ITEM_EVENT_PROPERTY_KEY) != null) {
          boolean readOnly=currentProcess.checkReadOnly();
          setReadOnly(readOnly);
          if (!readOnly) {
            repFactory.addRepositoryWorkUnitListener(repositoryWorkListener);
            display.asyncExec(new Runnable(){
              @Override public void run(){
                setFocus();
              }
            }
);
            Property property=processEditorInput.getItem().getProperty();
            propertyInformation=new ArrayList(property.getInformations());
            property.eAdapters().add(dirtyListener);
          }
        }
      }
    }
,new Hashtable<String,String>(Collections.singletonMap(EventConstants.EVENT_TOPIC,Constant.REPOSITORY_ITEM_EVENT_PREFIX + "String_Node_Str")));
    revisionChanged=true;
  }
  getSite().getWorkbenchWindow().getPartService().addPartListener(partListener);
}

Fixed version (ground truth):
@Override public void init(final IEditorSite site,IEditorInput editorInput) throws PartInitException {
  setSite(site);
  setInput(editorInput);
  site.setSelectionProvider(new MultiPageTalendSelectionProvider(this));
  getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(this);
  IRepositoryService service=CorePlugin.getDefault().getRepositoryService();
  final IProxyRepositoryFactory repFactory=service.getProxyRepositoryFactory();
  processEditorInput=(JobEditorInput)editorInput;
  final IProcess2 currentProcess=processEditorInput.getLoadedProcess();
  if (!currentProcess.isReadOnly()) {
    try {
      Property property=processEditorInput.getItem().getProperty();
      propertyInformation=new ArrayList(property.getInformations());
      property.eAdapters().add(dirtyListener);
      repFactory.addRepositoryWorkUnitListener(repositoryWorkListener);
      repFactory.lock(currentProcess);
      boolean locked=repFactory.getStatus(currentProcess) == ERepositoryStatus.LOCK_BY_USER;
      if (!locked) {
        setReadOnly(true);
      }
      revisionChanged=true;
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
catch (    BusinessException e) {
      ExceptionHandler.process(e);
    }
  }
 else {
    setReadOnly(true);
    Bundle bundle=FrameworkUtil.getBundle(AbstractMultiPageTalendEditor.class);
    final Display display=getSite().getShell().getDisplay();
    this.lockService=bundle.getBundleContext().registerService(EventHandler.class.getName(),new EventHandler(){
      @Override public void handleEvent(      Event event){
        if (event.getProperty(Constant.ITEM_EVENT_PROPERTY_KEY) != null) {
          boolean readOnly=currentProcess.checkReadOnly();
          setReadOnly(readOnly);
          if (!readOnly) {
            repFactory.addRepositoryWorkUnitListener(repositoryWorkListener);
            display.asyncExec(new Runnable(){
              @Override public void run(){
                setFocus();
              }
            }
);
            Property property=processEditorInput.getItem().getProperty();
            propertyInformation=new ArrayList(property.getInformations());
            property.eAdapters().add(dirtyListener);
          }
        }
      }
    }
,new Hashtable<String,String>(Collections.singletonMap(EventConstants.EVENT_TOPIC,Constant.REPOSITORY_ITEM_EVENT_PREFIX + "String_Node_Str")));
    revisionChanged=true;
  }
  updateTitleImage(processEditorInput.getItem().getProperty());
  getSite().getWorkbenchWindow().getPartService().addPartListener(partListener);
}