Program: 108246
Project: 108246
Buggy source:
/** 
 * Update the view.
 */
protected void update(){
  if (model == null) {
    return;
  }
  DataDefinition definition=model.getOutputDefinition();
  if (definition == null)   definition=model.getInputDefinition();
  ModelConfiguration config=model.getOutputConfig();
  if (config == null)   config=model.getInputConfig();
  if (definition == null || config == null || model.getInputConfig().getInput() == null) {
    reset();
    return;
  }
  DataHandle data=model.getInputConfig().getInput().getHandle();
  root.setRedraw(false);
  roots.clear();
  new Property(Resources.getMessage("String_Node_Str"),new String[]{String.valueOf(data.getNumRows())});
  new Property(Resources.getMessage("String_Node_Str"),new String[]{String.valueOf(config.getAllowedOutliers() * 100d) + Resources.getMessage("String_Node_Str")});
  new Property(Resources.getMessage("String_Node_Str"),new String[]{config.getMetric().toString()});
  final Property attributes=new Property(Resources.getMessage("String_Node_Str"),new String[]{String.valueOf(data.getNumColumns())});
  final Property identifying=new Property(attributes,Resources.getMessage("String_Node_Str"),new String[]{String.valueOf(definition.getIdentifyingAttributes().size())});
  int index=0;
  for (int i=0; i < data.getNumColumns(); i++) {
    final String s=data.getAttributeName(i);
    if (definition.getIdentifyingAttributes().contains(s)) {
      final String[] values=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
      values[0]=s;
      values[1]=definition.getDataType(s).toString();
      new Property(identifying,Resources.getMessage("String_Node_Str") + (index++),values);
    }
  }
  final DecimalFormat format=new DecimalFormat("String_Node_Str");
  final Property quasiIdentifying=new Property(attributes,Resources.getMessage("String_Node_Str"),new String[]{String.valueOf(definition.getQuasiIdentifyingAttributes().size())});
  index=0;
  for (int i=0; i < data.getNumColumns(); i++) {
    final String s=data.getAttributeName(i);
    if (definition.getQuasiIdentifyingAttributes().contains(s)) {
      final String[] values=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
      values[0]=s;
      if (definition.getHierarchy(s) != null) {
        DataType<?> type=definition.getDataType(s);
        values[1]=type.getDescription().getLabel();
        if (type.getDescription().hasFormat() && ((DataTypeWithFormat)type).getFormat() != null) {
          values[2]=((DataTypeWithFormat)type).getFormat();
        }
        int height=0;
        String[][] hierarchy=definition.getHierarchy(s);
        if (hierarchy != null && hierarchy.length != 0 && hierarchy[0] != null) {
          height=hierarchy[0].length;
        }
        values[3]=String.valueOf(height);
        values[4]=String.valueOf(definition.getMinimumGeneralization(s));
        values[5]=String.valueOf(definition.getMaximumGeneralization(s));
      }
      values[6]=format.format(config.getAttributeWeight(s));
      new Property(quasiIdentifying,Resources.getMessage("String_Node_Str") + (index++),values);
    }
  }
  final Property sensitive=new Property(attributes,Resources.getMessage("String_Node_Str"),new String[]{String.valueOf(definition.getSensitiveAttributes().size())});
  index=0;
  for (int i=0; i < data.getNumColumns(); i++) {
    final String s=data.getAttributeName(i);
    if (definition.getSensitiveAttributes().contains(s)) {
      final String[] values=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
      values[0]=s;
      if (config.getHierarchy(s) != null) {
        int height=0;
        if (config.getHierarchy(s).getHierarchy().length > 0) {
          height=config.getHierarchy(s).getHierarchy()[0].length;
        }
        values[1]=definition.getDataType(s).toString();
        values[2]=String.valueOf(height);
      }
      new Property(sensitive,Resources.getMessage("String_Node_Str") + (index++),values);
    }
  }
  final Property insensitive=new Property(attributes,Resources.getMessage("String_Node_Str"),new String[]{String.valueOf(definition.getInsensitiveAttributes().size())});
  index=0;
  for (int i=0; i < data.getNumColumns(); i++) {
    final String s=data.getAttributeName(i);
    if (definition.getInsensitiveAttributes().contains(s)) {
      final String[] values=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
      values[0]=s;
      values[1]=definition.getDataType(s).toString();
      new Property(insensitive,Resources.getMessage("String_Node_Str") + (index++),values);
    }
  }
  treeViewer.refresh();
  treeViewer.expandAll();
  root.setRedraw(true);
}

