signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class Group { /** * Search for package name in the sorted regular expression
* list , if found return the group name . If not , return null .
* @ param pkgName Name of package to be found in the regular
* expression list . */
String regExpGroupName ( String pkgName ) { } } | for ( int j = 0 ; j < sortedRegExpList . size ( ) ; j ++ ) { String regexp = sortedRegExpList . get ( j ) ; if ( pkgName . startsWith ( regexp ) ) { return regExpGroupMap . get ( regexp ) ; } } return null ; |
public class WSubMenu { /** * Indicates whether this sub menu is disabled in the given context .
* @ return true if this sub menu is disabled . */
@ Override public boolean isDisabled ( ) { } } | if ( isFlagSet ( ComponentModel . DISABLED_FLAG ) ) { return true ; } MenuContainer container = WebUtilities . getAncestorOfClass ( MenuContainer . class , this ) ; if ( container instanceof Disableable && ( ( Disableable ) container ) . isDisabled ( ) ) { return true ; } return false ; |
public class FacesConfigConverterTypeImpl { /** * If not already created , a new < code > attribute < / code > element will be created and returned .
* Otherwise , the first existing < code > attribute < / code > element will be returned .
* @ return the instance defined for the element < code > attribute < / code ... | List < Node > nodeList = childNode . get ( "attribute" ) ; if ( nodeList != null && nodeList . size ( ) > 0 ) { return new FacesConfigAttributeTypeImpl < FacesConfigConverterType < T > > ( this , "attribute" , childNode , nodeList . get ( 0 ) ) ; } return createAttribute ( ) ; |
public class BusItinerary { /** * Remove a road segment from this itinerary .
* < p > The bus halts on the segment will also be removed .
* @ param segmentIndex is the index of the segment to remove .
* @ return < code > true < / code > if the segment was successfully removed , otherwise < code > false < / code >... | if ( segmentIndex >= 0 && segmentIndex < this . roadSegments . getRoadSegmentCount ( ) ) { final RoadSegment segment = this . roadSegments . getRoadSegmentAt ( segmentIndex ) ; if ( segment != null ) { // Invalidate the bus halts on the segment
final Map < BusItineraryHalt , RoadSegment > segmentMap = new TreeMap < > (... |
public class SnappyCodec { /** * Create a { @ link CompressionOutputStream } that will write to the given
* { @ link OutputStream } with the given { @ link Compressor } .
* @ param out
* the location for the final output stream
* @ param compressor
* compressor to use
* @ return a stream the user can write ... | if ( ! isNativeSnappyLoaded ( conf ) ) { throw new CodecUnavailableException ( "native snappy library not available" ) ; } int bufferSize = conf . getInt ( IO_COMPRESSION_CODEC_SNAPPY_BUFFERSIZE_KEY , IO_COMPRESSION_CODEC_SNAPPY_BUFFERSIZE_DEFAULT ) ; int compressionOverhead = ( bufferSize / 6 ) + 32 ; return new Block... |
public class Scanner { /** * Returns a charset object for the given charset name .
* @ throws NullPointerException is csn is null
* @ throws IllegalArgumentException if the charset is not supported */
private static Charset toCharset ( String csn ) { } } | Objects . requireNonNull ( csn , "charsetName" ) ; try { return Charset . forName ( csn ) ; } catch ( IllegalCharsetNameException | UnsupportedCharsetException e ) { // IllegalArgumentException should be thrown
throw new IllegalArgumentException ( e ) ; } |
public class RepositoryMockAgent { /** * If the belief its a count of some sort his counting its increased by one .
* @ param bName
* - the name of the belief count . */
private void increaseBeliefCount ( String bName ) { } } | Object belief = this . getBelief ( bName ) ; int count = 0 ; if ( belief != null ) { count = ( Integer ) belief ; } this . setBelief ( bName , count + 1 ) ; |
public class InternalWindowProcessFunction { /** * Initialization method for the function . It is called before the actual working methods . */
public void open ( Context < K , W > ctx ) throws Exception { } } | this . ctx = ctx ; this . windowAssigner . open ( ctx ) ; |
public class Resolve { /** * Resolve an appropriate implicit this instance for t ' s container .
* JLS 8.8.5.1 and 15.9.2 */
Type resolveImplicitThis ( DiagnosticPosition pos , Env < AttrContext > env , Type t ) { } } | return resolveImplicitThis ( pos , env , t , false ) ; |
public class AbstractPreferenceFragment { /** * Obtains the appearance of the dividers , which are shown above preference categories , from the
* activity ' s theme . */
private void obtainDividerDecoration ( ) { } } | int dividerColor ; try { dividerColor = ThemeUtil . getColor ( getActivity ( ) , R . attr . dividerColor ) ; } catch ( NotFoundException e ) { dividerColor = ContextCompat . getColor ( getActivity ( ) , R . color . preference_divider_color_light ) ; } this . dividerDecoration . setDividerColor ( dividerColor ) ; this .... |
public class CommerceRegionPersistenceImpl { /** * Returns the last commerce region in the ordered set where commerceCountryId = & # 63 ; and active = & # 63 ; .
* @ param commerceCountryId the commerce country ID
* @ param active the active
* @ param orderByComparator the comparator to order the set by ( optiona... | CommerceRegion commerceRegion = fetchByC_A_Last ( commerceCountryId , active , orderByComparator ) ; if ( commerceRegion != null ) { return commerceRegion ; } StringBundler msg = new StringBundler ( 6 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "commerceCountryId=" ) ; msg . append ( commerceCountryI... |
public class CmsDefaultUserSettings { /** * Initializes the preference configuration . < p >
* Note that this method should only be called once the resource types have been initialized , but after addPreference has been called for all configured preferences .
* @ param wpManager the active workplace manager */
publ... | CURRENT_DEFAULT_SETTINGS = this ; Class < ? > accessorClass = CmsUserSettingsStringPropertyWrapper . class ; // first initialize all built - in preferences . these are :
// a ) Bean properties of CmsUserSettingsStringPropertyWrapper
// b ) Editor setting preferences
// c ) Gallery setting preferences
PropertyDescriptor... |
public class Calendar { /** * TODO : Check if calType can be passed via keyword on loc parameter instead . */
public static String getDateTimeFormatString ( ULocale loc , String calType , int dateStyle , int timeStyle ) { } } | if ( timeStyle < DateFormat . NONE || timeStyle > DateFormat . SHORT ) { throw new IllegalArgumentException ( "Illegal time style " + timeStyle ) ; } if ( dateStyle < DateFormat . NONE || dateStyle > DateFormat . SHORT ) { throw new IllegalArgumentException ( "Illegal date style " + dateStyle ) ; } PatternData patternD... |
public class HttpConnectionHelper { /** * 连接Http Server , 准备传送serialized - object
* @ param httpServerParam
* @ return
* @ throws java . lang . Exception */
public HttpURLConnection connectService ( HttpServerParam httpServerParam , String userPassword ) throws Exception { } } | HttpURLConnection httpURLConnection = null ; URL url = null ; try { url = new URL ( "http" , httpServerParam . getHost ( ) , httpServerParam . getPort ( ) , httpServerParam . getServletPath ( ) ) ; Debug . logVerbose ( "[JdonFramework]Service url=" + url , module ) ; httpURLConnection = ( HttpURLConnection ) url . open... |
public class DeviceAttributeDAODefaultImpl { public void setAttributeValue ( final AttributeValue_3 attributeValue_3 ) { } } | deviceAttribute_3 = new DeviceAttribute_3 ( attributeValue_3 ) ; use_union = false ; attributeValue_5 . name = attributeValue_3 . name ; attributeValue_5 . quality = attributeValue_3 . quality ; attributeValue_5 . time = attributeValue_3 . time ; attributeValue_5 . r_dim = attributeValue_3 . r_dim ; attributeValue_5 . ... |
public class SimpleDialogFragment { /** * Key method for extending { @ link com . avast . android . dialogs . fragment . SimpleDialogFragment } .
* Children can extend this to add more things to base builder . */
@ Override protected BaseDialogFragment . Builder build ( BaseDialogFragment . Builder builder ) { } } | final CharSequence title = getTitle ( ) ; if ( ! TextUtils . isEmpty ( title ) ) { builder . setTitle ( title ) ; } final CharSequence message = getMessage ( ) ; if ( ! TextUtils . isEmpty ( message ) ) { builder . setMessage ( message ) ; } final CharSequence positiveButtonText = getPositiveButtonText ( ) ; if ( ! Tex... |
public class WriterInitializerFactory { /** * Provides WriterInitializer based on the writer . Mostly writer is decided by the Writer builder ( and destination ) that user passes .
* If there ' s more than one branch , it will instantiate same number of WriterInitializer instance as number of branches and combine it ... | int branches = state . getPropAsInt ( ConfigurationKeys . FORK_BRANCHES_KEY , 1 ) ; if ( branches == 1 ) { return newSingleInstance ( state , workUnits , branches , 0 ) ; } List < WriterInitializer > wis = Lists . newArrayList ( ) ; for ( int branchId = 0 ; branchId < branches ; branchId ++ ) { wis . add ( newSingleIns... |
public class NativeJavaPackage { /** * need to look for a class by that name */
NativeJavaPackage forcePackage ( String name , Scriptable scope ) { } } | Object cached = super . get ( name , this ) ; if ( cached != null && cached instanceof NativeJavaPackage ) { return ( NativeJavaPackage ) cached ; } String newPackage = packageName . length ( ) == 0 ? name : packageName + "." + name ; NativeJavaPackage pkg = new NativeJavaPackage ( true , newPackage , classLoader ) ; S... |
public class JfifReader { /** * Performs the Jfif data extraction , adding found values to the specified
* instance of { @ link Metadata } . */
public void extract ( @ NotNull final RandomAccessReader reader , @ NotNull final Metadata metadata ) { } } | JfifDirectory directory = new JfifDirectory ( ) ; metadata . addDirectory ( directory ) ; try { // For JFIF , the tag number is also the offset into the segment
directory . setInt ( JfifDirectory . TAG_VERSION , reader . getUInt16 ( JfifDirectory . TAG_VERSION ) ) ; directory . setInt ( JfifDirectory . TAG_UNITS , read... |
public class InternalXbaseWithAnnotationsLexer { /** * $ ANTLR start " T _ _ 74" */
public final void mT__74 ( ) throws RecognitionException { } } | try { int _type = T__74 ; int _channel = DEFAULT_TOKEN_CHANNEL ; // InternalXbaseWithAnnotations . g : 72:7 : ( ' typeof ' )
// InternalXbaseWithAnnotations . g : 72:9 : ' typeof '
{ match ( "typeof" ) ; } state . type = _type ; state . channel = _channel ; } finally { } |
public class Distribution { /** * Creates an Laplace smoothed Distribution from the given counter , ie adds one count
* to every item , including unseen ones , and divides by the total count .
* @ return a new add - 1 smoothed Distribution */
public static < E > Distribution < E > laplaceSmoothedDistribution ( Coun... | return laplaceSmoothedDistribution ( counter , numberOfKeys , 1.0 ) ; |
public class ObjIteratorEx { /** * Lazy evaluation .
* @ param iteratorSupplier
* @ return */
public static < T > ObjIteratorEx < T > of ( final Supplier < ? extends Iterator < ? extends T > > iteratorSupplier ) { } } | N . checkArgNotNull ( iteratorSupplier , "iteratorSupplier" ) ; return new ObjIteratorEx < T > ( ) { private Iterator < ? extends T > iter = null ; private ObjIteratorEx < ? extends T > iterEx = null ; private boolean isInitialized = false ; @ Override public boolean hasNext ( ) { if ( isInitialized == false ) { init (... |
public class Compiler { /** * Parses the given morphlineFile , then finds the morphline with the given morphlineId within ,
* then compiles the morphline and returns the corresponding morphline command . The returned
* command will feed records into finalChild . */
public Command compile ( File morphlineFile , Stri... | Config config ; try { config = parse ( morphlineFile , overrides ) ; } catch ( IOException e ) { throw new MorphlineCompilationException ( "Cannot parse morphline file: " + morphlineFile , null , e ) ; } Config morphlineConfig = find ( morphlineId , config , morphlineFile . getPath ( ) ) ; Command morphlineCommand = co... |
public class SamlSettingsApi { /** * Delete upload metadata .
* Delete metadata .
* @ param location The region where send metadata . ( optional )
* @ return DeleteMetadataResponse
* @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the response body */
public DeleteMeta... | ApiResponse < DeleteMetadataResponse > resp = deleteMetadataWithHttpInfo ( location ) ; return resp . getData ( ) ; |
public class PathController { /** * Get information for a specific path name / profileId or pathId
* @ param model
* @ param pathIdentifier
* @ param profileIdentifier
* @ return */
@ RequestMapping ( value = "/api/path/{pathIdentifier}" , method = RequestMethod . GET ) @ ResponseBody public EndpointOverride ge... | Identifiers identifiers = ControllerUtils . convertProfileAndPathIdentifier ( profileIdentifier , pathIdentifier ) ; return PathOverrideService . getInstance ( ) . getPath ( identifiers . getPathId ( ) , clientUUID , typeFilter ) ; |
public class CommonOps_ZDRM { /** * Creates an identity matrix of the specified size . < br >
* < br >
* a < sub > ij < / sub > = 0 + 0i if i & ne ; j < br >
* a < sub > ij < / sub > = 1 + 0i if i = j < br >
* @ param width The width and height of the identity matrix .
* @ return A new instance of an identity... | ZMatrixRMaj A = new ZMatrixRMaj ( width , width ) ; for ( int i = 0 ; i < width ; i ++ ) { A . set ( i , i , 1 , 0 ) ; } return A ; |
public class ExtensionManager { /** * Notifies the extensions that the kernel is started */
public void started ( ) { } } | for ( KernelExtension kernelExtension : kernelExtensions . keySet ( ) ) { kernelExtension . started ( kernelExtensions . get ( kernelExtension ) ) ; } |
public class WebSocketClientHandshaker08 { /** * Sends the opening request to the server :
* < pre >
* GET / chat HTTP / 1.1
* Host : server . example . com
* Upgrade : websocket
* Connection : Upgrade
* Sec - WebSocket - Key : dGhlIHNhbXBsZSBub25jZQ = =
* Sec - WebSocket - Origin : http : / / example . c... | // Get path
URI wsURL = uri ( ) ; String path = rawPath ( wsURL ) ; // Get 16 bit nonce and base 64 encode it
byte [ ] nonce = WebSocketUtil . randomBytes ( 16 ) ; String key = WebSocketUtil . base64 ( nonce ) ; String acceptSeed = key + MAGIC_GUID ; byte [ ] sha1 = WebSocketUtil . sha1 ( acceptSeed . getBytes ( Charse... |
public class Sql2o { /** * Begins a transaction with isolation level { @ link java . sql . Connection # TRANSACTION _ READ _ COMMITTED } . Every statement executed on the return { @ link Connection }
* instance , will be executed in the transaction . It is very important to always call either the { @ link org . sql2o... | return this . beginTransaction ( connectionSource , java . sql . Connection . TRANSACTION_READ_COMMITTED ) ; |
public class ReflectionScanStatic { /** * 通过扫描 , 获取反射对象 */
private Reflections getReflection ( List < String > packNameList ) { } } | // filter
FilterBuilder filterBuilder = new FilterBuilder ( ) . includePackage ( Constants . DISCONF_PACK_NAME ) ; for ( String packName : packNameList ) { filterBuilder = filterBuilder . includePackage ( packName ) ; } Predicate < String > filter = filterBuilder ; // urls
Collection < URL > urlTotals = new ArrayList <... |
public class FedoraEventImpl { /** * The JCR - based Event : : getPath contains some Modeshape artifacts that must be removed or modified in
* order to correspond to the public resource path . For example , JCR Events will contain a trailing
* / jcr : content for Binaries , a trailing / propName for properties , an... | // remove any trailing data for property changes
final String path = PROPERTY_TYPES . contains ( event . getType ( ) ) ? event . getPath ( ) . substring ( 0 , event . getPath ( ) . lastIndexOf ( "/" ) ) : event . getPath ( ) ; // reformat any hash URIs and remove any trailing / jcr : content
final HashConverter convert... |
public class TIFFField { /** * Compares this < code > TIFFField < / code > with another
* < code > TIFFField < / code > by comparing the tags .
* < p > < b > Note : this class has a natural ordering that is inconsistent
* with < code > equals ( ) < / code > . < / b >
* @ throws IllegalArgumentException if the p... | if ( o == null ) { throw new IllegalArgumentException ( ) ; } int oTag = ( ( TIFFField ) o ) . getTag ( ) ; if ( tag < oTag ) { return - 1 ; } else if ( tag > oTag ) { return 1 ; } else { return 0 ; } |
public class CraftingHelper { /** * Take a list of ItemStacks and amalgamate where possible . < br >
* @ param inputStacks a list of ItemStacks
* @ return a list of ItemStacks , where all items of the same type are grouped into one stack . */
public static List < ItemStack > consolidateItemStacks ( List < ItemStack... | // Horrible n ^ 2 method - we should do something nicer if this ever becomes a bottleneck .
List < ItemStack > outputStacks = new ArrayList < ItemStack > ( ) ; for ( ItemStack sourceIS : inputStacks ) { boolean bFound = false ; for ( ItemStack destIS : outputStacks ) { if ( destIS != null && sourceIS != null && itemSta... |
public class BigendianEncoding { /** * Appends the base16 encoding of the specified { @ code value } to the { @ code dest } .
* @ param value the value to be converted .
* @ param dest the destination char array .
* @ param destOffset the starting offset in the destination char array . */
static void longToBase16... | byteToBase16 ( ( byte ) ( value >> 56 & 0xFFL ) , dest , destOffset ) ; byteToBase16 ( ( byte ) ( value >> 48 & 0xFFL ) , dest , destOffset + BYTE_BASE16 ) ; byteToBase16 ( ( byte ) ( value >> 40 & 0xFFL ) , dest , destOffset + 2 * BYTE_BASE16 ) ; byteToBase16 ( ( byte ) ( value >> 32 & 0xFFL ) , dest , destOffset + 3 ... |
public class EnvLoader { /** * Add listener .
* @ param listener object to listen for environment create / destroy
* @ param loader the context class loader */
public static void addClassLoaderListener ( EnvLoaderListener listener , ClassLoader loader ) { } } | for ( ; loader != null ; loader = loader . getParent ( ) ) { if ( loader instanceof EnvironmentClassLoader ) { ( ( EnvironmentClassLoader ) loader ) . addListener ( listener ) ; return ; } } /* if ( _ envSystemClassLoader ! = null ) {
_ envSystemClassLoader . addNotificationListener ( listener ) ;
return ; */
_glob... |
public class TldFernManager { /** * Looks up the fern with the specified value . If non exist a new one is created and returned .
* @ param value The fern ' s value
* @ return The fern associated with that value */
public TldFernFeature lookupFern ( int value ) { } } | TldFernFeature found = table [ value ] ; if ( found == null ) { found = createFern ( ) ; found . init ( value ) ; table [ value ] = found ; } return found ; |
public class HBaseReader { /** * ( non - Javadoc )
* @ see
* com . impetus . client . hbase . Reader # LoadData ( org . apache . hadoop . hbase . client
* . HTable , java . lang . String ) */
@ Override public List < HBaseData > LoadData ( HTableInterface hTable , Object rowKey , Filter filter , String ... column... | return LoadData ( hTable , Bytes . toString ( hTable . getTableName ( ) ) , rowKey , filter , columns ) ; |
public class PropertyRendererRegistry { /** * Gets a renderer for the given property type . The lookup is as follow :
* < ul >
* < li > if a renderer was registered with
* { @ link # registerRenderer ( Class , TableCellRenderer ) } , it is returned ,
* else < / li >
* < li > if a renderer class was registered... | TableCellRenderer renderer = null ; Object value = typeToRenderer . get ( type ) ; if ( value instanceof TableCellRenderer ) { renderer = ( TableCellRenderer ) value ; } else if ( value instanceof Class < ? > ) { try { renderer = ( TableCellRenderer ) ( ( Class < ? extends TableCellRenderer > ) value ) . newInstance ( ... |
public class CmsFocalPoint { /** * Positions the center of this widget over the given coordinates . < p >
* @ param x the x coordinate
* @ param y the y coordinate */
public void setCenterCoordsRelativeToParent ( int x , int y ) { } } | Style style = getElement ( ) . getStyle ( ) ; style . setLeft ( x - 10 , Unit . PX ) ; style . setTop ( y - 10 , Unit . PX ) ; |
public class Parameter { /** * { @ inheritDoc }
* @ throws NullPointerException { @ inheritDoc } */
public < T extends Annotation > T getAnnotation ( Class < T > annotationClass ) { } } | Objects . requireNonNull ( annotationClass ) ; T [ ] annotations = getAnnotationsByType ( annotationClass ) ; return annotations . length > 0 ? annotations [ 0 ] : null ; |
public class HandlerUtils { /** * Creates a copy of the passed in ILF node in the PLF if not already there as well as creating
* any ancestor nodes along the path from this node up to the layout root if they are not there . */
public static Element createPlfNodeAndPath ( Element compViewNode , boolean includeChildNod... | // first attempt to get parent
Element compViewParent = ( Element ) compViewNode . getParentNode ( ) ; Element plfParent = getPLFNode ( compViewParent , person , true , false ) ; Document plf = ( Document ) person . getAttribute ( Constants . PLF ) ; // if ilf copy being created we can append to parent and use the
// p... |
public class SquareEdge { /** * Returns the destination node . */
public < T extends SquareNode > T destination ( SquareNode src ) { } } | if ( a == src ) return ( T ) b ; else if ( b == src ) return ( T ) a ; else throw new IllegalArgumentException ( "BUG! src is not a or b" ) ; |
public class SpeechToText { /** * Delete a job .
* Deletes the specified job . You cannot delete a job that the service is actively processing . Once you delete a job ,
* its results are no longer available . The service automatically deletes a job and its results when the time to live
* for the results expires .... | Validator . notNull ( deleteJobOptions , "deleteJobOptions cannot be null" ) ; String [ ] pathSegments = { "v1/recognitions" } ; String [ ] pathParameters = { deleteJobOptions . id ( ) } ; RequestBuilder builder = RequestBuilder . delete ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParamet... |
public class OUser { /** * Checks if the user has the permission to access to the requested resource for the requested operation .
* @ param iResource
* Requested resource
* @ param iOperation
* Requested operation
* @ return The role that has granted the permission if any , otherwise null */
public ORole che... | for ( ORole r : roles ) if ( r . allow ( iResource , iOperation ) ) return r ; return null ; |
public class StartOrderResolver { /** * an appropriate container which can be linked into the image */
private List < Resolvable > resolve ( List < Resolvable > images ) { } } | List < Resolvable > resolved = new ArrayList < > ( ) ; // First pass : Pick all data images and all without dependencies
for ( Resolvable config : images ) { List < String > volumesOrLinks = extractDependentImagesFor ( config ) ; if ( volumesOrLinks == null ) { // A data image only or no dependency . Add it to the list... |
public class JDBDT { /** * Delete data sets from the database .
* < p > The data sets should be associated to tables
* with defined key columns . The key column values
* of each entry a data set determine the rows to delete .
* @ param dataSets Data sets for deletion .
* @ see TableBuilder # key ( String . . ... | foreach ( dataSets , DBSetup :: delete , CallInfo . create ( ) ) ; |
public class EclipseAjcMojo { /** * write document to the file
* @ param document
* @ param file
* @ throws TransformerException
* @ throws FileNotFoundException */
private void writeDocument ( Document document , File file ) throws TransformerException , FileNotFoundException { } } | document . normalize ( ) ; DOMSource source = new DOMSource ( document ) ; StreamResult result = new StreamResult ( new FileOutputStream ( file ) ) ; Transformer transformer = TransformerFactory . newInstance ( ) . newTransformer ( ) ; transformer . setOutputProperty ( OutputKeys . INDENT , "yes" ) ; transformer . tran... |
public class CreateInputSecurityGroupRequest { /** * List of IPv4 CIDR addresses to whitelist
* @ param whitelistRules
* List of IPv4 CIDR addresses to whitelist */
public void setWhitelistRules ( java . util . Collection < InputWhitelistRuleCidr > whitelistRules ) { } } | if ( whitelistRules == null ) { this . whitelistRules = null ; return ; } this . whitelistRules = new java . util . ArrayList < InputWhitelistRuleCidr > ( whitelistRules ) ; |
public class DataTables { /** * Creates a table , i . e . a list of lists , with { @ code numberOfColumns } columns from the given { @ code data } including the header .
* Example :
* < pre > { @ code
* table ( 2,
* " name " , " age " , / / header
* " Peter " , 20 , / / first row of data
* " Susan " , 35 ) ... | if ( data . length % numberOfColumns != 0 ) { throw new IllegalArgumentException ( "The provided number of data elements '" + data . length + "' is not a multiple of " + numberOfColumns ) ; } return Iterables . partition ( Arrays . asList ( data ) , numberOfColumns ) ; |
public class CPDefinitionVirtualSettingLocalServiceBaseImpl { /** * Returns the number of rows matching the dynamic query .
* @ param dynamicQuery the dynamic query
* @ param projection the projection to apply to the query
* @ return the number of rows matching the dynamic query */
@ Override public long dynamicQ... | return cpDefinitionVirtualSettingPersistence . countWithDynamicQuery ( dynamicQuery , projection ) ; |
public class XHTMLParser { /** * In order to handle empty content we use a { @ link PushbackReader } to try to read one character from the stream
* and if we get - 1 it means that the stream is empty and in this case we return an empty XDOM . */
private Reader getPushBackReader ( Reader source ) throws ParseException... | PushbackReader pushbackReader = new PushbackReader ( source ) ; int c ; try { c = pushbackReader . read ( ) ; if ( c == - 1 ) { return null ; } pushbackReader . unread ( c ) ; } catch ( IOException e ) { throw new ParseException ( "Failed to find out if the source to parse is empty or not" , e ) ; } return pushbackRead... |
public class MybatisRepository { @ Transactional ( ) public E add ( E entity ) { } } | getSqlSession ( ) . insert ( getMapId ( ADD_MAP_ID ) , entity ) ; return entity ; |
public class TeaToolsUtils { /** * Formats the class name with trailing square brackets . */
public String getArrayClassName ( Class < ? > clazz ) { } } | if ( clazz . isArray ( ) ) { return getArrayClassName ( clazz . getComponentType ( ) ) + "[]" ; } return clazz . getName ( ) ; |
public class UsersMultiSelectList { /** * Reloads / refreshes the list of { @ link User users } associated to the context .
* @ param contextId the ID of the context */
public void reloadUsers ( int contextId ) { } } | List < User > users = usersExtension . getContextUserAuthManager ( contextId ) . getUsers ( ) ; User [ ] usersArray = users . toArray ( new User [ users . size ( ) ] ) ; ListModel < User > usersModel = new DefaultComboBoxModel < User > ( usersArray ) ; this . setModel ( usersModel ) ; |
public class GetTransitGatewayAttachmentPropagationsResult { /** * Information about the propagation route tables .
* @ return Information about the propagation route tables . */
public java . util . List < TransitGatewayAttachmentPropagation > getTransitGatewayAttachmentPropagations ( ) { } } | if ( transitGatewayAttachmentPropagations == null ) { transitGatewayAttachmentPropagations = new com . amazonaws . internal . SdkInternalList < TransitGatewayAttachmentPropagation > ( ) ; } return transitGatewayAttachmentPropagations ; |
public class AbstractDataEditorWidget { /** * Creates the save command .
* @ see # doUpdate ( ) */
protected ActionCommand createUpdateCommand ( ) { } } | ActionCommand command = new ActionCommand ( UPDATE_COMMAND_ID ) { @ Override protected void doExecuteCommand ( ) { doUpdate ( ) ; } } ; command . setSecurityControllerId ( getId ( ) + "." + UPDATE_COMMAND_ID ) ; getApplicationConfig ( ) . commandConfigurer ( ) . configure ( command ) ; getDetailForm ( ) . addGuarded ( ... |
public class HashMac { /** * Computes an HMAC for the given message , using the key passed to the constructor .
* @ param message The message .
* @ return The HMAC value for the message and key . */
public String digest ( String message ) { } } | try { Mac mac = Mac . getInstance ( algorithm ) ; SecretKeySpec macKey = new SecretKeySpec ( key , algorithm ) ; mac . init ( macKey ) ; byte [ ] digest = mac . doFinal ( ByteArray . fromString ( message ) ) ; return ByteArray . toHex ( digest ) ; } catch ( NoSuchAlgorithmException e ) { throw new IllegalStateException... |
public class FindBuddyImpl { /** * / * ( non - Javadoc )
* @ see com . tvd12 . ezyfox . core . command . BaseCommand # execute ( ) */
@ SuppressWarnings ( "unchecked" ) @ Override public ApiBuddy execute ( ) { } } | return ( ApiBuddy ) extension . getParentZone ( ) . getBuddyListManager ( ) . getBuddyList ( owner ) . getBuddy ( buddy ) ; |
public class LatentRelationalAnalysis { /** * Returns an ArrayList of phrases with the greatest frequencies in the corpus .
* For each alternate pair , send a phrase query to the Lucene search engine
* containing the corpus . The phrase query will find the frequencies of phrases
* that begin with one member of th... | HashMultiMap < Float , Pair < String > > phrase_frequencies = new HashMultiMap < Float , Pair < String > > ( ) ; // Search corpus . . . A : B
// phrase _ frequencies . put ( new Float ( countPhraseFrequencies ( INDEX _ DIR , A , B ) ) , new Pair < String > ( A , B ) ) ;
// System . err . println ( " Top 10 Similar word... |
public class RecordingOutputStream { /** * Reset limits to effectively - unlimited defaults */
public void resetLimits ( ) { } } | maxLength = Long . MAX_VALUE ; timeoutMs = Long . MAX_VALUE ; maxRateBytesPerMs = Long . MAX_VALUE ; |
public class A_CmsWorkflowManager { /** * Gets the configuration parameter for a given key , and if it doesn ' t find one , returns a default value . < p >
* @ param key the configuration key
* @ param defaultValue the default value to use when the configuration entry isn ' t found
* @ return the configuration va... | String result = m_parameters . get ( key ) ; if ( result == null ) { result = defaultValue ; } return result ; |
public class LolChat { /** * Get a list of all your FriendGroups .
* @ return A List of all your FriendGroups */
public List < FriendGroup > getFriendGroups ( ) { } } | final ArrayList < FriendGroup > groups = new ArrayList < > ( ) ; for ( final RosterGroup g : connection . getRoster ( ) . getGroups ( ) ) { groups . add ( new FriendGroup ( this , connection , g ) ) ; } return groups ; |
public class Cob2Xsd { /** * Create an empty XML Schema .
* If no targetNamespace , make sure there is no default namespace otherwise
* our complex types would be considered part of that default namespace
* ( usually XML Schema namespace ) .
* @ param encoding the character set used to encode this XML Schema
... | XmlSchema xsd = new XmlSchema ( targetNamespace , new XmlSchemaCollection ( ) ) ; if ( targetNamespace != null ) { xsd . setElementFormDefault ( XmlSchemaForm . QUALIFIED ) ; } xsd . setAttributeFormDefault ( null ) ; xsd . setInputEncoding ( encoding ) ; if ( targetNamespace == null ) { NamespaceMap prefixmap = new Na... |
public class MPXWriter { /** * This method is called to format an accrue type value .
* @ param type accrue type
* @ return formatted accrue type */
private String formatAccrueType ( AccrueType type ) { } } | return ( type == null ? null : LocaleData . getStringArray ( m_locale , LocaleData . ACCRUE_TYPES ) [ type . getValue ( ) - 1 ] ) ; |
public class JMElasticsearchBulk { /** * Delete bulk docs async .
* @ param index the index
* @ param type the type
* @ param bulkResponseActionListener the bulk response action listener */
public void deleteBulkDocsAsync ( String index , String type , ActionListener < BulkResponse > bulkResponseActionListener ) ... | executeBulkRequestAsync ( buildDeleteBulkRequestBuilder ( buildAllDeleteRequestBuilderList ( index , type ) ) , bulkResponseActionListener ) ; |
public class SessionUtilExternalBrowser { /** * Receives SAML token from Snowflake via web browser
* @ param socket socket
* @ throws IOException if any IO error occurs
* @ throws SFException if a HTTP request from browser is invalid */
private void processSamlToken ( String [ ] rets , Socket socket ) throws IOEx... | String targetLine = null ; String userAgent = null ; boolean isPost = false ; for ( String line : rets ) { if ( line . length ( ) > PREFIX_GET . length ( ) && line . substring ( 0 , PREFIX_GET . length ( ) ) . equalsIgnoreCase ( PREFIX_GET ) ) { targetLine = line ; } else if ( line . length ( ) > PREFIX_POST . length (... |
public class YoutubeSampleActivity { /** * Hook the DraggableListener to DraggablePanel to pause or resume the video when the
* DragglabePanel is maximized or closed . */
private void hookDraggablePanelListeners ( ) { } } | draggablePanel . setDraggableListener ( new DraggableListener ( ) { @ Override public void onMaximized ( ) { playVideo ( ) ; } @ Override public void onMinimized ( ) { // Empty
} @ Override public void onClosedToLeft ( ) { pauseVideo ( ) ; } @ Override public void onClosedToRight ( ) { pauseVideo ( ) ; } } ) ; |
public class AccountsInner { /** * Lists the Data Lake Store accounts within the subscription . The response includes a link to the next page of results , if any .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the PagedList & lt ; DataLakeStoreAccountInner... | return listWithServiceResponseAsync ( ) . map ( new Func1 < ServiceResponse < Page < DataLakeStoreAccountInner > > , Page < DataLakeStoreAccountInner > > ( ) { @ Override public Page < DataLakeStoreAccountInner > call ( ServiceResponse < Page < DataLakeStoreAccountInner > > response ) { return response . body ( ) ; } }... |
public class NGSessionPool { /** * Shuts down the pool . The function waits for running nails to finish . */
void shutdown ( ) throws InterruptedException { } } | List < NGSession > allSessions ; synchronized ( lock ) { done = true ; allSessions = Stream . concat ( workingPool . stream ( ) , idlePool . stream ( ) ) . collect ( Collectors . toList ( ) ) ; idlePool . clear ( ) ; workingPool . clear ( ) ; } for ( NGSession session : allSessions ) { session . shutdown ( ) ; } // wai... |
public class GeoPackageCoreConnection { /** * Query the SQL for a single result typed object in the first column
* @ param < T >
* result value type
* @ param sql
* sql statement
* @ param args
* sql arguments
* @ return single result object
* @ since 3.1.0 */
public < T > T querySingleTypedResult ( Str... | @ SuppressWarnings ( "unchecked" ) T result = ( T ) querySingleResult ( sql , args ) ; return result ; |
public class Hessian2Output { /** * Starts an envelope .
* < code > < pre >
* E major minor
* m b16 b8 method - name
* < / pre > < / code >
* @ param method the method name to call . */
public void startEnvelope ( String method ) throws IOException { } } | int offset = _offset ; if ( SIZE < offset + 32 ) { flushBuffer ( ) ; offset = _offset ; } _buffer [ _offset ++ ] = ( byte ) 'E' ; writeString ( method ) ; |
public class AbstractKnownHostsKeyVerification { /** * Allows a host key , optionally recording the key to the known _ hosts file .
* @ param host
* the name of the host
* @ param pk
* the public key to allow
* @ param always
* true if the key should be written to the known _ hosts file
* @ throws Invalid... | // Put the host into the allowed hosts list , overiding any previous
// entry
if ( hashHosts ) { SshHmac sha1 = ( SshHmac ) ComponentManager . getInstance ( ) . supportedHMacsCS ( ) . getInstance ( "hmac-sha1" ) ; byte [ ] hashSalt = new byte [ sha1 . getMacLength ( ) ] ; ComponentManager . getInstance ( ) . getRND ( )... |
public class ConstantsSummaryBuilder { /** * Build the list of packages .
* @ param node the XML element that specifies which components to document
* @ param contentTree the content tree to which the content list will be added */
public void buildContents ( XMLNode node , Content contentTree ) { } } | Content contentListTree = writer . getContentsHeader ( ) ; printedPackageHeaders . clear ( ) ; for ( PackageElement pkg : configuration . packages ) { if ( hasConstantField ( pkg ) && ! hasPrintedPackageIndex ( pkg ) ) { writer . addLinkToPackageContent ( pkg , printedPackageHeaders , contentListTree ) ; } } writer . a... |
public class PropertiesLoaderUtils { /** * Fill the given properties from the specified class path resource ( in ISO - 8859-1 encoding ) .
* < p > Merges properties if more than one resource of the same name
* found in the class path . < / p >
* @ param props the Properties instance to load into
* @ param resou... | Enumeration < URL > urls = classLoader . getResources ( resourceName ) ; while ( urls . hasMoreElements ( ) ) { URL url = urls . nextElement ( ) ; URLConnection con = url . openConnection ( ) ; try ( InputStream is = con . getInputStream ( ) ) { if ( resourceName . endsWith ( XML_FILE_EXTENSION ) ) { props . loadFromXM... |
public class DefaultGroovyMethods { /** * Iterates through this collection transforming each entry into a new value using Closure . IDENTITY
* as a transformer , basically returning a list of items copied from the original collection .
* < pre class = " groovyTestCase " > assert [ 1,2,3 ] = = [ 1,2,3 ] . collect ( ... | return collect ( self , ( Closure < T > ) Closure . IDENTITY ) ; |
public class ThreadFactoryBuilder { /** * 设置线程优先级
* @ param priority 优先级
* @ return this
* @ see Thread # MIN _ PRIORITY
* @ see Thread # NORM _ PRIORITY
* @ see Thread # MAX _ PRIORITY */
public ThreadFactoryBuilder setPriority ( int priority ) { } } | if ( priority < Thread . MIN_PRIORITY ) { throw new IllegalArgumentException ( StrUtil . format ( "Thread priority ({}) must be >= {}" , priority , Thread . MIN_PRIORITY ) ) ; } if ( priority > Thread . MAX_PRIORITY ) { throw new IllegalArgumentException ( StrUtil . format ( "Thread priority ({}) must be <= {}" , prior... |
public class DefaultFacebookClient { /** * Returns the base endpoint URL for the Graph API .
* @ return The base endpoint URL for the Graph API . */
protected String getFacebookGraphEndpointUrl ( ) { } } | if ( apiVersion . isUrlElementRequired ( ) ) { return getFacebookEndpointUrls ( ) . getGraphEndpoint ( ) + '/' + apiVersion . getUrlElement ( ) ; } else { return getFacebookEndpointUrls ( ) . getGraphEndpoint ( ) ; } |
public class JmsConnectionImpl { /** * Sets the state .
* @ param state The state to set */
protected void setState ( int newState ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setState" , newState ) ; synchronized ( stateLock ) { if ( ( newState == JmsInternalConstants . CLOSED ) || ( newState == JmsInternalConstants . STOPPED ) || ( newState == JmsInternalConstants . STARTED ) ) { state =... |
public class BitstampAdapters { /** * Adapts a Transaction [ ] to a Trades Object
* @ param transactions The Bitstamp transactions
* @ param currencyPair ( e . g . BTC / USD )
* @ return The XChange Trades */
public static Trades adaptTrades ( BitstampTransaction [ ] transactions , CurrencyPair currencyPair ) { }... | List < Trade > trades = new ArrayList < > ( ) ; long lastTradeId = 0 ; for ( BitstampTransaction tx : transactions ) { final long tradeId = tx . getTid ( ) ; if ( tradeId > lastTradeId ) { lastTradeId = tradeId ; } trades . add ( adaptTrade ( tx , currencyPair , 1000 ) ) ; } return new Trades ( trades , lastTradeId , T... |
public class scalarmult { /** * CONVERT # include " fe . h " */
public static int crypto_scalarmult ( byte [ ] q , byte [ ] n , byte [ ] p ) { } } | byte [ ] e = new byte [ 32 ] ; int i ; int [ ] x1 = new int [ 10 ] ; int [ ] x2 = new int [ 10 ] ; int [ ] z2 = new int [ 10 ] ; int [ ] x3 = new int [ 10 ] ; int [ ] z3 = new int [ 10 ] ; int [ ] tmp0 = new int [ 10 ] ; int [ ] tmp1 = new int [ 10 ] ; int pos ; int swap ; int b ; for ( i = 0 ; i < 32 ; ++ i ) e [ i ] ... |
public class AbstractBlock { /** * Get the position of the provided block in the provided list of blocks .
* Can ' t use { @ link List # indexOf ( Object ) } since it ' s using { @ link Object # equals ( Object ) } internally which is not
* what we want since two WordBlock with the same text or two spaces are equal... | int position = 0 ; for ( Block child : blocks ) { if ( child == block ) { return position ; } ++ position ; } return - 1 ; |
public class StringUtil { /** * Returns the index within this string of the last occurrence of the
* specified character , searching backward starting at the specified index .
* @ param pString The string to test
* @ param pChar The character to look for
* @ param pPos The last index to test
* @ return if the... | if ( ( pString == null ) ) { return - 1 ; } // Get first char
char lower = Character . toLowerCase ( ( char ) pChar ) ; char upper = Character . toUpperCase ( ( char ) pChar ) ; int indexLower ; int indexUpper ; // Test for char
indexLower = pString . lastIndexOf ( lower , pPos ) ; indexUpper = pString . lastIndexOf ( ... |
public class Parameters { /** * Convenience method to call { @ link # getExistingFile ( String ) } and then apply { @ link
* FileUtils # loadStringSet ( CharSource ) } on it , if the param is present . If the param is missing ,
* { @ link Optional # absent ( ) } is returned . */
public Optional < ImmutableSet < Str... | if ( isPresent ( param ) ) { return Optional . of ( FileUtils . loadStringSet ( Files . asCharSource ( getExistingFile ( param ) , Charsets . UTF_8 ) ) ) ; } else { return Optional . absent ( ) ; } |
public class StandardBullhornData { /** * Makes the call to the resume parser . If parse fails this method will retry RESUME _ PARSE _ RETRY number of times .
* @ param url
* @ param requestPayLoad
* @ param uriVariables
* @ return */
protected ParsedResume parseResume ( String url , Object requestPayLoad , Map... | ParsedResume response = null ; for ( int tryNumber = 1 ; tryNumber <= RESUME_PARSE_RETRY ; tryNumber ++ ) { try { response = this . performPostResumeRequest ( url , requestPayLoad , uriVariables ) ; break ; } catch ( HttpStatusCodeException error ) { response = handleResumeParseError ( tryNumber , error ) ; } catch ( E... |
public class Normalizer { /** * Concatenate normalized strings , making sure that the result is normalized
* as well .
* If both the left and the right strings are in
* the normalization form according to " mode " ,
* then the result will be
* < code >
* dest = normalize ( left + right , mode )
* < / code... | if ( dest == null ) { throw new IllegalArgumentException ( ) ; } /* check for overlapping right and destination */
if ( right == dest && rightStart < destLimit && destStart < rightLimit ) { throw new IllegalArgumentException ( "overlapping right and dst ranges" ) ; } /* allow left = = dest */
StringBuilder destBuilder ... |
public class Cache { /** * 将一个或多个值 value 插入到列表 key 的表尾 ( 最右边 ) 。
* 如果有多个 value 值 , 那么各个 value 值按从左到右的顺序依次插入到表尾 : 比如
* 对一个空列表 mylist 执行 RPUSH mylist a b c , 得出的结果列表为 a b c ,
* 等同于执行命令 RPUSH mylist a 、 RPUSH mylist b 、 RPUSH mylist c 。
* 如果 key 不存在 , 一个空列表会被创建并执行 RPUSH 操作 。
* 当 key 存在但不是列表类型时 , 返回一个错误 。 */
publ... | Jedis jedis = getJedis ( ) ; try { return jedis . rpush ( keyToBytes ( key ) , valuesToBytesArray ( values ) ) ; } finally { close ( jedis ) ; } |
public class WebUtils { /** * Creates and returns TextView objects based on WebElements
* @ return an ArrayList with TextViews */
private ArrayList < TextView > createAndReturnTextViewsFromWebElements ( boolean javaScriptWasExecuted ) { } } | ArrayList < TextView > webElementsAsTextViews = new ArrayList < TextView > ( ) ; if ( javaScriptWasExecuted ) { for ( WebElement webElement : webElementCreator . getWebElementsFromWebViews ( ) ) { if ( isWebElementSufficientlyShown ( webElement ) ) { RobotiumTextView textView = new RobotiumTextView ( inst . getContext ... |
public class PropertyWrapperImpl { /** * { @ inheritDoc } */
public Class < ? > getType ( ) { } } | if ( setter != null ) { return setter . getParameterTypes ( ) [ 0 ] ; } if ( getter != null ) { return getter . getReturnType ( ) ; } if ( field != null ) { return field . getType ( ) ; } return null ; |
public class DataStore { /** * Create a DataStore object from JSON .
* @ param json JSON of the DataStore
* @ return DataStore object corresponding to the given JSON
* @ throws ParseException If the JSON is invalid */
public static DataStore fromJson ( final JSONObject json ) throws ParseException { } } | DataStore ret ; JSONArray jsonCols = json . getJSONArray ( "fields" ) ; if ( ! "time" . equals ( jsonCols . get ( 0 ) ) ) { throw new JSONException ( "time must be the first item in 'fields'" ) ; } Set < String > cols = new HashSet < String > ( ) ; for ( int i = 1 ; i < jsonCols . length ( ) ; i ++ ) { cols . add ( jso... |
public class SolrIndexer { /** * Index an object and all of its payloads
* @ param oid
* : The identifier of the object
* @ throws IndexerException
* if there were errors during indexing */
@ Override public void index ( String oid ) throws IndexerException { } } | try { DigitalObject object = storage . getObject ( oid ) ; // Some workflow actions create payloads , so we can ' t iterate
// directly against the object .
String [ ] oldManifest = { } ; oldManifest = object . getPayloadIdList ( ) . toArray ( oldManifest ) ; for ( String payloadId : oldManifest ) { Payload payload = o... |
public class GrailsWebUtil { /** * Retrieves the URI from the request from either the include attribute or the request . getRequestURI ( ) method .
* @ param request The HttpServletRequest instance
* @ return The String URI */
public static String getUriFromRequest ( HttpServletRequest request ) { } } | Object includeUri = request . getAttribute ( "javax.servlet.include.request_uri" ) ; return includeUri == null ? request . getRequestURI ( ) : ( String ) includeUri ; |
public class JCRCacheHandler { /** * { @ inheritDoc } */
@ Override protected boolean matchKey ( Serializable cacheKey ) { } } | if ( cacheKey instanceof String ) { try { // check is prefix equals to " repository : "
String prefix = jcrOrganizationServiceImpl . getWorkingRepository ( ) . getConfiguration ( ) . getName ( ) + DELIMITER ; return ( ( String ) cacheKey ) . startsWith ( prefix ) ; } catch ( RepositoryException e ) { throw new IllegalS... |
public class BsonGenerator { /** * Escapes the given string according to { @ link # _ characterEscapes } . If
* there are no character escapes returns the original string .
* @ param string the string to escape
* @ return the escaped string or the original one if there is nothing to escape
* @ throws IOExceptio... | if ( _characterEscapes == null ) { // escaping not necessary
return string ; } StringBuilder sb = null ; int lastEscapePos = 0 ; for ( int i = 0 ; i < string . length ( ) ; ++ i ) { int c = string . charAt ( i ) ; if ( c <= 0x7F && _outputEscapes [ c ] == CharacterEscapes . ESCAPE_CUSTOM ) { SerializableString escape =... |
public class FTPFileSystem { /** * Convenience method , so that we don ' t open a new connection when using this
* method from within another method . Otherwise every API invocation incurs
* the overhead of opening / closing a TCP connection . */
private boolean exists ( FTPClient client , Path file ) { } } | try { return getFileStatus ( client , file ) != null ; } catch ( FileNotFoundException fnfe ) { return false ; } catch ( IOException ioe ) { throw new FTPException ( "Failed to get file status" , ioe ) ; } |
public class CmsUserDriver { /** * Returns a sql query to select groups . < p >
* @ param mainQuery the main select sql query
* @ param includeSubOus if groups in sub - ous should be included in the selection
* @ param readRoles if groups or roles whould be selected
* @ return a sql query to select groups */
pr... | String sqlQuery = m_sqlManager . readQuery ( mainQuery ) ; sqlQuery += " " ; if ( includeSubOus ) { sqlQuery += m_sqlManager . readQuery ( "C_GROUPS_GROUP_OU_LIKE_1" ) ; } else { sqlQuery += m_sqlManager . readQuery ( "C_GROUPS_GROUP_OU_EQUALS_1" ) ; } sqlQuery += AND_CONDITION ; if ( readRoles ) { sqlQuery += m_sqlMan... |
public class GetUserAttributeVerificationCodeRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( GetUserAttributeVerificationCodeRequest getUserAttributeVerificationCodeRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( getUserAttributeVerificationCodeRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getUserAttributeVerificationCodeRequest . getAccessToken ( ) , ACCESSTOKEN_BINDING ) ; protocolMarshaller . marshall ( getUserAttributeVerificati... |
public class SequenceLabelerME { /** * sets the probs for the spans
* @ param spans
* @ return */
private Span [ ] setProbs ( final Span [ ] spans ) { } } | final double [ ] probs = probs ( spans ) ; if ( probs != null ) { for ( int i = 0 ; i < probs . length ; i ++ ) { final double prob = probs [ i ] ; spans [ i ] = new Span ( spans [ i ] , prob ) ; } } return spans ; |
public class CombinedRuleUserList { /** * Gets the leftOperand value for this CombinedRuleUserList .
* @ return leftOperand * < span class = " constraint Required " > This field is required and
* should not be { @ code null } when it is contained within { @ link Operator } s
* : ADD . < / span > */
public com . g... | return leftOperand ; |
public class CommandLineParser { /** * unparseTokens .
* @ param args a { @ link java . util . List } object .
* @ param out a { @ link java . lang . StringBuilder } object . */
static public void unparseTokens ( final List < ICmdLineArg < ? > > args , final StringBuilder out ) { } } | final Iterator < ICmdLineArg < ? > > aIter = args . iterator ( ) ; boolean first = true ; while ( aIter . hasNext ( ) ) { final ICmdLineArg < ? > arg = aIter . next ( ) ; if ( arg . isParsed ( ) ) { if ( ! first ) out . append ( " " ) ; first = false ; arg . exportCommandLine ( out ) ; } } |
public class BaseReportGenerator { /** * This method will be called when exceptions are thrown in
* { @ link # createReportBody ( com . itextpdf . text . Document , com . vectorprint . report . data . ReportDataHolder ) } or
* { @ link DebugHelper # appendDebugInfo ( com . itextpdf . text . pdf . PdfWriter , com . ... | if ( getSettings ( ) . getBooleanProperty ( Boolean . TRUE , ReportConstants . STOPONERROR ) ) { throw ( ex instanceof VectorPrintRuntimeException ) ? ( VectorPrintRuntimeException ) ex : new VectorPrintRuntimeException ( "failed to generate the report: " + ex . getMessage ( ) , ex ) ; } else { PrintStream out ; ByteAr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.