Inserts the value at the specified index and shifts all the other values down.
764525
public void insert( int index , int value ) {
		if( size == data.length ) {
			int temp[] = new int[ size * 2];
			System.arraycopy(data,0,temp,0,index);
			temp[index] = value;
			System.arraycopy(data,index,temp,index+1,size-index);
			this.data = temp;
			size++;
		} else {
			size++;
			for( int i = size-1; i > index; i-- ) {
				data[i] = data[i-1];
			}
			data[index] = value;
		}
	}
1224757
@SuppressWarnings("unchecked")
    public V put(Integer key, V value) {

	int k = checkKey(key);
	int index = Arrays.binarySearch(keyIndices, k);

	if (index >= 0) {
	    V old = (V)(values[index]);
	    values[index] = value;
	    return old;
	}
	else {
	    int newIndex = 0 - (index + 1);	    
	    Object[] newValues = Arrays.copyOf(values, values.length + 1);
	    int[] newIndices = Arrays.copyOf(keyIndices, values.length + 1);

	    // shift the elements down to make room for the new value
	    for (int i = newIndex; i < values.length; ++i) {
		newValues[i+1] = values[i];
		newIndices[i+1] = keyIndices[i];
	    }

	    // insert the new value
	    newValues[newIndex] = value;
	    newIndices[newIndex] = k;

	    // switch the arrays with the lengthed versions
	    values = newValues;
	    keyIndices = newIndices;
	    
	    return null;
	}
    }
1261646
def insert(self, index: int, obj: Any) -> None:
        
        if obj is not None:
            super().insert(index, obj)
408830
public StrBuilder insert(int index, CharSequence csq) {
		if (null == csq) {
			csq = "null";
		}
		int len = csq.length();
		moveDataAfterIndex(index, csq.length());
		if (csq instanceof String) {
			((String) csq).getChars(0, len, this.value, index);
		} else if (csq instanceof StringBuilder) {
			((StringBuilder) csq).getChars(0, len, this.value, index);
		} else if (csq instanceof StringBuffer) {
			((StringBuffer) csq).getChars(0, len, this.value, index);
		} else if (csq instanceof StrBuilder) {
			((StrBuilder) csq).getChars(0, len, this.value, index);
		} else {
			for (int i = 0, j = this.position; i < len; i++, j++) {
				this.value[j] = csq.charAt(i);
			}
		}
		this.position = Math.max(this.position, index) + len;
		return this;
	}
597657
@Override
    public double put(int idx, double val) {
	    double old = 0;
		int i = Arrays.binarySearch(indices, 0, used, idx);
		if (i >= 0) {
			// Just update the value.
		    old = values[i];
			values[i] = val;
			return old;
		} 
		int insertionPoint = -(i + 1);
		indices = insert(indices, insertionPoint, idx);
		values = insert(values, insertionPoint, val);
		used++;
		return old;
	}
697843
def insert(self, index = 0, *widgets):
        """"""
        for widget in widgets:
            self._add(widget, index)
            index +=1 # as we are moving forwards
        self._sort()
387052
def insert(self, index, value):
        """"""
        self.__field.validate_element(value)
        return list.insert(self, index, value)
437464
def insert(self, index, key, value):
        """"""
        if key in self.keyOrder:
            n = self.keyOrder.index(key)
            del self.keyOrder[n]
            if n < index:
                index -= 1
        self.keyOrder.insert(index, key)
        super(SortedDict, self).__setitem__(key, value)
126688
public Binder insert(int index, Class<?>[] types, Object... values) {
        return new Binder(this, new Insert(index, types, values));
    }
295455
def insert(self, index, x):
        
        self.check_insertion(x)

        self.real_list.insert(index, x)
        self._items |= {x}
389624
def insert(self, index, value):
        
        def insert_trans(pipe):
            len_self = self.__len__(pipe)
            if (self.maxlen is not None) and (len_self >= self.maxlen):
                raise IndexError

            if index == 0:
                self._insert_left(value, pipe)
            else:
                self._insert_middle(index, value, pipe=pipe)

        self._transaction(insert_trans)
695927
def insert( index, *args)
      if !args.nil?
        pos = index
        args.each do |url| 
          convert = convert_remote_url( url )
          super( pos, convert )
          if index >= 0
            pos = pos + 1          
          end
        end
      else
        super( index, nil )  
      end
    end
1067694
@Override
    public void add(int index, T element) {
        if (displacement != null) {
            super.add(index - displacement, element);
        } else {
            super.add(index, element);
        }
    }
307213
public void insert(StringBuilder buffer, Object value, int index) {
        if (buffer == null) {
            throw new NullPointerException("buffer");
        }

        buffer.insert(index, value);
    }
1120349
public void setPrimitive(int index, int value) {
        int pos = Arrays.binarySearch(indices, index);

        if (value != 0) {
            // need to make room in the indices array
            if (pos < 0) {
                int newPos = 0 - (pos + 1);
                int[] newIndices = new int[indices.length + 1];
                int[] newValues = new int[values.length + 1];
            
                // copy the existing array contents that are valid in their
                // current positions
                for (int i = 0; i < newPos; ++i) {
                    newValues[i] = values[i];
                    newIndices[i] = indices[i];
                }

                // shift the elements down by one to make room
                for (int i = newPos; i < values.length; ++i) {
                    newValues[i+1] = values[i];
                    newIndices[i+1] = indices[i];
                }
                    
                // swap the arrays
                indices = newIndices;
                values = newValues;
                pos = newPos;
                    
                 // update the position of the pos in the values array
                indices[pos] = index;
            }
            values[pos] = value;
        }
        // The value is zero but previously held a spot in the matrix, so
        // remove its position and shift everything over
        else if (value == 0 && pos >= 0) {
            int newLength = indices.length - 1;
            int[] newIndices = new int[newLength];
            int[] newValues = new int[newLength];
            for (int i = 0, j = 0; i < indices.length; ++i) {
                if (i != pos) {
                    newIndices[j] = indices[i];
                    newValues[j] = values[i];            
                    j++;
                }
            }

            // swap the arrays
            indices = newIndices;
            values = newValues;
        }

    }
68204
public void setInt(int index, int value)
    {
        checkPositionIndexes(index, index + SIZE_OF_INT, this.length);
        index += offset;
        data[index] = (byte) (value);
        data[index + 1] = (byte) (value >>> 8);
        data[index + 2] = (byte) (value >>> 16);
        data[index + 3] = (byte) (value >>> 24);
    }
1228206
def _insert_row(self, i, index):
        
        if i == len(self._index):
            self._add_row(index)
        else:
            self._index.insert(i, index)
            for c in range(len(self._columns)):
                self._data[c].insert(i, None)