nus-yam/ex-repair huggingface dataset:
Program: 135378
Project: 135378
Buggy source:
public ModelUpdater(GitHubClientExtended client,Model model,String issuesETag,String collabsETag,String labelsETag,String milestonesETag,String issueCheckTime){
  this.model=model;
  this.issueUpdateService=new IssueUpdateService(client,issuesETag,issueCheckTime);
  this.collaboratorUpdateService=new CollaboratorUpdateService(client,collabsETag);
  this.labelUpdateService=new LabelUpdateService(client,labelsETag);
  this.milestoneUpdateService=new MilestoneUpdateService(client,milestonesETag);
}

Fixed version (ground truth):
public ModelUpdater(GitHubClientExtended client,Model model,String issuesETag,String collabsETag,String labelsETag,String milestonesETag,Date issueCheckTime){
  this.model=model;
  this.issueUpdateService=new IssueUpdateService(client,issuesETag,issueCheckTime);
  this.collaboratorUpdateService=new CollaboratorUpdateService(client,collabsETag);
  this.labelUpdateService=new LabelUpdateService(client,labelsETag);
  this.milestoneUpdateService=new MilestoneUpdateService(client,milestonesETag);
}
Program: 135379
Project: 135379
Buggy source:
private void updateModelMilestones(CountDownLatch latch,String repoId){
  if (model.getRepoId().generateId().equals(repoId)) {
    List<Milestone> milestones=milestoneUpdateService.getUpdatedItems(RepositoryId.createFromId(repoId));
    if (milestones.size() > 0) {
      model.updateMilestonesETag(milestoneUpdateService.getLastETag());
      model.updateCachedMilestones(latch,milestones,repoId);
    }
 else {
      logger.info("String_Node_Str");
      latch.countDown();
      HTStatusBar.addProgress(0.25);
    }
  }
}

Fixed version (ground truth):
private void updateModelMilestones(CountDownLatch latch,String repoId){
  if (model.getRepoId().generateId().equals(repoId)) {
    List<Milestone> milestones=milestoneUpdateService.getUpdatedItems(RepositoryId.createFromId(repoId));
    if (milestones.size() > 0) {
      model.updateMilestonesETag(milestoneUpdateService.getUpdatedETag());
      model.updateCachedMilestones(latch,milestones,repoId);
    }
 else {
      logger.info("String_Node_Str");
      latch.countDown();
      HTStatusBar.addProgress(0.25);
    }
  }
}
Program: 135380
Project: 135380
Buggy source:
private void updateModelCollaborators(CountDownLatch latch,String repoId){
  if (model.getRepoId().generateId().equals(repoId)) {
    List<User> collaborators=collaboratorUpdateService.getUpdatedItems(RepositoryId.createFromId(repoId));
    if (collaborators.size() > 0) {
      model.updateCollabsETag(collaboratorUpdateService.getLastETag());
      model.updateCachedCollaborators(latch,collaborators,repoId);
    }
 else {
      logger.info("String_Node_Str");
      latch.countDown();
      HTStatusBar.addProgress(0.25);
    }
  }
}

Fixed version (ground truth):
private void updateModelCollaborators(CountDownLatch latch,String repoId){
  if (model.getRepoId().generateId().equals(repoId)) {
    List<User> collaborators=collaboratorUpdateService.getUpdatedItems(RepositoryId.createFromId(repoId));
    if (collaborators.size() > 0) {
      model.updateCollabsETag(collaboratorUpdateService.getUpdatedETag());
      model.updateCachedCollaborators(latch,collaborators,repoId);
    }
 else {
      logger.info("String_Node_Str");
      latch.countDown();
      HTStatusBar.addProgress(0.25);
    }
  }
}
Program: 135381
Project: 135381
Buggy source:
private void updateModelLabels(CountDownLatch latch,String repoId){
  if (model.getRepoId().generateId().equals(repoId)) {
    List<Label> labels=labelUpdateService.getUpdatedItems(RepositoryId.createFromId(repoId));
    if (labels.size() > 0) {
      model.updateLabelsETag(labelUpdateService.getLastETag());
      model.updateCachedLabels(latch,labels,repoId);
    }
 else {
      logger.info("String_Node_Str");
      latch.countDown();
      HTStatusBar.addProgress(0.25);
    }
  }
}

