The first found LoginDecarator, there can only be one.
@return the first found {@link SimplePageDecorator}
2976
public static SimplePageDecorator first(){
        List<SimplePageDecorator> decorators = all();
        return decorators.isEmpty() ? null : decorators.get(0);
    }
1290620
private static LoggingProvider loadLoggingProvider() {
		ServiceLoader<LoggingProvider> loader = new ServiceLoader<LoggingProvider>(LoggingProvider.class);
		String name = Configuration.get(PROVIDER_PROPERTY);

		if (name == null) {
			Collection<LoggingProvider> providers = loader.createAll();
			switch (providers.size()) {
				case 0:
					InternalLogger.log(Level.WARN, "No logging framework implementation found in classpath."
						+ " Add tinylog-impl.jar for outputting log entries.");
					return new NopLoggingProvider();
				case 1:
					return providers.iterator().next();
				default:
					return new BundleLoggingProvider(providers);
			}
		} else if (NOP_PROVIDER_NAME.equalsIgnoreCase(name)) {
			return new NopLoggingProvider();
		} else {
			LoggingProvider provider = loader.create(name);
			if (provider == null) {
				InternalLogger.log(Level.ERROR, "Requested logging provider is not available. Logging will be disabled.");
				return new NopLoggingProvider();
			} else {
				return provider;
			}
		}
	}
1230293
private int getCurrentPageStartRow() {
		int startRow = 0;

		if (getPaginationMode() != PaginationMode.NONE) {
			int rowsPerPage = getRowsPerPage();
			TableDataModel model = getDataModel();

			if (model instanceof TreeTableDataModel) {
				// For tree tables, pagination only occurs on first-level nodes (ie. those
				// underneath the root node), however they might not be consecutively
				// numbered. Therefore, the start and end row indices need to be adjusted.
				TreeTableDataModel treeModel = (TreeTableDataModel) model;
				TreeNode root = treeModel.getNodeAtLine(0).getRoot();

				int startNode = getCurrentPage() * rowsPerPage;
				startRow = ((TableTreeNode) root.getChildAt(startNode)).getRowIndex() - 1; // -1 as the root is not included in the table
			} else {
				startRow = getCurrentPage() * rowsPerPage;
			}
		}

		return startRow;
	}
610070
public ObjectProperty<Logger> loggerProperty() {
		if (this.logger == null) {
			this.logger = new SimpleObjectProperty<Logger>(this, LOGGER_PROPERTY, Logger.getLogger(getClass().getName())) {
				@Override
				protected void invalidated() {
					final Logger log = get();
					if (log == null) {
						set(Logger.getLogger(getClass().getName()));
					}
				}
			};
		}
		return this.logger;
	}
39253
public T first() {
        Iterator<T> iterator = iterator();
        return (iterator.hasNext() ? iterator.next() : null);
    }
461318
public static LogManagementPlugin getLogManagementPlugin() {
		final String loggerImpl = org.slf4j.impl.StaticLoggerBinder
				.getSingleton().getLoggerFactoryClassStr();
		if ("Log4jLoggerFactory﻿".equals(loggerImpl.substring(loggerImpl
						.lastIndexOf(".") + 1))) {
			return new LogManagementPluginLog4jImpl();
		} else if (loggerImpl.indexOf("logback.") > 1
				&& "ContextSelectorStaticBinder".equals(loggerImpl
						.substring(loggerImpl.lastIndexOf(".") + 1))) {
			return new LogManagementPluginLogbackImpl();
		}
		throw new UnsupportedOperationException();
	}
541614
public LogIterator getIterator() {
        Set<Entry<LogKey, LogValue>> entries = mCache.asMap().entrySet();
        for (Entry<LogKey, LogValue> entry : entries) {
            insertIntoBDB(entry.getKey(), entry.getValue());
        }

        return new LogIterator();
    }
632118
@Override
  public LogIterator getIterator(Zxid zxid) throws IOException {
    SimpleLogIterator iter = new SimpleLogIterator(this.logFile);
    while(iter.hasNext()) {
      Transaction txn = iter.next();
      if(txn.getZxid().compareTo(zxid) >= 0) {
        iter.backward();
        break;
      }
    }
    return iter;
  }
25187
public Tree<T> findPreOrderNext(){
        if( hasChildren() ){
            return getFirstChild();
        }
        if( hasNext() ){
            return getNext();
        }
        Tree<T> parent = getParent();
        while( parent != null ){
            if( parent.hasNext() ){
                return parent.getNext();
            }
            parent = parent.getParent();
        }
        return null;
    }
107826
public static ClasspathScanner getInstance() {

    if (instance == null) {
      synchronized (AbstractClasspathScanner.class) {
        if (instance == null) {
          ClasspathScannerImpl impl = new ClasspathScannerImpl();
          impl.initialize();
        }
      }
    }
    return instance;
  }
