Find all objects that match galen object statements
@param objectExpression - Galen object statements
@return
764199
public List<String> findOnlyExistingMatchingObjectNames(String objectExpression) {
        String[] parts = objectExpression.split(",");

        List<String> allSortedObjectNames = getSortedObjectNames();
        List<String> resultingObjectNames = new LinkedList<>();

        for (String part : parts) {
            String singleExpression = part.trim();
            if (!singleExpression.isEmpty()) {
                if (GalenUtils.isObjectGroup(singleExpression)) {
                    resultingObjectNames.addAll(findObjectsInGroup(GalenUtils.extractGroupName(singleExpression)));
                } else if (GalenUtils.isObjectsSearchExpression(singleExpression)) {
                    Pattern objectPattern = GalenUtils.convertObjectNameRegex(singleExpression);
                    for (String objectName : allSortedObjectNames) {
                        if (objectPattern.matcher(objectName).matches()) {
                            resultingObjectNames.add(objectName);
                        }
                    }
                } else if (objects.containsKey(singleExpression)) {
                    resultingObjectNames.add(singleExpression);
                }
            }
        }
        return resultingObjectNames;
    }
22582
public function findEventObjects(string $objectClass, string $uuid, int $max_version = null, int $min_version = null, int $user = null): array
    {
        $criteria = new Criteria();

        $criteria->where(Criteria::expr()->eq('uuid', $uuid));

        if (null !== $max_version) {
            $criteria->andWhere(Criteria::expr()->lte('version', $max_version));
        }

        if (null !== $min_version) {
            $criteria->andWhere(Criteria::expr()->gte('version', $min_version));
        }

        if (null !== $user) {
            $criteria->andWhere(Criteria::expr()->eq('user', $user));
        }

        $criteria->orderBy(['version' => Criteria::ASC]);

        $eventObjectsResults = $this->em->getRepository($objectClass)->matching($criteria);

        return $eventObjectsResults ? $eventObjectsResults->toArray() : [];
    }
639216
function parseQueryExpression( obj ) {
	if ( sys.size( obj ) > 1 ) {
		var arr = sys.map( obj, function ( v, k ) {
			var entry = {};
			entry[k] = v;
			return entry;
		} );
		obj = {
			$and : arr
		};
	}
	var payload = [];
	sys.each( obj, function ( val, key ) {

		var exprObj = processExpressionObject( val, key );

		if ( exprObj.operation === "$regex" ) {
			exprObj.options = val.$options;
		}

		payload.push( exprObj );
	} );

	return payload;
}
550877
function getAllExpressionStatements(node) {
  console.assert(node.body && node.body.body);
  var expressionStatements = [];
  node.body.body.forEach(function(childNode) {
    if (childNode.type == 'ExpressionStatement') {
      expressionStatements.push(childNode);
    } else if (childNode.body) {
      var childExpressions = getAllExpressionStatements(childNode);
      expressionStatements.push.apply(expressionStatements, childExpressions);
    }
  });
  return expressionStatements;
}
1354588
public final BooleanExpression contains(Expression<E> child) {
        return Expressions.booleanOperation(Ops.IN, child, mixin);
    }
218540
private Node parseTypeExpressionList(String typeName, JsDocToken token) {
    Node typeExpr = parseTopLevelTypeExpression(token);
    if (typeExpr == null) {
      return null;
    }
    Node typeList = IR.block();
    int numTypeExprs = 1;
    typeList.addChildToBack(typeExpr);
    while (match(JsDocToken.COMMA)) {
      next();
      skipEOLs();
      typeExpr = parseTopLevelTypeExpression(next());
      if (typeExpr == null) {
        return null;
      }
      numTypeExprs++;
      typeList.addChildToBack(typeExpr);
    }
    if (typeName.equals("Object") && numTypeExprs == 1) {
      // Unlike other generic types, Object<V> means Object<?, V>, not Object<V, ?>.
      typeList.addChildToFront(newNode(Token.QMARK));
    }
    return typeList;
  }
