Buggy code:
public class Inventory { public static HashMap < String , Account > accounts = new HashMap < > ( ) ; public static Scanner scanner = new Scanner ( System . in ) ; public static void main ( String [ ] args ) { Account alice = new Account ( "Alice" , "pass1" ) ; Account bob = new Account ( "Bob" , "pass2" ) ; Account charlie = new Account ( "Charlie" , "pass3" ) ; Inventory . accounts . put ( alice . name , alice ) ; Inventory . accounts . put ( bob . name , bob ) ; Inventory . accounts . put ( charlie . name , charlie ) ; while ( true ) { System . out . print ( "Please<seq2seq4repair_space>enter<seq2seq4repair_space>user<seq2seq4repair_space>name<seq2seq4repair_space>to<seq2seq4repair_space>login:<seq2seq4repair_space>" ) ; String userName = Inventory . scanner . nextLine ( ) ; if ( Inventory . accounts . containsKey ( userName ) ) { System . out . print ( "Please<seq2seq4repair_space>enter<seq2seq4repair_space>password:<seq2seq4repair_space>" ) ; String userPass = Inventory . scanner . nextLine ( ) ; if ( Inventory . accounts . get ( userName ) . password . equals ( userPass ) ) { System . out . printf ( "Welcome<seq2seq4repair_space>%s\n" , userName ) ; while ( true ) { int i = 1 ; for ( InventoryItem item : Inventory . accounts . get ( userName ) . items ) { System . out . printf ( "%d.<seq2seq4repair_space>%s:<seq2seq4repair_space>[%s]<seq2seq4repair_space>%s\n\n" , i , item . category , item . quantity , item . name ) ; i ++ ; } System . out . println ( "1.<seq2seq4repair_space>Add<seq2seq4repair_space>new<seq2seq4repair_space>item" ) ; System . out . println ( "2.<seq2seq4repair_space>Remove<seq2seq4repair_space>item" ) ; System . out . println ( "3.<seq2seq4repair_space>Update<seq2seq4repair_space>item<seq2seq4repair_space>quantity" ) ; System . out . println ( "4.<seq2seq4repair_space>Logout" ) ; String option = Inventory . scanner . nextLine ( ) ; if ( option . equals ( "1" ) ) { System . out . print ( "Enter<seq2seq4repair_space>new<seq2seq4repair_space>item:<seq2seq4repair_space>" ) ; String name = Inventory . scanner . nextLine ( ) ; System . out . printf ( "Enter<seq2seq4repair_space>the<seq2seq4repair_space>quantity<seq2seq4repair_space>of<seq2seq4repair_space>%ss:<seq2seq4repair_space>" , name ) ; String quantity = Inventory . scanner . nextLine ( ) ; Inventory . accounts . get ( userName ) . items . add ( Inventory . createItem ( name , quantity ) ) ; } else if ( option . equals ( "2" ) ) { System . out . print ( "Enter<seq2seq4repair_space>the<seq2seq4repair_space>index<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>item<seq2seq4repair_space>you<seq2seq4repair_space>want<seq2seq4repair_space>to<seq2seq4repair_space>remove:<seq2seq4repair_space>" ) ; int itemNum = Integer . valueOf ( Inventory . scanner . nextLine ( ) ) ; Inventory . accounts . get ( userName ) . items . remove ( ( itemNum - 1 ) ) ; } else if ( option . equals ( "3" ) ) { System . out . print ( "Enter<seq2seq4repair_space>the<seq2seq4repair_space>index<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>item<seq2seq4repair_space>you<seq2seq4repair_space>would<seq2seq4repair_space>like<seq2seq4repair_space>to<seq2seq4repair_space>update:<seq2seq4repair_space>" ) ; int itemNum = Integer . valueOf ( Inventory . scanner . nextLine ( ) ) ; InventoryItem itemChoice = Inventory . accounts . get ( userName ) . items . get ( ( itemNum - 1 ) ) ; <START_BUG> System . out . printf ( "How<seq2seq4repair_space>much<seq2seq4repair_space>would<seq2seq4repair_space>you<seq2seq4repair_space>like<seq2seq4repair_space>to<seq2seq4repair_space>add<seq2seq4repair_space>to<seq2seq4repair_space>%s:<seq2seq4repair_space>" , itemChoice ) ; <END_BUG> itemChoice . quantity = Inventory . scanner . nextLine ( ) ; } else if ( option . equals ( "4" ) ) { System . out . printf ( "Goodbye<seq2seq4repair_space>%s\n" , userName ) ; break ; } else { System . out . println ( "Invalid<seq2seq4repair_space>Response!!!" ) ; } } } else { System . out . println ( "Invalid<seq2seq4repair_space>user<seq2seq4repair_space>name//password" ) ; } } else { System . out . printf ( "An<seq2seq4repair_space>account<seq2seq4repair_space>for<seq2seq4repair_space>%s<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist,<seq2seq4repair_space>would<seq2seq4repair_space>you<seq2seq4repair_space>like<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>a<seq2seq4repair_space>new<seq2seq4repair_space>account?<seq2seq4repair_space>[y//n]<seq2seq4repair_space>" , userName ) ; String yOrN = Inventory . scanner . nextLine ( ) ; switch ( yOrN ) { case "y" : System . out . printf ( "Please<seq2seq4repair_space>enter<seq2seq4repair_space>a<seq2seq4repair_space>new<seq2seq4repair_space>password<seq2seq4repair_space>for<seq2seq4repair_space>%s:<seq2seq4repair_space>" , userName ) ; String userPass = Inventory . scanner . nextLine ( ) ; Inventory . accounts . put ( new Account ( userName , userPass ) . name , new Account ( userName , userPass ) ) ; break ; case "n" : System . out . println ( "Goodbye" ) ; break ; } } } } static InventoryItem createItem ( String name , String quantity ) { } }

Fix:
System . out . printf ( "How<seq2seq4repair_space>much<seq2seq4repair_space>would<seq2seq4repair_space>you<seq2seq4repair_space>like<seq2seq4repair_space>to<seq2seq4repair_space>add<seq2seq4repair_space>to<seq2seq4repair_space>%s:<seq2seq4repair_space>" , itemChoice . name ) ;