signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class Entity { /** * rapid patch */
private void allChildrenRecursive ( Entity e , List < Entity > result ) { } } | for ( Entity child : e . getChildren ( ) ) { result . add ( child ) ; allChildrenRecursive ( child , result ) ; } |
public class FailSafePortalUrlBuilder { /** * / * ( non - Javadoc )
* @ see org . apereo . portal . url . IPortalUrlBuilder # getPortletUrlBuilder ( org . apereo . portal . portlet . om . IPortletWindowId ) */
@ Override public IPortletUrlBuilder getPortletUrlBuilder ( IPortletWindowId portletWindowId ) { } } | IPortletUrlBuilder portletUrlBuilder ; synchronized ( this . portletUrlBuilders ) { portletUrlBuilder = this . portletUrlBuilders . get ( portletWindowId ) ; if ( portletUrlBuilder == null ) { portletUrlBuilder = new FailSafePortletUrlBuilder ( portletWindowId , this ) ; this . portletUrlBuilders . put ( portletWindowI... |
public class KeyVaultClientBaseImpl { /** * Gets the specified deleted secret .
* The Get Deleted Secret operation returns the specified deleted secret along with its attributes . This operation requires the secrets / get permission .
* @ param vaultBaseUrl The vault name , for example https : / / myvault . vault .... | return ServiceFuture . fromResponse ( getDeletedSecretWithServiceResponseAsync ( vaultBaseUrl , secretName ) , serviceCallback ) ; |
public class DistributionTable { /** * DistributionTableFilterEvent .
* @ param filterEvent
* as instance of { @ link RefreshDistributionTableByFilterEvent } */
@ EventBusListenerMethod ( scope = EventScope . UI , filter = OnlyEventsFromDeploymentViewFilter . class ) void onEvent ( final RefreshDistributionTableByF... | UI . getCurrent ( ) . access ( this :: refreshFilter ) ; |
public class Stage { /** * Answers the { @ code T } protocol of the newly created { @ code Actor } that implements the { @ code protocol } and
* that will be assigned the specific { @ code address } .
* @ param < T > the protocol type
* @ param protocol the { @ code Class < T > } protocol
* @ param definition t... | final Address actorAddress = this . allocateAddress ( definition , address ) ; final Mailbox actorMailbox = this . allocateMailbox ( definition , actorAddress , null ) ; final ActorProtocolActor < T > actor = actorProtocolFor ( protocol , definition , definition . parentOr ( world . defaultParent ( ) ) , actorAddress ,... |
public class CommonsValidatorGenerator { /** * Returns the opening script element and some initial javascript . */
protected String getJavascriptBegin ( String jsFormName , String methods ) { } } | StringBuffer sb = new StringBuffer ( ) ; String name = jsFormName . replace ( '/' , '_' ) ; // remove any ' / ' characters
name = jsFormName . substring ( 0 , 1 ) . toUpperCase ( ) + jsFormName . substring ( 1 , jsFormName . length ( ) ) ; sb . append ( "\n var bCancel = false; \n\n" ) ; sb . append ( " function ... |
public class LoadBalancerFrontendIPConfigurationsInner { /** * Gets load balancer frontend IP configuration .
* @ param resourceGroupName The name of the resource group .
* @ param loadBalancerName The name of the load balancer .
* @ param frontendIPConfigurationName The name of the frontend IP configuration .
... | return getWithServiceResponseAsync ( resourceGroupName , loadBalancerName , frontendIPConfigurationName ) . map ( new Func1 < ServiceResponse < FrontendIPConfigurationInner > , FrontendIPConfigurationInner > ( ) { @ Override public FrontendIPConfigurationInner call ( ServiceResponse < FrontendIPConfigurationInner > res... |
public class ComponentExposedTypeGenerator { /** * Process data fields from the { @ link IsVueComponent } Class . */
private void processData ( ) { } } | List < VariableElement > dataFields = ElementFilter . fieldsIn ( component . getEnclosedElements ( ) ) . stream ( ) . filter ( field -> field . getAnnotation ( Data . class ) != null ) . collect ( Collectors . toList ( ) ) ; if ( dataFields . isEmpty ( ) ) { return ; } dataFields . forEach ( collectionFieldsValidator :... |
public class WhileyFileParser { /** * Parse a quantifier expression , which is of the form :
* < pre >
* QuantExpr : : = ( " no " | " some " | " all " )
* Identifier " in " Expr ( ' , ' Identifier " in " Expr ) +
* ' | ' LogicalExpr
* < / pre >
* @ param scope
* The enclosing scope for this statement , wh... | int start = index - 1 ; scope = scope . newEnclosingScope ( ) ; match ( LeftCurly ) ; // Parse one or more source variables / expressions
Tuple < Decl . Variable > parameters = parseQuantifierParameters ( scope ) ; // Parse condition over source variables
Expr condition = parseLogicalExpression ( scope , true ) ; match... |
public class PdfResources { /** * methods */
void add ( PdfName key , PdfDictionary resource ) { } } | if ( resource . size ( ) == 0 ) return ; PdfDictionary dic = getAsDict ( key ) ; if ( dic == null ) put ( key , resource ) ; else dic . putAll ( resource ) ; |
public class DataCubeAPI { /** * 获取免费券数据 < br >
* 1 . 该接口目前仅支持拉取免费券 ( 优惠券 、 团购券 、 折扣券 、 礼品券 ) 的卡券相关数据 , 暂不支持特殊票券 ( 电影票 、 会议门票 、 景区门票 、 飞机票 ) 数据 。 < br >
* 2 . 查询时间区间需 & lt ; = 62天 , 否则报错 ; < br >
* 3 . 传入时间格式需严格参照示例填写如 ” 2015-06-15 ” , 否则报错 ; < br >
* 4 . 该接口只能拉取非当天的数据 , 不能拉取当天的卡券数据 , 否则报错 。 < br >
* @ param ... | return getCardCardInfo ( access_token , JsonUtil . toJSONString ( freeCardCube ) ) ; |
public class RangeBigInteger { /** * Return the intersection between this range and the given range . */
public RangeBigInteger intersect ( RangeBigInteger r ) { } } | if ( min . compareTo ( r . max ) > 0 ) return null ; if ( max . compareTo ( r . min ) < 0 ) return null ; return new RangeBigInteger ( min . compareTo ( r . min ) <= 0 ? r . min : min , max . compareTo ( r . max ) <= 0 ? max : r . max ) ; |
public class VirtualMachineScaleSetVMsInner { /** * Updates a virtual machine of a VM scale set .
* @ param resourceGroupName The name of the resource group .
* @ param vmScaleSetName The name of the VM scale set where the extension should be create or updated .
* @ param instanceId The instance ID of the virtual... | return ServiceFuture . fromResponse ( updateWithServiceResponseAsync ( resourceGroupName , vmScaleSetName , instanceId , parameters ) , serviceCallback ) ; |
public class Spies { /** * Proxies a binary predicate spying for result .
* @ param < T1 > the predicate first parameter type
* @ param < T2 > the predicate second parameter type
* @ param predicate the predicate that will be spied
* @ param result a box that will be containing spied result
* @ return the pro... | return spy ( predicate , result , Box . < T1 > empty ( ) , Box . < T2 > empty ( ) ) ; |
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EClass getEBC ( ) { } } | if ( ebcEClass == null ) { ebcEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 234 ) ; } return ebcEClass ; |
public class AliasFactory { /** * Create an alias instance for the given class , parent and path
* @ param < A >
* @ param cl type for alias
* @ param path underlying expression
* @ return alias instance */
public < A > A createAliasForProperty ( Class < A > cl , Expression < ? > path ) { } } | return createProxy ( cl , path ) ; |
public class BigDecimalUtil { /** * Convenience method to create a BigDecimal with a String , can be statically imported .
* @ param val a string representing the BigDecimal
* @ return the new BigDecimal */
public static BigDecimal bd ( final String val ) { } } | return val != null && val . length ( ) > 0 ? new BigDecimal ( val ) : null ; |
public class ConfigRenderOptions { /** * Returns options with JSON toggled . JSON means that HOCON extensions
* ( omitting commas , quotes for example ) won ' t be used . However , whether to
* use comments is controlled by the separate { @ link # setComments ( boolean ) }
* and { @ link # setOriginComments ( boo... | if ( value == json ) return this ; else return new ConfigRenderOptions ( originComments , comments , formatted , value ) ; |
public class StreamMessageHeader { /** * Add value to additional header .
* @ param key key
* @ param value value */
public void addAdditionalHeader ( String key , String value ) { } } | if ( this . additionalHeader == null ) { this . additionalHeader = Maps . newLinkedHashMap ( ) ; } this . additionalHeader . put ( key , value ) ; |
public class CustomTrust { /** * Returns an input stream containing one or more certificate PEM files . This implementation just
* embeds the PEM files in Java strings ; most applications will instead read this from a resource
* file that gets bundled with the application . */
private InputStream trustedCertificate... | // PEM files for root certificates of Comodo and Entrust . These two CAs are sufficient to view
// https : / / publicobject . com ( Comodo ) and https : / / squareup . com ( Entrust ) . But they aren ' t
// sufficient to connect to most HTTPS sites including https : / / godaddy . com and https : / / visa . com .
// Typ... |
public class AppProfile { /** * Wraps a protobuf response .
* < p > This method is considered an internal implementation detail and not meant to be used by
* applications . */
@ InternalApi public static AppProfile fromProto ( @ Nonnull com . google . bigtable . admin . v2 . AppProfile proto ) { } } | return new AppProfile ( proto ) ; |
public class VueComponentOptions { /** * Add a computed property to this ComponentOptions . If the computed has both a getter and a
* setter , this will be called twice , once for each .
* @ param javaMethod Function pointer to the method in the { @ link IsVueComponent }
* @ param computedPropertyName Name of the... | ComputedOptions computedDefinition = getComputedOptions ( computedPropertyName ) ; if ( computedDefinition == null ) { computedDefinition = new ComputedOptions ( ) ; addComputedOptions ( computedPropertyName , computedDefinition ) ; } if ( kind == ComputedKind . GETTER ) { computedDefinition . get = javaMethod ; } else... |
public class GraphicUtils { /** * Draws an arrow between two points ( specified by their coordinates ) using the specified weight . < br >
* The arrow is leading from point < code > from < / code > to point < code > to < / code > .
* @ param g Graphics context
* @ param x0 X coordinate of arrow starting point
*... | int ix2 , iy2 , ix3 , iy3 ; double sinPhi , cosPhi , dx , dy , xk1 , yk1 , xk2 , yk2 , s ; dx = x1 - x0 ; dy = y1 - y0 ; int maxArrowWidth = 10 ; // arrow length
s = Math . sqrt ( dy * dy + dx * dx ) ; // arrow head length
int headLength = ( int ) Math . round ( s * 0.5 ) ; double arrowAngle = Math . atan ( ( double ) ... |
public class LanguageSearchParameter { /** * Gets the languages value for this LanguageSearchParameter .
* @ return languages * A list of { @ link Language } s indicating the desired languages
* being targeted in the results .
* < span class = " constraint ContentsDistinct " > This
* field must contain distinct... | return languages ; |
public class ProvFactory { /** * Creates a new { @ link Entity } with provided identifier and label
* @ param id a { @ link QualifiedName } for the entity
* @ param label a String for the label property ( see { @ link HasLabel # getLabel ( ) }
* @ return an object of type { @ link Entity } */
public Entity newEnt... | Entity res = newEntity ( id ) ; if ( label != null ) res . getLabel ( ) . add ( newInternationalizedString ( label ) ) ; return res ; |
public class DescribeTimeBasedAutoScalingRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( DescribeTimeBasedAutoScalingRequest describeTimeBasedAutoScalingRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( describeTimeBasedAutoScalingRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeTimeBasedAutoScalingRequest . getInstanceIds ( ) , INSTANCEIDS_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable t... |
public class JPAPersistenceManagerImpl { /** * @ return create and return the PSU .
* @ throws Exception */
private synchronized PersistenceServiceUnit createPsu ( ) throws Exception { } } | if ( psu != null ) { return psu ; } // Load the PSU including the most recent entities .
PersistenceServiceUnit retMe = createLatestPsu ( ) ; // If any tables are not up to the current code level , re - load the PSU with backleveled entities .
int instanceVersion = getJobInstanceTableVersion ( retMe ) ; if ( instanceVe... |
public class KiteTicker { /** * Returns length of packet by reading byte array values . */
private int getLengthFromByteArray ( byte [ ] bin ) { } } | ByteBuffer bb = ByteBuffer . wrap ( bin ) ; bb . order ( ByteOrder . BIG_ENDIAN ) ; return bb . getShort ( ) ; |
public class PhaseOneApplication { /** * Process file arguments . */
private void processFiles ( ) { } } | String [ ] fileArgs = getOptionValues ( INFILE_SHORT_OPT ) ; final List < File > files = new ArrayList < File > ( fileArgs . length ) ; for ( final String fileArg : fileArgs ) { File file = new File ( fileArg ) ; if ( ! file . canRead ( ) ) { error ( INPUT_FILE_UNREADABLE + file ) ; } else { files . add ( file ) ; } } ... |
public class JaiDebug { /** * Dumps a single material property to stdout .
* @ param property the property */
public static void dumpMaterialProperty ( AiMaterial . Property property ) { } } | System . out . print ( property . getKey ( ) + " " + property . getSemantic ( ) + " " + property . getIndex ( ) + ": " ) ; Object data = property . getData ( ) ; if ( data instanceof ByteBuffer ) { ByteBuffer buf = ( ByteBuffer ) data ; for ( int i = 0 ; i < buf . capacity ( ) ; i ++ ) { System . out . print ( Integer ... |
public class SmileConverter { /** * Returns a dataset where the response column is numeric . E . g . to be used for a regression */
public AttributeDataset numericDataset ( String responseColName , String ... variablesColNames ) { } } | return dataset ( table . numberColumn ( responseColName ) , AttributeType . NUMERIC , table . columns ( variablesColNames ) ) ; |
public class RandomGraphGenerator { /** * Create a new Graph which has the given graphName , size and dens .
* @ param graphName the graph ' s name .
* @ param size the graph ' s size .
* @ param dens the graph ' s dens .
* @ return the graph generated . */
public Graph generateRandomMMapGraph ( String graphNam... | Graph graph = null ; String dir = "graphs/MMap/" + graphName ; SerializationUtils . deleteMMapGraph ( dir ) ; graph = new Graph ( new MMapGraphStructure ( dir ) ) ; Random rand = new Random ( ) ; for ( int i = 0 ; i < size ; i ++ ) graph . addNode ( new Node ( i ) ) ; for ( int i = 0 ; i < size ; i ++ ) { for ( int j =... |
public class MoRefHandler { /** * Method to retrieve properties of a { @ link ManagedObjectReference }
* @ param entityMor { @ link ManagedObjectReference } of the entity
* @ param props Array of properties to be looked up
* @ return Map of the property name and its corresponding value
* @ throws InvalidPropert... | final HashMap < String , Object > retVal = new HashMap < > ( ) ; // Create PropertyFilterSpec using the PropertySpec and ObjectPec
PropertyFilterSpec [ ] propertyFilterSpecs = { new PropertyFilterSpecBuilder ( ) . propSet ( // Create Property Spec
new PropertySpecBuilder ( ) . all ( false ) . type ( entityMor . getType... |
public class DescribeEgressOnlyInternetGatewaysResult { /** * Information about the egress - only internet gateways .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setEgressOnlyInternetGateways ( java . util . Collection ) } or
* { @ link # withEgressOnly... | if ( this . egressOnlyInternetGateways == null ) { setEgressOnlyInternetGateways ( new com . amazonaws . internal . SdkInternalList < EgressOnlyInternetGateway > ( egressOnlyInternetGateways . length ) ) ; } for ( EgressOnlyInternetGateway ele : egressOnlyInternetGateways ) { this . egressOnlyInternetGateways . add ( e... |
public class RequestInfo { /** * < pre >
* Any data that was used to serve this request . For example , an encrypted
* stack trace that can be sent back to the service provider for debugging .
* < / pre >
* < code > string serving _ data = 2 ; < / code > */
public java . lang . String getServingData ( ) { } } | java . lang . Object ref = servingData_ ; if ( ref instanceof java . lang . String ) { return ( java . lang . String ) ref ; } else { com . google . protobuf . ByteString bs = ( com . google . protobuf . ByteString ) ref ; java . lang . String s = bs . toStringUtf8 ( ) ; servingData_ = s ; return s ; } |
public class Base64 { /** * Encodes a raw byte array into a BASE64 < code > String < / code > representation i accordance with RFC 2045.
* @ param sArr The bytes to convert . If < code > null < / code > or length 0 an empty array will be returned .
* @ param lineSep Optional " \ r \ n " after 76 characters , unless... | // Reuse char [ ] since we can ' t create a String incrementally anyway and StringBuffer / Builder would be slower .
return new String ( encodeToChar ( sArr , lineSep , urlSafe ) ) ; |
public class CloudWatch { static CloudWatch getInstance ( String contextPath , String hostName ) { } } | final String cloudWatchNamespace = Parameter . CLOUDWATCH_NAMESPACE . getValue ( ) ; if ( cloudWatchNamespace != null ) { assert contextPath != null ; assert hostName != null ; if ( cloudWatchNamespace . startsWith ( "AWS/" ) ) { // http : / / docs . aws . amazon . com / AmazonCloudWatch / latest / APIReference / API _... |
public class MainFrame { /** * This method is called from within the constructor to
* initialize the form .
* WARNING : Do NOT modify this code . The content of this method is
* always regenerated by the Form Editor . */
@ SuppressWarnings ( "unchecked" ) // < editor - fold defaultstate = " collapsed " desc = " G... | toolBar = new javax . swing . JToolBar ( ) ; settingsLoadDefaultsButton = new javax . swing . JButton ( ) ; settingsLoadButton = new javax . swing . JButton ( ) ; settingsSaveButton = new javax . swing . JButton ( ) ; toolBarSeparator1 = new javax . swing . JToolBar . Separator ( ) ; trackingStartButton = new javax . s... |
public class UsagePlanKeyMarshaller { /** * Marshall the given parameter object . */
public void marshall ( UsagePlanKey usagePlanKey , ProtocolMarshaller protocolMarshaller ) { } } | if ( usagePlanKey == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( usagePlanKey . getId ( ) , ID_BINDING ) ; protocolMarshaller . marshall ( usagePlanKey . getType ( ) , TYPE_BINDING ) ; protocolMarshaller . marshall ( usagePlanKey . getVa... |
public class RoaringBitmap { /** * Add the value to the container ( set the value to " true " ) , whether it already appears or not .
* @ param x integer value
* @ return true if the added int wasn ' t already contained in the bitmap . False otherwise . */
public boolean checkedAdd ( final int x ) { } } | final short hb = Util . highbits ( x ) ; final int i = highLowContainer . getIndex ( hb ) ; if ( i >= 0 ) { Container c = highLowContainer . getContainerAtIndex ( i ) ; int oldCard = c . getCardinality ( ) ; // we need to keep the newContainer if a switch between containers type
// occur , in order to get the new cardi... |
public class BarChartTileSkin { /** * * * * * * Resizing * * * * * */
private void updateChart ( ) { } } | Platform . runLater ( ( ) -> { if ( tile . isSortedData ( ) ) { tile . getBarChartItems ( ) . sort ( Comparator . comparing ( BarChartItem :: getValue ) . reversed ( ) ) ; } List < BarChartItem > items = tile . getBarChartItems ( ) ; int noOfItems = items . size ( ) ; if ( noOfItems == 0 ) return ; double maxValue = ti... |
public class ThreadLocalMappedDiagnosticContext { /** * Put a context value ( the < code > val < / code > parameter ) as identified with
* the < code > key < / code > parameter into the current thread ' s context map .
* Note that contrary to log4j , the < code > val < / code > parameter can be null .
* If the cu... | if ( key == null ) { throw new IllegalArgumentException ( "key cannot be null" ) ; } Map < String , String > map = inheritableThreadLocal . get ( ) ; if ( map == null ) { map = new HashMap < > ( ) ; inheritableThreadLocal . set ( map ) ; } map . put ( key , val ) ; |
public class HttpClientStore { /** * Initialize */
public synchronized void init ( ) { } } | httpClientFactoryEmbed = new AsyncHttpClientFactoryEmbed ( ) ; map . put ( HttpClientType . EMBED_FAST , httpClientFactoryEmbed . getFastClient ( ) ) ; map . put ( HttpClientType . EMBED_SLOW , httpClientFactoryEmbed . getSlowClient ( ) ) ; // custom default are also the embed one ; unless a change
map . put ( HttpClie... |
public class ReferenceCollectingCallback { /** * For each node , update the block stack and reference collection
* as appropriate . */
@ Override public void visit ( NodeTraversal t , Node n , Node parent ) { } } | if ( n . isName ( ) || n . isImportStar ( ) || ( n . isStringKey ( ) && ! n . hasChildren ( ) ) ) { if ( ( parent . isImportSpec ( ) && n != parent . getLastChild ( ) ) || ( parent . isExportSpec ( ) && n != parent . getFirstChild ( ) ) ) { // The n in ` import { n as x } ` or ` export { x as n } ` are not references ,... |
public class ApplicationDefinition { /** * Indicate whether or not this application tables to be implicitly created .
* @ return True if this application tables to be implicitly created . */
public boolean allowsAutoTables ( ) { } } | String optValue = getOption ( CommonDefs . AUTO_TABLES ) ; return optValue != null && optValue . equalsIgnoreCase ( "true" ) ; |
public class AmazonWorkMailClient { /** * Updates the primary email for a user , group , or resource . The current email is moved into the list of aliases ( or
* swapped between an existing alias and the current primary email ) , and the email provided in the input is promoted
* as the primary .
* @ param updateP... | request = beforeClientExecution ( request ) ; return executeUpdatePrimaryEmailAddress ( request ) ; |
public class EntityManagerImpl { /** * Find by primary key . Search for an entity of the specified class and
* primary key . If the entity instance is contained in the persistence
* context it is returned from there .
* @ param entityClass
* @ param primaryKey
* @ return the found entity instance or null if t... | checkClosed ( ) ; checkTransactionNeeded ( ) ; return getPersistenceDelegator ( ) . findById ( entityClass , primaryKey ) ; |
public class FeatureCacheTables { /** * Resize all caches and update the max cache size
* @ param maxCacheSize
* max cache size */
public void resize ( int maxCacheSize ) { } } | setMaxCacheSize ( maxCacheSize ) ; for ( FeatureCache cache : tableCache . values ( ) ) { cache . resize ( maxCacheSize ) ; } |
public class TimeUnitFormat { /** * Set the format used for formatting or parsing . Passing null is equivalent to passing
* { @ link NumberFormat # getNumberInstance ( ULocale ) } .
* @ param format the number formatter .
* @ return this , for chaining .
* @ deprecated ICU 53 see { @ link MeasureFormat } . */
@... | if ( format == this . format ) { return this ; } if ( format == null ) { if ( locale == null ) { isReady = false ; mf = mf . withLocale ( ULocale . getDefault ( ) ) ; } else { this . format = NumberFormat . getNumberInstance ( locale ) ; mf = mf . withNumberFormat ( this . format ) ; } } else { this . format = format ;... |
public class Controller { /** * stops the resync thread pool firstly , then stop the reflector */
public void stop ( ) { } } | reflector . stop ( ) ; reflectorFuture . cancel ( true ) ; reflectExecutor . shutdown ( ) ; if ( resyncFuture != null ) { resyncFuture . cancel ( true ) ; resyncExecutor . shutdown ( ) ; } |
public class AsciiDocExporter { /** * Method that is called to write container properties to AsciiDoc document .
* @ param properties container properties as a map */
protected void writeContainerProperties ( Map < String , String > properties ) throws IOException { } } | if ( properties . size ( ) > 0 ) { writer . append ( "[cols=\"2*\", options=\"header\"]" ) . append ( NEW_LINE ) ; writer . append ( "." ) . append ( this . resourceBundle . getString ( "asciidoc.reporter.properties" ) ) . append ( NEW_LINE ) ; writer . append ( "|===" ) . append ( NEW_LINE ) . append ( NEW_LINE ) ; wr... |
public class UpdateGatewayGroupRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( UpdateGatewayGroupRequest updateGatewayGroupRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( updateGatewayGroupRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateGatewayGroupRequest . getGatewayGroupArn ( ) , GATEWAYGROUPARN_BINDING ) ; protocolMarshaller . marshall ( updateGatewayGroupRequest . getName ( ) , NAME... |
public class ObjectOutputStream { /** * Writes a collection of field descriptors ( name , type name , etc ) for the
* class descriptor { @ code classDesc } ( an
* { @ code ObjectStreamClass } )
* @ param classDesc
* The class descriptor ( an { @ code ObjectStreamClass } )
* for which to write field informatio... | Class < ? > loadedClass = classDesc . forClass ( ) ; ObjectStreamField [ ] fields = null ; int fieldCount = 0 ; // The fields of String are not needed since Strings are treated as
// primitive types
if ( ! externalizable && loadedClass != ObjectStreamClass . STRINGCLASS ) { fields = classDesc . fields ( ) ; fieldCount ... |
public class NetworkMonitor { /** * Checks if currently connected Access Point is either rogue or incapable
* of routing packet
* @ param ipAddress
* Any valid IP addresses will work to check if the device is
* connected to properly working AP
* @ param port
* Port number bound with ipAddress parameter
* ... | SocketChannel socketChannel = null ; try { socketChannel = SocketChannel . open ( ) ; socketChannel . connect ( new InetSocketAddress ( ipAddress , port ) ) ; } catch ( IOException e ) { Log . d ( TAG , "Current Wifi is stupid!!! by IOException" ) ; return true ; } catch ( UnresolvedAddressException e ) { Log . d ( TAG... |
public class GeneratorXMLDatabaseConnection { /** * Process a ' static ' cluster Element in the XML stream .
* @ param gen Generator
* @ param cur Current document nod */
private void processElementStatic ( GeneratorMain gen , Node cur ) { } } | String name = ( ( Element ) cur ) . getAttribute ( ATTR_NAME ) ; if ( name == null ) { throw new AbortException ( "No cluster name given in specification file." ) ; } ArrayList < double [ ] > points = new ArrayList < > ( ) ; // TODO : check for unknown attributes .
XMLNodeIterator iter = new XMLNodeIterator ( cur . get... |
public class ByteBuffer { /** * Return a hexidecimal String representation of the current buffer with each byte
* displayed in a 2 character hexidecimal format . Useful for debugging .
* Convert a ByteBuffer to a String with a hexidecimal format .
* @ param offset
* @ param length
* @ return The string in hex... | // is offset , length valid for the current size ( ) of our internal byte [ ]
checkOffsetLength ( size ( ) , offset , length ) ; // if length is 0 , return an empty string
if ( length == 0 || size ( ) == 0 ) { return "" ; } StringBuilder s = new StringBuilder ( length * 2 ) ; int end = offset + length ; for ( int i = o... |
public class PhotosApi { /** * Set permissions for a photo .
* < br >
* This method requires authentication with ' write ' permission .
* @ param photoId Required . The id of the photo to set permissions for .
* @ param isPublic Required . True to set the photo to public , false to set it to private .
* @ par... | JinxUtils . validateParams ( photoId , permComment , permAddMeta ) ; Map < String , String > params = new TreeMap < > ( ) ; params . put ( "method" , "flickr.photos.setPerms" ) ; params . put ( "photo_id" , photoId ) ; params . put ( "is_public" , isPublic ? "1" : "0" ) ; params . put ( "is_friend" , isFriend ? "1" : "... |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link ContentType }
* { @ code > } */
@ XmlElementDecl ( namespace = "http://www.w3.org/2005/Atom" , name = "content" , scope = EntryType . class ) public JAXBElement < ContentType > createEntryTypeContent ( ContentType va... | return new JAXBElement < ContentType > ( ENTRY_TYPE_CONTENT_QNAME , ContentType . class , EntryType . class , value ) ; |
public class ConnectionParam { /** * Sets whether or not the outgoing connections should use the proxy set .
* < strong > Note : < / strong > The call to this method has no effect if set to use the proxy but the proxy was not previously
* configured .
* @ param useProxyChain { @ code true } if outgoing connection... | if ( useProxyChain && ( getProxyChainName ( ) == null || getProxyChainName ( ) . isEmpty ( ) ) ) { return ; } this . useProxyChain = useProxyChain ; getConfig ( ) . setProperty ( USE_PROXY_CHAIN_KEY , this . useProxyChain ) ; |
public class CsvFileExtensions { /** * Formats a file that has in every line one input - data into a csv - file .
* @ param input
* The input - file to format . The current format from the file is every data in a
* line .
* @ param output
* The file where the formatted data should be inserted .
* @ param en... | final List < String > list = readLinesInList ( input , "UTF-8" ) ; final String sb = formatListToString ( list ) ; WriteFileExtensions . writeStringToFile ( output , sb , encoding ) ; |
public class TorchService { /** * This is the main method that will initialize the Torch .
* We recommend to static import this method , so that you can only call torch ( ) to begin .
* @ return An instance of { @ link Torch } . */
public static Torch torch ( ) { } } | if ( ! isLoaded ( ) ) { throw new IllegalStateException ( "Factory is not loaded!" ) ; } LinkedList < Torch > stack = STACK . get ( ) ; if ( stack . isEmpty ( ) ) { stack . add ( factoryInstance . begin ( ) ) ; } return stack . getLast ( ) ; |
public class EclipseOptions { /** * Use an Eclipse Target file to provision bundles from , the cache folder can be used to specify
* a location where the resolve result of the target is stored ( e . g . if the target is based on
* software - sites ) the cache will be refreshed if the sequenceNumber changes but in n... | return new TargetResolver ( targetDefinition , cacheFolder ) ; |
public class TableId { /** * Creates a table identity given project ' s , dataset ' s and table ' s user - defined ids . */
public static TableId of ( String project , String dataset , String table ) { } } | return new TableId ( checkNotNull ( project ) , checkNotNull ( dataset ) , checkNotNull ( table ) ) ; |
public class DirectoryLookupService { /** * Remove the NotificationHandler from the Service .
* @ param serviceName
* the service name .
* @ param handler
* the NotificationHandler for the service . */
public void removeNotificationHandler ( String serviceName , NotificationHandler handler ) { } } | ServiceInstanceUtils . validateServiceName ( serviceName ) ; if ( handler == null ) { throw new ServiceException ( ErrorCode . SERVICE_DIRECTORY_NULL_ARGUMENT_ERROR , ErrorCode . SERVICE_DIRECTORY_NULL_ARGUMENT_ERROR . getMessageTemplate ( ) , "NotificationHandler" ) ; } synchronized ( notificationHandlers ) { if ( not... |
public class ColorPanel { /** * Update the render setting */
private void updateRender ( ) { } } | if ( inherit . isSelected ( ) ) { emitter . usePoints = Particle . INHERIT_POINTS ; oriented . setEnabled ( true ) ; } if ( quads . isSelected ( ) ) { emitter . usePoints = Particle . USE_QUADS ; oriented . setEnabled ( true ) ; } if ( points . isSelected ( ) ) { emitter . usePoints = Particle . USE_POINTS ; oriented .... |
public class BeanPath { /** * Create a new Set typed path
* @ param < A >
* @ param property property name
* @ param type property type
* @ return property path */
@ SuppressWarnings ( "unchecked" ) protected < A , E extends SimpleExpression < ? super A > > SetPath < A , E > createSet ( String property , Class ... | return add ( new SetPath < A , E > ( type , ( Class ) queryType , forProperty ( property ) , inits ) ) ; |
public class CmsModule { /** * Checks if this module depends on another given module ,
* will return the dependency , or < code > null < / code > if no dependency was found . < p >
* @ param module the other module to check against
* @ return the dependency , or null if no dependency was found */
public CmsModule... | CmsModuleDependency otherDepdendency = new CmsModuleDependency ( module . getName ( ) , module . getVersion ( ) ) ; // loop through all the dependencies
for ( int i = 0 ; i < m_dependencies . size ( ) ; i ++ ) { CmsModuleDependency dependency = m_dependencies . get ( i ) ; if ( dependency . dependesOn ( otherDepdendenc... |
public class InsufficientOperationalNodesException { /** * Computes A - B
* @ param listA
* @ param listB
* @ return */
private static List < Node > difference ( List < Node > listA , List < Node > listB ) { } } | if ( listA != null && listB != null ) listA . removeAll ( listB ) ; return listA ; |
public class AbstractMappedClassFieldObserver { /** * Process an object .
* @ param obj an object which is an instance of a mapped class , must not be null
* @ param field a field where the object has been found , it can be null for first call
* @ param customFieldProcessor a processor for custom fields , it can ... | JBBPUtils . assertNotNull ( obj , "Object must not be null" ) ; Field [ ] orderedFields = null ; final Map < Class < ? > , Field [ ] > fieldz ; if ( cachedClasses == null ) { fieldz = new HashMap < > ( ) ; cachedClasses = fieldz ; } else { fieldz = cachedClasses ; synchronized ( cachedClasses ) { orderedFields = fieldz... |
public class CmsAttributeHandler { /** * Returns the drag and drop handler . < p >
* @ return the drag and drop handler */
public CmsDNDHandler getDNDHandler ( ) { } } | if ( m_dndHandler == null ) { m_dndHandler = new CmsDNDHandler ( new CmsAttributeDNDController ( ) ) ; m_dndHandler . setOrientation ( Orientation . VERTICAL ) ; m_dndHandler . setScrollEnabled ( true ) ; m_dndHandler . setScrollElement ( m_scrollElement ) ; } return m_dndHandler ; |
public class ULocale { /** * displayLocaleID is canonical , localeID need not be since parsing will fix this . */
private static String getDisplayScriptInternal ( ULocale locale , ULocale displayLocale ) { } } | return LocaleDisplayNames . getInstance ( displayLocale ) . scriptDisplayName ( locale . getScript ( ) ) ; |
public class AttList { /** * Look up the index of an attribute by raw XML 1.0 name .
* @ param qName The qualified ( prefixed ) name .
* @ return The index of the attribute , or - 1 if it does not
* appear in the list . */
public int getIndex ( String qName ) { } } | for ( int i = m_attrs . getLength ( ) - 1 ; i >= 0 ; -- i ) { Node a = m_attrs . item ( i ) ; if ( a . getNodeName ( ) . equals ( qName ) ) return i ; } return - 1 ; |
public class SshConnectionImpl { /** * This version takes a command to run , and then returns a wrapper instance
* that exposes all the standard state of the channel ( stdin , stdout ,
* stderr , exit status , etc ) . Channel connection is established if establishConnection
* is true .
* @ param command the com... | if ( ! isConnected ( ) ) { throw new IOException ( "Not connected!" ) ; } try { ChannelExec channel = ( ChannelExec ) connectSession . openChannel ( "exec" ) ; channel . setCommand ( command ) ; if ( establishConnection ) { channel . connect ( ) ; } return channel ; } catch ( JSchException ex ) { throw new SshException... |
public class HttpServiceTracker { /** * Create the servlet .
* The SERVLET _ CLASS property must be supplied .
* @ param alias
* @ param dictionary
* @ return */
public Servlet makeServlet ( String alias , Dictionary < String , String > dictionary ) { } } | String servletClass = dictionary . get ( BundleConstants . SERVICE_CLASS ) ; return ( Servlet ) ClassServiceUtility . getClassService ( ) . makeObjectFromClassName ( servletClass ) ; |
public class StylesContainer { /** * Write styles to styles . xml / automatic - styles
* @ param util an util
* @ param appendable the destination
* @ throws IOException if an I / O error occurs */
public void writeStylesAutomaticStyles ( final XMLUtil util , final Appendable appendable ) throws IOException { } } | final Iterable < ObjectStyle > styles = this . objectStylesContainer . getValues ( Dest . STYLES_AUTOMATIC_STYLES ) ; for ( final ObjectStyle style : styles ) assert style . isHidden ( ) : style . toString ( ) ; this . write ( styles , util , appendable ) ; |
public class ImageManager { /** * Loads ( and caches ) the specified image from the resource manager , obtaining the image from
* the supplied resource set .
* < p > Additionally the image is optimized for display in the current graphics
* configuration . Consider using { @ link # getMirage ( ImageKey ) } instead... | return getPreparedImage ( rset , path , null ) ; |
public class ClassFileWriter { /** * Generate code to load the given long on stack .
* @ param k the constant */
public void addPush ( long k ) { } } | int ik = ( int ) k ; if ( ik == k ) { addPush ( ik ) ; add ( ByteCode . I2L ) ; } else { addLoadConstant ( k ) ; } |
public class ApiOvhMe { /** * Delete this organisation
* REST : DELETE / me / ipOrganisation / { organisationId }
* @ param organisationId [ required ] */
public void ipOrganisation_organisationId_DELETE ( String organisationId ) throws IOException { } } | String qPath = "/me/ipOrganisation/{organisationId}" ; StringBuilder sb = path ( qPath , organisationId ) ; exec ( qPath , "DELETE" , sb . toString ( ) , null ) ; |
public class AddressResolverGroup { /** * Closes all { @ link NameResolver } s created by this group . */
@ Override @ SuppressWarnings ( { } } | "unchecked" , "SuspiciousToArrayCall" } ) public void close ( ) { final AddressResolver < T > [ ] rArray ; synchronized ( resolvers ) { rArray = ( AddressResolver < T > [ ] ) resolvers . values ( ) . toArray ( new AddressResolver [ 0 ] ) ; resolvers . clear ( ) ; } for ( AddressResolver < T > r : rArray ) { try { r . c... |
public class LToCharFunctionBuilder { /** * Adds full new case for the argument that are of specific classes ( matched by instanceOf , null is a wildcard ) . */
@ Nonnull public < V extends T > LToCharFunctionBuilder < T > aCase ( Class < V > argC , LToCharFunction < V > function ) { } } | PartialCaseWithCharProduct . The pc = partialCaseFactoryMethod ( a -> ( argC == null || argC . isInstance ( a ) ) ) ; pc . evaluate ( function ) ; return self ( ) ; |
public class MetadataUtils { /** * Populate column and super column maps .
* @ param m
* the m
* @ param columnNameToFieldMap
* the column name to field map
* @ param superColumnNameToFieldMap
* the super column name to field map */
public static void populateColumnAndSuperColumnMaps ( EntityMetadata m , Ma... | getEmbeddableType ( m , columnNameToFieldMap , superColumnNameToFieldMap , kunderaMetadata ) ; |
public class ListCrawlersRequest { /** * Specifies to return only these tagged resources .
* @ param tags
* Specifies to return only these tagged resources .
* @ return Returns a reference to this object so that method calls can be chained together . */
public ListCrawlersRequest withTags ( java . util . Map < St... | setTags ( tags ) ; return this ; |
public class HttpUtils { /** * Get a default profile IRI from the syntax and / or identifier .
* @ param syntax the RDF syntax
* @ param identifier the resource identifier
* @ param defaultJsonLdProfile a user - supplied default
* @ return a profile IRI usable by the output streamer */
public static IRI getDefa... | if ( RDFA . equals ( syntax ) ) { return identifier ; } else if ( defaultJsonLdProfile != null ) { return rdf . createIRI ( defaultJsonLdProfile ) ; } return compacted ; |
public class FSNamesystem { /** * For each block in the name - node verify whether it belongs to any file ,
* over or under replicated . Place it into the respective queue . */
protected void processMisReplicatedBlocks ( ) { } } | writeLock ( ) ; try { if ( this . initializedReplQueues ) { return ; } String logPrefix = "Processing mis-replicated blocks: " ; long nrInvalid = 0 ; // clear queues
neededReplications . clear ( ) ; overReplicatedBlocks . clear ( ) ; raidEncodingTasks . clear ( ) ; int totalBlocks = blocksMap . size ( ) ; // shutdown i... |
public class Bits { /** * Exclude x from this set . */
public void excl ( int x ) { } } | Assert . check ( currentState != BitsState . UNKNOWN ) ; Assert . check ( x >= 0 ) ; sizeTo ( ( x >>> wordshift ) + 1 ) ; bits [ x >>> wordshift ] = bits [ x >>> wordshift ] & ~ ( 1 << ( x & wordmask ) ) ; currentState = BitsState . NORMAL ; |
public class DecimalWithUoMType { /** * The localized string and the internal string value are equal . So the
* internal value can be evaluated directly .
* @ param _ values values to evaluate
* @ return evaluated big decimal value with unit of measure
* @ throws SQLException on error */
protected DecimalWithUo... | final DecimalWithUoM ret ; if ( _values == null || _values . length < 2 ) { ret = null ; } else { final BigDecimal value ; if ( _values [ 0 ] instanceof String && ( ( String ) _values [ 0 ] ) . length ( ) > 0 ) { try { value = DecimalType . parseLocalized ( ( String ) _values [ 0 ] ) ; } catch ( final EFapsException e ... |
public class FastMath { /** * Get the whole number that is the nearest to x , or the even one if x is exactly half way between two integers .
* @ param x number from which nearest whole number is requested
* @ return a double number r such that r is an integer r - 0.5 < = x < = r + 0.5 */
public static double rint ... | double y = floor ( x ) ; double d = x - y ; if ( d > 0.5 ) { if ( y == - 1.0 ) { return - 0.0 ; // Preserve sign of operand
} return y + 1.0 ; } if ( d < 0.5 ) { return y ; } /* half way , round to even */
long z = ( long ) y ; return ( z & 1 ) == 0 ? y : y + 1.0 ; |
public class SparseBooleanArray { /** * Puts a key / value pair into the array , optimizing for the case where
* the key is greater than all existing keys in the array . */
public void append ( int key , boolean value ) { } } | if ( mSize != 0 && key <= mKeys [ mSize - 1 ] ) { put ( key , value ) ; return ; } mKeys = GrowingArrayUtils . append ( mKeys , mSize , key ) ; mValues = GrowingArrayUtils . append ( mValues , mSize , value ) ; mSize ++ ; |
public class AbstractListBinder { /** * Decorates an object instance if the < code > closure < / code > value is an instance of { @ link Closure } .
* @ param closure
* the closure which is used to decorate the object .
* @ param object
* the value to decorate
* @ return the decorated instance if < code > clo... | if ( closure instanceof Closure ) { return ( ( Closure ) closure ) . call ( object ) ; } return closure ; |
public class TunnelCollectionResource { /** * Retrieves the tunnel having the given UUID , returning a TunnelResource
* representing that tunnel . If no such tunnel exists , an exception will be
* thrown .
* @ param tunnelUUID
* The UUID of the tunnel to return via a TunnelResource .
* @ return
* A TunnelRe... | Map < String , UserTunnel > tunnels = session . getTunnels ( ) ; // Pull tunnel with given UUID
final UserTunnel tunnel = tunnels . get ( tunnelUUID ) ; if ( tunnel == null ) throw new GuacamoleResourceNotFoundException ( "No such tunnel." ) ; // Return corresponding tunnel resource
return tunnelResourceFactory . creat... |
public class FxCopRuleSet { /** * Returns the specified rule if it exists
* @ param category the rule category
* @ param checkId the id of the rule
* @ return the rule ; null otherwise */
public FxCopRule getRule ( final String category , final String checkId ) { } } | String key = getRuleKey ( category , checkId ) ; FxCopRule rule = null ; if ( rules . containsKey ( key ) ) { rule = rules . get ( key ) ; } return rule ; |
public class TransactionScope { /** * Returns the implementation for the active transaction , or null if there
* is no active transaction .
* @ throws Exception thrown by createTxn or reuseTxn */
public Txn getTxn ( ) throws Exception { } } | mLock . lock ( ) ; try { checkClosed ( ) ; return mActive == null ? null : mActive . getTxn ( ) ; } finally { mLock . unlock ( ) ; } |
public class CacheEntry { /** * This method is called by the Cache to copy caching metadata
* provided in a EntryInfo into this CacheEntry . It copies : < ul >
* < li > id < li > timeout < li > expiration time < li > priority < li > template ( s )
* < li > data id ( s ) < li > sharing policy ( included for forwar... | entryInfo . lock ( ) ; if ( ! entryInfo . wasIdSet ( ) ) { throw new IllegalStateException ( "id was not set on entryInfo" ) ; } id = entryInfo . id ; timeLimit = entryInfo . timeLimit ; inactivity = entryInfo . inactivity ; expirationTime = entryInfo . expirationTime ; validatorExpirationTime = entryInfo . validatorEx... |
public class TaskAuditQueryCriteriaUtil { /** * Implementation specific methods - - - - - */
@ Override protected < R , T > Predicate implSpecificCreatePredicateFromSingleCriteria ( CriteriaQuery < R > query , CriteriaBuilder builder , Class queryType , QueryCriteria criteria , QueryWhere queryWhere ) { } } | throw new IllegalStateException ( "List id " + criteria . getListId ( ) + " is not supported for queries on " + queryType . getSimpleName ( ) + "." ) ; |
public class FeedItemPolicySummary { /** * Sets the validationErrors value for this FeedItemPolicySummary .
* @ param validationErrors * List of error codes specifying what errors were found during
* validation . */
public void setValidationErrors ( com . google . api . ads . adwords . axis . v201809 . cm . FeedIte... | this . validationErrors = validationErrors ; |
public class GVRSceneObject { /** * Attach a component to this scene object .
* Each scene object has a list of components that may
* be attached to it . Only one component of a particular type
* can be attached . Components are retrieved based on their type .
* @ return true if component is attached , false if... | if ( component . getNative ( ) != 0 ) { NativeSceneObject . attachComponent ( getNative ( ) , component . getNative ( ) ) ; } synchronized ( mComponents ) { long type = component . getType ( ) ; if ( ! mComponents . containsKey ( type ) ) { mComponents . put ( type , component ) ; component . setOwnerObject ( this ) ; ... |
public class Node { /** * Add all children to the front of this node .
* @ param children first of a list of sibling nodes who have no parent .
* NOTE : Usually you would get this argument from a removeChildren ( ) call .
* A single detached node will not work because its sibling pointers will not be
* correctl... | if ( children == null ) { return ; // removeChildren ( ) returns null when there are none
} // NOTE : If there is only one sibling , its previous pointer must point to itself .
// Null indicates a fully detached node .
checkNotNull ( children . previous , children ) ; for ( Node child = children ; child != null ; child... |
public class OAuth2StoreBuilder { /** * Add an additional parameter which will be included in the token request
* @ param key additional parameter key
* @ param value additional parameter value
* @ return OAuth2StoreBuilder ( this ) */
public OAuth2StoreBuilder addAdditionalParameter ( String key , String value )... | oAuth2Store . getAdditionalParameters ( ) . put ( key , value ) ; return this ; |
public class AbstractEntranceProcessingItem { /** * Set the output stream of this EntranceProcessingItem .
* An EntranceProcessingItem should have only 1 single output stream and
* should not be re - assigned .
* @ return this EntranceProcessingItem */
public EntranceProcessingItem setOutputStream ( Stream output... | if ( this . outputStream != null && this . outputStream != outputStream ) { throw new IllegalStateException ( "Cannot overwrite output stream of EntranceProcessingItem" ) ; } else this . outputStream = outputStream ; return this ; |
public class AttributeValue { /** * A set of binary attributes .
* Returns a reference to this object so that method calls can be chained together .
* @ param bS A set of binary attributes .
* @ return A reference to this updated object so that method calls can be chained
* together . */
public AttributeValue w... | if ( getBS ( ) == null ) setBS ( new java . util . ArrayList < java . nio . ByteBuffer > ( bS . length ) ) ; for ( java . nio . ByteBuffer value : bS ) { getBS ( ) . add ( value ) ; } return this ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.