Program: 137311
Project: 137311
Buggy source:
@Override protected void saveAnalysis() throws DataprofilerCoreException {
  for (  Domain domain : this.analysisItem.getAnalysis().getParameters().getDataFilter()) {
    domain.setName(this.analysisItem.getAnalysis().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));
    analysisItem.getAnalysis().getContext().setConnection(tdDataProvider);
    analysisItem.getAnalysis().getContext().setConnection(tdDataProvider);
    TypedReturnCode<Dependency> rc=DependenciesHandler.getInstance().setDependencyOn(analysisItem.getAnalysis(),tdDataProvider);
    if (!rc.isOk()) {
      log.info("String_Node_Str" + analysisItem.getAnalysis().getFileName());
    }
  }
 else {
    deleteConnectionDependency(analysisItem);
  }
  AnalysisBuilder anaBuilder=new AnalysisBuilder();
  anaBuilder.setAnalysis(this.analysisItem.getAnalysis());
  if (anaColumnCompareViewer.getCheckComputeButton().getSelection()) {
    analysisItem.getAnalysis().getParameters().getDeactivatedIndicators().add(rowMatchingIndicatorB);
  }
 else {
    analysisItem.getAnalysis().getParameters().getDeactivatedIndicators().clear();
  }
  anaBuilder.addElementsToAnalyze(analysedElements.toArray(new ModelElement[analysedElements.size()]),new Indicator[]{rowMatchingIndicatorA,rowMatchingIndicatorB});
  this.saveNumberOfConnectionsPerAnalysis();
  ReturnCode saved=new ReturnCode(false);
  this.nameText.setText(analysisItem.getAnalysis().getName());
  saved=ElementWriterFactory.getInstance().createAnalysisWrite().save(analysisItem,true);
  logSaved(saved);
  anaColumnCompareViewer.setDirty(false);
  dataFilterCompA.setDirty(false);
  dataFilterCompB.setDirty(false);
}

Fixed version (ground truth):
@Override protected void saveAnalysis() throws DataprofilerCoreException {
  for (  Domain domain : this.analysisItem.getAnalysis().getParameters().getDataFilter()) {
    domain.setName(this.analysisItem.getAnalysis().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));
    analysisItem.getAnalysis().getContext().setConnection(tdDataProvider);
    analysisItem.getAnalysis().getContext().setConnection(tdDataProvider);
    TypedReturnCode<Dependency> rc=DependenciesHandler.getInstance().setDependencyOn(analysisItem.getAnalysis(),tdDataProvider);
    if (!rc.isOk()) {
      log.info("String_Node_Str" + analysisItem.getAnalysis().getFileName());
    }
  }
 else {
    analysisItem.getAnalysis().getContext().setConnection(null);
  }
  AnalysisBuilder anaBuilder=new AnalysisBuilder();
  anaBuilder.setAnalysis(this.analysisItem.getAnalysis());
  if (anaColumnCompareViewer.getCheckComputeButton().getSelection()) {
    analysisItem.getAnalysis().getParameters().getDeactivatedIndicators().add(rowMatchingIndicatorB);
  }
 else {
    analysisItem.getAnalysis().getParameters().getDeactivatedIndicators().clear();
  }
  anaBuilder.addElementsToAnalyze(analysedElements.toArray(new ModelElement[analysedElements.size()]),new Indicator[]{rowMatchingIndicatorA,rowMatchingIndicatorB});
  this.saveNumberOfConnectionsPerAnalysis();
  ReturnCode saved=new ReturnCode(false);
  this.nameText.setText(analysisItem.getAnalysis().getName());
  saved=ElementWriterFactory.getInstance().createAnalysisWrite().save(analysisItem,true);
  logSaved(saved);
  anaColumnCompareViewer.setDirty(false);
  dataFilterCompA.setDirty(false);
  dataFilterCompB.setDirty(false);
}