Program: 107939
Project: 107939
Buggy source:
/** 
 * Builds this view
 * @param parent
 * @return
 */
private Composite build(final Composite parent){
  Composite group=new Composite(parent,SWT.NONE);
  group.setLayout(SWTUtil.createGridLayout(4,false));
  final Label sLabel=new Label(group,SWT.PUSH);
  sLabel.setText(Resources.getMessage("String_Node_Str"));
  Composite outliersBase=new Composite(group,SWT.NONE);
  GridData baseData=SWTUtil.createFillHorizontallyGridData();
  baseData.horizontalSpan=3;
  outliersBase.setLayoutData(baseData);
  outliersBase.setLayout(GridLayoutFactory.swtDefaults().numColumns(2).create());
  labelOutliers=new Label(outliersBase,SWT.BORDER | SWT.CENTER);
  GridData d2=new GridData();
  d2.minimumWidth=LABEL_WIDTH;
  d2.widthHint=LABEL_WIDTH;
  d2.heightHint=LABEL_HEIGHT;
  labelOutliers.setLayoutData(d2);
  labelOutliers.setText("String_Node_Str");
  sliderOutliers=new Scale(outliersBase,SWT.HORIZONTAL);
  sliderOutliers.setLayoutData(SWTUtil.createFillHorizontallyGridData());
  sliderOutliers.setMaximum(SWTUtil.SLIDER_MAX);
  sliderOutliers.setMinimum(0);
  sliderOutliers.setSelection(0);
  sliderOutliers.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      model.getInputConfig().setAllowedOutliers(SWTUtil.sliderToDouble(0d,1d,sliderOutliers.getSelection()));
      labelOutliers.setText(SWTUtil.getPrettyString(model.getInputConfig().getAllowedOutliers() * 100d) + "String_Node_Str");
      if (model.getInputConfig().getAllowedOutliers() != 0) {
        buttonPracticalMonotonicity.setEnabled(true);
      }
 else {
        buttonPracticalMonotonicity.setSelection(false);
        buttonPracticalMonotonicity.setEnabled(false);
        model.getInputConfig().setPracticalMonotonicity(false);
      }
    }
  }
);
  final Label m2Label=new Label(group,SWT.PUSH);
  m2Label.setText(Resources.getMessage("String_Node_Str"));
  d2=new GridData();
  d2.heightHint=LABEL_HEIGHT;
  d2.minimumHeight=LABEL_HEIGHT;
  m2Label.setLayoutData(d2);
  final GridData d82=SWTUtil.createFillHorizontallyGridData();
  d82.horizontalSpan=3;
  buttonPracticalMonotonicity=new Button(group,SWT.CHECK);
  buttonPracticalMonotonicity.setText(Resources.getMessage("String_Node_Str"));
  buttonPracticalMonotonicity.setSelection(false);
  buttonPracticalMonotonicity.setEnabled(false);
  buttonPracticalMonotonicity.setLayoutData(d82);
  buttonPracticalMonotonicity.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      model.getInputConfig().setPracticalMonotonicity(buttonPracticalMonotonicity.getSelection());
    }
  }
);
  final Label sLabel2=new Label(group,SWT.PUSH);
  sLabel2.setText(Resources.getMessage("String_Node_Str"));
  precomputedVariant=new Button(group,SWT.CHECK);
  precomputedVariant.setText(Resources.getMessage("String_Node_Str"));
  precomputedVariant.setSelection(false);
  precomputedVariant.setEnabled(false);
  precomputedVariant.setLayoutData(GridDataFactory.swtDefaults().span(1,1).create());
  precomputedVariant.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      model.getMetricConfiguration().setPrecomputed(precomputedVariant.getSelection());
      if (precomputedVariant.getSelection()) {
        precomputationThreshold.setSelection(SWTUtil.doubleToSlider(0d,1d,model.getMetricConfiguration().getPrecomputationThreshold()));
        precomputationThreshold.setEnabled(true);
        labelThreshold.setText(SWTUtil.getPrettyString((model.getMetricConfiguration().getPrecomputationThreshold() * 100d)) + "String_Node_Str");
      }
 else {
        precomputationThreshold.setEnabled(false);
      }
    }
  }
);
  labelThreshold=new Label(group,SWT.BORDER | SWT.CENTER);
  GridData d24=new GridData();
  d24.minimumWidth=LABEL_WIDTH;
  d24.widthHint=LABEL_WIDTH;
  d24.heightHint=LABEL_HEIGHT;
  labelThreshold.setLayoutData(d24);
  labelThreshold.setText("String_Node_Str");
  precomputationThreshold=new Scale(group,SWT.HORIZONTAL);
  precomputationThreshold.setLayoutData(SWTUtil.createFillHorizontallyGridData());
  precomputationThreshold.setMaximum(SWTUtil.SLIDER_MAX);
  precomputationThreshold.setMinimum(0);
  precomputationThreshold.setSelection(0);
  precomputationThreshold.setEnabled(false);
  precomputationThreshold.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      model.getMetricConfiguration().setPrecomputationThreshold(SWTUtil.sliderToDouble(0d,1d,precomputationThreshold.getSelection()));
      labelThreshold.setText(SWTUtil.getPrettyString(model.getMetricConfiguration().getPrecomputationThreshold() * 100d) + "String_Node_Str");
    }
  }
);
  return group;
}

