/* (non-Javadoc)
@see de.chandre.admintool.quartz.AdminToolQuartzService#isPrevGoupNotEq(java.lang.String)
497858
@Override
	public boolean isPrevGoupNotEq(String actualGroup) {
		if (LOGGER.isTraceEnabled()) LOGGER.trace(String.format("check group prev: %s, act: %s", this.prevGroup, actualGroup));
		return StringUtils.isEmpty(this.prevGroup) || !actualGroup.equals(this.prevGroup);
	}
1159225
public boolean usePrimaryMsg(long msgId, long fallbackId) {
    // Note: we need to make sure the fallback msg is actually present if we are going to fallback.
    // use getMsgParts() since if the bundle is a RenderOnlySoyMsgBundleImpl then this will be
    // allocation free.
    return !msgBundle.getMsgParts(msgId).isEmpty() || msgBundle.getMsgParts(fallbackId).isEmpty();
  }
469279
@SuppressWarnings("unchecked")
    @Override
    public <T> T beforeServiceInvoke(T serviceObject, boolean isSingleton,
                                     Object context) {
        if (isSingleton || context == null) {
            return serviceObject;
        }

        Map<Class<?>, ManagedObject<?>> newContext = (Map<Class<?>, ManagedObject<?>>) (context);
        if (newContext.isEmpty()) {
            return null;
        }

        Object newServiceObject = null;

        newServiceObject = getInstanceFromManagedObject(serviceObject, context);

        return (T) newServiceObject;

    }
1224679
private static String getPreDefOuFqn(CmsObject cms, HttpServletRequest request, boolean logout) {

        if (logout && (request.getAttribute(PARAM_PREDEF_OUFQN) == null)) {
            String oufqn = cms.getRequestContext().getOuFqn();
            if (!oufqn.startsWith(CmsOrganizationalUnit.SEPARATOR)) {
                oufqn = CmsOrganizationalUnit.SEPARATOR + oufqn;
            }
            request.setAttribute(CmsLoginHelper.PARAM_PREDEF_OUFQN, oufqn);
        }
        return (String)request.getAttribute(PARAM_PREDEF_OUFQN);
    }
815931
private boolean lookJVMBug(long before, int selected, long wait) throws IOException {
    boolean seeing = false;
    long now = System.currentTimeMillis();

    if (JVMBUG_THRESHHOLD > 0 && selected == 0 && wait > JVMBUG_THRESHHOLD
        && now - before < wait / 4 && !wakenUp.get() /* waken up */
        && !Thread.currentThread().isInterrupted()/* Interrupted */) {
      jvmBug.incrementAndGet();
      if (jvmBug.get() >= JVMBUG_THRESHHOLD2) {
        gate.lock();
        try {
          lastJVMBug = now;
          log.warn("JVM bug occured at " + new Date(lastJVMBug)
              + ",http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6403933,reactIndex="
              + reactorIndex);
          if (jvmBug1) {
            log.debug("seeing JVM BUG(s) - recreating selector,reactIndex=" + reactorIndex);
          } else {
            jvmBug1 = true;
            log.info("seeing JVM BUG(s) - recreating selector,reactIndex=" + reactorIndex);
          }
          seeing = true;
          final Selector new_selector = SystemUtils.openSelector();

          for (SelectionKey k : selector.keys()) {
            if (!k.isValid() || k.interestOps() == 0) {
              continue;
            }

            final SelectableChannel channel = k.channel();
            final Object attachment = k.attachment();

            channel.register(new_selector, k.interestOps(), attachment);
          }

          selector.close();
          selector = new_selector;

        } finally {
          gate.unlock();
        }
        jvmBug.set(0);

      } else if (jvmBug.get() == JVMBUG_THRESHHOLD || jvmBug.get() == JVMBUG_THRESHHOLD1) {
        if (jvmBug0) {
          log.debug("seeing JVM BUG(s) - cancelling interestOps==0,reactIndex=" + reactorIndex);
        } else {
          jvmBug0 = true;
          log.info("seeing JVM BUG(s) - cancelling interestOps==0,reactIndex=" + reactorIndex);
        }
        gate.lock();
        seeing = true;
        try {
          for (SelectionKey k : selector.keys()) {
            if (k.isValid() && k.interestOps() == 0) {
              k.cancel();
            }
          }
        } finally {
          gate.unlock();
        }
      }
    } else {
      jvmBug.set(0);
    }
    return seeing;
  }
216688
private boolean askBeforeExit(SwingFrame navigationFrameView) {
		if (Configuration.isDevModeActive()) {
			return true;
		} else {
			int answer = JOptionPane.showConfirmDialog(navigationFrameView, Resources.getString("Exit.confirm"), Resources.getString("Exit.confirm.title"), JOptionPane.YES_NO_OPTION);
			return answer == JOptionPane.YES_OPTION;
		}
	}
491550
def pre_operations(self, mode=None):
        
        version_mode = self._get_version_mode(mode=mode)
        return version_mode.pre_operations
