nus-yam/ex-repair huggingface dataset:
Program: 138400
Project: 138400
Buggy source:
@Override protected void removeItemBranch(TreeItem item){
  IndicatorUnit unit=(IndicatorUnit)item.getData(INDICATOR_UNIT_KEY);
  ModelElementIndicator meIndicator=(ModelElementIndicator)item.getData(MODELELEMENT_INDICATOR_KEY);
  deleteColumnItems(meIndicator.getModelElementRepositoryNode());
  deleteModelElementItems(meIndicator);
  if (null != unit) {
    meIndicator.removeIndicatorUnit(unit);
    masterPage.getAllMatchIndicator().getCompositeRegexMatchingIndicators().remove(unit.getIndicator());
    masterPage.updateIndicatorSection();
  }
  updateBindConnection(masterPage,tree);
  super.removeItemBranch(item);
  enabledButtons(false);
  tree.setFocus();
}

Fixed version (ground truth):
@Override protected void removeItemBranch(TreeItem item){
  IndicatorUnit unit=(IndicatorUnit)item.getData(INDICATOR_UNIT_KEY);
  ModelElementIndicator meIndicator=(ModelElementIndicator)item.getData(MODELELEMENT_INDICATOR_KEY);
  deleteColumnItems(meIndicator.getModelElementRepositoryNode());
  deleteModelElementItems(meIndicator);
  if (null != unit) {
    meIndicator.removeIndicatorUnit(unit);
    masterPage.getAllMatchIndicator().getCompositeRegexMatchingIndicators().remove(unit.getIndicator());
    masterPage.updateIndicatorSection();
  }
  super.removeItemBranch(item);
  updateBindConnection(masterPage,tree);
  enabledButtons(false);
  tree.setFocus();
}
Program: 138401
Project: 138401
Buggy source:
public 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());
  }
  if (isConnectionAnalysis()) {
    AnalysisHelper.setReloadDatabases(analysis,reloadDatabasesBtn.getSelection());
  }
  EList<Domain> dataFilters=analysis.getParameters().getDataFilter();
  if (!this.tableFilterText.getText().equals(latestTableFilterValue)) {
    DomainHelper.setDataFilterTablePattern(dataFilters,tableFilterText.getText());
    latestTableFilterValue=this.tableFilterText.getText();
  }
  if (!this.viewFilterText.getText().equals(latestViewFilterValue)) {
    DomainHelper.setDataFilterViewPattern(dataFilters,viewFilterText.getText());
    latestViewFilterValue=this.viewFilterText.getText();
  }
  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()) {
    log.info("String_Node_Str" + analysis.getFileName());
  }
}

Fixed version (ground truth):
public void saveAnalysis() throws DataprofilerCoreException {
  this.analysis.setName(this.analysis.getName().replace("String_Node_Str","String_Node_Str"));
  if (isConnectionAnalysis()) {
    AnalysisHelper.setReloadDatabases(analysis,reloadDatabasesBtn.getSelection());
  }
  EList<Domain> dataFilters=analysis.getParameters().getDataFilter();
  if (!this.tableFilterText.getText().equals(DomainHelper.getTablePattern(dataFilters))) {
    DomainHelper.setDataFilterTablePattern(dataFilters,tableFilterText.getText());
    latestTableFilterValue=this.tableFilterText.getText();
  }
  if (!this.viewFilterText.getText().equals(DomainHelper.getViewPattern(dataFilters))) {
    DomainHelper.setDataFilterViewPattern(dataFilters,viewFilterText.getText());
    latestViewFilterValue=this.viewFilterText.getText();
  }
  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()) {
    log.info("String_Node_Str" + analysis.getFileName());
  }
}
Program: 138402
Project: 138402
Buggy source:
public Color getBackground(Object element,int columnIndex){
  if (element instanceof OverviewIndUIElement) {
    SchemaIndicator indicator=(SchemaIndicator)((OverviewIndUIElement)element).getOverviewIndicator();
    if (indicator.getTableRowCount() == 0) {
      return zeroRowColor;
    }
  }
  return null;
}

Fixed version (ground truth):
public Color getBackground(Object element,int columnIndex){
  if (element instanceof OverviewIndUIElement) {
    SchemaIndicator indicator=(SchemaIndicator)((OverviewIndUIElement)element).getOverviewIndicator();
    if (indicator.getTableRowCount() == 0 && indicator.getViewCount() == 0) {
      return zeroRowColor;
    }
  }
  return null;
}
Program: 138403
Project: 138403
Buggy source:
public void modifyText(ModifyEvent e){
  getParameter().setName(nameText.getText());
  setPageComplete(nameText.getText() != null && !"String_Node_Str".equals(nameText.getText().trim()));
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
  getParameter().setName(nameText.getText());
  String text=nameText.getText();
  setPageComplete(text != null && !"String_Node_Str".equals(text.trim()) && !text.contains("String_Node_Str"));
}
Program: 138404
Project: 138404
Buggy source:
@Override protected void addListeners(){
  super.addListeners();
  this.nameText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      getParameter().setName(nameText.getText());
      setPageComplete(nameText.getText() != null && !"String_Node_Str".equals(nameText.getText().trim()));
    }
  }
);
}

Fixed version (ground truth):
@Override protected void addListeners(){
  super.addListeners();
  this.nameText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      getParameter().setName(nameText.getText());
      String text=nameText.getText();
      setPageComplete(text != null && !"String_Node_Str".equals(text.trim()) && !text.contains("String_Node_Str"));
    }
  }
);
}
Program: 138405
Project: 138405
Buggy source:
private void setPropertyMetadata(ModelElement modelElement,Property property){
  String purpose=MetadataHelper.getPurpose(modelElement);
  String description=MetadataHelper.getDescription(modelElement);
  String version=MetadataHelper.getVersion(modelElement);
  String status=MetadataHelper.getDevStatus(modelElement);
  property.setId(EcoreUtil.generateUUID());
  if (SwitchHelpers.DELIMITEDFILECONNECTION_SWITCH.doSwitch(modelElement) == null) {
    property.setLabel(WorkspaceUtils.normalize(modelElement.getName()));
  }
  property.setPurpose(purpose);
  property.setDescription(description);
  property.setStatusCode(status);
  property.setVersion(version);
  List<Information> informations=ListUtils.castList(Information.class,property.getInformations());
  InformationLevel maxLevel=null;
  for (  Information information : informations) {
    int value=information.getLevel().getValue();
    if (maxLevel == null || value > maxLevel.getValue()) {
      maxLevel=information.getLevel();
    }
  }
  property.setMaxInformationLevel(maxLevel);
}

