Program: 94658
Project: 94658
Buggy source:
ChatRoom(IChatRoomContainer container,ChatRoomTab tabItem){
  Assert.isNotNull(container);
  Assert.isNotNull(tabItem);
  this.chatRoomContainer=container;
  this.chatRoomMessageSender=container.getChatRoomMessageSender();
  this.chatRoomTab=tabItem;
  options=new ArrayList();
  this.chatRoomTab.setKeyListener(this);
  this.chatRoomParticipantsLabel=tabItem.getParticipantsLabel();
  this.chatRoomParticipantViewer=tabItem.getParticipantsViewer();
  chatRoomContainer.addChatRoomAdminListener(new IChatRoomAdminListener(){
    public void handleSubjectChange(    ID from,    final String newSubject){
      chatRoomTab.getInputText().getDisplay().asyncExec(new Runnable(){
        public void run(){
          chatRoomTab.setSubject(newSubject);
        }
      }
);
    }
  }
);
  rootTabFolder.setUnselectedCloseVisible(true);
  rootTabFolder.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      itemSelected=(CTabItem)e.item;
      if (itemSelected == chatRoomTab.tabItem)       makeTabItemNormal();
      if (rootChannelTab != null && itemSelected == rootChannelTab.tabItem)       rootChannelTab.makeTabItemNormal();
    }
  }
);
  StyledText st=getOutputText();
  if (st != null) {
    ScrollBar vsb=st.getVerticalBar();
    if (vsb != null) {
      vsb.addSelectionListener(scrollSelectionListener);
      vsb.addDisposeListener(new DisposeListener(){
        public void widgetDisposed(        DisposeEvent e){
          StyledText ot=getOutputText();
          if (ot != null) {
            ScrollBar vb=ot.getVerticalBar();
            if (vb != null)             vb.removeSelectionListener(scrollSelectionListener);
          }
        }
      }
);
    }
  }
}

Fixed version (ground truth):
ChatRoom(IChatRoomContainer container,ChatRoomTab tabItem){
  Assert.isNotNull(container);
  Assert.isNotNull(tabItem);
  this.chatRoomContainer=container;
  this.chatRoomMessageSender=container.getChatRoomMessageSender();
  this.chatRoomTab=tabItem;
  options=new ArrayList();
  this.chatRoomTab.setKeyListener(this);
  this.chatRoomParticipantsLabel=tabItem.getParticipantsLabel();
  this.chatRoomParticipantViewer=tabItem.getParticipantsViewer();
  chatRoomContainer.addChatRoomAdminListener(new IChatRoomAdminListener(){
    public void handleSubjectChange(    ID from,    final String newSubject){
      if (!chatRoomTab.getInputText().isDisposed()) {
        chatRoomTab.getInputText().getDisplay().asyncExec(new Runnable(){
          public void run(){
            chatRoomTab.setSubject(newSubject);
          }
        }
);
      }
    }
  }
);
  rootTabFolder.setUnselectedCloseVisible(true);
  rootTabFolder.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      itemSelected=(CTabItem)e.item;
      if (itemSelected == chatRoomTab.tabItem)       makeTabItemNormal();
      if (rootChannelTab != null && itemSelected == rootChannelTab.tabItem)       rootChannelTab.makeTabItemNormal();
    }
  }
);
  StyledText st=getOutputText();
  if (st != null) {
    ScrollBar vsb=st.getVerticalBar();
    if (vsb != null) {
      vsb.addSelectionListener(scrollSelectionListener);
      vsb.addDisposeListener(new DisposeListener(){
        public void widgetDisposed(        DisposeEvent e){
          StyledText ot=getOutputText();
          if (ot != null) {
            ScrollBar vb=ot.getVerticalBar();
            if (vb != null)             vb.removeSelectionListener(scrollSelectionListener);
          }
        }
      }
);
    }
  }
}