nus-yam/ex-repair huggingface dataset:
Program: 135537
Project: 135537
Buggy source:
@Override protected void loadCommentsDisplay(){
  commentsTextDisplay.getChildren().clear();
  if (editButton.selectedProperty().get() == false) {
    super.loadCommentsDisplay();
  }
 else {
    editableCommentsText.setText(originalComment.getBody());
    commentsTextDisplay.getChildren().add(editableCommentsText);
  }
}

Fixed version (ground truth):
@Override protected void loadCommentsDisplay(){
  commentsTextDisplay.getChildren().clear();
  if (!handler.commentIsInEditState(originalComment)) {
    super.loadCommentsDisplay();
  }
 else {
    editableCommentsText.setText(originalComment.getBody());
    commentsTextDisplay.getChildren().add(editableCommentsText);
  }
}
Program: 135538
Project: 135538
Buggy source:
public CommentCard(TurboComment comment){
  super(comment);
  this.editedComment=new TurboComment(comment);
}

Fixed version (ground truth):
public CommentCard(IssueDetailsContentHandler handler){
  super();
  this.handler=handler;
}
Program: 135539
Project: 135539
Buggy source:
private void initialiseEditButton(){
  editButton=new ToggleButton();
  editButton.setText(EDIT_BTN_TXT);
  WeakReference<CommentCard> selfRef=new WeakReference<CommentCard>(this);
  editButton.setOnMousePressed(e -> {
    selfRef.get().handleEditButtonPressed();
  }
);
}

Fixed version (ground truth):
private void initialiseEditButton(){
  editButton=new Button();
  editButton.setText(EDIT_BTN_TXT);
  WeakReference<CommentCard> selfRef=new WeakReference<CommentCard>(this);
  editButton.setOnMousePressed(e -> {
    selfRef.get().handleEditButtonPressed();
  }
);
}
Program: 135540
Project: 135540
Buggy source:
private void handleEditButtonPressed(){
  System.out.println("String_Node_Str");
  if (editButton.selectedProperty().get()) {
  }
  loadCommentsDisplay();
}

Fixed version (ground truth):
private void handleEditButtonPressed(){
  handler.toggleCommentEditState(originalComment);
  loadCommentsDisplay();
}
Program: 135541
Project: 135541
Buggy source:
@Override public void updateItem(TurboComment item,boolean empty){
  super.updateItem(item,empty);
  if (displayType == DisplayType.COMMENTS && item != null) {
    setGraphic(new CommentCard(item));
  }
 else   if (item != null) {
    setGraphic(new IssueDetailsCard(item));
  }
  setAlignment(Pos.CENTER);
}

Fixed version (ground truth):
@Override public void updateItem(TurboComment item,boolean empty){
  super.updateItem(item,empty);
  setAlignment(Pos.CENTER);
  if (item != null) {
    display.setDisplayedItem(item);
    setGraphic(display);
  }
}
Program: 135542
Project: 135542
Buggy source:
public DetailsCell(TurboIssue issue,DisplayType displayType){
  this.issue=issue;
  this.displayType=displayType;
}

Fixed version (ground truth):
public DetailsCell(TurboIssue issue,DisplayType displayType,IssueDetailsContentHandler handler){
  this.issue=issue;
  this.displayType=displayType;
  if (displayType == DisplayType.COMMENTS) {
    display=new CommentCard(handler);
  }
 else {
    display=new IssueDetailsCard();
  }
}
Program: 135543
Project: 135543
Buggy source:
@Override public ListCell<TurboComment> call(ListView<TurboComment> list){
  return new DetailsCell(issue,displayType);
}

Fixed version (ground truth):
@Override public ListCell<TurboComment> call(ListView<TurboComment> list){
  return new DetailsCell(issue,displayType,handler);
}
Program: 135544
Project: 135544
Buggy source:
private Callback<ListView<TurboComment>,ListCell<TurboComment>> commentCellFactory(){
  Callback<ListView<TurboComment>,ListCell<TurboComment>> factory=new Callback<ListView<TurboComment>,ListCell<TurboComment>>(){
    @Override public ListCell<TurboComment> call(    ListView<TurboComment> list){
      return new DetailsCell(issue,displayType);
    }
  }
;
  return factory;
}

Fixed version (ground truth):
private Callback<ListView<TurboComment>,ListCell<TurboComment>> commentCellFactory(){
  Callback<ListView<TurboComment>,ListCell<TurboComment>> factory=new Callback<ListView<TurboComment>,ListCell<TurboComment>>(){
    @Override public ListCell<TurboComment> call(    ListView<TurboComment> list){
      return new DetailsCell(issue,displayType,handler);
    }
  }
;
  return factory;
}
Program: 135545
Project: 135545
Buggy source:
private String stripChangeLogHeader(String text){
  if (text == null || !originalComment.isIssueLog()) {
    System.out.println("String_Node_Str" + text);
    return text;
  }
  return text.replaceFirst(Pattern.quote(ServiceManager.CHANGELOG_TAG),"String_Node_Str");
}

Fixed version (ground truth):
private String stripChangeLogHeader(String text){
  if (text == null || !originalComment.isIssueLog()) {
    return text;
  }
  return text.replaceFirst(Pattern.quote(ServiceManager.CHANGELOG_TAG),"String_Node_Str");
}
Program: 135546
Project: 135546
Buggy source:
protected void initialiseCommentsText(){
  commentsText=new Text();
  commentsText.setWrappingWidth(PREF_WIDTH);
  initialiseCommentBodyChangeListener();
}

Fixed version (ground truth):
protected void initialiseCommentsText(){
  commentsText=new Text();
  commentsText.setWrappingWidth(PREF_WIDTH);
}
Program: 135547
Project: 135547
Buggy source:
public IssueDetailsCard(TurboComment comment){
  this.originalComment=comment;
  this.setSpacing(ELEMENTS_SPACING);
  this.setPrefWidth(PREF_WIDTH);
  initialiseUIComponents();
  loadCardComponents();
}

Fixed version (ground truth):
public IssueDetailsCard(){
  this.setSpacing(ELEMENTS_SPACING);
  this.setPrefWidth(PREF_WIDTH);
  initialiseUIComponents();
}
Program: 135548
Project: 135548
Buggy source:
public IssueDisplayPane(TurboIssue displayedIssue,Model model,ColumnControl columns){
  this.issue=displayedIssue;
  this.model=model;
  this.columns=columns;
  setup();
}

