/*
Can be used to debug the \a $handledObjectList parameter of nodeListForObject()
324885
static function writeDebugBits( $handledObjectList, $highestBit )
    {
        $bitPadLength = (int)( pow( $highestBit, 0.5 ) + 1 );
        //$bitPadLength = strlen( decbin( $highestBit ) );

        $objectIDList = array_keys( $handledObjectList );
        $maxObjectID = max( $objectIDList );
        $padLength = strlen( $maxObjectID ) + 2;

        $msg = '';
        foreach ( $handledObjectList as $objectID => $clearCacheType )
        {
            $bitString = decbin( $clearCacheType );
            $msg .= str_pad( $objectID, $padLength, ' ', STR_PAD_RIGHT ) . str_pad( $bitString, $bitPadLength, '0', STR_PAD_LEFT );
            $msg .= "\r\n";
        }

        eZDebug::writeDebug( $msg, __METHOD__ );
    }
802168
function(object, handler, acceptList) {

            var data = observed.get(object);

            if (data)
                setHandler(object, data, handler, acceptList);
            else {
                data = createObjectData(object);
                setHandler(object, data, handler, acceptList);
                
                if (observed.size === 1)
                    // Let the observation begin!
                    nextFrame(runGlobalLoop);
            }
        }
954102
NamedList<Object> getData(boolean showDebugInfo) throws IOException {
    if (dataCollector.getCollectorType()
        .equals(DataCollector.COLLECTOR_TYPE_DATA)) {
      NamedList<Object> mtasResponse = new SimpleOrderedMap<>();
      // functions
      Map<String, NamedList<Object>> functionList = new HashMap<>();
      if (functionData != null && functionData.containsKey(dataCollector)) {
        HashMap<String, MtasSolrMtasResult> functionDataItem = functionData
            .get(dataCollector);
        for (Entry<String, MtasSolrMtasResult> entry : functionDataItem
            .entrySet()) {
          MtasSolrMtasResult functionResult = entry.getValue();
          if (functionResult.dataCollector.getCollectorType()
              .equals(DataCollector.COLLECTOR_TYPE_DATA)) {
            NamedList<Object> functionData = functionResult
                .getData(showDebugInfo);
            functionList.put(entry.getKey(), functionData);
          } else {
            throw new IOException("unexpected function collectorType "
                + functionResult.dataCollector.getCollectorType());
          }
        }
      }
      // main result
      MtasDataItem<?, ?> dataItem = dataCollector.getResult().getData();
      if (dataItem != null) {
        mtasResponse.addAll(dataItem.rewrite(showDebugInfo));
        if (functionList.size() > 0) {
          mtasResponse.add("functions", functionList);
        }
        if ((subDataType != null) && (dataItem.getSub() != null)) {
          MtasSolrMtasResult css = new MtasSolrMtasResult(dataItem.getSub(),
              subDataType, subStatsType, subStatsItems, subDistances,
              subSortType, subSortDirection, subStart, subNumber, functionData);
          if (dataItem.getSub().getCollectorType()
              .equals(DataCollector.COLLECTOR_TYPE_LIST)) {
            mtasResponse.add(dataItem.getSub().getCollectorType(),
                css.getNamedList(showDebugInfo));
          } else if (dataItem.getSub().getCollectorType()
              .equals(DataCollector.COLLECTOR_TYPE_DATA)) {
            mtasResponse.add(dataItem.getSub().getCollectorType(),
                css.getData(showDebugInfo));
          }
        }
      }
      return mtasResponse;
    } else {
      throw new IOException(
          "only allowed for " + DataCollector.COLLECTOR_TYPE_DATA);
    }
  }
218591
void parkHandleList() // d662032
    {
        if (connectionHandleList != null)
        {
            final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
            if (isTraceOn && tc.isDebugEnabled())
                Tr.debug(tc, "parkHandleList: " + connectionHandleList);

            try
            {
                connectionHandleList.parkHandle();
            } catch (Exception ex)
            {
                if (isTraceOn && tc.isDebugEnabled())
                    Tr.debug(tc, "parkHandleList: exception", ex);
            }
        }
    }
533781
@Override
    void parseTablesAndParams(VoltXMLElement stmtNode) {
        m_tableList.clear();
        // Parse parameters first to satisfy a dependency of expression parsing
        // which happens during table scan parsing.
        parseParameters(stmtNode);

        assert(stmtNode.children.size() > 1);
        AbstractParsedStmt childStmt = null;
        for (VoltXMLElement childSQL : stmtNode.children) {
            if (childSQL.name.equals(SELECT_NODE_NAME)) {
                childStmt = new ParsedSelectStmt(null, m_paramValues, m_db);
                // Assign every child a unique ID
                childStmt.setStmtId(AbstractParsedStmt.NEXT_STMT_ID++);
                childStmt.m_parentStmt = m_parentStmt;
                childStmt.setParentAsUnionClause();

            }
            else if (childSQL.name.equals(UNION_NODE_NAME)) {
                childStmt = new ParsedUnionStmt(null, m_paramValues, m_db);
                // Set the parent before recursing to children.
                childStmt.m_parentStmt = m_parentStmt;
            }
            else {
                // skip Order By, Limit/Offset. They will be processed later
                // by the 'parse' method
                continue;
            }
            childStmt.m_paramsById.putAll(m_paramsById);
            childStmt.parseTablesAndParams(childSQL);
            promoteUnionParametersFromChild(childStmt);
            m_children.add(childStmt);
            // Add statement's tables to the consolidated list
            m_tableList.addAll(childStmt.m_tableList);

            // m_tableAliasListAsJoinOrder is not interesting for UNION
            // m_tableAliasMap may have same alias table from different children
            addStmtTablesFromChildren(childStmt.getScanEntrySet());
        }
    }
1171113
function OpenBlock_Handle_Debug(&$res)
    {
        if ($res['ArgumentCount'] == 0) {
            return '$scope->debug();';
        } elseif ($res['ArgumentCount'] == 1) {
            $arg = $res['Arguments'][0];

            if ($arg['ArgumentMode'] == 'string') {
                return 'Debug::show('.$arg['php'].');';
            }

            $php = ($arg['ArgumentMode'] == 'default') ? $arg['lookup_php'] : $arg['php'];
            return '$val .= Debug::show('.str_replace('FINALGET!', 'cachedCall', $php).');';
        } else {
            throw new SSTemplateParseException('Debug takes 0 or 1 argument only.', $this);
        }
    }
319848
def _handle_param_list(self, node, scope, ctxt, stream):
        
        self._dlog("handling param list")
        # params should be a list of tuples:
        # [(<name>, <field_class>), ...]
        params = []
        for param in node.params:
            self._mark_id_as_lazy(param)
            param_info = self._handle_node(param, scope, ctxt, stream)
            params.append(param_info)

        param_list = functions.ParamListDef(params, node.coord)
        return param_list
339172
function processValuesFromContext(node, params, msg, varList) {
                let pMsg = {};
                Object.assign(pMsg, params);
                varList.forEach((varItem) => {
                    if (varItem.type === undefined || params[varItem.type] === undefined) {
                        pMsg[varItem.name] = params[varItem.name];
                    } else if (params[varItem.type] === 'flow' || params[varItem.type] === 'global') {
                        pMsg[varItem.name] = RED.util.evaluateNodeProperty(params[varItem.name], params[varItem.type], node, msg);
                        pMsg[varItem.type] = params[varItem.type];
                        console.log('Inside flow or global');
                        console.log(varItem.name + ' - - ' + pMsg[varItem.name]);
                    } else {
                        pMsg[varItem.name] = params[varItem.name];
                        pMsg[varItem.type] = params[varItem.type];
                    }
                });
                return pMsg;
            }
1259834
public function ___debugInfo()
    {
        $nodeName = 'unknown';

        if ($this->functionLikeNode instanceof Function_) {
            $nodeName = $this->functionLikeNode->name->toString();
        }

        return ['name' => $nodeName];
    }
1101711
function checkForSemicolonForVariableDeclaration(node) {
            const parent = node.parent;

            if ((parent.type !== "ForStatement" || parent.init !== node) &&
                (!/^For(?:In|Of)Statement/u.test(parent.type) || parent.left !== node)
            ) {
                checkForSemicolon(node);
            }
        }
965657
private void visitVar(NodeTraversal t, Node n) {
    // Handle var declarations in for-of loops separately from regular var declarations.
    if (n.getParent().isForOf() || n.getParent().isForIn()) {
      return;
    }

    // TODO(nicksantos): Fix this so that the doc info always shows up
    // on the NAME node. We probably want to wait for the parser
    // merge to fix this.
    JSDocInfo varInfo = n.hasOneChild() ? n.getJSDocInfo() : null;
    for (Node child : n.children()) {
      if (child.isName()) {
        Node value = child.getFirstChild();

        if (value != null) {
          JSType valueType = getJSType(value);
          JSDocInfo info = child.getJSDocInfo();
          if (info == null) {
            info = varInfo;
          }

          checkEnumAlias(t, info, valueType, value);
          checkCanAssignToWithScope(t, value, child, valueType, info, "initializing variable");
        }
      } else {
        checkState(child.isDestructuringLhs(), child);
        Node name = child.getFirstChild();
        Node value = child.getSecondChild();
        JSType valueType = getJSType(value);
        checkCanAssignToWithScope(
            t, child, name, valueType, /* info= */ null, "initializing variable");
      }
    }
  }
