Determines whether the given name can appear on the right side of the dot operator. Many
properties (like reserved words) cannot, in ES3.
343355
static boolean isValidPropertyName(FeatureSet mode, String name) {
    if (isValidSimpleName(name)) {
      return true;
    } else {
      return mode.has(Feature.KEYWORDS_AS_PROPERTIES) && TokenStream.isKeyword(name);
    }
  }
937812
public static boolean hasSideEffect(Expression expr) {
    VariableElement var = TreeUtil.getVariableElement(expr);
    if (var != null && ElementUtil.isVolatile(var)) {
      return true;
    }
    switch (expr.getKind()) {
      case BOOLEAN_LITERAL:
      case CHARACTER_LITERAL:
      case NULL_LITERAL:
      case NUMBER_LITERAL:
      case QUALIFIED_NAME:
      case SIMPLE_NAME:
      case STRING_LITERAL:
      case SUPER_FIELD_ACCESS:
      case THIS_EXPRESSION:
        return false;
      case CAST_EXPRESSION:
        return hasSideEffect(((CastExpression) expr).getExpression());
      case CONDITIONAL_EXPRESSION:
        {
          ConditionalExpression condExpr = (ConditionalExpression) expr;
          return hasSideEffect(condExpr.getExpression())
              || hasSideEffect(condExpr.getThenExpression())
              || hasSideEffect(condExpr.getElseExpression());
        }
      case FIELD_ACCESS:
        return hasSideEffect(((FieldAccess) expr).getExpression());
      case INFIX_EXPRESSION:
        for (Expression operand : ((InfixExpression) expr).getOperands()) {
          if (hasSideEffect(operand)) {
            return true;
          }
        }
        return false;
      case PARENTHESIZED_EXPRESSION:
        return hasSideEffect(((ParenthesizedExpression) expr).getExpression());
      case PREFIX_EXPRESSION:
        {
          PrefixExpression preExpr = (PrefixExpression) expr;
          PrefixExpression.Operator op = preExpr.getOperator();
          return op == PrefixExpression.Operator.INCREMENT
              || op == PrefixExpression.Operator.DECREMENT
              || hasSideEffect(preExpr.getOperand());
        }
      default:
        return true;
    }
  }
94384
function (left, right) {
        if (!left && !right) {
            return true;
        }
        var matches = true;

        for (var prop in right) {
            if (!right.hasOwnProperty(prop)) {
                continue;
            }
            matches &= (left[prop] == right[prop]);
        }
        return matches;
    }
438661
function resolvePropertyName(name, syntax) {
		var snippet = resources.findSnippet(syntax, name);
		
		if (!snippet && prefs.get('css.fuzzySearch')) {
			var minScore = parseFloat(prefs.get('css.fuzzySearchMinScore'));
			snippet = resources.fuzzyFindSnippet(syntax, name, minScore);
		}
		
		if (snippet) {
			if (typeof snippet !== 'string') {
				snippet = snippet.data;
			}
			
			return cssResolver.splitSnippet(snippet).name;
		}
	}
565741
private final boolean isPrecededBySoftDotted(ContextIterator iter) {
        int c;
        int dotType;

        if(iter==null) {
            return false;
        }

        for(iter.reset(-1); (c=iter.next())>=0;) {
            dotType=getDotType(c);
            if(dotType==SOFT_DOTTED) {
                return true; /* preceded by TYPE_i */
            } else if(dotType!=OTHER_ACCENT) {
                return false; /* preceded by different base character (not TYPE_i), or intervening cc==230 */
            }
        }

        return false; /* not preceded by TYPE_i */
    }
595042
function tryAddComputedPropertyName(expression, containers, includeLastPortion) {
                var text = getTextOfIdentifierOrLiteral(expression);
                if (text !== undefined) {
                    if (includeLastPortion) {
                        containers.unshift(text);
                    }
                    return true;
                }
                if (expression.kind === 172 /* PropertyAccessExpression */) {
                    var propertyAccess = expression;
                    if (includeLastPortion) {
                        containers.unshift(propertyAccess.name.text);
                    }
                    return tryAddComputedPropertyName(propertyAccess.expression, containers, /*includeLastPortion*/ true);
                }
                return false;
            }
