signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class SpiderPanel { /** * This method initializes the working Panel .
* @ return javax . swing . JScrollPane */
@ Override protected JPanel getWorkPanel ( ) { } } | if ( mainPanel == null ) { mainPanel = new JPanel ( new BorderLayout ( ) ) ; tabbedPane = new JTabbedPane ( ) ; tabbedPane . addTab ( Constant . messages . getString ( "spider.panel.tab.urls" ) , getUrlsTableScrollPane ( ) ) ; tabbedPane . addTab ( Constant . messages . getString ( "spider.panel.tab.addednodes" ) , get... |
public class JobOperations { /** * Gets the specified { @ link CloudJob } .
* @ param jobId The ID of the job to get .
* @ return A { @ link CloudJob } containing information about the specified Azure Batch job .
* @ throws BatchErrorException Exception thrown when an error response is received from the Batch ser... | return getJob ( jobId , null , null ) ; |
public class UtilAbstractAction { /** * Check for a confirmation id . This is a random string embedded
* in some requests to confirm that the incoming request came from a page
* we generated . Not all pages will have such an id but if we do it must
* match .
* We expect the request parameter to be of the form <... | String reqpar = request . getParameter ( "confirmationid" ) ; if ( reqpar == null ) { return null ; } if ( ! reqpar . equals ( form . getConfirmationId ( ) ) ) { return "badConformationId" ; } return null ; |
public class GSCCImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setCELLHI ( Integer newCELLHI ) { } } | Integer oldCELLHI = cellhi ; cellhi = newCELLHI ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . GSCC__CELLHI , oldCELLHI , cellhi ) ) ; |
public class Binder { /** * Apply the chain of transforms and bind them to a virtual method specified
* using the end signature plus the given class and name . The method will
* be retrieved using the given Lookup and must match the end signature
* exactly .
* If the final handle ' s type does not exactly match... | return invoke ( lookup . findVirtual ( type ( ) . parameterType ( 0 ) , name , type ( ) . dropParameterTypes ( 0 , 1 ) ) ) ; |
public class AttachmentManager { /** * Downloads the content of an { @ link com . taskadapter . redmineapi . bean . Attachment } from the Redmine server .
* @ param issueAttachment the { @ link com . taskadapter . redmineapi . bean . Attachment }
* @ return the content of the attachment as a byte [ ] array
* @ th... | final ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; downloadAttachmentContent ( issueAttachment , baos ) ; try { baos . close ( ) ; } catch ( IOException e ) { throw new RedmineInternalError ( ) ; } return baos . toByteArray ( ) ; |
public class AfplibFactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public FNCYftUnits createFNCYftUnitsFromString ( EDataType eDataType , String initialValue ) { } } | FNCYftUnits result = FNCYftUnits . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ; |
public class NBTOutputStream { /** * Writes a { @ code TAG _ Compound } tag .
* @ param tag The tag .
* @ throws java . io . IOException if an I / O error occurs . */
private void writeCompoundTagPayload ( CompoundTag tag ) throws IOException { } } | for ( Tag < ? > childTag : tag . getValue ( ) . values ( ) ) { writeTag ( childTag ) ; } os . writeByte ( TagType . TAG_END . getId ( ) ) ; // end tag - better way ? |
public class MetricMatcher { /** * Create a stream of TimeSeriesMetricDeltas with values . */
public Stream < Entry < MatchedName , MetricValue > > filter ( Context t ) { } } | return t . getTSData ( ) . getCurrentCollection ( ) . get ( this :: match , x -> true ) . stream ( ) . flatMap ( this :: filterMetricsInTsv ) ; |
public class Preconditions { /** * Ensures that the given index is valid for an array , list or string of the given size .
* @ param index index to check
* @ param size size of the array , list or string
* @ param errorMessage The message for the { @ code IndexOutOfBoundsException } that is thrown if the check fa... | checkArgument ( size >= 0 , "Size was negative." ) ; if ( index < 0 || index >= size ) { throw new IndexOutOfBoundsException ( String . valueOf ( errorMessage ) + " Index: " + index + ", Size: " + size ) ; } |
public class OptimizationRequestHandler { /** * Find a solution of the linear ( equalities ) system A . x = b .
* A is a pxn matrix , with rank ( A ) = p < n .
* @ see " S . Boyd and L . Vandenberghe , Convex Optimization , p . 682"
* NB : we are waiting for Csparsej to fix its qr decomposition issues .
* @ TOD... | int p = AMatrix . rows ( ) ; int m = AMatrix . columns ( ) ; if ( m <= p ) { LogFactory . getLog ( this . getClass ( ) . getName ( ) ) . error ( "Equalities matrix A must be pxn with rank(A) = p < n" ) ; throw new RuntimeException ( "Equalities matrix A must be pxn with rank(A) = p < n" ) ; } if ( AMatrix instanceof Sp... |
public class Specimen { /** * syntactic sugar */
public SpecimenTreatmentComponent addTreatment ( ) { } } | SpecimenTreatmentComponent t = new SpecimenTreatmentComponent ( ) ; if ( this . treatment == null ) this . treatment = new ArrayList < SpecimenTreatmentComponent > ( ) ; this . treatment . add ( t ) ; return t ; |
public class MethodCallUtil { /** * Creates a method that calls the passed method , injecting its parameters
* using getters as necessary , and returns a string that invokes the new
* method . The new method returns the passed method ' s return value , if any .
* If a method without parameters is provided , that ... | boolean hasInvokee = invokeeName != null ; boolean useNativeMethod = method . isPrivate ( ) || ReflectUtil . isPrivate ( method . getDeclaringType ( ) ) ; boolean isThrowing = hasCheckedExceptions ( method ) ; // Determine method signature parts .
String invokeeTypeName = ReflectUtil . getSourceName ( method . getRawDe... |
public class SoyValueConverter { /** * Returns a SoyValueProvider corresponding to a Java object , but doesn ' t perform any work until
* resolve ( ) is called . */
private SoyValueProvider convertLazy ( @ Nullable final Object obj ) { } } | SoyValueProvider convertedPrimitive = convertCheap ( obj ) ; if ( convertedPrimitive != null ) { return convertedPrimitive ; } else { return new SoyAbstractCachingValueProvider ( ) { @ Override protected SoyValue compute ( ) { return convertNonPrimitive ( obj ) . resolve ( ) ; } @ Override public RenderResult status ( ... |
public class JDBCLoader { /** * jdbcloader main . ( main is directly used by tests as well be sure to reset statics that you need to start over )
* @ param args
* @ throws IOException
* @ throws InterruptedException */
public static void main ( String [ ] args ) throws IOException , InterruptedException { } } | start = System . currentTimeMillis ( ) ; long insertTimeStart = start ; long insertTimeEnd ; final JDBCLoaderConfig cfg = new JDBCLoaderConfig ( ) ; cfg . parse ( JDBCLoader . class . getName ( ) , args ) ; FileReader fr = null ; BufferedReader br = null ; m_config = cfg ; configuration ( ) ; // Split server list
final... |
public class GetCSVHeaderResult { /** * The header information for the . csv file for the user import job .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setCSVHeader ( java . util . Collection ) } or { @ link # withCSVHeader ( java . util . Collection ) } ... | if ( this . cSVHeader == null ) { setCSVHeader ( new java . util . ArrayList < String > ( cSVHeader . length ) ) ; } for ( String ele : cSVHeader ) { this . cSVHeader . add ( ele ) ; } return this ; |
public class FastMath { /** * Internal helper method for natural logarithm function .
* @ param x original argument of the natural logarithm function
* @ param hiPrec extra bits of precision on output ( To Be Confirmed )
* @ return log ( x ) */
private static double log ( final double x , final double [ ] hiPrec ... | if ( x == 0 ) { // Handle special case of + 0 / - 0
return Double . NEGATIVE_INFINITY ; } long bits = Double . doubleToLongBits ( x ) ; /* Handle special cases of negative input , and NaN */
if ( ( bits & 0x8000000000000000L ) != 0 || x != x ) { if ( x != 0.0 ) { if ( hiPrec != null ) { hiPrec [ 0 ] = Double . NaN ; } ... |
public class JDBC4ResultSet { /** * Moves the cursor forward one row from its current position . */
@ Override public boolean next ( ) throws SQLException { } } | checkClosed ( ) ; if ( cursorPosition == Position . afterLast || table . getActiveRowIndex ( ) == rowCount - 1 ) { cursorPosition = Position . afterLast ; return false ; } if ( cursorPosition == Position . beforeFirst ) { cursorPosition = Position . middle ; } try { return table . advanceRow ( ) ; } catch ( Exception x... |
public class LCharIntConsumerBuilder { /** * One of ways of creating builder . This is possibly the least verbose way where compiler should be able to guess the generic parameters . */
@ Nonnull public static LCharIntConsumer charIntConsumerFrom ( Consumer < LCharIntConsumerBuilder > buildingFunction ) { } } | LCharIntConsumerBuilder builder = new LCharIntConsumerBuilder ( ) ; buildingFunction . accept ( builder ) ; return builder . build ( ) ; |
public class Config { /** * Sets the map of reliable topic configurations , mapped by config name .
* The config name may be a pattern with which the configuration will be
* obtained in the future .
* @ param reliableTopicConfigs the reliable topic configuration map to set
* @ return this config instance */
pub... | this . reliableTopicConfigs . clear ( ) ; this . reliableTopicConfigs . putAll ( reliableTopicConfigs ) ; for ( Entry < String , ReliableTopicConfig > entry : reliableTopicConfigs . entrySet ( ) ) { entry . getValue ( ) . setName ( entry . getKey ( ) ) ; } return this ; |
public class TempByteHolder { /** * Returns InputSream for reading buffered data .
* @ return InputSream for reading buffered data . */
public java . io . InputStream getInputStream ( ) { } } | if ( _input_stream == null ) { _input_stream = new TempByteHolder . InputStream ( ) ; } return _input_stream ; |
public class JSONConverter { /** * Encode a NotificationSettings instance as JSON :
* " deliveryInterval " : Integer
* @ param out The stream to write JSON to
* @ param value The NotificationSettings instance to encode . Can ' t be null .
* @ throws IOException If an I / O error occurs
* @ see # readNotificat... | writeStartObject ( out ) ; writeIntField ( out , OM_DELIVERYINTERVAL , value . deliveryInterval ) ; writeIntField ( out , OM_INBOXEXPIRTY , value . inboxExpiry ) ; writeEndObject ( out ) ; |
public class ServletTimerImpl { /** * Helper to calculate when next execution time is . */
private void estimateNextExecution ( ) { } } | synchronized ( TIMER_LOCK ) { if ( fixedDelay ) { scheduledExecutionTime = period + System . currentTimeMillis ( ) ; } else { if ( firstExecution == 0 ) { // save timestamp of first execution
firstExecution = scheduledExecutionTime ; } long now = System . currentTimeMillis ( ) ; long executedTime = ( numInvocations ++ ... |
public class NumericPrompt { /** * Parses a number that matches the text , null if no matches
* @ param text Text to be parsed as a number
* @ return Number parsed , null if no match
* @ see NumericPrompt # INTEGER _ PATTERN
* @ see NumericPrompt # DOUBLE _ PATTERN
* @ see NumericPrompt # FLOAT _ PATTERN */
p... | if ( INTEGER_PATTERN . matcher ( text ) . matches ( ) ) { return Integer . parseInt ( text ) ; } if ( DOUBLE_PATTERN . matcher ( text ) . matches ( ) ) { return Double . parseDouble ( text ) ; } if ( FLOAT_PATTERN . matcher ( text ) . matches ( ) ) { return Float . parseFloat ( text ) ; } return null ; |
public class StringHelper { /** * Optimized replace method that replaces a set of characters with a set of
* strings . This method was created for efficient XML special character
* replacements !
* @ param sInputString
* The input string .
* @ param aSearchChars
* The characters to replace .
* @ param aRe... | // Any input text ?
if ( hasNoText ( sInputString ) ) return ArrayHelper . EMPTY_CHAR_ARRAY ; return replaceMultiple ( sInputString . toCharArray ( ) , aSearchChars , aReplacementStrings ) ; |
public class SimplePlaylistController { /** * { @ inheritDoc } */
public int previousItem ( IPlaylist playlist , int itemIndex ) { } } | if ( itemIndex > playlist . getItemSize ( ) ) { return playlist . getItemSize ( ) - 1 ; } if ( playlist . isRepeat ( ) ) { return itemIndex ; } if ( playlist . isRandom ( ) ) { int lastIndex = itemIndex ; // continuously generate a random number
// until you get one that was not the last . . .
while ( itemIndex == last... |
public class Timestamps { /** * Obtain the current time from the unix epoch
* @ param epochMillis gives the current time in milliseconds since since the epoch
* @ return a { @ code Timestamp } corresponding to the ticker ' s current value */
public static Timestamp fromEpoch ( long epochMillis ) { } } | return Timestamp . newBuilder ( ) . setNanos ( ( int ) ( ( epochMillis % MILLIS_PER_SECOND ) * NANOS_PER_MILLI ) ) . setSeconds ( epochMillis / MILLIS_PER_SECOND ) . build ( ) ; |
public class SimpleJob { /** * Default job settings . */
private void setup ( ) { } } | super . setMapperClass ( Mapper . class ) ; super . setMapOutputKeyClass ( Key . class ) ; super . setMapOutputValueClass ( Value . class ) ; super . setPartitionerClass ( SimplePartitioner . class ) ; super . setGroupingComparatorClass ( SimpleGroupingComparator . class ) ; super . setSortComparatorClass ( SimpleSortC... |
public class UTF16 { /** * Adds a codepoint to offset16 position of the argument char array .
* @ param target Char array to be append with the new code point
* @ param limit UTF16 offset which the codepoint will be appended .
* @ param char32 Code point to be appended
* @ return offset after char32 in the arra... | // Check for irregular values
if ( char32 < CODEPOINT_MIN_VALUE || char32 > CODEPOINT_MAX_VALUE ) { throw new IllegalArgumentException ( "Illegal codepoint" ) ; } // Write the UTF - 16 values
if ( char32 >= SUPPLEMENTARY_MIN_VALUE ) { target [ limit ++ ] = getLeadSurrogate ( char32 ) ; target [ limit ++ ] = getTrailSur... |
public class ClusterClientOptions { /** * Returns a new { @ link ClusterClientOptions . Builder } initialized from { @ link ClientOptions } to construct
* { @ link ClusterClientOptions } .
* @ return a new { @ link ClusterClientOptions . Builder } to construct { @ link ClusterClientOptions } .
* @ since 5.1.6 */
... | LettuceAssert . notNull ( clientOptions , "ClientOptions must not be null" ) ; if ( clientOptions instanceof ClusterClientOptions ) { return ( ( ClusterClientOptions ) clientOptions ) . mutate ( ) ; } Builder builder = new Builder ( ) ; builder . autoReconnect ( clientOptions . isAutoReconnect ( ) ) . bufferUsageRatio ... |
public class ActionRequestProcessor { protected void toNext ( ActionRuntime runtime , NextJourney journey ) throws IOException , ServletException { } } | if ( journey . hasJourneyProvider ( ) ) { // e . g . HTML / JSON response
journey . getJourneyProvider ( ) . bonVoyage ( ) ; } if ( journey . hasViewRouting ( ) ) { // basically HTML response
if ( journey . isRedirectTo ( ) ) { doRedirect ( runtime , journey ) ; } else { final HtmlRenderer renderer = prepareHtmlRendere... |
public class SahaginMain { /** * first argument is action name ( now " report " only ) , second argument is configuration file path */
public static void main ( String [ ] args ) throws YamlConvertException , IllegalDataStructureException , IllegalTestScriptException { } } | if ( args . length == 0 ) { throw new IllegalArgumentException ( MSG_NO_COMMAND_LINE_ARGUMENT ) ; } Action action = null ; try { action = Action . getEnum ( args [ 0 ] ) ; } catch ( IllegalArgumentException e ) { throw new IllegalArgumentException ( String . format ( MSG_UNKNOWN_ACTION , args [ 0 ] ) ) ; } String confi... |
public class Main { /** * Print a message reporting a fatal error . */
void feMessage ( Throwable ex , Options options ) { } } | log . printRawLines ( ex . getMessage ( ) ) ; if ( ex . getCause ( ) != null && options . isSet ( "dev" ) ) { ex . getCause ( ) . printStackTrace ( log . getWriter ( WriterKind . NOTICE ) ) ; } |
public class ClusterTopologyRefreshScheduler { /** * Check if the { @ link EventExecutorGroup } is active
* @ return false if the worker pool is terminating , shutdown or terminated */
private boolean isEventLoopActive ( ) { } } | EventExecutorGroup eventExecutors = clientResources . eventExecutorGroup ( ) ; if ( eventExecutors . isShuttingDown ( ) || eventExecutors . isShutdown ( ) || eventExecutors . isTerminated ( ) ) { return false ; } return true ; |
public class DataObjectFontDescriptorImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public boolean eIsSet ( int featureID ) { } } | switch ( featureID ) { case AfplibPackage . DATA_OBJECT_FONT_DESCRIPTOR__DO_FT_FLGS : return DO_FT_FLGS_EDEFAULT == null ? doFtFlgs != null : ! DO_FT_FLGS_EDEFAULT . equals ( doFtFlgs ) ; case AfplibPackage . DATA_OBJECT_FONT_DESCRIPTOR__FONT_TECH : return FONT_TECH_EDEFAULT == null ? fontTech != null : ! FONT_TECH_EDE... |
public class DataLoader { /** * Creates new DataLoader with the specified batch loader function and with the provided options
* where the batch loader function returns a list of
* { @ link org . dataloader . Try } objects .
* @ param batchLoadFunction the batch load function to use that uses { @ link org . datalo... | return new DataLoader < > ( batchLoadFunction , options ) ; |
public class Branch { /** * Branch collect the URLs in the incoming intent for better attribution . Branch SDK extensively check for any sensitive data in the URL and skip if exist .
* This method allows applications specify SDK to skip any additional URL patterns to be skipped
* This method should be called immedi... | if ( ! TextUtils . isEmpty ( urlSkipPattern ) ) UniversalResourceAnalyser . getInstance ( context_ ) . addToSkipURLFormats ( urlSkipPattern ) ; return this ; |
public class UIComponentClassicTagBase { /** * < p > Create a new child component using < code > createComponent < / code > ,
* initialize its properties , and add it to its parent as a facet .
* @ param context { @ link FacesContext } for the current request
* @ param parent Parent { @ link UIComponent } of the ... | UIComponent component = createComponent ( context , newId ) ; parent . getFacets ( ) . put ( name , component ) ; created = true ; return ( component ) ; |
public class CommercePriceListAccountRelPersistenceImpl { /** * Returns the commerce price list account rels before and after the current commerce price list account rel in the ordered set where commercePriceListId = & # 63 ; .
* @ param commercePriceListAccountRelId the primary key of the current commerce price list... | CommercePriceListAccountRel commercePriceListAccountRel = findByPrimaryKey ( commercePriceListAccountRelId ) ; Session session = null ; try { session = openSession ( ) ; CommercePriceListAccountRel [ ] array = new CommercePriceListAccountRelImpl [ 3 ] ; array [ 0 ] = getByCommercePriceListId_PrevAndNext ( session , com... |
public class ResourceLimiter { /** * Register an operation with the given size before sending .
* This call WILL BLOCK until resources are available . This method must
* be paired with a call to { @ code markCanBeCompleted } in order to make sure
* resources are properly released .
* @ param heapSize The serial... | long start = clock . nanoTime ( ) ; synchronized ( this ) { while ( unsynchronizedIsFull ( ) ) { waitForCompletions ( REGISTER_WAIT_MILLIS ) ; } long waitComplete = clock . nanoTime ( ) ; stats . markThrottling ( waitComplete - start ) ; long operationId = operationSequenceGenerator . incrementAndGet ( ) ; pendingOpera... |
public class TableProxy { /** * Retrieve this record from the key .
* @ param strSeekSign Which way to seek null / = matches data also & gt ; , & lt ; , & gt ; = , and & lt ; = .
* @ param strKeyArea The name of the key area to seek on .
* @ param objKeyData The data for the seek ( The raw data if a single field ... | BaseTransport transport = this . createProxyTransport ( SEEK ) ; if ( strSeekSign == null ) strSeekSign = Constants . EQUALS ; transport . addParam ( SIGN , strSeekSign ) ; transport . addParam ( OPEN_MODE , iOpenMode ) ; transport . addParam ( KEY , strKeyArea ) ; transport . addParam ( FIELDS , strFields ) ; transpor... |
public class BlockMetadataManager { /** * Gets the metadata of a temp block .
* @ param blockId the id of the temp block
* @ return metadata of the block
* @ throws BlockDoesNotExistException when block id can not be found */
public TempBlockMeta getTempBlockMeta ( long blockId ) throws BlockDoesNotExistException... | TempBlockMeta blockMeta = getTempBlockMetaOrNull ( blockId ) ; if ( blockMeta == null ) { throw new BlockDoesNotExistException ( ExceptionMessage . TEMP_BLOCK_META_NOT_FOUND , blockId ) ; } return blockMeta ; |
public class ReflectionUtils { /** * 获取静态方法
* @ since 2.0.2 */
public static Method getStaticMethod ( final Class < ? > clazz , final String methodName , final Class < ? > ... parameterTypes ) { } } | Asserts . notNull ( clazz ) ; for ( Class < ? > superClass = clazz ; superClass != Object . class ; superClass = superClass . getSuperclass ( ) ) { try { Method method = clazz . getDeclaredMethod ( methodName , parameterTypes ) ; method . setAccessible ( true ) ; return method ; } catch ( NoSuchMethodException | Securi... |
public class ClientFactory { /** * Return a new { @ link Client } instance
* @ return a new { @ link Client } instance */
public Client < ? extends Options , ? extends OptionsBuilder , ? extends RequestBuilder > newClient ( ) { } } | if ( clientClassName == null ) { return new DefaultClient ( ) ; } else { try { return ( Client ) Thread . currentThread ( ) . getContextClassLoader ( ) . loadClass ( clientClassName ) . newInstance ( ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } } |
public class ClientConfig { /** * Set labels for the client . Deletes old labels if added earlier .
* @ param labels The labels to be set
* @ return configured { @ link com . hazelcast . client . config . ClientConfig } for chaining */
public ClientConfig setLabels ( Set < String > labels ) { } } | Preconditions . isNotNull ( labels , "labels" ) ; this . labels . clear ( ) ; this . labels . addAll ( labels ) ; return this ; |
public class AlignmentTools { /** * Fill the aligned Atom arrays with the equivalent residues in the afpChain .
* @ param afpChain
* @ param ca1
* @ param ca2
* @ param ca1aligned
* @ param ca2aligned */
public static void fillAlignedAtomArrays ( AFPChain afpChain , Atom [ ] ca1 , Atom [ ] ca2 , Atom [ ] ca1a... | int pos = 0 ; int [ ] blockLens = afpChain . getOptLen ( ) ; int [ ] [ ] [ ] optAln = afpChain . getOptAln ( ) ; assert ( afpChain . getBlockNum ( ) <= optAln . length ) ; for ( int block = 0 ; block < afpChain . getBlockNum ( ) ; block ++ ) { for ( int i = 0 ; i < blockLens [ block ] ; i ++ ) { int pos1 = optAln [ blo... |
public class DiscreteFourierTransformOps { /** * Computes the phase of the complex image : < br >
* phase = atan2 ( imaginary , real )
* @ param transform ( Input ) Complex interleaved image
* @ param phase ( output ) Phase of image */
public static void phase ( InterleavedF32 transform , GrayF32 phase ) { } } | checkImageArguments ( phase , transform ) ; for ( int y = 0 ; y < transform . height ; y ++ ) { int indexTran = transform . startIndex + y * transform . stride ; int indexPhase = phase . startIndex + y * phase . stride ; for ( int x = 0 ; x < transform . width ; x ++ , indexTran += 2 ) { float real = transform . data [... |
public class JmsJcaActivationSpecImpl { /** * ( non - Javadoc )
* @ see com . ibm . ws . sib . api . jmsra . JmsJcaActivationSpec # setReadAhead ( java . lang . String ) */
@ Override public void setReadAhead ( final String readAhead ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isDebugEnabled ( ) ) { SibTr . debug ( this , TRACE , "setReadAhead" , readAhead ) ; } _readAhead = readAhead ; |
public class FrameScreen { /** * Process the command .
* Step 1 - Process the command if possible and return true if processed .
* Step 2 - If I can ' t process , pass to all children ( with me as the source ) .
* Step 3 - If children didn ' t process , pass to parent ( with me as the source ) .
* Note : Never ... | if ( strCommand . equalsIgnoreCase ( ThinMenuConstants . CLOSE ) ) { this . free ( ) ; return true ; } return super . doCommand ( strCommand , sourceSField , iCommandOptions ) ; |
public class JobState { /** * Get the { @ link LauncherTypeEnum } for this { @ link JobState } . */
public LauncherTypeEnum getLauncherType ( ) { } } | return Enums . getIfPresent ( LauncherTypeEnum . class , this . getProp ( ConfigurationKeys . JOB_LAUNCHER_TYPE_KEY , JobLauncherFactory . JobLauncherType . LOCAL . name ( ) ) ) . or ( LauncherTypeEnum . LOCAL ) ; |
public class Bits { /** * To bytes byte [ ] .
* @ param data the data
* @ return the byte [ ] */
public static byte [ ] toBytes ( final long data ) { } } | return new byte [ ] { ( byte ) ( data >> 56 & 0xFF ) , ( byte ) ( data >> 48 & 0xFF ) , ( byte ) ( data >> 40 & 0xFF ) , ( byte ) ( data >> 32 & 0xFF ) , ( byte ) ( data >> 24 & 0xFF ) , ( byte ) ( data >> 16 & 0xFF ) , ( byte ) ( data >> 8 & 0xFF ) , ( byte ) ( data & 0xFF ) } ; |
public class Page { /** * CAUTION : Only returns 1 result , even if several results are possible .
* @ param pTitle
* @ throws WikiApiException Thrown if errors occurred . */
private void fetchByTitle ( Title pTitle , boolean useExactTitle ) throws WikiApiException { } } | String searchString = pTitle . getPlainTitle ( ) ; if ( ! useExactTitle ) { searchString = pTitle . getWikiStyleTitle ( ) ; } Session session ; session = this . wiki . __getHibernateSession ( ) ; session . beginTransaction ( ) ; Integer pageId = ( Integer ) session . createNativeQuery ( "select pml.pageID from PageMapL... |
public class DateCalculator { /** * Get the weekday of date
* @ param date current date
* @ return day of week */
public static int getWeekdayOfDate ( String date ) { } } | SimpleDateFormat formatter = new SimpleDateFormat ( "yyyy-MM-dd" ) ; int weekday = 0 ; Calendar c = Calendar . getInstance ( ) ; try { c . setTime ( formatter . parse ( date ) ) ; weekday = c . get ( Calendar . DAY_OF_WEEK ) ; } catch ( ParseException e ) { e . printStackTrace ( ) ; } return weekday ; |
public class BrowseIterator { /** * Changes the page size of the list and reforms the list . May cause unexpected
* behavior in terms of what is considered the " current page " after resizing .
* @ param ps the new page size */
public void setPageSize ( int ps ) { } } | ArrayList < T > tmp = new ArrayList < T > ( ) ; for ( Collection < T > page : pages ) { for ( T item : page ) { tmp . add ( item ) ; } } setup ( tmp , ps , sorter ) ; |
public class AiMaterial { /** * Returns the texture mapping mode for the w axis . < p >
* If missing , defaults to { @ link AiTextureMapMode # CLAMP }
* @ param type the texture type
* @ param index the index in the texture stack
* @ return the texture mapping mode */
public AiTextureMapMode getTextureMapModeW ... | checkTexRange ( type , index ) ; Property p = getProperty ( PropertyKey . TEX_MAP_MODE_W . m_key ) ; if ( null == p || null == p . getData ( ) ) { return ( AiTextureMapMode ) m_defaults . get ( PropertyKey . TEX_MAP_MODE_W ) ; } return AiTextureMapMode . fromRawValue ( p . getData ( ) ) ; |
public class SpaceCentricTypedTask { /** * Reads the information stored in a Task and sets data in the SpaceCentricTypedTask
* @ param task */
public void readTask ( Task task ) { } } | Map < String , String > props = task . getProperties ( ) ; setAccount ( props . get ( ACCOUNT_PROP ) ) ; setStoreId ( props . get ( STORE_ID_PROP ) ) ; setSpaceId ( props . get ( SPACE_ID_PROP ) ) ; this . attempts = task . getAttempts ( ) ; |
public class LinkHandlerImpl { /** * Resolves the link
* @ param linkRequest Link request
* @ return Link metadata ( never null ) */
@ NotNull @ SuppressWarnings ( { } } | "null" , "unused" } ) Link processRequest ( @ NotNull LinkRequest linkRequest ) { // detect link type - first accepting wins
LinkType linkType = null ; List < Class < ? extends LinkType > > linkTypes = linkHandlerConfig . getLinkTypes ( ) ; if ( linkTypes == null || linkTypes . isEmpty ( ) ) { throw new RuntimeExceptio... |
public class ToUnknownStream { /** * Pass the call on to the underlying handler
* @ see org . xml . sax . ext . DeclHandler # elementDecl ( String , String ) */
public void elementDecl ( String arg0 , String arg1 ) throws SAXException { } } | if ( m_firstTagNotEmitted ) { emitFirstTag ( ) ; } m_handler . elementDecl ( arg0 , arg1 ) ; |
public class TrmMessageFactoryImpl { /** * Create a new , empty TrmClientAttachRequest message
* @ return The new TrmClientAttachRequest .
* @ exception MessageCreateFailedException Thrown if such a message can not be created */
public TrmClientAttachRequest createNewTrmClientAttachRequest ( ) throws MessageCreateF... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createNewTrmClientAttachRequest" ) ; TrmClientAttachRequest msg = null ; try { msg = new TrmClientAttachRequestImpl ( ) ; } catch ( MessageDecodeFailedException e ) { /* No need to FFDC this as JsMsgObject will already have... |
public class IPv6AddressSection { /** * Replaces segments starting from startIndex and ending before endIndex with the segments starting at replacementStartIndex and
* ending before replacementEndIndex from the replacement section
* @ param startIndex
* @ param endIndex
* @ param replacement
* @ param replace... | return replace ( startIndex , endIndex , replacement , replacementStartIndex , replacementEndIndex , false ) ; |
public class ConnectionSpecSelector { /** * Reports a failure to complete a connection . Determines the next { @ link ConnectionSpec } to try ,
* if any .
* @ return { @ code true } if the connection should be retried using { @ link
* # configureSecureSocket ( SSLSocket ) } or { @ code false } if not */
boolean c... | // Any future attempt to connect using this strategy will be a fallback attempt .
isFallback = true ; if ( ! isFallbackPossible ) { return false ; } // If there was a protocol problem , don ' t recover .
if ( e instanceof ProtocolException ) { return false ; } // If there was an interruption or timeout ( SocketTimeoutE... |
public class Math { /** * Kullback - Leibler divergence . The Kullback - Leibler divergence ( also
* information divergence , information gain , relative entropy , or KLIC )
* is a non - symmetric measure of the difference between two probability
* distributions P and Q . KL measures the expected number of extra ... | if ( x . isEmpty ( ) ) { throw new IllegalArgumentException ( "List x is empty." ) ; } Iterator < SparseArray . Entry > iter = x . iterator ( ) ; boolean intersection = false ; double kl = 0.0 ; while ( iter . hasNext ( ) ) { SparseArray . Entry b = iter . next ( ) ; int i = b . i ; if ( y [ i ] > 0 ) { intersection = ... |
public class BehaviorTreeReader { /** * Parses the given string .
* @ param string the string
* @ throws SerializationException if the string cannot be successfully parsed . */
public void parse ( String string ) { } } | char [ ] data = string . toCharArray ( ) ; parse ( data , 0 , data . length ) ; |
public class AmazonIdentityManagementClient { /** * Creates an alias for your AWS account . For information about using an AWS account alias , see < a
* href = " https : / / docs . aws . amazon . com / IAM / latest / UserGuide / AccountAlias . html " > Using an Alias for Your AWS Account
* ID < / a > in the < i > I... | request = beforeClientExecution ( request ) ; return executeCreateAccountAlias ( request ) ; |
public class GetAccountAuthorizationDetailsResult { /** * A list containing information about IAM groups .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setGroupDetailList ( java . util . Collection ) } or { @ link # withGroupDetailList ( java . util . Coll... | if ( this . groupDetailList == null ) { setGroupDetailList ( new com . amazonaws . internal . SdkInternalList < GroupDetail > ( groupDetailList . length ) ) ; } for ( GroupDetail ele : groupDetailList ) { this . groupDetailList . add ( ele ) ; } return this ; |
public class Queue { /** * Close this Queue
* Poison Pills are used to communicate closure to connected Streams
* A Poison Pill is added per connected Stream to the Queue
* If a BlockingQueue is backing this async . Queue it will block until
* able to add to the Queue .
* @ return true if closed */
@ Override... | this . open = false ; for ( int i = 0 ; i < listeningStreams . get ( ) ; i ++ ) { try { this . queue . offer ( ( T ) POISON_PILL ) ; } catch ( Exception e ) { } } return true ; |
public class Framework { /** * Gets the version for a JAR file .
* @ param path
* Path to JAR file
* @ return Found version or { @ code null } */
private static String getVersionFromJar ( final Path path ) { } } | Matcher matcher = JAR_VERSION . matcher ( path . toString ( ) ) ; if ( matcher . matches ( ) ) { return matcher . group ( 1 ) ; } else { Logger . error ( "JAR file \"{}\" does not contain a version" , path ) ; return null ; } |
public class OmemoManager { /** * Return a set of all OMEMO capable devices of a contact .
* Note , that this method does not explicitly refresh the device list of the contact , so it might be outdated .
* @ see # requestDeviceListUpdateFor ( BareJid )
* @ param contact contact we want to get a set of device of .... | OmemoCachedDeviceList list = getOmemoService ( ) . getOmemoStoreBackend ( ) . loadCachedDeviceList ( getOwnDevice ( ) , contact ) ; HashSet < OmemoDevice > devices = new HashSet < > ( ) ; for ( int deviceId : list . getActiveDevices ( ) ) { devices . add ( new OmemoDevice ( contact , deviceId ) ) ; } return devices ; |
public class JawrRequestHandler { /** * Writes the content to the output stream
* @ param requestedPath
* the requested path
* @ param request
* the request
* @ param response
* the response
* @ throws IOException
* if an IOException occurs
* @ throws ResourceNotFoundException
* if the resource is n... | // Send gzipped resource if user agent supports it .
int idx = requestedPath . indexOf ( BundleRenderer . GZIP_PATH_PREFIX ) ; if ( idx != - 1 ) { requestedPath = JawrConstant . URL_SEPARATOR + requestedPath . substring ( idx + BundleRenderer . GZIP_PATH_PREFIX . length ( ) , requestedPath . length ( ) ) ; if ( isValid... |
public class I18NConnector { /** * Returns the value for this label ussing the getThreadLocaleLanguage
* @ param section
* @ param idInSection
* @ return */
public static String getLabel ( String section , String idInSection ) { } } | Language language = getThreadLocalLanguage ( null ) ; if ( language == null ) { return idInSection ; } else { return getLabel ( language , section , idInSection ) ; } |
public class ApiOvhDedicatedserver { /** * Get this object properties
* REST : GET / dedicated / server / { serviceName } / intervention / { interventionId }
* @ param serviceName [ required ] The internal name of your dedicated server
* @ param interventionId [ required ] The intervention id */
public OvhInterve... | String qPath = "/dedicated/server/{serviceName}/intervention/{interventionId}" ; StringBuilder sb = path ( qPath , serviceName , interventionId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhIntervention . class ) ; |
public class PipelineImageTransform { /** * Takes an image and executes a pipeline of combined transforms .
* @ param image to transform , null = = end of stream
* @ param random object to use ( or null for deterministic )
* @ return transformed image */
@ Override protected ImageWritable doTransform ( ImageWrita... | if ( shuffle ) { Collections . shuffle ( imageTransforms ) ; } currentTransforms . clear ( ) ; // execute each item in the pipeline
for ( Pair < ImageTransform , Double > tuple : imageTransforms ) { if ( tuple . getSecond ( ) == 1.0 || rng . nextDouble ( ) < tuple . getSecond ( ) ) { // probability of execution
current... |
public class DatabaseImpl { /** * Returns the subset of given the document ID / revisions that are not stored in the database .
* The input revisions is a map , whose key is document ID , and value is a list of revisions .
* An example input could be ( in json format ) :
* { " 03ee06461a12f3c288bb865b22000170 " :... | Misc . checkState ( this . isOpen ( ) , "Database is closed" ) ; Misc . checkNotNull ( revisions , "Input revisions" ) ; Misc . checkArgument ( ! revisions . isEmpty ( ) , "revisions cannot be empty" ) ; try { ValueListMap < String , String > missingRevs = new ValueListMap < String , String > ( ) ; // Break down by doc... |
public class CardAPI { /** * 修改库存
* @ param accessToken accessToken
* @ param modifystock modifystock
* @ return result */
public static BaseResult modifyStock ( String accessToken , ModifyStock modifystock ) { } } | return modifyStock ( accessToken , JsonUtil . toJSONString ( modifystock ) ) ; |
public class AsperaTransferManager { /** * Check the LRU cache to see if the Aspera Key has already been retrieved for
* this bucket . If it has , return it , else call onto the s3Client to get the
* FASPConnectionInfo for the bucket name
* @ param bucketName
* @ return */
public FASPConnectionInfo getFaspConne... | log . trace ( "AsperaTransferManager.getFaspConnectionInfo >> start " + System . nanoTime ( ) ) ; FASPConnectionInfo faspConnectionInfo = akCache . get ( bucketName ) ; if ( null == faspConnectionInfo ) { log . trace ( "AsperaTransferManager.getFaspConnectionInfo >> retrieve from COS " + System . nanoTime ( ) ) ; faspC... |
public class AWSServiceDiscoveryClient { /** * Creates an HTTP namespace . Service instances that you register using an HTTP namespace can be discovered using a
* < code > DiscoverInstances < / code > request but can ' t be discovered using DNS .
* For the current limit on the number of namespaces that you can crea... | request = beforeClientExecution ( request ) ; return executeCreateHttpNamespace ( request ) ; |
public class ProxyArtifactStore { /** * { @ inheritDoc } */
public long getMetadataLastModified ( String path ) throws IOException , MetadataNotFoundException { } } | Metadata metadata = getMetadata ( path ) ; if ( metadata != null ) { if ( ! StringUtils . isEmpty ( metadata . getGroupId ( ) ) || ! StringUtils . isEmpty ( metadata . getArtifactId ( ) ) || ! StringUtils . isEmpty ( metadata . getVersion ( ) ) || ( metadata . getPlugins ( ) != null && ! metadata . getPlugins ( ) . isE... |
public class IOUtil { /** * Write to a file the bytes read from an input stream .
* @ param filename the full or relative path to the file . */
public void inputStreamToFile ( InputStream is , String filename ) throws IOException { } } | FileOutputStream fos = new FileOutputStream ( filename ) ; inputStreamToOutputStream ( is , fos ) ; fos . close ( ) ; |
public class CmsOUEditDialog { /** * Adds validators to fields . < p > */
@ SuppressWarnings ( "unchecked" ) protected void validate ( ) { } } | if ( m_ou == null ) { m_name . removeAllValidators ( ) ; m_name . addValidator ( new NameValidator ( ) ) ; } m_description . setRequired ( true ) ; m_description . setRequiredError ( "Required" ) ; if ( m_ouResources . getRows ( ) . isEmpty ( ) & ! m_webuser . getValue ( ) . booleanValue ( ) ) { CmsPathSelectField fiel... |
public class FileUtil { /** * 复制文件或目录 < br >
* 如果目标文件为目录 , 则将源文件以相同文件名拷贝到目标目录
* @ param srcPath 源文件或目录
* @ param destPath 目标文件或目录 , 目标不存在会自动创建 ( 目录 、 文件都创建 )
* @ param isOverride 是否覆盖目标文件
* @ return 目标目录或文件
* @ throws IORuntimeException IO异常 */
public static File copy ( String srcPath , String destPath , bo... | return copy ( file ( srcPath ) , file ( destPath ) , isOverride ) ; |
public class CachedPasswordUserInfoService { /** * ( non - Javadoc )
* @ see org . apache . pluto . container . UserInfoService # getUserInfo ( javax . portlet . PortletRequest , org . apache . pluto . container . PortletWindow ) */
@ Override public Map < String , String > getUserInfo ( PortletRequest request , Port... | Map < String , String > userInfo = new HashMap < String , String > ( ) ; // check to see if a password is expected by this portlet
if ( isPasswordRequested ( request , portletWindow ) ) { log . debug ( "Portlet named {} wants a password" , portletWindow . getPortletDefinition ( ) . getPortletName ( ) ) ; final HttpServ... |
public class PaymentUrl { /** * Get Resource Url for GetAvailablePaymentActions
* @ param orderId Unique identifier of the order .
* @ param paymentId Unique identifier of the payment for which to perform the action .
* @ return String Resource Url */
public static MozuUrl getAvailablePaymentActionsUrl ( String o... | UrlFormatter formatter = new UrlFormatter ( "/api/commerce/orders/{orderId}/payments/{paymentId}/actions" ) ; formatter . formatUrl ( "orderId" , orderId ) ; formatter . formatUrl ( "paymentId" , paymentId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; |
public class BeanToMapCopier { /** * If at least one property name can be converted to an assignable key , say the operation is supported and we ' ll
* give it a shot . */
@ Override public boolean supports ( TherianContext context , Copy < ? extends Object , ? extends Map > copy ) { } } | if ( ! super . supports ( context , copy ) ) { return false ; } final Type targetKeyType = getKeyType ( copy . getTargetPosition ( ) ) ; final Position . ReadWrite < ? > targetKey = Positions . readWrite ( targetKeyType ) ; return getProperties ( context , copy . getSourcePosition ( ) ) . anyMatch ( propertyName -> con... |
public class N1qlQuery { /** * Create a new query with named parameters . Note that the { @ link JsonObject }
* should not be mutated until { @ link # n1ql ( ) } is called since it backs the
* creation of the query string .
* Named parameters have the form of ` $ name ` , where the ` name ` represents the unique ... | return new ParameterizedN1qlQuery ( statement , namedParams , params ) ; |
public class QueryControllerTreeModel { /** * Search a query node in a group and returns the object else returns null . */
public QueryTreeElement getElementQuery ( String element , String group ) { } } | QueryTreeElement node = null ; Enumeration < TreeNode > elements = root . children ( ) ; while ( elements . hasMoreElements ( ) ) { TreeElement currentNode = ( TreeElement ) elements . nextElement ( ) ; if ( currentNode instanceof QueryGroupTreeElement && currentNode . getID ( ) . equals ( group ) ) { QueryGroupTreeEle... |
public class VerificationConditionGenerator { /** * Transform a function or method declaration into verification conditions as
* necessary . This is done by traversing the control - flow graph of the function
* or method in question . Verifications are emitted when conditions are
* encountered which must be check... | // Create the prototype for this function or method . This is the
// function or method declaration which can be used within verification
// conditions to refer to this function or method . This does not include
// a body , since function or methods are treated as being
// " uninterpreted " for the purposes of verifica... |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getIfcDoorStyle ( ) { } } | if ( ifcDoorStyleEClass == null ) { ifcDoorStyleEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 196 ) ; } return ifcDoorStyleEClass ; |
public class TableAppender { /** * Add XML to content . xml
* @ param util an util
* @ param appendable the output
* @ throws IOException if the XML could not be written */
public void appendXMLToContentEntry ( final XMLUtil util , final Appendable appendable ) throws IOException { } } | this . appendPreamble ( util , appendable ) ; this . appendRows ( util , appendable ) ; this . appendPostamble ( appendable ) ; |
public class HttpUtils { /** * Execute post http response .
* @ param url the url
* @ param basicAuthUsername the basic auth username
* @ param basicAuthPassword the basic auth password
* @ param entity the entity
* @ param parameters the parameters
* @ param headers the headers
* @ return the http respon... | try { return execute ( url , HttpMethod . POST . name ( ) , basicAuthUsername , basicAuthPassword , parameters , headers , entity ) ; } catch ( final Exception e ) { LOGGER . error ( e . getMessage ( ) , e ) ; } return null ; |
public class SmsRadar { /** * Stops the service and remove the SmsListener added when the SmsRadar was initialized
* @ param context used to stop the service */
public static void stopSmsRadarService ( Context context ) { } } | SmsRadar . smsListener = null ; Intent intent = new Intent ( context , SmsRadarService . class ) ; context . stopService ( intent ) ; |
public class BaseTagGenerator { /** * This method is called as part of the custom tag ' s end element .
* If the given custom tag has a custom nesting level greater than 0,
* restore its scripting variables to their original values that were
* saved in the tag ' s start element . */
protected void restoreScriptin... | if ( nestingLevel == 0 ) { return ; } TagVariableInfo [ ] tagVarInfos = ti . getTagVariableInfos ( ) ; VariableInfo [ ] varInfos = ti . getVariableInfo ( collectedTagData . getTagData ( ) ) ; if ( varInfos == null ) varInfos = new VariableInfo [ 0 ] ; if ( ( varInfos . length == 0 ) && ( tagVarInfos . length == 0 ) ) {... |
public class JSONValue { /** * Parse valid RFC4627 JSON text into java object from the input source .
* @ see JSONParser
* @ return Instance of the following : JSONObject , JSONArray , String ,
* java . lang . Number , java . lang . Boolean , null */
public static Object parseStrict ( String s ) throws ParseExcep... | return new JSONParser ( MODE_RFC4627 ) . parse ( s , defaultReader . DEFAULT ) ; |
public class QueryRunner { /** * Execute a batch of SQL INSERT , UPDATE , or DELETE queries .
* @ param conn The Connection to use to run the query . The caller is
* responsible for closing this Connection .
* @ param sql The SQL to execute .
* @ param params An array of query replacement parameters . Each row ... | PreparedStatement stmt = null ; int [ ] rows = null ; try { stmt = this . prepareStatement ( conn , sql ) ; for ( int i = 0 ; i < params . length ; i ++ ) { this . fillStatement ( stmt , params [ i ] , paramTypes ) ; stmt . addBatch ( ) ; } rows = stmt . executeBatch ( ) ; } catch ( SQLException e ) { this . rethrow ( ... |
public class RawPaginator { /** * This method will return a list of records for a specific page .
* @ param pageNumber page number to return . This is indexed at 1 , not 0 . Any value below 1 is illegal and will
* be rejected .
* @ return list of records that match a query make up a " page " . */
@ SuppressWarnin... | if ( pageNumber < 1 ) { throw new IllegalArgumentException ( "minimum page index == 1" ) ; } String select = subQuery == null ? dialect . formSelect ( tableName , columns , null , orderBys , pageSize , ( pageNumber - 1 ) * pageSize ) : dialect . formSelect ( tableName , columns , subQuery , orderBys , pageSize , ( page... |
public class CQContainmentCheckUnderLIDs { /** * Extends a given substitution that maps each atom in { @ code from } to match at least one atom in { @ code to }
* @ param sb
* @ param from
* @ param to
* @ return */
private static Substitution computeSomeHomomorphism ( SubstitutionBuilder sb , List < Function >... | int fromSize = from . size ( ) ; if ( fromSize == 0 ) return sb . getSubstituition ( ) ; // stack of partial homomorphisms
Stack < SubstitutionBuilder > sbStack = new Stack < > ( ) ; sbStack . push ( sb ) ; // set the capacity to reduce memory re - allocations
List < Stack < Function > > choicesMap = new ArrayList < > ... |
public class ResolutionQueryPlan { /** * compute the query resolution plan - list of queries ordered by their cost as computed by the graql traversal planner
* @ return list of prioritised queries */
private static ImmutableList < ReasonerQueryImpl > queryPlan ( ReasonerQueryImpl query ) { } } | ResolutionPlan resolutionPlan = query . resolutionPlan ( ) ; ImmutableList < Atom > plan = resolutionPlan . plan ( ) ; TransactionOLTP tx = query . tx ( ) ; LinkedList < Atom > atoms = new LinkedList < > ( plan ) ; List < ReasonerQueryImpl > queries = new LinkedList < > ( ) ; List < Atom > nonResolvableAtoms = new Arra... |
public class Maestrano { /** * return the Maestrano Instance for the given preset
* @ param marketplace
* @ return
* @ throws MnoConfigurationException
* if no instance was not configured */
public static Preset get ( String marketplace ) throws MnoConfigurationException { } } | Preset maestrano = configurations . get ( marketplace ) ; if ( maestrano == null ) { throw new MnoConfigurationException ( "Maestrano was not configured for marketplace: " + marketplace + ". Maestrano.configure(" + marketplace + ") needs to have been called once." ) ; } return maestrano ; |
public class ExpressionNode { /** * OGNL式オブジェクトを取得する
* @ param expression 評価式
* @ return OGNL式オブジェクト */
protected Object getParsedExpression ( final String expression ) { } } | try { return Ognl . parseExpression ( expression ) ; } catch ( OgnlException ex ) { throw new OgnlRuntimeException ( "Failed to parse the expression.[" + expression + "]" , ex ) ; } |
public class LinkedWorkspaceStorageCacheImpl { /** * { @ inheritDoc } */
public void stop ( ) { } } | if ( workerTimer != null ) { try { workerTimer . cancel ( ) ; } catch ( Throwable e ) // NOSONAR
{ LOG . warn ( this . name + " cache, stop error " + e . getMessage ( ) ) ; } } nodesCache . clear ( ) ; propertiesCache . clear ( ) ; cache . clear ( ) ; |
public class StaticCodeBook { /** * in in an explicit list . Both value lists must be unpacked */
float [ ] unquantize ( ) { } } | if ( maptype == 1 || maptype == 2 ) { int quantvals ; float mindel = float32_unpack ( q_min ) ; float delta = float32_unpack ( q_delta ) ; float [ ] r = new float [ entries * dim ] ; // maptype 1 and 2 both use a quantized value vector , but
// different sizes
switch ( maptype ) { case 1 : // most of the time , entries... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.