401463
@Override
    public void debug(Object object) {
        if (isDebugEnabled()) {
            if (object instanceof Throwable) {
                debugThrowable((Throwable) object);
            } else {
                debugString("" + object);
            }
        }
    }
1340010
void handleGet(Object value, 
                   MatchSpaceKey msg, 
                   EvalCache cache,
                   Object contextValue,
                   SearchResults result) 
      throws MatchingException, BadMessageFormatMatchingException 
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.entry(this,
               cclass, 
               "handleGet", 
               new Object[] {value,msg,cache,contextValue,result});
    // Call the handleGet() method in the parent class but 
    // provide a context and we may need to call it multiple times
    if (value != null && value instanceof SetValEvaluationContext)
    {
      // The "value" we get back is a list of wrapped string values and
      // DOM nodes that we need to process individually
      
      SetValEvaluationContext xpContext = (SetValEvaluationContext)value;
      ArrayList nodeList = xpContext.getWrappedNodeList();
      
      // Iterate over the nodes that were passed into us
      Iterator iter = nodeList.iterator();

      while(iter.hasNext())
      {
        WrappedNodeResults wrappedNode = (WrappedNodeResults)iter.next();
        
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
          tc.debug(this,cclass, "handleGet", "Processing node: " + wrappedNode); 
        
        // Need to be careful here, we propagate the string value of
        // the attribute or element that we have retrieved, but the
        // context for subsequent operations is the parent node.
        ArrayList stringList = wrappedNode.getStringList(id.getName());
        if(stringList != null)
        {
          Iterator iterString = stringList.iterator();
          
          while(iterString.hasNext())
          {
            String strValue = (String)iterString.next();

            // Need to pass in an XPathEvaluationContext
            SetValEvaluationContext xpEval = new SetValEvaluationContext(wrappedNode);
      
            super.handleGet(strValue, msg, cache, xpEval, result);
          } // eof while             
        } // eof if integerList not null               
      } // eof iterating over the nodes
    } // eof value not null 
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.exit(this,cclass, "handleGet");        
  }
