int (final ThreadState state) { if (state.isEmptyStackTrace()) return -10; if (state.isKnownJDKThread()) return -5; if (state.isSleeping()) { return -2; } if (state.getOperation() == ThreadOperation.Socket) { return -1; } return state.getStackDepth(); }