signature
stringlengths 43
39.1k
| implementation
stringlengths 0
450k
|
|---|---|
public class MetricAdjustmentImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setVUniformIncrement ( Integer newVUniformIncrement ) { } }
|
Integer oldVUniformIncrement = vUniformIncrement ; vUniformIncrement = newVUniformIncrement ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . METRIC_ADJUSTMENT__VUNIFORM_INCREMENT , oldVUniformIncrement , vUniformIncrement ) ) ;
|
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public IfcWindowPanelPositionEnum createIfcWindowPanelPositionEnumFromString ( EDataType eDataType , String initialValue ) { } }
|
IfcWindowPanelPositionEnum result = IfcWindowPanelPositionEnum . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ;
|
public class WnsService { /** * Pushes a tile to channelUri
* @ param channelUri
* @ param tile which should be built with { @ link ar . com . fernandospr . wns . model . builders . WnsTileBuilder }
* @ return WnsNotificationResponse please see response headers from < a href = " http : / / msdn . microsoft . com / en - us / library / windows / apps / hh465435 . aspx # send _ notification _ response " > http : / / msdn . microsoft . com / en - us / library / windows / apps / hh465435 . aspx # send _ notification _ response " < / a >
* @ throws WnsException when authentication fails */
public WnsNotificationResponse pushTile ( String channelUri , WnsTile tile ) throws WnsException { } }
|
return this . pushTile ( channelUri , null , tile ) ;
|
public class FreeMarkerTag { /** * Processes text as a FreeMarker template . Usually used to process an inner body of a tag .
* @ param text text of a template .
* @ param params map with parameters for processing .
* @ param writer writer to write output to . */
protected void process ( String text , Map params , Writer writer ) { } }
|
try { Template t = new Template ( "temp" , new StringReader ( text ) , FreeMarkerTL . getEnvironment ( ) . getConfiguration ( ) ) ; t . process ( params , writer ) ; } catch ( Exception e ) { throw new ViewException ( e ) ; }
|
public class StatsInterface { /** * Get the overall view counts for an account
* @ param date
* ( Optional ) Stats will be returned for this date . A day according to Flickr Stats starts at midnight GMT for all users , and timestamps will
* automatically be rounded down to the start of the day . If no date is provided , all time view counts will be returned .
* @ throws FlickrException
* @ see " http : / / www . flickr . com / services / api / flickr . stats . getTotalViews . html " */
public Totals getTotalViews ( Date date ) throws FlickrException { } }
|
Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_TOTAL_VIEWS ) ; if ( date != null ) { parameters . put ( "date" , String . valueOf ( date . getTime ( ) / 1000L ) ) ; } Response response = transportAPI . get ( transportAPI . getPath ( ) , parameters , apiKey , sharedSecret ) ; if ( response . isError ( ) ) { throw new FlickrException ( response . getErrorCode ( ) , response . getErrorMessage ( ) ) ; } Totals totals = parseTotals ( response ) ; return totals ;
|
public class XMLName { /** * See ECMA357 13.1.2.1 */
static boolean accept ( Object nameObj ) { } }
|
String name ; try { name = ScriptRuntime . toString ( nameObj ) ; } catch ( EcmaError ee ) { if ( "TypeError" . equals ( ee . getName ( ) ) ) { return false ; } throw ee ; } // See http : / / w3 . org / TR / xml - names11 / # NT - NCName
int length = name . length ( ) ; if ( length != 0 ) { if ( isNCNameStartChar ( name . charAt ( 0 ) ) ) { for ( int i = 1 ; i != length ; ++ i ) { if ( ! isNCNameChar ( name . charAt ( i ) ) ) { return false ; } } return true ; } } return false ;
|
public class Mapping { /** * Checks if this is consistent with the specified column family metadata .
* @ param metadata A column family metadata . */
public void validate ( CFMetaData metadata ) { } }
|
for ( Map . Entry < String , ColumnMapper > entry : columnMappers . entrySet ( ) ) { String name = entry . getKey ( ) ; ColumnMapper columnMapper = entry . getValue ( ) ; ByteBuffer columnName = UTF8Type . instance . decompose ( name ) ; ColumnDefinition columnDefinition = metadata . getColumnDefinition ( columnName ) ; if ( columnDefinition == null ) { throw new RuntimeException ( "No column definition for mapper " + name ) ; } if ( columnDefinition . isStatic ( ) ) { throw new RuntimeException ( "Lucene indexes are not allowed on static columns as " + name ) ; } AbstractType < ? > type = columnDefinition . type ; if ( ! columnMapper . supports ( type ) ) { throw new RuntimeException ( String . format ( "Type '%s' is not supported by mapper '%s'" , type , name ) ) ; } }
|
public class ExtensionAuthentication { /** * Gets the popup menu for flagging the " Logged in " pattern .
* @ return the popup menu */
private PopupContextMenuItemFactory getPopupFlagLoggedInIndicatorMenu ( ) { } }
|
if ( this . popupFlagLoggedInIndicatorMenuFactory == null ) { popupFlagLoggedInIndicatorMenuFactory = new PopupContextMenuItemFactory ( "dd - " + Constant . messages . getString ( "context.flag.popup" ) ) { private static final long serialVersionUID = 2453839120088204122L ; @ Override public ExtensionPopupMenuItem getContextMenu ( Context context , String parentMenu ) { return new PopupFlagLoggedInIndicatorMenu ( context ) ; } } ; } return this . popupFlagLoggedInIndicatorMenuFactory ;
|
public class SparseVector { /** * get a value
* @ param i
* @ return return symbolTable [ i ] */
public double get ( int i ) { } }
|
if ( i < 0 || i >= N ) throw new IllegalArgumentException ( "Illegal index " + i + " should be > 0 and < " + N ) ; if ( symbolTable . contains ( i ) ) return symbolTable . get ( i ) ; else return 0.0 ;
|
public class Util { /** * If { @ code host } is an IP address , this returns the IP address in canonical form .
* < p > Otherwise this performs IDN ToASCII encoding and canonicalize the result to lowercase . For
* example this converts { @ code ☃ . net } to { @ code xn - - n3h . net } , and { @ code WwW . GoOgLe . cOm } to
* { @ code www . google . com } . { @ code null } will be returned if the host cannot be ToASCII encoded or
* if the result contains unsupported ASCII characters . */
public static String canonicalizeHost ( String host ) { } }
|
// If the input contains a : , it ’ s an IPv6 address .
if ( host . contains ( ":" ) ) { // If the input is encased in square braces " [ . . . ] " , drop ' em .
InetAddress inetAddress = host . startsWith ( "[" ) && host . endsWith ( "]" ) ? decodeIpv6 ( host , 1 , host . length ( ) - 1 ) : decodeIpv6 ( host , 0 , host . length ( ) ) ; if ( inetAddress == null ) return null ; byte [ ] address = inetAddress . getAddress ( ) ; if ( address . length == 16 ) return inet6AddressToAscii ( address ) ; if ( address . length == 4 ) return inetAddress . getHostAddress ( ) ; // An IPv4 - mapped IPv6 address .
throw new AssertionError ( "Invalid IPv6 address: '" + host + "'" ) ; } try { String result = IDN . toASCII ( host ) . toLowerCase ( Locale . US ) ; if ( result . isEmpty ( ) ) return null ; // Confirm that the IDN ToASCII result doesn ' t contain any illegal characters .
if ( containsInvalidHostnameAsciiCodes ( result ) ) { return null ; } // TODO : implement all label limits .
return result ; } catch ( IllegalArgumentException e ) { return null ; }
|
public class SocketChannelOutputStream { /** * @ see java . io . OutputStream # write ( byte [ ] , int , int ) */
public void write ( byte [ ] buf , int offset , int length ) throws IOException { } }
|
if ( length > _buffer . capacity ( ) ) _flush = ByteBuffer . wrap ( buf , offset , length ) ; else { _buffer . clear ( ) ; _buffer . put ( buf , offset , length ) ; _buffer . flip ( ) ; _flush = _buffer ; } flushBuffer ( ) ;
|
public class EventNotificationUrl { /** * Get Resource Url for GetEvents
* @ param filter A set of filter expressions representing the search parameters for a query . This parameter is optional . Refer to [ Sorting and Filtering ] ( . . / . . / . . / . . / Developer / api - guides / sorting - filtering . htm ) for a list of supported filters .
* @ param pageSize When creating paged results from a query , this value indicates the zero - based offset in the complete result set where the returned entities begin . For example , with this parameter set to 25 , to get the 51st through the 75th items , set startIndex to 50.
* @ param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object . This parameter should only be used to retrieve data . Attempting to update data using this parameter may cause data loss .
* @ param sortBy The element to sort the results by and the channel in which the results appear . Either ascending ( a - z ) or descending ( z - a ) channel . Optional . Refer to [ Sorting and Filtering ] ( . . / . . / . . / . . / Developer / api - guides / sorting - filtering . htm ) for more information .
* @ param startIndex When creating paged results from a query , this value indicates the zero - based offset in the complete result set where the returned entities begin . For example , with pageSize set to 25 , to get the 51st through the 75th items , set this parameter to 50.
* @ return String Resource Url */
public static MozuUrl getEventsUrl ( String filter , Integer pageSize , String responseFields , String sortBy , Integer startIndex ) { } }
|
UrlFormatter formatter = new UrlFormatter ( "/api/event/pull/?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&responseFields={responseFields}" ) ; formatter . formatUrl ( "filter" , filter ) ; formatter . formatUrl ( "pageSize" , pageSize ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "sortBy" , sortBy ) ; formatter . formatUrl ( "startIndex" , startIndex ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . HOME_POD ) ;
|
public class CmsLock { /** * Returns the html code to build the lock request . < p >
* @ param hiddenTimeout the maximal number of millis the dialog will be hidden
* @ param includeRelated indicates if the report should include related resources
* @ return html code */
public String buildLockRequest ( int hiddenTimeout , boolean includeRelated ) { } }
|
StringBuffer html = new StringBuffer ( 512 ) ; html . append ( "<script type='text/javascript'><!--\n" ) ; html . append ( "makeRequest('" ) ; html . append ( getJsp ( ) . link ( "/system/workplace/commons/report-locks.jsp" ) ) ; html . append ( "', '" ) ; html . append ( CmsWorkplace . PARAM_RESOURCELIST ) ; html . append ( "=" ) ; html . append ( getParamResourcelist ( ) ) ; html . append ( "&" ) ; html . append ( CmsDialog . PARAM_RESOURCE ) ; html . append ( "=" ) ; html . append ( getParamResource ( ) ) ; html . append ( "&" ) ; html . append ( CmsLock . PARAM_INCLUDERELATED ) ; html . append ( "=" ) ; html . append ( includeRelated ) ; html . append ( "', 'doReportUpdate');\n" ) ; html . append ( "function showLockDialog() {\n" ) ; html . append ( "\tdocument.getElementById('lock-body-id').className = '';\n" ) ; html . append ( "}\n" ) ; html . append ( "setTimeout('showLockDialog()', " + hiddenTimeout + ");\n" ) ; html . append ( "// -->\n" ) ; html . append ( "</script>\n" ) ; return html . toString ( ) ;
|
public class ModulesInner { /** * Update the module identified by module name .
* @ param resourceGroupName Name of an Azure Resource group .
* @ param automationAccountName The name of the automation account .
* @ param moduleName The name of module .
* @ param parameters The update parameters for module .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the ModuleInner object */
public Observable < ModuleInner > updateAsync ( String resourceGroupName , String automationAccountName , String moduleName , ModuleUpdateParameters parameters ) { } }
|
return updateWithServiceResponseAsync ( resourceGroupName , automationAccountName , moduleName , parameters ) . map ( new Func1 < ServiceResponse < ModuleInner > , ModuleInner > ( ) { @ Override public ModuleInner call ( ServiceResponse < ModuleInner > response ) { return response . body ( ) ; } } ) ;
|
public class LayerCacheImpl { /** * / * ( non - Javadoc )
* @ see com . ibm . jaggr . service . layer . ILayerCache # setAggregator ( com . ibm . jaggr . service . IAggregator ) */
@ Override public void setAggregator ( IAggregator aggregator ) { } }
|
if ( this . aggregator != null ) { throw new IllegalStateException ( ) ; } this . aggregator = aggregator ; // See if the max cache entries init - param has changed and
int newMaxCapacity = getMaxCapacity ( aggregator ) ; // If the maximum size has changed , then create a new layerBuildMap with the new
// max size and copy the entries from the existing map to the new map
ConcurrentLinkedHashMap < String , CacheEntry > oldLayerBuildMap = null ; // have no layer builds in the layerBuildMap
if ( maxCapacity != newMaxCapacity ) { maxCapacity = newMaxCapacity ; oldLayerBuildMap = layerBuildMap ; layerBuildMap = new ConcurrentLinkedHashMap . Builder < String , CacheEntry > ( ) . maximumWeightedCapacity ( maxCapacity ) . listener ( newEvictionListener ( ) ) . weigher ( newWeigher ( ) ) . build ( ) ; // Need to call setLayerBuildAccessors BEFORE calling putAll because
// it might result in the eviction handler being called .
setLayerBuildAccessors ( oldLayerBuildMap . keySet ( ) ) ; layerBuildMap . putAll ( oldLayerBuildMap . ascendingMap ( ) ) ; oldLayerBuildMap . clear ( ) ; } else { setLayerBuildAccessors ( layerBuildMap . keySet ( ) ) ; }
|
public class OnlineAccuracyUpdatedEnsemble { /** * Initiates the current chunk and class distribution variables . */
private void initVariables ( ) { } }
|
if ( this . currentWindow == null ) { this . currentWindow = new int [ this . windowSize ] ; } if ( this . classDistributions == null ) { this . classDistributions = new long [ this . getModelContext ( ) . classAttribute ( ) . numValues ( ) ] ; }
|
public class MZMLMultiSpectraParser { /** * Given a scan internal number ( spectrum index ) goes to the index and tries to find a mapping . */
protected int mapRawNumToInternalScanNum ( int spectrumIndex ) throws FileParsingException { } }
|
MZMLIndexElement byRawNum = index . getByRawNum ( spectrumIndex ) ; if ( byRawNum == null ) { String msg = String . format ( "Could not find a mapping from spectrum index" + " ref to an internal scan number for" + "\n\t file: %s" + "\n\t spectrum index searched for: #%d" + "\n\t spectrum index of the spectrum in which the error occured: #%d" , source . getPath ( ) , spectrumIndex , vars . spectrumIndex ) ; throw new FileParsingException ( msg ) ; } return byRawNum . getNumber ( ) ;
|
public class WebSiteManagementClientImpl { /** * Check if a resource name is available .
* Check if a resource name is available .
* @ param name Resource name to verify .
* @ param type Resource type used for verification . Possible values include : ' Site ' , ' Slot ' , ' HostingEnvironment ' , ' PublishingUser ' , ' Microsoft . Web / sites ' , ' Microsoft . Web / sites / slots ' , ' Microsoft . Web / hostingEnvironments ' , ' Microsoft . Web / publishingUsers '
* @ param isFqdn Is fully qualified domain name .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the ResourceNameAvailabilityInner object */
public Observable < ResourceNameAvailabilityInner > checkNameAvailabilityAsync ( String name , CheckNameResourceTypes type , Boolean isFqdn ) { } }
|
return checkNameAvailabilityWithServiceResponseAsync ( name , type , isFqdn ) . map ( new Func1 < ServiceResponse < ResourceNameAvailabilityInner > , ResourceNameAvailabilityInner > ( ) { @ Override public ResourceNameAvailabilityInner call ( ServiceResponse < ResourceNameAvailabilityInner > response ) { return response . body ( ) ; } } ) ;
|
public class Result { /** * The projecting result value at the given index as a boolean value
* @ param index The select result index .
* @ return The boolean value . */
@ Override public boolean getBoolean ( int index ) { } }
|
check ( index ) ; final FLValue flValue = values . get ( index ) ; return flValue != null && flValue . asBool ( ) ;
|
public class BarChart { /** * Callback method for drawing the bars in the child classes .
* @ param _ Canvas The canvas object of the graph view . */
protected void drawBars ( Canvas _Canvas ) { } }
|
for ( BarModel model : mData ) { RectF bounds = model . getBarBounds ( ) ; mGraphPaint . setColor ( model . getColor ( ) ) ; _Canvas . drawRect ( bounds . left , bounds . bottom - ( bounds . height ( ) * mRevealValue ) , bounds . right , bounds . bottom , mGraphPaint ) ; if ( mShowValues ) { _Canvas . drawText ( Utils . getFloatString ( model . getValue ( ) , mShowDecimal ) , model . getLegendBounds ( ) . centerX ( ) , bounds . bottom - ( bounds . height ( ) * mRevealValue ) - mValueDistance , mValuePaint ) ; } }
|
public class PartitionGroupConfig { /** * Adds a MemberGroupConfig . This MemberGroupConfig only has meaning when the group - type is set to
* { @ link MemberGroupType # CUSTOM } . See the { @ link PartitionGroupConfig } for more information and examples
* of how this mechanism works .
* @ param memberGroupConfigs the collection of MemberGroupConfig to add
* @ return the updated PartitionGroupConfig
* @ throws IllegalArgumentException if memberGroupConfigs is { @ code null }
* @ see # getMemberGroupConfigs ( )
* @ see # clear ( )
* @ see # addMemberGroupConfig ( MemberGroupConfig ) */
public PartitionGroupConfig setMemberGroupConfigs ( Collection < MemberGroupConfig > memberGroupConfigs ) { } }
|
isNotNull ( memberGroupConfigs , "memberGroupConfigs" ) ; this . memberGroupConfigs . clear ( ) ; this . memberGroupConfigs . addAll ( memberGroupConfigs ) ; return this ;
|
public class ZScreenField { /** * Create a URL to retrieve the JNLP file .
* @ param propApplet
* @ param properties
* @ return */
public String getJnlpURL ( String strJnlpURL , Map < String , Object > propApplet , Map < String , Object > properties ) { } }
|
String strBaseURL = ( String ) properties . get ( DBParams . BASE_URL ) ; if ( strBaseURL == null ) strBaseURL = DBConstants . BLANK ; else if ( ( ! strBaseURL . startsWith ( "/" ) ) && ( ! strBaseURL . startsWith ( "http:" ) ) ) strBaseURL = "//" + strBaseURL ; if ( ! strBaseURL . startsWith ( "http:" ) ) strBaseURL = "http:" + strBaseURL ; StringBuffer sbJnlpURL = new StringBuffer ( strBaseURL ) ; if ( ( strJnlpURL == null ) || ( strJnlpURL . length ( ) == 0 ) ) strJnlpURL = DEFAULT_JNLP_URL ; sbJnlpURL . append ( strJnlpURL ) ; sbJnlpURL . append ( "&" + DBParams . APPLET + "=" + propApplet . get ( DBParams . APPLET ) ) ; try { for ( Map . Entry < String , Object > entry : properties . entrySet ( ) ) { String strKey = entry . getKey ( ) ; Object objValue = entry . getValue ( ) ; String strValue = null ; if ( objValue != null ) strValue = objValue . toString ( ) ; if ( strValue != null ) // x if ( strValue . length ( ) > 0)
sbJnlpURL . append ( "&" + strKey + "=" + URLEncoder . encode ( strValue , DBConstants . URL_ENCODING ) ) ; } } catch ( UnsupportedEncodingException e ) { e . printStackTrace ( ) ; } return sbJnlpURL . toString ( ) ;
|
public class PoolBase { /** * Check the default transaction isolation of the Connection .
* @ param connection a Connection to check
* @ throws SQLException rethrown from the driver */
private void checkDefaultIsolation ( final Connection connection ) throws SQLException { } }
|
try { defaultTransactionIsolation = connection . getTransactionIsolation ( ) ; if ( transactionIsolation == - 1 ) { transactionIsolation = defaultTransactionIsolation ; } } catch ( SQLException e ) { logger . warn ( "{} - Default transaction isolation level detection failed ({})." , poolName , e . getMessage ( ) ) ; if ( e . getSQLState ( ) != null && ! e . getSQLState ( ) . startsWith ( "08" ) ) { throw e ; } }
|
public class BindDataSourceSubProcessor { /** * Build classes .
* @ param roundEnv
* the round env
* @ throws Exception
* the exception */
protected void generateClassesSecondRound ( RoundEnvironment roundEnv ) throws Exception { } }
|
for ( SQLiteDatabaseSchema currentSchema : schemas ) { BindDaoBuilder . generateSecondRound ( elementUtils , filer , currentSchema ) ; }
|
public class Aggregation { /** * Provides a { @ link StreamConsumer } for streaming data to this aggregation .
* @ param inputClass class of input records
* @ param < T > data records type
* @ return consumer for streaming data to aggregation */
@ SuppressWarnings ( "unchecked" ) public < T , C , K extends Comparable > Promise < AggregationDiff > consume ( StreamSupplier < T > supplier , Class < T > inputClass , Map < String , String > keyFields , Map < String , String > measureFields ) { } }
|
checkArgument ( new HashSet < > ( getKeys ( ) ) . equals ( keyFields . keySet ( ) ) , "Expected keys: %s, actual keyFields: %s" , getKeys ( ) , keyFields ) ; checkArgument ( getMeasureTypes ( ) . keySet ( ) . containsAll ( measureFields . keySet ( ) ) , "Unknown measures: %s" , difference ( measureFields . keySet ( ) , getMeasureTypes ( ) . keySet ( ) ) ) ; logger . info ( "Started consuming data in aggregation {}. Keys: {} Measures: {}" , this , keyFields . keySet ( ) , measureFields . keySet ( ) ) ; Class < K > keyClass = createKeyClass ( keysToMap ( getKeys ( ) . stream ( ) , structure . getKeyTypes ( ) :: get ) , classLoader ) ; Set < String > measureFieldKeys = measureFields . keySet ( ) ; List < String > measures = getMeasureTypes ( ) . keySet ( ) . stream ( ) . filter ( measureFieldKeys :: contains ) . collect ( toList ( ) ) ; Class < T > recordClass = createRecordClass ( structure , getKeys ( ) , measures , classLoader ) ; Aggregate < T , Object > aggregate = createPreaggregator ( structure , inputClass , recordClass , keyFields , measureFields , classLoader ) ; Function < T , K > keyFunction = createKeyFunction ( inputClass , keyClass , getKeys ( ) , classLoader ) ; AggregationGroupReducer < C , T , K > groupReducer = new AggregationGroupReducer < > ( aggregationChunkStorage , structure , measures , recordClass , createPartitionPredicate ( recordClass , getPartitioningKey ( ) , classLoader ) , keyFunction , aggregate , chunkSize , classLoader ) ; return supplier . streamTo ( groupReducer ) . then ( $ -> groupReducer . getResult ( ) ) . map ( chunks -> AggregationDiff . of ( new HashSet < > ( chunks ) ) ) ;
|
public class TmdbMovies { /** * This method is used to retrieve all of the release and certification data we have for a specific movie .
* @ param movieId
* @ param language
* @ return
* @ throws MovieDbException */
public ResultList < ReleaseInfo > getMovieReleaseInfo ( int movieId , String language ) throws MovieDbException { } }
|
TmdbParameters parameters = new TmdbParameters ( ) ; parameters . add ( Param . ID , movieId ) ; parameters . add ( Param . LANGUAGE , language ) ; URL url = new ApiUrl ( apiKey , MethodBase . MOVIE ) . subMethod ( MethodSub . RELEASES ) . buildUrl ( parameters ) ; String webpage = httpTools . getRequest ( url ) ; try { WrapperReleaseInfo wrapper = MAPPER . readValue ( webpage , WrapperReleaseInfo . class ) ; ResultList < ReleaseInfo > results = new ResultList < > ( wrapper . getCountries ( ) ) ; wrapper . setResultProperties ( results ) ; return results ; } catch ( IOException ex ) { throw new MovieDbException ( ApiExceptionType . MAPPING_FAILED , "Failed to get release information" , url , ex ) ; }
|
public class JCRAPIAspect { /** * Initializes the aspect if needed */
private static void initIfNeeded ( ) { } }
|
if ( ! INITIALIZED ) { synchronized ( JCRAPIAspect . class ) { if ( ! INITIALIZED ) { ExoContainer container = ExoContainerContext . getTopContainer ( ) ; JCRAPIAspectConfig config = null ; if ( container != null ) { config = ( JCRAPIAspectConfig ) container . getComponentInstanceOfType ( JCRAPIAspectConfig . class ) ; } if ( config == null ) { TARGET_INTERFACES = new Class < ? > [ ] { } ; LOG . warn ( "No interface to monitor could be found" ) ; } else { TARGET_INTERFACES = config . getTargetInterfaces ( ) ; for ( Class < ? > c : TARGET_INTERFACES ) { Statistics global = new Statistics ( null , "global" ) ; Map < String , Statistics > statistics = new TreeMap < String , Statistics > ( ) ; Method [ ] methods = c . getMethods ( ) ; for ( Method m : methods ) { String name = getStatisticsName ( m ) ; statistics . put ( name , new Statistics ( global , name ) ) ; } JCRStatisticsManager . registerStatistics ( c . getSimpleName ( ) , global , statistics ) ; ALL_STATISTICS . put ( c . getSimpleName ( ) , statistics ) ; } } INITIALIZED = true ; } } }
|
public class NameNode { /** * In federation configuration is set for a set of
* namenode and secondary namenode / backup / checkpointer , which are
* grouped under a logical nameservice ID . The configuration keys specific
* to them have suffix set to configured nameserviceId .
* This method copies the value from specific key of format key . nameserviceId
* to key , to set up the generic configuration . Once this is done , only
* generic version of the configuration is read in rest of the code , for
* backward compatibility and simpler code changes .
* @ param conf
* Configuration object to lookup specific key and to set the value
* to the key passed . Note the conf object is modified
* @ see DFSUtil # setGenericConf ( Configuration , String , String . . . ) */
public static void initializeGenericKeys ( Configuration conf , String serviceKey ) { } }
|
if ( ( serviceKey == null ) || serviceKey . isEmpty ( ) ) { return ; } // adjust meta directory names by service key
adjustMetaDirectoryNames ( conf , serviceKey ) ; DFSUtil . setGenericConf ( conf , serviceKey , NAMESERVICE_SPECIFIC_KEYS ) ;
|
public class Parser { /** * return node ; */
private Node parseFilter ( ) { } }
|
Token token = expect ( Filter . class ) ; Filter filterToken = ( Filter ) token ; AttributeList attr = ( AttributeList ) accept ( AttributeList . class ) ; lexer . setPipeless ( true ) ; Node tNode = parseTextBlock ( ) ; lexer . setPipeless ( false ) ; FilterNode node = new FilterNode ( ) ; node . setValue ( filterToken . getValue ( ) ) ; node . setLineNumber ( line ( ) ) ; node . setFileName ( filename ) ; if ( tNode != null ) node . setTextBlock ( tNode ) ; else { node . setTextBlock ( new BlockNode ( ) ) ; } if ( attr != null ) { node . setAttributes ( convertToNodeAttributes ( attr ) ) ; } return node ;
|
public class NettySMTPClientSession { /** * Create a { @ link ChannelBuffer } which is terminated with a CRLF . CRLF sequence
* @ param data
* @ return buffer */
private static ChannelBuffer createDataTerminatingChannelBuffer ( byte [ ] data ) { } }
|
int length = data . length ; if ( length < 1 ) { return ChannelBuffers . wrappedBuffer ( CRLF_DOT_CRLF ) ; } else { byte [ ] terminating ; byte last = data [ length - 1 ] ; if ( length == 1 ) { if ( last == CR ) { terminating = LF_DOT_CRLF ; } else { terminating = CRLF_DOT_CRLF ; } } else { byte prevLast = data [ length - 2 ] ; if ( last == LF ) { if ( prevLast == CR ) { terminating = DOT_CRLF ; } else { terminating = CRLF_DOT_CRLF ; } } else if ( last == CR ) { terminating = LF_DOT_CRLF ; } else { terminating = CRLF_DOT_CRLF ; } } return ChannelBuffers . wrappedBuffer ( data , terminating ) ; }
|
public class LiveStreamEvent { /** * Sets the adBreakFillType value for this LiveStreamEvent .
* @ param adBreakFillType * The type of content that should be used to fill an empty ad
* break . This value is optional and
* defaults to { @ link AdBreakFillType # SLATE } . */
public void setAdBreakFillType ( com . google . api . ads . admanager . axis . v201808 . AdBreakFillType adBreakFillType ) { } }
|
this . adBreakFillType = adBreakFillType ;
|
public class Buffer { /** * Read { @ code byteCount } bytes from { @ code in } to this . */
public Buffer readFrom ( InputStream in , long byteCount ) throws IOException { } }
|
if ( byteCount < 0 ) throw new IllegalArgumentException ( "byteCount < 0: " + byteCount ) ; readFrom ( in , byteCount , false ) ; return this ;
|
public class SSLEngineImpl { /** * Unwraps a buffer . Does a variety of checks before grabbing
* the unwrapLock , which blocks multiple unwraps from occuring . */
public SSLEngineResult unwrap ( ByteBuffer netData , ByteBuffer [ ] appData , int offset , int length ) throws SSLException { } }
|
EngineArgs ea = new EngineArgs ( netData , appData , offset , length ) ; try { synchronized ( unwrapLock ) { return readNetRecord ( ea ) ; } } catch ( Exception e ) { /* * Don ' t reset position so it looks like we didn ' t
* consume anything . We did consume something , and it
* got us into this situation , so report that much back .
* Our days of consuming are now over anyway . */
fatal ( Alerts . alert_internal_error , "problem unwrapping net record" , e ) ; return null ; // make compiler happy
} finally { /* * Just in case something failed to reset limits properly . */
ea . resetLim ( ) ; }
|
public class PointLight { /** * Updates light basing on it ' s distance and rayNum * */
void setEndPoints ( ) { } }
|
float angleNum = 360f / ( rayNum - 1 ) ; for ( int i = 0 ; i < rayNum ; i ++ ) { final float angle = angleNum * i ; sin [ i ] = MathUtils . sinDeg ( angle ) ; cos [ i ] = MathUtils . cosDeg ( angle ) ; endX [ i ] = distance * cos [ i ] ; endY [ i ] = distance * sin [ i ] ; }
|
public class Indicator { /** * < editor - fold defaultstate = " collapsed " desc = " Initialization " > */
@ Override public final AbstractGauge init ( int WIDTH , int HEIGHT ) { } }
|
final int GAUGE_WIDTH = isFrameVisible ( ) ? WIDTH : getGaugeBounds ( ) . width ; final int GAUGE_HEIGHT = isFrameVisible ( ) ? HEIGHT : getGaugeBounds ( ) . height ; if ( GAUGE_WIDTH <= 1 || GAUGE_HEIGHT <= 1 ) { return this ; } if ( ! isFrameVisible ( ) ) { setFramelessOffset ( - getGaugeBounds ( ) . width * 0.0841121495 , - getGaugeBounds ( ) . width * 0.0841121495 ) ; } else { setFramelessOffset ( getGaugeBounds ( ) . x , getGaugeBounds ( ) . y ) ; } // Create background image
if ( bImage != null ) { bImage . flush ( ) ; } bImage = UTIL . createImage ( GAUGE_WIDTH , GAUGE_WIDTH , Transparency . TRANSLUCENT ) ; // Create the symbol image
if ( symbolOnImage != null ) { symbolOnImage . flush ( ) ; } symbolOnImage = SYMBOL_FACTORY . createSymbol ( GAUGE_WIDTH , symbolType , onColor , customOnColor , glow ) ; // Create the symbol image
if ( symbolOffImage != null ) { symbolOffImage . flush ( ) ; } symbolOffImage = SYMBOL_FACTORY . createSymbol ( GAUGE_WIDTH , symbolType , offColor , customOffColor , false ) ; // Create foreground image
if ( fImage != null ) { fImage . flush ( ) ; } fImage = UTIL . createImage ( GAUGE_WIDTH , GAUGE_WIDTH , Transparency . TRANSLUCENT ) ; if ( isFrameVisible ( ) ) { switch ( getFrameType ( ) ) { case ROUND : FRAME_FACTORY . createRadialFrame ( GAUGE_WIDTH , getFrameDesign ( ) , getCustomFrameDesign ( ) , getFrameEffect ( ) , bImage ) ; break ; case SQUARE : FRAME_FACTORY . createLinearFrame ( GAUGE_WIDTH , GAUGE_WIDTH , getFrameDesign ( ) , getCustomFrameDesign ( ) , getFrameEffect ( ) , bImage ) ; break ; default : FRAME_FACTORY . createRadialFrame ( GAUGE_WIDTH , getFrameDesign ( ) , getCustomFrameDesign ( ) , getFrameEffect ( ) , bImage ) ; break ; } } if ( isBackgroundVisible ( ) ) { create_BACKGROUND_Image ( GAUGE_WIDTH , "" , "" , bImage ) ; } // create _ TITLE _ Image ( WIDTH , getTitle ( ) , getUnitString ( ) , bImage ) ;
if ( isForegroundVisible ( ) ) { switch ( getFrameType ( ) ) { case SQUARE : FOREGROUND_FACTORY . createLinearForeground ( GAUGE_WIDTH , GAUGE_WIDTH , false , bImage ) ; break ; case ROUND : default : FOREGROUND_FACTORY . createRadialForeground ( GAUGE_WIDTH , false , getForegroundType ( ) , fImage ) ; break ; } } if ( disabledImage != null ) { disabledImage . flush ( ) ; } disabledImage = create_DISABLED_Image ( GAUGE_WIDTH ) ; return this ;
|
public class StreamLoader { /** * Finishes loader
* @ throws Exception an exception raised in finishing loader . */
@ Override public void finish ( ) throws Exception { } }
|
LOGGER . debug ( "Finish Loading" ) ; flushQueues ( ) ; if ( _is_last_finish_call ) { try { if ( _after != null ) { LOGGER . debug ( "Running Execute After SQL" ) ; _processConn . createStatement ( ) . execute ( _after ) ; } // Loader sucessfully completed . Commit and return .
_processConn . createStatement ( ) . execute ( "commit" ) ; LOGGER . debug ( "Committed" ) ; } catch ( SQLException ex ) { try { _processConn . createStatement ( ) . execute ( "rollback" ) ; } catch ( SQLException ex0 ) { LOGGER . debug ( "Failed to rollback" ) ; } LOGGER . debug ( String . format ( "Execute After SQL failed to run: %s" , _after ) , ex ) ; throw new Loader . ConnectionError ( Utils . getCause ( ex ) ) ; } }
|
public class CellStyleProxy { /** * 折り返し設定を有効にする */
public void setWrapText ( ) { } }
|
if ( cell . getCellStyle ( ) . getWrapText ( ) ) { // 既に有効な場合
return ; } cloneStyle ( ) ; cell . getCellStyle ( ) . setShrinkToFit ( false ) ; cell . getCellStyle ( ) . setWrapText ( true ) ;
|
public class Mork { /** * Helper for compile */
private boolean compileCurrent ( ) throws IOException { } }
|
Specification spec ; Mapper result ; output . normal ( currentJob . source + ":" ) ; if ( currentJob . listing != null ) { output . openListing ( currentJob . listing ) ; } spec = ( Specification ) mapperMapper . invoke ( currentJob . source ) ; if ( spec == null ) { return false ; } try { result = spec . translate ( currentJob . k , currentJob . threadCount , output ) ; compiler . run ( result , spec . getMapperName ( ) , currentJob . source , currentJob . outputPath ) ; } catch ( GenericException e ) { output . error ( currentJob . source . getName ( ) , e ) ; return false ; } catch ( IOException e ) { output . error ( currentJob . source . getName ( ) , e . getMessage ( ) ) ; return false ; } return true ;
|
public class Shape { /** * Creates the shape information buffer
* given the shape , stride
* @ param shape the shape for the buffer
* @ param stride the stride for the buffer
* @ param offset the offset for the buffer
* @ param elementWiseStride the element wise stride for the buffer
* @ param order the order for the buffer
* @ return the shape information buffer given the parameters */
public static DataBuffer createShapeInformation ( int [ ] shape , int [ ] stride , long offset , int elementWiseStride , char order ) { } }
|
if ( shape . length != stride . length ) throw new IllegalStateException ( "Shape and stride must be the same length" ) ; int rank = shape . length ; int shapeBuffer [ ] = new int [ rank * 2 + 4 ] ; shapeBuffer [ 0 ] = rank ; int count = 1 ; for ( int e = 0 ; e < shape . length ; e ++ ) shapeBuffer [ count ++ ] = shape [ e ] ; for ( int e = 0 ; e < stride . length ; e ++ ) shapeBuffer [ count ++ ] = stride [ e ] ; shapeBuffer [ count ++ ] = ( int ) offset ; shapeBuffer [ count ++ ] = elementWiseStride ; shapeBuffer [ count ] = ( int ) order ; DataBuffer ret = Nd4j . createBufferDetached ( shapeBuffer ) ; ret . setConstant ( true ) ; return ret ;
|
public class RpcResponse { /** * Marshals this response to a Map that can be serialized */
@ SuppressWarnings ( "unchecked" ) public Map marshal ( ) { } }
|
HashMap map = new HashMap ( ) ; map . put ( "jsonrpc" , "2.0" ) ; if ( id != null ) map . put ( "id" , id ) ; if ( error != null ) map . put ( "error" , error . toMap ( ) ) ; else map . put ( "result" , result ) ; return map ;
|
public class AuditUtils { /** * Creates an audit entry for the ' contract broken ' event .
* @ param bean the bean
* @ param securityContext the security context
* @ return the audit entry */
public static AuditEntryBean contractBrokenToApi ( ContractBean bean , ISecurityContext securityContext ) { } }
|
AuditEntryBean entry = newEntry ( bean . getApi ( ) . getApi ( ) . getOrganization ( ) . getId ( ) , AuditEntityType . Api , securityContext ) ; entry . setWhat ( AuditEntryType . BreakContract ) ; entry . setEntityId ( bean . getApi ( ) . getApi ( ) . getId ( ) ) ; entry . setEntityVersion ( bean . getApi ( ) . getVersion ( ) ) ; ContractData data = new ContractData ( bean ) ; entry . setData ( toJSON ( data ) ) ; return entry ;
|
public class Validator { /** * 验证是否为身份证号码 ( 18位中国 ) < br >
* 出生日期只支持到到2999年
* @ param < T > 字符串类型
* @ param value 值
* @ param errorMsg 验证错误的信息
* @ return 验证后的值
* @ throws ValidateException 验证异常 */
public static < T extends CharSequence > T validateCitizenIdNumber ( T value , String errorMsg ) throws ValidateException { } }
|
if ( false == isCitizenId ( value ) ) { throw new ValidateException ( errorMsg ) ; } return value ;
|
public class AmazonSNSClient { /** * Verifies an endpoint owner ' s intent to receive messages by validating the token sent to the endpoint by an
* earlier < code > Subscribe < / code > action . If the token is valid , the action creates a new subscription and returns
* its Amazon Resource Name ( ARN ) . This call requires an AWS signature only when the
* < code > AuthenticateOnUnsubscribe < / code > flag is set to " true " .
* @ param confirmSubscriptionRequest
* Input for ConfirmSubscription action .
* @ return Result of the ConfirmSubscription operation returned by the service .
* @ throws SubscriptionLimitExceededException
* Indicates that the customer already owns the maximum allowed number of subscriptions .
* @ throws InvalidParameterException
* Indicates that a request parameter does not comply with the associated constraints .
* @ throws NotFoundException
* Indicates that the requested resource does not exist .
* @ throws InternalErrorException
* Indicates an internal service error .
* @ throws AuthorizationErrorException
* Indicates that the user has been denied access to the requested resource .
* @ throws FilterPolicyLimitExceededException
* Indicates that the number of filter polices in your AWS account exceeds the limit . To add more filter
* polices , submit an SNS Limit Increase case in the AWS Support Center .
* @ sample AmazonSNS . ConfirmSubscription
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / sns - 2010-03-31 / ConfirmSubscription " target = " _ top " > AWS API
* Documentation < / a > */
@ Override public ConfirmSubscriptionResult confirmSubscription ( ConfirmSubscriptionRequest request ) { } }
|
request = beforeClientExecution ( request ) ; return executeConfirmSubscription ( request ) ;
|
public class DefaultPlatformManager { /** * Zips up a directory . */
private void zipDirectory ( String zipFile , String dirToZip ) { } }
|
File directory = new File ( dirToZip ) ; try ( ZipOutputStream stream = new ZipOutputStream ( new FileOutputStream ( zipFile ) ) ) { addDirectoryToZip ( directory , directory , stream ) ; } catch ( Exception e ) { throw new PlatformManagerException ( "Failed to zip module" , e ) ; }
|
public class AbstractPackageIndexWriter { /** * Adds the doctitle to the documentation tree , if it is specified on the command line .
* @ param body the document tree to which the title will be added */
protected void addConfigurationTitle ( Content body ) { } }
|
if ( configuration . doctitle . length ( ) > 0 ) { Content title = new RawHtml ( configuration . doctitle ) ; Content heading = HtmlTree . HEADING ( HtmlConstants . TITLE_HEADING , HtmlStyle . title , title ) ; Content div = HtmlTree . DIV ( HtmlStyle . header , heading ) ; body . addContent ( div ) ; }
|
public class IntlPhoneInput { /** * Get number
* @ return Phone number in E . 164 format | null on error */
@ SuppressWarnings ( "unused" ) public String getNumber ( ) { } }
|
Phonenumber . PhoneNumber phoneNumber = getPhoneNumber ( ) ; if ( phoneNumber == null ) { return null ; } return mPhoneUtil . format ( phoneNumber , PhoneNumberUtil . PhoneNumberFormat . E164 ) ;
|
public class CmsLock { /** * Returns < code > true < / code > if this is an exclusive , temporary exclusive , or
* directly inherited lock , and the current user is the owner of this lock ,
* checking also the project of the lock . < p >
* @ param cms the CMS context to check
* @ return < code > true < / code > if this is an exclusive , temporary exclusive , or
* directly inherited lock , and the current user is the owner of this lock */
public boolean isDirectlyOwnedInProjectBy ( CmsObject cms ) { } }
|
return ( isExclusive ( ) || isDirectlyInherited ( ) ) && isOwnedInProjectBy ( cms . getRequestContext ( ) . getCurrentUser ( ) , cms . getRequestContext ( ) . getCurrentProject ( ) ) ;
|
public class ASrvOrm { /** * < p > Evaluate SQL create table statement . < / p >
* @ param pEntityName entity simple name
* @ return SQL create table */
public final String evalSqlCreateTable ( final String pEntityName ) { } }
|
TableSql tableSql = getTablesMap ( ) . get ( pEntityName ) ; StringBuffer result = new StringBuffer ( "create table " + pEntityName . toUpperCase ( ) + " (\n" ) ; boolean isFirstField = true ; for ( Map . Entry < String , FieldSql > entry : tableSql . getFieldsMap ( ) . entrySet ( ) ) { if ( ! ( entry . getValue ( ) . getTypeField ( ) . equals ( ETypeField . COMPOSITE_FK ) || entry . getValue ( ) . getTypeField ( ) . equals ( ETypeField . COMPOSITE_FK_PK ) ) ) { if ( isFirstField ) { isFirstField = false ; } else { result . append ( ",\n" ) ; } result . append ( entry . getKey ( ) . toUpperCase ( ) + " " + tableSql . getFieldsMap ( ) . get ( entry . getKey ( ) ) . getDefinition ( ) ) ; } } if ( tableSql . getConstraint ( ) != null ) { result . append ( ",\n" + tableSql . getConstraint ( ) ) ; } result . append ( ");\n" ) ; return result . toString ( ) ;
|
public class JKObjectUtil { /** * Checks if is primitive .
* @ param type the type
* @ return true , if is primitive */
public static boolean isPrimitive ( Class < ? > type ) { } }
|
if ( type . isPrimitive ( ) ) { return true ; } // check if wrapper ;
if ( PRIMITIVES_TO_WRAPPERS . values ( ) . contains ( type ) ) { return true ; } return false ;
|
public class ProtobufProxyUtils { /** * to process default value of < code > @ Protobuf < / code > value on field .
* @ param fields all field to process
* @ param ignoreNoAnnotation the ignore no annotation
* @ param isZipZap the is zip zap
* @ return list of fields */
public static List < FieldInfo > processDefaultValue ( List < Field > fields , boolean ignoreNoAnnotation , boolean isZipZap ) { } }
|
if ( fields == null ) { return null ; } List < FieldInfo > ret = new ArrayList < FieldInfo > ( fields . size ( ) ) ; int maxOrder = 0 ; List < FieldInfo > unorderFields = new ArrayList < FieldInfo > ( fields . size ( ) ) ; Set < Integer > orders = new HashSet < Integer > ( ) ; for ( Field field : fields ) { Ignore ignore = field . getAnnotation ( Ignore . class ) ; if ( ignore != null ) { if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "Field name '{}' marked @Ignore annotation will be ignored." , field . getName ( ) ) ; } continue ; } Protobuf protobuf = field . getAnnotation ( Protobuf . class ) ; if ( protobuf == null && ! ignoreNoAnnotation ) { throw new RuntimeException ( "Field '" + field . getName ( ) + "' has no @Protobuf annotation" ) ; } // check field is support for protocol buffer
// any array except byte array is not support
String simpleName = field . getType ( ) . getName ( ) ; if ( simpleName . startsWith ( "[" ) ) { if ( ( ! simpleName . equals ( byte [ ] . class . getName ( ) ) ) && ( ! simpleName . equals ( Byte [ ] . class . getName ( ) ) ) ) { throw new RuntimeException ( "Array type of field '" + field . getName ( ) + "' on class '" + field . getDeclaringClass ( ) . getName ( ) + "' is not support, please use List instead." ) ; } } FieldInfo fieldInfo = new FieldInfo ( field ) ; FieldType annFieldType = FieldType . DEFAULT ; int order = - 1 ; if ( protobuf != null ) { fieldInfo . setRequired ( protobuf . required ( ) ) ; fieldInfo . setDescription ( protobuf . description ( ) ) ; annFieldType = protobuf . fieldType ( ) ; order = protobuf . order ( ) ; } else { fieldInfo . setRequired ( false ) ; } // process type
if ( annFieldType == FieldType . DEFAULT ) { Class fieldTypeClass = field . getType ( ) ; // if list
boolean isList = fieldInfo . isList ( ) ; if ( isList ) { fieldTypeClass = fieldInfo . getGenericKeyType ( ) ; } FieldType fieldType = TYPE_MAPPING . get ( fieldTypeClass ) ; if ( fieldType == null ) { // check if type is enum
if ( Enum . class . isAssignableFrom ( fieldTypeClass ) ) { fieldType = FieldType . ENUM ; } else if ( fieldInfo . isMap ( ) ) { fieldType = FieldType . MAP ; } else { fieldType = FieldType . OBJECT ; } } // check if enable zagzip
if ( isZipZap ) { if ( fieldType == FieldType . INT32 ) { fieldType = FieldType . SINT32 ; // to convert to sint32 to enable zagzip
} else if ( fieldType == FieldType . INT64 ) { fieldType = FieldType . SINT64 ; // to convert to sint64 to enable zagzip
} } fieldInfo . setFieldType ( fieldType ) ; } else { fieldInfo . setFieldType ( annFieldType ) ; } if ( order > 0 ) { if ( orders . contains ( order ) ) { throw new RuntimeException ( "order id '" + order + "' from field name '" + field . getName ( ) + "' is duplicate" ) ; } orders . add ( order ) ; fieldInfo . setOrder ( order ) ; if ( order > maxOrder ) { maxOrder = order ; } } else { unorderFields . add ( fieldInfo ) ; } if ( fieldInfo . isList ( ) && ( fieldInfo . getFieldType ( ) . isPrimitive ( ) || fieldInfo . getFieldType ( ) . isEnum ( ) ) ) { Packed packed = field . getAnnotation ( Packed . class ) ; if ( packed == null ) { fieldInfo . setPacked ( true ) ; } else { fieldInfo . setPacked ( packed . value ( ) ) ; } } ret . add ( fieldInfo ) ; } if ( unorderFields . isEmpty ( ) ) { return ret ; } for ( FieldInfo fieldInfo : unorderFields ) { maxOrder ++ ; fieldInfo . setOrder ( maxOrder ) ; if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "Field '{}' from {} with @Protobuf annotation but not set order or order is 0," + " It will set order value to {}" , fieldInfo . getField ( ) . getName ( ) , fieldInfo . getField ( ) . getDeclaringClass ( ) . getName ( ) , maxOrder ) ; } } return ret ;
|
public class AgigaDocumentReader { /** * Assumes the position of vn is at a " DOC " tag */
private List < AgigaCoref > parseCorefs ( VTDNav vn ) throws PilotException , NavException { } }
|
require ( vn . matchElement ( AgigaConstants . DOC ) ) ; List < AgigaCoref > agigaCorefs = new ArrayList < AgigaCoref > ( ) ; if ( ! vn . toElement ( VTDNav . FIRST_CHILD , AgigaConstants . COREFERENCES ) ) { // If there is no coref annotation return the empty list
log . finer ( "No corefs found" ) ; return agigaCorefs ; } // Loop through each token
AutoPilot corefAp = new AutoPilot ( vn ) ; corefAp . selectElement ( AgigaConstants . COREFERENCE ) ; while ( corefAp . iterate ( ) ) { AgigaCoref coref = parseCoref ( vn . cloneNav ( ) ) ; agigaCorefs . add ( coref ) ; } return agigaCorefs ;
|
public class TreeScanner { /** * { @ inheritDoc } This implementation scans the children in left to right order .
* @ param node { @ inheritDoc }
* @ param p { @ inheritDoc }
* @ return the result of scanning */
@ Override public R visitUnionType ( UnionTypeTree node , P p ) { } }
|
return scan ( node . getTypeAlternatives ( ) , p ) ;
|
public class BccClient { /** * Return a list of instances owned by the authenticated user .
* @ param request The request containing all options for listing own ' s bcc Instance .
* @ return The response containing a list of instances owned by the authenticated user . */
public ListInstancesResponse listInstances ( ListInstancesRequest request ) { } }
|
checkNotNull ( request , "request should not be null." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , INSTANCE_PREFIX ) ; if ( request . getMarker ( ) != null ) { internalRequest . addParameter ( "marker" , request . getMarker ( ) ) ; } if ( request . getMaxKeys ( ) > 0 ) { internalRequest . addParameter ( "maxKeys" , String . valueOf ( request . getMaxKeys ( ) ) ) ; } if ( ! Strings . isNullOrEmpty ( request . getInternalIp ( ) ) ) { internalRequest . addParameter ( "internalIp" , request . getInternalIp ( ) ) ; } if ( ! Strings . isNullOrEmpty ( request . getDedicatedHostId ( ) ) ) { internalRequest . addParameter ( "dedicatedHostId" , request . getDedicatedHostId ( ) ) ; } if ( ! Strings . isNullOrEmpty ( request . getZoneName ( ) ) ) { internalRequest . addParameter ( "zoneName" , request . getZoneName ( ) ) ; } return invokeHttpClient ( internalRequest , ListInstancesResponse . class ) ;
|
public class ResponseExceptionHandler { /** * Method for handling exception of type { @ link MultipartException } which is
* thrown in case the request body is not well formed and cannot be
* deserialized . Called by the Spring - Framework for exception handling .
* @ param request
* the Http request
* @ param ex
* the exception which occurred
* @ return the entity to be responded containing the exception information
* as entity . */
@ ExceptionHandler ( MultipartException . class ) public ResponseEntity < ExceptionInfo > handleMultipartException ( final HttpServletRequest request , final Exception ex ) { } }
|
logRequest ( request , ex ) ; final List < Throwable > throwables = ExceptionUtils . getThrowableList ( ex ) ; final Throwable responseCause = Iterables . getLast ( throwables ) ; if ( responseCause . getMessage ( ) . isEmpty ( ) ) { LOG . warn ( "Request {} lead to MultipartException without root cause message:\n{}" , request . getRequestURL ( ) , ex . getStackTrace ( ) ) ; } final ExceptionInfo response = createExceptionInfo ( new MultiPartFileUploadException ( responseCause ) ) ; return new ResponseEntity < > ( response , HttpStatus . BAD_REQUEST ) ;
|
public class GetPipelineStateResult { /** * A list of the pipeline stage output information , including stage name , state , most recent run details , whether
* the stage is disabled , and other data .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setStageStates ( java . util . Collection ) } or { @ link # withStageStates ( java . util . Collection ) } if you want to
* override the existing values .
* @ param stageStates
* A list of the pipeline stage output information , including stage name , state , most recent run details ,
* whether the stage is disabled , and other data .
* @ return Returns a reference to this object so that method calls can be chained together . */
public GetPipelineStateResult withStageStates ( StageState ... stageStates ) { } }
|
if ( this . stageStates == null ) { setStageStates ( new java . util . ArrayList < StageState > ( stageStates . length ) ) ; } for ( StageState ele : stageStates ) { this . stageStates . add ( ele ) ; } return this ;
|
public class JsonPath { /** * Applies this JsonPath to the provided json string
* @ param json a json string
* @ param < T > expected return type
* @ return list of objects matched by the given path */
@ SuppressWarnings ( { } }
|
"unchecked" } ) public < T > T read ( String json ) { return read ( json , Configuration . defaultConfiguration ( ) ) ;
|
public class SameDiff { /** * Adds a field name - > variable name mapping for a given function . < br >
* This is used for model import where there is an unresolved variable at the time of calling any
* { @ link org . nd4j . imports . graphmapper . GraphMapper # importGraph ( File ) }
* This data structure is typically accessed during { @ link DifferentialFunction # resolvePropertiesFromSameDiffBeforeExecution ( ) }
* When a function attempts to resolve variables right before execution , there needs to be a way of knowing
* which variable in a samediff graph should map to a function ' s particular field name
* @ param function the function to map
* @ param fieldName the field name for the function to map
* @ param varName the variable name of the array to get from samediff */
public void addVariableMappingForField ( DifferentialFunction function , String fieldName , String varName ) { } }
|
fieldVariableResolutionMapping . put ( function . getOwnName ( ) , fieldName , varName ) ;
|
public class CPDefinitionInventoryPersistenceImpl { /** * Clears the cache for all cp definition inventories .
* The { @ link EntityCache } and { @ link FinderCache } are both cleared by this method . */
@ Override public void clearCache ( ) { } }
|
entityCache . clearCache ( CPDefinitionInventoryImpl . class ) ; finderCache . clearCache ( FINDER_CLASS_NAME_ENTITY ) ; finderCache . clearCache ( FINDER_CLASS_NAME_LIST_WITH_PAGINATION ) ; finderCache . clearCache ( FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION ) ;
|
public class SQSMessage { /** * Sets a Java object property value with the specified name into the
* message .
* Note that this method works only for the boxed primitive object types
* ( Integer , Double , Long . . . ) and String objects .
* @ param name
* The name of the property to set .
* @ param value
* The object value of the property to set .
* @ throws JMSException
* On internal error .
* @ throws IllegalArgumentException
* If the name or value is null or empty string .
* @ throws MessageFormatException
* If the object is invalid type .
* @ throws MessageNotWriteableException
* If properties are read - only . */
@ Override public void setObjectProperty ( String name , Object value ) throws JMSException { } }
|
if ( name == null || name . isEmpty ( ) ) { throw new IllegalArgumentException ( "Property name can not be null or empty." ) ; } if ( value == null || "" . equals ( value ) ) { throw new IllegalArgumentException ( "Property value can not be null or empty." ) ; } if ( ! isValidPropertyValueType ( value ) ) { throw new MessageFormatException ( "Value of property with name " + name + " has incorrect type " + value . getClass ( ) . getName ( ) + "." ) ; } checkPropertyWritePermissions ( ) ; properties . put ( name , new JMSMessagePropertyValue ( value ) ) ;
|
public class SipSessionImpl { /** * ( non - Javadoc )
* @ see org . mobicents . javax . servlet . sip . SipSessionExt # setOutboundInterface ( javax . servlet . sip . SipURI ) */
public void setOutboundInterface ( SipURI outboundInterface ) { } }
|
if ( ! isValid ( ) ) { throw new IllegalStateException ( "the session has been invalidated" ) ; } if ( outboundInterface == null ) { throw new NullPointerException ( "parameter is null" ) ; } List < SipURI > list = sipFactory . getSipNetworkInterfaceManager ( ) . getOutboundInterfaces ( ) ; SipURI networkInterface = null ; for ( SipURI networkInterfaceURI : list ) { if ( networkInterfaceURI . equals ( outboundInterface ) ) { networkInterface = networkInterfaceURI ; break ; } } if ( networkInterface == null ) throw new IllegalArgumentException ( "Network interface for " + outboundInterface + " not found" ) ; this . outboundInterface = outboundInterface . toString ( ) ; if ( outboundInterface . getTransportParam ( ) != null ) { this . transport = outboundInterface . getTransportParam ( ) ; }
|
public class ST_Drape { /** * Drape a linestring to a set of triangles
* @ param line
* @ param triangles
* @ param sTRtree
* @ return */
public static Geometry drapeLineString ( LineString line , Geometry triangles , STRtree sTRtree ) { } }
|
GeometryFactory factory = line . getFactory ( ) ; // Split the triangles in lines to perform all intersections
Geometry triangleLines = LinearComponentExtracter . getGeometry ( triangles , true ) ; Geometry diffExt = lineMerge ( line . difference ( triangleLines ) , factory ) ; CoordinateSequenceFilter drapeFilter = new DrapeFilter ( sTRtree ) ; diffExt . apply ( drapeFilter ) ; return diffExt ;
|
public class XmlFile { /** * Opens a { @ link Reader } that loads XML .
* This method uses { @ link # sniffEncoding ( ) the right encoding } ,
* not just the system default encoding .
* @ throws IOException Encoding issues
* @ return Reader for the file . should be close externally once read . */
public Reader readRaw ( ) throws IOException { } }
|
try { InputStream fileInputStream = Files . newInputStream ( file . toPath ( ) ) ; try { return new InputStreamReader ( fileInputStream , sniffEncoding ( ) ) ; } catch ( IOException ex ) { // Exception may happen if we fail to find encoding or if this encoding is unsupported .
// In such case we close the underlying stream and rethrow .
Util . closeAndLogFailures ( fileInputStream , LOGGER , "FileInputStream" , file . toString ( ) ) ; throw ex ; } } catch ( InvalidPathException e ) { throw new IOException ( e ) ; }
|
public class CacheStatsModule { /** * updates the global statistics for disk information
* @ param objectsOnDisk number of cache entries that are currently on disk
* @ param pendingRemoval number of objects that have been invalidated by are yet to be removed from disk
* @ param depidsOnDisk number of dependency ids that are currently on disk
* @ param depidsBuffered number of dependency ids that have been currently bufferred in memory for the disk
* @ param depidsOffloaded number of dependency ids offloaded to disk
* @ param depidBasedInvalidations number of dependency id based invalidations
* @ param templatesOnDisk number of templates that are currently on disk
* @ param templatesBuffered number of templates that have been currently bufferred in memory for the disk
* @ param templatesOffloaded number of templates offloaded to disk
* @ param templateBasedInvalidations number of template based invalidations */
public void updateDiskCacheStatistics ( long objectsOnDisk , long pendingRemoval , long depidsOnDisk , long depidsBuffered , long depidsOffloaded , long depidBasedInvalidations , long templatesOnDisk , long templatesBuffered , long templatesOffloaded , long templateBasedInvalidations ) { } }
|
final String methodName = "updateDiskCacheStatistics()" ; boolean anyStatChangedValue = false ; if ( _csmDisk != null && _csmDisk . _enable ) { if ( _csmDisk . _objectsOnDisk != null ) { if ( ! anyStatChangedValue ) anyStatChangedValue = anyValueChanged ( _csmDisk . _objectsOnDisk , objectsOnDisk ) ; _csmDisk . _objectsOnDisk . setCount ( objectsOnDisk ) ; } if ( _csmDisk . _pendingRemovalFromDisk != null ) { if ( ! anyStatChangedValue ) anyStatChangedValue = anyValueChanged ( _csmDisk . _pendingRemovalFromDisk , pendingRemoval ) ; _csmDisk . _pendingRemovalFromDisk . setCount ( pendingRemoval ) ; } if ( _csmDisk . _dependencyIdsOnDisk != null ) { if ( ! anyStatChangedValue ) anyStatChangedValue = anyValueChanged ( _csmDisk . _dependencyIdsOnDisk , depidsOnDisk ) ; _csmDisk . _dependencyIdsOnDisk . setCount ( depidsOnDisk ) ; } if ( _csmDisk . _dependencyIdsBufferedForDisk != null ) { if ( ! anyStatChangedValue ) anyStatChangedValue = anyValueChanged ( _csmDisk . _dependencyIdsBufferedForDisk , depidsBuffered ) ; _csmDisk . _dependencyIdsBufferedForDisk . setCount ( depidsBuffered ) ; } if ( _csmDisk . _dependencyIdsOffloadedToDisk != null ) { if ( ! anyStatChangedValue ) anyStatChangedValue = anyValueChanged ( _csmDisk . _dependencyIdsOffloadedToDisk , depidsOffloaded ) ; _csmDisk . _dependencyIdsOffloadedToDisk . setCount ( depidsOffloaded ) ; } if ( _csmDisk . _dependencyIdBasedInvalidationsFromDisk != null ) { if ( ! anyStatChangedValue ) anyStatChangedValue = anyValueChanged ( _csmDisk . _dependencyIdBasedInvalidationsFromDisk , depidBasedInvalidations ) ; _csmDisk . _dependencyIdBasedInvalidationsFromDisk . setCount ( depidBasedInvalidations ) ; } if ( _csmDisk . _templatesOnDisk != null ) { if ( ! anyStatChangedValue ) anyStatChangedValue = anyValueChanged ( _csmDisk . _templatesOnDisk , templatesOnDisk ) ; _csmDisk . _templatesOnDisk . setCount ( templatesOnDisk ) ; } if ( _csmDisk . _templatesBufferedForDisk != null ) { if ( ! anyStatChangedValue ) anyStatChangedValue = anyValueChanged ( _csmDisk . _templatesBufferedForDisk , templatesBuffered ) ; _csmDisk . _templatesBufferedForDisk . setCount ( templatesBuffered ) ; } if ( _csmDisk . _templatesOffloadedToDisk != null ) { if ( ! anyStatChangedValue ) anyStatChangedValue = anyValueChanged ( _csmDisk . _templatesOffloadedToDisk , templatesOffloaded ) ; _csmDisk . _templatesOffloadedToDisk . setCount ( templatesOffloaded ) ; } if ( _csmDisk . _templateBasedInvalidationsFromDisk != null ) { if ( ! anyStatChangedValue ) anyStatChangedValue = anyValueChanged ( _csmDisk . _templateBasedInvalidationsFromDisk , templateBasedInvalidations ) ; _csmDisk . _templateBasedInvalidationsFromDisk . setCount ( templateBasedInvalidations ) ; } if ( tc . isDebugEnabled ( ) && anyStatChangedValue ) Tr . debug ( tc , methodName + " cacheName=" + _sCacheName + " updateCacheStatistics, objectsOnDisk=" + objectsOnDisk + " pendingRemovalFromDisk=" + pendingRemoval + " dependencyIdsOnDisk=" + depidsOnDisk + " dependencyIdsBufferedForDisk=" + depidsBuffered + " dependencyIdsOffloadedToDisk=" + depidsOffloaded + " dependencyIdBasedInvalidations=" + depidBasedInvalidations + " templatesOnDisk=" + templatesOnDisk + " templatesBufferedForDisk=" + templatesBuffered + " templatesOffloadedToDisk=" + templatesOffloaded + " templateBasedInvalidations=" + templateBasedInvalidations + " enable=" + _csmDisk . _enable + " " + this ) ; }
|
public class Transforms { /** * Pow function
* @ param ndArray the ndarray to raise hte power of
* @ param power the power to raise by
* @ return the ndarray raised to this power */
public static INDArray pow ( INDArray ndArray , Number power ) { } }
|
return pow ( ndArray , power , true ) ;
|
public class PendingRequestsMap { /** * Decreases the number of remaining instances to request of the given type .
* @ param instanceType
* the instance type for which the number of remaining instances shall be decreased */
void decreaseNumberOfPendingInstances ( final InstanceType instanceType ) { } }
|
Integer numberOfRemainingInstances = this . pendingRequests . get ( instanceType ) ; if ( numberOfRemainingInstances == null ) { return ; } numberOfRemainingInstances = Integer . valueOf ( numberOfRemainingInstances . intValue ( ) - 1 ) ; if ( numberOfRemainingInstances . intValue ( ) == 0 ) { this . pendingRequests . remove ( instanceType ) ; } else { this . pendingRequests . put ( instanceType , numberOfRemainingInstances ) ; }
|
public class Text { /** * Returns the name part of the path
* @ param path
* the path
* @ return the name part */
public static String getName ( String path ) { } }
|
int pos = path . lastIndexOf ( '/' ) ; return pos >= 0 ? path . substring ( pos + 1 ) : "" ;
|
public class Evaluation { /** * Gets the PermissionSet .
* @ param _ instance the instance
* @ param _ evaluate the evaluate
* @ return the PermissionSet
* @ throws EFapsException on error */
public static PermissionSet getPermissionSet ( final Instance _instance , final boolean _evaluate ) throws EFapsException { } }
|
Evaluation . LOG . debug ( "Retrieving PermissionSet for {}" , _instance ) ; final Key accessKey = Key . get4Instance ( _instance ) ; final PermissionSet ret ; if ( AccessCache . getPermissionCache ( ) . containsKey ( accessKey ) ) { ret = AccessCache . getPermissionCache ( ) . get ( accessKey ) ; } else if ( _evaluate ) { ret = new PermissionSet ( ) . setPersonId ( accessKey . getPersonId ( ) ) . setCompanyId ( accessKey . getCompanyId ( ) ) . setTypeId ( accessKey . getTypeId ( ) ) ; Evaluation . eval ( ret ) ; AccessCache . getPermissionCache ( ) . put ( accessKey , ret ) ; } else { ret = null ; } Evaluation . LOG . debug ( "Retrieved PermissionSet {}" , ret ) ; return ret ;
|
public class Func { /** * Lift a Java Func2 to a Scala Function2
* @ param f the function to lift
* @ returns the Scala function */
public static < A , B , Z > Function2 < A , B , Z > lift ( Func2 < A , B , Z > f ) { } }
|
return bridge . lift ( f ) ;
|
public class StatsManager { /** * collects and increments counts of status code , route / status code and statuc _ code bucket , eg 2xx 3xx 4xx 5xx
* @ param route
* @ param statusCode */
public void collectRouteStats ( String route , int statusCode ) { } }
|
// increments 200 , 301 , 401 , 503 , etc . status counters
final String preciseStatusString = String . format ( "status_%d" , statusCode ) ; NamedCountingMonitor preciseStatus = namedStatusMap . get ( preciseStatusString ) ; if ( preciseStatus == null ) { preciseStatus = new NamedCountingMonitor ( preciseStatusString ) ; NamedCountingMonitor found = namedStatusMap . putIfAbsent ( preciseStatusString , preciseStatus ) ; if ( found != null ) preciseStatus = found ; else MonitorRegistry . getInstance ( ) . registerObject ( preciseStatus ) ; } preciseStatus . increment ( ) ; // increments 2xx , 3xx , 4xx , 5xx status counters
final String summaryStatusString = String . format ( "status_%dxx" , statusCode / 100 ) ; NamedCountingMonitor summaryStatus = namedStatusMap . get ( summaryStatusString ) ; if ( summaryStatus == null ) { summaryStatus = new NamedCountingMonitor ( summaryStatusString ) ; NamedCountingMonitor found = namedStatusMap . putIfAbsent ( summaryStatusString , summaryStatus ) ; if ( found != null ) summaryStatus = found ; else MonitorRegistry . getInstance ( ) . registerObject ( summaryStatus ) ; } summaryStatus . increment ( ) ; // increments route and status counter
if ( route == null ) route = "ROUTE_NOT_FOUND" ; route = route . replace ( "/" , "_" ) ; ConcurrentHashMap < Integer , RouteStatusCodeMonitor > statsMap = routeStatusMap . get ( route ) ; if ( statsMap == null ) { statsMap = new ConcurrentHashMap < Integer , RouteStatusCodeMonitor > ( ) ; routeStatusMap . putIfAbsent ( route , statsMap ) ; } RouteStatusCodeMonitor sd = statsMap . get ( statusCode ) ; if ( sd == null ) { // don ' t register only 404 status codes ( these are garbage endpoints )
if ( statusCode == 404 ) { if ( statsMap . size ( ) == 0 ) { return ; } } sd = new RouteStatusCodeMonitor ( route , statusCode ) ; RouteStatusCodeMonitor sd1 = statsMap . putIfAbsent ( statusCode , sd ) ; if ( sd1 != null ) { sd = sd1 ; } else { MonitorRegistry . getInstance ( ) . registerObject ( sd ) ; } } sd . update ( ) ;
|
public class ProviderConfigurationSupport { /** * Subclassing hook to allow api helper bean to be configured with attributes from annotation
* @ param allAttributes additional attributes that may be used when creating the API helper bean .
* @ return a { @ link BeanDefinitionBuilder } for the API Helper */
protected BeanDefinitionBuilder getApiHelperBeanDefinitionBuilder ( Map < String , Object > allAttributes ) { } }
|
return BeanDefinitionBuilder . genericBeanDefinition ( apiHelperClass ) . addConstructorArgReference ( "usersConnectionRepository" ) . addConstructorArgReference ( "userIdSource" ) ;
|
public class ChunkedHashStore { /** * Adds the elements returned by an iterator to this store , associating them with specified values .
* @ param elements an iterator returning elements .
* @ param values an iterator on values parallel to { @ code elements } . */
public void addAll ( final Iterator < ? extends T > elements , final LongIterator values ) throws IOException { } }
|
addAll ( elements , values , false ) ;
|
public class DeleteVoiceChannelRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( DeleteVoiceChannelRequest deleteVoiceChannelRequest , ProtocolMarshaller protocolMarshaller ) { } }
|
if ( deleteVoiceChannelRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteVoiceChannelRequest . getApplicationId ( ) , APPLICATIONID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
public class BindDaoFactoryBuilder { /** * Build dao factory interface .
* @ param elementUtils the element utils
* @ param filer the filer
* @ param schema the schema
* @ return schema typeName
* @ throws Exception the exception */
public String buildDaoFactoryInterface ( Elements elementUtils , Filer filer , SQLiteDatabaseSchema schema ) throws Exception { } }
|
String schemaName = generateDaoFactoryName ( schema ) ; PackageElement pkg = elementUtils . getPackageOf ( schema . getElement ( ) ) ; String packageName = pkg . isUnnamed ( ) ? "" : pkg . getQualifiedName ( ) . toString ( ) ; AnnotationProcessorUtilis . infoOnGeneratedClasses ( BindDataSource . class , packageName , schemaName ) ; classBuilder = buildDaoFactoryInterfaceInternal ( elementUtils , filer , schema ) ; TypeSpec typeSpec = classBuilder . build ( ) ; JavaWriterHelper . writeJava2File ( filer , packageName , typeSpec ) ; return schemaName ;
|
public class StoreFactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public String convertServiceSimpleTypeToString ( EDataType eDataType , Object instanceValue ) { } }
|
return instanceValue == null ? null : instanceValue . toString ( ) ;
|
public class JsMessageVisitor { /** * Defines any special cases that are exceptions to what would otherwise be illegal message
* assignments .
* < p > These exceptions are generally due to the pass being designed before new syntax was
* introduced . */
private static boolean isLegalMessageVarAlias ( Node msgNode , String msgKey ) { } }
|
if ( msgNode . isGetProp ( ) && msgNode . isQualifiedName ( ) && msgNode . getLastChild ( ) . getString ( ) . equals ( msgKey ) ) { // Case : ` foo . Thing . MSG _ EXAMPLE = bar . OtherThing . MSG _ EXAMPLE ; `
// This kind of construct is created by Es6ToEs3ClassSideInheritance . Just ignore it ; the
// message will have already been extracted from the base class .
return true ; } if ( msgNode . getGrandparent ( ) . isObjectPattern ( ) && msgNode . isName ( ) ) { // Case : ` var { MSG _ HELLO } = x ;
// It ' s a destructuring import . Ignore it if the name is the same . We compare against the
// original name if possible because in modules , the NAME node will be rewritten with a
// module - qualified name ( e . g . ` var { MSG _ HELLO : goog $ module $ my $ module _ MSG _ HELLO } = x ; ` ) .
String aliasName = ( msgNode . getOriginalName ( ) != null ) ? msgNode . getOriginalName ( ) : msgNode . getString ( ) ; if ( aliasName . equals ( msgKey ) ) { return true ; } } // TODO ( nickreid ) : Should ` var MSG _ HELLO = x . MSG _ HELLO ; ` also be allowed ?
return false ;
|
public class EventServicesImpl { /** * This is for regression tester only .
* @ param masterRequestId */
public void sendDelayEventsToWaitActivities ( String masterRequestId ) throws DataAccessException , ProcessException { } }
|
TransactionWrapper transaction = null ; EngineDataAccessDB edao = new EngineDataAccessDB ( ) ; try { transaction = edao . startTransaction ( ) ; List < ProcessInstance > procInsts = edao . getProcessInstancesByMasterRequestId ( masterRequestId , null ) ; for ( ProcessInstance pi : procInsts ) { List < ActivityInstance > actInsts = edao . getActivityInstancesForProcessInstance ( pi . getId ( ) ) ; for ( ActivityInstance ai : actInsts ) { if ( ai . getStatusCode ( ) == WorkStatus . STATUS_WAITING . intValue ( ) ) { InternalEvent event = InternalEvent . createActivityDelayMessage ( ai , masterRequestId ) ; this . sendInternalEvent ( event , edao ) ; } } } } catch ( SQLException e ) { throw new ProcessException ( 0 , "Failed to send delay event wait activities runtime" , e ) ; } finally { edao . stopTransaction ( transaction ) ; }
|
public class DroolsStreamUtils { /** * This method reads the contents from the given byte array and returns the object . It is expected that
* the contents in the given buffer was not compressed , and the content stream was written by the corresponding
* streamOut methods of this class .
* @ param bytes
* @ param classLoader
* @ return
* @ throws IOException
* @ throws ClassNotFoundException */
public static Object streamIn ( byte [ ] bytes , ClassLoader classLoader ) throws IOException , ClassNotFoundException { } }
|
return streamIn ( bytes , classLoader , false ) ;
|
public class CmsModelGroupHelper { /** * Returns the descending instance id ' s to the given element instance . < p >
* @ param instanceId the instance id
* @ param containersByParent the container page containers by parent instance id
* @ return the containers */
private Set < String > collectDescendingInstances ( String instanceId , Map < String , List < CmsContainerBean > > containersByParent ) { } }
|
Set < String > descendingInstances = new HashSet < String > ( ) ; descendingInstances . add ( instanceId ) ; if ( containersByParent . containsKey ( instanceId ) ) { for ( CmsContainerBean container : containersByParent . get ( instanceId ) ) { for ( CmsContainerElementBean element : container . getElements ( ) ) { descendingInstances . addAll ( collectDescendingInstances ( element . getInstanceId ( ) , containersByParent ) ) ; } } } return descendingInstances ;
|
public class MarshallUtil { /** * Marshall arrays .
* This method supports { @ code null } { @ code array } .
* @ param array Array to marshall .
* @ param out { @ link ObjectOutput } to write .
* @ param < E > Array type .
* @ throws IOException If any of the usual Input / Output related exceptions occur . */
public static < E > void marshallArray ( E [ ] array , ObjectOutput out ) throws IOException { } }
|
final int size = array == null ? NULL_VALUE : array . length ; marshallSize ( out , size ) ; if ( size <= 0 ) { return ; } for ( int i = 0 ; i < size ; ++ i ) { out . writeObject ( array [ i ] ) ; }
|
public class Util { /** * Check lat lon are withing allowable range as per 1371-4 . pdf . Note that
* values of long = 181 , lat = 91 have special meaning .
* @ param lat
* @ param lon */
public static void checkLatLong ( double lat , double lon ) { } }
|
checkArgument ( lon <= 181.0 , "longitude out of range " + lon ) ; checkArgument ( lon > - 180.0 , "longitude out of range " + lon ) ; checkArgument ( lat <= 91.0 , "latitude out of range " + lat ) ; checkArgument ( lat > - 90.0 , "latitude out of range " + lat ) ;
|
public class DatabaseDAODefaultImpl { public String getAliasFromDevice ( Database database , String deviceName ) throws DevFailed { } }
|
DeviceData argIn = new DeviceData ( ) ; argIn . insert ( deviceName ) ; DeviceData argOut = command_inout ( database , "DbGetDeviceAlias" , argIn ) ; return argOut . extractString ( ) ;
|
public class ConsumerDispatcher { /** * Detach a consumer point from this CD .
* @ param consumerKey The ConsumerKey object of the consumer point
* being detached */
@ Override public void detachConsumerPoint ( ConsumerKey consumerKey ) throws SIResourceException , SINotPossibleInCurrentConfigurationException { } }
|
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "detachConsumerPoint" , consumerKey ) ; // if p2p then we must remove the CP from the matchspace also
if ( ! _isPubSub ) { // Remove the CP from the MatchSpace
_baseDestHandler . removeConsumerPointMatchTarget ( ( DispatchableKey ) consumerKey ) ; } else { state = SIMPState . DELETED ; } /* * 455255
* A deadlock occurs between the close of consumers on asynch deletion of a destination
* and the manual close of the consumer by the appliation . The two locks involved are t
* the consumerPoints lock ( below ) and a lock on the _ pseudoDurableAIHMap object in the
* RemotePubSubSupport class .
* To avoid this , we force a lock to be taken on the RemotePubSubSupport object before
* either of the above locks is obtained . ( In the ptop case we just take the lock on consumerPoints
* twice )
* The corresponding lock is found on RemotePubSubSupport . cleanupLocalisations ( ) */
final Object deletionLock ; if ( isPubSub ( ) ) deletionLock = _baseDestHandler . getPubSubRealization ( ) . getRemotePubSubSupport ( ) ; else deletionLock = consumerPoints ; synchronized ( deletionLock ) { synchronized ( consumerPoints ) { // remove this consumer point from the list of attached consumer points
// Note it may not be in the list if the detach is being forced by delete
// of the destination
if ( consumerPoints . contains ( consumerKey ) ) { consumerPoints . remove ( consumerKey ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Consumer key removed - new size of consumerPoints is " + consumerPoints . size ( ) ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Consumer key not in map" , consumerKey ) ; } // 166829.1
// If We are a subscription and non - durable , and we have no consumer attached ,
// then delete this consumer dispatcher . Note : the one case where we DO delete ,
// even if we ' re durable , is when we ' re the RME for a remote durable subscription .
// However , when we ' re the RME , we don ' t have a matchspace entry .
if ( consumerPoints . isEmpty ( ) && _isPubSub && dispatcherState . getSubscriberID ( ) . contains ( "_NON_DURABLE_NON_SHARED" ) // only non durable non shared consumers
&& ( ! isDurable ( ) || ( this instanceof RemoteConsumerDispatcher ) ) ) { // The proxy event message needs to be send and the call needs
// to be made to the proxy code .
// We know that it was also added to the MatchSpace .
deleteConsumerDispatcher ( ! isDurable ( ) ) ; } } } // Dealing pubsub non - durable shared consumers separately to avoid dead lock
if ( _isPubSub && ( ! isDurable ( ) ) && ! dispatcherState . getSubscriberID ( ) . contains ( "_NON_DURABLE_NON_SHARED" ) ) { // We have to deal pubsub non - durable shared consumers as separate as there is
// chance of dead lock . The creatiing / obtaining CD for a cosnumer and attaching involves
// getting locks on hashmap _ destinationManager . getNondurableSharedSubscriptions ( ) and
// ' ConsumerPoints '
// The above code locks ConsumerPoints first . . then after tries to lock
// _ destinationManager . getNondurableSharedSubscriptions ( ) , chance of deadlock
// no deletionLock is required as no remote support is there .
synchronized ( _baseDestHandler . getDestinationManager ( ) . getNondurableSharedSubscriptions ( ) ) { // the lock is too harsh as it is entire ME wide
synchronized ( consumerPoints ) { if ( consumerPoints . isEmpty ( ) ) { // no consumers attached then delete CD . It can be assured that no other consumer
// would be trying obtain the CD
deleteConsumerDispatcher ( ! isDurable ( ) ) ; } } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "detachConsumerPoint" ) ;
|
public class BeanUtils { /** * Creates a { @ link Map } from all bean data get methods except the ones
* specified to exclude . Note that " getClass " is always excluded .
* @ param bean The bean with data to extract .
* @ param excludes The method names to exclude .
* @ return The map of bean data . */
public static Map < String , String > mapBean ( final Object bean , final Set < String > excludes ) { } }
|
excludes . add ( "getClass" ) ; final Object [ ] emptyParams = new Object [ 0 ] ; final Method [ ] methods = bean . getClass ( ) . getMethods ( ) ; final Map < String , String > fields = new HashMap < String , String > ( ) ; for ( final Method method : methods ) { if ( method . getParameterTypes ( ) . length > 0 ) { continue ; } final String name = method . getName ( ) ; if ( name . startsWith ( "get" ) && ! excludes . contains ( name ) ) { LOG . debug ( "Calling method: {}" , name ) ; try { final Object returnVal = method . invoke ( bean , emptyParams ) ; LOG . debug ( "Got: {}" , returnVal ) ; final String beanValue = String . valueOf ( returnVal ) ; final String beanData = StringUtils . substringAfter ( name , "get" ) ; fields . put ( StringUtils . uncapitalize ( beanData ) , beanValue ) ; } catch ( final IllegalAccessException e ) { LOG . debug ( "Could not access method: " + method . toGenericString ( ) , e ) ; } catch ( final InvocationTargetException e ) { LOG . debug ( "Could not invoke method: " + method . toGenericString ( ) , e ) ; } } } return fields ;
|
public class DelegatingRestrictor { /** * Actual check which delegate to one or more restrictor services if available .
* @ param pCheck a function object for performing the actual check
* @ param args arguments passed through to the check
* @ return true if all checks return true */
private boolean checkRestrictorService ( RestrictorCheck pCheck , Object ... args ) { } }
|
try { ServiceReference [ ] serviceRefs = bundleContext . getServiceReferences ( Restrictor . class . getName ( ) , null ) ; if ( serviceRefs != null ) { boolean ret = true ; boolean found = false ; for ( ServiceReference serviceRef : serviceRefs ) { Restrictor restrictor = ( Restrictor ) bundleContext . getService ( serviceRef ) ; if ( restrictor != null ) { ret = ret && pCheck . check ( restrictor , args ) ; found = true ; } } return found && ret ; } else { return false ; } } catch ( InvalidSyntaxException e ) { // Will not happen , since we dont use a filter here
throw new IllegalArgumentException ( "Impossible exception (we don't use a filter for fetching the services)" , e ) ; }
|
public class AutoRegistration { /** * Validate the given application name .
* @ param name The application name
* @ param typeDescription The detailed information about name */
protected void validateName ( String name , String typeDescription ) { } }
|
if ( ! APPLICATION_NAME_PATTERN . matcher ( name ) . matches ( ) ) { throw new DiscoveryException ( typeDescription + " [" + name + "] must start with a letter, end with a letter or digit and contain only letters, digits or hyphens. Example: foo-bar" ) ; }
|
public class PAbstractObject { /** * Get a property as a boolean or default value .
* @ param key the property name
* @ param defaultValue the default */
@ Override public final Boolean optBool ( final String key , final Boolean defaultValue ) { } }
|
Boolean result = optBool ( key ) ; return result == null ? defaultValue : result ;
|
public class GrowQueue_F64 { /** * Creates a queue with the specified length as its size filled with all zeros */
public static GrowQueue_F64 zeros ( int length ) { } }
|
GrowQueue_F64 out = new GrowQueue_F64 ( length ) ; out . size = length ; return out ;
|
public class SimulationApplicationSummaryMarshaller { /** * Marshall the given parameter object . */
public void marshall ( SimulationApplicationSummary simulationApplicationSummary , ProtocolMarshaller protocolMarshaller ) { } }
|
if ( simulationApplicationSummary == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( simulationApplicationSummary . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( simulationApplicationSummary . getArn ( ) , ARN_BINDING ) ; protocolMarshaller . marshall ( simulationApplicationSummary . getVersion ( ) , VERSION_BINDING ) ; protocolMarshaller . marshall ( simulationApplicationSummary . getLastUpdatedAt ( ) , LASTUPDATEDAT_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
public class AbstractGuacamoleTunnelService { /** * Returns a guacamole configuration which joins the active connection
* having the given ID , using the provided sharing profile to restrict the
* access provided to the user accessing the shared connection . If tokens
* are used in the connection parameter values of the sharing profile ,
* credentials from the given user will be substituted appropriately .
* @ param user
* The user whose credentials should be used if necessary .
* @ param sharingProfile
* The sharing profile whose associated parameters dictate the level
* of access granted to the user joining the connection .
* @ param connectionID
* The ID of the connection being joined , as provided by guacd when the
* original connection was established , or null if a new connection
* should be created instead .
* @ return
* A GuacamoleConfiguration containing the protocol and parameters from
* the given connection . */
private GuacamoleConfiguration getGuacamoleConfiguration ( RemoteAuthenticatedUser user , ModeledSharingProfile sharingProfile , String connectionID ) { } }
|
// Generate configuration from available data
GuacamoleConfiguration config = new GuacamoleConfiguration ( ) ; config . setConnectionID ( connectionID ) ; // Set parameters from associated data
Collection < SharingProfileParameterModel > parameters = sharingProfileParameterMapper . select ( sharingProfile . getIdentifier ( ) ) ; for ( SharingProfileParameterModel parameter : parameters ) config . setParameter ( parameter . getName ( ) , parameter . getValue ( ) ) ; return config ;
|
public class DatanodeDescriptor { /** * Remove block from the list and insert
* into the head of the list of blocks
* related to the specified DatanodeDescriptor .
* If the head is null then form a new list .
* @ return current block as the new head of the list . */
protected BlockInfo listMoveToHead ( BlockInfo block , BlockInfo head , DatanodeIndex indexes ) { } }
|
assert head != null : "Head can not be null" ; if ( head == block ) { return head ; } BlockInfo next = block . getSetNext ( indexes . currentIndex , head ) ; BlockInfo prev = block . getSetPrevious ( indexes . currentIndex , null ) ; head . setPrevious ( indexes . headIndex , block ) ; indexes . headIndex = indexes . currentIndex ; prev . setNext ( prev . findDatanode ( this ) , next ) ; if ( next != null ) next . setPrevious ( next . findDatanode ( this ) , prev ) ; return block ;
|
public class DefaultNameContextGenerator { /** * Returns a list of the features for < code > toks [ i ] < / code > that can
* be safely cached . In other words , return a list of all
* features that do not depend on previous outcome or decision
* features . This method is called by < code > search < / code > .
* @ param toks The list of tokens being processed .
* @ param i The index of the token whose features should be returned .
* @ return a list of the features for < code > toks [ i ] < / code > that can
* be safely cached . */
private List getStaticFeatures ( Object [ ] toks , int i , Map prevTags ) { } }
|
List feats = new ArrayList ( ) ; feats . add ( "def" ) ; // current word
String w = toks [ i ] . toString ( ) . toLowerCase ( ) ; feats . add ( "w=" + w ) ; String wf = wordFeature ( toks [ i ] . toString ( ) ) ; feats . add ( "wf=" + wf ) ; feats . add ( "w&wf=" + w + "," + wf ) ; String pt = ( String ) prevTags . get ( toks [ i ] . toString ( ) ) ; feats . add ( "pd=" + pt ) ; if ( i == 0 ) { feats . add ( "df=it" ) ; } // previous previous word
if ( i - 2 >= 0 ) { String ppw = toks [ i - 2 ] . toString ( ) . toLowerCase ( ) ; feats . add ( "ppw=" + ppw ) ; String ppwf = wordFeature ( toks [ i - 2 ] . toString ( ) ) ; feats . add ( "ppwf=" + ppwf ) ; feats . add ( "ppw&f=" + ppw + "," + ppwf ) ; } else { feats . add ( "ppw=BOS" ) ; } // previous word
if ( i == 0 ) { feats . add ( "pw=BOS" ) ; feats . add ( "pw=BOS,w=" + w ) ; feats . add ( "pwf=BOS,wf" + wf ) ; } else { String pw = toks [ i - 1 ] . toString ( ) . toLowerCase ( ) ; feats . add ( "pw=" + pw ) ; String pwf = wordFeature ( toks [ i - 1 ] . toString ( ) ) ; feats . add ( "pwf=" + pwf ) ; feats . add ( "pw&f=" + pw + "," + pwf ) ; feats . add ( "pw=" + pw + ",w=" + w ) ; feats . add ( "pwf=" + pwf + ",wf=" + wf ) ; } // next word
if ( i + 1 >= toks . length ) { feats . add ( "nw=EOS" ) ; feats . add ( "w=" + w + ",nw=EOS" ) ; feats . add ( "wf=" + wf + ",nw=EOS" ) ; } else { String nw = toks [ i + 1 ] . toString ( ) . toLowerCase ( ) ; feats . add ( "nw=" + nw ) ; String nwf = wordFeature ( toks [ i + 1 ] . toString ( ) ) ; feats . add ( "nwf=" + nwf ) ; feats . add ( "nw&f=" + nw + "," + nwf ) ; feats . add ( "w=" + w + ",nw=" + nw ) ; feats . add ( "wf=" + wf + ",nwf=" + nwf ) ; } if ( i + 2 >= toks . length ) { feats . add ( "nnw=EOS" ) ; } else { String nnw = toks [ i + 2 ] . toString ( ) . toLowerCase ( ) ; feats . add ( "nnw=" + nnw ) ; String nnwf = wordFeature ( toks [ i + 2 ] . toString ( ) ) ; feats . add ( "nnwf=" + nnwf ) ; feats . add ( "nnw&f=" + nnw + "," + nnwf ) ; } // tokenFeatureCache . put ( toks [ i ] , Lists . shallowClone ( feats ) ) ;
return ( feats ) ;
|
public class Sensor { /** * Validate that this sensor doesn ' t end up referencing itself */
private void checkForest ( Set < Sensor > sensors ) { } }
|
if ( ! sensors . add ( this ) ) throw new IllegalArgumentException ( "Circular dependency in sensors: " + name ( ) + " is its own parent." ) ; for ( int i = 0 ; i < parents . length ; i ++ ) parents [ i ] . checkForest ( sensors ) ;
|
public class GlobalDebug { /** * Set the debug mode for the common Java components :
* < ul >
* < li > JAXP < / li >
* < li > Javax Activation < / li >
* < li > Javax Mail < / li >
* < / ul >
* @ param bDebugMode
* < code > true < / code > to enable debug mode , < code > false < / code > to
* disable it */
public static void setJavaCommonComponentsDebugMode ( final boolean bDebugMode ) { } }
|
// Set JAXP debugging !
// Note : this property is read - only on Ubuntu , defined by the following
// policy file : / etc / tomcat6 / policy . d / 04webapps . policy
SystemProperties . setPropertyValue ( SYSTEM_PROPERTY_JAXP_DEBUG , bDebugMode ) ; // Set javax . activation debugging
SystemProperties . setPropertyValue ( SYSTEM_PROPERTY_JAVAX_ACTIVATION_DEBUG , bDebugMode ) ; // Set javax . mail debugging
SystemProperties . setPropertyValue ( SYSTEM_PROPERTY_MAIL_DEBUG , bDebugMode ) ; // Set serialization debugging
SystemProperties . setPropertyValue ( SYSTEM_PROPERTY_SERIALIZATION_DEBUG , bDebugMode ) ;
|
public class CmsSearchResultView { /** * Generates a html form ( named form & lt ; n & gt ; ) with parameters found in
* the given GET request string ( appended params with " ? value = param & value2 = param2 ) .
* & gt ; n & lt ; is the number of forms that already have been generated .
* This is a content - expensive bugfix for http : / / issues . apache . org / bugzilla / show _ bug . cgi ? id = 35775
* and should be replaced with the 1.1 revision as soon that bug is fixed . < p >
* The forms action will point to the given uri ' s path info part : All links in the page
* that includes this generated html and that are related to the get request should
* have " src = ' # ' " and " onclick = documents . forms [ ' & lt ; getRequestUri & gt ; ' ] . submit ( ) " . < p >
* The generated form lands in the internal < code > Map { @ link # m _ formCache } < / code > as mapping
* from uris to Strings and has to be appended to the output at a valid position . < p >
* Warning : Does not work with multiple values mapped to one parameter ( " key = value1 , value2 . . " ) . < p >
* @ param getRequestUri a request uri with optional query , will be used as name of the form too
* @ param search the search bean to get the parameters from
* @ return the formname of the the generated form that contains the parameters of the given request uri or
* the empty String if there weren ' t any get parameters in the given request uri . */
private String toPostParameters ( String getRequestUri , CmsSearch search ) { } }
|
StringBuffer result ; String formname = "" ; if ( ! m_formCache . containsKey ( getRequestUri ) ) { result = new StringBuffer ( ) ; int index = getRequestUri . indexOf ( '?' ) ; String query = "" ; String path = "" ; if ( index > 0 ) { query = getRequestUri . substring ( index + 1 ) ; path = getRequestUri . substring ( 0 , index ) ; formname = new StringBuffer ( "searchform" ) . append ( m_formCache . size ( ) ) . toString ( ) ; result . append ( "\n<form method=\"post\" name=\"" ) . append ( formname ) . append ( "\" action=\"" ) ; result . append ( path ) . append ( "\">\n" ) ; // " key = value " pairs as tokens :
StringTokenizer entryTokens = new StringTokenizer ( query , "&" , false ) ; while ( entryTokens . hasMoreTokens ( ) ) { StringTokenizer keyValueToken = new StringTokenizer ( entryTokens . nextToken ( ) , "=" , false ) ; if ( keyValueToken . countTokens ( ) != 2 ) { continue ; } // Undo the possible already performed url encoding for the given url
String key = CmsEncoder . decode ( keyValueToken . nextToken ( ) ) ; String value = CmsEncoder . decode ( keyValueToken . nextToken ( ) ) ; if ( "action" . equals ( key ) ) { // cannot use the " search " - action value in combination with CmsWidgetDialog : prepareCommit would be left out !
value = CmsWidgetDialog . DIALOG_SAVE ; } result . append ( " <input type=\"hidden\" name=\"" ) ; result . append ( key ) . append ( "\" value=\"" ) ; result . append ( value ) . append ( "\" />\n" ) ; } // custom search index code for making category widget - compatible
// this is needed for transforming e . g . the CmsSearch - generated
// " & category = a , b , c " to widget fields categories . 0 . . categories . n .
List < String > categories = search . getParameters ( ) . getCategories ( ) ; Iterator < String > it = categories . iterator ( ) ; int count = 0 ; while ( it . hasNext ( ) ) { result . append ( " <input type=\"hidden\" name=\"" ) ; result . append ( "categories." ) . append ( count ) . append ( "\" value=\"" ) ; result . append ( it . next ( ) ) . append ( "\" />\n" ) ; count ++ ; } List < String > roots = search . getParameters ( ) . getRoots ( ) ; it = roots . iterator ( ) ; count = 0 ; while ( it . hasNext ( ) ) { result . append ( " <input type=\"hidden\" name=\"" ) ; result . append ( "roots." ) . append ( count ) . append ( "\" value=\"" ) ; result . append ( it . next ( ) ) . append ( "\" />\n" ) ; count ++ ; } result . append ( " <input type=\"hidden\" name=\"" ) ; result . append ( "fields" ) . append ( "\" value=\"" ) ; result . append ( CmsStringUtil . collectionAsString ( search . getParameters ( ) . getFields ( ) , "," ) ) ; result . append ( "\" />\n" ) ; result . append ( " <input type=\"hidden\" name=\"" ) ; result . append ( "sortfields." ) . append ( 0 ) . append ( "\" value=\"" ) ; result . append ( search . getParameters ( ) . getSortName ( ) ) . append ( "\" />\n" ) ; result . append ( "</form>\n" ) ; HTMLForm form = new HTMLForm ( formname , result . toString ( ) ) ; m_formCache . put ( getRequestUri , form ) ; return formname ; } // empty String for no get parameters
return formname ; } else { HTMLForm form = m_formCache . get ( getRequestUri ) ; return form . m_formName ; }
|
public class PickerUtilities { /** * isSameLocalDate , This compares two date variables to see if their values are equal . Returns
* true if the values are equal , otherwise returns false .
* More specifically : This returns true if both values are null ( an empty date ) . Or , this
* returns true if both of the supplied dates contain a date and represent the same date .
* Otherwise this returns false . */
static public boolean isSameLocalDate ( LocalDate first , LocalDate second ) { } }
|
// If both values are null , return true .
if ( first == null && second == null ) { return true ; } // At least one value contains a date . If the other value is null , then return false .
if ( first == null || second == null ) { return false ; } // Both values contain dates . Return true if the dates are equal , otherwise return false .
return first . isEqual ( second ) ;
|
public class AllocatedEvaluatorImpl { /** * Submit Context and Service with configuration strings .
* This method should be called from bridge and the configuration strings are
* serialized at . Net side .
* @ param evaluatorConfiguration
* @ param contextConfiguration
* @ param serviceConfiguration */
public void submitContextAndService ( final String evaluatorConfiguration , final String contextConfiguration , final String serviceConfiguration ) { } }
|
launchWithConfigurationString ( evaluatorConfiguration , contextConfiguration , Optional . of ( serviceConfiguration ) , Optional . < String > empty ( ) ) ;
|
public class EmailApi { /** * Accept the email interaction
* Accept the interaction specified in the id path parameter
* @ param id id of interaction to accept ( required )
* @ param acceptData Request parameters . ( optional )
* @ return ApiSuccessResponse
* @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the response body */
public ApiSuccessResponse acceptEmail ( String id , AcceptData5 acceptData ) throws ApiException { } }
|
ApiResponse < ApiSuccessResponse > resp = acceptEmailWithHttpInfo ( id , acceptData ) ; return resp . getData ( ) ;
|
public class PathChildrenCache { /** * Return the current data . There are no guarantees of accuracy . This is
* merely the most recent view of the data . The data is returned in sorted order .
* @ return list of children and data */
public List < ChildData > getCurrentData ( ) { } }
|
return ImmutableList . copyOf ( Sets . < ChildData > newTreeSet ( currentData . values ( ) ) ) ;
|
public class Context { /** * Find map containing parameter from this context and upwards
* @ param name
* @ return */
public Map < String , Object > getMap ( String name ) { } }
|
if ( variables . containsKey ( name ) ) return variables ; else if ( parent != null ) return parent . getMap ( name ) ; return null ;
|
public class SimpleAntlrSwitch { /** * Calls < code > caseXXX < / code > for each class of the model until one returns a non null result ; it yields that result .
* < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ return the first non - null result returned by a < code > caseXXX < / code > call .
* @ generated */
@ Override protected T doSwitch ( int classifierID , EObject theEObject ) { } }
|
switch ( classifierID ) { case SimpleAntlrPackage . ANTLR_GRAMMAR : { AntlrGrammar antlrGrammar = ( AntlrGrammar ) theEObject ; T result = caseAntlrGrammar ( antlrGrammar ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . OPTIONS : { Options options = ( Options ) theEObject ; T result = caseOptions ( options ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . OPTION_VALUE : { OptionValue optionValue = ( OptionValue ) theEObject ; T result = caseOptionValue ( optionValue ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . RULE : { Rule rule = ( Rule ) theEObject ; T result = caseRule ( rule ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . PARAMETER : { Parameter parameter = ( Parameter ) theEObject ; T result = caseParameter ( parameter ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . RULE_ELEMENT : { RuleElement ruleElement = ( RuleElement ) theEObject ; T result = caseRuleElement ( ruleElement ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . EXPRESSION : { Expression expression = ( Expression ) theEObject ; T result = caseExpression ( expression ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . REFERENCE_OR_LITERAL : { ReferenceOrLiteral referenceOrLiteral = ( ReferenceOrLiteral ) theEObject ; T result = caseReferenceOrLiteral ( referenceOrLiteral ) ; if ( result == null ) result = caseExpression ( referenceOrLiteral ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . PREDICATED : { Predicated predicated = ( Predicated ) theEObject ; T result = casePredicated ( predicated ) ; if ( result == null ) result = caseRuleElement ( predicated ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . RULE_OPTIONS : { RuleOptions ruleOptions = ( RuleOptions ) theEObject ; T result = caseRuleOptions ( ruleOptions ) ; if ( result == null ) result = caseRuleElement ( ruleOptions ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . RULE_CALL : { RuleCall ruleCall = ( RuleCall ) theEObject ; T result = caseRuleCall ( ruleCall ) ; if ( result == null ) result = caseRuleElement ( ruleCall ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . KEYWORD : { Keyword keyword = ( Keyword ) theEObject ; T result = caseKeyword ( keyword ) ; if ( result == null ) result = caseRuleElement ( keyword ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . WILDCARD : { Wildcard wildcard = ( Wildcard ) theEObject ; T result = caseWildcard ( wildcard ) ; if ( result == null ) result = caseRuleElement ( wildcard ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . ALTERNATIVES : { Alternatives alternatives = ( Alternatives ) theEObject ; T result = caseAlternatives ( alternatives ) ; if ( result == null ) result = caseRuleElement ( alternatives ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . GROUP : { Group group = ( Group ) theEObject ; T result = caseGroup ( group ) ; if ( result == null ) result = caseRuleElement ( group ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . ELEMENT_WITH_CARDINALITY : { ElementWithCardinality elementWithCardinality = ( ElementWithCardinality ) theEObject ; T result = caseElementWithCardinality ( elementWithCardinality ) ; if ( result == null ) result = caseRuleElement ( elementWithCardinality ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . NEGATED_ELEMENT : { NegatedElement negatedElement = ( NegatedElement ) theEObject ; T result = caseNegatedElement ( negatedElement ) ; if ( result == null ) result = caseRuleElement ( negatedElement ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . UNTIL_ELEMENT : { UntilElement untilElement = ( UntilElement ) theEObject ; T result = caseUntilElement ( untilElement ) ; if ( result == null ) result = caseRuleElement ( untilElement ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . OR_EXPRESSION : { OrExpression orExpression = ( OrExpression ) theEObject ; T result = caseOrExpression ( orExpression ) ; if ( result == null ) result = caseExpression ( orExpression ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . AND_EXPRESSION : { AndExpression andExpression = ( AndExpression ) theEObject ; T result = caseAndExpression ( andExpression ) ; if ( result == null ) result = caseExpression ( andExpression ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . NOT_EXPRESSION : { NotExpression notExpression = ( NotExpression ) theEObject ; T result = caseNotExpression ( notExpression ) ; if ( result == null ) result = caseExpression ( notExpression ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } case SimpleAntlrPackage . SKIP : { Skip skip = ( Skip ) theEObject ; T result = caseSkip ( skip ) ; if ( result == null ) result = caseRuleOptions ( skip ) ; if ( result == null ) result = caseRuleElement ( skip ) ; if ( result == null ) result = defaultCase ( theEObject ) ; return result ; } default : return defaultCase ( theEObject ) ; }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.