Fixed version (ground truth):
private void updateModelLabels(CountDownLatch latch,String repoId){
  if (model.getRepoId().generateId().equals(repoId)) {
    List<Label> labels=labelUpdateService.getUpdatedItems(RepositoryId.createFromId(repoId));
    if (labels.size() > 0) {
      model.updateLabelsETag(labelUpdateService.getUpdatedETag());
      model.updateCachedLabels(latch,labels,repoId);
    }
 else {
      logger.info("String_Node_Str");
      latch.countDown();
      HTStatusBar.addProgress(0.25);
    }
  }
}
Program: 135382
Project: 135382
Buggy source:
@SuppressWarnings("String_Node_Str") public HashMap<String,List> getResources(RepositoryId repoId) throws IOException {
  this.repoId=repoId;
  CacheFileHandler dcHandler=new CacheFileHandler(repoId.toString());
  model.setDataCacheFileHandler(dcHandler);
  model.setRepoId(repoId);
  boolean needToGetResources=true;
  CachedRepoData repo=dcHandler.getRepo();
  if (repo != null) {
    needToGetResources=false;
  }
  if (!needToGetResources) {
    logger.info("String_Node_Str");
    issuesETag=repo.getIssuesETag();
    collabsETag=repo.getCollaboratorsETag();
    labelsETag=repo.getLabelsETag();
    milestonesETag=repo.getMilestonesETag();
    issueCheckTime=repo.getIssueCheckTime();
    List<TurboUser> collaborators=repo.getCollaborators();
    List<TurboLabel> labels=repo.getLabels();
    List<TurboMilestone> milestones=repo.getMilestones();
    HashMap<String,List> map=new HashMap<String,List>();
    map.put(KEY_COLLABORATORS,collaborators);
    map.put(KEY_LABELS,labels);
    map.put(KEY_MILESTONES,milestones);
    return map;
  }
 else {
    logger.info("String_Node_Str");
    return getGitHubResources();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public HashMap<String,List> getResources(RepositoryId repoId) throws IOException {
  this.repoId=repoId;
  CacheFileHandler dcHandler=new CacheFileHandler(repoId.toString());
  model.setDataCacheFileHandler(dcHandler);
  model.setRepoId(repoId);
  boolean needToGetResources=true;
  CachedRepoData repo=dcHandler.getRepo();
  if (repo != null) {
    needToGetResources=false;
  }
  if (!needToGetResources) {
    logger.info("String_Node_Str");
    issuesETag=repo.getIssuesETag();
    collabsETag=repo.getCollaboratorsETag();
    labelsETag=repo.getLabelsETag();
    milestonesETag=repo.getMilestonesETag();
    issueCheckTime=Utility.localDateTimeToDate(repo.getIssueCheckTime());
    List<TurboUser> collaborators=repo.getCollaborators();
    List<TurboLabel> labels=repo.getLabels();
    List<TurboMilestone> milestones=repo.getMilestones();
    HashMap<String,List> map=new HashMap<String,List>();
    map.put(KEY_COLLABORATORS,collaborators);
    map.put(KEY_LABELS,labels);
    map.put(KEY_MILESTONES,milestones);
    return map;
  }
 else {
    logger.info("String_Node_Str");
    return getGitHubResources();
  }
}
Program: 135383
Project: 135383
Buggy source:
public IssueUpdateService(GitHubClientExtended client,String issuesETag,String lastIssueCheckTime){
  super(client,SEGMENT_ISSUES,issuesETag);
  lastCheckTime=new Date();
  super.setLastIssueCheckTime(lastIssueCheckTime);
}

Fixed version (ground truth):
public IssueUpdateService(GitHubClientExtended client,String issuesETag,Date lastIssueCheckTime){
  super(client,SEGMENT_ISSUES,issuesETag);
  this.lastIssueCheckTime=lastIssueCheckTime;
}
Program: 135384
Project: 135384
Buggy source:
private Map<String,String> createUpdatedIssuesParams(){
  Map<String,String> params=new HashMap<String,String>();
  params.put("String_Node_Str",getFormattedDate(lastCheckTime));
  params.put("String_Node_Str","String_Node_Str");
  return params;
}

Fixed version (ground truth):
private Map<String,String> createUpdatedIssuesParams(){
  Map<String,String> params=new HashMap<>();
  params.put("String_Node_Str",Utility.formatDateISO8601(lastIssueCheckTime));
  params.put("String_Node_Str","String_Node_Str");
  return params;
}
Program: 135385
Project: 135385
Buggy source:
public void writeToFile(String repoIdString,String issuesETag,String collabsETag,String labelsETag,String milestonesETag,String issueCheckTime,List<TurboUser> collaborators,List<TurboLabel> labels,List<TurboMilestone> milestones,List<TurboIssue> issues){
  CachedRepoData currentRepoData=new CachedRepoData(issuesETag,collabsETag,labelsETag,milestonesETag,issueCheckTime,new ArrayList<>(collaborators),new ArrayList<>(labels),new ArrayList<>(milestones),new ArrayList<>(issues));
  Gson gson=new GsonBuilder().setPrettyPrinting().registerTypeAdapter(LocalDateTime.class,new LocalDateTimeAdapter()).create();
  String json=gson.toJson(currentRepoData);
  try {
    FileWriter writer=new FileWriter(getFileName(FILE_DATA_CACHE_TEMP,repoIdString));
    writer.write(json);
    writer.close();
    File file=new File(getFileName(FILE_DATA_CACHE,repoIdString));
    if (file.exists() && !file.delete()) {
      logger.error("String_Node_Str");
    }
    File newFile=new File(getFileName(FILE_DATA_CACHE_TEMP,repoIdString));
    if (!newFile.renameTo(file)) {
      logger.error("String_Node_Str");
    }
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
  logger.info("String_Node_Str" + repoIdString + "String_Node_Str"+ issueCheckTime);
}

Fixed version (ground truth):
public void writeToFile(String repoIdString,String issuesETag,String collabsETag,String labelsETag,String milestonesETag,Date issueCheckTime,List<TurboUser> collaborators,List<TurboLabel> labels,List<TurboMilestone> milestones,List<TurboIssue> issues){
  CachedRepoData currentRepoData=new CachedRepoData(issuesETag,collabsETag,labelsETag,milestonesETag,Utility.dateToLocalDateTime(issueCheckTime),new ArrayList<>(collaborators),new ArrayList<>(labels),new ArrayList<>(milestones),new ArrayList<>(issues));
  Gson gson=new GsonBuilder().setPrettyPrinting().registerTypeAdapter(LocalDateTime.class,new LocalDateTimeAdapter()).create();
  String json=gson.toJson(currentRepoData);
  try {
    FileWriter writer=new FileWriter(getFileName(FILE_DATA_CACHE_TEMP,repoIdString));
    writer.write(json);
    writer.close();
    File file=new File(getFileName(FILE_DATA_CACHE,repoIdString));
    if (file.exists() && !file.delete()) {
      logger.error("String_Node_Str");
    }
    File newFile=new File(getFileName(FILE_DATA_CACHE_TEMP,repoIdString));
    if (!newFile.renameTo(file)) {
      logger.error("String_Node_Str");
    }
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
  logger.info("String_Node_Str" + repoIdString + "String_Node_Str"+ issueCheckTime);
}
Program: 135386
Project: 135386
Buggy source:
public CachedRepoData(String issuesETag,String collabsETag,String labelsETag,String milestonesETag,String issueCheckTime,List<TurboUser> collaborators,List<TurboLabel> labels,List<TurboMilestone> milestones,List<TurboIssue> issues){
  this.issuesETag=issuesETag;
  this.collabsETag=collabsETag;
  this.labelsETag=labelsETag;
  this.milestonesETag=milestonesETag;
  this.issueCheckTime=issueCheckTime;
  this.collaborators=collaborators;
  this.labels=new ArrayList<SerializableLabel>();
  if (this.labels != null) {
    for (    TurboLabel label : labels) {
      this.labels.add(new SerializableLabel(label));
    }
  }
  this.milestones=new ArrayList<SerializableMilestone>();
  if (this.milestones != null) {
    for (    TurboMilestone milestone : milestones) {
      this.milestones.add(new SerializableMilestone(milestone));
    }
  }
  this.issues=new ArrayList<SerializableIssue>();
  if (this.issues != null) {
    for (    TurboIssue issue : issues) {
      this.issues.add(new SerializableIssue(issue));
    }
  }
}

Fixed version (ground truth):
public CachedRepoData(String issuesETag,String collabsETag,String labelsETag,String milestonesETag,LocalDateTime issueCheckTime,List<TurboUser> collaborators,List<TurboLabel> labels,List<TurboMilestone> milestones,List<TurboIssue> issues){
  this.issuesETag=issuesETag;
  this.collabsETag=collabsETag;
  this.labelsETag=labelsETag;
  this.milestonesETag=milestonesETag;
  this.issueCheckTime=issueCheckTime;
  this.collaborators=collaborators;
  this.labels=new ArrayList<SerializableLabel>();
  if (this.labels != null) {
    for (    TurboLabel label : labels) {
      this.labels.add(new SerializableLabel(label));
    }
  }
  this.milestones=new ArrayList<SerializableMilestone>();
  if (this.milestones != null) {
    for (    TurboMilestone milestone : milestones) {
      this.milestones.add(new SerializableMilestone(milestone));
    }
  }
  this.issues=new ArrayList<SerializableIssue>();
  if (this.issues != null) {
    for (    TurboIssue issue : issues) {
      this.issues.add(new SerializableIssue(issue));
    }
  }
}
Program: 135387
Project: 135387
Buggy source:
public String getIssueCheckTime(){
  return issueCheckTime;
}

Fixed version (ground truth):
public LocalDateTime getIssueCheckTime(){
  return issueCheckTime;
}
Program: 135388
Project: 135388
Buggy source:
private void setup(){
  setPrefColumnCount(30);
  validationSupport.registerValidator(this,(c,newValue) -> {
    boolean wasError=false;
    try {
      Parser.parse(getText());
    }
 catch (    ParseException e) {
      wasError=true;
    }
    return ValidationResult.fromErrorIf(this,"String_Node_Str",wasError);
  }
);
  setOnKeyTyped(e -> {
    boolean isModifierKeyPress=e.isAltDown() || e.isMetaDown() || e.isControlDown();
    String key=e.getCharacter();
    if (key == null || key.isEmpty() || isModifierKeyPress) {
      return;
    }
    char typed=e.getCharacter().charAt(0);
    if (typed == ')') {
      if (getCharAfterCaret().equals("String_Node_Str")) {
        e.consume();
        positionCaret(getCaretPosition() + 1);
      }
    }
 else     if (typed == '(') {
      e.consume();
      insertMatchingBracket();
    }
 else     if (typed == '\t') {
      e.consume();
      if (getSelectedText().isEmpty()) {
        movePastRemainingBrackets();
      }
 else {
        confirmCompletion();
      }
    }
 else     if (typed == '\b') {
    }
 else     if (Character.isAlphabetic(typed)) {
      performCompletion(e);
    }
 else     if (typed == ' ' && getText().isEmpty()) {
      e.consume();
    }
  }
);
  setOnKeyPressed(e -> {
    if (e.getCode() == KeyCode.TAB) {
      e.consume();
    }
  }
);
  setOnKeyReleased(e -> {
    if (e.getCode() == KeyCode.ENTER) {
      confirmEdit();
    }
 else     if (e.getCode() == KeyCode.ESCAPE) {
      revertEdit();
      getParent().requestFocus();
    }
  }
);
}

Fixed version (ground truth):
private void setup(){
  setPrefColumnCount(30);
  validationSupport.registerValidator(this,(c,newValue) -> {
    boolean wasError=false;
    try {
      Parser.parse(getText());
    }
 catch (    ParseException e) {
      wasError=true;
    }
    return ValidationResult.fromErrorIf(this,"String_Node_Str",wasError);
  }
);
  setOnKeyTyped(e -> {
    boolean isModifierKeyPress=e.isAltDown() || e.isMetaDown() || e.isControlDown();
    String key=e.getCharacter();
    if (key == null || key.isEmpty() || isModifierKeyPress) {
      return;
    }
    char typed=e.getCharacter().charAt(0);
    if (typed == ')') {
      if (getCharAfterCaret().equals("String_Node_Str")) {
        e.consume();
        positionCaret(getCaretPosition() + 1);
      }
    }
 else     if (typed == '(') {
      e.consume();
      insertMatchingBracket();
    }
 else     if (typed == '\t') {
      e.consume();
      if (getSelectedText().isEmpty()) {
        movePastRemainingBrackets();
      }
 else {
        confirmCompletion();
      }
    }
 else     if (typed == '\b') {
    }
 else     if (Character.isAlphabetic(typed)) {
      performCompletion(e);
    }
 else     if (typed == ' ' && (getText().isEmpty() || getText().endsWith("String_Node_Str"))) {
      e.consume();
    }
  }
);
  setOnKeyPressed(e -> {
    if (e.getCode() == KeyCode.TAB) {
      e.consume();
    }
  }
);
  setOnKeyReleased(e -> {
    if (e.getCode() == KeyCode.ENTER) {
      confirmEdit();
    }
 else     if (e.getCode() == KeyCode.ESCAPE) {
      revertEdit();
      getParent().requestFocus();
    }
  }
);
}
Program: 135389
Project: 135389
Buggy source:
private void handleKeys(boolean isDownKey){
  if (!currentlySelectedColumn.isPresent())   return;
  if (getChildren().size() == 0)   return;
  Column selectedColumn=getColumn(currentlySelectedColumn.get());
  if (selectedColumn instanceof IssueColumn) {
    if (((IssueColumn)selectedColumn).filterTextField.isFocused()) {
      return;
    }
 else {
      int newIndex=currentlySelectedColumn.get() + (isDownKey ? 1 : -1);
      newIndex=Math.min(Math.max(0,newIndex),getChildren().size() - 1);
      currentlySelectedColumn=Optional.of(newIndex);
      selectedColumn=getColumn(currentlySelectedColumn.get());
      ((IssueColumn)selectedColumn).filterTextField.requestFocus();
    }
  }
}

Fixed version (ground truth):
private void handleKeys(boolean isForwardKey){
  if (!currentlySelectedColumn.isPresent())   return;
  if (getChildren().size() == 0)   return;
  Column selectedColumn=getColumn(currentlySelectedColumn.get());
  if (selectedColumn instanceof IssueColumn) {
    if (((IssueColumn)selectedColumn).filterTextField.isFocused()) {
      return;
    }
 else {
      int newIndex=currentlySelectedColumn.get() + (isForwardKey ? 1 : -1);
      newIndex=Math.min(Math.max(0,newIndex),getChildren().size() - 1);
      currentlySelectedColumn=Optional.of(newIndex);
      selectedColumn=getColumn(currentlySelectedColumn.get());
      ((IssueColumn)selectedColumn).requestFocus();
    }
  }
}
Program: 135390
Project: 135390
Buggy source:
private void setupKeyboardShortcuts(){
  filterTextField.addEventHandler(KeyEvent.KEY_RELEASED,new EventHandler<KeyEvent>(){
    public void handle(    KeyEvent event){
      if (keyCombBoxToList.match(event)) {
        listView.selectFirstItem();
      }
      if (event.getCode() == KeyCode.SPACE) {
        if (KeyPress.isDoublePress(event,System.currentTimeMillis())) {
          event.consume();
          listView.selectFirstItem();
        }
      }
    }
  }
);
  listView.addEventHandler(KeyEvent.KEY_RELEASED,new EventHandler<KeyEvent>(){
    public void handle(    KeyEvent event){
      if (event.getCode() == KeyCode.C) {
        ui.getBrowserComponent().jumpToComment();
      }
    }
  }
);
  this.addEventHandler(KeyEvent.KEY_RELEASED,new EventHandler<KeyEvent>(){
    public void handle(    KeyEvent event){
      if (event.getCode() == KeyCode.F5) {
        ServiceManager.getInstance().updateModelNow();
      }
      if (keyCombListToBox.match(event)) {
        filterTextField.requestFocus();
      }
      if (event.getCode() == KeyCode.SPACE) {
        if (KeyPress.isDoublePress(event,System.currentTimeMillis())) {
          filterTextField.requestFocus();
        }
      }
    }
  }
);
}

Fixed version (ground truth):
private void setupKeyboardShortcuts(){
  filterTextField.addEventHandler(KeyEvent.KEY_RELEASED,new EventHandler<KeyEvent>(){
    public void handle(    KeyEvent event){
      if (keyCombBoxToList.match(event)) {
        listView.selectFirstItem();
      }
      if (event.getCode() == KeyCode.SPACE) {
        if (KeyPress.isDoublePress(event,System.currentTimeMillis())) {
          KeyPress.setTimeKeyDown(0);
          event.consume();
          listView.selectFirstItem();
        }
      }
    }
  }
);
  listView.addEventHandler(KeyEvent.KEY_RELEASED,new EventHandler<KeyEvent>(){
    public void handle(    KeyEvent event){
      if (event.getCode() == KeyCode.C) {
        ui.getBrowserComponent().jumpToComment();
      }
    }
  }
);
  this.addEventHandler(KeyEvent.KEY_RELEASED,new EventHandler<KeyEvent>(){
    public void handle(    KeyEvent event){
      if (event.getCode() == KeyCode.F5) {
        ServiceManager.getInstance().updateModelNow();
      }
      if (keyCombListToBox.match(event)) {
        filterTextField.requestFocus();
      }
      if (event.getCode() == KeyCode.SPACE) {
        if (KeyPress.isDoublePress(event,System.currentTimeMillis())) {
          filterTextField.requestFocus();
        }
      }
    }
  }
);
}
Program: 135391
Project: 135391
Buggy source:
public static boolean isDoublePress(KeyEvent event,long KeyEventTime){
  if ((KeyEventTime - timeKeyDown) < doublePressSpeed) {
    return true;
  }
 else {
    timeKeyDown=KeyEventTime;
  }
  lastKeyPressedCode=event.getCode();
  return false;
}

Fixed version (ground truth):
public static boolean isDoublePress(KeyEvent event,long KeyEventTime){
  if ((KeyEventTime - timeKeyDown) < doublePressSpeed) {
    return true;
  }
 else {
    timeKeyDown=KeyEventTime;
  }
  return false;
}
Program: 135392
Project: 135392
Buggy source:
public Node getEventDisplay(int width,final int withinHours){
  final LocalDateTime now=LocalDateTime.now();
  List<TurboIssueEvent> eventsWithinDuration=events.stream().filter(event -> {
    LocalDateTime eventTime=Utility.longToLocalDateTime(event.getDate().getTime());
    int hours=Utility.safeLongToInt(getUpdatedAt().until(now,ChronoUnit.HOURS));
    return hours < withinHours;
  }
).collect(Collectors.toList());
  return layoutEvents(eventsWithinDuration);
}

Fixed version (ground truth):
public Node getEventDisplay(int width,final int withinHours){
  final LocalDateTime now=LocalDateTime.now();
  List<TurboIssueEvent> eventsWithinDuration=events.stream().filter(event -> {
    LocalDateTime eventTime=Utility.longToLocalDateTime(event.getDate().getTime());
    int hours=Utility.safeLongToInt(eventTime.until(now,ChronoUnit.HOURS));
    return hours < withinHours;
  }
).collect(Collectors.toList());
  return layoutEvents(eventsWithinDuration);
}
Program: 135393
Project: 135393
Buggy source:
public String toGhName(){
  String groupDelimiter=isExclusive ? EXCLUSIVE_DELIM : NONEXCLUSIVE_DELIM;
  String groupPrefix=getGroup() == null ? "String_Node_Str" : getGroup() + groupDelimiter;
  String groupAppended=groupPrefix + getName();
  return groupAppended;
}

Fixed version (ground truth):
public String toGhName(){
  String groupDelimiter=isExclusive ? EXCLUSIVE_DELIM : NONEXCLUSIVE_DELIM;
  String groupPrefix=(getGroup() == null || getGroup().isEmpty()) ? "String_Node_Str" : getGroup() + groupDelimiter;
  String groupAppended=groupPrefix + getName();
  return groupAppended;
}
Program: 135394
Project: 135394
Buggy source:
private void setupMainStage(Scene scene){
  mainStage.setTitle("String_Node_Str" + Utility.version(VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH));
  mainStage.setScene(scene);
  mainStage.show();
  mainStage.setOnCloseRequest(e -> quit());
  initialiseJNA();
  mainStage.focusedProperty().addListener(new ChangeListener<Boolean>(){
    @Override public void changed(    ObservableValue<? extends Boolean> unused,    Boolean wasFocused,    Boolean isFocused){
      if (isFocused) {
        if (PlatformSpecific.isOnWindows()) {
          browserComponent.focus(mainWindowHandle);
        }
        PlatformEx.runLaterDelayed(() -> {
          boolean shouldRefresh=isRepoSwitchingAllowed() && !repoSelector.isInFocus();
          if (shouldRefresh) {
            logger.info("String_Node_Str");
            ServiceManager.getInstance().updateModelNow();
            ServiceManager.getInstance().resetTimeRemainingUntilRefresh();
          }
        }
);
      }
    }
  }
);
}

Fixed version (ground truth):
private void setupMainStage(Scene scene){
  mainStage.setTitle("String_Node_Str" + Utility.version(VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH));
  mainStage.setScene(scene);
  mainStage.show();
  mainStage.setOnCloseRequest(e -> quit());
  initialiseJNA();
  mainStage.focusedProperty().addListener(new ChangeListener<Boolean>(){
    @Override public void changed(    ObservableValue<? extends Boolean> unused,    Boolean wasFocused,    Boolean isFocused){
      if (!isFocused) {
        return;
      }
      if (PlatformSpecific.isOnWindows()) {
        browserComponent.focus(mainWindowHandle);
      }
      PlatformEx.runLaterDelayed(() -> {
        boolean shouldRefresh=isRepoSwitchingAllowed() && !repoSelector.isInFocus();
        if (shouldRefresh) {
          logger.info("String_Node_Str");
          ServiceManager.getInstance().updateModelNow();
          ServiceManager.getInstance().resetTimeRemainingUntilRefresh();
        }
      }
);
    }
  }
);
}
Program: 135395
Project: 135395
Buggy source:
@Override public void changed(ObservableValue<? extends Boolean> unused,Boolean wasFocused,Boolean isFocused){
  if (isFocused) {
    if (PlatformSpecific.isOnWindows()) {
      browserComponent.focus(mainWindowHandle);
    }
    PlatformEx.runLaterDelayed(() -> {
      boolean shouldRefresh=isRepoSwitchingAllowed() && !repoSelector.isInFocus();
      if (shouldRefresh) {
        logger.info("String_Node_Str");
        ServiceManager.getInstance().updateModelNow();
        ServiceManager.getInstance().resetTimeRemainingUntilRefresh();
      }
    }
);
  }
}

Fixed version (ground truth):
@Override public void changed(ObservableValue<? extends Boolean> unused,Boolean wasFocused,Boolean isFocused){
  if (!isFocused) {
    return;
  }
  if (PlatformSpecific.isOnWindows()) {
    browserComponent.focus(mainWindowHandle);
  }
  PlatformEx.runLaterDelayed(() -> {
    boolean shouldRefresh=isRepoSwitchingAllowed() && !repoSelector.isInFocus();
    if (shouldRefresh) {
      logger.info("String_Node_Str");
      ServiceManager.getInstance().updateModelNow();
      ServiceManager.getInstance().resetTimeRemainingUntilRefresh();
    }
  }
);
}
Program: 135396
Project: 135396
Buggy source:
/** 
 * Downloads the resources of the current repository from GitHub, bypassing the cache, then populates the fields of this class with them. Does not perform network operations in test mode, instead loading stub data from cache.
 * @throws IOException
 */
@SuppressWarnings("String_Node_Str") public void forceReloadComponents() throws IOException {
  if (isInTestMode) {
    populateComponents(repoId,TestUtils.getStubResources(this,10));
  }
  HashMap<String,List> items=ServiceManager.getInstance().getGitHubResources();
  populateComponents(repoId,items);
}

Fixed version (ground truth):
/** 
 * Downloads the resources of the current repository from GitHub, bypassing the cache, then populates the fields of this class with them. Does not perform network operations in test mode, instead loading stub data from cache.
 * @throws IOException
 */
@SuppressWarnings("String_Node_Str") public void forceReloadComponents() throws IOException {
  if (isInTestMode) {
    populateComponents(repoId,TestUtils.getStubResources(this,10));
    return;
  }
  HashMap<String,List> items=ServiceManager.getInstance().getGitHubResources();
  populateComponents(repoId,items);
}
Program: 135397
Project: 135397
Buggy source:
public TurboUser getUserByGhName(String name){
  for (int i=0; i < labels.size(); i++) {
    if (collaborators.get(i).getGithubName().equals(name)) {
      return collaborators.get(i);
    }
  }
  return null;
}

Fixed version (ground truth):
public TurboUser getUserByGhName(String name){
  for (int i=0; i < collaborators.size(); i++) {
    if (collaborators.get(i).getGithubName().equals(name)) {
      return collaborators.get(i);
    }
  }
  return null;
}
Program: 135398
Project: 135398
Buggy source:
/** 
 * Ensures that the chromedriver executable is in the project root before initialisation. Since executables are packaged for all platforms, this also picks the right version to use.
 */
private static void setupChromeDriverExecutable(){
  String binaryFileName=PlatformSpecific.isOnMac() ? "String_Node_Str" : PlatformSpecific.isOnWindows() ? "String_Node_Str" : "String_Node_Str";
  File f=new File(binaryFileName);
  if (!f.exists()) {
    InputStream in=BrowserComponent.class.getClassLoader().getResourceAsStream("String_Node_Str" + binaryFileName);
    OutputStream out;
    try {
      out=new FileOutputStream(binaryFileName);
      IOUtils.copy(in,out);
      out.close();
      f.setExecutable(true);
    }
 catch (    IOException e) {
      logger.error("String_Node_Str" + e.getLocalizedMessage(),e);
    }
    System.out.println("String_Node_Str" + binaryFileName + "String_Node_Str");
  }
 else {
    System.out.println("String_Node_Str" + binaryFileName);
  }
  System.setProperty("String_Node_Str",binaryFileName);
}

Fixed version (ground truth):
/** 
 * Ensures that the chromedriver executable is in the project root before initialisation. Since executables are packaged for all platforms, this also picks the right version to use.
 */
private static void setupChromeDriverExecutable(){
}
Program: 135399
Project: 135399
Buggy source:
private List<IssueEvent> getGithubFeed(){
  List<IssueEvent> feeds=new ArrayList<IssueEvent>();
  try {
    feeds=ServiceManager.getInstance().getFeeds(getId());
  }
 catch (  Exception e) {
    logger.error(e.getLocalizedMessage(),e);
  }
  return feeds;
}

Fixed version (ground truth):
private List<TurboIssueEvent> getGithubFeed(){
  List<TurboIssueEvent> feeds=new ArrayList<TurboIssueEvent>();
  try {
    feeds=ServiceManager.getInstance().getFeeds(getId());
  }
 catch (  Exception e) {
    logger.error(e.getLocalizedMessage(),e);
  }
  return feeds;
}
Program: 135400
Project: 135400
Buggy source:
private String formatFeeds(int hours,int minutes,int seconds){
  LocalDateTime currentTime=LocalDateTime.now();
  LocalDateTime cutoffTime=currentTime.minusHours(hours).minusMinutes(minutes).minusSeconds(seconds);
  ArrayList<String> feedMessages=new ArrayList<String>();
  String previousMessage="String_Node_Str";
  String currentMessage="String_Node_Str";
  boolean isFirstEvent=true;
  for (  IssueEvent event : issueFeeds) {
    if (LocalDateTime.ofInstant(event.getCreatedAt().toInstant(),ZoneId.systemDefault()).isAfter(cutoffTime)) {
      currentMessage=formatMessage(event);
      if (isFirstEvent) {
        feedMessages.add(currentMessage);
        isFirstEvent=false;
        previousMessage=currentMessage;
      }
 else       if (!currentMessage.equals(previousMessage)) {
        feedMessages.add(currentMessage);
        previousMessage=currentMessage;
      }
    }
  }
  StringBuffer stringBuffer=new StringBuffer();
  for (int i=feedMessages.size() - 1; i > 0; i--) {
    if (i == feedMessages.size()) {
      stringBuffer.append(feedMessages.get(i - 1));
    }
 else {
      stringBuffer.append(NEW_LINE + feedMessages.get(i - 1));
    }
  }
  return stringBuffer.toString();
}

Fixed version (ground truth):
private String formatFeeds(int hours,int minutes,int seconds){
  LocalDateTime currentTime=LocalDateTime.now();
  LocalDateTime cutoffTime=currentTime.minusHours(hours).minusMinutes(minutes).minusSeconds(seconds);
  ArrayList<String> feedMessages=new ArrayList<String>();
  ArrayList<String> tempMessages=new ArrayList<String>();
  ArrayList<IssueEventType> eventSeq=new ArrayList<IssueEventType>();
  previousActor="String_Node_Str";
  previousPTime="String_Node_Str";
  previousMessage="String_Node_Str";
  currentMessage="String_Node_Str";
  for (  TurboIssueEvent event : issueFeeds) {
    if (LocalDateTime.ofInstant(event.getDate().toInstant(),ZoneId.systemDefault()).isAfter(cutoffTime)) {
      if (isNewEvent(event)) {
        feedMessages.addAll(outputToBuffer(tempMessages,eventSeq));
        tempMessages.clear();
        eventSeq.clear();
      }
      eventSeq.add(event.getType());
      System.out.println("String_Node_Str" + event.getType().toString());
      currentMessage=formatMessage(currentActor,currentPTime,event);
      if (currentMessage != null && !currentMessage.isEmpty() && !currentMessage.equals(previousMessage)) {
        tempMessages.add(currentMessage);
        previousMessage=currentMessage;
      }
    }
  }
  feedMessages.addAll(outputToBuffer(tempMessages,eventSeq));
  return outputReverseOrder(feedMessages);
}
Program: 135402
Project: 135402
Buggy source:
/** 
 * Services for IssueEvent
 */
public List<IssueEvent> getFeeds(int issueNum) throws IOException {
  ArrayList<IssueEvent> eventList=new ArrayList<IssueEvent>();
  String user=getRepoOwner();
  String repo=getRepoName();
  boolean toContinue=true;
  PageIterator<IssueEvent> iter=issueService.pageIssueEvents(user,repo,issueNum);
  if (iter != null && iter.hasNext()) {
    for (    Collection<IssueEvent> currentPage : iter) {
      if (!currentPage.isEmpty()) {
        for (        IssueEvent event : currentPage) {
          if (event != null) {
            IssueEvent fetched=issueService.getIssueEvent(user,repo,event.getId());
            if (fetched != null) {
              if (eventList.size() < MAX_FEED) {
                eventList.add(fetched);
              }
 else {
                toContinue=false;
                break;
              }
            }
          }
        }
      }
      if (!toContinue) {
        break;
      }
    }
  }
  return eventList;
}

Fixed version (ground truth):
/** 
 * Services for IssueEvent
 */
public List<TurboIssueEvent> getFeeds(int issueNum) throws IOException {
  GitHubEventsResponse ghEventsResponse=issueService.getIssueEvents(getRepoId(),issueNum);
  return ghEventsResponse.getTurboIssueEvents();
}
Program: 135403
Project: 135403
Buggy source:
private void setupMouseEvents(){
  setOnMouseClicked(e -> {
    int currentlySelected=getSelectionModel().getSelectedIndex();
    if (currentlySelected != -1) {
      selectedIndex=Optional.of(currentlySelected);
    }
    logger.info("String_Node_Str" + selectedIndex.get());
    onItemSelected.accept(selectedIndex.get());
  }
);
}

Fixed version (ground truth):
private void setupMouseEvents(){
  setOnMouseClicked(e -> {
    int currentlySelected=getSelectionModel().getSelectedIndex();
    if (currentlySelected != -1) {
      selectedIndex=Optional.of(currentlySelected);
      logger.info("String_Node_Str" + selectedIndex.get());
      onItemSelected.accept(selectedIndex.get());
    }
  }
);
}
Program: 135404
Project: 135404
Buggy source:
private boolean satisfiesIsConditions(TurboIssue issue){
  if (!content.isPresent())   return false;
switch (content.get()) {
case "String_Node_Str":
case "String_Node_Str":
    return stateSatisfies(issue);
case "String_Node_Str":
case "String_Node_Str":
  return typeSatisfies(issue);
case "String_Node_Str":
case "String_Node_Str":
return isPullRequest(issue) && !issue.isOpen();
default :
return false;
}
}

Fixed version (ground truth):
private boolean satisfiesIsConditions(TurboIssue issue){
  if (!content.isPresent())   return false;
switch (content.get()) {
case "String_Node_Str":
case "String_Node_Str":
    return stateSatisfies(issue);
case "String_Node_Str":
case "String_Node_Str":
  return typeSatisfies(issue);
case "String_Node_Str":
return isPullRequest(issue) && !issue.isOpen();
case "String_Node_Str":
return isPullRequest(issue) && issue.isOpen();
default :
return false;
}
}
Program: 135405
Project: 135405
Buggy source:
private boolean satisfiesUpdatedHours(TurboIssue issue){
  if (!numberRange.isPresent())   return false;
  long hours=LocalDateTime.now().until(issue.getUpdatedAt(),ChronoUnit.HOURS);
  return numberRange.get().encloses(Utility.safeLongToInt(hours));
}

Fixed version (ground truth):
private boolean satisfiesUpdatedHours(TurboIssue issue){
  if (!numberRange.isPresent())   return false;
  long hours=issue.getUpdatedAt().until(LocalDateTime.now(),ChronoUnit.HOURS);
  return numberRange.get().encloses(Utility.safeLongToInt(hours));
}
Program: 135406
Project: 135406
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(ui,model,that.get(),columnIndex);
      }
 else {
        return null;
      }
    }
  }
);
  listView.setItems(null);
  listView.setItems(getIssueList());
}

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(ui,model,that.get(),columnIndex);
      }
 else {
        return null;
      }
    }
  }
);
  listView.saveSelection();
  listView.setItems(null);
  listView.setItems(getIssueList());
  listView.restoreSelection();
}
Program: 135407
Project: 135407
Buggy source:
/** 
 * Given an issue id, returns the index of that issue's cell in this panel.
 */
