Buggy code:
public class CLIConnection { private HotelSystem hotel ; private CLI cli ; private User user ; private int state ; public CLIConnection ( ) { } private void login ( ) { } private void checkIn ( ) { } private void checkOut ( ) { } public void createRoom ( Floor floor ) { } enum roomOption { BROWSE , CREATE_ROOM , REMOVE_ROOM , CHANGE_PRICE , CHANGE_AVAILABILITY , CHANGE_RATING , RETURN ; } private void modRoom ( Floor floor ) { } enum floorOption { CREATE_FLOOR , REMOVE_FLOOR , BROWSE , MODIFY_ROOM , RETURN ; } private void modFloor ( int building ) { Building b = hotel . getBuilding ( ( building - 1 ) ) ; ArrayList < CLIConnection . floorOption > options = new ArrayList ( ) ; int item = 1 ; options . add ( CLIConnection . floorOption . BROWSE ) ; CLI . println ( "%d)<seq2seq4repair_space>Browse<seq2seq4repair_space>floors" , ( item ++ ) ) ; if ( ( ( user ) != null ) && ( user . hasPermission ( CAN_MODIFY_BUILDING ) ) ) { options . add ( CLIConnection . floorOption . CREATE_FLOOR ) ; CLI . println ( "%d)<seq2seq4repair_space>Create<seq2seq4repair_space>floor" , ( item ++ ) ) ; options . add ( CLIConnection . floorOption . REMOVE_FLOOR ) ; CLI . println ( "%d)<seq2seq4repair_space>Delete<seq2seq4repair_space>floor" , ( item ++ ) ) ; options . add ( CLIConnection . floorOption . MODIFY_ROOM ) ; CLI . println ( "%d)<seq2seq4repair_space>Modify<seq2seq4repair_space>room" , ( item ++ ) ) ; } options . add ( CLIConnection . floorOption . RETURN ) ; CLI . println ( "%d)<seq2seq4repair_space>Return" , ( item ++ ) ) ; item = CLI . getSelection ( ) ; switch ( options . get ( ( item - 1 ) ) ) { case BROWSE : { CLI . println ( "There<seq2seq4repair_space>are<seq2seq4repair_space>currently<seq2seq4repair_space>%d<seq2seq4repair_space>floor." , b . getNumOfFloors ( ) ) ; for ( int x = 0 ; x < ( b . getNumOfFloors ( ) ) ; x ++ ) { CLI . println ( "Floor<seq2seq4repair_space>%d:" , ( x + 1 ) ) ; try { CLI . println ( ( "\t" + ( b . getFloor ( x ) . toString ( ) ) ) ) ; } catch ( Exception e ) { } } modFloor ( building ) ; break ; } case CREATE_FLOOR : { <START_BUG> b . createFloor ( ) ; <END_BUG> CLI . println ( "New<seq2seq4repair_space>floor<seq2seq4repair_space>added!" ) ; modFloor ( building ) ; break ; } case REMOVE_FLOOR : { CLI . println ( "Input<seq2seq4repair_space>floor<seq2seq4repair_space>number<seq2seq4repair_space>(1-%d):" , b . getNumOfFloors ( ) ) ; try { int floor = CLI . getSelection ( ) ; if ( ( ( floor < 0 ) || ( floor > ( b . getNumOfFloors ( ) ) ) ) || ( ( b . getFloor ( ( floor - 1 ) ) ) == null ) ) { CLI . println ( "Invalid<seq2seq4repair_space>floor." ) ; modFloor ( building ) ; return ; } b . removeFloor ( b . getFloor ( ( floor - 1 ) ) ) ; } catch ( Exception e ) { } modFloor ( building ) ; break ; } case MODIFY_ROOM : { CLI . println ( "Input<seq2seq4repair_space>floor<seq2seq4repair_space>number<seq2seq4repair_space>(1-%d)" , b . getNumOfFloors ( ) ) ; int floor = CLI . getSelection ( ) ; Floor f = null ; try { f = b . getFloor ( ( floor - 1 ) ) ; if ( ( ( floor < 0 ) || ( floor > ( b . getNumOfFloors ( ) ) ) ) || ( f == null ) ) { CLI . println ( "Invalid<seq2seq4repair_space>floor." ) ; modFloor ( building ) ; return ; } } catch ( Exception e ) { CLI . println ( "Error<seq2seq4repair_space>getting<seq2seq4repair_space>floor<seq2seq4repair_space>number" ) ; } modRoom ( f ) ; } default : modBuilding ( ) ; } } enum buildingOption { CREATE_BUILDING , REMOVE_BUILDING , MODIFY_FLOOR , BROWSE , RETURN ; } private void modBuilding ( ) { } private void setDiscount ( ) { } private void createCustomer ( ) { } private void createEmployee ( ) { } private Date getDate ( String dateStr ) { } private void viewRooms ( ) { } enum menuOption { SET_DISCOUNT , CHECKIN , CHECKOUT , LOGIN , LOGOUT , BROWSE , CREATE_RESERVATION , CREATE_EMPLOYEE , CREATE_CUSTOMER , EXIT , MOD_BUILDING , REMOVE_ROOM ; } public boolean menu ( ) { } }

Fix:
hotel . createFloor ( ( building - 1 ) ) ;