Program: 140376
Project: 140376
Buggy source:
/** 
 * @param outputFolder
 * @throws DataprofilerCoreException
 */
public void saveAnalysis() throws DataprofilerCoreException {
  analysisHandler.clearAnalysis();
  ColumnIndicator[] columnIndicators=treeViewer.getColumnIndicator();
  TdDataProvider tdProvider=null;
  Analysis analysis=analysisHandler.getAnalysis();
  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) {
      DqRepositoryViewService.saveOpenDataProvider(tdProvider);
    }
    AnaResourceFileHelper.getInstance().setResourceChanged(true);
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str" + urlString + "String_Node_Str");
    }
  }
 else {
    throw new DataprofilerCoreException("String_Node_Str" + analysis.getName() + "String_Node_Str"+ urlString+ "String_Node_Str"+ saved.getMessage());
  }
}

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();
  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) {
      DqRepositoryViewService.saveOpenDataProvider(tdProvider);
    }
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str" + urlString + "String_Node_Str");
    }
  }
 else {
    throw new DataprofilerCoreException("String_Node_Str" + analysis.getName() + "String_Node_Str"+ urlString+ "String_Node_Str"+ saved.getMessage());
  }
}