signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class AmazonGlacierClient { /** * This operation initiates a multipart upload . Amazon Glacier creates a multipart upload resource and returns its * ID in the response . The multipart upload ID is used in subsequent requests to upload parts of an archive ( see * < a > UploadMultipartPart < / a > ) . * When...
request = beforeClientExecution ( request ) ; return executeInitiateMultipartUpload ( request ) ;
public class Batch { /** * / * ( non - Javadoc ) * @ see com . googlecode . batchfb . Batcher # paged ( java . lang . String , java . lang . Class , com . googlecode . batchfb . Param [ ] ) */ @ Override public < T > PagedLater < T > paged ( String object , Class < T > type , Param ... params ) { } }
if ( ! object . contains ( "/" ) ) throw new IllegalArgumentException ( "You can only use paged() for connection requests, eg me/friends" ) ; // For example if type is User . class , this will produce Paged < User > JavaType pagedType = mapper . getTypeFactory ( ) . constructParametricType ( Paged . class , mapper . ge...
public class SingleInstanceHealth { /** * Represents the causes , which provide more information about the current health status . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setCauses ( java . util . Collection ) } or { @ link # withCauses ( java . util ...
if ( this . causes == null ) { setCauses ( new com . amazonaws . internal . SdkInternalList < String > ( causes . length ) ) ; } for ( String ele : causes ) { this . causes . add ( ele ) ; } return this ;
public class DatePicker { /** * zInternalSetDateTextField , This is called whenever we need to programmatically change the * date text field . The purpose of this function is to make sure that text field change events * only occur once per programmatic text change , instead of occurring twice . The default * beha...
skipTextFieldChangedFunctionWhileTrue = true ; dateTextField . setText ( text ) ; skipTextFieldChangedFunctionWhileTrue = false ; zEventTextFieldChanged ( ) ;
public class MoreStringUtil { /** * 判断字符串是否以字母开头 * 如果字符串为Null或空 , 返回false */ public static boolean startWith ( @ Nullable CharSequence s , char c ) { } }
if ( StringUtils . isEmpty ( s ) ) { return false ; } return s . charAt ( 0 ) == c ;
public class SingleDbJDBCConnection { /** * { @ inheritDoc } */ @ Override protected int updatePropertyByIdentifier ( int version , int type , String cid ) throws SQLException , InvalidItemStateException , RepositoryException { } }
if ( updateProperty == null ) { updateProperty = dbConnection . prepareStatement ( UPDATE_PROPERTY ) ; } else { updateProperty . clearParameters ( ) ; } updateProperty . setInt ( 1 , version ) ; updateProperty . setInt ( 2 , type ) ; updateProperty . setString ( 3 , cid ) ; return executeUpdate ( updateProperty , TYPE_...
public class dnssoarec { /** * Use this API to add dnssoarec resources . */ public static base_responses add ( nitro_service client , dnssoarec resources [ ] ) throws Exception { } }
base_responses result = null ; if ( resources != null && resources . length > 0 ) { dnssoarec addresources [ ] = new dnssoarec [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new dnssoarec ( ) ; addresources [ i ] . domain = resources [ i ] . domain ; addresources [ i ]...
public class TcpListener { /** * ( non - Javadoc ) * @ see net . timewalker . ffmq4 . utils . concurrent . SynchronizableThread # run ( ) */ @ Override public void run ( ) { } }
try { log . debug ( "Waiting for clients [" + getName ( ) + "]" ) ; while ( ! stopRequired ) { Socket clientSocket = serverSocket . accept ( ) ; // Enforce listener capacity int activeClients = getActiveClients ( ) ; if ( activeClients >= listenerCapacity ) { log . warn ( "Listener is full (max=" + listenerCapacity + "...
public class ElCalculator { /** * 运用运算符ASCII码 - 40做索引的运算符优先级 */ public Object eval ( String expression ) { } }
expression = transform ( expression ) ; Object result = calculate ( expression ) ; return result ;
public class Base { /** * Supports iterating the children elements in some generic processor or browser * All defined children will be listed , even if they have no value on this instance * Note that the actual content of primitive or xhtml elements is not iterated explicitly . * To find these , the processing co...
List < Property > result = new ArrayList < Property > ( ) ; listChildren ( result ) ; return result ;
public class A6Record { /** * Converts rdata to a String */ String rrToString ( ) { } }
StringBuffer sb = new StringBuffer ( ) ; sb . append ( prefixBits ) ; if ( suffix != null ) { sb . append ( " " ) ; sb . append ( suffix . getHostAddress ( ) ) ; } if ( prefix != null ) { sb . append ( " " ) ; sb . append ( prefix ) ; } return sb . toString ( ) ;
public class LObjDblConsumerBuilder { /** * One of ways of creating builder . This is possibly the least verbose way where compiler should be able to guess the generic parameters . */ @ Nonnull public static < T > LObjDblConsumer < T > objDblConsumerFrom ( Consumer < LObjDblConsumerBuilder < T > > buildingFunction ) { ...
LObjDblConsumerBuilder builder = new LObjDblConsumerBuilder ( ) ; buildingFunction . accept ( builder ) ; return builder . build ( ) ;
public class CouchbaseLiteHttpClientFactory { /** * This is a convenience method to allow couchbase lite to connect to servers * that use self - signed SSL certs . * * DO NOT USE THIS IN PRODUCTION * * For more information , see : * https : / / github . com / couchbase / couchbase - lite - java - core / pull / ...
// SSLSocketFactory that bypasses certificate verification . try { setSSLSocketFactory ( selfSignedSSLSocketFactory ( ) ) ; } catch ( GeneralSecurityException e ) { throw new RuntimeException ( e ) ; } // HostnameVerifier that bypasses hotname verification setHostnameVerifier ( ignoreHostnameVerifier ( ) ) ;
public class BDAImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setData ( byte [ ] newData ) { } }
byte [ ] oldData = data ; data = newData ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . BDA__DATA , oldData , data ) ) ;
public class DummyMemcachedSessionService { /** * Store the provided session in memcached if the session was modified * or if the session needs to be relocated . * @ param session * the session to save * @ param sessionRelocationRequired * specifies , if the session id was changed due to a memcached failover ...
final MemcachedBackupSession session = _manager . getSessionInternal ( sessionId ) ; if ( session == null ) { if ( _log . isDebugEnabled ( ) ) _log . debug ( "No session found in session map for " + sessionId ) ; return new SimpleFuture < BackupResult > ( BackupResult . SKIPPED ) ; } _log . info ( "Serializing session ...
public class NaaccrXmlUtils { /** * Returns the NAACCR format of the given XML file . * @ param xmlFile provided data file * @ return the NAACCR format , null if it cannot be determined */ public static String getFormatFromXmlFile ( File xmlFile ) { } }
if ( xmlFile == null || ! xmlFile . exists ( ) ) return null ; try ( Reader reader = createReader ( xmlFile ) ) { return getFormatFromXmlReader ( reader ) ; } catch ( IOException | RuntimeException e ) { return null ; }
public class Face { /** * Gets the i - th half - edge associated with the face . * @ param i * the half - edge index , in the range 0-2. * @ return the half - edge */ public HalfEdge getEdge ( int i ) { } }
HalfEdge he = he0 ; while ( i > 0 ) { he = he . next ; i -- ; } while ( i < 0 ) { he = he . prev ; i ++ ; } return he ;
public class PropertyBuilder { /** * Build the signature . * @ param node the XML element that specifies which components to document * @ param propertyDocTree the content tree to which the documentation will be added */ public void buildSignature ( XMLNode node , Content propertyDocTree ) { } }
propertyDocTree . addContent ( writer . getSignature ( currentProperty ) ) ;
public class SpatialiteWKBReader { /** * Reads a { @ link Geometry } in binary WKB format from an { @ link InStream } . * @ param is the stream to read from * @ return the Geometry read * @ throws IOException if the underlying stream creates an error * @ throws ParseException if the WKB is ill - formed */ publi...
dis . setInStream ( is ) ; Geometry g = readSpatialiteGeometry ( ) ; return g ;
public class AbstractAmazonSQSAsync { /** * Simplified method form for invoking the RemovePermission operation . * @ see # removePermissionAsync ( RemovePermissionRequest ) */ @ Override public java . util . concurrent . Future < RemovePermissionResult > removePermissionAsync ( String queueUrl , String label ) { } }
return removePermissionAsync ( new RemovePermissionRequest ( ) . withQueueUrl ( queueUrl ) . withLabel ( label ) ) ;
public class RegexMatchSet { /** * Contains an array of < a > RegexMatchTuple < / a > objects . Each < code > RegexMatchTuple < / code > object contains : * < ul > * < li > * The part of a web request that you want AWS WAF to inspect , such as a query string or the value of the * < code > User - Agent < / code ...
if ( regexMatchTuples == null ) { this . regexMatchTuples = null ; return ; } this . regexMatchTuples = new java . util . ArrayList < RegexMatchTuple > ( regexMatchTuples ) ;
public class CmsPatternPanelMonthlyController { /** * Set the week day the event should take place . * @ param dayString the day as string . */ public void setWeekDay ( String dayString ) { } }
final WeekDay day = WeekDay . valueOf ( dayString ) ; if ( m_model . getWeekDay ( ) != day ) { removeExceptionsOnChange ( new Command ( ) { public void execute ( ) { m_model . setWeekDay ( day ) ; onValueChange ( ) ; } } ) ; }
public class UserAccountHelper { /** * Returns the collection of attributes that the specified currentUser can edit . * @ param currentUser * @ return */ public List < Preference > getEditableUserAttributes ( IPerson currentUser ) { } }
EntityIdentifier ei = currentUser . getEntityIdentifier ( ) ; IAuthorizationPrincipal ap = AuthorizationServiceFacade . instance ( ) . newPrincipal ( ei . getKey ( ) , ei . getType ( ) ) ; List < Preference > allowedAttributes = new ArrayList < Preference > ( ) ; for ( Preference attr : accountEditAttributes ) { if ( a...
public class BasicTagList { /** * Returns a tag list containing the union of { @ code t1 } and { @ code t2 } . * If there is a conflict with tag keys , the tag from { @ code t2 } will be * used . */ public static BasicTagList concat ( TagList t1 , Tag ... t2 ) { } }
return new BasicTagList ( Iterables . concat ( t1 , Arrays . asList ( t2 ) ) ) ;
public class InternalXtypeParser { /** * InternalXtype . g : 769:1 : ruleQualifiedName returns [ AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken ( ) ] : ( this _ ValidID _ 0 = ruleValidID ( kw = ' . ' this _ ValidID _ 2 = ruleValidID ) * ) ; */ public final AntlrDatatypeRuleToken ruleQualifiedName ( ) throw...
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken ( ) ; Token kw = null ; AntlrDatatypeRuleToken this_ValidID_0 = null ; AntlrDatatypeRuleToken this_ValidID_2 = null ; enterRule ( ) ; try { // InternalXtype . g : 775:2 : ( ( this _ ValidID _ 0 = ruleValidID ( kw = ' . ' this _ ValidID _ 2 = ruleValidID ) * ) ...
public class DefaultWhenFileSystem { /** * Truncate the file represented by { @ code path } to length { @ code len } in bytes , asynchronously . * The operation will fail if the file does not exist or { @ code len } is less than { @ code zero } . * @ param path the path to the file * @ param len the length to tru...
return adapter . toPromise ( handler -> vertx . fileSystem ( ) . truncate ( path , len , handler ) ) ;
public class ActionResult { /** * Sets the result value of the action . * @ param actionId the new action id * @ param resultValue the new result value of the action */ public void setResultValue ( String actionId , Object resultValue ) { } }
if ( actionId == null || ! actionId . contains ( ActivityContext . ID_SEPARATOR ) ) { this . actionId = actionId ; this . resultValue = resultValue ; } else { String [ ] ids = StringUtils . tokenize ( actionId , ActivityContext . ID_SEPARATOR , true ) ; if ( ids . length == 1 ) { this . actionId = null ; this . resultV...
public class UnicodeFormatter { /** * 字符串转换为int , 避免运行时异常 * @ param str 待处理字符串 * @ param defaultVal 默认值 * @ return 转换失败返回指定默认值 */ private static int toInt ( String str , int defaultVal ) { } }
try { return Integer . parseInt ( str . trim ( ) ) ; } catch ( Exception e ) { return defaultVal ; }
public class CliFrontend { /** * Builds command line options for the info action . * @ return Command line options for the info action . */ static Options getInfoOptions ( Options options ) { } }
options = getProgramSpecificOptions ( options ) ; options = getJobManagerAddressOption ( options ) ; options . addOption ( DESCR_OPTION ) ; options . addOption ( PLAN_OPTION ) ; return options ;
public class ALPNHackClientHelloExplorer { /** * enum { * hello _ request ( 0 ) , client _ hello ( 1 ) , server _ hello ( 2 ) , * certificate ( 11 ) , server _ key _ exchange ( 12 ) , * certificate _ request ( 13 ) , server _ hello _ done ( 14 ) , * certificate _ verify ( 15 ) , client _ key _ exchange ( 16 ) ,...
// What is the handshake type ? byte handshakeType = input . get ( ) ; if ( handshakeType != 0x01 ) { // 0x01 : client _ hello message throw new SSLException ( "Expected client hello" ) ; } if ( out != null ) { out . write ( handshakeType & 0xFF ) ; } // What is the handshake body length ? int handshakeLength = getInt2...
public class Entry { /** * Unsynchronized . Get the next entry in the list . * @ return the next entry in the list */ public Entry getNext ( ) { } }
checkEntryParent ( ) ; Entry entry = null ; if ( ! isLast ( ) ) { entry = next ; } return entry ;
public class DictionaryMembership { /** * Gets the value of the keyEntityPair 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 ...
if ( keyEntityPair == null ) { keyEntityPair = new ArrayList < org . openprovenance . prov . model . Entry > ( ) ; } return this . keyEntityPair ;
public class FactoryBackgroundModel { /** * Creates an instance of { @ link BackgroundStationaryGmm } . * @ param config Configures the background model * @ param imageType Type of input image * @ return new instance of the background model */ public static < T extends ImageBase < T > > BackgroundStationaryGmm < ...
if ( config == null ) config = new ConfigBackgroundGmm ( ) ; else config . checkValidity ( ) ; BackgroundStationaryGmm < T > ret ; switch ( imageType . getFamily ( ) ) { case GRAY : ret = new BackgroundStationaryGmm_SB ( config . learningPeriod , config . decayCoefient , config . numberOfGaussian , imageType ) ; break ...
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public String convertIfcLayerSetDirectionEnumToString ( EDataType eDataType , Object instanceValue ) { } }
return instanceValue == null ? null : instanceValue . toString ( ) ;
public class FullDemo { /** * setTwoWithY2KButtonClicked , This sets the date in date picker two , to New Years Day 2000. */ private static void setTwoWithY2KButtonClicked ( ActionEvent e ) { } }
// Set date picker date . LocalDate dateY2K = LocalDate . of ( 2000 , Month . JANUARY , 1 ) ; datePicker2 . setDate ( dateY2K ) ; // Display message . String dateString = datePicker2 . getDateStringOrSuppliedString ( "(null)" ) ; String message = "The datePicker2 date was set to New Years 2000!\n\n" ; message += ( "The...
public class PTD1Impl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setXPEXTENT ( Integer newXPEXTENT ) { } }
Integer oldXPEXTENT = xpextent ; xpextent = newXPEXTENT ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . PTD1__XPEXTENT , oldXPEXTENT , xpextent ) ) ;
public class CacheAwareHistoryEventProducer { /** * find a cached entity by primary key */ protected < T extends HistoryEvent > T findInCache ( Class < T > type , String id ) { } }
return Context . getCommandContext ( ) . getDbEntityManager ( ) . getCachedEntity ( type , id ) ;
public class UnicodeDecompressor { /** * Decompress a byte array into a Unicode character array . * @ param buffer The byte array to decompress . * @ param start The start of the byte run to decompress . * @ param limit The limit of the byte run to decompress . * @ return A character array containing the decomp...
UnicodeDecompressor comp = new UnicodeDecompressor ( ) ; // use a buffer we know will never overflow // in the worst case , each byte will decompress // to a surrogate pair ( buffer must be at least 2 chars ) int len = Math . max ( 2 , 2 * ( limit - start ) ) ; char [ ] temp = new char [ len ] ; int charCount = comp . ...
public class UnsafeOperations { /** * Puts the value at the given offset of the supplied parent object * @ param parent The Object ' s parent * @ param offset The offset * @ param value char to be put */ public final void putChar ( Object parent , long offset , char value ) { } }
THE_UNSAFE . putChar ( parent , offset , value ) ;
public class VaultDriverBase { /** * Creates a stub method for an abstract method , typically a createXXX * method . */ @ Override public < V > MethodVault < V > newMethod ( Class < ? > type , String methodName , Class < ? > [ ] paramTypes ) { } }
Objects . requireNonNull ( type ) ; MethodVault < V > method = newMethodRec ( type , methodName , paramTypes ) ; if ( method != null ) { return method ; } throw new IllegalStateException ( L . l ( "Unknown method {0}.{1} {2}" , type . getSimpleName ( ) , methodName , Arrays . asList ( paramTypes ) ) ) ;
public class CheckConverter { /** * Init this converter . * @ param converter The target converter to set to this string . * @ param strTargetValue The string to set the converter to is set to true . * @ param fldTargetValue The string to set this field if set to true . * @ param strAltFieldDesc An alternate de...
m_fldTargetValue = fldTargetValue ; m_strTargetValue = strTargetValue ; m_bTrueIfMatch = bTrueIfMatch ; if ( boolMaskValue != null ) m_boolMaskValue = boolMaskValue ; else { if ( ( converter != null ) && ( converter . getField ( ) instanceof StringField ) ) m_boolMaskValue = Boolean . TRUE ; // String - default to true...
public class Manager { /** * Releases all resources used by the Manager instance and closes all its databases . */ @ InterfaceAudience . Public public void close ( ) { } }
synchronized ( lockDatabases ) { Log . d ( Database . TAG , "Closing " + this ) ; // Close all database : // Snapshot of the current open database to avoid concurrent modification as // the database will be forgotten ( removed from the databases map ) when it is closed : Database [ ] openDbs = databases . values ( ) . ...
public class CasEmbeddedContainerUtils { /** * Gets cas banner instance . * @ return the cas banner instance */ public static Banner getCasBannerInstance ( ) { } }
val packageName = CasEmbeddedContainerUtils . class . getPackage ( ) . getName ( ) ; val reflections = new Reflections ( new ConfigurationBuilder ( ) . filterInputsBy ( new FilterBuilder ( ) . includePackage ( packageName ) ) . setUrls ( ClasspathHelper . forPackage ( packageName ) ) . setScanners ( new SubTypesScanner...
public class PdfDocument { /** * Implements a link to another document . * @ param filename the filename for the remote document * @ param page the page to jump to * @ param llx the lower left x corner of the activation area * @ param lly the lower left y corner of the activation area * @ param urx the upper ...
addAnnotation ( new PdfAnnotation ( writer , llx , lly , urx , ury , new PdfAction ( filename , page ) ) ) ;
public class Encoding { /** * Percent decode a { @ link CharSequence } . * @ param s Percent encoded { @ link CharSequence } . * @ return Decoded CharSequence or null if invalid encoding . */ static CharSequence decode ( final CharSequence s ) { } }
if ( ! contains ( s , '%' ) ) { return s . toString ( ) ; } return decode0 ( s ) ;
public class AmazonLightsailClient { /** * Deletes the known host key or certificate used by the Amazon Lightsail browser - based SSH or RDP clients to * authenticate an instance . This operation enables the Lightsail browser - based SSH or RDP clients to connect to the * instance after a host key mismatch . * < ...
request = beforeClientExecution ( request ) ; return executeDeleteKnownHostKeys ( request ) ;
public class Stream { /** * Sets a metadata property about the stream . Note that { @ code Stream } wrappers obtained * through intermediate operations don ' t have their own properties , but instead access the * metadata properties of the source { @ code Stream } . * @ param name * the name of the property *...
Preconditions . checkNotNull ( name ) ; synchronized ( this . state ) { if ( this . state . properties != null ) { this . state . properties . put ( name , value ) ; } else if ( value != null ) { this . state . properties = Maps . newHashMap ( ) ; this . state . properties . put ( name , value ) ; } } return this ;
public class PoolBase { /** * Check whether Connection . isValid ( ) is supported , or that the user has test query configured . * @ param connection a Connection to check * @ throws SQLException rethrown from the driver */ private void checkValidationSupport ( final Connection connection ) throws SQLException { } ...
try { if ( isUseJdbc4Validation ) { connection . isValid ( 1 ) ; } else { executeSql ( connection , config . getConnectionTestQuery ( ) , false ) ; } } catch ( Exception | AbstractMethodError e ) { logger . error ( "{} - Failed to execute{} connection test query ({})." , poolName , ( isUseJdbc4Validation ? " isValid() ...
public class BdbPersistentStoreFactory { /** * Creates an environment config that allows object creation and supports * transactions . In addition , it automatically calculates a cache size * based on available memory . * @ return a newly created environment config instance . */ @ Override protected EnvironmentCo...
EnvironmentConfig envConf = new EnvironmentConfig ( ) ; envConf . setAllowCreate ( true ) ; envConf . setTransactional ( true ) ; LOGGER . log ( Level . FINE , "Calculating cache size" ) ; MemoryMXBean memoryMXBean = ManagementFactory . getMemoryMXBean ( ) ; MemoryUsage memoryUsage = memoryMXBean . getHeapMemoryUsage (...
public class HBasePanel { /** * Print the top nav menu . * @ param out The html out stream . * @ param reg The resources object . * @ exception DBException File exception . */ public void printHtmlLogo ( PrintWriter out , ResourceBundle reg ) throws DBException { } }
char chMenubar = HBasePanel . getFirstToUpper ( this . getProperty ( DBParams . LOGOS ) , 'H' ) ; if ( chMenubar == 'H' ) if ( ( ( BasePanel ) this . getScreenField ( ) ) . isMainMenu ( ) ) chMenubar = 'Y' ; if ( chMenubar == 'Y' ) { String strNav = reg . getString ( "htmlLogo" ) ; strNav = Utility . replaceResources (...
public class Channels { /** * Constructs a channel that reads bytes from the given stream . * < p > The resulting channel will not be buffered ; it will simply redirect * its I / O operations to the given stream . Closing the channel will in * turn cause the stream to be closed . < / p > * @ param in * The st...
checkNotNull ( in , "in" ) ; if ( in instanceof FileInputStream && FileInputStream . class . equals ( in . getClass ( ) ) ) { return ( ( FileInputStream ) in ) . getChannel ( ) ; } return new ReadableByteChannelImpl ( in ) ;
public class URLTemplate { /** * Replace a single token in the template with a corresponding int value . * Tokens are expected to be qualified in braces . E . g . { url : port } */ public void substitute ( String token , int value ) { } }
String valueStr = Integer . toString ( value ) ; _tokenValuesMap . put ( token , valueStr ) ;
public class MimeTypes { /** * Makes an educated guess of the mime type of the resource pointed by this url . * It tries to extract an ' extension ' part and confronts this extension to the list of known extensions . * @ param url the url * @ return the mime type , BINARY if not found . */ public static String ge...
if ( url == null ) { // The input url is null so we can ' t retrieve a mimetype , therefore we return null . return null ; } String external = url . toExternalForm ( ) ; if ( external . indexOf ( '.' ) == - 1 ) { return BINARY ; } else { String ext = external . substring ( external . lastIndexOf ( '.' ) + 1 ) ; String ...
public class TransformersLogger { /** * Get a warning message for the given operation at the provided address for the passed attributes * with a default message appended . Intended for use in providing a failure description for an operation * or an exception message for an { @ link org . jboss . as . controller . O...
return getAttributeWarning ( address , operation , null , attributes ) ;
public class RawResponse { /** * Write response body to OutputStream . OutputStream will not be closed . */ public void writeTo ( OutputStream out ) { } }
try { InputStreams . transferTo ( body ( ) , out ) ; } catch ( IOException e ) { throw new RequestsException ( e ) ; } finally { close ( ) ; }
public class ScryptKDFParams { /** * Get an instance from an ASN . 1 object . * @ param obj an ASN . 1 object . * @ return an instance . */ public static ScryptKDFParams getInstance ( Object obj ) { } }
if ( obj instanceof ScryptKDFParams ) { return ( ScryptKDFParams ) obj ; } if ( obj != null ) { return new ScryptKDFParams ( ASN1Sequence . getInstance ( obj ) ) ; } return null ;
public class ULocale { /** * < strong > [ icu ] < / strong > Converts the specified keyword value ( BCP 47 Unicode locale extension type , * or legacy type or type alias ) to the canonical legacy type . For example , * the legacy type " phonebook " is returned for the input BCP 47 Unicode * locale extension type ...
String legacyType = KeyTypeData . toLegacyType ( keyword , value , null , null ) ; if ( legacyType == null ) { // Checks if the specified locale type is well - formed with the legacy locale syntax . // Note : // Neither ICU nor LDML / CLDR provides the definition of keyword syntax . // However , a type should not conta...
public class AsyncUpdateThread { /** * end class ExecutionThread . . . */ public void alarm ( Object thandle ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "alarm" , new Object [ ] { this , mp . getMessagingEngineUuid ( ) } ) ; synchronized ( this ) { if ( ! closed ) { if ( ( executeSinceExpiry ) || executing ) { // has committed recently executeSinceExpiry = false ; } else { /...
public class JMonthChooser { /** * Sets the month . This is a bound property . Valuse are valid between 0 * ( January ) and 11 ( December ) . A value < 0 will be treated as 0 , a value > * 11 will be treated as 11. * @ param newMonth * the new month value * @ see # getMonth */ public void setMonth ( int newMo...
if ( newMonth < 0 || newMonth == Integer . MIN_VALUE ) { setMonth ( 0 , true ) ; } else if ( newMonth > 11 ) { setMonth ( 11 , true ) ; } else { setMonth ( newMonth , true ) ; }
public class CapabilityRegistry { /** * ImmutableCapabilityRegistry methods */ @ Override public boolean hasCapability ( String capabilityName , CapabilityScope scope ) { } }
readLock . lock ( ) ; try { return findSatisfactoryCapability ( capabilityName , scope , ! forServer ) != null ; } finally { readLock . unlock ( ) ; }
public class Transform { /** * Creates a URIResolver that returns a SAXSource . * @ param resolver * @ return */ public static URIResolver createSAXURIResolver ( Resolver resolver ) { } }
final SAXResolver saxResolver = new SAXResolver ( resolver ) ; return new URIResolver ( ) { public Source resolve ( String href , String base ) throws TransformerException { try { return saxResolver . resolve ( href , base ) ; } catch ( SAXException e ) { throw toTransformerException ( e ) ; } catch ( IOException e ) {...
public class DwgBlockHeader { /** * Read a Block header in the DWG format Version 15 * @ param data Array of unsigned bytes obtained from the DWG binary file * @ param offset The current bit offset where the value begins * @ throws Exception If an unexpected bit value is found in the DWG file . Occurs * when we...
int bitPos = offset ; Vector v = DwgUtil . getBitLong ( data , bitPos ) ; bitPos = ( ( Integer ) v . get ( 0 ) ) . intValue ( ) ; int numReactors = ( ( Integer ) v . get ( 1 ) ) . intValue ( ) ; setNumReactors ( numReactors ) ; v = DwgUtil . getTextString ( data , bitPos ) ; bitPos = ( ( Integer ) v . get ( 0 ) ) . int...
public class EBCImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public boolean eIsSet ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . EBC__BCDO_NAME : return BCDO_NAME_EDEFAULT == null ? bCdoName != null : ! BCDO_NAME_EDEFAULT . equals ( bCdoName ) ; case AfplibPackage . EBC__TRIPLETS : return triplets != null && ! triplets . isEmpty ( ) ; } return super . eIsSet ( featureID ) ;
public class EntityHelper { /** * 获取查询的Select * @ param entityClass * @ return */ public static String getSelectColumns ( Class < ? > entityClass ) { } }
EntityTable entityTable = getEntityTable ( entityClass ) ; if ( entityTable . getBaseSelect ( ) != null ) { return entityTable . getBaseSelect ( ) ; } Set < EntityColumn > columnList = getColumns ( entityClass ) ; StringBuilder selectBuilder = new StringBuilder ( ) ; boolean skipAlias = Map . class . isAssignableFrom (...
public class ImplicitObjects { /** * Creates the Map that maps init parameter name to single init * parameter value . */ public static Map createInitParamMap ( PageContext pContext ) { } }
final ServletContext context = pContext . getServletContext ( ) ; return new EnumeratedMap ( ) { public Enumeration enumerateKeys ( ) { return context . getInitParameterNames ( ) ; } public Object getValue ( Object pKey ) { if ( pKey instanceof String ) { return context . getInitParameter ( ( String ) pKey ) ; } else {...
public class ProjectNodeSupport { /** * Return a list of resource model configuration * @ param props properties * @ return List of Maps , each map containing " type " : String , " props " : Properties */ public static List < Map < String , Object > > listResourceModelConfigurations ( final Properties props ) { } }
final ArrayList < Map < String , Object > > list = new ArrayList < > ( ) ; int i = 1 ; boolean done = false ; while ( ! done ) { final String prefix = RESOURCES_SOURCE_PROP_PREFIX + "." + i ; if ( props . containsKey ( prefix + ".type" ) ) { final String providerType = props . getProperty ( prefix + ".type" ) ; final P...
public class DescribeSubnetsRequest { /** * This method is intended for internal use only . Returns the marshaled request configured with additional * parameters to enable operation dry - run . */ @ Override public Request < DescribeSubnetsRequest > getDryRunRequest ( ) { } }
Request < DescribeSubnetsRequest > request = new DescribeSubnetsRequestMarshaller ( ) . marshall ( this ) ; request . addParameter ( "DryRun" , Boolean . toString ( true ) ) ; return request ;
public class XSynchronizedExpressionImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case XbasePackage . XSYNCHRONIZED_EXPRESSION__PARAM : setParam ( ( XExpression ) newValue ) ; return ; case XbasePackage . XSYNCHRONIZED_EXPRESSION__EXPRESSION : setExpression ( ( XExpression ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ;
public class RecordingGroupMarshaller { /** * Marshall the given parameter object . */ public void marshall ( RecordingGroup recordingGroup , ProtocolMarshaller protocolMarshaller ) { } }
if ( recordingGroup == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( recordingGroup . getAllSupported ( ) , ALLSUPPORTED_BINDING ) ; protocolMarshaller . marshall ( recordingGroup . getIncludeGlobalResourceTypes ( ) , INCLUDEGLOBALRESOURCE...
public class SymmPackEVD { /** * Computes the eigenvalue decomposition of the given matrix * @ param A * Matrix to factorize . Overwritten on return * @ return The current eigenvalue decomposition * @ throws NotConvergedException */ public SymmPackEVD factor ( LowerSymmPackMatrix A ) throws NotConvergedExceptio...
if ( uplo != UpLo . Lower ) throw new IllegalArgumentException ( "Eigenvalue computer configured for lower-symmetrical matrices" ) ; return factor ( A , A . getData ( ) ) ;
public class RemoteInputChannel { /** * Releases all exclusive and floating buffers , closes the partition request client . */ @ Override void releaseAllResources ( ) throws IOException { } }
if ( isReleased . compareAndSet ( false , true ) ) { // Gather all exclusive buffers and recycle them to global pool in batch , because // we do not want to trigger redistribution of buffers after each recycle . final List < MemorySegment > exclusiveRecyclingSegments = new ArrayList < > ( ) ; synchronized ( receivedBuf...
public class MQLinkQueuedMessage { /** * / * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . runtime . SIMPMQLinkTransmitMessageControllable # getTargetQueue ( ) */ public String getTargetQueue ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getTargetQueue" ) ; SibTr . exit ( tc , "getTargetQueue" , targetQueue ) ; } return targetQueue ;
public class VariableDeclaration { /** * Sets the node type and returns this node . * @ throws IllegalArgumentException if { @ code declType } is invalid */ @ Override public org . mozilla . javascript . Node setType ( int type ) { } }
if ( type != Token . VAR && type != Token . CONST && type != Token . LET ) throw new IllegalArgumentException ( "invalid decl type: " + type ) ; return super . setType ( type ) ;
public class StateSpoutSpec { /** * Returns true if field corresponding to fieldID is set ( has been assigned a value ) and false otherwise */ public boolean isSet ( _Fields field ) { } }
if ( field == null ) { throw new IllegalArgumentException ( ) ; } switch ( field ) { case STATE_SPOUT_OBJECT : return is_set_state_spout_object ( ) ; case COMMON : return is_set_common ( ) ; } throw new IllegalStateException ( ) ;
public class Solver { /** * Maximizes a univariate function using a grid search followed by Brent ' s algorithm . * @ param fn the likelihood function to minimize * @ param gridStart the lower bound for the grid search * @ param gridEnd the upper bound for the grid search * @ param gridStep step size for the gr...
Interval interval = gridSearch ( fn , gridStart , gridEnd , gridStep ) ; BrentOptimizer bo = new BrentOptimizer ( relErr , absErr ) ; UnivariatePointValuePair max = bo . optimize ( new MaxIter ( maxIter ) , new MaxEval ( maxEval ) , new SearchInterval ( interval . getInf ( ) , interval . getSup ( ) ) , new UnivariateOb...
public class NewUserDialog { /** * This method is called from within the constructor to * initialize the form . */ private void initComponents ( String initialMessage , String initialUsername , LoginDialog loginDialog ) { } }
this . loginDialog = loginDialog ; java . awt . GridBagConstraints gridBagConstraints ; getContentPane ( ) . setLayout ( new java . awt . GridBagLayout ( ) ) ; addWindowListener ( new java . awt . event . WindowAdapter ( ) { public void windowClosing ( java . awt . event . WindowEvent evt ) { closeDialog ( evt ) ; } } ...
public class FctBnSeSelEntityProcs { /** * < p > Get PrcHasSeSellerSave ( create and put into map ) . < / p > * @ param pAddParam additional param * @ return requested PrcHasSeSellerSave * @ throws Exception - an exception */ protected final PrcHasSeSellerSave < RS , IHasSeSeller < Object > , Object > lazyGetPrcH...
String beanName = PrcHasSeSellerSave . class . getSimpleName ( ) ; @ SuppressWarnings ( "unchecked" ) PrcHasSeSellerSave < RS , IHasSeSeller < Object > , Object > proc = ( PrcHasSeSellerSave < RS , IHasSeSeller < Object > , Object > ) this . processorsMap . get ( beanName ) ; if ( proc == null ) { proc = new PrcHasSeSe...
public class AbstractUserTypeHibernateIntegrator { /** * { @ inheritDoc } */ @ Override public void disintegrate ( SessionFactoryImplementor sessionFactory , SessionFactoryServiceRegistry serviceRegistry ) { } }
ConfigurationHelper . configureDefaultProperties ( sessionFactory , null ) ;
public class OSecurityHelper { /** * Transform array of { @ link RequiredOrientResource } s to a { @ link HashMap } . * { @ link HashMap } is required to be serializable * @ param resources { @ link RequiredOrientResource } s to convert * @ return { @ link HashMap } representation of an { @ link OrientPermission ...
HashMap < String , OrientPermission [ ] > secureMap = new HashMap < String , OrientPermission [ ] > ( ) ; for ( RequiredOrientResource requiredOrientResource : resources ) { String resource = requiredOrientResource . value ( ) ; String specific = requiredOrientResource . specific ( ) ; String action = requiredOrientRes...
public class ClassUtils { /** * Check whether the given class is present in the given classloader . * @ param name The name of the class * @ param classLoader The classloader . If null will fallback to attempt the thread context loader , otherwise the system loader * @ return True if it is */ public static boolea...
return forName ( name , classLoader ) . isPresent ( ) ;
public class SystemConfiguration { /** * Returns for given < code > _ key < / code > the related value as Properties . If * no attribute is found an empty Properties is returned . * @ param _ key key of searched attribute * @ param _ concatenate is concatenate or not * @ return Properties * @ throws EFapsExce...
final Properties properties = getAttributeValueAsProperties ( _key , _concatenate ) ; final StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor ( ) ; encryptor . setConfig ( SystemConfiguration . getPBEConfig ( ) ) ; final Properties props = new EncryptableProperties ( properties , encryptor ) ; retur...
public class SerializeHandlerFactory { /** * 根据http请求中的content - type尝试寻找序列化handler * @ param protocol * @ return * @ throws InvalidProtocolException */ public static SerializeHandler getHandlerByProtocal ( String protocol ) throws InvalidProtocolException { } }
SerializeHandler handler = HANDLER_MAP . get ( protocol ) ; if ( handler != null ) { return handler ; } throw new InvalidProtocolException ( "rpc protocol not supported for " + protocol ) ;
public class CommerceRegionModelImpl { /** * Converts the soap model instances into normal model instances . * @ param soapModels the soap model instances to convert * @ return the normal model instances */ public static List < CommerceRegion > toModels ( CommerceRegionSoap [ ] soapModels ) { } }
if ( soapModels == null ) { return null ; } List < CommerceRegion > models = new ArrayList < CommerceRegion > ( soapModels . length ) ; for ( CommerceRegionSoap soapModel : soapModels ) { models . add ( toModel ( soapModel ) ) ; } return models ;
public class WTemplate { /** * Remove a template engine option . * @ param key the engine option to remove */ public void removeEngineOption ( final String key ) { } }
TemplateModel model = getOrCreateComponentModel ( ) ; if ( model . engineOptions != null ) { model . engineOptions . remove ( key ) ; }
public class PersistenceUnitMetadata { /** * Gets the property . * @ param prop * the prop * @ return the property */ public String getProperty ( String prop ) { } }
// assuming Properties are initialized with this call return prop != null ? getProperties ( ) . getProperty ( prop ) : null ;
public class Queue { /** * Add subscribers to Queue . If there is no queue , an EmptyQueueException is thrown . * @ param subscribers The array of subscribers . * @ throws io . iron . ironmq . HTTPException If the IronMQ service returns a status other than 200 OK . * @ throws java . io . IOException If there is a...
String payload = gson . toJson ( subscribers ) ; IronReader reader = client . post ( "queues/" + name + "/subscribers" , payload ) ; reader . close ( ) ;
public class TransferManager { /** * Schedules a new transfer to download data from Amazon S3 and save it to * the specified file . This method is non - blocking and returns immediately * ( i . e . before the data has been fully downloaded ) . * Use the returned Download object to query the progress of the transf...
return doDownload ( getObjectRequest , file , null , null , OVERWRITE_MODE , timeoutMillis , null ) ;
public class QRDecomposition { /** * Least squares solution of A * X = b * @ param b A column vector b with as many rows as A . * @ return X that minimizes the two norm of Q * R * X - b . * @ throws IllegalArgumentException Matrix row dimensions must agree . * @ throws ArithmeticException Matrix is rank deficie...
if ( b . length != m ) { throw new IllegalArgumentException ( ERR_MATRIX_DIMENSIONS ) ; } if ( ! this . isFullRank ( ) ) { throw new ArithmeticException ( ERR_MATRIX_RANK_DEFICIENT ) ; } // Compute Y = transpose ( Q ) * B for ( int k = 0 ; k < n ; k ++ ) { double s = 0.0 ; for ( int i = k ; i < m ; i ++ ) { s += QR [ i...
public class Collections { /** * Returns an enumeration over the specified collection . This provides * interoperability with legacy APIs that require an enumeration * as input . * @ param < T > the class of the objects in the collection * @ param c the collection for which an enumeration is to be returned . ...
return new Enumeration < T > ( ) { private final Iterator < T > i = c . iterator ( ) ; public boolean hasMoreElements ( ) { return i . hasNext ( ) ; } public T nextElement ( ) { return i . next ( ) ; } } ;
public class KeyGenUtil { /** * Return true if any of the cache key generators in the array is a * provisional cache key generator . * @ param keyGens * The array * @ return True if there is a provisional cache key generator in the array */ static public boolean isProvisional ( Iterable < ICacheKeyGenerator > k...
boolean provisional = false ; for ( ICacheKeyGenerator keyGen : keyGens ) { if ( keyGen . isProvisional ( ) ) { provisional = true ; break ; } } return provisional ;
public class snmpmanager { /** * Use this API to fetch all the snmpmanager resources that are configured on netscaler . */ public static snmpmanager [ ] get ( nitro_service service ) throws Exception { } }
snmpmanager obj = new snmpmanager ( ) ; snmpmanager [ ] response = ( snmpmanager [ ] ) obj . get_resources ( service ) ; return response ;
public class CharSequenceUtil { /** * Find index of first occurance of a character . This is different * from { @ link String # indexOf ( String ) } in that it works on * { @ link CharSequence } s and looks for a single character * instead of a string . * @ param str haystack * @ param ch needle * @ return ...
for ( int i = 0 ; i < str . length ( ) ; i ++ ) if ( str . charAt ( i ) == ch ) return i ; return - 1 ;
public class MultiIndex { /** * For investigation purposes only * @ param remove * @ param add * @ throws IOException */ private void doUpdateRW ( final Collection < String > remove , final Collection < Document > add ) throws IOException { } }
// make sure a reader is available during long updates if ( add . size ( ) > handler . getBufferSize ( ) ) { try { releaseMultiReader ( ) ; } catch ( IOException e ) { // do not fail if an exception is thrown here LOG . warn ( "unable to prepare index reader " + "for queries during update" , e ) ; } } synchronized ( up...
public class AbstractMacroDescriptor { /** * Extract parameters informations from { @ link # parametersBeanDescriptor } and insert it in * { @ link # parameterDescriptorMap } . * @ since 1.7M2 */ protected void extractParameterDescriptorMap ( ) { } }
for ( PropertyDescriptor propertyDescriptor : this . parametersBeanDescriptor . getProperties ( ) ) { DefaultParameterDescriptor desc = new DefaultParameterDescriptor ( propertyDescriptor ) ; this . parameterDescriptorMap . put ( desc . getId ( ) . toLowerCase ( ) , desc ) ; }
public class Ifc4FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public IfcConstructionMaterialResourceTypeEnum createIfcConstructionMaterialResourceTypeEnumFromString ( EDataType eDataType , String initialValue ) { } }
IfcConstructionMaterialResourceTypeEnum result = IfcConstructionMaterialResourceTypeEnum . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ;
public class Relation { /** * Returns the NumberColumn at the given index . * If the index points to a String or a boolean column , a new NumberColumn is created and returned * TODO ( lwhite ) : Consider separating the indexed access and the column type mods , which must be for ML functions ( in smile or elsewhere ...
Column < ? > c = column ( columnIndex ) ; if ( c . type ( ) == ColumnType . STRING ) { return ( ( StringColumn ) c ) . asDoubleColumn ( ) ; } else if ( c . type ( ) == ColumnType . BOOLEAN ) { return ( ( BooleanColumn ) c ) . asDoubleColumn ( ) ; } else if ( c . type ( ) == ColumnType . LOCAL_DATE ) { return ( ( DateCo...
public class SingletonContext { /** * This static method registers the SMB URL protocol handler which is * required to use SMB URLs with the < tt > java . net . URL < / tt > class . If this * method is not called before attempting to create an SMB URL with the * URL class the following exception will occur : * ...
String pkgs ; float ver = Float . parseFloat ( Runtime . class . getPackage ( ) . getSpecificationVersion ( ) ) ; String vendor = System . getProperty ( "java.vendor.url" ) ; if ( ! ( vendor != null && vendor . startsWith ( "http://www.android.com" ) ) && ver < 1.7f ) { throw new RuntimeCIFSException ( "jcifs-ng requir...
public class StoryRunner { /** * Runs a Story with the given configuration and steps . * @ param configuration the Configuration used to run story * @ param candidateSteps the List of CandidateSteps containing the candidate * steps methods * @ param story the Story to run * @ throws Throwable if failures occu...
run ( configuration , candidateSteps , story , MetaFilter . EMPTY ) ;
public class DiagnosticsLogWriterImpl { /** * we can ' t rely on DateFormat since it generates a ton of garbage */ private void appendDateTime ( long epochMillis ) { } }
date . setTime ( epochMillis ) ; calendar . setTime ( date ) ; appendDate ( ) ; write ( ' ' ) ; appendTime ( ) ;
public class Quaternion { /** * Get the roll , pitch and yaw angles in radians represented by this { @ link Quaternion } . * @ return The roll , pitch and yaw angles ( in that order ) in radians represented by this { @ link Quaternion } . */ public double [ ] getRollPitchYaw ( ) { } }
double [ ] ret = new double [ 3 ] ; // roll ( x - axis rotation ) double sinr = + 2.0 * ( w * x + y * z ) ; double cosr = + 1.0 - 2.0 * ( x * x + y * y ) ; ret [ 0 ] = Math . atan2 ( sinr , cosr ) ; // pitch ( y - axis rotation ) double sinp = + 2.0 * ( w * y - z * x ) ; // use 90 degrees if out of range if ( Math . ab...