private int getIndexOfIssue(int issueId){
}

Fixed version (ground truth):
/** 
 * Given an issue id, returns the index of that issue's cell in this panel.
 */
private Optional<Integer> getIndexOfIssue(int issueId){
}
Program: 135408
Project: 135408
Buggy source:
public IssuePanel(UI ui,Stage mainStage,Model model,ColumnControl parentColumnControl,SidePanel sidePanel,int columnIndex,TurboCommandExecutor dragAndDropExecutor){
  super(ui,mainStage,model,parentColumnControl,sidePanel,columnIndex,dragAndDropExecutor);
  this.mainStage=mainStage;
  this.model=model;
  this.parentColumnControl=parentColumnControl;
  this.columnIndex=columnIndex;
  this.sidePanel=sidePanel;
  this.ui=ui;
  listView=new ListView<>();
  setupListView();
  getChildren().add(listView);
  ui.registerEvent(new IssueSelectedEventHandler(){
    @Override public void handle(    IssueSelectedEvent e){
      selectedId=Optional.of(e.id);
    }
  }
);
  refreshItems();
}

Fixed version (ground truth):
public IssuePanel(UI ui,Stage mainStage,Model model,ColumnControl parentColumnControl,SidePanel sidePanel,int columnIndex,TurboCommandExecutor dragAndDropExecutor){
}
Program: 135409
Project: 135409
Buggy source:
@Override public void deselect(){
  listView.getSelectionModel().clearSelection();
  selectedId=Optional.empty();
}

