signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class CommerceOrderItemPersistenceImpl { /** * Returns the first commerce order item in the ordered set where CPInstanceId = & # 63 ; .
* @ param CPInstanceId the cp instance ID
* @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > )
* @ return the first match... | CommerceOrderItem commerceOrderItem = fetchByCPInstanceId_First ( CPInstanceId , orderByComparator ) ; if ( commerceOrderItem != null ) { return commerceOrderItem ; } StringBundler msg = new StringBundler ( 4 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "CPInstanceId=" ) ; msg . append ( CPInstanceId ... |
public class TranslateExprNodeVisitor { /** * Implementations for operators . */
@ Override protected Expression visitNullCoalescingOpNode ( NullCoalescingOpNode node ) { } } | List < Expression > operands = visitChildren ( node ) ; Expression consequent = operands . get ( 0 ) ; Expression alternate = operands . get ( 1 ) ; // if the consequent isn ' t trivial we should store the intermediate result in a new temporary
if ( ! consequent . isCheap ( ) ) { consequent = codeGenerator . declaratio... |
public class SNISSLExplorer { /** * struct {
* uint32 gmt _ unix _ time ;
* opaque random _ bytes [ 28 ] ;
* } Random ;
* opaque SessionID < 0 . . 32 > ;
* uint8 CipherSuite [ 2 ] ;
* enum { null ( 0 ) , ( 255 ) } CompressionMethod ;
* struct {
* ProtocolVersion client _ version ;
* Random random ;
... | ExtensionInfo info = null ; // client version
input . get ( ) ; // helloMajorVersion
input . get ( ) ; // helloMinorVersion
// ignore random
int position = input . position ( ) ; input . position ( position + 32 ) ; // 32 : the length of Random
// ignore session id
ignoreByteVector8 ( input ) ; // ignore cipher _ suite... |
public class JMonthChooser { /** * The ItemListener for the months .
* @ param e
* the item event */
public void itemStateChanged ( ItemEvent e ) { } } | if ( e . getStateChange ( ) == ItemEvent . SELECTED ) { int index = comboBox . getSelectedIndex ( ) ; if ( ( index >= 0 ) && ( index != month ) ) { setMonth ( index , false ) ; } } |
public class Expectation { /** * Returns a consumer that throws an { @ link AssertionError } based on the
* given object .
* @ param format the format to apply to the message
* ( see { @ link String # format ( String , Object . . . ) } ) , there will
* be only one parameter to the message
* @ return a consume... | return object -> { throw new AssertionError ( String . format ( format , object ) ) ; } ; |
public class OriginationUrl { /** * Create a OriginationUrlCreator to execute create .
* @ param pathTrunkSid The SID of the Trunk to associate the resource with
* @ param weight The value that determines the relative load the URI should
* receive compared to others with the same priority
* @ param priority The... | return new OriginationUrlCreator ( pathTrunkSid , weight , priority , enabled , friendlyName , sipUrl ) ; |
public class TrifocalTensor { /** * Converts this matrix formated trifocal into a 27 element vector : < br >
* m . data [ i * 9 + j * 3 + k ] = T _ i ( j , k )
* @ param m Output : Trifocal tensor encoded in a vector */
public void convertTo ( DMatrixRMaj m ) { } } | if ( m . getNumElements ( ) != 27 ) throw new IllegalArgumentException ( "Input matrix/vector must have 27 elements" ) ; for ( int i = 0 ; i < 9 ; i ++ ) { m . data [ i ] = T1 . data [ i ] ; m . data [ i + 9 ] = T2 . data [ i ] ; m . data [ i + 18 ] = T3 . data [ i ] ; } |
public class CustomerSegmentUrl { /** * Get Resource Url for GetSegment
* @ param id Unique identifier of the customer segment to retrieve .
* @ param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object . This parameter should only be used... | UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/segments/{id}?responseFields={responseFields}" ) ; formatter . formatUrl ( "id" , id ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; |
public class DateFormatSymbols { /** * Returns a cached DateFormatSymbols if it ' s found in the
* cache . Otherwise , this method returns a newly cached instance
* for the given locale . */
private static DateFormatSymbols getCachedInstance ( Locale locale ) { } } | SoftReference < DateFormatSymbols > ref = cachedInstances . get ( locale ) ; DateFormatSymbols dfs = null ; if ( ref == null || ( dfs = ref . get ( ) ) == null ) { dfs = new DateFormatSymbols ( locale ) ; ref = new SoftReference < DateFormatSymbols > ( dfs ) ; SoftReference < DateFormatSymbols > x = cachedInstances . p... |
public class AbstractCommand { /** * Search for a button representing this command in the provided container
* and let it request the focus .
* @ param container the container which holds the command button .
* @ return < code > true < / code > if the focus request is likely to succeed .
* @ see # getButtonIn (... | AbstractButton button = getButtonIn ( container ) ; if ( button != null ) { return button . requestFocusInWindow ( ) ; } return false ; |
public class GVRShadowMap { /** * Sets the direct light shadow matrix for the light from the input model / view
* matrix and the shadow camera projection matrix .
* @ param modelMtx light model transform ( to world coordinates )
* @ param light direct light component to update */
void setOrthoShadowMatrix ( Matri... | GVROrthogonalCamera camera = ( GVROrthogonalCamera ) getCamera ( ) ; if ( camera == null ) { return ; } float w = camera . getRightClippingDistance ( ) - camera . getLeftClippingDistance ( ) ; float h = camera . getTopClippingDistance ( ) - camera . getBottomClippingDistance ( ) ; float near = camera . getNearClippingD... |
public class ProtoLexer { /** * $ ANTLR start " SINT32" */
public final void mSINT32 ( ) throws RecognitionException { } } | try { int _type = SINT32 ; int _channel = DEFAULT_TOKEN_CHANNEL ; // com / dyuproject / protostuff / parser / ProtoLexer . g : 171:5 : ( ' sint32 ' )
// com / dyuproject / protostuff / parser / ProtoLexer . g : 171:9 : ' sint32'
{ match ( "sint32" ) ; } state . type = _type ; state . channel = _channel ; } finally { } |
public class ClusterEVCManager { /** * Set the EVC mode . If EVC is currently disabled , then this will enable EVC .
* The parameter must specify a key to one of the EVC modes listed in the supportedEVCMode
* array property . If there are no modes listed there , then EVC may not currently be enabled ;
* reference... | ManagedObjectReference task = getVimService ( ) . configureEvcMode_Task ( getMOR ( ) , evcModeKey ) ; return new Task ( getServerConnection ( ) , task ) ; |
public class Util { /** * Reads contents of resource fully into a byte array .
* @ param resourceName resource name .
* @ return entire contents of resource as byte array . */
public static byte [ ] readResourceBytes ( String resourceName ) { } } | InputStream is = Util . class . getResourceAsStream ( resourceName ) ; try { return bytes ( is ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } finally { closeQuietly ( is ) ; } |
public class StopJobRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( StopJobRequest stopJobRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( stopJobRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( stopJobRequest . getArn ( ) , ARN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ;... |
public class Mutations { /** * Extracts mutations for a range of positions in the original sequence and performs shift of corresponding
* positions ( moves them to { @ code - range . from } ) . < p / > < p > Insertions before { @ code range . from } excluded . Insertions
* after { @ code ( range . to - 1 ) } includ... | if ( range . isReverse ( ) ) throw new IllegalArgumentException ( "Reverse ranges are not supported by this method." ) ; return extractRelativeMutationsForRange ( range . getFrom ( ) , range . getTo ( ) ) ; |
public class JCuda { /** * Query an attribute of a given memory range . < br >
* < br >
* Query an attribute about the memory range starting at devPtr with a size
* of count bytes . The memory range must refer to managed memory allocated
* via cudaMallocManaged or declared via _ _ managed _ _ variables . < br >... | return checkResult ( cudaMemRangeGetAttributeNative ( data , dataSize , attribute , devPtr , count ) ) ; |
public class BytecodeUtils { /** * Returns an { @ link Expression } with the given type that always returns null . */
public static Expression constantNull ( Type type ) { } } | checkArgument ( type . getSort ( ) == Type . OBJECT || type . getSort ( ) == Type . ARRAY , "%s is not a reference type" , type ) ; return new Expression ( type , Feature . CHEAP ) { @ Override protected void doGen ( CodeBuilder mv ) { mv . visitInsn ( Opcodes . ACONST_NULL ) ; } } ; |
public class ListThingRegistrationTaskReportsResult { /** * Links to the task resources .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setResourceLinks ( java . util . Collection ) } or { @ link # withResourceLinks ( java . util . Collection ) } if you wan... | if ( this . resourceLinks == null ) { setResourceLinks ( new java . util . ArrayList < String > ( resourceLinks . length ) ) ; } for ( String ele : resourceLinks ) { this . resourceLinks . add ( ele ) ; } return this ; |
public class ApiOvhCloud { /** * Alter this object properties
* REST : PUT / cloud / project / { serviceName } / alerting / { id }
* @ param body [ required ] New object properties
* @ param serviceName [ required ] The project id
* @ param id [ required ] Alerting unique UUID */
public void project_serviceName... | String qPath = "/cloud/project/{serviceName}/alerting/{id}" ; StringBuilder sb = path ( qPath , serviceName , id ) ; exec ( qPath , "PUT" , sb . toString ( ) , body ) ; |
public class StreamMetadataTasks { /** * Update stream ' s configuration .
* @ param scope scope .
* @ param stream stream name .
* @ param newConfig modified stream configuration .
* @ param contextOpt optional context
* @ return update status . */
public CompletableFuture < UpdateStreamStatus . Status > upd... | final OperationContext context = contextOpt == null ? streamMetadataStore . createContext ( scope , stream ) : contextOpt ; final long requestId = requestTracker . getRequestIdFor ( "updateStream" , scope , stream ) ; // 1 . get configuration
return streamMetadataStore . getConfigurationRecord ( scope , stream , contex... |
public class EmbeddedNeo4jEntityQueries { /** * When the id is mapped on several properties */
private ResourceIterator < Node > multiPropertiesIdFindEntities ( GraphDatabaseService executionEngine , EntityKey [ ] keys ) { } } | String query = getMultiGetQueryCacheQuery ( keys ) ; Map < String , Object > params = multiGetParams ( keys ) ; Result result = executionEngine . execute ( query , params ) ; return result . columnAs ( ENTITY_ALIAS ) ; |
public class StreamUtil { /** * Copies the contents of an < code > InputStream < / code > to an
* < code > OutputStream < / code > .
* @ param in The < code > InputStream < / code > to read from .
* @ param out The < code > OutputStream < / code > to write to .
* @ throws IOException If unable to read from < co... | int c ; while ( ( c = in . read ( ) ) >= 0 ) { out . write ( ( byte ) c ) ; } |
public class AmazonRoute53DomainsClient { /** * This operation returns the current status of an operation that is not completed .
* @ param getOperationDetailRequest
* The < a > GetOperationDetail < / a > request includes the following element .
* @ return Result of the GetOperationDetail operation returned by th... | request = beforeClientExecution ( request ) ; return executeGetOperationDetail ( request ) ; |
public class FrameOutputWriter { /** * Get the frame sizes and their contents .
* @ return a content tree for the frame details */
protected Content getFrameDetails ( ) { } } | HtmlTree leftContainerDiv = new HtmlTree ( HtmlTag . DIV ) ; HtmlTree rightContainerDiv = new HtmlTree ( HtmlTag . DIV ) ; leftContainerDiv . addStyle ( HtmlStyle . leftContainer ) ; rightContainerDiv . addStyle ( HtmlStyle . rightContainer ) ; if ( noOfPackages <= 1 ) { addAllClassesFrameTag ( leftContainerDiv ) ; } e... |
public class CanalServiceImpl { /** * 用于DO对象转化为Model对象
* @ param canalDo
* @ return Canal */
private Canal doToModel ( CanalDO canalDo ) { } } | Canal canal = new Canal ( ) ; try { canal . setId ( canalDo . getId ( ) ) ; canal . setName ( canalDo . getName ( ) ) ; canal . setStatus ( canalDo . getStatus ( ) ) ; canal . setDesc ( canalDo . getDescription ( ) ) ; CanalParameter parameter = canalDo . getParameters ( ) ; AutoKeeperCluster zkCluster = autoKeeperClus... |
public class OMVRBTreeEntryPersistent { /** * Delete all the nodes recursively . IF they are not loaded in memory , load all the tree .
* @ throws IOException */
public OMVRBTreeEntryPersistent < K , V > delete ( ) throws IOException { } } | if ( dataProvider != null ) { pTree . removeNodeFromMemory ( this ) ; pTree . removeEntry ( dataProvider . getIdentity ( ) ) ; // EARLY LOAD LEFT AND DELETE IT RECURSIVELY
if ( getLeft ( ) != null ) ( ( OMVRBTreeEntryPersistent < K , V > ) getLeft ( ) ) . delete ( ) ; // EARLY LOAD RIGHT AND DELETE IT RECURSIVELY
if ( ... |
public class EventLogQueue { /** * On insert .
* @ param log
* the log */
private void onInsert ( EventLog log ) { } } | if ( insertEvents == null ) { insertEvents = new ConcurrentHashMap < Object , EventLog > ( ) ; } insertEvents . put ( log . getEntityId ( ) , log ) ; |
public class Presenter { /** * A convenience function creating a transformer that will repeat the source observable whenever it will complete
* @ param < T > the type of the transformed observable
* @ return transformer that will emit observable that will never complete ( source will be subscribed again ) */
@ NonN... | return observable -> observable . repeatWhen ( completedNotification -> completedNotification ) ; |
public class ExcelUtils { /** * 无模板 、 基于注解的数据导出
* @ param data 待导出数据
* @ param clazz { @ link com . github . crab2died . annotation . ExcelField } 映射对象Class
* @ param isWriteHeader 是否写入表头
* @ param sheetName 指定导出Excel的sheet名称
* @ param isXSSF 导出的Excel是否为Excel2007及以上版本 ( 默认是 )
* @ param targetPath 生成的Excel输出... | try ( FileOutputStream fos = new FileOutputStream ( targetPath ) ; Workbook workbook = exportExcelNoTemplateHandler ( data , clazz , isWriteHeader , sheetName , isXSSF ) ) { workbook . write ( fos ) ; } |
public class Graph { /** * Compute a reduce transformation over the edge values of each vertex .
* For each vertex , the transformation consecutively calls a
* { @ link ReduceEdgesFunction } until only a single value for each edge remains .
* The { @ link ReduceEdgesFunction } combines two edge values into one ne... | switch ( direction ) { case IN : return edges . map ( new ProjectVertexWithEdgeValueMap < > ( 1 ) ) . withForwardedFields ( "f1->f0" ) . name ( "Vertex with in-edges" ) . groupBy ( 0 ) . reduce ( new ApplyReduceFunction < > ( reduceEdgesFunction ) ) . name ( "Reduce on edges" ) ; case OUT : return edges . map ( new Pro... |
public class ConnectionParameters { /** * Sets the JSON credentials path .
* @ param jsonCredentialsPath
* the JSON credentials path . */
public void setJsonCredentialsFile ( String jsonCredentialsPath ) { } } | if ( ! Utility . isNullOrEmpty ( jsonCredentialsPath ) ) { setJsonCredentialsFile ( new File ( jsonCredentialsPath ) ) ; } else { setJsonCredentialsFile ( ( File ) null ) ; } |
public class ResponseField { /** * Resolve field argument value by name . If argument represents a references to the variable , it will be resolved from
* provided operation variables values .
* @ param name argument name
* @ param variables values of operation variables
* @ return resolved argument value */
@ ... | checkNotNull ( name , "name == null" ) ; checkNotNull ( variables , "variables == null" ) ; Map < String , Object > variableValues = variables . valueMap ( ) ; Object argumentValue = arguments . get ( name ) ; if ( argumentValue instanceof Map ) { Map < String , Object > argumentValueMap = ( Map < String , Object > ) a... |
public class Resolver { /** * syck _ resolver _ tagurize */
@ JRubyMethod public static IRubyObject tagurize ( IRubyObject self , IRubyObject val ) { } } | IRubyObject tmp = val . checkStringType ( ) ; if ( ! tmp . isNil ( ) ) { String taguri = ImplicitScanner . typeIdToUri ( tmp . toString ( ) ) ; val = self . getRuntime ( ) . newString ( taguri ) ; } return val ; |
public class CPDefinitionSpecificationOptionValuePersistenceImpl { /** * Returns the last cp definition specification option value in the ordered set where CPDefinitionId = & # 63 ; .
* @ param CPDefinitionId the cp definition ID
* @ param orderByComparator the comparator to order the set by ( optionally < code > n... | CPDefinitionSpecificationOptionValue cpDefinitionSpecificationOptionValue = fetchByCPDefinitionId_Last ( CPDefinitionId , orderByComparator ) ; if ( cpDefinitionSpecificationOptionValue != null ) { return cpDefinitionSpecificationOptionValue ; } StringBundler msg = new StringBundler ( 4 ) ; msg . append ( _NO_SUCH_ENTI... |
public class Exceptions { /** * Returns a supplier which will unwrap and rethrow any throwables caught in { @ code supplier } .
* @ param supplier the supplier
* @ param < T > the output type
* @ param < E > the exception type
* @ return a supplier */
public static < T , E extends Throwable > @ NonNull Supplier... | return ( ) -> { try { return supplier . throwingGet ( ) ; } catch ( final Throwable t ) { throw rethrow ( unwrap ( t ) ) ; } } ; |
public class SplitMergeLineFitSegment { /** * Recursively splits pixels . Used in the initial segmentation . Only split points between
* the two ends are added */
protected void splitPixels ( int indexStart , int indexStop ) { } } | // too short to split
if ( indexStart + 1 >= indexStop ) return ; int indexSplit = selectSplitBetween ( indexStart , indexStop ) ; if ( indexSplit >= 0 ) { splitPixels ( indexStart , indexSplit ) ; splits . add ( indexSplit ) ; splitPixels ( indexSplit , indexStop ) ; } |
public class ListSuitesResult { /** * Information about the suites .
* @ param suites
* Information about the suites . */
public void setSuites ( java . util . Collection < Suite > suites ) { } } | if ( suites == null ) { this . suites = null ; return ; } this . suites = new java . util . ArrayList < Suite > ( suites ) ; |
public class TokenMapperGeneric { /** * { @ inheritDoc } */
@ Override @ SuppressWarnings ( "unchecked" ) public void addFields ( Document document , DecoratedKey partitionKey ) { } } | ByteBuffer bb = factory . toByteArray ( partitionKey . getToken ( ) ) ; String serialized = ByteBufferUtils . toString ( bb ) ; Field field = new StringField ( FIELD_NAME , serialized , Store . YES ) ; document . add ( field ) ; |
public class FileSystem { /** * Make the given filename absolute from the given root if it is not already absolute .
* < table border = " 1 " width = " 100 % " summary = " Cases " >
* < thead >
* < tr >
* < td > { @ code filename } < / td > < td > { @ code current } < / td > < td > Result < / td >
* < / tr > ... | if ( filename == null ) { return null ; } final URISchemeType scheme = URISchemeType . getSchemeType ( filename ) ; switch ( scheme ) { case JAR : try { URL jarUrl = getJarURL ( filename ) ; jarUrl = makeAbsolute ( jarUrl , current ) ; final File jarFile = getJarFile ( filename ) ; return toJarURL ( jarUrl , jarFile ) ... |
public class FileParameterValue { /** * Serve this file parameter in response to a { @ link StaplerRequest } .
* @ param request
* @ param response
* @ throws ServletException
* @ throws IOException */
public void doDynamic ( StaplerRequest request , StaplerResponse response ) throws ServletException , IOExcept... | if ( ( "/" + originalFileName ) . equals ( request . getRestOfPath ( ) ) ) { AbstractBuild build = ( AbstractBuild ) request . findAncestor ( AbstractBuild . class ) . getObject ( ) ; File fileParameter = getLocationUnderBuild ( build ) ; if ( ! ALLOW_FOLDER_TRAVERSAL_OUTSIDE_WORKSPACE ) { File fileParameterFolder = ge... |
public class TypeExtractor { /** * Infers cast types for each predicate in the bottom up order */
private ImmutableMap < Predicate , ImmutableList < TermType > > extractCastTypeMap ( Multimap < Predicate , CQIE > ruleIndex , List < Predicate > predicatesInBottomUp , ImmutableMap < CQIE , ImmutableList < Optional < Term... | // Append - only
Map < Predicate , ImmutableList < TermType > > mutableCastMap = Maps . newHashMap ( ) ; for ( Predicate predicate : predicatesInBottomUp ) { ImmutableList < TermType > castTypes = inferCastTypes ( predicate , ruleIndex . get ( predicate ) , termTypeMap , mutableCastMap , metadata ) ; mutableCastMap . p... |
public class Utils { /** * Creates a new instance of the given class .
* @ param < T > the type parameter
* @ param clazz the class object for which a new instance should be created .
* @ return the new instance of class clazz . */
public static < T extends IDeepType > T newTypeInstance ( Class < T > clazz ) { } ... | try { return clazz . newInstance ( ) ; } catch ( InstantiationException | IllegalAccessException e ) { throw new DeepGenericException ( e ) ; } |
public class DrizzlePreparedStatement { /** * < p > Sets the value of the designated parameter with the given object . The second argument must be an object type ;
* for integral values , the < code > java . lang < / code > equivalent objects should be used .
* If the second argument is an < code > InputStream < / ... | if ( x == null ) { setNull ( parameterIndex , targetSqlType ) ; return ; } switch ( targetSqlType ) { case Types . ARRAY : case Types . CLOB : case Types . DATALINK : case Types . NCHAR : case Types . NCLOB : case Types . NVARCHAR : case Types . LONGNVARCHAR : case Types . REF : case Types . ROWID : case Types . SQLXML... |
public class BplusTree { /** * Remove the Key from the tree ( this function is iterative )
* @ param key to delete
* @ return true if key was removed and false otherwise */
protected boolean removeIterative ( final K key ) { } } | final LeafNode < K , V > nodeLeaf = findLeafNode ( key , true ) ; // Find in leaf node for key and delete it
final int slot = nodeLeaf . findSlotByKey ( key ) ; if ( slot >= 0 ) { // found
// Remove Key
nodeLeaf . remove ( slot ) ; putNode ( nodeLeaf ) ; // Iterate back over nodes checking underflow
while ( ! stackNode... |
public class GatewayResponseMarshaller { /** * Marshall the given parameter object . */
public void marshall ( GatewayResponse gatewayResponse , ProtocolMarshaller protocolMarshaller ) { } } | if ( gatewayResponse == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( gatewayResponse . getResponseType ( ) , RESPONSETYPE_BINDING ) ; protocolMarshaller . marshall ( gatewayResponse . getStatusCode ( ) , STATUSCODE_BINDING ) ; protocolMar... |
public class DefaultInstalledExtensionRepository { /** * Register a newly installed extension in backward dependencies map .
* @ param localExtension the local extension to register
* @ param namespace the namespace
* @ param valid is the extension valid
* @ return the new { @ link DefaultInstalledExtension } *... | DefaultInstalledExtension installedExtension = this . extensions . get ( localExtension . getId ( ) ) ; if ( installedExtension == null ) { installedExtension = new DefaultInstalledExtension ( localExtension , this ) ; } installedExtension . setInstalled ( true , namespace ) ; installedExtension . setValid ( namespace ... |
public class FactoryFinder { /** * Returns the location where the given Class is loaded from . */
private static String which ( Class clazz ) { } } | try { String classnameAsResource = clazz . getName ( ) . replace ( '.' , '/' ) + ".class" ; ClassLoader loader = clazz . getClassLoader ( ) ; URL it ; if ( loader != null ) { it = loader . getResource ( classnameAsResource ) ; } else { it = ClassLoader . getSystemResource ( classnameAsResource ) ; } if ( it != null ) {... |
public class AgentManager { /** * Change state if agent logs out .
* @ param event */
void handleAgentCallbackLogoffEvent ( AgentCallbackLogoffEvent event ) { } } | AsteriskAgentImpl agent = getAgentByAgentId ( "Agent/" + event . getAgent ( ) ) ; if ( agent == null ) { logger . error ( "Ignored AgentCallbackLogoffEvent for unknown agent " + event . getAgent ( ) + ". Agents: " + agents . values ( ) . toString ( ) ) ; return ; } agent . updateState ( AgentState . AGENT_LOGGEDOFF ) ; |
public class ObjectValidatorSupport { /** * ネストしたプロパティの値の検証を実行する 。
* @ param < S > ネストしたプロパティのクラスタイプ
* @ param validator ネストしたプロパティに対するValidator
* @ param targetObject ネストしたプロパティのインスタンス
* @ param errors エラー情報
* @ param subPath ネストするパス
* @ param groups バリデーション時のヒントとなるグループ 。
* @ throws Illegal... | ArgUtils . notNull ( validator , "validator" ) ; ArgUtils . notNull ( targetObject , "targetObject" ) ; ArgUtils . notNull ( errors , "errors" ) ; errors . pushNestedPath ( subPath ) ; try { validator . validate ( targetObject , errors , groups ) ; } finally { errors . popNestedPath ( ) ; } |
public class TransactionRomanticSnapshotBuilder { protected void setupRequestPathExp ( StringBuilder sb , RomanticTransaction tx ) { } } | final String requestPath = tx . getRequestPath ( ) ; if ( requestPath != null ) { sb . append ( ", " ) . append ( requestPath ) ; } |
public class Database { /** * Determines whether or not the database has a table named " do " .
* @ return true if the database contains a table with the name " do " .
* @ throws Exception */
protected boolean usesDOTable ( ) throws Exception { } } | Connection conn = getConnection ( ) ; DatabaseMetaData dmd = conn . getMetaData ( ) ; // check if we need to update old table
ResultSet rs = dmd . getTables ( null , null , "do%" , null ) ; while ( rs . next ( ) ) { if ( rs . getString ( "TABLE_NAME" ) . equals ( "do" ) ) { rs . close ( ) ; return true ; } } rs . close... |
public class SoftDictionary { /** * Lookup a string in the dictionary , cache result in closeMatches .
* < p > If id = = null , consider any match . If id is non - null , consider
* only matches to strings that don ' t have the same id , or that have
* a null id . */
private void doLookup ( String id , StringWrap... | // retrain if necessary
if ( distance == null ) { distance = new MyTeacher ( ) . train ( distanceLearner ) ; } // used cached values if it ' s ok
if ( lastLookup == toFind ) return ; closeMatches = new HashSet ( ) ; closestMatch = null ; distanceToClosestMatch = - Double . MAX_VALUE ; // lookup best match to wrapper
My... |
public class DialogUtils { /** * Checks if a dialog is open .
* @ return true if dialog is open */
private boolean isDialogOpen ( ) { } } | final Activity activity = activityUtils . getCurrentActivity ( false ) ; final View [ ] views = viewFetcher . getWindowDecorViews ( ) ; View view = viewFetcher . getRecentDecorView ( views ) ; if ( ! isDialog ( activity , view ) ) { for ( View v : views ) { if ( isDialog ( activity , v ) ) { return true ; } } } else { ... |
public class ThreadPoolTaskScheduler { /** * { @ inheritDoc }
* @ see org . audit4j . core . schedule . TaskScheduler # schedule ( java . lang . Runnable , org . audit4j . core . schedule . Trigger ) */
@ Override public ScheduledFuture < ? > schedule ( Runnable task , Trigger trigger ) { } } | ScheduledExecutorService executor = getScheduledExecutor ( ) ; try { ErrorHandler errorHandlerLocal = this . errorHandler != null ? this . errorHandler : TaskUtils . getDefaultErrorHandler ( true ) ; return new ReschedulingRunnable ( task , trigger , executor , errorHandlerLocal ) . schedule ( ) ; } catch ( RejectedExe... |
public class Fetch { /** * Iterates over all fields in this fetch . The key is the field name , the value is the { @ link
* Fetch } for that field , or null if no Fetch is provided for that field .
* @ return { @ link Iterator } over all { @ link Entry } s in this fetch . */
@ Override public Iterator < Entry < Str... | return Collections . unmodifiableMap ( attrFetchMap ) . entrySet ( ) . iterator ( ) ; |
public class ContentSpecProcessor { /** * Checks to see if a ContentSpec comment matches a Content Spec Entity comment .
* @ param comment The ContentSpec comment object .
* @ param node The Content Spec Entity comment .
* @ param matchContent If the contents of the comment have to match to a reasonable extent . ... | if ( ! node . getNodeType ( ) . equals ( CommonConstants . CS_NODE_COMMENT ) ) return false ; // If the unique id is not from the parser , in which case it will start with a number than use the unique id to compare
if ( comment . getUniqueId ( ) != null && comment . getUniqueId ( ) . matches ( "^\\d.*" ) ) { return com... |
public class AbstractFacade { /** * { @ inheritDoc } */
@ Override public < E extends R > void unregister ( final UniqueKey < E > uniqueKey ) { } } | synchronized ( this . componentMap ) { // Try to grab the object we want to unregister
final List < E > readyObjectList = getReadyObjectList ( uniqueKey ) ; for ( final E readyObject : readyObjectList ) { // Unlisten all previously listened WaveType
if ( readyObject instanceof Component < ? > ) { try { globalFacade ( )... |
public class ASN1 { /** * Decode an array of bytes which is supposed to be an ASN . 1 encoded structure .
* This code does the decoding w / o any reference to a schema for what is being
* decoded so it returns type and value pairs rather than converting the values
* to the correct underlying data type .
* One o... | ArrayList < TagValue > result = new ArrayList < TagValue > ( ) ; int retTag = encoding [ offset ] ; // We only decode objects which are compound objects . That means that this bit must be set
if ( ( encoding [ offset ] & 0x20 ) != 0x20 ) throw new CoseException ( "Invalid structure" ) ; int [ ] l = DecodeLength ( offse... |
public class PeepholeMinimizeConditions { /** * Try flipping HOOKs that have negated conditions .
* Returns the replacement for n or the original if no replacement was
* necessary . */
private Node tryMinimizeHook ( Node n ) { } } | Node originalCond = n . getFirstChild ( ) ; MinimizedCondition minCond = MinimizedCondition . fromConditionNode ( originalCond ) ; MeasuredNode mNode = minCond . getMinimized ( MinimizationStyle . ALLOW_LEADING_NOT ) ; if ( mNode . isNot ( ) ) { // Swap the HOOK
Node thenBranch = n . getSecondChild ( ) ; replaceNode ( ... |
public class PooledBufferedOutputStream { /** * Writes the complete contents of this byte array output stream to
* the specified output stream argument , as if by calling the output
* stream ' s write method using < code > out . write ( buf , 0 , count ) < / code > .
* @ param out the output stream to which to wr... | for ( BufferPool . Buffer b : buffers ) { out . write ( b . buf , 0 , b . pos ) ; } |
public class TraceEventHelper { /** * Get status
* @ param input The input
* @ param ignoreDelist Should DELIST be ignored
* @ param ignoreTracking Should TRACKING be ignored
* @ param ignoreIncomplete Ignore incomplete traces
* @ return The overall result */
public static Map < String , TraceEventStatus > ge... | Map < String , TraceEventStatus > result = new TreeMap < String , TraceEventStatus > ( ) ; Iterator < Map . Entry < String , List < TraceEvent > > > it = input . entrySet ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { Map . Entry < String , List < TraceEvent > > entry = it . next ( ) ; result . put ( entry . getKey ... |
public class TwoInputUdfOperator { /** * Adds semantic information about forwarded fields of the second input of the user - defined function .
* The forwarded fields information declares fields which are never modified by the function and
* which are forwarded at the same position to the output or unchanged copied ... | if ( this . udfSemantics == null || this . analyzedUdfSemantics ) { // extract semantic properties from function annotations
setSemanticProperties ( extractSemanticAnnotationsFromUdf ( getFunction ( ) . getClass ( ) ) ) ; } if ( this . udfSemantics == null || this . analyzedUdfSemantics ) { setSemanticProperties ( new ... |
public class FctBnEntitiesProcessors { /** * < p > Get PrcCsvColumnCreate ( create and put into map ) . < / p >
* @ return requested PrcCsvColumnCreate
* @ throws Exception - an exception */
protected final PrcCsvColumnCreate < RS > createPutPrcCsvColumnCreate ( ) throws Exception { } } | PrcCsvColumnCreate < RS > proc = new PrcCsvColumnCreate < RS > ( ) ; @ SuppressWarnings ( "unchecked" ) PrcEntityCreate < RS , CsvColumn , Long > procDlg = ( PrcEntityCreate < RS , CsvColumn , Long > ) lazyGet ( null , PrcEntityCreate . class . getSimpleName ( ) ) ; proc . setPrcEntityCreate ( procDlg ) ; // assigning ... |
public class ReconstructionDataSetIterator { /** * Like the standard next method but allows a
* customizable number of examples returned
* @ param num the number of examples
* @ return the next data applyTransformToDestination */
@ Override public DataSet next ( int num ) { } } | DataSet ret = iter . next ( num ) ; ret . setLabels ( ret . getFeatures ( ) ) ; return ret ; |
public class RecurlyClient { /** * Pause a subscription or cancel a scheduled pause on a subscription .
* * For an active subscription without a pause scheduled already , this will
* schedule a pause period to begin at the next renewal date for the specified
* number of billing cycles ( remaining _ pause _ cycles... | Subscription request = new Subscription ( ) ; request . setRemainingPauseCycles ( remainingPauseCycles ) ; return doPUT ( Subscription . SUBSCRIPTION_RESOURCE + "/" + subscriptionUuid + "/pause" , request , Subscription . class ) ; |
public class PubSub { /** * Timeout the resource
* @ return A { @ link Broadcastable } used to broadcast events . */
@ GET @ Suspend ( period = 60 , timeUnit = TimeUnit . SECONDS , listeners = { } } | EventsLogger . class } ) @ Path ( "timeout" ) public Broadcastable timeout ( ) { return new Broadcastable ( broadcaster ) ; |
public class ClassUtil { /** * Locates and returns the first method in the supplied class whose name is equal to the
* specified name .
* @ return the method with the specified name or null if no method with that name could be
* found . */
public static Method findMethod ( Class < ? > clazz , String name ) { } } | Method [ ] methods = clazz . getMethods ( ) ; for ( Method method : methods ) { if ( method . getName ( ) . equals ( name ) ) { return method ; } } return null ; |
public class ProjectResolver { /** * Return the { @ link MavenProject } which is the base module for scanning
* and analysis .
* The base module is by searching with the module tree starting from the current module over its parents until a module is found containing a
* directory " jqassistant " or no parent can ... | String rootModuleContextKey = ProjectResolver . class . getName ( ) + "#rootModule" ; MavenProject rootModule = ( MavenProject ) module . getContextValue ( rootModuleContextKey ) ; if ( rootModule == null ) { if ( useExecutionRootAsProjectRoot ) { rootModule = getRootModule ( reactor ) ; } else { rootModule = getRootMo... |
public class Base64 { /** * Encodes binary data using the base64 algorithm , optionally chunking the output into 76 character blocks .
* @ param binaryData
* Array containing binary data to encode .
* @ param isChunked
* if { @ code true } this encoder will chunk the base64 output into 76 character blocks
* @... | return encodeBase64 ( binaryData , isChunked , urlSafe , Integer . MAX_VALUE ) ; |
public class WeightInitUtil { /** * Reshape the parameters view , without modifying the paramsView array values .
* @ param shape Shape to reshape
* @ param paramsView Parameters array view
* @ param flatteningOrder Order in which parameters are flattened / reshaped */
public static INDArray reshapeWeights ( long... | return paramsView . reshape ( flatteningOrder , shape ) ; |
public class HtmlWriter { /** * Checks if a given font is the same as the font that was last used .
* @ param font the font of an object
* @ return true if the font differs */
public boolean isOtherFont ( Font font ) { } } | try { Font cFont = ( Font ) currentfont . peek ( ) ; if ( cFont . compareTo ( font ) == 0 ) return false ; return true ; } catch ( EmptyStackException ese ) { if ( standardfont . compareTo ( font ) == 0 ) return false ; return true ; } |
public class Admin { /** * @ throws PageException */
private void doUpdateDefaultPassword ( ) throws PageException { } } | try { admin . updateDefaultPassword ( getString ( "admin" , action , "newPassword" ) ) ; } catch ( Exception e ) { throw Caster . toPageException ( e ) ; } store ( ) ; |
public class KeyStores { /** * Load keystore from InputStream , close the stream after load succeed or failed . */
public static KeyStore load ( InputStream in , char [ ] password ) { } } | try { KeyStore myTrustStore = KeyStore . getInstance ( KeyStore . getDefaultType ( ) ) ; myTrustStore . load ( in , password ) ; return myTrustStore ; } catch ( CertificateException | NoSuchAlgorithmException | KeyStoreException | IOException e ) { throw new TrustManagerLoadFailedException ( e ) ; } finally { Closeable... |
public class ModelLog { /** * Adds an element to the list , and if recordOnDisk is true , appends it to the backing store .
* @ param m the model to add
* @ param recordOnDisk whether or not to add to the backing disk store
* @ return success */
protected boolean add ( GraphicalModel m , boolean recordOnDisk ) { ... | boolean success = super . add ( m ) ; if ( ! success ) return false ; if ( recordOnDisk ) { try { if ( writeWithFactors ) { // Attempt to record this to the backing log file , with the factors
writeExample ( m ) ; } else { // Attempt to record this to the backing log file , without the factors
Set < GraphicalModel . Fa... |
public class Range { /** * Converts the range to a JavaScript number array .
* @ return a JavaScript number array */
public JsArrayNumber toJsArray ( ) { } } | JsArrayNumber array = JavaScriptObject . createArray ( ) . cast ( ) ; array . push ( minValue ) ; array . push ( maxValue ) ; return array ; |
public class ZkClient { /** * Gets the acl on path
* @ param path
* @ return an entry instance with key = list of acls on node and value = stats .
* @ throws ZkException
* if any ZooKeeper exception occurred
* @ throws RuntimeException
* if any other exception occurs */
public Map . Entry < List < ACL > , S... | if ( path == null ) { throw new NullPointerException ( "Missing value for path" ) ; } if ( ! exists ( path ) ) { throw new RuntimeException ( "trying to get acls on non existing node " + path ) ; } return retryUntilConnected ( new Callable < Map . Entry < List < ACL > , Stat > > ( ) { @ Override public Map . Entry < Li... |
public class SnapshotVerifier { /** * Perform snapshot verification .
* @ param directories list of directories to search for snapshots
* @ param snapshotNames set of snapshot names / nonces to verify */
public static void verifySnapshots ( final List < String > directories , final Set < String > snapshotNames ) { ... | FileFilter filter = new SnapshotFilter ( ) ; if ( ! snapshotNames . isEmpty ( ) ) { filter = new SpecificSnapshotFilter ( snapshotNames ) ; } Map < String , Snapshot > snapshots = new HashMap < String , Snapshot > ( ) ; for ( String directory : directories ) { SnapshotUtil . retrieveSnapshotFiles ( new File ( directory... |
public class GelfLoggingFilter { /** * The < code > doFilter < / code > method of the Filter is called by the
* container each time a request / response pair is passed through the
* chain due to a client request for a resource at the end of the chain .
* The FilterChain passed in to this method allows the Filter ... | // It ' s quite safe to assume that we only receive HTTP requests
final HttpServletRequest httpRequest = ( HttpServletRequest ) request ; final HttpServletResponse httpResponse = ( HttpServletResponse ) response ; final StringBuilder buf = new StringBuilder ( 256 ) ; final Optional < String > address = Optional . ofNul... |
public class CodingAnnotationStudy { /** * Category - > # */
public static Map < Object , Integer > countTotalAnnotationsPerCategory ( final ICodingAnnotationStudy study ) { } } | Map < Object , Integer > result = new HashMap < Object , Integer > ( ) ; for ( ICodingAnnotationItem item : study . getItems ( ) ) { if ( item . getRaterCount ( ) <= 1 ) { continue ; } for ( IAnnotationUnit unit : item . getUnits ( ) ) { Object category = unit . getCategory ( ) ; if ( category == null ) { continue ; } ... |
public class Crypto { /** * This method returns a { @ link Cipher } instance , for
* { @ value # CIPHER _ ALGORITHM } in { @ value # CIPHER _ MODE } mode , with padding
* { @ value # CIPHER _ PADDING } .
* It then initialises the { @ link Cipher } in either
* { @ link Cipher # ENCRYPT _ MODE } or { @ link Ciphe... | // Initialise the cipher :
IvParameterSpec ivParameterSpec = new IvParameterSpec ( iv ) ; try { cipher . init ( mode , key , ivParameterSpec ) ; } catch ( InvalidKeyException e ) { // This is likely to be an invalid key size , so explain what just happened and signpost how to fix it .
String message ; if ( StringUtils ... |
public class InternalNode { /** * Return an edge to match with input value
* @ param value
* @ return
* @ throws nl . uva . sne . midd . UnmatchedException */
public AbstractEdge < T > match ( T value ) throws UnmatchedException , MIDDException { } } | for ( AbstractEdge < T > e : this . edges ) { if ( e . match ( value ) ) { return e ; } } throw new UnmatchedException ( "No matching edge found for value " + value ) ; |
public class QuickStartSecurityRegistry { /** * { @ inheritDoc } */
@ Override public List < String > getGroupsForUser ( String userSecurityName ) throws EntryNotFoundException , RegistryException { } } | if ( userSecurityName == null ) { throw new IllegalArgumentException ( "userSecurityName is null" ) ; } if ( userSecurityName . isEmpty ( ) ) { throw new IllegalArgumentException ( "uniqueGroupId is an empty String" ) ; } if ( user . equals ( userSecurityName ) ) { return new ArrayList < String > ( ) ; } else { throw n... |
public class Parser { /** * syck _ parser _ read */
public int read ( ) throws java . io . IOException { } } | int len = 0 ; int skip = 0 ; switch ( io_type ) { case Str : skip = moveTokens ( ) ; len = ( ( JechtIO . Str ) io ) . read . read ( buffer , ( ( JechtIO . Str ) io ) , YAML . BUFFERSIZE - 1 , skip ) ; break ; case File : skip = moveTokens ( ) ; len = ( ( JechtIO . File ) io ) . read . read ( buffer , ( ( JechtIO . File... |
public class Utils { /** * Validates a condition , throwing a RuntimeException if the condition is violated .
* @ param condition The condition .
* @ param message The message for the runtime exception , with format variables as defined by
* { @ link String # format ( String , Object . . . ) } .
* @ param value... | if ( ! condition ) { throw new RuntimeException ( String . format ( message , values ) ) ; } |
public class FlacFile { /** * Opens the given file for reading */
public static FlacFile open ( File f ) throws IOException , FileNotFoundException { } } | // Open , in a way that we can skip backwards a few bytes
InputStream inp = new BufferedInputStream ( new FileInputStream ( f ) , 8 ) ; FlacFile file = open ( inp ) ; return file ; |
public class HungarianNotation { /** * Get the name of the field removing hungarian notation
* @ param name The field name
* @ return the field name without hungarian notation */
public static String removeNotation ( String name ) { } } | if ( name . matches ( "^m[A-Z]{1}" ) ) { return name . substring ( 1 , 2 ) . toLowerCase ( ) ; } else if ( name . matches ( "m[A-Z]{1}.*" ) ) { return name . substring ( 1 , 2 ) . toLowerCase ( ) + name . substring ( 2 ) ; } return name ; |
public class SimpleAttachable { /** * { @ inheritDoc } */
public synchronized < T > void addToAttachmentList ( final AttachmentKey < AttachmentList < T > > key , final T value ) { } } | if ( key != null ) { final Map < AttachmentKey < ? > , Object > attachments = this . attachments ; final AttachmentList < T > list = key . cast ( attachments . get ( key ) ) ; if ( list == null ) { final AttachmentList < T > newList = new AttachmentList < T > ( ( ( ListAttachmentKey < T > ) key ) . getValueClass ( ) ) ... |
public class ToArrays { /** * Returns a method that can be used with { @ link solid . stream . Stream # collect ( Func1 ) }
* to convert an iterable stream of { @ link Number } type into a primitive short [ ] array .
* @ return a method that converts an iterable stream of { @ link Number } type into a primitive sho... | return new Func1 < Iterable < Short > , short [ ] > ( ) { @ Override public short [ ] call ( Iterable < Short > value ) { return new QuickNumberArray ( value ) . toShorts ( ) ; } } ; |
public class XConstructorCallImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } } | switch ( featureID ) { case XbasePackage . XCONSTRUCTOR_CALL__CONSTRUCTOR : if ( resolve ) return getConstructor ( ) ; return basicGetConstructor ( ) ; case XbasePackage . XCONSTRUCTOR_CALL__ARGUMENTS : return getArguments ( ) ; case XbasePackage . XCONSTRUCTOR_CALL__TYPE_ARGUMENTS : return getTypeArguments ( ) ; case ... |
public class NtlmPasswordAuthentication { /** * Returns the effective user session key .
* @ param challenge The server challenge .
* @ return A < code > byte [ ] < / code > containing the effective user session key ,
* used in SMB MAC signing and NTLMSSP signing and sealing . */
public byte [ ] getUserSessionKey... | if ( hashesExternal ) return null ; byte [ ] key = new byte [ 16 ] ; try { getUserSessionKey ( challenge , key , 0 ) ; } catch ( Exception ex ) { if ( log . level > 0 ) ex . printStackTrace ( log ) ; } return key ; |
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public IfcMemberTypeEnum createIfcMemberTypeEnumFromString ( EDataType eDataType , String initialValue ) { } } | IfcMemberTypeEnum result = IfcMemberTypeEnum . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ; |
public class JaxWsDDHelper { /** * For internal usage . Can only process the PortComponent . class and WebserviceDescription . class .
* @ param portLink
* @ param containerToAdapt
* @ param clazz
* @ return
* @ throws UnableToAdaptException */
@ SuppressWarnings ( "unchecked" ) private static < T > T getHigh... | if ( null == portLink ) { return null ; } if ( PortComponent . class . isAssignableFrom ( clazz ) || WebserviceDescription . class . isAssignableFrom ( clazz ) ) { Webservices wsXml = containerToAdapt . adapt ( Webservices . class ) ; if ( null == wsXml ) { return null ; } for ( WebserviceDescription wsDes : wsXml . ge... |
public class BELScriptLexer { /** * $ ANTLR start " NEWLINE " */
public final void mNEWLINE ( ) throws RecognitionException { } } | try { int _type = NEWLINE ; int _channel = DEFAULT_TOKEN_CHANNEL ; // BELScript . g : 297:8 : ( ( ' \ \ u000d ' ) ? ' \ \ u000a ' | ' \ \ u000d ' )
int alt11 = 2 ; int LA11_0 = input . LA ( 1 ) ; if ( ( LA11_0 == '\r' ) ) { int LA11_1 = input . LA ( 2 ) ; if ( ( LA11_1 == '\n' ) ) { alt11 = 1 ; } else { alt11 = 2 ; } }... |
public class OutlookMessageParser { /** * Reads the bytes from the stream to a byte array .
* @ param dstream The stream to be read from .
* @ return An array of bytes .
* @ throws IOException If the stream cannot be read properly . */
private byte [ ] getBytesFromStream ( final InputStream dstream ) throws IOExc... | final ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; final byte [ ] buffer = new byte [ 1024 ] ; int read ; while ( ( read = dstream . read ( buffer ) ) > 0 ) { baos . write ( buffer , 0 , read ) ; } return baos . toByteArray ( ) ; |
public class BOSHClient { /** * Finds < tt > RequestProcessor < / tt > which has claimed given exchange .
* @ param exch the < tt > HTTPExchange < / tt > for which < tt > RequestProcessor < / tt >
* is to be found .
* @ return < tt > { @ link RequestProcessor } < / tt > that has claimed given
* < tt > HTTPExcha... | assertLocked ( ) ; for ( RequestProcessor reqProc : procThreads ) { if ( exch == reqProc . procExchange ) return reqProc ; } return null ; |
public class MapBasedDataMaster { /** * fixme - should be package - private */
public void readResources ( String path ) throws IOException { } } | Enumeration < URL > resources = getClass ( ) . getClassLoader ( ) . getResources ( path ) ; if ( ! resources . hasMoreElements ( ) ) { throw new IllegalArgumentException ( String . format ( "File %s was not found on classpath" , path ) ) ; } Yaml yaml = new Yaml ( ) ; while ( resources . hasMoreElements ( ) ) { appendD... |
public class Compositions { /** * Composes an iterator of endofunctions .
* @ param < T > the functions parameter and result type
* @ param endodelegates to be composed ( e . g : f , g , h )
* @ return a function performing f ° g ° h */
public static < T > UnaryOperator < T > compose ( Iterator < Function < T , T... | return new UnaryOperatorsComposer < T > ( ) . apply ( endodelegates ) ; |
public class IdlToDSMojo { /** * Find , open and parse the IDD implied by the specified service name . Reads either an explicit
* file or else a resource based on { @ link # iddAsResource } flag .
* The implied name is simply the service name + " . xml " . */
private Document parseIddFromString ( String iddContent ... | return XmlUtil . parse ( new ByteArrayInputStream ( iddContent . getBytes ( ) ) , resolver ) ; |
public class FacebookSignatureUtil { /** * Out of the passed in < code > reqParams < / code > , extracts the parameters that
* are known FacebookParams and returns them .
* @ param reqParams a map of request parameters to their values
* @ return a map suitable for being passed to verify signature */
public static... | if ( null == reqParams ) return null ; EnumMap < FacebookParam , CharSequence > result = new EnumMap < FacebookParam , CharSequence > ( FacebookParam . class ) ; for ( Map . Entry < CharSequence , CharSequence > entry : reqParams . entrySet ( ) ) { FacebookParam matchingFacebookParam = FacebookParam . get ( entry . get... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.