Should Croquet enable the stateless checker? Defaults to follow dev vs deploy.
@return true if the stateless checker should be enabled
556755
public Boolean getStatelessChecker() {
        if(getDevelopment()) {
            return statelessChecker != null ? statelessChecker : true;
        } else {
            return statelessChecker != null ? statelessChecker : false;
        }
    }
373031
def enable_vuln_check(check_id)
      checks = REXML::XPath.first(@xml, '//VulnerabilityChecks')
      checks.elements.delete("Disabled/Check[@id='#{check_id}']")
      enabled_checks = checks.elements['Enabled'] || checks.add_element('Enabled')
      enabled_checks.add_element('Check', { 'id' => check_id })
    end
714091
protected function checkLessonsMigrationState()
    {
        $this->output->info('# Checkin lessons migration state... #');

        switch ($this->checkLessonMigrationStats()) {
            case 0:
                return true;
            case 1:
                $this->output->error(' Migration stats does not match!');
                if ($this->output->confirm('Do you wish to continue (lesson_migration and scool lesson tables will be truncated)?')) {
                    DB::connection('ebre_escool')->statement('DELETE FROM lesson_migration');
                    DB::connection('ebre_escool')->statement('ALTER TABLE lesson_migration AUTO_INCREMENT = 1');
                    DB::statement('DELETE FROM lessons');
                    DB::statement('ALTER TABLE lessons AUTO_INCREMENT = 1');
                    DB::statement('DELETE FROM lesson_user');
                    DB::statement('ALTER TABLE lesson_user AUTO_INCREMENT = 1');
                    DB::statement('DELETE FROM lesson_submodule');
                    DB::statement('ALTER TABLE lesson_submodule AUTO_INCREMENT = 1');
                    DB::statement('DELETE FROM classroom_submodule');
                    DB::statement('ALTER TABLE classroom_submodule AUTO_INCREMENT = 1');
                } else {
                    die();
                }
                return true;
            case 2:
                $this->output->info(' Lesson data seems already migrated. Skipping lessons migration...');
                return false;
        }
    }
912580
def is_enabled(self):
        
        if self.name in settings.exclude_rules:
            return False
        elif self.name in settings.rules:
            return True
        elif self.enabled_by_default and ALL_ENABLED in settings.rules:
            return True
        else:
            return False
3342
public boolean checkWrite()
    {
        if (!outActive || state != State.ACTIVE) {
            return false;
        }

        // TODO DIFF V4 small change, it is done like this in 4.2.2
        boolean full = !checkHwm();

        if (full) {
            outActive = false;
            return false;
        }

        return true;
    }
732995
@SubscribeEvent
    public void onCheckSpawn(CheckSpawn cs)
    {
        // Decide whether or not to allow spawning.
        // We shouldn't allow spawning unless it has been specifically turned on - whether
        // a mission is running or not. (Otherwise spawning may happen in between missions.)
        boolean allowSpawning = false;
        if (currentMissionInit() != null && currentMissionInit().getMission() != null)
        {
            // There is a mission running - does it allow spawning?
            ServerSection ss = currentMissionInit().getMission().getServerSection();
            ServerInitialConditions sic = (ss != null) ? ss.getServerInitialConditions() : null;
            if (sic != null)
                allowSpawning = (sic.isAllowSpawning() == Boolean.TRUE);

            if (allowSpawning && sic.getAllowedMobs() != null && !sic.getAllowedMobs().isEmpty())
            {
                // Spawning is allowed, but restricted to our list.
                // Is this mob on our list?
                String mobName = EntityList.getEntityString(cs.getEntity());
                allowSpawning = false;
                for (EntityTypes mob : sic.getAllowedMobs())
                {
                    if (mob.value().equals(mobName))
                    {
                        allowSpawning = true;
                        break;
                    }
                }
            }
        }
        if (allowSpawning)
            cs.setResult(Result.DEFAULT);
        else
            cs.setResult(Result.DENY);
    }
283397
@Override
    public boolean isTopicAccessCheckRequired()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "isTopicAccessCheckRequired");

        if (!isPubSub() || isTemporary())
        {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(tc, "isTopicAccessCheckRequired", Boolean.FALSE);
            return false;
        }

        boolean check = super.isTopicAccessCheckRequired();

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "isTopicAccessCheckRequired", Boolean.valueOf(check));
        return check;
        // Look to the underlying definition
    }
865087
public boolean isEnabledForCurrentJRE() {
        if ("".equals(requireJRE)) {
            return true;
        }
        try {
            JavaVersion requiredVersion = new JavaVersion(requireJRE);
            JavaVersion runtimeVersion = JavaVersion.getRuntimeVersion();

            if (DEBUG_JAVA_VERSION) {
                System.out.println("Checking JRE version for " + getShortName() + " (requires " + requiredVersion
                        + ", running on " + runtimeVersion + ")");
            }

            boolean enabledForCurrentJRE = runtimeVersion.isSameOrNewerThan(requiredVersion);
            if (DEBUG_JAVA_VERSION) {
                System.out.println("\t==> " + enabledForCurrentJRE);
            }
            return enabledForCurrentJRE;
        } catch (JavaVersionException e) {
            if (DEBUG_JAVA_VERSION) {
                System.out.println("Couldn't check Java version: " + e.toString());
                e.printStackTrace(System.out);
            }
            return false;
        }
    }
