Program: 56697
Project: 56697
Buggy source:
/** 
 * @param parent
 * @param style
 * @param categoryColors Colors used for categories. Must contain at least 2 colors.
 */
public NumericalClassificationWidget(Composite parent,int style,List<Color> categoryColors){
  super(parent,style,categoryColors);
  classifier=new NumericalDataClassifier(0,categoryColors.get(0),categoryColors.get(1),Character.toString((char)0x2264) + "String_Node_Str" + 0,"String_Node_Str" + 0);
  GridLayout layout=new GridLayout(2,false);
  setLayout(layout);
  setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  categoryComposite=new Composite(this,SWT.NONE);
  categoryComposite.setLayout(new GridLayout(2,false));
  categoryComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  classLabels=new ArrayList<>(classifier.getDataClasses().size());
  for (  SimpleCategory category : classifier.getDataClasses()) {
    CLabel preview=new CLabel(categoryComposite,SWT.BORDER);
    GridData gridData=new GridData(SWT.LEFT,SWT.TOP,false,false);
    gridData.widthHint=25;
    gridData.heightHint=25;
    preview.setLayoutData(gridData);
    org.eclipse.swt.graphics.Color c=category.color.getSWTColor(Display.getCurrent());
    preview.setBackground(c);
    preview.update();
    colorRegistry.add(c);
    Text l=new Text(categoryComposite,SWT.BORDER);
    gridData=new GridData(SWT.FILL,SWT.TOP,true,false);
    gridData.widthHint=220;
    l.setLayoutData(gridData);
    l.setText(category.name);
    l.setEditable(false);
    l.addModifyListener(new ModifyListener(){
      @Override public void modifyText(      ModifyEvent e){
        if (useCustomCategoryNamesButton.getSelection()) {
          updateClassifier();
        }
      }
    }
);
    classLabels.add(l);
  }
  useCustomCategoryNamesButton=new Button(categoryComposite,SWT.CHECK);
  useCustomCategoryNamesButton.setText("String_Node_Str");
  useCustomCategoryNamesButton.setLayoutData(new GridData(SWT.LEFT,SWT.TOP,false,false,2,1));
  useCustomCategoryNamesButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      for (      Text t : classLabels) {
        t.setEditable(useCustomCategoryNamesButton.getSelection());
      }
    }
  }
);
  Composite scaleComposite=new Composite(this,SWT.NONE);
  GridLayout gl=new GridLayout(1,false);
  gl.marginHeight=0;
  gl.marginWidth=0;
  scaleComposite.setLayout(gl);
  scaleComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  maxLabel=new Label(scaleComposite,SWT.NONE);
  maxLabel.setLayoutData(new GridData(SWT.FILL,SWT.TOP,true,false));
  maxLabel.setText("String_Node_Str");
  thresholdScale=new Scale(scaleComposite,SWT.VERTICAL);
  GridData gd=new GridData(SWT.CENTER,SWT.FILL,false,true);
  gd.heightHint=120;
  thresholdScale.setLayoutData(gd);
  thresholdScale.setMinimum(THRESHOLD_SCALE_MIN);
  thresholdScale.setMaximum(THRESHOLD_SCALE_MAX);
  thresholdScale.setPageIncrement(10);
  thresholdScale.setOrientation(SWT.RIGHT_TO_LEFT);
  thresholdScale.addSelectionListener(new SelectionListener(){
    @Override public void widgetSelected(    SelectionEvent e){
      float value=(float)mappingFunction.apply(thresholdScale.getMaximum() - thresholdScale.getSelection() + thresholdScale.getMinimum());
      thresholdText.setText("String_Node_Str" + value);
    }
    @Override public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
  minLabel=new Label(scaleComposite,SWT.NONE);
  minLabel.setLayoutData(new GridData(SWT.FILL,SWT.TOP,true,false));
  minLabel.setText("String_Node_Str");
  Label thresholdLabel=new Label(this,SWT.NONE);
  thresholdLabel.setLayoutData(new GridData(SWT.RIGHT,SWT.TOP,true,false));
  thresholdLabel.setText("String_Node_Str");
  thresholdText=new Text(this,SWT.BORDER);
  thresholdText.setText("String_Node_Str");
  gd=new GridData(SWT.FILL,SWT.TOP,true,false);
  gd.widthHint=100;
  thresholdText.setLayoutData(gd);
  thresholdText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      updateClassifier();
    }
  }
);
}

