signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ExportApi { /** * Export users . * Export the specified users with the properties you list in the * * fields * * parameter . * @ param fields fields . * @ param fileName the file name to be exported . * @ param personDBIDs DBIDs of users to be exported . * @ param filterParameters Filter paramete...
try { ExportFileResponse resp = exportApi . exportFile ( new ExportFileData ( ) . fields ( fields ) . fileName ( fileName ) . personDBIDs ( personDBIDs ) . filterParameters ( Converters . convertExportFilterParamsToExportFileDataFilterParameters ( filterParameters ) ) ) ; if ( ! resp . getStatus ( ) . getCode ( ) . equ...
public class RectifyImageOps { /** * Creates a transform that applies rectification to unrectified distorted pixels and outputs * normalized pixel coordinates . * @ param param Intrinsic parameters . * @ param rectify Transform for rectifying the image . * @ param rectifyK Camera calibration matrix after rectif...
return ImplRectifyImageOps_F64 . transformPixelToRectNorm ( param , rectify , rectifyK ) ;
public class IdentityMap { /** * Returns the key for the specified value , or null if it is not in the map . Note this traverses the entire map and compares * every value , which may be an expensive operation . * @ param identity If true , uses = = to compare the specified value with values in the map . If false , ...
V [ ] valueTable = this . valueTable ; if ( value == null ) { K [ ] keyTable = this . keyTable ; for ( int i = capacity + stashSize ; i -- > 0 ; ) if ( keyTable [ i ] != null && valueTable [ i ] == null ) return keyTable [ i ] ; } else if ( identity ) { for ( int i = capacity + stashSize ; i -- > 0 ; ) if ( valueTable ...
public class CompletableFutures { /** * Get the result now , when we know for sure that the future is complete . */ public static < T > T getCompleted ( CompletionStage < T > stage ) { } }
CompletableFuture < T > future = stage . toCompletableFuture ( ) ; Preconditions . checkArgument ( future . isDone ( ) && ! future . isCompletedExceptionally ( ) ) ; try { return future . get ( ) ; } catch ( InterruptedException | ExecutionException e ) { // Neither can happen given the precondition throw new Assertion...
public class ContextAwareReporter { /** * Called whenever a new { @ link MetricContext } is added to the tree . * @ param context new { @ link MetricContext } added . */ protected void newMetricContext ( MetricContext context ) { } }
if ( this . contextFilter . matches ( context ) ) { this . contextsToReport . add ( context . getInnerMetricContext ( ) ) ; }
public class Mediawiki { /** * get the result for the given action and query * @ param action * @ param params * @ return the API result for the action * @ throws Exception */ public Api getActionResult ( String action , String params ) throws Exception { } }
Api result = this . getActionResult ( action , params , null , null ) ; return result ;
public class RoundRobinPacking { /** * Sort the components in decreasing order based on their RAM requirements * @ return The sorted list of components and their RAM requirements */ private ArrayList < ResourceRequirement > getSortedRAMComponents ( Set < String > componentNames ) { } }
ArrayList < ResourceRequirement > resourceRequirements = new ArrayList < > ( ) ; Map < String , ByteAmount > ramMap = TopologyUtils . getComponentRamMapConfig ( topology ) ; for ( String componentName : componentNames ) { resourceRequirements . add ( new ResourceRequirement ( componentName , ramMap . getOrDefault ( com...
public class FlashOverlayCreative { /** * Sets the apiFramework value for this FlashOverlayCreative . * @ param apiFramework * The API framework of the asset . This attribute is optional . */ public void setApiFramework ( com . google . api . ads . admanager . axis . v201811 . ApiFramework apiFramework ) { } }
this . apiFramework = apiFramework ;
public class CollectorServiceImpl { /** * We want to initialize the Quasi - product collector when the API starts up * so that any existing Team dashboards will be added as CollectorItems . * TODO - Is this the best home for this method ? ? */ @ PostConstruct public void initProductCollectorOnStartup ( ) { } }
Collector productCollector = collectorRepository . findByName ( "Product" ) ; if ( productCollector == null ) { productCollector = new Collector ( ) ; productCollector . setName ( "Product" ) ; productCollector . setCollectorType ( CollectorType . Product ) ; productCollector . setEnabled ( true ) ; productCollector . ...
public class DateTimeFormat { /** * Creates a formatter for the specified style . * @ param dateStyle the date style * @ param timeStyle the time style * @ return the formatter */ private static DateTimeFormatter createDateTimeFormatter ( int dateStyle , int timeStyle ) { } }
int type = DATETIME ; if ( dateStyle == NONE ) { type = TIME ; } else if ( timeStyle == NONE ) { type = DATE ; } StyleFormatter llf = new StyleFormatter ( dateStyle , timeStyle , type ) ; return new DateTimeFormatter ( llf , llf ) ;
public class StatBuckets { /** * Default is the latest result * @ param showStr * @ return */ public static String getShowTimeStr ( Integer time ) { } }
if ( time == null ) { return MINUTE_WINDOW_STR ; } else if ( time . equals ( MINUTE_WINDOW ) ) { return MINUTE_WINDOW_STR ; } else if ( time . equals ( HOUR_WINDOW ) ) { return HOUR_WINDOW_STR ; } else if ( time . equals ( DAY_WINDOW ) ) { return DAY_WINDOW_STR ; } else if ( time . equals ( ALL_TIME_WINDOW ) ) { return...
public class WindowUtil { /** * Returns true if the target widget is vertically scrolled into view . * @ param minPixels the minimum number of pixels that must be visible to count as " in view " . */ public static boolean isScrolledIntoView ( Widget target , int minPixels ) { } }
int wtop = Window . getScrollTop ( ) , wheight = Window . getClientHeight ( ) ; int ttop = target . getAbsoluteTop ( ) ; if ( ttop > wtop ) { return ( wtop + wheight - ttop > minPixels ) ; } else { return ( ttop + target . getOffsetHeight ( ) - wtop > minPixels ) ; }
public class AutotuningPCA { /** * Sort an array of doubles in descending order . * @ param a Values * @ return Values in descending order */ private static double [ ] reversed ( double [ ] a ) { } }
// TODO : there doesn ' t appear to be a nicer version in Java , unfortunately . Arrays . sort ( a ) ; for ( int i = 0 , j = a . length - 1 ; i < j ; i ++ , j -- ) { double tmp = a [ i ] ; a [ i ] = a [ j ] ; a [ j ] = tmp ; } return a ;
public class PylonStream { /** * Create a stream instance containing only a hash * @ param str the hash obtained from DataSift for a stream * @ return an instance which can be used by the client */ public static PylonStream fromString ( String str ) { } }
if ( str == null || str . isEmpty ( ) ) { throw new IllegalArgumentException ( "Cannot create a stream from an empty or null string" ) ; } PylonStream stream = new PylonStream ( ) ; stream . hash = str ; return stream ;
public class TeamDataClient { /** * Updates the MongoDB with a JSONArray received from the source system * back - end with story - based data . * @ param tmpMongoDetailArray * A JSON response in JSONArray format from the source system */ @ Override protected void updateMongoInfo ( JSONArray tmpMongoDetailArray ) ...
for ( Object obj : tmpMongoDetailArray ) { JSONObject dataMainObj = ( JSONObject ) obj ; Team team = new Team ( "" , "" ) ; /* * Checks to see if the available asset state is not active from the * V1 Response and removes it if it exists and not active : */ if ( ! getJSONString ( dataMainObj , "AssetState" ) . equalsI...
public class AbstractInputHandler { /** * / * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . impl . interfaces . ControlHandler # handleControlMessage ( com . ibm . ws . sib . trm . topology . Cellule , com . ibm . ws . sib . mfp . control . ControlMessage ) * Handle all downstream control messages i ...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "handleControlMessage" , new Object [ ] { sourceMEUuid , cMsg } ) ; // Next work out type of ControlMessage and process it ControlMessageType type = cMsg . getControlMessageType ( ) ; // First check to see whether this is an...
public class CQLService { /** * Get the { @ link PreparedStatement } for the given { @ link CQLStatementCache . Query } to * the given table name . If needed , the query statement is compiled and cached . * @ param query Query statement type . * @ param storeName Store ( ColumnFamily ) name . * @ return Prepare...
String tableName = storeToCQLName ( storeName ) ; return m_statementCache . getPreparedQuery ( tableName , query ) ;
public class ManagedPoolDataSource { /** * - - - - - internal implementation - - - - - */ private void doWait ( long loginTimeoutExpiration ) throws SQLException { } }
try { if ( loginTimeoutExpiration > 0 ) { long timeToWait = loginTimeoutExpiration - System . currentTimeMillis ( ) ; if ( timeToWait > 0 ) { this . wait ( timeToWait ) ; } else { throw new SQLException ( "No connections available within the given login timeout: " + getLoginTimeout ( ) ) ; } } else { this . wait ( ) ; ...
public class DefaultMethodConfigBuilder { /** * / * PARAMS SETTINGS METHODS */ public MethodConfigBuilder setParamsSerializer ( Class < ? extends Serializer > serializerClass ) { } }
for ( ParamConfigBuilder b : methodParamConfigBuilders ) { b . setSerializer ( serializerClass ) ; } return this ;
public class GreenPepperXmlRpcClient { /** * { @ inheritDoc } */ @ SuppressWarnings ( "unchecked" ) public Specification createSpecification ( Specification specification , String identifier ) throws GreenPepperServerException { } }
Vector params = CollectionUtil . toVector ( specification . marshallize ( ) ) ; log . debug ( "Creating Specification: " + specification . getName ( ) ) ; Vector < Object > specificationParams = ( Vector < Object > ) execute ( XmlRpcMethodName . createSpecification , params , identifier ) ; return XmlRpcDataMarshaller ...
public class OffsetCharSequence { /** * { @ inheritDoc } */ public char charAt ( int index ) { } }
if ( transform == TRANSFORM_NONE ) { return base . charAt ( index + offset ) ; } else if ( transform == TRANSFORM_LOWER_CASE ) { return Character . toLowerCase ( base . charAt ( index + offset ) ) ; } else if ( transform == TRANSFORM_UPPER_CASE ) { return Character . toUpperCase ( base . charAt ( index + offset ) ) ; }...
public class PowerMock { /** * A utility method that may be used to mock several < b > static < / b > methods * in an easy way ( by just passing in the method names of the method you * wish to mock ) . Note that you cannot uniquely specify a method to mock * using this method if there are several methods with the...
mockStatic ( clazz , Whitebox . getMethods ( clazz , methodNames ) ) ;
public class Client { /** * Returns a cursor of datapoints specified by a series filter . * < p > This endpoint allows one to request multiple series and apply an aggregation function . * The system default timezone is used for the returned DateTimes . * @ param filter The series filter * @ param interval An in...
return readDataPoints ( filter , interval , DateTimeZone . getDefault ( ) , aggregation , null , null ) ;
public class ConcurrentUtils { /** * Tests whether the specified { @ code Throwable } is a checked exception . If * not , an exception is thrown . * @ param ex the { @ code Throwable } to check * @ return a flag whether the passed in exception is a checked exception * @ throws IllegalArgumentException if the { ...
Validate . isTrue ( ex != null && ! ( ex instanceof RuntimeException ) && ! ( ex instanceof Error ) , "Not a checked exception: " + ex ) ; return ex ;
public class CmsGwtActionElement { /** * Serializes the result of the given method for RPC - prefetching . < p > * @ param method the method * @ param data the result to serialize * @ return the serialized data * @ throws SerializationException if something goes wrong */ public static String serialize ( Method ...
String result = RPC . encodeResponseForSuccess ( method , data , CmsPrefetchSerializationPolicy . instance ( ) ) ; result = CmsEncoder . escapeXml ( result , true ) ; return result ;
public class LoadBalancerRequestFilter { /** * { @ inheritDoc } */ @ Override public void filter ( ContainerRequestContext ctx ) throws IOException { } }
String scheme = getValue ( ctx . getHeaders ( ) , "x-forwarded-proto" ) ; String port = getValue ( ctx . getHeaders ( ) , "x-forwarded-port" ) ; if ( scheme == null && port == null ) return ; UriBuilder baseBuilder = ctx . getUriInfo ( ) . getBaseUriBuilder ( ) ; UriBuilder requestBuilder = ctx . getUriInfo ( ) . getRe...
public class CPDefinitionOptionRelLocalServiceUtil { /** * Returns a range of all the cp definition option rels . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they are indexes in the res...
return getService ( ) . getCPDefinitionOptionRels ( start , end ) ;
public class AopAllianceSimulatorImpl { /** * Returns some simulation response if found . * @ param mi the MethodInvocation * @ return some simulation response * @ throws Exception if something goes wrong */ public Object invoke ( MethodInvocation mi ) throws Exception { } }
Method method = mi . getMethod ( ) ; return simulatorAdapter . service ( method . getDeclaringClass ( ) . getCanonicalName ( ) , method . getName ( ) , mi . getArguments ( ) , rootPath , useRootRelativePath ) ;
public class TrxMessageHeader { /** * Return the state of this object as a properties object . * @ param strKey The key to return . * @ return The properties . */ public void putAll ( TrxMessageHeader trxHeaderToMerge ) { } }
if ( m_mapMessageHeader == null ) m_mapMessageHeader = new HashMap < String , Object > ( ) ; if ( trxHeaderToMerge . getMessageHeaderMap ( ) != null ) this . getMessageHeaderMap ( ) . putAll ( trxHeaderToMerge . getMessageHeaderMap ( ) ) ; if ( m_mapMessageInfo == null ) m_mapMessageInfo = new HashMap < String , Object...
public class CommerceCountryLocalServiceBaseImpl { /** * Deletes the commerce country from the database . Also notifies the appropriate model listeners . * @ param commerceCountry the commerce country * @ return the commerce country that was removed * @ throws PortalException */ @ Indexable ( type = IndexableType...
return commerceCountryPersistence . remove ( commerceCountry ) ;
public class CommandLineUiCallback { /** * ( non - Javadoc ) * @ see * edu . umd . cs . findbugs . IGuiCallback # showQuestionDialog ( java . lang . String , * java . lang . String , java . lang . String ) */ @ Override public String showQuestionDialog ( String message , String title , String defaultValue ) { } }
throw new UnsupportedOperationException ( ) ;
public class AbstractParser { /** * convert an xml element in Long value * @ param reader the StAX reader * @ param key The key * @ param expressions The expressions * @ return the long representing element * @ throws XMLStreamException StAX exception * @ throws ParserException in case it isn ' t a number *...
Long longValue = null ; String elementtext = rawElementText ( reader ) ; if ( key != null && expressions != null && elementtext != null && elementtext . indexOf ( "${" ) != - 1 ) expressions . put ( key , elementtext ) ; try { longValue = Long . valueOf ( getSubstitutionValue ( elementtext ) ) ; } catch ( NumberFormatE...
public class ST_AsGeoJSON { /** * Coordinates of a MultiPoint are an array of positions . * Syntax : * { " type " : " MultiPoint " , " coordinates " : [ [ 100.0 , 0.0 ] , [ 101.0 , 1.0 ] ] } * @ param multiPoint * @ param sb */ public static void toGeojsonMultiPoint ( MultiPoint multiPoint , StringBuilder sb ) ...
sb . append ( "{\"type\":\"MultiPoint\",\"coordinates\":" ) ; toGeojsonCoordinates ( multiPoint . getCoordinates ( ) , sb ) ; sb . append ( "}" ) ;
public class CmsAttributeHandler { /** * Adds a new choice attribute value . < p > * @ param reference the reference value view * @ param choicePath the path of the selected ( possibly nested ) choice attribute , consisting of attribute names */ public void addNewChoiceAttributeValue ( CmsAttributeValueView referen...
CmsValueFocusHandler . getInstance ( ) . clearFocus ( ) ; m_widgetService . addChangedOrderPath ( getSimplePath ( - 1 ) ) ; if ( isChoiceHandler ( ) ) { addChoiceOption ( reference , choicePath ) ; } else { addComplexChoiceValue ( reference , choicePath ) ; } updateButtonVisisbility ( ) ; CmsUndoRedoHandler handler = C...
public class Resource { /** * doesnt exist . Otherwise , the URL will fail on the first access . */ private static boolean resourceExist ( ExternalContext externalContext , String path ) { } }
if ( "/" . equals ( path ) ) { // The root context exists always return true ; } Object ctx = externalContext . getContext ( ) ; if ( ctx instanceof ServletContext ) { ServletContext servletContext = ( ServletContext ) ctx ; InputStream stream = servletContext . getResourceAsStream ( path ) ; if ( stream != null ) { tr...
public class EJBModuleMetaDataImpl { /** * Adds a list of timer method metadata for a bean belonging to this * application . This method will only be called for beans that contain * automatic timers . * @ param timerBean the list of timer method metadata */ public void addAutomaticTimerBean ( AutomaticTimerBean t...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "addAutomaticTimerBean: " + timerBean . getBeanMetaData ( ) . j2eeName ) ; if ( ivAutomaticTimerBeans == null ) { ivAutomaticTimerBeans = new ArrayList < AutomaticTimerBean > ( ) ; } ivHasNonPersistentAutomaticTimers |= timerBe...
public class CloudRedisClient { /** * Updates the metadata and configuration of a specific Redis instance . * < p > Completed longrunning . Operation will contain the new instance object in the response field . * The returned operation is automatically deleted after a few hours , so there is no need to call * Del...
return updateInstanceOperationCallable ( ) . futureCall ( request ) ;
public class GCPARCImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case AfplibPackage . GCPARC__XCENT : setXCENT ( ( Integer ) newValue ) ; return ; case AfplibPackage . GCPARC__YCENT : setYCENT ( ( Integer ) newValue ) ; return ; case AfplibPackage . GCPARC__MH : setMH ( ( Integer ) newValue ) ; return ; case AfplibPackage . GCPARC__MFR : setMFR ( ( Integer ) n...
public class SqlManagerImpl { /** * Sets the value types . * @ param valueTypes the value types to set . * @ throws IllegalArgumentException if the { @ code valueTypes } is { @ code null } or * an element in the { @ code valueTypes } is { @ code null } */ public void setValueTypes ( List < ValueType < ? > > value...
Validate . noNullElements ( valueTypes ) ; this . sqlExecutor . setValueTypes ( valueTypes ) ; this . callExecutor . setValueTypes ( valueTypes ) ;
public class SimonDataGenerator { /** * Stacked stopwatches to test call tree . */ public void addStackedSimons ( ) { } }
Split splitA = SimonManager . getStopwatch ( "Y.A" ) . start ( ) ; Split splitB = SimonManager . getStopwatch ( "Y.B" ) . start ( ) ; addStopwatchSplits ( SimonManager . getStopwatch ( "Y.C" ) , 6 ) ; splitB . stop ( ) ; Split splitD = SimonManager . getStopwatch ( "Y.D" ) . start ( ) ; randomWait ( 100 , 250 ) ; rando...
public class SearchHandler { /** * Compares three categories with decreasing priority from the first to the last category . * { @ see developer reference } for further information * @ param setting category to return , if settingsMatch is chosen * @ param group category to return , if groupMatch is chosen * @ p...
LOGGER . trace ( String . format ( "compareMatches: settingMatch: %s, groupMatch: %s, " + "categoryMatch: %s" , settingMatch , groupMatch , categoryMatch ) ) ; if ( settingMatch == 0 && groupMatch == 0 && categoryMatch == 0 ) { // if all values are 0 return null ; // if all values are equal to each other } else if ( se...
public class FringeConfiguration { /** * If the first base tileset fringes upon the second , return the * fringe priority of the first base tileset , otherwise return - 1. */ public int fringesOn ( int first , int second ) { } }
FringeRecord f1 = _frecs . get ( first ) ; // we better have a fringe record for the first if ( null != f1 ) { // it had better have some tilesets defined if ( f1 . tilesets . size ( ) > 0 ) { FringeRecord f2 = _frecs . get ( second ) ; // and we only fringe if second doesn ' t exist or has a lower // priority if ( ( n...
public class CompareAssert { /** * { @ inheritDoc } * @ see DiffBuilder # withNamespaceContext ( Map ) */ @ Override public CompareAssert withNamespaceContext ( Map < String , String > prefix2Uri ) { } }
diffBuilder . withNamespaceContext ( prefix2Uri ) ; return this ;
public class LineItemSummary { /** * Gets the deliveryRateType value for this LineItemSummary . * @ return deliveryRateType * The strategy for delivering ads over the course of the line * item ' s duration . This attribute is * optional and defaults to { @ link DeliveryRateType # EVENLY } * or * { @ link Deli...
return deliveryRateType ;
public class FunctionToBlockMutator { /** * Inlines the arguments within the node tree using the given argument map , * replaces " unsafe " names with local aliases . * The aliases for unsafe require new VAR declarations , so this function * can not be used in for direct CALL node replacement as VAR nodes can not...
if ( namesToAlias == null || namesToAlias . isEmpty ( ) ) { // There are no names to alias , just inline the arguments directly . Node result = FunctionArgumentInjector . inject ( compiler , fnTemplateRoot , null , argMap ) ; checkState ( result == fnTemplateRoot ) ; return result ; } else { // Create local alias of na...
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link X3DMaterialType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link X3DMaterialType } { @ code > } *...
return new JAXBElement < X3DMaterialType > ( _X3DMaterial_QNAME , X3DMaterialType . class , null , value ) ;
public class Datatype_Builder { /** * Adds each element of { @ code elements } to the list to be returned from { @ link * Datatype # getValueTypeAnnotations ( ) } . * @ return this { @ code Builder } object * @ throws NullPointerException if { @ code elements } is null or contains a null element */ public Datatyp...
if ( ( elements . characteristics ( ) & Spliterator . SIZED ) != 0 ) { long elementsSize = elements . estimateSize ( ) ; if ( elementsSize > 0 && elementsSize <= Integer . MAX_VALUE ) { if ( valueTypeAnnotations instanceof ImmutableList ) { valueTypeAnnotations = new ArrayList < > ( valueTypeAnnotations ) ; } ( ( Array...
public class OMVRBTreeSet { /** * Save the state of the { @ code OTreeSet } instance to a stream ( that is , serialize it ) . * @ serialData Emits the comparator used to order this set , or { @ code null } if it obeys its elements ' natural ordering ( Object ) , * followed by the size of the set ( the number of ele...
// Write out any hidden stuff s . defaultWriteObject ( ) ; // Write out Comparator s . writeObject ( m . comparator ( ) ) ; // Write out size s . writeInt ( m . size ( ) ) ; // Write out all elements in the proper order . for ( Iterator < E > i = m . keySet ( ) . iterator ( ) ; i . hasNext ( ) ; ) s . writeObject ( i ....
public class BoxLegalHoldPolicy { /** * Creates a new ongoing Legal Hold Policy . * @ param api the API connection to be used by the resource . * @ param name the name of Legal Hold Policy . * @ param description the description of Legal Hold Policy . * @ return information about the Legal Hold Policy created ....
URL url = ALL_LEGAL_HOLD_URL_TEMPLATE . build ( api . getBaseURL ( ) ) ; BoxJSONRequest request = new BoxJSONRequest ( api , url , "POST" ) ; JsonObject requestJSON = new JsonObject ( ) . add ( "policy_name" , name ) . add ( "is_ongoing" , true ) ; if ( description != null ) { requestJSON . add ( "description" , descri...
public class IdentityStoreHandlerServiceImpl { /** * Returns the partial subject for hashtable login * @ param username * @ param password * @ return the partial subject which can be used for hashtable login if username and password are valid . * @ throws com . ibm . ws . security . authentication . Authenticat...
UsernamePasswordCredential credential = new UsernamePasswordCredential ( username , password ) ; return createHashtableInSubject ( credential ) ;
public class EndpointGroupMarshaller { /** * Marshall the given parameter object . */ public void marshall ( EndpointGroup endpointGroup , ProtocolMarshaller protocolMarshaller ) { } }
if ( endpointGroup == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( endpointGroup . getEndpointGroupArn ( ) , ENDPOINTGROUPARN_BINDING ) ; protocolMarshaller . marshall ( endpointGroup . getEndpointGroupRegion ( ) , ENDPOINTGROUPREGION_BIN...
public class ManagementSecurityAuthorizationTable { /** * Clear the authorization table . */ private void clearAuthorizationTable ( ) { } }
accessIdToRoles . clear ( ) ; userToAccessId . clear ( ) ; groupToAccessId . clear ( ) ; userToRoles . clear ( ) ; groupToRoles . clear ( ) ;
public class ReadStreamOld { /** * Reads a line , returning a string . */ public String readLineNoChop ( ) throws IOException { } }
CharBuffer cb = new CharBuffer ( ) ; if ( readLine ( cb , false ) ) return cb . toString ( ) ; else if ( cb . length ( ) == 0 ) return null ; else return cb . toString ( ) ;
public class ZSocket { /** * { @ inheritDoc } */ @ Override public void close ( ) { } }
if ( isClosed . compareAndSet ( false , true ) ) { ManagedContext . getInstance ( ) . destroy ( socketBase ) ; }
public class JournalSegmentFile { /** * Returns a boolean value indicating whether the given file appears to be a parsable segment file . * @ param journalName the name of the journal * @ param fileName the name of the file to check * @ throws NullPointerException if { @ code file } is null */ public static boole...
checkNotNull ( journalName , "journalName cannot be null" ) ; checkNotNull ( fileName , "fileName cannot be null" ) ; int partSeparator = fileName . lastIndexOf ( PART_SEPARATOR ) ; int extensionSeparator = fileName . lastIndexOf ( EXTENSION_SEPARATOR ) ; if ( extensionSeparator == - 1 || partSeparator == - 1 || extens...
public class Plane4d { /** * Replies the pivot point around which the rotation must be done . * @ return a reference on the buffered pivot point . */ @ Override public Point3d getPivot ( ) { } }
Point3d pivot = this . cachedPivot == null ? null : this . cachedPivot . get ( ) ; if ( pivot == null ) { pivot = getProjection ( 0. , 0. , 0. ) ; this . cachedPivot = new WeakReference < > ( pivot ) ; } return pivot ;
public class SourceFileSpecifierMarshaller { /** * Marshall the given parameter object . */ public void marshall ( SourceFileSpecifier sourceFileSpecifier , ProtocolMarshaller protocolMarshaller ) { } }
if ( sourceFileSpecifier == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( sourceFileSpecifier . getFilePath ( ) , FILEPATH_BINDING ) ; protocolMarshaller . marshall ( sourceFileSpecifier . getIsMove ( ) , ISMOVE_BINDING ) ; } catch ( Excep...
public class JAXRSClientFactoryBean { /** * Create a Client instance . Proxies and WebClients are Clients . * @ param varValues optional list of values which will be used to substitute * template variables specified in the class - level JAX - RS Path annotations * @ return the client */ public Client createWithVa...
serviceFactory . setBus ( getBus ( ) ) ; checkResources ( false ) ; ClassResourceInfo cri = null ; try { Endpoint ep = createEndpoint ( ) ; if ( getServiceClass ( ) != null ) { for ( ClassResourceInfo info : serviceFactory . getClassResourceInfo ( ) ) { if ( info . getServiceClass ( ) . isAssignableFrom ( getServiceCla...
public class ByteArrayUtil { /** * Decode long from byte array at offset * @ param ba byte array * @ param offset Offset * @ return long value */ public static long decodeLong ( byte [ ] ba , int offset ) { } }
return ( ( ( ( long ) ba [ offset + 0 ] << 56 ) + ( ( long ) ( ba [ offset + 1 ] & 255 ) << 48 ) + ( ( long ) ( ba [ offset + 2 ] & 255 ) << 40 ) + ( ( long ) ( ba [ offset + 3 ] & 255 ) << 32 ) + ( ( long ) ( ba [ offset + 4 ] & 255 ) << 24 ) + ( ( ba [ offset + 5 ] & 255 ) << 16 ) + ( ( ba [ offset + 6 ] & 255 ) << 8...
public class JedisRedisClient { /** * { @ inheritDoc } */ @ Override public boolean setIsMember ( String setName , String value ) { } }
Boolean result = redisClient . sismember ( setName , value ) ; return result != null ? result . booleanValue ( ) : false ;
public class MultiFormatter { /** * Add and copy the MultiFormatter . * @ param formatters */ public MultiFormatter add ( Formatter < ? > ... formatters ) { } }
if ( formatter != null ) { MultiFormatter copy = new MultiFormatter ( ) ; copy . formatters . putAll ( this . formatters ) ; copy . setFormatters ( formatters ) ; return copy ; } return this ;
public class GridScreen { /** * Code this position and Anchor to add it to the LayoutManager . * @ param position The location constant ( see ScreenConstants ) . * @ param setNewAnchor The anchor constant . * @ return The new screen location object . */ public ScreenLocation getNextLocation ( short position , sho...
if ( position == ScreenConstants . NEXT_LOGICAL ) position = ScreenConstants . RIGHT_OF_LAST ; if ( position == ScreenConstants . FIRST_LOCATION ) position = ScreenConstants . FIRST_DISPLAY_LOCATION ; if ( position == ScreenConstants . ADD_SCREEN_VIEW_BUFFER ) position = ScreenConstants . ADD_GRID_SCREEN_BUFFER ; // No...
public class ToolInstallerDescriptor { /** * Filters { @ link # all ( ) } by eliminating things that are not applicable to the given type . */ public static List < ToolInstallerDescriptor < ? > > for_ ( Class < ? extends ToolInstallation > type ) { } }
List < ToolInstallerDescriptor < ? > > r = new ArrayList < > ( ) ; for ( ToolInstallerDescriptor < ? > d : all ( ) ) if ( d . isApplicable ( type ) ) r . add ( d ) ; return r ;
public class DiskStorageCache { /** * If file cache size is not calculated or if it was calculated * a long time ago ( FILECACHE _ SIZE _ UPDATE _ PERIOD _ MS ) recalculated from file listing . * @ return true if it was recalculated , false otherwise . */ @ GuardedBy ( "mLock" ) private boolean maybeUpdateFileCache...
long now = mClock . now ( ) ; if ( ( ! mCacheStats . isInitialized ( ) ) || mCacheSizeLastUpdateTime == UNINITIALIZED || ( now - mCacheSizeLastUpdateTime ) > FILECACHE_SIZE_UPDATE_PERIOD_MS ) { return maybeUpdateFileCacheSizeAndIndex ( ) ; } return false ;
public class FormatUtils { /** * Parses a list of { @ code Objects } into a { @ code String } . * @ param objs a list of Objects to convert to a String * @ return comma - separated concatenation of the string representation returned by Object # toString * of the individual objects */ public static String paramete...
StringBuilder sb = new StringBuilder ( "(" ) ; if ( objs != null ) { for ( int k = 0 ; k < objs . length ; k ++ ) { if ( k != 0 ) { sb . append ( ", " ) ; } if ( objs [ k ] == null ) { sb . append ( "null" ) ; } else { sb . append ( objs [ k ] . toString ( ) ) ; } } } sb . append ( ")" ) ; return sb . toString ( ) ;
public class FnDouble { /** * It divides the target element by the given divisor and returns the * remainder ( target % divisor ) . The remainder precision and { @ link RoundingMode } * is specified by the given { @ link MathContext } * @ param divisor the divisor * @ param mathContext the { @ link MathContext ...
return new Remainder ( fromNumber ( divisor ) , mathContext ) ;
public class SerializedRelay { /** * Loops until all notifications in the queue has been processed . */ private void emitLoop ( ) { } }
for ( ; ; ) { AppendOnlyLinkedArrayList < T > q ; synchronized ( this ) { q = queue ; if ( q == null ) { emitting = false ; return ; } queue = null ; } q . accept ( actual ) ; }
public class TypefaceHelper { /** * Set the typeface to the all text views belong to the activity . * Note that we use decor view of the activity so that the typeface will also be applied to action bar . * @ param activity the activity . * @ param strResId string resource containing typeface name . * @ param st...
setTypeface ( activity , mApplication . getString ( strResId ) , style ) ;
public class VdmBreakpointPropertyPage { /** * Creates a fully configured label with the given text . * @ param parent * the parent composite * @ param text * the test of the returned label * @ return a fully configured label */ protected Label createLabel ( Composite parent , String text ) { } }
return SWTFactory . createLabel ( parent , text , 1 ) ;
public class BookmarkDatastore { /** * TODO geopgrahpic bounding box ? */ public List < Marker > getBookmarksAsMarkers ( MapView view ) { } }
List < Marker > markers = new ArrayList < > ( ) ; try { // TODO order by title final Cursor cur = mDatabase . rawQuery ( "SELECT * FROM " + TABLE , null ) ; while ( cur . moveToNext ( ) ) { Marker m = new Marker ( view ) ; m . setId ( cur . getString ( cur . getColumnIndex ( COLUMN_ID ) ) ) ; m . setTitle ( cur . getSt...
public class GetAccountAuthorizationDetailsResult { /** * A list containing information about IAM users . * @ return A list containing information about IAM users . */ public java . util . List < UserDetail > getUserDetailList ( ) { } }
if ( userDetailList == null ) { userDetailList = new com . amazonaws . internal . SdkInternalList < UserDetail > ( ) ; } return userDetailList ;
public class SARLValidator { /** * Check the types of the parameters of the " fires " statement . * @ param action the signature that contains the " fires " statement . */ @ Check ( CheckType . FAST ) public void checkActionFires ( SarlAction action ) { } }
for ( final JvmTypeReference event : action . getFiredEvents ( ) ) { final LightweightTypeReference ref = toLightweightTypeReference ( event ) ; if ( ref != null && ! this . inheritanceHelper . isSarlEvent ( ref ) ) { error ( MessageFormat . format ( Messages . SARLValidator_57 , event . getQualifiedName ( ) , Messages...
public class XMLChecker { /** * Determines if the specified string matches the < em > PubidLiteral < / em > production . * See : < a href = " http : / / www . w3 . org / TR / REC - xml # NT - PubidLiteral " > Definition of PubidLiteral < / a > . * @ param s the character string to check , cannot be < code > null < ...
try { checkPubidLiteral ( s ) ; return true ; } catch ( InvalidXMLException exception ) { return false ; }
public class CassandraSchemaManager { /** * Validate and append column name . * @ param translator * the translator * @ param queryBuilder * the query builder * @ param b * the b * @ param clazz * the clazz */ private void validateAndAppendColumnName ( CQLTranslator translator , StringBuilder queryBuild...
String dataType = CassandraValidationClassMapper . getValidationClass ( clazz , true ) ; translator . appendColumnName ( queryBuilder , b , translator . getCQLType ( dataType ) ) ; queryBuilder . append ( Constants . SPACE_COMMA ) ;
public class EnglishGrammaticalStructure { /** * Collapse multiword preposition of the following format : * prep | advmod | dep | amod ( gov , mwp0 ) dep ( mpw0 , mwp1 ) pobj | pcomp ( mwp1 , compl ) or * pobj | pcomp ( mwp0 , compl ) - > prep _ mwp0 _ mwp1 ( gov , compl ) * @ param list * List of typedDependen...
// first find the multiword _ preposition : dep ( mpw [ 0 ] , mwp [ 1 ] ) // the two words should be next to another in the sentence ( difference of // indexes = 1) TreeGraphNode mwp0 = null ; TreeGraphNode mwp1 = null ; TypedDependency dep = null ; for ( TypedDependency td : list ) { if ( td . gov ( ) . value ( ) . eq...
public class DB { /** * Selects a page of posts with associated terms and a set of types . * @ param types The post types . May be { @ code null } or empty fo any type . * @ param status The required post status . * @ param terms A collection of terms attached to the posts . * @ param sort The page sort . * @...
if ( paging . limit < 1 || paging . start < 0 ) { return ImmutableList . of ( ) ; } List < Long > ids = Lists . newArrayListWithExpectedSize ( paging . limit < 1024 ? paging . limit : 1024 ) ; StringBuilder sql = new StringBuilder ( "SELECT ID FROM " ) ; sql . append ( postsTableName ) ; if ( terms != null && terms . s...
public class LocalDateAndTimeStampImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } }
switch ( featureID ) { case AfplibPackage . LOCAL_DATE_AND_TIME_STAMP__STAMP_TYPE : return getStampType ( ) ; case AfplibPackage . LOCAL_DATE_AND_TIME_STAMP__THUN_YEAR : return getTHunYear ( ) ; case AfplibPackage . LOCAL_DATE_AND_TIME_STAMP__TEN_YEAR : return getTenYear ( ) ; case AfplibPackage . LOCAL_DATE_AND_TIME_S...
public class InjectionConfiguration { /** * TODO extract */ public static Class < ? extends MockProvider > lookupMockProviderClass ( final String mockProviderClassName ) { } }
try { if ( mockProviderClassName != null ) { return ReflectionUtil . lookupClass ( MockProvider . class , mockProviderClassName ) ; } } catch ( final Exception e ) { throw new RuntimeException ( "could not load mock provider class: '" + mockProviderClassName + "'" , e ) ; } throw new RuntimeException ( "no mock provide...
public class WebSocketNode { /** * 广播消息 , 给所有人发消息 * @ param message 消息内容 * @ return 为0表示成功 , 其他值表示部分发送异常 */ @ Local public final CompletableFuture < Integer > broadcastMessage ( final Object message ) { } }
return broadcastMessage ( ( Convert ) null , message , true ) ;
public class WarCdiFactory { /** * Initializes the ES storage ( if required ) . * @ param config * @ param esStorage */ private static EsStorage initEsStorage ( WarApiManagerConfig config , EsStorage esStorage ) { } }
if ( sESStorage == null ) { sESStorage = esStorage ; sESStorage . setIndexName ( config . getStorageESIndexName ( ) ) ; if ( config . isInitializeStorageES ( ) ) { sESStorage . initialize ( ) ; } } return sESStorage ;
public class StatefulKnowledgeSessionImpl { /** * Retrieve the < code > JoinMemory < / code > for a particular * < code > JoinNode < / code > . * @ param node * The < code > JoinNode < / code > key . * @ return The node ' s memory . */ public < T extends Memory > T getNodeMemory ( MemoryFactory < T > node ) { }...
return nodeMemories . getNodeMemory ( node , this ) ;
public class ExceptionUtils { /** * Formatea una excepcion y las excepciones padre . * @ param exception * excepcion * @ return el fomato requerido */ public static String formatException ( Throwable exception ) { } }
StringBuilder buffer = new StringBuilder ( ) ; formatException ( exception , buffer ) ; return buffer . toString ( ) ;
public class XmlValidatorManager { /** * Instances of the validators are created here rather than in the constructors . This is because * some validators might need to maintain project - specific states . By instantiating the validators * here , it ensures that the validator objects are project - specific , rather ...
this . validators = new LinkedHashMap < > ( ) ; if ( ! props . containsKey ( ValidatorConfigs . XML_FILE_PARAM ) ) { logger . warn ( "Azkaban properties file does not contain the key " + ValidatorConfigs . XML_FILE_PARAM ) ; return ; } final String xmlPath = props . get ( ValidatorConfigs . XML_FILE_PARAM ) ; final Fil...
public class BeanId { /** * Returns a BeanId from its serialized ( byteArray ) version . A more * performance friendly replacement for the serialization code used in * deserialize . < p > * Note : the passed ByteArray will become part of the state of the * returned BeanId , so should not be modified after calli...
BeanId id = null ; int pkeyIndex ; Serializable pkey = null ; byte [ ] j2eeNameBytes ; boolean isHome = false ; J2EEName j2eeName = null ; byte [ ] bytes = byteArray . getBytes ( ) ; // d140003.12 // Match up the header with the new format . If it does not match // then we have an incoming type 1 BeanId . for ( int i =...
public class DbPro { /** * Execute sql query and return the first result . I recommend add " limit 1 " in your sql . * @ param sql an SQL statement that may contain one or more ' ? ' IN parameter placeholders * @ param paras the parameters of sql * @ return Object [ ] if your sql has select more than one column ,...
List < T > result = query ( sql , paras ) ; return ( result . size ( ) > 0 ? result . get ( 0 ) : null ) ;
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getMCF1 ( ) { } }
if ( mcf1EClass == null ) { mcf1EClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 292 ) ; } return mcf1EClass ;
public class SchedulerClientFactory { /** * Implementation of getSchedulerClient - Used to create objects * Currently it creates either HttpServiceSchedulerClient or LibrarySchedulerClient * @ return getSchedulerClient created . return null if failed to create ISchedulerClient instance */ public ISchedulerClient ge...
LOG . fine ( "Creating scheduler client" ) ; ISchedulerClient schedulerClient ; if ( Context . schedulerService ( config ) ) { // get the instance of the state manager SchedulerStateManagerAdaptor statemgr = Runtime . schedulerStateManagerAdaptor ( runtime ) ; Scheduler . SchedulerLocation schedulerLocation = statemgr ...
public class JShellTool { /** * Print ( fluff ) using resource bundle look - up , MessageFormat , and add * prefix and postfix * @ param key the resource key * @ param args */ @ Override public void fluffmsg ( String key , Object ... args ) { } }
if ( showFluff ( ) ) { hardmsg ( key , args ) ; }
public class BaseDestinationHandler { /** * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . impl . interfaces . DestinationHandler # removeConsumerPointMatchTarget ( com . ibm . ws . sib . processor . impl . ConsumerKey ) */ @ Override public void removeConsumerPointMatchTarget ( DispatchableKey consumer...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeConsumerPointMatchTarget" , consumerPointData ) ; // Remove the consumer point from the matchspace // This used to use the ptoPRealization but this is no longer the case . messageProcessor . getMessageProcessorMatchin...
public class ZmqEventConsumer { private void callEventSubscriptionAndConnect ( DeviceProxy device , String eventType ) throws DevFailed { } }
// Done for IDL > = 5 and not for notifd event system ( no attribute name ) String device_name = device . name ( ) ; String [ ] info = new String [ ] { device_name , "" , "subscribe" , eventType , Integer . toString ( device . get_idl_version ( ) ) } ; DeviceData argIn = new DeviceData ( ) ; argIn . insert ( info ) ; S...
public class LiveOutputsInner { /** * Create Live Output . * Creates a Live Output . * @ param resourceGroupName The name of the resource group within the Azure subscription . * @ param accountName The Media Services account name . * @ param liveEventName The name of the Live Event . * @ param liveOutputName ...
return beginCreateWithServiceResponseAsync ( resourceGroupName , accountName , liveEventName , liveOutputName , parameters ) . toBlocking ( ) . single ( ) . body ( ) ;
public class CPRulePersistenceImpl { /** * Returns a range of all the cp rules . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they are indexes in the result set . Thus , < code > 0 < / c...
return findAll ( start , end , null ) ;
public class MetaObjectCompiler { /** * Returns the bid of the processor for the file . * @ param inputFile * filename of input file * @ return bid for the file , 0 indicates no interest , 1 indicates that the * processor recognizes the file but doesn ' t process it ( header * files , for example ) , 100 indi...
// get base bid final int baseBid = super . bid ( inputFile ) ; // if the base bid was non - zero ( . h or . cpp extension ) if ( baseBid > 0 ) { // scan the file for Q _ OBJECT // skip file if not present try { final Reader reader = new BufferedReader ( new FileReader ( inputFile ) ) ; final boolean hasQObject = MetaO...
public class RuntimeUtil { /** * This method guarantees that garbage collection is * done unlike < code > { @ link System # gc ( ) } < / code > */ public static void gc ( ) { } }
Object obj = new Object ( ) ; WeakReference ref = new WeakReference < Object > ( obj ) ; obj = null ; while ( ref . get ( ) != null ) System . gc ( ) ;
public class ErrorReporter { /** * Returns true iff errors have occurred since { @ code checkpoint } was obtained from { @ link * # checkpoint } . * < p > Useful for callers whose outputs are dependent on whether some code path resulted in new * errors ( for example , returning an error node if parsing encountere...
Checkpoint impl = checkpoint ; if ( impl . owner != this ) { throw new IllegalArgumentException ( "Can only call errorsSince on a Checkpoint instance that was returned from this same " + "reporter" ) ; } return getCurrentNumberOfErrors ( ) > impl . errorsSoFar ;
public class OjbFieldManager { /** * retrieve the value of attribute [ fieldNum ] from the object . * @ return Object the value of attribute [ fieldNum ] */ Object getValue ( int fieldNum ) { } }
String attributeName = getAttributeName ( fieldNum ) ; ClassDescriptor cld = broker . getClassDescriptor ( pc . getClass ( ) ) ; // field could be a primitive typed attribute . . . AttributeDescriptorBase fld = cld . getFieldDescriptorByName ( attributeName ) ; // field could be a reference attribute . . . if ( fld == ...
public class JBBPSafeInstantiator { /** * Find a constructor for a static class . * @ param klazz a class to find a constructor , must not be null * @ return found constructor to be used to make an instance */ private static Constructor < ? > findConstructorForStaticClass ( final Class < ? > klazz ) { } }
final Constructor < ? > [ ] constructors = klazz . getDeclaredConstructors ( ) ; if ( constructors . length == 1 ) { return constructors [ 0 ] ; } for ( final Constructor < ? > c : constructors ) { final Class < ? > [ ] params = c . getParameterTypes ( ) ; if ( params . length == 0 ) { return c ; } } return constructor...
public class OWLClassAssertionAxiomImpl_CustomFieldSerializer { /** * Serializes the content of the object into the * { @ link com . google . gwt . user . client . rpc . SerializationStreamWriter } . * @ param streamWriter the { @ link com . google . gwt . user . client . rpc . SerializationStreamWriter } to write ...
serialize ( streamWriter , instance ) ;
public class UnknownExtensionTypeException { /** * Creates a new { @ link UnknownExtensionTypeException } for the specified type * @ throws IllegalArgumentException * If the type is not specified */ static < T extends Assignable > UnknownExtensionTypeException newInstance ( final Class < T > type ) throws IllegalAr...
// Precondition checks if ( type == null ) { throw new IllegalArgumentException ( "type must be specified" ) ; } // Create new return new UnknownExtensionTypeException ( type ) ;
public class HttpResponseConduit { /** * Handles writing out the header data . It can also take a byte buffer of user * data , to enable both user data and headers to be written out in a single operation , * which has a noticeable performance impact . * It is up to the caller to note the current position of this ...
if ( done || exchange == null ) { throw new ClosedChannelException ( ) ; } try { assert state != STATE_BODY ; if ( state == STATE_BUF_FLUSH ) { final ByteBuffer byteBuffer = pooledBuffer . getBuffer ( ) ; do { long res = 0 ; ByteBuffer [ ] data ; if ( userData == null || length == 0 ) { res = next . write ( byteBuffer ...