signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class DeviceLocation { /** * Get the last known location . * If one is not available , fetch * a fresh location * @ param context * @ param waitForGpsFix * @ param cb */ public static void getLastKnownLocation ( Context context , boolean waitForGpsFix , final LocationResult cb ) { } }
DeviceLocation deviceLocation = new DeviceLocation ( ) ; LocationManager lm = ( LocationManager ) context . getSystemService ( Context . LOCATION_SERVICE ) ; Location last_loc ; last_loc = lm . getLastKnownLocation ( LocationManager . GPS_PROVIDER ) ; if ( last_loc == null ) last_loc = lm . getLastKnownLocation ( Locat...
public class Utils { /** * calculates a " load " , given on two deltas */ public static double calcLoad ( Long deltaCpuTime , long deltaUptime , long factor ) { } }
if ( deltaCpuTime == null || deltaCpuTime <= 0 || deltaUptime == 0 ) { return 0.0 ; } return deltaCpuTime * 100d / factor / deltaUptime ;
public class GreenPepperXMLAplicationContext { /** * { @ inheritDoc } */ protected Resource getResourceByPath ( String path ) { } }
String classPathPrefix = org . springframework . core . io . ResourceLoader . CLASSPATH_URL_PREFIX ; if ( path . startsWith ( classPathPrefix ) ) { return super . getResourceByPath ( path . substring ( classPathPrefix . length ( ) ) ) ; } if ( path != null && path . startsWith ( "/" ) ) { path = path . substring ( 1 ) ...
public class DomXmlMessageValidator { /** * Validate message payloads by comparing to a control message . * @ param receivedMessage * @ param validationContext * @ param context */ protected void validateMessageContent ( Message receivedMessage , Message controlMessage , XmlMessageValidationContext validationCont...
if ( controlMessage == null || controlMessage . getPayload ( ) == null ) { log . debug ( "Skip message payload validation as no control message was defined" ) ; return ; } if ( ! ( controlMessage . getPayload ( ) instanceof String ) ) { throw new IllegalArgumentException ( "DomXmlMessageValidator does only support mess...
public class ContentInfoUtil { /** * Return the content type for the input - stream or null if none of the magic entries matched . You might want to use * the { @ link ContentInfoInputStreamWrapper } class to delegate to an input - stream and determine content information * at the same time . * < b > NOTE : < / b...
byte [ ] bytes = new byte [ fileReadSize ] ; int numRead = inputStream . read ( bytes ) ; if ( numRead < 0 ) { return null ; } if ( numRead < bytes . length ) { // move the bytes into a smaller array bytes = Arrays . copyOf ( bytes , numRead ) ; } return findMatch ( bytes ) ;
public class InitialRequestDispatcher { /** * Try to find a matching Sip Session to a given dialog * @ param dialog the dialog to find the session * @ return the matching session , null if not session have been found */ private MobicentsSipSession retrieveSipSession ( Dialog dialog ) { } }
if ( dialog != null ) { Iterator < SipContext > iterator = sipApplicationDispatcher . findSipApplications ( ) ; while ( iterator . hasNext ( ) ) { SipContext sipContext = iterator . next ( ) ; SipManager sipManager = sipContext . getSipManager ( ) ; Iterator < MobicentsSipSession > sipSessionsIt = sipManager . getAllSi...
public class HttpServiceProxy { /** * { @ inheritDoc } */ @ Override public void setSessionTimeout ( final Integer minutes , final HttpContext httpContext ) { } }
LOG . debug ( "Setting session timeout to " + minutes + " minutes for http context [" + httpContext + "]" ) ; delegate . setSessionTimeout ( minutes , httpContext ) ;
public class LoadBalancerBuilder { /** * Build a load balancer using the configuration from the { @ link IClientConfig } only . It uses reflection to initialize necessary load balancer * components . */ public ILoadBalancer buildLoadBalancerFromConfigWithReflection ( ) { } }
String loadBalancerClassName = config . get ( CommonClientConfigKey . NFLoadBalancerClassName ) ; if ( loadBalancerClassName == null ) { throw new IllegalArgumentException ( "NFLoadBalancerClassName is not specified in the IClientConfig" ) ; } ILoadBalancer lb ; try { lb = ( ILoadBalancer ) factory . create ( loadBalan...
public class license_file { /** * Use this API to fetch filtered set of license _ file resources . * filter string should be in JSON format . eg : " vm _ state : DOWN , name : [ a - z ] + " */ public static license_file [ ] get_filtered ( nitro_service service , String filter ) throws Exception { } }
license_file obj = new license_file ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; license_file [ ] response = ( license_file [ ] ) obj . getfiltered ( service , option ) ; return response ;
public class LinkClustering { /** * Returns the edge similarity matrix for the edges in the provided sparse * matrix . */ private Matrix getEdgeSimMatrix ( List < Edge > edgeList , SparseMatrix sm , boolean keepSimilarityMatrixInMemory ) { } }
return ( keepSimilarityMatrixInMemory ) ? calculateEdgeSimMatrix ( edgeList , sm ) : new LazySimilarityMatrix ( edgeList , sm ) ;
public class QBitValue { /** * { @ inheritDoc } */ @ Override public QBitValue appendSQL ( final SQLSelect _sql ) { } }
final IBitEnum [ ] consts = this . bitEnum . getClass ( ) . getEnumConstants ( ) ; final int max = consts [ consts . length - 1 ] . getInt ( ) * 2 ; boolean first = true ; for ( int i = 0 ; i < max ; i ++ ) { if ( ! this . added . contains ( i ) && BitEnumType . isSelected ( i , this . bitEnum ) ) { if ( first ) { firs...
public class CacheContainerCommands { /** * An attribute write handler which performs special processing for ALIAS attributes . * @ param context the operation context * @ param operation the operation being executed * @ throws org . jboss . as . controller . OperationFailedException */ @ Override public void exe...
if ( context . isNormalServer ( ) ) { ModelNode operationResult ; try { operationResult = invokeCommand ( getEmbeddedCacheManager ( context , operation ) , context , operation ) ; } catch ( Exception e ) { throw new OperationFailedException ( MESSAGES . failedToInvokeOperation ( e . getLocalizedMessage ( ) ) , e ) ; } ...
public class XmlDoclet { /** * Check for doclet - added options . Returns the number of arguments you must * specify on the command line for the given option . For example , " - d docs " * would return 2. * This method is required if the doclet contains any options . If this * method is missing , Javadoc will p...
Option option = options . getOption ( optionName ) ; if ( option == null ) { return 0 ; } return option . getArgs ( ) + 1 ;
public class VisOdomMonoPlaneInfinity { /** * Removes tracks which have not been included in the inlier set recently * @ return Number of dropped tracks */ private int dropUnusedTracks ( ) { } }
List < PointTrack > all = tracker . getAllTracks ( null ) ; int num = 0 ; for ( PointTrack t : all ) { VoTrack p = t . getCookie ( ) ; if ( tick - p . lastInlier > thresholdRetire ) { tracker . dropTrack ( t ) ; num ++ ; } } return num ;
public class ProjectableSQLQuery { /** * Add the given String literal as query flag * @ param position position * @ param flag query flag * @ return the current object */ @ Override public Q addFlag ( Position position , String flag ) { } }
return queryMixin . addFlag ( new QueryFlag ( position , flag ) ) ;
public class UrlRewriter { /** * Fixes all resources urls and returns the result . * @ param input * The html to be processed . * @ param requestUrl * The request URL . * @ param baseUrlParam * The base URL selected for this request . * @ param visibleBaseUrl * The base URL viewed by the browser . * @...
StringBuffer result = new StringBuffer ( input . length ( ) ) ; Matcher m = URL_PATTERN . matcher ( input ) ; while ( m . find ( ) ) { String url = input . subSequence ( m . start ( 3 ) + 1 , m . end ( 3 ) - 1 ) . toString ( ) ; String tag = m . group ( 0 ) ; String quote = input . subSequence ( m . end ( 3 ) - 1 , m ....
public class vpnvserver_rewritepolicy_binding { /** * Use this API to fetch vpnvserver _ rewritepolicy _ binding resources of given name . */ public static vpnvserver_rewritepolicy_binding [ ] get ( nitro_service service , String name ) throws Exception { } }
vpnvserver_rewritepolicy_binding obj = new vpnvserver_rewritepolicy_binding ( ) ; obj . set_name ( name ) ; vpnvserver_rewritepolicy_binding response [ ] = ( vpnvserver_rewritepolicy_binding [ ] ) obj . get_resources ( service ) ; return response ;
public class MqttDecoder { /** * Decodes the variable header ( if any ) * @ param buffer the buffer to decode from * @ param mqttFixedHeader MqttFixedHeader of the same message * @ return the variable header */ private static Result < ? > decodeVariableHeader ( ByteBuf buffer , MqttFixedHeader mqttFixedHeader ) {...
switch ( mqttFixedHeader . messageType ( ) ) { case CONNECT : return decodeConnectionVariableHeader ( buffer ) ; case CONNACK : return decodeConnAckVariableHeader ( buffer ) ; case SUBSCRIBE : case UNSUBSCRIBE : case SUBACK : case UNSUBACK : case PUBACK : case PUBREC : case PUBCOMP : case PUBREL : return decodeMessageI...
public class Image { /** * Gets a PDF Name from an array or returns the object that was passed . */ private PdfObject simplifyColorspace ( PdfArray obj ) { } }
if ( obj == null ) return obj ; PdfName first = obj . getAsName ( 0 ) ; if ( PdfName . CALGRAY . equals ( first ) ) return PdfName . DEVICEGRAY ; else if ( PdfName . CALRGB . equals ( first ) ) return PdfName . DEVICERGB ; else return obj ;
public class ErrorHandlingClient { /** * This is more advanced and does not make use of the stub . You should not normally need to do * this , but here is how you would . */ void advancedAsyncCall ( ) { } }
ClientCall < HelloRequest , HelloReply > call = channel . newCall ( GreeterGrpc . getSayHelloMethod ( ) , CallOptions . DEFAULT ) ; final CountDownLatch latch = new CountDownLatch ( 1 ) ; call . start ( new ClientCall . Listener < HelloReply > ( ) { @ Override public void onClose ( Status status , Metadata trailers ) {...
public class Beacon { /** * Provides a calculated estimate of the distance to the beacon based on a running average of * the RSSI and the transmitted power calibration value included in the beacon advertisement . * This value is specific to the type of Android device receiving the transmission . * @ see # mDistan...
if ( mDistance == null ) { double bestRssiAvailable = mRssi ; if ( mRunningAverageRssi != null ) { bestRssiAvailable = mRunningAverageRssi ; } else { LogManager . d ( TAG , "Not using running average RSSI because it is null" ) ; } mDistance = calculateDistance ( mTxPower , bestRssiAvailable ) ; } return mDistance ;
public class Db { /** * Helper method to load a property file from class path . * @ param filesToLoad * an array of paths ( class path paths ) designating where the files may be . All files are loaded , in the order * given . Missing files are silently ignored . * @ return a Properties object , which may be emp...
Properties p = new Properties ( ) ; InputStream fis = null ; for ( String path : filesToLoad ) { try { fis = Db . class . getClassLoader ( ) . getResourceAsStream ( path ) ; if ( fis != null ) { p . load ( fis ) ; jqmlogger . info ( "A jqm.properties file was found at {}" , path ) ; } } catch ( IOException e ) { // We ...
public class ApiOvhHostingweb { /** * Get this object properties * REST : GET / hosting / web / { serviceName } / freedom / { domain } * @ param serviceName [ required ] The internal name of your hosting * @ param domain [ required ] Freedom domain */ public OvhFreedom serviceName_freedom_domain_GET ( String serv...
String qPath = "/hosting/web/{serviceName}/freedom/{domain}" ; StringBuilder sb = path ( qPath , serviceName , domain ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhFreedom . class ) ;
public class CompilerUtil { /** * Marshals the specified argument to the declared type . May involve conversion . The following * argument conversions may occur : * < ul > * < li > List to Set if the argument type is a List ( i . e . NativeArray ) and the declared type is Set * < / li > * < li > Sting to Enum...
final String sourceMethod = "marshalArg" ; // $ NON - NLS - 1 $ final boolean isTraceLogging = log . isLoggable ( Level . FINER ) ; if ( isTraceLogging ) { log . entering ( sourceClass , sourceMethod , new Object [ ] { declaredType , value } ) ; } Object result = null ; Class < ? > argType = value . getClass ( ) ; if (...
public class SamlIdPMetadataDocument { /** * Gets encryption certificate decoded . * @ return the encryption certificate decoded */ @ JsonIgnore public String getEncryptionCertificateDecoded ( ) { } }
if ( EncodingUtils . isBase64 ( encryptionCertificate ) ) { return EncodingUtils . decodeBase64ToString ( encryptionCertificate ) ; } return encryptionCertificate ;
public class PaxWicketObjectOutputStream { /** * { @ inheritDoc } */ @ Override protected void writeObjectOverride ( final Object object ) throws IOException { } }
try { outputStream . writeObject ( object ) ; } catch ( NotSerializableException e ) { if ( CheckingObjectOutputStream . isAvailable ( ) ) { // trigger serialization again , but this time gather some more info new PaxWicketSerializableChecker ( e ) { @ Override protected boolean validateAdditionalSerializableConditions...
public class KeyManager { /** * Tick event called on the Client . < br > * Used to simulate pressing and releasing of our additional keys . < br > * This is about as close as we can ( easily ) get in the call stack to the point when Minecraft does the equivalent code for its own keys . * @ param ev ClientTickEven...
if ( ev != null && ev . phase == Phase . START ) { for ( InternalKey binding : this . additionalKeys ) { if ( binding . isKeyDown ( ) ) { binding . onKeyDown ( ) ; } if ( binding . isPressed ( ) ) { binding . onPressed ( ) ; } } }
public class DBUtils { /** * returned by the query . In the case of an insert , returns null . */ public static List < List < Object > > runInsertSelect ( DBConnectionFactory connectionFactory , String sql , List < Object > sqlParams , boolean isWrite , int numRetries , int retryMaxInternalSec , boolean insert , boolea...
int waitMS = 3000 ; // wait for at least 3s before next retry . for ( int i = 0 ; i < numRetries ; ++ i ) { Connection conn = null ; ResultSet generatedKeys = null ; PreparedStatement pstmt = null ; String url = null ; try { try { url = connectionFactory . getUrl ( isWrite ) ; } catch ( IOException ioe ) { LOG . warn (...
public class ConnectionMonitorsInner { /** * Query a snapshot of the most recent connection states . * @ param resourceGroupName The name of the resource group containing Network Watcher . * @ param networkWatcherName The name of the Network Watcher resource . * @ param connectionMonitorName The name given to the...
return queryWithServiceResponseAsync ( resourceGroupName , networkWatcherName , connectionMonitorName ) . toBlocking ( ) . last ( ) . body ( ) ;
public class ClientImpl { /** * Shutdown the client closing all network connections and release * all memory resources . * @ throws InterruptedException */ @ Override public void close ( ) throws InterruptedException { } }
if ( m_blessedThreadIds . contains ( Thread . currentThread ( ) . getId ( ) ) ) { throw new RuntimeException ( "Can't invoke backpressureBarrier from within the client callback thread " + " without deadlocking the client library" ) ; } m_isShutdown = true ; synchronized ( m_backpressureLock ) { m_backpressureLock . not...
public class FlowControllerFactory { /** * Get a FlowController instance , given a FlowController class . * @ param flowControllerClass the Class , which must be assignable to { @ link FlowController } . * @ return a new FlowController instance . */ public FlowController getFlowControllerInstance ( Class flowContro...
assert FlowController . class . isAssignableFrom ( flowControllerClass ) : "Class " + flowControllerClass . getName ( ) + " does not extend " + FlowController . class . getName ( ) ; return ( FlowController ) flowControllerClass . newInstance ( ) ;
public class Animation { /** * Add animation frame to the animation * @ param frame The image to display for the frame * @ param duration The duration to display the frame for */ public void addFrame ( Image frame , int duration ) { } }
if ( duration == 0 ) { Log . error ( "Invalid duration: " + duration ) ; throw new RuntimeException ( "Invalid duration: " + duration ) ; } if ( frames . isEmpty ( ) ) { nextChange = ( int ) ( duration / speed ) ; } frames . add ( new Frame ( frame , duration ) ) ; currentFrame = 0 ;
public class JmsConnectionImpl { /** * if the sessionMode is SESSION _ TRANSACTED , we create a transacted session * @ see javax . jms . Connection # createSession ( int ) */ @ Override public Session createSession ( int sessionMode ) throws JMSException { } }
Session session = null ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createSession" , new Object [ ] { sessionMode } ) ; try { if ( sessionMode == JMSContext . SESSION_TRANSACTED ) session = createSession ( true , sessionMode ) ; else session = createSession (...
public class CompileTask { /** * Returns the most recent modified timestamp of the file collection . * Note : this must be combined into one method to account for both * Path and FileList erasure types . * @ param fileLists Collection of FileList or Path * @ return Most recent modified timestamp */ private long...
long lastModified = 0 ; for ( Object entry : fileLists ) { if ( entry instanceof FileList ) { FileList list = ( FileList ) entry ; for ( String fileName : list . getFiles ( this . getProject ( ) ) ) { File path = list . getDir ( this . getProject ( ) ) ; File file = new File ( path , fileName ) ; lastModified = Math . ...
public class ApplicationMaster { /** * Checks if an Alluxio master node is already running * or not on the master address given . * @ return true if master exists , false otherwise */ private boolean masterExists ( ) { } }
String webPort = mAlluxioConf . get ( PropertyKey . MASTER_WEB_PORT ) ; try { URL myURL = new URL ( "http://" + mMasterAddress + ":" + webPort + Constants . REST_API_PREFIX + "/master/version" ) ; LOG . debug ( "Checking for master at: " + myURL . toString ( ) ) ; HttpURLConnection connection = ( HttpURLConnection ) my...
public class GSMXImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public boolean eIsSet ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . GSMX__MODE : return MODE_EDEFAULT == null ? mode != null : ! MODE_EDEFAULT . equals ( mode ) ; } return super . eIsSet ( featureID ) ;
public class RoaringBitmap { /** * Estimate of the memory usage of this data structure . This can be expected to be within 1 % of * the true memory usage in common usage scenarios . * If exact measures are needed , we recommend using dedicated libraries * such as ehcache - sizeofengine . * In adversarial cases ...
long size = 8 ; for ( int i = 0 ; i < this . highLowContainer . size ( ) ; i ++ ) { final Container c = this . highLowContainer . getContainerAtIndex ( i ) ; size += 2 + c . getSizeInBytes ( ) ; } return size ;
public class MasterPageStyle { /** * Return the master - style informations for this PageStyle . * @ param util a util for XML writing * @ param appendable where to write * @ throws IOException If an I / O error occurs */ public void appendXMLToMasterStyle ( final XMLUtil util , final Appendable appendable ) thro...
appendable . append ( "<style:master-page" ) ; util . appendEAttribute ( appendable , "style:name" , this . name ) ; util . appendEAttribute ( appendable , "style:page-layout-name" , this . layoutName ) ; appendable . append ( "><style:header>" ) ; this . header . appendXMLToMasterStyle ( util , appendable ) ; appendab...
public class JsGeometryMergeService { /** * Register a { @ link GeometryMergeRemovedHandler } to listen to events that signal a geometry has been removed from * the list for merging . * @ param handler * The { @ link GeometryMergeRemovedHandler } to add as listener . * @ return The registration of the handler ....
org . geomajas . plugin . editing . client . merge . event . GeometryMergeRemovedHandler h ; h = new org . geomajas . plugin . editing . client . merge . event . GeometryMergeRemovedHandler ( ) { public void onGeometryMergingRemoved ( GeometryMergeRemovedEvent event ) { org . geomajas . plugin . editing . jsapi . clien...
public class AWSDirectoryServiceClient { /** * Adds or removes domain controllers to or from the directory . Based on the difference between current value and * new value ( provided through this API call ) , domain controllers will be added or removed . It may take up to 45 * minutes for any new domain controllers ...
request = beforeClientExecution ( request ) ; return executeUpdateNumberOfDomainControllers ( request ) ;
public class Cluster { /** * Cluster operations that are waiting to be started . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setPendingActions ( java . util . Collection ) } or { @ link # withPendingActions ( java . util . Collection ) } if you want * t...
if ( this . pendingActions == null ) { setPendingActions ( new com . amazonaws . internal . SdkInternalList < String > ( pendingActions . length ) ) ; } for ( String ele : pendingActions ) { this . pendingActions . add ( ele ) ; } return this ;
public class MetadataFinder { /** * Start finding track metadata for all active players . Starts the { @ link VirtualCdj } if it is not already * running , because we need it to send us device status updates to notice when new tracks are loaded ; this * starts the { @ link DeviceFinder } ( which is also needed by t...
if ( ! isRunning ( ) ) { ConnectionManager . getInstance ( ) . addLifecycleListener ( lifecycleListener ) ; ConnectionManager . getInstance ( ) . start ( ) ; DeviceFinder . getInstance ( ) . start ( ) ; DeviceFinder . getInstance ( ) . addDeviceAnnouncementListener ( announcementListener ) ; VirtualCdj . getInstance ( ...
public class GoogleTransporter { /** * - - - SUBSCRIBE - - - */ @ Override public Promise subscribe ( String channel ) { } }
try { // Create topic ProjectTopicName topicName = ProjectTopicName . of ( projectID , channel ) ; Topic topic = null ; try { topic = topicAdmin . getTopic ( topicName ) ; } catch ( NotFoundException notFound ) { } if ( topic == null ) { topic = topicAdmin . createTopic ( topicName ) ; logger . info ( "Topic \"" + topi...
public class DoubleRangeValidator { /** * - - - - - StateHolder Methods */ public Object saveState ( FacesContext context ) { } }
if ( context == null ) { throw new NullPointerException ( ) ; } if ( ! initialStateMarked ( ) ) { Object values [ ] = new Object [ 2 ] ; values [ 0 ] = maximum ; values [ 1 ] = minimum ; return ( values ) ; } return null ;
public class Timestamp { /** * Applies the local offset from UTC to each of the applicable time field * values and returns the new Timestamp . In short , this makes the Timestamp * represent local time . * @ return a new Timestamp in its local time */ private Timestamp make_localtime ( ) { } }
int offset = _offset != null ? _offset . intValue ( ) : 0 ; // We use a Copy - Constructor that expects the time parameters to be in // UTC , as that ' s what we ' re supposed to have . // As this Copy - Constructor doesn ' t apply local offset to the time // field values ( it assumes that the local offset is already a...
public class SrvShoppingCart { /** * < p > Reveal shared tax rules for cart . It also makes buyer - regCustomer . < / p > * @ param pRqVs request scoped vars * @ param pCart cart * @ param pAs Accounting Settings * @ return tax rules , NULL if not taxable * @ throws Exception - an exception . */ @ Override pu...
if ( pCart . getBuyer ( ) . getRegCustomer ( ) == null ) { // copy buyer info into non - persistable customer . pCart . getBuyer ( ) . setRegCustomer ( new DebtorCreditor ( ) ) ; pCart . getBuyer ( ) . getRegCustomer ( ) . setIsForeigner ( pCart . getBuyer ( ) . getForeig ( ) ) ; pCart . getBuyer ( ) . getRegCustomer (...
public class LdapConsentRepository { /** * Merges a new decision into existing decisions . * Decisions are matched by ID . * @ param ldapConsent existing consent decisions * @ param decision new decision * @ return new decision set */ private static Set < String > mergeDecision ( final LdapAttribute ldapConsent...
if ( decision . getId ( ) < 0 ) { decision . setId ( System . currentTimeMillis ( ) ) ; } if ( ldapConsent != null ) { val result = removeDecision ( ldapConsent , decision . getId ( ) ) ; val json = mapToJson ( decision ) ; if ( StringUtils . isBlank ( json ) ) { throw new IllegalArgumentException ( "Could not map cons...
public class Util { /** * Compare two possibly null objects * @ param thisone * @ param thatone * @ return int - 1 , 0 , 1, */ @ SuppressWarnings ( "unchecked" ) public static int cmpObjval ( final Comparable thisone , final Comparable thatone ) { } }
if ( thisone == null ) { if ( thatone == null ) { return 0 ; } return - 1 ; } if ( thatone == null ) { return 1 ; } return thisone . compareTo ( thatone ) ;
public class ChannelHelper { /** * Copy all content from the source channel to the destination channel . * @ param aSrc * Source channel . May not be < code > null < / code > . Is not closed after * the operation . * @ param aDest * Destination channel . May not be < code > null < / code > . Is not closed *...
ValueEnforcer . notNull ( aSrc , "SourceChannel" ) ; ValueEnforcer . isTrue ( aSrc . isOpen ( ) , "SourceChannel is not open!" ) ; ValueEnforcer . notNull ( aDest , "DestinationChannel" ) ; ValueEnforcer . isTrue ( aDest . isOpen ( ) , "DestinationChannel is not open!" ) ; long nBytesWritten ; if ( USE_COPY_V1 ) nBytes...
public class CommerceCountryPersistenceImpl { /** * Returns a range of all the commerce countries where groupId = & # 63 ; and shippingAllowed = & # 63 ; and active = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > e...
return findByG_S_A ( groupId , shippingAllowed , active , start , end , null ) ;
public class JRDF { /** * Tells whether the given objects are equivalent , with one given as a set * of simple values . * @ param o1 * first node . * @ param o2 * second node URI ( if isLiteral is false ) or lexical value ( if * isLiteral is true ) * @ param isLiteral * whether the second node is a lite...
if ( o1 instanceof URIReference ) { return sameResource ( ( URIReference ) o1 , o2 ) ; } else if ( o1 instanceof Literal || isLiteral ) { return sameLiteral ( ( Literal ) o1 , o2 , type , lang ) ; } else { return false ; }
public class DOMUtils { /** * Create a org . w3c . dom . Text node . * This uses the document builder associated with the current thread . */ public static Text createTextNode ( String value ) { } }
Document doc = getOwnerDocument ( ) ; return doc . createTextNode ( value ) ;
public class ODataRendererUtils { /** * Checks if we are trying to force expand all Nav properties for function calls by looking at expand parameter . * @ param oDataUri The OData URI * @ return boolean if force expand parameter is set */ public static boolean isForceExpandParamSet ( ODataUri oDataUri ) { } }
if ( isFunctionCallUri ( oDataUri ) ) { // Check if we have expand param set to true Option < scala . collection . immutable . Map < String , String > > params = getFunctionCallParameters ( oDataUri ) ; if ( params . isDefined ( ) && ! params . get ( ) . isEmpty ( ) ) { Map < String , String > parametersMap = JavaConve...
public class Jenkins { /** * Sign up for the user account . */ public void doSignup ( StaplerRequest req , StaplerResponse rsp ) throws IOException , ServletException { } }
if ( getSecurityRealm ( ) . allowsSignup ( ) ) { req . getView ( getSecurityRealm ( ) , "signup.jelly" ) . forward ( req , rsp ) ; return ; } req . getView ( SecurityRealm . class , "signup.jelly" ) . forward ( req , rsp ) ;
public class ZonalDateTime { /** * / * [ deutsch ] * < p > Interpretiert den angegebenen Text als { @ code ZonalDateTime } . < / p > * < p > Hinweis : Diese Methode kann in Lambda - Ausdr & uuml ; cken verwendet werden , weil sie < i > checked exceptions < / i > * vermeidet . < / p > * @ param text text to be p...
try { RawValues rawValues = new RawValues ( ) ; Moment moment = parser . parse ( text , rawValues ) ; Timezone tz ; if ( rawValues . get ( ) . hasTimezone ( ) ) { tz = toTimezone ( rawValues . get ( ) . getTimezone ( ) , text ) ; } else if ( parser . getAttributes ( ) . contains ( TIMEZONE_ID ) ) { tz = toTimezone ( pa...
public class DeleteUserRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DeleteUserRequest deleteUserRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( deleteUserRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteUserRequest . getUserName ( ) , USERNAME_BINDING ) ; protocolMarshaller . marshall ( deleteUserRequest . getAwsAccountId ( ) , AWSACCOUNTID_BINDING ) ; protocolM...
public class BDAFactory { /** * only for extensions */ public static WebSphereBeanDeploymentArchive createBDA ( WebSphereCDIDeployment deployment , ExtensionArchive extensionArchive , CDIRuntime cdiRuntime ) throws CDIException { } }
Set < String > additionalClasses = extensionArchive . getExtraClasses ( ) ; Set < String > additionalAnnotations = extensionArchive . getExtraBeanDefiningAnnotations ( ) ; boolean extensionCanSeeApplicationBDAs = extensionArchive . applicationBDAsVisible ( ) ; boolean extClassesOnlyBDA = extensionArchive . isExtClasses...
public class FaviconBehavior { /** * { @ inheritDoc } */ @ Override public void renderHead ( final Component component , final IHeaderResponse response ) { } }
super . renderHead ( component , response ) ; response . render ( new StringHeaderItem ( "<link type=\"image/x-icon\" rel=\"shortcut icon\" href=\"favicon.ico\" />" ) ) ;
public class BackupClientImpl { /** * { @ inheritDoc } */ public String startBackUp ( String repositoryName , String workspaceName , String backupDir ) throws IOException , BackupExecuteException { } }
if ( workspaceName != null ) { String sURL = path + HTTPBackupAgent . Constants . BASE_URL + HTTPBackupAgent . Constants . OperationType . START_BACKUP + "/" + repositoryName + "/" + workspaceName ; BackupConfigBean bean = new BackupConfigBean ( BackupManager . FULL_BACKUP_ONLY , backupDir ) ; JsonGeneratorImpl generat...
public class EnvironmentConfig { /** * Sets percent of minimum database utilization . Default value is { @ code 50 } . That means that 50 percent * of free space in raw data in { @ code Log } files ( . xd files ) is allowed . If database utilization is less than * defined ( free space percent is more than { @ code ...
if ( percent < 1 || percent > 90 ) { throw new InvalidSettingException ( "Invalid minimum log files utilization: " + percent ) ; } return setSetting ( GC_MIN_UTILIZATION , percent ) ;
public class CredHubInterpolationServiceDataPostProcessor { /** * Convert from the Spring Cloud Connectors service data structure to the Spring * Credhub data structure . * @ param rawServiceData the Spring Cloud Connectors data structure * @ return the equivalent Spring CredHub data structure */ private Services...
ServicesData servicesData = new ServicesData ( ) ; servicesData . putAll ( rawServiceData ) ; return servicesData ;
public class RebindConfiguration { /** * @ param clazz class to find the type * @ return the { @ link JType } denoted by the class given in parameter */ private JType findType ( Class < ? > clazz ) { } }
if ( clazz . isPrimitive ( ) ) { return JPrimitiveType . parse ( clazz . getCanonicalName ( ) ) ; } else if ( clazz . isArray ( ) ) { try { return context . getTypeOracle ( ) . parse ( clazz . getCanonicalName ( ) ) ; } catch ( TypeOracleException e ) { logger . log ( TreeLogger . WARN , "Cannot find the array denoted ...
public class FilesImpl { /** * Lists the files in a task ' s directory on its compute node . * @ param jobId The ID of the job that contains the task . * @ param taskId The ID of the task whose files you want to list . * @ param recursive Whether to list children of the task directory . This parameter can be used...
return listFromTaskSinglePageAsync ( jobId , taskId , recursive , fileListFromTaskOptions ) . concatMap ( new Func1 < ServiceResponseWithHeaders < Page < NodeFile > , FileListFromTaskHeaders > , Observable < ServiceResponseWithHeaders < Page < NodeFile > , FileListFromTaskHeaders > > > ( ) { @ Override public Observabl...
public class LongTuples { /** * Set all elements of the given tuple to the given value * @ param t The tuple * @ param v The value */ public static void set ( MutableLongTuple t , long v ) { } }
for ( int i = 0 ; i < t . getSize ( ) ; i ++ ) { t . set ( i , v ) ; }
public class AbstractSelectCodeGenerator { /** * ( non - Javadoc ) * @ see com . abubusoft . kripton . processor . sqlite . SelectBuilderUtility . * SelectCodeGenerator # generate ( com . squareup . javapoet . TypeSpec . Builder , * boolean , com . abubusoft . kripton . processor . sqlite . model . SQLiteModelMet...
Set < JQLProjection > fieldList = JQLChecker . getInstance ( ) . extractProjections ( method , method . jql . value , method . getEntity ( ) ) ; // generate method code MethodSpec . Builder methodBuilder = generateMethodBuilder ( method ) ; generateCommonPart ( method , classBuilder , methodBuilder , fieldList , true )...
public class ExceptionSoftening { /** * overrides the visitor to find catch blocks that throw runtime exceptions * @ param seen the opcode of the currently parsed instruction */ @ Override public void sawOpcode ( int seen ) { } }
try { stack . precomputation ( this ) ; int pc = getPC ( ) ; CodeException ex = catchHandlerPCs . get ( Integer . valueOf ( pc ) ) ; if ( ex != null ) { int endPC ; if ( ( seen == Const . GOTO ) || ( seen == Const . GOTO_W ) ) { endPC = this . getBranchTarget ( ) ; } else { endPC = Integer . MAX_VALUE ; } ConstantPool ...
public class ChannelFrameworkImpl { /** * @ see com . ibm . wsspi . channelfw . ChannelFramework # updateChain ( String , String [ ] ) */ @ Override public synchronized ChainData updateChain ( String chainName , String [ ] newChannelList ) throws ChannelException , ChainException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "updateChain: " + chainName ) ; } if ( null == chainName ) { throw new InvalidChainNameException ( "Null chain name" ) ; } if ( ( null == newChannelList ) || ( 0 == newChannelList . length ) ) { throw new InvalidChannelNameEx...
public class DiSHPreferenceVectorIndex { /** * Initializes the dimension selecting distancefunctions to determine the * preference vectors . * @ param relation the database storing the objects * @ param dimensionality the dimensionality of the objects * @ return the dimension selecting distancefunctions to dete...
@ SuppressWarnings ( "unchecked" ) RangeQuery < V > [ ] rangeQueries = ( RangeQuery < V > [ ] ) new RangeQuery [ dimensionality ] ; for ( int d = 0 ; d < dimensionality ; d ++ ) { rangeQueries [ d ] = relation . getRangeQuery ( new PrimitiveDistanceQuery < > ( relation , new OnedimensionalDistanceFunction ( d ) ) ) ; }...
public class CmsLoginManager { /** * Adds an invalid attempt to login for the given user / IP to the storage . < p > * In case the configured threshold is reached , the user is disabled for the configured time . < p > * @ param userName the name of the user * @ param remoteAddress the remore address ( IP ) from w...
if ( m_maxBadAttempts < 0 ) { // invalid login storage is disabled return ; } String key = createStorageKey ( userName , remoteAddress ) ; // look up the user in the storage CmsUserData userData = m_storage . get ( key ) ; if ( userData != null ) { // user data already contained in storage userData . increaseInvalidLog...
public class DescribeProvisionedProductPlanResult { /** * Information about the resource changes that will occur when the plan is executed . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setResourceChanges ( java . util . Collection ) } or { @ link # withRe...
if ( this . resourceChanges == null ) { setResourceChanges ( new java . util . ArrayList < ResourceChange > ( resourceChanges . length ) ) ; } for ( ResourceChange ele : resourceChanges ) { this . resourceChanges . add ( ele ) ; } return this ;
public class ClientExecutorServiceProxy { /** * submit to members callback */ @ Override public void submitToMember ( Runnable command , Member member , ExecutionCallback callback ) { } }
Callable < ? > callable = createRunnableAdapter ( command ) ; submitToMember ( callable , member , callback ) ;
public class AppLinks { /** * Gets the target URL for an intent . If the intent is from an App Link , this will be the App Link target . * Otherwise , it return null ; For app link intent , this function will broadcast APP _ LINK _ NAVIGATE _ IN _ EVENT _ NAME event . * @ param context the context this function is ...
Bundle appLinkData = getAppLinkData ( intent ) ; if ( appLinkData != null ) { String targetString = appLinkData . getString ( KEY_NAME_TARGET ) ; if ( targetString != null ) { MeasurementEvent . sendBroadcastEvent ( context , MeasurementEvent . APP_LINK_NAVIGATE_IN_EVENT_NAME , intent , null ) ; return Uri . parse ( ta...
public class RevisionDecoder { /** * Decodes the information , after the codec was successfully decoded , and * returns the Diff . * @ param blockSize _ C * length of a C block * @ param blockSize _ S * length of a S block * @ param blockSize _ E * length of a E block * @ param blockSize _ B * length ...
int code = r . read ( blockSize_C ) ; Diff diff = new Diff ( ) ; while ( code != - 1 ) { // System . out . print ( code + " \ t " ) ; switch ( DiffAction . parse ( code ) ) { case FULL_REVISION_UNCOMPRESSED : diff . add ( decodeFullRevision ( blockSize_L ) ) ; break ; case INSERT : diff . add ( decodeAdd ( blockSize_S ...
public class CreateRegexPatternSetRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CreateRegexPatternSetRequest createRegexPatternSetRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( createRegexPatternSetRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( createRegexPatternSetRequest . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( createRegexPatternSetRequest . getChangeToken ( ) , CHANGETOKE...
public class DNS { /** * Returns the hostname associated with the specified IP address by the * provided nameserver . * @ param hostIp * The address to reverse lookup * @ param ns * The host name of a reachable DNS server * @ return The host name associated with the provided IP * @ throws NamingException ...
// Builds the reverse IP lookup form // This is formed by reversing the IP numbers and appending in - addr . arpa String [ ] parts = hostIp . getHostAddress ( ) . split ( "\\." ) ; String reverseIP = parts [ 3 ] + "." + parts [ 2 ] + "." + parts [ 1 ] + "." + parts [ 0 ] + ".in-addr.arpa" ; DirContext ictx = new Initia...
public class JaversSchemaManager { /** * JaVers 3.9.2 to 3.9.3 schema migration ( MySql only ) */ private void alterMySqlCommitDateColumn ( ) { } }
ColumnType commitDateColType = getTypeOf ( getCommitTableNameWithSchema ( ) , "commit_date" ) ; if ( commitDateColType . typeName . equals ( "TIMESTAMP" ) && commitDateColType . precision == 19 ) { logger . info ( "migrating db schema from JaVers 3.9.2 to 3.9.3 (MySql only) ..." ) ; executeSQL ( "ALTER TABLE " + getCom...
public class UnifiedResponseDefaultSettings { /** * HTTP Strict Transport Security ( HSTS ) is an opt - in security enhancement that * is specified by a web application through the use of a special response * header . Once a supported browser receives this header that browser will * prevent any communications fro...
setResponseHeader ( CHttpHeader . STRICT_TRANSPORT_SECURITY , new CacheControlBuilder ( ) . setMaxAgeSeconds ( nMaxAgeSeconds ) . getAsHTTPHeaderValue ( ) + ( bIncludeSubdomains ? ";" + CHttpHeader . VALUE_INCLUDE_SUBDOMAINS : "" ) ) ;
public class ThreadPoolMonitor { /** * { @ inheritDoc } */ @ Override public void statisticCreated ( SPIStatistic s ) { } }
if ( s . getId ( ) == ACTIVE_THREADS ) { activeThreads = ( SPIBoundedRangeStatistic ) s ; } else if ( s . getId ( ) == POOL_SIZE ) { poolSize = ( SPIBoundedRangeStatistic ) s ; } else { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Invlid stats found " + s ) ; } }
public class Variables { /** * Shortcut for calling { @ code Variables . fileValue ( name ) . file ( file ) . mimeType ( type ) . create ( ) } . * The name is set to the file name and the mime type is detected via { @ link MimetypesFileTypeMap } . */ public static FileValue fileValue ( File file ) { } }
String contentType = MimetypesFileTypeMap . getDefaultFileTypeMap ( ) . getContentType ( file ) ; return new FileValueBuilderImpl ( file . getName ( ) ) . file ( file ) . mimeType ( contentType ) . create ( ) ;
public class ComponentExposedTypeGenerator { /** * Transform a Java type name into a JavaScript type name . Takes care of primitive types . * @ param typeMirror A type to convert * @ return A String representing the JavaScript type name */ private String getNativeNameForJavaType ( TypeMirror typeMirror ) { } }
TypeName typeName = TypeName . get ( typeMirror ) ; if ( typeName . equals ( TypeName . INT ) || typeName . equals ( TypeName . BYTE ) || typeName . equals ( TypeName . SHORT ) || typeName . equals ( TypeName . LONG ) || typeName . equals ( TypeName . FLOAT ) || typeName . equals ( TypeName . DOUBLE ) ) { return "Numbe...
public class ClusterManager { /** * This method is used when the ClusterManager is restarting after going down * while in Safe Mode . It starts the process of recovering the original * CM state by reading back the state in JSON form . * @ param hostsReader The HostsReader instance * @ throws IOException */ priv...
LOG . info ( "Restoring state from " + new java . io . File ( conf . getCMStateFile ( ) ) . getAbsolutePath ( ) ) ; // This will prevent the expireNodes and expireSessions threads from // expiring the nodes and sessions respectively safeMode = true ; LOG . info ( "Safe mode is now: " + ( this . safeMode ? "ON" : "OFF" ...
public class SpannableStringInternal { /** * / * subclasses must do subSequence ( ) to preserve type */ public final void getChars ( int start , int end , char [ ] dest , int off ) { } }
mText . getChars ( start , end , dest , off ) ;
public class CmsCoreProvider { /** * Returns the adjusted site root for a resource using the provided site root as a base . < p > * Usually , this would be the site root for the current site . * However , if a resource from the < code > / system / < / code > folder is requested , * this will be the empty String ....
if ( resourcename . startsWith ( VFS_PATH_SYSTEM ) ) { return "" ; } else { return siteRoot ; }
public class DescribeRouteTablesResult { /** * Information about one or more route tables . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setRouteTables ( java . util . Collection ) } or { @ link # withRouteTables ( java . util . Collection ) } if you want ...
if ( this . routeTables == null ) { setRouteTables ( new com . amazonaws . internal . SdkInternalList < RouteTable > ( routeTables . length ) ) ; } for ( RouteTable ele : routeTables ) { this . routeTables . add ( ele ) ; } return this ;
public class AbstractMap { /** * Chooses a new prime table capacity optimized for shrinking that ( approximately ) satisfies the invariant * < tt > c * minLoadFactor < = size < = c * maxLoadFactor < / tt > * and has at least one FREE slot for the given size . */ protected int chooseShrinkCapacity ( int size , doubl...
return nextPrime ( Math . max ( size + 1 , ( int ) ( ( 4 * size / ( minLoad + 3 * maxLoad ) ) ) ) ) ;
public class SloppyMath { /** * Exponentiation like we learned in grade school : * multiply b by itself e times . Uses power of two trick . * e must be nonnegative ! ! ! no checking ! ! ! * @ param b base * @ param e exponent * @ return b ^ e */ public static double intPow ( double b , int e ) { } }
double result = 1.0 ; double currPow = b ; while ( e > 0 ) { if ( ( e & 1 ) != 0 ) { result *= currPow ; } currPow *= currPow ; e >>= 1 ; } return result ;
public class SFSUtilities { /** * Return the SRID of the first geometry column of the input table * @ param connection Active connection * @ param table Table name * @ return The SRID of the first geometry column * @ throws SQLException */ public static int getSRID ( Connection connection , TableLocation table ...
ResultSet geomResultSet = getGeometryColumnsView ( connection , table . getCatalog ( ) , table . getSchema ( ) , table . getTable ( ) ) ; int srid = 0 ; while ( geomResultSet . next ( ) ) { srid = geomResultSet . getInt ( "srid" ) ; break ; } geomResultSet . close ( ) ; return srid ;
public class PrettyPrinter { /** * Pretty - print a single object . */ private static Object formatObject ( Object object ) { } }
if ( object instanceof Class ) { return formatArg ( ( Class < ? > ) object ) ; } else if ( object instanceof Key ) { return formatArg ( ( Key < ? > ) object ) ; } else if ( object instanceof List ) { List < ? > list = ( List < ? > ) object ; // Empirically check if this is a List < Dependency > . boolean allDependencie...
public class AmazonEC2Client { /** * Describes the specified Dedicated Hosts or all your Dedicated Hosts . * The results describe only the Dedicated Hosts in the Region you ' re currently using . All listed instances consume * capacity on your Dedicated Host . Dedicated Hosts that have recently been released are li...
request = beforeClientExecution ( request ) ; return executeDescribeHosts ( request ) ;
public class ThemeUtil { /** * Applies one or more theme classes to a component . * @ param component Component to receive the theme classes . * @ param themeClasses A list of theme classes to apply . */ public static void applyThemeClass ( BaseUIComponent component , IThemeClass ... themeClasses ) { } }
StringBuilder sb = new StringBuilder ( ) ; for ( IThemeClass themeClass : themeClasses ) { String cls = themeClass == null ? null : themeClass . getThemeClass ( ) ; if ( cls != null ) { sb . append ( sb . length ( ) > 0 ? " " : "" ) . append ( themeClass . getThemeClass ( ) ) ; } } component . addClass ( sb . toString ...
public class MatrixPrinter { /** * Prints the matrix as specified by the supplied < code > Control < / code > instance . The matrix * elements are formatted using the specified * < a href = " http : / / java . sun . com / javase / 6 / docs / api / java / util / Formatter . html # syntax " > format * string < / a ...
print ( m , control , new FormatterNumberFormatter ( format , locale ) ) ;
public class LongStreamEx { /** * Returns a new { @ code LongStreamEx } which is a concatenation of this * stream and the stream containing supplied values * This is a < a href = " package - summary . html # StreamOps " > quasi - intermediate * operation < / a > . * @ param values the values to append to the st...
if ( values . length == 0 ) return this ; return new LongStreamEx ( LongStream . concat ( stream ( ) , LongStream . of ( values ) ) , context ) ;
public class CommonSteps { /** * Checks if html input text contains expected value . * @ param page * The concerned page of elementName * @ param elementName * The key of the PageElement to check * @ param textOrKey * Is the new data ( text or text in context ( after a save ) ) * @ param conditions * li...
if ( ! checkInputText ( Page . getInstance ( page ) . getPageElementByKey ( '-' + elementName ) , textOrKey ) ) { checkText ( Page . getInstance ( page ) . getPageElementByKey ( '-' + elementName ) , textOrKey ) ; }
public class DestinationManager { /** * < p > This method is used to alter a destination that is localised on this messaging * engine . < / p > * @ param destinationLocalizationDefinition * @ param destinationDefinition * @ return * @ throws SIIncorrectCallException * @ throws SIMPDestinationAlreadyExistsEx...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "alterDestinationLocalization" , new Object [ ] { destinationDefinition , destinationLocalizationDefinition , destinationLocalizingMEs } ) ; // Create a local UOW LocalTransaction transaction = txManager . createLocalTransac...
public class EntityInfo { /** * 获取Entity的QUERY SQL * @ param bean Entity对象 * @ return String */ public String getQueryNamesPrepareSQL ( T bean ) { } }
if ( this . tableStrategy == null ) return queryNamesPrepareSQL ; return queryNamesPrepareSQL . replace ( "${newtable}" , getTable ( bean ) ) ;
public class Config { /** * Read config object stored in JSON format from < code > URL < / code > * @ param url object * @ return config * @ throws IOException error */ public static Config fromJSON ( URL url ) throws IOException { } }
ConfigSupport support = new ConfigSupport ( ) ; return support . fromJSON ( url , Config . class ) ;
public class CliFrontend { private JobID parseJobId ( String jobIdString ) throws CliArgsException { } }
if ( jobIdString == null ) { throw new CliArgsException ( "Missing JobId" ) ; } final JobID jobId ; try { jobId = JobID . fromHexString ( jobIdString ) ; } catch ( IllegalArgumentException e ) { throw new CliArgsException ( e . getMessage ( ) ) ; } return jobId ;
public class PlatformDescription { /** * The frameworks supported by the platform . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setFrameworks ( java . util . Collection ) } or { @ link # withFrameworks ( java . util . Collection ) } if you want to * ove...
if ( this . frameworks == null ) { setFrameworks ( new com . amazonaws . internal . SdkInternalList < PlatformFramework > ( frameworks . length ) ) ; } for ( PlatformFramework ele : frameworks ) { this . frameworks . add ( ele ) ; } return this ;
public class PlNationalIdentificationNumberProvider { /** * This should be tested */ private int calculateSexCode ( Person . Sex sex ) { } }
return SEX_FIELDS [ baseProducer . randomInt ( SEX_FIELDS . length - 1 ) ] + ( sex == Person . Sex . MALE ? 1 : 0 ) ;
public class XSONByteArray { public void writeString ( String val ) { } }
int x = val . length ( ) ; // char length if ( ( x & 0xFFFFFF00 ) == 0 ) { byte [ ] buffer = getBuffer ( 2 ) ; buffer [ index ++ ] = XsonConst . STRING1 ; buffer [ index ++ ] = ( byte ) x ; } else if ( ( x & 0xFFFF0000 ) == 0 ) { byte [ ] buffer = getBuffer ( 3 ) ; buffer [ index ++ ] = XsonConst . STRING2 ; buffer [ i...