private PsiMethod createHashCode() throws IncorrectOperationException {
    final HashMap<String, Object> contextMap = new HashMap<>();
    contextMap.put(SUPER_HAS_HASH_CODE, mySuperHasHashCode);

    final String methodText = GenerationUtil
      .velocityGenerateCode(myClass, Arrays.asList(myHashCodeFields), myNonNullSet, new HashMap<>(), contextMap,
                            EqualsHashCodeTemplatesManager.getInstance().getDefaultHashcodeTemplate().getTemplate(), 0, false, myUseAccessors);
    PsiMethod hashCode;
    try {
      hashCode = myFactory.createMethodFromText(methodText, null);
    }
    catch (IncorrectOperationException e) {
      return null;
    }
    final PsiMethod superHashCode = MethodSignatureUtil.findMethodBySignature(myClass, getHashCodeSignature(), true);
    if (superHashCode != null) {
      OverrideImplementUtil.annotateOnOverrideImplement(hashCode, myClass, superHashCode);
    }
    hashCode = (PsiMethod)myJavaCodeStyleManager.shortenClassReferences(hashCode);
    return (PsiMethod)myCodeStyleManager.reformat(hashCode);
  }
private PsiMethod createHashCode()