nus-yam/ex-repair huggingface dataset:
Program: 125137
Project: 125137
Buggy source:
/** 
 * @param parent
 * @param style
 */
public OozieMonitoringComposite(Composite parent,int style){
  super(parent,style);
  parent.setLayout(new FillLayout());
  setExpandHorizontal(true);
  setExpandVertical(true);
  this.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
  Composite comp=new Composite(this,SWT.NONE);
  createContents(comp);
  this.setMinSize(comp.computeSize(SWT.DEFAULT,SWT.DEFAULT));
}

Fixed version (ground truth):
/** 
 * @param parent
 * @param style
 */
public OozieMonitoringComposite(Composite parent,int style){
  super(parent,style);
  parent.setLayout(new FillLayout());
  setExpandHorizontal(true);
  setExpandVertical(true);
  this.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
  Composite comp=new Composite(this,SWT.NONE);
  setContent(comp);
  createContents(comp);
  this.setMinSize(comp.computeSize(SWT.DEFAULT,SWT.DEFAULT));
}
Program: 125138
Project: 125138
Buggy source:
@Override public void refresh(){
}

Fixed version (ground truth):
@Override public void refresh(){
  if (!isDisposed()) {
    getParent().layout();
  }
  if (!browser.isDisposed()) {
    if (process != null) {
      browser.setUrl("String_Node_Str");
    }
 else {
      browser.setUrl("String_Node_Str");
    }
  }
}
Program: 125139
Project: 125139
Buggy source:
protected void createContents(Composite parent){
  Browser browser=new Browser(parent,SWT.NONE);
}

Fixed version (ground truth):
protected void createContents(Composite parent){
  GridLayout gridLayout=new GridLayout(1,false);
  parent.setLayout(gridLayout);
  browser=new Browser(parent,SWT.NONE);
  browser.setLayoutData(new GridData(GridData.FILL_BOTH));
}
Program: 125140
Project: 125140
Buggy source:
public void refresh(){
  getPart();
  if (part != null) {
    executeJobComposite.setMultiPageTalendEditor(part);
    tabFactory.setTitle("String_Node_Str" + part.getProcess().getLabel(),null);
    this.setPartName("String_Node_Str" + part.getProcess().getLabel() + "String_Node_Str");
    contextComposite.setProcess(part.getProcess());
  }
 else {
    executeJobComposite.setMultiPageTalendEditor(null);
    tabFactory.setTitle(Messages.getString("String_Node_Str"),null);
    this.setPartName("String_Node_Str");
    contextComposite.setProcess(null);
  }
}

Fixed version (ground truth):
public void refresh(){
  getPart();
  if (part != null) {
    if (executeJobComposite != null && !executeJobComposite.isDisposed()) {
      executeJobComposite.setMultiPageTalendEditor(part);
    }
    tabFactory.setTitle("String_Node_Str" + part.getProcess().getLabel(),null);
    this.setPartName("String_Node_Str" + part.getProcess().getLabel() + "String_Node_Str");
    contextComposite.setProcess(part.getProcess());
    if (monitoringComposite != null && !monitoringComposite.isDisposed()) {
      monitoringComposite.setProcess(part.getProcess());
    }
  }
 else {
    if (executeJobComposite != null && !executeJobComposite.isDisposed()) {
      executeJobComposite.setMultiPageTalendEditor(null);
    }
    tabFactory.setTitle(Messages.getString("String_Node_Str"),null);
    this.setPartName("String_Node_Str");
    contextComposite.setProcess(null);
    if (monitoringComposite != null && !monitoringComposite.isDisposed()) {
      monitoringComposite.setProcess(null);
    }
  }
}
Program: 125141
Project: 125141
Buggy source:
protected void createCenterContents(Composite parent){
  FormData layouDatag=new FormData();
  layouDatag.left=new FormAttachment(0,0);
  layouDatag.width=32;
  layouDatag.top=new FormAttachment(0,0);
  layouDatag.bottom=new FormAttachment(100,0);
  final Composite buttonComposite=new Composite(parent,SWT.ERROR);
  buttonComposite.setLayoutData(layouDatag);
  buttonComposite.setLayout(new GridLayout());
  moveButton=new Button(buttonComposite,SWT.PUSH);
  moveButton.setText("String_Node_Str");
  moveButton.setToolTipText(Messages.getString("String_Node_Str"));
  final GridData layoutData=new GridData();
  layoutData.verticalAlignment=GridData.CENTER;
  layoutData.horizontalAlignment=GridData.CENTER;
  layoutData.grabExcessHorizontalSpace=true;
  layoutData.grabExcessVerticalSpace=true;
  moveButton.setLayoutData(layoutData);
  regMoveButtonListener();
}

Fixed version (ground truth):
protected void createCenterContents(Composite parent){
  FormData layouDatag=new FormData();
  layouDatag.left=new FormAttachment(0,0);
  layouDatag.width=32;
  layouDatag.top=new FormAttachment(0,0);
  layouDatag.bottom=new FormAttachment(100,0);
  final Composite buttonComposite=new Composite(parent,SWT.ERROR);
  buttonComposite.setLayoutData(layouDatag);
  buttonComposite.setLayout(new GridLayout());
  moveButton=new Button(buttonComposite,SWT.PUSH);
  moveButton.setText("String_Node_Str");
  moveButton.setToolTipText("String_Node_Str");
  final GridData layoutData=new GridData();
  layoutData.verticalAlignment=GridData.CENTER;
  layoutData.horizontalAlignment=GridData.CENTER;
  layoutData.grabExcessHorizontalSpace=true;
  layoutData.grabExcessVerticalSpace=true;
  moveButton.setLayoutData(layoutData);
  regMoveButtonListener();
}
Program: 125142
Project: 125142
Buggy source:
public void selectionChanged(SelectionChangedEvent event){
  IStructuredSelection selection=(IStructuredSelection)event.getSelection();
  TalendPropertyTabDescriptor descriptor=(TalendPropertyTabDescriptor)selection.getFirstElement();
  if (descriptor == null) {
    return;
  }
  if (currentSelectedTab != null && (currentSelectedTab.getCategory() != descriptor.getCategory())) {
    for (    Control curControl : tabFactory.getTabComposite().getChildren()) {
      curControl.dispose();
    }
  }
  if (currentSelectedTab == null || currentSelectedTab.getCategory() != descriptor.getCategory() || selectedPrimary) {
    currentSelectedTab=descriptor;
    createDynamicComposite(tabFactory.getTabComposite(),(Element)descriptor.getData(),descriptor.getCategory());
    selectedPrimary=false;
  }
}

