TODO see if we can make the earlier detection smarter and then remove this adjustment
480512
private static String adjustData(String data, ClassNode type, DelegationMetadata dmd) {
        StringBuilder path = new StringBuilder();
        int i = 0;
        String[] propertyPath = data.split("\\.");
        while (dmd != null) {
            int strategy = dmd.getStrategy();
            ClassNode delegate = dmd.getType();
            dmd = dmd.getParent();
            switch (strategy) {
                case Closure.DELEGATE_FIRST:
                    if (!delegate.isDerivedFrom(CLOSURE_TYPE) && !delegate.isDerivedFrom(type)) {
                        path.append("owner"); // must be non-delegate case
                    } else {
                        path.append("delegate");
                    }
                    break;
                default:
                    if (i >= propertyPath.length) return data;
                    path.append(propertyPath[i]);
            }
            if (type.equals(delegate)) break;
            i++;
            if (dmd != null) path.append('.');
        }
        String result = path.toString();
        if (!result.isEmpty()) {
            return result;
        }
        return data;
    }
384629
@Override
	public void resetLearningImpl()
	{
		this.windowSize = this.windowSizeOption.getValue();
		this.numTrees = this.numTreesOption.getValue();
		this.maxDepth = this.maxDepthOption.getValue();
		this.sizeLimit = this.sizeLimitOption.getValue();
		this.numInstances = 0;
		this.forest = new HSTreeNode[numTrees];
		this.referenceWindow = true;
		this.anomalyThreshold = this.anomalyThresholdOption.getValue();
	}
28700
protected void checkShrink ()
    {
        if ((_buckets.length > DEFAULT_BUCKETS) &&
                (_size < (int) (_buckets.length * _loadFactor * .125))) {
            resizeBuckets(Math.max(DEFAULT_BUCKETS, _buckets.length >> 1));
        }
    }
244687
function repel( pt, i ) {
  if ( pt.distance(mouse) < threshold ) { // smaller than threshold distance, push it out
    var dir = pt.$subtract(mouse).normalize();
    pt.set( dir.multiply(threshold).add( mouse ).min( space.size ).max(0, 0) );
  } else { // bigger than threshold distance, pull it in
    var orig = origs[i];
    pt.set ( orig.$add( pt.$subtract(orig).multiply(0.98) ) );
  }
}
331839
def _remove_observation_from_means(self, xj, yj):
        """"""
        self._mean_x_in_window = ((self.window_size * self._mean_x_in_window - xj) /
                                  (self.window_size - 1.0))
        self._mean_y_in_window = ((self.window_size * self._mean_y_in_window - yj) /
                                  (self.window_size - 1.0))
871413
def _remove_observation(self, x_to_remove, y_to_remove):
        """"""
        self._remove_observation_from_variances(x_to_remove, y_to_remove)
        self._remove_observation_from_means(x_to_remove, y_to_remove)
        self.window_size -= 1
604934
function clearCurrentMatchHighlight(cm, state) {
        if (state.markedCurrent) {
            state.markedCurrent.clear();
            ScrollTrackMarkers.markCurrent(-1);
        }
    }
1203897
function(opSet, target) {
      var self = this;
      Parse._objectEach(opSet, function(change, key) {
        target[key] = change._estimate(target[key], self, key);
        if (target[key] === Parse.Op._UNSET) {
          delete target[key];
        }
      });
    }
697019
def adjust(self):
        

        if self._fro is None and self._to is not None:
            self._fro = dict(
                [(value.lower(), key) for key, value in self._to.items()])
        if self._to is None and self._fro is not None:
            self._to = dict(
                [(value.lower(), key) for key, value in self._fro.items()])
89269
private void removeDataPullUpperBounds() {
    log.info("Removing data pull upper bound for last work unit");
    Iterator<Predicate> it = predicateList.iterator();
    while (it.hasNext()) {
      Predicate predicate = it.next();
      if (predicate.getType() == Predicate.PredicateType.HWM) {
        log.info("Remove predicate: " + predicate.condition);
        it.remove();
      }
    }
  }
