nus-yam/ex-repair huggingface dataset:
Program: 133448
Project: 133448
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(402,lines.size());
  String[] line=lines.get(0);
  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]);
  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;
}

Fixed version (ground truth):
/** 
 * Test method for  {@link org.eclipse.ice.io.csv.SpaceDelimitedReader#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(402,lines.size());
  String[] line=lines.get(0);
  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]);
  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: 133450
Project: 133450
Buggy source:
/** 
 * This operation configures the Materials database.
 */
private void getMaterialsDatabase(){
  matDBServiceRef=bundleContext.getServiceReference(IMaterialsDatabase.class);
  IMaterialsDatabase database=bundleContext.getService(matDBServiceRef);
  AbstractModelBuilder.setMaterialsDatabase(database);
  return;
}

Fixed version (ground truth):
/** 
 * This operation configures the Materials database.
 */
private void getMaterialsDatabase(){
  if (bundleContext != null) {
    matDBServiceRef=bundleContext.getServiceReference(IMaterialsDatabase.class);
    IMaterialsDatabase database=bundleContext.getService(matDBServiceRef);
    AbstractModelBuilder.setMaterialsDatabase(database);
  }
  return;
}
Program: 133451
Project: 133451
Buggy source:
/** 
 * <p>This operation builds the IFormWidget.</p>
 * @return <p>The specialized IFormWidget from the service.</p>
 */
public IFormWidget build();

Fixed version (ground truth):
/** 
 * <p> This operation builds the IFormWidget. </p>
 * @return <p> The specialized IFormWidget from the service. </p>
 */
public IFormWidget build();
Program: 133452
Project: 133452
Buggy source:
/** 
 * <p>This operation returns the name of the target Form that the Builder will render.</p>
 * @return <p>The name of the Form.</p>
 */
public String getTargetFormName();

Fixed version (ground truth):
/** 
 * <p> This operation returns the name of the target Form that the Builder will render. </p>
 * @return <p> The name of the Form. </p>
 */
public String getTargetFormName();
Program: 133456
Project: 133456
Buggy source:
/** 
 * (non-Javadoc)
 * @see org.eclipse.ui.ISaveablePart#doSave(IProgressMonitor monitor)
 */
