signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ClassTypeUtils { /** * String转Class * @ param typeStr 对象描述 * @ return Class [ ] */ public static Class getClass ( String typeStr ) { } }
Class clazz = ReflectCache . getClassCache ( typeStr ) ; if ( clazz == null ) { if ( "void" . equals ( typeStr ) ) { clazz = void . class ; } else if ( "boolean" . equals ( typeStr ) ) { clazz = boolean . class ; } else if ( "byte" . equals ( typeStr ) ) { clazz = byte . class ; } else if ( "char" . equals ( typeStr ) ...
public class Tsne { /** * Computes a gaussian kernel * given a vector of squared distance distances * @ param d the data * @ param beta * @ return */ public Pair < Double , INDArray > hBeta ( INDArray d , double beta ) { } }
INDArray P = exp ( d . neg ( ) . muli ( beta ) ) ; double sumP = P . sumNumber ( ) . doubleValue ( ) ; double logSumP = FastMath . log ( sumP ) ; Double H = logSumP + ( ( beta * ( d . mul ( P ) . sumNumber ( ) . doubleValue ( ) ) ) / sumP ) ; P . divi ( sumP ) ; return new Pair < > ( H , P ) ;
public class BpmnParse { /** * Sets the value for " camunda : errorMessageVariable " on the passed definition if * it ' s present . * @ param errorEventDefinition * the XML errorEventDefinition tag * @ param definition * the errorEventDefintion that can get the errorMessageVariable value */ protected void set...
String errorMessageVariable = errorEventDefinition . attributeNS ( CAMUNDA_BPMN_EXTENSIONS_NS , "errorMessageVariable" ) ; if ( errorMessageVariable != null ) { definition . setErrorMessageVariable ( errorMessageVariable ) ; }
public class WASCDIAnnotationInjectionProvider { /** * { @ inheritDoc } */ @ Override public Object inject ( Class Klass , boolean doPostConstruct , ExternalContext eContext ) throws InjectionProviderException { } }
if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "inject(Class<?> Klass,boolean,econtext)" , "Klass =" + Klass . getName ( ) , ", doPostConstruct = " + doPostConstruct + ", eContext = " + eContext ) ; } ManagedO...
public class Ix { /** * Buffer until an item is encountered for which the predicate returns true , * triggering a new buffer . * < p > Neither the previous nor the next buffer will contain the item that caused the * split * @ param predicate the predicate called with each item and should return false * to tri...
return new IxBufferSplit < T > ( this , nullCheck ( predicate , "predicate is null" ) ) ;
public class TrueTypeFont { /** * Get the width of a given String * @ param whatchars * The characters to get the width of * @ return The width of the characters */ public int getWidth ( String whatchars ) { } }
int totalwidth = 0 ; IntObject intObject = null ; int currentChar = 0 ; for ( int i = 0 ; i < whatchars . length ( ) ; i ++ ) { currentChar = whatchars . charAt ( i ) ; if ( currentChar < 256 ) { intObject = charArray [ currentChar ] ; } else { intObject = ( IntObject ) customChars . get ( new Character ( ( char ) curr...
public class AppServiceCertificateOrdersInner { /** * Creates or updates a certificate and associates with key vault secret . * Creates or updates a certificate and associates with key vault secret . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param certificateOrderN...
return ServiceFuture . fromResponse ( beginCreateOrUpdateCertificateWithServiceResponseAsync ( resourceGroupName , certificateOrderName , name , keyVaultCertificate ) , serviceCallback ) ;
public class EndpointActivationService { /** * Determines whether or not an activation spec is RRS transactional . * @ param activationSpec activation spec * @ return true if the activation spec is RRS transactional . False if not . */ @ FFDCIgnore ( NoSuchMethodException . class ) private static boolean isRRSTrans...
try { return ( Boolean ) activationSpec . getClass ( ) . getMethod ( "getRRSTransactional" ) . invoke ( activationSpec ) ; } catch ( NoSuchMethodException x ) { return false ; } catch ( Exception x ) { return false ; }
public class CommerceOrderPaymentLocalServiceUtil { /** * Updates the commerce order payment in the database or adds it if it does not yet exist . Also notifies the appropriate model listeners . * @ param commerceOrderPayment the commerce order payment * @ return the commerce order payment that was updated */ publi...
return getService ( ) . updateCommerceOrderPayment ( commerceOrderPayment ) ;
public class MultiHashMap { /** * Returns the value to which this map maps the specified key and subKey . Returns null if the map contains no mapping * for this key and subKey . A return value of null does not necessarily indicate that the map contains no mapping * for the key and subKey ; it ' s also possible that...
HashMap a = ( HashMap ) super . get ( key ) ; if ( a != null ) { Object b = a . get ( subKey ) ; return b ; } return null ;
public class MediathekSwr { @ Override public synchronized void addToList ( ) { } }
meldungStart ( ) ; // Theman suchen listeThemen . clear ( ) ; addToList__ ( ) ; if ( CrawlerTool . loadLongMax ( ) ) { addToList_verpasst ( ) ; // brauchst eigentlich nicht und dauer zu lange } if ( Config . getStop ( ) ) { meldungThreadUndFertig ( ) ; } else if ( listeThemen . isEmpty ( ) ) { meldungThreadUndFertig ( ...
public class xen_panwvpx_image { /** * < pre > * Use this operation to delete panw XVA file . * < / pre > */ public static xen_panwvpx_image delete ( nitro_service client , xen_panwvpx_image resource ) throws Exception { } }
resource . validate ( "delete" ) ; return ( ( xen_panwvpx_image [ ] ) resource . delete_resource ( client ) ) [ 0 ] ;
public class ClassUtils { /** * < p > Gets the package name from the canonical name of a { @ code Class } . < / p > * @ param cls the class to get the package name for , may be { @ code null } . * @ return the package name or an empty string * @ since 2.4 */ public static String getPackageCanonicalName ( final Cl...
if ( cls == null ) { return StringUtils . EMPTY ; } return getPackageCanonicalName ( cls . getName ( ) ) ;
public class HttpUtils { /** * Check whether an LDP type is a sort of container . * @ param ldpType the LDP type to test * @ return true if it is a type of LDP container */ public static boolean isContainer ( final IRI ldpType ) { } }
return LDP . Container . equals ( ldpType ) || LDP . BasicContainer . equals ( ldpType ) || LDP . DirectContainer . equals ( ldpType ) || LDP . IndirectContainer . equals ( ldpType ) ;
public class CSSDeclaration { /** * Check if this declaration has the specified property . The comparison is * case insensitive ! * @ param eProperty * The property to check . May not be < code > null < / code > . * @ return < code > true < / code > if this declaration has the specified property . * @ see # h...
ValueEnforcer . notNull ( eProperty , "Property" ) ; return hasProperty ( eProperty . getName ( ) ) ;
public class FuncLast { /** * Execute the function . The function must return * a valid object . * @ param xctxt The current execution context . * @ return A valid XObject . * @ throws javax . xml . transform . TransformerException */ public XObject execute ( XPathContext xctxt ) throws javax . xml . transform ...
XNumber xnum = new XNumber ( ( double ) getCountOfContextNodeList ( xctxt ) ) ; // System . out . println ( " last : " + xnum . num ( ) ) ; return xnum ;
public class RequestSecurityFilter { /** * Returns a new { @ link RequestContext } , using the specified { @ link HttpServletRequest } and { @ link * HttpServletResponse } . */ protected RequestContext createRequestContext ( HttpServletRequest request , HttpServletResponse response ) { } }
return new RequestContext ( request , response , getServletContext ( ) ) ;
public class Collections { /** * Get an Iterator that returns the same elements returned by the supplied Iterator , but in the * order dictated by the supplied Comparator . */ public static < T > Iterator < T > getSortedIterator ( Iterator < T > itr , Comparator < T > comparator ) { } }
SortableArrayList < T > list = new SortableArrayList < T > ( ) ; CollectionUtil . addAll ( list , itr ) ; list . sort ( comparator ) ; return getUnmodifiableIterator ( list ) ;
public class JDBCDatabaseMetaData { /** * The main SQL statement executor . All SQL destined for execution * ultimately goes through this method . < p > * The sqlStatement field for the result is set autoClose to comply with * ResultSet . getStatement ( ) semantics for result sets that are not from * a user sup...
// NOTE : // Need to create a JDBCStatement here so JDBCResultSet can return // its Statement object on call to getStatement ( ) . // The native JDBCConnection . execute ( ) method does not // automatically assign a Statement object for the ResultSet , but // JDBCStatement does . That is , without this , there is no wa...
public class DescribeHsmClientCertificatesResult { /** * A list of the identifiers for one or more HSM client certificates used by Amazon Redshift clusters to store and * retrieve database encryption keys in an HSM . * @ param hsmClientCertificates * A list of the identifiers for one or more HSM client certificat...
if ( hsmClientCertificates == null ) { this . hsmClientCertificates = null ; return ; } this . hsmClientCertificates = new com . amazonaws . internal . SdkInternalList < HsmClientCertificate > ( hsmClientCertificates ) ;
public class Reader { /** * Scans a single class for Swagger annotations - does not invoke ReaderListeners */ public Swagger read ( Class < ? > cls ) { } }
SwaggerDefinition swaggerDefinition = cls . getAnnotation ( SwaggerDefinition . class ) ; if ( swaggerDefinition != null ) { readSwaggerConfig ( cls , swaggerDefinition ) ; } return read ( cls , "" , null , false , new String [ 0 ] , new String [ 0 ] , new LinkedHashMap < > ( ) , new ArrayList < > ( ) , new HashSet < >...
public class AmazonRoute53ResolverClient { /** * Updates the name of an inbound or an outbound resolver endpoint . * @ param updateResolverEndpointRequest * @ return Result of the UpdateResolverEndpoint operation returned by the service . * @ throws ResourceNotFoundException * The specified resource doesn ' t e...
request = beforeClientExecution ( request ) ; return executeUpdateResolverEndpoint ( request ) ;
public class ModelsImpl { /** * Get one entity role for a given entity . * @ param appId The application ID . * @ param versionId The version ID . * @ param entityId entity ID . * @ param roleId entity role ID . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the obse...
if ( this . client . endpoint ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.endpoint() is required and cannot be null." ) ; } if ( appId == null ) { throw new IllegalArgumentException ( "Parameter appId is required and cannot be null." ) ; } if ( versionId == null ) { throw new IllegalArgu...
public class ProposalLineItem { /** * Gets the reservationStatus value for this ProposalLineItem . * @ return reservationStatus * The reservation status of the { @ link ProposalLineItem } . * This attribute is read - only . */ public com . google . api . ads . admanager . axis . v201808 . ReservationStatus getReser...
return reservationStatus ;
public class ResponseBody { /** * @ see java . io . OutputStream # write ( byte [ ] ) */ @ Override public void write ( @ Sensitive byte [ ] b ) throws IOException { } }
// note : an NPE is appropriate here if input was null this . output . write ( b , 0 , b . length ) ;
public class WCheckBoxSelectExample { /** * Simple interactive - state WCheckBoxSelect examples . */ private void addInteractiveExamples ( ) { } }
add ( new WHeading ( HeadingLevel . H2 , "Simple WCheckBoxSelect examples" ) ) ; addExampleUsingLookupTable ( ) ; addExampleUsingArrayList ( ) ; addExampleUsingStringArray ( ) ; addInsideAFieldLayoutExamples ( ) ; add ( new WHeading ( HeadingLevel . H2 , "Examples showing LAYOUT properties" ) ) ; addFlatSelectExample (...
public class ChatApi { /** * Accept a chat * Accept the specified chat interaction . * @ param id The ID of the chat interaction . ( required ) * @ param acceptData Request parameters . ( optional ) * @ return ApiResponse & lt ; ApiSuccessResponse & gt ; * @ throws ApiException If fail to call the API , e . g...
com . squareup . okhttp . Call call = acceptChatValidateBeforeCall ( id , acceptData , null , null ) ; Type localVarReturnType = new TypeToken < ApiSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class PurchaseProvisionedCapacityRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( PurchaseProvisionedCapacityRequest purchaseProvisionedCapacityRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( purchaseProvisionedCapacityRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( purchaseProvisionedCapacityRequest . getAccountId ( ) , ACCOUNTID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to mars...
public class TemplateDataTenantOperationsListener { /** * Imports the specified entities in the proper order . */ private void importQueue ( final ITenant tenant , final Map < PortalDataKey , Set < BucketTuple > > queue , final StringBuilder importReport ) throws Exception { } }
final StandardEvaluationContext ctx = new StandardEvaluationContext ( ) ; ctx . setRootObject ( new RootObjectImpl ( tenant ) ) ; IDataTemplatingStrategy templating = new SpELDataTemplatingStrategy ( portalSpELService , ctx ) ; Document doc = null ; try { for ( PortalDataKey pdk : dataKeyImportOrder ) { Set < BucketTup...
public class ModelManagerImp { /** * get the model instance from the cache */ public Object getCache ( Object key , String className ) { } }
return modelCacheManager . getCache ( key , className ) ;
public class ForwardingClient { /** * Returns the currently active remote forwarding listeners . * @ return String [ ] */ public String [ ] getRemoteForwardings ( ) { } }
String [ ] r = new String [ remoteforwardings . size ( ) - ( remoteforwardings . containsKey ( X11_KEY ) ? 1 : 0 ) ] ; int index = 0 ; for ( Enumeration < String > e = remoteforwardings . keys ( ) ; e . hasMoreElements ( ) ; ) { String key = e . nextElement ( ) ; if ( ! key . equals ( X11_KEY ) ) r [ index ++ ] = key ;...
public class ConnectionImpl { /** * ( non - Javadoc ) * @ see com . ibm . wsspi . sib . core . SICoreConnection # registerConsumerSetMonitor ( SIDestinationAddress destinationAddress , String discriminatorExpression , ConsumerSetChangeCallback * callback ) */ @ Override public boolean registerConsumerSetMonitor ( S...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "registerConsumerSetMonitor" , new Object [ ] { destinationAddress , discriminatorExpression , callback } ) ; // Check that a listener has been specified if ( callback == null ) { if ( TraceComponent . isAnyTracingEnabled ( ...
public class Geldbetrag { /** * Liefert einen Geldbetrag mit der neuen gewuenschten Waehrung zurueck . * Dabei findet < b > keine < / b > Umrechnung statt . * Anmerkung : Der Prefix " with " kommt von der Namenskonvention in Scala * fuer immutable Objekte . * @ param waehrung Waehrung * @ return Geldbetrag mi...
String normalized = waehrung . toUpperCase ( ) . trim ( ) ; if ( "DM" . equalsIgnoreCase ( normalized ) ) { normalized = "DEM" ; } return withCurrency ( Currency . getInstance ( normalized ) ) ;
public class ProviderSignInUtils { /** * Get the connection to the provider user the client attempted to sign - in as . * Using this connection you may fetch a { @ link Connection # fetchUserProfile ( ) provider user profile } and use that to pre - populate a local user registration / signup form . * You can also l...
ProviderSignInAttempt signInAttempt = getProviderUserSignInAttempt ( request ) ; return signInAttempt != null ? signInAttempt . getConnection ( connectionFactoryLocator ) : null ;
public class LynxView { /** * Hack to change EditText cursor color even if the API level is lower than 12 . Please , don ' t do * this at home . */ private void configureCursorColor ( ) { } }
try { Field f = TextView . class . getDeclaredField ( "mCursorDrawableRes" ) ; f . setAccessible ( true ) ; f . set ( et_filter , R . drawable . edit_text_cursor_color ) ; } catch ( Exception e ) { Log . e ( LOGTAG , "Error trying to change cursor color text cursor drawable to null." ) ; }
public class ClassCacheManager { /** * Finds command by FQCN and if not found loads the class and store the instance in * the cache . * @ param name - fully qualified class name of the command * @ return initialized class instance */ public Command findCommand ( String name , ClassLoader cl ) { } }
synchronized ( commandCache ) { if ( ! commandCache . containsKey ( name ) ) { try { Command commandInstance = ( Command ) Class . forName ( name , true , cl ) . newInstance ( ) ; commandCache . put ( name , commandInstance ) ; } catch ( Exception ex ) { throw new IllegalArgumentException ( "Unknown Command implementat...
public class IntHashMap { /** * Maps the specified key to the specified value . * @ param key the key . * @ param value the value . * @ return the value of any previous mapping with the specified key or { @ code null } if there was no such * mapping . */ public V put ( final int key , final V value ) { } }
int index = ( key & 0x7FFFFFFF ) % elementData . length ; IntEntry < V > entry = elementData [ index ] ; while ( entry != null && key != entry . key ) { entry = entry . nextInSlot ; } if ( entry == null ) { if ( ++ elementCount > threshold ) { rehash ( ) ; index = ( key & 0x7FFFFFFF ) % elementData . length ; } entry =...
public class PaxWicketAppFactoryTracker { /** * < p > addingService . < / p > * @ param reference a { @ link org . osgi . framework . ServiceReference } object . * @ param service a { @ link org . ops4j . pax . wicket . api . WebApplicationFactory } object . */ public void addingService ( ServiceReference < WebAppl...
PaxWicketApplicationFactory internalFactory = PaxWicketApplicationFactory . createPaxWicketApplicationFactory ( context , service , reference ) ; addApplication ( reference , internalFactory ) ;
public class AmazonEC2Client { /** * Describes the specified attribute of the specified volume . You can specify only one attribute at a time . * For more information about EBS volumes , see < a * href = " https : / / docs . aws . amazon . com / AWSEC2 / latest / UserGuide / EBSVolumes . html " > Amazon EBS Volumes...
request = beforeClientExecution ( request ) ; return executeDescribeVolumeAttribute ( request ) ;
public class aaaglobal_binding { /** * Use this API to fetch a aaaglobal _ binding resource . */ public static aaaglobal_binding get ( nitro_service service ) throws Exception { } }
aaaglobal_binding obj = new aaaglobal_binding ( ) ; aaaglobal_binding response = ( aaaglobal_binding ) obj . get_resource ( service ) ; return response ;
public class Joiner { /** * Appends the string representation of each of { @ code parts } , using the previously configured * separator between each , to { @ code appendable } . */ public < A extends Appendable > A appendTo ( A appendable , Iterable < ? > parts ) throws IOException { } }
return appendTo ( appendable , parts . iterator ( ) ) ;
public class FilePath { /** * Gets the parent file . * @ return parent FilePath or null if there is no parent */ public FilePath getParent ( ) { } }
int i = remote . length ( ) - 2 ; for ( ; i >= 0 ; i -- ) { char ch = remote . charAt ( i ) ; if ( ch == '\\' || ch == '/' ) break ; } return i >= 0 ? new FilePath ( channel , remote . substring ( 0 , i + 1 ) ) : null ;
public class ScriptableObject { /** * Sets the value of the named const property , creating it if need be . * If the property was created using defineProperty , the * appropriate setter method is called . < p > * If the property ' s attributes include READONLY , no action is * taken . * This method will actua...
if ( putConstImpl ( name , 0 , start , value , READONLY ) ) return ; if ( start == this ) throw Kit . codeBug ( ) ; if ( start instanceof ConstProperties ) ( ( ConstProperties ) start ) . putConst ( name , start , value ) ; else start . put ( name , start , value ) ;
public class AsmClassGenerator { /** * Visits a bare ( unqualified ) variable expression . */ public void visitVariableExpression ( VariableExpression expression ) { } }
String variableName = expression . getName ( ) ; // SPECIAL CASES // " this " for static methods is the Class instance ClassNode classNode = controller . getClassNode ( ) ; // if ( controller . isInClosure ( ) ) classNode = controller . getOutermostClass ( ) ; if ( variableName . equals ( "this" ) ) { if ( controller ....
public class PresenterManager { /** * Get the ViewState ( see mosby viestate modlue ) for the View with the given ( Mosby - internal ) * view Id or < code > null < / code > * if no viewstate for the given view exists . * @ param activity The Activity ( used for scoping ) * @ param viewId The mosby internal View...
if ( activity == null ) { throw new NullPointerException ( "Activity is null" ) ; } if ( viewId == null ) { throw new NullPointerException ( "View id is null" ) ; } ActivityScopedCache scopedCache = getActivityScope ( activity ) ; return scopedCache == null ? null : ( VS ) scopedCache . getViewState ( viewId ) ;
public class PropertyBundle { /** * / * [ deutsch ] * < p > Ermittelt , ob zum angegebenen Schl & uuml ; ssel ein Eigenschaftenwert vorhanden ist . < / p > * @ param key the key of property resource * @ return { @ code true } if the property for given key exists else { @ code false } */ public boolean containsKey...
if ( key == null ) { throw new NullPointerException ( "Missing resource key." ) ; } PropertyBundle p = this ; do { String value = p . key2values . get ( key ) ; if ( value != null ) { return true ; } } while ( ( p = p . parent ) != null ) ; return false ;
public class JsonModelGenerator { /** * Decamelize string . < br > * example , " fooBar " to " foo _ bar " . * @ param str * @ return decamelized string * @ author vvakame */ String decamelize ( String str ) { } }
StringBuilder builder = new StringBuilder ( ) ; int len = str . length ( ) ; for ( int i = 0 ; i < len ; i ++ ) { char c = str . charAt ( i ) ; if ( 'A' <= c && c <= 'Z' ) { builder . append ( '_' ) . append ( Character . toLowerCase ( c ) ) ; } else { builder . append ( c ) ; } } return builder . toString ( ) ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcSurfaceStyleRefraction ( ) { } }
if ( ifcSurfaceStyleRefractionEClass == null ) { ifcSurfaceStyleRefractionEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 680 ) ; } return ifcSurfaceStyleRefractionEClass ;
public class ReferenceBuilder { /** * Adds a { @ link SomeValueSnak } with the given property to the constructed * reference . * Note that it might not be meaningful to use { @ link SomeValueSnak } in a * reference , depending on the policies of the wiki . * @ param propertyIdValue * the property of the snak ...
getSnakList ( propertyIdValue ) . add ( factory . getSomeValueSnak ( propertyIdValue ) ) ; return getThis ( ) ;
public class WebContainer { /** * Deactivate the web container as a DS component . * Post a stopped event . Deactivate all child services . Clear the * web container singleton . * @ param componentContext The component context of the deactivation . */ @ FFDCIgnore ( Exception . class ) public void deactivate ( Co...
String methodName = "deactivate" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Deactivating the WebContainer bundle" ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , methodName , "Posting STOPPED_EVENT" ) ; } Event e...
public class JAXBMarshallerHelper { /** * Set the standard property for marshalling a fragment only . * @ param aMarshaller * The marshaller to set the property . May not be < code > null < / code > . * @ param bFragment * the value to be set */ public static void setFragment ( @ Nonnull final Marshaller aMarsh...
_setProperty ( aMarshaller , Marshaller . JAXB_FRAGMENT , Boolean . valueOf ( bFragment ) ) ;
public class CSIv2SubsystemFactory { /** * { @ inheritDoc } */ @ Override protected Set < String > extractSslRefs ( Map < String , Object > properties , List < IIOPEndpoint > endpoints ) { } }
Set < String > result = new HashSet < String > ( ) ; for ( IIOPEndpoint endpoint : endpoints ) { for ( Map < String , Object > iiopsOptions : endpoint . getIiopsOptions ( ) ) { String sslAliasName = ( String ) iiopsOptions . get ( "sslRef" ) ; if ( sslAliasName == null ) sslAliasName = defaultAlias ; result . add ( ssl...
public class EasyAdapterUtil { /** * Parses the layout ID annotation form the itemViewHolderClass */ public static Integer parseItemLayoutId ( Class < ? extends ItemViewHolder > itemViewHolderClass ) { } }
Integer itemLayoutId = ClassAnnotationParser . getLayoutId ( itemViewHolderClass ) ; if ( itemLayoutId == null ) { throw new LayoutIdMissingException ( ) ; } return itemLayoutId ;
public class PairCounter { /** * Returns the concatenated index of the two elements . */ private long getIndex ( T x , T y ) { } }
int i = elementIndices . index ( x ) ; int j = elementIndices . index ( y ) ; long index = ( ( ( long ) i ) << 32 ) | j ; return index ;
public class SegmentMetadataUpdateTransaction { /** * Accepts a StreamSegmentAppendOperation in the metadata . * @ param operation The operation to accept . * @ throws MetadataUpdateException If the operation SegmentOffset is different from the current Segment Length . * @ throws IllegalArgumentException If the o...
ensureSegmentId ( operation ) ; if ( operation . getStreamSegmentOffset ( ) != this . length ) { throw new MetadataUpdateException ( this . containerId , String . format ( "SegmentAppendOperation offset mismatch. Expected %d, actual %d." , this . length , operation . getStreamSegmentOffset ( ) ) ) ; } this . length += ...
public class PackageInfo { /** * Add annotations found in a package descriptor classfile . * @ param packageAnnotations * the package annotations */ void addAnnotations ( final AnnotationInfoList packageAnnotations ) { } }
// Currently only class annotations are used in the package - info . class file if ( packageAnnotations != null && ! packageAnnotations . isEmpty ( ) ) { if ( this . annotationInfo == null ) { this . annotationInfo = new AnnotationInfoList ( packageAnnotations ) ; } else { this . annotationInfo . addAll ( packageAnnota...
public class FeatureTableCoreIndex { /** * Get the table index * @ return table index */ public TableIndex getTableIndex ( ) { } }
TableIndex tableIndex = null ; try { if ( tableIndexDao . isTableExists ( ) ) { tableIndex = tableIndexDao . queryForId ( tableName ) ; } } catch ( SQLException e ) { throw new GeoPackageException ( "Failed to query for Table Index for GeoPackage: " + geoPackage . getName ( ) + ", Table Name: " + tableName + ", Column ...
public class TypeLibInfo { /** * Locates the type library file from the LIBID ( a GUID ) and an optional version number . * @ param libid * String of the form " xxxxx - xxxx - xxxx - xxxx - xxxxx " * @ param version * Optional version number . If null , the function searches for the latest version . * @ throw...
// make sure to load the com4j . dll COM4J . IID_IUnknown . toString ( ) ; // check if libid is correct if ( libid == null ) throw new IllegalArgumentException ( ) ; String libKey = "TypeLib\\" + libid ; try { Native . readRegKey ( libKey ) ; } catch ( ComException e ) { throw new BindingException ( Messages . INVALID_...
public class ProcBase { /** * Throws a ProcError exception if { @ code args . length ! = count } * @ param args * @ param count */ protected void assertArgCount ( Object [ ] args , int count ) { } }
if ( args . length != count ) { throw illegalArgumentException ( String . format ( "Wrong number of arguments, expected %d got %d" , count , args . length ) ) ; }
public class LocalSegmentContainerManager { /** * region Helpers */ private void unregisterHandle ( ContainerHandle handle ) { } }
synchronized ( this . handles ) { assert this . handles . containsKey ( handle . getContainerId ( ) ) : "found unregistered handle " + handle . getContainerId ( ) ; this . handles . remove ( handle . getContainerId ( ) ) ; } log . info ( "Container {} has been unregistered." , handle . getContainerId ( ) ) ;
public class WebSiteManagementClientImpl { /** * Gets a list of meters for a given location . * Gets a list of meters for a given location . * @ param billingLocation Azure Location of billable resource * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the...
return listBillingMetersSinglePageAsync ( billingLocation ) . concatMap ( new Func1 < ServiceResponse < Page < BillingMeterInner > > , Observable < ServiceResponse < Page < BillingMeterInner > > > > ( ) { @ Override public Observable < ServiceResponse < Page < BillingMeterInner > > > call ( ServiceResponse < Page < Bil...
public class HighTideNode { /** * Full sync of specified policy */ void doFullSync ( PolicyInfo pinfo ) throws IOException { } }
Path srcPath = pinfo . getSrcPath ( ) ; LOG . info ( "Starting fullsync of srcPath " + srcPath ) ; FileSystem srcFs = srcPath . getFileSystem ( pinfo . getConf ( ) ) ; int srcRepl = Integer . parseInt ( pinfo . getProperty ( "replication" ) ) ; long modTimePeriod = Long . parseLong ( pinfo . getProperty ( "modTimePerio...
public class LinerLogFormatter { /** * 2015-10-23 01:59:12,746 [ main ] INFO ( AbstractProtocol @ start ( ) ) - . . . */ @ Override public synchronized String format ( LogRecord record ) { } }
cachedDate . setTime ( record . getMillis ( ) ) ; final StringBuilder sb = new StringBuilder ( ) ; sb . append ( cachedFormat . format ( cachedDate ) ) ; sb . append ( " [" ) . append ( Thread . currentThread ( ) . getName ( ) ) . append ( "]" ) ; sb . append ( " " ) . append ( record . getLevel ( ) . getName ( ) ) ; s...
public class Cron4jNow { @ Override public List < LaJobHistory > searchJobHistoryList ( ) { } }
final Supplier < List < LaJobHistory > > nativeSearcher = ( ) -> Cron4jJobHistory . list ( ) ; return jobRunner . getHistoryHook ( ) . map ( hook -> { return hook . hookList ( nativeSearcher ) ; } ) . orElseGet ( ( ) -> { return nativeSearcher . get ( ) ; } ) ;
public class JsfFaceletScannerPlugin { /** * Normalize file paths like the jqassistant core ( e . g . replace backslashs , * add leading slash ) . * @ param path * the path to normalize * @ return the normalized path */ private String normalizeFilePath ( final String path ) { } }
String normalizedPath = path . replace ( '\\' , '/' ) ; if ( ! normalizedPath . startsWith ( "/" ) ) { normalizedPath = "/" + normalizedPath ; } return normalizedPath ;
public class CmsShellCommands { /** * Creates a new folder in the given target folder . < p > * @ param targetFolder the target folder * @ param folderName the new folder to create in the target folder * @ return the created folder * @ throws Exception if somthing goes wrong */ @ SuppressWarnings ( "deprecation...
if ( m_cms . existsResource ( targetFolder + folderName ) ) { m_shell . getOut ( ) . println ( getMessages ( ) . key ( Messages . GUI_SHELL_FOLDER_ALREADY_EXISTS_1 , targetFolder + folderName ) ) ; return null ; } return m_cms . createResource ( targetFolder + folderName , CmsResourceTypeFolder . getStaticTypeId ( ) ) ...
public class URIUtils { /** * Parse the URI and get all the parameters in map form . Query name - & gt ; List of Query values . * @ param rawQuery query portion of the uri to analyze . */ public static Multimap < String , String > getParameters ( final String rawQuery ) { } }
Multimap < String , String > result = HashMultimap . create ( ) ; if ( rawQuery == null ) { return result ; } StringTokenizer tokens = new StringTokenizer ( rawQuery , "&" ) ; while ( tokens . hasMoreTokens ( ) ) { String pair = tokens . nextToken ( ) ; int pos = pair . indexOf ( '=' ) ; String key ; String value ; if ...
public class SimpleZeroSwap { /** * This method returns the value random variable of the product within the specified model , evaluated at a given evalutationTime . * Note : For a lattice this is often the value conditional to evalutationTime , for a Monte - Carlo simulation this is the ( sum of ) value discounted to...
RandomVariableInterface values = model . getRandomVariableForConstant ( 0.0 ) ; RandomVariableInterface notional = model . getRandomVariableForConstant ( 1.0 ) ; for ( int period = 0 ; period < fixingDates . length ; period ++ ) { double fixingDate = fixingDates [ period ] ; double paymentDate = paymentDates [ period ]...
public class TouchActions { /** * Allows the view to be scrolled by an x and y offset . * @ param xOffset The horizontal offset relative to the viewport * @ param yOffset The vertical offset relative to the viewport * @ return self */ public TouchActions scroll ( int xOffset , int yOffset ) { } }
if ( touchScreen != null ) { action . addAction ( new ScrollAction ( touchScreen , xOffset , yOffset ) ) ; } return this ;
public class Parser { /** * Scans the given token global token stream for a list of sub - token * streams representing those portions of the global stream that * may contain date time information * @ param stream * @ return */ private List < TokenStream > collectTokenStreams ( TokenStream stream ) { } }
// walk through the token stream and build a collection // of sub token streams that represent possible date locations List < Token > currentGroup = null ; List < List < Token > > groups = new ArrayList < List < Token > > ( ) ; Token currentToken ; int currentTokenType ; StringBuilder tokenString = new StringBuilder ( ...
public class ConsentDecisionCouchDbRepository { /** * Find the first consent decision for a given principal , service pair . Should only be one of them anyway . * @ param principal User to search for . * @ param service Service name to search for . * @ return Consent decision matching the given principal and serv...
val view = createQuery ( "by_consent_decision" ) . key ( ComplexKey . of ( principal , service ) ) . limit ( 1 ) . includeDocs ( true ) ; return db . queryView ( view , CouchDbConsentDecision . class ) . stream ( ) . findFirst ( ) . orElse ( null ) ;
public class OrmDescriptorImpl { /** * Returns all < code > sequence - generator < / code > elements * @ return list of < code > sequence - generator < / code > */ public List < SequenceGenerator < OrmDescriptor > > getAllSequenceGenerator ( ) { } }
List < SequenceGenerator < OrmDescriptor > > list = new ArrayList < SequenceGenerator < OrmDescriptor > > ( ) ; List < Node > nodeList = model . get ( "sequence-generator" ) ; for ( Node node : nodeList ) { SequenceGenerator < OrmDescriptor > type = new SequenceGeneratorImpl < OrmDescriptor > ( this , "sequence-generat...
public class ArtifactoryController { /** * Creating a configuration */ @ RequestMapping ( value = "configurations/create" , method = RequestMethod . POST ) public ArtifactoryConfiguration newConfiguration ( @ RequestBody ArtifactoryConfiguration configuration ) { } }
return configurationService . newConfiguration ( configuration ) ;
public class SecurityAcl { /** * ( non - Javadoc ) * @ see * nyla . solutions . core . security . data . Acl # addEntry ( java . security . Principal , * java . security . Principal , java . lang . String ) */ @ Override public synchronized boolean addEntry ( Principal caller , Principal principal , String permis...
return addEntry ( caller , new SecurityAccessControl ( principal , permission ) ) ;
public class LdapUtils { /** * New search executor search executor . * @ param baseDn the base dn * @ param filterQuery the filter query * @ return the search executor */ public static SearchExecutor newLdaptiveSearchExecutor ( final String baseDn , final String filterQuery ) { } }
return newLdaptiveSearchExecutor ( baseDn , filterQuery , new ArrayList < > ( 0 ) ) ;
public class Channel { @ Override public long getEstimatedOutputSize ( ) { } }
long estimate = this . source . template . getEstimatedOutputSize ( ) ; return estimate < 0 ? estimate : estimate * this . replicationFactor ;
public class AbstractMavenScroogeMojo { /** * Walk project references recursively , building up a list of thrift files they provide , starting * with an empty file list . */ protected List < File > getRecursiveThriftFiles ( MavenProject project , String outputDirectory ) throws IOException { } }
return getRecursiveThriftFiles ( project , outputDirectory , new ArrayList < File > ( ) ) ;
public class GenericGenerators { /** * Generates instructions to pop { @ code count } items off the stack . * @ param count number of items to pop * @ return instructions for a pop * @ throws IllegalArgumentException if any numeric argument is negative */ public static InsnList pop ( int count ) { } }
Validate . isTrue ( count >= 0 ) ; InsnList ret = new InsnList ( ) ; for ( int i = 0 ; i < count ; i ++ ) { ret . add ( new InsnNode ( Opcodes . POP ) ) ; } return ret ;
public class ReloadableResourceBundleMessageSource { /** * Resolves the given message code as key in the retrieved bundle files , * returning the value found in the bundle as - is ( without MessageFormat parsing ) . */ @ Override protected String resolveCodeWithoutArguments ( String code , Locale locale ) { } }
if ( this . cacheMillis < 0 ) { PropertiesHolder propHolder = getMergedProperties ( locale ) ; String result = propHolder . getProperty ( code ) ; if ( result != null ) { return result ; } } else { for ( String basename : this . basenames ) { List < Pair < String , Resource > > filenamesAndResources = calculateAllFilen...
public class FileFinder { /** * Looks up files whose name matches the given pattern under the given set * of directories ( and , if specified , their sub - directories in a recursive way ) . * @ param pattern * the name of the file , as a regular expression . * @ param recurse * whether the finder should recu...
List < File > files = new ArrayList < > ( ) ; if ( roots != null ) { for ( String root : roots ) { try { Path path = FileSystems . getDefault ( ) . getPath ( root ) ; logger . trace ( "scanning directory {}" , path . getFileName ( ) ) ; Files . walkFileTree ( path , new FileFinderVisitor ( pattern , files ) ) ; } catch...
public class SharedDataContextUtils { /** * Copies the source file to a file , replacing the @ key . X @ tokens with the values from the data * context * @ param script source file path * @ param dataContext input data context * @ param style line ending style * @ param destination destination file , or null ...
if ( null == script ) { throw new NullPointerException ( "script cannot be null" ) ; } replaceTokensInReader ( new StringReader ( script ) , dataContext , style , destination , nodeName ) ;
public class AbstractCachedGenerator { /** * Serialize the cache file mapping */ protected synchronized void serializeCacheMapping ( ) { } }
for ( Map . Entry < String , List < FilePathMapping > > entry : linkedResourceMap . entrySet ( ) ) { StringBuilder strb = new StringBuilder ( ) ; Iterator < FilePathMapping > iter = entry . getValue ( ) . iterator ( ) ; if ( iter . hasNext ( ) ) { for ( ; iter . hasNext ( ) ; ) { FilePathMapping fMapping = iter . next ...
public class JDBC4PreparedStatement { /** * Executes the SQL statement in this PreparedStatement object , which must be an SQL Data Manipulation Language ( DML ) statement , such as INSERT , UPDATE or DELETE ; or an SQL statement that returns nothing , such as a DDL statement . */ @ Override public int executeUpdate ( ...
checkClosed ( ) ; if ( ! this . Query . isOfType ( VoltSQL . TYPE_EXEC , VoltSQL . TYPE_UPDATE ) ) { throw SQLError . get ( SQLError . ILLEGAL_STATEMENT , this . Query . toSqlString ( ) ) ; } int result = this . executeUpdate ( this . Query . getExecutableQuery ( this . parameters ) ) ; this . parameters = this . Query...
public class Utils { /** * Return an InputStream of the specified resource , failing if it can ' t be found . * @ param clzz * @ param location * Location of resource */ public static InputStream getRequiredResourceAsStream ( Class < ? > clzz , String location ) { } }
InputStream resourceStream = clzz . getResourceAsStream ( location ) ; if ( resourceStream == null ) { // Try with a leading " / " if ( ! location . startsWith ( "/" ) ) { resourceStream = clzz . getResourceAsStream ( "/" + location ) ; } if ( resourceStream == null ) { throw new RuntimeException ( "Resource file was n...
public class Transaction { /** * Gets the transaction weight as defined in BIP141. */ public int getWeight ( ) { } }
if ( ! hasWitnesses ( ) ) return getMessageSize ( ) * 4 ; try ( final ByteArrayOutputStream stream = new UnsafeByteArrayOutputStream ( length ) ) { bitcoinSerializeToStream ( stream , false ) ; final int baseSize = stream . size ( ) ; stream . reset ( ) ; bitcoinSerializeToStream ( stream , true ) ; final int totalSize...
public class PatchSchedulesInner { /** * Gets all patch schedules in the specified redis cache ( there is only one ) . * ServiceResponse < PageImpl < RedisPatchScheduleInner > > * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if pa...
if ( nextPageLink == null ) { throw new IllegalArgumentException ( "Parameter nextPageLink is required and cannot be null." ) ; } String nextUrl = String . format ( "%s" , nextPageLink ) ; return service . listByRedisResourceNext ( nextUrl , this . client . acceptLanguage ( ) , this . client . userAgent ( ) ) . flatMap...
public class RuntimeEnvironmentPropertyPage { /** * Save the flag that indicates if the specific project options must be * used . * @ param project the project . * @ param useSpecificOptions indicates if the specific options must be used . * @ return < code > true < / code > if the property was saved successful...
if ( project != null ) { try { project . setPersistentProperty ( qualify ( PROPERTY_NAME_HAS_PROJECT_SPECIFIC ) , Boolean . toString ( useSpecificOptions ) ) ; return true ; } catch ( CoreException e ) { SARLEclipsePlugin . getDefault ( ) . log ( e ) ; } } return false ;
public class PluginRepositoryUtil { /** * Returns < code > true < / code > if the class contains plugin annotations . * @ param clazz * The plugin class * @ return < code > true < / code > if the class contains plugin */ @ SuppressWarnings ( { } }
"rawtypes" , "unchecked" } ) private static boolean isAnnotated ( final Class clazz ) { Plugin plugin = ( Plugin ) clazz . getAnnotation ( Plugin . class ) ; return plugin != null ;
public class JSONConverter { /** * serialize a Array * @ param array Array to serialize * @ param sb * @ param serializeQueryByColumns * @ param done * @ throws ConverterException */ private void _serializeArray ( PageContext pc , Set test , Array array , StringBuilder sb , boolean serializeQueryByColumns , S...
_serializeList ( pc , test , array . toList ( ) , sb , serializeQueryByColumns , done ) ;
public class MapKeyLoader { /** * Calculates and returns the role for the map key loader on this partition */ private Role calculateRole ( ) { } }
boolean isPartitionOwner = partitionService . isPartitionOwner ( partitionId ) ; boolean isMapNamePartition = partitionId == mapNamePartition ; boolean isMapNamePartitionFirstReplica = false ; if ( hasBackup && isMapNamePartition ) { IPartition partition = partitionService . getPartition ( partitionId ) ; Address first...
public class CitrusBackend { /** * Gets the object factory instance that is configured in environment . * @ return */ private ObjectFactory getObjectFactory ( ) throws IllegalAccessException { } }
if ( Env . INSTANCE . get ( ObjectFactory . class . getName ( ) ) . equals ( CitrusObjectFactory . class . getName ( ) ) ) { return CitrusObjectFactory . instance ( ) ; } else if ( Env . INSTANCE . get ( ObjectFactory . class . getName ( ) ) . equals ( CitrusSpringObjectFactory . class . getName ( ) ) ) { return Citrus...
public class CommonOps_DSCC { /** * Checks for duplicate elements . A is sorted * @ param A Matrix to be tested . * @ return true if duplicates or false if false duplicates */ public static boolean checkDuplicateElements ( DMatrixSparseCSC A ) { } }
A = A . copy ( ) ; // create a copy so that it doesn ' t modify A A . sortIndices ( null ) ; return ! checkSortedFlag ( A ) ;
public class QueryUtil { /** * Get a linear scan query for the given distance query . * @ param < O > Object type * @ param distanceQuery distance query * @ return Range query */ @ SuppressWarnings ( "unchecked" ) public static < O > RangeQuery < O > getLinearScanRangeQuery ( DistanceQuery < O > distanceQuery ) {...
// Slight optimizations of linear scans if ( distanceQuery instanceof PrimitiveDistanceQuery ) { final PrimitiveDistanceQuery < O > pdq = ( PrimitiveDistanceQuery < O > ) distanceQuery ; if ( EuclideanDistanceFunction . STATIC . equals ( pdq . getDistanceFunction ( ) ) ) { final PrimitiveDistanceQuery < NumberVector > ...
public class OkapiUI { /** * GEN - LAST : event _ chkReaderInitActionPerformed */ private void txtBorderWidthFocusLost ( java . awt . event . FocusEvent evt ) { } }
// GEN - FIRST : event _ txtBorderWidthFocusLost // TODO : the name ( and label ? ) of this text box no longer matches its purpose if ( txtBorderWidth . getText ( ) . matches ( "[0-9]+" ) ) { quietZoneHorizontal = Integer . parseInt ( txtBorderWidth . getText ( ) ) ; encodeData ( ) ; } else { txtBorderWidth . setText (...
public class BufferedEncoder { /** * Writes the suffix and clears the buffer for reuse . */ @ Override final public void writeSuffixTo ( Appendable out ) throws IOException { } }
writeSuffix ( buffer , out ) ; buffer . setLength ( 0 ) ;
public class TaskClient { /** * Ack for the task poll . * @ param taskId Id of the task to be polled * @ param workerId user identified worker . * @ return true if the task was found with the given ID and acknowledged . False otherwise . If the server returns false , the client should NOT attempt to ack again . *...
Preconditions . checkArgument ( StringUtils . isNotBlank ( taskId ) , "Task id cannot be blank" ) ; TaskServicePb . AckTaskRequest . Builder request = TaskServicePb . AckTaskRequest . newBuilder ( ) ; request . setTaskId ( taskId ) ; if ( workerId != null ) { request . setWorkerId ( workerId ) ; } return stub . ackTask...
public class DocumentConventions { /** * Gets the collection name for a given type . * @ param clazz Class * @ return collection name */ public String getCollectionName ( Class clazz ) { } }
String collectionName = _findCollectionName . apply ( clazz ) ; if ( collectionName != null ) { return collectionName ; } return defaultGetCollectionName ( clazz ) ;
public class Config { /** * Set configuration object attribute . If attribute already exists overwrite old value . Empty value is not accepted * but null is considered indication to remove attribute . So that , an existing attribute cannot be either null or * empty . * @ param name attribute name , * @ param va...
Params . notNullOrEmpty ( name , "Attribute name" ) ; Params . notEmpty ( value , "Attribute value" ) ; if ( value != null ) { attributes . put ( name , value ) ; } else { attributes . remove ( name ) ; }
public class ExtensionsConfigFileReader { /** * This method corresponds to an iteration of the loop at line 2212 Notes : * 1 . [ general ] and [ globals ] are allowed to be a context here if they * contain only configvariables 2 . switch and ignorepat are treated like * regular ConfigVariable . */ @ Override prot...
ConfigElement configElement ; if ( ( line . trim ( ) . startsWith ( "exten" ) || line . trim ( ) . startsWith ( "include" ) ) && currentCategory != null && ( currentCategory . getName ( ) . equals ( "general" ) || currentCategory . getName ( ) . equals ( "globals" ) ) ) throw new ConfigParseException ( configfile , lin...
public class PactDslRootValue { /** * Value that must be encoded as an UUID * @ param uuid example UUID to use for generated bodies */ public static PactDslRootValue uuid ( String uuid ) { } }
if ( ! uuid . matches ( UUID_REGEX ) ) { throw new InvalidMatcherException ( EXAMPLE + uuid + "\" is not an UUID" ) ; } PactDslRootValue value = new PactDslRootValue ( ) ; value . setValue ( uuid ) ; value . setMatcher ( value . regexp ( UUID_REGEX ) ) ; return value ;