protected Node visitLogicalBinaryExpression( final LogicalBinaryExpression node, final Object context ) { // use an if/else block here (instead of isPresent.map(...).orElse(...)) so only one object // gets instantiated (issue #1784) if (node.getLocation().isPresent()) { return new LogicalBinaryExpression(node.getLocation().get(), node.getType(), (Expression) process(node.getLeft(), context), (Expression) process(node.getRight(), context) ); } else { return new LogicalBinaryExpression(node.getType(), (Expression) process(node.getLeft(), context), (Expression) process(node.getRight(), context) ); } }