Extracts the nested value specified by the sequence of idx objects by
 calling dig at each step, returning nil if any intermediate step is nil.

 @return CowProxy wrapped value from wrapped object
9460
def dig(key, *args)
      value = send(key)
      args.empty? ? value : value&.dig(*args)
    end
668619
public Object getObject()
    {
        Object ret = null;
        try {
            ret =  this.proxy.getValue(this.object);
        } catch (final EFapsException e) {
            LOG.error("Catched", e);
        }
        return ret;
    }
616197
@SuppressWarnings("UnusedParameters")
    protected ByteBuf extractObject(ChannelHandlerContext ctx, ByteBuf buffer, int index, int length) {
        return buffer.retainedSlice(index, length);
    }
130966
protected Object getDataValue(Trace trace, Node node, Direction direction, Map<String, ?> headers,
            Object[] values) {
        if (source == DataSource.Content) {
            return values[index];
        } else if (source == DataSource.Header) {
            return headers.get(key);
        }
        return null;
    }
1271667
@Override
	protected List<Object> extractValues(String thePaths, IBaseResource theResource) {
		FHIRPathEngine fp = new FHIRPathEngine(myWorkerContext);

		List<Object> values = new ArrayList<>();
		String[] nextPathsSplit = SPLIT.split(thePaths);
		for (String nextPath : nextPathsSplit) {
			List<Base> allValues;
			try {
				allValues = fp.evaluate((Base) theResource, trim(nextPath));
			} catch (FHIRException e) {
				String msg = getContext().getLocalizer().getMessage(BaseSearchParamExtractor.class, "failedToExtractPaths", nextPath, e.toString());
				throw new InternalErrorException(msg, e);
			}
			if (allValues.isEmpty() == false) {
				values.addAll(allValues);
			}
		}

		for (int i = 0; i < values.size(); i++) {
			Object nextObject = values.get(i);
			if (nextObject instanceof Extension) {
				Extension nextExtension = (Extension) nextObject;
				nextObject = nextExtension.getValue();
				values.set(i, nextObject);
			}
		}

		return values;
	}
1126410
def get(self, instance, **kwargs):
        
        # The default value
        default = self.getDefault(instance)

        # Retrieve the proxy object
        proxy_object = self.get_proxy(instance)

        # Return None if we could not find a proxied object, e.g. through
        # the proxy expression 'context.getSample()' on an AR
        if proxy_object is None:
            logger.debug("Expression '{}' did not return a valid Proxy Object on {}"
                         .format(self.proxy, instance))
            return default

        # Lookup the proxied field by name
        field_name = self.getName()
        field = proxy_object.getField(field_name)

        # Bail out if the proxy object has no identical named field
        if field is None:
            raise KeyError("Object '{}' with id '{}' has no field named '{}'".format(
                proxy_object.portal_type, proxy_object.getId(), field_name))

        # return the value of the proxy field
        return field.get(proxy_object)
791010
public Object getProxyTarget(){
		try {
			return Proxy.getInvocationHandler(this.connection).invoke(null, this.getClass().getMethod("getProxyTarget"), null);
		} catch (Throwable t) {
			throw new RuntimeException("BoneCP: Internal error - transaction replay log is not turned on?", t);
		}
	}
935905
private final Object extract() {
        Object old = buffer[takeIndex];
        buffer[takeIndex] = null;

        if (++takeIndex >= buffer.length)
            takeIndex = 0;

        return old;
    }
605001
@Override
    public String getValue() {
        switch (getSelectedIndex()) {
        case 0:
            if (internVal == null) return null;
            internVal = getValue1();
            return internVal;
        case 1:
            internVal = getValue2();
            return internVal;
        default:
            return null;
        }
    }
1331218
public function getStartOperation()
    {
        $id = 0;
        if ($this->hasAuthRequest()) {
            // Step through operations, skipping any at the beginning that can be skipped.
            foreach ($this->operations as $id => $operation) {
                if ($id == count($this->operations) - 1) {
                    // This is the last request so it cannot be skipped.
                    break;
                }

                if (!$this->hasAuthRequest($id)) {
                    // This is not an auth request so it should never be skipped.
                    break;
                }

                if ($this->operationUpdatesContact($operation)) {
                    // This operation should never be skipped because it can update the contact.
                    break;
                }

                $this->determineOperationRequirements();
                if (isset($this->requiredPayloadTokens[$id])) {
                    // This step can be skipped if we have these tokens.
                    $this->loadPreviousPayloadAuthTokens();
                    foreach ($this->requiredPayloadTokens[$id] as $token) {
                        if (!isset($this->previousPayloadAuthTokens[$token])) {
                            // We cannot skip this operation because a required token isn't in the database yet.
                            break;
                        }
                    }
                } else {
                    // This step is indicated as auth, but no tokens from it are used in the following payload.
                    // Assume the client hasn't been fully configured and do not skip this operation.
                    break;
                }
            }
        }

        return $id;
    }
860361
function getval()
		{
			// UNSTABLE
			reset($this->me);
			list($a,$b)=each($this->me);
			// contributed by I Sofer, 2001-03-24
			// add support for nested arrays to scalarval
			// i've created a new method here, so as to
			// preserve back compatibility

			if(is_array($b))
			{
				@reset($b);
				while(list($id,$cont) = @each($b))
				{
					$b[$id] = $cont->scalarval();
				}
			}

			// add support for structures directly encoding php objects
			if(is_object($b))
			{
				$t = get_object_vars($b);
				@reset($t);
				while(list($id,$cont) = @each($t))
				{
					$t[$id] = $cont->scalarval();
				}
				@reset($t);
				while(list($id,$cont) = @each($t))
				{
					@$b->$id = $cont;
				}
			}
			// end contrib
			return $b;
		}
