private static List<PyThreadInfo> addProcessIdToThreadName( List<PyThreadInfo> threads, List<PyThreadInfo> result) { for (PyThreadInfo t : threads) { String threadName = ThreadRegistry.threadName(t.getName(), t.getId()); PyThreadInfo newThread = new PyThreadInfo(t.getId(), threadName, t.getFrames(), t.getStopReason(), t.getMessage()); newThread.updateState(t.getState(), t.getFrames()); result.add(newThread); } threads = result; return threads; }