Determine if there are potential solution remaining.
@param       potentialNode  set of remaining potential nodes
@return      true if it is worse to continue the search
518570
private boolean mustContinue(BitSet potentialNode) {
        boolean result = true;
        boolean cancel = false;
        BitSet projG1 = projectG1(potentialNode);
        BitSet projG2 = projectG2(potentialNode);

        // if we reached the maximum number of
        // search iterations than do not continue
        if (maxIteration != -1 && nbIteration >= maxIteration) {
            return false;
        }

        // if constrains may no more be fulfilled then stop.
        if (!isContainedIn(c1, projG1) || !isContainedIn(c2, projG2)) {
            return false;
        }

        // check if the solution potential is not included in an already
        // existing solution
        for (Iterator<BitSet> i = solutionList.iterator(); i.hasNext() && !cancel;) {
            BitSet sol = i.next();

            // if we want every 'mappings' do not stop
            if (findAllMap && (projG1.equals(projectG1(sol)) || projG2.equals(projectG2(sol)))) {
                // do nothing
            }
            // if it is not possible to do better than an already existing solution than stop.
            else if (isContainedIn(projG1, projectG1(sol)) || isContainedIn(projG2, projectG2(sol))) {
                result = false;
                cancel = true;
            }
        }

        return result;
    }
1070256
@Override
	public boolean hasMoreElements()
	{
		if (endOfQueueReached)
			return false;
		try
		{
			checkNotClosed();
			Message msg = fetchNext();
			return msg != null;
		}
		catch (JMSException e)
		{
			throw new IllegalStateException(e.toString());
		}
	}
20601
private void checkPossibleIslandsForRightOverlap(List<Island> possibleIslands) {
        Iterator<Island> candidates = possibleIslands.iterator();
        while (candidates.hasNext()) {
            Island island = candidates.next();
            // check whether there is complete overlap
            // if left end coordinate is not available there is no use in checking this island any longer
            if (doesCoordinateOverlapWithCommittedCoordinate(island.getLeftEnd())) {
                candidates.remove();
                continue;
            }
            // if right end coordinate is also available it means the whole island is available
            if (!doesCoordinateOverlapWithCommittedCoordinate(island.getRightEnd())) {
                // no further check necessary
                continue;
            }
            // remove this candidate from the possible islands
            candidates.remove();
            // partial overlap; find the starting point of the conflict
            Island smaller = findConflictingCoordinateAndCreateSmallerIslandSplitAtConflictingCoordinate(island);
            // add the smaller island to the priority queue
            // LOG.fine("Conflict detected! We add a smaller island! "+smaller);
            islandPriorityQueue.add(smaller);
        }
    }
1017447
def has_pending(self):
        
        if self.pending:
            return True
        for pending in self.node2pending.values():
            if pending:
                return True
        return False
56667
@Override
  protected boolean hasOverflow(FlatRStarTreeNode node) {
    if(node.isLeaf()) {
      return node.getNumEntries() == leafCapacity;
    }
    else if(node.getNumEntries() == node.getCapacity()) {
      node.increaseEntries();
    }
    return false;
  }
566181
public boolean remove(Node<E> e) {

        mPutLock.lock();
        mPollLock.lock();
        try {
            if (e == null)
                return false;
    
            if (e.mRemoved)
                return false;
    
            if (mSize.get() == 0)
                return false;

            if (e == mTail) {
                removeTail();
                return true;
            }
            if (e == mHead.mNext) {
                removeHead();
                return true;
            }
            if (mSize.get() < 3)
                return false;

            if (e.mPrev == null || e.mNext == null)
                return false;

            e.mPrev.mNext = e.mNext;
            e.mNext.mPrev = e.mPrev;
            e.mRemoved = true;
            mSize.decrementAndGet();
            mNodePool.returnNode(e);
            return true;
        }
        finally {
            mPollLock.unlock();
            mPutLock.unlock();
        }
    }
1362483
private boolean shouldRemoveNode(HistoryNode node) {
    if (node == null) {
      return true;
    }
    
    int sizeOfChildren = 0;
    if (node.children != null) {
      sizeOfChildren = node.children.size();
    }
    
    if (sizeOfChildren > 0) {
      return false;
    }
    
    int sizeOfNotifications = 0;
    if (node.notifications != null) {
      for (List<HistoryTreeEntry> notiList : node.notifications.values()) {
        if (notiList != null) {
          sizeOfNotifications += notiList.size();
          if (sizeOfNotifications > 0) {
            return false;
          }
        }
      }
    }
    
    return true;
  }
