signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ConstantClassInfo { /** * Used to describe an array class . */ static ConstantClassInfo make ( ConstantPool cp , String className , int dim ) { } }
ConstantInfo ci = new ConstantClassInfo ( cp , className , dim ) ; return ( ConstantClassInfo ) cp . addConstant ( ci ) ;
public class JSONObject { /** * Returns an array with the values corresponding to { @ code names } . The array contains * null for names that aren ' t mapped . This method returns null if { @ code names } is * either null or empty . * @ param names the names of the properties * @ return the array */ public JSON...
JSONArray result = new JSONArray ( ) ; if ( names == null ) { return null ; } int length = names . length ( ) ; if ( length == 0 ) { return null ; } for ( int i = 0 ; i < length ; i ++ ) { String name = JSON . toString ( names . opt ( i ) ) ; result . put ( opt ( name ) ) ; } return result ;
public class X509CertSelector { /** * A private method that adds a name ( String or byte array ) to the * pathToNames criterion . The { @ code X509Certificate } must contain * the specified pathToName . * @ param type the name type ( 0-8 , as specified in * RFC 3280 , section 4.2.1.7) * @ param name the name ...
// First , ensure that the name parses GeneralNameInterface tempName = makeGeneralNameInterface ( type , name ) ; if ( pathToGeneralNames == null ) { pathToNames = new HashSet < List < ? > > ( ) ; pathToGeneralNames = new HashSet < GeneralNameInterface > ( ) ; } List < Object > list = new ArrayList < Object > ( 2 ) ; l...
public class IdentityOpenHashSet { /** * implemented as per wiki suggested algo with minor adjustments . */ private void compactAndRemove ( final E [ ] buffer , final int mask , int removeHashIndex ) { } }
// remove ( 9a ) : [ 9a , 9b , 10a , 9c , 10b , 11a , null ] - > [ 9b , 9c , 10a , 10b , null , 11a , null ] removeHashIndex = removeHashIndex & mask ; int j = removeHashIndex ; while ( true ) { int k ; // skip elements which belong where they are do { // j : = ( j + 1 ) modulo num _ slots j = ( j + 1 ) & mask ; // if ...
public class UIViewRoot { /** * < p > < span class = " changed _ added _ 2_0 " > Override < / span > the default * { @ link UIComponentBase # encodeBegin } behavior . If * { @ link # getBeforePhaseListener } returns non - < code > null < / code > , * invoke it , passing a { @ link PhaseEvent } for the { @ link ...
initState ( ) ; notifyBefore ( context , PhaseId . RENDER_RESPONSE ) ; if ( ! context . getResponseComplete ( ) ) { super . encodeBegin ( context ) ; }
public class CredentialConfiguration { /** * Get the credential as configured . * < p > The following is the order in which properties are applied to create the Credential : * < ol > * < li > If service accounts are not disabled and no service account key file or service account * parameters are set , use the m...
if ( isServiceAccountEnabled ( ) ) { logger . atFine ( ) . log ( "Using service account credentials" ) ; // By default , we want to use service accounts with the meta - data service ( assuming we ' re // running in GCE ) . if ( shouldUseMetadataService ( ) ) { logger . atFine ( ) . log ( "Getting service account creden...
public class SpringContextUtils { /** * Loads a context from a XML and inject all objects in the Map * @ param xmlPath Path for the xml applicationContext * @ param extraBeans Extra beans for being injected * @ return ApplicationContext generated */ public static ApplicationContext contextMergedBeans ( String xml...
final DefaultListableBeanFactory parentBeanFactory = buildListableBeanFactory ( extraBeans ) ; // loads the xml and add definitions in the context GenericApplicationContext parentContext = new GenericApplicationContext ( parentBeanFactory ) ; XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader ( parentConte...
public class Filters { /** * Equivalent to { @ link # replaceInBuffer ( java . util . regex . Pattern , * String ) } but takes the regular expression * as string . * @ param regexp the regular expression * @ param replacement the string to be substituted for each match * @ return the filter */ public static F...
return replaceInBuffer ( Pattern . compile ( regexp ) , replacement ) ;
public class Matrix3x2d { /** * Set this matrix to define a " view " transformation that maps the given < code > ( left , bottom ) < / code > and * < code > ( right , top ) < / code > corners to < code > ( - 1 , - 1 ) < / code > and < code > ( 1 , 1 ) < / code > respectively . * @ see # view ( double , double , dou...
m00 = 2.0 / ( right - left ) ; m01 = 0.0 ; m10 = 0.0 ; m11 = 2.0 / ( top - bottom ) ; m20 = ( left + right ) / ( left - right ) ; m21 = ( bottom + top ) / ( bottom - top ) ; return this ;
public class ShasumSummaryFileTarget { /** * { @ inheritDoc } */ @ Override public void close ( final String subPath ) throws ExecutionTargetCloseException { } }
StringBuilder sb = new StringBuilder ( ) ; if ( algorithms . size ( ) != 1 ) throw new ExecutionTargetCloseException ( "Must use only one type of hash" ) ; // shasum entires are traditionally written in sorted order ( per globing argument ) @ SuppressWarnings ( "unchecked" ) Map . Entry < ChecksumFile , Map < String , ...
public class DummyTransaction { /** * Attempt to commit this transaction . * @ throws RollbackException If the transaction was marked for rollback only , the transaction is rolled back * and this exception is thrown . * @ throws SystemException If the transaction service fails in an unexpected way . * @ throws ...
if ( trace ) { log . tracef ( "Transaction.commit() invoked in transaction with Xid=%s" , xid ) ; } if ( isDone ( ) ) { throw new IllegalStateException ( "Transaction is done. Cannot commit transaction." ) ; } runPrepare ( ) ; runCommit ( false ) ;
public class VisitorAttributes { /** * Whether to recurse into the non - leaf file < p > . If there is a recurse filter then the result will by its * accepts ( file ) value . * Default : false * @ param file the file * @ return the recurse flag . */ public boolean isRecurse ( VirtualFile file ) { } }
boolean recurse = false ; if ( recurseFilter != null ) { recurse = recurseFilter . accepts ( file ) ; } return recurse ;
public class RegExUtils { /** * < p > Replaces each substring of the text String that matches the given regular expression * with the given replacement . < / p > * This method is a { @ code null } safe equivalent to : * < ul > * < li > { @ code text . replaceAll ( regex , replacement ) } < / li > * < li > { @...
if ( text == null || regex == null || replacement == null ) { return text ; } return text . replaceAll ( regex , replacement ) ;
public class ChangesKey { /** * { @ inheritDoc } */ @ Override public void readExternal ( ObjectInput in ) throws IOException , ClassNotFoundException { } }
super . readExternal ( in ) ; byte [ ] buf = new byte [ in . readInt ( ) ] ; in . readFully ( buf ) ; wsId = new String ( buf , Constants . DEFAULT_ENCODING ) ;
public class ParserUtils { /** * Retrieves the conversion table for use with the getObject ( ) * method in IDataSet * @ throws IOException * @ return Properties * Properties contained in the pzconvert . properties file */ public static Properties loadConvertProperties ( ) throws IOException { } }
final Properties pzConvertProps = new Properties ( ) ; final URL url = ParserUtils . class . getClassLoader ( ) . getResource ( "fpconvert.properties" ) ; pzConvertProps . load ( url . openStream ( ) ) ; return pzConvertProps ;
public class FullEnumerationFormulaGenerator { /** * Generates a MolecularFormula object that contains the isotopes in the * isotopes [ ] array with counts in the currentCounts [ ] array . In other * words , generates a proper CDK representation of the currently examined * formula . */ private IMolecularFormula g...
IMolecularFormula formulaObject = builder . newInstance ( IMolecularFormula . class ) ; for ( int i = 0 ; i < isotopes . length ; i ++ ) { if ( currentCounts [ i ] == 0 ) continue ; formulaObject . addIsotope ( isotopes [ i ] , currentCounts [ i ] ) ; } return formulaObject ;
public class DigitalOceanClient { @ Override public Tags getAvailableTags ( Integer pageNo , Integer perPage ) throws DigitalOceanException , RequestUnsuccessfulException { } }
validatePageNo ( pageNo ) ; return ( Tags ) perform ( new ApiRequest ( ApiAction . AVAILABLE_TAGS , pageNo , perPage ) ) . getData ( ) ;
public class CommerceWishListUtil { /** * Returns the first commerce wish list in the ordered set where groupId = & # 63 ; and userId = & # 63 ; . * @ param groupId the group ID * @ param userId the user ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * ...
return getPersistence ( ) . fetchByG_U_First ( groupId , userId , orderByComparator ) ;
public class ConverterManager { /** * Convert given string to specified collection with given element type . * @ throws ConversionException If any occurs . * @ see # find ( Class ) */ public < T > Object convert ( Class collectionType , Class < T > elementType , String origin ) throws ConversionException { } }
Converter < T > elementConverter = find ( elementType ) ; CollectionConverter < T > converter = new CollectionConverter < > ( elementConverter , stringSplitter ) ; try { Collection < T > converted = converter . convert ( origin ) ; return castCollectionToType ( collectionType , converted ) ; } catch ( Exception e ) { t...
public class MemberBuilder { /** * Sets a member property . * @ param key the property key to set * @ param value the property value to set * @ return the member builder * @ throws NullPointerException if the property is null */ public MemberBuilder withProperty ( String key , String value ) { } }
config . setProperty ( key , value ) ; return this ;
public class Json { /** * Makes a tree of structure types reflecting the Bindings . * A structure type contains a property member for each name / value pair in the Bindings . A property has the same name as the key and follows these rules : * < ul > * < li > If the type of the value is a " simple " type , such as...
JsonStructureType type = ( JsonStructureType ) transformJsonObject ( nameForStructure , null , bindings ) ; StringBuilder sb = new StringBuilder ( ) ; type . render ( sb , 0 , mutable ) ; return sb . toString ( ) ;
public class XsdAsmInterfaces { /** * Adds a method to the element which contains the sequence . * @ param classWriter The { @ link ClassWriter } of the class which contains the sequence . * @ param className The name of the class which contains the sequence . * @ param nextTypeName The next sequence type name . ...
elements . forEach ( element -> generateSequenceMethod ( classWriter , className , getJavaType ( element . getType ( ) ) , getCleanName ( element . getName ( ) ) , className , nextTypeName , apiName ) ) ; elements . forEach ( element -> createElement ( element , apiName ) ) ;
public class ThreadBoundOutputStream { /** * Remove the custom stream for the current thread . * @ return thread bound OutputStream or null if none exists */ public OutputStream removeThreadStream ( ) { } }
final OutputStream orig = inheritOutputStream . get ( ) ; inheritOutputStream . set ( null ) ; return orig ;
public class DateParser { /** * Loads month aliases from the given resource file */ protected static Map < String , Integer > loadMonthAliases ( String file ) throws IOException { } }
InputStream in = DateParser . class . getClassLoader ( ) . getResourceAsStream ( file ) ; BufferedReader reader = new BufferedReader ( new InputStreamReader ( in ) ) ; Map < String , Integer > map = new HashMap < > ( ) ; String line ; int month = 1 ; while ( ( line = reader . readLine ( ) ) != null ) { for ( String ali...
public class LoggingInterceptorSupport { /** * Log SOAP message with transformer instance . * @ param logMessage the customized log message . * @ param soapMessage the message content as SOAP envelope source . * @ param incoming * @ throws TransformerException */ protected void logSoapMessage ( String logMessag...
Transformer transformer = createIndentingTransformer ( ) ; StringWriter writer = new StringWriter ( ) ; transformer . transform ( soapMessage . getEnvelope ( ) . getSource ( ) , new StreamResult ( writer ) ) ; logMessage ( logMessage , XMLUtils . prettyPrint ( writer . toString ( ) ) , incoming ) ;
public class TypeConverter { /** * checks if Class f is in classes * */ protected boolean oneOfClasses ( final Class f , final Class [ ] classes ) { } }
for ( final Class c : classes ) { if ( c . equals ( f ) ) { return true ; } } return false ;
public class BundleUtils { /** * Returns a optional byte value . In other words , returns the value mapped by key if it exists and is a byte . * The bundle argument is allowed to be { @ code null } . If the bundle is null , this method returns a fallback value . * @ param bundle a bundle . If the bundle is null , t...
if ( bundle == null ) { return fallback ; } return bundle . getByte ( key , fallback ) ;
public class RuleImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public NotificationChain basicSetBody ( RuleElement newBody , NotificationChain msgs ) { } }
RuleElement oldBody = body ; body = newBody ; if ( eNotificationRequired ( ) ) { ENotificationImpl notification = new ENotificationImpl ( this , Notification . SET , SimpleAntlrPackage . RULE__BODY , oldBody , newBody ) ; if ( msgs == null ) msgs = notification ; else msgs . add ( notification ) ; } return msgs ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcPropertyReferenceValue ( ) { } }
if ( ifcPropertyReferenceValueEClass == null ) { ifcPropertyReferenceValueEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 405 ) ; } return ifcPropertyReferenceValueEClass ;
public class EFapsException { /** * If a caused exception is a { @ link SQLException } , also all next * exceptions of the { @ link SQLException } ' s are printed into the stack * trace . * @ param _ writer < code > PrintWriter < / code > to use for output * @ see # makeInfo ( ) to get all information about thi...
_writer . append ( makeInfo ( ) ) ; if ( this . className != null ) { _writer . append ( "Thrown within class " ) . append ( this . className . getName ( ) ) . append ( '\n' ) ; } super . printStackTrace ( _writer ) ; if ( getCause ( ) != null && getCause ( ) instanceof SQLException ) { SQLException ex = ( SQLException...
public class MappingServiceController { /** * Generate algorithms based on semantic matches between attribute tags and descriptions * < p > package - private for testablity */ void autoGenerateAlgorithms ( EntityMapping mapping , EntityType sourceEntityType , EntityType targetEntityType , MappingProject project ) { }...
algorithmService . autoGenerateAlgorithm ( sourceEntityType , targetEntityType , mapping ) ; mappingService . updateMappingProject ( project ) ;
public class BasePanel { /** * Free . */ public void free ( ) { } }
if ( m_recordOwnerCollection != null ) m_recordOwnerCollection . free ( ) ; m_recordOwnerCollection = null ; if ( m_registration != null ) ( ( UserProperties ) m_registration ) . free ( ) ; m_registration = null ; this . freeAllSFields ( true ) ; m_SFieldList = null ; super . free ( ) ;
public class AllChemCompProvider { /** * Do the actual loading of the dictionary in a thread . */ @ Override public void run ( ) { } }
long timeS = System . currentTimeMillis ( ) ; initPath ( ) ; ensureFileExists ( ) ; try { loadAllChemComps ( ) ; long timeE = System . currentTimeMillis ( ) ; logger . debug ( "Time to init chem comp dictionary: " + ( timeE - timeS ) / 1000 + " sec." ) ; } catch ( IOException e ) { logger . error ( "Could not load chem...
public class MongoDBAdaptor { /** * For histograms */ protected List < IntervalFeatureFrequency > getIntervalFeatureFrequencies ( Region region , int interval , List < Object [ ] > objectList , int numFeatures , double maxSnpsInterval ) { } }
int numIntervals = ( region . getEnd ( ) - region . getStart ( ) ) / interval + 1 ; List < IntervalFeatureFrequency > intervalFeatureFrequenciesList = new ArrayList < > ( numIntervals ) ; float maxNormValue = 1 ; if ( numFeatures != 0 ) { maxNormValue = ( float ) maxSnpsInterval / numFeatures ; } int start = region . g...
public class DescribeHapgResult { /** * @ param hsmsLastActionFailed */ public void setHsmsLastActionFailed ( java . util . Collection < String > hsmsLastActionFailed ) { } }
if ( hsmsLastActionFailed == null ) { this . hsmsLastActionFailed = null ; return ; } this . hsmsLastActionFailed = new com . amazonaws . internal . SdkInternalList < String > ( hsmsLastActionFailed ) ;
public class HtmlLinkRendererBase { /** * Can be overwritten by derived classes to overrule the style to be used . */ protected String getStyle ( FacesContext facesContext , UIComponent link ) { } }
if ( link instanceof HtmlCommandLink ) { return ( ( HtmlCommandLink ) link ) . getStyle ( ) ; } return ( String ) link . getAttributes ( ) . get ( HTML . STYLE_ATTR ) ;
public class S { /** * Return a { @ link org . rythmengine . utils . RawData } type wrapper of * an object with XML escaping * < p > Object is { @ link # toString ( Object ) converted to String } before escaping < / p > * < p > After the object get escaped , the output string is safe to put inside a XML * attri...
if ( null == o ) return RawData . NULL ; if ( o instanceof RawData ) return ( RawData ) o ; return new RawData ( _escapeXML ( o . toString ( ) ) ) ;
public class PdfSignatureAppearance { /** * Fits the text to some rectangle adjusting the font size as needed . * @ param font the font to use * @ param text the text * @ param rect the rectangle where the text must fit * @ param maxFontSize the maximum font size * @ param runDirection the run direction * @...
try { ColumnText ct = null ; int status = 0 ; if ( maxFontSize <= 0 ) { int cr = 0 ; int lf = 0 ; char t [ ] = text . toCharArray ( ) ; for ( int k = 0 ; k < t . length ; ++ k ) { if ( t [ k ] == '\n' ) ++ lf ; else if ( t [ k ] == '\r' ) ++ cr ; } int minLines = Math . max ( cr , lf ) + 1 ; maxFontSize = Math . abs ( ...
public class OptionsApiPanel { /** * This method initializes panelMisc * @ return javax . swing . JPanel */ private JPanel getPanelMisc ( ) { } }
if ( panelMisc == null ) { panelMisc = new JPanel ( ) ; panelMisc . setLayout ( new GridBagLayout ( ) ) ; int y = 0 ; panelMisc . add ( getChkEnabled ( ) , LayoutHelper . getGBC ( 0 , y ++ , 1 , 0.5 ) ) ; panelMisc . add ( getChkUiEnabled ( ) , LayoutHelper . getGBC ( 0 , y ++ , 1 , 0.5 ) ) ; panelMisc . add ( getChkSe...
public class FlowController { /** * Return the specified data source for the current Struts module . * @ param request The servlet request we are processing * @ param key The key specified in the * < code > & lt ; message - resources & gt ; < / code > element for the * requested bundle */ protected DataSource g...
// Return the requested data source instance return ( DataSource ) getServletContext ( ) . getAttribute ( key + getModuleConfig ( ) . getPrefix ( ) ) ;
public class GetKeyPairsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetKeyPairsRequest getKeyPairsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getKeyPairsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getKeyPairsRequest . getPageToken ( ) , PAGETOKEN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . ge...
public class VodClient { /** * Update the title and description for the specific media resource managed by VOD service . * The caller < i > must < / i > authenticate with a valid BCE Access Key / Private Key pair . * @ param request The request wrapper object containing all options . * @ return empty response wil...
InternalRequest internalRequest = createRequest ( HttpMethodName . PUT , request , PATH_MEDIA , request . getMediaId ( ) ) ; internalRequest . addParameter ( PARA_ATTRIBUTES , null ) ; return invokeHttpClient ( internalRequest , UpdateMediaResourceResponse . class ) ;
public class AbstractHdfsBolt { /** * Marked as final to prevent override . Subclasses should implement the doPrepare ( ) method . * @ param conf * @ param topologyContext * @ param collector */ public final void prepare ( Map conf , TopologyContext topologyContext , OutputCollector collector ) { } }
this . writeLock = new Object ( ) ; if ( this . syncPolicy == null ) throw new IllegalStateException ( "SyncPolicy must be specified." ) ; if ( this . rotationPolicy == null ) throw new IllegalStateException ( "RotationPolicy must be specified." ) ; if ( this . fsUrl == null ) { throw new IllegalStateException ( "File ...
public class ConfigException { /** * support it ) */ private void writeObject ( java . io . ObjectOutputStream out ) throws IOException { } }
out . defaultWriteObject ( ) ; ConfigImplUtil . writeOrigin ( out , origin ) ;
public class ValueMapper { /** * Maps a { @ link Value } message to the { @ link Object } it describes . * @ param message * the message to map * @ return The observed value * @ throws ObjectToIdMappingException * When the value described it he message is unknown in the { @ link MetaModel } . */ public Object...
final UUID valueId = message . getObservableObjectId ( ) ; if ( valueId != null ) { return objectRegistry . getByIdOrFail ( valueId ) ; } else { return message . getSimpleObjectValue ( ) ; }
public class FnString { /** * Converts a String into a Long , using the specified decimal point * configuration ( { @ link DecimalPoint } ) . Rounding mode is used for removing the * decimal part of the number . The target String should contain no * thousand separators . The integer part of the input string must ...
return new ToLong ( roundingMode , decimalPoint ) ;
public class IconicsDrawable { /** * Set the size of the drawable . * @ param sizeDp The size in density - independent pixels ( dp ) . * @ return The current IconicsDrawable for chaining . */ @ NonNull public IconicsDrawable sizeDpX ( @ Dimension ( unit = DP ) int sizeDp ) { } }
return sizePxX ( Utils . convertDpToPx ( mContext , sizeDp ) ) ;
public class EditShape { /** * Checks if there are degenerate segments in any of multipath geometries */ boolean hasDegenerateSegments ( double tolerance ) { } }
for ( int geometry = getFirstGeometry ( ) ; geometry != - 1 ; geometry = getNextGeometry ( geometry ) ) { if ( ! Geometry . isMultiPath ( getGeometryType ( geometry ) ) ) continue ; boolean b_polygon = getGeometryType ( geometry ) == Geometry . GeometryType . Polygon ; for ( int path = getFirstPath ( geometry ) ; path ...
public class TopicImpl { /** * / / / / / Methods from JsMessagePoint */ private byte [ ] getData ( byte [ ] in , java . lang . Integer size ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getData" , new Object [ ] { in , size } ) ; byte tmp [ ] = null ; if ( in != null ) { int len = 1024 ; if ( size . intValue ( ) > 0 ) len = size . intValue ( ) ; if ( len > in . length ) len = in . length ; tmp = new byte [...
public class WhitesourceService { /** * Updates the White Source organization account with the given OSS information . * @ param orgToken Organization token uniquely identifying the account at white source . * @ param requesterEmail Email of the WhiteSource user that requests to update WhiteSource . * @ param upd...
return client . updateInventory ( requestFactory . newUpdateInventoryRequest ( orgToken , updateType , requesterEmail , product , productVersion , projectInfos , userKey , logData , scanComment ) ) ;
public class ScriptRuntime { /** * Delegates to * @ return true iff rhs appears in lhs ' proto chain */ public static boolean jsDelegatesTo ( Scriptable lhs , Scriptable rhs ) { } }
Scriptable proto = lhs . getPrototype ( ) ; while ( proto != null ) { if ( proto . equals ( rhs ) ) return true ; proto = proto . getPrototype ( ) ; } return false ;
public class SQLiteConnection { /** * Called by SQLiteConnectionPool only . */ void reconfigure ( com . couchbase . lite . internal . database . sqlite . SQLiteDatabaseConfiguration configuration ) { } }
mOnlyAllowReadOnlyOperations = false ; // Remember what changed . boolean foreignKeyModeChanged = configuration . foreignKeyConstraintsEnabled != mConfiguration . foreignKeyConstraintsEnabled ; boolean walModeChanged = ( ( configuration . openFlags ^ mConfiguration . openFlags ) & com . couchbase . lite . internal . da...
public class AsynchronousRequest { /** * For more info on stories API go < a href = " https : / / wiki . guildwars2 . com / wiki / API : 2 / stories " > here < / a > < br / > * Give user the access to { @ link Callback # onResponse ( Call , Response ) } and { @ link Callback # onFailure ( Call , Throwable ) } methods...
isParamValid ( new ParamChecker ( ids ) ) ; gw2API . getStoryInfo ( processIds ( ids ) , GuildWars2 . lang . getValue ( ) ) . enqueue ( callback ) ;
public class LRVerify { /** * Verfies that the provided message and signature using the public key * @ param isSignature InputStream of the signature * @ param isMessage InputStream of the message * @ param isPublicKey InputStream of the public key * @ throws LRException */ private static boolean Verify ( Input...
// Get the public key ring collection from the public key input stream PGPPublicKeyRingCollection pgpRings = null ; try { pgpRings = new PGPPublicKeyRingCollection ( PGPUtil . getDecoderStream ( isPublicKey ) ) ; } catch ( Exception e ) { throw new LRException ( LRException . INVALID_PUBLIC_KEY ) ; } // Add the Bouncy ...
public class ProposalLineItem { /** * Gets the customFieldValues value for this ProposalLineItem . * @ return customFieldValues * The values of the custom fields associated with the { @ code * ProposalLineItem } . * This attribute is optional . * This attribute can be configured as editable after * the propos...
return customFieldValues ;
public class DTMNodeProxy { /** * This is a bit of a problem in DTM , since a DTM may be a Document * Fragment and hence not have a clear - cut Document Element . We can * make it work in the well - formed cases but would that be confusing for others ? * @ see org . w3c . dom . Document */ public final Element ge...
int dochandle = dtm . getDocument ( ) ; int elementhandle = DTM . NULL ; for ( int kidhandle = dtm . getFirstChild ( dochandle ) ; kidhandle != DTM . NULL ; kidhandle = dtm . getNextSibling ( kidhandle ) ) { switch ( dtm . getNodeType ( kidhandle ) ) { case Node . ELEMENT_NODE : if ( elementhandle != DTM . NULL ) { ele...
public class FullDTDReader { /** * Similar to { @ link # readDTDName } , except that the rules are bit looser , * ie . there are no additional restrictions for the first char */ private String readDTDNmtoken ( char c ) throws XMLStreamException { } }
char [ ] outBuf = getNameBuffer ( 64 ) ; int outLen = outBuf . length ; int outPtr = 0 ; while ( true ) { /* Note : colon not included in name char array , since it has * special meaning WRT QNames , need to add into account here : */ if ( ! isNameChar ( c ) && c != ':' ) { // Need to get at least one char if ( outPt...
public class Tuple3 { /** * Apply attribute 3 as argument to a function and return a new tuple with the substituted argument . */ public final < U3 > Tuple3 < T1 , T2 , U3 > map3 ( Function < ? super T3 , ? extends U3 > function ) { } }
return Tuple . tuple ( v1 , v2 , function . apply ( v3 ) ) ;
public class AbstractMapBasedWALDAO { /** * Update an existing item including invoking the callback . Must only be * invoked inside a write - lock . * @ param aItem * The item to be updated . May not be < code > null < / code > . * @ param bInvokeCallbacks * < code > true < / code > to invoke callbacks , < co...
// Add to map - ensure to overwrite any existing _addItem ( aItem , EDAOActionType . UPDATE ) ; // Trigger save changes super . markAsChanged ( aItem , EDAOActionType . UPDATE ) ; if ( bInvokeCallbacks ) { // Invoke callbacks m_aCallbacks . forEach ( aCB -> aCB . onUpdateItem ( aItem ) ) ; }
public class Annotations { /** * Checks if all roles are played . * @ param role the role to check . * @ param r the roles that all have to be played * @ return true or false . */ public static boolean playsAll ( Role role , String ... r ) { } }
if ( role == null ) { return false ; } for ( String s : r ) { if ( ! role . value ( ) . contains ( s ) ) { return false ; } } return true ;
public class TaskServiceImpl { @ On ( Orchid . Lifecycle . FilesChanged . class ) public void onFilesChanges ( Orchid . Lifecycle . FilesChanged event ) { } }
if ( server != null && server . getWebsocket ( ) != null ) { server . getWebsocket ( ) . sendMessage ( "Files Changed" , "" ) ; } context . build ( ) ;
public class BatchAccumulator { /** * Append a record to this accumulator * This method should never fail unless there is an exception . A future object should always be returned * which can be queried to see if this record has been completed ( completion means the wrapped batch has been * sent and received ackno...
appendsInProgress . incrementAndGet ( ) ; try { if ( this . closed ) { throw new RuntimeException ( "Cannot append after accumulator has been closed" ) ; } return this . enqueue ( record , callback ) ; } finally { appendsInProgress . decrementAndGet ( ) ; }
public class BaseApplet { /** * Get the screen properties and set up the look and feel . * @ param propertyOwner The screen properties ( if null , I will look them up ) . */ @ SuppressWarnings ( { } }
"unchecked" , "rawtypes" } ) public void setupLookAndFeel ( PropertyOwner propertyOwner ) { Map < String , Object > properties = null ; if ( propertyOwner == null ) propertyOwner = this . retrieveUserProperties ( Params . SCREEN ) ; if ( propertyOwner == null ) { // Thin only RemoteTask task = ( RemoteTask ) this . get...
public class Beans { /** * Creates an instance of a given type by choosing the best constructor that matches the given list of arguments . * @ param < T > the type of the object to create * @ param type the type of the object to create * @ param args the arguments to pass to the constructor * @ param offset the...
if ( offset != 0 || count != args . length ) { return create ( type , Arrays . copyOfRange ( args , offset , offset + count ) ) ; } else { return create ( type , args ) ; }
public class SimpleSolrPersistentProperty { /** * ( non - Javadoc ) * @ see org . springframework . data . solr . core . mapping . SolrPersistentProperty # getSolrTypeName ( ) */ @ Override public String getSolrTypeName ( ) { } }
Indexed indexedAnnotation = getIndexAnnotation ( ) ; if ( indexedAnnotation != null && StringUtils . hasText ( indexedAnnotation . type ( ) ) ) { return indexedAnnotation . type ( ) ; } return getActualType ( ) . getSimpleName ( ) . toLowerCase ( ) ;
public class AttributeValue { /** * An attribute of type List . For example : * < code > " L " : [ { " S " : " Cookies " } , { " S " : " Coffee " } , { " N " , " 3.14159 " } ] < / code > * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setL ( java . util . C...
if ( this . l == null ) { setL ( new java . util . ArrayList < AttributeValue > ( l . length ) ) ; } for ( AttributeValue ele : l ) { this . l . add ( ele ) ; } return this ;
public class SwingGui { /** * Shows a { @ link FileWindow } for the given source , creating it * if it doesn ' t exist yet . if < code > lineNumber < / code > is greater * than - 1 , it indicates the line number to select and display . * @ param sourceUrl the source URL * @ param lineNumber the line number to s...
FileWindow w ; if ( sourceUrl != null ) { w = getFileWindow ( sourceUrl ) ; } else { JInternalFrame f = getSelectedFrame ( ) ; if ( f != null && f instanceof FileWindow ) { w = ( FileWindow ) f ; } else { w = currentWindow ; } } if ( w == null && sourceUrl != null ) { Dim . SourceInfo si = dim . sourceInfo ( sourceUrl ...
public class AlertPolicy { /** * Use { @ link # getUserLabelsMap ( ) } instead . */ @ java . lang . Deprecated public java . util . Map < java . lang . String , java . lang . String > getUserLabels ( ) { } }
return getUserLabelsMap ( ) ;
public class InstantUtils { /** * Return a String suitable for use as an edn { @ code # inst } , given * a { @ link Date } . * @ param date must not be null . * @ return an RFC3339 compatible string . */ public static String dateToString ( Date date ) { } }
GregorianCalendar c = new GregorianCalendar ( GMT ) ; c . setTime ( date ) ; String s = calendarToString ( c ) ; assert s . endsWith ( "+00:00" ) ; return s . substring ( 0 , s . length ( ) - 6 ) + "-00:00" ;
public class AmazonEC2Client { /** * Disables detailed monitoring for a running instance . For more information , see < a * href = " https : / / docs . aws . amazon . com / AWSEC2 / latest / UserGuide / using - cloudwatch . html " > Monitoring Your Instances and * Volumes < / a > in the < i > Amazon Elastic Compute...
request = beforeClientExecution ( request ) ; return executeUnmonitorInstances ( request ) ;
public class Json { /** * Converts netscaler resource to Json string . * @ param resrc nitro resource . * @ return returns a String */ public String resource_to_string ( base_resource resrc ) { } }
Gson gson = new Gson ( ) ; return gson . toJson ( resrc ) ;
public class SelectorBuilderImpl { /** * Adds a predicate for the specified field , property values , and operator . */ private SelectorBuilderImpl multipleValuePredicate ( String field , String [ ] propertyValues , PredicateOperator operator ) { } }
if ( propertyValues == null ) { return this ; } Predicate predicate = new Predicate ( ) ; predicate . setOperator ( operator ) ; predicate . setField ( field ) ; String [ ] values = Arrays . copyOf ( propertyValues , propertyValues . length ) ; predicate . setValues ( values ) ; this . predicates . add ( predicate ) ; ...
public class Rename { /** * Rename property of a node by creating a new one and deleting the old . */ @ Procedure ( mode = Mode . WRITE ) @ Description ( "apoc.refactor.rename.nodeProperty(oldName, newName, [nodes]) | rename all node's property from 'oldName' to 'newName'. If 'nodes' is provided renaming is applied to ...
String cypherIterate = nodes != null && ! nodes . isEmpty ( ) ? "UNWIND {nodes} AS n WITH n WHERE exists (n." + oldName + ") return n" : "match (n) where exists (n." + oldName + ") return n" ; String cypherAction = "set n." + newName + "= n." + oldName + " remove n." + oldName ; Map < String , Object > parameters = Map...
public class AnalyticsQuery { /** * Creates an { @ link AnalyticsQuery } with positional parameters as part of the query . * @ param statement the statement to send . * @ param positionalParams the positional parameters which will be put in for the placeholders . * @ param params the parameters to provide to the ...
return new ParameterizedAnalyticsQuery ( statement , positionalParams , null , params ) ;
public class MessageFormat { /** * Returns the ARG _ START index of the first occurrence of the plural number in a sub - message . * Returns - 1 if it is a REPLACE _ NUMBER . * Returns 0 if there is neither . */ private int findFirstPluralNumberArg ( int msgStart , String argName ) { } }
for ( int i = msgStart + 1 ; ; ++ i ) { Part part = msgPattern . getPart ( i ) ; Part . Type type = part . getType ( ) ; if ( type == Part . Type . MSG_LIMIT ) { return 0 ; } if ( type == Part . Type . REPLACE_NUMBER ) { return - 1 ; } if ( type == Part . Type . ARG_START ) { ArgType argType = part . getArgType ( ) ; i...
public class XStreamTransformer { /** * pojo - > xml * @ param clazz * @ param object * @ return */ public static < T > String toXml ( Class < T > clazz , T object ) { } }
return CLASS_2_XSTREAM_INSTANCE . get ( clazz ) . toXML ( object ) ;
public class BuildsInner { /** * Gets a link to download the build logs . * @ param resourceGroupName The name of the resource group to which the container registry belongs . * @ param registryName The name of the container registry . * @ param buildId The build ID . * @ throws IllegalArgumentException thrown i...
return getLogLinkWithServiceResponseAsync ( resourceGroupName , registryName , buildId ) . map ( new Func1 < ServiceResponse < BuildGetLogResultInner > , BuildGetLogResultInner > ( ) { @ Override public BuildGetLogResultInner call ( ServiceResponse < BuildGetLogResultInner > response ) { return response . body ( ) ; } ...
public class Classpath { /** * Search from URL . Fall back on prefix tokens if not able to read from original url param . * @ param result * the result urls * @ param prefix * the current prefix * @ param suffix * the suffix to match * @ param url * the current url to start search * @ throws IOExcepti...
boolean done = false ; InputStream is = _getInputStream ( url ) ; if ( is != null ) { try { ZipInputStream zis ; if ( is instanceof ZipInputStream ) { zis = ( ZipInputStream ) is ; } else { zis = new ZipInputStream ( is ) ; } try { ZipEntry entry = zis . getNextEntry ( ) ; // initial entry should not be null // if we a...
public class Vector3d { /** * Set the first two components from the given < code > v < / code > * and the z component from the given < code > z < / code > * @ param v * the { @ link Vector2ic } to copy the values from * @ param z * the z component * @ return this */ public Vector3d set ( Vector2ic v , doubl...
return set ( v . x ( ) , v . y ( ) , z ) ;
public class HCConditionalCommentNode { /** * Get the passed node wrapped in a conditional comment . This is a sanity * method for < code > new HCConditionalCommentNode ( this , sCondition ) < / code > . If * this node is already an { @ link HCConditionalCommentNode } the object is * simply casted . * @ param s...
if ( aNode instanceof HCConditionalCommentNode ) return ( HCConditionalCommentNode ) aNode ; return new HCConditionalCommentNode ( sCondition , aNode ) ;
public class SSLContextBuilder { /** * The paths and passwords for both keystore and truststore are provided . * And used to build an SSLContext . * @ param keystoreFilePath Absolute path for the keystore . * @ param keystorePassword Password for the keystore . * @ param truststoreFilePath Absolute path for the...
// Passwords are needed as char arrays char [ ] ckeystorePassword = keystorePassword . toCharArray ( ) ; char [ ] ctruststorePassword = truststorePassword . toCharArray ( ) ; // Load Keystore FileInputStream fIn = null ; KeyStore keystore = null ; try { fIn = new FileInputStream ( keystoreFilePath ) ; keystore = KeySto...
public class WPartialDateField { /** * { @ inheritDoc } */ @ Override protected boolean doHandleRequest ( final Request request ) { } }
// Valid date entered by the user String dateValue = getRequestValue ( request ) ; // Text entered by the user ( An empty string is treated as null ) String value = request . getParameter ( getId ( ) ) ; String text = ( Util . empty ( value ) ) ? null : value ; // Current date value String currentDate = getValue ( ) ; ...
public class HandshakeMessage { /** * Sets the protocol string for this handshake message . * @ param protocolString * the protocol string for this handshake message . */ public void setProtocolString ( String protocolString ) { } }
this . protocolString = protocolString ; if ( protocolString != null ) { try { this . stringLength = protocolString . getBytes ( "US-ASCII" ) . length ; } catch ( UnsupportedEncodingException uee ) { this . stringLength = 0 ; log . error ( "Couldn't encode to US-ASCII." , uee ) ; } } else { this . stringLength = 0 ; }
public class HelpTask { /** * { @ inheritDoc } Prints the usage statement . The format is : * < pre > * Usage : { tasks | . . . } [ arguments ] * < / pre > */ public String getScriptUsage ( ) { } }
StringBuffer scriptUsage = new StringBuffer ( NL ) ; scriptUsage . append ( getMessage ( "usage" , scriptName ) ) ; scriptUsage . append ( " {" ) ; for ( int i = 0 ; i < tasks . size ( ) ; i ++ ) { SecurityUtilityTask task = tasks . get ( i ) ; scriptUsage . append ( task . getTaskName ( ) ) ; if ( i != ( tasks . size ...
public class CryptoKey { /** * < code > . google . privacy . dlp . v2 . UnwrappedCryptoKey unwrapped = 2 ; < / code > */ public com . google . privacy . dlp . v2 . UnwrappedCryptoKey getUnwrapped ( ) { } }
if ( sourceCase_ == 2 ) { return ( com . google . privacy . dlp . v2 . UnwrappedCryptoKey ) source_ ; } return com . google . privacy . dlp . v2 . UnwrappedCryptoKey . getDefaultInstance ( ) ;
public class AddDynamicSearchAdsCampaign { /** * Creates the campaign . */ private static Campaign createCampaign ( AdWordsServicesInterface adWordsServices , AdWordsSession session , Budget budget ) throws RemoteException , ApiException { } }
// Get the CampaignService . CampaignServiceInterface campaignService = adWordsServices . get ( session , CampaignServiceInterface . class ) ; // Create campaign . Campaign campaign = new Campaign ( ) ; campaign . setName ( "Interplanetary Cruise #" + System . currentTimeMillis ( ) ) ; campaign . setAdvertisingChannelT...
public class AbstractFacade { /** * { @ inheritDoc } */ @ Override @ SuppressWarnings ( "unchecked" ) public < E extends R > void register ( final E readyObject , final Object ... keyPart ) { } }
register ( Key . create ( ( Class < R > ) readyObject . getClass ( ) , keyPart ) , readyObject ) ;
public class CmsDefaultXmlContentHandler { /** * Initializes the resource bundle to use for localized messages in this content handler . < p > * @ param root the " resourcebundle " element from the appinfo node of the XML content definition * @ param contentDefinition the content definition the validation rules bel...
if ( m_messageBundleNames == null ) { // it ' s uncommon to have more then one bundle so just initialize an array length of 2 m_messageBundleNames = new ArrayList < String > ( 2 ) ; } if ( single ) { // single " resourcebundle " node String messageBundleName = root . attributeValue ( APPINFO_ATTR_NAME ) ; if ( messageB...
public class Validator { /** * Validate email . */ protected void validateEmail ( String field , String errorKey , String errorMessage ) { } }
validateRegex ( field , emailAddressPattern , false , errorKey , errorMessage ) ;
public class GoogleAccount { /** * Gets all the google calendars hold by this source . * @ return The list of google calendars , always a new list . */ public List < GoogleCalendar > getGoogleCalendars ( ) { } }
List < GoogleCalendar > googleCalendars = new ArrayList < > ( ) ; for ( Calendar calendar : getCalendars ( ) ) { if ( ! ( calendar instanceof GoogleCalendar ) ) { continue ; } googleCalendars . add ( ( GoogleCalendar ) calendar ) ; } return googleCalendars ;
public class MainModule { /** * Provisioning of a RendererBuilder implementation to work with places ListView . More * information in this library : { @ link https : / / github . com / pedrovgs / Renderers } */ @ Provides protected PlacesCollectionRendererBuilder providePlaceCollectionRendererBuilder ( Context contex...
List < Renderer < PlaceViewModel > > prototypes = new LinkedList < Renderer < PlaceViewModel > > ( ) ; prototypes . add ( new PlaceRenderer ( context ) ) ; return new PlacesCollectionRendererBuilder ( prototypes ) ;
public class AbstractDirigent { /** * Executes all attached { @ link PostProcessor } s to process the specified { @ link Component } . * @ param in The component to process . * @ param context The compose context . * @ param args The macro arguments . * @ return The processed component . */ private Component ap...
Component out = in ; for ( final PostProcessor postProcessor : postProcessors ) { out = postProcessor . process ( out , context , args ) ; } return out ;
public class DdthCipherOutputStream { /** * { @ inheritDoc } */ @ Override public void close ( ) throws IOException { } }
if ( ! closed ) { closed = true ; try { byte [ ] buffer = cipher . doFinal ( ) ; if ( buffer != null ) { output . write ( buffer ) ; } } catch ( IllegalBlockSizeException | BadPaddingException e ) { throw new CipherException ( e ) ; } finally { if ( closeOutput ) { super . close ( ) ; } else { flush ( ) ; } } }
public class InvokeLambdaAction { /** * Invokes an AWS Lambda Function in sync mode using AWS Java SDK * @ param identity Access key associated with your Amazon AWS or IAM account . * Example : " wJalrXUtnFEMI / K7MDENG / bPxRfiCYEXAMPLEKEY " * @ param credential Secret access key ID associated with your Amazon A...
@ Output ( Outputs . RETURN_CODE ) , @ Output ( Outputs . RETURN_RESULT ) , @ Output ( Outputs . EXCEPTION ) } , responses = { @ Response ( text = Outputs . SUCCESS , field = Outputs . RETURN_CODE , value = Outputs . SUCCESS_RETURN_CODE , matchType = MatchType . COMPARE_EQUAL , responseType = ResponseType . RESOLVED ) ...
public class A_CmsEditSearchIndexDialog { /** * Commits the edited search index to the search manager . < p > */ @ Override public void actionCommit ( ) { } }
List < Throwable > errors = new ArrayList < Throwable > ( ) ; try { // if new create it first if ( ! m_searchManager . getSearchIndexesAll ( ) . contains ( m_index ) ) { // check the index name for invalid characters CmsStringUtil . checkName ( m_index . getName ( ) , INDEX_NAME_CONSTRAINTS , Messages . ERR_SEARCHINDEX...
public class AntPathMatcher { /** * Tokenize the given path String into parts , based on this matcher ' s settings . * @ param path the path to tokenize * @ return the tokenized path parts */ protected String [ ] tokenizePath ( String path ) { } }
return StringUtils . tokenizeToStringArray ( path , this . pathSeparator , this . trimTokens , true ) ;
public class TimephasedUtility { /** * For a given date range , determine the duration of work , based on the * timephased resource assignment data . * This method deals with timescale units of less than a day . * @ param projectCalendar calendar used for the resource assignment calendar * @ param rangeUnits ti...
throw new UnsupportedOperationException ( "Please request this functionality from the MPXJ maintainer" ) ;
public class SQLTransformer { /** * Used to convert a generic parameter to where conditions . * @ param methodBuilder * the method builder * @ param method * the method * @ param methodParamName * name of the parameter in the method * @ param paramName * the param name * @ param paramType * the para...
if ( method . hasAdapterForParam ( methodParamName ) ) { checkTypeAdapterForParam ( method , methodParamName , BindSqlParam . class ) ; methodBuilder . addCode ( AbstractSQLTransform . PRE_TYPE_ADAPTER_TO_STRING + "$L" + AbstractSQLTransform . POST_TYPE_ADAPTER , SQLTypeAdapterUtils . class , method . getAdapterForPara...
public class UdpClient { /** * Set a { @ link ChannelOption } value for low level connection settings like { @ code SO _ TIMEOUT } * or { @ code SO _ KEEPALIVE } . This will apply to each new channel from remote peer . * @ param key the option key * @ param value the option value * @ param < T > the option type...
Objects . requireNonNull ( key , "key" ) ; Objects . requireNonNull ( value , "value" ) ; return bootstrap ( b -> b . option ( key , value ) ) ;
public class AsmInvokeDistributeFactory { /** * 构建byte code * @ param parentClass 父类 * @ param className 生成的class名 * @ return 生成的class的byte code数据 */ public byte [ ] buildByteCode ( Class < ? > parentClass , String className ) { } }
ClassWriter cw = new ClassWriter ( ClassWriter . COMPUTE_MAXS ) ; cw . visit ( version , // Java version ACC_PUBLIC , // public class convert ( className ) , // package and name null , // signature ( null means not generic ) convert ( parentClass ) , // superclass new String [ ] { convert ( InvokeDistribute . class ) }...