Program: 108802
Project: 108802
Buggy source:
/** 
 * Constructor
 * @param parent
 * @param attribute
 * @param controller
 */
public ViewAttributeDefinition(final CTabFolder parent,final String attribute,final Controller controller){
  IMAGE_INSENSITIVE=controller.getResources().getImage("String_Node_Str");
  IMAGE_SENSITIVE=controller.getResources().getImage("String_Node_Str");
  IMAGE_QUASI_IDENTIFYING=controller.getResources().getImage("String_Node_Str");
  IMAGE_IDENTIFYING=controller.getResources().getImage("String_Node_Str");
  this.controller=controller;
  this.attribute=attribute;
  this.controller.addListener(ModelPart.MODEL,this);
  this.controller.addListener(ModelPart.INPUT,this);
  this.controller.addListener(ModelPart.ATTRIBUTE_TYPE,this);
  tab=new CTabItem(parent,SWT.NULL);
  tab.setText(attribute);
  tab.setShowClose(false);
  tab.setImage(IMAGE_INSENSITIVE);
  Composite group=new Composite(parent,SWT.NULL);
  group.setLayoutData(SWTUtil.createFillGridData());
  final GridLayout groupInputGridLayout=new GridLayout();
  groupInputGridLayout.numColumns=1;
  group.setLayout(groupInputGridLayout);
  final Composite type=new Composite(group,SWT.NULL);
  type.setLayoutData(SWTUtil.createFillHorizontallyGridData());
  final GridLayout typeInputGridLayout=new GridLayout();
  typeInputGridLayout.numColumns=6;
  type.setLayout(typeInputGridLayout);
  final IView outer=this;
  final Label kLabel=new Label(type,SWT.PUSH);
  kLabel.setText(Resources.getMessage("String_Node_Str"));
  typeCombo=new Combo(type,SWT.READ_ONLY);
  typeCombo.setLayoutData(SWTUtil.createFillGridData());
  typeCombo.setItems(COMBO1_VALUES);
  typeCombo.select(0);
  typeCombo.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      if ((typeCombo.getSelectionIndex() != -1) && (attribute != null)) {
        if ((model != null) && (model.getInputConfig().getInput() != null)) {
          final AttributeType type=COMBO1_TYPES[typeCombo.getSelectionIndex()];
          final DataDefinition definition=model.getInputConfig().getInput().getDefinition();
          if (type == null) {
            definition.setAttributeType(attribute,Hierarchy.create());
          }
 else {
            definition.setAttributeType(attribute,type);
          }
          boolean criteriaDisabled=false;
          if (type == AttributeType.SENSITIVE_ATTRIBUTE) {
            model.getLDiversityModel().get(attribute).setActive(true);
            model.getTClosenessModel().get(attribute).setActive(true);
          }
 else {
            if (model.getLDiversityModel().get(attribute).isEnabled() || model.getTClosenessModel().get(attribute).isEnabled()) {
              criteriaDisabled=true;
            }
            model.getLDiversityModel().get(attribute).setActive(false);
            model.getTClosenessModel().get(attribute).setActive(false);
            model.getTClosenessModel().get(attribute).setEnabled(false);
            model.getLDiversityModel().get(attribute).setEnabled(false);
          }
          if (definition.getQuasiIdentifyingAttributes().isEmpty()) {
            if (model.getKAnonymityModel().isEnabled() || model.getDPresenceModel().isEnabled()) {
              criteriaDisabled=true;
            }
            model.getKAnonymityModel().setActive(false);
            model.getDPresenceModel().setActive(false);
            model.getKAnonymityModel().setEnabled(false);
            model.getDPresenceModel().setEnabled(false);
          }
 else {
            model.getKAnonymityModel().setActive(true);
            model.getDPresenceModel().setActive(true);
          }
          updateIcon();
          if (criteriaDisabled) {
            controller.update(new ModelEvent(outer,ModelPart.CRITERION_DEFINITION,null));
          }
          controller.update(new ModelEvent(outer,ModelPart.ATTRIBUTE_TYPE,attribute));
        }
      }
    }
  }
);
  final Label kLabel2=new Label(type,SWT.PUSH);
  kLabel2.setText(Resources.getMessage("String_Node_Str"));
  dataTypeCombo=new Combo(type,SWT.READ_ONLY);
  dataTypeCombo.setLayoutData(SWTUtil.createFillGridData());
  dataTypeCombo.setItems(getDataTypes());
  dataTypeCombo.select(getIndexOfDataType(DataType.STRING));
  dataTypeCombo.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      if ((dataTypeCombo.getSelectionIndex() != -1) && (attribute != null)) {
        if ((model != null) && (model.getInputConfig().getInput() != null)) {
          String label=dataTypeCombo.getItem(dataTypeCombo.getSelectionIndex());
          DataTypeDescription<?> description=getDataType(label);
          DataType<?> type;
          if (description.hasFormat()) {
            final String text1=Resources.getMessage("String_Node_Str");
            final String text2=Resources.getMessage("String_Node_Str");
            final String format=controller.actionShowFormatInputDialog(text1,text2,description,getValues());
            if (format == null) {
              type=DataType.STRING;
              dataTypeCombo.select(getIndexOfDataType(DataType.STRING));
              dataTypeText.setText("String_Node_Str");
            }
 else {
              type=description.newInstance(format);
            }
          }
 else {
            type=description.newInstance();
            if (!isValidDataType(type,getValues())) {
              type=DataType.STRING;
              dataTypeCombo.select(getIndexOfDataType(DataType.STRING));
              dataTypeText.setText("String_Node_Str");
            }
          }
          model.getInputConfig().getInput().getDefinition().setDataType(attribute,type);
          controller.update(new ModelEvent(outer,ModelPart.DATA_TYPE,attribute));
        }
      }
    }
  }
);
  final Label kLabel3=new Label(type,SWT.PUSH);
  kLabel3.setText(Resources.getMessage("String_Node_Str"));
  dataTypeText=new Text(type,SWT.READ_ONLY | SWT.BORDER);
  dataTypeText.setLayoutData(SWTUtil.createFillGridData());
  dataTypeText.setEditable(false);
  dataTypeText.setText("String_Node_Str");
  dataTypeText.setEnabled(false);
  editor=new ViewHierarchy(group,attribute,controller);
  tab.setControl(group);
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param parent
 * @param attribute
 * @param controller
 */
