#fixed code
                             @Override
	public void run() {
		// background执行时，console为Null
		if (console == null) {

			return;
		}

		while (true) {
			try {
				String command = readLine("");
				if (command == null) {
					break;
				}

				handleCommand(command);
				if (!app.view.shouldExit()) {
					tty.print(" Input command (h for help):");
				}
			} catch (Exception e) {
				e.printStackTrace(tty);
			}
		}
	}
#vulnerable code 
                             @Override
	public void run() {
		while (true) {
			try {
				String command = readLine();
				handleCommand(command);
				if (!app.view.shouldExit()) {
					tty.print(" Input command (h for help):");
				}
			} catch (Exception e) {
				e.printStackTrace(tty);
			}
		}
	} 
                            #location 6 
                            #vulnerability type NULL_DEREFERENCE