Fixed version (ground truth):
@Override public void deselect(){
  listView.getSelectionModel().clearSelection();
  selectedId=Optional.empty();
  selectedIndex=-1;
}
Program: 135410
Project: 135410
Buggy source:
private void setupMouseEvents(){
  setOnMouseClicked(e -> {
    logger.info("String_Node_Str" + selectedIndex.get());
    onItemSelected.accept(selectedIndex.get());
  }
);
}

Fixed version (ground truth):
private void setupMouseEvents(){
  setOnMouseClicked(e -> {
    int currentlySelected=getSelectionModel().getSelectedIndex();
    if (currentlySelected != -1) {
      selectedIndex=Optional.of(currentlySelected);
    }
    logger.info("String_Node_Str" + selectedIndex.get());
    onItemSelected.accept(selectedIndex.get());
  }
);
}
Program: 135411
Project: 135411
Buggy source:
private void getUserCredentials(){
  mainStage.close();
  new LoginDialog(mainStage,columns).show().thenApply(success -> {
    if (!success) {
      quit();
    }
 else {
      columns.loadIssues();
      sidePanel.refresh();
      triggerEvent(new LoginEvent());
      setExpandedWidth(false);
    }
    return true;
  }
).exceptionally(e -> {
    logger.error(e.getLocalizedMessage(),e);
    return false;
  }
);
}

