#vulnerable code 
                             private void printHelp() throws Exception {
		tty.println(" t [tid]: print stack trace for the thread you choose");
		tty.println(" a : list all thread's id and name");
		tty.println(" m : change threads display mode and ordering");
		tty.println(" i : change flush interval seconds");
		tty.println(" l : change number of display threads");
		tty.println(" q : quit");
		tty.println(" h : print help");
		app.preventFlush();
		String command = waitForEnter();
		app.continueFlush();
		if (command.length() > 0) {
			handleCommand(command);
		}
	} 
                            #location 12 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             private void printHelp() throws Exception {
		tty.println(" t [tid]: print stack trace for the thread you choose");
		tty.println(" a : list all thread's id and name");
		tty.println(" m : change threads display mode and ordering");
		tty.println(" i [num]: change flush interval seconds");
		tty.println(" l [num]: change number of display threads");
		tty.println(" f [name]: set thread name filter");
		tty.println(" q : quit");
		tty.println(" h : print help");
		app.preventFlush();
		waitForEnter();
		app.continueFlush();
	}