signature
stringlengths 43
39.1k
| implementation
stringlengths 0
450k
|
|---|---|
public class FedoraAPIAImpl { /** * ( non - Javadoc )
* @ see
* org . fcrepo . server . access . FedoraAPIA # getDatastreamDissemination ( String pid
* , ) String dsID , ) String asOfDateTime ) * */
@ Override public org . fcrepo . server . types . gen . MIMETypedStream getDatastreamDissemination ( String pid , String dsID , String asOfDateTime ) { } }
|
MessageContext ctx = context . getMessageContext ( ) ; Context context = ReadOnlyContext . getSoapContext ( ctx ) ; assertInitialized ( ) ; try { org . fcrepo . server . storage . types . MIMETypedStream mimeTypedStream = m_access . getDatastreamDissemination ( context , pid , dsID , DateUtility . parseDateOrNull ( asOfDateTime ) ) ; org . fcrepo . server . types . gen . MIMETypedStream genMIMETypedStream = TypeUtility . convertMIMETypedStreamToGenMIMETypedStream ( mimeTypedStream ) ; return genMIMETypedStream ; } catch ( OutOfMemoryError oome ) { LOG . error ( "Out of memory error getting " + dsID + " datastream dissemination for " + pid ) ; String exceptionText = "The datastream you are attempting to retrieve is too large " + "to transfer via getDatastreamDissemination (as determined " + "by the server memory allocation.) Consider retrieving this " + "datastream via REST at: " ; String restURL = describeRepository ( ) . getRepositoryBaseURL ( ) + "/get/" + pid + "/" + dsID ; throw CXFUtility . getFault ( new Exception ( exceptionText + restURL ) ) ; } catch ( Throwable th ) { LOG . error ( "Error getting datastream dissemination" , th ) ; throw CXFUtility . getFault ( th ) ; }
|
public class AnalyzedTokenReadings { /** * Removes all readings but the one that matches the token given .
* @ param token Token to be matched
* @ since 1.5 */
public void leaveReading ( AnalyzedToken token ) { } }
|
List < AnalyzedToken > l = new ArrayList < > ( ) ; AnalyzedToken tmpTok = new AnalyzedToken ( token . getToken ( ) , token . getPOSTag ( ) , token . getLemma ( ) ) ; tmpTok . setWhitespaceBefore ( isWhitespaceBefore ) ; for ( AnalyzedToken anTokReading : anTokReadings ) { if ( anTokReading . matches ( tmpTok ) ) { l . add ( anTokReading ) ; } } if ( l . isEmpty ( ) ) { l . add ( new AnalyzedToken ( this . token , null , null ) ) ; l . get ( 0 ) . setWhitespaceBefore ( isWhitespaceBefore ) ; } anTokReadings = l . toArray ( new AnalyzedToken [ 0 ] ) ; setNoRealPOStag ( ) ; hasSameLemmas = areLemmasSame ( ) ;
|
public class TagletManager { /** * Check the taglet to see if it is a legacy taglet . Also
* check its name for errors . */
private void checkTaglet ( Object taglet ) { } }
|
if ( taglet instanceof Taglet ) { checkTagName ( ( ( Taglet ) taglet ) . getName ( ) ) ; } else if ( taglet instanceof jdk . javadoc . doclet . Taglet ) { jdk . javadoc . doclet . Taglet legacyTaglet = ( jdk . javadoc . doclet . Taglet ) taglet ; customTags . remove ( legacyTaglet . getName ( ) ) ; customTags . put ( legacyTaglet . getName ( ) , new UserTaglet ( legacyTaglet ) ) ; checkTagName ( legacyTaglet . getName ( ) ) ; } else { throw new IllegalArgumentException ( "Given object is not a taglet." ) ; }
|
public class BlobContainersInner { /** * Lists all containers and does not support a prefix like data plane . Also SRP today does not return continuation token .
* @ param resourceGroupName The name of the resource group within the user ' s subscription . The name is case insensitive .
* @ param accountName The name of the storage account within the specified resource group . Storage account names must be between 3 and 24 characters in length and use numbers and lower - case letters only .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the ListContainerItemsInner object */
public Observable < ListContainerItemsInner > listAsync ( String resourceGroupName , String accountName ) { } }
|
return listWithServiceResponseAsync ( resourceGroupName , accountName ) . map ( new Func1 < ServiceResponse < ListContainerItemsInner > , ListContainerItemsInner > ( ) { @ Override public ListContainerItemsInner call ( ServiceResponse < ListContainerItemsInner > response ) { return response . body ( ) ; } } ) ;
|
public class XmlEmit { /** * Private methods */
private void quote ( final String val ) throws IOException { } }
|
if ( val . indexOf ( "\"" ) < 0 ) { value ( val , "\"" ) ; } else { value ( val , "'" ) ; }
|
public class Director { /** * Uninstalls the ids
* @ param ids Collection of ids to uninstall
* @ param force If uninstallation should be forced
* @ throws InstallException */
public void uninstall ( Collection < String > ids , boolean force ) throws InstallException { } }
|
getUninstallDirector ( ) . uninstall ( ids , force ) ;
|
public class CmsObjectWrapper { /** * Creates a new resource of the given resource type with the provided content and properties . < p >
* Iterates through all configured resource wrappers till the first returns not < code > null < / code > . < p >
* @ see I _ CmsResourceWrapper # createResource ( CmsObject , String , int , byte [ ] , List )
* @ see CmsObject # createResource ( String , int , byte [ ] , List )
* @ param resourcename the name of the resource to create ( full path )
* @ param type the type of the resource to create
* @ param content the contents for the new resource
* @ param properties the properties for the new resource
* @ return the created resource
* @ throws CmsException if something goes wrong
* @ throws CmsIllegalArgumentException if the < code > resourcename < / code > argument is null or of length 0 */
public CmsResource createResource ( String resourcename , int type , byte [ ] content , List < CmsProperty > properties ) throws CmsException , CmsIllegalArgumentException { } }
|
CmsResource res = null ; // iterate through all wrappers and call " createResource " till one does not return null
List < I_CmsResourceWrapper > wrappers = getWrappers ( ) ; Iterator < I_CmsResourceWrapper > iter = wrappers . iterator ( ) ; while ( iter . hasNext ( ) ) { I_CmsResourceWrapper wrapper = iter . next ( ) ; res = wrapper . createResource ( m_cms , resourcename , type , content , properties ) ; if ( res != null ) { break ; } } // delegate the call to the CmsObject
if ( res == null ) { res = m_cms . createResource ( resourcename , type , content , properties ) ; } return res ;
|
public class InUseStateAggregator { /** * Update the in - use state of an object . Initially no object is in use .
* < p > This may call into { @ link # handleInUse } or { @ link # handleNotInUse } when appropriate . */
public final void updateObjectInUse ( T object , boolean inUse ) { } }
|
int origSize = inUseObjects . size ( ) ; if ( inUse ) { inUseObjects . add ( object ) ; if ( origSize == 0 ) { handleInUse ( ) ; } } else { boolean removed = inUseObjects . remove ( object ) ; if ( removed && origSize == 1 ) { handleNotInUse ( ) ; } }
|
public class HtmlLinkRendererBase { /** * Can be overwritten by derived classes to overrule the style class to be used . */
protected String getStyleClass ( FacesContext facesContext , UIComponent link ) { } }
|
if ( link instanceof HtmlCommandLink ) { return ( ( HtmlCommandLink ) link ) . getStyleClass ( ) ; } return ( String ) link . getAttributes ( ) . get ( HTML . STYLE_CLASS_ATTR ) ;
|
public class Logger { /** * Log a FINEST message .
* If the logger is currently enabled for the FINEST message
* level then the given message is forwarded to all the
* registered output Handler objects .
* @ param msg The string message ( or a key in the message catalog ) */
public void finest ( String msg ) { } }
|
if ( Level . FINEST . intValue ( ) < levelValue ) { return ; } log ( Level . FINEST , msg ) ;
|
public class ComponentFactory { /** * Factory method for create a new { @ link DropDownChoice } .
* @ param < T >
* the generic type of the { @ link DropDownChoice }
* @ param id
* the id
* @ param model
* the model
* @ param choices
* The collection of choices in the dropdown
* @ return the new { @ link DropDownChoice } . */
public static < T > DropDownChoice < T > newDropDownChoice ( final String id , final IModel < T > model , final List < ? extends T > choices ) { } }
|
final DropDownChoice < T > dropDownChoice = new DropDownChoice < > ( id , model , choices ) ; dropDownChoice . setOutputMarkupId ( true ) ; return dropDownChoice ;
|
public class AbstractInterval { /** * Does this time interval overlap the specified time interval .
* Intervals are inclusive of the start instant and exclusive of the end .
* An interval overlaps another if it shares some common part of the
* datetime continuum .
* When two intervals are compared the result is one of three states :
* ( a ) they abut , ( b ) there is a gap between them , ( c ) they overlap .
* The abuts state takes precedence over the other two , thus a zero duration
* interval at the start of a larger interval abuts and does not overlap .
* For example :
* < pre >
* [ 09:00 to 10:00 ) overlaps [ 08:00 to 08:30 ) = false ( completely before )
* [ 09:00 to 10:00 ) overlaps [ 08:00 to 09:00 ) = false ( abuts before )
* [ 09:00 to 10:00 ) overlaps [ 08:00 to 09:30 ) = true
* [ 09:00 to 10:00 ) overlaps [ 08:00 to 10:00 ) = true
* [ 09:00 to 10:00 ) overlaps [ 08:00 to 11:00 ) = true
* [ 09:00 to 10:00 ) overlaps [ 09:00 to 09:00 ) = false ( abuts before )
* [ 09:00 to 10:00 ) overlaps [ 09:00 to 09:30 ) = true
* [ 09:00 to 10:00 ) overlaps [ 09:00 to 10:00 ) = true
* [ 09:00 to 10:00 ) overlaps [ 09:00 to 11:00 ) = true
* [ 09:00 to 10:00 ) overlaps [ 09:30 to 09:30 ) = true
* [ 09:00 to 10:00 ) overlaps [ 09:30 to 10:00 ) = true
* [ 09:00 to 10:00 ) overlaps [ 09:30 to 11:00 ) = true
* [ 09:00 to 10:00 ) overlaps [ 10:00 to 10:00 ) = false ( abuts after )
* [ 09:00 to 10:00 ) overlaps [ 10:00 to 11:00 ) = false ( abuts after )
* [ 09:00 to 10:00 ) overlaps [ 10:30 to 11:00 ) = false ( completely after )
* [ 14:00 to 14:00 ) overlaps [ 14:00 to 14:00 ) = false ( abuts before and after )
* [ 14:00 to 14:00 ) overlaps [ 13:00 to 15:00 ) = true
* < / pre >
* @ param interval the time interval to compare to , null means a zero length interval now
* @ return true if the time intervals overlap */
public boolean overlaps ( ReadableInterval interval ) { } }
|
long thisStart = getStartMillis ( ) ; long thisEnd = getEndMillis ( ) ; if ( interval == null ) { long now = DateTimeUtils . currentTimeMillis ( ) ; return ( thisStart < now && now < thisEnd ) ; } else { long otherStart = interval . getStartMillis ( ) ; long otherEnd = interval . getEndMillis ( ) ; return ( thisStart < otherEnd && otherStart < thisEnd ) ; }
|
public class MetricsPlugin { /** * Set the ' X - Response - Time ' header to the response time in milliseconds . */
@ Override public void process ( Request request , Response response ) { } }
|
Long duration = computeDurationMillis ( START_TIMES_BY_CORRELATION_ID . get ( request . getCorrelationId ( ) ) ) ; if ( duration != null && duration . longValue ( ) > 0 ) { response . addHeader ( "X-Response-Time" , String . valueOf ( duration ) ) ; }
|
public class StreamSummaryMarshaller { /** * Marshall the given parameter object . */
public void marshall ( StreamSummary streamSummary , ProtocolMarshaller protocolMarshaller ) { } }
|
if ( streamSummary == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( streamSummary . getStreamId ( ) , STREAMID_BINDING ) ; protocolMarshaller . marshall ( streamSummary . getStreamArn ( ) , STREAMARN_BINDING ) ; protocolMarshaller . marshall ( streamSummary . getStreamVersion ( ) , STREAMVERSION_BINDING ) ; protocolMarshaller . marshall ( streamSummary . getDescription ( ) , DESCRIPTION_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
public class SimpleInternalFrame { /** * Updates the header . */
private void updateHeader ( ) { } }
|
gradientPanel . setBackground ( getHeaderBackground ( ) ) ; gradientPanel . setOpaque ( isSelected ( ) ) ; titleLabel . setForeground ( getTextForeground ( isSelected ( ) ) ) ; headerPanel . repaint ( ) ;
|
public class JavaParser { /** * src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 676:1 : defaultValue : ' default ' elementValue ; */
public final void defaultValue ( ) throws RecognitionException { } }
|
int defaultValue_StartIndex = input . index ( ) ; try { if ( state . backtracking > 0 && alreadyParsedRule ( input , 79 ) ) { return ; } // src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 677:6 : ( ' default ' elementValue )
// src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 677:8 : ' default ' elementValue
{ match ( input , 74 , FOLLOW_74_in_defaultValue2721 ) ; if ( state . failed ) return ; pushFollow ( FOLLOW_elementValue_in_defaultValue2723 ) ; elementValue ( ) ; state . _fsp -- ; if ( state . failed ) return ; } } catch ( RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { // do for sure before leaving
if ( state . backtracking > 0 ) { memoize ( input , 79 , defaultValue_StartIndex ) ; } }
|
public class Console { /** * 打印进度条
* @ param showChar 进度条提示字符 , 例如 “ # ”
* @ param totalLen 总长度
* @ param rate 总长度所占比取值0 ~ 1
* @ since 4.5.6 */
public static void printProgress ( char showChar , int totalLen , double rate ) { } }
|
Assert . isTrue ( rate >= 0 && rate <= 1 , "Rate must between 0 and 1 (both include)" ) ; printProgress ( showChar , ( int ) ( totalLen * rate ) ) ;
|
public class WebcamComposite { /** * Open webcam and start rendering . */
public void start ( ) { } }
|
if ( ! started . compareAndSet ( false , true ) ) { return ; } LOG . debug ( "Starting panel rendering and trying to open attached webcam" ) ; starting = true ; if ( updater == null ) { updater = new ImageUpdater ( ) ; } updater . start ( ) ; try { errored = ! webcam . open ( ) ; } catch ( WebcamException e ) { errored = true ; Display . getDefault ( ) . syncExec ( new Runnable ( ) { @ Override public void run ( ) { redraw ( ) ; } } ) ; throw e ; } finally { starting = false ; }
|
public class BaseBigtableTableAdminClient { /** * Lists all tables served from a specified instance .
* < p > Sample code :
* < pre > < code >
* try ( BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient . create ( ) ) {
* InstanceName parent = InstanceName . of ( " [ PROJECT ] " , " [ INSTANCE ] " ) ;
* for ( Table element : baseBigtableTableAdminClient . listTables ( parent . toString ( ) ) . iterateAll ( ) ) {
* / / doThingsWith ( element ) ;
* < / code > < / pre >
* @ param parent The unique name of the instance for which tables should be listed . Values are of
* the form ` projects / & lt ; project & gt ; / instances / & lt ; instance & gt ; ` .
* @ throws com . google . api . gax . rpc . ApiException if the remote call fails */
public final ListTablesPagedResponse listTables ( String parent ) { } }
|
ListTablesRequest request = ListTablesRequest . newBuilder ( ) . setParent ( parent ) . build ( ) ; return listTables ( request ) ;
|
public class LeaseRenewal { /** * Computes the renewal period for the lease .
* @ return the renewal period in ms */
private long computeRenewalPeriod ( ) { } }
|
long hardLeaseLimit = conf . getLong ( FSConstants . DFS_HARD_LEASE_KEY , FSConstants . LEASE_HARDLIMIT_PERIOD ) ; long softLeaseLimit = conf . getLong ( FSConstants . DFS_SOFT_LEASE_KEY , FSConstants . LEASE_SOFTLIMIT_PERIOD ) ; long renewal = Math . min ( hardLeaseLimit , softLeaseLimit ) / 2 ; long hdfsTimeout = Client . getTimeout ( conf ) ; if ( hdfsTimeout > 0 ) { renewal = Math . min ( renewal , hdfsTimeout / 2 ) ; } return renewal ;
|
public class PageLayoutStyle { /** * Write the XML format for this object . < br >
* This is used while writing the ODS file .
* @ param util a util to write XML
* @ param appendable where to write
* @ throws IOException If an I / O error occurs */
public void appendXMLToAutomaticStyle ( final XMLUtil util , final Appendable appendable ) throws IOException { } }
|
appendable . append ( "<style:page-layout" ) ; util . appendEAttribute ( appendable , "style:name" , this . name ) ; appendable . append ( "><style:page-layout-properties" ) ; util . appendAttribute ( appendable , "fo:page-width" , this . pageWidth . toString ( ) ) ; util . appendAttribute ( appendable , "fo:page-height" , this . pageHeight . toString ( ) ) ; util . appendEAttribute ( appendable , "style:num-format" , this . numFormat ) ; util . appendAttribute ( appendable , "style:writing-mode" , this . writingMode . getAttrValue ( ) ) ; util . appendAttribute ( appendable , "style:print-orientation" , this . printOrientation . getAttrValue ( ) ) ; this . appendBackgroundColor ( util , appendable ) ; this . margins . appendXMLContent ( util , appendable ) ; appendable . append ( "/>" ) ; // End of page - layout - properties
PageSection . appendPageSectionStyleXMLToAutomaticStyle ( this . header , util , appendable ) ; PageSection . appendPageSectionStyleXMLToAutomaticStyle ( this . footer , util , appendable ) ; appendable . append ( "</style:page-layout>" ) ;
|
public class Document { /** * Sets the page number .
* @ param pageN
* the new page number */
public void setPageCount ( int pageN ) { } }
|
this . pageN = pageN ; DocListener listener ; for ( Iterator iterator = listeners . iterator ( ) ; iterator . hasNext ( ) ; ) { listener = ( DocListener ) iterator . next ( ) ; listener . setPageCount ( pageN ) ; }
|
public class AsyncUfsAbsentPathCache { /** * Processes and checks the existence of the corresponding ufs path for the given Alluxio path .
* @ param alluxioUri the Alluxio path to process
* @ param mountInfo the associated { @ link MountInfo } for the Alluxio path
* @ return if true , further traversal of the descendant paths should continue */
private boolean processSinglePath ( AlluxioURI alluxioUri , MountInfo mountInfo ) { } }
|
PathLock pathLock = new PathLock ( ) ; Lock writeLock = pathLock . writeLock ( ) ; Lock readLock = null ; try { // Write lock this path , to only enable a single task per path
writeLock . lock ( ) ; PathLock existingLock = mCurrentPaths . putIfAbsent ( alluxioUri . getPath ( ) , pathLock ) ; if ( existingLock != null ) { // Another thread already locked this path and is processing it . Wait for the other
// thread to finish , by locking the existing read lock .
writeLock . unlock ( ) ; writeLock = null ; readLock = existingLock . readLock ( ) ; readLock . lock ( ) ; if ( mCache . getIfPresent ( alluxioUri . getPath ( ) ) != null ) { // This path is already in the cache ( is absent ) . Further traversal is unnecessary .
return false ; } } else { // This thread has the exclusive lock for this path .
// Resolve this Alluxio uri . It should match the original mount id .
MountTable . Resolution resolution = mMountTable . resolve ( alluxioUri ) ; if ( resolution . getMountId ( ) != mountInfo . getMountId ( ) ) { // This mount point has changed . Further traversal is unnecessary .
return false ; } boolean existsInUfs ; try ( CloseableResource < UnderFileSystem > ufsResource = resolution . acquireUfsResource ( ) ) { UnderFileSystem ufs = ufsResource . get ( ) ; existsInUfs = ufs . exists ( resolution . getUri ( ) . toString ( ) ) ; } if ( existsInUfs ) { // This ufs path exists . Remove the cache entry .
mCache . invalidate ( alluxioUri . getPath ( ) ) ; } else { // This is the first ufs path which does not exist . Add it to the cache .
mCache . put ( alluxioUri . getPath ( ) , mountInfo . getMountId ( ) ) ; if ( pathLock . isInvalidate ( ) ) { // This path was marked to be invalidated , meaning this UFS path was just created ,
// and now exists . Invalidate the entry .
// This check is necessary to avoid the race with the invalidating thread .
mCache . invalidate ( alluxioUri . getPath ( ) ) ; } else { // Further traversal is unnecessary .
return false ; } } } } catch ( InvalidPathException | IOException e ) { LOG . warn ( "Processing path failed: " + alluxioUri , e ) ; return false ; } finally { // Unlock the path
if ( readLock != null ) { readLock . unlock ( ) ; } if ( writeLock != null ) { mCurrentPaths . remove ( alluxioUri . getPath ( ) , pathLock ) ; writeLock . unlock ( ) ; } } return true ;
|
public class ApptentiveNestedScrollView { /** * Handle scrolling in response to an up or down arrow click .
* @ param direction The direction corresponding to the arrow key that was
* pressed
* @ return True if we consumed the event , false otherwise */
public boolean arrowScroll ( int direction ) { } }
|
View currentFocused = findFocus ( ) ; if ( currentFocused == this ) currentFocused = null ; View nextFocused = FocusFinder . getInstance ( ) . findNextFocus ( this , currentFocused , direction ) ; final int maxJump = getMaxScrollAmount ( ) ; if ( nextFocused != null && isWithinDeltaOfScreen ( nextFocused , maxJump , getHeight ( ) ) ) { nextFocused . getDrawingRect ( mTempRect ) ; offsetDescendantRectToMyCoords ( nextFocused , mTempRect ) ; int scrollDelta = computeScrollDeltaToGetChildRectOnScreen ( mTempRect ) ; doScrollY ( scrollDelta ) ; nextFocused . requestFocus ( direction ) ; } else { // no new focus
int scrollDelta = maxJump ; if ( direction == View . FOCUS_UP && getScrollY ( ) < scrollDelta ) { scrollDelta = getScrollY ( ) ; } else if ( direction == View . FOCUS_DOWN ) { if ( getChildCount ( ) > 0 ) { int daBottom = getChildAt ( 0 ) . getBottom ( ) ; int screenBottom = getScrollY ( ) + getHeight ( ) - getPaddingBottom ( ) ; if ( daBottom - screenBottom < maxJump ) { scrollDelta = daBottom - screenBottom ; } } } if ( scrollDelta == 0 ) { return false ; } doScrollY ( direction == View . FOCUS_DOWN ? scrollDelta : - scrollDelta ) ; } if ( currentFocused != null && currentFocused . isFocused ( ) && isOffScreen ( currentFocused ) ) { // previously focused item still has focus and is off screen , give
// it up ( take it back to ourselves )
// ( also , need to temporarily force FOCUS _ BEFORE _ DESCENDANTS so we are
// sure to
// get it )
final int descendantFocusability = getDescendantFocusability ( ) ; // save
setDescendantFocusability ( ViewGroup . FOCUS_BEFORE_DESCENDANTS ) ; requestFocus ( ) ; setDescendantFocusability ( descendantFocusability ) ; // restore
} return true ;
|
public class SRTServletRequest { /** * / * ( non - Javadoc )
* @ see javax . servlet . ServletRequest # setCharacterEncoding ( java . lang . String ) */
public void setCharacterEncoding ( String arg0 ) throws UnsupportedEncodingException { } }
|
if ( WCCustomProperties . CHECK_REQUEST_OBJECT_IN_USE ) { checkRequestObjectInUse ( ) ; } // 321485
if ( ! enableSetCharacterEncodingAfterGetReader ) { if ( _srtRequestHelper . _gotReader ) { // Servlet 2.5
if ( TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "setCharacterEncoding" , "this->" + this + ": " + " call ignored, already got reader" ) ; } return ; } } // PM03928
if ( disableSetCharacterEncodingAfterParametersRead && _srtRequestHelper . _parametersRead ) { if ( TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "setCharacterEncoding" , "this->" + this + ": " + " name --> " + arg0 + " is ignored, already parsed data" ) ; } return ; } // PM03928
boolean isSupported = EncodingUtils . isCharsetSupported ( arg0 ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { // 306998.15
logger . logp ( Level . FINE , CLASS_NAME , "setCharacterEncoding" , "this->" + this + ": " + " name --> " + arg0 + " isSupported --> " + String . valueOf ( isSupported ) ) ; } if ( isSupported ) { _srtRequestHelper . _characterEncoding = arg0 ; } else { String msg = nls . getFormattedMessage ( "unsupported.request.encoding.[{0}]" , new Object [ ] { arg0 } , "Unsupported encoding specified --> " + arg0 ) ; throw new UnsupportedEncodingException ( msg ) ; }
|
public class PrintStmt { /** * Gets the multi print .
* @ return the multi print
* @ throws EFapsException on error */
private MultiPrintQuery getMultiPrint ( ) throws EFapsException { } }
|
final MultiPrintQuery ret ; if ( getInstances ( ) . isEmpty ( ) ) { ret = new MultiPrintQuery ( QueryBldrUtil . getInstances ( this ) ) ; } else { final List < Instance > instances = new ArrayList < > ( ) ; for ( final String oid : getInstances ( ) ) { instances . add ( Instance . get ( oid ) ) ; } ret = new MultiPrintQuery ( instances ) ; } return ret ;
|
public class SessionManager { /** * Method shutdown */
@ Override public void shutdown ( ) { } }
|
ArrayList mbeanSvrs = MBeanServerFactory . findMBeanServer ( null ) ; if ( mbeanSvrs != null && mbeanSvrs . size ( ) > 0 && _statsModuleObjectName != null ) { MBeanServer svr = ( MBeanServer ) mbeanSvrs . get ( 0 ) ; try { svr . unregisterMBean ( _statsModuleObjectName ) ; } catch ( InstanceNotFoundException e ) { com . ibm . ws . ffdc . FFDCFilter . processException ( e , "com.ibm.ws.session.SessionManager.shutdown" , "263" , this ) ; LoggingUtil . SESSION_LOGGER_CORE . logp ( Level . SEVERE , methodClassName , methodNames [ SHUTDOWN ] , "CommonMessage.exception" , e ) ; } catch ( MBeanRegistrationException e ) { com . ibm . ws . ffdc . FFDCFilter . processException ( e , "com.ibm.ws.session.SessionManager.shutdown" , "265" , this ) ; LoggingUtil . SESSION_LOGGER_CORE . logp ( Level . SEVERE , methodClassName , methodNames [ SHUTDOWN ] , "CommonMessage.exception" , e ) ; } }
|
public class EJBJavaColonNamingHelper { /** * Internal method that creates a NamingException that contains cause
* information regarding why a binding failed to resolve . < p >
* The returned exception will provide similar information as the
* CannotInstantiateObjectException from traditional WAS . */
private NamingException throwCannotInstanciateObjectException ( EJBBinding binding , JavaColonNamespace jndiType , String lookupName , Throwable cause ) throws NamingException { } }
|
String jndiName = jndiType . toString ( ) + "/" + lookupName ; J2EEName j2eeName = getJ2EEName ( binding ) ; Object causeMsg = cause . getLocalizedMessage ( ) ; if ( causeMsg == null ) { causeMsg = cause . toString ( ) ; } String msgTxt = Tr . formatMessage ( tc , "JNDI_CANNOT_INSTANTIATE_OBJECT_CNTR4007E" , binding . interfaceName , j2eeName . getComponent ( ) , j2eeName . getModule ( ) , j2eeName . getApplication ( ) , jndiName , causeMsg ) ; NamingException nex = new NamingException ( msgTxt ) ; nex . initCause ( cause ) ; throw nex ;
|
public class AppLinks { /** * Gets the App Link extras for an intent , if there is any .
* @ param intent the incoming intent .
* @ return a bundle containing the App Link extras for the intent , or { @ code null } if none is
* specified . */
public static Bundle getAppLinkExtras ( Intent intent ) { } }
|
Bundle appLinkData = getAppLinkData ( intent ) ; if ( appLinkData == null ) { return null ; } return appLinkData . getBundle ( KEY_NAME_EXTRAS ) ;
|
public class UpdateEmailChannelRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( UpdateEmailChannelRequest updateEmailChannelRequest , ProtocolMarshaller protocolMarshaller ) { } }
|
if ( updateEmailChannelRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateEmailChannelRequest . getApplicationId ( ) , APPLICATIONID_BINDING ) ; protocolMarshaller . marshall ( updateEmailChannelRequest . getEmailChannelRequest ( ) , EMAILCHANNELREQUEST_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
public class SessionPool { /** * Releases a session back to the pool . This might cause one of the waiters to be unblocked .
* < p > Implementation note :
* < ol >
* < li > If there are no pending waiters , either add to the read sessions queue or start preparing
* for write depending on what fraction of sessions are already prepared for writes .
* < li > Otherwise either unblock a waiting reader or start preparing for a write . Exact strategy
* on which option we chose , in case there are both waiting readers and writers , is
* implemented in { @ link # shouldUnblockReader }
* < / ol > */
private void releaseSession ( PooledSession session ) { } }
|
Preconditions . checkNotNull ( session ) ; synchronized ( lock ) { if ( closureFuture != null ) { return ; } if ( readWaiters . size ( ) == 0 && numSessionsBeingPrepared >= readWriteWaiters . size ( ) ) { // No pending waiters
if ( shouldPrepareSession ( ) ) { prepareSession ( session ) ; } else { readSessions . add ( session ) ; } } else if ( shouldUnblockReader ( ) ) { readWaiters . poll ( ) . put ( session ) ; } else { prepareSession ( session ) ; } }
|
public class CLICommand { /** * Auto - discovers { @ link OptionHandler } s and add them to the given command line parser . */
protected void registerOptionHandlers ( ) { } }
|
try { for ( Class c : Index . list ( OptionHandlerExtension . class , Jenkins . getActiveInstance ( ) . pluginManager . uberClassLoader , Class . class ) ) { Type t = Types . getBaseClass ( c , OptionHandler . class ) ; CmdLineParser . registerHandler ( Types . erasure ( Types . getTypeArgument ( t , 0 ) ) , c ) ; } } catch ( IOException e ) { throw new Error ( e ) ; }
|
public class ServersDeserializer { /** * Gson invokes this call - back method during deserialization when it encounters a field of the specified type .
* @ param element The Json data being deserialized
* @ param type The type of the Object to deserialize to
* @ param context The JSON deserialization context
* @ return The servers */
@ Override public Collection < Server > deserialize ( JsonElement element , Type type , JsonDeserializationContext context ) throws JsonParseException { } }
|
JsonObject obj = element . getAsJsonObject ( ) ; JsonArray servers = obj . getAsJsonArray ( "servers" ) ; List < Server > values = new ArrayList < Server > ( ) ; if ( servers != null && servers . isJsonArray ( ) ) { for ( JsonElement server : servers ) values . add ( gson . fromJson ( server , Server . class ) ) ; } return values ;
|
public class JMessageClient { /** * Add Users to black list
* @ param username The owner of the black list
* @ param users The users that will add to black list
* @ return add users to black list
* @ throws APIConnectionException connect exception
* @ throws APIRequestException request exception */
public ResponseWrapper addBlackList ( String username , String ... users ) throws APIConnectionException , APIRequestException { } }
|
return _userClient . addBlackList ( username , users ) ;
|
public class Bits { /** * Writes a string to buf . The length of the string is written first , followed by the chars ( as single - byte values ) .
* Multi - byte values are truncated : only the lower byte of each multi - byte char is written , similar to
* { @ link DataOutput # writeChars ( String ) } .
* @ param s the string
* @ param buf the buffer */
public static void writeString ( String s , ByteBuffer buf ) { } }
|
buf . put ( ( byte ) ( s != null ? 1 : 0 ) ) ; if ( s != null ) { byte [ ] bytes = s . getBytes ( ) ; writeInt ( bytes . length , buf ) ; buf . put ( bytes ) ; }
|
public class Cache { /** * Checks whether the cache contains the given resource .
* @ param resource
* the resource whose existence in the cache is to be checked .
* @ return
* < code > true < / code > if the resource exists in the cache , < code > false
* < / code > otherwise . */
public boolean contains ( String resource ) { } }
|
boolean result = storage . contains ( resource ) ; logger . debug ( "resource '{}' {} in cache" , resource , ( result ? "is" : "is not" ) ) ; return result ;
|
public class ListEndpointConfigsResult { /** * An array of endpoint configurations .
* @ param endpointConfigs
* An array of endpoint configurations . */
public void setEndpointConfigs ( java . util . Collection < EndpointConfigSummary > endpointConfigs ) { } }
|
if ( endpointConfigs == null ) { this . endpointConfigs = null ; return ; } this . endpointConfigs = new java . util . ArrayList < EndpointConfigSummary > ( endpointConfigs ) ;
|
public class ServletUtil { /** * Gets the current request URI in context - relative form . The contextPath stripped . */
public static String getContextRequestUri ( HttpServletRequest request ) { } }
|
String requestUri = request . getRequestURI ( ) ; String contextPath = request . getContextPath ( ) ; int cpLen = contextPath . length ( ) ; if ( cpLen > 0 ) { assert requestUri . startsWith ( contextPath ) ; return requestUri . substring ( cpLen ) ; } else { return requestUri ; }
|
public class IncrementalSAXSource_Filter { /** * co _ entry _ pause is called in startDocument ( ) before anything else
* happens . It causes the filter to wait for a " go ahead " request
* from the controller before delivering any events . Note that
* the very first thing the controller tells us may be " I don ' t
* need events after all " ! */
private void co_entry_pause ( ) throws SAXException { } }
|
if ( fCoroutineManager == null ) { // Nobody called init ( ) ? Do it now . . .
init ( null , - 1 , - 1 ) ; } try { Object arg = fCoroutineManager . co_entry_pause ( fSourceCoroutineID ) ; if ( arg == Boolean . FALSE ) co_yield ( false ) ; } catch ( NoSuchMethodException e ) { // Coroutine system says we haven ' t registered . That ' s an
// application coding error , and is unrecoverable .
if ( DEBUG ) e . printStackTrace ( ) ; throw new SAXException ( e ) ; }
|
public class TemplateManager { /** * This method manually applies preprocessors to template models that have just been parsed or obtained from
* cache . This is needed for fragments , just before these fragments ( coming from templates , not simply parsed
* text ) are returned to whoever needs them ( usually the fragment insertion mechanism ) .
* NOTE that PRE - PROCESSOR INSTANCES ARE NOT SHARED among the different fragments being inserted
* in a template ( or between fragments and the main template ) . The reason for this is that pre - processors are
* implementations of ITemplateHandler and therefore instances are inserted into processing chains that cannot
* be broken ( if a pre - processor is used for the main template its " next " step in the chain cannot be
* ' momentarily ' changed in order to be a fragment - building handler instead of the ProcessorTemplateHandler )
* The only way therefore among pre - processor instances to actually share information is by setting it into
* the context . */
private TemplateModel applyPreProcessorsIfNeeded ( final ITemplateContext context , final TemplateModel templateModel ) { } }
|
final TemplateData templateData = templateModel . getTemplateData ( ) ; if ( this . configuration . getPreProcessors ( templateData . getTemplateMode ( ) ) . isEmpty ( ) ) { return templateModel ; } final IEngineContext engineContext = EngineContextManager . prepareEngineContext ( this . configuration , templateData , context . getTemplateResolutionAttributes ( ) , context ) ; final ModelBuilderTemplateHandler builderHandler = new ModelBuilderTemplateHandler ( this . configuration , templateData ) ; final ITemplateHandler processingHandlerChain = createTemplateProcessingHandlerChain ( engineContext , true , false , builderHandler , null ) ; templateModel . process ( processingHandlerChain ) ; EngineContextManager . disposeEngineContext ( engineContext ) ; return builderHandler . getModel ( ) ;
|
public class SuggestModel { /** * The documents that match the query string .
* @ return The documents that match the query string . */
public java . util . List < SuggestionMatch > getSuggestions ( ) { } }
|
if ( suggestions == null ) { suggestions = new com . amazonaws . internal . SdkInternalList < SuggestionMatch > ( ) ; } return suggestions ;
|
public class CheckArg { /** * Check that the argument is not NaN .
* @ param argument The argument
* @ param name The name of the argument
* @ throws IllegalArgumentException If argument is NaN */
public static void isNotNan ( double argument , String name ) { } }
|
if ( Double . isNaN ( argument ) ) { throw new IllegalArgumentException ( CommonI18n . argumentMustBeNumber . text ( name ) ) ; }
|
public class GeometryExtrude { /** * Create a polygon corresponding to the wall .
* @ param beginPoint
* @ param endPoint
* @ param height
* @ return */
private static Polygon extrudeEdge ( final Coordinate beginPoint , Coordinate endPoint , final double height , GeometryFactory factory ) { } }
|
beginPoint . z = Double . isNaN ( beginPoint . z ) ? 0 : beginPoint . z ; endPoint . z = Double . isNaN ( endPoint . z ) ? 0 : endPoint . z ; return factory . createPolygon ( new Coordinate [ ] { beginPoint , new Coordinate ( beginPoint . x , beginPoint . y , beginPoint . z + height ) , new Coordinate ( endPoint . x , endPoint . y , endPoint . z + height ) , endPoint , beginPoint } ) ;
|
public class SupportMenuInflater { /** * Inflate a menu hierarchy from the specified XML resource . Throws
* { @ link InflateException } if there is an error .
* @ param menuRes Resource ID for an XML layout resource to load ( e . g . ,
* < code > R . menu . main _ activity < / code > )
* @ param menu The Menu to inflate into . The items and submenus will be
* added to this Menu . */
@ Override public void inflate ( int menuRes , Menu menu ) { } }
|
// If we ' re not dealing with a SupportMenu instance , let super handle
if ( ! ( menu instanceof SupportMenu ) ) { super . inflate ( menuRes , menu ) ; return ; } XmlResourceParser parser = null ; try { parser = mContext . getResources ( ) . getLayout ( menuRes ) ; AttributeSet attrs = Xml . asAttributeSet ( parser ) ; parseMenu ( parser , attrs , menu ) ; } catch ( XmlPullParserException e ) { throw new InflateException ( "Error inflating menu XML" , e ) ; } catch ( IOException e ) { throw new InflateException ( "Error inflating menu XML" , e ) ; } finally { if ( parser != null ) parser . close ( ) ; }
|
public class JSONObject { /** * Returns the value mapped by { @ code name } if it exists , coercing it if necessary .
* @ param name the name of the property
* @ return the value
* @ throws JSONException if no such mapping exists . */
public String getString ( String name ) throws JSONException { } }
|
Object object = get ( name ) ; String result = JSON . toString ( object ) ; if ( result == null ) { throw JSON . typeMismatch ( name , object , "String" ) ; } return result ;
|
public class ShortColumn { /** * { @ inheritDoc } */
@ Override protected int readData ( byte [ ] buffer , int offset ) { } }
|
FixedSizeItemsBlock data = new FixedSizeItemsBlock ( ) . read ( buffer , offset ) ; offset = data . getOffset ( ) ; byte [ ] [ ] rawData = data . getData ( ) ; m_data = new Integer [ rawData . length ] ; for ( int index = 0 ; index < rawData . length ; index ++ ) { m_data [ index ] = Integer . valueOf ( FastTrackUtility . getShort ( rawData [ index ] , 0 ) ) ; } return offset ;
|
public class SimpleParameter { /** * Returns a { @ link Parameter } representing the given formatting options of the specified
* formatting character . Note that a cached value may be returned .
* @ param index the index of the argument to be processed .
* @ param formatChar the basic formatting type .
* @ param options additional formatting options .
* @ return the immutable , thread safe parameter instance . */
public static SimpleParameter of ( int index , FormatChar formatChar , FormatOptions options ) { } }
|
// We can safely test FormatSpec with ' = = ' because the factory methods always return the default
// instance if applicable ( and the class has no visible constructors ) .
if ( index < MAX_CACHED_PARAMETERS && options . isDefault ( ) ) { return DEFAULT_PARAMETERS . get ( formatChar ) [ index ] ; } return new SimpleParameter ( index , formatChar , options ) ;
|
public class ContentElement { /** * Write the preamble into the given writer . Used by the MetaAndStylesElementsFlusher and by standard write method
* @ param util an XML util
* @ param writer the destination
* @ throws IOException if the preamble was not written */
public void writePreamble ( final XMLUtil util , final ZipUTF8Writer writer ) throws IOException { } }
|
writer . putNextEntry ( new ZipEntry ( "content.xml" ) ) ; writer . write ( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" ) ; writer . write ( "<office:document-content xmlns:office=\"urn:oasis:names:tc:opendocument:xmlns:office:1.0\" " + "xmlns:style=\"urn:oasis:names:tc:opendocument:xmlns:style:1.0\" " + "xmlns:text=\"urn:oasis:names:tc:opendocument:xmlns:text:1.0\" " + "xmlns:table=\"urn:oasis:names:tc:opendocument:xmlns:table:1.0\" " + "xmlns:draw=\"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0\" " + "xmlns:fo=\"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\" " + "xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" " + "xmlns:meta=\"urn:oasis:names:tc:opendocument:xmlns:meta:1.0\" " + "xmlns:number=\"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0\" " + "xmlns:presentation=\"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0\" " + "xmlns:svg=\"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0\" " + "xmlns:chart=\"urn:oasis:names:tc:opendocument:xmlns:chart:1.0\" " + "xmlns:dr3d=\"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0\" xmlns:math=\"http://www" + ".w3.org/1998/Math/MathML\" xmlns:form=\"urn:oasis:names:tc:opendocument:xmlns:form:1.0\" " + "xmlns:script=\"urn:oasis:names:tc:opendocument:xmlns:script:1.0\" " + "xmlns:ooo=\"http://openoffice.org/2004/office\" xmlns:ooow=\"http://openoffice" + ".org/2004/writer\" xmlns:oooc=\"http://openoffice.org/2004/calc\" xmlns:dom=\"http://www" + ".w3.org/2001/xml-events\" xmlns:xforms=\"http://www.w3.org/2002/xforms\" " + "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www" + ".w3.org/2001/XMLSchema-instance\" office:version=\"1.1\">" ) ; writer . write ( "<office:scripts/>" ) ; this . stylesContainer . writeFontFaceDecls ( util , writer ) ; writer . write ( "<office:automatic-styles>" ) ; this . stylesContainer . writeHiddenDataStyles ( util , writer ) ; this . stylesContainer . writeContentAutomaticStyles ( util , writer ) ; writer . write ( "</office:automatic-styles>" ) ; writer . write ( "<office:body>" ) ; writer . write ( "<office:spreadsheet>" ) ;
|
public class InstrumentedScheduledExecutorService { /** * { @ inheritDoc } */
@ Nonnull @ Override public < T > T invokeAny ( @ Nonnull Collection < ? extends Callable < T > > tasks ) throws InterruptedException , ExecutionException { } }
|
submitted . mark ( tasks . size ( ) ) ; Collection < ? extends Callable < T > > instrumented = instrument ( tasks ) ; return delegate . invokeAny ( instrumented ) ;
|
public class PluginController { /** * Obtain plugin information
* @ return */
@ RequestMapping ( value = "/api/plugins" , method = RequestMethod . GET ) public @ ResponseBody HashMap < String , Object > getPluginInformation ( ) { } }
|
return pluginInformation ( ) ;
|
public class Log { /** * Send a { @ link # VERBOSE } log message and log the exception .
* @ param tag
* Used to identify the source of a log message . It usually
* identifies the class or activity where the log call occurs .
* @ param msg
* The message you would like logged .
* @ param tr
* An exception to log */
public static int v ( String tag , String msg , Throwable tr ) { } }
|
collectLogEntry ( Constants . VERBOSE , tag , msg , tr ) ; if ( isLoggable ( tag , Constants . VERBOSE ) ) { return android . util . Log . v ( tag , msg , tr ) ; } return 0 ;
|
public class MethodInfo { /** * Add an inner class to this method .
* @ param innerClassName Optional short inner class name .
* @ param superClassName Full super class name . */
public ClassFile addInnerClass ( String innerClassName , String superClassName ) { } }
|
ClassFile inner ; if ( innerClassName == null ) { inner = mParent . addInnerClass ( null , null , superClassName ) ; } else { String fullInnerClassName = mParent . getClassName ( ) + '$' + ( ++ mAnonymousInnerClassCount ) + innerClassName ; inner = mParent . addInnerClass ( fullInnerClassName , innerClassName , superClassName ) ; } if ( mParent . getMajorVersion ( ) >= 49 ) { inner . addAttribute ( new EnclosingMethodAttr ( mCp , mCp . addConstantClass ( mParent . getClassName ( ) ) , mCp . addConstantNameAndType ( mNameConstant , mDescriptorConstant ) ) ) ; } return inner ;
|
public class BlockMover { /** * explicitly choose the target nodes .
* @ throws IOException */
public DatanodeInfo chooseTargetNodes ( Set < DatanodeInfo > excludedNodes ) throws IOException { } }
|
DatanodeInfo target = cluster . getNodeOnDifferentRack ( excludedNodes ) ; if ( target == null ) { throw new IOException ( "Error choose datanode" ) ; } return target ;
|
public class HistoricCalendar { /** * / * [ deutsch ]
* < p > Ermittelt den Wochentag . < / p >
* < p > Das Wochenmodell hat sich historisch nie ge & auml ; ndert ( au & szlig ; er in radikalen Kalenderreformen
* wie dem franz & ouml ; sischen Revolutionskalender ) . < / p >
* @ return Weekday */
public Weekday getDayOfWeek ( ) { } }
|
long utcDays = this . gregorian . getDaysSinceEpochUTC ( ) ; return Weekday . valueOf ( MathUtils . floorModulo ( utcDays + 5 , 7 ) + 1 ) ;
|
public class KinesisFirehoseInputMarshaller { /** * Marshall the given parameter object . */
public void marshall ( KinesisFirehoseInput kinesisFirehoseInput , ProtocolMarshaller protocolMarshaller ) { } }
|
if ( kinesisFirehoseInput == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( kinesisFirehoseInput . getResourceARN ( ) , RESOURCEARN_BINDING ) ; protocolMarshaller . marshall ( kinesisFirehoseInput . getRoleARN ( ) , ROLEARN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
public class NetUtils { /** * Encodes an IP address and port to be included in URL . in particular , this method makes
* sure that IPv6 addresses have the proper formatting to be included in URLs .
* @ param address The socket address with the IP address and port .
* @ return The proper URL string encoded IP address and port . */
public static String socketAddressToUrlString ( InetSocketAddress address ) { } }
|
if ( address . isUnresolved ( ) ) { throw new IllegalArgumentException ( "Address cannot be resolved: " + address . getHostString ( ) ) ; } return ipAddressAndPortToUrlString ( address . getAddress ( ) , address . getPort ( ) ) ;
|
public class DetectorStreamBufferImpl { /** * This method { @ link # remove ( long ) removes } or { @ link # skip ( long ) skips } the given number of bytes .
* @ param byteCount is the number of bytes to seek .
* @ param mode is the { @ link SeekMode } . */
protected void seek ( long byteCount , SeekMode mode ) { } }
|
if ( this . seekMode == null ) { this . seekMode = mode ; } else if ( this . seekMode != mode ) { // TODO : add dedicated exception or constructor to
// IllegalStateException . . .
throw new NlsIllegalArgumentException ( "remove and skip can NOT be mixed!" ) ; } this . seekCount = this . seekCount + byteCount ; if ( this . currentArray != null ) { // if removeCount was > 0 before , then currentArray had been null .
if ( mode == SeekMode . REMOVE ) { if ( this . currentArrayMin < this . currentArrayIndex ) { // there are bytes that have been consumed before remove was
// invoked . . .
ByteArray subArray = this . currentByteArray . createSubArray ( this . currentArrayMin , this . currentArrayIndex - 1 ) ; this . chainSuccessor . append ( subArray ) ; this . currentArrayMin = this . currentArrayIndex ; } } long currentBytesAvailable = this . currentArrayMax - this . currentArrayIndex + 1 ; if ( currentBytesAvailable > this . seekCount ) { this . currentArrayIndex = ( int ) ( this . currentArrayIndex + this . seekCount ) ; this . seekCount = 0 ; this . seekMode = null ; if ( mode == SeekMode . REMOVE ) { this . currentArrayMin = this . currentArrayIndex ; } } else { this . seekCount = this . seekCount - currentBytesAvailable ; nextArray ( ) ; if ( this . seekCount == 0 ) { this . seekMode = null ; } } }
|
public class KunderaCriteriaBuilder { /** * ( non - Javadoc )
* @ see
* javax . persistence . criteria . CriteriaBuilder # concat ( javax . persistence . criteria
* . Expression , javax . persistence . criteria . Expression ) */
@ Override public Expression < String > concat ( Expression < String > arg0 , Expression < String > arg1 ) { } }
|
// TODO Auto - generated method stub
return null ;
|
public class BOCImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public void eUnset ( int featureID ) { } }
|
switch ( featureID ) { case AfplibPackage . BOC__OBJ_CNAME : setObjCName ( OBJ_CNAME_EDEFAULT ) ; return ; case AfplibPackage . BOC__TRIPLETS : getTriplets ( ) . clear ( ) ; return ; } super . eUnset ( featureID ) ;
|
public class SpanManager { /** * Deletes the content between start ( included ) and end ( excluded ) . */
public SpanManager delete ( int start , int end ) { } }
|
sb . delete ( start , end ) ; adjustLists ( start , start - end ) ; if ( calculateSrcPositions ) for ( int i = 0 ; i < end - start ; i ++ ) ib . remove ( start ) ; return this ;
|
public class JinxUtils { /** * Convert { @ link net . jeremybrooks . jinx . JinxConstants . ContentType } enum to the equivalent Flickr content type id .
* @ param contentType ContentType enum to convert .
* @ return equivalent Flickr content type id , or - 1 if the parameter is null . */
public static int contentTypeToFlickrContentTypeId ( JinxConstants . ContentType contentType ) { } }
|
if ( contentType == null ) { return - 1 ; } int ret ; switch ( contentType ) { case photo : ret = 1 ; break ; case screenshot : ret = 2 ; break ; case other : ret = 3 ; break ; case photos_and_screenshots : ret = 4 ; break ; case screenshots_and_other : ret = 5 ; break ; case photos_and_other : ret = 6 ; break ; case all : ret = 7 ; break ; default : ret = - 1 ; break ; } return ret ;
|
public class RestClientUtil { /** * 创建或者更新索引文档
* For Elasticsearch 7 and 7 +
* @ param indexName
* @ param bean
* @ return
* @ throws ElasticSearchException */
public String addDateMapDocument ( String indexName , Map bean ) throws ElasticSearchException { } }
|
return addDateMapDocument ( indexName , _doc , bean ) ;
|
public class SibRaCommonEndpointActivation { /** * The messaging engine has been destroyed , nothing to do here . */
@ Override public void messagingEngineDestroyed ( JsMessagingEngine messagingEngine ) { } }
|
final String methodName = "messagingEngineDestroyed" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , messagingEngine ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . exit ( this , TRACE , methodName ) ; }
|
public class appfwprofile_trustedlearningclients_binding { /** * Use this API to fetch appfwprofile _ trustedlearningclients _ binding resources of given name . */
public static appfwprofile_trustedlearningclients_binding [ ] get ( nitro_service service , String name ) throws Exception { } }
|
appfwprofile_trustedlearningclients_binding obj = new appfwprofile_trustedlearningclients_binding ( ) ; obj . set_name ( name ) ; appfwprofile_trustedlearningclients_binding response [ ] = ( appfwprofile_trustedlearningclients_binding [ ] ) obj . get_resources ( service ) ; return response ;
|
public class StandardBullhornData { /** * Makes the delete api call . The type of delete ( soft or hard ) depends on the DeleteEntity type of the Class < T > type passed in .
* @ param type
* @ param id
* @ return */
protected < C extends CrudResponse , T extends DeleteEntity > C handleDeleteEntity ( Class < T > type , Integer id ) { } }
|
Map < String , String > uriVariables = restUriVariablesFactory . getUriVariablesForEntityDelete ( BullhornEntityInfo . getTypesRestEntityName ( type ) , id ) ; String url = restUrlFactory . assembleEntityDeleteUrl ( ) ; CrudResponse response = null ; try { if ( isSoftDeleteEntity ( type ) ) { String jsonString = "{\"isDeleted\" : true}" ; response = this . performPostRequest ( url , jsonString , DeleteResponse . class , uriVariables ) ; } if ( isHardDeleteEntity ( type ) ) { response = this . performCustomRequest ( url , null , DeleteResponse . class , uriVariables , HttpMethod . DELETE , null ) ; } } catch ( HttpStatusCodeException error ) { response = restErrorHandler . handleHttpFourAndFiveHundredErrors ( new DeleteResponse ( ) , error , id ) ; } return ( C ) response ;
|
public class GeoPackageProperties { /** * Get an integer property by base property and property name
* @ param base
* base property
* @ param property
* property
* @ param required
* true if required
* @ return integer value */
public static Integer getIntegerProperty ( String base , String property , boolean required ) { } }
|
return getIntegerProperty ( base + PropertyConstants . PROPERTY_DIVIDER + property , required ) ;
|
public class Gauge { /** * Defines the color that will be used to colorize the needle of
* the radial gauges .
* @ param COLOR */
public void setNeedleColor ( final Color COLOR ) { } }
|
if ( null == needleColor ) { _needleColor = COLOR ; fireUpdateEvent ( REDRAW_EVENT ) ; } else { needleColor . set ( COLOR ) ; }
|
public class PropertyUtils { /** * Get getter name . " getName " - > " name " , " isMale " - > " male " .
* @ param m Method object .
* @ return Property name of this getter . */
private static String getGetterName ( Method m ) { } }
|
String name = m . getName ( ) ; if ( name . startsWith ( "get" ) && ( name . length ( ) >= 4 ) && ! m . getReturnType ( ) . equals ( void . class ) && ( m . getParameterTypes ( ) . length == 0 ) ) { return Character . toLowerCase ( name . charAt ( 3 ) ) + name . substring ( 4 ) ; } if ( name . startsWith ( "is" ) && ( name . length ( ) >= 3 ) && ( m . getReturnType ( ) . equals ( boolean . class ) || m . getReturnType ( ) . equals ( Boolean . class ) ) && ( m . getParameterTypes ( ) . length == 0 ) ) { return Character . toLowerCase ( name . charAt ( 2 ) ) + name . substring ( 3 ) ; } return null ;
|
public class AmazonChimeClient { /** * Creates an Amazon Chime account under the administrator ' s AWS account . Only < code > Team < / code > account types are
* currently supported for this action . For more information about different account types , see < a
* href = " https : / / docs . aws . amazon . com / chime / latest / ag / manage - chime - account . html " > Managing Your Amazon Chime
* Accounts < / a > in the < i > Amazon Chime Administration Guide < / i > .
* @ param createAccountRequest
* @ return Result of the CreateAccount operation returned by the service .
* @ throws UnauthorizedClientException
* The client is not currently authorized to make the request .
* @ throws NotFoundException
* One or more of the resources in the request does not exist in the system .
* @ throws ForbiddenException
* The client is permanently forbidden from making the request . For example , when a user tries to create an
* account from an unsupported region .
* @ throws BadRequestException
* The input parameters don ' t match the service ' s restrictions .
* @ throws ThrottledClientException
* The client exceeded its request rate limit .
* @ throws ServiceUnavailableException
* The service is currently unavailable .
* @ throws ServiceFailureException
* The service encountered an unexpected error .
* @ sample AmazonChime . CreateAccount
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / chime - 2018-05-01 / CreateAccount " target = " _ top " > AWS API
* Documentation < / a > */
@ Override public CreateAccountResult createAccount ( CreateAccountRequest request ) { } }
|
request = beforeClientExecution ( request ) ; return executeCreateAccount ( request ) ;
|
public class Sleep { /** * Causes the current thread to wait until the callable is returning
* { @ code null } , or the specified waiting time elapses .
* If the callable returns not null then this method returns immediately
* with the value returned by callable .
* Any { @ code InterruptedException } ' s are suppress and logged . Any
* { @ code Exception } ' s thrown by callable are propagate as SystemException
* @ param callable callable checked by this method
* @ param timeout the maximum time to wait
* @ param unit the time unit of the { @ code timeout } argument
* @ return value returned by callable method
* @ throws SystemException if callable throws exception */
public static < T > T untilNull ( Callable < T > callable , long timeout , TimeUnit unit ) { } }
|
return SleepBuilder . < T > sleep ( ) . withComparer ( argument -> argument == null ) . withTimeout ( timeout , unit ) . withStatement ( callable ) . build ( ) ;
|
public class Filtering { /** * Creates an iterator yielding at most first n elements of the passed
* iterable . E . g :
* < code > take ( 2 , [ 1 , 2 , 3 ] ) - > [ 1 , 2 ] < / code >
* < code > take ( 4 , [ 1 , 2 , 3 ] ) - > [ 1 , 2 , 3 ] < / code >
* @ param < E > the iterable element type
* @ param howMany elements to be consumed ( at most )
* @ param iterable the source iterable
* @ return the resulting iterator */
public static < E > Iterator < E > take ( long howMany , Iterable < E > iterable ) { } }
|
dbc . precondition ( iterable != null , "cannot take from a null iterable" ) ; return new TakeUpToIterator < E > ( iterable . iterator ( ) , howMany ) ;
|
public class AbstractColorPickerPreference { /** * Obtains the size of the preview of the preference ' s color from a specific typed array .
* @ param typedArray
* The typed array , the size should be obtained from , as an instance of the class { @ link
* TypedArray } . The typed array may not be null */
private void obtainPreviewSize ( @ NonNull final TypedArray typedArray ) { } }
|
int defaultValue = getContext ( ) . getResources ( ) . getDimensionPixelSize ( R . dimen . color_picker_preference_default_preview_size ) ; setPreviewSize ( typedArray . getDimensionPixelSize ( R . styleable . AbstractColorPickerPreference_previewSize , defaultValue ) ) ;
|
public class FeatureFactory { /** * Convenience methods for subclasses which use CoreLabel . Gets the
* word after applying any wordFunction present in the
* SeqClassifierFlags . */
protected String getWord ( CoreLabel label ) { } }
|
String word = label . getString ( TextAnnotation . class ) ; if ( flags . wordFunction != null ) { word = flags . wordFunction . apply ( word ) ; } return word ;
|
public class RippleTradeServiceRaw { /** * Clear any stored order details to allow memory to be released . */
public void clearOrderDetailsStore ( ) { } }
|
for ( final Map < String , IRippleTradeTransaction > cache : rawTradeStore . values ( ) ) { cache . clear ( ) ; } rawTradeStore . clear ( ) ;
|
public class A_CmsFormFieldPanel { /** * Helper method for creating a form row widget . < p >
* @ param field the field for which to create a form row
* @ return the newly created form row */
protected CmsFormRow createRow ( I_CmsFormField field ) { } }
|
return createRow ( field . getLabel ( ) , field . getDescription ( ) , ( Widget ) field . getWidget ( ) , field . getLayoutData ( ) . get ( "info" ) , Boolean . parseBoolean ( field . getLayoutData ( ) . get ( "htmlinfo" ) ) ) ;
|
public class JaxbUtils { /** * 创建Marshaller , 设定encoding ( 可为Null ) . */
public Marshaller createMarshaller ( String encoding ) { } }
|
try { Marshaller marshaller = jaxbContext . createMarshaller ( ) ; marshaller . setProperty ( Marshaller . JAXB_FORMATTED_OUTPUT , Boolean . TRUE ) ; if ( StringUtils . isNotBlank ( encoding ) ) { marshaller . setProperty ( Marshaller . JAXB_ENCODING , encoding ) ; } return marshaller ; } catch ( JAXBException e ) { throw new RuntimeException ( e ) ; }
|
public class StatisticalMoments { /** * Add a single value with weight 1.0
* @ param val Value */
@ Override public void put ( double val ) { } }
|
if ( this . n == 0 ) { n = 1. ; min = max = sum = val ; m2 = m3 = m4 = 0 ; return ; } final double nn = this . n + 1.0 ; final double deltan = val * n - sum ; final double delta_nn = deltan / ( n * nn ) ; final double delta_nn2 = delta_nn * delta_nn ; final double inc = deltan * delta_nn ; // Update values :
m4 += inc * delta_nn2 * ( nn * ( nn - 3. ) + 3. ) + 6. * delta_nn2 * m2 - 4. * delta_nn * m3 ; m3 += inc * delta_nn * ( nn - 2 ) - 3. * delta_nn * m2 ; m2 += inc ; sum += val ; n = nn ; min = Math . min ( min , val ) ; max = Math . max ( max , val ) ;
|
public class UpdatePatchBaselineRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( UpdatePatchBaselineRequest updatePatchBaselineRequest , ProtocolMarshaller protocolMarshaller ) { } }
|
if ( updatePatchBaselineRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updatePatchBaselineRequest . getBaselineId ( ) , BASELINEID_BINDING ) ; protocolMarshaller . marshall ( updatePatchBaselineRequest . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( updatePatchBaselineRequest . getGlobalFilters ( ) , GLOBALFILTERS_BINDING ) ; protocolMarshaller . marshall ( updatePatchBaselineRequest . getApprovalRules ( ) , APPROVALRULES_BINDING ) ; protocolMarshaller . marshall ( updatePatchBaselineRequest . getApprovedPatches ( ) , APPROVEDPATCHES_BINDING ) ; protocolMarshaller . marshall ( updatePatchBaselineRequest . getApprovedPatchesComplianceLevel ( ) , APPROVEDPATCHESCOMPLIANCELEVEL_BINDING ) ; protocolMarshaller . marshall ( updatePatchBaselineRequest . getApprovedPatchesEnableNonSecurity ( ) , APPROVEDPATCHESENABLENONSECURITY_BINDING ) ; protocolMarshaller . marshall ( updatePatchBaselineRequest . getRejectedPatches ( ) , REJECTEDPATCHES_BINDING ) ; protocolMarshaller . marshall ( updatePatchBaselineRequest . getRejectedPatchesAction ( ) , REJECTEDPATCHESACTION_BINDING ) ; protocolMarshaller . marshall ( updatePatchBaselineRequest . getDescription ( ) , DESCRIPTION_BINDING ) ; protocolMarshaller . marshall ( updatePatchBaselineRequest . getSources ( ) , SOURCES_BINDING ) ; protocolMarshaller . marshall ( updatePatchBaselineRequest . getReplace ( ) , REPLACE_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
public class DistCp { /** * Check whether the file list have duplication . */
static private void checkDuplication ( FileSystem fs , Path file , Path sorted , Configuration conf ) throws IOException { } }
|
SequenceFile . Reader in = null ; try { SequenceFile . Sorter sorter = new SequenceFile . Sorter ( fs , new Text . Comparator ( ) , Text . class , Text . class , conf ) ; sorter . sort ( file , sorted ) ; in = new SequenceFile . Reader ( fs , sorted , conf ) ; Text prevdst = null , curdst = new Text ( ) ; Text prevsrc = null , cursrc = new Text ( ) ; for ( ; in . next ( curdst , cursrc ) ; ) { if ( prevdst != null && curdst . equals ( prevdst ) ) { throw new DuplicationException ( "Invalid input, there are duplicated files in the sources: " + prevsrc + ", " + cursrc ) ; } prevdst = curdst ; curdst = new Text ( ) ; prevsrc = cursrc ; cursrc = new Text ( ) ; } } finally { checkAndClose ( in ) ; }
|
public class CmsExtendedPublishResourceFormatter { /** * Gets a message from the message bundle . < p >
* @ param key the message key
* @ param args the message parameters
* @ return the message from the message bundle */
protected String getMessage ( String key , String ... args ) { } }
|
return Messages . get ( ) . getBundle ( m_cms . getRequestContext ( ) . getLocale ( ) ) . key ( key , args ) ;
|
public class BiojavaJmol { /** * returns true if Jmol can be found in the classpath , otherwise false .
* @ return true / false depending if Jmol can be found */
public static boolean jmolInClassPath ( ) { } }
|
try { Class . forName ( viewer ) ; } catch ( ClassNotFoundException e ) { e . printStackTrace ( ) ; return false ; } return true ;
|
public class XssMatchSet { /** * Specifies the parts of web requests that you want to inspect for cross - site scripting attacks .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setXssMatchTuples ( java . util . Collection ) } or { @ link # withXssMatchTuples ( java . util . Collection ) } if you want
* to override the existing values .
* @ param xssMatchTuples
* Specifies the parts of web requests that you want to inspect for cross - site scripting attacks .
* @ return Returns a reference to this object so that method calls can be chained together . */
public XssMatchSet withXssMatchTuples ( XssMatchTuple ... xssMatchTuples ) { } }
|
if ( this . xssMatchTuples == null ) { setXssMatchTuples ( new java . util . ArrayList < XssMatchTuple > ( xssMatchTuples . length ) ) ; } for ( XssMatchTuple ele : xssMatchTuples ) { this . xssMatchTuples . add ( ele ) ; } return this ;
|
public class SimpleCompareFileExtensions { /** * Compare files by checksum with the algorithm Adler32.
* @ param sourceFile
* the source file
* @ param fileToCompare
* the file to compare
* @ return true if the checksum with the algorithm Adler32 are equal , otherwise false .
* @ throws IOException
* Signals that an I / O exception has occurred . */
public static boolean compareFilesByChecksumAdler32 ( final File sourceFile , final File fileToCompare ) throws IOException { } }
|
final long checksumSourceFile = ChecksumExtensions . getCheckSumAdler32 ( sourceFile ) ; final long checksumFileToCompare = ChecksumExtensions . getCheckSumAdler32 ( fileToCompare ) ; return checksumSourceFile == checksumFileToCompare ;
|
public class srecLexer { /** * $ ANTLR start " WS " */
public final void mWS ( ) throws RecognitionException { } }
|
try { int _type = WS ; int _channel = DEFAULT_TOKEN_CHANNEL ; // / home / victor / srec / core / src / main / antlr / srec . g : 147:2 : ( ( ' ' | ' \ \ t ' ) + )
// / home / victor / srec / core / src / main / antlr / srec . g : 147:4 : ( ' ' | ' \ \ t ' ) +
{ // / home / victor / srec / core / src / main / antlr / srec . g : 147:4 : ( ' ' | ' \ \ t ' ) +
int cnt7 = 0 ; loop7 : do { int alt7 = 2 ; int LA7_0 = input . LA ( 1 ) ; if ( ( LA7_0 == '\t' || LA7_0 == ' ' ) ) { alt7 = 1 ; } switch ( alt7 ) { case 1 : // / home / victor / srec / core / src / main / antlr / srec . g :
{ if ( input . LA ( 1 ) == '\t' || input . LA ( 1 ) == ' ' ) { input . consume ( ) ; } else { MismatchedSetException mse = new MismatchedSetException ( null , input ) ; recover ( mse ) ; throw mse ; } } break ; default : if ( cnt7 >= 1 ) break loop7 ; EarlyExitException eee = new EarlyExitException ( 7 , input ) ; throw eee ; } cnt7 ++ ; } while ( true ) ; skip ( ) ; } state . type = _type ; state . channel = _channel ; } finally { }
|
public class AbstractSchemaScannerPlugin { /** * Stores index data .
* @ param index The index .
* @ param tableDescriptor The table descriptor .
* @ param columns The cached columns .
* @ param indexType The index type to create .
* @ param onColumnType The type representing " on column " to create .
* @ param store The store .
* @ return The created index descriptor . */
private < I extends IndexDescriptor > I storeIndex ( Index index , TableDescriptor tableDescriptor , Map < String , ColumnDescriptor > columns , Class < I > indexType , Class < ? extends OnColumnDescriptor > onColumnType , Store store ) { } }
|
I indexDescriptor = store . create ( indexType ) ; indexDescriptor . setName ( index . getName ( ) ) ; indexDescriptor . setUnique ( index . isUnique ( ) ) ; indexDescriptor . setCardinality ( index . getCardinality ( ) ) ; indexDescriptor . setIndexType ( index . getIndexType ( ) . name ( ) ) ; indexDescriptor . setPages ( index . getPages ( ) ) ; for ( IndexColumn indexColumn : index . getColumns ( ) ) { ColumnDescriptor columnDescriptor = columns . get ( indexColumn . getName ( ) ) ; OnColumnDescriptor onColumnDescriptor = store . create ( indexDescriptor , onColumnType , columnDescriptor ) ; onColumnDescriptor . setIndexOrdinalPosition ( indexColumn . getIndexOrdinalPosition ( ) ) ; onColumnDescriptor . setSortSequence ( indexColumn . getSortSequence ( ) . name ( ) ) ; } return indexDescriptor ;
|
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EClass getESG ( ) { } }
|
if ( esgEClass == null ) { esgEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 261 ) ; } return esgEClass ;
|
public class MangooUtils { /** * Converts a given file size into a readable file size including unit
* @ param size The size in bytes to convert
* @ return Readable files size , e . g . 24 MB */
public static String readableFileSize ( long size ) { } }
|
if ( size <= 0 ) { return "0" ; } int index = ( int ) ( Math . log10 ( size ) / Math . log10 ( CONVERTION ) ) ; return new DecimalFormat ( "#,##0.#" ) . format ( size / Math . pow ( CONVERTION , index ) ) + " " + UNITS [ index ] ;
|
public class SunPosition { /** * / * [ deutsch ]
* < p > Bestimmt die L & auml ; nge des Schattens , der von einem Objekt der angegebenen H & ouml ; he geworfen wird . < / p >
* < p > Wenn die Sonne am oder unter dem Horizont steht , ist die Schattenl & auml ; nge positiv unendlich . < / p >
* @ param objectHeight the height of object in meters
* @ return length of shadow in meters ( or positive infinity )
* @ throws IllegalArgumentException if the object height is not finite and positive
* @ since 3.40/4.35 */
public double getShadowLength ( double objectHeight ) { } }
|
final double e = this . getElevation ( ) ; if ( Double . isFinite ( objectHeight ) ) { if ( objectHeight <= 0.0 ) { throw new IllegalArgumentException ( "Object height must be greater than zero: " + objectHeight ) ; } else if ( e <= 0.0 ) { return Double . POSITIVE_INFINITY ; } else if ( e == 90.0 ) { return 0.0 ; } else { return objectHeight / Math . tan ( Math . toRadians ( e ) ) ; } } else { throw new IllegalArgumentException ( "Object height must be finite and positive: " + objectHeight ) ; }
|
public class ProfilePackageWriterImpl { /** * { @ inheritDoc } */
public void addPackageDescription ( Content packageContentTree ) { } }
|
if ( packageDoc . inlineTags ( ) . length > 0 ) { packageContentTree . addContent ( getMarkerAnchor ( SectionName . PACKAGE_DESCRIPTION ) ) ; Content h2Content = new StringContent ( configuration . getText ( "doclet.Package_Description" , packageDoc . name ( ) ) ) ; packageContentTree . addContent ( HtmlTree . HEADING ( HtmlConstants . PACKAGE_HEADING , true , h2Content ) ) ; addInlineComment ( packageDoc , packageContentTree ) ; }
|
public class HttpPostMultipartRequestDecoder { /** * Decode a multipart request by pieces < br >
* < br >
* NOTSTARTED PREAMBLE ( < br >
* ( HEADERDELIMITER DISPOSITION ( FIELD | FILEUPLOAD ) ) * < br >
* ( HEADERDELIMITER DISPOSITION MIXEDPREAMBLE < br >
* ( MIXEDDELIMITER MIXEDDISPOSITION MIXEDFILEUPLOAD ) + < br >
* MIXEDCLOSEDELIMITER ) * < br >
* CLOSEDELIMITER ) + EPILOGUE < br >
* Inspired from HttpMessageDecoder
* @ return the next decoded InterfaceHttpData or null if none until now .
* @ throws ErrorDataDecoderException
* if an error occurs */
private InterfaceHttpData decodeMultipart ( MultiPartStatus state ) { } }
|
switch ( state ) { case NOTSTARTED : throw new ErrorDataDecoderException ( "Should not be called with the current getStatus" ) ; case PREAMBLE : // Content - type : multipart / form - data , boundary = AaB03x
throw new ErrorDataDecoderException ( "Should not be called with the current getStatus" ) ; case HEADERDELIMITER : { // - - AaB03x or - - AaB03x - -
return findMultipartDelimiter ( multipartDataBoundary , MultiPartStatus . DISPOSITION , MultiPartStatus . PREEPILOGUE ) ; } case DISPOSITION : { // content - disposition : form - data ; name = " field1"
// content - disposition : form - data ; name = " pics " ; filename = " file1 . txt "
// and other immediate values like
// Content - type : image / gif
// Content - Type : text / plain
// Content - Type : text / plain ; charset = ISO - 8859-1
// Content - Transfer - Encoding : binary
// The following line implies a change of mode ( mixed mode )
// Content - type : multipart / mixed , boundary = BbC04y
return findMultipartDisposition ( ) ; } case FIELD : { // Now get value according to Content - Type and Charset
Charset localCharset = null ; Attribute charsetAttribute = currentFieldAttributes . get ( HttpHeaderValues . CHARSET ) ; if ( charsetAttribute != null ) { try { localCharset = Charset . forName ( charsetAttribute . getValue ( ) ) ; } catch ( IOException e ) { throw new ErrorDataDecoderException ( e ) ; } catch ( UnsupportedCharsetException e ) { throw new ErrorDataDecoderException ( e ) ; } } Attribute nameAttribute = currentFieldAttributes . get ( HttpHeaderValues . NAME ) ; if ( currentAttribute == null ) { Attribute lengthAttribute = currentFieldAttributes . get ( HttpHeaderNames . CONTENT_LENGTH ) ; long size ; try { size = lengthAttribute != null ? Long . parseLong ( lengthAttribute . getValue ( ) ) : 0L ; } catch ( IOException e ) { throw new ErrorDataDecoderException ( e ) ; } catch ( NumberFormatException ignored ) { size = 0 ; } try { if ( size > 0 ) { currentAttribute = factory . createAttribute ( request , cleanString ( nameAttribute . getValue ( ) ) , size ) ; } else { currentAttribute = factory . createAttribute ( request , cleanString ( nameAttribute . getValue ( ) ) ) ; } } catch ( NullPointerException e ) { throw new ErrorDataDecoderException ( e ) ; } catch ( IllegalArgumentException e ) { throw new ErrorDataDecoderException ( e ) ; } catch ( IOException e ) { throw new ErrorDataDecoderException ( e ) ; } if ( localCharset != null ) { currentAttribute . setCharset ( localCharset ) ; } } // load data
if ( ! loadDataMultipart ( undecodedChunk , multipartDataBoundary , currentAttribute ) ) { // Delimiter is not found . Need more chunks .
return null ; } Attribute finalAttribute = currentAttribute ; currentAttribute = null ; currentFieldAttributes = null ; // ready to load the next one
currentStatus = MultiPartStatus . HEADERDELIMITER ; return finalAttribute ; } case FILEUPLOAD : { // eventually restart from existing FileUpload
return getFileUpload ( multipartDataBoundary ) ; } case MIXEDDELIMITER : { // - - AaB03x or - - AaB03x - -
// Note that currentFieldAttributes exists
return findMultipartDelimiter ( multipartMixedBoundary , MultiPartStatus . MIXEDDISPOSITION , MultiPartStatus . HEADERDELIMITER ) ; } case MIXEDDISPOSITION : { return findMultipartDisposition ( ) ; } case MIXEDFILEUPLOAD : { // eventually restart from existing FileUpload
return getFileUpload ( multipartMixedBoundary ) ; } case PREEPILOGUE : return null ; case EPILOGUE : return null ; default : throw new ErrorDataDecoderException ( "Shouldn't reach here." ) ; }
|
public class MetadataStore { /** * Function to clear all the metadata related to the given store
* definitions . This is needed when a put on ' stores . xml ' is called , thus
* replacing the existing state .
* This method is not thread safe . It is expected that the caller of this
* method will handle concurrency related issues .
* @ param storeNamesToDelete */
private void resetStoreDefinitions ( Set < String > storeNamesToDelete ) { } }
|
// Clear entries in the metadata cache
for ( String storeName : storeNamesToDelete ) { this . metadataCache . remove ( storeName ) ; this . storeDefinitionsStorageEngine . delete ( storeName , null ) ; this . storeNames . remove ( storeName ) ; }
|
public class IssuerAlternativeNameExtension { /** * Return an enumeration of names of attributes existing within this
* attribute . */
public Enumeration < String > getElements ( ) { } }
|
AttributeNameEnumeration elements = new AttributeNameEnumeration ( ) ; elements . addElement ( ISSUER_NAME ) ; return ( elements . elements ( ) ) ;
|
public class AbstractMojoInterceptor { /** * mojo . getLog ( ) . warn ( msg ) */
protected static void warn ( Object mojo , String msg ) throws Exception { } }
|
Method method = mojo . getClass ( ) . getMethod ( GET_LOG_METHOD ) ; method . setAccessible ( true ) ; Object logObject = method . invoke ( mojo ) ; method = logObject . getClass ( ) . getMethod ( WARN_METHOD , CharSequence . class ) ; method . setAccessible ( true ) ; method . invoke ( logObject , msg ) ;
|
public class DeltaFIFO { /** * DeletedFinalStateUnknown objects . */
private String keyOf ( Object obj ) { } }
|
Object innerObj = obj ; if ( obj instanceof Deque ) { Deque < MutablePair < DeltaType , Object > > deltas = ( Deque < MutablePair < DeltaType , Object > > ) obj ; if ( deltas . size ( ) == 0 ) { throw new NoSuchElementException ( "0 length Deltas object; can't get key" ) ; } innerObj = deltas . peekLast ( ) . getRight ( ) ; } if ( innerObj instanceof DeletedFinalStateUnknown ) { return ( ( DeletedFinalStateUnknown ) innerObj ) . key ; } return keyFunc . apply ( ( ApiType ) innerObj ) ;
|
public class ArabicShaping { /** * Name : expandCompositCharAtBegin
* Function : Expands the LamAlef character to Lam and Alef consuming the required
* space from beginning of the buffer . If the text type was visual _ LTR
* and the option SPACES _ RELATIVE _ TO _ TEXT _ BEGIN _ END was selected
* the spaces will be located at end of buffer .
* If there are no spaces to expand the LamAlef , an exception is thrown . */
private boolean expandCompositCharAtBegin ( char [ ] dest , int start , int length , int lacount ) { } }
|
boolean spaceNotFound = false ; if ( lacount > countSpacesRight ( dest , start , length ) ) { spaceNotFound = true ; return spaceNotFound ; } for ( int r = start + length - lacount , w = start + length ; -- r >= start ; ) { char ch = dest [ r ] ; if ( isNormalizedLamAlefChar ( ch ) ) { dest [ -- w ] = LAM_CHAR ; dest [ -- w ] = convertNormalizedLamAlef [ ch - '\u065C' ] ; } else { dest [ -- w ] = ch ; } } return spaceNotFound ;
|
public class MultiLayerNetwork { /** * Calculate the output of the network , with masking arrays . The masking arrays are used in situations such
* as one - to - many and many - to - one recurrent neural network ( RNN ) designs , as well as for supporting time series
* of varying lengths within the same minibatch . */
public INDArray output ( INDArray input , boolean train , INDArray featuresMask , INDArray labelsMask ) { } }
|
return output ( input , train , featuresMask , labelsMask , null ) ;
|
public class CPSpecificationOptionPersistenceImpl { /** * Returns the last cp specification option in the ordered set where CPOptionCategoryId = & # 63 ; .
* @ param CPOptionCategoryId the cp option category ID
* @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > )
* @ return the last matching cp specification option , or < code > null < / code > if a matching cp specification option could not be found */
@ Override public CPSpecificationOption fetchByCPOptionCategoryId_Last ( long CPOptionCategoryId , OrderByComparator < CPSpecificationOption > orderByComparator ) { } }
|
int count = countByCPOptionCategoryId ( CPOptionCategoryId ) ; if ( count == 0 ) { return null ; } List < CPSpecificationOption > list = findByCPOptionCategoryId ( CPOptionCategoryId , count - 1 , count , orderByComparator ) ; if ( ! list . isEmpty ( ) ) { return list . get ( 0 ) ; } return null ;
|
public class Storage { /** * Iterate over each of the { @ link FormatConfirmable } objects ,
* potentially checking with the user whether it should be formatted .
* If running in interactive mode , will prompt the user for each
* directory to allow them to format anyway . Otherwise , returns
* false , unless ' force ' is specified .
* @ param interactive prompt the user when a dir exists
* @ return true if formatting should proceed
* @ throws IOException if some storage cannot be accessed */
public static boolean confirmFormat ( Iterable < ? extends FormatConfirmable > items , boolean force , boolean interactive ) throws IOException { } }
|
for ( FormatConfirmable item : items ) { if ( ! ( item . hasSomeJournalData ( ) || item . hasSomeImageData ( ) ) ) continue ; if ( force ) { // Don ' t confirm , always format .
System . err . println ( "Data exists in " + item + ". Formatting anyway." ) ; continue ; } if ( ! interactive ) { // Don ' t ask - always don ' t format
System . err . println ( "Running in non-interactive mode, and data appears to exist in " + item + ". Not formatting." ) ; return false ; } if ( ! ToolRunner . confirmPrompt ( "Re-format filesystem in " + item + " ?" ) ) { System . err . println ( "Format aborted in " + item ) ; return false ; } } return true ;
|
public class PluginLoader { /** * Defines the different classloaders to be created . Number of classloaders can be
* different than number of plugins . */
@ VisibleForTesting Collection < PluginClassLoaderDef > defineClassloaders ( Map < String , PluginInfo > infoByKeys ) { } }
|
Map < String , PluginClassLoaderDef > classloadersByBasePlugin = new HashMap < > ( ) ; for ( PluginInfo info : infoByKeys . values ( ) ) { String baseKey = basePluginKey ( info , infoByKeys ) ; PluginClassLoaderDef def = classloadersByBasePlugin . get ( baseKey ) ; if ( def == null ) { def = new PluginClassLoaderDef ( baseKey ) ; classloadersByBasePlugin . put ( baseKey , def ) ; } ExplodedPlugin explodedPlugin = jarExploder . explode ( info ) ; def . addFiles ( asList ( explodedPlugin . getMain ( ) ) ) ; def . addFiles ( explodedPlugin . getLibs ( ) ) ; def . addMainClass ( info . getKey ( ) , info . getMainClass ( ) ) ; for ( String defaultSharedResource : DEFAULT_SHARED_RESOURCES ) { def . getExportMask ( ) . addInclusion ( String . format ( "%s/%s/api/" , defaultSharedResource , info . getKey ( ) ) ) ; } // The plugins that extend other plugins can only add some files to classloader .
// They can ' t change metadata like ordering strategy or compatibility mode .
if ( Strings . isNullOrEmpty ( info . getBasePlugin ( ) ) ) { def . setSelfFirstStrategy ( info . isUseChildFirstClassLoader ( ) ) ; Version minSqVersion = info . getMinimalSqVersion ( ) ; boolean compatibilityMode = minSqVersion != null && minSqVersion . compareToIgnoreQualifier ( COMPATIBILITY_MODE_MAX_VERSION ) < 0 ; if ( compatibilityMode ) { Loggers . get ( getClass ( ) ) . warn ( "API compatibility mode is no longer supported. In case of error, plugin {} [{}] should package its dependencies." , info . getName ( ) , info . getKey ( ) ) ; } } } return classloadersByBasePlugin . values ( ) ;
|
public class EntityDrivenAction { /** * 构建实体导入者
* @ param upload
* @ param clazz */
protected EntityImporter buildEntityImporter ( String upload , Class < ? > clazz ) { } }
|
try { UploadedFile file = get ( upload , UploadedFile . class ) ; if ( null == file ) { logger . error ( "cannot get upload file {}." , upload ) ; return null ; } String fileName = get ( upload + "FileName" ) ; InputStream is = new FileInputStream ( ( File ) file . getContent ( ) ) ; String formatName = Strings . capitalize ( Strings . substringAfterLast ( fileName , "." ) ) ; Option < TransferFormat > format = Enums . get ( TransferFormat . class , formatName ) ; return ( format . isDefined ( ) ) ? ImporterFactory . getEntityImporter ( format . get ( ) , is , clazz , null ) : null ; } catch ( Exception e ) { logger . error ( "error" , e ) ; return null ; }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.