Program: 107748
Project: 107748
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,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",LABEL_ALL,"String_Node_Str"});
  TableItem itemAllclasses=new TableItem(classes,SWT.NONE);
  itemAllclasses.setText(new String[]{"String_Node_Str",LABEL_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});
    image=controller.getResources().getImage(type,state.responseVariables.contains(attribute));
    itemC.setImage(0,image);
    itemC.setChecked(model.getSelectedClasses().contains(attribute));
    if (definition.getDataType(attribute) instanceof DataTypeWithRatioScale) {
      TableEditor editor=new TableEditor(features);
      editors.add(editor);
      final CCombo combo=new CCombo(features,SWT.NONE);
      final Color defaultColor=combo.getForeground();
      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");
      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);
    }
 else {
      itemF.setText(2,LABEL_CATEGORICAL);
    }
  }
  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",LABEL_ALL,"String_Node_Str"});
  TableItem itemAllclasses=new TableItem(classes,SWT.NONE);
  itemAllclasses.setText(new String[]{"String_Node_Str",LABEL_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});
    image=controller.getResources().getImage(type,state.responseVariables.contains(attribute));
    itemC.setImage(0,image);
    itemC.setChecked(model.getSelectedClasses().contains(attribute));
    if (definition.getDataType(attribute) instanceof DataTypeWithRatioScale) {
      TableEditor editor=new TableEditor(features);
      editors.add(editor);
      final CCombo combo=new CCombo(features,SWT.NONE);
      final Color defaultColor=combo.getForeground();
      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");
      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);
          updateFunction(attribute,combo);
        }
      }
);
      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);
    }
 else {
      itemF.setText(2,LABEL_CATEGORICAL);
    }
  }
  features.layout();
  root.setRedraw(true);
  SWTUtil.enable(root);
}