signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class HttpRequest { /** * < pre >
* The referer URL of the request , as defined in
* [ HTTP / 1.1 Header Field Definitions ] ( http : / / www . w3 . org / Protocols / rfc2616 / rfc2616 - sec14 . html ) .
* < / pre >
* < code > string referer = 8 ; < / code > */
public java . lang . String getReferer ( ) ... | java . lang . Object ref = referer_ ; if ( ref instanceof java . lang . String ) { return ( java . lang . String ) ref ; } else { com . google . protobuf . ByteString bs = ( com . google . protobuf . ByteString ) ref ; java . lang . String s = bs . toStringUtf8 ( ) ; referer_ = s ; return s ; } |
public class UpgradeScanner10 { /** * Upgrade a table page . */
private void upgradeLeaf ( TableEntry10 table , TableUpgrade upgradeTable , Page10 page ) throws IOException { } } | try ( ReadStream is = openRead ( page . segment ( ) . address ( ) , page . segment ( ) . length ( ) ) ) { is . position ( page . address ( ) ) ; byte [ ] minKey = new byte [ table . keyLength ( ) ] ; byte [ ] maxKey = new byte [ table . keyLength ( ) ] ; is . read ( minKey , 0 , minKey . length ) ; is . read ( maxKey ,... |
public class Messenger { /** * Send document with preview
* @ param peer destination peer
* @ param fileName File name ( without path )
* @ param mimeType mimetype of document
* @ param descriptor File Descriptor
* @ param fastThumb FastThumb of preview */
@ ObjectiveCName ( "sendDocumentWithPeer:withName:wit... | modules . getMessagesModule ( ) . sendDocument ( peer , fileName , mimeType , fastThumb , descriptor ) ; |
public class NotificationUtils { /** * TODO allow customizing the channel name and color */
@ RequiresApi ( api = Build . VERSION_CODES . O ) public static void setupNotificationChannel ( ) { } } | NotificationManager manager = ( NotificationManager ) getApplicationContext ( ) . getSystemService ( Context . NOTIFICATION_SERVICE ) ; NotificationChannel channel = new NotificationChannel ( OfflineConstants . NOTIFICATION_CHANNEL , "Offline" , NotificationManager . IMPORTANCE_DEFAULT ) ; channel . setLightColor ( Col... |
public class EntropyStatistic { /** * Maximal entropy */
private double upperBoundReduction ( double classes ) { } } | double p = 1 / classes ; double r = p * Math . log ( p ) / log2 * classes ; return - r ; |
public class ServicesInner { /** * Get compatible SKUs .
* The services resource is the top - level resource that represents the Data Migration Service . The skus action returns the list of SKUs that a service resource can be updated to .
* @ param nextPageLink The NextLink from the previous successful call to List... | return listSkusNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < AvailableServiceSkuInner > > , Page < AvailableServiceSkuInner > > ( ) { @ Override public Page < AvailableServiceSkuInner > call ( ServiceResponse < Page < AvailableServiceSkuInner > > response ) { return response... |
public class SoyFileSet { /** * Helper method to compile SoySauce from { @ link ServerCompilationPrimitives } */
private SoySauce doCompileSoySauce ( ServerCompilationPrimitives primitives , Map < String , Supplier < Object > > pluginInstances ) { } } | Optional < CompiledTemplates > templates = BytecodeCompiler . compile ( primitives . registry , primitives . soyTree , // if there is an AST cache , assume we are in ' dev mode ' and trigger lazy compilation .
cache != null , errorReporter , soyFileSuppliers , typeRegistry ) ; throwIfErrorsPresent ( ) ; return new SoyS... |
public class AfplibFactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public FNDFtWdClass createFNDFtWdClassFromString ( EDataType eDataType , String initialValue ) { } } | FNDFtWdClass result = FNDFtWdClass . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ; |
public class CollectionManager { /** * An empty iterator with hasNext always false .
* @ param < T > generic type ,
* since java can ' t infer it will be Object
* @ return the null iterator */
private < T > Iterator < T > emptyIt ( ) { } } | return new Iterator < T > ( ) { @ Override public boolean hasNext ( ) { return false ; } @ Override public T next ( ) { return null ; } } ; |
public class DialogRootView { /** * Applies the dialog ' s top padding to the view of a specific area .
* @ param area
* The area , the view , the padding should be applied to , corresponds to , as an instance
* of the class { @ link Area } . The area may not be null
* @ param view
* The view , the padding sh... | if ( area != Area . HEADER && area != Area . CONTENT && area != Area . BUTTON_BAR && view . getVisibility ( ) == View . VISIBLE ) { view . setPadding ( view . getPaddingLeft ( ) , dialogPadding [ 1 ] , view . getPaddingRight ( ) , view . getPaddingBottom ( ) ) ; return true ; } return false ; |
public class HomeWS { /** * get uploaded filename , is there a easy way in RESTEasy ? */
private String getFileName ( MultivaluedMap < String , String > header ) { } } | String [ ] contentDisposition = header . getFirst ( "Content-Disposition" ) . split ( ";" ) ; for ( String filename : contentDisposition ) { if ( ( filename . trim ( ) . startsWith ( "filename" ) ) ) { String [ ] name = filename . split ( "=" ) ; String finalFileName = name [ 1 ] . trim ( ) . replaceAll ( "\"" , "" ) ;... |
public class BccClient { /** * Getting the vnc url to access the instance .
* The vnc url can be used once .
* @ param request The request containing all options for getting the vnc url . */
public GetInstanceVncResponse getInstanceVnc ( GetInstanceVncRequest request ) { } } | checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getInstanceId ( ) , "request instanceId should not be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , INSTANCE_PREFIX , request . getInstanceId ( ) , "vnc" ) ; return this . i... |
public class ThriftInvertedIndexHandler { /** * / * ( non - Javadoc )
* @ see com . impetus . client . cassandra . index . InvertedIndexHandlerBase # searchSuperColumnsInRange ( java . lang . String , org . apache . cassandra . thrift . ConsistencyLevel , java . lang . String , java . lang . String , byte [ ] , java ... | SlicePredicate colPredicate = new SlicePredicate ( ) ; SliceRange sliceRange = new SliceRange ( ) ; sliceRange . setStart ( start ) ; sliceRange . setFinish ( finish ) ; colPredicate . setSlice_range ( sliceRange ) ; Connection conn = thriftClient . getConnection ( ) ; List < ColumnOrSuperColumn > coscList = null ; try... |
public class TypeHandler { /** * Create an Object from the classname and empty constructor .
* @ param classname the argument value
* @ return the initialised object
* @ throws ParseException if the class could not be found or the object could not be created */
public static Object createObject ( String classname... | Class < ? > cl ; try { cl = Class . forName ( classname ) ; } catch ( ClassNotFoundException cnfe ) { throw new ParseException ( "Unable to find the class: " + classname ) ; } try { return cl . newInstance ( ) ; } catch ( Exception e ) { throw new ParseException ( e . getClass ( ) . getName ( ) + "; Unable to create an... |
public class DataTransferServiceClient { /** * Returns information about running and completed jobs .
* < p > Sample code :
* < pre > < code >
* try ( DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient . create ( ) ) {
* TransferConfigName parent = ProjectTransferConfigName . of ( "... | ListTransferRunsRequest request = ListTransferRunsRequest . newBuilder ( ) . setParent ( parent == null ? null : parent . toString ( ) ) . build ( ) ; return listTransferRuns ( request ) ; |
public class CmsAreaSelectPanel { /** * Moves the select area to the specified position , while keeping the size . < p >
* @ param posX the new X position
* @ param posY the new Y position */
private void moveTo ( int posX , int posY ) { } } | posX = ( posX < 0 ) ? 0 : ( ( ( posX + m_currentSelection . getWidth ( ) ) >= m_elementWidth ) ? m_elementWidth - m_currentSelection . getWidth ( ) : posX ) ; posY = ( posY < 0 ) ? 0 : ( ( ( posY + m_currentSelection . getHeight ( ) ) >= m_elementHeight ) ? m_elementHeight - m_currentSelection . getHeight ( ) : posY ) ... |
public class AbstractWatchService { /** * Returns the given key , throwing an exception if it ' s the poison . */
@ Nullable private WatchKey check ( @ Nullable WatchKey key ) { } } | if ( key == poison ) { // ensure other blocking threads get the poison
queue . offer ( poison ) ; throw new ClosedWatchServiceException ( ) ; } return key ; |
public class LssClient { /** * Create a live session in the live stream service .
* @ param request The request object containing all options for creating live session .
* @ return the response */
public CreateSessionResponse createSession ( CreateSessionRequest request ) { } } | checkNotNull ( request , "The parameter request should NOT be null." ) ; if ( request . getPreset ( ) == null && request . getPresets ( ) == null ) { throw new IllegalArgumentException ( "The parameter preset and presets should NOT both be null or empty." ) ; } InternalRequest internalRequest = createRequest ( HttpMeth... |
public class TrackedTorrent { /** * Update this torrent ' s swarm from an announce event .
* This will automatically create a new peer on a ' started ' announce event ,
* and remove the peer on a ' stopped ' announce event .
* @ param event The reported event . If < em > null < / em > , means a regular
* interv... | logger . trace ( "event {}, Peer: {}:{}" , new Object [ ] { event . getEventName ( ) , ip , port } ) ; TrackedPeer peer = null ; TrackedPeer . PeerState state = TrackedPeer . PeerState . UNKNOWN ; PeerUID peerUID = new PeerUID ( new InetSocketAddress ( ip , port ) , getHexInfoHash ( ) ) ; if ( RequestEvent . STARTED . ... |
public class ScaleAnimation { /** * Java wants the first call in a constructor to be super ( ) if it exists at all , so we have to
* trick it with this function .
* Oh , and this function computes how big the bounding box needs to be to bound the inputted
* image scaled to the inputted size centered around the in... | Point size = getSize ( scale , image ) ; Point corner = getCorner ( center , size ) ; return new Rectangle ( corner . x , corner . y , size . x , size . y ) ; |
public class AmazonApiGatewayClient { /** * Changes information about an < a > ClientCertificate < / a > resource .
* @ param updateClientCertificateRequest
* A request to change information about an < a > ClientCertificate < / a > resource .
* @ return Result of the UpdateClientCertificate operation returned by ... | request = beforeClientExecution ( request ) ; return executeUpdateClientCertificate ( request ) ; |
public class Resources { /** * Build a color item .
* @ param colorParams the primitive values for the color
* @ return a new fresh color item object */
public static ColorItem create ( final ColorParams colorParams ) { } } | return ColorItemImpl . create ( ) . uid ( colorIdGenerator . incrementAndGet ( ) ) . set ( colorParams ) ; |
public class SiteRegistrationScreen { /** * GetSiteProperties Method . */
public Map < String , Object > getSiteProperties ( ) { } } | Map < String , Object > properties = super . getSiteProperties ( ) ; properties . put ( BaseRegistrationScreen . SITE_TEMPLATE_CODE_PARAM , DEFAULT_SITE_TEMPLATE ) ; properties . put ( BaseRegistrationScreen . SITE_NAME_TEMPLATE_PARAM , "{0} Site" ) ; properties . put ( MenusMessageData . SITE_TEMPLATE_MENU , "site" ) ... |
public class TagsApi { /** * Returns a list of hot tags for the given period .
* This method does not require authentication .
* @ param period period for which to fetch hot tags . Optional .
* @ param count number of tags to return . Defaults to 20 . Maximum allowed value is 200 . Optional .
* @ return hot tag... | Map < String , String > params = new TreeMap < > ( ) ; params . put ( "method" , "flickr.tags.getHotList" ) ; if ( period != null ) { params . put ( "period" , period . toString ( ) ) ; } if ( count != null && count > 0 ) { params . put ( "count" , count . toString ( ) ) ; } return jinx . flickrGet ( params , HotList .... |
public class Collections { /** * Creates a { @ code Spliterator } with only the specified element
* @ param < T > Type of elements
* @ return A singleton { @ code Spliterator } */
static < T > Spliterator < T > singletonSpliterator ( final T element ) { } } | return new Spliterator < T > ( ) { long est = 1 ; @ Override public Spliterator < T > trySplit ( ) { return null ; } @ Override public boolean tryAdvance ( Consumer < ? super T > consumer ) { Objects . requireNonNull ( consumer ) ; if ( est > 0 ) { est -- ; consumer . accept ( element ) ; return true ; } return false ;... |
public class POP3Handler { /** * Quit . */
public void exit ( ) { } } | this . quit = true ; try { if ( this . clientSocket != null && ! this . clientSocket . isClosed ( ) ) { this . clientSocket . close ( ) ; this . clientSocket = null ; } } catch ( final IOException e ) { LOGGER . log ( Level . SEVERE , "Error" , e ) ; } |
public class ElementMatchers { /** * Matches a { @ link MethodDescription } that is { @ code synchronized } .
* @ param < T > The type of the matched object .
* @ return A matcher for a { @ code synchronized } method description . */
public static < T extends ModifierReviewable . ForMethodDescription > ElementMatch... | return new ModifierMatcher < T > ( ModifierMatcher . Mode . SYNCHRONIZED ) ; |
public class BufferDump { /** * Debug print the input byte [ ] up to the input maximum length . This will be
* a sequence of 16 byte lines , starting with a line indicator , the hex
* bytes and then the ASCII representation .
* @ param data
* @ param length
* @ return String */
static public String getHexDump... | // boundary checks . . . .
if ( null == data || 0 > length ) { return null ; } // if we have less than the target amount , just print what we have
if ( data . length < length ) { length = data . length ; } int numlines = ( length / 16 ) + ( ( ( length % 16 ) > 0 ) ? 1 : 0 ) ; StringBuilder buffer = new StringBuilder ( ... |
public class SkillDetailsMarshaller { /** * Marshall the given parameter object . */
public void marshall ( SkillDetails skillDetails , ProtocolMarshaller protocolMarshaller ) { } } | if ( skillDetails == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( skillDetails . getProductDescription ( ) , PRODUCTDESCRIPTION_BINDING ) ; protocolMarshaller . marshall ( skillDetails . getInvocationPhrase ( ) , INVOCATIONPHRASE_BINDING ... |
public class NavigationViewModel { /** * This method will pass { @ link MapboxNavigationOptions } from the { @ link NavigationViewOptions }
* to this view model to be used to initialize { @ link MapboxNavigation } .
* @ param options to init MapboxNavigation */
void initialize ( NavigationViewOptions options ) { } ... | MapboxNavigationOptions navigationOptions = options . navigationOptions ( ) ; navigationOptions = navigationOptions . toBuilder ( ) . isFromNavigationUi ( true ) . build ( ) ; initializeLanguage ( options ) ; initializeTimeFormat ( navigationOptions ) ; initializeDistanceFormatter ( options ) ; if ( ! isRunning ( ) ) {... |
public class LocatableInputSplitList { /** * Returns the next locatable input split to be consumed by the given instance . The returned input split is selected
* in a
* way that the distance between the split ' s storage location and the requesting { @ link AbstractInstance } is as
* short as possible .
* @ par... | final Queue < QueueElem > instanceSplitList = getInstanceSplitList ( instance ) ; while ( true ) { final QueueElem candidate = instanceSplitList . poll ( ) ; if ( candidate == null ) { return null ; } if ( this . masterSet . remove ( candidate . getInputSplit ( ) ) ) { if ( LOG . isInfoEnabled ( ) ) { if ( candidate . ... |
public class ToolBarWindowIsActiveState { /** * { @ inheritDoc } */
public boolean isInState ( JComponent c ) { } } | Component parent = c ; while ( parent . getParent ( ) != null ) { if ( parent instanceof JInternalFrame || parent instanceof Window ) { break ; } parent = parent . getParent ( ) ; } if ( parent instanceof JInternalFrame ) { return ( ( JInternalFrame ) parent ) . isSelected ( ) ; } else if ( parent instanceof Window ) {... |
public class ManifestEntryVerifier { /** * update the digests for the digests we are interested in */
public void update ( byte buffer ) { } } | if ( skip ) return ; for ( int i = 0 ; i < digests . size ( ) ; i ++ ) { digests . get ( i ) . update ( buffer ) ; } |
public class LibertyCustomizeBindingOutInterceptor { /** * build the qname with the given , and make sure the namespace is ended with " / " if specified .
* @ param portNameSpace
* @ param portLocalName
* @ return */
public static QName buildQName ( String namespace , String localName ) { } } | String namespaceURI = namespace ; if ( ! isEmpty ( namespace ) && ! namespace . trim ( ) . endsWith ( "/" ) ) { namespaceURI += "/" ; } return new QName ( namespaceURI , localName ) ; |
public class ExtendedMessageFormat { /** * Parse the format component of a format element .
* @ param pattern string to parse
* @ param pos current parse position
* @ return Format description String */
private String parseFormatDescription ( final String pattern , final ParsePosition pos ) { } } | final int start = pos . getIndex ( ) ; seekNonWs ( pattern , pos ) ; final int text = pos . getIndex ( ) ; int depth = 1 ; for ( ; pos . getIndex ( ) < pattern . length ( ) ; next ( pos ) ) { switch ( pattern . charAt ( pos . getIndex ( ) ) ) { case START_FE : depth ++ ; break ; case END_FE : depth -- ; if ( depth == 0... |
public class TargetMarshaller { /** * Marshall the given parameter object . */
public void marshall ( Target target , ProtocolMarshaller protocolMarshaller ) { } } | if ( target == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( target . getId ( ) , ID_BINDING ) ; protocolMarshaller . marshall ( target . getArn ( ) , ARN_BINDING ) ; protocolMarshaller . marshall ( target . getRoleArn ( ) , ROLEARN_BINDIN... |
public class BufferUtils { /** * Convert buffer to an integer . Parses up to the first non - numeric character . If no number is found an
* IllegalArgumentException is thrown
* @ param buffer A buffer containing an integer in flush mode . The position is not changed .
* @ param position the position in the buffer... | int val = 0 ; boolean started = false ; boolean minus = false ; int limit = position + length ; if ( length <= 0 ) throw new NumberFormatException ( toString ( buffer , position , length , StandardCharsets . UTF_8 ) ) ; for ( int i = position ; i < limit ; i ++ ) { byte b = buffer . get ( i ) ; if ( b <= SPACE ) { if (... |
public class TypeVariableName { /** * Returns type variable named { @ code name } with { @ code bounds } . */
public static TypeVariableName get ( String name , TypeName ... bounds ) { } } | return TypeVariableName . of ( name , Arrays . asList ( bounds ) ) ; |
public class GraphUtils { /** * Debugging : dot representation of a set of connected nodes . The resulting
* dot representation will use { @ code Node . toString } to display node labels
* and { @ code Node . printDependency } to display edge labels . The resulting
* representation is also customizable with a gra... | StringBuilder buf = new StringBuilder ( ) ; buf . append ( String . format ( "digraph %s {\n" , name ) ) ; buf . append ( String . format ( "label = \"%s\";\n" , header ) ) ; // dump nodes
for ( TarjanNode < D > n : nodes ) { buf . append ( String . format ( "%s [label = \"%s\"];\n" , n . hashCode ( ) , n . toString ( ... |
public class ReferencePipeline { /** * Stateless intermediate operations from Stream */
@ Override public Stream < P_OUT > unordered ( ) { } } | if ( ! isOrdered ( ) ) return this ; return new StatelessOp < P_OUT , P_OUT > ( this , StreamShape . REFERENCE , StreamOpFlag . NOT_ORDERED ) { @ Override public Sink < P_OUT > opWrapSink ( int flags , Sink < P_OUT > sink ) { return sink ; } } ; |
public class JmsSessionImpl { /** * Return a count of the number of Producers currently open on this Session . */
public int getProducerCount ( ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getProducerCount" ) ; int producerCount = producers . size ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getProducerCount" , producerCount ) ; return pro... |
public class BeanPropertyAccessor { /** * Returns an array of Lists of BeanProperties . The first index
* matches a switch case , the second index provides a list of all the
* BeanProperties whose name hash matched on the case . */
private static List [ ] caseMethods ( int caseCount , BeanProperty [ ] props ) { } } | List [ ] cases = new List [ caseCount ] ; for ( int i = 0 ; i < props . length ; i ++ ) { BeanProperty prop = props [ i ] ; int hashCode = prop . getName ( ) . hashCode ( ) ; int caseValue = ( hashCode & 0x7fffffff ) % caseCount ; List matches = cases [ caseValue ] ; if ( matches == null ) { matches = cases [ caseValue... |
public class RunWithinInterceptionDecorationContextGenerator { /** * Ends interception context if it was previously stated . This is indicated by a local variable with index 0. */
void endIfStarted ( CodeAttribute b , ClassMethod method ) { } } | b . aload ( getLocalVariableIndex ( 0 ) ) ; b . dup ( ) ; final BranchEnd ifnotnull = b . ifnull ( ) ; b . checkcast ( Stack . class ) ; b . invokevirtual ( Stack . class . getName ( ) , END_INTERCEPTOR_CONTEXT_METHOD_NAME , EMPTY_PARENTHESES + VOID_CLASS_DESCRIPTOR ) ; BranchEnd ifnull = b . gotoInstruction ( ) ; b . ... |
public class StringBlock { /** * Reads whole ( including chunk type ) string block from stream .
* Stream must be at the chunk type . */
public static StringBlock read ( IntReader reader ) throws IOException { } } | ReadUtil . readCheckType ( reader , CHUNK_TYPE ) ; int chunkSize = reader . readInt ( ) ; int stringCount = reader . readInt ( ) ; int styleOffsetCount = reader . readInt ( ) ; int flags = reader . readInt ( ) ; int stringsOffset = reader . readInt ( ) ; int stylesOffset = reader . readInt ( ) ; StringBlock block = new... |
public class InvokerServlet { /** * 从请求信息中反序列化 */
private HttpRequest getHttpServiceRequest ( HttpServletRequest request ) throws IOException { } } | HttpRequest httpServiceRequest = null ; ObjectInputStream ois = null ; try { ois = new ObjectInputStream ( request . getInputStream ( ) ) ; httpServiceRequest = ( HttpRequest ) ois . readObject ( ) ; } catch ( Exception e ) { Debug . logError ( e , module ) ; } finally { if ( ois != null ) ois . close ( ) ; } return ht... |
public class InjectionBinding { /** * d446474 */
protected final Class < ? > loadClass ( String className ) throws InjectionConfigurationException { } } | ClassLoader classLoader = ivNameSpaceConfig . getClassLoader ( ) ; if ( className == null || className . equals ( "" ) || classLoader == null ) // F743-32443
{ return null ; } final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "loadClass : ... |
public class FeatureSearch { /** * Empty the grid , thereby removing all rows . When that is done , a new empty row will be displayed . */
public void empty ( ) { } } | searchButton . setDisabled ( true ) ; resetButton . setDisabled ( true ) ; for ( AttributeCriterionPane criterionPane : criterionPanes ) { criterionStack . removeMember ( criterionPane ) ; } criterionPanes . clear ( ) ; for ( HLayout criterionPane : buttonPanes ) { buttonStack . removeMember ( criterionPane ) ; } butto... |
public class ThriftCodecByteCodeGenerator { /** * Declares a field for each delegate codec
* @ return a map from field id to the codec for the field */
private Map < Short , FieldDefinition > declareCodecFields ( ) { } } | Map < Short , FieldDefinition > codecFields = new TreeMap < > ( ) ; for ( ThriftFieldMetadata fieldMetadata : metadata . getFields ( ) ) { if ( needsCodec ( fieldMetadata ) ) { ThriftCodec < ? > codec = codecManager . getCodec ( fieldMetadata . getThriftType ( ) ) ; String fieldName = fieldMetadata . getName ( ) + "Cod... |
public class ExcelReport { /** * The first method that gets called when generating the report . Generates data in way the Excel should appear .
* Creates the Excel Report and writes it to a file . */
public void generateReport ( List < XmlSuite > xmlSuites , List < ISuite > suites , String sOpDirectory ) { } } | logger . entering ( new Object [ ] { xmlSuites , suites , sOpDirectory } ) ; if ( ListenerManager . isCurrentMethodSkipped ( this ) ) { logger . exiting ( ListenerManager . THREAD_EXCLUSION_MSG ) ; return ; } if ( logger . isLoggable ( Level . INFO ) ) { logger . log ( Level . INFO , "Generating ExcelReport" ) ; } Test... |
public class DecisionTableImpl { /** * Evaluates this decision table returning the result
* @ param ctx
* @ param params these are the required information items , not to confuse with the columns of the
* decision table that are expressions derived from these parameters
* @ return */
public FEELFnResult < Objec... | if ( decisionRules . isEmpty ( ) ) { return FEELFnResult . ofError ( new FEELEventBase ( Severity . WARN , "Decision table is empty" , null ) ) ; } Object [ ] actualInputs = resolveActualInputs ( ctx , feel ) ; Either < FEELEvent , Object > actualInputMatch = actualInputsMatchInputValues ( ctx , actualInputs ) ; if ( a... |
public class PDTXMLConverter { /** * Get the passed object as { @ link XMLGregorianCalendar } with date and time .
* @ param aBase
* The source object . May be < code > null < / code > .
* @ return < code > null < / code > if the parameter is < code > null < / code > . */
@ Nullable public static XMLGregorianCale... | if ( aBase == null ) return null ; return s_aDTFactory . newXMLGregorianCalendar ( GregorianCalendar . from ( aBase ) ) ; |
public class MmtfUtils { /** * Convert a four - d matrix to a double array . Row - packed .
* @ param transformationMatrix the input matrix4d object
* @ return the double array ( 16 long ) . */
public static double [ ] convertToDoubleArray ( Matrix4d transformationMatrix ) { } } | // Initialise the output array
double [ ] outArray = new double [ 16 ] ; // Iterate over the matrix
for ( int i = 0 ; i < 4 ; i ++ ) { for ( int j = 0 ; j < 4 ; j ++ ) { // Now set this element
outArray [ i * 4 + j ] = transformationMatrix . getElement ( i , j ) ; } } return outArray ; |
public class MessageHeader { /** * return the location of the key */
public synchronized int getKey ( String k ) { } } | for ( int i = nkeys ; -- i >= 0 ; ) if ( ( keys [ i ] == k ) || ( k != null && k . equalsIgnoreCase ( keys [ i ] ) ) ) return i ; return - 1 ; |
public class CmsJspResourceAccessBean { /** * Returns a map that lazily reads properties of the resource . < p >
* Usage example on a JSP with the < code > & lt ; cms : resourceaccess & gt ; < / code > tag : < pre >
* & lt ; cms : resourceload . . . & gt ;
* & lt ; cms : resourceaccess var = " res " / & gt ;
* ... | if ( m_properties == null ) { // create lazy map only on demand
m_properties = CmsCollectionsGenericWrapper . createLazyMap ( new CmsJspValueTransformers . CmsPropertyLoaderTransformer ( m_cms , m_resource , false ) ) ; } return m_properties ; |
public class ApiOvhMe { /** * Alter this object properties
* REST : PUT / me / installationTemplate / { templateName } / partitionScheme / { schemeName } / hardwareRaid / { name }
* @ param body [ required ] New object properties
* @ param templateName [ required ] This template name
* @ param schemeName [ requ... | String qPath = "/me/installationTemplate/{templateName}/partitionScheme/{schemeName}/hardwareRaid/{name}" ; StringBuilder sb = path ( qPath , templateName , schemeName , name ) ; exec ( qPath , "PUT" , sb . toString ( ) , body ) ; |
public class ProteinPocketFinder { /** * Method writes the PSP points ( & ge ; minPSPocket ) to pmesh format . */
public void pspGridToPmesh ( String outPutFileName ) { } } | try { gridGenerator . writeGridInPmeshFormat ( outPutFileName , minPSPocket ) ; } catch ( IOException e ) { logger . debug ( e ) ; } |
public class S3ConfigurationMarshaller { /** * Marshall the given parameter object . */
public void marshall ( S3Configuration s3Configuration , ProtocolMarshaller protocolMarshaller ) { } } | if ( s3Configuration == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( s3Configuration . getRoleARN ( ) , ROLEARN_BINDING ) ; protocolMarshaller . marshall ( s3Configuration . getBucketARN ( ) , BUCKETARN_BINDING ) ; protocolMarshaller . ma... |
public class SslHandler { /** * Call when data read from net . Will perform inial hanshake or decrypt provided
* Buffer .
* Decrytpted data reurned by getAppBuffer ( ) , if any .
* @ param buf buffer to decrypt
* @ param nextFilter Next filter in chain
* @ throws SSLException on errors */
public void messageR... | // append buf to inNetBuffer
if ( inNetBuffer == null ) { inNetBuffer = IoBuffer . allocate ( buf . remaining ( ) ) . setAutoExpand ( true ) ; } inNetBuffer . put ( buf ) ; if ( ! handshakeComplete ) { handshake ( nextFilter ) ; } else { decrypt ( nextFilter ) ; } if ( isInboundDone ( ) ) { // Rewind the MINA buffer if... |
public class Configuration { /** * Retrieve the list of the version directories for the project
* @ param category The category
* @ param projectName The project name
* @ return The list of version directories or empty list if none are present */
private List < File > getUidFilesForProject ( String category , Str... | // Check that the category directory exists
File categoryDirectory = new File ( uidDirectory , category ) ; if ( ! categoryDirectory . exists ( ) || ( categoryDirectory . exists ( ) && categoryDirectory . isFile ( ) ) ) { return new ArrayList < > ( ) ; } // Check that the project directory exists
File projectDirectory ... |
public class CryptoServiceImpl { /** * { @ inheritDoc } */
@ Override public String encrypt ( String cryptoKey , String text ) throws TechnicalException { } } | Key aesKey = null ; if ( cryptoKey != null && ! "" . equals ( cryptoKey ) ) { aesKey = buildKey16char ( cryptoKey ) ; } if ( aesKey == null ) { logger . error ( TechnicalException . TECHNICAL_ERROR_MESSAGE_DECRYPT_CONFIGURATION_EXCEPTION ) ; throw new TechnicalException ( Messages . getMessage ( TechnicalException . TE... |
public class QueryCriteriaUtil { /** * This method retrieves the entity " field " that can be used as the LHS of a { @ link Predicate }
* This method is overridden in some extended { @ link QueryCriteriaUtil } implementations
* @ param query The { @ link CriteriaQuery } that we ' re building
* @ param listId The ... | return defaultGetEntityField ( query , listId , attr ) ; |
public class WebSocketReportingEngine { /** * { @ inheritDoc } */
@ Override public void onAdd ( Response response ) { } } | notifyWebSocket ( "response" , response ) ; logger . info ( "Reporter observed response for user [" + response . getUser ( ) . getUsername ( ) + "]" ) ; |
public class PipeNode { /** * private boolean pendingSend ( T value , Result < Void > result )
* if ( _ init = = StateInit . INIT ) {
* return false ;
* _ pendingInit . add ( ( ) - > send ( value , result ) ) ;
* return true ; */
private void send ( T value ) { } } | for ( SubscriberNode sub : _subscribers ) { sub . next ( value ) ; } long seq = _sequence ++ ; int size = _consumers . size ( ) ; if ( size > 0 ) { int index = ( int ) ( seq % size ) ; _consumers . get ( index ) . next ( value ) ; } |
public class PhaseOptimizer { /** * Add the passes generated by the given factories to the compile sequence .
* Automatically pulls multi - run passes into fixed point loops . If there
* are 1 or more multi - run passes in a row , they will run together in
* the same fixed point loop . The passes will run until t... | Loop currentLoop = new Loop ( ) ; for ( PassFactory factory : factories ) { if ( factory . isOneTimePass ( ) ) { if ( currentLoop . isPopulated ( ) ) { passes . add ( currentLoop ) ; currentLoop = new Loop ( ) ; } addOneTimePass ( factory ) ; } else { currentLoop . addLoopedPass ( factory ) ; } } if ( currentLoop . isP... |
public class GrailsWebRequest { /** * Obtains the PropertyEditorRegistry instance .
* @ return The PropertyEditorRegistry */
public PropertyEditorRegistry getPropertyEditorRegistry ( ) { } } | final HttpServletRequest servletRequest = getCurrentRequest ( ) ; PropertyEditorRegistry registry = ( PropertyEditorRegistry ) servletRequest . getAttribute ( GrailsApplicationAttributes . PROPERTY_REGISTRY ) ; if ( registry == null ) { registry = new PropertyEditorRegistrySupport ( ) ; PropertyEditorRegistryUtils . re... |
public class MalisisGui { /** * Sends a GUI action to the server .
* @ param action the action
* @ param slot the slot
* @ param code the keyboard code */
public static void sendAction ( ActionType action , MalisisSlot slot , int code ) { } } | if ( action == null || current ( ) == null || current ( ) . inventoryContainer == null ) return ; int inventoryId = slot != null ? slot . getInventoryId ( ) : 0 ; int slotNumber = slot != null ? slot . getSlotIndex ( ) : 0 ; current ( ) . inventoryContainer . handleAction ( action , inventoryId , slotNumber , code ) ; ... |
public class RowMajorSparseMatrix { /** * Creates a block { @ link RowMajorSparseMatrix } of the given blocks { @ code a } ,
* { @ code b } , { @ code c } and { @ code d } . */
public static RowMajorSparseMatrix block ( Matrix a , Matrix b , Matrix c , Matrix d ) { } } | return CRSMatrix . block ( a , b , c , d ) ; |
public class ClusteringTreeHeadNode { /** * Projects a point to a random projection .
* @ param pointA
* the point to project
* @ param i
* the projection
* @ return the position of the point */
private double project ( double [ ] pointA , double [ ] i ) { } } | assert ( i . length == pointA . length ) ; return Metric . dotProduct ( pointA , i ) ; |
public class Dao { /** * Executes the a query */
private QueryObservable executeQuery ( QueryBuilder queryBuilder ) { } } | // Raw query properties as default
String sql = queryBuilder . rawStatement ; Iterable < String > affectedTables = queryBuilder . rawStatementAffectedTables ; // If SqlFinishedStatement is set then use that one
if ( queryBuilder . statement != null ) { SqlCompileable . CompileableStatement compileableStatement = queryB... |
public class TargetAttribute { /** * Gets the flags associated with this attribute .
* @ return the flags . Will not return { @ code null } */
public Set < AttributeAccess . Flag > getFlags ( ) { } } | if ( attributeAccess == null ) { return Collections . emptySet ( ) ; } return attributeAccess . getFlags ( ) ; |
public class PlatformEntitlementCheck { /** * Starts asynchronous check . Result will be delivered to the listener on the main thread .
* @ param context
* @ param appId application id from the oculus dashboard
* @ param listener listener to invoke when the result is available
* @ throws IllegalStateException i... | if ( null == listener ) { throw new IllegalArgumentException ( "listener cannot be null" ) ; } final Activity activity = context . getActivity ( ) ; final long result = create ( activity , appId ) ; if ( 0 != result ) { throw new IllegalStateException ( "Could not initialize the platform sdk; error code: " + result ) ;... |
public class NativeLoader { /** * Load the shared libraries . */
static void loadLibrary ( ) { } } | try { File dir = Files . createTempDirectory ( "libjsass-" ) . toFile ( ) ; dir . deleteOnExit ( ) ; if ( System . getProperty ( "os.name" ) . toLowerCase ( ) . startsWith ( "win" ) ) { System . load ( saveLibrary ( dir , "sass" ) ) ; } System . load ( saveLibrary ( dir , "jsass" ) ) ; } catch ( Exception exception ) {... |
public class RollingLog { /** * Given the log file , finds out the smallest allowed zxid for thi file . It ' s
* infered by looking at the name of the file .
* @ return the smallest allowed zxid in this log file . */
Zxid getZxidFromFileName ( File file ) { } } | String fileName = file . getName ( ) ; String strZxid = fileName . substring ( fileName . indexOf ( '.' ) + 1 ) ; return Zxid . fromSimpleString ( strZxid ) ; |
public class WSConnectionRequestInfoImpl { /** * Determine if two objects , either of which may be null , are equal .
* @ param obj1
* one object .
* @ param obj2
* another object .
* @ return true if the objects are equal or are both null , otherwise false . */
private static final boolean match ( Object obj... | return obj1 == obj2 || ( obj1 != null && obj1 . equals ( obj2 ) ) ; |
public class KeyUtils { /** * Checks if the elements of the given key up the given length are 0 , or the whole array is null .
* @ param key
* @ param length
* @ return true , if the key is null or all elements in the array are 0. */
public static boolean isNull ( byte [ ] key , int length ) { } } | if ( key == null ) { return true ; } for ( int i = 0 ; i < Math . min ( key . length , length ) ; i ++ ) { if ( key [ i ] != 0 ) { return false ; } } return true ; |
public class AmazonElasticLoadBalancingClient { /** * Creates a listener for the specified Application Load Balancer or Network Load Balancer .
* To update a listener , use < a > ModifyListener < / a > . When you are finished with a listener , you can delete it using
* < a > DeleteListener < / a > . If you are fini... | request = beforeClientExecution ( request ) ; return executeCreateListener ( request ) ; |
public class RedisJobStore { /** * Get the names of all of the < code > { @ link org . quartz . Trigger } < / code > s
* that have the given group name .
* If there are no triggers in the given group name , the result should be a
* zero - length array ( not < code > null < / code > ) .
* @ param matcher the mat... | return doWithLock ( new LockCallback < Set < TriggerKey > > ( ) { @ Override public Set < TriggerKey > doWithLock ( JedisCommands jedis ) throws JobPersistenceException { return storage . getTriggerKeys ( matcher , jedis ) ; } } , "Could not retrieve TriggerKeys." ) ; |
public class CmsXmlContentDefinition { /** * Factory method to unmarshal ( read ) a XML content definition instance from a given XML schema location . < p >
* The XML content definition data to unmarshal will be read from the provided schema location using
* an XML InputSource . < p >
* @ param schemaLocation the... | schemaLocation = translateSchema ( schemaLocation ) ; CmsXmlContentDefinition result = getCachedContentDefinition ( schemaLocation , resolver ) ; if ( result == null ) { // content definition was not found in the cache , unmarshal the XML document
InputSource source = resolver . resolveEntity ( null , schemaLocation ) ... |
public class GeometryEngine { /** * Imports geometry from the ESRI shape file format .
* See OperatorImportFromESRIShape .
* @ param esriShapeBuffer
* The buffer containing geometry in the ESRI shape file format .
* @ param geometryType
* The required type of the Geometry to be imported . Use
* Geometry . T... | OperatorImportFromESRIShape op = ( OperatorImportFromESRIShape ) factory . getOperator ( Operator . Type . ImportFromESRIShape ) ; return op . execute ( ShapeImportFlags . ShapeImportNonTrusted , geometryType , ByteBuffer . wrap ( esriShapeBuffer ) . order ( ByteOrder . LITTLE_ENDIAN ) ) ; |
public class MessageRunner { /** * This method is called from the provided executor . */
@ Override public void onFailure ( Throwable t ) { } } | if ( cancelled ) { return ; } t = adjustThrowable ( t ) ; if ( handleInternalException ( t ) ) { next ( ) ; } else { cancel ( ) ; } |
public class CouchbaseUtils { /** * Converts a { @ link JsonObject } list into a { @ link CouchbaseQueryResult } so that it can
* be { @ link Stream } - ed and returned by the procedures
* @ param jsonObjects
* the { @ link JsonObject } list to convert
* @ return the converted list in the form of a CouchbaseQue... | CouchbaseQueryResult result = null ; if ( jsonObjects != null && jsonObjects . size ( ) > 0 ) { List < Map < String , Object > > list = new ArrayList < Map < String , Object > > ( jsonObjects . size ( ) ) ; for ( JsonObject jsonObject : jsonObjects ) { list . add ( jsonObject . toMap ( ) ) ; } result = new CouchbaseQue... |
public class Cluster { /** * add the ClusterMarker to the Layers if is within Viewport , otherwise remove . */
public void redraw ( ) { } } | Layers mapOverlays = clusterManager . getMapView ( ) . getLayerManager ( ) . getLayers ( ) ; if ( clusterMarker != null && ! clusterManager . getCurBounds ( ) . contains ( center ) && mapOverlays . contains ( clusterMarker ) ) { mapOverlays . remove ( clusterMarker ) ; return ; } if ( clusterMarker != null && mapOverla... |
public class BasicBinder { /** * Registers a set of configurations for the given list of URLs .
* This is typically used to process all the various bindings . xml files discovered in
* jars on the classpath . It is given protected scope to allow subclasses to register
* additional configurations
* @ param bindi... | List < BindingConfiguration > configs = new ArrayList < BindingConfiguration > ( ) ; for ( URL nextLocation : IterableEnumeration . wrapEnumeration ( bindingsConfiguration ) ) { // Filter built in bindings - these are already registered by calling registerConfiguration directly
URL builtIn = getBuiltInBindingsURL ( ) ;... |
public class PlayerStatsService { /** * Retrieve player stats
* @ param accountId The player ' s id
* @ param season The target season
* @ return Player stats */
public PlayerLifetimeStats retrievePlayerStatsByAccountId ( long accountId , Season season ) { } } | return client . sendRpcAndWait ( SERVICE , "retrievePlayerStatsByAccountId" , accountId , season ) ; |
public class Horizon { /** * Sets the custom color that will be used for visualization of the ground
* @ param CUSTOM _ GROUND _ COLOR */
public void setCustomGroundColor ( final Color CUSTOM_GROUND_COLOR ) { } } | customGroundColor = CUSTOM_GROUND_COLOR ; init ( getInnerBounds ( ) . width , getInnerBounds ( ) . height ) ; repaint ( getInnerBounds ( ) ) ; |
public class ProcessorConfigurationUtils { /** * Wraps an implementation of { @ link ITemplateBoundariesProcessor } into an object that adds some information
* required internally ( like e . g . the dialect this processor was registered for ) .
* This method is meant for < strong > internal < / strong > use only . ... | Validate . notNull ( dialect , "Dialect cannot be null" ) ; if ( processor == null ) { return null ; } return new TemplateBoundariesProcessorWrapper ( processor , dialect ) ; |
public class MulticastTransport { /** * Actually send the probe out on the wire .
* @ param probe the Probe instance that has been pre - configured
* @ throws TransportException if something bad happened when sending the
* probe */
@ Override public void sendProbe ( Probe probe ) throws TransportException { } } | LOGGER . info ( "Sending probe [" + probe . getProbeID ( ) + "] on network inteface [" + networkInterface . getName ( ) + "] at port [" + multicastAddress + ":" + multicastPort + "]" ) ; LOGGER . debug ( "Probe requesting TTL of [" + probe . getHopLimit ( ) + "]" ) ; try { String msg = probe . asXML ( ) ; LOGGER . debu... |
public class AppsImpl { /** * Gets all the available custom prebuilt domains for a specific culture .
* @ param culture Culture .
* @ param serviceCallback the async ServiceCallback to handle successful and failed responses .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ retur... | return ServiceFuture . fromResponse ( listAvailableCustomPrebuiltDomainsForCultureWithServiceResponseAsync ( culture ) , serviceCallback ) ; |
public class TransientPropertyData { /** * Factory method .
* @ param parent NodeData
* @ param name InternalQName
* @ param type int
* @ param multiValued boolean
* @ return TransientPropertyData */
public static TransientPropertyData createPropertyData ( NodeData parent , InternalQName name , int type , boo... | QPath path = QPath . makeChildPath ( parent . getQPath ( ) , name ) ; TransientPropertyData propData = new TransientPropertyData ( path , IdGenerator . generate ( ) , - 1 , type , parent . getIdentifier ( ) , multiValued ) ; return propData ; |
public class TraceComponent { /** * Update the active trace settings for this component based on the provided string .
* Protected : Not an SPI method .
* @ param ts TraceSpecification */
@ Deprecated protected void setTraceSpec ( String s ) { } } | if ( s != null ) { TraceSpecification ts = new TraceSpecification ( s , null , false ) ; setTraceSpec ( ts ) ; } |
public class CommerceAddressPersistenceImpl { /** * Returns all the commerce addresses where groupId = & # 63 ; and classNameId = & # 63 ; and classPK = & # 63 ; and defaultBilling = & # 63 ; .
* @ param groupId the group ID
* @ param classNameId the class name ID
* @ param classPK the class pk
* @ param defaul... | return findByG_C_C_DB ( groupId , classNameId , classPK , defaultBilling , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ; |
public class CmsDriverManager { /** * Reads all property definitions for the given mapping type . < p >
* @ param dbc the current database context
* @ return a list with the < code > { @ link CmsPropertyDefinition } < / code > objects ( may be empty )
* @ throws CmsException if something goes wrong */
public List... | List < CmsPropertyDefinition > result = getVfsDriver ( dbc ) . readPropertyDefinitions ( dbc , dbc . currentProject ( ) . getUuid ( ) ) ; Collections . sort ( result ) ; return result ; |
public class CommonCodeReview { /** * Calculates if the PR was looked at by a peer
* @ param pr
* @ return true if PR was looked at by at least one peer */
private static boolean isPRLookedAtByPeer ( GitRequest pr ) { } } | Set < String > commentUsers = pr . getComments ( ) != null ? pr . getComments ( ) . stream ( ) . map ( Comment :: getUser ) . collect ( Collectors . toCollection ( HashSet :: new ) ) : new HashSet < > ( ) ; Set < String > reviewAuthors = pr . getReviews ( ) != null ? pr . getReviews ( ) . stream ( ) . map ( Review :: g... |
public class JMCollections { /** * Split into sub list list .
* @ param < E > the type parameter
* @ param list the list
* @ param targetSize the target size
* @ return the list */
public static < E > List < List < E > > splitIntoSubList ( List < E > list , int targetSize ) { } } | int listSize = list . size ( ) ; return JMStream . numberRange ( 0 , listSize , targetSize ) . mapToObj ( index -> list . subList ( index , Math . min ( index + targetSize , listSize ) ) ) . collect ( toList ( ) ) ; |
public class ResourceUtil { /** * This method reads all data from an { @ code InputStream } into a String object . This method will close the stream .
* @ param inputStream { @ code InputStream } to read text from
* @ return < code > String < / code > containing all input stream data
* @ throws IOException IO exc... | BufferedReader reader = new BufferedReader ( new InputStreamReader ( inputStream , "UTF-8" ) ) ; StringBuilder text = new StringBuilder ( ) ; String line ; while ( ( line = reader . readLine ( ) ) != null ) { text . append ( line ) . append ( "\n" ) ; } inputStream . close ( ) ; return text . toString ( ) ; |
public class CmsSecurityManager { /** * Reads all property definitions for the given mapping type . < p >
* @ param context the current request context
* @ return a list with the < code > { @ link CmsPropertyDefinition } < / code > objects ( may be empty )
* @ throws CmsException if something goes wrong */
public... | CmsDbContext dbc = m_dbContextFactory . getDbContext ( context ) ; List < CmsPropertyDefinition > result = null ; try { result = m_driverManager . readAllPropertyDefinitions ( dbc ) ; } catch ( Exception e ) { dbc . report ( null , Messages . get ( ) . container ( Messages . ERR_READ_ALL_PROPDEF_0 ) , e ) ; } finally {... |
public class Stripe { /** * Blocking method to create a { @ link Token } for CVC updating . Do not call this on the UI thread
* or your app will crash . The method uses the currently set { @ link # mDefaultPublishableKey } .
* @ param cvc the CVC to use for this token
* @ return a { @ link Token } that can be use... | return createCvcUpdateTokenSynchronous ( cvc , mDefaultPublishableKey ) ; |
public class OparamTag { /** * Ensure that the tag implemented by this class is enclosed by an { @ code IncludeTag } .
* If the tag is not enclosed by an { @ code IncludeTag } then a { @ code JspException } is thrown .
* @ return If this tag is enclosed within an { @ code IncludeTag } , then the default return valu... | // checkEnclosedInIncludeTag ( ) ; / / Moved to TagLibValidator
// Get request
HttpServletRequest request = ( HttpServletRequest ) pageContext . getRequest ( ) ; // Get filename
subpage = createFileNameFromRequest ( request ) ; // Get include tag , and add to parameters
IncludeTag includeTag = ( IncludeTag ) getParent ... |
public class FsCrawlerUtil { /** * Copy a single resource file from the classpath or from a JAR .
* @ param target The target
* @ throws IOException If copying does not work */
public static void copyResourceFile ( String source , Path target ) throws IOException { } } | InputStream resource = FsCrawlerUtil . class . getResourceAsStream ( source ) ; FileUtils . copyInputStreamToFile ( resource , target . toFile ( ) ) ; |
public class ClassFileImporter { /** * Imports all class files at the given { @ link Location locations } . The behavior will depend on the type of { @ link Location } ,
* i . e . the target of the underlying URI :
* < ul >
* < li > a single class file = & lt ; that file will be imported < / li >
* < li > a dir... | List < ClassFileSource > sources = new ArrayList < > ( ) ; for ( Location location : locations ) { tryAdd ( sources , location ) ; } return new ClassFileProcessor ( ) . process ( unify ( sources ) ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.