signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class CommonOps_DDF3 { /** * Sets all the diagonal elements equal to one and everything else equal to zero . * If this is a square matrix then it will be an identity matrix . * @ param a A matrix . */ public static void setIdentity ( DMatrix3x3 a ) { } }
a . a11 = 1 ; a . a21 = 0 ; a . a31 = 0 ; a . a12 = 0 ; a . a22 = 1 ; a . a32 = 0 ; a . a13 = 0 ; a . a23 = 0 ; a . a33 = 1 ;
public class OperationFuture { /** * Cancel this operation , if possible . * @ param ign not used * @ deprecated * @ return true if the operation has not yet been written to the network */ public boolean cancel ( boolean ign ) { } }
assert op != null : "No operation" ; op . cancel ( ) ; notifyListeners ( ) ; return op . getState ( ) == OperationState . WRITE_QUEUED ;
public class VdmLineBreakpointPropertyPage { /** * ( non - Javadoc ) * @ see * org . eclipse . jdt . internal . debug . ui . propertypages . JavaBreakpointPage # createTypeSpecificLabels ( org . eclipse . swt . widgets * . Composite ) */ protected void createTypeSpecificLabels ( Composite parent ) { } }
// Line number IVdmLineBreakpoint breakpoint = ( IVdmLineBreakpoint ) getBreakpoint ( ) ; StringBuffer lineNumber = new StringBuffer ( 4 ) ; try { int lNumber = breakpoint . getLineNumber ( ) ; if ( lNumber > 0 ) { lineNumber . append ( lNumber ) ; } } catch ( CoreException ce ) { // JDIDebugUIPlugin . log ( ce ) ; } i...
public class SearchParameterMap { /** * If set , tells the server to load these results synchronously , and not to load * more than X results . Note that setting this to a value will also set * { @ link # setLoadSynchronous ( boolean ) } to true */ public SearchParameterMap setLoadSynchronousUpTo ( Integer theLoadS...
myLoadSynchronousUpTo = theLoadSynchronousUpTo ; if ( myLoadSynchronousUpTo != null ) { setLoadSynchronous ( true ) ; } return this ;
public class HldAccProcessorNames { /** * < p > Get thing for given class and thing name . < / p > * @ param pClass a Class * @ param pThingName Thing Name * @ return a thing */ @ Override public final String getFor ( final Class < ? > pClass , final String pThingName ) { } }
if ( "list" . equals ( pThingName ) ) { if ( pClass == PaymentFrom . class || pClass == PaymentTo . class || pClass == PrepaymentFrom . class || pClass == PrepaymentTo . class || pClass == SubaccountLine . class || pClass == AdditionCostLine . class || pClass == Account . class ) { return PrcPageWithSubaccTypes . class...
public class Parse { /** * Gets the value of the sections property . * @ return * possible object is * { @ link Sections } */ @ XmlElementWrapper ( name = "sections" ) @ XmlElement ( name = "s" , type = S . class ) public List < S > getSections ( ) { } }
return sections ;
public class DITableInfo { /** * Retrieves the scope of the best row identifier . < p > * This implements the rules described in * DatabaseInformationMain . SYSTEM _ BESTROWIDENTIFIER . < p > * @ return the scope of the best row identifier */ Integer getBRIScope ( ) { } }
return ( table . isWritable ( ) ) ? ValuePool . getInt ( bestRowTemporary ) : ValuePool . getInt ( bestRowSession ) ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EEnum getIfcAddressTypeEnum ( ) { } }
if ( ifcAddressTypeEnumEEnum == null ) { ifcAddressTypeEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 773 ) ; } return ifcAddressTypeEnumEEnum ;
public class H2OHttpViewImpl { /** * normal login handler part / / todo : consider using mostly the same code as in proxy part below */ @ Override public boolean loginHandler ( String target , HttpServletRequest request , HttpServletResponse response ) throws IOException { } }
if ( ! isLoginTarget ( target ) ) { return false ; } if ( isPageRequest ( request ) ) { sendLoginForm ( request , response ) ; } else { ServletUtils . sendResponseError ( response , HttpServletResponse . SC_UNAUTHORIZED , "Access denied. Please login." ) ; } return true ;
public class DeveloperUtilitiesServiceProgrammatic { @ Programmatic public Clob downloadMetaModel ( ) { } }
final Collection < ObjectSpecification > specifications = specificationLoader . allSpecifications ( ) ; final List < MetaModelRow > rows = Lists . newArrayList ( ) ; for ( final ObjectSpecification spec : specifications ) { if ( exclude ( spec ) ) { continue ; } final List < ObjectAssociation > properties = spec . getA...
public class LetterOrNumberValidator { /** * Sets the case sensitivity , which should be used by the validator . * @ param caseSensitivty * The case senstivitiy , which should be set , as a value of the enum { @ link Case } . The * value may either be < code > UPPERCASE < / code > , < code > LOWERCASE < / code > ...
Condition . INSTANCE . ensureNotNull ( caseSensitivty , "The case sensitivity may not be null" ) ; this . caseSensitivity = caseSensitivty ;
public class ChineseValidator { /** * 判断中文汉字和符号 */ public static boolean isChinese ( String strName ) { } }
char [ ] ch = strName . toCharArray ( ) ; for ( int i = 0 ; i < ch . length ; i ++ ) { char c = ch [ i ] ; if ( isChinese ( c ) ) { return true ; } } return false ;
public class TargetSession { /** * Sets the session ' s type ( discovery or operational ) . * The type may and must be set just once . Repeated calls of this method will fail . < code > true < / code > will be * returned if the session type was set successfully , < code > false < / code > if not . * @ param sessi...
// allow just once , accept only non - null parameter if ( sessionType == null || this . sessionType != null ) return false ; this . sessionType = sessionType ; return true ;
public class ExternalEventHandlerBase { /** * Invoke a service ( synchronous ) process . The method cannot be used * if the process is not a service process . * Performance level : * 0 - to be determined by property , which will set the level to one of the following * 1,3,5,7,9 - use asynchronous engine ( 9 not...
Map < String , String > stringParams = translateParameters ( processId , parameters ) ; ProcessEngineDriver engineDriver = new ProcessEngineDriver ( ) ; return engineDriver . invokeService ( processId , OwnerType . DOCUMENT , eventInstId , masterRequestId , masterRequest , stringParams , responseVarName , performanceLe...
public class TitlePaneIconifyButtonPainter { /** * Paint the foreground restore button enabled state . * @ param g the Graphics2D context to paint with . * @ param c the component . * @ param width the width of the component . * @ param height the height of the component . */ private void paintRestoreEnabled ( ...
restorePainter . paintEnabled ( g , c , width , height ) ;
public class SVGParser { /** * Parse the style attributes for an element . */ private void parseAttributesStyle ( SvgElementBase obj , Attributes attributes ) throws SVGParseException { } }
for ( int i = 0 ; i < attributes . getLength ( ) ; i ++ ) { String val = attributes . getValue ( i ) . trim ( ) ; if ( val . length ( ) == 0 ) { // Empty attribute . Ignore it . continue ; } // boolean inherit = val . equals ( " inherit " ) ; / / NYI switch ( SVGAttr . fromString ( attributes . getLocalName ( i ) ) ) {...
public class CoverageData { /** * Get the coverage data values from the tile results scaled to the provided * dimensions * @ param tileMatrix * tile matrix * @ param tileResults * tile results * @ param request * coverage data request * @ param tileWidth * tile width * @ param tileHeight * tile he...
Double [ ] [ ] values = null ; // Tiles are ordered by rows and then columns . Track the last column // coverage data of the tile to the left and the last rows of the tiles // in the row above Double [ ] [ ] leftLastColumns = null ; Map < Long , Double [ ] [ ] > lastRowsByColumn = null ; Map < Long , Double [ ] [ ] > p...
public class FindBugs { /** * Configure training databases . * @ param findBugs * the IFindBugsEngine to configure * @ throws IOException */ public static void configureTrainingDatabases ( IFindBugsEngine findBugs ) throws IOException { } }
if ( findBugs . emitTrainingOutput ( ) ) { String trainingOutputDir = findBugs . getTrainingOutputDir ( ) ; if ( ! new File ( trainingOutputDir ) . isDirectory ( ) ) { throw new IOException ( "Training output directory " + trainingOutputDir + " does not exist" ) ; } AnalysisContext . currentAnalysisContext ( ) . setDat...
public class WebSocketNativeBridgeHandler { /** * Establishes the websocket connection */ @ Override public synchronized void processConnect ( WebSocketChannel channel , WSURI uri , String [ ] protocols ) { } }
LOG . entering ( CLASS_NAME , "processConnect" , new Object [ ] { uri , protocols } ) ; try { WebSocketNativeChannel nativeChannel = ( WebSocketNativeChannel ) channel ; if ( nativeChannel . getProxy ( ) != null ) { throw new IllegalStateException ( "Bridge proxy previously set" ) ; } Proxy proxy = BridgeUtil . createP...
public class DocumentInputStreamFactory { /** * Method used to instantiate the appropriate input stream reader , * a standard one , or one which can deal with " encrypted " data . * @ param directory directory entry * @ param name file name * @ return new input stream * @ throws IOException */ public InputStr...
DocumentEntry entry = ( DocumentEntry ) directory . getEntry ( name ) ; InputStream stream ; if ( m_encrypted ) { stream = new EncryptedDocumentInputStream ( entry , m_encryptionCode ) ; } else { stream = new DocumentInputStream ( entry ) ; } return stream ;
public class ExtractorUtils { /** * If necessary , replace the input for the configured repositories to their values * under the current environment . We are not allowing for the input or the value to be empty . */ private static void replaceRepositoryInputForValues ( ArtifactoryClientConfiguration configuration , Ru...
if ( StringUtils . isBlank ( resolverReleaseInput ) || StringUtils . isBlank ( resolverSnapshotInput ) ) { build . setResult ( Result . FAILURE ) ; throw new IllegalStateException ( "Input for resolve repositories cannot be empty." ) ; } String resolveReleaseRepo = Util . replaceMacro ( resolverReleaseInput , env ) ; S...
public class FileExtensions { /** * Not yet implemented . Checks if the given file is open . * @ param file * The file to check . * @ return Return true if the file is open otherwise false . * @ throws IOException * Signals that an I / O exception has occurred . */ public static boolean isOpen ( final File fi...
boolean open = false ; FileLock lock = null ; try ( RandomAccessFile fileAccess = new RandomAccessFile ( file . getAbsolutePath ( ) , "rw" ) ) { lock = fileAccess . getChannel ( ) . tryLock ( ) ; if ( lock == null ) { open = true ; } else { lock . release ( ) ; } } return open ;
public class TypedIdKey { /** * Retrieves a value with the given type and id from the given map . * @ param < V > the value type * @ param map the map * @ param type the type * @ param id the id * @ return the associated value , if any */ @ SuppressWarnings ( { } }
"unchecked" } ) public static < V > Optional < V > get ( Map < ? , ? > map , Class < V > type , Serializable id ) { return Optional . ofNullable ( ( V ) map . get ( new TypedIdKey < > ( type , id ) ) ) ;
public class ConnectionstateResponse { /** * Returns a textual representation of the status code . * @ return short description of status as string */ public String getStatusString ( ) { } }
switch ( status ) { case ErrorCodes . NO_ERROR : return "connection state is normal" ; case ErrorCodes . CONNECTION_ID : return "server could not find active data connection with specified ID" ; case ErrorCodes . DATA_CONNECTION : return "server detected error concerning the data connection" ; case ErrorCodes . KNX_CON...
public class SyncGroupsInner { /** * Creates or updates a sync group . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param serverName The name of the server . * @ param databaseName The name...
return beginCreateOrUpdateWithServiceResponseAsync ( resourceGroupName , serverName , databaseName , syncGroupName , parameters ) . map ( new Func1 < ServiceResponse < SyncGroupInner > , SyncGroupInner > ( ) { @ Override public SyncGroupInner call ( ServiceResponse < SyncGroupInner > response ) { return response . body...
public class Benchmark { /** * Rastrigin ' s function */ static public double rastrigin ( double [ ] x ) { } }
double sum = 0.0 ; for ( int i = 0 ; i < x . length ; i ++ ) { sum += ( x [ i ] * x [ i ] ) - ( 10.0 * Math . cos ( PIx2 * x [ i ] ) ) + 10.0 ; } return ( sum ) ;
public class VisitorState { /** * Validates a type string , ensuring it is not generic and not an array type . */ private static void validateTypeStr ( String typeStr ) { } }
if ( typeStr . contains ( "[" ) || typeStr . contains ( "]" ) ) { throw new IllegalArgumentException ( String . format ( "Cannot convert array types (%s), please build them using getType()" , typeStr ) ) ; } if ( typeStr . contains ( "<" ) || typeStr . contains ( ">" ) ) { throw new IllegalArgumentException ( String . ...
public class Util { /** * Prepend or postpend the given string with the given character to fill the given field length . * If the given string is equal or greater than the given field length , it will be returned * without modification . * @ param s the given string * @ param fieldLength the desired field lengt...
final char [ ] chArr = s . toCharArray ( ) ; final int sLen = chArr . length ; if ( sLen < fieldLength ) { final char [ ] out = new char [ fieldLength ] ; final int blanks = fieldLength - sLen ; if ( postpend ) { for ( int i = 0 ; i < sLen ; i ++ ) { out [ i ] = chArr [ i ] ; } for ( int i = sLen ; i < fieldLength ; i ...
public class Config { /** * the kubeconfig references some assets via relative paths . */ private static boolean loadFromKubeconfig ( Config config , String context , String kubeconfigContents , String kubeconfigPath ) { } }
try { io . fabric8 . kubernetes . api . model . Config kubeConfig = KubeConfigUtils . parseConfigFromString ( kubeconfigContents ) ; if ( context != null ) { kubeConfig . setCurrentContext ( context ) ; } Context currentContext = KubeConfigUtils . getCurrentContext ( kubeConfig ) ; Cluster currentCluster = KubeConfigUt...
public class AbstractMetadataPublishingController { /** * Returns the metadata for the entity . * @ param request * the HTTP request * @ param acceptHeader * the Accept header value * @ return an HttpEntity holding the SAML metadata */ public HttpEntity < byte [ ] > getMetadata ( HttpServletRequest request , ...
logger . debug ( "Request to download metadata from {}" , request . getRemoteAddr ( ) ) ; try { // Check if the metadata is up - to - date according to how the container was configured . if ( this . metadataContainer . updateRequired ( true ) ) { logger . debug ( "Metadata needs to be updated ..." ) ; this . metadataCo...
public class RequestArguments { /** * Returns a json object containing all arguments specified to the page . * Useful for redirects and polling . */ protected JsonObject argumentsToJson ( ) { } }
JsonObject result = new JsonObject ( ) ; for ( Argument a : _arguments ) { if ( a . specified ( ) ) result . addProperty ( a . _name , a . originalValue ( ) ) ; } return result ;
public class PersistenceController { /** * Insert new message statuses obtained from message query . * @ param conversationId Unique conversation id . * @ param profileId Profile id from current session details . * @ param msgStatusList New message statuses . * @ return Observable emitting result . */ public Ob...
return asObservable ( new Executor < Boolean > ( ) { @ Override void execute ( ChatStore store , Emitter < Boolean > emitter ) { store . beginTransaction ( ) ; boolean isSuccess = false ; for ( MessageStatusUpdate statusUpdate : msgStatusList ) { for ( String messageId : statusUpdate . getMessageIds ( ) ) { LocalMessag...
public class BlockHeartbeatPRequest { /** * < code > optional . alluxio . grpc . block . BlockHeartbeatPOptions options = 5 ; < / code > */ public alluxio . grpc . BlockHeartbeatPOptions getOptions ( ) { } }
return options_ == null ? alluxio . grpc . BlockHeartbeatPOptions . getDefaultInstance ( ) : options_ ;
public class DateUtils { /** * Takes a byte size and formats it for display with ' friendly ' units . * This involves converting it to the largest unit * ( of B , KiB , MiB , GiB , TiB ) for which the amount will be > 1. * Additionally , at least 2 significant digits are always displayed . * Negative numbers wi...
double displayAmount = ( double ) amount ; int unitPowerOf1024 = 0 ; if ( amount <= 0 ) { return "0 B" ; } while ( displayAmount >= 1024 && unitPowerOf1024 < 4 ) { displayAmount = displayAmount / 1024 ; unitPowerOf1024 ++ ; } final String [ ] units = { " B" , " KiB" , " MiB" , " GiB" , " TiB" } ; // ensure at least 2 s...
public class Terminals { /** * Returns a { @ link Terminals } object for lexing and parsing the operators with names specified in * { @ code ops } , and for lexing and parsing the keywords case insensitively . Parsers for operators * and keywords can be obtained through { @ link # token } ; parsers for identifiers ...
return operators ( ops ) . words ( wordScanner ) . caseInsensitiveKeywords ( keywords ) . build ( ) ;
public class ClientFlakeIdGeneratorConfig { /** * Sets how many IDs are pre - fetched on the background when one call to * { @ link FlakeIdGenerator # newId ( ) } is made . Default is 100. * @ param prefetchCount the desired prefetch count , in the range 1 . . 100,000. * @ return this instance for fluent API */ p...
checkTrue ( prefetchCount > 0 && prefetchCount <= MAXIMUM_PREFETCH_COUNT , "prefetch-count must be 1.." + MAXIMUM_PREFETCH_COUNT + ", not " + prefetchCount ) ; this . prefetchCount = prefetchCount ; return this ;
public class AbstractCasWebflowConfigurer { /** * Create mapping to subflow state . * @ param name the name * @ param value the value * @ param required the required * @ param type the type * @ return the default mapping */ public DefaultMapping createMappingToSubflowState ( final String name , final String v...
val parser = this . flowBuilderServices . getExpressionParser ( ) ; val source = parser . parseExpression ( value , new FluentParserContext ( ) ) ; val target = parser . parseExpression ( name , new FluentParserContext ( ) ) ; val mapping = new DefaultMapping ( source , target ) ; mapping . setRequired ( required ) ; v...
public class HttpServletResponseImpl { /** * Return < code > true < / code > if the specified URL should be encoded with * a session identifier . This will be true if all of the following * conditions are met : * < ul > * < li > The request we are responding to asked for a valid session * < li > The requested...
if ( location == null ) return ( false ) ; // Is this an intra - document reference ? if ( location . startsWith ( "#" ) ) return ( false ) ; // Are we in a valid session that is not using cookies ? final HttpServletRequestImpl hreq = exchange . getAttachment ( ServletRequestContext . ATTACHMENT_KEY ) . getOriginalRequ...
public class RunContainer { /** * Return the content of this container as a ShortBuffer . This creates a copy and might be * relatively slow . * @ return the ShortBuffer */ public ShortBuffer toShortBuffer ( ) { } }
ShortBuffer sb = ShortBuffer . allocate ( this . nbrruns * 2 ) ; sb . put ( this . valueslength , 0 , this . nbrruns * 2 ) ; return sb ;
public class BitInputStream { /** * Expect . * @ param bits the bits * @ throws IOException the io exception */ public void expect ( final Bits bits ) throws IOException { } }
int size = Math . min ( availible ( ) , bits . bitLength ) ; Bits read = read ( size ) ; if ( ! bits . range ( 0 , size ) . equals ( read ) ) { throw new RuntimeException ( String . format ( "%s is not expected %s" , read , bits ) ) ; }
public class AbstractDraweeController { /** * Sets the hierarchy . * < p > The controller should be detached when this method is called . * @ param hierarchy This must be an instance of { @ link SettableDraweeHierarchy } */ @ Override public void setHierarchy ( @ Nullable DraweeHierarchy hierarchy ) { } }
if ( FLog . isLoggable ( FLog . VERBOSE ) ) { FLog . v ( TAG , "controller %x %s: setHierarchy: %s" , System . identityHashCode ( this ) , mId , hierarchy ) ; } mEventTracker . recordEvent ( ( hierarchy != null ) ? Event . ON_SET_HIERARCHY : Event . ON_CLEAR_HIERARCHY ) ; // force release in case request was submitted ...
public class Type { /** * Returns the descriptor corresponding to the given argument and return * types . * @ param returnType * the return type of the method . * @ param argumentTypes * the argument types of the method . * @ return the descriptor corresponding to the given argument and return * types . *...
StringBuilder sb = new StringBuilder ( ) ; sb . append ( '(' ) ; for ( int i = 0 ; i < argumentTypes . length ; ++ i ) { argumentTypes [ i ] . getDescriptor ( sb ) ; } sb . append ( ')' ) ; returnType . getDescriptor ( sb ) ; return sb . toString ( ) ;
public class ByteArrayUtil { /** * Put the source < i > float < / i > into the destination byte array starting at the given offset * in big endian order . * There is no bounds checking . * @ param array destination byte array * @ param offset destination offset * @ param value source < i > float < / i > */ pu...
putIntBE ( array , offset , Float . floatToRawIntBits ( value ) ) ;
public class ExtensionHook { /** * Adds the given { @ code httpSenderListener } to the extension hook , to be later added to the * { @ link org . parosproxy . paros . network . HttpSender HttpSender } . * By default , the { @ code HttpSenderListener } s added to this extension hook are removed from the { @ code Htt...
if ( httpSenderListener == null ) { throw new IllegalArgumentException ( "Parameter httpSenderListener must not be null." ) ; } if ( httpSenderListeners == null ) { httpSenderListeners = new ArrayList < > ( ) ; } httpSenderListeners . add ( httpSenderListener ) ;
public class OpenAPIImpl { /** * helpers */ @ Override public OpenAPI path ( String name , PathItem path ) { } }
if ( this . paths == null ) { this . paths = new PathsImpl ( ) ; } this . paths . addPathItem ( name , path ) ; return this ;
public class Settings { /** * Checks whether a feature is enabled in the effective configuration . * < p > A feature is identified by a path expression relative to { @ link # CONFIG _ ROOT } , such as * { @ code context - propagation . executor } . The feature is enabled iff the config element at the * requested ...
checkArgument ( ! Strings . isNullOrEmpty ( featurePath ) ) ; return config . getConfig ( featurePath ) . getBoolean ( "enabled" ) ;
public class GenericMetadataSupport { /** * Registers the type variables for the given type and all of its superclasses and superinterfaces . */ protected void registerAllTypeVariables ( Type classType ) { } }
Queue < Type > typesToRegister = new LinkedList < Type > ( ) ; Set < Type > registeredTypes = new HashSet < Type > ( ) ; typesToRegister . add ( classType ) ; while ( ! typesToRegister . isEmpty ( ) ) { Type typeToRegister = typesToRegister . poll ( ) ; if ( typeToRegister == null || registeredTypes . contains ( typeTo...
public class BucketTimer { /** * { @ inheritDoc } */ @ Override public Long getValue ( int pollerIndex ) { } }
final long cnt = getCount ( pollerIndex ) ; return ( cnt == 0 ) ? 0L : totalTime . getValue ( ) . longValue ( ) / cnt ;
public class NullSafe { /** * Convert a list of a given type using converter . * @ param source a list to convert * @ param converter the map function to apply * @ param < S > type to convert from * @ param < R > type to convert to * @ return A converted List with all pre - conversion and post - conversion nu...
return ( source == null ) ? null : source . stream ( ) . filter ( Objects :: nonNull ) . map ( converter ) . filter ( Objects :: nonNull ) . collect ( Collectors . toList ( ) ) ;
public class BrokerHelper { /** * Return key Values of an Identity * @ param cld * @ param oid * @ param convertToSql * @ return Object [ ] * @ throws PersistenceBrokerException */ public ValueContainer [ ] getKeyValues ( ClassDescriptor cld , Identity oid , boolean convertToSql ) throws PersistenceBrokerExce...
FieldDescriptor [ ] pkFields = cld . getPkFields ( ) ; ValueContainer [ ] result = new ValueContainer [ pkFields . length ] ; Object [ ] pkValues = oid . getPrimaryKeyValues ( ) ; try { for ( int i = 0 ; i < result . length ; i ++ ) { FieldDescriptor fd = pkFields [ i ] ; Object cv = pkValues [ i ] ; if ( convertToSql ...
public class SimpleConversionService { /** * Registers all the { @ link Converter Converters } provided by { @ literal cp - elements } * in { @ link org . cp . elements . data . conversion . converters } . * @ throws IllegalArgumentException if the resource { @ link URL } of the chosen { @ link Converter } { @ link...
String converterClassResourceName = toResourceName ( CONVERTER_CLASS ) ; URL converterClassResourceLocation = resolveResourceLocation ( converterClassResourceName ) ; Assert . notNull ( converterClassResourceLocation , "Could not resolve URL for Converter class [%1$s] having resource name [%2$s]" , CONVERTER_CLASS . ge...
public class LinkedList { /** * Synchronized . Get the first entry in the list . * @ return the first entry in the list . */ public Entry getFirst ( ) { } }
if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getFirst" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getFirst" , first ) ; return first ;
public class AdminToolQuartzServiceImpl { /** * / * ( non - Javadoc ) * @ see de . chandre . admintool . quartz . AdminToolQuartzService # stopScheduler ( ) */ @ Override public void stopScheduler ( ) { } }
if ( ! config . isStopSchedulerAllowed ( ) ) { LOGGER . warn ( "not allowed to stop the scheduler" ) ; return ; } if ( LOGGER . isDebugEnabled ( ) ) LOGGER . debug ( "stopping scheduler factory" ) ; schedulerFactory . stop ( ) ;
public class CClassLoader { /** * analyse the content of the given jar file * @ param jarFile * the jar to analise */ private final void readDirectories ( final URL jarFile ) { } }
JarInputStream jarIn = null ; try { if ( ! jarFile . getPath ( ) . endsWith ( ".jar" ) ) { return ; } if ( CClassLoader . sl ( CClassLoader . DEBUG ) ) { CClassLoader . log ( "opening jar : " + jarFile . toExternalForm ( ) , CClassLoader . DEBUG ) ; } jarIn = new JarInputStream ( jarFile . openStream ( ) ) ; JarEntry j...
public class IdentityAssertionLoginModule { /** * < p > Initialize this login module . < / p > * This is called by the < code > LoginContext < / code > after this login module is * instantiated . The relevant information is passed from the < code > LoginContext < / code > * to this login module . If the login mod...
this . subject = subject ; this . sharedState = sharedState ;
public class RoadType { /** * Gets the value of the genericApplicationPropertyOfRoad property . * This accessor method returns a reference to the live list , * not a snapshot . Therefore any modification you make to the * returned list will be present inside the JAXB object . * This is why there is not a < CODE...
if ( _GenericApplicationPropertyOfRoad == null ) { _GenericApplicationPropertyOfRoad = new ArrayList < JAXBElement < Object > > ( ) ; } return this . _GenericApplicationPropertyOfRoad ;
public class EJBWrapperProxy { /** * Adds a definition for Object . hashCode method for the No - Interface view * ( LocalBean ) . * @ param cw ASM ClassWriter to add the method to . * @ param implClassName name of the wrapper class being generated . */ private static void addClassProxyHashCodeMethod ( ClassWriter...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , INDENT + "adding method : hashCode ()I" ) ; // public boolean equals ( Object other ) final String desc = "()I" ; MethodVisitor mv = cw . visitMethod ( ACC_PUBLIC , "hashCode" , desc , null , null ) ; mv . visitCode ( ) ; // re...
public class CmsSearchWidgetDialog { /** * Returns a list of < code > { @ link CmsSelectWidgetOption } < / code > objects for field list selection . < p > * @ return a list of < code > { @ link CmsSelectWidgetOption } < / code > objects */ private List < CmsSelectWidgetOption > getFieldList ( ) { } }
List < CmsSelectWidgetOption > retVal = new ArrayList < CmsSelectWidgetOption > ( ) ; try { Iterator < CmsSearchField > i = getSearchFields ( ) . iterator ( ) ; while ( i . hasNext ( ) ) { CmsLuceneField field = ( CmsLuceneField ) i . next ( ) ; retVal . add ( new CmsSelectWidgetOption ( field . getName ( ) , true , ge...
public class TextComponentInterceptor { /** * Converts the given component to a < code > JTextComponent < / code > . This can be a * simple cast if the component is already a text component , or an embedded component * ( for example a JSpinner ) . * This method is protected , and can be overridden when necessary ...
if ( component instanceof JSpinner ) { JSpinner spinner = ( JSpinner ) component ; if ( spinner . getEditor ( ) instanceof JSpinner . DefaultEditor ) { return ( ( JSpinner . DefaultEditor ) spinner . getEditor ( ) ) . getTextField ( ) ; } else if ( spinner . getEditor ( ) instanceof JTextField ) { return ( JTextField )...
public class CmsJspNavBuilder { /** * Initializes this bean . < p > * @ param cms the current cms context * @ param locale the locale for which properties should be read */ public void init ( CmsObject cms , Locale locale ) { } }
init ( cms , locale , cms . getRequestContext ( ) . getUri ( ) ) ;
public class Args { /** * Produces a single element list with a key / value pair comma separated string from a { @ link Map } . * @ return { @ code [ " key1 = value1 , key2 = value2 , . . . " ] } or { @ code [ ] } if keyValueMapping = empty / null */ static List < String > keyValueString ( @ Nullable Map < ? , ? > ke...
List < String > result = Lists . newArrayList ( ) ; if ( keyValueMapping != null && keyValueMapping . size ( ) > 0 ) { for ( Map . Entry < ? , ? > entry : keyValueMapping . entrySet ( ) ) { result . add ( entry . getKey ( ) + "=" + entry . getValue ( ) ) ; } Joiner joiner = Joiner . on ( "," ) ; return Collections . si...
public class GeoJsonReaderDriver { /** * Sets the parsed geometry to the table * * @ param jp * @ throws IOException * @ throws SQLException */ private void setGeometry ( JsonParser jp , Object [ ] values ) throws IOException , SQLException { } }
if ( jp . nextToken ( ) != JsonToken . VALUE_NULL ) { // START _ OBJECT { in case of null geometry jp . nextToken ( ) ; // FIELD _ NAME type jp . nextToken ( ) ; // VALUE _ STRING Point String geometryType = jp . getText ( ) ; values [ 0 ] = parseGeometry ( jp , geometryType ) ; }
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcDerivedUnitElement ( ) { } }
if ( ifcDerivedUnitElementEClass == null ) { ifcDerivedUnitElementEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 173 ) ; } return ifcDerivedUnitElementEClass ;
public class GwtRunner { /** * Generates the output code , taking into account the passed { @ code flags } . */ private static ChunkOutput writeChunkOutput ( Compiler compiler , Flags flags , List < JSModule > chunks ) { } }
ArrayList < File > outputFiles = new ArrayList < > ( ) ; ChunkOutput output = new ChunkOutput ( ) ; Map < String , String > parsedModuleWrappers = parseModuleWrappers ( Arrays . asList ( getStringArray ( flags , "chunkWrapper" ) ) , chunks ) ; for ( JSModule c : chunks ) { if ( flags . createSourceMap != null && ! flag...
public class DBRestore { /** * Restore table . */ private void restoreTable ( File storageDir , Connection jdbcConn , String tableName , TableTransformationRule restoreRule ) throws IOException , SQLException { } }
// Need privileges SecurityManager security = System . getSecurityManager ( ) ; if ( security != null ) { security . checkPermission ( JCRRuntimePermissions . MANAGE_REPOSITORY_PERMISSION ) ; } ZipObjectReader contentReader = null ; ZipObjectReader contentLenReader = null ; PreparedStatement insertNode = null ; ResultS...
public class ReflectUtil { /** * Test if the given class is a proxy class that implements * non - public interface . Such proxy class may be in a non - restricted * package that bypasses checkPackageAccess . */ public static boolean isNonPublicProxyClass ( Class < ? > cls ) { } }
String name = cls . getName ( ) ; int i = name . lastIndexOf ( '.' ) ; String pkg = ( i != - 1 ) ? name . substring ( 0 , i ) : "" ; // NOTE : Android creates proxies in the " default " package ( and not com . sun . proxy ) , which // makes this check imprecise . However , this function is only ever called if there ' s...
public class CacheConfigurationBuilder { /** * Adds a { @ link ResilienceStrategy } configured through a class and optional constructor arguments to the configured * builder . * @ param resilienceStrategyClass the resilience strategy class * @ param arguments optional constructor arguments * @ return a new buil...
return addOrReplaceConfiguration ( new DefaultResilienceStrategyConfiguration ( requireNonNull ( resilienceStrategyClass , "Null resilienceStrategyClass" ) , arguments ) ) ;
public class GoogleMapsTileMath { /** * Transforms given lat / lon in WGS84 Datum to XY in Spherical Mercator * EPSG : 3857 * @ param env The envelope to transform * @ return The envelope transformed to EPSG : 3857 */ public Envelope lngLatToMeters ( Envelope env ) { } }
Coordinate min = lngLatToMeters ( env . getMinX ( ) , env . getMinY ( ) ) ; Coordinate max = lngLatToMeters ( env . getMaxX ( ) , env . getMaxY ( ) ) ; Envelope result = new Envelope ( min . x , max . x , min . y , max . y ) ; return result ;
public class NaaccrXmlDictionaryUtils { /** * Merges the given base dictionary and user dictionaries into one dictionary . * < br / > < br / > * Sort order of the items is based on start column , items without a start column go to the end . * @ param baseDictionary base dictionary , required * @ param userDicti...
if ( baseDictionary == null ) throw new RuntimeException ( "Base dictionary is required" ) ; NaaccrDictionary result = new NaaccrDictionary ( ) ; result . setNaaccrVersion ( baseDictionary . getNaaccrVersion ( ) ) ; result . setDictionaryUri ( baseDictionary . getDictionaryUri ( ) + "[merged]" ) ; result . setSpecifica...
public class Cob2AvroJob { /** * Sets the job input key mainframe record type . * @ param job The job to configure . * @ param cobolType The input key mainframe record type . */ public static void setInputKeyRecordType ( Job job , Class < ? extends CobolComplexType > cobolType ) { } }
job . getConfiguration ( ) . setClass ( CONF_INPUT_KEY_RECORD_TYPE , cobolType , CobolComplexType . class ) ;
public class ApiOvhDomain { /** * List of whois obfuscators * REST : GET / domain / { serviceName } / owo * @ param field [ required ] Filter the value of field property ( = ) * @ param serviceName [ required ] The internal name of your domain */ public ArrayList < OvhWhoisObfuscatorFieldsEnum > serviceName_owo_G...
String qPath = "/domain/{serviceName}/owo" ; StringBuilder sb = path ( qPath , serviceName ) ; query ( sb , "field" , field ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t7 ) ;
public class FitByMeanStatistics { /** * Computes the mean and standard deviation of the points from the model */ private void computeMean ( ) { } }
meanError = 0 ; int size = allPoints . size ( ) ; for ( PointIndex < Point > inlier : allPoints ) { Point pt = inlier . data ; meanError += modelError . computeDistance ( pt ) ; } meanError /= size ;
public class MementoUtil { /** * Use this entity as the new * @ param entity * the entity to be used as the new */ public void addCurrentEntity ( Object entity ) { } }
Object identifier = identifier ( entity ) ; Object o = memento . get ( identifier ) ; if ( o == null ) { inserted . add ( entity ) ; } else { potentiallyChanged . put ( identifier , entity ) ; }
public class Document { /** * Saves a new revision by letting the caller update the existing properties . * This method handles conflicts by retrying ( calling the block again ) . * The DocumentUpdater implementation should modify the properties of * the new revision and return YES to save or NO to cancel . * B...
int lastErrorCode = Status . UNKNOWN ; do { // if there is a conflict error , get the latest revision from db instead of cache if ( lastErrorCode == Status . CONFLICT ) { forgetCurrentRevision ( ) ; } UnsavedRevision newRev = createRevision ( ) ; if ( updater . update ( newRev ) == false ) { break ; } try { SavedRevisi...
public class Links { /** * Returns a Stream of links . * @ return Stream of Links */ @ SuppressWarnings ( "rawtypes" ) public Stream < Link > stream ( ) { } }
return links . values ( ) . stream ( ) . map ( obj -> { if ( obj instanceof List ) { return ( List ) obj ; } else { return singletonList ( obj ) ; } } ) . flatMap ( Collection :: stream ) ;
public class MapMakerInternalMap { /** * Gets the value from an entry . Returns { @ code null } if the entry is invalid , * partially - collected , computing , or expired . Unlike { @ link Segment # getLiveValue } this method * does not attempt to clean up stale entries . */ V getLiveValue ( ReferenceEntry < K , V ...
if ( entry . getKey ( ) == null ) { return null ; } V value = entry . getValueReference ( ) . get ( ) ; if ( value == null ) { return null ; } if ( expires ( ) && isExpired ( entry ) ) { return null ; } return value ;
public class CmsVfsTabHandler { /** * This method is called when a folder is selected or deselected in the VFS tab . < p > * @ param folder the folder which is selected or deselected * @ param selected true if the folder has been selected , false if it has been deselected */ public void onSelectFolder ( String fold...
if ( selected ) { m_controller . addFolder ( folder ) ; } else { m_controller . removeFolder ( folder ) ; }
public class Marc { /** * Run XML stream parser over an XML input stream , with an XML event consumer . * @ param consumer the XML event consumer * @ throws XMLStreamException if parsing fails */ public void parseEvents ( MarcXchangeEventConsumer consumer ) throws XMLStreamException { } }
Objects . requireNonNull ( consumer ) ; if ( builder . getMarcListeners ( ) != null ) { for ( Map . Entry < String , MarcListener > entry : builder . getMarcListeners ( ) . entrySet ( ) ) { consumer . setMarcListener ( entry . getKey ( ) , entry . getValue ( ) ) ; } } XMLInputFactory inputFactory = XMLInputFactory . ne...
public class UIMetricUtils { /** * Extract MetricName from ' CC @ SequenceTest4-1-1439469823 @ Merge @ 0 @ @ sys @ Emitted ' , which is ' Emitted ' */ public static String extractMetricName ( String [ ] strs ) { } }
if ( strs . length < 6 ) return null ; return strs [ strs . length - 1 ] ;
public class DefaultTaskFinder { /** * this method is not intended to be called by clients * @ since 2.12 */ @ Inject ( optional = true ) protected Pattern setEndTag ( @ Named ( AbstractMultiLineCommentProvider . END_TAG ) final String endTag ) { } }
return this . endTagPattern = Pattern . compile ( ( endTag + "\\z" ) ) ;
public class AbstractColorPickerPreference { /** * Obtains the format , which should be used to print a textual representation of the * preference ' s color , from a specific typed array . * @ param typedArray * The typed array , the color format should be obtained from , as an instance of the * class { @ link ...
int defaultValue = getContext ( ) . getResources ( ) . getInteger ( R . integer . color_picker_preference_default_color_format ) ; setColorFormat ( ColorFormat . fromValue ( typedArray . getInteger ( R . styleable . AbstractColorPickerPreference_colorFormat , defaultValue ) ) ) ;
public class PutMailboxPermissionsRequest { /** * The permissions granted to the grantee . SEND _ AS allows the grantee to send email as the owner of the mailbox ( the * grantee is not mentioned on these emails ) . SEND _ ON _ BEHALF allows the grantee to send email on behalf of the owner * of the mailbox ( the gra...
if ( permissionValues == null ) { this . permissionValues = null ; return ; } this . permissionValues = new java . util . ArrayList < String > ( permissionValues ) ;
public class MetaPurge { /** * Returns a scanner to run over the UID table starting at the given row * @ return A scanner configured for the entire table * @ throws HBaseException if something goes boom */ private Scanner getScanner ( final byte [ ] table ) throws HBaseException { } }
short metric_width = TSDB . metrics_width ( ) ; final byte [ ] start_row = Arrays . copyOfRange ( Bytes . fromLong ( start_id ) , 8 - metric_width , 8 ) ; final byte [ ] end_row = Arrays . copyOfRange ( Bytes . fromLong ( end_id ) , 8 - metric_width , 8 ) ; final Scanner scanner = tsdb . getClient ( ) . newScanner ( ta...
public class HttpPipelineCallContext { /** * Stores a key - value data in the context . * @ param key the key * @ param value the value */ public void setData ( String key , Object value ) { } }
this . data = this . data . addData ( key , value ) ;
public class ServletSupport { /** * Retrieves a value from a cookie * @ param request * @ param key * @ return */ public static String getCookieValue ( ServletRequest request , String key ) { } }
Cookie [ ] cookies = ( ( HttpServletRequest ) request ) . getCookies ( ) ; if ( cookies != null ) { for ( int i = 0 ; i < cookies . length ; i ++ ) { if ( cookies [ i ] . getName ( ) . equals ( key ) ) { return cookies [ i ] . getValue ( ) ; } } } return null ;
public class CmsVfsTab { /** * Un - checks the check boxes for each folder passed in the < code > folders < / code > parameter . < p > * @ param folders the folders for which the check boxes should be unchecked */ public void uncheckFolders ( Collection < String > folders ) { } }
for ( String folder : folders ) { CmsLazyTreeItem item = m_itemsByPath . get ( folder ) ; if ( ( item != null ) && ( item . getCheckBox ( ) != null ) ) { item . getCheckBox ( ) . setChecked ( false ) ; } }
public class CPDefinitionPersistenceImpl { /** * Caches the cp definition in the entity cache if it is enabled . * @ param cpDefinition the cp definition */ @ Override public void cacheResult ( CPDefinition cpDefinition ) { } }
entityCache . putResult ( CPDefinitionModelImpl . ENTITY_CACHE_ENABLED , CPDefinitionImpl . class , cpDefinition . getPrimaryKey ( ) , cpDefinition ) ; finderCache . putResult ( FINDER_PATH_FETCH_BY_UUID_G , new Object [ ] { cpDefinition . getUuid ( ) , cpDefinition . getGroupId ( ) } , cpDefinition ) ; finderCache . p...
public class ModelsImpl { /** * Updates the composite entity extractor . * @ param appId The application ID . * @ param versionId The version ID . * @ param cEntityId The composite entity extractor ID . * @ param compositeModelUpdateObject A model object containing the new entity extractor name and children . ...
return updateCompositeEntityWithServiceResponseAsync ( appId , versionId , cEntityId , compositeModelUpdateObject ) . toBlocking ( ) . single ( ) . body ( ) ;
public class Projections { /** * Create a Bean populating projection for the given type and bindings * @ param < T > type of projection * @ param type type of the projection * @ param bindings property bindings * @ return factory expression */ public static < T > QBean < T > bean ( Path < ? extends T > type , M...
return new QBean < T > ( type . getType ( ) , bindings ) ;
public class CarbonModule { /** * Get the ModuleData element ( if present ) * @ return */ public CarbonModuleData getModuleData ( ) { } }
final Element e = element . getChild ( MODULE_DATA_ELEMENT ) ; if ( e != null ) return new CarbonModuleData ( e ) ; else return null ;
public class QueryChemObject { /** * This should be triggered by an method that changes the content of an object * to that the registered listeners can react to it . */ @ Override public void notifyChanged ( ) { } }
if ( getNotification ( ) && getListenerCount ( ) > 0 ) { List < IChemObjectListener > listeners = lazyChemObjectListeners ( ) ; for ( Object listener : listeners ) { ( ( IChemObjectListener ) listener ) . stateChanged ( new QueryChemObjectChangeEvent ( this ) ) ; } }
public class QueryManagerImpl { /** * { @ inheritDoc } */ public Query getQuery ( Node node ) throws InvalidQueryException , RepositoryException { } }
sanityCheck ( ) ; return searchMgr . createQuery ( session , itemMgr , node ) ;
public class IntStream { /** * Returns a { @ code Stream } consisting of the results of applying the given * function to the elements of this stream . * < p > This is an intermediate operation . * @ param < R > the type result * @ param mapper the mapper function used to apply to each element * @ return the n...
return new Stream < R > ( params , new IntMapToObj < R > ( iterator , mapper ) ) ;
public class JobQueueDetailMarshaller { /** * Marshall the given parameter object . */ public void marshall ( JobQueueDetail jobQueueDetail , ProtocolMarshaller protocolMarshaller ) { } }
if ( jobQueueDetail == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( jobQueueDetail . getJobQueueName ( ) , JOBQUEUENAME_BINDING ) ; protocolMarshaller . marshall ( jobQueueDetail . getJobQueueArn ( ) , JOBQUEUEARN_BINDING ) ; protocolMars...
public class AbstractIndexWriter { /** * Get the index label for navigation bar . * @ return a content tree for the tree label */ @ Override protected Content getNavLinkIndex ( ) { } }
Content li = HtmlTree . LI ( HtmlStyle . navBarCell1Rev , contents . indexLabel ) ; return li ;
public class SpotFleetLaunchSpecification { /** * The tags to apply during creation . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setTagSpecifications ( java . util . Collection ) } or { @ link # withTagSpecifications ( java . util . Collection ) } if *...
if ( this . tagSpecifications == null ) { setTagSpecifications ( new com . amazonaws . internal . SdkInternalList < SpotFleetTagSpecification > ( tagSpecifications . length ) ) ; } for ( SpotFleetTagSpecification ele : tagSpecifications ) { this . tagSpecifications . add ( ele ) ; } return this ;
public class FileWatcher { /** * Start watching file path and notify watcher for updates on that file . * @ param file The file path to watch . * @ param watcher The watcher to be notified . */ @ Deprecated public void addWatcher ( Path file , Watcher watcher ) { } }
addWatcher ( file , ( Listener ) watcher ) ;
public class AbstractDrawerItem { /** * This method returns the ViewHolder for our item , using the provided View . * @ param parent * @ return the ViewHolder for this Item */ @ Override public VH getViewHolder ( ViewGroup parent ) { } }
return getViewHolder ( LayoutInflater . from ( parent . getContext ( ) ) . inflate ( getLayoutRes ( ) , parent , false ) ) ;
public class JFAPCommunicator { /** * Actually performs the handshake . * @ param serverMode Set to true if this is a handshake from ME - ME , otherwise false . * @ param usageType indicates how the conversation over which the handshake will be performed is to be used . * @ throws SIConnectionLostException if an ...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "initiateCommsHandshakingImpl" , new Object [ ] { Boolean . valueOf ( serverMode ) , usageType } ) ; // Get the conversation state and the Handshake group object from it // This group will hold all the information tha...
public class IPv6AddressPool { /** * Private helper method to perform the allocation of a subnet within one of the free ranges . * @ param toAllocate subnet to allocate * @ param rangeToAllocateFrom free range to allocate from * @ return resulting pool */ private IPv6AddressPool doAllocate ( final IPv6Network toA...
assert freeRanges . contains ( rangeToAllocateFrom ) ; assert rangeToAllocateFrom . contains ( toAllocate ) ; final TreeSet < IPv6AddressRange > newFreeRanges = new TreeSet < IPv6AddressRange > ( this . freeRanges ) ; // remove range from free ranges newFreeRanges . remove ( rangeToAllocateFrom ) ; // from the range , ...