Process a single criteria block.

@param list parent criteria list
@param block current block
779257
private void processBlock(List<GenericCriteria> list, byte[] block)
   {
      if (block != null)
      {
         if (MPPUtility.getShort(block, 0) > 0x3E6)
         {
            addCriteria(list, block);
         }
         else
         {
            switch (block[0])
            {
               case (byte) 0x0B:
               {
                  processBlock(list, getChildBlock(block));
                  break;
               }

               case (byte) 0x06:
               {
                  processBlock(list, getListNextBlock(block));
                  break;
               }

               case (byte) 0xED: // EQUALS
               {
                  addCriteria(list, block);
                  break;
               }

               case (byte) 0x19: // AND
               case (byte) 0x1B:
               {
                  addBlock(list, block, TestOperator.AND);
                  break;
               }

               case (byte) 0x1A: // OR
               case (byte) 0x1C:
               {
                  addBlock(list, block, TestOperator.OR);
                  break;
               }
            }
         }
      }
   }
1134390
public void checkPointListChild(ValidationData param, ValidationRule rule, Object bodyObj, Object standardValue) {
        ValidationData listParent = param.findListParent();
        List list = (List) listParent.getValue(bodyObj);
        if (list == null || list.isEmpty()) {
            return;
        }

        list.stream().forEach(item -> {
            this.checkPoint(param, rule, item, standardValue);
        });

    }
984311
private void processFailedBlocks(Block []failed, 
      int failedPendingRequests) {
    synchronized (receivedAndDeletedBlockList) {
      // We are adding to the front of a linked list and hence to preserve
      // order we should add the blocks in the reverse order.
      for (int i = failed.length - 1; i >= 0; i--) {
        receivedAndDeletedBlockList.add(0, failed[i]);
      }
      pendingReceivedRequests += failedPendingRequests;
    }
  }
708952
function createListBlock(block, listItems) {
  var listItemContent = listItems.map(function(listItemNode) {
    var content = listItemNode.innerHTML.substr(2);
    return {content: content};
  });
  var listData = {
    format: 'html',
    listItems: listItemContent.reverse()
  };
  block.mediator.trigger("block:create", 'List', listData, block.el, { autoFocus: true });
}
468569
@ConditionBlock
  public void evaluate(Runnable block) {
    try {
      block.run();
    } catch (Throwable t) {
      exceptions.add(t);
      wakeUp();
    }
    latch.countDown();
  }
864121
synchronized boolean contains(BlockInfo block) {
    for(LightWeightLinkedSet<BlockInfo> set:priorityQueues) {
      if(set.contains(block)) { return true; }
    }
    return false;
  }
847541
protected function processBlock($block) {
        foreach ($block->getContents() as $node) {
            if ($node instanceof AtRule) {

                $name = $node->atRuleName();
                if (isset(self::$atrules[$name])) {
                    foreach (self::$atrules[$name] as $prefix) {
                        $newname = $prefix . $name;
                        $newnode = clone $node;

                        if ($node instanceof KeyFrame) {
                            $newnode->setVendorKeyFrame($newname);
                            $block->insert($newnode, $node);

                        } else {
                            debugging('Unhandled atRule prefixing.', DEBUG_DEVELOPER);
                        }
                    }
                }
            }

            if ($node instanceof CSSList) {
                $this->processBlock($node);

            } else if ($node instanceof RuleSet) {
                $this->processDeclaration($node, $block);
            }
        }
    }
808773
public void blocksBeingWrittenReport(DatanodeRegistration nodeReg,
      BlockReport blocks) throws IOException {
    verifyRequest(nodeReg);
    long[] blocksAsLong = blocks.getBlockReportInLongs();
    BlockListAsLongs blist = new BlockListAsLongs(blocksAsLong);
    boolean processed = namesystem.processBlocksBeingWrittenReport(nodeReg, blist);

    String message = "*BLOCK* NameNode.blocksBeingWrittenReport: "
        +"from "+nodeReg.getName()+" "+blist.getNumberOfBlocks() +" blocks";
    if (!processed) {
      message += " was discarded.";
    }
    stateChangeLog.info(message);
  }
1214378
private void processNode(final Node node) {
        processNode(node.getPath(), node);

        Set<Node> children = node.getChildren();
        for (Node child : children) {
            processNode(child);
        }
    }
