signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < }
* { @ link CmisExtensionType } { @ code > } */
@ XmlElementDecl ( namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/" , name = "extension" , scope = CreateType . class ) public JAXBElement < CmisExtensionType > createCreateTypeExtension ( CmisExtensionType value ) { } } | return new JAXBElement < CmisExtensionType > ( _GetPropertiesExtension_QNAME , CmisExtensionType . class , CreateType . class , value ) ; |
public class Matrix4f { /** * / * ( non - Javadoc )
* @ see org . joml . Matrix4fc # scale ( org . joml . Vector3fc , org . joml . Matrix4f ) */
public Matrix4f scale ( Vector3fc xyz , Matrix4f dest ) { } } | return scale ( xyz . x ( ) , xyz . y ( ) , xyz . z ( ) , dest ) ; |
public class Gradient { /** * Randomize the gradient . */
public void randomize ( ) { } } | numKnots = 4 + ( int ) ( 6 * Math . random ( ) ) ; xKnots = new int [ numKnots ] ; yKnots = new int [ numKnots ] ; knotTypes = new byte [ numKnots ] ; for ( int i = 0 ; i < numKnots ; i ++ ) { xKnots [ i ] = ( int ) ( 255 * Math . random ( ) ) ; yKnots [ i ] = 0xff000000 | ( ( int ) ( 255 * Math . random ( ) ) << 16 ) | ( ( int ) ( 255 * Math . random ( ) ) << 8 ) | ( int ) ( 255 * Math . random ( ) ) ; knotTypes [ i ] = RGB | SPLINE ; } xKnots [ 0 ] = - 1 ; xKnots [ 1 ] = 0 ; xKnots [ numKnots - 2 ] = 255 ; xKnots [ numKnots - 1 ] = 256 ; sortKnots ( ) ; rebuildGradient ( ) ; |
public class JCublasNDArrayFactory { /** * Creates an ndarray with the specified shape
* @ param list
* @ param shape the shape of the ndarray
* @ return the instance */
@ Override public INDArray create ( List < INDArray > list , int [ ] shape ) { } } | if ( order == FORTRAN ) return new JCublasNDArray ( list , shape , ArrayUtil . calcStridesFortran ( shape ) ) ; else return new JCublasNDArray ( list , shape ) ; |
public class YarnContainerManager { /** * Release the given container . */
void release ( final String containerId ) { } } | LOG . log ( Level . FINE , "Release container: {0}" , containerId ) ; final Container container = this . containers . removeAndGet ( containerId ) ; this . resourceManager . releaseAssignedContainer ( container . getId ( ) ) ; updateRuntimeStatus ( ) ; |
public class NumberPickerPreference { /** * Obtains the minimum number , the preference allows to choose , from a specific typed array .
* @ param typedArray
* The typed array , the minimum number should be obtained from , as an instance of the
* class { @ link TypedArray } . The typed array may not be null */
private void obtainMinNumber ( @ NonNull final TypedArray typedArray ) { } } | int defaultValue = getContext ( ) . getResources ( ) . getInteger ( R . integer . number_picker_preference_default_min_number ) ; setMinNumber ( typedArray . getInteger ( R . styleable . AbstractNumericPreference_min , defaultValue ) ) ; |
public class SpringPropertyProxy { /** * { @ inheritDoc } */
@ Override public Class < ? > getType ( Object instance , String propertyName ) { } } | return PropertyProxyUtils . getPropertyAccessor ( this . conversionService , this . useDirectFieldAccess , instance ) . getPropertyType ( propertyName ) ; |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getIfcEvent ( ) { } } | if ( ifcEventEClass == null ) { ifcEventEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 239 ) ; } return ifcEventEClass ; |
public class EndlessScrollHelper { /** * Registers an { @ link OnNewItemsListener OnNewItemsListener } that delivers results to the
* specified { @ link ModelAdapter } through its { @ link ModelAdapter # add } method .
* @ param modelItemAdapter
* @ return
* @ see # withNewItemsDeliveredTo ( ModelAdapter , OnNewItemsListener ) withNewItemsDeliveredTo ( ModelAdapter , OnNewItemsListener ) */
public EndlessScrollHelper < Model > withNewItemsDeliveredTo ( @ NonNull ModelAdapter < Model , ? > modelItemAdapter ) { } } | mOnNewItemsListener = new DeliverToModelAdapter < > ( modelItemAdapter ) ; return this ; |
public class DescriptionResponse { /** * / * ( non - Javadoc )
* @ see tuwien . auto . calimero . knxnetip . servicetype . ServiceType # toByteArray
* ( java . io . ByteArrayOutputStream ) */
byte [ ] toByteArray ( ByteArrayOutputStream os ) { } } | byte [ ] buf = device . toByteArray ( ) ; os . write ( buf , 0 , buf . length ) ; buf = suppfam . toByteArray ( ) ; os . write ( buf , 0 , buf . length ) ; if ( mfr != null ) { buf = mfr . toByteArray ( ) ; os . write ( buf , 0 , buf . length ) ; } return os . toByteArray ( ) ; |
public class SegmentsUtil { /** * set long from segments .
* @ param segments target segments .
* @ param offset value offset . */
public static void setLong ( MemorySegment [ ] segments , int offset , long value ) { } } | if ( inFirstSegment ( segments , offset , 8 ) ) { segments [ 0 ] . putLong ( offset , value ) ; } else { setLongMultiSegments ( segments , offset , value ) ; } |
public class NetworkManager { /** * Deploys a complete network . */
private void deployNetwork ( final NetworkContext context , final Handler < AsyncResult < NetworkContext > > doneHandler ) { } } | log . debug ( String . format ( "%s - Deploying network" , NetworkManager . this ) ) ; final CountingCompletionHandler < Void > complete = new CountingCompletionHandler < Void > ( context . components ( ) . size ( ) ) ; complete . setHandler ( new Handler < AsyncResult < Void > > ( ) { @ Override public void handle ( AsyncResult < Void > result ) { if ( result . failed ( ) ) { new DefaultFutureResult < NetworkContext > ( result . cause ( ) ) . setHandler ( doneHandler ) ; } else { new DefaultFutureResult < NetworkContext > ( context ) . setHandler ( doneHandler ) ; } } } ) ; deployComponents ( context . components ( ) , complete ) ; |
public class AmazonLightsailClient { /** * Creates one of the following entry records associated with the domain : Address ( A ) , canonical name ( CNAME ) , mail
* exchanger ( MX ) , name server ( NS ) , start of authority ( SOA ) , service locator ( SRV ) , or text ( TXT ) .
* The < code > create domain entry < / code > operation supports tag - based access control via resource tags applied to the
* resource identified by domainName . For more information , see the < a
* href = " https : / / lightsail . aws . amazon . com / ls / docs / en / articles / amazon - lightsail - controlling - access - using - tags "
* > Lightsail Dev Guide < / a > .
* @ param createDomainEntryRequest
* @ return Result of the CreateDomainEntry operation returned by the service .
* @ throws ServiceException
* A general service exception .
* @ throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field . < / p > < note >
* Domain - related APIs are only available in the N . Virginia ( us - east - 1 ) Region . Please set your AWS Region
* configuration to us - east - 1 to create , view , or edit these resources .
* @ throws NotFoundException
* Lightsail throws this exception when it cannot find a resource .
* @ throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute .
* @ throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource .
* @ throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state .
* @ throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated .
* @ sample AmazonLightsail . CreateDomainEntry
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / lightsail - 2016-11-28 / CreateDomainEntry " target = " _ top " > AWS
* API Documentation < / a > */
@ Override public CreateDomainEntryResult createDomainEntry ( CreateDomainEntryRequest request ) { } } | request = beforeClientExecution ( request ) ; return executeCreateDomainEntry ( request ) ; |
public class MediaAPI { /** * 高级群发 构成 MassMPnewsMessage 对象的前置请求接口
* @ param access _ token access _ token
* @ param articles 图文信息 1-10 个
* @ return Media */
public static Media mediaUploadnews ( String access_token , List < Article > articles ) { } } | String str = JsonUtil . toJSONString ( articles ) ; String messageJson = "{\"articles\":" + str + "}" ; return mediaUploadnews ( access_token , messageJson ) ; |
public class CPAttachmentFileEntryPersistenceImpl { /** * Returns the first cp attachment file entry in the ordered set where classNameId = & # 63 ; and classPK = & # 63 ; and displayDate & lt ; & # 63 ; and status = & # 63 ; .
* @ param classNameId the class name ID
* @ param classPK the class pk
* @ param displayDate the display date
* @ param status the status
* @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > )
* @ return the first matching cp attachment file entry , or < code > null < / code > if a matching cp attachment file entry could not be found */
@ Override public CPAttachmentFileEntry fetchByC_C_LtD_S_First ( long classNameId , long classPK , Date displayDate , int status , OrderByComparator < CPAttachmentFileEntry > orderByComparator ) { } } | List < CPAttachmentFileEntry > list = findByC_C_LtD_S ( classNameId , classPK , displayDate , status , 0 , 1 , orderByComparator ) ; if ( ! list . isEmpty ( ) ) { return list . get ( 0 ) ; } return null ; |
public class PathAnimationActivity { /** * We need this setter to translate between the information the animator
* produces ( a new " PathPoint " describing the current animated location )
* and the information that the button requires ( an xy location ) . The
* setter will be called by the ObjectAnimator given the ' buttonLoc '
* property string . */
public void setButtonLoc ( PathPoint newLoc ) { } } | mButtonProxy . setTranslationX ( newLoc . mX ) ; mButtonProxy . setTranslationY ( newLoc . mY ) ; |
public class ClassUtils { /** * メソッドがプリミティブ型のbooleanに対するgetterの書式かどうか判定する 。
* < ol >
* < li > メソッド名が ' is ' か始まっていること 。 < / li >
* < li > メソッド名が3文字以上であること 。 < / li >
* < li > 引数がないこと 。 < / li >
* < li > 戻り値がプリミティブのboolean型であること 。 < / li >
* < / ol >
* @ param method メソッド情報
* @ return trueの場合はboolean型のgetterメソッドである 。 */
public static boolean isBooleanGetterMethod ( final Method method ) { } } | final String methodName = method . getName ( ) ; if ( ! methodName . startsWith ( "is" ) ) { return false ; } else if ( methodName . length ( ) <= 2 ) { return false ; } if ( method . getParameterCount ( ) > 0 ) { return false ; } if ( ! isPrimitiveBoolean ( method . getReturnType ( ) ) ) { return false ; } return true ; |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < }
* { @ link CmisExtensionType } { @ code > } */
@ XmlElementDecl ( namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/" , name = "extension" , scope = GetAllVersions . class ) public JAXBElement < CmisExtensionType > createGetAllVersionsExtension ( CmisExtensionType value ) { } } | return new JAXBElement < CmisExtensionType > ( _GetPropertiesExtension_QNAME , CmisExtensionType . class , GetAllVersions . class , value ) ; |
public class AppsImpl { /** * Creates a new LUIS app .
* @ param applicationCreateObject A model containing Name , Description ( optional ) , Culture , Usage Scenario ( optional ) , Domain ( optional ) and initial version ID ( optional ) of the application . Default value for the version ID is 0.1 . Note : the culture cannot be changed after the app is created .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the UUID object */
public Observable < ServiceResponse < UUID > > addWithServiceResponseAsync ( ApplicationCreateObject applicationCreateObject ) { } } | if ( this . client . endpoint ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.endpoint() is required and cannot be null." ) ; } if ( applicationCreateObject == null ) { throw new IllegalArgumentException ( "Parameter applicationCreateObject is required and cannot be null." ) ; } Validator . validate ( applicationCreateObject ) ; String parameterizedHost = Joiner . on ( ", " ) . join ( "{Endpoint}" , this . client . endpoint ( ) ) ; return service . add ( applicationCreateObject , this . client . acceptLanguage ( ) , parameterizedHost , this . client . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponse < UUID > > > ( ) { @ Override public Observable < ServiceResponse < UUID > > call ( Response < ResponseBody > response ) { try { ServiceResponse < UUID > clientResponse = addDelegate ( response ) ; return Observable . just ( clientResponse ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ; |
public class CreateProjectRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( CreateProjectRequest createProjectRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( createProjectRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( createProjectRequest . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( createProjectRequest . getDescription ( ) , DESCRIPTION_BINDING ) ; protocolMarshaller . marshall ( createProjectRequest . getSource ( ) , SOURCE_BINDING ) ; protocolMarshaller . marshall ( createProjectRequest . getSecondarySources ( ) , SECONDARYSOURCES_BINDING ) ; protocolMarshaller . marshall ( createProjectRequest . getArtifacts ( ) , ARTIFACTS_BINDING ) ; protocolMarshaller . marshall ( createProjectRequest . getSecondaryArtifacts ( ) , SECONDARYARTIFACTS_BINDING ) ; protocolMarshaller . marshall ( createProjectRequest . getCache ( ) , CACHE_BINDING ) ; protocolMarshaller . marshall ( createProjectRequest . getEnvironment ( ) , ENVIRONMENT_BINDING ) ; protocolMarshaller . marshall ( createProjectRequest . getServiceRole ( ) , SERVICEROLE_BINDING ) ; protocolMarshaller . marshall ( createProjectRequest . getTimeoutInMinutes ( ) , TIMEOUTINMINUTES_BINDING ) ; protocolMarshaller . marshall ( createProjectRequest . getQueuedTimeoutInMinutes ( ) , QUEUEDTIMEOUTINMINUTES_BINDING ) ; protocolMarshaller . marshall ( createProjectRequest . getEncryptionKey ( ) , ENCRYPTIONKEY_BINDING ) ; protocolMarshaller . marshall ( createProjectRequest . getTags ( ) , TAGS_BINDING ) ; protocolMarshaller . marshall ( createProjectRequest . getVpcConfig ( ) , VPCCONFIG_BINDING ) ; protocolMarshaller . marshall ( createProjectRequest . getBadgeEnabled ( ) , BADGEENABLED_BINDING ) ; protocolMarshaller . marshall ( createProjectRequest . getLogsConfig ( ) , LOGSCONFIG_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; } |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getIfcElementType ( ) { } } | if ( ifcElementTypeEClass == null ) { ifcElementTypeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 227 ) ; } return ifcElementTypeEClass ; |
public class SortedTextFile { public CloseableIterator < String > getSplitIterator ( String start , String end , int numSplits ) throws IOException { } } | SeekableLineReader slr = factory . get ( ) ; long [ ] offsets = getStartEndOffsets ( slr , start , end ) ; return new StepSeekingIterator ( slr , offsets [ 0 ] , offsets [ 1 ] , numSplits ) ; |
public class CmsSerialDateValue { /** * Read an optional uuid stored as JSON string .
* @ param val the JSON value to read the uuid from .
* @ return the uuid , or < code > null < / code > if the uuid can not be read . */
private CmsUUID readOptionalUUID ( JSONValue val ) { } } | String id = readOptionalString ( val ) ; if ( null != id ) { try { CmsUUID uuid = CmsUUID . valueOf ( id ) ; return uuid ; } catch ( @ SuppressWarnings ( "unused" ) NumberFormatException e ) { // Do nothing , just return null
} } return null ; |
public class RuleSetFactory { /** * Return matcher implementation depending on the conversion mode
* @ param conversionType
* @ return AbstractMatcher implementation */
public static RuleSet getMatcherImpl ( int conversionType ) { } } | switch ( conversionType ) { case Constant . JCL_TO_SLF4J : return new JCLRuleSet ( ) ; case Constant . LOG4J_TO_SLF4J : return new Log4jRuleSet ( ) ; case Constant . JUL_TO_SLF4J : return new JULRuleSet ( ) ; case Constant . NOP_TO_SLF4J : return new EmptyRuleSet ( ) ; default : return null ; } |
public class GreenPepperServerServiceImpl { /** * { @ inheritDoc } */
public void updateRunner ( String oldRunnerName , Runner runner ) throws GreenPepperServerException { } } | try { sessionService . startSession ( ) ; sessionService . beginTransaction ( ) ; sutDao . update ( oldRunnerName , runner ) ; sessionService . commitTransaction ( ) ; log . debug ( "Updated Runner: " + oldRunnerName ) ; } catch ( Exception ex ) { sessionService . rollbackTransaction ( ) ; throw handleException ( RUNNER_UPDATE_FAILED , ex ) ; } finally { sessionService . closeSession ( ) ; } |
public class TDistribution { /** * Two - tailed quantile . */
public double quantile2tiled ( double p ) { } } | if ( p < 0.0 || p > 1.0 ) { throw new IllegalArgumentException ( "Invalid p: " + p ) ; } double x = Beta . inverseRegularizedIncompleteBetaFunction ( 0.5 * nu , 0.5 , 1.0 - p ) ; return Math . sqrt ( nu * ( 1.0 - x ) / x ) ; |
public class OrderHandler { /** * { @ inheritDoc } */
@ Override public void handleChannelData ( final String action , final JSONArray payload ) throws BitfinexClientException { } } | logger . info ( "Got order callback {}" , payload . toString ( ) ) ; // No orders active
if ( payload . isEmpty ( ) ) { eventConsumer . accept ( symbol , Lists . newArrayList ( ) ) ; return ; } // Snapshot or update
List < BitfinexSubmittedOrder > orders = Lists . newArrayList ( ) ; if ( payload . get ( 0 ) instanceof JSONArray ) { for ( int orderPos = 0 ; orderPos < payload . length ( ) ; orderPos ++ ) { final JSONArray orderArray = payload . getJSONArray ( orderPos ) ; BitfinexSubmittedOrder exchangeOrder = jsonToBitfinexSubmittedOrder ( orderArray ) ; orders . add ( exchangeOrder ) ; } } else { BitfinexSubmittedOrder exchangeOrder = jsonToBitfinexSubmittedOrder ( payload ) ; orders . add ( exchangeOrder ) ; } eventConsumer . accept ( symbol , orders ) ; |
public class WarProbeOption { /** * This option implies { @ code autoClasspath ( false ) } and adds the given regular expressions to
* the classpath filters .
* @ param excludeRegExp
* list of regular expressions . Classpath libraries or folders matching any of these
* will be excluded
* @ return { @ code this } for fluent syntax */
public WarProbeOption exclude ( String ... excludeRegExp ) { } } | useClasspath = true ; for ( String exclude : excludeRegExp ) { classpathFilters . add ( exclude ) ; } return this ; |
public class DOMConfigurator { /** * Used internally to parse the roor category element . */
protected void parseRoot ( Element rootElement ) { } } | Logger root = repository . getRootLogger ( ) ; // category configuration needs to be atomic
synchronized ( root ) { parseChildrenOfLoggerElement ( rootElement , root , true ) ; } |
public class ModelsImpl { /** * Gets information about the composite entity model .
* @ param appId The application ID .
* @ param versionId The version ID .
* @ param cEntityId The composite entity extractor ID .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the CompositeEntityExtractor object */
public Observable < ServiceResponse < CompositeEntityExtractor > > getCompositeEntityWithServiceResponseAsync ( UUID appId , String versionId , UUID cEntityId ) { } } | if ( this . client . endpoint ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.endpoint() is required and cannot be null." ) ; } if ( appId == null ) { throw new IllegalArgumentException ( "Parameter appId is required and cannot be null." ) ; } if ( versionId == null ) { throw new IllegalArgumentException ( "Parameter versionId is required and cannot be null." ) ; } if ( cEntityId == null ) { throw new IllegalArgumentException ( "Parameter cEntityId is required and cannot be null." ) ; } String parameterizedHost = Joiner . on ( ", " ) . join ( "{Endpoint}" , this . client . endpoint ( ) ) ; return service . getCompositeEntity ( appId , versionId , cEntityId , this . client . acceptLanguage ( ) , parameterizedHost , this . client . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponse < CompositeEntityExtractor > > > ( ) { @ Override public Observable < ServiceResponse < CompositeEntityExtractor > > call ( Response < ResponseBody > response ) { try { ServiceResponse < CompositeEntityExtractor > clientResponse = getCompositeEntityDelegate ( response ) ; return Observable . just ( clientResponse ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ; |
public class ListVersionsResponse { /** * < pre >
* The versions belonging to the requested service .
* < / pre >
* < code > repeated . google . appengine . v1 . Version versions = 1 ; < / code > */
public java . util . List < ? extends com . google . appengine . v1 . VersionOrBuilder > getVersionsOrBuilderList ( ) { } } | return versions_ ; |
public class KruskalMSTGAC { public void computeMST ( double [ ] [ ] costs , UndirectedGraph graph ) throws ContradictionException { } } | g = graph ; ma = propHK . getMandatoryArcsList ( ) ; sortArcs ( costs ) ; treeCost = 0 ; cctRoot = n - 1 ; int tSize = addMandatoryArcs ( ) ; connectMST ( tSize ) ; |
public class FileDataServlet { /** * Create a redirection URI */
protected URI createUri ( FileStatus i , UnixUserGroupInformation ugi , ClientProtocol nnproxy , HttpServletRequest request ) throws IOException , URISyntaxException { } } | return createUri ( i . getPath ( ) . toString ( ) , pickSrcDatanode ( i , nnproxy ) , ugi , request ) ; |
public class ByteArray { /** * Returns a 64 - bit integer that can be used as the prefix used in sorting . */
public static long getPrefix ( byte [ ] bytes ) { } } | if ( bytes == null ) { return 0L ; } else { final int minLen = Math . min ( bytes . length , 8 ) ; long p = 0 ; for ( int i = 0 ; i < minLen ; ++ i ) { p |= ( ( long ) Platform . getByte ( bytes , Platform . BYTE_ARRAY_OFFSET + i ) & 0xff ) << ( 56 - 8 * i ) ; } return p ; } |
public class ScrollBarButtonPainter { /** * DOCUMENT ME !
* @ param g DOCUMENT ME !
* @ param width DOCUMENT ME !
* @ param height DOCUMENT ME ! */
private void paintBackgroundApart ( Graphics2D g , int width , int height ) { } } | Shape s = shapeGenerator . createScrollButtonApart ( 0 , 0 , width , height ) ; dropShadow . fill ( g , s ) ; fillScrollBarButtonInteriorColors ( g , s , isIncrease , buttonsTogether ) ; |
public class PropertyParser { /** * When this is called , the LBRACE token has already been read . */
private void parseBlock ( String keyPrefix ) throws IOException { } } | parsePropertyList ( keyPrefix ) ; Token token ; if ( ( token = peek ( ) ) . getId ( ) == Token . RBRACE ) { read ( ) ; } else { error ( "Right brace expected" , token ) ; } |
public class FileUtils { /** * Creates an < code > Element < / code > that describes the supplied file or directory ( and , possibly , all its
* subdirectories ) . Includes absolute path , last modified time , read / write permissions , etc .
* @ param aFilePath A file system path to turn into XML
* @ param aBool A boolean indicating whether the XML should contain more than one level
* @ return An element representation of the file structure
* @ throws FileNotFoundException If the supplied file does not exist
* @ throws ParserConfigurationException If the default XML parser for the JRE isn ' t configured correctly */
public static Element toElement ( final String aFilePath , final boolean aBool ) throws FileNotFoundException , ParserConfigurationException { } } | return toElement ( aFilePath , WILDCARD , aBool ) ; |
public class HToolScreen { /** * Display this screen ' s toolbars in html input format .
* @ param out The HTML output stream .
* @ param iHtmlAttributes The HTML attributes .
* returns true if default params were found for this form .
* @ exception DBException File exception . */
public boolean printToolbarData ( boolean bFieldsFound , PrintWriter out , int iHtmlAttributes ) { } } | int iNumCols = ( ( ToolScreen ) this . getScreenField ( ) ) . getSFieldCount ( ) ; for ( int iIndex = 0 ; iIndex < iNumCols ; iIndex ++ ) { ScreenField sField = ( ( ToolScreen ) this . getScreenField ( ) ) . getSField ( iIndex ) ; if ( sField . getConverter ( ) == null ) if ( sField instanceof SCannedBox ) { SCannedBox button = ( SCannedBox ) sField ; // Found the toolscreen
String strCommand = button . getButtonCommand ( ) ; if ( strCommand . equalsIgnoreCase ( MenuConstants . BACK ) ) { // Ignore back for HTML
} else if ( strCommand . equalsIgnoreCase ( MenuConstants . HELP ) ) { // Ignore help for HTML
} else if ( strCommand . equalsIgnoreCase ( MenuConstants . RESET ) ) { // Special case - for reset do an HTML reset
out . println ( "<input type=\"Reset\"/>" ) ; bFieldsFound = false ; // Don ' t need Submit / Reset button
} else if ( ( strCommand . equalsIgnoreCase ( MenuConstants . FIRST ) ) || ( strCommand . equalsIgnoreCase ( MenuConstants . PREVIOUS ) ) || ( strCommand . equalsIgnoreCase ( MenuConstants . NEXT ) ) || ( strCommand . equalsIgnoreCase ( MenuConstants . LAST ) ) || ( strCommand . equalsIgnoreCase ( MenuConstants . SUBMIT ) ) || ( strCommand . equalsIgnoreCase ( MenuConstants . DELETE ) ) ) { // Valid command - send it as a post command
out . println ( "<input type=\"submit\" name=\"" + DBParams . COMMAND + "\" value=\"" + strCommand + "\"/>" ) ; bFieldsFound = false ; // Don ' t need Submit button
} else if ( strCommand . equalsIgnoreCase ( MenuConstants . FORM ) ) { // Valid command - send it as a post command
if ( this . getMainRecord ( ) != null ) { String strRecord = this . getMainRecord ( ) . getClass ( ) . getName ( ) . toString ( ) ; String strLink = "?" + DBParams . RECORD + "=" + strRecord + "&" + DBParams . COMMAND + "=" + MenuConstants . REFRESH ; out . println ( "<input type=\"button\" value=" + strCommand + " onclick=\"window.open('" + strLink + "','_top');\"/>" ) ; } } else if ( strCommand . equalsIgnoreCase ( MenuConstants . LOOKUP ) ) { // Valid command - send it as a post command
if ( this . getMainRecord ( ) != null ) { String strRecord = this . getMainRecord ( ) . getClass ( ) . getName ( ) . toString ( ) ; String strLink = "?" + DBParams . RECORD + "=" + strRecord ; out . println ( "<input type=\"button\" value=\"Lookup\" onclick=\"window.open('" + strLink + "','_top');\"/>" ) ; } } else { // Valid command - send it as a post command
// + Add code here to process a doCommand ( xxx )
} } } String strCommand = MenuConstants . SUBMIT ; if ( this . getScreenField ( ) . getParentScreen ( ) instanceof GridScreen ) { strCommand = MenuConstants . LOOKUP ; if ( this . getScreenField ( ) . getParentScreen ( ) . getEditing ( ) ) bFieldsFound = true ; // Need these buttons for grid input
} if ( bFieldsFound ) { out . println ( "<input type=\"submit\" name=\"" + DBParams . COMMAND + "\" value=\"" + strCommand + "\"/>" ) ; out . println ( "<input type=\"Reset\"/>" ) ; } return bFieldsFound ; |
public class XMLUtils { /** * Determines if a character is an XML name character .
* @ param codePoint
* The code point of the character to be tested . For UTF - 8 and UTF - 16
* characters the code point corresponds to the value of the char
* that represents the character .
* @ return { @ code true } if { @ code codePoint } is an XML name start character ,
* otherwise { @ code false } */
public static boolean isXMLNameChar ( int codePoint ) { } } | return isXMLNameStartCharacter ( codePoint ) || codePoint == '-' || codePoint == '.' || codePoint >= '0' && codePoint <= '9' || codePoint == 0xB7 || codePoint >= 0x0300 && codePoint <= 0x036F || codePoint >= 0x203F && codePoint <= 0x2040 ; |
public class Mimetypes { /** * Reads and stores the mime type setting corresponding to a file extension , by reading
* text from an InputStream . If a mime type setting already exists when this method is run ,
* the mime type value is replaced with the newer one .
* @ param is
* @ throws IOException */
public void loadAndReplaceMimetypes ( InputStream is ) throws IOException { } } | BufferedReader br = new BufferedReader ( new InputStreamReader ( is , StringUtils . UTF8 ) ) ; String line = null ; while ( ( line = br . readLine ( ) ) != null ) { line = line . trim ( ) ; if ( line . startsWith ( "#" ) || line . length ( ) == 0 ) { // Ignore comments and empty lines .
} else { StringTokenizer st = new StringTokenizer ( line , " \t" ) ; if ( st . countTokens ( ) > 1 ) { String mimetype = st . nextToken ( ) ; while ( st . hasMoreTokens ( ) ) { String extension = st . nextToken ( ) ; extensionToMimetypeMap . put ( StringUtils . lowerCase ( extension ) , mimetype ) ; if ( log . isDebugEnabled ( ) ) { log . debug ( "Setting mime type for extension '" + StringUtils . lowerCase ( extension ) + "' to '" + mimetype + "'" ) ; } } } else { if ( log . isDebugEnabled ( ) ) { log . debug ( "Ignoring mimetype with no associated file extensions: '" + line + "'" ) ; } } } } |
public class ScanProgressDialog { /** * Set the scan that will be shown in this dialog .
* @ param scan the active scan , might be { @ code null } . */
public void setActiveScan ( ActiveScan scan ) { } } | this . scan = scan ; if ( scan == null ) { return ; } getHostSelect ( ) . removeAll ( ) ; for ( HostProcess hp : scan . getHostProcesses ( ) ) { getHostSelect ( ) . addItem ( hp . getHostAndPort ( ) ) ; } Thread thread = new Thread ( ) { @ Override public void run ( ) { while ( ! stopThread ) { SwingUtilities . invokeLater ( new Runnable ( ) { @ Override public void run ( ) { updateProgress ( ) ; } } ) ; try { sleep ( 200 ) ; } catch ( InterruptedException e ) { // Ignore
} } } } ; thread . start ( ) ; |
public class AbstractItem { /** * Called by { @ link # doConfirmRename } and { @ code rename . jelly } to validate renames .
* @ return { @ link FormValidation # ok } if this item can be renamed as specified , otherwise
* { @ link FormValidation # error } with a message explaining the problem . */
@ Restricted ( NoExternalUse . class ) public @ Nonnull FormValidation doCheckNewName ( @ QueryParameter String newName ) { } } | // TODO : Create an Item . RENAME permission to use here , see JENKINS - 18649.
if ( ! hasPermission ( Item . CONFIGURE ) ) { if ( parent instanceof AccessControlled ) { ( ( AccessControlled ) parent ) . checkPermission ( Item . CREATE ) ; } checkPermission ( Item . DELETE ) ; } newName = newName == null ? null : newName . trim ( ) ; try { Jenkins . checkGoodName ( newName ) ; assert newName != null ; // Would have thrown Failure
if ( newName . equals ( name ) ) { return FormValidation . warning ( Messages . AbstractItem_NewNameUnchanged ( ) ) ; } Jenkins . get ( ) . getProjectNamingStrategy ( ) . checkName ( newName ) ; checkIfNameIsUsed ( newName ) ; checkRename ( newName ) ; } catch ( Failure e ) { return FormValidation . error ( e . getMessage ( ) ) ; } return FormValidation . ok ( ) ; |
public class SimpleDateFormat { /** * Check whether the ' field ' is smaller than all the fields covered in
* pattern , return true if it is .
* The sequence of calendar field ,
* from large to small is : ERA , YEAR , MONTH , DATE , AM _ PM , HOUR , MINUTE , . . .
* @ param pattern the pattern to check against
* @ param field the calendar field need to check against
* @ return true if the ' field ' is smaller than all the fields
* covered in pattern . false otherwise . */
static boolean isFieldUnitIgnored ( String pattern , int field ) { } } | int fieldLevel = CALENDAR_FIELD_TO_LEVEL [ field ] ; int level ; char ch ; boolean inQuote = false ; char prevCh = 0 ; int count = 0 ; for ( int i = 0 ; i < pattern . length ( ) ; ++ i ) { ch = pattern . charAt ( i ) ; if ( ch != prevCh && count > 0 ) { level = getLevelFromChar ( prevCh ) ; if ( fieldLevel <= level ) { return false ; } count = 0 ; } if ( ch == '\'' ) { if ( ( i + 1 ) < pattern . length ( ) && pattern . charAt ( i + 1 ) == '\'' ) { ++ i ; } else { inQuote = ! inQuote ; } } else if ( ! inQuote && isSyntaxChar ( ch ) ) { prevCh = ch ; ++ count ; } } if ( count > 0 ) { // last item
level = getLevelFromChar ( prevCh ) ; if ( fieldLevel <= level ) { return false ; } } return true ; |
public class EnhanceImageOps { /** * Applies a Laplacian - 4 based sharpen filter to the image .
* @ param input Input image .
* @ param output Output image . */
public static void sharpen4 ( GrayU8 input , GrayU8 output ) { } } | InputSanityCheck . checkSameShape ( input , output ) ; if ( BoofConcurrency . USE_CONCURRENT ) { ImplEnhanceFilter_MT . sharpenInner4 ( input , output , 0 , 255 ) ; ImplEnhanceFilter_MT . sharpenBorder4 ( input , output , 0 , 255 ) ; } else { ImplEnhanceFilter . sharpenInner4 ( input , output , 0 , 255 ) ; ImplEnhanceFilter . sharpenBorder4 ( input , output , 0 , 255 ) ; } |
public class SessionBeanTypeImpl { /** * Returns all < code > env - entry < / code > elements
* @ return list of < code > env - entry < / code > */
public List < EnvEntryType < SessionBeanType < T > > > getAllEnvEntry ( ) { } } | List < EnvEntryType < SessionBeanType < T > > > list = new ArrayList < EnvEntryType < SessionBeanType < T > > > ( ) ; List < Node > nodeList = childNode . get ( "env-entry" ) ; for ( Node node : nodeList ) { EnvEntryType < SessionBeanType < T > > type = new EnvEntryTypeImpl < SessionBeanType < T > > ( this , "env-entry" , childNode , node ) ; list . add ( type ) ; } return list ; |
public class JDBC4ResultSet { /** * ResultSet object as a Blob object in the Java programming language . */
@ Override public Blob getBlob ( int columnIndex ) throws SQLException { } } | checkColumnBounds ( columnIndex ) ; try { return new SerialBlob ( table . getStringAsBytes ( columnIndex - 1 ) ) ; } catch ( Exception x ) { throw SQLError . get ( x ) ; } |
public class xen_supplemental_pack { /** * Use this API to fetch filtered set of xen _ supplemental _ pack resources .
* filter string should be in JSON format . eg : " vm _ state : DOWN , name : [ a - z ] + " */
public static xen_supplemental_pack [ ] get_filtered ( nitro_service service , String filter ) throws Exception { } } | xen_supplemental_pack obj = new xen_supplemental_pack ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; xen_supplemental_pack [ ] response = ( xen_supplemental_pack [ ] ) obj . getfiltered ( service , option ) ; return response ; |
public class MPP14Reader { /** * Extracts task enterprise column values .
* @ param id task unique ID
* @ param task task instance
* @ param taskVarData task var data
* @ param metaData2 task meta data */
private void processTaskEnterpriseColumns ( Integer id , Task task , Var2Data taskVarData , byte [ ] metaData2 ) { } } | if ( metaData2 != null ) { int bits = MPPUtility . getInt ( metaData2 , 29 ) ; task . set ( TaskField . ENTERPRISE_FLAG1 , Boolean . valueOf ( ( bits & 0x0000800 ) != 0 ) ) ; task . set ( TaskField . ENTERPRISE_FLAG2 , Boolean . valueOf ( ( bits & 0x0001000 ) != 0 ) ) ; task . set ( TaskField . ENTERPRISE_FLAG3 , Boolean . valueOf ( ( bits & 0x0002000 ) != 0 ) ) ; task . set ( TaskField . ENTERPRISE_FLAG4 , Boolean . valueOf ( ( bits & 0x0004000 ) != 0 ) ) ; task . set ( TaskField . ENTERPRISE_FLAG5 , Boolean . valueOf ( ( bits & 0x0008000 ) != 0 ) ) ; task . set ( TaskField . ENTERPRISE_FLAG6 , Boolean . valueOf ( ( bits & 0x0001000 ) != 0 ) ) ; task . set ( TaskField . ENTERPRISE_FLAG7 , Boolean . valueOf ( ( bits & 0x0002000 ) != 0 ) ) ; task . set ( TaskField . ENTERPRISE_FLAG8 , Boolean . valueOf ( ( bits & 0x0004000 ) != 0 ) ) ; task . set ( TaskField . ENTERPRISE_FLAG9 , Boolean . valueOf ( ( bits & 0x0008000 ) != 0 ) ) ; task . set ( TaskField . ENTERPRISE_FLAG10 , Boolean . valueOf ( ( bits & 0x0010000 ) != 0 ) ) ; task . set ( TaskField . ENTERPRISE_FLAG11 , Boolean . valueOf ( ( bits & 0x0020000 ) != 0 ) ) ; task . set ( TaskField . ENTERPRISE_FLAG12 , Boolean . valueOf ( ( bits & 0x0040000 ) != 0 ) ) ; task . set ( TaskField . ENTERPRISE_FLAG13 , Boolean . valueOf ( ( bits & 0x0080000 ) != 0 ) ) ; task . set ( TaskField . ENTERPRISE_FLAG14 , Boolean . valueOf ( ( bits & 0x0100000 ) != 0 ) ) ; task . set ( TaskField . ENTERPRISE_FLAG15 , Boolean . valueOf ( ( bits & 0x0200000 ) != 0 ) ) ; task . set ( TaskField . ENTERPRISE_FLAG16 , Boolean . valueOf ( ( bits & 0x0400000 ) != 0 ) ) ; task . set ( TaskField . ENTERPRISE_FLAG17 , Boolean . valueOf ( ( bits & 0x0800000 ) != 0 ) ) ; task . set ( TaskField . ENTERPRISE_FLAG18 , Boolean . valueOf ( ( bits & 0x1000000 ) != 0 ) ) ; task . set ( TaskField . ENTERPRISE_FLAG19 , Boolean . valueOf ( ( bits & 0x2000000 ) != 0 ) ) ; task . set ( TaskField . ENTERPRISE_FLAG20 , Boolean . valueOf ( ( bits & 0x4000000 ) != 0 ) ) ; } |
public class Counter { /** * Purge les requêtes , requêtes en cours et erreurs puis positionne la date et heure de début
* à l ' heure courante . */
public void clear ( ) { } } | requests . clear ( ) ; rootCurrentContextsByThreadId . clear ( ) ; if ( errors != null ) { synchronized ( errors ) { errors . clear ( ) ; } } startDate = new Date ( ) ; |
public class RedisQueue { /** * { @ inheritDoc } */
@ Override protected void closeJedisCommands ( JedisCommands jedisCommands ) { } } | if ( jedisCommands instanceof Jedis ) { ( ( Jedis ) jedisCommands ) . close ( ) ; } else throw new IllegalArgumentException ( "Argument is not of type [" + Jedis . class + "]!" ) ; |
public class AmazonIdentityManagementClient { /** * Lists all IAM users , groups , and roles that the specified managed policy is attached to .
* You can use the optional < code > EntityFilter < / code > parameter to limit the results to a particular type of entity
* ( users , groups , or roles ) . For example , to list only the roles that are attached to the specified policy , set
* < code > EntityFilter < / code > to < code > Role < / code > .
* You can paginate the results using the < code > MaxItems < / code > and < code > Marker < / code > parameters .
* @ param listEntitiesForPolicyRequest
* @ return Result of the ListEntitiesForPolicy operation returned by the service .
* @ throws NoSuchEntityException
* The request was rejected because it referenced a resource entity that does not exist . The error message
* describes the resource .
* @ throws InvalidInputException
* The request was rejected because an invalid or out - of - range value was supplied for an input parameter .
* @ throws ServiceFailureException
* The request processing has failed because of an unknown error , exception or failure .
* @ sample AmazonIdentityManagement . ListEntitiesForPolicy
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / iam - 2010-05-08 / ListEntitiesForPolicy " target = " _ top " > AWS API
* Documentation < / a > */
@ Override public ListEntitiesForPolicyResult listEntitiesForPolicy ( ListEntitiesForPolicyRequest request ) { } } | request = beforeClientExecution ( request ) ; return executeListEntitiesForPolicy ( request ) ; |
public class AspectRatioImageView { /** * Set the dominant measurement for the aspect ratio .
* @ see # MEASUREMENT _ WIDTH
* @ see # MEASUREMENT _ HEIGHT */
public void setDominantMeasurement ( int dominantMeasurement ) { } } | if ( dominantMeasurement != MEASUREMENT_HEIGHT && dominantMeasurement != MEASUREMENT_WIDTH ) { throw new IllegalArgumentException ( "Invalid measurement type." ) ; } this . dominantMeasurement = dominantMeasurement ; requestLayout ( ) ; |
public class FXMLUtils { /** * Load a FXML component without resource bundle .
* The fxml path could be :
* < ul >
* < li > Relative : fxml file will be loaded with the classloader of the given model class < / li >
* < li > Absolute : fxml file will be loaded with default thread class loader , packages must be separated by / character < / li >
* < / ul >
* @ param model the model that will manage the fxml node
* @ param fxmlPath the fxml string path
* @ return a FXMLComponent object that wrap a fxml node with its controller
* @ param < M > the model type that will manage this fxml node */
public static < M extends Model > FXMLComponentBase loadFXML ( final M model , final String fxmlPath ) { } } | return loadFXML ( model , fxmlPath , null ) ; |
public class DescribeClusterRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( DescribeClusterRequest describeClusterRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( describeClusterRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeClusterRequest . getClusterId ( ) , CLUSTERID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; } |
public class NewRelicManager { /** * Synchronise the Plugins configuration with the cache .
* @ param cache The provider cache
* @ return < CODE > true < / CODE > if the operation was successful */
public boolean syncPlugins ( NewRelicCache cache ) { } } | boolean ret = true ; if ( apiClient == null ) throw new IllegalArgumentException ( "null API client" ) ; // Get the Plugins configuration using the REST API
if ( cache . isPluginsEnabled ( ) ) { ret = false ; logger . info ( "Getting the plugins" ) ; Collection < Plugin > plugins = apiClient . plugins ( ) . list ( true ) ; for ( Plugin plugin : plugins ) { cache . plugins ( ) . add ( plugin ) ; logger . fine ( "Getting the components for plugin: " + plugin . getId ( ) ) ; Collection < PluginComponent > components = apiClient . pluginComponents ( ) . list ( PluginComponentService . filters ( ) . pluginId ( plugin . getId ( ) ) . build ( ) ) ; cache . plugins ( ) . components ( plugin . getId ( ) ) . add ( components ) ; } cache . setUpdatedAt ( ) ; ret = true ; } return ret ; |
public class PkgRes { /** * Get a resource as a byte array .
* @ param name The name of the resource
* @ return The contents of the resource as a byte array .
* @ throws NullPointerException if name or obj are null .
* ResourceException if the resource cannot be found . */
public static byte [ ] getBytesFor ( String name , Object obj ) { } } | if ( obj == null ) throw new NullPointerException ( "obj is null" ) ; return getBytesFor ( name , obj . getClass ( ) ) ; |
public class Translator { /** * Copies the current translator into a new translator object . Even if this translator is resource bundle based ,
* the copy will not be .
* @ return a copy of the current translator */
public Translator < T > copy ( ) { } } | Translator < T > trans = new Translator < T > ( ) ; if ( isBundleBased ( ) ) { for ( Translation < T > t : values ( ) ) { Locale loc = t . getLocale ( ) ; trans . store ( loc , t . getData ( ) ) ; } } else { for ( String lang : translations . keySet ( ) ) { Map < String , Translation < T > > map = translations . get ( lang ) ; for ( String ctry : map . keySet ( ) ) { trans . store ( lang , ctry , map . get ( ctry ) ) ; } } } return trans ; |
public class CmsFileHistoryClear { /** * Starts the clean thread and shows the report . < p >
* Hides other formular elements , except for cancel button . < p > */
void startCleanAndShowReport ( ) { } } | // Start clean process in thread
A_CmsReportThread thread = startThread ( ) ; // Update UI
m_optionPanel . setVisible ( false ) ; m_reportPanel . setVisible ( true ) ; CmsReportWidget report = new CmsReportWidget ( thread ) ; report . setWidth ( "100%" ) ; report . setHeight ( "700px" ) ; m_reportPanel . setContent ( report ) ; m_ok . setEnabled ( false ) ; |
public class CPDAvailabilityEstimatePersistenceImpl { /** * Returns the last cpd availability estimate in the ordered set where commerceAvailabilityEstimateId = & # 63 ; .
* @ param commerceAvailabilityEstimateId the commerce availability estimate ID
* @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > )
* @ return the last matching cpd availability estimate
* @ throws NoSuchCPDAvailabilityEstimateException if a matching cpd availability estimate could not be found */
@ Override public CPDAvailabilityEstimate findByCommerceAvailabilityEstimateId_Last ( long commerceAvailabilityEstimateId , OrderByComparator < CPDAvailabilityEstimate > orderByComparator ) throws NoSuchCPDAvailabilityEstimateException { } } | CPDAvailabilityEstimate cpdAvailabilityEstimate = fetchByCommerceAvailabilityEstimateId_Last ( commerceAvailabilityEstimateId , orderByComparator ) ; if ( cpdAvailabilityEstimate != null ) { return cpdAvailabilityEstimate ; } StringBundler msg = new StringBundler ( 4 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "commerceAvailabilityEstimateId=" ) ; msg . append ( commerceAvailabilityEstimateId ) ; msg . append ( "}" ) ; throw new NoSuchCPDAvailabilityEstimateException ( msg . toString ( ) ) ; |
public class KafkaTableSourceBase { /** * NOTE : This method is for internal use only for defining a TableSource .
* Do not use it in Table API programs . */
@ Override public DataStream < Row > getDataStream ( StreamExecutionEnvironment env ) { } } | DeserializationSchema < Row > deserializationSchema = getDeserializationSchema ( ) ; // Version - specific Kafka consumer
FlinkKafkaConsumerBase < Row > kafkaConsumer = getKafkaConsumer ( topic , properties , deserializationSchema ) ; return env . addSource ( kafkaConsumer ) . name ( explainSource ( ) ) ; |
public class ArrayUtils { /** * < p > Defensive programming technique to change a < code > null < / code >
* reference to an empty one . < / p >
* < p > This method returns an empty array for a < code > null < / code > input array . < / p >
* < p > As a memory optimizing technique an empty array passed in will be overridden with
* the empty < code > public static < / code > references in this class . < / p >
* @ param array the array to check for < code > null < / code > or empty
* @ return the same array , < code > public static < / code > empty array if < code > null < / code > or empty input
* @ since 2.5 */
public static Character [ ] nullToEmpty ( Character [ ] array ) { } } | if ( array == null || array . length == 0 ) { return EMPTY_CHARACTER_OBJECT_ARRAY ; } return array ; |
public class TokenStream { /** * Parser calls the method when it gets / or / = in literal context . */
void readRegExp ( int startToken ) throws IOException { } } | int start = tokenBeg ; stringBufferTop = 0 ; if ( startToken == Token . ASSIGN_DIV ) { // Miss - scanned / =
addToString ( '=' ) ; } else { if ( startToken != Token . DIV ) Kit . codeBug ( ) ; } boolean inCharSet = false ; // true if inside a ' [ ' . . ' ] ' pair
int c ; while ( ( c = getChar ( ) ) != '/' || inCharSet ) { if ( c == '\n' || c == EOF_CHAR ) { ungetChar ( c ) ; tokenEnd = cursor - 1 ; this . string = new String ( stringBuffer , 0 , stringBufferTop ) ; parser . reportError ( "msg.unterminated.re.lit" ) ; return ; } if ( c == '\\' ) { addToString ( c ) ; c = getChar ( ) ; } else if ( c == '[' ) { inCharSet = true ; } else if ( c == ']' ) { inCharSet = false ; } addToString ( c ) ; } int reEnd = stringBufferTop ; while ( true ) { if ( matchChar ( 'g' ) ) addToString ( 'g' ) ; else if ( matchChar ( 'i' ) ) addToString ( 'i' ) ; else if ( matchChar ( 'm' ) ) addToString ( 'm' ) ; else if ( matchChar ( 'y' ) ) // FireFox 3
addToString ( 'y' ) ; else break ; } tokenEnd = start + stringBufferTop + 2 ; // include slashes
if ( isAlpha ( peekChar ( ) ) ) { parser . reportError ( "msg.invalid.re.flag" ) ; } this . string = new String ( stringBuffer , 0 , reEnd ) ; this . regExpFlags = new String ( stringBuffer , reEnd , stringBufferTop - reEnd ) ; |
public class GeneralFactory { /** * 获取默认的ThriftServer对象 */
@ Override public ThriftServer getThriftServer ( String serverName , int serverPort , Map < String , Service > serviceMap ) { } } | return getThriftServer ( serverName , serverPort , buildMultiplexedProcessor ( serviceMap ) ) ; |
public class QPath { /** * Makes ancestor path by relative degree ( For ex relativeDegree = = 1 means parent path etc )
* @ param relativeDegree
* @ return */
public QPath makeAncestorPath ( int relativeDegree ) { } } | int entryCount = getLength ( ) - relativeDegree ; QPathEntry [ ] ancestorEntries = new QPathEntry [ entryCount ] ; for ( int i = 0 ; i < entryCount ; i ++ ) { QPathEntry entry = names [ i ] ; ancestorEntries [ i ] = new QPathEntry ( entry . getNamespace ( ) , entry . getName ( ) , entry . getIndex ( ) ) ; } return new QPath ( ancestorEntries ) ; |
public class P2sVpnServerConfigurationsInner { /** * Deletes a P2SVpnServerConfiguration .
* @ param resourceGroupName The resource group name of the P2SVpnServerConfiguration .
* @ param virtualWanName The name of the VirtualWan .
* @ param p2SVpnServerConfigurationName The name of the P2SVpnServerConfiguration .
* @ param serviceCallback the async ServiceCallback to handle successful and failed responses .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the { @ link ServiceFuture } object */
public ServiceFuture < Void > beginDeleteAsync ( String resourceGroupName , String virtualWanName , String p2SVpnServerConfigurationName , final ServiceCallback < Void > serviceCallback ) { } } | return ServiceFuture . fromResponse ( beginDeleteWithServiceResponseAsync ( resourceGroupName , virtualWanName , p2SVpnServerConfigurationName ) , serviceCallback ) ; |
public class Mediawiki { /** * entry point e . g . for java - jar called provides a command line interface
* @ param args */
public static void main ( String args [ ] ) { } } | Mediawiki wiki ; try { wiki = new Mediawiki ( ) ; int result = wiki . maininstance ( args ) ; if ( ! testMode && result != 0 ) System . exit ( result ) ; } catch ( Exception e ) { // TODO Auto - generated catch block
e . printStackTrace ( ) ; } |
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public String convertIfcSwitchingDeviceTypeEnumToString ( EDataType eDataType , Object instanceValue ) { } } | return instanceValue == null ? null : instanceValue . toString ( ) ; |
public class IAddonBase { /** * Only for system usage , don ' t call it ! */
public final void attach ( T object , IAddon parent ) { } } | if ( mObject != null || object == null || mParent != null || parent == null ) { throw new IllegalStateException ( ) ; } mParent = parent ; onAttach ( mObject = object ) ; |
public class BufferCursorSeekBenchmark { /** * 2 MB = 256 Segments */
@ Setup public void setup ( ) throws IOException { } } | byte [ ] source = new byte [ 8192 ] ; buffer = new Buffer ( ) ; while ( buffer . size ( ) < bufferSize ) { buffer . write ( source ) ; } cursor = new Buffer . UnsafeCursor ( ) ; |
public class SARLQuickfixProvider { /** * Quick fix for " Class expected " .
* @ param issue the issue .
* @ param acceptor the quick fix acceptor . */
@ Fix ( IssueCodes . CLASS_EXPECTED ) public void fixClassExpected ( final Issue issue , IssueResolutionAcceptor acceptor ) { } } | ExtendedTypeRemoveModification . accept ( this , issue , acceptor ) ; |
public class ChannelDeleteHandler { /** * Handles a group channel deletion .
* @ param channel The channel data . */
private void handleGroupChannel ( JsonNode channel ) { } } | long channelId = channel . get ( "id" ) . asLong ( ) ; api . getGroupChannelById ( channelId ) . ifPresent ( groupChannel -> { GroupChannelDeleteEvent event = new GroupChannelDeleteEventImpl ( groupChannel ) ; api . getEventDispatcher ( ) . dispatchGroupChannelDeleteEvent ( api , Collections . singleton ( groupChannel ) , groupChannel . getMembers ( ) , event ) ; api . removeObjectListeners ( GroupChannel . class , channelId ) ; api . removeObjectListeners ( VoiceChannel . class , channelId ) ; api . removeObjectListeners ( TextChannel . class , channelId ) ; api . removeObjectListeners ( Channel . class , channelId ) ; api . forEachCachedMessageWhere ( msg -> msg . getChannel ( ) . getId ( ) == groupChannel . getId ( ) , msg -> api . removeMessageFromCache ( msg . getId ( ) ) ) ; } ) ; |
public class SARLOperationHelper { /** * Test if the given expression has side effects .
* @ param expression the expression .
* @ param context the list of context expressions .
* @ return { @ code true } if the expression has side effects . */
protected Boolean _hasSideEffects ( XCastedExpression expression , ISideEffectContext context ) { } } | return hasSideEffects ( expression . getTarget ( ) , context ) ; |
public class ProgressRule { /** * Gets the evaluationStatus value for this ProgressRule .
* @ return evaluationStatus * The status of this rule . */
public com . google . api . ads . admanager . axis . v201811 . WorkflowEvaluationStatus getEvaluationStatus ( ) { } } | return evaluationStatus ; |
public class BasicModelUtils { /** * Find all words with a similar characters
* in the vocab
* @ param word the word to compare
* @ param accuracy the accuracy : 0 to 1
* @ return the list of words that are similar in the vocab */
@ Override public List < String > similarWordsInVocabTo ( String word , double accuracy ) { } } | List < String > ret = new ArrayList < > ( ) ; for ( String s : vocabCache . words ( ) ) { if ( MathUtils . stringSimilarity ( word , s ) >= accuracy ) ret . add ( s ) ; } return ret ; |
public class RestorePointsInner { /** * Gets a list of database restore points .
* @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal .
* @ param serverName The name of the server .
* @ param databaseName The name of the database to get available restore points .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ throws CloudException thrown if the request is rejected by server
* @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @ return the List & lt ; RestorePointInner & gt ; object if successful . */
public List < RestorePointInner > listByDatabase ( String resourceGroupName , String serverName , String databaseName ) { } } | return listByDatabaseWithServiceResponseAsync ( resourceGroupName , serverName , databaseName ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class SimonUtils { /** * Aggregate statistics from all counters in hierarchy that pass specified filter . Filter is applied
* to all simons in the hierarchy of all types . If a simon is rejected by filter its children are not considered .
* Simons are aggregated in the top - bottom fashion , i . e . parent simons are aggregated before children .
* @ param simon root of the hierarchy of simons for which statistics will be aggregated
* @ param filter filter to select subsets of simons to aggregate
* @ return aggregates statistics
* @ since 3.5 */
public static CounterAggregate calculateCounterAggregate ( Simon simon , SimonFilter filter ) { } } | CounterAggregate aggregate = new CounterAggregate ( ) ; aggregateCounters ( aggregate , simon , filter != null ? filter : SimonFilter . ACCEPT_ALL_FILTER ) ; return aggregate ; |
public class ClassHelper { /** * Determines the type of a class implementing a generic interface with one type
* parameter .
* @ param genericType
* The generic interface type .
* @ param type
* The type to determine the parameter from .
* @ return The type parameter . */
public static Class < ? > getTypeParameter ( Class < ? > genericType , Class < ? > type ) { } } | Type [ ] genericInterfaces = type . getGenericInterfaces ( ) ; for ( Type genericInterface : genericInterfaces ) { if ( genericInterface instanceof ParameterizedType ) { ParameterizedType parameterizedType = ( ParameterizedType ) genericInterface ; if ( genericType . equals ( parameterizedType . getRawType ( ) ) ) { Type typeParameter = ( ( ParameterizedType ) genericInterface ) . getActualTypeArguments ( ) [ 0 ] ; if ( typeParameter instanceof Class < ? > ) { return ( Class < ? > ) typeParameter ; } } } } return null ; |
public class XGBoostUpdateTask { /** * This is called from driver */
public byte [ ] getBoosterBytes ( ) { } } | final H2ONode boosterNode = getBoosterNode ( ) ; final byte [ ] boosterBytes ; if ( H2O . SELF . equals ( boosterNode ) ) { boosterBytes = XGBoost . getRawArray ( XGBoostUpdater . getUpdater ( _modelKey ) . getBooster ( ) ) ; } else { Log . debug ( "Booster will be retrieved from a remote node, node=" + boosterNode ) ; FetchBoosterTask t = new FetchBoosterTask ( _modelKey ) ; boosterBytes = new RPC < > ( boosterNode , t ) . call ( ) . get ( ) . _boosterBytes ; } return boosterBytes ; |
public class CommonMBeanConnection { /** * Set up the common SSL context for the outbound connection .
* @ throws NoSuchAlgorithmException
* @ throws KeyManagementException */
private SSLSocketFactory setUpSSLContext ( ) throws NoSuchAlgorithmException , KeyManagementException { } } | SSLContext ctx = SSLContext . getInstance ( "SSL" ) ; ctx . init ( null , new TrustManager [ ] { createPromptingTrustManager ( ) } , null ) ; return ctx . getSocketFactory ( ) ; |
public class HiveRunnerConfig { /** * Get the configured hive . execution . engine . If not set it will default to the default value of HiveConf */
public String getHiveExecutionEngine ( ) { } } | String executionEngine = hiveConfSystemOverride . get ( HiveConf . ConfVars . HIVE_EXECUTION_ENGINE . varname ) ; return executionEngine == null ? HiveConf . ConfVars . HIVE_EXECUTION_ENGINE . getDefaultValue ( ) : executionEngine ; |
public class BackgroundModelStationary { /** * Updates the background and segments it at the same time . In some implementations this can be
* significantly faster than doing it with separate function calls . Segmentation is performed using the model
* which it has prior to the update . */
public void updateBackground ( T frame , GrayU8 segment ) { } } | updateBackground ( frame ) ; segment ( frame , segment ) ; |
public class CmsCategoryTree { /** * Uncheck all items in the list including all sub - items .
* @ param list list of CmsTreeItem entries . */
private void uncheckAll ( CmsList < ? extends I_CmsListItem > list ) { } } | for ( Widget it : list ) { CmsTreeItem treeItem = ( CmsTreeItem ) it ; treeItem . getCheckBox ( ) . setChecked ( false ) ; uncheckAll ( treeItem . getChildren ( ) ) ; } |
public class CHFWBundle { /** * Access the event service .
* @ return EventEngine - null if not found */
public static EventEngine getEventService ( ) { } } | CHFWBundle c = instance . get ( ) . get ( ) ; if ( null != c ) { return c . eventService ; } return null ; |
public class WatchMonitor { /** * 创建并初始化监听
* @ param file 文件
* @ param events 监听的事件列表
* @ return 监听对象 */
public static WatchMonitor create ( File file , WatchEvent . Kind < ? > ... events ) { } } | return create ( file , 0 , events ) ; |
public class TreeQuery { /** * Returns the path of the given node .
* @ param treeDefthe treeDef
* @ param nodethe root of the tree
* @ param toStringa function to map each node to a string in the path
* @ param delimitera string to use as a path separator */
public static < T > String path ( TreeDef . Parented < T > treeDef , T node , Function < ? super T , String > toString , String delimiter ) { } } | List < T > toRoot = toRoot ( treeDef , node ) ; ListIterator < T > iterator = toRoot . listIterator ( toRoot . size ( ) ) ; StringBuilder builder = new StringBuilder ( ) ; while ( iterator . hasPrevious ( ) ) { T segment = iterator . previous ( ) ; // add the node
builder . append ( toString . apply ( segment ) ) ; // add the separator if it makes sense
if ( iterator . hasPrevious ( ) ) { builder . append ( delimiter ) ; } } return builder . toString ( ) ; |
public class RunRemoteProcessMessageInProcessor { /** * Process this internal message .
* @ param internalMessage The message to process .
* @ return ( optional ) The return message if applicable . */
public BaseMessage processMessage ( BaseMessage internalMessage ) { } } | if ( internalMessage . getMessageDataDesc ( null ) == null ) internalMessage . addMessageDataDesc ( new RunRemoteProcessMessageData ( null , null ) ) ; RunRemoteProcessMessageData runRemoteProcessMessageData = ( RunRemoteProcessMessageData ) internalMessage . getMessageDataDesc ( null ) ; String processClassName = ( String ) runRemoteProcessMessageData . get ( RunRemoteProcessMessageData . PROCESS_CLASS_NAME ) ; if ( processClassName == null ) return null ; BaseProcess process = null ; Task task = this . getTask ( ) ; Map < String , Object > properties = new HashMap < String , Object > ( ) ; MapMessage . convertDOMtoMap ( internalMessage . getDOM ( ) , properties , true ) ; process = ( BaseProcess ) ClassServiceUtility . getClassService ( ) . makeObjectFromClassName ( processClassName ) ; if ( process == null ) return null ; process . init ( task , null , properties ) ; BaseMessage messageReply = null ; if ( process instanceof BaseMessageProcess ) messageReply = ( ( BaseMessageProcess ) process ) . processMessage ( internalMessage ) ; else process . run ( ) ; return messageReply ; |
public class NonceShop { /** * Produces a nonce that is associated with the given state and is to be proved within a time limit .
* @ param state an arbitrary state to be associated with the new nonce .
* @ param time the TTL of the new nonce , in milliseconds . If this parameter is 0 or negative , the default TTL is used instead .
* @ return the new nonce as a hexadecimal string */
public String produce ( String state , long time ) { } } | Nonce nonce = new Nonce ( INSTANCE , time > 0 ? time : TTL , SIZE , _random ) ; _map . put ( state + ':' + nonce . value , nonce ) ; return nonce . value ; |
public class OpenALStreamPlayer { /** * Stream some data from the audio stream to the buffer indicates by the ID
* @ param bufferId The ID of the buffer to fill
* @ return True if another section was available */
public boolean stream ( int bufferId ) { } } | try { int count = audio . read ( buffer ) ; if ( count != - 1 ) { bufferData . clear ( ) ; bufferData . put ( buffer , 0 , count ) ; bufferData . flip ( ) ; int format = audio . getChannels ( ) > 1 ? AL10 . AL_FORMAT_STEREO16 : AL10 . AL_FORMAT_MONO16 ; try { AL10 . alBufferData ( bufferId , format , bufferData , audio . getRate ( ) ) ; } catch ( OpenALException e ) { Log . error ( "Failed to loop buffer: " + bufferId + " " + format + " " + count + " " + audio . getRate ( ) , e ) ; return false ; } } else { if ( loop ) { initStreams ( ) ; stream ( bufferId ) ; } else { done = true ; return false ; } } return true ; } catch ( IOException e ) { Log . error ( e ) ; return false ; } |
public class CmsResourceUtil { /** * Returns the SOLR search result for the current resource . < p >
* @ param locale the content locale
* @ return the search result */
public CmsGallerySearchResult getSearchResult ( Locale locale ) { } } | if ( ! m_searchResultMap . containsKey ( locale ) ) { CmsGallerySearchResult sResult ; try { sResult = CmsGallerySearch . searchById ( m_cms , m_resource . getStructureId ( ) , locale ) ; m_searchResultMap . put ( locale , sResult ) ; } catch ( CmsException e ) { LOG . error ( e . getLocalizedMessage ( ) , e ) ; } } return m_searchResultMap . get ( locale ) ; |
public class AptUtil { /** * Returns unqualified class name ( e . g . String , if java . lang . String )
* NB : This method requires the given element has the kind of { @ link ElementKind # CLASS } .
* @ param tm
* @ return unqualified class name
* @ author vvakame */
public static String getSimpleName ( TypeMirror tm ) { } } | String str = tm . toString ( ) ; int i = str . lastIndexOf ( "." ) ; return str . substring ( i + 1 ) ; |
public class ReceiveQueueSession { /** * Listen for messages .
* @ param message The message to send back to the client . */
public int handleMessage ( BaseMessage message ) { } } | Utility . getLogger ( ) . info ( "RemoteQueue handling message " + message ) ; if ( message . getProcessedByClientSession ( ) == this . getParentSession ( ) ) return DBConstants . NORMAL_RETURN ; // Do not process this message ( the client has already taken care of it ) .
// ? if ( message . getProcessedByClientSession ( ) instanceof RemoteObject )
// ? if ( this . getParentSession ( ) instanceof RemoteObject ) / / Always
// ? if ( ( ( RemoteObject ) this . getParentSession ( ) ) . getRef ( ) . remoteEquals ( ( ( RemoteObject ) message . getProcessedByClientSession ( ) ) . getRef ( ) ) )
// ? return DBConstants . NORMAL _ RETURN ; / / Same client .
if ( message == m_messageLastMessage ) return DBConstants . NORMAL_RETURN ; // Don ' t send a message to the same client twice .
m_messageLastMessage = message ; this . getMessageStack ( ) . sendMessage ( message ) ; return DBConstants . NORMAL_RETURN ; |
public class ClientX509ExtendedTrustManager { /** * check server identify as per tls . trustedNames in client . yml .
* Notes : this method should only be applied to verify server certificates on the client side .
* @ param cert
* @ throws CertificateException */
private void doCustomServerIdentityCheck ( X509Certificate cert ) throws CertificateException { } } | if ( EndpointIdentificationAlgorithm . APIS == identityAlg ) { APINameChecker . verifyAndThrow ( trustedNameSet , cert ) ; } |
public class AbstractRemoteRepositoryReader { /** * / * ( non - Javadoc )
* @ see com . ibm . websphere . logging . hpel . reader . RepositoryReader # getLogLists ( java . util . Date , java . util . Date ) */
public Iterable < ServerInstanceLogRecordList > getLogLists ( Date minTime , Date maxTime ) throws LogRepositoryException { } } | logger . entering ( thisClass , "getLogLists" , new Object [ ] { minTime , maxTime } ) ; LogQueryBean query = new LogQueryBean ( ) ; query . setTime ( minTime , maxTime ) ; Iterable < ServerInstanceLogRecordList > result = getLogLists ( null , query ) ; logger . exiting ( thisClass , "getLogLists" , result ) ; return result ; |
public class TextClassifier { /** * Returns a specific instance of a Text Classifier given a resource
* Directory
* @ throws Exception */
public static TextClassifier getClassifier ( File resourceDirectoryFile ) throws Exception { } } | // check whether we need to unzip the resources first
if ( resourceDirectoryFile . toString ( ) . endsWith ( ".zip" ) && resourceDirectoryFile . isFile ( ) ) { resourceDirectoryFile = UnZip . unzip ( resourceDirectoryFile ) ; } // check the existence of the path
if ( resourceDirectoryFile . exists ( ) == false ) throw new IOException ( "Directory " + resourceDirectoryFile . getAbsolutePath ( ) + " does not exist" ) ; // check that the lexicon files exists ( e . g . its name should be simply
// ' lexicon ' )
File lexiconFile = new File ( resourceDirectoryFile , Parameters . lexiconName ) ; if ( lexiconFile . exists ( ) == false ) throw new IOException ( "Lexicon " + lexiconFile + " does not exist" ) ; // and that there is a model file
File modelFile = new File ( resourceDirectoryFile , Parameters . modelName ) ; if ( modelFile . exists ( ) == false ) throw new IOException ( "Model " + modelFile + " does not exist" ) ; Lexicon lexicon = new Lexicon ( lexiconFile . toString ( ) ) ; // ask the Lexicon for the classifier to use
String classifier = lexicon . getClassifierType ( ) ; TextClassifier instance = ( TextClassifier ) Class . forName ( classifier ) . newInstance ( ) ; // set the last modification info
instance . lastmodifiedLexicon = lexiconFile . lastModified ( ) ; // set the pathResourceDirectory
instance . pathResourceDirectory = resourceDirectoryFile . getAbsolutePath ( ) ; // set the model
instance . lexicon = lexicon ; instance . loadModel ( ) ; return instance ; |
public class CommercePriceListUtil { /** * Removes the commerce price list where companyId = & # 63 ; and externalReferenceCode = & # 63 ; from the database .
* @ param companyId the company ID
* @ param externalReferenceCode the external reference code
* @ return the commerce price list that was removed */
public static CommercePriceList removeByC_ERC ( long companyId , String externalReferenceCode ) throws com . liferay . commerce . price . list . exception . NoSuchPriceListException { } } | return getPersistence ( ) . removeByC_ERC ( companyId , externalReferenceCode ) ; |
public class DoubleExtensions { /** * The < code > power < / code > operator .
* @ param a
* a double . May not be < code > null < / code > .
* @ param b
* a number . May not be < code > null < / code > .
* @ return < code > a * * b < / code >
* @ throws NullPointerException
* if { @ code a } or { @ code b } is < code > null < / code > . */
@ Pure public static double operator_power ( Double a , Number b ) { } } | return Math . pow ( a , b . doubleValue ( ) ) ; |
public class Validate { /** * Checks if the given String is a negative integer value . < br >
* This method tries to parse an integer value and then checks if it is smaller than 0.
* @ param value The String value to validate .
* @ return The parsed integer value
* @ throws ParameterException if the given String value cannot be parsed as integer or its value is bigger or equal to 0. */
public static Integer negativeInteger ( String value ) { } } | Integer intValue = Validate . isInteger ( value ) ; negative ( intValue ) ; return intValue ; |
public class ApiClient { /** * Helper method to configure the OAuth accessCode / implicit flow parameters
* @ param clientId OAuth2 client ID : Identifies the client making the request .
* Client applications may be scoped to a limited set of system access .
* @ param scopes the list of requested scopes . Values include { @ link OAuth # Scope _ SIGNATURE } , { @ link OAuth # Scope _ EXTENDED } , { @ link OAuth # Scope _ IMPERSONATION } . You can also pass any advanced scope .
* @ param redirectUri this determines where to deliver the response containing the authorization code or access token .
* @ param responseType determines the response type of the authorization request .
* < br > < i > Note < / i > : these response types are mutually exclusive for a client application .
* A public / native client application may only request a response type of " token " ;
* a private / trusted client application may only request a response type of " code " . */
public URI getAuthorizationUri ( String clientId , java . util . List < String > scopes , String redirectUri , String responseType ) throws IllegalArgumentException , UriBuilderException { } } | return this . getAuthorizationUri ( clientId , scopes , redirectUri , responseType , null ) ; |
public class Loader { /** * Write a map
* @ param os
* @ param map
* @ throws IOException */
public static void writeStringMap ( DataOutputStream os , Map < String , String > map ) throws IOException { } } | if ( map == null ) { os . writeInt ( - 1 ) ; } else { Set < Entry < String , String > > es = map . entrySet ( ) ; os . writeInt ( es . size ( ) ) ; for ( Entry < String , String > e : es ) { writeString ( os , e . getKey ( ) ) ; writeString ( os , e . getValue ( ) ) ; } } |
public class CmsRenderer { /** * Recursive helper method to create a tree structure of choice menu entries for a choice type . < p >
* @ param startType the type from which to start
* @ param startingAtChoiceAttribute true if the recursion starts at a synthetic choice attribute
* @ param currentEntry the current menu entry bean */
private static void collectChoiceEntries ( CmsType startType , boolean startingAtChoiceAttribute , CmsChoiceMenuEntryBean currentEntry ) { } } | if ( startingAtChoiceAttribute || startType . isChoice ( ) ) { CmsType choiceType = startingAtChoiceAttribute ? startType : startType . getAttributeType ( CmsType . CHOICE_ATTRIBUTE_NAME ) ; for ( String choiceName : choiceType . getAttributeNames ( ) ) { CmsChoiceMenuEntryBean subEntry = currentEntry . addChild ( choiceName ) ; CmsType includedType = choiceType . getAttributeType ( choiceName ) ; collectChoiceEntries ( includedType , false , subEntry ) ; } } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.