<commit_before>package fr.liglab.lcm.util;

import java.util.Calendar;

import fr.liglab.lcm.internals.ExtensionsIterator;
import gnu.trove.iterator.TIntIterator;

/**
 * FIXME : actually, ExtensionsIterator is useless !
 */
public class FakeExtensionsIterator implements ExtensionsIterator {

	private final int[] sortedFrequents;
	private final TIntIterator wrapped;

	public FakeExtensionsIterator(int[] sortedFrequents, TIntIterator wrapped) {
		this.sortedFrequents = sortedFrequents;
		this.wrapped = wrapped;
	}

	public int[] getSortedFrequents() {
		return this.sortedFrequents;
	}

	public synchronized int getExtension() {
		if (wrapped.hasNext()) {
			int next = wrapped.next();
			System.out.format("%1$tY/%1$tm/%1$td %1$tk:%1$tM:%1$tS - extending with %2$d\n", Calendar.getInstance(), next);
			return next;
		} else {
			return -1;
		}
	}

}
<commit_msg>now FakeExtensionsIterator also logs ThreadID<commit_after>package fr.liglab.lcm.util;

import java.util.Calendar;

import fr.liglab.lcm.internals.ExtensionsIterator;
import gnu.trove.iterator.TIntIterator;

/**
 * FIXME : actually, ExtensionsIterator is useless !
 */
public class FakeExtensionsIterator implements ExtensionsIterator {

	private final int[] sortedFrequents;
	private final TIntIterator wrapped;

	public FakeExtensionsIterator(int[] sortedFrequents, TIntIterator wrapped) {
		this.sortedFrequents = sortedFrequents;
		this.wrapped = wrapped;
	}

	public int[] getSortedFrequents() {
		return this.sortedFrequents;
	}

	public synchronized int getExtension() {
		if (wrapped.hasNext()) {
			int next = wrapped.next();
			
			long id = Thread.currentThread().getId();
			System.out.format("%1$tY/%1$tm/%1$td %1$tk:%1$tM:%1$tS - thread %2$d extending with %3$d\n", 
					Calendar.getInstance(), id , next);
			
			return next;
		} else {
			return -1;
		}
	}
}

{'fraction_non_alphanumeric': 0.12303523035230353, 'fraction_numerical': 0.00921409214092141, 'mean_word_length': 4.543543543543543, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1461196', 'n_tokens_mistral': 659, 'n_tokens_neox': 610, 'n_words': 132}