nus-yam/ex-repair huggingface dataset:
Program: 108704
Project: 108704
Buggy source:
/** 
 * Evaluates the page This checks whether the current settings on the page make any sense. If everything is fine, the settings are being put into the appropriate data container   {@link ImportData} and the  current page is marked ascomplete by invoking  {@link #setPageComplete(boolean)}. Otherwise an error message is set, which will make sure the user is informed about the reason for the error.
 */
private void evaluatePage(){
  setPageComplete(false);
  setErrorMessage(null);
  tablePreview.setVisible(false);
  if (comboLocation.getText().equals("String_Node_Str")) {
    return;
  }
  try {
    if (!customSeparator) {
      detectSeparator();
      comboSeparator.select(selection);
    }
    readPreview();
  }
 catch (  IOException|IllegalArgumentException e) {
    setErrorMessage(e.getMessage());
    return;
  }
  ImportData data=wizardImport.getData();
  data.setWizardColumns(wizardColumns);
  data.setPreviewData(previewData);
  data.setFirstRowContainsHeader(btnContainsHeader.getSelection());
  data.setFileLocation(comboLocation.getText());
  data.setCsvSeparator(separators[selection]);
  setPageComplete(true);
}

Fixed version (ground truth):
/** 
 * Evaluates the page This checks whether the current settings on the page make any sense. If everything is fine, the settings are being put into the appropriate data container   {@link ImportData} and the  current page is marked ascomplete by invoking  {@link #setPageComplete(boolean)}. Otherwise an error message is set, which will make sure the user is informed about the reason for the error.
 */
private void evaluatePage(){
  setPageComplete(false);
  setErrorMessage(null);
  tablePreview.setVisible(false);
  if (comboLocation.getText().equals("String_Node_Str")) {
    return;
  }
  try {
    if (!customSeparator) {
      detectSeparator();
      comboSeparator.select(selection);
    }
    readPreview();
  }
 catch (  IOException|IllegalArgumentException e) {
    setErrorMessage(e.getMessage());
    return;
  }
catch (  RuntimeException e) {
    if (e.getCause() != null) {
      setErrorMessage(e.getCause().getMessage());
    }
 else {
      setErrorMessage(e.getMessage());
    }
    return;
  }
  ImportData data=wizardImport.getData();
  data.setWizardColumns(wizardColumns);
  data.setPreviewData(previewData);
  data.setFirstRowContainsHeader(btnContainsHeader.getSelection());
  data.setFileLocation(comboLocation.getText());
  data.setCsvSeparator(separators[selection]);
  setPageComplete(true);
}
Program: 108705
Project: 108705
Buggy source:
@Override protected String[] readRow() throws IOException {
  final String line=reader.readLine();
  if (line == null) {
    reader.close();
    return null;
  }
  if (columns == -1) {
    columns=countColumns(line);
  }
  final String[] tuple=new String[columns];
  int column=0;
  int offset=0;
  int index=0;
  while (column < (columns - 1)) {
    index=line.indexOf(separator,offset);
    tuple[column++]=line.substring(offset,index);
    offset=index + 1;
  }
  tuple[column]=line.substring(offset);
  return tuple;
}

Fixed version (ground truth):
@Override protected String[] readRow() throws IOException {
  final String line=reader.readLine();
  if (line == null) {
    reader.close();
    return null;
  }
  if (columns == -1) {
    columns=countColumns(line);
  }
  final String[] tuple=new String[columns];
  int column=0;
  int offset=0;
  int index=0;
  while (column < (columns - 1)) {
    index=line.indexOf(separator,offset);
    if (index < 0) {
      throw new IOException("String_Node_Str" + tuple.length + "String_Node_Str");
    }
    tuple[column++]=line.substring(offset,index);
    offset=index + 1;
  }
  tuple[column]=line.substring(offset);
  return tuple;
}
Program: 108706
Project: 108706
Buggy source:
/** 
 * A negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. It uses the specified data types for comparison if no generalization was applied, otherwise it uses string comparison.
 * @param row1 the row1
 * @param row2 the row2
 * @param columns the columns
 * @param ascending the ascending
 * @return the int
 */
@Override protected int internalCompare(final int row1,final int row2,final int[] columns,final boolean ascending){
  for (  final int index : columns) {
    final int attributeType=inverseMap[index] >>> AttributeType.SHIFT;
    final int indexMap=inverseMap[index] & AttributeType.MASK;
    if (attributeType == AttributeType.ATTR_TYPE_ID)     return 0;
    int cmp=0;
    try {
      cmp=dataTypes[attributeType][indexMap].compare(internalGetValue(row1,index),internalGetValue(row2,index));
    }
 catch (    final Exception e) {
      throw new RuntimeException(e);
    }
    if (cmp != 0) {
      if (ascending) {
        return -cmp;
      }
 else {
        return cmp;
      }
    }
  }
  return 0;
}

Fixed version (ground truth):
/** 
 * A negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. It uses the specified data types for comparison if no generalization was applied, otherwise it uses string comparison.
 * @param row1 the row1
 * @param row2 the row2
 * @param columns the columns
 * @param ascending the ascending
 * @return the int
 */
@Override protected int internalCompare(final int row1,final int row2,final int[] columns,final boolean ascending){
  for (  final int index : columns) {
    final int attributeType=inverseMap[index] >>> AttributeType.SHIFT;
    final int indexMap=inverseMap[index] & AttributeType.MASK;
    if (attributeType == AttributeType.ATTR_TYPE_ID)     return 0;
    int cmp=0;
    try {
      String s1=internalGetValue(row1,index);
      String s2=internalGetValue(row2,index);
      cmp=(s1 == suppressionString && s2 == suppressionString) ? 0 : (s1 == suppressionString ? +1 : (s2 == suppressionString ? -1 : dataTypes[attributeType][indexMap].compare(s1,s2)));
    }
 catch (    final Exception e) {
      throw new RuntimeException(e);
    }
    if (cmp != 0) {
      if (ascending) {
        return -cmp;
      }
 else {
        return cmp;
      }
    }
  }
  return 0;
}
Program: 108709
Project: 108709
Buggy source:
public ModelViewConfig getViewConfig(){
  oldViewConfig=viewConfig.clone();
  return this.viewConfig;
}

