Program: 138114
Project: 138114
Buggy source:
/** 
 * @param outputFolder
 * @throws DataprofilerCoreException
 */
public void saveAnalysis() throws DataprofilerCoreException {
  this.analysis.setName(this.analysis.getName().replace("String_Node_Str","String_Node_Str"));
  for (  Domain domain : this.analysis.getParameters().getDataFilter()) {
    domain.setName(this.analysis.getName());
  }
  IRepositoryViewObject reposObject=null;
  Connection tdProvider=null;
  correlationAnalysisHandler.clearAnalysis();
  columnSetMultiIndicator.getAnalyzedColumns().clear();
  Analysis analysis=correlationAnalysisHandler.getAnalysis();
  analysis.getParameters().setExecutionLanguage(ExecutionLanguage.get(execLang));
  correlationAnalysisHandler.setStringDataFilter(dataFilterComp.getDataFilterString());
  List<RepositoryNode> repositoryNodeList=treeViewer.getColumnSetMultiValueList();
  if (repositoryNodeList != null && repositoryNodeList.size() != 0) {
    reposObject=repositoryNodeList.get(0).getObject();
    tdProvider=((ConnectionItem)reposObject.getProperty().getItem()).getConnection();
    analysis.getContext().setConnection(tdProvider);
    List<TdColumn> columnLst=new ArrayList<TdColumn>();
    for (    RepositoryNode repNode : repositoryNodeList) {
      columnLst.add((TdColumn)((MetadataColumnRepositoryObject)repNode.getObject()).getTdColumn());
    }
    columnSetMultiIndicator.getAnalyzedColumns().addAll(columnLst);
    correlationAnalysisHandler.addIndicator(columnLst,columnSetMultiIndicator);
  }
 else {
    tdProvider=(Connection)analysis.getContext().getConnection();
    if (tdProvider != null && tdProvider.getSupplierDependency().size() > 0) {
      tdProvider.getSupplierDependency().get(0).getClient().remove(analysis);
      analysis.getContext().setConnection(null);
      analysis.getResults().getIndicators().clear();
    }
    ColumnsetFactory columnsetFactory=ColumnsetFactory.eINSTANCE;
    ColumnSetMultiValueIndicator columnSetMultiValueIndicator=null;
    if (ColumnsetPackage.eINSTANCE.getCountAvgNullIndicator() == columnSetMultiIndicator.eClass()) {
      columnSetMultiValueIndicator=columnsetFactory.createCountAvgNullIndicator();
    }
    if (ColumnsetPackage.eINSTANCE.getMinMaxDateIndicator() == columnSetMultiIndicator.eClass()) {
      columnSetMultiValueIndicator=columnsetFactory.createMinMaxDateIndicator();
    }
    if (ColumnsetPackage.eINSTANCE.getWeakCorrelationIndicator() == columnSetMultiIndicator.eClass()) {
      columnSetMultiValueIndicator=columnsetFactory.createWeakCorrelationIndicator();
    }
    fillSimpleIndicators(columnSetMultiValueIndicator);
    analysis.getResults().getIndicators().add(columnSetMultiValueIndicator);
    analysis.getClientDependency().clear();
  }
  String urlString=analysis.eResource() != null ? analysis.eResource().getURI().toFileString() : PluginConstant.EMPTY_STRING;
  this.updateAnalysisClientDependency();
  ReturnCode saved=new ReturnCode(false);
  IEditorInput editorInput=this.getEditorInput();
  if (editorInput instanceof AnalysisItemEditorInput) {
    AnalysisItemEditorInput analysisInput=(AnalysisItemEditorInput)editorInput;
    TDQAnalysisItem tdqAnalysisItem=analysisInput.getTDQAnalysisItem();
    tdqAnalysisItem.getProperty().setLabel(analysis.getName());
    this.nameText.setText(analysis.getName());
    saved=ElementWriterFactory.getInstance().createAnalysisWrite().save(tdqAnalysisItem);
  }
  if (saved.isOk()) {
    RepositoryNode node=RepositoryNodeHelper.recursiveFind(tdProvider);
    if (node != null) {
      ElementWriterFactory.getInstance().createDataProviderWriter().save(node.getObject().getProperty().getItem());
    }
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str" + urlString + "String_Node_Str");
    }
  }
 else {
    throw new DataprofilerCoreException(DefaultMessagesImpl.getString("String_Node_Str",analysis.getName(),urlString,saved.getMessage()));
  }
  treeViewer.setDirty(false);
  dataFilterComp.setDirty(false);
}

