nus-yam/ex-repair huggingface dataset:
Program: 135596
Project: 135596
Buggy source:
public void setLabels(ObservableList<TurboLabel> labels){
  if (this.labels == labels) {
    return;
  }
  this.labels.clear();
  for (  TurboLabel label : labels) {
    this.labels.add(getLabelReference(label));
  }
  for (  TurboLabel currentLabel : labels) {
    if (UserConfigurations.isClosedStatusLabel(currentLabel.toGhName())) {
      this.setOpen(false);
      return;
    }
  }
  if (!getOpen()) {
    for (    TurboLabel currentLabel : labels) {
      if (UserConfigurations.isOpenStatusLabel(currentLabel.toGhName())) {
        this.setOpen(true);
        return;
      }
    }
  }
}

Fixed version (ground truth):
public void setLabels(ObservableList<TurboLabel> labels){
  this.labels=FXCollections.observableArrayList();
  for (  TurboLabel label : labels) {
    this.labels.add(getLabelReference(label));
  }
  for (  TurboLabel currentLabel : labels) {
    if (UserConfigurations.isClosedStatusLabel(currentLabel.toGhName())) {
      this.setOpen(false);
      return;
    }
  }
  if (!getOpen()) {
    for (    TurboLabel currentLabel : labels) {
      if (UserConfigurations.isOpenStatusLabel(currentLabel.toGhName())) {
        this.setOpen(true);
        return;
      }
    }
  }
}
Program: 135597
Project: 135597
Buggy source:
public void setItems(ObservableList<String> items){
  listeners.clear();
  ObservableList<BetterCheckListItem> newItems=FXCollections.observableArrayList();
  WeakReference<BetterCheckListView> that=new WeakReference<>(this);
  for (int i=0; i < items.size(); i++) {
    final int j=i;
    BetterCheckListItem item=new BetterCheckListItem(items.get(i),false);
    WeakChangeListener<Boolean> listener=new WeakChangeListener<Boolean>(new ChangeListener<Boolean>(){
      public void changed(      ObservableValue<? extends Boolean> ov,      Boolean oldValue,      Boolean newValue){
        if (!disabled) {
          if (singleSelection) {
            disabled=true;
            for (            BetterCheckListItem item : that.get().items) {
              item.setChecked(false);
            }
            that.get().items.get(j).setChecked(true);
            disabled=false;
          }
        }
      }
    }
);
    item.checkedProperty().addListener(listener);
    listeners.add(listener);
    newItems.add(item);
  }
  this.items=newItems;
  refresh();
}

Fixed version (ground truth):
public void setItems(ObservableList<String> items){
  listeners.clear();
  ObservableList<BetterCheckListItem> newItems=FXCollections.observableArrayList();
  WeakReference<BetterCheckListView> that=new WeakReference<>(this);
  for (int i=0; i < items.size(); i++) {
    final int j=i;
    BetterCheckListItem item=new BetterCheckListItem(items.get(i),false);
    ChangeListener<Boolean> strongListener=new ChangeListener<Boolean>(){
      public void changed(      ObservableValue<? extends Boolean> ov,      Boolean oldValue,      Boolean newValue){
        if (!disabled) {
          if (singleSelection) {
            disabled=true;
            for (            BetterCheckListItem item : that.get().items) {
              item.setChecked(false);
            }
            that.get().items.get(j).setChecked(true);
            disabled=false;
          }
        }
      }
    }
;
    WeakChangeListener<Boolean> weakListener=new WeakChangeListener<Boolean>(strongListener);
    item.checkedProperty().addListener(weakListener);
    listeners.add(strongListener);
    newItems.add(item);
  }
  this.items=newItems;
  refresh();
}
Program: 135598
Project: 135598
Buggy source:
public void setLabels(ObservableList<TurboLabel> labels){
  if (this.labels == labels) {
    return;
  }
  this.labels.clear();
  for (  TurboLabel label : labels) {
    this.labels.add(getLabelReference(label));
  }
  for (  TurboLabel currentLabel : labels) {
    if (UserConfigurations.isClosedStatusLabel(currentLabel.toGhName())) {
      this.setOpen(false);
      return;
    }
  }
  if (!getOpen()) {
    for (    TurboLabel currentLabel : labels) {
      if (UserConfigurations.isOpenStatusLabel(currentLabel.toGhName())) {
        this.setOpen(true);
        return;
      }
    }
  }
}

Fixed version (ground truth):
public void setLabels(ObservableList<TurboLabel> labels){
  this.labels=FXCollections.observableArrayList();
  for (  TurboLabel label : labels) {
    this.labels.add(getLabelReference(label));
  }
  for (  TurboLabel currentLabel : labels) {
    if (UserConfigurations.isClosedStatusLabel(currentLabel.toGhName())) {
      this.setOpen(false);
      return;
    }
  }
  if (!getOpen()) {
    for (    TurboLabel currentLabel : labels) {
      if (UserConfigurations.isOpenStatusLabel(currentLabel.toGhName())) {
        this.setOpen(true);
        return;
      }
    }
  }
}
Program: 135599
Project: 135599
Buggy source:
private void logLabelChange(HashSet<TurboLabel> removed,HashSet<TurboLabel> added,StringBuilder changeLog){
  if (added.size() > 0) {
    changeLog.append("String_Node_Str" + added.toString() + "String_Node_Str");
  }
  if (removed.size() > 0) {
    changeLog.append("String_Node_Str" + removed.toString() + "String_Node_Str");
  }
}

Fixed version (ground truth):
private void logLabelChange(HashSet<TurboLabel> removed,HashSet<TurboLabel> added,StringBuilder changeLog){
  if (added.size() > 0) {
    System.out.println("String_Node_Str" + added.toString());
    changeLog.append("String_Node_Str" + added.toString() + "String_Node_Str");
  }
  if (removed.size() > 0) {
    System.out.println("String_Node_Str" + removed.toString());
    changeLog.append("String_Node_Str" + removed.toString() + "String_Node_Str");
  }
}
Program: 135600
Project: 135600
Buggy source:
public void setLabels(ObservableList<TurboLabel> labels){
  this.labels.clear();
  for (  TurboLabel label : labels) {
    this.labels.add(getLabelReference(label));
  }
  for (  TurboLabel currentLabel : labels) {
    if (UserConfigurations.isClosedStatusLabel(currentLabel.toGhName())) {
      this.setOpen(false);
      return;
    }
  }
  if (!getOpen()) {
    for (    TurboLabel currentLabel : labels) {
      if (UserConfigurations.isOpenStatusLabel(currentLabel.toGhName())) {
        this.setOpen(true);
        return;
      }
    }
  }
}

