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 . StackTraceUtils # getMyStackTraceElement ( ) */
public void logDomNode ( String msg , Node node , Level level , StackTraceElement caller ) { } }
|
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)" , "(unknownSourceMethod)" , toLog ) ; }
|
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 . getProperty ( "user.name" ) ) ; result . put ( "Build-Jdk" , Jvm . current ( ) . toString ( ) ) ; return result ;
|
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 the same reason .
// We create new injectors and copy form the original injector what we need .
// rootInjector is an emptyInjector that we copy bindings from the original injector into . Then we fork
// it to instantiate the actual runtime .
final Injector rootInjector = Tang . Factory . getTang ( ) . newInjector ( ) ; initializeInjector ( rootInjector ) ; final Configuration runtimeConfig = Tang . Factory . getTang ( ) . newConfigurationBuilder ( ) . bindNamedParameter ( RuntimeName . class , rd . getRuntimeName ( ) . toString ( ) ) . bindImplementation ( Runtime . class , RuntimeImpl . class ) . build ( ) ; final Configuration config = new AvroConfigurationSerializer ( ) . fromString ( rd . getSerializedConfiguration ( ) . toString ( ) ) ; final Injector runtimeInjector = rootInjector . forkInjector ( config , runtimeConfig ) ; this . runtimes . put ( rd . getRuntimeName ( ) . toString ( ) , runtimeInjector . getInstance ( Runtime . class ) ) ; } catch ( final IOException | InjectionException e ) { throw new RuntimeException ( "Unable to initialize runtimes." , e ) ; } }
|
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 . println ( "State = " + stateStrs [ state ] ) ; writer . println ( "Entered beforCompletion = " + origLock ) ; writer . println ( "Marked Rollback Only = " + markedRollbackOnly ) ; writer . println ( "Method Began = " + began ) ; writer . println ( "Isolation Level = " + MethodAttribUtils . getIsolationLevelString ( ivIsolationLevel ) ) ; if ( ! isActivitySessionCompleting ) { writer . println ( "isActivitySessionCompleting = " + isActivitySessionCompleting ) ; } // Dump the beans enlisted in the transaction .
int numEnlisted = ( beanOList == null ) ? 0 : beanOList . size ( ) ; writer . begin ( "Enlisted Beans : " + numEnlisted ) ; for ( int i = 0 ; i < numEnlisted ; ++ i ) { writer . println ( beanOList . get ( i ) . toString ( ) ) ; } writer . end ( ) ; // Dump the AccessIntent cache for the transaction .
introspectAccessIntent ( writer ) ; // ContainerTx dump is complete .
writer . end ( ) ;
|
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 setIncludeExpired ( boolean includeExpired , boolean fireEvent ) { } }
|
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 across callbacks" ) @ Override public void visitCode ( Code obj ) { } }
|
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 . equals ( returnClsName ) ) { if ( Values . DOTTED_JAVA_LANG_OBJECT . equals ( returnClsName ) ) { bugReporter . reportBug ( new BugInstance ( this , BugType . CU_CLONE_USABILITY_OBJECT_RETURN . name ( ) , NORMAL_PRIORITY ) . addClass ( this ) . addMethod ( this ) ) ; } else { JavaClass clonedClass = Repository . lookupClass ( returnClsName ) ; if ( ! cls . instanceOf ( clonedClass ) ) { bugReporter . reportBug ( new BugInstance ( this , BugType . CU_CLONE_USABILITY_MISMATCHED_RETURN . name ( ) , HIGH_PRIORITY ) . addClass ( this ) . addMethod ( this ) ) ; } } } ExceptionTable et = m . getExceptionTable ( ) ; if ( ( et != null ) && ( et . getLength ( ) > 0 ) ) { throwsCNFE = false ; if ( prescreen ( m ) ) { stack . resetForMethodEntry ( this ) ; super . visitCode ( obj ) ; } if ( ! throwsCNFE ) { bugReporter . reportBug ( new BugInstance ( this , BugType . CU_CLONE_USABILITY_THROWS . name ( ) , NORMAL_PRIORITY ) . addClass ( this ) . addMethod ( this ) ) ; } } } } catch ( ClassNotFoundException cnfe ) { bugReporter . reportMissingClass ( cnfe ) ; }
|
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 ( Source element : securityCenterClient . listSources ( parent . toString ( ) ) . iterateAll ( ) ) {
* / / doThingsWith ( element ) ;
* < / code > < / pre >
* @ param parent Resource name of the parent of sources to list . Its format should be
* " organizations / [ organization _ id ] " .
* @ throws com . google . api . gax . rpc . ApiException if the remote call fails */
public final ListSourcesPagedResponse listSources ( String parent ) { } }
|
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 ) - '0' + squareSum ( ( ptin . charAt ( 7 ) - '0' ) * 2 ) ; final int calculatedCheckSum = ( 80 - sum ) % 10 ; return checkSum == calculatedCheckSum ;
|
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_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
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 , PathMetadata metadata ) { } }
|
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 ( ) , PacketManager . readHeader ( connector . getChannel ( ) , 4 ) . getPacketBodyLength ( ) ) ; if ( body [ 0 ] < 0 ) { ErrorPacket packet = new ErrorPacket ( ) ; packet . fromBytes ( body ) ; throw new IOException ( packet + "\n with command: " + updateString ) ; } OKPacket packet = new OKPacket ( ) ; packet . fromBytes ( body ) ; return packet ;
|
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 ; object */
public Observable < Page < JobAgentInner > > listByServerNextAsync ( final String nextPageLink ) { } }
|
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 >
* < dd > All metrics are reported , except those whose name is listed in < i > excludes < / i > . < / dd >
* < dt > < i > includes < / i > - only < / dt >
* < dd > Only metrics whose name is listed in < i > includes < / i > are reported . < / dd >
* < dt > mixed ( both < i > includes < / i > and < i > excludes < / i > < / dt >
* < dd > Only metrics whose name is listed in < i > includes < / i > and
* < em > not < / em > listed in < i > excludes < / i > are reported ;
* < i > excludes < / i > takes precedence over < i > includes < / i > . < / dd >
* < / dl >
* @ return the filter for selecting metrics based on the configured excludes / includes .
* @ see # getIncludes ( )
* @ see # getExcludes ( ) */
@ JsonIgnore public MetricFilter getFilter ( ) { } }
|
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
// Where , by default , with no includes setting , all names are included .
return ! stringMatchingStrategy . containsMatch ( getExcludes ( ) , name ) && ( getIncludes ( ) . isEmpty ( ) || stringMatchingStrategy . containsMatch ( getIncludes ( ) , name ) ) ; } ;
|
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 AttributesImpl atts , final String localName , final String value ) { } }
|
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 > > predicate , Optional < String > name , Optional < String > title , Optional < String > hreflang , Optional < String > profile ) { } }
|
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 machine .
* @ param parameters Parameters supplied to the Update Virtual Machine Scale Sets VM operation .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the VirtualMachineScaleSetVMInner object */
public Observable < VirtualMachineScaleSetVMInner > beginUpdateAsync ( String resourceGroupName , String vmScaleSetName , String instanceId , VirtualMachineScaleSetVMInner parameters ) { } }
|
return beginUpdateWithServiceResponseAsync ( resourceGroupName , vmScaleSetName , instanceId , parameters ) . map ( new Func1 < ServiceResponse < VirtualMachineScaleSetVMInner > , VirtualMachineScaleSetVMInner > ( ) { @ Override public VirtualMachineScaleSetVMInner call ( ServiceResponse < VirtualMachineScaleSetVMInner > response ) { return response . body ( ) ; } } ) ;
|
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 primary keys , they are indexes in the result set . Thus , < code > 0 < / code > refers to the first result in the set . Setting both < code > start < / code > and < code > end < / code > to { @ link QueryUtil # ALL _ POS } will return the full result set . If < code > orderByComparator < / code > is specified , then the query will include the given ORDER BY logic . If < code > orderByComparator < / code > is absent and pagination is required ( < code > start < / code > and < code > end < / code > are not { @ link QueryUtil # ALL _ POS } ) , then the query will include the default ORDER BY logic from { @ link CPDefinitionOptionValueRelModelImpl } . If both < code > orderByComparator < / code > and pagination are absent , for performance reasons , the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order .
* @ param companyId the company ID
* @ param start the lower bound of the range of cp definition option value rels
* @ param end the upper bound of the range of cp definition option value rels ( not inclusive )
* @ return the range of matching cp definition option value rels */
@ Override public List < CPDefinitionOptionValueRel > findByCompanyId ( long companyId , int start , int end ) { } }
|
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 elements must be of type { @ code E } .
* The check is actually executed by continuing the method chain . For example :
* < pre > { @ code
* assertThat ( actualIterable ) . comparingElementsUsing ( correspondence ) . contains ( expected ) ;
* } < / pre >
* where { @ code actualIterable } is an { @ code Iterable < A > } ( or , more generally , an { @ code
* Iterable < ? extends A > } ) , { @ code correspondence } is a { @ code Correspondence < A , E > } , and { @ code
* expected } is an { @ code E } .
* < p > Any of the methods on the returned object may throw { @ link ClassCastException } if they
* encounter an actual element that is not of type { @ code A } . */
public < A , E > UsingCorrespondence < A , E > comparingElementsUsing ( Correspondence < ? super A , ? super E > correspondence ) { } }
|
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 expectedCount ) throws SQLException { } }
|
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 cs_START : writer . closeOutbound ( ) ; inboundDone = true ; break ; case cs_ERROR : case cs_CLOSED : break ; /* * Otherwise we indicate clean termination . */
// case cs _ HANDSHAKE :
// case cs _ DATA :
// case cs _ RENEGOTIATE :
default : warning ( Alerts . alert_close_notify ) ; writer . closeOutbound ( ) ; break ; } // See comment in changeReadCiphers ( )
writeCipher . dispose ( ) ; connectionState = cs_CLOSED ;
|
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 managedInstanceName The name of the managed instance .
* @ param databaseName The name of the database .
* @ param retentionDays The backup retention period in days . This is how many days Point - in - Time Restore will be supported .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable for the request */
public Observable < ManagedBackupShortTermRetentionPolicyInner > updateAsync ( String resourceGroupName , String managedInstanceName , String databaseName , Integer retentionDays ) { } }
|
return updateWithServiceResponseAsync ( resourceGroupName , managedInstanceName , databaseName , retentionDays ) . map ( new Func1 < ServiceResponse < ManagedBackupShortTermRetentionPolicyInner > , ManagedBackupShortTermRetentionPolicyInner > ( ) { @ Override public ManagedBackupShortTermRetentionPolicyInner call ( ServiceResponse < ManagedBackupShortTermRetentionPolicyInner > response ) { return response . body ( ) ; } } ) ;
|
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 ( int 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 . add ( entry ) ; } } return 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 , boolean bDisplayOption , int iMoveMode ) { } }
|
// 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 , newHeight ) ; result . setCenterPoint ( getCenterPoint ( ) ) ; return result ; } else { return new Bbox ( this ) ; }
|
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 ( ) , MAXRESULTS_BINDING ) ; protocolMarshaller . marshall ( listOriginEndpointsRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
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 InterruptedException: " + e ) ; } return readCount ;
|
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 error .
* @ throws InvalidInputException
* The request was rejected because an invalid or out - of - range value was supplied for an input parameter .
* @ throws LimitExceededException
* The request was rejected because it attempted to create resources beyond the current AWS account limits .
* The error code describes the limit exceeded .
* @ throws InvalidAccessException
* AWS Security Hub is not enabled for the account used to make this request .
* @ sample AWSSecurityHub . BatchImportFindings
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / securityhub - 2018-10-26 / BatchImportFindings "
* target = " _ top " > AWS API Documentation < / a > */
@ Override public BatchImportFindingsResult batchImportFindings ( BatchImportFindingsRequest request ) { } }
|
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 having a leading type variable , example : a < b
// Try forcing interpretation as an expression
ParseTask ept = state . taskFactory . new ParseTask ( source , true ) ; if ( ! ept . getDiagnostics ( ) . hasOtherThanNotStatementErrors ( ) ) { return ept ; } } return pt ;
|
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 policy set definition properties .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the PolicySetDefinitionInner object */
public Observable < PolicySetDefinitionInner > createOrUpdateAsync ( String policySetDefinitionName , PolicySetDefinitionInner parameters ) { } }
|
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 connection manager with simple configuration .
PoolingNHttpClientConnectionManager connManager = new PoolingNHttpClientConnectionManager ( ioReactor ) ; // Configure total max or per route limits for persistent connections
// that can be kept in the pool or leased by the connection manager .
connManager . setMaxTotal ( maxTotal ) ; connManager . setDefaultMaxPerRoute ( defaultMaxPerRoute ) ; return httpAsyncClient = HttpAsyncClients . custom ( ) . useSystemProperties ( ) . setConnectionManager ( connManager ) . build ( ) ;
|
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 ; } } // we didn ' t find a match in httpEndpoints ; lets look in httpProxyRedirects
String host = hostAlias . substring ( 0 , pos ) ; Integer httpsPort = HttpProxyRedirect . getRedirectPort ( host , port ) ; if ( httpsPort != null ) { return httpsPort ; } } catch ( NumberFormatException nfe ) { } } return - 1 ;
|
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 List } of the filtered dimension values to send or < tt > null < tt / > if the event is not in the white list */
private List < String > getOrderedDimValues ( ServiceMetricEvent event ) { } }
|
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 Collections . emptyList ( ) ; } for ( String dimKey : dimensions ) { Object rawValue = event . getUserDims ( ) . get ( dimKey ) ; String value = null ; if ( rawValue instanceof String ) { value = ( String ) rawValue ; } else if ( rawValue instanceof Collection ) { Collection values = ( Collection ) rawValue ; if ( ! values . isEmpty ( ) ) { value = ( String ) values . iterator ( ) . next ( ) ; } } if ( value != null ) { outputList . add ( AmbariMetricsEmitter . sanitize ( value ) ) ; } } return outputList . build ( ) ;
|
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 / rfc5545 # page - 138 " > RFC 5545
* p . 138-9 < / a >
* @ see < a href = " http : / / tools . ietf . org / html / rfc2445 # page - 131 " > RFC 2445
* p . 131-3 < / a > */
public Sequence setSequence ( Integer sequence ) { } }
|
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 ) { } producer = null ; }
|
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 that are installed with ICU4J . */
public static Locale [ ] getAvailableLocales ( ) { } }
|
// 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 there ' s no component at the edge , drop down 5
// pixels and look again
if ( comp == this ) { comp = getComponentAt ( insets . left , rectbot + 5 ) ; } if ( comp != this && comp != null ) { int compbot = comp . getY ( ) + comp . getHeight ( ) ; return compbot - rectbot + 5 ; } } else { Component comp = getComponentAt ( insets . left , visibleRect . y ) ; // if there ' s no component at the edge , move up 5
// pixels and look again
if ( comp == this ) { comp = getComponentAt ( insets . left , visibleRect . y - 5 ) ; } if ( comp != this && comp != null ) { return visibleRect . y - comp . getY ( ) + 5 ; } } } return DEFAULT_SCROLL_AMOUNT ;
|
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 RuleViolation . NONE ;
|
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 BackupNotFoundException
* Backup not found for the given BackupARN .
* @ throws InternalServerErrorException
* An error occurred on the server side .
* @ sample AmazonDynamoDB . DescribeBackup
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / dynamodb - 2012-08-10 / DescribeBackup " target = " _ top " > AWS API
* Documentation < / a > */
@ Override public DescribeBackupResult describeBackup ( DescribeBackupRequest request ) { } }
|
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 */
public void setTolerance ( double tolerance ) { } }
|
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 - Cannot be null .
* @ param intf
* One or more interfaces .
* @ return New object implementing the interface . */
public final SgClass create ( final String implPackageName , final String implClassName , final ImplementationFactoryListener listener , final Class < ? > ... intf ) { } }
|
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 urlPrefix , Manager manager , String pluginClasses ) { } }
|
SimonConsoleRequestProcessor requestProcessor = new SimonConsoleRequestProcessor ( urlPrefix ) ; if ( manager != null ) { // Defaults to global manager
requestProcessor . setManager ( manager ) ; } if ( pluginClasses != null ) { requestProcessor . getPluginManager ( ) . addPlugins ( pluginClasses ) ; } requestProcessor . initActionBindings ( ) ; return 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 length , boolean isChop ) throws IOException { } }
|
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 ( offset > 0 && buf [ offset - 1 ] == '\r' ) return offset - 1 ; else return offset ; } else { buf [ offset ++ ] = ( char ) ch ; _readOffset = readOffset ; return offset + 1 ; } buf [ offset ++ ] = ( char ) ch ; } _readOffset = readOffset ; if ( readOffset <= _readLength ) { if ( ! readBuffer ( ) ) { return offset ; } } if ( length <= offset ) return length + 1 ; }
|
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 _ TIME } with a value of type < code > Long < / code > . < p >
* @ param settings the user settings which are configured via the preferences dialog
* @ param session the session of the user */
protected void initTimeWarp ( CmsUserSettings settings , HttpSession session ) { } }
|
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 ) { // delete :
if ( timeWarpSetLong != null ) { // we may come from direct _ edit . jsp : don ' t remove attribute , this is
session . removeAttribute ( CmsContextInfo . ATTRIBUTE_REQUEST_TIME ) ; } } else { // this is dominant : if configured we will use it
if ( timeWarpSet != timeWarpConf ) { session . setAttribute ( CmsContextInfo . ATTRIBUTE_REQUEST_TIME , new Long ( timeWarpConf ) ) ; } }
|
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 percentage sign
* < / pre >
* @ returnthe default directory */
public static String getInitialDirectory ( ) { } }
|
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 . replaceAll ( "%%" , System . getProperty ( "%" ) ) ; return 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 the coordinate of a point on the horizontal plane .
* @ param x is the x - coordinate on point to project on the horizontal plane .
* @ param y is the y - coordinate of point to project on the horizontal plane .
* @ param system is the coordinate system to use for determining the up coordinate .
* @ return the height of the face at the given coordinate . */
public double getGroundHeight ( double x , double y , CoordinateSystem3D system ) { } }
|
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 p1 . getZ ( ) ; double d = - ( v . getX ( ) * p1 . getX ( ) + v . getY ( ) * p1 . getY ( ) + v . getZ ( ) * p1 . getZ ( ) ) ; if ( idx == 2 ) return - ( v . getX ( ) * x + v . getY ( ) * y + d ) / v . getZ ( ) ; return - ( v . getX ( ) * x + v . getZ ( ) * y + d ) / v . getY ( ) ;
|
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 ( ) ) { return Result . err ( Status . ERR_Denied , "User [" + trans . user ( ) + "] does not have permission to delete [" + pd . encode ( ) + "] from Role [" + role . fullName ( ) + ']' ) ; } } Result < List < RoleDAO . Data > > rlr = q . roleDAO . read ( trans , role ) ; if ( rlr . notOKorIsEmpty ( ) ) { // If Bad Data , clean out
Result < List < PermDAO . Data > > rlp = q . permDAO . read ( trans , pd ) ; if ( rlp . isOKhasData ( ) ) { for ( PermDAO . Data pv : rlp . value ) { q . permDAO . delRole ( trans , pv , role ) ; } } return Result . err ( rlr ) ; } String perm1 = pd . encode ( ) ; boolean notFound ; if ( trans . forceRequested ( ) ) { notFound = false ; } else { // only check if force not set .
notFound = true ; for ( RoleDAO . Data r : rlr . value ) { if ( r . perms != null ) { for ( String perm : r . perms ) { if ( perm1 . equals ( perm ) ) { notFound = false ; break ; } } if ( ! notFound ) { break ; } } } } if ( notFound ) { // Need to check both , in case of corruption
return Result . err ( Status . ERR_PermissionNotFound , "Permission [%s.%s|%s|%s] not associated with any Role" , pd . ns , pd . type , pd . instance , pd . action ) ; } // Read Perm for full data
Result < List < PermDAO . Data > > rlp = q . permDAO . read ( trans , pd ) ; Result < Void > rv = null ; if ( rlp . isOKhasData ( ) ) { for ( PermDAO . Data pv : rlp . value ) { if ( ( rv = q . permDAO . delRole ( trans , pv , role ) ) . isOK ( ) ) { if ( ( rv = q . roleDAO . delPerm ( trans , role , pv ) ) . notOK ( ) ) { trans . error ( ) . log ( "Error removing Perm during delFromPermRole:" , trans . getUserPrincipal ( ) , rv . errorString ( ) ) ; } } else { trans . error ( ) . log ( "Error removing Role during delFromPermRole:" , trans . getUserPrincipal ( ) , rv . errorString ( ) ) ; } } } else { rv = q . roleDAO . delPerm ( trans , role , pd ) ; if ( rv . notOK ( ) ) { trans . error ( ) . log ( "Error removing Role during delFromPermRole" , rv . errorString ( ) ) ; } } return rv == null ? Result . ok ( ) : rv ;
|
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 . SERIALIZE_PROTOBUF ) ) { return getSerializeTypeByName ( RpcConstants . SERIALIZE_PROTOBUF ) ; } else if ( ct . contains ( RpcConstants . SERIALIZE_HESSIAN ) ) { return getSerializeTypeByName ( RpcConstants . SERIALIZE_HESSIAN2 ) ; } } throw new SofaRpcException ( RpcErrorType . SERVER_DESERIALIZE , "Unsupported content type " + contentType + " in http protocol, please set HTTP HEAD: '" + RemotingConstants . HEAD_SERIALIZE_TYPE + "'." ) ;
|
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 , IOException { } }
|
/* * 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}" , securityPackage ) ; try { /* * Acquire a handle for the local Windows login credentials for the current user
* See AcquireCredentialsHandle
* ( http : / / msdn . microsoft . com / en - us / library / windows / desktop / aa374712%28v = vs . 85%29 . aspx )
* This corresponds to pg _ SSPI _ startup in libpq / fe - auth . c . */
try { clientCredentials = WindowsCredentialsHandleImpl . getCurrent ( securityPackage ) ; clientCredentials . initialize ( ) ; } catch ( Win32Exception ex ) { throw new PSQLException ( "Could not obtain local Windows credentials for SSPI" , PSQLState . CONNECTION_UNABLE_TO_CONNECT /* TODO : Should be authentication error */
, ex ) ; } try { targetName = makeSPN ( ) ; LOGGER . log ( Level . FINEST , "SSPI target name: {0}" , targetName ) ; sspiContext = new WindowsSecurityContextImpl ( ) ; sspiContext . setPrincipalName ( targetName ) ; sspiContext . setCredentialsHandle ( clientCredentials ) ; sspiContext . setSecurityPackage ( securityPackage ) ; sspiContext . initialize ( null , null , targetName ) ; } catch ( Win32Exception ex ) { throw new PSQLException ( "Could not initialize SSPI security context" , PSQLState . CONNECTION_UNABLE_TO_CONNECT /* TODO : Should be auth error */
, ex ) ; } sendSSPIResponse ( sspiContext . getToken ( ) ) ; LOGGER . log ( Level . FINEST , "Sent first SSPI negotiation message" ) ; } catch ( NoClassDefFoundError ex ) { throw new PSQLException ( "SSPI cannot be used, Waffle or its dependencies are missing from the classpath" , PSQLState . NOT_IMPLEMENTED , ex ) ; }
|
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 . getAttributes ( ) ) ;
|
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 ( charactersCase_ == 1 ) { characters_ = s ; } return s ; }
|
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 . getMessage ( ) , e ) ; }
|
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_ += length ( bytes , p_ , end ) ; }
|
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 */
private boolean propertiesIncluded ( Map < Object , Object > inputMap , Map < Object , Object > existingMap ) { } }
|
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 search list .
Object existingValue ; for ( Entry < Object , Object > entry : inputMap . entrySet ( ) ) { existingValue = existingMap . get ( entry . getKey ( ) ) ; if ( existingValue == null || ! existingValue . equals ( entry . getValue ( ) ) ) { return false ; } } return true ;
|
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 */
@ Override @ SuppressWarnings ( "ReferenceEquality" ) protected boolean evaluateDependencies ( final Dependency dependency , final Dependency nextDependency , final Set < Dependency > dependenciesToRemove ) { } }
|
Dependency main ; // CSOFF : InnerAssignment
if ( ( main = getMainGemspecDependency ( dependency , nextDependency ) ) != null ) { if ( main == dependency ) { mergeDependencies ( dependency , nextDependency , dependenciesToRemove ) ; } else { mergeDependencies ( nextDependency , dependency , dependenciesToRemove ) ; return true ; // since we merged into the next dependency - skip forward to the next in mainIterator
} } else if ( ( main = getMainSwiftDependency ( dependency , nextDependency ) ) != null ) { if ( main == dependency ) { mergeDependencies ( dependency , nextDependency , dependenciesToRemove ) ; } else { mergeDependencies ( nextDependency , dependency , dependenciesToRemove ) ; return true ; // since we merged into the next dependency - skip forward to the next in mainIterator
} } else if ( ( main = getMainAndroidDependency ( dependency , nextDependency ) ) != null ) { if ( main == dependency ) { mergeDependencies ( dependency , nextDependency , dependenciesToRemove ) ; } else { mergeDependencies ( nextDependency , dependency , dependenciesToRemove ) ; return true ; // since we merged into the next dependency - skip forward to the next in mainIterator
} } else if ( ( main = getMainDotnetDependency ( dependency , nextDependency ) ) != null ) { if ( main == dependency ) { mergeDependencies ( dependency , nextDependency , dependenciesToRemove ) ; } else { mergeDependencies ( nextDependency , dependency , dependenciesToRemove ) ; return true ; // since we merged into the next dependency - skip forward to the next in mainIterator
} } // CSON : InnerAssignment
return false ;
|
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 the request body
* @ param listener The listener whose onSuccess or onFailure methods will be called when this request finishes */
protected void send ( Map < String , String > formParameters , ResponseListener listener ) { } }
|
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 that was passed in
* @ see # isValidValue ( long ) */
public long checkValidValue ( long value , TemporalField field ) { } }
|
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 of worker threads to start up .
* @ return a { @ link ScanResult } object representing the result of the scan .
* @ throws ClassGraphException
* if any of the worker threads throws an uncaught exception , or the scan was interrupted . */
public ScanResult scan ( final int numThreads ) { } }
|
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 directory directory to process
* @ return ProjectFile instance if we can process anything , or null */
private ProjectFile handleDirectory ( File directory ) throws Exception { } }
|
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 ) ; protocolMarshaller . marshall ( startSessionRequest . getParameters ( ) , PARAMETERS_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
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 . create ( revision , oldestModification . getPipelineLabel ( ) ) ;
|
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
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the ProjectFileInner object */
public Observable < ProjectFileInner > updateAsync ( String groupName , String serviceName , String projectName , String fileName , ProjectFileInner parameters ) { } }
|
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 the auto refresh parameter */
public static boolean isNotAutoRefreshParam ( final ResourceParams params ) { } }
|
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 ; } } setUploadVariant ( upload ) ;
|
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 */
public static Set < Class < ? > > scanForClasses ( final File directory , final String packagePath ) throws ClassNotFoundException { } }
|
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 destination , boolean destinationOverride , Message srcMessage , int deliveryMode , int priority , long timeToLive ) throws JMSException { } }
|
// 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 ( ) ; try { checkNotClosed ( ) ; // Dispatch to session
( ( LocalSession ) session ) . dispatch ( message ) ; } finally { externalAccessLock . readLock ( ) . unlock ( ) ; }
|
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 > { @ link I _ CmsPermissionHandler # PERM _ ALLOWED } < / code > < / li >
* < li > < code > { @ link I _ CmsPermissionHandler # PERM _ FILTERED } < / code > < / li >
* < li > < code > { @ link I _ CmsPermissionHandler # PERM _ DENIED } < / code > < / li > < / ul > < p >
* @ param context the current request context
* @ param resource the resource on which permissions are required
* @ param requiredPermissions the set of permissions required for the operation
* @ param checkLock if true , a lock for the current user is required for
* all write operations , if false it ' s ok to write as long as the resource
* is not locked by another user
* @ param filter the resource filter to use
* @ return < code > { @ link I _ CmsPermissionHandler # PERM _ ALLOWED } < / code > if the user has sufficient permissions on the resource
* for the requested operation
* @ throws CmsException in case of i / o errors ( NOT because of insufficient permissions )
* @ see # hasPermissions ( CmsDbContext , CmsResource , CmsPermissionSet , boolean , CmsResourceFilter ) */
public I_CmsPermissionHandler . CmsPermissionCheckResult hasPermissions ( CmsRequestContext context , CmsResource resource , CmsPermissionSet requiredPermissions , boolean checkLock , CmsResourceFilter filter ) throws CmsException { } }
|
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 . get ( Country . class , countryInput ) . getOrElse ( Country . DEFAULT ) ; }
* @ since 3.1 */
public static < T extends Enum < T > > Option < T > get ( Class < T > enumClass , String value ) { } }
|
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 ResourceAlreadyExistsException
* The specified resource already exists .
* @ throws ResourceNotFoundException
* The specified resource was not found .
* @ throws ResourceNotAvailableException
* The specified resource exists and is not in use , but isn ' t available .
* @ throws LimitExceededException
* The requested limit exceeds the permitted limit for an account .
* @ throws InvalidAccountStatusException
* The resource cannot be created because your AWS account is suspended . For assistance , contact AWS
* Support .
* @ throws IncompatibleImageException
* The image does not support storage connectors .
* @ sample AmazonAppStream . CopyImage
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / appstream - 2016-12-01 / CopyImage " target = " _ top " > AWS API
* Documentation < / a > */
@ Override public CopyImageResult copyImage ( CopyImageRequest request ) { } }
|
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 ( final WComponent component , final Duplet < String , Class < ? > > key ) { } }
|
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 > split ( InputStream input ) throws Exception { } }
|
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
* @ return the new commerce user segment criterion */
@ Override @ Transactional ( enabled = false ) public CommerceUserSegmentCriterion createCommerceUserSegmentCriterion ( long commerceUserSegmentCriterionId ) { } }
|
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 + "" ) ) ;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.