Fixed version (ground truth):
private void getUserCredentials(){
  new LoginDialog(mainStage,columns).show().thenApply(success -> {
    if (success) {
      columns.loadIssues();
      sidePanel.refresh();
      triggerEvent(new LoginEvent());
      setExpandedWidth(false);
    }
 else {
      quit();
    }
    return true;
  }
).exceptionally(e -> {
    logger.error(e.getLocalizedMessage(),e);
    return false;
  }
);
}
Program: 135412
Project: 135412
Buggy source:
@Override public void run(){
  list.removeAll(removed);
  newList.stream().forEachOrdered(item -> updateCachedListItem((Listable)item,list));
  dcHandler.writeToFile(issuesETag,collabsETag,labelsETag,milestonesETag,issueCheckTime,collaborators,labels,milestones,issues);
}

Fixed version (ground truth):
@Override public void run(){
  list.removeAll(removed);
  newList.stream().forEachOrdered(item -> updateCachedListItem((Listable)item,list));
  dcHandler.writeToFile(repoId,issuesETag,collabsETag,labelsETag,milestonesETag,issueCheckTime,collaborators,labels,milestones,issues);
}
Program: 135413
Project: 135413
Buggy source:
public void updateCachedLabels(List<Label> ghLabels){
  ArrayList<TurboLabel> newLabels=CollectionUtilities.getHubTurboLabelList(ghLabels);
  updateCachedList(labels,newLabels);
}

