nus-yam/ex-repair huggingface dataset:
Program: 135424
Project: 135424
Buggy source:
public void startModelUpdate(){
  if (pollTimer != null) {
    stopModelUpdate();
  }
  pollTimer=new Timer();
  TimerTask pollTask=new TimerTask(){
    @Override public void run(){
      updateModel();
      UIReference.getInstance().getUI().triggerEvent(new RefreshDoneEvent());
    }
  }
;
  pollTimer.scheduleAtFixedRate(pollTask,0,pollInterval);
  stopwatch=new Timer();
  TimerTask countdown=new TimerTask(){
    @Override public void run(){
      StatusBar.displayMessage("String_Node_Str" + getTime());
    }
  }
;
  stopwatch.scheduleAtFixedRate(countdown,0,stopwatchInterval);
}

Fixed version (ground truth):
public void startModelUpdate(){
  if (pollTimer != null) {
    stopModelUpdate();
  }
  pollTimer=new Timer();
  final IRepositoryIdProvider repoId=model.getRepoId();
  TimerTask pollTask=new TimerTask(){
    @Override public void run(){
      updateModel(repoId);
      UIReference.getInstance().getUI().triggerEvent(new RefreshDoneEvent());
    }
  }
;
  pollTimer.scheduleAtFixedRate(pollTask,0,pollInterval);
  stopwatch=new Timer();
  TimerTask countdown=new TimerTask(){
    @Override public void run(){
      StatusBar.displayMessage("String_Node_Str" + getTime());
    }
  }
;
  stopwatch.scheduleAtFixedRate(countdown,0,stopwatchInterval);
}
Program: 135425
Project: 135425
Buggy source:
public void writeToFile(String issuesETag,String collabsETag,String labelsETag,String milestonesETag,String issueCheckTime,ObservableList<TurboUser> collaborators,ObservableList<TurboLabel> labels,ObservableList<TurboMilestone> milestones,ObservableList<TurboIssue> issues){
  this.issues=issues.stream().collect(Collectors.toList());
  this.collaborators=collaborators.stream().collect(Collectors.toList());
  this.labels=labels.stream().collect(Collectors.toList());
  this.milestones=milestones.stream().collect(Collectors.toList());
  TurboRepoData currentRepoData=new TurboRepoData(issuesETag,collabsETag,labelsETag,milestonesETag,issueCheckTime,this.collaborators,this.labels,this.milestones,this.issues);
  Gson gson=new GsonBuilder().setPrettyPrinting().create();
  String json=gson.toJson(currentRepoData);
  try {
    FileWriter writer=new FileWriter(getFileName(FILE_DATA_CACHE_TEMP));
    writer.write(json);
    writer.close();
    File file=new File(getFileName(FILE_DATA_CACHE));
    if (file.exists()) {
      if (file.delete()) {
      }
 else {
        logger.error("String_Node_Str");
      }
    }
    File newFile=new File(getFileName(FILE_DATA_CACHE_TEMP));
    if (newFile.renameTo(file)) {
    }
 else {
      logger.error("String_Node_Str");
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void writeToFile(String repoIdString,String issuesETag,String collabsETag,String labelsETag,String milestonesETag,String issueCheckTime,ObservableList<TurboUser> collaborators,ObservableList<TurboLabel> labels,ObservableList<TurboMilestone> milestones,ObservableList<TurboIssue> issues){
  this.issues=issues.stream().collect(Collectors.toList());
  this.collaborators=collaborators.stream().collect(Collectors.toList());
  this.labels=labels.stream().collect(Collectors.toList());
  this.milestones=milestones.stream().collect(Collectors.toList());
  TurboRepoData currentRepoData=new TurboRepoData(issuesETag,collabsETag,labelsETag,milestonesETag,issueCheckTime,this.collaborators,this.labels,this.milestones,this.issues);
  Gson gson=new GsonBuilder().setPrettyPrinting().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()) {
      if (file.delete()) {
      }
 else {
        logger.error("String_Node_Str");
      }
    }
    File newFile=new File(getFileName(FILE_DATA_CACHE_TEMP,repoIdString));
    if (newFile.renameTo(file)) {
    }
 else {
      logger.error("String_Node_Str");
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 135426
Project: 135426
Buggy source:
public void readFromFile(){
  Gson gson=new Gson();
  try {
    BufferedReader bufferedReader=new BufferedReader(new FileReader(getFileName(FILE_DATA_CACHE)));
    repo=gson.fromJson(bufferedReader,TurboRepoData.class);
    bufferedReader.close();
  }
 catch (  FileNotFoundException e) {
  }
catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void readFromFile(){
  Gson gson=new Gson();
  try {
    BufferedReader bufferedReader=new BufferedReader(new FileReader(getFileName(FILE_DATA_CACHE,this.repoId)));
    repo=gson.fromJson(bufferedReader,TurboRepoData.class);
    bufferedReader.close();
  }
 catch (  FileNotFoundException e) {
  }
catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 135427
Project: 135427
Buggy source:
private String getFileName(String givenFileName){
  String[] repoIdTokens=repoId.split("String_Node_Str");
  String repoFileName=repoIdTokens[0] + "String_Node_Str" + repoIdTokens[1];
  return DIR_CACHE + File.separator + repoFileName+ givenFileName;
}

Fixed version (ground truth):
private String getFileName(String givenFileName,String repoIdString){
  String[] repoIdTokens=repoIdString.split("String_Node_Str");
  String repoFileName=repoIdTokens[0] + "String_Node_Str" + repoIdTokens[1];
  return DIR_CACHE + File.separator + repoFileName+ givenFileName;
}
Program: 135428
Project: 135428
Buggy source:
@Override public String toString(){
}

Fixed version (ground truth):
/** 
 * This method is used to serialise predicates. Thus whatever form returned should be syntactically valid.
 */
@Override public String toString(){
}
Program: 135429
Project: 135429
Buggy source:
public boolean encloses(LocalDate date){
  if (start == null) {
    return date.isBefore(start) && (!strictly || !date.isEqual(start));
  }
 else   if (end == null) {
    return date.isAfter(start) && (!strictly || !date.isEqual(end));
  }
 else {
    return date.isAfter(start) && date.isBefore(end) && (!strictly || (!date.isEqual(start) && !date.isEqual(end)));
  }
}

Fixed version (ground truth):
public boolean encloses(LocalDate date){
  if (start == null) {
    return date.isBefore(end) || (!strictly && date.isEqual(end));
  }
 else   if (end == null) {
    return date.isAfter(start) || (!strictly && date.isEqual(start));
  }
 else {
    return date.isAfter(start) && date.isBefore(end) || (!strictly && (date.isEqual(start) || date.isEqual(end)));
  }
}
Program: 135430
Project: 135430
Buggy source:
@Override public void run(){
  list.removeAll(removed);
  newList.stream().forEachOrdered(item -> updateCachedListItem((Listable)item,list));
}

Fixed version (ground truth):
@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);
}
Program: 135431
Project: 135431
Buggy source:
public void updateCachedLabels(List<Label> ghLabels){
  ArrayList<TurboLabel> newLabels=CollectionUtilities.getHubTurboLabelList(ghLabels);
  updateCachedList(labels,newLabels);
  dcHandler.writeToFile(issuesETag,collabsETag,labelsETag,milestonesETag,collaborators,labels,milestones,issues);
}

Fixed version (ground truth):
public void updateCachedLabels(List<Label> ghLabels){
  ArrayList<TurboLabel> newLabels=CollectionUtilities.getHubTurboLabelList(ghLabels);
  updateCachedList(labels,newLabels);
}
Program: 135432
Project: 135432
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,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(issuesETag,collabsETag,labelsETag,milestonesETag,issueCheckTime,collaborators,labels,milestones,issues);
  }
);
}
Program: 135433
Project: 135433
Buggy source:
public void updateCachedMilestones(List<Milestone> ghMilestones){
  ArrayList<TurboMilestone> newMilestones=CollectionUtilities.getHubTurboMilestoneList(ghMilestones);
  updateCachedList(milestones,newMilestones);
  dcHandler.writeToFile(issuesETag,collabsETag,labelsETag,milestonesETag,collaborators,labels,milestones,issues);
}

Fixed version (ground truth):
public void updateCachedMilestones(List<Milestone> ghMilestones){
  ArrayList<TurboMilestone> newMilestones=CollectionUtilities.getHubTurboMilestoneList(ghMilestones);
  updateCachedList(milestones,newMilestones);
}
Program: 135434
Project: 135434
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));
    }
  }
);
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private void updateCachedList(List list,List newList){
  HashMap<String,HashSet> changes=CollectionUtilities.getChangesToList(list,newList);
  HashSet removed=changes.get(CollectionUtilities.REMOVED_TAG);
  Platform.runLater(new Runnable(){
    @Override public void run(){
      list.removeAll(removed);
      newList.stream().forEachOrdered(item -> updateCachedListItem((Listable)item,list));
      dcHandler.writeToFile(issuesETag,collabsETag,labelsETag,milestonesETag,issueCheckTime,collaborators,labels,milestones,issues);
    }
  }
);
}
Program: 135435
Project: 135435
Buggy source:
public void updateCachedCollaborators(List<User> ghCollaborators){
  ArrayList<TurboUser> newCollaborators=CollectionUtilities.getHubTurboUserList(ghCollaborators);
  updateCachedList(collaborators,newCollaborators);
  dcHandler.writeToFile(issuesETag,collabsETag,labelsETag,milestonesETag,collaborators,labels,milestones,issues);
}

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

