idx int64 0 165k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
126,300 | public void setTransform ( final Document xsltdoc ) throws TransformerConfigurationException { String encodingName = null ; mediaType = null ; String method = null ; NodeList nodes = xsltdoc . getElementsByTagNameNS ( XSLT_NS , "output" ) ; for ( int i = 0 ; i < nodes . getLength ( ) ; i ++ ) { Element outputElement = ... | Sets XSLT transform . |
126,301 | public static void setOutputStream ( final OutputStream out ) { LowLevelLogUtil . writer = new PrintWriter ( Objects . requireNonNull ( out ) , true ) ; } | Sets the underlying OutputStream where exceptions are printed to . |
126,302 | public static void setWriter ( final Writer writer ) { LowLevelLogUtil . writer = new PrintWriter ( Objects . requireNonNull ( writer ) , true ) ; } | Sets the underlying Writer where exceptions are printed to . |
126,303 | public void setTimeZone ( final String s ) { if ( s == null ) { calendar = Calendar . getInstance ( ) ; } else { calendar = Calendar . getInstance ( TimeZone . getTimeZone ( s ) ) ; } } | Set timezone . |
126,304 | public static Rule getRule ( final Stack stack ) { if ( stack . size ( ) < 2 ) { throw new IllegalArgumentException ( "Invalid AND rule - expected two rules but received " + stack . size ( ) ) ; } Object o2 = stack . pop ( ) ; Object o1 = stack . pop ( ) ; if ( ( o2 instanceof Rule ) && ( o1 instanceof Rule ) ) { Rule ... | Create rule from top two elements of stack . |
126,305 | public boolean isInRange ( final Level minLevel , final Level maxLevel ) { return this . intLevel >= minLevel . intLevel && this . intLevel <= maxLevel . intLevel ; } | Compares this level against the levels passed as arguments and returns true if this level is in between the given levels . |
126,306 | public static Level forName ( final String name , final int intValue ) { final Level level = LEVELS . get ( name ) ; if ( level != null ) { return level ; } try { return new Level ( name , intValue ) ; } catch ( final IllegalStateException ex ) { return LEVELS . get ( name ) ; } } | Retrieves an existing Level or creates on if it didn t previously exist . |
126,307 | public static Level [ ] values ( ) { final Collection < Level > values = Level . LEVELS . values ( ) ; return values . toArray ( new Level [ values . size ( ) ] ) ; } | Return an array of all the Levels that have been registered . |
126,308 | public static Level valueOf ( final String name ) { Objects . requireNonNull ( name , "No level name given." ) ; final String levelName = toUpperCase ( name ) ; final Level level = LEVELS . get ( levelName ) ; if ( level != null ) { return level ; } throw new IllegalArgumentException ( "Unknown level constant [" + leve... | Return the Level associated with the name . |
126,309 | public Object [ ] getParameters ( ) { final Object [ ] result = new Object [ data . size ( ) ] ; for ( int i = 0 ; i < data . size ( ) ; i ++ ) { result [ i ] = data . getValueAt ( i ) ; } return result ; } | Returns the data elements as if they were parameters on the logging event . |
126,310 | @ SuppressWarnings ( "unchecked" ) public Map < String , V > getData ( ) { final TreeMap < String , V > result = new TreeMap < > ( ) ; for ( int i = 0 ; i < data . size ( ) ; i ++ ) { result . put ( data . getKeyAt ( i ) , ( V ) data . getValueAt ( i ) ) ; } return Collections . unmodifiableMap ( result ) ; } | Returns the message data as an unmodifiable Map . |
126,311 | public void putAll ( final Map < String , String > map ) { for ( final Map . Entry < String , ? > entry : map . entrySet ( ) ) { data . putValue ( entry . getKey ( ) , entry . getValue ( ) ) ; } } | Adds all the elements from the specified Map . |
126,312 | public String remove ( final String key ) { final String result = data . getValue ( key ) ; data . remove ( key ) ; return result ; } | Removes the element with the specified name . |
126,313 | public void asXml ( final StringBuilder sb ) { sb . append ( "<Map>\n" ) ; for ( int i = 0 ; i < data . size ( ) ; i ++ ) { sb . append ( " <Entry key=\"" ) . append ( data . getKeyAt ( i ) ) . append ( "\">" ) . append ( ( String ) data . getValueAt ( i ) ) . append ( "</Entry>\n" ) ; } sb . append ( "</Map>" ) ; } | Formats this message as an XML fragment String into the given builder . |
126,314 | @ SuppressWarnings ( "unchecked" ) public M newInstance ( final Map < String , V > map ) { return ( M ) new MapMessage < > ( map ) ; } | Constructs a new instance based on an existing Map . |
126,315 | @ SuppressWarnings ( "unchecked" ) public M with ( final String key , final String value ) { put ( key , value ) ; return ( M ) this ; } | Adds an item to the data Map in fluent style . |
126,316 | public void logMessage ( final String fqcn , final Level level , final Marker marker , final Message message , final Throwable t ) { logger . logMessage ( fqcn , level , marker , message , t ) ; } | Always log an event . This tends to be already guarded by an enabled check so this method should not check for the logger level again |
126,317 | public static Object put ( String key , Object val ) { return LoggerProviders . PROVIDER . putMdc ( key , val ) ; } | Puts the value onto the context . |
126,318 | public static Rule getRule ( final String expression , final boolean isPostFix ) { String postFix = expression ; if ( ! isPostFix ) { postFix = CONVERTER . convert ( expression ) ; } return new ExpressionRule ( COMPILER . compileExpression ( postFix ) ) ; } | Get rule . |
126,319 | public static UtilLoggingLevel toLevel ( final int val , final UtilLoggingLevel defaultLevel ) { switch ( val ) { case SEVERE_INT : return SEVERE ; case WARNING_INT : return WARNING ; case INFO_INT : return INFO ; case CONFIG_INT : return CONFIG ; case FINE_INT : return FINE ; case FINER_INT : return FINER ; case FINES... | Convert an integer passed as argument to a level . If the conversion fails then this method returns the specified default . |
126,320 | public static List getAllPossibleLevels ( ) { ArrayList list = new ArrayList ( ) ; list . add ( FINE ) ; list . add ( FINER ) ; list . add ( FINEST ) ; list . add ( INFO ) ; list . add ( CONFIG ) ; list . add ( WARNING ) ; list . add ( SEVERE ) ; return list ; } | Gets list of supported levels . |
126,321 | public static Level toLevel ( final String sArg , final Level defaultLevel ) { if ( sArg == null ) { return defaultLevel ; } String s = sArg . toUpperCase ( ) ; if ( s . equals ( "SEVERE" ) ) { return SEVERE ; } if ( s . equals ( "WARNING" ) ) { return WARNING ; } if ( s . equals ( "INFO" ) ) { return INFO ; } if ( s .... | Get level with specified symbolic name . |
126,322 | public static PaxOsgiAppender createAppender ( @ PluginAttribute ( "name" ) final String name , @ PluginAttribute ( "filter" ) final String filter , final Configuration config ) { if ( name == null ) { StatusLogger . getLogger ( ) . error ( "No name provided for PaxOsgiAppender" ) ; return null ; } return new PaxOsgiAp... | Create a Pax Osgi Appender . |
126,323 | private void updateConfiguration ( BundleContext bundleContext , final String pattern ) throws IOException { final ConfigurationAdmin configAdmin = getConfigurationAdmin ( bundleContext ) ; final Configuration configuration = configAdmin . getConfiguration ( "org.ops4j.pax.logging" , null ) ; final Hashtable < String ,... | Updates Pax Logging configuration to a specifid conversion pattern . |
126,324 | private ConfigurationAdmin getConfigurationAdmin ( final BundleContext bundleContext ) { final ServiceReference ref = bundleContext . getServiceReference ( ConfigurationAdmin . class . getName ( ) ) ; if ( ref == null ) { throw new IllegalStateException ( "Cannot find a configuration admin service" ) ; } return ( Confi... | Gets Configuration Admin service from service registry . |
126,325 | public void removeListener ( final StatusListener listener ) { closeSilently ( listener ) ; listenersLock . writeLock ( ) . lock ( ) ; try { listeners . remove ( listener ) ; int lowest = Level . toLevel ( DEFAULT_STATUS_LEVEL , Level . WARN ) . intLevel ( ) ; for ( final StatusListener statusListener : listeners ) { f... | Removes a StatusListener . |
126,326 | public void reset ( ) { listenersLock . writeLock ( ) . lock ( ) ; try { for ( final StatusListener listener : listeners ) { closeSilently ( listener ) ; } } finally { listeners . clear ( ) ; listenersLock . writeLock ( ) . unlock ( ) ; clear ( ) ; } } | Clears the list of status events and listeners . |
126,327 | public void logMessage ( final String fqcn , final Level level , final Marker marker , final Message msg , final Throwable t ) { StackTraceElement element = null ; if ( fqcn != null ) { element = getStackTraceElement ( fqcn , Thread . currentThread ( ) . getStackTrace ( ) ) ; } final StatusData data = new StatusData ( ... | Adds an event . |
126,328 | public void format ( final int fieldStart , final StringBuffer buffer ) { final int rawLength = buffer . length ( ) - fieldStart ; if ( rawLength > maxLength ) { if ( rightTruncate ) { buffer . setLength ( fieldStart + maxLength ) ; } else { buffer . delete ( fieldStart , buffer . length ( ) - maxLength ) ; } } else if... | Adjust the content of the buffer based on the specified lengths and alignment . |
126,329 | public static < T > T newCheckedInstanceOf ( final String className , final Class < T > clazz ) throws ClassNotFoundException , NoSuchMethodException , InvocationTargetException , InstantiationException , IllegalAccessException { return clazz . cast ( newInstanceOf ( className ) ) ; } | Loads and instantiates a derived class using its default constructor . |
126,330 | public static < T > T newCheckedInstanceOfProperty ( final String propertyName , final Class < T > clazz ) throws ClassNotFoundException , NoSuchMethodException , InvocationTargetException , InstantiationException , IllegalAccessException { final String className = PropertiesUtil . getProperties ( ) . getStringProperty... | Loads and instantiates a class given by a property name . |
126,331 | public void addPlugin ( final Plugin plugin ) { synchronized ( pluginMap ) { String name = plugin . getName ( ) ; plugin . setLoggerRepository ( getLoggerRepository ( ) ) ; Plugin existingPlugin = ( Plugin ) pluginMap . get ( name ) ; if ( existingPlugin != null ) { existingPlugin . shutdown ( ) ; } pluginMap . put ( n... | Adds a plugin to the plugin registry . If a plugin with the same name exists already it is shutdown and removed . |
126,332 | private void firePluginStarted ( final Plugin plugin ) { PluginEvent e = null ; synchronized ( listenerList ) { for ( Iterator iter = listenerList . iterator ( ) ; iter . hasNext ( ) ; ) { PluginListener l = ( PluginListener ) iter . next ( ) ; if ( e == null ) { e = new PluginEvent ( plugin ) ; } l . pluginStarted ( e... | Calls the pluginStarted method on every registered PluginListener . |
126,333 | private void firePluginStopped ( final Plugin plugin ) { PluginEvent e = null ; synchronized ( listenerList ) { for ( Iterator iter = listenerList . iterator ( ) ; iter . hasNext ( ) ; ) { PluginListener l = ( PluginListener ) iter . next ( ) ; if ( e == null ) { e = new PluginEvent ( plugin ) ; } l . pluginStopped ( e... | Calls the pluginStopped method for every registered PluginListner . |
126,334 | public List getPlugins ( ) { synchronized ( pluginMap ) { List pluginList = new ArrayList ( pluginMap . size ( ) ) ; Iterator iter = pluginMap . values ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { pluginList . add ( iter . next ( ) ) ; } return pluginList ; } } | Returns all the plugins for a given repository . |
126,335 | public List getPlugins ( final Class pluginClass ) { synchronized ( pluginMap ) { List pluginList = new ArrayList ( pluginMap . size ( ) ) ; Iterator iter = pluginMap . values ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { Object plugin = iter . next ( ) ; if ( pluginClass . isInstance ( plugin ) ) { pluginList . ... | Returns all the plugins for a given repository that are instances of a certain class . |
126,336 | public Plugin stopPlugin ( final String pluginName ) { synchronized ( pluginMap ) { Plugin plugin = ( Plugin ) pluginMap . get ( pluginName ) ; if ( plugin == null ) { return null ; } plugin . shutdown ( ) ; pluginMap . remove ( pluginName ) ; firePluginStopped ( plugin ) ; return plugin ; } } | Stops a plugin by plugin name and repository . |
126,337 | public void stopAllPlugins ( ) { synchronized ( pluginMap ) { loggerRepository . removeLoggerRepositoryEventListener ( listener ) ; Iterator iter = pluginMap . values ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { Plugin plugin = ( Plugin ) iter . next ( ) ; plugin . shutdown ( ) ; firePluginStopped ( plugin ) ; }... | Stops all plugins in the given logger repository . |
126,338 | public void removeAppender ( String name ) { if ( name == null ) return ; for ( Iterator < Appender > it = appenderList . iterator ( ) ; it . hasNext ( ) ; ) { if ( name . equals ( it . next ( ) . getName ( ) ) ) { it . remove ( ) ; break ; } } } | Remove the appender with the name passed as parameter form the list of appenders . |
126,339 | protected void catching ( final String fqcn , final Level level , final Throwable t ) { if ( isEnabled ( level , CATCHING_MARKER , ( Object ) null , null ) ) { logMessageSafely ( fqcn , level , CATCHING_MARKER , catchingMsg ( t ) , t ) ; } } | Logs a Throwable that has been caught with location information . |
126,340 | protected < R > R exit ( final String fqcn , final R result ) { logIfEnabled ( fqcn , Level . TRACE , EXIT_MARKER , exitMsg ( null , result ) , null ) ; return result ; } | Logs exiting from a method with the result and location information . |
126,341 | protected < T extends Throwable > T throwing ( final String fqcn , final Level level , final T t ) { if ( isEnabled ( level , THROWING_MARKER , ( Object ) null , null ) ) { logMessageSafely ( fqcn , level , THROWING_MARKER , throwingMsg ( t ) , t ) ; } return t ; } | Logs a Throwable to be thrown . |
126,342 | public LogEvent createEvent ( final String loggerName , final Marker marker , final String fqcn , final Level level , final Message message , final List < Property > properties , final Throwable t ) { WeakReference < MutableLogEvent > refResult = mutableLogEventThreadLocal . get ( ) ; MutableLogEvent result = refResult... | Creates a log event . |
126,343 | public boolean execute ( ) throws IOException { if ( stopOnError ) { for ( int i = 0 ; i < actions . length ; i ++ ) { if ( ! actions [ i ] . execute ( ) ) { return false ; } } return true ; } else { boolean status = true ; IOException exception = null ; for ( int i = 0 ; i < actions . length ; i ++ ) { try { status &=... | Execute sequence of actions . |
126,344 | public void run ( ) { LoggingEvent event ; Logger remoteLogger ; Exception listenerException = null ; ObjectInputStream ois = null ; try { ois = new ObjectInputStream ( new BufferedInputStream ( socket . getInputStream ( ) ) ) ; } catch ( Exception e ) { ois = null ; listenerException = e ; getLogger ( ) . error ( "Exc... | Deserialize events from socket until interrupted . |
126,345 | private void fireSocketClosedEvent ( final Exception listenerException ) { synchronized ( listenerList ) { for ( Iterator iter = listenerList . iterator ( ) ; iter . hasNext ( ) ; ) { SocketNodeEventListener snel = ( SocketNodeEventListener ) iter . next ( ) ; if ( snel != null ) { snel . socketClosedEvent ( listenerEx... | Notifies all registered listeners regarding the closing of the Socket . |
126,346 | private void fireSocketOpened ( final String remoteInfo ) { synchronized ( listenerList ) { for ( Iterator iter = listenerList . iterator ( ) ; iter . hasNext ( ) ; ) { SocketNodeEventListener snel = ( SocketNodeEventListener ) iter . next ( ) ; if ( snel != null ) { snel . socketOpened ( remoteInfo ) ; } } } } | Notifies all registered listeners regarding the opening of a Socket . |
126,347 | public void close ( ) throws IOException { getLogger ( ) . debug ( "closing socket" ) ; this . closed = true ; socket . close ( ) ; fireSocketClosedEvent ( null ) ; } | Close the node and underlying socket |
126,348 | public void setName ( final String newName ) { String oldName = this . name ; this . name = newName ; propertySupport . firePropertyChange ( "name" , oldName , this . name ) ; } | Sets the name of the plugin and notifies PropertyChangeListeners of the change . |
126,349 | public void setLoggerRepository ( final LoggerRepository repository ) { Object oldValue = this . repository ; this . repository = repository ; firePropertyChange ( "loggerRepository" , oldValue , this . repository ) ; } | Sets the logger repository used by this plugin and notifies a relevant PropertyChangeListeners registered . This repository will be used by the plugin functionality . |
126,350 | public boolean isEquivalent ( final Plugin testPlugin ) { return ( repository == testPlugin . getLoggerRepository ( ) ) && ( ( this . name == null && testPlugin . getName ( ) == null ) || ( this . name != null && name . equals ( testPlugin . getName ( ) ) ) ) && this . getClass ( ) . equals ( testPlugin . getClass ( ) ... | Returns true if the plugin has the same name and logger repository as the testPlugin passed in . |
126,351 | protected final void firePropertyChange ( final String propertyName , final Object oldValue , final Object newValue ) { propertySupport . firePropertyChange ( propertyName , oldValue , newValue ) ; } | Fire property change event to appropriate listeners . |
126,352 | private synchronized void closeAllAcceptedSockets ( ) { for ( int x = 0 ; x < socketList . size ( ) ; x ++ ) { try { ( ( Socket ) socketList . get ( x ) ) . close ( ) ; } catch ( Exception e ) { } } socketMap . clear ( ) ; socketList . clear ( ) ; } | Closes all the connected sockets in the List . |
126,353 | public boolean contains ( String name ) { if ( name == null ) { throw new IllegalArgumentException ( "Other cannot be null" ) ; } if ( this . name . equals ( name ) ) { return true ; } if ( hasReferences ( ) ) { for ( Marker ref : referenceList ) { if ( ref . contains ( name ) ) { return true ; } } } return false ; } | This method is mainly used with Expression Evaluators . |
126,354 | public static CloseableThreadContext . Instance push ( final String message , final Object ... args ) { return new CloseableThreadContext . Instance ( ) . push ( message , args ) ; } | Pushes new diagnostic context information on to the Thread Context Stack . The information will be popped off when the instance is closed . |
126,355 | public static CloseableThreadContext . Instance pushAll ( final List < String > messages ) { return new CloseableThreadContext . Instance ( ) . pushAll ( messages ) ; } | Populates the Thread Context Stack with the supplied stack . The information will be popped off when the instance is closed . |
126,356 | public static void logEvent ( final StructuredDataMessage msg ) { LOGGER . logIfEnabled ( FQCN , Level . OFF , EVENT_MARKER , msg , null ) ; } | Logs events with a level of ALL . |
126,357 | public void trace ( Object message ) { doLog ( Level . TRACE , FQCN , message , null , null ) ; } | Issue a log message with a level of TRACE . |
126,358 | public void trace ( Object message , Throwable t ) { doLog ( Level . TRACE , FQCN , message , null , t ) ; } | Issue a log message and throwable with a level of TRACE . |
126,359 | public void trace ( Object message , Object [ ] params ) { doLog ( Level . TRACE , FQCN , message , params , null ) ; } | Issue a log message with parameters with a level of TRACE . |
126,360 | public void debug ( Object message ) { doLog ( Level . DEBUG , FQCN , message , null , null ) ; } | Issue a log message with a level of DEBUG . |
126,361 | public void debug ( Object message , Throwable t ) { doLog ( Level . DEBUG , FQCN , message , null , t ) ; } | Issue a log message and throwable with a level of DEBUG . |
126,362 | public void debug ( String loggerFqcn , Object message , Throwable t ) { doLog ( Level . DEBUG , loggerFqcn , message , null , t ) ; } | Issue a log message and throwable with a level of DEBUG and a specific logger class name . |
126,363 | public void debug ( Object message , Object [ ] params ) { doLog ( Level . DEBUG , FQCN , message , params , null ) ; } | Issue a log message with parameters with a level of DEBUG . |
126,364 | public void debug ( Object message , Object [ ] params , Throwable t ) { doLog ( Level . DEBUG , FQCN , message , params , t ) ; } | Issue a log message with parameters and a throwable with a level of DEBUG . |
126,365 | public void info ( Object message ) { doLog ( Level . INFO , FQCN , message , null , null ) ; } | Issue a log message with a level of INFO . |
126,366 | public void info ( Object message , Throwable t ) { doLog ( Level . INFO , FQCN , message , null , t ) ; } | Issue a log message and throwable with a level of INFO . |
126,367 | public void info ( String loggerFqcn , Object message , Throwable t ) { doLog ( Level . INFO , loggerFqcn , message , null , t ) ; } | Issue a log message and throwable with a level of INFO and a specific logger class name . |
126,368 | public void info ( Object message , Object [ ] params ) { doLog ( Level . INFO , FQCN , message , params , null ) ; } | Issue a log message with parameters with a level of INFO . |
126,369 | public void info ( Object message , Object [ ] params , Throwable t ) { doLog ( Level . INFO , FQCN , message , params , t ) ; } | Issue a log message with parameters and a throwable with a level of INFO . |
126,370 | public void warn ( Object message ) { doLog ( Level . WARN , FQCN , message , null , null ) ; } | Issue a log message with a level of WARN . |
126,371 | public void warn ( Object message , Throwable t ) { doLog ( Level . WARN , FQCN , message , null , t ) ; } | Issue a log message and throwable with a level of WARN . |
126,372 | public void warn ( String loggerFqcn , Object message , Throwable t ) { doLog ( Level . WARN , loggerFqcn , message , null , t ) ; } | Issue a log message and throwable with a level of WARN and a specific logger class name . |
126,373 | public void warn ( Object message , Object [ ] params ) { doLog ( Level . WARN , FQCN , message , params , null ) ; } | Issue a log message with parameters with a level of WARN . |
126,374 | public void warn ( Object message , Object [ ] params , Throwable t ) { doLog ( Level . WARN , FQCN , message , params , t ) ; } | Issue a log message with parameters and a throwable with a level of WARN . |
126,375 | public void error ( Object message ) { doLog ( Level . ERROR , FQCN , message , null , null ) ; } | Issue a log message with a level of ERROR . |
126,376 | public void error ( Object message , Throwable t ) { doLog ( Level . ERROR , FQCN , message , null , t ) ; } | Issue a log message and throwable with a level of ERROR . |
126,377 | public void error ( Object message , Object [ ] params ) { doLog ( Level . ERROR , FQCN , message , params , null ) ; } | Issue a log message with parameters with a level of ERROR . |
126,378 | public void fatal ( Object message ) { doLog ( Level . FATAL , FQCN , message , null , null ) ; } | Issue a log message with a level of FATAL . |
126,379 | public void fatal ( Object message , Throwable t ) { doLog ( Level . FATAL , FQCN , message , null , t ) ; } | Issue a log message and throwable with a level of FATAL . |
126,380 | public void fatal ( Object message , Object [ ] params ) { doLog ( Level . FATAL , FQCN , message , params , null ) ; } | Issue a log message with parameters with a level of FATAL . |
126,381 | public void log ( Level level , String loggerFqcn , Object message , Throwable t ) { doLog ( level , loggerFqcn , message , null , t ) ; } | Issue a log message and throwable at the given log level and a specific logger class name . |
126,382 | public void log ( Level level , Object message , Object [ ] params ) { doLog ( level , FQCN , message , params , null ) ; } | Issue a log message with parameters at the given log level . |
126,383 | public void log ( Level level , Object message , Object [ ] params , Throwable t ) { doLog ( level , FQCN , message , params , t ) ; } | Issue a log message with parameters and a throwable at the given log level . |
126,384 | public static < T > T getMessageLogger ( Class < T > type , String category ) { return getMessageLogger ( type , category , Locale . getDefault ( ) ) ; } | Get a typed logger which implements the given interface . The current default locale will be used for the new logger . |
126,385 | public static < T > T getMessageLogger ( final Class < T > type , final String category , final Locale locale ) { return doPrivileged ( new PrivilegedAction < T > ( ) { public T run ( ) { String language = locale . getLanguage ( ) ; String country = locale . getCountry ( ) ; String variant = locale . getVariant ( ) ; C... | Get a typed logger which implements the given interface . The given locale will be used for the new logger . |
126,386 | public static Rule getRule ( final String field , final String value ) { if ( field . equalsIgnoreCase ( LoggingEventFieldResolver . LEVEL_FIELD ) ) { return NotLevelEqualsRule . getRule ( value ) ; } else { return new NotEqualsRule ( field , value ) ; } } | Get new instance . |
126,387 | public static Rule getRule ( final Stack stack ) { if ( stack . size ( ) < 2 ) { throw new IllegalArgumentException ( "Invalid NOT EQUALS rule - expected two parameters but received " + stack . size ( ) ) ; } String p2 = stack . pop ( ) . toString ( ) ; String p1 = stack . pop ( ) . toString ( ) ; if ( p1 . equalsIgnor... | Get new instance from top two elements of stack . |
126,388 | public void discoverConnnectionProperties ( ) { Connection connection = null ; try { connection = getConnection ( ) ; if ( connection == null ) { getLogger ( ) . warn ( "Could not get a conneciton" ) ; return ; } DatabaseMetaData meta = connection . getMetaData ( ) ; Util util = new Util ( ) ; util . setLoggerRepositor... | Learn relevant information about this connection source . |
126,389 | public String getSuppressedStackTrace ( final String suffix ) { final ThrowableProxy [ ] suppressed = this . getSuppressedProxies ( ) ; if ( suppressed == null || suppressed . length == 0 ) { return Strings . EMPTY ; } final StringBuilder sb = new StringBuilder ( "Suppressed Stack Trace Elements:" ) . append ( EOL ) ; ... | Format the suppressed Throwables . |
126,390 | private Class < ? > loadClass ( final ClassLoader lastLoader , final String className ) { Class < ? > clazz ; if ( lastLoader != null ) { try { clazz = lastLoader . loadClass ( className ) ; if ( clazz != null ) { return clazz ; } } catch ( final Throwable ignore ) { } } try { clazz = LoaderUtil . loadClass ( className... | Loads classes not located via Reflection . getCallerClass . |
126,391 | private CacheEntry toCacheEntry ( final StackTraceElement stackTraceElement , final Class < ? > callerClass , final boolean exact ) { String location = "?" ; String version = "?" ; ClassLoader lastLoader = null ; if ( callerClass != null ) { try { Bundle bundle = FrameworkUtil . getBundle ( callerClass ) ; if ( bundle ... | Construct the CacheEntry from the Class s information . |
126,392 | ExtendedStackTraceElement [ ] toExtendedStackTrace ( final Stack < Class < ? > > stack , final Map < String , CacheEntry > map , final StackTraceElement [ ] rootTrace , final StackTraceElement [ ] stackTrace ) { int stackLength ; if ( rootTrace != null ) { int rootIndex = rootTrace . length - 1 ; int stackIndex = stack... | Resolve all the stack entries in this stack trace that are not common with the parent . |
126,393 | private boolean purge ( final int lowIndex , final int highIndex ) { int suffixLength = 0 ; List renames = new ArrayList ( ) ; StringBuffer buf = new StringBuffer ( ) ; formatFileName ( new Integer ( lowIndex ) , buf ) ; String lowFilename = buf . toString ( ) ; if ( lowFilename . endsWith ( ".gz" ) ) { suffixLength = ... | Purge and rename old log files in preparation for rollover |
126,394 | public static boolean isOperand ( final String s ) { String symbol = s . toLowerCase ( Locale . ENGLISH ) ; return ( ! operators . contains ( symbol ) ) ; } | Evaluates whether symbol is operand . |
126,395 | boolean precedes ( final String s1 , final String s2 ) { String symbol1 = s1 . toLowerCase ( Locale . ENGLISH ) ; String symbol2 = s2 . toLowerCase ( Locale . ENGLISH ) ; if ( ! precedenceMap . keySet ( ) . contains ( symbol1 ) ) { return false ; } if ( ! precedenceMap . keySet ( ) . contains ( symbol2 ) ) { return fal... | Determines whether one symbol precedes another . |
126,396 | String infixToPostFix ( final CustomTokenizer tokenizer ) { final String space = " " ; StringBuffer postfix = new StringBuffer ( ) ; Stack stack = new Stack ( ) ; while ( tokenizer . hasMoreTokens ( ) ) { String token = tokenizer . nextToken ( ) ; boolean inText = ( token . startsWith ( "'" ) && ( ! token . endsWith ( ... | convert in - fix expression to post - fix . |
126,397 | public void addFilter ( final Filter newFilter ) { if ( headFilter == null ) { headFilter = newFilter ; tailFilter = newFilter ; } else { tailFilter . next = newFilter ; tailFilter = newFilter ; } } | Add a filter to end of the filter list . |
126,398 | private static int extractConverter ( char lastChar , final String pattern , int i , final StringBuffer convBuf , final StringBuffer currentLiteral ) { convBuf . setLength ( 0 ) ; if ( ! Character . isUnicodeIdentifierStart ( lastChar ) ) { return i ; } convBuf . append ( lastChar ) ; while ( ( i < pattern . length ( )... | Extract the converter identifier found at position i . |
126,399 | private static int extractOptions ( String pattern , int i , List options ) { while ( ( i < pattern . length ( ) ) && ( pattern . charAt ( i ) == '{' ) ) { int end = pattern . indexOf ( '}' , i ) ; if ( end == - 1 ) { break ; } String r = pattern . substring ( i + 1 , end ) ; options . add ( r ) ; i = end + 1 ; } retur... | Extract options . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.