Program: 139944
Project: 139944
Buggy source:
/** 
 * @param outputFolder
 * @throws DataprofilerCoreException
 */
public void saveAnalysis() throws DataprofilerCoreException {
  analysisHandler.clearAnalysis();
  ColumnIndicator[] columnIndicators=treeViewer.getColumnIndicator();
  TdDataProvider tdProvider=null;
  Analysis analysis=analysisHandler.getAnalysis();
  analysis.getParameters().setExecutionLanguage(ExecutionLanguage.get(execLang));
  if (columnIndicators != null) {
    if (columnIndicators.length != 0) {
      tdProvider=EObjectHelper.getTdDataProvider(columnIndicators[0].getTdColumn());
      analysis.getContext().setConnection(tdProvider);
    }
    for (    ColumnIndicator columnIndicator : columnIndicators) {
      analysisHandler.addIndicator(columnIndicator.getTdColumn(),columnIndicator.getIndicators());
      DataminingType type=MetadataHelper.getDataminingType(columnIndicator.getTdColumn());
      if (type == null) {
        type=MetadataHelper.getDefaultDataminingType(columnIndicator.getTdColumn().getJavaType());
      }
      analysisHandler.setDatamingType(type.getLiteral(),columnIndicator.getTdColumn());
    }
  }
  analysisHandler.setStringDataFilter(dataFilterComp.getDataFilterString());
  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 {
  analysisHandler.clearAnalysis();
  ColumnIndicator[] columnIndicators=treeViewer.getColumnIndicator();
  TdDataProvider tdProvider=null;
  Analysis analysis=analysisHandler.getAnalysis();
  analysis.getParameters().setExecutionLanguage(ExecutionLanguage.get(execLang));
  if (columnIndicators != null && columnIndicators.length != 0) {
    tdProvider=DataProviderHelper.getTdDataProvider(columnIndicators[0].getTdColumn());
    analysis.getContext().setConnection(tdProvider);
    for (    ColumnIndicator columnIndicator : columnIndicators) {
      analysisHandler.addIndicator(columnIndicator.getTdColumn(),columnIndicator.getIndicators());
      DataminingType type=MetadataHelper.getDataminingType(columnIndicator.getTdColumn());
      if (type == null) {
        type=MetadataHelper.getDefaultDataminingType(columnIndicator.getTdColumn().getJavaType());
      }
      analysisHandler.setDatamingType(type.getLiteral(),columnIndicator.getTdColumn());
    }
  }
 else {
    analysis.getContext().setConnection(null);
    analysis.getClientDependency().clear();
  }
  analysisHandler.setStringDataFilter(dataFilterComp.getDataFilterString());
  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);
}