Property access.
Must handle toLHS case.
557013
private Object doProperty( boolean toLHS,
        Object obj, CallStack callstack, Interpreter interpreter )
        throws EvalError
    {
        if(obj == Primitive.VOID)
            throw new EvalError(
            "Attempt to access property on undefined variable or class name",
                this, callstack );

        if ( obj instanceof Primitive )
            throw new EvalError("Attempt to access property on a primitive",
                this, callstack );

        Object value = ((SimpleNode)jjtGetChild(0)).eval(
            callstack, interpreter);

        if ( !( value instanceof String ) )
            throw new EvalError(
                "Property expression must be a String or identifier.",
                this, callstack );

        if ( toLHS )
            return new LHS(obj, (String)value);

        try {
            Object val = Reflect.getObjectProperty( obj, (String)value );
            return null == val ?  Primitive.NULL : Primitive.unwrap(val);
        }
        catch (ReflectError e)
        {
            throw new EvalError("No such property: " + value, this, callstack, e);
        }
    }
1101356
function (trans, val) {
		var key,
			tmpArr = {},
			isArr = $.isArray(trans);
		for (key in trans) {
			if (isArr || trans.hasOwnProperty(key)) {
				tmpArr[trans[key]] = val || key;
			}
		}
		return tmpArr;
	}
929501
def can_access(self, permission_name, view_name):
        """"""
        user = g.user
        if user.is_anonymous:
            return self.is_item_public(permission_name, view_name)
        return self._has_view_access(user, permission_name, view_name)
1234673
function _(obj, prop, options) {
    if (obj == null) {
      return obj;
    }

    return getAccessorData(obj[prop], options.context);
  }
654483
def get_by(self, prop, val, raise_exc=False):
        ''''''
        try:
            val = self.serialize(val)
            return self._meta[prop][val][0]
        except (KeyError, IndexError):
            if raise_exc:
                raise
            else:
                return None
1165104
private String ignorePropertyCase(final Part part, final String property) {
		if (!shouldIgnoreCase(part)) {
			return property;
		}
		if (!part.getProperty().getLeafProperty().isCollection()) {
			return "LOWER(" + property + ")";
		}
		return format("(FOR i IN TO_ARRAY(%s) RETURN LOWER(i))", property);
	}
763791
private void fixJiraIssueTransitionId(Map<String, Object> properties) {

        if (properties != null) {
            Object jiraIssueTransitionId = properties.get(JIRA_ISSUE_TRANSITION_ID_PROP);
            if (jiraIssueTransitionId instanceof String) {
                if (((String)jiraIssueTransitionId).trim().isEmpty()) {
                    properties.put(JIRA_ISSUE_TRANSITION_ID_PROP, null);
                } else {
                    properties.put(JIRA_ISSUE_TRANSITION_ID_PROP, Integer.valueOf((String)jiraIssueTransitionId));
                }
            }
        }
    }
1229698
private TResult queryForValues(String property) {
		TResult result = null;
		if (has()) {
			result = getDao().queryForEq(COLUMN_PROPERTY, property);
		}
		return result;
	}
1016081
protected void handleName(
      EntityDesc entityDesc, EntityPropertyDesc propertyDesc, ColumnMeta columnMeta) {
    String name = StringUtil.fromSnakeCaseToCamelCase(columnMeta.getName());
    propertyDesc.setName(name);
  }
304069
function handlePermissions(options) {
            return models.Role.findOne({name: 'Owner'}).then((ownerRole) => {
                return canThis(options.context).assign.role(ownerRole);
            }).then(() => {
                return options;
            });
        }
1194467
Object getPropertyValue(final String propName, final Interpreter interp)
            throws UtilEvalError {
        String accessorName = Reflect.accessorName(Reflect.GET_PREFIX, propName);
        final Class<?>[] classArray = Reflect.ZERO_TYPES;
        BshMethod m = this.getMethod(accessorName, classArray);
        try {
            if (m != null)
                return m.invoke((Object[]) null, interp);
            accessorName = Reflect.accessorName(Reflect.IS_PREFIX, propName);
            m = this.getMethod(accessorName, classArray);
            if (m != null && m.getReturnType() == Boolean.TYPE)
                return m.invoke((Object[]) null, interp);
            return Primitive.VOID;
        } catch (final EvalError ee) {
            throw new UtilEvalError("'This' property accessor threw exception: "
                    + ee.getMessage(), ee);
        }
    }
