class PointtransferRepository extends AbstractRepository {

    /**
     * Logger.
     */
    private static final Logger LOGGER = LogManager.getLogger(PointtransferRepository.class);

    /**
     * Gets average point of activity eating snake of a user specified by the given user id.
     *
     * @param userId the given user id
     * @return average point, if the point small than {@code 1}, returns {@code pointActivityEatingSnake} which
     * configured in sym.properties
     */
    public int getActivityEatingSnakeAvg(final String userId) {<FILL_FUNCTION_BODY>}

    /**
     * Public constructor.
     */
    public PointtransferRepository() {
        super(Pointtransfer.POINTTRANSFER);
    }
}

        int ret = Pointtransfer.TRANSFER_SUM_C_ACTIVITY_EATINGSNAKE;

        try {
            final List<JSONObject> result = select("SELECT\n"
                    + "	AVG(sum) AS point\n"
                    + "FROM\n"
                    + "	`" + getName() + "`\n"
                    + "WHERE\n"
                    + "	type = 27\n"
                    + "AND toId = ?\n"
                    + "", userId);
            if (!result.isEmpty()) {
                ret = result.get(0).optInt(Common.POINT, ret);
            }
        } catch (final Exception e) {
            LOGGER.log(Level.ERROR, "Calc avg point failed", e);
        }

        if (ret < 1) {
            ret = Pointtransfer.TRANSFER_SUM_C_ACTIVITY_EATINGSNAKE;
        }

        return ret;
    
<no_super_class>