Fixed version (ground truth):
public void updateCachedLabels(List<Label> ghLabels,String repoId){
  ArrayList<TurboLabel> newLabels=CollectionUtilities.getHubTurboLabelList(ghLabels);
  updateCachedList(labels,newLabels,repoId);
}
Program: 135414
Project: 135414
Buggy source:
public void loadIssues(List<Issue> ghIssues){
  if (ghIssues != null) {
    enforceStatusStateConsistency(ghIssues);
  }
  Platform.runLater(() -> {
    issues.clear();
    ArrayList<TurboIssue> buffer=CollectionUtilities.getHubTurboIssueList(ghIssues);
    issues.addAll(buffer);
    dcHandler.writeToFile(issuesETag,collabsETag,labelsETag,milestonesETag,issueCheckTime,collaborators,labels,milestones,issues);
  }
);
}

Fixed version (ground truth):
public void loadIssues(List<Issue> ghIssues){
  if (ghIssues != null) {
    enforceStatusStateConsistency(ghIssues);
  }
  Platform.runLater(() -> {
    issues.clear();
    ArrayList<TurboIssue> buffer=CollectionUtilities.getHubTurboIssueList(ghIssues);
    issues.addAll(buffer);
    dcHandler.writeToFile(repoId.toString(),issuesETag,collabsETag,labelsETag,milestonesETag,issueCheckTime,collaborators,labels,milestones,issues);
  }
);
}
Program: 135415
Project: 135415
Buggy source:
public void updateCachedMilestones(List<Milestone> ghMilestones){
  ArrayList<TurboMilestone> newMilestones=CollectionUtilities.getHubTurboMilestoneList(ghMilestones);
  updateCachedList(milestones,newMilestones);
}

