#vulnerable code 
                                public void unsubscribeFrom(int id) {
        synchronized(output) {
            output.print("< unsubscribe " + Integer.toHexString(id) + " >");
            output.flush();
        }
    } 
                            #location 2 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                public void unsubscribeFrom(int id) {
        StringBuilder sb = new StringBuilder(30);
        sb.append("< unsubscribe ");
        sb.append(Integer.toHexString(id));
        sb.append(" >");
        send(sb.toString());
    }