get property descriptor for inName on inObject, even if inName exists on some link in inObject's prototype chain
966774
function getPropertyDescriptor(inObject, inName) {
    if (inObject) {
      var pd = Object.getOwnPropertyDescriptor(inObject, inName);
      return pd || getPropertyDescriptor(Object.getPrototypeOf(inObject), inName);
    }
  }
966562
function getDescriptorForAsyncProp(name) {
  return {
    configurable: false,
    enumerable: true,
    // Save the provided value for async props in a special map
    set(newValue) {
      if (typeof newValue === 'string' || newValue instanceof Promise) {
        this._asyncPropOriginalValues[name] = newValue;
      } else {
        this._asyncPropResolvedValues[name] = newValue;
      }
    },
    // Only the component's state knows the true value of async prop
    get() {
      if (this._asyncPropResolvedValues) {
        // Prop value isn't async, so just return it
        if (name in this._asyncPropResolvedValues) {
          const value = this._asyncPropResolvedValues[name];

          // Special handling - components expect null `data` prop expects to be replaced with `[]`
          if (name === 'data') {
            return value || this._asyncPropDefaultValues[name];
          }

          return value;
        }

        if (name in this._asyncPropOriginalValues) {
          // It's an async prop value: look into component state
          const state = this._component && this._component.internalState;
          if (state && state.hasAsyncProp(name)) {
            return state.getAsyncProp(name);
          }
        }
      }

      // the prop is not supplied, or
      // component not yet initialized/matched, return the component's default value for the prop
      return this._asyncPropDefaultValues[name];
    }
  };
}
679306
def _create_descriptor_from_property_definition(self, class_name, property_definition,
                                                    class_name_to_definition):
        """"""
        name = property_definition['name']
        type_id = property_definition['type']
        linked_class = property_definition.get('linkedClass', None)
        linked_type = property_definition.get('linkedType', None)
        qualifier = None

        validate_supported_property_type_id(name, type_id)

        if type_id == PROPERTY_TYPE_LINK_ID:
            if class_name not in self._edge_class_names:
                raise AssertionError(u'Found a property of type Link on a non-edge class: '
                                     u'{} {}'.format(name, class_name))

            if name not in {EDGE_SOURCE_PROPERTY_NAME, EDGE_DESTINATION_PROPERTY_NAME}:
                raise AssertionError(u'Found a property of type Link with an unexpected name: '
                                     u'{} {}'.format(name, class_name))

            if linked_class is None:
                raise AssertionError(u'Property "{}" is declared with type Link but has no '
                                     u'linked class: {}'.format(name, property_definition))

            if linked_class not in self._vertex_class_names:
                is_linked_class_abstract = class_name_to_definition[linked_class]['abstract']
                all_subclasses_are_vertices = True
                for subclass in self._subclass_sets[linked_class]:
                    if subclass != linked_class and subclass not in self.vertex_class_names:
                        all_subclasses_are_vertices = False
                        break
                if not (is_linked_class_abstract and all_subclasses_are_vertices):
                    raise AssertionError(u'Property "{}" is declared as a Link to class {}, but '
                                         u'that class is neither a vertex nor is it an '
                                         u'abstract class whose subclasses are all vertices!'
                                         .format(name, linked_class))

            qualifier = linked_class
        elif type_id in COLLECTION_PROPERTY_TYPES:
            if linked_class is not None and linked_type is not None:
                raise AssertionError(u'Property "{}" unexpectedly has both a linked class and '
                                     u'a linked type: {}'.format(name, property_definition))
            elif linked_type is not None and linked_class is None:
                # No linked class, must be a linked native OrientDB type.
                validate_supported_property_type_id(name + ' inner type', linked_type)

                qualifier = linked_type
            elif linked_class is not None and linked_type is None:
                # No linked type, must be a linked non-graph user-defined type.
                if linked_class not in self._non_graph_class_names:
                    raise AssertionError(u'Property "{}" is declared as the inner type of '
                                         u'an embedded collection, but is not a non-graph class: '
                                         u'{}'.format(name, linked_class))

                qualifier = linked_class
            else:
                raise AssertionError(u'Property "{}" is an embedded collection but has '
                                     u'neither a linked class nor a linked type: '
                                     u'{}'.format(name, property_definition))

        default_value = None
        default_value_string = property_definition.get('defaultValue', None)
        if default_value_string is not None:
            default_value = parse_default_property_value(name, type_id, default_value_string)

        descriptor = PropertyDescriptor(type_id=type_id, qualifier=qualifier, default=default_value)
        # Sanity-check the descriptor before returning it.
        _validate_collections_have_default_values(class_name, name, descriptor)
        return descriptor
