Couple<Integer> (SingleChildDescriptor childDescriptor, PsiFragment parentFragment, NodeSpecificHasher nodeSpecificHasher) { final PsiElement element = childDescriptor.getElement(); if (element == null) { return Couple.of(0, 0); } final Couple<Integer> result = doComputeHash(childDescriptor, parentFragment, nodeSpecificHasher); final DuplicatesProfileBase duplicatesProfile = ((NodeSpecificHasherBase)nodeSpecificHasher).getDuplicatesProfile(); final PsiElementRole role = duplicatesProfile.getRole(element); if (role != null && !duplicatesProfile.getDuplocatorState(duplicatesProfile.getLanguage(element)).distinguishRole(role)) { return Couple.of(0, result.second); } return result; }