131980
private void addBlock(List<GenericCriteria> list, byte[] block, TestOperator operator)
   {
      GenericCriteria result = new GenericCriteria(m_properties);
      result.setOperator(operator);
      list.add(result);
      processBlock(result.getCriteriaList(), getChildBlock(block));
      processBlock(list, getListNextBlock(block));
   }
568369
public static void add(Element parent, NodeList list) {
        int size;
        int i;

        size = list.getLength();
        for (i = 0; i < size; i++) {
            addNode(parent, list.item(i));
        }
        
    }
1363551
def processChildElements( element, leafElementsOnly, block )
      if element
         if element.is_a?( Array )
            element.each{ |e| processChildElements( e, leafElementsOnly, block ) }
         elsif element.is_a?( REXML::Element ) and element.has_elements?
            block.call( element ) if not leafElementsOnly
            element.each{ |e|
               if e.is_a?( REXML::Element ) and e.has_elements?
                 processChildElements( e, leafElementsOnly, block )
               else
                 block.call( e )
               end
            }
         end
      end
    end
619101
protected Block visitBlock(Block block) {
        if (block == null) {
            return null;
        }

        Statement stmt = (Statement)block.accept(this);

        if (stmt instanceof Block) {
            return (Block)stmt;
        }
        else if (stmt != null) {
            return new Block(stmt);
        }
        else {
            return new Block(block.getSourceInfo());
        }
    }
1330427
private void init( List<T> list ) {
		this.list = list;
		indexes = new int[ list.size() ];
		counters = new int[ list.size() ];

		for( int i = 0; i < indexes.length ; i++ ) {
			counters[i] = indexes[i] = i;
		}

		total = 1;
		for( int i = 2; i <= indexes.length ; i++ ) {
			total *= i;
		}

		permutation = 0;
	}
1070537
protected BlockInfo listMoveToHead(BlockInfo block, BlockInfo head,
      DatanodeIndex indexes) {
    assert head != null : "Head can not be null";
    if (head == block) {
      return head;
    }
    BlockInfo next = block.getSetNext(indexes.currentIndex, head);
    BlockInfo prev = block.getSetPrevious(indexes.currentIndex, null);

    head.setPrevious(indexes.headIndex, block);
    indexes.headIndex = indexes.currentIndex;
    prev.setNext(prev.findDatanode(this), next);
    if (next != null)
      next.setPrevious(next.findDatanode(this), prev);
    return block;
  }
1178956
static public void filterBlockedElements(List<Context> executionContexts) {
    for (Context context : executionContexts) {
      Model model = new Model(context.getModel());
      List<Edge> edges = model.getEdges();
      List<Vertex> vertices = model.getVertices();

      ListIterator<Edge> e_it = edges.listIterator();
      while (e_it.hasNext()) {
        Edge edge = e_it.next();
        if (edge.hasProperty("blocked") &&
            (boolean) edge.getProperty("blocked")) {
          e_it.remove();
        }
      }
      ListIterator<Vertex> v_it = vertices.listIterator();
      while (v_it.hasNext()) {
        Vertex vertex = v_it.next();
        if (vertex.hasProperty("blocked") &&
            (boolean) vertex.getProperty("blocked")) {
          e_it = edges.listIterator();
          while (e_it.hasNext()) {
            Edge e = e_it.next();
            if (e.getSourceVertex() == vertex) {
              e_it.remove();
            } else if (e.getTargetVertex() == vertex) {
              e_it.remove();
            }
          }
          v_it.remove();
        }
      }
      context.setModel(model.build());
    }
  }
150839
private void _initListBlock (@Nonnull final Block aRoot)
  {
    Line aLine = aRoot.m_aLines;
    aLine = aLine.m_aNext;
    while (aLine != null)
    {
      final ELineType eType = aLine.getLineType (m_bUseExtensions);
      if (eType == ELineType.OLIST ||
          eType == ELineType.ULIST ||
          (!aLine.m_bIsEmpty &&
           aLine.m_bPrevEmpty &&
           aLine.m_nLeading == 0 &&
           !(eType == ELineType.OLIST || eType == ELineType.ULIST)))
      {
        aRoot.split (aLine.m_aPrevious).m_eType = EBlockType.LIST_ITEM;
      }
      aLine = aLine.m_aNext;
    }
    aRoot.split (aRoot.m_aLineTail).m_eType = EBlockType.LIST_ITEM;
  }