nus-yam/ex-repair huggingface dataset:
Program: 133695
Project: 133695
Buggy source:
/** 
 * This operation sets the ResourceComponent that should be used by the ICEResourcePage. It also registers the ICEResourcePage with the ResourceComponent so that it can be notified of state changes through the IUpdateableListener interface.
 * @param component <p> The ResourceComponent </p>
 */
public void setResourceComponent(ResourceComponent component){
  if (component != null) {
    resourceComponent=component;
    for (    ICEResource resource : resourceComponent.getResources()) {
      if (resource instanceof VizResource) {
        try {
          IPlot plot=vizFactory.get().createPlot(resource.getPath());
          plotMap.put(plot.getDataSource().toString(),plot);
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
    }
  }
  resourceComponent.register(this);
  return;
}

Fixed version (ground truth):
/** 
 * This operation sets the ResourceComponent that should be used by the ICEResourcePage. It also registers the ICEResourcePage with the ResourceComponent so that it can be notified of state changes through the IUpdateableListener interface.
 * @param component The ResourceComponent
 */
public void setResourceComponent(ResourceComponent component){
  if (component != null) {
    resourceComponent=component;
    for (    ICEResource resource : resourceComponent.getResources()) {
      if (resource instanceof VizResource) {
        try {
          IPlot plot=vizFactory.get().createPlot(resource.getPath());
          plotMap.put(plot.getDataSource().toString(),plot);
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
    }
  }
  resourceComponent.register(this);
  return;
}
Program: 133697
Project: 133697
Buggy source:
/** 
 * Removes the Mesh View page if possible.
 */
public void removeMeshPage(){
  removePageWithID(MESH_PAGE_ID);
}

Fixed version (ground truth):
/** 
 * Removes the Mesh View page if possible.
 */
public void removeMeshPage(){
  if (meshPlotParent != null && !meshPlotParent.isDisposed()) {
    meshPlotParent.dispose();
    meshPlotParent=null;
  }
  plot=null;
  vizService=null;
  removePageWithID(MESH_PAGE_ID);
}
Program: 133698
Project: 133698
Buggy source:
@Override protected void setInput(IEditorInput input){
  super.setInput(input);
  if (input instanceof ICEFormInput) {
    Form form=((ICEFormInput)input).getForm();
    int id=MOOSEModel.resourceComponentId;
    final ResourceComponent resources=(ResourceComponent)form.getComponent(id);
    if (resources != null) {
      if (!resources.isEmpty()) {
        meshURI=resources.get(0).getPath();
      }
      ListEventListener<ICEResource> listener=new ListEventListener<ICEResource>(){
        @Override public void listChanged(        ListEvent<ICEResource> listChanges){
          while (listChanges.next()) {
            int type=listChanges.getType();
            int index=listChanges.getIndex();
            if (type == ListEvent.INSERT | type == ListEvent.UPDATE) {
              meshURI=resources.get(index).getPath();
            }
 else {
              meshURI=null;
            }
            if (plot != null) {
              plot.setDataSource(meshURI);
            }
            return;
          }
        }
      }
;
      resources.addListEventListener(listener);
    }
  }
  return;
}

Fixed version (ground truth):
/** 
 * In addition to the default behavior, this method registers with the MOOSE form's mesh   {@link ResourceComponent} to listen for add/insert/removeevents. The intent is to pull the current  {@link #meshURI} from the modeland render it in the  {@link #plot} on the mesh page.
 * @param input The editor's input. This should be of the type {@link ICEFormInput}.
 */
@Override protected void setInput(IEditorInput input){
  super.setInput(input);
  if (input instanceof ICEFormInput) {
    Form form=((ICEFormInput)input).getForm();
    int id=MOOSEModel.resourceComponentId;
    final ResourceComponent resources=(ResourceComponent)form.getComponent(id);
    if (resources != null) {
      if (!resources.isEmpty()) {
        meshURI=resources.get(0).getPath();
      }
      ListEventListener<ICEResource> listener=new ListEventListener<ICEResource>(){
        @Override public void listChanged(        ListEvent<ICEResource> listChanges){
          while (listChanges.next()) {
            int type=listChanges.getType();
            int index=listChanges.getIndex();
            if (type == ListEvent.INSERT | type == ListEvent.UPDATE) {
              meshURI=resources.get(index).getPath();
            }
 else {
              meshURI=null;
            }
            if (plot != null) {
              plot.setDataSource(meshURI);
            }
            return;
          }
        }
      }
;
      resources.addListEventListener(listener);
    }
  }
  return;
}
Program: 133699
Project: 133699
Buggy source:
/** 
 * Removes the Plant View page if possible.
 */
public void removePlantPage(){
  removePageWithID(PLANT_PAGE_ID);
}

Fixed version (ground truth):
/** 
 * Removes the Plant View page if possible.
 */
public void removePlantPage(){
  plantView=null;
  removePageWithID(PLANT_PAGE_ID);
}
Program: 133700
Project: 133700
Buggy source:
/** 
 * Load the given File as an XMLResource.
 * @param file
 * @return
 */
public boolean load(File file){
  EObject documentRoot=null;
  if (xmlProcessor != null) {
    try {
      xmlResource=(XMLResource)xmlProcessor.load(new FileInputStream(file),null);
    }
 catch (    IOException e) {
      e.printStackTrace();
      return false;
    }
  }
  if (xmlResource != null) {
    documentRoot=(EObject)xmlResource.getContents().get(0);
  }
 else {
    return false;
  }
  if (documentRoot != null) {
    iceEMFTree=new EMFTreeComposite(documentRoot);
    mapToEMFTreeComposite(documentRoot.eContents().get(0),iceEMFTree);
  }
 else {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Load the given File as an XMLResource.
 * @param file
 * @return
 */
public boolean load(File file){
  EObject documentRoot=null;
  if (xmlProcessor != null) {
    try {
      xmlResource=(XMLResource)xmlProcessor.load(new FileInputStream(file),null);
    }
 catch (    IOException e) {
      e.printStackTrace();
      return false;
    }
  }
  if (xmlResource != null) {
    documentRoot=(EObject)xmlResource.getContents().get(0);
  }
 else {
    return false;
  }
  if (documentRoot != null) {
    iceEMFTree=new EMFTreeComposite(documentRoot);
    HashMap<EObject,EMFTreeComposite> map=new HashMap<EObject,EMFTreeComposite>();
    map.put(documentRoot,iceEMFTree);
    TreeIterator<EObject> tree=documentRoot.eAllContents();
    while (tree.hasNext()) {
      EObject obj=tree.next();
      map.put(obj,new EMFTreeComposite(obj));
    }
    for (    EObject o : map.keySet()) {
      EObject parent=o.eContainer();
      if (parent != null) {
        map.get(parent).setNextChild(map.get(o));
      }
    }
  }
 else {
    return false;
  }
  return true;
}
Program: 133701
Project: 133701
Buggy source:
/** 
 * This method overrides TreeComposite.checkExemplars to use the overridden getChildExemplars method to see if a given TreeComposite can be added as a new child of this tree.
 * @param cNode
 * @return
 */
@Override protected boolean checkExemplars(TreeComposite cNode){
  for (  TreeComposite exemplar : getChildExemplars()) {
    if (cNode.getName().equals(exemplar.getName())) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * This method overrides TreeComposite.checkExemplars to use the overridden getChildExemplars method to see if a given TreeComposite can be added as a new child of this tree.
 * @param cNode
 * @return
 */
@Override protected boolean checkExemplars(TreeComposite cNode){
  for (  TreeComposite exemplar : getChildExemplars()) {
    if (cNode.getName().equals("String_Node_Str")) {
      System.out.print("String_Node_Str" + exemplar.getName());
    }
    if (cNode.getName().equals(exemplar.getName())) {
      return true;
    }
  }
  return false;
}
Program: 133702
Project: 133702
Buggy source:
/** 
 * The constructor, takes a Ecore model tree EObject node instance
 * @param treeNode
 */
public EMFTreeComposite(EObject treeNode){
  super();
  ecoreNode=treeNode;
  ecoreNodeMetaData=ecoreNode.eClass();
  setName(ecoreNodeMetaData.getName());
  setDescription(toString());
  loadedFromEObject=true;
  createActiveDataNode();
  return;
}

Fixed version (ground truth):
/** 
 * The constructor, takes a Ecore model tree EObject node instance
 * @param treeNode
 */
public EMFTreeComposite(EObject treeNode){
  super();
  ecoreNode=treeNode;
  ecoreNodeMetaData=ecoreNode.eClass();
  setName(ecoreNodeMetaData.getName());
  setDescription(toString());
  createActiveDataNode();
  return;
}
Program: 133703
Project: 133703
Buggy source:
/** 
 * This method overrides TreeComposite.getChildExemplars to dynamically generate a list of exemplar children based on the EClass metadata's list of EReferences.
 * @return
 */
@Override public ArrayList<TreeComposite> getChildExemplars(){
  ArrayList<TreeComposite> exemplars=new ArrayList<TreeComposite>();
  boolean childExists=false;
  for (  EReference exemplar : ecoreNodeMetaData.getEReferences()) {
    if ("String_Node_Str".equals(exemplar.getEReferenceType().getName())) {
      continue;
    }
    int upperBound=exemplar.getUpperBound();
    if (upperBound == -1) {
      exemplars.add(new EMFTreeComposite(exemplar.getEReferenceType()));
      continue;
    }
 else     if (upperBound <= 1) {
      for (      TreeComposite currentChild : children) {
        if (currentChild.getName().equals(exemplar.getEReferenceType().getName())) {
          childExists=true;
          break;
        }
      }
      if (!childExists) {
        exemplars.add(new EMFTreeComposite(exemplar.getEReferenceType()));
      }
    }
  }
  return exemplars;
}

Fixed version (ground truth):
/** 
 * This method overrides TreeComposite.getChildExemplars to dynamically generate a list of exemplar children based on the EClass metadata's list of EReferences.
 * @return
 */
@Override public ArrayList<TreeComposite> getChildExemplars(){
  ArrayList<TreeComposite> exemplars=new ArrayList<TreeComposite>();
  boolean childExists=false;
  for (  EReference exemplar : ecoreNodeMetaData.getEAllReferences()) {
    if ("String_Node_Str".equals(exemplar.getEReferenceType().getName())) {
      continue;
    }
    int upperBound=exemplar.getUpperBound();
    if (upperBound == -1) {
      exemplars.add(new EMFTreeComposite(exemplar.getEReferenceType()));
      continue;
    }
 else     if (upperBound <= 1) {
      for (      TreeComposite currentChild : children) {
        if (currentChild.getName().equals(exemplar.getEReferenceType().getName())) {
          childExists=true;
          break;
        }
      }
      if (!childExists) {
        exemplars.add(new EMFTreeComposite(exemplar.getEReferenceType()));
      }
    }
  }
  return exemplars;
}
Program: 133707
Project: 133707
Buggy source:
/** 
 * Test method for  {@link org.eclipse.ice.io.csv.CSVReader#read(org.eclipse.core.resources.IFile)}.
 * @throws CoreException
 * @throws IOException
 */
@Test public void testRead() throws CoreException, IOException {
  Form form=reader.read(testFile);
  assertTrue(form.getComponents().get(0) instanceof ListComponent);
  ListComponent<String[]> lines=(ListComponent<String[]>)form.getComponents().get(0);
  assertTrue(lines.get(0) instanceof String[]);
  assertEquals(lines.size(),174);
  String[] line=lines.get(0);
  assertEquals(3,line.length);
  assertEquals("String_Node_Str",line[0]);
  assertEquals("String_Node_Str",line[1]);
  assertEquals("String_Node_Str",line[2]);
  line=lines.get(173);
  assertEquals(4,line.length);
  assertEquals("String_Node_Str",line[0]);
  assertEquals("String_Node_Str",line[1]);
  assertEquals("String_Node_Str",line[2]);
  assertEquals("String_Node_Str",line[3]);
  return;
}

Fixed version (ground truth):
/** 
 * Test method for  {@link org.eclipse.ice.io.csv.CSVReader#read(org.eclipse.core.resources.IFile)}.
 * @throws CoreException
 * @throws IOException
 */
@Test public void testRead() throws CoreException, IOException {
  Form form=reader.read(testFile);
  assertTrue(form.getComponents().get(0) instanceof ListComponent);
  ListComponent<String[]> lines=(ListComponent<String[]>)form.getComponents().get(0);
  assertTrue(lines.get(0) instanceof String[]);
  assertEquals(lines.size(),175);
  String[] line=lines.get(0);
  assertEquals(3,line.length);
  assertEquals("String_Node_Str",line[0]);
  assertEquals("String_Node_Str",line[1]);
  assertEquals("String_Node_Str",line[2]);
  line=lines.get(lines.size() - 1);
  assertEquals(4,line.length);
  assertEquals("String_Node_Str",line[0]);
  assertEquals("String_Node_Str",line[1]);
  assertEquals("String_Node_Str",line[2]);
  assertEquals("String_Node_Str",line[3]);
  return;
}
Program: 133708
Project: 133708
Buggy source:
/** 
 * This operation loads the set of Tiles from the reference file, ignoring the first line that stores the reference values.
 * @param lines The ListComponent with the lines from the file
 * @return the list of Tiles from the file
 */
private Tile[] loadTiles(ListComponent<String[]> lines){
  Tile[] tiles=new Tile[lines.size() - 1];
  for (int i=1; i < lines.size(); i++) {
    String[] line=lines.get(i);
    Tile tile=new Tile();
    tile.scatteringLength=Double.valueOf(line[0]);
    tile.trueAbsLength=Double.valueOf(line[1]);
    tile.incAbsLength=Double.valueOf(line[2]);
    tile.thickness=Double.valueOf(line[3]);
    tiles[i - 1]=tile;
  }
  return tiles;
}

Fixed version (ground truth):
/** 
 * This operation loads the set of Tiles from the reference file, ignoring the first and second lines that store the reference values.
 * @param lines The ListComponent with the lines from the file
 * @return the list of Tiles from the file
 */
private Tile[] loadTiles(ListComponent<String[]> lines){
  Tile[] tiles=new Tile[lines.size() - 2];
  for (int i=2; i < lines.size(); i++) {
    String[] line=lines.get(i);
    Tile tile=new Tile();
    tile.scatteringLength=Double.valueOf(line[0]);
    tile.trueAbsLength=Double.valueOf(line[1]);
    tile.incAbsLength=Double.valueOf(line[2]);
    tile.thickness=Double.valueOf(line[3]);
    tiles[i - 2]=tile;
  }
  return tiles;
}
Program: 133709
Project: 133709
Buggy source:
/** 
 * This class tests   {@link ReflectivityCalculator#getSpectRefSqrdMod}.
 */
@Test public void testGetSpecRefSqrdMod(){
  Form form=reader.read(project.getFile("String_Node_Str"));
  ListComponent<String[]> lines=(ListComponent<String[]>)form.getComponent(1);
  String[] line=lines.get(0);
  double waveVectorQ, wavelength, expectedSpecRefSqrd;
  waveVectorQ=Double.valueOf(line[0]);
  wavelength=Double.valueOf(line[1]);
  expectedSpecRefSqrd=Double.valueOf(line[2]);
  Tile[] tiles=loadTiles(lines);
  ReflectivityCalculator calculator=new ReflectivityCalculator();
  double specRefSqrd=calculator.getModSqrdSpecRef(waveVectorQ,wavelength,tiles);
  System.out.println("String_Node_Str" + (specRefSqrd - expectedSpecRefSqrd) / expectedSpecRefSqrd);
  assertEquals(expectedSpecRefSqrd,specRefSqrd,3.3 * 1.0e-4);
  return;
}

Fixed version (ground truth):
/** 
 * This class tests   {@link ReflectivityCalculator#getSpectRefSqrdMod}.
 */
@Test public void testGetSpecRefSqrdMod(){
  Form form=reader.read(project.getFile("String_Node_Str"));
  ListComponent<String[]> lines=(ListComponent<String[]>)form.getComponent(1);
  String[] line=lines.get(0);
  double waveVectorQ, wavelength, expectedSpecRefSqrd;
  waveVectorQ=Double.valueOf(line[0]);
  wavelength=Double.valueOf(line[1]);
  expectedSpecRefSqrd=Double.valueOf(line[2]);
  Tile[] tiles=loadTiles(lines);
  assertEquals(173,tiles.length);
  ReflectivityCalculator calculator=new ReflectivityCalculator();
  double specRefSqrd=calculator.getModSqrdSpecRef(waveVectorQ,wavelength,tiles);
  System.out.println(specRefSqrd + "String_Node_Str" + expectedSpecRefSqrd);
  System.out.println("String_Node_Str" + (specRefSqrd - expectedSpecRefSqrd) / expectedSpecRefSqrd);
  assertEquals(expectedSpecRefSqrd,specRefSqrd,4.0e-4);
  line=lines.get(1);
  waveVectorQ=Double.valueOf(line[0]);
  wavelength=Double.valueOf(line[1]);
  expectedSpecRefSqrd=Double.valueOf(line[2]);
  System.out.println(waveVectorQ + "String_Node_Str" + wavelength+ "String_Node_Str"+ expectedSpecRefSqrd);
  specRefSqrd=calculator.getModSqrdSpecRef(waveVectorQ,wavelength,tiles);
  System.out.println(specRefSqrd + "String_Node_Str" + expectedSpecRefSqrd);
  System.out.println("String_Node_Str" + (specRefSqrd - expectedSpecRefSqrd) / expectedSpecRefSqrd);
  assertEquals(expectedSpecRefSqrd,specRefSqrd,9.0e-4 * Math.abs(expectedSpecRefSqrd));
  return;
}
Program: 133711
Project: 133711
Buggy source:
/** 
 * Creates a new   {@code TableViewer} to show a {@link TableComponent}.
 * @param parent The containing  {@code Composite}.
 * @return The created JFace {@code TableViewer}.
 */
private TableViewer createTableViewer(Composite parent){
  TableViewer viewer=new TableViewer(this,SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION| SWT.H_SCROLL| SWT.V_SCROLL);
  final Table table=viewer.getTable();
  table.setHeaderVisible(true);
  table.setLinesVisible(true);
  viewer.setContentProvider(new TableComponentContentProvider());
  ColumnViewerToolTipSupport.enableFor(viewer,ToolTip.NO_RECREATE);
  ISelectionChangedListener listener=new ISelectionChangedListener(){
    @Override public void selectionChanged(    SelectionChangedEvent event){
      int[] selected=table.getSelectionIndices();
      List<Integer> rowIds=tableComponent.getRowIds();
      ArrayList<Integer> rows=new ArrayList<Integer>(selected.length);
      selectedIndices.clear();
      for (      int i : selected) {
        selectedIndices.add(i);
        rows.add(rowIds.get(i));
      }
      tableComponent.setSelectedRows(rows);
      removeRowAction.setEnabled(!event.getSelection().isEmpty());
      return;
    }
  }
;
  viewer.addSelectionChangedListener(listener);
  return viewer;
}

Fixed version (ground truth):
/** 
 * Creates a new   {@code TableViewer} to show a {@link TableComponent}.
 * @param parent The containing  {@code Composite}.
 * @return The created JFace {@code TableViewer}.
 */
private TableViewer createTableViewer(Composite parent){
  TableViewer viewer=new TableViewer(this,SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION| SWT.H_SCROLL| SWT.V_SCROLL);
  final Table table=viewer.getTable();
  table.setHeaderVisible(true);
  table.setLinesVisible(true);
  viewer.setContentProvider(new TableComponentContentProvider());
  ColumnViewerToolTipSupport.enableFor(viewer,ToolTip.NO_RECREATE);
  ISelectionChangedListener listener=new ISelectionChangedListener(){
    @Override public void selectionChanged(    SelectionChangedEvent event){
      int[] selected=table.getSelectionIndices();
      List<Integer> rowIds=tableComponent.getRowIds();
      ArrayList<Integer> rows=new ArrayList<Integer>(selected.length);
      selectedIndices.clear();
      for (      int i : selected) {
        selectedIndices.add(i);
        rows.add(rowIds.get(i));
      }
      tableComponent.setSelectedRows(rows);
      removeRowAction.setEnabled(!event.getSelection().isEmpty());
      return;
    }
  }
;
  viewer.addSelectionChangedListener(listener);
  viewer.setComparer(new IElementComparer(){
    @Override public int hashCode(    Object element){
      return element.hashCode();
    }
    @Override public boolean equals(    Object a,    Object b){
      return a == b;
    }
  }
);
  return viewer;
}
Program: 133712
Project: 133712
Buggy source:
/** 
 * Creates the JFace   {@code Action}s used to add or remove rows to or from the   {@link #tableComponent}.
 */
private void createActions(){
  addRowAction=new Action("String_Node_Str",Action.AS_PUSH_BUTTON){
    @Override public void run(){
      tableComponent.addRow();
    }
  }
;
  addRowAction.setToolTipText("String_Node_Str");
  removeRowAction=new Action("String_Node_Str",Action.AS_PUSH_BUTTON){
    @Override public void run(){
      setEnabled(false);
      for (int i=selectedIndices.size() - 1; i >= 0; i--) {
        tableComponent.deleteRow(selectedIndices.get(i));
      }
      selectedIndices.clear();
      tableComponent.setSelectedRows(new ArrayList<Integer>());
    }
  }
;
  removeRowAction.setToolTipText("String_Node_Str");
  removeRowAction.setEnabled(false);
  return;
}

Fixed version (ground truth):
/** 
 * Creates the JFace   {@code Action}s used to add or remove rows to or from the   {@link #tableComponent}.
 */
private void createActions(){
  addRowAction=new Action("String_Node_Str",Action.AS_PUSH_BUTTON){
    @Override public void run(){
      tableComponent.addRow();
      System.out.println("String_Node_Str");
      for (int i=0; i < tableComponent.getRowIds().size(); i++) {
        System.out.println(tableComponent.getRow(i).toString());
      }
    }
  }
;
  addRowAction.setToolTipText("String_Node_Str");
  removeRowAction=new Action("String_Node_Str",Action.AS_PUSH_BUTTON){
    @Override public void run(){
      setEnabled(false);
      for (int i=selectedIndices.size() - 1; i >= 0; i--) {
        tableComponent.deleteRow(selectedIndices.get(i));
      }
      selectedIndices.clear();
      tableComponent.setSelectedRows(new ArrayList<Integer>());
    }
  }
;
  removeRowAction.setToolTipText("String_Node_Str");
  removeRowAction.setEnabled(false);
  return;
}
Program: 133713
Project: 133713
Buggy source:
/** 
 * This operation returns the value of the material property with the given name.
 * @param key The key/name of the property whose value should be returned
 * @return the value
 */
public double getProperty(String key){
  return properties.get(key);
}

Fixed version (ground truth):
/** 
 * This operation returns the value of the material property with the given name.
 * @param key The key/name of the property whose value should be returned
 * @return the value or 0.0 if this value is not in the map, butnever null.
 */
public double getProperty(String key){
  double value=0.0;
  if (properties.containsKey(key)) {
    value=properties.get(key);
  }
  return value;
}
Program: 133714
Project: 133714
Buggy source:
/** 
 * This operation checks the Material class to make sure that simple attributes such as names and properties can be changed.
 */
@Test public void checkSimpleAttributes(){
  Material testMaterial=TestMaterialFactory.createCO2();
  testMaterial.setName("String_Node_Str");
  assertEquals("String_Node_Str",testMaterial.getName());
  testMaterial.setSize(1);
  assertEquals(1,testMaterial.getSize());
  testMaterial.setProperty("String_Node_Str",44.01);
  double mass=testMaterial.getProperty("String_Node_Str");
  assertEquals(44.01,mass,1.0e-16);
  testMaterial.setProperty("String_Node_Str",5.73);
  double pressure=testMaterial.getProperty("String_Node_Str");
  assertEquals(5.73,pressure,1.0e-16);
  Map<String,Double> properties=testMaterial.getProperties();
  assertTrue(properties.containsKey("String_Node_Str"));
  assertTrue(properties.containsKey("String_Node_Str"));
  return;
}

Fixed version (ground truth):
/** 
 * This operation checks the Material class to make sure that simple attributes such as names and properties can be changed.
 */
@Test public void checkSimpleAttributes(){
  Material testMaterial=TestMaterialFactory.createCO2();
  testMaterial.setName("String_Node_Str");
  assertEquals("String_Node_Str",testMaterial.getName());
  testMaterial.setSize(1);
  assertEquals(1,testMaterial.getSize());
  testMaterial.setProperty("String_Node_Str",44.01);
  double mass=testMaterial.getProperty("String_Node_Str");
  assertEquals(44.01,mass,1.0e-16);
  testMaterial.setProperty("String_Node_Str",5.73);
  double pressure=testMaterial.getProperty("String_Node_Str");
  assertEquals(5.73,pressure,1.0e-16);
  Map<String,Double> properties=testMaterial.getProperties();
  assertTrue(properties.containsKey("String_Node_Str"));
  assertTrue(properties.containsKey("String_Node_Str"));
  assertEquals(0.0,testMaterial.getProperty("String_Node_Str"),1.0e-8);
  return;
}
Program: 133715
Project: 133715
Buggy source:
/** 
 * This private method recursively walks the EObject tree and creates  a EMFTreeComposite representing the XML data. 
 * @param rootNode
 * @param parent
 */
private void mapToEMFTreeComposite(EObject rootNode,EMFTreeComposite parent){
  EList<EObject> subChildren=rootNode.eContents();
  if (subChildren.isEmpty()) {
    parent.setNextChild(new EMFTreeComposite(rootNode));
  }
 else {
    EMFTreeComposite thisTreeNode=new EMFTreeComposite(rootNode);
    for (    EObject obj : subChildren) {
      mapToEMFTreeComposite(obj,thisTreeNode);
    }
    parent.setNextChild(thisTreeNode);
  }
  return;
}

Fixed version (ground truth):
/** 
 * This private method recursively walks the EObject tree and creates  a EMFTreeComposite representing the XML data. 
 * @param rootNode
 * @param parent
 */
private void mapToEMFTreeComposite(EObject rootNode,EMFTreeComposite parent){
  EList<EObject> subChildren=rootNode.eContents();
  if (subChildren.isEmpty()) {
    parent.setNextChild(new EMFTreeComposite(rootNode));
  }
 else {
    EMFTreeComposite thisTreeNode=new EMFTreeComposite(rootNode);
    for (    EObject obj : subChildren) {
      mapToEMFTreeComposite(obj,thisTreeNode);
    }
    if (parent.getName().equals("String_Node_Str")) {
      System.out.println("String_Node_Str" + thisTreeNode.getName() + "String_Node_Str"+ parent.getName());
    }
    parent.setNextChild(thisTreeNode);
  }
  return;
}
Program: 133716
Project: 133716
Buggy source:
/** 
 * The constructor
 */
public EMFEntry(EAttribute attribute,EObject ecoreNode,boolean initializeDefaultValues){
  super();
  entryMetaData=attribute;
  containingEcoreNode=ecoreNode;
  setName(entryMetaData.getName());
  typeName=attribute.getEType().getInstanceClassName();
  if (containingEcoreNode != null) {
    if (typeName != null && initializeDefaultValues && entryMetaData.getUpperBound() != -1) {
      if (typeName.equals("String_Node_Str")) {
        containingEcoreNode.eSet(entryMetaData,"String_Node_Str");
      }
 else       if (typeName.equals("String_Node_Str")) {
        BigInteger b=new BigInteger("String_Node_Str");
        containingEcoreNode.eSet(entryMetaData,b);
      }
 else       if (typeName.equals("String_Node_Str")) {
        BigDecimal d=new BigDecimal(0.0);
        containingEcoreNode.eSet(entryMetaData,d);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * The constructor
 */
public EMFEntry(EAttribute attribute,EObject ecoreNode){
  super();
  entryMetaData=attribute;
  containingEcoreNode=ecoreNode;
  setName(entryMetaData.getName());
  typeName=attribute.getEType().getInstanceClassName();
  Object initialValue=containingEcoreNode.eGet(entryMetaData);
  if (initialValue != null && typeName != null) {
    try {
      if (typeName.equals("String_Node_Str")) {
        BigInteger b=(BigInteger)initialValue;
        setValue(b.toString());
      }
 else       if (typeName.equals("String_Node_Str")) {
        BigDecimal d=(BigDecimal)initialValue;
        setValue(d.toString());
      }
 else       if (typeName.equals("String_Node_Str")) {
        setValue((String)initialValue);
      }
    }
 catch (    ClassCastException e) {
      return;
    }
  }
}
Program: 133717
Project: 133717
Buggy source:
/** 
 * This operation provides a deep copy of the EMFEntry.
 */
public Object clone(){
  EMFEntry entry=new EMFEntry(entryMetaData,EcoreUtil.create(entryMetaData.getEContainingClass()),false);
  entry.copy(this);
  return entry;
}

Fixed version (ground truth):
/** 
 * This operation provides a deep copy of the EMFEntry.
 */
public Object clone(){
  EMFEntry entry=new EMFEntry(entryMetaData,EcoreUtil.create(entryMetaData.getEContainingClass()));
  entry.copy(this);
  return entry;
}
Program: 133719
Project: 133719
Buggy source:
/** 
 * Creates a new SWT   {@link Composite} with this <code>ViewAppState</code>embedded within it. This method gets an  {@link EmbeddedView} from the{@link MasterApplication}, connects with that view, and embeds that view in the <code>Composite</code>.
 * @param parent The parent <code>Composite</code>.
 * @return The <code>Composite</code> that has an embedded jME view managedby this <code>ViewAppState</code>. This <code>Composite</code>'s layout should be set by the caller. <b>This <code>Composite</code> should be disposed when it is no longer required</b>.
 */
public Composite createComposite(Composite parent){
  Composite composite=null;
  if (parent != null && embeddedView == null) {
    embeddedView=app.getEmbeddedView();
    composite=new Composite(parent,SWT.EMBEDDED){
      @Override public void dispose(){
        disposeView(embeddedView);
        super.dispose();
      }
    }
;
    Frame embeddedFrame=SWT_AWT.new_Frame(composite);
    embeddedFrame.setLayout(new BorderLayout());
    embeddedView.addToEmbeddedFrame(embeddedFrame);
    embeddedFrame.pack();
    embeddedFrame.setVisible(true);
    int limit=5000;
    int count=0;
    while (!isInitialized() && count < limit) {
      try {
        Thread.sleep(50);
        count+=50;
      }
 catch (      InterruptedException e) {
        e.printStackTrace();
      }
    }
    embeddedView.registerViewClient(this);
  }
  return composite;
}

Fixed version (ground truth):
/** 
 * Creates a new SWT   {@link Composite} with this <code>ViewAppState</code>embedded within it. This method gets an  {@link EmbeddedView} from the{@link MasterApplication}, connects with that view, and embeds that view in the <code>Composite</code>.
 * @param parent The parent <code>Composite</code>.
 * @return The <code>Composite</code> that has an embedded jME view managedby this <code>ViewAppState</code>. This <code>Composite</code>'s layout should be set by the caller. <b>This <code>Composite</code> should be disposed when it is no longer required</b>.
 */
public Composite createComposite(Composite parent){
  Composite composite=null;
  if (parent != null && embeddedView == null) {
    embeddedView=app.getEmbeddedView();
    composite=new Composite(parent,SWT.EMBEDDED){
      @Override public void dispose(){
        disposeView(embeddedView);
        super.dispose();
      }
    }
;
    Frame embeddedFrame=SWT_AWT.new_Frame(composite);
    embeddedFrame.setLayout(new BorderLayout());
    embeddedView.addToEmbeddedFrame(embeddedFrame);
    embeddedFrame.pack();
    embeddedFrame.setVisible(true);
    int limit=5000;
    int count=0;
    while (!isInitialized() && count < limit) {
      try {
        Thread.sleep(50);
        count+=50;
      }
 catch (      InterruptedException e) {
        e.printStackTrace();
      }
    }
    embeddedView.registerViewClient(this);
    enableControls();
  }
  return composite;
}
Program: 133720
Project: 133720
Buggy source:
/** 
 * Creates a default   {@link FlightCamera} for the specified<code>EmbeddedView</code>.
 */
@Override public Object createViewCamera(EmbeddedView view){
  Object cam=null;
  if (view != null && view == embeddedView) {
    FlightCamera flyCam=new FlightCamera(view.getCamera());
    flyCam.setInputManager(app.getInputManager());
    flyCam.setEnabled(false);
    cam=flyCam;
  }
  return cam;
}

Fixed version (ground truth):
/** 
 * Creates a default   {@link FlightCamera} for the specified<code>EmbeddedView</code>.
 */
@Override public Object createViewCamera(EmbeddedView view){
  Object cam=null;
  if (view != null && view == embeddedView) {
    FlightCamera flyCam=new FlightCamera(view.getCamera());
    flyCam.setInputManager(app.getInputManager());
    flyCam.setEnabled(true);
    cam=flyCam;
  }
  return cam;
}
Program: 133721
Project: 133721
Buggy source:
/** 
 * Enables or disables the default   {@link FlightCamera} associated withthe <code>EmbeddedView</code>.
 */
@Override public void updateViewCamera(EmbeddedView view,boolean enabled){
  if (view != null && view == embeddedView) {
    FlightCamera flyCam=(FlightCamera)view.getViewCamera();
    flyCam.setEnabled(enabled);
  }
  return;
}

Fixed version (ground truth):
/** 
 * Enables or disables the default   {@link FlightCamera} associated with the<code>EmbeddedView</code>.
 */
@Override public void updateViewCamera(EmbeddedView view,boolean enabled){
  if (view != null && view == embeddedView) {
    FlightCamera flyCam=(FlightCamera)view.getViewCamera();
    flyCam.setEnabled(enabled);
  }
  return;
}
Program: 133722
Project: 133722
Buggy source:
/** 
 * Overrides the default view camera to set its initial location based on the default position and orientation.
 */
@Override public Object createViewCamera(EmbeddedView view){
  Object cam=super.createViewCamera(view);
  if (cam != null) {
    FlightCamera flyCam=(FlightCamera)cam;
    flyCam.setPosition(defaultPosition);
    flyCam.setOrientation(defaultDirection,defaultUp);
  }
  return cam;
}

Fixed version (ground truth):
/** 
 * Overrides the default view camera to set its initial location based on the default position and orientation.
 */
@Override public Object createViewCamera(EmbeddedView view){
  Object cam=super.createViewCamera(view);
  if (cam != null) {
    FlightCamera flyCam=(FlightCamera)cam;
    flyCam.setPosition(defaultPosition);
    flyCam.setOrientation(defaultDirection,defaultUp);
    flyCam.setEnabled(true);
  }
  return cam;
}
Program: 133723
Project: 133723
Buggy source:
private void setWorkingDirectoryName(){
  Date currentDate=new Date();
  SimpleDateFormat shortDate=new SimpleDateFormat("String_Node_Str");
  String separator=System.getProperty("String_Node_Str");
  String homeDir=System.getProperty("String_Node_Str");
  String launchDir="String_Node_Str";
  workingDirectoryBaseName="String_Node_Str" + shortDate.format(currentDate);
  if (isLocal.get()) {
    launchDir=homeDir + separator + "String_Node_Str"+ separator+ "String_Node_Str"+ separator+ "String_Node_Str"+ separator+ workingDirectoryBaseName;
  }
 else   if (execDictionary.get("String_Node_Str").equals("String_Node_Str")) {
    String projId=execDictionary.get("String_Node_Str");
    launchDir="String_Node_Str" + separator + projId+ separator+ workingDirectoryBaseName;
  }
 else {
    launchDir=workingDirectoryBaseName;
  }
  execDictionary.put("String_Node_Str",launchDir);
  System.out.println("String_Node_Str" + execDictionary.get("String_Node_Str"));
  return;
}

Fixed version (ground truth):
private void setWorkingDirectoryName(){
  Date currentDate=new Date();
  SimpleDateFormat shortDate=new SimpleDateFormat("String_Node_Str");
  String separator=System.getProperty("String_Node_Str");
  String homeDir=System.getProperty("String_Node_Str");
  String launchDir="String_Node_Str";
  workingDirectoryBaseName="String_Node_Str" + shortDate.format(currentDate);
  if (isLocal.get()) {
    launchDir=projectSpaceDir + separator + "String_Node_Str"+ separator+ workingDirectoryBaseName;
  }
 else   if (execDictionary.get("String_Node_Str").equals("String_Node_Str")) {
    String projId=execDictionary.get("String_Node_Str");
    launchDir="String_Node_Str" + separator + projId+ separator+ workingDirectoryBaseName;
  }
 else {
    launchDir=workingDirectoryBaseName;
  }
  execDictionary.put("String_Node_Str",launchDir);
  System.out.println("String_Node_Str" + execDictionary.get("String_Node_Str"));
  return;
}
Program: 133724
Project: 133724
Buggy source:
/** 
 * <!-- begin-UML-doc --> <p> This operation launches the job on the local machine. </p> <!-- end-UML-doc -->
 * @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
 */
protected void launchLocally(){
  FormStatus launchStatus;
  String separator=System.getProperty("String_Node_Str");
  String userHome=System.getProperty("String_Node_Str");
  String localProjectDir=userHome + separator + "String_Node_Str"+ separator+ "String_Node_Str";
  File workingDirectory=new File(execDictionary.get("String_Node_Str"));
  for (int i=0; i < splitCMD.size(); i++) {
    if (cancelled.get()) {
      break;
    }
    launchStatus=launchStageLocally(splitCMD.get(i),stdOut,stdErr);
    monitorJob();
    if (launchStatus.equals(FormStatus.InfoError)) {
      status=FormStatus.InfoError;
      return;
    }
  }
  status=FormStatus.Processed;
  return;
}

Fixed version (ground truth):
/** 
 * <!-- begin-UML-doc --> <p> This operation launches the job on the local machine. </p> <!-- end-UML-doc -->
 * @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
 */
protected void launchLocally(){
  FormStatus launchStatus;
  for (int i=0; i < splitCMD.size(); i++) {
    if (cancelled.get()) {
      break;
    }
    launchStatus=launchStageLocally(splitCMD.get(i),stdOut,stdErr);
    monitorJob();
    if (launchStatus.equals(FormStatus.InfoError)) {
      status=FormStatus.InfoError;
      return;
    }
  }
  status=FormStatus.Processed;
  return;
}
Program: 133728
Project: 133728
Buggy source:
/** 
 * This operation creates a set of ICEFormPages for ListComponents that are stored in the component map.
 * @return The pages.
 */
private ArrayList<ICEFormPage> createListSectionPages(){
  ArrayList<ICEFormPage> pages=new ArrayList<ICEFormPage>();
  ArrayList<Component> lists=componentMap.get("String_Node_Str");
  if (lists.size() > 0) {
    for (int i=0; i < lists.size(); i++) {
      ListComponent list=(ListComponent)lists.get(i);
      if (list != null) {
        ListComponentSectionPage page=new ListComponentSectionPage(this,list.getName(),list.getName());
        page.setList(list);
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * This operation creates a set of ICEFormPages for ListComponents that are stored in the component map.
 * @return The pages.
 */
private ArrayList<ICEFormPage> createListSectionPages(){
  ArrayList<ICEFormPage> pages=new ArrayList<ICEFormPage>();
  ArrayList<Component> lists=componentMap.get("String_Node_Str");
  if (lists.size() > 0) {
    for (int i=0; i < lists.size(); i++) {
      ListComponent list=(ListComponent)lists.get(i);
      if (list != null) {
        ListComponentSectionPage page=new ListComponentSectionPage(this,list.getName(),list.getName());
        page.setList(list);
        pages.add(page);
      }
    }
  }
  return pages;
}
Program: 133729
Project: 133729
Buggy source:
protected void createFormContent(IManagedForm managedForm){
  final ScrolledForm scrolledForm=managedForm.getForm();
  final FormToolkit formToolkit=managedFormRef.getToolkit();
  GridLayout layout=new GridLayout(1,false);
  layout.marginWidth=0;
  layout.marginHeight=0;
  scrolledForm.getBody().setLayout(layout);
  managedFormRef=managedForm;
  if (list != null) {
    Composite parent=managedForm.getForm().getBody();
    Section listSection=formToolkit.createSection(parent,Section.TITLE_BAR | Section.DESCRIPTION | Section.TWISTIE| Section.EXPANDED| Section.COMPACT);
    Composite sectionClient=new Composite(parent,SWT.FLAT);
    Table table=formToolkit.createTable(sectionClient,SWT.FLAT);
    DefaultEventTableViewer tableViewer=new DefaultEventTableViewer(list,table,list);
    listSection.setClient(sectionClient);
  }
  return;
}

Fixed version (ground truth):
protected void createFormContent(IManagedForm managedForm){
  final ScrolledForm scrolledForm=managedForm.getForm();
  final FormToolkit formToolkit=managedForm.getToolkit();
  GridLayout layout=new GridLayout(1,true);
  layout.marginWidth=0;
  layout.marginHeight=0;
  scrolledForm.getBody().setLayout(layout);
  if (list != null) {
    Composite parent=managedForm.getForm().getBody();
    Section listSection=formToolkit.createSection(parent,Section.TITLE_BAR | Section.DESCRIPTION | Section.TWISTIE| Section.EXPANDED| Section.COMPACT);
    listSection.setLayout(new GridLayout(1,false));
    listSection.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
    Composite sectionClient=new Composite(listSection,SWT.FLAT);
    sectionClient.setLayout(new GridLayout(2,false));
    sectionClient.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
    Table listTable=formToolkit.createTable(sectionClient,SWT.FLAT);
    DefaultEventTableViewer listTableViewer=new DefaultEventTableViewer(list,listTable,list);
    listTable.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
    Composite listButtonComposite=new Composite(sectionClient,SWT.NONE);
    listButtonComposite.setLayout(new GridLayout(1,false));
    listButtonComposite.setLayoutData(new GridData(SWT.RIGHT,SWT.FILL,false,true,1,1));
    Button addMaterialButton=new Button(listButtonComposite,SWT.PUSH);
    addMaterialButton.setText("String_Node_Str");
    Button deleteMaterialButton=new Button(listButtonComposite,SWT.PUSH);
    deleteMaterialButton.setText("String_Node_Str");
    listSection.setClient(sectionClient);
  }
  return;
}
Program: 133731
Project: 133731
Buggy source:
/** 
 * <!-- begin-UML-doc --> <p> This operation sets the input on the TreeCompositeViewer to the TreeComposite or set of TreeComposites in ICE. </p> <!-- end-UML-doc -->
 * @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
 */
private void setTreeCompositeViewerInput(){
  if (!(componentMap.get("String_Node_Str").isEmpty())) {
    try {
      getSite().getWorkbenchWindow().getActivePage().showView(getTreeCompositeViewerID());
    }
 catch (    PartInitException e) {
      e.printStackTrace();
    }
    TreeComposite tree=(TreeComposite)componentMap.get("String_Node_Str").get(0);
    TreeCompositeViewer treeView=(TreeCompositeViewer)getSite().getWorkbenchWindow().getActivePage().findView(getTreeCompositeViewerID());
    treeView.setInput(tree);
    tree.unregister(this);
    tree.register(this);
  }
}

Fixed version (ground truth):
/** 
 * <!-- begin-UML-doc --> <p> This operation sets the input on the TreeCompositeViewer to the TreeComposite or set of TreeComposites in ICE. </p> <!-- end-UML-doc -->
 * @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
 */
private void setTreeCompositeViewerInput(){
  List<Component> trees=componentMap.get("String_Node_Str");
  if (!trees.isEmpty()) {
    try {
      getSite().getWorkbenchWindow().getActivePage().showView(getTreeCompositeViewerID());
    }
 catch (    PartInitException e) {
      e.printStackTrace();
    }
    int id=getTreeCompositeViewerInputID();
    TreeComposite tree=null;
    if (id != -1) {
      for (      Component formTree : trees) {
        if (id == formTree.getId()) {
          tree=(TreeComposite)formTree;
          break;
        }
      }
    }
    if (tree == null) {
      tree=(TreeComposite)trees.get(0);
    }
    TreeCompositeViewer treeView=(TreeCompositeViewer)getSite().getWorkbenchWindow().getActivePage().findView(getTreeCompositeViewerID());
    treeView.setInput(tree);
    tree.unregister(this);
    tree.register(this);
  }
}
Program: 133732
Project: 133732
Buggy source:
/** 
 */
@Override public ArrayList<Entry> findAll(URI uri,String regex){
  ArrayList<Entry> retEntries=new ArrayList<Entry>();
  TreeComposite tree=(TreeComposite)read(uri);
  BreadthFirstTreeCompositeIterator iter=new BreadthFirstTreeCompositeIterator(tree);
  while (iter.hasNext()) {
    TreeComposite child=iter.next();
    if (child.getActiveDataNode() != null) {
      DataComponent data=(DataComponent)child.getActiveDataNode();
      for (      Entry e : data.retrieveAllEntries()) {
        if (e.getName().toLowerCase().contains(regex) && !e.getName().toLowerCase().contains("String_Node_Str")) {
          e.setName(child.getName());
          retEntries.add((Entry)e.clone());
        }
      }
    }
  }
  return retEntries;
}

Fixed version (ground truth):
/** 
 */
@Override public ArrayList<Entry> findAll(URI uri,String regex){
  ArrayList<Entry> retEntries=new ArrayList<Entry>();
  TreeComposite tree=(TreeComposite)read(uri);
  BreadthFirstTreeCompositeIterator iter=new BreadthFirstTreeCompositeIterator(tree);
  while (iter.hasNext()) {
    TreeComposite child=iter.next();
    if (child.getActiveDataNode() != null) {
      DataComponent data=(DataComponent)child.getActiveDataNode();
      for (      Entry e : data.retrieveAllEntries()) {
        if (!"String_Node_Str".equals(e.getTag()) && e.getName().toLowerCase().contains(regex) && !e.getName().toLowerCase().contains("String_Node_Str")) {
          e.setName(child.getName());
          retEntries.add((Entry)e.clone());
        }
      }
    }
  }
  return retEntries;
}
Program: 133733
Project: 133733
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  notifyListeners(SWT.Selection,new Event());
  IClient client=ClientHolder.getClient();
  FileDialog fileDialog=new FileDialog(getShell());
  fileDialog.setText("String_Node_Str");
  String fileName=fileDialog.open();
  if (fileName != null) {
    File importedFile=new File(fileName);
    client.importFile(importedFile.toURI());
    setEntryValue(fileName);
  }
  return;
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  notifyListeners(SWT.Selection,new Event());
  IClient client=ClientHolder.getClient();
  FileDialog fileDialog=new FileDialog(getShell());
  fileDialog.setText("String_Node_Str");
  String filePath=fileDialog.open();
  if (filePath != null) {
    File importedFile=new File(filePath);
    client.importFile(importedFile.toURI());
    setEntryValue(importedFile.getName());
  }
  return;
}
Program: 133734
Project: 133734
Buggy source:
/** 
 * This method creates a browse button on the EntryComposite. Clicking the button opens a file browser, and once a file is selected, the file is imported into the default workspace.
 */
private void createBrowseButton(){
  Button browseButton=new Button(this,SWT.PUSH);
  browseButton.setText("String_Node_Str");
  browseButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      notifyListeners(SWT.Selection,new Event());
      IClient client=ClientHolder.getClient();
      FileDialog fileDialog=new FileDialog(getShell());
      fileDialog.setText("String_Node_Str");
      String fileName=fileDialog.open();
      if (fileName != null) {
        File importedFile=new File(fileName);
        client.importFile(importedFile.toURI());
        setEntryValue(fileName);
      }
      return;
    }
  }
);
  buttons.add(browseButton);
  return;
}

Fixed version (ground truth):
/** 
 * This method creates a browse button on the EntryComposite. Clicking the button opens a file browser, and once a file is selected, the file is imported into the default workspace.
 */
private void createBrowseButton(){
  Button browseButton=new Button(this,SWT.PUSH);
  browseButton.setText("String_Node_Str");
  browseButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      notifyListeners(SWT.Selection,new Event());
      IClient client=ClientHolder.getClient();
      FileDialog fileDialog=new FileDialog(getShell());
      fileDialog.setText("String_Node_Str");
      String filePath=fileDialog.open();
      if (filePath != null) {
        File importedFile=new File(filePath);
        client.importFile(importedFile.toURI());
        setEntryValue(importedFile.getName());
      }
      return;
    }
  }
);
  buttons.add(browseButton);
  return;
}