Program: 137307
Project: 137307
Buggy source:
/** 
 * @param outputFolder
 * @throws DataprofilerCoreException
 */
@Override public void saveAnalysis() throws DataprofilerCoreException {
  for (  Domain domain : this.analysisItem.getAnalysis().getParameters().getDataFilter()) {
    domain.setName(this.analysisItem.getAnalysis().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 {
    deleteConnectionDependency(analysisItem);
    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);
  }
  this.saveNumberOfConnectionsPerAnalysis();
  ReturnCode saved=new ReturnCode(false);
  this.nameText.setText(analysis.getName());
  saved=ElementWriterFactory.getInstance().createAnalysisWrite().save(analysisItem,true);
  logSaved(saved);
  treeViewer.setDirty(false);
  dataFilterComp.setDirty(false);
}

Fixed version (ground truth):
/** 
 * @param outputFolder
 * @throws DataprofilerCoreException
 */
@Override public void saveAnalysis() throws DataprofilerCoreException {
  for (  Domain domain : this.analysisItem.getAnalysis().getParameters().getDataFilter()) {
    domain.setName(this.analysisItem.getAnalysis().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 {
    analysis.getContext().setConnection(null);
    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);
  }
  this.saveNumberOfConnectionsPerAnalysis();
  ReturnCode saved=new ReturnCode(false);
  this.nameText.setText(analysis.getName());
  saved=ElementWriterFactory.getInstance().createAnalysisWrite().save(analysisItem,true);
  logSaved(saved);
  treeViewer.setDirty(false);
  dataFilterComp.setDirty(false);
}