boolean (String guard, String lockMethodStart, PsiMethodCallExpression psiExpression) { final PsiReferenceExpression methodExpression = psiExpression.getMethodExpression(); final PsiExpression qualifierExpression = methodExpression.getQualifierExpression(); if (qualifierExpression != null) { if (isCallOnGuard(guard, lockMethodStart, methodExpression, qualifierExpression)) { return true; } else if (qualifierExpression instanceof PsiReferenceExpression) { final PsiElement resolve = ((PsiReferenceExpression)qualifierExpression).resolve(); if (resolve instanceof PsiField && ((PsiField)resolve).hasModifierProperty(PsiModifier.FINAL)) { final PsiExpression initializer = ((PsiField)resolve).getInitializer(); return initializer != null && isCallOnGuard(guard, lockMethodStart, methodExpression, initializer); } } } return false; }