Fixed version (ground truth):
public void selectionChanged(SelectionChangedEvent event){
  IStructuredSelection selection=(IStructuredSelection)event.getSelection();
  TalendPropertyTabDescriptor descriptor=(TalendPropertyTabDescriptor)selection.getFirstElement();
  if (descriptor == null) {
    return;
  }
  if (currentSelectedTab != null && (currentSelectedTab.getCategory() != descriptor.getCategory())) {
    for (    Control curControl : tabFactory.getTabComposite().getChildren()) {
      curControl.dispose();
    }
  }
  if (currentSelectedTab == null || currentSelectedTab.getCategory() != descriptor.getCategory() || selectedPrimary) {
    currentSelectedTab=descriptor;
    createDynamicComposite(tabFactory.getTabComposite(),(Element)descriptor.getData(),descriptor.getCategory());
    selectedPrimary=false;
  }
  refresh();
}
Program: 125144
Project: 125144
Buggy source:
public void fillConnection(DatabaseConnection connection){
  Catalog defaultCatalog=CatalogHelper.createCatalog(getDefaultCatalogName());
  ConnectionHelper.addPackage(defaultCatalog,connection);
}

Fixed version (ground truth):
public void fillConnection(DatabaseConnection connection){
  Catalog defaultCatalog=CatalogHelper.createCatalog(getDefaultCatalogName());
  ConnectionHelper.addPackage(defaultCatalog,connection);
  connection.setSID(getDefaultCatalogName());
}
Program: 125145
Project: 125145
Buggy source:
public double branchLength(){
  Double bl=0.;
  if ((f1 / (n + 2 * lambda)) > 1. / 3) {
    bl=-Math.log(1.5 * (1.0 - (f1 / (n + 2 * lambda))));
  }
 else {
    bl=0.0;
  }
  return bl;
}

Fixed version (ground truth):
public double branchLength(){
  return Posterior.branchLength(f1,n,lambda);
}
Program: 125146
Project: 125146
Buggy source:
private STITreeCluster[] getSisterRemaining(STINode node){
  STITreeCluster[] sisterRemaining={null,null};
  Iterator<STINode> pcit=node.getParent().getChildren().iterator();
  STINode pc=pcit.next();
  if (pc == node)   pc=pcit.next();
  sisterRemaining[0]=(STITreeCluster)pc.getData();
  if (node.getParent().isRoot() && node.getParent().getChildCount() == 3) {
    pc=pcit.next();
    if (pc == node)     pc=pcit.next();
    sisterRemaining[1]=(STITreeCluster)pc.getData();
    ;
  }
 else   if (node.getParent().isRoot() && node.getParent().getChildCount() == 2) {
    if (pc.getChildCount() == 2) {
      Iterator<STINode> nieceIt=pc.getChildren().iterator();
      sisterRemaining[0]=(STITreeCluster)nieceIt.next().getData();
      sisterRemaining[1]=(STITreeCluster)nieceIt.next().getData();
    }
  }
 else {
    sisterRemaining[1]=((STITreeCluster)node.getParent().getData()).complementaryCluster();
  }
  return sisterRemaining;
}

Fixed version (ground truth):
private STITreeCluster[] getSisterRemaining(STINode node){
  STITreeCluster[] sisterRemaining={null,null};
  Iterator<STINode> siblingsIt=node.getParent().getChildren().iterator();
  STINode sibling=siblingsIt.next();
  if (sibling == node)   sibling=siblingsIt.next();
  sisterRemaining[0]=(STITreeCluster)sibling.getData();
  if (node.getParent().isRoot() && node.getParent().getChildCount() == 3) {
    sibling=siblingsIt.next();
    if (sibling == node)     sibling=siblingsIt.next();
    sisterRemaining[1]=(STITreeCluster)sibling.getData();
    ;
  }
 else   if (node.getParent().isRoot() && node.getParent().getChildCount() == 2) {
    if (sibling.getChildCount() == 2) {
      Iterator<STINode> nieceIt=sibling.getChildren().iterator();
      sisterRemaining[0]=(STITreeCluster)nieceIt.next().getData();
      sisterRemaining[1]=(STITreeCluster)nieceIt.next().getData();
    }
 else {
      System.err.println("String_Node_Str");
    }
  }
 else {
    sisterRemaining[1]=((STITreeCluster)node.getParent().getData()).complementaryCluster();
  }
  return sisterRemaining;
}
Program: 125147
Project: 125147
Buggy source:
private boolean skipNode(TNode node){
  return node.isLeaf() || node.isRoot() || node.getChildCount() > 2 || (node.getParent().getChildCount() > 3) || (node.getParent().getChildCount() > 2 && !node.getParent().isRoot()) || ((node.getParent().isRoot() && node.getParent().getChildCount() == 2));
}

Fixed version (ground truth):
private boolean skipNode(TNode node){
  TNode parent=node.getParent();
  int parentChildCount=parent.getChildCount();
  return node.isLeaf() || node.isRoot() || node.getChildCount() > 2 || (parentChildCount > 3) || (parentChildCount > 2 && !parent.isRoot()) || ((parent.isRoot() && parent.getChildCount() == 2 && node.getSiblings().get(0).getChildCount() != 2));
}
Program: 125150
Project: 125150
Buggy source:
public Polytree(List<Tree> trees,int polytomyMaxSize,boolean randomResolve){
  this.randomResolveMultiInd=randomResolve;
  for (int i=0; i < GlobalMaps.taxonIdentifier.taxonCount(); i++) {
    STITreeCluster c=new STITreeCluster(GlobalMaps.taxonIdentifier);
    c.getBitSet().set(i);
    clusterID.put(c,i);
  }
  for (  Tree tr : trees) {
    STITreeCluster s=addSubtreeClusters(tr.getRoot(),null);
    addSubtreeClusters(tr.getRoot(),s);
    addSubtreePartitions(tr.getRoot(),s);
  }
  for (  Entry<AbstractPartition,Integer> entry : partitionCount.entrySet()) {
    STITreeCluster[] cs=entry.getKey().getClusters();
    if (cs.length > polytomyMaxSize)     continue;
    aPartitionMultiplicity.add(entry.getValue());
    aPartitionNumClusters.add(cs.length);
    for (    STITreeCluster c : cs) {
      aPartitionClusterID.add(clusterID.get(c));
    }
  }
  mapToInt(dependerID,aDependerID);
  mapToInt(dependeeID,aDependeeID);
  mapToInt(dependingFactor,aDependingFactor);
  aDependerID=null;
  aDependeeID=null;
  aDependingFactor=null;
  mapToInt(partitionMultiplicity,aPartitionMultiplicity);
  mapToInt(partitionNumClusters,aPartitionNumClusters);
  mapToInt(partitionClusterID,aPartitionClusterID);
  aPartitionMultiplicity=null;
  aPartitionNumClusters=null;
  aPartitionClusterID=null;
}

