Program: 125331
Project: 125331
Buggy source:
@Override protected void addFields(){
  Group group=Form.createGroup(this,1,Messages.getString("String_Node_Str"),100);
  Composite compositeFileLocation=Form.startNewDimensionnedGridLayout(group,3,WIDTH_GRIDDATA_PIXEL,100);
  GridData gridDataFileLocation=new GridData(GridData.FILL_HORIZONTAL);
  gridDataFileLocation.minimumWidth=WIDTH_GRIDDATA_PIXEL;
  group.setLayoutData(gridDataFileLocation);
  String[] xmlExtensions={"String_Node_Str","String_Node_Str","String_Node_Str"};
  fileFieldXml=new LabelledFileField(compositeFileLocation,Messages.getString("String_Node_Str"),xmlExtensions);
  EMetadataEncoding[] values=EMetadataEncoding.values();
  String[] encodingData=new String[values.length];
  for (int j=0; j < values.length; j++) {
    encodingData[j]=values[j].getName();
  }
  encodingCombo=new LabelledCombo(compositeFileLocation,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),encodingData,1,true,SWT.NONE);
  Composite limitation=new Composite(compositeFileLocation,SWT.NONE);
  limitation.setLayout(new GridLayout(2,false));
  Label labelLimitation=new Label(limitation,SWT.LEFT);
  labelLimitation.setText(Messages.getString("String_Node_Str"));
  final Text commonNodesLimitation=new Text(limitation,SWT.BORDER);
  GridData gd=new GridData(18,12);
  commonNodesLimitation.setLayoutData(gd);
  commonNodesLimitation.setText(String.valueOf(TreePopulator.getLimit()));
  labelLimitation.setToolTipText(MessageFormat.format(Messages.getString("String_Node_Str"),commonNodesLimitation.getText()));
  commonNodesLimitation.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      String str=commonNodesLimitation.getText();
      if ((!str.matches("String_Node_Str")) || (Integer.valueOf(str) < 0)) {
        commonNodesLimitation.setText(String.valueOf(treePopulator.getLimit()));
        labelLimitation.setToolTipText(MessageFormat.format(Messages.getString("String_Node_Str"),commonNodesLimitation.getText()));
      }
 else {
        treePopulator.setLimit(Integer.valueOf(str));
        labelLimitation.setToolTipText(MessageFormat.format(Messages.getString("String_Node_Str"),str));
      }
      if (tempXmlXsdPath != null && getConnection().getFileContent() != null && getConnection().getFileContent().length > 0) {
        valid=treePopulator.populateTree(tempXmlXsdPath,treeNode);
      }
 else {
        valid=treePopulator.populateTree(fileFieldXml.getText(),treeNode);
      }
      checkFieldsValue();
    }
  }
);
  commonNodesLimitation.addFocusListener(new FocusListener(){
    @Override public void focusGained(    FocusEvent e){
    }
    @Override public void focusLost(    FocusEvent e){
      commonNodesLimitation.setText(String.valueOf(TreePopulator.getLimit()));
      labelLimitation.setToolTipText(MessageFormat.format(Messages.getString("String_Node_Str"),commonNodesLimitation.getText()));
    }
  }
);
  group=Form.createGroup(this,1,Messages.getString("String_Node_Str"),220);
  Composite compositeFileViewer=Form.startNewDimensionnedGridLayout(group,1,WIDTH_GRIDDATA_PIXEL,220);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  gridData.minimumWidth=WIDTH_GRIDDATA_PIXEL;
  availableXmlTree=new Tree(compositeFileViewer,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL| SWT.VIRTUAL);
  availableXmlTree.setLayoutData(gridData);
  if (!isInWizard()) {
    Composite compositeBottomButton=Form.startNewGridLayout(this,2,false,SWT.CENTER,SWT.CENTER);
    cancelButton=new UtilsButton(compositeBottomButton,Messages.getString("String_Node_Str"),WIDTH_BUTTON_PIXEL,HEIGHT_BUTTON_PIXEL);
  }
  addUtilsButtonListeners();
}

