Buggy code:
public class WorkBenchControllerFinal { private DBController dbController ; private File file ; private Label labelFilePath = new Label ( ) ; private File directory ; private Label labelDirPath = new Label ( ) ; private String casePath = "" ; private int currentCaseID = - 1 ; private int currentDirID = 0 ; private String currentDir = "" ; @ FXML private ScrollPane MainResultPane ; @ FXML private StackPane timeLineViewPane ; ArrayList < String > functionList ; @ FXML private MenuItem newClick ; @ FXML private Menu openMenu ; @ FXML private MenuItem exitClick ; @ FXML private Menu analysisMenu ; @ FXML private HBox functionHBox ; @ FXML private Label progressLabel ; private MainAppFinal mainAppFinal ; private PluginManager pm ; private ProgressBar importProgressIndicator ; public WorkBenchControllerFinal ( ) { } @ FXML private void initialize ( ) { List < String > plnames = pm . getGUIViewPluginNames ( ) ; System . out . println ( plnames . size ( ) ) ; for ( String s : plnames ) { System . out . println ( ( "PLUG:<seq2seq4repair_space>" + s ) ) ; functionList . add ( s ) ; } dbController = new DBQueryController ( ) ; if ( ( dbController . getDeviceID ( ) ) == ( - 1 ) ) { Label noDevice = new Label ( "No<seq2seq4repair_space>device<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>chosen." ) ; MainResultPane . setContent ( noDevice ) ; } for ( String functionName : functionList ) { CheckMenuItem newFuctionCheck = new CheckMenuItem ( functionName ) ; newFuctionCheck . setSelected ( true ) ; analysisMenu . getItems ( ) . add ( newFuctionCheck ) ; Button newBtn = new Button ( functionName ) ; newBtn . setTooltip ( new Tooltip ( functionName ) ) ; newBtn . setPrefHeight ( 40 ) ; newBtn . setStyle ( "-fx-font-size:<seq2seq4repair_space>16;" ) ; functionHBox . getChildren ( ) . add ( newBtn ) ; <START_BUG> if ( functionName . equals ( "Folder<seq2seq4repair_space>Structure" ) ) { <END_BUG> newBtn . setOnMouseClicked ( new EventHandler < MouseEvent > ( ) { @ Override public void handle ( MouseEvent event ) { if ( ( dbController . getDeviceID ( ) ) != ( - 1 ) ) { } else { Label noDevice = new Label ( "No<seq2seq4repair_space>device<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>chosen." ) ; MainResultPane . setContent ( noDevice ) ; } updateProgress ( ( "Current<seq2seq4repair_space>selected<seq2seq4repair_space>tool:<seq2seq4repair_space>" + functionName ) ) ; } } ) ; } else { Plugin pl = pm . getPluginWithName ( functionName ) ; if ( pl != null ) { newBtn . setOnMouseClicked ( new EventHandler < MouseEvent > ( ) { @ Override public void handle ( MouseEvent event ) { if ( ( dbController . getDeviceID ( ) ) != ( - 1 ) ) { if ( functionName . equals ( "Time<seq2seq4repair_space>Line" ) ) { List params = new ArrayList ( ) ; params . add ( ( ( ( ( "output" + ( File . separator ) ) + "mtd8.dd" ) + ( File . separator ) ) + "mtd8.dd" ) ) ; params . add ( "analysis" ) ; pl . setParameter ( params ) ; } if ( functionName . equals ( "Location<seq2seq4repair_space>History" ) ) { List params = new ArrayList ( ) ; params . add ( ( ( ( ( "output" + ( File . separator ) ) + "mtd8.dd" ) + ( File . separator ) ) + "mtd8.dd" ) ) ; params . add ( "android" ) ; pl . setParameter ( params ) ; } addPluginView ( pl ) ; } else { Label noDevice = new Label ( "No<seq2seq4repair_space>device<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>chosen." ) ; MainResultPane . setContent ( noDevice ) ; } updateProgress ( ( "Current<seq2seq4repair_space>selected<seq2seq4repair_space>tool:<seq2seq4repair_space>" + functionName ) ) ; } } ) ; } } newFuctionCheck . setOnAction ( ( event ) -> { if ( newFuctionCheck . isSelected ( ) ) { functionHBox . getChildren ( ) . add ( newBtn ) ; } else { functionHBox . getChildren ( ) . remove ( newBtn ) ; } } ) ; } newClick . setOnAction ( new EventHandler < ActionEvent > ( ) { @ Override public void handle ( ActionEvent event ) { FileChooser fileChooser = new FileChooser ( ) ; file = fileChooser . showOpenDialog ( null ) ; labelFilePath . setText ( file . getPath ( ) ) ; System . out . println ( labelFilePath ) ; } } ) ; newClick . setOnAction ( this :: handleNewDirectory ) ; refreshDeviceList ( ) ; exitClick . setOnAction ( new EventHandler < ActionEvent > ( ) { @ Override public void handle ( ActionEvent event ) { Platform . exit ( ) ; System . exit ( 0 ) ; } } ) ; } private void addPluginView ( Plugin pl ) { } private ArrayList < Device > getExisitingDevices ( ) { } private void loadExistingDevice ( int deviceID ) { } private void refreshCase ( int deviceID ) { } private void refreshDeviceList ( ) { } public void updateProgress ( String progress ) { } public void setMainApp ( MainAppFinal mainAppFinal ) { } private void handleNewDirectory ( ActionEvent event ) { } private Stage createProgressDialog ( ) { } public boolean validationOfFilters ( ) { } }

Fix:
if ( functionName . equals ( "" ) ) {