Returns true if this block was copied, otherwise returns false.
506731
boolean detachBlock(int namespaceId, Block block, int numLinks) throws IOException {
    if (isDetached()) {
      return false;
    }
    if (blockDataFile.getFile() == null || blockDataFile.volume == null) {
      throw new IOException("detachBlock:Block not found. " + block);
    }

    File meta = null;
    if (!inlineChecksum) {
      meta = BlockWithChecksumFileWriter.getMetaFile(blockDataFile.getFile(), block);
      if (meta == null) {
        throw new IOException("Meta file not found for block " + block);
      }
    }

    if (HardLink.getLinkCount(blockDataFile.getFile()) > numLinks) {
      DataNode.LOG.info("CopyOnWrite for block " + block);
      detachFile(namespaceId, blockDataFile.getFile(), block);
    }
    if (!inlineChecksum) {
      if (HardLink.getLinkCount(meta) > numLinks) {
        detachFile(namespaceId, meta, block);
      }
    }
    setDetached();
    return true;
  }
841822
protected final boolean readBlock(final long block, final byte[] buffer) throws IOException {
        final int bytesRead = readData(block * this.blockSize, buffer, 0, this.blockSize);

        if (bytesRead <= 0) {
            return false;
        }

        if (this.blockSize != bytesRead) {
            throw new IOException("Could not deserialize a complete block");
        }

        return true;
    }
544232
public boolean isBlockMarked(long blockId) {
    for (StorageTierView tierView : mTierViews) {
      for (StorageDirView dirView : tierView.getDirViews()) {
        if (dirView.isMarkedToMoveOut(blockId)) {
          return true;
        }
      }
    }
    return false;
  }
236612
boolean inSameSubroutine(final Label block) {
        for (int i = 0; i < srcAndRefPositions.length; ++i) {
            if ((srcAndRefPositions[i] & block.srcAndRefPositions[i]) != 0) {
                return true;
            }
        }
        return false;
    }
382996
public static boolean blockColourMatches(IBlockState bs, List<Colour> allowedColours)
    {
        for (IProperty prop : bs.getProperties().keySet())
        {
            if (prop.getName().equals("color") && prop.getValueClass() == net.minecraft.item.EnumDyeColor.class)
            {
                // The block in question has a colour, so check it is a specified one:
                net.minecraft.item.EnumDyeColor current = (net.minecraft.item.EnumDyeColor)bs.getValue(prop);
                for (Colour col : allowedColours)
                {
                    if (current.getName().equalsIgnoreCase(col.name()))
                        return true;
                }
            }
        } 
        return false;
    }
1167579
public boolean abandonBlock(Block b, String src, String holder
  ) throws IOException {
    writeLock();
    try {
      //
      // Remove the block from the pending creates list
      //
      if (NameNode.stateChangeLog.isDebugEnabled()) {
        NameNode.stateChangeLog.debug("BLOCK* NameSystem.abandonBlock: "
          + b + "of file " + src);
      }
      if (isInSafeMode()) {
        throw new SafeModeException("Cannot abandon block " + b +
          " for fle" + src, safeMode);
      }
      INodeFileUnderConstruction file = checkLease(src, holder);
      dir.removeBlock(src, file, b);
      if (NameNode.stateChangeLog.isDebugEnabled()) {
        NameNode.stateChangeLog.debug("BLOCK* NameSystem.abandonBlock: "
          + b
          + " is removed from pendingCreates");
      }
      return true;
    } finally {
      writeUnlock();
    }
  }