Fixed version (ground truth):
private void setPropertyMetadata(ModelElement modelElement,Property property){
  String purpose=MetadataHelper.getPurpose(modelElement);
  String description=MetadataHelper.getDescription(modelElement);
  String version=MetadataHelper.getVersion(modelElement);
  String status=MetadataHelper.getDevStatus(modelElement);
  if (property.getId() == null) {
    property.setId(EcoreUtil.generateUUID());
  }
  if (SwitchHelpers.DELIMITEDFILECONNECTION_SWITCH.doSwitch(modelElement) == null) {
    property.setLabel(WorkspaceUtils.normalize(modelElement.getName()));
  }
  property.setPurpose(purpose);
  property.setDescription(description);
  property.setStatusCode(status);
  property.setVersion(version);
  List<Information> informations=ListUtils.castList(Information.class,property.getInformations());
  InformationLevel maxLevel=null;
  for (  Information information : informations) {
    int value=information.getLevel().getValue();
    if (maxLevel == null || value > maxLevel.getValue()) {
      maxLevel=information.getLevel();
    }
  }
  property.setMaxInformationLevel(maxLevel);
}
Program: 138407
Project: 138407
Buggy source:
protected abstract ReturnCode canSave();

Fixed version (ground truth):
public abstract ReturnCode canSave();
Program: 138408
Project: 138408
Buggy source:
@Override protected ReturnCode canSave(){
  this.nameText.setText(this.nameText.getText().replace("String_Node_Str","String_Node_Str"));
  if (this.nameText.getText().length() == 0) {
    this.nameText.setText(this.analysis.getName());
    return new ReturnCode(DefaultMessagesImpl.getString("String_Node_Str"),false);
  }
  String elementName=this.nameText.getText();
  List<IRepositoryNode> childrensname=this.analysisRepNode.getParent().getChildren();
  for (  IRepositoryNode children : childrensname) {
    if (elementName.equals(this.analysis.getName())) {
      return new ReturnCode(true);
    }
 else     if (elementName.equals((children.getLabel() + "String_Node_Str").replace("String_Node_Str","String_Node_Str"))) {
      this.nameText.setText(this.analysis.getName());
      return new ReturnCode(DefaultMessagesImpl.getString("String_Node_Str"),false);
    }
  }
  return new ReturnCode(true);
}

Fixed version (ground truth):
@Override public ReturnCode canSave(){
  this.nameText.setText(this.nameText.getText().replace("String_Node_Str","String_Node_Str"));
  if (this.nameText.getText().length() == 0) {
    this.nameText.setText(this.analysis.getName());
    return new ReturnCode(DefaultMessagesImpl.getString("String_Node_Str"),false);
  }
  String elementName=this.nameText.getText();
  List<IRepositoryNode> childrensname=this.analysisRepNode.getParent().getChildren();
  for (  IRepositoryNode children : childrensname) {
    if (elementName.equals(this.analysis.getName())) {
      return new ReturnCode(true);
    }
 else     if (elementName.equals((children.getLabel() + "String_Node_Str").replace("String_Node_Str","String_Node_Str"))) {
      this.nameText.setText(this.analysis.getName());
      return new ReturnCode(DefaultMessagesImpl.getString("String_Node_Str"),false);
    }
  }
  return new ReturnCode(true);
}
Program: 138409
Project: 138409
Buggy source:
@Override protected ReturnCode canSave(){
  ReturnCode canModRetCode=canModifyAnalysisName();
  if (!canModRetCode.isOk()) {
    return canModRetCode;
  }
  String message=null;
  List<RepositoryNode> columnSetMultiValueList=getTreeViewer().getColumnSetMultiValueList();
  if (!columnSetMultiValueList.isEmpty()) {
    List<RepositoryNode> nodes=treeViewer.getColumnSetMultiValueList();
    if (ColumnsetPackage.eINSTANCE.getCountAvgNullIndicator() == columnSetMultiIndicator.eClass() || ColumnsetPackage.eINSTANCE.getMinMaxDateIndicator() == columnSetMultiIndicator.eClass()) {
      message=verifyColumn(nodes,columnSetMultiIndicator.eClass());
    }
 else     if (ColumnsetPackage.eINSTANCE.getWeakCorrelationIndicator() == columnSetMultiIndicator.eClass()) {
      List<DBColumnRepNode> columnNodes=RepositoryNodeHelper.getColumnNodeList(nodes.toArray());
      for (      DBColumnRepNode columNode : columnNodes) {
        TdColumn tdColumn=columNode.getTdColumn();
        if (correlationAnalysisHandler.getDatamingType(tdColumn) != DataminingType.NOMINAL) {
          message=DefaultMessagesImpl.getString("String_Node_Str");
          break;
        }
      }
    }
  }
  if (message == null) {
    return new ReturnCode(true);
  }
  return new ReturnCode(message,false);
}

Fixed version (ground truth):
@Override public ReturnCode canSave(){
  ReturnCode canModRetCode=canModifyAnalysisName();
  if (!canModRetCode.isOk()) {
    return canModRetCode;
  }
  String message=null;
  List<RepositoryNode> columnSetMultiValueList=getTreeViewer().getColumnSetMultiValueList();
  if (!columnSetMultiValueList.isEmpty()) {
    List<RepositoryNode> nodes=treeViewer.getColumnSetMultiValueList();
    if (ColumnsetPackage.eINSTANCE.getCountAvgNullIndicator() == columnSetMultiIndicator.eClass() || ColumnsetPackage.eINSTANCE.getMinMaxDateIndicator() == columnSetMultiIndicator.eClass()) {
      message=verifyColumn(nodes,columnSetMultiIndicator.eClass());
    }
 else     if (ColumnsetPackage.eINSTANCE.getWeakCorrelationIndicator() == columnSetMultiIndicator.eClass()) {
      List<DBColumnRepNode> columnNodes=RepositoryNodeHelper.getColumnNodeList(nodes.toArray());
      for (      DBColumnRepNode columNode : columnNodes) {
        TdColumn tdColumn=columNode.getTdColumn();
        if (correlationAnalysisHandler.getDatamingType(tdColumn) != DataminingType.NOMINAL) {
          message=DefaultMessagesImpl.getString("String_Node_Str");
          break;
        }
      }
    }
  }
  if (message == null) {
    return new ReturnCode(true);
  }
  return new ReturnCode(message,false);
}
Program: 138410
Project: 138410
Buggy source:
@Override protected ReturnCode canSave(){
  return validator(columnListA,columnListB);
}

