Find the second-level objects - Properties, Constructor, Methods, Constants, Events
13444
function isaSecondLevelObject ($) {return (
    $.comment.getTag("property").length ||
    ($.is("CONSTRUCTOR") && $.name.match(/^[A-Z][A-Za-z]+$/)) ||
    ($.is("FUNCTION") && $.name.match(/^[a-z][A-Za-z]+$/)) ||
    $.isConstant ||
    ($.type == "Function" && $.is("OBJECT"))
  );}
190652
function(object, propertyA, propertyB) {
            if(typeof object[propertyA] !== 'undefined') {
                return object[propertyA];
            }
            if(typeof object[propertyB] !== 'undefined') {
                return object[propertyB];
            }
            return 0;
        }
188535
private ObjectType findMethodOwner(Node n) {
    if (n == null) {
      return null;
    }
    Node parent = n.getParent();
    FunctionType ctor = null;
    if (parent.isAssign()) {
      Node target = parent.getFirstChild();
      if (NodeUtil.isPrototypeProperty(target)) {
        // TODO(johnlenz): handle non-global types
        JSType type = registry.getGlobalType(target.getFirstFirstChild().getQualifiedName());
        ctor = type != null ? ((ObjectType) type).getConstructor() : null;
      }
    } else if (parent.isClass()) {
      // TODO(sdh): test this case once the type checker understands ES6 classes
      ctor = parent.getJSType().toMaybeFunctionType();
    }
    return ctor != null ? ctor.getInstanceType() : null;
  }
980245
function findPropertyMetaInfo(type, property) {
    if (!type) {
        return;
    }
    if (typeof type === 'string') {
        var context = findTypeMetaInfo(type);
    } else {
        var context = type;
        type = type.name;
    }
    if (!context) {
        return;
    }

    var info = (context.inputsClass || []).find(i => i.name == property) ||
        (context.outputsClass || []).find(i => i.name == property) ||
        mergeProperties(context).find(i => i.name == property) ||
        (context.methodsClass || context.methods || []).find(i => i.name == property);
    if (info) {
        return {type: context, property: info};
    }
    return findPropertyMetaInfo(context.extends, property);
}
108883
function _getPathInfo (obj, parts, walkNonEnumerables) {
    if (isNil(obj)) {
        throw _makeTypeErrorFor(obj, "object");
    }

    var target = obj;
    var i = -1;
    var len = parts.length;
    var key;

    while (++i < len) {
        key = _getPathKey(target, parts[i], walkNonEnumerables);

        if (isUndefined(key)) {
            break;
        }

        target = target[key];
    }

    return i === len ? { isValid: true, target: target } : { isValid: false, target: void 0 };
}
690496
function (obj) {
        if (
            !obj
            || {}.toString.call(obj) !== '[object Object]'
            || obj.nodeType
            || obj.setInterval
        ) {
            return false
        }

        var hasOwn              = {}.hasOwnProperty;
        var hasOwnConstructor   = hasOwn.call(obj, 'constructor');
        // added test for node > v6
        var hasMethodPrototyped = ( typeof(obj.constructor) != 'undefined' ) ? hasOwn.call(obj.constructor.prototype, 'isPrototypeOf') : false;


        if (
            obj.constructor && !hasOwnConstructor && !hasMethodPrototyped
        ) {
            return false
        }

        //Own properties are enumerated firstly, so to speed up,
        //if last one is own, then all properties are own.
        var key;
        return key === undefined || hasOwn.call(obj, key)
    }
