void (PsiExpression minExpression, PsiExpression maxExpression, Data topLevelData, Data subExpressionData) { Data data; if (minExpression == maxExpression || maxExpression instanceof PsiMethodCallExpression && minExpression == ((PsiMethodCallExpression)maxExpression).getMethodExpression()) { data = topLevelData; } else { data = subExpressionData; } if (minExpression instanceof PsiClassObjectAccessExpression || minExpression instanceof PsiThisExpression || minExpression instanceof PsiSuperExpression) { data.classes++; return; } if (!(minExpression instanceof PsiJavaCodeReferenceElement)) { data.other++; return; } classifyTarget(data, ((PsiJavaCodeReferenceElement)minExpression).resolve()); }