Program: 139942
Project: 139942
Buggy source:
/** 
 * @param outputFolder
 * @throws DataprofilerCoreException
 */
public void saveAnalysis() throws DataprofilerCoreException {
  correlationAnalysisHandler.clearAnalysis();
  columnSetMultiIndicator.getAnalyzedColumns().clear();
  Analysis analysis=correlationAnalysisHandler.getAnalysis();
  analysis.getParameters().setExecutionLanguage(ExecutionLanguage.get(execLang));
  correlationAnalysisHandler.setStringDataFilter(dataFilterComp.getDataFilterString());
  List<Column> columnSetMultiValueList=treeViewer.getColumnSetMultiValueList();
  TdDataProvider tdProvider=null;
  if (columnSetMultiValueList != null) {
    if (columnSetMultiValueList.size() != 0) {
      tdProvider=DataProviderHelper.getTdDataProvider(SwitchHelpers.COLUMN_SWITCH.doSwitch(columnSetMultiValueList.get(0)));
      analysis.getContext().setConnection(tdProvider);
      columnSetMultiIndicator.getAnalyzedColumns().addAll(columnSetMultiValueList);
    }
    correlationAnalysisHandler.addIndicator(columnSetMultiValueList,columnSetMultiIndicator);
  }
  String urlString=analysis.eResource() != null ? analysis.eResource().getURI().toFileString() : PluginConstant.EMPTY_STRING;
  ReturnCode saved=AnaResourceFileHelper.getInstance().save(analysis);
  if (saved.isOk()) {
    if (tdProvider != null) {
      PrvResourceFileHelper.getInstance().save(tdProvider);
    }
    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 {
  correlationAnalysisHandler.clearAnalysis();
  columnSetMultiIndicator.getAnalyzedColumns().clear();
  Analysis analysis=correlationAnalysisHandler.getAnalysis();
  analysis.getParameters().setExecutionLanguage(ExecutionLanguage.get(execLang));
  correlationAnalysisHandler.setStringDataFilter(dataFilterComp.getDataFilterString());
  List<Column> columnList=treeViewer.getColumnSetMultiValueList();
  TdDataProvider tdProvider=null;
  if (columnList != null && columnList.size() != 0) {
    tdProvider=DataProviderHelper.getTdDataProvider(SwitchHelpers.COLUMN_SWITCH.doSwitch(columnList.get(0)));
    analysis.getContext().setConnection(tdProvider);
    columnSetMultiIndicator.getAnalyzedColumns().addAll(columnList);
    correlationAnalysisHandler.addIndicator(columnList,columnSetMultiIndicator);
  }
 else {
    analysis.getContext().setConnection(null);
    analysis.getClientDependency().clear();
  }
  String urlString=analysis.eResource() != null ? analysis.eResource().getURI().toFileString() : PluginConstant.EMPTY_STRING;
  ReturnCode saved=AnaResourceFileHelper.getInstance().save(analysis);
  if (saved.isOk()) {
    if (tdProvider != null) {
      PrvResourceFileHelper.getInstance().save(tdProvider);
    }
    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);
}