Buggy code:
public class MatrixOverviewController { @ FXML private TableView < Matrix > matrixTable ; @ FXML private TableColumn < Matrix , String > nameColumn ; @ FXML private TableColumn < Matrix , Integer > numRowsColumn ; @ FXML private TableColumn < Matrix , Integer > numColsColumn ; @ FXML private Label nameLabel ; @ FXML private Label numRowsLabel ; @ FXML private Label numColsLabel ; @ FXML private Label createdDateLabel ; private MainApp mainApp ; public MatrixOverviewController ( ) { } @ FXML private void initialize ( ) { } public void setMainApp ( MainApp mainApp ) { } private void showMatrixDetails ( Matrix matrix ) { } @ FXML private void handleNewMatrix ( ) { Wizard wizard = new Wizard ( ) ; wizard . setTitle ( "Create<seq2seq4repair_space>New<seq2seq4repair_space>Matrix" ) ; int row = 0 ; GridPane page1Grid = new GridPane ( ) ; page1Grid . setVgap ( 10 ) ; page1Grid . setHgap ( 10 ) ; page1Grid . add ( new Label ( "Name:" ) , 0 , row ) ; TextField txFirstName = createTextField ( "name" , 80 ) ; page1Grid . add ( txFirstName , 1 , ( row ++ ) ) ; page1Grid . add ( new Label ( "Number<seq2seq4repair_space>of<seq2seq4repair_space>rows:" ) , 0 , row ) ; TextField txNumRows = createTextField ( "numRows" , 80 ) ; page1Grid . add ( txNumRows , 1 , ( row ++ ) ) ; page1Grid . add ( new Label ( "Number<seq2seq4repair_space>of<seq2seq4repair_space>columns:" ) , 0 , row ) ; TextField txNumCols = createTextField ( "numCols" , 80 ) ; page1Grid . add ( txNumCols , 1 , row ) ; WizardPane page1 = new WizardPane ( ) ; page1 . setHeaderText ( "Please<seq2seq4repair_space>Enter<seq2seq4repair_space>Matrix<seq2seq4repair_space>Details" ) ; page1 . setContent ( page1Grid ) ; final WizardPane page2 = new WizardPane ( ) { @ Override public void onEnteringPage ( Wizard wizard ) { String name = ( ( String ) ( wizard . getSettings ( ) . get ( "name" ) ) ) ; int numRows = Integer . parseInt ( ( ( String ) ( wizard . getSettings ( ) . get ( "numRows" ) ) ) ) ; int numCols = Integer . parseInt ( ( ( String ) ( wizard . getSettings ( ) . get ( "numCols" ) ) ) ) ; GridPane page2Grid = new GridPane ( ) ; for ( int i = 0 ; i < numRows ; i ++ ) { for ( int j = 0 ; j < numCols ; j ++ ) { TextField tx = createTextField ( ( ( ( "" + i ) + "<seq2seq4repair_space>" ) + j ) , 20 ) ; tx . setPromptText ( "Enter<seq2seq4repair_space>value" ) ; page2Grid . add ( tx , j , i ) ; } } page2Grid . setHgap ( 5 ) ; page2Grid . setVgap ( 10 ) ; setContent ( page2Grid ) ; } } ; page2 . setHeaderText ( "Creating<seq2seq4repair_space>Matrix" ) ; WizardPane page3 = new WizardPane ( ) { @ Override public void onEnteringPage ( Wizard wizard ) { String name = ( ( String ) ( wizard . getSettings ( ) . get ( "name" ) ) ) ; int numRows = Integer . parseInt ( ( ( String ) ( wizard . getSettings ( ) . get ( "numRows" ) ) ) ) ; int numCols = Integer . parseInt ( ( ( String ) ( wizard . getSettings ( ) . get ( "numCols" ) ) ) ) ; double [ ] [ ] data = new double [ numRows ] [ numCols ] ; double currentData ; for ( int i = 0 ; i < numRows ; i ++ ) { for ( int j = 0 ; j < numCols ; j ++ ) { String raw = ( ( String ) ( wizard . getSettings ( ) . get ( ( ( ( "" + i ) + "<seq2seq4repair_space>" ) + j ) ) ) ) ; try { currentData = Double . valueOf ( raw ) ; } catch ( NumberFormatException e ) { currentData = 0 ; } data [ i ] [ j ] = currentData ; } } <START_BUG> mainApp . getMatrixData ( ) . add ( new Matrix ( name , data ) ) ; <END_BUG> } } ; page3 . setHeaderText ( "Goodbye!" ) ; page3 . setContentText ( "Matrix<seq2seq4repair_space>created." ) ; wizard . setFlow ( new org . controlsfx . dialog . Wizard . LinearFlow ( page1 , page2 , page3 ) ) ; wizard . showAndWait ( ) ; } @ FXML private void handleEditMatrix ( ) { } @ FXML private void handleDeleteMatrix ( ) { } @ FXML private void handleShowData ( ) { } private void alertMatrixData ( Matrix matrix ) { } @ FXML private void handleCalculateRREF ( ) { } private TextField createTextField ( String id , int width ) { } }

Fix:
mainApp . getMatrixData ( ) . add ( new Matrix ( name , data , null ) ) ;