When modifying source, also update children with matching source.
976795
def source(self, newsource):
        """"""
        oldsource = self.source
        for feature in self:
            if feature.source == oldsource:
                feature._source = newsource
510261
def modify_content(source, content, replace_value)
      file = File.read(source)
      replace = file.gsub(/#{content}/, replace_value)
      File.open(source, "w"){|f|
        f.puts replace       
      }
    end
729387
def alter(node, metadata):
    """"""
    if node is not None and metadata and 'node' in metadata:
        node.attrib.update(
            dict((k, str(v)) for k, v in metadata['node'].items())
        )
799506
function(value, start, end) {
			// create modification range
			var r = range.create(start, typeof end === 'undefined' ? 0 : end - start);
			var delta = value.length - r.length();
			
			var update = function(obj) {
				Object.keys(obj).forEach(function(k) {
					if (obj[k] >= r.end) {
						obj[k] += delta;
					}
				});
			};
			
			// update affected positions of current container
			update(this._positions);
			
			// update affected positions of children
			var recursiveUpdate = function(items) {
				items.forEach(function(item) {
					update(item._positions);
					if (item.type == 'container') {
						recursiveUpdate(item.list());
					}
				});
			};

			recursiveUpdate(this.list());
			this.source = utils.replaceSubstring(this.source, value, r);
		}
644241
def append(self, _, child, name=None):
        """"""
        self._insert(child, name=name)
        return self
302715
void fireUpdated(Object source) {
		if (updateDisable) {
			return;
		}
		
		if (source == maxSpinner) {
			if (getMax() < getMin()) {
				setMin(getMax());
			}
		}
		if (source == minSpinner) {
			if (getMax() < getMin()) {
				setMax(getMin());
			}
		}
		
		for (int i=0;i<listeners.size();i++) {
			((InputPanelListener) listeners.get(i)).minMaxUpdated(this);
		}
	}
1266156
def get_patched_ast(source, sorted_children=False):
    
    return patch_ast(ast.parse(source), source, sorted_children)
331442
function updateIYL(minY, i, ih) {
    // Remove siblings that are hidden by the new subtree.  
    while (ih != null && minY >= ih.lowY) ih = ih.nxt;                 
    // Prepend the new subtree.  
    return {
      lowY: minY, 
      index: i, 
      nxt: ih,
    };                                       
  }
551614
protected void fireTreeStructureChanged(Object source, Object[] path,
        int[] childIndices, Object[] children)
    {
        for (TreeModelListener listener : treeModelListeners)
        {
            listener.treeStructureChanged(
                new TreeModelEvent(source, path, childIndices, children));
        }
    }
1298160
private void replaceReferencesToThis(Node node, String name) {
    if (node.isFunction() && !node.isArrowFunction()) {
      // Functions (besides arrows) create a new binding for `this`.
      return;
    }

    for (Node child : node.children()) {
      if (child.isThis()) {
        Node newName = IR.name(name).useSourceInfoFrom(child).setJSType(child.getJSType());
        node.replaceChild(child, newName);
        compiler.reportChangeToEnclosingScope(newName);
      } else {
        replaceReferencesToThis(child, name);
      }
    }
  }
53719
def add_source(self, source):
        """"""
        nodes = [n for n in self.nodes() if not isinstance(n, Source)]
        source.connect(whom=nodes)
247114
protected function updateChildren()
    {
        $children = $this->manager->getChildren($this->item->name);
        $childrenNames = array_keys($children);

        if (is_array($this->children)) {
            // remove children that
            foreach (array_diff($childrenNames, $this->children) as $item) {
                $this->manager->removeChild($this->item, $children[$item]);
            }
            // add new children
            foreach (array_diff($this->children, $childrenNames) as $item) {
                $this->manager->addChild($this->item, $this->manager->getItem($item));
            }
        } else {
            $this->manager->removeChildren($this->item);
        }
    }
479885
void updateReplace() {

        boolean replace = m_replace.getValue().booleanValue();

        m_replaceResource.setVisible(replace ? SearchType.resourcetype.equals(m_searchType.getValue()) : replace);
        m_replacePattern.setVisible(
            replace
            ? !SearchType.resourcetype.equals(m_searchType.getValue())
                & !SearchType.renameContainer.equals(m_searchType.getValue())
            : replace);

        m_newName.setVisible(replace ? SearchType.renameContainer.equals(m_searchType.getValue()) : replace);
        m_oldName.setVisible(replace ? SearchType.renameContainer.equals(m_searchType.getValue()) : replace);

        m_workProject.setVisible(replace);

        m_search.setCaption(
            replace
            ? CmsVaadinUtils.getMessageText(Messages.GUI_SOURCESEARCH_REPLACE_0)
            : CmsVaadinUtils.getMessageText(Messages.GUI_SOURCESEARCH_SEARCH_0));

    }
784514
protected void updateChildren() {
        for (Radio child : getRadioChildren()) {
            HandlerRegistration reg = valueChangedRegistrations.get(child);
            if (reg == null) {
                valueChangedRegistrations.put(child, child.addValueChangeHandler(changeHandler));
            }
            child.setName(name);
        }
    }
91810
def update_name(self, name):
        """"""
        if name != self.name:
            self.parent.types[name] = self
            del self.parent.types[self.name]
            self.name = name
756960
def update_file(filename, items):
    '''
    '''
    # TODO: Implement something in the templates to denote whether the value
    # being replaced is an XML attribute or a value. Perhaps move to dyanmic
    # XML tree building rather than string replacement.
    should_escape = filename.endswith('addon.xml')

    with open(filename, 'r') as inp:
        text = inp.read()

    for key, val in items.items():
        if should_escape:
            val = saxutils.quoteattr(val)
        text = text.replace('{%s}' % key, val)
    output = text

    with open(filename, 'w') as out:
        out.write(output)
171066
def update(self):
        """"""
        response = self.jss.session.post(self.url, data=self.auth)
        response_xml = ElementTree.fromstring(response.text.encode("utf_8"))

        # Remove previous data, if any, and then add in response's XML.
        self.clear()
        for child in response_xml.getchildren():
            self.append(child)