signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class AxisAngle4d { /** * Set this { @ link AxisAngle4d } to the given values . * @ param angle * the angle in radians * @ param v * the rotation axis as a { @ link Vector3dc } * @ return this */ public AxisAngle4d set ( double angle , Vector3dc v ) { } }
return set ( angle , v . x ( ) , v . y ( ) , v . z ( ) ) ;
public class AlbumResource { /** * Parses an album response from a * < a href = " https : / / developer . spotify . com / web - api / album - endpoints / " > Spotify API album query < / a > . * @ param json The json response * @ return A list of albums with artist information */ private ArrayList < Album > parseA...
ArrayList < Album > albums = new ArrayList < > ( ) ; try { JsonNode jsonNode = this . objectMapper . readTree ( json ) ; for ( JsonNode albumNode : jsonNode . get ( "albums" ) ) { JsonNode artistsNode = albumNode . get ( "artists" ) ; // Exclude albums with 0 artists if ( artistsNode . size ( ) >= 1 ) { // Only keeping...
public class route6 { /** * Use this API to delete route6 resources . */ public static base_responses delete ( nitro_service client , route6 resources [ ] ) throws Exception { } }
base_responses result = null ; if ( resources != null && resources . length > 0 ) { route6 deleteresources [ ] = new route6 [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { deleteresources [ i ] = new route6 ( ) ; deleteresources [ i ] . network = resources [ i ] . network ; deleteresources ...
public class NetworkElement { /** * This method only returns a copy of the list , if you modify the copy , the * internal list of PossibleStates will be not modified . To interact with * the real list , use " addPossibleStatus " and " removePossibleStatus " methods * @ return a copy of possibleStates list */ publ...
List < String > copy = new ArrayList < String > ( ) ; for ( String possibleStatus : states . keySet ( ) ) { copy . add ( possibleStatus ) ; } return copy ;
public class UppercaseTransliterator { /** * Implements { @ link Transliterator # handleTransliterate } . */ @ Override protected synchronized void handleTransliterate ( Replaceable text , Position offsets , boolean isIncremental ) { } }
if ( csp == null ) { return ; } if ( offsets . start >= offsets . limit ) { return ; } iter . setText ( text ) ; result . setLength ( 0 ) ; int c , delta ; // Walk through original string // If there is a case change , modify corresponding position in replaceable iter . setIndex ( offsets . start ) ; iter . setLimit ( ...
public class JavacState { /** * Propagate recompilation through the dependency chains . * Avoid re - tainting packages that have already been compiled . */ public void taintPackagesDependingOnChangedPackages ( Set < String > pkgs , Set < String > recentlyCompiled ) { } }
for ( Package pkg : prev . packages ( ) . values ( ) ) { for ( String dep : pkg . dependencies ( ) ) { if ( pkgs . contains ( dep ) && ! recentlyCompiled . contains ( pkg . name ( ) ) ) { taintPackage ( pkg . name ( ) , " its depending on " + dep ) ; } } }
public class AppServiceCertificateOrdersInner { /** * Retrieve email history . * Retrieve email history . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param name Name of the certificate order . * @ throws IllegalArgumentException thrown if parameters fail the valida...
return retrieveCertificateEmailHistoryWithServiceResponseAsync ( resourceGroupName , name ) . toBlocking ( ) . single ( ) . body ( ) ;
public class PluginDefaultGroovyMethods { /** * Accumulates the elements of stream into a new Set . * @ param stream the Stream * @ param < T > the type of element * @ return a new { @ code java . util . Set } instance */ public static < T > Set < T > toSet ( Stream < T > stream ) { } }
return stream . collect ( Collectors . < T > toSet ( ) ) ;
public class SetDataClass { /** * Called when a valid record is read from the table / query . * @ param bDisplayOption If true , display any changes . */ public void doValidRecord ( boolean bDisplayOption ) { } }
String strClass = this . getOwner ( ) . getField ( FieldData . FIELD_CLASS ) . toString ( ) ; String strType = null ; if ( strClass . indexOf ( "Field" ) != - 1 ) { strType = strClass . substring ( 0 , strClass . indexOf ( "Field" ) ) ; if ( "Short Integer Double Float Currencys Percent Real Boolean String DateTime" . ...
public class BeanMetaData { /** * Gets the index of the remote busines interface . This method will throw an * IllegalStateException if a remte interface could not be matched . If it is * known that a match must occur on a remote business interface , then this * method should be used . * @ param interfaceName t...
int interfaceIndex = getRemoteBusinessInterfaceIndex ( interfaceName ) ; if ( interfaceIndex == - 1 ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "getRequiredRemoteBusinessInterfaceIndex : IllegalStateException : " + "Requested business interface not found : " + interf...
public class Options { /** * Sets the single yAxis . If you need to define more than one yAxis use * { @ link # addyAxis ( Axis ) } . If there are multiple Axes defined when calling * this method , only the specified axis will be defined afterwards . * @ param yAxis the single yAxis of the chart * @ return the ...
this . yAxis = new ArrayList < Axis > ( ) ; this . yAxis . add ( yAxis ) ; return this ;
public class AsteriskQueueImpl { /** * Shifts the position of the queue entries if needed * ( and fire PCE on queue entries if appropriate ) . */ private void shift ( ) { } }
int currentPos = 1 ; // Asterisk starts at 1 synchronized ( entries ) { for ( AsteriskQueueEntryImpl qe : entries ) { // Only set ( and fire PCE on qe ) if necessary if ( qe . getPosition ( ) != currentPos ) { qe . setPosition ( currentPos ) ; } currentPos ++ ; } }
public class SearchRange { /** * Check if the given { @ link SearchKey } matches this range . * @ param key * the specified { @ link SearchKey } * @ return if the given key matches */ public boolean match ( SearchKey key ) { } }
// It will not check if the key does not have the same length if ( ranges . length != key . length ( ) ) return false ; // Check one by one for ( int i = 0 ; i < ranges . length ; i ++ ) if ( ! ranges [ i ] . contains ( key . get ( i ) ) ) return false ; return true ;
public class Manager { /** * Post an event to controllers or other managers on { @ link EventBusC } . The event will be posted * on to the same thread as the caller . * @ param event event to controllers */ protected void postEvent2C ( final Object event ) { } }
if ( eventBus2C != null ) { eventBus2C . post ( event ) ; } else { logger . warn ( "Trying to post event {} to EventBusC which is null" , event . getClass ( ) . getName ( ) ) ; }
public class DoubleMatrix { /** * Solve linear equation Ax = b returning x * @ param b * @ return */ public DoubleMatrix solve ( DoubleMatrix b ) { } }
DoubleMatrix x = getInstance ( b . rows ( ) , b . columns ( ) ) ; solve ( b , x ) ; return x ;
public class KunderaQuery { /** * Adds the update clause . * @ param property * the property * @ param value * the value */ public void addUpdateClause ( final String property , final String value ) { } }
UpdateClause updateClause = new UpdateClause ( property . trim ( ) , value . trim ( ) ) ; updateClauseQueue . add ( updateClause ) ; addTypedParameter ( value . trim ( ) . startsWith ( "?" ) ? Type . INDEXED : value . trim ( ) . startsWith ( ":" ) ? Type . NAMED : null , property , updateClause ) ;
public class ReflectingConverter { /** * Add the self link to the entity . * @ param builder assumed not < code > null < / code > . * @ param resolvedUri the token resolved uri . Assumed not blank . */ private void handleSelfLink ( EntityBuilder builder , String resolvedUri ) { } }
if ( StringUtils . isBlank ( resolvedUri ) ) { return ; } Link link = LinkBuilder . newInstance ( ) . setRelationship ( Link . RELATIONSHIP_SELF ) . setHref ( resolvedUri ) . build ( ) ; builder . addLink ( link ) ;
public class ReadCommEventCounterResponse { /** * getMessage - - format the message into a byte array . * @ return Response as byte array */ public byte [ ] getMessage ( ) { } }
byte result [ ] = new byte [ 4 ] ; result [ 0 ] = ( byte ) ( status >> 8 ) ; result [ 1 ] = ( byte ) ( status & 0xFF ) ; result [ 2 ] = ( byte ) ( events >> 8 ) ; result [ 3 ] = ( byte ) ( events & 0xFF ) ; return result ;
public class StreamsUtils { /** * < p > Generates a stream composed of the N greatest different values of the provided stream , compared using the * natural order . This method calls the < code > filteringMaxKeys ( ) < / code > with the natural order comparator , * please refer to this javadoc for details . < / p >...
return filteringMaxKeys ( stream , numberOfMaxes , Comparator . naturalOrder ( ) ) ;
public class LinkedList { /** * This is a method used by the unit tests to determine the number of links in the list . * It ' s too inefficient for any other purpose . * @ return the number of links */ public int countLinks ( ) { } }
int count = 0 ; Link look = _dummyHead . getNextLogicalLink ( ) ; while ( look != null && _dummyTail != look ) { count ++ ; look = look . _getNextLink ( ) ; } return count ;
public class HiveMetaStoreEventHelper { /** * Table Creation */ protected static void submitSuccessfulTableCreation ( EventSubmitter eventSubmitter , HiveTable table ) { } }
eventSubmitter . submit ( TABLE_CREATION + SUCCESS_POSTFIX , getAdditionalMetadata ( table , Optional . < HivePartition > absent ( ) , Optional . < Exception > absent ( ) ) ) ;
public class CRFFeatureExporter { /** * Prefix features with U - ( for unigram ) features * or B - ( for bigram ) features * @ param feat String representing the feature * @ return new prefixed feature string */ private String ubPrefixFeatureString ( String feat ) { } }
if ( feat . endsWith ( "|C" ) ) { return "U-" + feat ; } else if ( feat . endsWith ( "|CpC" ) ) { return "B-" + feat ; } else { return feat ; }
public class XLog { /** * Log a message with level { @ link LogLevel # VERBOSE } . * @ param format the format of the message to log * @ param args the arguments of the message to log */ public static void v ( String format , Object ... args ) { } }
assertInitialization ( ) ; sLogger . v ( format , args ) ;
public class XLog { /** * Initialize log system , should be called only once . * @ param logLevel the log level , logs with a lower level than which would not be printed */ public static void init ( int logLevel ) { } }
init ( new LogConfiguration . Builder ( ) . logLevel ( logLevel ) . build ( ) , DefaultsFactory . createPrinter ( ) ) ;
public class EnumEditor { /** * Format the Enum as translated String */ public String getAsText ( ) { } }
Enum < ? > value = ( Enum < ? > ) getValue ( ) ; if ( value == null ) { return "" ; } String text = getMessagesAccessor ( ) . getMessage ( messagesKeyPrefix + value . name ( ) , ( String ) null ) ; if ( text == null ) { return value . toString ( ) ; } else { return text ; }
public class HashOrderIndependent { /** * ( non - Javadoc ) * @ see com . netflix . videometadata . serializer . blob . HashAlgorithm # write ( int [ ] ) */ @ Override public void write ( int [ ] b ) throws IOException { } }
write ( "int[]" ) ; long code = 0 ; for ( int i = 0 ; i < b . length ; i ++ ) { code = 31 * code + b [ i ] ; } write ( code ) ;
public class CommercePriceListAccountRelLocalServiceBaseImpl { /** * Deletes the commerce price list account rel with the primary key from the database . Also notifies the appropriate model listeners . * @ param commercePriceListAccountRelId the primary key of the commerce price list account rel * @ return the comm...
return commercePriceListAccountRelPersistence . remove ( commercePriceListAccountRelId ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link DictionaryEntryType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link DictionaryEntryType } { @ co...
return new JAXBElement < DictionaryEntryType > ( _DefinitionMember_QNAME , DictionaryEntryType . class , null , value ) ;
public class EntryFactory { /** * Returns an { @ link Entry } having the given { @ link Dn } . The attribute type of the Rdn is ' common name ' . */ public static Entry namedObject ( Dn dn ) { } }
Entry entry = new DefaultEntry ( dn ) ; try { entry . add ( SchemaConstants . OBJECT_CLASS_ATTRIBUTE , SchemaConstants . NAMED_OBJECT_OC ) ; entry . add ( SchemaConstants . CN_ATTRIBUTE , dn . getRdn ( ) . getName ( ) ) ; } catch ( LdapException e ) { throw new LdapRuntimeException ( e ) ; } return entry ;
public class IdentityPatchContext { /** * Copy a patch element * @ param entry the patch entry * @ param patchId the patch id for the element * @ param modifications the element modifications * @ return the new patch element */ protected static PatchElement createPatchElement ( final PatchEntry entry , String p...
final PatchElement patchElement = entry . element ; final PatchElementImpl element = new PatchElementImpl ( patchId ) ; element . setProvider ( patchElement . getProvider ( ) ) ; // Add all the rollback actions element . getModifications ( ) . addAll ( modifications ) ; element . setDescription ( patchElement . getDesc...
public class Cache { /** * Deletes all resources that match the given resource name criteria . * @ param regex * the resource name pattern . * @ return * the cache itself , for method chaining . */ public Cache delete ( Regex regex ) { } }
logger . debug ( "deleting all files named according to /{}/" , regex ) ; storage . delete ( regex ) ; return this ;
public class RecursableDiffEntity { /** * Returns true if some child entity matched . * < p > Caches the result for future calls . */ final boolean isAnyChildMatched ( ) { } }
if ( isAnyChildMatched == null ) { isAnyChildMatched = false ; for ( RecursableDiffEntity entity : childEntities ( ) ) { if ( ( entity . isMatched ( ) && ! entity . isContentEmpty ( ) ) || entity . isAnyChildMatched ( ) ) { isAnyChildMatched = true ; break ; } } } return isAnyChildMatched ;
public class Message { /** * A map of the attributes requested in < code > < a > ReceiveMessage < / a > < / code > to their respective values . Supported * attributes : * < ul > * < li > * < code > ApproximateReceiveCount < / code > * < / li > * < li > * < code > ApproximateFirstReceiveTimestamp < / code ...
setAttributes ( attributes ) ; return this ;
public class AuthActivity { /** * Set static authentication parameters */ static void setAuthParams ( String appKey , String desiredUid , String [ ] alreadyAuthedUids , String sessionId , String webHost , String apiType ) { } }
sAppKey = appKey ; sDesiredUid = desiredUid ; sAlreadyAuthedUids = ( alreadyAuthedUids != null ) ? alreadyAuthedUids : new String [ 0 ] ; sSessionId = sessionId ; sWebHost = ( webHost != null ) ? webHost : DEFAULT_WEB_HOST ; sApiType = apiType ;
public class BalanceSheetPdf { /** * < p > Simple delegator to print number . < / p > * @ param pAddParam additional param * @ param pVal value * @ return String */ public final String prn ( final Map < String , Object > pAddParam , final BigDecimal pVal ) { } }
return this . srvNumberToString . print ( pVal . toString ( ) , ( String ) pAddParam . get ( "decSepv" ) , ( String ) pAddParam . get ( "decGrSepv" ) , ( Integer ) pAddParam . get ( "reportDp" ) , ( Integer ) pAddParam . get ( "digInGr" ) ) ;
public class LoggingTool { /** * Shows FATAL output for the Object . It uses the toString ( ) method . * @ param object Object to apply toString ( ) too and output */ @ Override public void fatal ( Object object ) { } }
if ( toSTDOUT ) { printToStderr ( "FATAL" , object . toString ( ) ) ; } else { log4jLogger . fatal ( "" + object . toString ( ) ) ; }
public class Atomix { /** * Returns a new Atomix configuration . * The configuration will be loaded from the given file and will fall back to { @ code atomix . conf } , { @ code * atomix . json } , or { @ code atomix . properties } if located on the classpath . * @ param configFiles the Atomix configuration files...
return config ( Thread . currentThread ( ) . getContextClassLoader ( ) , Arrays . asList ( configFiles ) , AtomixRegistry . registry ( ) ) ;
public class SeaGlassLookAndFeel { /** * Paint a region . * @ param state the SynthContext describing the current component , region , * and state . * @ param g the Graphics context used to paint the subregion . * @ param bounds the bounds to paint in . */ private static void paintRegion ( SynthContext state , ...
JComponent c = state . getComponent ( ) ; SynthStyle style = state . getStyle ( ) ; int x ; int y ; int width ; int height ; if ( bounds == null ) { x = 0 ; y = 0 ; width = c . getWidth ( ) ; height = c . getHeight ( ) ; } else { x = bounds . x ; y = bounds . y ; width = bounds . width ; height = bounds . height ; } //...
public class AmazonRoute53Client { /** * Retrieve a list of the health checks that are associated with the current AWS account . * @ param listHealthChecksRequest * A request to retrieve a list of the health checks that are associated with the current AWS account . * @ return Result of the ListHealthChecks operat...
request = beforeClientExecution ( request ) ; return executeListHealthChecks ( request ) ;
public class CSSFactory { /** * Parses file into StyleSheet . Internally transforms file to URL * @ param fileName Name of file * @ param encoding Encoding used to parse input * @ return Parsed style sheet * @ throws CSSException In case that parsing error occurs * @ throws IOException If file is not found or...
try { File f = new File ( fileName ) ; URL url = f . toURI ( ) . toURL ( ) ; return parse ( url , encoding ) ; } catch ( MalformedURLException e ) { String message = "Unable to construct URL from fileName: " + fileName ; log . error ( message ) ; throw new FileNotFoundException ( message ) ; }
public class DateTimeStaticExtensions { /** * Parse text into a { @ link java . time . YearMonth } using the provided pattern . * @ param type placeholder variable used by Groovy categories ; ignored for default static methods * @ param text String to be parsed to create the date instance * @ param pattern patter...
return YearMonth . parse ( text , DateTimeFormatter . ofPattern ( pattern ) ) ;
public class AcceptableUsagePolicySubmitAction { /** * Record the fact that the policy is accepted . * @ param context the context * @ param credential the credential * @ param messageContext the message context * @ return success if policy acceptance is recorded successfully . */ private Event submit ( final R...
if ( repository . submit ( context , credential ) ) { return new EventFactorySupport ( ) . event ( this , CasWebflowConstants . TRANSITION_ID_AUP_ACCEPTED ) ; } return error ( ) ;
public class CharacterCLA { /** * { @ inheritDoc } */ @ Override public Character convert ( final String valueStr , final boolean _caseSensitive , final Object target ) throws ParseException { } }
if ( valueStr . length ( ) == 1 ) { if ( _caseSensitive ) return new Character ( valueStr . charAt ( 0 ) ) ; return new Character ( valueStr . toLowerCase ( ) . charAt ( 0 ) ) ; } throw new ParseException ( "invalid value for character argument: " + valueStr , 0 ) ;
public class S6aServerSessionImpl { /** * ( non - Javadoc ) * @ see org . jdiameter . api . app . StateMachine # getState ( java . lang . Class ) */ @ Override @ SuppressWarnings ( "unchecked" ) public < E > E getState ( Class < E > stateType ) { } }
return stateType == S6aSessionState . class ? ( E ) this . sessionData . getS6aSessionState ( ) : null ;
public class ContainerConfigurationController { /** * private static final Pattern jmxPattern = Pattern . compile ( " ( ? i : . * jmx . * ) " ) ; */ public void remapContainer ( @ Observes BeforeSetup event , CubeRegistry cubeRegistry , ContainerRegistry containerRegistry ) throws InstantiationException , IllegalAccess...
Container container = ContainerUtil . getContainerByDeployableContainer ( containerRegistry , event . getDeployableContainer ( ) ) ; if ( container == null ) { return ; } Cube < ? > cube = cubeRegistry . getCube ( ContainerUtil . getCubeIDForContainer ( container ) ) ; if ( cube == null ) { return ; // No Cube found ma...
public class ApiOvhTelephony { /** * Alter this object properties * REST : PUT / telephony / { billingAccount } / miniPabx / { serviceName } / hunting / agent / { agentNumber } * @ param body [ required ] New object properties * @ param billingAccount [ required ] The name of your billingAccount * @ param servi...
String qPath = "/telephony/{billingAccount}/miniPabx/{serviceName}/hunting/agent/{agentNumber}" ; StringBuilder sb = path ( qPath , billingAccount , serviceName , agentNumber ) ; exec ( qPath , "PUT" , sb . toString ( ) , body ) ;
public class SqlRunConfigurationMarshaller { /** * Marshall the given parameter object . */ public void marshall ( SqlRunConfiguration sqlRunConfiguration , ProtocolMarshaller protocolMarshaller ) { } }
if ( sqlRunConfiguration == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( sqlRunConfiguration . getInputId ( ) , INPUTID_BINDING ) ; protocolMarshaller . marshall ( sqlRunConfiguration . getInputStartingPositionConfiguration ( ) , INPUTSTA...
public class IOUtil { /** * Deletes a file or directory . * When deleting a directory files and subdirectories in it are also * deleted . * @ param fileOrDir */ public static void emptyAndDelete ( File fileOrDir ) { } }
if ( fileOrDir . isDirectory ( ) ) { File [ ] files = fileOrDir . listFiles ( ) ; for ( File file : files ) { emptyAndDelete ( file ) ; } } fileOrDir . delete ( ) ;
public class WebSocketClient { /** * Blocks until both threads exit . The actual close must be triggered separately . This is just a convenience * method to make sure everything shuts down , if desired . * @ throws InterruptedException */ public void blockClose ( ) throws InterruptedException { } }
// If the thread is new , it will never run , since we closed the connection before we actually connected if ( writer . getInnerThread ( ) . getState ( ) != Thread . State . NEW ) { writer . getInnerThread ( ) . join ( ) ; } getInnerThread ( ) . join ( ) ;
public class WCApplicationHelper { /** * Helper method to create a war and placed it to the specified directory which is relative from / publish / servers / directory . */ public static void createWar ( LibertyServer server , String dir , String warName , boolean addWarResources , String jarName , boolean addJarResourc...
addEarToServer ( server , dir , null , false , warName , addWarResources , jarName , addJarResources , packageNames ) ;
public class ThreadPool { /** * Will close down all the threads in the pool as they become * available . If all the threads cannot become available within the * specified timeout , any active threads not yet returned to the * thread pool are interrupted . * @ param timeout Milliseconds to wait before unavailabl...
synchronized ( mPool ) { mClosed = true ; mPool . notifyAll ( ) ; if ( timeout != 0 ) { if ( timeout < 0 ) { while ( mActive > 0 ) { // Infinite wait for notification . mPool . wait ( 0 ) ; } } else { long expireTime = System . currentTimeMillis ( ) + timeout ; while ( mActive > 0 ) { mPool . wait ( timeout ) ; if ( Sy...
public class VirtualMachineImagesInner { /** * Gets a list of all virtual machine image versions for the specified location , publisher , offer , and SKU . * @ param location The name of a supported Azure region . * @ param publisherName A valid image publisher . * @ param offer A valid image publisher offer . ...
return ServiceFuture . fromResponse ( listWithServiceResponseAsync ( location , publisherName , offer , skus , filter , top , orderby ) , serviceCallback ) ;
public class DTMDefaultBase { /** * Given a node handle , advance to its next sibling . * If not yet resolved , waits for more nodes to be added to the document and * tries again . * @ param nodeHandle int Handle of the node . * @ return int Node - number of next sibling , * or DTM . NULL to indicate none exi...
if ( nodeHandle == DTM . NULL ) return DTM . NULL ; return makeNodeHandle ( _nextsib ( makeNodeIdentity ( nodeHandle ) ) ) ;
public class SoccomClient { /** * Get the response from the server , after sending a request . * @ param timeout timeout value in seconds * @ return The response message . * @ exception SoccomException Thrown when an IOException is encountered . */ public String getresp ( int timeout ) throws SoccomException { } ...
int size , n ; String sizestr ; try { byte [ ] _header = new byte [ SoccomMessage . HEADER_SIZE ] ; _socket . setSoTimeout ( timeout * 1000 ) ; n = _in . read ( _header , 0 , SoccomMessage . HEADER_SIZE ) ; if ( n != SoccomMessage . HEADER_SIZE ) throw new SoccomException ( SoccomException . RECV_HEADER ) ; logline ( "...
public class LocalityStats { /** * Peform the computation statistics based on a locality record . * @ param record The locality information . */ private void computeStatistics ( Record record ) { } }
computeStatistics ( record . tip , record . host , record . inputBytes ) ;
public class NumberFormat { /** * < strong > [ icu ] < / strong > Set a particular DisplayContext value in the formatter , * such as CAPITALIZATION _ FOR _ STANDALONE . * @ param context The DisplayContext value to set . */ public void setContext ( DisplayContext context ) { } }
if ( context . type ( ) == DisplayContext . Type . CAPITALIZATION ) { capitalizationSetting = context ; }
public class HeapCompactUnorderedSketch { /** * Constructs this sketch from correct , valid arguments . * @ param cache in compact form * @ param empty The correct < a href = " { @ docRoot } / resources / dictionary . html # empty " > Empty < / a > . * @ param seedHash The correct * < a href = " { @ docRoot } /...
if ( ( curCount == 1 ) && ( thetaLong == Long . MAX_VALUE ) ) { return new SingleItemSketch ( cache [ 0 ] , seedHash ) ; } return new HeapCompactUnorderedSketch ( cache , empty , seedHash , curCount , thetaLong ) ;
public class WorkflowServiceImpl { /** * Start a new workflow with StartWorkflowRequest , which allows task to be executed in a domain . * @ param name Name of the workflow you want to start . * @ param version Version of the workflow you want to start . * @ param correlationId CorrelationID of the workflow you w...
if ( workflowDef == null ) { workflowDef = metadataService . getWorkflowDef ( name , version ) ; if ( workflowDef == null ) { throw new ApplicationException ( ApplicationException . Code . NOT_FOUND , String . format ( "No such workflow found by name: %s, version: %d" , name , version ) ) ; } return workflowExecutor . ...
public class Admin { /** * @ throws PageException */ private void doGetDefaultSecurityManager ( ) throws PageException { } }
ConfigServer cs = ConfigImpl . getConfigServer ( config , password ) ; SecurityManager dsm = cs . getDefaultSecurityManager ( ) ; _fillSecData ( dsm ) ;
public class ResourceList { /** * Get the URLs of all resources in this list , by calling { @ link Resource # getURL ( ) } for each item in the list . * @ return The URLs of all resources in this list . */ public List < URL > getURLs ( ) { } }
final List < URL > resourceURLs = new ArrayList < > ( this . size ( ) ) ; for ( final Resource resource : this ) { resourceURLs . add ( resource . getURL ( ) ) ; } return resourceURLs ;
public class DefaultContextInteractionsSkill { /** * { @ inheritDoc } . * @ deprecated see { @ link # willReceive ( UUID , Event ) } */ @ Deprecated @ Override public void receive ( UUID receiverID , Event event ) { } }
willReceive ( receiverID , event ) ;
public class ObjectBindTransform { /** * / * ( non - Javadoc ) * @ see com . abubusoft . kripton . processor . bind . transform . BindTransform # generateSerializeOnXml ( com . abubusoft . kripton . processor . bind . BindTypeContext , com . squareup . javapoet . MethodSpec . Builder , java . lang . String , com . sq...
// TODO QUA // TypeName typeName = resolveTypeName ( property . getParent ( ) , // property . getPropertyType ( ) . getTypeName ( ) ) ; TypeName typeName = property . getPropertyType ( ) . getTypeName ( ) ; String bindName = context . getBindMapperName ( context , typeName ) ; // @ formatter : off if ( property . isNul...
public class GroundyCodeGen { /** * Copy all callbacks implementations from - > to the specified set . It makes sure * to copy the callbacks that don ' t exist already on the destination set . * @ param from key for the set of callbacks to copy from * @ param to key for the set of callbacks to copy to */ private ...
final Set < ProxyImplContent > proxyImplContentsTo = implMap . get ( to ) ; if ( proxyImplContentsTo == null ) { return ; } final Set < ProxyImplContent > proxyImplContentsFrom = implMap . get ( from ) ; if ( proxyImplContentsFrom == null ) { return ; } for ( ProxyImplContent proxyImplContentFrom : proxyImplContentsFro...
public class ApiOvhDomain { /** * Delete a name server * REST : DELETE / domain / { serviceName } / nameServer / { id } * @ param serviceName [ required ] The internal name of your domain * @ param id [ required ] Id of the object */ public net . minidev . ovh . api . domain . OvhTask serviceName_nameServer_id_DE...
String qPath = "/domain/{serviceName}/nameServer/{id}" ; StringBuilder sb = path ( qPath , serviceName , id ) ; String resp = exec ( qPath , "DELETE" , sb . toString ( ) , null ) ; return convertTo ( resp , net . minidev . ovh . api . domain . OvhTask . class ) ;
public class Option { /** * 标题和副标题 * @ param text * @ param subtext * @ return */ public Option title ( String text , String subtext ) { } }
this . title ( ) . text ( text ) . subtext ( subtext ) ; return this ;
public class TrajectoryEnvelope { /** * Returns a { @ link Geometry } representing the footprint of the robot in a given pose . * @ param x The x coordinate of the pose used to create the footprint . * @ param y The y coordinate of the pose used to create the footprint . * @ param theta The orientation of the pos...
AffineTransformation at = new AffineTransformation ( ) ; at . rotate ( theta ) ; at . translate ( x , y ) ; Geometry rect = at . transform ( footprint ) ; return rect ;
public class DwrClientSideHandlerGeneratorImpl { /** * / * ( non - Javadoc ) * @ see net . jawr . web . resource . bundle . handler . ClientSideHandlerGeneratorImpl # getHeaderSection ( javax . servlet . http . HttpServletRequest ) */ protected StringBuffer getHeaderSection ( HttpServletRequest request ) { } }
StringBuffer sb = super . getHeaderSection ( request ) ; if ( null != this . config . getDwrMapping ( ) ) { sb . append ( DWRParamWriter . buildDWRJSParams ( request . getContextPath ( ) , PathNormalizer . joinPaths ( request . getContextPath ( ) , this . config . getDwrMapping ( ) ) ) ) ; sb . append ( "if(!window.DWR...
import java . util . ArrayList ; import java . util . Collections ; import java . util . List ; public class ReverseSubarray { /** * Function to reverse a portion of a list up to a particular position . * > > > reverseSubarray ( [ 1 , 2 , 3 , 4 , 5 , 6 ] , 4) * [ 4 , 3 , 2 , 1 , 5 , 6] * > > > reverseSubarray ( [...
List < Integer > front = arr . subList ( 0 , until ) ; Collections . reverse ( front ) ; List < Integer > back = arr . subList ( until , arr . size ( ) ) ; front . addAll ( back ) ; return front ;
public class APIAccessService { /** * Process the json API request * @ param request * @ param requestType POST or GET * @ return the { @ link JSONObject } representation of the http response * @ throws CertificateException * @ throws IOException * @ throws JSONException */ public String processHTTPAPIReque...
log . debug ( "API request: " + request . toString ( 4 ) ) ; String jsonRequest = request . toString ( ) ; HttpURLConnection ucon = null ; if ( "POST" . equals ( requestType ) ) { URL url = new URL ( urlString ) ; log . debug ( "API request: " + url ) ; ucon = ( HttpURLConnection ) url . openConnection ( ) ; ucon . set...
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EEnum getMappingOptionMapValue ( ) { } }
if ( mappingOptionMapValueEEnum == null ) { mappingOptionMapValueEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 91 ) ; } return mappingOptionMapValueEEnum ;
public class ByteBufUtil { /** * Copies the all content of { @ code src } to a { @ link ByteBuf } using { @ link ByteBuf # writeBytes ( byte [ ] , int , int ) } . * @ param src the source string to copy * @ param dst the destination buffer */ public static void copy ( AsciiString src , ByteBuf dst ) { } }
copy ( src , 0 , dst , src . length ( ) ) ;
public class OWLObjectComplementOfImpl_CustomFieldSerializer { /** * Serializes the content of the object into the * { @ link com . google . gwt . user . client . rpc . SerializationStreamWriter } . * @ param streamWriter the { @ link com . google . gwt . user . client . rpc . SerializationStreamWriter } to write t...
serialize ( streamWriter , instance ) ;
public class DefaultRaftMember { /** * Demotes the server to the given type . */ private CompletableFuture < Void > configure ( RaftMember . Type type ) { } }
if ( type == this . type ) { return CompletableFuture . completedFuture ( null ) ; } CompletableFuture < Void > future = new CompletableFuture < > ( ) ; cluster . getContext ( ) . getThreadContext ( ) . execute ( ( ) -> configure ( type , future ) ) ; return future ;
public class SSLConfigManager { /** * Helper method to build the SSLConfig properties from the SecureSocketLayer * model object ( s ) . * @ param map * @ param reinitialize * @ return SSLConfig * @ throws Exception */ private SSLConfig parseSecureSocketLayer ( Map < String , Object > map , boolean reinitializ...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "parseSecureSocketLayer" ) ; SSLConfig sslprops = new SSLConfig ( ) ; // READ KEYSTORE OBJECT ( S ) WSKeyStore wsks_key = null ; String keyStoreName = ( String ) map . get ( LibertyConstants . KEY_KEYSTORE_REF ) ; if ( null != ...
public class BitSet { /** * Sets a bit and returns the previous value . The index should be less than the BitSet * size . * @ param index the index to set * @ return previous state of the index */ public boolean getAndSet ( int index ) { } }
int wordNum = index >> 6 ; // div 64 int bit = index & 0x3f ; // mod 64 long bitmask = 1L << bit ; boolean val = ( bits [ wordNum ] & bitmask ) != 0 ; bits [ wordNum ] |= bitmask ; return val ;
public class AmazonConfigClient { /** * Accepts a resource type and returns a list of resource identifiers that are aggregated for a specific resource * type across accounts and regions . A resource identifier includes the resource type , ID , ( if available ) the custom * resource name , source account , and sourc...
request = beforeClientExecution ( request ) ; return executeListAggregateDiscoveredResources ( request ) ;
public class SimpleFormValidator { /** * Validates if given button ( usually checkbox ) is checked . Use VisCheckBox to additionally support error border around it . */ public void checked ( Button button , String errorMsg ) { } }
buttons . add ( new CheckedButtonWrapper ( button , true , errorMsg ) ) ; button . addListener ( changeListener ) ; validate ( ) ;
public class NodeUtil { /** * Copy any annotations that follow a named value . * @ param source * @ param destination */ static void copyNameAnnotations ( Node source , Node destination ) { } }
if ( source . getBooleanProp ( Node . IS_CONSTANT_NAME ) ) { destination . putBooleanProp ( Node . IS_CONSTANT_NAME , true ) ; }
public class V1InstanceCreator { /** * Create a new member entity with a name , short name , and default role . * @ param name The full name of the user . * @ param shortName An alias or nickname used throughout the VersionOne user * interface . * @ param defaultRole The new user ' s default role on projects . ...
Member member = new Member ( instance ) ; member . setName ( name ) ; member . setShortName ( shortName ) ; member . setDefaultRole ( defaultRole ) ; addAttributes ( member , attributes ) ; member . save ( ) ; return member ;
public class Decoration { /** * Basic construction . Only the data is required */ public static < T > Decoration < T > of ( Decorator < T > decorator , T data ) { } }
Validate . notNull ( decorator , "The decorator is required" ) ; Validate . notNull ( data , "The decoration data is required" ) ; return new Decoration < > ( decorator , data , null ) ;
public class AWSGlueClient { /** * Retrieves metadata for all runs of a given job definition . * @ param getJobRunsRequest * @ return Result of the GetJobRuns operation returned by the service . * @ throws InvalidInputException * The input provided was not valid . * @ throws EntityNotFoundException * A spec...
request = beforeClientExecution ( request ) ; return executeGetJobRuns ( request ) ;
public class SpiceServiceListenerNotifier { /** * Notify interested observers of request completion . * @ param request the request that has completed . * @ param requestListeners the listeners to notify . */ public void notifyObserversOfRequestProcessed ( CachedSpiceRequest < ? > request , Set < RequestListener < ...
RequestProcessingContext requestProcessingContext = new RequestProcessingContext ( ) ; requestProcessingContext . setExecutionThread ( Thread . currentThread ( ) ) ; requestProcessingContext . setRequestListeners ( requestListeners ) ; post ( new RequestProcessedNotifier ( request , spiceServiceListenerList , requestPr...
public class BootstrapContextImpl { /** * Configure a managed connection factory , admin object , or activation spec . * Resource adapter config properties are also configured on the instance * if they are valid for the type of object and haven ' t already been configured . * @ param instance managed connection f...
NumberFormatException . class , Throwable . class } ) public void configure ( Object instance , String id , Map < String , ? > configProps , @ Sensitive Map < String , Object > activationProps , AdminObjectService adminObjSvc , AtomicServiceReference < AdminObjectService > destinationRef ) throws Exception { final Stri...
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcDefinedSymbolSelect ( ) { } }
if ( ifcDefinedSymbolSelectEClass == null ) { ifcDefinedSymbolSelectEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 950 ) ; } return ifcDefinedSymbolSelectEClass ;
public class DescribeAddressesResult { /** * Information about the Elastic IP addresses . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setAddresses ( java . util . Collection ) } or { @ link # withAddresses ( java . util . Collection ) } if you want to *...
if ( this . addresses == null ) { setAddresses ( new com . amazonaws . internal . SdkInternalList < Address > ( addresses . length ) ) ; } for ( Address ele : addresses ) { this . addresses . add ( ele ) ; } return this ;
public class SparseMatrix { /** * Put item to the matrix in row , column position . * @ param row item row position * @ param column item column position * @ param item Object */ void put ( int row , int column , @ NonNull TObj item ) { } }
SparseArrayCompat < TObj > array = mData . get ( row ) ; if ( array == null ) { array = new SparseArrayCompat < > ( ) ; array . put ( column , item ) ; mData . put ( row , array ) ; } else { array . put ( column , item ) ; }
public class SCMS { /** * Parses { @ link SCM } configuration from the submitted form . * @ param target * The project for which this SCM is configured to . */ @ SuppressWarnings ( "deprecation" ) public static SCM parseSCM ( StaplerRequest req , AbstractProject target ) throws FormException , ServletException { } ...
SCM scm = SCM . all ( ) . newInstanceFromRadioList ( req . getSubmittedForm ( ) . getJSONObject ( "scm" ) ) ; if ( scm == null ) { scm = new NullSCM ( ) ; // JENKINS - 36043 workaround for AbstractMultiBranchProject . submit } scm . getDescriptor ( ) . generation ++ ; return scm ;
public class GeneralFeatureDetector { /** * Computes point features from image gradients . * @ param image Original image . * @ param derivX image derivative in along the x - axis . Only needed if { @ link # getRequiresGradient ( ) } is true . * @ param derivY image derivative in along the y - axis . Only needed ...
intensity . process ( image , derivX , derivY , derivXX , derivYY , derivXY ) ; GrayF32 intensityImage = intensity . getIntensity ( ) ; int numSelectMin = - 1 ; int numSelectMax = - 1 ; if ( maxFeatures > 0 ) { if ( intensity . localMinimums ( ) ) numSelectMin = excludeMinimum == null ? maxFeatures : maxFeatures - excl...
public class SparseSquareMatrix { /** * return C = A + B * @ param B * @ return */ public SparseSquareMatrix plus ( SparseSquareMatrix B ) { } }
SparseSquareMatrix A = this ; if ( A . N != B . N ) throw new IllegalArgumentException ( "Dimensions disagree. " + A . N + " != " + B . N ) ; SparseSquareMatrix C = new SparseSquareMatrix ( N ) ; for ( int i = 0 ; i < N ; i ++ ) C . rows [ i ] = A . rows [ i ] . plus ( B . rows [ i ] ) ; return C ;
public class ResourceUtils { /** * Finds the resource directory for an instance . * The resource directory may be the one of another component . * This is the case when a component extends another component . * An extending component can override the resource directory . * @ param applicationFilesDirectory the ...
File root = new File ( applicationFilesDirectory , Constants . PROJECT_DIR_GRAPH ) ; File result = new File ( "No recipe directory." ) ; Set < Component > alreadyChecked = new HashSet < > ( ) ; for ( Component c = component ; c != null ; c = c . getExtendedComponent ( ) ) { // Prevent infinite loops for exotic cases if...
public class CloseableIterators { /** * Combines multiple iterators into a single closeable iterator . The returned * closeable iterator iterates across the elements of each iterator in { @ code inputs } . * The input iterators are not polled until necessary . */ public static < T > CloseableIterator < T > concat (...
return wrap ( Iterators . concat ( iterators ) , iterators ) ;
public class EJBMDOrchestrator { /** * Process any role links that have been established . We * will create a HashMap linking these role - links ( if any ) to * their corresponding roles . This information is needed during * isCallerInRole processing . * @ param bmd BeanMetaData for the specific Enterprise Bean...
final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "processSecurityRoleLink" ) ; } EnterpriseBean ejbBean = bmd . wccm . enterpriseBean ; if ( ejbBean != null ) { // get security - role - ref if any // The role name in thesecurity - role ...
public class NettyConnection { /** * Reads an error from the given buffer . */ private Throwable readError ( ByteBuf buffer ) { } }
return context . serializer ( ) . readObject ( INPUT . get ( ) . setByteBuf ( buffer ) ) ;
public class AWSLambdaClient { /** * Modify the version - specific settings of a Lambda function . * These settings can vary between versions of a function and are locked when you publish a version . You can ' t * modify the configuration of a published version , only the unpublished version . * To configure func...
request = beforeClientExecution ( request ) ; return executeUpdateFunctionConfiguration ( request ) ;
public class GrailsDomainBinder { /** * Binds a joined sub - class mapping using table - per - subclass * @ param sub The Grails sub class * @ param joinedSubclass The Hibernate Subclass object * @ param mappings The mappings Object * @ param gormMapping The GORM mapping object * @ param sessionFactoryBeanNam...
bindClass ( sub , joinedSubclass , mappings ) ; String schemaName = getSchemaName ( mappings ) ; String catalogName = getCatalogName ( mappings ) ; Table mytable = mappings . addTable ( schemaName , catalogName , getJoinedSubClassTableName ( sub , joinedSubclass , null , mappings , sessionFactoryBeanName ) , null , fal...
public class FastAggregation { /** * Minimizes memory usage while computing the xor aggregate on a moderate number of bitmaps . * This function runs in linearithmic ( O ( n log n ) ) time with respect to the number of bitmaps . * @ param bitmaps input bitmaps * @ return aggregated bitmap * @ see # xor ( Roaring...
RoaringBitmap answer = new RoaringBitmap ( ) ; if ( bitmaps . length == 0 ) { return answer ; } PriorityQueue < ContainerPointer > pq = new PriorityQueue < > ( bitmaps . length ) ; for ( int k = 0 ; k < bitmaps . length ; ++ k ) { ContainerPointer x = bitmaps [ k ] . highLowContainer . getContainerPointer ( ) ; if ( x ...
public class FakeTable { /** * Init this table . * Add this table to the database and hook this table to the record . * @ param database The database to add this table to . * @ param record The record to connect to this table . */ public void init ( BaseDatabase database , Record record ) { } }
super . init ( database , record ) ; m_databaseFake = m_database ; m_database = this . getSharedTable ( ) . getDatabase ( ) ; // Return the correct database
public class SimpleDataArrayCompactor { /** * Frees segments that were compacted successfully . */ private void freeCompactedSegments ( ) { } }
SegmentManager segManager = _dataArray . getSegmentManager ( ) ; if ( segManager == null ) return ; while ( ! _freeQueue . isEmpty ( ) ) { Segment seg = _freeQueue . remove ( ) ; try { segManager . freeSegment ( seg ) ; } catch ( Exception e ) { _log . error ( "failed to free Segment " + seg . getSegmentId ( ) + ": " +...
public class SDVariable { /** * Max norm ( infinity norm ) reduction operation : The output contains the max norm for each tensor / subset along the * specified dimensions : < br > * { @ code out = max ( abs ( x [ i ] ) ) } < br > * Note that if keepDims = true , the output variable has the same rank as the input...
return sameDiff . normmax ( name , this , keepDims , dimensions ) ;
public class JsonObject { /** * Appends a new member to the end of this object , with the specified name and the specified JSON value . * This method < strong > does not prevent duplicate names < / strong > . Calling this method with a name that already exists * in the object will append another member with the sam...
if ( name == null ) { throw new NullPointerException ( NAME_IS_NULL ) ; } if ( value == null ) { throw new NullPointerException ( VALUE_IS_NULL ) ; } table . add ( name , names . size ( ) ) ; names . add ( name ) ; values . add ( value ) ; return this ;