Fixed version (ground truth):
@Override public ReturnCode canSave(){
  return validator(columnListA,columnListB);
}
Program: 138411
Project: 138411
Buggy source:
@Override protected ReturnCode canSave(){
  ReturnCode canModRetCode=canModifyAnalysisName();
  if (!canModRetCode.isOk()) {
    return canModRetCode;
  }
  ReturnCode checkMdmExecutionEngine=checkMdmExecutionEngine();
  if (!checkMdmExecutionEngine.isOk()) {
    return checkMdmExecutionEngine;
  }
  List<ModelElement> analyzedElement=new ArrayList<ModelElement>();
  for (  ModelElementIndicator modelElementIndicator : treeViewer.getModelElementIndicator()) {
    IRepositoryViewObject modelElementRepositoryObj=modelElementIndicator.getModelElementRepositoryNode().getObject();
    if (modelElementRepositoryObj instanceof MetadataColumnRepositoryObject) {
      analyzedElement.add(((MetadataColumnRepositoryObject)modelElementRepositoryObj).getTdColumn());
    }
  }
  if (!analyzedElement.isEmpty()) {
    if (!ModelElementHelper.isFromSameTable(analyzedElement) && !"String_Node_Str".equals(dataFilterComp.getDataFilterString())) {
      return new ReturnCode(DefaultMessagesImpl.getString("String_Node_Str"),false);
    }
  }
  return new ReturnCode(true);
}

Fixed version (ground truth):
@Override public ReturnCode canSave(){
  ReturnCode canModRetCode=canModifyAnalysisName();
  if (!canModRetCode.isOk()) {
    return canModRetCode;
  }
  ReturnCode checkMdmExecutionEngine=checkMdmExecutionEngine();
  if (!checkMdmExecutionEngine.isOk()) {
    return checkMdmExecutionEngine;
  }
  List<ModelElement> analyzedElement=new ArrayList<ModelElement>();
  for (  ModelElementIndicator modelElementIndicator : treeViewer.getModelElementIndicator()) {
    IRepositoryViewObject modelElementRepositoryObj=modelElementIndicator.getModelElementRepositoryNode().getObject();
    if (modelElementRepositoryObj instanceof MetadataColumnRepositoryObject) {
      analyzedElement.add(((MetadataColumnRepositoryObject)modelElementRepositoryObj).getTdColumn());
    }
  }
  if (!analyzedElement.isEmpty()) {
    if (!ModelElementHelper.isFromSameTable(analyzedElement) && !"String_Node_Str".equals(dataFilterComp.getDataFilterString())) {
      return new ReturnCode(DefaultMessagesImpl.getString("String_Node_Str"),false);
    }
  }
  return new ReturnCode(true);
}
Program: 138412
Project: 138412
Buggy source:
@Override protected ReturnCode canRun(){
  List<IRepositoryNode> columnSetMultiValueList=this.treeViewer.getColumnSetMultiValueList();
  ReturnCode canSave=canSave();
  if (!canSave.isOk()) {
    return canSave;
  }
  if (columnSetMultiValueList.isEmpty()) {
    return new ReturnCode(DefaultMessagesImpl.getString("String_Node_Str"),false);
  }
  resetResultPageData();
  return new ReturnCode(true);
}

Fixed version (ground truth):
@Override protected ReturnCode canRun(){
  List<IRepositoryNode> columnSetMultiValueList=this.treeViewer.getColumnSetMultiValueList();
  if (columnSetMultiValueList.isEmpty()) {
    return new ReturnCode(DefaultMessagesImpl.getString("String_Node_Str"),false);
  }
  resetResultPageData();
  return new ReturnCode(true);
}
Program: 138413
Project: 138413
Buggy source:
@Override protected ReturnCode canSave(){
  ReturnCode canModRetCode=canModifyAnalysisName();
  if (!canModRetCode.isOk()) {
    return canModRetCode;
  }
  String message=null;
  List<IRepositoryNode> columnSetMultiValueList=this.treeViewer.getColumnSetMultiValueList();
  List<ModelElement> columnList=new ArrayList<ModelElement>();
  Set<EObject> nodeTypeName=new HashSet<EObject>();
  for (  IRepositoryNode rd : columnSetMultiValueList) {
    ModelElement modelElementFromRepositoryNode=RepositoryNodeHelper.getModelElementFromRepositoryNode(rd);
    EObject eContainer=modelElementFromRepositoryNode.eContainer();
    nodeTypeName.add(eContainer);
    columnList.add(RepositoryNodeHelper.getModelElementFromRepositoryNode(rd));
  }
  if (nodeTypeName.size() > 1) {
    return new ReturnCode(DefaultMessagesImpl.getString("String_Node_Str"),false);
  }
  if (!columnSetMultiValueList.isEmpty()) {
    if (columnList.get(0) instanceof TdColumn) {
      if (!ModelElementHelper.isFromSameTable(columnList)) {
        message=DefaultMessagesImpl.getString("String_Node_Str");
      }
    }
 else     if (columnList.get(0) instanceof MetadataColumn) {
      if (!isFromSameTableByDFColumn(columnSetMultiValueList)) {
        message=DefaultMessagesImpl.getString("String_Node_Str");
      }
    }
  }
  if (message == null) {
    resetResultPageData();
    return new ReturnCode(true);
  }
  return new ReturnCode(message,false);
}

Fixed version (ground truth):
@Override public ReturnCode canSave(){
  ReturnCode canModRetCode=canModifyAnalysisName();
  if (!canModRetCode.isOk()) {
    return canModRetCode;
  }
  String message=null;
  List<IRepositoryNode> columnSetMultiValueList=this.treeViewer.getColumnSetMultiValueList();
  List<ModelElement> columnList=new ArrayList<ModelElement>();
  Set<EObject> nodeTypeName=new HashSet<EObject>();
  for (  IRepositoryNode rd : columnSetMultiValueList) {
    ModelElement modelElementFromRepositoryNode=RepositoryNodeHelper.getModelElementFromRepositoryNode(rd);
    EObject eContainer=modelElementFromRepositoryNode.eContainer();
    nodeTypeName.add(eContainer);
    columnList.add(RepositoryNodeHelper.getModelElementFromRepositoryNode(rd));
  }
  if (nodeTypeName.size() > 1) {
    return new ReturnCode(DefaultMessagesImpl.getString("String_Node_Str"),false);
  }
  if (!columnSetMultiValueList.isEmpty()) {
    if (columnList.get(0) instanceof TdColumn) {
      if (!ModelElementHelper.isFromSameTable(columnList)) {
        message=DefaultMessagesImpl.getString("String_Node_Str");
      }
    }
 else     if (columnList.get(0) instanceof MetadataColumn) {
      if (!isFromSameTableByDFColumn(columnSetMultiValueList)) {
        message=DefaultMessagesImpl.getString("String_Node_Str");
      }
    }
  }
  if (message == null) {
    resetResultPageData();
    return new ReturnCode(true);
  }
  return new ReturnCode(message,false);
}
Program: 138415
Project: 138415
Buggy source:
@Override protected ReturnCode canSave(){
  ReturnCode canModRetCode=canModifyAnalysisName();
  if (!canModRetCode.isOk()) {
    return canModRetCode;
  }
  return new ReturnCode(true);
}