1246641
function tryGetObjectLikeCompletionSymbols(objectLikeContainer) {
                // We're looking up possible property names from contextual/inferred/declared type.
                isMemberCompletion = true;
                var typeForObject;
                var existingMembers;
                if (objectLikeContainer.kind === 171 /* ObjectLiteralExpression */) {
                    // We are completing on contextual types, but may also include properties
                    // other than those within the declared type.
                    isNewIdentifierLocation = true;
                    // If the object literal is being assigned to something of type 'null | { hello: string }',
                    // it clearly isn't trying to satisfy the 'null' type. So we grab the non-nullable type if possible.
                    typeForObject = typeChecker.getContextualType(objectLikeContainer);
                    typeForObject = typeForObject && typeForObject.getNonNullableType();
                    existingMembers = objectLikeContainer.properties;
                }
                else if (objectLikeContainer.kind === 167 /* ObjectBindingPattern */) {
                    // We are *only* completing on properties from the type being destructured.
                    isNewIdentifierLocation = false;
                    var rootDeclaration = ts.getRootDeclaration(objectLikeContainer.parent);
                    if (ts.isVariableLike(rootDeclaration)) {
                        // We don't want to complete using the type acquired by the shape
                        // of the binding pattern; we are only interested in types acquired
                        // through type declaration or inference.
                        // Also proceed if rootDeclaration is a parameter and if its containing function expression/arrow function is contextually typed -
                        // type of parameter will flow in from the contextual type of the function
                        var canGetType = !!(rootDeclaration.initializer || rootDeclaration.type);
                        if (!canGetType && rootDeclaration.kind === 142 /* Parameter */) {
                            if (ts.isExpression(rootDeclaration.parent)) {
                                canGetType = !!typeChecker.getContextualType(rootDeclaration.parent);
                            }
                            else if (rootDeclaration.parent.kind === 147 /* MethodDeclaration */ || rootDeclaration.parent.kind === 150 /* SetAccessor */) {
                                canGetType = ts.isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent);
                            }
                        }
                        if (canGetType) {
                            typeForObject = typeChecker.getTypeAtLocation(objectLikeContainer);
                            existingMembers = objectLikeContainer.elements;
                        }
                    }
                    else {
                        ts.Debug.fail("Root declaration is not variable-like.");
                    }
                }
                else {
                    ts.Debug.fail("Expected object literal or binding pattern, got " + objectLikeContainer.kind);
                }
                if (!typeForObject) {
                    return false;
                }
                var typeMembers = typeChecker.getPropertiesOfType(typeForObject);
                if (typeMembers && typeMembers.length > 0) {
                    // Add filtered items to the completion list
                    symbols = filterObjectMembersList(typeMembers, existingMembers);
                }
                return true;
            }
1352277
function _parse_object_expressions(obj) {
	debug.assert(obj).is('object');
	if(!obj.$documents) {
		return;
	}

	var expressions = obj.$documents.expressions;
	if(!expressions) {
		return;
	}

	ARRAY(Object.keys(expressions)).forEach(function(prop) {
		var value = expressions[prop], key;
		// FIXME: This code should understand things better
		if(prop.substr(0, 'content.'.length) === 'content.') {
			key = prop.substr('content.'.length);
		} else {
			key = '$' + prop;
		}
		obj[key] = value;
	});
}
1038078
private function getExpressionValue($object, Expression $field)
    {
        try {
            return $this->expressionLanguage->evaluate($field->getExpression(), [
                'object' => $object,
            ]);
        } catch (\Exception $e) {
            throw new \RuntimeException(sprintf(
                'Error encountered when evaluating expression "%s"',
                $field->getExpression()
            ), null, $e);
        }
    }
201472
def get_predicates(self, subject, object):
        
        for statement in self.spo_search(subject=subject, object=object):
            yield str(statement[1])
141172
protected XExpression getAssociatedExpression(JvmMember object) {
		final XExpression expr = getTypeBuilder().getExpression(object);
		if (expr == null) {
			// The member may be a automatically generated code with dynamic code-building strategies
			final Procedure1<? super ITreeAppendable> strategy = getTypeExtensions().getCompilationStrategy(object);
			if (strategy != null) {
				//
			} else {
				final StringConcatenationClient template = getTypeExtensions().getCompilationTemplate(object);
				if (template != null) {
					//
				}
			}
		}
		return expr;
	}
