<commit_before>/*
 * Copyright (c) 2015 <NAME>.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    <NAME> - initial API and implementation and/or initial documentation
 */
package crow.java.client;

import clojure.java.api.Clojure;
import clojure.lang.IFn;
import crow.java.IServiceFinder;
import crow.java.IServiceInfo;
import crow.java.ServiceNotFoundException;
import java.util.Map;
import java.util.concurrent.Callable;

/**
 *
 * @author <NAME>
 */
public interface IInvoker {
    <R> R withService(Class<R> clazz, IServiceInfo serviceInfo, String namespace, String fnName, Object... args);
    <R> R withFinder(Class<R> clazz, IServiceFinder serviceFinder, String serviceName, Map<String,Object> attributes, String namespace, String fnName, Object... args) throws ServiceNotFoundException;
    <R> R invoke(Class<R> clazz, String serviceName, Map<String,Object> attributes, String namespace, String fnName, Object... args) throws ServiceNotFoundException;

    default <R> R withTimeout(int timeoutMs, Callable<R> call) {
        IFn timeoutFn = Clojure.var("crow.remote", "with-timeout-fn");
        return (R) timeoutFn.invoke(call);
    }

}
<commit_msg>changed ambiguous method names.<commit_after>/*
 * Copyright (c) 2015 <NAME>.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    <NAME> - initial API and implementation and/or initial documentation
 */
package crow.java.client;

import clojure.java.api.Clojure;
import clojure.lang.IFn;
import crow.java.IServiceFinder;
import crow.java.IServiceInfo;
import crow.java.ServiceNotFoundException;
import java.util.Map;
import java.util.concurrent.Callable;

/**
 *
 * @author <NAME>
 */
public interface IInvoker {
    <R> R withService(Class<R> clazz, IServiceInfo serviceInfo, String namespace, String fnName, Object... args);
    <R> R withFinder(Class<R> clazz, IServiceFinder serviceFinder, String serviceName, Map<String,Object> attributes, String namespace, String fnName, Object... args) throws ServiceNotFoundException;
    <R> R invoke(Class<R> clazz, String serviceName, Map<String,Object> attributes, String namespace, String fnName, Object... args) throws ServiceNotFoundException;
    
    default <R> R invokeNs(Class<R> clazz, String serviceName, String namespace, String fnName, Object... args) throws ServiceNotFoundException {
        return invoke(clazz, serviceName, null, namespace, fnName, args);
    }

    default <R> R invokeSimple(Class<R> clazz, String serviceName, String fnName, Object... args) throws ServiceNotFoundException {
        return invoke(clazz, serviceName, null, serviceName, fnName, args);
    }
    
    default <R> R withTimeout(int timeoutMs, Callable<R> call) {
        IFn timeoutFn = Clojure.var("crow.remote", "with-timeout-fn");
        return (R) timeoutFn.invoke(call);
    }

}

{'fraction_non_alphanumeric': 0.10939431396786156, 'fraction_numerical': 0.004944375772558714, 'mean_word_length': 4.440336134453782, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, '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': '360727', 'n_tokens_mistral': 947, 'n_tokens_neox': 931, 'n_words': 295}