Find the closest WApplication instance.

@return the closest WApplication instance
1163
private WApplication findApplication() {
		WApplication appl = WApplication.instance(this);

		if (appl == null) {
			messages.addMessage(new Message(Message.WARNING_MESSAGE,
					"There is no WApplication available for this example."));
		}

		return appl;
	}
718646
private Matching getMatchingInstance()
  {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
          SibTr.entry(tc, "getMatchingInstance", Boolean.valueOf(unitTestMode));
        Matching result = null;
        if (unitTestMode)
        {
          // In unit test mode, go directly to Matching to get an instance.
          // This avoids the need for MessageProcessor to be initialised.
          try
          {
        result = Matching.getInstance();
          }
          catch(Exception e)
          {
                // No FFDC code needed.
                // This path is possible only in unit test
          }
        }
        else
        {
          result = (Matching) MessageProcessor.getSingletonInstance(
                SIMPConstants.MATCHING_INSTANCE);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
          SibTr.exit(tc, "getMatchingInstance", result);
        return result;
  }
710860
public BaseListener getNextEnabledListener()
    {
        if (m_nextListener == null)
            return null;
        if (m_nextListener.isEnabled())
            return m_nextListener;
        else
            return m_nextListener.getNextEnabledListener();
    }
995053
public java.util.List<String> getInstancesList() {
        if (instancesList == null) {
            instancesList = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return instancesList;
    }
1251510
public BaseDestinationHandler getDestination()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.entry(tc, "getDestination");
      SibTr.exit(tc, "getDestination", _baseDestHandler);
    }

    return _baseDestHandler;
  }
1334220
public Throwable getMostSpecificCause()
    {
        Throwable rootCause = null;
        Throwable cause = getCause();
        while (cause != null  &&  cause != rootCause) {
            rootCause = cause;
            cause = cause.getCause();
        }

        return (rootCause == null ? this : rootCause);
    }
452037
public static NoProxyPortSelector getInstance()
    {
        if( _instance == null )
        {
            synchronized( NoProxyPortSelector.class )
            {
                if( _instance == null )
                {
                    _instance = new NoProxyPortSelector();
                }
            }
        }

        return _instance;
    }
47735
public synchronized VNFFGAgent getVNFFGAgent() {
    if (this.vnffgAgent == null) {
      if (isService) {
        this.vnffgAgent =
            new VNFFGAgent(
                this.serviceName,
                this.projectId,
                this.sslEnabled,
                this.nfvoIp,
                this.nfvoPort,
                this.version,
                this.serviceKey);
      } else {
        this.vnffgAgent =
            new VNFFGAgent(
                this.username,
                this.password,
                this.projectId,
                this.sslEnabled,
                this.nfvoIp,
                this.nfvoPort,
                this.version);
      }
    }
    return this.vnffgAgent;
  }
1056954
public java.util.List<PropagatingVgw> getPropagatingVgws() {
        if (propagatingVgws == null) {
            propagatingVgws = new com.amazonaws.internal.SdkInternalList<PropagatingVgw>();
        }
        return propagatingVgws;
    }
266185
public SIMPIterator getRemoteBrowserReceiverIterator()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getRemoteBrowserReceiverIterator");
    
    AnycastOutputHandler aoh = destinationHandler.getAnycastOutputHandler();
    
    // Get the hashtable of all the browserSessions that are currently active
    Hashtable tableOfBrowserSessions = aoh.getBrowserSessions();
    
    // Get all the keys (AOBrowserSessionKey) that are contained in the table
    Set keySet = tableOfBrowserSessions.keySet();
    
    // Create our new list which we will passed to the RemoteBrowserIterator 
    List<AOBrowserSession> listOfBrowserSessions = new ArrayList<AOBrowserSession>();
    
    // For all the keys in the table
    for (Iterator iter = keySet.iterator(); iter.hasNext();)
    {
      // Get the first key
      AOBrowserSessionKey browserSessionKey = (AOBrowserSessionKey) iter.next();
      // Get the AOBrowserSession for this key
      AOBrowserSession aoBrowserSession = (AOBrowserSession) tableOfBrowserSessions.get(browserSessionKey);
      // Add the session to our new list
      listOfBrowserSessions.add(aoBrowserSession);
    }
    
    RemoteBrowserIterator remoteBrowserIterator = new RemoteBrowserIterator(listOfBrowserSessions.iterator());
          
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getRemoteBrowserReceiverIterator", remoteBrowserIterator);
    return remoteBrowserIterator;
  }
931107
public static IPath getGlobalSARLOutputPath() {
		final Injector injector = LangActivator.getInstance().getInjector(LangActivator.IO_SARL_LANG_SARL);
		final IOutputConfigurationProvider configurationProvider =
				injector.getInstance(IOutputConfigurationProvider.class);
		final OutputConfiguration config = Iterables.find(
				configurationProvider.getOutputConfigurations(),
				it -> Objects.equals(it.getName(), IFileSystemAccess.DEFAULT_OUTPUT));
		if (config != null) {
			final String path = config.getOutputDirectory();
			if (!Strings.isNullOrEmpty(path)) {
				final IPath pathObject = Path.fromOSString(path);
				if (pathObject != null) {
					return pathObject;
				}
			}
		}
		throw new IllegalStateException("No global preferences found for SARL."); //$NON-NLS-1$
	}
1157425
public LocalisationManager getLocalisationManager()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "getLocalisationManager", this);
        // Instantiate LocalisationManager to manage localisations and interface to WLM

        if (_localisationManager == null)
        {
            _localisationManager =
                            new LocalisationManager(this);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "getLocalisationManager", _localisationManager);

        return _localisationManager;
    }
793100
private static ConcurrentPropagationService getInstance() {
    if (instance == null) {
      synchronized (ConcurrentPropagationService.class) {
        if (instance == null) {
          instance = new ConcurrentPropagationService();
        }
      }
    }
    return instance;
  }
997109
public org.tensorflow.framework.DeviceLocality getLocality() {
    return locality_ == null ? org.tensorflow.framework.DeviceLocality.getDefaultInstance() : locality_;
  }
309141
public Versioned<E> next() {
        if(!hasNext())
            throw new NoSuchElementException();

        Versioned<VListNode<E>> tmpNode = _nextNode;
        VListNode<E> tmpNodeValue = _nextNode.getValue();
        _lastId = tmpNodeValue.getId();
        _lastCall = LastCall.NEXT;

        if(tmpNodeValue.getNextId() != VStack.NULL_ID) {
            _nextNode = _stack.getListNode(tmpNodeValue.getNextId());
        } else {
            _nextNode = null;
        }

        _previousNode = tmpNode;
        _isPreviousSet = true;

        return new Versioned<E>(tmpNodeValue.getValue(), tmpNode.getVersion());
    }
119344
@Override
  public IVersionRange getSimplifiedRange() {
    if (set.size() < 5) {
      return this;
    }
    IVersion max = null;
    IVersion min = null;

    for (IVersion v : set) {
      if (max == null) {
        max = v;
      }
      else {
        if (v.compareTo(max) > 0) {
          max = v;
        }
      }
      if (min == null) {
        min = v;
      }
      else {
        if (v.compareTo(min) < 0) {
          min = v;
        }
      }
    }

    return new BoundedVersionRange(min, max);
  }
925346
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
	public int getCompoundPaddingEnd (){
		if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1)
			return mInputView.getCompoundPaddingEnd();

		return mInputView.getCompoundPaddingRight();
	}