Source:
<code>private void updateDetails() { issueDetails.getChildren().clear(); TurboIssue issue = guiElement.getIssue(); if (issue.isPullRequest()) { Label icon = new Label(OCTICON_PULL_REQUEST); icon.getStyleClass().addAll("octicon", "issue-pull-request-icon"); issueDetails.getChildren().add(icon); } if (issue.getCommentCount() > 0){ Label commentIcon = new Label(OCTICON_COMMENT); commentIcon.getStyleClass().addAll("octicon", "comments-label-button"); Label commentCount = new Label(Integer.toString(issue.getCommentCount())); if (issuesWithNewComments.contains(issue.getId())) { commentIcon.getStyleClass().add("has-comments"); commentCount.getStyleClass().add("has-comments"); } issueDetails.getChildren().add(commentIcon); issueDetails.getChildren().add(commentCount); } if (issue.getMilestone().isPresent() && guiElement.getMilestone().isPresent()) { TurboMilestone milestone = guiElement.getMilestone().get(); issueDetails.getChildren().add(new Label(milestone.getTitle())); } if (issue.isPullRequest()) { HBox authorBox = createDisplayUserBox(guiElement.getAuthor(), issue.getCreator()); issueDetails.getChildren().add(authorBox); if (issue.getAssignee().isPresent()) { Label rightArrow = new Label(OCTICON_ARROW_RIGHT); rightArrow.getStyleClass().addAll("octicon", "pull-request-assign-icon"); issueDetails.getChildren().add(rightArrow); } } if (issue.getAssignee().isPresent()) { HBox assigneeBox = createDisplayUserBox(guiElement.getAssignee(), issue.getAssignee().get()); issueDetails.getChildren().add(assigneeBox); } <START> guiElement.getLabels().stream().forEach(label -> issueDetails.getChildren().add(label.getNode())); <END> }</code><technical_language>forEach, need for intermediate stream</technical_language>

Target:
private void updateDetails() { issueDetails.getChildren().clear(); TurboIssue issue = guiElement.getIssue(); if (issue.isPullRequest()) { Label icon = new Label(OCTICON_PULL_REQUEST); icon.getStyleClass().addAll("octicon", "issue-pull-request-icon"); issueDetails.getChildren().add(icon); } if (issue.getCommentCount() > 0){ Label commentIcon = new Label(OCTICON_COMMENT); commentIcon.getStyleClass().addAll("octicon", "comments-label-button"); Label commentCount = new Label(Integer.toString(issue.getCommentCount())); if (issuesWithNewComments.contains(issue.getId())) { commentIcon.getStyleClass().add("has-comments"); commentCount.getStyleClass().add("has-comments"); } issueDetails.getChildren().add(commentIcon); issueDetails.getChildren().add(commentCount); } if (issue.getMilestone().isPresent() && guiElement.getMilestone().isPresent()) { TurboMilestone milestone = guiElement.getMilestone().get(); issueDetails.getChildren().add(new Label(milestone.getTitle())); } if (issue.isPullRequest()) { HBox authorBox = createDisplayUserBox(guiElement.getAuthor(), issue.getCreator()); issueDetails.getChildren().add(authorBox); if (issue.getAssignee().isPresent()) { Label rightArrow = new Label(OCTICON_ARROW_RIGHT); rightArrow.getStyleClass().addAll("octicon", "pull-request-assign-icon"); issueDetails.getChildren().add(rightArrow); } } if (issue.getAssignee().isPresent()) { HBox assigneeBox = createDisplayUserBox(guiElement.getAssignee(), issue.getAssignee().get()); issueDetails.getChildren().add(assigneeBox); } guiElement.getLabels().forEach(label -> issueDetails.getChildren().add(label.getNode())); }