Fixed version (ground truth):
public IssueDisplayPane(TurboIssue displayedIssue,Stage parentStage,Model model,ColumnControl columns){
  this.issue=displayedIssue;
  this.model=model;
  this.parentStage=parentStage;
  this.columns=columns;
  setup();
}
Program: 135549
Project: 135549
Buggy source:
private void setup(){
  this.issueEditDisplay=new IssueEditDisplay(issue,model,columns,this);
  this.issueEditDisplay.setPrefWidth(ISSUE_WIDTH);
  this.issueEditDisplay.setMinWidth(ISSUE_WIDTH);
  this.issueDetailsDisplay=new IssueDetailsDisplay(issue);
  this.issueDetailsDisplay.setPrefWidth(DETAILS_WIDTH);
  this.issueDetailsDisplay.setMinWidth(DETAILS_WIDTH);
  this.getChildren().add(issueEditDisplay);
}

Fixed version (ground truth):
private void setup(){
  this.issueEditDisplay=new IssueEditDisplay(issue,parentStage,model,columns,this);
  this.issueEditDisplay.setPrefWidth(ISSUE_WIDTH);
  this.issueEditDisplay.setMinWidth(ISSUE_WIDTH);
  this.issueDetailsDisplay=new IssueDetailsDisplay(issue);
  this.issueDetailsDisplay.setPrefWidth(DETAILS_WIDTH);
  this.issueDetailsDisplay.setMinWidth(DETAILS_WIDTH);
  this.getChildren().add(issueEditDisplay);
}
Program: 135550
Project: 135550
Buggy source:
@Override public List<String> getPredicateNames(){
  return new ArrayList<String>(Arrays.asList(content));
}

Fixed version (ground truth):
@Override public List<String> getPredicateNames(){
  return new ArrayList<String>(Arrays.asList(name));
}
Program: 135551
Project: 135551
Buggy source:
public void refreshItems(){
  filteredList=new FilteredList<TurboIssue>(issues,predicate);
}

Fixed version (ground truth):
public void refreshItems(){
  transformedIssueList=new FilteredList<TurboIssue>(issues,predicate);
  if (currentFilterExpression instanceof filter.Predicate) {
    List<String> names=((filter.Predicate)currentFilterExpression).getPredicateNames();
    if (names.size() == 1 && names.get(0).equals("String_Node_Str")) {
      System.out.println("String_Node_Str");
      transformedIssueList=new SortedList<>(transformedIssueList,new Comparator<TurboIssue>(){
        @Override public int compare(        TurboIssue a,        TurboIssue b){
          if (a.getId() == b.getParentIssue()) {
            return -1;
          }
 else           if (b.getId() == a.getParentIssue()) {
            return 1;
          }
 else {
            return 0;
          }
        }
      }
);
    }
  }
}
Program: 135552
Project: 135552
Buggy source:
@Override public void refreshItems(){
  super.refreshItems();
  WeakReference<IssuePanel> that=new WeakReference<IssuePanel>(this);
  listView.setCellFactory(new Callback<ListView<TurboIssue>,ListCell<TurboIssue>>(){
    @Override public ListCell<TurboIssue> call(    ListView<TurboIssue> list){
      if (that.get() != null) {
        return new IssuePanelCell(mainStage,model,that.get(),columnIndex,sidePanel,parentColumnControl);
      }
 else {
        return null;
      }
    }
  }
);
  listView.setItems(null);
  listView.setItems(getFilteredList());
}

Fixed version (ground truth):
@Override public void refreshItems(){
  super.refreshItems();
  WeakReference<IssuePanel> that=new WeakReference<IssuePanel>(this);
  listView.setCellFactory(new Callback<ListView<TurboIssue>,ListCell<TurboIssue>>(){
    @Override public ListCell<TurboIssue> call(    ListView<TurboIssue> list){
      if (that.get() != null) {
        return new IssuePanelCell(mainStage,model,that.get(),columnIndex,sidePanel,parentColumnControl);
      }
 else {
        return null;
      }
    }
  }
);
  listView.setItems(null);
  listView.setItems(getIssueList());
}
Program: 135553
Project: 135553
Buggy source:
public void updateCachedIssues(List<Issue> issueList){
  if (issueList.size() == 0) {
    return;
  }
  WeakReference<Model> selfRef=new WeakReference<Model>(this);
  for (  Issue issue : issueList) {
    Platform.runLater(new Runnable(){
      @Override public void run(){
        TurboIssue newCached=new TurboIssue(issue,selfRef.get());
        updateCachedIssue(newCached);
      }
    }
);
  }
}

Fixed version (ground truth):
public void updateCachedIssues(List<Issue> issueList){
  if (issueList.size() == 0) {
    return;
  }
  WeakReference<Model> selfRef=new WeakReference<Model>(this);
  for (int i=issueList.size() - 1; i >= 0; i--) {
    Issue issue=issueList.get(i);
    Platform.runLater(new Runnable(){
      @Override public void run(){
        TurboIssue newCached=new TurboIssue(issue,selfRef.get());
        updateCachedIssue(newCached);
      }
    }
);
  }
}
Program: 135554
Project: 135554
Buggy source:
public Date getDueOn(){
  return dueOn;
}

Fixed version (ground truth):
public LocalDate getDueOn(){
  return dueOn;
}
Program: 135555
Project: 135555
Buggy source:
public Milestone toGhResource(){
  Milestone ghMilestone=new Milestone();
  ghMilestone.setTitle(getTitle());
  ghMilestone.setNumber(number);
  ghMilestone.setState(state);
  ghMilestone.setDescription(description);
  ghMilestone.setDueOn(dueOn);
  return ghMilestone;
}

Fixed version (ground truth):
public Milestone toGhResource(){
  Milestone ghMilestone=new Milestone();
  ghMilestone.setTitle(getTitle());
  ghMilestone.setNumber(number);
  ghMilestone.setState(state);
  ghMilestone.setDescription(description);
  ghMilestone.setDueOn(toDate(dueOn));
  return ghMilestone;
}
Program: 135556
Project: 135556
Buggy source:
public void setDueOn(Date dueOn){
  this.dueOn=dueOn;
}

