signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class OptionsCertificatePanel { /** * This method initializes this */ private void initialize ( ) { } }
contextManager = Model . getSingleton ( ) . getOptionsParam ( ) . getCertificateParam ( ) . getSSLContextManager ( ) ; keyStoreListModel = new DefaultListModel < > ( ) ; aliasTableModel = new AliasTableModel ( contextManager ) ; this . setLayout ( new CardLayout ( ) ) ; this . setName ( Constant . messages . getString ...
public class Coin { /** * < p > Parses an amount expressed in the way humans are used to . < / p > * < p > This takes string in a format understood by { @ link BigDecimal # BigDecimal ( String ) } , for example " 0 " , " 1 " , " 0.10 " , * " 1.23E3 " , " 1234.5E - 5 " . < / p > * @ throws IllegalArgumentException...
try { long satoshis = new BigDecimal ( str ) . movePointRight ( SMALLEST_UNIT_EXPONENT ) . longValueExact ( ) ; return Coin . valueOf ( satoshis ) ; } catch ( ArithmeticException e ) { throw new IllegalArgumentException ( e ) ; // Repackage exception to honor method contract }
public class ConcurrentWebDriverFactory { /** * enables Webdriver usage of the same from different threads ( handles locks internally ) . This locks an already in use instance . * < i > Difference to < tt > ThreadGuard < / tt > : < / i > It does not forbid usage of a single webdriver by different threads . * based ...
ClassLoader classLoader = webDriver . getClass ( ) . getClassLoader ( ) ; List < Class < ? > > interfaces = ClassUtils . getAllInterfaces ( webDriver . getClass ( ) ) ; InvocationHandler invocationHandler = new SynchronizedWebDriverInvocationHandler ( webDriver ) ; return ( WebDriver ) Proxy . newProxyInstance ( classL...
public class DefaultQueryParamsParser { /** * < strong > Important ! < / strong > Katharsis implementation differs form JSON API * < a href = " http : / / jsonapi . org / format / # fetching - filtering " > definition of filtering < / a > * in order to fit standard query parameter serializing strategy and maximize ...
String filterKey = RestrictedQueryParamsMembers . filter . name ( ) ; Map < String , Set < String > > filters = filterQueryParamsByKey ( context , filterKey ) ; Map < String , Map < String , Set < String > > > temporaryFiltersMap = new LinkedHashMap < > ( ) ; for ( Map . Entry < String , Set < String > > entry : filter...
public class CoverTree { /** * Splits a given pointSet into near and far based on the given * scale / level . All points with distance > base ^ maxScale would be moved * to far set . In other words , all those points that are not covered by the * next child ball of a point p ( ball made of the same point p but of...
double fmax = getCoverRadius ( maxScale ) ; ArrayList < DistanceSet > newSet = new ArrayList < > ( ) ; for ( int i = 0 ; i < pointSet . size ( ) ; i ++ ) { DistanceSet n = pointSet . get ( i ) ; if ( n . dist . get ( n . dist . size ( ) - 1 ) <= fmax ) { newSet . add ( n ) ; } else { farSet . add ( n ) ; } } pointSet ....
public class OqlBuilder { /** * groupBy . * @ param what a { @ link java . lang . String } object . * @ return a { @ link org . beangle . commons . dao . query . builder . OqlBuilder } object . */ public OqlBuilder < T > groupBy ( final String what ) { } }
if ( Strings . isNotEmpty ( what ) ) { groups . add ( what ) ; } return this ;
public class GVRTextureParameters { /** * Returns an integer array that contains the current values for all the * texture parameters . * @ return an integer array that contains the current values for all the * texture parameters . */ public int [ ] getCurrentValuesArray ( ) { } }
int [ ] currentValues = new int [ 5 ] ; currentValues [ 0 ] = getMinFilterType ( ) . getFilterValue ( ) ; // MIN FILTER currentValues [ 1 ] = getMagFilterType ( ) . getFilterValue ( ) ; // MAG FILTER currentValues [ 2 ] = getAnisotropicValue ( ) ; // ANISO FILTER currentValues [ 3 ] = getWrapSType ( ) . getWrapValue ( ...
public class TrainingsImpl { /** * Get a specific iteration . * @ param projectId The id of the project the iteration belongs to * @ param iterationId The id of the iteration to get * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the Iteration object */ ...
return getIterationWithServiceResponseAsync ( projectId , iterationId ) . map ( new Func1 < ServiceResponse < Iteration > , Iteration > ( ) { @ Override public Iteration call ( ServiceResponse < Iteration > response ) { return response . body ( ) ; } } ) ;
public class STUNResolver { /** * Load the STUN configuration from a stream . * @ param stunConfigStream An InputStream with the configuration file . * @ return A list of loaded servers */ public ArrayList < STUNService > loadSTUNServers ( java . io . InputStream stunConfigStream ) { } }
ArrayList < STUNService > serversList = new ArrayList < > ( ) ; String serverName ; int serverPort ; try { XmlPullParser parser = XmlPullParserFactory . newInstance ( ) . newPullParser ( ) ; parser . setFeature ( XmlPullParser . FEATURE_PROCESS_NAMESPACES , true ) ; parser . setInput ( stunConfigStream , "UTF-8" ) ; in...
public class OagBuilder { /** * Computes DS , the completion of IDS using A . ( Definition 5 ) . */ public Graph < Attribute > [ ] createDS ( Graph < Attribute > [ ] ids , List < Attribute > [ ] [ ] a ) { } }
int i ; Graph < Attribute > [ ] ds ; ds = new Graph [ ids . length ] ; for ( i = 0 ; i < ds . length ; i ++ ) { ds [ i ] = createDSx ( ids [ i ] , a [ i ] ) ; } return ds ;
public class BaasDocument { /** * Synchronously fetches a document from the server * @ param collection the collection to retrieve the document from . Not < code > null < / code > * @ param id the id of the document to retrieve . Not < code > null < / code > * @ return the result of the request */ public static B...
return fetchSync ( collection , id , false ) ;
public class FNCImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setFNPRGLen ( Integer newFNPRGLen ) { } }
Integer oldFNPRGLen = fnprgLen ; fnprgLen = newFNPRGLen ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . FNC__FNPRG_LEN , oldFNPRGLen , fnprgLen ) ) ;
public class ObjectWrapper { /** * Internal : Static version of { @ link ObjectWrapper # getIndexedValue ( Property , int ) } . */ @ SuppressWarnings ( "unchecked" ) private static Object getIndexedValue ( Object obj , Property property , int index , ObjectWrapper options ) { } }
if ( property == null ) { throw new IllegalArgumentException ( "Cannot get the indexed value from 'null' property." ) ; } Object propertyValue = property . get ( obj ) ; if ( propertyValue == null ) { throw new NullPointerException ( "Invalid 'null' value found for indexed '" + property + "' in " + obj . getClass ( ) ....
public class Solo { /** * Swipes with two fingers in a linear path determined by starting and ending points . Requires API level > = 14. * @ param startPoint1 First " finger " down on the screen * @ param startPoint2 Second " finger " down on the screen * @ param endPoint1 Corresponding ending point of startPoint...
if ( config . commandLogging ) { Log . d ( config . commandLoggingTag , "swipe(" + startPoint1 + ", " + startPoint2 + ", " + endPoint1 + ", " + endPoint2 + ")" ) ; } if ( android . os . Build . VERSION . SDK_INT < 14 ) { throw new RuntimeException ( "swipe() requires API level >= 14" ) ; } swiper . generateSwipeGesture...
public class JSLocalConsumerPoint { /** * Returns true if this LCP is closed . * @ return */ public boolean isClosed ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "isClosed" , this ) ; SibTr . exit ( tc , "isClosed" , Boolean . valueOf ( _closed ) ) ; } return _closed ;
public class FullScreenImageGalleryActivity { /** * region FullScreenImageGalleryAdapter . FullScreenImageLoader Methods */ @ Override public void loadFullScreenImage ( ImageView iv , String imageUrl , int width , LinearLayout bglinearLayout ) { } }
fullScreenImageLoader . loadFullScreenImage ( iv , imageUrl , width , bglinearLayout ) ;
public class DomConfigurationWriter { /** * Externalizes a { @ link HadoopClusterInformation } to a XML element . * @ param hadoopClusterInformation the hadoopClusterInformation to externalize * @ return a XML element representing the datastore . */ public Element toElement ( final HadoopClusterInformation hadoopCl...
final Element hadoopClusterElement = getDocument ( ) . createElement ( "hadoop-cluster" ) ; hadoopClusterElement . setAttribute ( "name" , hadoopClusterInformation . getName ( ) ) ; final String description = hadoopClusterInformation . getDescription ( ) ; if ( ! Strings . isNullOrEmpty ( description ) ) { hadoopCluste...
public class AbstractCircleController { /** * Return the circle ' s radius in world length units . */ protected double getWorldRadius ( ) { } }
if ( center != null ) { Coordinate screenEndPoint = new Coordinate ( center . getX ( ) + radius , center . getY ( ) ) ; Coordinate worldEndPoint = mapWidget . getMapModel ( ) . getMapView ( ) . getWorldViewTransformer ( ) . viewToWorld ( screenEndPoint ) ; double deltaX = worldEndPoint . getX ( ) - getWorldCenter ( ) ....
public class GuildController { /** * Used to move a { @ link net . dv8tion . jda . core . entities . Member Member } from one { @ link net . dv8tion . jda . core . entities . VoiceChannel VoiceChannel } * to another { @ link net . dv8tion . jda . core . entities . VoiceChannel VoiceChannel } . * < br > As a note , ...
Checks . notNull ( member , "Member" ) ; Checks . notNull ( voiceChannel , "VoiceChannel" ) ; checkGuild ( member . getGuild ( ) , "Member" ) ; checkGuild ( voiceChannel . getGuild ( ) , "VoiceChannel" ) ; GuildVoiceState vState = member . getVoiceState ( ) ; if ( vState == null ) throw new IllegalStateException ( "Can...
public class AbstractComponentDecoration { /** * Gets the effective clipping ancestor . * If no custom clipping ancestor is set , the parent container of the decorated component will be returned . * @ return Effective clipping ancestor . */ private JComponent getEffectiveClippingAncestor ( ) { } }
JComponent clippingComponent = clippingAncestor ; if ( ( clippingComponent == null ) && ( decoratedComponent != null ) ) { // No specific clipping ancestor specified by the programmer , so try to find one // Keep a reference to the best alternative candidate if no other proper ancestor can be found Container lastNonNul...
public class ConfigPropertyUtils { /** * Create a regular expression which will match any of the values from the supplied enum type */ public static < T extends Enum < T > > Pattern createValidationPatternFromEnumType ( Class < T > enumType ) { } }
String regEx = Stream . of ( enumType . getEnumConstants ( ) ) . map ( Enum :: name ) . collect ( Collectors . joining ( "|" , "(?i)" , "" ) ) ; // Enum constants may contain $ which needs to be escaped regEx = regEx . replace ( "$" , "\\$" ) ; return Pattern . compile ( regEx ) ;
public class AWSMediaStoreDataClient { /** * Provides a list of metadata entries about folders and objects in the specified folder . * @ param listItemsRequest * @ return Result of the ListItems operation returned by the service . * @ throws ContainerNotFoundException * The specified container was not found for...
request = beforeClientExecution ( request ) ; return executeListItems ( request ) ;
public class PSBroker { /** * Subscribes the subscriber to the given type of message . * @ param < T > * - The class to subscribe to . * @ param subscriber * - The subscriber . * @ param messageType * - The type of message to subscribe to . * @ exception SubscriberTypeMismatchException * the type the su...
subscribeStrategy . subscribe ( mapping , subscriber , messageType ) ;
public class FileOperations { /** * Copy the content of the source file to the destination file using * { @ link FileChannel } . This version seems to fail with UNC paths . * @ param aSrcFile * Source file . May not be < code > null < / code > . * @ param aDestFile * Destination file . May not be < code > nul...
final FileChannel aSrcChannel = FileChannelHelper . getFileReadChannel ( aSrcFile ) ; if ( aSrcChannel == null ) return ESuccess . FAILURE ; try { final FileChannel aDstChannel = FileChannelHelper . getFileWriteChannel ( aDestFile , EAppend . TRUNCATE ) ; if ( aDstChannel == null ) return ESuccess . FAILURE ; try { Fil...
public class AggregationIntervalHelperImpl { /** * Return a sorted list of AcademicTermDetail objects where the the first element of the list * where the first element is the first term that starts after the specified start DateTime . */ protected List < AcademicTermDetail > getAcademicTermsAfter ( DateTime start ) {...
final List < AcademicTermDetail > terms = this . eventAggregationManagementDao . getAcademicTermDetails ( ) ; final int index = Collections . binarySearch ( terms , new AcademicTermDetailImpl ( start . toDateMidnight ( ) , start . plusDays ( 1 ) . toDateMidnight ( ) , "" ) ) ; if ( index > 0 ) { return terms . subList ...
public class web { /** * Check if can connect to the server , also this method will need the * permissions " android . permission . INTERNET " * @ param serverURL - server url * @ return true if the connection returned a successful code */ public static boolean checkServerConnection ( String serverURL ) { } }
boolean value = false ; try { value = new RetrieveCheckServerConnectionString ( ) . execute ( serverURL ) . get ( ) ; } catch ( InterruptedException e ) { QuickUtils . log . e ( "InterruptedException" , e ) ; } catch ( ExecutionException e ) { QuickUtils . log . e ( "ExecutionException" , e ) ; } return value ;
public class ParseUtils { /** * Read an element which contains only a single list attribute of a given * type . * @ param reader the reader * @ param attributeName the attribute name , usually " value " * @ param type the value type class * @ param < T > the value type * @ return the value list * @ throws...
"unchecked" , "WeakerAccess" } ) public static < T > List < T > readListAttributeElement ( final XMLExtendedStreamReader reader , final String attributeName , final Class < T > type ) throws XMLStreamException { requireSingleAttribute ( reader , attributeName ) ; // todo : fix this when this method signature is correct...
public class SyncWriter { /** * ( non - Javadoc ) * @ see org . springframework . batch . core . StepExecutionListener # afterStep ( org . * springframework . batch . core . StepExecution ) */ @ Override public ExitStatus afterStep ( StepExecution stepExecution ) { } }
ExitStatus status = stepExecution . getExitStatus ( ) ; List < String > errors = getErrors ( ) ; if ( errors . isEmpty ( ) ) { try { RestoreStatus newStatus = RestoreStatus . TRANSFER_TO_DURACLOUD_COMPLETE ; restoreManager . transitionRestoreStatus ( restorationId , newStatus , "" ) ; // restore the snapshot props file...
public class NormalizedKeySorter { /** * Writes the records in this buffer in their logical order to the given output . * @ param output The output view to write the records to . * @ throws IOException Thrown , if an I / O exception occurred writing to the output view . */ @ Override public void writeToOutput ( fin...
int recordsLeft = this . numRecords ; int currentMemSeg = 0 ; while ( recordsLeft > 0 ) { final MemorySegment currentIndexSegment = this . sortIndex . get ( currentMemSeg ++ ) ; int offset = 0 ; // check whether we have a full or partially full segment if ( recordsLeft >= this . indexEntriesPerSegment ) { // full segme...
public class AbstractLIBORCovarianceModelParametric { /** * Performs a generic calibration of the parametric model by * trying to match a given vector of calibration product to a given vector of target values * using a given vector of weights . * Optional calibration parameters may be passed using the map calibra...
if ( calibrationParameters == null ) { calibrationParameters = new HashMap < String , Object > ( ) ; } Integer numberOfPathsParameter = ( Integer ) calibrationParameters . get ( "numberOfPaths" ) ; Integer seedParameter = ( Integer ) calibrationParameters . get ( "seed" ) ; Integer maxIterationsParameter = ( Integer ) ...
public class DensityTree { /** * Sets min fitness . * @ param minFitness the min fitness * @ return the min fitness */ @ javax . annotation . Nonnull public com . simiacryptus . util . data . DensityTree setMinFitness ( double minFitness ) { } }
this . minFitness = minFitness ; return this ;
public class SolrEventLogSubscriber { /** * Initializes the plugin using the specified JSON configuration * @ param jsonFile JSON configuration file * @ throws SubscriberException if there was an error in initialization */ @ Override public void init ( File jsonFile ) throws SubscriberException { } }
try { setConfig ( new JsonSimpleConfig ( jsonFile ) ) ; } catch ( IOException ioe ) { throw new SubscriberException ( ioe ) ; }
public class ClassInfo { /** * Get the default parameter values for this annotation , if this is an annotation class . * @ return A list of { @ link AnnotationParameterValue } objects for each of the default parameter values for this * annotation , if this is an annotation class with default parameter values , othe...
if ( ! scanResult . scanSpec . enableAnnotationInfo ) { throw new IllegalArgumentException ( "Please call ClassGraph#enableAnnotationInfo() before #scan()" ) ; } if ( ! isAnnotation ) { throw new IllegalArgumentException ( "Class is not an annotation: " + getName ( ) ) ; } if ( annotationDefaultParamValues == null ) { ...
public class ConfigFactory { /** * Like { @ link # load ( Config ) } but allows you to specify * { @ link ConfigResolveOptions } . * @ param config * the application ' s portion of the configuration * @ param resolveOptions * options for resolving the assembled config stack * @ return resolved configuration...
return load ( checkedContextClassLoader ( "load" ) , config , resolveOptions ) ;
public class Histogram { /** * Returns a map of range - & gt ; event count . The elements of the stream are * a mutable copy of the internal data . */ public Stream < RangeWithCount > stream ( ) { } }
return buckets_ . stream ( ) . map ( bucket -> new RangeWithCount ( bucket . getRange ( ) , bucket . getEvents ( ) ) ) ;
public class GLFWInput { /** * Converts GLFW modifier key flags into PlayN modifier key flags . */ private int toModifierFlags ( int mods ) { } }
return modifierFlags ( ( mods & GLFW_MOD_ALT ) != 0 , ( mods & GLFW_MOD_CONTROL ) != 0 , ( mods & GLFW_MOD_SUPER ) != 0 , ( mods & GLFW_MOD_SHIFT ) != 0 ) ;
public class DB { /** * Creates a taxonomy term . * @ param taxonomy The taxonomy . * @ param name The term name . * @ param slug The term slug . * @ param description The taxonomy term description . * @ return The created term . * @ throws SQLException on database error . */ public TaxonomyTerm createTaxon...
Term term = createTerm ( name , slug ) ; Connection conn = null ; PreparedStatement stmt = null ; ResultSet rs = null ; Timer . Context ctx = metrics . createTaxonomyTermTimer . time ( ) ; try { conn = connectionSupplier . getConnection ( ) ; stmt = conn . prepareStatement ( insertTaxonomyTermSQL , Statement . RETURN_G...
public class DockerRuleBuilder { /** * Dynamic link . * Define ( legacy ) container links ( equaivalent of command - line < code > - - link " targetContainerId : alias " < / code > * where targetContainerId will be substituted after target container start ) . * Legacy links works only on docker < code > bridge < ...
LinkNameValidator . validateContainerName ( alias ) ; dynamicLinks . add ( Pair . of ( targetContainer , alias ) ) ; return this ;
public class MessageProcessorMatching { /** * Method retrieveNonSelectorConsumers * Performs a search against the MatchSpace in order to retrieve the set of * consumers ( registered without selectors ) that match a fully qualified * topic expression . * @ param topicSpace * @ param discriminatorExpression *...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "retrieveNonSelectorConsumers" , new Object [ ] { topicSpace , discriminatorExpression } ) ; // Get the uuid for the topicspace SIBUuid12 topicSpaceUuid = topicSpace . getBaseUuid ( ) ; String topicSpaceStr = topicSpaceUuid ...
public class ActivityChooserModel { /** * Sets the default activity . The default activity is set by adding a * historical record with weight high enough that this activity will * become the highest ranked . Such a strategy guarantees that the default * will eventually change if not used . Also the weight of the ...
synchronized ( mInstanceLock ) { ensureConsistentState ( ) ; ActivityResolveInfo newDefaultActivity = mActivities . get ( index ) ; ActivityResolveInfo oldDefaultActivity = mActivities . get ( 0 ) ; final float weight ; if ( oldDefaultActivity != null ) { // Add a record with weight enough to boost the chosen at the to...
public class JdbcMapperFactory { /** * Associate the specified Getter for the specified property . * @ param key the property * @ param getter the getter * @ return the current factory */ public JdbcMapperFactory addCustomGetter ( String key , Getter < ResultSet , ? > getter ) { } }
return addColumnDefinition ( key , FieldMapperColumnDefinition . < JdbcColumnKey > customGetter ( getter ) ) ;
public class MPIO { /** * Initialize the MP I / O component . * @ param CEL TRM ' s implementation of the CommsErrorListener interface . * @ param RM TRM ' s implementation of the RoutingManager interface . */ public void init ( CommsErrorListener CEL , RoutingManager RM ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "init" , new Object [ ] { CEL , RM } ) ; // Lock exclusively for start operations mpioLockManager . lockExclusive ( ) ; _commsErrorListener = CEL ; _routingManager = RM ; synchronized ( _mpConnectionsByMEConnection ) { _mpCo...
public class CDKMCS { /** * Determines if 2 bondA1 have 1 atom in common if second is atom query AtomContainer * @ param atom1 first bondA1 * @ param bondB1 second bondA1 * @ return the symbol of the common atom or " " if * the 2 bonds have no common atom */ private static boolean queryAdjacency ( IBond bondA1 ...
IAtom atom1 = null ; IAtom atom2 = null ; if ( bondA1 . contains ( bondB1 . getBegin ( ) ) ) { atom1 = bondB1 . getBegin ( ) ; } else if ( bondA1 . contains ( bondB1 . getEnd ( ) ) ) { atom1 = bondB1 . getEnd ( ) ; } if ( bondA2 . contains ( bondB2 . getBegin ( ) ) ) { atom2 = bondB2 . getBegin ( ) ; } else if ( bondA2...
public class DbxClientV1 { /** * Same as { @ link # getMetadataWithChildren } except instead of always returning a list of * { @ link DbxEntry } objects , you specify a { @ link Collector } that processes the { @ link DbxEntry } * objects one by one and aggregates them however you want . * This allows your to pro...
return getMetadataWithChildrenBase ( path , includeMediaInfo , new DbxEntry . WithChildrenC . ReaderMaybeDeleted < C > ( collector ) ) ;
public class KeybindComponent { /** * Creates a keybind component with content , and optional color and decorations . * @ param keybind the keybind * @ param color the color * @ param decorations the decorations * @ return the keybind component */ public static KeybindComponent of ( final @ NonNull String keybi...
return builder ( keybind ) . color ( color ) . decorations ( decorations , true ) . build ( ) ;
public class IoUtil { /** * Convert an { @ link InputStream } to a { @ link String } * @ param inputStream the { @ link InputStream } to convert * @ param trim trigger if whitespaces are trimmed in the output * @ return the resulting { @ link String } * @ throws IOException */ private static String getStringFro...
BufferedReader bufferedReader = null ; StringBuilder stringBuilder = new StringBuilder ( ) ; try { bufferedReader = new BufferedReader ( new InputStreamReader ( inputStream ) ) ; String line ; while ( ( line = bufferedReader . readLine ( ) ) != null ) { if ( trim ) { stringBuilder . append ( line . trim ( ) ) ; } else ...
public class FactoryDescribePointAlgs { /** * todo remove filterBlur for all BRIEF change to radius , sigma , type */ public static < T extends ImageGray < T > > DescribePointBriefSO < T > briefso ( BinaryCompareDefinition_I32 definition , BlurFilter < T > filterBlur ) { } }
Class < T > imageType = filterBlur . getInputType ( ) . getImageClass ( ) ; InterpolatePixelS < T > interp = FactoryInterpolation . bilinearPixelS ( imageType , BorderType . EXTENDED ) ; return new DescribePointBriefSO < > ( definition , filterBlur , interp ) ;
public class ssl_key { /** * < pre > * Converts API response of bulk operation into object and returns the object array in case of get request . * < / pre > */ protected base_resource [ ] get_nitro_bulk_response ( nitro_service service , String response ) throws Exception { } }
ssl_key_responses result = ( ssl_key_responses ) service . get_payload_formatter ( ) . string_to_resource ( ssl_key_responses . class , response ) ; if ( result . errorcode != 0 ) { if ( result . errorcode == SESSION_NOT_EXISTS ) service . clear_session ( ) ; throw new nitro_exception ( result . message , result . erro...
public class JobDetail { /** * Additional parameters passed to the job that replace parameter substitution placeholders or override any * corresponding parameter defaults from the job definition . * @ param parameters * Additional parameters passed to the job that replace parameter substitution placeholders or ov...
setParameters ( parameters ) ; return this ;
public class PartitionManagerImpl { /** * Return the entries assigned for a node into a partition . * The returned entries are represented by a Map < String , List < String > > where : * - key is a tenantId * - value is a List of triggersId assigned to the tenant * @ param partition the partition used internall...
Map < String , List < String > > nodePartition = new HashMap < > ( ) ; if ( partition != null ) { for ( Entry < PartitionEntry , Integer > entry : partition . entrySet ( ) ) { if ( entry . getValue ( ) . equals ( node ) ) { add ( nodePartition , entry . getKey ( ) ) ; } } } return nodePartition ;
public class GetConsoleOutputRequest { /** * This method is intended for internal use only . Returns the marshaled request configured with additional * parameters to enable operation dry - run . */ @ Override public Request < GetConsoleOutputRequest > getDryRunRequest ( ) { } }
Request < GetConsoleOutputRequest > request = new GetConsoleOutputRequestMarshaller ( ) . marshall ( this ) ; request . addParameter ( "DryRun" , Boolean . toString ( true ) ) ; return request ;
public class IntegerMapper { /** * { @ inheritDoc } */ @ Override protected Integer doBase ( String name , Object value ) { } }
if ( value instanceof Number ) { return ( ( Number ) value ) . intValue ( ) ; } else if ( value instanceof Date ) { return SimpleDateSerializer . timeInMillisToDay ( ( ( Date ) value ) . getTime ( ) ) ; } else if ( value instanceof String ) { try { return Double . valueOf ( ( String ) value ) . intValue ( ) ; } catch (...
public class DataTree { /** * this method sets up the path trie and sets up stats for quota nodes */ private void setupQuota ( ) { } }
String quotaPath = Quotas . quotaZookeeper ; DataNode node = getNode ( quotaPath ) ; if ( node == null ) { return ; } traverseNode ( quotaPath ) ;
public class DescribeWorkspacesRequest { /** * The identifiers of the WorkSpaces . You cannot combine this parameter with any other filter . * Because the < a > CreateWorkspaces < / a > operation is asynchronous , the identifier it returns is not immediately * available . If you immediately call < a > DescribeWorks...
if ( workspaceIds == null ) { this . workspaceIds = null ; return ; } this . workspaceIds = new com . amazonaws . internal . SdkInternalList < String > ( workspaceIds ) ;
public class SummonerTeamService { /** * Invite a player to the target team * @ param summonerId The id of the player * @ param teamId The id of the team * @ return The new team state */ public Team invitePlayer ( long summonerId , TeamId teamId ) { } }
return client . sendRpcAndWait ( SERVICE , "invitePlayer" , summonerId , teamId ) ;
public class MAPParameterFactoryImpl { /** * ( non - Javadoc ) * @ see org . restcomm . protocols . ss7 . map . api . MAPParameterFactory # createUnstructuredSSNotifyRequestIndication ( byte , * org . restcomm . protocols . ss7 . map . api . primitives . USSDString , * org . restcomm . protocols . ss7 . map . api...
UnstructuredSSNotifyRequest request = new UnstructuredSSNotifyRequestImpl ( ussdDataCodingSch , ussdString , alertingPattern , msisdnAddressString ) ; return request ;
public class BallView { /** * To complete . */ public void resetScale ( ) { } }
ScaleTransitionBuilder . create ( ) . duration ( Duration . millis ( 400 ) ) . node ( node ( ) ) . toX ( 1f ) . toY ( 1f ) . cycleCount ( 1 ) . autoReverse ( false ) . build ( ) . play ( ) ;
public class RoleAssignmentsInner { /** * Get the specified role assignment . * @ param scope The scope of the role assignment . * @ param roleAssignmentName The name of the role assignment to get . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws CloudException thrown if ...
return getWithServiceResponseAsync ( scope , roleAssignmentName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class AbstractSortFilterDataProvider { /** * { @ inheritDoc } */ @ Override public Iterator < ? extends T > iterator ( final long first , final long count ) { } }
List < T > ret = new ArrayList < > ( filter ( sort ( ) ) ) ; if ( ret . size ( ) > ( first + count ) ) { ret = ret . subList ( ( int ) first , ( int ) first + ( int ) count ) ; } else { ret = ret . subList ( ( int ) first , ret . size ( ) ) ; } return ret . iterator ( ) ;
public class Utils { /** * Parse the given string and return a list of the whitespace - delimited tokens that it * contains mapped to the number of occurrences of each token . Only whitespace * characters ( SP , CR , LF , TAB , FF , VT ) are used to delimit tokens . * @ param string String to be tokenized . * @...
Map < String , AtomicInteger > result = new HashMap < String , AtomicInteger > ( ) ; String [ ] tokens = string . split ( "\\s" ) ; // regular expression for " all whitespace " for ( String token : tokens ) { // For some reasons , sometimes split ( ) creates empty values . if ( token . length ( ) == 0 ) { continue ; } ...
public class LBiObjLongPredicateBuilder { /** * One of ways of creating builder . This might be the only way ( considering all _ functional _ builders ) that might be utilize to specify generic params only once . */ @ Nonnull public static < T1 , T2 > LBiObjLongPredicateBuilder < T1 , T2 > biObjLongPredicate ( Consumer...
return new LBiObjLongPredicateBuilder ( consumer ) ;
public class CSL { /** * Checks if the given String contains the serialized XML representation * of a style * @ param style the string to examine * @ return true if the String is XML , false otherwise */ private boolean isStyle ( String style ) { } }
for ( int i = 0 ; i < style . length ( ) ; ++ i ) { char c = style . charAt ( i ) ; if ( ! Character . isWhitespace ( c ) ) { return ( c == '<' ) ; } } return false ;
public class VoltNetwork { /** * Register a channel with the selector and create a Connection that will pass incoming events * to the provided handler . * @ param channel * @ param handler * @ throws IOException */ Connection registerChannel ( final SocketChannel channel , final InputHandler handler , final int...
synchronized ( channel . blockingLock ( ) ) { channel . configureBlocking ( false ) ; channel . socket ( ) . setKeepAlive ( true ) ; } Callable < Connection > registerTask = new Callable < Connection > ( ) { @ Override public Connection call ( ) throws Exception { final VoltPort port = VoltPortFactory . createVoltPort ...
public class LinkProperties { /** * Create a { @ link LinkProperties } object based on the latest link click . * @ return A { @ link LinkProperties } object based on the latest link click or a null if there is no link click registered for this session */ public static LinkProperties getReferredLinkProperties ( ) { } ...
LinkProperties linkProperties = null ; Branch branchInstance = Branch . getInstance ( ) ; if ( branchInstance != null && branchInstance . getLatestReferringParams ( ) != null ) { JSONObject latestParam = branchInstance . getLatestReferringParams ( ) ; try { if ( latestParam . has ( "+clicked_branch_link" ) && latestPar...
public class ViewGroupMvpViewStateDelegateImpl { /** * Generates the unique ( mosby internal ) viewState id and calls { @ link * MvpDelegateCallback # createPresenter ( ) } * to create a new presenter instance * @ return The new created presenter instance */ private P createViewIdAndCreatePresenter ( ) { } }
P presenter = delegateCallback . createPresenter ( ) ; if ( presenter == null ) { throw new NullPointerException ( "Presenter returned from createPresenter() is null." ) ; } if ( keepPresenterDuringScreenOrientationChange ) { Context context = delegateCallback . getContext ( ) ; mosbyViewId = UUID . randomUUID ( ) . to...
public class LdapTemplate { /** * { @ inheritDoc } */ @ Override public < T > List < T > search ( Name base , String filter , SearchControls controls , ContextMapper < T > mapper , DirContextProcessor processor ) { } }
assureReturnObjFlagSet ( controls ) ; ContextMapperCallbackHandler < T > handler = new ContextMapperCallbackHandler < T > ( mapper ) ; search ( base , filter , controls , handler , processor ) ; return handler . getList ( ) ;
public class MergePath { /** * Returns all the resources matching the path . */ public ArrayList < PathImpl > getResources ( String pathName ) { } }
ArrayList < PathImpl > list = new ArrayList < PathImpl > ( ) ; String pathname = _pathname ; // XXX : why was this here ? if ( pathname . startsWith ( "/" ) ) pathname = "." + pathname ; ArrayList < PathImpl > pathList = ( ( MergePath ) _root ) . _pathList ; for ( int i = 0 ; i < pathList . size ( ) ; i ++ ) { PathImpl...
public class RobotiumUtils { /** * Filters all Views not within the given set . * @ param classSet contains all classes that are ok to pass the filter * @ param viewList the Iterable to filter form * @ return an ArrayList with filtered views */ public static ArrayList < View > filterViewsToSet ( Class < View > cl...
ArrayList < View > filteredViews = new ArrayList < View > ( ) ; for ( View view : viewList ) { if ( view == null ) continue ; for ( Class < View > filter : classSet ) { if ( filter . isAssignableFrom ( view . getClass ( ) ) ) { filteredViews . add ( view ) ; break ; } } } return filteredViews ;
public class TraceSpecification { /** * This method will create a new String array for the supplied spec and add it to the < code > specsToAddTo < / code > list . It will * only do this if it can find the right trace level for the supplied < code > level < / code > . * @ param updatedSpecList The list to add this s...
TraceSpecificationException tex = null ; boolean enable = true ; final boolean enableSetting ; final String fullString = clazz + "=" + level + "=" + enableString ; String setLower = enableString . trim ( ) . toLowerCase ( ) ; if ( setLower . equals ( TrLevelConstants . TRACE_ENABLED ) || setLower . equals ( TrLevelCons...
public class Base58 { /** * Uses the checksum in the last 4 bytes of the decoded data to verify the * rest are correct . The checksum is removed from the returned data . * @ param input base58 encoded string * @ return byte [ ] representation of input string if checksum matches */ public static byte [ ] decodeChe...
byte tmp [ ] = decode ( input ) ; if ( tmp == null || tmp . length < 4 ) { return null ; } byte [ ] bytes = copyOfRange ( tmp , 0 , tmp . length - 4 ) ; byte [ ] checksum = copyOfRange ( tmp , tmp . length - 4 , tmp . length ) ; tmp = HashUtils . doubleSha256 ( bytes ) ; byte [ ] hash = copyOfRange ( tmp , 0 , 4 ) ; if...
public class PendingItemAnimator { /** * Preform your animation . You do not need to override this in most cases cause the default is pretty good . * Listeners will be overridden * */ protected ViewPropertyAnimatorCompat animateMoveImpl ( final ViewHolder holder , int fromX , int fromY , int toX , int toY ) { } }
final View view = holder . itemView ; final int deltaX = toX - fromX ; final int deltaY = toY - fromY ; ViewCompat . animate ( view ) . cancel ( ) ; if ( deltaX != 0 ) { ViewCompat . animate ( view ) . translationX ( 0 ) ; } if ( deltaY != 0 ) { ViewCompat . animate ( view ) . translationY ( 0 ) ; } // TODO : make EndA...
public class ArrayFunctions { /** * Returned expression results in true if the array contains value . */ public static Expression arrayContains ( String expression , Expression value ) { } }
return arrayContains ( x ( expression ) , value ) ;
public class RegionUtils { /** * Initializes the region metadata singleton from the given resource . * @ param classLoader the class loader to use to load the resource * @ param name the path to the resource * @ throws SdkClientException on error */ @ Deprecated public static synchronized void initializeFromResou...
try { regionMetadata = loadMetadataFromResource ( classLoader , name ) ; } catch ( IOException exception ) { throw new SdkClientException ( "Error parsing region metadata from resource " + name , exception ) ; }
public class NFA { /** * Processes the next input event . If some of the computations reach a final state then the * resulting event sequences are returned . If computations time out and timeout handling is * activated , then the timed out event patterns are returned . * < p > If computations reach a stop state ,...
try ( EventWrapper eventWrapper = new EventWrapper ( event , timestamp , sharedBufferAccessor ) ) { return doProcess ( sharedBufferAccessor , nfaState , eventWrapper , afterMatchSkipStrategy , timerService ) ; }
public class MSUImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case AfplibPackage . MSU__RG : getRg ( ) . clear ( ) ; getRg ( ) . addAll ( ( Collection < ? extends MSURG > ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ;
public class LssClient { /** * Pause your app stream by app name and stream name * @ param request The request object containing all parameters for pausing app session . * @ return the response */ public PauseAppStreamResponse pauseAppStream ( PauseAppStreamRequest request ) { } }
checkNotNull ( request , "The parameter request should NOT be null." ) ; checkStringNotEmpty ( request . getApp ( ) , "The parameter app should NOT be null or empty string." ) ; checkStringNotEmpty ( request . getStream ( ) , "The parameter stream should NOT be null or empty string." ) ; InternalRequest internalRequest...
public class BlobStoreUtils { /** * Download updated blobs from potential nimbodes */ public static boolean downloadUpdatedBlob ( Map conf , BlobStore blobStore , String key , Set < NimbusInfo > nimbusInfos ) throws TTransportException { } }
NimbusClient client ; ClientBlobStore remoteBlobStore ; boolean isSuccess = false ; LOG . debug ( "Download blob NimbusInfos {}" , nimbusInfos ) ; for ( NimbusInfo nimbusInfo : nimbusInfos ) { if ( isSuccess ) { break ; } try { client = new NimbusClient ( conf , nimbusInfo . getHost ( ) , nimbusInfo . getPort ( ) , nul...
public class CacheClear { /** * FUTURE remove , only exist for code in Lucee archives using that function */ public static double call ( PageContext pc , String strFilter ) throws PageException { } }
return _call ( pc , strFilter , null ) ;
public class ExecutorServiceUtils { /** * Creates a scheduled thread pool where each thread has the daemon * property set to true . This allows the program to quit without * explicitly calling shutdown on the pool * @ param corePoolSize the number of threads to keep in the pool , * even if they are idle * @ r...
return Executors . newScheduledThreadPool ( corePoolSize , r -> { Thread t = Executors . defaultThreadFactory ( ) . newThread ( r ) ; t . setDaemon ( true ) ; return t ; } ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link IdentifierType } { @ code > } } */ @ XmlElementDecl ( namespace = "http://www.ibm.com/websphere/wim" , name = "secretary" ) public JAXBElement < IdentifierType > createSecretary ( IdentifierType value ) { } }
return new JAXBElement < IdentifierType > ( _Secretary_QNAME , IdentifierType . class , null , value ) ;
public class PropertiesComparisonRule { /** * Validates a given value against this rule . * @ param path a dot notation path to the value . * @ param schema a schema this rule is called from * @ param value a value to be validated . * @ param results a list with validation results to add new results . */ public...
String name = path != null ? path : "value" ; Object value1 = ObjectReader . getProperty ( value , _property1 ) ; Object value2 = ObjectReader . getProperty ( value , _property2 ) ; if ( ! ObjectComparator . compare ( value1 , _operation , value2 ) ) { results . add ( new ValidationResult ( path , ValidationResultType ...
public class CmsEditorFrameset { /** * Returns the editor title . < p > * @ return the editor title */ public String getParamEditorTitle ( ) { } }
if ( CmsStringUtil . isEmpty ( m_paramEditorTitle ) ) { return key ( Messages . GUI_EDITOR_TITLE_PREFIX_0 ) + " " + getParamResource ( ) ; } return m_paramEditorTitle ;
public class KbTypeConflictException { /** * Converts a Throwable to a KbTypeConflictException . If the Throwable is a * KbTypeConflictException , it will be passed through unmodified ; otherwise , it will be wrapped * in a new KbTypeConflictException . * @ param cause the Throwable to convert * @ return a KbTy...
return ( cause instanceof KbTypeConflictException ) ? ( KbTypeConflictException ) cause : new KbTypeConflictException ( cause ) ;
public class XMemberFeatureCallImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public NotificationChain eInverseRemove ( InternalEObject otherEnd , int featureID , NotificationChain msgs ) { } }
switch ( featureID ) { case XbasePackage . XMEMBER_FEATURE_CALL__MEMBER_CALL_TARGET : return basicSetMemberCallTarget ( null , msgs ) ; case XbasePackage . XMEMBER_FEATURE_CALL__MEMBER_CALL_ARGUMENTS : return ( ( InternalEList < ? > ) getMemberCallArguments ( ) ) . basicRemove ( otherEnd , msgs ) ; } return super . eIn...
public class ConfigObject { /** * Overrides the default getProperty implementation to create nested ConfigObject instances on demand * for non - existent keys */ public Object getProperty ( String name ) { } }
if ( "configFile" . equals ( name ) ) return this . configFile ; if ( ! containsKey ( name ) ) { ConfigObject prop = new ConfigObject ( this . configFile ) ; put ( name , prop ) ; return prop ; } return get ( name ) ;
public class Field { /** * Returns a builder for a Field object with given name and type . */ public static Builder newBuilder ( String name , LegacySQLTypeName type , Field ... subFields ) { } }
return new Builder ( ) . setName ( name ) . setType ( type , subFields ) ;
public class AsciiTable { /** * Sets the HTML entity translator for all cells in the table . * It will also remove any other translator set . * Nothing will happen if the argument is null . * @ param htmlElementTranslator translator * @ return this to allow chaining */ public AsciiTable setHtmlElementTranslator...
for ( AT_Row row : this . rows ) { if ( row . getType ( ) == TableRowType . CONTENT ) { row . setHtmlElementTranslator ( htmlElementTranslator ) ; } } return this ;
public class Query { /** * Verifies if the passed expression is true for the JsonNode * @ param expr * Comparison expression to be evaluated * @ return returns if the expression is true for the JsonNode */ public boolean is ( ComparisonExpression expr ) { } }
try { if ( expr != null ) { return expr . evaluate ( node ) ; } } catch ( MissingNodeException e ) { return false ; } return false ;
public class Sentence { /** * 按照 PartOfSpeechTagDictionary 指定的映射表将词语词性翻译过去 * @ return */ public Sentence translateLabels ( ) { } }
for ( IWord word : wordList ) { word . setLabel ( PartOfSpeechTagDictionary . translate ( word . getLabel ( ) ) ) ; if ( word instanceof CompoundWord ) { for ( Word child : ( ( CompoundWord ) word ) . innerList ) { child . setLabel ( PartOfSpeechTagDictionary . translate ( child . getLabel ( ) ) ) ; } } } return this ;
public class CmsUserTable { /** * initializes table . * @ param showAll boolean */ protected void init ( boolean showAll ) { } }
m_menu = new CmsContextMenu ( ) ; m_menu . setAsTableContextMenu ( this ) ; m_container = new IndexedContainer ( ) ; for ( TableProperty prop : TableProperty . values ( ) ) { m_container . addContainerProperty ( prop , prop . getType ( ) , prop . getDefault ( ) ) ; setColumnHeader ( prop , prop . getName ( ) ) ; } m_ap...
public class Table { /** * Determine if the passed column is part of a unique index that has only 1 element , the passed column . */ public boolean isUnique ( String columnName ) { } }
if ( columnName == null ) { return false ; } for ( IndexHolder ih : indexHoldersByName . values ( ) ) { if ( ih . isUnique ( ) && ih . getSize ( ) == 1 ) { if ( ih . getIndexes ( ) . iterator ( ) . next ( ) . getColumnName ( ) . equalsIgnoreCase ( columnName ) ) { return true ; } } } return false ;
public class XMLValidatingParser { /** * Parses and validates an XML resource using the given schema references . * @ param input * The XML input to parse and validate . It must be either an * InputStream or a Document object . * @ param parserConfig * An Element * ( { http : / / www . occamlab . com / te /...
jlogger . finer ( "Received XML resource of type " + input . getClass ( ) . getName ( ) ) ; ArrayList < Object > schemas = new ArrayList < Object > ( ) ; ArrayList < Object > dtds = new ArrayList < Object > ( ) ; schemas . addAll ( this . schemaList ) ; dtds . addAll ( this . dtdList ) ; loadSchemaLists ( parserConfig ...
public class PacketCapturesInner { /** * Create and start a packet capture on the specified VM . * @ param resourceGroupName The name of the resource group . * @ param networkWatcherName The name of the network watcher . * @ param packetCaptureName The name of the packet capture session . * @ param parameters P...
return ServiceFuture . fromResponse ( beginCreateWithServiceResponseAsync ( resourceGroupName , networkWatcherName , packetCaptureName , parameters ) , serviceCallback ) ;
public class ApiTokenStats { /** * In case of duplicate entries , we keep only the last updated element */ private void keepLastUpdatedUnique ( ) { } }
Map < String , SingleTokenStats > temp = new HashMap < > ( ) ; this . tokenStats . forEach ( candidate -> { SingleTokenStats current = temp . get ( candidate . tokenUuid ) ; if ( current == null ) { temp . put ( candidate . tokenUuid , candidate ) ; } else { int comparison = SingleTokenStats . COMP_BY_LAST_USE_THEN_COU...
public class SmallMap { /** * num ranges from 1 to numMappings */ private void removeMapping ( int num ) { } }
if ( num < numMappings ) { System . arraycopy ( mappings , num * 2 , mappings , ( num - 1 ) * 2 , ( numMappings - num ) * 2 ) ; } mappings [ numMappings * 2 - 1 ] = null ; mappings [ numMappings * 2 - 2 ] = null ; numMappings -- ;
public class Configuration { /** * Sets up configuration for reloading classes . * @ param path The directory that contains compiled classes . This will be * monitored for changes . */ void configureClasses ( String path ) { } }
findClassesInClasspath ( ) ; if ( StringUtils . isNotBlank ( path ) ) { // If the path is set , set up class reloading : configureClassesReloadable ( path ) ; } packagePrefix = getValue ( PACKAGE_PREFIX ) ; classesReloadable = classesUrl != null && classesInClasspath == null ; // Communicate : showClassesConfiguration ...
public class AtomicBitflags { /** * Atomically remove the given flags from the current set * @ param flags to unset * @ return the previous value */ public int unset ( final int flags ) { } }
for ( ; ; ) { int current = _flags . get ( ) ; int newValue = current & ~ flags ; if ( _flags . compareAndSet ( current , newValue ) ) { return current ; } }
public class Packager { /** * Return a container which holds all the boxes in the argument * @ param boxes list of boxes to fit in a container * @ param containers list of containers * @ param deadline the system time in milliseconds at which the search should be aborted * @ return index of container if match ,...
return pack ( boxes , containers , deadLinePredicate ( deadline ) ) ;
public class HttpChannelConfig { /** * Check the input configuration for the flag on whether to immediately * extract header values during the parsing stage or not . * @ param props */ private void parseDelayedExtract ( Map < Object , Object > props ) { } }
Object value = props . get ( HttpConfigConstants . PROPNAME_EXTRACT_VALUE ) ; if ( null != value ) { this . bExtractValue = convertBoolean ( value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: header value extraction is " + shouldExtractValue ( ) ) ; } }
public class AbstractProtoRealization { /** * < p > Cleanup any localisations of the destination that require it < / p > */ public boolean cleanupPremediatedItemStreams ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "cleanupPremediatedItemStreams" ) ; // true if all localisations have been cleaned up successfully boolean allCleanedUp = true ; // Only clean up the post mediated itemstreams when all the pre mediated // itemstreams have be...