Program: 108242
Project: 108242
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;
        }
        double sampleFraction=(double)sampleSize / (double)populationSize;
        model.getPopulationModel().setRegion(selected);
        controller.update(new ModelEvent(ViewRisksPopulationModel.this,ModelPart.POPULATION_MODEL,model.getPopulationModel()));
        text.setText(format.format(sampleFraction));
        text2.setText(format.format(populationSize));
      }
    }
  }
);
  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.getPopulationModel().getSampleFraction(handle)) {
        return;
      }
      model.getPopulationModel().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.getPopulationModel().getPopulationSize(handle.getNumRows())));
      controller.update(new ModelEvent(ViewRisksPopulationModel.this,ModelPart.POPULATION_MODEL,model.getPopulationModel()));
    }
  }
);
  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.getPopulationModel().getPopulationSize(handle)) {
        return;
      }
      model.getPopulationModel().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.getPopulationModel().getSampleFraction(handle)));
      controller.update(new ModelEvent(ViewRisksPopulationModel.this,ModelPart.POPULATION_MODEL,model.getPopulationModel()));
    }
  }
);
}

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.getPopulationModel().setRegion(selected);
        controller.update(new ModelEvent(ViewRisksPopulationModel.this,ModelPart.POPULATION_MODEL,model.getPopulationModel()));
        text.setText(format.format(model.getPopulationModel().getSampleFraction(sampleSize)));
        text2.setText(format.format(model.getPopulationModel().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.getPopulationModel().getSampleFraction(handle)) {
        return;
      }
      model.getPopulationModel().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.getPopulationModel().getPopulationSize(handle.getNumRows())));
      controller.update(new ModelEvent(ViewRisksPopulationModel.this,ModelPart.POPULATION_MODEL,model.getPopulationModel()));
    }
  }
);
  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.getPopulationModel().getPopulationSize(handle)) {
        return;
      }
      model.getPopulationModel().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.getPopulationModel().getSampleFraction(handle)));
      controller.update(new ModelEvent(ViewRisksPopulationModel.this,ModelPart.POPULATION_MODEL,model.getPopulationModel()));
    }
  }
);
}