582986
public long adjustOffset(long instant, boolean earlierOrLater) {
        // a bit messy, but will work in all non-pathological cases
        
        // evaluate 3 hours before and after to work out if anything is happening
        long instantBefore = instant - 3 * DateTimeConstants.MILLIS_PER_HOUR;
        long instantAfter = instant + 3 * DateTimeConstants.MILLIS_PER_HOUR;
        long offsetBefore = getOffset(instantBefore);
        long offsetAfter = getOffset(instantAfter);
        if (offsetBefore <= offsetAfter) {
            return instant;  // not an overlap (less than is a gap, equal is normal case)
        }
        
        // work out range of instants that have duplicate local times
        long diff = offsetBefore - offsetAfter;
        long transition = nextTransition(instantBefore);
        long overlapStart = transition - diff;
        long overlapEnd = transition + diff;
        if (instant < overlapStart || instant >= overlapEnd) {
          return instant;  // not an overlap
        }
        
        // calculate result
        long afterStart = instant - overlapStart;
        if (afterStart >= diff) {
          // currently in later offset
          return earlierOrLater ? instant : instant - diff;
        } else {
          // currently in earlier offset
          return earlierOrLater ? instant + diff : instant;
        }
    }
1310834
private void adjustOriginalPositionIndicator(
        CmsSitemapTreeItem draggable,
        I_CmsDropTarget target,
        CmsDNDHandler handler) {

        if (!isChangedPosition(draggable, target, true)) {
            draggable.getElement().addClassName(I_CmsSitemapLayoutBundle.INSTANCE.sitemapItemCss().markUnchanged());
            List<Element> itemWidget = CmsDomUtil.getElementsByClass(
                org.opencms.gwt.client.ui.css.I_CmsLayoutBundle.INSTANCE.listItemWidgetCss().itemContainer(),
                handler.getPlaceholder());
            if ((itemWidget != null) && (itemWidget.size() > 0)) {
                CmsDomUtil.addDisablingOverlay(itemWidget.get(0));
            }
        } else {
            draggable.getElement().removeClassName(I_CmsSitemapLayoutBundle.INSTANCE.sitemapItemCss().markUnchanged());
            CmsDomUtil.removeDisablingOverlay(handler.getPlaceholder());
        }
    }
414339
function (oldEvt) {
    var el = this.el;
    if (oldEvt) { el.removeEventListener(oldEvt, this.playSoundBound); }
    el.addEventListener(this.data.on, this.playSoundBound);
  }
1037500
function() {

        // Don't continue if the probe portion was what changed.
        var thisMonitor = JSON.stringify(monitor.toMonitorJSON());
        if (thisMonitor === t.priorMonitor) {
          return;
        }

        // Remove the component listeners
        log.info('render.monitorChange', t.logCtxt);
        component.off('change:css change:viewOptions', applyStyles);
        component.off('change:monitor', onMonitorChange, t);

        // Disconnect, then build a fresh component
        t.connectMonitor(false, function(){
          UI.pageView.removeComponent(t.model);
          UI.pageView.addComponent(t.model);
        });
      }
539967
function stopWatchingForValueChange() {
  if (!activeElement) {
    return;
  }

  // delete restores the original property definition
  delete activeElement.value;
  activeElement.detachEvent('onpropertychange', handlePropertyChange);

  activeElement = null;
  activeElementID = null;
  activeElementValue = null;
  activeElementValueProp = null;
}
629794
def _update_mask(self):
        """"""
        self._threshold_mask = self._data > self._theta
        self._threshold_mask_v = self._data > self._theta/np.abs(self._v)
767321
def adjust_interleave(self, interleave):
        """"""
        if interleave == None and self.parent:
            self.interleave = self.parent.interleave
        else:
            self.interleave = interleave