for(Enumeration enum = entities.keys(); enum.hasMoreElements();)
for(Enumeration en = entities.keys(); en.hasMoreElements();)
  private static boolean importCommunityEntity(Hashtable communities, String assemblyID)  {    Map substitutions = new HashMap();    Connection conn = null;    boolean ret = true;    try{      conn = DBUtils.getConnection(selectQFILE);      Statement st = conn.createStatement();      for(Enumeration enums = communities.keys(); enums.hasMoreElements();)      {        String name = (String)enums.nextElement();        Hashtable entities = (Hashtable)communities.get(name);        for(Enumeration enum = entities.keys(); enum.hasMoreElements();)        {          String ename = (String)enum.nextElement();          List attrs = (List)entities.get(ename);          for(int i=0; i<attrs.size(); i++)          {            Attribute pair = (Attribute)attrs.get(i);            substitutions.put(":assembly_id:", assemblyID);            substitutions.put(":community_id", name);            substitutions.put(":entity_id", ename);            substitutions.put(":attribute_id", pair.name);            substitutions.put(":attribute_value", pair.value);            String query = DBUtils.getQuery("queryEntityInfo", substitutions, selectQFILE);            ResultSet rs = st.executeQuery(query);            if(rs.next())              if(rs.getString(1).equals(assemblyID)) //it's a duplicate row, ignore it              {                rs.close();                continue;              }            rs.close();            query = DBUtils.getQuery("queryInsertEntityInfo", substitutions, csmartQFILE);            st.executeUpdate(query);          }        }      }      st.close();    } catch(Exception e){