Fixed version (ground truth):
public Polytree(List<Tree> trees,int polytomyMaxSize,boolean randomResolve){
  for (int i=0; i < GlobalMaps.taxonIdentifier.taxonCount(); i++) {
    STITreeCluster c=new STITreeCluster(GlobalMaps.taxonIdentifier);
    c.getBitSet().set(i);
    clusterID.put(c,i);
  }
  for (  Tree tr : trees) {
    STITreeCluster s=addSubtreeClusters(tr.getRoot(),null);
    addSubtreeClusters(tr.getRoot(),s);
    addSubtreePartitions(tr.getRoot(),s);
  }
  for (  Entry<AbstractPartition,Integer> entry : partitionCount.entrySet()) {
    STITreeCluster[] cs=entry.getKey().getClusters();
    if (polytomyMaxSize != 0 && cs.length > polytomyMaxSize)     continue;
    aPartitionMultiplicity.add(entry.getValue());
    aPartitionNumClusters.add(cs.length);
    for (    STITreeCluster c : cs) {
      aPartitionClusterID.add(clusterID.get(c));
    }
  }
  dependerID=mapToInt(aDependerID);
  dependeeID=mapToInt(aDependeeID);
  dependingFactor=mapToInt(aDependingFactor);
  aDependerID=null;
  aDependeeID=null;
  aDependingFactor=null;
  partitionMultiplicity=mapToInt(aPartitionMultiplicity);
  partitionNumClusters=mapToInt(aPartitionNumClusters);
  partitionClusterID=mapToInt(aPartitionClusterID);
  aPartitionMultiplicity=null;
  aPartitionNumClusters=null;
  aPartitionClusterID=null;
}
Program: 125151
Project: 125151
Buggy source:
private void mapToInt(int[] ret,List<Integer> list){
  ret=new int[list.size()];
  for (int i=0; i < ret.length; i++)   ret[i]=list.get(i);
}

Fixed version (ground truth):
private int[] mapToInt(List<Integer> list){
  int[] ret=new int[list.size()];
  for (int i=0; i < ret.length; i++)   ret[i]=list.get(i);
  return ret;
}
Program: 125153
Project: 125153
Buggy source:
/** 
 * Each algorithm will have its own data structure for gene trees
 * @param wqInference
 */
public void setupGeneTrees(WQInference wqInference,boolean randomResolve){
  this.algorithm.setupGeneTrees(wqInference,randomResolve);
  tmpalgorithm.setupGeneTrees(wqInference,randomResolve);
}

Fixed version (ground truth):
/** 
 * Each algorithm will have its own data structure for gene trees
 * @param wqInference
 */
public void setupGeneTrees(WQInference wqInference,boolean randomResolve){
  this.algorithm.setupGeneTrees(wqInference,false);
  tmpalgorithm.setupGeneTrees(wqInference,false);
}
Program: 125154
Project: 125154
Buggy source:
public void gtToSt(MutableTree st){
  Stack<Integer> stack=new Stack<Integer>();
  HashSet<Integer> children;
  List<List<TMutableNode>> spNodes=new ArrayList<List<TMutableNode>>();
  for (  TNode node : st.postTraverse()) {
    if (node.isLeaf()) {
      int spID=this.getSpeciesIdForTaxon(GlobalMaps.taxonIdentifier.taxonId(node.getName()));
      stack.push(spID);
      if (this.speciesIdtoTaxonId.get(spID).size() == 1) {
        if (!node.getName().equals(this.getSpeciesName(spID))) {
          ((TMutableNode)node).setName(this.getSpeciesName(spID));
        }
      }
    }
 else {
      children=new HashSet<Integer>();
      List<TMutableNode> childnodes=new ArrayList<TMutableNode>();
      for (      TNode c : node.getChildren()) {
        children.add(stack.pop());
        childnodes.add((TMutableNode)c);
      }
      if (children.size() == 1) {
        Integer spnode=children.iterator().next();
        if (spnode != -1) {
          ((TMutableNode)node).setName(this.getSpeciesName(spnode));
          ((STINode)node).setData(null);
          spNodes.add(childnodes);
          System.err.println("String_Node_Str");
        }
        stack.push(spnode);
      }
 else {
        stack.push(-1);
      }
    }
  }
  for (  List<TMutableNode> nodes : spNodes) {
    for (    TNode c : nodes) {
      ((TMutableNode)c).removeNode();
    }
  }
}

Fixed version (ground truth):
public void gtToSt(MutableTree st){
  Stack<Integer> stack=new Stack<Integer>();
  HashSet<Integer> children;
  List<List<TMutableNode>> spNodes=new ArrayList<List<TMutableNode>>();
  for (  TNode node : st.postTraverse()) {
    if (node.isLeaf()) {
      int spID=this.getSpeciesIdForTaxon(GlobalMaps.taxonIdentifier.taxonId(node.getName()));
      stack.push(spID);
      if (this.speciesIdtoTaxonId.get(spID).size() == 1) {
        if (!node.getName().equals(this.getSpeciesName(spID))) {
          ((TMutableNode)node).setName(this.getSpeciesName(spID));
        }
      }
    }
 else {
      children=new HashSet<Integer>();
      List<TMutableNode> childnodes=new ArrayList<TMutableNode>();
      for (      TNode c : node.getChildren()) {
        children.add(stack.pop());
        childnodes.add((TMutableNode)c);
      }
      if (children.size() == 1) {
        Integer spnode=children.iterator().next();
        if (spnode != -1) {
          ((TMutableNode)node).setName(this.getSpeciesName(spnode));
          ((STINode)node).setData(null);
          spNodes.add(childnodes);
        }
        stack.push(spnode);
      }
 else {
        stack.push(-1);
      }
    }
  }
  for (  List<TMutableNode> nodes : spNodes) {
    for (    TNode c : nodes) {
      ((TMutableNode)c).removeNode();
    }
  }
}
Program: 125155
Project: 125155
Buggy source:
public void gtToSt2(MutableTree st){
  Stack<Integer> stack=new Stack<Integer>();
  HashSet<Integer> children;
  List<List<TMutableNode>> spNodes=new ArrayList<List<TMutableNode>>();
  for (  TNode node : st.postTraverse()) {
    if (node.isLeaf()) {
      int spID=this.getSpeciesIdForTaxon(GlobalMaps.taxonIdentifier.taxonId(node.getName()));
      stack.push(spID);
      if (!node.getName().equals(this.getSpeciesName(spID))) {
        ((TMutableNode)node).setName(this.getSpeciesName(spID));
      }
    }
 else {
      children=new HashSet<Integer>();
      List<TMutableNode> childnodes=new ArrayList<TMutableNode>();
      for (      TNode c : node.getChildren()) {
        children.add(stack.pop());
        childnodes.add((TMutableNode)c);
      }
      if (children.size() == 1) {
        Integer spnode=children.iterator().next();
        if (spnode != -1) {
          ((TMutableNode)node).setName(this.getSpeciesName(spnode));
          ((STINode)node).setData(null);
          spNodes.add(childnodes);
          System.err.println("String_Node_Str");
        }
        stack.push(spnode);
      }
 else {
        stack.push(-1);
      }
    }
  }
  for (  List<TMutableNode> nodes : spNodes) {
    for (    TNode c : nodes) {
      ((TMutableNode)c).removeNode();
    }
  }
}

