Program: 138313
Project: 138313
Buggy source:
@Override protected void saveAnalysis() throws DataprofilerCoreException {
  this.analysis.setName(this.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<ModelElement> analysedElements=new ArrayList<ModelElement>();
  anaColumnCompareViewer.setColumnABForMatchingIndicator(rowMatchingIndicatorA,anaColumnCompareViewer.getColumnListA(),anaColumnCompareViewer.getColumnListB());
  anaColumnCompareViewer.setColumnABForMatchingIndicator(rowMatchingIndicatorB,anaColumnCompareViewer.getColumnListB(),anaColumnCompareViewer.getColumnListA());
  Connection tdDataProvider=null;
  for (int i=0; i < anaColumnCompareViewer.getColumnListA().size(); i++) {
    reposObject=anaColumnCompareViewer.getColumnListA().get(i).getObject();
    analysedElements.add(((MetadataColumnRepositoryObject)reposObject).getTdColumn());
  }
  for (int i=0; i < anaColumnCompareViewer.getColumnListB().size(); i++) {
    reposObject=anaColumnCompareViewer.getColumnListB().get(i).getObject();
    analysedElements.add(((MetadataColumnRepositoryObject)reposObject).getTdColumn());
  }
  if (analysedElements.size() > 0) {
    tdDataProvider=ConnectionHelper.getTdDataProvider((TdColumn)analysedElements.get(0));
    analysis.getContext().setConnection(tdDataProvider);
    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().get(0).getClient().remove(analysis);
      analysis.getContext().setConnection(null);
      analysis.getClientDependency().clear();
    }
  }
  AnalysisBuilder anaBuilder=new AnalysisBuilder();
  anaBuilder.setAnalysis(this.analysis);
  if (anaColumnCompareViewer.getCheckComputeButton().getSelection()) {
    analysis.getParameters().getDeactivatedIndicators().add(rowMatchingIndicatorB);
  }
 else {
    analysis.getParameters().getDeactivatedIndicators().clear();
  }
  anaBuilder.addElementsToAnalyze(analysedElements.toArray(new ModelElement[analysedElements.size()]),new Indicator[]{rowMatchingIndicatorA,rowMatchingIndicatorB});
  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 {
  this.analysis.setName(this.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<ModelElement> analysedElements=new ArrayList<ModelElement>();
  anaColumnCompareViewer.setColumnABForMatchingIndicator(rowMatchingIndicatorA,anaColumnCompareViewer.getColumnListA(),anaColumnCompareViewer.getColumnListB());
  anaColumnCompareViewer.setColumnABForMatchingIndicator(rowMatchingIndicatorB,anaColumnCompareViewer.getColumnListB(),anaColumnCompareViewer.getColumnListA());
  Connection tdDataProvider=null;
  for (int i=0; i < anaColumnCompareViewer.getColumnListA().size(); i++) {
    reposObject=anaColumnCompareViewer.getColumnListA().get(i).getObject();
    analysedElements.add(((MetadataColumnRepositoryObject)reposObject).getTdColumn());
  }
  for (int i=0; i < anaColumnCompareViewer.getColumnListB().size(); i++) {
    reposObject=anaColumnCompareViewer.getColumnListB().get(i).getObject();
    analysedElements.add(((MetadataColumnRepositoryObject)reposObject).getTdColumn());
  }
  if (analysedElements.size() > 0) {
    tdDataProvider=ConnectionHelper.getTdDataProvider((TdColumn)analysedElements.get(0));
    analysis.getContext().setConnection(tdDataProvider);
    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().get(0).getClient().remove(analysis);
      analysis.getContext().setConnection(null);
      analysis.getClientDependency().clear();
    }
  }
  AnalysisBuilder anaBuilder=new AnalysisBuilder();
  anaBuilder.setAnalysis(this.analysis);
  if (anaColumnCompareViewer.getCheckComputeButton().getSelection()) {
    analysis.getParameters().getDeactivatedIndicators().add(rowMatchingIndicatorB);
  }
 else {
    analysis.getParameters().getDeactivatedIndicators().clear();
  }
  anaBuilder.addElementsToAnalyze(analysedElements.toArray(new ModelElement[analysedElements.size()]),new Indicator[]{rowMatchingIndicatorA,rowMatchingIndicatorB});
  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());
  }
}