<commit_before>package org.twuni.money.common;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class SimpleRepository<V> implements Repository<String, V> {

	private final Map<Integer, V> map = new HashMap<Integer, V>();

	@Override
	public V findById( String key ) {
		return map.get( Integer.valueOf( key.hashCode() ) );
	}

	@Override
	public void save( V value ) {
		map.put( Integer.valueOf( value.hashCode() ), value );
	}

	@Override
	public void delete( V value ) {
		map.put( Integer.valueOf( value.hashCode() ), null );
	}

	@Override
	public List<V> list( int limit ) {
		ArrayList<V> list = new ArrayList<V>( map.values() );
		return limit > list.size() ? list : list.subList( 0, limit );
	}

	@Override
	public List<V> list() {
		return list( Integer.MAX_VALUE );
	}

}<commit_msg>Opening the scope of SimpleRepository's map to extending classes.<commit_after>package org.twuni.money.common;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class SimpleRepository<V> implements Repository<String, V> {

	protected final Map<Integer, V> map = new HashMap<Integer, V>();

	@Override
	public V findById( String key ) {
		return map.get( Integer.valueOf( key.hashCode() ) );
	}

	@Override
	public void save( V value ) {
		map.put( Integer.valueOf( value.hashCode() ), value );
	}

	@Override
	public void delete( V value ) {
		map.put( Integer.valueOf( value.hashCode() ), null );
	}

	@Override
	public List<V> list( int limit ) {
		ArrayList<V> list = new ArrayList<V>( map.values() );
		return limit > list.size() ? list : list.subList( 0, limit );
	}

	@Override
	public List<V> list() {
		return list( Integer.MAX_VALUE );
	}

}
{'fraction_non_alphanumeric': 0.14074914869466515, 'fraction_numerical': 0.0011350737797956867, 'mean_word_length': 4.066091954022989, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, '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': '5626516', 'n_tokens_mistral': 609, 'n_tokens_neox': 580, 'n_words': 166}