returns true even if the Parent is (being) Closed
553461
boolean getIsClosingOrClosed() {
        final boolean isParentClosingOrClosed = this.parent != null && this.parent.getIsClosingOrClosed();
        synchronized (this.syncClose) {
            return isParentClosingOrClosed || this.isClosing || this.isClosed;
        }
    }
889119
def is_closed(self):
        
        return (self.state == SESSION_STATE.CLOSED 
                or self.state == SESSION_STATE.CLOSING)
1345752
@Override
  public boolean isClosed() throws CpoException {
    JdbcCpoAdapter currentResource = getCurrentResource();
    if (currentResource != getLocalResource())
      return ((JdbcCpoTrxAdapter)currentResource).isClosed();
    else
      return true;
  }
1241114
boolean _close()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "_close");

    boolean closedNow = false;

    synchronized (this)
    {
      if (!_closed)
      {
        _closed = true;
        closedNow = true;
      }
    }

    if (closedNow)
    {
      /*
       * This must be done outside the synchronization as it will synchronize on
       * the set of producer sessions whilst detaching this producer and if not
       * done outside, this could cause a deadlock with methods that synchronize
       * on the set and then each producersession in the set in turn.
       */
      _inputHandler.detachProducer(this);
      _inputHandler = null;
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "_close", new Boolean(closedNow));

    return closedNow;
  }
1044344
static boolean isTryFinallyNode(Node parent, Node child) {
    return parent.isTry() && parent.hasXChildren(3)
        && child == parent.getLastChild();
  }
413220
public boolean isClosed() {
		if (isEmpty()) {
			return false;
		}
		if (getNumPoints() == 1) {
			return false;
		}
		Coordinate[] coordinates = getCoordinates();
		return coordinates[0].equals(coordinates[coordinates.length - 1]);
	}
789005
def ensureVisible(self):
        
        parent = self.parent()
        while parent:
            parent.setExpanded(True)
            parent = parent.parent()
390924
function(node) {
            var parent = node.getParent();
            while(parent) {
                if(parent._id === this._id) {
                    return true;
                }
                parent = parent.getParent();
            }

            return false;
        }
1325944
def check_node_parent(
        self, resource_id, new_parent_id, db_session=None, *args, **kwargs
    ):
        
        return self.service.check_node_parent(
            resource_id=resource_id,
            new_parent_id=new_parent_id,
            db_session=db_session,
            *args,
            **kwargs
        )
592425
def canClose(self):
        
        for view in self.findChildren(XView):
            if not view.canClose():
                return False
        return True
967343
public boolean checkLocks( boolean exclusive,
                               int depth ) {
        if (checkParents(exclusive) && checkChildren(exclusive, depth)) {
            return true;
        }
        return false;
    }
265645
protected boolean tryToClose() {
		ByteBuffer blocker = blockerBuffer.get();
		if (blocker == BUFFER_IS_CLOSED) {
			return true;
		}
		if (blocker != null) {
			return false;
		}
		boolean closed = blockerBuffer.compareAndSet(null, BUFFER_IS_CLOSED);
		if (closed) {
			closeResources();
			return true;
		}
		return false;
	}
541699
def _isclose(a: Any, b: Any, *, atol: Union[int, float]) -> bool:
    """"""
    return True if np.isclose([a], [b], atol=atol, rtol=0.0)[0] else False
473053
def is_closed(self):
        
        closed = all(i == 2 for i in
                     dict(self.vertex_graph.degree()).values())

        return closed
466282
function close()
    {
        /* If we haven't been opened, there's nothing more to do. */
        if (!$this->_opened) {
            return true;
        }

        /* Attempt to close each of our children. */
        $closed = true;
        foreach ($this->_children as $child) {
            if ($child->_opened) {
                $closed &= $child->close();
            }
        }

        /* Clear the opened state for consistency. */
        $this->_opened = false;

        /* If all children were closed, return success. */
        return $closed;
    }
474686
function isParent(possibleParent, elem) {
    if(!elem || elem.nodeName === 'HTML') {
      return false;
    }

    if(elem.parentNode === possibleParent) {
      return true;
    }

    return isParent(possibleParent, elem.parentNode);
  }
92206
def _isclose(obja, objb, rtol=1e-05, atol=1e-08):
    """"""
    return abs(obja - objb) <= (atol + rtol * abs(objb))