<commit_before>/**
 * 
 */
package soottocfg.cfg.statement;

import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;

import com.google.common.base.Optional;

import soottocfg.cfg.SourceLocation;
import soottocfg.cfg.expression.Expression;
import soottocfg.cfg.expression.IdentifierExpression;
import soottocfg.cfg.method.Method;

/**
 * @author schaef
 *
 */
public class CallStatement extends Statement {

	private static final long serialVersionUID = 7267962774002374725L;
	private final Method method;
	private final List<Expression> arguments;
	private final Optional<Expression> returnReceiver;

	/**
	 * @param createdFrom
	 */
	public CallStatement(SourceLocation loc, Method method, List<Expression> arguments, Optional<Expression> returnReceiver) {
		super(loc);
		this.method = method;
		this.arguments = arguments;
		this.returnReceiver = returnReceiver;
	}

	public Method getCallTarget() {
		return method;
	}

	public List<Expression> getArguments() {
		return arguments;
	}
<commit_msg>added assertion that args in a call have to match params of the called method<commit_after>/**
 * 
 */
package soottocfg.cfg.statement;

import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;

import com.google.common.base.Optional;
import com.google.common.base.Preconditions;

import soottocfg.cfg.SourceLocation;
import soottocfg.cfg.expression.Expression;
import soottocfg.cfg.expression.IdentifierExpression;
import soottocfg.cfg.method.Method;

/**
 * @author schaef
 *
 */
public class CallStatement extends Statement {

	private static final long serialVersionUID = 7267962774002374725L;
	private final Method method;
	private final List<Expression> arguments;
	private final Optional<Expression> returnReceiver;

	/**
	 * @param createdFrom
	 */
	public CallStatement(SourceLocation loc, Method method, List<Expression> arguments, Optional<Expression> returnReceiver) {
		super(loc);
		Preconditions.checkArgument(method.getInParams().size()==arguments.size());
		this.method = method;
		this.arguments = arguments;
		this.returnReceiver = returnReceiver;
	}

	public Method getCallTarget() {
		return method;
	}

	public List<Expression> getArguments() {
		return arguments;
	}

{'fraction_non_alphanumeric': 0.10004387889425187, 'fraction_numerical': 0.016673979815708645, 'mean_word_length': 5.229508196721311, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '4230321', 'n_tokens_mistral': 711, 'n_tokens_neox': 660, 'n_words': 165}