Fixed version (ground truth):
public void gtToSt2(MutableTree gt){
  Stack<Integer> stack=new Stack<Integer>();
  HashSet<Integer> children;
  List<List<TMutableNode>> spNodes=new ArrayList<List<TMutableNode>>();
  for (  TNode node : gt.postTraverse()) {
    if (node.isLeaf()) {
      int spID=this.getSpeciesIdForTaxon(GlobalMaps.taxonIdentifier.taxonId(node.getName()));
      stack.push(spID);
      if (!node.getName().equals(this.getSpeciesName(spID))) {
        ((TMutableNode)node).setName(this.getSpeciesName(spID));
      }
    }
 else {
      children=new HashSet<Integer>();
      List<TMutableNode> childnodes=new ArrayList<TMutableNode>();
      for (      TNode c : node.getChildren()) {
        children.add(stack.pop());
        childnodes.add((TMutableNode)c);
      }
      if (children.size() == 1) {
        Integer spnode=children.iterator().next();
        if (spnode != -1) {
          ((TMutableNode)node).setName(this.getSpeciesName(spnode));
          ((STINode)node).setData(null);
          spNodes.add(childnodes);
          System.err.println("String_Node_Str");
        }
        stack.push(spnode);
      }
 else {
        stack.push(-1);
      }
    }
  }
  for (  List<TMutableNode> nodes : spNodes) {
    for (    TNode c : nodes) {
      ((TMutableNode)c).removeNode();
    }
  }
}
Program: 125156
Project: 125156
Buggy source:
/** 
 * Adds bipartitions to X. When only one individual from each species is sampled, this method adds other individuals from that species to the cluster as well, but note that these additions are done on a copy of c1 not c1 itself.
 */
private boolean addSpeciesBipartitionToX(final STITreeCluster c1){
  boolean added=false;
  STITreeCluster c1GT=GlobalMaps.taxonNameMap.getSpeciesIdMapper().getGeneClusterForSTCluster(c1);
  added|=this.addCompletedSpeciesFixedBipartionToX(c1GT,c1GT.complementaryCluster());
  return added;
}

Fixed version (ground truth):
/** 
 * Adds bipartitions to X. When only one individual from each species is sampled, this method adds other individuals from that species to the cluster as well, but note that these additions are done on a copy of c1 not c1 itself.
 */
private boolean addSpeciesBipartitionToX(final STITreeCluster stCluster){
  boolean added=false;
  STITreeCluster c1GT=GlobalMaps.taxonNameMap.getSpeciesIdMapper().getGeneClusterForSTCluster(stCluster);
  added|=this.addCompletedSpeciesFixedBipartionToX(c1GT,c1GT.complementaryCluster());
  return added;
}
Program: 125159
Project: 125159
Buggy source:
/** 
 * Given a bitset that shows one side of a bipartition this method adds the bipartition to the set X. Importantly, when the input bitset has only one (or a sbuset) of individuals belonging to a species set, the other individuals from that species are also set to one before adding the bipartition to the set X. Thus, all individuals from the same species will be on the same side of the bipartition. These additions are done on a copy of the input bitset not the instance passed in.
 * @param bs
 * @return was the cluster new?
 */
private boolean addSpeciesBitSetToX(final BitSet bs){
  STITreeCluster cluster=GlobalMaps.taxonNameMap.getSpeciesIdMapper().getSTTaxonIdentifier().newCluster();
  cluster.setCluster(bs);
  return this.addSpeciesBipartitionToX(cluster);
}

Fixed version (ground truth):
/** 
 * Given a bitset that shows one side of a bipartition this method adds the bipartition to the set X. Importantly, when the input bitset has only one (or a sbuset) of individuals belonging to a species set, the other individuals from that species are also set to one before adding the bipartition to the set X. Thus, all individuals from the same species will be on the same side of the bipartition. These additions are done on a copy of the input bitset not the instance passed in.
 * @param stBitSet
 * @return was the cluster new?
 */
private boolean addSpeciesBitSetToX(final BitSet stBitSet){
  STITreeCluster cluster=GlobalMaps.taxonNameMap.getSpeciesIdMapper().getSTTaxonIdentifier().newCluster();
  cluster.setCluster(stBitSet);
  return this.addSpeciesBipartitionToX(cluster);
}
Program: 125160
Project: 125160
Buggy source:
public void addExtraBipartitionsByInput(IClusterCollection extraClusters,List<Tree> trees,boolean extraTreeRooted){
  traverseTrees(trees,false,null,this.orderedTaxonByDist != null);
  int s=extraClusters.getClusterCount();
  System.err.println("String_Node_Str" + s);
}

Fixed version (ground truth):
public void addExtraBipartitionsByInput(IClusterCollection extraClusters,List<Tree> trees,boolean extraTreeRooted){
  List<STITreeCluster> extraTreeAllCluster=new ArrayList<STITreeCluster>();
  for (  Tree tr : trees) {
    String[] gtLeaves=tr.getLeaves();
    STITreeCluster gtAll=new STITreeCluster();
    for (int i=0; i < gtLeaves.length; i++) {
      gtAll.addLeaf(GlobalMaps.taxonIdentifier.taxonId(gtLeaves[i]));
    }
    extraTreeAllCluster.add(gtAll);
  }
  traverseTrees(trees,false,null,this.orderedTaxonByDist != null,extraTreeAllCluster);
  int s=extraClusters.getClusterCount();
  System.err.println("String_Node_Str" + s);
}
Program: 125164
Project: 125164
Buggy source:
public void addExtraBipartitionsByInput(IClusterCollection extraClusters,List<Tree> trees,boolean extraTreeRooted){
  traverseTrees(trees,false,null,this.orderedTaxonByDist != null);
  int s=extraClusters.getClusterCount();
  System.err.println("String_Node_Str" + s);
}

Fixed version (ground truth):
public void addExtraBipartitionsByInput(IClusterCollection extraClusters,List<Tree> trees,boolean extraTreeRooted){
  List<STITreeCluster> extraTreeAllCluster=new ArrayList<STITreeCluster>();
  for (  Tree tr : trees) {
    String[] gtLeaves=tr.getLeaves();
    STITreeCluster gtAll=new STITreeCluster();
    for (int i=0; i < gtLeaves.length; i++) {
      gtAll.addLeaf(GlobalMaps.taxonIdentifier.taxonId(gtLeaves[i]));
    }
    extraTreeAllCluster.add(gtAll);
  }
  traverseTrees(trees,false,null,this.orderedTaxonByDist != null,extraTreeAllCluster);
  int s=extraClusters.getClusterCount();
  System.err.println("String_Node_Str" + s);
}
Program: 125168
Project: 125168
Buggy source:
@Override public int compare(Entry<STITreeCluster,Integer> o1,Entry<STITreeCluster,Integer> o2){
  int a=o2.getValue().compareTo(o1.getValue());
  if (a != 0) {
    return a;
  }
  if (o2.getKey().equals(o1)) {
    return 0;
  }
  int i=0;
  while (i >= 0) {
    int j=o1.getKey().getBitSet().nextSetBit(i);
    int jj=o2.getKey().getBitSet().nextSetBit(i);
    if (j != jj) {
      return (j > jj) ? -1 : 1;
    }
 else {
      if (j == -1) {
        break;
      }
      i=j + 1;
    }
  }
  throw new RuntimeException("String_Node_Str");
}

