signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class AbstractJournalOperation { /** * Write the operation to the given journal file * @ param journalFile teh journal file */ protected void writeTo ( JournalFile journalFile ) throws JournalException { } }
journalFile . writeByte ( type ) ; journalFile . writeLong ( transactionId ) ;
public class Balancer { /** * / * Initialize balancer . It sets the value of the threshold , and * builds the communication proxies to * namenode as a client and a secondary namenode and retry proxies * when connection fails . */ private void init ( InetSocketAddress namenodeAddress ) throws IOException { } }
this . namenodeAddress = namenodeAddress ; this . myMetrics = new BalancerMetrics ( conf , namenodeAddress ) ; this . fetchBlocksSize = conf . getLong ( BalancerConfigKeys . DFS_BALANCER_FETCH_SIZE_KEY , BalancerConfigKeys . DFS_BALANCER_FETCH_SIZE_DEFAULT ) ; this . minBlockReplicas = conf . getInt ( BalancerConfigKey...
public class GuidCompressor { /** * Conversion of an integer into a number with base 64 * using the table cConversionTable * @ param number * @ param code * @ param len * @ return true if no error occurred */ private static boolean cv_to_64 ( long number , char [ ] code , int len ) { } }
long act ; int iDigit , nDigits ; char [ ] result = new char [ 5 ] ; if ( len > 5 ) return false ; act = number ; nDigits = len - 1 ; for ( iDigit = 0 ; iDigit < nDigits ; iDigit ++ ) { result [ nDigits - iDigit - 1 ] = cConversionTable [ ( int ) ( act % 64 ) ] ; act /= 64 ; } result [ len - 1 ] = '\0' ; if ( act != 0 ...
public class CustomScopeAnnotationConfigurer { /** * Checks how is bean defined and deduces scope name from JSF CDI annotations . * @ param definition beanDefinition */ private void registerJsfCdiToSpring ( BeanDefinition definition ) { } }
if ( definition instanceof AnnotatedBeanDefinition ) { AnnotatedBeanDefinition annDef = ( AnnotatedBeanDefinition ) definition ; String scopeName = null ; // firstly check whether bean is defined via configuration if ( annDef . getFactoryMethodMetadata ( ) != null ) { scopeName = deduceScopeName ( annDef . getFactoryMe...
public class Admin { /** * @ throws PageException */ private void doResetPassword ( ) throws PageException { } }
try { admin . removePassword ( getString ( "contextPath" , null ) ) ; } catch ( Exception e ) { SystemOut . printDate ( e ) ; } store ( ) ;
public class GPX { /** * Read an GPX object from the given { @ code input } stream . * @ since 1.1 * @ param input the input stream from where the GPX date is read * @ param lenient if { @ code true } , out - of - range and syntactical errors are * ignored . E . g . a { @ code WayPoint } with { @ code lat } val...
return reader ( Version . V11 , lenient ? Mode . LENIENT : Mode . STRICT ) . read ( input ) ;
public class CheckSum { /** * Update the underlying buffer using the short * @ param number number to be stored in checksum buffer */ public void update ( short number ) { } }
byte [ ] numberInBytes = new byte [ ByteUtils . SIZE_OF_SHORT ] ; ByteUtils . writeShort ( numberInBytes , number , 0 ) ; update ( numberInBytes ) ;
public class CmsVaadinUtils { /** * Reads the declarative design for a component and localizes it using a messages object . < p > * The design will need to be located in the same directory as the component ' s class and have ' . html ' as a file extension . * @ param component the component for which to read the de...
Class < ? > componentClass = component . getClass ( ) ; List < Class < ? > > classes = Lists . newArrayList ( ) ; classes . add ( componentClass ) ; classes . addAll ( ClassUtils . getAllSuperclasses ( componentClass ) ) ; InputStream designStream = null ; for ( Class < ? > cls : classes ) { if ( cls . getName ( ) . st...
public class BaseMessagingEngineImpl { /** * Accessor method to return a destination definition . * @ param bus * @ param key * @ param newCache * @ return the destination cache */ BaseDestinationDefinition getSIBDestinationByUuid ( String bus , String key , boolean newCache ) throws SIBExceptionDestinationNotF...
String thisMethodName = "getSIBDestinationByUuid" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , new Object [ ] { bus , key , new Boolean ( newCache ) } ) ; } BaseDestinationDefinition bdd = null ; if ( oldDestCache == null || newCache ) { bdd = ( Ba...
public class Panels { /** * Creates a new { @ code Panel } with a { @ code LinearLayout } layout manager in vertical mode and adds all the * components passed in * @ param components Components to be added to the new { @ code Panel } , in order * @ return The new { @ code Panel } */ public static Panel vertical (...
Panel panel = new Panel ( ) ; panel . setLayoutManager ( new LinearLayout ( Direction . VERTICAL ) ) ; for ( Component component : components ) { panel . addComponent ( component ) ; } return panel ;
public class StringUtil { /** * Ensures that a string includes a given substring at a given position . * Extends the string with a given string if it is not already there . * E . g an URL " www . vg . no " , to " http : / / www . vg . no " . * @ param pSource The source string . * @ param pSubstring The substri...
StringBuilder newString = new StringBuilder ( pSource ) ; try { String existingSubstring = pSource . substring ( pPosition , pPosition + pSubstring . length ( ) ) ; if ( ! existingSubstring . equalsIgnoreCase ( pSubstring ) ) { newString . insert ( pPosition , pSubstring ) ; } } catch ( Exception e ) { // Do something ...
public class SIXAResourceProxy { /** * Returns the transaction timeout for this XAResource instance . * @ return int * @ throws XAException if an exception is thrown at the ME . In the * event of a comms failure , an XAException with XAER _ RMFAIL will * be thrown . */ public int getTransactionTimeout ( ) throw...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getTransactionTimeout" ) ; int timeout = 0 ; try { CommsByteBuffer request = getCommsByteBuffer ( ) ; request . putInt ( getTransactionId ( ) ) ; CommsByteBuffer reply = jfapExchange ( request , JFapChannelConstants ...
public class DocumentVersionMetadata { /** * The thumbnail of the document . * @ param thumbnail * The thumbnail of the document . * @ return Returns a reference to this object so that method calls can be chained together . */ public DocumentVersionMetadata withThumbnail ( java . util . Map < String , String > th...
setThumbnail ( thumbnail ) ; return this ;
public class CalendarScanListener { /** * GetNewCalendarPath Method . */ public String getNewCalendarPath ( File file ) { } }
StringTokenizer st = new StringTokenizer ( file . getName ( ) ) ; int iPlace = 0 , iMonth = 0 , iYear = 0 ; while ( st . hasMoreTokens ( ) ) { String strToken = st . nextToken ( ) ; if ( strToken . length ( ) > 2 ) break ; // Not a date if ( ! Utility . isNumeric ( strToken ) ) break ; // Not a date if ( strToken . ind...
public class CsvFileExtensions { /** * Stores a komma seperated file to a properties object . As key is the number from the counter . * @ param output * the output * @ param input * the input * @ param comments * the comments * @ throws IOException * Signals that an I / O exception has occurred . */ pub...
final Properties prop = readFilelistToProperties ( input ) ; try ( final OutputStream out = StreamExtensions . getOutputStream ( output , true ) ) { prop . store ( out , comments ) ; } final OutputStream out = StreamExtensions . getOutputStream ( output , true ) ; prop . store ( out , comments ) ;
public class HttpClientBuilder { /** * Configures secure schema for the HTTPS for current host * ( see { @ link # ssl ( String ) } ) . * @ param schemasecure schema ( usually , this is " https " ) * @ return this * @ see # ssl ( String ) */ public HttpClientBuilder secureSchema ( String schema ) { } }
if ( sslHostConfig == null ) { throw new IllegalStateException ( "ssl(String) must be called before this" ) ; } sslHostConfig . secureSchema = schema ; return this ;
public class NormalDistributionTypeImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setMean ( double newMean ) { } }
double oldMean = mean ; mean = newMean ; boolean oldMeanESet = meanESet ; meanESet = true ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , BpsimPackage . NORMAL_DISTRIBUTION_TYPE__MEAN , oldMean , mean , ! oldMeanESet ) ) ;
public class CodedInput { /** * START EXTRA */ @ Override public < T > int readFieldNumber ( Schema < T > schema ) throws IOException { } }
if ( isAtEnd ( ) ) { lastTag = 0 ; return 0 ; } // are we reading packed field ? if ( isCurrentFieldPacked ( ) ) { if ( packedLimit < getTotalBytesRead ( ) ) throw ProtobufException . misreportedSize ( ) ; // Return field number while reading packed field return lastTag >>> TAG_TYPE_BITS ; } packedLimit = 0 ; final int...
public class EhcacheBase { /** * { @ inheritDoc } */ @ Override public boolean replace ( final K key , final V oldValue , final V newValue ) { } }
replaceObserver . begin ( ) ; try { statusTransitioner . checkAvailable ( ) ; checkNonNull ( key , oldValue , newValue ) ; try { Store . ReplaceStatus status = doReplace ( key , oldValue , newValue ) ; switch ( status ) { case HIT : replaceObserver . end ( ReplaceOutcome . HIT ) ; return true ; case MISS_PRESENT : repl...
public class MPBase { /** * Returns standard headers for all the requests * @ return a collection with headers objects */ private static Collection < Header > getStandardHeaders ( ) { } }
Collection < Header > colHeaders = new Vector < Header > ( ) ; colHeaders . add ( new BasicHeader ( HTTP . CONTENT_TYPE , "application/json" ) ) ; colHeaders . add ( new BasicHeader ( HTTP . USER_AGENT , "MercadoPago Java SDK/1.0.10" ) ) ; colHeaders . add ( new BasicHeader ( "x-product-id" , "BC32A7VTRPP001U8NHJ0" ) )...
public class WebGL10 { /** * < p > { @ code glBufferSubData } redefines some or all of the data store for the buffer object currently bound to * { @ code target } . Data starting at byte offset { @ code offset } and extending for { @ code size } bytes is copied to the * data store from the memory pointed to by { @ ...
checkContextCompatibility ( ) ; Int16Array dataBuffer = Int16ArrayNative . create ( data . length ) ; dataBuffer . set ( data ) ; nglBufferSubData ( target , offset , size , dataBuffer ) ;
public class MtasUpdateRequestProcessorResultWriter { /** * ( non - Javadoc ) * @ see java . io . Closeable # close ( ) */ @ Override public void close ( ) throws IOException { } }
if ( ! closed ) { objectOutputStream . close ( ) ; fileOutputStream . close ( ) ; closed = true ; }
public class GVRNewWrapperProvider { /** * Wraps a RGBA color . * A color consists of 4 float values ( r , g , b , a ) starting from offset * @ param buffer * the buffer to wrap * @ param offset * the offset into buffer * @ return the wrapped color */ @ Override public AiColor wrapColor ( ByteBuffer buffer ...
AiColor color = new AiColor ( buffer , offset ) ; return color ;
public class ExamplesUtil { /** * Generates examples for string properties or parameters with given format * @ param format the format of the string property * @ param enumValues the enum values * @ return example */ public static String generateStringExample ( String format , List < String > enumValues ) { } }
if ( enumValues == null || enumValues . isEmpty ( ) ) { if ( format == null ) { return "string" ; } else { switch ( format ) { case "byte" : return "Ynl0ZQ==" ; case "date" : return "1970-01-01" ; case "date-time" : return "1970-01-01T00:00:00Z" ; case "email" : return "email@example.com" ; case "password" : return "se...
public class ListAccountSettingsResult { /** * The account settings for the resource . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setSettings ( java . util . Collection ) } or { @ link # withSettings ( java . util . Collection ) } if you want to override...
if ( this . settings == null ) { setSettings ( new com . amazonaws . internal . SdkInternalList < Setting > ( settings . length ) ) ; } for ( Setting ele : settings ) { this . settings . add ( ele ) ; } return this ;
public class TransportClient { /** * Sends an opaque message to the RpcHandler on the server - side . The callback will be invoked * with the server ' s response or upon any failure . * @ param message The message to send . * @ param callback Callback to handle the RPC ' s reply . * @ return The RPC ' s id . */...
if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Sending RPC to {}" , getRemoteAddress ( channel ) ) ; } long requestId = requestId ( ) ; handler . addRpcRequest ( requestId , callback ) ; RpcChannelListener listener = new RpcChannelListener ( requestId , callback ) ; channel . writeAndFlush ( new RpcRequest ( re...
public class ThemeSwitcher { /** * Returns a map marker { @ link Bitmap } based on the current theme setting . * @ param context to retrieve the drawable for the given resource ID * @ return { @ link Bitmap } map marker dark or light */ public static Bitmap retrieveThemeMapMarker ( Context context ) { } }
TypedValue destinationMarkerResId = resolveAttributeFromId ( context , R . attr . navigationViewDestinationMarker ) ; int markerResId = destinationMarkerResId . resourceId ; Drawable markerDrawable = ContextCompat . getDrawable ( context , markerResId ) ; return BitmapUtils . getBitmapFromDrawable ( markerDrawable ) ;
public class SessionManager { /** * Downloads a magnet uri . * @ param magnetUri the magnet uri to download * @ param saveDir the path to save the downloaded files */ public void download ( String magnetUri , File saveDir ) { } }
if ( session == null ) { return ; } error_code ec = new error_code ( ) ; add_torrent_params p = add_torrent_params . parse_magnet_uri ( magnetUri , ec ) ; if ( ec . value ( ) != 0 ) { throw new IllegalArgumentException ( ec . message ( ) ) ; } sha1_hash info_hash = p . getInfo_hash ( ) ; torrent_handle th = session . f...
public class AbstractBigtableTable { /** * { @ inheritDoc } */ @ Override public void batch ( List < ? extends Row > actions , Object [ ] results ) throws IOException , InterruptedException { } }
LOG . trace ( "batch(List<>, Object[])" ) ; try ( Scope scope = TRACER . spanBuilder ( "BigtableTable.batch" ) . startScopedSpan ( ) ) { addBatchSizeAnnotation ( actions ) ; getBatchExecutor ( ) . batch ( actions , results ) ; }
public class IncrementalSAXSource_Filter { /** * DTDHandler support . */ public void notationDecl ( String a , String b , String c ) throws SAXException { } }
if ( null != clientDTDHandler ) clientDTDHandler . notationDecl ( a , b , c ) ;
public class ContainerBase { /** * { @ inheritDoc } * @ see org . jboss . shrinkwrap . api . Archive # contains ( java . lang . String ) */ @ Override public boolean contains ( final String path ) throws IllegalArgumentException { } }
Validate . notNull ( path , "Path must be specified" ) ; return this . contains ( ArchivePaths . create ( path ) ) ;
public class ResourceLoader { /** * Loads the contents of a project resource file in a string . * @ param resourceFileName The name of the resource file . * @ return A string value representing the entire content of the resource . * @ throws IOException * @ throws URISyntaxException */ public static String load...
try ( InputStream is = ResourceLoader . class . getClassLoader ( ) . getResourceAsStream ( resourceFileName ) ) { StringWriter stringWriter = new StringWriter ( ) ; IOUtils . copy ( is , stringWriter , StandardCharsets . UTF_8 ) ; return stringWriter . toString ( ) ; }
public class BigtableDataClientWrapper { /** * { @ inheritDoc } */ @ Override public Row readModifyWriteRow ( ReadModifyWriteRow readModifyWriteRow ) { } }
ReadModifyWriteRowResponse response = delegate . readModifyWriteRow ( readModifyWriteRow . toProto ( requestContext ) ) ; return new DefaultRowAdapter ( ) . createRowFromProto ( response . getRow ( ) ) ;
public class OverlyConcreteParameter { /** * determines whether the method is a baked in special method of the jdk * @ param methodName the method name to check * @ param methodSig the parameter signature of the method to check * @ return if it is a well known baked in method */ private static boolean methodIsSpe...
return SignatureBuilder . SIG_READ_OBJECT . equals ( methodName + methodSig ) ;
public class ResponseDownloadPerformer { public void downloadByteData ( ResponseDownloadResource resource , HttpServletResponse response ) { } }
final byte [ ] byteData = resource . getByteData ( ) ; if ( byteData == null ) { String msg = "Either byte data or input stream is required: " + resource ; throw new IllegalArgumentException ( msg ) ; } try { final OutputStream out = response . getOutputStream ( ) ; try { out . write ( byteData ) ; } finally { closeDow...
public class StopInstanceRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( StopInstanceRequest stopInstanceRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( stopInstanceRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( stopInstanceRequest . getInstanceId ( ) , INSTANCEID_BINDING ) ; protocolMarshaller . marshall ( stopInstanceRequest . getForce ( ) , FORCE_BINDING ) ; } catch ( Exc...
public class Strman { /** * This method returns the index within the calling String object of the last occurrence of the specified value , searching backwards from the offset . * Returns - 1 if the value is not found . The search starts from the end and case sensitive . * @ param value The input String * @ param ...
validate ( value , NULL_STRING_PREDICATE , NULL_STRING_MSG_SUPPLIER ) ; return lastIndexOf ( value , needle , value . length ( ) , true ) ;
public class RuleBasedCollator { /** * Method to set numeric collation to its default value . * @ see # getNumericCollation * @ see # setNumericCollation */ public void setNumericCollationDefault ( ) { } }
checkNotFrozen ( ) ; CollationSettings defaultSettings = getDefaultSettings ( ) ; if ( settings . readOnly ( ) == defaultSettings ) { return ; } CollationSettings ownedSettings = getOwnedSettings ( ) ; ownedSettings . setFlagDefault ( CollationSettings . NUMERIC , defaultSettings . options ) ; setFastLatinOptions ( own...
public class CsvFileExtensions { /** * Formats the List that contains String - object to a csv - file wich is plus - minus 100 characters * in every line . * @ param list * The List with the Strings . * @ return The String produced from the List . */ private static String formatListToString ( final List < Strin...
int lineLength = 0 ; final StringBuffer sb = new StringBuffer ( ) ; for ( final String str : list ) { final int length = str . length ( ) ; lineLength = length + lineLength ; sb . append ( str ) ; sb . append ( ", " ) ; if ( 100 < lineLength ) { sb . append ( "\n" ) ; lineLength = 0 ; } } return sb . toString ( ) . tri...
public class SlopPusherJob { /** * A slop is dead if the destination node or the store does not exist * anymore on the cluster . * @ param slop * @ return */ protected boolean isSlopDead ( Cluster cluster , Set < String > storeNames , Slop slop ) { } }
// destination node , no longer exists if ( ! cluster . getNodeIds ( ) . contains ( slop . getNodeId ( ) ) ) { return true ; } // destination store , no longer exists if ( ! storeNames . contains ( slop . getStoreName ( ) ) ) { return true ; } // else . slop is alive return false ;
public class LinkedIOSubchannel { /** * Returns the linked downstream channel that has been created for the * given component and ( upstream ) subchannel . If more than one linked * subchannel has been created for a given component and subchannel , * the linked subchannel created last is returned . * @ param hu...
return upstreamChannel . associated ( new KeyWrapper ( hub ) , LinkedIOSubchannel . class ) ;
public class ResourceUtteranceReader { /** * { @ inheritDoc } */ @ Override public InputStream read ( final String locale ) { } }
Validate . notNull ( locale , "Locale must not be blank." ) ; final String resourcePath = leadingPath + locale + resourceLocation ; final String resourcePath2 = resourcePath . startsWith ( "/" ) ? resourcePath . substring ( 1 ) : resourcePath ; final ClassLoader cl = getClass ( ) . getClassLoader ( ) ; Validate . notNu...
public class NwwPanel { /** * Set the globe as sphere . */ public void setSphereGlobe ( ) { } }
Earth globe = new Earth ( ) ; wwd . getModel ( ) . setGlobe ( globe ) ; wwd . getView ( ) . stopMovement ( ) ; wwd . redraw ( ) ;
public class JFSCheckBox { /** * Set the value . * @ param objValue The raw data ( a Boolean ) . */ public void setControlValue ( Object objValue ) { } }
boolean bSelected = false ; if ( objValue instanceof Boolean ) { bSelected = ( ( Boolean ) objValue ) . booleanValue ( ) ; } else if ( objValue instanceof String ) { String strValue = objValue . toString ( ) ; if ( strValue . length ( ) > 0 ) { if ( ( Character . toUpperCase ( strValue . charAt ( 0 ) ) == 'T' ) || ( Ch...
public class BuildingType { /** * Gets the value of the genericApplicationPropertyOfBuilding property . * This accessor method returns a reference to the live list , * not a snapshot . Therefore any modification you make to the * returned list will be present inside the JAXB object . * This is why there is not ...
if ( _GenericApplicationPropertyOfBuilding == null ) { _GenericApplicationPropertyOfBuilding = new ArrayList < JAXBElement < Object > > ( ) ; } return this . _GenericApplicationPropertyOfBuilding ;
public class Cob2Xsd { /** * Execute the translation from COBOL to XML Schema . * @ param cobolReader reads the raw COBOL source * @ param targetNamespace the generated XML schema target namespace ( null * for no namespace ) * @ param xsltFileName an optional xslt to apply on the XML Schema * @ return the XML...
try { if ( _log . isDebugEnabled ( ) ) { _log . debug ( "Translating with options: {}" , getConfig ( ) . toString ( ) ) ; _log . debug ( "Target namespace: {}" , targetNamespace ) ; } return xsdToString ( emitXsd ( toModel ( cobolReader ) , targetNamespace ) , xsltFileName ) ; } catch ( RecognizerException e ) { throw ...
public class ConnectionImpl { /** * ( non - Javadoc ) * @ see com . ibm . wsspi . sib . core . SICoreConnection # createTemporaryDestination ( com . ibm . ws . sib . common . Distribution , java . lang . String ) */ @ Override public SIDestinationAddress createTemporaryDestination ( Distribution distribution , String...
if ( TraceComponent . isAnyTracingEnabled ( ) && CoreSPIConnection . tc . isEntryEnabled ( ) ) SibTr . entry ( CoreSPIConnection . tc , "createTemporaryDestination" , new Object [ ] { this , destinationPrefix , distribution } ) ; // See if this connection has been closed checkNotClosed ( ) ; // Check to make sure that ...
public class EJSContainer { /** * LIDB2617.11 added this method . F88119 made method public */ public void preInvokeMdbAfterActivate ( EJSWrapperBase wrapper , EJSDeployedSupport s , Object eb , // d414873 Object [ ] args ) throws RemoteException { } }
// Now perform preinvoke processing that must occur after // the bean is activated . preInvokeAfterActivate ( wrapper , eb , s , args ) ; // If there is a registered message endpoint collaborator , call it for preInvoke processing . MessageEndpointCollaborator meCollaborator = getEJBRuntime ( ) . getMessageEndpointColl...
public class Reporter { /** * Helper to recordStep , which takes in some result , and appends a time waited , if * appropriate . If timeTook is greater than zero , some time was waited along with * the action , and the returned result will reflect that * @ param actual - the actual outcome from the check * @ pa...
if ( timeTook > 0 ) { String lowercase = actual . substring ( 0 , 1 ) . toLowerCase ( ) ; actual = "After waiting for " + timeTook + " seconds, " + lowercase + actual . substring ( 1 ) ; } return actual ;
public class AgreementsInner { /** * Gets a list of integration account agreements . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the PagedList & lt ; IntegrationA...
return listByIntegrationAccountsNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < IntegrationAccountAgreementInner > > , Page < IntegrationAccountAgreementInner > > ( ) { @ Override public Page < IntegrationAccountAgreementInner > call ( ServiceResponse < Page < IntegrationAccou...
public class ApiOvhPackxdsl { /** * Get the available templates * REST : GET / pack / xdsl / { packName } / siteBuilderFull / options / templates * @ param packName [ required ] The internal name of your pack */ public ArrayList < OvhSiteBuilderTemplate > packName_siteBuilderFull_options_templates_GET ( String pack...
String qPath = "/pack/xdsl/{packName}/siteBuilderFull/options/templates" ; StringBuilder sb = path ( qPath , packName ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t8 ) ;
public class TreeWriter { /** * Generate the interface hierarchy and class hierarchy . */ public void generateTreeFile ( ) throws IOException { } }
Content body = getTreeHeader ( ) ; Content headContent = getResource ( "doclet.Hierarchy_For_All_Packages" ) ; Content heading = HtmlTree . HEADING ( HtmlConstants . TITLE_HEADING , false , HtmlStyle . title , headContent ) ; Content div = HtmlTree . DIV ( HtmlStyle . header , heading ) ; addPackageTreeLinks ( div ) ; ...
public class LogUtils { /** * Zwraca logger o określonej nazwie będący implementacją interfejsu * { @ link Logger } . * @ param < T > Parametr typu klasy loggera . * @ param name Nazwa zwracanego logger ' a . * @ return Logger o wskazanej nazwie . */ @ SuppressWarnings ( "unchecked" ) public static < T , L ...
return ( L ) SLF4JLoggerFactory . getLogger ( name ) ;
public class StringGrabber { /** * Splits this string around matches of the given regular expression . * @ param regexp * @ return */ public StringGrabberList split ( String regexp ) { } }
final StringGrabberList retList = new StringGrabberList ( ) ; final String string = sb . toString ( ) ; String [ ] splitedStrings = string . split ( regexp ) ; for ( String str : splitedStrings ) { retList . add ( new StringGrabber ( str ) ) ; } return retList ;
public class MiniMax { /** * Find the maximum distance of one object to a set . * @ param dq Distance query * @ param i Current object * @ param cy Set of candidates * @ param maxDist Known maximum to others * @ param minMaxDist Early stopping threshold * @ return Maximum distance */ private static double f...
for ( DBIDIter j = cy . iter ( ) ; j . valid ( ) ; j . advance ( ) ) { double dist = dq . distance ( i , j ) ; if ( dist > maxDist ) { // Stop early , if we already know a better candidate . if ( dist >= minMaxDist ) { return dist ; } maxDist = dist ; } } return maxDist ;
public class ChangeLog { /** * Returns a { @ link Comparator } that specifies the sort order of the { @ link ReleaseItem } s . * The default implementation returns the items in reverse order ( latest version first ) . */ protected Comparator < ReleaseItem > getChangeLogComparator ( ) { } }
return new Comparator < ReleaseItem > ( ) { @ Override public int compare ( ReleaseItem lhs , ReleaseItem rhs ) { if ( lhs . versionCode < rhs . versionCode ) { return 1 ; } else if ( lhs . versionCode > rhs . versionCode ) { return - 1 ; } else { return 0 ; } } } ;
public class CmsNewResourceTypeDialog { /** * Adjustes module config . < p > */ private void adjustModuleConfig ( ) { } }
Locale l = CmsLocaleManager . getLocale ( "en" ) ; try { CmsResource config = m_cms . readResource ( m_config . getValue ( ) ) ; CmsFile configFile = m_cms . readFile ( config ) ; CmsXmlContent xmlContent = CmsXmlContentFactory . unmarshal ( m_cms , configFile ) ; int number = xmlContent . getIndexCount ( XMLPath . CON...
public class HttpClientMockBuilder { /** * Adds action which returns provided XML in UTF - 8 and status 200 . Additionally it sets " Content - type " header to " application / xml " . * @ param response JSON to return * @ return response builder */ public HttpClientResponseBuilder doReturnXML ( String response , Ch...
return responseBuilder . doReturnXML ( response , charset ) ;
public class DynamicByteBuffer { /** * Adds the . * @ param array the array * @ return the dynamic byte buffer */ public DynamicByteBuffer add ( byte [ ] array ) { } }
if ( array . length + this . length < capacity ) { DynamicByteBufferHelper . _idx ( buffer , length , array ) ; } else { buffer = DynamicByteBufferHelper . grow ( buffer , buffer . length * 2 + array . length ) ; capacity = buffer . length ; DynamicByteBufferHelper . _idx ( buffer , length , array ) ; } length += array...
public class MutableHashTable { /** * This method clears all partitions currently residing ( partially ) in memory . It releases all memory * and deletes all spilled partitions . * This method is intended for a hard cleanup in the case that the join is aborted . */ protected void clearPartitions ( ) { } }
for ( int i = this . partitionsBeingBuilt . size ( ) - 1 ; i >= 0 ; -- i ) { final HashPartition < BT , PT > p = this . partitionsBeingBuilt . get ( i ) ; try { p . clearAllMemory ( this . availableMemory ) ; } catch ( Exception e ) { LOG . error ( "Error during partition cleanup." , e ) ; } } this . partitionsBeingBui...
public class StartGameSessionPlacementRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( StartGameSessionPlacementRequest startGameSessionPlacementRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( startGameSessionPlacementRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( startGameSessionPlacementRequest . getPlacementId ( ) , PLACEMENTID_BINDING ) ; protocolMarshaller . marshall ( startGameSessionPlacementRequest . getGa...
public class CopticDate { /** * Obtains a { @ code CopticDate } representing a date in the Coptic calendar * system from the proleptic - year , month - of - year and day - of - month fields . * This returns a { @ code CopticDate } with the specified fields . * The day must be valid for the year and month , otherw...
return CopticDate . create ( prolepticYear , month , dayOfMonth ) ;
public class AbstractConnectionFactory { /** * Creates and returns the connection to be used . * @ return The connection */ public Connection < T > createConnection ( ) { } }
// log info this . LOGGER . logInfo ( new Object [ ] { "Opening a new connection from factory type: " , this . getClass ( ) . getName ( ) } , null ) ; // create resource T resource = this . createResourceImpl ( ) ; if ( resource == null ) { throw new FaxException ( "Unable to create resource." ) ; } // create connectio...
public class SquareNode { /** * Discards previous information */ public void reset ( ) { } }
square = null ; touch = null ; center . set ( - 1 , - 1 ) ; largestSide = 0 ; smallestSide = Double . MAX_VALUE ; graph = RESET_GRAPH ; for ( int i = 0 ; i < edges . length ; i ++ ) { if ( edges [ i ] != null ) throw new RuntimeException ( "BUG!" ) ; sideLengths [ i ] = 0 ; }
public class CompilerConfiguration { /** * Method to configure a this CompilerConfiguration by using Properties . * For a list of available properties look at { link { @ link # CompilerConfiguration ( Properties ) } . * @ param configuration The properties to get flag values from . */ public void configure ( Proper...
String text = null ; int numeric = 0 ; // Warning level numeric = getWarningLevel ( ) ; try { text = configuration . getProperty ( "groovy.warnings" , "likely errors" ) ; numeric = Integer . parseInt ( text ) ; } catch ( NumberFormatException e ) { text = text . toLowerCase ( ) ; if ( text . equals ( "none" ) ) { numer...
public class DigestUtils { /** * Calculates digest and returns the value as a hex string . * @ param is input stream * @ param digest digest algorithm * @ return digest as a hex string * @ throws IOException On error reading from the stream */ public static String dgstHex ( InputStream is , Digest digest ) thro...
checkNotNull ( is ) ; byte [ ] dgstBytes = dgst ( is , digest ) ; return BaseEncoding . base16 ( ) . encode ( dgstBytes ) ;
public class Reference { /** * { @ inheritDoc } */ public int compareTo ( Object o ) { } }
Reference referenceCompared = ( Reference ) o ; int compare = specification . compareTo ( referenceCompared . specification ) ; if ( compare != 0 ) { return compare ; } compare = requirement . compareTo ( referenceCompared . requirement ) ; if ( compare != 0 ) { return compare ; } compare = systemUnderTest . compareTo ...
public class AwsSecurityFindingFilters { /** * An ISO8601 - formatted timestamp that indicates when the potential security issue captured by a finding was created * by the security findings provider . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setCreat...
if ( this . createdAt == null ) { setCreatedAt ( new java . util . ArrayList < DateFilter > ( createdAt . length ) ) ; } for ( DateFilter ele : createdAt ) { this . createdAt . add ( ele ) ; } return this ;
public class DensePositiveMapper { @ Override public void undo ( int [ ] input , final int start , final int length ) { } }
for ( int i = start , l = length ; l > 0 ; l -- , i ++ ) { input [ i ] = backward [ input [ i ] ] ; }
public class TransliteratorParser { /** * Throw an exception indicating a syntax error . Search the rule string * for the probable end of the rule . Of course , if the error is that * the end of rule marker is missing , then the rule end will not be found . * In any case the rule start will be correctly reported ...
int end = ruleEnd ( rule , start , rule . length ( ) ) ; throw new IllegalIcuArgumentException ( msg + " in \"" + Utility . escape ( rule . substring ( start , end ) ) + '"' ) ;
public class AtomContainerSet { /** * Removes an AtomContainer from this container . * @ param pos The position of the AtomContainer to be removed from this container */ @ Override public void removeAtomContainer ( int pos ) { } }
for ( int i = pos ; i < atomContainerCount - 1 ; i ++ ) { atomContainers [ i ] = atomContainers [ i + 1 ] ; multipliers [ i ] = multipliers [ i + 1 ] ; } atomContainers [ atomContainerCount - 1 ] = null ; atomContainerCount -- ;
public class GatewayLinkControlAdapter { /** * / * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . runtime . ControlAdapter # runtimeEventOccurred ( com . ibm . ws . sib . admin . RuntimeEvent ) */ public void runtimeEventOccurred ( RuntimeEvent event ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "runtimeEventOccurred" , new Object [ ] { event } ) ; // Call out to the real GatewayLink MBean ' s RuntimeEventListener // if we determine it to be non - null . if ( _rel != null ) { _rel . runtimeEventOccurred ( _jsme , ev...
public class Search { /** * Gets the list of suggestions that match the given query . * @ return * can be empty but never null . The size of the list is always smaller than * a certain threshold to avoid showing too many options . */ public SearchResult getSuggestions ( StaplerRequest req , String query ) { } }
Set < String > paths = new HashSet < > ( ) ; // paths already added , to control duplicates SearchResultImpl r = new SearchResultImpl ( ) ; int max = req . hasParameter ( "max" ) ? Integer . parseInt ( req . getParameter ( "max" ) ) : 100 ; SearchableModelObject smo = findClosestSearchableModelObject ( req ) ; for ( Su...
public class TextComponentUtil { /** * This will return a two element array , start line pos and end line pos . * The character from the document for the startPos will be the first character of the line * The character from the document for the endPos will be the last character of the line , i . e . the char before...
return new int [ ] { getLineStart ( text , initialCaretPosition ) , getLineEnd ( text , initialCaretPosition ) } ;
public class VarTensor { /** * Multiplies a factor to this one . * From libDAI : * The product of two factors is defined as follows : if * \ f $ f : \ prod _ { l \ in L } X _ l \ to [ 0 , \ infty ) \ f $ and \ f $ g : \ prod _ { m \ in M } X _ m \ to [ 0 , \ infty ) \ f $ , then * \ f [ fg : \ prod _ { l \ in L...
VarTensor newFactor = applyBinOp ( this , f , new AlgebraLambda . Prod ( ) ) ; internalSet ( newFactor ) ;
public class DateUtils { /** * Test if an event date specifies a duration of one day or less . * @ param eventDate to test . * @ return true if duration is one day or less . */ public static boolean specificToDay ( String eventDate ) { } }
boolean result = false ; if ( ! isEmpty ( eventDate ) ) { Interval eventDateInterval = extractInterval ( eventDate ) ; logger . debug ( eventDateInterval ) ; logger . debug ( eventDateInterval . toDuration ( ) ) ; if ( eventDateInterval . toDuration ( ) . getStandardDays ( ) < 1l ) { result = true ; } else if ( eventDa...
public class SequenceAlgorithms { /** * Returns the longest common sequence between two strings as a string . */ public static String longestCommonSequence ( String s1 , String s2 ) { } }
int start = 0 ; int max = 0 ; for ( int i = 0 ; i < s1 . length ( ) ; i ++ ) { for ( int j = 0 ; j < s2 . length ( ) ; j ++ ) { int x = 0 ; while ( s1 . charAt ( i + x ) == s2 . charAt ( j + x ) ) { x ++ ; if ( ( ( i + x ) >= s1 . length ( ) ) || ( ( j + x ) >= s2 . length ( ) ) ) break ; } if ( x > max ) { max = x ; s...
public class CronParser { /** * Build possible cron expressions from definitions . One is built for sure . A second one may be build if last field is optional . * @ param cronDefinition - cron definition instance */ private void buildPossibleExpressions ( final CronDefinition cronDefinition ) { } }
final List < CronParserField > sortedExpression = cronDefinition . getFieldDefinitions ( ) . stream ( ) . map ( this :: toCronParserField ) . sorted ( CronParserField . createFieldTypeComparator ( ) ) . collect ( Collectors . toList ( ) ) ; List < CronParserField > tempExpression = sortedExpression ; while ( lastFieldI...
public class MpscBlockingConsumerArrayQueue { /** * { @ inheritDoc } * This implementation is correct for single consumer thread use only . */ @ SuppressWarnings ( "unchecked" ) @ Override public E poll ( ) { } }
final E [ ] buffer = consumerBuffer ; final long mask = consumerMask ; final long index = lpConsumerIndex ( ) ; final long offset = modifiedCalcElementOffset ( index , mask ) ; Object e = lvElement ( buffer , offset ) ; // LoadLoad if ( e == null ) { // consumer can ' t see the odd producer index if ( index != lvProduc...
public class SecurityServletConfiguratorHelper { /** * Create a list of roles that represent the security - role elements in the web . xml and / or web - fragment . xml * @ param securityRoles a list of security roles */ private void processSecurityRoles ( List < SecurityRole > securityRoles ) { } }
for ( SecurityRole securityRole : securityRoles ) { if ( ! allRoles . contains ( securityRole . getRoleName ( ) ) ) { allRoles . add ( securityRole . getRoleName ( ) ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "allRoles: " + allRoles ) ; }
public class SendQueueHolder { /** * Handle the command send from my client peer . * @ param in The ( optional ) Inputstream to get the params from . * @ param out The stream to write the results . */ public void doProcess ( InputStream in , PrintWriter out , Map < String , Object > properties ) throws RemoteExcept...
String strCommand = this . getProperty ( REMOTE_COMMAND , properties ) ; if ( SEND_MESSAGE . equals ( strCommand ) ) { BaseMessage message = ( BaseMessage ) this . getNextObjectParam ( in , MESSAGE , properties ) ; ( ( RemoteSendQueue ) m_remoteObject ) . sendMessage ( message ) ; } else super . doProcess ( in , out , ...
public class PrintJob { /** * Open an OutputStream and execute the function using the OutputStream . * @ param function the function to execute * @ return the URI and the file size */ protected PrintResult withOpenOutputStream ( final PrintAction function ) throws Exception { } }
final File reportFile = getReportFile ( ) ; final Processor . ExecutionContext executionContext ; try ( FileOutputStream out = new FileOutputStream ( reportFile ) ; BufferedOutputStream bout = new BufferedOutputStream ( out ) ) { executionContext = function . run ( bout ) ; } return new PrintResult ( reportFile . lengt...
public class ConnectionDialog { /** * Saves field values to preferences . */ private void save ( ) { } }
Preferences pref = Preferences . userNodeForPackage ( ConnectionDialog . class ) ; pref . put ( "host" , getHost ( ) ) ; pref . put ( "user" , getUser ( ) ) ; boolean remember = getRememberPasswordCheckBox ( ) . isSelected ( ) ; if ( remember ) { try { Cipher cipher = Cipher . getInstance ( "AES/CBC/PKCS5Padding" ) ; K...
public class SQLSupport { /** * Create a SQL WHERE clause from the list of { @ link Filter } objects . This fragment does not begin with * WHERE . If the given list of sorts contains a Filter with filter expression " foo " , operation equals , * and value ' 42 ' , the generated SQL statement will appear as : * < ...
if ( filters == null || filters . size ( ) == 0 ) return EMPTY ; InternalStringBuilder sql = new InternalStringBuilder ( 64 ) ; internalCreateWhereFragment ( sql , filters ) ; return sql . toString ( ) ;
public class MissingMethodsDetector { /** * TODO : returning two types of objects , this awful , need to fix at some point */ private Object sawLoad ( int seen , Object userObject ) { } }
int reg = RegisterUtils . getALoadReg ( this , seen ) ; if ( localSpecialObjects . containsKey ( Integer . valueOf ( reg ) ) ) { return Integer . valueOf ( reg ) ; } return userObject ;
public class DscNodesInner { /** * Retrieve a list of dsc nodes . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the PagedList & lt ; DscNodeInner & gt ; object */ p...
return listByAutomationAccountNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < DscNodeInner > > , Page < DscNodeInner > > ( ) { @ Override public Page < DscNodeInner > call ( ServiceResponse < Page < DscNodeInner > > response ) { return response . body ( ) ; } } ) ;
public class URBridge { private static void initializeSupportedEntities ( ) { } }
defaultSupportedEntities = new ArrayList < String > ( 2 ) ; defaultSupportedEntities . add ( Service . DO_PERSON_ACCOUNT ) ; defaultSupportedEntities . add ( Service . DO_GROUP ) ;
public class UserBS { /** * Busca usuário pelo cpf . * @ param cpf * Cpf para buscar o usuário . * @ return User Usuário que contém o cpf . */ public User existsByCpf ( String cpf ) { } }
Criteria criteria = this . dao . newCriteria ( User . class ) . add ( Restrictions . eq ( "cpf" , cpf ) ) ; return ( User ) criteria . uniqueResult ( ) ;
public class PrepareJspHelper { /** * Find all the Jsps in the doc root , and spin of threads to compile and / or Classload / JIT */ public void run ( ) { } }
if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINER ) ) { logger . logp ( Level . FINER , CLASS_NAME , "run" , "enter" ) ; } String docRoot = null , threadParam = null ; Container container = webapp . getModuleContainer ( ) ; if ( container != null ) { hasContain...
public class ConnectionMonitorsInner { /** * Query a snapshot of the most recent connection states . * @ param resourceGroupName The name of the resource group containing Network Watcher . * @ param networkWatcherName The name of the Network Watcher resource . * @ param connectionMonitorName The name given to the...
return beginQueryWithServiceResponseAsync ( resourceGroupName , networkWatcherName , connectionMonitorName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class AstaDatabaseFileReader { /** * Read a project from the current data source . * @ return ProjectFile instance * @ throws MPXJException */ public ProjectFile read ( ) throws MPXJException { } }
try { m_reader = new AstaReader ( ) ; ProjectFile project = m_reader . getProject ( ) ; project . getEventManager ( ) . addProjectListeners ( m_projectListeners ) ; processProjectProperties ( ) ; processCalendars ( ) ; processResources ( ) ; processTasks ( ) ; processPredecessors ( ) ; processAssignments ( ) ; m_reader...
public class MOAUtils { /** * Returs the commandline for the given object . If the object is not * derived from AbstractOptionHandler , then only the classname . Otherwise * the classname and the options are returned . * @ param obj the object to generate the commandline for * @ return the commandline */ public...
String result = obj . getClass ( ) . getName ( ) ; if ( obj instanceof AbstractOptionHandler ) result += " " + ( ( AbstractOptionHandler ) obj ) . getOptions ( ) . getAsCLIString ( ) ; return result . trim ( ) ;
public class CodeModelUtils { public static String getClassName ( final JClass theClass ) { } }
return ( theClass . outer ( ) == null ? theClass . fullName ( ) : getClassName ( theClass . outer ( ) ) + "$" + theClass . name ( ) ) ;
public class AbstractAppender { /** * Handles an OK install response . */ @ SuppressWarnings ( "unused" ) protected void handleInstallResponseOk ( MemberState member , InstallRequest request , InstallResponse response ) { } }
// Reset the member failure count and update the member ' s status if necessary . succeedAttempt ( member ) ; // If the install request was completed successfully , set the member ' s snapshotIndex and reset // the next snapshot index / offset . if ( request . complete ( ) ) { member . setSnapshotIndex ( request . inde...
public class AccountsInner { /** * Creates the specified Data Lake Analytics account . This supplies the user with computation services for Data Lake Analytics workloads . * @ param resourceGroupName The name of the Azure resource group . * @ param accountName The name of the Data Lake Analytics account . * @ par...
return beginCreateWithServiceResponseAsync ( resourceGroupName , accountName , parameters ) . toBlocking ( ) . single ( ) . body ( ) ;
public class Var2Data { /** * This method retrieves a String of the specified type , * belonging to the item with the specified unique ID . * @ param id unique ID of entity to which this data belongs * @ param type data type identifier * @ return string containing required data */ public String getUnicodeString...
return ( getUnicodeString ( m_meta . getOffset ( id , type ) ) ) ;
public class Util { /** * Transforms a reader into a string . * @ param reader * the reader to be transformed * @ return the string containing the content of the reader */ public static String readerToString ( Reader reader ) { } }
try { StringBuilder sb = new StringBuilder ( ) ; char [ ] buf = new char [ 1024 ] ; int numRead = 0 ; while ( ( numRead = reader . read ( buf ) ) != - 1 ) { sb . append ( buf , 0 , numRead ) ; } return sb . toString ( ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; }
public class Seconds { /** * Subtracts this amount from the specified temporal object . * This returns a temporal object of the same observable type as the input * with this amount subtracted . * In most cases , it is clearer to reverse the calling pattern by using * { @ link Temporal # minus ( TemporalAmount )...
if ( seconds != 0 ) { temporal = temporal . minus ( seconds , SECONDS ) ; } return temporal ;
public class DefaultVOMSProxyInfoBehaviour { /** * Proxy VOMS options */ private void checkVOMSOptions ( ProxyInfoParams params , List < VOMSAttribute > attributes , X509Certificate [ ] proxyChain , File proxyFilePath ) { } }
if ( params . hasACOptions ( ) && attributes . isEmpty ( ) ) throw new VOMSError ( "No VOMS attributes found!" ) ; if ( params . containsOption ( PrintOption . ACSUBJECT ) && ! params . containsOption ( PrintOption . ALL_OPTIONS ) ) { for ( VOMSAttribute a : attributes ) logger . printMessage ( OpensslNameUtilities . g...
public class ObjectValidator { /** * Validate each content model relation . * If the content model relation doesn ' t point to an object PID , note that * and give up . Same if no object is found at that PID . * If we find an actual content model object , verify that the original * object satisfies the content ...
String contentModelPid ; if ( cm . startsWith ( "info:fedora/" ) ) { contentModelPid = cm . substring ( 12 ) ; } else { result . addNote ( ValidationResultNotation . unrecognizedContentModelUri ( cm ) ) ; return ; } try { ContentModelInfo contentModel = objectSource . getContentModelInfo ( contentModelPid ) ; if ( cont...