700729
function (ce, ce2)
	{
		var p;
		if (typeof (Object.getOwnPropertyNames) == 'undefined')
		{
			for (p in ce2.prototype)
				if (typeof (ce.prototype[p]) == 'undefined' || ce.prototype[p] == Object.prototype[p]) ce.prototype[p] = ce2.prototype[p];
			for (p in ce2)
				if (typeof (ce[p]) == 'undefined') ce[p] = ce2[p];
			ce.$baseCtor = ce2;
		}
		else
		{
			var props = Object.getOwnPropertyNames(ce2.prototype);
			for (var i = 0; i < props.length; i++)
				if (typeof (Object.getOwnPropertyDescriptor(ce.prototype, props[i])) == 'undefined') Object.defineProperty(ce.prototype, props[i], Object.getOwnPropertyDescriptor(ce2.prototype, props[i]));
			for (p in ce2)
				if (typeof (ce[p]) == 'undefined') ce[p] = ce2[p];
			ce.$baseCtor = ce2;
		}
	}
1117059
private static String descriptorToInternalName(String descriptor) {
        switch (descriptor.charAt(0)) {
            case 'B':
            case 'C':
            case 'D':
            case 'F':
            case 'I':
            case 'J':
            case 'S':
            case 'Z':
            case 'V':
            case '[':
                return descriptor;
            case 'L':
                return classDescriptorToInternalName(descriptor);
            default:
                throw new IllegalArgumentException("bad descriptor:" +
                    descriptor);
        }
    }
961063
function checkDestructured(node) {
            if (ignoreDestructuring) {
                return;
            }

            const properties = node.properties;

            for (let i = 0; i < properties.length; i++) {
                if (properties[i].shorthand) {
                    continue;
                }

                /**
                 * If an ObjectPattern property is computed, we have no idea
                 * if a rename is useless or not. If an ObjectPattern property
                 * lacks a key, it is likely an ExperimentalRestProperty and
                 * so there is no "renaming" occurring here.
                 */
                if (properties[i].computed || !properties[i].key) {
                    continue;
                }

                if (properties[i].key.type === "Identifier" && properties[i].key.name === properties[i].value.name ||
                        properties[i].key.type === "Literal" && properties[i].key.value === properties[i].value.name) {
                    reportError(properties[i], properties[i].key, properties[i].value, "Destructuring assignment");
                }
            }
        }
1110544
private JSType getPropertyTypeIfDeclared(@Nullable ObjectType objectType, String propertyName) {
    if (objectType != null
        && objectType.hasProperty(propertyName)
        && !objectType.isPropertyTypeInferred(propertyName)) {
      return objectType.getPropertyType(propertyName);
    }
    return getNativeType(UNKNOWN_TYPE);
  }
895578
function getProperty(obj, name) {
	if (name === '__proto__') {
		if (!hasOwn.call(obj, name)) {
			return void 0;
		} else if (gOPD) {
			// In early versions of node, obj['__proto__'] is buggy when obj has
			// __proto__ as an own property. Object.getOwnPropertyDescriptor() works.
			return gOPD(obj, name).value;
		}
	}

	return obj[name];
}
1179352
function getOwnPropertyDescriptor(state, prop) {
    const owner = source(state)
    const desc = Reflect.getOwnPropertyDescriptor(owner, prop)
    if (desc) {
        desc.writable = true
        desc.configurable = !Array.isArray(owner) || prop !== "length"
    }
    return desc
}
928497
def build_instance_name(inst, obj=None):
    
    if obj is None:
        for _ in inst.properties.values():
            inst.path.keybindings.__setitem__(_.name, _.value)
        return inst.path
    if not isinstance(obj, list):
        return build_instance_name(inst, get_keys_from_class(obj))
    keys = {}
    for _ in obj:
        if _ not in inst.properties:
            raise pywbem.CIMError(pywbem.CIM_ERR_FAILED,
                                  "Instance of %s is missing key property %s" \
                                  %(inst.classname, _))
        keys[_] = inst[_]
    inst.path = pywbem.CIMInstanceName(classname=inst.classname,
                                       keybindings=keys,
                                       namespace=inst.path.namespace,
                                       host=inst.path.host)
    return inst.path