367106
protected JsonToken handleRegEx() throws IOException {
		String regex = readCString();
		String pattern = readCString();
		getContext().value = Pattern.compile(regex, regexStrToFlags(pattern));
		return JsonToken.VALUE_EMBEDDED_OBJECT;
	}
984468
public Object getObject()
        throws EFapsException
    {
        Object ret = null;
        if (this.valueSelect == null) {
            // if the fromSelect has data
            if (this.fromSelect.hasResult()) {
                // and there are more than one id the current object must not be null
                if (this.idList.size() > 1 && this.currentObject != null) {
                    ret = this.fromSelect.getMainOneSelect().getObject(this.currentObject);
                // or if there is only one id the first objectvalue must not be null
                } else if (this.idList.size() == 1 && this.objectList.get(0) != null) {
                    ret = this.fromSelect.getMainOneSelect().getObject(this.currentObject);
                }
            }
        } else {
            // if the currentObject is not null it means that the values are
            // retrieved by iteration through the object list
            if (this.currentId != null) {
                ret = this.valueSelect.getValue(this.currentObject);
            } else {
                ret = this.valueSelect.getValue(this.objectList);
            }
        }
        return ret;
    }
724007
function dig(obj) {
  var iterateeFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (val, key, iterableParent) {
    return val;
  };
  // eslint-disable-line no-unused-vars
  // modifierFn = v => v,
  return (0, _each2.default)(obj, function iterator(itValue, key, itObj) {
    var processedItValue = itValue;
    // console.log("processedItValue (before)", processedItValue)
    if ((0, _is.isIterable)(itValue, { objects: true })) {
      // console.log("Is iterable, key:", key)
      processedItValue = (0, _each2.default)(itValue, iterator); // , iterateeFn
    }
    var iterateeReturnedValue = iterateeFn(processedItValue, key, itObj);
    // console.log("iterateeReturnedValue", iterateeReturnedValue)
    if ((0, _is.isObject)(iterateeReturnedValue) && (0, _is.isLength)((0, _toKeys2.default)(iterateeReturnedValue), 1) && (0, _get2.default)(iterateeReturnedValue, "$remove", false) === true) {
      return { $remove: true };
    } else if ((0, _is.isDefined)(iterateeReturnedValue)) {
      return iterateeReturnedValue;
    } else {
      // console.log("processedItValue (after)", processedItValue)
      return processedItValue;
    }
  }
  //,  iterateeFn
  );
}
1104728
function(str) {
      var parameters = str.split('&'),
          obj = {},
          parameter,
          key,
          match,
          lastKey,
          subKey,
          depth;

      // Iterate over key/value pairs
      _.each(parameters, function(parameter) {
        parameter = parameter.split('=');
        key = urlDecode(parameter[0]);
        lastKey = key;
        depth = obj;

        // Reset so we don't have issues when matching the same string
        bracketRegex.lastIndex = 0;

        // Attempt to extract nested values
        while ((match = bracketRegex.exec(key)) !== null) {
          if (!_.isUndefined(match[1])) {

            // If we're at the top nested level, no new object needed
            subKey = match[1];

          } else {

            // If we're at a lower nested level, we need to step down, and make
            // sure that there is an object to place the value into
            subKey = match[2];
            depth[lastKey] = depth[lastKey] || (subKey ? {} : []);
            depth = depth[lastKey];
          }

          // Save the correct key as a hash or an array
          lastKey = subKey || _.size(depth);
        }

        // Assign value to nested object
        depth[lastKey] = urlDecode(parameter[1]);
      });

      return obj;
    }
1185595
protected int extractNumeral() {
		int val = 0;
		final int topLeft = getTotalGridElements() - gridWidth;
		int shift = 0;

		// -2 because the top and bottom rows have 2 unusable bits (the first and last)
		for(int i = 1; i < gridWidth - 1; i++) {
			final int idx = topLeft + i;
			val |= classified[idx] << shift;
			//System.out.println("val |= classified[" + idx + "] << " + shift + ";");
			shift++;
		}

		// Don't do the first or last row, handled above and below - special cases
		for(int ii = 1; ii < gridWidth - 1; ii++) {
			for(int i = 0; i < gridWidth; i++) {
				final int idx = getTotalGridElements() - (gridWidth * (ii + 1)) + i;
				val |= classified[idx] << shift;
				//  System.out.println("val |= classified[" + idx + "] << " + shift + ";");
				shift++;
			}
		}

		// The last row
		for(int i = 1; i < gridWidth - 1; i++) {
			val |= classified[i] << shift;
			//System.out.println("val |= classified[" + i + "] << " + shift + ";");
			shift++;
		}

		return val;
	}
34517
protected function popsCreateInnerIterator()
    {
        if ($this->popsValue() instanceof Iterator) {
            $iterator = $this->popsValue();
        } elseif ($this->popsValue() instanceof IteratorAggregate) {
            $iterator = $this->popsValue()->getIterator();
        } else {
            throw new LogicException(
                'Proxied object is not an instance of Traversable'
            );
        }

        return $iterator;
    }