*/
@Override
public void endVisit(JDoStatement x, Context ctx) {
JExpression expression = x.getTestExpr();
if (expression instanceof JBooleanLiteral) {
JBooleanLiteral booleanLiteral = (JBooleanLiteral) expression;
// If false, replace do with do's body
if (!booleanLiteral.getValue()) {
// Unless it contains break/continue statements
FindBreakContinueStatementsVisitor visitor = new FindBreakContinueStatementsVisitor();
visitor.accept(x.getBody());
if (!visitor.hasBreakContinueStatements()) {
ctx.replaceMe(x.getBody());