Program: 127738
Project: 127738
Buggy source:
/** 
 * add Controls to group Row To Skip and Limit.
 */
private void addFieldsListenersGroupsRowToSkipAndLimit(){
  ArrayList<LabelledCheckboxCombo> labelledCheckboxCombo2Control=new ArrayList<LabelledCheckboxCombo>();
  labelledCheckboxCombo2Control.add(rowsToSkipHeaderCheckboxCombo);
  labelledCheckboxCombo2Control.add(rowsToSkipLimitCheckboxCombo);
  labelledCheckboxCombo2Control.add(rowsToSkipFooterCheckboxCombo);
  Iterator<LabelledCheckboxCombo> iCheckboxCombo;
  LabelledCheckboxCombo labelledCheckboxCombo;
  for (iCheckboxCombo=labelledCheckboxCombo2Control.iterator(); iCheckboxCombo.hasNext(); ) {
    labelledCheckboxCombo=iCheckboxCombo.next();
    labelledCheckboxCombo.addKeyListener(new KeyAdapter(){
      @Override public void keyPressed(      KeyEvent e){
        if (!isContextMode()) {
          String string=String.valueOf(e.character);
          if (!(string.matches("String_Node_Str")) && e.keyCode != 8 && e.keyCode != SWT.DEL) {
            e.doit=false;
          }
        }
      }
    }
);
  }
  rowsToSkipHeaderCheckboxCombo.addModifyListener(new ModifyListener(){
    public void modifyText(    final ModifyEvent e){
      if (!isContextMode()) {
        if (!rowsToSkipHeaderCheckboxCombo.isEmpty()) {
          if (!rowsToSkipHeaderCheckboxCombo.isInteger() || rowsToSkipHeaderCheckboxCombo.getText().trim().equals("String_Node_Str")) {
            rowsToSkipHeaderCheckboxCombo.deselectAll();
            getConnection().setUseHeader(rowsToSkipHeaderCheckboxCombo.isChecked());
            getConnection().setHeaderValue("String_Node_Str" + 0);
            updateStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
            rowsToSkipHeaderCheckboxCombo.getCombo().setFocus();
            firstRowIsCaptionCheckbox.setSelection(false);
            getConnection().setFirstLineCaption(false);
            return;
          }
 else {
            getConnection().setHeaderValue(rowsToSkipHeaderCheckboxCombo.getText().trim());
            getConnection().setUseHeader(rowsToSkipHeaderCheckboxCombo.isChecked());
            checkFieldsValue();
          }
        }
 else {
          getConnection().setUseHeader(rowsToSkipHeaderCheckboxCombo.isChecked());
          getConnection().setHeaderValue("String_Node_Str" + 0);
          checkFieldsValue();
        }
      }
    }
  }
);
  rowsToSkipFooterCheckboxCombo.addModifyListener(new ModifyListener(){
    public void modifyText(    final ModifyEvent e){
      if (!isContextMode()) {
        if (!rowsToSkipFooterCheckboxCombo.isEmpty()) {
          if (!rowsToSkipFooterCheckboxCombo.isInteger() || rowsToSkipFooterCheckboxCombo.getText().trim().equals("String_Node_Str")) {
            rowsToSkipFooterCheckboxCombo.deselectAll();
            getConnection().setUseFooter(rowsToSkipFooterCheckboxCombo.isChecked());
            getConnection().setFooterValue("String_Node_Str" + 0);
            updateStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
            rowsToSkipFooterCheckboxCombo.getCombo().setFocus();
          }
 else {
            getConnection().setFooterValue(rowsToSkipFooterCheckboxCombo.getText().trim());
          }
        }
 else {
          getConnection().setUseFooter(rowsToSkipFooterCheckboxCombo.isChecked());
          getConnection().setFooterValue("String_Node_Str" + 0);
        }
        checkFieldsValue();
      }
    }
  }
);
  rowsToSkipLimitCheckboxCombo.addModifyListener(new ModifyListener(){
    public void modifyText(    final ModifyEvent e){
      if (!isContextMode()) {
        if (!rowsToSkipLimitCheckboxCombo.isEmpty()) {
          if (!rowsToSkipLimitCheckboxCombo.isInteger() || rowsToSkipLimitCheckboxCombo.getText().trim().equals("String_Node_Str")) {
            rowsToSkipLimitCheckboxCombo.deselectAll();
            getConnection().setUseLimit(rowsToSkipLimitCheckboxCombo.isChecked());
            getConnection().setLimitValue("String_Node_Str" + 0);
            updateStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
            rowsToSkipLimitCheckboxCombo.getCombo().setFocus();
          }
 else {
            getConnection().setLimitValue(rowsToSkipLimitCheckboxCombo.getText());
          }
        }
 else {
          getConnection().setUseLimit(rowsToSkipLimitCheckboxCombo.isChecked());
          getConnection().setLimitValue("String_Node_Str" + 0);
        }
        checkFieldsValue();
      }
    }
  }
);
  rowsToSkipHeaderCheckboxCombo.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      String text=rowsToSkipHeaderCheckboxCombo.getText();
      if (isContextMode() && getContextModeManager() != null) {
        text=getContextModeManager().getOriginalValue(text);
      }
      if ((!rowsToSkipHeaderCheckboxCombo.isChecked()) || text.trim().equals("String_Node_Str")) {
        firstRowIsCaptionCheckbox.setSelection(false);
        getConnection().setFirstLineCaption(false);
      }
      getConnection().setUseHeader(rowsToSkipHeaderCheckboxCombo.isChecked());
      checkRowToSkip();
    }
  }
);
  rowsToSkipFooterCheckboxCombo.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      getConnection().setUseFooter(rowsToSkipFooterCheckboxCombo.isChecked());
      checkRowToSkip();
    }
  }
);
  rowsToSkipLimitCheckboxCombo.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      getConnection().setUseLimit(rowsToSkipLimitCheckboxCombo.isChecked());
      checkRowToSkip();
    }
  }
);
}