Fixed version (ground truth):
@Override public int compare(Entry<STITreeCluster,Integer> o1,Entry<STITreeCluster,Integer> o2){
  int a=o2.getValue().compareTo(o1.getValue());
  if (a != 0) {
    return a;
  }
  if (o2.getKey().equals(o1.getKey())) {
    return 0;
  }
  int i=0;
  while (i >= 0) {
    int j=o1.getKey().getBitSet().nextSetBit(i);
    int jj=o2.getKey().getBitSet().nextSetBit(i);
    if (j != jj) {
      return (j > jj) ? -1 : 1;
    }
 else {
      if (j == -1) {
        break;
      }
      i=j + 1;
    }
  }
  throw new RuntimeException("String_Node_Str");
}
Program: 125170
Project: 125170
Buggy source:
@Override public int compare(Entry<STITreeCluster,Integer> o1,Entry<STITreeCluster,Integer> o2){
  int a=o2.getValue().compareTo(o1.getValue());
  if (a != 0) {
    return a;
  }
  if (o2.getKey().equals(o1)) {
    return 0;
  }
  int i=0;
  while (i >= 0) {
    int j=o1.getKey().getBitSet().nextSetBit(i);
    int jj=o2.getKey().getBitSet().nextSetBit(i);
    if (j != jj) {
      return (j > jj) ? -1 : 1;
    }
 else {
      if (j == -1) {
        break;
      }
      i=j + 1;
    }
  }
  throw new RuntimeException("String_Node_Str");
}

Fixed version (ground truth):
@Override public int compare(Entry<STITreeCluster,Integer> o1,Entry<STITreeCluster,Integer> o2){
  int a=o2.getValue().compareTo(o1.getValue());
  if (a != 0) {
    return a;
  }
  if (o2.getKey().equals(o1.getKey())) {
    return 0;
  }
  int i=0;
  while (i >= 0) {
    int j=o1.getKey().getBitSet().nextSetBit(i);
    int jj=o2.getKey().getBitSet().nextSetBit(i);
    if (j != jj) {
      return (j > jj) ? -1 : 1;
    }
 else {
      if (j == -1) {
        break;
      }
      i=j + 1;
    }
  }
  throw new RuntimeException("String_Node_Str");
}
Program: 125173
Project: 125173
Buggy source:
public static int getClusterCoalNum_rooted(Tree tr,STITreeCluster cluster){
  Map map=new HashMap();
  List taxa=GlobalMaps.taxonIdentifier.getTaxonList();
  int count=0;
  for (  TNode node : tr.postTraverse()) {
    if (node.isLeaf()) {
      int index=taxa.indexOf(node.getName());
      BitSet bs=new BitSet();
      bs.set(index);
      if (cluster.containsCluster(bs)) {
        count++;
      }
      map.put(node,bs);
    }
 else {
      BitSet bs=new BitSet();
      int intersect=0;
      int childCount=node.getChildCount();
      for (      TNode child : node.getChildren()) {
        BitSet v=(BitSet)map.get(child);
        bs.or(v);
        if ((!cluster.containsCluster(v)))         continue;
        intersect++;
      }
      if (cluster.containsCluster(bs)) {
        count-=node.getChildCount();
        count++;
      }
 else       if (intersect > 1) {
        count-=intersect;
        count++;
      }
      map.put(node,bs);
    }
  }
  return Math.max(count - 1,0);
}

Fixed version (ground truth):
public static int getClusterCoalNum_rooted(Tree tr,STITreeCluster cluster){
  Map map=new HashMap();
  int count=0;
  for (  TNode node : tr.postTraverse()) {
    if (node.isLeaf()) {
      int index=GlobalMaps.taxonIdentifier.taxonId(node.getName());
      BitSet bs=new BitSet();
      bs.set(index);
      if (cluster.containsCluster(bs)) {
        count++;
      }
      map.put(node,bs);
    }
 else {
      BitSet bs=new BitSet();
      int intersect=0;
      int childCount=node.getChildCount();
      for (      TNode child : node.getChildren()) {
        BitSet v=(BitSet)map.get(child);
        bs.or(v);
        if ((!cluster.containsCluster(v)))         continue;
        intersect++;
      }
      if (cluster.containsCluster(bs)) {
        count-=node.getChildCount();
        count++;
      }
 else       if (intersect > 1) {
        count-=intersect;
        count++;
      }
      map.put(node,bs);
    }
  }
  return Math.max(count - 1,0);
}
Program: 125174
Project: 125174
Buggy source:
public static int getClusterCoalNum_rootedMap(Tree tr,STITreeCluster cluster){
  Map map=new HashMap();
  List taxa=GlobalMaps.taxonIdentifier.getTaxonList();
  int count=0;
  for (  TNode node : tr.postTraverse()) {
    if (node.isLeaf()) {
      String stTaxon=(String)GlobalMaps.taxonNameMap.getTaxonName(node.getName());
      int index=taxa.indexOf(stTaxon);
      BitSet bs=new BitSet(taxa.size());
      bs.set(index);
      if (cluster.containsCluster(bs)) {
        count++;
      }
      map.put(node,bs);
    }
 else {
      BitSet bs=new BitSet(taxa.size());
      int intersect=0;
      int childCount=node.getChildCount();
      for (      TNode child : node.getChildren()) {
        BitSet v=(BitSet)map.get(child);
        bs.or(v);
        if ((childCount <= 2) || (!cluster.containsCluster(v)))         continue;
        intersect++;
      }
      if (cluster.containsCluster(bs)) {
        count-=node.getChildCount();
        count++;
      }
 else       if (intersect > 1) {
        count-=intersect;
        count++;
      }
      map.put(node,bs);
    }
  }
  return Math.max(count - 1,0);
}