243840
public static boolean runHeadless() {
        String headless = getProgramProperty(HEADLESS);
        if (headless == null) {
            return false;
        }
        if ("".equals(headless)) {
            return true;
        }
        return "true".equalsIgnoreCase(headless);
    }
225674
public boolean isEnabled()
    {
        if ((this.getMasterSlaveFlag() & FileListener.RUN_IN_SLAVE) == 0) // Is NOT enabled in a SERVER only environment
            if (this.getOwner() != null)
                if ((this.getOwner().getMasterSlave() & RecordOwner.MASTER) == 0) // Is not a client environment
            return false;   // Don't run this listener in a server-only environment
        if ((this.getMasterSlaveFlag() & FileListener.RUN_IN_MASTER) == 0) // Is NOT enabled in a CLIENT only environment
            if (this.getOwner() != null)
                if ((this.getOwner().getMasterSlave() & RecordOwner.SLAVE) == 0) // Is not a server environment
            return false;   // Don't run this listener in a client-only environment
        return super.isEnabled();
    }
408906
private boolean preCheckClusterState(ClusterService clusterService) {
        ClusterState initialState = clusterService.getClusterState();
        if (!initialState.isJoinAllowed()) {
            logger.warning("Could not prepare cluster state since it has been changed to " + initialState);
            return false;
        }

        return true;
    }
131590
protected function determine() {
		$this->checkPlatform();
		$this->checkBrowsers();
		$this->checkForAol();
		$this->reduceVersion(); //modified for compatibility
		$this->checkPlatformVersion();	//add BugBuster
	}
605421
public static function isEnabled()
    {
        if (!self::$_checkedEnabled) {
            self::$_checkedEnabled = true;

            $conf = self::getConfiguration();

            $enabled = false;
            if (strtolower($conf->trigger) == 'always') {
                $enabled = true;
            } elseif (strtolower($conf->trigger) == 'parameter') {
                if ((isset($_GET['profile']) && $_GET['profile'] == true) || (isset($_COOKIE['profile']) && $_COOKIE['profile'] == true)) {
                    $enabled = true;
                }
            }

            // Process filters
            if ($enabled && $conf->enableFilters) {

                // sampling filter
                if ($enabled && rand(0,100000) > $conf->filters->sampling * 1000) {
                    $enabled = false;
                }

                // request uri whitelist/blacklist
                $requestUri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; // TODO: use script name instead for cli?
                if ($enabled && $conf->filters->requestUriWhiteList && !preg_match($conf->filters->requestUriWhiteList, $requestUri)) {
                    $enabled = false;
                }
                if ($enabled && $conf->filters->requestUriBlackList && preg_match($conf->filters->requestUriBlackList, $requestUri)) {
                    $enabled = false;
                }

                // note: timeThreshold and memoryThreshold will be checked before persisting records. In these cases data will still be recorded during the request
            }

            if ($enabled) {
                self::enable();
            }
        }
        return self::$_enabled;
    }
986681
protected function checkSettings()
    {
        $io = $this->event->getIO();

        if ($this->disabled) {
            $io->write('<info>[C33sConstructionKitBundle] C33sConstructionKit is disabled</info>');

            return false;
        }

        if (!is_dir($this->appDir)) {
            $currentDir = getcwd();
            $io->write("<warning>[C33sConstructionKitBundle] The symfony-app-dir {$this->appDir} specified in composer.json was not found in {$currentDir}. Cannot generate building blocks file.</warning>");

            return false;
        }

        return true;
    }
628465
private static boolean checkMethodDispatcher(ClassResourceInfo cr) {
        if (cr.getMethodDispatcher().getOperationResourceInfos().isEmpty()) {
            LOG.warning(new org.apache.cxf.common.i18n.Message("NO_RESOURCE_OP_EXC",
                                                               BUNDLE,
                                                               cr.getServiceClass().getName()).toString());
            return false;
        }
        return true;
    }
1113638
@Override
	public boolean isStateful(JobKey jobKey) throws SchedulerException {
		Class<?> jobClazz = scheduler.getJobDetail(jobKey).getJobClass();
		DisallowConcurrentExecution annotation1 = jobClazz.getAnnotation(DisallowConcurrentExecution.class);
		PersistJobDataAfterExecution annotation2 = jobClazz.getAnnotation(PersistJobDataAfterExecution.class);
		return StatefulJob.class.isAssignableFrom(jobClazz) || null != annotation1 || null != annotation2;
	}
656032
private boolean performStateCheck(final int increment) {
        CheckIntervalData currentData;
        CheckIntervalData nextData;
        State currentState;

        do {
            final long time = now();
            currentState = state.get();
            currentData = checkIntervalData.get();
            nextData = nextCheckIntervalData(increment, currentData, currentState, time);
        } while (!updateCheckIntervalData(currentData, nextData));

        // This might cause a race condition if other changes happen in between!
        // Refer to the header comment!
        if (stateStrategy(currentState).isStateTransition(this, currentData, nextData)) {
            currentState = currentState.oppositeState();
            changeStateAndStartNewCheckInterval(currentState);
        }
        return !isOpen(currentState);
    }