get the chains for the current object. If the current object has chains inherited from the proto they will be cloned and reconfigured for the current object.
545465
function chainsFor(obj) {
  var m = metaFor(obj), ret = m.chains;
  if (!ret) {
    ret = m.chains = new ChainNode(null, null, obj);
  } else if (ret.value() !== obj) {
    ret = m.chains = ret.copy(obj);
  }
  return ret;
}
31182
def chain(self, **kwargs):
        
        chain = self.build_chain(**kwargs)
        self._patterns.append(chain)
        return chain
99334
private void getHeadersFromFrame() {
        byte[] hbf = null;
        if (currentFrame.getFrameType() == FrameTypes.HEADERS || currentFrame.getFrameType() == FrameTypes.PUSHPROMISEHEADERS) {
            hbf = ((FrameHeaders) currentFrame).getHeaderBlockFragment();
        } else if (currentFrame.getFrameType() == FrameTypes.CONTINUATION) {
            hbf = ((FrameContinuation) currentFrame).getHeaderBlockFragment();
        }

        if (hbf != null) {
            if (headerBlock == null) {
                headerBlock = new ArrayList<byte[]>();
            }
            headerBlock.add(hbf);
        }
    }
421655
def _get_chain_by_sid(sid):
    """"""
    try:
        return d1_gmn.app.models.Chain.objects.get(sid__did=sid)
    except d1_gmn.app.models.Chain.DoesNotExist:
        pass
1011112
def get_objects(self):
        
        bucket = self._get_bucket()
        objs = []
        for key in bucket:
            objs.append(key)
        return objs
1101985
function( fn ){

          // Get the object's base
          var objectBase = getObjectBase( this, fn );

          // If the function is not found anywhere in the prototype chain
          // there is a pretty big problem
          if( ! objectBase.base ) throw new Error( "inherited coun't find method in chain (getInherited)" );

          // At this point, I know the key. To look for the super method, I
          // only have to check if one of the parent __proto__ has a matching key `k`
          var p = Object.getPrototypeOf( objectBase.base );
          return p[ objectBase.key ];
        }
1268353
def get_ancestors(self):
        
        if self.is_root():
            return get_result_class(self.__class__).objects.none()

        paths = [
            self.path[0:pos]
            for pos in range(0, len(self.path), self.steplen)[1:]
        ]
        return get_result_class(self.__class__).objects.filter(
            path__in=paths).order_by('depth')
1054460
def getNodeByNameChain(node, chain_list):
    

    working_list = chain_list[:]
    working_list.reverse()
    current_node = node
    while len(working_list):
        current_name = working_list.pop()
        child_node = getNodeByName(current_node, current_name)
        if child_node is None:
            raise Exception("Unable to find child node %s" % current_name)
        current_node = child_node
    return current_node
75922
@Override
    public synchronized ChainData[] getAllChains(Class<?> factoryClass) throws InvalidChannelFactoryException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "getAllChains(factory)");
        }
        if (null == factoryClass) {
            throw new InvalidChannelFactoryException("Null factory class found");
        }

        String inputFactoryClassName = factoryClass.getName();
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "factory=" + inputFactoryClassName);
        }

        // Collect all chains referring to the channel
        List<ChainData> chainDataList = new ArrayList<ChainData>();
        ChannelData[] channels = null;
        for (ChainData chainData : this.chainDataMap.values()) {
            // Look at each channel associated with this chain.
            channels = chainData.getChannelList();
            for (int i = 0; i < channels.length; i++) {
                if (channels[i].getFactoryType().getName().equals(inputFactoryClassName)) {
                    chainDataList.add(chainData);
                }
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "getAllChains");
        }
        return chainDataList.toArray(new ChainData[chainDataList.size()]);
    }
1268540
private List<String> getChainIds(Structure asymUnit) {
		List<String> chainIds = new ArrayList<String>();
		for ( Chain c : asymUnit.getChains()){
			String intChainID = c.getId();
			chainIds.add(intChainID);
		}
		return chainIds;
	}
302784
public List<Invocation> toChain() {
		List<Invocation> chain = parent == null ? new ArrayList<Invocation>() : parent.toChain();
		chain.add(this);
		return chain;
	}
919697
function(obj) {
  var cloned = {};
  for(var key in obj) {
    if(obj.hasOwnProperty(key)) {
      cloned[key] = obj[key];
    }
  }
  return cloned;
}
520638
def get_previous_and_current_values(self, instance):
        
        translated_field_names = self._get_translated_field_names(instance.master)
        if instance.pk:
            try:
                previous_obj = instance._meta.model.objects.get(pk=instance.pk)
                previous_values = self.get_obj_values(previous_obj, translated_field_names)
            except ObjectDoesNotExist:
                previous_values = {}
        else:
            previous_values = {}
        current_values = self.get_obj_values(instance, translated_field_names)
        return previous_values, current_values
474506
public Object next() {

        // for chained iterators
        if (chained) {
            if (it1 == null) {
                if (it2 == null) {
                    throw new NoSuchElementException();
                }

                if (it2.hasNext()) {
                    return it2.next();
                }

                it2 = null;

                next();
            } else {
                if (it1.hasNext()) {
                    return it1.next();
                }

                it1 = null;

                next();
            }
        }

        // for other itertors
        if (hasNext()) {
            return elements[i++];
        }

        throw new NoSuchElementException();
    }
32438
function(chains) {
    var vertArrays = this.vertArrays();
    var selectedArrays = [];
    var set = {};
    for (var ci = 0; ci < chains.length; ++ci) {
      set[chains[ci]] = true;
    }
    for (var i = 0; i < vertArrays.length; ++i) {
      if (set[vertArrays[i].chain()] === true) {
        selectedArrays.push(vertArrays[i]);
      }
    }
    return selectedArrays;
  }
761138
public function getChainExtendedClasses()
    {
        $chainExtendMap = [];
        $paths = $this->scanner->getFilePaths();

        foreach ($paths as $path) {
            $aModule = [];
            include($path);
            if (isset($aModule['extend'])) {
                $chainExtendMap = array_merge($chainExtendMap, array_flip($aModule['extend']));
            }
        }
        return $chainExtendMap;
    }
530863
protected function getMiddlewareChain()
    {
        $middlewares = array_reverse(iterator_to_array(clone $this->middlewares));

        $chain = new ChainBuilder();

        foreach ($middlewares as $middleware) {
            // If is class name, just create it.
            if (is_string($middleware) && is_subclass_of($middleware, AbstractControllerMiddleware::class)) {
                $middleware = $this->container->newInstance($middleware, ['controller' => $this]);
            } elseif ($middleware instanceof \Closure) {
                // If is closure, we bind $this to current object
                $middleware->bindTo($this);
            }

            $chain->add($middleware);
        }

        return $chain;
    }