Reactorization of getReference(): getDeclarations adapted to the refactored code