1373731
function detect_class_members_from_array(cls, ast) {
  cls["members"] = [];
  return _.each(ast["elements"], function(el) {
    detect_method_or_property(cls, key_value(el), el, el);
  });
}
1137623
function getObjectClassname (listener) {
    if (!listener) return DEFAULT_LISTENER;
    if (typeof listener === 'string') return listener;
    var constr = listener.constructor;
    return constr.name || constr.toString().split(/ |\(/, 2)[1];
}
588820
function getExample (obj) {
  if (isArray(obj)) {
    return removeOptionalWithoutExamples(obj).map(getExample);
  }

  const { example, details } = obj;

  if (example === undefined && details !== undefined) {
    const nested = {};

    Object.keys(details).forEach((key) => {
      nested[key] = getExample(details[key]);
    });

    return nested;
  }

  return example;
}
361524
function findClass(value) {

	var constructor,
	    ns;

	// Return nothing for falsy values
	if (!value) {
		return null;
	}

	// Look for a regular class when it's just a string
	if (typeof value == 'string') {

		if (exports.Classes[value]) {
			return exports.Classes[value];
		}

		return null;
	}

	if (value.path) {
		return fromPath(exports.Classes, value.path);
	} else {
		if (value.namespace) {
			ns = fromPath(exports.Classes, value.namespace);
		} else {
			ns = exports.Classes;
		}

		if (value.dry_class) {
			constructor = fromPath(ns, value.dry_class);
		} else if (value.name) {
			constructor = ns[value.name];
		}

		if (!constructor && ns) {
			if (ns.main_class) {
				ns = ns.main_class;
			}

			if (ns && typeof ns.getClassForUndry == 'function') {
				constructor = ns.getClassForUndry(value.dry_class || value.name);
			}
		}
	}

	if (!constructor) {
		console.log('Could not find constructor for', value);
	}

	return constructor;
}
537763
function() {
    var objKeys = []
    var self = this

    this.use(function() {
      // get all current property names
      objKeys = Object.keys(this)
    }, 90)

    this.on('finished', function() {
      // an now search for new ones ==> instance methods for our new model class

      Object.keys(self).forEach(function(name) {
        if (objKeys.indexOf(name) === -1) {
          self.instanceMethods[name] = self[name]
          delete self[name]
        }
      })
    })
  }
172907
function traverse(obj) {
      each(obj, (val, indexOrProp) => {
        // Move deeper into the object
        const next = obj[indexOrProp];

        // If we can go no further, then quit
        if (MongoObject.isBasicObject(next)) {
          traverse(next);
        } else if (Array.isArray(next)) {
          obj[indexOrProp] = without(next, REMOVED_MARKER);
          traverse(obj[indexOrProp]);
        }
      });
    }
291739
function(propertyA, propertyB, opts) {
  opts = opts || {}
  const typeA = identify(propertyA);
  const typeB = identify(propertyB);

  // Simple value comparison
  if (typeA === types.string || typeA === types.number || typeA === types.boolean || typeA === types.function) {
    return propertyA === propertyB;
  }
  else if (typeA === types.array) {
    return propertyA.sort().toString() === propertyB.sort().toString();
  }
  else if (typeA === types.date) {
    return propertyA.valueOf() === propertyB.valueOf();
  }
  else if (typeA === types.object) {
    return compareObjectWithKeys(propertyA, propertyB)
  }
  else if (typeA === types.class) {
    if (opts.classComparator) {
      opts.classComparator(propertyA, propertyB);
    } else if (propertyA.constructor.name !== propertyB.constructor.name) {
      return false;
    }
    return compareObjectWithKeys(propertyA, propertyB)
  }
  return typeA === typeB;
}
26369
def find_class(self):
        """"""
        if self.value <= 1:
            return InstructionsProperty
        elif self.value <= 3:
            return NextTablesProperty
        elif self.value <= 7:
            return ActionsProperty

        return OxmProperty
503498
function(object) {
  var level = 1;
  var key;
  for (key in object) {
    if (!object.hasOwnProperty(key)) continue;

    if (_.isObjectLike(object[key])) {
      var depth = depthOf(object[key]) + 1;
      level = Math.max(depth, level);
    }
  }
  return level;
}
429043
function (events) {
        "use strict";
    
        var loaded = {};
        this.loaded = loaded;
    
        var items = {};
        var keys = [];
        Object.defineProperty(this, 'items', {
            'get': function () {
                return items;
            }
        });
        Object.defineProperty(this, 'keys', {
            'get': function () {
                return keys;
            }
        });
        Object.defineProperty(this, 'length', {
            'get': function () {
                return keys.length;
            }
        });
    
        // List of modules that are multilanguage
        var multilanguage = new Map();
        Object.defineProperty(this, 'multilanguage', {
            'get': function () {
                return multilanguage;
            }
        });
    
        this.get = function (moduleID, extendedID) {
    
            var done = function () {
    
                events.trigger(moduleID + ':done');
                events.trigger('done', moduleID);
    
                loaded[moduleID] = true;
    
            };
    
            var extended;
            if (extendedID) {
                extended = items[extendedID];
                if (!extended) {
                    extended = new Module(moduleID, events);
                    items[extendedID] = extended;
                    keys.push(extendedID);
                }
            }
    
            var module = items[moduleID];
            if (!module) {
                module = new Module(moduleID, events);
                items[moduleID] = module;
                keys.push(moduleID);
            }
    
    
            if (extended) return [module, extended];
            else return [module, done];
    
        };
    
    }
57150
Level getLevelProperty(String name, Level defaultValue) {
        String val = getProperty(name);
        if (val == null) {
            return defaultValue;
        }
        Level l = Level.findLevel(val.trim());
        return l != null ? l : defaultValue;
    }