Fixed version (ground truth):
public void updateCachedMilestones(List<Milestone> ghMilestones,String repoId){
  ArrayList<TurboMilestone> newMilestones=CollectionUtilities.getHubTurboMilestoneList(ghMilestones);
  updateCachedList(milestones,newMilestones,repoId);
}
Program: 135416
Project: 135416
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);
  Platform.runLater(new Runnable(){
    @Override public void run(){
      list.removeAll(removed);
      newList.stream().forEachOrdered(item -> updateCachedListItem((Listable)item,list));
      dcHandler.writeToFile(issuesETag,collabsETag,labelsETag,milestonesETag,issueCheckTime,collaborators,labels,milestones,issues);
    }
  }
);
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private void updateCachedList(List list,List newList,String repoId){
  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);
      newList.stream().forEachOrdered(item -> updateCachedListItem((Listable)item,list));
      dcHandler.writeToFile(repoId,issuesETag,collabsETag,labelsETag,milestonesETag,issueCheckTime,collaborators,labels,milestones,issues);
    }
  }
);
}
Program: 135417
Project: 135417
Buggy source:
public void updateCachedCollaborators(List<User> ghCollaborators){
  ArrayList<TurboUser> newCollaborators=CollectionUtilities.getHubTurboUserList(ghCollaborators);
  updateCachedList(collaborators,newCollaborators);
}

