Top level routine called when a FW is created.
766581
def create_fw(self, tenant_id, data):
        
        try:
            return self._create_fw(tenant_id, data)
        except Exception as exc:
            LOG.error("Failed to create FW for device native, tenant "
                      "%(tenant)s data %(data)s Exc %(exc)s",
                      {'tenant': tenant_id, 'data': data, 'exc': exc})
            return False
146637
def start_fsweep(self, start=None, stop=None, step=None):
        
        if start:
            self.frequency_start = start
        if stop:
            self.frequency_stop = stop
        if step:
            self.frequency_step = step
        self._write(('SWEEP', Integer), 1)
835010
def create_fw(self, proj_name, pol_id, fw_id, fw_name, fw_type, rtr_id):
        
        self.tenant_name = proj_name
        self.fw_id = fw_id
        self.fw_name = fw_name
        self.fw_created = True
        self.active_pol_id = pol_id
        self.fw_type = fw_type
        self.router_id = rtr_id
600611
@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        italicFont = Typeface.createFromAsset(getActivity().getAssets(), "fonts/Roboto-Italic.ttf");
        regularFont = Typeface.createFromAsset(getActivity().getAssets(), "fonts/Roboto-Regular.ttf");
        boldItalicFont = Typeface.createFromAsset(getActivity().getAssets(), "fonts/Roboto-BoldItalic.ttf");
    }
1099120
public function onBeforeWrite()
    {
        parent::onBeforeWrite();
        
        if (!$this->Status) {
            $this->Status = $this->config()->get("default_status");
        }
    }
741690
public function onBeforeWrite()
    {
        /** @var string $currentLocale */
        $currentLocale = FluentState::singleton()->getLocale();
        if (!$currentLocale) {
            return;
        }

        // If the record is not versioned, force change
        if (!$this->owner->hasExtension(FluentVersionedExtension::class)) {
            $this->owner->forceChange();
            return;
        }

        // Force a change if the record doesn't already exist in the current locale
        if (!$this->owner->existsInLocale($currentLocale)) {
            $this->owner->forceChange();
        }
    }
1351038
protected function onBeforeWrite() {
        parent::onBeforeWrite();
        
        if($this->ID==0) {
            $this->CreatorID=Member::currentUserID();
        }else {
            $this->LastEditorID=Member::currentUserID();
            
            //If the language is changing reset the folder id
            if($this->isChanged('LanguageID')) {
                $this->FolderID=0;
            }
        }
    }
1234900
function(eventName, cpuNumber, pid, ts, eventBase) {
      var event = workqueueExecuteStartRE.exec(eventBase.details);
      if (!event)
        return false;

      var kthread = this.importer.getOrCreateKernelThread(eventBase.threadName,
          pid, pid);
      kthread.openSliceTS = ts;
      kthread.openSlice = event[2];
      return true;
    }
754142
private function preprocess()
    {
        $this->do_action('afw_options_pre_process');
        Notifier::reset();
        State::set('errors', array());
        $this->update();
        $this->do_action('afw_options_post_process');
    }
1024216
void ensurePrestart() {
        int wc = workerCountOf(ctl.get());
        if (wc < corePoolSize)
            addWorker(null, true);
        else if (wc == 0)
            addWorker(null, false);
    }
22706
function callOnce(fn) {
  var called = false

  return calledOnceShim

  //-----------------------------------
  function calledOnceShim() {
    if (called) return
    called = true

    fn.apply(this, arguments)
  }
}
607200
function postprocessProgram(program) {
      var body = program.body;

      if (body.length === 0) {
        return;
      }

      if (usesMorph(body[0])) {
        body.unshift(buildText(''));
      }

      if (usesMorph(body[body.length-1])) {
        body.push(buildText(''));
      }
    }
1315126
public function onBeforeWrite()
    {
        $owner = $this->owner;
        if(!$owner->ID && !$owner->SubsiteID){
            $owner->SubsiteID = Subsite::currentSubsiteID();
        }
        parent::onBeforeWrite();
    }
970504
public function onBeforeWrite() {
		parent::onBeforeWrite();
		if(!$this->isInDb()) {
			$this->_isCreating = true;
			$this->extend('onBeforeCreate');
		}
		if($this->isChanged('MemberID')) {
			$this->extend('onMemberLinked');
		}
	}
1314224
function _make(fn) {
      // the user calls this function, e.g. flw.make.series(...)
      return function madeFunction(fns, context, returnKey) {
        if (typeof context === 'string') {
          returnKey = context; context = {};
        }
        // this function is consumed by flw
        return function flowFunction(context, cb) {
          // when passed from a flw flow it's called with a premade context
          // if called directly, create a new context
          if (cb === undefined && typeof context === 'function') {
            cb = context;
            context = {};
            _checkContext(context);
          }

          if (typeof cb !== 'function') {
            throw new Error('flw: .make - cb !== function');
          }
          return fn(fns, context, returnKey, cb);
        };
      };
    }
977750
def _create_fw_fab_dev(self, tenant_id, drvr_name, fw_dict):
        
        if fw_dict.get('fw_type') == fw_constants.FW_TENANT_EDGE:
            self._create_fw_fab_dev_te(tenant_id, drvr_name, fw_dict)
248834
public void postProcess() {
		if (foreignColumnName != null) {
			foreignAutoRefresh = true;
		}
		if (foreignAutoRefresh && maxForeignAutoRefreshLevel == NO_MAX_FOREIGN_AUTO_REFRESH_LEVEL_SPECIFIED) {
			maxForeignAutoRefreshLevel = DatabaseField.DEFAULT_MAX_FOREIGN_AUTO_REFRESH_LEVEL;
		}
	}