signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class AfplibFactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public ObjectClassificationObjClass createObjectClassificationObjClassFromString ( EDataType eDataType , String initialValue ) { } }
ObjectClassificationObjClass result = ObjectClassificationObjClass . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ;
public class StandardBullhornData { /** * { @ inheritDoc } */ @ Override public < T extends BullhornEntity , L extends ListWrapper < T > > L findMultipleEntity ( Class < T > type , Set < Integer > idList , Set < String > fieldSet ) { } }
return this . handleGetMultipleEntities ( type , idList , fieldSet , ParamFactory . entityParams ( ) ) ;
public class RiakClient { /** * Execute a StreamableRiakCommand asynchronously , and stream the results back before * the command { @ link RiakFuture # isDone ( ) is done } . * Calling this method causes the client to execute the provided * StreamableRiakCommand asynchronously . * It will immediately return a R...
return command . executeAsyncStreaming ( cluster , timeoutMS ) ;
public class ExcelFunctions { /** * Returns the remainder after number is divided by divisor */ public static BigDecimal mod ( EvaluationContext ctx , Object number , Object divisor ) { } }
BigDecimal _number = Conversions . toDecimal ( number , ctx ) ; BigDecimal _divisor = Conversions . toDecimal ( divisor , ctx ) ; return _number . subtract ( _divisor . multiply ( new BigDecimal ( _int ( ctx , _number . divide ( _divisor , 10 , RoundingMode . HALF_UP ) ) ) ) ) ;
public class ReflectUtils { /** * Load the given class using a specific class loader . * @ param className The name of the class * @ param cl The Class Loader to be used for finding the class . * @ return The class object */ public static Class < ? > loadClass ( String className , ClassLoader cl ) { } }
try { return Class . forName ( className , false , cl ) ; } catch ( ClassNotFoundException e ) { throw new IllegalArgumentException ( e ) ; }
public class BuildWrapper { /** * for compatibility we can ' t use BuildWrapperDescriptor */ public static DescriptorExtensionList < BuildWrapper , Descriptor < BuildWrapper > > all ( ) { } }
// use getDescriptorList and not getExtensionList to pick up legacy instances return Jenkins . getInstance ( ) . < BuildWrapper , Descriptor < BuildWrapper > > getDescriptorList ( BuildWrapper . class ) ;
public class AipOcr { /** * 网络图片文字识别接口 * 用户向服务请求识别一些网络上背景复杂 , 特殊字体的文字 。 * @ param url - 图片完整URL , URL长度不超过1024字节 , URL对应的图片base64编码后大小不超过4M , 最短边至少15px , 最长边最大4096px , 支持jpg / png / bmp格式 , 当image字段存在时url字段失效 * @ param options - 可选参数对象 , key : value都为string类型 * options - options列表 : * detect _ direction 是否检测图...
AipRequest request = new AipRequest ( ) ; preOperation ( request ) ; request . addBody ( "url" , url ) ; if ( options != null ) { request . addBody ( options ) ; } request . setUri ( OcrConsts . WEB_IMAGE ) ; postOperation ( request ) ; return requestServer ( request ) ;
public class AbstractRestClient { /** * Build a ClientHttpRequestInterceptor that adds three request headers * @ param header1name of header 1 * @ param value1value of header 1 * @ param header2name of header 2 * @ param value2value of header 2 * @ param header3name of header 3 * @ param value3value of head...
return new AddHeadersRequestInterceptor ( new String [ ] { header1 , header2 , header3 , header4 } , new String [ ] { value1 , value2 , value3 , value4 } ) ;
public class SeaGlassLookAndFeel { /** * Get a derived color , derived colors are shared instances and will be * updated when its parent UIDefault color changes . * @ param uiDefaultParentName The parent UIDefault key * @ param hOffset The hue offset * @ param sOffset The saturation offset * @ param bOffset T...
return getDerivedColor ( null , parentUin , hOffset , sOffset , bOffset , aOffset , uiResource ) ;
public class SequenceValidationCheck { /** * Creates a warning validation message for the sequence and adds it to * the validation result . * @ param messageKey a message key * @ param params message parameters */ protected void reportWarning ( ValidationResult result , String messageKey , Object ... params ) { }...
reportMessage ( result , Severity . WARNING , messageKey , params ) ;
public class FeatureLinkHelper { /** * / * @ Nullable */ public XExpression getSyntacticReceiver ( XExpression expression ) { } }
if ( expression instanceof XAbstractFeatureCall ) { if ( expression instanceof XFeatureCall ) { return null ; } if ( expression instanceof XMemberFeatureCall ) { return ( ( XMemberFeatureCall ) expression ) . getMemberCallTarget ( ) ; } if ( expression instanceof XAssignment ) { return ( ( XAssignment ) expression ) . ...
public class Assert2 { /** * Asserts that two paths are deeply byte - equivalent . * @ param expected one of the paths * @ param actual the other path * @ throws IOException if the paths cannot be traversed */ public static void assertEquals ( final Path expected , final Path actual ) throws IOException { } }
containsAll ( actual , expected ) ; if ( Files . exists ( expected ) ) { containsAll ( expected , actual ) ; walkFileTree ( expected , new SimpleFileVisitor < Path > ( ) { @ Override public FileVisitResult visitFile ( final Path file , final BasicFileAttributes attrs ) throws IOException { final Path sub = relativize (...
public class CryptoUtils { /** * See https : / / developers . facebook . com / docs / graph - api / securing - requests */ public static String makeAppSecretProof ( String appSecret , String accessToken ) { } }
try { Mac mac = Mac . getInstance ( "HmacSHA256" ) ; SecretKeySpec secretKey = new SecretKeySpec ( appSecret . getBytes ( ) , "HmacSHA256" ) ; mac . init ( secretKey ) ; byte [ ] bytes = mac . doFinal ( accessToken . getBytes ( ) ) ; return Hex . encodeHexString ( bytes ) ; } catch ( NoSuchAlgorithmException | InvalidK...
public class Syncer { /** * Registers a { @ link ISyncHandler } to the { @ link Syncer } . * @ param name the name * @ param supplier the supplier */ public static void registerHandlerFactory ( String name , Supplier < ISyncHandler < ? , ? extends ISyncableData > > supplier ) { } }
instance . registerFactory ( name , supplier ) ;
public class DevPollStatusCmd { public Any execute ( DeviceImpl device , Any in_any ) throws DevFailed { } }
Util . out4 . println ( "DevPollStatusCmd.execute(): arrived " ) ; // Call the device method and return to caller String argin = extract_DevString ( in_any ) ; return insert ( ( ( DServer ) ( device ) ) . dev_poll_status ( argin ) ) ;
public class SpellingCheckRule { /** * Returns true iff the word should be ignored by the spell checker . * If possible , use { @ link # ignoreToken ( AnalyzedTokenReadings [ ] , int ) } instead . */ protected boolean ignoreWord ( String word ) throws IOException { } }
if ( ! considerIgnoreWords ) { return false ; } if ( word . endsWith ( "." ) && ! wordsToBeIgnored . contains ( word ) ) { return isIgnoredNoCase ( word . substring ( 0 , word . length ( ) - 1 ) ) ; // e . g . word at end of sentence } return isIgnoredNoCase ( word ) ;
public class GeometryEncoder { /** * Encodes the { @ code centres [ ] } specified in the constructor as either * clockwise / anticlockwise or none . If there is a permutation parity but no * geometric parity then we can not encode the configuration and ' true ' is * returned to indicate the perception is done . I...
int p = permutation . parity ( current ) ; // if is a permutation parity ( all neighbors are different ) if ( p != 0 ) { // multiple with the geometric parity int q = geometric . parity ( ) * p ; // configure anticlockwise / clockwise if ( q > 0 ) { for ( int i : centres ) { next [ i ] = current [ i ] * ANTICLOCKWISE ;...
public class Maven { /** * - - resolve */ public FileNode resolve ( String groupId , String artifactId , String version ) throws ArtifactResolutionException { } }
return resolve ( groupId , artifactId , "jar" , version ) ;
public class StringSerializer { /** * Checks whether mime types is supported by this serializer implementation */ @ Override public boolean canRead ( @ Nonnull MediaType mimeType , Class < ? > resultType ) { } }
MediaType type = mimeType . withoutParameters ( ) ; return ( type . is ( MediaType . ANY_TEXT_TYPE ) || MediaType . APPLICATION_XML_UTF_8 . withoutParameters ( ) . is ( type ) || MediaType . JSON_UTF_8 . withoutParameters ( ) . is ( type ) ) && String . class . equals ( resultType ) ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EEnum getIfcPerformanceHistoryTypeEnum ( ) { } }
if ( ifcPerformanceHistoryTypeEnumEEnum == null ) { ifcPerformanceHistoryTypeEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 1026 ) ; } return ifcPerformanceHistoryTypeEnumEEnum ;
public class ActivityListItemMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ActivityListItem activityListItem , ProtocolMarshaller protocolMarshaller ) { } }
if ( activityListItem == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( activityListItem . getActivityArn ( ) , ACTIVITYARN_BINDING ) ; protocolMarshaller . marshall ( activityListItem . getName ( ) , NAME_BINDING ) ; protocolMarshaller . m...
public class CmsSimpleEditor { /** * Initializes the editor content when opening the editor for the first time . < p > */ @ Override protected void initContent ( ) { } }
// save initialized instance of this class in request attribute for included sub - elements getJsp ( ) . getRequest ( ) . setAttribute ( SESSION_WORKPLACE_CLASS , this ) ; // get the default encoding String content = getParamContent ( ) ; if ( CmsStringUtil . isNotEmpty ( content ) ) { // content already read , must be...
public class URLPattern { /** * Checks if this pattern matches the specified pattern String . * The matching rules from the { @ code WebResourcePermission # implies } : * < ol > * < li > their pattern values are { @ code String } equivalent , or < / li > * < li > this pattern is the path - prefix pattern " / * ...
// 2 or 5 if ( type == PatternType . DEFAULT || type == PatternType . THE_PATH_PREFIX ) return true ; // 4 , extension pattern if ( type == PatternType . EXTENSION && urlPattern . endsWith ( ext ) ) return true ; // 3 . a path - prefix pattern if ( type == PatternType . PATH_PREFIX ) { if ( urlPattern . regionMatches (...
public class Utils { /** * Returns true if { @ code element } is a { @ code TypeAdapter } type . */ static boolean isAdapterType ( Element element , Elements elements , Types types ) { } }
TypeMirror typeAdapterType = types . getDeclaredType ( elements . getTypeElement ( TYPE_ADAPTER_CLASS_NAME ) , types . getWildcardType ( null , null ) ) ; return types . isAssignable ( element . asType ( ) , typeAdapterType ) ;
public class LogRequestor { /** * This is a copy of ByteStreams . readFully ( ) , with the slight change that it throws * NoBytesReadException if zero bytes are read . Otherwise it is identical . * @ param in * @ param bytes * @ throws IOException */ private void readFully ( InputStream in , byte [ ] bytes ) th...
int read = ByteStreams . read ( in , bytes , 0 , bytes . length ) ; if ( read == 0 ) { throw new NoBytesReadException ( ) ; } else if ( read != bytes . length ) { throw new EOFException ( "reached end of stream after reading " + read + " bytes; " + bytes . length + " bytes expected" ) ; }
public class VersionSpecificTemplates { /** * Templatized due to version differences . Only fields used in search are declared */ String spanIndexTemplate ( ) { } }
String result = "{\n" + " \"TEMPLATE\": \"${__INDEX__}:" + SPAN + "-*\",\n" + " \"settings\": {\n" + " \"index.number_of_shards\": ${__NUMBER_OF_SHARDS__},\n" + " \"index.number_of_replicas\": ${__NUMBER_OF_REPLICAS__},\n" + " \"index.requests.cache.enable\": true,\n" + " \"index.mapper.dynamic\": false,\...
public class PLRenderHelper { /** * Create the background fill ( debug and real ) and draw the border ( debug and * real ) of an element . * @ param aElement * The element to be rendered . May not be < code > null < / code > . * @ param aCtx * The render context incl . the content stream . * @ param fIndent...
// Border starts after margin final float fLeft = aCtx . getStartLeft ( ) + aElement . getMarginLeft ( ) + fIndentX ; final float fTop = aCtx . getStartTop ( ) - aElement . getMarginTop ( ) - fIndentY ; final float fWidth = aElement . getRenderWidth ( ) + aElement . getBorderXSumWidth ( ) + aElement . getPaddingXSum ( ...
public class UIViewRoot { /** * < p class = " changed _ added _ 2_0 " > If { @ link # getAfterPhaseListener } * returns non - < code > null < / code > , invoke it , passing a { @ link * PhaseEvent } for the { @ link PhaseId # RENDER _ RESPONSE } phase . Any * errors that occur during invocation of the afterPhase ...
super . encodeEnd ( context ) ; encodeViewParameters ( context ) ; notifyAfter ( context , PhaseId . RENDER_RESPONSE ) ;
public class ClientFactory { /** * Create { @ link IMessageReceiver } in default { @ link ReceiveMode # PEEKLOCK } mode from service bus connection string with < a href = " https : / / docs . microsoft . com / en - us / azure / service - bus - messaging / service - bus - sas " > Shared Access Signatures < / a > * @ p...
return Utils . completeFuture ( createMessageReceiverFromConnectionStringAsync ( amqpConnectionString , receiveMode ) ) ;
public class ObjectReader { /** * Builds extra SQL WHERE clause * @ param keys An array of ID names * @ param mapping The hashtable containing the object mapping * @ return A string containing valid SQL */ private String buildWhereClause ( String [ ] pKeys , Hashtable pMapping ) { } }
StringBuilder sqlBuf = new StringBuilder ( ) ; for ( int i = 0 ; i < pKeys . length ; i ++ ) { String column = ( String ) pMapping . get ( pKeys [ i ] ) ; sqlBuf . append ( " AND " ) ; sqlBuf . append ( column ) ; sqlBuf . append ( " = ?" ) ; } return sqlBuf . toString ( ) ;
public class GenericField { public static boolean isSupportedFieldType ( String className ) { } }
if ( className . equals ( "String" ) || String . class . getName ( ) . equals ( className ) ) { return true ; } else if ( className . equalsIgnoreCase ( "Double" ) || Double . class . getName ( ) . equals ( className ) ) { return true ; } else if ( className . equals ( "int" ) || className . equals ( "Integer" ) || Int...
public class DaoTemplate { /** * 删除 * @ param < T > 主键类型 * @ param pk 主键 * @ return 删除行数 * @ throws SQLException SQL执行异常 */ public < T > int del ( T pk ) throws SQLException { } }
if ( pk == null ) { return 0 ; } return this . del ( Entity . create ( tableName ) . set ( primaryKeyField , pk ) ) ;
public class FederationPresenter { /** * - - - - - saml & key store configuration */ public void modifySamlConfiguration ( final Map < String , Object > changedValues ) { } }
ResourceAddress address = SAML_TEMPLATE . resolve ( statementContext , federation ) ; modifySingleton ( "SAML configuration" , address , changedValues ) ;
public class HostProcess { /** * Scans the message with the given ID with the given plugin . * It ' s used a new instance of the given plugin . * @ param plugin the scanner * @ param messageId the ID of the message . * @ return { @ code true } if the { @ code plugin } was run , { @ code false } otherwise . */ p...
Plugin test ; HistoryReference historyReference ; HttpMessage msg ; try { historyReference = new HistoryReference ( messageId , true ) ; msg = historyReference . getHttpMessage ( ) ; } catch ( HttpMalformedHeaderException | DatabaseException e ) { log . warn ( "Failed to read message with ID [" + messageId + "], cause:...
public class WSClientConfig { /** * Add a hint that this client understands compressed HTTP content . Disabled * by default . * @ param bCompress * < code > true < / code > to enable , < code > false < / code > to disable . * @ return this for chaining */ @ Nonnull public final WSClientConfig setCompressedRespo...
if ( bCompress ) m_aHTTPHeaders . setHeader ( CHttpHeader . ACCEPT_ENCODING , "gzip" ) ; else m_aHTTPHeaders . removeHeaders ( CHttpHeader . ACCEPT_ENCODING ) ; return this ;
public class CaptureSearchResults { /** * Add a result to this results , at either the beginning or the end , * depending on the append argument * @ param result SearchResult to add to this set * @ param append */ public void addSearchResult ( CaptureSearchResult result , boolean append ) { } }
String resultDate = result . getCaptureTimestamp ( ) ; if ( ( firstResultTimestamp == null ) || ( firstResultTimestamp . compareTo ( resultDate ) > 0 ) ) { firstResultTimestamp = resultDate ; } if ( ( lastResultTimestamp == null ) || ( lastResultTimestamp . compareTo ( resultDate ) < 0 ) ) { lastResultTimestamp = resul...
public class ParseBigDecimal { /** * { @ inheritDoc } * @ throws SuperCsvCellProcessorException * if value is null , isn ' t a String , or can ' t be parsed as a BigDecimal */ public Object execute ( final Object value , final CsvContext context ) { } }
validateInputNotNull ( value , context ) ; final BigDecimal result ; if ( value instanceof String ) { final String s = ( String ) value ; try { if ( symbols == null ) { result = new BigDecimal ( s ) ; } else { result = new BigDecimal ( fixSymbols ( s , symbols ) ) ; } } catch ( final NumberFormatException e ) { throw n...
public class CodecInfo { /** * Gets the positioned terms by prefixes and position . * @ param field * the field * @ param docId * the doc id * @ param prefixes * the prefixes * @ param position * the position * @ return the positioned terms by prefixes and position * @ throws IOException * Signals...
return getPositionedTermsByPrefixesAndPositionRange ( field , docId , prefixes , position , position ) ;
public class LenskitRecommenderRunner { /** * Runs the recommender using the provided datamodels . * @ param opts see * { @ link net . recommenders . rival . recommend . frameworks . AbstractRunner . RUN _ OPTIONS } * @ param trainingModel model to be used to train the recommender . * @ param testModel model to...
if ( isAlreadyRecommended ( ) ) { return null ; } // transform from core ' s DataModels to Lenskit ' s EventDAO DataAccessObject trainingModelLensKit = new EventDAOWrapper ( trainingModel ) ; DataAccessObject testModelLensKit = new EventDAOWrapper ( testModel ) ; return runLenskitRecommender ( opts , trainingModelLensK...
public class AcpService { /** * 获取应答报文中的加密公钥证书 , 并存储到本地 , 备份原始证书 , 并自动替换证书 < br > * 更新成功则返回1 , 无更新返回0 , 失败异常返回 - 1 < br > * @ param resData 返回报文 * @ param encoding * @ return */ public static int updateEncryptCert ( Map < String , String > resData , String encoding ) { } }
return SDKUtil . getEncryptCert ( resData , encoding ) ;
public class JNRPEClient { /** * Prints the application version . */ private static void printVersion ( ) { } }
System . out . println ( "jcheck_nrpe version " + JNRPEClient . class . getPackage ( ) . getImplementationVersion ( ) ) ; System . out . println ( "Copyright (c) 2013 Massimiliano Ziccardi" ) ; System . out . println ( "Licensed under the Apache License, Version 2.0" ) ; System . out . println ( ) ;
public class CheckConsistencyContext { /** * Merges and embeds the given { @ link CheckConsistencyPOptions } with the corresponding master * options . * @ param optionsBuilder Builder for proto { @ link CheckConsistencyPOptions } to merge with defaults * @ return the instance of { @ link CheckConsistencyContext }...
CheckConsistencyPOptions masterOptions = FileSystemOptions . checkConsistencyDefaults ( ServerConfiguration . global ( ) ) ; CheckConsistencyPOptions . Builder mergedOptionsBuilder = masterOptions . toBuilder ( ) . mergeFrom ( optionsBuilder . build ( ) ) ; return create ( mergedOptionsBuilder ) ;
public class SOAPMessageTransport { /** * From this external message , figure out the message type . * @ externalMessage The external message just received . * @ return The message type for this kind of message ( transport specific ) . */ public String getMessageVersion ( BaseMessage externalMessage ) { } }
String version = null ; if ( ! ( externalMessage . getExternalMessage ( ) instanceof SoapTrxMessageIn ) ) return null ; SOAPMessage message = ( SOAPMessage ) ( ( SoapTrxMessageIn ) externalMessage . getExternalMessage ( ) ) . getRawData ( ) ; try { // Message creation takes care of creating the SOAPPart - a // required...
public class IPSettings { /** * returns a List of all the nodes ( from root to best matching ) for the given address * @ param iaddr * @ return */ public List < IPRangeNode > getChain ( InetAddress iaddr ) { } }
List < IPRangeNode > result = new ArrayList ( ) ; result . add ( root ) ; IPRangeNode node = isV4 ( iaddr ) ? ipv4 : ipv6 ; node . findFast ( iaddr , result ) ; return result ;
public class URLHelper { /** * Create a parameter string . This is also suitable for POST body ( e . g . for * web form submission ) . * @ param aQueryParams * Parameter map . May be < code > null < / code > or empty . * @ param aQueryParameterEncoder * The encoder to be used to encode parameter names and par...
if ( CollectionHelper . isEmpty ( aQueryParams ) ) return null ; final StringBuilder aSB = new StringBuilder ( ) ; // add all values for ( final URLParameter aParam : aQueryParams ) { // Separator if ( aSB . length ( ) > 0 ) aSB . append ( AMPERSAND ) ; aParam . appendTo ( aSB , aQueryParameterEncoder ) ; } return aSB ...
public class AliPayApi { /** * 查询授权信息 * @ param model * { AlipayOpenAuthTokenAppQueryModel } * @ return { AlipayOpenAuthTokenAppQueryResponse } * @ throws { AlipayApiException } */ public static AlipayOpenAuthTokenAppQueryResponse openAuthTokenAppQueryToResponse ( AlipayOpenAuthTokenAppQueryModel model ) throws...
AlipayOpenAuthTokenAppQueryRequest request = new AlipayOpenAuthTokenAppQueryRequest ( ) ; request . setBizModel ( model ) ; return AliPayApiConfigKit . getAliPayApiConfig ( ) . getAlipayClient ( ) . execute ( request ) ;
public class SipStandardManager { /** * { @ inheritDoc } */ public MobicentsSipSession getSipSession ( final MobicentsSipSessionKey key , final boolean create , final MobicentsSipFactory sipFactoryImpl , final MobicentsSipApplicationSession sipApplicationSessionImpl ) { } }
return sipManagerDelegate . getSipSession ( ( SipSessionKey ) key , create , ( SipFactoryImpl ) sipFactoryImpl , sipApplicationSessionImpl ) ;
public class BasePath { /** * Returns a new path pointing to a child of this Path . * @ param path A relative path */ B append ( BasePath < B > path ) { } }
ImmutableList . Builder < String > components = ImmutableList . builder ( ) ; components . addAll ( this . getSegments ( ) ) ; components . addAll ( path . getSegments ( ) ) ; return createPathWithSegments ( components . build ( ) ) ;
public class DFACacheOracle { /** * Creates a cache oracle for a DFA learning setup , using a tree for internal cache organization . * @ param alphabet * the alphabet containing the symbols of possible queries * @ param delegate * the oracle to delegate queries to , in case of a cache - miss . * @ param < I >...
return new DFACacheOracle < > ( new IncrementalDFATreeBuilder < > ( alphabet ) , delegate ) ;
public class AWSElasticsearchClient { /** * Returns the name of all Elasticsearch domains owned by the current user ' s account . * @ param listDomainNamesRequest * @ return Result of the ListDomainNames operation returned by the service . * @ throws BaseException * An error occurred while processing the reques...
request = beforeClientExecution ( request ) ; return executeListDomainNames ( request ) ;
public class MBeanAccessChecker { /** * Extract configuration and put it into a given MBeanPolicyConfig */ private void extractMbeanConfiguration ( NodeList pNodes , MBeanPolicyConfig pConfig ) throws MalformedObjectNameException { } }
for ( int i = 0 ; i < pNodes . getLength ( ) ; i ++ ) { Node node = pNodes . item ( i ) ; if ( node . getNodeType ( ) != Node . ELEMENT_NODE ) { continue ; } extractPolicyConfig ( pConfig , node . getChildNodes ( ) ) ; }
public class DateHelper { /** * Returns the later of two dates , handling null values . A non - null Date * is always considered to be later than a null Date . * @ param d1 Date instance * @ param d2 Date instance * @ return Date latest date */ public static Date max ( Date d1 , Date d2 ) { } }
Date result ; if ( d1 == null ) { result = d2 ; } else if ( d2 == null ) { result = d1 ; } else { result = ( d1 . compareTo ( d2 ) > 0 ) ? d1 : d2 ; } return result ;
public class Model { /** * Gets the relationship with the specified ID . * @ param id the { @ link Relationship # getId ( ) } of the relationship * @ return the relationship in this model with the specified ID ( or null if it doesn ' t exist ) . * @ see Relationship # getId ( ) */ @ Nullable public Relationship g...
if ( id == null || id . trim ( ) . length ( ) == 0 ) { throw new IllegalArgumentException ( "A relationship ID must be specified." ) ; } return relationshipsById . get ( id ) ;
public class RTMPConnManager { /** * { @ inheritDoc } */ @ Override public RTMPConnection removeConnection ( int clientId ) { } }
log . trace ( "Removing connection with id: {}" , clientId ) ; // remove from map for ( RTMPConnection conn : connMap . values ( ) ) { if ( conn . getId ( ) == clientId ) { // remove the conn return removeConnection ( conn . getSessionId ( ) ) ; } } log . warn ( "Connection was not removed by id: {}" , clientId ) ; ret...
public class AdjacencyList { /** * Depth - first search of graph . * @ param v the start vertex . * @ param pre the array to store the mask if vertex has been visited . * @ param ts the array to store the reverse topological order . * @ param count the number of vertices have been visited before this search . ...
pre [ v ] = 0 ; for ( Edge edge : graph [ v ] ) { int t = edge . v2 ; if ( pre [ t ] == - 1 ) { count = dfsearch ( t , pre , ts , count ) ; } } ts [ count ++ ] = v ; return count ;
public class RangeTombstoneList { /** * Adds a new range tombstone . * This method will be faster if the new tombstone sort after all the currently existing ones ( this is a common use case ) , * but it doesn ' t assume it . */ public void add ( Composite start , Composite end , long markedAt , int delTime ) { } }
if ( isEmpty ( ) ) { addInternal ( 0 , start , end , markedAt , delTime ) ; return ; } int c = comparator . compare ( ends [ size - 1 ] , start ) ; // Fast path if we add in sorted order if ( c <= 0 ) { addInternal ( size , start , end , markedAt , delTime ) ; } else { // Note : insertFrom expect i to be the insertion ...
public class LoginResponseState { /** * { @ inheritDoc } */ @ Override public final Exception isCorrect ( final ProtocolDataUnit protocolDataUnit ) { } }
if ( protocolDataUnit . getBasicHeaderSegment ( ) . getParser ( ) instanceof LoginResponseParser ) { return null ; } else { return new IllegalStateException ( new StringBuilder ( "Parser " ) . append ( protocolDataUnit . getBasicHeaderSegment ( ) . getParser ( ) . toString ( ) ) . append ( " is instance of " ) . append...
public class WSDirectorySocket { /** * { @ inheritDoc } */ @ Override public void onWebSocketError ( Throwable error ) { } }
LOGGER . error ( "WebSocket client get error." ) ; if ( LOGGER . isTraceEnabled ( ) ) { LOGGER . trace ( "WebSocket client get error." , error ) ; } clientConnection . onSocketError ( ) ; if ( ! connected ) { synchronized ( sessionLock ) { sessionLock . notifyAll ( ) ; } } // cleanup ( ) ; // clientConnection . onSocke...
public class PersistentMessageStoreImpl { /** * This method checks the ME _ UUID stored in the permanent object store for this messaging engine * to see if it matches that which we retrieve from the admin object . If the ME _ UUID matches it * then updates the INC _ UUID to one that is associated with this current ...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "checkAndUpdateMEOwner" , "Owner=" + owner ) ; // Venu mock mock disableUUIDCheck for now in this version of Liberty profile . boolean disableUUIDCheck = true ; /* / / set always true to / / Defect 601995 / / Chec...
public class CreateGatewayGroupRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CreateGatewayGroupRequest createGatewayGroupRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( createGatewayGroupRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( createGatewayGroupRequest . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( createGatewayGroupRequest . getDescription ( ) , DESCRIPTION_BINDING...
public class HttpRequestMessageImpl { /** * @ see * com . ibm . ws . http . channel . internal . HttpBaseMessageImpl # readExternal ( java . * io . ObjectInput ) */ @ Override public void readExternal ( ObjectInput input ) throws IOException , ClassNotFoundException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "De-serializing into: " + this ) ; } super . readExternal ( input ) ; deserializeMethod ( input ) ; deserializeScheme ( input ) ; this . myURIBytes = readByteArray ( input ) ; setQueryString ( readByteArray ( input ) ) ;
public class Level { /** * Compares this level against the levels passed as arguments and returns true if this level is in between the given * levels . * @ param minLevel The minimum level to test . * @ param maxLevel The maximum level to test . * @ return True true if this level is in between the given levels ...
return this . intLevel >= minLevel . intLevel && this . intLevel <= maxLevel . intLevel ;
public class PositionFromPairLinear2 { /** * Computes the translation given two or more feature observations and the known rotation * @ param R Rotation matrix . World to view . * @ param worldPts Location of features in world coordinates . * @ param observed Observations of point in current view . Normalized coo...
if ( worldPts . size ( ) != observed . size ( ) ) throw new IllegalArgumentException ( "Number of worldPts and observed must be the same" ) ; if ( worldPts . size ( ) < 2 ) throw new IllegalArgumentException ( "A minimum of two points are required" ) ; int N = worldPts . size ( ) ; A . reshape ( 3 * N , 3 ) ; b . resha...
public class GeomFactory3ifx { /** * Create a point with properties . * @ param x the x property . * @ param y the y property . * @ param z the z property . * @ return the vector . */ @ SuppressWarnings ( "static-method" ) public Point3ifx newPoint ( IntegerProperty x , IntegerProperty y , IntegerProperty z ) {...
return new Point3ifx ( x , y , z ) ;
public class ServerSentEventConnection { /** * execute a graceful shutdown once all data has been sent */ public void shutdown ( ) { } }
if ( open == 0 || shutdown ) { return ; } shutdown = true ; sink . getIoThread ( ) . execute ( new Runnable ( ) { @ Override public void run ( ) { synchronized ( ServerSentEventConnection . this ) { if ( queue . isEmpty ( ) && pooled == null ) { exchange . endExchange ( ) ; } } } } ) ;
public class HttpUtil { /** * Performs an HTTP POST on the given URL . * Basic auth is used if credentials object is not null . * @ param url The URL to connect to . * @ param file The file to send as MultiPartFile . * @ param credentials Instance implementing { @ link Credentials } interface holding a set of c...
return postMultiPart ( new HttpPost ( url ) , new FileBody ( file ) , credentials , null ) ;
public class CertificateDetail { /** * Contains information about the initial validation of each domain name that occurs as a result of the * < a > RequestCertificate < / a > request . This field exists only when the certificate type is < code > AMAZON _ ISSUED < / code > * < b > NOTE : < / b > This method appends ...
if ( this . domainValidationOptions == null ) { setDomainValidationOptions ( new java . util . ArrayList < DomainValidation > ( domainValidationOptions . length ) ) ; } for ( DomainValidation ele : domainValidationOptions ) { this . domainValidationOptions . add ( ele ) ; } return this ;
public class PhoneIntents { /** * Creates an intent that will immediately dispatch a call to the given number . NOTE that unlike * { @ link # newDialNumberIntent ( String ) } , this intent requires the { @ link android . Manifest . permission # CALL _ PHONE } * permission to be set . * @ param phoneNumber the num...
final Intent intent ; if ( phoneNumber == null || phoneNumber . trim ( ) . length ( ) <= 0 ) { intent = new Intent ( Intent . ACTION_CALL , Uri . parse ( "tel:" ) ) ; } else { intent = new Intent ( Intent . ACTION_CALL , Uri . parse ( "tel:" + phoneNumber . replace ( " " , "" ) ) ) ; } return intent ;
public class XStringForChars { /** * Copies characters from this string into the destination character * array . * @ param srcBegin index of the first character in the string * to copy . * @ param srcEnd index after the last character in the string * to copy . * @ param dst the destination array . * @ par...
System . arraycopy ( ( char [ ] ) m_obj , m_start + srcBegin , dst , dstBegin , srcEnd ) ;
public class GVRVideoSceneObject { /** * Creates a player wrapper for the Android MediaPlayer . */ public static GVRVideoSceneObjectPlayer < MediaPlayer > makePlayerInstance ( final MediaPlayer mediaPlayer ) { } }
return new GVRVideoSceneObjectPlayer < MediaPlayer > ( ) { @ Override public MediaPlayer getPlayer ( ) { return mediaPlayer ; } @ Override public void setSurface ( Surface surface ) { mediaPlayer . setSurface ( surface ) ; } @ Override public void release ( ) { mediaPlayer . release ( ) ; } @ Override public boolean ca...
public class OcciVMUtils { /** * Retrieves VM status ( tested on CA only ) . * @ param hostIpPort IP and port of OCCI server ( eg . " 172.16.225.91:8080 " ) * @ param id Unique VM ID * @ return The VM ' s status * @ throws TargetException */ public static String getVMStatus ( String hostIpPort , String id ) thr...
if ( id . startsWith ( "urn:uuid:" ) ) id = id . substring ( 9 ) ; String status = null ; URL url = null ; try { CookieHandler . setDefault ( new CookieManager ( null , CookiePolicy . ACCEPT_ALL ) ) ; url = new URL ( "http://" + hostIpPort + "/compute/" + id ) ; } catch ( MalformedURLException e ) { throw new TargetExc...
public class WebAppDispatcherContext { /** * / * ( non - Javadoc ) * @ see com . ibm . ws . webcontainer . webapp . IWebAppDispatcherContext # getWebApp ( ) */ public WebApp getWebApp ( ) { } }
if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "getWebApp" , "webapp -> " + _webApp + " ,this -> " + this ) ; } return _webApp ;
public class BytecodeUtils { /** * Pushes a class type onto the stack from the string representation This can * also handle primitives * @ param b the bytecode * @ param classType the type descriptor for the class or primitive to push . * This will accept both the java . lang . Object form and the * Ljava / l...
if ( classType . length ( ) != 1 ) { if ( classType . startsWith ( "L" ) && classType . endsWith ( ";" ) ) { classType = classType . substring ( 1 , classType . length ( ) - 1 ) ; } b . loadClass ( classType ) ; } else { char type = classType . charAt ( 0 ) ; switch ( type ) { case 'I' : b . getstatic ( Integer . class...
public class CursorList { /** * Unsupported since { @ link CursorList } s aren ' t backed by columns . */ @ Override public int getColumnIndexOrThrow ( String columnName ) throws IllegalArgumentException { } }
int result = getColumnIndex ( columnName ) ; if ( result == - 1 ) { throw new IllegalArgumentException ( "CursorList is not backed by columns." ) ; } return result ;
public class Gen { /** * Generate code for a catch clause . * @ param tree The catch clause . * @ param env The environment current in the enclosing try . * @ param startpc Start pc of try - block . * @ param endpc End pc of try - block . */ void genCatch ( JCCatch tree , Env < GenContext > env , int startpc , ...
if ( startpc != endpc ) { List < JCExpression > subClauses = TreeInfo . isMultiCatch ( tree ) ? ( ( JCTypeUnion ) tree . param . vartype ) . alternatives : List . of ( tree . param . vartype ) ; while ( gaps . nonEmpty ( ) ) { for ( JCExpression subCatch : subClauses ) { int catchType = makeRef ( tree . pos ( ) , subCa...
public class ColumnPairAction { /** * 添加Channel * @ param channelInfo * @ param channelParameterInfo * @ throws Exception */ public void doSave ( @ Param ( "dataMediaPairId" ) Long dataMediaPairId , @ Param ( "submitKey" ) String submitKey , @ Param ( "channelId" ) Long channelId , @ Param ( "pipelineId" ) Long p...
String [ ] sourceColumns = columnPairInfo . getField ( "dltTarget_l" ) . getStringValues ( ) ; String [ ] targetColumns = columnPairInfo . getField ( "dltTarget_r" ) . getStringValues ( ) ; List < String > sourceColumnNames = new ArrayList < String > ( ) ; List < String > targetColumnNames = new ArrayList < String > ( ...
public class MIDDCombiner { /** * Combine two MIDD DAG using PCA algorithm . testing version 2012.11.02 : this version is to support ordered * combining algorithms ( e . g . first - applicable ) * @ param midd1 * @ param midd2 * @ return */ public AbstractNode combine ( AbstractNode midd1 , AbstractNode midd2 )...
if ( midd1 instanceof ExternalNode3 ) { if ( midd2 instanceof ExternalNode3 ) { return combineExternalNodes ( ( ExternalNode3 ) midd1 , ( ExternalNode3 ) midd2 ) ; // combine two external nodes } else { ExternalNode3 n1 = ( ExternalNode3 ) midd1 ; InternalNode < ? > n2 = ( InternalNode < ? > ) midd2 ; return combineIDD...
public class AbstractXServlet { /** * This method logs errors , in case a HttpServletRequest object is missing basic * information or uses unsupported values for e . g . HTTP version and HTTP method . * @ param sMsg * The concrete message to emit . May not be < code > null < / code > . * @ param aHttpRequest ...
log ( sMsg + ":\n" + RequestLogger . getRequestDebugString ( aHttpRequest ) . toString ( ) ) ;
public class SecurityDomainJBossASClient { /** * Create a new security domain using the SecureIdentity authentication method . * This is used when you want to obfuscate a database password in the configuration . * This is the version for as7.2 + ( e . g . eap 6.1) * @ param securityDomainName the name of the new ...
Address addr = Address . root ( ) . add ( SUBSYSTEM , SUBSYSTEM_SECURITY , SECURITY_DOMAIN , securityDomainName ) ; ModelNode addTopNode = createRequest ( ADD , addr ) ; addTopNode . get ( CACHE_TYPE ) . set ( "default" ) ; Address authAddr = addr . clone ( ) . add ( AUTHENTICATION , CLASSIC ) ; ModelNode addAuthNode =...
public class CmsUgcSession { /** * Creates a new edit resource . < p > * @ return the newly created resource * @ throws CmsUgcException if creating the resource fails */ public CmsResource createXmlContent ( ) throws CmsUgcException { } }
checkNotFinished ( ) ; checkEditResourceNotSet ( ) ; CmsUgcSessionSecurityUtil . checkCreateContent ( m_cms , m_configuration ) ; try { I_CmsResourceType type = OpenCms . getResourceManager ( ) . getResourceType ( m_configuration . getResourceType ( ) ) ; m_editResource = m_cms . createResource ( getNewContentName ( ) ...
public class RandomUtil { /** * Returns the random generator . */ public static Random getRandom ( ) { } }
if ( _isTest ) { return _testRandom ; } Random random = _freeRandomList . allocate ( ) ; if ( random == null ) { random = new SecureRandom ( ) ; } return random ;
public class ViewPositionAnimator { /** * Stops current animation and sets position state to particular values . * Note , that once animator reaches { @ code state = 0f } and { @ code isLeaving = true } * it will cleanup all internal stuff . So you will need to call { @ link # enter ( View , boolean ) } * or { @ ...
if ( ! isActivated ) { throw new IllegalStateException ( "You should call enter(...) before calling setState(...)" ) ; } stopAnimation ( ) ; position = pos < 0f ? 0f : ( pos > 1f ? 1f : pos ) ; isLeaving = leaving ; if ( animate ) { startAnimationInternal ( ) ; } applyCurrentPosition ( ) ;
public class PhoneNumberUtil { /** * parse phone number . * @ param pphoneNumber phone number as string with length * @ return PhoneNumberData with length */ public ValueWithPos < PhoneNumberData > parsePhoneNumber ( final ValueWithPos < String > pphoneNumber ) { } }
return this . parsePhoneNumber ( pphoneNumber , new PhoneNumberData ( ) , defaultCountryData ) ;
public class SortedArrayList { /** * adds an element to the list in its place based on natural order . allows duplicates . * @ param element * element to be appended to this list * @ return true if this collection changed as a result of the call */ public boolean addSorted ( E element ) { } }
boolean added = false ; added = super . add ( element ) ; Comparable < E > cmp = ( Comparable < E > ) element ; for ( int i = size ( ) - 1 ; i > 0 && cmp . compareTo ( get ( i - 1 ) ) < 0 ; i -- ) Collections . swap ( this , i , i - 1 ) ; return added ;
public class ForkOperatorUtils { /** * Get a new property key from an original one based on the branch id . The method assumes the branch id specified by * the { @ link ConfigurationKeys # FORK _ BRANCH _ ID _ KEY } parameter in the given WorkUnitState . The fork id key specifies * which fork this parameter belongs...
Preconditions . checkNotNull ( workUnitState , "Cannot get a property from a null WorkUnit" ) ; Preconditions . checkNotNull ( key , "Cannot get a the value for a null key" ) ; if ( ! workUnitState . contains ( ConfigurationKeys . FORK_BRANCH_ID_KEY ) ) { return key ; } return workUnitState . getPropAsInt ( Configurati...
public class ThreadBoundLogOutputStream { /** * get the thread ' s event buffer , reset it if it is empty * @ return */ private Holder < T > getOrReset ( ) { } }
if ( buffer . get ( ) == null || buffer . get ( ) . getBuffer ( ) . isEmpty ( ) ) { resetEventBuffer ( ) ; } return buffer . get ( ) ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcLightDistributionDataSourceSelect ( ) { } }
if ( ifcLightDistributionDataSourceSelectEClass == null ) { ifcLightDistributionDataSourceSelectEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 960 ) ; } return ifcLightDistributionDataSourceSelectEClass ;
public class LineReader { /** * Read a line into the given buffer . * @ param buf Buffer . * @ return { @ code true } if some characters have been read . */ public boolean readLine ( Appendable buf ) throws IOException { } }
boolean success = false ; while ( true ) { // Process buffer : while ( pos < end ) { success = true ; final char c = buffer [ pos ++ ] ; if ( c == '\n' ) { return success ; } if ( c == '\r' ) { continue ; } buf . append ( c ) ; } // Refill buffer : assert ( pos >= end ) : "Buffer wasn't empty when refilling!" ; end = i...
public class UserApi { /** * Get an impersonation token of a user as an Optional instance . Available only for admin users . * < pre > < code > GitLab Endpoint : GET / users / : user _ id / impersonation _ tokens / : impersonation _ token _ id < / code > < / pre > * @ param userIdOrUsername the user in the form of ...
try { return ( Optional . ofNullable ( getImpersonationToken ( userIdOrUsername , tokenId ) ) ) ; } catch ( GitLabApiException glae ) { return ( GitLabApi . createOptionalFromException ( glae ) ) ; }
public class TrieIterator { /** * Set the result values * @ param element return result object * @ param start codepoint of range * @ param limit ( end + 1 ) codepoint of range * @ param value common value of range */ private final void setResult ( Element element , int start , int limit , int value ) { } }
element . start = start ; element . limit = limit ; element . value = value ;
public class AbstractVersionIdentifier { /** * This method performs the part of { @ link # compareTo ( VersionIdentifier ) } for the { @ link # getRevision ( ) * revision } . * @ param currentResult is the current result so far . * @ param otherVersion is the { @ link VersionIdentifier } to compare to . * @ ret...
return compareToLinear ( currentResult , getRevision ( ) , otherVersion . getRevision ( ) , otherVersion ) ;
public class TrieMap { /** * { @ inheritDoc } */ @ Override public Set < CharSequence > keySet ( ) { } }
final Set < CharSequence > ks = keySet ; return ks != null ? ks : ( keySet = new KeySet ( ) ) ;
public class RegistryAuth { /** * This function looks for and parses credentials for logging into the Docker registry specified * by serverAddress . We first look in ~ / . docker / config . json and fallback to ~ / . dockercfg . These * files are created from running ` docker login ` . * @ param serverAddress A s...
DockerConfigReader dockerCfgReader = new DockerConfigReader ( ) ; return dockerCfgReader . authForRegistry ( dockerCfgReader . defaultConfigPath ( ) , serverAddress ) . toBuilder ( ) ;
public class SourceStream { /** * any messages while some are being reallocated */ public synchronized void guessesInStream ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "guessesInStream" , Boolean . valueOf ( containsGuesses ) ) ; containsGuesses = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "guessesInStream" , Boolean . value...
public class ClientState { /** * This clock guarantees that updates for the same ClientState will be ordered * in the sequence seen , even if multiple updates happen in the same millisecond . */ public long getTimestamp ( ) { } }
while ( true ) { long current = System . currentTimeMillis ( ) * 1000 ; long last = lastTimestampMicros . get ( ) ; long tstamp = last >= current ? last + 1 : current ; if ( lastTimestampMicros . compareAndSet ( last , tstamp ) ) return tstamp ; }
public class CloudVirtualNetworkController { /** * Cloud Virtual Network Endpoints */ @ RequestMapping ( value = "/cloud/virtualnetwork/create" , method = POST , consumes = APPLICATION_JSON_VALUE , produces = APPLICATION_JSON_VALUE ) public ResponseEntity < List < ObjectId > > upsertVirtualNetwork ( @ Valid @ RequestBo...
return ResponseEntity . ok ( ) . body ( cloudVirtualNetworkService . upsertVirtualNetwork ( request ) ) ;
public class ExtensionRegistries { /** * Adds all extensions , including dependencies , for the given FileDescriptor to the registry . */ public static ExtensionRegistry addWithDependeciesToRegistry ( final FileDescriptor file , final ExtensionRegistry registry ) { } }
for ( final FileDescriptor dependency : getFileWithAllDependencies ( file ) ) { addToRegistry ( dependency , registry ) ; } return registry ;
public class QueryBitmapConverter { /** * Set up the default control for this field . * A SCannedBox for a query bitmap converter . * @ param itsLocation Location of this component on screen ( ie . , GridBagConstraint ) . * @ param targetScreen Where to place this component ( ie . , Parent screen or GridBagLayout...
properties = new HashMap < String , Object > ( ) ; properties . put ( ScreenModel . COMMAND , MenuConstants . FORMLINK ) ; properties . put ( ScreenModel . IMAGE , MenuConstants . FORM ) ; return BaseField . createScreenComponent ( ScreenModel . CANNED_BOX , targetScreen . getNextLocation ( ScreenConstants . RIGHT_OF_L...
public class RuntimeTypeAdapterFactory { /** * Creates a new runtime type adapter for { @ code baseType } using { @ code " type " } as * the type field name . */ public static < T > RuntimeTypeAdapterFactory < T > of ( Class < T > baseType ) { } }
return new RuntimeTypeAdapterFactory < T > ( baseType , "type" , false ) ;
public class RESTClient { /** * Old REST client uses old REST service */ public void useOldRESTService ( ) throws Exception { } }
List < Object > providers = createJAXRSProviders ( ) ; com . example . customerservice . CustomerService customerService = JAXRSClientFactory . createFromModel ( "http://localhost:" + port + "/examples/direct/rest" , com . example . customerservice . CustomerService . class , "classpath:/model/CustomerService-jaxrs.xml...