Fixed version (ground truth):
/** 
 * add Controls to group Row To Skip and Limit.
 */
private void addFieldsListenersGroupsRowToSkipAndLimit(){
  ArrayList<LabelledCheckboxCombo> labelledCheckboxCombo2Control=new ArrayList<LabelledCheckboxCombo>();
  labelledCheckboxCombo2Control.add(rowsToSkipHeaderCheckboxCombo);
  labelledCheckboxCombo2Control.add(rowsToSkipLimitCheckboxCombo);
  labelledCheckboxCombo2Control.add(rowsToSkipFooterCheckboxCombo);
  Iterator<LabelledCheckboxCombo> iCheckboxCombo;
  LabelledCheckboxCombo labelledCheckboxCombo;
  for (iCheckboxCombo=labelledCheckboxCombo2Control.iterator(); iCheckboxCombo.hasNext(); ) {
    labelledCheckboxCombo=iCheckboxCombo.next();
    labelledCheckboxCombo.addKeyListener(new KeyAdapter(){
      @Override public void keyPressed(      KeyEvent e){
        if (!isContextMode()) {
          String string=String.valueOf(e.character);
          if (!(string.matches("String_Node_Str")) && e.keyCode != 8 && e.keyCode != SWT.DEL) {
            e.doit=false;
          }
        }
      }
    }
);
  }
  rowsToSkipHeaderCheckboxCombo.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      if (!isContextMode()) {
        if (!rowsToSkipHeaderCheckboxCombo.isEmpty()) {
          if (!rowsToSkipHeaderCheckboxCombo.isInteger() || rowsToSkipHeaderCheckboxCombo.getText().trim().equals("String_Node_Str")) {
            rowsToSkipHeaderCheckboxCombo.deselectAll();
            getConnection().setUseHeader(rowsToSkipHeaderCheckboxCombo.isChecked());
            getConnection().setHeaderValue("String_Node_Str" + 0);
            updateStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
            rowsToSkipHeaderCheckboxCombo.getCombo().setFocus();
            firstRowIsCaptionCheckbox.setSelection(false);
            getConnection().setFirstLineCaption(false);
            return;
          }
 else {
            getConnection().setHeaderValue(rowsToSkipHeaderCheckboxCombo.getText().trim());
            getConnection().setUseHeader(rowsToSkipHeaderCheckboxCombo.isChecked());
            checkFieldsValue();
          }
        }
 else {
          getConnection().setUseHeader(rowsToSkipHeaderCheckboxCombo.isChecked());
          getConnection().setHeaderValue("String_Node_Str" + 0);
          checkFieldsValue();
        }
      }
    }
  }
);
  rowsToSkipFooterCheckboxCombo.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      if (!isContextMode()) {
        if (!rowsToSkipFooterCheckboxCombo.isEmpty()) {
          if (!rowsToSkipFooterCheckboxCombo.isInteger() || rowsToSkipFooterCheckboxCombo.getText().trim().equals("String_Node_Str")) {
            rowsToSkipFooterCheckboxCombo.deselectAll();
            getConnection().setUseFooter(rowsToSkipFooterCheckboxCombo.isChecked());
            getConnection().setFooterValue("String_Node_Str" + 0);
            updateStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
            rowsToSkipFooterCheckboxCombo.getCombo().setFocus();
          }
 else {
            getConnection().setFooterValue(rowsToSkipFooterCheckboxCombo.getText().trim());
          }
        }
 else {
          getConnection().setUseFooter(rowsToSkipFooterCheckboxCombo.isChecked());
          getConnection().setFooterValue("String_Node_Str" + 0);
        }
        checkFieldsValue();
      }
    }
  }
);
  rowsToSkipLimitCheckboxCombo.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      if (!isContextMode()) {
        if (!rowsToSkipLimitCheckboxCombo.isEmpty()) {
          if (!rowsToSkipLimitCheckboxCombo.isInteger() || rowsToSkipLimitCheckboxCombo.getText().trim().equals("String_Node_Str")) {
            rowsToSkipLimitCheckboxCombo.deselectAll();
            getConnection().setUseLimit(rowsToSkipLimitCheckboxCombo.isChecked());
            getConnection().setLimitValue("String_Node_Str" + 0);
            updateStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
            rowsToSkipLimitCheckboxCombo.getCombo().setFocus();
          }
 else {
            getConnection().setLimitValue(rowsToSkipLimitCheckboxCombo.getText());
          }
        }
 else {
          getConnection().setUseLimit(rowsToSkipLimitCheckboxCombo.isChecked());
          getConnection().setLimitValue("String_Node_Str" + 0);
        }
        checkFieldsValue();
      }
    }
  }
);
  rowsToSkipHeaderCheckboxCombo.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      String text=rowsToSkipHeaderCheckboxCombo.getText();
      if (isContextMode() && getContextModeManager() != null) {
        text=getContextModeManager().getOriginalValue(text);
      }
      if ((!rowsToSkipHeaderCheckboxCombo.isChecked()) || text.trim().equals("String_Node_Str")) {
        firstRowIsCaptionCheckbox.setSelection(false);
        getConnection().setFirstLineCaption(false);
      }
      getConnection().setUseHeader(rowsToSkipHeaderCheckboxCombo.isChecked());
      checkRowToSkip();
    }
  }
);
  rowsToSkipFooterCheckboxCombo.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      getConnection().setUseFooter(rowsToSkipFooterCheckboxCombo.isChecked());
      checkRowToSkip();
    }
  }
);
  rowsToSkipLimitCheckboxCombo.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      getConnection().setUseLimit(rowsToSkipLimitCheckboxCombo.isChecked());
      checkRowToSkip();
    }
  }
);
}