Remove the reference of input subsegment.
763896
def remove_subsegment(self, subsegment):
        
        super(Segment, self).remove_subsegment(subsegment)
        self.decrement_subsegments_size()
957965
public NextInputs remove(Input input) {
        final Set<InputSpec> willRemove = new HashSet<>(1);
        for (InputSpec spec : mInputSpecs) {
            if (spec.input == input) {
                willRemove.add(spec);
            }
        }
        mInputSpecs.removeAll(willRemove);
        return this;
    }
483887
def removeblanklines(astr):
    """"""
    lines = astr.splitlines()
    lines = [line for line in lines if line.strip() != ""]
    return "\n".join(lines)
78555
protected void removeDuplicates ()
    {
        if (_size > 1) {
            int last = _values[0];
            for (int ii = 1; ii < _size; ) {
                if (_values[ii] == last) { // shift everything down 1
                    _size--;
                    System.arraycopy(_values, ii + 1, _values, ii, _size - ii);
                } else {
                    last = _values[ii++];
                }
            }
        }
    }
114567
def __sub_del_reference(self, req, key):
        """"""
        if not req.success:
            try:
                self.__new_subs.pop(key)
            except KeyError:
                logger.warning('No sub ref %s', key)
140808
private void removeUnnecessaryHasOneToSelf() {
		model.getPrimaryAttributes();
		String[] hasOne = model.getHasOne();
		String[] hasOneLocalColumn = model.getHasOneLocalColumn();
		String[] hasOneReferencedColumn = model.getHasOneReferencedColumn();


		for(int i = 0; i < hasOne.length; i++){
			boolean hasOneLocalInPrimary = CStringUtils.inArray(model.getPrimaryAttributes(), hasOneLocalColumn[i]);
			boolean hasOneReferencedInPrimary = CStringUtils.inArray(model.getPrimaryAttributes(), hasOneReferencedColumn[i]);

			if(hasOne[i].equals(model.getTableName()) && hasOneLocalColumn[i].equals(hasOneReferencedColumn[i]) &&
					hasOneLocalInPrimary && hasOneReferencedInPrimary ){

				model = removeFromHasOne(model, hasOne[i]);
			}
		}

	}
467468
public void removeLastConstraint()
	{
		if (constraints.isEmpty()) return;

		MappedConst mc = constraints.get(constraints.size() - 1);
		constraints.remove(mc);
		if (mc.canGenerate() && mc.getInds()[mc.getInds().length - 1] == lastIndex)
		{
			setLastIndexToMaxFound();
		}
	}
888996
def remove(self, *l):
        '''
        '''
        for a in flatten(l):
            self._remove([self.Inner(a)], self.l)
1144538
def remove_subkey(self, subkey):
        
        if len(self.subkeys) > 0:
            key = subkey if isinstance(subkey, str) else subkey.key
            for i in range(len(self.subkeys)):
                if self.subkeys[i].key == key:
                    self.subkeys.pop(i)
                    break
628322
private void removeAt(int i) {
        Object[] array = queue;
        int n = size - 1;
        if (n == i) // removed last element
            array[i] = null;
        else {
            E moved = (E) array[n];
            array[n] = null;
            Comparator<? super E> cmp = comparator;
            if (cmp == null)
                siftDownComparable(i, moved, array, n);
            else
                siftDownUsingComparator(i, moved, array, n, cmp);
            if (array[i] == moved) {
                if (cmp == null)
                    siftUpComparable(i, moved, array);
                else
                    siftUpUsingComparator(i, moved, array, cmp);
            }
        }
        size = n;
    }
399060
def remove(self, key, value, element):
        """"""
        self.neoindex.delete(key, value, element.neoelement)
703628
def cut_references(text_lines):
    """"""
    ref_sect_start = find_reference_section(text_lines)
    if ref_sect_start is not None:
        start = ref_sect_start["start_line"]
        end = find_end_of_reference_section(text_lines, start,
                                            ref_sect_start["marker"],
                                            ref_sect_start["marker_pattern"])
        del text_lines[start:end + 1]
    else:
        current_app.logger.warning("Found no references to remove.")
        return text_lines

    return text_lines
940104
def trim(self):
        """"""
        for key, value in list(iteritems(self.counters)):
            if value.empty():
                del self.counters[key]
1242466
function() {
   
      // Remove the canvas from the dom
      this.parentEl.removeChild(this.element);
   
      // Remove the wire reference from the connected terminals
    	if(this.terminal1 && this.terminal1.removeWire) {
			this.terminal1.removeWire(this);
    	}
    	if(this.terminal2 && this.terminal2.removeWire) {
			this.terminal2.removeWire(this);
    	}

    	// Remove references to old terminals
    	this.terminal1 = null;
    	this.terminal2 = null;

		// Remove Label
		if(this.labelEl) {
			if(this.labelField) {
				this.labelField.destroy();
			}
			this.labelEl.innerHTML = "";
		}
   }
1326192
private void trimCandidatesUsingOnCost() {
    Iterator<Entry<String, FunctionState>> i;
    for (i = fns.entrySet().iterator(); i.hasNext(); ) {
      FunctionState functionState = i.next().getValue();
      if (functionState.hasReferences()) {
        // Only inline function if it decreases the code size.
        boolean lowersCost = minimizeCost(functionState);
        if (!lowersCost) {
          // It shouldn't be inlined; remove it from the list.
          i.remove();
        }
      } else if (!functionState.canRemove()) {
        // Don't bother tracking functions without references that can't be
        // removed.
        i.remove();
      }
    }
  }
475961
public void removeLast() {
		if (this.numTypes>0) {
			switch(this.types[this.numTypes-1]) {
			case CLOSE:
				// no coord to remove
				break;
			case MOVE_TO:
			case LINE_TO:
				this.numCoords -= 3;
				break;
			case CURVE_TO:
				this.numCoords -= 9;
				this.isPolyline = null;
				break;
			case QUAD_TO:
				this.numCoords -= 6;
				this.isPolyline = null;
				break;
			default:
				throw new IllegalStateException();
			}
			--this.numTypes;
			this.isEmpty = null;
			this.graphicalBounds = null;
			this.logicalBounds = null;
		}
	}
1355412
def _cleanup(self, ref):
        ''
        self.transitor_states[self._weakref_holder[ref]] -= 1
        del self._weakref_holder[ref]