Program: 108213
Project: 108213
Buggy source:
/** 
 * Creates the required controls.
 * @param parent
 */
private void create(final Composite parent){
  Label lbl1=new Label(parent,SWT.NONE);
  lbl1.setText("String_Node_Str");
  lbl1.setLayoutData(GridDataFactory.swtDefaults().align(SWT.LEFT,SWT.TOP).create());
  list=new List(parent,SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL| SWT.BORDER);
  for (  Region region : Region.values()) {
    list.add(region.getName());
  }
  list.setLayoutData(new GridData(GridData.FILL_BOTH));
  list.setEnabled(false);
  Label lbl2=new Label(parent,SWT.NONE);
  lbl2.setText("String_Node_Str");
  text=new Text(parent,SWT.BORDER | SWT.SINGLE);
  text.setText("String_Node_Str");
  text.setLayoutData(SWTUtil.createFillHorizontallyGridData());
  Label lbl3=new Label(parent,SWT.NONE);
  lbl3.setText("String_Node_Str");
  text2=new Text(parent,SWT.BORDER | SWT.SINGLE);
  text2.setText("String_Node_Str");
  text2.setLayoutData(SWTUtil.createFillHorizontallyGridData());
  list.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent arg0){
      if (model.getInputConfig() != null && model.getInputConfig().getInput() != null && list.getSelection() != null && list.getSelection().length != 0) {
        long sampleSize=model.getInputConfig().getInput().getHandle().getNumRows();
        long populationSize=-1;
        Region selected=null;
        for (        Region region : Region.values()) {
          if (region.getName().equals(list.getSelection()[0])) {
            populationSize=region.getPopulation();
            selected=region;
            break;
          }
        }
        if (populationSize == -1) {
          return;
        }
        model.getRiskModel().setRegion(selected);
        controller.update(new ModelEvent(ViewRisksPopulationModel.this,ModelPart.POPULATION_MODEL,model.getRiskModel()));
        text.setText(format.format(model.getRiskModel().getSampleFraction(sampleSize)));
        text2.setText(format.format(model.getRiskModel().getPopulationSize(sampleSize)));
      }
    }
  }
);
  text.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent arg0){
      double value;
      try {
        value=Double.valueOf(text.getText());
      }
 catch (      Exception e) {
        value=-1;
      }
      if (value <= 0d || value > 1d) {
        text.setForeground(GUIHelper.COLOR_RED);
        return;
      }
 else {
        text.setForeground(GUIHelper.COLOR_BLACK);
      }
      DataHandle handle=model.getInputConfig().getInput().getHandle();
      if (value == model.getRiskModel().getSampleFraction(handle)) {
        return;
      }
      model.getRiskModel().setSampleFraction(value);
      for (int i=0; i < list.getItemCount(); i++) {
        if (list.getItem(i).equals(Region.NONE.getName())) {
          list.select(i);
          break;
        }
      }
      text2.setText(format.format(model.getRiskModel().getPopulationSize(handle.getNumRows())));
      controller.update(new ModelEvent(ViewRisksPopulationModel.this,ModelPart.POPULATION_MODEL,model.getRiskModel()));
    }
  }
);
  text2.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent arg0){
      double value;
      try {
        value=Double.valueOf(text2.getText());
      }
 catch (      Exception e) {
        value=-1;
      }
      if (model == null || model.getInputConfig() == null || model.getInputConfig().getInput() == null) {
        return;
      }
      DataHandle handle=model.getInputConfig().getInput().getHandle();
      if (value < handle.getNumRows()) {
        text2.setForeground(GUIHelper.COLOR_RED);
        return;
      }
 else {
        text2.setForeground(GUIHelper.COLOR_BLACK);
      }
      if (value == model.getRiskModel().getPopulationSize(handle)) {
        return;
      }
      model.getRiskModel().setPopulationSize(handle,value);
      for (int i=0; i < list.getItemCount(); i++) {
        if (list.getItem(i).equals(Region.NONE.getName())) {
          list.select(i);
          break;
        }
      }
      text.setText(format.format(model.getRiskModel().getSampleFraction(handle)));
      controller.update(new ModelEvent(ViewRisksPopulationModel.this,ModelPart.POPULATION_MODEL,model.getRiskModel()));
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Creates the required controls.
 * @param parent
 */
private void create(final Composite parent){
  Label lbl1=new Label(parent,SWT.NONE);
  lbl1.setText("String_Node_Str");
  lbl1.setLayoutData(GridDataFactory.swtDefaults().align(SWT.LEFT,SWT.TOP).create());
  list=new List(parent,SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL| SWT.BORDER);
  for (  Region region : Region.values()) {
    list.add(region.getName());
  }
  list.setLayoutData(new GridData(GridData.FILL_BOTH));
  list.setEnabled(false);
  Label lbl2=new Label(parent,SWT.NONE);
  lbl2.setText("String_Node_Str");
  text=new Text(parent,SWT.BORDER | SWT.SINGLE);
  text.setText("String_Node_Str");
  text.setLayoutData(SWTUtil.createFillHorizontallyGridData());
  Label lbl3=new Label(parent,SWT.NONE);
  lbl3.setText("String_Node_Str");
  text2=new Text(parent,SWT.BORDER | SWT.SINGLE);
  text2.setText("String_Node_Str");
  text2.setLayoutData(SWTUtil.createFillHorizontallyGridData());
  list.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent arg0){
      if (model.getInputConfig() != null && model.getInputConfig().getInput() != null && list.getSelection() != null && list.getSelection().length != 0) {
        long sampleSize=model.getInputConfig().getInput().getHandle().getNumRows();
        long populationSize=-1;
        Region selected=null;
        for (        Region region : Region.values()) {
          if (region.getName().equals(list.getSelection()[0])) {
            populationSize=region.getPopulation();
            selected=region;
            break;
          }
        }
        if (populationSize == -1) {
          return;
        }
        model.getRiskModel().setRegion(selected);
        controller.update(new ModelEvent(ViewRisksPopulationModel.this,ModelPart.POPULATION_MODEL,model.getRiskModel()));
        text.setText(format.format(model.getRiskModel().getSampleFraction(sampleSize)));
        text2.setText(format.format(model.getRiskModel().getPopulationSize(sampleSize)));
      }
    }
  }
);
  text.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent arg0){
      double value;
      try {
        value=format.parse(text.getText()).doubleValue();
      }
 catch (      Exception e) {
        value=-1;
      }
      if (value <= 0d || value > 1d) {
        text.setForeground(GUIHelper.COLOR_RED);
        return;
      }
 else {
        text.setForeground(GUIHelper.COLOR_BLACK);
      }
      DataHandle handle=model.getInputConfig().getInput().getHandle();
      if (value == model.getRiskModel().getSampleFraction(handle)) {
        return;
      }
      model.getRiskModel().setSampleFraction(value);
      for (int i=0; i < list.getItemCount(); i++) {
        if (list.getItem(i).equals(Region.NONE.getName())) {
          list.select(i);
          break;
        }
      }
      text2.setText(format.format(model.getRiskModel().getPopulationSize(handle.getNumRows())));
      controller.update(new ModelEvent(ViewRisksPopulationModel.this,ModelPart.POPULATION_MODEL,model.getRiskModel()));
    }
  }
);
  text2.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent arg0){
      double value;
      try {
        value=format.parse(text2.getText()).doubleValue();
      }
 catch (      Exception e) {
        value=-1;
      }
      if (model == null || model.getInputConfig() == null || model.getInputConfig().getInput() == null) {
        return;
      }
      DataHandle handle=model.getInputConfig().getInput().getHandle();
      if (value < handle.getNumRows()) {
        text2.setForeground(GUIHelper.COLOR_RED);
        return;
      }
 else {
        text2.setForeground(GUIHelper.COLOR_BLACK);
      }
      if (value == model.getRiskModel().getPopulationSize(handle)) {
        return;
      }
      model.getRiskModel().setPopulationSize(handle,value);
      for (int i=0; i < list.getItemCount(); i++) {
        if (list.getItem(i).equals(Region.NONE.getName())) {
          list.select(i);
          break;
        }
      }
      text.setText(format.format(model.getRiskModel().getSampleFraction(handle)));
      controller.update(new ModelEvent(ViewRisksPopulationModel.this,ModelPart.POPULATION_MODEL,model.getRiskModel()));
    }
  }
);
}