Program: 129394
Project: 129394
Buggy source:
@Override public void createPartControl(Composite parent){
  super.createPartControl(parent);
  viewer=getCommonViewer();
  if (viewer instanceof ITreeViewerListener) {
    viewer.addTreeListener((ITreeViewerListener)viewer);
  }
  getSite().setSelectionProvider(viewer);
  viewer.addTreeListener(new ITreeViewerListener(){
    @Override public void treeCollapsed(    TreeExpansionEvent event){
      Object element=event.getElement();
      if (element instanceof RepositoryNode) {
        RepositoryNode node=(RepositoryNode)element;
        if (node.getType().equals(ENodeType.SIMPLE_FOLDER)) {
          TreeItem item=getObject(viewer.getTree(),event.getElement());
          if (item != null) {
            item.setImage(ImageProvider.getImage(ECoreImage.FOLDER_CLOSE_ICON));
          }
        }
      }
    }
    @Override public void treeExpanded(    TreeExpansionEvent event){
      Object element=event.getElement();
      if (element instanceof RepositoryNode) {
        RepositoryNode node=(RepositoryNode)element;
        if (node.getType().equals(ENodeType.SIMPLE_FOLDER)) {
          TreeItem item=getObject(viewer.getTree(),element);
          if (item != null) {
            item.setImage(ImageProvider.getImage(ECoreImage.FOLDER_OPEN_ICON));
          }
        }
      }
    }
  }
);
  createTreeTooltip(viewer.getTree());
  viewer.getTree().addFocusListener(new FocusListener(){
    @Override public void focusGained(    FocusEvent e){
      log.trace("String_Node_Str");
      IContextService contextService=(IContextService)RepositoryViewPlugin.getDefault().getWorkbench().getAdapter(IContextService.class);
      ca=contextService.activateContext("String_Node_Str");
    }
    @Override public void focusLost(    FocusEvent e){
      log.trace("String_Node_Str");
      if (ca != null) {
        IContextService contextService=(IContextService)RepositoryViewPlugin.getDefault().getWorkbench().getAdapter(IContextService.class);
        contextService.deactivateContext(ca);
      }
    }
  }
);
  if (listenersNeedTobeAddedIntoTreeviewer.size() > 0) {
    for (    ISelectionChangedListener listener : listenersNeedTobeAddedIntoTreeviewer) {
      viewer.addSelectionChangedListener(listener);
    }
    listenersNeedTobeAddedIntoTreeviewer.clear();
  }
  CoreRepositoryPlugin.getDefault().registerRepositoryChangedListenerAsFirst(this);
  if (!CoreRepositoryPlugin.getDefault().isRCPMode()) {
    boolean pluginModel=true;
    if (GlobalServiceRegister.getDefault().isServiceRegistered(IMigrationToolService.class)) {
      IMigrationToolService migrationService=(IMigrationToolService)GlobalServiceRegister.getDefault().getService(IMigrationToolService.class);
      if (migrationService != null) {
        migrationService.executeMigration(pluginModel);
      }
    }
    if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
      IRunProcessService runProcessService=(IRunProcessService)GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
      if (runProcessService != null) {
        runProcessService.deleteAllJobs(pluginModel);
      }
    }
    final RepositoryContext repositoryContext=(RepositoryContext)CoreRuntimePlugin.getInstance().getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY);
    final Project project=repositoryContext.getProject();
    final IWorkbenchWindow activedWorkbenchWindow=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    activedWorkbenchWindow.getPartService().addPartListener(new IPartListener(){
      @Override public void partActivated(      IWorkbenchPart part){
        if (part instanceof RepoViewCommonNavigator) {
          String title=activedWorkbenchWindow.getShell().getText();
          if (!title.contains("String_Node_Str")) {
            title+="String_Node_Str" + repositoryContext.getUser() + "String_Node_Str"+ project.getLabel();
            activedWorkbenchWindow.getShell().setText(title);
          }
        }
      }
      @Override public void partBroughtToTop(      IWorkbenchPart part){
      }
      @Override public void partClosed(      IWorkbenchPart part){
      }
      @Override public void partDeactivated(      IWorkbenchPart part){
      }
      @Override public void partOpened(      IWorkbenchPart part){
        if (part instanceof RepoViewCommonNavigator) {
          String title=activedWorkbenchWindow.getShell().getText();
          if (!title.contains("String_Node_Str")) {
            title+="String_Node_Str" + repositoryContext.getUser() + "String_Node_Str"+ project.getLabel();
            activedWorkbenchWindow.getShell().setText(title);
          }
        }
      }
    }
);
  }
  expandTreeRootIfOnlyOneRoot();
  refreshContentDescription();
  PlatformUI.getWorkbench().getActiveWorkbenchWindow().addPerspectiveListener(getRepoViewPerspectiveListener());
}

