nus-yam/ex-repair huggingface dataset:
Program: 135270
Project: 135270
Buggy source:
/** 
 * Retrieves the requested items from GitHub
 * @param repoId the repository to get the items from
 * @return a list of requested items
 */
public ArrayList<T> getUpdatedItems(IRepositoryIdProvider repoId){
  if (updatedItems != null) {
    return updatedItems;
  }
  ArrayList<T> result=new ArrayList<>();
  String resourceDesc=repoId.generateId() + apiSuffix;
  logger.info(String.format("String_Node_Str",resourceDesc,lastETags));
  try {
    PagedRequest<T> request=createUpdatedRequest(repoId);
    Optional<ImmutablePair<List<String>,HttpURLConnection>> etags=getPagedEtags(request,client);
    if (!etags.isPresent()) {
      logger.warn(String.format("String_Node_Str",getClass().getSimpleName()));
    }
 else {
      updatedETags=combineETags(etags.get().getLeft());
      if (!updatedETags.isPresent() || updatedETags.get().equals(lastETags)) {
        logger.info("String_Node_Str");
      }
 else {
        result=new ArrayList<>(getPagedItems(resourceDesc,new PageIterator<>(request,client)));
        logger.info(String.format("String_Node_Str",resourceDesc,updatedETags));
      }
      updateCheckTime(etags.get().getRight());
    }
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
    return result;
  }
  updatedItems=result;
  return result;
}

Fixed version (ground truth):
/** 
 * Retrieves the requested items from GitHub
 * @param repoId the repository to get the items from
 * @return a list of requested items
 */
public ArrayList<T> getUpdatedItems(IRepositoryIdProvider repoId){
  if (updatedItems != null) {
    return updatedItems;
  }
  ArrayList<T> result=new ArrayList<>();
  String resourceDesc=repoId.generateId() + apiSuffix;
  logger.info(String.format("String_Node_Str",resourceDesc,lastETags));
  try {
    PagedRequest<T> headerRequest=createUpdatedRequest(repoId);
    Optional<ImmutablePair<List<String>,HttpURLConnection>> etags=getPagedEtags(headerRequest,client);
    if (!etags.isPresent()) {
      logger.warn(String.format("String_Node_Str",getClass().getSimpleName()));
    }
 else {
      Optional<String> updatedETags=combineETags(etags.get().getLeft());
      result=downloadUpdatedItems(repoId,resourceDesc,updatedETags);
      updateCheckTime(etags.get().getRight());
    }
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
    return result;
  }
  updatedItems=result;
  return result;
}
Program: 135271
Project: 135271
Buggy source:
@Test(expected=IOException.class) public void testInvalidRepositoryInGetReviewComments() throws IOException {
  PullRequestServiceEx service=new PullRequestServiceEx();
  service.getReviewComments(RepositoryId.createFromId("String_Node_Str"),1);
}

Fixed version (ground truth):
@Test(expected=IOException.class) public void testInvalidRepositoryInGetReviewComments() throws IOException {
  GitHubClientEx client=new GitHubClientEx();
  PullRequestServiceEx service=new PullRequestServiceEx(client);
  service.getReviewComments(RepositoryId.createFromId("String_Node_Str"),1);
}
Program: 135272
Project: 135272
Buggy source:
@Test(expected=IllegalArgumentException.class) public void testInvalidArgumentsToGetReviewComments3() throws IOException {
  PullRequestServiceEx service=new PullRequestServiceEx();
  service.getReviewComments(RepositoryId.createFromId("String_Node_Str"),"String_Node_Str");
}

Fixed version (ground truth):
@Test(expected=IllegalArgumentException.class) public void testInvalidArgumentsToGetReviewComments3() throws IOException {
  GitHubClientEx client=new GitHubClientEx();
  PullRequestServiceEx service=new PullRequestServiceEx(client);
  service.getReviewComments(RepositoryId.createFromId("String_Node_Str"),"String_Node_Str");
}
Program: 135273
Project: 135273
Buggy source:
@Test(expected=IllegalArgumentException.class) public void testInvalidArgumentsToGetReviewComments2() throws IOException {
  PullRequestServiceEx service=new PullRequestServiceEx();
  service.getReviewComments(RepositoryId.createFromId("String_Node_Str"),null);
}

Fixed version (ground truth):
@Test(expected=IllegalArgumentException.class) public void testInvalidArgumentsToGetReviewComments2() throws IOException {
  GitHubClientEx client=new GitHubClientEx();
  PullRequestServiceEx service=new PullRequestServiceEx(client);
  service.getReviewComments(RepositoryId.createFromId("String_Node_Str"),null);
}
Program: 135274
Project: 135274
Buggy source:
@Test(expected=IllegalArgumentException.class) public void testInvalidArgumentsToGetReviewComments1() throws IOException {
  PullRequestServiceEx service=new PullRequestServiceEx();
  service.getReviewComments(null,12);
}

Fixed version (ground truth):
@Test(expected=IllegalArgumentException.class) public void testInvalidArgumentsToGetReviewComments1() throws IOException {
  GitHubClientEx client=new GitHubClientEx();
  PullRequestServiceEx service=new PullRequestServiceEx(client);
  service.getReviewComments(null,12);
}
Program: 135277
Project: 135277
Buggy source:
private static Map<Integer,KeyCodeCombination> populateJumpToNthIssueMap(){
  Map<Integer,KeyCodeCombination> result=Collections.unmodifiableMap(new HashMap<>());
  result.put(1,new KeyCodeCombination(KeyCode.DIGIT1,KeyCombination.CONTROL_DOWN));
  result.put(2,new KeyCodeCombination(KeyCode.DIGIT2,KeyCombination.CONTROL_DOWN));
  result.put(3,new KeyCodeCombination(KeyCode.DIGIT3,KeyCombination.CONTROL_DOWN));
  result.put(4,new KeyCodeCombination(KeyCode.DIGIT4,KeyCombination.CONTROL_DOWN));
  result.put(5,new KeyCodeCombination(KeyCode.DIGIT5,KeyCombination.CONTROL_DOWN));
  result.put(6,new KeyCodeCombination(KeyCode.DIGIT6,KeyCombination.CONTROL_DOWN));
  result.put(7,new KeyCodeCombination(KeyCode.DIGIT7,KeyCombination.CONTROL_DOWN));
  result.put(8,new KeyCodeCombination(KeyCode.DIGIT8,KeyCombination.CONTROL_DOWN));
  result.put(9,new KeyCodeCombination(KeyCode.DIGIT9,KeyCombination.CONTROL_DOWN));
  return result;
}