1157105
function isNodeList(nodes) {
  var stringRepr = Object.prototype.toString.call(nodes)

  return typeof nodes === 'object' &&
    /^\[object (HTMLCollection|NodeList|Object)\]$/.test(stringRepr) &&
    (typeof nodes.length === 'number') &&
    (nodes.length === 0 || (typeof nodes[0] === "object" && nodes[0].nodeType > 0))
}
589590
private void visitList(final ObjectGraphNode node) {
		int index = 0;

		for (Iterator i = ((List) node.getValue()).iterator(); i.hasNext();) {
			Object entry = i.next();
			String entryType = entry == null ? Object.class.getName() : entry.getClass().getName();

			ObjectGraphNode childNode = new ObjectGraphNode(++nodeCount, "[" + index++ + "]",
					entryType, entry);
			node.add(childNode);
			visit(childNode);
		}

		adjustOverhead(node);
	}
226326
function isNodelist(O) {
            return !!(_toString.call(O) == "[object NodeList]" || typeof O !== "undefined" && O && O[0] && O[0].nodeType == 1);
        }
771857
static function fetchNodeList( $rssSources, $objectListFilter )
    {
        // compose parameters for several subtrees
        if( is_array( $rssSources ) && count( $rssSources ) )
        {
            foreach( $rssSources as $rssSource )
            {
                // Do not include subnodes
                if ( !intval( $rssSource->Subnodes ) )
                {
                    $depth = 1;
                }
                else // Fetch objects even from subnodes
                {
                    $depth = 0;
                }

                $nodesParams[] = array( 'ParentNodeID' => $rssSource->SourceNodeID,
                                        'ResultID' => $rssSource->ID,
                                        'Depth' => $depth,
                                        'DepthOperator' => 'eq',
                                        'MainNodeOnly' => $objectListFilter['main_node_only'],
                                        'ClassFilterType' => 'include',
                                        'ClassFilterArray' => array( intval( $rssSource->ClassID ) )
                                       );
            }

            $listParams = array( 'Limit' => $objectListFilter['number_of_objects'],
                                 'SortBy' => array( 'published', false )
                                );

            $nodeList = eZContentObjectTreeNode::subTreeMultiPaths( $nodesParams, $listParams );
        }
        else
            $nodeList = null;
        return $nodeList;
    }