<commit_before>/**
 * Copyright 2013 Netflix, Inc.
 * 
 * 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 rx.lang.clojure;

import java.util.Arrays;

import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;

import rx.observables.Observer;
import rx.util.functions.FunctionLanguageAdaptor;

import clojure.lang.IFn;
import clojure.lang.RT;
import clojure.lang.Var;

public class ClojureAdaptor implements FunctionLanguageAdaptor {

    @Override
    public Object call(Object function, Object[] args) {
        if (args.length == 0) {
            return ((IFn) function).invoke();
        } else if (args.length == 1) {
            return ((IFn) function).invoke(args[0]);
        } else if (args.length == 2) {
            return ((IFn) function).invoke(args[0], args[1]);
        } else if (args.length == 3) {
            return ((IFn) function).invoke(args[0], args[1], args[2]);
        } else if (args.length == 4) {
            return ((IFn) function).invoke(args[0], args[1], args[2], args[3]);
        } else if (args.length == 5) {
            return ((IFn) function).invoke(args[0], args[1], args[2], args[3], args[4]);
        } else if (args.length == 6) {
            return ((IFn) function).invoke(args[0], args[1], args[2], args[3], args[4], args[5]);
        } else if (args.length == 7) {
            return ((IFn) function).invoke(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
        } else if (args.length == 8) {
            return ((IFn) function).invoke(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7]);<commit_msg>removing .observables package so main classes are just rx.*<commit_after>/**
 * Copyright 2013 Netflix, Inc.
 * 
 * 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 rx.lang.clojure;

import java.util.Arrays;

import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;

import rx.Observer;
import rx.util.functions.FunctionLanguageAdaptor;

import clojure.lang.IFn;
import clojure.lang.RT;
import clojure.lang.Var;

public class ClojureAdaptor implements FunctionLanguageAdaptor {

    @Override
    public Object call(Object function, Object[] args) {
        if (args.length == 0) {
            return ((IFn) function).invoke();
        } else if (args.length == 1) {
            return ((IFn) function).invoke(args[0]);
        } else if (args.length == 2) {
            return ((IFn) function).invoke(args[0], args[1]);
        } else if (args.length == 3) {
            return ((IFn) function).invoke(args[0], args[1], args[2]);
        } else if (args.length == 4) {
            return ((IFn) function).invoke(args[0], args[1], args[2], args[3]);
        } else if (args.length == 5) {
            return ((IFn) function).invoke(args[0], args[1], args[2], args[3], args[4]);
        } else if (args.length == 6) {
            return ((IFn) function).invoke(args[0], args[1], args[2], args[3], args[4], args[5]);
        } else if (args.length == 7) {
            return ((IFn) function).invoke(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
        } else if (args.length == 8) {
            return ((IFn) function).invoke(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7]);
{'fraction_non_alphanumeric': 0.14958448753462603, 'fraction_numerical': 0.024469067405355493, 'mean_word_length': 3.166346153846154, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3307779', 'n_tokens_mistral': 1358, 'n_tokens_neox': 1321, 'n_words': 421}