Program: 11770
Project: 11770
Buggy source:
public Object execute(ExecutionEvent event) throws ExecutionException {
  IEvaluationContext ctx=(IEvaluationContext)event.getApplicationContext();
  Shell shell=(Shell)ctx.getVariable(ISources.ACTIVE_WORKBENCH_WINDOW_SHELL_NAME);
  FileDialog dialog=new FileDialog(shell,SWT.SAVE);
  String name=dialog.open();
  if (name != null) {
    File f=new File(name);
    if (!f.exists()) {
      ResourceSet resourceSet=new ResourceSetImpl();
      resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(Resource.Factory.Registry.DEFAULT_EXTENSION,new XMIResourceFactoryImpl());
      resourceSet.getPackageRegistry().put(ProjectPackage.eNS_URI,ProjectPackage.eINSTANCE);
      Resource resource=resourceSet.createResource(URI.createURI("String_Node_Str"));
      Foundation root=ProjectFactory.eINSTANCE.createFoundation();
      resource.getContents().add(root);
      try {
        FileOutputStream out=new FileOutputStream(f);
        resource.save(out,null);
        out.close();
      }
 catch (      FileNotFoundException e) {
        e.printStackTrace();
      }
catch (      IOException e) {
        e.printStackTrace();
      }
    }
    try {
      IWorkbenchWindow w=(IWorkbenchWindow)ctx.getVariable(ISources.ACTIVE_WORKBENCH_WINDOW_NAME);
      String path=f.toURL().toString();
      path=path.replaceFirst("String_Node_Str","String_Node_Str");
      w.getActivePage().showView(ProjectAdminViewPart.ID,path,IWorkbenchPage.VIEW_ACTIVATE);
    }
 catch (    PartInitException e) {
      e.printStackTrace();
    }
catch (    MalformedURLException e) {
      e.printStackTrace();
    }
  }
  return null;
}

Fixed version (ground truth):
public Object execute(ExecutionEvent event) throws ExecutionException {
  IEvaluationContext ctx=(IEvaluationContext)event.getApplicationContext();
  Shell shell=(Shell)ctx.getVariable(ISources.ACTIVE_WORKBENCH_WINDOW_SHELL_NAME);
  FileDialog dialog=new FileDialog(shell,SWT.SAVE);
  String name=dialog.open();
  if (name != null) {
    File f=new File(name);
    if (!f.exists()) {
      ResourceSet resourceSet=new ResourceSetImpl();
      resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(Resource.Factory.Registry.DEFAULT_EXTENSION,new XMIResourceFactoryImpl());
      resourceSet.getPackageRegistry().put(ProjectPackage.eNS_URI,ProjectPackage.eINSTANCE);
      Resource resource=resourceSet.createResource(URI.createURI("String_Node_Str"));
      Foundation root=ProjectFactory.eINSTANCE.createFoundation();
      resource.getContents().add(root);
      try {
        FileOutputStream out=new FileOutputStream(f);
        resource.save(out,null);
        out.close();
      }
 catch (      FileNotFoundException e) {
        e.printStackTrace();
      }
catch (      IOException e) {
        e.printStackTrace();
      }
    }
    try {
      IWorkbenchWindow w=(IWorkbenchWindow)ctx.getVariable(ISources.ACTIVE_WORKBENCH_WINDOW_NAME);
      String path=f.toURL().toString();
      path=path.replaceAll("String_Node_Str","String_Node_Str");
      w.getActivePage().showView(ProjectAdminViewPart.ID,path,IWorkbenchPage.VIEW_ACTIVATE);
    }
 catch (    PartInitException e) {
      e.printStackTrace();
    }
catch (    MalformedURLException e) {
      e.printStackTrace();
    }
  }
  return null;
}