Fixed version (ground truth):
/** 
 * @param parent
 * @param style
 * @param categoryColors Colors used for categories. Must contain at least 2 colors.
 */
public NumericalClassificationWidget(Composite parent,int style,List<Color> categoryColors){
  super(parent,style,categoryColors);
  classifier=new NumericalDataClassifier(0,categoryColors.get(0),categoryColors.get(1),Character.toString((char)0x2264) + "String_Node_Str" + 0,"String_Node_Str" + 0);
  GridLayout layout=new GridLayout(2,false);
  setLayout(layout);
  setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  Label descLabel=new Label(this,SWT.NONE);
  descLabel.setText("String_Node_Str");
  descLabel.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,2,1));
  categoryComposite=new Composite(this,SWT.NONE);
  categoryComposite.setLayout(new GridLayout(2,false));
  categoryComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  classLabels=new ArrayList<>(classifier.getDataClasses().size());
  for (  SimpleCategory category : classifier.getDataClasses()) {
    CLabel preview=new CLabel(categoryComposite,SWT.BORDER);
    GridData gridData=new GridData(SWT.LEFT,SWT.TOP,false,false);
    gridData.widthHint=25;
    gridData.heightHint=25;
    preview.setLayoutData(gridData);
    org.eclipse.swt.graphics.Color c=category.color.getSWTColor(Display.getCurrent());
    preview.setBackground(c);
    preview.update();
    colorRegistry.add(c);
    Text l=new Text(categoryComposite,SWT.BORDER);
    gridData=new GridData(SWT.FILL,SWT.TOP,true,false);
    gridData.widthHint=220;
    l.setLayoutData(gridData);
    l.setText(category.name);
    l.setEditable(false);
    l.addModifyListener(new ModifyListener(){
      @Override public void modifyText(      ModifyEvent e){
        if (useCustomCategoryNamesButton.getSelection()) {
          updateClassifier();
        }
      }
    }
);
    classLabels.add(l);
  }
  useCustomCategoryNamesButton=new Button(categoryComposite,SWT.CHECK);
  useCustomCategoryNamesButton.setText("String_Node_Str");
  useCustomCategoryNamesButton.setLayoutData(new GridData(SWT.LEFT,SWT.TOP,false,false,2,1));
  useCustomCategoryNamesButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      for (      Text t : classLabels) {
        t.setEditable(useCustomCategoryNamesButton.getSelection());
      }
    }
  }
);
  Composite scaleComposite=new Composite(this,SWT.NONE);
  GridLayout gl=new GridLayout(1,false);
  gl.marginHeight=0;
  gl.marginWidth=0;
  scaleComposite.setLayout(gl);
  scaleComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  maxLabel=new Label(scaleComposite,SWT.NONE);
  maxLabel.setLayoutData(new GridData(SWT.FILL,SWT.TOP,true,false));
  maxLabel.setText("String_Node_Str");
  thresholdScale=new Scale(scaleComposite,SWT.VERTICAL);
  GridData gd=new GridData(SWT.CENTER,SWT.FILL,false,true);
  gd.heightHint=120;
  thresholdScale.setLayoutData(gd);
  thresholdScale.setMinimum(THRESHOLD_SCALE_MIN);
  thresholdScale.setMaximum(THRESHOLD_SCALE_MAX);
  thresholdScale.setPageIncrement(10);
  thresholdScale.setOrientation(SWT.RIGHT_TO_LEFT);
  thresholdScale.addSelectionListener(new SelectionListener(){
    @Override public void widgetSelected(    SelectionEvent e){
      float value=(float)mappingFunction.apply(thresholdScale.getMaximum() - thresholdScale.getSelection() + thresholdScale.getMinimum());
      thresholdText.setText("String_Node_Str" + value);
    }
    @Override public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
  minLabel=new Label(scaleComposite,SWT.NONE);
  minLabel.setLayoutData(new GridData(SWT.FILL,SWT.TOP,true,false));
  minLabel.setText("String_Node_Str");
  Label thresholdLabel=new Label(this,SWT.NONE);
  thresholdLabel.setLayoutData(new GridData(SWT.RIGHT,SWT.TOP,true,false));
  thresholdLabel.setText("String_Node_Str");
  thresholdText=new Text(this,SWT.BORDER);
  thresholdText.setText("String_Node_Str");
  gd=new GridData(SWT.FILL,SWT.TOP,true,false);
  gd.widthHint=100;
  thresholdText.setLayoutData(gd);
  thresholdText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      updateClassifier();
    }
  }
);
}