Fixed version (ground truth):
public static int getClusterCoalNum_rootedMap(Tree tr,STITreeCluster cluster){
  Map map=new HashMap();
  int count=0;
  for (  TNode node : tr.postTraverse()) {
    if (node.isLeaf()) {
      String stTaxon=(String)GlobalMaps.taxonNameMap.getTaxonName(node.getName());
      int index=GlobalMaps.taxonIdentifier.taxonId(stTaxon);
      BitSet bs=new BitSet(GlobalMaps.taxonIdentifier.taxonCount());
      bs.set(index);
      if (cluster.containsCluster(bs)) {
        count++;
      }
      map.put(node,bs);
    }
 else {
      BitSet bs=new BitSet(GlobalMaps.taxonIdentifier.taxonCount());
      int intersect=0;
      int childCount=node.getChildCount();
      for (      TNode child : node.getChildren()) {
        BitSet v=(BitSet)map.get(child);
        bs.or(v);
        if ((childCount <= 2) || (!cluster.containsCluster(v)))         continue;
        intersect++;
      }
      if (cluster.containsCluster(bs)) {
        count-=node.getChildCount();
        count++;
      }
 else       if (intersect > 1) {
        count-=intersect;
        count++;
      }
      map.put(node,bs);
    }
  }
  return Math.max(count - 1,0);
}
Program: 125178
Project: 125178
Buggy source:
public int taxonCount(){
  return idToName.size();
}

Fixed version (ground truth):
public int taxonCount(){
  return taxonCount;
}
Program: 125179
Project: 125179
Buggy source:
public Integer taxonId(String name){
  if (!nameToId.containsKey(name)) {
    nameToId.put(name,idToName.size());
    idToName.add(name);
  }
  return nameToId.get(name);
}

Fixed version (ground truth):
public Integer taxonId(String name){
  Integer a=nameToId.get(name);
  if (a == null) {
    nameToId.put(name,taxonCount);
    idToName.add(name);
    a=taxonCount;
    taxonCount++;
  }
  return a;
}
Program: 125180
Project: 125180
Buggy source:
public String toString2(){
  StringBuffer out=new StringBuffer();
  out.append("String_Node_Str");
  for (  String s : getClusterLeaves()) {
    out.append(s + "String_Node_Str");
  }
  out.delete(out.length() - 2,out.length());
  out.append("String_Node_Str");
  out.append(this._cluster);
  out.append("String_Node_Str");
  out.append(GlobalMaps.taxonIdentifier.getTaxonList());
  out.append("String_Node_Str");
  out.append(GlobalMaps.taxonIdentifier.taxonCount());
  return out.toString();
}

Fixed version (ground truth):
public String toString2(){
  StringBuffer out=new StringBuffer();
  out.append("String_Node_Str");
  for (  String s : getClusterLeaves()) {
    out.append(s + "String_Node_Str");
  }
  out.delete(out.length() - 2,out.length());
  out.append("String_Node_Str");
  out.append(this._cluster);
  out.append("String_Node_Str");
  out.append("String_Node_Str");
  out.append(GlobalMaps.taxonIdentifier.taxonCount());
  return out.toString();
}
Program: 125182
Project: 125182
Buggy source:
public static int getClusterCoalNum_rooted(Tree tr,STITreeCluster cluster){
  Map map=new HashMap();
  List taxa=GlobalMaps.taxonIdentifier.getTaxonList();
  int count=0;
  for (  TNode node : tr.postTraverse()) {
    if (node.isLeaf()) {
      int index=taxa.indexOf(node.getName());
      BitSet bs=new BitSet();
      bs.set(index);
      if (cluster.containsCluster(bs)) {
        count++;
      }
      map.put(node,bs);
    }
 else {
      BitSet bs=new BitSet();
      int intersect=0;
      int childCount=node.getChildCount();
      for (      TNode child : node.getChildren()) {
        BitSet v=(BitSet)map.get(child);
        bs.or(v);
        if ((!cluster.containsCluster(v)))         continue;
        intersect++;
      }
      if (cluster.containsCluster(bs)) {
        count-=node.getChildCount();
        count++;
      }
 else       if (intersect > 1) {
        count-=intersect;
        count++;
      }
      map.put(node,bs);
    }
  }
  return Math.max(count - 1,0);
}

Fixed version (ground truth):
public static int getClusterCoalNum_rooted(Tree tr,STITreeCluster cluster){
  Map map=new HashMap();
  int count=0;
  for (  TNode node : tr.postTraverse()) {
    if (node.isLeaf()) {
      int index=GlobalMaps.taxonIdentifier.taxonId(node.getName());
      BitSet bs=new BitSet();
      bs.set(index);
      if (cluster.containsCluster(bs)) {
        count++;
      }
      map.put(node,bs);
    }
 else {
      BitSet bs=new BitSet();
      int intersect=0;
      int childCount=node.getChildCount();
      for (      TNode child : node.getChildren()) {
        BitSet v=(BitSet)map.get(child);
        bs.or(v);
        if ((!cluster.containsCluster(v)))         continue;
        intersect++;
      }
      if (cluster.containsCluster(bs)) {
        count-=node.getChildCount();
        count++;
      }
 else       if (intersect > 1) {
        count-=intersect;
        count++;
      }
      map.put(node,bs);
    }
  }
  return Math.max(count - 1,0);
}
Program: 125183
Project: 125183
Buggy source:
public static int getClusterCoalNum_rootedMap(Tree tr,STITreeCluster cluster){
  Map map=new HashMap();
  List taxa=GlobalMaps.taxonIdentifier.getTaxonList();
  int count=0;
  for (  TNode node : tr.postTraverse()) {
    if (node.isLeaf()) {
      String stTaxon=(String)GlobalMaps.taxonNameMap.getTaxonName(node.getName());
      int index=taxa.indexOf(stTaxon);
      BitSet bs=new BitSet(taxa.size());
      bs.set(index);
      if (cluster.containsCluster(bs)) {
        count++;
      }
      map.put(node,bs);
    }
 else {
      BitSet bs=new BitSet(taxa.size());
      int intersect=0;
      int childCount=node.getChildCount();
      for (      TNode child : node.getChildren()) {
        BitSet v=(BitSet)map.get(child);
        bs.or(v);
        if ((childCount <= 2) || (!cluster.containsCluster(v)))         continue;
        intersect++;
      }
      if (cluster.containsCluster(bs)) {
        count-=node.getChildCount();
        count++;
      }
 else       if (intersect > 1) {
        count-=intersect;
        count++;
      }
      map.put(node,bs);
    }
  }
  return Math.max(count - 1,0);
}

Fixed version (ground truth):
public static int getClusterCoalNum_rootedMap(Tree tr,STITreeCluster cluster){
  Map map=new HashMap();
  int count=0;
  for (  TNode node : tr.postTraverse()) {
    if (node.isLeaf()) {
      String stTaxon=(String)GlobalMaps.taxonNameMap.getTaxonName(node.getName());
      int index=GlobalMaps.taxonIdentifier.taxonId(stTaxon);
      BitSet bs=new BitSet(GlobalMaps.taxonIdentifier.taxonCount());
      bs.set(index);
      if (cluster.containsCluster(bs)) {
        count++;
      }
      map.put(node,bs);
    }
 else {
      BitSet bs=new BitSet(GlobalMaps.taxonIdentifier.taxonCount());
      int intersect=0;
      int childCount=node.getChildCount();
      for (      TNode child : node.getChildren()) {
        BitSet v=(BitSet)map.get(child);
        bs.or(v);
        if ((childCount <= 2) || (!cluster.containsCluster(v)))         continue;
        intersect++;
      }
      if (cluster.containsCluster(bs)) {
        count-=node.getChildCount();
        count++;
      }
 else       if (intersect > 1) {
        count-=intersect;
        count++;
      }
      map.put(node,bs);
    }
  }
  return Math.max(count - 1,0);
}
Program: 125187
Project: 125187
Buggy source:
public int taxonCount(){
  return idToName.size();
}

