If the AnnotatedInteractions object was saved to a pickle and
        reloaded, this method remakes the BedTool objects.
166168
def load_saved_bts(self):
        """"""
        if self._bt1_path:
            self.bt1 = pbt.BedTool(self._bt1_path)
        if self._bt2_path:
            self.bt2 = pbt.BedTool(self._bt2_path)
        if self._bt_loop_path:
            self.bt_loop = pbt.BedTool(self._bt_loop_path)
        if self._bt_loop_inner_path:
            self.bt_loop_inner = pbt.BedTool(self._bt_loop_inner_path)
940701
protected void remapRows() {
        rowMap = new HashMap<>();
        final FacesContext context = FacesContext.getCurrentInstance();
        final Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
        final Collection<?> values = (Collection<?>) getValue();
        final String var = getVar();
        for (final Object obj : values) {
            requestMap.put(var, obj);
            try {
                final String key = getRowKeyValueAsString(context);
                rowMap.put(key, obj);
            }
            finally {
                requestMap.remove(var);
            }
        }
    }
1262476
public void reloadContexts(boolean keepSelected) {
		Context selected = null;
		if (keepSelected)
			selected = (Context) getSelectedItem();

		List<Context> contexts = Model.getSingleton().getSession().getContexts();
		Context[] contextsArray = contexts.toArray(new Context[contexts.size()]);
		ComboBoxModel<Context> model = new DefaultComboBoxModel<>(contextsArray);
		// No matter what, set selected item, so it either defaults to 'nothing selected' or
		// restores the previously selected item
		model.setSelectedItem(selected);

		this.setModel(model);
	}
500934
def remove_pickle_problems(obj):
    
    if hasattr(obj, "doc_loader"):
        obj.doc_loader = None
    if hasattr(obj, "embedded_tool"):
        obj.embedded_tool = remove_pickle_problems(obj.embedded_tool)
    if hasattr(obj, "steps"):
        obj.steps = [remove_pickle_problems(s) for s in obj.steps]
    return obj
1086594
function(obj){
			var rect = obj._mbr || obj;
			if (obj.staleRect){
				//If overlap, merge stale and current position together, then return
				//Otherwise just push stale rectangle
				if (  rectManager.overlap( obj.staleRect, rect)){
					rectManager.merge(obj.staleRect, rect, obj.staleRect)
					dirty_rects.push(obj.staleRect)
					return
				}
				else{
					dirty_rects.push(obj.staleRect)
				}
			}

			// We use the intermediate "currentRect" so it can be modified without messing with obj
			obj.currentRect._x = rect._x;
			obj.currentRect._y = rect._y;
			obj.currentRect._w = rect._w;
			obj.currentRect._h = rect._h;
			dirty_rects.push(obj.currentRect)
			
		}
363645
function(oldItem, newItem) {
      if(data.operations) {
        for(var i = 0; i < data.operations.length; i++) {
          var operation = data.operations[i];
          if(newItem && newItem[operation.field] !== undefined || oldItem && oldItem[operation.field] !== undefined) {
            opsToolbox[operation.operation].recompute(operations[operation.field], operation, oldItem, newItem);
          }
        }
      }
    }
1081299
def redo(self):
        
        if self.use_slit:
            image = self.fitsimage.get_image()
            if image != self.cuts_image:
                self.cuts_image = image
                self.build_axes()

        self.replot_all()
238600
function(){
			var rect, obj, i;
            for (i=0, l=changed_objs.length; i<l; i++){
            	obj = changed_objs[i];
            	rect = obj._mbr || obj;
            	if (obj.staleRect == null)
            			obj.staleRect = {}
        		obj.staleRect._x = rect._x;
				obj.staleRect._y = rect._y;
				obj.staleRect._w = rect._w;
				obj.staleRect._h = rect._h;

				obj._changed = false
            }
            changed_objs.length = 0;
            dirty_rects.length = 0

		}