629630
@Override
	public boolean containsPrefixBlock(int prefixLength) {
		checkSubnet(this, prefixLength);
		int divisionCount = getDivisionCount();
		int prevBitCount = 0;
		for(int i = 0; i < divisionCount; i++) {
			AddressDivision division = getDivision(i);
			int bitCount = division.getBitCount();
			int totalBitCount = bitCount + prevBitCount;
			if(prefixLength < totalBitCount) {
				int divPrefixLen = Math.max(0, prefixLength - prevBitCount);
				if(!division.isPrefixBlock(division.getDivisionValue(), division.getUpperDivisionValue(), divPrefixLen)) {
					return false;
				}
				for(++i; i < divisionCount; i++) {
					division = getDivision(i);
					if(!division.isFullRange()) {
						return false;
					}
				}
				return true;
			}
			prevBitCount = totalBitCount;
		}
		return true;
	}
300906
boolean isReplicaCorrupt(Block blk, DatanodeDescriptor node) {
    Collection<DatanodeDescriptor> nodes = getNodes(blk);
    return ((nodes != null) && (nodes.contains(node)));
  }
1020103
function isVariableModified( $blockName, $varName )
    {
        return ( isset( $this->ModifiedBlockValues[$blockName][$varName] ) and
                 $this->ModifiedBlockValues[$blockName][$varName] );
    }
795403
def copy_block(block=None, update_working_block=True):
    
    block_in = working_block(block)
    block_out, temp_wv_map = _clone_block_and_wires(block_in)
    mems = {}
    for net in block_in.logic:
        _copy_net(block_out, net, temp_wv_map, mems)
    block_out.mem_map = mems

    if update_working_block:
        set_working_block(block_out)
    return block_out
560291
private boolean isTileBlocked(Pathfindable mover, int tx, int ty)
    {
        final Tile tile = map.getTile(tx, ty);
        if (tile != null)
        {
            final TilePath tilePath = tile.getFeature(TilePath.class);
            return mover.isBlocking(tilePath.getCategory());
        }
        return false;
    }
250932
protected final void copyBitcoinHeaderTo(final Block block) {
        block.nonce = nonce;
        block.prevBlockHash = prevBlockHash;
        block.merkleRoot = getMerkleRoot();
        block.version = version;
        block.time = time;
        block.difficultyTarget = difficultyTarget;
        block.transactions = null;
        block.hash = getHash();
    }
1104505
def copy(self, deep=True):
        
        values = self.values
        if deep:
            values = values.copy()
        return self.make_block_same_class(values, ndim=self.ndim)
322559
@Override
  public boolean isModified()
  {
    if (_isDigestModified) {
      if (log.isLoggable(Level.FINE))
        log.fine(_source.getNativePath() + " digest is modified.");

      return true;
    }

    long sourceLastModified = _source.getLastModified();
    long sourceLength = _source.length();
    
    // if the source was deleted and we need the source
    if (! _requireSource && sourceLastModified == 0) {
      return false;
    }
    // if the length changed
    else if (sourceLength != _length) {
      if (log.isLoggable(Level.FINE)) {
        log.fine(_source.getNativePath() + " length is modified (" +
                 _length + " -> " + sourceLength + ")");
      }

      return true;
    }
    // if the source is newer than the old value
    else if (sourceLastModified != _lastModified) {
      if (log.isLoggable(Level.FINE))
        log.fine(_source.getNativePath() + " time is modified.");
      
      return true;
    }
    else
      return false;
  }
782522
public void copyFrom(BlockType other) {
        this.isValid = other.isValid;
        this.isTop = other.isTop;
        if (isValid) {
            this.depth = other.depth;
            this.clear();
            this.or(other);
        }
    }
871516
public boolean hasRuleBlock(String name) {
        for (RuleBlock ruleBlock : this.ruleBlocks) {
            if (ruleBlock.getName().equals(name)) {
                return true;
            }
        }
        return false;
    }
488831
def delete_from(self, basic_block):
        
        if basic_block is None:
            return

        if self.lock:
            return

        self.lock = True

        if self.prev is basic_block:
            if self.prev.next is self:
                self.prev.next = None
            self.prev = None

        for i in range(len(self.comes_from)):
            if self.comes_from[i] is basic_block:
                self.comes_from.pop(i)
                break

        self.lock = False