Fixed version (ground truth):
public int taxonCount(){
  return taxonCount;
}
Program: 125188
Project: 125188
Buggy source:
public Integer taxonId(String name){
  if (!nameToId.containsKey(name)) {
    nameToId.put(name,idToName.size());
    idToName.add(name);
  }
  return nameToId.get(name);
}

Fixed version (ground truth):
public Integer taxonId(String name){
  Integer a=nameToId.get(name);
  if (a == null) {
    nameToId.put(name,taxonCount);
    idToName.add(name);
    a=taxonCount;
    taxonCount++;
  }
  return a;
}
Program: 125189
Project: 125189
Buggy source:
public String toString2(){
  StringBuffer out=new StringBuffer();
  out.append("String_Node_Str");
  for (  String s : getClusterLeaves()) {
    out.append(s + "String_Node_Str");
  }
  out.delete(out.length() - 2,out.length());
  out.append("String_Node_Str");
  out.append(this._cluster);
  out.append("String_Node_Str");
  out.append(GlobalMaps.taxonIdentifier.getTaxonList());
  out.append("String_Node_Str");
  out.append(GlobalMaps.taxonIdentifier.taxonCount());
  return out.toString();
}

Fixed version (ground truth):
public String toString2(){
  StringBuffer out=new StringBuffer();
  out.append("String_Node_Str");
  for (  String s : getClusterLeaves()) {
    out.append(s + "String_Node_Str");
  }
  out.delete(out.length() - 2,out.length());
  out.append("String_Node_Str");
  out.append(this._cluster);
  out.append("String_Node_Str");
  out.append("String_Node_Str");
  out.append(GlobalMaps.taxonIdentifier.taxonCount());
  return out.toString();
}
Program: 125194
Project: 125194
Buggy source:
int calculateMissingWeight(){
  System.err.print("String_Node_Str" + biggerSTB);
  Integer count=geneTreeSTBCount.get(biggerSTB);
  count=count != null ? count : 0;
  int weight=count;
  for (int j=biggerSTB.c.getClusterSize() - 1; j > 1; j--) {
    Set<STBipartition> smallerSTBs=geneTreeSTBBySize.get(j);
    for (    STBipartition smallerSTB : smallerSTBs) {
      if (smallerSTB.isDominatedBy(biggerSTB)) {
        weight+=geneTreeSTBCount.get(smallerSTB);
      }
    }
  }
  System.err.print("String_Node_Str" + weight);
  if (!rooted) {
    for (    STBipartition rootSTB : geneTreeRootSTBs.keySet()) {
      int c=geneTreeRootSTBs.get(rootSTB);
      STBipartition inducedSTB=biggerSTB.getInducedSTB(rootSTB.c);
      if (inducedSTB.equals(rootSTB)) {
        weight-=2 * c;
        System.err.print("String_Node_Str" + rootSTB + "String_Node_Str"+ c+ "String_Node_Str"+ weight);
        if (inducedSTB.cluster1.getClusterSize() != 1 && inducedSTB.cluster2.getClusterSize() != 1) {
          weight-=2 * c;
          System.err.print("String_Node_Str" + weight);
        }
      }
    }
  }
  System.err.println();
  weights.put(biggerSTB,weight);
  return weight;
}

Fixed version (ground truth):
int calculateMissingWeight(){
  Integer count=geneTreeSTBCount.get(biggerSTB);
  count=count != null ? count : 0;
  int weight=count;
  for (int j=biggerSTB.c.getClusterSize() - 1; j > 1; j--) {
    Set<STBipartition> smallerSTBs=geneTreeSTBBySize.get(j);
    for (    STBipartition smallerSTB : smallerSTBs) {
      if (smallerSTB.isDominatedBy(biggerSTB)) {
        weight+=geneTreeSTBCount.get(smallerSTB);
      }
    }
  }
  if (!rooted) {
    for (    STBipartition rootSTB : geneTreeRootSTBs.keySet()) {
      int c=geneTreeRootSTBs.get(rootSTB);
      STBipartition inducedSTB=biggerSTB.getInducedSTB(rootSTB.c);
      if (inducedSTB.equals(rootSTB)) {
        weight-=2 * c;
        if (inducedSTB.cluster1.getClusterSize() != 1 && inducedSTB.cluster2.getClusterSize() != 1) {
          weight-=2 * c;
        }
      }
    }
  }
  weights.put(biggerSTB,weight);
  return weight;
}
Program: 125200
Project: 125200
Buggy source:
private void addSTB(Map<Integer,Set<Vertex>> clusters,STITreeCluster l_cluster,STITreeCluster r_cluster,STITreeCluster cluster,TNode node){
  int size=cluster.getClusterSize();
  if (l_cluster.isDisjoint(r_cluster)) {
    STBipartition stb=new STBipartition(l_cluster,r_cluster,cluster);
    geneTreeSTBBySize.get(size).add(stb);
    ((STINode)node).setData(stb);
    addSTBToX(clusters,stb);
    STBCountInGeneTrees.put(stb,STBCountInGeneTrees.containsKey(stb) ? STBCountInGeneTrees.get(stb) + 1 : 1);
  }
 else {
    BitSet and=(BitSet)l_cluster.getCluster().clone();
    and.and(r_cluster.getCluster());
    BitSet l_Minus_r=(BitSet)and.clone();
    l_Minus_r.xor(l_cluster.getCluster());
    STITreeCluster lmr=new STITreeCluster(stTaxa);
    lmr.setCluster(l_Minus_r);
    BitSet r_Minus_l=(BitSet)and.clone();
    r_Minus_l.xor(r_cluster.getCluster());
    STITreeCluster rml=new STITreeCluster(stTaxa);
    rml.setCluster(r_Minus_l);
    if (!rml.getCluster().isEmpty()) {
      addToClusters(clusters,rml,rml.getClusterSize());
      addSTBToX(clusters,new STBipartition(l_cluster,rml,cluster));
    }
    if (!lmr.getCluster().isEmpty()) {
      addToClusters(clusters,lmr,lmr.getClusterSize());
      addSTBToX(clusters,new STBipartition(lmr,r_cluster,cluster));
    }
  }
}

