Program: 138310
Project: 138310
Buggy source:
@Override protected void saveAnalysis() throws DataprofilerCoreException {
  analysis.setName(analysis.getName().replace("String_Node_Str","String_Node_Str"));
  for (  Domain domain : this.analysis.getParameters().getDataFilter()) {
    domain.setName(this.analysis.getName());
  }
  IRepositoryViewObject reposObject=null;
  getAnalysisHandler().clearAnalysis();
  List<RepositoryNode> columnListAANode=anaColumnCompareViewer.getColumnListA();
  List<RepositoryNode> columnListBBNode=anaColumnCompareViewer.getColumnListB();
  AnalysisBuilder anaBuilder=new AnalysisBuilder();
  anaBuilder.setAnalysis(this.analysis);
  Connection tdDataProvider=null;
  for (int i=0; i < columnListAANode.size(); i++) {
    if (columnListBBNode.size() > i) {
      ColumnDependencyIndicator indicator=ColumnsetFactory.eINSTANCE.createColumnDependencyIndicator();
      TdColumn columnA=(TdColumn)((MetadataColumnRepositoryObject)columnListAANode.get(i).getObject()).getTdColumn();
      TdColumn columnB=(TdColumn)((MetadataColumnRepositoryObject)columnListBBNode.get(i).getObject()).getTdColumn();
      indicator.setColumnA(columnA);
      indicator.setColumnB(columnB);
      indicator.setIndicatorDefinition(DefinitionHandler.getInstance().getFDRuleDefaultIndicatorDefinition());
      analysis.getResults().getIndicators().add(indicator);
      anaBuilder.addElementToAnalyze(columnA,indicator);
      anaBuilder.addElementToAnalyze(columnB,indicator);
    }
  }
  if (columnListAANode.size() > 0) {
    reposObject=columnListAANode.get(0).getObject();
    tdDataProvider=((ConnectionItem)reposObject.getProperty().getItem()).getConnection();
    analysis.getContext().setConnection(tdDataProvider);
    TypedReturnCode<Dependency> rc=DependenciesHandler.getInstance().setDependencyOn(analysis,tdDataProvider);
    if (!rc.isOk()) {
      log.info("String_Node_Str" + analysis.getFileName());
    }
  }
 else {
    tdDataProvider=(Connection)analysis.getContext().getConnection();
    if (tdDataProvider != null && tdDataProvider.getSupplierDependency().size() > 0) {
      tdDataProvider.getSupplierDependency().get(0).getClient().remove(analysis);
      analysis.getContext().setConnection(null);
      analysis.getClientDependency().clear();
    }
  }
  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(tdDataProvider);
    if (node != null) {
      ElementWriterFactory.getInstance().createDataProviderWriter().save(node.getObject().getProperty().getItem());
    }
    log.info("String_Node_Str" + analysis.getFileName());
  }
}

Fixed version (ground truth):
@Override protected void saveAnalysis() throws DataprofilerCoreException {
  analysis.setName(analysis.getName().replace("String_Node_Str","String_Node_Str"));
  for (  Domain domain : this.analysis.getParameters().getDataFilter()) {
    domain.setName(this.analysis.getName());
  }
  IRepositoryViewObject reposObject=null;
  getAnalysisHandler().clearAnalysis();
  List<RepositoryNode> columnListAANode=anaColumnCompareViewer.getColumnListA();
  List<RepositoryNode> columnListBBNode=anaColumnCompareViewer.getColumnListB();
  AnalysisBuilder anaBuilder=new AnalysisBuilder();
  anaBuilder.setAnalysis(this.analysis);
  Connection tdDataProvider=null;
  for (int i=0; i < columnListAANode.size(); i++) {
    if (columnListBBNode.size() > i) {
      ColumnDependencyIndicator indicator=ColumnsetFactory.eINSTANCE.createColumnDependencyIndicator();
      TdColumn columnA=(TdColumn)((MetadataColumnRepositoryObject)columnListAANode.get(i).getObject()).getTdColumn();
      TdColumn columnB=(TdColumn)((MetadataColumnRepositoryObject)columnListBBNode.get(i).getObject()).getTdColumn();
      indicator.setColumnA(columnA);
      indicator.setColumnB(columnB);
      indicator.setIndicatorDefinition(DefinitionHandler.getInstance().getFDRuleDefaultIndicatorDefinition());
      analysis.getResults().getIndicators().add(indicator);
      anaBuilder.addElementToAnalyze(columnA,indicator);
      anaBuilder.addElementToAnalyze(columnB,indicator);
    }
  }
  if (columnListAANode.size() > 0) {
    reposObject=columnListAANode.get(0).getObject();
    tdDataProvider=((ConnectionItem)reposObject.getProperty().getItem()).getConnection();
    analysis.getContext().setConnection(tdDataProvider);
    TypedReturnCode<Dependency> rc=DependenciesHandler.getInstance().setDependencyOn(analysis,tdDataProvider);
    if (!rc.isOk()) {
      log.info("String_Node_Str" + analysis.getFileName());
    }
  }
 else {
    tdDataProvider=(Connection)analysis.getContext().getConnection();
    if (tdDataProvider != null && tdDataProvider.getSupplierDependency().size() > 0) {
      tdDataProvider.getSupplierDependency().get(0).getClient().remove(analysis);
      analysis.getContext().setConnection(null);
      analysis.getClientDependency().clear();
    }
  }
  this.updateAnalysisClientDependency();
  ReturnCode saved=new ReturnCode(false);
  IEditorInput editorInput=this.getEditorInput();
  if (editorInput instanceof AnalysisItemEditorInput) {
    AnalysisItemEditorInput analysisInput=(AnalysisItemEditorInput)editorInput;
    TDQAnalysisItem tdqAnalysisItem=analysisInput.getTDQAnalysisItem();
    if (tdqAnalysisItem.eIsProxy()) {
      tdqAnalysisItem=(TDQAnalysisItem)EObjectHelper.resolveObject(tdqAnalysisItem);
    }
    tdqAnalysisItem.getProperty().setLabel(analysis.getName());
    this.nameText.setText(analysis.getName());
    saved=ElementWriterFactory.getInstance().createAnalysisWrite().save(tdqAnalysisItem);
  }
  if (saved.isOk()) {
    RepositoryNode node=RepositoryNodeHelper.recursiveFind(tdDataProvider);
    if (node != null) {
      ElementWriterFactory.getInstance().createDataProviderWriter().save(node.getObject().getProperty().getItem());
    }
    log.info("String_Node_Str" + analysis.getFileName());
  }
}