signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class DisksInner { /** * Creates or updates a disk . * @ param resourceGroupName The name of the resource group . * @ param diskName The name of the managed disk that is being created . The name can ' t be changed after the disk is created . Supported characters for the name are a - z , A - Z , 0-9 and _ . The maximum name length is 80 characters . * @ param disk Disk object supplied in the body of the Put disk operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws CloudException thrown if the request is rejected by server * @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @ return the DiskInner object if successful . */ public DiskInner createOrUpdate ( String resourceGroupName , String diskName , DiskInner disk ) { } }
return createOrUpdateWithServiceResponseAsync ( resourceGroupName , diskName , disk ) . toBlocking ( ) . last ( ) . body ( ) ;
public class Script { /** * Returns a list of the keys required by this script , assuming a multi - sig script . * @ throws ScriptException if the script type is not understood or is pay to address or is P2SH ( run this method on the " Redeem script " instead ) . */ public List < ECKey > getPubKeys ( ) { } }
if ( ! ScriptPattern . isSentToMultisig ( this ) ) throw new ScriptException ( ScriptError . SCRIPT_ERR_UNKNOWN_ERROR , "Only usable for multisig scripts." ) ; ArrayList < ECKey > result = Lists . newArrayList ( ) ; int numKeys = Script . decodeFromOpN ( chunks . get ( chunks . size ( ) - 2 ) . opcode ) ; for ( int i = 0 ; i < numKeys ; i ++ ) result . add ( ECKey . fromPublicOnly ( chunks . get ( 1 + i ) . data ) ) ; return result ;
public class WButton { /** * Override preparePaintComponent to register an AJAX operation if this button is AJAX enabled . * @ param request the request being responded to */ @ Override protected void preparePaintComponent ( final Request request ) { } }
super . preparePaintComponent ( request ) ; UIContext uic = UIContextHolder . getCurrent ( ) ; if ( isAjax ( ) && uic . getUI ( ) != null ) { AjaxTarget target = getAjaxTarget ( ) ; AjaxHelper . registerComponent ( target . getId ( ) , getId ( ) ) ; }
public class DoubleStream { /** * Returns the last element wrapped by { @ code OptionalDouble } class . * If stream is empty , returns { @ code OptionalDouble . empty ( ) } . * < p > This is a short - circuiting terminal operation . * @ return an { @ code OptionalDouble } with the last element * or { @ code OptionalDouble . empty ( ) } if the stream is empty * @ since 1.1.8 */ @ NotNull public OptionalDouble findLast ( ) { } }
return reduce ( new DoubleBinaryOperator ( ) { @ Override public double applyAsDouble ( double left , double right ) { return right ; } } ) ;
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EEnum getMPSRGLength ( ) { } }
if ( mpsrgLengthEEnum == null ) { mpsrgLengthEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 52 ) ; } return mpsrgLengthEEnum ;
public class NioServer { /** * Handle a SelectionKey which was selected */ private void handleKey ( Selector selector , SelectionKey key ) throws IOException { } }
if ( key . isValid ( ) && key . isAcceptable ( ) ) { // Accept a new connection , give it a stream connection as an attachment SocketChannel newChannel = sc . accept ( ) ; newChannel . configureBlocking ( false ) ; SelectionKey newKey = newChannel . register ( selector , SelectionKey . OP_READ ) ; try { ConnectionHandler handler = new ConnectionHandler ( connectionFactory , newKey ) ; newKey . attach ( handler ) ; handler . connection . connectionOpened ( ) ; } catch ( IOException e ) { // This can happen if ConnectionHandler ' s call to get a new handler returned null log . error ( "Error handling new connection" , Throwables . getRootCause ( e ) . getMessage ( ) ) ; newKey . channel ( ) . close ( ) ; } } else { // Got a closing channel or a channel to a client connection ConnectionHandler . handleKey ( key ) ; }
public class BasicWritable { /** * { @ inheritDoc } */ @ Override public void readFields ( DataInput in ) throws IOException { } }
try { values . clear ( ) ; int entries = in . readInt ( ) ; for ( int i = 0 ; i < entries ; i ++ ) { ValueWritable vw = new ValueWritable ( ) ; vw . readFields ( in ) ; values . add ( vw ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; throw new RuntimeException ( e ) ; }
public class TokenLoginModule { /** * Gets the required Callback objects needed by this login module . * @ param callbackHandler * @ return * @ throws IOException * @ throws UnsupportedCallbackException */ @ Override public Callback [ ] getRequiredCallbacks ( CallbackHandler callbackHandler ) throws IOException , UnsupportedCallbackException { } }
Callback [ ] callbacks = new Callback [ 3 ] ; callbacks [ 0 ] = new WSCredTokenCallbackImpl ( "Credential Token" ) ; callbacks [ 1 ] = new WSAuthMechOidCallbackImpl ( "AuthMechOid" ) ; callbacks [ 2 ] = new JwtTokenCallback ( ) ; callbackHandler . handle ( callbacks ) ; return callbacks ;
public class HSBColor { /** * { @ inheritDoc } */ @ Override public void parse ( final String ... parameters ) { } }
// Manage hue composite if ( parameters . length >= 1 ) { hueProperty ( ) . set ( readDouble ( parameters [ 0 ] , 0.0 , 360.0 ) ) ; } // Manage saturation composite if ( parameters . length >= 2 ) { saturationProperty ( ) . set ( readDouble ( parameters [ 1 ] , 0.0 , 1.0 ) ) ; } // Manage brightness composite if ( parameters . length >= 3 ) { brightnessProperty ( ) . set ( readDouble ( parameters [ 2 ] , 0.0 , 1.0 ) ) ; } // Manage opacity if ( parameters . length >= 4 ) { opacityProperty ( ) . set ( readDouble ( parameters [ 3 ] , 0.0 , 1.0 ) ) ; }
public class DifficultMatcher { public void get ( Object rootVal , MatchSpaceKey msg , EvalCache cache , Object contextValue , SearchResults result ) throws MatchingException , BadMessageFormatMatchingException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "get" , "msg: " + msg + ", result: " + result ) ; // type never used so removed // int type ; List [ ] v = alwaysMatch . lists ; if ( v . length > 0 ) result . addObjects ( v ) ; if ( msg != null ) { int numExpr = roots . size ( ) ; for ( int current = 0 ; current < numExpr ; current ++ ) { Boolean res = null ; // May need to call MFP multiple times , if our context has multiple nodes if ( contextValue != null ) { // Currently this must be a list of nodes if ( contextValue instanceof SetValEvaluationContext ) { SetValEvaluationContext evalContext = ( SetValEvaluationContext ) contextValue ; // Get the node list ArrayList wrappedParentList = evalContext . getWrappedNodeList ( ) ; // If the list is empty , then we have yet to get the document root if ( wrappedParentList . isEmpty ( ) ) { // Set up a root ( document ) context for evaluation Object docRoot = Matching . getEvaluator ( ) . getDocumentRoot ( msg ) ; // Create an object to hold the wrapped node WrappedNodeResults wrapper = new WrappedNodeResults ( docRoot ) ; // Set the root into the evaluation context evalContext . addNode ( wrapper ) ; } // Iterate over the nodes Iterator iter = wrappedParentList . iterator ( ) ; while ( iter . hasNext ( ) ) { WrappedNodeResults nextWrappedNode = ( WrappedNodeResults ) iter . next ( ) ; Object nextNode = nextWrappedNode . getNode ( ) ; // If no cached value we ' ll need to call MFP // TODO : No caching here // Call MFP to get the results for this node res = ( Boolean ) Matching . getEvaluator ( ) . eval ( ( Selector ) roots . get ( current ) , msg , cache , nextNode , true ) ; // Permissive is true if ( res != null && res . booleanValue ( ) ) { break ; } } // eof while } // eof instanceof XPathEvaluationContext } else { res = ( Boolean ) Matching . getEvaluator ( ) . eval ( ( Selector ) roots . get ( current ) , msg , cache , contextValue , false ) ; } if ( res != null && res . booleanValue ( ) ) { MatchTargetTypeList tlist = ( MatchTargetTypeList ) objs . get ( current ) ; v = tlist . lists ; if ( v . length > 0 ) result . addObjects ( v ) ; } } } // ContinueBranch has to be last to treat this node as if it was at the end of // a long chain of * , or a # . super . get ( null , msg , cache , contextValue , result ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . exit ( this , cclass , "get" ) ;
public class CertificateHelper { /** * Convert the passed byte array to an X . 509 certificate object . * @ param aCertBytes * The original certificate bytes . May be < code > null < / code > or empty . * @ return < code > null < / code > if the passed byte array is < code > null < / code > or * empty * @ throws CertificateException * In case the passed string cannot be converted to an X . 509 * certificate . */ @ Nullable public static X509Certificate convertByteArrayToCertficate ( @ Nullable final byte [ ] aCertBytes ) throws CertificateException { } }
if ( ArrayHelper . isEmpty ( aCertBytes ) ) return null ; // Certificate is always ISO - 8859-1 encoded return convertStringToCertficate ( new String ( aCertBytes , CERT_CHARSET ) ) ;
public class AbstractJsonMapping { /** * Handle unknown properties and print a message * @ param key * @ param value */ @ JsonAnySetter protected void handleUnknown ( String key , Object value ) { } }
StringBuilder unknown = new StringBuilder ( this . getClass ( ) . getSimpleName ( ) ) ; unknown . append ( ": Unknown property='" ) . append ( key ) ; unknown . append ( "' value='" ) . append ( value ) . append ( "'" ) ; LOG . trace ( unknown . toString ( ) ) ;
public class TreeBuilder { /** * Listen to events on selective resources of the tree * @ param listener listener * @ param resourceSelector resource selector * @ return builder */ private TreeBuilder < T > listen ( Listener < T > listener , String resourceSelector ) { } }
return TreeBuilder . < T > builder ( new ListenerTree < T > ( build ( ) , listener , PathUtil . < T > resourceSelector ( resourceSelector ) ) ) ;
public class IpAccessControlList { /** * Create a IpAccessControlListUpdater to execute update . * @ param pathAccountSid The unique sid that identifies this account * @ param pathSid A string that identifies the resource to update * @ param friendlyName A human readable description of this resource * @ return IpAccessControlListUpdater capable of executing the update */ public static IpAccessControlListUpdater updater ( final String pathAccountSid , final String pathSid , final String friendlyName ) { } }
return new IpAccessControlListUpdater ( pathAccountSid , pathSid , friendlyName ) ;
public class LogicManagementClientImpl { /** * Lists all of the available Logic REST API operations . * ServiceResponse < PageImpl < OperationInner > > * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the PagedList & lt ; OperationInner & gt ; object wrapped in { @ link ServiceResponse } if successful . */ public Observable < ServiceResponse < Page < OperationInner > > > listOperationsNextSinglePageAsync ( final String nextPageLink ) { } }
if ( nextPageLink == null ) { throw new IllegalArgumentException ( "Parameter nextPageLink is required and cannot be null." ) ; } String nextUrl = String . format ( "%s" , nextPageLink ) ; return service . listOperationsNext ( nextUrl , this . acceptLanguage ( ) , this . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponse < Page < OperationInner > > > > ( ) { @ Override public Observable < ServiceResponse < Page < OperationInner > > > call ( Response < ResponseBody > response ) { try { ServiceResponse < PageImpl < OperationInner > > result = listOperationsNextDelegate ( response ) ; return Observable . just ( new ServiceResponse < Page < OperationInner > > ( result . body ( ) , result . response ( ) ) ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ;
public class DocumentRootImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public NotificationChain basicSetMetaData ( MetaDataType newMetaData , NotificationChain msgs ) { } }
return ( ( FeatureMap . Internal ) getMixed ( ) ) . basicAdd ( DroolsPackage . Literals . DOCUMENT_ROOT__META_DATA , newMetaData , msgs ) ;
public class CPDefinitionLinkPersistenceImpl { /** * Removes all the cp definition links where CProductId = & # 63 ; and type = & # 63 ; from the database . * @ param CProductId the c product ID * @ param type the type */ @ Override public void removeByCP_T ( long CProductId , String type ) { } }
for ( CPDefinitionLink cpDefinitionLink : findByCP_T ( CProductId , type , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ) { remove ( cpDefinitionLink ) ; }
public class FieldAccessor { /** * Tries to get the field ' s value . * @ return The field ' s value . * @ throws ReflectionException If the operation fails . */ @ SuppressFBWarnings ( value = "DP_DO_INSIDE_DO_PRIVILEGED" , justification = "Only called in test code, not production." ) public Object get ( ) { } }
field . setAccessible ( true ) ; try { return field . get ( object ) ; } catch ( IllegalAccessException e ) { throw new ReflectionException ( e ) ; }
public class TiffITProfile { /** * Validate Continuous Tone . * @ param ifd the ifd * @ param p the profile ( default = 0 , P1 = 1 , P2 = 2) */ private void validateIfdCT ( IFD ifd , int p ) { } }
IfdTags metadata = ifd . getMetadata ( ) ; boolean rgb = metadata . containsTagId ( TiffTags . getTagId ( "PhotometricInterpretation" ) ) && metadata . get ( TiffTags . getTagId ( "PhotometricInterpretation" ) ) . getFirstNumericValue ( ) == 2 ; boolean lab = metadata . containsTagId ( TiffTags . getTagId ( "PhotometricInterpretation" ) ) && metadata . get ( TiffTags . getTagId ( "PhotometricInterpretation" ) ) . getFirstNumericValue ( ) == 8 ; int spp = - 1 ; if ( metadata . containsTagId ( TiffTags . getTagId ( "SamplesPerPixel" ) ) ) { spp = ( int ) metadata . get ( TiffTags . getTagId ( "SamplesPerPixel" ) ) . getFirstNumericValue ( ) ; } int planar = 1 ; if ( metadata . containsTagId ( TiffTags . getTagId ( "PlanarConfiguration" ) ) ) { planar = ( int ) metadata . get ( TiffTags . getTagId ( "PlanarConfiguration" ) ) . getFirstNumericValue ( ) ; } int rps = - 1 ; if ( metadata . containsTagId ( TiffTags . getTagId ( "RowsPerStrip" ) ) ) { rps = ( int ) metadata . get ( TiffTags . getTagId ( "RowsPerStrip" ) ) . getFirstNumericValue ( ) ; } int length = - 1 ; if ( metadata . containsTagId ( TiffTags . getTagId ( "ImageLength" ) ) ) { length = ( int ) metadata . get ( TiffTags . getTagId ( "ImageLength" ) ) . getFirstNumericValue ( ) ; } int spi = Math . floorDiv ( length + rps - 1 , rps ) ; if ( lab ) { } else { if ( p == 1 || p == 2 ) { checkRequiredTag ( metadata , "NewSubfileType" , 1 , new long [ ] { 0 } ) ; } } checkRequiredTag ( metadata , "ImageLength" , 1 ) ; checkRequiredTag ( metadata , "ImageWidth" , 1 ) ; checkRequiredTag ( metadata , "BitsPerSample" , spp ) ; if ( rgb || lab ) { checkRequiredTag ( metadata , "BitsPerSample" , 3 , new long [ ] { 8 , 16 } ) ; } else { if ( p == 0 ) { checkRequiredTag ( metadata , "BitsPerSample" , spp , new long [ ] { 8 , 16 } ) ; } else { checkRequiredTag ( metadata , "BitsPerSample" , spp , new long [ ] { 8 } ) ; } } if ( p == 2 || rgb || lab ) { checkRequiredTag ( metadata , "Compression" , 1 , new long [ ] { 1 , 7 , 8 } ) ; } else if ( p == 1 ) { checkRequiredTag ( metadata , "Compression" , 1 , new long [ ] { 1 } ) ; } if ( p == 0 ) { checkRequiredTag ( metadata , "PhotometricInterpretation" , 1 , new long [ ] { 2 , 5 , 6 , 8 } ) ; if ( metadata . containsTagId ( TiffTags . getTagId ( "PhotometricInterpretation" ) ) && metadata . get ( TiffTags . getTagId ( "PhotometricInterpretation" ) ) . getFirstNumericValue ( ) == 6 && metadata . get ( TiffTags . getTagId ( "Compression" ) ) . getFirstNumericValue ( ) != 7 ) { validation . addErrorLoc ( "YCbCr shall be used only when compression has the value 7" , "IFD" + currentIfd ) ; } } else if ( p == 1 || p == 2 ) { checkRequiredTag ( metadata , "PhotometricInterpretation" , 1 , new long [ ] { 5 } ) ; } if ( planar == 1 || planar == 32768 ) { checkRequiredTag ( metadata , "StripOffsets" , spi ) ; } else if ( planar == 2 ) { checkRequiredTag ( metadata , "StripOffsets" , spp * spi ) ; } if ( rgb || lab ) { } else if ( p == 1 || p == 2 ) { checkRequiredTag ( metadata , "Orientation" , 1 , new long [ ] { 1 } ) ; } if ( rgb || lab ) { checkRequiredTag ( metadata , "SamplesPerPixel" , 1 , new long [ ] { 3 } ) ; } else { if ( p == 0 ) { checkRequiredTag ( metadata , "SamplesPerPixel" , 1 ) ; } else if ( p == 1 || p == 2 ) { checkRequiredTag ( metadata , "SamplesPerPixel" , 1 , new long [ ] { 4 } ) ; } } if ( p == 1 || p == 2 || rgb || lab ) { if ( planar == 1 || planar == 32768 ) { checkRequiredTag ( metadata , "StripBYTECount" , spi ) ; } else if ( planar == 2 ) { checkRequiredTag ( metadata , "StripBYTECount" , spp * spi ) ; } checkRequiredTag ( metadata , "XResolution" , 1 ) ; checkRequiredTag ( metadata , "YResolution" , 1 ) ; } if ( p == 0 || rgb || lab ) { checkRequiredTag ( metadata , "PlanarConfiguration" , 1 , new long [ ] { 1 , 2 , 32768 } ) ; } else if ( p == 1 || p == 2 ) { checkRequiredTag ( metadata , "PlanarConfiguration" , 1 , new long [ ] { 1 } ) ; } if ( rgb || lab ) { } else { if ( p == 1 || p == 2 ) { checkRequiredTag ( metadata , "ResolutionUnit" , 1 , new long [ ] { 2 , 3 } ) ; checkRequiredTag ( metadata , "InkSet" , 1 , new long [ ] { 1 } ) ; checkRequiredTag ( metadata , "NumberOfInks" , 1 , new long [ ] { 4 } ) ; checkRequiredTag ( metadata , "DotRange" , 2 , new long [ ] { 0 , 255 } ) ; } }
public class GvmClusters { /** * Obtains the clusters for the points added . This method may be called * at any time , including between calls to add ( ) . * @ return the result of clustering the points thus far added */ public List < GvmResult < K > > results ( ) { } }
ArrayList < GvmResult < K > > list = new ArrayList < GvmResult < K > > ( count ) ; for ( int i = 0 ; i < count ; i ++ ) { GvmCluster < S , K > cluster = clusters [ i ] ; // TODO exclude massless clusters ? list . add ( new GvmResult < K > ( cluster ) ) ; } return list ;
public class Log4JLogger { /** * Check whether the Log4j Logger used is enabled for < code > ERROR < / code > * priority . */ public boolean isErrorEnabled ( ) { } }
if ( IS12 ) { return getLogger ( ) . isEnabledFor ( Level . ERROR ) ; } return getLogger ( ) . isEnabledFor ( Level . ERROR ) ;
public class Reference { /** * < p > newInstance . < / p > * @ param requirement a { @ link com . greenpepper . server . domain . Requirement } object . * @ param specification a { @ link com . greenpepper . server . domain . Specification } object . * @ param sut a { @ link com . greenpepper . server . domain . SystemUnderTest } object . * @ return a { @ link com . greenpepper . server . domain . Reference } object . */ public static Reference newInstance ( Requirement requirement , Specification specification , SystemUnderTest sut ) { } }
return newInstance ( requirement , specification , sut , null ) ;
public class ErrorGroupServiceClient { /** * Get the specified group . * < p > Sample code : * < pre > < code > * try ( ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient . create ( ) ) { * GroupName groupName = GroupName . of ( " [ PROJECT ] " , " [ GROUP ] " ) ; * ErrorGroup response = errorGroupServiceClient . getGroup ( groupName ) ; * < / code > < / pre > * @ param groupName [ Required ] The group resource name . Written as * & lt ; code & gt ; projects / & lt ; var & gt ; projectID & lt ; / var & gt ; / groups / & lt ; var & gt ; group _ name & lt ; / var & gt ; & lt ; / code & gt ; . * Call & lt ; a href = " / error - reporting / reference / rest / v1beta1 / projects . groupStats / list " & gt ; * & lt ; code & gt ; groupStats . list & lt ; / code & gt ; & lt ; / a & gt ; to return a list of groups belonging to * this project . * < p > Example : & lt ; code & gt ; projects / my - project - 123 / groups / my - group & lt ; / code & gt ; * @ throws com . google . api . gax . rpc . ApiException if the remote call fails */ public final ErrorGroup getGroup ( GroupName groupName ) { } }
GetGroupRequest request = GetGroupRequest . newBuilder ( ) . setGroupName ( groupName == null ? null : groupName . toString ( ) ) . build ( ) ; return getGroup ( request ) ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EEnum getIfcPipeSegmentTypeEnum ( ) { } }
if ( ifcPipeSegmentTypeEnumEEnum == null ) { ifcPipeSegmentTypeEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 1033 ) ; } return ifcPipeSegmentTypeEnumEEnum ;
public class HikariCPSessionImpl { /** * { @ inheritDoc } */ public void begin ( ) { } }
if ( logger . isInfoEnabled ( ) ) { logger . info ( "Begin transaction." ) ; } try { Connection conn = dataSource . getConnection ( ) ; conn . setAutoCommit ( false ) ; provider . setConnection ( conn ) ; } catch ( SQLException ex ) { throw new SessionException ( "Failed to begin transaction." , ex ) ; }
public class RemoteCommandsFactory { /** * Creates an un - initialized command . Un - initialized in the sense that parameters will be set , but any components * specific to the cache in question will not be set . * You would typically set these parameters using { @ link CommandsFactory # initializeReplicableCommand ( ReplicableCommand , boolean ) } * @ param id id of the command * @ param type type of the command * @ return a replicable command */ public ReplicableCommand fromStream ( byte id , byte type ) { } }
ReplicableCommand command ; if ( type == 0 ) { switch ( id ) { case PutKeyValueCommand . COMMAND_ID : command = new PutKeyValueCommand ( ) ; break ; case PutMapCommand . COMMAND_ID : command = new PutMapCommand ( ) ; break ; case RemoveCommand . COMMAND_ID : command = new RemoveCommand ( ) ; break ; case ReplaceCommand . COMMAND_ID : command = new ReplaceCommand ( ) ; break ; case ComputeCommand . COMMAND_ID : command = new ComputeCommand ( ) ; break ; case ComputeIfAbsentCommand . COMMAND_ID : command = new ComputeIfAbsentCommand ( ) ; break ; case GetKeyValueCommand . COMMAND_ID : command = new GetKeyValueCommand ( ) ; break ; case ClearCommand . COMMAND_ID : command = new ClearCommand ( ) ; break ; case InvalidateCommand . COMMAND_ID : command = new InvalidateCommand ( ) ; break ; case InvalidateL1Command . COMMAND_ID : command = new InvalidateL1Command ( ) ; break ; case CacheTopologyControlCommand . COMMAND_ID : command = new CacheTopologyControlCommand ( ) ; break ; case GetKeysInGroupCommand . COMMAND_ID : command = new GetKeysInGroupCommand ( ) ; break ; case GetCacheEntryCommand . COMMAND_ID : command = new GetCacheEntryCommand ( ) ; break ; case ReadWriteKeyCommand . COMMAND_ID : command = new ReadWriteKeyCommand < > ( ) ; break ; case ReadWriteKeyValueCommand . COMMAND_ID : command = new ReadWriteKeyValueCommand < > ( ) ; break ; case ReadWriteManyCommand . COMMAND_ID : command = new ReadWriteManyCommand < > ( ) ; break ; case ReadWriteManyEntriesCommand . COMMAND_ID : command = new ReadWriteManyEntriesCommand < > ( ) ; break ; case WriteOnlyKeyCommand . COMMAND_ID : command = new WriteOnlyKeyCommand < > ( ) ; break ; case WriteOnlyKeyValueCommand . COMMAND_ID : command = new WriteOnlyKeyValueCommand < > ( ) ; break ; case WriteOnlyManyCommand . COMMAND_ID : command = new WriteOnlyManyCommand < > ( ) ; break ; case WriteOnlyManyEntriesCommand . COMMAND_ID : command = new WriteOnlyManyEntriesCommand < > ( ) ; break ; case RemoveExpiredCommand . COMMAND_ID : command = new RemoveExpiredCommand ( ) ; break ; case ReplicableRunnableCommand . COMMAND_ID : command = new ReplicableRunnableCommand ( ) ; break ; case ReplicableManagerFunctionCommand . COMMAND_ID : command = new ReplicableManagerFunctionCommand ( ) ; break ; case ReadOnlyKeyCommand . COMMAND_ID : command = new ReadOnlyKeyCommand ( ) ; break ; case ReadOnlyManyCommand . COMMAND_ID : command = new ReadOnlyManyCommand < > ( ) ; break ; case TxReadOnlyKeyCommand . COMMAND_ID : command = new TxReadOnlyKeyCommand < > ( ) ; break ; case TxReadOnlyManyCommand . COMMAND_ID : command = new TxReadOnlyManyCommand < > ( ) ; break ; case HeartBeatCommand . COMMAND_ID : command = HeartBeatCommand . INSTANCE ; break ; default : throw new CacheException ( "Unknown command id " + id + "!" ) ; } } else { ModuleCommandFactory mcf = commandFactories . get ( id ) ; if ( mcf != null ) return mcf . fromStream ( id ) ; else throw new CacheException ( "Unknown command id " + id + "!" ) ; } return command ;
public class Task { /** * Retrieve the effective calendar for this task . If the task does not have * a specific calendar associated with it , fall back to using the default calendar * for the project . * @ return ProjectCalendar instance */ public ProjectCalendar getEffectiveCalendar ( ) { } }
ProjectCalendar result = getCalendar ( ) ; if ( result == null ) { result = getParentFile ( ) . getDefaultCalendar ( ) ; } return result ;
public class UnicodeDecompressor { /** * Decompress a byte array into a String . * @ param buffer The byte array to decompress . * @ return A String containing the decompressed characters . * @ see # decompress ( byte [ ] , int , int ) */ public static String decompress ( byte [ ] buffer ) { } }
char [ ] buf = decompress ( buffer , 0 , buffer . length ) ; return new String ( buf ) ;
public class JournalCreator { /** * Create a journal entry , add the arguments , and invoke the method . */ public String addDatastream ( Context context , String pid , String dsID , String [ ] altIDs , String dsLabel , boolean versionable , String MIMEType , String formatURI , String location , String controlGroup , String dsState , String checksumType , String checksum , String logMessage ) throws ServerException { } }
try { CreatorJournalEntry cje = new CreatorJournalEntry ( METHOD_ADD_DATASTREAM , context ) ; cje . addArgument ( ARGUMENT_NAME_PID , pid ) ; cje . addArgument ( ARGUMENT_NAME_DS_ID , dsID ) ; cje . addArgument ( ARGUMENT_NAME_ALT_IDS , altIDs ) ; cje . addArgument ( ARGUMENT_NAME_DS_LABEL , dsLabel ) ; cje . addArgument ( ARGUMENT_NAME_VERSIONABLE , versionable ) ; cje . addArgument ( ARGUMENT_NAME_MIME_TYPE , MIMEType ) ; cje . addArgument ( ARGUMENT_NAME_FORMAT_URI , formatURI ) ; cje . addArgument ( ARGUMENT_NAME_LOCATION , location ) ; cje . addArgument ( ARGUMENT_NAME_CONTROL_GROUP , controlGroup ) ; cje . addArgument ( ARGUMENT_NAME_DS_STATE , dsState ) ; cje . addArgument ( ARGUMENT_NAME_CHECKSUM_TYPE , checksumType ) ; cje . addArgument ( ARGUMENT_NAME_CHECKSUM , checksum ) ; cje . addArgument ( ARGUMENT_NAME_LOG_MESSAGE , logMessage ) ; return ( String ) cje . invokeAndClose ( delegate , writer ) ; } catch ( JournalException e ) { throw new GeneralException ( "Problem creating the Journal" , e ) ; }
public class RecoveryManager { /** * Marks recovery as completed and signals the recovery director to this effect . */ public void recoveryComplete ( ) /* @ LIDB3187C */ { } }
if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "recoveryComplete" ) ; if ( ! _recoveryCompleted ) { _recoveryCompleted = true ; _recoveryInProgress . post ( ) ; } // Check for null currently required as z / OS creates this object with a null agent reference . if ( _agent != null ) { try { RecoveryDirectorFactory . recoveryDirector ( ) . initialRecoveryComplete ( _agent , _failureScopeController . failureScope ( ) ) ; } catch ( Exception exc ) { FFDCFilter . processException ( exc , "com.ibm.tx.jta.impl.RecoveryManager.recoveryComplete" , "1546" , this ) ; } } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "recoveryComplete" ) ;
public class YamadaParser { /** * 设置缺省词性 * @ param pos * @ throws UnsupportedDataTypeException */ public void setDefaultPOS ( String pos ) throws UnsupportedDataTypeException { } }
int lpos = postagAlphabet . lookupIndex ( pos ) ; if ( lpos == - 1 ) { throw new UnsupportedDataTypeException ( "不支持词性:" + pos ) ; } defaultPOS = pos ;
public class NotExpressionImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public NotificationChain basicSetValue ( Expression newValue , NotificationChain msgs ) { } }
Expression oldValue = value ; value = newValue ; if ( eNotificationRequired ( ) ) { ENotificationImpl notification = new ENotificationImpl ( this , Notification . SET , SimpleAntlrPackage . NOT_EXPRESSION__VALUE , oldValue , newValue ) ; if ( msgs == null ) msgs = notification ; else msgs . add ( notification ) ; } return msgs ;
public class InsertStack { /** * < p > This method is called once for each node during fringe * migration . If the node is not full we have found a home for the * migrating key which will now hold the key . If the node is full we * put the migrating key in its left - most slot and the new migrating * key is the right - most one in the node which will migrate to the * next node . < / p > * @ param p The node to inspect . * @ return true if the subtree walk is to stop . */ public boolean processNode ( GBSNode p ) { } }
boolean done = false ; if ( ! p . isFull ( ) ) /* Node is not full */ { /* We have a home for the migrating key */ _migrating = false ; done = true ; p . addLeftMostKey ( _mkey ) ; } else /* Node is full . Insert new key at left */ { /* and migrate the old right - most key */ Object migrateKey = p . addLeftMostKey ( _mkey ) ; _mkey = migrateKey ; } return done ;
public class XmlObjectPull { /** * Moves forward to the start of the next element that matches the given type and path without leaving the current sub - tree . If there is no other element of * that type in the current sub - tree , this mehtod will stop at the closing tab current sub - tree . Calling this methods with the same parameters won ' t get you * any further . * @ return < code > true < / code > if there is such an element , false otherwise . * @ throws XmlPullParserException * @ throws XmlObjectPullParserException * @ throws IOException */ public < T > boolean moveToNextSibling ( ElementDescriptor < T > type , XmlPath path ) throws XmlPullParserException , XmlObjectPullParserException , IOException { } }
return pullInternal ( type , null , path , true , true ) != null || mParser . getDepth ( ) == path . length ( ) + 1 ;
public class InvocableWampHandlerMethod { /** * Get the method argument values for the current request . */ private Object [ ] getMethodArgumentValues ( WampMessage message , Object ... providedArgs ) throws Exception { } }
MethodParameter [ ] parameters = getMethodParameters ( ) ; Object [ ] args = new Object [ parameters . length ] ; int argIndex = 0 ; for ( int i = 0 ; i < parameters . length ; i ++ ) { MethodParameter parameter = parameters [ i ] ; parameter . initParameterNameDiscovery ( this . parameterNameDiscoverer ) ; GenericTypeResolver . resolveParameterType ( parameter , getBean ( ) . getClass ( ) ) ; if ( this . argumentResolvers . supportsParameter ( parameter ) ) { try { args [ i ] = this . argumentResolvers . resolveArgument ( parameter , message ) ; continue ; } catch ( Exception ex ) { if ( this . logger . isTraceEnabled ( ) ) { this . logger . trace ( getArgumentResolutionErrorMessage ( "Error resolving argument" , i ) , ex ) ; } throw ex ; } } if ( providedArgs != null ) { args [ i ] = this . methodParameterConverter . convert ( parameter , providedArgs [ argIndex ] ) ; if ( args [ i ] != null ) { argIndex ++ ; continue ; } } if ( args [ i ] == null ) { String error = getArgumentResolutionErrorMessage ( "No suitable resolver for argument" , i ) ; throw new IllegalStateException ( error ) ; } } return args ;
public class Logger { /** * Logs a message and stack trace if DEBUG logging is enabled * or a formatted message and exception description if ERROR logging is enabled . * @ param cause an exception to print stack trace of if DEBUG logging is enabled * @ param message a message */ public final void errorDebug ( final Throwable cause , final String message ) { } }
logDebug ( Level . ERROR , cause , message ) ;
public class EllipticCurveSignatureHelper { /** * Transcodes the JCA ASN . 1 / DER - encoded signature into the concatenated * R + S format expected by ECDSA JWS . * @ param derSignature The ASN . 1 / DER - encoded . Must not be { @ code null } . * @ param outputLength The expected length of the ECDSA JWS signature . * @ return The ECDSA JWS encoded signature . * @ throws GeneralSecurityException If the ASN . 1 / DER signature format is invalid . */ static byte [ ] transcodeSignatureToJWS ( final byte [ ] derSignature , int outputLength ) throws GeneralSecurityException { } }
if ( derSignature . length < 8 || derSignature [ 0 ] != 48 ) { throw new GeneralSecurityException ( "Invalid ECDSA signature format" ) ; } int offset ; if ( derSignature [ 1 ] > 0 ) { offset = 2 ; } else if ( derSignature [ 1 ] == ( byte ) 0x81 ) { offset = 3 ; } else { throw new GeneralSecurityException ( "Invalid ECDSA signature format" ) ; } byte rLength = derSignature [ offset + 1 ] ; int i ; for ( i = rLength ; ( i > 0 ) && ( derSignature [ ( offset + 2 + rLength ) - i ] == 0 ) ; i -- ) { // do nothing } byte sLength = derSignature [ offset + 2 + rLength + 1 ] ; int j ; for ( j = sLength ; ( j > 0 ) && ( derSignature [ ( offset + 2 + rLength + 2 + sLength ) - j ] == 0 ) ; j -- ) { // do nothing } int rawLen = Math . max ( i , j ) ; rawLen = Math . max ( rawLen , outputLength / 2 ) ; if ( ( derSignature [ offset - 1 ] & 0xff ) != derSignature . length - offset || ( derSignature [ offset - 1 ] & 0xff ) != 2 + rLength + 2 + sLength || derSignature [ offset ] != 2 || derSignature [ offset + 2 + rLength ] != 2 ) { throw new GeneralSecurityException ( "Invalid ECDSA signature format" ) ; } final byte [ ] concatSignature = new byte [ 2 * rawLen ] ; System . arraycopy ( derSignature , ( offset + 2 + rLength ) - i , concatSignature , rawLen - i , i ) ; System . arraycopy ( derSignature , ( offset + 2 + rLength + 2 + sLength ) - j , concatSignature , 2 * rawLen - j , j ) ; return concatSignature ;
public class RendererRequestUtils { /** * Returns the context path depending on the request mode ( SSL or not ) * @ param isSslRequest * the flag indicating that the request is an SSL request * @ return the context path depending on the request mode */ private static String getContextPathOverride ( boolean isSslRequest , JawrConfig config ) { } }
String contextPathOverride = null ; if ( isSslRequest ) { contextPathOverride = config . getContextPathSslOverride ( ) ; } else { contextPathOverride = config . getContextPathOverride ( ) ; } return contextPathOverride ;
public class PropertiesReplacementUtil { /** * Creates an InputStream containing the document resulting from replacing template * parameters in the given file . * @ param file The template file * @ param props The properties file * @ param base Properties that should override those loaded from the file * @ param env If properties from System . getenv should also be used * @ return An InputStream containing the resulting document . */ static public InputStream replace ( File file , File props , Properties base , boolean env ) throws IOException , SubstitutionException { } }
if ( env ) return replaceProperties ( replaceEnv ( file ) , loadProperties ( base , props ) ) ; else return replaceProperties ( file , loadProperties ( base , props ) ) ;
public class Worker { /** * create worker instance and run it * @ param conf storm conf * @ param topologyId topology id * @ param supervisorId supervisor iid * @ param port worker port * @ param workerId worker id * @ return WorkerShutDown * @ throws Exception */ @ SuppressWarnings ( "rawtypes" ) public static WorkerShutdown mk_worker ( Map conf , IContext context , String topologyId , String supervisorId , int port , String workerId , String jarPath ) throws Exception { } }
StringBuilder sb = new StringBuilder ( ) ; sb . append ( "topologyId:" ) . append ( topologyId ) . append ( ", " ) ; sb . append ( "port:" ) . append ( port ) . append ( ", " ) ; sb . append ( "workerId:" ) . append ( workerId ) . append ( ", " ) ; sb . append ( "jarPath:" ) . append ( jarPath ) . append ( "\n" ) ; LOG . info ( "Begin to run worker:" + sb . toString ( ) ) ; Worker w = new Worker ( conf , context , topologyId , supervisorId , port , workerId , jarPath ) ; // w . redirectOutput ( ) ; return w . execute ( ) ;
public class StreamingJsonBuilder { /** * A method call on the JSON builder instance will create a root object with only one key * whose name is the name of the method being called . * This method takes as arguments : * < ul > * < li > a closure < / li > * < li > a map ( ie . named arguments ) < / li > * < li > a map and a closure < / li > * < li > or no argument at all < / li > * < / ul > * Example with a classicala builder - style : * < pre class = " groovyTestCase " > * new StringWriter ( ) . with { w - > * def json = new groovy . json . StreamingJsonBuilder ( w ) * json . person { * name " Tim " * age 28 * assert w . toString ( ) = = ' { " person " : { " name " : " Tim " , " age " : 28 } } ' * < / pre > * Or alternatively with a method call taking named arguments : * < pre class = " groovyTestCase " > * new StringWriter ( ) . with { w - > * def json = new groovy . json . StreamingJsonBuilder ( w ) * json . person name : " Tim " , age : 32 * assert w . toString ( ) = = ' { " person " : { " name " : " Tim " , " age " : 32 } } ' * < / pre > * If you use named arguments and a closure as last argument , * the key / value pairs of the map ( as named arguments ) * and the key / value pairs represented in the closure * will be merged together & mdash ; * the closure properties overriding the map key / values * in case the same key is used . * < pre class = " groovyTestCase " > * new StringWriter ( ) . with { w - > * def json = new groovy . json . StreamingJsonBuilder ( w ) * json . person ( name : " Tim " , age : 35 ) { town " Manchester " } * assert w . toString ( ) = = ' { " person " : { " name " : " Tim " , " age " : 35 , " town " : " Manchester " } } ' * < / pre > * The empty args call will create a key whose value will be an empty JSON object : * < pre class = " groovyTestCase " > * new StringWriter ( ) . with { w - > * def json = new groovy . json . StreamingJsonBuilder ( w ) * json . person ( ) * assert w . toString ( ) = = ' { " person " : { } } ' * < / pre > * @ param name the single key * @ param args the value associated with the key */ public Object invokeMethod ( String name , Object args ) { } }
boolean notExpectedArgs = false ; if ( args != null && Object [ ] . class . isAssignableFrom ( args . getClass ( ) ) ) { Object [ ] arr = ( Object [ ] ) args ; try { if ( arr . length == 0 ) { writer . write ( JsonOutput . toJson ( Collections . singletonMap ( name , Collections . emptyMap ( ) ) ) ) ; } else if ( arr . length == 1 ) { if ( arr [ 0 ] instanceof Closure ) { writer . write ( "{" ) ; writer . write ( JsonOutput . toJson ( name ) ) ; writer . write ( ":" ) ; call ( ( Closure ) arr [ 0 ] ) ; writer . write ( "}" ) ; } else if ( arr [ 0 ] instanceof Map ) { writer . write ( JsonOutput . toJson ( Collections . singletonMap ( name , ( Map ) arr [ 0 ] ) ) ) ; } else { notExpectedArgs = true ; } } else if ( arr . length == 2 && arr [ 0 ] instanceof Map && arr [ 1 ] instanceof Closure ) { writer . write ( "{" ) ; writer . write ( JsonOutput . toJson ( name ) ) ; writer . write ( ":{" ) ; boolean first = true ; Map map = ( Map ) arr [ 0 ] ; for ( Object it : map . entrySet ( ) ) { if ( ! first ) { writer . write ( "," ) ; } else { first = false ; } Map . Entry entry = ( Map . Entry ) it ; writer . write ( JsonOutput . toJson ( entry . getKey ( ) ) ) ; writer . write ( ":" ) ; writer . write ( JsonOutput . toJson ( entry . getValue ( ) ) ) ; } StreamingJsonDelegate . cloneDelegateAndGetContent ( writer , ( Closure ) arr [ 1 ] , map . size ( ) == 0 ) ; writer . write ( "}}" ) ; } else if ( StreamingJsonDelegate . isCollectionWithClosure ( arr ) ) { writer . write ( "{" ) ; writer . write ( JsonOutput . toJson ( name ) ) ; writer . write ( ":" ) ; call ( ( Collection ) arr [ 0 ] , ( Closure ) arr [ 1 ] ) ; writer . write ( "}" ) ; } else { notExpectedArgs = true ; } } catch ( IOException ioe ) { throw new JsonException ( ioe ) ; } } else { notExpectedArgs = true ; } if ( ! notExpectedArgs ) { return this ; } else { throw new JsonException ( "Expected no arguments, a single map, a single closure, or a map and closure as arguments." ) ; }
public class DataMediaPairServiceImpl { /** * / * - - - - - 查询方法 , 整合 - - - - - */ public List < DataMediaPair > listByIds ( Long ... identities ) { } }
List < DataMediaPair > dataMediaPairs = new ArrayList < DataMediaPair > ( ) ; try { List < DataMediaPairDO > dataMediaPairDos = null ; if ( identities . length < 1 ) { dataMediaPairDos = dataMediaPairDao . listAll ( ) ; if ( dataMediaPairDos . isEmpty ( ) ) { logger . debug ( "DEBUG ## couldn't query any dataMediaPair, maybe hasn't create any dataMediaPair." ) ; return dataMediaPairs ; } } else { dataMediaPairDos = dataMediaPairDao . listByMultiId ( identities ) ; if ( dataMediaPairDos . isEmpty ( ) ) { String exceptionCause = "couldn't query any dataMediaPair by dataMediaPairIds:" + Arrays . toString ( identities ) ; logger . error ( "ERROR ## " + exceptionCause ) ; throw new ManagerException ( exceptionCause ) ; } } dataMediaPairs = doToModel ( dataMediaPairDos ) ; } catch ( Exception e ) { logger . error ( "ERROR ## query dataMediaPairs has an exception!" , e ) ; throw new ManagerException ( e ) ; } return dataMediaPairs ;
public class CompactDecimalFormat { /** * Gets the currency data for a particular locale . * Currently only short currency format is supported , since that is * the only form in CLDR . * @ param locale The locale . * @ return The data which must not be modified . */ private Data getCurrencyData ( ULocale locale ) { } }
CompactDecimalDataCache . DataBundle bundle = cache . get ( locale ) ; return bundle . shortCurrencyData ;
public class EnvelopesApi { /** * Gets the templates associated with a document in an existing envelope . * Retrieves the templates associated with a document in the specified envelope . * @ param accountId The external account number ( int ) or account ID Guid . ( required ) * @ param envelopeId The envelopeId Guid of the envelope being accessed . ( required ) * @ param documentId The ID of the document being accessed . ( required ) * @ return TemplateInformation */ public TemplateInformation listTemplatesForDocument ( String accountId , String envelopeId , String documentId ) throws ApiException { } }
return listTemplatesForDocument ( accountId , envelopeId , documentId , null ) ;
public class CmsEditUserAddInfoDialog { /** * Commits the edited user to the db . < p > */ @ Override public void actionCommit ( ) { } }
List < Throwable > errors = new ArrayList < Throwable > ( ) ; try { if ( ! Boolean . valueOf ( getParamEditall ( ) ) . booleanValue ( ) ) { // fill the values Iterator < CmsUserAddInfoBean > it = m_addInfoList . iterator ( ) ; while ( it . hasNext ( ) ) { CmsUserAddInfoBean infoBean = it . next ( ) ; if ( infoBean . getValue ( ) == null ) { m_user . deleteAdditionalInfo ( infoBean . getName ( ) ) ; } else { m_user . setAdditionalInfo ( infoBean . getName ( ) , CmsDataTypeUtil . parse ( infoBean . getValue ( ) , infoBean . getType ( ) ) ) ; } } } else { Map < String , Object > readOnly = new HashMap < String , Object > ( ) ; Iterator < Entry < String , Object > > itEntries = m_user . getAdditionalInfo ( ) . entrySet ( ) . iterator ( ) ; while ( itEntries . hasNext ( ) ) { Entry < String , Object > entry = itEntries . next ( ) ; if ( ! CmsDataTypeUtil . isParseable ( entry . getValue ( ) . getClass ( ) ) ) { String key = entry . getKey ( ) . toString ( ) ; if ( ! entry . getValue ( ) . getClass ( ) . equals ( String . class ) ) { key += "@" + entry . getValue ( ) . getClass ( ) . getName ( ) ; } if ( m_addInfoReadOnly . containsKey ( key ) ) { readOnly . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } } } m_user . setAdditionalInfo ( readOnly ) ; itEntries = m_addInfoEditable . entrySet ( ) . iterator ( ) ; while ( itEntries . hasNext ( ) ) { Entry < String , Object > entry = itEntries . next ( ) ; String key = entry . getKey ( ) ; int pos = key . indexOf ( "@" ) ; if ( pos < 0 ) { m_user . setAdditionalInfo ( key , entry . getValue ( ) ) ; continue ; } String className = key . substring ( pos + 1 ) ; key = key . substring ( 0 , pos ) ; Class < ? > clazz ; try { // try the class name clazz = Class . forName ( className ) ; } catch ( Throwable e ) { try { // try the class in the java . lang package clazz = Class . forName ( Integer . class . getPackage ( ) . getName ( ) + "." + className ) ; } catch ( Throwable e1 ) { clazz = String . class ; } } m_user . setAdditionalInfo ( key , CmsDataTypeUtil . parse ( ( String ) entry . getValue ( ) , clazz ) ) ; } } // write the edited user getCms ( ) . writeUser ( m_user ) ; } catch ( Throwable t ) { errors . add ( t ) ; } if ( errors . isEmpty ( ) ) { if ( getCurrentToolPath ( ) . endsWith ( "/orgunit/users/edit/addinfo/all" ) ) { // set closelink Map < String , String [ ] > argMap = new HashMap < String , String [ ] > ( ) ; argMap . put ( A_CmsEditUserDialog . PARAM_USERID , new String [ ] { m_user . getId ( ) . toString ( ) } ) ; argMap . put ( "oufqn" , new String [ ] { m_user . getOuFqn ( ) } ) ; setParamCloseLink ( CmsToolManager . linkForToolPath ( getJsp ( ) , getCurrentToolPath ( ) . substring ( 0 , getCurrentToolPath ( ) . indexOf ( "/orgunit/users/edit/addinfo/all" ) ) + "/orgunit/users/edit/" , argMap ) ) ; } } // set the list of errors to display when saving failed setCommitErrors ( errors ) ;
public class JavacParser { /** * InnerCreator = [ Annotations ] Ident [ TypeArguments ] ClassCreatorRest */ JCExpression innerCreator ( int newpos , List < JCExpression > typeArgs , JCExpression encl ) { } }
List < JCAnnotation > newAnnotations = typeAnnotationsOpt ( ) ; JCExpression t = toP ( F . at ( token . pos ) . Ident ( ident ( ) ) ) ; if ( newAnnotations . nonEmpty ( ) ) { t = toP ( F . at ( newAnnotations . head . pos ) . AnnotatedType ( newAnnotations , t ) ) ; } if ( token . kind == LT ) { int oldmode = mode ; checkGenerics ( ) ; t = typeArguments ( t , true ) ; mode = oldmode ; } return classCreatorRest ( newpos , encl , typeArgs , t ) ;
public class SameDiff { /** * Return a variable of given shape in which all values have a given constant value . * @ param value constant to set for each value * @ param shape shape of the variable as long array * @ return A new SDVariable of provided shape with constant value . */ @ Deprecated public SDVariable constant ( SDVariable value , long ... shape ) { } }
return constant ( null , value , shape ) ;
public class BeanComparator { /** * Specifiy a Comparator to use on just the last { @ link # orderBy order - by } * property . This is good for comparing properties that are not * { @ link Comparable } or for applying special ordering rules for a * property . If no order - by properties have been specified , then Comparator * is applied to the compared beans . * Any previously applied String { @ link # caseSensitive case - sensitive } or * { @ link # collate collator } settings are overridden by this Comparator . * If property values being compared are primitive , they are converted to * their object peers before being passed to the Comparator . * @ param c Comparator to use on the last order - by property . Passing null * restores the default comparison for the last order - by property . */ public < S > BeanComparator < T > using ( Comparator < S > c ) { } }
BeanComparator < T > bc = new BeanComparator < T > ( this ) ; bc . mOrderByName = mOrderByName ; bc . mUsingComparator = c ; bc . mFlags = mFlags ; return bc ;
public class DeleteLaunchTemplateVersionsRequest { /** * The version numbers of one or more launch template versions to delete . * @ param versions * The version numbers of one or more launch template versions to delete . */ public void setVersions ( java . util . Collection < String > versions ) { } }
if ( versions == null ) { this . versions = null ; return ; } this . versions = new com . amazonaws . internal . SdkInternalList < String > ( versions ) ;
public class Unidecode { /** * Transliterate Unicode string to a initials . * @ param str Unicode String to initials . * @ return String initials . */ public static String initials ( final String str ) { } }
if ( str == null ) { return "" ; } StringBuilder sb = new StringBuilder ( ) ; Pattern p = Pattern . compile ( "^\\w|\\s+\\w" ) ; Matcher m = p . matcher ( decode ( str ) ) ; while ( m . find ( ) ) { sb . append ( m . group ( ) . replaceAll ( " " , "" ) ) ; } return sb . toString ( ) ;
public class Particle { /** * Update the state of this particle * @ param delta * The time since the last update */ public void update ( int delta ) { } }
emitter . updateParticle ( this , delta ) ; life -= delta ; if ( life > 0 ) { x += delta * velx ; y += delta * vely ; } else { engine . release ( this ) ; }
public class ReverseBinaryEncoder { /** * Copies the current contents of the Ion binary - encoded byte array into a * a given byte array . * The given array must be large enough to contain all the bytes of the * Ion binary - encoded byte array . * This makes an unchecked assumption that { { @ link # serialize ( IonDatagram ) } * is already called . * TODO To be deprecated along with { @ link IonDatagram # getBytes ( byte [ ] ) } * @ param dst the byte array into which bytes are to be written * @ return the number of bytes copied into { @ code dst } */ int toNewByteArray ( byte [ ] dst ) { } }
int length = myBuffer . length - myOffset ; System . arraycopy ( myBuffer , myOffset , dst , 0 , length ) ; return length ;
public class AgentManager { /** * Set state of agent . * @ param agent */ private void updateAgentState ( AsteriskAgentImpl agent , AgentState newState ) { } }
logger . info ( "Set state of agent " + agent . getAgentId ( ) + " to " + newState ) ; synchronized ( agent ) { agent . updateState ( newState ) ; }
public class GeoMatchSet { /** * An array of < a > GeoMatchConstraint < / a > objects , which contain the country that you want AWS WAF to search for . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setGeoMatchConstraints ( java . util . Collection ) } or { @ link # withGeoMatchConstraints ( java . util . Collection ) } * if you want to override the existing values . * @ param geoMatchConstraints * An array of < a > GeoMatchConstraint < / a > objects , which contain the country that you want AWS WAF to search * for . * @ return Returns a reference to this object so that method calls can be chained together . */ public GeoMatchSet withGeoMatchConstraints ( GeoMatchConstraint ... geoMatchConstraints ) { } }
if ( this . geoMatchConstraints == null ) { setGeoMatchConstraints ( new java . util . ArrayList < GeoMatchConstraint > ( geoMatchConstraints . length ) ) ; } for ( GeoMatchConstraint ele : geoMatchConstraints ) { this . geoMatchConstraints . add ( ele ) ; } return this ;
public class LdapHelper { /** * { @ inheritDoc } */ @ Override public Set < Node > findGroups ( QueryBuilder qb ) { } }
Set < Node > groups = new TreeSet < > ( ) ; String query = qb . getQuery ( ) ; try { SearchResult searchResult ; Attributes attributes ; SearchControls controls = new SearchControls ( ) ; controls . setReturningAttributes ( new String [ ] { LdapKeys . ASTERISK , LdapKeys . MODIFY_TIMESTAMP , LdapKeys . MODIFIERS_NAME } ) ; controls . setSearchScope ( SearchControls . SUBTREE_SCOPE ) ; NamingEnumeration < SearchResult > results = ctx . search ( "" , query , controls ) ; queryCount ++ ; while ( results . hasMore ( ) ) { searchResult = results . next ( ) ; attributes = searchResult . getAttributes ( ) ; LdapGroup group = new LdapGroup ( ) ; group . setDn ( searchResult . getNameInNamespace ( ) ) ; group = fillAttributesInGroup ( group , attributes ) ; groups . add ( group ) ; } } catch ( NamingException ex ) { handleNamingException ( instanceName + ":" + qb . getQuery ( ) , ex ) ; } return groups ;
public class ExpressionsRetinaApiImpl { /** * { @ inheritDoc } */ @ Override public Fingerprint resolve ( Double sparsity , Model model ) throws JsonProcessingException , ApiException { } }
validateRequiredModels ( model ) ; LOG . debug ( "Resolve expression for model: " + model . toJson ( ) ) ; return this . expressionsApi . resolveExpression ( model . toJson ( ) , retinaName , sparsity ) ;
public class FileSystemDirectory { /** * / * ( non - Javadoc ) * @ see org . apache . lucene . store . Directory # createOutput ( java . lang . String ) */ public IndexOutput createOutput ( String name ) throws IOException { } }
Path file = new Path ( directory , name ) ; if ( fs . exists ( file ) && ! fs . delete ( file ) ) { // delete the existing one if applicable throw new IOException ( "Cannot overwrite index file " + file ) ; } return new FileSystemIndexOutput ( file , ioFileBufferSize ) ;
public class ClientHandshaker { /** * Returns the subject alternative name of the specified type in the * subjectAltNames extension of a certificate . */ private static Object getSubjectAltName ( X509Certificate cert , int type ) { } }
Collection < List < ? > > subjectAltNames ; try { subjectAltNames = cert . getSubjectAlternativeNames ( ) ; } catch ( CertificateParsingException cpe ) { if ( debug != null && Debug . isOn ( "handshake" ) ) { System . out . println ( "Attempt to obtain subjectAltNames extension failed!" ) ; } return null ; } if ( subjectAltNames != null ) { for ( List < ? > subjectAltName : subjectAltNames ) { int subjectAltNameType = ( Integer ) subjectAltName . get ( 0 ) ; if ( subjectAltNameType == type ) { return subjectAltName . get ( 1 ) ; } } } return null ;
public class Filters { /** * Creates a new { @ link Filter } instance using the given impl class name , constructor arguments and type * @ param filterClassName * @ param ctorTypes * @ param ctorArguments * @ return */ @ SuppressWarnings ( "unchecked" ) private static Filter < ArchivePath > getFilterInstance ( final String filterClassName , final Class < ? > [ ] ctorTypes , final Object [ ] ctorArguments ) { } }
// Precondition checks assert filterClassName != null && filterClassName . length ( ) > 0 : "Filter class name must be specified" ; assert ctorTypes != null : "Construction types must be specified" ; assert ctorArguments != null : "Construction arguments must be specified" ; assert ctorTypes . length == ctorArguments . length : "The number of ctor arguments and their types must match" ; // Find the filter impl class in the configured CLs final Class < Filter < ArchivePath > > filterClass ; try { filterClass = ( Class < Filter < ArchivePath > > ) ClassLoaderSearchUtil . findClassFromClassLoaders ( filterClassName , ShrinkWrap . getDefaultDomain ( ) . getConfiguration ( ) . getClassLoaders ( ) ) ; } catch ( final ClassNotFoundException cnfe ) { throw new IllegalStateException ( "Could not find filter implementation class " + filterClassName + " in any of the configured CLs" , cnfe ) ; } // Make the new instance return SecurityActions . newInstance ( filterClass , ctorTypes , ctorArguments , Filter . class ) ;
public class Validation { /** * validate * @ param c The spec metadata * @ param root The root directory of the expanded resource adapter archive * @ param report The destination of the report ; < code > null < / code > if an exception should be thrown instead * @ param cl The class loader * @ return The system exit code * @ exception ValidatorException Thrown if a validation error occurs * @ exception IOException If an I / O error occurs */ public static int validate ( Connector c , File root , File report , ClassLoader cl ) throws ValidatorException , IOException { } }
int exitCode = SUCCESS ; ClassLoader oldTCCL = SecurityActions . getThreadContextClassLoader ( ) ; try { SecurityActions . setThreadContextClassLoader ( cl ) ; List < Validate > validateClasses = new ArrayList < Validate > ( ) ; List < Failure > failures = new ArrayList < Failure > ( ) ; Validator validator = new Validator ( ) ; validateClasses . addAll ( createResourceAdapter ( c , failures , validator . getResourceBundle ( ) , cl ) ) ; validateClasses . addAll ( createManagedConnectionFactory ( c , failures , validator . getResourceBundle ( ) , cl ) ) ; validateClasses . addAll ( createActivationSpec ( c , failures , validator . getResourceBundle ( ) , cl ) ) ; validateClasses . addAll ( createAdminObject ( c , failures , validator . getResourceBundle ( ) , cl ) ) ; if ( root != null && validateClassesInPackage ( root ) ) { Failure failure = new Failure ( Severity . WARNING , "20.2" , validator . getResourceBundle ( ) . getString ( "pak.cip" ) ) ; failures . add ( failure ) ; } List < Failure > classFailures = validator . validate ( validateClasses ) ; if ( classFailures != null && ! classFailures . isEmpty ( ) ) failures . addAll ( classFailures ) ; if ( ! failures . isEmpty ( ) ) { if ( report != null ) { FailureHelper fh = new FailureHelper ( failures ) ; FileWriter fw = null ; BufferedWriter bw = null ; try { fw = new FileWriter ( report ) ; bw = new BufferedWriter ( fw , 8192 ) ; bw . write ( fh . asText ( validator . getResourceBundle ( ) ) ) ; bw . flush ( ) ; } finally { try { if ( bw != null ) bw . close ( ) ; if ( fw != null ) fw . close ( ) ; } catch ( IOException ignore ) { // Ignore } } } else { String eisType = c . getEisType ( ) != null ? c . getEisType ( ) . getValue ( ) : "unknown Eis Type" ; throw new ValidatorException ( eisType , failures , validator . getResourceBundle ( ) ) ; } exitCode = FAIL ; } else { exitCode = SUCCESS ; } } finally { SecurityActions . setThreadContextClassLoader ( oldTCCL ) ; } return exitCode ;
public class BasicFunctionsRuntime { /** * Rounds the given value to the closest integer . */ public static long round ( SoyValue value ) { } }
if ( value instanceof IntegerData ) { return value . longValue ( ) ; } else { return Math . round ( value . numberValue ( ) ) ; }
public class RenderUtils { /** * Returns a shortened version of the supplied RDF { @ code URI } . * @ param uri * the uri to shorten * @ return the shortened URI string */ @ Nullable public static String shortenURI ( @ Nullable final URI uri ) { } }
if ( uri == null ) { return null ; } final String prefix = Data . namespaceToPrefix ( uri . getNamespace ( ) , Data . getNamespaceMap ( ) ) ; if ( prefix != null ) { return prefix + ':' + uri . getLocalName ( ) ; } final String ns = uri . getNamespace ( ) ; return "&lt;.." + uri . stringValue ( ) . substring ( ns . length ( ) - 1 ) + "&gt;" ; // final int index = uri . stringValue ( ) . lastIndexOf ( ' / ' ) ; // if ( index > = 0 ) { // return " & lt ; . . " + uri . stringValue ( ) . substring ( index ) + " & gt ; " ; // return " & lt ; " + uri . stringValue ( ) + " & gt ; " ;
public class DatabaseUtil { /** * Retrieves all class labels within the database . * @ param database the database to be scanned for class labels * @ return a set comprising all class labels that are currently set in the * database */ public static SortedSet < ClassLabel > getClassLabels ( Relation < ? extends ClassLabel > database ) { } }
SortedSet < ClassLabel > labels = new TreeSet < > ( ) ; for ( DBIDIter it = database . iterDBIDs ( ) ; it . valid ( ) ; it . advance ( ) ) { labels . add ( database . get ( it ) ) ; } return labels ;
public class AmazonGameLiftClient { /** * Updates Realtime script metadata and content . * To update script metadata , specify the script ID and provide updated name and / or version values . * To update script content , provide an updated zip file by pointing to either a local file or an Amazon S3 bucket * location . You can use either method regardless of how the original script was uploaded . Use the < i > Version < / i > * parameter to track updates to the script . * If the call is successful , the updated metadata is stored in the script record and a revised script is uploaded * to the Amazon GameLift service . Once the script is updated and acquired by a fleet instance , the new version is * used for all new game sessions . * < b > Learn more < / b > * < a href = " https : / / docs . aws . amazon . com / gamelift / latest / developerguide / realtime - intro . html " > Amazon GameLift Realtime * Servers < / a > * < b > Related operations < / b > * < ul > * < li > * < a > CreateScript < / a > * < / li > * < li > * < a > ListScripts < / a > * < / li > * < li > * < a > DescribeScript < / a > * < / li > * < li > * < a > UpdateScript < / a > * < / li > * < li > * < a > DeleteScript < / a > * < / li > * < / ul > * @ param updateScriptRequest * @ return Result of the UpdateScript operation returned by the service . * @ throws UnauthorizedException * The client failed authentication . Clients should not retry such requests . * @ throws InvalidRequestException * One or more parameter values in the request are invalid . Correct the invalid parameter values before * retrying . * @ throws NotFoundException * A service resource associated with the request could not be found . Clients should not retry such * requests . * @ throws InternalServiceException * The service encountered an unrecoverable internal failure while processing the request . Clients can retry * such requests immediately or after a waiting period . * @ sample AmazonGameLift . UpdateScript * @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / gamelift - 2015-10-01 / UpdateScript " target = " _ top " > AWS API * Documentation < / a > */ @ Override public UpdateScriptResult updateScript ( UpdateScriptRequest request ) { } }
request = beforeClientExecution ( request ) ; return executeUpdateScript ( request ) ;
public class ScreenField { /** * Display this control ' s data in print ( view ) format . * @ return true if default params were found for this form . * @ param out The http output stream . * @ exception DBException File exception . */ public boolean printData ( PrintWriter out , int iPrintOptions ) { } }
if ( ! this . isInputField ( ) ) return false ; if ( this . isToolbar ( ) ) return false ; return this . getScreenFieldView ( ) . printData ( out , iPrintOptions ) ;
public class TriggersInner { /** * Creates or updates a trigger . * @ param deviceName Creates or updates a trigger * @ param name The trigger name . * @ param resourceGroupName The resource group name . * @ param trigger The trigger . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws CloudException thrown if the request is rejected by server * @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @ return the TriggerInner object if successful . */ public TriggerInner createOrUpdate ( String deviceName , String name , String resourceGroupName , TriggerInner trigger ) { } }
return createOrUpdateWithServiceResponseAsync ( deviceName , name , resourceGroupName , trigger ) . toBlocking ( ) . last ( ) . body ( ) ;
public class CertificateOperations { /** * Deletes the certificate from the Batch account . * < p > The delete operation requests that the certificate be deleted . The request puts the certificate in the { @ link com . microsoft . azure . batch . protocol . models . CertificateState # DELETING Deleting } state . * The Batch service will perform the actual certificate deletion without any further client action . < / p > * < p > You cannot delete a certificate if a resource ( pool or compute node ) is using it . Before you can delete a certificate , you must therefore make sure that : < / p > * < ul > * < li > The certificate is not associated with any pools . < / li > * < li > The certificate is not installed on any compute nodes . ( Even if you remove a certificate from a pool , it is not removed from existing compute nodes in that pool until they restart . ) < / li > * < / ul > * < p > If you try to delete a certificate that is in use , the deletion fails . The certificate state changes to { @ link com . microsoft . azure . batch . protocol . models . CertificateState # DELETE _ FAILED Delete Failed } . * You can use { @ link # cancelDeleteCertificate ( String , String ) } to set the status back to Active if you decide that you want to continue using the certificate . < / p > * @ param thumbprintAlgorithm The algorithm used to derive the thumbprint parameter . This must be sha1. * @ param thumbprint The thumbprint of the certificate to delete . * @ param additionalBehaviors A collection of { @ link BatchClientBehavior } instances that are applied to the Batch service request . * @ throws BatchErrorException Exception thrown when an error response is received from the Batch service . * @ throws IOException Exception thrown when there is an error in serialization / deserialization of data sent to / received from the Batch service . */ public void deleteCertificate ( String thumbprintAlgorithm , String thumbprint , Iterable < BatchClientBehavior > additionalBehaviors ) throws BatchErrorException , IOException { } }
CertificateDeleteOptions options = new CertificateDeleteOptions ( ) ; BehaviorManager bhMgr = new BehaviorManager ( this . customBehaviors ( ) , additionalBehaviors ) ; bhMgr . applyRequestBehaviors ( options ) ; this . parentBatchClient . protocolLayer ( ) . certificates ( ) . delete ( thumbprintAlgorithm , thumbprint , options ) ;
public class ResponsiveDisplayAd { /** * Gets the formatSetting value for this ResponsiveDisplayAd . * @ return formatSetting * Specifies which format the ad will be served in . The default * value is ALL _ FORMATS . * < span class = " constraint Selectable " > This field * can be selected using the value " FormatSetting " . < / span > < span class = " constraint * Filterable " > This field can be filtered on . < / span > */ public com . google . api . ads . adwords . axis . v201809 . cm . DisplayAdFormatSetting getFormatSetting ( ) { } }
return formatSetting ;
public class FilenameUtils { /** * Remove dots from string when we are on Linux / OS X * @ param fileName A filename string that might start with dots . * @ return Cleanup string with no dots anymore . */ private static String removeStartingDots ( String fileName ) { } }
// machte unter OS X / Linux Probleme , zB . bei dem Titel : " . . . . Paula " while ( ! fileName . isEmpty ( ) && ( fileName . startsWith ( "." ) ) ) { fileName = fileName . substring ( 1 , fileName . length ( ) ) ; } return fileName ;
public class CmsImportExportUserDialog { /** * Returns a map with the users to export added . < p > * @ param cms CmsObject * @ param groups the selected groups * @ param exportUsers the map to add the users * @ return a map with the users to export added * @ throws CmsException if getting groups or users of group failed */ public static Map < CmsUUID , CmsUser > addExportUsersFromGroups ( CmsObject cms , List < String > groups , Map < CmsUUID , CmsUser > exportUsers ) throws CmsException { } }
if ( ( groups != null ) && ( groups . size ( ) > 0 ) ) { Iterator < String > itGroups = groups . iterator ( ) ; while ( itGroups . hasNext ( ) ) { List < CmsUser > groupUsers = cms . getUsersOfGroup ( itGroups . next ( ) ) ; Iterator < CmsUser > itGroupUsers = groupUsers . iterator ( ) ; while ( itGroupUsers . hasNext ( ) ) { CmsUser groupUser = itGroupUsers . next ( ) ; if ( ! exportUsers . containsKey ( groupUser . getId ( ) ) ) { exportUsers . put ( groupUser . getId ( ) , groupUser ) ; } } } } return exportUsers ;
public class RandSeq { /** * Applies the given < code > randSeq < / code > to rearrange the given sequence in a random order . * If < code > randSeq < / code > is < code > null < / code > , returns the sequence unchanged . */ public static < T > Iterator < T > reorderIf ( RandSeq randSeq , Iterator < T > sequence ) { } }
return randSeq == null ? sequence : randSeq . reorder ( sequence ) ;
public class Event { /** * indexed setter for themes _ protein - sets an indexed value - * @ generated * @ param i index in the array to set * @ param v value to set into the array */ public void setThemes_protein ( int i , Protein v ) { } }
if ( Event_Type . featOkTst && ( ( Event_Type ) jcasType ) . casFeat_themes_protein == null ) jcasType . jcas . throwFeatMissing ( "themes_protein" , "ch.epfl.bbp.uima.genia.Event" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Event_Type ) jcasType ) . casFeatCode_themes_protein ) , i ) ; jcasType . ll_cas . ll_setRefArrayValue ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Event_Type ) jcasType ) . casFeatCode_themes_protein ) , i , jcasType . ll_cas . ll_getFSRef ( v ) ) ;
public class PAbstractObject { /** * Get a property as a string or defaultValue . * @ param key the property name * @ param defaultValue the default value */ @ Override public final String optString ( final String key , final String defaultValue ) { } }
String result = optString ( key ) ; return result == null ? defaultValue : result ;
public class NodeSelectDialog { /** * This method initializes btnStart * @ return javax . swing . JButton */ private JButton getSelectButton ( ) { } }
if ( selectButton == null ) { selectButton = new JButton ( ) ; selectButton . setText ( Constant . messages . getString ( "siteselect.button.select" ) ) ; selectButton . setEnabled ( false ) ; // Enabled when a node is selected selectButton . addActionListener ( new java . awt . event . ActionListener ( ) { @ Override public void actionPerformed ( java . awt . event . ActionEvent e ) { if ( treeSite . getLastSelectedPathComponent ( ) != null ) { nodeSelected ( ) ; } else if ( treeContext . getLastSelectedPathComponent ( ) != null ) { contextSelected ( ) ; } } } ) ; } return selectButton ;
public class ReflectionUtils { /** * Handle the given reflection exception . Should only be called if no checked exception is expected to be thrown by the * target method . * Throws the underlying RuntimeException or Error in case of an InvocationTargetException with such a root cause . Throws an * IllegalStateException with an appropriate message or UndeclaredThrowableException otherwise . * @ param ex the reflection exception to handle */ public static void handleReflectionException ( Exception ex ) { } }
if ( ex instanceof NoSuchMethodException ) { throw new IllegalStateException ( "Method not found: " + ex . getMessage ( ) ) ; } if ( ex instanceof IllegalAccessException ) { throw new IllegalStateException ( "Could not access method: " + ex . getMessage ( ) ) ; } if ( ex instanceof InvocationTargetException ) { handleInvocationTargetException ( ( InvocationTargetException ) ex ) ; } if ( ex instanceof RuntimeException ) { throw ( RuntimeException ) ex ; } throw new UndeclaredThrowableException ( ex ) ;
public class DTDAttribute { /** * Note : the default implementation is not optimized , as it does * a potentially unnecessary copy of the contents . It is expected that * this method is seldom called ( Woodstox never directly calls it ; it * only gets called for chained validators when one validator normalizes * the value , and then following validators are passed a String , not * char array ) */ public String validate ( DTDValidatorBase v , String value , boolean normalize ) throws XMLStreamException { } }
int len = value . length ( ) ; /* Temporary buffer has to come from the validator itself , since * attribute objects are stateless and shared . . . */ char [ ] cbuf = v . getTempAttrValueBuffer ( value . length ( ) ) ; if ( len > 0 ) { value . getChars ( 0 , len , cbuf , 0 ) ; } return validate ( v , cbuf , 0 , len , normalize ) ;
public class PortTcpBuilder { /** * public void serverSocket ( ServerSocketBar serverSocket ) * _ serverSocket = serverSocket ; */ public SSLFactory sslFactory ( ) { } }
String opensslKey = _env . get ( portName ( ) + ".openssl.key" ) ; if ( opensslKey != null ) { return opensslFactory ( ) ; } String keyStore = _env . get ( portName ( ) + ".ssl.key-store" ) ; boolean isSsl = _env . get ( portName ( ) + ".ssl.enabled" , boolean . class , false ) ; if ( ! isSsl ) { return null ; } if ( keyStore != null ) { isSsl = true ; } SSLFactoryJsse sslFactory = new SSLFactoryJsse ( _env , portName ( ) ) ; /* if ( keyStore ! = null ) { Path path = Vfs . path ( keyStore ) ; sslFactory . setKeyStoreFile ( path ) ; String password = _ env . get ( portName ( ) + " . ssl . password " ) ; if ( password ! = null ) { sslFactory . setPassword ( password ) ; else { sslFactory . setSelfSignedCertificateName ( " baratine " ) ; */ sslFactory . init ( ) ; return sslFactory ;
public class CommercePriceEntryUtil { /** * Returns the last commerce price entry in the ordered set where groupId = & # 63 ; . * @ param groupId the group ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the last matching commerce price entry , or < code > null < / code > if a matching commerce price entry could not be found */ public static CommercePriceEntry fetchByGroupId_Last ( long groupId , OrderByComparator < CommercePriceEntry > orderByComparator ) { } }
return getPersistence ( ) . fetchByGroupId_Last ( groupId , orderByComparator ) ;
public class Radial1Square { /** * < editor - fold defaultstate = " collapsed " desc = " Image related " > */ private BufferedImage create_FRAME_Image ( final int WIDTH , BufferedImage image ) { } }
if ( WIDTH <= 0 ) { return null ; } if ( image == null ) { image = UTIL . createImage ( WIDTH , WIDTH , Transparency . TRANSLUCENT ) ; } final Graphics2D G2 = image . createGraphics ( ) ; G2 . setRenderingHint ( RenderingHints . KEY_ANTIALIASING , RenderingHints . VALUE_ANTIALIAS_ON ) ; G2 . setRenderingHint ( RenderingHints . KEY_RENDERING , RenderingHints . VALUE_RENDER_QUALITY ) ; G2 . setRenderingHint ( RenderingHints . KEY_DITHERING , RenderingHints . VALUE_DITHER_ENABLE ) ; G2 . setRenderingHint ( RenderingHints . KEY_ALPHA_INTERPOLATION , RenderingHints . VALUE_ALPHA_INTERPOLATION_QUALITY ) ; G2 . setRenderingHint ( RenderingHints . KEY_COLOR_RENDERING , RenderingHints . VALUE_COLOR_RENDER_QUALITY ) ; G2 . setRenderingHint ( RenderingHints . KEY_STROKE_CONTROL , RenderingHints . VALUE_STROKE_NORMALIZE ) ; G2 . setRenderingHint ( RenderingHints . KEY_TEXT_ANTIALIASING , RenderingHints . VALUE_TEXT_ANTIALIAS_ON ) ; final int IMAGE_WIDTH = image . getWidth ( ) ; final int IMAGE_HEIGHT = image . getHeight ( ) ; transformGraphics ( IMAGE_WIDTH , IMAGE_HEIGHT , G2 ) ; // Define shape that will be subtracted from the frame shapes and will be filled by the background later on final GeneralPath BACKGROUND = new GeneralPath ( ) ; BACKGROUND . setWindingRule ( Path2D . WIND_EVEN_ODD ) ; BACKGROUND . moveTo ( IMAGE_WIDTH * 0.9158878504672897 , IMAGE_HEIGHT * 0.9158878504672897 ) ; BACKGROUND . curveTo ( IMAGE_WIDTH * 0.9158878504672897 , IMAGE_HEIGHT * 0.9158878504672897 , IMAGE_WIDTH * 0.9158878504672897 , IMAGE_HEIGHT * 0.08411214953271028 , IMAGE_WIDTH * 0.9158878504672897 , IMAGE_HEIGHT * 0.08411214953271028 ) ; BACKGROUND . curveTo ( IMAGE_WIDTH * 0.6401869158878505 , IMAGE_HEIGHT * 0.08411214953271028 , IMAGE_WIDTH * 0.46261682242990654 , IMAGE_HEIGHT * 0.1588785046728972 , IMAGE_WIDTH * 0.29439252336448596 , IMAGE_HEIGHT * 0.32242990654205606 ) ; BACKGROUND . curveTo ( IMAGE_WIDTH * 0.17289719626168223 , IMAGE_HEIGHT * 0.4439252336448598 , IMAGE_WIDTH * 0.08411214953271028 , IMAGE_HEIGHT * 0.6635514018691588 , IMAGE_WIDTH * 0.08411214953271028 , IMAGE_HEIGHT * 0.9158878504672897 ) ; BACKGROUND . curveTo ( IMAGE_WIDTH * 0.08411214953271028 , IMAGE_HEIGHT * 0.9158878504672897 , IMAGE_WIDTH * 0.9158878504672897 , IMAGE_HEIGHT * 0.9158878504672897 , IMAGE_WIDTH * 0.9158878504672897 , IMAGE_HEIGHT * 0.9158878504672897 ) ; BACKGROUND . closePath ( ) ; final Area SUBTRACT = new Area ( BACKGROUND ) ; final GeneralPath FRAME_OUTERFRAME = new GeneralPath ( ) ; FRAME_OUTERFRAME . setWindingRule ( Path2D . WIND_EVEN_ODD ) ; FRAME_OUTERFRAME . moveTo ( IMAGE_WIDTH * 1.0 , IMAGE_HEIGHT * 1.0 ) ; FRAME_OUTERFRAME . curveTo ( IMAGE_WIDTH * 1.0 , IMAGE_HEIGHT * 1.0 , IMAGE_WIDTH * 1.0 , IMAGE_HEIGHT * 0.0 , IMAGE_WIDTH * 1.0 , IMAGE_HEIGHT * 0.0 ) ; FRAME_OUTERFRAME . curveTo ( IMAGE_WIDTH * 0.3644859813084112 , IMAGE_HEIGHT * 0.0 , IMAGE_WIDTH * 0.0 , IMAGE_HEIGHT * 0.308411214953271 , IMAGE_WIDTH * 0.0 , IMAGE_HEIGHT * 1.0 ) ; FRAME_OUTERFRAME . curveTo ( IMAGE_WIDTH * 0.0 , IMAGE_HEIGHT * 1.0 , IMAGE_WIDTH * 1.0 , IMAGE_HEIGHT * 1.0 , IMAGE_WIDTH * 1.0 , IMAGE_HEIGHT * 1.0 ) ; FRAME_OUTERFRAME . closePath ( ) ; G2 . setPaint ( getOuterFrameColor ( ) ) ; final Area FRAME_OUTERFRAME_AREA = new Area ( FRAME_OUTERFRAME ) ; FRAME_OUTERFRAME_AREA . subtract ( SUBTRACT ) ; G2 . fill ( FRAME_OUTERFRAME_AREA ) ; final GeneralPath FRAME_MAIN = new GeneralPath ( ) ; FRAME_MAIN . setWindingRule ( Path2D . WIND_EVEN_ODD ) ; FRAME_MAIN . moveTo ( IMAGE_WIDTH * 0.9953271028037384 , IMAGE_HEIGHT * 0.9953271028037384 ) ; FRAME_MAIN . curveTo ( IMAGE_WIDTH * 0.9953271028037384 , IMAGE_HEIGHT * 0.9953271028037384 , IMAGE_WIDTH * 0.9953271028037384 , IMAGE_HEIGHT * 0.004672897196261682 , IMAGE_WIDTH * 0.9953271028037384 , IMAGE_HEIGHT * 0.004672897196261682 ) ; FRAME_MAIN . curveTo ( IMAGE_WIDTH * 0.3364485981308411 , IMAGE_HEIGHT * 0.004672897196261682 , IMAGE_WIDTH * 0.004672897196261682 , IMAGE_HEIGHT * 0.35514018691588783 , IMAGE_WIDTH * 0.004672897196261682 , IMAGE_HEIGHT * 0.9953271028037384 ) ; FRAME_MAIN . curveTo ( IMAGE_WIDTH * 0.004672897196261682 , IMAGE_HEIGHT * 0.9953271028037384 , IMAGE_WIDTH * 0.9953271028037384 , IMAGE_HEIGHT * 0.9953271028037384 , IMAGE_WIDTH * 0.9953271028037384 , IMAGE_HEIGHT * 0.9953271028037384 ) ; FRAME_MAIN . closePath ( ) ; final Point2D FRAME_MAIN_START ; final Point2D FRAME_MAIN_STOP ; final Point2D FRAME_MAIN_CENTER = new Point2D . Double ( FRAME_MAIN . getBounds2D ( ) . getCenterX ( ) , FRAME_MAIN . getBounds2D ( ) . getCenterY ( ) ) ; switch ( getOrientation ( ) ) { case NORTH_WEST : FRAME_MAIN_START = new Point2D . Double ( 0 , FRAME_MAIN . getBounds2D ( ) . getMinY ( ) ) ; FRAME_MAIN_STOP = new Point2D . Double ( 0 , FRAME_MAIN . getBounds2D ( ) . getMaxY ( ) ) ; break ; case NORTH_EAST : FRAME_MAIN_START = new Point2D . Double ( 0 , FRAME_MAIN . getBounds2D ( ) . getMinY ( ) ) ; FRAME_MAIN_STOP = new Point2D . Double ( 0 , FRAME_MAIN . getBounds2D ( ) . getMaxY ( ) ) ; break ; case SOUTH_EAST : FRAME_MAIN_START = new Point2D . Double ( 0 , FRAME_MAIN . getBounds2D ( ) . getMaxY ( ) ) ; FRAME_MAIN_STOP = new Point2D . Double ( 0 , FRAME_MAIN . getBounds2D ( ) . getMinY ( ) ) ; break ; case SOUTH_WEST : FRAME_MAIN_START = new Point2D . Double ( 0 , FRAME_MAIN . getBounds2D ( ) . getMaxY ( ) ) ; FRAME_MAIN_STOP = new Point2D . Double ( 0 , FRAME_MAIN . getBounds2D ( ) . getMinY ( ) ) ; break ; default : FRAME_MAIN_START = new Point2D . Double ( 0 , FRAME_MAIN . getBounds2D ( ) . getMinY ( ) ) ; FRAME_MAIN_STOP = new Point2D . Double ( 0 , FRAME_MAIN . getBounds2D ( ) . getMaxY ( ) ) ; } final float ANGLE_OFFSET = ( float ) Math . toDegrees ( Math . atan ( ( IMAGE_HEIGHT / 8.0f ) / ( IMAGE_WIDTH / 2.0f ) ) ) ; final Area FRAME_MAIN_AREA = new Area ( FRAME_MAIN ) ; if ( getFrameDesign ( ) == FrameDesign . CUSTOM ) { G2 . setPaint ( getCustomFrameDesign ( ) ) ; FRAME_MAIN_AREA . subtract ( SUBTRACT ) ; G2 . fill ( FRAME_MAIN_AREA ) ; } else { switch ( getFrameDesign ( ) ) { case BLACK_METAL : float [ ] frameMainFractions1 = { 0.0f , 90.0f - 2 * ANGLE_OFFSET , 90.0f , 90.0f + 3 * ANGLE_OFFSET , 180.0f , 270.0f - 3 * ANGLE_OFFSET , 270.0f , 270.0f + 2 * ANGLE_OFFSET , 1.0f } ; Color [ ] frameMainColors1 = { new Color ( 254 , 254 , 254 , 255 ) , new Color ( 0 , 0 , 0 , 255 ) , new Color ( 153 , 153 , 153 , 255 ) , new Color ( 0 , 0 , 0 , 255 ) , new Color ( 0 , 0 , 0 , 255 ) , new Color ( 0 , 0 , 0 , 255 ) , new Color ( 153 , 153 , 153 , 255 ) , new Color ( 0 , 0 , 0 , 255 ) , new Color ( 254 , 254 , 254 , 255 ) } ; Paint frameMainGradient1 = new ConicalGradientPaint ( true , FRAME_MAIN_CENTER , 0 , frameMainFractions1 , frameMainColors1 ) ; G2 . setPaint ( frameMainGradient1 ) ; FRAME_MAIN_AREA . subtract ( SUBTRACT ) ; G2 . fill ( FRAME_MAIN_AREA ) ; break ; case METAL : float [ ] frameMainFractions2 = { 0.0f , 0.07f , 0.12f , 1.0f } ; Color [ ] frameMainColors2 = { new Color ( 254 , 254 , 254 , 255 ) , new Color ( 210 , 210 , 210 , 255 ) , new Color ( 179 , 179 , 179 , 255 ) , new Color ( 213 , 213 , 213 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( FRAME_MAIN_START , FRAME_MAIN_STOP ) ; Paint frameMainGradient2 = new LinearGradientPaint ( FRAME_MAIN_START , FRAME_MAIN_STOP , frameMainFractions2 , frameMainColors2 ) ; G2 . setPaint ( frameMainGradient2 ) ; FRAME_MAIN_AREA . subtract ( SUBTRACT ) ; G2 . fill ( FRAME_MAIN_AREA ) ; break ; case SHINY_METAL : float [ ] frameMainFractions3 = { 0.0f , 90.0f - 2 * ANGLE_OFFSET , 90.0f , 90.0f + 4 * ANGLE_OFFSET , 180.0f , 270.0f - 4 * ANGLE_OFFSET , 270.0f , 270.0f + 2 * ANGLE_OFFSET , 1.0f } ; Color [ ] frameMainColors3 ; if ( isFrameBaseColorEnabled ( ) ) { frameMainColors3 = new Color [ ] { new Color ( 254 , 254 , 254 , 255 ) , new Color ( getFrameBaseColor ( ) . getRed ( ) , getFrameBaseColor ( ) . getGreen ( ) , getFrameBaseColor ( ) . getBlue ( ) , 255 ) , new Color ( getFrameBaseColor ( ) . brighter ( ) . brighter ( ) . getRed ( ) , getFrameBaseColor ( ) . brighter ( ) . brighter ( ) . getGreen ( ) , getFrameBaseColor ( ) . brighter ( ) . brighter ( ) . getBlue ( ) , 255 ) , new Color ( getFrameBaseColor ( ) . getRed ( ) , getFrameBaseColor ( ) . getGreen ( ) , getFrameBaseColor ( ) . getBlue ( ) , 255 ) , new Color ( getFrameBaseColor ( ) . getRed ( ) , getFrameBaseColor ( ) . getGreen ( ) , getFrameBaseColor ( ) . getBlue ( ) , 255 ) , new Color ( getFrameBaseColor ( ) . getRed ( ) , getFrameBaseColor ( ) . getGreen ( ) , getFrameBaseColor ( ) . getBlue ( ) , 255 ) , new Color ( getFrameBaseColor ( ) . brighter ( ) . brighter ( ) . getRed ( ) , getFrameBaseColor ( ) . brighter ( ) . brighter ( ) . getGreen ( ) , getFrameBaseColor ( ) . brighter ( ) . brighter ( ) . getBlue ( ) , 255 ) , new Color ( getFrameBaseColor ( ) . getRed ( ) , getFrameBaseColor ( ) . getGreen ( ) , getFrameBaseColor ( ) . getBlue ( ) , 255 ) , new Color ( 254 , 254 , 254 , 255 ) } ; } else { frameMainColors3 = new Color [ ] { new Color ( 254 , 254 , 254 , 255 ) , new Color ( 179 , 179 , 179 , 255 ) , new Color ( 238 , 238 , 238 , 255 ) , new Color ( 179 , 179 , 179 , 255 ) , new Color ( 179 , 179 , 179 , 255 ) , new Color ( 179 , 179 , 179 , 255 ) , new Color ( 238 , 238 , 238 , 255 ) , new Color ( 179 , 179 , 179 , 255 ) , new Color ( 254 , 254 , 254 , 255 ) } ; } Paint frameMainGradient3 = new eu . hansolo . steelseries . tools . ConicalGradientPaint ( true , FRAME_MAIN_CENTER , 0 , frameMainFractions3 , frameMainColors3 ) ; G2 . setPaint ( frameMainGradient3 ) ; FRAME_MAIN_AREA . subtract ( SUBTRACT ) ; G2 . fill ( FRAME_MAIN_AREA ) ; break ; case GLOSSY_METAL : final GeneralPath FRAME_GLOSSY1 = new GeneralPath ( ) ; FRAME_GLOSSY1 . setWindingRule ( Path2D . WIND_EVEN_ODD ) ; FRAME_GLOSSY1 . moveTo ( 0.9953271028037384 * IMAGE_WIDTH , 0.9953271028037384 * IMAGE_HEIGHT ) ; FRAME_GLOSSY1 . curveTo ( 0.9953271028037384 * IMAGE_WIDTH , 0.9953271028037384 * IMAGE_HEIGHT , 0.9953271028037384 * IMAGE_WIDTH , 0.004672897196261682 * IMAGE_HEIGHT , 0.9953271028037384 * IMAGE_WIDTH , 0.004672897196261682 * IMAGE_HEIGHT ) ; FRAME_GLOSSY1 . curveTo ( 0.3364485981308411 * IMAGE_WIDTH , 0.004672897196261682 * IMAGE_HEIGHT , 0.004672897196261682 * IMAGE_WIDTH , 0.35514018691588783 * IMAGE_HEIGHT , 0.004672897196261682 * IMAGE_WIDTH , 0.9953271028037384 * IMAGE_HEIGHT ) ; FRAME_GLOSSY1 . curveTo ( 0.004672897196261682 * IMAGE_WIDTH , 0.9953271028037384 * IMAGE_HEIGHT , 0.9953271028037384 * IMAGE_WIDTH , 0.9953271028037384 * IMAGE_HEIGHT , 0.9953271028037384 * IMAGE_WIDTH , 0.9953271028037384 * IMAGE_HEIGHT ) ; FRAME_GLOSSY1 . closePath ( ) ; final Area FRAME_GLOSSY_1 = new Area ( FRAME_GLOSSY1 ) ; FRAME_GLOSSY_1 . subtract ( SUBTRACT ) ; G2 . setPaint ( new RadialGradientPaint ( new Point2D . Double ( 0.9906542056074766 * IMAGE_WIDTH , 0.9813084112149533 * IMAGE_HEIGHT ) , ( float ) ( 0.9789719626168224 * IMAGE_WIDTH ) , new float [ ] { 0.0f , 0.94f , 1.0f } , new Color [ ] { new Color ( 0.8235294118f , 0.8235294118f , 0.8235294118f , 1f ) , new Color ( 0.8235294118f , 0.8235294118f , 0.8235294118f , 1f ) , new Color ( 1f , 1f , 1f , 1f ) } ) ) ; G2 . fill ( FRAME_GLOSSY_1 ) ; final GeneralPath FRAME_GLOSSY2 = new GeneralPath ( ) ; FRAME_GLOSSY2 . setWindingRule ( Path2D . WIND_EVEN_ODD ) ; FRAME_GLOSSY2 . moveTo ( 0.9906542056074766 * IMAGE_WIDTH , 0.9906542056074766 * IMAGE_HEIGHT ) ; FRAME_GLOSSY2 . curveTo ( 0.9906542056074766 * IMAGE_WIDTH , 0.9906542056074766 * IMAGE_HEIGHT , 0.9906542056074766 * IMAGE_WIDTH , 0.009345794392523364 * IMAGE_HEIGHT , 0.9906542056074766 * IMAGE_WIDTH , 0.009345794392523364 * IMAGE_HEIGHT ) ; FRAME_GLOSSY2 . curveTo ( 0.3364485981308411 * IMAGE_WIDTH , 0.009345794392523364 * IMAGE_HEIGHT , 0.009345794392523364 * IMAGE_WIDTH , 0.3598130841121495 * IMAGE_HEIGHT , 0.009345794392523364 * IMAGE_WIDTH , 0.9906542056074766 * IMAGE_HEIGHT ) ; FRAME_GLOSSY2 . curveTo ( 0.009345794392523364 * IMAGE_WIDTH , 0.9906542056074766 * IMAGE_HEIGHT , 0.9906542056074766 * IMAGE_WIDTH , 0.9906542056074766 * IMAGE_HEIGHT , 0.9906542056074766 * IMAGE_WIDTH , 0.9906542056074766 * IMAGE_HEIGHT ) ; FRAME_GLOSSY2 . closePath ( ) ; final Area FRAME_GLOSSY_2 = new Area ( FRAME_GLOSSY2 ) ; FRAME_GLOSSY_1 . subtract ( SUBTRACT ) ; G2 . setPaint ( new LinearGradientPaint ( new Point2D . Double ( 0.9953271028037384 * IMAGE_WIDTH , 0.004672897196261682 * IMAGE_HEIGHT ) , new Point2D . Double ( 0.9953271028037384 * IMAGE_WIDTH , 0.9906542056074766 * IMAGE_HEIGHT ) , new float [ ] { 0.0f , 0.18f , 0.32f , 0.66f , 0.89f , 1.0f } , new Color [ ] { new Color ( 0.9764705882f , 0.9764705882f , 0.9764705882f , 1f ) , new Color ( 0.7843137255f , 0.7647058824f , 0.7490196078f , 1f ) , new Color ( 0.9960784314f , 0.9960784314f , 0.9921568627f , 1f ) , new Color ( 0.1137254902f , 0.1137254902f , 0.1137254902f , 1f ) , new Color ( 0.7843137255f , 0.7647058824f , 0.7490196078f , 1f ) , new Color ( 0.8196078431f , 0.8196078431f , 0.8196078431f , 1f ) } ) ) ; G2 . fill ( FRAME_GLOSSY_2 ) ; final GeneralPath FRAME_GLOSSY3 = new GeneralPath ( ) ; FRAME_GLOSSY3 . setWindingRule ( Path2D . WIND_EVEN_ODD ) ; FRAME_GLOSSY3 . moveTo ( 0.9299065420560748 * IMAGE_WIDTH , 0.9299065420560748 * IMAGE_HEIGHT ) ; FRAME_GLOSSY3 . curveTo ( 0.9299065420560748 * IMAGE_WIDTH , 0.9299065420560748 * IMAGE_HEIGHT , 0.9299065420560748 * IMAGE_WIDTH , 0.06542056074766354 * IMAGE_HEIGHT , 0.9299065420560748 * IMAGE_WIDTH , 0.06542056074766354 * IMAGE_HEIGHT ) ; FRAME_GLOSSY3 . curveTo ( 0.40654205607476634 * IMAGE_WIDTH , 0.06542056074766354 * IMAGE_HEIGHT , 0.07009345794392523 * IMAGE_WIDTH , 0.37383177570093457 * IMAGE_HEIGHT , 0.07009345794392523 * IMAGE_WIDTH , 0.9299065420560748 * IMAGE_HEIGHT ) ; FRAME_GLOSSY3 . curveTo ( 0.07009345794392523 * IMAGE_WIDTH , 0.9299065420560748 * IMAGE_HEIGHT , 0.9299065420560748 * IMAGE_WIDTH , 0.9299065420560748 * IMAGE_HEIGHT , 0.9299065420560748 * IMAGE_WIDTH , 0.9299065420560748 * IMAGE_HEIGHT ) ; FRAME_GLOSSY3 . closePath ( ) ; final Area FRAME_GLOSSY_3 = new Area ( FRAME_GLOSSY3 ) ; FRAME_GLOSSY_3 . subtract ( SUBTRACT ) ; G2 . setPaint ( new Color ( 0.9647058824f , 0.9647058824f , 0.9647058824f , 1f ) ) ; G2 . fill ( FRAME_GLOSSY_3 ) ; final GeneralPath FRAME_GLOSSY4 = new GeneralPath ( ) ; FRAME_GLOSSY4 . setWindingRule ( Path2D . WIND_EVEN_ODD ) ; FRAME_GLOSSY4 . moveTo ( 0.9252336448598131 * IMAGE_WIDTH , 0.9252336448598131 * IMAGE_HEIGHT ) ; FRAME_GLOSSY4 . curveTo ( 0.9252336448598131 * IMAGE_WIDTH , 0.9252336448598131 * IMAGE_HEIGHT , 0.9252336448598131 * IMAGE_WIDTH , 0.07009345794392523 * IMAGE_HEIGHT , 0.9252336448598131 * IMAGE_WIDTH , 0.07009345794392523 * IMAGE_HEIGHT ) ; FRAME_GLOSSY4 . curveTo ( 0.3878504672897196 * IMAGE_WIDTH , 0.07009345794392523 * IMAGE_HEIGHT , 0.07476635514018691 * IMAGE_WIDTH , 0.4158878504672897 * IMAGE_HEIGHT , 0.07476635514018691 * IMAGE_WIDTH , 0.9252336448598131 * IMAGE_HEIGHT ) ; FRAME_GLOSSY4 . curveTo ( 0.07476635514018691 * IMAGE_WIDTH , 0.9252336448598131 * IMAGE_HEIGHT , 0.9252336448598131 * IMAGE_WIDTH , 0.9252336448598131 * IMAGE_HEIGHT , 0.9252336448598131 * IMAGE_WIDTH , 0.9252336448598131 * IMAGE_HEIGHT ) ; FRAME_GLOSSY4 . closePath ( ) ; final Area FRAME_GLOSSY_4 = new Area ( FRAME_GLOSSY4 ) ; FRAME_GLOSSY_4 . subtract ( SUBTRACT ) ; G2 . setPaint ( new Color ( 0.2f , 0.2f , 0.2f , 1f ) ) ; G2 . fill ( FRAME_GLOSSY_4 ) ; break ; case BRASS : float [ ] frameMainFractions5 = { 0.0f , 0.05f , 0.10f , 0.50f , 0.90f , 0.95f , 1.0f } ; Color [ ] frameMainColors5 = { new Color ( 249 , 243 , 155 , 255 ) , new Color ( 246 , 226 , 101 , 255 ) , new Color ( 240 , 225 , 132 , 255 ) , new Color ( 90 , 57 , 22 , 255 ) , new Color ( 249 , 237 , 139 , 255 ) , new Color ( 243 , 226 , 108 , 255 ) , new Color ( 202 , 182 , 113 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( FRAME_MAIN_START , FRAME_MAIN_STOP ) ; Paint frameMainGradient5 = new LinearGradientPaint ( FRAME_MAIN_START , FRAME_MAIN_STOP , frameMainFractions5 , frameMainColors5 ) ; G2 . setPaint ( frameMainGradient5 ) ; FRAME_MAIN_AREA . subtract ( SUBTRACT ) ; G2 . fill ( FRAME_MAIN_AREA ) ; break ; case STEEL : float [ ] frameMainFractions6 = { 0.0f , 0.05f , 0.10f , 0.50f , 0.90f , 0.95f , 1.0f } ; Color [ ] frameMainColors6 = { new Color ( 231 , 237 , 237 , 255 ) , new Color ( 189 , 199 , 198 , 255 ) , new Color ( 192 , 201 , 200 , 255 ) , new Color ( 23 , 31 , 33 , 255 ) , new Color ( 196 , 205 , 204 , 255 ) , new Color ( 194 , 204 , 203 , 255 ) , new Color ( 189 , 201 , 199 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( FRAME_MAIN_START , FRAME_MAIN_STOP ) ; Paint frameMainGradient6 = new LinearGradientPaint ( FRAME_MAIN_START , FRAME_MAIN_STOP , frameMainFractions6 , frameMainColors6 ) ; G2 . setPaint ( frameMainGradient6 ) ; FRAME_MAIN_AREA . subtract ( SUBTRACT ) ; G2 . fill ( FRAME_MAIN_AREA ) ; break ; case CHROME : float [ ] frameMainFractions7 = { 0.0f , 0.09f , 0.12f , 0.16f , 0.25f , 0.29f , 0.33f , 0.38f , 0.48f , 0.52f , 0.63f , 0.68f , 0.8f , 0.83f , 0.87f , 0.97f , 1.0f } ; Color [ ] frameMainColors7 = { new Color ( 255 , 255 , 255 , 255 ) , new Color ( 255 , 255 , 255 , 255 ) , new Color ( 136 , 136 , 138 , 255 ) , new Color ( 164 , 185 , 190 , 255 ) , new Color ( 158 , 179 , 182 , 255 ) , new Color ( 112 , 112 , 112 , 255 ) , new Color ( 221 , 227 , 227 , 255 ) , new Color ( 155 , 176 , 179 , 255 ) , new Color ( 156 , 176 , 177 , 255 ) , new Color ( 254 , 255 , 255 , 255 ) , new Color ( 255 , 255 , 255 , 255 ) , new Color ( 156 , 180 , 180 , 255 ) , new Color ( 198 , 209 , 211 , 255 ) , new Color ( 246 , 248 , 247 , 255 ) , new Color ( 204 , 216 , 216 , 255 ) , new Color ( 164 , 188 , 190 , 255 ) , new Color ( 255 , 255 , 255 , 255 ) } ; Paint frameMainGradient7 = new eu . hansolo . steelseries . tools . ConicalGradientPaint ( false , FRAME_MAIN_CENTER , 0 , frameMainFractions7 , frameMainColors7 ) ; G2 . setPaint ( frameMainGradient7 ) ; FRAME_MAIN_AREA . subtract ( SUBTRACT ) ; G2 . fill ( FRAME_MAIN_AREA ) ; break ; case GOLD : float [ ] frameMainFractions8 = { 0.0f , 0.15f , 0.22f , 0.3f , 0.38f , 0.44f , 0.51f , 0.6f , 0.68f , 0.75f , 1.0f } ; Color [ ] frameMainColors8 = { new Color ( 255 , 255 , 207 , 255 ) , new Color ( 255 , 237 , 96 , 255 ) , new Color ( 254 , 199 , 57 , 255 ) , new Color ( 255 , 249 , 203 , 255 ) , new Color ( 255 , 199 , 64 , 255 ) , new Color ( 252 , 194 , 60 , 255 ) , new Color ( 255 , 204 , 59 , 255 ) , new Color ( 213 , 134 , 29 , 255 ) , new Color ( 255 , 201 , 56 , 255 ) , new Color ( 212 , 135 , 29 , 255 ) , new Color ( 247 , 238 , 101 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( FRAME_MAIN_START , FRAME_MAIN_STOP ) ; Paint frameMainGradient8 = new LinearGradientPaint ( FRAME_MAIN_START , FRAME_MAIN_STOP , frameMainFractions8 , frameMainColors8 ) ; G2 . setPaint ( frameMainGradient8 ) ; FRAME_MAIN_AREA . subtract ( SUBTRACT ) ; G2 . fill ( FRAME_MAIN_AREA ) ; break ; case ANTHRACITE : float [ ] frameMainFractions9 = { 0.0f , 0.06f , 0.12f , 1.0f } ; Color [ ] frameMainColors9 = { new Color ( 118 , 117 , 135 , 255 ) , new Color ( 74 , 74 , 82 , 255 ) , new Color ( 50 , 50 , 54 , 255 ) , new Color ( 97 , 97 , 108 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( FRAME_MAIN_START , FRAME_MAIN_STOP ) ; Paint frameMainGradient9 = new LinearGradientPaint ( FRAME_MAIN_START , FRAME_MAIN_STOP , frameMainFractions9 , frameMainColors9 ) ; G2 . setPaint ( frameMainGradient9 ) ; FRAME_MAIN_AREA . subtract ( SUBTRACT ) ; G2 . fill ( FRAME_MAIN_AREA ) ; break ; case TILTED_GRAY : FRAME_MAIN_START . setLocation ( ( 0.2336448598130841 * IMAGE_WIDTH ) , ( 0.08411214953271028 * IMAGE_HEIGHT ) ) ; FRAME_MAIN_STOP . setLocation ( ( ( 0.2336448598130841 + 0.5789369637935792 ) * IMAGE_WIDTH ) , ( ( 0.08411214953271028 + 0.8268076708711319 ) * IMAGE_HEIGHT ) ) ; float [ ] frameMainFractions10 = { 0.0f , 0.07f , 0.16f , 0.33f , 0.55f , 0.79f , 1.0f } ; Color [ ] frameMainColors10 = { new Color ( 255 , 255 , 255 , 255 ) , new Color ( 210 , 210 , 210 , 255 ) , new Color ( 179 , 179 , 179 , 255 ) , new Color ( 255 , 255 , 255 , 255 ) , new Color ( 197 , 197 , 197 , 255 ) , new Color ( 255 , 255 , 255 , 255 ) , new Color ( 102 , 102 , 102 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( FRAME_MAIN_START , FRAME_MAIN_STOP ) ; Paint frameMainGradient10 = new LinearGradientPaint ( FRAME_MAIN_START , FRAME_MAIN_STOP , frameMainFractions10 , frameMainColors10 ) ; G2 . setPaint ( frameMainGradient10 ) ; FRAME_MAIN_AREA . subtract ( SUBTRACT ) ; G2 . fill ( FRAME_MAIN_AREA ) ; break ; case TILTED_BLACK : FRAME_MAIN_START . setLocation ( ( 0.22897196261682243 * IMAGE_WIDTH ) , ( 0.0794392523364486 * IMAGE_HEIGHT ) ) ; FRAME_MAIN_STOP . setLocation ( ( ( 0.22897196261682243 + 0.573576436351046 ) * IMAGE_WIDTH ) , ( ( 0.0794392523364486 + 0.8191520442889918 ) * IMAGE_HEIGHT ) ) ; float [ ] frameMainFractions11 = { 0.0f , 0.21f , 0.47f , 0.99f , 1.0f } ; Color [ ] frameMainColors11 = { new Color ( 102 , 102 , 102 , 255 ) , new Color ( 0 , 0 , 0 , 255 ) , new Color ( 102 , 102 , 102 , 255 ) , new Color ( 0 , 0 , 0 , 255 ) , new Color ( 0 , 0 , 0 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( FRAME_MAIN_START , FRAME_MAIN_STOP ) ; Paint frameMainGradient11 = new LinearGradientPaint ( FRAME_MAIN_START , FRAME_MAIN_STOP , frameMainFractions11 , frameMainColors11 ) ; G2 . setPaint ( frameMainGradient11 ) ; FRAME_MAIN_AREA . subtract ( SUBTRACT ) ; G2 . fill ( FRAME_MAIN_AREA ) ; break ; default : float [ ] frameMainFractions = { 0.0f , 0.07f , 0.12f , 1.0f } ; Color [ ] frameMainColors = { new Color ( 254 , 254 , 254 , 255 ) , new Color ( 210 , 210 , 210 , 255 ) , new Color ( 179 , 179 , 179 , 255 ) , new Color ( 213 , 213 , 213 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( FRAME_MAIN_START , FRAME_MAIN_STOP ) ; Paint frameMainGradient = new LinearGradientPaint ( FRAME_MAIN_START , FRAME_MAIN_STOP , frameMainFractions , frameMainColors ) ; G2 . setPaint ( frameMainGradient ) ; FRAME_MAIN_AREA . subtract ( SUBTRACT ) ; G2 . fill ( FRAME_MAIN_AREA ) ; break ; } } // Apply frame effects final float [ ] EFFECT_FRACTIONS ; final Color [ ] EFFECT_COLORS ; final GradientWrapper EFFECT_GRADIENT ; float scale = 1.0f ; final Shape [ ] EFFECT = new Shape [ 100 ] ; switch ( getFrameEffect ( ) ) { case EFFECT_BULGE : EFFECT_FRACTIONS = new float [ ] { 0.0f , 0.13f , 0.14f , 0.17f , 0.18f , 1.0f } ; EFFECT_COLORS = new Color [ ] { new Color ( 0 , 0 , 0 , 102 ) , // Outside new Color ( 255 , 255 , 255 , 151 ) , new Color ( 219 , 219 , 219 , 153 ) , new Color ( 0 , 0 , 0 , 95 ) , new Color ( 0 , 0 , 0 , 76 ) , // Inside new Color ( 0 , 0 , 0 , 0 ) } ; EFFECT_GRADIENT = new GradientWrapper ( new Point2D . Double ( 100 , 0 ) , new Point2D . Double ( 0 , 0 ) , EFFECT_FRACTIONS , EFFECT_COLORS ) ; for ( int i = 0 ; i < 100 ; i ++ ) { EFFECT [ i ] = Scaler . INSTANCE . scale ( FRAME_MAIN_AREA , scale ) ; scale -= 0.01f ; } G2 . setStroke ( new BasicStroke ( 1.5f ) ) ; for ( int i = 0 ; i < EFFECT . length ; i ++ ) { G2 . setPaint ( EFFECT_GRADIENT . getColorAt ( i / 100f ) ) ; G2 . draw ( EFFECT [ i ] ) ; } break ; case EFFECT_CONE : EFFECT_FRACTIONS = new float [ ] { 0.0f , 0.0399f , 0.04f , 0.1799f , 0.18f , 1.0f } ; EFFECT_COLORS = new Color [ ] { new Color ( 0 , 0 , 0 , 76 ) , new Color ( 223 , 223 , 223 , 127 ) , new Color ( 255 , 255 , 255 , 124 ) , new Color ( 9 , 9 , 9 , 51 ) , new Color ( 0 , 0 , 0 , 50 ) , new Color ( 0 , 0 , 0 , 0 ) } ; EFFECT_GRADIENT = new GradientWrapper ( new Point2D . Double ( 100 , 0 ) , new Point2D . Double ( 0 , 0 ) , EFFECT_FRACTIONS , EFFECT_COLORS ) ; for ( int i = 0 ; i < 100 ; i ++ ) { EFFECT [ i ] = Scaler . INSTANCE . scale ( FRAME_MAIN_AREA , scale ) ; scale -= 0.01f ; } G2 . setStroke ( new BasicStroke ( 1.5f ) ) ; for ( int i = 0 ; i < EFFECT . length ; i ++ ) { G2 . setPaint ( EFFECT_GRADIENT . getColorAt ( i / 100f ) ) ; G2 . draw ( EFFECT [ i ] ) ; } break ; case EFFECT_TORUS : EFFECT_FRACTIONS = new float [ ] { 0.0f , 0.08f , 0.1799f , 0.18f , 1.0f } ; EFFECT_COLORS = new Color [ ] { new Color ( 0 , 0 , 0 , 76 ) , new Color ( 255 , 255 , 255 , 64 ) , new Color ( 13 , 13 , 13 , 51 ) , new Color ( 0 , 0 , 0 , 50 ) , new Color ( 0 , 0 , 0 , 0 ) } ; EFFECT_GRADIENT = new GradientWrapper ( new Point2D . Double ( 100 , 0 ) , new Point2D . Double ( 0 , 0 ) , EFFECT_FRACTIONS , EFFECT_COLORS ) ; for ( int i = 0 ; i < 100 ; i ++ ) { EFFECT [ i ] = Scaler . INSTANCE . scale ( FRAME_MAIN_AREA , scale ) ; scale -= 0.01f ; } G2 . setStroke ( new BasicStroke ( 1.5f ) ) ; for ( int i = 0 ; i < EFFECT . length ; i ++ ) { G2 . setPaint ( EFFECT_GRADIENT . getColorAt ( i / 100f ) ) ; G2 . draw ( EFFECT [ i ] ) ; } break ; case EFFECT_INNER_FRAME : final java . awt . Shape EFFECT_BIGINNERFRAME = Scaler . INSTANCE . scale ( FRAME_MAIN_AREA , 0.8785046339035034 ) ; final Point2D EFFECT_BIGINNERFRAME_START = new Point2D . Double ( 0 , EFFECT_BIGINNERFRAME . getBounds2D ( ) . getMinY ( ) ) ; final Point2D EFFECT_BIGINNERFRAME_STOP = new Point2D . Double ( 0 , EFFECT_BIGINNERFRAME . getBounds2D ( ) . getMaxY ( ) ) ; EFFECT_FRACTIONS = new float [ ] { 0.0f , 0.3f , 0.5f , 0.71f , 1.0f } ; EFFECT_COLORS = new Color [ ] { new Color ( 0 , 0 , 0 , 183 ) , new Color ( 148 , 148 , 148 , 25 ) , new Color ( 0 , 0 , 0 , 159 ) , new Color ( 0 , 0 , 0 , 81 ) , new Color ( 255 , 255 , 255 , 158 ) } ; Util . INSTANCE . validateGradientPoints ( EFFECT_BIGINNERFRAME_START , EFFECT_BIGINNERFRAME_STOP ) ; final LinearGradientPaint EFFECT_BIGINNERFRAME_GRADIENT = new LinearGradientPaint ( EFFECT_BIGINNERFRAME_START , EFFECT_BIGINNERFRAME_STOP , EFFECT_FRACTIONS , EFFECT_COLORS ) ; G2 . setPaint ( EFFECT_BIGINNERFRAME_GRADIENT ) ; G2 . fill ( EFFECT_BIGINNERFRAME ) ; break ; } final GeneralPath GAUGE_BACKGROUND_MAIN = new GeneralPath ( ) ; GAUGE_BACKGROUND_MAIN . setWindingRule ( Path2D . WIND_EVEN_ODD ) ; GAUGE_BACKGROUND_MAIN . moveTo ( IMAGE_WIDTH * 0.9205607476635514 , IMAGE_HEIGHT * 0.9205607476635514 ) ; GAUGE_BACKGROUND_MAIN . curveTo ( IMAGE_WIDTH * 0.9205607476635514 , IMAGE_HEIGHT * 0.9205607476635514 , IMAGE_WIDTH * 0.9205607476635514 , IMAGE_HEIGHT * 0.0794392523364486 , IMAGE_WIDTH * 0.9205607476635514 , IMAGE_HEIGHT * 0.0794392523364486 ) ; GAUGE_BACKGROUND_MAIN . curveTo ( IMAGE_WIDTH * 0.6822429906542056 , IMAGE_HEIGHT * 0.0794392523364486 , IMAGE_WIDTH * 0.48130841121495327 , IMAGE_HEIGHT * 0.13551401869158877 , IMAGE_WIDTH * 0.3037383177570093 , IMAGE_HEIGHT * 0.308411214953271 ) ; GAUGE_BACKGROUND_MAIN . curveTo ( IMAGE_WIDTH * 0.16355140186915887 , IMAGE_HEIGHT * 0.4439252336448598 , IMAGE_WIDTH * 0.0794392523364486 , IMAGE_HEIGHT * 0.6822429906542056 , IMAGE_WIDTH * 0.0794392523364486 , IMAGE_HEIGHT * 0.9205607476635514 ) ; GAUGE_BACKGROUND_MAIN . curveTo ( IMAGE_WIDTH * 0.0794392523364486 , IMAGE_HEIGHT * 0.9205607476635514 , IMAGE_WIDTH * 0.9205607476635514 , IMAGE_HEIGHT * 0.9205607476635514 , IMAGE_WIDTH * 0.9205607476635514 , IMAGE_HEIGHT * 0.9205607476635514 ) ; GAUGE_BACKGROUND_MAIN . closePath ( ) ; G2 . setColor ( Color . WHITE ) ; final java . awt . geom . Area GAUGE_BACKGROUND_MAIN_AREA = new java . awt . geom . Area ( GAUGE_BACKGROUND_MAIN ) ; GAUGE_BACKGROUND_MAIN_AREA . subtract ( SUBTRACT ) ; G2 . fill ( GAUGE_BACKGROUND_MAIN_AREA ) ; G2 . dispose ( ) ; return image ;
public class WeightRandom { /** * 增加对象 * @ param obj 对象 * @ param weight 权重 * @ return this */ public WeightRandom < T > add ( T obj , double weight ) { } }
return add ( new WeightObj < T > ( obj , weight ) ) ;
public class WTabSet { /** * Returns the active indices ( as seen by the given context / session ) . * @ return the active tab indices ( may be an empty list ) . */ public List < Integer > getActiveIndices ( ) { } }
TabSetModel model = getOrCreateComponentModel ( ) ; // this model may be updated List < Integer > activeTabs = model . activeTabs ; // Remove invisible tabs from the active tab list if ( activeTabs != null ) { for ( Iterator < Integer > i = activeTabs . iterator ( ) ; i . hasNext ( ) ; ) { if ( ! isTabVisible ( i . next ( ) ) ) { i . remove ( ) ; } } if ( activeTabs . isEmpty ( ) ) { activeTabs = null ; model . activeTabs = null ; } } if ( activeTabs == null ) { // If no tabs or is type accordian then no tabs are open by default if ( getTotalTabs ( ) == 0 || getType ( ) == TYPE_ACCORDION ) { return Collections . emptyList ( ) ; } else { // If there are no active tabs , then the first visible tab will be returned as the active tab . int idx = findFirstVisibleTab ( ) ; activeTabs = new ArrayList < > ( 1 ) ; activeTabs . add ( idx ) ; } } return Collections . unmodifiableList ( activeTabs ) ;
public class VideoSelectorMarshaller { /** * Marshall the given parameter object . */ public void marshall ( VideoSelector videoSelector , ProtocolMarshaller protocolMarshaller ) { } }
if ( videoSelector == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( videoSelector . getColorSpace ( ) , COLORSPACE_BINDING ) ; protocolMarshaller . marshall ( videoSelector . getColorSpaceUsage ( ) , COLORSPACEUSAGE_BINDING ) ; protocolMarshaller . marshall ( videoSelector . getSelectorSettings ( ) , SELECTORSETTINGS_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class Units4JUtils { /** * Unmarshals the given data . A < code > null < / code > XML data argument returns < code > null < / code > . * @ param xmlData * XML data or < code > null < / code > . * @ param classesToBeBound * List of java classes to be recognized by the { @ link JAXBContext } . * @ return Data or < code > null < / code > . * @ param < T > * Type of the expected data . * @ deprecated Use { @ link JaxbUtils # unmarshal ( String , Class . . . ) } */ @ Deprecated public static < T > T unmarshal ( final String xmlData , @ NotNull final Class < ? > ... classesToBeBound ) { } }
return JaxbUtils . unmarshal ( xmlData , classesToBeBound ) ;
public class AbstractFileTypeAnalyzer { /** * Utility method to help in the creation of the extensions set . This * constructs a new Set that can be used in a final static declaration . < / p > * This implementation was copied from * http : / / stackoverflow . com / questions / 2041778 / prepare - java - hashset - values - by - construction < / p > * @ param strings a list of strings to add to the set . * @ return a Set of strings . */ protected static Set < String > newHashSet ( String ... strings ) { } }
final Set < String > set = new HashSet < > ( strings . length ) ; Collections . addAll ( set , strings ) ; return set ;
public class AdministeredObjectResourceFactoryBuilder { /** * This method looks for existing configurations and removes them unless they came * from server . xml * We can distinguish by checking for the presence of a property named " config . source " * which is set to " file " when the configuration originates from server . xml . * @ param filter used to find existing configurations . * @ return true if all configurations were removed or did not exist to begin with , otherwise false . * @ throws Exception if an error occurs . */ @ Override public final boolean removeExistingConfigurations ( String filter ) throws Exception { } }
final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; ConfigurationAdmin configAdmin = configAdminRef . getService ( ) ; Configuration [ ] existingConfigurations = configAdmin . listConfigurations ( filter ) ; if ( existingConfigurations != null ) for ( Configuration config : existingConfigurations ) { Dictionary < ? , ? > cfgProps = config . getProperties ( ) ; // Don ' t remove configuration that came from server . xml if ( cfgProps != null && FILE . equals ( cfgProps . get ( CONFIG_SOURCE ) ) ) { if ( trace && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "configuration found in server.xml: " , config . getPid ( ) ) ; return false ; } else { if ( trace && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "removing" , config . getPid ( ) ) ; config . delete ( ) ; } } return true ;
public class TrackerMeanShiftLikelihood { /** * Specifies the initial target location so that it can learn its description * @ param image Image * @ param initial Initial target location and the mean - shift bandwidth */ public void initialize ( T image , RectangleLength2D_I32 initial ) { } }
if ( ! image . isInBounds ( initial . x0 , initial . y0 ) ) throw new IllegalArgumentException ( "Initial rectangle is out of bounds!" ) ; if ( ! image . isInBounds ( initial . x0 + initial . width , initial . y0 + initial . height ) ) throw new IllegalArgumentException ( "Initial rectangle is out of bounds!" ) ; pdf . reshape ( image . width , image . height ) ; ImageMiscOps . fill ( pdf , - 1 ) ; setTrackLocation ( initial ) ; failed = false ; // compute the initial sum of the likelihood so that it can detect when the target is no longer visible minimumSum = 0 ; targetModel . setImage ( image ) ; for ( int y = 0 ; y < initial . height ; y ++ ) { for ( int x = 0 ; x < initial . width ; x ++ ) { minimumSum += targetModel . compute ( x + initial . x0 , y + initial . y0 ) ; } } minimumSum *= minFractionDrop ;
public class MwsConnection { /** * Create a new request . * After first call to this method connection parameters can no longer be * updated . * @ param servicePath * @ param operationName * @ return A new request . */ public MwsCall newCall ( String servicePath , String operationName ) { } }
if ( ! frozen ) { freeze ( ) ; } ServiceEndpoint sep = getServiceEndpoint ( servicePath ) ; // in future use sep + config to determine MwsCall implementation . return new MwsAQCall ( this , sep , operationName ) ;
public class DWRBeanGenerator { /** * Gets the appropriate path replacement string for a DWR container * @ param container * @ return */ private String getPathReplacementString ( Container container ) { } }
String path = JS_PATH_REF ; if ( null != container . getBean ( DWR_OVERRIDEPATH_PARAM ) ) { path = ( String ) container . getBean ( DWR_OVERRIDEPATH_PARAM ) ; } else if ( null != container . getBean ( DWR_MAPPING_PARAM ) ) { path = JS_CTX_PATH + container . getBean ( DWR_MAPPING_PARAM ) ; } return path ;
public class TableWorks { /** * Because of the way indexes and column data are held in memory and on * disk , it is necessary to recreate the table when an index is added to or * removed from a non - empty table . * < p > Originally , this method would break existing foreign keys as the * table order in the DB was changed . The new table is now linked in place * of the old table ( fredt @ users ) * @ param indexName String */ void dropIndex ( String indexName ) { } }
Index index ; index = table . getIndex ( indexName ) ; if ( table . isIndexingMutable ( ) ) { table . dropIndex ( session , indexName ) ; } else { OrderedHashSet indexSet = new OrderedHashSet ( ) ; indexSet . add ( table . getIndex ( indexName ) . getName ( ) ) ; Table tn = table . moveDefinition ( session , table . tableType , null , null , null , - 1 , 0 , emptySet , indexSet ) ; tn . moveData ( session , table , - 1 , 0 ) ; updateConstraints ( tn , emptySet ) ; setNewTableInSchema ( tn ) ; database . persistentStoreCollection . releaseStore ( table ) ; table = tn ; } if ( ! index . isConstraint ( ) ) { database . schemaManager . removeSchemaObject ( index . getName ( ) ) ; } database . schemaManager . recompileDependentObjects ( table ) ;
public class UrlTextExample { /** * The domain ( actually authority component ) of an HTML5 URL . * If the input is not hierarchical , then the return value is undefined . */ static String domainOf ( String url ) { } }
int start = - 1 ; if ( url . startsWith ( "//" ) ) { start = 2 ; } else { start = url . indexOf ( "://" ) ; if ( start >= 0 ) { start += 3 ; } } if ( start < 0 ) { return null ; } for ( int i = 0 ; i < start - 3 ; ++ i ) { switch ( url . charAt ( i ) ) { case '/' : case '?' : case '#' : return null ; default : break ; } } int end = url . length ( ) ; for ( int i = start ; i < end ; ++ i ) { switch ( url . charAt ( i ) ) { case '/' : case '?' : case '#' : end = i ; break ; default : break ; } } if ( start < end ) { return url . substring ( start , end ) ; } else { return null ; }
public class IO { /** * ObjectInputStream which doesn ' t care too much about serialVersionUIDs . Horrible : ) */ public static ObjectInputStream gullibleObjectInputStream ( InputStream is ) throws IOException { } }
return new ObjectInputStream ( is ) { @ Override protected ObjectStreamClass readClassDescriptor ( ) throws IOException , ClassNotFoundException { ObjectStreamClass oc = super . readClassDescriptor ( ) ; try { Class < ? > c = Class . forName ( oc . getName ( ) ) ; // interfaces do not have fields if ( ! c . isInterface ( ) ) { Field f = oc . getClass ( ) . getDeclaredField ( "suid" ) ; f . setAccessible ( true ) ; f . set ( oc , ObjectStreamClass . lookup ( c ) . getSerialVersionUID ( ) ) ; } } catch ( Exception e ) { System . err . println ( "Couldn't fake class descriptor for " + oc + ": " + e ) ; } return oc ; } } ;
public class QueryEngine { /** * Factory method to create a QueryEngine instance . * @ param manager An OWLOntologyManager instance of OWLAPI v3 * @ param reasoner An OWLReasoner instance . * @ param strictMode If strict mode is enabled the query engine will throw a QueryEngineException if data types withing the query are not correct ( e . g . Class ( URI _ OF _ AN _ INDIVIDUAL ) ) * @ return an instance of QueryEngine */ public static QueryEngine create ( OWLOntologyManager manager , OWLReasoner reasoner , boolean strict ) { } }
return new QueryEngineImpl ( manager , reasoner , strict ) ;
public class Pairs { /** * Return a List of the second items from a list of pairs * @ param list list * @ param < T > first type * @ param < W > second type * @ return list of seconds */ public static < T , W > List < W > listSecond ( List < Pair < T , W > > list ) { } }
ArrayList < W > ts = new ArrayList < W > ( ) ; for ( Pair < T , W > twPair : list ) { ts . add ( twPair . getSecond ( ) ) ; } return ts ;
public class ValidationProcessor { /** * / * package private */ static String generateFieldContextDeclaration ( final String className , final String checkName , final String fieldName ) { } }
return "private static final net.sf.oval.context.OValContext " + checkName + "_CONTEXT" + " = new net.sf.oval.context.FieldContext(" + className + ".class, \"" + fieldName + "\");" ;
public class GenericTransactionManagerLookup { /** * Try to figure out which TransactionManager to use */ private void doLookups ( ClassLoader cl ) { } }
if ( lookupFailed ) return ; InitialContext ctx ; try { ctx = new InitialContext ( ) ; } catch ( NamingException e ) { log . failedToCreateInitialCtx ( e ) ; lookupFailed = true ; return ; } try { // probe jndi lookups first for ( LookupNames . JndiTransactionManager knownJNDIManager : LookupNames . JndiTransactionManager . values ( ) ) { Object jndiObject ; try { log . debugf ( "Trying to lookup TransactionManager for %s" , knownJNDIManager . getPrettyName ( ) ) ; jndiObject = ctx . lookup ( knownJNDIManager . getJndiLookup ( ) ) ; } catch ( NamingException e ) { log . debugf ( "Failed to perform a lookup for [%s (%s)]" , knownJNDIManager . getJndiLookup ( ) , knownJNDIManager . getPrettyName ( ) ) ; continue ; } if ( jndiObject instanceof TransactionManager ) { tm = ( TransactionManager ) jndiObject ; log . debugf ( "Found TransactionManager for %s" , knownJNDIManager . getPrettyName ( ) ) ; return ; } } } finally { Util . close ( ctx ) ; } boolean found = true ; // The TM may be deployed embedded alongside the app , so this needs to be looked up on the same CL as the Cache for ( LookupNames . TransactionManagerFactory transactionManagerFactory : LookupNames . TransactionManagerFactory . values ( ) ) { log . debugf ( "Trying %s: %s" , transactionManagerFactory . getPrettyName ( ) , transactionManagerFactory . getFactoryClazz ( ) ) ; TransactionManager transactionManager = transactionManagerFactory . tryLookup ( cl ) ; if ( transactionManager != null ) { log . debugf ( "Found %s: %s" , transactionManagerFactory . getPrettyName ( ) , transactionManagerFactory . getFactoryClazz ( ) ) ; tm = transactionManager ; found = false ; } } lookupDone = true ; lookupFailed = found ;
public class ObjToIntMap { /** * Get integer value assigned with key . * @ return key integer value or defaultValue if key is absent */ public int get ( Object key , int defaultValue ) { } }
if ( key == null ) { key = UniqueTag . NULL_VALUE ; } int index = findIndex ( key ) ; if ( 0 <= index ) { return values [ index ] ; } return defaultValue ;
public class AbstractMSBuildPluginMojo { /** * Calculate the relative path between the project and it ' s base directory . * For a project ( vcxproj ) file this will be an empty string . * For a solution ( sln ) file this will be the path from the soltuion to the project terminated with a \ * @ param vcProject the parsed project * @ return a String containing the relative path * @ throws MojoExecutionException if there is an IOException checking the file system */ private String calculateProjectRelativeDirectory ( VCProject vcProject ) throws MojoExecutionException { } }
String relProjectDir = "" ; try { relProjectDir = getRelativeFile ( vcProject . getBaseDirectory ( ) , vcProject . getFile ( ) . getParentFile ( ) ) . getPath ( ) ; if ( "." . equals ( relProjectDir ) ) { relProjectDir = "" ; } else { relProjectDir += "\\" ; } } catch ( IOException ioe ) { throw new MojoExecutionException ( ioe . getMessage ( ) , ioe ) ; } return relProjectDir ;
public class Schedule { /** * set the value port The port number on the server from which the task is being scheduled . Default * is 80 . When used with resolveURL , the URLs of retrieved documents that specify a port number are * automatically resolved to preserve links in the retrieved document . * @ param port value to set * @ throws PageException */ public void setPort ( Object oPort ) throws PageException { } }
if ( StringUtil . isEmpty ( oPort ) ) return ; this . port = Caster . toIntValue ( oPort ) ;
public class Google2445Utils { /** * Creates a recurrence iterator based on the given recurrence rule . * @ param recurrence the recurrence rule * @ param start the start date * @ param timezone the timezone to iterate in . This is needed in order to * account for when the iterator passes over a daylight savings boundary . * @ return the recurrence iterator */ public static RecurrenceIterator createRecurrenceIterator ( Recurrence recurrence , ICalDate start , TimeZone timezone ) { } }
DateValue startValue = convert ( start , timezone ) ; return RecurrenceIteratorFactory . createRecurrenceIterator ( recurrence , startValue , timezone ) ;
public class Properties { /** * Loads all of the properties represented by the XML document on the * specified input stream into this properties table . * < p > The XML document must have the following DOCTYPE declaration : * < pre > * & lt ; ! DOCTYPE properties SYSTEM " http : / / java . sun . com / dtd / properties . dtd " & gt ; * < / pre > * Furthermore , the document must satisfy the properties DTD described * above . * < p > An implementation is required to read XML documents that use the * " { @ code UTF - 8 } " or " { @ code UTF - 16 } " encoding . An implementation may * support additional encodings . * < p > The specified stream is closed after this method returns . * @ param in the input stream from which to read the XML document . * @ throws IOException if reading from the specified input stream * results in an < tt > IOException < / tt > . * @ throws java . io . UnsupportedEncodingException if the document ' s encoding * declaration can be read and it specifies an encoding that is not * supported * @ throws InvalidPropertiesFormatException Data on input stream does not * constitute a valid XML document with the mandated document type . * @ throws NullPointerException if { @ code in } is null . * @ see # storeToXML ( OutputStream , String , String ) * @ see < a href = " http : / / www . w3 . org / TR / REC - xml / # charencoding " > Character * Encoding in Entities < / a > * @ since 1.5 */ public synchronized void loadFromXML ( InputStream in ) throws IOException , InvalidPropertiesFormatException { } }
XmlLoader loader = XmlLoader . INSTANCE ; if ( loader == null ) { throw new LibraryNotLinkedError ( "XML support" , "jre_xml" , "ComGoogleJ2objcUtilPropertiesXmlLoader" ) ; } loader . load ( this , in ) ;