signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class AmazonApiGatewayClient { /** * Gets a specified VPC link under the caller ' s account in a region . * @ param getVpcLinkRequest * Gets a specified VPC link under the caller ' s account in a region . * @ return Result of the GetVpcLink operation returned by the service . * @ throws UnauthorizedExcep...
request = beforeClientExecution ( request ) ; return executeGetVpcLink ( request ) ;
public class JsJmsMessageImpl { /** * Perform any specific send - time processing and then call the superclass method * and return the result . * The specific send - time processing for a JsJmsMessage is to write back * the JMS _ IBM _ MQMD _ MsgId property , if set , into the ApiMessageId . * This method must ...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getSent" , copy ) ; // We don ' t want to fluff up an MQMD PropertyMap unnecessarily , so we try to // figure out first whether there have been any MQMD properties set . . . . if ( hasMQMDPropertiesSet ( ) ) { // If ...
public class A_CmsGroupUsersList { /** * Makes a list item from a user . < p > * @ param user a user * @ return a list item */ protected CmsListItem makeListItem ( CmsUser user ) { } }
CmsListItem item = getList ( ) . newItem ( user . getId ( ) . toString ( ) ) ; setUserData ( user , item ) ; return item ;
public class CmsJspStandardContextBean { /** * Returns an EL access wrapper map for the given object . < p > * If the object is a { @ link CmsResource } , then a { @ link CmsJspResourceWrapper } is returned . * Otherwise the object is wrapped in a { @ link CmsJspObjectValueWrapper } . < p > * If the object is alr...
return CmsCollectionsGenericWrapper . createLazyMap ( obj -> { if ( ( obj instanceof A_CmsJspValueWrapper ) || ( obj instanceof CmsJspResourceWrapper ) ) { return obj ; } else if ( obj instanceof CmsResource ) { return CmsJspResourceWrapper . wrap ( m_cms , ( CmsResource ) obj ) ; } else { return CmsJspObjectValueWrapp...
public class ChronoLocalDateTimeImpl { @ Override public ChronoZonedDateTime < D > atZone ( ZoneId zoneId ) { } }
return ChronoZonedDateTimeImpl . ofBest ( this , zoneId , null ) ;
public class SDEFWriter { /** * Write calendar exceptions . * @ param records list of ProjectCalendars * @ throws IOException */ private void writeExceptions ( List < ProjectCalendar > records ) throws IOException { } }
for ( ProjectCalendar record : records ) { if ( ! record . getCalendarExceptions ( ) . isEmpty ( ) ) { // Need to move HOLI up here and get 15 exceptions per line as per USACE spec . // for now , we ' ll write one line for each calendar exception , hope there aren ' t too many // changing this would be a serious upgrad...
public class AbstractStreamEx { /** * Produces a list containing cumulative results of applying the * accumulation function going left to right using given seed value . * This is a terminal operation . * The resulting { @ link List } is guaranteed to be mutable . * For parallel stream it ' s not guaranteed that...
List < U > result = new ArrayList < > ( ) ; result . add ( seed ) ; forEachOrdered ( t -> result . add ( accumulator . apply ( result . get ( result . size ( ) - 1 ) , t ) ) ) ; return result ;
public class JdbcRegistry { /** * Simply pull the client from storage . * @ param apiKey * @ throws SQLException */ protected Client getClientInternal ( String apiKey ) throws SQLException { } }
QueryRunner run = new QueryRunner ( ds ) ; return run . query ( "SELECT bean FROM gw_clients WHERE api_key = ?" , // $ NON - NLS - 1 $ Handlers . CLIENT_HANDLER , apiKey ) ;
public class CPOptionValueUtil { /** * Returns the cp option values before and after the current cp option value in the ordered set where CPOptionId = & # 63 ; . * @ param CPOptionValueId the primary key of the current cp option value * @ param CPOptionId the cp option ID * @ param orderByComparator the comparato...
return getPersistence ( ) . findByCPOptionId_PrevAndNext ( CPOptionValueId , CPOptionId , orderByComparator ) ;
public class Dom { /** * Steps may be empty strings */ public static List < Element > getChildElements ( Element root , String ... steps ) { } }
List < Element > lst ; lst = new ArrayList < > ( ) ; doGetChildElements ( root , steps , 0 , lst ) ; return lst ;
public class TCPClientConnection { /** * private static final Map < String , Long > timerMap = new ConcurrentHashMap < String , Long > ( ) ; */ protected boolean processBufferedMessages ( Event event ) throws AvpDataException { } }
if ( listeners . size ( ) == 0 ) { // PCB added logging logger . debug ( "listeners.size() == 0 on connection [{}]" , this . getKey ( ) ) ; try { buffer . add ( event ) ; } catch ( IllegalStateException e ) { logger . debug ( "Got IllegalStateException in processBufferedMessages" ) ; // FIXME : requires JDK6 : buffer ....
public class InputStreamUtil { /** * Count number of lines in a file * @ param filename * @ return * @ throws IOException */ public static int countLines ( String filename ) throws IOException { } }
FileInputStream fis = new FileInputStream ( filename ) ; try { return countLines ( new BufferedInputStream ( fis ) ) ; } finally { fis . close ( ) ; }
public class SessionChangesLog { /** * Creates new changes log with rootPath and its descendants of this one and removes those * entries . * @ param rootPath * @ return ItemDataChangesLog */ public PlainChangesLog pushLog ( QPath rootPath ) { } }
// session instance is always present in SessionChangesLog PlainChangesLog cLog = new PlainChangesLogImpl ( getDescendantsChanges ( rootPath ) , session ) ; if ( rootPath . equals ( Constants . ROOT_PATH ) ) { clear ( ) ; } else { remove ( rootPath ) ; } return cLog ;
public class ObjectAnimatorCompat { /** * Constructs and returns an ObjectAnimator that animates between color values . A single * value implies that that value is the one being animated to . Two values imply starting * and ending values . More than two values imply a starting value , values to animate through * ...
if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . LOLLIPOP ) { return ObjectAnimatorCompatLollipop . ofArgb ( target , propertyName , values ) ; } else { return ObjectAnimatorCompatBase . ofArgb ( target , propertyName , values ) ; }
public class DescribeVpcsRequest { /** * One or more VPC IDs . * Default : Describes all your VPCs . * @ return One or more VPC IDs . < / p > * Default : Describes all your VPCs . */ public java . util . List < String > getVpcIds ( ) { } }
if ( vpcIds == null ) { vpcIds = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return vpcIds ;
public class AbstractQueryPersonAttributeDao { /** * / * ( non - Javadoc ) * @ see org . jasig . services . persondir . IPersonAttributeDao # getPeopleWithMultivaluedAttributes ( java . util . Map ) */ @ Override public final Set < IPersonAttributes > getPeopleWithMultivaluedAttributes ( final Map < String , List < O...
Validate . notNull ( query , "query may not be null." ) ; // Generate the query to pass to the subclass final QB queryBuilder = this . generateQuery ( query ) ; if ( queryBuilder == null && ( this . queryAttributeMapping != null || this . useAllQueryAttributes == true ) ) { this . logger . debug ( "No queryBuilder was ...
public class Main { /** * Helper to only set a property if not already set . */ private void maybeSetProperty ( final String name , final String value ) { } }
if ( System . getProperty ( name ) == null ) { System . setProperty ( name , value ) ; }
public class sslcertkey_sslvserver_binding { /** * Use this API to fetch sslcertkey _ sslvserver _ binding resources of given name . */ public static sslcertkey_sslvserver_binding [ ] get ( nitro_service service , String certkey ) throws Exception { } }
sslcertkey_sslvserver_binding obj = new sslcertkey_sslvserver_binding ( ) ; obj . set_certkey ( certkey ) ; sslcertkey_sslvserver_binding response [ ] = ( sslcertkey_sslvserver_binding [ ] ) obj . get_resources ( service ) ; return response ;
public class AbstractRadial { /** * Sets the type of the gauge * TYPE1 a quarter gauge ( 90 deg ) * TYPE2 a two quarter gauge ( 180 deg ) * TYPE3 a three quarter gauge ( 270 deg ) * TYPE4 a four quarter gauge ( 300 deg ) * CUSTOM set the { @ link # setCustomGaugeType ( CustomGaugeType ) custom gauge type } . ...
getModel ( ) . setGaugeType ( GAUGE_TYPE ) ; init ( getInnerBounds ( ) . width , getInnerBounds ( ) . height ) ; repaint ( getInnerBounds ( ) ) ;
public class AbsoluteTimeframe { /** * Construct the Timeframe map to send in the query . * @ return the Timeframe Json map to send in the query . */ @ Override public Map < String , Object > constructTimeframeArgs ( ) { } }
Map < String , Object > timeframe = null ; if ( start != null && end != null ) { Map < String , Object > absoluteTimeframe = new HashMap < String , Object > ( 3 ) ; absoluteTimeframe . put ( KeenQueryConstants . START , start ) ; absoluteTimeframe . put ( KeenQueryConstants . END , end ) ; timeframe = new HashMap < Str...
public class JobTargetGroupsInner { /** * Gets all target groups in an agent . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param serverName The name of the server . * @ param jobAgentName ...
return AzureServiceFuture . fromPageResponse ( listByAgentSinglePageAsync ( resourceGroupName , serverName , jobAgentName ) , new Func1 < String , Observable < ServiceResponse < Page < JobTargetGroupInner > > > > ( ) { @ Override public Observable < ServiceResponse < Page < JobTargetGroupInner > > > call ( String nextP...
public class OmsDrainDir { /** * Calculates the max slope data as an array : [ maxslope , maxdir , elevation , e1 , e2 , sumdev , dirdren1 , dirdren2 , sigma ] */ private double [ ] calculateMaximumSlope ( BitMatrix analizedMatrix , RandomIter pitRandomIter , WritableRandomIter tcaRandomIter , int col , int row ) { } }
double [ ] maxSlopeData = new double [ 10 ] ; int n = 1 , m = 1 ; double dirmax = 0f , e1min = - 9999f , e2min = - 9999f ; analizedMatrix . mark ( col , row ) ; tcaRandomIter . setSample ( col , row , 0 , 1 ) ; double pendmax = 0f ; maxSlopeData [ 3 ] = pitRandomIter . getSampleDouble ( col , row , 0 ) ; /* * per ogni ...
public class ApiOvhVrack { /** * Move your dedicatedCloud datacenter from a Vrack to another * REST : POST / vrack / { serviceName } / dedicatedCloudDatacenter / { datacenter } / move * @ param targetServiceName [ required ] The internal name of your target vrack * @ param serviceName [ required ] The internal na...
String qPath = "/vrack/{serviceName}/dedicatedCloudDatacenter/{datacenter}/move" ; StringBuilder sb = path ( qPath , serviceName , datacenter ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "targetServiceName" , targetServiceName ) ; String resp = exec ( qPath , "POST" , sb . toS...
public class DSLMapParser { /** * src / main / resources / org / drools / compiler / lang / dsl / DSLMap . g : 106:1 : mapping _ file : ( statement ) * - > ^ ( VT _ DSL _ GRAMMAR ( statement ) * ) ; */ public final DSLMapParser . mapping_file_return mapping_file ( ) throws RecognitionException { } }
DSLMapParser . mapping_file_return retval = new DSLMapParser . mapping_file_return ( ) ; retval . start = input . LT ( 1 ) ; Object root_0 = null ; ParserRuleReturnScope statement1 = null ; RewriteRuleSubtreeStream stream_statement = new RewriteRuleSubtreeStream ( adaptor , "rule statement" ) ; try { // src / main / re...
public class ChorusAssert { /** * Asserts that two chars are equal . If they are not * an AssertionFailedError is thrown with the given message . */ static public void assertEquals ( String message , char expected , char actual ) { } }
assertEquals ( message , new Character ( expected ) , new Character ( actual ) ) ;
public class MappingUtils { /** * Converts java . sql . ResultSet into List of QueryParameters . * Used for caching purposes to allow ResultSet to be closed and disposed . * @ param rs ResultSet values from which would be read * @ return List of QueryParameters ( one for each row ) * @ throws SQLException propa...
List < QueryParameters > result = new ArrayList < QueryParameters > ( ) ; String columnName = null ; while ( rs . next ( ) == true ) { QueryParameters params = new QueryParameters ( ) ; ResultSetMetaData rsmd = rs . getMetaData ( ) ; int cols = rsmd . getColumnCount ( ) ; for ( int i = 1 ; i <= cols ; i ++ ) { columnNa...
public class IntegerScalarHandler { /** * Returns one < code > ResultSet < / code > column as an object via the < code > ResultSet . getObject ( ) * < / code > method that performs type conversions . * @ param rs < code > ResultSet < / code > to process . * @ return The column or < code > null < / code > if there...
if ( rs . next ( ) ) { if ( this . columnName == null ) { return ( ( Number ) rs . getObject ( this . columnIndex ) ) . intValue ( ) ; } return ( ( Number ) rs . getObject ( this . columnIndex ) ) . intValue ( ) ; } return null ;
public class IbvQP { /** * - - - - - oo - verbs */ public SVCPostSend postSend ( List < IbvSendWR > wrList , List < IbvSendWR > badwrList ) throws IOException { } }
return verbs . postSend ( this , wrList , badwrList ) ;
public class PrimitiveByteArray2dJsonDeserializer { /** * { @ inheritDoc } */ @ Override public byte [ ] [ ] doDeserialize ( JsonReader reader , JsonDeserializationContext ctx , JsonDeserializerParameters params ) { } }
byte [ ] [ ] result ; reader . beginArray ( ) ; JsonToken token = reader . peek ( ) ; if ( JsonToken . END_ARRAY == token ) { // empty array result = new byte [ 0 ] [ 0 ] ; } else if ( JsonToken . STRING == token ) { // byte [ ] are encoded as String List < byte [ ] > list = new ArrayList < byte [ ] > ( ) ; int size = ...
public class FiniteSetObligation { /** * p ( a , b ) = > exists idx in set dom m & m ( idx ) = f ( a ) */ private PExp getImpliesExpression ( ASetCompSetExp exp , ILexNameToken finmap , ILexNameToken findex ) { } }
if ( exp . getPredicate ( ) == null ) // set comprehension has no predicate { return getImpliesExists ( exp , finmap , findex ) ; } else { return AstExpressionFactory . newAImpliesBooleanBinaryExp ( exp . getPredicate ( ) . clone ( ) , getImpliesExists ( exp . clone ( ) , finmap , findex ) ) ; }
public class AbstractErrorEventDefinitionBuilder { /** * Finishes the building of a error event definition . * @ param < T > * @ return the parent event builder */ @ SuppressWarnings ( { } }
"rawtypes" , "unchecked" } ) public < T extends AbstractFlowNodeBuilder > T errorEventDefinitionDone ( ) { return ( T ) ( ( Event ) element . getParentElement ( ) ) . builder ( ) ;
public class XString { /** * Tests if this string starts with the specified prefix beginning * a specified index . * @ param prefix the prefix . * @ param toffset where to begin looking in the string . * @ return < code > true < / code > if the character sequence represented by the * argument is a prefix of t...
int to = toffset ; int tlim = this . length ( ) ; int po = 0 ; int pc = prefix . length ( ) ; // Note : toffset might be near - 1 > > > 1. if ( ( toffset < 0 ) || ( toffset > tlim - pc ) ) { return false ; } while ( -- pc >= 0 ) { if ( this . charAt ( to ) != prefix . charAt ( po ) ) { return false ; } to ++ ; po ++ ; ...
public class ZoomableCanvas { /** * Notifies listeners on drawing start . */ protected void fireDrawingStart ( ) { } }
final ListenerCollection < EventListener > list = this . listeners ; if ( list != null ) { for ( final DrawingListener listener : list . getListeners ( DrawingListener . class ) ) { listener . onDrawingStart ( ) ; } }
public class InfraAlertConditionService { /** * Returns the set of alert conditions for the given query parameters . * @ param queryParams The query parameters * @ return The set of alert conditions */ public Collection < InfraAlertCondition > list ( List < String > queryParams ) { } }
return HTTP . GET ( "/v2/alerts/conditions" , null , queryParams , INFRA_ALERT_CONDITIONS ) . get ( ) ;
public class SynchronisationService { /** * Checks if the expectations are met and throws an assert if not * @ param condition The conditions the element should meet */ public void checkAndAssertForExpectedCondition ( ExpectedCondition < ? > condition ) { } }
if ( ! waitForExpectedCondition ( condition , 0 ) ) { fail ( String . format ( "Element does not meet condition %1$s" , condition . toString ( ) ) ) ; }
public class PGPUtils { /** * Performs encryption on a single file using a PGP public key . * @ param path file to be encrypted * @ param publicKeyStream stream providing the encoded public key * @ param targetStream stream to receive the encrypted data * @ throws IOException if there is an error reading or wri...
PGPPublicKey publicKey = getPublicKey ( publicKeyStream ) ; try ( ByteArrayOutputStream compressed = new ByteArrayOutputStream ( ) ; ArmoredOutputStream armOut = new ArmoredOutputStream ( targetStream ) ) { PGPCompressedDataGenerator compressedGenerator = new PGPCompressedDataGenerator ( PGPCompressedData . ZIP ) ; PGP...
public class CompoundComparator { /** * Replace the Comparator at the given index using the given sort order . * @ param index the index of the Comparator to replace * @ param comparator the Comparator to place at the given index * @ param ascending the sort order : ascending ( true ) or descending ( false ) */ p...
this . comparators . set ( index , new InvertibleComparator < > ( comparator , ascending ) ) ;
public class Keys { /** * Returns a new { @ link SecretKey } with a key length suitable for use with the specified { @ link SignatureAlgorithm } . * < p > < a href = " https : / / tools . ietf . org / html / rfc7518 # section - 3.2 " > JWA Specification ( RFC 7518 ) , Section 3.2 < / a > * requires minimum key leng...
Assert . notNull ( alg , "SignatureAlgorithm cannot be null." ) ; switch ( alg ) { case HS256 : case HS384 : case HS512 : return Classes . invokeStatic ( MAC , "generateKey" , SIG_ARG_TYPES , alg ) ; default : String msg = "The " + alg . name ( ) + " algorithm does not support shared secret keys." ; throw new IllegalAr...
public class StringUtils { /** * Returns s if it ' s at most maxWidth chars , otherwise chops right side to fit . */ public static String trim ( String s , int maxWidth ) { } }
if ( s . length ( ) <= maxWidth ) { return ( s ) ; } return ( s . substring ( 0 , maxWidth ) ) ;
public class CoIterator { /** * Use { @ link # getLeft ( ) } and { @ link # getRight ( ) } to get the next elements from the two iterated collections . */ public void next ( ) { } }
boolean hasLeft = currentLeft != null ; boolean hasRight = currentRight != null ; if ( ! hasLeft && ! hasRight ) { throw new NoSuchElementException ( ) ; } int order ; if ( hasLeft && ! hasRight ) { order = - 1 ; } else if ( ! hasLeft ) { order = 1 ; } else { order = comparator . compare ( currentLeft , currentRight ) ...
public class ZonesInner { /** * Updates a DNS zone . Does not modify DNS records within the zone . * @ param resourceGroupName The name of the resource group . * @ param zoneName The name of the DNS zone ( without a terminating dot ) . * @ param ifMatch The etag of the DNS zone . Omit this value to always overwri...
return updateWithServiceResponseAsync ( resourceGroupName , zoneName , ifMatch , tags ) . toBlocking ( ) . single ( ) . body ( ) ;
public class CoverageDataCore { /** * Get the gridded tile * @ return gridded tiles */ public List < GriddedTile > getGriddedTile ( ) { } }
List < GriddedTile > griddedTile = null ; try { if ( griddedTileDao . isTableExists ( ) ) { griddedTile = griddedTileDao . query ( tileMatrixSet . getTableName ( ) ) ; } } catch ( SQLException e ) { throw new GeoPackageException ( "Failed to get Gridded Tile for table name: " + tileMatrixSet . getTableName ( ) , e ) ; ...
public class JsonWrapperFilteringCharacterPipelineComponent { /** * / * ( non - Javadoc ) * @ see org . apereo . portal . rendering . PipelineComponent # getCacheKey ( javax . servlet . http . HttpServletRequest , javax . servlet . http . HttpServletResponse ) */ @ Override public CacheKey getCacheKey ( HttpServletRe...
if ( this . wrappedComponent != null ) { return this . wrappedComponent . getCacheKey ( request , response ) ; } else { logger . debug ( "PipelineComponentWrapper.wrapperComponent is null" ) ; throw new IllegalStateException ( "PipelineComponentWrapper.wrapperComponent is null" ) ; }
public class Multimap { /** * Remove the specified values ( all occurrences ) from the value set associated with keys which satisfy the specified < code > predicate < / code > . * @ param values * @ param predicate * @ return < code > true < / code > if this Multimap is modified by this operation , otherwise < co...
Set < K > removingKeys = null ; for ( Map . Entry < K , V > entry : this . valueMap . entrySet ( ) ) { if ( predicate . test ( entry . getKey ( ) , entry . getValue ( ) ) ) { if ( removingKeys == null ) { removingKeys = new HashSet < > ( ) ; } removingKeys . add ( entry . getKey ( ) ) ; } } if ( N . isNullOrEmpty ( rem...
public class CommerceVirtualOrderItemLocalServiceBaseImpl { /** * Adds the commerce virtual order item to the database . Also notifies the appropriate model listeners . * @ param commerceVirtualOrderItem the commerce virtual order item * @ return the commerce virtual order item that was added */ @ Indexable ( type ...
commerceVirtualOrderItem . setNew ( true ) ; return commerceVirtualOrderItemPersistence . update ( commerceVirtualOrderItem ) ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EEnum getIfcPlateTypeEnum ( ) { } }
if ( ifcPlateTypeEnumEEnum == null ) { ifcPlateTypeEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 871 ) ; } return ifcPlateTypeEnumEEnum ;
public class WSSecurityServiceImpl { /** * Returns the active UserRegistry . If the active user registry is an instance of * com . ibm . ws . security . registry . UserRegistry , then it will be wrapped . Otherwise , * if the active user registry is an instance of CustomUserRegistryWrapper , then the * underlying...
final String METHOD = "getUserRegistry" ; UserRegistry activeUserRegistry = null ; try { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , METHOD + " securityServiceRef " + securityServiceRef ) ; } SecurityService ss = securityServiceRef . getService ( ) ; if ( ss == null ) ...
public class FractionDescriptor { /** * Retrieves a { @ link FractionDescriptor } from the { @ code fractionList } based on the { @ code gav } string . * < p > The { @ code gav } string contains colon - delimited Maven artifact coordinates . Supported formats are : < / p > * < ul > * < li > { @ code artifactId } ...
final String [ ] parts = gav . split ( ":" ) ; FractionDescriptor desc = null ; switch ( parts . length ) { case 1 : desc = fractionList . getFractionDescriptor ( THORNTAIL_GROUP_ID , parts [ 0 ] ) ; if ( desc == null ) { throw new RuntimeException ( "Fraction not found: " + gav ) ; } break ; case 2 : desc = fractionLi...
public class CPAttachmentFileEntryPersistenceImpl { /** * Returns the last cp attachment file entry in the ordered set where displayDate & lt ; & # 63 ; and status = & # 63 ; . * @ param displayDate the display date * @ param status the status * @ param orderByComparator the comparator to order the set by ( optio...
CPAttachmentFileEntry cpAttachmentFileEntry = fetchByLtD_S_Last ( displayDate , status , orderByComparator ) ; if ( cpAttachmentFileEntry != null ) { return cpAttachmentFileEntry ; } StringBundler msg = new StringBundler ( 6 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "displayDate=" ) ; msg . append ...
public class Store { /** * Creates n new annotation instances , adding them all to the store . * @ see Store # create ( Class ) */ public void create ( final Class < T > klass , final int n ) { } }
for ( int i = 0 ; i != n ; i ++ ) create ( klass ) ;
public class AbstractChart { /** * @ param series * the series to set * @ return AbstractChart */ public AbstractChart < T , S > setSeries ( Collection < Serie > series ) { } }
this . getChartConfiguration ( ) . setSeries ( series ) ; return this ;
public class LazyUserTransaction { @ Override protected void doCommit ( ) throws HeuristicMixedException , HeuristicRollbackException , IllegalStateException , RollbackException , SecurityException , SystemException { } }
if ( canTerminateTransactionReally ( ) ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "#lazyTx ...Committing the transaction: {}" , buildLazyTxExp ( ) ) ; } superDoCommit ( ) ; } else { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "#lazyTx *No commit because of non-begun transaction: {}" , buildLazy...
public class CommerceTaxFixedRateLocalServiceBaseImpl { /** * Sets the commerce tax fixed rate address rel local service . * @ param commerceTaxFixedRateAddressRelLocalService the commerce tax fixed rate address rel local service */ public void setCommerceTaxFixedRateAddressRelLocalService ( com . liferay . commerce ...
this . commerceTaxFixedRateAddressRelLocalService = commerceTaxFixedRateAddressRelLocalService ;
public class WebSocketConnectionManager { /** * Send message to all connections tagged with all given tags * @ param message the message * @ param labels the tag labels */ public void sendToTagged ( String message , String ... labels ) { } }
for ( String label : labels ) { sendToTagged ( message , label ) ; }
public class ThreadJobProcessor { /** * Starts processor thread . */ @ Override public synchronized void start ( ) { } }
if ( ! started . getAndSet ( true ) ) { finished . set ( false ) ; thread . start ( ) ; }
public class GenericsInfoFactory { /** * Note : ignore classes switch off caching for resolved descriptor ( and if completely resolved version * contained in cache limited version will be composed one more time ) . * @ param type finder type to investigate * @ param ignoreClasses list of classes to ignore during ...
GenericsInfo descriptor = ignoreClasses . length > 0 ? GenericInfoUtils . create ( type , ignoreClasses ) : CACHE . get ( type ) ; if ( descriptor == null ) { LOCK . lock ( ) ; try { if ( CACHE . get ( type ) != null ) { // descriptor could be created while thread wait for lock descriptor = CACHE . get ( type ) ; } els...
public class ResourceRoot { /** * / * ( non - Javadoc ) * @ see org . jboss . staxmapper . XMLElementWriter # writeContent ( org . jboss . staxmapper . XMLExtendedStreamWriter , java . lang . Object ) */ @ Override public void writeContent ( XMLExtendedStreamWriter writer , Resource value ) throws XMLStreamException ...
if ( value != null && this != value ) { throw new IllegalStateException ( "Wrong target resource." ) ; } writer . writeStartElement ( ModuleConfigImpl . RESOURCE_ROOT ) ; writer . writeAttribute ( ModuleConfigImpl . PATH , path ) ; writer . writeEndElement ( ) ;
public class BaseTaskSession { /** * A utility method to get an Input stream from a filename or URL string . * @ param strFilename The filename or url to open as an Input Stream . * @ return The imput stream ( or null if there was an error ) . */ public InputStream getInputStream ( String strFilename ) { } }
InputStream inStream = Utility . getInputStream ( strFilename , this . getApplication ( ) ) ; if ( inStream == null ) if ( this . getParentSession ( ) != null ) { Task task = this . getParentSession ( ) . getTask ( ) ; if ( ( task != null ) && ( task != this ) ) inStream = task . getInputStream ( strFilename ) ; } retu...
public class AsyncJob { /** * Executes the provided code immediately on a background thread * @ param onBackgroundJob Interface that wraps the code to execute */ public static void doInBackground ( final OnBackgroundJob onBackgroundJob ) { } }
new Thread ( new Runnable ( ) { @ Override public void run ( ) { onBackgroundJob . doOnBackground ( ) ; } } ) . start ( ) ;
public class AbstractSULOmegaOracle { /** * Gets the { @ link ObservableSUL } . * @ return the { @ link ObservableSUL } . */ public ObservableSUL < S , I , O > getSul ( ) { } }
if ( sul . canFork ( ) ) { return localSul . get ( ) ; } else { return sul ; }
public class log { /** * Sends a DEBUG log message and log the exception . * @ param message The message you would like logged . * @ param throwable An exception to log */ public static int d ( String message , Throwable throwable ) { } }
return logger ( QuickUtils . DEBUG , message , throwable ) ;
public class FilterUtil { /** * Try to guess the appropriate factory . * @ param in Input type * @ param < V > Vector type * @ return Factory */ @ SuppressWarnings ( "unchecked" ) public static < V extends NumberVector > NumberVector . Factory < V > guessFactory ( SimpleTypeInformation < V > in ) { } }
NumberVector . Factory < V > factory = null ; if ( in instanceof VectorTypeInformation ) { factory = ( NumberVector . Factory < V > ) ( ( VectorTypeInformation < V > ) in ) . getFactory ( ) ; } if ( factory == null ) { // FIXME : hack . Add factories to simple type information , too ? try { Field f = in . getRestrictio...
public class DevicesInner { /** * Creates or updates a Data Box Edge / Gateway resource . * @ param deviceName The device name . * @ param resourceGroupName The resource group name . * @ param dataBoxEdgeDevice The resource object . * @ param serviceCallback the async ServiceCallback to handle successful and fa...
return ServiceFuture . fromResponse ( beginCreateOrUpdateWithServiceResponseAsync ( deviceName , resourceGroupName , dataBoxEdgeDevice ) , serviceCallback ) ;
public class WSCallbackHandlerFactoryImpl { /** * { @ inheritDoc } */ @ Override public CallbackHandler getCallbackHandler ( byte [ ] credToken ) { } }
AuthenticationData authenticationData = new WSAuthenticationData ( ) ; authenticationData . set ( AuthenticationData . TOKEN , credToken ) ; return new AuthenticationDataCallbackHandler ( authenticationData ) ;
public class ResultResponseUtil { /** * 设置返回状态 ( 返回码 , 描述 ) * @ param iReturnCode IReturnCode * @ return ResultResponseUtil */ public ResultResponseUtil status ( IReturnCode iReturnCode ) { } }
this . setCode ( iReturnCode . getCode ( ) ) ; this . setMsg ( iReturnCode . getMsg ( ) ) ; return this ;
public class SectionLoader { /** * Loads all bytes and information of the reloc section . * The file on disk is read to fetch the information . * @ return { @ link RelocationSection } of the given file * @ throws IOException * if unable to read the file * @ throws IllegalStateException * if unable to load d...
Optional < RelocationSection > debug = maybeLoadRelocSection ( ) ; return ( RelocationSection ) getOrThrow ( debug , "unable to load reloc section" ) ;
public class Schema { /** * Adds all of the fields in the specified schema to this schema . * @ param sch * the other schema */ public void addAll ( Schema sch ) { } }
fields . putAll ( sch . fields ) ; if ( myFieldSet != null ) myFieldSet = new TreeSet < String > ( fields . keySet ( ) ) ;
public class CommercePriceListUserSegmentEntryRelLocalServiceBaseImpl { /** * Deletes the commerce price list user segment entry rel from the database . Also notifies the appropriate model listeners . * @ param commercePriceListUserSegmentEntryRel the commerce price list user segment entry rel * @ return the commer...
return commercePriceListUserSegmentEntryRelPersistence . remove ( commercePriceListUserSegmentEntryRel ) ;
public class ParagraphVectors { /** * This method returns top N labels nearest to specified document * @ param document * @ param topN * @ return */ public Collection < String > nearestLabels ( LabelledDocument document , int topN ) { } }
if ( document . getReferencedContent ( ) != null ) { return nearestLabels ( document . getReferencedContent ( ) , topN ) ; } else return nearestLabels ( document . getContent ( ) , topN ) ;
public class Collections { /** * Returns an empty sorted map ( immutable ) . This map is serializable . * < p > This example illustrates the type - safe way to obtain an empty map : * < pre > { @ code * SortedMap < String , Date > s = Collections . emptySortedMap ( ) ; * } < / pre > * @ implNote Implementatio...
return ( SortedMap < K , V > ) UnmodifiableNavigableMap . EMPTY_NAVIGABLE_MAP ;
public class ConcurrentLinkedDeque { /** * Reconstitutes this deque from a stream ( that is , deserializes it ) . * @ param s the stream * @ throws ClassNotFoundException if the class of a serialized object * could not be found * @ throws java . io . IOException if an I / O error occurs */ private void readObje...
s . defaultReadObject ( ) ; // Read in elements until trailing null sentinel found Node < E > h = null , t = null ; for ( Object item ; ( item = s . readObject ( ) ) != null ; ) { @ SuppressWarnings ( "unchecked" ) Node < E > newNode = new Node < E > ( ( E ) item ) ; if ( h == null ) h = t = newNode ; else { t . lazySe...
public class FileWriter { /** * 将列表写入文件 * @ param < T > 集合元素类型 * @ param list 列表 * @ param lineSeparator 换行符枚举 ( Windows 、 Mac或Linux换行符 ) * @ param isAppend 是否追加 * @ return 目标文件 * @ throws IORuntimeException IO异常 * @ since 3.1.0 */ public < T > File writeLines ( Collection < T > list , LineSeparator lineS...
try ( PrintWriter writer = getPrintWriter ( isAppend ) ) { for ( T t : list ) { if ( null != t ) { writer . print ( t . toString ( ) ) ; printNewLine ( writer , lineSeparator ) ; writer . flush ( ) ; } } } return this . file ;
public class BeanProvider { /** * Internal helper method to resolve the right bean and resolve the contextual reference . * @ param type the type of the bean in question * @ param beanManager current bean - manager * @ param beans beans in question * @ param < T > target type * @ return the contextual referen...
Bean < ? > bean = beanManager . resolve ( beans ) ; // logWarningIfDependent ( bean ) ; CreationalContext < ? > creationalContext = beanManager . createCreationalContext ( bean ) ; @ SuppressWarnings ( { "unchecked" , "UnnecessaryLocalVariable" } ) T result = ( T ) beanManager . getReference ( bean , type , creationalC...
public class CmsExportPointDriver { /** * Returns the File for the given export point resource . < p > * @ param rootPath name of a file in the VFS * @ param exportpoint the name of the export point * @ return the File for the given export point resource */ protected File getExportPointFile ( String rootPath , St...
StringBuffer exportpath = new StringBuffer ( 128 ) ; exportpath . append ( m_exportpointLookupMap . get ( exportpoint ) ) ; exportpath . append ( rootPath . substring ( exportpoint . length ( ) ) ) ; return new File ( exportpath . toString ( ) ) ;
public class Subtypes2 { /** * Get known subtypes of given class . The set returned < em > DOES < / em > include * the class itself . * @ param classDescriptor * ClassDescriptor naming a class * @ return Set of ClassDescriptors which are the known subtypes of the class * @ throws ClassNotFoundException */ pub...
Set < ClassDescriptor > result = subtypeSetMap . get ( classDescriptor ) ; if ( result == null ) { result = computeKnownSubtypes ( classDescriptor ) ; subtypeSetMap . put ( classDescriptor , result ) ; } return result ;
public class AuditServiceImpl { /** * Get parameters which passed from the configuration file . * @ throws RepositoryConfigurationException */ private void readParamsFromFile ( ) { } }
if ( initParams != null ) { ValueParam valParam = initParams . getValueParam ( ADMIN_INDENTITY ) ; if ( valParam != null ) { adminIdentity = valParam . getValue ( ) ; LOG . info ( "Admin identity is read from configuration file" ) ; } ValueParam defaultIdentityParam = initParams . getValueParam ( DEFAULT_INDENTITY ) ; ...
public class JsonWriter { /** * Write a list of values in an array , for example : * < pre > * writer . beginArray ( ) . values ( myValues ) . endArray ( ) ; * < / pre > * @ throws org . sonar . api . utils . text . WriterException on any failure */ public JsonWriter values ( Iterable < String > values ) { } }
for ( String value : values ) { value ( value ) ; } return this ;
public class Field { /** * Returns a new TypeConverter appropriate for the Field ' s type . * @ throws RpcException If type is not defined in the Contract */ public TypeConverter getTypeConverter ( ) throws RpcException { } }
if ( contract == null ) { throw new IllegalStateException ( "contract cannot be null" ) ; } if ( type == null ) { throw new IllegalStateException ( "field type cannot be null" ) ; } TypeConverter tc = null ; if ( type . equals ( "string" ) ) tc = new StringTypeConverter ( isOptional ) ; else if ( type . equals ( "int" ...
public class UpdateDataSourceRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( UpdateDataSourceRequest updateDataSourceRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( updateDataSourceRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateDataSourceRequest . getApiId ( ) , APIID_BINDING ) ; protocolMarshaller . marshall ( updateDataSourceRequest . getName ( ) , NAME_BINDING ) ; protocolMarsh...
public class ViewHandler { /** * Removes requests as long as they match - breaks at the first non - matching request or when requests is empty * This method must catch all exceptions ; or else process ( ) might return without setting processing to true again ! */ protected void removeAndProcess ( Collection < R > req...
try { Collection < R > removed = new ArrayList < > ( ) ; Iterator < R > it = requests . iterator ( ) ; R first_req = it . next ( ) ; removed . add ( first_req ) ; it . remove ( ) ; while ( it . hasNext ( ) ) { R next = it . next ( ) ; if ( req_matcher . test ( first_req , next ) ) { removed . add ( next ) ; it . remove...
public class KafkaQueue { /** * Destroy method . */ public void destroy ( ) { } }
try { super . destroy ( ) ; } finally { if ( kafkaClient != null && myOwnKafkaClient ) { try { kafkaClient . destroy ( ) ; } catch ( Exception e ) { LOGGER . warn ( e . getMessage ( ) , e ) ; } finally { kafkaClient = null ; } } }
public class WARCRecordToSearchResultAdapter { /** * Transform input date to 14 - digit timestamp : * 2007-08-29T18:00:26Z = > 20070829180026 */ private static String transformWARCDate ( final String input ) { } }
StringBuilder output = new StringBuilder ( 14 ) ; output . append ( input . substring ( 0 , 4 ) ) ; output . append ( input . substring ( 5 , 7 ) ) ; output . append ( input . substring ( 8 , 10 ) ) ; output . append ( input . substring ( 11 , 13 ) ) ; output . append ( input . substring ( 14 , 16 ) ) ; output . append...
public class CsvListReader { /** * { @ inheritDoc } */ public List < Object > read ( final CellProcessor ... processors ) throws IOException { } }
if ( processors == null ) { throw new NullPointerException ( "processors should not be null" ) ; } if ( readRow ( ) ) { return executeProcessors ( processors ) ; } return null ; // EOF
public class DisjointMultiSwapNeighbourhood { /** * Generates the list of all possible moves that perform exactly \ ( k \ ) swaps , where \ ( k \ ) is the desired number * of swaps specified at construction . Possible fixed IDs are not considered to be swapped . If \ ( m & lt ; k \ ) * IDs are currently selected or...
// create empty list to store generated moves List < SubsetMove > moves = new ArrayList < > ( ) ; // get set of candidate IDs for deletion and addition Set < Integer > removeCandidates = getRemoveCandidates ( solution ) ; Set < Integer > addCandidates = getAddCandidates ( solution ) ; // possible to perform desired num...
public class CleverTapAPI { /** * private multi - value handlers and helpers */ private void _handleMultiValues ( ArrayList < String > values , String key , String command ) { } }
if ( key == null ) return ; if ( values == null || values . isEmpty ( ) ) { _generateEmptyMultiValueError ( key ) ; return ; } ValidationResult vr ; // validate the key vr = validator . cleanMultiValuePropertyKey ( key ) ; // Check for an error if ( vr . getErrorCode ( ) != 0 ) { pushValidationResult ( vr ) ; } // rese...
public class CmsImageCacheHelper { /** * Returns the size of the given image . < p > * @ param imgName the image name * @ return the size of the given image */ public String getSize ( String imgName ) { } }
String ret = ( String ) m_sizes . get ( imgName ) ; if ( ret == null ) { return "" ; } return ret ;
public class CaseHelper { /** * Test method . */ public static void main ( String [ ] args ) { } }
String [ ] input = { "check_ins" , "CheckIns" , "blog_entry" , "BlogEntry" , "blog_entries" , "BlogEntries" , "blogentry" , "blogentries" } ; for ( int i = 0 ; i < input . length ; i ++ ) { System . out . println ( StringUtils . rightPad ( input [ i ] , 20 ) + StringUtils . leftPad ( toUpperCamelCase ( input [ i ] ) , ...
public class CmsToolbarClipboardMenu { /** * Saves the favorite list . < p > */ public void saveFavorites ( ) { } }
m_isEditingFavorites = false ; getHandler ( ) . enableFavoriteEditing ( false , m_dndController ) ; List < String > clientIds = new ArrayList < String > ( ) ; Iterator < Widget > it = m_favorites . iterator ( ) ; while ( it . hasNext ( ) ) { try { CmsMenuListItem element = ( CmsMenuListItem ) it . next ( ) ; element . ...
public class AccountsInner { /** * Gets the first page of Data Lake Analytics accounts , if any , within the current subscription . This includes a link to the next page , if any . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the PagedList & lt ; DataLake...
return listWithServiceResponseAsync ( ) . map ( new Func1 < ServiceResponse < Page < DataLakeAnalyticsAccountBasicInner > > , Page < DataLakeAnalyticsAccountBasicInner > > ( ) { @ Override public Page < DataLakeAnalyticsAccountBasicInner > call ( ServiceResponse < Page < DataLakeAnalyticsAccountBasicInner > > response ...
public class MAP { /** * Computes the global MAP by first summing the AP ( average precision ) for * each user and then averaging by the number of users . */ @ Override public void compute ( ) { } }
if ( ! Double . isNaN ( getValue ( ) ) ) { // since the data cannot change , avoid re - doing the calculations return ; } iniCompute ( ) ; Map < U , List < Pair < I , Double > > > data = processDataAsRankedTestRelevance ( ) ; userMAPAtCutoff = new HashMap < Integer , Map < U , Double > > ( ) ; int nUsers = 0 ; for ( En...
public class AbstractAdminObject { /** * Returns the list of events defined for given event type . * @ param _ eventType event type * @ return list of events for the given event type */ public List < EventDefinition > getEvents ( final EventType _eventType ) { } }
if ( ! this . eventChecked ) { this . eventChecked = true ; try { EventDefinition . addEvents ( this ) ; } catch ( final EFapsException e ) { AbstractAdminObject . LOG . error ( "Could not read events for Name:; {}', UUID: {}" , this . name , this . uuid ) ; } } return this . events . get ( _eventType ) ;
public class StorageObjectSummary { /** * Contructs a StorageObjectSummary object from Azure BLOB properties * Using factory methods to create these objects since Azure can throw , * while retrieving the BLOB properties * @ param listBlobItem an Azure ListBlobItem object * @ return the ObjectSummary object crea...
String location , key , md5 ; long size ; // Retrieve the BLOB properties that we need for the Summary // Azure Storage stores metadata inside each BLOB , therefore the listBlobItem // will point us to the underlying BLOB and will get the properties from it // During the process the Storage Client could fail , hence we...
public class PlotCanvas { /** * Adds a poly line plot to this canvas . * @ param data a n - by - 2 or n - by - 3 matrix that describes coordinates of points . * @ param style the stroke style of line . */ public LinePlot line ( double [ ] [ ] data , Line . Style style ) { } }
return line ( null , data , style ) ;
public class PDFBuilder { /** * Returns the URL of the default stylesheet . * @ return The URL of the stylesheet . */ protected URL getNonDefaultStylesheetURL ( ) { } }
if ( getNonDefaultStylesheetLocation ( ) != null ) { URL url = this . getClass ( ) . getClassLoader ( ) . getResource ( getNonDefaultStylesheetLocation ( ) ) ; return url ; } else { return null ; }
public class NegationImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setValue ( Condition newValue ) { } }
if ( newValue != value ) { NotificationChain msgs = null ; if ( value != null ) msgs = ( ( InternalEObject ) value ) . eInverseRemove ( this , EOPPOSITE_FEATURE_BASE - XtextPackage . NEGATION__VALUE , null , msgs ) ; if ( newValue != null ) msgs = ( ( InternalEObject ) newValue ) . eInverseAdd ( this , EOPPOSITE_FEATUR...
public class CmsSitesConfiguration { /** * Sets the site manager . < p > * @ param siteManager the site manager to set */ public void setSiteManager ( CmsSiteManagerImpl siteManager ) { } }
m_siteManager = siteManager ; if ( CmsLog . INIT . isInfoEnabled ( ) ) { CmsLog . INIT . info ( Messages . get ( ) . getBundle ( ) . key ( Messages . INIT_SITE_CONFIG_FINISHED_0 ) ) ; }
public class AbstractInjectionEngine { /** * This method will register an instance of an InjectionMetaDataListener with the current * engine instance . */ @ Override public void registerInjectionMetaDataListener ( InjectionMetaDataListener metaDataListener ) { } }
if ( metaDataListener == null ) { throw new IllegalArgumentException ( "A null InjectionMetaDataListener cannot be registered " + "with the injection engine." ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "registerInjectionMetaDataListener" , metaDataListener . getCl...
public class IconUtils { /** * Finds an icon from a root directory ( for an application and / or template ) . * @ param rootDirectory a root directory * @ return an existing file , or null if no icon was found */ public static File findIcon ( File rootDirectory ) { } }
File result = null ; File [ ] imageFiles = new File ( rootDirectory , Constants . PROJECT_DIR_DESC ) . listFiles ( new ImgeFileFilter ( ) ) ; if ( imageFiles != null ) { // A single image ? Take it . . . if ( imageFiles . length == 1 ) { result = imageFiles [ 0 ] ; } // Otherwise , find the " application . " file else ...
public class ImageLoaderCurrent { /** * Process image with full path name * @ param in image stream * @ param v visitor * @ param numInodes number of indoes to read * @ param skipBlocks skip blocks or not * @ throws IOException if there is any error occurs */ private void processLocalNameINodes ( DataInputStr...
// process root processINode ( in , v , skipBlocks , "" ) ; numInodes -- ; while ( numInodes > 0 ) { numInodes -= processDirectory ( in , v , skipBlocks ) ; }
public class Prefer { /** * Create a Prefer header representation from a header string . * @ param value the header value * @ return a Prefer object or null on an invalid string */ public static Prefer valueOf ( final String value ) { } }
if ( value != null ) { final Map < String , String > data = new HashMap < > ( ) ; final Set < String > params = new HashSet < > ( ) ; stream ( value . split ( ";" ) ) . map ( String :: trim ) . map ( pref -> pref . split ( "=" , 2 ) ) . forEach ( x -> { if ( x . length == 2 ) { data . put ( x [ 0 ] . trim ( ) , x [ 1 ]...