if (community.hasEntity(agentName) && !myName.equals(agentName)) {
if (!myName.equals(agentName)) {
  private AgentStatus[] getLocalAgentStatus(String communityName) {    List l = new ArrayList();    Community community = commSvc.getCommunity(communityName, null);    if (community != null) {      // Agents found using NodeControlService      Set agents = listLocalAgents();      for (Iterator it = agents.iterator(); it.hasNext();) {        String agentName = (String)it.next();        if (community.hasEntity(agentName) && !myName.equals(agentName)) {          int state = model.getCurrentState(agentName);          state = state < CommunityStatusModel.INITIAL ? CommunityStatusModel.INITIAL : state;          l.add(new AgentStatus(agentName,                                ((Long)agentVersions.get(agentName)).longValue(),                                state));        }      }    }    return (AgentStatus[])l.toArray(new AgentStatus[0]);  }