Fixed version (ground truth):
@Override public ReturnCode canSave(){
  ReturnCode canModRetCode=canModifyAnalysisName();
  if (!canModRetCode.isOk()) {
    return canModRetCode;
  }
  return new ReturnCode(true);
}
Program: 138416
Project: 138416
Buggy source:
@Override public boolean canDrop(IRepositoryNode reposNode){
  List<IRepositoryNode> existColumns=new ArrayList<IRepositoryNode>();
  for (  IRepositoryNode columnFromMultiValueList : this.getColumnSetMultiValueList()) {
    existColumns.add(columnFromMultiValueList);
  }
  if (existColumns.contains(reposNode)) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean canDrop(IRepositoryNode reposNode){
  Set<EObject> nodeTypeName=new HashSet<EObject>();
  for (  IRepositoryNode rd : columnSetMultiValueList) {
    ModelElement modelElementFromRepositoryNode=RepositoryNodeHelper.getModelElementFromRepositoryNode(rd);
    EObject eContainer=modelElementFromRepositoryNode.eContainer();
    nodeTypeName.add(eContainer);
  }
  ModelElement modelElement=RepositoryNodeHelper.getModelElementFromRepositoryNode(reposNode);
  nodeTypeName.add(modelElement.eContainer());
  if (nodeTypeName.size() > 1) {
    return false;
  }
  List<IRepositoryNode> existColumns=new ArrayList<IRepositoryNode>();
  for (  IRepositoryNode columnFromMultiValueList : this.getColumnSetMultiValueList()) {
    existColumns.add(columnFromMultiValueList);
  }
  if (existColumns.contains(reposNode)) {
    return false;
  }
  return true;
}
Program: 138417
Project: 138417
Buggy source:
@Override public void openEditor(Item item){
  super.openEditor(item);
  if (this.selectionPage != null) {
    AnalysisEditor editor=(AnalysisEditor)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
    if (editor != null) {
      AbstractAnalysisMetadataPage masterPage=editor.getMasterPage();
      List<IRepositoryNode> nodes=this.selectionPage.nodes;
      if (nodes != null && nodes.size() > 0) {
        List<IRepositoryNode> nodeList=new ArrayList<IRepositoryNode>();
        nodeList.addAll(nodes);
        masterPage.getTreeViewer().setInput(nodeList.toArray(new RepositoryNode[nodeList.size()]));
      }
    }
  }
}

Fixed version (ground truth):
@Override public void openEditor(Item item){
  super.openEditor(item);
  if (this.selectionPage != null) {
    AnalysisEditor editor=(AnalysisEditor)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
    if (editor != null) {
      AbstractAnalysisMetadataPage masterPage=editor.getMasterPage();
      List<IRepositoryNode> nodes=this.selectionPage.nodes;
      if (nodes != null && nodes.size() > 0) {
        List<IRepositoryNode> nodeList=new ArrayList<IRepositoryNode>();
        for (        IRepositoryNode repNode : nodes) {
          repNode=RepositoryNodeHelper.recursiveFind(RepositoryNodeHelper.getModelElementFromRepositoryNode(repNode));
          nodeList.add(repNode);
        }
        masterPage.getTreeViewer().setInput(nodeList.toArray(new RepositoryNode[nodeList.size()]));
      }
    }
  }
}
Program: 138419
Project: 138419
Buggy source:
/** 
 * Analysis of whether the name check can be modified DOC gdbu Comment method "canModifyAnalysisName".
 * @return ReturnCodec
 */
protected ReturnCode canModifyAnalysisName(){
  this.nameText.setText(this.nameText.getText().replace("String_Node_Str","String_Node_Str"));
  if (this.nameText.getText().length() == 0) {
    this.nameText.setText(this.analysis.getName());
    return new ReturnCode(DefaultMessagesImpl.getString("String_Node_Str"),false);
  }
  String elementName=this.nameText.getText();
  List<IRepositoryNode> childrensname=this.analysisRepNode.getParent().getChildren();
  for (  IRepositoryNode children : childrensname) {
    if (elementName.equals(this.analysis.getName())) {
      break;
    }
 else     if (elementName.equals((children.getLabel() + "String_Node_Str").replace("String_Node_Str","String_Node_Str"))) {
      this.nameText.setText(this.analysis.getName());
      return new ReturnCode(DefaultMessagesImpl.getString("String_Node_Str"),false);
    }
  }
  return new ReturnCode(true);
}

Fixed version (ground truth):
/** 
 * Analysis of whether the name check can be modified DOC gdbu Comment method "canModifyAnalysisName".
 * @return ReturnCodec
 */
protected ReturnCode canModifyAnalysisName(){
  this.nameText.setText(this.nameText.getText().replace("String_Node_Str","String_Node_Str"));
  if (this.nameText.getText().length() == 0) {
    this.nameText.setText(this.analysis.getName());
    return new ReturnCode(DefaultMessagesImpl.getString("String_Node_Str"),false);
  }
  String elementName=this.nameText.getText();
  List<IRepositoryNode> childrensname=this.analysisRepNode.getParent().getChildren();
  for (  IRepositoryNode children : childrensname) {
    if (elementName.equals(this.analysis.getName())) {
      break;
    }
 else     if (elementName.equals((children.getLabel() + "String_Node_Str").replace("String_Node_Str","String_Node_Str"))) {
      this.nameText.setText(this.analysis.getName());
      return new ReturnCode(DefaultMessagesImpl.getString("String_Node_Str"),false);
    }
  }
  setDirty(false);
  return new ReturnCode(true);
}
Program: 138421
Project: 138421
Buggy source:
public ItemRecord[] populate(ItemRecord[] elements,boolean checkExisted){
  List<ItemRecord> inValidRecords=new ArrayList<ItemRecord>();
  for (  ItemRecord record : elements) {
    record.getErrors().clear();
    checkDependency(record);
    if (checkExisted) {
      checkExisted(record);
    }
    if (!record.isValid()) {
      inValidRecords.add(record);
    }
  }
  return inValidRecords.toArray(new ItemRecord[inValidRecords.size()]);
}

Fixed version (ground truth):
public ItemRecord[] populate(ItemRecord[] elements,boolean checkExisted){
  List<ItemRecord> inValidRecords=new ArrayList<ItemRecord>();
  for (  ItemRecord record : elements) {
    record.getErrors().clear();
    checkDependency(record);
    if (checkExisted) {
      checkExisted(record);
    }
    checkConflict(record);
    if (!record.isValid()) {
      inValidRecords.add(record);
    }
  }
  return inValidRecords.toArray(new ItemRecord[inValidRecords.size()]);
}
Program: 138422
Project: 138422
Buggy source:
/** 
 * DOC scorreia Comment method "createTableIndicator".
 * @param t
 * @param schemaIndic
 * @param rowCount
 * @param pkCount
 * @param idxCount
 */
private void createTableIndicator(NamedColumnSet t,SchemaIndicator schemaIndic,long rowCount,int pkCount,int idxCount){
  TableIndicator tableIndicator=SchemaFactory.eINSTANCE.createTableIndicator();
  DefinitionHandler.getInstance().setDefaultIndicatorDefinition(tableIndicator);
  tableIndicator.setAnalyzedElement(t);
  tableIndicator.setTableName(t.getName());
  tableIndicator.setRowCount(rowCount);
  tableIndicator.setKeyCount(pkCount);
  tableIndicator.setIndexCount(idxCount);
  schemaIndic.addTableIndicator(tableIndicator);
}

Fixed version (ground truth):
/** 
 * DOC scorreia Comment method "createTableIndicator".
 * @param t
 * @param schemaIndic
 * @param rowCount
 * @param pkCount
 * @param idxCount
 */
private void createTableIndicator(NamedColumnSet t,SchemaIndicator schemaIndic,long rowCount,int pkCount,int idxCount){
  TableIndicator tableIndicator=SchemaFactory.eINSTANCE.createTableIndicator();
  DefinitionHandler.getInstance().setDefaultIndicatorDefinition(tableIndicator);
  tableIndicator.setTableName(t.getName());
  tableIndicator.setRowCount(rowCount);
  tableIndicator.setKeyCount(pkCount);
  tableIndicator.setIndexCount(idxCount);
  schemaIndic.addTableIndicator(tableIndicator);
}
Program: 138423
Project: 138423
Buggy source:
/** 
 * DOC yyi 2011-03-14 19460:remove selected element form the tree
 */
private void removeSelectedElements(){
  TreeItem[] selection=tree.getSelection();
  for (  TreeItem treeItem : selection) {
    ModelElementIndicator meIndicator=(ModelElementIndicator)treeItem.getData(MODELELEMENT_INDICATOR_KEY);
    deleteColumnItems(meIndicator.getModelElementRepositoryNode());
    deleteModelElementItems(meIndicator);
    removeItemBranch(treeItem);
  }
  updateBindConnection(masterPage,tree);
  setElements(modelElementIndicators);
  enabledButtons(false);
  tree.setFocus();
}

Fixed version (ground truth):
/** 
 * DOC yyi 2011-03-14 19460:remove selected element form the tree
 */
private void removeSelectedElements(){
  TreeItem[] selection=tree.getSelection();
  for (  TreeItem treeItem : selection) {
    removeItemBranch(treeItem);
  }
}
Program: 138424
Project: 138424
Buggy source:
@Override protected void removeItemBranch(TreeItem item){
  IndicatorUnit unit=(IndicatorUnit)item.getData(INDICATOR_UNIT_KEY);
  ModelElementIndicator meIndicator=(ModelElementIndicator)item.getData(MODELELEMENT_INDICATOR_KEY);
  super.removeItemBranch(item);
  if (null != unit) {
    meIndicator.removeIndicatorUnit(unit);
    masterPage.getAllMatchIndicator().getCompositeRegexMatchingIndicators().remove(unit.getIndicator());
    masterPage.updateIndicatorSection();
  }
}

Fixed version (ground truth):
@Override protected void removeItemBranch(TreeItem item){
  IndicatorUnit unit=(IndicatorUnit)item.getData(INDICATOR_UNIT_KEY);
  ModelElementIndicator meIndicator=(ModelElementIndicator)item.getData(MODELELEMENT_INDICATOR_KEY);
  deleteColumnItems(meIndicator.getModelElementRepositoryNode());
  deleteModelElementItems(meIndicator);
  if (null != unit) {
    meIndicator.removeIndicatorUnit(unit);
    masterPage.getAllMatchIndicator().getCompositeRegexMatchingIndicators().remove(unit.getIndicator());
    masterPage.updateIndicatorSection();
  }
  updateBindConnection(masterPage,tree);
  super.removeItemBranch(item);
  enabledButtons(false);
  tree.setFocus();
}
Program: 138426
Project: 138426
Buggy source:
@Override protected boolean doExecute() throws Exception {
  if (indicatorModelMigration == null) {
    indicatorModelMigration=new TopDataqualityMigrationFrom410to420usingGenericVM();
  }
  File rawFile=getWorkspacePath().append(TDQ_DATAPROFILING).toFile();
  if (rawFile.exists()) {
    File migFile=new Path(rawFile.getAbsolutePath()).addFileExtension(MIGRATION_FOLDER_EXT).toFile();
    rawFile.renameTo(migFile);
    migrate(migFile);
    migFile.renameTo(rawFile.getAbsoluteFile());
  }
  return Boolean.TRUE;
}

Fixed version (ground truth):
@Override protected boolean doExecute() throws Exception {
  File rawFile=getWorkspacePath().append(TDQ_DATAPROFILING).toFile();
  if (rawFile.exists()) {
    File migFile=new Path(rawFile.getAbsolutePath()).addFileExtension(MIGRATION_FOLDER_EXT).toFile();
    rawFile.renameTo(migFile);
    migrate(migFile);
    migFile.renameTo(rawFile.getAbsoluteFile());
  }
  return Boolean.TRUE;
}
Program: 138427
Project: 138427
Buggy source:
/** 
 * DOC yyi 2011-03-14 19460:remove selected element form the tree
 */
private void removeSelectedElements(){
  TreeItem[] selection=tree.getSelection();
  for (  TreeItem treeItem : selection) {
    ModelElementIndicator meIndicator=(ModelElementIndicator)treeItem.getData(MODELELEMENT_INDICATOR_KEY);
    deleteColumnItems(meIndicator.getModelElementRepositoryNode());
    removeItemBranch(treeItem);
  }
  updateBindConnection(masterPage,tree);
  enabledButtons(false);
  tree.setFocus();
}

Fixed version (ground truth):
/** 
 * DOC yyi 2011-03-14 19460:remove selected element form the tree
 */
private void removeSelectedElements(){
  TreeItem[] selection=tree.getSelection();
  for (  TreeItem treeItem : selection) {
    ModelElementIndicator meIndicator=(ModelElementIndicator)treeItem.getData(MODELELEMENT_INDICATOR_KEY);
    deleteColumnItems(meIndicator.getModelElementRepositoryNode());
    deleteModelElementItems(meIndicator);
    removeItemBranch(treeItem);
  }
  updateBindConnection(masterPage,tree);
  setElements(modelElementIndicators);
  enabledButtons(false);
  tree.setFocus();
}
Program: 138428
Project: 138428
Buggy source:
/** 
 * Remove the selected elements(eg:TdColumn or Indicator) from tree.
 * @param newTree
 */
private void removeSelectedElements(final Tree newTree){
  TreeItem[] selection=newTree.getSelection();
  for (  TreeItem item : selection) {
    ModelElementIndicator meIndicator=(ModelElementIndicator)item.getData(MODELELEMENT_INDICATOR_KEY);
    IndicatorUnit indicatorUnit=(IndicatorUnit)item.getData(INDICATOR_UNIT_KEY);
    if (indicatorUnit != null) {
      deleteIndicatorItems(meIndicator,indicatorUnit);
    }
 else {
      RepositoryNode tdColumn=(RepositoryNode)item.getData(COLUMN_INDICATOR_KEY);
      deleteColumnItems(tdColumn);
    }
    removeItemBranch(item);
  }
}

Fixed version (ground truth):
/** 
 * DOC yyi 2011-03-14 19460:remove selected element form the tree
 */
private void removeSelectedElements(){
  TreeItem[] selection=tree.getSelection();
  for (  TreeItem treeItem : selection) {
    ModelElementIndicator meIndicator=(ModelElementIndicator)treeItem.getData(MODELELEMENT_INDICATOR_KEY);
    deleteColumnItems(meIndicator.getModelElementRepositoryNode());
    removeItemBranch(treeItem);
  }
  updateBindConnection(masterPage,tree);
  enabledButtons(false);
  tree.setFocus();
}
Program: 138430
Project: 138430
Buggy source:
/** 
 * Add qiongli handle ColumnSetMultiValueIndicator.
 * @return
 */
protected String getAnalyzedElementName(Indicator ind){
  if (ind.getAnalyzedElement() != null) {
    return dbmsLanguage.quote(ind.getAnalyzedElement().getName());
  }
  StringBuffer name=new StringBuffer(PluginConstant.EMPTY_STRING);
  EObject object=ind.eContainer();
  EList<MetadataColumn> eLs=null;
  if (object != null && object instanceof ColumnSetMultiValueIndicator) {
    eLs=((ColumnSetMultiValueIndicator)object).getAnalyzedColumns();
  }
 else   if (ind instanceof AllMatchIndicator) {
    eLs=((AllMatchIndicator)ind).getAnalyzedColumns();
  }
  if (eLs != null && !eLs.isEmpty()) {
    for (    MetadataColumn mColumn : eLs) {
      name.append(dbmsLanguage.quote(mColumn.getName())).append("String_Node_Str");
    }
    if (eLs.size() > 0) {
      return org.apache.commons.lang.StringUtils.removeEnd(name.toString(),"String_Node_Str");
    }
  }
  return name.toString();
}

Fixed version (ground truth):
/** 
 * Add qiongli handle ColumnSetMultiValueIndicator.
 * @return
 */
protected String getAnalyzedElementName(Indicator ind){
  if (ind.getAnalyzedElement() != null) {
    return dbmsLanguage.quote(ind.getAnalyzedElement().getName());
  }
  StringBuffer name=new StringBuffer(PluginConstant.EMPTY_STRING);
  EObject object=ind.eContainer();
  EList<ModelElement> eLs=null;
  if (object != null && object instanceof ColumnSetMultiValueIndicator) {
    eLs=((ColumnSetMultiValueIndicator)object).getAnalyzedColumns();
  }
 else   if (ind instanceof AllMatchIndicator) {
    eLs=((AllMatchIndicator)ind).getAnalyzedColumns();
  }
  if (eLs != null && !eLs.isEmpty()) {
    for (    ModelElement mColumn : eLs) {
      name.append(dbmsLanguage.quote(mColumn.getName())).append("String_Node_Str");
    }
    if (eLs.size() > 0) {
      return org.apache.commons.lang.StringUtils.removeEnd(name.toString(),"String_Node_Str");
    }
  }
  return name.toString();
}
Program: 138431
Project: 138431
Buggy source:
/** 
 * create column header for columnSet analysis.
 * @param simpInd
 * @param columnElementList
 */
private List<String> columnHeaderForColumnSet(SimpleStatIndicator simpInd){
  List<String> columnElementList=new ArrayList<String>();
  if (simpInd.getAnalyzedColumns().size() == 0) {
    return columnElementList;
  }
  if (DrillDownEditorInput.judgeMenuType(this.getMenuType(),DrillDownEditorInput.MENU_VALUE_TYPE)) {
    for (    MetadataColumn mColumn : simpInd.getAnalyzedColumns()) {
      columnElementList.add(mColumn.getLabel());
    }
  }
 else {
    boolean isDelimitedFile=false;
    for (    MetadataColumn mColumn : simpInd.getAnalyzedColumns()) {
      if (!(mColumn instanceof TdColumn)) {
        isDelimitedFile=true;
        break;
      }
    }
    if (isDelimitedFile) {
      List<MetadataColumn> columnList=((MetadataTable)ColumnHelper.getColumnOwnerAsMetadataTable(simpInd.getAnalyzedColumns().get(0))).getColumns();
      for (      MetadataColumn mdColumn : columnList) {
        columnElementList.add(mdColumn.getLabel());
      }
    }
 else {
      List<TdColumn> columnList=TableHelper.getColumns(SwitchHelpers.TABLE_SWITCH.doSwitch((simpInd.getAnalyzedColumns().get(0).eContainer())));
      for (      TdColumn tdColumn : columnList) {
        columnElementList.add(tdColumn.getLabel());
      }
    }
  }
  return columnElementList;
}

Fixed version (ground truth):
/** 
 * create column header for columnSet analysis.
 * @param simpInd
 * @param columnElementList
 */
private List<String> columnHeaderForColumnSet(SimpleStatIndicator simpInd){
  List<String> columnElementList=new ArrayList<String>();
  if (simpInd.getAnalyzedColumns().size() == 0) {
    return columnElementList;
  }
  if (DrillDownEditorInput.judgeMenuType(this.getMenuType(),DrillDownEditorInput.MENU_VALUE_TYPE)) {
    for (    ModelElement mColumn : simpInd.getAnalyzedColumns()) {
      columnElementList.add(((MetadataColumn)mColumn).getLabel());
    }
  }
 else {
    boolean isDelimitedFile=false;
    for (    ModelElement mColumn : simpInd.getAnalyzedColumns()) {
      if (!(mColumn instanceof TdColumn)) {
        isDelimitedFile=true;
        break;
      }
    }
    if (isDelimitedFile) {
      List<MetadataColumn> columnList=((MetadataTable)ColumnHelper.getColumnOwnerAsMetadataTable(simpInd.getAnalyzedColumns().get(0))).getColumns();
      for (      MetadataColumn mdColumn : columnList) {
        columnElementList.add(mdColumn.getLabel());
      }
    }
 else {
      List<TdColumn> columnList=TableHelper.getColumns(SwitchHelpers.TABLE_SWITCH.doSwitch((simpInd.getAnalyzedColumns().get(0).eContainer())));
      for (      TdColumn tdColumn : columnList) {
        columnElementList.add(tdColumn.getLabel());
      }
    }
  }
  return columnElementList;
}
Program: 138432
Project: 138432
Buggy source:
/** 
 * DOC bZhou Comment method "getItemPath". This method is to get the entire path of a item. e.g. getItemPath() = Project/TypedPath/StatePath/xxxx.property.
 * @param property
 * @return
 */
public static IPath getItemPath(Property property){
  Item item=property.getItem();
  if (property.eIsProxy()) {
    property=(Property)EObjectHelper.resolveObject(property);
  }
  if (item instanceof TDQItem) {
    TDQItem tdqItem=(TDQItem)item;
    return ResourceManager.getRootProject().getFullPath().append(getItemTypedPath(property)).append(getItemStatePath(property)).append(tdqItem.getFilename());
  }
 else {
    IPath itemFilePath=new Path(property.eResource().getURI().lastSegment()).removeFileExtension().addFileExtension(FactoriesUtil.ITEM_EXTENSION);
    return ResourceManager.getRootProject().getFullPath().append(getItemTypedPath(property)).append(getItemStatePath(property)).append(itemFilePath);
  }
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "getItemPath". This method is to get the entire path of a item. e.g. getItemPath() = Project/TypedPath/StatePath/xxxx.property.
 * @param property
 * @return
 */
public static IPath getItemPath(Property property){
  URI uri=getURI(property);
  Item item=property.getItem();
  EElementEName elementEName=EElementEName.getElementEName(item);
  if (elementEName != null) {
    IPath path=new Path(uri.lastSegment());
    path=path.removeFileExtension().addFileExtension(elementEName.getFileExt());
    return ResourceManager.getRootProject().getFullPath().append(getItemTypedPath(property)).append(getItemStatePath(property)).append(path);
  }
  return Path.EMPTY;
}
Program: 138433
Project: 138433
Buggy source:
/** 
 * DOC bZhou Comment method "getItemStatePath". This method is to get the relative path to the typed path of a item. e.g. Project/TypedPath/StatePath/xxxx.property
 * @param property
 * @return
 */
public static IPath getItemStatePath(Property property){
  if (property.eIsProxy()) {
    property=(Property)EObjectHelper.resolveObject(property);
  }
  Item item=property.getItem();
  URI propURI;
  if (property.eIsProxy()) {
    propURI=((InternalEObject)property).eProxyURI();
  }
 else {
    propURI=property.eResource().getURI();
  }
  String statePathStr=null;
  if (item.getState() != null) {
    statePathStr=item.getState().getPath();
  }
  if (StringUtils.isBlank(statePathStr) && propURI.isPlatformResource()) {
    IPath propPath=new Path(propURI.toPlatformString(true)).removeLastSegments(1);
    IPath typedPath=ResourceManager.getRootProject().getFullPath().append(getItemTypedPath(property));
    return propPath.makeRelativeTo(typedPath);
  }
  return statePathStr != null ? new Path(statePathStr) : null;
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "getItemStatePath". This method is to get the relative path to the typed path of a item. e.g. Project/TypedPath/StatePath/xxxx.property
 * @param property
 * @return
 */
public static IPath getItemStatePath(Property property){
  Item item=property.getItem();
  String statePathStr=null;
  if (item.getState() != null) {
    statePathStr=item.getState().getPath();
  }
 else {
    URI propURI=getURI(property);
    if (StringUtils.isBlank(statePathStr) && propURI.isPlatformResource()) {
      IPath propPath=new Path(propURI.toPlatformString(true)).removeLastSegments(1);
      IPath typedPath=ResourceManager.getRootProject().getFullPath().append(getItemTypedPath(property));
      return propPath.makeRelativeTo(typedPath);
    }
  }
  return statePathStr != null ? new Path(statePathStr) : Path.EMPTY;
}
Program: 138434
Project: 138434
Buggy source:
/** 
 * DOC bZhou Comment method "getItemPath". This method is to get the entire path of a item. e.g. getItemPath() = Project/TypedPath/StatePath/xxxx.property.
 * @param property
 * @return
 */
public static IPath getItemPath(Property property){
  URI uri=getURI(property);
  Item item=property.getItem();
  EElementEName elementEName=EElementEName.getElementEName(item);
  if (elementEName != null) {
    IPath path=new Path(uri.lastSegment());
    path=path.removeFileExtension().addFileExtension(elementEName.getFileExt());
    return ResourceManager.getRootProject().getFullPath().append(getItemTypedPath(property)).append(getItemStatePath(property)).append(path);
  }
  return Path.EMPTY;
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "getItemPath". This method is to get the entire path of a item. e.g. getItemPath() = Project/TypedPath/StatePath/xxxx.property.
 * @param property
 * @return
 */
public static IPath getItemPath(Property property){
  Item item=property.getItem();
  IPath path=null;
  String fileName=null;
  EElementEName elementEName=EElementEName.getElementEName(item);
  if (elementEName != null) {
    URI uri=getURI(property);
    if (uri.isFile()) {
      path=new Path(uri.toFileString());
    }
 else     if (uri.isPlatform()) {
      path=new Path(uri.toPlatformString(false));
    }
 else {
      path=new Path(uri.lastSegment());
    }
    path=new Path(path.lastSegment());
    fileName=path.removeFileExtension().addFileExtension(elementEName.getFileExt()).toString();
  }
 else   if (item instanceof TDQItem) {
    TDQItem dqItem=(TDQItem)item;
    if (!StringUtils.isBlank(dqItem.getFilename())) {
      fileName=dqItem.getFilename();
    }
  }
  if (fileName != null) {
    path=ResourceManager.getRootProject().getFullPath().append(getItemTypedPath(property)).append(getItemStatePath(property)).append(fileName);
  }
  return path;
}
Program: 138435
Project: 138435
Buggy source:
/** 
 * DOC bZhou Comment method "checkExisted".
 * @param record
 */
private void checkExisted(ItemRecord record){
  Property property=record.getProperty();
  if (property != null) {
    IPath itemPath=PropertyHelper.getItemPath(property);
    IFile itemFile=ResourcesPlugin.getWorkspace().getRoot().getFile(itemPath);
    if (itemFile.exists()) {
      record.addError("String_Node_Str" + record.getName() + "String_Node_Str"+ itemFile.getFullPath().toString());
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "checkExisted".
 * @param record
 */
private void checkExisted(ItemRecord record){
  Property property=record.getProperty();
  if (property != null) {
    IPath itemPath=PropertyHelper.getItemPath(property);
    if (itemPath != null) {
      IFile itemFile=ResourcesPlugin.getWorkspace().getRoot().getFile(itemPath);
      if (itemFile.exists()) {
        record.addError("String_Node_Str" + record.getName() + "String_Node_Str"+ itemFile.getFullPath().toString());
      }
    }
 else {
      record.addError("String_Node_Str" + record.getName() + "String_Node_Str");
    }
  }
}
Program: 138437
Project: 138437
Buggy source:
/** 
 * Method "addColumnToAnalyze".
 * @param column
 * @return
 */
public boolean addIndicator(List<MetadataColumn> columns,Indicator indicator){
  for (  ModelElement tdColumn : columns) {
    if (!analysis.getContext().getAnalysedElements().contains(tdColumn)) {
      analysis.getContext().getAnalysedElements().add(tdColumn);
    }
  }
  analysis.getResults().getIndicators().add(indicator);
  initializeIndicator(indicator);
  DataManager connection=analysis.getContext().getConnection();
  if (connection == null) {
    for (    ModelElement element : columns) {
      TdColumn tdColumn=SwitchHelpers.COLUMN_SWITCH.doSwitch(element);
      log.error("String_Node_Str");
      connection=ConnectionHelper.getTdDataProvider(tdColumn);
      analysis.getContext().setConnection(connection);
    }
  }
  TypedReturnCode<Dependency> rc=DependenciesHandler.getInstance().setDependencyOn(analysis,connection);
  if (rc.isOk()) {
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Method "addColumnToAnalyze".
 * @param column
 * @return
 */
public boolean addIndicator(List<ModelElement> columns,Indicator indicator){
  for (  ModelElement tdColumn : columns) {
    if (!analysis.getContext().getAnalysedElements().contains(tdColumn)) {
      analysis.getContext().getAnalysedElements().add(tdColumn);
    }
  }
  analysis.getResults().getIndicators().add(indicator);
  initializeIndicator(indicator);
  DataManager connection=analysis.getContext().getConnection();
  if (connection == null) {
    for (    ModelElement element : columns) {
      TdColumn tdColumn=SwitchHelpers.COLUMN_SWITCH.doSwitch(element);
      log.error("String_Node_Str");
      connection=ConnectionHelper.getTdDataProvider(tdColumn);
      analysis.getContext().setConnection(connection);
    }
  }
  TypedReturnCode<Dependency> rc=DependenciesHandler.getInstance().setDependencyOn(analysis,connection);
  if (rc.isOk()) {
  }
  return true;
}
Program: 138440
Project: 138440
Buggy source:
public String getQueryStirng(MetadataColumn column,Analysis ana,EList<MetadataColumn> nominalList,String columnName,String columnValue){
  setAnalysis(ana);
  String queryString=SELECT_ALL_FROM + getFullyQualifiedTableName(column);
  int col=columnName.indexOf("String_Node_Str");
  int val=columnValue.indexOf("String_Node_Str");
  for (  ModelElement nominal : nominalList) {
    final TdColumn tdColumn=(TdColumn)nominal;
    if (col > 0 && val > 0) {
      String[] name=columnName.split("String_Node_Str");
      String[] value=columnValue.split("String_Node_Str");
      for (int i=0; i < name.length; i++) {
        String where=dbmsLanguage.and();
        if (i == 0) {
          where=dbmsLanguage.where();
        }
        queryString=buildWhereClause(queryString,tdColumn,name[i],value[i],where);
      }
    }
 else {
      queryString=buildWhereClause(queryString,tdColumn,columnName.trim(),columnValue,dbmsLanguage.where());
    }
  }
  return queryString;
}

Fixed version (ground truth):
public String getQueryStirng(ModelElement column,Analysis ana,EList<ModelElement> nominalList,String columnName,String columnValue){
  setAnalysis(ana);
  String queryString=SELECT_ALL_FROM + getFullyQualifiedTableName(column);
  int col=columnName.indexOf("String_Node_Str");
  int val=columnValue.indexOf("String_Node_Str");
  for (  ModelElement nominal : nominalList) {
    final TdColumn tdColumn=(TdColumn)nominal;
    if (col > 0 && val > 0) {
      String[] name=columnName.split("String_Node_Str");
      String[] value=columnValue.split("String_Node_Str");
      for (int i=0; i < name.length; i++) {
        String where=dbmsLanguage.and();
        if (i == 0) {
          where=dbmsLanguage.where();
        }
        queryString=buildWhereClause(queryString,tdColumn,name[i],value[i],where);
      }
    }
 else {
      queryString=buildWhereClause(queryString,tdColumn,columnName.trim(),columnValue,dbmsLanguage.where());
    }
  }
  return queryString;
}