signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ClientConfiguration { /** * Configure the list of authentication methods that should be used when authenticating against an HTTP proxy , in the order * they should be attempted . Any methods not included in this list will not be attempted . If one authentication method fails , * the next method will be...
if ( proxyAuthenticationMethods == null ) { this . proxyAuthenticationMethods = null ; } else { ValidationUtils . assertNotEmpty ( proxyAuthenticationMethods , "proxyAuthenticationMethods" ) ; this . proxyAuthenticationMethods = Collections . unmodifiableList ( new ArrayList < ProxyAuthenticationMethod > ( proxyAuthent...
public class SAML2AttributeNameToIdMapperService { /** * Returns the mapping between attribute names and their Shibboleth ID : s . * @ return a mapping */ private Map < String , String > getMapping ( ) { } }
if ( this . attributesMapping != null && this . lastReload != null && this . lastReload . equals ( this . attributeResolverService . getLastSuccessfulReloadInstant ( ) ) ) { return this . attributesMapping ; } // Reload . ServiceableComponent < AttributeResolver > component = null ; Map < String , String > am = null ; ...
public class MerlinReader { /** * Read relation data . */ private void processDependencies ( ) throws SQLException { } }
List < Row > rows = getRows ( "select * from zdependency where zproject=?" , m_projectID ) ; for ( Row row : rows ) { Task nextTask = m_project . getTaskByUniqueID ( row . getInteger ( "ZNEXTACTIVITY_" ) ) ; Task prevTask = m_project . getTaskByUniqueID ( row . getInteger ( "ZPREVIOUSACTIVITY_" ) ) ; Duration lag = row...
public class CompoundServiceFilter { /** * Calls both filters ' successful ( ) method , ignoring anything thrown . */ @ Override public void successful ( DataBinder parameters ) { } }
try { first . successful ( parameters ) ; } catch ( Throwable t ) { } try { second . successful ( parameters ) ; } catch ( Throwable t ) { }
public class NtlmPasswordAuthentication { /** * Generate the Unicode MD4 hash for the password associated with these credentials . */ static public byte [ ] getNTLMResponse ( String password , byte [ ] challenge ) { } }
byte [ ] uni = null ; byte [ ] p21 = new byte [ 21 ] ; byte [ ] p24 = new byte [ 24 ] ; try { uni = password . getBytes ( SmbConstants . UNI_ENCODING ) ; } catch ( UnsupportedEncodingException uee ) { if ( log . level > 0 ) uee . printStackTrace ( log ) ; } MD4 md4 = new MD4 ( ) ; md4 . update ( uni ) ; try { md4 . dig...
public class AbstractTrafficShapingHandler { /** * < p > Note the change will be taken as best effort , meaning * that all already scheduled traffics will not be * changed , but only applied to new traffics . < / p > * < p > So the expected usage of this method is to be used not too often , * accordingly to the...
this . writeLimit = writeLimit ; if ( trafficCounter != null ) { trafficCounter . resetAccounting ( TrafficCounter . milliSecondFromNano ( ) ) ; }
public class TypeUtility { /** * Returns a string with type parameters replaced with wildcards . This is slightly different from { @ link Types # erasure ( javax . lang . model . type . TypeMirror ) } , which removes all * type parameter data . * For instance , if there is a field with type List & lt ; String & gt ...
List < ? extends TypeMirror > typeArguments = declaredType . getTypeArguments ( ) ; if ( ! typeArguments . isEmpty ( ) ) { StringBuilder typeString = new StringBuilder ( declaredType . asElement ( ) . toString ( ) ) ; typeString . append ( '<' ) ; for ( int i = 0 ; i < typeArguments . size ( ) ; i ++ ) { if ( i > 0 ) {...
public class XmpSchema { /** * Processes a property * @ param buf * @ param p */ protected void process ( StringBuffer buf , Object p ) { } }
buf . append ( '<' ) ; buf . append ( p ) ; buf . append ( '>' ) ; buf . append ( this . get ( p ) ) ; buf . append ( "</" ) ; buf . append ( p ) ; buf . append ( '>' ) ;
public class DefaultCommandRegistry { /** * { @ inheritDoc } * @ deprecated */ public ActionCommand getActionCommand ( String commandId ) { } }
if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Attempting to retrieve ActionCommand with id [" + commandId + "] from the command registry." ) ; } Object command = getCommand ( commandId , ActionCommand . class ) ; return ( ActionCommand ) command ;
public class ZFSInstaller { /** * Called from the confirmation screen to actually initiate the migration . */ @ RequirePOST public void doStart ( StaplerRequest req , StaplerResponse rsp , @ QueryParameter String username , @ QueryParameter String password ) throws ServletException , IOException { } }
Jenkins hudson = Jenkins . getInstance ( ) ; hudson . checkPermission ( Jenkins . ADMINISTER ) ; final String datasetName ; ByteArrayOutputStream log = new ByteArrayOutputStream ( ) ; StreamTaskListener listener = new StreamTaskListener ( log ) ; try { datasetName = createZfsFileSystem ( listener , username , password ...
public class GenericUrl { /** * Returns the raw encoded path computed from the { @ link # pathParts } . * @ return raw encoded path computed from the { @ link # pathParts } or { @ code null } if { @ link * # pathParts } is { @ code null } */ public String getRawPath ( ) { } }
List < String > pathParts = this . pathParts ; if ( pathParts == null ) { return null ; } StringBuilder buf = new StringBuilder ( ) ; appendRawPathFromParts ( buf ) ; return buf . toString ( ) ;
public class CRestBuilder { /** * < p > Adds given property to the { @ link org . codegist . crest . CRestConfig } that will be passed to all < b > CRest < / b > components . < / p > * < p > Note that this property can be used to override defaut < b > CRest < / b > ' s MethodConfig and ParamConfig values when none ar...
return addProperties ( singletonMap ( name , value ) ) ;
public class MediathekWdr { @ Override public synchronized void addToList ( ) { } }
clearLists ( ) ; meldungStart ( ) ; fillLists ( ) ; if ( Config . getStop ( ) ) { meldungThreadUndFertig ( ) ; } else if ( letterPageUrls . isEmpty ( ) && dayUrls . isEmpty ( ) ) { meldungThreadUndFertig ( ) ; } else { meldungAddMax ( letterPageUrls . size ( ) + dayUrls . size ( ) ) ; startLetterPages ( ) ; startDayPag...
public class GenericInfoUtils { /** * When building inlying context , target type may be inner class , and if root context contains owner type * then we can assume that it ' s known more specific generics may be used . This is not correct in general , * as inner class may be created inside different class , but in ...
final Map < Class < ? > , LinkedHashMap < String , Type > > res = new HashMap < Class < ? > , LinkedHashMap < String , Type > > ( ) ; // use only types , not included in target hierarchy for ( Class < ? > root : info . getComposingTypes ( ) ) { if ( ! root . isAssignableFrom ( type ) ) { res . put ( root , ( LinkedHash...
public class DdlUtils { /** * The connection is commited in this method but not closed . */ public static void createSchema ( Connection connection , String dialect , boolean createSchemaMigrations ) { } }
if ( createSchemaMigrations ) { executeScript ( connection , "org/sonar/db/version/schema_migrations-" + dialect + ".ddl" ) ; } executeScript ( connection , "org/sonar/db/version/schema-" + dialect + ".ddl" ) ; executeScript ( connection , "org/sonar/db/version/rows-" + dialect + ".sql" ) ;
public class AbstractAuthenticationStrategy { /** * Determines a common < code > User < / code > corresponding to the given list of e - mail addresses . If none of the e - mail addresses are in * use , returns < code > null < / code > . If the e - mail addresses are associated to multiple user accounts , an < code > ...
User user = null ; UserEmailDAO userEmailDAO = new UserEmailDAO ( ) ; for ( String email : emails ) { UserEmail userEmail = userEmailDAO . findByAddress ( email ) ; if ( userEmail != null ) { if ( user == null ) { user = userEmail . getUser ( ) ; } else if ( ! user . getId ( ) . equals ( userEmail . getUser ( ) . getId...
public class DirectBufferOutputStream { /** * Write a byte [ ] to the buffer . * @ param srcBytes to write * @ param srcOffset at which to begin reading bytes from the srcBytes . * @ param length of the srcBytes to read . * @ throws IllegalStateException if insufficient capacity remains in the buffer . */ publi...
final long resultingOffset = position + ( ( long ) length ) ; if ( resultingOffset > this . length ) { throw new IllegalStateException ( "insufficient capacity in the buffer" ) ; } buffer . putBytes ( offset + position , srcBytes , srcOffset , length ) ; position += length ;
public class Try { /** * Flats nested { @ link Try } of { @ link Try } into flatten one . * @ param nestedTry nested try to flatten * @ param < U > computation type * @ return flatten Try */ public static < U > Try < U > flatten ( final Try < ? extends Try < ? extends U > > nestedTry ) { } }
if ( nestedTry . isFailure ( ) ) { return fromError ( nestedTry . getError ( ) ) ; } return nestedTry . getValue ( ) . map ( identity ( ) ) ;
public class MbeanImplCodeGen { /** * Output Constructor * @ param def definition * @ param out Writer * @ param indent space number * @ throws IOException ioException */ void writeConstructor ( Definition def , Writer out , int indent ) throws IOException { } }
writeSimpleMethodSignature ( out , indent , " * Default constructor" , "public " + getClassName ( def ) + "()" ) ; writeLeftCurlyBracket ( out , indent ) ; writeWithIndent ( out , indent + 1 , "this.mbeanServer = null;\n" ) ; writeWithIndent ( out , indent + 1 , "this.objectName = \"" + def . getDefaultValue ( ) + ",cl...
public class CPAttachmentFileEntryUtil { /** * Returns the cp attachment file entry where classNameId = & # 63 ; and classPK = & # 63 ; and fileEntryId = & # 63 ; or returns < code > null < / code > if it could not be found . Uses the finder cache . * @ param classNameId the class name ID * @ param classPK the clas...
return getPersistence ( ) . fetchByC_C_F ( classNameId , classPK , fileEntryId ) ;
public class VdmEvaluationAction { /** * IVdmEvaluationListener */ public void evaluationComplete ( IVdmEvaluationResult result ) { } }
// if plug - in has shutdown , ignore - see bug # 8693 if ( VdmDebugPlugin . getDefault ( ) == null ) { return ; } final IVdmValue value = result . getValue ( ) ; if ( result . hasErrors ( ) || value != null ) { final Display display = VdmDebugPlugin . getStandardDisplay ( ) ; if ( display . isDisposed ( ) ) { return ;...
public class FieldInitializer { /** * initFromProperties - initializes fields ( static and non - static ) in an Object based * on system properties . For example , given Object o of class com . company . Foo * with field cacheSize . The following system property would change the field * - Dcom . company . Foo . c...
updateFieldsFromProperties ( o . getClass ( ) , o , prop ) ;
public class TailOf { /** * Copy buffer to response for read count smaller then buffer size . * @ param buffer The buffer array * @ param response The response array * @ param num Number of bytes in response array from previous read * @ param read Number of bytes read in the buffer * @ return New count of byt...
final int result ; if ( num > 0 ) { System . arraycopy ( response , read , response , 0 , this . count - read ) ; System . arraycopy ( buffer , 0 , response , this . count - read , read ) ; result = this . count ; } else { System . arraycopy ( buffer , 0 , response , 0 , read ) ; result = read ; } return result ;
public class CryptoKey { /** * < code > . google . privacy . dlp . v2 . UnwrappedCryptoKey unwrapped = 2 ; < / code > */ public com . google . privacy . dlp . v2 . UnwrappedCryptoKeyOrBuilder getUnwrappedOrBuilder ( ) { } }
if ( sourceCase_ == 2 ) { return ( com . google . privacy . dlp . v2 . UnwrappedCryptoKey ) source_ ; } return com . google . privacy . dlp . v2 . UnwrappedCryptoKey . getDefaultInstance ( ) ;
public class CacheLoader { /** * Loads multiple values to the cache . * < p > From inside this method it is illegal to call methods on the same cache . This * may cause a deadlock . * < p > The method is provided to complete the API . At the moment cache2k is not * using it . Please see the road map . * @ par...
throw new UnsupportedOperationException ( ) ;
public class AbstractAmazonDynamoDBAsync { /** * Simplified method form for invoking the Scan operation . * @ see # scanAsync ( ScanRequest ) */ @ Override public java . util . concurrent . Future < ScanResult > scanAsync ( String tableName , java . util . List < String > attributesToGet ) { } }
return scanAsync ( new ScanRequest ( ) . withTableName ( tableName ) . withAttributesToGet ( attributesToGet ) ) ;
public class DiffBuilder { /** * Compare the Test - XML { @ link # withTest ( Object ) } with the Control - XML { @ link # compare ( Object ) } and return the * collected differences in a { @ link Diff } object . */ public Diff build ( ) { } }
final DOMDifferenceEngine d = new DOMDifferenceEngine ( ) ; final CollectResultsListener collectResultsListener = new CollectResultsListener ( comparisonResultsToCheck ) ; d . addDifferenceListener ( collectResultsListener ) ; if ( nodeMatcher != null ) { d . setNodeMatcher ( nodeMatcher ) ; } d . setDifferenceEvaluato...
public class InstrumentedExecutors { /** * Creates a single - threaded instrumented executor that can schedule commands * to run after a given delay , or to execute periodically . ( Note * however that if this single thread terminates due to a failure * during execution prior to shutdown , a new one will take its...
return new InstrumentedScheduledExecutorService ( Executors . newSingleThreadScheduledExecutor ( threadFactory ) , registry ) ;
public class MessageToByteEncoder { /** * Allocate a { @ link ByteBuf } which will be used as argument of { @ link # encode ( ChannelHandlerContext , I , ByteBuf ) } . * Sub - classes may override this method to return { @ link ByteBuf } with a perfect matching { @ code initialCapacity } . */ protected ByteBuf alloca...
if ( preferDirect ) { return ctx . alloc ( ) . ioBuffer ( ) ; } else { return ctx . alloc ( ) . heapBuffer ( ) ; }
public class AlignmentTools { /** * After the alignment changes ( optAln , optLen , blockNum , at a minimum ) , * many other properties which depend on the superposition will be invalid . * This method re - runs a rigid superposition over the whole alignment * and repopulates the required properties , including R...
// Update ca information , because the atom array might also be changed afpChain . setCa1Length ( ca1 . length ) ; afpChain . setCa2Length ( ca2 . length ) ; // We need this to get the correct superposition int [ ] focusRes1 = afpChain . getFocusRes1 ( ) ; int [ ] focusRes2 = afpChain . getFocusRes2 ( ) ; if ( focusRes...
public class GeneratorXMLDatabaseConnection { /** * Process a ' dataset ' Element in the XML stream . * @ param gen Generator * @ param cur Current document nod */ private void processElementDataset ( GeneratorMain gen , Node cur ) { } }
// * * * get parameters String seedstr = ( ( Element ) cur ) . getAttribute ( ATTR_SEED ) ; if ( clusterRandom != RandomFactory . DEFAULT && seedstr != null && seedstr . length ( ) > 0 ) { clusterRandom = new RandomFactory ( ( long ) ( ParseUtil . parseIntBase10 ( seedstr ) * sizescale ) ) ; } String testmod = ( ( Elem...
public class ExpressionToken { /** * Update the value of < code > key < / code > in < code > map < / code > * @ param map the map * @ param key the key * @ param value the value */ protected final void mapUpdate ( Map map , Object key , Object value ) { } }
Object o = map . get ( key ) ; /* If a value exists in map . get ( key ) , convert the " value " parameter into the type of map . get ( key ) . It ' s a best guess as to what the type of the Map _ should _ be without any further reflective information about the types contained in the map . */ if ( o != null ) { C...
public class MetadataDao { /** * Delete the Metadata , cascading * @ param metadata * metadata * @ return deleted count * @ throws SQLException * upon failure */ public int deleteCascade ( Metadata metadata ) throws SQLException { } }
int count = 0 ; if ( metadata != null ) { // Delete Metadata References and remove parent references MetadataReferenceDao dao = getMetadataReferenceDao ( ) ; dao . deleteByMetadata ( metadata . getId ( ) ) ; dao . removeMetadataParent ( metadata . getId ( ) ) ; // Delete count = delete ( metadata ) ; } return count ;
public class OQL { /** * LogicalBinding * ( b _ 1 AND b _ 2 AND . . . AND b _ n ) * ( b _ 1 OR b _ 2 OR . . . OR b _ n ) */ private void _buildLogicalBinding ( final LogicalBinding binding , final StringBuilder stmt , final List < Object > params ) { } }
final int size = binding . size ( ) ; if ( size < 2 ) { throw new IllegalArgumentException ( "LogicalBinding with less than two element bindings" ) ; } final String logic = ( binding instanceof AndBinding ) ? _AND_ : _OR_ ; stmt . append ( " (" ) ; for ( int i = 0 ; i < size ; i ++ ) { if ( i > 0 ) { stmt . append ( lo...
public class Gmp { /** * Calculate ( base ^ exponent ) % modulus ; slower , hardened against timing attacks . * < p > NOTE : this methods REQUIRES modulus to be odd , due to a crash - bug in libgmp . This is not a * problem for RSA where the modulus is always odd . < / p > * @ param base the base , must be positi...
if ( modulus . signum ( ) <= 0 ) { throw new ArithmeticException ( "modulus must be positive" ) ; } if ( ! modulus . testBit ( 0 ) ) { throw new IllegalArgumentException ( "modulus must be odd" ) ; } return INSTANCE . get ( ) . modPowSecureImpl ( base , exponent , modulus ) ;
public class BasicBinder { /** * Resolve a Marshaller with the given source and target class . * The marshaller is used as follows : Instances of the source can be marshalled into the target class . * @ param source The source ( input ) class * @ param target The target ( output ) class * @ param qualifier The ...
return findMarshaller ( new ConverterKey < S , T > ( source , target , qualifier == null ? DefaultBinding . class : qualifier ) ) ;
public class FilenameUtil { /** * Checks a filename to see if it matches the specified wildcard filter * allowing control over case - sensitivity . * The wildcard filter uses the characters ' ? ' and ' * ' to represent a * single or multiple ( zero or more ) wildcard characters . * N . B . the sequence " * ? " ...
return wildcardMatch ( filename , wildcardfilter , caseSensitivity ? IOCase . SENSITIVE : IOCase . INSENSITIVE ) ;
public class WebApp { /** * ( non - Javadoc ) * @ see * com . ibm . websphere . servlet . context . IBMServletContext # loadServlet ( java . * lang . String ) */ public void loadServlet ( String servletName ) throws ServletException , SecurityException { } }
SecurityManager sm = System . getSecurityManager ( ) ; if ( sm != null ) { sm . checkPermission ( perm ) ; } ServletWrapper s ; try { s = ( ServletWrapper ) getServletWrapper ( servletName ) ; if ( s != null ) { s . load ( ) ; } } catch ( Exception e ) { throw new ServletException ( "Servlet load failed: " + e . getMes...
public class MPDConnectionMonitor { /** * Sends the appropriate { @ link org . bff . javampd . server . ConnectionChangeEvent } to all registered * { @ link ConnectionChangeListener } s . * @ param isConnected the connection status */ protected synchronized void fireConnectionChangeEvent ( boolean isConnected ) { }...
ConnectionChangeEvent cce = new ConnectionChangeEvent ( this , isConnected ) ; for ( ConnectionChangeListener ccl : connectionListeners ) { ccl . connectionChangeEventReceived ( cce ) ; }
public class TypeUtils { /** * Get a type representing { @ code type } with variable assignments " unrolled . " * @ param typeArguments as from { @ link TypeUtils # getTypeArguments ( Type , Class ) } * @ param type the type to unroll variable assignments for * @ return Type * @ since 3.2 */ public static Type ...
if ( typeArguments == null ) { typeArguments = Collections . emptyMap ( ) ; } if ( containsTypeVariables ( type ) ) { if ( type instanceof TypeVariable < ? > ) { return unrollVariables ( typeArguments , typeArguments . get ( type ) ) ; } if ( type instanceof ParameterizedType ) { final ParameterizedType p = ( Parameter...
public class GwtWebsocketsDemo { /** * This is the entry point method . */ public void onModuleLoad ( ) { } }
final Button sendButton = new Button ( "Send" ) ; final TextBox nameField = new TextBox ( ) ; nameField . setText ( "GWT User" ) ; final Label errorLabel = new Label ( ) ; final Label outputLabel = new Label ( ) ; final Element output = DOM . getElementById ( "output" ) ; final Element status = DOM . getElementById ( "...
public class JschUtil { /** * 解除端口映射 * @ param session 需要解除端口映射的SSH会话 * @ param localPort 需要解除的本地端口 * @ return 解除成功与否 */ public static boolean unBindPort ( Session session , int localPort ) { } }
try { session . delPortForwardingL ( localPort ) ; return true ; } catch ( JSchException e ) { throw new JschRuntimeException ( e ) ; }
public class CalibrationDetectorChessboard2 { /** * This target is composed of a checkered chess board like squares . Each corner of an interior square * touches an adjacent square , but the sides are separated . Only interior square corners provide * calibration points . * @ param numRows Number of grid rows in ...
List < Point2D_F64 > all = new ArrayList < > ( ) ; // convert it into the number of calibration points numCols = numCols - 1 ; numRows = numRows - 1 ; // center the grid around the origin . length of a size divided by two double startX = - ( ( numCols - 1 ) * squareWidth ) / 2.0 ; double startY = - ( ( numRows - 1 ) * ...
public class MitigationMarshaller { /** * Marshall the given parameter object . */ public void marshall ( Mitigation mitigation , ProtocolMarshaller protocolMarshaller ) { } }
if ( mitigation == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( mitigation . getMitigationName ( ) , MITIGATIONNAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessa...
public class StringUtils { /** * Splits a String on word boundaries , yielding tokens that are all * " single words " ( see { @ link # isSingleWord ( String ) } ) or delimitors ( if * includeDelims is set to true ) * @ param value * the String to split * @ param includeDelims * whether or not to include the...
if ( value == null ) { return Collections . emptyList ( ) ; } return Arrays . asList ( WORD_BOUNDARY_PATTERN . split ( value ) ) ;
public class CorePlugin { /** * Cycles through all provided Elasticsearch URLs and returns one * @ return One of the provided Elasticsearch URLs */ public URL getElasticsearchUrl ( ) { } }
final List < URL > urls = elasticsearchUrls . getValue ( ) ; if ( urls . isEmpty ( ) ) { return null ; } final int index = accessesToElasticsearchUrl . getAndIncrement ( ) % urls . size ( ) ; URL elasticsearchURL = urls . get ( index ) ; final String defaultUsernameValue = elasticsearchDefaultUsername . getValue ( ) ; ...
public class GeneratedDContactDaoImpl { /** * query - by method for field lastName * @ param lastName the specified attribute * @ return an Iterable of DContacts for the specified lastName */ public Iterable < DContact > queryByLastName ( Object parent , java . lang . String lastName ) { } }
return queryByField ( parent , DContactMapper . Field . LASTNAME . getFieldName ( ) , lastName ) ;
public class JMessageClient { /** * Add members to chat room * @ param roomId chat room id * @ param members username array * @ return No content * @ throws APIConnectionException connect exception * @ throws APIRequestException request exception */ public ResponseWrapper addChatRoomMember ( long roomId , Str...
return _chatRoomClient . addChatRoomMember ( roomId , members ) ;
public class SwingUtil { /** * Adds a one pixel border of random color to this and all panels contained in this panel ' s * child hierarchy . */ public static void addDebugBorders ( JPanel panel ) { } }
Color bcolor = new Color ( _rando . nextInt ( 256 ) , _rando . nextInt ( 256 ) , _rando . nextInt ( 256 ) ) ; panel . setBorder ( BorderFactory . createLineBorder ( bcolor ) ) ; for ( int ii = 0 ; ii < panel . getComponentCount ( ) ; ii ++ ) { Object child = panel . getComponent ( ii ) ; if ( child instanceof JPanel ) ...
public class Evaluator { /** * Gets the . * @ param < T > the generic type * @ param _ idx the idx * @ return the t * @ throws EFapsException on error */ @ SuppressWarnings ( "unchecked" ) public < T > T get ( final int _idx ) throws EFapsException { } }
initialize ( true ) ; Object ret = null ; final int idx = _idx - 1 ; if ( this . selection . getSelects ( ) . size ( ) > idx ) { final Select select = this . selection . getSelects ( ) . get ( idx ) ; ret = get ( select ) ; } return ( T ) ret ;
public class CmsSystemConfiguration { /** * VFS version history settings are set here . < p > * @ param historyEnabled if true the history is enabled * @ param historyVersions the maximum number of versions that are kept per VFS resource * @ param historyVersionsAfterDeletion the maximum number of versions for de...
m_historyEnabled = Boolean . valueOf ( historyEnabled ) . booleanValue ( ) ; m_historyVersions = Integer . valueOf ( historyVersions ) . intValue ( ) ; m_historyVersionsAfterDeletion = Integer . valueOf ( historyVersionsAfterDeletion ) . intValue ( ) ; if ( CmsLog . INIT . isInfoEnabled ( ) ) { CmsLog . INIT . info ( M...
public class LongStreamEx { /** * Returns a sequential ordered { @ code LongStreamEx } whose elements are the * values in the supplied { @ link java . nio . LongBuffer } . * The resulting stream covers only a portion of { @ code LongBuffer } content * which starts with { @ linkplain Buffer # position ( ) position...
return IntStreamEx . range ( buf . position ( ) , buf . limit ( ) ) . mapToLong ( buf :: get ) ;
public class ReflectionUtils { /** * Searches the classpath for all public concrete subtypes of the given interface or abstract class . * @ param type to search concrete subtypes of * @ param < T > the actual type to introspect * @ return a list of all concrete subtypes found */ public static < T > List < Class <...
return ClassGraphFacade . getPublicConcreteSubTypesOf ( type ) ;
public class Header { /** * getter for copyright - gets Copyright information , C * @ generated * @ return value of the feature */ public String getCopyright ( ) { } }
if ( Header_Type . featOkTst && ( ( Header_Type ) jcasType ) . casFeat_copyright == null ) jcasType . jcas . throwFeatMissing ( "copyright" , "de.julielab.jules.types.Header" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( Header_Type ) jcasType ) . casFeatCode_copyright ) ;
public class CardLoadSupport { /** * start load data for a card , usually called by { @ link TangramEngine } * @ param card the card need async loading data */ public void doLoad ( final Card card ) { } }
if ( mAsyncLoader == null ) { return ; } if ( ! card . loading && ! card . loaded ) { card . loading = true ; mAsyncLoader . loadData ( card , new AsyncLoader . LoadedCallback ( ) { @ Override public void finish ( ) { card . loading = false ; card . loaded = true ; } @ Override public void finish ( List < BaseCell > ce...
public class ExqlPatternImpl { /** * 执行转换 */ protected void execute ( ExqlContext context , ExprResolver exprResolver ) throws Exception { } }
// 转换语句内容 unit . fill ( context , exprResolver ) ; // 输出日志 if ( logger . isDebugEnabled ( ) ) { String flushOut = context . flushOut ( ) ; String args = Arrays . toString ( context . getArgs ( ) ) ; logger . debug ( "EXQL pattern executing:\n origin: " + pattern + "\n result: " + flushOut + "\n params: " + arg...
public class JSParser { /** * Primitive : : = . . . all possible XML Schema built - in types */ final public JSPrimitive Primitive ( ) throws ParseException { } }
Token t ; JSPrimitive ans = new JSPrimitive ( ) ; switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case 13 : t = jj_consume_token ( 13 ) ; break ; case 14 : t = jj_consume_token ( 14 ) ; break ; case 15 : t = jj_consume_token ( 15 ) ; break ; case 16 : t = jj_consume_token ( 16 ) ; break ; case 17 : t = jj_consume_...
public class SegmentIntegration { /** * Create a { @ link QueueFile } in the given folder with the given name . If the underlying file is * somehow corrupted , we ' ll delete it , and try to recreate the file . This method will throw an * { @ link IOException } if the directory doesn ' t exist and could not be crea...
createDirectory ( folder ) ; File file = new File ( folder , name ) ; try { return new QueueFile ( file ) ; } catch ( IOException e ) { // noinspection ResultOfMethodCallIgnored if ( file . delete ( ) ) { return new QueueFile ( file ) ; } else { throw new IOException ( "Could not create queue file (" + name + ") in " +...
public class RequestFromVertx { /** * Gets the ' raw ' body . * @ return the raw body , { @ code null } if there is no body . */ public String getRawBodyAsString ( ) { } }
if ( raw == null ) { return null ; } return raw . toString ( Charsets . UTF_8 . displayName ( ) ) ;
public class ConverterConfiguration { /** * Resolves and returns name of the type given to provided class . * @ param clazz { @ link Class } to resolve type name for * @ return type name or < code > null < / code > if type was not registered */ public String getTypeName ( Class < ? > clazz ) { } }
Type type = typeAnnotations . get ( clazz ) ; if ( type != null ) { return type . value ( ) ; } return null ;
public class DefaultPageErrorHandler { /** * The interception method . When the request is unbound , generate a 404 page . When the controller throws an * exception generates a 500 page . * @ param route the route * @ param context the filter context * @ return the generated result . * @ throws Exception if a...
// Manage the error file . // In dev mode , if the watching pipeline throws an error , this error is stored in the error . json file // If this file exist , we should display a page telling the user that something terrible happened in his last // change . if ( configuration . isDev ( ) && context . request ( ) . accept...
public class VirtualNetworkTapsInner { /** * Creates or updates a Virtual Network Tap . * @ param resourceGroupName The name of the resource group . * @ param tapName The name of the virtual network tap . * @ param parameters Parameters supplied to the create or update virtual network tap operation . * @ throws...
return createOrUpdateWithServiceResponseAsync ( resourceGroupName , tapName , parameters ) . map ( new Func1 < ServiceResponse < VirtualNetworkTapInner > , VirtualNetworkTapInner > ( ) { @ Override public VirtualNetworkTapInner call ( ServiceResponse < VirtualNetworkTapInner > response ) { return response . body ( ) ; ...
public class HtmlAdaptorServlet { /** * Display all MBeans * @ param request The HTTP request * @ param response The HTTP response * @ exception ServletException Thrown if an error occurs * @ exception IOException Thrown if an I / O error occurs */ private void displayMBeans ( HttpServletRequest request , HttpS...
Iterator mbeans ; try { mbeans = getDomainData ( ) ; } catch ( Exception e ) { throw new ServletException ( "Failed to get MBeans" , e ) ; } request . setAttribute ( "mbeans" , mbeans ) ; RequestDispatcher rd = this . getServletContext ( ) . getRequestDispatcher ( "/displaymbeans.jsp" ) ; rd . forward ( request , respo...
public class LongStream { /** * Returns an { @ code DoubleStream } consisting of the results of applying the given * function to the elements of this stream . * < p > This is an intermediate operation . * @ param mapper the mapper function used to apply to each element * @ return the new { @ code DoubleStream }...
return new DoubleStream ( params , new LongMapToDouble ( iterator , mapper ) ) ;
public class UIValidateForm { /** * Getters & Setters */ public String getFields ( ) { } }
StateHelper helper = this . getStateHelper ( true ) ; return ( String ) helper . get ( FIELDS_KEY ) ;
public class SwiftDocEscaping { /** * Return a deprecated attribute , as a string of Swift source . * @ param deprecatedProp provides the deprecated Pegasus schema property , if any . May be a * Boolean , a String , or null . * @ return a Swift property indicating that a type or field is deprecated . */ public st...
boolean emptyDeprecated = ( deprecatedProp == null ) ; if ( emptyDeprecated ) { return "" ; } else if ( deprecatedProp instanceof String ) { return "@available(*, deprecated, message=\"" + deprecatedProp + "\")" ; } else { return "@available(*, deprecated)" ; }
public class ProcessorLRE { /** * Receive notification of the end of an element . * @ param handler non - null reference to current StylesheetHandler that is constructing the Templates . * @ param uri The Namespace URI , or an empty string . * @ param localName The local name ( without prefix ) , or empty string ...
ElemTemplateElement elem = handler . getElemTemplateElement ( ) ; if ( elem instanceof ElemLiteralResult ) { if ( ( ( ElemLiteralResult ) elem ) . getIsLiteralResultAsStylesheet ( ) ) { handler . popStylesheet ( ) ; } } super . endElement ( handler , uri , localName , rawName ) ;
public class ConfirmPublicVirtualInterfaceRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ConfirmPublicVirtualInterfaceRequest confirmPublicVirtualInterfaceRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( confirmPublicVirtualInterfaceRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( confirmPublicVirtualInterfaceRequest . getVirtualInterfaceId ( ) , VIRTUALINTERFACEID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientExcep...
public class WarpGroupImpl { /** * ( non - Javadoc ) * @ see org . jboss . arquillian . warp . impl . client . execution . WarpGroup # pushResponsePayload ( org . jboss . arquillian . warp . impl . shared . ResponsePayload ) */ public boolean pushResponsePayload ( ResponsePayload responsePayload ) { } }
if ( payloads . containsKey ( responsePayload . getSerialId ( ) ) ) { payloads . put ( responsePayload . getSerialId ( ) , responsePayload ) ; return true ; } return false ;
public class VolumeStatusInfo { /** * The details of the volume status . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setDetails ( java . util . Collection ) } or { @ link # withDetails ( java . util . Collection ) } if you want to override * the existin...
if ( this . details == null ) { setDetails ( new com . amazonaws . internal . SdkInternalList < VolumeStatusDetails > ( details . length ) ) ; } for ( VolumeStatusDetails ele : details ) { this . details . add ( ele ) ; } return this ;
public class LWJGL3TypeConversions { /** * Convert faces from GL constants . * @ param face The GL constant . * @ return The value . */ public static JCGLCubeMapFaceLH cubeFaceFromGL ( final int face ) { } }
switch ( face ) { case GL13 . GL_TEXTURE_CUBE_MAP_NEGATIVE_X : return JCGLCubeMapFaceLH . CUBE_MAP_LH_NEGATIVE_X ; case GL13 . GL_TEXTURE_CUBE_MAP_POSITIVE_X : return JCGLCubeMapFaceLH . CUBE_MAP_LH_POSITIVE_X ; case GL13 . GL_TEXTURE_CUBE_MAP_POSITIVE_Y : return JCGLCubeMapFaceLH . CUBE_MAP_LH_POSITIVE_Y ; case GL13 ....
public class DbUtil { /** * 设置全局配置 : 是否通过debug日志显示SQL * @ param isShowSql 是否显示SQL * @ param isFormatSql 是否格式化显示的SQL * @ param isShowParams 是否打印参数 * @ param level SQL打印到的日志等级 * @ since 4.1.7 */ public static void setShowSqlGlobal ( boolean isShowSql , boolean isFormatSql , boolean isShowParams , Level level ) ...
SqlLog . INSTASNCE . init ( isShowSql , isFormatSql , isShowParams , level ) ;
public class RowAVLDisk { /** * Sets the file position for the row * @ param pos position in data file */ public void setPos ( int pos ) { } }
position = pos ; NodeAVL n = nPrimaryNode ; while ( n != null ) { ( ( NodeAVLDisk ) n ) . iData = position ; n = n . nNext ; }
public class Param { /** * Services the page fragment . This version simply prints the value of * this parameter to teh PageContext ' s out . */ public void service ( PageContext pContext ) throws ServletException , IOException { } }
JspWriter writer = pContext . getOut ( ) ; writer . print ( value ) ;
public class SoitoolkitLoggerModule { /** * Log processor for level ERROR * { @ sample . xml . . / . . / . . / doc / SoitoolkitLogger - connector . xml . sample soitoolkitlogger : log } * @ param message Log - message to be processed * @ param integrationScenario Optional name of the integration scenario or busin...
return doLog ( LogLevelType . ERROR , message , integrationScenario , contractId , correlationId , extra ) ;
public class PngOptimizerTask { private void convert ( ) { } }
long start = System . currentTimeMillis ( ) ; PngOptimizer optimizer = new PngOptimizer ( logLevel ) ; optimizer . setCompressor ( compressor , iterations ) ; optimizer . setGenerateDataUriCss ( generateDataUriCss ) ; for ( FileSet fileset : filesets ) { DirectoryScanner ds = fileset . getDirectoryScanner ( getProject ...
public class Transfer { /** * Run with - - help arg for syntax help . * @ throws IllegalArgumentException for the obvious reason */ public static void main ( String [ ] arg ) { } }
System . getProperties ( ) . put ( "sun.java2d.noddraw" , "true" ) ; bMustExit = true ; try { work ( arg ) ; } catch ( IllegalArgumentException iae ) { throw new IllegalArgumentException ( "Try: java " + Transfer . class . getName ( ) + " --help" ) ; }
public class ClosestPointPathShadow2ai { /** * Determine where the segment is crossing the two shadow lines . * @ param shadowX0 x coordinate of the reference point of the first shadow line . * @ param shadowY0 y coordinate of the reference point of the first shadow line . * @ param shadowX1 x coordinate of the r...
"checkstyle:parameternumber" , "checkstyle:cyclomaticcomplexity" , "checkstyle:npathcomplexity" } ) private void crossSegmentTwoShadowLines ( int shadowX0 , int shadowY0 , int shadowX1 , int shadowY1 , int sx0 , int sy0 , int sx1 , int sy1 ) { // Update the global bounds of the shadow . final int shadowYmin = Math . mi...
public class CollectionNamingConfusion { /** * overrides the visitor to look for local variables where the name has ' Map ' , ' Set ' , ' List ' in it but the type of that field isn ' t that . note that this * only is useful if compiled with debug labels . * @ param obj * the currently parsed method */ @ Override...
LocalVariableTable lvt = obj . getLocalVariableTable ( ) ; if ( lvt != null ) { LocalVariable [ ] lvs = lvt . getLocalVariableTable ( ) ; for ( LocalVariable lv : lvs ) { if ( checkConfusedName ( lv . getName ( ) , lv . getSignature ( ) ) ) { bugReporter . reportBug ( new BugInstance ( this , BugType . CNC_COLLECTION_N...
public class JvmTypesBuilder { /** * Adds or removes the annotation { @ link Extension @ Extension } from the given parameter . If the annotation is * already present , nothing is done if { @ code value } is { @ code true } . If it is not present and { @ code value } * is { @ code false } , this is a no - op , too ...
if ( parameter == null ) return ; internalSetExtension ( parameter , sourceElement , value ) ;
public class JsonConfig { /** * Removes a JsonValueProcessor . < br > * [ Java - & gt ; JSON ] * @ param beanClass the class to which the property may belong * @ param key the name of the property which may belong to the target class */ public void unregisterJsonValueProcessor ( Class beanClass , String key ) { }...
if ( beanClass != null && key != null ) { beanKeyMap . remove ( beanClass , key ) ; }
public class Encodings { /** * Determines if the encoding specified was recognized by the * serializer or not . * @ param encoding The encoding * @ return boolean - true if the encoding was recognized else false */ public static boolean isRecognizedEncoding ( String encoding ) { } }
EncodingInfo ei ; String normalizedEncoding = encoding . toUpperCase ( ) ; ei = ( EncodingInfo ) _encodingTableKeyJava . get ( normalizedEncoding ) ; if ( ei == null ) ei = ( EncodingInfo ) _encodingTableKeyMime . get ( normalizedEncoding ) ; if ( ei != null ) return true ; return false ;
public class BulkMigrateChangelogCommand { /** * - - - - - private methods - - - - - */ private void handleObject ( final GraphObject obj ) { } }
final PropertyContainer propertyContainer = obj . getPropertyContainer ( ) ; final String changeLogName = "structrChangeLog" ; if ( propertyContainer . hasProperty ( changeLogName ) ) { final Object changeLogSource = propertyContainer . getProperty ( changeLogName ) ; if ( changeLogSource instanceof String ) { final St...
public class RepositoryApplicationConfiguration { /** * { @ link JpaSoftwareModuleManagement } bean . * @ return a new { @ link SoftwareModuleManagement } */ @ Bean @ ConditionalOnMissingBean SoftwareModuleManagement softwareModuleManagement ( final EntityManager entityManager , final DistributionSetRepository distri...
return new JpaSoftwareModuleManagement ( entityManager , distributionSetRepository , softwareModuleRepository , softwareModuleMetadataRepository , softwareModuleTypeRepository , criteriaNoCountDao , auditorProvider , artifactManagement , quotaManagement , virtualPropertyReplacer , properties . getDatabase ( ) ) ;
public class UriSourceSupplier { /** * Validates that { @ link URI } expressed as { @ link String } is of proper * format and could be converted to an instance of the { @ link URI } . */ public static boolean isURI ( String source ) { } }
Pattern pattern = Pattern . compile ( "^[a-zA-Z0-9\\-_]+:" ) ; return pattern . matcher ( source ) . find ( ) ;
public class JSONObject { /** * Get the int value associated with a key . * @ param key * A key string . * @ return The integer value . * @ throws JSONException * if the key is not found or if the value cannot be converted * to an integer . */ public int getInt ( String key ) throws JSONException { } }
Object object = this . get ( key ) ; try { return object instanceof Number ? ( ( Number ) object ) . intValue ( ) : Integer . parseInt ( ( String ) object ) ; } catch ( Exception e ) { throw new JSONException ( "JSONObject[" + quote ( key ) + "] is not an int." ) ; }
public class Timestamp { /** * Returns a timestamp relative to this one by the given number of minutes . * This method always returns a Timestamp with at least MINUTE precision . * For example , adding one minute to { @ code 2011T } results in * { @ code 2011-01-01T00:01-00:00 } . To receive a Timestamp that alwa...
long delta = ( long ) amount * 60 * 1000 ; return addMillisForPrecision ( delta , Precision . MINUTE , false ) ;
public class HttpUtil { /** * Fetch charset from Content - Type header value . * @ param contentTypeValue Content - Type header value to parse * @ return the charset from message ' s Content - Type header or { @ link CharsetUtil # ISO _ 8859_1} * if charset is not presented or unparsable */ public static Charset ...
if ( contentTypeValue != null ) { return getCharset ( contentTypeValue , CharsetUtil . ISO_8859_1 ) ; } else { return CharsetUtil . ISO_8859_1 ; }
public class DescribeConfigRulesResult { /** * The details about your AWS Config rules . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setConfigRules ( java . util . Collection ) } or { @ link # withConfigRules ( java . util . Collection ) } if you want to ...
if ( this . configRules == null ) { setConfigRules ( new com . amazonaws . internal . SdkInternalList < ConfigRule > ( configRules . length ) ) ; } for ( ConfigRule ele : configRules ) { this . configRules . add ( ele ) ; } return this ;
public class GenericCsvInputFormat { @ Override public void open ( FileInputSplit split ) throws IOException { } }
super . open ( split ) ; // instantiate the parsers FieldParser < ? > [ ] parsers = new FieldParser < ? > [ fieldTypes . length ] ; for ( int i = 0 ; i < fieldTypes . length ; i ++ ) { if ( fieldTypes [ i ] != null ) { Class < ? extends FieldParser < ? > > parserType = FieldParser . getParserForType ( fieldTypes [ i ] ...
public class GenericResponseBuilder { /** * Replaces all of the headers with the these headers . * @ param headers the new headers to be used , { @ code null } to remove all existing headers * @ return this builder */ public GenericResponseBuilder < T > replaceAll ( MultivaluedMap < String , Object > headers ) { } ...
rawBuilder . replaceAll ( headers ) ; return this ;
public class MapMakerInternalMap { /** * Guarded By Segment . this */ @ VisibleForTesting ValueReference < K , V > newValueReference ( ReferenceEntry < K , V > entry , V value ) { } }
int hash = entry . getHash ( ) ; return valueStrength . referenceValue ( segmentFor ( hash ) , entry , value ) ;
public class ResolutionPreference { /** * Parses a specific textual representation of a resolution and returns its dimensions . * @ param context * The context , which should be used , as an instance of the class { @ link Context } . The * context may not be null * @ param resolution * The textual representat...
Condition . INSTANCE . ensureNotNull ( context , "The context may not be null" ) ; Condition . INSTANCE . ensureNotNull ( resolution , "The resolution may not be null" ) ; Condition . INSTANCE . ensureNotEmpty ( resolution , "The resolution may not be empty" ) ; String separator = context . getString ( R . string . res...
public class SystemParameter { /** * < pre > * Define the URL query parameter name to use for the parameter . It is case * sensitive . * < / pre > * < code > string url _ query _ parameter = 3 ; < / code > */ public com . google . protobuf . ByteString getUrlQueryParameterBytes ( ) { } }
java . lang . Object ref = urlQueryParameter_ ; if ( ref instanceof java . lang . String ) { com . google . protobuf . ByteString b = com . google . protobuf . ByteString . copyFromUtf8 ( ( java . lang . String ) ref ) ; urlQueryParameter_ = b ; return b ; } else { return ( com . google . protobuf . ByteString ) ref ; ...
public class UpdateCsvClassifierRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( UpdateCsvClassifierRequest updateCsvClassifierRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( updateCsvClassifierRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateCsvClassifierRequest . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( updateCsvClassifierRequest . getDelimiter ( ) , DELIMITER_BINDING ...
public class POJOHelper { /** * Sets common structure to JSON objects for specific elements * " key " : " myKey2 " , * " keyType " : " java . lang . String " , * " value " : " java . lang . String " * @ param obj objects to be added here * @ return OrderedJSONObject */ private static OrderedJSONObject setComm...
obj . put ( "key" , "myKey2" ) ; obj . put ( "keyType" , "java.lang.String" ) ; obj . put ( "value" , "java.lang.String" ) ; return obj ;
public class LibraryPackageExporter { /** * Does a refreshBundles call and waits for the async operation to complete before returning . */ private void refresh ( Collection < Bundle > bundles ) { } }
if ( FrameworkState . isStopping ( ) ) { // do nothing ; system is shutting down removal pendings will be removed automatically return ; } Bundle system = context . getBundle ( Constants . SYSTEM_BUNDLE_LOCATION ) ; FrameworkWiring fwkWiring = system . adapt ( FrameworkWiring . class ) ; final CountDownLatch refreshed ...
public class Error { /** * Thrown when the xml configuration doesn ' t exist . * @ param destination destination class name * @ param source source class name */ public static void classesNotConfigured ( Class < ? > destination , Class < ? > source ) { } }
throw new MappingNotFoundException ( MSG . INSTANCE . message ( Constants . mappingNotFoundException2 , destination . getSimpleName ( ) , source . getSimpleName ( ) ) ) ;
public class BufferUtil { /** * Get the array from a read - only { @ link ByteBuffer } similar to { @ link ByteBuffer # array ( ) } . * @ param buffer that wraps the underlying array . * @ return the underlying array . */ public static byte [ ] array ( final ByteBuffer buffer ) { } }
if ( buffer . isDirect ( ) ) { throw new IllegalArgumentException ( "buffer must wrap an array" ) ; } return ( byte [ ] ) UNSAFE . getObject ( buffer , BYTE_BUFFER_HB_FIELD_OFFSET ) ;
public class RestController { /** * Notifies all waiting signal work items of the given workflow instance and the given signal name . * Technically , sets the work item ' s result value and updates the status to EXECUTED . * < pre > * Request : POST / workflowInstance / 1 / signal / invoice { argument : { refNum ...
MediaType . APPLICATION_JSON_VALUE , MediaType . TEXT_XML_VALUE } ) public ResponseEntity < Void > sendSignal ( @ PathVariable long woinRefNum , @ PathVariable String signal , @ RequestBody String argument ) { facade . sendSignalToWorkflowInstance ( woinRefNum , signal , JsonUtil . deserialize ( argument ) ) ; return n...