Fixed version (ground truth):
public void setDueOn(LocalDate dueOn){
  this.dueOn=dueOn;
}
Program: 135557
Project: 135557
Buggy source:
private void respond(String title,Date dueDate){
  originalMilestone.setTitle(title);
  originalMilestone.setDueOn(dueDate);
  completeResponse(originalMilestone);
}

Fixed version (ground truth):
private void respond(String title,LocalDate dueDate){
  originalMilestone.setTitle(title);
  originalMilestone.setDueOn(dueDate);
  completeResponse(originalMilestone);
}
Program: 135558
Project: 135558
Buggy source:
@Override protected Parent content(){
  TextField milestoneTitleField=new TextField();
  milestoneTitleField.setPrefWidth(120);
  milestoneTitleField.setText(originalMilestone.getTitle());
  DatePicker datePicker=(originalMilestone.getDueOn() != null) ? new DatePicker(toTimeDate(originalMilestone.getDueOn())) : new DatePicker();
  datePicker.setPrefWidth(110);
  Button done=new Button("String_Node_Str");
  done.setOnAction(e -> {
    respond(milestoneTitleField.getText(),toUtilDate(datePicker.getValue()));
    close();
  }
);
  HBox layout=new HBox();
  layout.setPadding(new Insets(15));
  layout.setSpacing(10);
  layout.setAlignment(Pos.BASELINE_CENTER);
  layout.getChildren().addAll(milestoneTitleField,datePicker,done);
  return layout;
}

Fixed version (ground truth):
@Override protected Parent content(){
  TextField milestoneTitleField=new TextField();
  milestoneTitleField.setPrefWidth(120);
  milestoneTitleField.setText(originalMilestone.getTitle());
  DatePicker datePicker=(originalMilestone.getDueOn() != null) ? new DatePicker(originalMilestone.getDueOn()) : new DatePicker();
  datePicker.setPrefWidth(110);
  Button done=new Button("String_Node_Str");
  done.setOnAction(e -> {
    respond(milestoneTitleField.getText(),datePicker.getValue());
    close();
  }
);
  HBox layout=new HBox();
  layout.setPadding(new Insets(15));
  layout.setSpacing(10);
  layout.setAlignment(Pos.BASELINE_CENTER);
  layout.getChildren().addAll(milestoneTitleField,datePicker,done);
  return layout;
}
Program: 135559
Project: 135559
Buggy source:
private HBox createTopTitle(){
  HBox title=new HBox();
  title.setAlignment(Pos.BASELINE_LEFT);
  title.setSpacing(TITLE_SPACING);
  Text issueId=new Text("String_Node_Str" + issue.getId());
  issueId.setStyle("String_Node_Str");
  issueId.setOnMouseClicked(e -> {
    Browse.browse(issue.getHtmlUrl());
  }
);
  TextArea issueTitle=createIssueTitle();
  Parent statusBox=createStatusBox(parentStage);
  VBox topLeft=new VBox();
  topLeft.setSpacing(5);
  topLeft.setAlignment(Pos.CENTER);
  topLeft.getChildren().addAll(issueId,statusBox);
  int maxTitleHeight=TITLE_ROW_NUM * LINE_HEIGHT;
  issueTitle.setMaxHeight(maxTitleHeight);
  title.setMaxHeight(maxTitleHeight);
  topLeft.setMaxHeight(maxTitleHeight);
  title.getChildren().addAll(topLeft,issueTitle);
  return title;
}

Fixed version (ground truth):
private HBox createTopTitle(){
  HBox title=new HBox();
  title.setAlignment(Pos.BASELINE_LEFT);
  title.setSpacing(TITLE_SPACING);
  Text issueId=new Text("String_Node_Str" + issue.getId());
  issueId.setStyle("String_Node_Str");
  issueId.setOnMouseClicked(e -> {
    Browse.browse(issue.getHtmlUrl());
  }
);
  TextArea issueTitle=createIssueTitle();
  Parent statusBox=createStatusBox(parentStage);
  VBox topLeft=new VBox();
  topLeft.setSpacing(5);
  topLeft.setAlignment(Pos.CENTER);
  topLeft.getChildren().addAll(issueId,statusBox);
  int maxTitleHeight=TITLE_ROW_NUM * LINE_HEIGHT;
  issueTitle.setMaxHeight(maxTitleHeight);
  title.setMaxHeight(maxTitleHeight);
  topLeft.setMaxHeight(maxTitleHeight);
  title.getChildren().addAll(topLeft,issueTitle);
  title.setAlignment(Pos.CENTER);
  return title;
}
Program: 135560
Project: 135560
Buggy source:
private Parent createAssigneeBox(Stage stage){
}

Fixed version (ground truth):
private Parent createAssigneeBox(Stage stage){
  final ListableDisplayBox assigneeBox=new ListableDisplayBox("String_Node_Str",issue.getAssignee());
  List<TurboUser> allAssignees=model.getCollaborators();
  assigneeBox.setOnMouseClicked((e) -> {
    ArrayList<Integer> existingIndices=new ArrayList<Integer>();
    if (issue.getAssignee() != null) {
      int existingIndex=-1;
      for (int i=0; i < allAssignees.size(); i++) {
        if (allAssignees.get(i).equals(issue.getAssignee())) {
          existingIndex=i;
        }
      }
      if (existingIndex != -1) {
        existingIndices.add(existingIndex);
      }
    }
    (new CheckboxListDialog(stage,FXCollections.observableArrayList(allAssignees))).setWindowTitle("String_Node_Str").setMultipleSelection(false).setInitialCheckedState(existingIndices).show().thenApply((response) -> {
      TurboUser assignee=response.size() > 0 ? allAssignees.get(response.get(0)) : null;
      assigneeBox.setListableItem(assignee);
      issue.setAssignee(assignee);
      return true;
    }
).exceptionally(ex -> {
      ex.printStackTrace();
      return false;
    }
);
  }
);
  return assigneeBox;
}
Program: 135561
Project: 135561
Buggy source:
private Parent createMilestoneBox(Stage stage){
}

