code: private void checkLeftOperandOfLogicalOperator(NodeTraversal t, Node n) {
      if (n.isOr() || n.isAnd()) {
        String operator = n.isOr() ? "||" : "&&";
        TernaryValue v = getBooleanValueWithTypes(n.getFirstChild());
        if (v != TernaryValue.UNKNOWN) {
          String result = v == TernaryValue.TRUE ? "truthy" : "falsy";
          t.report(n, SUSPICIOUS_LEFT_OPERAND_OF_LOGICAL_OPERATOR, operator, result);
        }
      }
    }
docs: Check for the LHS of a logical operator (&amp;&amp; and ||) being deterministically truthy or
  falsy, using both syntactic and type information. This is always suspicious (though for
  different reasons: "truthy and" means the LHS is always ignored and should be removed, "falsy
  and" means the RHS is dead code, and vice versa for "or". However, there are a number of
  legitimate use cases where we need to back off from using type information (see {@link
  #getBooleanValueWithTypes} for more details on these back offs).