Fixed version (ground truth):
/** 
 * @param outputFolder
 * @throws DataprofilerCoreException
 */
public void saveAnalysis() throws DataprofilerCoreException {
  this.analysis.setName(this.analysis.getName().replace("String_Node_Str","String_Node_Str"));
  for (  Domain domain : this.analysis.getParameters().getDataFilter()) {
    domain.setName(this.analysis.getName());
  }
  IRepositoryViewObject reposObject=null;
  Connection tdProvider=null;
  correlationAnalysisHandler.clearAnalysis();
  columnSetMultiIndicator.getAnalyzedColumns().clear();
  Analysis analysis=correlationAnalysisHandler.getAnalysis();
  analysis.getParameters().setExecutionLanguage(ExecutionLanguage.get(execLang));
  correlationAnalysisHandler.setStringDataFilter(dataFilterComp.getDataFilterString());
  List<RepositoryNode> repositoryNodeList=treeViewer.getColumnSetMultiValueList();
  if (repositoryNodeList != null && repositoryNodeList.size() != 0) {
    reposObject=repositoryNodeList.get(0).getObject();
    tdProvider=((ConnectionItem)reposObject.getProperty().getItem()).getConnection();
    analysis.getContext().setConnection(tdProvider);
    List<TdColumn> columnLst=new ArrayList<TdColumn>();
    for (    RepositoryNode repNode : repositoryNodeList) {
      columnLst.add((TdColumn)((MetadataColumnRepositoryObject)repNode.getObject()).getTdColumn());
    }
    columnSetMultiIndicator.getAnalyzedColumns().addAll(columnLst);
    correlationAnalysisHandler.addIndicator(columnLst,columnSetMultiIndicator);
  }
 else {
    tdProvider=(Connection)analysis.getContext().getConnection();
    if (tdProvider != null && tdProvider.getSupplierDependency().size() > 0) {
      tdProvider.getSupplierDependency().get(0).getClient().remove(analysis);
      analysis.getContext().setConnection(null);
      analysis.getResults().getIndicators().clear();
    }
    ColumnsetFactory columnsetFactory=ColumnsetFactory.eINSTANCE;
    ColumnSetMultiValueIndicator columnSetMultiValueIndicator=null;
    if (ColumnsetPackage.eINSTANCE.getCountAvgNullIndicator() == columnSetMultiIndicator.eClass()) {
      columnSetMultiValueIndicator=columnsetFactory.createCountAvgNullIndicator();
    }
    if (ColumnsetPackage.eINSTANCE.getMinMaxDateIndicator() == columnSetMultiIndicator.eClass()) {
      columnSetMultiValueIndicator=columnsetFactory.createMinMaxDateIndicator();
    }
    if (ColumnsetPackage.eINSTANCE.getWeakCorrelationIndicator() == columnSetMultiIndicator.eClass()) {
      columnSetMultiValueIndicator=columnsetFactory.createWeakCorrelationIndicator();
    }
    fillSimpleIndicators(columnSetMultiValueIndicator);
    analysis.getResults().getIndicators().add(columnSetMultiValueIndicator);
    analysis.getClientDependency().clear();
  }
  String urlString=analysis.eResource() != null ? (analysis.eResource().getURI().isFile() ? analysis.eResource().getURI().toFileString() : analysis.eResource().getURI().toString()) : PluginConstant.EMPTY_STRING;
  this.updateAnalysisClientDependency();
  ReturnCode saved=new ReturnCode(false);
  IEditorInput editorInput=this.getEditorInput();
  if (editorInput instanceof AnalysisItemEditorInput) {
    AnalysisItemEditorInput analysisInput=(AnalysisItemEditorInput)editorInput;
    TDQAnalysisItem tdqAnalysisItem=analysisInput.getTDQAnalysisItem();
    tdqAnalysisItem.getProperty().setLabel(analysis.getName());
    this.nameText.setText(analysis.getName());
    saved=ElementWriterFactory.getInstance().createAnalysisWrite().save(tdqAnalysisItem);
  }
  if (saved.isOk()) {
    RepositoryNode node=RepositoryNodeHelper.recursiveFind(tdProvider);
    if (node != null) {
      ElementWriterFactory.getInstance().createDataProviderWriter().save(node.getObject().getProperty().getItem());
    }
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str" + urlString + "String_Node_Str");
    }
  }
 else {
    throw new DataprofilerCoreException(DefaultMessagesImpl.getString("String_Node_Str",analysis.getName(),urlString,saved.getMessage()));
  }
  treeViewer.setDirty(false);
  dataFilterComp.setDirty(false);
}