49747
public static Object box(Object property, Class<?> to) {
		if (property instanceof Exception) {
			throw new RuntimeException((Exception) property);
		}
		if (property == null) {
			return property;
		}

		if (property.getClass().equals(to)) {
			return property;
		}

		if (property instanceof String && String.class.isAssignableFrom(to)) {
			return property;
		}

		if ((property instanceof String || property instanceof Boolean) && Boolean.class.isAssignableFrom(to)) {
			if (((String) property).equalsIgnoreCase("true") || property.equals("1")) {
				return true;
			}
			if (((String) property).equalsIgnoreCase("false") || property.equals("0")) {
				return false;
			}
		}

		if ((property instanceof String || property instanceof Integer) && Integer.class.isAssignableFrom(to)) {
			if (((String) property).isEmpty()) {
				return 0;
			}
			return new Integer(property.toString());
		}

		if ((property instanceof String || property instanceof Integer || property instanceof Long) && Long.class.isAssignableFrom(to)) {
			if (((String) property).isEmpty()) {
				return 0L;
			}
			return new Long(property.toString());
		}

		if ((property instanceof String || property instanceof Double) && Double.class.isAssignableFrom(to)) {
			if (((String) property).isEmpty()) {
				return 0D;
			}
			return new Double(property.toString());
		}

		return to.cast(property);
	}
1208006
function handleOut (ui, out) {

    if (out.options) {
        Object.keys(out.options).forEach(function (key) {
            ui.options = ui.options.set(key, out.options[key]);
        });
    }

    if (out.optionsIn) {
        out.optionsIn.forEach(function (item) {
            ui.options = ui.options.setIn(item.path, item.value);
        });
    }

    if (out.instance) {
        Object.keys(out.instance).forEach(function (key) {
            ui[key] = out.instance[key];
        });
    }
}
1363154
function handleObject(object, schema, fullObject, path) {
    const resultObject = {};

    Object.keys(schema).forEach(propertyName => {
        if (propertyName.startsWith('$')) {
            return;
        }

        const propertyValue = object[propertyName];
        const propertyPath  = path.concat(propertyName);

        let propertySchema = schema[propertyName];
        if (propertySchema instanceof Function) {
            propertySchema = propertySchema(propertyValue, object, fullObject, propertyPath);
        }

        let newPropertyValue = propertyValue;

        if (propertySchema instanceof Object) {
            if (propertySchema.$default !== undefined && newPropertyValue === undefined) {
                newPropertyValue = propertySchema.$default;
            }

            const itemsSchema = propertySchema.$items || propertySchema[0];
            if (itemsSchema && Object.keys(itemsSchema).some(p => !p.startsWith('$')) && newPropertyValue instanceof Array) {
                const arraySchema = Array(newPropertyValue.length).fill(itemsSchema);
                const handledArrayLikeObject = handleObject(newPropertyValue, arraySchema, fullObject, propertyPath);
                newPropertyValue = Object.keys(handledArrayLikeObject).map(key => handledArrayLikeObject[key]);
            } else if (Object.keys(propertySchema).some(p => !p.startsWith('$')) && newPropertyValue instanceof Object) {
                newPropertyValue = handleObject(newPropertyValue, propertySchema, fullObject, propertyPath);
            }
        }

        resultObject[propertyName] = newPropertyValue;
    });

    return resultObject;
}
566455
public static void setProperty(final Object object, final Field field, final Object value) throws IllegalAccessException {
        boolean access = field.isAccessible();
        field.setAccessible(true);
        field.set(object, value);
        field.setAccessible(access);
    }
