#vulnerable code 
                                public void subscribeTo(int id, int sec, int usec) {
        synchronized(output) {
            output.print("< subscribe "
                    + Integer.toString(sec) + " "
                    + Integer.toString(usec) + " "
                    + Integer.toHexString(id) + " >");
            output.flush();
        }
    } 
                            #location 2 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                public void subscribeTo(int id, int sec, int usec) {
        StringBuilder sb = new StringBuilder(30);
        sb.append("< subscribe ");
        sb.append(String.valueOf(sec));
        sb.append(' ');
        sb.append(String.valueOf(usec));
        sb.append(' ');
        sb.append(Integer.toHexString(id));
        sb.append(" >");
        send(sb.toString());
    }