Validate and set the index_spacing flag.
559296
def index_spacing(self, value):
        """"""
        if not isinstance(value, bool):
            raise TypeError('index_spacing attribute must be a logical type.')
        self._index_spacing = value
176069
public void setLong(int index, long value)
    {
        checkIndexLength(index, SizeOf.SIZE_OF_LONG);
        unsafe.putLong(base, address + index, value);
    }
652189
def _validate_mapping(index, strict=False):
    """"""
    try:
        settings.get_index_mapping(index)
    except IOError:
        if strict:
            raise ImproperlyConfigured("Index '%s' has no mapping file." % index)
        else:
            logger.warning("Index '%s' has no mapping, relying on ES instead.", index)
1265554
public void setFloat(int index, float value)
    {
        checkIndexLength(index, SizeOf.SIZE_OF_FLOAT);
        unsafe.putFloat(base, address + index, value);
    }
1372363
function (index) {
        validateListIndex(this, index);

        var i = index,
            len = --this.length;

        for (; i < len; i++) {
            this[i] = this[i + 1];
        }

        delete this[len];
    }
1032679
def remove_trailing_spaces(self, index=None):
        """"""
        if index is None:
            index = self.get_stack_index()
        finfo = self.data[index]
        finfo.editor.remove_trailing_spaces()
140734
public void set(long startIndex, long endIndex)
    {
        if (endIndex <= startIndex) return;

        int startWord = (int) (startIndex >> 6);

        // since endIndex is one past the end, this is index of the last
        // word to be changed.
        int endWord = expandingWordNum(endIndex - 1);

        long startmask = -1L << startIndex;
        long endmask = -1L >>> -endIndex; // 64-(endIndex&0x3f) is the same as -endIndex
                                          // due to wrap

        if (startWord == endWord)
        {
            bits[startWord] |= (startmask & endmask);
            return;
        }

        bits[startWord] |= startmask;
        Arrays.fill(bits, startWord + 1, endWord, -1L);
        bits[endWord] |= endmask;
    }
802951
void set(int index, int value) {
        int chunk = assertSpace(index);
        chunks[chunk][index & mask] = value;
    }
25298
def set_stack_index(self, index, instance):
        """"""
        if instance == self:
            self.tabwidget.setCurrentIndex(index)
665709
def interword_spacing(space)
      begin
        Float(space)
      rescue ArgumentError
        Kernel.raise ArgumentError, 'invalid value for interword_spacing'
      rescue TypeError
        Kernel.raise TypeError, "can't convert #{space.class} into Float"
      end
      primitive "interword-spacing #{space}"
    end
551541
def set_row_min_height(self, y: int, min_height: int):
        """"""
        if y < 0:
            raise IndexError('y < 0')
        self._min_heights[y] = min_height
674018
def validate(self):
        """"""
        super().validate()
        nb_entities = len(self.entities)
        if nb_entities != self.rows + self.columns:
            raise self.error(
                'Number of entities: %s != number of rows + '
                'number of columns: %s+%s=%s' % (
                    nb_entities, self.rows, self.columns,
                    self.rows + self.columns))
1369017
function checkSpaces({
  string,
  globalIndex,
  startIndex,
  endIndex,
  node,
  result
}) {
  const symbol = string.substring(startIndex, endIndex + 1);

  const beforeOk =
    (string[startIndex - 1] === " " && !isWhitespace(string[startIndex - 2])) ||
    newlineBefore(string, startIndex - 1);

  if (!beforeOk) {
    utils.report({
      ruleName,
      result,
      node,
      message: messages.expectedBefore(symbol),
      index: startIndex + globalIndex
    });
  }

  const afterOk =
    (string[endIndex + 1] === " " && !isWhitespace(string[endIndex + 2])) ||
    string[endIndex + 1] === "\n" ||
    string.substr(endIndex + 1, 2) === "\r\n";

  if (!afterOk) {
    utils.report({
      ruleName,
      result,
      node,
      message: messages.expectedAfter(symbol),
      index: endIndex + globalIndex
    });
  }
}
980940
private void prependValueLength(int value, int index) {
    int initialValue = toIntUnsigned(getValue(index));
    int length = toIntUnsigned(getLength(index));
    setValue(index, (short) value);
    setLength(index, (short) (initialValue - value + length));
  }
182534
def validate_square(data, message=None, exception=MatrixError):
    """"""
    rows, columns = len(data), len(data[0]) if data else 0
    if message is None:
        message = 'Number of rows: %s != number of columns: %s in matrix' % (
            rows, columns)
    if rows != columns:
        raise exception(message)
74814
synchronized void ensureParentIndexCapacity(int start, int length, int parentId) {
    int end = start + length;
    if (null == parentIndex) {
      parentIndex = new int[end];
      Arrays.fill(parentIndex, parentId);
    }
    else {
      int newLength = parentIndex.length;
      while (newLength < end) newLength *= 2;
      if (newLength > parentIndex.length) {
        parentIndex = Arrays.copyOfRange(parentIndex, 0, newLength);
        Arrays.fill(parentIndex, end, newLength, -1);
      }
      Arrays.fill(parentIndex, start, end, parentId);
    }
    if (null == godparentIndex) {
      godparentIndex = new int[end];
      Arrays.fill(godparentIndex, -1);
    }
    else {
      int newLength = godparentIndex.length;
      while (newLength < end) newLength *= 2;
      if (newLength > godparentIndex.length) {
        int prevLength = godparentIndex.length;
        godparentIndex = Arrays.copyOfRange(godparentIndex, 0, newLength);
        Arrays.fill(godparentIndex, prevLength, newLength, -1);
      }
    }
  }
1345025
def set_offset( self, offset ):
        """"""
        assert offset in range( len( self.buffer ) )
        self.pos = offset
        self._fill_buffer()