marcocor/bat-framework — pull request #5 by shatu (2014-12-30 11:45:07+00:00)
Title: Update Annotation.java

Inappropriate design of the Hash Function :-

Two totally different Annotations can easily map to the same hash value, which in my opinion was not intentional here.

For example :-

Annotation 1: [Concept: 13, Position: 2, Length: 1] maps to ("" + "13" + "2^1").hascode() i.e. "132".hashcode()
Annotation 2: [Concept: 1, Position: 2, Length: 5] maps to ("" + "1" + "2^5").hascode() i.e. "132".hashcode()

This was just one such example; one can easily construct similar examples.

Instead, my proposed Hash Function should take care of such cases.

Thanks.