828615
def resume(self, obj):
        """"""
        if isinstance(obj, str):
            savefile = open(obj, 'rb')
        else:
            savefile = obj
        game = pickle.loads(zlib.decompress(savefile.read()))
        if savefile is not obj:
            savefile.close()
        # Reinstate the random number generator.
        game.random_generator = random.Random()
        game.random_generator.setstate(game.random_state)
        del game.random_state
        return game
934713
public void redo() {
    if (isListChange()) {
      LOGGER.trace("Redoing list change: " + newList.get().toString());
      setting.valueProperty().setValue(newList.get());
    } else {
      setting.valueProperty().setValue(newValue.get());
    }
  }
1058872
public void update(final ReservoirItemsSketch<T> sketchIn) {
    if (sketchIn == null) {
      return;
    }

    final ReservoirItemsSketch<T> ris =
        (sketchIn.getK() <= maxK_ ? sketchIn : sketchIn.downsampledCopy(maxK_));

    // can modify the sketch if we downsampled, otherwise may need to copy it
    final boolean isModifiable = (sketchIn != ris);
    if (gadget_ == null) {
      createNewGadget(ris, isModifiable);
    } else {
      twoWayMergeInternal(ris, isModifiable);
    }
  }
365994
private void maybeUpdatePicker(ConnectivityState state, RoundRobinPicker picker) {
    // Discard the new picker if we are sure it won't make any difference, in order to save
    // re-processing pending streams, and avoid unnecessary resetting of the pointer in
    // RoundRobinPicker.
    if (picker.dropList.equals(currentPicker.dropList)
        && picker.pickList.equals(currentPicker.pickList)) {
      return;
    }
    currentPicker = picker;
    logger.log(
        ChannelLogLevel.INFO, "{0}: picks={1}, drops={2}", state, picker.pickList, picker.dropList);
    helper.updateBalancingState(state, picker);
  }
861009
def rebuild( self ):
        
        self.setUpdatesEnabled(False)
        
        # sync up the toolbuttons with our actions
        actions = self._actionGroup.actions()
        btns    = self.findChildren(QToolButton)
        horiz   = self.direction() in (QBoxLayout.LeftToRight, 
                                       QBoxLayout.RightToLeft)
        
        # remove unnecessary buttons
        if len(actions) < len(btns):
            rem_btns = btns[len(actions)-1:]
            btns = btns[:len(actions)]
            
            for btn in rem_btns:
                btn.close()
                btn.setParent(None)
                btn.deleteLater()
        
        # create new buttons
        elif len(btns) < len(actions):
            for i in range(len(btns), len(actions)):
                btn = QToolButton(self)
                btn.setAutoFillBackground(True)
                btns.append(btn)
                self.layout().addWidget(btn)
                
                btn.clicked.connect(self.emitClicked)
        
        # determine coloring options
        palette      = self.palette()
        checked      = palette.color(palette.Highlight)
        checked_fg   = palette.color(palette.HighlightedText)
        unchecked    = palette.color(palette.Button)
        unchecked_fg = palette.color(palette.ButtonText)
        border       = palette.color(palette.Mid)
        
        # define the stylesheet options
        options = {}
        options['top_left_radius']      = 0
        options['top_right_radius']     = 0
        options['bot_left_radius']      = 0
        options['bot_right_radius']     = 0
        options['border_color']         = border.name()
        options['checked_fg']           = checked_fg.name()
        options['checked_bg']           = checked.name()
        options['checked_bg_alt']       = checked.darker(120).name()
        options['unchecked_fg']         = unchecked_fg.name()
        options['unchecked_bg']         = unchecked.name()
        options['unchecked_bg_alt']     = unchecked.darker(120).name()
        options['padding_top']          = 1
        options['padding_bottom']       = 1
        options['padding_left']         = 1
        options['padding_right']        = 1
        
        if horiz:
            options['x1'] = 0
            options['y1'] = 0
            options['x2'] = 0
            options['y2'] = 1
        else:
            options['x1'] = 0
            options['y1'] = 0
            options['x2'] = 1
            options['y2'] = 1
        
        # sync up the actions and buttons
        count = len(actions)
        palette = self.palette()
        font = self.font()
        for i, action in enumerate(actions):
            btn = btns[i]
            
            # assign the action for this button
            if btn.defaultAction() != action:
                # clear out any existing actions
                for act in btn.actions():
                    btn.removeAction(act)
                
                # assign the given action
                btn.setDefaultAction(action)
            
            options['top_left_radius']  = 1
            options['bot_left_radius']  = 1
            options['top_right_radius'] = 1
            options['bot_right_radius'] = 1
            
            if horiz:
                options['padding_left']     = self._padding
                options['padding_right']    = self._padding
            else:
                options['padding_top']      = self._padding
                options['padding_bottom']   = self._padding
            
            if not i:
                if horiz:
                    options['top_left_radius'] = self.cornerRadius()
                    options['bot_left_radius'] = self.cornerRadius()
                    options['padding_left']    += self.cornerRadius() / 3.0
                else:
                    options['top_left_radius'] = self.cornerRadius()
                    options['top_right_radius'] = self.cornerRadius()
                    options['padding_top']     += self.cornerRadius() / 3.0
                    
            if i == count - 1:
                if horiz:
                    options['top_right_radius'] = self.cornerRadius()
                    options['bot_right_radius'] = self.cornerRadius()
                    options['padding_right']    += self.cornerRadius() / 3.0
                else:
                    options['bot_left_radius']  = self.cornerRadius()
                    options['bot_right_radius'] = self.cornerRadius()
                    options['padding_bottom']   += self.cornerRadius() / 3.0
            
            btn.setFont(font)
            btn.setPalette(palette)
            btn.setStyleSheet(TOOLBUTTON_STYLE % options)
            if horiz:
                btn.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
            else:
                btn.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Expanding)
        
        self.setUpdatesEnabled(True)
