signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class TriggerManager { /** * Returns a consolidated trigger to call for load operations , or null if * none . If not null , the consolidated trigger is not a snapshot - - it will * change as the set of triggers in this manager changes . * @ since 1.2 */ public Trigger < ? super S > getLoadTrigger ( ) { } }
ForLoad < S > forLoad = mForLoad ; return forLoad . isEmpty ( ) ? null : forLoad ;
public class ModelConstraints { /** * Checks whether the given field definition is used as the primary key of a class referenced by * a reference . * @ param modelDef The model * @ param fieldDef The current field descriptor def * @ return The reference that uses the field or < code > null < / code > if the fie...
String ownerClassName = ( ( ClassDescriptorDef ) fieldDef . getOwner ( ) ) . getQualifiedName ( ) ; ClassDescriptorDef classDef ; ReferenceDescriptorDef refDef ; String targetClassName ; // only relevant for primarykey fields if ( PropertyHelper . toBoolean ( fieldDef . getProperty ( PropertyHelper . OJB_PROPERTY_PRIMA...
public class Clause { /** * setter for rule - sets * @ generated * @ param v value to set into the feature */ public void setRule ( String v ) { } }
if ( Clause_Type . featOkTst && ( ( Clause_Type ) jcasType ) . casFeat_rule == null ) jcasType . jcas . throwFeatMissing ( "rule" , "com.digitalpebble.rasp.Clause" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Clause_Type ) jcasType ) . casFeatCode_rule , v ) ;
public class Reaction { /** * Adds a reactant to this reaction with a stoichiometry coefficient . * @ param reactant Molecule added as reactant to this reaction * @ param coefficient Stoichiometry coefficient for this molecule * @ see # getReactants */ @ Override public void addReactant ( IAtomContainer reactant ...
reactants . addAtomContainer ( reactant , coefficient ) ; notifyChanged ( ) ;
public class SchedulerDriver { /** * Retain the complete evaluators submitting another task * until there is no need to reuse them . */ private synchronized void retainEvaluator ( final ActiveContext context ) { } }
if ( scheduler . hasPendingTasks ( ) ) { scheduler . submitTask ( context ) ; } else if ( nActiveEval > 1 ) { nActiveEval -- ; context . close ( ) ; } else { state = State . READY ; waitForCommands ( context ) ; }
public class SurvivalInfoHelper { /** * If any not numeric value then categorical * @ param values * @ return */ private static boolean isCategorical ( LinkedHashMap < String , Double > values ) { } }
try { for ( String value : values . keySet ( ) ) { Double . parseDouble ( value ) ; } return false ; } catch ( Exception e ) { return true ; }
public class DateInterval { /** * / * [ deutsch ] * < p > Erzeugt einen { @ code Stream } , der jeweils ein Kalenderdatum als Vielfaches der Dauer angewandt auf * den Start und bis zum Ende dieses Intervalls geht . < / p > * @ param duration duration which has to be added to the start multiple times * @ throws ...
if ( this . isEmpty ( ) && duration . isPositive ( ) ) { return Stream . empty ( ) ; } DateInterval interval = this . toCanonical ( ) ; PlainDate start = interval . getStartAsCalendarDate ( ) ; PlainDate end = interval . getEndAsCalendarDate ( ) ; if ( ( start == null ) || ( end == null ) ) { throw new IllegalStateExce...
public class FessMessages { /** * Add the created action message for the key ' constraints . NotEmpty . message ' with parameters . * < pre > * message : { item } may not be empty . * < / pre > * @ param property The property name for the message . ( NotNull ) * @ return this . ( NotNull ) */ public FessMessa...
assertPropertyNotNull ( property ) ; add ( property , new UserMessage ( CONSTRAINTS_NotEmpty_MESSAGE ) ) ; return this ;
public class ArmeriaAutoConfiguration { /** * Create a started { @ link Server } bean . */ @ Bean @ Nullable public Server armeriaServer ( ArmeriaSettings armeriaSettings , Optional < MeterRegistry > meterRegistry , Optional < MeterIdPrefixFunctionFactory > meterIdPrefixFunctionFactory , Optional < List < HealthChecker...
if ( ! armeriaServerConfigurators . isPresent ( ) && ! thriftServiceRegistrationBeans . isPresent ( ) && ! httpServiceRegistrationBeans . isPresent ( ) && ! annotatedServiceRegistrationBeans . isPresent ( ) ) { // No services to register , no need to start up armeria server . return null ; } final MeterIdPrefixFunction...
public class PrettySharedPreferences { /** * Call to get a { @ link com . tale . prettysharedpreferences . LongEditor } object for the specific * key . < code > NOTE : < / code > There is a unique { @ link com . tale . prettysharedpreferences . TypeEditor } * object for a unique key . * @ param key The name of th...
TypeEditor typeEditor = TYPE_EDITOR_MAP . get ( key ) ; if ( typeEditor == null ) { typeEditor = new LongEditor ( this , sharedPreferences , key ) ; TYPE_EDITOR_MAP . put ( key , typeEditor ) ; } else if ( ! ( typeEditor instanceof LongEditor ) ) { throw new IllegalArgumentException ( String . format ( "key %s is alrea...
public class JVMLauncher { /** * Get a process loader for a JVM . The class path for the JVM * is computed based on the class loaders for the main class . * @ param mainClass Fully qualified class name of the main class * @ param args Additional command line parameters * @ return ProcessBuilder that has not bee...
return getProcessBuilder ( findClass ( mainClass ) , Arrays . asList ( args ) ) ;
public class JsonConversionUtils { /** * Converts a collection of { @ link SpanData } to a Collection of json string . * @ param appName the name of app to include in traces . * @ param spanDataList Collection of { @ code SpanData } to be converted to json . * @ return Collection of { @ code SpanData } converted ...
List < String > spanJson = new ArrayList < String > ( ) ; if ( spanDataList == null ) { return spanJson ; } StringBuilder sb = new StringBuilder ( ) ; for ( final SpanData span : spanDataList ) { final SpanContext spanContext = span . getContext ( ) ; final SpanId parentSpanId = span . getParentSpanId ( ) ; final Times...
public class BufferUtil { /** * Simple StaticBuffer construction */ public static final StaticBuffer getIntBuffer ( int id ) { } }
ByteBuffer buffer = ByteBuffer . allocate ( intSize ) ; buffer . putInt ( id ) ; byte [ ] arr = buffer . array ( ) ; Preconditions . checkArgument ( arr . length == intSize ) ; return StaticArrayBuffer . of ( arr ) ;
public class LazyTreeReader { /** * Should be called only from containers ( lists , maps , structs , unions ) since for these tree * readers the number of rows does not correspond to the number of values ( e . g . there may * be many more if it contains the entries in lists with more than one element , or much less...
if ( nextIsNullInComplexType ( ) ) { return null ; } previousRow = row ; return next ( previous ) ;
public class JettyFactoryImpl { /** * { @ inheritDoc } */ @ Override public ServerConnector createConnector ( final Server server , final String name , final int port , int securePort , final String host , final Boolean checkForwaredHeaders ) { } }
HttpConfiguration httpConfig = getHttpConfiguration ( securePort , checkForwaredHeaders , server ) ; ConnectionFactory factory = null ; if ( alpnCLassesAvailable ( ) ) { log . info ( "HTTP/2 available, adding HTTP/2 to connector" ) ; // SPDY connector // ServerConnector spdy ; try { // Class < ? > loadClass = bundle . ...
public class Crawler { /** * Enters the form data . First , the related input elements ( if any ) to the eventable are filled * in and then it tries to fill in the remaining input elements . * @ param eventable the eventable element . */ private void handleInputElements ( Eventable eventable ) { } }
CopyOnWriteArrayList < FormInput > formInputs = eventable . getRelatedFormInputs ( ) ; for ( FormInput formInput : formHandler . getFormInputs ( ) ) { if ( ! formInputs . contains ( formInput ) ) { formInputs . add ( formInput ) ; } } formHandler . handleFormElements ( formInputs ) ;
public class LeaderboardsHandler { /** * Return all the Leaderboards . */ @ SuppressWarnings ( "unused" ) // called through reflection by RequestServer public water . automl . api . schemas3 . LeaderboardsV99 list ( int version , water . automl . api . schemas3 . LeaderboardsV99 s ) { } }
Leaderboards m = s . createAndFillImpl ( ) ; m . leaderboards = Leaderboards . fetchAll ( ) ; return s . fillFromImpl ( m ) ;
public class ApiOvhXdsl { /** * List available WLAN channel for this modem * REST : GET / xdsl / { serviceName } / modem / availableWLANChannel * @ param frequency [ required ] WLAN frequency you want to retrieve channels * @ param serviceName [ required ] The internal name of your XDSL offer */ public ArrayList ...
String qPath = "/xdsl/{serviceName}/modem/availableWLANChannel" ; StringBuilder sb = path ( qPath , serviceName ) ; query ( sb , "frequency" , frequency ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t15 ) ;
public class SingleUnitTimeSpan { /** * / * [ deutsch ] * < p > Liefert eine Kopie mit dem addierten Betrag . < / p > * @ param amount the amount to be added * @ return result of addition as immutable copy * @ throws ArithmeticException if numeric overflow occurs */ public D plus ( int amount ) { } }
if ( amount == 0 ) { return this . self ( ) ; } long value = this . amount ; return this . with ( MathUtils . safeCast ( value + amount ) ) ;
public class Nd4jEnvironment { /** * Load an { @ link Nd4jEnvironment } from * the properties returned from { @ link org . nd4j . linalg . api . ops . executioner . OpExecutioner # getEnvironmentInformation ( ) } * derived from { @ link Nd4j # getExecutioner ( ) } * @ return the environment representing the syste...
Properties envInfo = Nd4j . getExecutioner ( ) . getEnvironmentInformation ( ) ; Nd4jEnvironment ret = Nd4jEnvironment . builder ( ) . numCores ( getIntOrZero ( CPU_CORES_KEY , envInfo ) ) . ram ( getLongOrZero ( HOST_TOTAL_MEMORY_KEY , envInfo ) ) . os ( envInfo . get ( OS_KEY ) . toString ( ) ) . blasVendor ( envInfo...
public class EJBProcessor { /** * d429866 */ @ Override public void processXML ( ) throws InjectionException { } }
final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "processXML : " + this ) ; List < ? extends EJBRef > ejbRefs = ivNameSpaceConfig . getJNDIEnvironmentRefs ( EJBRef . class ) ; if ( ejbRefs != null ) { for ( EJBRef ejbRef : ejbRefs ) { // ...
public class Distance { /** * Square of the distance between two points */ public static double getSquaredDistanceToPoint ( final double pFromX , final double pFromY , final double pToX , final double pToY ) { } }
final double dX = pFromX - pToX ; final double dY = pFromY - pToY ; return dX * dX + dY * dY ;
public class TemplateMatching { /** * Performs template matching . */ public void process ( ) { } }
// compute match intensities if ( mask == null ) match . process ( template ) ; else match . process ( template , mask ) ; GrayF32 intensity = match . getIntensity ( ) ; int offsetX = 0 ; int offsetY = 0 ; // adjust intensity image size depending on if there is a border or not if ( ! match . isBorderProcessed ( ) ) { i...
public class POJOService { /** * adds getter for field to class * @ param classBuilder class to modify * @ param attributeName name of attribute to be referenced * @ param type type of attribue to be referenced */ private void addGetter ( final TypeSpec . Builder classBuilder , final String attributeName , final ...
final String getterMethodName = "get" + attributeName . substring ( 0 , 1 ) . toUpperCase ( ) + attributeName . substring ( 1 ) ; final MethodSpec . Builder getterBuilder = MethodSpec . methodBuilder ( getterMethodName ) ; getterBuilder . returns ( type ) ; getterBuilder . addModifiers ( Modifier . PUBLIC ) ; getterBui...
public class CircularList { /** * Inserts a collection of elements , looping on them . * @ param newElements Collection of elements to add * @ return Always true */ @ Override public boolean addAll ( Collection < ? extends T > newElements ) { } }
for ( T newElement : newElements ) { add ( newElement ) ; } return true ;
public class CmsFlexController { /** * Returns the combined " expires " date for all resources read during this request . < p > * @ return the combined " expires " date for all resources read during this request */ public long getDateExpires ( ) { } }
int pos = m_flexContextInfoList . size ( ) - 1 ; if ( pos < 0 ) { // ensure a valid position is used return CmsResource . DATE_EXPIRED_DEFAULT ; } return ( m_flexContextInfoList . get ( pos ) ) . getDateExpires ( ) ;
public class DataUtil { /** * Creates a random string , suitable for use as a mime boundary */ static String mimeBoundary ( ) { } }
final StringBuilder mime = StringUtil . borrowBuilder ( ) ; final Random rand = new Random ( ) ; for ( int i = 0 ; i < boundaryLength ; i ++ ) { mime . append ( mimeBoundaryChars [ rand . nextInt ( mimeBoundaryChars . length ) ] ) ; } return StringUtil . releaseBuilder ( mime ) ;
public class EmbeddedNeo4jDialect { /** * It will remove a property from an embedded node if it exists . * After deleting the property , if the node does not have any more properties and relationships ( except for an incoming one ) , * it will delete the embedded node as well . */ private void removePropertyForEmbe...
if ( i == embeddedColumnSplit . length - 1 ) { // Property String property = embeddedColumnSplit [ embeddedColumnSplit . length - 1 ] ; if ( embeddedNode . hasProperty ( property ) ) { embeddedNode . removeProperty ( property ) ; } } else { Iterator < Relationship > iterator = embeddedNode . getRelationships ( Directio...
public class StatsCollector { /** * Clears a tag added using { @ link # addExtraTag addExtraTag } . * @ param name The name of the tag to remove from the set of extra * tags . * @ throws IllegalStateException if there ' s no extra tag currently * recorded . * @ throws IllegalArgumentException if the given nam...
if ( extratags == null ) { throw new IllegalStateException ( "no extra tags added" ) ; } if ( extratags . get ( name ) == null ) { throw new IllegalArgumentException ( "tag '" + name + "' not in" + extratags ) ; } extratags . remove ( name ) ;
public class WebPage { /** * Recursively gets the most recent modification time of a file or directory . */ public static long getLastModifiedRecursive ( File file ) { } }
long time = file . lastModified ( ) ; if ( file . isDirectory ( ) ) { String [ ] list = file . list ( ) ; if ( list != null ) { int len = list . length ; for ( int c = 0 ; c < len ; c ++ ) { long time2 = getLastModifiedRecursive ( new File ( file , list [ c ] ) ) ; if ( time2 > time ) time = time2 ; } } } return time ;
public class DefaultURLTemplatesFactory { /** * Loads the template reference groups from a URL template config document . * @ param parent */ private void loadTemplateRefGroups ( Element parent ) { } }
// Load template refs List templateRefGroups = DomUtils . getChildElementsByName ( parent , URL_TEMPLATE_REF_GROUP ) ; ; for ( int i = 0 ; i < templateRefGroups . size ( ) ; i ++ ) { Element refGroupElement = ( Element ) templateRefGroups . get ( i ) ; String refGroupName = getElementText ( refGroupElement , NAME ) ; i...
public class ServiceCall { /** * Creates new { @ link ServiceCall } ' s definition with a given router . * @ param routerType given class of the router . * @ return new { @ link ServiceCall } instance . */ public ServiceCall router ( Class < ? extends Router > routerType ) { } }
ServiceCall target = new ServiceCall ( this ) ; target . router = Routers . getRouter ( routerType ) ; return target ;
public class InstantiationUtil { /** * Checks , whether the given class has a public nullary constructor . * @ param clazz The class to check . * @ return True , if the class has a public nullary constructor , false if not . */ public static boolean hasPublicNullaryConstructor ( Class < ? > clazz ) { } }
Constructor < ? > [ ] constructors = clazz . getConstructors ( ) ; for ( Constructor < ? > constructor : constructors ) { if ( constructor . getParameterTypes ( ) . length == 0 && Modifier . isPublic ( constructor . getModifiers ( ) ) ) { return true ; } } return false ;
public class LogValueMapping { /** * ~ Methods * * * * * */ @ Override public Map < Long , Double > mapping ( Map < Long , Double > originalDatapoints ) { } }
List < String > constants = new ArrayList < String > ( ) ; constants . add ( "10" ) ; return mapping ( originalDatapoints , constants ) ;
public class CmsHighlightingBorder { /** * Sets the border position . < p > * @ param position the position data */ public void setPosition ( CmsPositionBean position ) { } }
setPosition ( position . getHeight ( ) , position . getWidth ( ) , position . getLeft ( ) , position . getTop ( ) ) ;
public class PodsConfig { /** * public void addPodImpl ( PodConfig pod ) * Objects . requireNonNull ( pod ) ; * _ podMap . put ( pod . getName ( ) , pod ) ; * public Collection < PodConfig > getPods ( ) * return _ podMap . values ( ) ; */ public void setConfigException ( Exception e ) { } }
log . log ( Level . FINER , e . toString ( ) , e ) ;
public class Equ { /** * gatherVariables . * @ param tokens a { @ link java . util . Collection } object . * @ return a { @ link java . util . Set } object . */ static public Set < String > gatherVariables ( final List < EquPart > tokens ) { } }
final Set < String > vars = new HashSet < > ( ) ; for ( final EquPart token : tokens ) if ( token instanceof TokVariable ) vars . add ( ( ( TokVariable ) token ) . getValue ( ) . toString ( ) ) ; return vars ;
public class ArchiveBase { /** * Provides typesafe covariant return of this instance */ protected final T covariantReturn ( ) { } }
try { return this . getActualClass ( ) . cast ( this ) ; } catch ( final ClassCastException cce ) { log . log ( Level . SEVERE , "The class specified by getActualClass is not a valid assignment target for this instance;" + " developer error" ) ; throw cce ; }
public class WebUtils { /** * Locates the ApplicationContext , returns null if not found * @ param servletContext The servlet context * @ return The ApplicationContext */ public static ApplicationContext findApplicationContext ( ServletContext servletContext ) { } }
if ( servletContext == null ) { return ContextLoader . getCurrentWebApplicationContext ( ) ; } return WebApplicationContextUtils . getWebApplicationContext ( servletContext ) ;
public class SharedObject { /** * { @ inheritDoc } */ @ Override public boolean setAttributes ( Map < String , Object > values ) { } }
int successes = 0 ; if ( values != null ) { beginUpdate ( ) ; try { for ( Map . Entry < String , Object > entry : values . entrySet ( ) ) { if ( setAttribute ( entry . getKey ( ) , entry . getValue ( ) ) ) { successes ++ ; } } } finally { endUpdate ( ) ; } } // expect every value to have been added return ( successes =...
public class GetMetricStatisticsRequest { /** * The percentile statistics . Specify values between p0.0 and p100 . When calling < code > GetMetricStatistics < / code > , * you must specify either < code > Statistics < / code > or < code > ExtendedStatistics < / code > , but not both . Percentile * statistics are no...
if ( extendedStatistics == null ) { this . extendedStatistics = null ; return ; } this . extendedStatistics = new com . amazonaws . internal . SdkInternalList < String > ( extendedStatistics ) ;
public class ParamConvertUtils { /** * Creates a converter function that converts value into primitive type . * @ return A converter function or { @ code null } if the given type is not primitive type or boxed type */ @ Nullable private static Converter < List < String > , Object > createPrimitiveTypeConverter ( fina...
Object defaultValue = defaultValue ( resultClass ) ; if ( defaultValue == null ) { // For primitive type , the default value shouldn ' t be null return null ; } return new BasicConverter ( defaultValue ) { @ Override protected Object convert ( String value ) throws Exception { return valueOf ( value , resultClass ) ; }...
public class AbstractPrintQuery { /** * Method to get an table index from { @ link # sqlTable2Index } . * @ param _ tableName tablename the index is wanted for * @ param _ column name of the column , used for the relation * @ param _ relIndex relation the table is used in * @ param _ clazzId optional id of the ...
return this . sqlTable2Index . get ( _relIndex + "__" + _tableName + "__" + _column + ( _clazzId == null ? "" : "__" + _clazzId ) ) ;
public class Operation { /** * Learn whether { @ code operator } seems to implement { @ code this } . * @ param operator to check * @ return boolean */ public boolean matches ( Operator < ? > operator ) { } }
final Type expectedType = TypeUtils . unrollVariables ( TypeUtils . getTypeArguments ( operator . getClass ( ) , Operator . class ) , Operator . class . getTypeParameters ( ) [ 0 ] ) ; if ( ! TypeUtils . isInstance ( this , expectedType ) ) { return false ; } final Map < TypeVariable < ? > , Type > typeArguments = Type...
public class ListRepositoriesRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListRepositoriesRequest listRepositoriesRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listRepositoriesRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listRepositoriesRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ; protocolMarshaller . marshall ( listRepositoriesRequest . getSortBy ( ) , SORTBY_BINDING ) ; p...
public class PairSet { /** * { @ inheritDoc } */ @ Override public int differenceSize ( Collection < ? extends Pair < T , I > > other ) { } }
return other == null ? ( int ) size ( ) : ( int ) matrix . differenceSize ( convert ( other ) . matrix ) ;
public class DoubleStreamEx { /** * Folds the elements of this stream using the provided seed object and * accumulation function , going left to right . This is equivalent to : * < pre > * { @ code * double result = identity ; * for ( double element : this stream ) * result = accumulator . apply ( result , ...
double [ ] box = new double [ ] { seed } ; forEachOrdered ( t -> box [ 0 ] = accumulator . applyAsDouble ( box [ 0 ] , t ) ) ; return box [ 0 ] ;
public class AxiomAssign { /** * An Ontology : * - has always an URI as an attribute * - may have an URI as ontologyLanguage * - may have a naturalLanguage referenced as a literal * - may have a versionNumber , as a literal * may have N concepts as contained elements * may have N instances as contained elem...
if ( syntaxElementName . equalsIgnoreCase ( XMLSyntax . URI ( ) ) && syntaxElement instanceof SemanticIdentifier ) { parsedOntology . setSemanticIdentifier ( ( SemanticIdentifier ) syntaxElement ) ; return true ; } if ( syntaxElementName . equalsIgnoreCase ( XMLSyntax . ONTOLOGY_LANGUAGE ( ) ) && syntaxElement instance...
public class CollectionUtil { /** * Returns an empty Collection if argument is null . * */ public static < T > Collection < T > nullToEmpty ( Collection < T > collection ) { } }
return collection == null ? Collections . < T > emptyList ( ) : collection ;
public class hostcpu { /** * < pre > * Performs generic data validation for the operation to be performed * < / pre > */ protected void validate ( String operationType ) throws Exception { } }
super . validate ( operationType ) ; MPSString id_validator = new MPSString ( ) ; id_validator . setConstraintIsReq ( MPSConstants . DELETE_CONSTRAINT , true ) ; id_validator . setConstraintIsReq ( MPSConstants . MODIFY_CONSTRAINT , true ) ; id_validator . validate ( operationType , id , "\"id\"" ) ; MPSString uuid_val...
public class TimeCategory { /** * Return a Duration representing the DST difference ( if any ) between two * dates . i . e . if one date is before the DST changeover , and the other * date is after , the resulting duration will represent the DST offset . * @ param self a Date * @ param other another Date * @ ...
Duration d1 = getDaylightSavingsOffset ( self ) ; Duration d2 = getDaylightSavingsOffset ( other ) ; return new TimeDuration ( 0 , 0 , 0 , ( int ) ( d2 . toMilliseconds ( ) - d1 . toMilliseconds ( ) ) ) ;
public class AmazonTextractClient { /** * Analyzes an input document for relationships between detected items . * The types of information returned are as follows : * < ul > * < li > * Words and lines that are related to nearby lines and words . The related information is returned in two * < a > Block < / a >...
request = beforeClientExecution ( request ) ; return executeAnalyzeDocument ( request ) ;
public class IniFile { /** * Sets the comments associated with a section . * @ param pstrSection the section name * @ param pstrComments the comments . */ public void addSection ( String pstrSection , String pstrComments ) { } }
INISection objSec = null ; objSec = ( INISection ) this . mhmapSections . get ( pstrSection ) ; if ( objSec == null ) { objSec = new INISection ( pstrSection ) ; this . mhmapSections . put ( pstrSection , objSec ) ; } objSec . setSecComments ( delRemChars ( pstrComments ) ) ; objSec = null ;
public class WsAddressingHeaders { /** * Sets the message id from uri string . * @ param messageId the messageId to set */ public void setMessageId ( String messageId ) { } }
try { this . messageId = new URI ( messageId ) ; } catch ( URISyntaxException e ) { throw new CitrusRuntimeException ( "Invalid messageId uri" , e ) ; }
public class TagWizardController { /** * Add a tag for a single attribute * @ param request the { @ link AddTagRequest } containing the entityTypeId , attributeName , * relationIRI and ontologyTermIRIs */ @ PostMapping ( "/tagattribute" ) public @ ResponseBody OntologyTag addTagAttribute ( @ Valid @ RequestBody Add...
return ontologyTagService . addAttributeTag ( request . getEntityTypeId ( ) , request . getAttributeName ( ) , request . getRelationIRI ( ) , request . getOntologyTermIRIs ( ) ) ;
public class AccountManager { /** * Returns the instructions for creating a new account , or < tt > null < / tt > if there * are no instructions . If present , instructions should be displayed to the end - user * that will complete the registration process . * @ return the account creation instructions , or < tt ...
if ( info == null ) { getRegistrationInfo ( ) ; } return info . getInstructions ( ) ;
public class Indexer { /** * Gets the fully - qualified index metrics table name for the given table . * @ param schema Schema name * @ param table Table name * @ return Qualified index metrics table name */ public static String getMetricsTableName ( String schema , String table ) { } }
return schema . equals ( "default" ) ? table + "_idx_metrics" : schema + '.' + table + "_idx_metrics" ;
public class FromString { /** * Parses a string representing a type , that must be aligned with the current context . * For example , < i > " List & lt ; T & gt ; " < / i > must be converted into the appropriate ClassNode * for which < i > T < / i > matches the appropriate placeholder . * @ param option a string ...
return GenericsUtils . parseClassNodesFromString ( option , sourceUnit , compilationUnit , mn , usage ) ;
public class NormalizationChecker { /** * Returns < code > true < / code > if the argument starts with a composing * character and < code > false < / code > otherwise . * @ param str a string * @ return < code > true < / code > if the argument starts with a composing * character and < code > false < / code > ot...
if ( str . length ( ) == 0 ) { return false ; } int first32 ; char first = str . charAt ( 0 ) ; if ( UCharacter . isHighSurrogate ( first ) ) { try { char second = str . charAt ( 1 ) ; first32 = UCharacter . getCodePoint ( first , second ) ; } catch ( StringIndexOutOfBoundsException e ) { throw new SAXException ( "Malf...
public class AfplibFactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public PGDXpgBase createPGDXpgBaseFromString ( EDataType eDataType , String initialValue ) { } }
PGDXpgBase result = PGDXpgBase . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ;
public class CmsMultiDialog { /** * Returns the resources that are defined for the dialog operation . < p > * For single resource operations , the list contains one item : the resource name found * in the request parameter value of the " resource " parameter . < p > * @ return the resources that are defined for t...
if ( m_resourceList == null ) { // use lazy initializing if ( getParamResourcelist ( ) != null ) { // found the resourcelist parameter m_resourceList = CmsStringUtil . splitAsList ( getParamResourcelist ( ) , DELIMITER_RESOURCES , true ) ; Collections . sort ( m_resourceList ) ; } else { // this is a single resource op...
public class ConceptMention { /** * indexed getter for resourceEntryList - gets an indexed value - * @ generated * @ param i index in the array to get * @ return value of the element at index i */ public ResourceEntry getResourceEntryList ( int i ) { } }
if ( ConceptMention_Type . featOkTst && ( ( ConceptMention_Type ) jcasType ) . casFeat_resourceEntryList == null ) jcasType . jcas . throwFeatMissing ( "resourceEntryList" , "de.julielab.jules.types.ConceptMention" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( ConceptMention_T...
public class DeviceStatus { /** * Checks whether there ' s a network connection . * @ param context Context to use * @ return true if there ' s an active network connection , false otherwise */ public static boolean isOnline ( Context context ) { } }
ConnectivityManager cm = ( ConnectivityManager ) context . getSystemService ( Context . CONNECTIVITY_SERVICE ) ; if ( cm == null ) { return false ; } NetworkInfo info = cm . getActiveNetworkInfo ( ) ; return info != null && info . isConnectedOrConnecting ( ) ;
public class XmlEscape { /** * Perform a ( configurable ) XML 1.1 < strong > escape < / strong > operation on a < tt > String < / tt > input . * This method will perform an escape operation according to the specified * { @ link org . unbescape . xml . XmlEscapeType } and { @ link org . unbescape . xml . XmlEscapeLe...
return escapeXml ( text , XmlEscapeSymbols . XML11_SYMBOLS , type , level ) ;
public class SwitchPreference { /** * Obtains the text , which should be displayed on the preference ' s switch , when it is checked , * from a specific typed array . * @ param typedArray * The typed array , the text should be obtained from , as an instance of the class { @ link * TypedArray } . The typed array...
setSwitchTextOn ( typedArray . getText ( R . styleable . SwitchPreference_android_switchTextOn ) ) ;
public class CommandLineArgumentParser { /** * Read an argument file and return a list of the args contained in it * A line that starts with { @ link # ARGUMENT _ FILE _ COMMENT } is ignored . * @ param argumentsFile a text file containing args * @ return false if a fatal error occurred */ private List < String >...
List < String > args = new ArrayList < > ( ) ; try ( BufferedReader reader = new BufferedReader ( new FileReader ( argumentsFile ) ) ) { String line ; while ( ( line = reader . readLine ( ) ) != null ) { if ( ! line . startsWith ( ARGUMENT_FILE_COMMENT ) && ! line . trim ( ) . isEmpty ( ) ) { args . addAll ( Arrays . a...
public class Utils { /** * Executes a command in another process and check for its execution result . * @ param args array representation of the command to execute * @ return { @ link ProcessExecutionResult } including the process ' s exit value , output and error */ public static ProcessExecutionResult getResultFr...
try { Process process = Runtime . getRuntime ( ) . exec ( args ) ; StringBuilder outputSb = new StringBuilder ( ) ; try ( BufferedReader processOutputReader = new BufferedReader ( new InputStreamReader ( process . getInputStream ( ) ) ) ) { String line ; while ( ( line = processOutputReader . readLine ( ) ) != null ) {...
public class NBTrainingEngine { /** * Assume labels have equal probability . Not depends on the training data size . */ public void calculateLabelPrior ( ) { } }
double prior = 1D / model . labelIndexer . getLabelSize ( ) ; model . labelIndexer . getIndexSet ( ) . forEach ( labelIndex -> model . labelPrior . put ( labelIndex , prior ) ) ;
public class DbEntityManager { /** * returns the object in the cache . if this object was loaded before , * then the original object is returned . */ protected DbEntity cacheFilter ( DbEntity persistentObject ) { } }
DbEntity cachedPersistentObject = dbEntityCache . get ( persistentObject . getClass ( ) , persistentObject . getId ( ) ) ; if ( cachedPersistentObject != null ) { return cachedPersistentObject ; } else { return persistentObject ; }
public class ZonesInner { /** * Creates or updates a DNS zone . Does not modify DNS records within the zone . * @ param resourceGroupName The name of the resource group . * @ param zoneName The name of the DNS zone ( without a terminating dot ) . * @ param parameters Parameters supplied to the CreateOrUpdate oper...
return ServiceFuture . fromResponse ( createOrUpdateWithServiceResponseAsync ( resourceGroupName , zoneName , parameters , ifMatch , ifNoneMatch ) , serviceCallback ) ;
public class NodeWriteTrx { /** * Setting a new name in the metapage . * @ param pName * to be set * @ throws TTException */ private int insertName ( final String pName ) throws TTException { } }
final String string = ( pName == null ? "" : pName ) ; final int nameKey = NamePageHash . generateHashForString ( string ) ; NodeMetaPageFactory . MetaKey key = new NodeMetaPageFactory . MetaKey ( nameKey ) ; NodeMetaPageFactory . MetaValue value = new NodeMetaPageFactory . MetaValue ( string ) ; getPageWtx ( ) . getMe...
public class WriterFactoryImpl { /** * { @ inheritDoc } */ @ Override public AnnotationTypeWriter getAnnotationTypeWriter ( TypeElement annotationType , TypeMirror prevType , TypeMirror nextType ) { } }
return new AnnotationTypeWriterImpl ( configuration , annotationType , prevType , nextType ) ;
public class ResourceFinder { /** * Reads the contents of the found URLs as a list of { @ link String } ' s and returns them . * @ param uri * @ return a list of the content of each resource URL found * @ throws IOException if any of the found URLs are unable to be read . */ public List < String > findAllStrings ...
String fulluri = path + uri ; List < String > strings = new ArrayList < > ( ) ; Enumeration < URL > resources = getResources ( fulluri ) ; while ( resources . hasMoreElements ( ) ) { URL url = resources . nextElement ( ) ; String string = readContents ( url ) ; strings . add ( string ) ; } return strings ;
public class AfplibFactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public String convertPPORGObjTypeToString ( EDataType eDataType , Object instanceValue ) { } }
return instanceValue == null ? null : instanceValue . toString ( ) ;
public class Uploader { /** * Test this class by uploading the given file three times . First , with the * provided credentials , as an InputStream . Second , with the provided * credentials , as a File . Third , with bogus credentials , as a File . */ public static void main ( String [ ] args ) { } }
try { if ( args . length == 5 || args . length == 6 ) { String protocol = args [ 0 ] ; int port = Integer . parseInt ( args [ 1 ] ) ; String user = args [ 2 ] ; String password = args [ 3 ] ; String fileName = args [ 4 ] ; String context = Constants . FEDORA_DEFAULT_APP_CONTEXT ; if ( args . length == 6 && ! args [ 5 ]...
public class SvnWorkspaceProviderImpl { /** * Deletes all of the Directories in root that match the FileFilter * @ param root * @ param filter */ private static void deleteUserDirectories ( final File root , final FileFilter filter ) { } }
final File [ ] dirs = root . listFiles ( filter ) ; LOGGER . info ( "Identified (" + dirs . length + ") directories to delete" ) ; for ( final File dir : dirs ) { LOGGER . info ( "Deleting " + dir ) ; if ( ! FileUtils . deleteQuietly ( dir ) ) { LOGGER . info ( "Failed to delete directory " + dir ) ; } }
public class BinaryValue { /** * Create a BinaryValue containing a copy of the supplied string * encoded using the supplied Charset . * @ param data the data to copy * @ param charset the charset to use for encoding * @ return a new { @ code BinaryValue } */ public static BinaryValue create ( String data , Char...
byte [ ] bytes = null ; if ( data != null ) { bytes = data . getBytes ( charset ) ; } return new BinaryValue ( bytes ) ;
public class CPDefinitionVirtualSettingModelImpl { /** * Converts the soap model instances into normal model instances . * @ param soapModels the soap model instances to convert * @ return the normal model instances */ public static List < CPDefinitionVirtualSetting > toModels ( CPDefinitionVirtualSettingSoap [ ] s...
if ( soapModels == null ) { return null ; } List < CPDefinitionVirtualSetting > models = new ArrayList < CPDefinitionVirtualSetting > ( soapModels . length ) ; for ( CPDefinitionVirtualSettingSoap soapModel : soapModels ) { models . add ( toModel ( soapModel ) ) ; } return models ;
public class WsFederationResponseValidator { /** * Validate ws federation authentication request event . * @ param context the context */ public void validateWsFederationAuthenticationRequest ( final RequestContext context ) { } }
val service = wsFederationCookieManager . retrieve ( context ) ; LOGGER . debug ( "Retrieved service [{}] from the session cookie" , service ) ; val request = WebUtils . getHttpServletRequestFromExternalWebflowContext ( context ) ; val wResult = request . getParameter ( WRESULT ) ; LOGGER . debug ( "Parameter [{}] rece...
public class IntHashSet { /** * { @ inheritDoc } */ @ SuppressWarnings ( "unchecked" ) public < T > T [ ] toArray ( final T [ ] a ) { } }
final Class < ? > componentType = a . getClass ( ) . getComponentType ( ) ; if ( ! componentType . isAssignableFrom ( Integer . class ) ) { throw new ArrayStoreException ( "cannot store Integers in array of type " + componentType ) ; } @ DoNotSub final int size = size ( ) ; final T [ ] arrayCopy = a . length >= size ? ...
public class JCudnn { /** * Fused conv / bias / activation operation : y = Act ( alpha1 * conv ( x ) + alpha2 * z + bias ) */ public static int cudnnConvolutionBiasActivationForward ( cudnnHandle handle , Pointer alpha1 , cudnnTensorDescriptor xDesc , Pointer x , cudnnFilterDescriptor wDesc , Pointer w , cudnnConvoluti...
return checkResult ( cudnnConvolutionBiasActivationForwardNative ( handle , alpha1 , xDesc , x , wDesc , w , convDesc , algo , workSpace , workSpaceSizeInBytes , alpha2 , zDesc , z , biasDesc , bias , activationDesc , yDesc , y ) ) ;
public class TwoPhaseCommitSinkFunction { /** * Enables logging of warnings if a transaction ' s elapsed time reaches a specified ratio of * the < code > transactionTimeout < / code > . * If < code > warningRatio < / code > is 0 , a warning will be always logged when committing the * transaction . * @ param war...
checkArgument ( warningRatio >= 0 && warningRatio <= 1 , "warningRatio must be in range [0,1]" ) ; this . transactionTimeoutWarningRatio = warningRatio ; return this ;
public class FlowTriggerScheduler { /** * Unschedule all possible flows in a project */ public void unschedule ( final Project project ) throws SchedulerException { } }
for ( final Flow flow : project . getFlows ( ) ) { if ( ! flow . isEmbeddedFlow ( ) ) { try { if ( this . scheduler . unscheduleJob ( FlowTriggerQuartzJob . JOB_NAME , generateGroupName ( flow ) ) ) { logger . info ( "Flow {}.{} unregistered from scheduler" , project . getName ( ) , flow . getId ( ) ) ; } } catch ( fin...
public class FastdfsService { /** * 下载文件 * @ param fullFilename 文件路径 * @ return */ public byte [ ] downLoadFile ( String fullFilename ) { } }
byte [ ] data = null ; TrackerServer trackerServer = null ; StorageClient1 storageClient1 = null ; try { trackerServer = fastDfsClientPool . borrowObject ( ) ; storageClient1 = new StorageClient1 ( trackerServer , null ) ; data = storageClient1 . downloadFile1 ( fullFilename ) ; } catch ( Exception e ) { throw Lang . m...
public class StreamProjection { /** * Projects a { @ link Tuple } { @ link DataStream } to the previously selected fields . * @ return The projected DataStream . * @ see Tuple * @ see DataStream */ public < T0 , T1 , T2 , T3 , T4 , T5 > SingleOutputStreamOperator < Tuple6 < T0 , T1 , T2 , T3 , T4 , T5 > > project...
TypeInformation < ? > [ ] fTypes = extractFieldTypes ( fieldIndexes , dataStream . getType ( ) ) ; TupleTypeInfo < Tuple6 < T0 , T1 , T2 , T3 , T4 , T5 > > tType = new TupleTypeInfo < Tuple6 < T0 , T1 , T2 , T3 , T4 , T5 > > ( fTypes ) ; return dataStream . transform ( "Projection" , tType , new StreamProject < IN , Tu...
public class GenomicsUtils { /** * Gets the ReferenceSetId for a given readGroupSetId using the Genomics API . * @ param readGroupSetId The id of the readGroupSet to query . * @ param auth The OfflineAuth for the API request . * @ return The referenceSetId for the redGroupSet ( which may be null ) . * @ throws ...
Genomics genomics = GenomicsFactory . builder ( ) . build ( ) . fromOfflineAuth ( auth ) ; ReadGroupSet readGroupSet = genomics . readgroupsets ( ) . get ( readGroupSetId ) . setFields ( "referenceSetId" ) . execute ( ) ; return readGroupSet . getReferenceSetId ( ) ;
public class AWSCostExplorerClient { /** * Retrieves a forecast for how much Amazon Web Services predicts that you will spend over the forecast time period * that you select , based on your past costs . * @ param getCostForecastRequest * @ return Result of the GetCostForecast operation returned by the service . ...
request = beforeClientExecution ( request ) ; return executeGetCostForecast ( request ) ;
public class DelegatedClientFactory { /** * Build set of clients configured . * @ return the set */ public Set < BaseClient > build ( ) { } }
val clients = new LinkedHashSet < BaseClient > ( ) ; configureCasClient ( clients ) ; configureFacebookClient ( clients ) ; configureOidcClient ( clients ) ; configureOAuth20Client ( clients ) ; configureSamlClient ( clients ) ; configureTwitterClient ( clients ) ; configureDropBoxClient ( clients ) ; configureFoursqua...
public class ExchangeUtils { /** * Copies variables from Camel into the process engine . * This method will conditionally copy the Camel body to the " camelBody " * variable if it is of type java . lang . String , OR it will copy the Camel * body to individual variables within the process engine if it is of type ...
Map < String , Object > processVariables = new HashMap < String , Object > ( ) ; Object camelBody = exchange . getIn ( ) . getBody ( ) ; if ( camelBody instanceof String ) { // If the COPY _ MESSAGE _ BODY _ AS _ PROCESS _ VARIABLE _ PARAMETER was passed // the value of it // is taken as variable to store the ( string ...
public class InternalPureXbaseParser { /** * $ ANTLR start synpred1 _ InternalPureXbase */ public final void synpred1_InternalPureXbase_fragment ( ) throws RecognitionException { } }
// InternalPureXbase . g : 307:6 : ( ' catch ' | ' finally ' ) // InternalPureXbase . g : { if ( input . LA ( 1 ) == 17 || input . LA ( 1 ) == 81 ) { input . consume ( ) ; state . errorRecovery = false ; state . failed = false ; } else { if ( state . backtracking > 0 ) { state . failed = true ; return ; } MismatchedSet...
public class FileIoUtil { /** * Trys to read a properties file . * Returns null if properties file could not be loaded * @ param _ file * @ return Properties Object or null */ public static Properties readProperties ( File _file ) { } }
if ( _file . exists ( ) ) { try { return readProperties ( new FileInputStream ( _file ) ) ; } catch ( FileNotFoundException _ex ) { LOGGER . info ( "Could not load properties file: " + _file , _ex ) ; } } return null ;
public class Cryptor { /** * an encrypt method that takes a byte - array for input and returns an encrypted byte - array */ public static byte [ ] encrypt ( byte [ ] input , String key , String algorithm , byte [ ] ivOrSalt , int iterations ) throws PageException { } }
return crypt ( input , key , algorithm , ivOrSalt , iterations , false ) ;
public class HttpRequestMessageImpl { /** * Parse the scheme marker out of the input data and then start the parse * for the next section . If any errors are encountered , then an exception * is thrown . * @ param data * @ throws IllegalArgumentException */ private void parseScheme ( byte [ ] data ) { } }
// we know the first character is correct , find the colon for ( int i = 1 ; i < data . length ; i ++ ) { if ( ':' == data [ i ] ) { SchemeValues val = SchemeValues . match ( data , 0 , i ) ; if ( null == val ) { throw new IllegalArgumentException ( "Invalid scheme inside URL: " + GenericUtils . getEnglishString ( data...
public class SelPrefWordsiMain { /** * { @ inheritDoc } */ protected DependencyContextGenerator getContextGenerator ( ) { } }
StructuredVectorSpace svs = SerializableUtil . load ( new File ( argOptions . getStringOption ( 'l' ) ) ) ; return new SelPrefDependencyContextGenerator ( svs ) ;
public class Base64 { /** * Very low - level access to decoding ASCII characters in * the form of a byte array . * @ param source the Base64 encoded data * @ param off the offset of where to begin decoding * @ param len the length of characters to decode * @ return decoded data */ public final byte [ ] decode...
int len34 = len * 3 / 4 ; byte [ ] outBuff = new byte [ len34 ] ; // upper limit on size of output int outBuffPosn = 0 ; byte [ ] b4 = new byte [ 4 ] ; int b4Posn = 0 ; int i = 0 ; byte sbiCrop = 0 ; byte sbiDecode = 0 ; for ( i = off ; i < off + len ; i ++ ) { sbiCrop = ( byte ) ( source [ i ] & 0x7f ) ; // only the l...
public class AbstractAmazonSNSAsync { /** * Simplified method form for invoking the RemovePermission operation with an AsyncHandler . * @ see # removePermissionAsync ( RemovePermissionRequest , com . amazonaws . handlers . AsyncHandler ) */ @ Override public java . util . concurrent . Future < RemovePermissionResult ...
return removePermissionAsync ( new RemovePermissionRequest ( ) . withTopicArn ( topicArn ) . withLabel ( label ) , asyncHandler ) ;
public class CmsSystemConfiguration { /** * Sets the configured login manager . < p > * @ param maxBadAttemptsStr the number of allowed bad login attempts * @ param disableMinutesStr the time an account gets locked if to many bad logins are attempted * @ param enableSecurityStr flag to determine if the security o...
int disableMinutes ; try { disableMinutes = Integer . valueOf ( disableMinutesStr ) . intValue ( ) ; } catch ( NumberFormatException e ) { disableMinutes = CmsLoginManager . DISABLE_MINUTES_DEFAULT ; } int maxBadAttempts ; try { maxBadAttempts = Integer . valueOf ( maxBadAttemptsStr ) . intValue ( ) ; } catch ( NumberF...
public class DB { /** * Log simple assertion . * @ param callInfo Call info . * @ param sa Simple assertion . */ void log ( CallInfo callInfo , SimpleAssertion sa ) { } }
if ( isEnabled ( Option . LOG_ASSERTIONS ) || ( ! sa . passed ( ) && isEnabled ( Option . LOG_ASSERTION_ERRORS ) ) ) { log . write ( callInfo , sa ) ; }
public class MemoryStore { /** * { @ inheritDoc } */ @ Override public void save ( T item ) { } }
Serializable idValue = getOrGenerateIdValue ( item ) ; save ( idValue , item ) ;
public class FractionNumber { /** * 分母の指定した桁以降の値を取得する 。 * @ param digit 1から始まる * @ return 存在しない桁の場合は空文字を返す 。 */ public String getDenominatorPartAfter ( final int digit ) { } }
final int length = denominatorPart . length ( ) ; if ( length < digit || digit <= 0 ) { return "" ; } return denominatorPart . substring ( 0 , ( length - digit + 1 ) ) ;