Fixed version (ground truth):
public void setLabels(ObservableList<TurboLabel> labels){
  if (this.labels == labels) {
    return;
  }
  this.labels.clear();
  for (  TurboLabel label : labels) {
    this.labels.add(getLabelReference(label));
  }
  for (  TurboLabel currentLabel : labels) {
    if (UserConfigurations.isClosedStatusLabel(currentLabel.toGhName())) {
      this.setOpen(false);
      return;
    }
  }
  if (!getOpen()) {
    for (    TurboLabel currentLabel : labels) {
      if (UserConfigurations.isOpenStatusLabel(currentLabel.toGhName())) {
        this.setOpen(true);
        return;
      }
    }
  }
}
Program: 135601
Project: 135601
Buggy source:
public void setLabels(ObservableList<TurboLabel> labels){
  if (this.labels == null) {
    this.labels=labels;
  }
 else   if (labels != this.labels) {
    this.labels.clear();
    this.labels.addAll(labels);
  }
}

Fixed version (ground truth):
public void setLabels(ObservableList<TurboLabel> labels){
  if (this.labels == null) {
    this.labels=labels;
  }
 else   if (labels != this.labels) {
    for (    TurboLabel currentLabel : labels) {
      if (currentLabel.getName().equalsIgnoreCase("String_Node_Str") || currentLabel.getName().equalsIgnoreCase("String_Node_Str") || currentLabel.getName().equalsIgnoreCase("String_Node_Str")) {
        this.setOpen(false);
        break;
      }
    }
    this.labels.clear();
    this.labels.addAll(labels);
  }
}
Program: 135602
Project: 135602
Buggy source:
@Override public ListCell<TurboIssue> call(ListView<TurboIssue> list){
  return new CustomListCell(mainStage,model,that);
}

Fixed version (ground truth):
@Override public ListCell<TurboIssue> call(ListView<TurboIssue> list){
  return new CustomListCell(mainStage,model,that.get());
}
Program: 135603
Project: 135603
Buggy source:
public void refreshItems(){
  filteredList=new FilteredList<TurboIssue>(issues,predicate);
  IssuePanel that=this;
  listView.setCellFactory(new Callback<ListView<TurboIssue>,ListCell<TurboIssue>>(){
    @Override public ListCell<TurboIssue> call(    ListView<TurboIssue> list){
      return new CustomListCell(mainStage,model,that);
    }
  }
);
  listView.setItems(null);
  listView.setItems(filteredList);
}

Fixed version (ground truth):
public void refreshItems(){
  filteredList=new FilteredList<TurboIssue>(issues,predicate);
  WeakReference<IssuePanel> that=new WeakReference<IssuePanel>(this);
  listView.setCellFactory(new Callback<ListView<TurboIssue>,ListCell<TurboIssue>>(){
    @Override public ListCell<TurboIssue> call(    ListView<TurboIssue> list){
      return new CustomListCell(mainStage,model,that.get());
    }
  }
);
  listView.setItems(null);
  listView.setItems(filteredList);
}
Program: 135604
Project: 135604
Buggy source:
public void setLabels(ObservableList<TurboLabel> labels){
  if (this.labels == null) {
    this.labels=labels;
  }
 else   if (labels != this.labels) {
    this.labels.clear();
    this.labels.addAll(labels);
  }
}

Fixed version (ground truth):
public void setLabels(ObservableList<TurboLabel> labels){
  if (this.labels == null) {
    this.labels=labels;
  }
 else   if (labels != this.labels) {
    for (    TurboLabel currentLabel : labels) {
      if (currentLabel.getName().equalsIgnoreCase("String_Node_Str") || currentLabel.getName().equalsIgnoreCase("String_Node_Str") || currentLabel.getName().equalsIgnoreCase("String_Node_Str")) {
        this.setOpen(false);
        break;
      }
    }
    this.labels.clear();
    this.labels.addAll(labels);
  }
}
Program: 135605
Project: 135605
Buggy source:
@Override public int hashCode(){
  final int prime=31;
  int result=1;
  result=prime * result + ((name == null) ? 0 : name.hashCode());
  return result;
}

