Program: 94945
Project: 94945
Buggy source:
ChatComposite(LineChatClientView view,Composite parent,TableViewer table,String initText,ChatWindow chatWindow){
  super(parent,SWT.NONE);
  this.view=view;
  this.chatWindow=chatWindow;
  meColor=colorFromRGBString(ClientPlugin.getDefault().getPluginPreferences().getString(ClientPlugin.PREF_ME_TEXT_COLOR));
  otherColor=colorFromRGBString(ClientPlugin.getDefault().getPluginPreferences().getString(ClientPlugin.PREF_OTHER_TEXT_COLOR));
  systemColor=colorFromRGBString(ClientPlugin.getDefault().getPluginPreferences().getString(ClientPlugin.PREF_SYSTEM_TEXT_COLOR));
  ClientPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(new ColorPropertyChangeListener());
  this.addDisposeListener(new DisposeListener(){
    public void widgetDisposed(    DisposeEvent e){
      if (meColor != null) {
        meColor.dispose();
      }
      if (otherColor != null) {
        otherColor.dispose();
      }
      if (systemColor != null) {
        systemColor.dispose();
      }
    }
  }
);
  tableView=table;
  setLayout(new GridLayout(1,true));
  SourceViewer result=new SourceViewer(this,null,null,true,SWT.BORDER | SWT.WRAP | SWT.V_SCROLL| SWT.MULTI| SWT.H_SCROLL| SWT.READ_ONLY);
  result.configure(new TextSourceViewerConfiguration(EditorsUI.getPreferenceStore()));
  result.setDocument(new Document());
  textoutput=result.getTextWidget();
  textoutput.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  String fontName=ClientPlugin.getDefault().getPluginPreferences().getString(ClientPlugin.PREF_CHAT_FONT);
  if (!(fontName == null) && !(fontName.equals("String_Node_Str"))) {
    FontRegistry fr=ClientPlugin.getDefault().getFontRegistry();
    FontData[] newFont={new FontData(fontName)};
    fr.put(CHAT_OUTPUT_FONT,newFont);
    textoutput.setFont(fr.get(CHAT_OUTPUT_FONT));
  }
  ClientPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(new FontPropertyChangeListener());
  textoutput.append(initText);
  textinput=new Text(this,SWT.SINGLE | SWT.BORDER);
  textinput.setText(TEXT_INPUT_INIT);
  textinput.setLayoutData(new GridData(SWT.FILL,SWT.BEGINNING,true,false));
  textinput.selectAll();
  textinput.addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent evt){
      handleKeyPressed(evt);
    }
    public void keyReleased(    KeyEvent evt){
      handleKeyReleased(evt);
    }
  }
);
  textinput.addFocusListener(new FocusListener(){
    public void focusGained(    FocusEvent e){
      String t=textinput.getText();
      if (t.equals(TEXT_INPUT_INIT)) {
        textinput.selectAll();
      }
    }
    public void focusLost(    FocusEvent e){
    }
  }
);
  textinput.addMouseListener(new MouseListener(){
    public void mouseDoubleClick(    MouseEvent e){
    }
    public void mouseDown(    MouseEvent e){
    }
    public void mouseUp(    MouseEvent e){
      String t=textinput.getText();
      if (t.equals(TEXT_INPUT_INIT)) {
        textinput.selectAll();
      }
    }
  }
);
  textinput.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (typing && textinput.getText().trim().length() == 0)       typing=false;
 else       if (!typing) {
        typing=true;
        ChatComposite.this.view.lch.sendStartedTyping();
      }
    }
  }
);
  makeActions();
  hookContextMenu();
  contributeToActionBars();
  initializeDropTargets();
}

Fixed version (ground truth):
ChatComposite(LineChatClientView view,Composite parent,TableViewer table,String initText,ChatWindow chatWindow){
  super(parent,SWT.NONE);
  this.view=view;
  this.chatWindow=chatWindow;
  setLayout(new FillLayout());
  meColor=colorFromRGBString(ClientPlugin.getDefault().getPluginPreferences().getString(ClientPlugin.PREF_ME_TEXT_COLOR));
  otherColor=colorFromRGBString(ClientPlugin.getDefault().getPluginPreferences().getString(ClientPlugin.PREF_OTHER_TEXT_COLOR));
  systemColor=colorFromRGBString(ClientPlugin.getDefault().getPluginPreferences().getString(ClientPlugin.PREF_SYSTEM_TEXT_COLOR));
  ClientPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(new ColorPropertyChangeListener());
  this.addDisposeListener(new DisposeListener(){
    public void widgetDisposed(    DisposeEvent e){
      if (meColor != null) {
        meColor.dispose();
      }
      if (otherColor != null) {
        otherColor.dispose();
      }
      if (systemColor != null) {
        systemColor.dispose();
      }
    }
  }
);
  SashForm sf=new SashForm(this,SWT.NORMAL);
  sf.setLayout(new FillLayout());
  sf.setOrientation(SWT.VERTICAL);
  tableView=table;
  SourceViewer result=new SourceViewer(sf,null,null,true,SWT.BORDER | SWT.WRAP | SWT.V_SCROLL| SWT.MULTI| SWT.H_SCROLL| SWT.READ_ONLY);
  result.configure(new TextSourceViewerConfiguration(EditorsUI.getPreferenceStore()));
  result.setDocument(new Document());
  textoutput=result.getTextWidget();
  textoutput.setLayoutData(new GridData(SWT.FILL));
  String fontName=ClientPlugin.getDefault().getPluginPreferences().getString(ClientPlugin.PREF_CHAT_FONT);
  if (!(fontName == null) && !(fontName.equals("String_Node_Str"))) {
    FontRegistry fr=ClientPlugin.getDefault().getFontRegistry();
    FontData[] newFont={new FontData(fontName)};
    fr.put(CHAT_OUTPUT_FONT,newFont);
    textoutput.setFont(fr.get(CHAT_OUTPUT_FONT));
  }
  ClientPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(new FontPropertyChangeListener());
  textoutput.append(initText);
  textinput=new Text(sf,SWT.SINGLE | SWT.BORDER);
  textinput.setText(TEXT_INPUT_INIT);
  textinput.setLayoutData(new GridData(SWT.FILL));
  textinput.selectAll();
  textinput.addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent evt){
      handleKeyPressed(evt);
    }
    public void keyReleased(    KeyEvent evt){
      handleKeyReleased(evt);
    }
  }
);
  textinput.addFocusListener(new FocusListener(){
    public void focusGained(    FocusEvent e){
      String t=textinput.getText();
      if (t.equals(TEXT_INPUT_INIT)) {
        textinput.selectAll();
      }
    }
    public void focusLost(    FocusEvent e){
    }
  }
);
  textinput.addMouseListener(new MouseListener(){
    public void mouseDoubleClick(    MouseEvent e){
    }
    public void mouseDown(    MouseEvent e){
    }
    public void mouseUp(    MouseEvent e){
      String t=textinput.getText();
      if (t.equals(TEXT_INPUT_INIT)) {
        textinput.selectAll();
      }
    }
  }
);
  textinput.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (typing && textinput.getText().trim().length() == 0)       typing=false;
 else       if (!typing) {
        typing=true;
        ChatComposite.this.view.lch.sendStartedTyping();
      }
    }
  }
);
  sf.setWeights(new int[]{90,10});
  makeActions();
  hookContextMenu();
  contributeToActionBars();
  initializeDropTargets();
}