Buggy code:
public class Simpletron { private static final int MEMORY_SIZE = 100 ; private static final int MAX_WORD_SIZE = 9999 ; private static final int MIN_WORD_SIZE = - 9999 ; private static final int READ = 10 ; private static final int WRITE = 11 ; private static final int LOAD = 20 ; private static final int STORE = 21 ; private static final int ADD = 30 ; private static final int SUBTRACT = 31 ; private static final int DIVIDE = 32 ; private static final int MULTIPLY = 33 ; private static final int BRANCH = 40 ; private static final int BRANCHNEG = 41 ; private static final int BRANCHZERO = 42 ; private static final int HALT = 43 ; private int [ ] memory ; private int accumulator ; private int instructionCounter ; private int operationCode ; private int operand ; private int instructionRegister ; public Simpletron ( ) { } public void storeWord ( int index , int word ) { } private boolean isAccumulatorValid ( ) { } public void executeProgram ( ) { } public void dumpMemory ( ) { } private String formatWord ( int word ) { } private void fatalError ( String errorMessage ) { } public static void main ( String [ ] args ) { final int SENTINAL = - 99999 ; Scanner input = new Scanner ( System . in ) ; System . out . println ( "***<seq2seq4repair_space>Welcome<seq2seq4repair_space>to<seq2seq4repair_space>Simpletron!<seq2seq4repair_space>***" ) ; System . out . println ( "***<seq2seq4repair_space>Please<seq2seq4repair_space>enter<seq2seq4repair_space>your<seq2seq4repair_space>program<seq2seq4repair_space>one<seq2seq4repair_space>instruction<seq2seq4repair_space>***" ) ; System . out . println ( "***<seq2seq4repair_space>(or<seq2seq4repair_space>data<seq2seq4repair_space>word)<seq2seq4repair_space>at<seq2seq4repair_space>a<seq2seq4repair_space>time<seq2seq4repair_space>into<seq2seq4repair_space>the<seq2seq4repair_space>input<seq2seq4repair_space>***" ) ; System . out . println ( "***<seq2seq4repair_space>text<seq2seq4repair_space>field.<seq2seq4repair_space>I<seq2seq4repair_space>will<seq2seq4repair_space>display<seq2seq4repair_space>the<seq2seq4repair_space>location<seq2seq4repair_space>***" ) ; System . out . println ( "***<seq2seq4repair_space>number<seq2seq4repair_space>and<seq2seq4repair_space>a<seq2seq4repair_space>question<seq2seq4repair_space>mark<seq2seq4repair_space>(?).<seq2seq4repair_space>You<seq2seq4repair_space>then<seq2seq4repair_space>***" ) ; System . out . println ( "***<seq2seq4repair_space>type<seq2seq4repair_space>the<seq2seq4repair_space>word<seq2seq4repair_space>for<seq2seq4repair_space>that<seq2seq4repair_space>location.<seq2seq4repair_space>Press<seq2seq4repair_space>the<seq2seq4repair_space>***" ) ; System . out . println ( "***<seq2seq4repair_space>Done<seq2seq4repair_space>button<seq2seq4repair_space>to<seq2seq4repair_space>stop<seq2seq4repair_space>entering<seq2seq4repair_space>your<seq2seq4repair_space>program.<seq2seq4repair_space>***" ) ; int word = 0 ; int index = 0 ; Simpletron test = new Simpletron ( ) ; while ( true ) { if ( index < 10 ) System . out . print ( ( ( "0" + index ) + "<seq2seq4repair_space>?<seq2seq4repair_space>" ) ) ; else { System . out . print ( ( index + "<seq2seq4repair_space>?<seq2seq4repair_space>" ) ) ; } word = input . nextInt ( ) ; if ( word == SENTINAL ) break ; <START_BUG> test . storeWord ( index , word ) ; <END_BUG> } System . out . println ( "***<seq2seq4repair_space>Program<seq2seq4repair_space>loading<seq2seq4repair_space>completed<seq2seq4repair_space>***" ) ; System . out . println ( "***<seq2seq4repair_space>Program<seq2seq4repair_space>execution<seq2seq4repair_space>begins<seq2seq4repair_space>***" ) ; test . executeProgram ( ) ; } No newline ; at end ; of file ; }

Fix:
test . storeWord ( ( index ++ ) , word ) ;