#vulnerable code 
                                public void sendCommand(String command) {
        if (printCommunication) {
            System.out.printf("> %s\n", command);
        }
        if (command.startsWith("fixed_handicap"))
            isSettingHandicap = true;
        if (command.startsWith("genmove"))
            isThinking = true;
        try {
            outputStream.write((command + "\n").getBytes());
            outputStream.flush();
        } catch (IOException e) {
            e.printStackTrace();
        }
    } 
                            #location 8 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                public void sendCommand(String command) {
        command = cmdNumber + " " + command;
        cmdNumber++;
        if (printCommunication) {
            System.out.printf("> %s\n", command);
        }
        if (command.startsWith("fixed_handicap"))
            isSettingHandicap = true;
        try {
            outputStream.write((command + "\n").getBytes());
            outputStream.flush();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }