driver-legacy/src/main/com/mongodb/DB.java
@Deprecated
    public CommandResult doEval(final String code, final Object... args) {
        DBObject commandDocument = new BasicDBObject("$eval", code).append("args", asList(args));
        return executeCommand(wrap(commandDocument));
    }
@Deprecated
    public CommandResult doEval(final String code, final Object... args) {
        DBObject commandDocument = new BasicDBObject("$eval", code).append("args", asList(args));
        return executeCommand(wrap(commandDocument));
    }
Evaluates JavaScript functions on the database server. This is useful if you need to touch a lot of data lightly, in which case
network transfer could be a bottleneck.

@param code {@code String} representation of JavaScript function
@param args arguments to pass to the JavaScript function
@return result of the command execution
@throws MongoException if the operation failed
@mongodb.driver.manual reference/method/db.eval/ db.eval()
@deprecated The eval command was deprecated in MongoDB 3.0