<commit_before>package php;

class Boot {
	static var qtypes;
	static var ttypes;
	static var tpaths;
	static var skip_constructor = false;
	static function __init__() : Void {
		untyped __php__("
function _hx_add($a, $b) {
	if (!_hx_is_numeric($a) || !_hx_is_numeric($b)) {
		return $a . $b;
	} else {
		return $a + $b;
	}
}
		
function _hx_anonymous($arr = array()) {
	$o = new _hx_anonymous();
	reset($arr);
	while(list($k, $v) = each($arr))
		$o->$k = $v;
	return $o;
}

class _hx_array implements ArrayAccess, IteratorAggregate {
	var $a;
	var $length;
	function __construct($a = array()) {
		$this->a = $a;
		$this->length = count($a);
	}

	function concat($a) {
		return new _hx_array(array_merge($this->a, $a->a));
	}

	function copy() {
		return new _hx_array($this->a);
	}

	function &get($index) {
		if(isset($this->a[$index])) return $this->a[$index];
		return null;
	}

	function insert($pos, $x) {
		array_splice($this->a, $pos, 0, array($x));
		$this->length++;
	}

	function iterator() {
		return new _hx_array_iterator($this->a);
	}
	
	function getIterator() {
		return $this->iterator();
	}

	function join($sep) {
		return implode($this->a, $sep);
	}

	function pop() {
		$r = array_pop($this->a);
		$this->length = count($this->a);
		return $r;
	}

	function push($x) {
		$this->a[] = $x;
		return ++$this->length;
	}

	function remove($x) {
		for($i = 0; $i < count($this->a); $i++)
			if($this->a[$i] === $x) {
				unset($this->a[$i]);
				$this->a = array_values($this->a);
				$this->length--;
				return true;
			}
		return false;
	}

	function removeAt($pos) {
		if(array_key_exists($pos, $this->a)) {
			unset($this->a[$pos]);
			$this->length--;
			return true;
		} else
			return false;
	}

	function reverse() {
		$this->a = array_reverse($this->a, false);
	}

	function shift() {
		$r = array_shift($this->a);
		$this->length = count($this->a);
		return $r;
	}

	function slice($pos, $end) {
		if($end == null)
			return new _hx_array(array_slice($this->a, $pos));
		else
			return new _hx_array(array_slice($this->a, $pos, $end-$pos));
	}

	function sort($f) {
		usort($this->a, $f);
	}

	function splice($pos, $len) {
		if($len < 0) $len = 0;
		$nh = new _hx_array(array_splice($this->a, $pos, $len));
		$this->length = count($this->a);
		return $nh;
	}

	function toString() {
		return '['.implode($this->a, ', ').']';
	}

	function __toString() {
		return $this->toString();
	}

	function unshift($x) {
		array_unshift($this->a, $x);
		$this->length++;
	}

	// ArrayAccess methods:
	function offsetExists($offset) {
		return isset($this->a[$offset]);
	}

	function offsetGet($offset) {
		if(isset($this->a[$offset])) return $this->a[$offset];
		return null;
	}

	function offsetSet($offset, $value) {
		if($this->length <= $offset) {
			$this->a = array_merge($this->a, array_fill(0, $offset+1-$this->length, null));
			$this->length = $offset+1;
		}
		return $this->a[$offset] = $value;
	}

	function offsetUnset($offset) {<commit_msg>fixed Array.join() and Array.toString()<commit_after>package php;

class Boot {
	static var qtypes;
	static var ttypes;
	static var tpaths;
	static var skip_constructor = false;
	static function __init__() : Void {
		untyped __php__("
function _hx_add($a, $b) {
	if (!_hx_is_numeric($a) || !_hx_is_numeric($b)) {
		return $a . $b;
	} else {
		return $a + $b;
	}
}
		
function _hx_anonymous($arr = array()) {
	$o = new _hx_anonymous();
	reset($arr);
	while(list($k, $v) = each($arr))
		$o->$k = $v;
	return $o;
}

class _hx_array implements ArrayAccess, IteratorAggregate {
	var $a;
	var $length;
	function __construct($a = array()) {
		$this->a = $a;
		$this->length = count($a);
	}

	function concat($a) {
		return new _hx_array(array_merge($this->a, $a->a));
	}

	function copy() {
		return new _hx_array($this->a);
	}

	function &get($index) {
		if(isset($this->a[$index])) return $this->a[$index];
		return null;
	}

	function insert($pos, $x) {
		array_splice($this->a, $pos, 0, array($x));
		$this->length++;
	}

	function iterator() {
		return new _hx_array_iterator($this->a);
	}
	
	function getIterator() {
		return $this->iterator();
	}

	function join($sep) {
		return implode($sep, $this->a);
	}

	function pop() {
		$r = array_pop($this->a);
		$this->length = count($this->a);
		return $r;
	}

	function push($x) {
		$this->a[] = $x;
		return ++$this->length;
	}

	function remove($x) {
		for($i = 0; $i < count($this->a); $i++)
			if($this->a[$i] === $x) {
				unset($this->a[$i]);
				$this->a = array_values($this->a);
				$this->length--;
				return true;
			}
		return false;
	}

	function removeAt($pos) {
		if(array_key_exists($pos, $this->a)) {
			unset($this->a[$pos]);
			$this->length--;
			return true;
		} else
			return false;
	}

	function reverse() {
		$this->a = array_reverse($this->a, false);
	}

	function shift() {
		$r = array_shift($this->a);
		$this->length = count($this->a);
		return $r;
	}

	function slice($pos, $end) {
		if($end == null)
			return new _hx_array(array_slice($this->a, $pos));
		else
			return new _hx_array(array_slice($this->a, $pos, $end-$pos));
	}

	function sort($f) {
		usort($this->a, $f);
	}

	function splice($pos, $len) {
		if($len < 0) $len = 0;
		$nh = new _hx_array(array_splice($this->a, $pos, $len));
		$this->length = count($this->a);
		return $nh;
	}

	function toString() {
		return '['.implode(', ', $this->a).']';
	}

	function __toString() {
		return $this->toString();
	}

	function unshift($x) {
		array_unshift($this->a, $x);
		$this->length++;
	}

	// ArrayAccess methods:
	function offsetExists($offset) {
		return isset($this->a[$offset]);
	}

	function offsetGet($offset) {
		if(isset($this->a[$offset])) return $this->a[$offset];
		return null;
	}

	function offsetSet($offset, $value) {
		if($this->length <= $offset) {
			$this->a = array_merge($this->a, array_fill(0, $offset+1-$this->length, null));
			$this->length = $offset+1;
		}
		return $this->a[$offset] = $value;
	}

	function offsetUnset($offset) {
{'fraction_non_alphanumeric': 0.21447721179624665, 'fraction_numerical': 0.0023458445040214475, 'mean_word_length': 3.752388535031847, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 105, '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': '4246084', 'n_tokens_mistral': 2582, 'n_tokens_neox': 2367, 'n_words': 482}