Program: 140609
Project: 140609
Buggy source:
@Override public boolean performFinish(){
  Pattern pattern=PatternFactory.eINSTANCE.createPattern();
  String name=AbstractWizardPage.getConnectionParams().getName();
  pattern.setName(name);
  TaggedValueHelper.setAuthor(pattern,AbstractWizardPage.getConnectionParams().getAuthor());
  TaggedValueHelper.setDescription(AbstractWizardPage.getConnectionParams().getDescription(),pattern);
  TaggedValueHelper.setPurpose(AbstractWizardPage.getConnectionParams().getPurpose(),pattern);
  TaggedValueHelper.setDevStatus(pattern,DevelopmentStatus.get(AbstractWizardPage.getConnectionParams().getStatus()));
  RegularExpression regularExpr=PatternFactory.eINSTANCE.createRegularExpression();
  Expression expression=CoreFactory.eINSTANCE.createExpression();
  String expr=mPage2.getNameText().getText();
  expression.setBody(expr);
  String cl=mPage2.getComboLang();
  expression.setLanguage(cl);
  regularExpr.setExpression(expression);
  pattern.getComponents().add(regularExpr);
  EMFUtil util=EMFSharedResources.getSharedEmfUtil();
  String fname=DqRepositoryViewService.createFilename(name,NewSourcePatternActionProvider.EXTENSION_PATTERN);
  IFolder folderResource=AbstractWizardPage.getConnectionParams().getFolderProvider().getFolderResource();
  IFile file=folderResource.getFile(fname);
  location=file.getFullPath();
  if (file.exists()) {
    log.error("String_Node_Str" + name + "String_Node_Str"+ file.getFullPath()+ "String_Node_Str");
    return false;
  }
  util.addPoolToResourceSet(file.getFullPath().toString(),pattern);
  util.saveLastResource();
  return true;
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  Pattern pattern=PatternFactory.eINSTANCE.createPattern();
  String name=AbstractWizardPage.getConnectionParams().getName();
  pattern.setName(name);
  TaggedValueHelper.setAuthor(pattern,AbstractWizardPage.getConnectionParams().getAuthor());
  TaggedValueHelper.setDescription(AbstractWizardPage.getConnectionParams().getDescription(),pattern);
  TaggedValueHelper.setPurpose(AbstractWizardPage.getConnectionParams().getPurpose(),pattern);
  TaggedValueHelper.setDevStatus(pattern,DevelopmentStatus.get(AbstractWizardPage.getConnectionParams().getStatus()));
  RegularExpression regularExpr=PatternFactory.eINSTANCE.createRegularExpression();
  Expression expression=CoreFactory.eINSTANCE.createExpression();
  String expr=mPage2.getNameText().getText();
  expression.setBody(expr);
  String cl=mPage2.getComboLang();
  expression.setLanguage(cl);
  regularExpr.setExpression(expression);
  regularExpr.setExpressionType(type.getName());
  pattern.getComponents().add(regularExpr);
  EMFUtil util=EMFSharedResources.getSharedEmfUtil();
  String fname=DqRepositoryViewService.createFilename(name,NewSourcePatternActionProvider.EXTENSION_PATTERN);
  IFolder folderResource=AbstractWizardPage.getConnectionParams().getFolderProvider().getFolderResource();
  IFile file=folderResource.getFile(fname);
  location=file.getFullPath();
  if (file.exists()) {
    log.error("String_Node_Str" + name + "String_Node_Str"+ file.getFullPath()+ "String_Node_Str");
    return false;
  }
  util.addPoolToResourceSet(file.getFullPath().toString(),pattern);
  util.saveLastResource();
  return true;
}