246934
public IndexerIoModeHandler getModeHandler()
   {
      if (modeHandler == null)
      {

         if (ctx.getCache().getStatus() != ComponentStatus.RUNNING)
         {
            throw new IllegalStateException("The cache should be started first");
         }
         synchronized (this)
         {
            if (modeHandler == null)
            {
               this.modeHandler =
                  new IndexerIoModeHandler(cacheManager.isCoordinator()
                     || ctx.getCache().getAdvancedCache().getRpcManager() == null ? IndexerIoMode.READ_WRITE
                     : IndexerIoMode.READ_ONLY);
            }
         }
      }
      return modeHandler;
   }
242803
@SuppressWarnings("unchecked")
  private void getConstructor() {
    Class<? extends Logger> c = DefaultLogger.class;
    String className = System.getProperty("net.spy.log.LoggerImpl");

    if (className != null) {
      try {
        c = (Class<? extends Logger>) Class.forName(className);
      } catch (NoClassDefFoundError e) {
        System.err.println("Warning:  " + className
            + " not found while initializing"
            + " net.spy.compat.log.LoggerFactory");
        e.printStackTrace();
        c = DefaultLogger.class;
      } catch (ClassNotFoundException e) {
        System.err.println("Warning:  " + className
            + " not found while initializing"
            + " net.spy.compat.log.LoggerFactory");
        e.printStackTrace();
        c = DefaultLogger.class;
      }
    }

    // Find the best constructor
    try {
      // Try to find a constructor that takes a single string
      Class<?>[] args = { String.class };
      instanceConstructor = c.getConstructor(args);
    } catch (NoSuchMethodException e) {
      try {
        // Try to find an empty constructor
        Class<?>[] args = {};
        instanceConstructor = c.getConstructor(args);
      } catch (NoSuchMethodException e2) {
        System.err.println("Warning:  " + className
            + " has no appropriate constructor, using defaults.");

        // Try to find a constructor that takes a single string
        try {
          Class<?>[] args = { String.class };
          instanceConstructor = DefaultLogger.class.getConstructor(args);
        } catch (NoSuchMethodException e3) {
          // This shouldn't happen.
          throw new NoSuchMethodError("There used to be a constructor that "
              + "takes a single String on " + DefaultLogger.class + ", but I "
              + "can't find one now.");
        } // SOL
      } // No empty constructor
    } // No constructor that takes a string
  }
672259
public static <T> T getFirst(Iterator<T> iterator) {
		if (null != iterator && iterator.hasNext()) {
			return iterator.next();
		}
		return null;
	}
491212
protected Iterator<RepositoryLogRecord> getNewIterator(int offset, int length) {
		OnePidRecordListImpl logResult = getLogResult();
		OnePidRecordListImpl traceResult = getTraceResult();
		if (logResult == null && traceResult == null) {
			return EMPTY_ITERATOR;
		} else if (traceResult == null) {
			return logResult.getNewIterator(offset, length);
		} else if (logResult == null) {
			return traceResult.getNewIterator(offset, length);
		} else {
			MergedServerInstanceLogRecordIterator result = new MergedServerInstanceLogRecordIterator(logResult, traceResult);
			result.setRange(offset, length);
			return result;
		}
	}
901967
public static AnnotatorCache getInstance() {
      if (INSTANCE == null) {
         synchronized (AnnotatorCache.class) {
            if (INSTANCE == null) {
               INSTANCE = new AnnotatorCache();
            }
         }
      }
      return INSTANCE;
   }
948823
public static IAuditManager getInstance() {
        IAuditManager result = auditManager;
        if(result == null) {
            synchronized (AuditManager.class) {
                result = auditManager;
                if(result == null) {
                    Context.init();
                    auditManager = result = new AuditManager();
                }
            }
        }
        return result;
    }
219334
public IntIterator getIntIterator() {
		return new IntIterator() {
			int wordindex;
			int i = 0;
			IntArray buf;
			int currentword;

			public IntIterator init(IntArray b) {
				this.buf = b;
				this.wordindex = this.buf.get(this.i);
				this.currentword = this.buf.get(this.i + 1);
				return this;
			}

			@Override
			public boolean hasNext() {
				return this.currentword != 0;
			}

			@Override
			public int next() {
				final int offset = Integer
						.numberOfTrailingZeros(this.currentword);
				this.currentword ^= 1 << offset;
				final int answer = this.wordindex * WORDSIZE + offset;
				if (this.currentword == 0) {
					this.i += 2;
					if (this.i < this.buf.size()) {
						this.currentword = this.buf.get(this.i + 1);
						this.wordindex += this.buf.get(this.i) + 1;
					}
				}
				return answer;
			}

		}.init(this.buffer);
	}