boolean (PsiMethod method) { int statementCount = Objects.requireNonNull(method.getBody()).getStatementCount(); if (!method.hasModifierProperty(PsiModifier.STATIC) && PsiTreeUtil.getContextOfType(method, PsiClass.class) != null) { //this declaration statementCount--; } return statementCount <= 1; }