Fixed version (ground truth):
private Parent createMilestoneBox(Stage stage){
  final ListableDisplayBox milestoneBox=new ListableDisplayBox("String_Node_Str",issue.getMilestone());
  List<TurboMilestone> allMilestones=model.getMilestones();
  milestoneBox.setOnMouseClicked((e) -> {
    ArrayList<Integer> existingIndices=new ArrayList<Integer>();
    if (issue.getMilestone() != null) {
      int existingIndex=-1;
      for (int i=0; i < allMilestones.size(); i++) {
        if (allMilestones.get(i).equals(issue.getMilestone())) {
          existingIndex=i;
        }
      }
      if (existingIndex != -1) {
        existingIndices.add(existingIndex);
      }
    }
    (new CheckboxListDialog(stage,FXCollections.observableArrayList(allMilestones))).setWindowTitle("String_Node_Str").setMultipleSelection(false).setInitialCheckedState(existingIndices).show().thenApply((response) -> {
      TurboMilestone milestone=response.size() > 0 ? allMilestones.get(response.get(0)) : null;
      milestoneBox.setListableItem(milestone);
      issue.setMilestone(milestone);
      return true;
    }
).exceptionally(ex -> {
      ex.printStackTrace();
      return false;
    }
);
  }
);
  return milestoneBox;
}
Program: 135562
Project: 135562
Buggy source:
public static void main(String[] args){
}

Fixed version (ground truth):
public static void main(String[] args){
  FilterExpression p=Parser.parse("String_Node_Str");
  System.out.println(p);
}
Program: 135563
Project: 135563
Buggy source:
private int getInfixPrecedence(){
switch (lookAhead().getType()) {
case AND:
case SYMBOL:
case LBRACKET:
    return Precedence.CONJUNCTION;
case OR:
  return Precedence.DISJUNCTION;
case NEGATE:
return Precedence.PREFIX;
default :
return 0;
}
}

Fixed version (ground truth):
private int getInfixPrecedence(Token token){
switch (token.getType()) {
case AND:
case SYMBOL:
case LBRACKET:
    return Precedence.CONJUNCTION;
case OR:
  return Precedence.DISJUNCTION;
case NEGATE:
return Precedence.PREFIX;
default :
return 0;
}
}
Program: 135564
Project: 135564
Buggy source:
private Node createFilterBox(){
  HBox filterBox=new HBox();
  Label label=new Label(NO_FILTER);
  label.setPadding(new Insets(3));
  filterBox.setOnMouseClicked(e -> onFilterBoxClick(label));
  filterBox.setAlignment(Pos.TOP_LEFT);
  HBox.setHgrow(filterBox,Priority.ALWAYS);
  filterBox.getChildren().add(label);
  HBox rightAlignBox=new HBox();
  Label addIssue=new Label("String_Node_Str");
  addIssue.setStyle("String_Node_Str");
  addIssue.setOnMouseClicked((e) -> {
    TurboIssue issue=new TurboIssue("String_Node_Str","String_Node_Str",model);
    applyCurrentFilterExpressionToIssue(issue,false);
    sidePanel.displayIssue(issue).thenApply(r -> {
      if (r.equals("String_Node_Str")) {
        model.createIssue(issue);
      }
      parentColumnControl.refresh();
      sidePanel.displayTabs();
      return true;
    }
).exceptionally(ex -> {
      ex.printStackTrace();
      return false;
    }
);
  }
);
  Label closeList=new Label("String_Node_Str");
  closeList.setStyle("String_Node_Str");
  closeList.setOnMouseClicked((e) -> {
    parentColumnControl.closeColumn(columnIndex);
  }
);
  HBox.setMargin(rightAlignBox,new Insets(0,5,0,0));
  rightAlignBox.setSpacing(5);
  rightAlignBox.setAlignment(Pos.TOP_RIGHT);
  HBox.setHgrow(rightAlignBox,Priority.ALWAYS);
  rightAlignBox.getChildren().addAll(addIssue,closeList);
  HBox topBox=new HBox();
  topBox.setSpacing(5);
  topBox.getChildren().addAll(filterBox,rightAlignBox);
  return topBox;
}

Fixed version (ground truth):
private Node createFilterBox(){
  HBox filterBox=new HBox();
  Label label=new Label(NO_FILTER);
  label.setPadding(new Insets(3));
  filterBox.setOnMouseClicked(e -> onFilterBoxClick(label));
  filterBox.setAlignment(Pos.TOP_LEFT);
  HBox.setHgrow(filterBox,Priority.ALWAYS);
  filterBox.getChildren().add(label);
  HBox rightAlignBox=new HBox();
  WeakReference<Column> selfRef=new WeakReference<Column>(this);
  Label addIssue=new Label("String_Node_Str");
  addIssue.setStyle("String_Node_Str");
  addIssue.setOnMouseClicked((e) -> {
    TurboIssue issue=new TurboIssue("String_Node_Str","String_Node_Str",model);
    applyCurrentFilterExpressionToIssue(issue,false);
    sidePanel.displayIssue(issue).thenApply(r -> {
      if (r.equals("String_Node_Str")) {
        model.createIssue(issue);
      }
      parentColumnControl.refresh();
      sidePanel.displayTabs();
      return true;
    }
).exceptionally(ex -> {
      ex.printStackTrace();
      return false;
    }
);
  }
);
  Label closeList=new Label("String_Node_Str");
  closeList.setStyle("String_Node_Str");
  closeList.setOnMouseClicked((e) -> {
    parentColumnControl.closeColumn(selfRef.get());
  }
);
  HBox.setMargin(rightAlignBox,new Insets(0,5,0,0));
  rightAlignBox.setSpacing(5);
  rightAlignBox.setAlignment(Pos.TOP_RIGHT);
  HBox.setHgrow(rightAlignBox,Priority.ALWAYS);
  rightAlignBox.getChildren().addAll(addIssue,closeList);
  HBox topBox=new HBox();
  topBox.setSpacing(5);
  topBox.getChildren().addAll(filterBox,rightAlignBox);
  return topBox;
}
Program: 135565
Project: 135565
Buggy source:
public void closeColumn(int index){
  getChildren().remove(index);
}

