class LocalCounter {

    private final Map<HugeType, AtomicLong> counters;

    public LocalCounter() {
        this.counters = new ConcurrentHashMap<>();
    }

    public synchronized Id nextId(HugeType type) {<FILL_FUNCTION_BODY>}

    public long getCounter(HugeType type) {
        AtomicLong counter = this.counters.get(type);
        if (counter == null) {
            counter = new AtomicLong(0);
            AtomicLong previous = this.counters.putIfAbsent(type, counter);
            if (previous != null) {
                counter = previous;
            }
        }
        return counter.longValue();
    }

    public synchronized void increaseCounter(HugeType type, long increment) {
        AtomicLong counter = this.counters.get(type);
        if (counter == null) {
            counter = new AtomicLong(0);
            AtomicLong previous = this.counters.putIfAbsent(type, counter);
            if (previous != null) {
                counter = previous;
            }
        }
        long oldValue = counter.longValue();
        AtomicLong value = new AtomicLong(oldValue + increment);
        this.counters.put(type, value);
    }

    public void reset() {
        this.counters.clear();
    }
}

        AtomicLong counter = this.counters.get(type);
        if (counter == null) {
            counter = new AtomicLong(0);
            AtomicLong previous = this.counters.putIfAbsent(type, counter);
            if (previous != null) {
                counter = previous;
            }
        }
        return IdGenerator.of(counter.incrementAndGet());
    
<no_super_class>