Remove a dependency
@param from From element
@param to To element
@throws java.lang.IllegalArgumentException if either to or from don't exist
334477
public void removeDependency(T from, T to) {
      lock.writeLock().lock();
      try {
         Set<T> dependencies = outgoingEdges.get(from);
         if (dependencies == null || !dependencies.contains(to)) {
            throw new IllegalArgumentException("Inexistent dependency");
         }
         dependencies.remove(to);
         incomingEdges.get(to).remove(from);
      } finally {
         lock.writeLock().unlock();
      }
   }
987682
public Result removeEntry(Object dependency, Object entry) {
        Result result = this.htod.getFromResultPool();
        ValueSet valueSet = (ValueSet) dependencyToEntryTable.get(dependency);

        if (valueSet == null) {
            return result;
        }
        result.bExist = HTODDynacache.EXIST;
        valueSet.remove(entry);
        dependencyNotUpdatedTable.remove(dependency);

        if (valueSet.isEmpty()) {
            dependencyToEntryTable.remove(dependency);
            if (this.type == DEP_ID_TABLE) {
                result.returnCode = this.htod.delValueSet(HTODDynacache.DEP_ID_DATA, dependency);
            } else {
                result.returnCode = this.htod.delValueSet(HTODDynacache.TEMPLATE_ID_DATA, dependency);
            }
        }
        return result;
    }
765510
protected function deleteRelationData($from, $to)
    {
        $config  = Config::table($from);
        $content = $config->get();
        unset($content->relations->{$to});
        $config->put($content);
    }
1223955
public static void moveChildren(Element from, Element to) {
        if (from == null || to == null || from == to) return;
        for (int k = from.getChildCount() - 1; k >= 0; k--) {
            Node node = from.getChild(k);
            from.removeChild(node);
            to.insertFirst(node);
        }
    }
668933
ConverterSet remove(final int index, Converter[] removed) {
        Converter[] converters = iConverters;
        int length = converters.length;
        if (index >= length) {
            throw new IndexOutOfBoundsException();
        }

        if (removed != null) {
            removed[0] = converters[index];
        }

        Converter[] copy = new Converter[length - 1];
                
        int j = 0;
        for (int i=0; i<length; i++) {
            if (i != index) {
                copy[j++] = converters[i];
            }
        }
        
        return new ConverterSet(copy);
    }
556342
public void remove(T element) {
      lock.writeLock().lock();
      try {
         if (outgoingEdges.remove(element) != null) {
            for (Set<T> values : outgoingEdges.values()) {
               values.remove(element);
            }
         }
         if (incomingEdges.remove(element) != null) {
            for (Set<T> values : incomingEdges.values()) {
               values.remove(element);
            }
         }
      } finally {
         lock.writeLock().unlock();
      }
   }
242131
public static void removeFromParent(Element elem) {
    if(elem != null && elem.getParentNode() != null) {
      elem.getParentNode().removeChild(elem);
    }
  }
1224829
public function removeDefinitionArc( $roleUri, $from, $to )
	{
		if ( ! isset( $this->definitionRoleRefs[ $roleUri ] ) ) return false;

		if ( isset( $this->definitionRoleRefs[ $roleUri ]['primaryitems'][ $to ] ) )
		{
			unset( $this->definitionRoleRefs[ $roleUri ]['primaryitems'][ $to ] );
		}

		if ( isset( $this->definitionRoleRefs[ $roleUri ]['members'][ $to ] ) )
		{
			unset( $this->definitionRoleRefs[ $roleUri ]['members'][ $to ] );
		}

		if ( isset( $this->definitionRoleRefs[ $roleUri ]['dimensions'][ $to ] ) )
		{
			unset( $this->definitionRoleRefs[ $roleUri ]['dimensions'][ $to ] );
		}

		// BMS 2017-03-21 Not using the hierarchy any more so the reference to 'paths' is redundant
		return;

		$toFragment = parse_url( $to, PHP_URL_FRAGMENT );
		$fromFragment = parse_url( $from, PHP_URL_FRAGMENT );

		if ( isset( $this->definitionRoleRefs[ $roleUri ]['paths'][ $toFragment ] ) )
		{
			$paths = $this->definitionRoleRefs[ $roleUri ]['paths'][ $toFragment ];
			$me = $this;
			$this->processNodeByPath( $this->definitionRoleRefs[ $roleUri ]['hierarchy'], $paths, $from,
				function( &$node, $path, $parentKey ) use( &$me, $from, $to, $roleUri ) {

					if ( $node['label'] != $from && ! isset( $node['children'][ $to ] ) ) return;

					// If this node has children then they need to be removed!
					if ( isset( $node['children'][ $to ]['children'] ) )
					{
						foreach ( $node['children'][ $to ]['children'] as $childKey => $child )
						{
							$me->removeDefinitionArc( $roleUri, $to, $childKey );
						}
					}

					unset( $node['children'][ $to ] );
				}
			);
			unset( $me );

			/*
			foreach ( $paths as $path )
			{
				if ( isset( $current ) ) unset( $current );
				$current =& $this->definitionRoleRefs[ $roleUri ]['hierarchy'];
				$previous = null;
				$previousKey = null;
				$partsPath = "";

				// Use the path to find the hierarchy node to be removed
				$parts = explode( '/', $path );
				foreach ( $parts as $part )
				{
					if ( ! isset( $current[ $part ] ) )
					{
						break;
					}

					$previous =& $current;

					if ( ! empty( $partsPath ) ) $partsPath .= '/';
					$partsPath .= $part;

					$current =& $current[ $part ];

					if ( ! isset( $current['children'] ) || $current['label'] == $parts[ count( $parts ) - 1 ] )
					{
						break;
					}

					$current =& $current['children'];
					$previousKey = $part;
				}

				if ( $partsPath != $path )
				{
					continue;
				}

				// The label of $current should be $toFragment and the label of $previous should be $fromFragment
				if ( $current['label'] != $to )
				{
					continue;
				}

				if ( $previousKey != $from)
				{
					// This means the path contains the $to node but its parent on this path is not $from
					continue;
				}

				// If this node has children then they need to be removed!
				if ( isset( $current['children'] ) )
				{
					foreach ( $current['children'] as $childKey => $child )
					{
						$this->removeDefinitionArc( $roleUri, $to, $childKey );
					}
				}

				// Remove the arc
				unset( $previous[ $to ] );

			}
			*/

			// Remove the paths
			unset( $this->definitionRoleRefs[ $roleUri ]['paths'][ $toFragment ] );
		}

	}