Fixed version (ground truth):
public void closeColumn(Column col){
  getChildren().remove(col);
}
Program: 135566
Project: 135566
Buggy source:
public boolean isSatisfiedBy(TurboIssue issue,Model model){
  if (name == null && content == null)   return true;
switch (name) {
case "String_Node_Str":
    return issue.getTitle().toLowerCase().contains(content.toLowerCase());
case "String_Node_Str":
  if (issue.getMilestone() == null)   return false;
return issue.getMilestone().getTitle().toLowerCase().contains(content.toLowerCase());
case "String_Node_Str":
content=content.toLowerCase();
if (content.startsWith("String_Node_Str")) {
return issue.getParentIssue() == Integer.parseInt(content.substring(1));
}
 else if (Character.isDigit(content.charAt(0))) {
return issue.getParentIssue() == Integer.parseInt(content);
}
 else {
List<TurboIssue> actualParentInstances=model.getIssues().stream().filter(i -> (issue.getParentIssue() == i.getId())).collect(Collectors.toList());
for (int i=0; i < actualParentInstances.size(); i++) {
if (actualParentInstances.get(i).getTitle().toLowerCase().contains(content)) {
  return true;
}
}
return false;
}
case "String_Node_Str":
content=content.toLowerCase();
String group=null;
if (content.contains("String_Node_Str")) {
int pos=content.indexOf('.');
group=content.substring(0,pos);
content=content.substring(pos + 1);
}
for (TurboLabel l : issue.getLabels()) {
if (l.getName().toLowerCase().contains(content)) {
if (group == null || l.getGroup().toLowerCase().contains(group)) {
return true;
}
}
}
return false;
case "String_Node_Str":
if (issue.getAssignee() == null) return false;
return issue.getAssignee().getGithubName().toLowerCase().contains(content.toLowerCase()) || (issue.getAssignee().getRealName() != null && issue.getAssignee().getRealName().toLowerCase().contains(content.toLowerCase()));
case "String_Node_Str":
case "String_Node_Str":
if (content.toLowerCase().contains("String_Node_Str")) {
return issue.getOpen();
}
 else if (content.toLowerCase().contains("String_Node_Str")) {
return !issue.getOpen();
}
 else {
return false;
}
default :
return false;
}
}

Fixed version (ground truth):
public boolean isSatisfiedBy(TurboIssue issue,Model model){
}
Program: 135567
Project: 135567
Buggy source:
public void setItems(ObservableList<TurboIssue> issues){
  this.issues=issues;
  refreshItems();
}

Fixed version (ground truth):
public void setItems(ObservableList<TurboIssue> issues){
  this.issues=issues;
  this.issues.addListener(new WeakListChangeListener<TurboIssue>(createIssuesListener()));
}
Program: 135568
Project: 135568
Buggy source:
private void setup(){
  setMaxWidth(330);
  if (displayWhenEmpty) {
    getStyleClass().add("String_Node_Str");
  }
  setHgap(3);
  setVgap(3);
  labels.addListener(new WeakListChangeListener<TurboLabel>(createLabelsChangeListener()));
  populateWithLabels();
}

Fixed version (ground truth):
private void setup(){
  setMaxWidth(330);
  setPrefWrapLength(330);
  if (displayWhenEmpty) {
    getStyleClass().add("String_Node_Str");
  }
  setHgap(3);
  setVgap(3);
  labels.addListener(new WeakListChangeListener<TurboLabel>(createLabelsChangeListener()));
  populateWithLabels();
}
Program: 135569
Project: 135569
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);
    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();
}

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(newValue);
            disabled=false;
          }
        }
      }
    }
;
    WeakChangeListener<Boolean> weakListener=new WeakChangeListener<Boolean>(strongListener);
    item.checkedProperty().addListener(weakListener);
    listeners.add(strongListener);
    newItems.add(item);
  }
  this.items=newItems;
  refresh();
}
Program: 135570
Project: 135570
Buggy source:
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;
    }
  }
}

Fixed version (ground truth):
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(newValue);
      disabled=false;
    }
  }
}
Program: 135571
Project: 135571
Buggy source:
public ParentIssuesDisplayBox(ObservableList<Integer> items,boolean displayWhenEmpty){
  setListableItems(items);
  this.displayWhenEmpty=displayWhenEmpty;
  setup();
}

Fixed version (ground truth):
public ParentIssuesDisplayBox(IntegerProperty item,boolean displayWhenEmpty){
  setListableItem(item);
  this.displayWhenEmpty=displayWhenEmpty;
  setup();
}
Program: 135572
Project: 135572
Buggy source:
private void initialiseChangeListener(){
  if (listChangeListener != null) {
    listChangeListener=null;
  }
  if (this.issueNumbers != null) {
    WeakReference<ParentIssuesDisplayBox> that=new WeakReference<ParentIssuesDisplayBox>(this);
    listChangeListener=new ListChangeListener<Integer>(){
      @Override public void onChanged(      ListChangeListener.Change<? extends Integer> arg0){
        if (that.get() != null) {
          that.get().update();
        }
      }
    }
;
  }
}

Fixed version (ground truth):
private void initialiseChangeListener(){
  if (changeListener != null) {
    changeListener=null;
  }
  if (this.issueNumber != null) {
    WeakReference<ParentIssuesDisplayBox> that=new WeakReference<ParentIssuesDisplayBox>(this);
    changeListener=new ChangeListener<Number>(){
      @Override public void changed(      ObservableValue<? extends Number> arg0,      Number arg1,      Number arg2){
        that.get().update();
      }
    }
;
  }
}
Program: 135573
Project: 135573
Buggy source:
private void update(){
  getChildren().clear();
  Label label;
  if (displayWhenEmpty && issueNumbers.size() == 0) {
    label=new Label("String_Node_Str");
    label.getStyleClass().addAll("String_Node_Str","String_Node_Str");
    getChildren().add(label);
  }
 else {
    StringBuilder parentSB=new StringBuilder();
    for (    Integer p : issueNumbers) {
      parentSB.append("String_Node_Str" + p);
      parentSB.append("String_Node_Str");
    }
    if (parentSB.length() != 0)     parentSB.delete(parentSB.length() - 2,parentSB.length());
    if (displayWhenEmpty || (!displayWhenEmpty && !parentSB.toString().isEmpty())) {
      label=new Label(parentSB.toString());
      label.getStyleClass().addAll("String_Node_Str");
      getChildren().add(label);
    }
  }
}

Fixed version (ground truth):
private void update(){
  getChildren().clear();
  Label label;
  if (displayWhenEmpty && issueNumber.get() <= 0) {
    label=new Label("String_Node_Str");
    label.getStyleClass().addAll("String_Node_Str","String_Node_Str");
    getChildren().add(label);
  }
 else {
    String parentString="String_Node_Str" + issueNumber.get();
    label=new Label(parentString);
    label.getStyleClass().addAll("String_Node_Str");
    getChildren().add(label);
  }
}
Program: 135574
Project: 135574
Buggy source:
public void setLabels(List<TurboLabel> labels){
  if (this.labels != labels) {
    clearAllLabels();
    for (    TurboLabel label : labels) {
      addToLabels(label);
    }
  }
}

