"new BlockInfoToAdd(storedBlock, replica)" is wrong because "replica" (i.e., the reported block) is a reused object provided by BlockListAsLongs#iterator. Later this object is reused by directly changing its ID/GS. Thus addStoredBlock can get wrong (reportedBlock, stored-BlockInfo) mapping. For EC the reported block is used to calculate the internal block index. Thus the bug can completely corrupt the EC block group internal states.