Fixed version (ground truth):
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);
    }
  }
);
}
Program: 135438
Project: 135438
Buggy source:
public void setupAndStartModelUpdate(){
  if (modelUpdater != null) {
    stopModelUpdate();
  }
  if (repoId != null) {
    modelUpdater=new ModelUpdater(githubClient,model,issuesETag,collabsETag,labelsETag,milestonesETag);
    modelUpdater.startModelUpdate();
  }
}

Fixed version (ground truth):
public void setupAndStartModelUpdate(){
  if (modelUpdater != null) {
    stopModelUpdate();
  }
  if (repoId != null) {
    modelUpdater=new ModelUpdater(githubClient,model,issuesETag,collabsETag,labelsETag,milestonesETag,issueCheckTime);
    modelUpdater.startModelUpdate();
  }
}
Program: 135439
Project: 135439
Buggy source:
public IssueUpdateService(GitHubClientExtended client,String issuesETag){
  super(client);
  apiSuffix=SEGMENT_ISSUES;
  super.setLastETag(issuesETag);
  lastCheckTime=new Date();
}

Fixed version (ground truth):
public IssueUpdateService(GitHubClientExtended client,String issuesETag,String lastIssueCheckTime){
  super(client);
  apiSuffix=SEGMENT_ISSUES;
  super.setLastETag(issuesETag);
  lastCheckTime=new Date();
  super.setLastIssueCheckTime(lastIssueCheckTime);
}
Program: 135440
Project: 135440
Buggy source:
private void updateModel(){
  updateModelIssues();
  updateModelCollaborators();
  updateModelLabels();
  updateModelMilestones();
  lastUpdateTime=issueUpdateService.lastCheckTime;
}

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

