signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class Entity { /** * rapid patch */ private void allChildrenRecursive ( Entity e , List < Entity > result ) { } }
for ( Entity child : e . getChildren ( ) ) { result . add ( child ) ; allChildrenRecursive ( child , result ) ; }
public class FailSafePortalUrlBuilder { /** * / * ( non - Javadoc ) * @ see org . apereo . portal . url . IPortalUrlBuilder # getPortletUrlBuilder ( org . apereo . portal . portlet . om . IPortletWindowId ) */ @ Override public IPortletUrlBuilder getPortletUrlBuilder ( IPortletWindowId portletWindowId ) { } }
IPortletUrlBuilder portletUrlBuilder ; synchronized ( this . portletUrlBuilders ) { portletUrlBuilder = this . portletUrlBuilders . get ( portletWindowId ) ; if ( portletUrlBuilder == null ) { portletUrlBuilder = new FailSafePortletUrlBuilder ( portletWindowId , this ) ; this . portletUrlBuilders . put ( portletWindowId , portletUrlBuilder ) ; } } return portletUrlBuilder ;
public class KeyVaultClientBaseImpl { /** * Gets the specified deleted secret . * The Get Deleted Secret operation returns the specified deleted secret along with its attributes . This operation requires the secrets / get permission . * @ param vaultBaseUrl The vault name , for example https : / / myvault . vault . azure . net . * @ param secretName The name of the secret . * @ param serviceCallback the async ServiceCallback to handle successful and failed responses . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the { @ link ServiceFuture } object */ public ServiceFuture < DeletedSecretBundle > getDeletedSecretAsync ( String vaultBaseUrl , String secretName , final ServiceCallback < DeletedSecretBundle > serviceCallback ) { } }
return ServiceFuture . fromResponse ( getDeletedSecretWithServiceResponseAsync ( vaultBaseUrl , secretName ) , serviceCallback ) ;
public class DistributionTable { /** * DistributionTableFilterEvent . * @ param filterEvent * as instance of { @ link RefreshDistributionTableByFilterEvent } */ @ EventBusListenerMethod ( scope = EventScope . UI , filter = OnlyEventsFromDeploymentViewFilter . class ) void onEvent ( final RefreshDistributionTableByFilterEvent filterEvent ) { } }
UI . getCurrent ( ) . access ( this :: refreshFilter ) ;
public class Stage { /** * Answers the { @ code T } protocol of the newly created { @ code Actor } that implements the { @ code protocol } and * that will be assigned the specific { @ code address } . * @ param < T > the protocol type * @ param protocol the { @ code Class < T > } protocol * @ param definition the { @ code Definition } used to initialize the newly created { @ code Actor } * @ param address the { @ code Address } to assign to the newly created { @ code Actor } * @ return T */ public < T > T actorFor ( final Class < T > protocol , final Definition definition , final Address address ) { } }
final Address actorAddress = this . allocateAddress ( definition , address ) ; final Mailbox actorMailbox = this . allocateMailbox ( definition , actorAddress , null ) ; final ActorProtocolActor < T > actor = actorProtocolFor ( protocol , definition , definition . parentOr ( world . defaultParent ( ) ) , actorAddress , actorMailbox , definition . supervisor ( ) , definition . loggerOr ( world . defaultLogger ( ) ) ) ; return actor . protocolActor ( ) ;
public class CommonsValidatorGenerator { /** * Returns the opening script element and some initial javascript . */ protected String getJavascriptBegin ( String jsFormName , String methods ) { } }
StringBuffer sb = new StringBuffer ( ) ; String name = jsFormName . replace ( '/' , '_' ) ; // remove any ' / ' characters name = jsFormName . substring ( 0 , 1 ) . toUpperCase ( ) + jsFormName . substring ( 1 , jsFormName . length ( ) ) ; sb . append ( "\n var bCancel = false; \n\n" ) ; sb . append ( " function validate" + name + "(form) { \n" ) ; sb . append ( " if (bCancel) { \n" ) ; sb . append ( " return true; \n" ) ; sb . append ( " } else { \n" ) ; // Always return true if there aren ' t any Javascript validation methods if ( ( methods == null ) || ( methods . length ( ) == 0 ) ) { sb . append ( " return true; \n" ) ; } else { sb . append ( " var formValidationResult; \n" ) ; sb . append ( " formValidationResult = " + methods + "; \n" ) ; if ( methods . indexOf ( "&&" ) >= 0 ) { sb . append ( " return (formValidationResult); \n" ) ; } else { // Making Sure that Bitwise operator works : sb . append ( " return (formValidationResult == 1); \n" ) ; } } sb . append ( " } \n" ) ; sb . append ( " } \n\n" ) ; return sb . toString ( ) ;
public class LoadBalancerFrontendIPConfigurationsInner { /** * Gets load balancer frontend IP configuration . * @ param resourceGroupName The name of the resource group . * @ param loadBalancerName The name of the load balancer . * @ param frontendIPConfigurationName The name of the frontend IP configuration . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the FrontendIPConfigurationInner object */ public Observable < FrontendIPConfigurationInner > getAsync ( String resourceGroupName , String loadBalancerName , String frontendIPConfigurationName ) { } }
return getWithServiceResponseAsync ( resourceGroupName , loadBalancerName , frontendIPConfigurationName ) . map ( new Func1 < ServiceResponse < FrontendIPConfigurationInner > , FrontendIPConfigurationInner > ( ) { @ Override public FrontendIPConfigurationInner call ( ServiceResponse < FrontendIPConfigurationInner > response ) { return response . body ( ) ; } } ) ;
public class ComponentExposedTypeGenerator { /** * Process data fields from the { @ link IsVueComponent } Class . */ private void processData ( ) { } }
List < VariableElement > dataFields = ElementFilter . fieldsIn ( component . getEnclosedElements ( ) ) . stream ( ) . filter ( field -> field . getAnnotation ( Data . class ) != null ) . collect ( Collectors . toList ( ) ) ; if ( dataFields . isEmpty ( ) ) { return ; } dataFields . forEach ( collectionFieldsValidator :: validateComponentDataField ) ; this . fieldsToMarkAsData . addAll ( dataFields ) ;
public class WhileyFileParser { /** * Parse a quantifier expression , which is of the form : * < pre > * QuantExpr : : = ( " no " | " some " | " all " ) * Identifier " in " Expr ( ' , ' Identifier " in " Expr ) + * ' | ' LogicalExpr * < / pre > * @ param scope * The enclosing scope for this statement , which determines the * set of visible ( i . e . declared ) variables and also the current * indentation level . * @ param terminated * This indicates that the expression is known to be terminated * ( or not ) . An expression that ' s known to be terminated is one * which is guaranteed to be followed by something . This is * important because it means that we can ignore any newline * characters encountered in parsing this expression , and that * we ' ll never overrun the end of the expression ( i . e . because * there ' s guaranteed to be something which terminates this * expression ) . A classic situation where terminated is true is * when parsing an expression surrounded in braces . In such case , * we know the right - brace will always terminate this expression . * @ return */ private Expr parseQuantifierExpression ( Token lookahead , EnclosingScope scope , boolean terminated ) { } }
int start = index - 1 ; scope = scope . newEnclosingScope ( ) ; match ( LeftCurly ) ; // Parse one or more source variables / expressions Tuple < Decl . Variable > parameters = parseQuantifierParameters ( scope ) ; // Parse condition over source variables Expr condition = parseLogicalExpression ( scope , true ) ; match ( RightCurly ) ; Expr . Quantifier qf ; if ( lookahead . kind == All ) { qf = new Expr . UniversalQuantifier ( parameters , condition ) ; } else { qf = new Expr . ExistentialQuantifier ( parameters , condition ) ; } return annotateSourceLocation ( qf , start ) ;
public class PdfResources { /** * methods */ void add ( PdfName key , PdfDictionary resource ) { } }
if ( resource . size ( ) == 0 ) return ; PdfDictionary dic = getAsDict ( key ) ; if ( dic == null ) put ( key , resource ) ; else dic . putAll ( resource ) ;
public class DataCubeAPI { /** * 获取免费券数据 < br > * 1 . 该接口目前仅支持拉取免费券 ( 优惠券 、 团购券 、 折扣券 、 礼品券 ) 的卡券相关数据 , 暂不支持特殊票券 ( 电影票 、 会议门票 、 景区门票 、 飞机票 ) 数据 。 < br > * 2 . 查询时间区间需 & lt ; = 62天 , 否则报错 ; < br > * 3 . 传入时间格式需严格参照示例填写如 ” 2015-06-15 ” , 否则报错 ; < br > * 4 . 该接口只能拉取非当天的数据 , 不能拉取当天的卡券数据 , 否则报错 。 < br > * @ param access _ token access _ token * @ param freeCardCube freeCardCube * @ return result */ public static CardInfoResult getCardCardInfo ( String access_token , CardInfo freeCardCube ) { } }
return getCardCardInfo ( access_token , JsonUtil . toJSONString ( freeCardCube ) ) ;
public class RangeBigInteger { /** * Return the intersection between this range and the given range . */ public RangeBigInteger intersect ( RangeBigInteger r ) { } }
if ( min . compareTo ( r . max ) > 0 ) return null ; if ( max . compareTo ( r . min ) < 0 ) return null ; return new RangeBigInteger ( min . compareTo ( r . min ) <= 0 ? r . min : min , max . compareTo ( r . max ) <= 0 ? max : r . max ) ;
public class VirtualMachineScaleSetVMsInner { /** * Updates a virtual machine of a VM scale set . * @ param resourceGroupName The name of the resource group . * @ param vmScaleSetName The name of the VM scale set where the extension should be create or updated . * @ param instanceId The instance ID of the virtual machine . * @ param parameters Parameters supplied to the Update Virtual Machine Scale Sets VM operation . * @ param serviceCallback the async ServiceCallback to handle successful and failed responses . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the { @ link ServiceFuture } object */ public ServiceFuture < VirtualMachineScaleSetVMInner > updateAsync ( String resourceGroupName , String vmScaleSetName , String instanceId , VirtualMachineScaleSetVMInner parameters , final ServiceCallback < VirtualMachineScaleSetVMInner > serviceCallback ) { } }
return ServiceFuture . fromResponse ( updateWithServiceResponseAsync ( resourceGroupName , vmScaleSetName , instanceId , parameters ) , serviceCallback ) ;
public class Spies { /** * Proxies a binary predicate spying for result . * @ param < T1 > the predicate first parameter type * @ param < T2 > the predicate second parameter type * @ param predicate the predicate that will be spied * @ param result a box that will be containing spied result * @ return the proxied predicate */ public static < T1 , T2 > BiPredicate < T1 , T2 > spyRes ( BiPredicate < T1 , T2 > predicate , Box < Boolean > result ) { } }
return spy ( predicate , result , Box . < T1 > empty ( ) , Box . < T2 > empty ( ) ) ;
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getEBC ( ) { } }
if ( ebcEClass == null ) { ebcEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 234 ) ; } return ebcEClass ;
public class AliasFactory { /** * Create an alias instance for the given class , parent and path * @ param < A > * @ param cl type for alias * @ param path underlying expression * @ return alias instance */ public < A > A createAliasForProperty ( Class < A > cl , Expression < ? > path ) { } }
return createProxy ( cl , path ) ;
public class BigDecimalUtil { /** * Convenience method to create a BigDecimal with a String , can be statically imported . * @ param val a string representing the BigDecimal * @ return the new BigDecimal */ public static BigDecimal bd ( final String val ) { } }
return val != null && val . length ( ) > 0 ? new BigDecimal ( val ) : null ;
public class ConfigRenderOptions { /** * Returns options with JSON toggled . JSON means that HOCON extensions * ( omitting commas , quotes for example ) won ' t be used . However , whether to * use comments is controlled by the separate { @ link # setComments ( boolean ) } * and { @ link # setOriginComments ( boolean ) } options . So if you enable * comments you will get invalid JSON despite setting this to true . * @ param value * true to include non - JSON extensions in the render * @ return options with requested setting for JSON */ public ConfigRenderOptions setJson ( boolean value ) { } }
if ( value == json ) return this ; else return new ConfigRenderOptions ( originComments , comments , formatted , value ) ;
public class StreamMessageHeader { /** * Add value to additional header . * @ param key key * @ param value value */ public void addAdditionalHeader ( String key , String value ) { } }
if ( this . additionalHeader == null ) { this . additionalHeader = Maps . newLinkedHashMap ( ) ; } this . additionalHeader . put ( key , value ) ;
public class CustomTrust { /** * Returns an input stream containing one or more certificate PEM files . This implementation just * embeds the PEM files in Java strings ; most applications will instead read this from a resource * file that gets bundled with the application . */ private InputStream trustedCertificatesInputStream ( ) { } }
// PEM files for root certificates of Comodo and Entrust . These two CAs are sufficient to view // https : / / publicobject . com ( Comodo ) and https : / / squareup . com ( Entrust ) . But they aren ' t // sufficient to connect to most HTTPS sites including https : / / godaddy . com and https : / / visa . com . // Typically developers will need to get a PEM file from their organization ' s TLS administrator . String comodoRsaCertificationAuthority = "" + "-----BEGIN CERTIFICATE-----\n" + "MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCB\n" + "hTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G\n" + "A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNV\n" + "BAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTAwMTE5\n" + "MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0IxGzAZBgNVBAgT\n" + "EkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR\n" + "Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNh\n" + "dGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCR\n" + "6FSS0gpWsawNJN3Fz0RndJkrN6N9I3AAcbxT38T6KhKPS38QVr2fcHK3YX/JSw8X\n" + "pz3jsARh7v8Rl8f0hj4K+j5c+ZPmNHrZFGvnnLOFoIJ6dq9xkNfs/Q36nGz637CC\n" + "9BR++b7Epi9Pf5l/tfxnQ3K9DADWietrLNPtj5gcFKt+5eNu/Nio5JIk2kNrYrhV\n" + "/erBvGy2i/MOjZrkm2xpmfh4SDBF1a3hDTxFYPwyllEnvGfDyi62a+pGx8cgoLEf\n" + "Zd5ICLqkTqnyg0Y3hOvozIFIQ2dOciqbXL1MGyiKXCJ7tKuY2e7gUYPDCUZObT6Z\n" + "+pUX2nwzV0E8jVHtC7ZcryxjGt9XyD+86V3Em69FmeKjWiS0uqlWPc9vqv9JWL7w\n" + "qP/0uK3pN/u6uPQLOvnoQ0IeidiEyxPx2bvhiWC4jChWrBQdnArncevPDt09qZah\n" + "SL0896+1DSJMwBGB7FY79tOi4lu3sgQiUpWAk2nojkxl8ZEDLXB0AuqLZxUpaVIC\n" + "u9ffUGpVRr+goyhhf3DQw6KqLCGqR84onAZFdr+CGCe01a60y1Dma/RMhnEw6abf\n" + "Fobg2P9A3fvQQoh/ozM6LlweQRGBY84YcWsr7KaKtzFcOmpH4MN5WdYgGq/yapiq\n" + "crxXStJLnbsQ/LBMQeXtHT1eKJ2czL+zUdqnR+WEUwIDAQABo0IwQDAdBgNVHQ4E\n" + "FgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB\n" + "/wQFMAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAArx1UaEt65Ru2yyTUEUAJNMnMvl\n" + "wFTPoCWOAvn9sKIN9SCYPBMtrFaisNZ+EZLpLrqeLppysb0ZRGxhNaKatBYSaVqM\n" + "4dc+pBroLwP0rmEdEBsqpIt6xf4FpuHA1sj+nq6PK7o9mfjYcwlYRm6mnPTXJ9OV\n" + "2jeDchzTc+CiR5kDOF3VSXkAKRzH7JsgHAckaVd4sjn8OoSgtZx8jb8uk2Intzna\n" + "FxiuvTwJaP+EmzzV1gsD41eeFPfR60/IvYcjt7ZJQ3mFXLrrkguhxuhoqEwWsRqZ\n" + "CuhTLJK7oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiK\n" + "boHGhfKppC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmcke\n" + "jkk9u+UJueBPSZI9FoJAzMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yL\n" + "S0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHqZJx64SIDqZxubw5lT2yHh17zbqD5daWb\n" + "QOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk527RH89elWsn2/x20Kk4yl\n" + "0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7ILaZRfyHB\n" + "NVOFBkpdn627G190\n" + "-----END CERTIFICATE-----\n" ; String entrustRootCertificateAuthority = "" + "-----BEGIN CERTIFICATE-----\n" + "MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMC\n" + "VVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0\n" + "Lm5ldC9DUFMgaXMgaW5jb3Jwb3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMW\n" + "KGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsGA1UEAxMkRW50cnVzdCBSb290IENl\n" + "cnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0MloXDTI2MTEyNzIw\n" + "NTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMTkw\n" + "NwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSBy\n" + "ZWZlcmVuY2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNV\n" + "BAMTJEVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJ\n" + "KoZIhvcNAQEBBQADggEPADCCAQoCggEBALaVtkNC+sZtKm9I35RMOVcF7sN5EUFo\n" + "Nu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYszA9u3g3s+IIRe7bJWKKf4\n" + "4LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOwwCj0Yzfv9\n" + "KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGI\n" + "rb68j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi\n" + "94DkZfs0Nw4pgHBNrziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOB\n" + "sDCBrTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAi\n" + "gA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1MzQyWjAfBgNVHSMEGDAWgBRo\n" + "kORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DHhmak8fdLQ/uE\n" + "vW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA\n" + "A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9t\n" + "O1KzKtvn1ISMY/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6Zua\n" + "AGAT/3B+XxFNSRuzFVJ7yVTav52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP\n" + "9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTSW3iDVuycNsMm4hH2Z0kdkquM++v/\n" + "eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0tHuu2guQOHXvgR1m\n" + "0vdXcDazv/wor3ElhVsT/h5/WrQ8\n" + "-----END CERTIFICATE-----\n" ; return new Buffer ( ) . writeUtf8 ( comodoRsaCertificationAuthority ) . writeUtf8 ( entrustRootCertificateAuthority ) . inputStream ( ) ;
public class AppProfile { /** * Wraps a protobuf response . * < p > This method is considered an internal implementation detail and not meant to be used by * applications . */ @ InternalApi public static AppProfile fromProto ( @ Nonnull com . google . bigtable . admin . v2 . AppProfile proto ) { } }
return new AppProfile ( proto ) ;
public class VueComponentOptions { /** * Add a computed property to this ComponentOptions . If the computed has both a getter and a * setter , this will be called twice , once for each . * @ param javaMethod Function pointer to the method in the { @ link IsVueComponent } * @ param computedPropertyName Name of the computed property in the Template and the * ComponentOptions * @ param kind Kind of the computed method ( getter or setter ) */ @ JsOverlay public final void addJavaComputed ( Function javaMethod , String computedPropertyName , ComputedKind kind ) { } }
ComputedOptions computedDefinition = getComputedOptions ( computedPropertyName ) ; if ( computedDefinition == null ) { computedDefinition = new ComputedOptions ( ) ; addComputedOptions ( computedPropertyName , computedDefinition ) ; } if ( kind == ComputedKind . GETTER ) { computedDefinition . get = javaMethod ; } else if ( kind == ComputedKind . SETTER ) { computedDefinition . set = javaMethod ; }
public class GraphicUtils { /** * Draws an arrow between two points ( specified by their coordinates ) using the specified weight . < br > * The arrow is leading from point < code > from < / code > to point < code > to < / code > . * @ param g Graphics context * @ param x0 X coordinate of arrow starting point * @ param y0 Y coordinate of arrow starting point * @ param x1 X coordinate of arrow ending point * @ param y1 Y coordinate of arrow ending point * @ param weight Arrow weight */ public static void drawArrow ( Graphics g , double x0 , double y0 , double x1 , double y1 , double weight ) { } }
int ix2 , iy2 , ix3 , iy3 ; double sinPhi , cosPhi , dx , dy , xk1 , yk1 , xk2 , yk2 , s ; dx = x1 - x0 ; dy = y1 - y0 ; int maxArrowWidth = 10 ; // arrow length s = Math . sqrt ( dy * dy + dx * dx ) ; // arrow head length int headLength = ( int ) Math . round ( s * 0.5 ) ; double arrowAngle = Math . atan ( ( double ) ( weight * maxArrowWidth ) / headLength ) ; double arrowAngle2 = Math . atan ( ( double ) maxArrowWidth / headLength ) ; sinPhi = dy / s ; // Winkel des Pfeils cosPhi = dx / s ; // mit der X - Achse if ( s < headLength ) { // Der Pfeil x0 = x1 - headLength * cosPhi ; // . . darf nicht kuerzer y0 = y1 - headLength * sinPhi ; // . . als die Spitze sein } xk1 = - headLength * Math . cos ( arrowAngle ) ; // Koordinaten yk1 = headLength * Math . sin ( arrowAngle ) ; // . . der Pfeilspitze xk2 = - headLength * Math . cos ( arrowAngle2 ) ; // Koordinaten yk2 = headLength * Math . sin ( arrowAngle2 ) ; ix2 = ( int ) ( x1 + xk1 * cosPhi - yk1 * sinPhi ) ; // Pfeilspitze iy2 = ( int ) ( y1 + xk1 * sinPhi + yk1 * cosPhi ) ; // . . um Winkel Phi ix3 = ( int ) ( x1 + xk1 * cosPhi + yk1 * sinPhi ) ; // . . rotieren iy3 = ( int ) ( y1 + xk1 * sinPhi - yk1 * cosPhi ) ; // . . und translatieren Color c = g . getColor ( ) ; g . setColor ( Color . black ) ; g . drawLine ( ( int ) x0 , ( int ) y0 , ( int ) x1 , ( int ) y1 ) ; // Pfeilachse Polygon p = new Polygon ( ) ; p . addPoint ( ( int ) x1 , ( int ) y1 ) ; p . addPoint ( ( int ) ix2 , ( int ) iy2 ) ; p . addPoint ( ( int ) ix3 , ( int ) iy3 ) ; g . setColor ( c ) ; g . fillPolygon ( p ) ; g . setColor ( Color . black ) ; g . drawPolygon ( p ) ; g . drawLine ( ( int ) ( x1 + xk2 * cosPhi - yk2 * sinPhi ) , ( int ) ( y1 + xk2 * sinPhi + yk2 * cosPhi ) , ( int ) ( x1 + xk2 * cosPhi + yk2 * sinPhi ) , iy3 = ( int ) ( y1 + xk2 * sinPhi - yk2 * cosPhi ) ) ;
public class LanguageSearchParameter { /** * Gets the languages value for this LanguageSearchParameter . * @ return languages * A list of { @ link Language } s indicating the desired languages * being targeted in the results . * < span class = " constraint ContentsDistinct " > This * field must contain distinct elements . < / span > * < span class = " constraint ContentsNotNull " > This * field must not contain { @ code null } elements . < / span > * < span class = " constraint NotEmpty " > This field must * contain at least one element . < / span > * < span class = " constraint Required " > This field is * required and should not be { @ code null } . < / span > */ public com . google . api . ads . adwords . axis . v201809 . cm . Language [ ] getLanguages ( ) { } }
return languages ;
public class ProvFactory { /** * Creates a new { @ link Entity } with provided identifier and label * @ param id a { @ link QualifiedName } for the entity * @ param label a String for the label property ( see { @ link HasLabel # getLabel ( ) } * @ return an object of type { @ link Entity } */ public Entity newEntity ( QualifiedName id , String label ) { } }
Entity res = newEntity ( id ) ; if ( label != null ) res . getLabel ( ) . add ( newInternationalizedString ( label ) ) ; return res ;
public class DescribeTimeBasedAutoScalingRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DescribeTimeBasedAutoScalingRequest describeTimeBasedAutoScalingRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( describeTimeBasedAutoScalingRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeTimeBasedAutoScalingRequest . getInstanceIds ( ) , INSTANCEIDS_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class JPAPersistenceManagerImpl { /** * @ return create and return the PSU . * @ throws Exception */ private synchronized PersistenceServiceUnit createPsu ( ) throws Exception { } }
if ( psu != null ) { return psu ; } // Load the PSU including the most recent entities . PersistenceServiceUnit retMe = createLatestPsu ( ) ; // If any tables are not up to the current code level , re - load the PSU with backleveled entities . int instanceVersion = getJobInstanceTableVersion ( retMe ) ; if ( instanceVersion < 3 ) { logger . fine ( "The GROUPNAMES column could not be found. The persistence service unit will exclude the V3 instance entity." ) ; retMe . close ( ) ; retMe = createPsu ( instanceVersion , MAX_EXECUTION_VERSION ) ; } int executionVersion = getJobExecutionTableVersion ( retMe ) ; if ( executionVersion < 2 ) { logger . fine ( "The JOBPARAMETERS table could not be found. The persistence service unit will exclude the V2 execution entity." ) ; retMe . close ( ) ; retMe = createPsu ( instanceVersion , executionVersion ) ; } // 222050 - Backout 205106 RemotablePartitionEntity . class . getName ( ) ) ; // Perform recovery immediately , before returning from this method , so that // other callers won ' t be able to access the PSU ( via getPsu ( ) ) until recovery is complete . new WSStartupRecoveryServiceImpl ( ) . setIPersistenceManagerService ( JPAPersistenceManagerImpl . this ) . setPersistenceServiceUnit ( retMe ) . recoverLocalJobsInInflightStates ( ) ; // 222050 - Backout 205106 . recoverLocalPartitionsInInflightStates ( ) ; // Make sure we assign psu before leaving the synchronized block . psu = retMe ; return psu ;
public class KiteTicker { /** * Returns length of packet by reading byte array values . */ private int getLengthFromByteArray ( byte [ ] bin ) { } }
ByteBuffer bb = ByteBuffer . wrap ( bin ) ; bb . order ( ByteOrder . BIG_ENDIAN ) ; return bb . getShort ( ) ;
public class PhaseOneApplication { /** * Process file arguments . */ private void processFiles ( ) { } }
String [ ] fileArgs = getOptionValues ( INFILE_SHORT_OPT ) ; final List < File > files = new ArrayList < File > ( fileArgs . length ) ; for ( final String fileArg : fileArgs ) { File file = new File ( fileArg ) ; if ( ! file . canRead ( ) ) { error ( INPUT_FILE_UNREADABLE + file ) ; } else { files . add ( file ) ; } } if ( files . size ( ) == 0 ) { error ( NO_DOCUMENT_FILES ) ; failUsage ( ) ; } // Create the directory artifact or fail artifactPath = createDirectoryArtifact ( outputDirectory , DIR_ARTIFACT ) ; processFiles ( files . toArray ( new File [ 0 ] ) ) ;
public class JaiDebug { /** * Dumps a single material property to stdout . * @ param property the property */ public static void dumpMaterialProperty ( AiMaterial . Property property ) { } }
System . out . print ( property . getKey ( ) + " " + property . getSemantic ( ) + " " + property . getIndex ( ) + ": " ) ; Object data = property . getData ( ) ; if ( data instanceof ByteBuffer ) { ByteBuffer buf = ( ByteBuffer ) data ; for ( int i = 0 ; i < buf . capacity ( ) ; i ++ ) { System . out . print ( Integer . toHexString ( buf . get ( i ) & 0xFF ) + " " ) ; } System . out . println ( ) ; } else { System . out . println ( data . toString ( ) ) ; }
public class SmileConverter { /** * Returns a dataset where the response column is numeric . E . g . to be used for a regression */ public AttributeDataset numericDataset ( String responseColName , String ... variablesColNames ) { } }
return dataset ( table . numberColumn ( responseColName ) , AttributeType . NUMERIC , table . columns ( variablesColNames ) ) ;
public class RandomGraphGenerator { /** * Create a new Graph which has the given graphName , size and dens . * @ param graphName the graph ' s name . * @ param size the graph ' s size . * @ param dens the graph ' s dens . * @ return the graph generated . */ public Graph generateRandomMMapGraph ( String graphName , int size , float dens ) { } }
Graph graph = null ; String dir = "graphs/MMap/" + graphName ; SerializationUtils . deleteMMapGraph ( dir ) ; graph = new Graph ( new MMapGraphStructure ( dir ) ) ; Random rand = new Random ( ) ; for ( int i = 0 ; i < size ; i ++ ) graph . addNode ( new Node ( i ) ) ; for ( int i = 0 ; i < size ; i ++ ) { for ( int j = i + 1 ; j < size ; j ++ ) { if ( rand . nextFloat ( ) < dens ) { int randomCost = Math . abs ( rand . nextInt ( 50 ) ) + 1 ; Edge e = new Edge ( i , j , randomCost ) ; e . setBidirectional ( rand . nextBoolean ( ) ) ; graph . addEdge ( e ) ; } } } return graph ;
public class MoRefHandler { /** * Method to retrieve properties of a { @ link ManagedObjectReference } * @ param entityMor { @ link ManagedObjectReference } of the entity * @ param props Array of properties to be looked up * @ return Map of the property name and its corresponding value * @ throws InvalidPropertyFaultMsg If a property does not exist * @ throws RuntimeFaultFaultMsg */ public Map < String , Object > entityProps ( ManagedObjectReference entityMor , String [ ] props ) throws InvalidPropertyFaultMsg , RuntimeFaultFaultMsg { } }
final HashMap < String , Object > retVal = new HashMap < > ( ) ; // Create PropertyFilterSpec using the PropertySpec and ObjectPec PropertyFilterSpec [ ] propertyFilterSpecs = { new PropertyFilterSpecBuilder ( ) . propSet ( // Create Property Spec new PropertySpecBuilder ( ) . all ( false ) . type ( entityMor . getType ( ) ) . pathSet ( props ) ) . objectSet ( // Now create Object Spec new ObjectSpecBuilder ( ) . obj ( entityMor ) ) } ; List < ObjectContent > objCont = vimPort . retrievePropertiesEx ( serviceContent . getPropertyCollector ( ) , Arrays . asList ( propertyFilterSpecs ) , new RetrieveOptions ( ) ) . getObjects ( ) ; if ( objCont != null ) { for ( ObjectContent oc : objCont ) { List < DynamicProperty > dps = oc . getPropSet ( ) ; for ( DynamicProperty dp : dps ) { retVal . put ( dp . getName ( ) , dp . getVal ( ) ) ; } } } return retVal ;
public class DescribeEgressOnlyInternetGatewaysResult { /** * Information about the egress - only internet gateways . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setEgressOnlyInternetGateways ( java . util . Collection ) } or * { @ link # withEgressOnlyInternetGateways ( java . util . Collection ) } if you want to override the existing values . * @ param egressOnlyInternetGateways * Information about the egress - only internet gateways . * @ return Returns a reference to this object so that method calls can be chained together . */ public DescribeEgressOnlyInternetGatewaysResult withEgressOnlyInternetGateways ( EgressOnlyInternetGateway ... egressOnlyInternetGateways ) { } }
if ( this . egressOnlyInternetGateways == null ) { setEgressOnlyInternetGateways ( new com . amazonaws . internal . SdkInternalList < EgressOnlyInternetGateway > ( egressOnlyInternetGateways . length ) ) ; } for ( EgressOnlyInternetGateway ele : egressOnlyInternetGateways ) { this . egressOnlyInternetGateways . add ( ele ) ; } return this ;
public class RequestInfo { /** * < pre > * Any data that was used to serve this request . For example , an encrypted * stack trace that can be sent back to the service provider for debugging . * < / pre > * < code > string serving _ data = 2 ; < / code > */ public java . lang . String getServingData ( ) { } }
java . lang . Object ref = servingData_ ; if ( ref instanceof java . lang . String ) { return ( java . lang . String ) ref ; } else { com . google . protobuf . ByteString bs = ( com . google . protobuf . ByteString ) ref ; java . lang . String s = bs . toStringUtf8 ( ) ; servingData_ = s ; return s ; }
public class Base64 { /** * Encodes a raw byte array into a BASE64 < code > String < / code > representation i accordance with RFC 2045. * @ param sArr The bytes to convert . If < code > null < / code > or length 0 an empty array will be returned . * @ param lineSep Optional " \ r \ n " after 76 characters , unless end of file . < br > * No line separator will be in breach of RFC 2045 which specifies max 76 per line but will be a * little faster . * @ return A BASE64 encoded array . Never < code > null < / code > . */ public final static String encodeToString ( byte [ ] sArr , boolean lineSep , boolean urlSafe ) { } }
// Reuse char [ ] since we can ' t create a String incrementally anyway and StringBuffer / Builder would be slower . return new String ( encodeToChar ( sArr , lineSep , urlSafe ) ) ;
public class CloudWatch { static CloudWatch getInstance ( String contextPath , String hostName ) { } }
final String cloudWatchNamespace = Parameter . CLOUDWATCH_NAMESPACE . getValue ( ) ; if ( cloudWatchNamespace != null ) { assert contextPath != null ; assert hostName != null ; if ( cloudWatchNamespace . startsWith ( "AWS/" ) ) { // http : / / docs . aws . amazon . com / AmazonCloudWatch / latest / APIReference / API _ PutMetricData . html throw new IllegalArgumentException ( "CloudWatch namespaces starting with \"AWS/\" are reserved for use by AWS products." ) ; } final String prefix = "javamelody." ; // contextPath est du genre " / testapp " // hostName est du genre " www . host . com " return new CloudWatch ( cloudWatchNamespace , prefix , contextPath , hostName ) ; } return null ;
public class MainFrame { /** * This method is called from within the constructor to * initialize the form . * WARNING : Do NOT modify this code . The content of this method is * always regenerated by the Form Editor . */ @ SuppressWarnings ( "unchecked" ) // < editor - fold defaultstate = " collapsed " desc = " Generated Code " > / / GEN - BEGIN : initComponents private void initComponents ( ) { } }
toolBar = new javax . swing . JToolBar ( ) ; settingsLoadDefaultsButton = new javax . swing . JButton ( ) ; settingsLoadButton = new javax . swing . JButton ( ) ; settingsSaveButton = new javax . swing . JButton ( ) ; toolBarSeparator1 = new javax . swing . JToolBar . Separator ( ) ; trackingStartButton = new javax . swing . JButton ( ) ; trackingStopButton = new javax . swing . JButton ( ) ; verticalSplitPane = new javax . swing . JSplitPane ( ) ; horizontalSplitPane = new javax . swing . JSplitPane ( ) ; beanTreeView = new org . openide . explorer . view . BeanTreeView ( ) ; propertySheetView = new org . openide . explorer . propertysheet . PropertySheetView ( ) ; statusLabel = new javax . swing . JLabel ( ) ; menuBar = new javax . swing . JMenuBar ( ) ; settingsMenu = new javax . swing . JMenu ( ) ; settingsLoadDefaultsMenuItem = new javax . swing . JMenuItem ( ) ; settingsLoadMenuItem = new javax . swing . JMenuItem ( ) ; settingsSaveMenuItem = new javax . swing . JMenuItem ( ) ; settingsSaveAsMenuItem = new javax . swing . JMenuItem ( ) ; trackingMenu = new javax . swing . JMenu ( ) ; trackingStartMenuItem = new javax . swing . JMenuItem ( ) ; trackingStopMenuItem = new javax . swing . JMenuItem ( ) ; helpMenu = new javax . swing . JMenu ( ) ; readmeMenuItem = new javax . swing . JMenuItem ( ) ; menuSeparator2 = new javax . swing . JSeparator ( ) ; aboutMenuItem = new javax . swing . JMenuItem ( ) ; setDefaultCloseOperation ( javax . swing . WindowConstants . EXIT_ON_CLOSE ) ; setTitle ( "ProCamTracker" ) ; toolBar . setFloatable ( false ) ; toolBar . setRollover ( true ) ; settingsLoadDefaultsButton . setIcon ( new javax . swing . ImageIcon ( getClass ( ) . getResource ( "/org/bytedeco/procamtracker/icons/cleanCurrentProject.gif" ) ) ) ; // NOI18N settingsLoadDefaultsButton . setToolTipText ( "Load Defaults" ) ; settingsLoadDefaultsButton . setFocusable ( false ) ; settingsLoadDefaultsButton . setHorizontalTextPosition ( javax . swing . SwingConstants . CENTER ) ; settingsLoadDefaultsButton . setVerticalTextPosition ( javax . swing . SwingConstants . BOTTOM ) ; settingsLoadDefaultsButton . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { settingsLoadDefaultsButtonActionPerformed ( evt ) ; } } ) ; toolBar . add ( settingsLoadDefaultsButton ) ; settingsLoadButton . setIcon ( new javax . swing . ImageIcon ( getClass ( ) . getResource ( "/org/bytedeco/procamtracker/icons/openProject.png" ) ) ) ; // NOI18N settingsLoadButton . setToolTipText ( "Load Settings" ) ; settingsLoadButton . setFocusable ( false ) ; settingsLoadButton . setHorizontalTextPosition ( javax . swing . SwingConstants . CENTER ) ; settingsLoadButton . setVerticalTextPosition ( javax . swing . SwingConstants . BOTTOM ) ; settingsLoadButton . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { settingsLoadButtonActionPerformed ( evt ) ; } } ) ; toolBar . add ( settingsLoadButton ) ; settingsSaveButton . setIcon ( new javax . swing . ImageIcon ( getClass ( ) . getResource ( "/org/bytedeco/procamtracker/icons/save.png" ) ) ) ; // NOI18N settingsSaveButton . setToolTipText ( "Save Settings" ) ; settingsSaveButton . setFocusable ( false ) ; settingsSaveButton . setHorizontalTextPosition ( javax . swing . SwingConstants . CENTER ) ; settingsSaveButton . setVerticalTextPosition ( javax . swing . SwingConstants . BOTTOM ) ; settingsSaveButton . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { settingsSaveButtonActionPerformed ( evt ) ; } } ) ; toolBar . add ( settingsSaveButton ) ; toolBar . add ( toolBarSeparator1 ) ; trackingStartButton . setIcon ( new javax . swing . ImageIcon ( getClass ( ) . getResource ( "/org/bytedeco/procamtracker/icons/runProject.png" ) ) ) ; // NOI18N trackingStartButton . setToolTipText ( "Start Tracking" ) ; trackingStartButton . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { trackingStartButtonActionPerformed ( evt ) ; } } ) ; toolBar . add ( trackingStartButton ) ; trackingStopButton . setIcon ( new javax . swing . ImageIcon ( getClass ( ) . getResource ( "/org/bytedeco/procamtracker/icons/stop.png" ) ) ) ; // NOI18N trackingStopButton . setToolTipText ( "Stop Tracking" ) ; trackingStopButton . setEnabled ( false ) ; trackingStopButton . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { trackingStopButtonActionPerformed ( evt ) ; } } ) ; toolBar . add ( trackingStopButton ) ; verticalSplitPane . setOrientation ( javax . swing . JSplitPane . VERTICAL_SPLIT ) ; verticalSplitPane . setResizeWeight ( 0.6 ) ; horizontalSplitPane . setResizeWeight ( 0.5 ) ; beanTreeView . setBorder ( javax . swing . BorderFactory . createEtchedBorder ( ) ) ; horizontalSplitPane . setLeftComponent ( beanTreeView ) ; propertySheetView . setBorder ( javax . swing . BorderFactory . createEtchedBorder ( ) ) ; propertySheetView . setDescriptionAreaVisible ( false ) ; try { propertySheetView . setSortingMode ( PropertySheetView . SORTED_BY_NAMES ) ; } catch ( java . beans . PropertyVetoException e1 ) { e1 . printStackTrace ( ) ; } horizontalSplitPane . setRightComponent ( propertySheetView ) ; verticalSplitPane . setLeftComponent ( horizontalSplitPane ) ; statusLabel . setText ( "Status" ) ; statusLabel . setBorder ( javax . swing . BorderFactory . createEmptyBorder ( 0 , 5 , 5 , 5 ) ) ; settingsMenu . setMnemonic ( 'E' ) ; settingsMenu . setText ( "Settings" ) ; settingsLoadDefaultsMenuItem . setMnemonic ( 'D' ) ; settingsLoadDefaultsMenuItem . setText ( "Load Defaults" ) ; settingsLoadDefaultsMenuItem . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { settingsLoadDefaultsMenuItemActionPerformed ( evt ) ; } } ) ; settingsMenu . add ( settingsLoadDefaultsMenuItem ) ; settingsLoadMenuItem . setMnemonic ( 'L' ) ; settingsLoadMenuItem . setText ( "Load..." ) ; settingsLoadMenuItem . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { settingsLoadMenuItemActionPerformed ( evt ) ; } } ) ; settingsMenu . add ( settingsLoadMenuItem ) ; settingsSaveMenuItem . setMnemonic ( 'S' ) ; settingsSaveMenuItem . setText ( "Save" ) ; settingsSaveMenuItem . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { settingsSaveMenuItemActionPerformed ( evt ) ; } } ) ; settingsMenu . add ( settingsSaveMenuItem ) ; settingsSaveAsMenuItem . setMnemonic ( 'A' ) ; settingsSaveAsMenuItem . setText ( "Save As..." ) ; settingsSaveAsMenuItem . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { settingsSaveAsMenuItemActionPerformed ( evt ) ; } } ) ; settingsMenu . add ( settingsSaveAsMenuItem ) ; menuBar . add ( settingsMenu ) ; trackingMenu . setMnemonic ( 'T' ) ; trackingMenu . setText ( "Tracking" ) ; trackingStartMenuItem . setMnemonic ( 'T' ) ; trackingStartMenuItem . setText ( "Start " ) ; trackingStartMenuItem . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { trackingStartMenuItemActionPerformed ( evt ) ; } } ) ; trackingMenu . add ( trackingStartMenuItem ) ; trackingStopMenuItem . setMnemonic ( 'O' ) ; trackingStopMenuItem . setText ( "Stop " ) ; trackingStopMenuItem . setEnabled ( false ) ; trackingStopMenuItem . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { trackingStopMenuItemActionPerformed ( evt ) ; } } ) ; trackingMenu . add ( trackingStopMenuItem ) ; menuBar . add ( trackingMenu ) ; helpMenu . setMnemonic ( 'H' ) ; helpMenu . setText ( "Help" ) ; readmeMenuItem . setMnemonic ( 'R' ) ; readmeMenuItem . setText ( "README" ) ; readmeMenuItem . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { readmeMenuItemActionPerformed ( evt ) ; } } ) ; helpMenu . add ( readmeMenuItem ) ; helpMenu . add ( menuSeparator2 ) ; aboutMenuItem . setMnemonic ( 'A' ) ; aboutMenuItem . setText ( "About" ) ; aboutMenuItem . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { aboutMenuItemActionPerformed ( evt ) ; } } ) ; helpMenu . add ( aboutMenuItem ) ; menuBar . add ( helpMenu ) ; setJMenuBar ( menuBar ) ; javax . swing . GroupLayout layout = new javax . swing . GroupLayout ( getContentPane ( ) ) ; getContentPane ( ) . setLayout ( layout ) ; layout . setHorizontalGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING ) . addComponent ( toolBar , javax . swing . GroupLayout . DEFAULT_SIZE , 500 , Short . MAX_VALUE ) . addComponent ( verticalSplitPane , javax . swing . GroupLayout . DEFAULT_SIZE , 500 , Short . MAX_VALUE ) . addComponent ( statusLabel , javax . swing . GroupLayout . DEFAULT_SIZE , 500 , Short . MAX_VALUE ) ) ; layout . setVerticalGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING ) . addGroup ( layout . createSequentialGroup ( ) . addComponent ( toolBar , javax . swing . GroupLayout . PREFERRED_SIZE , javax . swing . GroupLayout . DEFAULT_SIZE , javax . swing . GroupLayout . PREFERRED_SIZE ) . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED ) . addComponent ( verticalSplitPane , javax . swing . GroupLayout . DEFAULT_SIZE , 350 , Short . MAX_VALUE ) . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED ) . addComponent ( statusLabel ) ) ) ; pack ( ) ;
public class UsagePlanKeyMarshaller { /** * Marshall the given parameter object . */ public void marshall ( UsagePlanKey usagePlanKey , ProtocolMarshaller protocolMarshaller ) { } }
if ( usagePlanKey == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( usagePlanKey . getId ( ) , ID_BINDING ) ; protocolMarshaller . marshall ( usagePlanKey . getType ( ) , TYPE_BINDING ) ; protocolMarshaller . marshall ( usagePlanKey . getValue ( ) , VALUE_BINDING ) ; protocolMarshaller . marshall ( usagePlanKey . getName ( ) , NAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class RoaringBitmap { /** * Add the value to the container ( set the value to " true " ) , whether it already appears or not . * @ param x integer value * @ return true if the added int wasn ' t already contained in the bitmap . False otherwise . */ public boolean checkedAdd ( final int x ) { } }
final short hb = Util . highbits ( x ) ; final int i = highLowContainer . getIndex ( hb ) ; if ( i >= 0 ) { Container c = highLowContainer . getContainerAtIndex ( i ) ; int oldCard = c . getCardinality ( ) ; // we need to keep the newContainer if a switch between containers type // occur , in order to get the new cardinality Container newCont = c . add ( Util . lowbits ( x ) ) ; highLowContainer . setContainerAtIndex ( i , newCont ) ; if ( newCont . getCardinality ( ) > oldCard ) { return true ; } } else { final ArrayContainer newac = new ArrayContainer ( ) ; highLowContainer . insertNewKeyValueAt ( - i - 1 , hb , newac . add ( Util . lowbits ( x ) ) ) ; return true ; } return false ;
public class BarChartTileSkin { /** * * * * * * Resizing * * * * * */ private void updateChart ( ) { } }
Platform . runLater ( ( ) -> { if ( tile . isSortedData ( ) ) { tile . getBarChartItems ( ) . sort ( Comparator . comparing ( BarChartItem :: getValue ) . reversed ( ) ) ; } List < BarChartItem > items = tile . getBarChartItems ( ) ; int noOfItems = items . size ( ) ; if ( noOfItems == 0 ) return ; double maxValue = tile . getMaxValue ( ) ; double maxY = height - size * 0.25 ; for ( int i = 0 ; i < noOfItems ; i ++ ) { BarChartItem item = items . get ( i ) ; double y = i * 0.175 * size ; // size * 0.18 + i * 0.175 * size ; if ( y < maxY ) { item . setMaxValue ( maxValue ) ; item . setManaged ( true ) ; item . setVisible ( true ) ; item . relocate ( 0 , y ) ; } else { item . setVisible ( false ) ; item . setManaged ( false ) ; } } } ) ;
public class ThreadLocalMappedDiagnosticContext { /** * Put a context value ( the < code > val < / code > parameter ) as identified with * the < code > key < / code > parameter into the current thread ' s context map . * Note that contrary to log4j , the < code > val < / code > parameter can be null . * If the current thread does not have a context map it is created as a side * effect of this call . * @ throws IllegalArgumentException in case the " key " parameter is null */ @ Override public void put ( String key , String val ) { } }
if ( key == null ) { throw new IllegalArgumentException ( "key cannot be null" ) ; } Map < String , String > map = inheritableThreadLocal . get ( ) ; if ( map == null ) { map = new HashMap < > ( ) ; inheritableThreadLocal . set ( map ) ; } map . put ( key , val ) ;
public class HttpClientStore { /** * Initialize */ public synchronized void init ( ) { } }
httpClientFactoryEmbed = new AsyncHttpClientFactoryEmbed ( ) ; map . put ( HttpClientType . EMBED_FAST , httpClientFactoryEmbed . getFastClient ( ) ) ; map . put ( HttpClientType . EMBED_SLOW , httpClientFactoryEmbed . getSlowClient ( ) ) ; // custom default are also the embed one ; unless a change map . put ( HttpClientType . CUSTOM_FAST , httpClientFactoryEmbed . getFastClient ( ) ) ; map . put ( HttpClientType . CUSTOM_SLOW , httpClientFactoryEmbed . getSlowClient ( ) ) ; // make sure to use the default fast setHttpClientTypeCurrentDefault ( HttpClientType . EMBED_FAST ) ;
public class ReferenceCollectingCallback { /** * For each node , update the block stack and reference collection * as appropriate . */ @ Override public void visit ( NodeTraversal t , Node n , Node parent ) { } }
if ( n . isName ( ) || n . isImportStar ( ) || ( n . isStringKey ( ) && ! n . hasChildren ( ) ) ) { if ( ( parent . isImportSpec ( ) && n != parent . getLastChild ( ) ) || ( parent . isExportSpec ( ) && n != parent . getFirstChild ( ) ) ) { // The n in ` import { n as x } ` or ` export { x as n } ` are not references , even though // they are represented in the AST as NAME nodes . return ; } Var v = t . getScope ( ) . getVar ( n . getString ( ) ) ; if ( v != null ) { if ( varFilter . apply ( v ) ) { addReference ( v , new Reference ( n , t , peek ( blockStack ) ) ) ; } if ( v . getParentNode ( ) != null && NodeUtil . isHoistedFunctionDeclaration ( v . getParentNode ( ) ) // If we ' re only traversing a narrow scope , do not try to climb outside . && ( narrowScope == null || narrowScope . getDepth ( ) <= v . getScope ( ) . getDepth ( ) ) ) { outOfBandTraversal ( v ) ; } } } if ( isBlockBoundary ( n , parent ) ) { pop ( blockStack ) ; }
public class ApplicationDefinition { /** * Indicate whether or not this application tables to be implicitly created . * @ return True if this application tables to be implicitly created . */ public boolean allowsAutoTables ( ) { } }
String optValue = getOption ( CommonDefs . AUTO_TABLES ) ; return optValue != null && optValue . equalsIgnoreCase ( "true" ) ;
public class AmazonWorkMailClient { /** * Updates the primary email for a user , group , or resource . The current email is moved into the list of aliases ( or * swapped between an existing alias and the current primary email ) , and the email provided in the input is promoted * as the primary . * @ param updatePrimaryEmailAddressRequest * @ return Result of the UpdatePrimaryEmailAddress operation returned by the service . * @ throws DirectoryServiceAuthenticationFailedException * The directory service doesn ' t recognize the credentials supplied by WorkMail . * @ throws DirectoryUnavailableException * The directory on which you are trying to perform operations isn ' t available . * @ throws EmailAddressInUseException * The email address that you ' re trying to assign is already created for a different user , group , or * resource . * @ throws EntityNotFoundException * The identifier supplied for the user , group , or resource does not exist in your organization . * @ throws EntityStateException * You are performing an operation on a user , group , or resource that isn ' t in the expected state , such as * trying to delete an active user . * @ throws InvalidParameterException * One or more of the input parameters don ' t match the service ' s restrictions . * @ throws MailDomainNotFoundException * For an email or alias to be created in Amazon WorkMail , the included domain must be defined in the * organization . * @ throws MailDomainStateException * After a domain has been added to the organization , it must be verified . The domain is not yet verified . * @ throws InvalidParameterException * One or more of the input parameters don ' t match the service ' s restrictions . * @ throws OrganizationNotFoundException * An operation received a valid organization identifier that either doesn ' t belong or exist in the system . * @ throws OrganizationStateException * The organization must have a valid state ( Active or Synchronizing ) to perform certain operations on the * organization or its members . * @ throws UnsupportedOperationException * You can ' t perform a write operation against a read - only directory . * @ sample AmazonWorkMail . UpdatePrimaryEmailAddress * @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / workmail - 2017-10-01 / UpdatePrimaryEmailAddress " * target = " _ top " > AWS API Documentation < / a > */ @ Override public UpdatePrimaryEmailAddressResult updatePrimaryEmailAddress ( UpdatePrimaryEmailAddressRequest request ) { } }
request = beforeClientExecution ( request ) ; return executeUpdatePrimaryEmailAddress ( request ) ;
public class EntityManagerImpl { /** * Find by primary key . Search for an entity of the specified class and * primary key . If the entity instance is contained in the persistence * context it is returned from there . * @ param entityClass * @ param primaryKey * @ return the found entity instance or null if the entity does not exist * @ throws IllegalArgumentException * if the first argument does not denote an entity type or the * second argument is is not a valid type for that entity ’ s * primary key or is null * @ see javax . persistence . EntityManager # find ( java . lang . Class , * java . lang . Object ) */ @ Override public final < E > E find ( Class < E > entityClass , Object primaryKey ) { } }
checkClosed ( ) ; checkTransactionNeeded ( ) ; return getPersistenceDelegator ( ) . findById ( entityClass , primaryKey ) ;
public class FeatureCacheTables { /** * Resize all caches and update the max cache size * @ param maxCacheSize * max cache size */ public void resize ( int maxCacheSize ) { } }
setMaxCacheSize ( maxCacheSize ) ; for ( FeatureCache cache : tableCache . values ( ) ) { cache . resize ( maxCacheSize ) ; }
public class TimeUnitFormat { /** * Set the format used for formatting or parsing . Passing null is equivalent to passing * { @ link NumberFormat # getNumberInstance ( ULocale ) } . * @ param format the number formatter . * @ return this , for chaining . * @ deprecated ICU 53 see { @ link MeasureFormat } . */ @ Deprecated public TimeUnitFormat setNumberFormat ( NumberFormat format ) { } }
if ( format == this . format ) { return this ; } if ( format == null ) { if ( locale == null ) { isReady = false ; mf = mf . withLocale ( ULocale . getDefault ( ) ) ; } else { this . format = NumberFormat . getNumberInstance ( locale ) ; mf = mf . withNumberFormat ( this . format ) ; } } else { this . format = format ; mf = mf . withNumberFormat ( this . format ) ; } return this ;
public class Controller { /** * stops the resync thread pool firstly , then stop the reflector */ public void stop ( ) { } }
reflector . stop ( ) ; reflectorFuture . cancel ( true ) ; reflectExecutor . shutdown ( ) ; if ( resyncFuture != null ) { resyncFuture . cancel ( true ) ; resyncExecutor . shutdown ( ) ; }
public class AsciiDocExporter { /** * Method that is called to write container properties to AsciiDoc document . * @ param properties container properties as a map */ protected void writeContainerProperties ( Map < String , String > properties ) throws IOException { } }
if ( properties . size ( ) > 0 ) { writer . append ( "[cols=\"2*\", options=\"header\"]" ) . append ( NEW_LINE ) ; writer . append ( "." ) . append ( this . resourceBundle . getString ( "asciidoc.reporter.properties" ) ) . append ( NEW_LINE ) ; writer . append ( "|===" ) . append ( NEW_LINE ) . append ( NEW_LINE ) ; writer . append ( "|KEY" ) . append ( NEW_LINE ) ; writer . append ( "|VALUE" ) . append ( NEW_LINE ) . append ( NEW_LINE ) ; Set < Entry < String , String > > entrySet = properties . entrySet ( ) ; for ( Entry < String , String > entry : entrySet ) { writer . append ( "|" ) . append ( entry . getKey ( ) ) . append ( NEW_LINE ) ; writer . append ( "|" ) . append ( entry . getValue ( ) ) . append ( NEW_LINE ) . append ( NEW_LINE ) ; } writer . append ( "|===" ) . append ( NEW_LINE ) . append ( NEW_LINE ) ; }
public class UpdateGatewayGroupRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( UpdateGatewayGroupRequest updateGatewayGroupRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( updateGatewayGroupRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateGatewayGroupRequest . getGatewayGroupArn ( ) , GATEWAYGROUPARN_BINDING ) ; protocolMarshaller . marshall ( updateGatewayGroupRequest . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( updateGatewayGroupRequest . getDescription ( ) , DESCRIPTION_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class ObjectOutputStream { /** * Writes a collection of field descriptors ( name , type name , etc ) for the * class descriptor { @ code classDesc } ( an * { @ code ObjectStreamClass } ) * @ param classDesc * The class descriptor ( an { @ code ObjectStreamClass } ) * for which to write field information * @ param externalizable * true if the descriptors are externalizable * @ throws IOException * If an IO exception happened when writing the field * descriptors . * @ see # writeObject ( Object ) */ private void writeFieldDescriptors ( ObjectStreamClass classDesc , boolean externalizable ) throws IOException { } }
Class < ? > loadedClass = classDesc . forClass ( ) ; ObjectStreamField [ ] fields = null ; int fieldCount = 0 ; // The fields of String are not needed since Strings are treated as // primitive types if ( ! externalizable && loadedClass != ObjectStreamClass . STRINGCLASS ) { fields = classDesc . fields ( ) ; fieldCount = fields . length ; } // Field count output . writeShort ( fieldCount ) ; // Field names for ( int i = 0 ; i < fieldCount ; i ++ ) { ObjectStreamField f = fields [ i ] ; boolean wasPrimitive = f . writeField ( output ) ; if ( ! wasPrimitive ) { writeObject ( f . getTypeString ( ) ) ; } }
public class NetworkMonitor { /** * Checks if currently connected Access Point is either rogue or incapable * of routing packet * @ param ipAddress * Any valid IP addresses will work to check if the device is * connected to properly working AP * @ param port * Port number bound with ipAddress parameter * @ return true if currently connected AP is not working normally ; false * otherwise */ public boolean isWifiFake ( String ipAddress , int port ) { } }
SocketChannel socketChannel = null ; try { socketChannel = SocketChannel . open ( ) ; socketChannel . connect ( new InetSocketAddress ( ipAddress , port ) ) ; } catch ( IOException e ) { Log . d ( TAG , "Current Wifi is stupid!!! by IOException" ) ; return true ; } catch ( UnresolvedAddressException e ) { Log . d ( TAG , "Current Wifi is stupid!!! by InetSocketAddress" ) ; return true ; } finally { if ( socketChannel != null ) try { socketChannel . close ( ) ; } catch ( IOException e ) { Log . d ( TAG , "Error occured while closing SocketChannel" ) ; } } return false ;
public class GeneratorXMLDatabaseConnection { /** * Process a ' static ' cluster Element in the XML stream . * @ param gen Generator * @ param cur Current document nod */ private void processElementStatic ( GeneratorMain gen , Node cur ) { } }
String name = ( ( Element ) cur ) . getAttribute ( ATTR_NAME ) ; if ( name == null ) { throw new AbortException ( "No cluster name given in specification file." ) ; } ArrayList < double [ ] > points = new ArrayList < > ( ) ; // TODO : check for unknown attributes . XMLNodeIterator iter = new XMLNodeIterator ( cur . getFirstChild ( ) ) ; while ( iter . hasNext ( ) ) { Node child = iter . next ( ) ; if ( TAG_POINT . equals ( child . getNodeName ( ) ) ) { processElementPoint ( points , child ) ; } else if ( child . getNodeType ( ) == Node . ELEMENT_NODE ) { LOG . warning ( "Unknown element in XML specification file: " + child . getNodeName ( ) ) ; } } // * * * add new cluster object GeneratorStatic cluster = new GeneratorStatic ( name , points ) ; gen . addCluster ( cluster ) ; if ( LOG . isVerbose ( ) ) { LOG . verbose ( "Loaded cluster " + cluster . name + " from specification." ) ; }
public class ByteBuffer { /** * Return a hexidecimal String representation of the current buffer with each byte * displayed in a 2 character hexidecimal format . Useful for debugging . * Convert a ByteBuffer to a String with a hexidecimal format . * @ param offset * @ param length * @ return The string in hex representation */ public String toHexString ( int offset , int length ) { } }
// is offset , length valid for the current size ( ) of our internal byte [ ] checkOffsetLength ( size ( ) , offset , length ) ; // if length is 0 , return an empty string if ( length == 0 || size ( ) == 0 ) { return "" ; } StringBuilder s = new StringBuilder ( length * 2 ) ; int end = offset + length ; for ( int i = offset ; i < end ; i ++ ) { HexUtil . appendHexString ( s , getUnchecked ( i ) ) ; } return s . toString ( ) ;
public class PhotosApi { /** * Set permissions for a photo . * < br > * This method requires authentication with ' write ' permission . * @ param photoId Required . The id of the photo to set permissions for . * @ param isPublic Required . True to set the photo to public , false to set it to private . * @ param isFriend Required . True to make the photo visible to friends when private , false to not . * @ param isFamily Required . True to make the photo visible to family when private , false to not . * @ param permComment Required . Who can add comments to the photo and it ' s notes . * @ param permAddMeta Required . Who can add notes and tags to the photo . * @ return object with the results . * @ throws JinxException if required parameters are null or empty , or if there are any errors . * @ see < a href = " https : / / www . flickr . com / services / api / flickr . photos . setPerms . html " > flickr . photos . setPerms < / a > */ public PermsSetResponse setPerms ( String photoId , boolean isPublic , boolean isFriend , boolean isFamily , JinxConstants . Perms permComment , JinxConstants . Perms permAddMeta ) throws JinxException { } }
JinxUtils . validateParams ( photoId , permComment , permAddMeta ) ; Map < String , String > params = new TreeMap < > ( ) ; params . put ( "method" , "flickr.photos.setPerms" ) ; params . put ( "photo_id" , photoId ) ; params . put ( "is_public" , isPublic ? "1" : "0" ) ; params . put ( "is_friend" , isFriend ? "1" : "0" ) ; params . put ( "is_family" , isFamily ? "1" : "0" ) ; params . put ( "perm_comment" , Integer . toString ( JinxUtils . permsToFlickrPermsId ( permComment ) ) ) ; params . put ( "perm_addmeta" , Integer . toString ( JinxUtils . permsToFlickrPermsId ( permAddMeta ) ) ) ; return jinx . flickrPost ( params , PermsSetResponse . class ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link ContentType } * { @ code > } */ @ XmlElementDecl ( namespace = "http://www.w3.org/2005/Atom" , name = "content" , scope = EntryType . class ) public JAXBElement < ContentType > createEntryTypeContent ( ContentType value ) { } }
return new JAXBElement < ContentType > ( ENTRY_TYPE_CONTENT_QNAME , ContentType . class , EntryType . class , value ) ;
public class ConnectionParam { /** * Sets whether or not the outgoing connections should use the proxy set . * < strong > Note : < / strong > The call to this method has no effect if set to use the proxy but the proxy was not previously * configured . * @ param useProxyChain { @ code true } if outgoing connections should use the proxy set , { @ code false } otherwise . * @ since 2.3.0 * @ see # isUseProxyChain ( ) * @ see # setProxyChainName ( String ) * @ see # setProxyChainPort ( int ) */ public void setUseProxyChain ( boolean useProxyChain ) { } }
if ( useProxyChain && ( getProxyChainName ( ) == null || getProxyChainName ( ) . isEmpty ( ) ) ) { return ; } this . useProxyChain = useProxyChain ; getConfig ( ) . setProperty ( USE_PROXY_CHAIN_KEY , this . useProxyChain ) ;
public class CsvFileExtensions { /** * Formats a file that has in every line one input - data into a csv - file . * @ param input * The input - file to format . The current format from the file is every data in a * line . * @ param output * The file where the formatted data should be inserted . * @ param encoding * the encoding * @ throws IOException * When an io error occurs . */ public static void formatToCSV ( final File input , final File output , final String encoding ) throws IOException { } }
final List < String > list = readLinesInList ( input , "UTF-8" ) ; final String sb = formatListToString ( list ) ; WriteFileExtensions . writeStringToFile ( output , sb , encoding ) ;
public class TorchService { /** * This is the main method that will initialize the Torch . * We recommend to static import this method , so that you can only call torch ( ) to begin . * @ return An instance of { @ link Torch } . */ public static Torch torch ( ) { } }
if ( ! isLoaded ( ) ) { throw new IllegalStateException ( "Factory is not loaded!" ) ; } LinkedList < Torch > stack = STACK . get ( ) ; if ( stack . isEmpty ( ) ) { stack . add ( factoryInstance . begin ( ) ) ; } return stack . getLast ( ) ;
public class EclipseOptions { /** * Use an Eclipse Target file to provision bundles from , the cache folder can be used to specify * a location where the resolve result of the target is stored ( e . g . if the target is based on * software - sites ) the cache will be refreshed if the sequenceNumber changes but in no other * circumstances so it might be needed to clear the cache if something changes on the remote * server but the target stays unmodified . * @ param targetDefinition * @ param cacheFolder * @ return * @ throws IOException */ public static EclipseTargetPlatform fromTarget ( InputStream targetDefinition , File cacheFolder ) throws IOException { } }
return new TargetResolver ( targetDefinition , cacheFolder ) ;
public class TableId { /** * Creates a table identity given project ' s , dataset ' s and table ' s user - defined ids . */ public static TableId of ( String project , String dataset , String table ) { } }
return new TableId ( checkNotNull ( project ) , checkNotNull ( dataset ) , checkNotNull ( table ) ) ;
public class DirectoryLookupService { /** * Remove the NotificationHandler from the Service . * @ param serviceName * the service name . * @ param handler * the NotificationHandler for the service . */ public void removeNotificationHandler ( String serviceName , NotificationHandler handler ) { } }
ServiceInstanceUtils . validateServiceName ( serviceName ) ; if ( handler == null ) { throw new ServiceException ( ErrorCode . SERVICE_DIRECTORY_NULL_ARGUMENT_ERROR , ErrorCode . SERVICE_DIRECTORY_NULL_ARGUMENT_ERROR . getMessageTemplate ( ) , "NotificationHandler" ) ; } synchronized ( notificationHandlers ) { if ( notificationHandlers . containsKey ( serviceName ) ) { List < NotificationHandler > list = notificationHandlers . get ( serviceName ) ; if ( list . contains ( handler ) ) { list . remove ( handler ) ; } if ( list . isEmpty ( ) ) { notificationHandlers . remove ( serviceName ) ; } } }
public class ColorPanel { /** * Update the render setting */ private void updateRender ( ) { } }
if ( inherit . isSelected ( ) ) { emitter . usePoints = Particle . INHERIT_POINTS ; oriented . setEnabled ( true ) ; } if ( quads . isSelected ( ) ) { emitter . usePoints = Particle . USE_QUADS ; oriented . setEnabled ( true ) ; } if ( points . isSelected ( ) ) { emitter . usePoints = Particle . USE_POINTS ; oriented . setEnabled ( false ) ; oriented . setSelected ( false ) ; } // oriented if ( oriented . isSelected ( ) ) emitter . useOriented = true ; else emitter . useOriented = false ; // additive blending if ( additive . isSelected ( ) ) emitter . useAdditive = true ; else emitter . useAdditive = false ;
public class BeanPath { /** * Create a new Set typed path * @ param < A > * @ param property property name * @ param type property type * @ return property path */ @ SuppressWarnings ( "unchecked" ) protected < A , E extends SimpleExpression < ? super A > > SetPath < A , E > createSet ( String property , Class < ? super A > type , Class < ? super E > queryType , PathInits inits ) { } }
return add ( new SetPath < A , E > ( type , ( Class ) queryType , forProperty ( property ) , inits ) ) ;
public class CmsModule { /** * Checks if this module depends on another given module , * will return the dependency , or < code > null < / code > if no dependency was found . < p > * @ param module the other module to check against * @ return the dependency , or null if no dependency was found */ public CmsModuleDependency checkDependency ( CmsModule module ) { } }
CmsModuleDependency otherDepdendency = new CmsModuleDependency ( module . getName ( ) , module . getVersion ( ) ) ; // loop through all the dependencies for ( int i = 0 ; i < m_dependencies . size ( ) ; i ++ ) { CmsModuleDependency dependency = m_dependencies . get ( i ) ; if ( dependency . dependesOn ( otherDepdendency ) ) { // short circuit here return dependency ; } } // no dependency was found return null ;
public class InsufficientOperationalNodesException { /** * Computes A - B * @ param listA * @ param listB * @ return */ private static List < Node > difference ( List < Node > listA , List < Node > listB ) { } }
if ( listA != null && listB != null ) listA . removeAll ( listB ) ; return listA ;
public class AbstractMappedClassFieldObserver { /** * Process an object . * @ param obj an object which is an instance of a mapped class , must not be null * @ param field a field where the object has been found , it can be null for first call * @ param customFieldProcessor a processor for custom fields , it can be null */ protected void processObject ( final Object obj , Field field , final Object customFieldProcessor ) { } }
JBBPUtils . assertNotNull ( obj , "Object must not be null" ) ; Field [ ] orderedFields = null ; final Map < Class < ? > , Field [ ] > fieldz ; if ( cachedClasses == null ) { fieldz = new HashMap < > ( ) ; cachedClasses = fieldz ; } else { fieldz = cachedClasses ; synchronized ( cachedClasses ) { orderedFields = fieldz . get ( obj . getClass ( ) ) ; } } if ( orderedFields == null ) { // find out the outOrder of fields and fields which should be serialized final List < Class < ? > > listOfClassHierarchy = new ArrayList < > ( ) ; final List < OrderedField > fields = new ArrayList < > ( ) ; Class < ? > current = obj . getClass ( ) ; while ( current != java . lang . Object . class ) { listOfClassHierarchy . add ( current ) ; current = current . getSuperclass ( ) ; } for ( int i = listOfClassHierarchy . size ( ) - 1 ; i >= 0 ; i -- ) { final Class < ? > clazzToProcess = listOfClassHierarchy . get ( i ) ; final Bin clazzAnno = clazzToProcess . getAnnotation ( Bin . class ) ; for ( Field f : clazzToProcess . getDeclaredFields ( ) ) { f = ReflectUtils . makeAccessible ( f ) ; final int modifiers = f . getModifiers ( ) ; if ( Modifier . isTransient ( modifiers ) || Modifier . isStatic ( modifiers ) || f . getName ( ) . indexOf ( '$' ) >= 0 ) { continue ; } Bin fieldAnno = f . getAnnotation ( Bin . class ) ; fieldAnno = fieldAnno == null ? clazzAnno : fieldAnno ; if ( fieldAnno == null ) { continue ; } fields . add ( new OrderedField ( fieldAnno . outOrder ( ) , f ) ) ; } } Collections . sort ( fields ) ; orderedFields = new Field [ fields . size ( ) ] ; for ( int i = 0 ; i < fields . size ( ) ; i ++ ) { orderedFields [ i ] = fields . get ( i ) . field ; } synchronized ( fieldz ) { fieldz . put ( obj . getClass ( ) , orderedFields ) ; } } field = ReflectUtils . makeAccessible ( field ) ; final Bin clazzAnno = obj . getClass ( ) . getAnnotation ( Bin . class ) ; final DslBinCustom clazzCustomAnno = obj . getClass ( ) . getAnnotation ( DslBinCustom . class ) ; final Bin fieldAnno = field == null ? null : field . getAnnotation ( Bin . class ) ; final DslBinCustom fieldCustomAnno = field == null ? null : field . getAnnotation ( DslBinCustom . class ) ; this . onStructStart ( obj , field , clazzAnno == null ? fieldAnno : clazzAnno ) ; for ( final Field f : orderedFields ) { Bin binAnno = f . getAnnotation ( Bin . class ) ; if ( binAnno == null ) { binAnno = f . getDeclaringClass ( ) . getAnnotation ( Bin . class ) ; if ( binAnno == null ) { throw new JBBPIllegalArgumentException ( "Can't find any Bin annotation to use for " + f + " field" ) ; } } if ( binAnno . custom ( ) && customFieldProcessor == null ) { throw new JBBPIllegalArgumentException ( "The Class '" + obj . getClass ( ) . getName ( ) + "' contains the field '" + f . getName ( ) + "\' which is a custom one, you must provide a JBBPCustomFieldWriter instance to save the field." ) ; } processObjectField ( obj , f , binAnno , customFieldProcessor ) ; } this . onStructEnd ( obj , field , clazzAnno == null ? fieldAnno : clazzAnno ) ;
public class CmsAttributeHandler { /** * Returns the drag and drop handler . < p > * @ return the drag and drop handler */ public CmsDNDHandler getDNDHandler ( ) { } }
if ( m_dndHandler == null ) { m_dndHandler = new CmsDNDHandler ( new CmsAttributeDNDController ( ) ) ; m_dndHandler . setOrientation ( Orientation . VERTICAL ) ; m_dndHandler . setScrollEnabled ( true ) ; m_dndHandler . setScrollElement ( m_scrollElement ) ; } return m_dndHandler ;
public class ULocale { /** * displayLocaleID is canonical , localeID need not be since parsing will fix this . */ private static String getDisplayScriptInternal ( ULocale locale , ULocale displayLocale ) { } }
return LocaleDisplayNames . getInstance ( displayLocale ) . scriptDisplayName ( locale . getScript ( ) ) ;
public class AttList { /** * Look up the index of an attribute by raw XML 1.0 name . * @ param qName The qualified ( prefixed ) name . * @ return The index of the attribute , or - 1 if it does not * appear in the list . */ public int getIndex ( String qName ) { } }
for ( int i = m_attrs . getLength ( ) - 1 ; i >= 0 ; -- i ) { Node a = m_attrs . item ( i ) ; if ( a . getNodeName ( ) . equals ( qName ) ) return i ; } return - 1 ;
public class SshConnectionImpl { /** * This version takes a command to run , and then returns a wrapper instance * that exposes all the standard state of the channel ( stdin , stdout , * stderr , exit status , etc ) . Channel connection is established if establishConnection * is true . * @ param command the command to execute . * @ param establishConnection true if establish channel connetction within this method . * @ return a Channel with access to all streams and the exit code . * @ throws IOException if it is so . * @ throws SshException if there are any ssh problems . * @ see # executeCommandReader ( String ) */ @ Override public synchronized ChannelExec executeCommandChannel ( String command , Boolean establishConnection ) throws SshException , IOException { } }
if ( ! isConnected ( ) ) { throw new IOException ( "Not connected!" ) ; } try { ChannelExec channel = ( ChannelExec ) connectSession . openChannel ( "exec" ) ; channel . setCommand ( command ) ; if ( establishConnection ) { channel . connect ( ) ; } return channel ; } catch ( JSchException ex ) { throw new SshException ( ex ) ; }
public class HttpServiceTracker { /** * Create the servlet . * The SERVLET _ CLASS property must be supplied . * @ param alias * @ param dictionary * @ return */ public Servlet makeServlet ( String alias , Dictionary < String , String > dictionary ) { } }
String servletClass = dictionary . get ( BundleConstants . SERVICE_CLASS ) ; return ( Servlet ) ClassServiceUtility . getClassService ( ) . makeObjectFromClassName ( servletClass ) ;
public class StylesContainer { /** * Write styles to styles . xml / automatic - styles * @ param util an util * @ param appendable the destination * @ throws IOException if an I / O error occurs */ public void writeStylesAutomaticStyles ( final XMLUtil util , final Appendable appendable ) throws IOException { } }
final Iterable < ObjectStyle > styles = this . objectStylesContainer . getValues ( Dest . STYLES_AUTOMATIC_STYLES ) ; for ( final ObjectStyle style : styles ) assert style . isHidden ( ) : style . toString ( ) ; this . write ( styles , util , appendable ) ;
public class ImageManager { /** * Loads ( and caches ) the specified image from the resource manager , obtaining the image from * the supplied resource set . * < p > Additionally the image is optimized for display in the current graphics * configuration . Consider using { @ link # getMirage ( ImageKey ) } instead of prepared images as * they ( some day ) will automatically use volatile images to increase performance . */ public BufferedImage getPreparedImage ( String rset , String path ) { } }
return getPreparedImage ( rset , path , null ) ;
public class ClassFileWriter { /** * Generate code to load the given long on stack . * @ param k the constant */ public void addPush ( long k ) { } }
int ik = ( int ) k ; if ( ik == k ) { addPush ( ik ) ; add ( ByteCode . I2L ) ; } else { addLoadConstant ( k ) ; }
public class ApiOvhMe { /** * Delete this organisation * REST : DELETE / me / ipOrganisation / { organisationId } * @ param organisationId [ required ] */ public void ipOrganisation_organisationId_DELETE ( String organisationId ) throws IOException { } }
String qPath = "/me/ipOrganisation/{organisationId}" ; StringBuilder sb = path ( qPath , organisationId ) ; exec ( qPath , "DELETE" , sb . toString ( ) , null ) ;
public class AddressResolverGroup { /** * Closes all { @ link NameResolver } s created by this group . */ @ Override @ SuppressWarnings ( { } }
"unchecked" , "SuspiciousToArrayCall" } ) public void close ( ) { final AddressResolver < T > [ ] rArray ; synchronized ( resolvers ) { rArray = ( AddressResolver < T > [ ] ) resolvers . values ( ) . toArray ( new AddressResolver [ 0 ] ) ; resolvers . clear ( ) ; } for ( AddressResolver < T > r : rArray ) { try { r . close ( ) ; } catch ( Throwable t ) { logger . warn ( "Failed to close a resolver:" , t ) ; } }
public class LToCharFunctionBuilder { /** * Adds full new case for the argument that are of specific classes ( matched by instanceOf , null is a wildcard ) . */ @ Nonnull public < V extends T > LToCharFunctionBuilder < T > aCase ( Class < V > argC , LToCharFunction < V > function ) { } }
PartialCaseWithCharProduct . The pc = partialCaseFactoryMethod ( a -> ( argC == null || argC . isInstance ( a ) ) ) ; pc . evaluate ( function ) ; return self ( ) ;
public class MetadataUtils { /** * Populate column and super column maps . * @ param m * the m * @ param columnNameToFieldMap * the column name to field map * @ param superColumnNameToFieldMap * the super column name to field map */ public static void populateColumnAndSuperColumnMaps ( EntityMetadata m , Map < String , Field > columnNameToFieldMap , Map < String , Field > superColumnNameToFieldMap , final KunderaMetadata kunderaMetadata ) { } }
getEmbeddableType ( m , columnNameToFieldMap , superColumnNameToFieldMap , kunderaMetadata ) ;
public class ListCrawlersRequest { /** * Specifies to return only these tagged resources . * @ param tags * Specifies to return only these tagged resources . * @ return Returns a reference to this object so that method calls can be chained together . */ public ListCrawlersRequest withTags ( java . util . Map < String , String > tags ) { } }
setTags ( tags ) ; return this ;
public class HttpUtils { /** * Get a default profile IRI from the syntax and / or identifier . * @ param syntax the RDF syntax * @ param identifier the resource identifier * @ param defaultJsonLdProfile a user - supplied default * @ return a profile IRI usable by the output streamer */ public static IRI getDefaultProfile ( final RDFSyntax syntax , final IRI identifier , final String defaultJsonLdProfile ) { } }
if ( RDFA . equals ( syntax ) ) { return identifier ; } else if ( defaultJsonLdProfile != null ) { return rdf . createIRI ( defaultJsonLdProfile ) ; } return compacted ;
public class FSNamesystem { /** * For each block in the name - node verify whether it belongs to any file , * over or under replicated . Place it into the respective queue . */ protected void processMisReplicatedBlocks ( ) { } }
writeLock ( ) ; try { if ( this . initializedReplQueues ) { return ; } String logPrefix = "Processing mis-replicated blocks: " ; long nrInvalid = 0 ; // clear queues neededReplications . clear ( ) ; overReplicatedBlocks . clear ( ) ; raidEncodingTasks . clear ( ) ; int totalBlocks = blocksMap . size ( ) ; // shutdown initial block report executor setupInitialBlockReportExecutor ( true ) ; // simply return if there are no blocks if ( totalBlocks == 0 ) { // indicate that we are populating replication queues setInitializedReplicationQueues ( true ) ; LOG . info ( logPrefix + "Blocks map empty. Nothing to do." ) ; return ; } AtomicLong count = new AtomicLong ( 0 ) ; // shutdown initial block report thread executor setupInitialBlockReportExecutor ( true ) ; FLOG . info ( logPrefix + "Starting, total number of blocks: " + totalBlocks ) ; long start = now ( ) ; // have one thread process at least 1M blocks // no more than configured number of threads // at least one thread if the number of blocks < 1M int numShards = Math . min ( parallelProcessingThreads , ( ( totalBlocks + parallelRQblocksPerShard - 1 ) / parallelRQblocksPerShard ) ) ; // get shard iterators List < Iterator < BlockInfo > > iterators = blocksMap . getBlocksIterarors ( numShards ) ; // sanity , as the number can be lower in corner cases numShards = iterators . size ( ) ; FLOG . info ( logPrefix + "Using " + numShards + " threads" ) ; List < MisReplicatedBlocksWorker > misReplicationWorkers = new ArrayList < MisReplicatedBlocksWorker > ( ) ; List < Thread > misReplicationThreads = new ArrayList < Thread > ( ) ; // workers will synchronize on this object to insert into // replication queues Object lock = new Object ( ) ; // initialize mis - replication worker threads for ( int i = 0 ; i < numShards ; i ++ ) { MisReplicatedBlocksWorker w = new MisReplicatedBlocksWorker ( lock , i , count , iterators . get ( i ) , totalBlocks ) ; Thread t = new Thread ( w ) ; t . start ( ) ; misReplicationWorkers . add ( w ) ; misReplicationThreads . add ( t ) ; } // join all threads for ( Thread t : misReplicationThreads ) { try { t . join ( ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; } } // get number of invalidated blocks for ( MisReplicatedBlocksWorker w : misReplicationWorkers ) { nrInvalid += w . nrInvalid ; } // update safeblock count ( finalized blocks ) this . blocksSafe = blocksMap . size ( ) - getMissingBlocksCount ( ) ; // update safeblock count ( under construction blocks ) for ( MisReplicatedBlocksWorker w : misReplicationWorkers ) { this . blocksSafe -= w . missingUnderConstructionBlocks ; } // indicate that we are populating replication queues setInitializedReplicationQueues ( true ) ; long stop = now ( ) ; FLOG . info ( logPrefix + "Total number of blocks = " + blocksMap . size ( ) ) ; FLOG . info ( logPrefix + "Number of invalid blocks = " + nrInvalid ) ; FLOG . info ( logPrefix + "Number of under-replicated blocks = " + neededReplications . size ( ) ) ; FLOG . info ( logPrefix + "Number of over-replicated blocks = " + overReplicatedBlocks . size ( ) ) ; FLOG . info ( logPrefix + "Number of safe blocks = " + this . blocksSafe ) ; FLOG . info ( logPrefix + "Finished in " + ( stop - start ) + " ms" ) ; } finally { writeUnlock ( ) ; }
public class Bits { /** * Exclude x from this set . */ public void excl ( int x ) { } }
Assert . check ( currentState != BitsState . UNKNOWN ) ; Assert . check ( x >= 0 ) ; sizeTo ( ( x >>> wordshift ) + 1 ) ; bits [ x >>> wordshift ] = bits [ x >>> wordshift ] & ~ ( 1 << ( x & wordmask ) ) ; currentState = BitsState . NORMAL ;
public class DecimalWithUoMType { /** * The localized string and the internal string value are equal . So the * internal value can be evaluated directly . * @ param _ values values to evaluate * @ return evaluated big decimal value with unit of measure * @ throws SQLException on error */ protected DecimalWithUoM eval ( final Object ... _values ) throws SQLException { } }
final DecimalWithUoM ret ; if ( _values == null || _values . length < 2 ) { ret = null ; } else { final BigDecimal value ; if ( _values [ 0 ] instanceof String && ( ( String ) _values [ 0 ] ) . length ( ) > 0 ) { try { value = DecimalType . parseLocalized ( ( String ) _values [ 0 ] ) ; } catch ( final EFapsException e ) { throw new SQLException ( e ) ; } } else if ( _values [ 0 ] instanceof BigDecimal ) { value = ( BigDecimal ) _values [ 0 ] ; } else if ( _values [ 0 ] instanceof Number ) { value = new BigDecimal ( ( ( Number ) _values [ 0 ] ) . toString ( ) ) ; } else { value = null ; } final UoM uom ; if ( _values [ 1 ] instanceof UoM ) { uom = ( UoM ) _values [ 1 ] ; } else if ( _values [ 1 ] instanceof String && ( ( String ) _values [ 1 ] ) . length ( ) > 0 ) { uom = Dimension . getUoM ( Long . parseLong ( ( String ) _values [ 1 ] ) ) ; } else if ( _values [ 1 ] instanceof Number ) { uom = Dimension . getUoM ( ( ( Number ) _values [ 1 ] ) . longValue ( ) ) ; } else { uom = null ; } ret = new DecimalWithUoM ( value , uom ) ; } return ret ;
public class FastMath { /** * Get the whole number that is the nearest to x , or the even one if x is exactly half way between two integers . * @ param x number from which nearest whole number is requested * @ return a double number r such that r is an integer r - 0.5 < = x < = r + 0.5 */ public static double rint ( double x ) { } }
double y = floor ( x ) ; double d = x - y ; if ( d > 0.5 ) { if ( y == - 1.0 ) { return - 0.0 ; // Preserve sign of operand } return y + 1.0 ; } if ( d < 0.5 ) { return y ; } /* half way , round to even */ long z = ( long ) y ; return ( z & 1 ) == 0 ? y : y + 1.0 ;
public class SparseBooleanArray { /** * Puts a key / value pair into the array , optimizing for the case where * the key is greater than all existing keys in the array . */ public void append ( int key , boolean value ) { } }
if ( mSize != 0 && key <= mKeys [ mSize - 1 ] ) { put ( key , value ) ; return ; } mKeys = GrowingArrayUtils . append ( mKeys , mSize , key ) ; mValues = GrowingArrayUtils . append ( mValues , mSize , value ) ; mSize ++ ;
public class AbstractListBinder { /** * Decorates an object instance if the < code > closure < / code > value is an instance of { @ link Closure } . * @ param closure * the closure which is used to decorate the object . * @ param object * the value to decorate * @ return the decorated instance if < code > closure < / code > implements { @ link Closure } , otherwise the value of * < code > object < / code > */ protected Object decorate ( Object closure , Object object ) { } }
if ( closure instanceof Closure ) { return ( ( Closure ) closure ) . call ( object ) ; } return closure ;
public class TunnelCollectionResource { /** * Retrieves the tunnel having the given UUID , returning a TunnelResource * representing that tunnel . If no such tunnel exists , an exception will be * thrown . * @ param tunnelUUID * The UUID of the tunnel to return via a TunnelResource . * @ return * A TunnelResource which represents the tunnel having the given UUID . * @ throws GuacamoleException * If no such tunnel exists . */ @ Path ( "{tunnel}" ) public TunnelResource getTunnel ( @ PathParam ( "tunnel" ) String tunnelUUID ) throws GuacamoleException { } }
Map < String , UserTunnel > tunnels = session . getTunnels ( ) ; // Pull tunnel with given UUID final UserTunnel tunnel = tunnels . get ( tunnelUUID ) ; if ( tunnel == null ) throw new GuacamoleResourceNotFoundException ( "No such tunnel." ) ; // Return corresponding tunnel resource return tunnelResourceFactory . create ( tunnel ) ;
public class FxCopRuleSet { /** * Returns the specified rule if it exists * @ param category the rule category * @ param checkId the id of the rule * @ return the rule ; null otherwise */ public FxCopRule getRule ( final String category , final String checkId ) { } }
String key = getRuleKey ( category , checkId ) ; FxCopRule rule = null ; if ( rules . containsKey ( key ) ) { rule = rules . get ( key ) ; } return rule ;
public class TransactionScope { /** * Returns the implementation for the active transaction , or null if there * is no active transaction . * @ throws Exception thrown by createTxn or reuseTxn */ public Txn getTxn ( ) throws Exception { } }
mLock . lock ( ) ; try { checkClosed ( ) ; return mActive == null ? null : mActive . getTxn ( ) ; } finally { mLock . unlock ( ) ; }
public class CacheEntry { /** * This method is called by the Cache to copy caching metadata * provided in a EntryInfo into this CacheEntry . It copies : < ul > * < li > id < li > timeout < li > expiration time < li > priority < li > template ( s ) * < li > data id ( s ) < li > sharing policy ( included for forward compatibility < / ul > * @ param entryInfo The EntryInfo that contains the caching * metadata to be copied from . */ public void copyMetaData ( EntryInfo entryInfo ) { } }
entryInfo . lock ( ) ; if ( ! entryInfo . wasIdSet ( ) ) { throw new IllegalStateException ( "id was not set on entryInfo" ) ; } id = entryInfo . id ; timeLimit = entryInfo . timeLimit ; inactivity = entryInfo . inactivity ; expirationTime = entryInfo . expirationTime ; validatorExpirationTime = entryInfo . validatorExpirationTime ; priority = entryInfo . priority ; if ( priority < 0 ) priority = 0 ; if ( priority > CacheConfig . MAX_PRIORITY ) priority = CacheConfig . MAX_PRIORITY ; if ( entryInfo . templates . size ( ) > 0 ) { _templates = ( String [ ] ) entryInfo . templates . toArray ( new String [ entryInfo . templates . size ( ) ] ) ; } else { _templates = EMPTY_STRING_ARRAY ; } if ( entryInfo . dataIds . size ( ) > 0 ) { _dataIds = entryInfo . dataIds . toArray ( new Object [ entryInfo . dataIds . size ( ) ] ) ; } else { _dataIds = EMPTY_OBJECT_ARRAY ; } if ( entryInfo . aliasList . size ( ) > 0 ) { aliasList = entryInfo . aliasList . toArray ( new Object [ entryInfo . aliasList . size ( ) ] ) ; } else { aliasList = EMPTY_OBJECT_ARRAY ; } sharingPolicy = entryInfo . sharingPolicy ; persistToDisk = entryInfo . persistToDisk ; cacheType = entryInfo . cacheType ; userMetaData = entryInfo . userMetaData ; externalCacheGroupId = entryInfo . externalCacheGroupId ; _serializedDataIds = null ; serializedAliasList = null ; serializedUserMetaData = null ; loadedFromDisk = false ; skipValueSerialized = false ; skipMemoryAndWriteToDisk = false ; skipMemoryAndWriteToDiskErrorCode = HTODDynacache . NO_EXCEPTION ;
public class TaskAuditQueryCriteriaUtil { /** * Implementation specific methods - - - - - */ @ Override protected < R , T > Predicate implSpecificCreatePredicateFromSingleCriteria ( CriteriaQuery < R > query , CriteriaBuilder builder , Class queryType , QueryCriteria criteria , QueryWhere queryWhere ) { } }
throw new IllegalStateException ( "List id " + criteria . getListId ( ) + " is not supported for queries on " + queryType . getSimpleName ( ) + "." ) ;
public class FeedItemPolicySummary { /** * Sets the validationErrors value for this FeedItemPolicySummary . * @ param validationErrors * List of error codes specifying what errors were found during * validation . */ public void setValidationErrors ( com . google . api . ads . adwords . axis . v201809 . cm . FeedItemAttributeError [ ] validationErrors ) { } }
this . validationErrors = validationErrors ;
public class GVRSceneObject { /** * Attach a component to this scene object . * Each scene object has a list of components that may * be attached to it . Only one component of a particular type * can be attached . Components are retrieved based on their type . * @ return true if component is attached , false if a component of that class is already attached . * @ param component component to attach . * @ see GVRSceneObject # detachComponent ( long ) * @ see GVRSceneObject # getComponent ( long ) */ public boolean attachComponent ( GVRComponent component ) { } }
if ( component . getNative ( ) != 0 ) { NativeSceneObject . attachComponent ( getNative ( ) , component . getNative ( ) ) ; } synchronized ( mComponents ) { long type = component . getType ( ) ; if ( ! mComponents . containsKey ( type ) ) { mComponents . put ( type , component ) ; component . setOwnerObject ( this ) ; return true ; } } return false ;
public class Node { /** * Add all children to the front of this node . * @ param children first of a list of sibling nodes who have no parent . * NOTE : Usually you would get this argument from a removeChildren ( ) call . * A single detached node will not work because its sibling pointers will not be * correctly initialized . */ public final void addChildrenToFront ( @ Nullable Node children ) { } }
if ( children == null ) { return ; // removeChildren ( ) returns null when there are none } // NOTE : If there is only one sibling , its previous pointer must point to itself . // Null indicates a fully detached node . checkNotNull ( children . previous , children ) ; for ( Node child = children ; child != null ; child = child . next ) { checkArgument ( child . parent == null ) ; child . parent = this ; } Node lastSib = children . previous ; if ( first != null ) { Node last = first . previous ; // NOTE : last . next remains null children . previous = last ; lastSib . next = first ; first . previous = lastSib ; } first = children ;
public class OAuth2StoreBuilder { /** * Add an additional parameter which will be included in the token request * @ param key additional parameter key * @ param value additional parameter value * @ return OAuth2StoreBuilder ( this ) */ public OAuth2StoreBuilder addAdditionalParameter ( String key , String value ) { } }
oAuth2Store . getAdditionalParameters ( ) . put ( key , value ) ; return this ;
public class AbstractEntranceProcessingItem { /** * Set the output stream of this EntranceProcessingItem . * An EntranceProcessingItem should have only 1 single output stream and * should not be re - assigned . * @ return this EntranceProcessingItem */ public EntranceProcessingItem setOutputStream ( Stream outputStream ) { } }
if ( this . outputStream != null && this . outputStream != outputStream ) { throw new IllegalStateException ( "Cannot overwrite output stream of EntranceProcessingItem" ) ; } else this . outputStream = outputStream ; return this ;
public class AttributeValue { /** * A set of binary attributes . * Returns a reference to this object so that method calls can be chained together . * @ param bS A set of binary attributes . * @ return A reference to this updated object so that method calls can be chained * together . */ public AttributeValue withBS ( java . nio . ByteBuffer ... bS ) { } }
if ( getBS ( ) == null ) setBS ( new java . util . ArrayList < java . nio . ByteBuffer > ( bS . length ) ) ; for ( java . nio . ByteBuffer value : bS ) { getBS ( ) . add ( value ) ; } return this ;