signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ProcBol { /** * Skip line break characters . ' \ r \ n ' for example * @ param source text source * @ param offset current index * @ return new index */ private int skipLineBreak ( Source source , final int offset ) { } }
char p ; char c ; int index = offset ; p = source . charAt ( index ) ; index ++ ; if ( index < source . length ( ) ) { c = source . charAt ( index ) ; if ( ( c == '\n' || c == '\r' ) && c != p ) { index ++ ; } } return index ;
public class FSNamesystem { /** * Start decommissioning the specified datanode . */ void startDecommission ( DatanodeDescriptor node ) throws IOException { } }
if ( ! node . isDecommissionInProgress ( ) && ! node . isDecommissioned ( ) ) { LOG . info ( "Start Decommissioning node " + node . getName ( ) + " with " + node . numBlocks ( ) + " blocks." ) ; synchronized ( heartbeats ) { updateStats ( node , false ) ; node . startDecommission ( ) ; updateStats ( node , true ) ; } i...
public class JsonLdProcessor { /** * Frames the given input using the frame according to the steps in the * < a href = * " http : / / json - ld . org / spec / latest / json - ld - framing / # framing - algorithm " > * Framing Algorithm < / a > . * @ param input * The input JSON - LD object . * @ param frame...
if ( frame instanceof Map ) { frame = JsonLdUtils . clone ( frame ) ; } // TODO string / IO input // 2 . Set expanded input to the result of using the expand method using // input and options . final Object expandedInput = expand ( input , opts ) ; // 3 . Set expanded frame to the result of using the expand method usin...
public class UrlMap { /** * < pre > * URL prefix . Uses regular expression syntax , which means regexp * special characters must be escaped , but should not contain groupings . * All URLs that begin with this prefix are handled by this handler , using the * portion of the URL after the prefix as part of the fil...
java . lang . Object ref = urlRegex_ ; if ( ref instanceof java . lang . String ) { com . google . protobuf . ByteString b = com . google . protobuf . ByteString . copyFromUtf8 ( ( java . lang . String ) ref ) ; urlRegex_ = b ; return b ; } else { return ( com . google . protobuf . ByteString ) ref ; }
public class MethodInfo { /** * メソッド名を設定する * @ param methodName メソッド名 * @ throws IllegalArgumentException methodName is empty . */ @ XmlAttribute ( name = "name" , required = true ) public void setMethodName ( final String methodName ) { } }
ArgUtils . notEmpty ( methodName , methodName ) ; this . methodName = methodName ;
public class JsonStreamer { /** * Parse the current byte buffer to find the next potential message . * The first potential serialized message data in the buffer is removed and * returned . Any delimiters at the start of the buffer will be cleared . * @ return A potential serialized JSON message or null if none fo...
String line = null ; while ( line == null || line . isEmpty ( ) ) { int delimiterIndex = mBuffer . indexOf ( DELIMITER ) ; if ( delimiterIndex != - 1 ) { line = mBuffer . substring ( 0 , delimiterIndex ) ; mBuffer . delete ( 0 , delimiterIndex + 1 ) ; } else { line = null ; break ; } } return line ;
public class SignatureGenerator { /** * ClassSignature : : = * OptFormalTypeParameters SuperclassSignature { SuperinterfaceSignature } . */ private void genClassSignature ( TypeElement type , StringBuilder sb ) { } }
genOptFormalTypeParameters ( type . getTypeParameters ( ) , sb ) ; // JDT returns null for an interface ' s superclass , but signatures expect Object . if ( type . getKind ( ) . isInterface ( ) ) { sb . append ( JAVA_OBJECT_SIGNATURE ) ; } else { genTypeSignature ( type . getSuperclass ( ) , sb ) ; } for ( TypeMirror i...
public class ExcelWriter { /** * 将Excel Workbook刷出到输出流 * @ param out 输出流 * @ param isCloseOut 是否关闭输出流 * @ return this * @ throws IORuntimeException IO异常 * @ since 4.4.1 */ public ExcelWriter flush ( OutputStream out , boolean isCloseOut ) throws IORuntimeException { } }
Assert . isFalse ( this . isClosed , "ExcelWriter has been closed!" ) ; try { this . workbook . write ( out ) ; out . flush ( ) ; } catch ( IOException e ) { throw new IORuntimeException ( e ) ; } finally { if ( isCloseOut ) { IoUtil . close ( out ) ; } } return this ;
public class ModelsImpl { /** * Update an entity role for a given entity . * @ param appId The application ID . * @ param versionId The version ID . * @ param entityId The entity ID . * @ param roleId The entity role ID . * @ param updateCustomPrebuiltEntityRoleOptionalParameter the object representing the op...
return ServiceFuture . fromResponse ( updateCustomPrebuiltEntityRoleWithServiceResponseAsync ( appId , versionId , entityId , roleId , updateCustomPrebuiltEntityRoleOptionalParameter ) , serviceCallback ) ;
public class Http2ClientStreamTransportState { /** * Inspect the raw metadata and figure out what charset is being used . */ private static Charset extractCharset ( Metadata headers ) { } }
String contentType = headers . get ( GrpcUtil . CONTENT_TYPE_KEY ) ; if ( contentType != null ) { String [ ] split = contentType . split ( "charset=" , 2 ) ; try { return Charset . forName ( split [ split . length - 1 ] . trim ( ) ) ; } catch ( Exception t ) { // Ignore and assume UTF - 8 } } return Charsets . UTF_8 ;
public class SocketBackend { /** * send data from frontend to backend ( import of data ) */ public static void sendStream ( ObjectOutputStream oos , InputStream inputStream ) throws IOException { } }
int b ; while ( ( b = inputStream . read ( ) ) >= 0 ) { oos . write ( b ) ; } oos . flush ( ) ;
public class AbstractConsistentHash { /** * Adds all elements from < code > src < / code > list that do not already exist in < code > dest < / code > list to the latter . * @ param dest List where elements are added * @ param src List of elements to add - this is never modified */ protected static void mergeLists (...
for ( Address node : src ) { if ( ! dest . contains ( node ) ) { dest . add ( node ) ; } }
public class RecipientListStringAnalyser { /** * Mind : Include ' : ' suffix , e . g . for " bcc : < email address > " it is " bcc " + " : " , i . e . 3 + 1 = 4 */ private int lengthOfTypePrefix ( int type ) { } }
int length ; switch ( type ) { case EmailRecipientUtils . BCC : length = 4 ; break ; case EmailRecipientUtils . CC : length = 3 ; break ; case EmailRecipientUtils . TO : length = 0 ; break ; default : throw new IllegalArgumentException ( "Unknown type prefix: " + type ) ; } return length ;
public class ExecuteAsyncRunnable { /** * Returns true if lock succeeded , or no lock was needed . * Returns false if locking was unsuccessfull . */ protected boolean lockJobIfNeeded ( ) { } }
try { if ( job . isExclusive ( ) ) { processEngineConfiguration . getCommandExecutor ( ) . execute ( new LockExclusiveJobCmd ( job ) ) ; } } catch ( Throwable lockException ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "Could not lock exclusive job. Unlocking job so it can be acquired again. Catched exception: " ...
public class BaseDrawable { /** * { @ inheritDoc } */ @ Override public void draw ( @ NonNull Canvas canvas ) { } }
Rect bounds = getBounds ( ) ; if ( bounds . width ( ) == 0 || bounds . height ( ) == 0 ) { return ; } int saveCount = canvas . save ( ) ; canvas . translate ( bounds . left , bounds . top ) ; onDraw ( canvas , bounds . width ( ) , bounds . height ( ) ) ; canvas . restoreToCount ( saveCount ) ;
public class Execute { /** * set the value arguments Command - line arguments passed to the application . * @ param args value to set */ public void setArguments ( Object args ) { } }
if ( args instanceof lucee . runtime . type . Collection ) { StringBuilder sb = new StringBuilder ( ) ; lucee . runtime . type . Collection coll = ( lucee . runtime . type . Collection ) args ; // lucee . runtime . type . Collection . Key [ ] keys = coll . keys ( ) ; Iterator < Object > it = coll . valueIterator ( ) ; ...
public class FileMonitorSource { /** * Get the file lines since the actual until the last . * @ param actual Actual line identification * @ return The list of lines * @ throws Exception */ @ Override public List < MonitorLine > getLinesFrom ( Object actual ) throws Exception { } }
// TODO Enhance line retrieve to get last lines directly String line ; Integer currentLineNo = 0 ; final List < MonitorLine > result = new ArrayList < MonitorLine > ( ) ; BufferedReader in = null ; try { in = new BufferedReader ( new FileReader ( getFilename ( ) ) ) ; Integer startLine = ( actual == null ) ? 0 : ( Inte...
public class PolicyStatesInner { /** * Summarizes policy states for the resource group level policy assignment . * @ param subscriptionId Microsoft Azure subscription ID . * @ param resourceGroupName Resource group name . * @ param policyAssignmentName Policy assignment name . * @ throws IllegalArgumentExceptio...
return summarizeForResourceGroupLevelPolicyAssignmentWithServiceResponseAsync ( subscriptionId , resourceGroupName , policyAssignmentName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class CommerceTierPriceEntryPersistenceImpl { /** * Returns the commerce tier price entry with the primary key or returns < code > null < / code > if it could not be found . * @ param primaryKey the primary key of the commerce tier price entry * @ return the commerce tier price entry , or < code > null < / c...
Serializable serializable = entityCache . getResult ( CommerceTierPriceEntryModelImpl . ENTITY_CACHE_ENABLED , CommerceTierPriceEntryImpl . class , primaryKey ) ; if ( serializable == nullModel ) { return null ; } CommerceTierPriceEntry commerceTierPriceEntry = ( CommerceTierPriceEntry ) serializable ; if ( commerceTie...
public class AWSElasticBeanstalkClient { /** * Returns the descriptions of existing applications . * @ param describeApplicationsRequest * Request to describe one or more applications . * @ return Result of the DescribeApplications operation returned by the service . * @ sample AWSElasticBeanstalk . DescribeApp...
request = beforeClientExecution ( request ) ; return executeDescribeApplications ( request ) ;
public class MutatorImpl { /** * Deletes the columns defined in the HSuperColumn . If there are no HColumns attached , * we delete the whole thing . */ public < SN , N , V > Mutator < K > addSubDelete ( K key , String cf , HSuperColumn < SN , N , V > sc ) { } }
return addSubDelete ( key , cf , sc , keyspace . createClock ( ) ) ;
public class WorkbinsApi { /** * Get All Valid Workbins . * @ param cancelConsultData Request parameters . ( optional ) * @ return ApiResponse & lt ; ApiSuccessResponse & gt ; * @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the response body */ public ApiResponse < Api...
com . squareup . okhttp . Call call = getWorkbinsValidateBeforeCall ( cancelConsultData , null , null ) ; Type localVarReturnType = new TypeToken < ApiSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class MapStorage { /** * Caller must hold upgrade or write lock . */ private boolean doTryDeleteNoLock ( S storable ) { } }
return mMap . remove ( new Key < S > ( storable , mFullComparator ) ) != null ;
public class WSectionRenderer { /** * Paints the given WSection . * @ param component the WSection to paint . * @ param renderContext the RenderContext to paint to . */ @ Override public void doRender ( final WComponent component , final WebXmlRenderContext renderContext ) { } }
WSection section = ( WSection ) component ; XmlStringBuilder xml = renderContext . getWriter ( ) ; boolean renderChildren = isRenderContent ( section ) ; xml . appendTagOpen ( "ui:section" ) ; xml . appendAttribute ( "id" , component . getId ( ) ) ; xml . appendOptionalAttribute ( "class" , component . getHtmlClass ( )...
public class DatabaseRepresentation { /** * This method reverts the latest revision data to the requested . * @ param resourceName * The name of the XML resource . * @ param backToRevision * The revision value , which has to be set as the latest . * @ throws WebApplicationException * @ throws TTException */...
ISession session = null ; INodeWriteTrx wtx = null ; boolean abort = false ; try { session = mDatabase . getSession ( new SessionConfiguration ( resourceName , StandardSettings . KEY ) ) ; wtx = new NodeWriteTrx ( session , session . beginBucketWtx ( ) , HashKind . Rolling ) ; wtx . revertTo ( backToRevision ) ; wtx . ...
public class QueryHandler { /** * Peek the next token , returning the QUERY _ STATE corresponding to it and placing the readerIndex just after * the token ' s ' : ' . Must be at the end of the previous token . * @ param lastChunk true if this is the last chunk * @ return the next QUERY _ STATE */ private byte tra...
int endNextToken = findNextChar ( responseContent , ':' ) ; if ( endNextToken < 0 && ! lastChunk ) { return queryParsingState ; } if ( endNextToken < 0 && lastChunk && queryParsingState >= QUERY_STATE_STATUS ) { return QUERY_STATE_NO_INFO ; } byte newState ; ByteBuf peekSlice = responseContent . readSlice ( endNextToke...
public class EmptyCheckpointManager { /** * Do nothing since checkpoints aren ' t being persisted . */ @ Override public void trackCheckpoint ( String startToken , String checkpointToken ) { } }
tokenMap . put ( startToken , checkpointToken ) ;
public class AfplibFactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public String convertFNCXUnitBaseToString ( EDataType eDataType , Object instanceValue ) { } }
return instanceValue == null ? null : instanceValue . toString ( ) ;
public class BackupServerApp { /** * Flush the buffer . * @ param bSendFakeTrx Send a fake trx before flushing ( This guarantees activity on the stream before the flush [ In case it just autoflushed the entire buffer ] ) */ public synchronized void flush ( boolean bSendFakeTrx ) { } }
try { if ( bSendFakeTrx ) this . getWriter ( ) . writeObject ( FAKE_TRX ) ; this . getWriter ( ) . flush ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; }
public class Error { /** * Thrown if the class isn ' t mapped . * @ param aClass class to analyze */ public static void classNotMapped ( Class < ? > aClass ) { } }
throw new ClassNotMappedException ( MSG . INSTANCE . message ( classNotMappedException1 , aClass . getSimpleName ( ) ) ) ;
public class ChainingCasProtocolValidationSpecification { /** * Add policies . * @ param policies the policies */ public void addSpecifications ( final CasProtocolValidationSpecification ... policies ) { } }
this . specifications . addAll ( Arrays . stream ( policies ) . collect ( Collectors . toList ( ) ) ) ;
public class ApplicationTenancyRepository { /** * region > findByNameOrPathMatching */ @ Programmatic public List < ApplicationTenancy > findByNameOrPathMatchingCached ( final String search ) { } }
return queryResultsCache . execute ( new Callable < List < ApplicationTenancy > > ( ) { @ Override public List < ApplicationTenancy > call ( ) throws Exception { return findByNameOrPathMatching ( search ) ; } } , ApplicationTenancyRepository . class , "findByNameOrPathMatchingCached" , search ) ;
public class DateUtils { /** * Convert an Object to a Time . */ public static java . sql . Time toTime ( Object value ) throws ParseException { } }
if ( value == null ) { return null ; } if ( value instanceof java . sql . Time ) { return ( java . sql . Time ) value ; } if ( value instanceof String ) { if ( "" . equals ( ( String ) value ) ) { return null ; } return new java . sql . Time ( IN_TIME_FORMAT . parse ( ( String ) value ) . getTime ( ) ) ; } return new j...
public class RpcStageEventDispatcher { /** * 触发通知 */ public boolean single ( StageType stage , EtlEventData eventData ) { } }
Assert . notNull ( eventData ) ; eventData . setCurrNid ( ArbitrateConfigUtils . getCurrentNid ( ) ) ; StageSingleEvent event = new StageSingleEvent ( ArbitrateEventType . stageSingle ) ; event . setPipelineId ( eventData . getPipelineId ( ) ) ; event . setStage ( stage ) ; event . setData ( eventData ) ; if ( isLocal ...
public class Util { /** * Trims a String , ensuring that the maximum length isn ' t reached . * @ param string string to trim * @ param maxMessageLength maximum length of the string * @ return trimmed string */ public static String trimString ( String string , int maxMessageLength ) { } }
if ( string == null ) { return null ; } else if ( string . length ( ) > maxMessageLength ) { // CHECKSTYLE . OFF : MagicNumber return string . substring ( 0 , maxMessageLength - 3 ) + "..." ; // CHECKSTYLE . ON : MagicNumber } else { return string ; }
public class KunderaQueryUtils { /** * On logical expression . * @ param expression * the expression * @ param m * the m * @ param idColumn * the id column * @ return the filter */ public static void onLogicalExpression ( Expression expression , EntityMetadata m , KunderaMetadata kunderaMetadata , Kundera...
if ( expression instanceof OrExpression ) { kunderaQuery . addFilterClause ( "(" ) ; } traverse ( ( ( LogicalExpression ) expression ) . getLeftExpression ( ) , m , kunderaMetadata , kunderaQuery , false ) ; if ( expression instanceof OrExpression ) { kunderaQuery . addFilterClause ( ")" ) ; } kunderaQuery . addFilterC...
public class MapLocale { /** * Passing in a Locale , you are able to receive the { @ link MapLocale } object which it is currently * paired with as a fallback . If this returns null , there was no matching { @ link MapLocale } to go along with the * passed in Locale . If you expected a non - null result , you shoul...
String fallbackCode = locale . getLanguage ( ) . substring ( 0 , 2 ) ; MapLocale foundMapLocale = null ; for ( Locale possibleLocale : LOCALE_SET . keySet ( ) ) { if ( possibleLocale . getLanguage ( ) . equals ( fallbackCode ) ) { foundMapLocale = LOCALE_SET . get ( possibleLocale ) ; break ; } } return foundMapLocale ...
public class ContextInitializer { /** * Clears meta - data collections . */ private void destroyInitializer ( ) { } }
GdxMaps . clearAll ( fieldProcessors , methodProcessors , typeProcessors ) ; GdxArrays . clearAll ( scannedMetaAnnotations , scannedAnnotations , processors , delayedConstructions , manuallyAddedComponents , manuallyAddedProcessors ) ;
public class ConnectionsInner { /** * Retrieve a list of connections . * @ param resourceGroupName Name of an Azure Resource group . * @ param automationAccountName The name of the automation account . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the ...
return listByAutomationAccountWithServiceResponseAsync ( resourceGroupName , automationAccountName ) . map ( new Func1 < ServiceResponse < Page < ConnectionInner > > , Page < ConnectionInner > > ( ) { @ Override public Page < ConnectionInner > call ( ServiceResponse < Page < ConnectionInner > > response ) { return resp...
public class Gen { /** * SQLを生成します 。 * @ param daoDesc Dao記述 * @ param sqlDesc SQL記述 */ protected void generateSql ( DaoDesc daoDesc , SqlDesc sqlDesc ) { } }
File sqlFile = FileUtil . createSqlDir ( sqlConfig . getDestDir ( ) , daoDesc . getQualifiedName ( ) , sqlDesc . getFileName ( ) ) ; GenerationContext context = new GenerationContext ( sqlDesc , sqlFile , sqlDesc . getTemplateName ( ) , "UTF-8" , sqlConfig . isOverwrite ( ) ) ; generator . generate ( context ) ;
public class TcpConnectionManager { /** * Writes the data passed in the event . * The end of record flag is used to determine if a channel is * eligible for purging . If the flag is set and all output has * been processed , the channel is purgeable until input is * received or another output event causes the st...
if ( channels . contains ( channel ) ) { channel . write ( event ) ; }
public class ZoneOffsetTransitionRule { /** * Obtains an instance defining the yearly rule to create transitions between two offsets . * Applications should normally obtain an instance from { @ link ZoneRules } . * This factory is only intended for use when creating { @ link ZoneRules } . * @ param month the mont...
Objects . requireNonNull ( month , "month" ) ; Objects . requireNonNull ( time , "time" ) ; Objects . requireNonNull ( timeDefnition , "timeDefnition" ) ; Objects . requireNonNull ( standardOffset , "standardOffset" ) ; Objects . requireNonNull ( offsetBefore , "offsetBefore" ) ; Objects . requireNonNull ( offsetAfter ...
public class JSEventMap { /** * Set a handler for the given JS event . If an existing handler is present , it * is automatically overridden . * @ param eJSEvent * The JS event . May not be < code > null < / code > . * @ param aNewHandler * The new handler to be added . May not be < code > null < / code > . */...
ValueEnforcer . notNull ( eJSEvent , "JSEvent" ) ; ValueEnforcer . notNull ( aNewHandler , "NewHandler" ) ; // Set only the new handler and remove any existing handler m_aEvents . put ( eJSEvent , new CollectingJSCodeProvider ( ) . appendFlattened ( aNewHandler ) ) ;
public class SQLExpressions { /** * Create a dateadd ( unit , date , amount ) expression * @ param unit date part * @ param date date * @ param amount amount * @ return converted date */ public static < D extends Comparable > DateTimeExpression < D > dateadd ( DatePart unit , DateTimeExpression < D > date , int...
return Expressions . dateTimeOperation ( date . getType ( ) , DATE_ADD_OPS . get ( unit ) , date , ConstantImpl . create ( amount ) ) ;
public class CmsListMetadata { /** * / * package */ void checkIds ( ) { } }
Set < String > ids = new TreeSet < String > ( ) ; // indep actions Iterator < I_CmsListAction > itIndepActions = getIndependentActions ( ) . iterator ( ) ; while ( itIndepActions . hasNext ( ) ) { String id = itIndepActions . next ( ) . getId ( ) ; if ( ids . contains ( id ) ) { throw new CmsIllegalStateException ( Mes...
public class SqlHelper { /** * Returns the name of the class to be instantiated . * @ param rs the Resultset * @ return null if the column is not available */ public static String getOjbClassName ( ResultSet rs ) { } }
try { return rs . getString ( OJB_CLASS_COLUMN ) ; } catch ( SQLException e ) { return null ; }
public class HttpSessionsParam { /** * Adds the default session token with the given name and enabled state . * @ param name the name of the session token . * @ param enabled { @ code true } if should be enabled , { @ code false } otherwise . * @ return { @ code true } if the token did not exist , { @ code false ...
String normalisedName = getNormalisedSessionTokenName ( name ) ; if ( ! getDefaultToken ( normalisedName ) . isPresent ( ) ) { defaultTokens . add ( new HttpSessionToken ( normalisedName , enabled ) ) ; if ( enabled ) { defaultTokensEnabled . add ( normalisedName ) ; } saveDefaultTokens ( ) ; return true ; } return fal...
public class QueryToolChest { /** * Generally speaking this is the exact same thing as makePreComputeManipulatorFn . It is leveraged in * order to compute PostAggregators on results after they have been completely merged together , which * should actually be done in the mergeResults ( ) call instead of here . * T...
return makePreComputeManipulatorFn ( query , fn ) ;
public class CmsEntity { /** * Removes a specific attribute value . < p > * @ param attributeName the attribute name * @ param index the value index */ public void removeAttributeValue ( String attributeName , int index ) { } }
if ( m_simpleAttributes . containsKey ( attributeName ) ) { List < String > values = m_simpleAttributes . get ( attributeName ) ; if ( ( values . size ( ) == 1 ) && ( index == 0 ) ) { removeAttributeSilent ( attributeName ) ; } else { values . remove ( index ) ; } } else if ( m_entityAttributes . containsKey ( attribut...
public class CommandLine { /** * Add a command line switch . This method is for adding options that do not * require an argument . * @ param option * the option , must start with " - " * @ param description * single line description of the option */ public void addSwitch ( String option , String description )...
optionList . add ( option ) ; optionDescriptionMap . put ( option , description ) ; if ( option . length ( ) > maxWidth ) { maxWidth = option . length ( ) ; }
public class Functions { /** * Runs decode base 64 function with arguments . * @ return */ public static String decodeBase64 ( String content , TestContext context ) { } }
return new DecodeBase64Function ( ) . execute ( Collections . singletonList ( content ) , context ) ;
public class DenyAssignmentsInner { /** * Gets deny assignments for a resource . * @ param resourceGroupName The name of the resource group . * @ param resourceProviderNamespace The namespace of the resource provider . * @ param parentResourcePath The parent resource identity . * @ param resourceType The resour...
return AzureServiceFuture . fromPageResponse ( listForResourceSinglePageAsync ( resourceGroupName , resourceProviderNamespace , parentResourcePath , resourceType , resourceName ) , new Func1 < String , Observable < ServiceResponse < Page < DenyAssignmentInner > > > > ( ) { @ Override public Observable < ServiceResponse...
public class BoxApiFolder { /** * Gets a request that renames a folder * @ param id id of folder to rename * @ param newName id of folder to retrieve info on * @ return request to rename a folder */ public BoxRequestsFolder . UpdateFolder getRenameRequest ( String id , String newName ) { } }
BoxRequestsFolder . UpdateFolder request = new BoxRequestsFolder . UpdateFolder ( id , getFolderInfoUrl ( id ) , mSession ) . setName ( newName ) ; return request ;
public class FileDescriptorLimit { /** * * Using OperatingSystemMXBean , we can obtain the total number of open file descriptors . */ @ IgnoreJRERequirement // UnixOperatingSystemMXBean private static void getOpenFileDescriptorCount ( PrintWriter writer ) throws UnsupportedEncodingException { } }
try { OperatingSystemMXBean operatingSystemMXBean = ManagementFactory . getOperatingSystemMXBean ( ) ; if ( operatingSystemMXBean instanceof UnixOperatingSystemMXBean ) { UnixOperatingSystemMXBean unixOperatingSystemMXBean = ( UnixOperatingSystemMXBean ) operatingSystemMXBean ; writer . println ( "Open File Descriptor ...
public class DailyTimeIntervalTrigger { /** * Called by the scheduler at the time a < code > Trigger < / code > is first added * to the scheduler , in order to have the < code > Trigger < / code > compute its * first fire time , based on any associated calendar . * After this method has been called , < code > get...
m_aNextFireTime = getFireTimeAfter ( new Date ( getStartTime ( ) . getTime ( ) - 1000L ) ) ; // Check calendar for date - time exclusion while ( m_aNextFireTime != null && calendar != null && ! calendar . isTimeIncluded ( m_aNextFireTime . getTime ( ) ) ) { m_aNextFireTime = getFireTimeAfter ( m_aNextFireTime ) ; if ( ...
public class SrvOrmAndroid { /** * < p > Insert entity into DB . * For autogenerated ID fill it in the entity < / p > * @ param < T > entity type * @ param pAddParam additional param * @ param pEntity entity * @ throws Exception - an exception */ @ Override public final < T > void insertEntity ( final Map < S...
ColumnsValues columnsValues = evalColumnsValues ( pAddParam , pEntity ) ; columnsValues . getLongsMap ( ) . remove ( ISrvOrm . VERSIONOLD_NAME ) ; Long result = getSrvDatabase ( ) . executeInsert ( pEntity . getClass ( ) . getSimpleName ( ) . toUpperCase ( ) , columnsValues ) ; String [ ] idName = columnsValues . getId...
public class XPathParser { /** * Parses the the rule TreatExpr according to the following production rule : * [ 17 ] TreatExpr : : = CastableExpr ( < " treat " " as " > SequenceType ) ? . * @ throws TTXPathException */ private void parseTreatExpr ( ) throws TTXPathException { } }
parseCastableExpr ( ) ; if ( is ( "treat" , true ) ) { consume ( "as" , true ) ; mPipeBuilder . addTreatExpr ( getTransaction ( ) , parseSequenceType ( ) ) ; }
public class Function { /** * Creates a node representing a binary expression tree from the given formula * @ param text is the right - hand side of a mathematical equation expressed in * infix notation * @ return a node representing a binary expression tree from the given formula * @ throws RuntimeException if...
if ( text . isEmpty ( ) ) { return null ; } String postfix = toPostfix ( text ) ; Deque < Node > stack = new ArrayDeque < Node > ( ) ; StringTokenizer tokenizer = new StringTokenizer ( postfix ) ; String token ; FunctionFactory factory = FactoryManager . instance ( ) . function ( ) ; while ( tokenizer . hasMoreTokens (...
public class InternalXbaseParser { /** * InternalXbase . g : 1017:1 : ruleXWhileExpression : ( ( rule _ _ XWhileExpression _ _ Group _ _ 0 ) ) ; */ public final void ruleXWhileExpression ( ) throws RecognitionException { } }
int stackSize = keepStackSize ( ) ; try { // InternalXbase . g : 1021:2 : ( ( ( rule _ _ XWhileExpression _ _ Group _ _ 0 ) ) ) // InternalXbase . g : 1022:2 : ( ( rule _ _ XWhileExpression _ _ Group _ _ 0 ) ) { // InternalXbase . g : 1022:2 : ( ( rule _ _ XWhileExpression _ _ Group _ _ 0 ) ) // InternalXbase . g : 102...
public class Quantile { /** * Compute the correct final quantile from these 4 values . If the lo and hi * elements are equal , use them . However if they differ , then there is no * single value which exactly matches the desired quantile . There are * several well - accepted definitions in this case - including p...
if ( lo == hi ) return lo ; // Equal ; pick either if ( method == null ) method = QuantileModel . CombineMethod . INTERPOLATE ; switch ( method ) { case INTERPOLATE : return linearInterpolate ( lo , hi , row , nrows , prob ) ; case AVERAGE : return 0.5 * ( hi + lo ) ; case LOW : return lo ; case HIGH : return hi ; defa...
public class ReserveListenerPortMojo { /** * Returns the first number available , starting at portNumberStartingPoint that ' s not already in the reservedPorts * list . * @ param portNumberStartingPoint first port number to start from . * @ param reservedPorts the ports already reserved . * @ return first numbe...
assert portNumberStartingPoint != null ; int candidate = portNumberStartingPoint ; while ( reservedPorts . contains ( candidate ) ) { candidate ++ ; } return candidate ;
public class DOInfoReader { /** * 获得注解了 @ JoinRightTable的字段 , 如果没有注解 , 抛出NoJoinTableMemberException * @ param clazz * @ return */ public static Field getJoinRightTable ( Class < ? > clazz ) { } }
if ( clazz == null ) { throw new NoJoinTableMemberException ( "clazz is null" ) ; } List < Field > result = _getAnnotationColumns ( clazz , JoinRightTable . class ) ; if ( result == null || result . isEmpty ( ) ) { throw new NoJoinTableMemberException ( "class " + clazz . getName ( ) + " does not have @JoinRightTable f...
public class RottenTomatoesApi { /** * Retrieves the reviews for a movie * @ param movieId * @ param reviewType * @ param country * @ return * @ throws RottenTomatoesException */ public List < Review > getMoviesReviews ( int movieId , String reviewType , String country ) throws RottenTomatoesException { } }
return getMoviesReviews ( movieId , reviewType , DEFAULT_PAGE_LIMIT , DEFAULT_PAGE , country ) ;
public class DecodeHandler { /** * Decode the data within the viewfinder rectangle , and time how long it took . For efficiency , * reuse the same reader objects from one decode to the next . * @ param data The YUV preview frame . * @ param width The width of the preview frame . * @ param height The height of t...
long start = System . nanoTime ( ) ; Result rawResult = null ; PlanarYUVLuminanceSource source = activity . getCameraManager ( ) . buildLuminanceSource ( data , width , height ) ; if ( source != null ) { BinaryBitmap bitmap = new BinaryBitmap ( new HybridBinarizer ( source ) ) ; try { rawResult = multiFormatReader . de...
public class RelationalOperations { /** * Returns true if the relation holds . */ private static boolean polygonRelatePolygon_ ( Polygon polygon_a , Polygon polygon_b , double tolerance , int relation , ProgressTracker progress_tracker ) { } }
switch ( relation ) { case Relation . disjoint : return polygonDisjointPolygon_ ( polygon_a , polygon_b , tolerance , progress_tracker ) ; case Relation . within : return polygonContainsPolygon_ ( polygon_b , polygon_a , tolerance , progress_tracker ) ; case Relation . contains : return polygonContainsPolygon_ ( polygo...
public class PropertyAnnotation { /** * Return a sorted comma - separated list of the property attributes for this annotation . */ public static String toAttributeString ( Set < String > attributes ) { } }
List < String > list = new ArrayList < String > ( attributes ) ; Collections . sort ( list , ATTRIBUTES_COMPARATOR ) ; return Joiner . on ( ", " ) . join ( list ) ;
public class Meta { /** * Convenience method which adds a tag * @ param theSystem The code system * @ param theCode The code * @ param theDisplay The display name * @ return Returns a reference to < code > this < / code > for easy chaining */ public Meta addTag ( String theSystem , String theCode , String theDi...
addTag ( ) . setSystem ( theSystem ) . setCode ( theCode ) . setDisplay ( theDisplay ) ; return this ;
public class HttpOutputStream { public void write ( byte b [ ] , int off , int len ) throws IOException { } }
len = prepareOutput ( len ) ; if ( ! _nulled ) _out . write ( b , off , len ) ; if ( _bytes == _contentLength ) flush ( ) ;
public class ModelsImpl { /** * Updates the name of an entity extractor . * @ param appId The application ID . * @ param versionId The version ID . * @ param entityId The entity extractor ID . * @ param name The entity ' s new name . * @ throws IllegalArgumentException thrown if parameters fail the validation...
if ( this . client . endpoint ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.endpoint() is required and cannot be null." ) ; } if ( appId == null ) { throw new IllegalArgumentException ( "Parameter appId is required and cannot be null." ) ; } if ( versionId == null ) { throw new IllegalArgu...
public class SrvBalanceStd { /** * < p > Retrieve Trial Balance . < / p > * @ param pAddParam additional param * @ param pDate date * @ return balance lines * @ throws Exception - an exception */ @ Override public final synchronized List < TrialBalanceLine > retrieveTrialBalance ( final Map < String , Object > ...
recalculateAllIfNeed ( pAddParam , pDate ) ; List < TrialBalanceLine > result = new ArrayList < TrialBalanceLine > ( ) ; String query = evalQueryBalance ( pAddParam , pDate ) ; IRecordSet < RS > recordSet = null ; try { recordSet = getSrvDatabase ( ) . retrieveRecords ( query ) ; if ( recordSet . moveToFirst ( ) ) { do...
public class AbstractChainableEvent { /** * { @ inheritDoc } * @ since 1.2.0 */ @ Override public ChainableEvent onSuccess ( Event onSuccessEvent , Class < ? extends IEventService > onSuccessEventService ) { } }
this . onSuccessChains . add ( new ChainLink ( ) . onSuccess ( linkChainIdentifier ( onSuccessEvent ) , onSuccessEventService ) ) ; return this ;
public class AbstractJnlpMojo { /** * Iterate through all the top level and transitive dependencies declared in the project and * collect all the runtime scope dependencies for inclusion in the . zip and signing . * @ throws MojoExecutionException if could not process dependencies */ private void processDependencie...
processDependency ( getProject ( ) . getArtifact ( ) ) ; AndArtifactFilter filter = new AndArtifactFilter ( ) ; // filter . add ( new ScopeArtifactFilter ( dependencySet . getScope ( ) ) ) ; if ( dependencies != null && dependencies . getIncludes ( ) != null && ! dependencies . getIncludes ( ) . isEmpty ( ) ) { filter ...
public class EbeanFinder { /** * { @ inheritDoc } * Specifies a path to fetch with a specific list properties to include , to load a partial object . */ public Query < T > fetch ( String path , String fetchProperties ) { } }
return query ( ) . fetch ( path , fetchProperties ) ;
public class ListCriteria { /** * { @ inheritDoc } */ @ Override public void asSetter ( final StringBuilder sb ) { } }
sb . append ( ".setListCriteria(new String[] {" ) ; boolean firstTime = true ; for ( final E item : list ) { if ( ! firstTime ) sb . append ( "," ) ; sb . append ( "\"" ) ; sb . append ( item . toString ( ) ) ; sb . append ( "\"" ) ; firstTime = false ; } sb . append ( "})" ) ;
public class Lexer { /** * tests only */ List < Token > tokenize ( String input ) { } }
StringBuilder accumulator = new StringBuilder ( ) ; List < Token > tokens = new ArrayList < > ( ) ; input += '\0' ; for ( int i = 0 ; i < input . length ( ) ; i ++ ) { i = process ( accumulator , tokens , i , input . charAt ( i ) ) ; } return tokens ;
public class ScriptRunner { /** * Runs an SQL script ( read in using the Reader parameter ) using the * connection passed in * @ param conn - the connection to use for the script * @ param reader - the source of the script * @ throws SQLException if any SQL errors occur * @ throws IOException if there is an e...
StringBuffer command = null ; try { LineNumberReader lineReader = new LineNumberReader ( reader ) ; String line ; while ( ( line = lineReader . readLine ( ) ) != null ) { if ( command == null ) { command = new StringBuffer ( ) ; } String trimmedLine = line . trim ( ) ; final Matcher delimMatch = delimP . matcher ( trim...
public class GeoPackageCache { /** * Get the cached GeoPackage or open the GeoPackage file without caching it * @ param name * GeoPackage name * @ param file * GeoPackage file * @ return GeoPackage * @ since 3.1.0 */ public GeoPackage getOrNoCacheOpen ( String name , File file ) { } }
return getOrOpen ( name , file , false ) ;
public class Unpooled { /** * Creates a new 3 - byte big - endian buffer that holds the specified 24 - bit integer . */ public static ByteBuf copyMedium ( int value ) { } }
ByteBuf buf = buffer ( 3 ) ; buf . writeMedium ( value ) ; return buf ;
public class UpgradeOutputByteBufferUtil { /** * Set the amount of data to buffer internally before the stream itself * initiates a flush . A zero size means no buffer is done , each write * call will flush data . * @ param size * @ throws IllegalStateException if already writing data or closed */ private void ...
this . amountToBuffer = size ; this . bbSize = ( 49152 < size ) ? 32768 : 8192 ; int numBuffers = ( size / this . bbSize ) ; if ( 0 == size || 0 != ( size % this . bbSize ) ) { numBuffers ++ ; } this . _output = new WsByteBuffer [ numBuffers ] ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) )...
public class CPDefinitionOptionValueRelPersistenceImpl { /** * Returns the first cp definition option value rel in the ordered set where key = & # 63 ; . * @ param key the key * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the first matching cp de...
List < CPDefinitionOptionValueRel > list = findByKey ( key , 0 , 1 , orderByComparator ) ; if ( ! list . isEmpty ( ) ) { return list . get ( 0 ) ; } return null ;
public class VBSFaxClientSpi { /** * This function will submit a new fax job . < br > * The fax job ID may be populated by this method in the provided * fax job object . * @ param faxJob * The fax job object containing the needed information */ @ Override protected void submitFaxJobImpl ( FaxJob faxJob ) { } }
String name = VBSFaxClientSpi . VBS_WIN_XP_SUBMIT_SCRIPT ; if ( this . useWin2kAPI ) { name = VBSFaxClientSpi . VBS_WIN_2K_SUBMIT_SCRIPT ; } // setup input data Object [ ] input = setupSubmitFaxJobInput ( faxJob ) ; // invoke script this . invokeScript ( faxJob , name , input , FaxActionType . SUBMIT_FAX_JOB ) ;
public class NioGroovyMethods { /** * Invokes the closure for each file whose name ( file . name ) matches the given nameFilter in the given directory * - calling the { @ link org . codehaus . groovy . runtime . DefaultGroovyMethods # isCase ( Object , Object ) } method to determine if a match occurs . This method ca...
// throws FileNotFoundException , IllegalArgumentException { eachFileMatch ( self , FileType . ANY , nameFilter , closure ) ;
public class CommonsAssert { /** * Like JUnit assertEquals but using { @ link EqualsHelper } . * @ param x * Fist object . May be < code > null < / code > * @ param y * Second object . May be < code > null < / code > . */ public static < T > void assertEquals ( @ Nullable final T x , @ Nullable final T y ) { } ...
assertEquals ( ( String ) null , x , y ) ;
public class SubPlanAssembler { /** * Partial index optimization : Remove query expressions that exactly match the index WHERE expression ( s ) * from the access path . * @ param path - Partial Index access path * @ param exprToRemove - expressions to remove */ private void filterPostPredicateForPartialIndex ( Ac...
path . otherExprs . removeAll ( exprToRemove ) ; // Keep the eliminated expressions for cost estimating purpose path . eliminatedPostExprs . addAll ( exprToRemove ) ;
public class DirPluginScanner { /** * Return a single file that should be used among all te files matching a single provider identity , or null if * the conflict cannot be resolved . */ File resolveProviderConflict ( final Collection < FileCache . MemoFile > matched ) { } }
final HashMap < File , VersionCompare > versions = new HashMap < File , VersionCompare > ( ) ; final ArrayList < File > toCompare = new ArrayList < File > ( ) ; for ( final FileCache . MemoFile file : matched ) { final String vers = getVersionForFile ( file . getFile ( ) ) ; if ( null != vers ) { versions . put ( file ...
public class ChromosomeMappingTools { /** * Get the CDS position mapped on the chromosome position * @ param exonStarts * @ param exonEnds * @ param cdsStart * @ param cdsEnd * @ return */ public static ChromPos getChromPosReverse ( int cdsPos , List < Integer > exonStarts , List < Integer > exonEnds , int cd...
boolean inCoding = false ; int codingLength = 0 ; if ( cdsEnd < cdsStart ) { int tmp = cdsEnd ; cdsEnd = cdsStart ; cdsStart = tmp ; } int lengthExons = 0 ; // map reverse for ( int i = exonStarts . size ( ) - 1 ; i >= 0 ; i -- ) { logger . debug ( "Exon #" + ( i + 1 ) + "/" + exonStarts . size ( ) ) ; int end = exonSt...
public class PolymerClassRewriter { /** * Create exports and externs to protect element properties and methods from renaming and dead * code removal . * < p > Since Polymer templates , observers , and computed properties rely on string references to * element properties and methods , and because we don ' t yet ha...
Node block = IR . block ( ) ; String interfaceName = getInterfaceName ( cls ) ; Node fnNode = NodeUtil . emptyFunction ( ) ; compiler . reportChangeToChangeScope ( fnNode ) ; Node varNode = IR . var ( NodeUtil . newQName ( compiler , interfaceName ) , fnNode ) ; JSDocInfoBuilder info = new JSDocInfoBuilder ( true ) ; i...
public class CacheManager { /** * cancels all tasks * @ since 5.6.3 */ public void cancelAllJobs ( ) { } }
Iterator < CacheManagerTask > iterator = mPendingTasks . iterator ( ) ; while ( iterator . hasNext ( ) ) { CacheManagerTask next = iterator . next ( ) ; next . cancel ( true ) ; } mPendingTasks . clear ( ) ;
public class druidGLexer { /** * $ ANTLR start " RCURLY " */ public final void mRCURLY ( ) throws RecognitionException { } }
try { int _type = RCURLY ; int _channel = DEFAULT_TOKEN_CHANNEL ; // druidG . g : 576:8 : ( ' } ' ) // druidG . g : 576:11 : ' } ' { match ( '}' ) ; } state . type = _type ; state . channel = _channel ; } finally { // do for sure before leaving }
public class RecurlyClient { /** * Update an account ' s billing info * When new or updated credit card information is updated , the billing information is only saved if the credit card * is valid . If the account has a past due invoice , the outstanding balance will be collected to validate the * billing informa...
return doPUT ( Account . ACCOUNT_RESOURCE + "/" + accountCode + BillingInfo . BILLING_INFO_RESOURCE , billingInfo , BillingInfo . class ) ;
public class WebshimResources { /** * check if script is available and initialized . * @ return true if it exists */ public static boolean isInitialized ( ) { } }
final boolean loaded = WebshimResources . rememberEvent != null || StringUtils . isEmpty ( WebshimResources . POLIFILLER_URL ) ; return loaded || WebshimResources . isInHeader ( ) ;
public class HttpSender { /** * private void send ( HttpMessage msg , boolean isFollowRedirect , HttpOutputStream pipe , byte [ ] * buf ) throws HttpException , IOException { HttpMethod method = null ; HttpResponseHeader * resHeader = null ; * try { method = runMethod ( msg , isFollowRedirect ) ; / / successfully...
listeners . add ( listener ) ; Collections . sort ( listeners , getListenersComparator ( ) ) ;
public class ComputeNodesImpl { /** * Reinstalls the operating system on the specified compute node . * You can reinstall the operating system on a node only if it is in an idle or running state . This API can be invoked only on pools created with the cloud service configuration property . * @ param poolId The ID o...
reimageWithServiceResponseAsync ( poolId , nodeId ) . toBlocking ( ) . single ( ) . body ( ) ;
public class DisasterRecoveryConfigurationsInner { /** * Gets a disaster recovery configuration . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param serverName The name of the server . * @ ...
return getWithServiceResponseAsync ( resourceGroupName , serverName , disasterRecoveryConfigurationName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class NotifdEventConsumer { protected void setAdditionalInfoToEventCallBackStruct ( EventCallBackStruct callback_struct , String device_name , String attribute , String event_name , String [ ] filters , EventChannelStruct channel_struct ) throws DevFailed { } }
String constraint_expr = buildConstraintExpr ( device_name , attribute , event_name , filters ) ; int filter_id = add_filter_for_channel ( channel_struct , constraint_expr ) ; callback_struct . filter_constraint = constraint_expr ; callback_struct . filter_id = filter_id ; callback_struct . consumer = this ;
public class CatchyCallable { /** * { @ inheritDoc } */ @ Override public V call ( ) throws Exception { } }
try { return callable . call ( ) ; } catch ( Exception e ) { if ( log ) { logger . warn ( "exception during run" , e ) ; } throw e ; }
public class CanonicalPlanner { /** * Walk the supplied constraint to extract a list of the constraints that can be AND - ed together . For example , given the * constraint tree ( ( C1 AND C2 ) AND ( C3 OR C4 ) ) , this method would result in a list of three separate criteria : [ C1 , C2 , ( C3 OR * C4 ) ] . The re...
if ( constraint == null ) return ; assert andableConstraints != null ; if ( constraint instanceof And ) { And and = ( And ) constraint ; separateAndConstraints ( and . left ( ) , andableConstraints ) ; separateAndConstraints ( and . right ( ) , andableConstraints ) ; } else { andableConstraints . add ( constraint ) ; }
public class LeaderAppender { /** * Records a completed heartbeat to the given member . */ private void recordHeartbeat ( RaftMemberContext member , long timestamp ) { } }
raft . checkThread ( ) ; // Update the member ' s heartbeat time . This will be used when calculating the quorum heartbeat time . member . setHeartbeatTime ( timestamp ) ; member . setResponseTime ( System . currentTimeMillis ( ) ) ; // Compute the quorum heartbeat time . long heartbeatTime = computeHeartbeatTime ( ) ;...
public class CmsEditSiteForm { /** * Get ou name for current site . < p > * @ return Full ou name */ private String getSiteOU ( ) { } }
try { m_clonedCms . getRequestContext ( ) . setSiteRoot ( "" ) ; CmsResource resource = m_clonedCms . readResource ( m_site . getSiteRoot ( ) ) ; List < CmsRelation > relations = m_clonedCms . getRelationsForResource ( resource , CmsRelationFilter . SOURCES ) ; for ( CmsRelation relation : relations ) { if ( relation ....
public class ManagedClustersInner { /** * Gets access profile of a managed cluster . * Gets the accessProfile for the specified role name of the managed cluster with a specified resource group and name . * @ param resourceGroupName The name of the resource group . * @ param resourceName The name of the managed cl...
return getAccessProfilesWithServiceResponseAsync ( resourceGroupName , resourceName , roleName ) . toBlocking ( ) . single ( ) . body ( ) ;