signature
stringlengths 43
39.1k
| implementation
stringlengths 0
450k
|
|---|---|
public class GetMetricStatisticsResult { /** * The data points for the specified metric .
* @ param datapoints
* The data points for the specified metric . */
public void setDatapoints ( java . util . Collection < Datapoint > datapoints ) { } }
|
if ( datapoints == null ) { this . datapoints = null ; return ; } this . datapoints = new com . amazonaws . internal . SdkInternalList < Datapoint > ( datapoints ) ;
|
public class ContextRuleAssistant { /** * Sets the assistant local .
* @ param newAssistantLocal the new assistant local */
private void setAssistantLocal ( AssistantLocal newAssistantLocal ) { } }
|
this . assistantLocal = newAssistantLocal ; scheduleRuleRegistry . setAssistantLocal ( newAssistantLocal ) ; transletRuleRegistry . setAssistantLocal ( newAssistantLocal ) ; templateRuleRegistry . setAssistantLocal ( newAssistantLocal ) ;
|
public class RulesApi { /** * Update Rule
* Update an existing Rule
* @ param ruleId Rule ID . ( required )
* @ param ruleInfo Rule object that needs to be updated ( required )
* @ return ApiResponse & lt ; RuleEnvelope & gt ;
* @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the response body */
public ApiResponse < RuleEnvelope > updateRuleWithHttpInfo ( String ruleId , RuleUpdateInfo ruleInfo ) throws ApiException { } }
|
com . squareup . okhttp . Call call = updateRuleValidateBeforeCall ( ruleId , ruleInfo , null , null ) ; Type localVarReturnType = new TypeToken < RuleEnvelope > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
|
public class StylesheetPIHandler { /** * Handle the xml - stylesheet processing instruction .
* @ param target The processing instruction target .
* @ param data The processing instruction data , or null if
* none is supplied .
* @ throws org . xml . sax . SAXException Any SAX exception , possibly
* wrapping another exception .
* @ see org . xml . sax . ContentHandler # processingInstruction
* @ see < a href = " http : / / www . w3 . org / TR / xml - stylesheet / " > Associating Style Sheets with XML documents , Version 1.0 < / a > */
public void processingInstruction ( String target , String data ) throws org . xml . sax . SAXException { } }
|
if ( target . equals ( "xml-stylesheet" ) ) { String href = null ; // CDATA # REQUIRED
String type = null ; // CDATA # REQUIRED
String title = null ; // CDATA # IMPLIED
String media = null ; // CDATA # IMPLIED
String charset = null ; // CDATA # IMPLIED
boolean alternate = false ; // ( yes | no ) " no "
StringTokenizer tokenizer = new StringTokenizer ( data , " \t=\n" , true ) ; boolean lookedAhead = false ; Source source = null ; String token = "" ; while ( tokenizer . hasMoreTokens ( ) ) { if ( ! lookedAhead ) token = tokenizer . nextToken ( ) ; else lookedAhead = false ; if ( tokenizer . hasMoreTokens ( ) && ( token . equals ( " " ) || token . equals ( "\t" ) || token . equals ( "=" ) ) ) continue ; String name = token ; if ( name . equals ( "type" ) ) { token = tokenizer . nextToken ( ) ; while ( tokenizer . hasMoreTokens ( ) && ( token . equals ( " " ) || token . equals ( "\t" ) || token . equals ( "=" ) ) ) token = tokenizer . nextToken ( ) ; type = token . substring ( 1 , token . length ( ) - 1 ) ; } else if ( name . equals ( "href" ) ) { token = tokenizer . nextToken ( ) ; while ( tokenizer . hasMoreTokens ( ) && ( token . equals ( " " ) || token . equals ( "\t" ) || token . equals ( "=" ) ) ) token = tokenizer . nextToken ( ) ; href = token ; if ( tokenizer . hasMoreTokens ( ) ) { token = tokenizer . nextToken ( ) ; // If the href value has parameters to be passed to a
// servlet ( something like " foobar ? id = 12 . . . " ) ,
// we want to make sure we get them added to
// the href value . Without this check , we would move on
// to try to process another attribute and that would be
// wrong .
// We need to set lookedAhead here to flag that we
// already have the next token .
while ( token . equals ( "=" ) && tokenizer . hasMoreTokens ( ) ) { href = href + token + tokenizer . nextToken ( ) ; if ( tokenizer . hasMoreTokens ( ) ) { token = tokenizer . nextToken ( ) ; lookedAhead = true ; } else { break ; } } } href = href . substring ( 1 , href . length ( ) - 1 ) ; try { // Add code to use a URIResolver . Patch from Dmitri Ilyin .
if ( m_uriResolver != null ) { source = m_uriResolver . resolve ( href , m_baseID ) ; } else { href = SystemIDResolver . getAbsoluteURI ( href , m_baseID ) ; source = new SAXSource ( new InputSource ( href ) ) ; } } catch ( TransformerException te ) { throw new org . xml . sax . SAXException ( te ) ; } } else if ( name . equals ( "title" ) ) { token = tokenizer . nextToken ( ) ; while ( tokenizer . hasMoreTokens ( ) && ( token . equals ( " " ) || token . equals ( "\t" ) || token . equals ( "=" ) ) ) token = tokenizer . nextToken ( ) ; title = token . substring ( 1 , token . length ( ) - 1 ) ; } else if ( name . equals ( "media" ) ) { token = tokenizer . nextToken ( ) ; while ( tokenizer . hasMoreTokens ( ) && ( token . equals ( " " ) || token . equals ( "\t" ) || token . equals ( "=" ) ) ) token = tokenizer . nextToken ( ) ; media = token . substring ( 1 , token . length ( ) - 1 ) ; } else if ( name . equals ( "charset" ) ) { token = tokenizer . nextToken ( ) ; while ( tokenizer . hasMoreTokens ( ) && ( token . equals ( " " ) || token . equals ( "\t" ) || token . equals ( "=" ) ) ) token = tokenizer . nextToken ( ) ; charset = token . substring ( 1 , token . length ( ) - 1 ) ; } else if ( name . equals ( "alternate" ) ) { token = tokenizer . nextToken ( ) ; while ( tokenizer . hasMoreTokens ( ) && ( token . equals ( " " ) || token . equals ( "\t" ) || token . equals ( "=" ) ) ) token = tokenizer . nextToken ( ) ; alternate = token . substring ( 1 , token . length ( ) - 1 ) . equals ( "yes" ) ; } } if ( ( null != type ) && ( type . equals ( "text/xsl" ) || type . equals ( "text/xml" ) || type . equals ( "application/xml+xslt" ) ) && ( null != href ) ) { if ( null != m_media ) { if ( null != media ) { if ( ! media . equals ( m_media ) ) return ; } else return ; } if ( null != m_charset ) { if ( null != charset ) { if ( ! charset . equals ( m_charset ) ) return ; } else return ; } if ( null != m_title ) { if ( null != title ) { if ( ! title . equals ( m_title ) ) return ; } else return ; } m_stylesheets . addElement ( source ) ; } }
|
public class TracezZPageHandler { /** * Constructs a new { @ code TracezZPageHandler } .
* @ param runningSpanStore the instance of the { @ code RunningSpanStore } to be used .
* @ param sampledSpanStore the instance of the { @ code SampledSpanStore } to be used .
* @ return a new { @ code TracezZPageHandler } . */
static TracezZPageHandler create ( @ javax . annotation . Nullable RunningSpanStore runningSpanStore , @ javax . annotation . Nullable SampledSpanStore sampledSpanStore ) { } }
|
return new TracezZPageHandler ( runningSpanStore , sampledSpanStore ) ;
|
public class ServiceContext { /** * Returns the object id , corresponding to the ? id = of the URL . */
public static String getContextObjectId ( ) { } }
|
ServiceContext context = ( ServiceContext ) _localContext . get ( ) ; if ( context != null ) return context . _objectId ; else return null ;
|
public class Context { /** * For current thread a new context object must be created .
* @ param _ user name or UIID of current user to set
* @ param _ locale locale instance ( which language settings has the user )
* @ param _ sessionAttributes attributes for this session
* @ param _ parameters map with parameters for this thread context
* @ param _ fileParameters map with file parameters
* @ param _ inheritance the inheritance
* @ return new context of thread
* @ throws EFapsException if a new transaction could not be started or if
* current thread context is already set
* @ see # INHERITTHREADCONTEXT */
public static Context begin ( final String _user , final Locale _locale , final Map < String , Object > _sessionAttributes , final Map < String , String [ ] > _parameters , final Map < String , FileParameter > _fileParameters , final Inheritance _inheritance ) throws EFapsException { } }
|
if ( Inheritance . Inheritable . equals ( _inheritance ) && Context . INHERITTHREADCONTEXT . get ( ) != null || Inheritance . Local . equals ( _inheritance ) && Context . THREADCONTEXT . get ( ) != null ) { throw new EFapsException ( Context . class , "begin.Context4ThreadAlreadSet" ) ; } try { // the timeout set is reseted on creation of a new Current object in
// the transaction manager ,
// so if the default must be overwritten it must be set explicitly
// again
if ( Context . TRANSMANAGTIMEOUT > 0 ) { Context . TRANSMANAG . setTransactionTimeout ( Context . TRANSMANAGTIMEOUT ) ; } Context . TRANSMANAG . begin ( ) ; } catch ( final SystemException e ) { throw new EFapsException ( Context . class , "begin.beginSystemException" , e ) ; } catch ( final NotSupportedException e ) { throw new EFapsException ( Context . class , "begin.beginNotSupportedException" , e ) ; } final Transaction transaction ; try { transaction = Context . TRANSMANAG . getTransaction ( ) ; } catch ( final SystemException e ) { throw new EFapsException ( Context . class , "begin.getTransactionSystemException" , e ) ; } final Context context = new Context ( transaction , _locale , _sessionAttributes , _parameters , _fileParameters , Inheritance . Inheritable . equals ( _inheritance ) ) ; switch ( _inheritance ) { case Inheritable : Context . INHERITTHREADCONTEXT . set ( context ) ; break ; case Local : Context . THREADCONTEXT . set ( context ) ; break ; case Standalone : Context . THREADCONTEXT . set ( context ) ; Context . INHERITTHREADCONTEXT . set ( context ) ; break ; default : break ; } if ( _user != null ) { context . person = UUIDUtil . isUUID ( _user ) ? Person . get ( UUID . fromString ( _user ) ) : Person . get ( _user ) ; MDC . put ( "person" , String . format ( "'%s' (%s %s)" , context . person . getName ( ) , context . person . getFirstName ( ) , context . person . getLastName ( ) ) ) ; context . locale = context . person . getLocale ( ) ; context . timezone = context . person . getTimeZone ( ) ; context . chronology = context . person . getChronology ( ) ; context . language = context . person . getLanguage ( ) ; if ( _sessionAttributes != null ) { if ( context . containsUserAttribute ( Context . CURRENTCOMPANY ) ) { final Company comp = Company . get ( Long . parseLong ( context . getUserAttribute ( Context . CURRENTCOMPANY ) ) ) ; if ( comp != null && ! context . person . getCompanies ( ) . isEmpty ( ) && context . person . isAssigned ( comp ) ) { context . companyId = comp . getId ( ) ; } else { context . setUserAttribute ( Context . CURRENTCOMPANY , "0" ) ; } } // if no current company is set in the UserAttributes , the first one found is set
if ( context . companyId == null && context . person . getCompanies ( ) . size ( ) > 0 ) { final Long compID = context . person . getCompanies ( ) . iterator ( ) . next ( ) ; context . setUserAttribute ( Context . CURRENTCOMPANY , compID . toString ( ) ) ; context . companyId = compID ; } } } return context ;
|
public class ODataEntityProvider { /** * ( non - Javadoc )
* @ see javax . ws . rs . ext . MessageBodyWriter # writeTo ( java . lang . Object ,
* java . lang . Class , java . lang . reflect . Type ,
* java . lang . annotation . Annotation [ ] , javax . ws . rs . core . MediaType ,
* javax . ws . rs . core . MultivaluedMap , java . io . OutputStream ) */
@ Override public void writeTo ( ODataEntity < ? > t , Class < ? > type , Type genericType , Annotation [ ] annotations , MediaType mediaType , MultivaluedMap < String , Object > httpHeaders , OutputStream entityStream ) throws IOException { } }
|
throw new UnsupportedOperationException ( ) ;
|
public class EventLog { /** * Adds an event to the log .
* @ param event the event to add */
public void addEvent ( E event ) { } }
|
CompletableFuture < E > future = futures . poll ( ) ; if ( future != null ) { future . complete ( event ) ; } else { events . add ( event ) ; if ( events . size ( ) > 100 ) { events . remove ( ) ; } }
|
public class FacebookRestClient { /** * Sets the FBML for the profile box and profile actions for the user or page profile with ID < code > profileId < / code > .
* Refer to the FBML documentation for a description of the markup and its role in various contexts .
* @ param profileFbmlMarkup the FBML for the profile box
* @ param profileActionFbmlMarkup the FBML for the profile actions
* @ param profileId a page or user ID ( null for the logged - in user )
* @ return a boolean indicating whether the FBML was successfully set
* @ see < a href = " http : / / wiki . developers . facebook . com / index . php / Profile . setFBML " >
* Developers wiki : Profile . setFBML < / a > */
public boolean profile_setFBML ( CharSequence profileFbmlMarkup , CharSequence profileActionFbmlMarkup , Long profileId ) throws FacebookException , IOException { } }
|
return profile_setFBML ( profileFbmlMarkup , profileActionFbmlMarkup , /* mobileFbmlMarkup */
null , profileId ) ;
|
public class LocalWeightedHistogramRotRect { /** * Computes the histogram quickly inside the image */
protected void computeHistogramInside ( RectangleRotate_F32 region ) { } }
|
for ( int i = 0 ; i < samplePts . size ( ) ; i ++ ) { Point2D_F32 p = samplePts . get ( i ) ; squareToImageSample ( p . x , p . y , region ) ; interpolate . get_fast ( imageX , imageY , value ) ; int indexHistogram = computeHistogramBin ( value ) ; sampleHistIndex [ i ] = indexHistogram ; histogram [ indexHistogram ] += weights [ i ] ; }
|
public class SqlHelper { /** * select xxx , xxx . . .
* @ param entityClass
* @ return */
public static String selectAllColumns ( Class < ? > entityClass ) { } }
|
StringBuilder sql = new StringBuilder ( ) ; sql . append ( "SELECT " ) ; sql . append ( getAllColumns ( entityClass ) ) ; sql . append ( " " ) ; return sql . toString ( ) ;
|
public class Policy { /** * removePolicy removes a policy rule from the model .
* @ param sec the section , " p " or " g " .
* @ param ptype the policy type , " p " , " p2 " , . . or " g " , " g2 " , . .
* @ param rule the policy rule .
* @ return succeeds or not . */
public boolean removePolicy ( String sec , String ptype , List < String > rule ) { } }
|
for ( int i = 0 ; i < model . get ( sec ) . get ( ptype ) . policy . size ( ) ; i ++ ) { List < String > r = model . get ( sec ) . get ( ptype ) . policy . get ( i ) ; if ( Util . arrayEquals ( rule , r ) ) { model . get ( sec ) . get ( ptype ) . policy . remove ( i ) ; return true ; } } return false ;
|
public class AbnormalFinallyBlockReturn { /** * overrides the visitor to collect finally block info .
* @ param obj
* the code object to scan for finally blocks */
@ Override public void visitCode ( Code obj ) { } }
|
fbInfo . clear ( ) ; loadedReg = - 1 ; CodeException [ ] exc = obj . getExceptionTable ( ) ; if ( exc != null ) { for ( CodeException ce : exc ) { if ( ( ce . getCatchType ( ) == 0 ) && ( ce . getStartPC ( ) == ce . getHandlerPC ( ) ) ) { fbInfo . add ( new FinallyBlockInfo ( ce . getStartPC ( ) ) ) ; } } } if ( ! fbInfo . isEmpty ( ) ) { try { super . visitCode ( obj ) ; } catch ( StopOpcodeParsingException e ) { // no more finally blocks to check
} }
|
public class IslamicCalendar { /** * sets the calculation type for this calendar . */
public void setCalculationType ( CalculationType type ) { } }
|
cType = type ; // ensure civil property is up - to - date
if ( cType == CalculationType . ISLAMIC_CIVIL ) civil = true ; else civil = false ;
|
public class OtpConnection { /** * Send a pre - encoded message to a process on a remote node .
* @ param dest
* the Erlang PID of the remote process .
* @ param payload
* the encoded message to send .
* @ exception java . io . IOException
* if the connection is not active or a communication error
* occurs . */
public void sendBuf ( final OtpErlangPid dest , final OtpOutputStream payload ) throws IOException { } }
|
super . sendBuf ( self . pid ( ) , dest , payload ) ;
|
public class S { /** * Generalize format parameter for the sake of dynamic evaluation
* @ param o
* @ param pattern
* @ return a formatted string representation of the object */
public static String format ( ITemplate template , Object o , String pattern , Locale locale , String timezone ) { } }
|
if ( null == o ) return "" ; if ( o instanceof Date ) return format ( template , ( Date ) o , pattern , locale , timezone ) ; if ( o instanceof Number ) return format ( template , ( Number ) o , pattern , locale ) ; if ( null == locale ) { locale = I18N . locale ( template ) ; } RythmEngine engine = null == template ? RythmEngine . get ( ) : template . __engine ( ) ; if ( null == engine ) return o . toString ( ) ; for ( IFormatter fmt : engine . extensionManager ( ) . formatters ( ) ) { String s = fmt . format ( o , pattern , locale , timezone ) ; if ( null != s ) { return s ; } } return o . toString ( ) ;
|
public class DynamoDBExecutor { /** * Only the dirty properties will be set to the result Map if the specified entity is a dirty marker entity .
* @ param entity
* @ return */
public static Map < String , AttributeValueUpdate > toUpdateItem ( final Object entity ) { } }
|
return toUpdateItem ( entity , NamingPolicy . LOWER_CAMEL_CASE ) ;
|
public class SibTr { /** * Register a named component in the specified group with trace manager .
* A component must register with the trace manager before it can use the
* services provided by the convenience methods of this class . Components may
* register multiple times with the same name , but the trace manager ensures
* that such registrations return the same unique < code > TraceComponent < / code >
* associated with that name .
* @ param aClass a valid < code > Class < / code > to register a component for with
* the trace manager . The className is used as the name in the
* registration process .
* @ param group the name of the group that the named component is a member of .
* Null is allowed . If null is passed , the name is not added to a
* group . Once added to a group , there is no corresponding mechanism
* to remove a component from a group .
* @ param resourceBundleName the name of the message properties file to use
* when providing national language support for messages logged by
* this component . All messages for this component must be found in
* this file . If null is passed , the current message file name is not
* changed .
* @ return the < code > TraceComponent < / code > corresponding to the name of the
* specified class . */
public static TraceComponent register ( Class < ? > aClass , String group , String resourceBundleName ) { } }
|
return Tr . register ( aClass , group , resourceBundleName ) ;
|
public class ListMemberAccountsResult { /** * An array of account IDs .
* @ param memberAccounts
* An array of account IDs . */
public void setMemberAccounts ( java . util . Collection < String > memberAccounts ) { } }
|
if ( memberAccounts == null ) { this . memberAccounts = null ; return ; } this . memberAccounts = new java . util . ArrayList < String > ( memberAccounts ) ;
|
public class SimpleMessageFormatter { /** * Visible for testing */
static void appendHex ( StringBuilder out , Number number , FormatOptions options ) { } }
|
// We know there are no unexpected formatting flags ( currently only upper casing is supported ) .
boolean isUpper = options . shouldUpperCase ( ) ; // We cannot just call Long . toHexString ( ) as that would get negative values wrong .
long n = number . longValue ( ) ; // Roughly in order of expected usage .
if ( number instanceof Long ) { appendHex ( out , n , isUpper ) ; } else if ( number instanceof Integer ) { appendHex ( out , n & 0xFFFFFFFFL , isUpper ) ; } else if ( number instanceof Byte ) { appendHex ( out , n & 0xFFL , isUpper ) ; } else if ( number instanceof Short ) { appendHex ( out , n & 0xFFFFL , isUpper ) ; } else if ( number instanceof BigInteger ) { String hex = ( ( BigInteger ) number ) . toString ( 16 ) ; out . append ( isUpper ? hex . toUpperCase ( FORMAT_LOCALE ) : hex ) ; } else { // This will be caught and handled by the logger , but it should never happen .
throw new RuntimeException ( "unsupported number type: " + number . getClass ( ) ) ; }
|
public class Expressive { /** * Wait until a polled sample of the variable satisfies the criteria .
* Uses a default ticker . */
public < V > void waitUntil ( Sampler < V > variable , Matcher < ? super V > criteria ) { } }
|
waitUntil ( variable , eventually ( ) , criteria ) ;
|
public class CellUtil { /** * 合并单元格 , 可以根据设置的值来合并行和列
* @ param sheet 表对象
* @ param firstRow 起始行 , 0开始
* @ param lastRow 结束行 , 0开始
* @ param firstColumn 起始列 , 0开始
* @ param lastColumn 结束列 , 0开始
* @ param cellStyle 单元格样式 , 只提取边框样式
* @ return 合并后的单元格号 */
public static int mergingCells ( Sheet sheet , int firstRow , int lastRow , int firstColumn , int lastColumn , CellStyle cellStyle ) { } }
|
final CellRangeAddress cellRangeAddress = new CellRangeAddress ( firstRow , // first row ( 0 - based )
lastRow , // last row ( 0 - based )
firstColumn , // first column ( 0 - based )
lastColumn // last column ( 0 - based )
) ; if ( null != cellStyle ) { RegionUtil . setBorderTop ( cellStyle . getBorderTopEnum ( ) , cellRangeAddress , sheet ) ; RegionUtil . setBorderRight ( cellStyle . getBorderRightEnum ( ) , cellRangeAddress , sheet ) ; RegionUtil . setBorderBottom ( cellStyle . getBorderBottomEnum ( ) , cellRangeAddress , sheet ) ; RegionUtil . setBorderLeft ( cellStyle . getBorderLeftEnum ( ) , cellRangeAddress , sheet ) ; } return sheet . addMergedRegion ( cellRangeAddress ) ;
|
public class SwaggerAutoConfiguration { /** * 获取返回消息体列表
* @ param globalResponseMessageBodyList 全局Code消息返回集合
* @ return */
private List < ResponseMessage > getResponseMessageList ( List < SwaggerProperties . GlobalResponseMessageBody > globalResponseMessageBodyList ) { } }
|
List < ResponseMessage > responseMessages = new ArrayList < > ( ) ; for ( SwaggerProperties . GlobalResponseMessageBody globalResponseMessageBody : globalResponseMessageBodyList ) { ResponseMessageBuilder responseMessageBuilder = new ResponseMessageBuilder ( ) ; responseMessageBuilder . code ( globalResponseMessageBody . getCode ( ) ) . message ( globalResponseMessageBody . getMessage ( ) ) ; if ( ! StringUtils . isEmpty ( globalResponseMessageBody . getModelRef ( ) ) ) { responseMessageBuilder . responseModel ( new ModelRef ( globalResponseMessageBody . getModelRef ( ) ) ) ; } responseMessages . add ( responseMessageBuilder . build ( ) ) ; } return responseMessages ;
|
public class VectorMath { /** * Multiply the values in { @ code left } and { @ code right } and store the
* product in { @ code left } . This is an element by element multiplication .
* @ param left The left { @ code Vector } to multiply , and contain the result
* values .
* @ param right The right { @ code Vector } to multiply .
* @ return The product of { @ code left } and { @ code right } */
public static IntegerVector multiply ( IntegerVector left , IntegerVector right ) { } }
|
if ( left . length ( ) != right . length ( ) ) throw new IllegalArgumentException ( "Vectors of different sizes cannot be multiplied" ) ; int length = left . length ( ) ; for ( int i = 0 ; i < length ; ++ i ) left . set ( i , left . get ( i ) * right . get ( i ) ) ; return left ;
|
public class JsGeometryEditService { /** * Register a { @ link GeometryEditResumeHandler } that catches events that signal the editing process was resumed .
* @ param handler
* The { @ link GeometryEditResumeHandler } to add as listener .
* @ return The registration of the handler . */
public JsHandlerRegistration addGeometryEditResumeHandler ( final GeometryEditResumeHandler handler ) { } }
|
org . geomajas . plugin . editing . client . event . GeometryEditResumeHandler h ; h = new org . geomajas . plugin . editing . client . event . GeometryEditResumeHandler ( ) { public void onGeometryEditResume ( GeometryEditResumeEvent event ) { handler . onGeometryEditResume ( new org . geomajas . plugin . editing . jsapi . client . event . GeometryEditResumeEvent ( event . getGeometry ( ) ) ) ; } } ; return new JsHandlerRegistration ( new HandlerRegistration [ ] { delegate . addGeometryEditResumeHandler ( h ) } ) ;
|
public class AmazonEC2Client { /** * Detaches an internet gateway from a VPC , disabling connectivity between the internet and the VPC . The VPC must
* not contain any running instances with Elastic IP addresses or public IPv4 addresses .
* @ param detachInternetGatewayRequest
* @ return Result of the DetachInternetGateway operation returned by the service .
* @ sample AmazonEC2 . DetachInternetGateway
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / ec2-2016-11-15 / DetachInternetGateway " target = " _ top " > AWS API
* Documentation < / a > */
@ Override public DetachInternetGatewayResult detachInternetGateway ( DetachInternetGatewayRequest request ) { } }
|
request = beforeClientExecution ( request ) ; return executeDetachInternetGateway ( request ) ;
|
public class CallableStatementHandle { /** * # ifdef JDK > 6 */
public Reader getCharacterStream ( int parameterIndex ) throws SQLException { } }
|
checkClosed ( ) ; try { return this . internalCallableStatement . getCharacterStream ( parameterIndex ) ; } catch ( SQLException e ) { throw this . connectionHandle . markPossiblyBroken ( e ) ; }
|
public class ByteBuffer { /** * Deletes the first N bytes of the buffer . Avoids allocating any memory
* since there is no return value for this method . If you want to delete
* and also see the deleted data as a return value , please use the remove ( )
* methods . */
public void delete ( int count ) throws BufferSizeException { } }
|
if ( ( count < 0 ) || ( count > capacity ( ) ) ) { throw new IllegalArgumentException ( "Can only delete between 0 and " + capacity ( ) + " bytes from buffer, you passed in=" + count ) ; } if ( count > size ( ) ) { throw new BufferSizeException ( "Buffer size (" + size ( ) + ") not large enough to delete (" + count + ") bytes" ) ; } this . currentReadPosition = ( this . currentReadPosition + count ) % this . buffer . length ; this . currentBufferSize -= count ;
|
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getIfcSurfaceFeature ( ) { } }
|
if ( ifcSurfaceFeatureEClass == null ) { ifcSurfaceFeatureEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 674 ) ; } return ifcSurfaceFeatureEClass ;
|
public class GenericStorableCodec { /** * Returns a data decoder for the given generation .
* @ throws FetchNoneException if generation is unknown
* @ deprecated use direct decode method */
@ Deprecated public Decoder < S > getDecoder ( int generation ) throws FetchNoneException , FetchException { } }
|
try { synchronized ( mLayout ) { IntHashMap decoders = mDecoders ; if ( decoders == null ) { mDecoders = decoders = new IntHashMap ( ) ; } Decoder < S > decoder = ( Decoder < S > ) decoders . get ( generation ) ; if ( decoder == null ) { synchronized ( cCodecDecoders ) { Object altLayoutKey = new LayoutKey ( mLayout . getGeneration ( generation ) ) ; Object key = KeyFactory . createKey // Note : Generation is still required in the key
// because an equivalent layout ( with different generation )
// might have been supplied by Layout . getGeneration .
( new Object [ ] { mCodecKey , generation , altLayoutKey } ) ; decoder = ( Decoder < S > ) cCodecDecoders . get ( key ) ; if ( decoder == null ) { decoder = generateDecoder ( generation ) ; cCodecDecoders . put ( key , decoder ) ; } } mDecoders . put ( generation , decoder ) ; } return decoder ; } } catch ( NullPointerException e ) { if ( mLayout == null ) { throw new FetchNoneException ( "Layout evolution not supported" ) ; } throw e ; }
|
public class MFSFeatureGenerator { /** * Process the options of which kind of features are to be generated .
* @ param properties
* the properties map */
private void processRangeOptions ( final Map < String , String > properties ) { } }
|
final String featuresRange = properties . get ( "range" ) ; final String [ ] rangeArray = Flags . processMFSFeaturesRange ( featuresRange ) ; // options
if ( rangeArray [ 0 ] . equalsIgnoreCase ( "pos" ) ) { this . isPos = true ; } if ( rangeArray [ 1 ] . equalsIgnoreCase ( "posclass" ) ) { this . isPosClass = true ; } if ( rangeArray [ 2 ] . equalsIgnoreCase ( "lemma" ) ) { this . isLemma = true ; } if ( rangeArray [ 3 ] . equalsIgnoreCase ( "mfs" ) ) { this . isMFS = true ; } if ( rangeArray [ 4 ] . equalsIgnoreCase ( "monosemic" ) ) { this . isMonosemic = true ; }
|
public class AbstractRequestContext { /** * Set the frozen status of all EntityProxies owned by this context . */
private void freezeEntities ( final boolean frozen ) { } }
|
for ( final AutoBean < ? > bean : this . state . editedProxies . values ( ) ) { bean . setFrozen ( frozen ) ; }
|
public class MilestonesApi { /** * Get the specified milestone .
* @ param projectIdOrPath the project in the form of an Integer ( ID ) , String ( path ) , or Project instance
* @ param milestoneId the ID of the milestone tp get
* @ return a Milestone instance for the specified IDs
* @ throws GitLabApiException if any exception occurs */
public Milestone getMilestone ( Object projectIdOrPath , Integer milestoneId ) throws GitLabApiException { } }
|
Response response = get ( Response . Status . OK , getDefaultPerPageParam ( ) , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "milestones" , milestoneId ) ; return ( response . readEntity ( Milestone . class ) ) ;
|
public class JawrRequestHandler { /** * Returns the request path
* @ param request
* the request
* @ return the request path */
private String getRequestPath ( HttpServletRequest request ) { } }
|
String finalUrl = null ; String servletPath = request . getServletPath ( ) ; if ( "" . equals ( jawrConfig . getServletMapping ( ) ) ) { finalUrl = PathNormalizer . asPath ( servletPath ) ; } else { finalUrl = PathNormalizer . asPath ( servletPath + request . getPathInfo ( ) ) ; } return finalUrl ;
|
public class Equals { /** * This method should be called before beginning any equals methods . In order
* to return true the method :
* < ol >
* < li > The two given objects are the same instance using = = . This also means
* if both Objects are null then this method will return true ( well
* technically they are equal ) < / li >
* < li > Tests that neither object is null < / li >
* < li > The the two classes from the objects are equal using = = < / li >
* < / ol >
* The boilerplate using this method then becomes :
* < pre >
* boolean equals = false ;
* if ( EqualsHelper . classEqual ( this , obj ) ) {
* TargetClass casted = ( TargetClass ) obj ;
* equals = ( EqualsHelper . equal ( this . getId ( ) , casted . getId ( ) ) & amp ; & amp ; EqualsHelper
* . equal ( this . getName ( ) , casted . getName ( ) ) ) ;
* return equals ;
* < / pre >
* @ param one
* The first object to test
* @ param two
* The second object to test
* @ return A boolean indicating if the logic agrees that these two objects are
* equal at the class level */
public static boolean classEqual ( Object one , Object two ) { } }
|
return one == two || ! ( one == null || two == null ) && one . getClass ( ) == two . getClass ( ) ;
|
public class ConstantsSummaryBuilder { /** * Build the header for the given package .
* @ param node the XML element that specifies which components to document
* @ param summariesTree the tree to which the package header will be added */
public void buildPackageHeader ( XMLNode node , Content summariesTree ) { } }
|
String parsedPackageName = parsePackageName ( currentPackage . name ( ) ) ; if ( ! printedPackageHeaders . contains ( parsedPackageName ) ) { writer . addPackageName ( currentPackage , parsePackageName ( currentPackage . name ( ) ) , summariesTree ) ; printedPackageHeaders . add ( parsedPackageName ) ; }
|
public class FragmentBundlerCompat { /** * Inserts a Boolean value into the mapping of the underlying Bundle , replacing any existing
* value
* for the given key . Either key or value may be null .
* @ param key a String , or null
* @ param value a Boolean , or null
* @ return this bundler instance to chain method calls */
public FragmentBundlerCompat < F > put ( String key , boolean value ) { } }
|
bundler . put ( key , value ) ; return this ;
|
public class MusicService { /** * Forces a change of current theme . Assumes a theme was already played - there are no smooth fade ins of any
* kind . */
protected void changeTheme ( ) { } }
|
currentTheme = getNextTheme ( currentTheme ) ; if ( currentTheme != null ) { currentTheme . setLooping ( false ) ; currentTheme . setOnCompletionListener ( listener ) ; currentTheme . setVolume ( musicVolume . getPercent ( ) ) ; currentTheme . play ( ) ; }
|
public class AWSLambdaClient { /** * Updates the configuration of a Lambda function < a
* href = " https : / / docs . aws . amazon . com / lambda / latest / dg / versioning - aliases . html " > alias < / a > .
* @ param updateAliasRequest
* @ return Result of the UpdateAlias operation returned by the service .
* @ throws ServiceException
* The AWS Lambda service encountered an internal error .
* @ throws ResourceNotFoundException
* The resource ( for example , a Lambda function or access policy statement ) specified in the request does
* not exist .
* @ throws InvalidParameterValueException
* One of the parameters in the request is invalid . For example , if you provided an IAM role for AWS Lambda
* to assume in the < code > CreateFunction < / code > or the < code > UpdateFunctionConfiguration < / code > API , that
* AWS Lambda is unable to assume you will get this exception .
* @ throws TooManyRequestsException
* Request throughput limit exceeded .
* @ throws PreconditionFailedException
* The RevisionId provided does not match the latest RevisionId for the Lambda function or alias . Call the
* < code > GetFunction < / code > or the < code > GetAlias < / code > API to retrieve the latest RevisionId for your
* resource .
* @ sample AWSLambda . UpdateAlias
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / lambda - 2015-03-31 / UpdateAlias " target = " _ top " > AWS API
* Documentation < / a > */
@ Override public UpdateAliasResult updateAlias ( UpdateAliasRequest request ) { } }
|
request = beforeClientExecution ( request ) ; return executeUpdateAlias ( request ) ;
|
public class ProjectCalendar { /** * Retrieve a calendar exception which applies to this date .
* @ param date target date
* @ return calendar exception , or null if none match this date */
public ProjectCalendarException getException ( Date date ) { } }
|
ProjectCalendarException exception = null ; // We ' re working with expanded exceptions , which includes any recurring exceptions
// expanded into individual entries .
populateExpandedExceptions ( ) ; if ( ! m_expandedExceptions . isEmpty ( ) ) { sortExceptions ( ) ; int low = 0 ; int high = m_expandedExceptions . size ( ) - 1 ; long targetDate = date . getTime ( ) ; while ( low <= high ) { int mid = ( low + high ) >>> 1 ; ProjectCalendarException midVal = m_expandedExceptions . get ( mid ) ; int cmp = 0 - DateHelper . compare ( midVal . getFromDate ( ) , midVal . getToDate ( ) , targetDate ) ; if ( cmp < 0 ) { low = mid + 1 ; } else { if ( cmp > 0 ) { high = mid - 1 ; } else { exception = midVal ; break ; } } } } if ( exception == null && getParent ( ) != null ) { // Check base calendar as well for an exception .
exception = getParent ( ) . getException ( date ) ; } return ( exception ) ;
|
public class ConfigExpressionEvaluator { /** * Evaluates the count expression function . If the value is null , then 0 is
* returned . If the value is an array , the length is returned . If the value
* is a vector , the size is returned . Otherwise , 1 is returned .
* @ param value the value to evaluate
* @ return the count of the value */
private int evaluateCountExpression ( Object value ) { } }
|
if ( value == null ) { return 0 ; } if ( value . getClass ( ) . isArray ( ) ) { return Array . getLength ( value ) ; } if ( value instanceof Vector < ? > ) { return ( ( Vector < ? > ) value ) . size ( ) ; } return 1 ;
|
public class AbstractXmlMojo { /** * Returns the plugins catalog files . */
protected void setCatalogs ( List < File > pCatalogFiles , List < URL > pCatalogUrls ) throws MojoExecutionException { } }
|
if ( catalogs == null || catalogs . length == 0 ) { return ; } for ( int i = 0 ; i < catalogs . length ; i ++ ) { try { URL url = new URL ( catalogs [ i ] ) ; pCatalogUrls . add ( url ) ; } catch ( MalformedURLException e ) { File absoluteCatalog = asAbsoluteFile ( new File ( catalogs [ i ] ) ) ; if ( ! absoluteCatalog . exists ( ) || ! absoluteCatalog . isFile ( ) ) { throw new MojoExecutionException ( "That catalog does not exist:" + absoluteCatalog . getPath ( ) , e ) ; } pCatalogFiles . add ( absoluteCatalog ) ; } }
|
public class SchemaManager { /** * Returns the specified user - defined table or view visible within the
* context of the specified Session , or any system table of the given
* name . It excludes any temp tables created in other Sessions .
* Throws if the table does not exist in the context . */
public Table getTable ( Session session , String name , String schema ) { } }
|
Table t = null ; if ( schema == null ) { t = findSessionTable ( session , name , schema ) ; } if ( t == null ) { schema = session . getSchemaName ( schema ) ; t = findUserTable ( session , name , schema ) ; } if ( t == null ) { if ( SqlInvariants . INFORMATION_SCHEMA . equals ( schema ) && database . dbInfo != null ) { t = database . dbInfo . getSystemTable ( session , name ) ; } } if ( t == null ) { throw Error . error ( ErrorCode . X_42501 , name ) ; } return t ;
|
public class ChronoLocalDate { /** * Compares this date to another date , including the chronology .
* The comparison is based first on the underlying time - line date , then
* on the chronology .
* It is " consistent with equals " , as defined by { @ link Comparable } .
* For example , the following is the comparator order :
* < ol >
* < li > { @ code 2012-12-03 ( ISO ) } < / li >
* < li > { @ code 2012-12-04 ( ISO ) } < / li >
* < li > { @ code 2555-12-04 ( ThaiBuddhist ) } < / li >
* < li > { @ code 2012-12-05 ( ISO ) } < / li >
* < / ol >
* Values # 2 and # 3 represent the same date on the time - line .
* When two values represent the same date , the chronology ID is compared to distinguish them .
* This step is needed to make the ordering " consistent with equals " .
* If all the date objects being compared are in the same chronology , then the
* additional chronology stage is not required and only the local date is used .
* To compare the dates of two { @ code TemporalAccessor } instances , including dates
* in two different chronologies , use { @ link ChronoField # EPOCH _ DAY } as a comparator .
* @ param other the other date to compare to , not null
* @ return the comparator value , negative if less , positive if greater */
@ Override public int compareTo ( ChronoLocalDate other ) { } }
|
int cmp = Jdk8Methods . compareLongs ( toEpochDay ( ) , other . toEpochDay ( ) ) ; if ( cmp == 0 ) { cmp = getChronology ( ) . compareTo ( other . getChronology ( ) ) ; } return cmp ;
|
public class AT_Row { /** * Creates a new row with content with given cell context and a normal row style .
* @ param content the content for the row , each member of the array represents the content for a cell in the row , must not be null but can contain null members
* @ return a new row with content
* @ throws { @ link NullPointerException } if content was null */
public static AT_Row createContentRow ( Object [ ] content , TableRowStyle style ) { } }
|
Validate . notNull ( content ) ; Validate . notNull ( style ) ; Validate . validState ( style != TableRowStyle . UNKNOWN ) ; LinkedList < AT_Cell > cells = new LinkedList < AT_Cell > ( ) ; for ( Object o : content ) { cells . add ( new AT_Cell ( o ) ) ; } return new AT_Row ( ) { @ Override public TableRowType getType ( ) { return TableRowType . CONTENT ; } @ Override public TableRowStyle getStyle ( ) { return style ; } @ Override public LinkedList < AT_Cell > getCells ( ) { return cells ; } } ;
|
public class ApplicationPolicyStatementMarshaller { /** * Marshall the given parameter object . */
public void marshall ( ApplicationPolicyStatement applicationPolicyStatement , ProtocolMarshaller protocolMarshaller ) { } }
|
if ( applicationPolicyStatement == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( applicationPolicyStatement . getActions ( ) , ACTIONS_BINDING ) ; protocolMarshaller . marshall ( applicationPolicyStatement . getPrincipals ( ) , PRINCIPALS_BINDING ) ; protocolMarshaller . marshall ( applicationPolicyStatement . getStatementId ( ) , STATEMENTID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
public class MMapDataAccess { /** * Cleans up MappedByteBuffers . Be sure you bring the segments list in a consistent state
* afterwards .
* @ param from inclusive
* @ param to exclusive */
private void clean ( int from , int to ) { } }
|
for ( int i = from ; i < to ; i ++ ) { ByteBuffer bb = segments . get ( i ) ; cleanMappedByteBuffer ( bb ) ; segments . set ( i , null ) ; }
|
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link CoordinateReferenceSystemRefType } { @ code > }
* @ param value
* Java instance representing xml element ' s value .
* @ return
* the new instance of { @ link JAXBElement } { @ code < } { @ link CoordinateReferenceSystemRefType } { @ code > } */
@ XmlElementDecl ( namespace = "http://www.opengis.net/gml" , name = "baseCRS" ) public JAXBElement < CoordinateReferenceSystemRefType > createBaseCRS ( CoordinateReferenceSystemRefType value ) { } }
|
return new JAXBElement < CoordinateReferenceSystemRefType > ( _BaseCRS_QNAME , CoordinateReferenceSystemRefType . class , null , value ) ;
|
public class MavenCoordHelper { /** * Find class given class name .
* @ param className class name , may not be null .
* @ return class , will not be null .
* @ throws ClassNotFoundException thrown if class can not be found . */
protected static Class findClass ( final String className ) throws ClassNotFoundException { } }
|
try { return Thread . currentThread ( ) . getContextClassLoader ( ) . loadClass ( className ) ; } catch ( ClassNotFoundException e ) { try { return Class . forName ( className ) ; } catch ( ClassNotFoundException e1 ) { return MavenCoordHelper . class . getClassLoader ( ) . loadClass ( className ) ; } }
|
public class Weight { /** * Gets the larger of the two given weights .
* @ param w1
* a weight . Cannot be < code > null < / code > .
* @ param w2
* a weight . Cannot be < code > null < / code > .
* @ return a weight . */
public static Weight max ( Weight w1 , Weight w2 ) { } }
|
if ( w1 == null ) { throw new IllegalArgumentException ( "Argument w1 cannot be null" ) ; } if ( w2 == null ) { throw new IllegalArgumentException ( "Argument w2 cannot be null" ) ; } if ( ( w1 . isInfinity && w1 . posOrNeg ) || ( w2 . isInfinity && ! w2 . posOrNeg ) ) { return w1 ; } else if ( ( w2 . isInfinity && w2 . posOrNeg ) || ( w1 . isInfinity && ! w1 . posOrNeg ) ) { return w2 ; } else if ( w1 . val >= w2 . val ) { return w1 ; } else { return w2 ; }
|
public class Utils { /** * Construct a port resource . */
public static Protos . Resource ports ( Protos . Value . Range ... ranges ) { } }
|
return ports ( UNRESERVED_ROLE , ranges ) ;
|
public class PoStagger { /** * Initializes the current instance with the given context .
* Note : Do all initialization in this method , do not use the constructor . */
@ Override public void initialize ( UimaContext context ) throws ResourceInitializationException { } }
|
super . initialize ( context ) ; this . context = context ; this . logger = context . getLogger ( ) ; if ( this . logger . isLoggable ( Level . INFO ) ) { this . logger . log ( Level . INFO , "Initializing the OpenNLP " + "Part of Speech annotator." ) ; } POSModel model ; try { POSModelResource modelResource = ( POSModelResource ) context . getResourceObject ( UimaUtil . MODEL_PARAMETER ) ; model = modelResource . getModel ( ) ; } catch ( ResourceAccessException e ) { throw new ResourceInitializationException ( e ) ; } Integer beamSize = AnnotatorUtil . getOptionalIntegerParameter ( context , UimaUtil . BEAM_SIZE_PARAMETER ) ; if ( beamSize == null ) beamSize = POSTaggerME . DEFAULT_BEAM_SIZE ; this . posTagger = new POSTaggerME ( model , beamSize , 0 ) ;
|
public class AutomaticStopClustering { /** * { @ inheritDoc }
* Iteratively computes the k - means clustering of the dataset { @ code m }
* using a specified method for determineing when to automaticaly stop
* clustering . */
public Assignments cluster ( Matrix matrix , Properties props ) { } }
|
int endSize = Integer . parseInt ( props . getProperty ( NUM_CLUSTERS_END , DEFAULT_NUM_CLUSTERS_END ) ) ; return cluster ( matrix , endSize , props ) ;
|
public class ControlCreateDurableImpl { /** * / * ( non - Javadoc )
* @ see com . ibm . ws . sib . mfp . control . ControlCreateDurable # isCloned ( ) */
public final boolean isCloned ( ) { } }
|
boolean result = false ; // if the value is unset then it has come from an environment with back level schema
if ( jmo . getChoiceField ( ControlAccess . BODY_CREATEDURABLE_CLONED ) != ControlAccess . IS_BODY_CREATEDURABLE_CLONED_UNSET ) { result = jmo . getBooleanField ( ControlAccess . BODY_CREATEDURABLE_CLONED_VALUE ) ; } return result ;
|
public class MetadataFinder { /** * Send a track metadata update announcement to all registered listeners . */
private void deliverTrackMetadataUpdate ( int player , TrackMetadata metadata ) { } }
|
if ( ! getTrackMetadataListeners ( ) . isEmpty ( ) ) { final TrackMetadataUpdate update = new TrackMetadataUpdate ( player , metadata ) ; for ( final TrackMetadataListener listener : getTrackMetadataListeners ( ) ) { try { listener . metadataChanged ( update ) ; } catch ( Throwable t ) { logger . warn ( "Problem delivering track metadata update to listener" , t ) ; } } }
|
public class RestletUtilSesameRealm { /** * Returns an unmodifiable list of users .
* @ return An unmodifiable list of users . */
public List < RestletUtilUser > getUsers ( ) { } }
|
List < RestletUtilUser > result = new ArrayList < RestletUtilUser > ( ) ; RepositoryConnection conn = null ; try { conn = this . repository . getConnection ( ) ; final String query = this . buildSparqlQueryToFindUser ( null , true ) ; this . log . debug ( "findUser: query={}" , query ) ; final TupleQuery tupleQuery = conn . prepareTupleQuery ( QueryLanguage . SPARQL , query ) ; final TupleQueryResult queryResult = tupleQuery . evaluate ( ) ; try { while ( queryResult . hasNext ( ) ) { final BindingSet bindingSet = queryResult . next ( ) ; Binding binding = bindingSet . getBinding ( "userIdentifier" ) ; result . add ( this . buildRestletUserFromSparqlResult ( binding . getValue ( ) . stringValue ( ) , bindingSet ) ) ; } } finally { queryResult . close ( ) ; } } catch ( final RepositoryException e ) { throw new RuntimeException ( "Failure finding user in repository" , e ) ; } catch ( final MalformedQueryException e ) { throw new RuntimeException ( "Failure finding user in repository" , e ) ; } catch ( final QueryEvaluationException e ) { throw new RuntimeException ( "Failure finding user in repository" , e ) ; } finally { try { conn . close ( ) ; } catch ( final RepositoryException e ) { this . log . error ( "Failure to close connection" , e ) ; } } return Collections . unmodifiableList ( result ) ;
|
public class XlsWorkbook { /** * Returns the worksheet with the given name in the workbook .
* @ param name The name of the worksheet
* @ return The worksheet with the given name in the workbook */
@ Override public XlsWorksheet getSheet ( String name ) { } }
|
XlsWorksheet ret = null ; if ( workbook != null ) { Sheet sheet = workbook . getSheet ( name ) ; if ( sheet != null ) ret = new XlsWorksheet ( sheet ) ; } else if ( writableWorkbook != null ) { Sheet sheet = writableWorkbook . getSheet ( name ) ; if ( sheet != null ) ret = new XlsWorksheet ( sheet ) ; } return ret ;
|
public class AbstractEditor { /** * Returns the view specific menu bar constructed from
* the command group given by the menuBarCommandGroupName or
* its default
* @ return */
public JComponent getEditorMenuBar ( ) { } }
|
CommandGroup commandGroup = getCommandGroup ( getMenuBarCommandGroupName ( ) ) ; if ( commandGroup == null ) { return null ; } return commandGroup . createMenuBar ( ) ;
|
public class GrammarConverter { /** * This method converts a production group ( bind together by the vertical
* bar ' | ' ) into a set of productions .
* @ param productionDefinition
* @ throws GrammarException
* @ throws TreeException */
private void convertProductionGroup ( ParseTreeNode productionDefinition ) throws GrammarException , TreeException { } }
|
String productionName = productionDefinition . getChild ( "IDENTIFIER" ) . getText ( ) ; ParseTreeNode productionConstructions = productionDefinition . getChild ( "ProductionConstructions" ) ; convertSingleProductions ( productionName , productionConstructions ) ;
|
public class SocketStream { /** * Skips bytes in the file .
* @ param n the number of bytes to skip
* @ return the actual bytes skipped . */
@ Override public long skip ( long n ) throws IOException { } }
|
if ( _is == null ) { if ( _s == null ) return - 1 ; _is = _s . getInputStream ( ) ; } return _is . skip ( n ) ;
|
public class CollectionUtils { /** * Null - safe method returning the given { @ link Collection } if not { @ literal null } or an empty { @ link Collection }
* if { @ literal null } .
* @ param < T > { @ link Class } type of the elements in the { @ link Collection } .
* @ param collection { @ link Collection } to evaluate .
* @ return the given { @ link Collection } if not { @ literal null } or an empty { @ link Collection } if { @ literal null } .
* @ see java . util . Collection */
@ NullSafe public static < T > Collection < T > nullSafeCollection ( Collection < T > collection ) { } }
|
return collection != null ? collection : Collections . emptyList ( ) ;
|
public class Wikipedia { /** * Get the hibernate ID to a given pageID of a page .
* We need different methods for pages and categories here , as a page and a category can have the same ID .
* @ param pageID A pageID that should be mapped to the corresponding hibernate ID .
* @ return The hibernateID of the page with pageID or - 1 , if the pageID is not valid */
protected long __getPageHibernateId ( int pageID ) { } }
|
long hibernateID = - 1 ; // first look in the id mapping cache
if ( idMapPages . containsKey ( pageID ) ) { return idMapPages . get ( pageID ) ; } // The id was not found in the id mapping cache .
// It may not be in the cahe or may not exist at all .
Session session = this . __getHibernateSession ( ) ; session . beginTransaction ( ) ; Object retObjectPage = session . createQuery ( "select page.id from Page as page where page.pageId = :pageId" ) . setParameter ( "pageId" , pageID , IntegerType . INSTANCE ) . uniqueResult ( ) ; session . getTransaction ( ) . commit ( ) ; if ( retObjectPage != null ) { hibernateID = ( Long ) retObjectPage ; // add it to the cache
idMapPages . put ( pageID , hibernateID ) ; return hibernateID ; } return hibernateID ;
|
public class ASN1Dump { /** * dump out a DER object as a formatted string
* @ param obj the DERObject to be dumped out . */
public static String dumpAsString ( Object obj ) { } }
|
if ( obj instanceof DERObject ) { return _dumpAsString ( "" , ( DERObject ) obj ) ; } else if ( obj instanceof DEREncodable ) { return _dumpAsString ( "" , ( ( DEREncodable ) obj ) . getDERObject ( ) ) ; } return "unknown object type " + obj . toString ( ) ;
|
public class ConstantsSummaryWriterImpl { /** * Get the table caption and header for the constant summary table
* @ param typeElement the TypeElement to be documented
* @ return constant members header content */
public Content getConstantMembersHeader ( TypeElement typeElement ) { } }
|
// generate links backward only to public classes .
Content classlink = ( utils . isPublic ( typeElement ) || utils . isProtected ( typeElement ) ) ? getLink ( new LinkInfoImpl ( configuration , LinkInfoImpl . Kind . CONSTANT_SUMMARY , typeElement ) ) : new StringContent ( utils . getFullyQualifiedName ( typeElement ) ) ; PackageElement enclosingPackage = utils . containingPackage ( typeElement ) ; if ( ! enclosingPackage . isUnnamed ( ) ) { Content cb = new ContentBuilder ( ) ; cb . addContent ( enclosingPackage . getQualifiedName ( ) ) ; cb . addContent ( "." ) ; cb . addContent ( classlink ) ; return getClassName ( cb ) ; } else { return getClassName ( classlink ) ; }
|
public class I2CFactory { /** * Fetch all available I2C bus numbers from sysfs .
* Returns null , if nothing was found .
* @ return Return found I2C bus numbers or null
* @ throws IOException If fetching from sysfs interface fails */
public static int [ ] getBusIds ( ) throws IOException { } }
|
Set < Integer > set = null ; for ( Path device : Files . newDirectoryStream ( Paths . get ( "/sys/bus/i2c/devices" ) , "*" ) ) { String [ ] tokens = device . toString ( ) . split ( "-" ) ; if ( tokens . length == 2 ) { if ( set == null ) { set = new HashSet < Integer > ( ) ; } set . add ( Integer . valueOf ( tokens [ 1 ] ) ) ; } } int [ ] result = null ; if ( set != null ) { int counter = 0 ; result = new int [ set . size ( ) ] ; for ( Integer value : set ) { result [ counter ] = value . intValue ( ) ; counter = counter + 1 ; } } return result ;
|
public class HTMLOutputOperator { /** * Formats the complete box tree to an output stream .
* @ param tree the area tree to be printed
* @ param out a writer to be used for output */
public void dumpTo ( Page page , PrintWriter out ) { } }
|
if ( produceHeader ) { out . println ( "<!DOCTYPE html>" ) ; out . println ( "<html>" ) ; out . println ( "<head>" ) ; out . println ( "<title>" + page . getTitle ( ) + "</title>" ) ; out . println ( "<meta charset=\"utf-8\">" ) ; out . println ( "<meta name=\"generator\" content=\"FITLayout - box tree dump\">" ) ; out . println ( "</head>" ) ; out . println ( "<body>" ) ; } recursiveDumpBoxes ( page . getRoot ( ) , 1 , out ) ; if ( produceHeader ) { out . println ( "</body>" ) ; out . println ( "</html>" ) ; }
|
public class Conditional { /** * When the predicate of an { @ code else if } clause is representable as a single expression , format
* it directly as an { @ code else if } clause . */
private static void formatElseIfClauseWithNoDependencies ( IfThenPair < ? > condition , FormattingContext ctx ) { } }
|
ctx . append ( " else if (" ) . appendOutputExpression ( condition . predicate ) . append ( ") " ) ; try ( FormattingContext ignored = ctx . enterBlock ( ) ) { ctx . appendAll ( condition . consequent ) ; }
|
public class TypedIsomorphicGraphIndexer { /** * { @ inheritDoc } */
public int find ( G g ) { } }
|
for ( Map . Entry < G , Integer > e : graphIndices . entrySet ( ) ) { if ( isoTest . areIsomorphic ( g , e . getKey ( ) ) ) return e . getValue ( ) ; } return - 1 ;
|
public class BufferedByteInputStream { /** * Check if the read thread died , if so , throw an exception . */
private int checkOutput ( int readBytes ) throws IOException { } }
|
if ( readBytes > - 1 ) { return readBytes ; } if ( closed ) { throw new IOException ( "The stream has been closed" ) ; } if ( readThread . error != null ) { throw new IOException ( readThread . error . getMessage ( ) ) ; } return readBytes ;
|
public class CommonHelper { /** * Checks a { @ link SNode } if it is member of a specific { @ link SLayer } .
* @ param layerName Specifies the layername to check .
* @ param node Specifies the node to check .
* @ return true - it is true when the name of layername corresponds to the
* name of any label of the SNode . */
public static boolean checkSLayer ( String layerName , SNode node ) { } }
|
// robustness
if ( layerName == null || node == null ) { return false ; } Set < SLayer > sLayers = node . getLayers ( ) ; if ( sLayers != null ) { for ( SLayer l : sLayers ) { Collection < Label > labels = l . getLabels ( ) ; if ( labels != null ) { for ( Label label : labels ) { if ( layerName . equals ( label . getValue ( ) ) ) { return true ; } } } } } return false ;
|
public class Engine { /** * if exists this resource .
* @ param resourceName resource name
* @ return if exists
* @ since 1.4.1 */
public boolean exists ( final String resourceName ) { } }
|
final Loader myLoader = this . loader ; final String normalizedName = myLoader . normalize ( resourceName ) ; if ( normalizedName == null ) { return false ; } return myLoader . get ( normalizedName ) . exists ( ) ;
|
public class GetMaintenanceWindowExecutionRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( GetMaintenanceWindowExecutionRequest getMaintenanceWindowExecutionRequest , ProtocolMarshaller protocolMarshaller ) { } }
|
if ( getMaintenanceWindowExecutionRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getMaintenanceWindowExecutionRequest . getWindowExecutionId ( ) , WINDOWEXECUTIONID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
public class LinearClassifier { /** * Returns list of top features with weight above a certain threshold
* ( list is descending and across all labels )
* @ param threshold Threshold above which we will count the feature
* @ param useMagnitude Whether the notion of " large " should ignore
* the sign of the feature weight .
* @ param numFeatures How many top features to return ( - 1 for unlimited )
* @ return List of triples indicating feature , label , weight */
public List < Triple < F , L , Double > > getTopFeatures ( double threshold , boolean useMagnitude , int numFeatures ) { } }
|
return getTopFeatures ( null , threshold , useMagnitude , numFeatures , true ) ;
|
public class LineSegment { /** * LineSegment that starts at offset from start and runs for length towards end point
* @ param offset offset applied at begin of line
* @ param length length of the new segment
* @ return new LineSegment computed */
public LineSegment subSegment ( double offset , double length ) { } }
|
Point subSegmentStart = pointAlongLineSegment ( offset ) ; Point subSegmentEnd = pointAlongLineSegment ( offset + length ) ; return new LineSegment ( subSegmentStart , subSegmentEnd ) ;
|
public class UtilValidate { /** * Returns true if all characters are numbers ;
* first character is allowed to be + or - as well .
* Does not accept floating point , exponential notation , etc . */
public static boolean isSignedLong ( String s ) { } }
|
if ( isEmpty ( s ) ) return defaultEmptyOK ; try { Long . parseLong ( s ) ; return true ; } catch ( Exception e ) { return false ; }
|
public class Cache { /** * 返回多个集合的并集 , 多个集合由 keys 指定
* 不存在的 key 被视为空集 。 */
@ SuppressWarnings ( "rawtypes" ) public Set sunion ( Object ... keys ) { } }
|
Jedis jedis = getJedis ( ) ; try { Set < byte [ ] > data = jedis . sunion ( keysToBytesArray ( keys ) ) ; Set < Object > result = new HashSet < Object > ( ) ; valueSetFromBytesSet ( data , result ) ; return result ; } finally { close ( jedis ) ; }
|
public class HMacUtils { /** * Hash - based message authentication code with SHA1 digest as defined in :
* < a href = " http : / / www . ietf . org / rfc / rfc2104 . txt " > RFC 2104 < / a > .
* @ param data
* @ param key
* @ return */
public static byte [ ] hmacSHA1 ( byte [ ] data , byte [ ] key ) { } }
|
checkNotNull ( data ) ; checkNotNull ( key ) ; HMac hMac = new HMac ( new SHA1Digest ( ) ) ; KeyParameter keyParameter = new KeyParameter ( key ) ; hMac . init ( keyParameter ) ; hMac . update ( data , 0 , data . length ) ; byte [ ] result = new byte [ hMac . getMacSize ( ) ] ; hMac . doFinal ( result , 0 ) ; return result ;
|
public class BatchAttachToIndexMarshaller { /** * Marshall the given parameter object . */
public void marshall ( BatchAttachToIndex batchAttachToIndex , ProtocolMarshaller protocolMarshaller ) { } }
|
if ( batchAttachToIndex == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( batchAttachToIndex . getIndexReference ( ) , INDEXREFERENCE_BINDING ) ; protocolMarshaller . marshall ( batchAttachToIndex . getTargetReference ( ) , TARGETREFERENCE_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
public class HSQLInterface { /** * Get an serialized XML representation of the current schema / catalog .
* @ return The XML representing the catalog .
* @ throws HSQLParseException */
public VoltXMLElement getXMLFromCatalog ( ) throws HSQLParseException { } }
|
VoltXMLElement xml = emptySchema . duplicate ( ) ; // load all the tables
HashMappedList hsqlTables = getHSQLTables ( ) ; for ( int i = 0 ; i < hsqlTables . size ( ) ; i ++ ) { Table table = ( Table ) hsqlTables . get ( i ) ; VoltXMLElement vxmle = table . voltGetTableXML ( sessionProxy ) ; assert ( vxmle != null ) ; xml . children . add ( vxmle ) ; } return xml ;
|
public class RepositoryVerifierHandler { /** * returns the XmlCapable id associated with the literal .
* OJB maintains a RepositoryTags table that provides
* a mapping from xml - tags to XmlCapable ids .
* @ param literal the literal to lookup
* @ return the int value representing the XmlCapable
* @ throws MetadataException if no literal was found in tags mapping */
private int getLiteralId ( String literal ) throws PersistenceBrokerException { } }
|
// / / logger . debug ( " lookup : " + literal ) ;
try { return tags . getIdByTag ( literal ) ; } catch ( NullPointerException t ) { throw new MetadataException ( "unknown literal: '" + literal + "'" , t ) ; }
|
public class AccessSet { /** * Returns for given universal unique identifier in < i > _ uuid < / i > the cached
* instance of class AccessSet .
* @ param _ uuid UUID the AccessSet is wanted for
* @ return instance of class AccessSet
* @ throws CacheReloadException on error */
public static AccessSet get ( final UUID _uuid ) throws CacheReloadException { } }
|
final Cache < UUID , AccessSet > cache = InfinispanCache . get ( ) . < UUID , AccessSet > getCache ( AccessSet . UUIDCACHE ) ; if ( ! cache . containsKey ( _uuid ) ) { AccessSet . getAccessSetFromDB ( AccessSet . SQL_UUID , String . valueOf ( _uuid ) ) ; } return cache . get ( _uuid ) ;
|
public class AmazonElasticLoadBalancingClient { /** * Adds one or more subnets to the set of configured subnets for the specified load balancer .
* The load balancer evenly distributes requests across all registered subnets . For more information , see < a
* href = " http : / / docs . aws . amazon . com / elasticloadbalancing / latest / classic / elb - manage - subnets . html " > Add or Remove
* Subnets for Your Load Balancer in a VPC < / a > in the < i > Classic Load Balancers Guide < / i > .
* @ param attachLoadBalancerToSubnetsRequest
* Contains the parameters for AttachLoaBalancerToSubnets .
* @ return Result of the AttachLoadBalancerToSubnets operation returned by the service .
* @ throws LoadBalancerNotFoundException
* The specified load balancer does not exist .
* @ throws InvalidConfigurationRequestException
* The requested configuration change is not valid .
* @ throws SubnetNotFoundException
* One or more of the specified subnets do not exist .
* @ throws InvalidSubnetException
* The specified VPC has no associated Internet gateway .
* @ sample AmazonElasticLoadBalancing . AttachLoadBalancerToSubnets
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / elasticloadbalancing - 2012-06-01 / AttachLoadBalancerToSubnets "
* target = " _ top " > AWS API Documentation < / a > */
@ Override public AttachLoadBalancerToSubnetsResult attachLoadBalancerToSubnets ( AttachLoadBalancerToSubnetsRequest request ) { } }
|
request = beforeClientExecution ( request ) ; return executeAttachLoadBalancerToSubnets ( request ) ;
|
public class CodeAnalysing { /** * Examines a class by using the reflection API an retrieves all the
* direct dependencies with other classes ( fields declarations , method
* declarations and inner classes ) . Don ' t retrieve inheritance dependencies
* nor recursively .
* @ param c The class to examine
* @ return The class direct dependencies with other classes */
public static Collection < Class > getClassSimpleDependencies ( Class c ) { } }
|
HashSet < Class > result = new HashSet < Class > ( ) ; result . add ( c ) ; // add the own class
// declared subclasses
Class [ ] declaredClasses = c . getDeclaredClasses ( ) ; for ( Class cl : declaredClasses ) { result . add ( cl ) ; } // fields
Field [ ] declaredFields = c . getDeclaredFields ( ) ; for ( Field f : declaredFields ) { if ( ! BASETYPES . contains ( f . getType ( ) . getName ( ) ) ) result . add ( f . getType ( ) ) ; } // method arguments / return
Method [ ] declaredMethods = c . getDeclaredMethods ( ) ; for ( Method m : declaredMethods ) { result . add ( m . getReturnType ( ) ) ; for ( Class pc : m . getParameterTypes ( ) ) { if ( ! BASETYPES . contains ( pc . getName ( ) ) ) result . add ( pc ) ; } } return result ;
|
public class SendInvitationRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( SendInvitationRequest sendInvitationRequest , ProtocolMarshaller protocolMarshaller ) { } }
|
if ( sendInvitationRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( sendInvitationRequest . getUserArn ( ) , USERARN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
public class JsonLdUtils { /** * Returns true if the given value is a JSON - LD value
* @ param v
* the value to check .
* @ return */
static Boolean isValue ( Object v ) { } }
|
return ( v instanceof Map && ( ( Map < String , Object > ) v ) . containsKey ( "@value" ) ) ;
|
public class BitstampTradeService { /** * Required parameter types : { @ link TradeHistoryParamPaging # getPageLength ( ) } */
@ Override public UserTrades getTradeHistory ( TradeHistoryParams params ) throws IOException { } }
|
Long limit = null ; CurrencyPair currencyPair = null ; Long offset = null ; TradeHistoryParamsSorted . Order sort = null ; Long sinceTimestamp = null ; if ( params instanceof TradeHistoryParamPaging ) { limit = Long . valueOf ( ( ( TradeHistoryParamPaging ) params ) . getPageLength ( ) ) ; } if ( params instanceof TradeHistoryParamCurrencyPair ) { currencyPair = ( ( TradeHistoryParamCurrencyPair ) params ) . getCurrencyPair ( ) ; } if ( params instanceof TradeHistoryParamOffset ) { offset = ( ( TradeHistoryParamOffset ) params ) . getOffset ( ) ; } if ( params instanceof TradeHistoryParamsSorted ) { sort = ( ( TradeHistoryParamsSorted ) params ) . getOrder ( ) ; } if ( params instanceof TradeHistoryParamsTimeSpan ) { sinceTimestamp = DateUtils . toUnixTimeNullSafe ( ( ( TradeHistoryParamsTimeSpan ) params ) . getStartTime ( ) ) ; } BitstampUserTransaction [ ] txs = getBitstampUserTransactions ( limit , currencyPair , offset , sort == null ? null : sort . toString ( ) , sinceTimestamp ) ; return BitstampAdapters . adaptTradeHistory ( txs ) ;
|
public class ConcurrentBlockingIntQueue { /** * Returns < tt > true < / tt > if this queue contains the specified element . More formally , returns
* < tt > true < / tt > if and only if this queue contains at least one element < tt > e < / tt > such that
* < tt > o . equals ( e ) < / tt > . The behavior of this operation is undefined if modified while the operation is in
* progress .
* @ param o object to be checked for containment in this queue
* @ return < tt > true < / tt > if this queue contains the specified element
* @ throws ClassCastException if the class of the specified element is incompatible with this queue ( < a
* href = " . . / Collection . html # optional - restrictions " > optional < / a > )
* @ throws NullPointerException if the specified element is null ( < a href = " . . / Collection . html # optional - restrictions " > optional < / a > ) */
public boolean contains ( int o ) { } }
|
int readLocation = this . readLocation ; int writeLocation = this . writeLocation ; for ( ; ; ) { if ( readLocation == writeLocation ) return false ; if ( o == data [ readLocation ] ) return true ; // sets the readLocation my moving it on by 1 , this may cause it it wrap back to the start .
readLocation = ( readLocation + 1 == capacity ) ? 0 : readLocation + 1 ; }
|
public class GitlabAPI { /** * Delete project badge
* @ param projectId The id of the project for which the badge should be deleted
* @ param badgeId The id of the badge that should be deleted
* @ throws IOException on GitLab API call error */
public void deleteProjectBadge ( Serializable projectId , Integer badgeId ) throws IOException { } }
|
String tailUrl = GitlabProject . URL + "/" + sanitizeProjectId ( projectId ) + GitlabBadge . URL + "/" + badgeId ; retrieve ( ) . method ( DELETE ) . to ( tailUrl , Void . class ) ;
|
public class ValidatingCallbackHandler { /** * / * ( non - Javadoc )
* @ see org . jboss . as . cli . operation . OperationParser . CallbackHandler # nodeType ( java . lang . String ) */
@ Override public void nodeType ( int index , String nodeType ) throws OperationFormatException { } }
|
assertValidType ( nodeType ) ; validatedNodeType ( index , nodeType ) ;
|
public class JobFlowDetailMarshaller { /** * Marshall the given parameter object . */
public void marshall ( JobFlowDetail jobFlowDetail , ProtocolMarshaller protocolMarshaller ) { } }
|
if ( jobFlowDetail == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( jobFlowDetail . getJobFlowId ( ) , JOBFLOWID_BINDING ) ; protocolMarshaller . marshall ( jobFlowDetail . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( jobFlowDetail . getLogUri ( ) , LOGURI_BINDING ) ; protocolMarshaller . marshall ( jobFlowDetail . getAmiVersion ( ) , AMIVERSION_BINDING ) ; protocolMarshaller . marshall ( jobFlowDetail . getExecutionStatusDetail ( ) , EXECUTIONSTATUSDETAIL_BINDING ) ; protocolMarshaller . marshall ( jobFlowDetail . getInstances ( ) , INSTANCES_BINDING ) ; protocolMarshaller . marshall ( jobFlowDetail . getSteps ( ) , STEPS_BINDING ) ; protocolMarshaller . marshall ( jobFlowDetail . getBootstrapActions ( ) , BOOTSTRAPACTIONS_BINDING ) ; protocolMarshaller . marshall ( jobFlowDetail . getSupportedProducts ( ) , SUPPORTEDPRODUCTS_BINDING ) ; protocolMarshaller . marshall ( jobFlowDetail . getVisibleToAllUsers ( ) , VISIBLETOALLUSERS_BINDING ) ; protocolMarshaller . marshall ( jobFlowDetail . getJobFlowRole ( ) , JOBFLOWROLE_BINDING ) ; protocolMarshaller . marshall ( jobFlowDetail . getServiceRole ( ) , SERVICEROLE_BINDING ) ; protocolMarshaller . marshall ( jobFlowDetail . getAutoScalingRole ( ) , AUTOSCALINGROLE_BINDING ) ; protocolMarshaller . marshall ( jobFlowDetail . getScaleDownBehavior ( ) , SCALEDOWNBEHAVIOR_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
public class Timezones { /** * Get the default timezone id for this thread .
* @ return String id
* @ throws TimezonesException on error */
public static String getThreadDefaultTzid ( ) throws TimezonesException { } }
|
final String id = threadTzid . get ( ) ; if ( id != null ) { return id ; } return getSystemDefaultTzid ( ) ;
|
public class FileSystemContext { /** * Write the contents of the given file data to the file at the given path .
* This will replace any existing data .
* @ param filePath The path to the file to write to
* @ param fileData The data to write to the given file
* @ throws IOException if an error occurs writing the data
* @ see # writeToFile ( String , String , boolean ) */
public void writeToFile ( String filePath , String fileData ) throws IOException { } }
|
writeToFile ( filePath , fileData , false ) ;
|
public class MPXWriter { /** * This method is called when double quotes are found as part of
* a value . The quotes are escaped by adding a second quote character
* and the entire value is quoted .
* @ param value text containing quote characters
* @ return escaped and quoted text */
private String escapeQuotes ( String value ) { } }
|
StringBuilder sb = new StringBuilder ( ) ; int length = value . length ( ) ; char c ; sb . append ( '"' ) ; for ( int index = 0 ; index < length ; index ++ ) { c = value . charAt ( index ) ; sb . append ( c ) ; if ( c == '"' ) { sb . append ( '"' ) ; } } sb . append ( '"' ) ; return ( sb . toString ( ) ) ;
|
public class IntArrayList { /** * Remove at a given index .
* @ param index of the element to be removed .
* @ return the existing value at this index . */
public Integer remove ( @ DoNotSub final int index ) { } }
|
checkIndex ( index ) ; final int value = elements [ index ] ; @ DoNotSub final int moveCount = size - index - 1 ; if ( moveCount > 0 ) { System . arraycopy ( elements , index + 1 , elements , index , moveCount ) ; } size -- ; return value ;
|
public class TextField { /** * Do the undo of the paste , overrideable for custom behaviour
* @ param oldCursorPos before the paste
* @ param oldText The text before the last paste */
protected void doUndo ( int oldCursorPos , String oldText ) { } }
|
if ( oldText != null ) { setText ( oldText ) ; setCursorPos ( oldCursorPos ) ; }
|
public class EPSProjectWBSSpreadType { /** * Gets the value of the period property .
* This accessor method returns a reference to the live list ,
* not a snapshot . Therefore any modification you make to the
* returned list will be present inside the JAXB object .
* This is why there is not a < CODE > set < / CODE > method for the period property .
* For example , to add a new item , do as follows :
* < pre >
* getPeriod ( ) . add ( newItem ) ;
* < / pre >
* Objects of the following type ( s ) are allowed in the list
* { @ link EPSProjectWBSSpreadType . Period } */
public List < EPSProjectWBSSpreadType . Period > getPeriod ( ) { } }
|
if ( period == null ) { period = new ArrayList < EPSProjectWBSSpreadType . Period > ( ) ; } return this . period ;
|
public class InferenceEngine { /** * Infer an end context for the given template and , if requested , choose escaping directives for
* any < code > { print } < / code > .
* @ param templateNode A template that is visited in { @ code startContext } and no other . If a
* template can be reached from multiple contexts , then it should be cloned . This class
* automatically does that for called templates .
* @ param inferences Receives all suggested changes and inferences to tn .
* @ return The end context when the given template is reached from { @ code startContext } . */
public static Context inferTemplateEndContext ( TemplateNode templateNode , Context startContext , Inferences inferences , ErrorReporter errorReporter ) { } }
|
InferenceEngine inferenceEngine = new InferenceEngine ( inferences , errorReporter ) ; // Context started off as startContext and we have propagated context through all of
// template ' s children , so now return the template ' s end context .
return inferenceEngine . infer ( templateNode , startContext ) ;
|
public class YamlPropertyManager { /** * Only returns cached ( previously - read ) properties .
* For other values , refer to yaml / property files .
* Or execute CLI command < code > mdw config [ name ] < / code > . */
@ Override public Properties getAllProperties ( ) { } }
|
Properties props = new Properties ( ) ; for ( String name : cachedValues . keySet ( ) ) { props . put ( name , String . valueOf ( cachedValues . get ( name ) ) ) ; } return props ;
|
public class SREsPreferencePage { /** * Refresh the UI list of SRE . */
protected void refreshSREListUI ( ) { } }
|
// Refreshes the SRE listing after a SRE install notification , might not
// happen on the UI thread .
final Display display = Display . getDefault ( ) ; if ( display . getThread ( ) . equals ( Thread . currentThread ( ) ) ) { if ( ! this . sresList . isBusy ( ) ) { this . sresList . refresh ( ) ; } } else { display . syncExec ( new Runnable ( ) { @ SuppressWarnings ( "synthetic-access" ) @ Override public void run ( ) { if ( ! SREsPreferencePage . this . sresList . isBusy ( ) ) { SREsPreferencePage . this . sresList . refresh ( ) ; } } } ) ; }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.