signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class AuthFilter { /** * Authenticates a user if required . * @ param request The HTTP request . * @ param response The HTTP response . * @ param chain The filter chain to execute . * @ throws IOException If an I / O error occurs . * @ throws ServletException If an unknown error occurs . */ @ Override ...
String user = null ; if ( HttpServletRequest . class . isAssignableFrom ( request . getClass ( ) ) ) { HttpServletRequest req = HttpServletRequest . class . cast ( request ) ; String authorizationHeader = req . getHeader ( HttpHeaders . AUTHORIZATION ) ; // Only perform authentication check for endpoints that require i...
public class GetTokenApi { /** * HuaweiApiClient 连接结果回调 * @ param rst 结果码 * @ param client HuaweiApiClient 实例 */ @ Override public void onConnect ( int rst , HuaweiApiClient client ) { } }
if ( client == null || ! ApiClientMgr . INST . isConnect ( client ) ) { HMSAgentLog . e ( "client not connted" ) ; onPushTokenResult ( rst , null ) ; return ; } PendingResult < TokenResult > tokenResult = HuaweiPush . HuaweiPushApi . getToken ( client ) ; tokenResult . setResultCallback ( new ResultCallback < TokenResu...
public class Polarizability { /** * Method which assigns the polarizabilitiyFactors . * @ param atomContainer AtomContainer * @ param atom Atom * @ return double polarizabilitiyFactor */ private double getKJPolarizabilityFactor ( IAtomContainer atomContainer , IAtom atom ) { } }
double polarizabilitiyFactor = 0 ; String AtomSymbol ; AtomSymbol = atom . getSymbol ( ) ; switch ( AtomSymbol ) { case "H" : polarizabilitiyFactor = 0.387 ; break ; case "C" : if ( atom . getFlag ( CDKConstants . ISAROMATIC ) ) { polarizabilitiyFactor = 1.230 ; } else if ( atomContainer . getMaximumBondOrder ( atom ) ...
public class CPDefinitionPersistenceImpl { /** * Removes the cp definition where companyId = & # 63 ; and externalReferenceCode = & # 63 ; from the database . * @ param companyId the company ID * @ param externalReferenceCode the external reference code * @ return the cp definition that was removed */ @ Override ...
CPDefinition cpDefinition = findByC_ERC ( companyId , externalReferenceCode ) ; return remove ( cpDefinition ) ;
public class Context { /** * Initialize the Audit4j instance . This will ensure the single audit4j * instance and single Configuration repository load in to the memory . */ final static void init ( ) { } }
StopWatch stopWatch = new StopWatch ( ) ; stopWatch . start ( "Audit4jInit" ) ; if ( configContext == null ) { configContext = new ConcurrentConfigurationContext ( ) ; } if ( lifeCycle . getStatus ( ) . equals ( RunStatus . READY ) || lifeCycle . getStatus ( ) . equals ( RunStatus . STOPPED ) ) { Audit4jBanner banner =...
public class JKMessage { public String getLabel ( JKLocale locale , final String key , final Object ... params ) { } }
if ( key == null || key . trim ( ) . equals ( "" ) ) { return "" ; } String newKey = JKCollectionUtil . fixPropertyKey ( key ) ; Properties prop = getLables ( locale ) ; if ( prop . containsValue ( newKey ) ) { // to avoid calling the values as keys return newKey ; } String value = prop . getProperty ( newKey ) ; // Sy...
public class Stylesheet { /** * Set an " xsl : template " property . * @ see < a href = " http : / / www . w3 . org / TR / xslt # section - Defining - Template - Rules " > section - Defining - Template - Rules in XSLT Specification < / a > * @ param v ElemTemplate to add to list of templates */ public void setTempl...
if ( null == m_templates ) m_templates = new Vector ( ) ; m_templates . addElement ( v ) ; v . setStylesheet ( this ) ;
public class ProfileHandler { /** * Pushes everything available in the JSON object returned by the Facebook GraphRequest * @ param graphUser The object returned from Facebook * @ deprecated use { @ link CleverTapAPI # pushFacebookUser ( JSONObject graphUser ) } */ @ Deprecated public void pushFacebookUser ( final J...
CleverTapAPI cleverTapAPI = weakReference . get ( ) ; if ( cleverTapAPI == null ) { Logger . d ( "CleverTap Instance is null." ) ; } else { cleverTapAPI . pushFacebookUser ( graphUser ) ; }
public class AWSDeviceFarmClient { /** * Returns a list of offering promotions . Each offering promotion record contains the ID and description of the * promotion . The API returns a < code > NotEligible < / code > error if the caller is not permitted to invoke the * operation . Contact < a href = " mailto : aws - ...
request = beforeClientExecution ( request ) ; return executeListOfferingPromotions ( request ) ;
public class AtomTetrahedralLigandPlacer3D { /** * Gets the spatproduct of three vectors . * @ param a vector a * @ param b vector b * @ param c vector c * @ return double value of the spatproduct */ public double getSpatproduct ( Vector3d a , Vector3d b , Vector3d c ) { } }
return ( c . x * ( b . y * a . z - b . z * a . y ) + c . y * ( b . z * a . x - b . x * a . z ) + c . z * ( b . x * a . y - b . y * a . x ) ) ;
public class OgmLoader { /** * Execute the physical query and initialize the various entities and collections * @ param session the session * @ param qp the query parameters * @ param ogmLoadingContext the loading context * @ param returnProxies when { @ code true } , get an existing proxy for each collection e...
// TODO support lock timeout int entitySpan = entityPersisters . length ; final List < Object > hydratedObjects = entitySpan == 0 ? null : new ArrayList < Object > ( entitySpan * 10 ) ; // TODO yuk ! Is there a cleaner way to access the id ? final Serializable id ; // see if we use batching first // then look for direc...
public class EsaResourceImpl { /** * Uses the required features information to calculate a list of queries * stored as Strings that can be searched upon later * Input the list of required features information to convert into the query * Returns the list of queries ( Strings ) */ private Collection < String > crea...
Collection < String > query = null ; Collection < String > requiredFeatures = getRequireFeature ( ) ; if ( requiredFeatures != null ) { query = new ArrayList < String > ( ) ; for ( String required : requiredFeatures ) { String temp = "wlpInformation.provideFeature=" + required ; String version = findVersion ( ) ; if ( ...
public class PipelineApi { /** * Get a list of pipelines in a project in the specified page range . * < pre > < code > GitLab Endpoint : GET / projects / : id / pipelines < / code > < / pre > * @ param projectIdOrPath the project in the form of an Integer ( ID ) , String ( path ) , or Project instance * @ param p...
Response response = get ( Response . Status . OK , getPageQueryParams ( page , perPage ) , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "pipelines" ) ; return ( response . readEntity ( new GenericType < List < Pipeline > > ( ) { } ) ) ;
public class SSLUtils { /** * This method is called for tracing in various places . It returns a string that * represents all the buffers in the array including hashcode , position , limit , and capacity . * @ param buffers array of buffers to get debug info on * @ return string representing the buffer array */ p...
if ( null == buffers ) { return "Null buffer array" ; } StringBuilder sb = new StringBuilder ( 32 + ( 64 * buffers . length ) ) ; for ( int i = 0 ; i < buffers . length ; i ++ ) { sb . append ( "\r\n\t Buffer [" ) ; sb . append ( i ) ; sb . append ( "]: " ) ; getBufferTraceInfo ( sb , buffers [ i ] ) ; } return sb . t...
public class NettyRSocketServerFactory { /** * Add { @ link ServerRSocketFactoryCustomizer } s that should applied while building the * server . * @ param serverCustomizers the customizers to add */ public void addServerCustomizers ( ServerRSocketFactoryCustomizer ... serverCustomizers ) { } }
Assert . notNull ( serverCustomizers , "ServerCustomizer must not be null" ) ; this . serverCustomizers . addAll ( Arrays . asList ( serverCustomizers ) ) ;
public class SLF4JLogFactory { /** * Return an array containing the names of all currently defined configuration * attributes . If there are no such attributes , a zero length array is * returned . */ @ SuppressWarnings ( "unchecked" ) public String [ ] getAttributeNames ( ) { } }
List < String > names = new ArrayList < String > ( ) ; Enumeration < String > keys = attributes . keys ( ) ; while ( keys . hasMoreElements ( ) ) { names . add ( ( String ) keys . nextElement ( ) ) ; } String results [ ] = new String [ names . size ( ) ] ; for ( int i = 0 ; i < results . length ; i ++ ) { results [ i ]...
public class AbstractLinkType { /** * { @ inheritDoc } */ @ Override public Object readValue ( final Attribute _attribute , final List < Object > _objectList ) throws EFapsException { } }
final List < Object > list = new ArrayList < Object > ( ) ; Object temp = null ; for ( final Object object : _objectList ) { if ( object instanceof Object [ ] ) { final List < Object > list2 = new ArrayList < Object > ( ) ; Object temp2 = null ; for ( final Object object2 : ( Object [ ] ) object ) { // Oracle database ...
public class AmazonMQClient { /** * Updates the specified configuration . * @ param updateConfigurationRequest * Updates the specified configuration . * @ return Result of the UpdateConfiguration operation returned by the service . * @ throws NotFoundException * HTTP Status Code 404 : Resource not found due t...
request = beforeClientExecution ( request ) ; return executeUpdateConfiguration ( request ) ;
public class ValueURLIOHelper { /** * Extracts the content of the given { @ link ValueData } and links the data to * the { @ link URL } in the Value Storage if needed * @ param plugin the plug - in that will manage the storage of the provided { @ link ValueData } * @ param value the value from which we want to ex...
if ( value . isByteArray ( ) ) { return new ByteArrayInputStream ( value . getAsByteArray ( ) ) ; } else if ( value instanceof StreamPersistedValueData ) { StreamPersistedValueData streamed = ( StreamPersistedValueData ) value ; if ( ! streamed . isPersisted ( ) ) { InputStream stream ; // the Value not yet persisted ,...
public class ResolvableType { /** * Return a { @ link ResolvableType } array representing the direct interfaces implemented by this type . If this type does not * implement any interfaces an empty array is returned . * @ see # getSuperType ( ) */ public ResolvableType [ ] getInterfaces ( ) { } }
Class < ? > resolved = resolve ( ) ; Object [ ] array = resolved . getGenericInterfaces ( ) ; if ( resolved == null || ( array == null || array . length == 0 ) ) { return EMPTY_TYPES_ARRAY ; } if ( this . interfaces == null ) { this . interfaces = forTypes ( TypeWrapper . forGenericInterfaces ( resolved ) , asVariableR...
public class InterProcessMultiLock { /** * { @ inheritDoc } * < p > NOTE : locks are released in the reverse order that they were acquired . < / p > */ @ Override public synchronized void release ( ) throws Exception { } }
Exception baseException = null ; for ( InterProcessLock lock : reverse ( locks ) ) { try { lock . release ( ) ; } catch ( Exception e ) { ThreadUtils . checkInterrupted ( e ) ; if ( baseException == null ) { baseException = e ; } else { baseException = new Exception ( baseException ) ; } } } if ( baseException != null ...
public class CharEscapeUtil { /** * / * Same as " _ writeString2 ( ) " , except needs additional escaping * for subset of characters */ private void _writeStringCustom ( final int len ) throws IOException , JsonGenerationException { } }
// And then we ' ll need to verify need for escaping etc : int end = _outputTail + len ; final int [ ] escCodes = _outputEscapes ; final int maxNonEscaped = ( _maximumNonEscapedChar < 1 ) ? 0xFFFF : _maximumNonEscapedChar ; final int escLimit = Math . min ( escCodes . length , maxNonEscaped + 1 ) ; int escCode = 0 ; fi...
public class DefaultGroovyMethods { /** * Drops the given number of key / value pairs from the head of this map if they are available . * < pre class = " groovyTestCase " > * def strings = [ ' a ' : 10 , ' b ' : 20 , ' c ' : 30 ] * assert strings . drop ( 0 ) = = [ ' a ' : 10 , ' b ' : 20 , ' c ' : 30 ] * asser...
if ( self . size ( ) <= num ) { return createSimilarMap ( self ) ; } if ( num == 0 ) { return cloneSimilarMap ( self ) ; } Map < K , V > ret = createSimilarMap ( self ) ; for ( K key : self . keySet ( ) ) { if ( num -- <= 0 ) { ret . put ( key , self . get ( key ) ) ; } } return ret ;
public class MpMessages { /** * 预览图片消息 * @ param wxName * @ param openId * @ param wxcard * @ return */ public long cardPreview ( String wxName , String openId , String wxcard ) { } }
return preview ( wxName , openId , "wxcard" , wxcard ) ;
public class IotHubResourcesInner { /** * Create or update the metadata of an IoT hub . * Create or update the metadata of an Iot hub . The usual pattern to modify a property is to retrieve the IoT hub metadata and security metadata , and then combine them with the modified values in a new body to update the IoT hub ...
return beginCreateOrUpdateWithServiceResponseAsync ( resourceGroupName , resourceName , iotHubDescription , ifMatch ) . toBlocking ( ) . single ( ) . body ( ) ;
public class StartPipelineReprocessingRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( StartPipelineReprocessingRequest startPipelineReprocessingRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( startPipelineReprocessingRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( startPipelineReprocessingRequest . getPipelineName ( ) , PIPELINENAME_BINDING ) ; protocolMarshaller . marshall ( startPipelineReprocessingRequest . get...
public class FileUtil { /** * create specified directory if doesn ' t exist . */ public static void mkdir ( File dir ) throws IOException { } }
if ( ! dir . exists ( ) && ! dir . mkdir ( ) ) throw new IOException ( "couldn't create directory: " + dir ) ;
public class StorageCommand { /** * Runs doctor storage command . * @ return 0 on success , 1 otherwise */ public int run ( ) throws IOException { } }
List < WorkerLostStorageInfo > workerLostStorageList = mBlockMasterClient . getWorkerLostStorage ( ) ; if ( workerLostStorageList . size ( ) == 0 ) { mPrintStream . println ( "All worker storage paths are in working state." ) ; return 0 ; } for ( WorkerLostStorageInfo info : workerLostStorageList ) { Map < String , Sto...
public class GQ { /** * Create an instance of a JsonBuilder object whose type is < T > * and set the the underlying properties object . */ public static < T extends JsonBuilder > T create ( Class < T > clz , IsProperties obj ) { } }
T ret = create ( clz ) ; ret . load ( obj . getDataImpl ( ) ) ; return ret ;
public class BaseDTO { /** * 构建系统异常对象 , status为500 , msg为用户传入参数 * @ param msg 异常消息 * @ param < T > 数据类型 * @ return 系统异常对象 */ public static < T > BaseDTO < T > buildError ( String msg ) { } }
BaseDTO < T > dto = new BaseDTO < > ( ) ; dto . setStatus ( "500" ) ; dto . setMessage ( msg ) ; return dto ;
public class ApkBuilder { /** * Returns the key and certificate from a given debug store . * It is expected that the store password is ' android ' and the key alias and password are * ' androiddebugkey ' and ' android ' respectively . * @ param storeOsPath the OS path to the debug store . * @ param verboseStrea...
try { if ( storeOsPath != null ) { File storeFile = new File ( storeOsPath ) ; try { checkInputFile ( storeFile ) ; } catch ( FileNotFoundException e ) { // ignore these since the debug store can be created on the fly anyway . } // get the debug key if ( verboseStream != null ) { verboseStream . println ( String . form...
public class CategoryGraph { /** * This parameter is already set in the constructor as it is needed for computation of relatedness values . * Therefore its computation does not trigger setGraphParameters ( it is too slow ) , even if the depth is implicitly determined there , too . * @ return The depth of the catego...
int max = 0 ; for ( List < Integer > path : getRootPathMap ( ) . values ( ) ) { if ( path . size ( ) > max ) { max = path . size ( ) ; } } max = max - 1 ; // depth is measured in nodes , not edges if ( max < 0 ) { return 0 ; } else { return max ; }
public class VecPaired { /** * This method is used assuming multiple VecPaired are used together . The * implementation of the vector may have logic to handle the case that * the other vector is of the same type . This will go through every layer * of VecPaired to return the final base vector . * @ param b a Ve...
while ( b instanceof VecPaired ) b = ( ( VecPaired ) b ) . getVector ( ) ; return b ;
public class TZDBTimeZoneNames { /** * / * ( non - Javadoc ) * @ see android . icu . text . TimeZoneNames # find ( java . lang . CharSequence , int , java . util . EnumSet ) */ @ Override public Collection < MatchInfo > find ( CharSequence text , int start , EnumSet < NameType > nameTypes ) { } }
if ( text == null || text . length ( ) == 0 || start < 0 || start >= text . length ( ) ) { throw new IllegalArgumentException ( "bad input text or range" ) ; } prepareFind ( ) ; TZDBNameSearchHandler handler = new TZDBNameSearchHandler ( nameTypes , getTargetRegion ( ) ) ; TZDB_NAMES_TRIE . find ( text , start , handle...
public class CmsResourceUtil { /** * Returns the id of the project which the resource belongs to . < p > * @ return the id of the project which the resource belongs to */ public CmsUUID getProjectId ( ) { } }
CmsUUID projectId = m_resource . getProjectLastModified ( ) ; if ( ! getLock ( ) . isUnlocked ( ) && ! getLock ( ) . isInherited ( ) ) { // use lock project ID only if lock is not inherited projectId = getLock ( ) . getProjectId ( ) ; } return projectId ;
public class Switch { /** * Color of the left hand side of the switch . Legal values : ' primary ' , * ' info ' , ' success ' , ' warning ' , ' danger ' , ' default ' . Default value : * ' primary ' . * @ return Returns the value of the attribute , or null , if it hasn ' t been * set by the JSF file . */ public...
String value = ( String ) getStateHelper ( ) . eval ( PropertyKeys . onColor ) ; return value ;
public class Utils { /** * Expands all nodes in a JTree . * @ param tree The JTree to expand . * @ param depth The depth to which the tree should be expanded . Zero * will just expand the root node , a negative value will * fully expand the tree , and a positive value will * recursively expand the tree to tha...
javax . swing . tree . TreeModel model = tree . getModel ( ) ; collapseJTreeNode ( tree , model , model . getRoot ( ) , 0 , depth ) ;
public class ChatApi { /** * Send a message * Send a message to participants in the specified chat . * @ param id The ID of the chat interaction . ( required ) * @ param acceptData Request parameters . ( optional ) * @ return ApiResponse & lt ; ApiSuccessResponse & gt ; * @ throws ApiException If fail to call...
com . squareup . okhttp . Call call = sendMessageValidateBeforeCall ( id , acceptData , null , null ) ; Type localVarReturnType = new TypeToken < ApiSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class TrivialSwap { /** * Swap the elements of two arrays at the specified positions . * @ param < E > the type of elements in this array . * @ param array1 one of the arrays that will have one of its values swapped . * @ param array1Index the index of the first array that will be swapped . * @ param arr...
if ( array1 [ array1Index ] != array2 [ array2Index ] ) { E hold = array1 [ array1Index ] ; array1 [ array1Index ] = array2 [ array2Index ] ; array2 [ array2Index ] = hold ; }
public class CountCumSum { /** * Do cum sum within the partition */ public void cumSumWithinPartition ( ) { } }
// Accumulator to get the max of the cumulative sum in each partition final Accumulator < Counter < Integer > > maxPerPartitionAcc = sc . accumulator ( new Counter < Integer > ( ) , new MaxPerPartitionAccumulator ( ) ) ; // Partition mapping to fold within partition foldWithinPartitionRDD = sentenceCountRDD . mapPartit...
public class ObjectFactory2 { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link WasEndedBy } { @ code > } } */ @ XmlElementDecl ( namespace = "http://www.w3.org/ns/prov#" , name = "wasEndedBy" ) public JAXBElement < WasEndedBy > createWasEndedBy ( WasEndedBy value ) { } }
return new JAXBElement < WasEndedBy > ( _WasEndedBy_QNAME , WasEndedBy . class , null , value ) ;
public class DatasourceTemplate { /** * A { @ link RowMapper } that returns the object contained in the first field . */ public < T > RowMapper < T > getSingleColumnRowMapper ( Class < T > requiredType ) { } }
return new RowMapper < T > ( ) { @ Override public T map ( ResultSet rs ) throws SQLException { return ( T ) rs . getObject ( 1 ) ; } } ;
public class StreamUtils { /** * Convert a { @ link Path } to a { @ link String } and make sure it is properly formatted to be recognized as a directory * by { @ link TarArchiveEntry } . */ private static String formatPathToDir ( Path path ) { } }
return path . toString ( ) . endsWith ( Path . SEPARATOR ) ? path . toString ( ) : path . toString ( ) + Path . SEPARATOR ;
public class RequiredPropertiesUtil { /** * Throws a ConstraintViolationException if the model does not contain all required server - managed triples for a * container . * @ param model rdf to validate * @ throws ConstraintViolationException if model does not contain all required server - managed triples for cont...
assertContainsRequiredProperties ( model , REQUIRED_PROPERTIES ) ; assertContainsRequiredTypes ( model , CONTAINER_TYPES ) ;
public class MetadataHandler { /** * Fetch the metadata for a Schema by its full internal classname , e . g . " hex . schemas . DeepLearningV2 . DeepLearningParametersV2 " . TODO : Do we still need this ? */ @ Deprecated @ SuppressWarnings ( "unused" ) // called through reflection by RequestServer public MetadataV3 fet...
docs . schemas = new SchemaMetadataV3 [ 1 ] ; // NOTE : this will throw an exception if the classname isn ' t found : SchemaMetadataV3 meta = new SchemaMetadataV3 ( SchemaMetadata . createSchemaMetadata ( docs . classname ) ) ; docs . schemas [ 0 ] = meta ; return docs ;
public class JmsAdapter { /** * The method overrides the one in the super class to perform * JMS specific functions . */ @ Override protected void closeConnection ( Object connection ) { } }
try { if ( qSession != null ) qSession . close ( ) ; if ( qConnection != null ) qConnection . close ( ) ; } catch ( Exception e ) { } qSession = null ; qConnection = null ;
public class CPDefinitionPersistenceImpl { /** * Returns all the cp definitions where CProductId = & # 63 ; and status = & # 63 ; . * @ param CProductId the c product ID * @ param status the status * @ return the matching cp definitions */ @ Override public List < CPDefinition > findByC_S ( long CProductId , int ...
return findByC_S ( CProductId , status , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ;
public class CmsPublishSelectPanel { /** * Sets the publish groups . < p > * @ param groups the list of publish groups * @ param newData true if the data is new * @ param defaultWorkflow the default workflow id */ protected void setGroups ( List < CmsPublishGroup > groups , boolean newData , String defaultWorkflo...
m_model = new CmsPublishDataModel ( groups , this ) ; m_model . setSelectionChangeAction ( new Runnable ( ) { public void run ( ) { onChangePublishSelection ( ) ; } } ) ; m_currentGroupIndex = 0 ; m_currentGroupPanel = null ; m_problemsPanel . clear ( ) ; if ( newData ) { m_showProblemsOnly = false ; m_checkboxProblems...
public class CmsAttributeComparisonList { /** * Returns either the historical file or the offline file , depending on the version number . < p > * @ param cms the CmsObject to use * @ param structureId the structure id of the file * @ param version the historical version number * @ return either the historical ...
if ( Integer . parseInt ( version ) == CmsHistoryResourceHandler . PROJECT_OFFLINE_VERSION ) { // offline CmsResource resource = cms . readResource ( structureId , CmsResourceFilter . IGNORE_EXPIRATION ) ; return cms . readFile ( resource ) ; } else { int ver = Integer . parseInt ( version ) ; if ( ver < 0 ) { // onlin...
public class StringUtils { /** * Prepends the prefix to the start of the string if the string does not * already start , case insensitive , with any of the prefixes . * < pre > * StringUtils . prependIfMissingIgnoreCase ( null , null ) = null * StringUtils . prependIfMissingIgnoreCase ( " abc " , null ) = " abc...
return prependIfMissing ( str , prefix , true , prefixes ) ;
public class HttpMethodInfo { /** * Calls { @ link BodyConsumer # finished ( HttpResponder ) } method . The current bodyConsumer will be set to { @ code null } * after the call . */ private void bodyConsumerFinish ( ) { } }
BodyConsumer consumer = bodyConsumer ; bodyConsumer = null ; try { consumer . finished ( responder ) ; } catch ( Throwable t ) { exceptionHandler . handle ( t , request , responder ) ; }
public class CPDefinitionOptionRelLocalServiceBaseImpl { /** * Deletes the cp definition option rel with the primary key from the database . Also notifies the appropriate model listeners . * @ param CPDefinitionOptionRelId the primary key of the cp definition option rel * @ return the cp definition option rel that ...
return cpDefinitionOptionRelPersistence . remove ( CPDefinitionOptionRelId ) ;
public class LoggerLevelFilter { /** * Checks the log level of the event against the effective log level of the Logger referenced in the event . * @ param event the event * @ return Returns " NEUTRAL " if the event level is greater than or equal to the loggers effective log level , " DENY " * otherwise . */ @ Ove...
LoggerContext loggerFactory = ( LoggerContext ) LoggerFactory . getILoggerFactory ( ) ; Logger logger = loggerFactory . getLogger ( event . getLoggerName ( ) ) ; if ( event . getLevel ( ) . isGreaterOrEqual ( logger . getEffectiveLevel ( ) ) ) return FilterReply . NEUTRAL ; return FilterReply . DENY ;
public class HtmlEscape { /** * Perform a ( configurable ) HTML < strong > escape < / strong > operation on a < tt > char [ ] < / tt > input . * This method will perform an escape operation according to the specified * { @ link org . unbescape . html . HtmlEscapeType } and { @ link org . unbescape . html . HtmlEsca...
if ( writer == null ) { throw new IllegalArgumentException ( "Argument 'writer' cannot be null" ) ; } if ( type == null ) { throw new IllegalArgumentException ( "The 'type' argument cannot be null" ) ; } if ( level == null ) { throw new IllegalArgumentException ( "The 'level' argument cannot be null" ) ; } final int te...
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcMotorConnectionType ( ) { } }
if ( ifcMotorConnectionTypeEClass == null ) { ifcMotorConnectionTypeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 324 ) ; } return ifcMotorConnectionTypeEClass ;
public class ns_conf_upgrade_history { /** * Use this API to fetch filtered set of ns _ conf _ upgrade _ history resources . * filter string should be in JSON format . eg : " vm _ state : DOWN , name : [ a - z ] + " */ public static ns_conf_upgrade_history [ ] get_filtered ( nitro_service service , String filter ) th...
ns_conf_upgrade_history obj = new ns_conf_upgrade_history ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; ns_conf_upgrade_history [ ] response = ( ns_conf_upgrade_history [ ] ) obj . getfiltered ( service , option ) ; return response ;
public class SqlFunctionUtils { /** * Returns the string str right - padded with the string pad to a length of len characters . * If str is longer than len , the return value is shortened to len characters . */ public static String rpad ( String base , int len , String pad ) { } }
if ( len < 0 || "" . equals ( pad ) ) { return null ; } else if ( len == 0 ) { return "" ; } char [ ] data = new char [ len ] ; char [ ] baseChars = base . toCharArray ( ) ; char [ ] padChars = pad . toCharArray ( ) ; int pos = 0 ; // copy the base while ( pos < base . length ( ) && pos < len ) { data [ pos ] = baseCha...
public class AmazonECRClient { /** * Describes image repositories in a registry . * @ param describeRepositoriesRequest * @ return Result of the DescribeRepositories operation returned by the service . * @ throws ServerException * These errors are usually caused by a server - side issue . * @ throws InvalidPa...
request = beforeClientExecution ( request ) ; return executeDescribeRepositories ( request ) ;
public class DiagnosticsInner { /** * Get site detector response . * Get site detector response . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param siteName Site Name * @ param detectorName Detector Resource Name * @ param slot Slot Name * @ throws IllegalArgum...
return getSiteDetectorResponseSlotWithServiceResponseAsync ( resourceGroupName , siteName , detectorName , slot ) . toBlocking ( ) . single ( ) . body ( ) ;
public class FieldCoordinates { /** * Creates new field coordinates * @ param parentType the container of the field * @ param fieldDefinition the field definition * @ return new field coordinates represented by the two parameters */ public static FieldCoordinates coordinates ( GraphQLFieldsContainer parentType , ...
return new FieldCoordinates ( parentType . getName ( ) , fieldDefinition . getName ( ) ) ;
public class ResourceBindingImpl { /** * Returns the binding listener name . This method can only be called * if { @ link # bindingListener } is non - null . */ public String getBindingListenerName ( ) { } }
ServiceReference < ? > ref = bindingListener . getServiceReference ( ) ; Object serviceDescription = ref . getProperty ( Constants . SERVICE_DESCRIPTION ) ; if ( serviceDescription instanceof String ) { return ( String ) serviceDescription ; } return bindingListener . getService ( ) . getClass ( ) . getName ( ) + " (" ...
public class ConfigLoader { /** * Loads properties from property { @ link File } , if provided . Calling this method only has effect on new Email and Mailer instances after this . * @ param filename Any file reference that holds a properties list . * @ param addProperties Flag to indicate if the new properties shou...
try { return loadProperties ( new FileInputStream ( filename ) , addProperties ) ; } catch ( final FileNotFoundException e ) { throw new IllegalStateException ( "error reading properties file from File" , e ) ; }
public class ToSolidMap { /** * Returns a function that converts a stream of { @ link Pair } into { @ link SolidMap } . */ public static < K , V > Func1 < Iterable < Pair < K , V > > , SolidMap < K , V > > pairsToSolidMap ( ) { } }
return new Func1 < Iterable < Pair < K , V > > , SolidMap < K , V > > ( ) { @ Override public SolidMap < K , V > call ( Iterable < Pair < K , V > > iterable ) { return new SolidMap < > ( iterable ) ; } } ;
public class Base32 { /** * Encodes the given bytes into a base - 32 string , inserting dashes after * every 6 characters of output . * @ param in * the bytes to encode . * @ return The formatted base - 32 string , or null if { @ code in } is null . */ public static String encodeWithDashes ( byte [ ] in ) { } }
if ( in == null ) { return null ; } return encodeWithDashes ( in , 0 , in . length ) ;
public class CmsCommentImages { /** * Returns the initialized image scaler object used to generate thumbnails for the dialog form . < p > * @ return the initialized image scaler object used to generate thumbnails for the dialog form */ protected CmsImageScaler getImageScaler ( ) { } }
if ( m_imageScaler == null ) { // not initialized , create image scaler with default settings m_imageScaler = new CmsImageScaler ( ) ; m_imageScaler . setWidth ( THUMB_WIDTH ) ; m_imageScaler . setHeight ( THUMB_HEIGHT ) ; m_imageScaler . setRenderMode ( Simapi . RENDER_SPEED ) ; m_imageScaler . setColor ( new Color ( ...
public class TsdbQuery { /** * Identify the table to be scanned based on the roll up and pre - aggregate * query parameters * @ return table name as byte array * @ since 2.4 */ private byte [ ] tableToBeScanned ( ) { } }
final byte [ ] tableName ; if ( RollupQuery . isValidQuery ( rollup_query ) ) { if ( pre_aggregate ) { tableName = rollup_query . getRollupInterval ( ) . getGroupbyTable ( ) ; } else { tableName = rollup_query . getRollupInterval ( ) . getTemporalTable ( ) ; } } else if ( pre_aggregate ) { tableName = tsdb . getDefault...
public class CmsSpellcheckDictionaryIndexer { /** * Returns whether the Solr spellchecking index directories are empty * ( not initiliazed ) or not . * @ return true , if the directories contain no indexed data , otherwise false . */ private static boolean isSolrSpellcheckIndexDirectoryEmpty ( ) { } }
final File path = new File ( getSolrSpellcheckRfsPath ( ) ) ; final File [ ] directories = path . listFiles ( SPELLCHECKING_DIRECTORY_NAME_FILTER ) ; // Each directory that has been created by Solr but hasn ' t been indexed yet // contains exactly two files . If there are more files , at least one index has // already ...
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link CRSRefType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link CRSRefType } { @ code > } */ @ XmlEle...
return new JAXBElement < CRSRefType > ( _CrsRef_QNAME , CRSRefType . class , null , value ) ;
public class CmsPositionBean { /** * Returns over which area of this the given position is . Will return < code > null < / code > if the provided position is not within this position . < p > * @ param absLeft the left position * @ param absTop the right position * @ param offset the border offset * @ return the...
if ( isOverElement ( absLeft , absTop ) ) { if ( absLeft < ( m_left + 10 ) ) { // left border if ( absTop < ( m_top + offset ) ) { // top left corner return Area . CORNER_TOP_LEFT ; } else if ( absTop > ( ( m_top + m_height ) - offset ) ) { // bottom left corner return Area . CORNER_BOTTOM_LEFT ; } return Area . BORDER...
public class NonBlockingProperties { /** * Create { @ link NonBlockingProperties } from an existing { @ link Properties } * object . * @ param aProperties * Source properties . May be < code > null < / code > . * @ return The newly created { @ link NonBlockingProperties } . Never * < code > null < / code > . ...
final NonBlockingProperties ret = new NonBlockingProperties ( ) ; if ( aProperties != null ) for ( final Map . Entry < ? , ? > aEntry : aProperties . entrySet ( ) ) ret . put ( ( String ) aEntry . getKey ( ) , ( String ) aEntry . getValue ( ) ) ; return ret ;
public class MappedByteBuffer { /** * of the mapping . Computed each time to avoid storing in every direct buffer . */ private long mappingOffset ( ) { } }
int ps = Bits . pageSize ( ) ; long offset = address % ps ; return ( offset >= 0 ) ? offset : ( ps + offset ) ;
public class Strings { /** * Determines whether the specified strings contains the specified string , ignoring case considerations . * @ param string the specified string * @ param strings the specified strings * @ return { @ code true } if the specified strings contains the specified string , ignoring case consi...
if ( null == strings ) { return false ; } return Arrays . stream ( strings ) . anyMatch ( str -> StringUtils . equalsIgnoreCase ( string , str ) ) ;
public class DynamoDBExecutor { @ SuppressWarnings ( "rawtypes" ) public Stream < Map < String , Object > > stream ( final QueryRequest queryRequest ) { } }
return ( Stream ) stream ( Map . class , queryRequest ) ;
public class GuildController { /** * Kicks the { @ link net . dv8tion . jda . core . entities . Member Member } specified by the userId from the from the { @ link net . dv8tion . jda . core . entities . Guild Guild } . * < p > < b > Note : < / b > { @ link net . dv8tion . jda . core . entities . Guild # getMembers ( ...
Member member = getGuild ( ) . getMemberById ( userId ) ; Checks . check ( member != null , "The provided userId does not correspond to a member in this guild! Provided userId: %s" , userId ) ; return kick ( member , reason ) ;
public class SendGrid { /** * Attempt an API call . This method executes the API call asynchronously * on an internal thread pool . If the call is rate limited , the thread * will retry up to the maximum configured time . * @ param request the API request . */ public void attempt ( Request request ) { } }
this . attempt ( request , new APICallback ( ) { @ Override public void error ( Exception ex ) { } public void response ( Response r ) { } } ) ;
public class StringUtils { /** * Performs the logic for the { @ code splitByWholeSeparatorPreserveAllTokens } methods . * @ param str the String to parse , may be { @ code null } * @ param separator String containing the String to be used as a delimiter , * { @ code null } splits on whitespace * @ param max the...
if ( str == null ) { return null ; } final int len = str . length ( ) ; if ( len == 0 ) { return ArrayUtils . EMPTY_STRING_ARRAY ; } if ( separator == null || EMPTY . equals ( separator ) ) { // Split on whitespace . return splitWorker ( str , null , max , preserveAllTokens ) ; } final int separatorLength = separator ....
public class VectorFieldTypeInformation { /** * Constructor for a type request with dimensionality constraints . * @ param cls Class constraint * @ param mindim Minimum dimensionality * @ param maxdim Maximum dimensionality * @ param < V > vector type */ public static < V extends FeatureVector < ? > > VectorFie...
return new VectorFieldTypeInformation < > ( cls , mindim , maxdim ) ;
public class CmsUploadProgressInfo { /** * Returns the file text . < p > * @ return the file text */ private String getFileText ( ) { } }
if ( m_orderedFilenamesToUpload . size ( ) > 1 ) { return Messages . get ( ) . key ( Messages . GUI_UPLOAD_FILES_PLURAL_0 ) ; } else { return Messages . get ( ) . key ( Messages . GUI_UPLOAD_FILES_SINGULAR_0 ) ; }
public class HtmlDocWriter { /** * Print the frameset version of the Html file header . * Called only when generating an HTML frameset file . * @ param title Title of this HTML document * @ param noTimeStamp If true , don ' t print time stamp in header * @ param frameset the frameset to be added to the HTML doc...
Content htmlDocType = DocType . FRAMESET ; Content htmlComment = new Comment ( configuration . getText ( "doclet.New_Page" ) ) ; Content head = new HtmlTree ( HtmlTag . HEAD ) ; head . addContent ( getGeneratedBy ( ! noTimeStamp ) ) ; if ( configuration . charset . length ( ) > 0 ) { Content meta = HtmlTree . META ( "C...
public class DynamicRegistrationBean { /** * Set init - parameters for this registration . Calling this method will replace any * existing init - parameters . * @ param initParameters the init parameters * @ see # getInitParameters * @ see # addInitParameter */ public void setInitParameters ( Map < String , Str...
Assert . notNull ( initParameters , "InitParameters must not be null" ) ; this . initParameters = new LinkedHashMap < > ( initParameters ) ;
public class ConfigurationUtils { /** * Fetches a value specified by key * @ param map XPP3 map equivalent * @ param key navigation key * @ param basedir basedir can be different from current basedir * @ param defaultValue Default value if no such key exists * @ return File representation of the value */ stat...
String value = valueAsString ( map , key , null ) ; if ( Validate . isNullOrEmpty ( value ) ) { return defaultValue ; } File candidate = new File ( value ) ; if ( ! candidate . isAbsolute ( ) && ( basedir != null && basedir . exists ( ) ) ) { return new File ( basedir , candidate . getPath ( ) ) ; } return candidate ;
public class ConnectionImpl { /** * ( non - Javadoc ) * @ see com . ibm . ws . sib . msgstore . transactions . TransactionCallback # afterCompletion ( com . ibm . ws . sib . msgstore . Transaction , boolean ) */ @ Override public void afterCompletion ( TransactionCommon transaction , boolean committed ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "afterCompletion" , new Object [ ] { transaction , Boolean . valueOf ( committed ) } ) ; synchronized ( this ) { // If the connection is already closed this transaction // will have been removed . if ( ! _closed ) { synchron...
public class PeriodCounterFactory { /** * compteur custom */ Counter getCustomCounter ( Range range ) { } }
assert range . getPeriod ( ) == null ; final Counter customCounter = createPeriodCounter ( "yyyy-MM-dd" , range . getStartDate ( ) ) ; addRequestsAndErrorsForRange ( customCounter , range ) ; return customCounter ;
public class NodeTypeDefinitionAccessProvider { /** * Read node NodeDefinitionData [ ] of node type * @ param nodeData * @ return * @ throws RepositoryException * @ throws NodeTypeReadException * @ throws RepositoryException */ public NodeDefinitionData [ ] readNodeDefinitions ( NodeData nodeData ) throws Nod...
InternalQName name = null ; List < NodeDefinitionData > nodeDefinitionDataList ; List < NodeData > childDefinitions = dataManager . getChildNodesData ( nodeData ) ; if ( childDefinitions . size ( ) > 0 ) name = readMandatoryName ( nodeData , null , Constants . JCR_NODETYPENAME ) ; else return new NodeDefinitionData [ 0...
public class FormatterResolver { /** * キャッシュに初期値データを登録する 。 * ・ ロケールによって切り替わるフォーマットや 、 間違った組み込みフォーマットの場合を登録しておく 。 */ public synchronized void registerDefaultFormat ( ) { } }
final Locale [ ] availableLocales = new Locale [ ] { Locale . JAPANESE } ; // 組み込み書式の登録 for ( int i = 0 ; i <= 58 ; i ++ ) { final CellFormatter formatter = createDefaultFormatter ( String . valueOf ( i ) , availableLocales ) ; if ( formatter != null ) { registerFormatter ( ( short ) i , formatter ) ; } } // 特別な書式 fina...
public class ContextItems { /** * Sets a context item value . * @ param itemName Item name . * @ param value The value to set . The value ' s class must have an associated context serializer * registered for it . */ public void setItem ( String itemName , Object value ) { } }
if ( value == null ) { setItem ( itemName , ( String ) null ) ; } else { @ SuppressWarnings ( "unchecked" ) ISerializer < Object > contextSerializer = ( ISerializer < Object > ) ContextSerializerRegistry . getInstance ( ) . get ( value . getClass ( ) ) ; if ( contextSerializer == null ) { throw new ContextException ( "...
public class DefaultTopologyScheduler { /** * TODO : problematic : some dead slots have been freed * @ param context topology assign context */ protected void freeUsed ( TopologyAssignContext context ) { } }
Set < Integer > canFree = new HashSet < > ( ) ; canFree . addAll ( context . getAllTaskIds ( ) ) ; canFree . removeAll ( context . getUnstoppedTaskIds ( ) ) ; Map < String , SupervisorInfo > cluster = context . getCluster ( ) ; Assignment oldAssigns = context . getOldAssignment ( ) ; for ( Integer task : canFree ) { Re...
public class MCP3424GpioProvider { /** * This method will perform an immediate data acquisition directly to the ADC chip to get the requested pin ' s input * conversion value . * @ param pin requested input pin to acquire conversion value * @ return conversion value for requested analog input pin * @ throws IOE...
// Pin address to read from to device int command = ( configuration & 0x9F ) | ( pin . getAddress ( ) << 5 ) ; device . write ( ( byte ) command ) ; // Write configuration to device double rate = 0.0 ; byte data [ ] = null ; switch ( configuration & 0x0C ) { case 0x00 : { data = new byte [ 3 ] ; rate = 176.0 /* 240.0 *...
public class SchemaManager { /** * Checks class and disk for class definition . * @ param cls * @ param node * @ return Class definition , may return null if no definition is found . */ private ZooClassDef locateClassDefinition ( Class < ? > cls , Node node ) { } }
ZooClassDef def = cache . getSchema ( cls , node ) ; if ( def == null || def . jdoZooIsDeleted ( ) ) { return null ; } return def ;
public class TransactionalUniqueIndex { /** * for int indicies : */ public Object get ( int indexValue ) { } }
Object result = null ; TransactionLocalStorage txStorage = ( TransactionLocalStorage ) perTransactionStorage . get ( MithraManagerProvider . getMithraManager ( ) . zGetCurrentTransactionWithNoCheck ( ) ) ; Index perThreadAdded = txStorage == null ? null : txStorage . added ; if ( perThreadAdded != null ) { result = per...
public class UIUtils { /** * helper method to set the background depending on the android version * @ param v * @ param d */ @ Deprecated @ SuppressLint ( "NewApi" ) public static void setBackground ( View v , Drawable d ) { } }
ViewCompat . setBackground ( v , d ) ;
public class Classfile { /** * Get the byte offset within the buffer of a string from the constant pool , or 0 for a null string . * @ param cpIdx * the constant pool index * @ param subFieldIdx * should be 0 for CONSTANT _ Utf8 , CONSTANT _ Class and CONSTANT _ String , and for * CONSTANT _ NameAndType _ inf...
if ( cpIdx < 1 || cpIdx >= cpCount ) { throw new ClassfileFormatException ( "Constant pool index " + cpIdx + ", should be in range [1, " + ( cpCount - 1 ) + "] -- cannot continue reading class. " + "Please report this at https://github.com/classgraph/classgraph/issues" ) ; } final int t = entryTag [ cpIdx ] ; if ( ( t ...
public class JCusparse { /** * Description : This routine converts a sparse matrix in CSC storage format * to a dense matrix . */ public static int cusparseScsc2dense ( cusparseHandle handle , int m , int n , cusparseMatDescr descrA , Pointer cscSortedValA , Pointer cscSortedRowIndA , Pointer cscSortedColPtrA , Point...
return checkResult ( cusparseScsc2denseNative ( handle , m , n , descrA , cscSortedValA , cscSortedRowIndA , cscSortedColPtrA , A , lda ) ) ;
public class Bivariate { /** * Calculates BivariateMatrix for a given statistic * @ param dataSet * @ param type * @ return */ private static DataTable2D bivariateMatrix ( Dataframe dataSet , BivariateType type ) { } }
DataTable2D bivariateMatrix = new DataTable2D ( ) ; // extract values of first variable Map < Object , TypeInference . DataType > columnTypes = dataSet . getXDataTypes ( ) ; Object [ ] allVariables = columnTypes . keySet ( ) . toArray ( ) ; int numberOfVariables = allVariables . length ; TransposeDataList transposeData...
public class LineReader { /** * Also closes the LineReader . */ public Collection < String > collect ( Collection < String > result ) throws IOException { } }
String line ; while ( true ) { line = next ( ) ; if ( line == null ) { close ( ) ; return result ; } result . add ( line ) ; }
public class BaseScriptPlugin { /** * Create the command array for the data context . * @ param dataContext data * @ return arglist */ protected ExecArgList createScriptArgsList ( final Map < String , Map < String , String > > dataContext ) { } }
final ScriptPluginProvider plugin = getProvider ( ) ; final File scriptfile = plugin . getScriptFile ( ) ; final String scriptargs = null != plugin . getScriptArgs ( ) ? DataContextUtils . replaceDataReferencesInString ( plugin . getScriptArgs ( ) , dataContext ) : null ; final String [ ] scriptargsarr = null != plugin...
public class UnitizingAnnotationStudy { /** * Utility method for moving on the cursor of the given iterator until * a unit of the specified rater and category is returned . Both * the rater index and the category may be null if those filter * conditions are to be ignored . */ public static IUnitizingAnnotationUni...
while ( units . hasNext ( ) ) { IUnitizingAnnotationUnit result = units . next ( ) ; if ( category != null && ! category . equals ( result . getCategory ( ) ) ) { continue ; } if ( raterIdx < 0 || result . getRaterIdx ( ) == raterIdx ) { return result ; } } return null ;
public class Transcoding { /** * / * rb _ transcoding _ convert */ EConvResult convert ( byte [ ] in , Ptr inPtr , int inStop , byte [ ] out , Ptr outPtr , int outStop , int flags ) { } }
return transcodeRestartable ( in , inPtr , inStop , out , outPtr , outStop , flags ) ;
public class AbilityUtils { /** * A " best - effort " boolean stating whether the update is a super - group message or not . * @ param update a Telegram { @ link Update } * @ return whether the update is linked to a group */ public static boolean isSuperGroupUpdate ( Update update ) { } }
if ( MESSAGE . test ( update ) ) { return update . getMessage ( ) . isSuperGroupMessage ( ) ; } else if ( CALLBACK_QUERY . test ( update ) ) { return update . getCallbackQuery ( ) . getMessage ( ) . isSuperGroupMessage ( ) ; } else if ( CHANNEL_POST . test ( update ) ) { return update . getChannelPost ( ) . isSuperGrou...
public class AmazonIdentityManagementClient { /** * After you generate a user , group , role , or policy report using the * < code > GenerateServiceLastAccessedDetails < / code > operation , you can use the < code > JobId < / code > parameter in * < code > GetServiceLastAccessedDetails < / code > . This operation r...
request = beforeClientExecution ( request ) ; return executeGetServiceLastAccessedDetails ( request ) ;