Fixed version (ground truth):
private static Map<Integer,KeyCodeCombination> populateJumpToNthIssueMap(){
  Map<Integer,KeyCodeCombination> result=new HashMap<>();
  result.put(1,new KeyCodeCombination(KeyCode.DIGIT1,KeyCombination.CONTROL_DOWN));
  result.put(2,new KeyCodeCombination(KeyCode.DIGIT2,KeyCombination.CONTROL_DOWN));
  result.put(3,new KeyCodeCombination(KeyCode.DIGIT3,KeyCombination.CONTROL_DOWN));
  result.put(4,new KeyCodeCombination(KeyCode.DIGIT4,KeyCombination.CONTROL_DOWN));
  result.put(5,new KeyCodeCombination(KeyCode.DIGIT5,KeyCombination.CONTROL_DOWN));
  result.put(6,new KeyCodeCombination(KeyCode.DIGIT6,KeyCombination.CONTROL_DOWN));
  result.put(7,new KeyCodeCombination(KeyCode.DIGIT7,KeyCombination.CONTROL_DOWN));
  result.put(8,new KeyCodeCombination(KeyCode.DIGIT8,KeyCombination.CONTROL_DOWN));
  result.put(9,new KeyCodeCombination(KeyCode.DIGIT9,KeyCombination.CONTROL_DOWN));
  return Collections.unmodifiableMap(result);
}
Program: 135279
Project: 135279
Buggy source:
private boolean labelsSatisfy(IModel model,TurboIssue issue){
  if (!content.isPresent())   return false;
  TurboLabel tokens=new TurboLabel("String_Node_Str",content.get().toLowerCase());
  String group="String_Node_Str";
  if (tokens.getGroup().isPresent()) {
    group=tokens.getGroup().get();
  }
  String labelName=tokens.getName();
  for (  TurboLabel label : model.getLabelsOfIssue(issue)) {
    if (label.getGroup().isPresent()) {
      if (labelName.isEmpty()) {
        if (Utility.containsIgnoreCase(label.getGroup().get(),group)) {
          return true;
        }
      }
 else {
        if (Utility.containsIgnoreCase(label.getGroup().get(),group) && Utility.containsIgnoreCase(label.getName(),labelName)) {
          return true;
        }
      }
    }
 else {
      if (!group.isEmpty()) {
        return false;
      }
 else       if (!labelName.isEmpty() && Utility.containsIgnoreCase(label.getName(),labelName)) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean labelsSatisfy(IModel model,TurboIssue issue){
  if (!content.isPresent())   return false;
  for (  TurboLabel label : model.getLabelsOfIssue(issue)) {
    if (labelMatches(content.get(),label.getActualName())) {
      return true;
    }
  }
  return false;
}
Program: 135281
Project: 135281
Buggy source:
/** 
 * Called upon the Boards > Save as being clicked
 */
private void onBoardSaveAs(){
  logger.info("String_Node_Str");
  List<PanelInfo> panels=getCurrentPanels();
  if (panels.isEmpty()) {
    logger.info("String_Node_Str");
    return;
  }
  TextInputDialog dlg=new TextInputDialog("String_Node_Str");
  dlg.getEditor().setId("String_Node_Str");
  dlg.setTitle("String_Node_Str");
  dlg.getDialogPane().setContentText("String_Node_Str");
  dlg.getDialogPane().setHeaderText("String_Node_Str");
  Optional<String> response=dlg.showAndWait();
  if (response.isPresent()) {
    String boardName=response.get();
    prefs.addBoard(response.get(),panels);
    ui.triggerEvent(new BoardSavedEvent());
    logger.info("String_Node_Str" + boardName + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Called upon the Boards > Save as being clicked
 */
private void onBoardSaveAs(){
  logger.info("String_Node_Str");
  List<PanelInfo> panels=getCurrentPanels();
  if (panels.isEmpty()) {
    logger.info("String_Node_Str");
    return;
  }
  TextInputDialog dlg=new TextInputDialog("String_Node_Str");
  dlg.getEditor().setId("String_Node_Str");
  dlg.setTitle("String_Node_Str");
  dlg.getDialogPane().setContentText("String_Node_Str");
  dlg.getDialogPane().setHeaderText("String_Node_Str");
  Optional<String> response=dlg.showAndWait();
  if (response.isPresent()) {
    String boardName=response.get();
    prefs.addBoard(response.get(),panels);
    ui.triggerEvent(new BoardSavedEvent());
    openBoardName=boardName;
    logger.info("String_Node_Str" + boardName + "String_Node_Str");
  }
}
Program: 135282
Project: 135282
Buggy source:
/** 
 * Checks if this label update event in the same group as another label update event e
 * @param e another label update event
 * @return true if this event and e have same author and times withinMAX_TIME_DIFF from each other. false otherwise
 */
public boolean isInSameLabelUpdateEventGroup(TurboIssueEvent e){
  long timeDiffMs=Math.abs(getDate().getTime() - e.getDate().getTime());
  long timeDiffMin=TimeUnit.MILLISECONDS.toSeconds(timeDiffMs);
  return getActor().getLogin().equals(e.getActor().getLogin()) && timeDiffMin <= MAX_TIME_DIFF;
}

Fixed version (ground truth):
/** 
 * Checks if this label update event in the same group as another label update event e
 * @param e another label update event
 * @return true if this event and e have same author and times withinMAX_TIME_DIFF from each other. false otherwise
 */
public boolean isInSameLabelUpdateEventGroup(TurboIssueEvent e){
  long timeDiffMs=Math.abs(getDate().getTime() - e.getDate().getTime());
  long timeDiffSec=TimeUnit.MILLISECONDS.toSeconds(timeDiffMs);
  return getActor().getLogin().equals(e.getActor().getLogin()) && timeDiffSec <= MAX_TIME_DIFF;
}
Program: 135283
Project: 135283
Buggy source:
/** 
 * Given a list of issue events, returns a JavaFX node laying them out properly.
 * @param events
 * @param comments
 * @return
 */
public static Node layoutEvents(Model model,TurboIssue issue,List<TurboIssueEvent> events,List<Comment> comments){
  VBox result=new VBox();
  result.setSpacing(3);
  VBox.setMargin(result,new Insets(3,0,0,0));
  TurboIssueEvent.createLabelUpdateEventNodes(model,events.stream().filter(e -> e.isLabelUpdateEvent()).collect(Collectors.toList())).forEach(node -> result.getChildren().add(node));
  ;
  events.stream().filter(e -> !e.isLabelUpdateEvent()).map(e -> e.display(model,issue)).forEach(e -> result.getChildren().add(e));
  if (comments.size() > 0) {
    String names=comments.stream().map(comment -> comment.getUser().getLogin()).distinct().collect(Collectors.joining("String_Node_Str"));
    HBox commentDisplay=new HBox();
    commentDisplay.getChildren().addAll(TurboIssueEvent.octicon(TurboIssueEvent.OCTICON_QUOTE),new javafx.scene.control.Label(String.format("String_Node_Str",comments.size(),names)));
    result.getChildren().add(commentDisplay);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Given a list of issue events, returns a JavaFX node laying them out properly.
 * @param events
 * @param comments
 * @return
 */
private static Node layoutEvents(Model model,TurboIssue issue,List<TurboIssueEvent> events,List<Comment> comments){
  VBox result=new VBox();
  result.setSpacing(3);
  VBox.setMargin(result,new Insets(3,0,0,0));
  List<TurboIssueEvent> labelUpdateEvents=events.stream().filter(e -> e.isLabelUpdateEvent()).collect(Collectors.toList());
  List<Node> labelUpdateEventNodes=TurboIssueEvent.createLabelUpdateEventNodes(model,labelUpdateEvents);
  labelUpdateEventNodes.forEach(node -> result.getChildren().add(node));
  events.stream().filter(e -> !e.isLabelUpdateEvent()).map(e -> e.display(model,issue)).forEach(e -> result.getChildren().add(e));
  if (comments.size() > 0) {
    String names=comments.stream().map(comment -> comment.getUser().getLogin()).distinct().collect(Collectors.joining("String_Node_Str"));
    HBox commentDisplay=new HBox();
    commentDisplay.getChildren().addAll(TurboIssueEvent.octicon(TurboIssueEvent.OCTICON_QUOTE),new javafx.scene.control.Label(String.format("String_Node_Str",comments.size(),names)));
    result.getChildren().add(commentDisplay);
  }
  return result;
}
Program: 135284
Project: 135284
Buggy source:
@Test public void testCreateLabelUpdateEventNodesForSampleEvents(){
  List<TurboLabel> labels=new ArrayList<>();
  labels.add(new TurboLabel("String_Node_Str","String_Node_Str"));
  labels.add(new TurboLabel("String_Node_Str","String_Node_Str"));
  labels.add(new TurboLabel("String_Node_Str","String_Node_Str"));
  labels.add(new TurboLabel("String_Node_Str","String_Node_Str"));
  labels.add(new TurboLabel("String_Node_Str","String_Node_Str"));
  labels.add(new TurboLabel("String_Node_Str","String_Node_Str"));
  Model sampleModel=new Model("String_Node_Str",null,labels,null,null);
  List<TurboIssueEvent> events=new ArrayList<>(new TurboIssueEventTests().sampleEvents);
  List<Node> nodes=TurboIssueEvent.createLabelUpdateEventNodes(sampleModel,events);
  assertEquals(5,TurboIssueEvent.createLabelUpdateEventNodes(sampleModel,events).size());
  assertEquals(5,((HBox)nodes.get(0)).getChildren().size());
  assertEquals(5,((HBox)nodes.get(1)).getChildren().size());
  assertEquals(4,((HBox)nodes.get(2)).getChildren().size());
  assertEquals(4,((HBox)nodes.get(3)).getChildren().size());
  assertEquals(4,((HBox)nodes.get(4)).getChildren().size());
  assertEquals(5,((VBox)ListPanelCard.layoutEvents(sampleModel,new TurboIssue("String_Node_Str",1,"String_Node_Str"),events,new ArrayList<Comment>())).getChildren().size());
}

Fixed version (ground truth):
@Test public void testCreateLabelUpdateEventNodesForSampleEvents() throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
  Method layoutMethod=ListPanelCard.class.getDeclaredMethod("String_Node_Str",Model.class,TurboIssue.class,List.class,List.class);
  layoutMethod.setAccessible(true);
  List<TurboLabel> labels=new ArrayList<>();
  labels.add(new TurboLabel("String_Node_Str","String_Node_Str"));
  labels.add(new TurboLabel("String_Node_Str","String_Node_Str"));
  labels.add(new TurboLabel("String_Node_Str","String_Node_Str"));
  labels.add(new TurboLabel("String_Node_Str","String_Node_Str"));
  labels.add(new TurboLabel("String_Node_Str","String_Node_Str"));
  labels.add(new TurboLabel("String_Node_Str","String_Node_Str"));
  Model sampleModel=new Model("String_Node_Str",null,labels,null,null);
  List<TurboIssueEvent> events=new ArrayList<>(new TurboIssueEventTests().sampleEvents);
  List<Node> nodes=TurboIssueEvent.createLabelUpdateEventNodes(sampleModel,events);
  assertEquals(5,TurboIssueEvent.createLabelUpdateEventNodes(sampleModel,events).size());
  assertEquals(5,((HBox)nodes.get(0)).getChildren().size());
  assertEquals(5,((HBox)nodes.get(1)).getChildren().size());
  assertEquals(4,((HBox)nodes.get(2)).getChildren().size());
  assertEquals(4,((HBox)nodes.get(3)).getChildren().size());
  assertEquals(4,((HBox)nodes.get(4)).getChildren().size());
  assertEquals(5,((VBox)layoutMethod.invoke(null,sampleModel,new TurboIssue("String_Node_Str",1,"String_Node_Str"),events,new ArrayList<Comment>())).getChildren().size());
}
Program: 135285
Project: 135285
Buggy source:
/** 
 * Test the events grouping when there is only 1 event
 */
@Test public void testLabelUpdateEventsGroupingForOneEvent(){
  List<TurboIssueEvent> events=new ArrayList<>();
  events.add(sampleEvents.get(0));
  List<TurboIssueEvent> expectedSubList1=new ArrayList<>();
  expectedSubList1.add(sampleEvents.get(0));
  List<List<TurboIssueEvent>> expected=new ArrayList<>();
  expected.add(expectedSubList1);
  assertEquals(expected,TurboIssueEvent.groupLabelUpdateEvents(events));
}

Fixed version (ground truth):
/** 
 * Tests the events grouping when there is only 1 event
 */
@Test public void testLabelUpdateEventsGroupingForOneEvent(){
  List<TurboIssueEvent> events=new ArrayList<>();
  events.add(sampleEvents.get(0));
  List<TurboIssueEvent> expectedSubList1=new ArrayList<>();
  expectedSubList1.add(sampleEvents.get(0));
  List<List<TurboIssueEvent>> expected=new ArrayList<>();
  expected.add(expectedSubList1);
  assertEquals(expected,TurboIssueEvent.groupLabelUpdateEvents(events));
}
Program: 135286
Project: 135286
Buggy source:
/** 
 * Test when A and B update the overlapping set of labels at overlapping time. The order of modification are A:+L1 -> B:-L1 -> A:+L2 -> B:+L2 Expected: [A:[+L1, +L2], B:[-L1, +L2]] Note: This scenario may not actually occur since A and B might not be recorded as adding the same label L2 by github
 */
@Test public void testLabelUpdateEventsGrouping1(){
  List<TurboIssueEvent> events=new ArrayList<>();
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,0),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Unlabeled,new GregorianCalendar(2015,1,1,1,1,25),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,40),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,2,11),"String_Node_Str"));
  List<TurboIssueEvent> expectedSubList1=new ArrayList<>();
  expectedSubList1.add(events.get(0));
  expectedSubList1.add(events.get(2));
  List<TurboIssueEvent> expectedSubList2=new ArrayList<>();
  expectedSubList2.add(events.get(1));
  expectedSubList2.add(events.get(3));
  List<List<TurboIssueEvent>> expected=new ArrayList<>();
  expected.add(expectedSubList1);
  expected.add(expectedSubList2);
  assertEquals(expected,TurboIssueEvent.groupLabelUpdateEvents(events));
}

Fixed version (ground truth):
/** 
 * Tests when A and B update the overlapping set of labels at overlapping time. The order of modification are A:+L1 -> B:-L1 -> A:+L2 -> B:+L2 Expected: [A:[+L1, +L2], B:[-L1, +L2]] Note: This scenario may not actually occur since A and B might not be recorded as adding the same label L2 by github
 */
@Test public void testLabelUpdateEventsGrouping1(){
  List<TurboIssueEvent> events=new ArrayList<>();
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,0),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Unlabeled,new GregorianCalendar(2015,1,1,1,1,25),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,40),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,2,11),"String_Node_Str"));
  List<TurboIssueEvent> expectedSubList1=new ArrayList<>();
  expectedSubList1.add(events.get(0));
  expectedSubList1.add(events.get(2));
  List<TurboIssueEvent> expectedSubList2=new ArrayList<>();
  expectedSubList2.add(events.get(1));
  expectedSubList2.add(events.get(3));
  List<List<TurboIssueEvent>> expected=new ArrayList<>();
  expected.add(expectedSubList1);
  expected.add(expectedSubList2);
  assertEquals(expected,TurboIssueEvent.groupLabelUpdateEvents(events));
}
Program: 135287
Project: 135287
Buggy source:
/** 
 * Test the events grouping when list of events is empty
 */
