static Map threadInfosToThreads_map(L l) { new HashMap map; for (Thread t : keys(Thread.getAllStackTraces())) map.put(t.getId(), t); new HashMap out; for (ThreadInfo t : l) mapPut(out, t, map.get(t.getThreadId())); ret out; }