1029695
public static MutableSet<Integer> toSet(int from, int to)
    {
        MutableSet<Integer> targetCollection = UnifiedSet.newSet();
        Interval.fromTo(from, to).forEach(CollectionAddProcedure.on(targetCollection));
        return targetCollection;
    }
1019266
public static <T> void moveList(List<T> fromList, List<T> toList) {
    for (Iterator<T> iter = fromList.iterator(); iter.hasNext(); ) {
      T elem = iter.next();
      iter.remove();
      toList.add(elem);
    }
  }
1093821
private boolean areTypesSame(String from, String to)
   {
      String fromCompare = from.endsWith(".java") ? from.substring(0, from.length() - 5) : from;
      String toCompare = to.endsWith(".java") ? to.substring(0, to.length() - 5) : to;
      return fromCompare.equals(toCompare);
   }
1055264
def remove_dependency(self, p_from_todo, p_to_todo, p_leave_tags=False):
        
        dep_id = p_from_todo.tag_value('id')

        if dep_id:
            self._depgraph.remove_edge(hash(p_from_todo), hash(p_to_todo))
            self.dirty = True

        # clean dangling dependency tags
        if dep_id and not p_leave_tags:
            p_to_todo.remove_tag('p', dep_id)

            if not self.children(p_from_todo, True):
                p_from_todo.remove_tag('id')
                del self._parentdict[dep_id]
569908
private void clean(int from, int to) {
        for (int i = from; i < to; i++) {
            ByteBuffer bb = segments.get(i);
            cleanMappedByteBuffer(bb);
            segments.set(i, null);
        }
    }
1112987
public void removeEdge(V from, V to) {
        if (!containsVertex(from)) {
            throw new IllegalArgumentException("Nonexistent vertex " + from);
        }

        if (!containsVertex(to)) {
            throw new IllegalArgumentException("Nonexistent vertex " + to);
        }

        neighbors.get(from).remove(to);
    }
599525
protected void removeDependency(Service service) {
        assertDuringInitialization();
        LOG.info("Service {} is not dependent on {}", this, service);
        if (!dependsOn.remove(service))
            LOG.warn("Service {} asked to remove dependency on {}, but wasn't dependendent on it", getName(), service.getName());
    }
1326060
private void mergeSymbol(Symbol from, Symbol to) {
    for (Node nodeToMove : from.references.keySet()) {
      if (!nodeToMove.equals(from.getDeclarationNode())) {
        to.defineReferenceAt(nodeToMove);
      }
    }
    removeSymbol(from);
  }
1231968
public final static void copyProperties(Object from, Object to) {

        Set<Field> fromSet = getAllFiled(from.getClass());
        Set<Field> toSet = getAllFiled(to.getClass());

        Map<String, Field> toMap = new HashMap<String, Field>();
        for (Field f : toSet) {
            toMap.put(f.getName(), f);
        }

        for (Field f : fromSet) {
            if (Modifier.isStatic(f.getModifiers())) {
                continue;
            }
            String name = f.getName();
            Field toField = toMap.get(name);
            if (toField == null) {
                continue;
            }

            toField.setAccessible(true);
            f.setAccessible(true);
            try {
                toField.set(to, f.get(from));
            } catch (IllegalArgumentException e) {
                e.printStackTrace();
            } catch (IllegalAccessException e) {
                e.printStackTrace();
            }
        }

    }