@Test public void testLabelUpdateEventsGroupingForNoEvent(){
  assertEquals(new ArrayList<TurboIssueEvent>(),TurboIssueEvent.groupLabelUpdateEvents(new ArrayList<TurboIssueEvent>()));
}

Fixed version (ground truth):
/** 
 * Tests the events grouping when list of events is empty
 */
@Test public void testLabelUpdateEventsGroupingForNoEvent(){
  assertEquals(new ArrayList<TurboIssueEvent>(),TurboIssueEvent.groupLabelUpdateEvents(new ArrayList<TurboIssueEvent>()));
}
Program: 135288
Project: 135288
Buggy source:
/** 
 * Test when A and B update at exactly the same time at overlapping time. The order of modification are (A:+L1 = B:-L1) -> (A:+L2 = B:+L2) Expected: [A:[+L1, +L2], B:[-L1, +L2]] according to lexicographic order since Collections.sort is stable
 */
@Test public void testLabelUpdateEventsGrouping2(){
  List<TurboIssueEvent> events=new ArrayList<>();
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Unlabeled,new GregorianCalendar(2015,1,1,1,1,0),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,0),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,40),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,40),"String_Node_Str"));
  List<TurboIssueEvent> expectedSubList1=new ArrayList<>();
  expectedSubList1.add(events.get(1));
  expectedSubList1.add(events.get(2));
  List<TurboIssueEvent> expectedSubList2=new ArrayList<>();
  expectedSubList2.add(events.get(0));
  expectedSubList2.add(events.get(3));
  List<List<TurboIssueEvent>> expected=new ArrayList<>();
  expected.add(expectedSubList1);
  expected.add(expectedSubList2);
  assertEquals(expected,TurboIssueEvent.groupLabelUpdateEvents(events));
}