Fixed version (ground truth):
public void setLabels(List<TurboLabel> labels){
  if (this.labels != labels) {
    clearAllLabels();
    for (    TurboLabel label : labels) {
      addLabel(label);
    }
  }
}
Program: 135575
Project: 135575
Buggy source:
public void setParents(ObservableList<Integer> parentNumbers){
  if (this.parents == null) {
    this.parents=parentNumbers;
  }
 else   if (parentNumbers != this.parents) {
    this.parents.clear();
    this.parents.addAll(parentNumbers);
  }
}

Fixed version (ground truth):
public void setParents(ObservableList<Integer> parentNumbers){
  if (this.parents == null) {
    this.parents=parentNumbers;
  }
 else   if (parentNumbers != this.parents) {
    this.parents.clear();
    if (!parentNumbers.isEmpty()) {
      this.parents.add(parentNumbers.get(0));
    }
  }
}
Program: 135576
Project: 135576
Buggy source:
public void addParent(Integer parentId){
  if (!parents.contains(parentId)) {
    parents.add(parentId);
  }
}

Fixed version (ground truth):
public void addParent(Integer parentId){
  this.parents.clear();
  this.parents.add(parentId);
}
Program: 135577
Project: 135577
Buggy source:
private Parent createParentsBox(Stage stage){
}

Fixed version (ground truth):
private Parent createParentsBox(Stage stage){
  final ParentIssuesDisplayBox parentsBox=new ParentIssuesDisplayBox(issue.parentIssueProperty(),true);
  List<TurboIssue> allIssues=model.getIssues();
  parentsBox.setOnMouseClicked((e) -> {
    Integer originalParent=issue.getParentIssue();
    Integer indexForExistingParent=model.getIndexOfIssue(originalParent);
    ArrayList<Integer> existingIndices=new ArrayList<Integer>();
    existingIndices.add(indexForExistingParent);
    (new CheckboxListDialog(stage,FXCollections.observableArrayList(allIssues))).setWindowTitle("String_Node_Str").setMultipleSelection(false).setInitialCheckedState(existingIndices).show().thenApply((    List<Integer> response) -> {
      boolean wasAnythingSelected=response.size() > 0;
      if (wasAnythingSelected) {
        Integer parent=response.size() > 0 ? allIssues.get(response.get(0)).getId() : null;
        issue.setParentIssue(parent);
        model.processInheritedLabels(issue,originalParents);
      }
 else {
        issue.setParentIssue(-1);
      }
      return true;
    }
).exceptionally(ex -> {
      ex.printStackTrace();
      return false;
    }
);
  }
);
  return parentsBox;
}
Program: 135578
Project: 135578
Buggy source:
private ListChangeListener<Integer> createParentsChangeListener(){
  WeakReference<IssueIndicatorsDisplayBox> that=new WeakReference<IssueIndicatorsDisplayBox>(this);
  ListChangeListener<Integer> listChangeListener=new ListChangeListener<Integer>(){
    @Override public void onChanged(    ListChangeListener.Change<? extends Integer> arg0){
      if (that.get() != null) {
        that.get().updateIndicators(null);
      }
    }
  }
;
  changeListeners.add(listChangeListener);
  return listChangeListener;
}

Fixed version (ground truth):
private ChangeListener<Number> createParentsChangeListener(){
  WeakReference<IssueIndicatorsDisplayBox> that=new WeakReference<IssueIndicatorsDisplayBox>(this);
  ChangeListener<Number> changeListener=new ChangeListener<Number>(){
    @Override public void changed(    ObservableValue<? extends Number> arg0,    Number arg1,    Number arg2){
      if (that.get() != null) {
        that.get().updateIndicators(null);
      }
    }
  }
;
  changeListeners.add(changeListener);
  return changeListener;
}
Program: 135579
Project: 135579
Buggy source:
public IssueIndicatorsDisplayBox(TurboIssue issue,boolean displayWhenEmpty){
  this.parentIssues=issue.getParentsReference();
  if (issue.getMilestone() != null) {
    this.milestoneTitle=issue.getMilestone().titleProperty();
  }
  this.displayWhenEmpty=displayWhenEmpty;
  setup();
}

Fixed version (ground truth):
public IssueIndicatorsDisplayBox(TurboIssue issue,boolean displayWhenEmpty){
  this.parentIssue=issue.parentIssueProperty();
  if (issue.getMilestone() != null) {
    this.milestoneTitle=issue.getMilestone().titleProperty();
  }
  this.displayWhenEmpty=displayWhenEmpty;
  setup();
}
Program: 135580
Project: 135580
Buggy source:
private void setup(){
  if (displayWhenEmpty) {
    getStyleClass().add("String_Node_Str");
  }
  setSpacing(3);
  parentIssues.addListener(new WeakListChangeListener<Integer>(createParentsChangeListener()));
  if (this.milestoneTitle != null) {
    milestoneTitle.addListener(new WeakChangeListener<String>(createMilestoneChangeListener()));
  }
  updateIndicators(null);
}

Fixed version (ground truth):
private void setup(){
  if (displayWhenEmpty) {
    getStyleClass().add("String_Node_Str");
  }
  setSpacing(3);
  parentIssue.addListener(new WeakChangeListener<Number>(createParentsChangeListener()));
  if (this.milestoneTitle != null) {
    milestoneTitle.addListener(new WeakChangeListener<String>(createMilestoneChangeListener()));
  }
  updateIndicators(null);
}
Program: 135581
Project: 135581
Buggy source:
private void updateIndicators(String newMilestoneTitle){
  getChildren().clear();
  if (this.milestoneTitle != null) {
    Label milestoneLabel=new Label();
    milestoneLabel.getStyleClass().add("String_Node_Str");
    if (newMilestoneTitle != null) {
      milestoneLabel.setText(newMilestoneTitle);
    }
 else {
      milestoneLabel.setText(milestoneTitle.get());
    }
    getChildren().add(milestoneLabel);
  }
  Label label;
  if (displayWhenEmpty && parentIssues.size() == 0) {
    label=new Label("String_Node_Str");
    label.getStyleClass().addAll("String_Node_Str","String_Node_Str");
    getChildren().add(label);
  }
 else {
    StringBuilder parentSB=new StringBuilder();
    for (    Integer p : parentIssues) {
      parentSB.append("String_Node_Str" + p);
      parentSB.append("String_Node_Str");
    }
    if (parentSB.length() != 0)     parentSB.delete(parentSB.length() - 2,parentSB.length());
    if (displayWhenEmpty || (!displayWhenEmpty && !parentSB.toString().isEmpty())) {
      label=new Label(parentSB.toString());
      label.getStyleClass().addAll("String_Node_Str");
      getChildren().add(label);
    }
  }
}

