LevelType (@NotNull BranchBase<?> branch, @NotNull BranchBase<?> otherBranch) { if (branch.isSimpleExit() != otherBranch.isSimpleExit() || branch.canFallThrough() != otherBranch.canFallThrough() || branch.effectiveLength() != otherBranch.effectiveLength()) { return LevelType.NO; } if (!branch.canBeJoinedWith(otherBranch)) return LevelType.NO; Match match = branch.match(otherBranch); if (match != null) { Match otherMatch = otherBranch.match(branch); if (otherMatch != null) { if (!Arrays.equals(branch.myCommentTexts, otherBranch.myCommentTexts)) { return LevelType.INFO; } return ReturnValue.areEquivalent(match.getReturnValue(), otherMatch.getReturnValue()) ? LevelType.WARN : LevelType.NO; } } return LevelType.NO; }