Fixed version (ground truth):
/** 
 * Tests when A and B update at exactly the same time at overlapping time. The order of modification are (A:+L1 = B:-L1) -> (A:+L2 = B:+L2) Expected: [A:[+L1, +L2], B:[-L1, +L2]] according to lexicographic order since Collections.sort is stable
 */
@Test public void testLabelUpdateEventsGrouping2(){
  List<TurboIssueEvent> events=new ArrayList<>();
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Unlabeled,new GregorianCalendar(2015,1,1,1,1,0),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,0),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,40),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,40),"String_Node_Str"));
  List<TurboIssueEvent> expectedSubList1=new ArrayList<>();
  expectedSubList1.add(events.get(1));
  expectedSubList1.add(events.get(2));
  List<TurboIssueEvent> expectedSubList2=new ArrayList<>();
  expectedSubList2.add(events.get(0));
  expectedSubList2.add(events.get(3));
  List<List<TurboIssueEvent>> expected=new ArrayList<>();
  expected.add(expectedSubList1);
  expected.add(expectedSubList2);
  assertEquals(expected,TurboIssueEvent.groupLabelUpdateEvents(events));
}
Program: 135289
Project: 135289
Buggy source:
/** 
 * Test when A modify same set of labels multiple times A: +L1, +L1, -L1, +L2, +L3, -L2, +L2 Expected: [[+L1, +L1, -L1, +L2, +L3, -L2, +L2]] since all events are reflected and groupLabelUpdateEvents does not attempt to repetitive labels
 */
