#fixed code
                                @Override
    public String toString()
    {
        final StringBuffer sb;

        sb = new StringBuffer("AsteriskAgent[");
        sb.append("agentId='").append(getAgentId()).append("',");
        sb.append("name='").append(getName()).append("',");
        sb.append("state=").append(getState()).append(",");
        sb.append("systemHashcode=").append(System.identityHashCode(this));
        sb.append("]");

        return sb.toString();
    }
#vulnerable code 
                                @Override
    public String toString()
    {
        final StringBuffer sb;

        sb = new StringBuffer("AsteriskAgent[");
        sb.append("agentId='").append(getAgentId()).append("',");
        sb.append("name='").append(getName()).append("',");
        sb.append("state=").append(getStatus()).append(",");
        sb.append("systemHashcode=").append(System.identityHashCode(this));
        sb.append("]");

        return sb.toString();
    } 
                            #location 9 
                            #vulnerability type THREAD_SAFETY_VIOLATION