1187196
public boolean has(String key){
		LazyNode child=root.child;
		while(child!=null){
			if(keyMatch(key,child)){
				return true;
			}
			child=child.next;
		}
		return false;
	}
843576
public boolean contains(long key) {
		if (size == 0) {
			return false;
		} 
		if (size == 1) {
			int posDiff = compare(key, rootKey);
			if (posDiff == -1) {
				return true;
			}
			return false;
		}
		Node<V> n = root;
		while (true) {
			if (!doesInfixMatch(n, key)) {
				return false;
			}			
			
			//infix matches, so now we check sub-nodes and postfixes
			if (getBit(key, n.posDiff)) {
				if (n.hi != null) {
					n = n.hi;
					continue;
				} 
				return compare(key,  n.hiPost) == -1;
			} else {
				if (n.lo != null) {
					n = n.lo;
					continue;
				}
				return compare(key,  n.loPost) == -1;
			}
			
		}
	}
185156
protected boolean checkPreconditions(List<SquareNode> cluster) {
		for( int i = 0; i < cluster.size(); i++ ) {
			SquareNode n = cluster.get(i);
			for (int j = 0; j < n.square.size(); j++) {
				SquareEdge e0 = n.edges[j];
				if( e0 == null)
					continue;
				for (int k = j+1; k < n.square.size(); k++) {
					SquareEdge e1 = n.edges[k];
					if( e1 == null)
						continue;
					if( e0.destination(n) == e1.destination(n) ) {
						return false;
					}
				}
			}
		}
		return true;
	}
1019240
public static boolean isJSInlineNode (@Nullable final IHCNode aNode)
  {
    final IHCNode aUnwrappedNode = HCHelper.getUnwrappedNode (aNode);
    return isDirectJSInlineNode (aUnwrappedNode);
  }
1044856
@Override
  protected boolean hasUnderflow(N node) {
    if(node.isLeaf()) {
      return node.getNumEntries() < leafMinimum;
    }
    else {
      return node.getNumEntries() < dirMinimum;
    }
  }
794020
private static void checkPreconditions(final Set<Object> possibleValues) {
		if( possibleValues == null ) {
			throw new NullPointerException("possibleValues Set should not be null");
		} else if( possibleValues.isEmpty() ) {
			throw new IllegalArgumentException("possibleValues Set should not be empty");
		}
	}
74751
public boolean isLockLive(String nodeId) throws LockException
   {
      try
      {
         return isLockLive.run(nodeId);
      }
      catch (LockException e)
      {
         if (LOG.isTraceEnabled())
         {
            LOG.trace("An exception occurred: " + e.getMessage());
         }
      }
      return false;
   }
658333
boolean contains(DatanodeDescriptor node) {
    if (node==null) {
      return false;
    }
      
    String host = node.getHost();
    hostmapLock.readLock().lock();
    try {
      DatanodeDescriptor[] nodes = map.get(host);
      if (nodes != null) {
        for(DatanodeDescriptor containedNode:nodes) {
          if (node==containedNode) {
            return true;
          }
        }
      }
    } finally {
      hostmapLock.readLock().unlock();
    }
    return false;
  }
210182
public boolean deleteDataNode(DataNode node) {
    try {
      rwLock.writeLock().lock();
      if (!dataNodeMap.containsKey(node.getId())) {
        return false;
      }
      //Delete node from dataNodeMap
      dataNodeMap.remove(node.getId());

      //Delete all the edges adjacent to the node. First, delete edges from flowEdgeMap and next, remove the edges
      // from nodesToEdges
      for (FlowEdge edge : nodesToEdges.get(node)) {
        flowEdgeMap.remove(edge.getId());
      }
      nodesToEdges.remove(node);
      return true;

    } finally {
      rwLock.writeLock().unlock();
    }
  }
473860
public synchronized boolean tryDelegateSlop(Node node) {
        if(asyncCallbackShouldSendhint) {
            return false;
        } else {
            slopDestinations.put(node, true);
            return true;
        }
    }