Creates a paste operation.

@param curB
Reference to current block B
501292
private void paste(final DiffBlock curB)
	{

		String text = bufferMap.remove(curB.getId());

		// Paste (C S B)
		DiffPart action = new DiffPart(DiffAction.PASTE);

		// S
		action.setStart(version.length());
		codecData.checkBlocksizeS(version.length());

		// B
		action.setText(Integer.toString(curB.getId()));
		codecData.checkBlocksizeB(curB.getId());

		diff.add(action);

		version.append(text);
	}
452853
def paste(self):
        """"""
        if self.has_selected_text():
            self.remove_selected_text()
        self.insert_text(QApplication.clipboard().text())
347061
function processMaybeBlock (node, baseToken) {
    const firstToken = getFirstAndLastTokens(node).firstToken
    setOffset(firstToken, isLeftBrace(firstToken) ? 0 : 1, baseToken)
  }
1172073
def paste(**kwargs):
    """"""
    window = Tk()
    window.withdraw()
    d = window.selection_get(selection = 'CLIPBOARD')
    return d
801578
def paste(self):
        """"""
        text = to_text_string(QApplication.clipboard().text())
        if len(text.splitlines()) > 1:
            # Multiline paste
            if self.new_input_line:
                self.on_new_line()
            self.remove_selected_text() # Remove selection, eventually
            end = self.get_current_line_from_cursor()
            lines = self.get_current_line_to_cursor() + text + end
            self.clear_line()
            self.execute_lines(lines)
            self.move_cursor(-len(end))
        else:
            # Standard paste
            ShellBaseWidget.paste(self)
858271
void write(BlockId blk, IoBuffer buffer) {
		try {
			IoChannel fileChannel = getFileChannel(blk.fileName());

			// rewind the buffer
			buffer.rewind();

			// write the block to the file
			fileChannel.write(buffer, blk.number() * BLOCK_SIZE);
		} catch (IOException e) {
			e.printStackTrace();
			throw new RuntimeException("cannot write block" + blk);
		}
	}
1302052
function (instance, td, row, col, prop, keyboardProxy, useOriginalValue, suffix) {
    if (texteditor.isCellEdited) {
      return;
    }

    keyboardProxy.on('cut.editor', function (event) {
      event.stopPropagation();
    });

    keyboardProxy.on('paste.editor', function (event) {
      event.stopPropagation();
    });

    var $td = $(td);

    if (!instance.getCellMeta(row, col).isWritable) {
      return;
    }

    texteditor.isCellEdited = true;

    if (useOriginalValue) {
      var original = instance.getDataAtCell(row, prop);
      original = Handsontable.helper.stringify(original) + (suffix || '');
      keyboardProxy.val(original);
      texteditor.setCaretPosition(keyboardProxy, original.length);
    }
    else {
      keyboardProxy.val('');
    }

    texteditor.refreshDimensions(instance, $td, keyboardProxy);
    keyboardProxy.parent().removeClass('htHidden');

    instance.rootElement.triggerHandler('beginediting.handsontable');

    setTimeout(function () {
      //async fix for Firefox 3.6.28 (needs manual testing)
      keyboardProxy.parent().css({
        overflow: 'visible'
      });
    }, 1);
  }
516387
@Override
  public void aggregate(final ByteBuffer buf, final int position)
  {
    final Object value = selector.getObject();
    if (value == null) {
      return;
    }
    final Lock lock = stripedLock.getAt(lockIndex(position)).writeLock();
    lock.lock();
    try {
      final HllSketch sketch = sketchCache.get(buf).get(position);
      HllSketchBuildAggregator.updateSketch(sketch, value);
    }
    finally {
      lock.unlock();
    }
  }
1284214
@Override
    public void actionPerformed(ActionEvent e) {
        String cmd = e.getActionCommand();
        if (cmd.equals("Cut")) {
            // textArea.cut();
        } else if (cmd.equals("Copy")) {
            textArea.copy();
        } else if (cmd.equals("Paste")) {
            // textArea.paste();
        }
    }