Fixed version (ground truth):
private void updateModelIssues(){
  List<Issue> updatedIssues=issueUpdateService.getUpdatedItems(model.getRepoId());
  model.updateCachedIssues(updatedIssues);
  model.updateIssuesETag(issueUpdateService.getLastETag());
  model.updateIssueCheckTime(issueUpdateService.getLastIssueCheckTime());
}
Program: 135442
Project: 135442
Buggy source:
public ModelUpdater(GitHubClientExtended client,Model model,String issuesETag,String collabsETag,String labelsETag,String milestonesETag){
  this.model=model;
  this.issueUpdateService=new IssueUpdateService(client,issuesETag);
  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,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);
}
Program: 135443
Project: 135443
Buggy source:
public ArrayList<T> getUpdatedItems(IRepositoryIdProvider repoId){
  ArrayList<T> result=new ArrayList<T>();
  try {
    PagedRequest<T> request=createUpdatedRequest(repoId);
    if (apiSuffix == "String_Node_Str") {
      Map<String,String> temp=request.getParams();
      temp.remove("String_Node_Str");
      request.setParams(temp);
    }
    PageIterator<T> requestIterator=new PageIterator<T>(request,client);
    HttpURLConnection connection=createUpdatedConnection(request);
    int responseCode=connection.getResponseCode();
    System.out.println(responseCode);
    if (client.isError(responseCode)) {
      return new ArrayList<T>();
    }
    if (responseCode != GitHubClientExtended.NO_UPDATE_RESPONSE_CODE) {
      result=(ArrayList<T>)getAll(requestIterator);
    }
    updateLastETag(connection);
    updateLastCheckTime(connection);
  }
 catch (  IOException e) {
    if (!(e instanceof UnknownHostException || e instanceof SocketTimeoutException)) {
      logger.error(e.getLocalizedMessage(),e);
    }
  }
catch (  ParseException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
  return result;
}

Fixed version (ground truth):
public ArrayList<T> getUpdatedItems(IRepositoryIdProvider repoId){
  ArrayList<T> result=new ArrayList<T>();
  try {
    PagedRequest<T> request=createUpdatedRequest(repoId);
    if (apiSuffix == SUFFIX_ISSUES) {
      Map<String,String> temp=request.getParams();
      if (lastIssueCheckTime == null) {
        temp.remove(SINCE);
        request.setParams(temp);
      }
 else {
        temp.put(SINCE,lastIssueCheckTime);
        request.setParams(temp);
      }
    }
    PageIterator<T> requestIterator=new PageIterator<T>(request,client);
    HttpURLConnection connection=createUpdatedConnection(request);
    int responseCode=connection.getResponseCode();
    System.out.println(responseCode);
    if (client.isError(responseCode)) {
      return new ArrayList<T>();
    }
    if (responseCode != GitHubClientExtended.NO_UPDATE_RESPONSE_CODE) {
      result=(ArrayList<T>)getAll(requestIterator);
    }
    updateLastETag(connection);
    updateLastCheckTime(connection);
  }
 catch (  IOException e) {
    if (!(e instanceof UnknownHostException || e instanceof SocketTimeoutException)) {
      logger.error(e.getLocalizedMessage(),e);
    }
  }
catch (  ParseException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
  return result;
}
Program: 135444
Project: 135444
Buggy source:
private void updateLastCheckTime(HttpURLConnection connection) throws ParseException {
  String date=connection.getHeaderField("String_Node_Str");
  lastCheckTime=new SimpleDateFormat("String_Node_Str").parse(date);
}

Fixed version (ground truth):
private void updateLastCheckTime(HttpURLConnection connection) throws ParseException {
  String date=connection.getHeaderField("String_Node_Str");
  lastCheckTime=new SimpleDateFormat("String_Node_Str").parse(date);
  if (apiSuffix == SUFFIX_ISSUES) {
    lastIssueCheckTime=getFormattedDate(lastCheckTime);
  }
}
Program: 135445
Project: 135445
Buggy source:
public void writeToFile(String issuesETag,String collabsETag,String labelsETag,String milestonesETag,ObservableList<TurboUser> collaborators,ObservableList<TurboLabel> labels,ObservableList<TurboMilestone> milestones,ObservableList<TurboIssue> issues){
  this.issues=issues.stream().collect(Collectors.toList());
  this.collaborators=collaborators.stream().collect(Collectors.toList());
  this.labels=labels.stream().collect(Collectors.toList());
  this.milestones=milestones.stream().collect(Collectors.toList());
  TurboRepoData currentRepoData=new TurboRepoData(issuesETag,collabsETag,labelsETag,milestonesETag,this.collaborators,this.labels,this.milestones,this.issues);
  Gson gson=new GsonBuilder().setPrettyPrinting().create();
  String json=gson.toJson(currentRepoData);
  try {
    FileWriter writer=new FileWriter(getFileName(FILE_DATA_CACHE_TEMP));
    writer.write(json);
    writer.close();
    File file=new File(getFileName(FILE_DATA_CACHE));
    if (file.exists()) {
      if (file.delete()) {
      }
 else {
        logger.error("String_Node_Str");
      }
    }
    File newFile=new File(getFileName(FILE_DATA_CACHE_TEMP));
    if (newFile.renameTo(file)) {
    }
 else {
      logger.error("String_Node_Str");
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void writeToFile(String issuesETag,String collabsETag,String labelsETag,String milestonesETag,String issueCheckTime,ObservableList<TurboUser> collaborators,ObservableList<TurboLabel> labels,ObservableList<TurboMilestone> milestones,ObservableList<TurboIssue> issues){
  this.issues=issues.stream().collect(Collectors.toList());
  this.collaborators=collaborators.stream().collect(Collectors.toList());
  this.labels=labels.stream().collect(Collectors.toList());
  this.milestones=milestones.stream().collect(Collectors.toList());
  TurboRepoData currentRepoData=new TurboRepoData(issuesETag,collabsETag,labelsETag,milestonesETag,issueCheckTime,this.collaborators,this.labels,this.milestones,this.issues);
  Gson gson=new GsonBuilder().setPrettyPrinting().create();
  String json=gson.toJson(currentRepoData);
  try {
    FileWriter writer=new FileWriter(getFileName(FILE_DATA_CACHE_TEMP));
    writer.write(json);
    writer.close();
    File file=new File(getFileName(FILE_DATA_CACHE));
    if (file.exists()) {
      if (file.delete()) {
      }
 else {
        logger.error("String_Node_Str");
      }
    }
    File newFile=new File(getFileName(FILE_DATA_CACHE_TEMP));
    if (newFile.renameTo(file)) {
    }
 else {
      logger.error("String_Node_Str");
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 135446
Project: 135446
Buggy source:
public TurboRepoData(String issuesETag,String collabsETag,String labelsETag,String milestonesETag,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.collaborators=collaborators;
  this.labels=new ArrayList<TurboSerializableLabel>();
  for (  TurboLabel label : labels) {
    this.labels.add(new TurboSerializableLabel(label));
  }
  this.milestones=new ArrayList<TurboSerializableMilestone>();
  for (  TurboMilestone milestone : milestones) {
    this.milestones.add(new TurboSerializableMilestone(milestone));
  }
  this.issues=new ArrayList<TurboSerializableIssue>();
  for (  TurboIssue issue : issues) {
    this.issues.add(new TurboSerializableIssue(issue));
  }
}

Fixed version (ground truth):
public TurboRepoData(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<TurboSerializableLabel>();
  for (  TurboLabel label : labels) {
    this.labels.add(new TurboSerializableLabel(label));
  }
  this.milestones=new ArrayList<TurboSerializableMilestone>();
  for (  TurboMilestone milestone : milestones) {
    this.milestones.add(new TurboSerializableMilestone(milestone));
  }
  this.issues=new ArrayList<TurboSerializableIssue>();
  for (  TurboIssue issue : issues) {
    this.issues.add(new TurboSerializableIssue(issue));
  }
}
Program: 135447
Project: 135447
Buggy source:
/** 
 * Controls whether or not the main window is expanded (occupying the whole screen) or not (occupying a percentage).
 * @param expanded
 */
private void setExpandedWidth(boolean expanded){
  this.expanded=expanded;
  Rectangle dimensions=getDimensions();
  double width=expanded ? dimensions.getWidth() : dimensions.getWidth() * WINDOW_DEFAULT_PROPORTION;
  mainStage.setMinWidth(sidePanel.getWidth() + columns.getColumnWidth());
  mainStage.setMinHeight(dimensions.getHeight());
  mainStage.setMaxWidth(width);
  mainStage.setMaxHeight(dimensions.getHeight());
  mainStage.setX(0);
  mainStage.setY(0);
  Platform.runLater(() -> {
    mainStage.setMaxWidth(dimensions.getWidth());
  }
);
}

Fixed version (ground truth):
/** 
 * Controls whether or not the main window is expanded (occupying the whole screen) or not (occupying a percentage).
 * @param expanded
 */
private void setExpandedWidth(boolean expanded){
  this.expanded=expanded;
  Rectangle dimensions=getDimensions();
  double width=expanded ? dimensions.getWidth() : dimensions.getWidth() * WINDOW_DEFAULT_PROPORTION;
  mainStage.setMinWidth(sidePanel.getWidth() + columns.getColumnWidth());
  mainStage.setMinHeight(dimensions.getHeight());
  mainStage.setMaxWidth(width);
  mainStage.setMaxHeight(dimensions.getHeight());
  mainStage.setX(0);
  mainStage.setY(0);
  Platform.runLater(() -> {
    mainStage.setMaxWidth(dimensions.getWidth());
    browserComponent.resize(mainStage.getWidth());
  }
);
}
Program: 135448
Project: 135448
Buggy source:
private Node tabLayout(){
  VBox everything=new VBox();
  TabPane tabs=new TabPane();
  if (labelsTab == null) {
    labelsTab=createLabelsTab();
  }
  if (milestonesTab == null) {
    milestonesTab=createMilestonesTab();
  }
  if (assigneesTab == null) {
    assigneesTab=createCollaboratorsTab();
  }
  tabs.getTabs().addAll(labelsTab,milestonesTab,assigneesTab);
  if (repoFields == null) {
    repoFields=createRepoFields();
  }
  everything.getChildren().addAll(repoFields,tabs);
  everything.setPrefWidth(PANEL_PREF_WIDTH);
  return everything;
}

Fixed version (ground truth):
private Node tabLayout(){
  VBox everything=new VBox();
  tabs=new TabPane();
  if (labelsTab == null) {
    labelsTab=createLabelsTab();
  }
  if (milestonesTab == null) {
    milestonesTab=createMilestonesTab();
  }
  if (assigneesTab == null) {
    assigneesTab=createCollaboratorsTab();
  }
  tabs.getTabs().addAll(labelsTab,milestonesTab,assigneesTab);
  selectionModel=tabs.getSelectionModel();
  if (repoFields == null) {
    repoFields=createRepoFields();
  }
  everything.getChildren().addAll(repoFields,tabs);
  everything.setPrefWidth(PANEL_PREF_WIDTH);
  return everything;
}
Program: 135449
Project: 135449
Buggy source:
public void startModelUpdate(){
  if (pollTimer != null) {
    stopModelUpdate();
  }
  pollTimer=new Timer();
  TimerTask pollTask=new TimerTask(){
    @Override public void run(){
      updateModel();
    }
  }
;
  pollTimer.scheduleAtFixedRate(pollTask,0,pollInterval);
  stopwatch=new Timer();
  TimerTask countdown=new TimerTask(){
    @Override public void run(){
      StatusBar.displayMessage("String_Node_Str" + getTime());
    }
  }
;
  stopwatch.scheduleAtFixedRate(countdown,0,stopwatchInterval);
}

Fixed version (ground truth):
public void startModelUpdate(){
  if (pollTimer != null) {
    stopModelUpdate();
  }
  pollTimer=new Timer();
  TimerTask pollTask=new TimerTask(){
    @Override public void run(){
      updateModel();
      UIReference.getInstance().getUI().triggerEvent(new RefreshDoneEvent());
    }
  }
;
  pollTimer.scheduleAtFixedRate(pollTask,0,pollInterval);
  stopwatch=new Timer();
  TimerTask countdown=new TimerTask(){
    @Override public void run(){
      StatusBar.displayMessage("String_Node_Str" + getTime());
    }
  }
;
  stopwatch.scheduleAtFixedRate(countdown,0,stopwatchInterval);
}
Program: 135450
Project: 135450
Buggy source:
private Parent createRoot() throws IOException {
  sidePanel=new SidePanel(this,mainStage,ServiceManager.getInstance().getModel());
  columns=new ColumnControl(this,mainStage,ServiceManager.getInstance().getModel(),sidePanel);
  sidePanel.setColumns(columns);
  ScrollPane columnsScroll=new ScrollPane(columns);
  columnsScroll.getStyleClass().add("String_Node_Str");
  columnsScroll.setFitToHeight(true);
  columnsScroll.setVbarPolicy(ScrollBarPolicy.NEVER);
  HBox.setHgrow(columnsScroll,Priority.ALWAYS);
  menuBar=new MenuControl(this,columns,columnsScroll);
  HBox centerContainer=new HBox();
  centerContainer.setPadding(new Insets(5,0,5,0));
  centerContainer.getChildren().addAll(sidePanel.getControlLabel(),columnsScroll);
  BorderPane root=new BorderPane();
  root.setTop(menuBar);
  root.setLeft(sidePanel);
  root.setCenter(centerContainer);
  root.setBottom(StatusBar.getInstance());
  return root;
}

Fixed version (ground truth):
private Parent createRoot() throws IOException {
  sidePanel=new SidePanel(this,mainStage,ServiceManager.getInstance().getModel());
  columns=new ColumnControl(this,mainStage,ServiceManager.getInstance().getModel(),sidePanel);
  sidePanel.setColumns(columns);
  UIReference.getInstance().setUI(this);
  ScrollPane columnsScroll=new ScrollPane(columns);
  columnsScroll.getStyleClass().add("String_Node_Str");
  columnsScroll.setFitToHeight(true);
  columnsScroll.setVbarPolicy(ScrollBarPolicy.NEVER);
  HBox.setHgrow(columnsScroll,Priority.ALWAYS);
  menuBar=new MenuControl(this,columns,columnsScroll);
  HBox centerContainer=new HBox();
  centerContainer.setPadding(new Insets(5,0,5,0));
  centerContainer.getChildren().addAll(sidePanel.getControlLabel(),columnsScroll);
  BorderPane root=new BorderPane();
  root.setTop(menuBar);
  root.setLeft(sidePanel);
  root.setCenter(centerContainer);
  root.setBottom(StatusBar.getInstance());
  return root;
}
Program: 135451
Project: 135451
Buggy source:
public ColumnControl(UI ui,Stage stage,Model model,SidePanel sidePanel){
  this.ui=ui;
  this.stage=stage;
  this.model=model;
  this.sidePanel=sidePanel;
  this.dragAndDropExecutor=new TurboCommandExecutor();
  this.uiBrowserBridge=new UIBrowserBridge(ui);
  setSpacing(10);
  setPadding(new Insets(0,10,0,10));
  setupModelChangeResponse();
}

Fixed version (ground truth):
public ColumnControl(UI ui,Stage stage,Model model,SidePanel sidePanel){
  this.ui=ui;
  this.stage=stage;
  this.model=model;
  this.sidePanel=sidePanel;
  this.dragAndDropExecutor=new TurboCommandExecutor();
  this.uiBrowserBridge=new UIBrowserBridge(ui);
  setSpacing(10);
  setPadding(new Insets(0,10,0,10));
  setupModelChangeResponse();
  ui.registerEvent(new RefreshDoneEventHandler(){
    @Override public void handle(    RefreshDoneEvent e){
      Platform.runLater(() -> {
        refresh();
      }
);
    }
  }
);
}
Program: 135454
Project: 135454
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public void loadComponents(IRepositoryIdProvider repoId,HashMap<String,List> ghResources){
  this.repoId=repoId;
  StatusBar.displayMessage(MESSAGE_LOADING_PROJECT_CONFIG);
  DataManager.getInstance().loadProjectConfig(getRepoId());
  cachedGithubComments=new ConcurrentHashMap<Integer,List<Comment>>();
  boolean isTurboResource=false;
  if (ghResources.get(ServiceManager.KEY_COLLABORATORS) != null) {
    if (ghResources.get(ServiceManager.KEY_COLLABORATORS).get(0).getClass() == TurboUser.class) {
      isTurboResource=true;
    }
  }
  if (isTurboResource) {
    StatusBar.displayMessage(MESSAGE_LOADING_COLLABS);
    loadTurboCollaborators((List<TurboUser>)ghResources.get(ServiceManager.KEY_COLLABORATORS));
    StatusBar.displayMessage(MESSAGE_LOADING_LABELS);
    loadTurboLabels((List<TurboLabel>)ghResources.get(ServiceManager.KEY_LABELS));
    StatusBar.displayMessage(MESSAGE_LOADING_MILESTONES);
    loadTurboMilestones((List<TurboMilestone>)ghResources.get(ServiceManager.KEY_MILESTONES));
    Platform.runLater(() -> {
      List<TurboIssue> issues=dcHandler.getRepo().getIssues(ServiceManager.getInstance().getModel());
      StatusBar.displayMessage(MESSAGE_LOADING_ISSUES);
      loadTurboIssues(issues);
    }
);
  }
 else {
    StatusBar.displayMessage(MESSAGE_LOADING_COLLABS);
    loadCollaborators((List<User>)ghResources.get(ServiceManager.KEY_COLLABORATORS));
    StatusBar.displayMessage(MESSAGE_LOADING_LABELS);
    loadLabels((List<Label>)ghResources.get(ServiceManager.KEY_LABELS));
    StatusBar.displayMessage(MESSAGE_LOADING_MILESTONES);
    loadMilestones((List<Milestone>)ghResources.get(ServiceManager.KEY_MILESTONES));
    StatusBar.displayMessage(MESSAGE_LOADING_ISSUES);
    loadIssues((List<Issue>)ghResources.get(ServiceManager.KEY_ISSUES));
  }
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public void loadComponents(IRepositoryIdProvider repoId,HashMap<String,List> resources){
  this.repoId=repoId;
  StatusBar.displayMessage(MESSAGE_LOADING_PROJECT_CONFIG);
  DataManager.getInstance().loadProjectConfig(getRepoId());
  cachedGithubComments=new ConcurrentHashMap<Integer,List<Comment>>();
  boolean isTurboResource=false;
  if (resources.get(ServiceManager.KEY_COLLABORATORS) != null) {
    if (resources.get(ServiceManager.KEY_COLLABORATORS).get(0).getClass() == TurboUser.class) {
      isTurboResource=true;
    }
  }
  if (isTurboResource) {
    loadTurboResources(resources);
  }
 else {
    StatusBar.displayMessage(MESSAGE_LOADING_COLLABS);
    loadCollaborators((List<User>)resources.get(ServiceManager.KEY_COLLABORATORS));
    StatusBar.displayMessage(MESSAGE_LOADING_LABELS);
    loadLabels((List<Label>)resources.get(ServiceManager.KEY_LABELS));
    StatusBar.displayMessage(MESSAGE_LOADING_MILESTONES);
    loadMilestones((List<Milestone>)resources.get(ServiceManager.KEY_MILESTONES));
    StatusBar.displayMessage(MESSAGE_LOADING_ISSUES);
    loadIssues((List<Issue>)resources.get(ServiceManager.KEY_ISSUES));
  }
}
Program: 135455
Project: 135455
Buggy source:
public void loadTurboCollaborators(List<TurboUser> list){
  Platform.runLater(() -> {
    collaborators.clear();
    collaborators.addAll(list);
  }
);
}

Fixed version (ground truth):
public void loadTurboCollaborators(List<TurboUser> list){
  collaborators.clear();
  collaborators.addAll(list);
}
Program: 135456
Project: 135456
Buggy source:
public void loadTurboIssues(List<TurboIssue> list){
  Platform.runLater(() -> {
    issues.clear();
    issues.addAll(list);
  }
);
}

Fixed version (ground truth):
public void loadTurboIssues(List<TurboIssue> list){
  issues.clear();
  issues.addAll(list);
}
Program: 135457
Project: 135457
Buggy source:
public void loadTurboMilestones(List<TurboMilestone> list){
  Platform.runLater(() -> {
    milestones.clear();
    milestones.addAll(list);
  }
);
}

Fixed version (ground truth):
public void loadTurboMilestones(List<TurboMilestone> list){
  milestones.clear();
  milestones.addAll(list);
}
Program: 135458
Project: 135458
Buggy source:
public void loadTurboLabels(List<TurboLabel> list){
  Platform.runLater(() -> {
    labels.clear();
    labels.addAll(list);
  }
);
}

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

Fixed version (ground truth):
public void updateCachedIssues(List<Issue> issueList){
  if (issueList.size() == 0) {
    return;
  }
  WeakReference<Model> selfRef=new WeakReference<Model>(this);
  for (int i=issueList.size() - 1; i >= 0; i--) {
    Issue issue=issueList.get(i);
    Platform.runLater(new Runnable(){
      @Override public void run(){
        TurboIssue newCached=new TurboIssue(issue,selfRef.get());
        updateCachedIssue(newCached);
      }
    }
);
  }
  DataCacheFileHandler.getInstance().writeToFile(repoId.toString(),issuesETag,collabsETag,labelsETag,milestonesETag,collaborators,labels,milestones,issues);
}
Program: 135461
Project: 135461
Buggy source:
public void updateCachedIssue(TurboIssue issue){
  TurboIssue tIssue=getIssueWithId(issue.getId());
  if (tIssue != null) {
    tIssue.copyValues(issue);
  }
 else {
    issues.add(0,issue);
  }
  DataCacheFileHandler.getInstance().writeToFile(repoId.toString(),issuesETag,collabsETag,labelsETag,milestonesETag,collaborators,labels,milestones,issues);
}

Fixed version (ground truth):
public void updateCachedIssue(TurboIssue issue){
  TurboIssue tIssue=getIssueWithId(issue.getId());
  if (tIssue != null) {
    tIssue.copyValues(issue);
  }
 else {
    issues.add(0,issue);
  }
}
Program: 135462
Project: 135462
Buggy source:
public ArrayList<T> getUpdatedItems(IRepositoryIdProvider repoId){
  ArrayList<T> result=new ArrayList<T>();
  try {
    PagedRequest<T> request=createUpdatedRequest(repoId);
    PageIterator<T> requestIterator=new PageIterator<T>(request,client);
    HttpURLConnection connection=createUpdatedConnection(request);
    int responseCode=connection.getResponseCode();
    System.out.println(responseCode);
    if (client.isError(responseCode)) {
      return new ArrayList<T>();
    }
    if (responseCode != GitHubClientExtended.NO_UPDATE_RESPONSE_CODE) {
      result=(ArrayList<T>)getAll(requestIterator);
    }
    updateLastETag(connection);
    updateLastCheckTime(connection);
  }
 catch (  IOException e) {
    if (!(e instanceof UnknownHostException || e instanceof SocketTimeoutException)) {
      logger.error(e.getLocalizedMessage(),e);
    }
  }
catch (  ParseException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
  return result;
}

Fixed version (ground truth):
public ArrayList<T> getUpdatedItems(IRepositoryIdProvider repoId){
  ArrayList<T> result=new ArrayList<T>();
  try {
    PagedRequest<T> request=createUpdatedRequest(repoId);
    if (apiSuffix == "String_Node_Str") {
      Map<String,String> temp=request.getParams();
      temp.remove("String_Node_Str");
      request.setParams(temp);
    }
    PageIterator<T> requestIterator=new PageIterator<T>(request,client);
    HttpURLConnection connection=createUpdatedConnection(request);
    int responseCode=connection.getResponseCode();
    System.out.println(responseCode);
    if (client.isError(responseCode)) {
      return new ArrayList<T>();
    }
    if (responseCode != GitHubClientExtended.NO_UPDATE_RESPONSE_CODE) {
      result=(ArrayList<T>)getAll(requestIterator);
    }
    updateLastETag(connection);
    updateLastCheckTime(connection);
  }
 catch (  IOException e) {
    if (!(e instanceof UnknownHostException || e instanceof SocketTimeoutException)) {
      logger.error(e.getLocalizedMessage(),e);
    }
  }
catch (  ParseException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
  return result;
}
Program: 135463
Project: 135463
Buggy source:
@SuppressWarnings("String_Node_Str") public void writeToFile(String repoId,String issuesETag,String collabsETag,String labelsETag,String milestonesETag,ObservableList<TurboUser> collaborators,ObservableList<TurboLabel> labels,ObservableList<TurboMilestone> milestones,ObservableList<TurboIssue> issues){
  System.out.println("String_Node_Str");
  this.issues=issues.stream().collect(Collectors.toList());
  this.collaborators=collaborators.stream().collect(Collectors.toList());
  this.labels=labels.stream().collect(Collectors.toList());
  this.milestones=milestones.stream().collect(Collectors.toList());
  TurboRepoData currentRepoData=new TurboRepoData(repoId,issuesETag,collabsETag,labelsETag,milestonesETag,this.collaborators,this.labels,this.milestones,this.issues);
  if (repoDataList == null) {
    repoDataList=new ArrayList<TurboRepoData>();
  }
 else {
    for (int i=0; i < repoDataList.size(); i++) {
      if (repoDataList.get(i).getRepoId().equals(repoId)) {
        repoDataList.remove(i);
        break;
      }
    }
  }
  repoDataList.add(currentRepoData);
  Gson gson=new GsonBuilder().setPrettyPrinting().create();
  String json=gson.toJson(repoDataList);
  try {
    FileWriter writer=new FileWriter(FILE_DATA_CACHE_TEMP);
    writer.write(json);
    writer.close();
    File file=new File(FILE_DATA_CACHE);
    if (file.exists()) {
      boolean deleted=file.delete();
    }
    File newFile=new File(FILE_DATA_CACHE_TEMP);
    boolean renamed=newFile.renameTo(file);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void writeToFile(String repoId,String issuesETag,String collabsETag,String labelsETag,String milestonesETag,ObservableList<TurboUser> collaborators,ObservableList<TurboLabel> labels,ObservableList<TurboMilestone> milestones,ObservableList<TurboIssue> issues){
  this.issues=issues.stream().collect(Collectors.toList());
  this.collaborators=collaborators.stream().collect(Collectors.toList());
  this.labels=labels.stream().collect(Collectors.toList());
  this.milestones=milestones.stream().collect(Collectors.toList());
  TurboRepoData currentRepoData=new TurboRepoData(repoId,issuesETag,collabsETag,labelsETag,milestonesETag,this.collaborators,this.labels,this.milestones,this.issues);
  if (repoDataList == null) {
    repoDataList=new ArrayList<TurboRepoData>();
  }
 else {
    removeEntryIfExists(repoId);
  }
  repoDataList.add(currentRepoData);
  Gson gson=new GsonBuilder().setPrettyPrinting().create();
  String json=gson.toJson(repoDataList);
  try {
    FileWriter writer=new FileWriter(FILE_DATA_CACHE_TEMP);
    writer.write(json);
    writer.close();
    File file=new File(FILE_DATA_CACHE);
    if (file.exists()) {
      if (file.delete()) {
      }
 else {
        logger.error("String_Node_Str");
      }
    }
    File newFile=new File(FILE_DATA_CACHE_TEMP);
    if (newFile.renameTo(file)) {
    }
 else {
      logger.error("String_Node_Str");
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 135464
Project: 135464
Buggy source:
public void readFromFile(){
  Gson gson=new Gson();
  try {
    BufferedReader bufferedReader=new BufferedReader(new FileReader(FILE_DATA_CACHE));
    repoDataList=gson.fromJson(bufferedReader,new TypeToken<List<TurboRepoData>>(){
    }
.getType());
  }
 catch (  FileNotFoundException e) {
  }
}

Fixed version (ground truth):
public void readFromFile(){
  Gson gson=new Gson();
  try {
    BufferedReader bufferedReader=new BufferedReader(new FileReader(FILE_DATA_CACHE));
    repoDataList=gson.fromJson(bufferedReader,new TypeToken<List<TurboRepoData>>(){
    }
.getType());
    bufferedReader.close();
  }
 catch (  FileNotFoundException e) {
  }
catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 135465
Project: 135465
Buggy source:
private static void setupChromeDriverExecutable(){
  String osName=System.getProperty("String_Node_Str");
  String binaryPath=osName.startsWith("String_Node_Str") ? "String_Node_Str" : osName.startsWith("String_Node_Str") ? "String_Node_Str" : "String_Node_Str";
  File f=new File(binaryPath);
  if (!f.exists()) {
    InputStream in=BrowserComponent.class.getClassLoader().getResourceAsStream("String_Node_Str");
    OutputStream out;
    try {
      out=new FileOutputStream(binaryPath);
      IOUtils.copy(in,out);
      out.close();
      f.setExecutable(true);
    }
 catch (    IOException e) {
      System.out.println("String_Node_Str");
      e.printStackTrace();
    }
    System.out.println("String_Node_Str" + binaryPath + "String_Node_Str");
  }
 else {
    System.out.println("String_Node_Str" + binaryPath);
  }
  System.setProperty("String_Node_Str",binaryPath);
}

Fixed version (ground truth):
private static void setupChromeDriverExecutable(){
  String osName=System.getProperty("String_Node_Str");
  String binaryFileName=osName.startsWith("String_Node_Str") ? "String_Node_Str" : osName.startsWith("String_Node_Str") ? "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) {
      System.out.println("String_Node_Str");
      e.printStackTrace();
    }
    System.out.println("String_Node_Str" + binaryFileName + "String_Node_Str");
  }
 else {
    System.out.println("String_Node_Str" + binaryFileName);
  }
  System.setProperty("String_Node_Str",binaryFileName);
}
Program: 135466
Project: 135466
Buggy source:
public static Optional<String> readResource(String packagePath){
  ClassLoader classLoader=UI.class.getClassLoader();
  File file=new File(classLoader.getResource(packagePath).getFile());
  BufferedReader reader;
  StringBuilder sb=new StringBuilder();
  try {
    reader=new BufferedReader(new FileReader(file));
    String line;
    while ((line=reader.readLine()) != null) {
      sb.append(line);
      sb.append("String_Node_Str");
    }
    reader.close();
    return Optional.of(sb.toString());
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return Optional.empty();
}

Fixed version (ground truth):
public static Optional<String> readResource(String packagePath){
  ClassLoader classLoader=UI.class.getClassLoader();
  BufferedReader reader;
  InputStream inputStream=classLoader.getResourceAsStream(packagePath);
  StringBuilder sb=new StringBuilder();
  try {
    reader=new BufferedReader(new InputStreamReader(inputStream));
    String line;
    while ((line=reader.readLine()) != null) {
      sb.append(line);
      sb.append("String_Node_Str");
    }
    reader.close();
    return Optional.of(sb.toString());
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return Optional.empty();
}
Program: 135467
Project: 135467
Buggy source:
/** 
 * Navigates to the GitHub page for the given issue in the currently-active driver window. Run on a separate thread.
 */
public void showIssue(int id){
  Thread th=new Thread(new Task<Void>(){
    @Override protected Void call(){
      login();
      driver.get(GitHubURL.getPathForIssue(id));
      hidePageElements();
      return null;
    }
  }
);
  th.setDaemon(true);
  th.start();
}

Fixed version (ground truth):
/** 
 * Navigates to the GitHub page for the given issue in the currently-active driver window. Run on a separate thread.
 */
public void showIssue(int id){
  Thread th=new Thread(new Task<Void>(){
    @Override protected Void call(){
      driver.get(GitHubURL.getPathForIssue(id));
      hidePageElements();
      return null;
    }
  }
);
  th.setDaemon(true);
  th.start();
}
Program: 135468
Project: 135468
Buggy source:
public IssueCommentsDisplay(UI ui){
  this.ui=ui;
}

Fixed version (ground truth):
public IssueCommentsDisplay(UI ui,TurboIssue current){
  this.ui=ui;
  this.issue=current;
}
Program: 135469
Project: 135469
Buggy source:
public void toggle(){
  if (!ui.toggleExpandedWidth()) {
    ui.getBrowserComponent().showIssue(1);
  }
 else {
  }
}

Fixed version (ground truth):
public void toggle(){
  if (!ui.toggleExpandedWidth()) {
    ui.getBrowserComponent().showIssue(issue.getId());
  }
 else {
  }
}
Program: 135470
Project: 135470
Buggy source:
public IssueEditDisplay(UI ui,TurboIssue displayedIssue,Stage parentStage,Model model,IssueDisplayPane parent,boolean focusRequested){
  this.issueCommentsDisplay=new IssueCommentsDisplay(ui);
  this.ui=ui;
  this.issue=displayedIssue;
  this.model=model;
  this.parentStage=parentStage;
  this.parentContainer=new WeakReference<IssueDisplayPane>(parent);
  this.focusRequested=focusRequested;
  setup();
  setupKeyboardShortcuts();
}

Fixed version (ground truth):
public IssueEditDisplay(UI ui,TurboIssue displayedIssue,Stage parentStage,Model model,IssueDisplayPane parent,boolean focusRequested){
  this.ui=ui;
  this.issue=displayedIssue;
  this.model=model;
  this.parentStage=parentStage;
  this.parentContainer=new WeakReference<IssueDisplayPane>(parent);
  this.focusRequested=focusRequested;
  this.issueCommentsDisplay=new IssueCommentsDisplay(ui,issue);
  setup();
  setupKeyboardShortcuts();
}
Program: 135472
Project: 135472
Buggy source:
public void setExclusive(boolean ex){
  exclusive=ex;
  for (  TurboLabel label : labels) {
    if (label.isExclusive() != ex) {
      String oldName=label.toGhName();
      label.setExclusive(ex);
    }
  }
}

Fixed version (ground truth):
public void setExclusive(boolean ex){
  exclusive=ex;
  for (  TurboLabel label : labels) {
    if (label.isExclusive() != ex) {
      String oldName=label.toGhName();
      label.setExclusive(ex);
      try {
        ServiceManager.getInstance().editLabel(label.toGhResource(),oldName);
      }
 catch (      IOException e) {
        logger.error(e.getLocalizedMessage(),e);
      }
    }
  }
}