boolean (PsiExpression[] args) { if (args.length < 3 || !ExpressionUtils.isZero(args[1])) return false; PsiExpression arrayExpression = ExpressionUtils.getArrayFromLengthExpression(args[2]); EquivalenceChecker equivalence = EquivalenceChecker.getCanonicalPsiEquivalence(); if (!equivalence.expressionsAreEquivalent(args[0], arrayExpression)) return false; return args.length == 3 && (TypeUtils.typeEquals("byte[]", args[0].getType()) || TypeUtils.typeEquals("char[]", args[0].getType())) || args.length == 4 && TypeUtils.typeEquals("byte[]", args[0].getType()) && (TypeUtils.isJavaLangString(args[3].getType()) || TypeUtils.typeEquals(JAVA_NIO_CHARSET_CHARSET, args[3].getType())); }