Clean out spurious headers from an Element. Checks things like classnames and link density.

@param Element
@return void
490624
function cleanHeaders(e) {
  for (var headerIndex = 1; headerIndex < 7; headerIndex++) {
    var headers = e.getElementsByTagName('h' + headerIndex);
    for (var i = headers.length - 1; i >= 0; --i) {
      if (getClassWeight(headers[i]) < 0 || getLinkDensity(headers[i]) > 0.33) {
        headers[i].parentNode.removeChild(headers[i]);
      }
    }
  }
}
27779
public void ignoreElementsAfter(GraphIterationElement<ST, PT> element) {
		final List<GraphIterationElement<ST, PT>> nexts = getNextSegments(false, element);
		this.courseModel.removeIterationElements(nexts);
	}
1264218
public function addElement($element)
    {
        if ($this->processing === 'B') {
            $this->bodyElements[] = $element;
        } elseif ($this->processing === 'H') {
            $this->headerElements[] = $element;
        } elseif ($this->processing === 'F') {
            $this->footerElements[] = $element;
        }
    }
620650
public void clear(F element) {
        Counter<S> s = maps.get(element);
        if (s != null)
            s.clear();
    }
674085
function(element, clear) {
      // Strict check on the off-chance that we later think of other options
      // and want to replace 'clear' with an 'options' parameter, but want to
      // support backwards compat.
      if (clear === true) {
        util.clearElement(element);
      }

      element.appendChild(this.toDom(element.ownerDocument));
    }
695217
function cleanElement() {
        destroyListener();

        element
          .removeClass('md-active')
          .attr('aria-hidden', 'true')
          .css({
            'display': 'none',
            'top': '',
            'right': '',
            'bottom': '',
            'left': '',
            'font-size': '',
            'min-width': ''
          });
        element.parent().find('md-select-value').removeAttr('aria-hidden');

        announceClosed(opts);

        if (!opts.$destroy && opts.restoreFocus) {
          opts.target.focus();
        }
      }
600637
function initHandlerHeader( $element, &$params )
    {
        if ( $this->anchorAsAttribute )
        {
            $anchorElement = $element->firstChild;
            if ( $anchorElement->nodeName === 'anchor' )
            {
                $element->setAttribute( 'anchor_name', $anchorElement->getAttribute( 'name' ) );
                $anchorElement = $element->removeChild( $anchorElement );
            }
        }
        $this->elementStylesToAttribute( $element );
        return null;
    }
1352687
protected function removeOverNested( Node $el ) {
        if( $el->isTextNode() )
            return;
        else if( $el->beyondDefinitionLimit() )
        {
            $el->getParent()->removeChild( $el );
        }
        else
        {
            foreach( $el->getChildren() as $child )
                $this->removeOverNested($child);
        }
    }
179260
public static function delete(array $element) {
    if ($element['#value']) {
      $file = File::load($element['#value']);
      $file->delete();

      // Clean up the file system if needed.
      $uri = $file->getFileUri();
      if (file_exists($uri)) {
        \Drupal::service('file_system')->unlink($uri);
      }
    }
  }
267459
public synchronized void removeElement(T element) {
		List<T> origList = ref.get().list;
		boolean isPresent = origList.contains(element);
		if (!isPresent) {
			return;
		}
		
		List<T> newList = new ArrayList<T>(origList);
		newList.remove(element);
		
		swapWithList(newList);
	}
346204
protected function cleanHrefs(\DOMElement $element)
    {
        $href = $element->getAttribute('href');
        if (preg_match(self::SCRIPT_REGEX, $href) === 1) {
            $element->removeAttribute('href');
            $this->xmlIssues[] = array(
                'message' => 'Suspicious attribute \'href\'',
                'line' => $element->getLineNo(),
            );
        }
    }
1115529
function cleanHeadings( el ) {
		var i;
		for ( i = 0; i < el.length; i++ ) {
			el[ i ].innerHTML = cleanHeading( el[ i ].innerHTML );
		}
	}
981156
public void removeElementsThatAreUnreachableFrom(Element element) {
        if (element != null) {
            Set<Element> elementsToShow = new HashSet<>();
            Set<Element> elementsVisited = new HashSet<>();
            findElementsToShow(element, element, elementsToShow, elementsVisited);

            for (ElementView elementView : getElements()) {
                if (!elementsToShow.contains(elementView.getElement()) && canBeRemoved(elementView.getElement())) {
                    removeElement(elementView.getElement());
                }
            }
        }
    }
148362
public function cleanHeaders(\DOMElement $e)
    {
        for ($headerIndex = 1; $headerIndex < 3; ++$headerIndex) {
            $headers = $e->getElementsByTagName('h' . $headerIndex);

            for ($i = $headers->length - 1; $i >= 0; --$i) {
                if ($this->getWeight($headers->item($i)) < 0 || $this->getLinkDensity($headers->item($i)) > 0.33) {
                    $headers->item($i)->parentNode->removeChild($headers->item($i));
                }
            }
        }
    }
796304
function(element) {
		Array.forEach(this._xnew.attributes, function(newatt) {
			var oldatt = this._xold.getAttribute(newatt.name);
			if (oldatt === null || oldatt !== newatt.value) {
				this._set(element, newatt.name, newatt.value);
				this._summary.push(
					"@" + newatt.name + "=\"" + newatt.value + "\"" +
					(element.id ? ' (#' + element.id + ')' : '')
				);
			}
		}, this);
		Array.forEach(this._xold.attributes, function(oldatt) {
			if (!this._xnew.hasAttribute(oldatt.name)) {
				this._del(element, oldatt.name, null);
				this._summary.push(
					"removed @" + oldatt.name +
					(element.id ? ' (#' + element.id + ')' : '')
				);
			}
		}, this);
	}
1035997
protected function validateElement(BaseElement $element) : void
    {
        if ($element instanceof Break_) {
            $this->validateBreak($element);
        } elseif ($element instanceof Phoneme) {
            $this->validatePhoneme($element);
        } elseif ($element instanceof SayAs) {
            $this->validateSayAs($element);
        } elseif ($element instanceof Word) {
            $this->validateWord($element);
        }
    }
819007
protected void removeElement(Ehcache cache, Element element) {
        final Set<CacheEntryTag> tags = this.getTags(element);

        // Check if the key is tagged
        if (tags != null && !tags.isEmpty()) {
            final String cacheName = cache.getName();
            final LoadingCache<CacheEntryTag, Set<Object>> cacheKeys =
                    taggedCacheKeys.getIfPresent(cacheName);

            // If there are tracked tagged keys remove matching tags
            if (cacheKeys != null) {
                final Object key = element.getObjectKey();

                logger.debug(
                        "Tracking removing key cache {} with tag {} : {}", cacheName, tags, key);

                for (final CacheEntryTag tag : tags) {
                    final Set<Object> taggedKeys = cacheKeys.getIfPresent(tag);

                    // Remove the tagged key
                    if (taggedKeys != null) {
                        taggedKeys.remove(key);
                    }
                }
            }
        }
    }