signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class LoggerWrapper { /** * Log a DOM node at a given logging level and a specified caller * @ param msg The message to show with the node , or null if no message needed * @ param node * @ param level * @ param caller The caller ' s stack trace element * @ see ru . dmerkushov . loghelper . StackTraceUt...
String toLog = ( msg != null ? msg + "\n" : "DOM node:\n" ) + domNodeDescription ( node , 0 ) ; if ( caller != null ) { logger . logp ( level , caller . getClassName ( ) , caller . getMethodName ( ) + "():" + caller . getLineNumber ( ) , toLog ) ; } else { logger . logp ( level , "(UnknownSourceClass)" , "(unknownSourc...
public class CreateJarTask { /** * Build a little map with standard manifest attributes . * @ param pProject Gradle project * @ return the map */ public static Map < String , String > mfAttrStd ( final Project pProject ) { } }
Map < String , String > result = new HashMap < > ( ) ; result . put ( "Manifest-Version" , "1.0" ) ; result . put ( "Website" , new BuildUtil ( pProject ) . getExtraPropertyValue ( ExtProp . Website ) ) ; result . put ( "Created-By" , GradleVersion . current ( ) . toString ( ) ) ; result . put ( "Built-By" , System . g...
public class RuntimesHost { /** * Initializes the configured runtimes . */ private synchronized void initialize ( ) { } }
if ( this . runtimes != null ) { return ; } this . runtimes = new HashMap < > ( ) ; for ( final AvroRuntimeDefinition rd : runtimeDefinition . getRuntimes ( ) ) { try { // We need to create different injector for each runtime as they define conflicting bindings . Also we cannot // fork the original injector because of ...
public class ContainerTx { /** * F86406 */ public void introspect ( IntrospectionWriter writer ) { } }
// Indicate the start of the dump , and include the toString ( ) // of ContainerTx , so this can easily be matched to a trace . writer . begin ( "Start ContainerTx Dump ---> " + this ) ; // Dump the basic state information about the ContainerTx . writer . println ( "Tx Key = " + ivTxKey ) ; writer . pr...
public class CmsGalleryController { /** * Sets if the search should include expired or unreleased resources . < p > * @ param includeExpired if the search should include expired or unreleased resources * @ param fireEvent true if a change event should be fired after setting the value */ public void setIncludeExpire...
m_searchObject . setIncludeExpired ( includeExpired ) ; m_searchObjectChanged = true ; if ( fireEvent ) { ValueChangeEvent . fire ( this , m_searchObject ) ; }
public class InstanceImpl { /** * Value . * @ param attribute the attribute * @ return the double */ @ Override public double value ( Attribute attribute ) { } }
int index = this . instanceHeader . indexOf ( attribute ) ; return value ( index ) ;
public class CalendarQuarter { /** * / * [ deutsch ] * < p > Subtrahiert die angegebenen Jahre von diesem Kalenderquartal . < / p > * @ param years the count of years to be subtracted * @ return result of subtraction */ public CalendarQuarter minus ( Years < CalendarUnit > years ) { } }
if ( years . isEmpty ( ) ) { return this ; } return CalendarQuarter . of ( MathUtils . safeSubtract ( this . year , years . getAmount ( ) ) , this . quarter ) ;
public class CloneUsability { /** * overrides the visitor to grab the method name and reset the state . * @ param obj * the method being parsed */ @ edu . umd . cs . findbugs . annotations . SuppressFBWarnings ( value = "FCBL_FIELD_COULD_BE_LOCAL" , justification = "False positives occur when state is maintained ac...
try { Method m = getMethod ( ) ; if ( m . isPublic ( ) && ! m . isSynthetic ( ) && "clone" . equals ( m . getName ( ) ) && ( m . getArgumentTypes ( ) . length == 0 ) ) { String returnClsName = m . getReturnType ( ) . getSignature ( ) ; returnClsName = SignatureUtils . stripSignature ( returnClsName ) ; if ( ! clsName ....
public class ScalarizationUtils { /** * Method for turning a list of doubles to an array . * @ param list List of doubles * @ return Array of doubles . */ private static double [ ] toArray ( List < Double > list ) { } }
double [ ] values = new double [ list . size ( ) ] ; for ( int i = 0 ; i < values . length ; i ++ ) { values [ i ] = list . get ( i ) ; } return values ;
public class SecurityCenterClient { /** * Lists all sources belonging to an organization . * < p > Sample code : * < pre > < code > * try ( SecurityCenterClient securityCenterClient = SecurityCenterClient . create ( ) ) { * OrganizationName parent = OrganizationName . of ( " [ ORGANIZATION ] " ) ; * for ( Sou...
ListSourcesRequest request = ListSourcesRequest . newBuilder ( ) . setParent ( parent ) . build ( ) ; return listSources ( request ) ;
public class TypicalLoginAssist { protected boolean hasAnnotation ( Class < ? > targetClass , Method targetMethod , Class < ? extends Annotation > annoType ) { } }
return hasAnnotationOnClass ( targetClass , annoType ) || hasAnnotationOnMethod ( targetMethod , annoType ) ;
public class TinValidator { /** * check the Tax Identification Number number , country version for Austria . * @ param ptin vat id to check * @ return true if checksum is ok */ private boolean checkAtTin ( final String ptin ) { } }
final int checkSum = ptin . charAt ( 8 ) - '0' ; final int sum = ptin . charAt ( 0 ) - '0' + squareSum ( ( ptin . charAt ( 1 ) - '0' ) * 2 ) + ptin . charAt ( 2 ) - '0' + squareSum ( ( ptin . charAt ( 3 ) - '0' ) * 2 ) + ptin . charAt ( 4 ) - '0' + squareSum ( ( ptin . charAt ( 5 ) - '0' ) * 2 ) + ptin . charAt ( 6 ) -...
public class Util { /** * Converts an Object array to a String array ( null - safe ) , by calling toString ( ) on each element . * @ param objectArray * the Object array * @ return the String array , or null if objectArray is null */ public static String [ ] objectArrayToStringArray ( final Object [ ] objectArray...
if ( objectArray == null ) { return null ; } final String [ ] stringArray = new String [ objectArray . length ] ; for ( int i = 0 ; i < objectArray . length ; i ++ ) { stringArray [ i ] = objectArray [ i ] != null ? objectArray [ i ] . toString ( ) : null ; } return stringArray ;
public class MetricsFileSystemInstrumentation { /** * Add timer metrics to { @ link DistributedFileSystem # setOwner ( Path , String , String ) } */ public void setOwner ( Path f , String user , String group ) throws IOException { } }
try ( Closeable context = new TimerContextWithLog ( this . setOwnerTimer . time ( ) , "setOwner" , f , user , group ) ) { super . setOwner ( f , user , group ) ; }
public class ListMemberAccountsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListMemberAccountsRequest listMemberAccountsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listMemberAccountsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listMemberAccountsRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ; protocolMarshaller . marshall ( listMemberAccountsRequest . getMaxResults ( ) , MAXRESULTS...
public class Expressions { /** * Create a new Path expression * @ param type type of expression * @ param metadata path metadata * @ param < T > type of expression * @ return path expression */ public static < T extends Comparable < ? > > ComparablePath < T > comparablePath ( Class < ? extends T > type , PathMe...
return new ComparablePath < T > ( type , metadata ) ;
public class MysqlUpdateExecutor { /** * public MysqlUpdateExecutor ( SocketChannel ch ) { this . channel = ch ; } */ public OKPacket update ( String updateString ) throws IOException { } }
QueryCommandPacket cmd = new QueryCommandPacket ( ) ; cmd . setQueryString ( updateString ) ; byte [ ] bodyBytes = cmd . toBytes ( ) ; PacketManager . writeBody ( connector . getChannel ( ) , bodyBytes ) ; logger . debug ( "read update result..." ) ; byte [ ] body = PacketManager . readBytes ( connector . getChannel ( ...
public class JobAgentsInner { /** * Gets a list of job agents in a server . * @ 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 ; JobAgentInner & gt ; ...
return listByServerNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < JobAgentInner > > , Page < JobAgentInner > > ( ) { @ Override public Page < JobAgentInner > call ( ServiceResponse < Page < JobAgentInner > > response ) { return response . body ( ) ; } } ) ;
public class BaseReporterFactory { /** * Gets a { @ link MetricFilter } that specifically includes and excludes configured metrics . * Filtering works in 4 ways : * < dl > * < dt > < i > unfiltered < / i > < / dt > * < dd > All metrics are reported < / dd > * < dt > < i > excludes < / i > - only < / dt > * ...
final StringMatchingStrategy stringMatchingStrategy = getUseRegexFilters ( ) ? REGEX_STRING_MATCHING_STRATEGY : ( getUseSubstringMatching ( ) ? SUBSTRING_MATCHING_STRATEGY : DEFAULT_STRING_MATCHING_STRATEGY ) ; return ( name , metric ) -> { // Include the metric if its name is not excluded and its name is included // W...
public class XMLUtils { /** * Add or set attribute . Convenience method for { @ link # addOrSetAttribute ( AttributesImpl , String , String , String , String , String ) } . * @ param atts attributes * @ param localName local name * @ param value attribute value */ public static void addOrSetAttribute ( final Attr...
addOrSetAttribute ( atts , NULL_NS_URI , localName , localName , "CDATA" , value ) ;
public class Representations { /** * Add a link to this resource * @ param rel * @ param uri The target URI for the link , possibly relative to the href of this resource . */ public static void withLink ( Representation representation , String rel , URI uri , Optional < Predicate < ReadableRepresentation > > predic...
withLink ( representation , rel , uri . toASCIIString ( ) , predicate , name , title , hreflang , profile ) ;
public class VirtualMachineScaleSetVMsInner { /** * Updates a virtual machine of a VM scale set . * @ param resourceGroupName The name of the resource group . * @ param vmScaleSetName The name of the VM scale set where the extension should be create or updated . * @ param instanceId The instance ID of the virtual...
return beginUpdateWithServiceResponseAsync ( resourceGroupName , vmScaleSetName , instanceId , parameters ) . map ( new Func1 < ServiceResponse < VirtualMachineScaleSetVMInner > , VirtualMachineScaleSetVMInner > ( ) { @ Override public VirtualMachineScaleSetVMInner call ( ServiceResponse < VirtualMachineScaleSetVMInner...
public class CPDefinitionOptionValueRelPersistenceImpl { /** * Returns a range of all the cp definition option value rels where companyId = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not prima...
return findByCompanyId ( companyId , start , end , null ) ;
public class IterableSubject { /** * Starts a method chain for a check in which the actual elements ( i . e . the elements of the { @ link * Iterable } under test ) are compared to expected elements using the given { @ link Correspondence } . * The actual elements must be of type { @ code A } , the expected element...
return new UsingCorrespondence < > ( this , correspondence ) ;
public class JDBCUtil { /** * Calls < code > stmt . executeUpdate ( ) < / code > on the supplied statement with the supplied query , * checking to see that it returns the expected update count and logging a warning if it does * not . */ public static void warnedUpdate ( Statement stmt , String query , int expectedC...
int modified = stmt . executeUpdate ( query ) ; if ( modified != expectedCount ) { log . warning ( "Statement did not modify expected number of rows" , "stmt" , stmt , "expected" , expectedCount , "modified" , modified ) ; }
public class SSLEngineImpl { /** * Signals that no more outbound application data will be sent * on this < code > SSLEngine < / code > . */ private void closeOutboundInternal ( ) { } }
if ( ( debug != null ) && Debug . isOn ( "ssl" ) ) { System . out . println ( threadName ( ) + ", closeOutboundInternal()" ) ; } /* * Already closed , ignore */ if ( writer . isOutboundDone ( ) ) { return ; } switch ( connectionState ) { /* * If we haven ' t even started yet , don ' t bother reading inbound . */ case c...
public class ManagedBackupShortTermRetentionPoliciesInner { /** * Updates a managed database ' s short term retention policy . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param managedInstan...
return updateWithServiceResponseAsync ( resourceGroupName , managedInstanceName , databaseName , retentionDays ) . map ( new Func1 < ServiceResponse < ManagedBackupShortTermRetentionPolicyInner > , ManagedBackupShortTermRetentionPolicyInner > ( ) { @ Override public ManagedBackupShortTermRetentionPolicyInner call ( Ser...
public class InsightsLogger { /** * Deprecated . Please use { @ link AppEventsLogger } instead . */ public static InsightsLogger newLogger ( Context context , String clientToken , String applicationId , Session session ) { } }
return new InsightsLogger ( context , applicationId , session ) ;
public class ClientFactoryBuilder { /** * Sets the < a href = " https : / / tools . ietf . org / html / rfc7540 # section - 6.5.2 " > SETTINGS _ MAX _ FRAME _ SIZE < / a > * that indicates the size of the largest frame payload that this client is willing to receive . */ public ClientFactoryBuilder http2MaxFrameSize (...
checkArgument ( http2MaxFrameSize >= MAX_FRAME_SIZE_LOWER_BOUND && http2MaxFrameSize <= MAX_FRAME_SIZE_UPPER_BOUND , "http2MaxFramSize: %s (expected: >= %s and <= %s)" , http2MaxFrameSize , MAX_FRAME_SIZE_LOWER_BOUND , MAX_FRAME_SIZE_UPPER_BOUND ) ; this . http2MaxFrameSize = http2MaxFrameSize ; return this ;
public class StringUtils { /** * Break down a string separated by < code > delim < / code > into a string set . * @ param s String to be splitted * @ param delim Delimiter to be used . * @ return string set */ public static Set < String > restoreSet ( final String s , final String delim ) { } }
final Set < String > copytoSet = new HashSet < > ( ) ; if ( StringUtils . isEmptyString ( s ) ) { return copytoSet ; } final StringTokenizer st = new StringTokenizer ( s , delim ) ; while ( st . hasMoreTokens ( ) ) { final String entry = st . nextToken ( ) ; if ( ! StringUtils . isEmptyString ( entry ) ) { copytoSet . ...
public class SubjectManagerServiceImpl { /** * { @ inheritDoc } */ @ Override public void setCallerSubject ( Subject callerSubject ) { } }
SubjectManager sm = new SubjectManager ( ) ; sm . setCallerSubject ( callerSubject ) ;
public class DoubleField { /** * Set the Value of this field as a double . * @ param value The value of this field . * @ param iDisplayOption If true , display the new field . * @ param iMoveMove The move mode . * @ return An error code ( NORMAL _ RETURN for success ) . */ public int setValue ( double value , b...
// Set this field ' s value double dRoundAt = Math . pow ( 10 , m_ibScale ) ; Double tempdouble = new Double ( Math . floor ( value * dRoundAt + 0.5 ) / dRoundAt ) ; int errorCode = this . setData ( tempdouble , bDisplayOption , iMoveMode ) ; return errorCode ;
public class Bbox { /** * Creates a bbox that fits exactly in this box but has a different width / height ratio . * @ param ratioWidth width dor ratio * @ param ratioHeight height for ratio * @ return bbox */ public Bbox createFittingBox ( double ratioWidth , double ratioHeight ) { } }
if ( ratioWidth > 0 && ratioHeight > 0 ) { double newRatio = ratioWidth / ratioHeight ; double oldRatio = width / height ; double newWidth = width ; double newHeight = height ; if ( newRatio > oldRatio ) { newHeight = width / newRatio ; } else { newWidth = height * newRatio ; } Bbox result = new Bbox ( 0 , 0 , newWidth...
public class ListInstancesOperation { /** * Docker inspect returns full container name = hostname / container _ name , for localhost = / container _ name . * So far as we only work with localhost we can safely trim leading slash . */ private String trimLeadingSlashIfNeeded ( String rawName ) { } }
if ( rawName != null && rawName . startsWith ( "/" ) ) { return rawName . substring ( 1 ) ; } return rawName ;
public class ListOriginEndpointsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListOriginEndpointsRequest listOriginEndpointsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listOriginEndpointsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listOriginEndpointsRequest . getChannelId ( ) , CHANNELID_BINDING ) ; protocolMarshaller . marshall ( listOriginEndpointsRequest . getMaxResults ( ) , MAXRESU...
public class H2TCPReadRequestContext { /** * Get bytes from the stream processor associated with this read context */ @ Override public long read ( long numBytes , int timeout ) throws IOException { } }
long readCount = 0 ; H2StreamProcessor p = muxLink . getStreamProcessor ( streamID ) ; try { p . getReadLatch ( ) . await ( timeout , TimeUnit . MILLISECONDS ) ; readCount = p . readCount ( numBytes , this . getBuffers ( ) ) ; } catch ( InterruptedException e ) { throw new IOException ( "read was stopped by an Interrup...
public class AWSSecurityHubClient { /** * Imports security findings that are generated by the integrated third - party products into Security Hub . * @ param batchImportFindingsRequest * @ return Result of the BatchImportFindings operation returned by the service . * @ throws InternalException * Internal server...
request = beforeClientExecution ( request ) ; return executeBatchImportFindings ( request ) ;
public class ConfluenceGreenPepper { /** * < p > isConfluenceVersion3 . < / p > * @ return a boolean . */ public boolean isConfluenceVersion3 ( ) { } }
ConfluenceVersion confluenceVersion = getConfluenceVersion ( ) ; return confluenceVersion . compareTo ( ConfluenceVersion . V30X ) >= 0 && confluenceVersion . compareTo ( ConfluenceVersion . V40X ) < 0 ;
public class TaskFactory { /** * Parse a snippet and return our parse task handler */ ParseTask parse ( final String source ) { } }
ParseTask pt = state . taskFactory . new ParseTask ( source , false ) ; if ( ! pt . units ( ) . isEmpty ( ) && pt . units ( ) . get ( 0 ) . getKind ( ) == Kind . EXPRESSION_STATEMENT && pt . getDiagnostics ( ) . hasOtherThanNotStatementErrors ( ) ) { // It failed , it may be an expression being incorrectly // parsed as...
public class PolicySetDefinitionsInner { /** * Creates or updates a policy set definition . * This operation creates or updates a policy set definition in the given subscription with the given name . * @ param policySetDefinitionName The name of the policy set definition to create . * @ param parameters The polic...
return createOrUpdateWithServiceResponseAsync ( policySetDefinitionName , parameters ) . map ( new Func1 < ServiceResponse < PolicySetDefinitionInner > , PolicySetDefinitionInner > ( ) { @ Override public PolicySetDefinitionInner call ( ServiceResponse < PolicySetDefinitionInner > response ) { return response . body ( ...
public class HttpClientNIOResourceAdaptor { /** * Creates an instance of async http client . */ private HttpAsyncClient buildHttpAsyncClient ( ) throws IOReactorException { } }
// Create I / O reactor configuration IOReactorConfig ioReactorConfig = IOReactorConfig . custom ( ) . setConnectTimeout ( connectTimeout ) . setSoTimeout ( socketTimeout ) . build ( ) ; // Create a custom I / O reactor ConnectingIOReactor ioReactor = new DefaultConnectingIOReactor ( ioReactorConfig ) ; // Create a con...
public class BPSImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case AfplibPackage . BPS__PSEG_NAME : setPsegName ( ( String ) newValue ) ; return ; case AfplibPackage . BPS__TRIPLETS : getTriplets ( ) . clear ( ) ; getTriplets ( ) . addAll ( ( Collection < ? extends Triplet > ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ;
public class VirtualHostImpl { /** * { @ inheritDoc } */ @ Override @ FFDCIgnore ( NumberFormatException . class ) public int getSecureHttpPort ( String hostAlias ) { } }
int pos = hostAlias . lastIndexOf ( ':' ) ; if ( pos > - 1 && pos < hostAlias . length ( ) ) { try { int port = Integer . valueOf ( hostAlias . substring ( pos + 1 ) ) ; for ( EndpointState state : myEndpoints . values ( ) ) { if ( state . httpPort == port || state . httpsPort == port ) { return state . httpsPort ; } }...
public class BaseNDArrayFactory { /** * Create a scalar nd array with the specified value and offset * @ param value the value of the scalar * @ param offset the offset of the ndarray * @ return the scalar nd array */ @ Override public INDArray scalar ( int value , long offset ) { } }
return create ( new int [ ] { value } , new long [ 0 ] , new long [ 0 ] , DataType . INT , Nd4j . getMemoryManager ( ) . getCurrentWorkspace ( ) ) ;
public class WhiteListBasedDruidToTimelineEventConverter { /** * Returns a { @ link List } of the white - listed dimension ' s values to send . * The list is order is the same as the order of dimensions { @ code whiteListDimsMapper } * @ param event the event for which will filter dimensions * @ return { @ link L...
String prefixKey = getPrefixKey ( event . getMetric ( ) , whiteListDimsMapper ) ; if ( prefixKey == null ) { return null ; } ImmutableList . Builder < String > outputList = new ImmutableList . Builder < > ( ) ; List < String > dimensions = whiteListDimsMapper . get ( prefixKey ) ; if ( dimensions == null ) { return Col...
public class VJournal { /** * Sets the revision number of the journal entry . The organizer can * increment this number every time he or she makes a significant change . * @ param sequence the sequence number * @ return the property that was created * @ see < a href = " http : / / tools . ietf . org / html / rf...
Sequence prop = ( sequence == null ) ? null : new Sequence ( sequence ) ; setSequence ( prop ) ; return prop ;
public class KafkaTransporter { /** * - - - DISCONNECT - - - */ protected void disconnect ( ) { } }
if ( poller != null ) { poller . stop ( ) ; } if ( executor != null ) { try { executor . shutdown ( ) ; } catch ( Exception ignored ) { } executor = null ; } if ( poller != null ) { poller = null ; } if ( producer != null ) { try { producer . close ( 10 , TimeUnit . SECONDS ) ; } catch ( Exception ignored ) { } produce...
public class Collator { /** * Returns the set of locales , as Locale objects , for which collators * are installed . Note that Locale objects do not support RFC 3066. * @ return the list of locales in which collators are installed . * This list includes any that have been registered , in addition to * those tha...
// TODO make this wrap getAvailableULocales later if ( shim == null ) { return ICUResourceBundle . getAvailableLocales ( ICUData . ICU_COLLATION_BASE_NAME , ICUResourceBundle . ICU_DATA_CLASS_LOADER ) ; } return shim . getAvailableLocales ( ) ;
public class ScrollablePanel { /** * documentation inherited from interface */ public int getScrollableUnitIncrement ( Rectangle visibleRect , int orientation , int direction ) { } }
if ( _unitScroll != - 1 ) { return _unitScroll ; } Insets insets = getInsets ( ) ; if ( orientation == SwingConstants . HORIZONTAL ) { // nothing sensible to do here } else { if ( direction > 0 ) { int rectbot = visibleRect . y + visibleRect . height ; Component comp = getComponentAt ( insets . left , rectbot ) ; // if...
public class DefaultRiskAnalysis { /** * Checks the output to see if the script violates a standardness rule . Not complete . */ public static RuleViolation isOutputStandard ( TransactionOutput output ) { } }
if ( output . getValue ( ) . compareTo ( MIN_ANALYSIS_NONDUST_OUTPUT ) < 0 ) return RuleViolation . DUST ; for ( ScriptChunk chunk : output . getScriptPubKey ( ) . getChunks ( ) ) { if ( chunk . isPushData ( ) && ! chunk . isShortestPossiblePushData ( ) ) return RuleViolation . SHORTEST_POSSIBLE_PUSHDATA ; } return Rul...
public class AmazonDynamoDBClient { /** * Describes an existing backup of a table . * You can call < code > DescribeBackup < / code > at a maximum rate of 10 times per second . * @ param describeBackupRequest * @ return Result of the DescribeBackup operation returned by the service . * @ throws BackupNotFoundEx...
request = beforeClientExecution ( request ) ; return executeDescribeBackup ( request ) ;
public class BBR { /** * Sets the convergence tolerance target . Relative changes that are smaller * than the given tolerance will determine convergence . * < br > < br > * The default value used is that suggested in the original paper of 0.0005 * @ param tolerance the positive convergence tolerance goal */ pub...
if ( Double . isNaN ( tolerance ) || Double . isInfinite ( tolerance ) || tolerance <= 0 ) throw new IllegalArgumentException ( "Tolerance must be positive, not " + tolerance ) ; this . tolerance = tolerance ;
public class BooleanJsonSerializer { /** * { @ inheritDoc } */ @ Override public void doSerialize ( JsonWriter writer , Boolean value , JsonSerializationContext ctx , JsonSerializerParameters params ) { } }
writer . value ( value ) ;
public class GenerateCommand { /** * { @ inheritDoc } * @ see jp . co . future . uroborosql . client . command . ReplCommand # showHelp ( org . jline . terminal . Terminal ) */ @ Override public void showHelp ( final Terminal terminal ) { } }
terminal . writer ( ) . println ( "\t" + this . toString ( ) + ": generate sql to access the table." ) ; terminal . writer ( ) . println ( "\t\tex) generate [select/insert/update/delete] [table name]<Enter> : Show sql to access tables according to keywords." ) ;
public class App { /** * Sets the validation constraints map . * @ param validationConstraints the constraints map */ public void setValidationConstraints ( Map < String , Map < String , Map < String , Map < String , ? > > > > validationConstraints ) { } }
this . validationConstraints = validationConstraints ;
public class ImplementationFactory { /** * Creates an implementation of the interface . * @ param implPackageName * Name of the implementation package - Cannot be null . * @ param implClassName * Name of the implementation class - Cannot be null . * @ param listener * Creates the bodies for all methods - Ca...
return create ( implPackageName , implClassName , null , null , listener , intf ) ;
public class SimonConsoleRequestProcessor { /** * Instanciate the request processor ( factory method ) * @ param urlPrefix Url prefix ( null allowed ) * @ param manager Manager ( null allowed ) * @ param pluginClasses Plugin classes ( null allowed ) */ public static SimonConsoleRequestProcessor create ( String ur...
SimonConsoleRequestProcessor requestProcessor = new SimonConsoleRequestProcessor ( urlPrefix ) ; if ( manager != null ) { // Defaults to global manager requestProcessor . setManager ( manager ) ; } if ( pluginClasses != null ) { requestProcessor . getPluginManager ( ) . addPlugins ( pluginClasses ) ; } requestProcessor...
public class SpatialReferenceSystemDao { /** * { @ inheritDoc } */ @ Override public List < SpatialReferenceSystem > queryForMatchingArgs ( SpatialReferenceSystem matchObj ) throws SQLException { } }
List < SpatialReferenceSystem > srsList = super . queryForMatchingArgs ( matchObj ) ; setDefinition_12_063 ( srsList ) ; return srsList ;
public class ReadStreamOld { /** * Reads a line into the character buffer . \ r \ n is converted to \ n . * @ param buf character buffer to fill . * @ param length number of characters to fill . * @ return - 1 on end of file or the number of characters read . */ public final int readLine ( char [ ] buf , int leng...
byte [ ] readBuffer = _readBuffer ; int offset = 0 ; while ( true ) { int readOffset = _readOffset ; int sublen = Math . min ( length , _readLength - readOffset ) ; for ( ; sublen > 0 ; sublen -- ) { int ch = readBuffer [ readOffset ++ ] & 0xff ; if ( ch != '\n' ) { } else if ( isChop ) { _readOffset = readOffset ; if ...
public class CmsWorkplace { /** * Sets the users time warp if configured and if the current timewarp setting is different or * clears the current time warp setting if the user has no configured timewarp . < p > * Timwarping is controlled by the session attribute * { @ link CmsContextInfo # ATTRIBUTE _ REQUEST _ T...
long timeWarpConf = settings . getTimeWarp ( ) ; Long timeWarpSetLong = ( Long ) session . getAttribute ( CmsContextInfo . ATTRIBUTE_REQUEST_TIME ) ; long timeWarpSet = ( timeWarpSetLong != null ) ? timeWarpSetLong . longValue ( ) : CmsContextInfo . CURRENT_TIME ; if ( timeWarpConf == CmsContextInfo . CURRENT_TIME ) { ...
public class GUIDefaults { /** * Returns the initial directory for the file chooser used for opening * datasets . * The following placeholders are recognized : * < pre > * % t - the temp directory * % h - the user ' s home directory * % c - the current directory * % % - gets replaced by a single percentag...
String result ; result = get ( "InitialDirectory" , "%c" ) ; result = result . replaceAll ( "%t" , System . getProperty ( "java.io.tmpdir" ) ) ; result = result . replaceAll ( "%h" , System . getProperty ( "user.home" ) ) ; result = result . replaceAll ( "%c" , System . getProperty ( "user.dir" ) ) ; result = result . ...
public class AbstractTriangle3F { /** * Replies the height of the projection on the triangle that is representing a ground . * Assuming that the triangle is representing a face of a terrain / ground , * this function compute the height of the ground just below the given position . * The input of this function is ...
assert ( system != null ) ; int idx = system . getHeightCoordinateIndex ( ) ; assert ( idx == 1 || idx == 2 ) ; Point3D p1 = getP1 ( ) ; assert ( p1 != null ) ; Vector3D v = getNormal ( ) ; assert ( v != null ) ; if ( idx == 1 && v . getY ( ) == 0. ) return p1 . getY ( ) ; if ( idx == 2 && v . getZ ( ) == 0. ) return p...
public class Function { /** * Either Owner of Role or Permission may delete from Role * @ param trans * @ param role * @ param pd * @ return */ public Result < Void > delPermFromRole ( AuthzTrans trans , RoleDAO . Data role , PermDAO . Data pd , boolean fromApproval ) { } }
String user = trans . user ( ) ; if ( ! fromApproval ) { Result < NsDAO . Data > ucr = q . mayUser ( trans , user , role , Access . write ) ; Result < NsDAO . Data > ucp = q . mayUser ( trans , user , pd , Access . write ) ; // If Can ' t change either Role or Perm , then deny if ( ucr . notOK ( ) && ucp . notOK ( ) ) ...
public class HttpTransportUtils { /** * Parse serialize type from content type * @ param contentType Content - type of http request * @ return serialize code * @ throws SofaRpcException unknown content type */ public static byte getSerializeTypeByContentType ( String contentType ) throws SofaRpcException { } }
if ( StringUtils . isNotBlank ( contentType ) ) { String ct = contentType . toLowerCase ( ) ; if ( ct . contains ( "text/plain" ) || ct . contains ( "text/html" ) || ct . contains ( "application/json" ) ) { return getSerializeTypeByName ( RpcConstants . SERIALIZE_JSON ) ; } else if ( ct . contains ( RpcConstants . SERI...
public class SSPIClient { /** * Respond to an authentication request from the back - end for SSPI authentication ( AUTH _ REQ _ SSPI ) . * @ throws SQLException on SSPI authentication handshake failure * @ throws IOException on network I / O issues */ @ Override public void startSSPI ( ) throws SQLException , IOExc...
/* * We usually use SSPI negotiation ( spnego ) , but it ' s disabled if the client asked for GSSPI and * usespngo isn ' t explicitly turned on . */ final String securityPackage = enableNegotiate ? "negotiate" : "kerberos" ; LOGGER . log ( Level . FINEST , "Beginning SSPI/Kerberos negotiation with SSPI package: {0}" ...
public class WebApplicationContext { public String getResourceAlias ( String alias ) { } }
if ( _resourceAliases == null ) return null ; return ( String ) _resourceAliases . get ( alias ) ;
public class FamCDocumentMongo { /** * { @ inheritDoc } */ @ Override public final void loadGedObject ( final GedDocumentLoader loader , final GedObject ged ) { } }
if ( ! ( ged instanceof FamC ) ) { throw new PersistenceException ( "Wrong type" ) ; } final FamC gedObject = ( FamC ) ged ; this . setGedObject ( gedObject ) ; this . setString ( gedObject . getToString ( ) ) ; this . setFilename ( gedObject . getFilename ( ) ) ; loader . loadAttributes ( this , gedObject . getAttribu...
public class SystemInputJson { /** * Returns the JSON object that represents the given function input definition . */ private static JsonStructure toJson ( FunctionInputDef functionInput ) { } }
JsonObjectBuilder builder = Json . createObjectBuilder ( ) ; addAnnotations ( builder , functionInput ) ; Arrays . stream ( functionInput . getVarTypes ( ) ) . forEach ( varType -> builder . add ( varType , toJson ( functionInput , varType ) ) ) ; return builder . build ( ) ;
public class autoscalepolicy_nstimer_binding { /** * Use this API to fetch autoscalepolicy _ nstimer _ binding resources of given name . */ public static autoscalepolicy_nstimer_binding [ ] get ( nitro_service service , String name ) throws Exception { } }
autoscalepolicy_nstimer_binding obj = new autoscalepolicy_nstimer_binding ( ) ; obj . set_name ( name ) ; autoscalepolicy_nstimer_binding response [ ] = ( autoscalepolicy_nstimer_binding [ ] ) obj . get_resources ( service ) ; return response ;
public class DebugSubstance { /** * { @ inheritDoc } */ @ Override public void setMultiplier ( int position , Double multiplier ) { } }
logger . debug ( "Setting multiplier for atomcontainer at pos: " , "" + position , "" + multiplier ) ; super . setMultiplier ( position , multiplier ) ;
public class PrettyPrint { /** * / / / / / Bean based input for pretty printing / / / / / */ public static < T > void print ( List < T > table ) { } }
if ( table == null ) { throw new IllegalArgumentException ( "No tabular data provided" ) ; } if ( table . isEmpty ( ) ) { return ; } final int [ ] widths = new int [ getMaxColumns ( table ) ] ; adjustColumnWidths ( table , widths ) ; printPreparedTable ( table , widths , getHorizontalBorder ( widths ) ) ;
public class CharsToIgnore { /** * < code > string characters _ to _ skip = 1 ; < / code > */ public java . lang . String getCharactersToSkip ( ) { } }
java . lang . Object ref = "" ; if ( charactersCase_ == 1 ) { ref = characters_ ; } if ( ref instanceof java . lang . String ) { return ( java . lang . String ) ref ; } else { com . google . protobuf . ByteString bs = ( com . google . protobuf . ByteString ) ref ; java . lang . String s = bs . toStringUtf8 ( ) ; if ( c...
public class RouteContext { /** * Setting Request Attribute * @ param key attribute name * @ param value attribute Value * @ return set attribute value and return current request instance */ public RouteContext attribute ( String key , Object value ) { } }
this . request . attribute ( key , value ) ; return this ;
public class GetTagsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetTagsRequest getTagsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getTagsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getTagsRequest . getResourceArn ( ) , RESOURCEARN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMes...
public class Encoding { /** * / * onigenc _ str _ bytelen _ null */ public final int strByteLengthNull ( byte [ ] bytes , int p , int end ) { } }
int p_ , start ; p_ = start = 0 ; while ( true ) { if ( bytes [ p_ ] == 0 ) { int len = minLength ( ) ; if ( len == 1 ) return p_ - start ; int q = p_ + 1 ; while ( len > 1 ) { if ( q >= bytes . length ) return p_ - start ; if ( bytes [ q ] != 0 ) break ; q ++ ; len -- ; } if ( len == 1 ) return p_ - start ; } p_ += le...
public class ChannelFrameworkImpl { /** * This method returns whether all the properties in the first Map are in * the second Map . * @ param inputMap * of properties to search for . * @ param existingMap * of properties to search in . * @ return true if all properties of first Map are found in second Map *...
if ( inputMap == null ) { // If no properties are specified , then success . return true ; } else if ( existingMap == null || inputMap . size ( ) > existingMap . size ( ) ) { // If properties are specified , but none exist in the current map , // then fail . return false ; } // Loop through input list and search in the...
public class DependencyMergingAnalyzer { /** * Evaluates the dependencies * @ param dependency a dependency to compare * @ param nextDependency a dependency to compare * @ param dependenciesToRemove a set of dependencies that will be removed * @ return true if a dependency is removed ; otherwise false */ @ Over...
Dependency main ; // CSOFF : InnerAssignment if ( ( main = getMainGemspecDependency ( dependency , nextDependency ) ) != null ) { if ( main == dependency ) { mergeDependencies ( dependency , nextDependency , dependenciesToRemove ) ; } else { mergeDependencies ( nextDependency , dependency , dependenciesToRemove ) ; ret...
public class AbstractResource { /** * Check if the URLConnection has returned the specified responseCode * @ param responseCode * @ return */ public boolean status ( int responseCode ) { } }
if ( urlConnection instanceof HttpURLConnection ) { HttpURLConnection http = ( HttpURLConnection ) urlConnection ; try { return http . getResponseCode ( ) == responseCode ; } catch ( IOException e ) { e . printStackTrace ( ) ; return false ; } } else return false ;
public class BaseRequest { /** * Send this resource request asynchronously , with the given form parameters as the request body . * If the Content - Type header was not previously set , this method will set it to " application / x - www - form - urlencoded " . * @ param formParameters The form parameters to put in ...
RequestBody body = formBuilder ( formParameters ) ; sendRequest ( null , listener , body ) ;
public class ValueRange { /** * Checks that the specified value is valid . * This validates that the value is within the valid range of values . * The field is only used to improve the error message . * @ param value the value to check * @ param field the field being checked , may be null * @ return the value...
if ( isValidValue ( value ) == false ) { if ( field != null ) { throw new DateTimeException ( "Invalid value for " + field + " (valid values " + this + "): " + value ) ; } else { throw new DateTimeException ( "Invalid value (valid values " + this + "): " + value ) ; } } return value ;
public class ClassGraph { /** * Scans the classpath with the requested number of threads , blocking until the scan is complete . You should * assign the returned { @ link ScanResult } in a try - with - resources statement , or manually close it when you are * finished with it . * @ param numThreads * The number...
try ( AutoCloseableExecutorService executorService = new AutoCloseableExecutorService ( numThreads ) ) { return scan ( executorService , numThreads ) ; }
public class UniversalProjectReader { /** * We have a directory . Determine if this contains a multi - file database we understand , if so * process it . If it does not contain a database , test each file within the directory * structure to determine if it contains a file whose format we understand . * @ param di...
ProjectFile result = handleDatabaseInDirectory ( directory ) ; if ( result == null ) { result = handleFileInDirectory ( directory ) ; } return result ;
public class StartSessionRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( StartSessionRequest startSessionRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( startSessionRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( startSessionRequest . getTarget ( ) , TARGET_BINDING ) ; protocolMarshaller . marshall ( startSessionRequest . getDocumentName ( ) , DOCUMENTNAME_BINDING ) ; protoco...
public class DependencyMaterial { /** * NEW */ public Revision oldestRevision ( Modifications modifications ) { } }
if ( modifications . size ( ) > 1 ) { LOGGER . warn ( "Dependency material {} has multiple modifications" , this . getDisplayName ( ) ) ; } Modification oldestModification = modifications . get ( modifications . size ( ) - 1 ) ; String revision = oldestModification . getRevision ( ) ; return DependencyMaterialRevision ...
public class FilesInner { /** * Update a file . * This method updates an existing file . * @ param groupName Name of the resource group * @ param serviceName Name of the service * @ param projectName Name of the project * @ param fileName Name of the File * @ param parameters Information about the file * ...
return updateWithServiceResponseAsync ( groupName , serviceName , projectName , fileName , parameters ) . map ( new Func1 < ServiceResponse < ProjectFileInner > , ProjectFileInner > ( ) { @ Override public ProjectFileInner call ( ServiceResponse < ProjectFileInner > response ) { return response . body ( ) ; } } ) ;
public class Resources { /** * This utility method allow to avoid doing something if the parameter given is tahe AutoRefresh one . < br / > * Because this parameter is used to control how other parameters can be updated . * @ param params the ResourceParams to check * @ return true if the resource params is not t...
return ! ( params instanceof ObjectParameter && CoreParameters . AUTO_REFRESH_NAME . equals ( ( ( ObjectParameter < ? > ) params ) . name ( ) ) ) ;
public class CmsUserSettings { /** * Sets the upload variant . < p > * @ param uploadVariant the upload variant as String */ public void setUploadVariant ( String uploadVariant ) { } }
UploadVariant upload = null ; try { upload = UploadVariant . valueOf ( uploadVariant ) ; } catch ( Exception e ) { // may happen , set default if ( upload == null ) { upload = OpenCms . getWorkplaceManager ( ) . getDefaultUserSettings ( ) . getUploadVariant ( ) ; } if ( upload == null ) { upload = UploadVariant . gwt ;...
public class AnnotationExtensions { /** * Scan recursive for classes in the given directory . * @ param directory * the directory * @ param packagePath * the package path * @ return the list * @ throws ClassNotFoundException * occurs if a given class cannot be located by the specified class loader */ publ...
return AnnotationExtensions . scanForAnnotatedClasses ( directory , packagePath , null ) ;
public class TracerRepository { /** * Returns true if tracing is enabled globally and in particular for this producer . * @ param producerId * @ return */ public boolean isTracingEnabledForProducer ( String producerId ) { } }
// check if tracing is completely disabled . if ( ! MoskitoConfigurationHolder . getConfiguration ( ) . getTracingConfig ( ) . isTracingEnabled ( ) ) return false ; Tracer tracer = tracers . get ( producerId ) ; return tracer != null && tracer . isEnabled ( ) ;
public class AbstractMethod { /** * reads the depth header from the request and returns it as a int * @ param req * @ return the depth from the depth header */ protected int getDepth ( final WebdavRequest req ) { } }
int depth = INFINITY ; final String depthStr = req . getHeader ( "Depth" ) ; if ( depthStr != null ) { if ( depthStr . equals ( "0" ) ) { depth = 0 ; } else if ( depthStr . equals ( "1" ) ) { depth = 1 ; } } return depth ;
public class LocalMessageProducer { /** * / * ( non - Javadoc ) * @ see net . timewalker . ffmq4 . common . session . AbstractMessageProducer # sendToDestination ( javax . jms . Destination , boolean , javax . jms . Message , int , int , long ) */ @ Override protected final void sendToDestination ( Destination destin...
// Check that the destination was specified if ( destination == null ) throw new InvalidDestinationException ( "Destination not specified" ) ; // [ JMS SPEC ] // Create an internal copy if necessary AbstractMessage message = MessageTools . makeInternalCopy ( srcMessage ) ; externalAccessLock . readLock ( ) . lock ( ) ;...
public class CmsSecurityManager { /** * Performs a non - blocking permission check on a resource . < p > * This test will not throw an exception in case the required permissions are not * available for the requested operation . Instead , it will return one of the * following values : < ul > * < li > < code > { ...
I_CmsPermissionHandler . CmsPermissionCheckResult result = null ; CmsDbContext dbc = m_dbContextFactory . getDbContext ( context ) ; try { result = hasPermissions ( dbc , resource , requiredPermissions , checkLock , filter ) ; } finally { dbc . clear ( ) ; } return result ;
public class Table { /** * Not for general use . * Used by ScriptReader to unconditionally insert a row into * the table when the . script file is read . */ public void insertFromScript ( PersistentStore store , Object [ ] data ) { } }
systemUpdateIdentityValue ( data ) ; insertData ( store , data ) ;
public class Enums { /** * Returns an optional enum constant for the given type , using { @ link Enum # valueOf } . If the * constant does not exist , { @ link Option # none } is returned . A common use case is for parsing * user input or falling back to a default enum constant . For example , * { @ code Enums . ...
try { return Option . some ( Enum . valueOf ( enumClass , value ) ) ; } catch ( IllegalArgumentException iae ) { return Option . none ( ) ; }
public class CircleFitter { /** * Fits points to a circle * @ param points */ public Circle fit ( Circle initCircle , DenseMatrix64F points ) { } }
initCenter . data [ 0 ] = initCircle . getX ( ) ; initCenter . data [ 1 ] = initCircle . getY ( ) ; radius = initCircle . getRadius ( ) ; fit ( points ) ; return this ;
public class AmazonAppStreamClient { /** * Copies the image within the same region or to a new region within the same AWS account . Note that any tags you * added to the image will not be copied . * @ param copyImageRequest * @ return Result of the CopyImage operation returned by the service . * @ throws Resour...
request = beforeClientExecution ( request ) ; return executeCopyImage ( request ) ;
public class UIManager { /** * Finds the layout for the given theme and component . * @ param component the WComponent class to find a manager for . * @ param key the component key to use for caching the renderer . * @ return the LayoutManager for the component . */ private synchronized Renderer findRenderer ( fi...
LOG . info ( "Looking for layout for " + key . getSecond ( ) . getName ( ) + " in " + key . getFirst ( ) ) ; Renderer renderer = findConfiguredRenderer ( component , key . getFirst ( ) ) ; if ( renderer == null ) { renderers . put ( key , NULL_RENDERER ) ; } else { renderers . put ( key , renderer ) ; } return renderer...
public class JacksonCSVSplitter { /** * Takes the input stream and converts it into a stream of JacksonHandle by setting the schema * and wrapping the JsonNode into JacksonHandle . * @ param input the input stream passed in . * @ return a stream of JacksonHandle . */ @ Override public Stream < JacksonHandle > spl...
if ( input == null ) { throw new IllegalArgumentException ( "InputSteam cannot be null." ) ; } return configureInput ( configureObjReader ( ) . readValues ( input ) ) ;
public class CommerceUserSegmentCriterionLocalServiceBaseImpl { /** * Creates a new commerce user segment criterion with the primary key . Does not add the commerce user segment criterion to the database . * @ param commerceUserSegmentCriterionId the primary key for the new commerce user segment criterion * @ retur...
return commerceUserSegmentCriterionPersistence . create ( commerceUserSegmentCriterionId ) ;
public class RegistryUtils { /** * 加入一些公共的额外属性 * @ param sb 属性 */ private static void addCommonAttrs ( StringBuilder sb ) { } }
sb . append ( getKeyPairs ( RpcConstants . CONFIG_KEY_PID , RpcRuntimeContext . PID ) ) ; sb . append ( getKeyPairs ( RpcConstants . CONFIG_KEY_LANGUAGE , JAVA ) ) ; sb . append ( getKeyPairs ( RpcConstants . CONFIG_KEY_RPC_VERSION , Version . RPC_VERSION + "" ) ) ;