Program: 38747
Project: 38747
Buggy source:
/** 
 * This method stores your instances in a   {@link ConcurrentHashMap} that looks like this :<br>|-- CommonInst1 --<br> |                |-- Selector1 -&gt; Instance 1 of class  {@link V}<br> |                |-- Selector2 -&gt; Instance 2 of class   {@link V}<br> |<br> |-- CommonInst2 --<br> |                |-- Selector# -&gt; Instance # of class   {@link V}<br> |                ...<br> |                |-- SelectorN -&gt; Instance N of class   {@link V}<br> ...<br> |<br> <p> The point is that "selectors" are anything you want them to be, whether it be the hashcode of the instance (but you won't be able to access it easily later), or some kind of related Node. Whatever fits your model in the best way. <p> Be wary of collisions (i.e. Instance 1 and 2 having the same selector) as it replaces instances in case of collision. <p> You are responsible for providing correct and non-colliding selectors.
 * @param parent   An instance, typically an enum member
 * @param selector The selector that you have to provide to recover this particular instance later
 * @param instance The instance to save.
 * @return A map entry containing the selector and the controller registered in case you need it.
 * @throws RuntimeException in case there was an error in saving the instance.
 */
public Map.Entry<Selector,V> registerMultiple(final K parent,final Selector selector,final V instance){
  final HashMap<Selector,V> newEntryMap=new HashMap<>();
  newEntryMap.put(selector,instance);
  final Optional<Map.Entry<Selector,V>> newEntry=this.prototypes.merge(parent,newEntryMap,this::mergePrototypes).entrySet().stream().filter(entry -> entry.getKey().equals(selector)).findAny();
  return newEntry.orElseThrow(RuntimeException::new);
}

Fixed version (ground truth):
/** 
 * This method stores your instances in a   {@link ConcurrentHashMap} that looks like this :<br>|-- K1 --<br> |        |-- Selector1 -&gt; Instance 1 of class  {@link V}<br> |        |-- Selector2 -&gt; Instance 2 of class   {@link V}<br> |<br> |-- K2 --<br> |        |-- Selector# -&gt; Instance # of class   {@link V}<br> |        ...<br> |        |-- SelectorN -&gt; Instance N of class   {@link V}<br> ...<br> |<br> <p> The point is that "selectors" are anything you want them to be, whether it be the hashcode of the instance (but you won't be able to access it easily later), or some kind of related Node. Whatever fits your model in the best way. <p> Be wary of collisions (i.e. Instance 1 and 2 having the same selector) as it replaces instances in case of collision. <p> You are responsible for providing correct and non-colliding selectors.
 * @param parent   An instance, typically an enum member
 * @param selector The selector that you have to provide to recover this particular instance later
 * @param instance The instance to save.
 * @return A map entry containing the selector and the controller registered in case you need it.
 * @throws RuntimeException in case there was an error in saving the instance.
 */
public V registerMultiple(final K parent,final Selector selector,final V instance){
  if (!this.prototypes.containsKey(parent)) {
    this.prototypes.put(parent,new ConcurrentHashMap<>());
  }
  return this.prototypes.get(parent).put(selector,instance);
}