267844
function handleConnected(p_ComponentInstance, p_Properties) {
	ensureQuickAccess(p_ComponentInstance);
	if (p_Properties) {
		const originalValues = {};

		Object.keys(p_Properties).forEach((p_PropertyKey) => {
			const property = p_Properties[p_PropertyKey];
			const attributeName = camelCaseToDashes(p_PropertyKey);

			originalValues[p_PropertyKey] = p_ComponentInstance[p_PropertyKey];

			Object.defineProperty(p_ComponentInstance, p_PropertyKey, {
				get() { return p_ComponentInstance._properties[p_PropertyKey]; },
				set(p_Value) {
					const oldValue = p_ComponentInstance._properties[p_PropertyKey];
					let toAttribute = (p_ConvertValue) => p_ConvertValue.toString();
					switch (property.type) {
						case Array: p_ComponentInstance._properties[p_PropertyKey] = (typeof p_Value === 'string') ? JSON.parse(p_Value) : Array.isArray(p_Value) ? p_Value : []; toAttribute = (p_ConvertValue) => JSON.stringify(p_ConvertValue); break;
						case Boolean: p_ComponentInstance._properties[p_PropertyKey] = p_Value && p_Value !== 'false'; toAttribute = () => ''; break;
						case Number: p_ComponentInstance._properties[p_PropertyKey] = ((p_Value === undefined) ? 0 : Number(p_Value)) || 0; break;
						case Object: p_ComponentInstance._properties[p_PropertyKey] = (typeof p_Value === 'string') ? JSON.parse(p_Value) : (typeof p_Value === 'object') ? p_Value : {}; toAttribute = (p_ConvertValue) => JSON.stringify(p_ConvertValue); break;
						case String: p_ComponentInstance._properties[p_PropertyKey] = ((p_Value === undefined || p_Value === null) ? '' : String(p_Value)) || ''; break;
					}
					if (property.observer) {
						if (typeof property.observer === 'function') {
							if (oldValue !== p_ComponentInstance._properties[p_PropertyKey]) {
								property.observer(p_ComponentInstance, p_ComponentInstance._properties[p_PropertyKey], oldValue);
							}
						} else if (p_ComponentInstance[property.observer]) {
							if (oldValue !== p_ComponentInstance._properties[p_PropertyKey]) {
								p_ComponentInstance[property.observer](p_ComponentInstance._properties[p_PropertyKey], oldValue);
							}
						} else {
							console.warn(`The observer with the name: '${property.observer}' was not found inside the class for web component ${p_ComponentInstance.constructor.is}. Make sure that you added a public function with the name '${property.observer}' to the class.`);
						}
					}
					if (property.reflectToAttribute) {
						if (p_ComponentInstance._properties[p_PropertyKey]) {
							p_ComponentInstance.setAttribute(attributeName, toAttribute(p_ComponentInstance._properties[p_PropertyKey]));
						} else {
							p_ComponentInstance.removeAttribute(attributeName);
						}
					}
				},
			});
		});

		Object.keys(p_Properties).forEach((p_PropertyKey) => {
			const property = p_Properties[p_PropertyKey];
			const attributeName = camelCaseToDashes(p_PropertyKey);
			let userInitialized;
			let originalValue = originalValues[p_PropertyKey] || null;

			if (originalValue) {
				switch (property.type) {
					case Array:
						if (Array.isArray(originalValue)) {
							p_ComponentInstance[p_PropertyKey] = originalValue;
						} else {
							originalValue = null;
						}
						break;
					case Boolean:
						if (typeof originalValue === 'boolean') {
							p_ComponentInstance[p_PropertyKey] = originalValue;
						} else {
							originalValue = null;
						}
						break;
					case Number:
						if (typeof originalValue === 'number') {
							p_ComponentInstance[p_PropertyKey] = originalValue;
						} else {
							originalValue = null;
						}
						break;
					case Object:
						if (typeof originalValue === 'object') {
							p_ComponentInstance[p_PropertyKey] = originalValue;
						} else {
							originalValue = null;
						}
						break;
					case String:
						if (typeof originalValue === 'string') {
							p_ComponentInstance[p_PropertyKey] = originalValue;
						} else {
							originalValue = null;
						}
						break;
				}
			}

			/* if (originalValue === null)  { */
			if (p_ComponentInstance.hasAttribute(attributeName)) {
				userInitialized = p_ComponentInstance.getAttribute(attributeName);
			}

			if (property.reflectToAttribute || p_ComponentInstance[p_PropertyKey] === undefined) {
				// use the user specified value if it was specified
				if (userInitialized !== undefined) {
					switch (property.type) {
						case Array:
							p_ComponentInstance[p_PropertyKey] = JSON.parse(userInitialized);
							break;
						case Boolean:
							p_ComponentInstance[p_PropertyKey] = userInitialized !== 'false';
							break;
						case Number:
							p_ComponentInstance[p_PropertyKey] = Number(userInitialized);
							break;
						case Object:
							p_ComponentInstance[p_PropertyKey] = JSON.parse(userInitialized);
							break;
						case String:
							p_ComponentInstance[p_PropertyKey] = String(userInitialized);
							break;
					}
				} else { // use the default value
					switch (property.type) {
						case Array:
							p_ComponentInstance[p_PropertyKey] = property.value || [];
							break;
						case Boolean:
							p_ComponentInstance[p_PropertyKey] = property.value || false;
							break;
						case Number:
							p_ComponentInstance[p_PropertyKey] = property.value || 0;
							break;
						case Object:
							p_ComponentInstance[p_PropertyKey] = property.value || {};
							break;
						case String:
							p_ComponentInstance[p_PropertyKey] = property.value || '';
							break;
					}
				}
			}
			// }
		});
	}
}
310518
def property
      {
        :name        => get_if_handleable(raw[:property_name]),
        :exact_match => (raw[:property_name_exact_match] == true),
        :type        => get_if_handleable(raw[:property_type])
      }.reject { |k, v| v.nil? }
    end