Fixed version (ground truth):
@Override protected void addFields(){
  Group group=Form.createGroup(this,1,Messages.getString("String_Node_Str"),100);
  Composite compositeFileLocation=Form.startNewDimensionnedGridLayout(group,3,WIDTH_GRIDDATA_PIXEL,100);
  GridData gridDataFileLocation=new GridData(GridData.FILL_HORIZONTAL);
  gridDataFileLocation.minimumWidth=WIDTH_GRIDDATA_PIXEL;
  group.setLayoutData(gridDataFileLocation);
  String[] xmlExtensions={"String_Node_Str","String_Node_Str","String_Node_Str"};
  fileFieldXml=new LabelledFileField(compositeFileLocation,Messages.getString("String_Node_Str"),xmlExtensions);
  EMetadataEncoding[] values=EMetadataEncoding.values();
  String[] encodingData=new String[values.length];
  for (int j=0; j < values.length; j++) {
    encodingData[j]=values[j].getName();
  }
  encodingCombo=new LabelledCombo(compositeFileLocation,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),encodingData,1,true,SWT.NONE);
  Composite limitation=new Composite(compositeFileLocation,SWT.NONE);
  limitation.setLayout(new GridLayout(2,false));
  Label labelLimitation=new Label(limitation,SWT.LEFT);
  labelLimitation.setText(Messages.getString("String_Node_Str"));
  final Text commonNodesLimitation=new Text(limitation,SWT.BORDER);
  GridData gd=new GridData(GridData.VERTICAL_ALIGN_FILL);
  gd.widthHint=18;
  commonNodesLimitation.setLayoutData(gd);
  commonNodesLimitation.setText(String.valueOf(TreePopulator.getLimit()));
  labelLimitation.setToolTipText(MessageFormat.format(Messages.getString("String_Node_Str"),commonNodesLimitation.getText()));
  commonNodesLimitation.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      String str=commonNodesLimitation.getText();
      if ((!str.matches("String_Node_Str")) || (Integer.valueOf(str) < 0)) {
        commonNodesLimitation.setText(String.valueOf(treePopulator.getLimit()));
        labelLimitation.setToolTipText(MessageFormat.format(Messages.getString("String_Node_Str"),commonNodesLimitation.getText()));
      }
 else {
        treePopulator.setLimit(Integer.valueOf(str));
        labelLimitation.setToolTipText(MessageFormat.format(Messages.getString("String_Node_Str"),str));
      }
      if (tempXmlXsdPath != null && getConnection().getFileContent() != null && getConnection().getFileContent().length > 0) {
        valid=treePopulator.populateTree(tempXmlXsdPath,treeNode);
      }
 else {
        valid=treePopulator.populateTree(fileFieldXml.getText(),treeNode);
      }
      checkFieldsValue();
    }
  }
);
  commonNodesLimitation.addFocusListener(new FocusListener(){
    @Override public void focusGained(    FocusEvent e){
    }
    @Override public void focusLost(    FocusEvent e){
      commonNodesLimitation.setText(String.valueOf(TreePopulator.getLimit()));
      labelLimitation.setToolTipText(MessageFormat.format(Messages.getString("String_Node_Str"),commonNodesLimitation.getText()));
    }
  }
);
  group=Form.createGroup(this,1,Messages.getString("String_Node_Str"),220);
  Composite compositeFileViewer=Form.startNewDimensionnedGridLayout(group,1,WIDTH_GRIDDATA_PIXEL,220);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  gridData.minimumWidth=WIDTH_GRIDDATA_PIXEL;
  availableXmlTree=new Tree(compositeFileViewer,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL| SWT.VIRTUAL);
  availableXmlTree.setLayoutData(gridData);
  if (!isInWizard()) {
    Composite compositeBottomButton=Form.startNewGridLayout(this,2,false,SWT.CENTER,SWT.CENTER);
    cancelButton=new UtilsButton(compositeBottomButton,Messages.getString("String_Node_Str"),WIDTH_BUTTON_PIXEL,HEIGHT_BUTTON_PIXEL);
  }
  addUtilsButtonListeners();
}