nus-yam/ex-repair huggingface dataset:
Program: 135473
Project: 135473
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);
  return everything;
}

Fixed version (ground truth):
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;
}
Program: 135474
Project: 135474
Buggy source:
@SuppressWarnings("String_Node_Str") public ArrayList<T> getUpdatedItems(IRepositoryIdProvider repoId){
  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>();
    }
    updateLastETag(connection);
    updateLastCheckTime(connection);
    if (responseCode != GitHubClientExtended.NO_UPDATE_RESPONSE_CODE) {
      return (ArrayList<T>)getAll(requestIterator);
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
catch (  ParseException e) {
    e.printStackTrace();
  }
  return new ArrayList<T>();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") 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) {
    e.printStackTrace();
  }
catch (  ParseException e) {
    e.printStackTrace();
  }
  return result;
}
Program: 135475
Project: 135475
Buggy source:
private void updateCommentsInList(Comment comment){
  comment.setBodyHtml(ServiceManager.getInstance().getMarkupForComment(comment));
  int index=getCommentsInListWithId(comment.getId());
  if (index != -1) {
    commentsList.set(index,comment);
  }
 else {
    commentsList.add(0,comment);
  }
}

Fixed version (ground truth):
private void updateCommentsInList(Comment comment){
  comment.setBodyHtml(ServiceManager.getInstance().getMarkupForComment(comment));
  int index=getCommentsInListWithId(comment.getId());
  if (index != -1) {
    commentsList.set(index,comment);
  }
 else {
    commentsList.add(comment);
  }
}
Program: 135476
Project: 135476
Buggy source:
private void applyChangeMethods(){
  for (  Runnable method : methodsOnChange) {
    method.run();
  }
}

Fixed version (ground truth):
public void applyChangeMethods(){
  for (  Runnable method : methodsOnChange) {
    method.run();
  }
}
Program: 135477
Project: 135477
Buggy source:
private TreeView<LabelTreeItem> createTreeView(Stage stage){
  final TreeItem<LabelTreeItem> treeRoot=new TreeItem<>(new TurboLabelGroup(ROOT_NAME));
  populateTree(treeRoot);
  final TreeView<LabelTreeItem> treeView=new TreeView<>();
  treeView.setRoot(treeRoot);
  treeView.setShowRoot(false);
  HBox.setHgrow(treeView,Priority.ALWAYS);
  treeView.setPrefHeight(2000);
  treeRoot.setExpanded(true);
  treeRoot.getChildren().forEach(child -> child.setExpanded(true));
  treeView.setCellFactory(new Callback<TreeView<LabelTreeItem>,TreeCell<LabelTreeItem>>(){
    @Override public TreeCell<LabelTreeItem> call(    TreeView<LabelTreeItem> stringTreeView){
      return new ManageLabelsTreeCell<LabelTreeItem>(stage,model,sidePanel);
    }
  }
);
  return treeView;
}

Fixed version (ground truth):
private TreeView<LabelTreeItem> createTreeView(Stage stage){
  final TreeItem<LabelTreeItem> treeRoot=new TreeItem<>(new TurboLabelGroup(ROOT_NAME));
  populateTree(treeRoot);
  final TreeView<LabelTreeItem> treeView=new TreeView<>();
  treeView.setRoot(treeRoot);
  treeView.setShowRoot(false);
  HBox.setHgrow(treeView,Priority.ALWAYS);
  treeView.setPrefHeight(2000);
  treeRoot.setExpanded(true);
  treeRoot.getChildren().forEach(child -> child.setExpanded(true));
  treeView.setCellFactory(createLabelCellFactory(stage));
  setupLabelsListChangeListener();
  return treeView;
}
Program: 135478
Project: 135478
Buggy source:
public VBox initialise(){
  VBox layout=new VBox();
  layout.setPadding(new Insets(15));
  layout.setSpacing(10);
  TreeView<LabelTreeItem> treeView=createTreeView(parentStage);
  layout.getChildren().addAll(createButtons(treeView),treeView);
  return layout;
}

