signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class GrailsParameterMap { /** * Obtains a date for the parameter name using the default format
* @ param name The name of the parameter
* @ return A date or null */
@ Override public Date getDate ( String name ) { } } | Object returnValue = wrappedMap . get ( name ) ; if ( "date.struct" . equals ( returnValue ) ) { returnValue = lazyEvaluateDateParam ( name ) ; nestedDateMap . put ( name , returnValue ) ; return ( Date ) returnValue ; } Date date = super . getDate ( name ) ; if ( date == null ) { // try lookup format from messages . p... |
public class CmsDefaultXmlContentHandler { /** * Adds the given element to the compact view set . < p >
* @ param contentDefinition the XML content definition this XML content handler belongs to
* @ param elementName the element name
* @ param displayType the display type to use for the element widget
* @ throw... | if ( contentDefinition . getSchemaType ( elementName ) == null ) { throw new CmsXmlException ( Messages . get ( ) . container ( Messages . ERR_XMLCONTENT_CONFIG_ELEM_UNKNOWN_1 , elementName ) ) ; } m_displayTypes . put ( elementName , displayType ) ; |
public class AWSDirectoryServiceClient { /** * Removes IP address blocks from a directory .
* @ param removeIpRoutesRequest
* @ return Result of the RemoveIpRoutes operation returned by the service .
* @ throws EntityDoesNotExistException
* The specified entity could not be found .
* @ throws InvalidParameter... | request = beforeClientExecution ( request ) ; return executeRemoveIpRoutes ( request ) ; |
public class DescribeAddressesRequest { /** * This method is intended for internal use only . Returns the marshaled request configured with additional
* parameters to enable operation dry - run . */
@ Override public Request < DescribeAddressesRequest > getDryRunRequest ( ) { } } | Request < DescribeAddressesRequest > request = new DescribeAddressesRequestMarshaller ( ) . marshall ( this ) ; request . addParameter ( "DryRun" , Boolean . toString ( true ) ) ; return request ; |
public class StreamEx { /** * Returns a sequential , ordered { @ link StreamEx } created from given
* { @ link Enumeration } .
* Use this method only if you cannot provide better Stream source ( like
* { @ code Collection } or { @ code Spliterator } ) .
* @ param < T > the type of enumeration elements
* @ par... | return of ( new Iterator < T > ( ) { @ Override public boolean hasNext ( ) { return enumeration . hasMoreElements ( ) ; } @ Override public T next ( ) { return enumeration . nextElement ( ) ; } } ) ; |
public class Polynomial { /** * Checks to see if the coefficients of two polynomials are identical to within tolerance . If the lengths
* of the polynomials are not the same then the extra coefficients in the longer polynomial must be within tolerance
* of zero .
* @ param p Polynomial that this polynomial is bei... | int m = Math . max ( p . size ( ) , size ( ) ) ; // make sure trailing coefficients are close to zero
for ( int i = p . size ; i < m ; i ++ ) { if ( Math . abs ( c [ i ] ) > tol ) { return false ; } } for ( int i = size ; i < m ; i ++ ) { if ( Math . abs ( p . c [ i ] ) > tol ) { return false ; } } // ensure that the r... |
public class AbstractOrientedBox3F { /** * Compute intersection between an OBB and a capsule .
* @ param centerx is the center point of the oriented box .
* @ param centery is the center point of the oriented box .
* @ param centerz is the center point of the oriented box .
* @ param axis1x are the unit vectors... | Point3f closestFromA = new Point3f ( ) ; Point3f closestFromB = new Point3f ( ) ; computeClosestFarestOBBPoints ( capsule1Ax , capsule1Ay , capsule1Az , centerx , centery , centerz , axis1x , axis1y , axis1z , axis2x , axis2y , axis2z , axis3x , axis3y , axis3z , extentAxis1 , extentAxis2 , extentAxis3 , closestFromA ,... |
public class ScriptRuntime { /** * The eval function property of the global object .
* See ECMA 15.1.2.1 */
public static Object evalSpecial ( Context cx , Scriptable scope , Object thisArg , Object [ ] args , String filename , int lineNumber ) { } } | if ( args . length < 1 ) return Undefined . instance ; Object x = args [ 0 ] ; if ( ! ( x instanceof CharSequence ) ) { if ( cx . hasFeature ( Context . FEATURE_STRICT_MODE ) || cx . hasFeature ( Context . FEATURE_STRICT_EVAL ) ) { throw Context . reportRuntimeError0 ( "msg.eval.nonstring.strict" ) ; } String message =... |
public class CmsImportResultList { /** * Ensures the existence of the ' empty ' label . < p > */
protected void ensureEmptyLabel ( ) { } } | if ( m_emptyLabel == null ) { m_emptyLabel = new Label ( CmsAliasMessages . messagesEmptyImportResult ( ) ) ; } m_root . add ( m_emptyLabel ) ; |
import java . util . * ; class GatherElements { /** * This function groups the first elements of tuples based on their second elements in the provided list of tuples .
* Examples :
* gather _ elements ( new int [ ] [ ] { { 6 , 5 } , { 2 , 7 } , { 2 , 5 } , { 8 , 7 } , { 9 , 8 } , { 3 , 7 } } )
* { 5 : [ 6 , 2 ] ,... | Map < Integer , List < Integer > > result = new HashMap < > ( ) ; // Sort the array based on the second element of the tuples
Arrays . sort ( tupleList , new Comparator < int [ ] > ( ) { public int compare ( int [ ] a , int [ ] b ) { return Integer . compare ( a [ 1 ] , b [ 1 ] ) ; } } ) ; // Group the elements based o... |
public class SupplementaryMaterial { /** * Gets the value of the caption property .
* This accessor method returns a reference to the live list ,
* not a snapshot . Therefore any modification you make to the
* returned list will be present inside the JAXB object .
* This is why there is not a < CODE > set < / C... | if ( caption == null ) { caption = new ArrayList < Caption > ( ) ; } return this . caption ; |
public class SerializationUtils { /** * Deserialize a String obtained via { @ link # serialize ( Serializable ) } into an object , using the
* given { @ link BaseEncoding } , which must be the same { @ link BaseEncoding } used to serialize the object .
* @ param serialized The serialized String
* @ param clazz Th... | return deserializeFromBytes ( enc . decode ( serialized ) , clazz ) ; |
public class Stage { /** * Answers a { @ code Protocols } that provides one or more supported { @ code protocols } for the
* newly created { @ code Actor } according to { @ code definition } .
* @ param protocols the { @ code Class < ? > } [ ] array of protocols that the { @ code Actor } supports
* @ param defini... | final ActorProtocolActor < Object > [ ] all = actorProtocolFor ( protocols , definition , parent , maybeSupervisor , logger ) ; return new Protocols ( ActorProtocolActor . toActors ( all ) ) ; |
public class Revision { /** * The user - defined properties , without the ones reserved by CouchDB .
* This is based on - properties , with every key whose name starts with " _ " removed .
* @ return user - defined properties , without the ones reserved by CouchDB . */
@ InterfaceAudience . Public public Map < Stri... | Map < String , Object > result = new HashMap < String , Object > ( ) ; Map < String , Object > sourceMap = getProperties ( ) ; for ( String key : sourceMap . keySet ( ) ) { if ( ! key . startsWith ( "_" ) ) { result . put ( key , sourceMap . get ( key ) ) ; } } return result ; |
public class GetWSDL { /** * Run Method . */
public void run ( ) { } } | Record record = this . getMainRecord ( ) ; try { Writer out = new StringWriter ( ) ; MessageDetailTarget messageDetailTarget = ( MessageDetailTarget ) this . getMainRecord ( ) ; String strSite = messageDetailTarget . getProperty ( TrxMessageHeader . DESTINATION_PARAM ) ; String strWSDLPath = messageDetailTarget . getPr... |
public class ColorPanelView { /** * Show a toast message with the hex color code below the view . */
public void showHint ( ) { } } | final int [ ] screenPos = new int [ 2 ] ; final Rect displayFrame = new Rect ( ) ; getLocationOnScreen ( screenPos ) ; getWindowVisibleDisplayFrame ( displayFrame ) ; final Context context = getContext ( ) ; final int width = getWidth ( ) ; final int height = getHeight ( ) ; final int midy = screenPos [ 1 ] + height / ... |
public class ViewFactory { /** * Create the field view .
* @ param screenFieldClass The screen field Class
* @ param The model to create a view for .
* @ return The new view for this model . */
public ScreenFieldView getViewClassForModel ( Class < ? > screenFieldClass ) { } } | while ( screenFieldClass != null ) { String strModelClassName = screenFieldClass . getName ( ) ; String strViewClassName = null ; if ( ENABLE_CACHE ) strViewClassName = m_classCache . getProperty ( strModelClassName ) ; // Name in cache ?
if ( strViewClassName == null ) strViewClassName = this . getViewClassNameFromMod... |
public class ElementFilter { /** * Returns a list of fields in { @ code elements } .
* @ return a list of fields in { @ code elements }
* @ param elements the elements to filter */
public static List < VariableElement > fieldsIn ( Iterable < ? extends Element > elements ) { } } | return listFilter ( elements , FIELD_KINDS , VariableElement . class ) ; |
public class VectorMath { /** * Sums the values in the vector , returning the result . */
public static double sum ( DoubleVector v ) { } } | double sum = 0 ; if ( v instanceof SparseVector ) { for ( int nz : ( ( SparseVector ) v ) . getNonZeroIndices ( ) ) sum += v . get ( nz ) ; } else { int len = v . length ( ) ; for ( int i = 0 ; i < len ; ++ i ) sum += v . get ( i ) ; } return sum ; |
public class Configurer { /** * Get the class implementation from its name . Default constructor must be available .
* @ param < T > The instance type .
* @ param type The class type .
* @ param path The node path .
* @ return The typed class instance .
* @ throws LionEngineException If invalid class . */
pub... | return getImplementation ( getClass ( ) . getClassLoader ( ) , type , path ) ; |
public class SQLSupport { /** * Create a SQL ORDER BY clause from the list of { @ link Sort } objects . This fragment begins with
* ORDER BY . If the given list of sorts contains a sort with sort expression " foo " and sort direction
* { @ link SortDirection # DESCENDING } , the generated SQL statement will appear ... | if ( sorts == null || sorts . size ( ) == 0 ) return EMPTY ; InternalStringBuilder sql = new InternalStringBuilder ( 64 ) ; sql . append ( "ORDER BY " ) ; internalCreateOrderByFragment ( sql , sorts ) ; return sql . toString ( ) ; |
public class StatementServiceImp { /** * / * ( non - Javadoc )
* @ see com . popbill . api . StatementService # getFiles ( java . lang . String , java . number . Integer , java . lang . String ) */
@ Override public AttachedFile [ ] getFiles ( String CorpNum , int ItemCode , String MgtKey ) throws PopbillException { ... | if ( MgtKey == null || MgtKey . isEmpty ( ) ) throw new PopbillException ( - 99999999 , "관리번호가 입력되지 않았습니다." ) ; return httpget ( "/Statement/" + ItemCode + "/" + MgtKey + "/Files" , CorpNum , null , AttachedFile [ ] . class ) ; |
public class MusicService { /** * Sets the current sound state according to the value stored in preferences . Mostly for internal use .
* @ param preferences path to the preferences . Will be set as global music preferences path .
* @ param preferenceName name of the state preference .
* @ param defaultValue used... | musicPreferences = preferences ; soundEnabledPreferenceName = preferenceName ; setSoundEnabled ( readFromPreferences ( preferences , preferenceName , defaultValue ) ) ; |
public class GraphQLArgument { /** * This helps you transform the current GraphQLArgument into another one by starting a builder with all
* the current values and allows you to transform it how you want .
* @ param builderConsumer the consumer code that will be given a builder to transform
* @ return a new field ... | Builder builder = newArgument ( this ) ; builderConsumer . accept ( builder ) ; return builder . build ( ) ; |
public class CassandraSchemaManager { /** * initiate client method initiates the client .
* @ return boolean value ie client started or not . */
protected boolean initiateClient ( ) { } } | Throwable message = null ; for ( String host : hosts ) { if ( host == null || ! StringUtils . isNumeric ( port ) || port . isEmpty ( ) ) { log . error ( "Host or port should not be null, Port should be numeric." ) ; throw new IllegalArgumentException ( "Host or port should not be null, Port should be numeric." ) ; } in... |
public class XmlMultiConfiguration { /** * Create a builder seeded from an existing { @ code XmlMultiConfiguration } .
* @ param config existing configuration seed
* @ return a builder seeded with the xml configuration */
public static Builder from ( XmlMultiConfiguration config ) { } } | return new Builder ( ) { @ Override public Builder withManager ( String identity , Configuration configuration ) { Map < String , Config > configurations = new HashMap < > ( config . configurations ) ; configurations . put ( identity , new SingleConfig ( configuration ) ) ; return from ( new XmlMultiConfiguration ( con... |
public class ValidateEnv { /** * Parses the command line arguments and options in { @ code args } .
* After successful execution of this method , command line arguments can be
* retrieved by invoking { @ link CommandLine # getArgs ( ) } , and options can be
* retrieved by calling { @ link CommandLine # getOptions... | CommandLineParser parser = new DefaultParser ( ) ; CommandLine cmd ; try { cmd = parser . parse ( options , args ) ; } catch ( ParseException e ) { throw new InvalidArgumentException ( "Failed to parse args for validateEnv" , e ) ; } return cmd ; |
public class ArrayFile { /** * Sets the water marks of this ArrayFile .
* @ param lwmScn - the low water mark
* @ param hwmScn - the high water mark
* @ throws IOException if the < code > lwmScn < / code > is greater than the < code > hwmScn < / code >
* or the changes to the underlying file cannot be flushed .... | if ( lwmScn <= hwmScn ) { writeHwmScn ( hwmScn ) ; _writer . flush ( ) ; writeLwmScn ( lwmScn ) ; _writer . flush ( ) ; } else { throw new IOException ( "Invalid water marks: lwmScn=" + lwmScn + " hwmScn=" + hwmScn ) ; } |
public class AdvancedResizeOp { /** * { @ inheritDoc } */
public final BufferedImage createCompatibleDestImage ( BufferedImage src , ColorModel destCM ) { } } | if ( destCM == null ) { destCM = src . getColorModel ( ) ; } return new BufferedImage ( destCM , destCM . createCompatibleWritableRaster ( src . getWidth ( ) , src . getHeight ( ) ) , destCM . isAlphaPremultiplied ( ) , null ) ; |
public class AvailableCapacity { /** * The total number of instances supported by the Dedicated Host .
* @ return The total number of instances supported by the Dedicated Host . */
public java . util . List < InstanceCapacity > getAvailableInstanceCapacity ( ) { } } | if ( availableInstanceCapacity == null ) { availableInstanceCapacity = new com . amazonaws . internal . SdkInternalList < InstanceCapacity > ( ) ; } return availableInstanceCapacity ; |
public class CompositeBinding { /** * Removes a { @ link Binding } from this { @ code CompositeBinding } , and disposes the
* { @ link Binding } .
* @ param b the { @ link Binding } to remove */
public void remove ( final Binding b ) { } } | if ( ! disposedInd ) { boolean unsubscribe = false ; if ( bindings == null ) { return ; } unsubscribe = bindings . remove ( b ) ; if ( unsubscribe ) { // if we removed successfully we then need to call dispose on it
b . dispose ( ) ; } } |
public class GPARCImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setSTART ( Integer newSTART ) { } } | Integer oldSTART = start ; start = newSTART ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . GPARC__START , oldSTART , start ) ) ; |
public class Resolver { /** * syck _ resolver _ node _ import */
@ JRubyMethod public static IRubyObject node_import ( IRubyObject self , IRubyObject node ) { } } | // System . err . println ( " syck _ resolver _ node _ import ( ) " ) ;
final Ruby runtime = self . getRuntime ( ) ; final ThreadContext ctx = runtime . getCurrentContext ( ) ; org . yecht . Node n = ( org . yecht . Node ) node . dataGetStructChecked ( ) ; YAMLExtra x = ( ( Node ) node ) . x ; IRubyObject obj = null ; ... |
class Main { /** This function calculates the length of an arc given the diameter and angle in degrees .
It returns NULL for angles that are equal to or more than 360 degrees .
Examples :
calculateArcLength ( 9 , 45 ) - > 3.5357142857142856
calculateArcLength ( 9 , 480 ) - > NULL
calculateArcLength ( 5 , 270 ... | double PI = 22.0 / 7.0 ; if ( angle >= 360 ) { return null ; } double arc_length = ( PI * diameter ) * ( angle / 360.0 ) ; return arc_length ; |
public class ClustersInner { /** * Lists the HDInsight clusters in a resource group .
* @ param nextPageLink The NextLink from the previous successful call to List operation .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the PagedList & lt ; ClusterInne... | return listByResourceGroupNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < ClusterInner > > , Page < ClusterInner > > ( ) { @ Override public Page < ClusterInner > call ( ServiceResponse < Page < ClusterInner > > response ) { return response . body ( ) ; } } ) ; |
public class SyntheticStorableReferenceBuilder { /** * Returns true if the properties of the given index entry match those
* contained in the master , excluding any version property . This will
* always return true after a call to copyFromMaster .
* @ param indexEntry
* index entry whose properties will be test... | return getReferenceAccess ( ) . isConsistent ( indexEntry , master ) ; |
public class UserProfileDto { /** * transformers / / / / / */
public static UserProfileDto fromUser ( User user ) { } } | UserProfileDto result = new UserProfileDto ( ) ; result . id = user . getId ( ) ; result . firstName = user . getFirstName ( ) ; result . lastName = user . getLastName ( ) ; result . email = user . getEmail ( ) ; return result ; |
public class MemoryInfo { /** * Returns an estimation , in bytes , of the memory usage of the given objects plus ( recursively )
* objects referenced via non - static references from any of those objects . Which references are
* traversed depends on the VisibilityFilter passed in . If two or more of the given objec... | long total = 0L ; final Set < Integer > counted = new HashSet < Integer > ( objs . size ( ) * 4 ) ; for ( final Object o : objs ) { total += deepMemoryUsageOf0 ( inst , counted , o , referenceFilter ) ; } return total ; |
public class NetworkInterfaceTapConfigurationsInner { /** * Creates or updates a Tap configuration in the specified NetworkInterface .
* @ param resourceGroupName The name of the resource group .
* @ param networkInterfaceName The name of the network interface .
* @ param tapConfigurationName The name of the tap ... | return createOrUpdateWithServiceResponseAsync ( resourceGroupName , networkInterfaceName , tapConfigurationName , tapConfigurationParameters ) . toBlocking ( ) . last ( ) . body ( ) ; |
public class MediaMarkupBuilderUtil { /** * Get dimension from first media format defined in media args . Fall back to dummy min . dimension if none specified .
* @ param media Media metadata
* @ return Dimension */
public static @ NotNull Dimension getMediaformatDimension ( @ NotNull Media media ) { } } | // Create dummy image element to be displayed in Edit mode as placeholder .
MediaArgs mediaArgs = media . getMediaRequest ( ) . getMediaArgs ( ) ; MediaFormat [ ] mediaFormats = mediaArgs . getMediaFormats ( ) ; // detect width / height - either from media args , or from first media format
long width = mediaArgs . getF... |
public class ReflectUtils { /** * Get the root cause of the Exception
* @ param e The Exception
* @ return The root cause of the Exception */
private static RuntimeException getCause ( InvocationTargetException e ) { } } | Throwable cause = e . getCause ( ) ; if ( cause instanceof RuntimeException ) throw ( RuntimeException ) cause ; else throw new IllegalArgumentException ( e . getCause ( ) ) ; |
public class AppsImpl { /** * Gets all the available custom prebuilt domains for a specific culture .
* @ param culture Culture .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the List & lt ; PrebuiltDomain & gt ; object */
public Observable < List < Pre... | return listAvailableCustomPrebuiltDomainsForCultureWithServiceResponseAsync ( culture ) . map ( new Func1 < ServiceResponse < List < PrebuiltDomain > > , List < PrebuiltDomain > > ( ) { @ Override public List < PrebuiltDomain > call ( ServiceResponse < List < PrebuiltDomain > > response ) { return response . body ( ) ;... |
public class MoskitoHttpServlet { /** * Creates the stats objects . Registers the servlet at the ProducerRegistry . */
@ Override public void init ( ServletConfig config ) throws ServletException { } } | super . init ( config ) ; getStats = new ServletStats ( "get" , getMonitoringIntervals ( ) ) ; postStats = new ServletStats ( "post" , getMonitoringIntervals ( ) ) ; putStats = new ServletStats ( "put" , getMonitoringIntervals ( ) ) ; headStats = new ServletStats ( "head" , getMonitoringIntervals ( ) ) ; optionsStats =... |
public class ProxyBinding { /** * As { @ link # proxy ( Class , java . lang . reflect . InvocationHandler ) } but with a
* predefined no - op { @ link java . lang . reflect . InvocationHandler } . */
public static < P > P proxy ( Class < P > anyInterface ) { } } | return proxy ( Interface . type ( anyInterface ) ) ; |
public class CorneredEditText { /** * 根据指定的正则验证用户输入的值 */
public String getValue ( ) { } } | String value = getText ( ) . toString ( ) ; return isEmpty ( value_verify_regex ) ? value : ( verifyValue ( ) ? value : "" ) ; |
public class Field { /** * Write the field to the specified channel .
* @ param channel the channel to which it should be written
* @ throws IOException if there is a problem writing to the channel */
public void write ( WritableByteChannel channel ) throws IOException { } } | logger . debug ( "..writing> {}" , this ) ; Util . writeFully ( getBytes ( ) , channel ) ; |
public class ServiceActionDetailMarshaller { /** * Marshall the given parameter object . */
public void marshall ( ServiceActionDetail serviceActionDetail , ProtocolMarshaller protocolMarshaller ) { } } | if ( serviceActionDetail == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( serviceActionDetail . getServiceActionSummary ( ) , SERVICEACTIONSUMMARY_BINDING ) ; protocolMarshaller . marshall ( serviceActionDetail . getDefinition ( ) , DEFINI... |
public class LongRunningJobMonitor { /** * cleanup jobs that have finished executing after { @ link # thresholdDetectionInMillis } */
Long cleanUpLongJobIfItHasFinishedExecuting ( long currentTime , Job job ) { } } | if ( longRunningJobs . containsKey ( job ) && longRunningJobs . get ( job ) . executionsCount != job . executionsCount ( ) ) { Long jobLastExecutionTimeInMillis = job . lastExecutionEndedTimeInMillis ( ) ; int jobExecutionsCount = job . executionsCount ( ) ; LongRunningJobInfo jobRunningInfo = longRunningJobs . get ( j... |
public class Validate { /** * Checks if the given String is NOT a positive double value . < br >
* This method tries to parse a double value and then checks if it is smaller or equal to 0.
* @ param value The String value to validate .
* @ return The parsed double value
* @ throws ParameterException if the give... | Double doubleValue = Validate . isDouble ( value ) ; notPositive ( doubleValue ) ; return doubleValue ; |
public class Client { /** * Get the { @ link ApplicationDefinition } for the given application name . If the
* connected Doradus server has no such application defined , null is returned .
* @ param appName Application name .
* @ return Application ' s { @ link ApplicationDefinition } , if it exists ,
* otherwi... | Utils . require ( ! m_restClient . isClosed ( ) , "Client has been closed" ) ; Utils . require ( appName != null && appName . length ( ) > 0 , "appName" ) ; try { // Send a GET request to " / _ applications / { application }
StringBuilder uri = new StringBuilder ( Utils . isEmpty ( m_apiPrefix ) ? "" : "/" + m_apiPrefi... |
public class Convert { /** * 转换为Float < br >
* 如果给定的值为空 , 或者转换失败 , 返回默认值 < br >
* 转换失败不会报错
* @ param value 被转换的值
* @ param defaultValue 转换错误时的默认值
* @ return 结果 */
public static Float toFloat ( Object value , Float defaultValue ) { } } | return convert ( Float . class , value , defaultValue ) ; |
public class Bytes { /** * Build a long from first 8 bytes of the array .
* @ param b The byte [ ] to convert .
* @ return A long . */
public static long toLong ( byte [ ] b ) { } } | return ( ( ( ( long ) b [ 7 ] ) & 0xFF ) + ( ( ( ( long ) b [ 6 ] ) & 0xFF ) << 8 ) + ( ( ( ( long ) b [ 5 ] ) & 0xFF ) << 16 ) + ( ( ( ( long ) b [ 4 ] ) & 0xFF ) << 24 ) + ( ( ( ( long ) b [ 3 ] ) & 0xFF ) << 32 ) + ( ( ( ( long ) b [ 2 ] ) & 0xFF ) << 40 ) + ( ( ( ( long ) b [ 1 ] ) & 0xFF ) << 48 ) + ( ( ( ( long )... |
public class CharTrie { /** * Tokens set .
* @ return the set */
public Set < Character > tokens ( ) { } } | return root ( ) . getChildrenMap ( ) . keySet ( ) . stream ( ) . filter ( c -> c != END_OF_STRING && c != FALLBACK && c != ESCAPE ) . collect ( Collectors . toSet ( ) ) ; |
public class File { /** * Write strings and a newline .
* Implements a JavaScript function .
* @ exception IOException if an error occurred while accessing the file
* associated with this object */
@ JSFunction public static void writeLine ( Context cx , Scriptable thisObj , Object [ ] args , Function funObj ) th... | write0 ( thisObj , args , true ) ; |
public class Iterate { /** * Iterate over the specified collection applying the specified Function to each element to calculate
* a key and return the results as a Map . */
public static < T , K > MutableMap < K , T > toMap ( Iterable < T > iterable , Function < ? super T , ? extends K > keyFunction ) { } } | MutableMap < K , T > map = UnifiedMap . newMap ( ) ; Iterate . forEach ( iterable , new MapCollectProcedure < T , K , T > ( map , keyFunction ) ) ; return map ; |
public class VoiceApi { /** * Perform a single - step conference to the specified destination . This adds the destination to the
* existing call , creating a conference if necessary .
* @ param connId The connection ID of the call to conference .
* @ param destination The number to add to the call .
* @ param l... | try { VoicecallsidsinglestepconferenceData confData = new VoicecallsidsinglestepconferenceData ( ) ; confData . setDestination ( destination ) ; confData . setLocation ( location ) ; confData . setUserData ( Util . toKVList ( userData ) ) ; confData . setReasons ( Util . toKVList ( reasons ) ) ; confData . setExtension... |
public class TriangleListing { /** * Implementation notes :
* The requirement that " K extends CopyableValue < K > " can be removed when
* Flink has a self - join and GenerateTriplets is implemented as such .
* ProjectTriangles should eventually be replaced by " . projectFirst ( " * " ) "
* when projections use... | // u , v where u < v
DataSet < Tuple2 < K , K > > filteredByID = input . getEdges ( ) . flatMap ( new FilterByID < > ( ) ) . setParallelism ( parallelism ) . name ( "Filter by ID" ) ; // u , v , ( edge value , deg ( u ) , deg ( v ) )
DataSet < Edge < K , Tuple3 < EV , LongValue , LongValue > > > pairDegree = input . ru... |
public class TransparentDataEncryptionsInner { /** * Creates or updates a database ' s transparent data encryption configuration .
* @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal .
* @ param serverNam... | return createOrUpdateWithServiceResponseAsync ( resourceGroupName , serverName , databaseName ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class LauncherUtils { /** * Creates initial runtime config of scheduler state manager adaptor
* @ return adaptor config */
public Config createAdaptorRuntime ( SchedulerStateManagerAdaptor adaptor ) { } } | return Config . newBuilder ( ) . put ( Key . SCHEDULER_STATE_MANAGER_ADAPTOR , adaptor ) . build ( ) ; |
public class ProcessorInclude { /** * Set off a new parse for an included or imported stylesheet . This will
* set the { @ link StylesheetHandler } to a new state , and recurse in with
* a new set of parse events . Once this function returns , the state of
* the StylesheetHandler should be restored .
* @ param ... | TransformerFactoryImpl processor = handler . getStylesheetProcessor ( ) ; URIResolver uriresolver = processor . getURIResolver ( ) ; try { Source source = null ; // The base identifier , an aboslute URI
// that is associated with the included / imported
// stylesheet module is known in this method ,
// so this method d... |
public class BatchingEntityLoaderBuilder { /** * Builds a batch - fetch capable loader based on the given persister , lock - mode , etc .
* @ param persister The entity persister
* @ param batchSize The maximum number of ids to batch - fetch at once
* @ param lockMode The lock mode
* @ param factory The Session... | if ( batchSize <= 1 ) { // no batching
return buildNonBatchingLoader ( persister , lockMode , factory , influencers , innerEntityLoaderBuilder ) ; } return buildBatchingLoader ( persister , batchSize , lockMode , factory , influencers , innerEntityLoaderBuilder ) ; |
public class Representation { /** * Returns an { @ code InputStream } over the binary data of this representation object .
* Conversion from character to byte data , if required , is performed according to the charset
* specified by the MIME type metadata property ( { @ link NIE # MIME _ TYPE } ) .
* @ return an ... | if ( this . data instanceof InputStream ) { return ( InputStream ) this . data ; } else { final Reader reader = ( Reader ) this . data ; return new ReaderInputStream ( reader , getCharset ( ) ) ; } |
public class PackageInfo { /** * Get the { @ link ClassInfo } objects within this package recursively .
* @ param reachableClassInfo
* the reachable class info */
private void obtainClassInfoRecursive ( final Set < ClassInfo > reachableClassInfo ) { } } | reachableClassInfo . addAll ( memberClassNameToClassInfo . values ( ) ) ; for ( final PackageInfo subPackageInfo : getChildren ( ) ) { subPackageInfo . obtainClassInfoRecursive ( reachableClassInfo ) ; } |
public class Executable { /** * Used to invoke executable asynchronously . */
public void run ( ) { } } | try { Object result = execute ( ) ; if ( ! aborted ) { this . retval = result ; finished = true ; } } catch ( InterruptedException ie ) { } catch ( Throwable t ) { execException = t ; finished = true ; } |
public class DirectedGraph { /** * Report ( as a Map ) the out - degree ( the number of tail ends adjacent to a vertex ) of each vertex . */
public Map < V , Integer > outDegree ( ) { } } | Map < V , Integer > result = new HashMap < > ( ) ; for ( V vertex : neighbors . keySet ( ) ) { result . put ( vertex , neighbors . get ( vertex ) . size ( ) ) ; } return result ; |
public class SchemaHelper { /** * Extracts the value of a specified parameter in a schema
* @ param searchString
* element to search for
* @ param schema
* Schema as a string
* @ return the value or null if not found */
private static String extractTopItem ( String searchString , String schema , int startIdx ... | String extracted = null ; int propIdx = schema . indexOf ( "\"properties\"" , startIdx ) ; if ( propIdx == - 1 ) { propIdx = Integer . MAX_VALUE ; } // check for second
int idIdx = schema . indexOf ( "\"" + searchString + "\"" , startIdx ) ; int secondIdIdx = schema . indexOf ( "\"" + searchString + "\"" , idIdx + 1 ) ... |
public class SlingApi { /** * ( asynchronously )
* @ param path ( required )
* @ param pLimit ( required )
* @ param _ 1Property ( required )
* @ param _ 1PropertyValue ( required )
* @ param callback The callback to be executed when the API call finishes
* @ return The request call
* @ throws ApiExceptio... | ProgressResponseBody . ProgressListener progressListener = null ; ProgressRequestBody . ProgressRequestListener progressRequestListener = null ; if ( callback != null ) { progressListener = new ProgressResponseBody . ProgressListener ( ) { @ Override public void update ( long bytesRead , long contentLength , boolean do... |
public class ModuleImportResolver { /** * Returns the corresponding scope root Node from a goog . module . */
@ Nullable private Node getGoogModuleScopeRoot ( @ Nullable Module module ) { } } | checkArgument ( module . metadata ( ) . isGoogModule ( ) , module . metadata ( ) ) ; Node scriptNode = module . metadata ( ) . rootNode ( ) ; if ( scriptNode . isScript ( ) && scriptNode . hasOneChild ( ) && scriptNode . getOnlyChild ( ) . isModuleBody ( ) ) { // The module root node should be a SCRIPT , whose first ch... |
public class URLConnection { /** * Looks for a content handler in a user - defineable set of places .
* By default it looks in sun . net . www . content , but users can define a
* vertical - bar delimited set of class prefixes to search through in
* addition by defining the java . content . handler . pkgs propert... | String contentHandlerClassName = typeToPackageName ( contentType ) ; String contentHandlerPkgPrefixes = getContentHandlerPkgPrefixes ( ) ; StringTokenizer packagePrefixIter = new StringTokenizer ( contentHandlerPkgPrefixes , "|" ) ; while ( packagePrefixIter . hasMoreTokens ( ) ) { String packagePrefix = packagePrefixI... |
public class ChangesetsDao { /** * Get a number of changesets that match the given filters .
* @ param handler The handler which is fed the incoming changeset infos
* @ param filters what to search for . I . e .
* new QueryChangesetsFilters ( ) . byUser ( 123 ) . onlyClosed ( )
* @ throws OsmAuthorizationExcept... | String query = filters != null ? "?" + filters . toParamString ( ) : "" ; try { osm . makeAuthenticatedRequest ( CHANGESET + "s" + query , null , new ChangesetParser ( handler ) ) ; } catch ( OsmNotFoundException e ) { // ok , we are done ( ignore the exception )
} |
public class WikipediaXMLReader { /** * Creates and initializes the xml keyword tree . */
private void initXMLKeys ( ) { } } | this . keywords = new SingleKeywordTree < WikipediaXMLKeys > ( ) ; keywords . addKeyword ( WikipediaXMLKeys . KEY_START_PAGE . getKeyword ( ) , WikipediaXMLKeys . KEY_START_PAGE ) ; keywords . addKeyword ( WikipediaXMLKeys . KEY_END_PAGE . getKeyword ( ) , WikipediaXMLKeys . KEY_END_PAGE ) ; keywords . addKeyword ( Wik... |
public class CtClassUtil { /** * 获取方法的参数名称 .
* @ param ctMethod
* @ return
* @ throws NotFoundException */
public static String [ ] getParameterNames ( CtMethod ctMethod ) throws NotFoundException { } } | MethodInfo methodInfo = ctMethod . getMethodInfo ( ) ; CodeAttribute codeAttribute = methodInfo . getCodeAttribute ( ) ; // logger . info ( " methodInfo . getConstPool ( ) . getSize ( ) : " ) ;
LocalVariableAttribute attribute = ( LocalVariableAttribute ) codeAttribute . getAttribute ( LocalVariableAttribute . tag ) ; ... |
public class CUdevice_attribute { /** * Returns the String identifying the given CUdevice _ attribute
* @ param n The CUdevice _ attribute
* @ return The String identifying the given CUdevice _ attribute */
public static String stringFor ( int n ) { } } | switch ( n ) { case CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK : return "CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK" ; case CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X : return "CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X" ; case CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y : return "CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y" ; case CU_DEVICE_ATTRIBUT... |
public class GoogleMapsTileMath { /** * Converts given coordinate in WGS84 Datum to XY in Spherical Mercator
* EPSG : 3857
* @ param lng the longitude of the coordinate
* @ param lat the latitude of the coordinate
* @ return The coordinate transformed to EPSG : 3857 */
public Coordinate lngLatToMeters ( double ... | double mx = lng * originShift / 180.0 ; double my = Math . log ( Math . tan ( ( 90 + lat ) * Math . PI / 360.0 ) ) / ( Math . PI / 180.0 ) ; my *= originShift / 180.0 ; return new Coordinate ( mx , my ) ; |
public class Record { /** * The end key position is in this record . . . Save it ! */
public void handleEndKey ( ) { } } | KeyArea keyArea = this . getKeyArea ( - 1 ) ; if ( keyArea == null ) return ; BaseBuffer buffer = new VectorBuffer ( null ) ; boolean [ ] rgbModified = keyArea . getModified ( ) ; boolean [ ] rgbNullable = keyArea . setNullable ( true ) ; keyArea . setupKeyBuffer ( buffer , DBConstants . FILE_KEY_AREA ) ; keyArea . zer... |
public class KuromojiCSVUtil { /** * Quote and escape input value for CSV
* @ param original Original text .
* @ return Escaped text . */
public static String quoteEscape ( final String original ) { } } | String result = original ; if ( result . indexOf ( '\"' ) >= 0 ) { result = result . replace ( "\"" , ESCAPED_QUOTE ) ; } if ( result . indexOf ( COMMA ) >= 0 ) { result = "\"" + result + "\"" ; } return result ; |
public class OGNL { /** * 判断条件是 and 还是 or
* @ param parameter
* @ return */
public static String andOr ( Object parameter ) { } } | if ( parameter instanceof Example . Criteria ) { return ( ( Example . Criteria ) parameter ) . getAndOr ( ) ; } else if ( parameter instanceof Example . Criterion ) { return ( ( Example . Criterion ) parameter ) . getAndOr ( ) ; } else if ( parameter . getClass ( ) . getCanonicalName ( ) . endsWith ( "Criteria" ) ) { r... |
public class ListMultimap { /** * Gets the number of values in the map .
* @ return the number of values */
public int size ( ) { } } | int size = 0 ; for ( List < V > value : map . values ( ) ) { size += value . size ( ) ; } return size ; |
public class BaseSynthesizer { /** * Returns the { @ link Dictionary } used for this synthesizer .
* The dictionary file can be defined in the { @ link # BaseSynthesizer ( String , String ) constructor } .
* @ throws IOException In case the dictionary cannot be loaded . */
protected Dictionary getDictionary ( ) thr... | Dictionary dict = this . dictionary ; if ( dict == null ) { synchronized ( this ) { dict = this . dictionary ; if ( dict == null ) { URL url = JLanguageTool . getDataBroker ( ) . getFromResourceDirAsUrl ( resourceFileName ) ; this . dictionary = dict = Dictionary . read ( url ) ; } } } return dict ; |
public class Get { /** * Validates that the value from { @ code map } for the given { @ code key } is
* a present . Returns the value when present ; otherwise , throws a
* { @ code NoSuchElementException } .
* @ param map a map
* @ param key a key
* @ param < T > the type of value
* @ return the string valu... | if ( ! map . containsKey ( key ) ) { String message = String . format ( "Missing required value for key \"%s\"." , key ) ; throw new NoSuchElementException ( message ) ; } return map . get ( key ) ; |
public class StatsAgent { /** * STARVATION */
private VoltTable [ ] collectManagementStats ( boolean interval ) { } } | VoltTable [ ] mStats = collectStats ( StatsSelector . MEMORY , interval ) ; VoltTable [ ] iStats = collectStats ( StatsSelector . INITIATOR , interval ) ; VoltTable [ ] pStats = collectStats ( StatsSelector . PROCEDURE , interval ) ; VoltTable [ ] ioStats = collectStats ( StatsSelector . IOSTATS , interval ) ; VoltTabl... |
public class AssetsApi { /** * Get character asset locations ( asynchronously ) Return locations for a set
* of item ids , which you can get from character assets endpoint .
* Coordinates for items in hangars or stations are set to ( 0,0,0 ) - - - SSO
* Scope : esi - assets . read _ assets . v1
* @ param charac... | com . squareup . okhttp . Call call = postCharactersCharacterIdAssetsLocationsValidateBeforeCall ( characterId , requestBody , datasource , token , callback ) ; Type localVarReturnType = new TypeToken < List < CharacterAssetsLocationsResponse > > ( ) { } . getType ( ) ; apiClient . executeAsync ( call , localVarReturnT... |
public class Unmarshaller { /** * Unmarshals the embedded field represented by the given embedded metadata .
* @ param embeddedMetadata
* the embedded metadata
* @ param target
* the target object that needs to be updated
* @ throws Throwable
* propagated */
private void unmarshalWithExplodedStrategy ( Embe... | Object embeddedObject = initializeEmbedded ( embeddedMetadata , target ) ; for ( PropertyMetadata propertyMetadata : embeddedMetadata . getPropertyMetadataCollection ( ) ) { unmarshalProperty ( propertyMetadata , embeddedObject ) ; } for ( EmbeddedMetadata embeddedMetadata2 : embeddedMetadata . getEmbeddedMetadataColle... |
public class CmsAttributeHandler { /** * Inserts an entity value after the given reference . < p >
* @ param value the entity value
* @ param reference the reference */
private void insertValueAfterReference ( CmsEntity value , CmsAttributeValueView reference ) { } } | int valueIndex = - 1 ; if ( reference . getElement ( ) . getNextSiblingElement ( ) == null ) { m_entity . addAttributeValue ( m_attributeName , value ) ; } else { valueIndex = reference . getValueIndex ( ) + 1 ; m_entity . insertAttributeValue ( m_attributeName , value , valueIndex ) ; } CmsAttributeValueView valueWidg... |
public class ApiOvhAuth { /** * Request a new credential for your application
* REST : POST / auth / credential
* @ param accessRules [ required ] Access required for your application
* @ param redirection [ required ] Where you want to redirect the user after sucessfull authentication */
public net . minidev . o... | String qPath = "/auth/credential" ; StringBuilder sb = path ( qPath ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "accessRules" , accessRules ) ; addBody ( o , "redirection" , redirection ) ; String resp = execN ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( re... |
public class ListApi { /** * Get string value by path .
* @ param list subject
* @ param path nodes to walk in map
* @ return value */
public static Optional < String > getString ( final List list , final Integer ... path ) { } } | return get ( list , String . class , path ) ; |
public class PutInstructionFileRequest { /** * Creates and returns a { @ link PutObjectRequest } for the instruction file
* with the specified suffix . */
public PutObjectRequest createPutObjectRequest ( S3Object s3Object ) { } } | if ( ! s3Object . getBucketName ( ) . equals ( s3ObjectId . getBucket ( ) ) || ! s3Object . getKey ( ) . equals ( s3ObjectId . getKey ( ) ) ) { throw new IllegalArgumentException ( "s3Object passed inconsistent with the instruction file being created" ) ; } InstructionFileId ifid = s3ObjectId . instructionFileId ( suff... |
public class KeyChecker { /** * Verifies the key usage extension in a CA cert .
* The key usage extension , if present , must assert the keyCertSign bit .
* The extended key usage extension is not checked ( see CR 4776794 for
* more information ) . */
static void verifyCAKeyUsage ( X509Certificate cert ) throws C... | String msg = "CA key usage" ; if ( debug != null ) { debug . println ( "KeyChecker.verifyCAKeyUsage() ---checking " + msg + "..." ) ; } boolean [ ] keyUsageBits = cert . getKeyUsage ( ) ; // getKeyUsage returns null if the KeyUsage extension is not present
// in the certificate - in which case there is nothing to check... |
public class InterleavedU8 { /** * Returns an integer formed from 4 bands . a [ i ] < < 24 | a [ i + 1 ] < < 16 | a [ i + 2 ] < < 8 | a [ 3]
* @ param x column
* @ param y row
* @ return 32 bit integer */
public int get32 ( int x , int y ) { } } | int i = startIndex + y * stride + x * 4 ; return ( ( data [ i ] & 0xFF ) << 24 ) | ( ( data [ i + 1 ] & 0xFF ) << 16 ) | ( ( data [ i + 2 ] & 0xFF ) << 8 ) | ( data [ i + 3 ] & 0xFF ) ; |
public class MBeanUtil { /** * Create a proxy to the given mbean
* @ param c
* @ param name
* @ return proxy to the mbean
* @ throws Throwable */
@ SuppressWarnings ( "unchecked" ) public static Object getMBean ( final Class c , final String name ) throws Throwable { } } | final MBeanServer server = getMbeanServer ( ) ; // return MBeanProxyExt . create ( c , name , server ) ;
return JMX . newMBeanProxy ( server , new ObjectName ( name ) , c ) ; |
public class XMLChecker { /** * Determines if the specified character matches the < em > CombiningChar < / em > production .
* See : < a href = " http : / / www . w3 . org / TR / REC - xml # NT - CombiningChar " > Definition of CombiningChar < / a > .
* @ param c the character to check .
* @ return < code > true ... | int n = c ; return n >= 0x0300 && n <= 0x0345 || n >= 0x0360 && n <= 0x0361 || n >= 0x0483 && n <= 0x0486 || n >= 0x0591 && n <= 0x05A1 || n >= 0x05A3 && n <= 0x05B9 || n >= 0x05BB && n <= 0x05BD || n == 0x05BF || n >= 0x05C1 && n <= 0x05C2 || n == 0x05C4 || n >= 0x064B && n <= 0x0652 || n == 0x0670 || n >= 0x06D6 && n... |
public class UrlUtilities { /** * Get content from the passed in URL . This code will open a connection to
* the passed in server , fetch the requested content , and return it as a
* byte [ ] .
* @ param url URL to hit
* @ param inCookies Map of session cookies ( or null if not needed )
* @ param outCookies M... | try { return getContentFromUrl ( getActualUrl ( url ) , inCookies , outCookies , allowAllCerts ) ; } catch ( Exception e ) { LOG . warn ( "Exception occurred fetching content from url: " + url , e ) ; return null ; } |
public class TextRowProtocol { /** * Get ZonedDateTime format from raw text format .
* @ param columnInfo column information
* @ param clazz class for logging
* @ param timeZone time zone
* @ return ZonedDateTime value
* @ throws SQLException if column type doesn ' t permit conversion */
public ZonedDateTime ... | if ( lastValueWasNull ( ) ) { return null ; } if ( length == 0 ) { lastValueNull |= BIT_LAST_FIELD_NULL ; return null ; } String raw = new String ( buf , pos , length , StandardCharsets . UTF_8 ) ; switch ( columnInfo . getColumnType ( ) . getSqlType ( ) ) { case Types . TIMESTAMP : if ( raw . startsWith ( "0000-00-00 ... |
public class AbsAxis { /** * Adding any AtomicVal to any ItemList staticly .
* @ param pRtx
* as key
* @ param pVal
* to be added
* @ return the index in the ItemList */
public static int addAtomicToItemList ( final INodeReadTrx pRtx , final AtomicValue pVal ) { } } | if ( ! atomics . containsKey ( pRtx ) ) { atomics . put ( pRtx , new ItemList ( ) ) ; } return atomics . get ( pRtx ) . addItem ( pVal ) ; |
public class ProxyInvocationHandlerImpl { /** * Checks the connector status before a method call is executed . Instantly returns True if the connector already
* finished successfully , otherwise it will block up to the amount of milliseconds defined by the
* arbitrationTimeout or until the ProxyInvocationHandler is... | connectorStatusLock . lock ( ) ; try { if ( connectorStatus == ConnectorStatus . ConnectorSuccesful ) { return true ; } return connectorSuccessfullyFinished . await ( discoveryQos . getDiscoveryTimeoutMs ( ) , TimeUnit . MILLISECONDS ) ; } finally { connectorStatusLock . unlock ( ) ; } |
public class FileUtil { /** * Reads the contents of a file into a byte array .
* @ param file The < code > File < / code > to read .
* @ return A byte array containing the file ' s contents .
* @ throws IOException If an error occurred while reading the file . */
public static byte [ ] getFileContents ( File file... | FileInputStream stream = new FileInputStream ( file ) ; byte [ ] contents = new byte [ ( int ) file . length ( ) ] ; stream . read ( contents ) ; stream . close ( ) ; return contents ; |
public class HTAccessHandler { public void handle ( String pathInContext , String pathParams , HttpRequest request , HttpResponse response ) throws HttpException , IOException { } } | String user = null ; String password = null ; boolean IPValid = true ; if ( log . isDebugEnabled ( ) ) log . debug ( "HTAccessHandler pathInContext=" + pathInContext ) ; String credentials = request . getField ( HttpFields . __Authorization ) ; if ( credentials != null ) { credentials = credentials . substring ( creden... |
public class PrcWageTaxLineSave { /** * < p > Process entity request . < / p >
* @ param pAddParam additional param , e . g . return this line ' s
* document in " nextEntity " for farther process
* @ param pRequestData Request Data
* @ param pEntity Entity to process
* @ return Entity processed for farther pr... | if ( pEntity . getItsTotal ( ) . doubleValue ( ) == 0d ) { throw new ExceptionWithCode ( ExceptionWithCode . WRONG_PARAMETER , "total_is_0" ) ; } if ( pEntity . getItsPercentage ( ) . doubleValue ( ) <= 0d ) { throw new ExceptionWithCode ( ExceptionWithCode . WRONG_PARAMETER , "percentage_less_eq_0" ) ; } // Beige - Or... |
public class SocketRWChannelSelector { /** * @ see
* com . ibm . ws . tcpchannel . internal . ChannelSelector # addWork ( java . lang . Object ) */
@ Override protected void addWork ( Object toAdd ) { } } | addToWorkQueue ( toAdd ) ; if ( wakeupNeeded || ( wakeupOption == ValidateUtils . SELECTOR_WAKEUP_IF_NO_FORCE_QUEUE && ( ( TCPBaseRequestContext ) toAdd ) . isForceQueue ( ) == false ) ) { if ( wakeupPending != true ) { wakeupPending = true ; wakeup ( ) ; } } |
public class RefreshFutures { /** * Await for either future completion or to reach the timeout . Successful / exceptional future completion is not substantial .
* @ param timeout the timeout value .
* @ param timeUnit timeout unit .
* @ param futures { @ link Collection } of { @ literal Future } s .
* @ return ... | long waitTime = 0 ; for ( Future < ? > future : futures ) { long timeoutLeft = timeUnit . toNanos ( timeout ) - waitTime ; if ( timeoutLeft <= 0 ) { break ; } long startWait = System . nanoTime ( ) ; try { future . get ( timeoutLeft , TimeUnit . NANOSECONDS ) ; } catch ( InterruptedException e ) { Thread . currentThrea... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.