1204554
function getPropWalkFn(descriptor) {
  var parts = descriptor.split(/ ?\[\]/);
  if (parts.length === 2) {
    return mapProp.bind(null, parts[0]);
  }
  return getProp.bind(null, descriptor);
}
603466
private static String convertToValidJavaClassname(String inName) {
        if (inName == null) return "_";
        if (inName.startsWith("scriptdef_")) inName = inName.substring(10);
        if (inName.equals("")) return "_";

        StringBuilder output = new StringBuilder(inName.length());
        boolean firstChar = true;
        for (int i = 0; i < inName.length(); ++i) {
            char ch = inName.charAt(i);
            if (firstChar && !Character.isJavaIdentifierStart(ch)) {
                ch = '_';
            } else if (!firstChar
                    && !(Character.isJavaIdentifierPart(ch) || ch == '.')) {
                ch = '_';
            }
            firstChar = (ch == '.');
            output.append(ch);
        }
        return output.toString();
    }
511549
def get_is_property(value, is_bytes=False):
    """"""

    if value.startswith('^'):
        prefix = value[1:3]
        temp = value[3:]
        negate = '^'
    else:
        prefix = value[:2]
        temp = value[2:]
        negate = ''

    if prefix != 'is':
        raise ValueError("Does not start with 'is'!")

    script_obj = unidata.ascii_script_extensions if is_bytes else unidata.unicode_script_extensions
    bin_obj = unidata.ascii_binary if is_bytes else unidata.unicode_binary

    value = negate + unidata.unicode_alias['script'].get(temp, temp)

    if value not in script_obj:
        value = negate + unidata.unicode_alias['binary'].get(temp, temp)
        obj = bin_obj
    else:
        obj = script_obj

    return obj[value]
679690
function (object, descriptors) {
      for(var key in descriptors) {
        if (hasOwnProperty.call(descriptors, key)) {
          try {
            defineProperty(object, key, descriptors[key]);
          } catch(o_O) {
            if (window.console) {
              console.log(key + ' failed on object:', object, o_O.message);
            }
          }
        }
      }
    }
209946
public static String getNominalValueString(InstancesHeader context,
            int attIndex, int valIndex) {
        if (context != null) {
            int instAttIndex = attIndex < context.classIndex() ? attIndex
                    : attIndex + 1;
            if ((instAttIndex < context.numAttributes())
                    && (valIndex < context.attribute(instAttIndex).numValues())) {
                return "{val " + (valIndex + 1) + ":"
                        + context.attribute(instAttIndex).value(valIndex) + "}";
            }
        }
        return "{val " + (valIndex + 1) + "}";
    }
939273
private Object getObjectPropertyImpl(Context cx, Object object,
                                           Object id) {
        Scriptable scriptable = (Scriptable)object;
        Object result;
        if (id instanceof String) {
            String name = (String)id;
            if (name.equals("this")) {
                result = scriptable;
            } else if (name.equals("__proto__")) {
                result = scriptable.getPrototype();
            } else if (name.equals("__parent__")) {
                result = scriptable.getParentScope();
            } else {
                result = ScriptableObject.getProperty(scriptable, name);
                if (result == ScriptableObject.NOT_FOUND) {
                    result = Undefined.instance;
                }
            }
        } else {
            int index = ((Integer)id).intValue();
            result = ScriptableObject.getProperty(scriptable, index);
            if (result == ScriptableObject.NOT_FOUND) {
                result = Undefined.instance;
            }
        }
        return result;
    }
1364785
function getName(candidate) {
  var proto   = getProto(candidate),
      isValid = !!proto && !isPlainObject(candidate) && !Array.isArray(candidate);
  if (isValid) {
    for (var key in require.cache) {
      var exports = require.cache[key].exports,
          result  = isPlainObject(exports) ? Object.keys(exports).reduce(test.bind(null, key), null) : test(key);
      if (result) {
        return result;
      }
    }
  }
  return null;

  function test(filename, result, field) {
    if (result) {
      return result;
    } else {
      var candidate    = field ? exports[field] : exports,
          qualified    = [filename, field].filter(Boolean).join('::'),
          isDefinition = (typeof candidate === 'function') && !!candidate.prototype &&
            (typeof candidate.prototype === 'object') && (candidate.prototype === proto);
      return isDefinition && qualified || null;
    }
  }
}