Buggy code:
} else { size = "Footlong" ; } sizeA . add ( size ) ; ingredients . put ( "Size" , sizeA ) ; if ( ( ran [ 2 ] ) == 5 ) { String bacon ; bacon = "Add<seq2seq4repair_space>Bacon" ; baconA . add ( bacon ) ; ingredients . put ( "Bacon" , baconA ) ; } if ( ( ( ran [ 1 ] ) == 20 ) && ( ( ran [ 3 ] ) != 17 ) ) { String doubleMeat ; doubleMeat = "Double<seq2seq4repair_space>Meat" ; doubleMeatA . add ( doubleMeat ) ; ingredients . put ( "DoubleMeat" , doubleMeatA ) ; arrayTwo [ 3 ] = ( r . nextInt ( ( 20 - min ) ) ) + min ; meatA . add ( arrayTwo [ 3 ] ) ; meatA . add ( ran [ 3 ] ) ; ingredients . put ( "Meat" , meatA ) ; } else { meatA . add ( ran [ 3 ] ) ; ingredients . put ( "Meat" , meatA ) ; } breadA . add ( ran [ 7 ] ) ; ingredients . put ( "Bread" , breadA ) ; if ( ( ran [ 8 ] ) == 1 ) { String doubleCheese ; doubleCheese = "Double<seq2seq4repair_space>Cheese" ; doubleCheeseA . add ( doubleCheese ) ; ingredients . put ( "DoubleCheese" , doubleCheeseA ) ; arrayTwo [ 12 ] = ( r . nextInt ( ( 5 - min ) ) ) + min ; cheeseA . add ( arrayTwo [ 12 ] ) ; cheeseA . add ( ran [ 12 ] ) ; ingredients . put ( "Cheese" , cheeseA ) ; } else if ( ( ran [ 8 ] ) == 20 ) { String noCheese ; noCheese = "No<seq2seq4repair_space>Cheese" ; doubleCheeseA . add ( noCheese ) ; ingredients . put ( "DoubleCheese" , doubleCheeseA ) ; } else { cheeseA . add ( ran [ 12 ] ) ; ingredients . put ( "Cheese" , cheeseA ) ; } if ( ( ran [ 5 ] ) == 1 ) { String toasted ; toasted = "Toasted" ; toastedA . add ( toasted ) ; ingredients . put ( "Toasted" , toastedA ) ; } if ( ( ( ran [ 4 ] ) == 1 ) && ( ( ran [ 3 ] ) != 16 ) ) { String veg ; veg = "No<seq2seq4repair_space>Veg" ; noVegA . add ( veg ) ; ingredients . put ( "NoVeg" , noVegA ) ; } else if ( ( ( ran [ 4 ] ) > 0 ) && ( ( ran [ 4 ] ) != 11 ) ) { ArrayList < Integer > arrayThree = new ArrayList < > ( ) ; for ( int i = 1 ; i <= 11 ; i ++ ) arrayThree . add ( i ) ; vegA . add ( ran [ 10 ] ) ; int first = ( ran [ 10 ] ) - 1 ; arrayThree . remove ( first ) ; for ( int i = 1 ; i < ( ran [ 4 ] ) ; i ++ ) { int index = r . nextInt ( arrayThree . size ( ) ) ; vegA . add ( arrayThree . get ( index ) ) ; arrayThree . remove ( index ) ; } ingredients . put ( "Veg" , vegA ) ; } else if ( ( ran [ 4 ] ) == 11 ) { for ( int i = 1 ; i < 12 ; i ++ ) { vegA . add ( i ) ; } ingredients . put ( "Veg" , vegA ) ; } if ( ( ran [ 6 ] ) == 1 ) { dressingA . add ( ran [ 11 ] ) ; ingredients . put ( "Dressing" , dressingA ) ; } else { ArrayList < Integer > arrayThree = new ArrayList < > ( ) ; for ( int i = 1 ; i <= 9 ; i ++ ) arrayThree . add ( i ) ; int first = ( ran [ 11 ] ) - 1 ; arrayThree . remove ( first ) ; dressingA . add ( ran [ 11 ] ) ; arrayTwo [ 11 ] = r . nextInt ( arrayThree . size ( ) ) ; dressingA . add ( arrayThree . get ( arrayTwo [ 11 ] ) ) ; ingredients . put ( "Dressing" , dressingA ) ; } if ( ( ran [ 13 ] ) == 1 ) { seasoningsA . add ( ran [ 9 ] ) ; ingredients . put ( "Seasonings" , seasoningsA ) ; } else { if ( ( ran [ 9 ] ) == 3 ) { seasoningsA . add ( ran [ 9 ] ) ; seasoningsA . add ( 4 ) ; ingredients . put ( "Seasonings" , seasoningsA ) ; } else if ( ( ( ran [ 9 ] ) == 1 ) || ( ( ran [ 9 ] ) == 2 ) ) { seasoningsA . add ( ran [ 9 ] ) ; seasoningsA . add ( 4 ) ; } else { ArrayList < Integer > arrayThree = new ArrayList < > ( ) ; <START_BUG> for ( int i = 1 ; i <= 4 ; i ++ ) <END_BUG> arrayThree . add ( i ) ; int first = ( ran [ 9 ] ) - 1 ; arrayThree . remove ( first ) ; seasoningsA . add ( ran [ 9 ] ) ; arrayTwo [ 9 ] = r . nextInt ( arrayThree . size ( ) ) ; seasoningsA . add ( arrayThree . get ( arrayTwo [ 9 ] ) ) ; ingredients . put ( "Seasonings" , seasoningsA ) ; } } return ingredients ; } }

Fix:
for ( int i = 1 ; i < 4 ; i ++ )