int (PsiMethod c1, PsiMethod c2) { final PsiMethod cc1 = CommonJavaRefactoringUtil.getChainedConstructor(c1); final PsiMethod cc2 = CommonJavaRefactoringUtil.getChainedConstructor(c2); if (cc1 == c2) return 1; if (cc2 == c1) return -1; if (cc1 == null) { return cc2 == null ? 0 : compare(c1, cc2); } else { return cc2 == null ? compare(cc1, c2) : compare(cc1, cc2); } }