Fixed version (ground truth):
private void addSTB(Map<Integer,Set<Vertex>> clusters,STITreeCluster l_cluster,STITreeCluster r_cluster,STITreeCluster cluster,TNode node){
  if (cluster == null) {
    cluster=new STITreeCluster(l_cluster);
    cluster.getCluster().or(r_cluster.getCluster());
  }
  int size=cluster.getClusterSize();
  if (l_cluster.isDisjoint(r_cluster)) {
    STBipartition stb=new STBipartition(l_cluster,r_cluster,cluster);
    geneTreeSTBBySize.get(size).add(stb);
    ((STINode)node).setData(stb);
    addSTBToX(clusters,stb);
    STBCountInGeneTrees.put(stb,STBCountInGeneTrees.containsKey(stb) ? STBCountInGeneTrees.get(stb) + 1 : 1);
  }
 else {
    BitSet and=(BitSet)l_cluster.getCluster().clone();
    and.and(r_cluster.getCluster());
    BitSet l_Minus_r=(BitSet)and.clone();
    l_Minus_r.xor(l_cluster.getCluster());
    STITreeCluster lmr=new STITreeCluster(stTaxa);
    lmr.setCluster(l_Minus_r);
    BitSet r_Minus_l=(BitSet)and.clone();
    r_Minus_l.xor(r_cluster.getCluster());
    STITreeCluster rml=new STITreeCluster(stTaxa);
    rml.setCluster(r_Minus_l);
    if (!rml.getCluster().isEmpty()) {
      addToClusters(clusters,rml,rml.getClusterSize());
      addSTBToX(clusters,new STBipartition(l_cluster,rml,cluster));
    }
    if (!lmr.getCluster().isEmpty()) {
      addToClusters(clusters,lmr,lmr.getClusterSize());
      addSTBToX(clusters,new STBipartition(lmr,r_cluster,cluster));
    }
  }
}
Program: 125201
Project: 125201
Buggy source:
@Override public String toString(){
  return cluster1.toString() + "String_Node_Str" + cluster2.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  return cluster1.toString() + "String_Node_Str" + cluster2.toString()+ "String_Node_Str"+ c+ "String_Node_Str";
}
Program: 125204
Project: 125204
Buggy source:
protected static void printUsage(){
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println();
}

Fixed version (ground truth):
protected static void printUsage(){
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println();
}
Program: 125210
Project: 125210
Buggy source:
public String getTaxonName(String geneName){
  if (pattern != null) {
    return geneName.replaceAll(pattern,rep);
  }
 else {
    return taxonMap.get(geneName);
  }
}

Fixed version (ground truth):
public String getTaxonName(String geneName){
  if (geneName == null || "String_Node_Str".equals(geneName)) {
    throw new RuntimeException("String_Node_Str");
  }
  if (pattern != null) {
    String s=geneName.replaceAll(pattern,rep);
    return s;
  }
 else {
    return taxonMap.get(geneName);
  }
}
Program: 125215
Project: 125215
Buggy source:
@Override public ModuleNeeded clone(){
  ModuleNeeded cloned=new ModuleNeeded(context,moduleName,informationMsg,mrRequired,installURL,requiredIf,mavenUri);
  cloned.bundleName=bundleName;
  cloned.bundleVersion=bundleVersion;
  cloned.context=context;
  cloned.dynamic=dynamic;
  cloned.excludeDependencies=cloned.excludeDependencies;
  if (extraAttributes != null && !extraAttributes.isEmpty()) {
    cloned.extraAttributes=new HashMap<>(extraAttributes);
  }
  cloned.id=id;
  cloned.informationMsg=informationMsg;
  cloned.installStatus=installStatus;
  if (installURL != null && !installURL.isEmpty()) {
    cloned.installURL=new ArrayList<>(installURL);
  }
  cloned.isShow=isShow;
  cloned.libManagerService=libManagerService;
  cloned.mavenUri=mavenUri;
  cloned.mavenUriFromConfiguration=mavenUriFromConfiguration;
  cloned.moduleLocaion=moduleLocaion;
  cloned.moduleName=moduleName;
  cloned.mrRequired=mrRequired;
  cloned.required=required;
  cloned.requiredIf=requiredIf;
  cloned.status=status;
  return cloned;
}

Fixed version (ground truth):
@Override public ModuleNeeded clone(){
  ModuleNeeded cloned=new ModuleNeeded(context,moduleName,informationMsg,mrRequired,installURL,requiredIf,mavenUri);
  cloned.bundleName=bundleName;
  cloned.bundleVersion=bundleVersion;
  cloned.context=context;
  cloned.dynamic=dynamic;
  cloned.excludeDependencies=excludeDependencies;
  if (extraAttributes != null && !extraAttributes.isEmpty()) {
    cloned.extraAttributes=new HashMap<>(extraAttributes);
  }
  cloned.id=id;
  cloned.informationMsg=informationMsg;
  cloned.installStatus=installStatus;
  if (installURL != null && !installURL.isEmpty()) {
    cloned.installURL=new ArrayList<>(installURL);
  }
  cloned.isShow=isShow;
  cloned.libManagerService=libManagerService;
  cloned.mavenUri=mavenUri;
  cloned.mavenUriFromConfiguration=mavenUriFromConfiguration;
  cloned.moduleLocaion=moduleLocaion;
  cloned.moduleName=moduleName;
  cloned.mrRequired=mrRequired;
  cloned.required=required;
  cloned.requiredIf=requiredIf;
  cloned.status=status;
  return cloned;
}
Program: 125217
Project: 125217
Buggy source:
private File getInstalledFileFromLocalRepo(String groupId,String artifactId,String version,String packaging) throws IOException {
  String projectMvnUrl=MavenUrlHelper.generateMvnUrl(groupId,artifactId,version,packaging,null);
  String projectLocalMavenUri=projectMvnUrl.replace("String_Node_Str","String_Node_Str" + MavenConstants.LOCAL_RESOLUTION_URL + "String_Node_Str");
  File installedFile=null;
  try {
    Thread.sleep(3000);
    installedFile=TalendMavenResolver.getMavenResolver().resolve(projectLocalMavenUri);
  }
 catch (  IOException e) {
    try {
      Thread.sleep(3000);
      installedFile=TalendMavenResolver.getMavenResolver().resolve(projectLocalMavenUri);
    }
 catch (    InterruptedException e1) {
    }
catch (    IOException e1) {
      throw e1;
    }
  }
catch (  InterruptedException e) {
  }
  return installedFile;
}

Fixed version (ground truth):
private File getInstalledFileFromLocalRepo(String groupId,String artifactId,String version,String packaging) throws IOException {
  String projectMvnUrl=MavenUrlHelper.generateMvnUrl(groupId,artifactId,version,packaging,null);
  String projectLocalMavenUri=projectMvnUrl.replace("String_Node_Str","String_Node_Str" + MavenConstants.LOCAL_RESOLUTION_URL + "String_Node_Str");
  File installedFile=TalendMavenResolver.getMavenResolver().resolve(projectLocalMavenUri);
  return installedFile;
}