922639
void validateAffiliationNames(String name) throws InvalidArgumentException {
        checkFormat(name);
        if (name.startsWith(".")) {
            throw new InvalidArgumentException("Affiliation name cannot start with a dot '.'");
        }
        if (name.endsWith(".")) {
            throw new InvalidArgumentException("Affiliation name cannot end with a dot '.'");
        }
        for (int i = 0; i < name.length(); i++) {
            if ((name.charAt(i) == '.') && (name.charAt(i) == name.charAt(i - 1))) {
                throw new InvalidArgumentException("Affiliation name cannot contain multiple consecutive dots '.'");
            }
        }
    }
295243
private Node tryOptimizeNameDeclaration(Node subtree) {
    checkState(NodeUtil.isNameDeclaration(subtree));
    Node left = subtree.getFirstChild();
    if (left.isDestructuringLhs() && left.hasTwoChildren()) {
      Node pattern = left.getFirstChild();
      if (!pattern.hasChildren()) {
        // `var [] = foo();` becomes `foo();`
        Node value = left.getSecondChild();
        subtree.replaceWith(IR.exprResult(value.detach()).srcref(value));
        reportChangeToEnclosingScope(value);
      }
    }
    return subtree;
  }
953155
function isAxisAligned(vector) {
	for (let d in Constants.Directions) {
		let direction = Constants.Directions[d];
		
		if (Vector.dot(direction, vector) === 1) {
			return true;
		}
	}
	
	return false;
}
1256661
private static boolean isSafeFilenameCharacter(char c)
	{
		if (Character.isLetterOrDigit(c))
		{
			return true;
		}
		else if (c == '-' || c == '_' || c == '.')
		{
			return true;
		}
		else
		{
			return false;
		}
	}
855982
function hasPrefix(property, prefix) {
		var info = vendorPrefixes[prefix];
		
		if (!info)
			info = utils.find(vendorPrefixes, function(data) {
				return data.prefix == prefix;
			});
		
		return info && info.supports(property);
	}
206068
function axisNegativeSideProperties(_ref) {
    var oDim = _ref.oDim,
        tPos = _ref.tPos;
    return {
      position: tPos - oDim
    };
  }
678875
function equalOwnProperties(left, right, equalityComparer) {
        if (left === right)
            return true;
        if (!left || !right)
            return false;
        for (var key in left)
            if (hasOwnProperty.call(left, key)) {
                if (!hasOwnProperty.call(right, key) === undefined)
                    return false;
                if (equalityComparer ? !equalityComparer(left[key], right[key]) : left[key] !== right[key])
                    return false;
            }
        for (var key in right)
            if (hasOwnProperty.call(right, key)) {
                if (!hasOwnProperty.call(left, key))
                    return false;
            }
        return true;
    }
1026885
function _checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer) {
    if (targetOffset.left + tooltipLayerStyleLeft + tooltipOffset.width > windowSize.width) {
        // off the right side of the window
        tooltipLayer.style.left = windowSize.width - tooltipOffset.width - targetOffset.left + 'px';
        return false;
    }
    tooltipLayer.style.left = tooltipLayerStyleLeft + 'px';
    return true;
}
1094064
function isInternalName(name) {
  var result = true;

  if ($mson.INTERNAL_NAMES.indexOf(name) === -1) {
    result = false;
  }
  return result;
}
630150
function isVoidElement(elName) {
    var result = false;
    if (elName && elName.toLowerCase) {
        result = VOID_HTML_ELEMENTS.hasOwnProperty(elName.toLowerCase());
    }
    return result;
}
522058
public static String rightTrim(String value, String rightTrim) {
        if (Checker.isEmpty(value) || Checker.isEmpty(rightTrim)) {
            return value;
        }
        int idx = value.length() - rightTrim.length();
        return value.lastIndexOf(rightTrim) == idx ? rightTrim(value.substring(0, idx), rightTrim) : value;
    }