signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ConverterServerBuilder { /** * Creates the conversion server that is specified by this builder . * @ return The conversion server that is specified by this builder . */ public HttpServer build ( ) { } }
checkNotNull ( baseUri ) ; StandaloneWebConverterConfiguration configuration = makeConfiguration ( ) ; // The configuration has to be configured both by a binder to make it injectable // and directly in order to trigger life cycle methods on the deployment container . ResourceConfig resourceConfig = ResourceConfig . fo...
public class CmsResourceUtil { /** * Returns the lock state of the current resource . < p > * @ return the lock state of the current resource */ public int getLockState ( ) { } }
if ( CmsStringUtil . isEmptyOrWhitespaceOnly ( getLockedByName ( ) ) ) { // unlocked return 0 ; } if ( ! getLockedByName ( ) . equals ( getCurrentOuRelativeName ( m_request . getCurrentUser ( ) . getName ( ) ) ) || ! getLockedInProjectId ( ) . equals ( m_request . getCurrentProject ( ) . getUuid ( ) ) ) { // locked by ...
public class Controller { /** * Directly map a value to a input field . * @ param val * @ param to * @ param to _ in */ void mapInVal ( Object val , Object to , String to_in ) { } }
if ( val == null ) { throw new ComponentException ( "Null value for " + name ( to , to_in ) ) ; } if ( to == ca . getComponent ( ) ) { throw new ComponentException ( "field and component ar ethe same for mapping :" + to_in ) ; } ComponentAccess ca_to = lookup ( to ) ; Access to_access = ca_to . input ( to_in ) ; checkF...
public class WebSphereCDIDeploymentImpl { /** * Add a Set of BDAs to the deployment * @ param bdas the BDAs to add * @ throws CDIException */ @ Override public void addBeanDeploymentArchives ( Set < WebSphereBeanDeploymentArchive > bdas ) throws CDIException { } }
for ( WebSphereBeanDeploymentArchive bda : bdas ) { addBeanDeploymentArchive ( bda ) ; }
public class NotificationsActor { /** * Processing Conversation hidden event * @ param peer peer */ public void onConversationHidden ( Peer peer ) { } }
if ( visiblePeer != null && visiblePeer . equals ( peer ) ) { this . visiblePeer = null ; }
public class LocalPDBDirectory { /** * Download a file from the ftp server , replacing any existing files if needed * @ param pdbId PDB ID * @ param pathOnServer Path on the FTP server , e . g . data / structures / divided / pdb * @ param obsolete Whether or not file should be saved to the obsolete location local...
File dir = getDir ( pdbId , obsolete ) ; File realFile = new File ( dir , getFilename ( pdbId ) ) ; String ftp ; if ( getFilename ( pdbId ) . endsWith ( ".mmtf.gz" ) ) { ftp = CodecUtils . getMmtfEntryUrl ( pdbId , true , false ) ; } else { ftp = String . format ( "%s%s/%s/%s" , serverName , pathOnServer , pdbId . subs...
public class LinearLayout { /** * When set to true , all items in layout will be considered having the size of the largest child . If false , all items are * measured normally . Disabled by default . * @ param enable true to measure children using the size of the largest child , false - otherwise . */ public void e...
if ( mUniformSize != enable ) { mUniformSize = enable ; if ( mContainer != null ) { mContainer . onLayoutChanged ( this ) ; } }
public class ErrorReportDialog { /** * Get the previous step given the current . Will check available steps to confirm . * @ param currentStep * @ return */ private int getPreviousStep ( int currentStep ) { } }
int prevStep = - 1 ; // we find the next available step . for ( int i = currentStep - 1 ; i >= STEP_LOGIN ; i -- ) { if ( isStepEnabled ( i ) ) { prevStep = i ; break ; } } return prevStep ;
public class AbstractMvnTemplateProviderElement { @ Override public ITemplateSource createTemplateSource ( Template < ? > template , String source ) { } }
try { return new JarTemplateSource ( getTemplatePath ( template ) , source ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; }
public class Tools { /** * Accepts our ElasticSearch time formats without milliseconds . * @ return A DateTimeFormatter suitable to parse an ES _ DATE _ FORMAT formatted string to a * DateTime Object even if it contains no milliseconds . */ public static DateTimeFormatter timeFormatterWithOptionalMilliseconds ( ) {...
// This is the . SSS part DateTimeParser ms = new DateTimeFormatterBuilder ( ) . appendLiteral ( "." ) . appendFractionOfSecond ( 1 , 3 ) . toParser ( ) ; return new DateTimeFormatterBuilder ( ) . append ( DateTimeFormat . forPattern ( ES_DATE_FORMAT_NO_MS ) . withZoneUTC ( ) ) . appendOptional ( ms ) . toFormatter ( )...
public class NavMeshQuery { /** * / @ returns The status flags for the query . */ public Result < FindDistanceToWallResult > findDistanceToWall ( long startRef , float [ ] centerPos , float maxRadius , QueryFilter filter ) { } }
// Validate input if ( ! m_nav . isValidPolyRef ( startRef ) || Objects . isNull ( centerPos ) || ! vIsFinite ( centerPos ) || maxRadius < 0 || ! Float . isFinite ( maxRadius ) || Objects . isNull ( filter ) ) { return Result . invalidParam ( ) ; } m_nodePool . clear ( ) ; m_openList . clear ( ) ; Node startNode = m_no...
public class LinkedProperties { /** * { @ inheritDoc } */ @ Override public String getProperty ( String key ) { } }
Object oval = linkMap . get ( key ) ; String sval = ( oval instanceof String ) ? ( String ) oval : null ; return ( ( sval == null ) && ( defaults != null ) ) ? defaults . getProperty ( key ) : sval ;
public class TeaServlet { /** * Initializes the TeaServlet . Creates the logger and loads the user ' s * application . * @ param config the servlet config */ public void init ( ServletConfig config ) throws ServletException { } }
super . init ( config ) ; mServletConfig = config ; config . getServletContext ( ) . log ( "Initializing TeaServlet..." ) ; String ver = System . getProperty ( "java.version" ) ; if ( ver . startsWith ( "0." ) || ver . startsWith ( "1.2" ) || ver . startsWith ( "1.3" ) ) { config . getServletContext ( ) . log ( "The Te...
public class TemporalProposition { /** * Returns the earliest valid time of this proposition as a medium - length * string . * @ return a < code > String < / code > . */ public final String getFinishFormattedMedium ( ) { } }
Granularity finishGran = this . interval . getFinishGranularity ( ) ; return formatFinish ( finishGran != null ? finishGran . getMediumFormat ( ) : null ) ;
public class UnrelatedCollectionContents { /** * performs a typical set intersection between what types of possible superclasses / interfaces has been seen before , for this collection , and what is now * seen . * @ param orig * the existing set of superclasses used for this collection * @ param add * the cur...
Iterator < String > it = orig . iterator ( ) ; while ( it . hasNext ( ) ) { if ( ! add . contains ( it . next ( ) ) ) { it . remove ( ) ; } }
public class RequestQueue { /** * Called from { @ link Request # finish ( String ) } , indicating that processing of the given request * has finished . * < p > Releases waiting requests for < code > request . getCacheKey ( ) < / code > if * < code > request . shouldCache ( ) < / code > . < / p > */ < T > void fin...
// Remove from the set of requests currently being processed . synchronized ( mCurrentRequests ) { mCurrentRequests . remove ( request ) ; } synchronized ( mFinishedListeners ) { for ( RequestFinishedListener < T > listener : mFinishedListeners ) { listener . onRequestFinished ( request ) ; } } if ( request . shouldCac...
public class MonitoringServiceImpl { /** * Execute all filters for the event . * @ param event the event * @ return true , if successful */ private boolean filter ( Event event ) { } }
for ( EventFilter filter : eventFilters ) { if ( filter . filter ( event ) ) { return true ; } } return false ;
public class LoggingOutputStream { /** * Flushes this output stream and forces any buffered output bytes to be * written out . The general contract of < code > flush < / code > is that * calling it is an indication that , if any bytes previously written * have been buffered by the implementation of the output str...
if ( count == 0 ) { return ; } byte [ ] theBytes = new byte [ count ] ; System . arraycopy ( buf , 0 , theBytes , 0 , count ) ; logMessageAccordingToLogLevelFilter ( theBytes ) ; reset ( ) ;
public class LinkClustering { /** * Returns the partition density of the clustering solution . */ public double getSolutionDensity ( int solutionNum ) { } }
if ( solutionNum < 0 || solutionNum >= mergeOrder . size ( ) ) { throw new IllegalArgumentException ( "not a valid solution: " + solutionNum ) ; } if ( mergeOrder == null || edgeList == null ) { throw new IllegalStateException ( "initial clustering solution is not valid yet" ) ; } int numEdges = edgeList . size ( ) ; /...
public class SparseVector { /** * Calculates alpha * a * @ param alpha * @ return */ public SparseVector scale ( double alpha ) { } }
SparseVector a = this ; SparseVector c = new SparseVector ( N ) ; for ( int i : a . symbolTable ) c . put ( i , alpha * a . get ( i ) ) ; return c ;
public class PushStrategy { /** * Generate serialised JSON strings and / or MIME multipart / related writer objects for revisions * which are missing on the server * @ param allTrees batch of document trees , keyed by document ID , in local database * @ param revisions { @ code MissingRevisions } objects , keyed ...
ItemsToPush itemsToPush = new ItemsToPush ( ) ; for ( Map . Entry < String , CouchClient . MissingRevisions > e : revisions . entrySet ( ) ) { String docId = e . getKey ( ) ; Set < String > missingRevisions = e . getValue ( ) . missing ; DocumentRevisionTree tree = allTrees . get ( docId ) ; for ( String rev : missingR...
public class LoggingDecoratorBuilder { /** * Sets the { @ link Function } to use to sanitize request and response content before logging . It is common * to have the { @ link Function } that removes sensitive content , such as an GPS location query and * an address , before logging . If unset , will use { @ link Fu...
requireNonNull ( contentSanitizer , "contentSanitizer" ) ; requestContentSanitizer ( contentSanitizer ) ; responseContentSanitizer ( contentSanitizer ) ; return self ( ) ;
public class RestBuilder { /** * Creates a provider handler into routing * @ param provider to be executed on every request * @ param < T > provided object to insert into @ Context * @ return builder */ public < T > RestBuilder provide ( ContextProvider < T > provider ) { } }
Assert . notNull ( provider , "Missing context provider!" ) ; contextProviders . add ( provider ) ; return this ;
public class CmsDialog { /** * Returns the custom mapping for the online help . < p > * @ return the custom mapping for the online help */ public String getOnlineHelpUriCustom ( ) { } }
if ( m_onlineHelpUriCustom == null ) { return null ; } StringBuffer result = new StringBuffer ( m_onlineHelpUriCustom . length ( ) + 4 ) ; result . append ( "\"" ) ; result . append ( m_onlineHelpUriCustom ) ; result . append ( "\"" ) ; return result . toString ( ) ;
public class TransformationPerformer { /** * Loads the object for the given field name from the temporary fields . If an error occurs , the complete path * ( inclusive nested names ) are given in an exception . */ private Object loadObjectFromTemporary ( String fieldname , String complete ) throws Exception { } }
String realName = fieldname . substring ( 1 ) ; if ( ! temporaryFields . containsKey ( realName ) ) { String message = String . format ( "The temporary field %s doesn't exist." , complete ) ; throw new IllegalArgumentException ( message ) ; } return temporaryFields . get ( realName ) ;
public class XmlInOut { /** * Parses this XML text and place it in new records . * @ param record The record to place this parsed XML into ( If this is null , the file name is supplied in the XML ) . * @ param filename The XML file to parse . */ public boolean importXML ( BaseTable table , String filename , InputSt...
Record record = table . getRecord ( ) ; XmlInOut . enableAllBehaviors ( record , false , false ) ; DocumentBuilder db = Utility . getDocumentBuilder ( ) ; DocumentBuilder stringdb = Utility . getDocumentBuilder ( ) ; // Parse the input file Document doc = null ; try { synchronized ( db ) { if ( inStream != null ) doc =...
public class IStringBuffer { /** * delete the char at the specified position */ public IStringBuffer deleteCharAt ( int idx ) { } }
if ( idx < 0 ) throw new IndexOutOfBoundsException ( "idx < 0" ) ; if ( idx >= count ) throw new IndexOutOfBoundsException ( "idx >= buffer.length" ) ; // here we got a bug for j < count // change over it to count - 1 // thanks for the feedback of xuyijun @ gmail . com // @ date 2013-08-22 for ( int j = idx ; j < count...
public class WorkspaceDirectory { /** * The identifiers of the IP access control groups associated with the directory . * @ param ipGroupIds * The identifiers of the IP access control groups associated with the directory . */ public void setIpGroupIds ( java . util . Collection < String > ipGroupIds ) { } }
if ( ipGroupIds == null ) { this . ipGroupIds = null ; return ; } this . ipGroupIds = new com . amazonaws . internal . SdkInternalList < String > ( ipGroupIds ) ;
public class UIUtils { /** * change 20150812161819 to 2015-08-12 16:18 */ public static String prettyDateTime ( String time ) { } }
if ( time . length ( ) < 12 ) return time ; StringBuilder sb = new StringBuilder ( ) ; sb . append ( time . substring ( 0 , 4 ) ) . append ( "-" ) . append ( time . substring ( 4 , 6 ) ) . append ( "-" ) . append ( time . substring ( 6 , 8 ) ) ; sb . append ( " " ) . append ( time . substring ( 8 , 10 ) ) . append ( ":...
public class Space { /** * Check if the given space can be merged with this one . It must have * an adjacent edge and have the same height or width as this space . * @ param other The other space to be considered * @ return True if the spaces can be joined together */ public boolean canMerge ( Space other ) { } }
if ( ! hasJoinedEdge ( other ) ) { return false ; } if ( ( x == other . x ) && ( width == other . width ) ) { return true ; } if ( ( y == other . y ) && ( height == other . height ) ) { return true ; } return false ;
public class DupFilterAxis { /** * { @ inheritDoc } */ @ Override public final boolean hasNext ( ) { } }
resetToLastKey ( ) ; while ( mAxis . hasNext ( ) ) { // call next ( ) , if it was not already called for that axis . if ( mCallNext ) { mAxis . next ( ) ; } // add current item key to the set . If true is returned the item is // no // duplicate and can be returned by the duplicate filter . if ( mDupSet . add ( getNode ...
public class MultiStringDistance { /** * Prepare a string . */ final public StringWrapper prepare ( String s ) { } }
MultiStringWrapper ms = new MultiStringWrapper ( s , delim ) ; if ( ! isLegalMultiStringWrapperSize ( ms . size ( ) ) ) { throw new IllegalArgumentException ( "string has invalid number of fields" ) ; } for ( int i = 0 ; i < ms . size ( ) ; i ++ ) { ms . set ( i , getDistance ( i ) . prepare ( ms . get ( i ) . unwrap (...
public class NotificationsApi { /** * Subscribe to CometD channel notification * See the [ CometD documentation ] ( https : / / docs . cometd . org / current / reference / # _ bayeux _ meta _ subscribe ) for details . For a list of all available channels , see the [ CometD section ] ( / reference / workspace / index ...
com . squareup . okhttp . Call call = notificationsSubscribeValidateBeforeCall ( null , null ) ; return apiClient . execute ( call ) ;
public class CassandraClientBase { /** * Creates secondary indexes on columns if not already created . * @ param m * the m * @ param tableName * Column family name * @ param columns * List of columns * @ param columnType * the column type */ protected void createIndexesOnColumns ( EntityMetadata m , Str...
Object pooledConnection = null ; try { Cassandra . Client api = null ; pooledConnection = getConnection ( ) ; api = ( org . apache . cassandra . thrift . Cassandra . Client ) getConnection ( pooledConnection ) ; KsDef ksDef = api . describe_keyspace ( m . getSchema ( ) ) ; List < CfDef > cfDefs = ksDef . getCf_defs ( )...
public class TextCommandFactory { /** * Create verbosity command * @ param latch * @ param level * @ param noreply * @ return */ public final Command createVerbosityCommand ( CountDownLatch latch , int level , boolean noreply ) { } }
return new TextVerbosityCommand ( latch , level , noreply ) ;
public class WordVectorSerializer { /** * This method restores previously saved w2v model . File can be in one of the following formats : * 1 ) Binary model , either compressed or not . Like well - known Google Model * 2 ) Popular CSV word2vec text format * 3 ) DL4j compressed format * In return you get StaticW...
File tmpFile = DL4JFileUtils . createTempFile ( "word2vec" + System . currentTimeMillis ( ) , ".tmp" ) ; FileUtils . copyInputStreamToFile ( inputStream , tmpFile ) ; try { return loadStaticModel ( tmpFile ) ; } finally { tmpFile . delete ( ) ; }
public class ValidationMatcherUtils { /** * This method resolves a custom validationMatcher to its respective result . * @ param fieldName the name of the field * @ param fieldValue the value of the field * @ param validationMatcherExpression to evaluate . * @ param context the test context */ public static voi...
String expression = VariableUtils . cutOffVariablesPrefix ( cutOffValidationMatchersPrefix ( validationMatcherExpression ) ) ; if ( expression . equals ( "ignore" ) ) { expression += "()" ; } int bodyStart = expression . indexOf ( '(' ) ; if ( bodyStart < 0 ) { throw new CitrusRuntimeException ( "Illegal syntax for val...
public class RestletUtilMemoryRealm { /** * Maps a user defined in a component to a role defined in the application . * @ param user * The source user . * @ param role * The target role . */ public void map ( final User user , final Role role ) { } }
this . getRoleMappings ( ) . add ( new RoleMapping ( user , role ) ) ;
public class AbstractJPAComponent { /** * 465813 / / switch to ' bindings ' d511673 */ @ Override public boolean hasAppManagedPC ( Collection < InjectionBinding < ? > > injectionBindings , String ejbName , Set < String > persistenceRefNames ) { } }
return JPAExEntityManager . hasAppManagedPC ( injectionBindings , ejbName , persistenceRefNames ) ; // F743-30682
public class BlacklistFilter { /** * Sets the addresses to be blacklisted . * NOTE : this call will remove any previously blacklisted addresses . * @ param addresses an array of addresses to be blacklisted . */ public void setBlacklist ( InetAddress [ ] addresses ) { } }
if ( addresses == null ) { throw new NullPointerException ( "addresses" ) ; } blacklist . clear ( ) ; for ( int i = 0 ; i < addresses . length ; i ++ ) { InetAddress addr = addresses [ i ] ; block ( addr ) ; }
public class PlayEngine { /** * Performs the processes needed for VOD / pre - recorded streams . * @ param withReset * whether or not to perform reset on the stream * @ param itemLength * length of the item to be played * @ return message for the consumer * @ throws IOException */ private final IMessage pla...
IMessage msg = null ; // change state subscriberStream . setState ( StreamState . PLAYING ) ; if ( withReset ) { releasePendingMessage ( ) ; } sendVODInitCM ( currentItem . get ( ) ) ; // Don ' t use pullAndPush to detect IOExceptions prior to sending NetStream . Play . Start int start = ( int ) currentItem . get ( ) ....
public class XmlSchemaParser { /** * Validate the document against a given schema . Error will be written to { @ link java . lang . System # err } * @ param xsdFilename schema to validate against . * @ param is source from which schema is read . Ideally it will have the systemId property set to resolve * relative...
final DocumentBuilderFactory factory = DocumentBuilderFactory . newInstance ( ) ; final SchemaFactory schemaFactory = SchemaFactory . newInstance ( XMLConstants . W3C_XML_SCHEMA_NS_URI ) ; factory . setSchema ( schemaFactory . newSchema ( new File ( xsdFilename ) ) ) ; factory . setNamespaceAware ( true ) ; if ( option...
public class CircuitsExtractorImpl { /** * CircuitsExtractor */ @ Override public Map < Circuit , Collection < TileRef > > getCircuits ( Collection < Media > levels , Media sheetsConfig , Media groupsConfig ) { } }
final Collection < MapTile > mapsSet = new HashSet < > ( levels . size ( ) ) ; for ( final Media level : levels ) { final Services services = new Services ( ) ; final MapTile map = services . create ( MapTileGame . class ) ; map . create ( level , sheetsConfig ) ; final MapTileGroup mapGroup = map . addFeatureAndGet ( ...
public class CompareAssert { /** * Equivalent for * < pre > * . withNodeMatcher ( new DefaultNodeMatcher ( ElementSelectors . byNameAndText ) ) * . withDifferenceEvaluator ( * chain ( * Default , * DifferenceEvaluators . downgradeDifferencesToEqual ( ComparisonType . CHILD _ NODELIST _ SEQUENCE ) ) ) ; * ...
diffBuilder . withNodeMatcher ( new DefaultNodeMatcher ( ElementSelectors . byNameAndText ) ) ; diffBuilder . withDifferenceEvaluator ( chain ( Default , IgnoreNodeListSequence ) ) ; return this ;
public class MStress_Client { /** * Recursively creates directories and files . * @ param level current level of depth * @ param parentPath the prefix to the path we have traversed into so far * @ return - 1 on error , 0 on success */ private static int CreateDFSPaths ( int level , String parentPath ) { } }
Boolean isLeaf = false ; Boolean isDir = false ; if ( level + 1 >= levels_ ) { isLeaf = true ; } if ( isLeaf ) { if ( type_ . equals ( "dir" ) ) { isDir = true ; } else { isDir = false ; } } else { isDir = true ; } for ( int i = 0 ; i < inodesPerLevel_ ; i ++ ) { String path = parentPath + "/" + prefix_ + Integer . toS...
public class OptionsAndArgs { /** * Lookup the JAR File from where this class is loaded * @ return File pointing to the JAR - File from where this class was loaded . */ public static File lookupJarFile ( ) { } }
try { return new File ( OptionsAndArgs . class . getProtectionDomain ( ) . getCodeSource ( ) . getLocation ( ) . toURI ( ) ) ; } catch ( URISyntaxException e ) { throw new IllegalStateException ( "Error: Cannot lookup jar for this class: " + e , e ) ; }
public class KbTermWrapper { /** * = = = = | Public methods | = = = = = / / */ @ Override public boolean provablyNotInstanceOf ( KbCollection col , Context ctx ) { } }
return wrapped ( ) . provablyNotInstanceOf ( col , ctx ) ;
public class GlobalAddressClient { /** * Returns the specified address resource . Gets a list of available addresses by making a list ( ) * request . * < p > Sample code : * < pre > < code > * try ( GlobalAddressClient globalAddressClient = GlobalAddressClient . create ( ) ) { * ProjectGlobalAddressName addre...
GetGlobalAddressHttpRequest request = GetGlobalAddressHttpRequest . newBuilder ( ) . setAddress ( address ) . build ( ) ; return getGlobalAddress ( request ) ;
public class SqlHelper { /** * 获取表名 - 支持动态表名 , 该方法用于多个入参时 , 通过parameterName指定入参中实体类的 @ Param的注解值 * @ param entityClass * @ param tableName * @ param parameterName * @ return */ public static String getDynamicTableName ( Class < ? > entityClass , String tableName , String parameterName ) { } }
if ( IDynamicTableName . class . isAssignableFrom ( entityClass ) ) { if ( StringUtil . isNotEmpty ( parameterName ) ) { StringBuilder sql = new StringBuilder ( ) ; sql . append ( "<choose>" ) ; sql . append ( "<when test=\"@tk.mybatis.mapper.util.OGNL@isDynamicParameter(" + parameterName + ") and " + parameterName + "...
public class PrivateZonesInner { /** * Creates or updates a Private DNS zone . Does not modify Links to virtual networks or DNS records within the zone . * @ param resourceGroupName The name of the resource group . * @ param privateZoneName The name of the Private DNS zone ( without a terminating dot ) . * @ para...
return ServiceFuture . fromResponse ( createOrUpdateWithServiceResponseAsync ( resourceGroupName , privateZoneName , parameters , ifMatch , ifNoneMatch ) , serviceCallback ) ;
public class ns_vlan { /** * Use this API to fetch filtered set of ns _ vlan resources . * filter string should be in JSON format . eg : " vm _ state : DOWN , name : [ a - z ] + " */ public static ns_vlan [ ] get_filtered ( nitro_service service , String filter ) throws Exception { } }
ns_vlan obj = new ns_vlan ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; ns_vlan [ ] response = ( ns_vlan [ ] ) obj . getfiltered ( service , option ) ; return response ;
public class WebDavServletFactory { /** * Creates a new Jetty ServletContextHandler , that can be be added to a servletCollection as follows : * < pre > * ServletContextHandler context = factory . create ( . . . ) ; * servletCollection . addHandler ( context ) ; * servletCollection . mapContexts ( ) ; * < / p...
WebDavServletModule webDavServletModule = new WebDavServletModule ( rootPath , contextPath ) ; contextPaths . add ( contextPath ) ; return component . newWebDavServletComponent ( webDavServletModule ) ;
public class MetricDataResult { /** * The timestamps for the data points , formatted in Unix timestamp format . The number of timestamps always matches * the number of values and the value for Timestamps [ x ] is Values [ x ] . * @ param timestamps * The timestamps for the data points , formatted in Unix timestam...
setTimestamps ( timestamps ) ; return this ;
public class AmazonElasticFileSystemClient { /** * Creates a new , empty file system . The operation requires a creation token in the request that Amazon EFS uses to * ensure idempotent creation ( calling the operation with same creation token has no effect ) . If a file system does * not currently exist that is ow...
request = beforeClientExecution ( request ) ; return executeCreateFileSystem ( request ) ;
public class ObjectOriginIdentifierImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setMedID ( byte [ ] newMedID ) { } }
byte [ ] oldMedID = medID ; medID = newMedID ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . OBJECT_ORIGIN_IDENTIFIER__MED_ID , oldMedID , medID ) ) ;
public class JimfsFileStore { /** * Sets initial attributes on the given file . Sets default attributes first , then attempts to set * the given user - provided attributes . */ void setInitialAttributes ( File file , FileAttribute < ? > ... attrs ) { } }
state . checkOpen ( ) ; attributes . setInitialAttributes ( file , attrs ) ;
public class SslCipherSuites { /** * String array . */ public static String [ ] resolveCSV ( String csv ) { } }
List < String > resolved ; if ( csv != null && ! csv . equals ( "" ) ) { String [ ] elts = csv . split ( "," ) ; List < String > tokens = new ArrayList < > ( elts . length ) ; for ( String elt : elts ) { tokens . add ( elt . trim ( ) ) ; } resolved = resolve ( tokens ) ; } else { // No ' ssl . ciphers ' configured ? Us...
public class Crowd { /** * / @ return True if the request was successfully submitted . */ public boolean requestMoveVelocity ( int idx , float [ ] vel ) { } }
if ( idx < 0 || idx >= m_maxAgents ) { return false ; } CrowdAgent ag = m_agents [ idx ] ; // Initialize request . ag . targetRef = 0 ; vCopy ( ag . targetPos , vel ) ; ag . targetPathqRef = PathQueue . DT_PATHQ_INVALID ; ag . targetReplan = false ; ag . targetState = MoveRequestState . DT_CROWDAGENT_TARGET_VELOCITY ; ...
public class SimpleTimeManager { /** * { @ inheritDoc } */ public Date getNextBusinessDate ( LocalDate baseDate , int addedDay ) { } }
assertBusinessTimeHandler ( ) ; return businessTimeHandler . getNextBusinessDate ( baseDate , addedDay ) ;
public class JCudaDriver { /** * Copies memory from Device to Host . * < pre > * CUresult cuMemcpyDtoH ( * void * dstHost , * CUdeviceptr srcDevice , * size _ t ByteCount ) * < / pre > * < div > * < p > Copies memory from Device to Host . * Copies from device to host memory . < tt > dstHost < / tt > a...
return checkResult ( cuMemcpyDtoHNative ( dstHost , srcDevice , ByteCount ) ) ;
public class WMultiFileWidget { /** * Retrieves the File at the given index . Will throw an { @ link IndexOutOfBoundsException } if < code > index < / code > is * not in the range of the list of items . * @ param fileId the file id * @ return The FileWidgetUpload for the file id or null */ public FileWidgetUpload...
for ( FileWidgetUpload file : getFiles ( ) ) { if ( Util . equals ( file . getFileId ( ) , fileId ) ) { return file ; } } return null ;
public class StyleSet { /** * 设置单元格背景样式 * @ param backgroundColor 背景色 * @ param withHeadCell 是否也定义头部样式 * @ return this * @ since 4.0.0 */ public StyleSet setBackgroundColor ( IndexedColors backgroundColor , boolean withHeadCell ) { } }
if ( withHeadCell ) { StyleUtil . setColor ( this . headCellStyle , backgroundColor , FillPatternType . SOLID_FOREGROUND ) ; } StyleUtil . setColor ( this . cellStyle , backgroundColor , FillPatternType . SOLID_FOREGROUND ) ; StyleUtil . setColor ( this . cellStyleForNumber , backgroundColor , FillPatternType . SOLID_F...
public class OutboundVirtualConnectionImpl { /** * This method is called when there is a problem with the * connectAsync call further down the stack . This will just * be used as a pass through . * @ param e */ public void destroy ( Exception e ) { } }
if ( this . appCallback != null ) { this . appCallback . destroy ( e ) ; this . appCallback = null ; }
public class GoogleMapShapeConverter { /** * Convert a list of { @ link com . google . android . gms . maps . model . Polygon } to a * { @ link MultiPolygon } * @ param polygonList polygon list * @ return multi polygon */ public MultiPolygon toMultiPolygon ( List < com . google . android . gms . maps . model . Po...
return toMultiPolygon ( polygonList , false , false ) ;
public class ListBase { /** * { @ inheritDoc } * This method will NOT change the underline list * @ param seq the sequence to be prepended * @ return the prepended sequence */ @ Override public C . Sequence < T > prepend ( C . Sequence < ? extends T > seq ) { } }
if ( seq instanceof C . List ) { return prependList ( ( C . List < T > ) seq ) ; } if ( isLazy ( ) ) { return new CompositeSeq < T > ( seq , this ) ; } return unLazyPrepend ( seq ) ;
public class TransformerFactoryImpl { /** * Process the source into a Transformer object . Care must * be given to know that this object can not be used concurrently * in multiple threads . * @ param source An object that holds a URL , input stream , etc . * @ return A Transformer object capable of * being us...
try { Templates tmpl = newTemplates ( source ) ; /* this can happen if an ErrorListener is present and it doesn ' t throw any exception in fatalError . The spec says : " a Transformer must use this interface instead of throwing an exception " - the newTemplates ( ) does that , and returns null . */ if ( tmpl ==...
public class BottomSheet { /** * Sets the style , which should be used to display the bottom sheet ' s items . * @ param style * The style , which should be set , as a value of the enum { @ link Style } . The style may * either be < code > LIST < / code > , < code > LIST _ COLUMNS < / code > or < code > GRID < / ...
Condition . INSTANCE . ensureNotNull ( style , "The style may not be null" ) ; adapter . setStyle ( style ) ; adaptRootView ( ) ; adaptTitleView ( ) ; adaptContentView ( ) ; adaptGridViewHeight ( ) ;
public class UrlAccessRestrictionCheckingProcessor { /** * Sets the map of restrictions . Each key of the map is ANT - style path pattern , used to match the URLs of incoming * requests , and each value is a Spring EL expression . */ @ Required public void setUrlRestrictions ( Map < String , String > restrictions ) {...
urlRestrictions = new LinkedHashMap < > ( ) ; ExpressionParser parser = new SpelExpressionParser ( ) ; for ( Map . Entry < String , String > entry : restrictions . entrySet ( ) ) { urlRestrictions . put ( entry . getKey ( ) , parser . parseExpression ( entry . getValue ( ) ) ) ; }
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcDoorLiningProperties ( ) { } }
if ( ifcDoorLiningPropertiesEClass == null ) { ifcDoorLiningPropertiesEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 171 ) ; } return ifcDoorLiningPropertiesEClass ;
public class StrBuilder { /** * Copies the builder ' s character array into a new character array . * @ return a new array that represents the contents of the builder */ public char [ ] toCharArray ( ) { } }
if ( size == 0 ) { return ArrayUtils . EMPTY_CHAR_ARRAY ; } final char chars [ ] = new char [ size ] ; System . arraycopy ( buffer , 0 , chars , 0 , size ) ; return chars ;
public class CmsLoginController { /** * Displays the given error message . < p > * @ param message the message * @ param showForgotPassword in case the forgot password link should be shown * @ param showTime show the time */ private void displayError ( String message , boolean showForgotPassword , boolean showTim...
message = message . replace ( "\n" , "<br />" ) ; if ( showForgotPassword ) { message += "<br /><br /><a href=\"" + getResetPasswordLink ( ) + "\">" + CmsVaadinUtils . getMessageText ( Messages . GUI_FORGOT_PASSWORD_0 ) + "</a>" ; } if ( showTime ) { SimpleDateFormat sdf = new SimpleDateFormat ( "HH:mm:ss" ) ; message ...
public class AutoScalingGroup { /** * The suspended processes associated with the group . * @ param suspendedProcesses * The suspended processes associated with the group . */ public void setSuspendedProcesses ( java . util . Collection < SuspendedProcess > suspendedProcesses ) { } }
if ( suspendedProcesses == null ) { this . suspendedProcesses = null ; return ; } this . suspendedProcesses = new com . amazonaws . internal . SdkInternalList < SuspendedProcess > ( suspendedProcesses ) ;
public class RequestUtils { /** * Checks if the given header contains a valid authentication * @ param cookie The cookie to parse * @ return True if the cookie contains a valid authentication , false otherwise */ public static boolean hasValidAuthentication ( String cookie ) { } }
boolean valid = false ; if ( StringUtils . isNotBlank ( cookie ) ) { Config config = Application . getInstance ( Config . class ) ; String value = null ; String [ ] contents = cookie . split ( ";" ) ; for ( String content : contents ) { if ( StringUtils . isNotBlank ( content ) && content . startsWith ( config . getAut...
public class AsyncChangeStream { /** * Returns a { @ link Task } whose resolution gives the next event from the underlying stream . * @ return task providing the next event * @ throws IOException if the underlying stream throws an { @ link IOException } */ @ Override @ SuppressWarnings ( "unchecked" ) public Task <...
return dispatcher . dispatchTask ( new Callable < ChangeEventT > ( ) { @ Override public ChangeEventT call ( ) throws Exception { final StitchEvent < ChangeEventT > nextEvent = ( StitchEvent < ChangeEventT > ) getInternalStream ( ) . nextEvent ( ) ; if ( nextEvent == null ) { return null ; } if ( nextEvent . getError (...
public class CalligraphyUtils { /** * Tries to pull the Font Path from the View Style as this is the next decendent after being * defined in the View ' s xml . * @ param context Activity Activity Context * @ param attrs View Attributes * @ param attributeId if - 1 returns null . * @ return null if attribute i...
if ( attributeId == null || attrs == null ) return null ; final TypedArray typedArray = context . obtainStyledAttributes ( attrs , attributeId ) ; if ( typedArray != null ) { try { // First defined attribute String fontFromAttribute = typedArray . getString ( 0 ) ; if ( ! TextUtils . isEmpty ( fontFromAttribute ) ) { r...
public class Cron4jJob { @ Override public void registerNext ( LaJobKey triggeredJobKey ) { } }
// uses triggered lock instead of synchronize verifyCanScheduleState ( ) ; assertArgumentNotNull ( "triggeredJobKey" , triggeredJobKey ) ; // lazy check for initialization logic // if ( ! cron4jNow . findJobByKey ( triggeredJobKey ) . isPresent ( ) ) { // throw new IllegalArgumentException ( " Not found the job by the ...
public class ClassLoader { /** * Returns the class with the given < a href = " # name " > binary name < / a > if this * loader has been recorded by the Java virtual machine as an initiating * loader of a class with that < a href = " # name " > binary name < / a > . Otherwise * < tt > null < / tt > is returned . ...
try { return SystemClassLoader . loader . findClass ( name ) ; } catch ( ClassNotFoundException e ) { return null ; }
public class LoggingUtils { /** * Logs an unexpected exception in the same way LoggingFilter would . */ public static void log ( IoSession session , Logger logger , Throwable t ) { } }
log ( session , logger , t . toString ( ) , t ) ;
public class PusherInternal { /** * - ( void ) processInbox : ( CBL _ RevisionList * ) changes in CBLRestPusher . m */ @ Override @ InterfaceAudience . Private protected void processInbox ( final RevisionList changes ) { } }
Log . v ( TAG , "processInbox() changes=" + changes . size ( ) ) ; // Generate a set of doc / rev IDs in the JSON format that _ revs _ diff wants : // < http : / / wiki . apache . org / couchdb / HttpPostRevsDiff > Map < String , List < String > > diffs = new HashMap < String , List < String > > ( ) ; for ( RevisionInt...
public class CmsLockManager { /** * Adds a resource to the lock manager . < p > * @ param dbc the current database context * @ param resource the resource * @ param user the user who locked the resource * @ param project the project where the resource is locked * @ param type the lock type * @ throws CmsLoc...
// check the type if ( ! type . isSystem ( ) && ! type . isExclusive ( ) ) { // invalid type throw new CmsLockException ( Messages . get ( ) . container ( Messages . ERR_INVALID_LOCK_TYPE_1 , type . toString ( ) ) ) ; } // get the current lock CmsLock currentLock = getLock ( dbc , resource ) ; // check lockability chec...
public class MessageRouterImpl { /** * Add the LogHandler ref . 1 or more LogHandlers may be set . */ public void setLogHandler ( String id , LogHandler ref ) { } }
if ( id != null && ref != null ) { logHandlerServices . put ( id , ref ) ; }
public class SubCommandMetaCheck { /** * Checks if metadata is consistent across all nodes . * @ param adminClient An instance of AdminClient points to given cluster * @ param metaKeys List of metakeys to check */ public static void doMetaCheck ( AdminClient adminClient , List < String > metaKeys ) { } }
Map < String , Integer > roStoreToReplicationFactorMap = new HashMap < String , Integer > ( ) ; Collection < Node > allNodes = adminClient . getAdminClientCluster ( ) . getNodes ( ) ; for ( String key : metaKeys ) { Map < String , Map < Object , List < String > > > storeDefToNodeMap = new HashMap < String , Map < Objec...
public class ReactiveBeacons { /** * Creates an observable stream of BLE beacons , which can be subscribed with RxJava * Uses appropriate BLE scan strategy according to Android version installed on a device * @ return Observable stream of beacons */ @ SuppressLint ( "MissingPermission" ) @ RequiresPermission ( anyO...
ACCESS_COARSE_LOCATION , ACCESS_FINE_LOCATION } ) public Observable < Beacon > observe ( ) { if ( ! isBleSupported ( ) ) { return Observable . empty ( ) ; } if ( isAtLeastAndroidLollipop ( ) ) { scanStrategy = new LollipopScanStrategy ( bluetoothAdapter ) ; } else { scanStrategy = new PreLollipopScanStrategy ( bluetoot...
public class BacnetClient { /** * bacnet devices */ public BacnetDevice getDevice ( long gatewayid , long instanceNumber ) { } }
InternalRequest internalRequest = createRequest ( new GenericAccountRequest ( ) , HttpMethodName . GET , BACNET , DEVICE , GATEWAY , String . valueOf ( gatewayid ) , DEVICE , String . valueOf ( instanceNumber ) ) ; return this . invokeHttpClient ( internalRequest , BacnetDevice . class ) ;
public class UpdateParameterGroupRequest { /** * An array of name - value pairs for the parameters in the group . Each element in the array represents a single * parameter . * @ param parameterNameValues * An array of name - value pairs for the parameters in the group . Each element in the array represents a * ...
if ( parameterNameValues == null ) { this . parameterNameValues = null ; return ; } this . parameterNameValues = new java . util . ArrayList < ParameterNameValue > ( parameterNameValues ) ;
public class DocumentationUtils { /** * Create the HTML for a link to the operation / shape core AWS docs site * @ param metadata the UID for the service from that services metadata * @ param name the name of the shape / request / operation * @ return a ' @ see also ' HTML link to the doc */ public static String ...
if ( isCrossLinkingEnabledForService ( metadata ) ) { return String . format ( "@see <a href=\"http://%s/goto/WebAPI/%s/%s\" target=\"_top\">AWS API Documentation</a>" , AWS_DOCS_HOST , metadata . getUid ( ) , name ) ; } return "" ;
public class CmsObjectWrapper { /** * Delegate method for { @ link CmsObject # readPropertyObject ( CmsResource , String , boolean ) } . < p > * @ see CmsObject # readPropertyObject ( CmsResource , String , boolean ) * @ param resource the resource where the property is attached to * @ param property the property...
return m_cms . readPropertyObject ( resource , property , search ) ;
public class BlockBasedDataStoreTools { /** * Find recycled journal files for a given base name * @ param baseName * @ param dataFolder * @ return an array of journal files */ public static File [ ] findRecycledJournalFiles ( String baseName , File dataFolder ) { } }
final String journalBase = baseName + JournalFile . SUFFIX ; File [ ] recycledFiles = dataFolder . listFiles ( new FileFilter ( ) { /* * ( non - Javadoc ) * @ see java . io . FileFilter # accept ( java . io . File ) */ @ Override public boolean accept ( File pathname ) { if ( ! pathname . isFile ( ) ) return false ; ...
public class JDBCMBeanRuntime { /** * no need for an updatedJdbcDriver because changes will not impact the mbean */ private static BundleContext getBundleContext ( final Bundle bundle ) { } }
if ( System . getSecurityManager ( ) == null ) return bundle . getBundleContext ( ) ; else return AccessController . doPrivileged ( new PrivilegedAction < BundleContext > ( ) { @ Override public BundleContext run ( ) { return bundle . getBundleContext ( ) ; } } ) ;
public class ConfigurationUtils { /** * Extracts the local state directories as defined by * { @ link CheckpointingOptions # LOCAL _ RECOVERY _ TASK _ MANAGER _ STATE _ ROOT _ DIRS } . * @ param configuration configuration object * @ return array of configured directories ( in order ) */ @ Nonnull public static S...
String configValue = configuration . getString ( CheckpointingOptions . LOCAL_RECOVERY_TASK_MANAGER_STATE_ROOT_DIRS , "" ) ; return splitPaths ( configValue ) ;
public class JDBCExceptionTransformer { /** * Examines the SQLSTATE code of the given SQL exception and determines if * it is a generic constaint violation . */ public boolean isConstraintError ( SQLException e ) { } }
if ( e != null ) { String sqlstate = e . getSQLState ( ) ; if ( sqlstate != null ) { return sqlstate . startsWith ( SQLSTATE_CONSTRAINT_VIOLATION_CLASS_CODE ) ; } } return false ;
public class SecondsBasedEntryTaskScheduler { /** * Return all composite keys with the given { @ code key } */ private Set < CompositeKey > getCompositeKeys ( K key ) { } }
Set < CompositeKey > candidateKeys = new HashSet < CompositeKey > ( ) ; for ( Object keyObj : secondsOfKeys . keySet ( ) ) { CompositeKey compositeKey = ( CompositeKey ) keyObj ; if ( compositeKey . getKey ( ) . equals ( key ) ) { candidateKeys . add ( compositeKey ) ; } } return candidateKeys ;
public class AWSDatabaseMigrationServiceClient { /** * Deletes the specified replication task . * @ param deleteReplicationTaskRequest * @ return Result of the DeleteReplicationTask operation returned by the service . * @ throws ResourceNotFoundException * The resource could not be found . * @ throws InvalidR...
request = beforeClientExecution ( request ) ; return executeDeleteReplicationTask ( request ) ;
public class ImportApi { /** * Get import status . * Get all active imports for the specified tenant . * @ param adminName The login name of an administrator for the tenant . ( required ) * @ param tenantName The name of the tenant . ( required ) * @ return ApiResponse & lt ; GetImportStatusResponse & gt ; * ...
com . squareup . okhttp . Call call = getImportStatusValidateBeforeCall ( adminName , tenantName , null , null ) ; Type localVarReturnType = new TypeToken < GetImportStatusResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class OrExpressionImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } }
switch ( featureID ) { case SimpleAntlrPackage . OR_EXPRESSION__LEFT : return getLeft ( ) ; case SimpleAntlrPackage . OR_EXPRESSION__RIGHT : return getRight ( ) ; } return super . eGet ( featureID , resolve , coreType ) ;
public class DataSiftPush { /** * Check that the subscription details are correct * @ return the results of the validation */ public < T extends PushConnector > FutureData < PushValidation > validate ( T connector ) { } }
FutureData < PushValidation > future = new FutureData < > ( ) ; URI uri = newParams ( ) . forURL ( config . newAPIEndpointURI ( VALIDATE ) ) ; POST request = config . http ( ) . POST ( uri , new PageReader ( newRequestCallback ( future , new PushValidation ( ) , config ) ) ) . form ( "output_type" , connector . type ( ...
public class TextMateGenerator2 { /** * Generate the rules for the standard keywords . * @ param keywords the standard keywords . * @ return the rules . */ protected List < Map < String , ? > > generateStandardKeywords ( Set < String > keywords ) { } }
final List < Map < String , ? > > list = new ArrayList < > ( ) ; if ( ! keywords . isEmpty ( ) ) { list . add ( pattern ( it -> { it . matches ( keywordRegex ( keywords ) ) ; it . style ( KEYWORD_STYLE ) ; it . comment ( "Standard Keywords" ) ; // $ NON - NLS - 1 $ } ) ) ; } return list ;
public class SpringMessageResolver { /** * { @ inheritDoc } */ @ Override public Optional < String > getMessage ( final String code ) { } }
try { return Optional . of ( messageSourceAccessor . getMessage ( code ) ) ; } catch ( NoSuchMessageException e ) { return Optional . empty ( ) ; }
public class PolicyDescription { /** * The policy attributes . * @ param policyAttributeDescriptions * The policy attributes . */ public void setPolicyAttributeDescriptions ( java . util . Collection < PolicyAttributeDescription > policyAttributeDescriptions ) { } }
if ( policyAttributeDescriptions == null ) { this . policyAttributeDescriptions = null ; return ; } this . policyAttributeDescriptions = new com . amazonaws . internal . SdkInternalList < PolicyAttributeDescription > ( policyAttributeDescriptions ) ;
public class Util { /** * makes MD5 hash of string for use with RouterOS API * @ param s - variable to make hash from * @ return - the md5 hash */ static String hashMD5 ( String s ) throws ApiDataException { } }
MessageDigest algorithm = null ; try { algorithm = MessageDigest . getInstance ( "MD5" ) ; } catch ( NoSuchAlgorithmException nsae ) { throw new ApiDataException ( "Cannot find MD5 digest algorithm" ) ; } byte [ ] defaultBytes = new byte [ s . length ( ) ] ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { defaultBytes ...