<commit_before>package cn.momia.api.deal;

import cn.momia.api.base.ServiceApi;
import cn.momia.api.base.http.MomiaHttpParamBuilder;
import cn.momia.api.base.http.MomiaHttpRequest;
import cn.momia.api.deal.coupon.PagedCoupons;
import cn.momia.api.deal.order.Order;
import cn.momia.api.deal.order.PagedOrders;
import cn.momia.api.deal.order.SkuPlaymates;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class DealServiceApi extends ServiceApi {
    public static OrderServiceApi ORDER = new OrderServiceApi();
    public static PaymentServiceApi PAYMENT = new PaymentServiceApi();
    public static CallbackServiceApi CALLBACK = new CallbackServiceApi();
    public static CouponServiceApi COUPON = new CouponServiceApi();

    public void init() {
        ORDER.setService(service);
        PAYMENT.setService(service);
        CALLBACK.setService(service);
        COUPON.setService(service);
    }

    public static class OrderServiceApi extends DealServiceApi {
        public Order add(JSONObject orderJson) {
            MomiaHttpRequest request = MomiaHttpRequest.POST(url("order"), orderJson.toString());
            return JSON.toJavaObject((JSON) executeRequest(request), Order.class);
        }

        public void delete(String utoken, long id) {
            MomiaHttpParamBuilder builder = new MomiaHttpParamBuilder().add("utoken", utoken);
            MomiaHttpRequest request = MomiaHttpRequest.DELETE(url("order", id), builder.build());
            executeRequest(request);
        }

        public PagedOrders listOrders(String utoken, int status, int start, int count) {
            MomiaHttpParamBuilder builder = new MomiaHttpParamBuilder()
                    .add("utoken", utoken)
                    .add("status", status)
                    .add("start", start)
                    .add("count", count);
            MomiaHttpRequest request = MomiaHttpRequest.GET(url("order/list"), builder.build());

            return JSON.toJavaObject((JSON) executeRequest(request), PagedOrders.class);
        }<commit_msg>check dup api<commit_after>package cn.momia.api.deal;

import cn.momia.api.base.ServiceApi;
import cn.momia.api.base.http.MomiaHttpParamBuilder;
import cn.momia.api.base.http.MomiaHttpRequest;
import cn.momia.api.deal.coupon.PagedCoupons;
import cn.momia.api.deal.order.Order;
import cn.momia.api.deal.order.PagedOrders;
import cn.momia.api.deal.order.SkuPlaymates;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class DealServiceApi extends ServiceApi {
    public static OrderServiceApi ORDER = new OrderServiceApi();
    public static PaymentServiceApi PAYMENT = new PaymentServiceApi();
    public static CallbackServiceApi CALLBACK = new CallbackServiceApi();
    public static CouponServiceApi COUPON = new CouponServiceApi();

    public void init() {
        ORDER.setService(service);
        PAYMENT.setService(service);
        CALLBACK.setService(service);
        COUPON.setService(service);
    }

    public static class OrderServiceApi extends DealServiceApi {
        public Order add(JSONObject orderJson) {
            MomiaHttpRequest request = MomiaHttpRequest.POST(url("order"), orderJson.toString());
            return JSON.toJavaObject((JSON) executeRequest(request), Order.class);
        }

        public JSON checkDup(String utoken, String order) {
            MomiaHttpParamBuilder builder = new MomiaHttpParamBuilder()
                    .add("utoken", utoken)
                    .add("order", order);
            MomiaHttpRequest request = MomiaHttpRequest.GET(url("order/check/dup"), builder.build());

            return (JSON) executeRequest(request);
        }

        public void delete(String utoken, long id) {
            MomiaHttpParamBuilder builder = new MomiaHttpParamBuilder().add("utoken", utoken);
            MomiaHttpRequest request = MomiaHttpRequest.DELETE(url("order", id), builder.build());
            executeRequest(request);
        }

        public PagedOrders listOrders(String utoken, int status, int start, int count) {
            MomiaHttpParamBuilder builder = new MomiaHttpParamBuilder()
                    .add("utoken", utoken)
                    .add("status", status)
                    .add("start", start)
                    .add("count", count);
            MomiaHttpRequest request = MomiaHttpRequest.GET(url("order/list"), builder.build());

            return JSON.toJavaObject((JSON) executeRequest(request), PagedOrders.class);
        }
{'fraction_non_alphanumeric': 0.10338499184339314, 'fraction_numerical': 0.0004078303425774878, 'mean_word_length': 3.1923076923076925, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1088002', 'n_tokens_mistral': 1436, 'n_tokens_neox': 1374, 'n_words': 289}