Fixed version (ground truth):
@Override public int hashCode(){
  final int prime=31;
  int result=1;
  result=prime * result + ((name == null) ? 0 : toGhName().hashCode());
  return result;
}
Program: 135606
Project: 135606
Buggy source:
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  TurboLabel other=(TurboLabel)obj;
  if (name == null) {
    if (other.name != null)     return false;
  }
 else   if (!getName().equals(other.getName()))   return false;
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  TurboLabel other=(TurboLabel)obj;
  if (name == null) {
    return other.name == null;
  }
  return this.toGhName().equals(other.toGhName());
}
Program: 135607
Project: 135607
Buggy source:
public void updateIssue(TurboIssue originalIssue,TurboIssue editedIssue){
  try {
    int issueId=editedIssue.getId();
    TurboIssue latestIssue=new TurboIssue(issueService.getIssue(repoId,issueId));
    StringBuilder changeLog=editedIssue.mergeIssues(originalIssue,latestIssue);
    if (changeLog.length() > 0) {
      issueService.createComment(repoId,"String_Node_Str" + issueId,changeLog.toString());
    }
    Issue latest=latestIssue.toGhResource();
    issueService.editIssue(repoId,latest);
    updateCachedIssue(latest);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void updateIssue(TurboIssue originalIssue,TurboIssue editedIssue){
  try {
    int issueId=editedIssue.getId();
    boolean descUpdated=updateIssueDescription(originalIssue,editedIssue.getDescription());
    if (!descUpdated) {
      System.out.println("String_Node_Str");
    }
 else {
      System.out.println(originalIssue.getDescription());
    }
    TurboIssue latestIssue=new TurboIssue(issueService.getIssue(repoId,issueId));
    StringBuilder changeLog=editedIssue.mergeIssues(originalIssue,latestIssue,false);
    if (changeLog.length() > 0) {
      issueService.createComment(repoId,"String_Node_Str" + issueId,changeLog.toString());
    }
    Issue latest=latestIssue.toGhResource();
    issueService.editIssue(repoId,latest);
    updateCachedIssue(latest);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 135608
Project: 135608
Buggy source:
public Model(GitHubClient ghClient){
  this.collabService=new CollaboratorService(ghClient);
  this.issueService=new IssueService(ghClient);
  this.labelService=new LabelServiceFixed(ghClient);
  this.milestoneService=new MilestoneService(ghClient);
}

Fixed version (ground truth):
public Model(GitHubClientExtended ghClient){
  this.collabService=new CollaboratorService(ghClient);
  this.issueService=new IssueServiceExtended(ghClient);
  this.labelService=new LabelServiceFixed(ghClient);
  this.milestoneService=new MilestoneService(ghClient);
}
Program: 135609
Project: 135609
Buggy source:
/** 
 * Modifies @param latest to contain the merged changes of this TurboIssue object and @param latest wrt @param edited
 * @return StringBuilder containing a log of changes between this TurboIssue object and @param original
 */
protected StringBuilder mergeIssues(TurboIssue original,TurboIssue latest){
  StringBuilder changeLog=new StringBuilder();
  mergeTitle(original,latest,changeLog);
  mergeDescription(original,latest,changeLog);
  mergeParents(original,latest,changeLog);
  mergeLabels(original,latest,changeLog);
  mergeAssignee(original,latest,changeLog);
  mergeMilestone(original,latest,changeLog);
  mergeOpen(original,latest);
  return changeLog;
}

Fixed version (ground truth):
/** 
 * Modifies @param latest to contain the merged changes of this TurboIssue object and @param latest wrt @param edited
 * @return StringBuilder containing a log of changes between this TurboIssue object and @param original
 */
protected StringBuilder mergeIssues(TurboIssue original,TurboIssue latest,boolean overwriteDesc){
  StringBuilder changeLog=new StringBuilder();
  mergeTitle(original,latest,changeLog);
  if (overwriteDesc) {
    mergeDescription(original,latest,changeLog);
  }
  mergeParents(original,latest,changeLog);
  mergeLabels(original,latest,changeLog);
  mergeAssignee(original,latest,changeLog);
  mergeMilestone(original,latest,changeLog);
  mergeOpen(original,latest);
  return changeLog;
}
Program: 135610
Project: 135610
Buggy source:
private int getIndexOfIssue(long id){
  for (int i=0; i < issues.size(); i++) {
    if (((TurboIssue)(issues.get(i))).getId() == id) {
      return i;
    }
  }
  return -1;
}

Fixed version (ground truth):
private int getIndexOfIssue(int id){
  for (int i=0; i < issues.size(); i++) {
    if (((TurboIssue)(issues.get(i))).getId() == id) {
      return i;
    }
  }
  return -1;
}
Program: 135611
Project: 135611
Buggy source:
private void updateCachedIssue(Issue issue){
  TurboIssue newCached=new TurboIssue(issue);
  int index=getIndexOfIssue(issue.getNumber());
  if (index != -1) {
    issues.set(index,newCached);
  }
 else {
    issues.add(0,newCached);
  }
}

Fixed version (ground truth):
private void updateCachedIssue(Issue issue){
  TurboIssue newCached=new TurboIssue(issue);
  int index=getIndexOfIssue(issue.getNumber());
  if (index != -1) {
    updateIssueAtIndex(index,newCached);
  }
 else {
    issues.add(0,newCached);
  }
}
Program: 135612
Project: 135612
Buggy source:
public void updateIssue(TurboIssue orignalIssue,TurboIssue editedIssue){
  Issue original=orignalIssue.toGhResource();
  Issue edited=editedIssue.toGhResource();
  StringBuilder changeLog=new StringBuilder();
  try {
    int issueId=editedIssue.getId();
    Issue latest=issueService.getIssue(repoId,issueId);
    mergeTitle(original,edited,latest);
    mergeBody(original,edited,latest);
    mergeAssignee(original,edited,latest,changeLog);
    mergeState(original,edited,latest,changeLog);
    mergeMilestone(original,edited,latest,changeLog);
    mergeLabels(original,edited,latest,changeLog);
    if (changeLog.length() > 0) {
      issueService.createComment(repoId,"String_Node_Str" + issueId,changeLog.toString());
    }
    issueService.editIssue(repoId,latest);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void updateIssue(TurboIssue orignalIssue,TurboIssue editedIssue){
  Issue original=orignalIssue.toGhResource();
  Issue edited=editedIssue.toGhResource();
  StringBuilder changeLog=new StringBuilder();
  try {
    int issueId=editedIssue.getId();
    Issue latest=issueService.getIssue(repoId,issueId);
    mergeTitle(original,edited,latest);
    mergeBody(original,edited,latest);
    mergeAssignee(original,edited,latest,changeLog);
    mergeState(original,edited,latest,changeLog);
    mergeMilestone(original,edited,latest,changeLog);
    mergeLabels(original,edited,latest,changeLog);
    if (changeLog.length() > 0) {
      issueService.createComment(repoId,"String_Node_Str" + issueId,changeLog.toString());
    }
    issueService.editIssue(repoId,latest);
    updateCachedIssue(latest);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 135613
Project: 135613
Buggy source:
private void mergeLabels(Issue original,Issue edited,Issue latest,StringBuilder changeLog){
  List<Label> originalLabels=original.getLabels();
  List<Label> editedLabels=edited.getLabels();
  boolean isSameLabels=checkAndLogLabelChange(originalLabels,editedLabels,changeLog);
  if (!isSameLabels) {
    latest.setLabels(editedLabels);
  }
}

Fixed version (ground truth):
private void mergeLabels(Issue original,Issue edited,Issue latest,StringBuilder changeLog){
  List<Label> originalLabels=original.getLabels();
  List<Label> editedLabels=edited.getLabels();
  boolean changed=checkAndLogLabelChange(originalLabels,editedLabels,changeLog);
  if (changed) {
    latest.setLabels(editedLabels);
  }
}
Program: 135614
Project: 135614
Buggy source:
private void onDoubleClick(TurboIssue issue){
  TurboIssue copy=new TurboIssue(issue);
  (new IssueDialog(mainStage,model,issue)).show().thenApply(response -> {
    if (response.equals("String_Node_Str")) {
      model.updateIssue(copy,issue);
    }
    return true;
  }
);
}

Fixed version (ground truth):
private void onDoubleClick(TurboIssue issue){
  TurboIssue modifiedIssue=new TurboIssue(issue);
  (new IssueDialog(mainStage,model,modifiedIssue)).show().thenApply(response -> {
    if (response.equals("String_Node_Str")) {
      model.updateIssue(issue,modifiedIssue);
    }
    return true;
  }
);
}
Program: 135617
Project: 135617
Buggy source:
public void updateLabel(TurboLabel editedLabel){
  Label ghLabel=editedLabel.toGhLabel();
  try {
    labelService.editLabel(repoId,ghLabel);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void updateLabel(TurboLabel editedLabel,String labelName){
  Label ghLabel=editedLabel.toGhLabel();
  try {
    labelService.editLabel(repoId,ghLabel,labelName);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 135618
Project: 135618
Buggy source:
public Model(GitHubClient ghClient){
  this.collabService=new CollaboratorService(ghClient);
  this.issueService=new IssueService(ghClient);
  this.labelService=new LabelService(ghClient);
  this.milestoneService=new MilestoneService(ghClient);
}

Fixed version (ground truth):
public Model(GitHubClient ghClient){
  this.collabService=new CollaboratorService(ghClient);
  this.issueService=new IssueService(ghClient);
  this.labelService=new LabelServiceFixed(ghClient);
  this.milestoneService=new MilestoneService(ghClient);
}
Program: 135619
Project: 135619
Buggy source:
private Node createTreeView(){
  final TreeItem<String> treeRoot=new TreeItem<>("String_Node_Str");
  TreeItem<String> status=new TreeItem<>("String_Node_Str");
  treeRoot.getChildren().addAll(Arrays.asList(status));
  status.getChildren().addAll(Arrays.asList(new TreeItem<String>("String_Node_Str"),new TreeItem<String>("String_Node_Str")));
  final TreeView<String> treeView=new TreeView<>();
  treeView.setRoot(treeRoot);
  treeView.setShowRoot(true);
  treeRoot.setExpanded(true);
  treeView.setPrefWidth(180);
  treeRoot.getChildren().forEach(child -> child.setExpanded(true));
  treeView.setCellFactory(new Callback<TreeView<String>,TreeCell<String>>(){
    @Override public TreeCell<String> call(    TreeView<String> stringTreeView){
      return new ManageLabelsTreeCell<String>(parentStage);
    }
  }
);
  return treeView;
}

Fixed version (ground truth):
private Node createTreeView(){
  final TreeItem<String> treeRoot=new TreeItem<>("String_Node_Str");
  TreeItem<String> status=new TreeItem<>("String_Node_Str");
  treeRoot.getChildren().addAll(Arrays.asList(status));
  status.getChildren().addAll(Arrays.asList(new TreeItem<String>("String_Node_Str"),new TreeItem<String>("String_Node_Str")));
  final TreeView<String> treeView=new TreeView<>();
  treeView.setRoot(treeRoot);
  treeView.setShowRoot(false);
  treeRoot.setExpanded(true);
  treeView.setPrefWidth(180);
  treeRoot.getChildren().forEach(child -> child.setExpanded(true));
  treeView.setCellFactory(new Callback<TreeView<String>,TreeCell<String>>(){
    @Override public TreeCell<String> call(    TreeView<String> stringTreeView){
      return new ManageLabelsTreeCell<String>(parentStage);
    }
  }
);
  return treeView;
}
Program: 135620
Project: 135620
Buggy source:
private Parent createRoot(){
  MenuBar menuBar=createMenuBar();
  BorderPane root=new BorderPane();
  columns=new HBox();
  col1=createIssuePanel();
  IssuePanel col2=createIssuePanel();
  IssuePanel col3=createIssuePanel();
  col1.getItems().add(test=new TurboIssue("String_Node_Str","String_Node_Str"));
  col1.getItems().add(new TurboIssue("String_Node_Str","String_Node_Str"));
  col2.getItems().add(test);
  columns.getChildren().addAll(col1,col2,col3);
  root.setCenter(columns);
  root.setTop(menuBar);
  return root;
}

Fixed version (ground truth):
private Parent createRoot(){
  MenuBar menuBar=createMenuBar();
  BorderPane root=new BorderPane();
  columns=new HBox();
  col1=createIssuePanel();
  IssuePanel col2=createIssuePanel();
  IssuePanel col3=createIssuePanel();
  test=new TurboIssue("String_Node_Str","String_Node_Str");
  test.getLabels().add(new TurboLabel("String_Node_Str"));
  TurboIssue two=new TurboIssue("String_Node_Str","String_Node_Str");
  TurboIssue three=new TurboIssue("String_Node_Str","String_Node_Str");
  TurboIssue four=new TurboIssue("String_Node_Str","String_Node_Str");
  TurboIssue five=new TurboIssue("String_Node_Str","String_Node_Str");
  col1.getItems().add(test);
  col1.getItems().add(two);
  col1.getItems().add(three);
  col1.getItems().add(four);
  col1.getItems().add(five);
  col2.getItems().add(test);
  columns.getChildren().addAll(col1,col2,col3);
  root.setCenter(columns);
  root.setTop(menuBar);
  return root;
}
Program: 135621
Project: 135621
Buggy source:
private void loadIssues(){
  col1.getItems().setAll(logic.getIssues());
}

Fixed version (ground truth):
private void loadIssues(){
  col1.setItems(FXCollections.observableArrayList(logic.getIssues()));
}
Program: 135622
Project: 135622
Buggy source:
public void filter(Filter filter){
  filteredList.setPredicate(filter::isSatisfiedBy);
  listView.setCellFactory(new Callback<ListView<TurboIssue>,ListCell<TurboIssue>>(){
    @Override public ListCell<TurboIssue> call(    ListView<TurboIssue> list){
      return new CustomListCell();
    }
  }
);
}

Fixed version (ground truth):
public void filter(Filter filter){
  filteredList.setPredicate(filter::isSatisfiedBy);
  refreshItems();
}
Program: 135623
Project: 135623
Buggy source:
public IssuePanel(){
  getChildren().add(listView);
  listView.setCellFactory(new Callback<ListView<TurboIssue>,ListCell<TurboIssue>>(){
    @Override public ListCell<TurboIssue> call(    ListView<TurboIssue> list){
      return new CustomListCell();
    }
  }
);
  filteredList=new FilteredList<>(issues,p -> true);
  listView.setItems(filteredList);
  setVgrow(listView,Priority.ALWAYS);
}

Fixed version (ground truth):
public IssuePanel(){
  listView=new ListView<>();
  getChildren().add(listView);
  setVgrow(listView,Priority.ALWAYS);
  refreshItems();
}
Program: 135624
Project: 135624
Buggy source:
public TurboIssue(Issue issue){
  this.ghIssue=issue;
  setTitle(issue.getTitle());
  setDescription(issue.getBody());
  setId(issue.getNumber());
  this.assignee=new TurboCollaborator(issue.getAssignee());
  this.milestone=new TurboMilestone(issue.getMilestone());
  this.labels=getLabels(issue);
}

Fixed version (ground truth):
public TurboIssue(Issue issue){
  this.ghIssue=issue;
  setTitle(issue.getTitle());
  setDescription(issue.getBody());
  setId(issue.getNumber());
  this.assignee=new TurboCollaborator(issue.getAssignee());
  this.milestone=new TurboMilestone(issue.getMilestone());
  this.labels=translateLabels(issue);
}
Program: 135625
Project: 135625
Buggy source:
private void onDoubleClick(TurboIssue issue){
  (new IssueDialog(mainStage,logic,issue)).show().thenApply(newIssue -> {
    parentIssuePanel.refreshItems();
    return true;
  }
);
}

Fixed version (ground truth):
private void onDoubleClick(TurboIssue issue){
  (new IssueDialog(mainStage,logic,issue)).show().thenApply(newIssue -> {
    return true;
  }
);
}
Program: 135627
Project: 135627
Buggy source:
/** 
 * @return
 */
public VectorSpace getDsm(){
  return dsm;
}

Fixed version (ground truth):
/** 
 * @return
 */
public VectorStore getDsm(){
  return dsm;
}
Program: 135628
Project: 135628
Buggy source:
private List<BabelSense> lookupSense(Language language,String lemma,POS postag) throws IOException {
  List<BabelSense> senses;
  if (language.equals(Language.EN)) {
    senses=babelNet.getSenses(language,lemma,postag,BabelSenseSource.WN);
    if (senses == null || senses.isEmpty()) {
      senses=babelNet.getSenses(language,lemma.replace("String_Node_Str","String_Node_Str"),postag,BabelSenseSource.WN);
    }
  }
 else {
    senses=babelNet.getSenses(language,lemma,postag,BabelSenseSource.WNTR);
    if (senses == null || senses.isEmpty()) {
      senses=babelNet.getSenses(language,lemma.replace("String_Node_Str","String_Node_Str"),postag,BabelSenseSource.WNTR);
    }
  }
  if (senses == null || senses.isEmpty() || !smartLookup) {
    senses=babelNet.getSenses(language,lemma,postag);
    if (senses == null || senses.isEmpty()) {
      senses=babelNet.getSenses(language,lemma.replace("String_Node_Str","String_Node_Str"),postag);
    }
  }
  if (senses == null || senses.isEmpty()) {
    Logger.getLogger(RevisedLesk.class.getName()).log(Level.WARNING,"String_Node_Str",new Object[]{lemma,postag});
  }
  if (senses != null && !senses.isEmpty()) {
    Set<String> ids=new HashSet<>();
    for (int i=senses.size() - 1; i >= 0; i--) {
      if (!ids.add(senses.get(i).getSynset().getId())) {
        senses.remove(i);
      }
    }
  }
  return senses;
}

Fixed version (ground truth):
private List<BabelSense> lookupSense(Language language,String lemma,POS postag) throws IOException {
  List<BabelSense> senses;
  if (language.equals(Language.EN)) {
    senses=babelNet.getSenses(language,lemma,postag,BabelSenseSource.WN);
    if (senses == null || senses.isEmpty()) {
      senses=babelNet.getSenses(language,lemma.replace("String_Node_Str","String_Node_Str"),postag,BabelSenseSource.WN);
    }
  }
 else {
    senses=babelNet.getSenses(language,lemma,postag,BabelSenseSource.WNTR);
    if (senses == null || senses.isEmpty()) {
      senses=babelNet.getSenses(language,lemma.replace("String_Node_Str","String_Node_Str"),postag,BabelSenseSource.WNTR);
    }
  }
  if (senses == null || senses.isEmpty()) {
    senses=babelNet.getSenses(language,lemma,postag);
    if (senses == null || senses.isEmpty()) {
      senses=babelNet.getSenses(language,lemma.replace("String_Node_Str","String_Node_Str"),postag);
    }
  }
  if (senses == null || senses.isEmpty()) {
    Logger.getLogger(RevisedLesk.class.getName()).log(Level.WARNING,"String_Node_Str",new Object[]{lemma,postag});
  }
  if (senses != null && !senses.isEmpty()) {
    Set<String> ids=new HashSet<>();
    for (int i=senses.size() - 1; i >= 0; i--) {
      if (!ids.add(senses.get(i).getSynset().getId())) {
        senses.remove(i);
      }
    }
  }
  return senses;
}
Program: 135630
Project: 135630
Buggy source:
/** 
 * @param language
 * @param dsm
 */
public RevisedLesk(Language language,VectorSpace dsm){
  this.language=language;
  this.dsm=dsm;
}

Fixed version (ground truth):
/** 
 * @param language
 * @param dsm
 */
public RevisedLesk(Language language,VectorStore dsm){
  this.language=language;
  this.dsm=dsm;
}
Program: 135631
Project: 135631
Buggy source:
/** 
 * @param inputFile
 * @throws IOException
 */
public void init(File inputFile) throws IOException {
  vectors=new HashMap<>();
  DataInputStream input=new DataInputStream(new BufferedInputStream(new FileInputStream(inputFile)));
  vectorType=input.readUTF();
  dimension=input.readInt();
  int c=0;
  while (input.available() > 0) {
    String key=input.readUTF();
    float[] v=new float[dimension];
    for (int i=0; i < dimension; i++) {
      v[i]=input.readFloat();
    }
    vectors.put(key,v);
    c++;
    if (c % 10000 == 0) {
      System.out.print(c + "String_Node_Str");
    }
  }
  input.close();
  logger.log(Level.INFO,"String_Node_Str",vectors.size());
}

Fixed version (ground truth):
/** 
 * @param inputFile
 * @throws IOException
 */
public void init(File inputFile) throws IOException {
  vectors=new HashMap<>();
  DataInputStream input=new DataInputStream(new BufferedInputStream(new FileInputStream(inputFile)));
  vectorType=input.readUTF();
  dimension=input.readInt();
  ObjectVector.vecLength=dimension;
  int c=0;
  while (input.available() > 0) {
    String key=input.readUTF();
    float[] v=new float[dimension];
    for (int i=0; i < dimension; i++) {
      v[i]=input.readFloat();
    }
    vectors.put(key,v);
    c++;
    if (c % 10000 == 0) {
      System.out.print(c + "String_Node_Str");
    }
  }
  input.close();
  logger.log(Level.INFO,"String_Node_Str",vectors.size());
}
Program: 135632
Project: 135632
Buggy source:
public ResultCode removeQueue(String queueName,final String user,final String pass){
  _lock.lock();
  try {
    queueName=queueName.toUpperCase();
    if (validUser(user,pass) == false) {
      return ResultCode.AUTHENTICATION_FAILURE;
    }
    FanOutQueueImplEx queue=_mapQueue.get(queueName);
    if (queue == null) {
      return ResultCode.QUEUE_NOT_EXIST;
    }
    try {
      queue=_mapQueue.remove(queueName);
      queue.erase();
      _meta.delete((PREFIX_QUEUE + queueName).getBytes());
      return ResultCode.SUCCESS;
    }
 catch (    Exception ex) {
      _log.error(ex.getMessage(),ex);
      return ResultCode.SUB_REMOVE_ERROR;
    }
  }
  finally {
    _lock.unlock();
  }
}

Fixed version (ground truth):
public ResultCode removeQueue(String queueName,final String user,final String pass){
  _lock.lock();
  try {
    queueName=queueName.toUpperCase();
    if (validUser(user,pass) == false) {
      return ResultCode.AUTHENTICATION_FAILURE;
    }
    FanOutQueueImplEx queue=_mapQueue.get(queueName);
    if (queue == null) {
      return ResultCode.QUEUE_NOT_EXIST;
    }
    try {
      queue=_mapQueue.remove(queueName);
      List<String> subNames=queue.getAllFanoutNames();
      queue.erase();
      _meta.delete((PREFIX_QUEUE + queueName).getBytes());
      for (      String subName : subNames) {
        _meta.delete((PREFIX_SUB + subName + PREFIX_QUEUE+ queueName).getBytes());
      }
      return ResultCode.SUCCESS;
    }
 catch (    Exception ex) {
      _log.error(ex.getMessage(),ex);
      return ResultCode.SUB_REMOVE_ERROR;
    }
  }
  finally {
    _lock.unlock();
  }
}
Program: 135634
Project: 135634
Buggy source:
@Override public void drawScreen(int mouseX,int mouseY,float par3){
  updateList.drawScreen(mouseX,mouseY,par3);
  if (openUpdate != null) {
    changeLogList.drawScreen(mouseX,mouseY,par3);
  }
  this.fontRendererObj.drawSplitString(StatCollector.translateToLocal(Strings.INFO).replace("String_Node_Str","String_Node_Str"),10,height / 2 - 60,width / 2 - 150 + listShift - 20,0xCCCCCC);
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  Minecraft.getMinecraft().renderEngine.bindTexture(Resources.GUI_LOGO);
  int i=width / 2 - 150 + listShift - 10;
  Gui.func_146110_a(5,5,0,0,i,(int)(i * 0.4),i,(int)(i * 0.4));
  if (openUpdate != null) {
    drawCenteredString(fontRendererObj,openUpdate.displayName,width / 2 + listShift,height / 2 - 80,0xFFFFFF);
    if (openUpdate.changeLog == null) {
      drawCenteredString(fontRendererObj,StatCollector.translateToLocal(Strings.NO_CHANGE_LOG),width / 2 + listShift,height / 2 - 60,0xCCCCCC);
    }
  }
  if (DownloadThread.isUpdating()) {
    GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
    Minecraft.getMinecraft().renderEngine.bindTexture(Resources.GUI_ICONS);
    Gui.func_146110_a(width - 20,4,0,0,16,16,32,32);
  }
  super.drawScreen(mouseX,mouseY,par3);
  drawToolTip(mouseX,mouseY);
}

Fixed version (ground truth):
@Override public void drawScreen(int mouseX,int mouseY,float par3){
  updateList.drawScreen(mouseX,mouseY,par3);
  if (openUpdate != null) {
    changeLogList.drawScreen(mouseX,mouseY,par3);
  }
  this.fontRendererObj.drawSplitString(StatCollector.translateToLocal(Strings.INFO).replace("String_Node_Str","String_Node_Str"),10,height / 2 - 60,width / 2 - 150 + listShift - 20,0xCCCCCC);
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  Minecraft.getMinecraft().renderEngine.bindTexture(Resources.GUI_LOGO);
  int i=width / 2 - 150 + listShift - 10;
  Gui.func_146110_a(5,5,0,0,i,(int)(i * 0.4),i,(int)(i * 0.4));
  if (openUpdate != null) {
    drawCenteredString(fontRendererObj,openUpdate.displayName,width / 2 + listShift,height / 2 - 80,0xFFFFFF);
    if (openUpdate.changeLog == null) {
      drawCenteredString(fontRendererObj,StatCollector.translateToLocal(Strings.NO_CHANGE_LOG),width / 2 + listShift,height / 2 - 60,0xCCCCCC);
    }
  }
  if (DownloadThread.isUpdating()) {
    GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
    Minecraft.getMinecraft().renderEngine.bindTexture(Resources.GUI_ICONS);
    Gui.func_146110_a(width - 20,4,0,0,16,16,48,32);
  }
  super.drawScreen(mouseX,mouseY,par3);
  drawToolTip(mouseX,mouseY);
}
Program: 135635
Project: 135635
Buggy source:
@Override public void run(){
  WebHelper.downloadUpdate(update);
  downloadingUpdates.remove(update);
  RemoveHandler.filesToDelete.add(ModHelper.getModContainer(update.MOD_ID).getSource());
  update.setDownloaded(true);
}

Fixed version (ground truth):
@Override public void run(){
  boolean success=WebHelper.downloadUpdate(update);
  downloadingUpdates.remove(update);
  if (success) {
    RemoveHandler.filesToDelete.add(ModHelper.getModContainer(update.MOD_ID).getSource());
    update.setDownloaded(true);
  }
 else {
    update.setErrored();
  }
}
Program: 135636
Project: 135636
Buggy source:
public static void downloadFileFromURL(URL url,Update update,ModContainer mod,String fileName){
  File newFile=new File(fileName);
  try {
    FileUtils.copyURLToFile(url,newFile);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static File downloadFileFromURL(URL url,Update update,ModContainer mod,String fileName) throws IOException {
  File newFile=new File(fileName);
  FileUtils.copyURLToFile(url,newFile);
  return newFile;
}
Program: 135637
Project: 135637
Buggy source:
public static void downloadUpdate(Update update){
  ModContainer mod=ModHelper.getModContainer(update.MOD_ID);
  if (mod != null) {
    String fileName="String_Node_Str";
    if (update.newFileName != null && !update.newFileName.isEmpty()) {
      fileName=mod.getSource().getParent() + File.separator + update.newFileName;
    }
 else {
      fileName=mod.getSource().getAbsolutePath();
      String newFileName=fileName.replaceAll(update.oldVersion,update.newVersion);
      if (fileName.equalsIgnoreCase(newFileName)) {
        int i=newFileName.lastIndexOf("String_Node_Str");
        if (i == -1) {
          newFileName+="String_Node_Str";
        }
 else {
          newFileName=newFileName.substring(0,i) + "String_Node_Str" + newFileName.substring(i);
        }
      }
      fileName=newFileName;
    }
    try {
      URL url=new URL(update.updateURL);
      downloadFileFromURL(url,update,mod,fileName);
    }
 catch (    MalformedURLException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
public static boolean downloadUpdate(Update update){
  ModContainer mod=ModHelper.getModContainer(update.MOD_ID);
  if (mod != null) {
    String fileName="String_Node_Str";
    if (update.newFileName != null && !update.newFileName.isEmpty()) {
      fileName=mod.getSource().getParent() + File.separator + update.newFileName;
    }
 else {
      fileName=mod.getSource().getAbsolutePath();
      String newFileName=fileName.replaceAll(update.oldVersion,update.newVersion);
      if (fileName.equalsIgnoreCase(newFileName)) {
        int i=newFileName.lastIndexOf("String_Node_Str");
        if (i == -1) {
          newFileName+="String_Node_Str";
        }
 else {
          newFileName=newFileName.substring(0,i) + "String_Node_Str" + newFileName.substring(i);
        }
      }
      fileName=newFileName;
    }
    try {
      URL url=new URL(update.updateURL);
      File file=downloadFileFromURL(url,update,mod,fileName);
      if (file != null && file.exists() && file.length() > 0)       return true;
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  return false;
}
Program: 135638
Project: 135638
Buggy source:
public static String getResultMessage(ModContainer mod,CheckState result,VersionContainer.Version version){
  if (result == CheckState.UNINITIALIZED) {
    return String.format("String_Node_Str",version);
  }
 else   if (result == CheckState.CURRENT) {
    return String.format("String_Node_Str",version);
  }
 else   if (result == CheckState.OUTDATED && version != null) {
    return String.format("String_Node_Str",version,mod.getVersion(),version.getModVersion());
  }
 else   if (result == CheckState.ERROR) {
    return String.format("String_Node_Str",version);
  }
 else   if (result == CheckState.MC_VERSION_NOT_FOUND) {
    return String.format("String_Node_Str",version);
  }
 else {
    return String.format("String_Node_Str",version);
  }
}

Fixed version (ground truth):
public static String getResultMessage(ModContainer mod,CheckState result,VersionContainer.Version version){
  if (result == CheckState.UNINITIALIZED) {
    return String.format("String_Node_Str",mod.getName());
  }
 else   if (result == CheckState.CURRENT) {
    return String.format("String_Node_Str",mod.getName());
  }
 else   if (result == CheckState.OUTDATED && version != null) {
    return String.format("String_Node_Str",mod.getName(),mod.getVersion(),version.getModVersion());
  }
 else   if (result == CheckState.ERROR) {
    return String.format("String_Node_Str",mod.getName());
  }
 else   if (result == CheckState.MC_VERSION_NOT_FOUND) {
    return String.format("String_Node_Str",mod.getName());
  }
 else {
    return String.format("String_Node_Str",mod.getName());
  }
}
Program: 135639
Project: 135639
Buggy source:
public static void downloadUpdate(Update update){
  ModContainer mod=ModHelper.getModContainer(update.MOD_ID);
  if (mod != null) {
    String fileName="String_Node_Str";
    if (update.newFileName != null && !update.newFileName.isEmpty()) {
      fileName=update.newFileName;
    }
 else {
      fileName=mod.getSource().getAbsolutePath();
      String newFileName=fileName.replaceAll(update.oldVersion,update.newVersion);
      if (fileName.equalsIgnoreCase(newFileName)) {
        int i=newFileName.lastIndexOf("String_Node_Str");
        if (i == -1) {
          newFileName+="String_Node_Str";
        }
 else {
          newFileName=newFileName.substring(0,i) + "String_Node_Str" + newFileName.substring(i + 1);
        }
      }
      fileName=newFileName;
    }
    try {
      URL url=new URL(update.updateURL);
      downloadFileFromURL(url,update,mod,fileName);
    }
 catch (    MalformedURLException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
public static void downloadUpdate(Update update){
  ModContainer mod=ModHelper.getModContainer(update.MOD_ID);
  if (mod != null) {
    String fileName="String_Node_Str";
    if (update.newFileName != null && !update.newFileName.isEmpty()) {
      fileName=update.newFileName;
    }
 else {
      fileName=mod.getSource().getAbsolutePath();
      String newFileName=fileName.replaceAll(update.oldVersion,update.newVersion);
      if (fileName.equalsIgnoreCase(newFileName)) {
        int i=newFileName.lastIndexOf("String_Node_Str");
        if (i == -1) {
          newFileName+="String_Node_Str";
        }
 else {
          newFileName=newFileName.substring(0,i) + "String_Node_Str" + newFileName.substring(i);
        }
      }
      fileName=newFileName;
    }
    try {
      URL url=new URL(update.updateURL);
      downloadFileFromURL(url,update,mod,fileName);
    }
 catch (    MalformedURLException e) {
      e.printStackTrace();
    }
  }
}
Program: 135640
Project: 135640
Buggy source:
/** 
 * {@inheritDoc}<p> Overridden to record the exception details. </p>
 */
@Override public void exception(final Throwable thrown){
  int count;
synchronized (this) {
    myFailureCount+=1;
    myCount+=1;
    count=myCount;
    if (mySkipped == null) {
      mySkipped=new ArrayList<WriteOperation>();
      myErrors=new IdentityHashMap<WriteOperation,Throwable>();
    }
    if (thrown instanceof BatchedWriteException) {
      final BatchedWriteException errors=(BatchedWriteException)thrown;
      myLastWrite=errors.getWrite();
      mySkipped.addAll(errors.getSkipped());
      myErrors.putAll(errors.getErrors());
    }
  }
  if (count == myExpectedCount) {
    publish();
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}<p> Overridden to record the exception details. </p>
 */
@Override public void exception(final Throwable thrown){
  boolean publish;
synchronized (this) {
    myFailureCount+=1;
    myCount+=1;
    publish=(myCount == myExpectedCount);
    if (mySkipped == null) {
      mySkipped=new ArrayList<WriteOperation>();
      myErrors=new IdentityHashMap<WriteOperation,Throwable>();
    }
    if (thrown instanceof BatchedWriteException) {
      final BatchedWriteException errors=(BatchedWriteException)thrown;
      myLastWrite=errors.getWrite();
      mySkipped.addAll(errors.getSkipped());
      myErrors.putAll(errors.getErrors());
    }
  }
  if (publish) {
    publish();
  }
}
Program: 135641
Project: 135641
Buggy source:
/** 
 * Publishes the final results to   {@link #myForwardCallback}.
 */
private void publish(){
  if (myFailureCount == 0) {
    final Document doc=BuilderFactory.start().add("String_Node_Str",1).add("String_Node_Str",myExpectedCount).build();
    final Reply reply=new Reply(0,0,0,Collections.singletonList(doc),false,false,false,false);
    myForwardCallback.callback(reply);
  }
 else {
    myForwardCallback.exception(new BatchedWriteException(myLastWrite,(myExpectedCount - myFailureCount),mySkipped,myErrors));
  }
}

Fixed version (ground truth):
/** 
 * Publishes the final results to   {@link #myForwardCallback}.
 */
private void publish(){
  Reply reply=null;
  BatchedWriteException error=null;
synchronized (this) {
    if (myFailureCount == 0) {
      final Document doc=BuilderFactory.start().add("String_Node_Str",1).add("String_Node_Str",myExpectedCount).build();
      reply=new Reply(0,0,0,Collections.singletonList(doc),false,false,false,false);
    }
 else {
      error=new BatchedWriteException(myLastWrite,(myExpectedCount - myFailureCount),mySkipped,myErrors);
    }
  }
  if (reply != null) {
    myForwardCallback.callback(reply);
  }
 else {
    myForwardCallback.exception(error);
  }
}
Program: 135642
Project: 135642
Buggy source:
/** 
 * {@inheritDoc}<p> Overridden to increment the count and when the max is reached forward the final results. </p>
 */
@Override public void callback(final Reply result){
  int count;
synchronized (this) {
    myCount+=1;
    count=myCount;
  }
  if (count == myExpectedCount) {
    publish();
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}<p> Overridden to increment the count and when the max is reached forward the final results. </p>
 */
@Override public void callback(final Reply result){
  boolean publish;
synchronized (this) {
    myCount+=1;
    publish=(myCount == myExpectedCount);
  }
  if (publish) {
    publish();
  }
}
Program: 135643
Project: 135643
Buggy source:
/** 
 * Creates a new   {@link BootstrapState}.
 * @return The {@link BootstrapState} to track state of loading the clusterinformation.
 */
protected BootstrapState createBootstrapState(){
  return new BootstrapState();
}

Fixed version (ground truth):
/** 
 * Creates a new   {@link BootstrapState}.
 * @return The {@link BootstrapState} to track state of loading the clusterinformation.
 */
protected BootstrapState createBootstrapState(){
  return new BootstrapState(!myConfig.isAutoDiscoverServers());
}
Program: 135644
Project: 135644
Buggy source:
/** 
 * Creates a new AuthenticatingConnection.
 * @param connection The connection to ensure gets authenticated as needed.
 * @param config The MongoDB client configuration.
 */
public AuthenticatingConnection(final Connection connection,final MongoClientConfiguration config){
  super(connection,config);
  myAuthenticators=new ConcurrentHashMap<String,Authenticator>();
  myFailures=new ConcurrentHashMap<String,MongoDbException>();
  final Collection<Credential> credentials=config.getCredentials();
  for (  final Credential credential : credentials) {
    final Authenticator authenticator=credential.authenticator();
    authenticator.startAuthentication(credential,connection);
    if (credentials.size() > 1) {
      try {
        if (!authenticator.result()) {
          myFailures.put(credential.getDatabase(),new MongoDbAuthenticationException("String_Node_Str" + credential.getDatabase() + "String_Node_Str"));
        }
      }
 catch (      final MongoDbException error) {
        myFailures.put(credential.getDatabase(),error);
      }
    }
 else {
      myAuthenticators.put(credential.getDatabase(),authenticator);
    }
  }
}

Fixed version (ground truth):
/** 
 * Creates a new AuthenticatingConnection.
 * @param connection The connection to ensure gets authenticated as needed.
 * @param config The MongoDB client configuration.
 */
public AuthenticatingConnection(final Connection connection,final MongoClientConfiguration config){
  super(connection);
  myAuthenticators=new ConcurrentHashMap<String,Authenticator>();
  myFailures=new ConcurrentHashMap<String,MongoDbException>();
  final Collection<Credential> credentials=config.getCredentials();
  for (  final Credential credential : credentials) {
    final Authenticator authenticator=credential.authenticator();
    authenticator.startAuthentication(credential,connection);
    if (credentials.size() > 1) {
      try {
        if (!authenticator.result()) {
          myFailures.put(credential.getDatabase(),new MongoDbAuthenticationException("String_Node_Str" + credential.getDatabase() + "String_Node_Str"));
        }
      }
 catch (      final MongoDbException error) {
        myFailures.put(credential.getDatabase(),error);
      }
    }
 else {
      myAuthenticators.put(credential.getDatabase(),authenticator);
    }
  }
}
Program: 135645
Project: 135645
Buggy source:
/** 
 * Creates a AbstractProxyConnection.
 * @param proxiedConnection The connection to forward to.
 * @param config The MongoDB client configuration.
 */
public AbstractProxyConnection(final Connection proxiedConnection,final MongoClientConfiguration config){
  myProxiedConnection=proxiedConnection;
  myConfig=config;
}

Fixed version (ground truth):
/** 
 * Creates a AbstractProxyConnection.
 * @param proxiedConnection The connection to forward to.
 */
public AbstractProxyConnection(final Connection proxiedConnection){
  myProxiedConnection=proxiedConnection;
}