signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class StringPath { /** * Method to construct the equals expression for string
* @ param value the string value
* @ return Expression */
public Expression < String > eq ( String value ) { } } | String valueString = "'" + value + "'" ; return new Expression < String > ( this , Operation . eq , valueString ) ; |
public class HttpCallUtils { /** * Sends a string to a URL . This is very helpful when SOAP web services are
* involved or you just want to post a XML message to a URL . If the
* connection requires basic authentication you can set the user name and
* password .
* @ param urlString
* the URL to post to
* @ param fileToBeSent
* the file to be sent
* @ param userName
* the username that will be used for Basic Auth
* @ param userPassword
* the password that will be used for Basic Auth
* @ param fileEncoding
* the file encoding . Examples : " UTF - 8 " , " UTF - 16 " . the username
* password that will be used for Basic Authentication
* @ return a { @ link HttpResponse } object containing the response code and
* the response string
* @ throws IOException
* if a I / O error occurs */
public HttpResponse doHttpCall ( final String urlString , final File fileToBeSent , final String userName , final String userPassword , final String fileEncoding ) throws IOException { } } | return this . doHttpCall ( urlString , fileUtil . getFileContentsAsString ( fileToBeSent , fileEncoding ) , userName , userPassword , "" , 0 , Collections . < String , String > emptyMap ( ) ) ; |
public class FischerRecognition { /** * Arrange the bonds adjacent to an atom ( focus ) in cardinal direction . The
* cardinal directions are that of a compass . Bonds are checked as to
* whether they are horizontal or vertical within a predefined threshold .
* @ param focus an atom
* @ param bonds bonds adjacent to the atom
* @ return array of bonds organised ( N , E , S , W ) , or null if a bond was found
* that exceeded the threshold */
static IBond [ ] cardinalBonds ( IAtom focus , IBond [ ] bonds ) { } } | final Point2d centerXy = focus . getPoint2d ( ) ; final IBond [ ] cardinal = new IBond [ 4 ] ; for ( final IBond bond : bonds ) { IAtom other = bond . getOther ( focus ) ; Point2d otherXy = other . getPoint2d ( ) ; double deltaX = otherXy . x - centerXy . x ; double deltaY = otherXy . y - centerXy . y ; // normalise vector length so thresholds are independent
double mag = Math . sqrt ( deltaX * deltaX + deltaY * deltaY ) ; deltaX /= mag ; deltaY /= mag ; double absDeltaX = Math . abs ( deltaX ) ; double absDeltaY = Math . abs ( deltaY ) ; // assign the bond to the cardinal direction
if ( absDeltaX < CARDINALITY_THRESHOLD && absDeltaY > CARDINALITY_THRESHOLD ) { cardinal [ deltaY > 0 ? NORTH : SOUTH ] = bond ; } else if ( absDeltaX > CARDINALITY_THRESHOLD && absDeltaY < CARDINALITY_THRESHOLD ) { cardinal [ deltaX > 0 ? EAST : WEST ] = bond ; } else { return null ; } } return cardinal ; |
public class GpsTracesDao { /** * Upload a new trace with no tags
* @ see # create ( String , GpsTraceDetails . Visibility , String , List , Iterable ) */
public long create ( String name , GpsTraceDetails . Visibility visibility , String description , final Iterable < GpsTrackpoint > trackpoints ) { } } | return create ( name , visibility , description , null , trackpoints ) ; |
public class AnnotationIndexProcessor { /** * Process this deployment for annotations . This will use an annotation indexer to create an index of all annotations
* found in this deployment and attach it to the deployment unit context .
* @ param phaseContext the deployment unit context
* @ throws DeploymentUnitProcessingException */
public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } } | final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; for ( ResourceRoot resourceRoot : DeploymentUtils . allResourceRoots ( deploymentUnit ) ) { ResourceRootIndexer . indexResourceRoot ( resourceRoot ) ; } |
public class LocalDateCalculator { /** * Set the working week .
* @ param week the JodaWorkingWeek
* @ throws IllegalArgumentException if the week is not a JodaWorkingWeek . */
@ Override public DateCalculator < LocalDate > setWorkingWeek ( final WorkingWeek week ) { } } | if ( week instanceof Jdk8WorkingWeek ) { workingWeek = ( Jdk8WorkingWeek ) week ; return this ; } throw new IllegalArgumentException ( "Please give an instance of JodaWorkingWeek" ) ; |
public class ForeignKey { /** * Otherwise , it is a 1-1 relationship . */
public String getTableAMultiplicity ( ) { } } | String ret = "many" ; List < ColumnInfo > tableAPKs = tableA . getPkList ( ) ; if ( tableAPKs . size ( ) == 0 || tableA . getTableName ( ) . equals ( tableB . getTableName ( ) ) ) { return ret ; } if ( tableAB == null ) { List < ColumnInfo > fkColumns = this . getColumns ( ) ; Set < ColumnInfo > columnSet = new HashSet < ColumnInfo > ( ) ; columnSet . addAll ( fkColumns ) ; columnSet . removeAll ( tableAPKs ) ; if ( fkColumns . size ( ) == tableAPKs . size ( ) && columnSet . isEmpty ( ) ) { ret = "one" ; return ret ; } } for ( ForeignKey tableBFK : tableB . getForeignKeys ( ) . values ( ) ) { if ( ! tableBFK . getTableB ( ) . getTableName ( ) . equals ( tableA . getTableName ( ) ) ) continue ; List < ColumnInfo > tableBRefCols = tableBFK . getRefColumns ( ) ; Set < ColumnInfo > columns = new HashSet < ColumnInfo > ( ) ; columns . addAll ( tableBRefCols ) ; columns . removeAll ( tableAPKs ) ; if ( columns . isEmpty ( ) ) { ret = "one" ; break ; } } return ret ; |
public class StructrSessionDataStore { /** * - - - - - private methods - - - - - */
private void assertInitialized ( ) { } } | if ( ! services . isShuttingDown ( ) && ! services . isShutdownDone ( ) ) { // wait for service layer to be initialized
while ( ! services . isInitialized ( ) ) { try { Thread . sleep ( 1000 ) ; } catch ( Throwable t ) { } } } |
public class AbstractFileInfo { /** * Returns the root path which is either the absolute path or ( if any directory is set and { @ link # getSetRootPath ( ) } returns not null ) the path to the set - as - root path
* @ return absolute or prefix path for the set - as - root path if the file info object is valid and a relative path was given to a constructor as directory , null otherwise */
public String getRootPath ( ) { } } | if ( this . isValid ( ) && this . setRootPath != null ) { return StringUtils . substringBefore ( this . getAbsolutePath ( ) , this . setRootPath ) ; } return null ; |
public class MetricUtils { /** * print default value for all metrics , in the format of : name | type | value */
public static void logMetrics ( MetricInfo metricInfo ) { } } | Map < String , Map < Integer , MetricSnapshot > > metrics = metricInfo . get_metrics ( ) ; if ( metrics != null ) { LOG . info ( "\nprint metrics:" ) ; for ( Map . Entry < String , Map < Integer , MetricSnapshot > > entry : metrics . entrySet ( ) ) { String name = entry . getKey ( ) ; MetricSnapshot metricSnapshot = entry . getValue ( ) . get ( AsmWindow . M1_WINDOW ) ; if ( metricSnapshot != null ) { MetricType metricType = MetricType . parse ( metricSnapshot . get_metricType ( ) ) ; double v ; if ( metricType == MetricType . COUNTER ) { v = metricSnapshot . get_longValue ( ) ; } else if ( metricType == MetricType . GAUGE ) { v = metricSnapshot . get_doubleValue ( ) ; } else if ( metricType == MetricType . METER ) { v = metricSnapshot . get_m1 ( ) ; } else if ( metricType == MetricType . HISTOGRAM ) { v = metricSnapshot . get_mean ( ) ; } else { v = 0 ; } LOG . info ( "{}|{}|{}" , metricType , v , name ) ; } } LOG . info ( "\n" ) ; } |
public class CpnlElFunctions { /** * Returns the repository path of a child of a resource .
* @ param base the parent resource object
* @ param path the relative path to the child resource
* @ return the absolute path of the child if found , otherwise the original path value */
public static String child ( Resource base , String path ) { } } | Resource child = base . getChild ( path ) ; return child != null ? child . getPath ( ) : path ; |
public class RegistriesInner { /** * Lists the policies for the specified container registry .
* @ param resourceGroupName The name of the resource group to which the container registry belongs .
* @ param registryName The name of the container registry .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the RegistryPoliciesInner object */
public Observable < RegistryPoliciesInner > listPoliciesAsync ( String resourceGroupName , String registryName ) { } } | return listPoliciesWithServiceResponseAsync ( resourceGroupName , registryName ) . map ( new Func1 < ServiceResponse < RegistryPoliciesInner > , RegistryPoliciesInner > ( ) { @ Override public RegistryPoliciesInner call ( ServiceResponse < RegistryPoliciesInner > response ) { return response . body ( ) ; } } ) ; |
public class Interval { /** * Converts the interval to an Integer array */
public int [ ] toIntArray ( ) { } } | final int [ ] result = new int [ this . size ( ) ] ; this . forEachWithIndex ( new IntIntProcedure ( ) { public void value ( int each , int index ) { result [ index ] = each ; } } ) ; return result ; |
public class JPAPersistenceManagerImpl { /** * Creates a PersistenceServiceUnit using the specified entity versions . */
private PersistenceServiceUnit createPsu ( int jobInstanceVersion , int jobExecutionVersion ) throws Exception { } } | return databaseStore . createPersistenceServiceUnit ( getJobInstanceEntityClass ( jobInstanceVersion ) . getClassLoader ( ) , getJobExecutionEntityClass ( jobExecutionVersion ) . getName ( ) , getJobInstanceEntityClass ( jobInstanceVersion ) . getName ( ) , StepThreadExecutionEntity . class . getName ( ) , StepThreadInstanceEntity . class . getName ( ) , TopLevelStepExecutionEntity . class . getName ( ) , TopLevelStepInstanceEntity . class . getName ( ) ) ; |
public class ConcurrentBag { /** * Get a count of the number of items in the specified state at the time of this call .
* @ param state the state of the items to count
* @ return a count of how many items in the bag are in the specified state */
public int getCount ( final int state ) { } } | int count = 0 ; for ( IConcurrentBagEntry e : sharedList ) { if ( e . getState ( ) == state ) { count ++ ; } } return count ; |
public class StreamMessageImpl { /** * ( non - Javadoc )
* @ see javax . jms . Message # clearBody ( ) */
@ Override public void clearBody ( ) { } } | assertDeserializationLevel ( MessageSerializationLevel . FULL ) ; bodyIsReadOnly = false ; body . clear ( ) ; readPos = 0 ; currentByteInputStream = null ; |
public class FLUSH { /** * Returns a digest which contains , for all members of view , the highest delivered and received
* seqno of all digests */
protected static Digest maxSeqnos ( final View view , List < Digest > digests ) { } } | if ( view == null || digests == null ) return null ; MutableDigest digest = new MutableDigest ( view . getMembersRaw ( ) ) ; digests . forEach ( digest :: merge ) ; return digest ; |
public class QueueBasedSubscriber { /** * / * ( non - Javadoc )
* @ see org . reactivestreams . Subscriber # onComplete ( ) */
@ Override public void onComplete ( ) { } } | counter . active . decrementAndGet ( ) ; counter . subscription . removeValue ( subscription ) ; if ( queue != null && counter . active . get ( ) == 0 ) { if ( counter . completable ) { if ( counter . closing . compareAndSet ( false , true ) ) { counter . closed = true ; queue . addContinuation ( new Continuation ( ( ) -> { final List current = new ArrayList ( ) ; while ( queue . size ( ) > 0 ) { try { current . add ( queue . get ( ) ) ; } catch ( ClosedQueueException e ) { break ; } } throw new ClosedQueueException ( current ) ; } ) ) ; queue . close ( ) ; } } } |
public class Http2ReceiveListener { /** * Performs HTTP2 specification compliance check for headers and pseudo - headers of a current request .
* @ param headers map of the request headers
* @ return true if check was successful , false otherwise */
private boolean checkRequestHeaders ( HeaderMap headers ) { } } | // : method pseudo - header must be present always exactly one time ;
// HTTP2 request MUST NOT contain ' connection ' header
if ( headers . count ( METHOD ) != 1 || headers . contains ( Headers . CONNECTION ) ) { return false ; } // if CONNECT type is used , then we expect : method and : authority to be present only ;
// : scheme and : path must not be present
if ( headers . get ( METHOD ) . contains ( Methods . CONNECT_STRING ) ) { if ( headers . contains ( SCHEME ) || headers . contains ( PATH ) || headers . count ( AUTHORITY ) != 1 ) { return false ; } // For other HTTP methods we expect that : scheme , : method , and : path pseudo - headers are
// present exactly one time .
} else if ( headers . count ( SCHEME ) != 1 || headers . count ( PATH ) != 1 ) { return false ; } // HTTP2 request MAY contain TE header but if so , then only with ' trailers ' value .
if ( headers . contains ( Headers . TE ) ) { for ( String value : headers . get ( Headers . TE ) ) { if ( ! value . equals ( "trailers" ) ) { return false ; } } } return true ; |
public class DiskTypeClient { /** * Retrieves an aggregated list of disk types .
* < p > Sample code :
* < pre > < code >
* try ( DiskTypeClient diskTypeClient = DiskTypeClient . create ( ) ) {
* ProjectName project = ProjectName . of ( " [ PROJECT ] " ) ;
* for ( DiskTypesScopedList element : diskTypeClient . aggregatedListDiskTypes ( project . toString ( ) ) . iterateAll ( ) ) {
* / / doThingsWith ( element ) ;
* < / code > < / pre >
* @ param project Project ID for this request .
* @ throws com . google . api . gax . rpc . ApiException if the remote call fails */
@ BetaApi public final AggregatedListDiskTypesPagedResponse aggregatedListDiskTypes ( String project ) { } } | AggregatedListDiskTypesHttpRequest request = AggregatedListDiskTypesHttpRequest . newBuilder ( ) . setProject ( project ) . build ( ) ; return aggregatedListDiskTypes ( request ) ; |
public class DisassociateDeviceFromRoomRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( DisassociateDeviceFromRoomRequest disassociateDeviceFromRoomRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( disassociateDeviceFromRoomRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( disassociateDeviceFromRoomRequest . getDeviceArn ( ) , DEVICEARN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; } |
public class UIResults { /** * Extract an Exception UIResults from the HttpServletRequest . Probably used
* by a . jsp responsible for actual drawing errors for the user . private
* @ param httpRequest the HttpServletRequest where the UIResults was
* ferreted away
* @ return Exception UIResult with info from httpRequest applied .
* @ throws ServletException if expected information is not available . Likely
* means a programming bug , or a configuration problem . */
public static UIResults extractException ( HttpServletRequest httpRequest ) throws ServletException { } } | UIResults results = ( UIResults ) httpRequest . getAttribute ( FERRET_NAME ) ; if ( results == null ) { throw new ServletException ( "No attribute.." ) ; } if ( results . exception == null ) { throw new ServletException ( "No WaybackException.." ) ; } if ( results . wbRequest == null ) { throw new ServletException ( "No WaybackRequest.." ) ; } if ( results . uriConverter == null ) { throw new ServletException ( "No ResultURIConverter.." ) ; } return results ; |
public class LineManager { /** * Create a list of lines on the map .
* Lines are going to be created only for features with a matching geometry .
* All supported properties are : < br >
* LineOptions . PROPERTY _ LINE _ JOIN - String < br >
* LineOptions . PROPERTY _ LINE _ OPACITY - Float < br >
* LineOptions . PROPERTY _ LINE _ COLOR - String < br >
* LineOptions . PROPERTY _ LINE _ WIDTH - Float < br >
* LineOptions . PROPERTY _ LINE _ GAP _ WIDTH - Float < br >
* LineOptions . PROPERTY _ LINE _ OFFSET - Float < br >
* LineOptions . PROPERTY _ LINE _ BLUR - Float < br >
* LineOptions . PROPERTY _ LINE _ PATTERN - String < br >
* Learn more about above properties in the < a href = " https : / / www . mapbox . com / mapbox - gl - js / style - spec / " > Style specification < / a > .
* Out of spec properties : < br >
* " is - draggable " - Boolean , true if the line should be draggable , false otherwise
* @ param featureCollection the featureCollection defining the list of lines to build
* @ return the list of built lines */
@ UiThread public List < Line > create ( @ NonNull FeatureCollection featureCollection ) { } } | List < Feature > features = featureCollection . features ( ) ; List < LineOptions > options = new ArrayList < > ( ) ; if ( features != null ) { for ( Feature feature : features ) { LineOptions option = LineOptions . fromFeature ( feature ) ; if ( option != null ) { options . add ( option ) ; } } } return create ( options ) ; |
public class TranslatedPersonDictionary { /** * 时报包含key , 且key至少长length
* @ param key
* @ param length
* @ return */
public static boolean containsKey ( String key , int length ) { } } | if ( ! trie . containsKey ( key ) ) return false ; return key . length ( ) >= length ; |
public class ErrorReporter { /** * Issue a compilation note .
* @ param msg the text of the note
* @ param e the element to which it pertains */
void reportNote ( String msg , Element e ) { } } | messager . printMessage ( Diagnostic . Kind . NOTE , msg , e ) ; |
public class GroupByScan { /** * Moves to the next group . The key of the group is determined by the group
* values at the current record . The method repeatedly reads underlying
* records until it encounters a record having a different key . The
* aggregation functions are called for each record in the group . The values
* of the grouping fields for the group are saved .
* @ see Scan # next ( ) */
@ Override public boolean next ( ) { } } | if ( ! moreGroups ) return false ; if ( aggFns != null ) for ( AggregationFn fn : aggFns ) fn . processFirst ( ss ) ; groupVal = new GroupValue ( ss , groupFlds ) ; while ( moreGroups = ss . next ( ) ) { GroupValue gv = new GroupValue ( ss , groupFlds ) ; if ( ! groupVal . equals ( gv ) ) break ; if ( aggFns != null ) for ( AggregationFn fn : aggFns ) fn . processNext ( ss ) ; } return true ; |
public class SqlBuilder { /** * 构造一个删除SQL
* @ param activeRecord ActiveRecord
* @ return 返回QueryMeta对象 */
static QueryMeta buildDeleteSql ( ActiveRecord activeRecord ) { } } | QueryMeta queryMeta = new QueryMeta ( ) ; StringBuilder sqlBuf = new StringBuilder ( "DELETE FROM " + activeRecord . getTableName ( ) ) ; int [ ] pos = { 1 } ; List < Object > list = parseWhere ( activeRecord , pos , sqlBuf ) ; if ( activeRecord . whereValues . isEmpty ( ) ) { throw new RuntimeException ( "Delete operation must take conditions." ) ; } else { if ( sqlBuf . indexOf ( Const . SPACE + Const . SQL_WHERE + Const . SPACE ) == - 1 ) { sqlBuf . append ( Const . SPACE + Const . SQL_WHERE + Const . SPACE ) ; } } List < Object > temp = andWhere ( activeRecord , pos , sqlBuf ) ; if ( null != temp ) { list . addAll ( temp ) ; } String sql = sqlBuf . toString ( ) ; sql = sql . replace ( ", WHERE" , " WHERE" ) . replace ( "AND OR" , "OR" ) ; if ( sql . endsWith ( Const . SQL_AND + Const . SPACE ) ) { sql = sql . substring ( 0 , sql . length ( ) - 5 ) ; } Object [ ] args = list . toArray ( ) ; queryMeta . setSql ( sql ) ; queryMeta . setParams ( args ) ; return queryMeta ; |
public class CommerceNotificationTemplateUserSegmentRelPersistenceImpl { /** * Returns the first commerce notification template user segment rel in the ordered set where commerceNotificationTemplateId = & # 63 ; .
* @ param commerceNotificationTemplateId the commerce notification template ID
* @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > )
* @ return the first matching commerce notification template user segment rel
* @ throws NoSuchNotificationTemplateUserSegmentRelException if a matching commerce notification template user segment rel could not be found */
@ Override public CommerceNotificationTemplateUserSegmentRel findByCommerceNotificationTemplateId_First ( long commerceNotificationTemplateId , OrderByComparator < CommerceNotificationTemplateUserSegmentRel > orderByComparator ) throws NoSuchNotificationTemplateUserSegmentRelException { } } | CommerceNotificationTemplateUserSegmentRel commerceNotificationTemplateUserSegmentRel = fetchByCommerceNotificationTemplateId_First ( commerceNotificationTemplateId , orderByComparator ) ; if ( commerceNotificationTemplateUserSegmentRel != null ) { return commerceNotificationTemplateUserSegmentRel ; } StringBundler msg = new StringBundler ( 4 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "commerceNotificationTemplateId=" ) ; msg . append ( commerceNotificationTemplateId ) ; msg . append ( "}" ) ; throw new NoSuchNotificationTemplateUserSegmentRelException ( msg . toString ( ) ) ; |
public class AbstractJSBlock { /** * Create a label , which can be referenced from < code > continue < / code > and
* < code > break < / code > statements .
* @ param sName
* name
* @ return this */
@ Nonnull public JSLabel label ( @ Nonnull @ Nonempty final String sName ) { } } | return addStatement ( new JSLabel ( sName ) ) ; |
public class Math { /** * Returns the smaller of two { @ code double } values . That
* is , the result is the value closer to negative infinity . If the
* arguments have the same value , the result is that same
* value . If either value is NaN , then the result is NaN . Unlike
* the numerical comparison operators , this method considers
* negative zero to be strictly smaller than positive zero . If one
* argument is positive zero and the other is negative zero , the
* result is negative zero .
* @ param a an argument .
* @ param b another argument .
* @ return the smaller of { @ code a } and { @ code b } . */
public static double min ( double a , double b ) { } } | if ( a != a ) return a ; // a is NaN
if ( ( a == 0.0d ) && ( b == 0.0d ) && ( Double . doubleToRawLongBits ( b ) == negativeZeroDoubleBits ) ) { // Raw conversion ok since NaN can ' t map to - 0.0.
return b ; } return ( a <= b ) ? a : b ; |
public class AccountFiltersInner { /** * Create or update an Account Filter .
* Creates or updates an Account Filter in the Media Services account .
* @ param resourceGroupName The name of the resource group within the Azure subscription .
* @ param accountName The Media Services account name .
* @ param filterName The Account Filter name
* @ param parameters The request parameters
* @ param serviceCallback the async ServiceCallback to handle successful and failed responses .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the { @ link ServiceFuture } object */
public ServiceFuture < AccountFilterInner > createOrUpdateAsync ( String resourceGroupName , String accountName , String filterName , AccountFilterInner parameters , final ServiceCallback < AccountFilterInner > serviceCallback ) { } } | return ServiceFuture . fromResponse ( createOrUpdateWithServiceResponseAsync ( resourceGroupName , accountName , filterName , parameters ) , serviceCallback ) ; |
public class CommerceAccountOrganizationRelUtil { /** * Returns the first commerce account organization rel in the ordered set where commerceAccountId = & # 63 ; .
* @ param commerceAccountId the commerce account ID
* @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > )
* @ return the first matching commerce account organization rel
* @ throws NoSuchAccountOrganizationRelException if a matching commerce account organization rel could not be found */
public static CommerceAccountOrganizationRel findByCommerceAccountId_First ( long commerceAccountId , OrderByComparator < CommerceAccountOrganizationRel > orderByComparator ) throws com . liferay . commerce . account . exception . NoSuchAccountOrganizationRelException { } } | return getPersistence ( ) . findByCommerceAccountId_First ( commerceAccountId , orderByComparator ) ; |
public class GoogleHadoopFileSystemBase { /** * Opens the given file for reading .
* < p > Note : This function overrides the given bufferSize value with a higher number unless further
* overridden using configuration parameter { @ code fs . gs . inputstream . buffer . size } .
* @ param hadoopPath File to open .
* @ param bufferSize Size of buffer to use for IO .
* @ return A readable stream .
* @ throws FileNotFoundException if the given path does not exist .
* @ throws IOException if an error occurs . */
@ Override public FSDataInputStream open ( Path hadoopPath , int bufferSize ) throws IOException { } } | long startTime = System . nanoTime ( ) ; Preconditions . checkArgument ( hadoopPath != null , "hadoopPath must not be null" ) ; checkOpen ( ) ; logger . atFine ( ) . log ( "GHFS.open: %s, bufferSize: %d (ignored)" , hadoopPath , bufferSize ) ; URI gcsPath = getGcsPath ( hadoopPath ) ; GoogleCloudStorageReadOptions readChannelOptions = getGcsFs ( ) . getOptions ( ) . getCloudStorageOptions ( ) . getReadChannelOptions ( ) ; GoogleHadoopFSInputStream in = new GoogleHadoopFSInputStream ( this , gcsPath , readChannelOptions , statistics ) ; long duration = System . nanoTime ( ) - startTime ; increment ( Counter . OPEN ) ; increment ( Counter . OPEN_TIME , duration ) ; return new FSDataInputStream ( in ) ; |
public class WorkWrapper { /** * Calls listener after work context is setted up .
* @ param listener work context listener */
private void fireWorkContextSetupComplete ( Object workContext ) { } } | if ( workContext != null && workContext instanceof WorkContextLifecycleListener ) { if ( trace ) log . tracef ( "WorkContextSetupComplete(%s) for %s" , workContext , this ) ; WorkContextLifecycleListener listener = ( WorkContextLifecycleListener ) workContext ; listener . contextSetupComplete ( ) ; } |
public class DefaultLogWatch { /** * Notify { @ link MessageConsumer } s of a message that is
* { @ link MessageDeliveryStatus # INCOMING } .
* @ param message
* The message in question .
* @ return True if the message was passed to { @ link MessageConsumer } s , false
* if stopped at the gate by
* { @ link LogWatchBuilder # getGateCondition ( ) } . */
public boolean messageIncoming ( final Message message ) { } } | if ( ! this . hasToLetMessageThroughTheGate ( message ) ) { return false ; } this . consumers . messageReceived ( message , MessageDeliveryStatus . INCOMING , this ) ; return true ; |
public class ChannelBuffer { /** * Returns a promise of the { @ code head } index of
* the { @ code buffer } if it is not empty .
* If this buffer will be exhausted after this
* take and { @ code put } promise is not { @ code null } ,
* { @ code put } will be set { @ code null } after the poll .
* Current { @ code take } must be { @ code null } . If
* current { @ code exception } is not { @ code null } ,
* a promise of this exception will be returned .
* @ return promise of element taken from the buffer */
@ Override public Promise < T > take ( ) { } } | assert take == null ; if ( exception == null ) { if ( put != null && willBeExhausted ( ) ) { assert ! isEmpty ( ) ; T item = doPoll ( ) ; SettablePromise < Void > put = this . put ; this . put = null ; put . set ( null ) ; return Promise . of ( item ) ; } if ( ! isEmpty ( ) ) { return Promise . of ( doPoll ( ) ) ; } take = new SettablePromise < > ( ) ; return take ; } else { return Promise . ofException ( exception ) ; } |
public class ListDeploymentsResult { /** * A list of deployments for the requested groups .
* @ param deployments
* A list of deployments for the requested groups . */
public void setDeployments ( java . util . Collection < Deployment > deployments ) { } } | if ( deployments == null ) { this . deployments = null ; return ; } this . deployments = new java . util . ArrayList < Deployment > ( deployments ) ; |
public class FileUtils { /** * Read the last few lines of a file
* @ param file the source file
* @ param lines the number of lines to read
* @ return the String result */
public static String tail2 ( File file , int lines ) { } } | lines ++ ; // Read # lines inclusive
java . io . RandomAccessFile fileHandler = null ; try { fileHandler = new java . io . RandomAccessFile ( file , "r" ) ; long fileLength = fileHandler . length ( ) - 1 ; StringBuilder sb = new StringBuilder ( ) ; int line = 0 ; for ( long filePointer = fileLength ; filePointer != - 1 ; filePointer -- ) { fileHandler . seek ( filePointer ) ; int readByte = fileHandler . readByte ( ) ; if ( readByte == 0xA ) { line = line + 1 ; if ( line == lines ) { if ( filePointer == fileLength - 1 ) { continue ; } else { break ; } } } sb . append ( ( char ) readByte ) ; } String lastLine = sb . reverse ( ) . toString ( ) ; return lastLine ; } catch ( java . io . FileNotFoundException e ) { e . printStackTrace ( ) ; return null ; } catch ( java . io . IOException e ) { e . printStackTrace ( ) ; return null ; } finally { if ( fileHandler != null ) try { fileHandler . close ( ) ; } catch ( IOException e ) { /* ignore */
} } |
public class ConfigurationModule { /** * Convert Configuration to a list of strings formatted as " param = value " .
* @ param c
* @ return */
private static List < String > toConfigurationStringList ( final Configuration c ) { } } | final ConfigurationImpl conf = ( ConfigurationImpl ) c ; final List < String > l = new ArrayList < > ( ) ; for ( final ClassNode < ? > opt : conf . getBoundImplementations ( ) ) { l . add ( opt . getFullName ( ) + '=' + escape ( conf . getBoundImplementation ( opt ) . getFullName ( ) ) ) ; } for ( final ClassNode < ? > opt : conf . getBoundConstructors ( ) ) { l . add ( opt . getFullName ( ) + '=' + escape ( conf . getBoundConstructor ( opt ) . getFullName ( ) ) ) ; } for ( final NamedParameterNode < ? > opt : conf . getNamedParameters ( ) ) { l . add ( opt . getFullName ( ) + '=' + escape ( conf . getNamedParameter ( opt ) ) ) ; } for ( final ClassNode < ? > cn : conf . getLegacyConstructors ( ) ) { final StringBuilder sb = new StringBuilder ( ) ; join ( sb , "-" , conf . getLegacyConstructor ( cn ) . getArgs ( ) ) ; l . add ( cn . getFullName ( ) + escape ( '=' + ConfigurationBuilderImpl . INIT + '(' + sb . toString ( ) + ')' ) ) ; } for ( final NamedParameterNode < Set < ? > > key : conf . getBoundSets ( ) ) { for ( final Object value : conf . getBoundSet ( key ) ) { final String val ; if ( value instanceof String ) { val = ( String ) value ; } else if ( value instanceof Node ) { val = ( ( Node ) value ) . getFullName ( ) ; } else { throw new IllegalStateException ( "The value bound to a given NamedParameterNode " + key + " is neither the set of class hierarchy nodes nor strings." ) ; } l . add ( key . getFullName ( ) + '=' + escape ( val ) ) ; } } return l ; |
public class JDBC4DatabaseMetaData { /** * Retrieves the catalog names available in this database . */
@ Override public ResultSet getCatalogs ( ) throws SQLException { } } | checkClosed ( ) ; VoltTable result = new VoltTable ( new VoltTable . ColumnInfo ( "TABLE_CAT" , VoltType . STRING ) ) ; result . addRow ( new Object [ ] { catalogString } ) ; return new JDBC4ResultSet ( null , result ) ; |
public class ItemResponseMarshaller { /** * Marshall the given parameter object . */
public void marshall ( ItemResponse itemResponse , ProtocolMarshaller protocolMarshaller ) { } } | if ( itemResponse == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( itemResponse . getItem ( ) , ITEM_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; } |
public class EnrollmentRequest { /** * Convert the enrollment request to a JSON object */
private JsonObject toJsonObject ( ) { } } | JsonObjectBuilder factory = Json . createObjectBuilder ( ) ; if ( profile != null ) { factory . add ( "profile" , profile ) ; } if ( ! hosts . isEmpty ( ) ) { JsonArrayBuilder ab = Json . createArrayBuilder ( ) ; for ( String host : hosts ) { ab . add ( host ) ; } factory . add ( "hosts" , ab . build ( ) ) ; } if ( label != null ) { factory . add ( "label" , label ) ; } if ( caName != null ) { factory . add ( HFCAClient . FABRIC_CA_REQPROP , caName ) ; } factory . add ( "certificate_request" , csr ) ; if ( attrreqs != null ) { JsonArrayBuilder ab = Json . createArrayBuilder ( ) ; for ( AttrReq attrReq : attrreqs . values ( ) ) { JsonObjectBuilder i = Json . createObjectBuilder ( ) ; i . add ( "name" , attrReq . name ) ; if ( attrReq . optional != null ) { i . add ( "optional" , attrReq . optional ) ; } ab . add ( i ) ; } factory . add ( "attr_reqs" , ab . build ( ) ) ; } return factory . build ( ) ; |
public class TorrentHandle { /** * The name of the torrent . Typically this is derived from the
* . torrent file . In case the torrent was started without metadata ,
* and hasn ' t completely received it yet , it returns the name given
* to it when added to the session .
* @ return the name */
public String name ( ) { } } | torrent_status ts = th . status ( torrent_handle . query_name ) ; return ts . getName ( ) ; |
public class StoredProcedureInvocation { /** * Hack for SyncSnapshotBuffer . Note that this is using the ORIGINAL ( version 0 ) serialization format .
* Moved to this file from that one so you might see it sooner than I did .
* If you change the serialization , you have to change this too . */
public static int getLoadVoltTablesMagicSeriazlizedSize ( Table catTable , boolean isPartitioned ) { } } | // code below is used to compute the right value slowly
/* StoredProcedureInvocation spi = new StoredProcedureInvocation ( ) ;
spi . setProcName ( " @ LoadVoltTableSP " ) ;
if ( isPartitioned ) {
spi . setParams ( 0 , catTable . getTypeName ( ) , null ) ;
else {
spi . setParams ( 0 , catTable . getTypeName ( ) , null ) ;
int size = spi . getSerializedSizeForOriginalVersion ( ) + 4;
int realSize = size - catTable . getTypeName ( ) . getBytes ( Constants . UTF8ENCODING ) . length ;
System . err . printf ( " @ LoadVoltTable * * padding size : % d or % d \ n " , size , realSize ) ;
return size ; */
// Magic size of @ LoadVoltTable * StoredProcedureInvocation
int tableNameLengthInBytes = catTable . getTypeName ( ) . getBytes ( Constants . UTF8ENCODING ) . length ; int metadataSize = 41 + // serialized size for original version
tableNameLengthInBytes ; if ( isPartitioned ) { metadataSize += 5 ; } return metadataSize ; |
public class HivePurgerQueryTemplate { /** * Will return all the queries needed to have a backup table partition pointing to the original partition data location */
public static List < String > getBackupQueries ( PurgeableHivePartitionDataset dataset ) { } } | List < String > queries = new ArrayList < > ( ) ; queries . add ( getUseDbQuery ( dataset . getDbName ( ) ) ) ; queries . add ( getCreateTableQuery ( dataset . getCompleteBackupTableName ( ) , dataset . getDbName ( ) , dataset . getTableName ( ) , dataset . getBackupTableLocation ( ) ) ) ; Optional < String > fileFormat = Optional . absent ( ) ; if ( dataset . getSpecifyPartitionFormat ( ) ) { fileFormat = dataset . getFileFormat ( ) ; } queries . add ( getAddPartitionQuery ( dataset . getBackupTableName ( ) , PartitionUtils . getPartitionSpecString ( dataset . getSpec ( ) ) , fileFormat , Optional . fromNullable ( dataset . getOriginalPartitionLocation ( ) ) ) ) ; return queries ; |
public class CacheManagerBuilder { /** * Adds a { @ link OffHeapDiskStoreProviderConfiguration } , that specifies the thread pool to use , to the returned
* builder .
* @ param threadPoolAlias the thread pool alias
* @ return a new builder with the added configuration
* @ see PooledExecutionServiceConfigurationBuilder */
public CacheManagerBuilder < T > withDefaultDiskStoreThreadPool ( String threadPoolAlias ) { } } | OffHeapDiskStoreProviderConfiguration config = configBuilder . findServiceByClass ( OffHeapDiskStoreProviderConfiguration . class ) ; if ( config == null ) { return new CacheManagerBuilder < > ( this , configBuilder . addService ( new OffHeapDiskStoreProviderConfiguration ( threadPoolAlias ) ) ) ; } else { ConfigurationBuilder builder = configBuilder . removeService ( config ) ; return new CacheManagerBuilder < > ( this , builder . addService ( new OffHeapDiskStoreProviderConfiguration ( threadPoolAlias ) ) ) ; } |
public class NativeExecutionQueryImpl { /** * results / / / / / */
public List < Execution > executeList ( CommandContext commandContext , Map < String , Object > parameterMap , int firstResult , int maxResults ) { } } | return commandContext . getExecutionEntityManager ( ) . findExecutionsByNativeQuery ( parameterMap , firstResult , maxResults ) ; |
public class ResponseBuilder { /** * Build a { @ link Response } from the request , offset , limit , total and list of elements .
* @ param request The { @ link javax . servlet . http . HttpServletRequest } which was executed .
* @ param offset The offset of the results .
* @ param limit The maximum number of results .
* @ param total The total number of elements .
* @ param elements The list of elements .
* @ param < T > The type of elements in the list . This can be { @ link io . motown . chargingstationconfiguration . viewmodel . persistence . entities . ChargingStationType } or { @ link io . motown . chargingstationconfiguration . viewmodel . persistence . entities . Manufacturer } .
* @ return A Configuration Api response with the correct metadata .
* @ throws IllegalArgumentException when the { @ code offset } is negative , the { @ code limit } is lesser than or equal to 0 , the { @ code total } is negative and when { @ code offset } is lesser than the { @ code total } ( only if { @ code total } is greater than 0. */
public static < T > Response < T > buildResponse ( final HttpServletRequest request , final int offset , final int limit , final long total , final List < T > elements ) { } } | checkArgument ( offset >= 0 ) ; checkArgument ( limit >= 1 ) ; checkArgument ( total >= 0 ) ; checkArgument ( total == 0 || offset < total ) ; String requestUri = request . getRequestURI ( ) ; String queryString = request . getQueryString ( ) ; String href = requestUri + ( ! Strings . isNullOrEmpty ( queryString ) ? "?" + queryString : "" ) ; NavigationItem previous = new NavigationItem ( hasPreviousPage ( offset ) ? requestUri + String . format ( QUERY_STRING_FORMAT , getPreviousPageOffset ( offset , limit ) , limit ) : "" ) ; NavigationItem next = new NavigationItem ( hasNextPage ( offset , limit , total ) ? requestUri + String . format ( QUERY_STRING_FORMAT , getNextPageOffset ( offset , limit , total ) , limit ) : "" ) ; NavigationItem first = new NavigationItem ( requestUri + String . format ( QUERY_STRING_FORMAT , getFirstPageOffset ( ) , limit ) ) ; NavigationItem last = new NavigationItem ( requestUri + String . format ( QUERY_STRING_FORMAT , getLastPageOffset ( total , limit ) , limit ) ) ; return new Response < > ( href , previous , next , first , last , elements ) ; |
public class Util { /** * Obtain the match url given the query row and the kind of discovery
* we are carrying out
* @ param row the result from a SPARQL query
* @ param operationDiscovery true if we are doing operation discovery
* @ return the URL for the match result */
public static URL getMatchUrl ( QuerySolution row , boolean operationDiscovery ) { } } | // Check the input and return immediately if null
if ( row == null ) { return null ; } URL matchUrl ; if ( operationDiscovery ) { matchUrl = Util . getOperationUrl ( row ) ; } else { matchUrl = Util . getServiceUrl ( row ) ; } return matchUrl ; |
public class SeaGlassLookAndFeel { /** * Initialize the tool bar settings .
* @ param d the UI defaults map . */
private void defineToolBars ( UIDefaults d ) { } } | // Copied from nimbus
d . put ( "ToolBar.contentMargins" , new InsetsUIResource ( 2 , 2 , 2 , 2 ) ) ; d . put ( "ToolBar.opaque" , Boolean . TRUE ) ; d . put ( "ToolBar:Button.contentMargins" , new InsetsUIResource ( 4 , 4 , 4 , 4 ) ) ; d . put ( "ToolBar:ToggleButton.contentMargins" , new InsetsUIResource ( 4 , 4 , 4 , 4 ) ) ; addColor ( d , "ToolBar:ToggleButton[Disabled+Selected].textForeground" , "seaGlassDisabledText" , 0.0f , 0.0f , 0.0f , 0 ) ; // Initialize ToolBarSeparator
d . put ( "ToolBarSeparator.contentMargins" , new InsetsUIResource ( 2 , 0 , 3 , 0 ) ) ; addColor ( d , "ToolBarSeparator.textForeground" , "seaGlassBorder" , 0.0f , 0.0f , 0.0f , 0 ) ; // Below starts seaglass
d . put ( "toolbarHandleMac" , new Color ( 0xc8191919 , true ) ) ; // Rossi : Adjusted color for better look : Not tested with unified , . . .
d . put ( "toolbarToggleButtonBase" , new Color ( 0x5b7ea4 , true ) ) ; if ( ( ! PlatformUtils . isMac ( ) ) ) { d . put ( "seaGlassToolBarActiveTopT" , new Color ( 0x466c97 ) ) ; d . put ( "seaGlassToolBarActiveBottomB" , new Color ( 0x466c97 ) ) ; d . put ( "seaGlassToolBarInactiveTopT" , new Color ( 0xe9e9e9 ) ) ; d . put ( "seaGlassToolBarInactiveBottomB" , new Color ( 0xcacaca ) ) ; } else if ( PlatformUtils . isLion ( ) ) { d . put ( "seaGlassToolBarActiveTopT" , new Color ( 0xdedede ) ) ; d . put ( "seaGlassToolBarActiveBottomB" , new Color ( 0xb0b0b0 ) ) ; d . put ( "seaGlassToolBarInactiveTopT" , new Color ( 0xf3f3f3 ) ) ; d . put ( "seaGlassToolBarInactiveBottomB" , new Color ( 0xdedede ) ) ; } else if ( PlatformUtils . isSnowLeopard ( ) ) { d . put ( "seaGlassToolBarActiveTopT" , new Color ( 0xc9c9c9 ) ) ; d . put ( "seaGlassToolBarActiveBottomB" , new Color ( 0xa7a7a7 ) ) ; d . put ( "seaGlassToolBarInactiveTopT" , new Color ( 0xe9e9e9 ) ) ; d . put ( "seaGlassToolBarInactiveBottomB" , new Color ( 0xcacaca ) ) ; } else { d . put ( "seaGlassToolBarActiveTopT" , new Color ( 0xbcbcbc ) ) ; d . put ( "seaGlassToolBarActiveBottomB" , new Color ( 0xa7a7a7 ) ) ; d . put ( "seaGlassToolBarInactiveTopT" , new Color ( 0xe4e4e4 ) ) ; d . put ( "seaGlassToolBarInactiveBottomB" , new Color ( 0xd8d8d8 ) ) ; } String c = PAINTER_PREFIX + "ToolBarPainter" ; String p = "ToolBar" ; d . put ( p + ".contentMargins" , new InsetsUIResource ( 2 , 2 , 2 , 2 ) ) ; d . put ( p + ".opaque" , Boolean . TRUE ) ; d . put ( p + ".States" , "WindowIsActive" ) ; d . put ( p + ".WindowIsActive" , new ToolBarWindowIsActiveState ( ) ) ; d . put ( p + ".backgroundPainter" , new LazyPainter ( c , ToolBarPainter . Which . BORDER_ENABLED ) ) ; c = PAINTER_PREFIX + "ToolBarHandlePainter" ; d . put ( p + ".handleIconPainter" , new LazyPainter ( c , ToolBarHandlePainter . Which . HANDLEICON_ENABLED ) ) ; d . put ( p + ".handleIcon" , new SeaGlassIcon ( p , "handleIconPainter" , 11 , 38 ) ) ; c = PAINTER_PREFIX + "ButtonPainter" ; p = "ToolBar:Button" ; d . put ( p + ".States" , "Enabled,Disabled,Focused,Pressed" ) ; d . put ( p + "[Disabled].textForeground" , d . get ( "seaGlassToolBarDisabledText" ) ) ; d . put ( p + "[Disabled].backgroundPainter" , new LazyPainter ( c , ButtonPainter . Which . BACKGROUND_DISABLED ) ) ; d . put ( p + "[Enabled].backgroundPainter" , new LazyPainter ( c , ButtonPainter . Which . BACKGROUND_ENABLED ) ) ; d . put ( p + "[Focused].backgroundPainter" , new LazyPainter ( c , ButtonPainter . Which . BACKGROUND_FOCUSED ) ) ; d . put ( p + "[Pressed].backgroundPainter" , new LazyPainter ( c , ButtonPainter . Which . BACKGROUND_PRESSED ) ) ; d . put ( p + "[Focused+Pressed].backgroundPainter" , new LazyPainter ( c , ButtonPainter . Which . BACKGROUND_PRESSED_FOCUSED ) ) ; c = PAINTER_PREFIX + "ToolBarToggleButtonPainter" ; p = "ToolBar:ToggleButton" ; d . put ( p + ".States" , "Enabled,Disabled,Focused,Pressed,Selected" ) ; d . put ( p + "[Disabled].textForeground" , d . get ( "seaGlassToolBarDisabledText" ) ) ; d . put ( p + "[Focused].backgroundPainter" , new LazyPainter ( c , ToolBarToggleButtonPainter . Which . BACKGROUND_FOCUSED ) ) ; d . put ( p + "[Pressed].backgroundPainter" , new LazyPainter ( c , ToolBarToggleButtonPainter . Which . BACKGROUND_PRESSED ) ) ; d . put ( p + "[Focused+Pressed].backgroundPainter" , new LazyPainter ( c , ToolBarToggleButtonPainter . Which . BACKGROUND_PRESSED_FOCUSED ) ) ; d . put ( p + "[Selected].backgroundPainter" , new LazyPainter ( c , ToolBarToggleButtonPainter . Which . BACKGROUND_SELECTED ) ) ; d . put ( p + "[Focused+Selected].backgroundPainter" , new LazyPainter ( c , ToolBarToggleButtonPainter . Which . BACKGROUND_SELECTED_FOCUSED ) ) ; d . put ( p + "[Pressed+Selected].backgroundPainter" , new LazyPainter ( c , ToolBarToggleButtonPainter . Which . BACKGROUND_PRESSED_SELECTED ) ) ; d . put ( p + "[Focused+Pressed+Selected].backgroundPainter" , new LazyPainter ( c , ToolBarToggleButtonPainter . Which . BACKGROUND_PRESSED_SELECTED_FOCUSED ) ) ; d . put ( p + "[Disabled+Selected].backgroundPainter" , new LazyPainter ( c , ToolBarToggleButtonPainter . Which . BACKGROUND_DISABLED_SELECTED ) ) ; uiDefaults . put ( "ToolBarSeparator[Enabled].backgroundPainter" , null ) ; |
public class LinkHandler { /** * / * ( non - Javadoc )
* @ see com . ibm . ws . sib . processor . impl . interfaces . DestinationHandler # isLink ( ) */
public boolean isLink ( ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "isLink" ) ; SibTr . exit ( tc , "isLink" , Boolean . valueOf ( true ) ) ; } return true ; |
public class ExecutionVertex { /** * Gets the preferred location to execute the current task execution attempt , based on the state
* that the execution attempt will resume .
* @ return A size - one collection with the location preference , or null , if there is no
* location preference based on the state . */
public Collection < CompletableFuture < TaskManagerLocation > > getPreferredLocationsBasedOnState ( ) { } } | TaskManagerLocation priorLocation ; if ( currentExecution . getTaskRestore ( ) != null && ( priorLocation = getLatestPriorLocation ( ) ) != null ) { return Collections . singleton ( CompletableFuture . completedFuture ( priorLocation ) ) ; } else { return null ; } |
public class CmsContainerpageController { /** * Creates a new element . < p >
* @ param element the widget belonging to the element which is currently in memory only
* @ param callback the callback to call with the result */
public void createNewElement ( final CmsContainerPageElementPanel element , final AsyncCallback < CmsContainerElement > callback ) { } } | CmsRpcAction < CmsContainerElement > action = new CmsRpcAction < CmsContainerElement > ( ) { @ Override public void execute ( ) { getContainerpageService ( ) . createNewElement ( CmsCoreProvider . get ( ) . getStructureId ( ) , element . getId ( ) , element . getNewType ( ) , null , getLocale ( ) , this ) ; } @ Override protected void onResponse ( CmsContainerElement result ) { callback . onSuccess ( result ) ; } } ; action . execute ( ) ; |
public class Matrix4f { /** * Set the upper left 3x3 submatrix of this { @ link Matrix4f } to the given { @ link Matrix3fc }
* and the rest to identity .
* @ see # Matrix4f ( Matrix3fc )
* @ param mat
* the { @ link Matrix3fc }
* @ return this */
public Matrix4f set ( Matrix3fc mat ) { } } | if ( mat instanceof Matrix3f ) { MemUtil . INSTANCE . copy ( ( Matrix3f ) mat , this ) ; } else { setMatrix3fc ( mat ) ; } this . _properties ( PROPERTY_AFFINE ) ; return this ; |
public class QuickDiagnose { /** * Uses the { @ code matcher } to validate { @ code item } .
* If validation fails , an error message is stored in { @ code mismatch } .
* The code is equivalent to
* < pre > { @ code
* if ( matcher . matches ( item ) ) {
* return true ;
* } else {
* matcher . describeMismatch ( item , mismatch ) ;
* return false ;
* } < / pre >
* but uses optimizations for diagnosing matchers .
* @ param matcher
* @ param item
* @ param mismatch
* @ return true iif { @ code item } was matched
* @ see DiagnosingMatcher
* @ see QuickDiagnosingMatcher */
public static boolean matches ( Matcher < ? > matcher , Object item , Description mismatch ) { } } | if ( mismatch instanceof Description . NullDescription ) { return matcher . matches ( item ) ; } if ( matcher instanceof QuickDiagnosingMatcher ) { return ( ( QuickDiagnosingMatcher < ? > ) matcher ) . matches ( item , mismatch ) ; } else if ( matcher instanceof DiagnosingMatcher ) { return DiagnosingHack . matches ( matcher , item , mismatch ) ; } else { return simpleMatch ( matcher , item , mismatch ) ; } |
public class RawValueJsonSerializer { /** * { @ inheritDoc } */
@ Override protected void doSerialize ( JsonWriter writer , Object value , JsonSerializationContext ctx , JsonSerializerParameters params ) { } } | writer . rawValue ( value ) ; |
public class InnerClassVisitor { /** * passed as the first argument implicitly . */
private void passThisReference ( ConstructorCallExpression call ) { } } | ClassNode cn = call . getType ( ) . redirect ( ) ; if ( ! shouldHandleImplicitThisForInnerClass ( cn ) ) return ; boolean isInStaticContext = true ; if ( currentMethod != null ) isInStaticContext = currentMethod . getVariableScope ( ) . isInStaticContext ( ) ; else if ( currentField != null ) isInStaticContext = currentField . isStatic ( ) ; else if ( processingObjInitStatements ) isInStaticContext = false ; // if constructor call is not in static context , return
if ( isInStaticContext ) { // constructor call is in static context and the inner class is non - static - 1st arg is supposed to be
// passed as enclosing " this " instance
Expression args = call . getArguments ( ) ; if ( args instanceof TupleExpression && ( ( TupleExpression ) args ) . getExpressions ( ) . isEmpty ( ) ) { addError ( "No enclosing instance passed in constructor call of a non-static inner class" , call ) ; } return ; } insertThis0ToSuperCall ( call , cn ) ; |
public class StringEscapeUtilities { /** * Removes all the occurrences of the \ < toRemove > characters from the < string >
* @ param string the string from which to remove the characters
* @ param toRemove the \ character to remove from the < string >
* @ return a new string with the removed \ < toRemove > characters */
@ NotNull public static String removeEscapedChars ( @ NotNull final String string , final char [ ] toRemove ) { } } | String toReturn = string ; for ( char character : toRemove ) { toReturn = removeEscapedChar ( toReturn , character ) ; } return toReturn ; |
public class FDSPutObjectRequest { /** * Auto convert inputStream to FDSProgressInputStream in order to invoke progress listener
* @ param inputStream
* @ param inputStreamLength the length of inputStream , set - 1 if the length is uncertain */
public void setInputStream ( InputStream inputStream , long inputStreamLength ) { } } | // close last file when set a new inputStream
if ( this . isUploadFile ) { try { this . inputStream . close ( ) ; } catch ( Exception e ) { } } if ( inputStream instanceof FDSProgressInputStream ) { this . inputStream = ( FDSProgressInputStream ) inputStream ; } else { this . inputStream = new FDSProgressInputStream ( inputStream , this . progressListener ) ; } if ( this . progressListener != null ) { this . progressListener . setTransferred ( 0 ) ; this . progressListener . setTotal ( inputStreamLength ) ; } this . isUploadFile = false ; this . inputStreamLength = inputStreamLength ; |
public class ALTaskTextViewerPanel { /** * Updates the graph based on the information given by the preview .
* @ param preview information used to update the graph
* @ param colors color coding used to connect the tasks with the graphs */
@ SuppressWarnings ( "unchecked" ) public void setGraph ( Preview preview , Color [ ] colors ) { } } | if ( preview == null ) { // no preview received
this . measureOverview . update ( null , "" , null ) ; this . graphCanvas . setGraph ( null , null , null , 1000 , null ) ; this . paramGraphCanvas . setGraph ( null , null , null , null ) ; this . budgetGraphCanvas . setGraph ( null , null , null , null ) ; return ; } ParsedPreview pp ; ParsedPreview ppStd ; // check which type of task it is
Class < ? > c = preview . getTaskClass ( ) ; if ( c == ALPartitionEvaluationTask . class || c == ALMultiParamTask . class ) { // PreviewCollection
PreviewCollection < Preview > pc = ( PreviewCollection < Preview > ) preview ; // get varied parameter name and values
this . variedParamName = pc . getVariedParamName ( ) ; this . variedParamValues = pc . getVariedParamValues ( ) ; if ( c == ALPartitionEvaluationTask . class ) { // calculate mean preview collection for each parameter value
MeanPreviewCollection mpc = new MeanPreviewCollection ( ( PreviewCollection < PreviewCollection < Preview > > ) preview ) ; pp = readCollection ( mpc . getMeanPreviews ( ) ) ; ppStd = readCollection ( mpc . getStdPreviews ( ) ) ; this . graphCanvas . setStandardDeviationPainted ( true ) ; this . paramGraphCanvas . setStandardDeviationPainted ( true ) ; } else { pp = readCollection ( pc ) ; ppStd = null ; this . graphCanvas . setStandardDeviationPainted ( false ) ; this . paramGraphCanvas . setStandardDeviationPainted ( false ) ; } // enable param and budget graph
this . graphPanelTabbedPane . setEnabledAt ( 1 , true ) ; this . graphPanelTabbedPane . setEnabledAt ( 2 , true ) ; } else if ( c == ALPrequentialEvaluationTask . class ) { // read Preview ( in this case , no special preview is required )
pp = read ( preview ) ; ppStd = null ; // reset varied param name and values
this . variedParamName = "" ; this . variedParamValues = null ; // switch to Processed Instances tab
this . graphPanelTabbedPane . setSelectedIndex ( 0 ) ; // disable param and budget view
this . graphPanelTabbedPane . setEnabledAt ( 1 , false ) ; this . graphPanelTabbedPane . setEnabledAt ( 2 , false ) ; // disable painting standard deviation
this . graphCanvas . setStandardDeviationPainted ( false ) ; this . paramGraphCanvas . setStandardDeviationPainted ( false ) ; } else { // sth went wrong
this . measureOverview . update ( null , "" , null ) ; this . graphCanvas . setGraph ( null , null , null , 1000 , null ) ; this . paramGraphCanvas . setGraph ( null , null , null , null ) ; this . budgetGraphCanvas . setGraph ( null , null , null , null ) ; return ; } MeasureCollection [ ] measures = pp . getMeasureCollectionsArray ( ) ; MeasureCollection [ ] measuresStd = null ; if ( ppStd != null ) { measuresStd = ppStd . getMeasureCollectionsArray ( ) ; } // restructure latest budgets to make them readable for the
// GraphScatter class
this . budgets = new double [ measures . length ] ; for ( int i = 0 ; i < measures . length ; i ++ ) { this . budgets [ i ] = measures [ i ] . getLastValue ( 6 ) ; } int [ ] pfs = pp . getProcessFrequenciesArray ( ) ; int min_pf = min ( pfs ) ; this . measureOverview . update ( measures , this . variedParamName , this . variedParamValues ) ; this . graphCanvas . setGraph ( measures , measuresStd , pfs , min_pf , colors ) ; this . paramGraphCanvas . setGraph ( measures , measuresStd , this . variedParamValues , colors ) ; this . budgetGraphCanvas . setGraph ( measures , measuresStd , this . budgets , colors ) ; |
public class Any { /** * The media type used for encoding . There will need to exist a serializer
* registered for this . If the media type is not set , it is assumed to be
* & # 39 ; application / vnd . apache . thrift . binary & # 39 ; , the default thrift serialization .
* @ return Optional of the < code > media _ type < / code > field value . */
@ javax . annotation . Nonnull public java . util . Optional < String > optionalMediaType ( ) { } } | return java . util . Optional . ofNullable ( mMediaType ) ; |
public class Status { /** * Returns the URI of the specification describing the status .
* @ return The URI of the specification describing the status . */
public String getUri ( ) { } } | String result = this . uri ; if ( result == null ) { switch ( this . code ) { case 100 : result = BASE_HTTP + "#sec10.1.1" ; break ; case 101 : result = BASE_HTTP + "#sec10.1.2" ; break ; case 102 : result = BASE_WEBDAV + "#STATUS_102" ; break ; case 200 : result = BASE_HTTP + "#sec10.2.1" ; break ; case 201 : result = BASE_HTTP + "#sec10.2.2" ; break ; case 202 : result = BASE_HTTP + "#sec10.2.3" ; break ; case 203 : result = BASE_HTTP + "#sec10.2.4" ; break ; case 204 : result = BASE_HTTP + "#sec10.2.5" ; break ; case 205 : result = BASE_HTTP + "#sec10.2.6" ; break ; case 206 : result = BASE_HTTP + "#sec10.2.7" ; break ; case 207 : result = BASE_WEBDAV + "#STATUS_207" ; break ; case 300 : result = BASE_HTTP + "#sec10.3.1" ; break ; case 301 : result = BASE_HTTP + "#sec10.3.2" ; break ; case 302 : result = BASE_HTTP + "#sec10.3.3" ; break ; case 303 : result = BASE_HTTP + "#sec10.3.4" ; break ; case 304 : result = BASE_HTTP + "#sec10.3.5" ; break ; case 305 : result = BASE_HTTP + "#sec10.3.6" ; break ; case 307 : result = BASE_HTTP + "#sec10.3.8" ; break ; case 400 : result = BASE_HTTP + "#sec10.4.1" ; break ; case 401 : result = BASE_HTTP + "#sec10.4.2" ; break ; case 402 : result = BASE_HTTP + "#sec10.4.3" ; break ; case 403 : result = BASE_HTTP + "#sec10.4.4" ; break ; case 404 : result = BASE_HTTP + "#sec10.4.5" ; break ; case 405 : result = BASE_HTTP + "#sec10.4.6" ; break ; case 406 : result = BASE_HTTP + "#sec10.4.7" ; break ; case 407 : result = BASE_HTTP + "#sec10.4.8" ; break ; case 408 : result = BASE_HTTP + "#sec10.4.9" ; break ; case 409 : result = BASE_HTTP + "#sec10.4.10" ; break ; case 410 : result = BASE_HTTP + "#sec10.4.11" ; break ; case 411 : result = BASE_HTTP + "#sec10.4.12" ; break ; case 412 : result = BASE_HTTP + "#sec10.4.13" ; break ; case 413 : result = BASE_HTTP + "#sec10.4.14" ; break ; case 414 : result = BASE_HTTP + "#sec10.4.15" ; break ; case 415 : result = BASE_HTTP + "#sec10.4.16" ; break ; case 416 : result = BASE_HTTP + "#sec10.4.17" ; break ; case 417 : result = BASE_HTTP + "#sec10.4.18" ; break ; case 422 : result = BASE_WEBDAV + "#STATUS_422" ; break ; case 423 : result = BASE_WEBDAV + "#STATUS_423" ; break ; case 424 : result = BASE_WEBDAV + "#STATUS_424" ; break ; case 500 : result = BASE_HTTP + "#sec10.5.1" ; break ; case 501 : result = BASE_HTTP + "#sec10.5.2" ; break ; case 502 : result = BASE_HTTP + "#sec10.5.3" ; break ; case 503 : result = BASE_HTTP + "#sec10.5.4" ; break ; case 504 : result = BASE_HTTP + "#sec10.5.5" ; break ; case 505 : result = BASE_HTTP + "#sec10.5.6" ; break ; case 507 : result = BASE_WEBDAV + "#STATUS_507" ; break ; case 1000 : result = BASE_RESTLET + "org/restlet/data/Statuses.html#CONNECTOR_ERROR_CONNECTION" ; break ; case 1001 : result = BASE_RESTLET + "org/restlet/data/Statuses.html#CONNECTOR_ERROR_COMMUNICATION" ; break ; case 1002 : result = BASE_RESTLET + "org/restlet/data/Statuses.html#CONNECTOR_ERROR_INTERNAL" ; break ; } } return result ; |
public class JNRPEProtocolPacketV2 { /** * Sets the value of the data buffer .
* @ param buffer the buffer value */
public void setBuffer ( final String buffer ) { } } | initRandomBuffer ( ) ; byteBufferAry = Arrays . copyOf ( buffer . getBytes ( ) , MAX_PACKETBUFFER_LENGTH ) ; |
public class SpewGenerator { /** * Returns a random line of text , driven by the underlying spew file and the given
* classes . For example , to drive a spew file but add some parameters to it ,
* call this method with the class names as the map keys , and the Strings that you ' d
* like substituted as the values .
* @ param extraClasses the extra classes to use
* @ return a random line of text */
public String nextLine ( Map < String , Object > extraClasses ) { } } | return mainClass . render ( null , preprocessExtraClasses ( extraClasses ) ) ; |
public class CommonProfile { /** * Return the gender of the user .
* @ return the gender of the user */
public Gender getGender ( ) { } } | final Gender gender = ( Gender ) getAttribute ( CommonProfileDefinition . GENDER ) ; if ( gender == null ) { return Gender . UNSPECIFIED ; } else { return gender ; } |
public class TrueTypeFont { /** * Gets a glyph width .
* @ param glyph the glyph to get the width of
* @ return the width of the glyph in normalized 1000 units */
protected int getGlyphWidth ( int glyph ) { } } | if ( glyph >= GlyphWidths . length ) glyph = GlyphWidths . length - 1 ; return GlyphWidths [ glyph ] ; |
public class RouteProcessor { /** * Sort metas in group .
* @ param routeMete metas . */
private void categories ( RouteMeta routeMete ) { } } | if ( routeVerify ( routeMete ) ) { logger . info ( ">>> Start categories, group = " + routeMete . getGroup ( ) + ", path = " + routeMete . getPath ( ) + " <<<" ) ; Set < RouteMeta > routeMetas = groupMap . get ( routeMete . getGroup ( ) ) ; if ( CollectionUtils . isEmpty ( routeMetas ) ) { Set < RouteMeta > routeMetaSet = new TreeSet < > ( new Comparator < RouteMeta > ( ) { @ Override public int compare ( RouteMeta r1 , RouteMeta r2 ) { try { return r1 . getPath ( ) . compareTo ( r2 . getPath ( ) ) ; } catch ( NullPointerException npe ) { logger . error ( npe . getMessage ( ) ) ; return 0 ; } } } ) ; routeMetaSet . add ( routeMete ) ; groupMap . put ( routeMete . getGroup ( ) , routeMetaSet ) ; } else { routeMetas . add ( routeMete ) ; } } else { logger . warning ( ">>> Route meta verify error, group is " + routeMete . getGroup ( ) + " <<<" ) ; } |
public class MapBasedJobFactory { /** * Verify the given job types are all valid .
* @ param jobTypes the given job types
* @ throws IllegalArgumentException if any of the job types are invalid
* @ see # checkJobType ( String , Class ) */
protected void checkJobTypes ( final Map < String , ? extends Class < ? > > jobTypes ) { } } | if ( jobTypes == null ) { throw new IllegalArgumentException ( "jobTypes must not be null" ) ; } for ( final Entry < String , ? extends Class < ? > > entry : jobTypes . entrySet ( ) ) { try { checkJobType ( entry . getKey ( ) , entry . getValue ( ) ) ; } catch ( IllegalArgumentException iae ) { throw new IllegalArgumentException ( "jobTypes contained invalid value" , iae ) ; } } |
public class ShutdownHookUtil { /** * Removes a shutdown hook from the JVM . */
public static void removeShutdownHook ( final Thread shutdownHook , final String serviceName , final Logger logger ) { } } | // Do not run if this is invoked by the shutdown hook itself
if ( shutdownHook == null || shutdownHook == Thread . currentThread ( ) ) { return ; } checkNotNull ( logger ) ; try { Runtime . getRuntime ( ) . removeShutdownHook ( shutdownHook ) ; } catch ( IllegalStateException e ) { // race , JVM is in shutdown already , we can safely ignore this
logger . debug ( "Unable to remove shutdown hook for {}, shutdown already in progress" , serviceName , e ) ; } catch ( Throwable t ) { logger . warn ( "Exception while un-registering {}'s shutdown hook." , serviceName , t ) ; } |
public class SimpleJCRUserListAccess { /** * { @ inheritDoc } */
protected int getSize ( Session session ) throws Exception { } } | long result = usersStorageNode . getNodesCount ( ) ; if ( status != UserStatus . ANY ) { StringBuilder statement = new StringBuilder ( "SELECT * FROM " ) ; statement . append ( JCROrganizationServiceImpl . JOS_USERS_NODETYPE ) . append ( " WHERE" ) ; statement . append ( " jcr:path LIKE '" ) . append ( usersStorageNode . getPath ( ) ) . append ( "/%'" ) ; statement . append ( " AND NOT jcr:path LIKE '" ) . append ( usersStorageNode . getPath ( ) ) . append ( "/%/%'" ) ; statement . append ( " AND " ) . append ( JCROrganizationServiceImpl . JOS_DISABLED ) ; if ( status == UserStatus . ENABLED ) statement . append ( " IS NOT NULL" ) ; else statement . append ( " IS NULL" ) ; // We remove the total amount of disabled users
result -= session . getWorkspace ( ) . getQueryManager ( ) . createQuery ( statement . toString ( ) , Query . SQL ) . execute ( ) . getNodes ( ) . getSize ( ) ; } return ( int ) result ; |
public class CauchyStochasticLaw { /** * Replies the x according to the value of the distribution function .
* @ param u is a value given by the uniform random variable generator { @ code U ( 0 , 1 ) } .
* @ return { @ code F < sup > - 1 < / sup > ( u ) }
* @ throws MathException in case { @ code F < sup > - 1 < / sup > ( u ) } could not be computed */
@ Pure @ Override @ SuppressWarnings ( "checkstyle:magicnumber" ) public double inverseF ( double u ) throws MathException { } } | return this . x0 + this . gamma * Math . tan ( Math . PI * ( u - .5 ) ) ; |
public class Pattern { /** * Changes a label . The oldLabel has to be an existing label and new label has to be a new
* label .
* @ param oldLabel label to update
* @ param newLabel updated label */
public void updateLabel ( String oldLabel , String newLabel ) { } } | if ( hasLabel ( newLabel ) ) throw new IllegalArgumentException ( "The label \"" + newLabel + "\" already exists." ) ; int i = indexOf ( oldLabel ) ; labelMap . remove ( oldLabel ) ; labelMap . put ( newLabel , i ) ; |
public class ComplexImg { /** * Fills the specified channel with the specified value .
* All values of this channel will be same afterwards .
* < br >
* If { @ link # isSynchronizePowerSpectrum ( ) } is true , then this will also
* call { @ link # recomputePowerChannel ( ) } .
* @ param channel to fill
* @ param value to fill with
* @ return this */
public ComplexImg fill ( int channel , double value ) { } } | delegate . fill ( channel , value ) ; if ( synchronizePowerSpectrum && ( channel == CHANNEL_REAL || channel == CHANNEL_IMAG ) ) { recomputePowerChannel ( ) ; } return this ; |
public class AlignerHelper { /** * Find alignment path through traceback matrix
* @ param traceback
* @ param local
* @ param xyMax
* @ param last
* @ param sx
* @ param sy
* @ return */
public static int [ ] setSteps ( Last [ ] [ ] [ ] traceback , boolean local , int [ ] xyMax , Last last , List < Step > sx , List < Step > sy ) { } } | int x = xyMax [ 0 ] , y = xyMax [ 1 ] ; boolean linear = ( traceback [ x ] [ y ] . length == 1 ) ; while ( local ? ( linear ? last : traceback [ x ] [ y ] [ last . ordinal ( ) ] ) != null : x > 0 || y > 0 ) { switch ( last ) { case DELETION : sx . add ( Step . COMPOUND ) ; sy . add ( Step . GAP ) ; last = linear ? traceback [ -- x ] [ y ] [ 0 ] : traceback [ x -- ] [ y ] [ 1 ] ; break ; case SUBSTITUTION : sx . add ( Step . COMPOUND ) ; sy . add ( Step . COMPOUND ) ; last = linear ? traceback [ -- x ] [ -- y ] [ 0 ] : traceback [ x -- ] [ y -- ] [ 0 ] ; break ; case INSERTION : sx . add ( Step . GAP ) ; sy . add ( Step . COMPOUND ) ; last = linear ? traceback [ x ] [ -- y ] [ 0 ] : traceback [ x ] [ y -- ] [ 2 ] ; } } Collections . reverse ( sx ) ; Collections . reverse ( sy ) ; return new int [ ] { x , y } ; |
public class SDMath { /** * Generate an identity matrix with the specified number of rows and columns , with optional leading dims < br >
* Example : < br >
* batchShape : [ 3,3 ] < br >
* numRows : 2 < br >
* numCols : 4 < br >
* returns a tensor of shape ( 3 , 3 , 2 , 4 ) that consists of 3 * 3 batches of ( 2,4 ) - shaped identity matrices : < br >
* 1 0 0 0 < br >
* 0 1 0 0 < br >
* @ param rows Number of rows
* @ param cols Number of columns
* @ param batchDimension Batch dimensions . May be null */
public SDVariable eye ( String name , int rows , int cols , DataType dataType , int ... batchDimension ) { } } | SDVariable eye = new Eye ( sd , rows , cols , dataType , batchDimension ) . outputVariables ( ) [ 0 ] ; return updateVariableNameAndReference ( eye , name ) ; |
public class AbstractMetricCollectingInterceptor { /** * Creates a new timer function using the given template . This method initializes the default timers .
* @ param timerTemplate The template to create the instances from .
* @ return The newly created function that returns a timer for a given code . */
protected Function < Code , Timer > asTimerFunction ( final Supplier < Timer . Builder > timerTemplate ) { } } | final Map < Code , Timer > cache = new EnumMap < > ( Code . class ) ; final Function < Code , Timer > creator = code -> timerTemplate . get ( ) . tag ( TAG_STATUS_CODE , code . name ( ) ) . register ( this . registry ) ; final Function < Code , Timer > cacheResolver = code -> cache . computeIfAbsent ( code , creator ) ; // Eager initialize
for ( final Code code : this . eagerInitializedCodes ) { cacheResolver . apply ( code ) ; } return cacheResolver ; |
public class BitMatrix { /** * Modifies this { @ code BitMatrix } to represent the same but rotated 180 degrees */
public void rotate180 ( ) { } } | int width = getWidth ( ) ; int height = getHeight ( ) ; BitArray topRow = new BitArray ( width ) ; BitArray bottomRow = new BitArray ( width ) ; for ( int i = 0 ; i < ( height + 1 ) / 2 ; i ++ ) { topRow = getRow ( i , topRow ) ; bottomRow = getRow ( height - 1 - i , bottomRow ) ; topRow . reverse ( ) ; bottomRow . reverse ( ) ; setRow ( i , bottomRow ) ; setRow ( height - 1 - i , topRow ) ; } |
public class FreezeHandler { /** * Overrides < code > endElement ( ) < / code > in
* < code > org . xml . sax . helpers . DefaultHandler < / code > ,
* which in turn implements < code > org . xml . sax . ContentHandler < / code > .
* Called for each start tag encountered . */
public void endElement ( String namespaceUri , String localName , String qualifiedName ) throws SAXException { } } | currentElement = null ; currentDepth -- ; String indentation = indent ( - 1 ) ; String closingElement = "</" + getName ( localName , qualifiedName ) + ">" ; write ( currentlyInLeafElement ? closingElement : nl + indentation + closingElement ) ; currentlyInLeafElement = false ; this . currentElement = null ; if ( frozenArtifactResolver . artifactInheritsVersionFromParent ( ) && ARTIFACT_ID . equals ( qualifiedName ) && currentDepth == 1 ) { logger . info ( "[Freezehandler]: Artifact version " + frozenArtifactResolver . artifactFrozenVersion ( ) ) ; write ( nl + indentation + "<" + VERSION + ">" + frozenArtifactResolver . artifactFrozenVersion ( ) + "</" + VERSION + ">" ) ; } switch ( qualifiedName ) { case GROUP_ID : case ARTIFACT_ID : case PACKAGING : case RELATIVE_PATH : case "" : break ; case VERSION : default : this . currentGroupIdArtifactIdVersion = new GroupIdArtifactIdVersion ( ) ; } |
public class DefaultOverlayService { /** * { @ inheritDoc }
* @ see # uninstallOverlay ( JComponent , JComponent , Insets ) */
public Boolean uninstallOverlay ( JComponent targetComponent , JComponent overlay ) { } } | this . uninstallOverlay ( targetComponent , overlay , null ) ; return Boolean . TRUE ; |
public class ModelNodeFormBuilder { /** * Adds a validator to the form , to require at least one of them to be filled .
* Requires use of createValidators ( true ) */
public ModelNodeFormBuilder requiresAtLeastOne ( String ... attributeName ) { } } | if ( attributeName != null && attributeName . length != 0 ) { this . requiresAtLeastOne . addAll ( asList ( attributeName ) ) ; } return this ; |
public class ValidatingStreamReader { /** * Public API , configuration */
@ Override public Object getProperty ( String name ) { } } | // DTD - specific properties . . .
if ( name . equals ( STAX_PROP_ENTITIES ) ) { safeEnsureFinishToken ( ) ; if ( mDTD == null || ! ( mDTD instanceof DTDSubset ) ) { return null ; } List < EntityDecl > l = ( ( DTDSubset ) mDTD ) . getGeneralEntityList ( ) ; /* Let ' s make a copy , so that caller can not modify
* DTD ' s internal list instance */
return new ArrayList < EntityDecl > ( l ) ; } if ( name . equals ( STAX_PROP_NOTATIONS ) ) { safeEnsureFinishToken ( ) ; if ( mDTD == null || ! ( mDTD instanceof DTDSubset ) ) { return null ; } /* Let ' s make a copy , so that caller can not modify
* DTD ' s internal list instance */
List < NotationDeclaration > l = ( ( DTDSubset ) mDTD ) . getNotationList ( ) ; return new ArrayList < NotationDeclaration > ( l ) ; } return super . getProperty ( name ) ; |
public class CryptoFileSystemUri { /** * Constructs a CryptoFileSystem URI by using the given absolute path to a vault and constructing a path inside the vault from components .
* @ param pathToVault path to the vault
* @ param pathComponentsInsideVault path components to node inside the vault */
public static URI create ( Path pathToVault , String ... pathComponentsInsideVault ) { } } | try { return new URI ( URI_SCHEME , pathToVault . toUri ( ) . toString ( ) , "/" + String . join ( "/" , pathComponentsInsideVault ) , null , null ) ; } catch ( URISyntaxException e ) { throw new IllegalArgumentException ( "Can not create URI from given input" , e ) ; } |
public class ContentInfoUtil { /** * Return the content type from the associated bytes or null if none of the magic entries matched . */
public ContentInfo findMatch ( byte [ ] bytes ) { } } | if ( bytes . length == 0 ) { return ContentInfo . EMPTY_INFO ; } else { return magicEntries . findMatch ( bytes ) ; } |
public class ZonedDateTime { /** * Obtains an instance of { @ code ZonedDateTime } from a local date and time .
* This creates a zoned date - time matching the input local date and time as closely as possible .
* Time - zone rules , such as daylight savings , mean that not every local date - time
* is valid for the specified zone , thus the local date - time may be adjusted .
* The local date time and first combined to form a local date - time .
* The local date - time is then resolved to a single instant on the time - line .
* This is achieved by finding a valid offset from UTC / Greenwich for the local
* date - time as defined by the { @ link ZoneRules rules } of the zone ID .
* In most cases , there is only one valid offset for a local date - time .
* In the case of an overlap , when clocks are set back , there are two valid offsets .
* This method uses the earlier offset typically corresponding to " summer " .
* In the case of a gap , when clocks jump forward , there is no valid offset .
* Instead , the local date - time is adjusted to be later by the length of the gap .
* For a typical one hour daylight savings change , the local date - time will be
* moved one hour later into the offset typically corresponding to " summer " .
* @ param date the local date , not null
* @ param time the local time , not null
* @ param zone the time - zone , not null
* @ return the offset date - time , not null */
public static ZonedDateTime of ( LocalDate date , LocalTime time , ZoneId zone ) { } } | return of ( LocalDateTime . of ( date , time ) , zone ) ; |
public class Attachment { /** * Get the input stream of the content ( aka ' body ' ) data .
* @ throws CouchbaseLiteException */
@ InterfaceAudience . Public public InputStream getContent ( ) throws CouchbaseLiteException { } } | if ( body != null ) { return body ; } else { return new ByteArrayInputStream ( internalAttachment ( ) . getContent ( ) ) ; } |
public class Streams { /** * Convert an Optional to a Stream
* < pre >
* { @ code
* Stream < Integer > stream = Streams . optionalToStream ( Optional . of ( 1 ) ) ;
* / / Stream [ 1]
* Stream < Integer > zero = Streams . optionalToStream ( Optional . zero ( ) ) ;
* / / Stream [ ]
* < / pre >
* @ param optional Optional to convert to a Stream
* @ return Stream with a single value ( if present ) created from an Optional */
public final static < T > Stream < T > optionalToStream ( final Optional < T > optional ) { } } | if ( optional . isPresent ( ) ) return Stream . of ( optional . get ( ) ) ; return Stream . of ( ) ; |
public class SBPrintStream { /** * Convert a String [ ] into a valid Java String initializer */
public SBPrintStream toJavaStringInit ( String [ ] ss ) { } } | if ( ss == null ) { return p ( "null" ) ; } p ( '{' ) ; for ( int i = 0 ; i < ss . length - 1 ; i ++ ) { p ( '"' ) . pj ( ss [ i ] ) . p ( "\"," ) ; } if ( ss . length > 0 ) { p ( '"' ) . pj ( ss [ ss . length - 1 ] ) . p ( '"' ) ; } return p ( '}' ) ; |
public class RegionInstanceGroupManagerClient { /** * Creates a managed instance group using the information that you specify in the request . After
* the group is created , instances in the group are created using the specified instance template .
* This operation is marked as DONE when the group is created even if the instances in the group
* have not yet been created . You must separately verify the status of the individual instances
* with the listmanagedinstances method .
* < p > A regional managed instance group can contain up to 2000 instances .
* < p > Sample code :
* < pre > < code >
* try ( RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient . create ( ) ) {
* ProjectRegionName region = ProjectRegionName . of ( " [ PROJECT ] " , " [ REGION ] " ) ;
* InstanceGroupManager instanceGroupManagerResource = InstanceGroupManager . newBuilder ( ) . build ( ) ;
* Operation response = regionInstanceGroupManagerClient . insertRegionInstanceGroupManager ( region . toString ( ) , instanceGroupManagerResource ) ;
* < / code > < / pre >
* @ param region Name of the region scoping this request .
* @ param instanceGroupManagerResource An Instance Group Manager resource . ( = = resource _ for
* beta . instanceGroupManagers = = ) ( = = resource _ for v1 . instanceGroupManagers = = ) ( = =
* resource _ for beta . regionInstanceGroupManagers = = ) ( = = resource _ for
* v1 . regionInstanceGroupManagers = = )
* @ throws com . google . api . gax . rpc . ApiException if the remote call fails */
@ BetaApi public final Operation insertRegionInstanceGroupManager ( String region , InstanceGroupManager instanceGroupManagerResource ) { } } | InsertRegionInstanceGroupManagerHttpRequest request = InsertRegionInstanceGroupManagerHttpRequest . newBuilder ( ) . setRegion ( region ) . setInstanceGroupManagerResource ( instanceGroupManagerResource ) . build ( ) ; return insertRegionInstanceGroupManager ( request ) ; |
public class JideApplicationWindow { /** * Sets the active page by loading that page ' s components and
* applying the layout . Also updates the show view command menu
* to list the views within the page . */
protected void setActivePage ( ApplicationPage page ) { } } | getPage ( ) . getControl ( ) ; loadLayoutData ( page . getId ( ) ) ; ( ( JideApplicationPage ) getPage ( ) ) . updateShowViewCommands ( ) ; |
public class PageSourceImpl { /** * remove the last elemtn of a path
* @ param path path to remove last element from it
* @ param isOutSide
* @ return path with removed element */
private static String pathRemoveLast ( String path , RefBoolean isOutSide ) { } } | if ( path . length ( ) == 0 ) { isOutSide . setValue ( true ) ; return ".." ; } else if ( path . endsWith ( ".." ) ) { isOutSide . setValue ( true ) ; return path . concat ( "/.." ) ; // path + " / . . " ;
} return path . substring ( 0 , path . lastIndexOf ( '/' ) ) ; |
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public String convertIfcRoofTypeEnumToString ( EDataType eDataType , Object instanceValue ) { } } | return instanceValue == null ? null : instanceValue . toString ( ) ; |
public class DataSet { /** * Add rows of given data set to this data set .
* @ param other The other data set .
* @ return The data set instance ( for chained calls ) .
* @ throws InvalidOperationException
* if this data set is read - only , or
* if the data source of the other data set differs
* from this one .
* @ see # row ( Object . . . )
* @ see # rows ( Object [ ] [ ] )
* @ see # isReadOnly ( ) */
public final DataSet add ( DataSet other ) { } } | checkIfNotReadOnly ( ) ; if ( other . getSource ( ) != source ) { throw new InvalidOperationException ( "Data source mismatch." ) ; } rows . addAll ( other . rows ) ; return this ; |
public class WMSService { /** * Convertes to a WMS URL
* @ param x the x coordinate
* @ param y the y coordinate
* @ param zoom the zomm factor
* @ param tileSize the tile size
* @ return a URL request string */
public String toWMSURL ( int x , int y , int zoom , int tileSize ) { } } | String format = "image/jpeg" ; String styles = "" ; String srs = "EPSG:4326" ; int ts = tileSize ; int circumference = widthOfWorldInPixels ( zoom , tileSize ) ; double radius = circumference / ( 2 * Math . PI ) ; double ulx = MercatorUtils . xToLong ( x * ts , radius ) ; double uly = MercatorUtils . yToLat ( y * ts , radius ) ; double lrx = MercatorUtils . xToLong ( ( x + 1 ) * ts , radius ) ; double lry = MercatorUtils . yToLat ( ( y + 1 ) * ts , radius ) ; String bbox = ulx + "," + uly + "," + lrx + "," + lry ; String url = getBaseUrl ( ) + "version=1.1.1&request=" + "GetMap&Layers=" + layer + "&format=" + format + "&BBOX=" + bbox + "&width=" + ts + "&height=" + ts + "&SRS=" + srs + "&Styles=" + styles + // " & transparent = TRUE " +
"" ; return url ; |
public class LoggerOddities { /** * implements the visitor to look for calls to Logger . getLogger with the wrong class name
* @ param seen
* the opcode of the currently parsed instruction */
@ Override @ SuppressWarnings ( "unchecked" ) public void sawOpcode ( int seen ) { } } | String ldcClassName = null ; String seenMethodName = null ; boolean seenToString = false ; boolean seenFormatterLogger = false ; int exMessageReg = - 1 ; Integer arraySize = null ; boolean simpleFormat = false ; try { stack . precomputation ( this ) ; if ( ( seen == Const . LDC ) || ( seen == Const . LDC_W ) ) { Constant c = getConstantRefOperand ( ) ; if ( c instanceof ConstantClass ) { ConstantPool pool = getConstantPool ( ) ; ldcClassName = ( ( ConstantUtf8 ) pool . getConstant ( ( ( ConstantClass ) c ) . getNameIndex ( ) ) ) . getBytes ( ) ; } } else if ( seen == Const . INVOKESTATIC ) { lookForSuspectClasses ( ) ; String clsName = getClassConstantOperand ( ) ; String methodName = getNameConstantOperand ( ) ; if ( Values . SLASHED_JAVA_LANG_STRING . equals ( clsName ) && "format" . equals ( methodName ) && ( stack . getStackDepth ( ) >= 2 ) ) { String format = ( String ) stack . getStackItem ( 1 ) . getConstant ( ) ; if ( format != null ) { Matcher m = NON_SIMPLE_FORMAT . matcher ( format ) ; if ( ! m . matches ( ) ) { simpleFormat = true ; } } } else if ( "getFormatterLogger" . equals ( methodName ) && LOG4J2_LOGMANAGER . equals ( clsName ) ) { seenFormatterLogger = true ; } } else if ( ( ( seen == Const . INVOKEVIRTUAL ) || ( seen == Const . INVOKEINTERFACE ) ) && ( throwableClass != null ) ) { String mthName = getNameConstantOperand ( ) ; if ( "getName" . equals ( mthName ) ) { if ( stack . getStackDepth ( ) >= 1 ) { // Foo . class . getName ( ) is being called , so we pass the
// name of the class to the current top of the stack
// ( the name of the class is currently on the top of the
// stack , but won ' t be on the stack at all next opcode )
Item stackItem = stack . getStackItem ( 0 ) ; LOUserValue < String > uv = ( LOUserValue < String > ) stackItem . getUserValue ( ) ; if ( ( uv != null ) && ( uv . getType ( ) == LOUserValue . LOType . CLASS_NAME ) ) { ldcClassName = uv . getValue ( ) ; } } } else if ( "getMessage" . equals ( mthName ) ) { String callingClsName = getClassConstantOperand ( ) ; JavaClass cls = Repository . lookupClass ( callingClsName ) ; if ( cls . instanceOf ( throwableClass ) && ( stack . getStackDepth ( ) > 0 ) ) { OpcodeStack . Item exItem = stack . getStackItem ( 0 ) ; exMessageReg = exItem . getRegisterNumber ( ) ; } } else if ( LOGGER_METHODS . contains ( mthName ) ) { checkForProblemsWithLoggerMethods ( ) ; } else if ( Values . TOSTRING . equals ( mthName ) && SignatureBuilder . SIG_VOID_TO_STRING . equals ( getSigConstantOperand ( ) ) ) { String callingClsName = getClassConstantOperand ( ) ; if ( SignatureUtils . isPlainStringConvertableClass ( callingClsName ) && ( stack . getStackDepth ( ) > 0 ) ) { OpcodeStack . Item item = stack . getStackItem ( 0 ) ; // if the stringbuilder was previously stored , don ' t report it
if ( item . getRegisterNumber ( ) < 0 ) { seenMethodName = mthName ; } } if ( seenMethodName == null ) { seenToString = true ; } } } else if ( seen == Const . INVOKESPECIAL ) { checkForLoggerParam ( ) ; } else if ( seen == Const . ANEWARRAY ) { if ( stack . getStackDepth ( ) > 0 ) { OpcodeStack . Item sizeItem = stack . getStackItem ( 0 ) ; Object con = sizeItem . getConstant ( ) ; if ( con instanceof Integer ) { arraySize = ( Integer ) con ; } } } else if ( seen == Const . AASTORE ) { if ( stack . getStackDepth ( ) >= 3 ) { OpcodeStack . Item arrayItem = stack . getStackItem ( 2 ) ; LOUserValue < Integer > uv = ( LOUserValue < Integer > ) arrayItem . getUserValue ( ) ; if ( ( uv != null ) && ( uv . getType ( ) == LOUserValue . LOType . ARRAY_SIZE ) ) { Integer size = uv . getValue ( ) ; if ( ( size != null ) && ( size . intValue ( ) > 0 ) && hasExceptionOnStack ( ) ) { arrayItem . setUserValue ( new LOUserValue < > ( LOUserValue . LOType . ARRAY_SIZE , Integer . valueOf ( - size . intValue ( ) ) ) ) ; } } } } else if ( seen == Const . PUTSTATIC ) { OpcodeStack . Item itm = stack . getStackItem ( 0 ) ; if ( isStaticInitializer && isNonPrivateLogField ( getClassConstantOperand ( ) , getNameConstantOperand ( ) , getSigConstantOperand ( ) ) ) { XMethod m = itm . getReturnValueOf ( ) ; if ( ( m != null ) && isLoggerWithClassParm ( m ) ) { bugReporter . reportBug ( new BugInstance ( this , BugType . LO_NON_PRIVATE_STATIC_LOGGER . name ( ) , NORMAL_PRIORITY ) . addClass ( this ) . addMethod ( this ) . addSourceLine ( this ) ) ; } } LOUserValue < Void > loggerUV = ( LOUserValue < Void > ) itm . getUserValue ( ) ; if ( ( loggerUV != null ) && ( loggerUV . getType ( ) == LOUserValue . LOType . FORMATTER_LOGGER ) ) { formatterLoggers . add ( getNameConstantOperand ( ) ) ; } } else if ( seen == Const . GETSTATIC ) { if ( formatterLoggers . contains ( getNameConstantOperand ( ) ) ) { seenFormatterLogger = true ; } } else if ( OpcodeUtils . isAStore ( seen ) && ( stack . getStackDepth ( ) > 0 ) ) { OpcodeStack . Item item = stack . getStackItem ( 0 ) ; LOUserValue < String > uv = ( LOUserValue < String > ) item . getUserValue ( ) ; if ( uv != null ) { if ( ( ( uv . getType ( ) == LOUserValue . LOType . METHOD_NAME ) && Values . TOSTRING . equals ( uv . getValue ( ) ) ) || ( uv . getType ( ) == LOUserValue . LOType . SIMPLE_FORMAT ) || ( uv . getType ( ) == LOUserValue . LOType . TOSTRING ) ) { item . setUserValue ( new LOUserValue < > ( LOUserValue . LOType . NULL , null ) ) ; } } } } catch ( ClassNotFoundException cnfe ) { bugReporter . reportMissingClass ( cnfe ) ; } finally { TernaryPatcher . pre ( stack , seen ) ; stack . sawOpcode ( this , seen ) ; TernaryPatcher . post ( stack , seen ) ; if ( stack . getStackDepth ( ) > 0 ) { OpcodeStack . Item item = stack . getStackItem ( 0 ) ; if ( ldcClassName != null ) { item . setUserValue ( new LOUserValue < > ( LOUserValue . LOType . CLASS_NAME , ldcClassName ) ) ; } else if ( seenMethodName != null ) { item . setUserValue ( new LOUserValue < > ( LOUserValue . LOType . METHOD_NAME , seenMethodName ) ) ; } else if ( exMessageReg >= 0 ) { item . setUserValue ( new LOUserValue < > ( LOUserValue . LOType . MESSAGE_REG , Integer . valueOf ( exMessageReg ) ) ) ; } else if ( arraySize != null ) { item . setUserValue ( new LOUserValue < > ( LOUserValue . LOType . ARRAY_SIZE , arraySize ) ) ; } else if ( simpleFormat ) { item . setUserValue ( new LOUserValue < > ( LOUserValue . LOType . SIMPLE_FORMAT , Boolean . TRUE ) ) ; } else if ( seenToString ) { item . setUserValue ( new LOUserValue < > ( LOUserValue . LOType . TOSTRING , null ) ) ; } else if ( seenFormatterLogger ) { item . setUserValue ( new LOUserValue < > ( LOUserValue . LOType . FORMATTER_LOGGER , null ) ) ; } } } |
public class AmazonLightsailClient { /** * Returns the current , previous , or pending versions of the master user password for a Lightsail database .
* The < code > asdf < / code > operation GetRelationalDatabaseMasterUserPassword supports tag - based access control via
* resource tags applied to the resource identified by relationalDatabaseName .
* @ param getRelationalDatabaseMasterUserPasswordRequest
* @ return Result of the GetRelationalDatabaseMasterUserPassword operation returned by the service .
* @ throws ServiceException
* A general service exception .
* @ throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field . < / p > < note >
* Domain - related APIs are only available in the N . Virginia ( us - east - 1 ) Region . Please set your AWS Region
* configuration to us - east - 1 to create , view , or edit these resources .
* @ throws NotFoundException
* Lightsail throws this exception when it cannot find a resource .
* @ throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute .
* @ throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource .
* @ throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state .
* @ throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated .
* @ sample AmazonLightsail . GetRelationalDatabaseMasterUserPassword
* @ see < a
* href = " http : / / docs . aws . amazon . com / goto / WebAPI / lightsail - 2016-11-28 / GetRelationalDatabaseMasterUserPassword "
* target = " _ top " > AWS API Documentation < / a > */
@ Override public GetRelationalDatabaseMasterUserPasswordResult getRelationalDatabaseMasterUserPassword ( GetRelationalDatabaseMasterUserPasswordRequest request ) { } } | request = beforeClientExecution ( request ) ; return executeGetRelationalDatabaseMasterUserPassword ( request ) ; |
public class UDPReadRequestContextImpl { /** * @ see
* com . ibm . websphere . udp . channel . UDPReadRequestContext # readAlways ( com . ibm .
* websphere . udp . channel . UDPReadCompletedCallbackThreaded , boolean ) */
public void readAlways ( UDPReadCompletedCallbackThreaded callback , boolean enable ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "readAlways(enable=" + enable + ")" ) ; } if ( enable ) { this . readAlwaysCallback = callback ; } else { this . readAlwaysCallback = null ; } getWorkQueueManager ( ) . processWork ( this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "readAlways()" ) ; } |
public class Parameters { /** * Gets objects defined by namespaces . It frequently happens that a program needs to have
* specified some set of objects to use , where each object is defined by some namespace . For
* example , in the name finder , we might need to use a number of different name set groups , where
* each group is defined by either a single name list or a map of name list names to name lists .
* Using this we would have a parameter file like this :
* < pre >
* # note foo is not used
* com . bbn . serif . names . lists . activeListGroups : standard , geonames , single
* com . bbn . serif . names . lists . standard . mapFile : / nfs / . . . . .
* com . bbn . serif . names . lists . geonames . mapFile : / nfs / . . . .
* com . bbn . serif . names . lists . foo . listPath : / nfs / . . . .
* com . bbn . serif . names . lists . foo . listName : single
* com . bbn . serif . names . lists . foo . listPath : / nfs / . . .
* com . bbn . serif . names . lists . foo . listName : foo
* < / pre >
* The user could load these by { @ code objectsFromNameSpace ( " com . bbn . serif . names . lists " ,
* " activeListGroups " , aNameSpaceToObjectMapperImplementation ) } .
* If { @ code activeNameSpacesFeature } is absent this will thrown a { @ link ParameterException } . */
public < T > ImmutableSet < T > objectsFromNamespaces ( String baseNamespace , String activeNamespacesFeature , NamespaceToObjectMapper < ? extends T > nameSpaceToObjectMapper ) { } } | final Parameters subNamespace = copyNamespace ( baseNamespace ) ; final ImmutableSet . Builder < T > ret = ImmutableSet . builder ( ) ; for ( final String activeNamespace : subNamespace . getStringList ( activeNamespacesFeature ) ) { if ( subNamespace . isNamespacePresent ( activeNamespace ) ) { ret . add ( nameSpaceToObjectMapper . fromNameSpace ( subNamespace . copyNamespace ( activeNamespace ) ) ) ; } else { throw new ParameterException ( "Expected namespace " + baseNamespace + DELIM + activeNamespace + "to exist because of value of " + activeNamespacesFeature + " but " + "it did not" ) ; } } return ret . build ( ) ; |
public class IOUtils { /** * < p > getStackTrace . < / p >
* @ param ex a { @ link java . lang . Throwable } object .
* @ return a { @ link java . lang . String } object . */
public static String getStackTrace ( Throwable ex ) { } } | StringWriter buf = new StringWriter ( ) ; ex . printStackTrace ( new PrintWriter ( buf ) ) ; return buf . toString ( ) ; |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link OrderAck }
* { @ code > } .
* @ param value the value
* @ return the JAXB element < order ack > */
@ XmlElementDecl ( namespace = "urn:switchyard-quickstart:bpm-service:1.0" , name = "submitOrderResponse" ) public JAXBElement < OrderAck > createOrderAck ( OrderAck value ) { } } | return new JAXBElement < OrderAck > ( ORDER_ACK_QNAME , OrderAck . class , null , value ) ; |
public class Switch { /** * Color of the right hand side of the switch . Legal values : ' primary ' ,
* ' info ' , ' success ' , ' warning ' , ' danger ' , ' default ' . Default value :
* ' primary ' .
* @ return Returns the value of the attribute , or null , if it hasn ' t been
* set by the JSF file . */
public String getOffColor ( ) { } } | String value = ( String ) getStateHelper ( ) . eval ( PropertyKeys . offColor ) ; return value ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.