Fixed version (ground truth):
/** 
 * Update the view.
 */
protected void update(){
  if (model == null) {
    return;
  }
  DataDefinition definition=model.getOutputDefinition();
  if (definition == null)   definition=model.getInputDefinition();
  ModelConfiguration config=model.getOutputConfig();
  if (config == null)   config=model.getInputConfig();
  if (definition == null || config == null || model.getInputConfig().getInput() == null) {
    reset();
    return;
  }
  DataHandle data=model.getInputConfig().getInput().getHandle();
  root.setRedraw(false);
  roots.clear();
  new Property(Resources.getMessage("String_Node_Str"),new String[]{String.valueOf(data.getNumRows())});
  new Property(Resources.getMessage("String_Node_Str"),new String[]{String.valueOf(config.getAllowedOutliers() * 100d) + Resources.getMessage("String_Node_Str")});
  new Property(Resources.getMessage("String_Node_Str"),new String[]{config.getMetric().toString()});
  final Property attributes=new Property(Resources.getMessage("String_Node_Str"),new String[]{String.valueOf(data.getNumColumns())});
  final Property identifying=new Property(attributes,Resources.getMessage("String_Node_Str"),new String[]{String.valueOf(definition.getIdentifyingAttributes().size())});
  int index=0;
  for (int i=0; i < data.getNumColumns(); i++) {
    final String s=data.getAttributeName(i);
    if (definition.getIdentifyingAttributes().contains(s)) {
      final String[] values=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
      values[0]=s;
      values[1]=definition.getDataType(s).toString();
      new Property(identifying,Resources.getMessage("String_Node_Str") + (index++),values);
    }
  }
  final DecimalFormat format=new DecimalFormat("String_Node_Str");
  final Property quasiIdentifying=new Property(attributes,Resources.getMessage("String_Node_Str"),new String[]{String.valueOf(definition.getQuasiIdentifyingAttributes().size())});
  index=0;
  for (int i=0; i < data.getNumColumns(); i++) {
    final String s=data.getAttributeName(i);
    if (definition.getQuasiIdentifyingAttributes().contains(s)) {
      final String[] values=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
      values[0]=s;
      if (definition.getHierarchy(s) != null) {
        DataType<?> type=definition.getDataType(s);
        values[1]=type.getDescription().getLabel();
        if (type.getDescription().hasFormat() && ((DataTypeWithFormat)type).getFormat() != null) {
          values[2]=((DataTypeWithFormat)type).getFormat();
        }
        int height=0;
        String[][] hierarchy=definition.getHierarchy(s);
        if (hierarchy != null && hierarchy.length != 0 && hierarchy[0] != null) {
          height=hierarchy[0].length;
        }
        values[3]=String.valueOf(height);
        values[4]=String.valueOf(definition.getMinimumGeneralization(s));
        values[5]=String.valueOf(definition.getMaximumGeneralization(s));
      }
      values[6]=format.format(config.getAttributeWeight(s));
      new Property(quasiIdentifying,Resources.getMessage("String_Node_Str") + (index++),values);
    }
  }
  final Property sensitive=new Property(attributes,Resources.getMessage("String_Node_Str"),new String[]{String.valueOf(definition.getSensitiveAttributes().size())});
  index=0;
  for (int i=0; i < data.getNumColumns(); i++) {
    final String s=data.getAttributeName(i);
    if (definition.getSensitiveAttributes().contains(s)) {
      final String[] values=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
      values[0]=s;
      if (config.getHierarchy(s) != null && config.getHierarchy(s).getHierarchy() != null) {
        int height=0;
        if (config.getHierarchy(s).getHierarchy().length > 0) {
          height=config.getHierarchy(s).getHierarchy()[0].length;
        }
        values[1]=definition.getDataType(s).toString();
        values[2]=String.valueOf(height);
      }
      new Property(sensitive,Resources.getMessage("String_Node_Str") + (index++),values);
    }
  }
  final Property insensitive=new Property(attributes,Resources.getMessage("String_Node_Str"),new String[]{String.valueOf(definition.getInsensitiveAttributes().size())});
  index=0;
  for (int i=0; i < data.getNumColumns(); i++) {
    final String s=data.getAttributeName(i);
    if (definition.getInsensitiveAttributes().contains(s)) {
      final String[] values=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
      values[0]=s;
      values[1]=definition.getDataType(s).toString();
      new Property(insensitive,Resources.getMessage("String_Node_Str") + (index++),values);
    }
  }
  treeViewer.refresh();
  treeViewer.expandAll();
  root.setRedraw(true);
}