<commit_before>/*
 *    Copyright (C) 2016 <NAME>
 *    Copyright (C) 2011 Android Open Source Project
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package com.rxandroidnetworking;

import com.androidnetworking.common.ANRequest;
import com.androidnetworking.common.RESPONSE;

import org.json.JSONArray;
import org.json.JSONObject;

import rx.Observable;
import rx.Scheduler;

/**
 * Created by amitshekhar on 10/06/16.
 */
public class RxANRequest extends ANRequest {

    public RxANRequest(GetRequestBuilder builder) {
        super(builder);
    }

    public Observable<JSONObject> getJsonObjectObservable() {
        this.setResponseAs(RESPONSE.JSON_OBJECT);
        return RxInternalNetworking.generateSimpleObservable(this);
    }

    public Observable<JSONArray> getJsonArrayObservable() {
        this.setResponseAs(RESPONSE.JSON_ARRAY);
        return RxInternalNetworking.generateSimpleObservable(this);
    }

    public static class GetRequestBuilder extends ANRequest.GetRequestBuilder<GetRequestBuilder> {

        public GetRequestBuilder(String url) {
            super(url);
        }

        public RxANRequest build() {
            return new RxANRequest(this);
        }
    }
}<commit_msg>change in rxanrequest for analytics and post<commit_after>/*
 *    Copyright (C) 2016 <NAME>
 *    Copyright (C) 2011 Android Open Source Project
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package com.rxandroidnetworking;

import com.androidnetworking.common.ANRequest;
import com.androidnetworking.common.RESPONSE;

import org.json.JSONArray;
import org.json.JSONObject;

import rx.Observable;
import rx.Scheduler;

/**
 * Created by amitshekhar on 10/06/16.
 */
public class RxANRequest extends ANRequest<RxANRequest> {

    public RxANRequest(GetRequestBuilder builder) {
        super(builder);
    }

    public RxANRequest(PostRequestBuilder builder) {
        super(builder);
    }

    public Observable<JSONObject> getJsonObjectObservable() {
        this.setResponseAs(RESPONSE.JSON_OBJECT);
        return RxInternalNetworking.generateSimpleObservable(this);
    }

    public Observable<JSONArray> getJsonArrayObservable() {
        this.setResponseAs(RESPONSE.JSON_ARRAY);
        return RxInternalNetworking.generateSimpleObservable(this);
    }

    public static class GetRequestBuilder extends ANRequest.GetRequestBuilder<GetRequestBuilder> {

        public GetRequestBuilder(String url) {
            super(url);
        }

        public RxANRequest build() {
            return new RxANRequest(this);
        }
    }

    public static class PostRequestBuilder extends ANRequest.PostRequestBuilder<PostRequestBuilder> {

        public PostRequestBuilder(String url) {
            super(url);
        }

        public RxANRequest build() {
            return new RxANRequest(this);
        }
    }
}
{'fraction_non_alphanumeric': 0.07743250127356088, 'fraction_numerical': 0.009169638308711156, 'mean_word_length': 3.1865671641791047, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6989855', 'n_tokens_mistral': 1093, 'n_tokens_neox': 1040, 'n_words': 318}