Program: 140379
Project: 140379
Buggy source:
protected IFile createEmptyAnalysisFile() throws DataprofilerCoreException {
  AnalysisBuilder analysisBuilder=new AnalysisBuilder();
  boolean analysisInitialized=analysisBuilder.initializeAnalysis(analysisName,analysisType);
  if (!analysisInitialized) {
    throw new DataprofilerCoreException(analysisName + "String_Node_Str");
  }
  Analysis analysis=analysisBuilder.getAnalysis();
  fillAnalysisBuilder(analysisBuilder);
  AnalysisWriter writer=new AnalysisWriter();
  TypedReturnCode<IFile> saved=writer.createAnalysisFile(analysis,folderResource);
  IFile file;
  if (saved.isOk()) {
    log.info("String_Node_Str" + folderResource.getFullPath().toString());
    file=saved.getObject();
    AnaResourceFileHelper.getInstance().clear();
    Resource anaResource=analysis.eResource();
    AnaResourceFileHelper.getInstance().register(file,anaResource);
    AnaResourceFileHelper.getInstance().setResourceChanged(true);
  }
 else {
    throw new DataprofilerCoreException("String_Node_Str" + folderResource.getFullPath().toString() + "String_Node_Str"+ saved.getMessage());
  }
  EList<Domain> dataFilters=analysisBuilder.getAnalysis().getParameters().getDataFilter();
  if ((parameter.getTableFilter() != null) && (!parameter.getTableFilter().equals(PluginConstant.EMPTY_STRING))) {
    DomainHelper.setDataFilterTablePattern(dataFilters,parameter.getTableFilter());
  }
  if ((parameter.getViewFilter() != null) && (!parameter.getViewFilter().equals(PluginConstant.EMPTY_STRING))) {
    DomainHelper.setDataFilterViewPattern(dataFilters,parameter.getViewFilter());
  }
  DependenciesHandler.getInstance().setDependencyOn(analysisBuilder.getAnalysis(),analysisBuilder.getAnalysis().getContext().getConnection());
  ReturnCode save=AnaResourceFileHelper.getInstance().save(analysisBuilder.getAnalysis());
  if (save.isOk()) {
    log.info("String_Node_Str" + analysisBuilder.getAnalysis().getFileName());
  }
  CorePlugin.getDefault().refreshWorkSpace();
  ((DQRespositoryView)CorePlugin.getDefault().findView(DQRespositoryView.ID)).getCommonViewer().refresh();
  return file;
}

Fixed version (ground truth):
protected IFile createEmptyAnalysisFile() throws DataprofilerCoreException {
  AnalysisBuilder analysisBuilder=new AnalysisBuilder();
  boolean analysisInitialized=analysisBuilder.initializeAnalysis(analysisName,analysisType);
  if (!analysisInitialized) {
    throw new DataprofilerCoreException(analysisName + "String_Node_Str");
  }
  Analysis analysis=analysisBuilder.getAnalysis();
  fillAnalysisBuilder(analysisBuilder);
  AnalysisWriter writer=new AnalysisWriter();
  TypedReturnCode<IFile> saved=writer.createAnalysisFile(analysis,folderResource);
  IFile file;
  if (saved.isOk()) {
    log.info("String_Node_Str" + folderResource.getFullPath().toString());
    file=saved.getObject();
    AnaResourceFileHelper.getInstance().clear();
    Resource anaResource=analysis.eResource();
    AnaResourceFileHelper.getInstance().register(file,anaResource);
    AnaResourceFileHelper.getInstance().setResourcesNumberChanged(true);
  }
 else {
    throw new DataprofilerCoreException("String_Node_Str" + folderResource.getFullPath().toString() + "String_Node_Str"+ saved.getMessage());
  }
  EList<Domain> dataFilters=analysisBuilder.getAnalysis().getParameters().getDataFilter();
  if ((parameter.getTableFilter() != null) && (!parameter.getTableFilter().equals(PluginConstant.EMPTY_STRING))) {
    DomainHelper.setDataFilterTablePattern(dataFilters,parameter.getTableFilter());
  }
  if ((parameter.getViewFilter() != null) && (!parameter.getViewFilter().equals(PluginConstant.EMPTY_STRING))) {
    DomainHelper.setDataFilterViewPattern(dataFilters,parameter.getViewFilter());
  }
  DependenciesHandler.getInstance().setDependencyOn(analysisBuilder.getAnalysis(),analysisBuilder.getAnalysis().getContext().getConnection());
  ReturnCode save=AnaResourceFileHelper.getInstance().save(analysisBuilder.getAnalysis());
  if (save.isOk()) {
    log.info("String_Node_Str" + analysisBuilder.getAnalysis().getFileName());
  }
  CorePlugin.getDefault().refreshWorkSpace();
  ((DQRespositoryView)CorePlugin.getDefault().findView(DQRespositoryView.ID)).getCommonViewer().refresh();
  return file;
}