Fixed version (ground truth):
public VBox initialise(){
  VBox layout=new VBox();
  layout.setPadding(new Insets(15));
  layout.setSpacing(10);
  treeView=createTreeView(parentStage);
  layout.getChildren().addAll(createButtons(treeView),treeView);
  return layout;
}
Program: 135479
Project: 135479
Buggy source:
public void deleteComment(TurboComment comment){
  try {
    commentsUpdater.stopCommentsListUpdate();
    ServiceManager.getInstance().deleteComment(comment.getId());
    removeCachedItem(comment.getId());
    commentsUpdater.startCommentsListUpdate();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void deleteComment(TurboComment comment){
  try {
    stopContentUpdate();
    ServiceManager.getInstance().deleteComment(comment.getId());
    removeCachedItem(comment.getId());
    startContentUpdate();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 135480
Project: 135480
Buggy source:
public boolean createComment(String text){
  try {
    ServiceManager.getInstance().createComment(issue.getId(),text);
    commentsUpdater.restartCommentsListUpdate();
    return true;
  }
 catch (  IOException e) {
    e.printStackTrace();
    return false;
  }
}

Fixed version (ground truth):
public boolean createComment(String text){
  try {
    ServiceManager.getInstance().createComment(issue.getId(),text);
    restartContentUpdate();
    return true;
  }
 catch (  IOException e) {
    e.printStackTrace();
    return false;
  }
}
Program: 135481
Project: 135481
Buggy source:
public boolean editComment(TurboComment comment){
  try {
    commentsUpdater.stopCommentsListUpdate();
    updateItemInCommentsList(comment);
    Comment ghComment=comment.toGhComment();
    ServiceManager.getInstance().editComment(ghComment);
    commentsUpdater.startCommentsListUpdate();
    return true;
  }
 catch (  IOException e) {
    e.printStackTrace();
    return false;
  }
}

Fixed version (ground truth):
public boolean editComment(TurboComment comment){
  try {
    stopContentUpdate();
    updateItemInCommentsList(comment);
    Comment ghComment=comment.toGhComment();
    ServiceManager.getInstance().editComment(ghComment);
    startContentUpdate();
    return true;
  }
 catch (  IOException e) {
    e.printStackTrace();
    return false;
  }
}
Program: 135482
Project: 135482
Buggy source:
private void setupContent(){
  getDetailsContent();
  commentsUpdater=ServiceManager.getInstance().getCommentUpdateService(issue.getId(),allGhContent);
  setupCommentsChangeListener();
}

Fixed version (ground truth):
private void setupContent(){
  getDetailsContent();
  setupContentUpdater();
  setupCommentsChangeListener();
}
Program: 135483
Project: 135483
Buggy source:
private boolean loadIssues(){
  issues.clear();
  try {
    List<Issue> ghIssues=ServiceManager.getInstance().getAllIssues();
    ArrayList<TurboIssue> buffer=CollectionUtilities.getHubTurboIssueList(ghIssues);
    issues.addAll(buffer);
  }
 catch (  IOException e) {
    e.printStackTrace();
    return false;
  }
  return true;
}

Fixed version (ground truth):
private boolean loadIssues(){
  issues.clear();
  try {
    List<Issue> ghIssues=ServiceManager.getInstance().getAllIssues();
    ArrayList<TurboIssue> buffer=CollectionUtilities.getHubTurboIssueList(ghIssues);
    alignIssueStatusAndState(buffer);
    issues.addAll(buffer);
  }
 catch (  IOException e) {
    e.printStackTrace();
    return false;
  }
  return true;
}
Program: 135484
Project: 135484
Buggy source:
@Override public void start(Stage stage) throws IOException {
  initCSS();
  sessionConfig=ConfigFileHandler.loadSessionConfig();
  mainStage=stage;
  stage.setMaximized(true);
  Scene scene=new Scene(createRoot(),800,600);
  setupMainStage(scene);
  loadFonts();
  applyCSS(scene);
  getUserCredentials();
}

Fixed version (ground truth):
@Override public void start(Stage stage) throws IOException {
  initCSS();
  sessionConfig=ConfigFileHandler.loadSessionConfig();
  mainStage=stage;
  stage.setMaximized(true);
  Scene scene=new Scene(createRoot());
  setupMainStage(scene);
  loadFonts();
  applyCSS(scene);
  getUserCredentials();
}
Program: 135485
Project: 135485
Buggy source:
public void triggerIssueCreate(TurboIssue issue){
  mode=IssueEditMode.CREATE;
  displayedIssue=issue;
  setLayout(Layout.ISSUE);
}

Fixed version (ground truth):
public void triggerIssueCreate(TurboIssue issue){
  mode=IssueEditMode.CREATE;
  displayedIssue=issue;
  focusRequested=true;
  setLayout(Layout.ISSUE);
}
Program: 135486
Project: 135486
Buggy source:
@Override protected PagedRequest<Comment> createUpdatedRequest(IRepositoryIdProvider repoId){
  PagedRequest<Comment> request=new PagedRequest<Comment>();
  String path=SEGMENT_REPOS + "String_Node_Str" + repoId.generateId()+ SEGMENT_ISSUES+ "String_Node_Str"+ issueId+ SEGMENT_COMMENTS;
  request.setUri(path);
  request.setResponseContentType(CONTENT_TYPE_JSON);
  request.setType(new TypeToken<Comment>(){
  }
.getType());
  request.setArrayType(new TypeToken<ArrayList<Comment>>(){
  }
.getType());
  return request;
}

Fixed version (ground truth):
@Override protected PagedRequest<Comment> createUpdatedRequest(IRepositoryIdProvider repoId){
  PagedRequest<Comment> request=new PagedRequest<Comment>();
  String path=SEGMENT_REPOS + "String_Node_Str" + repoId.generateId()+ SEGMENT_ISSUES+ "String_Node_Str"+ issueId+ SEGMENT_COMMENTS;
  request.setUri(path);
  request.setParams(createUpdatedCommentsParams());
  request.setResponseContentType(CONTENT_TYPE_JSON);
  request.setType(new TypeToken<Comment>(){
  }
.getType());
  request.setArrayType(new TypeToken<ArrayList<Comment>>(){
  }
.getType());
  return request;
}
Program: 135487
Project: 135487
Buggy source:
protected void updateCachedComments(IRepositoryIdProvider repoId){
  List<Comment> updatedComments=super.getUpdatedItems(repoId);
  if (!updatedComments.isEmpty()) {
    List<Comment> removed=getRemovedComments(updatedComments);
    commentsList.removeAll(removed);
    updatedComments.stream().forEach(comment -> updateCommentsInList(comment));
    updateGlobalCachedCommentsForIssue(updatedComments);
  }
}

Fixed version (ground truth):
protected void updateCachedComments(IRepositoryIdProvider repoId){
  List<Comment> updatedComments=super.getUpdatedItems(repoId);
  Collections.reverse(updatedComments);
  if (!updatedComments.isEmpty()) {
    List<Comment> removed=getRemovedComments(updatedComments);
    commentsList.removeAll(removed);
    updatedComments.stream().forEach(comment -> updateCommentsInList(comment));
    updateGlobalCachedCommentsForIssue(updatedComments);
  }
}
Program: 135488
Project: 135488
Buggy source:
private HBox createRepoFields(){
  final ComboBox<String> comboBox=new ComboBox<String>();
  comboBox.setEditable(true);
  if (ServiceManager.getInstance().getRepoId() != null) {
    String repoId=ServiceManager.getInstance().getRepoId().generateId();
    comboBox.setValue(repoId);
    SessionConfigurations.addToLastViewedRepositories(repoId);
    comboBox.getItems().addAll(SessionConfigurations.getLastViewedRepositories());
  }
  comboBox.valueProperty().addListener((a,b,c) -> loadRepo(comboBox));
  HBox repoIdBox=new HBox();
  repoIdBox.setSpacing(5);
  repoIdBox.setPadding(new Insets(5));
  repoIdBox.setAlignment(Pos.CENTER);
  repoIdBox.getChildren().addAll(comboBox);
  comboBox.prefWidthProperty().bind(repoIdBox.widthProperty());
  return repoIdBox;
}

Fixed version (ground truth):
private HBox createRepoFields(){
  final ComboBox<String> comboBox=new ComboBox<String>();
  comboBox.setFocusTraversable(false);
  comboBox.setEditable(true);
  if (ServiceManager.getInstance().getRepoId() != null) {
    String repoId=ServiceManager.getInstance().getRepoId().generateId();
    comboBox.setValue(repoId);
    SessionConfigurations.addToLastViewedRepositories(repoId);
    comboBox.getItems().addAll(SessionConfigurations.getLastViewedRepositories());
  }
  comboBox.valueProperty().addListener((a,b,c) -> loadRepo(comboBox));
  HBox repoIdBox=new HBox();
  repoIdBox.setSpacing(5);
  repoIdBox.setPadding(new Insets(5));
  repoIdBox.setAlignment(Pos.CENTER);
  repoIdBox.getChildren().addAll(comboBox);
  comboBox.prefWidthProperty().bind(repoIdBox.widthProperty());
  return repoIdBox;
}
Program: 135489
Project: 135489
Buggy source:
public void handleDoneClicked(){
  TurboIssueCommand command;
  String message="String_Node_Str";
  boolean success=false;
  if (mode == IssueEditMode.CREATE) {
    command=new TurboIssueAdd(model,displayedIssue);
    success=command.execute();
    if (success) {
      displayedIssue.copyValues(((TurboIssueAdd)command).getAddedIssue());
      issueEditDisplay.updateIssueId(displayedIssue.getId());
      message="String_Node_Str";
    }
 else {
      message="String_Node_Str";
    }
  }
 else   if (mode == IssueEditMode.EDIT) {
    command=new TurboIssueEdit(model,originalIssue,displayedIssue);
    success=command.execute();
    if (success) {
      message="String_Node_Str";
    }
 else {
      message="String_Node_Str";
    }
  }
  StatusBar.displayMessage(message);
  if (success && !expandedIssueView) {
    showIssueDetailsDisplay(false);
    cleanup();
    parentPanel.get().displayTabs();
  }
}

Fixed version (ground truth):
public void handleDoneClicked(){
  TurboIssueCommand command;
  String message="String_Node_Str";
  boolean success=false;
  if (mode == IssueEditMode.CREATE) {
    command=new TurboIssueAdd(model,displayedIssue);
    success=command.execute();
    if (success) {
      updateStateAfterSuccessfulAdd(((TurboIssueAdd)command).getAddedIssue());
      message="String_Node_Str";
    }
 else {
      message="String_Node_Str";
    }
  }
 else   if (mode == IssueEditMode.EDIT) {
    command=new TurboIssueEdit(model,originalIssue,displayedIssue);
    success=command.execute();
    if (success) {
      updateStateAfterSuccessfulEdit(((TurboIssueEdit)command).getEditedIssue());
      message="String_Node_Str";
    }
 else {
      message="String_Node_Str";
    }
  }
  StatusBar.displayMessage(message);
  if (success && !expandedIssueView) {
    showIssueDetailsDisplay(false);
    cleanup();
    parentPanel.get().displayTabs();
  }
}
Program: 135490
Project: 135490
Buggy source:
private void getDetailsContent(){
  try {
    allGhContent.clear();
    List<Comment> allItems=ServiceManager.getInstance().getComments(issue.getId());
    allGhContent.addAll(allItems);
    updateData();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private void getDetailsContent(){
  try {
    List<Comment> allItems=ServiceManager.getInstance().getComments(issue.getId());
    setGithubCommentsList(allItems);
    updateData();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 135491
Project: 135491
Buggy source:
private void handleCommentEdit(){
  boolean editRes=commentHandler.editComment(editedComment);
  if (editRes) {
    commentHandler.setCommentEditStateFalse(editedComment);
  }
}

Fixed version (ground truth):
private void handleCommentEdit(){
  if (commentHandler == null) {
    System.out.println("String_Node_Str");
  }
  boolean editRes=commentHandler.editComment(editedComment);
  if (editRes) {
    commentHandler.setCommentEditStateFalse(editedComment);
  }
}
Program: 135492
Project: 135492
Buggy source:
public CommentsEditBox(IssueDetailsContentHandler handler,TurboComment editedComment){
  this.commentHandler=handler;
  this.editedComment=editedComment;
  if (editedComment != null) {
    initialText=editedComment.getBody();
  }
  initialiseUIComponents();
  setupForCommentsEdit(editedComment);
  setupLayout();
}

Fixed version (ground truth):
public CommentsEditBox(IssueDetailsContentHandler handler,TurboComment editedComment){
  this.commentHandler=handler;
  this.editedComment=editedComment;
  if (editedComment != null) {
    initialText=editedComment.getBody();
  }
  setupForEditing();
}
Program: 135493
Project: 135493
Buggy source:
public void show(){
  if (issue == null || issue.getId() <= 0) {
    return;
  }
  Task<Boolean> bgTask=new Task<Boolean>(){
    @Override protected Boolean call() throws Exception {
      contentHandler.startContentUpdate();
      return true;
    }
  }
;
  WeakReference<IssueDetailsDisplay> selfRef=new WeakReference<>(this);
  bgTask.setOnSucceeded(new EventHandler<WorkerStateEvent>(){
    @Override public void handle(    WorkerStateEvent t){
      IssueDetailsDisplay self=selfRef.get();
      if (self != null) {
        self.scrollDisplayToBottom();
        self.loadFailCount=0;
      }
    }
  }
);
  bgTask.setOnFailed(new EventHandler<WorkerStateEvent>(){
    @Override public void handle(    WorkerStateEvent t){
      IssueDetailsDisplay self=selfRef.get();
      if (self != null) {
        self.loadFailCount+=1;
        if (loadFailCount <= 3) {
          self.show();
        }
 else {
          loadFailCount=0;
          StatusBar.displayMessage("String_Node_Str");
        }
      }
    }
  }
);
  DialogMessage.showProgressDialog(bgTask,"String_Node_Str");
  backgroundThread=new Thread(bgTask);
  backgroundThread.start();
}

Fixed version (ground truth):
public void show(){
  if (issue == null || issue.getId() <= 0) {
    return;
  }
  loadIssueDetailsInBackground();
}
Program: 135494
Project: 135494
Buggy source:
private void setupWebEngineHeightListener(){
}

Fixed version (ground truth):
private void setupWebEngineHeightListener(){
  webViewHeightListener=new ChangeListener<Document>(){
    @Override public void changed(    ObservableValue<? extends Document> prop,    Document oldDoc,    Document newDoc){
      adjustWebEngineHeight();
    }
  }
;
  commentsText.getEngine().documentProperty().addListener(new WeakChangeListener<Document>(webViewHeightListener));
}
Program: 135495
Project: 135495
Buggy source:
private void adjustWebEngineHeight(){
  Object res=commentsText.getEngine().executeScript("String_Node_Str");
  if (res != null && res instanceof Integer) {
    Integer height=(Integer)res + WEB_TEXT_PADDING;
    commentsText.setPrefHeight(height);
  }
}

Fixed version (ground truth):
private void adjustWebEngineHeight(){
  if (heightAdjusted == true) {
    return;
  }
  Object res=commentsText.getEngine().executeScript("String_Node_Str");
  if (res != null && res instanceof Integer) {
    Integer height=(Integer)res + WEB_TEXT_PADDING;
    commentsText.setPrefHeight(height);
  }
  heightAdjusted=true;
}
Program: 135496
Project: 135496
Buggy source:
protected void setupCommentBodyChangeListener(){
  bodyChangeListener=new ChangeListener<String>(){
    @Override public void changed(    ObservableValue<? extends String> arg0,    String original,    String change){
      setDisplayedCommentText();
    }
  }
;
  originalComment.getBodyHtmlProperty().addListener(new WeakChangeListener<String>(bodyChangeListener));
}

Fixed version (ground truth):
protected void setupCommentBodyChangeListener(){
  bodyChangeListener=new ChangeListener<String>(){
    @Override public void changed(    ObservableValue<? extends String> arg0,    String original,    String change){
      setDisplayedCommentText();
      heightAdjusted=false;
    }
  }
;
  originalComment.getBodyHtmlProperty().addListener(new WeakChangeListener<String>(bodyChangeListener));
}
Program: 135497
Project: 135497
Buggy source:
@Override public void changed(ObservableValue<? extends String> arg0,String original,String change){
  setDisplayedCommentText();
}

Fixed version (ground truth):
@Override public void changed(ObservableValue<? extends Document> prop,Document oldDoc,Document newDoc){
  adjustWebEngineHeight();
}
Program: 135498
Project: 135498
Buggy source:
@Override protected void loadTopBar(){
  if (originalComment != null && !originalComment.isIssueLog()) {
    HBox commentsDetailsDisp=createCommentsDetailsDisplay();
    HBox controlsBox=createControlsBox();
    HBox.setHgrow(controlsBox,Priority.ALWAYS);
    topBar.setSpacing(100);
    topBar.getChildren().addAll(commentsDetailsDisp,controlsBox);
  }
 else {
    super.loadTopBar();
  }
}

Fixed version (ground truth):
@Override protected void loadTopBar(){
  if (originalComment != null && !originalComment.isIssueLog()) {
    HBox commentsDetailsDisp=createCommentsDetailsDisplay();
    HBox controlsBox=createControlsBox();
    HBox.setHgrow(controlsBox,Priority.ALWAYS);
    topBar.getChildren().addAll(commentsDetailsDisp,controlsBox);
  }
 else {
    super.loadTopBar();
  }
}
Program: 135499
Project: 135499
Buggy source:
private void loadNewCommentsBox(){
  CommentsEditBox box=new CommentsEditBox(handler);
  box.setPrefHeight(COMMENTS_CELL_HEIGHT);
  box.setPrefWidth(COMMENTS_CELL_WIDTH);
  TitledPane commentsContainer=new TitledPane("String_Node_Str",box);
  commentsContainer.setExpanded(false);
  commentsContainer.setPrefHeight(COMMENTS_BOX_PREF_HEIGHT);
  getChildren().add(commentsContainer);
}

Fixed version (ground truth):
private void loadNewCommentsBox(){
  CommentsEditBox box=new CommentsEditBox(handler);
  box.setPrefHeight(COMMENTS_CELL_HEIGHT);
  box.setPrefWidth(COMMENTS_CELL_WIDTH);
  TitledPane commentsContainer=new TitledPane("String_Node_Str",box);
  commentsContainer.setExpanded(false);
  commentsContainer.setPrefHeight(COMMENTS_BOX_PREF_HEIGHT);
  commentsContainer.setAlignment(Pos.BOTTOM_CENTER);
  getChildren().add(commentsContainer);
}
Program: 135500
Project: 135500
Buggy source:
private void loadItems(){
  if (displayType == DisplayType.COMMENTS) {
    loadNewCommentsBox();
  }
  setListItems();
  getChildren().add(0,listView);
}

Fixed version (ground truth):
private void loadItems(){
  if (displayType == DisplayType.COMMENTS) {
    loadNewCommentsBox();
  }
  setListItems();
  getChildren().add(0,listView);
  VBox.setVgrow(listView,Priority.ALWAYS);
}
Program: 135501
Project: 135501
Buggy source:
private void adjustWebEngineHeight(){
  try {
    Object res=commentsText.getEngine().executeScript("String_Node_Str");
    if (res != null && res instanceof Integer) {
      Integer height=(Integer)res + WEB_TEXT_PADDING;
      commentsText.setPrefHeight(height);
    }
  }
 catch (  Exception e) {
  }
  return;
}

Fixed version (ground truth):
private void adjustWebEngineHeight(){
  try {
    Object res=commentsText.getEngine().executeScript("String_Node_Str");
    System.out.println(commentsText.getEngine().executeScript("String_Node_Str"));
    if (res != null && res instanceof Integer) {
      Integer height=(Integer)res + WEB_TEXT_PADDING;
      commentsText.setPrefHeight(height);
    }
  }
 catch (  Exception e) {
  }
  return;
}
Program: 135502
Project: 135502
Buggy source:
public void show(){
  if (issue == null || issue.getId() <= 0) {
    return;
  }
  Task<Boolean> bgTask=new Task<Boolean>(){
    @Override protected Boolean call() throws Exception {
      contentHandler.startContentUpdate();
      return true;
    }
  }
;
  WeakReference<IssueDetailsDisplay> selfRef=new WeakReference<>(this);
  bgTask.setOnSucceeded(new EventHandler<WorkerStateEvent>(){
    @Override public void handle(    WorkerStateEvent t){
      IssueDetailsDisplay self=selfRef.get();
      if (self != null) {
        self.scrollDisplayToBottom();
      }
    }
  }
);
  DialogMessage.showProgressDialog(bgTask,"String_Node_Str");
  new Thread(bgTask).start();
}

Fixed version (ground truth):
public void show(){
  if (issue == null || issue.getId() <= 0) {
    return;
  }
  Task<Boolean> bgTask=new Task<Boolean>(){
    @Override protected Boolean call() throws Exception {
      contentHandler.startContentUpdate();
      return true;
    }
  }
;
  WeakReference<IssueDetailsDisplay> selfRef=new WeakReference<>(this);
  bgTask.setOnSucceeded(new EventHandler<WorkerStateEvent>(){
    @Override public void handle(    WorkerStateEvent t){
      IssueDetailsDisplay self=selfRef.get();
      if (self != null) {
        self.scrollDisplayToBottom();
      }
    }
  }
);
  DialogMessage.showProgressDialog(bgTask,"String_Node_Str");
  backgroundThread=new Thread(bgTask);
  backgroundThread.start();
}
Program: 135503
Project: 135503
Buggy source:
private Tab createCommentsTab(){
  Tab comments=new Tab();
  comments.setText("String_Node_Str");
  comments.setClosable(false);
  commentsDisplay=createTabContentsDisplay(DisplayType.COMMENTS);
  comments.setContent(commentsDisplay);
  return comments;
}

Fixed version (ground truth):
private Tab createCommentsTab(){
  Tab comments=new Tab();
  comments.setText("String_Node_Str");
  comments.setClosable(false);
  commentsDisplay=createTabContentsDisplay(DisplayType.COMMENTS);
  VBox.setVgrow(commentsDisplay,Priority.ALWAYS);
  comments.setContent(commentsDisplay);
  return comments;
}
Program: 135504
Project: 135504
Buggy source:
private void updateItemInCommentsList(TurboComment comment){
  for (  TurboComment item : comments) {
    if (item.getId() == comment.getId()) {
      item.copyValues(comment);
      return;
    }
  }
  addItemToObservedCommentList(comment);
}

Fixed version (ground truth):
private void updateItemInCommentsList(TurboComment comment){
  for (  TurboComment item : comments) {
    if (item.getId() == comment.getId()) {
      replaceItemInObservedCommentsList(item,comment);
      return;
    }
  }
  addItemToObservedCommentList(comment);
}
Program: 135505
Project: 135505
Buggy source:
private void addLabelsToIssueInGithub(List<Label> ghLabels) throws IOException {
  ServiceManager.getInstance().addLabelsToIssue(issue.getId(),ghLabels);
  updateGithubIssueState();
}

Fixed version (ground truth):
private void addLabelsToIssueInGithub() throws IOException {
  List<Label> issueLabels=CollectionUtilities.getGithubLabelList(issue.getLabels());
  ServiceManager.getInstance().setLabelsForIssue(issue.getId(),issueLabels);
  updateGithubIssueState();
}
Program: 135506
Project: 135506
Buggy source:
@Override public boolean execute(){
  ArrayList<Label> ghLabels=CollectionUtilities.getGithubLabelList(addedLabels);
  issue.addLabels(addedLabels);
  try {
    addLabelsToIssueInGithub(ghLabels);
    logAddOperation(true);
    isSuccessful=true;
  }
 catch (  IOException e) {
    issue.removeLabels(addedLabels);
    isSuccessful=false;
    e.printStackTrace();
  }
  return isSuccessful;
}

Fixed version (ground truth):
@Override public boolean execute(){
  issue.addLabels(addedLabels);
  try {
    addLabelsToIssueInGithub();
    logAddOperation(true);
    isSuccessful=true;
  }
 catch (  IOException e) {
    issue.removeLabels(addedLabels);
    isSuccessful=false;
    e.printStackTrace();
  }
  return isSuccessful;
}
Program: 135507
Project: 135507
Buggy source:
@Override public boolean undo(){
  ServiceManager service=ServiceManager.getInstance();
  ArrayList<Label> ghLabels=CollectionUtilities.getGithubLabelList(removedLabels);
  issue.addLabels(removedLabels);
  try {
    service.addLabelsToIssue(issue.getId(),ghLabels);
    updateGithubIssueState();
    logRemoveOperation(false);
    isUndone=true;
  }
 catch (  IOException e) {
    issue.removeLabels(removedLabels);
    isUndone=false;
    e.printStackTrace();
  }
  return isUndone;
}

Fixed version (ground truth):
@Override public boolean undo(){
  ServiceManager service=ServiceManager.getInstance();
  issue.addLabels(removedLabels);
  try {
    ArrayList<Label> ghLabels=CollectionUtilities.getGithubLabelList(issue.getLabels());
    service.setLabelsForIssue(issue.getId(),ghLabels);
    updateGithubIssueState();
    logRemoveOperation(false);
    isUndone=true;
  }
 catch (  IOException e) {
    issue.removeLabels(removedLabels);
    isUndone=false;
    e.printStackTrace();
  }
  return isUndone;
}
Program: 135508
Project: 135508
Buggy source:
private void removeLabelsWithGroup(String group){
  removeLabels(getLabelsWithGroup(group));
}

Fixed version (ground truth):
private void removeLabelsWithGroup(String group){
  List<TurboLabel> labels=getLabelsWithGroup(group);
  removeLabels(labels);
}
Program: 135509
Project: 135509
Buggy source:
private void setupDisplayedListSizeListener(){
  WeakReference<DetailsPanel> selfRef=new WeakReference<>(this);
  displayedListSizeListener=new ListChangeListener<TurboComment>(){
    @Override public void onChanged(    javafx.collections.ListChangeListener.Change<? extends TurboComment> arg0){
      if (listView.focusedProperty().get() != true && !detailsList.isEmpty()) {
        listView.scrollTo(detailsList.size() - 1);
      }
    }
  }
;
  detailsList.addListener(new WeakListChangeListener<TurboComment>(displayedListSizeListener));
}

Fixed version (ground truth):
private void setupDisplayedListSizeListener(){
  displayedListSizeListener=new ListChangeListener<TurboComment>(){
    @Override public void onChanged(    javafx.collections.ListChangeListener.Change<? extends TurboComment> arg0){
      if (listView.focusedProperty().get() != true && !detailsList.isEmpty()) {
        listView.scrollTo(detailsList.size() - 1);
      }
    }
  }
;
  detailsList.addListener(new WeakListChangeListener<TurboComment>(displayedListSizeListener));
}
Program: 135510
Project: 135510
Buggy source:
/** 
 * Returns a list of all repositories the user owns/contributes  and repositories belonging to organisations the user is a member of
 */
public List<Repository> getAllRepositories() throws IOException {
  HashSet<Repository> result=new HashSet<Repository>(getRepositories());
  result.addAll(getOrganisationRepositories());
  return new ArrayList<Repository>(result);
}

Fixed version (ground truth):
/** 
 * Returns a list of all repositories the user owns/contributes  and repositories belonging to organisations the user is a member of
 */
public List<Repository> getAllRepositories(String user) throws IOException {
  HashSet<Repository> result=new HashSet<Repository>(getRepositories(user));
  result.addAll(getOrganisationRepositories());
  return new ArrayList<Repository>(result);
}
Program: 135511
Project: 135511
Buggy source:
public List<String> getRepositoriesNames() throws IOException {
  return getRepositories().stream().map(repo -> repo.getName()).collect(Collectors.toList());
}

Fixed version (ground truth):
public List<String> getRepositoriesNames(String user) throws IOException {
  return getRepositories(user).stream().map(repo -> repo.getName()).collect(Collectors.toList());
}
Program: 135512
Project: 135512
Buggy source:
public List<String> getAllRepositoriesNames() throws IOException {
  return getAllRepositories().stream().map(repo -> repo.getName()).collect(Collectors.toList());
}

Fixed version (ground truth):
public List<String> getAllRepositoriesNames(String user) throws IOException {
  return getAllRepositories(user).stream().map(repo -> repo.getName()).collect(Collectors.toList());
}
Program: 135513
Project: 135513
Buggy source:
public List<String> getAllRepositoryNames() throws IOException {
  return repositoryService.getAllRepositoriesNames();
}

Fixed version (ground truth):
/** 
 * Returns a list of the names of the public repositories belonging to the user and the user's organisations
 */
public List<String> getAllRepositoryNames() throws IOException {
  return repositoryService.getAllRepositoriesNames(getUserId());
}
Program: 135514
Project: 135514
Buggy source:
public List<Repository> getAllRepositories() throws IOException {
  return repositoryService.getAllRepositories();
}

Fixed version (ground truth):
/** 
 * Returns a list of the public repositories belonging to the user and the user's organisations
 */
public List<Repository> getAllRepositories() throws IOException {
  return repositoryService.getAllRepositories(getUserId());
}
Program: 135515
Project: 135515
Buggy source:
public List<String> getRepositoriesNames() throws IOException {
  return repositoryService.getRepositoriesNames();
}

Fixed version (ground truth):
/** 
 * Returns a list of the names of the user's public repositories
 */
public List<String> getRepositoriesNames() throws IOException {
  return repositoryService.getRepositoriesNames(getUserId());
}
Program: 135516
Project: 135516
Buggy source:
/** 
 * Get user repositories
 */
public List<Repository> getRepositories() throws IOException {
  return repositoryService.getRepositories();
}

Fixed version (ground truth):
/** 
 * Returns a list of the user's public repositories
 */
public List<Repository> getRepositories() throws IOException {
  return repositoryService.getRepositories();
}
Program: 135517
Project: 135517
Buggy source:
private HBox createRepoFields(){
  ComboBox<String> comboBox=new ComboBox<String>();
  HBox repoIdBox=new HBox();
  repoIdBox.setPadding(new Insets(5));
  repoIdBox.setAlignment(Pos.CENTER);
  repoIdBox.getChildren().add(comboBox);
  return repoIdBox;
}

Fixed version (ground truth):
private HBox createRepoFields(){
  ComboBox<String> comboBox=new ComboBox<String>();
  if (ServiceManager.getInstance().getUserId() != null) {
    System.out.println(ServiceManager.getInstance().getUserId());
    try {
      comboBox.setItems(FXCollections.observableArrayList(ServiceManager.getInstance().getAllRepositoryNames()));
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
  HBox repoIdBox=new HBox();
  repoIdBox.setPadding(new Insets(5));
  repoIdBox.setAlignment(Pos.CENTER);
  repoIdBox.getChildren().add(comboBox);
  return repoIdBox;
}
Program: 135518
Project: 135518
Buggy source:
private FilterExpression parseExpression(int precedence){
}

Fixed version (ground truth):
private FilterExpression parseExpression(int precedence){
  Token token=consume();
  if (token.getType() == TokenType.EOF) {
    throw new ParseException("String_Node_Str" + position);
  }
  FilterExpression left;
switch (token.getType()) {
case LBRACKET:
    left=parseGroup(token);
  break;
case NEGATE:
left=parseNegation(token);
break;
case SYMBOL:
left=parsePredicate(token);
break;
default :
throw new ParseException("String_Node_Str" + token);
}
if (lookAhead().getType() == TokenType.EOF) return left;
while (precedence < getInfixPrecedence(token=lookAhead())) {
switch (token.getType()) {
case AND:
consume();
left=parseConjunction(left,token);
break;
case OR:
consume();
left=parseDisjunction(left,token);
break;
case SYMBOL:
case NEGATE:
case LBRACKET:
left=parseConjunction(left,token);
break;
default :
throw new ParseException("String_Node_Str" + token);
}
}
return left;
}
Program: 135519
Project: 135519
Buggy source:
public void stopContentUpdate(){
  if (commentsUpdater != null) {
  }
}

Fixed version (ground truth):
public void stopContentUpdate(){
  if (commentsUpdater != null) {
    commentsUpdater.stopCommentsListUpdate();
  }
}
Program: 135520
Project: 135520
Buggy source:
public void startContentUpdate(){
  if (isNotSetup()) {
    setupContent();
  }
  if (commentsUpdater != null) {
  }
}

Fixed version (ground truth):
public void startContentUpdate(){
  if (isNotSetup()) {
    setupContent();
  }
  if (commentsUpdater != null) {
    commentsUpdater.startCommentsListUpdate();
  }
}
Program: 135521
Project: 135521
Buggy source:
private HBox createButtons(Stage stage){
  HBox buttons=new HBox();
  buttons.setAlignment(Pos.BASELINE_RIGHT);
  buttons.setSpacing(8);
  Button cancel=new Button();
  cancel.setText("String_Node_Str");
  cancel.setOnMouseClicked(e -> {
    response.complete("String_Node_Str");
    columns.deselect();
  }
);
  Button done=new Button();
  done.setText("String_Node_Str");
  done.setOnMouseClicked(e -> {
    response.complete("String_Node_Str");
  }
);
  buttons.getChildren().addAll(done,cancel);
  return buttons;
}

Fixed version (ground truth):
private HBox createButtons(Stage stage){
  HBox buttons=new HBox();
  buttons.setAlignment(Pos.BASELINE_RIGHT);
  buttons.setSpacing(8);
  Button cancel=new Button();
  cancel.setText("String_Node_Str");
  cancel.setOnMouseClicked(e -> {
    response.complete("String_Node_Str");
    columns.deselect();
    issueViewCleanup();
  }
);
  Button done=new Button();
  done.setText("String_Node_Str");
  done.setOnMouseClicked(e -> {
    response.complete("String_Node_Str");
    issueViewCleanup();
  }
);
  buttons.getChildren().addAll(done,cancel);
  return buttons;
}
Program: 135522
Project: 135522
Buggy source:
private HBox createIssueDetailsButton(){
  HBox container=new HBox();
  container.setAlignment(Pos.BASELINE_RIGHT);
  ToggleButton details=new ToggleButton();
  details.setText(ISSUE_DETAILS_BTN_TXT);
  WeakReference<ToggleButton> ref=new WeakReference<ToggleButton>(details);
  details.setOnAction((  ActionEvent e) -> {
    boolean selected=ref.get().selectedProperty().get();
    System.out.println("String_Node_Str" + selected);
    parentContainer.get().showIssueDetailsDisplay(selected);
  }
);
  container.getChildren().add(details);
  return container;
}

Fixed version (ground truth):
private HBox createIssueDetailsButton(){
  HBox container=new HBox();
  container.setAlignment(Pos.BASELINE_RIGHT);
  ToggleButton details=new ToggleButton();
  details.setText(ISSUE_DETAILS_BTN_TXT);
  WeakReference<ToggleButton> ref=new WeakReference<ToggleButton>(details);
  details.setOnAction((  ActionEvent e) -> {
    boolean selected=ref.get().selectedProperty().get();
    parentContainer.get().showIssueDetailsDisplay(selected);
  }
);
  container.getChildren().add(details);
  return container;
}
Program: 135523
Project: 135523
Buggy source:
private void setupMainStage(Scene scene){
  mainStage.setTitle("String_Node_Str");
  mainStage.setMinWidth(800);
  mainStage.setMinHeight(600);
  mainStage.setScene(scene);
  mainStage.show();
  mainStage.setOnCloseRequest(e -> {
    ServiceManager.getInstance().stopModelUpdate();
    columns.saveSession();
  }
);
}

Fixed version (ground truth):
private void setupMainStage(Scene scene){
  mainStage.setTitle("String_Node_Str");
  mainStage.setMinWidth(800);
  mainStage.setMinHeight(600);
  mainStage.setScene(scene);
  mainStage.show();
  mainStage.setOnCloseRequest(e -> {
    ServiceManager.getInstance().stopModelUpdate();
    columns.saveSession();
    Platform.exit();
    System.exit(0);
  }
);
}
Program: 135524
Project: 135524
Buggy source:
public static void loadFonts(){
  Font res=Font.loadFont(UI.class.getResource("String_Node_Str").toExternalForm(),24);
}

Fixed version (ground truth):
public static void loadFonts(){
  Font.loadFont(UI.class.getResource("String_Node_Str").toExternalForm(),24);
}
Program: 135525
Project: 135525
Buggy source:
@Override public void run(){
  list.removeAll(removed);
  newList.stream().forEach(item -> updateCachedListItem((Listable)item,list));
}

Fixed version (ground truth):
@Override public void run(){
  list.removeAll(removed);
  newList.stream().forEachOrdered(item -> updateCachedListItem((Listable)item,list));
}
Program: 135526
Project: 135526
Buggy source:
private void standardiseStatusLabels(List<Label> ghLabels){
  List<String> defaultStatuses=Defaults.getDefaultStatusLabels();
  List<String> projectLabels=new ArrayList<String>();
  ghLabels.stream().forEach(label -> projectLabels.add(label.getName()));
  defaultStatuses.removeAll(projectLabels);
  for (  String standardStatus : defaultStatuses) {
    Label statusLabel=new Label();
    statusLabel.setName(standardStatus);
    if (standardStatus.endsWith("String_Node_Str") || standardStatus.endsWith("String_Node_Str") || standardStatus.endsWith("String_Node_Str")|| standardStatus.endsWith("String_Node_Str")) {
      statusLabel.setColor("String_Node_Str");
    }
 else {
      statusLabel.setColor("String_Node_Str");
    }
    try {
      ghLabels.add(ServiceManager.getInstance().createLabel(statusLabel));
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
private void standardiseStatusLabels(List<Label> ghLabels){
  List<String> defaultStatuses=Defaults.getDefaultStatusLabels();
  List<String> projectLabels=new ArrayList<String>();
  for (  Label label : ghLabels) {
    projectLabels.add(label.getName());
  }
  defaultStatuses.removeAll(projectLabels);
  for (  String standardStatus : defaultStatuses) {
    Label statusLabel=new Label();
    statusLabel.setName(standardStatus);
    if (standardStatus.endsWith("String_Node_Str") || standardStatus.endsWith("String_Node_Str") || standardStatus.endsWith("String_Node_Str")|| standardStatus.endsWith("String_Node_Str")) {
      statusLabel.setColor("String_Node_Str");
    }
 else {
      statusLabel.setColor("String_Node_Str");
    }
    try {
      ghLabels.add(ServiceManager.getInstance().createLabel(statusLabel));
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}
Program: 135527
Project: 135527
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().forEach(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));
    }
  }
);
}
Program: 135528
Project: 135528
Buggy source:
public void setAvatarUrl(String url){
  this.avatarUrl=url;
}

Fixed version (ground truth):
public void setAvatarUrl(String url){
  if (url != null) {
    this.avatarUrl=url;
  }
}
Program: 135529
Project: 135529
Buggy source:
public Image getAvatar(){
  if (avatar == null) {
    avatar=new Image(getAvatarUrl(),12,12,true,false);
  }
  return avatar;
}

Fixed version (ground truth):
public Image getAvatar(){
  if (avatarUrl == "String_Node_Str") {
    return null;
  }
  if (avatar == null) {
    avatar=new Image(getAvatarUrl(),12,12,true,false);
  }
  return avatar;
}
Program: 135530
Project: 135530
Buggy source:
private void updateCommentsInList(Comment comment){
  int index=getCommentsInListWithId(comment.getId());
  if (index != -1) {
    commentsList.set(index,comment);
  }
 else {
    commentsList.add(0,comment);
  }
}

Fixed version (ground truth):
private void updateCommentsInList(Comment comment){
  int index=getCommentsInListWithId(comment.getId());
  Platform.runLater(new Runnable(){
    @Override public void run(){
      if (index != -1) {
        commentsList.set(index,comment);
      }
 else {
        commentsList.add(0,comment);
      }
    }
  }
);
}
Program: 135531
Project: 135531
Buggy source:
@Override protected void loadTopBar(){
  topBar.setSpacing(100);
  topBar.getChildren().addAll(createCommentsDetailsDisplay(),createControlsBox());
}

Fixed version (ground truth):
@Override protected void loadTopBar(){
  HBox commentsDetailsDisp=createCommentsDetailsDisplay();
  HBox controlsBox=createControlsBox();
  topBar.setSpacing(100);
  topBar.getChildren().addAll(commentsDetailsDisp,controlsBox);
}
Program: 135532
Project: 135532
Buggy source:
protected void addListViewCellReference(Long commentId,DetailsCell cell){
  displayedCells.put(commentId,cell);
}

Fixed version (ground truth):
protected void addListViewCellReference(Long commentId,DetailsCell cell){
  displayedCells.put(commentId,cell);
  resizeListView();
}
Program: 135533
Project: 135533
Buggy source:
protected void resizeListView(){
  List<Long> displayedIDs=detailsList.stream().map(item -> item.getId()).collect(Collectors.toList());
  double height;
  if (displayedIDs.size() == 0) {
    height=0;
  }
 else {
    Optional<Double> totalHeight=displayedIDs.stream().map(id -> getHeightOfCommentCell(id)).reduce((accum,val) -> accum + val);
    height=Math.min(totalHeight.get(),LIST_MAX_HEIGHT);
  }
  listView.setPrefHeight(height);
}

Fixed version (ground truth):
protected void resizeListView(){
  List<Long> displayedIDs=detailsList.stream().map(item -> item.getId()).collect(Collectors.toList());
  double height;
  int size=displayedIDs.size();
  if (size == 0) {
    height=0;
  }
 else   if (size > 10) {
    height=LIST_MAX_HEIGHT;
  }
 else {
    Optional<Double> totalHeight=displayedIDs.stream().map(id -> getHeightOfCommentCell(id)).reduce((accum,val) -> accum + val);
    height=Math.min(totalHeight.get(),LIST_MAX_HEIGHT);
  }
  listView.setPrefHeight(height);
}
Program: 135534
Project: 135534
Buggy source:
public IssueDetailsContentHandler(TurboIssue issue){
  this.issue=issue;
  setupContent();
}

Fixed version (ground truth):
public IssueDetailsContentHandler(TurboIssue issue){
  this.issue=issue;
}
Program: 135535
Project: 135535
Buggy source:
public boolean isIssueLog(){
  return body.get().startsWith(ServiceManager.CHANGELOG_TAG);
}

Fixed version (ground truth):
public boolean isIssueLog(){
  String text=getBodyText();
  if (text == null) {
    text=getBody();
  }
  return text.startsWith(ServiceManager.CHANGELOG_TAG);
}
Program: 135536
Project: 135536
Buggy source:
public List<Comment> getComments(int issueId) throws IOException {
  ArrayList<Comment> comments=new ArrayList<Comment>();
  User testUser=new User();
  testUser.setLogin("String_Node_Str");
  Comment comment1=new Comment();
  comment1.setBody("String_Node_Str");
  comment1.setId(1);
  comment1.setUser(testUser);
  comment1.setCreatedAt(new Date());
  Comment comment2=new Comment();
  comment2.setBody("String_Node_Str");
  comment2.setId(3);
  comment2.setUser(testUser);
  comment2.setCreatedAt(new Date());
  Comment log1=new Comment();
  log1.setBody(ServiceManager.CHANGELOG_TAG + "String_Node_Str");
  log1.setId(2);
  log1.setUser(testUser);
  log1.setCreatedAt(new Date());
  comments.add(comment1);
  comments.add(log1);
  comments.add(comment2);
  return comments;
}

Fixed version (ground truth):
public List<Comment> getComments(int issueId) throws IOException {
  ArrayList<Comment> comments=new ArrayList<Comment>();
  User testUser=new User();
  testUser.setLogin("String_Node_Str");
  User anotherUser=new User();
  testUser.setLogin("String_Node_Str");
  Comment comment1=new Comment();
  comment1.setBody("String_Node_Str");
  comment1.setId(1);
  comment1.setUser(testUser);
  comment1.setCreatedAt(new Date());
  Comment comment2=new Comment();
  comment2.setBody("String_Node_Str");
  comment2.setId(3);
  comment2.setUser(anotherUser);
  comment2.setCreatedAt(new Date());
  Comment log1=new Comment();
  log1.setBody(ServiceManager.CHANGELOG_TAG + "String_Node_Str");
  log1.setId(2);
  log1.setUser(testUser);
  log1.setCreatedAt(new Date());
  comments.add(comment1);
  comments.add(log1);
  comments.add(comment2);
  return comments;
}