<commit_before>package net.sandius.rembulan.core.impl;

import java.util.ArrayList;

public class PairCachingObjectSink extends AbstractObjectSink {

	private Object _0;
	private Object _1;

	private final ArrayList<Object> _var;

	private int size;

	public PairCachingObjectSink() {
		super();
		_var = new ArrayList<>();
	}

	@Override
	public int size() {
		return size;
	}

	protected void setCacheAndClearList(Object a, Object b) {
		_0 = a;
		_1 = b;
		if (size > 2) {
			_var.clear();
		}
		resetTailCall();
	}

	@Override
	public void reset() {
		setCacheAndClearList(null, null);
		size = 0;
	}

	@Override
	public void setTo(Object a) {
		setCacheAndClearList(a, null);
		size = 1;
	}

	@Override
	public void setTo(Object a, Object b) {
		setCacheAndClearList(a, b);
		size = 2;
	}

	@Override
	public void setTo(Object a, Object b, Object c) {
		setCacheAndClearList(null, null);
		_var.add(c);
		size = 3;
	}

	@Override
	public void setTo(Object a, Object b, Object c, Object d) {
		setCacheAndClearList(null, null);
		_var.add(c);
		_var.add(d);
		size = 4;
	}

	@Override
	public void setTo(Object a, Object b, Object c, Object d, Object e) {
		setCacheAndClearList(null, null);
		_var.add(c);
		_var.add(d);
		_var.add(e);
		size = 5;
	}

	@Override
	public void push(Object o) {
		switch (size++) {
			case 0:
				_0 = o;
				break;<commit_msg>Fixing setTo methods for 3 and more arguments.<commit_after>package net.sandius.rembulan.core.impl;

import java.util.ArrayList;

public class PairCachingObjectSink extends AbstractObjectSink {

	private Object _0;
	private Object _1;

	private final ArrayList<Object> _var;

	private int size;

	public PairCachingObjectSink() {
		super();
		_var = new ArrayList<>();
	}

	@Override
	public int size() {
		return size;
	}

	protected void setCacheAndClearList(Object a, Object b) {
		_0 = a;
		_1 = b;
		if (size > 2) {
			_var.clear();
		}
		resetTailCall();
	}

	@Override
	public void reset() {
		setCacheAndClearList(null, null);
		size = 0;
	}

	@Override
	public void setTo(Object a) {
		setCacheAndClearList(a, null);
		size = 1;
	}

	@Override
	public void setTo(Object a, Object b) {
		setCacheAndClearList(a, b);
		size = 2;
	}

	@Override
	public void setTo(Object a, Object b, Object c) {
		setCacheAndClearList(a, b);
		_var.add(c);
		size = 3;
	}

	@Override
	public void setTo(Object a, Object b, Object c, Object d) {
		setCacheAndClearList(a, b);
		_var.add(c);
		_var.add(d);
		size = 4;
	}

	@Override
	public void setTo(Object a, Object b, Object c, Object d, Object e) {
		setCacheAndClearList(a, b);
		_var.add(c);
		_var.add(d);
		_var.add(e);
		size = 5;
	}

	@Override
	public void push(Object o) {
		switch (size++) {
			case 0:
				_0 = o;
				break;
{'fraction_non_alphanumeric': 0.12513681138270705, 'fraction_numerical': 0.009850419554906968, 'mean_word_length': 3.502463054187192, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '7063495', 'n_tokens_mistral': 1159, 'n_tokens_neox': 1042, 'n_words': 286}