public ViewAttributeDefinition(final CTabFolder parent,final String attribute,final Controller controller){
  IMAGE_INSENSITIVE=controller.getResources().getImage("String_Node_Str");
  IMAGE_SENSITIVE=controller.getResources().getImage("String_Node_Str");
  IMAGE_QUASI_IDENTIFYING=controller.getResources().getImage("String_Node_Str");
  IMAGE_IDENTIFYING=controller.getResources().getImage("String_Node_Str");
  this.controller=controller;
  this.attribute=attribute;
  this.controller.addListener(ModelPart.MODEL,this);
  this.controller.addListener(ModelPart.INPUT,this);
  this.controller.addListener(ModelPart.ATTRIBUTE_TYPE,this);
  tab=new CTabItem(parent,SWT.NULL);
  tab.setText(attribute);
  tab.setShowClose(false);
  tab.setImage(IMAGE_INSENSITIVE);
  Composite group=new Composite(parent,SWT.NULL);
  group.setLayoutData(SWTUtil.createFillGridData());
  final GridLayout groupInputGridLayout=new GridLayout();
  groupInputGridLayout.numColumns=1;
  group.setLayout(groupInputGridLayout);
  final Composite type=new Composite(group,SWT.NULL);
  type.setLayoutData(SWTUtil.createFillHorizontallyGridData());
  final GridLayout typeInputGridLayout=new GridLayout();
  typeInputGridLayout.numColumns=6;
  type.setLayout(typeInputGridLayout);
  final IView outer=this;
  final Label kLabel=new Label(type,SWT.PUSH);
  kLabel.setText(Resources.getMessage("String_Node_Str"));
  typeCombo=new Combo(type,SWT.READ_ONLY);
  typeCombo.setLayoutData(SWTUtil.createFillGridData());
  typeCombo.setItems(COMBO1_VALUES);
  typeCombo.select(0);
  typeCombo.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      if ((typeCombo.getSelectionIndex() != -1) && (attribute != null)) {
        if ((model != null) && (model.getInputConfig().getInput() != null)) {
          final AttributeType type=COMBO1_TYPES[typeCombo.getSelectionIndex()];
          final DataDefinition definition=model.getInputConfig().getInput().getDefinition();
          if (type == null) {
            definition.setAttributeType(attribute,Hierarchy.create());
          }
 else {
            definition.setAttributeType(attribute,type);
          }
          boolean criteriaDisabled=false;
          if (type == AttributeType.SENSITIVE_ATTRIBUTE) {
            model.getLDiversityModel().get(attribute).setActive(true);
            model.getTClosenessModel().get(attribute).setActive(true);
          }
 else {
            if (model.getLDiversityModel().get(attribute).isEnabled() || model.getTClosenessModel().get(attribute).isEnabled()) {
              criteriaDisabled=true;
            }
            model.getLDiversityModel().get(attribute).setActive(false);
            model.getTClosenessModel().get(attribute).setActive(false);
            model.getTClosenessModel().get(attribute).setEnabled(false);
            model.getLDiversityModel().get(attribute).setEnabled(false);
          }
          if (definition.getQuasiIdentifyingAttributes().isEmpty()) {
            if (model.getKAnonymityModel().isEnabled() || model.getDPresenceModel().isEnabled()) {
              criteriaDisabled=true;
            }
            model.getKAnonymityModel().setActive(false);
            model.getDPresenceModel().setActive(false);
            model.getKAnonymityModel().setEnabled(false);
            model.getDPresenceModel().setEnabled(false);
          }
 else {
            model.getKAnonymityModel().setActive(true);
            model.getDPresenceModel().setActive(true);
          }
          updateIcon();
          if (criteriaDisabled) {
            controller.update(new ModelEvent(outer,ModelPart.CRITERION_DEFINITION,null));
          }
          controller.update(new ModelEvent(outer,ModelPart.ATTRIBUTE_TYPE,attribute));
        }
      }
    }
  }
);
  final Label kLabel2=new Label(type,SWT.PUSH);
  kLabel2.setText(Resources.getMessage("String_Node_Str"));
  dataTypeCombo=new Combo(type,SWT.READ_ONLY);
  dataTypeCombo.setLayoutData(SWTUtil.createFillGridData());
  dataTypeCombo.setItems(getDataTypes());
  dataTypeCombo.select(getIndexOfDataType(DataType.STRING));
  dataTypeCombo.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent arg0){
      if ((dataTypeCombo.getSelectionIndex() != -1) && (attribute != null)) {
        if ((model != null) && (model.getInputConfig().getInput() != null)) {
          String label=dataTypeCombo.getItem(dataTypeCombo.getSelectionIndex());
          DataTypeDescription<?> description=getDataType(label);
          DataType<?> type;
          if (description.hasFormat()) {
            final String text1=Resources.getMessage("String_Node_Str");
            final String text2=Resources.getMessage("String_Node_Str");
            final String format=controller.actionShowFormatInputDialog(text1,text2,description,getValues());
            if (format == null) {
              type=DataType.STRING;
            }
 else {
              type=description.newInstance(format);
            }
          }
 else {
            type=description.newInstance();
            if (!isValidDataType(type,getValues())) {
              type=DataType.STRING;
            }
          }
          model.getInputConfig().getInput().getDefinition().setDataType(attribute,type);
          updateDataType();
          controller.update(new ModelEvent(outer,ModelPart.DATA_TYPE,attribute));
        }
      }
    }
  }
);
  final Label kLabel3=new Label(type,SWT.PUSH);
  kLabel3.setText(Resources.getMessage("String_Node_Str"));
  dataTypeText=new Text(type,SWT.READ_ONLY | SWT.BORDER);
  dataTypeText.setLayoutData(SWTUtil.createFillGridData());
  dataTypeText.setEditable(false);
  dataTypeText.setText("String_Node_Str");
  editor=new ViewHierarchy(group,attribute,controller);
  tab.setControl(group);
}