question: private static int translateBatch ( HyperGraph graph , Set < HGHandle > batch , RAMStorageGraph subgraph , Map < HGHandle , Object > objects , Mapping < Pair < HGHandle , Object > , HGHandle > atomFinder , Map < HGHandle , HGHandle > substitutes ) { int replacements = 0 ; for ( HGHandle atom : batch ) { Object object = readAtom ( atom , graph , new HGAtomResolver < HGAtomType > ( graph ) , subgraph ) ; HGHandle existing = atomFinder == null ? null : atomFinder . eval ( new Pair < HGHandle , Object > ( atom , object ) ) ; if ( existing != null ) { substitutes . put ( atom , existing ) ; if ( ! existing . equals ( atom ) ) replacements ++ ; } else objects . put ( atom , object ) ; } return replacements ; }
target:  Returns the number of new replacements to be made, i.e. the number of new atom equivalents found. On the other hand, the substitutes parameter may contain identity mapping for atoms that are both in the RAMStorageGraph and in the HyperGraph - we only want to track those in order to ignore them when the RAMStorageGraph is finally written locally. 