Add to the working string and its length and reset eos.
499705
def add_string(self, string):
        """"""
        self.string += string
        self.length += len(string)
        self.eos = 0
941946
def set(self, safe_len=False, **kwds):
        '''
        '''
        if kwds:  # double check
            d = self.kwds()
            d.update(kwds)
            self.reset(**d)
        if safe_len and self.item:
            self.leng = _len
836555
public final void setupResend() {
    // First, reset the current write op, or cancel it if we should
    // be authenticating
    Operation op = getCurrentWriteOp();
    if (shouldAuth && op != null) {
      op.cancel();
    } else if (op != null) {
      ByteBuffer buf = op.getBuffer();
      if (buf != null) {
        buf.reset();
      } else {
        getLogger().info("No buffer for current write op, removing");
        removeCurrentWriteOp();
      }
    }
    // Now cancel all the pending read operations. Might be better to
    // to requeue them.
    while (hasReadOp()) {
      op = removeCurrentReadOp();
      if (op != getCurrentWriteOp()) {
        getLogger().warn("Discarding partially completed op: %s", op);
        op.cancel();
      }
    }

    while (shouldAuth && hasWriteOp()) {
      op = removeCurrentWriteOp();
      getLogger().warn("Discarding partially completed op: %s", op);
      op.cancel();
    }

    getWbuf().clear();
    getRbuf().clear();
    toWrite = 0;
  }
619824
public void reset() {
		Element e = first;
		while( e != null ) {
			Element n = e.next;
			e.clear();
			available.add( e );
			e = n;
		}
		first = last = null;
		size = 0;
	}
1165644
def _add_from_str(self, s):
        """"""

        if sys.version_info[0] < 3 and isinstance(s, str):
            s = s.decode('utf-8')

        for line in s.split("\n"):
            self._parse_line(line)
265764
private void setString(String s) {
        _string.reset();
        _string.append(s);
        _length = s.length();
    }
271328
def reset(self):
        """"""
        self.num_inst = 0
        self.sum_metric = 0.0
        self.global_num_inst = 0
        self.global_sum_metric = 0.0
1353366
public function reset()
    {
        $this->_position = 0;

        if ($this->_input === null) {
            return;
        }

        // convert input into ascii
        if (PHP_OS != 'AIX') {
            $this->_input = iconv($this->_encoding, 'ASCII//TRANSLIT', $this->_input);
        }
        $this->_encoding = 'ASCII';
    }
923350
def reset(self, data, size):
        
        return lib.zframe_reset(self._as_parameter_, data, size)
770095
def fix_e224(self, result):
        """"""
        target = self.source[result['line'] - 1]
        offset = result['column'] - 1
        fixed = target[:offset] + target[offset:].replace('\t', ' ')
        self.source[result['line'] - 1] = fixed
721716
private void setString(String s) {
        _string.setLength(0);
        _string.append(s);
        _length = s.length();
    }
1221667
public void setLength(int length) {
		if (length < 0 || body.length == length) {
			return;
		}

		int oldPos = pos;
		pos = Math.min(pos, length);

		byte[] newBody = new byte[length];
		System.arraycopy(body, 0, newBody, 0, pos);
		body = newBody;
		
		if (oldPos > pos) {
			cachedString = null;
		}
	}
813724
public void addString(String str)
    {
        if (sourceNode != null)
        {
            addStringInternal(str);
            replaceOrRegister(sourceNode, str);
        }
        else
        {
            unSimplify();
            addString(str);
        }
    }
807501
public void reset() {
    Arrays.fill(mean, 0.);
    Arrays.fill(nmea, 0.);
    if(elements != null) {
      for(int i = 0; i < elements.length; i++) {
        Arrays.fill(elements[i], 0.);
      }
    }
    else {
      elements = new double[mean.length][mean.length];
    }
    wsum = 0.;
  }
488872
def reset(self):
        """"""
        self.alive.value = False
        qsize = 0
        try:
            while True:
                self.queue.get(timeout=0.1)
                qsize += 1
        except QEmptyExcept:
            pass
        print("Queue size on reset: {}".format(qsize))
        for i, p in enumerate(self.proc):
            p.join()
        self.proc.clear()
603732
def reset(self):
        
        self._count = 0
        self._exception_count = 0
        self._stat_start_time = None
        self._time_sum = float(0)
        self._time_min = float('inf')
        self._time_max = float(0)

        self._server_time_sum = float(0)
        self._server_time_min = float('inf')
        self._server_time_max = float(0)
        self._server_time_stored = False

        self._request_len_sum = float(0)
        self._request_len_min = float('inf')
        self._request_len_max = float(0)

        self._reply_len_sum = float(0)
        self._reply_len_min = float('inf')
        self._reply_len_max = float(0)
500522
public void setLength(long size) throws IOException, RepositoryException
   {
      if (!changed)
      {
         internalData = createEditableCopy(this.getInternalData());
      }

      ((EditableValueData)internalData).setLength(size);
      invalidateStream();
   }