Program: 123026
Project: 123026
Buggy source:
/** 
 * DOC bqian Comment method "createLineLimitedControl".
 */
private void createLineLimitedControl(Composite container){
  Composite composite=new Composite(container,SWT.NONE);
  FormData layouData=new FormData();
  layouData.left=new FormAttachment(0,10);
  layouData.right=new FormAttachment(100,0);
  layouData.top=new FormAttachment(100,-30);
  layouData.bottom=new FormAttachment(100,-3);
  composite.setLayoutData(layouData);
  FormLayout formLayout=new FormLayout();
  formLayout.marginWidth=7;
  formLayout.marginHeight=4;
  formLayout.spacing=7;
  composite.setLayout(formLayout);
  enableLineLimitButton=new Button(composite,SWT.CHECK);
  enableLineLimitButton.setText(Messages.getString("String_Node_Str"));
  FormData formData=new FormData();
  enableLineLimitButton.setLayoutData(formData);
  enableLineLimitButton.setEnabled(false);
  enableLineLimitButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      lineLimitText.setEditable(enableLineLimitButton.getSelection());
      RunProcessPlugin.getDefault().getPluginPreferences().setValue(RunprocessConstants.ENABLE_CONSOLE_LINE_LIMIT,enableLineLimitButton.getSelection());
    }
  }
);
  lineLimitText=new Text(composite,SWT.BORDER);
  formData=new FormData();
  formData.width=120;
  formData.left=new FormAttachment(enableLineLimitButton,0,SWT.RIGHT);
  lineLimitText.setLayoutData(formData);
  lineLimitText.setEnabled(false);
  lineLimitText.addListener(SWT.Verify,new Listener(){
    public void handleEvent(    Event e){
      String s=e.text;
      if (!s.equals("String_Node_Str")) {
        try {
          Integer.parseInt(s);
          RunProcessPlugin.getDefault().getPluginPreferences().setValue(RunprocessConstants.CONSOLE_LINE_LIMIT_COUNT,lineLimitText.getText() + s);
        }
 catch (        Exception ex) {
          e.doit=false;
        }
      }
    }
  }
);
  lineLimitText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      RunProcessPlugin.getDefault().getPluginPreferences().setValue(RunprocessConstants.CONSOLE_LINE_LIMIT_COUNT,lineLimitText.getText());
    }
  }
);
  boolean enable=RunProcessPlugin.getDefault().getPluginPreferences().getBoolean(RunprocessConstants.ENABLE_CONSOLE_LINE_LIMIT);
  enableLineLimitButton.setSelection(enable);
  lineLimitText.setEditable(enable);
  String count=RunProcessPlugin.getDefault().getPluginPreferences().getString(RunprocessConstants.CONSOLE_LINE_LIMIT_COUNT);
  if (count.equals("String_Node_Str")) {
    count="String_Node_Str";
  }
  lineLimitText.setText(count);
  wrapButton=new Button(composite,SWT.CHECK);
  formData=new FormData();
  formData.left=new FormAttachment(lineLimitText,15,SWT.RIGHT);
  wrapButton.setLayoutData(formData);
  wrapButton.setText(Messages.getString("String_Node_Str"));
  wrapButton.setSelection(true);
  wrapButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (wrapButton.getSelection()) {
        consoleText.setWordWrap(true);
      }
 else {
        consoleText.setWordWrap(false);
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * DOC bqian Comment method "createLineLimitedControl".
 */
private void createLineLimitedControl(Composite container){
  Composite composite=new Composite(container,SWT.NONE);
  FormData layouData=new FormData();
  layouData.left=new FormAttachment(0,10);
  layouData.right=new FormAttachment(100,0);
  layouData.top=new FormAttachment(100,-30);
  layouData.bottom=new FormAttachment(100,-3);
  composite.setLayoutData(layouData);
  FormLayout formLayout=new FormLayout();
  formLayout.marginWidth=7;
  formLayout.marginHeight=4;
  formLayout.spacing=7;
  composite.setLayout(formLayout);
  enableLineLimitButton=new Button(composite,SWT.CHECK);
  enableLineLimitButton.setText(Messages.getString("String_Node_Str"));
  FormData formData=new FormData();
  enableLineLimitButton.setLayoutData(formData);
  enableLineLimitButton.setEnabled(false);
  enableLineLimitButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      lineLimitText.setEditable(enableLineLimitButton.getSelection());
      RunProcessPlugin.getDefault().getPluginPreferences().setValue(RunprocessConstants.ENABLE_CONSOLE_LINE_LIMIT,enableLineLimitButton.getSelection());
    }
  }
);
  lineLimitText=new Text(composite,SWT.BORDER);
  formData=new FormData();
  formData.width=120;
  formData.left=new FormAttachment(enableLineLimitButton,0,SWT.RIGHT);
  lineLimitText.setLayoutData(formData);
  lineLimitText.setEnabled(false);
  lineLimitText.addListener(SWT.Verify,new Listener(){
    @Override public void handleEvent(    Event e){
      String s=e.text;
      if (!s.equals("String_Node_Str")) {
        try {
          Integer.parseInt(s);
          RunProcessPlugin.getDefault().getPluginPreferences().setValue(RunprocessConstants.CONSOLE_LINE_LIMIT_COUNT,lineLimitText.getText() + s);
        }
 catch (        Exception ex) {
          e.doit=false;
        }
      }
    }
  }
);
  lineLimitText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      RunProcessPlugin.getDefault().getPluginPreferences().setValue(RunprocessConstants.CONSOLE_LINE_LIMIT_COUNT,lineLimitText.getText());
    }
  }
);
  boolean enable=RunProcessPlugin.getDefault().getPluginPreferences().getBoolean(RunprocessConstants.ENABLE_CONSOLE_LINE_LIMIT);
  enableLineLimitButton.setSelection(enable);
  lineLimitText.setEditable(enable);
  String count=RunProcessPlugin.getDefault().getPluginPreferences().getString(RunprocessConstants.CONSOLE_LINE_LIMIT_COUNT);
  if (count.equals("String_Node_Str")) {
    count="String_Node_Str";
  }
  lineLimitText.setText(count);
  wrapButton=new Button(composite,SWT.CHECK);
  formData=new FormData();
  formData.left=new FormAttachment(lineLimitText,15,SWT.RIGHT);
  wrapButton.setLayoutData(formData);
  wrapButton.setText(Messages.getString("String_Node_Str"));
  wrapButton.setSelection(true);
  wrapButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (wrapButton.getSelection()) {
        consoleText.setWordWrap(true);
      }
 else {
        consoleText.setWordWrap(false);
      }
    }
  }
);
}