Buggy code:
@ Component public class EditorService { @ Autowired private Current current ; @ Autowired private ApplicationController controller ; public Node createEditorVBox ( WebView webView ) { VBox vbox = new VBox ( ) ; MenuBar menuBar = new MenuBar ( ) ; menuBar . getStyleClass ( ) . add ( "editorToolsBar" ) ; String iconSize = "14.0" ; double minSize = 14.01 ; Label saveLabel = LabelBuilt . icon ( SAVE , iconSize , minSize ) . tip ( "Save" ) . click ( controller :: saveDoc ) . build ( ) ; Label newLabel = LabelBuilt . icon ( FILE_TEXT_ALT , iconSize , minSize ) . tip ( "New<seq2seq4repair_space>File" ) . click ( controller :: newDoc ) . build ( ) ; Label openLabel = LabelBuilt . icon ( FOLDER_ALTPEN_ALT , iconSize , minSize ) . tip ( "Open<seq2seq4repair_space>File" ) . click ( controller :: openDoc ) . build ( ) ; Label boldLabel = LabelBuilt . icon ( BOLD , iconSize , minSize ) . tip ( "Bold" ) . click ( ( event ) -> { current . currentEngine ( ) . executeScript ( "boldText()" ) ; } ) . build ( ) ; Label italicLabel = LabelBuilt . icon ( ITALIC , iconSize , minSize ) . tip ( "Italic" ) . click ( ( event ) -> { current . currentEngine ( ) . executeScript ( "italicizeText()" ) ; } ) . build ( ) ; <START_BUG> Label headerLabel = LabelBuilt . icon ( ITALIC , iconSize , minSize ) . tip ( "Headings" ) . click ( ( event ) -> { <END_BUG> current . currentEngine ( ) . executeScript ( "addHeading()" ) ; } ) . build ( ) ; Label codeLabel = LabelBuilt . icon ( CODE , iconSize , minSize ) . tip ( "Code<seq2seq4repair_space>Snippet" ) . click ( ( event ) -> { current . currentEngine ( ) . executeScript ( "addSourceCode()" ) ; } ) . build ( ) ; Label ulListLabel = LabelBuilt . icon ( LIST_UL , iconSize , minSize ) . tip ( "Bulleted<seq2seq4repair_space>List" ) . click ( ( event ) -> { current . currentEngine ( ) . executeScript ( "addUlList()" ) ; } ) . build ( ) ; Label olListLabel = LabelBuilt . icon ( LIST_ALTL , iconSize , minSize ) . tip ( "Numbered<seq2seq4repair_space>List" ) . click ( ( event ) -> { current . currentEngine ( ) . executeScript ( "addOlList()" ) ; } ) . build ( ) ; Label tableLabel = LabelBuilt . icon ( TABLE , iconSize , minSize ) . tip ( "Table" ) . click ( controller :: createTable ) . build ( ) ; Label imageLabel = LabelBuilt . icon ( IMAGE , iconSize , minSize ) . tip ( "Image" ) . click ( ( event ) -> { current . currentEngine ( ) . executeScript ( "addImageSection()" ) ; } ) . build ( ) ; Label subscriptLabel = LabelBuilt . icon ( SUBSCRIPT , iconSize , minSize ) . tip ( "Subscript" ) . click ( ( event ) -> { current . currentEngine ( ) . executeScript ( "subScript()" ) ; } ) . build ( ) ; Label superScriptLabel = LabelBuilt . icon ( SUPERSCRIPT , iconSize , minSize ) . tip ( "Superscript" ) . click ( ( event ) -> { current . currentEngine ( ) . executeScript ( "superScript()" ) ; } ) . build ( ) ; Label underlineLabel = LabelBuilt . icon ( UNDERLINE , iconSize , minSize ) . tip ( "Underline" ) . click ( ( event ) -> { current . currentEngine ( ) . executeScript ( "underlinedText()" ) ; } ) . build ( ) ; Label hyperlinkLabel = LabelBuilt . icon ( LINK , iconSize , minSize ) . tip ( "Hyperlink" ) . click ( ( event ) -> { current . currentEngine ( ) . executeScript ( "addHyperLink()" ) ; } ) . build ( ) ; Label strikethroughLabel = LabelBuilt . icon ( STRIKETHROUGH , iconSize , minSize ) . tip ( "Strikethrough" ) . click ( ( event ) -> { current . currentEngine ( ) . executeScript ( "addStrikeThroughText()" ) ; } ) . build ( ) ; Label openMenuLabel = LabelBuilt . icon ( CHEVRON_CIRCLE_DOWN , iconSize , minSize ) . tip ( "More..." ) . build ( ) ; openMenuLabel . setOnMouseClicked ( ( event ) -> { int childSize = vbox . getChildren ( ) . size ( ) ; if ( childSize == 2 ) { openMenuLabel . setText ( CHEVRON_CIRCLE_DOWN . toString ( ) ) ; Tooltip . install ( openMenuLabel , new Tooltip ( "More..." ) ) ; vbox . getChildren ( ) . remove ( 1 ) ; } else { openMenuLabel . setText ( CHEVRON_CIRCLE_UP . toString ( ) ) ; openMenuLabel . getProperties ( ) . clear ( ) ; vbox . getChildren ( ) . add ( createSecondEditorVBox ( iconSize ) ) ; } } ) ; menuBar . getMenus ( ) . addAll ( new Menu ( "" , newLabel ) , new Menu ( "" , openLabel ) , new Menu ( "" , saveLabel ) , new Menu ( "" , boldLabel ) , new Menu ( "" , italicLabel ) , new Menu ( "" , underlineLabel ) , new Menu ( "" , strikethroughLabel ) , new Menu ( "" , headerLabel ) , new Menu ( "" , hyperlinkLabel ) , new Menu ( "" , codeLabel ) , new Menu ( "" , ulListLabel ) , new Menu ( "" , olListLabel ) , new Menu ( "" , tableLabel ) , new Menu ( "" , imageLabel ) , new Menu ( "" , subscriptLabel ) , new Menu ( "" , superScriptLabel ) , new Menu ( "" , openMenuLabel ) ) ; ScrollPane scrollPane = new ScrollPane ( ) ;

Fix:
Label headerLabel = LabelBuilt . icon ( HEADER , iconSize , minSize ) . tip ( "Headings" ) . click ( ( event ) -> {