Fixed version (ground truth):
/** 
 * Builds this view
 * @param parent
 * @return
 */
private Composite build(final Composite parent){
  Composite group=new Composite(parent,SWT.NONE);
  group.setLayout(SWTUtil.createGridLayout(4,false));
  final Label sLabel=new Label(group,SWT.PUSH);
  sLabel.setText(Resources.getMessage("String_Node_Str"));
  Composite outliersBase=new Composite(group,SWT.NONE);
  GridData baseData=SWTUtil.createFillHorizontallyGridData();
  baseData.horizontalSpan=3;
  outliersBase.setLayoutData(baseData);
  outliersBase.setLayout(GridLayoutFactory.swtDefaults().numColumns(2).create());
  labelOutliers=new Label(outliersBase,SWT.BORDER | SWT.CENTER);
  GridData d2=new GridData();
  d2.minimumWidth=LABEL_WIDTH;
  d2.widthHint=LABEL_WIDTH;
  d2.heightHint=LABEL_HEIGHT;
  labelOutliers.setLayoutData(d2);
  labelOutliers.setText("String_Node_Str");
  sliderOutliers=new Scale(outliersBase,SWT.HORIZONTAL);
  sliderOutliers.setLayoutData(SWTUtil.createFillHorizontallyGridData());
  sliderOutliers.setMaximum(SWTUtil.SLIDER_MAX);
  sliderOutliers.setMinimum(0);
  sliderOutliers.setSelection(0);
  sliderOutliers.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      model.getInputConfig().setAllowedOutliers(SWTUtil.sliderToDouble(0d,1d,sliderOutliers.getSelection()));
      labelOutliers.setText(SWTUtil.getPrettyString(model.getInputConfig().getAllowedOutliers() * 100d) + "String_Node_Str");
      if (model.getInputConfig().getAllowedOutliers() != 0) {
        buttonPracticalMonotonicity.setEnabled(true);
      }
 else {
        buttonPracticalMonotonicity.setSelection(false);
        buttonPracticalMonotonicity.setEnabled(false);
        model.getInputConfig().setPracticalMonotonicity(false);
      }
    }
  }
);
  final Label m2Label=new Label(group,SWT.PUSH);
  m2Label.setText(Resources.getMessage("String_Node_Str"));
  d2=new GridData();
  d2.heightHint=LABEL_HEIGHT;
  d2.minimumHeight=LABEL_HEIGHT;
  m2Label.setLayoutData(d2);
  final GridData d82=SWTUtil.createFillHorizontallyGridData();
  d82.horizontalSpan=3;
  buttonPracticalMonotonicity=new Button(group,SWT.CHECK);
  buttonPracticalMonotonicity.setText(Resources.getMessage("String_Node_Str"));
  buttonPracticalMonotonicity.setSelection(false);
  buttonPracticalMonotonicity.setEnabled(false);
  buttonPracticalMonotonicity.setLayoutData(d82);
  buttonPracticalMonotonicity.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      model.getInputConfig().setPracticalMonotonicity(buttonPracticalMonotonicity.getSelection());
    }
  }
);
  final Label sLabel2=new Label(group,SWT.PUSH);
  sLabel2.setText(Resources.getMessage("String_Node_Str"));
  precomputedVariant=new Button(group,SWT.CHECK);
  precomputedVariant.setText(Resources.getMessage("String_Node_Str"));
  precomputedVariant.setSelection(false);
  precomputedVariant.setEnabled(false);
  precomputedVariant.setLayoutData(GridDataFactory.swtDefaults().span(1,1).create());
  precomputedVariant.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      model.getMetricConfiguration().setPrecomputed(precomputedVariant.getSelection());
      if (precomputedVariant.getSelection()) {
        precomputationThreshold.setSelection(SWTUtil.doubleToSlider(0d,1d,model.getMetricConfiguration().getPrecomputationThreshold()));
        precomputationThreshold.setEnabled(true);
        labelThreshold.setText(SWTUtil.getPrettyString((model.getMetricConfiguration().getPrecomputationThreshold() * 100d)) + "String_Node_Str");
      }
 else {
        precomputationThreshold.setEnabled(false);
      }
      controller.update(new ModelEvent(this,ModelPart.METRIC,model.getMetricDescription()));
    }
  }
);
  labelThreshold=new Label(group,SWT.BORDER | SWT.CENTER);
  GridData d24=new GridData();
  d24.minimumWidth=LABEL_WIDTH;
  d24.widthHint=LABEL_WIDTH;
  d24.heightHint=LABEL_HEIGHT;
  labelThreshold.setLayoutData(d24);
  labelThreshold.setText("String_Node_Str");
  precomputationThreshold=new Scale(group,SWT.HORIZONTAL);
  precomputationThreshold.setLayoutData(SWTUtil.createFillHorizontallyGridData());
  precomputationThreshold.setMaximum(SWTUtil.SLIDER_MAX);
  precomputationThreshold.setMinimum(0);
  precomputationThreshold.setSelection(0);
  precomputationThreshold.setEnabled(false);
  precomputationThreshold.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      model.getMetricConfiguration().setPrecomputationThreshold(SWTUtil.sliderToDouble(0d,1d,precomputationThreshold.getSelection()));
      labelThreshold.setText(SWTUtil.getPrettyString(model.getMetricConfiguration().getPrecomputationThreshold() * 100d) + "String_Node_Str");
    }
  }
);
  return group;
}