Fixed version (ground truth):
private void updateIndicators(String newMilestoneTitle){
  getChildren().clear();
  if (this.milestoneTitle != null) {
    Label milestoneLabel=new Label();
    milestoneLabel.getStyleClass().add("String_Node_Str");
    if (newMilestoneTitle != null) {
      milestoneLabel.setText(newMilestoneTitle);
    }
 else {
      milestoneLabel.setText(milestoneTitle.get());
    }
    getChildren().add(milestoneLabel);
  }
  Label label;
  if (displayWhenEmpty && parentIssue.get() <= 0) {
    label=new Label("String_Node_Str");
    label.getStyleClass().addAll("String_Node_Str","String_Node_Str");
    getChildren().add(label);
  }
 else {
    String parentString="String_Node_Str" + parentIssue.get();
    label=new Label(parentString);
    label.getStyleClass().addAll("String_Node_Str");
    getChildren().add(label);
  }
}
Program: 135582
Project: 135582
Buggy source:
@Override public void changed(ObservableValue<? extends String> stringProperty,String oldValue,String newValue){
  if (that.get() != null) {
    that.get().updateIndicators(newValue);
  }
}

Fixed version (ground truth):
@Override public void changed(ObservableValue<? extends Number> arg0,Number arg1,Number arg2){
  if (that.get() != null) {
    that.get().updateIndicators(null);
  }
}
Program: 135583
Project: 135583
Buggy source:
public void processInheritedLabels(TurboIssue issue,List<Integer> originalParents){
  List<Integer> editedParents=issue.getParents();
  HashMap<String,HashSet<Integer>> changeSet=CollectionUtilities.getChangesToList(originalParents,editedParents);
  HashSet<Integer> removed=changeSet.get(CollectionUtilities.REMOVED_TAG);
  HashSet<Integer> added=changeSet.get(CollectionUtilities.ADDED_TAG);
  removeInheritedLabels(removed,issue);
  addInheritedLabels(added,issue);
}

Fixed version (ground truth):
public void processInheritedLabels(TurboIssue issue,Integer originalParent){
  Integer newParent=issue.getParentIssue();
  removeInheritedLabel(originalParent,issue);
  addInheritedLabel(newParent,issue);
}
Program: 135584
Project: 135584
Buggy source:
private Parent createParentsBox(Stage stage){
  final ParentIssuesDisplayBox parentsBox=new ParentIssuesDisplayBox(issue.parentIssueProperty(),true);
  List<TurboIssue> allIssues=model.getIssues();
  parentsBox.setOnMouseClicked((e) -> {
    Integer originalParent=issue.getParentIssue();
    Integer indexForExistingParent=model.getIndexOfIssue(originalParent);
    ArrayList<Integer> existingIndices=new ArrayList<Integer>();
    existingIndices.add(indexForExistingParent);
    (new CheckboxListDialog(stage,FXCollections.observableArrayList(allIssues))).setWindowTitle("String_Node_Str").setMultipleSelection(false).setInitialCheckedState(existingIndices).show().thenApply((    List<Integer> response) -> {
      boolean wasAnythingSelected=response.size() > 0;
      if (wasAnythingSelected) {
        Integer parent=response.size() > 0 ? allIssues.get(response.get(0)).getId() : null;
        issue.setParentIssue(parent);
        model.processInheritedLabels(issue,originalParents);
      }
 else {
        issue.setParentIssue(-1);
      }
      return true;
    }
).exceptionally(ex -> {
      ex.printStackTrace();
      return false;
    }
);
  }
);
  return parentsBox;
}

Fixed version (ground truth):
private Parent createParentsBox(Stage stage){
  final ParentIssuesDisplayBox parentsBox=new ParentIssuesDisplayBox(issue.parentIssueProperty(),true);
  List<TurboIssue> allIssues=model.getIssues();
  parentsBox.setOnMouseClicked((e) -> {
    Integer originalParent=issue.getParentIssue();
    Integer indexForExistingParent=model.getIndexOfIssue(originalParent);
    ArrayList<Integer> existingIndices=new ArrayList<Integer>();
    existingIndices.add(indexForExistingParent);
    (new CheckboxListDialog(stage,FXCollections.observableArrayList(allIssues))).setWindowTitle("String_Node_Str").setMultipleSelection(false).setInitialCheckedState(existingIndices).show().thenApply((    List<Integer> response) -> {
      boolean wasAnythingSelected=response.size() > 0;
      if (wasAnythingSelected) {
        Integer parent=response.size() > 0 ? allIssues.get(response.get(0)).getId() : null;
        issue.setParentIssue(parent);
        model.processInheritedLabels(issue,originalParent);
      }
 else {
        issue.setParentIssue(-1);
      }
      return true;
    }
).exceptionally(ex -> {
      ex.printStackTrace();
      return false;
    }
);
  }
);
  return parentsBox;
}
Program: 135585
Project: 135585
Buggy source:
private MenuItem[] createGroupContextMenu(TurboIssue issue){
  MenuItem childMenuItem=new MenuItem("String_Node_Str");
  childMenuItem.setOnAction((event) -> {
    TurboIssue childIssue=new TurboIssue("String_Node_Str","String_Node_Str",model);
    childIssue.addParent(issue.getId());
    model.processInheritedLabels(childIssue,new ArrayList<Integer>());
    (new IssueDialog(mainStage,model,childIssue)).show().thenApply(response -> {
      if (response.equals("String_Node_Str")) {
        model.createIssue(childIssue);
      }
      return true;
    }
).exceptionally(ex -> {
      ex.printStackTrace();
      return false;
    }
);
  }
);
  return new MenuItem[]{childMenuItem};
}