@Test public void testLabelUpdateEventsGrouping3(){
  List<TurboIssueEvent> events=new ArrayList<>();
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,0),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,5),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Unlabeled,new GregorianCalendar(2015,1,1,1,1,10),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,15),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,15),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Unlabeled,new GregorianCalendar(2015,1,1,1,1,25),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,35),"String_Node_Str"));
  List<List<TurboIssueEvent>> expected=new ArrayList<>();
  expected.add(events);
  assertEquals(expected,TurboIssueEvent.groupLabelUpdateEvents(events));
}

Fixed version (ground truth):
/** 
 * Tests when A modify same set of labels multiple times A: +L1, +L1, -L1, +L2, +L3, -L2, +L2 Expected: [[+L1, +L1, -L1, +L2, +L3, -L2, +L2]] since all events are reflected and groupLabelUpdateEvents does not attempt to repetitive labels
 */
@Test public void testLabelUpdateEventsGrouping3(){
  List<TurboIssueEvent> events=new ArrayList<>();
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,0),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,5),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Unlabeled,new GregorianCalendar(2015,1,1,1,1,10),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,15),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,15),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Unlabeled,new GregorianCalendar(2015,1,1,1,1,25),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,35),"String_Node_Str"));
  List<List<TurboIssueEvent>> expected=new ArrayList<>();
  expected.add(events);
  assertEquals(expected,TurboIssueEvent.groupLabelUpdateEvents(events));
}
Program: 135291
Project: 135291
Buggy source:
/** 
 * Test a generic events list with several corner cases: All events are not in chronological order in the input events list A has 2 events exactly 1 minute from each other B has 3 events 2 of which are 30s part and the 3rd one is 61s apart from the 1st one B's first 2 events overlap with A's events but B's 1st event occurs first C and D have completely separate events Expected grouping: [[B1, B2], [A1, A2], [B3], [C1], [D1]]
 */
@Test public void testLabelUpdateEventsGrouping5(){
  List<TurboIssueEvent> events=new ArrayList<>(sampleEvents);
  List<TurboIssueEvent> expectedSubList1=new ArrayList<>();
  expectedSubList1.add(sampleEvents.get(2));
  expectedSubList1.add(sampleEvents.get(3));
  List<TurboIssueEvent> expectedSubList2=new ArrayList<>();
  expectedSubList2.add(sampleEvents.get(0));
  expectedSubList2.add(sampleEvents.get(1));
  List<TurboIssueEvent> expectedSubList3=new ArrayList<>();
  expectedSubList3.add(sampleEvents.get(4));
  List<TurboIssueEvent> expectedSubList4=new ArrayList<>();
  expectedSubList4.add(sampleEvents.get(5));
  List<TurboIssueEvent> expectedSubList5=new ArrayList<>();
  expectedSubList5.add(sampleEvents.get(6));
  List<List<TurboIssueEvent>> expected=new ArrayList<>();
  expected.add(expectedSubList1);
  expected.add(expectedSubList2);
  expected.add(expectedSubList3);
  expected.add(expectedSubList4);
  expected.add(expectedSubList5);
  assertEquals(expected,TurboIssueEvent.groupLabelUpdateEvents(events));
}

Fixed version (ground truth):
/** 
 * Tests a generic events list with several corner cases: All events are not in chronological order in the input events list A has 2 events exactly 1 minute from each other B has 3 events 2 of which are 30s part and the 3rd one is 61s apart from the 1st one B's first 2 events overlap with A's events but B's 1st event occurs first C and D have completely separate events Expected grouping: [[B1, B2], [A1, A2], [B3], [C1], [D1]]
 */
@Test public void testLabelUpdateEventsGrouping5(){
  List<TurboIssueEvent> events=new ArrayList<>(sampleEvents);
  List<TurboIssueEvent> expectedSubList1=new ArrayList<>();
  expectedSubList1.add(sampleEvents.get(2));
  expectedSubList1.add(sampleEvents.get(3));
  List<TurboIssueEvent> expectedSubList2=new ArrayList<>();
  expectedSubList2.add(sampleEvents.get(0));
  expectedSubList2.add(sampleEvents.get(1));
  List<TurboIssueEvent> expectedSubList3=new ArrayList<>();
  expectedSubList3.add(sampleEvents.get(4));
  List<TurboIssueEvent> expectedSubList4=new ArrayList<>();
  expectedSubList4.add(sampleEvents.get(5));
  List<TurboIssueEvent> expectedSubList5=new ArrayList<>();
  expectedSubList5.add(sampleEvents.get(6));
  List<List<TurboIssueEvent>> expected=new ArrayList<>();
  expected.add(expectedSubList1);
  expected.add(expectedSubList2);
  expected.add(expectedSubList3);
  expected.add(expectedSubList4);
  expected.add(expectedSubList5);
  assertEquals(expected,TurboIssueEvent.groupLabelUpdateEvents(events));
}
Program: 135292
Project: 135292
Buggy source:
/** 
 * Test when A and B update the overlapping set of labels immediately following each other. The order of modification are A:+L1 -> A:+L2 -> B:-L1 -> B:-L2 Expected: [A:[+L1, +L2], B:[-L1, -L2]]
 */