1086345
void hoistExterns(ImmutableList<CompilerInput> originalInputs) {
    boolean staleInputs = false;

    for (CompilerInput input : originalInputs) {
      if (hoistIfExtern(input)) {
        staleInputs = true;
      }
    }
    if (staleInputs) {
      repartitionInputs();
    }
  }
1050614
def _reload(self, object, description, data):
        ''''''
        self._object = object
        self._description = description
        self._data = data
1143245
function (newOptions, redraw) {
            var series = this,
              chart = this.chart,
            // must use user options when changing type because this.options is merged
            // in with type specific plotOptions
              oldOptions = this.userOptions,
              oldType = this.type,
              proto = seriesTypes[oldType].prototype,
              preserve = ['group', 'markerGroup', 'dataLabelsGroup'],
              n;

            // Make sure groups are not destroyed (#3094)
            each(preserve, function (prop) {
                preserve[prop] = series[prop];
                delete series[prop];
            });

            // Do the merge, with some forced options
            newOptions = merge(oldOptions, {
                animation: false,
                index: this.index,
                pointStart: this.xData[0] // when updating after addPoint
            }, { data: this.options.data }, newOptions);

            // Destroy the series and reinsert methods from the type prototype
            this.remove(false);
            for (n in proto) { // Overwrite series-type specific methods (#2270)
                if (proto.hasOwnProperty(n)) {
                    this[n] = UNDEFINED;
                }
            }
            extend(this, seriesTypes[newOptions.type || oldType].prototype);

            // Re-register groups (#3094)
            each(preserve, function (prop) {
                series[prop] = preserve[prop];
            });


            this.init(chart, newOptions);
            chart.linkSeries(); // Links are lost in this.remove (#3028)
            if (pick(redraw, true)) {
                chart.redraw(false);
            }
        }
734783
public void resetThreadContextLoader() {
        if (LoaderUtils.isContextLoaderAvailable() && isContextLoaderSaved) {
            LoaderUtils.setContextClassLoader(savedContextLoader);
            savedContextLoader = null;
            isContextLoaderSaved = false;
        }
    }