Fixed version (ground truth):
@Override public void createPartControl(Composite parent){
  super.createPartControl(parent);
  viewer=getCommonViewer();
  if (viewer instanceof ITreeViewerListener) {
    viewer.addTreeListener((ITreeViewerListener)viewer);
  }
  getSite().setSelectionProvider(viewer);
  viewer.addTreeListener(new ITreeViewerListener(){
    @Override public void treeCollapsed(    TreeExpansionEvent event){
      Object element=event.getElement();
      if (element instanceof RepositoryNode) {
        RepositoryNode node=(RepositoryNode)element;
        if (node.getType().equals(ENodeType.SIMPLE_FOLDER)) {
          TreeItem item=getObject(viewer.getTree(),event.getElement());
          if (item != null) {
            item.setImage(ImageProvider.getImage(ECoreImage.FOLDER_CLOSE_ICON));
          }
        }
      }
    }
    @Override public void treeExpanded(    TreeExpansionEvent event){
      Object element=event.getElement();
      if (element instanceof RepositoryNode) {
        RepositoryNode node=(RepositoryNode)element;
        if (node.getType().equals(ENodeType.SIMPLE_FOLDER)) {
          TreeItem item=getObject(viewer.getTree(),element);
          if (item != null) {
            item.setImage(ImageProvider.getImage(ECoreImage.FOLDER_OPEN_ICON));
          }
        }
      }
    }
  }
);
  createTreeTooltip(viewer.getTree());
  viewer.getTree().addFocusListener(new FocusListener(){
    @Override public void focusGained(    FocusEvent e){
      log.trace("String_Node_Str");
      IContextService contextService=(IContextService)RepositoryViewPlugin.getDefault().getWorkbench().getAdapter(IContextService.class);
      ca=contextService.activateContext("String_Node_Str");
    }
    @Override public void focusLost(    FocusEvent e){
      log.trace("String_Node_Str");
      if (ca != null) {
        IContextService contextService=(IContextService)RepositoryViewPlugin.getDefault().getWorkbench().getAdapter(IContextService.class);
        contextService.deactivateContext(ca);
      }
    }
  }
);
  if (listenersNeedTobeAddedIntoTreeviewer.size() > 0) {
    for (    ISelectionChangedListener listener : listenersNeedTobeAddedIntoTreeviewer) {
      viewer.addSelectionChangedListener(listener);
    }
    listenersNeedTobeAddedIntoTreeviewer.clear();
  }
  CoreRepositoryPlugin.getDefault().registerRepositoryChangedListenerAsFirst(this);
  if (!CoreRepositoryPlugin.getDefault().isRCPMode()) {
    boolean pluginModel=true;
    if (GlobalServiceRegister.getDefault().isServiceRegistered(IMigrationToolService.class)) {
      IMigrationToolService migrationService=(IMigrationToolService)GlobalServiceRegister.getDefault().getService(IMigrationToolService.class);
      if (migrationService != null) {
        migrationService.executeMigration(pluginModel);
      }
    }
    if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
      IRunProcessService runProcessService=(IRunProcessService)GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
      if (runProcessService != null) {
        runProcessService.deleteAllJobs(pluginModel);
      }
    }
    final RepositoryContext repositoryContext=(RepositoryContext)CoreRuntimePlugin.getInstance().getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY);
    final Project project=repositoryContext.getProject();
    final IWorkbenchWindow activedWorkbenchWindow=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    activedWorkbenchWindow.getPartService().addPartListener(new IPartListener(){
      @Override public void partActivated(      IWorkbenchPart part){
        if (part instanceof RepoViewCommonNavigator) {
          String title=activedWorkbenchWindow.getShell().getText();
          if (!title.contains("String_Node_Str")) {
            title+="String_Node_Str" + repositoryContext.getUser() + "String_Node_Str"+ project.getLabel();
            activedWorkbenchWindow.getShell().setText(title);
          }
        }
      }
      @Override public void partBroughtToTop(      IWorkbenchPart part){
      }
      @Override public void partClosed(      IWorkbenchPart part){
      }
      @Override public void partDeactivated(      IWorkbenchPart part){
      }
      @Override public void partOpened(      IWorkbenchPart part){
        if (part instanceof RepoViewCommonNavigator) {
          String title=activedWorkbenchWindow.getShell().getText();
          if (!title.contains("String_Node_Str")) {
            title+="String_Node_Str" + repositoryContext.getUser() + "String_Node_Str"+ project.getLabel();
            activedWorkbenchWindow.getShell().setText(title);
          }
        }
      }
    }
);
  }
  expandTreeRootIfOnlyOneRoot();
  viewer.setSorter(new RepositoryNameSorter());
  refreshContentDescription();
  PlatformUI.getWorkbench().getActiveWorkbenchWindow().addPerspectiveListener(getRepoViewPerspectiveListener());
}