@Override public void doSave(IProgressMonitor monitor){
  setDirty(false);
  notifyUpdateListeners();
  if (iceDataForm.isReady() && goButton != null) {
    goButton.setEnabled(iceDataForm.isReady());
  }
  for (  IFormPart part : ((ICEFormPage)this.getSelectedPage()).getManagedForm().getParts()) {
    part.refresh();
  }
  if (!(componentMap.get("String_Node_Str").isEmpty())) {
    setTreeCompositeViewerInput();
  }
  if (!(componentMap.get("String_Node_Str").isEmpty())) {
    MasterDetailsComponent comp=(MasterDetailsComponent)(componentMap.get("String_Node_Str").get(0));
    String name=comp.getName();
    for (int i=0; i < this.getPageCount(); i++) {
      FormPage formPage=(FormPage)this.pages.get(i);
      if (formPage.getPartName().equals(name)) {
        ICEMasterDetailsPage masterPage=(ICEMasterDetailsPage)formPage;
        masterPage.refreshMaster();
      }
    }
  }
  if (!(componentMap.get("String_Node_Str")).isEmpty()) {
    for (int i=0; i < this.getPageCount(); i++) {
      FormPage formPage=(FormPage)this.pages.get(i);
      EMFComponent comp=(EMFComponent)componentMap.get("String_Node_Str").get(0);
      if (formPage.getPartName().equals(comp.getName())) {
        formPage.doSave(null);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * (non-Javadoc)
 * @see org.eclipse.ui.ISaveablePart#doSave(IProgressMonitor monitor)
 */
@Override public void doSave(IProgressMonitor monitor){
  System.out.println("String_Node_Str");
  setDirty(false);
  notifyUpdateListeners();
  if (iceDataForm.isReady() && goButton != null) {
    goButton.setEnabled(iceDataForm.isReady());
  }
  for (  IFormPart part : ((ICEFormPage)this.getSelectedPage()).getManagedForm().getParts()) {
    part.refresh();
  }
  if (!(componentMap.get("String_Node_Str").isEmpty())) {
    setTreeCompositeViewerInput();
  }
  if (!(componentMap.get("String_Node_Str").isEmpty())) {
    MasterDetailsComponent comp=(MasterDetailsComponent)(componentMap.get("String_Node_Str").get(0));
    String name=comp.getName();
    for (int i=0; i < this.getPageCount(); i++) {
      FormPage formPage=(FormPage)this.pages.get(i);
      if (formPage.getPartName().equals(name)) {
        ICEMasterDetailsPage masterPage=(ICEMasterDetailsPage)formPage;
        masterPage.refreshMaster();
      }
    }
  }
  if (!(componentMap.get("String_Node_Str")).isEmpty()) {
    for (int i=0; i < this.getPageCount(); i++) {
      FormPage formPage=(FormPage)this.pages.get(i);
      EMFComponent comp=(EMFComponent)componentMap.get("String_Node_Str").get(0);
      if (formPage.getPartName().equals(comp.getName())) {
        formPage.doSave(null);
      }
    }
  }
}
Program: 133457
Project: 133457
Buggy source:
/** 
 * This operation changes the dirty state of the FormEditor.
 * @param value
 */
public void setDirty(boolean value){
  dirty=value;
  firePropertyChange(PROP_DIRTY);
  if (getHeaderForm() != null) {
    final IMessageManager messageManager=getHeaderForm().getMessageManager();
    messageManager.addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.WARNING);
  }
}

Fixed version (ground truth):
/** 
 * This operation changes the dirty state of the FormEditor.
 * @param value
 */
public void setDirty(boolean value){
  dirty=value;
  firePropertyChange(PROP_DIRTY);
  if (getHeaderForm() != null) {
    final IMessageManager messageManager=getHeaderForm().getMessageManager();
    if (dirty) {
      messageManager.addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.WARNING);
    }
 else {
      messageManager.removeMessage("String_Node_Str");
    }
  }
}
Program: 133458
Project: 133458
Buggy source:
/** 
 * (non-Javadoc)
 * @see IObservableWidget#notifyUpdateListeners()
 */
@Override public void notifyUpdateListeners(){
  for (  IUpdateEventListener eventListener : updateListeners) {
    eventListener.formUpdated(iceDataForm);
  }
  return;
}

Fixed version (ground truth):
/** 
 * (non-Javadoc)
 * @see IObservableWidget#notifyUpdateListeners()
 */
@Override public void notifyUpdateListeners(){
  for (  IUpdateEventListener eventListener : updateListeners) {
    System.out.println("String_Node_Str" + eventListener.getClass().toString());
    eventListener.formUpdated(iceDataForm);
  }
  return;
}
Program: 133459
Project: 133459
Buggy source:
@Override public String getProviderName(){
  return null;
}

Fixed version (ground truth):
@Override public String getProviderName(){
  return "String_Node_Str";
}
Program: 133460
Project: 133460
Buggy source:
@Override public List<Class> getClasses(){
  return null;
}

Fixed version (ground truth):
@Override public List<Class> getClasses(){
  List<Class> classList=new ArrayList<Class>();
  classList.add(this.getClass());
  return classList;
}
Program: 133461
Project: 133461
Buggy source:
/** 
 * Test for  {@link org.eclipse.ice.datastructures.jaxbclassprovider.IJAXBClassProvider}.
 * @throws CoreException
 * @throws BundleException
 * @throws ClassNotFoundException
 * @throws URISyntaxException
 * @throws FileNotFoundException
 */
@Test public void test() throws CoreException, BundleException, ClassNotFoundException, URISyntaxException, FileNotFoundException {
  IJAXBClassProvider[] jaxbProviders=null;
  String id="String_Node_Str";
  IExtensionPoint point=Platform.getExtensionRegistry().getExtensionPoint(id);
  IConfigurationElement[] elements=point.getConfigurationElements();
  jaxbProviders=new IJAXBClassProvider[elements.length];
  for (int i=0; i < elements.length; i++) {
    jaxbProviders[i]=(IJAXBClassProvider)elements[i].createExecutableExtension("String_Node_Str");
  }
  IJAXBClassProvider[] providers=IJAXBClassProvider.getJAXBProviders();
  assertNotNull(providers);
  assertTrue(providers.length > 0);
  return;
}

Fixed version (ground truth):
/** 
 * Test for  {@link org.eclipse.ice.datastructures.jaxbclassprovider.IJAXBClassProvider}.
 * @throws CoreException
 * @throws BundleException
 * @throws ClassNotFoundException
 * @throws URISyntaxException
 * @throws FileNotFoundException
 */
@Ignore @Test public void test() throws CoreException, BundleException, ClassNotFoundException, URISyntaxException, FileNotFoundException {
  IJAXBClassProvider[] jaxbProviders=null;
  String id="String_Node_Str";
  IExtensionPoint point=Platform.getExtensionRegistry().getExtensionPoint(id);
  IConfigurationElement[] elements=point.getConfigurationElements();
  jaxbProviders=new IJAXBClassProvider[elements.length];
  for (int i=0; i < elements.length; i++) {
    jaxbProviders[i]=(IJAXBClassProvider)elements[i].createExecutableExtension("String_Node_Str");
  }
  IJAXBClassProvider[] providers=IJAXBClassProvider.getJAXBProviders();
  assertNotNull(providers);
  assertTrue(providers.length > 0);
  return;
}
Program: 133462
Project: 133462
Buggy source:
/** 
 * This operation pulls the list of JAXB class providers from the registry for classes that need custom handling.
 * @return The list of class providers.
 * @throws CoreException
 */
public static IJAXBClassProvider[] getJAXBProviders() throws CoreException {
  Logger logger=LoggerFactory.getLogger(IJAXBClassProvider.class);
  IJAXBClassProvider[] jaxbProviders=null;
  String id="String_Node_Str";
  IExtensionPoint point=Platform.getExtensionRegistry().getExtensionPoint(id);
  if (point != null) {
    IConfigurationElement[] elements=point.getConfigurationElements();
    jaxbProviders=new IJAXBClassProvider[elements.length];
    for (int i=0; i < elements.length; i++) {
      jaxbProviders[i]=(IJAXBClassProvider)elements[i].createExecutableExtension("String_Node_Str");
    }
  }
 else {
    System.err.println("String_Node_Str" + id + "String_Node_Str");
    logger.error("String_Node_Str" + id + "String_Node_Str");
  }
  return jaxbProviders;
}

Fixed version (ground truth):
/** 
 * This operation pulls the list of JAXB class providers from the registry for classes that need custom handling.
 * @return The list of class providers.
 * @throws CoreException
 */
public static IJAXBClassProvider[] getJAXBProviders() throws CoreException {
  Logger logger=LoggerFactory.getLogger(IJAXBClassProvider.class);
  IJAXBClassProvider[] jaxbProviders=null;
  String id="String_Node_Str";
  IExtensionPoint point=Platform.getExtensionRegistry().getExtensionPoint(id);
  if (point != null) {
    IConfigurationElement[] elements=point.getConfigurationElements();
    jaxbProviders=new IJAXBClassProvider[elements.length];
    for (int i=0; i < elements.length; i++) {
      jaxbProviders[i]=(IJAXBClassProvider)elements[i].createExecutableExtension("String_Node_Str");
    }
  }
 else {
    logger.error("String_Node_Str" + id + "String_Node_Str");
  }
  return jaxbProviders;
}
Program: 133463
Project: 133463
Buggy source:
@Override public Object create() throws CoreException {
  if (provider == null) {
    provider=new XMLPersistenceProvider();
    for (    ItemBuilder builder : ItemBuilder.getItemBuilders()) {
      provider.addBuilder(builder);
    }
    for (    IJAXBClassProvider jaxbProvider : IJAXBClassProvider.getJAXBProviders()) {
      provider.registerClassProvider(jaxbProvider);
    }
    try {
      provider.start();
    }
 catch (    JAXBException e) {
      logger.error("String_Node_Str",e);
    }
  }
  return provider;
}

Fixed version (ground truth):
@Override public Object create() throws CoreException {
  if (provider == null) {
    provider=new XMLPersistenceProvider();
    for (    ItemBuilder builder : ItemBuilder.getItemBuilders()) {
      provider.addBuilder(builder);
    }
    IJAXBClassProvider[] jaxbProviders=IJAXBClassProvider.getJAXBProviders();
    if (jaxbProviders != null && jaxbProviders.length > 0) {
      for (      IJAXBClassProvider jaxbProvider : jaxbProviders) {
        provider.registerClassProvider(jaxbProvider);
      }
    }
    try {
      provider.start();
    }
 catch (    JAXBException e) {
      logger.error("String_Node_Str",e);
    }
  }
  return provider;
}
Program: 133464
Project: 133464
Buggy source:
/** 
 * This operation overrides init so that the ICE Form, passed as an IEditorInput, can be stored.
 * @param site the site on the workbench where the Form is drawn
 * @param input the input for this editor
 */
@Override public void init(IEditorSite site,IEditorInput input) throws RuntimeException {
  setPartName(input.getName());
  setSite(site);
  setInput(input);
  if (input instanceof ICEFormInput) {
    ICEFormInput=(ICEFormInput)input;
    iceDataForm=ICEFormInput.getForm();
  }
 else   if (input instanceof FileEditorInput) {
    IFile formFile=((FileEditorInput)input).getFile();
    System.out.println("String_Node_Str" + formFile.getLocation().toOSString());
    try {
      IClient client=IClient.getClient();
      iceDataForm=client.loadItem(formFile);
      logger.info("String_Node_Str");
      System.out.println("String_Node_Str");
    }
 catch (    CoreException e) {
      logger.error("String_Node_Str",e);
    }
  }
 else {
    logger.error("String_Node_Str");
    throw new RuntimeException("String_Node_Str" + "String_Node_Str");
  }
  return;
}

Fixed version (ground truth):
/** 
 * This operation overrides init so that the ICE Form, passed as an IEditorInput, can be stored.
 * @param site the site on the workbench where the Form is drawn
 * @param input the input for this editor
 */
@Override public void init(IEditorSite site,IEditorInput input) throws RuntimeException {
  setPartName(input.getName());
  setSite(site);
  setInput(input);
  if (input instanceof ICEFormInput) {
    ICEFormInput=(ICEFormInput)input;
    iceDataForm=ICEFormInput.getForm();
  }
 else   if (input instanceof FileEditorInput) {
    IFile formFile=((FileEditorInput)input).getFile();
    System.out.println("String_Node_Str" + formFile.getLocation().toOSString());
    try {
      IClient client=IClient.getClient();
      iceDataForm=client.loadItem(formFile);
      logger.info("String_Node_Str");
    }
 catch (    CoreException e) {
      logger.error("String_Node_Str",e);
    }
  }
 else {
    logger.error("String_Node_Str");
    throw new RuntimeException("String_Node_Str" + "String_Node_Str");
  }
  return;
}
Program: 133465
Project: 133465
Buggy source:
/** 
 * This operation starts the Core, sets the component context and starts the web client if the HTTP service is available.
 * @param context The bundle context for this OSGi bundle.
 */
public void start(ComponentContext context) throws CoreException {
  componentContext=context;
  logger.info("String_Node_Str");
  IExtensionPoint point=Platform.getExtensionRegistry().getExtensionPoint(providerID);
  if (point != null) {
    IConfigurationElement element=point.getConfigurationElements()[0];
    provider=(IPersistenceProvider)element.createExecutableExtension("String_Node_Str");
    System.out.println("String_Node_Str");
  }
 else {
    logger.error("String_Node_Str" + providerID + "String_Node_Str");
  }
  itemManager.setPersistenceProvider(provider);
  ItemBuilder builder=null;
  point=Platform.getExtensionRegistry().getExtensionPoint(id);
  if (point != null) {
    IConfigurationElement[] elements=point.getConfigurationElements();
    for (int i=0; i < elements.length; i++) {
      builder=(ItemBuilder)elements[i].createExecutableExtension("String_Node_Str");
      itemManager.registerBuilder(builder);
    }
  }
 else {
    logger.error("String_Node_Str" + id + "String_Node_Str");
  }
  itemManager.loadItems(projectTable.get("String_Node_Str"));
  startHttpService();
  debugCheckExtensions();
  return;
}

Fixed version (ground truth):
/** 
 * This operation starts the Core, sets the component context and starts the web client if the HTTP service is available.
 * @param context The bundle context for this OSGi bundle.
 */
public void start(ComponentContext context) throws CoreException {
  componentContext=context;
  logger.info("String_Node_Str");
  IExtensionPoint point=Platform.getExtensionRegistry().getExtensionPoint(providerID);
  if (point != null) {
    IConfigurationElement element=point.getConfigurationElements()[0];
    provider=(IPersistenceProvider)element.createExecutableExtension("String_Node_Str");
    System.out.println("String_Node_Str");
  }
 else {
    logger.error("String_Node_Str" + providerID + "String_Node_Str");
  }
  itemManager.setPersistenceProvider(provider);
  ItemBuilder builder=null;
  point=Platform.getExtensionRegistry().getExtensionPoint(id);
  if (point != null) {
    IConfigurationElement[] elements=point.getConfigurationElements();
    for (int i=0; i < elements.length; i++) {
      builder=(ItemBuilder)elements[i].createExecutableExtension("String_Node_Str");
      itemManager.registerBuilder(builder);
    }
  }
 else {
    logger.error("String_Node_Str" + id + "String_Node_Str");
  }
  createItemDBProjectSpace();
  provider.setDefaultProject(itemDBProject);
  itemManager.loadItems(itemDBProject);
  startHttpService();
  debugCheckExtensions();
  return;
}
Program: 133466
Project: 133466
Buggy source:
@Override public void setDefaultProject(IProject project){
  this.project=project;
}

Fixed version (ground truth):
@Override public void setDefaultProject(IProject project){
  this.project=project;
  loadItemIdMap();
}
Program: 133467
Project: 133467
Buggy source:
/** 
 * This operation is called to start the XMLPersistenceProvider by the OSGi Declarative Services engine. It sets up the project space and starts the event loop.
 * @throws JAXBException An exception indicating that the JAXB Context could not be created.
 */
public void start() throws JAXBException {
  logger.info("String_Node_Str" + "String_Node_Str");
  if (project == null) {
    createProjectSpace();
  }
  createJAXBContext();
  loadItemIdMap();
  runFlag.set(true);
  eventLoop=new Thread(this);
  eventLoop.start();
  logger.info("String_Node_Str" + "String_Node_Str");
  return;
}

Fixed version (ground truth):
/** 
 * This operation is called to start the XMLPersistenceProvider by the OSGi Declarative Services engine. It sets up the project space and starts the event loop.
 * @throws JAXBException An exception indicating that the JAXB Context could not be created.
 */
public void start() throws JAXBException {
  logger.info("String_Node_Str" + "String_Node_Str");
  createJAXBContext();
  runFlag.set(true);
  eventLoop=new Thread(this);
  eventLoop.start();
  logger.info("String_Node_Str" + "String_Node_Str");
  return;
}
Program: 133471
Project: 133471
Buggy source:
/** 
 * This operation instantiates the output file.
 */
private void setupOutputFile(){
  String outputFilename=form.getName().replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str" + getId()+ "String_Node_Str";
  if (project != null) {
    IFile outputFileHandle=project.getFile(outputFilename);
    outputFile=outputFileHandle.getLocation().toFile();
    try {
      outputFile.createNewFile();
    }
 catch (    Exception fileFailException) {
      logger.info("String_Node_Str" + "String_Node_Str");
      fileFailException.printStackTrace();
      return;
    }
  }
  return;
}

Fixed version (ground truth):
/** 
 * This operation instantiates the output file.
 */
protected void setupOutputFile(){
  String outputFilename=form.getName().replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str" + getId()+ "String_Node_Str";
  if (project != null) {
    IFile outputFileHandle=project.getFile(outputFilename);
    outputFile=outputFileHandle.getLocation().toFile();
    try {
      outputFile.createNewFile();
    }
 catch (    Exception fileFailException) {
      logger.info("String_Node_Str" + "String_Node_Str");
      fileFailException.printStackTrace();
      return;
    }
  }
  return;
}
Program: 133472
Project: 133472
Buggy source:
/** 
 * This method is called whenever the current   {@link #resourceComponent} isupdated. It adds any new plots to the map of  {@link #plots} if possible.
 */
@Override public void update(IUpdateable component){
  if (component != null && component == resourceComponent) {
  }
 else   if (component != null && component instanceof VizResource) {
    final VizResource resource=(VizResource)component;
    plotGridComposite.refreshPlots(resource.getPath());
    if (pageComposite != null) {
      pageComposite.getDisplay().asyncExec(new Runnable(){
        @Override public void run(){
          pageComposite.layout();
          activateEditor();
        }
      }
);
    }
  }
  return;
}

Fixed version (ground truth):
/** 
 * This method is called whenever the current   {@link #resourceComponent} isupdated. It adds any new plots to the map of  {@link #plots} if possible.
 */
@Override public void update(IUpdateable component){
  if (component != null && component == resourceComponent) {
    for (    ICEResource resource : resourceComponent.getResources()) {
      if (resource instanceof VizResource) {
        resource.register(this);
      }
    }
  }
 else   if (component != null && component instanceof VizResource) {
    final VizResource resource=(VizResource)component;
    plotGridComposite.refreshPlots(resource.getPath());
    if (pageComposite != null) {
      pageComposite.getDisplay().asyncExec(new Runnable(){
        @Override public void run(){
          pageComposite.layout();
          activateEditor();
        }
      }
);
    }
  }
  return;
}
Program: 133475
Project: 133475
Buggy source:
@Override protected ArrayList<VizEntry> createConnectionTemplate(){
  ArrayList<VizEntry> template=super.createConnectionTemplate();
  IVizEntryContentProvider contentProvider;
  contentProvider=new BasicVizEntryContentProvider();
  contentProvider.setDefaultValue("String_Node_Str");
  VizEntry proxyEntry=new VizEntry(contentProvider);
  proxyEntry.setName("String_Node_Str");
  template.add(proxyEntry);
  PortEntryContentProvider portContentProvider=new PortEntryContentProvider();
  portContentProvider.setRange(PortEntryContentProvider.MIN_PORT,PortEntryContentProvider.MAX_PORT);
  portContentProvider.setDefaultValue(22);
  VizEntry proxyPortEntry=new PortEntry(portContentProvider);
  proxyPortEntry.setName("String_Node_Str");
  template.add(proxyPortEntry);
  contentProvider=new BasicVizEntryContentProvider();
  contentProvider.setAllowedValueType(VizAllowedValueType.Undefined);
  contentProvider.setDefaultValue("String_Node_Str");
  VizEntry visitUserEntry=new VizEntry(contentProvider);
  visitUserEntry.setName("String_Node_Str");
  template.add(visitUserEntry);
  return template;
}

Fixed version (ground truth):
@Override protected ArrayList<VizEntry> createConnectionTemplate(){
  ArrayList<VizEntry> template=super.createConnectionTemplate();
  IVizEntryContentProvider contentProvider;
  contentProvider=new BasicVizEntryContentProvider();
  contentProvider.setDefaultValue("String_Node_Str");
  VizEntry proxyEntry=new VizEntry(contentProvider);
  proxyEntry.setName("String_Node_Str");
  template.add(proxyEntry);
  PortEntryContentProvider portContentProvider=new PortEntryContentProvider();
  portContentProvider.setRange(PortEntryContentProvider.MIN_PORT,PortEntryContentProvider.MAX_PORT);
  portContentProvider.setDefaultValue(22);
  VizEntry proxyPortEntry=new PortEntry(portContentProvider);
  proxyPortEntry.setName("String_Node_Str");
  template.add(proxyPortEntry);
  contentProvider=new BasicVizEntryContentProvider();
  contentProvider.setAllowedValueType(VizAllowedValueType.Undefined);
  contentProvider.setDefaultValue("String_Node_Str");
  VizEntry visitUserEntry=new VizEntry(contentProvider);
  visitUserEntry.setName("String_Node_Str");
  template.add(visitUserEntry);
  Iterator<VizEntry> it=template.iterator();
  while (it.hasNext()) {
    VizEntry entry=it.next();
    if ("String_Node_Str".equals(entry.getName())) {
      it.remove();
    }
  }
  contentProvider=new BasicVizEntryContentProvider();
  contentProvider.setAllowedValueType(VizAllowedValueType.Executable);
  ArrayList<String> allowedValues=new ArrayList<String>();
  String defaultPath=System.getProperty("String_Node_Str");
  if (defaultPath != null) {
    if (defaultPath.contains("String_Node_Str")) {
      defaultPath=defaultPath.replace("String_Node_Str",System.getProperty("String_Node_Str"));
      allowedValues.add(defaultPath);
    }
  }
  contentProvider.setAllowedValues(allowedValues);
  VizEntry pathEntry=new VizEntry(contentProvider);
  pathEntry.setName("String_Node_Str");
  pathEntry.setDescription("String_Node_Str");
  template.add(3,pathEntry);
  return template;
}
Program: 133477
Project: 133477
Buggy source:
/** 
 * Adds a new connection based on the specified name and preference value. The connection will attempt to connect.
 * @param name The name of the connection (a preference name in the store).
 * @param preferences The preference value for the connection. This value should come straight from the  {@link #preferenceStore}.
 */
private void addConnection(String name,String preferences){
  logger.debug("String_Node_Str" + "String_Node_Str" + name + "String_Node_Str"+ preferences+ "String_Node_Str");
  VizConnection<T> connection=createConnection(name,preferences);
  String[] split=preferences.split(getConnectionPreferenceDelimiter(),-1);
  try {
    connection.setName(name);
    connection.setHost(split[0]);
    connection.setPort(Integer.parseInt(split[1]));
    connection.setPath(split[2]);
    connectionsByName.put(name,connection);
    String host=connection.getHost();
    Set<String> connections=connectionsByHost.get(host);
    if (connections == null) {
      connections=new HashSet<String>();
      connectionsByHost.put(host,connections);
    }
    connections.add(name);
    connection.connect();
  }
 catch (  IndexOutOfBoundsException|NullPointerException|NumberFormatException e) {
  }
  return;
}

Fixed version (ground truth):
/** 
 * Adds a new connection based on the specified name and preference value. The connection will attempt to connect.
 * @param name The name of the connection (a preference name in the store).
 * @param preferences The preference value for the connection. This value should come straight from the  {@link #preferenceStore}.
 */
private void addConnection(String name,String preferences){
  logger.info("String_Node_Str" + "String_Node_Str" + name + "String_Node_Str"+ preferences+ "String_Node_Str");
  VizConnection<T> connection=createConnection(name,preferences);
  String[] split=preferences.split(getConnectionPreferenceDelimiter(),-1);
  try {
    connection.setName(name);
    connection.setHost(split[0]);
    connection.setPort(Integer.parseInt(split[1]));
    connection.setPath(split[2].split("String_Node_Str")[0]);
    connectionsByName.put(name,connection);
    String host=connection.getHost();
    Set<String> connections=connectionsByHost.get(host);
    if (connections == null) {
      connections=new HashSet<String>();
      connectionsByHost.put(host,connections);
    }
    connections.add(name);
    connection.connect();
  }
 catch (  IndexOutOfBoundsException|NullPointerException|NumberFormatException e) {
  }
  return;
}
Program: 133479
Project: 133479
Buggy source:
/** 
 * An   {@link Entry} requires a combo widget if its {@link AllowedValueType}is discrete.
 */
@Override public boolean requiresCombo(Object element){
  return isValid(element) && ((VizEntry)element).getValueType() == VizAllowedValueType.Discrete;
}

Fixed version (ground truth):
/** 
 * An   {@link Entry} requires a combo widget if its {@link AllowedValueType}is discrete.
 */
@Override public boolean requiresCombo(Object element){
  return isValid(element) && (((VizEntry)element).getValueType() == VizAllowedValueType.Discrete || ((VizEntry)element).getValueType() == VizAllowedValueType.Executable);
}
Program: 133480
Project: 133480
Buggy source:
/** 
 * The default constructor.
 * @param viewer The viewer that is using this <code>EditingSupport</code>. <code>Control</code>s required by this class will be constructed under this viewer's <code>Control</code> (usually a <code>Table</code>).
 * @param contentProvider The content provider. The methods required as an <code>EditingSupport</code> are passed to this content provider.
 */
public EntryCellEditingSupport(ColumnViewer viewer,EntryCellContentProvider contentProvider){
  super(viewer);
  this.contentProvider=contentProvider;
  Composite parent=(Composite)viewer.getControl();
  textCell=new TextCellEditor(parent,SWT.LEFT);
  comboCell=new ComboBoxCellEditor(parent,new String[]{},SWT.DROP_DOWN | SWT.READ_ONLY);
  comboCell.getControl().setBackground(parent.getBackground());
  valueMap=new HashMap<String,Integer>();
  return;
}

Fixed version (ground truth):
/** 
 * The default constructor.
 * @param viewer The viewer that is using this <code>EditingSupport</code>. <code>Control</code>s required by this class will be constructed under this viewer's <code>Control</code> (usually a <code>Table</code>).
 * @param contentProvider The content provider. The methods required as an <code>EditingSupport</code> are passed to this content provider.
 */
public EntryCellEditingSupport(ColumnViewer viewer,EntryCellContentProvider contentProvider){
  super(viewer);
  this.contentProvider=contentProvider;
  parent=(Composite)viewer.getControl();
  textCell=new TextCellEditor(parent,SWT.LEFT);
  valueMap=new HashMap<String,Integer>();
  return;
}
Program: 133481
Project: 133481
Buggy source:
/** 
 * By default, this returns a   {@link TextCellEditor}.
 */
@Override protected CellEditor getCellEditor(Object element){
  CellEditor editor=null;
  if (contentProvider.isValid(element)) {
    if (contentProvider.requiresCombo(element)) {
      editor=comboCell;
      List<String> allowedValues=contentProvider.getAllowedValues(element);
      String[] items=new String[allowedValues.size()];
      comboCell.setItems(allowedValues.toArray(items));
      valueMap.clear();
      for (int i=0; i < items.length; i++) {
        valueMap.put(items[i],i);
      }
    }
 else {
      editor=textCell;
      char echo=ISecretCellContentProvider.PUBLIC_CHAR;
      if (contentProvider.isSecret(element)) {
        echo=contentProvider.getSecretChar();
      }
      Text text=(Text)textCell.getControl();
      text.setEchoChar(echo);
    }
  }
  return editor;
}

Fixed version (ground truth):
/** 
 * By default, this returns a   {@link TextCellEditor}.
 */
@Override protected CellEditor getCellEditor(Object element){
  CellEditor editor=null;
  if (contentProvider.isValid(element)) {
    if (contentProvider.requiresCombo(element)) {
      VizEntry entry=(VizEntry)element;
      System.out.println("String_Node_Str");
      boolean isExecutable=entry.getValueType() == VizAllowedValueType.Executable;
      if (isExecutable) {
        comboCell=new FileComboBoxCellEditor(parent,new String[]{},SWT.DROP_DOWN,this,entry);
      }
 else {
        comboCell=new ComboBoxCellEditor(parent,new String[]{},SWT.DROP_DOWN | SWT.READ_ONLY);
      }
      comboCell.getControl().setBackground(parent.getBackground());
      editor=comboCell;
      List<String> allowedValues=contentProvider.getAllowedValues(element);
      String[] items=new String[allowedValues.size()];
      comboCell.setItems(allowedValues.toArray(items));
      valueMap.clear();
      for (int i=0; i < items.length; i++) {
        valueMap.put(items[i],i);
      }
    }
 else {
      editor=textCell;
      char echo=ISecretCellContentProvider.PUBLIC_CHAR;
      if (contentProvider.isSecret(element)) {
        echo=contentProvider.getSecretChar();
      }
      Text text=(Text)textCell.getControl();
      text.setEchoChar(echo);
    }
  }
  return editor;
}
Program: 133483
Project: 133483
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  String entryValue=null;
  MessageDialog dialog=new MessageDialog(getShell(),"String_Node_Str",null,"String_Node_Str",MessageDialog.QUESTION_WITH_CANCEL,new String[]{"String_Node_Str","String_Node_Str"},0);
  int result=dialog.open();
  if (result == 1) {
    RemoteResourceBrowser browser=new RemoteResourceBrowser(getShell(),SWT.NONE);
    browser.setTitle("String_Node_Str");
    browser.setType(RemoteResourceBrowser.FILE_BROWSER);
    if (browser.open() != Window.OK) {
      return;
    }
    IFileStore fs=browser.getResource();
    entryValue=fs.toURI().toString();
  }
 else {
    FileDialog fileDialog=new FileDialog(getShell());
    fileDialog.setText("String_Node_Str");
    String filePath=fileDialog.open();
    if (filePath != null) {
      File importedFile=new File(filePath);
      entryValue=importedFile.toURI().toString();
    }
  }
  if (entryValue != null && !entryValue.isEmpty()) {
    IEntryContentProvider prov=new BasicEntryContentProvider();
    ArrayList<String> valueList=entry.getAllowedValues();
    if (!valueList.contains(entryValue)) {
      valueList.add(entryValue);
    }
    prov.setAllowedValueType(AllowedValueType.Executable);
    prov.setAllowedValues(valueList);
    entry.setContentProvider(prov);
    setEntryValue(entryValue);
  }
  notifyListeners(SWT.Selection,new Event());
  return;
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  String entryValue=null;
  MessageDialog dialog=new MessageDialog(getShell(),"String_Node_Str",null,"String_Node_Str",MessageDialog.QUESTION_WITH_CANCEL,new String[]{"String_Node_Str","String_Node_Str"},0);
  int result=dialog.open();
  if (result == 1) {
    RemoteResourceBrowser browser=new RemoteResourceBrowser(getShell(),SWT.NONE);
    browser.setTitle("String_Node_Str");
    browser.setType(RemoteResourceBrowser.FILE_BROWSER);
    if (browser.open() != Window.OK) {
      return;
    }
    IFileStore fs=browser.getResource();
    String hostName=browser.getConnection().getService(IRemoteConnectionHostService.class).getHostname();
    URI uri=fs.toURI();
    entryValue=uri.getScheme() + "String_Node_Str" + hostName+ uri.getPath();
  }
 else {
    FileDialog fileDialog=new FileDialog(getShell());
    fileDialog.setText("String_Node_Str");
    String filePath=fileDialog.open();
    if (filePath != null) {
      File importedFile=new File(filePath);
      entryValue=importedFile.toURI().toString();
    }
  }
  if (entryValue != null && !entryValue.isEmpty()) {
    IEntryContentProvider prov=new BasicEntryContentProvider();
    ArrayList<String> valueList=entry.getAllowedValues();
    if (!valueList.contains(entryValue)) {
      valueList.add(entryValue);
    }
    prov.setAllowedValueType(AllowedValueType.Executable);
    prov.setAllowedValues(valueList);
    entry.setContentProvider(prov);
    setEntryValue(entryValue);
  }
  notifyListeners(SWT.Selection,new Event());
  return;
}
Program: 133484
Project: 133484
Buggy source:
/** 
 * This method is invoked before the check-input capability to  verify that we have any files we may need for the simulation.  Moose will throw an error before any input validation  occurs if it can't find a file. 
 * @return
 */
private boolean validateFileEntries(){
  refreshProjectSpace();
  for (  final Entry entry : getFileEntries()) {
    try {
      if (entry.getValue().isEmpty() || !project.getFile(entry.getValue()).exists()) {
        throw new Exception("String_Node_Str" + entry.getValue());
      }
    }
 catch (    Exception e) {
      logger.error(getClass().getName() + "String_Node_Str",e);
      String errorMessage="String_Node_Str" + "String_Node_Str" + project.getLocation().toOSString() + "String_Node_Str"+ (entry.getValue().isEmpty() ? entry.getName() : entry.getValue())+ "String_Node_Str"+ e.getMessage();
      throwErrorMessage("String_Node_Str","String_Node_Str","String_Node_Str",errorMessage);
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * This method is invoked before the check-input capability to verify that we have any files we may need for the simulation. Moose will throw an error before any input validation occurs if it can't find a file.
 * @return
 */
private boolean validateFileEntries(){
  refreshProjectSpace();
  for (  final Entry entry : getFileEntries()) {
    try {
      if (entry.getValue().isEmpty() || !project.getFile(entry.getValue()).exists()) {
        throw new Exception("String_Node_Str" + entry.getValue());
      }
    }
 catch (    Exception e) {
      logger.error(getClass().getName() + "String_Node_Str",e);
      String errorMessage="String_Node_Str" + "String_Node_Str" + project.getLocation().toOSString() + "String_Node_Str"+ (entry.getValue().isEmpty() ? entry.getName() : entry.getValue())+ "String_Node_Str"+ e.getMessage();
      throwErrorMessage("String_Node_Str","String_Node_Str","String_Node_Str",errorMessage);
      return false;
    }
  }
  return true;
}
Program: 133487
Project: 133487
Buggy source:
@Override public void run(){
  new MOOSEFileHandler().setupVariables(modelTree);
  new MOOSEFileHandler().setupAuxVariables(modelTree);
}

Fixed version (ground truth):
@Override public void run(){
  try {
    Thread.sleep(1000);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
  new MOOSEFileHandler().setupVariables(modelTree);
  new MOOSEFileHandler().setupAuxVariables(modelTree);
}
Program: 133488
Project: 133488
Buggy source:
/** 
 * The Constructor
 */
public MOOSEBuilder(){
  setName("String_Node_Str");
  setType(ItemType.Simulation);
}

Fixed version (ground truth):
/** 
 * The Constructor
 */
public MOOSEBuilder(){
  setName("String_Node_Str");
  setType(ItemType.Application);
}
Program: 133490
Project: 133490
Buggy source:
@Override public void update(IUpdateable component){
  if (component == dataComp) {
    PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable(){
      @Override public void run(){
        if (!DataComponentComposite.this.isDisposed()) {
          refresh();
        }
 else {
          dataComp.unregister(DataComponentComposite.this);
        }
      }
    }
);
  }
  return;
}

Fixed version (ground truth):
@Override public void update(IUpdateable component){
  if (component == dataComp) {
    PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable(){
      @Override public void run(){
        if (!DataComponentComposite.this.isDisposed()) {
          refresh();
        }
 else {
          dataComp.unregister(DataComponentComposite.this);
        }
      }
    }
);
  }
  return;
}
Program: 133491
Project: 133491
Buggy source:
/** 
 * This operation returns the list of reafiles in the "Nek5000_Model_Builder" folder of the project space, or null if the folder does not exist or there are no files.
 * @return
 */
private ArrayList<String> getProjectFiles(){
  ArrayList<String> files=new ArrayList<String>();
  if (project != null) {
    try {
      IFolder nekFolder=getPreferencesDirectory();
      if (nekFolder.exists()) {
        IResource[] resources=nekFolder.members();
        for (        IResource resource : resources) {
          logger.debug("String_Node_Str" + "String_Node_Str" + resource.getName() + "String_Node_Str");
          if (resource.getType() == IResource.FILE && resource.getProjectRelativePath().lastSegment().contains("String_Node_Str")) {
            files.add(resource.getName());
          }
        }
      }
 else {
        return null;
      }
    }
 catch (    CoreException e) {
      logger.error(getClass().getName() + "String_Node_Str",e);
    }
  }
  return files;
}

Fixed version (ground truth):
/** 
 * This operation returns the list of reafiles in the "Nek5000_Model_Builder" folder of the project space, or null if the folder does not exist or there are no files.
 * @return
 */
private ArrayList<String> getProjectFiles(){
  ArrayList<String> files=new ArrayList<String>();
  if (project != null) {
    try {
      IFolder nekFolder=getPreferencesDirectory();
      project.refreshLocal(IResource.DEPTH_INFINITE,null);
      if (nekFolder.exists()) {
        IResource[] resources=nekFolder.members();
        for (        IResource resource : resources) {
          logger.debug("String_Node_Str" + "String_Node_Str" + resource.getName() + "String_Node_Str");
          if (resource.getType() == IResource.FILE && resource.getProjectRelativePath().lastSegment().contains("String_Node_Str")) {
            files.add(resource.getName());
          }
        }
      }
 else {
        return null;
      }
    }
 catch (    CoreException e) {
      logger.error(getClass().getName() + "String_Node_Str",e);
    }
  }
  return files;
}
Program: 133493
Project: 133493
Buggy source:
/** 
 * The default constructor.
 * @param pageName The name of the page.
 */
public ImportFileWizardPage(String pageName){
  super(pageName);
  setTitle("String_Node_Str");
  setDescription("String_Node_Str");
  fileDialogStyle=SWT.MULTI;
  filterPath="String_Node_Str";
  selectedFileNames=new ArrayList<String>();
  return;
}

Fixed version (ground truth):
/** 
 * The default constructor.
 * @param pageName The name of the page.
 */
public ImportFileWizardPage(String pageName){
  super(pageName);
  if (ClientHolder.getClient() == null) {
    new Client();
  }
  setTitle("String_Node_Str");
  setDescription("String_Node_Str");
  fileDialogStyle=SWT.MULTI;
  filterPath="String_Node_Str";
  selectedFileNames=new ArrayList<String>();
  return;
}
Program: 133495
Project: 133495
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) {
      logger.error(getClass().getName() + "String_Node_Str",e);
      return false;
    }
  }
  if (xmlResource != null && xmlResource.getContents().size() > 0) {
    documentRoot=xmlResource.getContents().get(0);
  }
 else {
    System.out.println("String_Node_Str" + file.getAbsolutePath());
    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;
}

Fixed version (ground truth):
/** 
 * Load the given File as an XMLResource.
 * @param file
 * @return whether the operation was successful
 */
public boolean load(File file){
  EObject documentRoot=null;
  if (xmlProcessor != null) {
    try {
      xmlResource=(XMLResource)xmlProcessor.load(new FileInputStream(file),null);
    }
 catch (    IOException e) {
      logger.error(getClass().getName() + "String_Node_Str",e);
      return false;
    }
  }
  if (xmlResource != null && xmlResource.getContents().size() > 0) {
    documentRoot=xmlResource.getContents().get(0);
  }
 else {
    System.out.println("String_Node_Str" + file.getAbsolutePath());
    return false;
  }
  if (documentRoot != null) {
    int id=1;
    iceEMFTree=new EMFTreeComposite(documentRoot);
    iceEMFTree.setId(id);
    HashMap<EObject,EMFTreeComposite> map=new HashMap<EObject,EMFTreeComposite>();
    map.put(documentRoot,iceEMFTree);
    TreeIterator<EObject> tree=documentRoot.eAllContents();
    EObject obj=null;
    EMFTreeComposite tempTree=null;
    while (tree.hasNext()) {
      id++;
      obj=tree.next();
      tempTree=new EMFTreeComposite(obj);
      tempTree.setId(id);
      map.put(obj,tempTree);
    }
    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: 133496
Project: 133496
Buggy source:
/** 
 * Sets the connection and updates the proxy's information and properties based on the new connection.
 * @param connection The new connection.
 * @return True if the connection could be changed (the URI could beopened), false otherwise.
 */
private boolean setConnection(IVizConnection<IParaViewWebClient> connection){
  boolean opened=false;
  if (connection != this.connection && connection.getState() == ConnectionState.Connected) {
    IParaViewWebClient widget=connection.getWidget();
    if (openFile(widget,uri.getPath())) {
      opened=true;
      this.connection=connection;
      times.clear();
      times.addAll(findTimesteps());
      timestep=0;
      featureMap.clear();
      for (      ProxyFeature featureInfo : findFeatures()) {
        if (featureInfo.setConnection(connection)) {
          featureMap.put(featureInfo.name,featureInfo);
        }
      }
      propertyMap.clear();
      for (      ProxyProperty propertyInfo : findProperties()) {
        if (propertyInfo.setConnection(connection)) {
          propertyMap.put(propertyInfo.name,propertyInfo);
        }
      }
      category=null;
      feature=null;
    }
  }
  return opened;
}

Fixed version (ground truth):
/** 
 * Sets the connection and updates the proxy's information and properties based on the new connection.
 * @param connection The new connection.
 * @return True if the connection could be changed (the URI could beopened), false otherwise.
 */
private boolean setConnection(IVizConnection<IParaViewWebClient> connection){
  boolean opened=false;
  if (connection != this.connection && connection.getState() == ConnectionState.Connected) {
    IParaViewWebClient widget=connection.getWidget();
    if (openFile(widget,uri.getPath())) {
      opened=true;
      this.connection=connection;
      times.clear();
      times.addAll(findTimesteps());
      timestep=0;
      featureMap.clear();
      for (      ProxyFeature featureInfo : findFeatures()) {
        if (featureInfo.setConnection(connection)) {
          featureMap.put(featureInfo.name,featureInfo);
        }
      }
      propertyMap.clear();
      for (      ProxyProperty propertyInfo : findProperties()) {
        if (propertyInfo.setConnection(connection)) {
          propertyMap.put(propertyInfo.name,propertyInfo);
        }
      }
      category=null;
      feature=null;
      ProxyFeature selectedFeature=null;
      for (      ProxyFeature featureInfo : featureMap.values()) {
        if (featureInfo.type == PropertyType.DISCRETE_MULTI) {
          List<String> values=featureInfo.getValues();
          if (!values.isEmpty()) {
            selectedFeature=featureInfo;
            feature=values.get(0);
            break;
          }
        }
 else         if (featureInfo.getValue() != null) {
          selectedFeature=featureInfo;
          feature=featureInfo.getValue();
          break;
        }
      }
      if (selectedFeature != null) {
        category=selectedFeature.name;
        setColorBy(selectedFeature,feature);
        rescale();
        refreshScalarBar();
      }
    }
  }
  return opened;
}