String query=null;
StringBuffer query = new StringBuffer(); q = q.trim(); agent_name = "'"+agent_name+"'";
  public String substituteOrgName (String q, String agent_name) {    String query=null;    if (q != null) {      int indx = q.indexOf(":org");      if (indx != -1) {        query = q.substring(0,indx) + "'"+agent_name+"'";        if (q.length() > indx+3) {          query += q.substring(indx+3);        } // if      } // if    } // if    return query;  }