Program: 107856
Project: 107856
Buggy source:
/** 
 * Updates the view.
 * @param node
 */
private void update(){
  if (model == null || model.getInputConfig() == null || model.getInputConfig().getInput() == null) {
    return;
  }
  DataDefinition definition=model.getOutputDefinition() == null ? model.getInputDefinition() : model.getOutputDefinition();
  DataHandle handle=model.getOutput() != null ? model.getOutput() : model.getInputConfig().getInput().getHandle();
  State state=new State(handle,definition);
  if (this.state == null || !this.state.equals(state)) {
    this.state=state;
  }
 else {
    return;
  }
  root.setRedraw(false);
  for (  TableEditor editor : editors) {
    editor.getEditor().dispose();
    editor.dispose();
  }
  editors.clear();
  for (  TableItem item : features.getItems()) {
    item.dispose();
  }
  for (  TableItem item : classes.getItems()) {
    item.dispose();
  }
  features.removeAll();
  classes.removeAll();
  TableItem itemAllFeatures=new TableItem(features,SWT.NONE);
  itemAllFeatures.setText(new String[]{"String_Node_Str",ALL,"String_Node_Str"});
  TableItem itemAllclasses=new TableItem(classes,SWT.NONE);
  itemAllclasses.setText(new String[]{"String_Node_Str",ALL});
  for (int i=0; i < state.attributes.size(); i++) {
    final String attribute=state.attributes.get(i);
    AttributeType type=state.types.get(i);
    Image image=controller.getResources().getImage(type);
    TableItem itemF=new TableItem(features,SWT.NONE);
    itemF.setText(new String[]{"String_Node_Str",attribute,"String_Node_Str"});
    itemF.setImage(0,image);
    itemF.setChecked(model.getSelectedFeatures().contains(attribute));
    TableItem itemC=new TableItem(classes,SWT.NONE);
    itemC.setText(new String[]{"String_Node_Str",attribute});
    itemC.setImage(0,image);
    itemC.setChecked(model.getSelectedClasses().contains(attribute));
    TableEditor editor=new TableEditor(features);
    editors.add(editor);
    final CCombo combo=new CCombo(features,SWT.NONE);
    final Color defaultColor=combo.getForeground();
    if (definition.getDataType(attribute) instanceof DataTypeWithRatioScale) {
      combo.add("String_Node_Str");
      combo.add("String_Node_Str");
      combo.add("String_Node_Str");
      combo.add("String_Node_Str");
      combo.add("String_Node_Str");
      combo.add("String_Node_Str");
    }
 else {
      combo.setEditable(false);
    }
    combo.add(LABEL_CATEGORICAL);
    combo.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent arg0){
        updateCombo(attribute,combo,defaultColor);
      }
    }
);
    combo.addSelectionListener(new DelayedChangeListener(DELAY){
      public void delayedEvent(){
        updateFunction(attribute,combo);
      }
    }
);
    combo.addKeyListener(new KeyAdapter(){
      @Override public void keyReleased(      KeyEvent arg0){
        updateCombo(attribute,combo,defaultColor);
      }
    }
);
    combo.addKeyListener(new DelayedChangeListener(DELAY){
      public void delayedEvent(){
        updateFunction(attribute,combo);
      }
    }
);
    editor.grabHorizontal=true;
    editor.setEditor(combo,itemF,2);
    String function=model.getClassificationModel().getFeatureScaling().getScalingFunction(attribute);
    if (function == null || function.equals("String_Node_Str")) {
      function=LABEL_CATEGORICAL;
    }
    combo.setText(function);
  }
  features.layout();
  root.setRedraw(true);
  SWTUtil.enable(root);
}

Fixed version (ground truth):
/** 
 * Updates the view.
 * @param node
 */
private void update(){
  if (model == null || model.getInputConfig() == null || model.getInputConfig().getInput() == null) {
    return;
  }
  DataDefinition definition=model.getOutputDefinition() == null ? model.getInputDefinition() : model.getOutputDefinition();
  DataHandle handle=model.getOutput() != null ? model.getOutput() : model.getInputConfig().getInput().getHandle();
  State state=new State(handle,definition,model.getClassificationModel().getFeatureScaling());
  if (this.state == null || !this.state.equals(state)) {
    this.state=state;
  }
 else {
    return;
  }
  root.setRedraw(false);
  for (  TableEditor editor : editors) {
    editor.getEditor().dispose();
    editor.dispose();
  }
  editors.clear();
  for (  TableItem item : features.getItems()) {
    item.dispose();
  }
  for (  TableItem item : classes.getItems()) {
    item.dispose();
  }
  features.removeAll();
  classes.removeAll();
  TableItem itemAllFeatures=new TableItem(features,SWT.NONE);
  itemAllFeatures.setText(new String[]{"String_Node_Str",ALL,"String_Node_Str"});
  TableItem itemAllclasses=new TableItem(classes,SWT.NONE);
  itemAllclasses.setText(new String[]{"String_Node_Str",ALL});
  for (int i=0; i < state.attributes.size(); i++) {
    final String attribute=state.attributes.get(i);
    AttributeType type=state.types.get(i);
    Image image=controller.getResources().getImage(type);
    TableItem itemF=new TableItem(features,SWT.NONE);
    itemF.setText(new String[]{"String_Node_Str",attribute,"String_Node_Str"});
    itemF.setImage(0,image);
    itemF.setChecked(model.getSelectedFeatures().contains(attribute));
    TableItem itemC=new TableItem(classes,SWT.NONE);
    itemC.setText(new String[]{"String_Node_Str",attribute});
    itemC.setImage(0,image);
    itemC.setChecked(model.getSelectedClasses().contains(attribute));
    TableEditor editor=new TableEditor(features);
    editors.add(editor);
    final CCombo combo=new CCombo(features,SWT.NONE);
    final Color defaultColor=combo.getForeground();
    if (definition.getDataType(attribute) instanceof DataTypeWithRatioScale) {
      combo.add("String_Node_Str");
      combo.add("String_Node_Str");
      combo.add("String_Node_Str");
      combo.add("String_Node_Str");
      combo.add("String_Node_Str");
      combo.add("String_Node_Str");
    }
 else {
      combo.setEditable(false);
    }
    combo.add(LABEL_CATEGORICAL);
    combo.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent arg0){
        updateCombo(attribute,combo,defaultColor);
      }
    }
);
    combo.addSelectionListener(new DelayedChangeListener(DELAY){
      public void delayedEvent(){
        updateFunction(attribute,combo);
      }
    }
);
    combo.addKeyListener(new KeyAdapter(){
      @Override public void keyReleased(      KeyEvent arg0){
        updateCombo(attribute,combo,defaultColor);
      }
    }
);
    combo.addKeyListener(new DelayedChangeListener(DELAY){
      public void delayedEvent(){
        updateFunction(attribute,combo);
      }
    }
);
    editor.grabHorizontal=true;
    editor.setEditor(combo,itemF,2);
    String function=model.getClassificationModel().getFeatureScaling().getScalingFunction(attribute);
    if (function == null || function.equals("String_Node_Str")) {
      function=LABEL_CATEGORICAL;
    }
    combo.setText(function);
  }
  features.layout();
  root.setRedraw(true);
  SWTUtil.enable(root);
}