1336522
@Override
	public boolean preVisit(Operator<?> node) {
		// check if node was already visited
		if (!this.visitedNodes.add(node)) {
			return false;
		}

		// apply the appropriate check method
		if (node instanceof FileDataSinkBase) {
			checkFileDataSink((FileDataSinkBase<?>) node);
		} else if (node instanceof FileDataSourceBase) {
			checkFileDataSource((FileDataSourceBase<?>) node);
		} else if (node instanceof GenericDataSinkBase) {
			checkDataSink((GenericDataSinkBase<?>) node);
		} else if (node instanceof BulkIterationBase) {
			checkBulkIteration((BulkIterationBase<?>) node);
		} else if (node instanceof SingleInputOperator) {
			checkSingleInputContract((SingleInputOperator<?, ?, ?>) node);
		} else if (node instanceof DualInputOperator<?, ?, ?, ?>) {
			checkDualInputContract((DualInputOperator<?, ?, ?, ?>) node);
		}
		if(node instanceof Validatable) {
			((Validatable) node).check();
		}
		return true;
	}
1172696
protected String getPreDefOuFqn() {

        if (Boolean.valueOf(m_actionLogout).booleanValue() && (getRequest().getAttribute(PARAM_PREDEF_OUFQN) == null)) {
            String oufqn = getCmsObject().getRequestContext().getOuFqn();
            if (!oufqn.startsWith(CmsOrganizationalUnit.SEPARATOR)) {
                oufqn = CmsOrganizationalUnit.SEPARATOR + oufqn;
            }
            getRequest().setAttribute(CmsLogin.PARAM_PREDEF_OUFQN, oufqn);
        }
        return (String)getRequest().getAttribute(PARAM_PREDEF_OUFQN);
    }
322468
@Override
    public boolean onPrepareOptionsMenu(Menu menu) {

        if(layout.isDrawerOpen(drawer) && !deviceSupportMultiPane()) {
            menu.clear();
        }

        return super.onPrepareOptionsMenu(menu);
    }
814411
def is_catchup_needed_during_view_change(self) -> bool:
        
        if self.caught_up_for_current_view():
            logger.info('{} is caught up for the current view {}'.format(self, self.viewNo))
            return False
        logger.info('{} is not caught up for the current view {}'.format(self, self.viewNo))

        if self.num_txns_caught_up_in_last_catchup() == 0:
            if self.has_ordered_till_last_prepared_certificate():
                logger.info('{} ordered till last prepared certificate'.format(self))
                return False

        if self.is_catch_up_limit(self.config.MIN_TIMEOUT_CATCHUPS_DONE_DURING_VIEW_CHANGE):
            # No more 3PC messages will be processed since maximum catchup
            # rounds have been done
            self.master_replica.last_prepared_before_view_change = None
            return False

        return True
387058
public boolean isBefore(T element) {
    if (element == null) { return false; }
    return comparator.compare(element, max) > 0;
  }
821435
boolean prefetchGAdsParams(Context context, GAdsParamsFetchEvents callback) {
        boolean isPrefetchStarted = false;
        if (TextUtils.isEmpty(GAIDString_)) {
            isPrefetchStarted = true;
            new GAdsPrefetchTask(context, callback).executeTask();
        }
        return isPrefetchStarted;
    }
1143652
protected AppendResponse checkPreviousEntry(AppendRequest request) {
    if (request.logIndex() != 0 && context.getLog().isEmpty()) {
      LOGGER.debug("{} - Rejected {}: Previous index ({}) is greater than the local log's last index ({})", context.getCluster().member().address(), request, request.logIndex(), context.getLog().lastIndex());
      return AppendResponse.builder()
        .withStatus(Response.Status.OK)
        .withTerm(context.getTerm())
        .withSucceeded(false)
        .withLogIndex(context.getLog().lastIndex())
        .build();
    } else if (request.logIndex() != 0 && context.getLog().lastIndex() != 0 && request.logIndex() > context.getLog().lastIndex()) {
      LOGGER.debug("{} - Rejected {}: Previous index ({}) is greater than the local log's last index ({})", context.getCluster().member().address(), request, request.logIndex(), context.getLog().lastIndex());
      return AppendResponse.builder()
        .withStatus(Response.Status.OK)
        .withTerm(context.getTerm())
        .withSucceeded(false)
        .withLogIndex(context.getLog().lastIndex())
        .build();
    }
    return appendEntries(request);
  }
373858
public static void ge_precomp_0(ge_precomp h)
{
  fe_1.fe_1(h.yplusx);
  fe_1.fe_1(h.yminusx);
  fe_0.fe_0(h.xy2d);
}
306697
private void doInterceptBeforeQuery(Class<?> clazz, StringBuilder sql, List<Object> args) {
        for (DBHelperInterceptor interceptor : interceptors) {
            boolean isContinue = interceptor.beforeSelect(clazz, sql.toString(), args);
            if (!isContinue) {
                throw new NotAllowQueryException("interceptor class:" + interceptor.getClass());
            }
        }
    }
87282
private boolean areNoneToLoadBefore(GrailsPlugin plugin) {
        for (String name : plugin.getLoadAfterNames()) {
            if (getGrailsPlugin(name) == null) {
                return false;
            }
        }
        return true;
    }