669866
function fetch_objects_by_expression(data, prop, fields, expression) {
				if(!is_object(data)) { return error('fetch_objects_by_expression(data, ..., ...) not object: '+ data); }
				if(!is_string(prop)) { return error('fetch_objects_by_expression(..., prop, ...) not string: '+ prop); }
				if(!is_string(expression)) { return warn('Expression was not string: {' + expression + '}, typeof ' + (typeof expression)); }

				prop = prop.trim();
				expression = expression.trim();

				var type_name, type_prop;
				var type_start = expression.indexOf('#');
				if(type_start >= 0) {
					type_name = expression.substr(0, type_start).trim();
					type_prop = expression.substr(type_start+1).trim();
				} else {
					type_name = expression;
				}

				if(!type_prop) {
					return error('No property name in expression: {'+ expression+'}');
				}

				var rows = expression_query(data, prop, type_name, type_prop, fields);
				if(!is_array(rows)) {
					return rows;
				}

				var warnings = [];

				if(!data.documents) {
					data.documents = {};
				}

				if(!data.documents.expressions) {
					data.documents.expressions = {};
				}

				if(!is_array(data.documents.expressions[prop])) {
					if(data.documents.expressions.hasOwnProperty(prop)) {
						data.documents.expressions[prop] = [data.documents.expressions[prop]];
					} else {
						data.documents.expressions[prop] = [];
					}
				}

				var id_list = data.documents.expressions[prop];

				rows.forEach(function(row) {
					var uuid = row.id;
					if(is_uuid(uuid)) {
						id_list.push(uuid);
						if(data.documents[uuid] === undefined) {
							data.documents[uuid] = row;
						//} else {
						//	warnings.push( warn('Document already fetched: ' + uuid) );
						}
					} else {
						warnings.push( warn('Document did not have UUID property: ' + JSON.stringify(row, null, 2) ) );
					}
				});

				if(warnings.length >= 1) {
					return warnings.shift();
				}
			}
922580
function findAllExpressions(parentBlockStatement, expn, text) {
        var doc   = session.editor.document,
            obj   = {},
            expns = [];

        // find all references of the expression
        obj[expn.type] = function(node) {
            if (text === doc.getText().substr(node.start, node.end - node.start)) {
                expns.push(node);
            }
        };
        ASTWalker.simple(parentBlockStatement, obj);

        return expns;
    }
719458
function getPropertyNamesInParentObjectExpression(node) {
  var objectExpression = obj.get(node, "parent.parent");
  var ret = [];
  if (!objectExpression) {
    return ret;
  }
  objectExpression.properties.forEach(function (p) {
    if (p.value !== node) {
      ret.push(p.key.name);
    }
  });
  return ret;
}
587416
@Override
  public Void visitExpressionStatement(ExpressionStatementTree tree, VisitorState visitorState) {
    VisitorState state =
        processMatchers(
            expressionStatementMatchers,
            tree,
            ExpressionStatementTreeMatcher::matchExpressionStatement,
            visitorState);
    return super.visitExpressionStatement(tree, state);
  }
589988
public ArrayNode filter(ComparisonExpression expression) {
		
		ArrayNode result = new ObjectMapper().createArrayNode();
		if (node.isArray()) {
			Iterator<JsonNode> iterator = node.iterator();
			int validObjectsCount = 0;
			int topCount=0;
			while (iterator.hasNext()) {
				JsonNode curNode = iterator.next();
				if (expression==null || (expression!=null && new Query(curNode).is(expression))) {
					validObjectsCount++;
					if (this.skip != null && this.skip.intValue() > 0 && this.skip.intValue() >= validObjectsCount) {
						continue;
					}

					if (this.top != null && topCount >= this.top.intValue()) {
						break;
					}
					result.add(curNode);
					topCount++;
				}
			}
		} else {
			throw new UnsupportedExprException("Filters are only supported on ArrayNode objects");
		}
		return result;
	}
671296
function parseObjectExpressions(node) {
    if (!node || node.type !== 'ObjectExpression') {
      return {};
    }
    var properties = {}, property;
    for (var i = 0; i < node.properties.length; i++) {
      property = node.properties[i];
      if (property.key.type === 'Identifier' && property.value.type === 'Literal') {
        properties[property.key.name] = property.value.value;
      }
    }
    return properties;
  }