signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class TokenPropagationHelper { /** * Gets the username from the principal of the subject . * @ return * @ throws WSSecurityException */ public static String getUserName ( ) throws Exception { } }
Subject subject = getRunAsSubjectInternal ( ) ; if ( subject == null ) { return null ; } Set < Principal > principals = subject . getPrincipals ( ) ; Iterator < Principal > principalsIterator = principals . iterator ( ) ; if ( principalsIterator . hasNext ( ) ) { Principal principal = principalsIterator . next ( ) ; re...
public class DescribeFindingsRequest { /** * The ARN that specifies the finding that you want to describe . * @ param findingArns * The ARN that specifies the finding that you want to describe . */ public void setFindingArns ( java . util . Collection < String > findingArns ) { } }
if ( findingArns == null ) { this . findingArns = null ; return ; } this . findingArns = new java . util . ArrayList < String > ( findingArns ) ;
public class UnImplNode { /** * Unimplemented . See org . w3c . dom . Element * @ param namespaceURI Namespace URI of the element * @ param localName Local part of qualified name of the element * @ return null */ public NodeList getElementsByTagNameNS ( String namespaceURI , String localName ) { } }
error ( XMLErrorResources . ER_FUNCTION_NOT_SUPPORTED ) ; // " getElementsByTagNameNS not supported ! " ) ; return null ;
public class BinaryInMemorySortBuffer { /** * Writes a given record to this sort buffer . The written record will be appended and take * the last logical position . * @ param record The record to be written . * @ return True , if the record was successfully written , false , if the sort buffer was full . * @ th...
// check whether we need a new memory segment for the sort index if ( ! checkNextIndexOffset ( ) ) { return false ; } // serialize the record into the data buffers int skip ; try { skip = this . inputSerializer . serializeToPages ( record , this . recordCollector ) ; } catch ( EOFException e ) { return false ; } final ...
public class Configuration { /** * Checks for the presence of the property < code > name < / code > in the * deprecation map . Returns the first of the list of new keys if present * in the deprecation map or the < code > name < / code > itself . If the property * is not presently set but the property map contains...
if ( null != name ) { name = name . trim ( ) ; } ArrayList < String > names = new ArrayList < String > ( ) ; if ( isDeprecated ( name ) ) { DeprecatedKeyInfo keyInfo = deprecations . getDeprecatedKeyMap ( ) . get ( name ) ; warnOnceIfDeprecated ( deprecations , name ) ; for ( String newKey : keyInfo . newKeys ) { if ( ...
public class PinViewBaseHelper { /** * Keyboard back button */ @ Override public boolean dispatchKeyEventPreIme ( KeyEvent event ) { } }
if ( mKeyboardMandatory ) { if ( getContext ( ) != null ) { InputMethodManager imm = ( InputMethodManager ) getContext ( ) . getSystemService ( Context . INPUT_METHOD_SERVICE ) ; if ( imm . isActive ( ) && event . getKeyCode ( ) == KeyEvent . KEYCODE_BACK ) { setImeVisibility ( true ) ; return true ; } } } return super...
public class DefaultComparisonFormatter { /** * Provides a display text for the constant values of the { @ link Node } class that represent node types . * @ param type the node type * @ return the display text * @ since XMLUnit 2.4.0 */ protected String nodeType ( short type ) { } }
switch ( type ) { case Node . ELEMENT_NODE : return "Element" ; case Node . DOCUMENT_TYPE_NODE : return "Document Type" ; case Node . ENTITY_NODE : return "Entity" ; case Node . ENTITY_REFERENCE_NODE : return "Entity Reference" ; case Node . NOTATION_NODE : return "Notation" ; case Node . TEXT_NODE : return "Text" ; ca...
public class CommerceOrderPersistenceImpl { /** * Returns all the commerce orders . * @ return the commerce orders */ @ Override public List < CommerceOrder > findAll ( ) { } }
return findAll ( QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ;
public class RowBasedGrouperHelper { /** * If isInputRaw is true , transformations such as timestamp truncation and extraction functions have not * been applied to the input rows yet , for example , in a nested query , if an extraction function is being * applied in the outer query to a field of the inner query . T...
// concurrencyHint > = 1 for concurrent groupers , - 1 for single - threaded Preconditions . checkArgument ( concurrencyHint >= 1 || concurrencyHint == - 1 , "invalid concurrencyHint" ) ; final List < ValueType > valueTypes = DimensionHandlerUtils . getValueTypesFromDimensionSpecs ( query . getDimensions ( ) ) ; final ...
public class WrappedByteBuffer { /** * Returns the index of the specified byte in the buffer . * @ param b * the byte to find * @ return the index of the byte in the buffer , or - 1 if not found */ public int indexOf ( byte b ) { } }
if ( _buf . hasArray ( ) ) { byte [ ] array = _buf . array ( ) ; int arrayOffset = _buf . arrayOffset ( ) ; int startAt = arrayOffset + position ( ) ; int endAt = arrayOffset + limit ( ) ; for ( int i = startAt ; i < endAt ; i ++ ) { if ( array [ i ] == b ) { return i - arrayOffset ; } } return - 1 ; } else { int start...
public class GridTable { /** * Use this record update notification to update this gridtable . * @ param message A RecordMessage detailing an update to this gridtable . * @ param bAddIfNotFound Add the record to the end if not found * @ return The row that was updated , or - 1 if none . */ public int updateGridToM...
Record record = this . getRecord ( ) ; // Record changed int iHandleType = DBConstants . BOOKMARK_HANDLE ; // OBJECT _ ID _ HANDLE ; if ( this . getNextTable ( ) instanceof org . jbundle . base . db . shared . MultiTable ) iHandleType = DBConstants . FULL_OBJECT_HANDLE ; Object bookmark = ( ( RecordMessageHeader ) mess...
public class JTrees { /** * Returns the user object from the last path component of the given tree * path . If the given path is < code > null < / code > , then < code > null < / code > * is returned . If the last path component is not a DefaultMutableTreeNode , * then < code > null < / code > is returned . * @...
if ( treePath == null ) { return null ; } Object lastPathComponent = treePath . getLastPathComponent ( ) ; return getUserObjectFromTreeNode ( lastPathComponent ) ;
public class CssUtils { /** * get int value of string * @ param strValue string value * @ return int value */ public static int getInt ( String strValue ) { } }
int value = 0 ; if ( StringUtils . isNotBlank ( strValue ) ) { Matcher m = Pattern . compile ( "^(\\d+)(?:\\w+|%)?$" ) . matcher ( strValue ) ; if ( m . find ( ) ) { value = Integer . parseInt ( m . group ( 1 ) ) ; } } return value ;
public class HelpFormatter { /** * Render the specified text width a maximum width . This method differs * from renderWrappedText by not removing leading spaces after a new line . * @ param sb the StringBuilder to place the rendered text into * @ param nextLineTabStop the position on the next line for the first t...
try { BufferedReader in = new BufferedReader ( new StringReader ( text ) ) ; String line ; boolean firstLine = true ; while ( ( line = in . readLine ( ) ) != null ) { if ( ! firstLine ) { sb . append ( NEW_LINE ) ; } else { firstLine = false ; } renderWrappedText ( sb , getWidth ( ) , nextLineTabStop , line ) ; } } cat...
public class Entity { /** * Looks for the weak entity corresponding to the given field in this string * entity * @ param field * @ return the weak entity */ public Entity getWeak ( Field field ) { } }
for ( Entity entity : getWeaks ( ) ) { if ( entity . getOwner ( ) . getEntityProperty ( ) . equals ( field . getProperty ( ) ) ) { return entity ; } } return null ;
public class ServletRESTRequestWithParams { /** * ( non - Javadoc ) * @ see com . ibm . wsspi . rest . handler . RESTRequest # getUserPrincipal ( ) */ @ Override public Principal getUserPrincipal ( ) { } }
ServletRESTRequestImpl ret = castRequest ( ) ; if ( ret != null ) return ret . getUserPrincipal ( ) ; return null ;
public class RequestDeserializer { /** * / * ( non - Javadoc ) * @ see com . fasterxml . jackson . databind . JsonDeserializer # deserialize ( com . fasterxml . jackson . core . JsonParser , * com . fasterxml . jackson . databind . DeserializationContext ) */ @ Override public Request deserialize ( JsonParser jp , ...
JsonNode node = jp . getCodec ( ) . readTree ( jp ) ; String methodName = node . get ( "methodName" ) . asText ( ) ; String requestReplyId = node . get ( "requestReplyId" ) . asText ( ) ; ParamsAndParamDatatypesHolder paramsAndParamDatatypes = DeserializerUtils . deserializeParams ( objectMapper , node , logger ) ; ret...
public class Predicate { /** * Return a predicate that is always satisfied . * @ return the predicate ; never null */ public static < T > Predicate < T > always ( ) { } }
return new Predicate < T > ( ) { @ Override public boolean test ( T input ) { return true ; } } ;
public class ZmqEventConsumer { @ Override protected boolean reSubscribe ( EventChannelStruct channelStruct , EventCallBackStruct eventCallBackStruct ) { } }
// ToDo boolean done = false ; try { ApiUtil . printTrace ( "====================================================\n" + " Try to resubscribe " + eventCallBackStruct . channel_name ) ; DevVarLongStringArray lsa = ZMQutils . getEventSubscriptionInfoFromAdmDevice ( channelStruct . adm_device_proxy , eventCallBackStruct ....
public class GrailsHibernateUtil { /** * Get hold of the GrailsDomainClassProperty represented by the targetClass ' propertyName , * assuming targetClass corresponds to a GrailsDomainClass . */ private static PersistentProperty getGrailsDomainClassProperty ( AbstractHibernateDatastore datastore , Class < ? > targetCl...
PersistentEntity grailsClass = datastore != null ? datastore . getMappingContext ( ) . getPersistentEntity ( targetClass . getName ( ) ) : null ; if ( grailsClass == null ) { throw new IllegalArgumentException ( "Unexpected: class is not a domain class:" + targetClass . getName ( ) ) ; } return grailsClass . getPropert...
public class ContentCryptoMaterial { /** * Returns a new instance of < code > ContentCryptoMaterial < / code > for the * given input parameters by using the specified content crypto scheme , and * S3 crypto scheme . * Note network calls are involved if the CEK is to be protected by KMS . * @ param cek * conte...
// Secure the envelope symmetric key either by encryption , key wrapping // or KMS . SecuredCEK cekSecured = secureCEK ( cek , kekMaterials , targetS3CryptoScheme . getKeyWrapScheme ( ) , targetS3CryptoScheme . getSecureRandom ( ) , provider , kms , req ) ; return wrap ( cek , iv , contentCryptoScheme , provider , cekS...
public class GlobalFactory { /** * エンティティ記述のファクトリを作成します 。 * @ param packageName パッケージ名 * @ param superclass スーパークラス * @ param entityPropertyDescFactory エンティティプロパティ記述のファクトリ * @ param namingType ネーミング規約 * @ param originalStatesPropertyName オリジナルの状態を表すプロパティの名前 * @ param showCatalogName カタログ名を表示する場合 {...
return new EntityDescFactory ( packageName , superclass , entityPropertyDescFactory , namingType , originalStatesPropertyName , showCatalogName , showSchemaName , showTableName , showDbComment , useAccessor , useListener ) ;
public class CalibrateMonoPlanar { /** * Adds the observations from a calibration target detector * @ param observation Detected calibration points */ public void addImage ( CalibrationObservation observation ) { } }
if ( imageWidth == 0 ) { this . imageWidth = observation . getWidth ( ) ; this . imageHeight = observation . getHeight ( ) ; } else if ( observation . getWidth ( ) != this . imageWidth || observation . getHeight ( ) != this . imageHeight ) { throw new IllegalArgumentException ( "Image shape miss match" ) ; } observatio...
public class ClassInfo { /** * Returns information on all visible fields declared by this class , but not by its superclasses . See also : * < ul > * < li > { @ link # getFieldInfo ( String ) } * < li > { @ link # getDeclaredFieldInfo ( String ) } * < li > { @ link # getFieldInfo ( ) } * < / ul > * Requires...
if ( ! scanResult . scanSpec . enableFieldInfo ) { throw new IllegalArgumentException ( "Please call ClassGraph#enableFieldInfo() before #scan()" ) ; } return fieldInfo == null ? FieldInfoList . EMPTY_LIST : fieldInfo ;
public class KiekerTraceEntry { /** * Returns a description for the Super CSV parser , how to map a column of the csv to this type . * @ return array with field names representing the order in the csv */ public static String [ ] getFieldDescription ( ) { } }
if ( FIELDS == null ) { ArrayList < String > fields = new ArrayList < String > ( ) ; for ( Field field : KiekerTraceEntry . class . getDeclaredFields ( ) ) { if ( ! Modifier . isStatic ( field . getModifiers ( ) ) ) { fields . add ( field . getName ( ) ) ; } } FIELDS = fields . toArray ( new String [ fields . size ( ) ...
public class RowRenderer { /** * This methods generates the HTML code of the current b : row . * < code > encodeBegin < / code > generates the start of the component . After the , * the JSF framework calls < code > encodeChildren ( ) < / code > to generate the * HTML code between the beginning and the end of the ...
if ( ! component . isRendered ( ) ) { return ; } Row row = ( Row ) component ; ResponseWriter rw = context . getResponseWriter ( ) ; String clientId = row . getClientId ( ) ; rw . startElement ( "div" , row ) ; Tooltip . generateTooltip ( context , row , rw ) ; String dir = row . getDir ( ) ; if ( null != dir ) rw . wr...
public class BridgeMethodResolver { /** * Compare the signatures of the bridge method and the method which it bridges . If * the parameter and return types are the same , it is a ' visibility ' bridge method * introduced in Java 6 to fix http : / / bugs . sun . com / view _ bug . do ? bug _ id = 6342411. * See al...
if ( bridgeMethod == bridgedMethod ) { return true ; } return ( Arrays . equals ( bridgeMethod . getParameterTypes ( ) , bridgedMethod . getParameterTypes ( ) ) && bridgeMethod . getReturnType ( ) . equals ( bridgedMethod . getReturnType ( ) ) ) ;
public class PutParameterRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( PutParameterRequest putParameterRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( putParameterRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( putParameterRequest . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( putParameterRequest . getDescription ( ) , DESCRIPTION_BINDING ) ; protocolMarsh...
public class NOPImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setUndfData ( byte [ ] newUndfData ) { } }
byte [ ] oldUndfData = undfData ; undfData = newUndfData ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . NOP__UNDF_DATA , oldUndfData , undfData ) ) ;
public class Query { /** * Wraps the protobuf { @ link ReadRowsRequest } . * < p > WARNING : Please note that the project id & instance id in the table name will be overwritten * by the configuration in the BigtableDataClient . */ public static Query fromProto ( @ Nonnull ReadRowsRequest request ) { } }
Preconditions . checkArgument ( request != null , "ReadRowsRequest must not be null" ) ; Query query = new Query ( NameUtil . extractTableIdFromTableName ( request . getTableName ( ) ) ) ; query . builder = request . toBuilder ( ) ; return query ;
public class DES { /** * DES算法 , 加密 * @ param data 待加密字符串 * @ param key 加密私钥 , 长度不能够小于8位 * @ return 加密后的字节数组 , 一般结合Base64编码使用 * @ throws InvalidAlgorithmParameterException * @ throws Exception */ public static String encrypt ( String key , String data ) { } }
if ( data == null ) return null ; try { DESKeySpec dks = new DESKeySpec ( key . getBytes ( ) ) ; SecretKeyFactory keyFactory = SecretKeyFactory . getInstance ( "DES" ) ; // key的长度不能够小于8位字节 Key secretKey = keyFactory . generateSecret ( dks ) ; Cipher cipher = Cipher . getInstance ( ALGORITHM_DES ) ; AlgorithmParameterSp...
public class MolaDbClient { /** * Get instance detail from Moladb * @ param request Container for the necessary parameters to * execute the Get instance service method on Moladb . * @ return The responseContent from the Get instance service method , as returned by * Moladb . * @ throws BceClientException * ...
checkNotNull ( request , "request should not be null." ) ; InternalRequest httpRequest = createRequest ( HttpMethodName . GET , MolaDbConstants . URI_INSTANCE , request . getInstanceName ( ) ) ; GetInstanceResponse ret = this . invokeHttpClient ( httpRequest , GetInstanceResponse . class ) ; return ret ;
public class PoiUtil { /** * 修正图表中对于表单名字的引用 。 * @ param sheet EXCEL表单 。 * @ param oldSheetName 旧的表单名字 。 * @ param newSheetName 新的表单名字 。 */ public static void fixChartSheetNameRef ( Sheet sheet , String oldSheetName , String newSheetName ) { } }
val drawing = sheet . getDrawingPatriarch ( ) ; if ( ! ( drawing instanceof XSSFDrawing ) ) return ; for ( val chart : ( ( XSSFDrawing ) drawing ) . getCharts ( ) ) { for ( val barChart : chart . getCTChart ( ) . getPlotArea ( ) . getBarChartList ( ) ) { for ( val ser : barChart . getSerList ( ) ) { val val = ser . get...
public class BaseWorkflowExecutor { /** * Creates a copy of the given data context with the secure option values obfuscated . * This does not modify the original data context . * " secureOption " map values will always be obfuscated . " option " entries that are also in " secureOption " * will have their values o...
Map < String , Map < String , String > > printableContext = new HashMap < > ( ) ; if ( dataContext != null ) { printableContext . putAll ( dataContext ) ; Set < String > secureValues = new HashSet < > ( ) ; if ( dataContext . containsKey ( secureOptionKey ) ) { Map < String , String > secureOptions = new HashMap < > ( ...
public class XFactory { /** * Get an XField object exactly matching given class , name , and signature . * May return an unresolved object ( if the class can ' t be found , or does not * directly declare named field ) . * @ param className * name of class containing the field * @ param name * name of field ...
FieldDescriptor fieldDesc = DescriptorFactory . instance ( ) . getFieldDescriptor ( ClassName . toSlashedClassName ( className ) , name , signature , isStatic ) ; return getExactXField ( fieldDesc ) ;
public class UCharacterIterator { /** * Moves the current position by the number of code units specified , either forward or backward depending on the * sign of delta ( positive or negative respectively ) . If the resulting index would be less than zero , the index is * set to zero , and if the resulting index woul...
int x = Math . max ( 0 , Math . min ( getIndex ( ) + delta , getLength ( ) ) ) ; setIndex ( x ) ; return x ;
public class FunctionLibraryParser { /** * Parses all variable definitions and adds those to the bean definition * builder as property value . * @ param builder the target bean definition builder . * @ param element the source element . */ private void parseFunctionDefinitions ( BeanDefinitionBuilder builder , El...
ManagedMap < String , Object > functions = new ManagedMap < String , Object > ( ) ; for ( Element function : DomUtils . getChildElementsByTagName ( element , "function" ) ) { if ( function . hasAttribute ( "ref" ) ) { functions . put ( function . getAttribute ( "name" ) , new RuntimeBeanReference ( function . getAttrib...
public class DescribeDirectoryConfigsRequest { /** * The directory names . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setDirectoryNames ( java . util . Collection ) } or { @ link # withDirectoryNames ( java . util . Collection ) } if you want * to over...
if ( this . directoryNames == null ) { setDirectoryNames ( new java . util . ArrayList < String > ( directoryNames . length ) ) ; } for ( String ele : directoryNames ) { this . directoryNames . add ( ele ) ; } return this ;
public class DocumentSession { /** * Refreshes the specified entity from Raven server . */ public < T > void refresh ( T entity ) { } }
DocumentInfo documentInfo = documentsByEntity . get ( entity ) ; if ( documentInfo == null ) { throw new IllegalStateException ( "Cannot refresh a transient instance" ) ; } incrementRequestCount ( ) ; GetDocumentsCommand command = new GetDocumentsCommand ( new String [ ] { documentInfo . getId ( ) } , null , false ) ; ...
public class FpgaImageAttribute { /** * The product codes . * @ param productCodes * The product codes . */ public void setProductCodes ( java . util . Collection < ProductCode > productCodes ) { } }
if ( productCodes == null ) { this . productCodes = null ; return ; } this . productCodes = new com . amazonaws . internal . SdkInternalList < ProductCode > ( productCodes ) ;
public class CmsPermissionView { /** * Generates a check box label . < p > * @ param value the value to display * @ return the label */ private Label getCheckBoxLabel ( Boolean value ) { } }
String content ; if ( value . booleanValue ( ) ) { content = "<input type='checkbox' disabled='true' checked='true' />" ; } else { content = "<input type='checkbox' disabled='true' />" ; } return new Label ( content , ContentMode . HTML ) ;
public class PhysicalDatabaseParent { /** * Set the value of this property ( passed in on initialization ) . * @ param key The parameter key value . * @ param objValue The key ' s value . */ public void setProperty ( String strKey , Object objValue ) { } }
if ( m_mapParams == null ) m_mapParams = new HashMap < String , Object > ( ) ; m_mapParams . put ( strKey , objValue ) ;
public class Effects { /** * The animate ( ) method allows you to create animation effects on any numeric * Attribute , CSS property , or color CSS property . * Concerning to numeric properties , values are treated as a number of pixels * unless otherwise specified . The units em and % can be specified where * ...
final Properties p = ( stringOrProperties instanceof String ) ? ( Properties ) $$ ( ( String ) stringOrProperties ) : ( Properties ) stringOrProperties ; if ( p . getStr ( "duration" ) != null ) { duration = p . getInt ( "duration" ) ; } duration = Math . abs ( duration ) ; for ( Element e : elements ( ) ) { GQAnimatio...
public class IntegerValueComparator { /** * / * ( non - Javadoc ) * @ see java . util . Comparator # compare ( java . lang . Object , java . lang . Object ) */ @ Override public int compare ( Object a , Object b ) { } }
if ( base . get ( a ) >= base . get ( b ) ) { return - 1 ; } return 1 ;
public class Evaluator { /** * Gets the data list . * @ return the data list * @ throws EFapsException */ public DataList getDataList ( ) throws EFapsException { } }
final DataList ret = new DataList ( ) ; while ( next ( ) ) { final ObjectData data = new ObjectData ( ) ; int idx = 1 ; for ( final Select select : this . selection . getSelects ( ) ) { final String key = select . getAlias ( ) == null ? String . valueOf ( idx ) : select . getAlias ( ) ; data . getValues ( ) . add ( JSO...
public class CheckArg { /** * Asserts that the specified first object is not the same as ( = = ) the specified second object . * @ param < T > * @ param argument The argument to assert as not the same as < code > object < / code > . * @ param argumentName The name that will be used within the exception message fo...
if ( argument == object ) { if ( objectName == null ) objectName = getObjectName ( object ) ; throw new IllegalArgumentException ( CommonI18n . argumentMustNotBeSameAs . text ( argumentName , objectName ) ) ; }
public class VdmEvaluationContextManager { /** * Returns the evaluation context for the given window , or < code > null < / code > if none . The evaluation context * corresponds to the selected stack frame in the following priority order : * < ol > * < li > stack frame in active page of the window < / li > * < ...
List < IWorkbenchWindow > alreadyVisited = new ArrayList < IWorkbenchWindow > ( ) ; if ( window == null ) { window = fgManager . fActiveWindow ; } return getEvaluationContext ( window , alreadyVisited ) ;
public class WebServiceAccessorImp { /** * 1 . create a SessionContext object in httpsession 2 . save the principle * name in the session context . * the principle name the request . getPrincipleNme you can save more * attribute in the SessionContext object by replcaing this class in * container . xml * Sessi...
ContainerWrapper cw = containerCallback . getContainerWrapper ( ) ; SessionContextSetup sessionContextSetup = ( SessionContextSetup ) cw . lookup ( ComponentKeys . SESSIONCONTEXT_SETUP ) ; TargetMetaRequest targetMetaRequest = targetMetaRequestsHolder . getTargetMetaRequest ( ) ; targetMetaRequest . setVisitableName ( ...
public class MtasSolrCollectionResult { /** * Sets the list . * @ param now the now * @ param list the list * @ throws IOException Signals that an I / O exception has occurred . */ public void setList ( long now , List < SimpleOrderedMap < Object > > list ) throws IOException { } }
if ( action . equals ( ComponentCollection . ACTION_LIST ) ) { this . now = now ; this . list = list ; } else { throw new IOException ( "not allowed with action '" + action + "'" ) ; }
public class VariableNumMap { /** * Returns a copy of this map with every variable in * { @ code variableNums } removed . * @ param variableNums * @ return */ public final VariableNumMap removeAll ( int ... variableNums ) { } }
if ( variableNums . length == 0 ) { return this ; } int [ ] newNums = new int [ nums . length ] ; String [ ] newNames = new String [ nums . length ] ; Variable [ ] newVars = new Variable [ nums . length ] ; int numFilled = 0 ; for ( int i = 0 ; i < newNums . length ; i ++ ) { if ( ! Ints . contains ( variableNums , num...
public class Balancer { /** * Retrieves an Ortc Server url from the Ortc Balancer * @ param balancerUrl * The Ortc Balancer url * @ throws java . net . MalformedURLException */ public static void getServerFromBalancerAsync ( String balancerUrl , String applicationKey , final OnRestWebserviceResponse onCompleted )...
Matcher protocolMatcher = urlProtocolPattern . matcher ( balancerUrl ) ; String protocol = protocolMatcher . matches ( ) ? "" : protocolMatcher . group ( 1 ) ; String parsedUrl = String . format ( "%s%s" , protocol , balancerUrl ) ; if ( ! Strings . isNullOrEmpty ( applicationKey ) ) { // CAUSE : Prefer String . format...
public class GelfMessageBuilder { /** * Add an additional field . * @ param key the key * @ param value the value * @ return GelfMessageBuilder */ public GelfMessageBuilder withField ( String key , String value ) { } }
this . additionalFields . put ( key , value ) ; return this ;
public class ClientSocketFactory { /** * Close the client */ public void close ( ) { } }
synchronized ( this ) { if ( _state == State . CLOSED ) return ; _state = State . CLOSED ; } synchronized ( this ) { _idleHead = _idleTail = 0 ; } for ( int i = 0 ; i < _idle . length ; i ++ ) { ClientSocket stream ; synchronized ( this ) { stream = _idle [ i ] ; _idle [ i ] = null ; } if ( stream != null ) stream . cl...
public class HmacSignatureBuilder { /** * 判断期望摘要是否与已构建的摘要相等 . * @ param expectedSignature * 传入的期望摘要 * @ param builderMode * 采用的构建模式 * @ return < code > true < / code > - 期望摘要与已构建的摘要相等 ; < code > false < / code > - * 期望摘要与已构建的摘要不相等 * @ author zhd * @ since 1.0.0 */ public boolean isHashEquals ( byte [ ] ...
final byte [ ] signature = build ( builderMode ) ; return MessageDigest . isEqual ( signature , expectedSignature ) ;
public class GrapesClient { /** * Post a module to the server * @ param module * @ param user * @ param password * @ throws GrapesCommunicationException * @ throws javax . naming . AuthenticationException */ public void postModule ( final Module module , final String user , final String password ) throws Grap...
final Client client = getClient ( user , password ) ; final WebResource resource = client . resource ( serverURL ) . path ( RequestUtils . moduleResourcePath ( ) ) ; final ClientResponse response = resource . type ( MediaType . APPLICATION_JSON ) . post ( ClientResponse . class , module ) ; client . destroy ( ) ; if ( ...
public class ReflectUtils { /** * Strip enhancer class . * @ param c * the c * @ return the class */ public static Class < ? > stripEnhancerClass ( Class < ? > c ) { } }
String className = c . getName ( ) ; // strip CGLIB from name int enhancedIndex = className . indexOf ( "$$EnhancerByCGLIB" ) ; if ( enhancedIndex != - 1 ) { className = className . substring ( 0 , enhancedIndex ) ; } if ( className . equals ( c . getName ( ) ) ) { return c ; } else { c = classForName ( className , c ....
public class StatementDMQL { /** * Returns true if the specified exprColumn index is in the list of column indices specified by groupIndex * @ return true / false */ static boolean isGroupByColumn ( QuerySpecification select , int index ) { } }
if ( ! select . isGrouped ) { return false ; } for ( int ii = 0 ; ii < select . groupIndex . getColumnCount ( ) ; ii ++ ) { if ( index == select . groupIndex . getColumns ( ) [ ii ] ) { return true ; } } return false ;
public class RelationalOperationsMatrix { /** * with the interior of Line B . */ private void exteriorAreaInteriorLine_ ( int half_edge , int id_a ) { } }
if ( m_matrix [ MatrixPredicate . ExteriorInterior ] == 1 ) return ; int faceParentage = m_topo_graph . getHalfEdgeFaceParentage ( half_edge ) ; int twinFaceParentage = m_topo_graph . getHalfEdgeFaceParentage ( m_topo_graph . getHalfEdgeTwin ( half_edge ) ) ; if ( ( faceParentage & id_a ) == 0 && ( twinFaceParentage & ...
public class SimpleDateFormat { /** * Formats a single field , given its pattern character . Subclasses may * override this method in order to modify or add formatting * capabilities . * @ param ch the pattern character * @ param count the number of times ch is repeated in the pattern * @ param beginOffset th...
// Note : formatData is ignored return subFormat ( ch , count , beginOffset , 0 , DisplayContext . CAPITALIZATION_NONE , pos , cal ) ;
public class AmazonApiGatewayClient { /** * Adds a < a > MethodResponse < / a > to an existing < a > Method < / a > resource . * @ param putMethodResponseRequest * Request to add a < a > MethodResponse < / a > to an existing < a > Method < / a > resource . * @ return Result of the PutMethodResponse operation retu...
request = beforeClientExecution ( request ) ; return executePutMethodResponse ( request ) ;
public class CronEntry { /** * - - - - - static methods - - - - - */ public static CronEntry parse ( String task , String expression ) { } }
String [ ] fields = expression . split ( "[ \\t]+" ) ; if ( fields . length == CronService . NUM_FIELDS ) { CronEntry cronEntry = new CronEntry ( task ) ; String secondsField = fields [ 0 ] ; String minutesField = fields [ 1 ] ; String hoursField = fields [ 2 ] ; String daysField = fields [ 3 ] ; String monthsField = f...
public class AbstractProject { /** * Gets the directory where the module is checked out . * @ return * null if the workspace is on an agent that ' s not connected . * @ deprecated as of 1.319 * To support concurrent builds of the same project , this method is moved to { @ link AbstractBuild } . * For backward...
AbstractBuild b = getBuildForDeprecatedMethods ( ) ; return b != null ? b . getWorkspace ( ) : null ;
public class ProcessGroovyMethods { /** * Executes the command specified by < code > self < / code > with environment defined by < code > envp < / code > * and under the working directory < code > dir < / code > . * < p > For more control over Process construction you can use * < code > java . lang . ProcessBuild...
return Runtime . getRuntime ( ) . exec ( self , envp , dir ) ;
public class Tuple3i { /** * { @ inheritDoc } */ @ Override public void negate ( T t1 ) { } }
this . x = - t1 . ix ( ) ; this . y = - t1 . iy ( ) ; this . z = - t1 . iz ( ) ;
public class tmglobal_binding { /** * Use this API to fetch a tmglobal _ binding resource . */ public static tmglobal_binding get ( nitro_service service ) throws Exception { } }
tmglobal_binding obj = new tmglobal_binding ( ) ; tmglobal_binding response = ( tmglobal_binding ) obj . get_resource ( service ) ; return response ;
public class SmartBinder { /** * Cast the incoming arguments to the types in the given signature . The * argument count must match , but the names in the target signature are * ignored . * @ param target the Signature to which arguments should be cast * @ return a new SmartBinder with the cast applied */ public...
return new SmartBinder ( target , binder . cast ( target . type ( ) ) ) ;
public class UpdateIntegrationRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( UpdateIntegrationRequest updateIntegrationRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( updateIntegrationRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateIntegrationRequest . getRestApiId ( ) , RESTAPIID_BINDING ) ; protocolMarshaller . marshall ( updateIntegrationRequest . getResourceId ( ) , RESOURCEID_BI...
public class StoreConfig { /** * Creates a new instance of StoreConfig . * @ param filePath - the < code > config . properties < / code > file or the directory containing < code > config . properties < / code > * @ return a new instance of StoreConfig * @ throws IOException * @ throws InvalidStoreConfigExceptio...
File homeDir ; Properties p = new Properties ( ) ; if ( filePath . exists ( ) ) { if ( filePath . isDirectory ( ) ) { homeDir = filePath ; File propertiesFile = new File ( filePath , CONFIG_PROPERTIES_FILE ) ; if ( propertiesFile . exists ( ) ) { FileReader reader = new FileReader ( propertiesFile ) ; p . load ( reader...
public class CompressedWritable { /** * Must be called by all methods which access fields to ensure that the data * has been uncompressed . */ protected void ensureInflated ( ) { } }
if ( compressed != null ) { try { ByteArrayInputStream deflated = new ByteArrayInputStream ( compressed ) ; DataInput inflater = new DataInputStream ( new InflaterInputStream ( deflated ) ) ; readFieldsCompressed ( inflater ) ; compressed = null ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } }
public class ElementBox { /** * Loads background images from style . Considers their positions , repetition , etc . Currently , only a single background * image is supported ( CSS2 ) . * @ param style the style containing the image specifiations * @ return a list of images */ protected Vector < BackgroundImage > ...
CSSProperty . BackgroundImage img = style . getProperty ( "background-image" ) ; if ( img == CSSProperty . BackgroundImage . uri ) { try { Vector < BackgroundImage > bgimages = new Vector < BackgroundImage > ( 1 ) ; TermURI urlstring = style . getValue ( TermURI . class , "background-image" ) ; URL url = DataURLHandler...
public class AbstractJpaStorage { /** * Gets a count of the number of rows that would be returned by the search . * @ param criteria * @ param entityManager * @ param type */ protected < T > int executeCountQuery ( SearchCriteriaBean criteria , EntityManager entityManager , Class < T > type ) { } }
CriteriaBuilder builder = entityManager . getCriteriaBuilder ( ) ; CriteriaQuery < Long > countQuery = builder . createQuery ( Long . class ) ; Root < T > from = countQuery . from ( type ) ; countQuery . select ( builder . count ( from ) ) ; applySearchCriteriaToQuery ( criteria , builder , countQuery , from , true ) ;...
public class AbstractMetric { /** * { @ inheritDoc } */ @ Override public double getValue ( final U u ) { } }
if ( metricPerUser . containsKey ( u ) ) { return metricPerUser . get ( u ) ; } return Double . NaN ;
public class CollectionUtils { /** * Returns a { @ link Map } mapping each unique element in the given * { @ link Collection } to an { @ link Integer } representing the number * of occurrences of that element in the { @ link Collection } . * Only those elements present in the collection will appear as * keys in...
Map count = new HashMap ( ) ; for ( Iterator it = coll . iterator ( ) ; it . hasNext ( ) ; ) { Object obj = it . next ( ) ; Integer c = ( Integer ) ( count . get ( obj ) ) ; if ( c == null ) { count . put ( obj , INTEGER_ONE ) ; } else { count . put ( obj , new Integer ( c . intValue ( ) + 1 ) ) ; } } return count ;
public class MapUtil { /** * 新建一个HashMap * @ param < K > Key类型 * @ param < V > Value类型 * @ param size 初始大小 , 由于默认负载因子0.75 , 传入的size会实际初始大小为size / 0.75 * @ return HashMap对象 */ public static < K , V > HashMap < K , V > newHashMap ( int size ) { } }
return newHashMap ( size , false ) ;
public class CommercePriceEntryUtil { /** * Returns a range of all the commerce price entries where companyId = & # 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 , they are indexes i...
return getPersistence ( ) . findByCompanyId ( companyId , start , end ) ;
public class ZKStoreHelper { /** * region curator client store access */ CompletableFuture < Void > deletePath ( final String path , final boolean deleteEmptyContainer ) { } }
final CompletableFuture < Void > result = new CompletableFuture < > ( ) ; final CompletableFuture < Void > deleteNode = new CompletableFuture < > ( ) ; try { client . delete ( ) . inBackground ( callback ( event -> deleteNode . complete ( null ) , e -> { if ( e instanceof StoreException . DataNotFoundException ) { // d...
public class PreferencesFxPresenter { /** * { @ inheritDoc } */ @ Override public void setupEventHandlers ( ) { } }
// As the scene is null here , listen to scene changes and make sure // that when the window is closed , the settings are saved beforehand . preferencesFxView . sceneProperty ( ) . addListener ( ( observable , oldScene , newScene ) -> { LOGGER . trace ( "new Scene: " + newScene ) ; if ( newScene != null ) { LOGGER . tr...
public class LoggerWrapper { /** * Form a DOM node textual representation recursively * @ param node * @ param tablevel * @ return */ private String domNodeDescription ( Node node , int tablevel ) { } }
String domNodeDescription = null ; String nodeName = node . getNodeName ( ) ; String nodeValue = node . getNodeValue ( ) ; if ( ! ( nodeName . equals ( "#text" ) && nodeValue . replaceAll ( "\n" , "" ) . trim ( ) . equals ( "" ) ) ) { domNodeDescription = tabs ( tablevel ) + node . getNodeName ( ) + "\n" ; NamedNodeMap...
public class KerasAtrousConvolution1D { /** * Get layer output type . * @ param inputType Array of InputTypes * @ return output type as InputType * @ throws InvalidKerasConfigurationException Invalid Keras config */ @ Override public InputType getOutputType ( InputType ... inputType ) throws InvalidKerasConfigura...
if ( inputType . length > 1 ) throw new InvalidKerasConfigurationException ( "Keras Convolution layer accepts only one input (received " + inputType . length + ")" ) ; return this . getAtrousConvolution1D ( ) . getOutputType ( - 1 , inputType [ 0 ] ) ;
public class AdminDictStopwordsAction { @ Execute public HtmlResponse index ( final SearchForm form ) { } }
validate ( form , messages -> { } , ( ) -> asDictIndexHtml ( ) ) ; stopwordsPager . clear ( ) ; return asHtml ( path_AdminDictStopwords_AdminDictStopwordsJsp ) . renderWith ( data -> { searchPaging ( data , form ) ; } ) ;
public class DefaultSourceValidatableBindingBuilder { /** * { @ inheritDoc } */ public ConvertableBindingBuilder < S , S , V > checking ( Validator < ? super S , ? extends V > sourceValidator ) { } }
return new DefaultConvertableBindingBuilder < S , S , V > ( getSource ( ) , sourceValidator , getConverter ( ) , getCallback ( ) ) ;
public class ImageModerationsImpl { /** * Fuzzily match an image against one of your custom Image Lists . You can create and manage your custom image lists using & lt ; a href = " / docs / services / 578ff44d2703741568569ab9 / operations / 578ff7b12703741568569abe " & gt ; this & lt ; / a & gt ; API . * Returns ID an...
if ( this . client . baseUrl ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.baseUrl() is required and cannot be null." ) ; } String parameterizedHost = Joiner . on ( ", " ) . join ( "{baseUrl}" , this . client . baseUrl ( ) ) ; return service . matchMethod ( listId , cacheImage , this . cli...
public class vpnsessionpolicy { /** * Use this API to update vpnsessionpolicy . */ public static base_response update ( nitro_service client , vpnsessionpolicy resource ) throws Exception { } }
vpnsessionpolicy updateresource = new vpnsessionpolicy ( ) ; updateresource . name = resource . name ; updateresource . rule = resource . rule ; updateresource . action = resource . action ; return updateresource . update_resource ( client ) ;
public class JcrSession { /** * Obtain the { @ link Node JCR Node } object for the cached node and cache instance * @ param cachedNode the cached node ; may not be null * @ param cache the cache where { @ code cachedNode } resides ; may not be null * @ param expectedType the expected implementation type for the n...
assert cachedNode != null ; NodeKey nodeKey = cachedNode . getKey ( ) ; AbstractJcrNode node = jcrNodes . get ( nodeKey ) ; boolean mightBeShared = true ; if ( node == null ) { if ( expectedType == null ) { Name primaryType = cachedNode . getPrimaryType ( cache ) ; expectedType = Type . typeForPrimaryType ( primaryType...
public class DataStorage { /** * recoverTransitionRead for a specific Name Space * @ param datanode DataNode * @ param namespaceId name space Id * @ param nsInfo Namespace info of namenode corresponding to the Name Space * @ param dataDirs Storage directories * @ param startOpt startup option * @ throws IOE...
// First ensure datanode level format / snapshot / rollback is completed // recoverTransitionRead ( datanode , nsInfo , dataDirs , startOpt ) ; // Create list of storage directories for the Name Space Collection < File > nsDataDirs = new ArrayList < File > ( ) ; for ( Iterator < File > it = dataDirs . iterator ( ) ; it...
public class ListPoliciesGrantingServiceAccessResult { /** * A < code > ListPoliciesGrantingServiceAccess < / code > object that contains details about the permissions policies * attached to the specified identity ( user , group , or role ) . * @ param policiesGrantingServiceAccess * A < code > ListPoliciesGranti...
if ( policiesGrantingServiceAccess == null ) { this . policiesGrantingServiceAccess = null ; return ; } this . policiesGrantingServiceAccess = new com . amazonaws . internal . SdkInternalList < ListPoliciesGrantingServiceAccessEntry > ( policiesGrantingServiceAccess ) ;
public class PyOutputConfigurationProvider { /** * $ NON - NLS - 1 $ */ @ Override public Set < OutputConfiguration > getOutputConfigurations ( ) { } }
final OutputConfiguration pythonOutput = new OutputConfiguration ( OUTPUT_CONFIGURATION_NAME ) ; pythonOutput . setDescription ( Messages . PyOutputConfigurationProvider_0 ) ; pythonOutput . setOutputDirectory ( OUTPUT_FOLDER ) ; pythonOutput . setOverrideExistingResources ( true ) ; pythonOutput . setCreateOutputDirec...
public class BasicBinder { /** * Register a particular binding configuration entry . * @ param theBinding The entry to be registered * @ param < S > The Source type for the binding * @ param < T > The Target type for the binding */ protected < S , T > void registerBindingConfigurationEntry ( BindingConfigurationE...
/* * BindingConfigurationEntry has two possible configurations : * bindingClass with an optional qualifier ( this defaults to DefaultBinding ) * OR * sourceClass and * targetClass and * optional qualifier ( defaults to DefaultBinding ) * with at least one of either * toMethod and / or * fromMethod and /...
public class Totp { /** * Verifier - To be used only on the server side * Taken from Google Authenticator with small modifications from * < a href = " http : / / code . google . com / p / google - authenticator / source / browse / src / com / google / android / apps / authenticator / PasscodeGenerator . java ? repo...
long code = Long . parseLong ( otp ) ; long currentInterval = clock . getCurrentInterval ( ) ; int pastResponse = Math . max ( DELAY_WINDOW , 0 ) ; for ( int i = pastResponse ; i >= 0 ; -- i ) { int candidate = generate ( this . secret , currentInterval - i ) ; if ( candidate == code ) { return true ; } } return false ...
public class Gild { /** * Adds a service proxy to this harness . @ param serviceName the name of the * service @ param proxy the service proxy @ return this harness */ public Gild with ( final String serviceName , final ServiceProxy proxy ) { } }
proxies . put ( serviceName , proxy ) ; return this ;
public class HttpClient { /** * Makes an OPTIONS request to the given URL * @ param url String URL * @ return HttpClient * @ throws HelloSignException thrown if the URL is invalid */ public HttpClient options ( String url ) throws HelloSignException { } }
request = new HttpOptionsRequest ( url ) ; request . execute ( ) ; return this ;
public class Compiler { /** * Compile an extension function . * @ param opPos The current position in the m _ opMap array . * @ return reference to { @ link org . apache . xpath . functions . FuncExtFunction } instance . * @ throws TransformerException if a error occurs creating the Expression . */ private Expres...
int endExtFunc = opPos + getOp ( opPos + 1 ) - 1 ; opPos = getFirstChildPos ( opPos ) ; java . lang . String ns = ( java . lang . String ) getTokenQueue ( ) . elementAt ( getOp ( opPos ) ) ; opPos ++ ; java . lang . String funcName = ( java . lang . String ) getTokenQueue ( ) . elementAt ( getOp ( opPos ) ) ; opPos ++ ...
public class JavaButton { /** * Initialize class fields . */ public void init ( ScreenLocation itsLocation , BasePanel parentScreen , Converter fieldConverter , int sDisplayFieldDesc ) { } }
m_classInfo = null ; super . init ( itsLocation , parentScreen , fieldConverter , sDisplayFieldDesc , "" , "Print Java" , MenuConstants . PRINT , null , null ) ;
public class WarningSystem { /** * Sends a warning to the current service . */ public static void sendCurrentWarning ( Object source , Throwable e ) { } }
WarningSystem warning = getCurrent ( ) ; if ( warning != null ) warning . sendWarning ( source , e ) ; else { e . printStackTrace ( ) ; log . log ( Level . WARNING , e . toString ( ) , e ) ; }
public class Util { /** * Forward commands from the input to the specified { @ link ExecutionControl } * instance , then responses back on the output . * @ param ec the direct instance of { @ link ExecutionControl } to process commands * @ param in the command input * @ param out the command response output */ ...
new ExecutionControlForwarder ( ec , in , out ) . commandLoop ( ) ;
public class RegionBackendServiceClient { /** * Retrieves the list of regional BackendService resources available to the specified project in * the given region . * < p > Sample code : * < pre > < code > * try ( RegionBackendServiceClient regionBackendServiceClient = RegionBackendServiceClient . create ( ) ) { ...
ListRegionBackendServicesHttpRequest request = ListRegionBackendServicesHttpRequest . newBuilder ( ) . setRegion ( region == null ? null : region . toString ( ) ) . build ( ) ; return listRegionBackendServices ( request ) ;
public class MatrixFeatures_DDRM { /** * Checks to see if a matrix is skew symmetric with in tolerance : < br > * < br > * - A = A < sup > T < / sup > < br > * or < br > * | a < sub > ij < / sub > + a < sub > ji < / sub > | & le ; tol * @ param A The matrix being tested . * @ param tol Tolerance for being s...
if ( A . numCols != A . numRows ) return false ; for ( int i = 0 ; i < A . numRows ; i ++ ) { for ( int j = 0 ; j < i ; j ++ ) { double a = A . get ( i , j ) ; double b = A . get ( j , i ) ; double diff = Math . abs ( a + b ) ; if ( ! ( diff <= tol ) ) { return false ; } } } return true ;
public class AbstractTerminal { /** * Call this method when the terminal has been resized or the initial size of the terminal has been discovered . It * will trigger all resize listeners , but only if the size has changed from before . * @ param newSize Last discovered terminal size */ protected synchronized void o...
if ( lastKnownSize == null || ! lastKnownSize . equals ( newSize ) ) { lastKnownSize = newSize ; for ( TerminalResizeListener resizeListener : resizeListeners ) { resizeListener . onResized ( this , lastKnownSize ) ; } }
public class Metric { /** * Creates a { @ link Metric } . * @ param metricDescriptor the { @ link MetricDescriptor } . * @ param timeSeries the single { @ link TimeSeries } for this metric . * @ return a { @ code Metric } . * @ since 0.17 */ public static Metric createWithOneTimeSeries ( MetricDescriptor metric...
return createInternal ( metricDescriptor , Collections . singletonList ( Utils . checkNotNull ( timeSeries , "timeSeries" ) ) ) ;
public class ScenarioImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case BpsimPackage . SCENARIO__SCENARIO_PARAMETERS : setScenarioParameters ( ( ScenarioParameters ) newValue ) ; return ; case BpsimPackage . SCENARIO__ELEMENT_PARAMETERS : getElementParameters ( ) . clear ( ) ; getElementParameters ( ) . addAll ( ( Collection < ? extends ElementParameters > ) new...