Statement (Statement stat) { if (stat.getExprents() != null) { return stat; } if (stat.type == StatementType.SEQUENCE) { for (int i = stat.getStats().size() - 1; i >= 0; i--) { Statement tmp = getLastDirectData(stat.getStats().get(i)); if (tmp == null || !tmp.getExprents().isEmpty()) { return tmp; } } } return null; }