70570
void insertIntoList(BlockInfo head, int headIndex, BlockInfo tail, int tailIndex, int count) {
    if (head == null)
      return;
    
    // connect tail to now-head
    tail.setNext(tailIndex, blockList);
    if (blockList != null)
      blockList.setPrevious(blockList.findDatanode(this), tail);
    
    // create new head
    blockList = head;
    blockList.setPrevious(headIndex, null);
    
    // add new blocks to the count
    numOfBlocks += count;
  }
622061
private void addToPartition(Block<S, L> block) {
        ElementReference ref = partition.referencedAdd(block);
        block.setPartitionReference(ref);
    }
26072
public void actionPerformed(ActionEvent event) {
        String cmd = event.getActionCommand();
        if (cmd.equals(CUT)) {
            text.cut();
        } else if (cmd.equals(COPY)) {
            text.copy();
        } else if (cmd.equals(PASTE)) {
            text.paste();
        }
    }
185921
public void record(ByteBuffer block, int offset) {
    if (this.data == null) {
      // TODO: remove cast to int when large ByteBuffer support is
      // implemented in Java.
      this.data = ByteBuffer.allocate((int) this.length);
    }

    int pos = block.position();
    this.data.position(offset);
    this.data.put(block);
    block.position(pos);
  }
1328289
void moveBlock()
    {
        int offset = _bufferOffset + _pos - _keepSizeBefore;
        // we need one additional byte, since movePos moves on 1 byte.
        if (offset > 0)
        {
            offset--;
        }

        int numBytes = _bufferOffset + _streamPos - offset;

        // check negative offset ????
        System.arraycopy(_bufferBase, offset, _bufferBase, 0, numBytes);
        _bufferOffset -= offset;
    }
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;
               }
            }
         }
      }
   }
360808
private static void mergeBlocks(List< Block > blocks) {
        for (int i = 1; i < blocks.size(); i++) {
            Block b1 = blocks.get(i - 1);
            Block b2 = blocks.get(i);
            if ((b1.mode == b2.mode) &&
                (b1.mode != EncodingMode.NUM || b1.length + b2.length <= MAX_NUMERIC_COMPACTION_BLOCK_SIZE)) {
                b1.length += b2.length;
                blocks.remove(i);
                i--;
            }
        }
    }
928255
function applyBlockFormat() {
        var selection, dom, container, firstTextNode, node, format, textBlockElm, pattern, walker, rng, offset;

        selection = editor.selection;
        dom = editor.dom;

        if (!selection.isCollapsed()) {
          return;
        }

        textBlockElm = dom.getParent(selection.getStart(), 'p');
        if (textBlockElm) {
          walker = new TreeWalker(textBlockElm, textBlockElm);
          while ((node = walker.next())) {
            if (node.nodeType == 3) {
              firstTextNode = node;
              break;
            }
          }

          if (firstTextNode) {
            pattern = findPattern(firstTextNode.data);
            if (!pattern) {
              return;
            }

            rng = selection.getRng(true);
            container = rng.startContainer;
            offset = rng.startOffset;

            if (firstTextNode == container) {
              offset = Math.max(0, offset - pattern.start.length);
            }

            if (Tools.trim(firstTextNode.data).length == pattern.start.length) {
              return;
            }

            if (pattern.format) {
              format = editor.formatter.get(pattern.format);
              if (format && format[0].block) {
                firstTextNode.deleteData(0, pattern.start.length);
                editor.formatter.apply(pattern.format, {}, firstTextNode);

                rng.setStart(container, offset);
                rng.collapse(true);
                selection.setRng(rng);
              }
            }

            if (pattern.cmd) {
              editor.undoManager.transact(function () {
                firstTextNode.deleteData(0, pattern.start.length);
                editor.execCommand(pattern.cmd);
              });
            }
          }
        }
      }