signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class ClusterManagerMetrics { /** * Create a map of session status - > metrics .
* @ return the map . */
private Map < SessionStatus , MetricsTimeVaryingInt > createSessionStatusToMetricsMap ( ) { } } | Map < SessionStatus , MetricsTimeVaryingInt > m = new HashMap < SessionStatus , MetricsTimeVaryingInt > ( ) ; for ( SessionStatus endState : SESSION_END_STATES ) { String name = endState . toString ( ) . toLowerCase ( ) + "_sessions" ; m . put ( endState , new MetricsTimeVaryingInt ( name , registry ) ) ; } return m ; |
public class CmsStringUtil { /** * Returns < code > true < / code > if the provided Objects are either both < code > null < / code >
* or equal according to { @ link Object # equals ( Object ) } . < p >
* @ param value1 the first object to compare
* @ param value2 the second object to compare
* @ return < code ... | if ( value1 == null ) { return ( value2 == null ) ; } return value1 . equals ( value2 ) ; |
public class GenericGenerators { /** * Generates instructions for a try - catch block .
* @ param tryCatchBlockNode try catch block node to populate to with label with relevant information
* @ param exceptionType exception type to catch ( { @ code null } means catch any exception )
* @ param tryInsnList instructi... | Validate . notNull ( tryInsnList ) ; // exceptionType can be null
Validate . notNull ( catchInsnList ) ; if ( exceptionType != null ) { Validate . isTrue ( exceptionType . getSort ( ) == Type . OBJECT ) ; } InsnList ret = new InsnList ( ) ; LabelNode tryLabelNode = new LabelNode ( ) ; LabelNode catchLabelNode = new Lab... |
public class StateMachine { /** * Add a valid transition from one state to one or more states */
public StateMachine < T > withTransition ( T from , T to , T ... moreTo ) { } } | transitions . put ( from , EnumSet . of ( to , moreTo ) ) ; return this ; |
public class WaveformFinder { /** * Ask the specified player for the waveform preview in the specified slot with the specified rekordbox ID ,
* using cached media instead if it is available , and possibly giving up if we are in passive mode .
* @ param trackReference uniquely identifies the desired waveform preview... | // First check if we are using cached data for this slot
MetadataCache cache = MetadataFinder . getInstance ( ) . getMetadataCache ( SlotReference . getSlotReference ( trackReference ) ) ; if ( cache != null ) { return cache . getWaveformPreview ( null , trackReference ) ; } // Then see if any registered metadata provi... |
public class ServerLogReaderPreTransactional { /** * Reads from the edit log until it reaches an operation which can
* be considered a namespace notification ( like FILE _ ADDED , FILE _ CLOSED
* or NODE _ DELETED ) .
* @ return the notification object or null if nothing is to be returned
* at the moment .
* ... | FSEditLogOp op = null ; NamespaceNotification notification = null ; // Keep looping until we reach an operation that can be
// considered a notification .
while ( true ) { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "edits.size=" + editsFile . length ( ) + " editsNew.size=" + editsNewFile . length ( ) ) ; } try { o... |
public class ManualDescriptor { /** * indexed setter for meSHList - sets an indexed value - A collection of objects of type uima . julielab . uima . MeSHHeading , O
* @ generated
* @ param i index in the array to set
* @ param v value to set into the array */
public void setMeSHList ( int i , MeshHeading v ) { } ... | if ( ManualDescriptor_Type . featOkTst && ( ( ManualDescriptor_Type ) jcasType ) . casFeat_meSHList == null ) jcasType . jcas . throwFeatMissing ( "meSHList" , "de.julielab.jules.types.pubmed.ManualDescriptor" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ManualDescriptor_Type... |
public class KamStoreServiceImpl { /** * { @ inheritDoc } */
@ Override public List < Kam > getCatalog ( ) throws KamStoreServiceException { } } | List < Kam > list = new ArrayList < Kam > ( ) ; try { for ( KamInfo kamInfo : kamCatalogDao . getCatalog ( ) ) { list . add ( convert ( kamInfo ) ) ; } } catch ( SQLException e ) { logger . warn ( e . getMessage ( ) ) ; throw new KamStoreServiceException ( e . getMessage ( ) ) ; } return list ; |
public class IntVector { /** * Removes the first occurrence of the argument from this vector .
* If the object is found in this vector , each component in the vector
* with an index greater or equal to the object ' s index is shifted
* downward to have an index one smaller than the value it had
* previously .
... | for ( int i = 0 ; i < m_firstFree ; i ++ ) { if ( m_map [ i ] == s ) { if ( ( i + 1 ) < m_firstFree ) System . arraycopy ( m_map , i + 1 , m_map , i - 1 , m_firstFree - i ) ; else m_map [ i ] = java . lang . Integer . MIN_VALUE ; m_firstFree -- ; return true ; } } return false ; |
public class ReuseOracle { /** * Filters all the query elements corresponding to " reflexive " edges in the reuse tree , executes the shorter query ,
* and fills the filtered outputs into the resulting output word .
* @ param query
* the input query with " reflexive " symbols ( may be a suffix of the original que... | final LinkedList < I > filteredQueryList = new LinkedList < > ( query . asList ( ) ) ; final Iterator < I > queryIterator = filteredQueryList . iterator ( ) ; // filter " reflexive " edges
for ( final O outputSymbol : partialOutput ) { queryIterator . next ( ) ; if ( outputSymbol != null ) { queryIterator . remove ( ) ... |
public class Boot { /** * NOTE : This method cannot be run from jar */
public static void main ( Class main , String [ ] args , String [ ] packageNamesToWeave ) throws Exception { } } | for ( String packageName : packageNamesToWeave ) { weavePackage ( packageName ) ; } ArrayList < String > l = new ArrayList < String > ( Arrays . asList ( args ) ) ; l . add ( 0 , "-mainClass" ) ; l . add ( 1 , main . getName ( ) ) ; _init . boot2 ( l . toArray ( new String [ 0 ] ) ) ; |
public class HudsonPrivateSecurityRealm { /** * Creates a user account . Requires { @ link Jenkins # ADMINISTER } */
@ Restricted ( NoExternalUse . class ) public User createAccountByAdmin ( StaplerRequest req , StaplerResponse rsp , String addUserView , String successView ) throws IOException , ServletException { } } | checkPermission ( Jenkins . ADMINISTER ) ; User u = createAccount ( req , rsp , false , addUserView ) ; if ( u != null && successView != null ) { rsp . sendRedirect ( successView ) ; } return u ; |
public class CellUtil { /** * 设置单元格值 < br >
* 根据传入的styleSet自动匹配样式 < br >
* 当为头部样式时默认赋值头部样式 , 但是头部中如果有数字 、 日期等类型 , 将按照数字 、 日期样式设置
* @ param cell 单元格
* @ param value 值
* @ param styleSet 单元格样式集 , 包括日期等样式
* @ param isHeader 是否为标题单元格 */
public static void setCellValue ( Cell cell , Object value , StyleSet style... | final CellStyle headCellStyle = styleSet . getHeadCellStyle ( ) ; final CellStyle cellStyle = styleSet . getCellStyle ( ) ; if ( isHeader && null != headCellStyle ) { cell . setCellStyle ( headCellStyle ) ; } else if ( null != cellStyle ) { cell . setCellStyle ( cellStyle ) ; } if ( null == value ) { cell . setCellValu... |
public class Bootstrap2FieldAttrProcessor { /** * { @ inheritDoc } */
@ Override protected void addAttributesToInputElement ( Element element , String fieldName ) { } } | element . setAttribute ( StandardDialect . PREFIX + ":" + AbstractSpringFieldAttrProcessor . ATTR_NAME , "*{" + fieldName + "}" ) ; |
public class FileUtils { /** * Copy file a file from one location to another .
* @ param in Source file
* @ param out Target file
* @ throws IOException if any error occurred . */
public static void copyFile ( File in , File out ) throws IOException { } } | FileChannel inChannel = new FileInputStream ( in ) . getChannel ( ) ; FileChannel outChannel = new FileOutputStream ( out ) . getChannel ( ) ; try { inChannel . transferTo ( 0 , inChannel . size ( ) , outChannel ) ; } catch ( IOException e ) { throw e ; } finally { if ( inChannel != null ) { inChannel . close ( ) ; } i... |
public class KeyrefPaser { /** * Write alt element
* @ param srcElem element content */
private void writeAlt ( Element srcElem ) throws SAXException { } } | final AttributesImpl atts = new AttributesImpl ( ) ; XMLUtils . addOrSetAttribute ( atts , ATTRIBUTE_NAME_CLASS , TOPIC_ALT . toString ( ) ) ; getContentHandler ( ) . startElement ( NULL_NS_URI , TOPIC_ALT . localName , TOPIC_ALT . localName , atts ) ; domToSax ( srcElem , false ) ; getContentHandler ( ) . endElement (... |
public class JsonObject { /** * Returns the property value as object .
* @ param property
* the property
* @ return the value as entity */
public JsonObject getAsObject ( String property ) { } } | if ( ! super . has ( property ) ) { super . set ( property , new JsonValue ( new JsonObject ( ) ) , false ) ; } return get ( property ) . getAsObject ( ) ; |
public class Site { /** * Create a native VoltDB execution engine */
ExecutionEngine initializeEE ( ) { } } | String hostname = CoreUtils . getHostnameOrAddress ( ) ; HashinatorConfig hashinatorConfig = TheHashinator . getCurrentConfig ( ) ; ExecutionEngine eeTemp = null ; Deployment deploy = m_context . cluster . getDeployment ( ) . get ( "deployment" ) ; final int defaultDrBufferSize = Integer . getInteger ( "DR_DEFAULT_BUFF... |
public class OmsLabeler { /** * getNeighbours will get the pixel value of i ' s neighbour that ' s ox and oy
* away from i , if the point is outside the image , then 0 is returned .
* This version gets from source image .
* @ param d _ w
* @ param d _ h */
private int getNeighbours ( int [ ] src1d , int i , int... | int x , y , result ; x = ( i % d_w ) + ox ; // d _ w and d _ h are assumed to be set to the
y = ( i / d_w ) + oy ; // width and height of scr1d
if ( ( x < 0 ) || ( x >= d_w ) || ( y < 0 ) || ( y >= d_h ) ) { result = 0 ; } else { result = src1d [ y * d_w + x ] & 0x000000ff ; } return result ; |
public class Configuration { /** * Set the value at the given index in the statement
* @ param < T >
* @ param stmt statement
* @ param path path
* @ param i one based index in statement
* @ param value value to bind
* @ throws SQLException */
@ SuppressWarnings ( { } } | "unchecked" , "rawtypes" } ) public < T > void set ( PreparedStatement stmt , Path < ? > path , int i , T value ) throws SQLException { if ( value == null || value instanceof Null ) { Integer sqlType = null ; if ( path != null ) { ColumnMetadata columnMetadata = ColumnMetadata . getColumnMetadata ( path ) ; if ( column... |
public class CommerceDiscountRelUtil { /** * Returns a range of all the commerce discount rels where commerceDiscountId = & # 63 ; and classNameId = & # 63 ; .
* Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are ... | return getPersistence ( ) . findByCD_CN ( commerceDiscountId , classNameId , start , end ) ; |
public class RuleLoaderImpl { /** * Prints all of the { @ link RulePhase } objects in the order that they should execute . This is primarily for debug purposes and should be called
* before the entire { @ link RuleProvider } list is sorted , as this will allow us to print the { @ link RulePhase } list without the ris... | List < RuleProvider > unsortedPhases = new ArrayList < > ( ) ; for ( RuleProvider provider : allProviders ) { if ( provider instanceof RulePhase ) unsortedPhases . add ( provider ) ; } List < RuleProvider > sortedPhases = RuleProviderSorter . sort ( unsortedPhases ) ; StringBuilder rulePhaseSB = new StringBuilder ( ) ;... |
public class MetadataDeployer { /** * { @ inheritDoc } */
public Deployment deploy ( URL url , Context context , ClassLoader parent ) throws DeployException { } } | Connector c = ( Connector ) context . get ( Constants . ATTACHMENT_MERGED_METADATA ) ; if ( c == null ) c = ( Connector ) context . get ( Constants . ATTACHMENT_RA_XML_METADATA ) ; if ( c == null ) throw new DeployException ( "No metadata for " + url . toExternalForm ( ) + " found" ) ; try { File archive = new File ( u... |
public class DescribeDimensionKeysResult { /** * If < code > PartitionBy < / code > was present in the request , < code > PartitionKeys < / code > contains the breakdown of
* dimension keys by the specified partitions .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* ... | if ( this . partitionKeys == null ) { setPartitionKeys ( new java . util . ArrayList < ResponsePartitionKey > ( partitionKeys . length ) ) ; } for ( ResponsePartitionKey ele : partitionKeys ) { this . partitionKeys . add ( ele ) ; } return this ; |
public class Word2VecModelThrift { /** * Returns true if field corresponding to fieldID is set ( has been assigned a value ) and false otherwise */
public boolean isSet ( _Fields field ) { } } | if ( field == null ) { throw new IllegalArgumentException ( ) ; } switch ( field ) { case VOCAB : return isSetVocab ( ) ; case LAYER_SIZE : return isSetLayerSize ( ) ; case VECTORS : return isSetVectors ( ) ; } throw new IllegalStateException ( ) ; |
public class RenderUtils { /** * Renders disabled installer line . The same as installer line , but with ' - ' before installer name and
* without markers .
* @ param type disabled installer class
* @ return rendered disabled installer line */
public static String renderDisabledInstaller ( final Class < FeatureIn... | return String . format ( "-%-19s %-38s" , FeatureUtils . getInstallerExtName ( type ) , brackets ( renderClass ( type ) ) ) ; |
public class XmlStringTools { /** * Wrap a text inside a tag .
* @ param buffer
* StringBuffer to fill
* @ param text
* the text to wrap
* @ param tag
* the tag to use
* @ return the buffer */
public static StringBuffer appendTextInsideTag ( StringBuffer buffer , String text , String tag ) { } } | return appendTextInsideTag ( buffer , text , tag , EMPTY_MAP ) ; |
public class RectifyImageOps { /** * Adjust the rectification such that only pixels which overlap the original left image can be seen . For use with
* calibrated stereo images having a known baseline . Image processing is easier since only the " true " image pixels
* are visible , but information along the image bo... | ImplRectifyImageOps_F64 . allInsideLeft ( paramLeft , rectifyLeft , rectifyRight , rectifyK ) ; |
public class MathUtils { /** * See : http : / / stackoverflow . com / questions / 466204 / rounding - off - to - nearest - power - of - 2
* @ param v the number to getFromOrigin the next power of 2 for
* @ return the next power of 2 for the passed in value */
public static long nextPowOf2 ( long v ) { } } | v -- ; v |= v >> 1 ; v |= v >> 2 ; v |= v >> 4 ; v |= v >> 8 ; v |= v >> 16 ; v ++ ; return v ; |
public class ScanningQueryEngine { /** * Create a { @ link ExtractFromRow } implementation that accesses the REFERENCE value ( s ) in the properties of the node
* identified by the supplied selector names .
* @ param selectorName the name of the selector containing the node ( s ) to be accessed ; may not be null
... | final NodeCache cache = context . getNodeCache ( sources . getWorkspaceName ( ) ) ; // Find the expected property type of the value . . .
assert columns != null ; final int indexInRow = columns . getSelectorIndex ( selectorName ) ; final TypeFactory < ? > typeFactory = context . getTypeSystem ( ) . getStringFactory ( )... |
public class BasePasswordManagementService { /** * Orders security questions consistently .
* @ param questionMap A map of question / answer key / value pairs
* @ return A list of questions in a consistent order */
public static List < String > canonicalizeSecurityQuestions ( final Map < String , String > questionM... | val keys = new ArrayList < String > ( questionMap . keySet ( ) ) ; keys . sort ( String . CASE_INSENSITIVE_ORDER ) ; return keys ; |
public class SoapServerActionBuilder { /** * Generic request builder for receiving SOAP messages on server .
* @ return */
public SoapServerRequestActionBuilder receive ( ) { } } | SoapServerRequestActionBuilder soapServerRequestActionBuilder = new SoapServerRequestActionBuilder ( action , soapServer ) . withApplicationContext ( applicationContext ) ; return soapServerRequestActionBuilder ; |
public class ParticipantCreator { /** * Add the requested post parameters to the Request .
* @ param request Request to add post params to */
private void addPostParams ( final Request request ) { } } | if ( identifier != null ) { request . addPostParam ( "Identifier" , identifier ) ; } if ( friendlyName != null ) { request . addPostParam ( "FriendlyName" , friendlyName ) ; } if ( proxyIdentifier != null ) { request . addPostParam ( "ProxyIdentifier" , proxyIdentifier ) ; } if ( proxyIdentifierSid != null ) { request ... |
public class XCasePartImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setTypeGuard ( JvmTypeReference newTypeGuard ) { } } | if ( newTypeGuard != typeGuard ) { NotificationChain msgs = null ; if ( typeGuard != null ) msgs = ( ( InternalEObject ) typeGuard ) . eInverseRemove ( this , EOPPOSITE_FEATURE_BASE - XbasePackage . XCASE_PART__TYPE_GUARD , null , msgs ) ; if ( newTypeGuard != null ) msgs = ( ( InternalEObject ) newTypeGuard ) . eInver... |
public class HBaseRequestAdapter { /** * < p > adapt . < / p >
* @ param delete a { @ link org . apache . hadoop . hbase . client . Delete } object .
* @ return a { @ link RowMutation } object . */
public RowMutation adapt ( Delete delete ) { } } | RowMutation rowMutation = newRowMutationModel ( delete . getRow ( ) ) ; adapt ( delete , rowMutation ) ; return rowMutation ; |
public class StackTracePrinter { /** * Marked as deprecated because of the erroneous name . Call printAllStackTraces instead .
* @ param filter only thread where the name of the thread contains this given { @ code filter } key are printed . If the filter is null , no filtering will be performed .
* @ param logger t... | printAllStackTraces ( filter , logger , logLevel ) ; |
public class PortAllocator { /** * Check if the port is available on the host . This is racy but it ' s better than nothing .
* @ param port Port number to check .
* @ return True if port is available . False otherwise . */
private boolean portAvailable ( final int port ) { } } | ServerSocket socket = null ; try { socket = new ServerSocket ( port ) ; return true ; } catch ( IOException ignored ) { return false ; } finally { if ( socket != null ) { try { socket . close ( ) ; } catch ( IOException e ) { log . error ( "Couldn't close socket on port {} when checking availability: {}" , port , e ) ;... |
public class RepositoryCache { /** * Creates a new workspace in the repository coupled with external document
* store .
* @ param name the name of the repository
* @ param connectors connectors to the external systems .
* @ return workspace cache for the new workspace . */
public WorkspaceCache createExternalWo... | String [ ] tokens = name . split ( ":" ) ; String sourceName = tokens [ 0 ] ; String workspaceName = tokens [ 1 ] ; this . workspaceNames . add ( workspaceName ) ; refreshRepositoryMetadata ( true ) ; ConcurrentMap < NodeKey , CachedNode > nodeCache = cacheForWorkspace ( ) . asMap ( ) ; ExecutionContext context = conte... |
public class ServletHttpResponse { public void resetBuffer ( ) { } } | if ( isCommitted ( ) ) throw new IllegalStateException ( "Committed" ) ; ( ( HttpOutputStream ) _httpResponse . getOutputStream ( ) ) . resetBuffer ( ) ; if ( _writer != null ) _writer . reset ( ) ; |
public class DistributedMigratorRangeMonitor { /** * Claims migration range tasks that have been queued by the leader and are ready to scan . */
private List < ClaimedTask > claimMigrationRangeTasks ( int max ) { } } | try { Date claimTime = new Date ( ) ; List < ScanRangeTask > migrationRangeTasks = _workflow . claimScanRangeTasks ( max , QUEUE_CLAIM_TTL ) ; if ( migrationRangeTasks . isEmpty ( ) ) { return ImmutableList . of ( ) ; } List < ClaimedTask > newlyClaimedTasks = Lists . newArrayListWithCapacity ( migrationRangeTasks . si... |
public class ApiOvhTelephony { /** * Add an outplan notification on the billing account
* REST : POST / telephony / { billingAccount } / outplanNotification
* @ param percentage [ required ] The notification percentage of maximum outplan
* @ param block [ required ] The blocking type of the associate lines
* @ ... | String qPath = "/telephony/{billingAccount}/outplanNotification" ; StringBuilder sb = path ( qPath , billingAccount ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "block" , block ) ; addBody ( o , "notifyEmail" , notifyEmail ) ; addBody ( o , "percentage" , percentage ) ; String... |
public class FileOperations { /** * Delete an existing file .
* @ param aFile
* The file to be deleted . May not be < code > null < / code > .
* @ return A non - < code > null < / code > error code . */
@ Nonnull public static FileIOError deleteFile ( @ Nonnull final File aFile ) { } } | ValueEnforcer . notNull ( aFile , "File" ) ; if ( ! FileHelper . existsFile ( aFile ) ) return EFileIOErrorCode . SOURCE_DOES_NOT_EXIST . getAsIOError ( EFileIOOperation . DELETE_FILE , aFile ) ; // Is the parent directory writable ?
final File aParentDir = aFile . getParentFile ( ) ; if ( aParentDir != null && ! aPare... |
public class BasicChronology { /** * Get the number of weeks in the year .
* @ param year the year to use
* @ return number of weeks in the year */
int getWeeksInYear ( int year ) { } } | long firstWeekMillis1 = getFirstWeekOfYearMillis ( year ) ; long firstWeekMillis2 = getFirstWeekOfYearMillis ( year + 1 ) ; return ( int ) ( ( firstWeekMillis2 - firstWeekMillis1 ) / DateTimeConstants . MILLIS_PER_WEEK ) ; |
public class ContextedRuntimeException { /** * Sets information helpful to a developer in diagnosing and correcting the problem .
* For the information to be meaningful , the value passed should have a reasonable
* toString ( ) implementation .
* Any existing values with the same labels are removed before the new... | exceptionContext . setContextValue ( label , value ) ; return this ; |
public class Question { /** * 对问题进行分词
* @ return 分词结果 */
public List < String > getWords ( ) { } } | List < String > result = new ArrayList < > ( ) ; List < Word > words = WordParser . parse ( question . replace ( "?" , "" ) . replace ( "?" , "" ) ) ; for ( Word word : words ) { result . add ( word . getText ( ) ) ; } return result ; |
public class BytecodeInjectReactive { /** * Add Method to ConstPool . If method was not in the ConstPool will add and return index , otherwise will return index of already existing entry of constpool */
private static int addMethod ( ConstPool cPool , CtMethod method ) { } } | // addMethodrefInfo is a safe add , if constant already present it return the existing value without adding .
return cPool . addMethodrefInfo ( cPool . getThisClassInfo ( ) , method . getName ( ) , method . getSignature ( ) ) ; |
public class BatchGetRepositoriesResult { /** * Returns a list of repository names for which information could not be found .
* @ param repositoriesNotFound
* Returns a list of repository names for which information could not be found . */
public void setRepositoriesNotFound ( java . util . Collection < String > re... | if ( repositoriesNotFound == null ) { this . repositoriesNotFound = null ; return ; } this . repositoriesNotFound = new java . util . ArrayList < String > ( repositoriesNotFound ) ; |
public class CollUtil { /** * 去掉集合中的多个元素
* @ param collection 集合
* @ param elesRemoved 被去掉的元素数组
* @ return 原集合
* @ since 4.1.0 */
@ SuppressWarnings ( "unchecked" ) public static < T > Collection < T > removeAny ( Collection < T > collection , T ... elesRemoved ) { } } | collection . removeAll ( newHashSet ( elesRemoved ) ) ; return collection ; |
public class ConsoleUtil { /** * 从控制台获取命令并且处理
* @ param consumer 处理控制台获取的命令 , 当输入的是exit时系统退出 */
public static void start ( Consumer < String > consumer ) { } } | try { Console console = System . console ( ) ; CustomReader reader ; if ( console != null ) { System . out . println ( "Console对象存在,使用Console对象" ) ; reader = console :: readLine ; } else { System . out . println ( "Console对象不存在,使用Reader" ) ; BufferedReader bufferedReader = new BufferedReader ( new InputStreamReader ( S... |
import java . util . * ; class CheckForDuplicates { /** * This function checks whether if the provided list of integers contains any duplicate values .
* > > > check _ for _ duplicates ( [ 1 , 2 , 3 , 4 , 5 ] )
* False
* > > > check _ for _ duplicates ( [ 1 , 2 , 3 , 4 , 4 ] )
* True
* > > > check _ for _ dup... | Set < Integer > uniqueElements = new HashSet < Integer > ( inputArray ) ; return inputArray . size ( ) != uniqueElements . size ( ) ; |
public class StringExpression { /** * Create a { @ code this . indexOf ( str ) } expression
* < p > Get the index of the given substring in this String < / p >
* @ param str string
* @ return this . indexOf ( str )
* @ see java . lang . String # indexOf ( String ) */
public NumberExpression < Integer > indexOf ... | return Expressions . numberOperation ( Integer . class , Ops . INDEX_OF , mixin , str ) ; |
public class BatchMeterUsageResult { /** * Contains all UsageRecords processed by BatchMeterUsage . These records were either honored by AWS Marketplace
* Metering Service or were invalid .
* @ param results
* Contains all UsageRecords processed by BatchMeterUsage . These records were either honored by AWS
* Ma... | if ( results == null ) { this . results = null ; return ; } this . results = new java . util . ArrayList < UsageRecordResult > ( results ) ; |
public class ClassInfoList { /** * Generate a and save a . dot file , which can be fed into GraphViz for layout and visualization of the class
* graph .
* Methods , fields and annotations are shown if enabled , via { @ link ClassGraph # enableMethodInfo ( ) } ,
* { @ link ClassGraph # enableFieldInfo ( ) } and { ... | try ( PrintWriter writer = new PrintWriter ( file ) ) { writer . print ( generateGraphVizDotFile ( ) ) ; } |
public class SemanticAPI { /** * 提交语音
* @ param accessToken 接口调用凭证
* @ param voiceId 语音唯一标识
* @ param uri 文件格式 只支持mp3,16k , 单声道 , 最大1M
* @ return BaseResult
* @ since 2.8.22 */
public static BaseResult addvoicetorecofortext ( String accessToken , String voiceId , URI uri ) { } } | return addvoicetorecofortext ( accessToken , voiceId , null , uri ) ; |
public class PropertyAccessor { /** * Sets a value of the
* < a href = " http : / / docs . oracle . com / javase / tutorial / javabeans / index . html " target = " _ blank " > JavaBeans < / a > property .
* Examples :
* < pre >
* / / import static { @ link org . fest . reflect . core . Reflection # property ( S... | try { descriptor . getWriteMethod ( ) . invoke ( target , value ) ; } catch ( Exception e ) { String format = "Failed to set value %s in property '%s'" ; String msg = String . format ( format , String . valueOf ( value ) , descriptor . getName ( ) ) ; throw new ReflectionError ( msg , e ) ; } |
public class MetricsSystem { /** * Converts a simple string to a qualified metric name based on the process type .
* @ param name the name of the metric
* @ return the metric with instance and id tags */
public static String getMetricName ( String name ) { } } | switch ( CommonUtils . PROCESS_TYPE . get ( ) ) { case CLIENT : return getClientMetricName ( name ) ; case MASTER : return getMasterMetricName ( name ) ; case PROXY : return getProxyMetricName ( name ) ; case WORKER : return getWorkerMetricName ( name ) ; case JOB_MASTER : return getJobMasterMetricName ( name ) ; case ... |
public class JavaClasspathParser { /** * Reads and decode an XML classpath string . Returns a two - dimensional array , where the number of elements in the row is fixed to 2 . The first
* element is an array of raw classpath entries and the second element is an array of referenced entries that may have been stored by... | final List < IClasspathEntry > paths = new ArrayList < > ( ) ; IClasspathEntry defaultOutput = null ; final Element cpElement ; try ( StringReader reader = new StringReader ( xmlClasspath ) ; ) { final DocumentBuilder parser = DocumentBuilderFactory . newInstance ( ) . newDocumentBuilder ( ) ; cpElement = parser . pars... |
public class ProxyOverrider { /** * Deactivates all proxy overrides restoring the pre - existing proxy settings if any . */
public void deactivateAll ( ) { } } | for ( String scheme : new String [ ] { "http" , "https" } ) { InetSocketAddress originalProxy = originalProxies . remove ( scheme ) ; if ( originalProxy != null ) { System . setProperty ( scheme + ".proxyHost" , originalProxy . getHostName ( ) ) ; System . setProperty ( scheme + ".proxyPort" , Integer . toString ( orig... |
public class Parser { /** * A { @ link Parser } that runs { @ code this } 1 or more times separated by { @ code delim } .
* < p > The return values are collected in a { @ link List } . */
public final Parser < List < T > > sepBy1 ( Parser < ? > delim ) { } } | final Parser < T > afterFirst = delim . asDelimiter ( ) . next ( this ) ; return next ( ( Function < T , Parser < List < T > > > ) firstValue -> new RepeatAtLeastParser < T > ( afterFirst , 0 , ListFactory . arrayListFactoryWithFirstElement ( firstValue ) ) ) ; |
public class SetDirtyOnChangeHandler { /** * Constructor .
* @ param field The basefield owner of this listener ( usually null and set on setOwner ( ) ) .
* @ param fldTarget The field to set to modified if this field changes .
* @ param bIfNewRecord Only set to dirty if the target field ' s record is new .
* @... | m_fldTarget = fldTarget ; m_bIfNewRecord = bIfNewRecord ; m_bIfCurrentRecord = bIfCurrentRecord ; super . init ( field ) ; m_bScreenMove = true ; // Only respond to user change
m_bInitMove = false ; m_bReadMove = false ; |
public class CdnClient { /** * Get detailed information of a domain .
* @ param request The request containing all of the options related to the domain .
* @ return getDomainConfig of the getDomainConfig operation returned by the service . */
public GetDomainConfigResponse getDomainConfig ( GetDomainConfigRequest r... | checkNotNull ( request , "The parameter request should NOT be null." ) ; InternalRequest internalRequest = createRequest ( request , HttpMethodName . GET , DOMAIN , request . getDomain ( ) , "config" ) ; return invokeHttpClient ( internalRequest , GetDomainConfigResponse . class ) ; |
public class PluginGroup { /** * Stops the { @ link Plugin } s managed by this { @ link PluginGroup } . */
CompletableFuture < Void > stop ( CentralDogmaConfig config , ProjectManager projectManager , CommandExecutor commandExecutor , MeterRegistry meterRegistry ) { } } | return startStop . stop ( new PluginContext ( config , projectManager , commandExecutor , meterRegistry ) ) ; |
public class CallCenterApp { /** * Core benchmark code .
* Connect . Initialize . Run the loop . Cleanup . Print Results .
* @ throws InterruptedException
* @ throws IOException
* @ throws NoConnectionsException
* @ throws ProcCallException */
public void run ( ) throws InterruptedException , NoConnectionsExc... | System . out . print ( HORIZONTAL_RULE ) ; System . out . println ( " Setup & Initialization" ) ; System . out . println ( HORIZONTAL_RULE ) ; // connect to one or more servers , loop until success
connect ( config . servers ) ; System . out . print ( HORIZONTAL_RULE ) ; System . out . println ( " Starting Benchmark" )... |
public class AbstractManagedType { /** * ( non - Javadoc )
* @ see javax . persistence . metamodel . ManagedType # getMap ( java . lang . String ,
* java . lang . Class , java . lang . Class ) */
@ Override public < K , V > MapAttribute < ? super X , K , V > getMap ( String paramName , Class < K > keyClazz , Class ... | PluralAttribute < X , ? , ? > declaredAttrib = getDeclaredPluralAttribute ( paramName ) ; if ( onCheckMapAttribute ( declaredAttrib , valueClazz ) ) { if ( valueClazz != null && valueClazz . equals ( ( ( MapAttribute < X , K , V > ) declaredAttrib ) . getKeyJavaType ( ) ) ) { return ( MapAttribute < X , K , V > ) decla... |
public class MicroServiceTemplateSupport { /** * sql */
public Map getSingleInfoService ( String sql ) throws Exception { } } | /* String realSql = sql + " limit 1 " ;
List retList = getInfoListAllServiceInnerExBySql ( realSql , null ) ;
if ( retList = = null | | retList . size ( ) < = 0 ) {
return null ;
return ( Map ) retList . get ( 0 ) ; */
// for oracle
String realSql = sql ; Map retMap = getInnerDao ( ) . querySingleObjJoinByCondi... |
public class NamespaceRegistryImpl { /** * Registers all the remote commands */
private void initRemoteCommands ( final RepositoryEntry config ) { } } | this . id = UUID . randomUUID ( ) . toString ( ) ; registerNamespace = rpcService . registerCommand ( new RemoteCommand ( ) { public String getId ( ) { return "org.exoplatform.services.jcr.impl.core.NamespaceRegistryImpl-registerNamespace-" + config . getName ( ) ; } public Serializable execute ( Serializable [ ] args ... |
public class OptimizerNode { protected void prunePlanAlternatives ( List < PlanNode > plans ) { } } | if ( plans . isEmpty ( ) ) { throw new CompilerException ( "No plan meeting the requirements could be created @ " + this + ". Most likely reason: Too restrictive plan hints." ) ; } // shortcut for the simple case
if ( plans . size ( ) == 1 ) { return ; } // we can only compare plan candidates that made equal choices
//... |
public class UserAttrs { /** * Set user - defined - attribute
* @ param path
* @ param attribute user : attribute name . user : can be omitted .
* @ param value
* @ param options
* @ throws IOException */
public static final void setDoubleAttribute ( Path path , String attribute , double value , LinkOption ..... | attribute = attribute . startsWith ( "user:" ) ? attribute : "user:" + attribute ; Files . setAttribute ( path , attribute , Primitives . writeDouble ( value ) , options ) ; |
public class Postconditions { /** * < p > Evaluate the given { @ code predicate } using { @ code value } as input . < / p >
* < p > The function throws { @ link PostconditionViolationException } if the
* predicate is false . < / p >
* @ param value The value
* @ param predicate The predicate
* @ param describ... | final boolean ok ; try { ok = predicate . test ( value ) ; } catch ( final Throwable e ) { throw failed ( e , value , singleViolation ( failedPredicate ( e ) ) ) ; } return innerCheck ( value , ok , describer ) ; |
public class AbstractFedoraBinary { /** * ( non - Javadoc )
* @ see org . fcrepo . kernel . api . models . FedoraBinary # getContentDigest ( ) */
@ Override public URI getContentDigest ( ) { } } | LOGGER . debug ( "getContentDigest getting digest info" ) ; try { // Determine which digest algorithm to use
final String algorithm = hasDescriptionProperty ( DEFAULT_DIGEST_ALGORITHM ) ? property2values . apply ( getDescriptionProperty ( DEFAULT_DIGEST_ALGORITHM ) ) . findFirst ( ) . get ( ) . getString ( ) : ContentD... |
public class VisualizeAssociationScoreApp { /** * Extracts image information and then passes that info onto scorePanel for display . Data is not
* recycled to avoid threading issues . */
private void processImage ( ) { } } | final List < Point2D_F64 > leftPts = new ArrayList < > ( ) ; final List < Point2D_F64 > rightPts = new ArrayList < > ( ) ; final List < TupleDesc > leftDesc = new ArrayList < > ( ) ; final List < TupleDesc > rightDesc = new ArrayList < > ( ) ; final ProgressMonitor progressMonitor = new ProgressMonitor ( this , "Comput... |
public class RSAUtils { /** * 私钥签名
* @ param data
* @ param privateKey
* @ return
* @ throws Exception */
public static String encryptByPrivateKey ( String data , String privateKey ) throws Exception { } } | PKCS8EncodedKeySpec priPKCS8 = new PKCS8EncodedKeySpec ( base64 . decode ( privateKey ) ) ; KeyFactory keyf = KeyFactory . getInstance ( "RSA" ) ; PrivateKey priKey = keyf . generatePrivate ( priPKCS8 ) ; java . security . Signature signature = java . security . Signature . getInstance ( "SHA256WithRSA" ) ; signature .... |
public class UtlProperties { /** * < p > Evaluate string set properties
* from string with comma delimeter
* and removed new lines and trailing spaces . < / p >
* @ param pSource string
* @ return LinkedHashSet < String > properties set */
public final LinkedHashSet < String > evalPropsStringsSet ( final String... | String sourceCorr = pSource . replace ( "\n" , "" ) ; LinkedHashSet < String > resultSet = new LinkedHashSet < String > ( ) ; for ( String str : sourceCorr . split ( "," ) ) { resultSet . add ( str . trim ( ) ) ; } return resultSet ; |
public class StaticCATProducer { /** * Calls the internal send method that will send a message and inform the
* client as to the outcome .
* @ param request
* @ param conversation
* @ param requestNumber
* @ param allocatedFromBufferPool
* @ param partOfExchange */
static void rcvSendSessMsg ( CommsServerBy... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "rcvSendSessMsg" ) ; final boolean optimizedTx = CommsUtils . requiresOptimizedTransaction ( conversation ) ; sendSessMsg ( request , conversation , requestNumber , partOfExchange , allocatedFromBufferPool , true , optimized... |
public class OrderedFuture { /** * Adds a new ordered future . */
private CompletableFuture < T > orderedFuture ( ) { } } | if ( ! complete ) { synchronized ( orderedFutures ) { if ( ! complete ) { CompletableFuture < T > future = new CompletableFuture < > ( ) ; orderedFutures . add ( future ) ; return future ; } } } // Completed
if ( error == null ) { return CompletableFuture . completedFuture ( result ) ; } else { return Futures . excepti... |
public class ScheduledInstanceRecurrenceRequest { /** * The days . For a monthly schedule , this is one or more days of the month ( 1-31 ) . For a weekly schedule , this is
* one or more days of the week ( 1-7 , where 1 is Sunday ) . You can ' t specify this value with a daily schedule . If the
* occurrence is rela... | if ( occurrenceDays == null ) { occurrenceDays = new com . amazonaws . internal . SdkInternalList < Integer > ( ) ; } return occurrenceDays ; |
public class Ix { /** * Maps each element from this sequence into subsequent Iterable sequences whose elements are
* concatenated in order .
* Note that flatMap and concatMap operations are the same in the Iterable world .
* The result ' s iterator ( ) forwards the call remove ( ) to the current inner Iterator . ... | return new IxFlattenIterable < T , R > ( this , nullCheck ( mapper , "mapper is null" ) ) ; |
public class IterUtil { /** * 将Entry集合转换为HashMap
* @ param < K > 键类型
* @ param < V > 值类型
* @ param entryIter entry集合
* @ return Map */
public static < K , V > HashMap < K , V > toMap ( Iterable < Entry < K , V > > entryIter ) { } } | final HashMap < K , V > map = new HashMap < K , V > ( ) ; if ( isNotEmpty ( entryIter ) ) { for ( Entry < K , V > entry : entryIter ) { map . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } } return map ; |
public class SortedProperties { /** * Overriden to be able to write properties sorted by keys to the disk
* @ see java . util . Hashtable # keys ( ) */
@ SuppressWarnings ( "unchecked" ) @ Override public synchronized Enumeration < Object > keys ( ) { } } | // sort elements based on detector ( prop key ) names
Set < ? > set = keySet ( ) ; return ( Enumeration < Object > ) sortKeys ( ( Set < String > ) set ) ; |
public class QuickSelect { /** * Sorts the array such that the values in the array up to and including
* ' k ' are sorted the least to greatest . This implies that the array
* itself is modified . For convenience the ' k ' element is returned .
* @ param data The unsorted list
* @ param k The element of the sor... | int i , j , mid ; int n = maxIndex ; Comparable a ; int l = 0 ; int ir = n - 1 ; Comparable temp ; for ( ; ; ) { if ( ir <= l + 1 ) { if ( ir == l + 1 && data [ ir ] . compareTo ( data [ l ] ) < 0 ) { temp = data [ l ] ; data [ l ] = data [ ir ] ; data [ ir ] = temp ; } return data [ k ] ; } else { mid = ( l + ir ) >> ... |
public class DescribeConversionTasksRequest { /** * The conversion task IDs .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setConversionTaskIds ( java . util . Collection ) } or { @ link # withConversionTaskIds ( java . util . Collection ) } if
* you wan... | if ( this . conversionTaskIds == null ) { setConversionTaskIds ( new com . amazonaws . internal . SdkInternalList < String > ( conversionTaskIds . length ) ) ; } for ( String ele : conversionTaskIds ) { this . conversionTaskIds . add ( ele ) ; } return this ; |
public class EnumSetFlagger { /** * Returns bit flag constructed from EnumSet . Flags bit position is according
* to Enum ordinal .
* < p > Throws IllegalArgumentException if flag overflows
* @ param < E > Enum type
* @ param eSet
* @ return */
public static < E extends Enum < E > > int getFlag ( EnumSet < E ... | int flag = 0 ; for ( Enum < E > en : eSet ) { int ordinal = en . ordinal ( ) ; if ( ordinal >= Integer . SIZE ) { throw new IllegalArgumentException ( eSet + " contains too many enums for int" ) ; } flag |= 1 << ordinal ; } return flag ; |
public class DatabaseInformationFull { /** * ROLE _ AUTHORIZATION _ DESCRIPTORS < p >
* < b > Function < / b > < p >
* Contains a representation of the role authorization descriptors . < p >
* < b > Definition < / b >
* < pre class = " SqlCodeExample " >
* CREATE TABLE ROLE _ AUTHORIZATION _ DESCRIPTORS (
*... | Table t = sysTables [ ROLE_AUTHORIZATION_DESCRIPTORS ] ; if ( t == null ) { t = createBlankTable ( sysTableHsqlNames [ ROLE_AUTHORIZATION_DESCRIPTORS ] ) ; addColumn ( t , "ROLE_NAME" , SQL_IDENTIFIER ) ; // not null
addColumn ( t , "GRANTEE" , SQL_IDENTIFIER ) ; // not null
addColumn ( t , "GRANTOR" , SQL_IDENTIFIER )... |
public class DOMUtil { /** * Return the inner text of the first child with the given name . */
public static String getChildText ( Element parent , String childName ) { } } | Element child = getChild ( parent , childName ) ; if ( child == null ) return null ; return getInnerText ( child ) ; |
public class JsApiHdrsImpl { /** * Get the Report DiscardMsg field from the message header .
* Javadoc description supplied by the SIBusMessage interface . */
@ Override public final Boolean getReportDiscardMsg ( ) { } } | Boolean value = ( Boolean ) getApi ( ) . getField ( JsApiAccess . REPORTDISCARDMSG_VALUE ) ; return ( value == null ) ? Boolean . FALSE : value ; |
public class LastaToActionFilter { protected void showBoot ( FwAssistantDirector assistantDirector ) { } } | if ( logger . isInfoEnabled ( ) ) { final FwCoreDirection coreDirection = assistantDirector . assistCoreDirection ( ) ; final String domainTitle = coreDirection . assistDomainTitle ( ) ; final String environmentTitle = coreDirection . assistEnvironmentTitle ( ) ; final String frameworkDebugExp = coreDirection . isFrame... |
public class Parser { /** * Method is used to parse String data to the proper Java types .
* @ param schema Input schema to parse the String data by .
* @ param input Java type specific to the schema supplied .
* @ return Java type for the
* @ throws DataException Exception is thrown when there is an exception ... | checkSchemaAndInput ( schema , input ) ; if ( null == input ) { return null ; } TypeParser parser = findParser ( schema ) ; try { Object result = parser . parseString ( input , schema ) ; return result ; } catch ( Exception ex ) { String message = String . format ( "Could not parse '%s' to '%s'" , input , parser . expe... |
public class Status { /** * Method to get the key to the label .
* @ return key to the label */
public String getLabelKey ( ) { } } | final StringBuilder keyStr = new StringBuilder ( ) ; return keyStr . append ( getStatusGroup ( ) . getName ( ) ) . append ( "/Key.Status." ) . append ( key ) . toString ( ) ; |
public class FaxReader { /** * Make the request to the Twilio API to perform the read .
* @ param client TwilioRestClient with which to make the request
* @ return Fax ResourceSet */
@ Override @ SuppressWarnings ( "checkstyle:linelength" ) public Page < Fax > firstPage ( final TwilioRestClient client ) { } } | Request request = new Request ( HttpMethod . GET , Domains . FAX . toString ( ) , "/v1/Faxes" , client . getRegion ( ) ) ; addQueryParams ( request ) ; return pageForRequest ( client , request ) ; |
public class MergeVisitor { /** * Enables the static methods of the java . lang . String class to be called from the templates . If the key " String " is
* already reserved by the user , this method simply returns the input parameter .
* @ param userCallables
* @ return all the template callables */
public Templa... | TemplateCallable strFunctionality = new TemplateCallable ( String . class . getSimpleName ( ) , String . class ) ; for ( TemplateCallable u : userCallables ) { if ( u . equals ( strFunctionality ) ) { return userCallables ; } } return GeneralUtils . concat ( userCallables , new TemplateCallable [ ] { strFunctionality }... |
public class StatusWatermarkValve { /** * Feed a { @ link Watermark } into the valve . If the input triggers the valve to output a new Watermark ,
* { @ link ValveOutputHandler # handleWatermark ( Watermark ) } will be called to process the new Watermark .
* @ param watermark the watermark to feed to the valve
* ... | // ignore the input watermark if its input channel , or all input channels are idle ( i . e . overall the valve is idle ) .
if ( lastOutputStreamStatus . isActive ( ) && channelStatuses [ channelIndex ] . streamStatus . isActive ( ) ) { long watermarkMillis = watermark . getTimestamp ( ) ; // if the input watermark ' s... |
public class Server { /** * Add Web Application .
* @ param virtualHost Virtual host name or null
* @ param contextPathSpec The context path spec . Which must be of
* the form / or / path / *
* @ param webApp The Web application directory or WAR file .
* @ return The WebApplicationContext
* @ exception IOEx... | WebApplicationContext appContext = newWebApplicationContext ( webApp ) ; appContext . setContextPath ( contextPathSpec ) ; addContext ( virtualHost , appContext ) ; if ( log . isDebugEnabled ( ) ) log . debug ( "Web Application " + appContext + " added" ) ; return appContext ; |
public class PackagesReportFooting { /** * SetupSFields Method . */
public void setupSFields ( ) { } } | this . getRecord ( ClassProject . CLASS_PROJECT_FILE ) . getField ( ClassProject . ID ) . setupDefaultView ( this . getNextLocation ( ScreenConstants . NEXT_LOGICAL , ScreenConstants . ANCHOR_DEFAULT ) , this , ScreenConstants . DEFAULT_DISPLAY ) ; this . getRecord ( ClassProject . CLASS_PROJECT_FILE ) . getField ( Cla... |
public class SuspiciousUninitializedArray { /** * overrides the visitor to reset the stack
* @ param classContext
* the context object of the currently parsed class */
@ Override public void visitClassContext ( ClassContext classContext ) { } } | try { isEnum = classContext . getJavaClass ( ) . isEnum ( ) ; stack = new OpcodeStack ( ) ; uninitializedRegs = new BitSet ( ) ; arrayAliases = new HashMap < > ( ) ; storedUVs = new HashMap < > ( ) ; super . visitClassContext ( classContext ) ; } finally { stack = null ; uninitializedRegs = null ; arrayAliases = null ;... |
public class ElasticSearchUtils { /** * Create an ES Index .
* @ param indexName
* @ return true if the index has been created and false if the index has not been created .
* @ throws ElasticsearchException */
public boolean createSingleIndex ( String indexName ) throws ElasticsearchException { } } | CreateIndexRequest indexRequest = new CreateIndexRequest ( indexName ) ; CreateIndexResponse res = this . client . admin ( ) . indices ( ) . create ( indexRequest ) . actionGet ( ) ; return indexExists ( indexName ) ; |
public class ChangeObjects { /** * method to remove a current annotation of a PolymerNotation
* @ param polymer
* PolymerNotation
* @ return PolymerNotation with no annotation */
public final static PolymerNotation removeAnnotationOfPolmyer ( PolymerNotation polymer ) { } } | return new PolymerNotation ( polymer . getPolymerID ( ) , polymer . getPolymerElements ( ) , null ) ; |
public class snmpmib { /** * Use this API to fetch all the snmpmib resources that are configured on netscaler . */
public static snmpmib get ( nitro_service service , options option ) throws Exception { } } | snmpmib obj = new snmpmib ( ) ; snmpmib [ ] response = ( snmpmib [ ] ) obj . get_resources ( service , option ) ; return response [ 0 ] ; |
public class WebSocketPlugin { /** * { @ inheritDoc } */
@ Override public void setApplication ( MultiThreadedApplicationAdapter application ) { } } | log . info ( "WebSocketPlugin application: {}" , application ) ; // get the app scope
final IScope appScope = application . getScope ( ) ; // put if not already there
managerMap . putIfAbsent ( appScope , new WebSocketScopeManager ( ) ) ; // add the app scope to the manager
managerMap . get ( appScope ) . setApplicatio... |
public class AbstractJMXAgent { /** * ( non - Javadoc )
* @ see net . timewalker . ffmq4 . jmx . JMXAgent # register ( javax . management . ObjectName , java . lang . Object ) */
@ Override public final void register ( ObjectName name , Object mBean ) throws JMSException { } } | log . debug ( "Registering object " + name ) ; try { this . mBeanServer . registerMBean ( mBean , name ) ; } catch ( Exception e ) { throw new FFMQException ( "Cannot register MBean" , "JMX_ERROR" , e ) ; } |
public class CmsWidgetDialogParameter { /** * Initializes a widget parameter with the given values . < p >
* @ param value the initial value of the parameter
* @ param defaultValue the default value of the parameter
* @ param name the id of the parameter
* @ param widget the widget used for this parameter
* @... | if ( defaultValue == null ) { m_defaultValue = "" ; } else { m_defaultValue = defaultValue ; } if ( value == null ) { m_value = m_defaultValue ; } else { m_value = value ; } m_name = name ; m_widget = widget ; if ( maxOccurs < MAX_OCCURENCES ) { m_maxOccurs = maxOccurs ; } else { m_maxOccurs = MAX_OCCURENCES ; } if ( m... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.