When two not equal edges e1 and e2 have identical hash codes, their Parallel Edge Indices are the same, but should be different. The problem is that when Context of e2 is put into Map<Context<Graph<V,E>,E>, Integer> edge_index, where Context of e1 is already present, it replaces Context of e1, because the Contexts' hash codes and references are the same.
Sasha:
I assume you're aware that having non-equal objects with identical hash codes can cause problems; is this a deliberate choice on your part, chance, or an emergent property that you have no control over?
Context.equals() is defined in such a way that this should not be an issue. Can you provide a minimal self-contained test case that demonstrates this behavior?
Joshua