import edu.stanford.nlp.util.Index;
public class ConcurrentHashIndex<E> extends AbstractCollection<E> implements Index<E>, RandomAccess {
private static final long serialVersionUID = 6465313844985269109L;
public static final int UNKNOWN_ID = -1;
private static final int DEFAULT_INITIAL_CAPACITY = 100;
<BUG>private final Map<E,Integer> item2Index;

private final Map<Integer,E> index2Item;

public ConcurrentHashIndex() {</BUG>
this(DEFAULT_INITIAL_CAPACITY);

import edu.stanford.nlp.util.Index;
public class ConcurrentHashIndex<E> extends AbstractCollection<E> implements Index<E>, RandomAccess {
private static final long serialVersionUID = 6465313844985269109L;
public static final int UNKNOWN_ID = -1;
private static final int DEFAULT_INITIAL_CAPACITY = 100;
private final ConcurrentHashMap<E,Integer> item2Index;
private final ConcurrentHashMap<Integer,E> index2Item;
private AtomicInteger indexCounter = new AtomicInteger();
public ConcurrentHashIndex() {
this(DEFAULT_INITIAL_CAPACITY);