@Test public void testLabelUpdateEventsGrouping6(){
  List<TurboIssueEvent> events=new ArrayList<>();
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,0),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Unlabeled,new GregorianCalendar(2015,1,1,1,1,40),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,40),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Unlabeled,new GregorianCalendar(2015,1,1,1,2,0),"String_Node_Str"));
  List<TurboIssueEvent> expectedSubList1=new ArrayList<>();
  expectedSubList1.add(events.get(0));
  expectedSubList1.add(events.get(2));
  List<TurboIssueEvent> expectedSubList2=new ArrayList<>();
  expectedSubList2.add(events.get(1));
  expectedSubList2.add(events.get(3));
  List<List<TurboIssueEvent>> expected=new ArrayList<>();
  expected.add(expectedSubList1);
  expected.add(expectedSubList2);
  assertEquals(expected,TurboIssueEvent.groupLabelUpdateEvents(events));
}

Fixed version (ground truth):
/** 
 * Tests when A and B update the overlapping set of labels immediately following each other. The order of modification are A:+L1 -> A:+L2 -> B:-L1 -> B:-L2 Expected: [A:[+L1, +L2], B:[-L1, -L2]]
 */
@Test public void testLabelUpdateEventsGrouping6(){
  List<TurboIssueEvent> events=new ArrayList<>();
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,0),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Unlabeled,new GregorianCalendar(2015,1,1,1,1,40),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,40),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Unlabeled,new GregorianCalendar(2015,1,1,1,2,0),"String_Node_Str"));
  List<TurboIssueEvent> expectedSubList1=new ArrayList<>();
  expectedSubList1.add(events.get(0));
  expectedSubList1.add(events.get(2));
  List<TurboIssueEvent> expectedSubList2=new ArrayList<>();
  expectedSubList2.add(events.get(1));
  expectedSubList2.add(events.get(3));
  List<List<TurboIssueEvent>> expected=new ArrayList<>();
  expected.add(expectedSubList1);
  expected.add(expectedSubList2);
  assertEquals(expected,TurboIssueEvent.groupLabelUpdateEvents(events));
}
Program: 135294
Project: 135294
Buggy source:
public static TurboIssueEvent createLabelUpdateEvent(String userName,IssueEventType eventType,GregorianCalendar time,String labelName){
  return new TurboIssueEvent(new User().setLogin(userName),eventType,time.getTime()).setLabelName(labelName);
}

Fixed version (ground truth):
private static TurboIssueEvent createLabelUpdateEvent(String userName,IssueEventType eventType,GregorianCalendar time,String labelName){
  return new TurboIssueEvent(new User().setLogin(userName),eventType,time.getTime()).setLabelName(labelName);
}
Program: 135295
Project: 135295
Buggy source:
private void showRenameTextField(){
  PanelNameTextField renameTextField=new PanelNameTextField(panelName,this);
  renameTextField.setPrefWidth(400);
  nameArea.getChildren().remove(nameText);
  nameArea.getChildren().add(renameTextField);
  renameTextField.setOnAction(renameEvent -> {
    String newName=renameTextField.getText();
    if (newName.equals("String_Node_Str")) {
      newName=panelName;
    }
    setPanelName(newName);
    closeRenameTextField(renameTextField);
  }
);
}

Fixed version (ground truth):
private void showRenameTextField(){
  PanelNameTextField renameTextField=new PanelNameTextField(panelName,this);
  nameArea.getChildren().remove(nameText);
  nameArea.getChildren().add(renameTextField);
  renameTextField.setOnAction(renameEvent -> {
    String newName=renameTextField.getText();
    if (newName.equals("String_Node_Str")) {
      newName=panelName;
    }
    setPanelName(newName);
    closeRenameTextField(renameTextField);
  }
);
}
Program: 135296
Project: 135296
Buggy source:
public void closeRenameTextField(PanelNameTextField renameTextField){
  nameArea.getChildren().remove(renameTextField);
  nameArea.getChildren().add(nameText);
}

Fixed version (ground truth):
public void closeRenameTextField(PanelNameTextField renameTextField){
  nameArea.getChildren().remove(renameTextField);
  nameArea.getChildren().add(nameText);
  this.requestFocus();
}
Program: 135297
Project: 135297
Buggy source:
public void removeBoard(String name){
  boards.remove(name);
}

Fixed version (ground truth):
public void removeBoard(String name){
  savedBoards.remove(name);
}
Program: 135298
Project: 135298
Buggy source:
public List<PanelInfo> getBoardPanels(String name){
  return boards.get(name);
}

Fixed version (ground truth):
public List<PanelInfo> getBoardPanels(String name){
  return savedBoards.get(name);
}
Program: 135299
Project: 135299
Buggy source:
public Map<String,List<PanelInfo>> getAllBoards(){
  return new HashMap<>(boards);
}

Fixed version (ground truth):
public Map<String,List<PanelInfo>> getAllBoards(){
  return new HashMap<>(savedBoards);
}
Program: 135300
Project: 135300
Buggy source:
public void addBoard(String name,List<PanelInfo> panels){
  boards.put(name,panels);
}

Fixed version (ground truth):
public void addBoard(String name,List<PanelInfo> panels){
  savedBoards.put(name,panels);
}
Program: 135301
Project: 135301
Buggy source:
public CompletableFuture<Boolean> getIssueMetadata(String repoId,List<Integer> issues){
  String message="String_Node_Str" + repoId + "String_Node_Str";
  logger.info("String_Node_Str" + issues);
  UI.status.displayMessage(message);
  String currentUser=prefs.getLastLoginUsername();
  return repoIO.getIssueMetadata(repoId,issues).thenApply(this::processNonSelfUpdate).thenApply(metadata -> {
    String updatedMessage="String_Node_Str" + repoId + "String_Node_Str";
    UI.status.displayMessage(updatedMessage);
    models.insertMetadata(repoId,metadata,currentUser);
    return metadata;
  }
).thenApply(Futures.tap(this::updateUIWithMetadata)).thenCompose(n -> getRateLimitResetTime()).thenApply(this::updateRemainingRate).thenApply(rateLimits -> true).exceptionally(withResult(false));
}

