signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class MethodCallImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case SimpleExpressionsPackage . METHOD_CALL__VALUE : setValue ( VALUE_EDEFAULT ) ; return ; } super . eUnset ( featureID ) ;
public class cacheglobal_cachepolicy_binding { /** * Use this API to fetch filtered set of cacheglobal _ cachepolicy _ binding resources . * filter string should be in JSON format . eg : " port : 80 , servicetype : HTTP " . */ public static cacheglobal_cachepolicy_binding [ ] get_filtered ( nitro_service service , St...
cacheglobal_cachepolicy_binding obj = new cacheglobal_cachepolicy_binding ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; cacheglobal_cachepolicy_binding [ ] response = ( cacheglobal_cachepolicy_binding [ ] ) obj . getfiltered ( service , option ) ; return response ;
public class MLEDependencyGrammar { /** * Return the probability ( as a real number between 0 and 1 ) of stopping * rather than generating another argument at this position . * @ param dependency The dependency used as the basis for stopping on . * Tags are assumed to be in the TagProjection space . * @ return ...
short binDistance = distanceBin ( dependency . distance ) ; IntTaggedWord unknownHead = new IntTaggedWord ( - 1 , dependency . head . tag ) ; IntTaggedWord anyHead = new IntTaggedWord ( ANY_WORD_INT , dependency . head . tag ) ; IntDependency temp = new IntDependency ( dependency . head , stopTW , dependency . leftHead...
public class UriEscape { /** * Perform am URI path segment < strong > unescape < / strong > operation * on a < tt > String < / tt > input . * This method will unescape every percent - encoded ( < tt > % HH < / tt > ) sequences present in input , * even for those characters that do not need to be percent - encoded...
if ( encoding == null ) { throw new IllegalArgumentException ( "Argument 'encoding' cannot be null" ) ; } return UriEscapeUtil . unescape ( text , UriEscapeUtil . UriEscapeType . PATH_SEGMENT , encoding ) ;
public class KTypeHashSet { /** * @ see # indexOf * @ param index The index of a given key , as returned from { @ link # indexOf } . * @ return Returns < code > true < / code > if the index corresponds to an existing key * or false otherwise . This is equivalent to checking whether the index is * a positive val...
assert index < 0 || ( index >= 0 && index <= mask ) || ( index == mask + 1 && hasEmptyKey ) ; return index >= 0 ;
public class HBaseSchemaManager { /** * ( non - Javadoc ) * @ see * com . impetus . kundera . configure . schema . api . AbstractSchemaManager # validate * ( java . util . List ) */ @ Override protected void validate ( List < TableInfo > tableInfos ) { } }
try { if ( isNamespaceAvailable ( databaseName ) ) { for ( TableInfo tableInfo : tableInfos ) { if ( tableInfo != null ) { HTableDescriptor hTableDescriptor = admin . getTableDescriptor ( ( databaseName + ":" + tableInfo . getTableName ( ) ) . getBytes ( ) ) ; boolean columnFamilyFound = false ; Boolean f = false ; for...
public class PrcRefreshItemsInList { /** * < p > Retrieve Item Places ( outdated or all ) . < / p > * @ param < T > item place type * @ param pReqVars additional param * @ param pLuv last updated version or null for all * @ param pItemPlaceCl Item Place Class * @ return Outdated Item Place list * @ throws E...
List < T > result = null ; try { this . srvDatabase . setIsAutocommit ( false ) ; this . srvDatabase . setTransactionIsolation ( ISrvDatabase . TRANSACTION_READ_UNCOMMITTED ) ; this . srvDatabase . beginTransaction ( ) ; String tblNm = pItemPlaceCl . getSimpleName ( ) . toUpperCase ( ) ; String verCond ; if ( pLuv != n...
public class WebDavServletController { /** * Convenience function to stop this servlet . * @ throws ServerLifecycleException If the servlet could not be stopped for any unexpected reason . */ public void stop ( ) throws ServerLifecycleException { } }
try { contextHandler . stop ( ) ; contextHandlerCollection . removeHandler ( contextHandler ) ; contextHandlerCollection . mapContexts ( ) ; LOG . info ( "WebDavServlet stopped: " + contextPath ) ; } catch ( Exception e ) { throw new ServerLifecycleException ( "Servlet couldn't be stopped" , e ) ; }
public class BSHPrimarySuffix { /** * Perform a suffix operation on the given object and return the * new value . * obj will be a Node when suffix evaluation begins , allowing us to * interpret it contextually . ( e . g . for . class ) Thereafter it will be * an value object or LHS ( as determined by toLHS ) . ...
// Handle " . class " suffix operation // Prefix must be a BSHType if ( operation == CLASS ) if ( obj instanceof BSHType ) { if ( toLHS ) throw new EvalError ( "Can't assign .class" , this , callstack ) ; return ( ( BSHType ) obj ) . getType ( callstack , interpreter ) ; } else throw new EvalError ( "Attempt to use .cl...
public class Environment { /** * Gets the default login shell used by a unix user . * @ return the Mac user ' s default shell as referenced by cmd : * ' nidump passwd / ' * @ throws EnvironmentException if os information is not resolvable */ private static String getUnixUserShell ( ) throws EnvironmentException {...
if ( null != m_SHELL ) { return m_SHELL ; } String [ ] args = { "cat" , "/etc/passwd" } ; return readShellFromPasswdFile ( args ) ;
public class FacebookAlbumListFragment { /** * Asynchronously and recursively requests the albums associated with each { @ link PageAccount } . * Calls { @ link # requestProfileAlbums ( java . util . List ) } when all Page album listings are completed . * @ param pageAccounts a list of Page accounts to recursively ...
final PageAccount account = pageAccounts . poll ( ) ; if ( account != null ) { Callback callback = new Callback ( ) { @ Override public void onCompleted ( Response response ) { FacebookSettingsActivity activity = ( FacebookSettingsActivity ) getActivity ( ) ; if ( activity == null || activity . isFinishing ( ) ) { retu...
public class AbstractProjectWriter { /** * { @ inheritDoc } */ @ Override public void write ( ProjectFile projectFile , File file ) throws IOException { } }
FileOutputStream fos = new FileOutputStream ( file ) ; write ( projectFile , fos ) ; fos . flush ( ) ; fos . close ( ) ;
public class BundleScannerProvisionOption { /** * { @ inheritDoc } */ public String getURL ( ) { } }
return new StringBuilder ( ) . append ( SCHEMA ) . append ( SEPARATOR_SCHEME ) . append ( super . getURL ( ) ) . append ( getOptions ( this ) ) . toString ( ) ;
public class JcNumber { /** * < div color = ' red ' style = " font - size : 24px ; color : red " > < b > < i > < u > JCYPHER < / u > < / i > < / b > < / div > * < div color = ' red ' style = " font - size : 18px ; color : red " > < i > enclose an expression with brackets < / i > < / div > * < div color = ' red ' st...
JcNumber ret = new JcNumber ( null , this , new FunctionInstance ( FUNCTION . Common . ENCLOSE , 1 ) ) ; QueryRecorder . recordInvocationConditional ( this , "enclose" , ret ) ; return ret ;
public class HttpConnectionHelper { /** * 从回复中获取Object * @ param httpURLConnection * @ return * @ throws java . lang . Exception */ public Object getObjectResponse ( HttpURLConnection httpURLConnection ) throws Exception { } }
Object object = null ; try { ObjectInputStream ois = new ObjectInputStream ( httpURLConnection . getInputStream ( ) ) ; object = ois . readObject ( ) ; ois . close ( ) ; } catch ( Exception ex ) { Debug . logError ( ex , module ) ; throw new Exception ( ex ) ; } return object ;
public class VertxConnectionImpl { /** * Get connection from factory * @ return VertxConnection instance * @ exception ResourceException * Thrown if a connection can ' t be obtained */ @ Override public VertxEventBus vertxEventBus ( ) throws ResourceException { } }
log . finest ( "getConnection()" ) ; if ( this . mc != null ) { return this . mc . getVertxEventBus ( ) ; } throw new ResourceException ( "Vertx Managed Connection has been closed." ) ;
public class HttpClient { /** * Setup a callback called after { @ link HttpClientResponse } headers have been * received * @ param doOnResponse a consumer observing connected events * @ return a new { @ link HttpClient } */ public final HttpClient doOnResponse ( BiConsumer < ? super HttpClientResponse , ? super C...
Objects . requireNonNull ( doOnResponse , "doOnResponse" ) ; return new HttpClientDoOn ( this , null , null , doOnResponse , null ) ;
public class UsersApi { /** * Get users . * Get [ CfgPerson ] ( https : / / docs . genesys . com / Documentation / PSDK / latest / ConfigLayerRef / CfgPerson ) objects based on the specified filters . * @ param limit Limit the number of users the Provisioning API should return . ( optional ) * @ param offset The ...
List < User > out = new ArrayList ( ) ; try { GetUsersSuccessResponse resp = usersApi . getUsers ( limit , offset , order , sortBy , filterName , filterParameters , roles , skills , userEnabled , userValid ) ; if ( ! resp . getStatus ( ) . getCode ( ) . equals ( 0 ) ) { throw new ProvisioningApiException ( "Error getti...
public class DRL5Parser { /** * Matches a type name * type : = ID typeArguments ? ( DOT ID typeArguments ? ) * ( LEFT _ SQUARE RIGHT _ SQUARE ) * * @ return * @ throws RecognitionException */ public String type ( ) throws RecognitionException { } }
String type = "" ; try { int first = input . index ( ) , last = first ; match ( input , DRL5Lexer . ID , null , new int [ ] { DRL5Lexer . DOT , DRL5Lexer . LESS } , DroolsEditorType . IDENTIFIER ) ; if ( state . failed ) return type ; if ( input . LA ( 1 ) == DRL5Lexer . LESS ) { typeArguments ( ) ; if ( state . failed...
public class FlowLoaderUtils { /** * Helper method to recursively find props from node bean . * @ param nodeBean the node bean * @ param pathList the path list * @ param idx the idx * @ param propsList the props list * @ return the boolean */ private static boolean findPropsFromNodeBean ( final NodeBean nodeB...
if ( idx < pathList . length && nodeBean . getName ( ) . equals ( pathList [ idx ] ) ) { if ( idx == pathList . length - 1 ) { propsList . add ( nodeBean . getProps ( ) ) ; return true ; } for ( final NodeBean bean : nodeBean . getNodes ( ) ) { if ( findPropsFromNodeBean ( bean , pathList , idx + 1 , propsList ) ) { re...
public class ForwardingBigQueryFileOutputFormat { /** * Gets the cached OutputCommitter , creating a new one if it doesn ' t exist . */ @ Override public synchronized OutputCommitter getOutputCommitter ( TaskAttemptContext context ) throws IOException { } }
// Cache the committer . if ( committer == null ) { committer = createCommitter ( context ) ; } return committer ;
public class DAOManager { @ Override public < O extends TransientObject > Collection < O > get ( String objectType , String ... keys ) throws DAOException { } }
Collection < O > results = serverDao . get ( objectType , keys ) ; eventManager . fire ( new GET_EVENT < O > ( results ) ) ; return results ;
public class RecordingChanges { /** * Marks this change set as frozen ( aka . closed ) . This means it should not accept any more changes . * @ param userId the username from the session which originated the changes ; may not be null * @ param userData a Map which can contains arbitrary information ; may be null ...
this . userId = userId ; if ( userData != null ) { this . userData = Collections . unmodifiableMap ( userData ) ; } this . timestamp = timestamp ;
public class ValueNumberFrameModelingVisitor { /** * This is the default instruction modeling method . */ @ Override public void modelNormalInstruction ( Instruction ins , int numWordsConsumed , int numWordsProduced ) { } }
int flags = 0 ; if ( ins instanceof InvokeInstruction ) { flags = ValueNumber . RETURN_VALUE ; } else if ( ins instanceof ArrayInstruction ) { flags = ValueNumber . ARRAY_VALUE ; } else if ( ins instanceof ConstantPushInstruction ) { flags = ValueNumber . CONSTANT_VALUE ; } // Get the input operands to this instruction...
public class Collectors { /** * Returns a { @ code Collector } that produces the minimal element according * to a given { @ code Comparator } , described as an { @ code Optional < T > } . * @ implSpec * This produces a result equivalent to : * < pre > { @ code * reducing ( BinaryOperator . minBy ( comparator ...
return reducing ( BinaryOperator . minBy ( comparator ) ) ;
public class JavaInput { /** * Posts a key event received from elsewhere ( i . e . a native UI component ) . This is useful for * applications that are using GL in Canvas mode and sharing keyboard focus with other ( non - GL ) * components . The event will be queued and dispatched on the next frame , after GL keybo...
kevQueue . add ( key == null ? new Keyboard . TypedEvent ( modFlags , time , typedCh ) : new Keyboard . KeyEvent ( modFlags , time , key , pressed ) ) ;
public class MESubscription { /** * Returns the value of the topic space name . * @ return The topic space name */ final String getTopicSpaceName ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getTopicSpaceName" ) ; SibTr . exit ( tc , "getTopicSpaceName" , _topicSpaceName ) ; } return _topicSpaceName ;
public class YokeRequest { /** * Returns the ip address of the client , when trust - proxy is true ( default ) then first look into X - Forward - For * Header */ public String ip ( ) { } }
Boolean trustProxy = ( Boolean ) context . get ( "trust-proxy" ) ; if ( trustProxy != null && trustProxy ) { String xForwardFor = getHeader ( "x-forward-for" ) ; if ( xForwardFor != null ) { String [ ] ips = xForwardFor . split ( " *, *" ) ; if ( ips . length > 0 ) { return ips [ 0 ] ; } } } return request . remoteAddr...
public class Schema { /** * Validates the given value and returns a ValidationException if errors were * found . * @ param correlationId ( optional ) transaction id to trace execution through * call chain . * @ param value a value to be validated . * @ param strict true to treat warnings as errors . * @ thr...
List < ValidationResult > results = validate ( value ) ; ValidationException . throwExceptionIfNeeded ( correlationId , results , strict ) ;
public class PageIteratorSolver { /** * create a PageIterator instance * @ param queryParam * the value of sqlquery ' s " ? " * @ param sqlqueryAllCount * the sql for query all count that fit for condition * @ param sqlquery * the sql for query that fit for condtion , return id collection * @ param start ...
if ( UtilValidate . isEmpty ( sqlqueryAllCount ) ) { Debug . logError ( " the parameter sqlqueryAllCount is null" , module ) ; return new PageIterator ( ) ; } if ( UtilValidate . isEmpty ( sqlquery ) ) { Debug . logError ( " the parameter sqlquery is null" , module ) ; return new PageIterator ( ) ; } Collection queryPa...
public class TransitionManager { /** * Convenience method to animate to a new scene defined by all changes within * the given scene root between calling this method and the next rendering frame . * Calling this method causes TransitionManager to capture current values in the * scene root and then post a request t...
if ( ! sPendingTransitions . contains ( sceneRoot ) && ViewUtils . isLaidOut ( sceneRoot , true ) ) { if ( Transition . DBG ) { Log . d ( LOG_TAG , "beginDelayedTransition: root, transition = " + sceneRoot + ", " + transition ) ; } sPendingTransitions . add ( sceneRoot ) ; if ( transition == null ) { transition = sDefa...
public class Table { /** * Creates a global secondary index ( GSI ) with both a hash key and a range * key on this table . Involves network calls . This table must be in the * < code > ACTIVE < / code > state for this operation to succeed . Creating a * global secondary index is an asynchronous operation ; while ...
return doCreateGSI ( create , hashKeyDefinition , rangeKeyDefinition ) ;
public class CommerceOrderPersistenceImpl { /** * Returns an ordered range of all the commerce orders where billingAddressId = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , the...
return findByBillingAddressId ( billingAddressId , start , end , orderByComparator , true ) ;
public class ScriptExecutorActivity { /** * Execute scripts in supported languages . */ public void execute ( ) throws ActivityException { } }
try { String language = getLanguage ( ) ; String script = getScript ( ) ; Object retObj = executeScript ( script , language , null , null ) ; if ( retObj != null ) setReturnCode ( retObj . toString ( ) ) ; } catch ( ActivityException ex ) { throw ex ; } catch ( Exception ex ) { logger . severeException ( ex . getMessag...
public class Version { /** * < pre > * Desired runtime . Example : ` python27 ` . * < / pre > * < code > string runtime = 10 ; < / code > */ public com . google . protobuf . ByteString getRuntimeBytes ( ) { } }
java . lang . Object ref = runtime_ ; if ( ref instanceof java . lang . String ) { com . google . protobuf . ByteString b = com . google . protobuf . ByteString . copyFromUtf8 ( ( java . lang . String ) ref ) ; runtime_ = b ; return b ; } else { return ( com . google . protobuf . ByteString ) ref ; }
public class Bean { /** * Read Bean firmware version * @ param callback the callback for the version string */ public void readHardwareVersion ( final Callback < String > callback ) { } }
gattClient . getDeviceProfile ( ) . getHardwareVersion ( new DeviceProfile . VersionCallback ( ) { @ Override public void onComplete ( String version ) { callback . onResult ( version ) ; } } ) ;
public class AbstractIoBuffer { /** * { @ inheritDoc } */ @ Override public Object getObject ( final ClassLoader classLoader ) throws ClassNotFoundException { } }
if ( ! prefixedDataAvailable ( 4 ) ) { throw new BufferUnderflowException ( ) ; } int length = getInt ( ) ; if ( length <= 4 ) { throw new BufferDataException ( "Object length should be greater than 4: " + length ) ; } int oldLimit = limit ( ) ; limit ( position ( ) + length ) ; try { ObjectInputStream in = new ObjectI...
public class JsonSerializationProcessor { /** * Closes the output . Should be called after the JSON serialization was * finished . * @ throws IOException * if there was a problem closing the output */ public void close ( ) throws IOException { } }
System . out . println ( "Serialized " + this . jsonSerializer . getEntityDocumentCount ( ) + " item documents to JSON file " + OUTPUT_FILE_NAME + "." ) ; this . jsonSerializer . close ( ) ;
public class StringMessage { /** * UTF - 8 encodes the message . */ @ Override public ByteArray encodeAsByteArray ( ) { } }
if ( message . isEmpty ( ) ) return ByteArray . EMPTY_BYTE_ARRAY ; return new ByteArray ( message . getBytes ( CHARSET ) ) ;
public class TextRankSentence { /** * 一句话调用接口 * @ param document 目标文档 * @ param size 需要的关键句的个数 * @ param sentence _ separator 句子分隔符 , 正则格式 , 如 : [ 。 ? ? ! ! ; ; ] * @ return 关键句列表 */ public static List < String > getTopSentenceList ( String document , int size , String sentence_separator ) { } }
List < String > sentenceList = splitSentence ( document , sentence_separator ) ; List < List < String > > docs = convertSentenceListToDocument ( sentenceList ) ; TextRankSentence textRank = new TextRankSentence ( docs ) ; int [ ] topSentence = textRank . getTopSentence ( size ) ; List < String > resultList = new Linked...
public class FileUtils { /** * 关闭文件流 */ public static final void closeOutputStream ( OutputStream os ) { } }
if ( os != null ) { try { os . close ( ) ; } catch ( Exception e ) { logger . warn ( e . toString ( ) ) ; } }
public class CoGroupWithSolutionSetSecondDriver { @ Override @ SuppressWarnings ( "unchecked" ) public void initialize ( ) throws Exception { } }
final TypeComparator < IT2 > solutionSetComparator ; // grab a handle to the hash table from the iteration broker if ( taskContext instanceof AbstractIterativeTask ) { AbstractIterativeTask < ? , ? > iterativeTaskContext = ( AbstractIterativeTask < ? , ? > ) taskContext ; String identifier = iterativeTaskContext . brok...
public class ConfigRuleEvaluationStatusMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ConfigRuleEvaluationStatus configRuleEvaluationStatus , ProtocolMarshaller protocolMarshaller ) { } }
if ( configRuleEvaluationStatus == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( configRuleEvaluationStatus . getConfigRuleName ( ) , CONFIGRULENAME_BINDING ) ; protocolMarshaller . marshall ( configRuleEvaluationStatus . getConfigRuleArn ...
public class LightWeightHashSet { /** * Resize the internal table to given capacity . */ @ SuppressWarnings ( "unchecked" ) private void resize ( int cap ) { } }
int newCapacity = computeCapacity ( cap ) ; if ( newCapacity == this . capacity ) { return ; } this . capacity = newCapacity ; this . expandThreshold = ( int ) ( capacity * maxLoadFactor ) ; this . shrinkThreshold = ( int ) ( capacity * minLoadFactor ) ; this . hash_mask = capacity - 1 ; LinkedElement < T > [ ] temp = ...
public class CallTreeNode { /** * Returns a child node with given name or creates it if it does not exists . * @ param name Simon name * @ return Child node */ public CallTreeNode getOrAddChild ( String name ) { } }
CallTreeNode child = getChild ( name ) ; if ( child == null ) { child = addChild ( name ) ; } return child ;
public class ApiOvhIp { /** * Get this object properties * REST : GET / ip / { ip } / firewall / { ipOnFirewall } * @ param ip [ required ] * @ param ipOnFirewall [ required ] */ public OvhFirewallIp ip_firewall_ipOnFirewall_GET ( String ip , String ipOnFirewall ) throws IOException { } }
String qPath = "/ip/{ip}/firewall/{ipOnFirewall}" ; StringBuilder sb = path ( qPath , ip , ipOnFirewall ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhFirewallIp . class ) ;
public class RouterClient { /** * Retrieves runtime Nat mapping information of VM endpoints . * < p > Sample code : * < pre > < code > * try ( RouterClient routerClient = RouterClient . create ( ) ) { * ProjectRegionRouterName router = ProjectRegionRouterName . of ( " [ PROJECT ] " , " [ REGION ] " , " [ ROUTER...
GetNatMappingInfoRoutersHttpRequest request = GetNatMappingInfoRoutersHttpRequest . newBuilder ( ) . setRouter ( router == null ? null : router . toString ( ) ) . build ( ) ; return getNatMappingInfoRouters ( request ) ;
public class TagValTextParser { /** * Calls the getValue method first and the converts to an integer . * @ param keyIdField the key to obtain * @ return the integer value associated */ public int getValueAsIntWithDefault ( String keyIdField , int defaultVal ) throws IOException { } }
if ( keyToValue . containsKey ( keyIdField ) ) { return Integer . parseInt ( getValue ( keyIdField ) ) ; } else return defaultVal ;
public class FastDateFormat { /** * 获得 { @ link FastDateFormat } 实例 < br > * 支持缓存 * @ param dateStyle date style : FULL , LONG , MEDIUM , or SHORT * @ param timeStyle time style : FULL , LONG , MEDIUM , or SHORT * @ param locale { @ link Locale } 日期地理位置 * @ return 本地化 { @ link FastDateFormat } */ public stati...
return cache . getDateTimeInstance ( dateStyle , timeStyle , null , locale ) ;
public class OrdersInner { /** * Creates or updates an order . * @ param deviceName The device name . * @ param resourceGroupName The resource group name . * @ param order The order to be created or updated . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observabl...
return createOrUpdateWithServiceResponseAsync ( deviceName , resourceGroupName , order ) . map ( new Func1 < ServiceResponse < OrderInner > , OrderInner > ( ) { @ Override public OrderInner call ( ServiceResponse < OrderInner > response ) { return response . body ( ) ; } } ) ;
public class NumberUI { /** * { @ inheritDoc } */ @ Override public String validateValue ( final UIValue _value ) { } }
String ret = null ; try { if ( _value . getDbValue ( ) != null ) { Long . valueOf ( String . valueOf ( _value . getDbValue ( ) ) ) ; } } catch ( final NumberFormatException e ) { ret = DBProperties . getProperty ( NumberUI . class . getName ( ) + ".InvalidValue" ) ; } return ret ;
public class ReplicaGlobalSecondaryIndexSettingsDescriptionMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ReplicaGlobalSecondaryIndexSettingsDescription replicaGlobalSecondaryIndexSettingsDescription , ProtocolMarshaller protocolMarshaller ) { } }
if ( replicaGlobalSecondaryIndexSettingsDescription == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( replicaGlobalSecondaryIndexSettingsDescription . getIndexName ( ) , INDEXNAME_BINDING ) ; protocolMarshaller . marshall ( replicaGlobalSec...
public class Sftp { /** * 初始化 * @ param channel { @ link ChannelSftp } * @ param charset 编码 */ public void init ( ChannelSftp channel , Charset charset ) { } }
this . charset = charset ; try { channel . setFilenameEncoding ( charset . toString ( ) ) ; } catch ( SftpException e ) { throw new JschRuntimeException ( e ) ; } this . channel = channel ;
public class CPAttachmentFileEntryPersistenceImpl { /** * Removes all the cp attachment file entries where uuid = & # 63 ; and companyId = & # 63 ; from the database . * @ param uuid the uuid * @ param companyId the company ID */ @ Override public void removeByUuid_C ( String uuid , long companyId ) { } }
for ( CPAttachmentFileEntry cpAttachmentFileEntry : findByUuid_C ( uuid , companyId , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ) { remove ( cpAttachmentFileEntry ) ; }
public class DefaultOptionParser { /** * Parse the arguments according to the specified options and properties . * @ param options the specified Options * @ param args the command line arguments * @ param properties command line option name - value pairs * @ param skipParsingAtNonOption if { @ code true } an un...
this . options = options ; this . skipParsingAtNonOption = skipParsingAtNonOption ; this . currentOption = null ; this . expectedOpts = new ArrayList < > ( options . getRequiredOptions ( ) ) ; // clear the data from the groups for ( OptionGroup group : options . getOptionGroups ( ) ) { group . setSelected ( null ) ; } ...
public class GVRBillboard { /** * Set the model matrix of the owner object to face the main camera rig . * Does two cross products : First , between the world up vector and the camera * to object vector . This gives one of the axis of the local rotation of the * object . A second cross product between the object ...
GVRSceneObject ownerObject = getOwnerObject ( ) ; GVRTransform ownerTrans = ownerObject . getTransform ( ) ; float camX = mMainCameraRig . getTransform ( ) . getPositionX ( ) ; float camY = mMainCameraRig . getTransform ( ) . getPositionY ( ) ; float camZ = mMainCameraRig . getTransform ( ) . getPositionZ ( ) ; float o...
public class AbstractBinaryMemcacheDecoder { /** * Helper method to create a content chunk indicating a invalid decoding result . * @ param cause the cause of the decoding failure . * @ return a valid content chunk indicating failure . */ private MemcacheContent invalidChunk ( Exception cause ) { } }
state = State . BAD_MESSAGE ; MemcacheContent chunk = new DefaultLastMemcacheContent ( Unpooled . EMPTY_BUFFER ) ; chunk . setDecoderResult ( DecoderResult . failure ( cause ) ) ; return chunk ;
public class SAMkNN { /** * Returns the Euclidean distance . */ private double getDistance ( Instance sample , Instance sample2 ) { } }
double sum = 0 ; for ( int i = 0 ; i < sample . numInputAttributes ( ) ; i ++ ) { double diff = sample . valueInputAttribute ( i ) - sample2 . valueInputAttribute ( i ) ; sum += diff * diff ; } return Math . sqrt ( sum ) ;
public class AlbumUtils { /** * Get the file extension in url . * @ param url file url . * @ return extension . */ public static String getExtension ( String url ) { } }
url = TextUtils . isEmpty ( url ) ? "" : url . toLowerCase ( ) ; String extension = MimeTypeMap . getFileExtensionFromUrl ( url ) ; return TextUtils . isEmpty ( extension ) ? "" : extension ;
public class PipelineContextMarshaller { /** * Marshall the given parameter object . */ public void marshall ( PipelineContext pipelineContext , ProtocolMarshaller protocolMarshaller ) { } }
if ( pipelineContext == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( pipelineContext . getPipelineName ( ) , PIPELINENAME_BINDING ) ; protocolMarshaller . marshall ( pipelineContext . getStage ( ) , STAGE_BINDING ) ; protocolMarshaller . ...
public class DOM3TreeWalker { /** * Checks if a comment node is well - formed * @ param data The contents of the comment node * @ return a boolean indiacating if the comment is well - formed or not . */ protected void isCommentWellFormed ( String data ) { } }
if ( data == null || ( data . length ( ) == 0 ) ) { return ; } char [ ] dataarray = data . toCharArray ( ) ; int datalength = dataarray . length ; // version of the document is XML 1.1 if ( fIsXMLVersion11 ) { // we need to check all chracters as per production rules of XML11 int i = 0 ; while ( i < datalength ) { char...
public class BigDecimal { /** * Internal printing routine */ private static void print ( String name , BigDecimal bd ) { } }
System . err . format ( "%s:\tintCompact %d\tintVal %d\tscale %d\tprecision %d%n" , name , bd . intCompact , bd . intVal , bd . scale , bd . precision ) ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcRelSchedulesCostItems ( ) { } }
if ( ifcRelSchedulesCostItemsEClass == null ) { ifcRelSchedulesCostItemsEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 481 ) ; } return ifcRelSchedulesCostItemsEClass ;
public class TypeValidator { /** * Check if the type of the JsonNode ' s value is number based on the * status of typeLoose flag . * @ param node the JsonNode to check * @ param isTypeLoose The flag to show whether typeLoose is enabled * @ return boolean to indicate if it is a number */ public static boolean is...
if ( node . isNumber ( ) ) { return true ; } else if ( isTypeLoose ) { if ( TypeFactory . getValueNodeType ( node ) == JsonType . STRING ) { return isNumeric ( node . textValue ( ) ) ; } } return false ;
public class ServiceObjectivesInner { /** * Returns database service objectives . * @ 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 . * @ throws IllegalAr...
return listByServerWithServiceResponseAsync ( resourceGroupName , serverName ) . map ( new Func1 < ServiceResponse < List < ServiceObjectiveInner > > , List < ServiceObjectiveInner > > ( ) { @ Override public List < ServiceObjectiveInner > call ( ServiceResponse < List < ServiceObjectiveInner > > response ) { return re...
public class Cursor { /** * Fetches limited list of entities . * @ param limit Maximum amount of entities to fetch . * @ return List of fetched entities . * @ throws SQLException * @ throws InstantiationException * @ throws IllegalAccessException */ public List < T > fetchList ( int limit ) throws SQLExceptio...
ArrayList < T > result = new ArrayList < T > ( ) ; if ( primitive ) { for ( int i = 0 ; i < limit ; i ++ ) { if ( ! finished ) { result . add ( fetchSingleInternal ( ) ) ; next ( ) ; } else { break ; } } } else { for ( int i = 0 ; i < limit ; i ++ ) { if ( ! finished ) { result . add ( fetchSingleInternal ( ) ) ; next ...
public class BinaryTree { /** * Intern all the strings . */ public void intern ( ) { } }
symbol = symbol . intern ( ) ; if ( leftChild != null ) { leftChild . intern ( ) ; } if ( rightChild != null ) { rightChild . intern ( ) ; }
public class StringHelper { /** * Get a string that is filled at the end with the passed character until the * minimum length is reached . If the input string is empty , the result is a * string with the provided len only consisting of the passed characters . If the * input String is longer than the provided leng...
return _getWithLeadingOrTrailing ( sSrc , nMinLen , cEnd , false ) ;
public class AbstractWComponent { /** * Prepares this component and all child componenents for painting ( e . g . rendering to XML ) . This implementation * calls { @ link # preparePaintComponent ( Request ) } , then calls { @ link # preparePaint ( Request ) } on all its children . * Note that the this component ' ...
// Don ' t prepare if it ' s invisible . if ( ! isVisible ( ) ) { return ; } // Prepare this component . preparePaintComponent ( request ) ; // Prepare its children . final ArrayList < WComponent > children = ( ArrayList < WComponent > ) getComponentModel ( ) . getChildren ( ) ; if ( children != null ) { final int size...
public class SREsPreferencePage { /** * Compares the given name against current names and adds the appropriate numerical * suffix to ensure that it is unique . * @ param name the name with which to ensure uniqueness . * @ return the unique version of the given name . */ public String createUniqueName ( String nam...
if ( ! isDuplicateName ( name ) ) { return name ; } if ( name . matches ( ".*\\(\\d*\\)" ) ) { // $ NON - NLS - 1 $ final int start = name . lastIndexOf ( '(' ) ; final int end = name . lastIndexOf ( ')' ) ; final String stringInt = name . substring ( start + 1 , end ) ; final int numericValue = Integer . parseInt ( st...
public class VecUtils { /** * Create a new { @ link Vec } of string values from a numeric { @ link Vec } . * Currently only uses a default pretty printer . Would be better if * it accepted a format string PUBDEV - 2211 * @ param src a numeric { @ link Vec } * @ return a string { @ link Vec } */ public static Ve...
if ( src . isCategorical ( ) || src . isUUID ( ) ) throw new H2OIllegalValueException ( "Cannot convert a non-numeric column" + " using numericToStringVec() " , src ) ; Vec res = new MRTask ( ) { @ Override public void map ( Chunk chk , NewChunk newChk ) { if ( chk instanceof C0DChunk ) { // all NAs for ( int i = 0 ; i...
public class MmffAtomTypeMatcher { /** * Hydrogen atom types are assigned based on their parent types . The mmff - symb - mapping file * provides this mapping . * @ param hdefIn input stream of mmff - symb - mapping . tsv * @ return mapping of parent to hydrogen definitions * @ throws IOException */ private Map...
// maps of symbolic atom types to hydrogen atom types and internal types final Map < String , String > hdefs = new HashMap < String , String > ( 200 ) ; BufferedReader br = new BufferedReader ( new InputStreamReader ( hdefIn ) ) ; br . readLine ( ) ; // header String line = null ; while ( ( line = br . readLine ( ) ) !...
public class CmsFileUtil { /** * Returns the file name for a given VFS name that has to be written to a repository in the " real " file system , * by appending the VFS root path to the given base repository path , also adding an * folder for the " online " or " offline " project . < p > * @ param repository the b...
StringBuffer result = new StringBuffer ( 64 ) ; result . append ( repository ) ; result . append ( online ? CmsFlexCache . REPOSITORY_ONLINE : CmsFlexCache . REPOSITORY_OFFLINE ) ; result . append ( vfspath ) ; return result . toString ( ) ;
public class RequestToken { /** * Resumes a suspended asynchronous request , with the new * provided handler * @ param handler a handler to resume the request with . * @ return */ public boolean resume ( BaasHandler < ? > handler ) { } }
return BaasBox . getDefaultChecked ( ) . resume ( this , handler == null ? BaasHandler . NOOP : handler ) ;
public class AppModuleParser { /** * Parse JDOM element into module */ @ Override public Module parse ( final Element elem , final Locale locale ) { } }
final AppModule m = new AppModuleImpl ( ) ; final Element control = elem . getChild ( "control" , getContentNamespace ( ) ) ; if ( control != null ) { final Element draftElem = control . getChild ( "draft" , getContentNamespace ( ) ) ; if ( draftElem != null ) { if ( "yes" . equals ( draftElem . getText ( ) ) ) { m . s...
public class JMSManager { /** * Creates a Destination if the Destination has not already been created . * @ param name - the name of the destination to create * @ param type - the destination type ( topic or queue ) * @ param fTransacted - determines whether the session will maintain transactions * @ param ackM...
// If the destination already exists , just return it JMSDestination jmsDest = jmsDestinations . get ( name ) ; if ( jmsDest != null ) { return jmsDest . destination ; } // Create the new destination and store it Session session ; try { session = connection . createSession ( fTransacted , ackMode ) ; } catch ( JMSExcep...
public class RSA { /** * 还原私钥 , PKCS8EncodedKeySpec 用于构建私钥的规范 * @ param keyBytes * @ return */ private static PrivateKey loadPrivateKey ( byte [ ] keyBytes ) { } }
PKCS8EncodedKeySpec pkcs8EncodedKeySpec = new PKCS8EncodedKeySpec ( keyBytes ) ; try { KeyFactory factory = KeyFactory . getInstance ( KEY_ALGORITHM ) ; PrivateKey privateKey = factory . generatePrivate ( pkcs8EncodedKeySpec ) ; return privateKey ; } catch ( NoSuchAlgorithmException | InvalidKeySpecException e ) { // T...
public class OptionalWeak { /** * Returns inner value as optional of input type , if the inner value is absent or not an instance of the input * type an empty optional is returned * @ param type cast type * @ param < T > cast type * @ return inner value as optional of input type */ public < T > Optional < T > a...
return inner . filter ( d -> d . is ( type ) ) . map ( d -> d . as ( type ) ) ;
public class CommonOps_DDRM { /** * Extracts the diagonal elements ' src ' write it to the ' dst ' vector . ' dst ' * can either be a row or column vector . * @ param src Matrix whose diagonal elements are being extracted . Not modified . * @ param dst A vector the results will be written into . Modified . */ pub...
int N = Math . min ( src . numRows , src . numCols ) ; if ( ! MatrixFeatures_DDRM . isVector ( dst ) || dst . numCols * dst . numCols != N ) { dst . reshape ( N , 1 ) ; } for ( int i = 0 ; i < N ; i ++ ) { dst . set ( i , src . unsafe_get ( i , i ) ) ; }
public class OpenWatcomCompiler { /** * Add warning switch . * @ param args * Vector command line arguments * @ param level * int warning level */ @ Override protected final void addWarningSwitch ( final Vector < String > args , final int level ) { } }
OpenWatcomProcessor . addWarningSwitch ( args , level ) ;
public class SpatialReferenceSystemDao { /** * Delete the collection of Spatial Reference Systems , cascading * @ param srsCollection * spatial reference system collection * @ return deleted count * @ throws SQLException * upon deletion failure */ public int deleteCascade ( Collection < SpatialReferenceSystem...
int count = 0 ; if ( srsCollection != null ) { for ( SpatialReferenceSystem srs : srsCollection ) { count += deleteCascade ( srs ) ; } } return count ;
public class JaxbConvertToNative { /** * Copy this XML structure to this result target . * @ param resultTarget The target to copy to . * @ return True if successful . */ public boolean copyMessageToResult ( javax . xml . transform . Result resultTarget ) { } }
Object root = m_message . getRawData ( ) ; try { String strSOAPPackage = ( String ) ( ( TrxMessageHeader ) this . getMessage ( ) . getMessageHeader ( ) ) . get ( SOAPMessageTransport . SOAP_PACKAGE ) ; Marshaller m = JaxbContexts . getJAXBContexts ( ) . getMarshaller ( strSOAPPackage ) ; if ( m != null ) { synchronized...
public class RandomMatrices_ZDRM { /** * Returns a matrix where all the elements are selected independently from * a uniform distribution between - 1 and 1 inclusive . * @ param numRow Number of rows in the new matrix . * @ param numCol Number of columns in the new matrix . * @ param rand Random number generato...
return rectangle ( numRow , numCol , - 1 , 1 , rand ) ;
public class RandomDataInserter { /** * Run a loop inserting tuples into the database for the amount * of time specified in config . duration . */ public void run ( ) { } }
// Reset the stats managed by the client . periodicStatsContext . fetchAndResetBaseline ( ) ; // Run in a loop for config . duration seconds . final long benchmarkEndTime = app . startTS + ( 1000l * app . config . duration ) ; while ( benchmarkEndTime > System . currentTimeMillis ( ) ) { // GENERATE A RANDOM ROW // uni...
public class StringUtilities { /** * Calculate the Damerau - Levenshtein Distance between two strings . The basic difference * between this algorithm and the general Levenshtein algorithm is that damerau - Levenshtein * counts a swap of two characters next to each other as 1 instead of 2 . This breaks the * ' tri...
if ( source == null || "" . equals ( source ) ) { return target == null || "" . equals ( target ) ? 0 : target . length ( ) ; } else if ( target == null || "" . equals ( target ) ) { return source . length ( ) ; } int srcLen = source . length ( ) ; int targetLen = target . length ( ) ; int [ ] [ ] distanceMatrix = new ...
public class InternalAnnotationDefinitionConverter { /** * { @ inheritDoc } */ @ Override public AnnotationDefinition convert ( XBELInternalAnnotationDefinition t ) { } }
if ( t == null ) { return null ; } String desc = t . getDescription ( ) ; String id = t . getId ( ) ; String use = t . getUsage ( ) ; AnnotationDefinition dest = null ; if ( t . isSetListAnnotation ( ) ) { XBELListAnnotation listAnnotation = t . getListAnnotation ( ) ; List < String > vals = listAnnotation . getListVal...
public class CommandLineArgumentParser { /** * other arguments that require validation . */ private List < NamedArgumentDefinition > validatePluginArgumentValues ( ) { } }
final List < NamedArgumentDefinition > actualArgumentDefinitions = new ArrayList < > ( ) ; for ( final NamedArgumentDefinition argumentDefinition : namedArgumentDefinitions ) { if ( ! argumentDefinition . isControlledByPlugin ( ) ) { actualArgumentDefinitions . add ( argumentDefinition ) ; } else { final boolean isAllo...
public class JSPExtensionClassLoader { /** * Load JSP class data from file . */ protected byte [ ] loadClassDataFromFile ( String fileName ) { } }
byte [ ] classBytes = null ; try { InputStream in = getResourceAsStream ( fileName ) ; if ( in == null ) { return null ; } ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; byte buf [ ] = new byte [ 1024 ] ; for ( int i = 0 ; ( i = in . read ( buf ) ) != - 1 ; ) baos . write ( buf , 0 , i ) ; in . close ( ) ...
public class ClientSocketFactory { /** * Open a stream to the target server for the load balancer . * @ return the socket ' s read / write pair . */ @ Override public ClientSocket open ( ) { } }
State state = _state ; if ( ! state . isInit ( ) ) return null ; ClientSocket stream = openRecycle ( ) ; if ( stream != null ) return stream ; return connect ( ) ;
public class ManagementPoliciesInner { /** * Sets the managementpolicy to the specified storage account . * @ param resourceGroupName The name of the resource group within the user ' s subscription . The name is case insensitive . * @ param accountName The name of the storage account within the specified resource g...
return createOrUpdateWithServiceResponseAsync ( resourceGroupName , accountName , policy ) . toBlocking ( ) . single ( ) . body ( ) ;
public class PdfStamper { /** * Sets the encryption options for this document . The userPassword and the * ownerPassword can be null or have zero length . In this case the ownerPassword * is replaced by a random string . The open permissions for the document can be * AllowPrinting , AllowModifyContents , AllowCop...
setEncryption ( DocWriter . getISOBytes ( userPassword ) , DocWriter . getISOBytes ( ownerPassword ) , permissions , strength ) ;
public class Button { /** * Adds a URL parameter to the generated hyperlink . * @ param name the name of the parameter to be added . * @ param value the value of the parameter to be added ( a String or String [ ] ) . * @ param facet */ public void addParameter ( String name , Object value , String facet ) throws ...
assert ( name != null ) : "Parameter 'name' must not be null" ; if ( _params == null ) { _params = new HashMap ( ) ; } ParamHelper . addParam ( _params , name , value ) ;
public class ETAPrinter { /** * Initializes a progress bar . * { @ link java . lang . System } . out will be used to print the progress bar . * @ param elementName the name of the elements that are processed . It is used to display the speed . * @ param totalElementsToProcess the total number of items that are go...
return init ( elementName , totalElementsToProcess , System . out , false ) ;
public class JavaLexer { /** * $ ANTLR start " OctalEscape " */ public final void mOctalEscape ( ) throws RecognitionException { } }
try { // src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 1360:5 : ( ' \ \ \ \ ' ( ' 0 ' . . ' 3 ' ) ( ' 0 ' . . ' 7 ' ) ( ' 0 ' . . ' 7 ' ) | ' \ \ \ \ ' ( ' 0 ' . . ' 7 ' ) ( ' 0 ' . . ' 7 ' ) | ' \ \ \ \ ' ( ' 0 ' . . ' 7 ' ) ) int alt25 = 3 ; int LA25_0 = input . LA ( 1 ) ; ...
public class View { /** * Returns all the { @ link LabelAtomPropertyDescriptor } s that can be potentially configured * on this label . */ public List < ViewPropertyDescriptor > getApplicablePropertyDescriptors ( ) { } }
List < ViewPropertyDescriptor > r = new ArrayList < > ( ) ; for ( ViewPropertyDescriptor pd : ViewProperty . all ( ) ) { if ( pd . isEnabledFor ( this ) ) r . add ( pd ) ; } return r ;
public class JavaParser { /** * src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 638:1 : annotationTypeDeclaration : ' @ ' ' interface ' Identifier annotationTypeBody ; */ public final void annotationTypeDeclaration ( ) throws RecognitionException { } }
int annotationTypeDeclaration_StartIndex = input . index ( ) ; try { if ( state . backtracking > 0 && alreadyParsedRule ( input , 71 ) ) { return ; } // src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 639:5 : ( ' @ ' ' interface ' Identifier annotationTypeBody ) // src / main /...
public class JdbcClient { private String getStringPredicate ( String fieldName , String filterValue , List < Object > prms ) { } }
if ( filterValue == null ) { return "" ; } return getStringPredicate ( fieldName , Arrays . asList ( filterValue ) , prms ) ;
public class LaunchSpecification { /** * One or more security groups . When requesting instances in a VPC , you must specify the IDs of the security groups . * When requesting instances in EC2 - Classic , you can specify the names or the IDs of the security groups . * @ param allSecurityGroups * One or more secur...
if ( allSecurityGroups == null ) { this . allSecurityGroups = null ; return ; } this . allSecurityGroups = new com . amazonaws . internal . SdkInternalList < GroupIdentifier > ( allSecurityGroups ) ;
public class ScenarioPortrayal { /** * Deletes a certain series of data from the histogram . * The index will be the order of the histogram . * @ param histogramID * @ param index - the index of the data */ public void removeDataSerieFromHistogram ( String histogramID , int index ) { } }
if ( this . histograms . containsKey ( histogramID ) ) { this . histograms . get ( histogramID ) . removeSeries ( index ) ; }
public class FSNamesystem { /** * Find how many of the containing nodes are " extra " , if any . * If there are any extras , call chooseExcessReplicates ( ) to * mark them in the excessReplicateMap . * @ param excessReplicateMapTmp replicas that can possibly be in excess * @ param originalDatanodes all currentl...
Collection < DatanodeDescriptor > nonExcess ; INodeFile inode ; readLock ( ) ; try { BlockInfo storedBlock = blocksMap . getBlockInfo ( block ) ; inode = ( storedBlock == null ) ? null : storedBlock . getINode ( ) ; if ( inode == null ) { return ; // file has been deleted already , nothing to do . } // if the caller di...