Fixed version (ground truth):
public ModelViewConfig getViewConfig(){
  return this.viewConfig;
}
Program: 108710
Project: 108710
Buggy source:
public void setAttribute(String attribute){
  this.attribute=attribute;
}

Fixed version (ground truth):
public void setAttribute(String attribute){
  if (attribute == null)   return;
  if (!attribute.equals(this.attribute))   changed=true;
  this.attribute=attribute;
}
Program: 108711
Project: 108711
Buggy source:
public void setMode(Mode mode){
  this.mode=mode;
}

Fixed version (ground truth):
public void setMode(Mode mode){
  if (mode == null)   return;
  if (mode != this.mode)   changed=true;
  this.mode=mode;
}
Program: 108712
Project: 108712
Buggy source:
public void setSubset(boolean subset){
  this.subset=subset;
}

Fixed version (ground truth):
public void setSubset(boolean subset){
  if (subset != this.subset)   changed=true;
  this.subset=subset;
}
Program: 108713
Project: 108713
Buggy source:
/** 
 * Creates a research subset from a file
 */
public void actionSubsetFile(){
  ImportDataWizard wizard=new ImportDataWizard(this,model);
  new WizardDialog(main.getShell(),wizard).open();
  DataSourceConfiguration config=wizard.getResultingConfiguration();
  if (config == null) {
    return;
  }
  final WorkerImport worker=new WorkerImport(config);
  main.showProgressDialog(Resources.getMessage("String_Node_Str"),worker);
  if (worker.getError() != null) {
    main.showErrorDialog(Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"),worker.getError());
    return;
  }
  Data subsetData=worker.getResult();
  Data data=model.getInputConfig().getInput();
  try {
    DataSubset subset=DataSubset.create(data,subsetData);
    model.getInputConfig().setResearchSubset(subset.getSet());
    model.setSubsetOrigin("String_Node_Str");
    update(new ModelEvent(this,ModelPart.RESEARCH_SUBSET,subset.getSet()));
  }
 catch (  IllegalArgumentException e) {
    main.showErrorDialog("String_Node_Str",e.getMessage(),e);
  }
}

Fixed version (ground truth):
/** 
 * Creates a research subset from a file
 */
public void actionSubsetFile(){
  ImportDataWizard wizard=new ImportDataWizard(this,model);
  new WizardDialog(main.getShell(),wizard).open();
  DataSourceConfiguration config=wizard.getResultingConfiguration();
  if (config == null) {
    return;
  }
  final WorkerImport worker=new WorkerImport(config);
  main.showProgressDialog(Resources.getMessage("String_Node_Str"),worker);
  if (worker.getError() != null) {
    if (worker.getError() instanceof IllegalArgumentException) {
      main.showInfoDialog("String_Node_Str",worker.getError().getMessage());
    }
 else {
      main.showErrorDialog(Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"),worker.getError());
    }
    return;
  }
  Data subsetData=worker.getResult();
  Data data=model.getInputConfig().getInput();
  try {
    DataSubset subset=DataSubset.create(data,subsetData);
    model.getInputConfig().setResearchSubset(subset.getSet());
    model.setSubsetOrigin("String_Node_Str");
    update(new ModelEvent(this,ModelPart.RESEARCH_SUBSET,subset.getSet()));
  }
 catch (  IllegalArgumentException e) {
    main.showErrorDialog("String_Node_Str",e.getMessage(),e);
  }
}
Program: 108715
Project: 108715
Buggy source:
@Override public void update(final ModelEvent event){
  if (event.part == ModelPart.SELECTED_NODE) {
    selectedNode=(ARXNode)event.data;
    this.repaint();
  }
 else   if (event.part == ModelPart.MODEL) {
    model=(Model)event.data;
  }
 else   if (event.part == ModelPart.FILTER) {
    if (model != null) {
      SwingUtilities.invokeLater(new Runnable(){
        @Override public void run(){
          initialize(model.getResult(),(ModelNodeFilter)event.data);
          repaint();
        }
      }
);
    }
  }
}

Fixed version (ground truth):
@Override public void update(final ModelEvent event){
  if (event.part == ModelPart.SELECTED_NODE) {
    selectedNode=(ARXNode)event.data;
    this.repaint();
  }
 else   if (event.part == ModelPart.RESULT) {
    if (model.getResult() == null)     reset();
  }
 else   if (event.part == ModelPart.MODEL) {
    model=(Model)event.data;
  }
 else   if (event.part == ModelPart.FILTER) {
    if (model != null) {
      SwingUtilities.invokeLater(new Runnable(){
        @Override public void run(){
          initialize(model.getResult(),(ModelNodeFilter)event.data);
          repaint();
        }
      }
);
    }
  }
}
Program: 108717
Project: 108717
Buggy source:
/** 
 * Resets the view
 */
@Override public void reset(){
  table.setRedraw(false);
  table.clearAll();
  table.setRedraw(true);
  if (listener != null) {
    table.removeListener(SWT.SetData,listener);
  }
}

Fixed version (ground truth):
/** 
 * Resets the view
 */
@Override public void reset(){
  table.setRedraw(false);
  for (  final TableItem i : table.getItems()) {
    i.dispose();
  }
  list.clear();
  table.setRedraw(true);
  if (listener != null) {
    table.removeListener(SWT.SetData,listener);
  }
  SWTUtil.disable(table);
}
Program: 108718
Project: 108718
Buggy source:
/** 
 * Updates the list
 * @param result
 * @param filter
 */
private void update(final ARXResult result,final ModelNodeFilter filter){
  if (result == null || result.getLattice() == null)   return;
  if (filter == null)   return;
  controller.getResources().getDisplay().asyncExec(new Runnable(){
    @Override public void run(){
      table.setRedraw(false);
      table.clearAll();
      list.clear();
      final ARXLattice l=result.getLattice();
      for (      final ARXNode[] level : l.getLevels()) {
        for (        final ARXNode node : level) {
          if (filter.isAllowed(node)) {
            list.add(node);
          }
        }
      }
      Collections.sort(list,new Comparator<ARXNode>(){
        @Override public int compare(        final ARXNode arg0,        final ARXNode arg1){
          return arg0.getMaximumInformationLoss().compareTo(arg1.getMaximumInformationLoss());
        }
      }
);
      if (list.size() > model.getMaxNodesInViewer()) {
        list.clear();
      }
      if (listener != null) {
        table.removeListener(SWT.SetData,listener);
      }
      listener=new Listener(){
        @Override public void handleEvent(        final Event event){
          final TableItem item=(TableItem)event.item;
          final int index=table.indexOf(item);
          createItem(item,index);
        }
      }
;
      table.addListener(SWT.SetData,listener);
      table.setItemCount(list.size());
      table.setRedraw(true);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Updates the list
 * @param result
 * @param filter
 */
private void update(final ARXResult result,final ModelNodeFilter filter){
  if (result == null || result.getLattice() == null)   return;
  if (filter == null)   return;
  controller.getResources().getDisplay().asyncExec(new Runnable(){
    @Override public void run(){
      table.setRedraw(false);
      SWTUtil.enable(table);
      for (      final TableItem i : table.getItems()) {
        i.dispose();
      }
      list.clear();
      final ARXLattice l=result.getLattice();
      for (      final ARXNode[] level : l.getLevels()) {
        for (        final ARXNode node : level) {
          if (filter.isAllowed(node)) {
            list.add(node);
          }
        }
      }
      Collections.sort(list,new Comparator<ARXNode>(){
        @Override public int compare(        final ARXNode arg0,        final ARXNode arg1){
          return arg0.getMaximumInformationLoss().compareTo(arg1.getMaximumInformationLoss());
        }
      }
);
      if (list.size() > model.getMaxNodesInViewer()) {
        list.clear();
      }
      if (listener != null) {
        table.removeListener(SWT.SetData,listener);
      }
      listener=new Listener(){
        @Override public void handleEvent(        final Event event){
          final TableItem item=(TableItem)event.item;
          final int index=table.indexOf(item);
          createItem(item,index);
        }
      }
;
      table.addListener(SWT.SetData,listener);
      table.setItemCount(list.size());
      table.setRedraw(true);
    }
  }
);
}
Program: 108719
Project: 108719
Buggy source:
@Override public void run(){
  table.setRedraw(false);
  table.clearAll();
  list.clear();
  final ARXLattice l=result.getLattice();
  for (  final ARXNode[] level : l.getLevels()) {
    for (    final ARXNode node : level) {
      if (filter.isAllowed(node)) {
        list.add(node);
      }
    }
  }
  Collections.sort(list,new Comparator<ARXNode>(){
    @Override public int compare(    final ARXNode arg0,    final ARXNode arg1){
      return arg0.getMaximumInformationLoss().compareTo(arg1.getMaximumInformationLoss());
    }
  }
);
  if (list.size() > model.getMaxNodesInViewer()) {
    list.clear();
  }
  if (listener != null) {
    table.removeListener(SWT.SetData,listener);
  }
  listener=new Listener(){
    @Override public void handleEvent(    final Event event){
      final TableItem item=(TableItem)event.item;
      final int index=table.indexOf(item);
      createItem(item,index);
    }
  }
;
  table.addListener(SWT.SetData,listener);
  table.setItemCount(list.size());
  table.setRedraw(true);
}

Fixed version (ground truth):
@Override public void run(){
  table.setRedraw(false);
  SWTUtil.enable(table);
  for (  final TableItem i : table.getItems()) {
    i.dispose();
  }
  list.clear();
  final ARXLattice l=result.getLattice();
  for (  final ARXNode[] level : l.getLevels()) {
    for (    final ARXNode node : level) {
      if (filter.isAllowed(node)) {
        list.add(node);
      }
    }
  }
  Collections.sort(list,new Comparator<ARXNode>(){
    @Override public int compare(    final ARXNode arg0,    final ARXNode arg1){
      return arg0.getMaximumInformationLoss().compareTo(arg1.getMaximumInformationLoss());
    }
  }
);
  if (list.size() > model.getMaxNodesInViewer()) {
    list.clear();
  }
  if (listener != null) {
    table.removeListener(SWT.SetData,listener);
  }
  listener=new Listener(){
    @Override public void handleEvent(    final Event event){
      final TableItem item=(TableItem)event.item;
      final int index=table.indexOf(item);
      createItem(item,index);
    }
  }
;
  table.addListener(SWT.SetData,listener);
  table.setItemCount(list.size());
  table.setRedraw(true);
}
Program: 108720
Project: 108720
Buggy source:
/** 
 * Init
 * @param parent
 * @param controller
 */
public ViewList(final Composite parent,final Controller controller){
  controller.addListener(ModelPart.SELECTED_NODE,this);
  controller.addListener(ModelPart.FILTER,this);
  controller.addListener(ModelPart.MODEL,this);
  this.controller=controller;
  table=new Table(parent,SWT.SINGLE | SWT.VIRTUAL | SWT.BORDER| SWT.V_SCROLL);
  table.setLayoutData(SWTUtil.createFillGridData());
  table.setHeaderVisible(true);
  final TableColumn column1=new TableColumn(table,SWT.LEFT);
  column1.setText(Resources.getMessage("String_Node_Str"));
  final TableColumn column4=new TableColumn(table,SWT.LEFT);
  column4.setText(Resources.getMessage("String_Node_Str"));
  final TableColumn column2=new TableColumn(table,SWT.LEFT);
  column2.setText(Resources.getMessage("String_Node_Str"));
  final TableColumn column3=new TableColumn(table,SWT.LEFT);
  column3.setText(Resources.getMessage("String_Node_Str"));
  table.setItemCount(0);
  column1.pack();
  column2.pack();
  column3.pack();
  column4.pack();
}

Fixed version (ground truth):
/** 
 * Init
 * @param parent
 * @param controller
 */
public ViewList(final Composite parent,final Controller controller){
  controller.addListener(ModelPart.SELECTED_NODE,this);
  controller.addListener(ModelPart.FILTER,this);
  controller.addListener(ModelPart.MODEL,this);
  controller.addListener(ModelPart.RESULT,this);
  this.controller=controller;
  table=new Table(parent,SWT.SINGLE | SWT.VIRTUAL | SWT.BORDER| SWT.V_SCROLL);
  table.setLayoutData(SWTUtil.createFillGridData());
  table.setHeaderVisible(true);
  final TableColumn column1=new TableColumn(table,SWT.LEFT);
  column1.setText(Resources.getMessage("String_Node_Str"));
  final TableColumn column4=new TableColumn(table,SWT.LEFT);
  column4.setText(Resources.getMessage("String_Node_Str"));
  final TableColumn column2=new TableColumn(table,SWT.LEFT);
  column2.setText(Resources.getMessage("String_Node_Str"));
  final TableColumn column3=new TableColumn(table,SWT.LEFT);
  column3.setText(Resources.getMessage("String_Node_Str"));
  table.setItemCount(0);
  column1.pack();
  column2.pack();
  column3.pack();
  column4.pack();
}
Program: 108721
Project: 108721
Buggy source:
/** 
 * Converts an information loss into a relative value in percent
 * @param infoLoss
 * @return
 */
private double asRelativeValue(final InformationLoss infoLoss){
  double min=result.getLattice().getBottom().getMinimumInformationLoss().getValue();
  double max=result.getLattice().getTop().getMaximumInformationLoss().getValue();
  return ((infoLoss.getValue() - min) / (max - min)) * 100d;
}

Fixed version (ground truth):
/** 
 * Converts an information loss into a relative value in percent
 * @param infoLoss
 * @return
 */
private double asRelativeValue(final InformationLoss infoLoss){
  if (result == null)   return 0;
  double min=result.getLattice().getBottom().getMinimumInformationLoss().getValue();
  double max=result.getLattice().getTop().getMaximumInformationLoss().getValue();
  return ((infoLoss.getValue() - min) / (max - min)) * 100d;
}
Program: 108723
Project: 108723
Buggy source:
/** 
 * Resets the component
 */
public void reset(){
  this.table.setRedraw(false);
  this.context.getImages().clear();
  this.gridLayer=new DataTableGridLayerStack(new DataTableHandleDataProvider(null,context),table,context);
  this.context.reset();
  this.table.setLayer(gridLayer);
  this.table.refresh();
  this.gridLayer.getBodyLayer().getViewportLayer().recalculateScrollBars();
  this.table.getVerticalBar().setVisible(false);
  this.table.getHorizontalBar().setVisible(false);
  this.table.setRedraw(true);
  this.table.redraw();
  this.table.setVisible(false);
  this.table.getVerticalBar().setVisible(true);
  this.table.getHorizontalBar().setVisible(true);
  this.table.setVisible(false);
}

Fixed version (ground truth):
/** 
 * Resets the component
 */
public void reset(){
  this.table.setRedraw(false);
  this.context.getImages().clear();
  this.context.reset();
  this.gridLayer=new DataTableGridLayerStack(new DataTableHandleDataProvider(context),table,context);
  this.table.setLayer(gridLayer);
  this.table.refresh();
  this.gridLayer.getBodyLayer().getViewportLayer().recalculateScrollBars();
  this.table.getVerticalBar().setVisible(false);
  this.table.getHorizontalBar().setVisible(false);
  this.table.setRedraw(true);
  this.table.redraw();
  this.table.setVisible(false);
  this.table.getVerticalBar().setVisible(true);
  this.table.getHorizontalBar().setVisible(true);
  this.table.setVisible(false);
}
Program: 108724
Project: 108724
Buggy source:
@Override public int getRowCount(){
  if (data == null || data.isOrphaned()) {
    return 0;
  }
  return data.getNumRows();
}

Fixed version (ground truth):
@Override public int getRowCount(){
  DataHandle data=context.getHandle();
  if (data == null || data.isOrphaned()) {
    return 0;
  }
  return data.getNumRows();
}
Program: 108725
Project: 108725
Buggy source:
/** 
 * Creates a new instance
 * @param data
 * @param context
 */
public DataTableHandleDataProvider(final DataHandle data,final DataTableContext context){
  this.data=data;
  this.context=context;
}

Fixed version (ground truth):
/** 
 * Creates a new instance
 * @param data
 * @param context
 */
public DataTableHandleDataProvider(final DataTableContext context){
  this.context=context;
}
Program: 108726
Project: 108726
Buggy source:
@Override public int getColumnCount(){
  if (data == null || data.isOrphaned()) {
    return 0;
  }
  return data.getNumColumns() + (context.getRows() != null ? 1 : 0);
}

Fixed version (ground truth):
@Override public int getColumnCount(){
  DataHandle data=context.getHandle();
  if (data == null || data.isOrphaned()) {
    return 0;
  }
  return data.getNumColumns() + (context.getRows() != null ? 1 : 0);
}
Program: 108727
Project: 108727
Buggy source:
@Override public Object getDataValue(int arg0,int arg1){
  if (data == null) {
    return null;
  }
  RowSet rows=context.getRows();
  if (rows == null) {
    return data.getValue(arg1,arg0);
  }
 else   if (arg0 == 0) {
    if (data instanceof DataHandleSubset) {
      int[] subset=((DataHandleSubset)data).getSubset();
      arg1=subset[arg1];
    }
    return rows.contains(arg1);
  }
 else {
    return data.getValue(arg1,arg0 - 1);
  }
}

Fixed version (ground truth):
@Override public Object getDataValue(int arg0,int arg1){
  DataHandle data=context.getHandle();
  if (data == null) {
    return null;
  }
  RowSet rows=context.getRows();
  if (rows == null) {
    return data.getValue(arg1,arg0);
  }
 else   if (arg0 == 0) {
    if (data instanceof DataHandleSubset) {
      int[] subset=((DataHandleSubset)data).getSubset();
      arg1=subset[arg1];
    }
    return rows.contains(arg1);
  }
 else {
    return data.getValue(arg1,arg0 - 1);
  }
}
Program: 108728
Project: 108728
Buggy source:
/** 
 * Checks whether a registry is referenced
 */
protected void checkRegistry(){
  if (registry == null) {
    throw new RuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Checks whether a registry is referenced
 */
protected void checkRegistry(){
  if (registry == null) {
    throw new RuntimeException("String_Node_Str" + this.getClass().getSimpleName() + "String_Node_Str"+ this.hashCode()+ "String_Node_Str");
  }
}
Program: 108729
Project: 108729
Buggy source:
@Override protected Control createDialogArea(final Composite parent){
  parent.setLayout(new GridLayout());
  final Label label=new Label(parent,SWT.CENTER | SWT.NONE);
  final StringBuffer text=new StringBuffer();
  text.append(Resources.getMessage("String_Node_Str"));
  text.append("String_Node_Str");
  text.append(Resources.getMessage("String_Node_Str"));
  text.append("String_Node_Str");
  text.append("String_Node_Str");
  text.append(Resources.getMessage("String_Node_Str") + Resources.getVersion());
  text.append("String_Node_Str");
  text.append(Resources.getMessage("String_Node_Str"));
  label.setText(text.toString());
  label.setLayoutData(SWTUtil.createFillGridData());
  new Label(parent,SWT.NONE);
  final Text license=new Text(parent,SWT.NONE | SWT.MULTI | SWT.V_SCROLL| SWT.BORDER);
  license.setText(LICENSE);
  final GridData d=SWTUtil.createFillGridData();
  d.heightHint=100;
  license.setLayoutData(d);
  return parent;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(final Composite parent){
  parent.setLayout(new GridLayout());
  final Label label=new Label(parent,SWT.CENTER | SWT.NONE);
  final StringBuffer text=new StringBuffer();
  text.append(Resources.getMessage("String_Node_Str"));
  text.append("String_Node_Str");
  text.append(Resources.getMessage("String_Node_Str"));
  text.append("String_Node_Str");
  text.append("String_Node_Str");
  text.append(Resources.getMessage("String_Node_Str") + Resources.getVersion());
  text.append("String_Node_Str");
  text.append(Resources.getMessage("String_Node_Str"));
  label.setText(text.toString());
  label.setLayoutData(SWTUtil.createFillGridData());
  new Label(parent,SWT.NONE);
  final Text license=new Text(parent,SWT.NONE | SWT.MULTI | SWT.V_SCROLL| SWT.BORDER);
  license.setText(LICENSE);
  license.setEditable(false);
  final GridData d=SWTUtil.createFillGridData();
  d.heightHint=100;
  license.setLayoutData(d);
  return parent;
}
Program: 108730
Project: 108730
Buggy source:
/** 
 * Converts an information loss into a relative value in percent
 * @param infoLoss
 * @return
 */
private double asRelativeValue(final InformationLoss infoLoss){
  double min=model.getResult().getLattice().getBottom().getMinimumInformationLoss().getValue();
  double max=model.getResult().getLattice().getTop().getMaximumInformationLoss().getValue();
  return ((infoLoss.getValue() - min) / (max - min)) * 100d;
}

Fixed version (ground truth):
/** 
 * Converts an information loss into a relative value in percent
 * @param infoLoss
 * @return
 */
private double asRelativeValue(final InformationLoss infoLoss){
  if (model != null && model.getResult() != null && model.getResult().getLattice() != null && model.getResult().getLattice().getBottom() != null && model.getResult().getLattice().getTop() != null) {
    double min=model.getResult().getLattice().getBottom().getMinimumInformationLoss().getValue();
    double max=model.getResult().getLattice().getTop().getMaximumInformationLoss().getValue();
    return ((infoLoss.getValue() - min) / (max - min)) * 100d;
  }
 else {
    return 0;
  }
}
Program: 108733
Project: 108733
Buggy source:
/** 
 * Creates a research subset from a file
 */
public void actionSubsetFile(){
  ImportDataWizard wizard=new ImportDataWizard(this,model);
  new WizardDialog(main.getShell(),wizard).open();
  DataSourceConfiguration config=wizard.getResultingConfiguration();
  if (config == null) {
    return;
  }
  final WorkerImport worker=new WorkerImport(config);
  main.showProgressDialog(Resources.getMessage("String_Node_Str"),worker);
  if (worker.getError() != null) {
    if (worker.getError() instanceof IllegalArgumentException) {
      main.showInfoDialog("String_Node_Str",worker.getError().getMessage());
    }
 else {
      main.showErrorDialog(Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"),worker.getError());
    }
    return;
  }
  Data subsetData=worker.getResult();
  Data data=model.getInputConfig().getInput();
  try {
    DataSubset subset=DataSubset.create(data,subsetData);
    model.getInputConfig().setResearchSubset(subset.getSet());
    model.setSubsetOrigin("String_Node_Str");
    update(new ModelEvent(this,ModelPart.RESEARCH_SUBSET,subset.getSet()));
  }
 catch (  IllegalArgumentException e) {
    main.showInfoDialog("String_Node_Str",worker.getError().getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Creates a research subset from a file
 */
public void actionSubsetFile(){
  ImportDataWizard wizard=new ImportDataWizard(this,model);
  new WizardDialog(main.getShell(),wizard).open();
  DataSourceConfiguration config=wizard.getResultingConfiguration();
  if (config == null) {
    return;
  }
  final WorkerImport worker=new WorkerImport(config);
  main.showProgressDialog(Resources.getMessage("String_Node_Str"),worker);
  if (worker.getError() != null) {
    if (worker.getError() instanceof IllegalArgumentException) {
      main.showInfoDialog("String_Node_Str",worker.getError().getMessage());
    }
 else {
      main.showErrorDialog(Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"),worker.getError());
    }
    return;
  }
  Data subsetData=worker.getResult();
  Data data=model.getInputConfig().getInput();
  try {
    DataSubset subset=DataSubset.create(data,subsetData);
    model.getInputConfig().setResearchSubset(subset.getSet());
    model.setSubsetOrigin("String_Node_Str");
    update(new ModelEvent(this,ModelPart.RESEARCH_SUBSET,subset.getSet()));
  }
 catch (  IllegalArgumentException e) {
    main.showInfoDialog("String_Node_Str",e.getMessage());
  }
}
Program: 108735
Project: 108735
Buggy source:
/** 
 * Returns the current context, consisting of a consistent combination of a config and a data handle
 * @return
 */
public Context getContext(){
  DataHandle handle=null;
  ModelConfiguration config=null;
  if (model == null)   return null;
  if (target == ModelPart.INPUT) {
    if (model.getOutputConfig() != null && model.getOutputConfig().getInput() != null) {
      config=model.getOutputConfig();
    }
 else {
      config=model.getInputConfig();
    }
    handle=config.getInput().getHandle();
  }
 else {
    config=model.getOutputConfig();
    handle=model.getOutput();
  }
  if (model.getViewConfig().isSubset() && model.getOutputConfig() != null && model.getOutputConfig().getConfig() != null && handle != null) {
    handle=handle.getView();
  }
  return new Context(config,handle);
}

Fixed version (ground truth):
/** 
 * Returns the current context, consisting of a consistent combination of a config and a data handle
 * @return
 */
public Context getContext(){
  DataHandle handle=null;
  ModelConfiguration config=null;
  if (model == null)   return null;
  if (target == ModelPart.INPUT) {
    if (model.getOutputConfig() != null && model.getOutputConfig().getInput() != null) {
      config=model.getOutputConfig();
    }
 else {
      config=model.getInputConfig();
    }
    if (config.getInput() == null)     return null;
    handle=config.getInput().getHandle();
  }
 else {
    config=model.getOutputConfig();
    handle=model.getOutput();
  }
  if (model.getViewConfig().isSubset() && model.getOutputConfig() != null && model.getOutputConfig().getConfig() != null && handle != null) {
    handle=handle.getView();
  }
  return new Context(config,handle);
}
Program: 108736
Project: 108736
Buggy source:
/** 
 * Redraws the plot
 */
private void update(){
  if (model != null && !model.isVisualizationEnabled()) {
    reset();
    return;
  }
  if (model != null && model.getAttributePair() != null && model.getAttributePair()[0] != null && model.getAttributePair()[1] != null) {
    DataHandle handle=this.context.getContext().handle;
    if (handle == null) {
      reset();
      return;
    }
    String attribute1=model.getAttributePair()[0];
    String attribute2=model.getAttributePair()[1];
    int column1=handle.getColumnIndexOf(attribute1);
    int column2=handle.getColumnIndexOf(attribute2);
    renderer.updateData(model.getAttributePair()[0],model.getAttributePair()[1],handle.getStatistics().getContingencyTable(column1,MAX_SIZE,column2,MAX_SIZE));
    renderer.updatePlot();
    repaint();
  }
 else {
    reset();
    return;
  }
}

Fixed version (ground truth):
/** 
 * Redraws the plot
 */
private void update(){
  if (model != null && !model.isVisualizationEnabled()) {
    reset();
    return;
  }
  if (model != null && model.getAttributePair() != null && model.getAttributePair()[0] != null && model.getAttributePair()[1] != null) {
    Context context=this.context.getContext();
    if (context == null) {
      reset();
      return;
    }
    DataHandle handle=context.handle;
    if (handle == null) {
      reset();
      return;
    }
    String attribute1=model.getAttributePair()[0];
    String attribute2=model.getAttributePair()[1];
    int column1=handle.getColumnIndexOf(attribute1);
    int column2=handle.getColumnIndexOf(attribute2);
    renderer.updateData(model.getAttributePair()[0],model.getAttributePair()[1],handle.getStatistics().getContingencyTable(column1,MAX_SIZE,column2,MAX_SIZE));
    renderer.updatePlot();
    repaint();
  }
 else {
    reset();
    return;
  }
}
Program: 108737
Project: 108737
Buggy source:
/** 
 * Updates the view
 */
private void update(){
  if (model != null && !model.isVisualizationEnabled()) {
    clearCache();
    reset();
    return;
  }
  Context context=acontext.getContext();
  if (!context.equals(this.context)) {
    this.cache.clear();
    this.context=context;
  }
  if (context.config == null || context.handle == null) {
    return;
  }
  if (!cache.containsKey(attribute)) {
    DataHandle handle=context.handle;
    int column=handle.getColumnIndexOf(attribute);
    if (column >= 0) {
      Hierarchy hierarchy=acontext.getHierarchy(context,attribute);
      double[] frequency=handle.getStatistics().getFrequencyDistribution(column,hierarchy).frequency;
      cache.put(attribute,frequency);
    }
  }
  if (cache.isEmpty() || (cache.get(attribute) == null)) {
    return;
  }
  chart.setRedraw(false);
  final ISeriesSet seriesSet=chart.getSeriesSet();
  final IBarSeries series=(IBarSeries)seriesSet.createSeries(SeriesType.BAR,Resources.getMessage("String_Node_Str"));
  series.getLabel().setVisible(false);
  series.getLabel().setFont(MainWindow.FONT);
  series.setBarColor(Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
  series.setYSeries(cache.get(attribute));
  final IAxisSet axisSet=chart.getAxisSet();
  final IAxis yAxis=axisSet.getYAxis(0);
  yAxis.setRange(new Range(0d,1d));
  yAxis.adjustRange();
  final IAxis xAxis=axisSet.getXAxis(0);
  xAxis.adjustRange();
  chart.updateLayout();
  chart.update();
  chart.setRedraw(true);
  chart.redraw();
}

Fixed version (ground truth):
/** 
 * Updates the view
 */
private void update(){
  if (model != null && !model.isVisualizationEnabled()) {
    clearCache();
    reset();
    return;
  }
  Context context=acontext.getContext();
  if (context == null) {
    clearCache();
    reset();
    return;
  }
  if (!context.equals(this.context)) {
    this.cache.clear();
    this.context=context;
  }
  if (context.config == null || context.handle == null) {
    return;
  }
  if (!cache.containsKey(attribute)) {
    DataHandle handle=context.handle;
    int column=handle.getColumnIndexOf(attribute);
    if (column >= 0) {
      Hierarchy hierarchy=acontext.getHierarchy(context,attribute);
      double[] frequency=handle.getStatistics().getFrequencyDistribution(column,hierarchy).frequency;
      cache.put(attribute,frequency);
    }
  }
  if (cache.isEmpty() || (cache.get(attribute) == null)) {
    return;
  }
  chart.setRedraw(false);
  final ISeriesSet seriesSet=chart.getSeriesSet();
  final IBarSeries series=(IBarSeries)seriesSet.createSeries(SeriesType.BAR,Resources.getMessage("String_Node_Str"));
  series.getLabel().setVisible(false);
  series.getLabel().setFont(MainWindow.FONT);
  series.setBarColor(Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
  series.setYSeries(cache.get(attribute));
  final IAxisSet axisSet=chart.getAxisSet();
  final IAxis yAxis=axisSet.getYAxis(0);
  yAxis.setRange(new Range(0d,1d));
  yAxis.adjustRange();
  final IAxis xAxis=axisSet.getXAxis(0);
  xAxis.adjustRange();
  chart.updateLayout();
  chart.update();
  chart.setRedraw(true);
  chart.redraw();
}
Program: 108738
Project: 108738
Buggy source:
/** 
 * Creates a research subset from a file
 */
public void actionSubsetFile(){
  ImportDataWizard wizard=new ImportDataWizard(this,model);
  new WizardDialog(main.getShell(),wizard).open();
  DataSourceConfiguration config=wizard.getResultingConfiguration();
  if (config == null) {
    return;
  }
  final WorkerImport worker=new WorkerImport(config);
  main.showProgressDialog(Resources.getMessage("String_Node_Str"),worker);
  if (worker.getError() != null) {
    if (worker.getError() instanceof IllegalArgumentException) {
      main.showInfoDialog("String_Node_Str",worker.getError().getMessage());
    }
 else {
      main.showErrorDialog(Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"),worker.getError());
    }
    return;
  }
  Data subsetData=worker.getResult();
  Data data=model.getInputConfig().getInput();
  try {
    DataSubset subset=DataSubset.create(data,subsetData);
    model.getInputConfig().setResearchSubset(subset.getSet());
    model.setSubsetOrigin("String_Node_Str");
    update(new ModelEvent(this,ModelPart.RESEARCH_SUBSET,subset.getSet()));
  }
 catch (  IllegalArgumentException e) {
    main.showErrorDialog("String_Node_Str",e.getMessage(),e);
  }
}

Fixed version (ground truth):
/** 
 * Creates a research subset from a file
 */
public void actionSubsetFile(){
  ImportDataWizard wizard=new ImportDataWizard(this,model);
  new WizardDialog(main.getShell(),wizard).open();
  DataSourceConfiguration config=wizard.getResultingConfiguration();
  if (config == null) {
    return;
  }
  final WorkerImport worker=new WorkerImport(config);
  main.showProgressDialog(Resources.getMessage("String_Node_Str"),worker);
  if (worker.getError() != null) {
    if (worker.getError() instanceof IllegalArgumentException) {
      main.showInfoDialog("String_Node_Str",worker.getError().getMessage());
    }
 else {
      main.showErrorDialog(Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"),worker.getError());
    }
    return;
  }
  Data subsetData=worker.getResult();
  Data data=model.getInputConfig().getInput();
  try {
    DataSubset subset=DataSubset.create(data,subsetData);
    model.getInputConfig().setResearchSubset(subset.getSet());
    model.setSubsetOrigin("String_Node_Str");
    update(new ModelEvent(this,ModelPart.RESEARCH_SUBSET,subset.getSet()));
  }
 catch (  IllegalArgumentException e) {
    main.showInfoDialog("String_Node_Str",worker.getError().getMessage());
  }
}
Program: 108739
Project: 108739
Buggy source:
/** 
 * Returns a string representation of a definition
 * @param definition
 * @return
 */
private String getDebugData(DataDefinition definition){
  StringBuilder builder=new StringBuilder();
  builder.append("String_Node_Str").append(definition.hashCode());
  builder.append(definition.isLocked() ? "String_Node_Str" : "String_Node_Str");
  return builder.toString();
}

Fixed version (ground truth):
/** 
 * Returns a string representation of a hierarchy
 * @param definition
 * @return
 */
private String getDebugData(Hierarchy hierarchy){
  if (hierarchy == null || hierarchy.getHierarchy() == null || hierarchy.getHierarchy().length == 0)   return "String_Node_Str";
 else   return "String_Node_Str" + hierarchy.getHierarchy()[0].length;
}
Program: 108742
Project: 108742
Buggy source:
/** 
 * Resets the output
 */
private void actionResetOutput(){
  model.getViewConfig().setMode(Mode.UNSORTED);
  model.getViewConfig().setSubset(false);
  model.setGroups(null);
  update(new ModelEvent(this,ModelPart.VIEW_CONFIG,null));
  model.setResult(null);
  update(new ModelEvent(this,ModelPart.RESULT,null));
  model.setOutput(null,null);
  update(new ModelEvent(this,ModelPart.OUTPUT,null));
  model.setSelectedNode(null);
  update(new ModelEvent(this,ModelPart.SELECTED_NODE,null));
}

Fixed version (ground truth):
/** 
 * Resets the output
 */
private void actionResetOutput(){
  model.getViewConfig().setMode(Mode.UNSORTED);
  model.getViewConfig().setSubset(false);
  model.setGroups(null);
  update(new ModelEvent(this,ModelPart.VIEW_CONFIG,null));
  model.setResult(null);
  model.setOutputConfig(null);
  update(new ModelEvent(this,ModelPart.RESULT,null));
  model.setOutput(null,null);
  update(new ModelEvent(this,ModelPart.OUTPUT,null));
  model.setSelectedNode(null);
  update(new ModelEvent(this,ModelPart.SELECTED_NODE,null));
}
Program: 108743
Project: 108743
Buggy source:
public void setQuery(String query){
  this.query=query;
}

Fixed version (ground truth):
public void setQuery(String query){
  this.query=query;
  setModified();
}
Program: 108744
Project: 108744
Buggy source:
public void setPath(final String path){
  this.path=path;
}

Fixed version (ground truth):
public void setPath(final String path){
  this.path=path;
  setModified();
}
Program: 108745
Project: 108745
Buggy source:
public void createClonedConfig(){
  outputConfig=inputConfig.clone();
}

Fixed version (ground truth):
public void createClonedConfig(){
  outputConfig=inputConfig.clone();
  this.setModified();
}
Program: 108746
Project: 108746
Buggy source:
/** 
 * Starts the wizard
 */
public void actionMenuEditCreateHierarchy(){
  if (model == null) {
    main.showInfoDialog(Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"));
    return;
  }
 else   if (model.getInputConfig().getInput() == null) {
    main.showInfoDialog(Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"));
    return;
  }
  final String attr=model.getSelectedAttribute();
  final int index=model.getInputConfig().getInput().getHandle().getColumnIndexOf(attr);
  final WizardHierarchy i=new WizardHierarchy(this,attr,model.getInputConfig().getInput().getDefinition().getDataType(attr),model.getSuppressionString(),model.getInputConfig().getInput().getHandle().getStatistics().getDistinctValues(index));
  if (i.open(main.getShell())) {
    update(new ModelEvent(this,ModelPart.HIERARCHY,i.getModel().getHierarchy()));
  }
}

Fixed version (ground truth):
/** 
 * Starts the wizard
 */
public void actionMenuEditCreateHierarchy(){
  if (model == null) {
    main.showInfoDialog(Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"));
    return;
  }
 else   if (model.getInputConfig().getInput() == null) {
    main.showInfoDialog(Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"));
    return;
  }
  final String attr=model.getSelectedAttribute();
  final int index=model.getInputConfig().getInput().getHandle().getColumnIndexOf(attr);
  final WizardHierarchy i=new WizardHierarchy(this,attr,model.getInputConfig().getInput().getDefinition().getDataType(attr),model.getSuppressionString(),model.getInputConfig().getInput().getHandle().getStatistics().getDistinctValues(index));
  if (i.open(main.getShell())) {
    Hierarchy hierarchy=i.getModel().getHierarchy();
    if (hierarchy != null) {
      model.getInputConfig().setHierarchy(attr,hierarchy);
      update(new ModelEvent(this,ModelPart.HIERARCHY,hierarchy));
    }
  }
}
Program: 108747
Project: 108747
Buggy source:
@Override public void update(final ModelEvent event){
  if (model != null && model.isDebugEnabled())   this.debug.add(event);
  final Map<ModelPart,Set<IView>> dlisteners=getListeners();
  if (dlisteners.get(event.part) != null) {
    for (    final IView listener : dlisteners.get(event.part)) {
      if (listener != event.source) {
        listener.update(event);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void update(final ModelEvent event){
  if (model != null && model.isDebugEnabled())   this.debug.addEvent(event);
  final Map<ModelPart,Set<IView>> dlisteners=getListeners();
  if (dlisteners.get(event.part) != null) {
    for (    final IView listener : dlisteners.get(event.part)) {
      if (listener != event.source) {
        listener.update(event);
      }
    }
  }
}
Program: 108748
Project: 108748
Buggy source:
/** 
 * File->Import hierarchy
 */
public void actionMenuFileImportHierarchy(){
  if (model == null) {
    main.showInfoDialog(Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"));
    return;
  }
 else   if (model.getInputConfig().getInput() == null) {
    main.showInfoDialog(Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"));
    return;
  }
  final String path=actionShowOpenFileDialog("String_Node_Str");
  if (path != null) {
    DialogSeparator dialog=null;
    try {
      dialog=new DialogSeparator(main.getShell(),this,path,false);
      dialog.create();
      if (dialog.open() == Window.CANCEL) {
        return;
      }
    }
 catch (    Throwable error) {
      if (error instanceof RuntimeException) {
        if (error.getCause() != null) {
          error=error.getCause();
        }
      }
      if ((error instanceof IllegalArgumentException) || (error instanceof IOException)) {
        main.showInfoDialog("String_Node_Str",error.getMessage());
      }
 else {
        main.showErrorDialog(Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"),error);
      }
      return;
    }
    final char separator=dialog.getSeparator();
    final Hierarchy h=actionImportHierarchy(path,separator);
    if (h != null)     update(new ModelEvent(this,ModelPart.HIERARCHY,h));
  }
}

Fixed version (ground truth):
/** 
 * File->Import hierarchy
 */
public void actionMenuFileImportHierarchy(){
  if (model == null) {
    main.showInfoDialog(Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"));
    return;
  }
 else   if (model.getInputConfig().getInput() == null) {
    main.showInfoDialog(Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"));
    return;
  }
  final String path=actionShowOpenFileDialog("String_Node_Str");
  if (path != null) {
    DialogSeparator dialog=null;
    try {
      dialog=new DialogSeparator(main.getShell(),this,path,false);
      dialog.create();
      if (dialog.open() == Window.CANCEL) {
        return;
      }
    }
 catch (    Throwable error) {
      if (error instanceof RuntimeException) {
        if (error.getCause() != null) {
          error=error.getCause();
        }
      }
      if ((error instanceof IllegalArgumentException) || (error instanceof IOException)) {
        main.showInfoDialog("String_Node_Str",error.getMessage());
      }
 else {
        main.showErrorDialog(Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"),error);
      }
      return;
    }
    final char separator=dialog.getSeparator();
    final Hierarchy hierarchy=actionImportHierarchy(path,separator);
    if (hierarchy != null) {
      model.getInputConfig().setHierarchy(model.getSelectedAttribute(),hierarchy);
      update(new ModelEvent(this,ModelPart.HIERARCHY,hierarchy));
    }
  }
}
Program: 108749
Project: 108749
Buggy source:
/** 
 * Internal method for importing hierarchies
 * @param path
 * @param separator
 * @return
 */
private AttributeType actionImportHierarchy(final String path,final char separator){
  try {
    return Hierarchy.create(path,separator);
  }
 catch (  Throwable error) {
    if (error instanceof RuntimeException) {
      if (error.getCause() != null) {
        error=error.getCause();
      }
    }
    if ((error instanceof IllegalArgumentException) || (error instanceof IOException)) {
      main.showInfoDialog("String_Node_Str",error.getMessage());
    }
 else {
      main.showErrorDialog(Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"),error);
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Internal method for importing hierarchies
 * @param path
 * @param separator
 * @return
 */
private Hierarchy actionImportHierarchy(final String path,final char separator){
  try {
    return Hierarchy.create(path,separator);
  }
 catch (  Throwable error) {
    if (error instanceof RuntimeException) {
      if (error.getCause() != null) {
        error=error.getCause();
      }
    }
    if ((error instanceof IllegalArgumentException) || (error instanceof IOException)) {
      main.showInfoDialog("String_Node_Str",error.getMessage());
    }
 else {
      main.showErrorDialog(Resources.getMessage("String_Node_Str"),Resources.getMessage("String_Node_Str"),error);
    }
  }
  return null;
}