boolean (Statement statement, String classname, String key) { boolean res = false; for (Statement st : statement.getStats()) { res |= replaceAssertions(st, classname, key); } boolean replaced = true; while (replaced) { replaced = false; for (Statement st : statement.getStats()) { if (st.type == StatementType.IF) { if (replaceAssertion(statement, (IfStatement)st, classname, key)) { replaced = true; break; } } } res |= replaced; } return res; }