signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class PackageBasedActionConfigBuilder { /** * Interfaces , enums , annotations , and abstract classes cannot be * instantiated . * @ param actionClass * class to check * @ return returns true if the class cannot be instantiated or should be * ignored */ protected boolean cannotInstantiate ( Class < ? >...
return actionClass . isAnnotation ( ) || actionClass . isInterface ( ) || actionClass . isEnum ( ) || ( actionClass . getModifiers ( ) & Modifier . ABSTRACT ) != 0 || actionClass . isAnonymousClass ( ) ;
public class ProjectImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public EList < Revision > getRevisions ( ) { } }
return ( EList < Revision > ) eGet ( StorePackage . Literals . PROJECT__REVISIONS , true ) ;
public class Pipe { /** * Dimensiona il tubo , imponendo uno sforzo tangenziale al fondo . * < ol > * < li > Calcola l ' angolo theta in funzione di g . * < li > Nota la portata di progetto del tratto considerato , determina il * diametro oldD ( adottando una pendenza che garantisca l ' autopulizia ) . * < li...
/* Pari a A * ( Rh ^ 1/6 ) */ double B ; /* Anglo formato dalla sezione bagnata */ double thta ; /* Diametro calcolato imponendo il criterio di autopulizia della rete */ double oldD ; /* [ cm ] Diametro commerciale */ double D = 0 ; /* Costane */ double known ; /* * [ rad ] Angolo formato dalla sezione bagnata , adotta...
public class CacheImpl { /** * Executes a { @ link VisitableCommand } . * This method creates the { @ link InvocationContext } using { @ link ContextBuilder } and initializes it . * If the cache is transactional and no transaction is running , a transaction is created and committed for the * command ( i . e . an ...
InvocationContext ctx = contextBuilder . create ( keyCount ) ; checkLockOwner ( ctx , command ) ; // noinspection unchecked return isTxInjected ( ctx ) ? ( T ) executeCommandWithInjectedTx ( ctx , command ) : ( T ) invoker . invoke ( ctx , command ) ;
public class Activator { /** * Activate a bean in the context of a transaction . If an instance of the * bean is already active in the transaction , that instance is returned . * Otherwise , one of several strategies is used to activate an instance * depending on what the bean supports . < p > * If this method ...
BeanO beanO = null ; try { beanO = beanId . getActivationStrategy ( ) . atActivate ( threadData , tx , beanId ) ; // d630940 } finally { if ( beanO != null ) { threadData . popCallbackBeanO ( ) ; } } return beanO ;
public class SimpleExcelFlinkFileInputFormat { /** * Open an Excel file * @ param split * contains the Excel file */ @ Override public void open ( FileInputSplit split ) throws IOException { } }
// read Excel super . open ( split ) ; // infer schema ( requires to read file again ) if ( this . customSchema == null ) { ExcelFlinkFileInputFormat effif = new ExcelFlinkFileInputFormat ( this . shocr ) ; effif . open ( split ) ; SpreadSheetCellDAO [ ] currentRow = effif . nextRecord ( null ) ; int i = 0 ; while ( ( ...
public class NavigationResultBuilder { /** * Add a UICommand instance to create a single navigation entry . * @ param result The NavigationResult to add * @ return This NavigationResultBuilder instance */ public NavigationResultBuilder add ( NavigationResult result ) { } }
if ( result != null && result . getNext ( ) != null ) { entries . addAll ( Arrays . asList ( result . getNext ( ) ) ) ; } return this ;
public class xen_health_monitor_temp { /** * < pre > * Converts API response of bulk operation into object and returns the object array in case of get request . * < / pre > */ protected base_resource [ ] get_nitro_bulk_response ( nitro_service service , String response ) throws Exception { } }
xen_health_monitor_temp_responses result = ( xen_health_monitor_temp_responses ) service . get_payload_formatter ( ) . string_to_resource ( xen_health_monitor_temp_responses . class , response ) ; if ( result . errorcode != 0 ) { if ( result . errorcode == SESSION_NOT_EXISTS ) service . clear_session ( ) ; throw new ni...
public class ResourceCache { /** * Returns an array of resources corresponding to the specified pattern . If the pattern has not * yet been cached , the resources will be enumerated by the application context and stored in * the cache . * @ param pattern Pattern to be used to lookup resources . * @ return An ar...
Resource [ ] resources = cache . get ( pattern ) ; return resources == null ? internalGet ( pattern ) : resources ;
public class BeanTypeImpl { /** * If not already created , a new < code > class < / code > element with the given value will be created . * Otherwise , the existing < code > class < / code > element will be returned . * @ return a new or existing instance of < code > ClassType < BeanType < T > > < / code > */ publi...
Node node = childNode . getOrCreate ( "class" ) ; ClassType < BeanType < T > > clazz = new ClassTypeImpl < BeanType < T > > ( this , "class" , childNode , node ) ; return clazz ;
public class HRavenRestClient { /** * Fetches a list of flows that include jobs in that flow that include the * specified flow fields and job fields specified configuration properties * @ param cluster * @ param username * @ param batchDesc * @ param signature * @ param limit * @ param flowResponseFilters...
LOG . info ( String . format ( "Fetching last %d matching jobs for cluster=%s, user.name=%s, " + "batch.desc=%s, pig.logical.plan.signature=%s" , limit , cluster , username , batchDesc , signature ) ) ; StringBuilder urlStringBuilder = buildFlowURL ( cluster , username , batchDesc , signature , limit , flowResponseFilt...
public class ItemCategory { /** * A { @ link ItemCategory } associated to this { @ link TopLevelItemDescriptor } . * @ return A { @ link ItemCategory } , if not found , { @ link ItemCategory . UncategorizedCategory } is returned */ @ Nonnull public static ItemCategory getCategory ( TopLevelItemDescriptor descriptor )...
int order = 0 ; ExtensionList < ItemCategory > categories = ExtensionList . lookup ( ItemCategory . class ) ; for ( ItemCategory category : categories ) { if ( category . getId ( ) . equals ( descriptor . getCategoryId ( ) ) ) { category . setOrder ( ++ order ) ; return category ; } order ++ ; } return new Uncategorize...
public class Layout { /** * adds if new . . . */ public void add ( Attribute attr ) { } }
int symbol ; List < Attribute > lst ; if ( locate ( attr ) == - 1 ) { symbol = attr . symbol ; while ( attrs . size ( ) <= symbol ) { attrs . add ( new ArrayList < Attribute > ( ) ) ; } lst = attrs . get ( symbol ) ; lst . add ( attr ) ; }
public class SmiOidNode { /** * public int [ ] determineFullOid ( ) { * if ( m _ oid = = null ) { * SmiOidNode parent = getParent ( ) ; * if ( parent ! = null ) { * int [ ] parentOid = parent . determineFullOid ( ) ; * if ( parentOid ! = null ) { * m _ oid = new int [ parentOid . length + 1 ] ; * System ....
int result = m_childMap . size ( ) ; for ( SmiOidNode child : m_childMap . values ( ) ) { result += child . getTotalChildCount ( ) ; } return result ;
public class ApiOvhUtils { /** * Convert JSON String to a POJO java * @ param in * @ param mapTo * @ return POJO Object * @ throws IOException */ public static < T > T convertTo ( String in , TypeReference < T > mapTo ) throws IOException { } }
try { return mapper . readValue ( in , mapTo ) ; } catch ( Exception e ) { log . error ( "Can not convert:{} to {}" , in , mapTo , e ) ; throw new OvhServiceException ( "local" , "conversion Error to " + mapTo ) ; }
public class CompareStringQuery { /** * Construct a { @ link Query } implementation that scores documents with a string field value that is equal to the supplied * constraint value . * @ param constraintValue the constraint value ; may not be null * @ param fieldName the name of the document field containing the ...
return FieldComparison . EQ . createQueryForNodesWithField ( constraintValue , fieldName , caseOperation ) ;
public class AnnotationConfigurator { /** * < p > Return an array of all < code > Field < / code > s reflecting declared * fields in this class , or in any superclass other than * < code > java . lang . Object < / code > . < / p > * @ param clazz Class to be analyzed */ private Field [ ] fields ( Class < ? > claz...
Map < String , Field > fields = new HashMap < String , Field > ( ) ; do { for ( Field field : clazz . getDeclaredFields ( ) ) { if ( ! fields . containsKey ( field . getName ( ) ) ) { fields . put ( field . getName ( ) , field ) ; } } clazz = clazz . getSuperclass ( ) ; } while ( clazz != Object . class ) ; return fiel...
public class VersionedFileResource { /** * { @ inheritDoc } */ @ Override public HierarchicalProperty getProperty ( QName name ) throws PathNotFoundException , AccessDeniedException , RepositoryException { } }
if ( name . equals ( ISVERSIONED ) ) { return new HierarchicalProperty ( name , "1" ) ; } else if ( name . equals ( CHECKEDIN ) ) { if ( node . isCheckedOut ( ) ) { throw new PathNotFoundException ( ) ; } String checkedInHref = identifier . toASCIIString ( ) + "?version=" + node . getBaseVersion ( ) . getName ( ) ; Hie...
public class GraphHandler { /** * generate the data from the actual visualization ( removing all duped code ) . */ private void doGraph ( final TSDB tsdb , final HttpQuery query ) throws IOException { } }
final String basepath = getGnuplotBasePath ( tsdb , query ) ; long start_time = DateTime . parseDateTimeString ( query . getRequiredQueryStringParam ( "start" ) , query . getQueryStringParam ( "tz" ) ) ; final boolean nocache = query . hasQueryStringParam ( "nocache" ) ; if ( start_time == - 1 ) { throw BadRequestExcep...
public class JComponentFactory { /** * Factory method for create new { @ link JSplitPane } object * @ param newOrientation * < code > JSplitPane . HORIZONTAL _ SPLIT < / code > or < code > JSplitPane . VERTICAL _ SPLIT < / code > * @ param newContinuousLayout * a boolean , true for the components to redraw cont...
return new JSplitPane ( newOrientation , newContinuousLayout , newLeftComponent , newRightComponent ) ;
public class DynamicObject { /** * Update specified target from this object . * @ param target target object to update */ public void update ( Object target ) { } }
if ( target == null ) { throw new IllegalArgumentException ( "Target to update cannot be null" ) ; } BeanWrapper bw = new BeanWrapperImpl ( target ) ; bw . registerCustomEditor ( Date . class , new CustomDateEditor ( new SimpleDateFormat ( "yyyy-MM-dd" ) , true ) ) ; for ( Map . Entry < String , Object > property : m_p...
public class FunctionLibFactory { /** * Laedt mehrere FunctionLib ' s die innerhalb eines Verzeichnisses liegen . * @ param dir Verzeichnis im dem die FunctionLib ' s liegen . * @ param saxParser Definition des Sax Parser mit dem die FunctionLib ' s eingelesen werden sollen . * @ return FunctionLib ' s als Array ...
if ( ! dir . isDirectory ( ) ) return new FunctionLib [ 0 ] ; ArrayList < FunctionLib > arr = new ArrayList < FunctionLib > ( ) ; Resource [ ] files = dir . listResources ( new ExtensionResourceFilter ( new String [ ] { "fld" , "fldx" } ) ) ; for ( int i = 0 ; i < files . length ; i ++ ) { if ( files [ i ] . isFile ( )...
public class SofaHessianSerializer { /** * Gets serializer factory . * @ param multipleClassLoader the multiple class loader * @ param generic the generic * @ return the serializer factory */ protected SerializerFactory getSerializerFactory ( boolean multipleClassLoader , boolean generic ) { } }
if ( generic ) { return multipleClassLoader ? new GenericMultipleClassLoaderSofaSerializerFactory ( ) : new GenericSingleClassLoaderSofaSerializerFactory ( ) ; } else { return multipleClassLoader ? new MultipleClassLoaderSofaSerializerFactory ( ) : new SingleClassLoaderSofaSerializerFactory ( ) ; }
public class ClientConnection { /** * Executes a procedure asynchronously , returning a Future that can be used by the caller to wait upon completion before processing the server response . * @ param procedure the name of the procedure to call . * @ param parameters the list of parameters to pass to the procedure ....
final ExecutionFuture future = new ExecutionFuture ( DefaultAsyncTimeout ) ; this . Client . callProcedure ( new TrackingCallback ( this , procedure , new ProcedureCallback ( ) { final ExecutionFuture result ; { this . result = future ; } @ Override public void clientCallback ( ClientResponse response ) throws Exceptio...
public class TextComponent { /** * Sets the plain text content . * @ param content the plain text content * @ return a copy of this component */ public @ NonNull TextComponent content ( final @ NonNull String content ) { } }
return new TextComponent ( this . children , this . color , this . obfuscated , this . bold , this . strikethrough , this . underlined , this . italic , this . clickEvent , this . hoverEvent , this . insertion , requireNonNull ( content , "content" ) ) ;
public class XAnnotated { /** * Returns annotations for this annotated item . * @ return Array of annotations . */ public Annotation [ ] getAnnotations ( ) { } }
final XAnnotation < ? > [ ] xannotations = getXAnnotations ( ) ; final Annotation [ ] annotations = new Annotation [ xannotations . length ] ; for ( int index = 0 ; index < xannotations . length ; index ++ ) { annotations [ index ] = xannotations [ index ] . getResult ( ) ; } return annotations ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link LengthType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link LengthType } { @ code > } */ @ XmlEle...
return new JAXBElement < LengthType > ( _Elevation_QNAME , LengthType . class , null , value ) ;
public class AbstractDecoratedMap { /** * / * protected */ Entry < K , V > createEntry ( K pKey , V pValue ) { } }
return new BasicEntry < K , V > ( pKey , pValue ) ;
public class MatrixFeatures_ZDRM { /** * Checks to see if any element in the matrix is NaN of Infinite . * @ param m A matrix . Not modified . * @ return True if any element in the matrix is NaN of Infinite . */ public static boolean hasUncountable ( ZMatrixD1 m ) { } }
int length = m . getDataLength ( ) ; for ( int i = 0 ; i < length ; i ++ ) { double a = m . data [ i ] ; if ( Double . isNaN ( a ) || Double . isInfinite ( a ) ) return true ; } return false ;
public class ListStringArrayFactory { /** * { @ inheritDoc } */ public List < String [ ] > create ( ) { } }
List < String [ ] > lines ; String [ ] lineOne ; String [ ] lineTwo ; String [ ] lineThree ; lineOne = ArrayFactory . newArray ( "John" , "23" , "male" ) ; lineTwo = ArrayFactory . newArray ( "Jim" , "25" , "male" ) ; lineThree = ArrayFactory . newArray ( "Mary" , "21" , "female" ) ; lines = ListFactory . newArrayList ...
public class PlainTime { /** * / * [ deutsch ] * < p > Addiert den angegebenen Betrag der entsprechenden Zeiteinheit * zu dieser Uhrzeit und liefert das Additionsergebnis zur & uuml ; ck . < / p > * < p > Deckt die wichtigsten Zeiteinheiten ab , die mit diesem Typ verwendet werden * k & ouml ; nnen und ist aus ...
if ( unit == null ) { throw new NullPointerException ( "Missing unit." ) ; } else if ( amount == 0 ) { return this ; } try { return ClockUnitRule . doAdd ( PlainTime . class , unit , this , amount ) ; } catch ( IllegalArgumentException iae ) { ArithmeticException ex = new ArithmeticException ( "Result beyond boundaries...
public class BooleanCondition { /** * And of all the given conditions * @ param first the first condition * @ param second the second condition for xor * @ return the xor of these 2 conditions */ public static Condition XOR ( Condition first , Condition second ) { } }
return new BooleanCondition ( Type . XOR , first , second ) ;
public class FileExistsValidator { /** * CHECKSTYLE : OFF : RedundantThrows */ public static void requireArgValid ( @ NotNull final String name , @ NotNull final File value ) throws ConstraintViolationException { } }
// CHECKSTYLE : ON if ( ! value . exists ( ) ) { throw new ConstraintViolationException ( "The argument '" + name + "' is not an existing file: '" + value + "'" ) ; }
public class Engine { /** * Adds an entity to this Engine . * This will throw an IllegalArgumentException if the given entity * was already registered with an engine . */ public void addEntity ( Entity entity ) { } }
boolean delayed = updating || familyManager . notifying ( ) ; entityManager . addEntity ( entity , delayed ) ;
public class Yoke { /** * Starts listening at a already created server . * @ param server * @ return { Yoke } */ public Yoke listen ( final @ NotNull HttpServer server ) { } }
server . requestHandler ( new Handler < HttpServerRequest > ( ) { @ Override public void handle ( HttpServerRequest req ) { // the context map is shared with all middlewares final YokeRequest request = requestWrapper . wrap ( req , new Context ( defaultContext ) , engineMap , store ) ; // add x - powered - by header is...
public class StoreFactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public String convertModelCheckerResultTypeToString ( EDataType eDataType , Object instanceValue ) { } }
return instanceValue == null ? null : instanceValue . toString ( ) ;
public class J4pRequestHandler { /** * Get an HTTP Request for requesting multiples requests at once * @ param pRequests requests to put into a HTTP request * @ return HTTP request to send to the server */ public < T extends J4pRequest > HttpUriRequest getHttpRequest ( List < T > pRequests , Map < J4pQueryParameter...
JSONArray bulkRequest = new JSONArray ( ) ; String queryParams = prepareQueryParameters ( pProcessingOptions ) ; HttpPost postReq = new HttpPost ( createRequestURI ( j4pServerUrl . getPath ( ) , queryParams ) ) ; for ( T request : pRequests ) { JSONObject requestContent = getJsonRequestContent ( request ) ; bulkRequest...
public class ConcurrentSparqlGraphStoreManager { /** * This method will be called when the server is being shutdown . * Ensure a clean shutdown . */ @ Override public void shutdown ( ) { } }
log . info ( "Shutting down Ontology crawlers." ) ; this . executor . shutdown ( ) ; // Disable new tasks from being submitted try { // Wait a while for existing tasks to terminate if ( ! this . executor . awaitTermination ( 5 , TimeUnit . SECONDS ) ) { this . executor . shutdownNow ( ) ; // Cancel currently executing ...
public class IncludeTagHandler { protected String resolveVariableIfNeeds ( String expr , String path , ScriptingExpression expression ) { } }
if ( expr == null ) { return null ; } return doResolveShortExistsIfNeeds ( doResolvePathExpIfNeeds ( ( String ) expr , path , expression ) , expression ) ;
public class HTTPConduit { /** * updates the HTTPClientPolicy that is compatible with the assertions * included in the service , endpoint , operation and message policy subjects * if a PolicyDataEngine is installed * wsdl extensors are superseded by policies which in * turn are superseded by injection */ privat...
if ( ! clientSidePolicyCalced ) { PolicyDataEngine policyEngine = bus . getExtension ( PolicyDataEngine . class ) ; if ( policyEngine != null && endpointInfo . getService ( ) != null ) { clientSidePolicy = policyEngine . getClientEndpointPolicy ( m , endpointInfo , this , new ClientPolicyCalculator ( ) ) ; if ( clientS...
public class DiskBuffer { /** * Returns an Iterator of Events that are stored on disk < b > at the point in time this method * is called < / b > . Note that files may not deserialize correctly , may be corrupted , * or may be missing on disk by the time we attempt to open them - so some care is taken to * only re...
final Iterator < File > files = Arrays . asList ( bufferDir . listFiles ( ) ) . iterator ( ) ; return new Iterator < Event > ( ) { private Event next = getNextEvent ( files ) ; @ Override public boolean hasNext ( ) { return next != null ; } @ Override public Event next ( ) { Event toReturn = next ; next = getNextEvent ...
public class JCommander { /** * Reads the file specified by filename and returns the file content as a string . * End of lines are replaced by a space . * @ param fileName the command line filename * @ return the file content as a string . */ private List < String > readFile ( String fileName ) { } }
List < String > result = Lists . newArrayList ( ) ; try ( BufferedReader bufRead = Files . newBufferedReader ( Paths . get ( fileName ) , options . atFileCharset ) ) { String line ; // Read through file one line at time . Print line # and line while ( ( line = bufRead . readLine ( ) ) != null ) { // Allow empty lines a...
public class AmazonRekognitionClient { /** * Gets a list of stream processors that you have created with < a > CreateStreamProcessor < / a > . * @ param listStreamProcessorsRequest * @ return Result of the ListStreamProcessors operation returned by the service . * @ throws AccessDeniedException * You are not au...
request = beforeClientExecution ( request ) ; return executeListStreamProcessors ( request ) ;
public class TimecodeComparator { /** * Returns the larger of a number of timecodes * @ param timecodes * some timecodes * @ return */ public static Timecode max ( final Timecode ... timecodes ) { } }
Timecode max = null ; for ( Timecode timecode : timecodes ) if ( max == null || lt ( max , timecode ) ) max = timecode ; return max ;
public class HttpResponses { /** * Serves a static resource specified by the URL . * @ param resource * The static resource to be served . * @ param expiration * The number of milliseconds until the resource will " expire " . * Until it expires the browser will be allowed to cache it * and serve it without ...
return new HttpResponse ( ) { public void generateResponse ( StaplerRequest req , StaplerResponse rsp , Object node ) throws IOException , ServletException { rsp . serveFile ( req , resource , expiration ) ; } } ;
public class TVRageApi { /** * Search for the show using the show ID * @ param showID * @ return ShowInfo * @ throws com . omertron . tvrageapi . TVRageException */ public ShowInfo getShowInfo ( int showID ) throws TVRageException { } }
if ( showID == 0 ) { return new ShowInfo ( ) ; } String tvrageURL = buildURL ( API_SHOWINFO , Integer . toString ( showID ) ) . toString ( ) ; List < ShowInfo > showList = TVRageParser . getShowInfo ( tvrageURL ) ; if ( showList . isEmpty ( ) ) { return new ShowInfo ( ) ; } else { return showList . get ( 0 ) ; }
public class KeyRange { /** * Create a { @ link KeyRangeType # FORWARD _ CLOSED } range . * @ param < T > buffer type * @ param start start key ( required ) * @ param stop stop key ( required ) * @ return a key range ( never null ) */ public static < T > KeyRange < T > closed ( final T start , final T stop ) { ...
return new KeyRange < > ( KeyRangeType . FORWARD_CLOSED , start , stop ) ;
public class DoubleUnaryOperatorBuilder { /** * One of ways of creating builder . This is possibly the least verbose way where compiler should be able to guess the generic parameters . */ @ Nonnull public static DoubleUnaryOperator dblUnaryOperatorFrom ( Consumer < DoubleUnaryOperatorBuilder > buildingFunction ) { } }
DoubleUnaryOperatorBuilder builder = new DoubleUnaryOperatorBuilder ( ) ; buildingFunction . accept ( builder ) ; return builder . build ( ) ;
public class HString { /** * Creates a labeled data point from this HString using the value of the given attribute type as the label , i . e . * class . * @ param attributeTypeLabel the attribute type whose value will become the label of the data point * @ return the labeled datum */ public LabeledDatum < HString...
return LabeledDatum . of ( get ( attributeTypeLabel ) , this ) ;
public class WordCountTable { public static void main ( String [ ] args ) throws Exception { } }
ExecutionEnvironment env = ExecutionEnvironment . createCollectionsEnvironment ( ) ; BatchTableEnvironment tEnv = BatchTableEnvironment . create ( env ) ; DataSet < WC > input = env . fromElements ( new WC ( "Hello" , 1 ) , new WC ( "Ciao" , 1 ) , new WC ( "Hello" , 1 ) ) ; Table table = tEnv . fromDataSet ( input ) ; ...
public class DCModuleParser { /** * Utility method to parse a taxonomy from an element . * @ param desc the taxonomy description element . * @ return the string contained in the resource of the element . */ protected final String getTaxonomy ( final Element desc ) { } }
String taxonomy = null ; final Element topic = desc . getChild ( "topic" , getTaxonomyNamespace ( ) ) ; if ( topic != null ) { final Attribute resource = topic . getAttribute ( "resource" , getRDFNamespace ( ) ) ; if ( resource != null ) { taxonomy = resource . getValue ( ) ; } } return taxonomy ;
public class AbstractDocumentationMojo { /** * Replies the source files . * @ return the map from the source files to the corresponding source folders . */ protected Map < File , File > getFiles ( ) { } }
final Map < File , File > files = new TreeMap < > ( ) ; for ( final String rootName : this . inferredSourceDirectories ) { File root = FileSystem . convertStringToFile ( rootName ) ; if ( ! root . isAbsolute ( ) ) { root = FileSystem . makeAbsolute ( root , this . baseDirectory ) ; } getLog ( ) . debug ( MessageFormat ...
public class Distance { /** * Estimates the manhattan distance of two Associative Arrays . * @ param a1 * @ param a2 * @ return */ public static double manhattan ( AssociativeArray a1 , AssociativeArray a2 ) { } }
Map < Object , Double > columnDistances = columnDistances ( a1 , a2 , null ) ; double distance = 0.0 ; for ( double columnDistance : columnDistances . values ( ) ) { distance += Math . abs ( columnDistance ) ; } return distance ;
public class SimpleDbRepositoryNamespaceHandler { /** * ( non - Javadoc ) * @ see org . springframework . beans . factory . xml . NamespaceHandler # init ( ) */ @ Override public void init ( ) { } }
RepositoryConfigurationExtension extension = new SimpleDbRepositoryConfigExtension ( ) ; RepositoryBeanDefinitionParser repositoryBeanDefinitionParser = new RepositoryBeanDefinitionParser ( extension ) ; registerBeanDefinitionParser ( "repositories" , repositoryBeanDefinitionParser ) ;
public class QueueRef { /** * / * ( non - Javadoc ) * @ see javax . naming . Referenceable # getReference ( ) */ @ Override public final Reference getReference ( ) throws NamingException { } }
Reference ref = new Reference ( getClass ( ) . getName ( ) , JNDIObjectFactory . class . getName ( ) , null ) ; ref . add ( new StringRefAddr ( "queueName" , name ) ) ; return ref ;
public class dnspolicylabel { /** * Use this API to add dnspolicylabel resources . */ public static base_responses add ( nitro_service client , dnspolicylabel resources [ ] ) throws Exception { } }
base_responses result = null ; if ( resources != null && resources . length > 0 ) { dnspolicylabel addresources [ ] = new dnspolicylabel [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new dnspolicylabel ( ) ; addresources [ i ] . labelname = resources [ i ] . labelname...
public class StrutsApp { /** * Returns a list of { @ link FormBeanModel } . */ public List getFormBeansByActualType ( String actualTypeName , Boolean usesPageFlowScopedBean ) { } }
ArrayList beans = null ; for ( Iterator i = _formBeans . values ( ) . iterator ( ) ; i . hasNext ( ) ; ) { FormBeanModel formBean = ( FormBeanModel ) i . next ( ) ; if ( formBean != null && formBean . getActualType ( ) . equals ( actualTypeName ) && ( usesPageFlowScopedBean == null || usesPageFlowScopedBean . booleanVa...
public class AllClassesFrameWriter { /** * Use the sorted index of all the classes and add all the classes to the * content list . * @ param content HtmlTree content to which all classes information will be added * @ param wantFrames True if we want frames . */ protected void addAllClasses ( Content content , boo...
for ( Character unicode : indexbuilder . index ( ) ) { addContents ( indexbuilder . getMemberList ( unicode ) , wantFrames , content ) ; }
public class WebListener { /** * Shuts down the application in Web environment and deassociates the * current { @ code ServletContext } from { @ link Application } context . * @ param sce The event the { @ code ServletContext } is destroyed . */ @ SuppressWarnings ( "unchecked" ) public void contextDestroyed ( Serv...
WebContext < ServletContext > context = ( WebContext < ServletContext > ) container . component ( container . contexts ( ) . get ( Application . class ) ) ; context . deassociate ( sce . getServletContext ( ) ) ; synchronized ( Jaguar . class ) { if ( running ( ) ) { shutdown ( ) ; } }
public class OAuth2PlatformClient { /** * Build Map from response * @ param content * @ return * @ throws ConnectionException */ private HashMap < String , JSONObject > buildKeyMap ( String content ) throws ConnectionException { } }
HashMap < String , JSONObject > retMap = new HashMap < String , JSONObject > ( ) ; JSONObject jwksPayload = new JSONObject ( content ) ; JSONArray keysArray = jwksPayload . getJSONArray ( "keys" ) ; for ( int i = 0 ; i < keysArray . length ( ) ; i ++ ) { JSONObject object = keysArray . getJSONObject ( i ) ; String keyI...
public class bridgegroup { /** * Use this API to fetch filtered set of bridgegroup resources . * filter string should be in JSON format . eg : " port : 80 , servicetype : HTTP " . */ public static bridgegroup [ ] get_filtered ( nitro_service service , String filter ) throws Exception { } }
bridgegroup obj = new bridgegroup ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; bridgegroup [ ] response = ( bridgegroup [ ] ) obj . getfiltered ( service , option ) ; return response ;
public class ReflectionUtils { /** * Returns the type argument * @ param clazz the Class to examine * @ param tv the TypeVariable to look for * @ param < T > the type of the Class * @ return the Class type */ public static < T > Class < ? > getTypeArgument ( final Class < ? extends T > clazz , final TypeVariabl...
final Map < Type , Type > resolvedTypes = new HashMap < Type , Type > ( ) ; Type type = clazz ; // start walking up the inheritance hierarchy until we hit the end while ( type != null && ! Object . class . equals ( getClass ( type ) ) ) { if ( type instanceof Class ) { // there is no useful information for us in raw ty...
public class AmazonMTurkClient { /** * The < code > ListQualificationRequests < / code > operation retrieves requests for Qualifications of a particular * Qualification type . The owner of the Qualification type calls this operation to poll for pending requests , and * accepts them using the AcceptQualification ope...
request = beforeClientExecution ( request ) ; return executeListQualificationRequests ( request ) ;
public class ListRecoveryPointsByResourceResult { /** * An array of objects that contain detailed information about recovery points of the specified resource type . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setRecoveryPoints ( java . util . Collection )...
if ( this . recoveryPoints == null ) { setRecoveryPoints ( new java . util . ArrayList < RecoveryPointByResource > ( recoveryPoints . length ) ) ; } for ( RecoveryPointByResource ele : recoveryPoints ) { this . recoveryPoints . add ( ele ) ; } return this ;
public class WTable { /** * Update the column in the row . * @ param rowRenderer the table row renderer * @ param rowContext the row context * @ param rowIndex the row id to update * @ param col the column to update * @ param model the table model */ private void updateBeanValueForColumnInRow ( final WTableRo...
// The actual component is wrapped in a renderer wrapper , so we have to fetch it from that WComponent renderer = ( ( Container ) rowRenderer . getRenderer ( col ) ) . getChildAt ( 0 ) ; UIContextHolder . pushContext ( rowContext ) ; try { // If the column is a Container then call updateBeanValue to let the column rend...
public class BeanBuilder { /** * Defines a Spring namespace definition to use . * @ param definition The definition */ public void xmlns ( Map < String , String > definition ) { } }
Assert . notNull ( namespaceHandlerResolver , "You cannot define a Spring namespace without a [namespaceHandlerResolver] set" ) ; if ( definition . isEmpty ( ) ) { return ; } for ( Map . Entry < String , String > entry : definition . entrySet ( ) ) { String namespace = entry . getKey ( ) ; String uri = entry . getValue...
public class Maps { /** * Removes the given element from the list that is stored under the * given key . If the list becomes empty , it is removed from the * map . * @ param < K > The key type * @ param < E > The element type * @ param map The map * @ param k The key * @ param e The element */ static < K ...
List < E > list = map . get ( k ) ; if ( list != null ) { list . remove ( e ) ; if ( list . isEmpty ( ) ) { map . remove ( k ) ; } }
public class VideoDevice { /** * This method returns a { @ link YUVFrameGrabber } associated with this * video device . Captured frames will be YUV420 - encoded before being handed * out . The video device must support an appropriate image format that v4l4j * can convert to YUV420 . If it does not , this method w...
return getYUVFrameGrabber ( w , h , input , std , null ) ;
public class Container { /** * Computes the bitwise AND of this container with another ( intersection ) . This container as well * as the provided container are left unaffected . * @ param x other container * @ return aggregated container */ public int andCardinality ( Container x ) { } }
if ( this . isEmpty ( ) ) { return 0 ; } else if ( x . isEmpty ( ) ) { return 0 ; } else { if ( x instanceof ArrayContainer ) { return andCardinality ( ( ArrayContainer ) x ) ; } else if ( x instanceof BitmapContainer ) { return andCardinality ( ( BitmapContainer ) x ) ; } return andCardinality ( ( RunContainer ) x ) ;...
public class AWSServiceCatalogClient { /** * Terminates the specified provisioned product . * This operation does not delete any records associated with the provisioned product . * You can check the status of this request using < a > DescribeRecord < / a > . * @ param terminateProvisionedProductRequest * @ retu...
request = beforeClientExecution ( request ) ; return executeTerminateProvisionedProduct ( request ) ;
public class EndianNumbers { /** * Converting four bytes to a Big Endian float . * @ param b1 the first byte . * @ param b2 the second byte . * @ param b3 the third byte . * @ param b4 the fourth byte . * @ return the conversion result */ @ Pure @ Inline ( value = "Float.intBitsToFloat(EndianNumbers.toBEInt($...
EndianNumbers . class } ) public static float toBEFloat ( int b1 , int b2 , int b3 , int b4 ) { return Float . intBitsToFloat ( toBEInt ( b1 , b2 , b3 , b4 ) ) ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcConstructionProductResource ( ) { } }
if ( ifcConstructionProductResourceEClass == null ) { ifcConstructionProductResourceEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 113 ) ; } return ifcConstructionProductResourceEClass ;
public class FDBigInt { /** * Add one FDBigInt to another . Return a FDBigInt */ public FDBigInt add ( FDBigInt other ) { } }
int i ; int a [ ] , b [ ] ; int n , m ; long c = 0L ; // arrange such that a . nWords > = b . nWords ; // n = a . nWords , m = b . nWords if ( this . nWords >= other . nWords ) { a = this . data ; n = this . nWords ; b = other . data ; m = other . nWords ; } else { a = other . data ; n = other . nWords ; b = this . dat...
public class CreateCapacityReservationRequest { /** * This method is intended for internal use only . Returns the marshaled request configured with additional * parameters to enable operation dry - run . */ @ Override public Request < CreateCapacityReservationRequest > getDryRunRequest ( ) { } }
Request < CreateCapacityReservationRequest > request = new CreateCapacityReservationRequestMarshaller ( ) . marshall ( this ) ; request . addParameter ( "DryRun" , Boolean . toString ( true ) ) ; return request ;
public class MessageTransportManualSelect { /** * Get ( or make ) the current record for this reference . */ public Record makeReferenceRecord ( RecordOwner recordOwner ) { } }
Record record = super . makeReferenceRecord ( recordOwner ) ; record . addListener ( new CompareFileFilter ( record . getField ( MessageTransport . MESSAGE_TRANSPORT_TYPE ) , MessageTransportTypeField . MANUAL_RESPONSE , DBConstants . EQUALS , null , false ) ) ; return record ;
public class BusGroup { /** * Called when a subscribe needs to be propagated to the group . * The addSubscription puts the subscription into the list of * Subscriptions that have been propagated to this Bus . * @ param topicSpaceUuid The subscriptions topicSpace uuid . * @ param topic The subscriptions topic . ...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addSubscription" , new Object [ ] { topicSpaceName , topicSpaceUuid , topic , messageHandler , subscriptionsTable , new Boolean ( sendProxy ) } ) ; // Get a key to find the Subscription with final String key = subscriptionK...
public class LargeList { /** * Delete values from list between range . * @ param begin low value of the range ( inclusive ) * @ param end high value of the range ( inclusive ) * @ return count of entries removed */ public int remove ( Value begin , Value end ) { } }
List < byte [ ] > digestList = getDigestList ( ) ; Key beginKey = makeSubKey ( begin ) ; Key endKey = makeSubKey ( end ) ; int start = digestList . indexOf ( beginKey . digest ) ; int stop = digestList . indexOf ( endKey . digest ) ; int count = stop - start + 1 ; ; for ( int i = start ; i < stop ; i ++ ) { Key subKey ...
public class BackendServiceClient { /** * Deletes a key for validating requests with signed URLs for this backend service . * < p > Sample code : * < pre > < code > * try ( BackendServiceClient backendServiceClient = BackendServiceClient . create ( ) ) { * ProjectGlobalBackendServiceName backendService = Projec...
DeleteSignedUrlKeyBackendServiceHttpRequest request = DeleteSignedUrlKeyBackendServiceHttpRequest . newBuilder ( ) . setBackendService ( backendService ) . setKeyName ( keyName ) . build ( ) ; return deleteSignedUrlKeyBackendService ( request ) ;
public class ClassWriter { /** * Write " bootstrapMethods " attribute . */ void writeBootstrapMethods ( ) { } }
int alenIdx = writeAttr ( names . BootstrapMethods ) ; databuf . appendChar ( bootstrapMethods . size ( ) ) ; for ( Map . Entry < DynamicMethod . BootstrapMethodsKey , DynamicMethod . BootstrapMethodsValue > entry : bootstrapMethods . entrySet ( ) ) { DynamicMethod . BootstrapMethodsKey bsmKey = entry . getKey ( ) ; //...
public class MenuParser { /** * Output this screen using HTML . */ public void printHtmlJavaLogo ( PrintWriter out , String strTag , String strParams , String strData ) { } }
String strType = m_recDetail . getField ( MenusModel . TYPE ) . toString ( ) ; String strJava = this . getRecordOwner ( ) . getProperty ( DBParams . JAVA ) ; if ( ( strJava == null ) || ( strJava . length ( ) == 0 ) ) strJava = DBConstants . NO ; if ( strJava . toUpperCase ( ) . charAt ( 0 ) != 'N' ) if ( ( strType . e...
public class AccountHeader { /** * Add new profiles to the existing list of profiles * @ param profiles */ public void addProfiles ( @ NonNull IProfile ... profiles ) { } }
if ( mAccountHeaderBuilder . mProfiles == null ) { mAccountHeaderBuilder . mProfiles = new ArrayList < > ( ) ; } Collections . addAll ( mAccountHeaderBuilder . mProfiles , profiles ) ; mAccountHeaderBuilder . updateHeaderAndList ( ) ;
public class RqGreedy { /** * Consume the request . * @ param req Request * @ return New request * @ throws IOException If fails */ private static Request consume ( final Request req ) throws IOException { } }
final ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; new RqPrint ( req ) . printBody ( baos ) ; return new Request ( ) { @ Override public Iterable < String > head ( ) throws IOException { return req . head ( ) ; } @ Override public InputStream body ( ) { return new ByteArrayInputStream ( baos . toByteArr...
public class PngtasticFilterHandler { /** * { @ inheritDoc } * The bytes are named as follows ( x = current , a = previous , b = above , c = previous and above ) * < pre > * c b * a x * < / pre > */ @ Override public void filter ( byte [ ] line , byte [ ] previousLine , int sampleBitCount ) throws PngExceptio...
PngFilterType filterType = PngFilterType . forValue ( line [ 0 ] ) ; line [ 0 ] = 0 ; PngFilterType previousFilterType = PngFilterType . forValue ( previousLine [ 0 ] ) ; previousLine [ 0 ] = 0 ; switch ( filterType ) { case NONE : break ; case SUB : { byte [ ] original = line . clone ( ) ; int previous = - ( Math . ma...
public class TemplateScanner { /** * Output the sorted map of strings to the specified output file . * @ param strings * @ param outputFile * @ throws FileNotFoundException */ private static void outputMessages ( TreeMap < String , String > strings , File outputFile ) throws FileNotFoundException { } }
PrintWriter writer = new PrintWriter ( new FileOutputStream ( outputFile ) ) ; for ( Entry < String , String > entry : strings . entrySet ( ) ) { String key = entry . getKey ( ) ; String val = entry . getValue ( ) ; writer . append ( key ) ; writer . append ( '=' ) ; writer . append ( val ) ; writer . append ( "\n" ) ;...
public class GetRelationalDatabaseLogStreamsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetRelationalDatabaseLogStreamsRequest getRelationalDatabaseLogStreamsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getRelationalDatabaseLogStreamsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getRelationalDatabaseLogStreamsRequest . getRelationalDatabaseName ( ) , RELATIONALDATABASENAME_BINDING ) ; } catch ( Exception e ) { throw new Sd...
public class TemplateParser { /** * In some case the expression is already a valid Vue . js expression that will work without any * processing . In this case we just leave it in place . This avoid creating Computed * properties / methods for simple expressions . * @ param expressionString The expression to check ...
String methodName = expressionString ; if ( expressionString . endsWith ( "()" ) ) { methodName = expressionString . substring ( 0 , expressionString . length ( ) - 2 ) ; } return context . hasMethod ( methodName ) ;
public class PolicySetDefinitionsInner { /** * Retrieves all policy set definitions in management group . * This operation retrieves a list of all the a policy set definition in the given management group . * @ param managementGroupId The ID of the management group . * @ param serviceCallback the async ServiceCal...
return AzureServiceFuture . fromPageResponse ( listByManagementGroupSinglePageAsync ( managementGroupId ) , new Func1 < String , Observable < ServiceResponse < Page < PolicySetDefinitionInner > > > > ( ) { @ Override public Observable < ServiceResponse < Page < PolicySetDefinitionInner > > > call ( String nextPageLink ...
public class AbstractLogger { /** * Log a message at warning level . * @ param message the message to log * @ param exception the exception that caused the message to be generated */ public void warn ( Object message , Throwable exception ) { } }
log ( Level . WARN , message , exception ) ;
public class ReceiveQueueProxy { /** * Add a message filter to this remote receive queue . * @ param messageFilter The message filter to add . * @ param remoteSession The remote session . * @ return The filter ID . */ public BaseMessageFilter addRemoteMessageFilter ( BaseMessageFilter messageFilter , RemoteSessio...
BaseTransport transport = this . createProxyTransport ( ADD_REMOTE_MESSAGE_FILTER ) ; transport . addParam ( FILTER , messageFilter ) ; // Don ' t use COMMAND String strSessionPathID = null ; if ( remoteSession instanceof BaseProxy ) { // Always a SessionProxy strSessionPathID = ( ( BaseProxy ) remoteSession ) . getIDP...
public class StripeJsonUtils { /** * Util function for putting an long value into a { @ link JSONObject } if that * value is not null . This ignores any { @ link JSONException } that may be thrown * due to insertion . * @ param jsonObject the { @ link JSONObject } into which to put the field * @ param fieldName...
if ( value == null ) { return ; } try { jsonObject . put ( fieldName , value . longValue ( ) ) ; } catch ( JSONException ignored ) { }
public class EJBWrapper { /** * F743-34301.1 */ private static void addManagedBeanMethod ( ClassWriter cw , String className , String implClassName , Method method , String implMethodName , int methodId , boolean aroundInvoke ) { } }
GeneratorAdapter mg ; String methodName = method . getName ( ) ; String methodSignature = MethodAttribUtils . jdiMethodSignature ( method ) ; String EjbPreInvoke = "EjbPreInvokeForManagedBean" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , INDENT + "adding method : " + me...
public class ChainableReverseAbstractInterpreter { /** * Returns a version of { @ code type } that is restricted by some knowledge * about the result of the { @ code typeof } operation . * The behavior of the { @ code typeof } operator can be summarized by the * following table : * < table > * < tr > < th > t...
if ( type == null ) { if ( resultEqualsValue ) { JSType result = getNativeTypeForTypeOf ( value ) ; return result == null ? getNativeType ( CHECKED_UNKNOWN_TYPE ) : result ; } else { return null ; } } return type . visit ( new RestrictByOneTypeOfResultVisitor ( value , resultEqualsValue ) ) ;
public class RangeAxis { /** * { @ inheritDoc } */ @ Override public boolean hasNext ( ) { } }
resetToLastKey ( ) ; if ( mFirst ) { mFirst = false ; if ( mFrom . hasNext ( ) && Type . getType ( mFrom . getNode ( ) . getTypeKey ( ) ) . derivesFrom ( Type . INTEGER ) ) { mStart = Integer . parseInt ( new String ( ( ( ITreeValData ) mFrom . getNode ( ) ) . getRawValue ( ) ) ) ; if ( mTo . hasNext ( ) && Type . getT...
public class RequestQueue { /** * Cancels all requests in this queue with the given tag . Tag must be non - null * and equality is by identity . */ public void cancelAll ( final Object tag ) { } }
if ( tag == null ) { throw new IllegalArgumentException ( "Cannot cancelAll with a null tag" ) ; } cancelAll ( new RequestFilter ( ) { @ Override public boolean apply ( Request < ? > request ) { return request . getTag ( ) == tag ; } } ) ;
public class FileSystemGroupStore { /** * Returns an < code > Iterator < / code > over the < code > Collection < / code > of < code > IEntityGroups * < / code > that are members of this < code > IEntityGroup < / code > . * @ return java . util . Iterator * @ param group org . apereo . portal . groups . IEntityGro...
String [ ] keys = findMemberGroupKeys ( group ) ; // No foreign groups here . List groups = new ArrayList ( keys . length ) ; for ( int i = 0 ; i < keys . length ; i ++ ) { groups . add ( find ( keys [ i ] ) ) ; } return groups . iterator ( ) ;
public class SemanticFailure { /** * { @ inheritDoc } */ @ Override public String getUserFacingMessage ( ) { } }
final StringBuilder bldr = new StringBuilder ( ) ; bldr . append ( "SEMANTIC FAILURE" ) ; final String name = getName ( ) ; if ( name != null ) { bldr . append ( " in " ) ; bldr . append ( name ) ; } bldr . append ( "\n\treason: " ) ; final String msg = getMessage ( ) ; if ( msg != null ) bldr . append ( msg ) ; else b...
public class BigtableSession { /** * Create a new { @ link com . google . cloud . bigtable . grpc . io . ChannelPool } , with auth headers . This * method allows users to override the default implementation with their own . * @ param channelFactory a { @ link ChannelPool . ChannelFactory } object . * @ param coun...
return new ChannelPool ( channelFactory , count ) ;
public class ZipUtil { /** * Unpacks a single file from a ZIP stream to a file . * @ param is * ZIP stream . * @ param name * entry name . * @ param file * target file to be created or overwritten . * @ return < code > true < / code > if the entry was found and unpacked , * < code > false < / code > if ...
return handle ( is , name , new FileUnpacker ( file ) ) ;
public class HighLevelEncoder { /** * public static byte [ ] getBytesForMessage ( String msg ) { * return msg . getBytes ( Charset . forName ( " cp437 " ) ) ; / / See 4.4.3 and annex B of ISO / IEC 15438:2001 ( E ) */ private static char randomize253State ( char ch , int codewordPosition ) { } }
int pseudoRandom = ( ( 149 * codewordPosition ) % 253 ) + 1 ; int tempVariable = ch + pseudoRandom ; return ( char ) ( tempVariable <= 254 ? tempVariable : tempVariable - 254 ) ;
public class HttpSessionContextImpl { /** * Called by webcontainer to do prilimary session setup , once per webapp per * request . */ public HttpSession sessionPreInvoke ( HttpServletRequest req , HttpServletResponse res ) { } }
if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_CORE . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_CORE . entering ( methodClassName , methodNames [ SESSION_PRE_INVOKE ] ) ; } // getSessionAffinityContext ( req ) ; / / this call will create sac if n...