signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class NonBlockingByteArrayInputStream { /** * Skips < code > n < / code > bytes of input from this input stream . Fewer bytes * might be skipped if the end of the input stream is reached . The actual * number < code > k < / code > of bytes to be skipped is equal to the smaller of * < code > n < / code > an...
final long nSkip = m_nPos + n > m_nCount ? m_nCount - m_nPos : n ; if ( nSkip <= 0 ) return 0 ; m_nPos += nSkip ; return nSkip ;
public class CRLReasonCodeExtension { /** * Return the reason as a CRLReason enum . */ public CRLReason getReasonCode ( ) { } }
// if out - of - range , return UNSPECIFIED if ( reasonCode > 0 && reasonCode < values . length ) { return values [ reasonCode ] ; } else { return CRLReason . UNSPECIFIED ; }
public class Transformation2D { /** * Transforms a tolerance value . * @ param tolerance * The tolerance value . */ public double transform ( double tolerance ) { } }
// the function should be implemented as follows : find encompassing // circle for the transformed circle of radius = Tolerance . // this is approximation . Point2D pt1 = new Point2D ( ) ; Point2D pt2 = new Point2D ( ) ; /* * pt [ 0 ] . Set ( 0 , 0 ) ; pt [ 1 ] . Set ( 1 , 0 ) ; pt [ 2 ] . Set ( 0 , 1 ) ; Transform ( p...
public class Registry { /** * Computes a transitive closure of the { @ link Server } dependencies . * @ param server the { @ link Server } to compute transitive dependencies for * @ return the transitive dependencies */ private Set < T > getTransitiveDeps ( T server ) { } }
Set < T > result = new HashSet < > ( ) ; Deque < T > queue = new ArrayDeque < > ( ) ; queue . add ( server ) ; while ( ! queue . isEmpty ( ) ) { Set < Class < ? extends Server > > deps = queue . pop ( ) . getDependencies ( ) ; if ( deps == null ) { continue ; } for ( Class < ? extends Server > clazz : deps ) { T dep = ...
public class PersonGroupPersonsImpl { /** * Create a new person in a specified person group . * @ param personGroupId Id referencing a particular person group . * @ param createOptionalParameter the object representing the optional parameters to be set before calling this API * @ param serviceCallback the async S...
return ServiceFuture . fromResponse ( createWithServiceResponseAsync ( personGroupId , createOptionalParameter ) , serviceCallback ) ;
public class S3RestUtils { /** * Calls the given { @ link S3RestUtils . RestCallable } and handles any exceptions thrown . * @ param < T > the return type of the callable * @ param resource the resource ( bucket or object ) to be operated on * @ param callable the callable to call * @ return the response object...
try { // TODO ( cc ) : reconsider how to enable authentication if ( SecurityUtils . isSecurityEnabled ( ServerConfiguration . global ( ) ) && AuthenticatedClientUser . get ( ServerConfiguration . global ( ) ) == null ) { AuthenticatedClientUser . set ( LoginUser . get ( ServerConfiguration . global ( ) ) . getName ( ) ...
public class MacAuthUtils { /** * Returns a signature base string . * The signature base string is constructed by concatenating together , in order , the * following HTTP request elements , each followed by a new line character ( % x0A ) : * 1 . The nonce value generated for the request . * 2 . The HTTP request...
return nonce + '\n' + requestMethod . toUpperCase ( ) + '\n' + normalizeUrl ( headerHost , requestUrl ) + '\n' + ( payloadBodyHash != null ? payloadBodyHash : "" ) + '\n' + ( ext != null ? ext : "" ) + '\n' ;
public class UseParserFactory { /** * Create use parser instance . * @ param dbType database type * @ param shardingRule databases and tables sharding rule * @ param lexerEngine lexical analysis engine . * @ return use parser instance */ public static AbstractUseParser newInstance ( final DatabaseType dbType , ...
switch ( dbType ) { case H2 : case MySQL : return new MySQLUseParser ( lexerEngine ) ; default : throw new UnsupportedOperationException ( String . format ( "Cannot support database [%s]." , dbType ) ) ; }
public class PdfUtilities { /** * Merges PDF files . * @ param inputPdfFiles array of input files * @ param outputPdfFile output file */ public static void mergePdf ( File [ ] inputPdfFiles , File outputPdfFile ) { } }
if ( PDFBOX . equals ( System . getProperty ( PDF_LIBRARY ) ) ) { PdfBoxUtilities . mergePdf ( inputPdfFiles , outputPdfFile ) ; } else { try { PdfGsUtilities . mergePdf ( inputPdfFiles , outputPdfFile ) ; } catch ( Exception e ) { System . setProperty ( PDF_LIBRARY , PDFBOX ) ; mergePdf ( inputPdfFiles , outputPdfFile...
public class UpdateFlowEntitlementRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( UpdateFlowEntitlementRequest updateFlowEntitlementRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( updateFlowEntitlementRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateFlowEntitlementRequest . getDescription ( ) , DESCRIPTION_BINDING ) ; protocolMarshaller . marshall ( updateFlowEntitlementRequest . getEncryption ( )...
public class AddAttachmentsToSetRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( AddAttachmentsToSetRequest addAttachmentsToSetRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( addAttachmentsToSetRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( addAttachmentsToSetRequest . getAttachmentSetId ( ) , ATTACHMENTSETID_BINDING ) ; protocolMarshaller . marshall ( addAttachmentsToSetRequest . getAttachments ...
public class CmsEditLoginMessageDialog { /** * Commits the edited login message to the login manager . < p > */ @ Override public void actionCommit ( ) { } }
List < Throwable > errors = new ArrayList < Throwable > ( ) ; try { // set the edited message OpenCms . getLoginManager ( ) . setLoginMessage ( getCms ( ) , m_loginMessage ) ; // update the system configuration OpenCms . writeConfiguration ( CmsVariablesConfiguration . class ) ; // clear the message object setDialogObj...
public class DescribeConfigurationRecorderStatusResult { /** * A list that contains status of the specified recorders . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setConfigurationRecordersStatus ( java . util . Collection ) } or * { @ link # withConfig...
if ( this . configurationRecordersStatus == null ) { setConfigurationRecordersStatus ( new com . amazonaws . internal . SdkInternalList < ConfigurationRecorderStatus > ( configurationRecordersStatus . length ) ) ; } for ( ConfigurationRecorderStatus ele : configurationRecordersStatus ) { this . configurationRecordersSt...
public class ChunkedFileSet { /** * Ideally all methods after the close should throw an Exception if called , * but that will involve changing a lot of code ( this file and callers ) * and testing . So reseting most of the collections so that the read returns * empty data . Before this method was introduced JVM u...
this . numChunks = 0 ; this . baseDir = null ; this . indexFileSizes . clear ( ) ; this . dataFileSizes . clear ( ) ; this . fileNames . clear ( ) ; this . indexFiles . clear ( ) ; this . mappedIndexFileReader . clear ( ) ; this . dataFiles . clear ( ) ; this . chunkIdToChunkStart . clear ( ) ; this . chunkIdToNumChunk...
public class Task { private void cancelInvokable ( AbstractInvokable invokable ) { } }
// in case of an exception during execution , we still call " cancel ( ) " on the task if ( invokable != null && invokableHasBeenCanceled . compareAndSet ( false , true ) ) { try { invokable . cancel ( ) ; } catch ( Throwable t ) { LOG . error ( "Error while canceling task {}." , taskNameWithSubtask , t ) ; } }
public class CloudSdkChecker { /** * Validates the cloud SDK installation * @ param cloudSdk CloudSdk with a configured sdk home directory */ public void checkCloudSdk ( CloudSdk cloudSdk , String version ) throws CloudSdkVersionFileException , CloudSdkNotFoundException , CloudSdkOutOfDateException { } }
if ( ! version . equals ( cloudSdk . getVersion ( ) . toString ( ) ) ) { throw new RuntimeException ( "Specified Cloud SDK version (" + version + ") does not match installed version (" + cloudSdk . getVersion ( ) + ")." ) ; } cloudSdk . validateCloudSdk ( ) ;
public class ErrorLogReader { /** * Read all the errors in a log since a given timestamp . * @ param buffer containing the { @ link DistinctErrorLog } . * @ param consumer to be called for each exception encountered . * @ param sinceTimestamp for filtering errors that have been recorded since this time . * @ re...
int entries = 0 ; int offset = 0 ; final int capacity = buffer . capacity ( ) ; while ( offset < capacity ) { final int length = buffer . getIntVolatile ( offset + LENGTH_OFFSET ) ; if ( 0 == length ) { break ; } final long lastObservationTimestamp = buffer . getLongVolatile ( offset + LAST_OBSERVATION_TIMESTAMP_OFFSET...
public class ProcessCommunicatorImpl { /** * / * ( non - Javadoc ) * @ see tuwien . auto . calimero . process . ProcessCommunicator # readString * ( tuwien . auto . calimero . GroupAddress ) */ public String readString ( GroupAddress dst ) throws KNXTimeoutException , KNXRemoteException , KNXLinkClosedException , K...
final byte [ ] apdu = readFromGroup ( dst , priority , 0 , 14 ) ; final DPTXlatorString t = new DPTXlatorString ( DPTXlatorString . DPT_STRING_8859_1 ) ; extractGroupASDU ( apdu , t ) ; return t . getValue ( ) ;
public class CreateHttpNamespaceRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CreateHttpNamespaceRequest createHttpNamespaceRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( createHttpNamespaceRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( createHttpNamespaceRequest . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( createHttpNamespaceRequest . getCreatorRequestId ( ) , CREATORREQU...
public class SessionDriver { /** * A helper function to get the local address of the machine * @ return the local address of the current machine * @ throws IOException */ static java . net . InetAddress getLocalAddress ( ) throws IOException { } }
try { return java . net . InetAddress . getLocalHost ( ) ; } catch ( java . net . UnknownHostException e ) { throw new IOException ( e ) ; }
public class DescribeFlowLogsResult { /** * Information about the flow logs . * @ param flowLogs * Information about the flow logs . */ public void setFlowLogs ( java . util . Collection < FlowLog > flowLogs ) { } }
if ( flowLogs == null ) { this . flowLogs = null ; return ; } this . flowLogs = new com . amazonaws . internal . SdkInternalList < FlowLog > ( flowLogs ) ;
public class ResourceURL { /** * Returns true if the URL passed to it corresponds to a directory . This is slightly tricky due to some quirks * of the { @ link JarFile } API . Only jar : / / and file : / / URLs are supported . * @ param resourceURL the URL to check * @ return true if resource is a directory */ pu...
final String protocol = resourceURL . getProtocol ( ) ; switch ( protocol ) { case "jar" : try { final JarURLConnection jarConnection = ( JarURLConnection ) resourceURL . openConnection ( ) ; final JarEntry entry = jarConnection . getJarEntry ( ) ; if ( entry . isDirectory ( ) ) { return true ; } // WARNING ! Heuristic...
public class NodeImpl { /** * { @ inheritDoc } * Overwritten by TextImpl , CommentImpl and ProcessingInstructionImpl */ public String getTextContent ( ) throws DOMException { } }
StringBuilder sb = new StringBuilder ( ) ; getTextContent ( sb ) ; return sb . toString ( ) ;
public class FileLogInput { /** * @ return the last complete page read . */ protected long getCurrentPage ( ) { } }
if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "getCurrentPage" ) ; long currentPage = sectorValidatedInputStream . currentPage ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "getCurrentPage" , "returns =" +...
public class Postcard { public void officeManagedLogging ( String title , String key , Object value ) { } }
assertArgumentNotNull ( "title" , title ) ; assertArgumentNotNull ( "key" , key ) ; assertArgumentNotNull ( "value" , value ) ; if ( officeManagedLoggingMap == null ) { officeManagedLoggingMap = new LinkedHashMap < String , Map < String , Object > > ( 4 ) ; } Map < String , Object > valueMap = officeManagedLoggingMap ....
public class Exceptions { /** * TODO : was package - level initially */ public static RuntimeException launderCacheLoaderException ( Exception e ) { } }
if ( ! ( e instanceof CacheLoaderException ) ) return new CacheLoaderException ( "Exception in CacheLoader" , e ) ; else return ( CacheLoaderException ) e ;
public class BigtableTableAdminGrpcClient { /** * { @ inheritDoc } */ @ Override public void deleteTable ( DeleteTableRequest request ) { } }
createUnaryListener ( request , deleteTableRpc , request . getName ( ) ) . getBlockingResult ( ) ;
public class SocketServer { /** * Blocks until the server has started successfully or an exception is * thrown . * @ throws VoldemortException if a problem occurs during start - up wrapping * the original exception . */ public void awaitStartupCompletion ( ) { } }
try { Object obj = startedStatusQueue . take ( ) ; if ( obj instanceof Throwable ) throw new VoldemortException ( ( Throwable ) obj ) ; } catch ( InterruptedException e ) { // this is okay , if we are interrupted we can stop waiting }
public class InterproceduralCallGraph { /** * ( non - Javadoc ) * @ see * edu . umd . cs . findbugs . graph . AbstractGraph # addVertex ( edu . umd . cs . findbugs * . graph . AbstractVertex ) */ @ Override public void addVertex ( InterproceduralCallGraphVertex v ) { } }
super . addVertex ( v ) ; methodDescToVertexMap . put ( v . getXmethod ( ) . getMethodDescriptor ( ) , v ) ;
public class SessionDataNode { /** * - - - - - private methods - - - - - */ private void incrementVersion ( ) throws FrameworkException { } }
// increment version on each change final Long version = getProperty ( SessionDataNode . version ) ; if ( version == null ) { setProperty ( SessionDataNode . version , 1L ) ; } else { setProperty ( SessionDataNode . version , version + 1 ) ; }
public class QueryLoggingCommand { @ Override public DBCursor cursor ( DBCollection dbCollection ) { } }
logger . debug ( "Executing {} for {} cursor" , delegate , dbCollection . getFullName ( ) ) ; DBCursor dbCursor = delegate . cursor ( dbCollection ) ; if ( logger . isDebugEnabled ( ) ) { StringBuilder sb = new StringBuilder ( ) ; DBObject plan = dbCursor . explain ( ) ; sb . append ( "MongoDB query plan:\n" ) ; sb . a...
public class AmazonSageMakerClient { /** * Gets a list of labeling jobs assigned to a specified work team . * @ param listLabelingJobsForWorkteamRequest * @ return Result of the ListLabelingJobsForWorkteam operation returned by the service . * @ throws ResourceNotFoundException * Resource being access is not fo...
request = beforeClientExecution ( request ) ; return executeListLabelingJobsForWorkteam ( request ) ;
public class RenameHandler { /** * Gets the map of renamed for an enum type . * An empty map is returned if there are no renames . * @ param type the enum type , not null * @ return a copy of the set of enum renames , not null */ public Map < String , Enum < ? > > getEnumRenames ( Class < ? > type ) { } }
if ( type == null ) { throw new IllegalArgumentException ( "type must not be null" ) ; } Map < String , Enum < ? > > map = enumRenames . get ( type ) ; if ( map == null ) { return new HashMap < String , Enum < ? > > ( ) ; } return new HashMap < String , Enum < ? > > ( map ) ;
public class AmazonEC2Client { /** * Allocates a Dedicated Host to your account . At a minimum , specify the instance size type , Availability Zone , and * quantity of hosts to allocate . * @ param allocateHostsRequest * @ return Result of the AllocateHosts operation returned by the service . * @ sample AmazonE...
request = beforeClientExecution ( request ) ; return executeAllocateHosts ( request ) ;
public class BaseValidator { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public boolean validateModcaString8 ( String modcaString8 , DiagnosticChain diagnostics , Map < Object , Object > context ) { } }
boolean result = validateModcaString8_MinLength ( modcaString8 , diagnostics , context ) ; if ( result || diagnostics != null ) result &= validateModcaString8_MaxLength ( modcaString8 , diagnostics , context ) ; return result ;
public class Parser { /** * Return the biggest common startsWith string * @ param completionList list to compare * @ return biggest common startsWith string */ public static String findStartsWithTerminalString ( List < TerminalString > completionList ) { } }
StringBuilder builder = new StringBuilder ( ) ; for ( TerminalString completion : completionList ) while ( builder . length ( ) < completion . getCharacters ( ) . length ( ) && startsWithTerminalString ( completion . getCharacters ( ) . substring ( 0 , builder . length ( ) + 1 ) , completionList ) ) builder . append ( ...
public class CmsSetupBean { /** * Returns html code to display the errors occurred . < p > * @ param pathPrefix to adjust the path * @ return html code */ public String displayErrors ( String pathPrefix ) { } }
if ( pathPrefix == null ) { pathPrefix = "" ; } StringBuffer html = new StringBuffer ( 512 ) ; html . append ( "<table border='0' cellpadding='5' cellspacing='0' style='width: 100%; height: 100%;'>" ) ; html . append ( "\t<tr>" ) ; html . append ( "\t\t<td style='vertical-align: middle; height: 100%;'>" ) ; html . appe...
public class AVIMConversationsQuery { /** * 增加查询条件 , 当conversation的属性中对应的字段中的元素包含所有的值才可返回 * @ param key * @ param values * @ return */ public AVIMConversationsQuery whereContainsAll ( String key , Collection < ? > values ) { } }
conditions . whereContainsAll ( key , values ) ; return this ;
public class MtasSolrComponentFacet { /** * ( non - Javadoc ) * @ see * mtas . solr . handler . component . util . MtasSolrComponent # create ( mtas . codec . util . * CodecComponent . BasicComponent , java . lang . Boolean ) */ public SimpleOrderedMap < Object > create ( ComponentFacet facet , Boolean encode ) t...
SimpleOrderedMap < Object > mtasFacetResponse = new SimpleOrderedMap < > ( ) ; mtasFacetResponse . add ( "key" , facet . key ) ; HashMap < MtasDataCollector < ? , ? > , HashMap < String , MtasSolrMtasResult > > functionData = new HashMap < > ( ) ; for ( int i = 0 ; i < facet . baseFields . length ; i ++ ) { if ( facet ...
public class SuppressCache { /** * Returns the total count of all values */ public int size ( ) { } }
int count = 0 ; for ( Value val : map . values ( ) ) count += val . count ( ) ; return count ;
public class WCheckBoxSelectExample { /** * Examples of readonly states . */ private void addReadOnlyExamples ( ) { } }
add ( new WHeading ( HeadingLevel . H3 , "Read-only WCheckBoxSelect examples" ) ) ; add ( new ExplanatoryText ( "These examples all use the same list of options: the states and territories list from the editable examples above." + " When the readOnly state is specified only those options which are selected are output."...
public class ProfilerTimerFilter { /** * Gets the total number of times the method has been called that is represented by the * { @ link IoEventType } * @ param type * The { @ link IoEventType } that the user wants to get the total number of method calls * @ return * The total number of method calls for the m...
switch ( type ) { case MESSAGE_RECEIVED : if ( profileMessageReceived ) { return messageReceivedTimerWorker . getCallsNumber ( ) ; } break ; case MESSAGE_SENT : if ( profileMessageSent ) { return messageSentTimerWorker . getCallsNumber ( ) ; } break ; case SESSION_CREATED : if ( profileSessionCreated ) { return session...
public class FloatingActionButton { /** * Initializes the animation , which is used while showing * < b > Action Button < / b > * @ deprecated since 1.0.2 and will be removed in version 2.0.0. * Use < b > show _ animation < / b > and < b > hide _ animation < / b > in XML instead * @ param attrs attributes of th...
if ( attrs . hasValue ( R . styleable . ActionButton_animation_onShow ) ) { final int animResId = attrs . getResourceId ( R . styleable . ActionButton_animation_onShow , Animations . NONE . animResId ) ; setShowAnimation ( Animations . load ( getContext ( ) , animResId ) ) ; }
public class Retrospective { /** * A read - only collection of Stories Identified in the Retrospective . * @ param filter filter for getting list of stories . * @ return collection of Stories Identified in the Retrospective . */ public Collection < Story > getIdentifiedStories ( StoryFilter filter ) { } }
filter = ( filter != null ) ? filter : new StoryFilter ( ) ; filter . identifiedIn . clear ( ) ; filter . identifiedIn . add ( this ) ; return getInstance ( ) . get ( ) . story ( filter ) ;
public class CodedConstant { /** * Write object to byte array by { @ link FieldType } . * @ param out the out * @ param order the order * @ param type the type * @ param o the o * @ param list the list * @ param withTag the with tag * @ throws IOException Signals that an I / O exception has occurred . */ ...
if ( o == null ) { return ; } if ( type == FieldType . OBJECT ) { Class cls = o . getClass ( ) ; Codec target = ProtobufProxy . create ( cls ) ; if ( withTag ) { out . writeRawVarint32 ( makeTag ( order , WireFormat . WIRETYPE_LENGTH_DELIMITED ) ) ; } out . writeRawVarint32 ( target . size ( o ) ) ; target . writeTo ( ...
public class Attributes { /** * Returns an opaque string containing the escaped sequence of the given bytes , * including the initial opaque prefix \ FF . * < br / > * For example the byte array < code > [ 0xCA , 0xFE ] < / code > will be converted into the string * < code > \ FF \ CA \ FE < / code > . * @ pa...
StringBuilder result = new StringBuilder ( ) ; result . append ( OPAQUE_PREFIX ) ; for ( byte aByte : bytes ) { result . append ( ESCAPE ) ; int code = aByte & 0xFF ; if ( code < 16 ) result . append ( "0" ) ; result . append ( Integer . toHexString ( code ) . toUpperCase ( ) ) ; } return result . toString ( ) ;
public class EKBCommit { /** * Adds a collection of models which shall be updated in the EDB . If one of the given objects is not a model , an * IllegalArgumentException is thrown . */ public EKBCommit addUpdates ( Collection < ? > updates ) { } }
if ( updates != null ) { for ( Object update : updates ) { checkIfModel ( update ) ; this . updates . add ( ( OpenEngSBModel ) update ) ; } } return this ;
public class StrictBufferedInputStream { /** * Workaround for an unexpected behavior of ' BufferedInputStream ' ! */ @ Override public int read ( final byte [ ] buffer , final int bufPos , final int length ) throws IOException { } }
int i = super . read ( buffer , bufPos , length ) ; if ( ( i == length ) || ( i == - 1 ) ) return i ; int j = super . read ( buffer , bufPos + i , length - i ) ; if ( j == - 1 ) return i ; return j + i ;
public class FnBigInteger { /** * It performs a module operation and returns the value * of ( input mod module ) which is always positive * ( whereas remainder is not ) * @ param module the module * @ return the result of ( input mod module ) */ public final static Function < BigInteger , BigInteger > module ( ...
return new Module ( fromNumber ( Short . valueOf ( module ) ) ) ;
public class FieldType { /** * Return the value of field in the data argument if it is not the default value for the class . If it is the default * then null is returned . */ public < FV > FV getFieldValueIfNotDefault ( Object object ) throws SQLException { } }
@ SuppressWarnings ( "unchecked" ) FV fieldValue = ( FV ) extractJavaFieldValue ( object ) ; if ( isFieldValueDefault ( fieldValue ) ) { return null ; } else { return fieldValue ; }
public class CQLService { /** * Get the { @ link PreparedStatement } for the given { @ link CQLStatementCache . Update } to * the given table name . If needed , the update statement is compiled and cached . * @ param update Update statement type . * @ param storeName Store ( ColumnFamily ) name . * @ return Pre...
String tableName = storeToCQLName ( storeName ) ; return m_statementCache . getPreparedUpdate ( tableName , update ) ;
public class ServiceEndpointPoliciesInner { /** * Updates service Endpoint Policies . * @ param resourceGroupName The name of the resource group . * @ param serviceEndpointPolicyName The name of the service endpoint policy . * @ param tags Resource tags . * @ param serviceCallback the async ServiceCallback to h...
return ServiceFuture . fromResponse ( updateWithServiceResponseAsync ( resourceGroupName , serviceEndpointPolicyName , tags ) , serviceCallback ) ;
public class PhysicalDatabaseParent { /** * Constructor * @ param mapParams time The default cache review interval . * @ param mapParams prefix The prefix on the physical file name . * @ param mapParams suffix The suffix on the physical file name . * @ param mapParams app The application object ( The applicatio...
m_htDBList = new Hashtable < Object , PDatabase > ( ) ; m_mapParams = mapParams ; Object strMinutes = this . getProperty ( TIME ) ; int iMinutes = - 1 ; // Default time try { if ( strMinutes instanceof String ) iMinutes = Integer . parseInt ( ( String ) strMinutes ) ; } catch ( NumberFormatException ex ) { iMinutes = -...
public class OkHttpChannelBuilder { /** * { @ inheritDoc } * @ since 1.3.0 */ @ Override public OkHttpChannelBuilder keepAliveTimeout ( long keepAliveTimeout , TimeUnit timeUnit ) { } }
Preconditions . checkArgument ( keepAliveTimeout > 0L , "keepalive timeout must be positive" ) ; keepAliveTimeoutNanos = timeUnit . toNanos ( keepAliveTimeout ) ; keepAliveTimeoutNanos = KeepAliveManager . clampKeepAliveTimeoutInNanos ( keepAliveTimeoutNanos ) ; return this ;
public class IdAndNameListBox { /** * fill entries of the listbox . * @ param pentries list of entries */ public final void fillEntryCollections ( final Collection < ? extends IdAndNameBean < T > > pentries ) { } }
this . entries . clear ( ) ; this . entries . addAll ( pentries ) ; clear ( ) ; for ( final IdAndNameBean < T > entry : this . entries ) { this . addItem ( entry . getName ( ) , Objects . toString ( entry . getId ( ) ) ) ; }
public class LdapConnection { /** * Method to create the search results cache , if configured . */ private void createSearchResultsCache ( ) { } }
final String METHODNAME = "createSearchResultsCache" ; if ( iSearchResultsCacheEnabled ) { if ( FactoryManager . getCacheUtil ( ) . isCacheAvailable ( ) ) { iSearchResultsCache = FactoryManager . getCacheUtil ( ) . initialize ( "SearchResultsCache" , iSearchResultsCacheSize , iSearchResultsCacheSize , iSearchResultsCac...
public class DeviceAttribute_3DAODefaultImpl { public void insert_ul ( final long [ ] argin ) { } }
final int [ ] values = new int [ argin . length ] ; for ( int i = 0 ; i < argin . length ; i ++ ) { values [ i ] = ( int ) argin [ i ] ; } attrval . r_dim . dim_x = argin . length ; attrval . r_dim . dim_y = 0 ; DevVarULongArrayHelper . insert ( attrval . value , values ) ;
public class Monitors { /** * Create a new timer with a name and context . The returned timer will maintain separate * sub - monitors for each distinct set of tags returned from the context on an update operation . */ public static Timer newTimer ( String name , TaggingContext context ) { } }
return newTimer ( name , TimeUnit . MILLISECONDS , context ) ;
public class PersonGroupPersonsImpl { /** * Create a new person in a specified person group . * @ param personGroupId Id referencing a particular person group . * @ param createOptionalParameter the object representing the optional parameters to be set before calling this API * @ throws IllegalArgumentException t...
return createWithServiceResponseAsync ( personGroupId , createOptionalParameter ) . toBlocking ( ) . single ( ) . body ( ) ;
public class ListRetirableGrantsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListRetirableGrantsRequest listRetirableGrantsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listRetirableGrantsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listRetirableGrantsRequest . getLimit ( ) , LIMIT_BINDING ) ; protocolMarshaller . marshall ( listRetirableGrantsRequest . getMarker ( ) , MARKER_BINDING ) ; ...
public class GenericUtils { /** * Encapsulate the logic to read an entire byte array from the input stream . * @ param in * @ param len * @ return new array read from stream * @ throws IOException */ static public byte [ ] readValue ( ObjectInput in , int len ) throws IOException { } }
int bytesRead = 0 ; byte [ ] data = new byte [ len ] ; for ( int offset = 0 ; offset < len ; offset += bytesRead ) { bytesRead = in . read ( data , offset , len - offset ) ; if ( bytesRead == - 1 ) { throw new IOException ( "Could not retrieve " ) ; } } return data ;
public class RedCardableAssist { public void assertExecuteMethodResponseDefined ( ActionResponse response ) { } }
if ( response . isUndefined ( ) ) { final ExceptionMessageBuilder br = new ExceptionMessageBuilder ( ) ; br . addNotice ( "Cannot return undefined resopnse from the execute method." ) ; br . addItem ( "Advice" ) ; br . addElement ( "Not allowed to return undefined() in execute method." ) ; br . addElement ( "If you wan...
public class NlpResult { /** * returns a subset of the found entities . * Only entities that are of type < code > T < / code > are returned . T needs to extend the { @ link BaseNlpEntity } . * @ param clazz * the filter class * @ return List of entites , only the filtered elements are returned . */ public < T e...
List < BaseNlpEntity > resultList = new ArrayList < > ( ) ; for ( BaseNlpEntity item : getEntities ( ) ) { if ( item . getClass ( ) . equals ( clazz ) ) { resultList . add ( item ) ; } } return ( List < T > ) resultList ;
public class ConsentDecisionCouchDbRepository { /** * Find all consent decisions for a given principal , service pair . Should only be one . * @ param principal User to search for . * @ param service Service name to search for . * @ return Consent decisions matching the given principal and service names . */ @ Vi...
val view = createQuery ( "by_consent_decision" ) . key ( ComplexKey . of ( principal , service ) ) . includeDocs ( true ) ; return db . queryView ( view , CouchDbConsentDecision . class ) ;
public class MethodParameter { /** * Create a new MethodParameter for the given method or constructor . * This is a convenience constructor for scenarios where a Method or Constructor reference is treated in a generic fashion . * @ param methodOrConstructor the Method or Constructor to specify a parameter for * @...
if ( methodOrConstructor instanceof Method ) { return new MethodParameter ( ( Method ) methodOrConstructor , parameterIndex ) ; } else if ( methodOrConstructor instanceof Constructor ) { return new MethodParameter ( ( Constructor < ? > ) methodOrConstructor , parameterIndex ) ; } else { throw new IllegalArgumentExcepti...
public class ModifyDocumentPermissionRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ModifyDocumentPermissionRequest modifyDocumentPermissionRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( modifyDocumentPermissionRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( modifyDocumentPermissionRequest . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( modifyDocumentPermissionRequest . getPermissionType ( ) ...
public class HumanName { /** * Returns all of the components of the name ( prefix , given , family , suffix ) as a single string with a single spaced * string separating each part . * If none of the parts are populated , returns the { @ link # getTextElement ( ) text } element value instead . */ public String getNa...
List < StringType > nameParts = new ArrayList < StringType > ( ) ; nameParts . addAll ( getPrefix ( ) ) ; nameParts . addAll ( getGiven ( ) ) ; nameParts . add ( getFamilyElement ( ) ) ; nameParts . addAll ( getSuffix ( ) ) ; if ( nameParts . size ( ) > 0 ) { return joinStringsSpaceSeparated ( nameParts ) ; } else { re...
public class ClientIOHandler { /** * ( non - Javadoc ) * @ see * org . jboss . netty . channel . SimpleChannelHandler # exceptionCaught ( org . jboss . * netty . channel . ChannelHandlerContext , * org . jboss . netty . channel . ExceptionEvent ) */ public void exceptionCaught ( ChannelHandlerContext ctx , Exce...
Throwable cause = e . getCause ( ) ; // do not print exception if it is BindException . // we are trying to search available port below 1024 . It is not good to // print a flood // of error logs during the searching . if ( cause instanceof java . net . BindException ) { return ; } LOG . error ( "Exception on connection...
public class CPOptionValuePersistenceImpl { /** * Returns a range of all the cp option values where groupId = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they are indexes in ...
return findByGroupId ( groupId , start , end , null ) ;
public class ProxyBuilder { /** * Creates a proxy object out of the specified root object and the specified interfaces * and implementations . * @ return a proxy object that is still of type T but additionally implements all specified * interfaces . * @ throws ProxyException if the proxy could not be created . ...
if ( this . root == null ) { throw new IllegalArgumentException ( "root must not be null!" ) ; } if ( this . interfacesToImplementations . isEmpty ( ) ) { // nothing to proxy return this . root ; } try { ProxyMethodHandler methodHandler = new ProxyMethodHandler ( root , interfacesToImplementations ) ; ProxyFactory prox...
public class YarnResourceManager { /** * Converts a Flink application status enum to a YARN application status enum . * @ param status The Flink application status . * @ return The corresponding YARN application status . */ private FinalApplicationStatus getYarnStatus ( ApplicationStatus status ) { } }
if ( status == null ) { return FinalApplicationStatus . UNDEFINED ; } else { switch ( status ) { case SUCCEEDED : return FinalApplicationStatus . SUCCEEDED ; case FAILED : return FinalApplicationStatus . FAILED ; case CANCELED : return FinalApplicationStatus . KILLED ; default : return FinalApplicationStatus . UNDEFINE...
public class ObjectBindingAssert { /** * Verifies that the actual observable has the same value as the given observable . * @ param expectedValue the observable value to compare with the actual observables current value . * @ return { @ code this } assertion instance . */ public ObjectBindingAssert < T > hasSameVal...
new ObservableValueAssertions < > ( actual ) . hasSameValue ( expectedValue ) ; return this ;
public class MediaChannel { /** * Enables the channel and activates it ' s resources . */ public void open ( ) { } }
// generate a new unique identifier for the channel this . ssrc = SsrcGenerator . generateSsrc ( ) ; this . statistics . setSsrc ( this . ssrc ) ; this . open = true ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( this . mediaType + " channel " + this . ssrc + " is open" ) ; }
public class VpnGateway { /** * Any VPCs attached to the virtual private gateway . * @ return Any VPCs attached to the virtual private gateway . */ public java . util . List < VpcAttachment > getVpcAttachments ( ) { } }
if ( vpcAttachments == null ) { vpcAttachments = new com . amazonaws . internal . SdkInternalList < VpcAttachment > ( ) ; } return vpcAttachments ;
public class PrintfFormat { /** * Return a substring starting at * < code > start < / code > and ending at either the end * of the String < code > s < / code > , the next unpaired * percent sign , or at the end of the String if the * last character is a percent sign . * @ param s Control string . * @ param ...
m_cPos = s . indexOf ( "%" , start ) ; if ( m_cPos == - 1 ) { m_cPos = s . length ( ) ; } return s . substring ( start , m_cPos ) ;
public class JBossModuleLoader { /** * Get a { @ link ModuleSpec } that was added to this instance * @ param revisionId id to search for * @ return the instance associated with the given revisionIds */ @ Nullable public ModuleSpec getModuleSpec ( ModuleIdentifier revisionId ) { } }
Objects . requireNonNull ( revisionId , "revisionId" ) ; return moduleSpecs . get ( revisionId ) ;
public class Cache2kBuilder { /** * Constructs a cache name out of the class name and field name . Result example : * { @ code com . example . ImagePool . id2Image } * < p > See { @ link # name ( String ) } for a general discussion about cache names . * @ see # name ( String ) */ public final Cache2kBuilder < K ,...
if ( _fieldName == null ) { throw new NullPointerException ( ) ; } config ( ) . setName ( _class . getName ( ) + "." + _fieldName ) ; return this ;
public class InternalTextureLoader { /** * Create an empty texture * @ param width The width of the new texture * @ param height The height of the new texture * @ return The created empty texture * @ throws IOException Indicates a failure to create the texture on the graphics hardware */ public Texture createTe...
ImageData ds = new EmptyImageData ( width , height ) ; return getTexture ( ds , filter ) ;
public class BpmnDeployer { /** * It is possible to deploy a process containing a start and intermediate * message event that wait for the same message or to have two processes , one * with a message start event and the other one with a message intermediate * event , that subscribe for the same message . Therefor...
ArrayList < EventSubscriptionEntity > filteredSubscriptions = new ArrayList < EventSubscriptionEntity > ( subscriptionsForSameMessageName ) ; for ( EventSubscriptionEntity subscriptionEntity : new ArrayList < EventSubscriptionEntity > ( subscriptionsForSameMessageName ) ) { if ( isSubscriptionOfDifferentTypeAsDeclarati...
public class AnnotationTypeRequiredMemberWriterImpl { /** * { @ inheritDoc } */ public Content getAnnotationDocTreeHeader ( MemberDoc member , Content annotationDetailsTree ) { } }
annotationDetailsTree . addContent ( writer . getMarkerAnchor ( member . name ( ) + ( ( ExecutableMemberDoc ) member ) . signature ( ) ) ) ; Content annotationDocTree = writer . getMemberTreeHeader ( ) ; Content heading = new HtmlTree ( HtmlConstants . MEMBER_HEADING ) ; heading . addContent ( member . name ( ) ) ; ann...
public class AbstractDoclet { /** * Generate the class files for single classes specified on the command line . * @ param classtree the data structure representing the class tree . */ private void generateClassFiles ( ClassTree classtree ) { } }
String [ ] packageNames = configuration . classDocCatalog . packageNames ( ) ; for ( int packageNameIndex = 0 ; packageNameIndex < packageNames . length ; packageNameIndex ++ ) { generateClassFiles ( configuration . classDocCatalog . allClasses ( packageNames [ packageNameIndex ] ) , classtree ) ; }
public class Integer { /** * Parses the string argument as an unsigned integer in the radix * specified by the second argument . An unsigned integer maps the * values usually associated with negative numbers to positive * numbers larger than { @ code MAX _ VALUE } . * The characters in the string must all be di...
if ( s == null ) { throw new NumberFormatException ( "null" ) ; } int len = s . length ( ) ; if ( len > 0 ) { char firstChar = s . charAt ( 0 ) ; if ( firstChar == '-' ) { throw new NumberFormatException ( String . format ( "Illegal leading minus sign " + "on unsigned string %s." , s ) ) ; } else { if ( len <= 5 || // ...
public class PoolablePreparedStatement { /** * Method setBlob . * @ param parameterIndex * @ param inputStream * @ param length * @ throws SQLException * @ see java . sql . PreparedStatement # setBlob ( int , InputStream , long ) */ @ Override public void setBlob ( int parameterIndex , InputStream inputStream...
internalStmt . setBlob ( parameterIndex , inputStream , length ) ;
public class XAttributeInfoImpl { /** * / * ( non - Javadoc ) * @ see org . deckfour . xes . summary . XAttributeInfo # getAttributesForType ( org . deckfour . xes . model . XAttribute . Type ) */ public Collection < XAttribute > getAttributesForType ( Class < ? extends XAttribute > type ) { } }
Set < XAttribute > typeSet = typeMap . get ( type ) ; if ( typeSet == null ) { typeSet = new HashSet < XAttribute > ( 0 ) ; } return Collections . unmodifiableCollection ( typeSet ) ;
public class SerializedConfigValue { /** * not private because we use it to deserialize ConfigException */ static SimpleConfigOrigin readOrigin ( DataInput in , SimpleConfigOrigin baseOrigin ) throws IOException { } }
Map < SerializedField , Object > m = new EnumMap < SerializedField , Object > ( SerializedField . class ) ; while ( true ) { Object v = null ; SerializedField field = readCode ( in ) ; switch ( field ) { case END_MARKER : return SimpleConfigOrigin . fromBase ( baseOrigin , m ) ; case ORIGIN_DESCRIPTION : in . readInt (...
public class Journal { /** * setter for volume - sets The volume number of the journal in which the article was published , O * @ generated * @ param v value to set into the feature */ public void setVolume ( String v ) { } }
if ( Journal_Type . featOkTst && ( ( Journal_Type ) jcasType ) . casFeat_volume == null ) jcasType . jcas . throwFeatMissing ( "volume" , "de.julielab.jules.types.Journal" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Journal_Type ) jcasType ) . casFeatCode_volume , v ) ;
public class SparseWeightedDirectedTypedEdgeSet { /** * { @ inheritDoc } */ public boolean contains ( Object o ) { } }
if ( ! ( o instanceof WeightedDirectedTypedEdge ) ) return false ; @ SuppressWarnings ( "unchecked" ) WeightedDirectedTypedEdge < T > e = ( WeightedDirectedTypedEdge < T > ) o ; if ( e . from ( ) == rootVertex ) { Set < WeightedDirectedTypedEdge < T > > edges = outEdges . get ( e . to ( ) ) ; return edges . contains ( ...
public class GetStatusPRequest { /** * < code > optional . alluxio . grpc . file . GetStatusPOptions options = 2 ; < / code > */ public alluxio . grpc . GetStatusPOptionsOrBuilder getOptionsOrBuilder ( ) { } }
return options_ == null ? alluxio . grpc . GetStatusPOptions . getDefaultInstance ( ) : options_ ;
public class ChunkedInputStream { /** * Maintain next symbol for current state = State . NORMAL . * @ param state Current state . * @ param line Current chunk size line . * @ param next Next symbol . * @ return New state . */ private static State nextNormal ( final State state , final ByteArrayOutputStream line...
final State result ; switch ( next ) { case '\r' : result = State . R ; break ; case '\"' : result = State . QUOTED_STRING ; break ; default : result = state ; line . write ( next ) ; break ; } return result ;
public class PropertiesCoreExtension { /** * Get the number of values for the property * @ param property * property name * @ return number of values */ public int numValues ( String property ) { } }
int count = 0 ; if ( has ( ) ) { TResult result = queryForValues ( property ) ; try { count = result . getCount ( ) ; } finally { result . close ( ) ; } } return count ;
public class ApiOvhIp { /** * Get this object properties * REST : GET / ip / { ip } / arp / { ipBlocked } * @ param ip [ required ] * @ param ipBlocked [ required ] your IP */ public OvhArpBlockedIp ip_arp_ipBlocked_GET ( String ip , String ipBlocked ) throws IOException { } }
String qPath = "/ip/{ip}/arp/{ipBlocked}" ; StringBuilder sb = path ( qPath , ip , ipBlocked ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhArpBlockedIp . class ) ;
public class ApiOvhIp { /** * Get this object properties * REST : GET / ip / { ip } / ripe * @ param ip [ required ] */ public OvhRipeInfos ip_ripe_GET ( String ip ) throws IOException { } }
String qPath = "/ip/{ip}/ripe" ; StringBuilder sb = path ( qPath , ip ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhRipeInfos . class ) ;
public class SynthesisFilter { /** * Calculate 32 PCM samples and put the into the Obuffer - object . */ public void calculate_pcm_samples ( Obuffer buffer ) { } }
compute_new_v ( ) ; compute_pcm_samples ( buffer ) ; actual_write_pos = ( actual_write_pos + 1 ) & 0xf ; actual_v = ( actual_v == v1 ) ? v2 : v1 ; // initialize samples [ ] : // for ( register float * floatp = samples + 32 ; floatp > samples ; ) // * - - floatp = 0.0f ; // MDM : this may not be necessary . The Layer II...
public class HadoopUtil { /** * Parses a string in the format [ filename ] : [ filename2 ] : [ filename3 ] into a String array of filenames * @ param linkedWorkbookString list of filename as one String * @ return String Array containing the filenames as separate Strings */ public static String [ ] parseLinkedWorkbo...
if ( "" . equals ( linkedWorkbooksString ) ) { return new String [ 0 ] ; } // first split by ] : [ String [ ] tempSplit = linkedWorkbooksString . split ( "\\]:\\[" ) ; // 1st case just one filename remove first [ and last ] if ( tempSplit . length == 1 ) { tempSplit [ 0 ] = tempSplit [ 0 ] . substring ( 1 , tempSplit [...
public class CommerceDiscountUserSegmentRelUtil { /** * Returns the first commerce discount user segment rel in the ordered set where commerceDiscountId = & # 63 ; . * @ param commerceDiscountId the commerce discount ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / co...
return getPersistence ( ) . findByCommerceDiscountId_First ( commerceDiscountId , orderByComparator ) ;
public class LObjCharPredicateBuilder { /** * One of ways of creating builder . This might be the only way ( considering all _ functional _ builders ) that might be utilize to specify generic params only once . */ @ Nonnull public static < T > LObjCharPredicateBuilder < T > objCharPredicate ( Consumer < LObjCharPredica...
return new LObjCharPredicateBuilder ( consumer ) ;
public class OpDef { /** * < pre > * Description of the input ( s ) . * < / pre > * < code > repeated . tensorflow . OpDef . ArgDef input _ arg = 2 ; < / code > */ public org . tensorflow . framework . OpDef . ArgDefOrBuilder getInputArgOrBuilder ( int index ) { } }
return inputArg_ . get ( index ) ;
public class Win32Lnk { /** * Parses a { @ code . lnk } file to find the real file . * @ param pPath the path to the { @ code . lnk } file * @ return a new file object that * @ throws java . io . IOException if the { @ code . lnk } cannot be parsed */ static File parse ( final File pPath ) throws IOException { } ...
if ( ! pPath . getName ( ) . endsWith ( ".lnk" ) ) { return pPath ; } File result = pPath ; LittleEndianDataInputStream in = new LittleEndianDataInputStream ( new BufferedInputStream ( new FileInputStream ( pPath ) ) ) ; try { byte [ ] magic = new byte [ 4 ] ; in . readFully ( magic ) ; byte [ ] guid = new byte [ 16 ] ...
public class JavaClass { /** * Returns the matching method */ public JMethod getMethod ( String name , JClass [ ] paramTypes ) { } }
loop : for ( JMethod method : getMethods ( ) ) { if ( ! method . getName ( ) . equals ( name ) ) continue ; JClass [ ] mParamTypes = method . getParameterTypes ( ) ; if ( mParamTypes . length != paramTypes . length ) continue ; for ( int i = 0 ; i < paramTypes . length ; i ++ ) { if ( ! paramTypes [ i ] . getName ( ) ....
public class CompressedForest { /** * Fetches trees from DKV and converts to a node - local structure . * @ return fetched trees */ public final LocalCompressedForest fetch ( ) { } }
int ntrees = _treeKeys . length ; CompressedTree [ ] [ ] trees = new CompressedTree [ ntrees ] [ ] ; for ( int t = 0 ; t < ntrees ; t ++ ) { Key [ ] treek = _treeKeys [ t ] ; trees [ t ] = new CompressedTree [ treek . length ] ; for ( int i = 0 ; i < treek . length ; i ++ ) if ( treek [ i ] != null ) trees [ t ] [ i ] ...