Fixed version (ground truth):
public CompletableFuture<Boolean> getIssueMetadata(String repoId,List<Integer> issues){
  String message="String_Node_Str" + repoId + "String_Node_Str";
  logger.info("String_Node_Str" + issues);
  UI.status.displayMessage(message);
  String currentUser=prefs.getLastLoginUsername();
  return repoIO.getIssueMetadata(repoId,issues).thenApply(this::processNonSelfUpdate).thenApply(metadata -> {
    String updatedMessage="String_Node_Str" + repoId + "String_Node_Str";
    UI.status.displayMessage(updatedMessage);
    models.insertMetadata(repoId,metadata,currentUser);
    return metadata;
  }
).thenApply(Futures.tap(this::updateUIAndShow)).thenCompose(n -> getRateLimitResetTime()).thenApply(this::updateRemainingRate).thenApply(rateLimits -> true).exceptionally(withResult(false));
}
Program: 135302
Project: 135302
Buggy source:
private void populateTopPanel(){
  topPane.getChildren().clear();
  topLabels.forEach(label -> topPane.getChildren().add(label.getNode()));
  if (topPane.getChildren().size() == 0) {
    Label label=new Label("String_Node_Str");
    label.setPadding(new Insets(5));
    topPane.getChildren().add(label);
  }
}

Fixed version (ground truth):
private void populateTopPanel(){
  topPane.getChildren().clear();
  topLabels.forEach(label -> topPane.getChildren().add(label.getNode()));
  if (topPane.getChildren().size() == 0) {
    Label label=new Label("String_Node_Str");
    label.setPadding(new Insets(2,5,2,5));
    topPane.getChildren().add(label);
  }
  setHeight(vBox.getHeight() + VBOX_SPACING);
}
Program: 135303
Project: 135303
Buggy source:
private void populateBottomPane(){
  bottomPane.getChildren().clear();
  bottomLabels.forEach(label -> bottomPane.getChildren().add(label.getNode()));
  if (bottomPane.getChildren().size() == 0) {
    Label label=new Label("String_Node_Str");
    label.setPadding(new Insets(5));
    bottomPane.getChildren().add(label);
  }
}

Fixed version (ground truth):
private void populateBottomPane(){
  bottomPane.getChildren().clear();
  bottomLabels.forEach(label -> bottomPane.getChildren().add(label.getNode()));
  if (bottomPane.getChildren().size() == 0) {
    Label label=new Label("String_Node_Str");
    label.setPadding(new Insets(2,5,2,5));
    bottomPane.getChildren().add(label);
  }
  setHeight(vBox.getHeight() + VBOX_SPACING);
}
Program: 135306
Project: 135306
Buggy source:
@Test public void filterTextFieldTest(){
  click("String_Node_Str");
  type("String_Node_Str");
  push(KeyCode.ESCAPE);
  type("String_Node_Str");
  press(KeyCode.SHIFT).press(KeyCode.SEMICOLON).release(KeyCode.SEMICOLON).release(KeyCode.SHIFT);
  press(KeyCode.SHIFT).press(KeyCode.DIGIT9).release(KeyCode.DIGIT9).release(KeyCode.SHIFT);
  push(KeyCode.LEFT);
  push(KeyCode.TAB);
  push(KeyCode.RIGHT);
  type("String_Node_Str");
  press(KeyCode.SHIFT).press(KeyCode.DIGIT0).release(KeyCode.DIGIT0).release(KeyCode.SHIFT);
  push(KeyCode.ENTER);
}

Fixed version (ground truth):
@Test public void filterTextFieldTest(){
  click("String_Node_Str");
  type("String_Node_Str");
  push(KeyCode.ESCAPE);
  press(KeyCode.SHIFT).press(KeyCode.DIGIT9).release(KeyCode.DIGIT9).release(KeyCode.SHIFT);
  type("String_Node_Str");
  press(KeyCode.SHIFT).press(KeyCode.SEMICOLON).release(KeyCode.SEMICOLON).release(KeyCode.SHIFT);
  push(KeyCode.LEFT);
  push(KeyCode.TAB);
  push(KeyCode.RIGHT);
  type("String_Node_Str");
  press(KeyCode.SHIFT).press(KeyCode.SEMICOLON).release(KeyCode.SEMICOLON).release(KeyCode.SHIFT);
  type("String_Node_Str");
  press(KeyCode.SHIFT).press(KeyCode.DIGIT0).release(KeyCode.DIGIT0).release(KeyCode.SHIFT);
  push(KeyCode.ENTER);
}
Program: 135308
Project: 135308
Buggy source:
public static Comparator<TurboIssue> getSortComparator(IModel model,String key,boolean inverted,boolean metadataRefresh){
  Comparator<TurboIssue> comparator=(a,b) -> 0;
  boolean isLabelGroup=false;
switch (key) {
case "String_Node_Str":
    comparator=(a,b) -> a.getCommentCount() - b.getCommentCount();
  break;
case "String_Node_Str":
comparator=(a,b) -> a.getRepoId().compareTo(b.getRepoId());
break;
case "String_Node_Str":
case "String_Node_Str":
if (metadataRefresh) {
comparator=(a,b) -> {
if (a.getRepoId().equalsIgnoreCase("String_Node_Str")) {
  System.out.println("String_Node_Str");
  System.out.println(a.getMetadata().getNonSelfUpdatedAt().toString());
  System.out.println(b.getMetadata().getNonSelfUpdatedAt().toString());
}
return a.getMetadata().getNonSelfUpdatedAt().compareTo(b.getMetadata().getNonSelfUpdatedAt());
}
;
}
 else {
comparator=(a,b) -> a.getUpdatedAt().compareTo(b.getUpdatedAt());
}
break;
case "String_Node_Str":
comparator=(a,b) -> a.getId() - b.getId();
break;
default :
isLabelGroup=true;
break;
}
if (isLabelGroup) {
return getLabelGroupComparator(model,key,inverted);
}
 else {
if (!inverted) {
return comparator;
}
 else {
final Comparator<TurboIssue> finalComparator=comparator;
return (a,b) -> -finalComparator.compare(a,b);
}
}
}

