signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class Util { /** * Closes the item and logs error to the log in the case of error .
* Logging will be performed on the { @ code WARNING } level .
* @ param toClose Item to close . Nothing will happen if it is { @ code null }
* @ param logger Logger , which receives the error
* @ param closeableName Name ... | if ( toClose == null ) { return ; } try { toClose . close ( ) ; } catch ( IOException ex ) { LogRecord record = new LogRecord ( Level . WARNING , "Failed to close {0} of {1}" ) ; record . setParameters ( new Object [ ] { closeableName , closeableOwner } ) ; record . setThrown ( ex ) ; logger . log ( record ) ; } |
public class ClassBuilder { /** * Creates a new method for a dynamic class
* @ param methodName name of method
* @ param returnClass type which returns this method
* @ param argumentTypes list of types of arguments
* @ param expression function which will be processed
* @ return changed AsmFunctionFactory */
... | Type [ ] types = new Type [ argumentTypes . size ( ) ] ; for ( int i = 0 ; i < argumentTypes . size ( ) ; i ++ ) { types [ i ] = getType ( argumentTypes . get ( i ) ) ; } return withMethod ( new Method ( methodName , getType ( returnClass ) , types ) , expression ) ; |
public class ProtoLexer { /** * $ ANTLR start " LEFTCURLY " */
public final void mLEFTCURLY ( ) throws RecognitionException { } } | try { int _type = LEFTCURLY ; int _channel = DEFAULT_TOKEN_CHANNEL ; // com / dyuproject / protostuff / parser / ProtoLexer . g : 43:5 : ( ' { ' )
// com / dyuproject / protostuff / parser / ProtoLexer . g : 43:9 : ' { '
{ match ( '{' ) ; } state . type = _type ; state . channel = _channel ; } finally { } |
public class ParameterUtil { /** * Get values returned by a select ( with one or two fields )
* @ param con database connection
* @ param select select
* @ param sort if true sort after id
* @ param orderBy order by name or id
* @ return a list of values
* @ throws SQLException if an error to sql execution ... | List < IdName > values = new ArrayList < IdName > ( ) ; ResultSet rs = null ; Statement stmt = null ; Dialect dialect = DialectUtil . getDialect ( con ) ; try { stmt = con . createStatement ( ) ; rs = stmt . executeQuery ( select ) ; ResultSetMetaData rsmd = rs . getMetaData ( ) ; int columnCount = rsmd . getColumnCoun... |
public class DBProperties { /** * Get a DBProperty and apply a < code > java . util . Formatter < / code > with the
* given _ args on it .
* @ param _ key key the DBProperty will be searched for
* @ param _ language language to be applied
* @ param _ args object to be used for the formated
* @ return formated... | String ret = "" ; try { ret = DBProperties . getProperty ( _key , _language ) ; final Locale local = Context . getThreadContext ( ) . getLocale ( ) ; final Formatter formatter = new Formatter ( local ) ; formatter . format ( ret , _args ) ; ret = formatter . toString ( ) ; formatter . close ( ) ; } catch ( final EFapsE... |
public class ExecutorFilter { /** * { @ inheritDoc } */
@ Override public final void sessionIdle ( NextFilter nextFilter , IoSession session , IdleStatus status ) { } } | if ( eventTypes . contains ( IoEventType . SESSION_IDLE ) ) { IoFilterEvent event = new IoFilterEvent ( nextFilter , IoEventType . SESSION_IDLE , session , status ) ; fireEvent ( event ) ; } else { nextFilter . sessionIdle ( session , status ) ; } |
public class AbstractFetcher { /** * Emits a record without attaching an existing timestamp to it .
* < p > Implementation Note : This method is kept brief to be JIT inlining friendly .
* That makes the fast path efficient , the extended paths are called as separate methods .
* @ param record The record to emit
... | if ( record != null ) { if ( timestampWatermarkMode == NO_TIMESTAMPS_WATERMARKS ) { // fast path logic , in case there are no watermarks
// emit the record , using the checkpoint lock to guarantee
// atomicity of record emission and offset state update
synchronized ( checkpointLock ) { sourceContext . collect ( record ... |
public class CassandraCpoAdapter { /** * DOCUMENT ME !
* @ param obj DOCUMENT ME !
* @ param groupType DOCUMENT ME !
* @ param groupName DOCUMENT ME !
* @ param sess DOCUMENT ME !
* @ return DOCUMENT ME !
* @ throws CpoException DOCUMENT ME ! */
protected < T > long processUpdateGroup ( T obj , String group... | Logger localLogger = obj == null ? logger : LoggerFactory . getLogger ( obj . getClass ( ) ) ; CpoClass cpoClass ; if ( obj == null ) { throw new CpoException ( "NULL Object passed into insertObject, deleteObject, updateObject, or persistObject" ) ; } try { cpoClass = metaDescriptor . getMetaClass ( obj ) ; List < CpoF... |
public class EventTriggerFactory { /** * Create an { @ link IEventTrigger }
* @ param eventType The event type
* @ param attribute The attribute that will send events
* @ return the created EventTrigger object
* @ throws DevFailed */
public static IEventTrigger createEventTrigger ( final EventType eventType , f... | LOGGER . debug ( "create event trigger for attribute {} of type {}" , attribute . getName ( ) , eventType ) ; final EventProperties props = attribute . getProperties ( ) . getEventProp ( ) ; IEventTrigger eventTrigger ; switch ( eventType ) { case PERIODIC_EVENT : final long period = Long . parseLong ( props . per_even... |
public class ModuleConfig { /** * Expose JPA entities as repositories .
* @ return module */
@ Bean public JpaModule jpaModule ( ) { } } | JpaModule module = JpaModule . newServerModule ( em , transactionRunner ) ; // directly expose entity
module . addRepository ( JpaRepositoryConfig . builder ( ScheduleEntity . class ) . build ( ) ) ; // additionally expose entity as a mapped dto
module . addRepository ( JpaRepositoryConfig . builder ( ScheduleEntity . ... |
public class ProductPartitionTreeImpl { /** * Returns a new instance of this class by retrieving the product partitions of the
* specified ad group . All parameters are required . */
static ProductPartitionTreeImpl createAdGroupTree ( AdWordsServicesInterface services , AdWordsSession session , Long adGroupId ) throw... | // Get the AdGroupCriterionService .
AdGroupCriterionServiceInterface criterionService = services . get ( session , AdGroupCriterionServiceInterface . class ) ; SelectorBuilder selectorBuilder = new SelectorBuilder ( ) . fields ( REQUIRED_SELECTOR_FIELD_ENUMS . toArray ( new AdGroupCriterionField [ REQUIRED_SELECTOR_FI... |
public class ComposableFileFilter { /** * Determines whether the given { @ link File } matches the criteria of this { @ link FileFilter } .
* @ param file the { @ link File } to evaluate .
* @ return a boolean value indicating whether the given { @ link File } matches the criteria of this { @ link FileFilter } .
... | return getOperator ( ) . evaluate ( ( ) -> getLeftOperand ( ) . accept ( file ) , ( ) -> getRightOperand ( ) . accept ( file ) ) ; |
public class Async { /** * Convert a synchronous function call into an asynchronous function call through an Observable .
* < img width = " 640 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / toAsync . png " alt = " " >
* @ param < T1 > the first parameter type
* @... | return toAsyncThrowing ( func , Schedulers . computation ( ) ) ; |
public class XBooleanLiteralImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public boolean eIsSet ( int featureID ) { } } | switch ( featureID ) { case XbasePackage . XBOOLEAN_LITERAL__IS_TRUE : return isTrue != IS_TRUE_EDEFAULT ; } return super . eIsSet ( featureID ) ; |
public class MsgManager { /** * Removes the { @ link AppMsg } ' s view after it ' s display duration .
* @ param appMsg The { @ link AppMsg } added to a { @ link ViewGroup } and should be removed . s */
private void removeMsg ( final AppMsg appMsg ) { } } | clearMsg ( appMsg ) ; final View view = appMsg . getView ( ) ; ViewGroup parent = ( ( ViewGroup ) view . getParent ( ) ) ; if ( parent != null ) { appMsg . mOutAnimation . setAnimationListener ( new OutAnimationListener ( appMsg ) ) ; view . clearAnimation ( ) ; view . startAnimation ( appMsg . mOutAnimation ) ; } Mess... |
public class Extracting { /** * 对分词后的结果进行抽取
* @ param terms 分词后的结果
* @ param useForest 是否使用词典
* @ return 抽取结果集 */
private ExtractingResult parse ( Result terms , boolean useForest ) { } } | if ( terms == null || terms . size ( ) == 0 ) { return new ExtractingResult ( ) ; } if ( useForest ) { Graph graph = new Graph ( terms ) ; new UserDefineRecognition ( TermUtil . InsertTermType . REPLACE , ruleIndex . getForest ( ) ) . recognition ( graph ) ; graph . rmLittlePath ( ) ; List < Term > result = new ArrayLi... |
public class JmsSessionImpl { /** * from createSharedDurableConsumer with selector and without selector */
private TopicSubscriber createDurableSubscriber ( Topic topic , String name , String messageSelector , boolean noLocal , boolean isSharedDurable , boolean isNonSharedDurable ) throws JMSException { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createDurableSubscriber" , new Object [ ] { topic , name , messageSelector , noLocal , isSharedDurable , isNonSharedDurable } ) ; checkNotClosed ( ) ; if ( topic == null ) { throw ( InvalidDestinationException ) JmsE... |
public class RenderException { /** * Add a partial stack trace element by specifying the source location of the soy file . */
RenderException addStackTraceElement ( TemplateNode template , SourceLocation location ) { } } | // Typically , this is fast since templates aren ' t that deep and we only do this in error
// situations so performance matters less .
soyStackTrace . add ( template . createStackTraceElement ( location ) ) ; return this ; |
public class CommFaxClientSpi { /** * Creates and returns the fax modem adapter .
* @ return The fax modem adapter */
protected final FaxModemAdapter createFaxModemAdapter ( ) { } } | // create new instance
FaxModemAdapter adapter = ( FaxModemAdapter ) ReflectionHelper . createInstance ( this . faxModemClassName ) ; // initialize
adapter . initialize ( this ) ; return adapter ; |
public class HttpUtils { /** * https : / / url . spec . whatwg . org / */
public static boolean isInetAddress ( String host ) { } } | int colons = 0 ; int dots = 0 ; byte [ ] bytes = encodeAscii ( host ) ; // expect ipv6 address
if ( bytes [ 0 ] == '[' ) { return bytes [ bytes . length - 1 ] == ']' && checkIpv6 ( bytes , 1 , bytes . length - 1 ) ; } // assume ipv4 could be as oct , bin , dec ; ipv6 - hex
for ( byte b : bytes ) { if ( b == '.' ) { dot... |
public class PermissionAssignmentMapController { /** * Deletes a specific permission
* @ param principal
* @ param assignment
* @ param owner
* @ param activity
* @ param target
* @ param request
* @ param response
* @ throws Exception */
@ RequestMapping ( value = "/deletePermission" , method = Request... | // ensure the current user is authorized to update and view permissions
final IPerson currentUser = personManager . getPerson ( ( HttpServletRequest ) request ) ; if ( ! permissionAdministrationHelper . canEditPermission ( currentUser , target ) || ! permissionAdministrationHelper . canViewPermission ( currentUser , ta... |
public class CreateUserRequest { /** * check if the request contains a profile picture path
* @ param formItemList
* form item list extracted
* @ param createUserResponse
* create user response object
* @ return profile picture path < br >
* < b > null < / b > if there was no profile picture path passed */
... | final String profilePicturePath = formItemList . getField ( ProtocolConstants . Parameters . Create . User . PROFILE_PICTURE_PATH ) ; if ( profilePicturePath != null ) { return profilePicturePath ; } else { createUserResponse . profilePicturePathMissing ( ) ; } return null ; |
public class BaseImageDownloader { /** * Retrieves { @ link InputStream } of image by URI ( image is located in drawable resources of application ) .
* @ param imageUri Image URI
* @ param extra Auxiliary object which was passed to { @ link DisplayImageOptions . Builder # extraForDownloader ( Object )
* DisplayIm... | String drawableIdString = Scheme . DRAWABLE . crop ( imageUri ) ; int drawableId = Integer . parseInt ( drawableIdString ) ; return context . getResources ( ) . openRawResource ( drawableId ) ; |
public class FFMQJNDIContext { /** * ( non - Javadoc )
* @ see javax . naming . Context # bind ( java . lang . String , java . lang . Object ) */
@ Override public void bind ( String name , Object obj ) throws NamingException { } } | bind ( new CompositeName ( name ) , obj ) ; |
public class IndexedJvmTypeAccess { /** * Read and resolve the EObject from the given description and navigate to its children according
* to the given fragment .
* @ since 2.8 */
protected EObject getAccessibleType ( IEObjectDescription description , String fragment , ResourceSet resourceSet ) throws UnknownNested... | EObject typeProxy = description . getEObjectOrProxy ( ) ; if ( typeProxy . eIsProxy ( ) ) { typeProxy = EcoreUtil . resolve ( typeProxy , resourceSet ) ; } if ( ! typeProxy . eIsProxy ( ) && typeProxy instanceof JvmType ) { if ( fragment != null ) { EObject result = resolveJavaObject ( ( JvmType ) typeProxy , fragment ... |
public class PortletFilterChainProxy { /** * Returns a copy of the underlying filter chain map . Modifications to the map contents
* will not affect the PortletFilterChainProxy state .
* @ return the map of path pattern Strings to filter chain lists ( with ordering guaranteed ) .
* @ deprecated use the list of { ... | LinkedHashMap < RequestMatcher , List < PortletFilter > > map = new LinkedHashMap < RequestMatcher , List < PortletFilter > > ( ) ; for ( PortletSecurityFilterChain chain : filterChains ) { map . put ( ( ( DefaultPortletSecurityFilterChain ) chain ) . getRequestMatcher ( ) , chain . getFilters ( ) ) ; } return map ; |
public class BitstampAdapters { /** * Adapts a BitstampBalance to an AccountInfo
* @ param bitstampBalance The Bitstamp balance
* @ param userName The user name
* @ return The account info */
public static AccountInfo adaptAccountInfo ( BitstampBalance bitstampBalance , String userName ) { } } | // Adapt to XChange DTOs
List < Balance > balances = new ArrayList < > ( ) ; for ( org . knowm . xchange . bitstamp . dto . account . BitstampBalance . Balance b : bitstampBalance . getBalances ( ) ) { Balance xchangeBalance = new Balance ( Currency . getInstance ( b . getCurrency ( ) . toUpperCase ( ) ) , b . getBalan... |
public class SqlQuery { /** * A non - null fetch size will be set as the fetch size for the statements executed from this query .
* If the fetch size specified is zero , the JDBC driver ignores the value and makes its own best guess of the fetch size .
* @ param size fetch size in rows or null
* @ throws IllegalA... | if ( size != null && size < 0 ) throw new IllegalArgumentException ( "Illegal fetch size " + size + ". Fetch size must be null or >= 0" ) ; this . fetchSize = size ; |
public class SRE { /** * Find and reply the current SRE .
* @ return the current SRE , never { @ code null } .
* @ throws IllegalStateException if a SRE cannot be found . */
@ Pure public static SREBootstrap getBootstrap ( ) { } } | synchronized ( SRE . class ) { if ( currentSRE == null ) { final Iterator < SREBootstrap > iterator = getServiceLoader ( ) . iterator ( ) ; if ( iterator . hasNext ( ) ) { currentSRE = iterator . next ( ) ; } else { currentSRE = new VoidSREBootstrap ( ) ; } } return currentSRE ; } |
public class TileDownloadLayer { /** * Whether the tile is stale and should be refreshed .
* This method is called from { @ link # draw ( BoundingBox , byte , Canvas , Point ) } to determine whether the tile needs to
* be refreshed .
* A tile is considered stale if one or more of the following two conditions appl... | if ( bitmap . isExpired ( ) ) return true ; return cacheTimeToLive != 0 && ( ( bitmap . getTimestamp ( ) + cacheTimeToLive ) < System . currentTimeMillis ( ) ) ; |
public class SightResourcesImpl { /** * Gets the list of all Sights where the User has access .
* It mirrors to the following Smartsheet REST API method : GET / sights
* @ param modifiedSince
* @ return IndexResult object containing an array of Sight objects limited to the following attributes :
* id , name , a... | String path = "sights" ; HashMap < String , Object > parameters = new HashMap < String , Object > ( ) ; if ( paging != null ) { parameters = paging . toHashMap ( ) ; } if ( modifiedSince != null ) { String isoDate = new SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm:ssZ" ) . format ( modifiedSince ) ; parameters . put ( "modif... |
public class WatchdogRegistry { /** * restarts all Watchdogs */
public synchronized void stop ( ) { } } | // stopps all watchdogs
Iterator iter = registeredWachdogs . values ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { Watchdog wd = ( Watchdog ) iter . next ( ) ; wd . stop ( ) ; if ( log . isInfoEnabled ( ) ) { log . info ( "WatchdogRegistry.stop() : Watchdog " + wd . getId ( ) + " is stopped" ) ; } } |
public class SmileRecordReader { /** * Read the next key , value pair .
* @ return true if a key / value pair was read
* @ throws java . io . IOException
* @ throws InterruptedException */
@ Override public boolean nextKeyValue ( ) throws IOException , InterruptedException { } } | if ( ! deserializer . hasNextEvent ( ) ) { return false ; } else { value = deserializer . getNextEvent ( ) ; key = value . getEventDateTime ( ) ; return true ; } |
public class AmazonChimeClient { /** * Lists the phone number orders for the administrator ' s Amazon Chime account .
* @ param listPhoneNumberOrdersRequest
* @ return Result of the ListPhoneNumberOrders operation returned by the service .
* @ throws UnauthorizedClientException
* The client is not currently aut... | request = beforeClientExecution ( request ) ; return executeListPhoneNumberOrders ( request ) ; |
public class ExperimentHelper { /** * To check if the input date string is valid and match with the required
* format
* @ param date The input date string , which should comes with the format of
* yyyy - mm - dd , the separator should be same with the third parameter
* @ param out The Calendar instance which wi... | try { String [ ] dates = date . split ( separator ) ; out . set ( Calendar . DATE , Integer . parseInt ( dates [ dates . length - 1 ] ) ) ; out . set ( Calendar . MONTH , Integer . parseInt ( dates [ dates . length - 2 ] ) ) ; if ( dates . length > 2 ) { out . set ( Calendar . YEAR , Integer . parseInt ( dates [ dates ... |
public class PackageProcessor { /** * Return true for include values of :
* include = all
* include = runnable
* include = all , runnable
* Otherwise return false . */
private boolean includeAllorNoMinifyRunnable ( String val ) { } } | return IncludeOption . ALL . matches ( val ) || ( IncludeOption . RUNNABLE . matches ( val ) && ! IncludeOption . MINIFY . matches ( val ) ) ; |
public class AbstractSession { /** * / * ( non - Javadoc )
* @ see javax . jms . Session # createDurableSubscriber ( javax . jms . Topic , java . lang . String ) */
@ Override public TopicSubscriber createDurableSubscriber ( Topic topic , String name ) throws JMSException { } } | return createDurableSubscriber ( topic , name , null , false ) ; |
public class BNGImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ SuppressWarnings ( "unchecked" ) @ Override public void eSet ( int featureID , Object newValue ) { } } | switch ( featureID ) { case AfplibPackage . BNG__PGRP_NAME : setPGrpName ( ( String ) newValue ) ; return ; case AfplibPackage . BNG__TRIPLETS : getTriplets ( ) . clear ( ) ; getTriplets ( ) . addAll ( ( Collection < ? extends Triplet > ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ; |
public class ScenarioPortrayal { /** * Concatenate two two dimensional arrays .
* Both arrays must have the same dimensions .
* @ param first
* @ param second
* @ return */
private double [ ] [ ] concatenateArrays ( double [ ] [ ] first , double [ ] [ ] second ) { } } | // I am sure as hell that should be a better way to do this . . .
double [ ] [ ] result = new double [ first . length ] [ first [ 0 ] . length + second [ 0 ] . length ] ; for ( int i = 0 ; i < first . length ; i ++ ) { for ( int j = 0 ; j < ( first [ i ] . length + second [ i ] . length ) ; j ++ ) { if ( j < first [ i ... |
public class DefaultClusterManager { /** * Handles a cluster multi - map remove command . */
private void doMultiMapRemove ( final Message < JsonObject > message ) { } } | final String name = message . body ( ) . getString ( "name" ) ; if ( name == null ) { message . reply ( new JsonObject ( ) . putString ( "status" , "error" ) . putString ( "message" , "No name specified." ) ) ; return ; } final Object key = message . body ( ) . getValue ( "key" ) ; if ( key == null ) { message . reply ... |
public class RuleSummaryMarshaller { /** * Marshall the given parameter object . */
public void marshall ( RuleSummary ruleSummary , ProtocolMarshaller protocolMarshaller ) { } } | if ( ruleSummary == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( ruleSummary . getRuleId ( ) , RULEID_BINDING ) ; protocolMarshaller . marshall ( ruleSummary . getName ( ) , NAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientEx... |
public class Utils { /** * Replaces stretches of text that look like addresses and phone numbers with clickable
* links . If lastDitchGeo is true , then if no links are found in the textview , the entire
* string will be converted to a single geo link . Any spans that may have previously been
* in the text will b... | // We use a copy of the string argument so it ' s available for later if necessary .
Spannable spanText = SpannableString . valueOf ( text ) ; /* * If the text includes a street address like " 1600 Amphitheater Parkway , 94043 " ,
* the current Linkify code will identify " 94043 " as a phone number and invite
* you... |
public class ConverterRegistry { /** * Converter calls this method to register conversion path .
* @ param from
* @ param to
* @ param converter */
@ Override public void addConverter ( Class < ? > from , Class < ? > to , Converter converter ) { } } | Map toMap = fromMap . get ( from ) ; if ( toMap == null ) { toMap = new HashMap < Class < ? > , Map < Class < ? > , Converter > > ( ) ; fromMap . put ( from , toMap ) ; } toMap . put ( to , converter ) ; |
public class ip6tunnel { /** * Use this API to fetch all the ip6tunnel resources that are configured on netscaler .
* This uses ip6tunnel _ args which is a way to provide additional arguments while fetching the resources . */
public static ip6tunnel [ ] get ( nitro_service service , ip6tunnel_args args ) throws Excep... | ip6tunnel obj = new ip6tunnel ( ) ; options option = new options ( ) ; option . set_args ( nitro_util . object_to_string_withoutquotes ( args ) ) ; ip6tunnel [ ] response = ( ip6tunnel [ ] ) obj . get_resources ( service , option ) ; return response ; |
public class MSPDIWriter { /** * { @ inheritDoc } */
@ Override public void write ( ProjectFile projectFile , OutputStream stream ) throws IOException { } } | try { if ( CONTEXT == null ) { throw CONTEXT_EXCEPTION ; } m_projectFile = projectFile ; m_projectFile . validateUniqueIDsForMicrosoftProject ( ) ; m_eventManager = m_projectFile . getEventManager ( ) ; DatatypeConverter . setParentFile ( m_projectFile ) ; Marshaller marshaller = CONTEXT . createMarshaller ( ) ; marsha... |
public class ComponentImpl { /** * initalize the Component
* @ param pageContext
* @ param componentPage
* @ throws PageException */
public void init ( PageContext pageContext , ComponentPageImpl componentPage , boolean executeConstr ) throws PageException { } } | this . pageSource = componentPage . getPageSource ( ) ; // extends
if ( ! StringUtil . isEmpty ( properties . extend ) ) { base = ComponentLoader . searchComponent ( pageContext , componentPage . getPageSource ( ) , properties . extend , Boolean . TRUE , null , true , executeConstr ) ; } else { CIPage p = ( ( ConfigWeb... |
public class ProductSubscriptionsSerializer { /** * Gson invokes this call - back method during serialization when it encounters a field of the specified type .
* @ param subscriptions The subscriptions being serialized
* @ param type The type of the Object to deserialize to
* @ param context The JSON serializati... | JsonElement element = gson . toJsonTree ( subscriptions , type ) ; JsonObject obj = new JsonObject ( ) ; obj . add ( "subscriptions" , element ) ; return obj ; |
public class CheckUsersFollowPlaylistRequest { /** * Check whether a user is following a playlist or not .
* @ return Whether a user is following a playlist or not .
* @ throws IOException In case of networking issues .
* @ throws SpotifyWebApiException The Web API returned an error further specified in this exce... | return new Gson ( ) . fromJson ( new JsonParser ( ) . parse ( getJson ( ) ) . getAsJsonArray ( ) , Boolean [ ] . class ) ; |
public class StreamUtils { /** * Construct a stream which skips values from the source stream up until but including the first value is found that
* does not meet the given condition .
* @ param source The source stream .
* @ param condition The condition to apply to elements of the source stream .
* @ param < ... | return StreamSupport . stream ( SkipUntilSpliterator . overInclusive ( source . spliterator ( ) , condition . negate ( ) ) , false ) . onClose ( source :: close ) ; |
public class ObjectFactory2 { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link WasInformedBy } { @ code > } } */
@ XmlElementDecl ( namespace = "http://www.w3.org/ns/prov#" , name = "wasInformedBy" ) public JAXBElement < WasInformedBy > createWasInformedBy ( WasInformedBy value ) { } } | return new JAXBElement < WasInformedBy > ( _WasInformedBy_QNAME , WasInformedBy . class , null , value ) ; |
public class ServerGmsImpl { /** * Sends a leave request to coord and blocks until a leave response has been received ,
* or the leave timeout has elapsed */
protected boolean sendLeaveReqToCoord ( final Address coord ) { } } | if ( coord == null ) { log . warn ( "%s: cannot send LEAVE request to null coord" , gms . getLocalAddress ( ) ) ; return false ; } Promise < Address > leave_promise = gms . getLeavePromise ( ) ; gms . setLeaving ( true ) ; log . trace ( "%s: sending LEAVE request to %s" , gms . local_addr , coord ) ; long start = Syste... |
public class Matrix4d { /** * Apply rotation of < code > angles . y < / code > radians about the Y axis , followed by a rotation of < code > angles . x < / code > radians about the X axis and
* followed by a rotation of < code > angles . z < / code > radians about the Z axis .
* When used with a right - handed coor... | return rotateYXZ ( angles . y , angles . x , angles . z ) ; |
public class BPMNLayout { /** * Starts the actual compact tree layout algorithm at the given node . */
protected void layout ( TreeNode node ) { } } | if ( node != null ) { TreeNode child = node . child ; while ( child != null ) { layout ( child ) ; child = child . next ; } if ( node . child != null ) { attachParent ( node , join ( node ) ) ; } else { layoutLeaf ( node ) ; } } |
public class ProducibleConfig { /** * Create the producible data from node .
* @ param root The root reference ( must not be < code > null < / code > ) .
* @ return The producible data .
* @ throws LionEngineException If unable to read node . */
public static ProducibleConfig imports ( Xml root ) { } } | Check . notNull ( root ) ; final Xml node = root . getChild ( NODE_PRODUCIBLE ) ; final SizeConfig size = SizeConfig . imports ( root ) ; final int time = node . readInteger ( ATT_STEPS ) ; return new ProducibleConfig ( time , size . getWidth ( ) , size . getHeight ( ) ) ; |
public class AnnotationUtils { /** * Get the possibly repeating { @ link Annotation } s of { @ code annotationType } from the
* supplied { @ link Method } . Deals with both a single direct annotation and repeating
* annotations nested within a containing annotation .
* < p > Correctly handles bridge { @ link Meth... | Method resolvedMethod = BridgeMethodResolver . findBridgedMethod ( method ) ; return getRepeatableAnnotation ( ( AnnotatedElement ) resolvedMethod , containerAnnotationType , annotationType ) ; |
public class ComputerVisionImpl { /** * This operation extracts a rich set of visual features based on the image content . Two input methods are supported - - ( 1 ) Uploading an image or ( 2 ) specifying an image URL . Within your request , there is an optional parameter to allow you to choose which features to return ... | return ServiceFuture . fromResponse ( analyzeImageWithServiceResponseAsync ( url , analyzeImageOptionalParameter ) , serviceCallback ) ; |
public class LTPAToken2 { /** * Encrypt the token passed into the token .
* @ throws TokenException */
private final void encrypt ( ) throws Exception { } } | String signStr = Base64Coder . toString ( Base64Coder . base64Encode ( signature ) ) ; String ud = userData . toString ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( this , tc , "encrypt: userData" + ud ) ; } byte [ ] accessID = Base64Coder . getBytes ( ud ) ; StringBuil... |
public class MapDataDao { /** * Opens a changeset , uploads the data , closes the changeset and subscribes the user to it .
* @ param tags tags of this changeset . Usually it is comment and source .
* See { @ link # updateMap ( String , String , Iterable , Handler ) }
* @ param elements elements to upload . No sp... | tags . put ( "created_by" , osm . getUserAgent ( ) ) ; long changesetId = openChangeset ( tags ) ; /* the try - finally is not really necessary because the server closes an open changeset after
24 hours automatically but it is nicer if we clean up after ourselves in case of error
ourselves . */
try { uploadChanges ... |
public class AWSElasticsearchClient { /** * Returns domain configuration information about the specified Elasticsearch domain , including the domain ID ,
* domain endpoint , and domain ARN .
* @ param describeElasticsearchDomainRequest
* Container for the parameters to the < code > < a > DescribeElasticsearchDoma... | request = beforeClientExecution ( request ) ; return executeDescribeElasticsearchDomain ( request ) ; |
public class Output { public void string ( String ... strs ) { } } | for ( String str : strs ) { if ( first ) { indent ( ) ; first = false ; } write ( str ) ; } |
public class GanttProjectReader { /** * Read the relationships for an individual GanttProject task .
* @ param gpTask GanttProject task */
private void readRelationships ( net . sf . mpxj . ganttproject . schema . Task gpTask ) { } } | for ( Depend depend : gpTask . getDepend ( ) ) { Task task1 = m_projectFile . getTaskByUniqueID ( Integer . valueOf ( NumberHelper . getInt ( gpTask . getId ( ) ) + 1 ) ) ; Task task2 = m_projectFile . getTaskByUniqueID ( Integer . valueOf ( NumberHelper . getInt ( depend . getId ( ) ) + 1 ) ) ; if ( task1 != null && t... |
public class AbstractEhCachedKeyValueRepository { /** * Replace the cache with a SelfPopulatingCache decorated one if this has not been done yet .
* The cacheLoaderTimeoutMillis of the original cache will be used as the timeoutMillis of the BlockingCache .
* @ param ehcachethe original cache
* @ param factorythe ... | if ( ehcache instanceof SelfPopulatingCache ) { return ( SelfPopulatingCache ) ehcache ; } SelfPopulatingCache selfPopulatingCache = new SelfPopulatingCache ( ehcache , factory ) ; selfPopulatingCache . setTimeoutMillis ( ( int ) ehcache . getCacheConfiguration ( ) . getCacheLoaderTimeoutMillis ( ) ) ; cacheManager . r... |
public class EsStorage { /** * Returns an iterator over all instances of the given entity type .
* @ param entityType
* @ param unmarshaller
* @ throws StorageException */
private < T > Iterator < T > getAll ( String entityType , IUnmarshaller < T > unmarshaller ) throws StorageException { } } | String query = matchAllQuery ( ) ; return getAll ( entityType , unmarshaller , query ) ; |
public class StringUtils { /** * Null safe comparison of strings
* @ param s1 string 1
* @ param s2 string 2
* @ param ignoreCase True perform case insensitive comparison , False perform case sensitive comparison
* @ return as long as neither are null */
public static int compare ( String s1 , String s2 , boole... | if ( s1 == null && s2 == null ) { return 0 ; } else if ( s1 == null ) { return - 1 ; } else if ( s2 == null ) { return 1 ; } return ignoreCase ? s1 . compareToIgnoreCase ( s2 ) : s1 . compareTo ( s2 ) ; |
public class GrailsPrintWriter { /** * Flush the stream .
* @ see # checkError ( ) */
@ Override public synchronized void flush ( ) { } } | if ( trouble ) { return ; } if ( isDestinationActivated ( ) ) { try { getOut ( ) . flush ( ) ; } catch ( IOException e ) { handleIOException ( e ) ; } } |
public class JsonPayload { /** * region Data */
@ Override public @ NonNull byte [ ] renderData ( ) throws Exception { } } | String jsonString = marshallForSending ( ) . toString ( ) ; ApptentiveLog . v ( PAYLOADS , jsonString ) ; // authenticated payloads get encrypted before sending
if ( isAuthenticated ( ) ) { byte [ ] bytes = jsonString . getBytes ( ) ; return Encryptor . encrypt ( getEncryptionKey ( ) , bytes ) ; } return jsonString . g... |
public class Ix { /** * Repeats this sequence if the given predicate returns true after the sequence
* completes in a round or at most the given number of times .
* A count of zero will yield an empty sequence , a count of one
* will yield a sequence with only one element and so forth .
* The result ' s iterato... | return concat ( repeatValue ( this , times , stopPredicate ) ) ; |
public class CommerceTierPriceEntryLocalServiceBaseImpl { /** * Creates a new commerce tier price entry with the primary key . Does not add the commerce tier price entry to the database .
* @ param commerceTierPriceEntryId the primary key for the new commerce tier price entry
* @ return the new commerce tier price ... | return commerceTierPriceEntryPersistence . create ( commerceTierPriceEntryId ) ; |
public class CommerceShippingMethodLocalServiceUtil { /** * Deletes the commerce shipping method from the database . Also notifies the appropriate model listeners .
* @ param commerceShippingMethod the commerce shipping method
* @ return the commerce shipping method that was removed
* @ throws PortalException */
... | return getService ( ) . deleteCommerceShippingMethod ( commerceShippingMethod ) ; |
public class ScanResult { /** * Get all packages found during the scan .
* @ return A list of all packages found during the scan , or the empty list if none . */
public PackageInfoList getPackageInfo ( ) { } } | if ( closed . get ( ) ) { throw new IllegalArgumentException ( "Cannot use a ScanResult after it has been closed" ) ; } if ( ! scanSpec . enableClassInfo ) { throw new IllegalArgumentException ( "Please call ClassGraph#enableClassInfo() before #scan()" ) ; } return new PackageInfoList ( packageNameToPackageInfo . value... |
public class EventManager { /** * Adds an install event listener to the listenersMap with a specified notification type
* @ param listener InstallEventListener to add
* @ param notificationType Notification type of listener */
public void addListener ( InstallEventListener listener , String notificationType ) { } } | if ( listener == null || notificationType == null ) return ; if ( notificationType . isEmpty ( ) ) return ; if ( listenersMap == null ) { listenersMap = new HashMap < String , Collection < InstallEventListener > > ( ) ; } Collection < InstallEventListener > listeners = listenersMap . get ( notificationType ) ; if ( lis... |
public class ActivityMgr { /** * activity onResume 监听回调 | Activity Onresume Listener Callback
* @ param activity 发生onResume事件的activity | Activity that occurs Onresume events */
@ Override public void onActivityResumed ( Activity activity ) { } } | HMSAgentLog . d ( "onResumed:" + StrUtils . objDesc ( activity ) ) ; setCurActivity ( activity ) ; List < IActivityResumeCallback > tmdCallbacks = new ArrayList < IActivityResumeCallback > ( resumeCallbacks ) ; for ( IActivityResumeCallback callback : tmdCallbacks ) { callback . onActivityResume ( activity ) ; } |
public class TreeGraphNode { /** * Add a labeled arc from this node to the argument node .
* @ param arcLabel the < code > Class & lt ; ? extends GrammaticalRelationAnnotation & gt ; < / code > with which the new arc
* is to be labeled .
* @ param node the < code > TreeGraphNode < / code > to which the new
* ar... | if ( node == null ) { return false ; } if ( ! treeGraph ( ) . equals ( node . treeGraph ( ) ) ) { System . err . println ( "Warning: you are trying to add an arc from node " + this + " to node " + node + ", but they do not belong to the same TreeGraph!" ) ; } if ( ! label . containsKey ( arcLabel ) ) { label . set ( ar... |
public class ScheduledInstanceRecurrenceRequest { /** * The days . For a monthly schedule , this is one or more days of the month ( 1-31 ) . For a weekly schedule , this is
* one or more days of the week ( 1-7 , where 1 is Sunday ) . You can ' t specify this value with a daily schedule . If the
* occurrence is rela... | if ( this . occurrenceDays == null ) { setOccurrenceDays ( new com . amazonaws . internal . SdkInternalList < Integer > ( occurrenceDays . length ) ) ; } for ( Integer ele : occurrenceDays ) { this . occurrenceDays . add ( ele ) ; } return this ; |
public class MessageProcessorMatching { /** * Method removePubSubOutputHandlerMatchTarget
* Used to remove a PubSubOutputHandler from the MatchSpace .
* @ param sub the subscription to remove */
public void removePubSubOutputHandlerMatchTarget ( ControllableProxySubscription sub ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removePubSubOutputHandlerMatchTarget" , sub ) ; // Remove the PubSub OutputHandler from the matchspace
try { removeTarget ( sub ) ; } catch ( MatchingException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.proce... |
public class TupleTypeInfo { /** * END _ OF _ TUPLE _ DEPENDENT _ CODE */
private static final < T extends Tuple , K > TypeComparator < T > createLeadingFieldComparator ( boolean ascending , TypeInformation < ? > info ) { } } | if ( ! ( info . isKeyType ( ) && info instanceof AtomicType ) ) { throw new IllegalArgumentException ( "The field at position 0 (" + info + ") is no atomic key type." ) ; } @ SuppressWarnings ( "unchecked" ) AtomicType < K > typedInfo = ( AtomicType < K > ) info ; return new TupleLeadingFieldComparator < T , K > ( type... |
public class SynchroData { /** * Return an input stream to read the data from the named table .
* @ param name table name
* @ return InputStream instance
* @ throws IOException */
public StreamReader getTableData ( String name ) throws IOException { } } | InputStream stream = new ByteArrayInputStream ( m_tableData . get ( name ) ) ; if ( m_majorVersion > 5 ) { byte [ ] header = new byte [ 24 ] ; stream . read ( header ) ; SynchroLogger . log ( "TABLE HEADER" , header ) ; } return new StreamReader ( m_majorVersion , stream ) ; |
public class RestDocGenerator { /** * initialize the RestDoc Generator
* @ param classes the array of JAX - RS classes
* @ param globalHeader the global headers
* @ param baseURI an optional base uri like " / api " */
public void init ( final Class < ? > [ ] classes , final GlobalHeader globalHeader , final Strin... | if ( ! this . initialized . compareAndSet ( false , true ) ) { throw new RestDocException ( "Generator already initialized" ) ; } this . logger . info ( "Starting generation of RestDoc" ) ; this . logger . info ( "Searching for RestDoc API classes" ) ; if ( globalHeader != null ) { if ( globalHeader . getRequestHeader ... |
public class Statement { /** * Return an Observable that emits the emissions from a specified Observable
* if a condition evaluates to true , otherwise return an empty Observable .
* < img width = " 640 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / ifThen . png " a... | return ifThen ( condition , then , Observable . < R > empty ( ) ) ; |
public class OAuth20Utils { /** * Gets client id from authenticated profile .
* @ param profile the profile
* @ return the client id from authenticated profile */
public static String getClientIdFromAuthenticatedProfile ( final CommonProfile profile ) { } } | if ( profile . containsAttribute ( OAuth20Constants . CLIENT_ID ) ) { val attribute = profile . getAttribute ( OAuth20Constants . CLIENT_ID ) ; return CollectionUtils . toCollection ( attribute , ArrayList . class ) . get ( 0 ) . toString ( ) ; } return null ; |
public class ENU { /** * Converts a geometry from ENU to WGS .
* < p > Note that the geometry is internally converted . Use clone ( ) if you need a copy . < / p >
* @ param geometryEnu */
public void convertGeometryFromEnuToWgs84 ( Geometry geometryEnu ) { } } | Coordinate [ ] coordinates = geometryEnu . getCoordinates ( ) ; for ( int i = 0 ; i < coordinates . length ; i ++ ) { Coordinate wgs84 = enuToWgs84 ( coordinates [ i ] ) ; coordinates [ i ] . x = wgs84 . x ; coordinates [ i ] . y = wgs84 . y ; coordinates [ i ] . z = wgs84 . z ; } |
public class RawLocalFileSystem { /** * { @ inheritDoc } */
public FSDataOutputStream append ( Path f , int bufferSize , Progressable progress ) throws IOException { } } | if ( ! exists ( f ) ) { throw new FileNotFoundException ( "File " + f + " not found." ) ; } if ( getFileStatus ( f ) . isDir ( ) ) { throw new IOException ( "Cannot append to a diretory (=" + f + " )." ) ; } return new FSDataOutputStream ( new LocalFSFileOutputStream ( f , true ) , statistics ) ; |
public class EventSubscriptionsInner { /** * List all global event subscriptions under an Azure subscription and resource group .
* List all global event subscriptions under a specific Azure subscription and resource group .
* @ param resourceGroupName The name of the resource group within the user ' s subscription... | return listByResourceGroupWithServiceResponseAsync ( resourceGroupName ) . map ( new Func1 < ServiceResponse < List < EventSubscriptionInner > > , Page < EventSubscriptionInner > > ( ) { @ Override public Page < EventSubscriptionInner > call ( ServiceResponse < List < EventSubscriptionInner > > response ) { PageImpl < ... |
public class StringSerializer { /** * Validates that provided type is assignable from java . lang . String
* @ param type Type of object to be validated
* @ throws SerializerException */
private void validateString ( Type type ) throws SerializerException { } } | if ( null == type || ! String . class . equals ( TypeToken . of ( type ) . getRawType ( ) ) ) { throw new SerializerException ( "String serializer is able to work only with data types assignable from java.lang.String" ) ; } |
public class Choice6 { /** * { @ inheritDoc } */
@ Override public Choice5 < A , B , C , D , E > converge ( Function < ? super F , ? extends CoProduct5 < A , B , C , D , E , ? > > convergenceFn ) { } } | return match ( Choice5 :: a , Choice5 :: b , Choice5 :: c , Choice5 :: d , Choice5 :: e , convergenceFn . andThen ( cp5 -> cp5 . match ( Choice5 :: a , Choice5 :: b , Choice5 :: c , Choice5 :: d , Choice5 :: e ) ) ) ; |
public class LoggingTool { /** * Shows DEBUG output for the given Object ' s . It uses the
* toString ( ) method to concatenate the objects .
* @ param object Object to apply toString ( ) too and output
* @ param objects Object [ ] to apply toString ( ) too and output */
@ Override public void debug ( Object obje... | if ( isDebugEnabled ( ) ) { StringBuilder result = new StringBuilder ( ) ; result . append ( object . toString ( ) ) ; for ( Object obj : objects ) { if ( obj == null ) { result . append ( "null" ) ; } else { result . append ( obj . toString ( ) ) ; } } debugString ( result . toString ( ) ) ; } |
public class MVELAccumulator { /** * / * ( non - Javadoc )
* @ see org . kie . spi . Accumulator # accumulate ( java . lang . Object , org . kie . spi . Tuple , org . kie . common . InternalFactHandle , org . kie . rule . Declaration [ ] , org . kie . rule . Declaration [ ] , org . kie . WorkingMemory ) */
public voi... | Object [ ] localVars = ( ( MVELAccumulatorContext ) context ) . getVariables ( ) ; MVELAccumulatorFactoryContext factoryContext = ( MVELAccumulatorFactoryContext ) workingMemoryContext ; VariableResolverFactory factory = factoryContext . getActionFactory ( ) ; actionUnit . updateFactory ( handle , tuple , localVars , (... |
public class Person { /** * Commits update attribute defined in { @ link # attrUpdated } with method
* { @ link # updateAttrValue } to the database . After database update ,
* { @ link # attrUpdated } is cleared .
* @ throws EFapsException on error
* @ see # attrUpdated
* @ see # attrValues
* @ see # update... | synchronized ( this . attrUpdated ) { if ( this . attrUpdated . size ( ) > 0 ) { Connection con = null ; try { con = Context . getConnection ( ) ; final StringBuilder cmd = new StringBuilder ( ) ; PreparedStatement stmt = null ; try { cmd . append ( "update T_USERPERSON set " ) ; boolean first = true ; for ( final Attr... |
public class TreeInfo { /** * Is statement an initializer for a synthetic field ? */
public static boolean isSyntheticInit ( JCTree stat ) { } } | if ( stat . hasTag ( EXEC ) ) { JCExpressionStatement exec = ( JCExpressionStatement ) stat ; if ( exec . expr . hasTag ( ASSIGN ) ) { JCAssign assign = ( JCAssign ) exec . expr ; if ( assign . lhs . hasTag ( SELECT ) ) { JCFieldAccess select = ( JCFieldAccess ) assign . lhs ; if ( select . sym != null && ( select . sy... |
public class JcElement { /** * < div color = ' red ' style = " font - size : 24px ; color : red " > < b > < i > < u > JCYPHER < / u > < / i > < / b > < / div >
* < div color = ' red ' style = " font - size : 18px ; color : red " > < i > access a named number property , return a < b > JcNumber < / b > < / i > < / div ... | JcNumber ret = new JcNumber ( name , this , OPERATOR . PropertyContainer . PROPERTY_ACCESS ) ; QueryRecorder . recordInvocationConditional ( this , "numberProperty" , ret , QueryRecorder . literal ( name ) ) ; return ret ; |
public class GeneratorSetJson { /** * Returns the JSON object that represents the given generator . */
private static JsonStructure toJson ( ITestCaseGenerator generator ) { } } | JsonObjectBuilder builder = Json . createObjectBuilder ( ) ; if ( generator . getClass ( ) . equals ( TupleGenerator . class ) ) { TupleGenerator tupleGenerator = ( TupleGenerator ) generator ; builder . add ( TUPLES_KEY , tupleGenerator . getDefaultTupleSize ( ) ) ; Optional . ofNullable ( tupleGenerator . getRandomSe... |
public class AbstractViewQuery { /** * Set tag object of a view .
* @ param tag
* @ return self */
public T tag ( Object tag ) { } } | if ( view != null ) { view . setTag ( tag ) ; } return self ( ) ; |
public class LibPQFactory { /** * Verifies the server certificate according to the libpq rules . The cn attribute of the
* certificate is matched against the hostname . If the cn attribute starts with an asterisk ( * ) ,
* it will be treated as a wildcard , and will match all characters except a dot ( . ) . This me... | if ( ! sslMode . verifyPeerName ( ) ) { return true ; } return PGjdbcHostnameVerifier . INSTANCE . verify ( hostname , session ) ; |
public class ProtoParser { /** * com / dyuproject / protostuff / parser / ProtoParser . g : 645:1 : ignore _ block _ body : ( ( LEFTCURLY ) = > ignore _ block | ~ RIGHTCURLY ) ; */
public final ProtoParser . ignore_block_body_return ignore_block_body ( ) throws RecognitionException { } } | ProtoParser . ignore_block_body_return retval = new ProtoParser . ignore_block_body_return ( ) ; retval . start = input . LT ( 1 ) ; Object root_0 = null ; Token set170 = null ; ProtoParser . ignore_block_return ignore_block169 = null ; Object set170_tree = null ; try { // com / dyuproject / protostuff / parser / Proto... |
public class Matrix4f { /** * / * ( non - Javadoc )
* @ see org . joml . Matrix4fc # transformDirection ( float , float , float , org . joml . Vector3f ) */
public Vector3f transformDirection ( float x , float y , float z , Vector3f dest ) { } } | dest . x = x ; dest . y = y ; dest . z = z ; return dest . mulDirection ( this ) ; |
public class AbstractKMeans { /** * Choose the initial means .
* @ param database Database
* @ param relation Relation
* @ return Means */
protected double [ ] [ ] initialMeans ( Database database , Relation < V > relation ) { } } | Duration inittime = getLogger ( ) . newDuration ( initializer . getClass ( ) + ".time" ) . begin ( ) ; double [ ] [ ] means = initializer . chooseInitialMeans ( database , relation , k , getDistanceFunction ( ) ) ; getLogger ( ) . statistics ( inittime . end ( ) ) ; return means ; |
public class ApplicationExtensions { /** * Sets a set of default development settings for development mode for the given application .
* @ param application
* the new debug settings for development */
public static void setDefaultDebugSettingsForDevelopment ( final WebApplication application ) { } } | ApplicationExtensions . setHtmlHotDeploy ( application ) ; ApplicationExtensions . setDebugSettingsForDevelopment ( application ) ; ApplicationExtensions . setExceptionSettingsForDevelopment ( application ) ; // set the behavior if an missing resource is found . . .
application . getResourceSettings ( ) . setThrowExcep... |
public class CachingConnectionFactory { /** * Reset the Channel cache and underlying shared Connection , to be reinitialized on next access . */
protected void reset ( ) { } } | this . active = false ; synchronized ( this . cachedChannelsNonTransactional ) { for ( ChannelProxy channel : this . cachedChannelsNonTransactional ) { try { channel . getTargetChannel ( ) . close ( ) ; } catch ( Throwable ex ) { this . logger . trace ( "Could not close cached Rabbit Channel" , ex ) ; } } this . cached... |
public class StateConsumerImpl { /** * not used in scattered cache */
private InboundTransferTask addTransfer ( Address source , IntSet segmentsFromSource ) { } } | final InboundTransferTask inboundTransfer ; synchronized ( transferMapsLock ) { if ( trace ) { log . tracef ( "Adding transfer from %s for segments %s" , source , segmentsFromSource ) ; } segmentsFromSource . removeAll ( transfersBySegment . keySet ( ) ) ; // already in progress segments are excluded
if ( segmentsFromS... |
public class SourceNode { /** * Add a chunk of generated JS to the beginning of this source node .
* @ param aChunk
* A string snippet of generated JS code , another instance of SourceNode , or an array where each member is one of those things . */
public void prepend ( Object ... aChunk ) { } } | for ( int i = aChunk . length - 1 ; i >= 0 ; i -- ) { if ( aChunk [ i ] instanceof String ) { this . prepend ( ( String ) aChunk [ i ] ) ; } else if ( aChunk [ i ] instanceof SourceNode ) { this . prepend ( ( SourceNode ) aChunk [ i ] ) ; } else { throw new IllegalArgumentException ( ) ; } } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.