Fixed version (ground truth):
public void updateCachedCollaborators(List<User> ghCollaborators,String repoId){
  ArrayList<TurboUser> newCollaborators=CollectionUtilities.getHubTurboUserList(ghCollaborators);
  updateCachedList(collaborators,newCollaborators,repoId);
}
Program: 135418
Project: 135418
Buggy source:
public void updateCachedIssues(List<Issue> issueList){
  if (issueList.size() == 0) {
    return;
  }
 else {
    enforceStatusStateConsistency(issueList);
  }
  WeakReference<Model> selfRef=new WeakReference<Model>(this);
  Platform.runLater(new Runnable(){
    @Override public void run(){
      for (int i=issueList.size() - 1; i >= 0; i--) {
        Issue issue=issueList.get(i);
        TurboIssue newCached=new TurboIssue(issue,selfRef.get());
        updateCachedIssue(newCached);
      }
      dcHandler.writeToFile(issuesETag,collabsETag,labelsETag,milestonesETag,issueCheckTime,collaborators,labels,milestones,issues);
    }
  }
);
}

Fixed version (ground truth):
public void updateCachedIssues(List<Issue> issueList,String repoId){
  if (issueList.size() == 0) {
    return;
  }
 else {
    enforceStatusStateConsistency(issueList);
  }
  WeakReference<Model> selfRef=new WeakReference<Model>(this);
  Platform.runLater(new Runnable(){
    @Override public void run(){
      for (int i=issueList.size() - 1; i >= 0; i--) {
        Issue issue=issueList.get(i);
        TurboIssue newCached=new TurboIssue(issue,selfRef.get());
        updateCachedIssue(newCached);
      }
      dcHandler.writeToFile(repoId,issuesETag,collabsETag,labelsETag,milestonesETag,issueCheckTime,collaborators,labels,milestones,issues);
    }
  }
);
}
Program: 135419
Project: 135419
Buggy source:
private void updateModel(){
  updateModelCollaborators();
  updateModelLabels();
  updateModelMilestones();
  updateModelIssues();
  lastUpdateTime=issueUpdateService.lastCheckTime;
}

Fixed version (ground truth):
private void updateModel(IRepositoryIdProvider repoId){
  updateModelCollaborators(repoId);
  updateModelLabels(repoId);
  updateModelMilestones(repoId);
  updateModelIssues(repoId);
  lastUpdateTime=issueUpdateService.lastCheckTime;
}
Program: 135420
Project: 135420
Buggy source:
private void updateModelIssues(){
  List<Issue> updatedIssues=issueUpdateService.getUpdatedItems(model.getRepoId());
  model.updateCachedIssues(updatedIssues);
  model.updateIssuesETag(issueUpdateService.getLastETag());
  model.updateIssueCheckTime(issueUpdateService.getLastIssueCheckTime());
}

Fixed version (ground truth):
private void updateModelIssues(IRepositoryIdProvider repoId){
  if (model.getRepoId().equals(repoId)) {
    List<Issue> updatedIssues=issueUpdateService.getUpdatedItems(repoId);
    model.updateCachedIssues(updatedIssues,repoId.toString());
    model.updateIssuesETag(issueUpdateService.getLastETag());
    model.updateIssueCheckTime(issueUpdateService.getLastIssueCheckTime());
  }
}
Program: 135421
Project: 135421
Buggy source:
private void updateModelMilestones(){
  List<Milestone> milestones=milestoneUpdateService.getUpdatedItems(model.getRepoId());
  model.updateMilestonesETag(milestoneUpdateService.getLastETag());
  if (milestones.size() > 0) {
    model.updateCachedMilestones(milestones);
  }
}

Fixed version (ground truth):
private void updateModelMilestones(IRepositoryIdProvider repoId){
  if (model.getRepoId().equals(repoId)) {
    List<Milestone> milestones=milestoneUpdateService.getUpdatedItems(repoId);
    model.updateMilestonesETag(milestoneUpdateService.getLastETag());
    if (milestones.size() > 0) {
      model.updateCachedMilestones(milestones,repoId.toString());
    }
  }
}
Program: 135422
Project: 135422
Buggy source:
private void updateModelCollaborators(){
  List<User> collaborators=collaboratorUpdateService.getUpdatedItems(model.getRepoId());
  model.updateCollabsETag(collaboratorUpdateService.getLastETag());
  if (collaborators.size() > 0) {
    model.updateCachedCollaborators(collaborators);
  }
}

Fixed version (ground truth):
private void updateModelCollaborators(IRepositoryIdProvider repoId){
  if (model.getRepoId().equals(repoId)) {
    List<User> collaborators=collaboratorUpdateService.getUpdatedItems(repoId);
    model.updateCollabsETag(collaboratorUpdateService.getLastETag());
    if (collaborators.size() > 0) {
      model.updateCachedCollaborators(collaborators,repoId.toString());
    }
  }
}
Program: 135423
Project: 135423
Buggy source:
private void updateModelLabels(){
  List<Label> labels=labelUpdateService.getUpdatedItems(model.getRepoId());
  model.updateLabelsETag(labelUpdateService.getLastETag());
  if (labels.size() > 0) {
    model.updateCachedLabels(labels);
  }
}

Fixed version (ground truth):
private void updateModelLabels(IRepositoryIdProvider repoId){
  if (model.getRepoId().equals(repoId)) {
    List<Label> labels=labelUpdateService.getUpdatedItems(repoId);
    model.updateLabelsETag(labelUpdateService.getLastETag());
    if (labels.size() > 0) {
      model.updateCachedLabels(labels,repoId.toString());
    }
  }
}