Fixed version (ground truth):
public static Comparator<TurboIssue> getSortComparator(IModel model,String key,boolean inverted,boolean metadataRefresh){
  Comparator<TurboIssue> comparator=(a,b) -> 0;
  boolean isLabelGroup=false;
switch (key) {
case "String_Node_Str":
    comparator=(a,b) -> a.getCommentCount() - b.getCommentCount();
  break;
case "String_Node_Str":
comparator=(a,b) -> a.getRepoId().compareTo(b.getRepoId());
break;
case "String_Node_Str":
case "String_Node_Str":
comparator=(a,b) -> a.getUpdatedAt().compareTo(b.getUpdatedAt());
break;
case "String_Node_Str":
if (metadataRefresh) {
comparator=(a,b) -> b.getMetadata().getNonSelfUpdatedAt().compareTo(a.getMetadata().getNonSelfUpdatedAt());
}
 else {
comparator=(a,b) -> b.getUpdatedAt().compareTo(a.getUpdatedAt());
}
break;
case "String_Node_Str":
comparator=(a,b) -> a.getId() - b.getId();
break;
default :
isLabelGroup=true;
break;
}
if (isLabelGroup) {
return getLabelGroupComparator(model,key,inverted);
}
 else {
if (!inverted) {
return comparator;
}
 else {
final Comparator<TurboIssue> finalComparator=comparator;
return (a,b) -> -finalComparator.compare(a,b);
}
}
}
Program: 135310
Project: 135310
Buggy source:
private String getCurrentPageSource(){
  JavascriptExecutor executor=(JavascriptExecutor)driver;
  String result=StringEscapeUtils.escapeHtml4((String)executor.executeScript("String_Node_Str"));
  return result;
}

Fixed version (ground truth):
private String getCurrentPageSource(){
  return StringEscapeUtils.escapeHtml4((String)driver.executeScript("String_Node_Str"));
}
Program: 135311
Project: 135311
Buggy source:
@Override protected Void call(){
  if (isBrowserActive()) {
    try {
      operation.run();
      pageContentOnLoad=getCurrentPageSource();
    }
 catch (    WebDriverException e) {
switch (BrowserComponentError.fromErrorMessage(e.getMessage())) {
case NoSuchWindow:
        resetBrowser();
      runBrowserOperation(operation);
case NoSuchElement:
    logger.info("String_Node_Str" + e.getMessage());
  break;
default :
break;
}
}
}
 else {
logger.info("String_Node_Str");
resetBrowser();
runBrowserOperation(operation);
}
return null;
}

Fixed version (ground truth):
@Override protected Void call(){
  if (isBrowserActive()) {
    try {
      operation.run();
      pageContentOnLoad=getCurrentPageSource();
    }
 catch (    WebDriverException e) {
switch (BrowserComponentError.fromErrorMessage(e.getMessage())) {
case NoSuchWindow:
        resetBrowser();
      runBrowserOperation(operation);
    break;
case NoSuchElement:
  logger.info("String_Node_Str" + e.getMessage());
break;
default :
break;
}
}
}
 else {
logger.info("String_Node_Str");
resetBrowser();
runBrowserOperation(operation);
}
return null;
}
Program: 135312
Project: 135312
Buggy source:
/** 
 * A helper function for running browser operations. Takes care of running it on a separate thread, and normalises error-handling across all types of code.
 */
private void runBrowserOperation(Runnable operation){
  executor.execute(new Task<Void>(){
    @Override protected Void call(){
      if (isBrowserActive()) {
        try {
          operation.run();
          pageContentOnLoad=getCurrentPageSource();
        }
 catch (        WebDriverException e) {
switch (BrowserComponentError.fromErrorMessage(e.getMessage())) {
case NoSuchWindow:
            resetBrowser();
          runBrowserOperation(operation);
case NoSuchElement:
        logger.info("String_Node_Str" + e.getMessage());
      break;
default :
    break;
}
}
}
 else {
logger.info("String_Node_Str");
resetBrowser();
runBrowserOperation(operation);
}
return null;
}
}
);
}

Fixed version (ground truth):
/** 
 * A helper function for running browser operations. Takes care of running it on a separate thread, and normalises error-handling across all types of code.
 */
private void runBrowserOperation(Runnable operation){
  executor.execute(new Task<Void>(){
    @Override protected Void call(){
      if (isBrowserActive()) {
        try {
          operation.run();
          pageContentOnLoad=getCurrentPageSource();
        }
 catch (        WebDriverException e) {
switch (BrowserComponentError.fromErrorMessage(e.getMessage())) {
case NoSuchWindow:
            resetBrowser();
          runBrowserOperation(operation);
        break;
case NoSuchElement:
      logger.info("String_Node_Str" + e.getMessage());
    break;
default :
  break;
}
}
}
 else {
logger.info("String_Node_Str");
resetBrowser();
runBrowserOperation(operation);
}
return null;
}
}
);
}
Program: 135313
Project: 135313
Buggy source:
private void applyAssignee(TurboIssue issue,IModel model) throws QualifierApplicationException {
  if (!content.isPresent()) {
    throw new QualifierApplicationException("String_Node_Str" + (date.isPresent() ? date.get() : dateRange.get()));
  }
  List<TurboUser> assignees=model.getUsers().stream().filter(c -> c.getLoginName().toLowerCase().contains(content.get().toLowerCase())).collect(Collectors.toList());
  if (assignees.size() > 1) {
    throw new QualifierApplicationException("String_Node_Str" + assignees.toString());
  }
 else {
    issue.setAssignee(assignees.get(0));
  }
}

Fixed version (ground truth):
private void applyAssignee(TurboIssue issue,IModel model) throws QualifierApplicationException {
  if (!content.isPresent()) {
    throw new QualifierApplicationException("String_Node_Str");
  }
  List<TurboUser> assignees=model.getUsers().stream().filter(c -> c.getLoginName().toLowerCase().contains(content.get().toLowerCase())).collect(Collectors.toList());
  if (assignees.isEmpty()) {
    throw new QualifierApplicationException("String_Node_Str" + content.get());
  }
 else   if (assignees.size() == 1) {
    issue.setAssignee(assignees.get(0));
    return;
  }
  assignees=model.getUsers().stream().filter(c -> c.getLoginName().toLowerCase().equals(content.get().toLowerCase())).collect(Collectors.toList());
  if (assignees.isEmpty()) {
    throw new QualifierApplicationException("String_Node_Str" + content.get());
  }
 else   if (assignees.size() == 1) {
    issue.setAssignee(assignees.get(0));
    return;
  }
  throw new QualifierApplicationException("String_Node_Str" + assignees.toString());
}