/*
These methods make changes to the state of storage, so audit information
needs to be captured for each
768941
@Override
    public void createSpace(String spaceId) {
        target.createSpace(spaceId);

        String action = AuditTask.ActionType.CREATE_SPACE.name();
        submitWriteTask(action, spaceId, AuditTask.NA, AuditTask.NA,
                        AuditTask.NA, AuditTask.NA, null, null, AuditTask.NA,
                        AuditTask.NA);
    }
449547
def clear(self) -> None:
        
        # these internal records are used as a way to tell the difference between
        # changes that came before and after the clear
        self.record_changeset()
        self._clears_at.add(self.latest_id)
        self.record_changeset()
52919
public void audit(String key, Object... params) {
        Tr.audit(tc, key, params);
    }
1191746
function() {
    const changed_keys = store._changed_keys
    if (changed_keys.length === 0) {
      console.error('no keys were changed, yet we are trying to publish a store change')
      return
    }

    // make sure _changed_keys is reset before executing callbacks
    // (if callbacks modify state, the list of keys the callback changed would be wiped out)
    store._changed_keys = []
    store._clearDebounceTimeout()
    store._callback_objs.forEach(obj => obj.callback(changed_keys))
  }
596587
function() {

		if (this._property_changed_listener && (this._value_container.getValue() != this._property_container)) {

			// currently listening to the parent's old data source
			this._property_changed_listener && this._property_container.removePropertyListener(this._property_changed_listener);
			this._enumerable_changed_listener && this._property_container.removeListener(this._enumerable_changed_listener);
			this._property_changed_listener = null;
			this._enumerable_changed_listener = null;
			this._property_container = null;

		}

		this._queueForRefresh();

	}
698484
function(hdata, handler) {
            if (hdata.changeRecords.length) {
                handler(hdata.changeRecords);
                hdata.changeRecords = [];
            }
        }
14530
private function stateChanged()
    {
        $keys = array_keys($this->values);
        foreach ($keys as $key) {
            if (!count($this->values[$key])) {
                unset($this->values[$key]);
            }
        }
        ksort($this->values);
    }
151789
@SuppressWarnings("UnusedDeclaration")
  public void recordChange( StateEditable change )
  {
    beginUndoAtom();
    try
    {
      StateEdit transaction = new StateEdit( change );
      transaction.end();
      addEdit( transaction );
    }
    finally
    {
      endUndoAtom();
    }
  }
812509
function onFileChanged(event) {
		if(event && event.type === 'Changed' && Array.isArray(event.modified)) {
			//event = {type, files: [{name, location, metadata: {contentType}}]}
			event.modified.forEach(function(file) {
				if(typeof file === 'string') {
					_cache.remove(_getKey(file));
				}
			});
		}
	}
522124
@Override
    public boolean processSecurityChanges(String id) {
        boolean monitorFound = false;
        for (ServiceReference<FileMonitor> fm : fileMonitors.keySet()) {
            String monitorId = (String) fm.getProperty(com.ibm.ws.kernel.filemonitor.FileMonitor.MONITOR_IDENTIFICATION_NAME);
            String monitorConfigId = (String) fm.getProperty(com.ibm.ws.kernel.filemonitor.FileMonitor.MONITOR_KEYSTORE_CONFIG_ID);

            if (monitorId != null && monitorId.equals(com.ibm.ws.kernel.filemonitor.FileMonitor.SECURITY_MONITOR_IDENTIFICATION_VALUE)) {
                if (id == null) {
                    fileMonitors.get(fm).processFileRefresh(false, null);
                } else if (monitorConfigId != null && monitorConfigId.equalsIgnoreCase(id)) {
                    monitorFound = true;
                    fileMonitors.get(fm).processFileRefresh(false, null);//Find the provided id specific keyStore monitor and refresh
                }
            }
        }
        return monitorFound;
    }
1076613
function(storage) {

		this._data_uids = storage.uids;
		this._data_values = storage.values;
		this._data_names = storage.names;

	}
480354
function restore_options() {
  // Use default value showChangeLog = true.
  chrome.storage.sync.get({
    showChangeLog: true
  }, function (items) {
    document.getElementById('show_changelog').checked = items.showChangeLog;
  });
}
896944
protected void updateRecordingManagerCollections(Session session, Recording recording) {
		this.recordingManager.sessionHandler.setRecordingStarted(session.getSessionId(), recording);
		this.recordingManager.sessionsRecordings.put(session.getSessionId(), recording);
		this.recordingManager.startingRecordings.remove(recording.getId());
		this.recordingManager.startedRecordings.put(recording.getId(), recording);
	}
392939
public void applyChanges() {
        final boolean isStatisticsEnabled = cacheRecordStore.cacheConfig.isStatisticsEnabled();
        final CacheStatisticsImpl statistics = cacheRecordStore.statistics;

        switch (state) {
            case ACCESS:
                cacheRecordStore.accessRecord(keyData, record, expiryPolicy, now);
                break;
            case CREATE:
                if (isStatisticsEnabled) {
                    statistics.increaseCachePuts(1);
                    statistics.addGetTimeNanos(System.nanoTime() - start);
                }
                boolean saved =
                        cacheRecordStore.createRecordWithExpiry(keyData, value, expiryPolicy,
                                now, false, completionId) != null;
                onCreate(keyData, value, expiryPolicy, now, false, completionId, saved);
                break;
            case LOAD:
                saved = cacheRecordStore.createRecordWithExpiry(keyData, valueLoaded, expiryPolicy,
                        now, true, completionId) != null;
                onLoad(keyData, valueLoaded, expiryPolicy, now, true, completionId, saved);
                break;
            case UPDATE:
                saved = cacheRecordStore.updateRecordWithExpiry(keyData, value, record,
                        expiryPolicy, now, false, completionId);
                onUpdate(keyData, value, record, expiryPolicy, now, false, completionId, saved);
                if (isStatisticsEnabled) {
                    statistics.increaseCachePuts(1);
                    statistics.addGetTimeNanos(System.nanoTime() - start);
                }
                break;
            case REMOVE:
                boolean removed = cacheRecordStore.remove(keyData, null, null, completionId);
                onRemove(keyData, null, completionId, removed);
                break;
            case NONE:
                cacheRecordStore.publishEvent(
                        CacheEventContextUtil.createCacheCompleteEvent(
                                cacheRecordStore.toEventData(keyData),
                                completionId));
                break;
            default:
                break;
        }
    }
120826
private void updateStatePostSeal() {
        // Update metadata.
        this.metadata.markSealedInStorage();
        this.operations.removeFirst();

        // Validate we have no more unexpected items and then close (as we shouldn't be getting anything else).
        assert this.operations.size() - this.truncateCount.get() == 0 : "there are outstanding non-truncate operations after a Seal";
        this.hasSealPending.set(false);
    }
113617
@Override
  public void recordTaskDescriptionChange(String taskId, String description) {
    if (isHistoryLevelAtLeast(HistoryLevel.AUDIT)) {
      HistoricTaskInstanceEntity historicTaskInstance = getHistoricTaskInstanceEntityManager().findById(taskId);
      if (historicTaskInstance != null) {
        historicTaskInstance.setDescription(description);
      }
    }
  }
831356
function () {
                stateMemory.discarded = [];
                if (this._isIE7OrLess) {
                    stateMemory.states = [stateMemory.states[this._currentPos]];
                    return;
                }
                var states = stateMemory.states;
                var expirationTime = ((new Date()).getTime() - this.EXPIRATION_TIME * 1000) + "";
                for (var i = 0; i < states.length; i++) {
                    if (states[i].id > expirationTime) {
                        break;
                    }
                }
                states.splice(0, i);
            }