Fixed version (ground truth):
private MenuItem[] createGroupContextMenu(TurboIssue issue){
  MenuItem childMenuItem=new MenuItem("String_Node_Str");
  childMenuItem.setOnAction((event) -> {
    TurboIssue childIssue=new TurboIssue("String_Node_Str","String_Node_Str",model);
    childIssue.setParentIssue(issue.getId());
    model.processInheritedLabels(childIssue,new ArrayList<Integer>());
    (new IssueDialog(mainStage,model,childIssue)).show().thenApply(response -> {
      if (response.equals("String_Node_Str")) {
        model.createIssue(childIssue);
      }
      return true;
    }
).exceptionally(ex -> {
      ex.printStackTrace();
      return false;
    }
);
  }
);
  return new MenuItem[]{childMenuItem};
}
Program: 135586
Project: 135586
Buggy source:
public void stopModelUpdate(){
  if (modelUpdater != null) {
    modelUpdater.startModelUpdate();
  }
}

Fixed version (ground truth):
public void stopModelUpdate(){
  if (modelUpdater != null) {
    modelUpdater.stopModelUpdate();
  }
}
Program: 135587
Project: 135587
Buggy source:
private void updateModel(){
  updateModelIssues();
  updateModelCollaborators();
  updateModelLabels();
  updateModelMilestones();
}

Fixed version (ground truth):
private void updateModel(){
  updateModelIssues();
  updateModelCollaborators();
  updateModelLabels();
  updateModelMilestones();
  lastUpdateTime=issueUpdateService.lastCheckTime;
}
Program: 135588
Project: 135588
Buggy source:
@Override public void run(){
  updateCachedIssue(issue);
}

Fixed version (ground truth):
@Override public void run(){
  list.removeAll(removed);
  for (  Object item : newList) {
    updateCachedListItem((Listable)item,list);
  }
}
Program: 135589
Project: 135589
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private void updateCachedList(List list,List newList){
  HashMap<String,HashSet> changes=CollectionUtilities.getChangesToList(list,newList);
  HashSet removed=changes.get(CollectionUtilities.REMOVED_TAG);
  list.removeAll(removed);
  for (  Object item : newList) {
    updateCachedListItem((Listable)item,list);
  }
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private void updateCachedList(List list,List newList){
  HashMap<String,HashSet> changes=CollectionUtilities.getChangesToList(list,newList);
  HashSet removed=changes.get(CollectionUtilities.REMOVED_TAG);
  Platform.runLater(new Runnable(){
    @Override public void run(){
      list.removeAll(removed);
      for (      Object item : newList) {
        updateCachedListItem((Listable)item,list);
      }
    }
  }
);
}
Program: 135590
Project: 135590
Buggy source:
public void updateCachedLabels(List<Label> ghLabels){
  for (  Label ghLabel : ghLabels) {
    updateCachedListItem(new TurboLabel(ghLabel),labels);
  }
}

Fixed version (ground truth):
public void updateCachedLabels(List<Label> ghLabels){
  ArrayList<TurboLabel> newLabels=new ArrayList<TurboLabel>();
  for (  Label ghLabel : ghLabels) {
    newLabels.add(new TurboLabel(ghLabel));
  }
  updateCachedList(labels,newLabels);
}
Program: 135591
Project: 135591
Buggy source:
public void updateCachedMilestones(List<Milestone> ghMilestones){
  for (  Milestone ghMilestone : ghMilestones) {
    updateCachedListItem(new TurboMilestone(ghMilestone),milestones);
  }
}

Fixed version (ground truth):
public void updateCachedMilestones(List<Milestone> ghMilestones){
  ArrayList<TurboMilestone> newMilestones=new ArrayList<TurboMilestone>();
  for (  Milestone ghMilestone : ghMilestones) {
    newMilestones.add(new TurboMilestone(ghMilestone));
  }
  updateCachedList(milestones,newMilestones);
}
Program: 135592
Project: 135592
Buggy source:
@SuppressWarnings("String_Node_Str") private void updateCachedListItem(Listable updated,@SuppressWarnings("String_Node_Str") ObservableList list){
  int index=list.indexOf(updated);
  if (index != -1) {
    Listable old=(Listable)list.get(index);
    old.copyValues(updated);
  }
 else {
    list.add(updated);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void updateCachedListItem(Listable updated,@SuppressWarnings("String_Node_Str") List list){
  int index=list.indexOf(updated);
  if (index != -1) {
    Listable old=(Listable)list.get(index);
    old.copyValues(updated);
  }
 else {
    list.add(updated);
  }
}
Program: 135593
Project: 135593
Buggy source:
public void updateCachedCollaborators(List<User> ghCollaborators){
  for (  User ghCollaborator : ghCollaborators) {
    updateCachedListItem(new TurboUser(ghCollaborator),collaborators);
  }
}

Fixed version (ground truth):
public void updateCachedCollaborators(List<User> ghCollaborators){
  ArrayList<Listable> newCollaborators=new ArrayList<Listable>();
  for (  User ghCollaborator : ghCollaborators) {
    newCollaborators.add(new TurboUser(ghCollaborator));
  }
  updateCachedList(collaborators,newCollaborators);
}
Program: 135595
Project: 135595
Buggy source:
private FilterExpression parsePredicate(Token token){
  String name=token.getValue();
  String content;
  if (lookAhead().getType() == TokenType.COLON_SYMBOL) {
    String colonPlusContent=consume(TokenType.COLON_SYMBOL).getValue();
    content=colonPlusContent.substring(1).trim();
  }
 else {
    consume(TokenType.LBRACKET);
    content=consume().getValue();
    consume(TokenType.RBRACKET);
  }
  return new Predicate(name,content);
}

Fixed version (ground truth):
private FilterExpression parsePredicate(Token token){
  String name=token.getValue();
  String content="String_Node_Str";
  if (lookAhead().getType() == TokenType.COLON) {
    consume(TokenType.COLON);
    content=consume(TokenType.SYMBOL).getValue();
  }
 else {
    consume(TokenType.LBRACKET);
    while (lookAhead().getType() == TokenType.SYMBOL) {
      content+=consume(TokenType.SYMBOL).getValue() + "String_Node_Str";
    }
    content=content.trim();
    consume(TokenType.RBRACKET);
  }
  return new Predicate(name,content);
}