HELoC: Hierarchical Contrastive Learning of Source Code Representation