signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class MainApplication { /** * Set this property in the user ' s property area . * @ param strLanguage The language code . */ public void setLanguage ( String strLanguage ) { } }
Record recUserInfo = ( Record ) this . getUserInfo ( ) ; if ( recUserInfo != null ) { boolean flag = recUserInfo . getField ( UserInfoModel . PROPERTIES ) . isModified ( ) ; boolean [ ] brgEnabled = recUserInfo . getField ( UserInfoModel . PROPERTIES ) . setEnableListeners ( false ) ; ( ( PropertiesField ) recUserInfo ...
public class CommerceOrderUtil { /** * Returns the first commerce order in the ordered set where billingAddressId = & # 63 ; . * @ param billingAddressId the billing address ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the first matching comm...
return getPersistence ( ) . fetchByBillingAddressId_First ( billingAddressId , orderByComparator ) ;
public class BaseKvDao { /** * { @ inheritDoc } */ @ Override public void put ( String spaceId , String key , byte [ ] value ) throws IOException { } }
kvStorage . put ( spaceId , key , value , new IPutCallback < byte [ ] > ( ) { @ Override public void onSuccess ( String spaceId , String key , byte [ ] entry ) { // invalidate cache upon successful deletion invalidateCacheEntry ( spaceId , key , entry ) ; } @ Override public void onError ( String spaceId , String key ,...
public class JMSBridgeList { /** * This update the table itens for the source - context and target - context attributes * The source item may be the user selectable item or the default ( the first ) . */ private void updatePropertiesData ( Property bridge ) { } }
Property selectedItem = getSelectedEntity ( ) ; if ( bridge != null ) { selectedItem = bridge ; } if ( selectedItem != null ) { ModelNode sourceContextNode = selectedItem . getValue ( ) . get ( "source-context" ) ; ModelNode targetContextNode = selectedItem . getValue ( ) . get ( "target-context" ) ; sourceContextEdito...
public class DataIO { /** * Converts hexadecimal string into binary data * @ param s hexadecimal string * @ return binary data * @ throws NumberFormatException in case of string format error */ public static byte [ ] fromHexa ( String s ) { } }
byte [ ] ret = new byte [ s . length ( ) / 2 ] ; for ( int i = 0 ; i < ret . length ; i ++ ) { ret [ i ] = ( byte ) Integer . parseInt ( s . substring ( i * 2 , i * 2 + 2 ) , 16 ) ; } return ret ;
public class GalenJsApi { /** * Needed for Javascript based tests * @ throws IOException */ public static LayoutReport checkLayout ( WebDriver driver , String fileName , String [ ] includedTags , String [ ] excludedTags , String sectionNameFilter , Properties properties , String screenshotFilePath , JsVariable [ ] va...
TestSession session = TestSession . current ( ) ; if ( session == null ) { throw new UnregisteredTestSession ( "Cannot check layout as there was no TestSession created" ) ; } TestReport report = session . getReport ( ) ; File screenshotFile = null ; if ( screenshotFilePath != null ) { screenshotFile = new File ( screen...
public class AbstractStoreConfigurationBuilder { /** * { @ inheritDoc } */ @ Override public S shared ( boolean b ) { } }
attributes . attribute ( SHARED ) . set ( b ) ; shared = b ; return self ( ) ;
public class GenericUtils { /** * Debug print the entire input byte [ ] . This will be a sequence of 16 byte * lines , starting with a line indicator , the hex bytes and then the ASCII * representation . * @ param data * @ return String */ static public String getHexDump ( byte [ ] data ) { } }
return ( null == data ) ? null : getHexDump ( data , data . length ) ;
public class Spread { /** * Calculates the Spread metric . * @ param front The front . * @ param referenceFront The true pareto front . */ public double spread ( Front front , Front referenceFront ) { } }
PointDistance distance = new EuclideanDistance ( ) ; // STEP 1 . Sort normalizedFront and normalizedParetoFront ; front . sort ( new LexicographicalPointComparator ( ) ) ; referenceFront . sort ( new LexicographicalPointComparator ( ) ) ; // STEP 2 . Compute df and dl ( See specifications in Deb ' s description of the ...
public class AbstractScalaxbMojo { /** * Returns a map of URIs to package name , as specified by the packageNames * parameter . */ Map < String , String > packageNameMap ( ) { } }
if ( packageNames == null ) { return emptyMap ( ) ; } Map < String , String > names = new LinkedHashMap < String , String > ( ) ; for ( PackageName name : packageNames ) { names . put ( name . getUri ( ) , name . getPackage ( ) ) ; } return names ;
public class XFunctionTypeRefImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public NotificationChain eInverseRemove ( InternalEObject otherEnd , int featureID , NotificationChain msgs ) { } }
switch ( featureID ) { case XtypePackage . XFUNCTION_TYPE_REF__PARAM_TYPES : return ( ( InternalEList < ? > ) getParamTypes ( ) ) . basicRemove ( otherEnd , msgs ) ; case XtypePackage . XFUNCTION_TYPE_REF__RETURN_TYPE : return basicSetReturnType ( null , msgs ) ; } return super . eInverseRemove ( otherEnd , featureID ,...
public class PathHelper { /** * Transform path from relative oldBase to newBase . * If oldBase = / a / b and newBase = / q / w / e then path / a / b / c / d will * transform to / q / w / e / c / d * @ param oldBase * @ param newBase * @ param path * @ return */ public static final Path transform ( Path oldB...
if ( ! path . startsWith ( oldBase ) ) { throw new IllegalArgumentException ( path + " not in " + oldBase ) ; } return newBase . resolve ( oldBase . relativize ( path ) ) ;
public class Page { /** * Loads the content of this page from a fetched HttpEntity . * @ param entity HttpEntity * @ param maxBytes The maximum number of bytes to read * @ throws IOException when load fails */ public void load ( HttpEntity entity , int maxBytes ) throws IOException { } }
contentType = null ; Header type = entity . getContentType ( ) ; if ( type != null ) { contentType = type . getValue ( ) ; } contentEncoding = null ; Header encoding = entity . getContentEncoding ( ) ; if ( encoding != null ) { contentEncoding = encoding . getValue ( ) ; } Charset charset ; try { charset = ContentType ...
public class SkippingState { /** * { @ inheritDoc } */ public DecodingState decode ( IoBuffer in , ProtocolDecoderOutput out ) throws Exception { } }
int beginPos = in . position ( ) ; int limit = in . limit ( ) ; for ( int i = beginPos ; i < limit ; i ++ ) { byte b = in . get ( i ) ; if ( ! canSkip ( b ) ) { in . position ( i ) ; int answer = this . skippedBytes ; this . skippedBytes = 0 ; return finishDecode ( answer ) ; } skippedBytes ++ ; } in . position ( limit...
public class TranscoderDB { /** * / * decorator _ names */ public static int decoratorNames ( int ecflags , byte [ ] [ ] decorators ) { } }
switch ( ecflags & NEWLINE_DECORATOR_MASK ) { case UNIVERSAL_NEWLINE_DECORATOR : case CRLF_NEWLINE_DECORATOR : case CR_NEWLINE_DECORATOR : case 0 : break ; default : return - 1 ; } if ( ( ( ecflags & XML_TEXT_DECORATOR ) != 0 ) && ( ( ecflags & XML_ATTR_CONTENT_DECORATOR ) != 0 ) ) return - 1 ; int numDecorators = 0 ; ...
public class Surface { /** * Fills the specified rectangle . */ public Surface fillRect ( float x , float y , float width , float height ) { } }
if ( patternTex != null ) { batch . addQuad ( patternTex , tint , tx ( ) , x , y , width , height ) ; } else { batch . addQuad ( colorTex , Tint . combine ( fillColor , tint ) , tx ( ) , x , y , width , height ) ; } return this ;
public class BranchFilterModule { /** * Modify and filter topics for branches . These files use an existing file name . */ private void filterTopics ( final Element topicref , final List < FilterUtils > filters ) { } }
final List < FilterUtils > fs = combineFilterUtils ( topicref , filters ) ; final String href = topicref . getAttribute ( ATTRIBUTE_NAME_HREF ) ; final Attr skipFilter = topicref . getAttributeNode ( SKIP_FILTER ) ; final URI srcAbsUri = job . tempDirURI . resolve ( map . resolve ( href ) ) ; if ( ! fs . isEmpty ( ) &&...
public class AmazonNeptuneClient { /** * Creates a new DB cluster from a DB snapshot or DB cluster snapshot . * If a DB snapshot is specified , the target DB cluster is created from the source DB snapshot with a default * configuration and default security group . * If a DB cluster snapshot is specified , the tar...
request = beforeClientExecution ( request ) ; return executeRestoreDBClusterFromSnapshot ( request ) ;
public class ProtobufIDLGenerator { /** * get IDL content from class . * @ param cls target class to parse for IDL message . * @ param cachedTypes if type already in set will not generate IDL . if a new type found will add to set * @ param cachedEnumTypes if enum already in set will not generate IDL . if a new en...
Ignore ignore = cls . getAnnotation ( Ignore . class ) ; if ( ignore != null ) { LOGGER . info ( "class '{}' marked as @Ignore annotation, create IDL ignored." , cls . getName ( ) ) ; return null ; } Set < Class < ? > > types = cachedTypes ; if ( types == null ) { types = new HashSet < Class < ? > > ( ) ; } Set < Class...
public class AndroidLogProvider { @ Override public void w ( String tag , String message ) { } }
Log . w ( tag , message ) ; // writeToFile ( Level . WARNING , tag , message ) ; // sendLogs ( " w " , tag , message ) ;
public class IntersectionImpl { /** * Construct a new Intersection target on the java heap . * @ param seed < a href = " { @ docRoot } / resources / dictionary . html # seed " > See Seed < / a > * @ return a new IntersectionImpl on the Java heap */ static IntersectionImpl initNewHeapInstance ( final long seed ) { }...
final IntersectionImpl impl = new IntersectionImpl ( null , seed , false ) ; impl . lgArrLongs_ = 0 ; impl . curCount_ = - 1 ; // Universal Set is true impl . thetaLong_ = Long . MAX_VALUE ; impl . empty_ = false ; // A virgin intersection represents the Universal Set so empty is FALSE ! impl . hashTable_ = null ; retu...
public class EntityDataModelUtil { /** * Gets the OData type for a Java type and checks if the OData type is a complex type ; throws an exception if the * OData type is not a complex type . * @ param entityDataModel The entity data model . * @ param javaType The Java type . * @ return The OData complex type for...
return checkIsComplexType ( getAndCheckType ( entityDataModel , javaType ) ) ;
public class IndexFile { /** * Get the content length of the given record in bytes , not 16 bit words . * @ param index * The index , from 0 to getRecordCount - 1 * @ return The lengh in bytes of the record . * @ throws java . io . IOException */ public int getContentLength ( int index ) throws IOException { } ...
int ret = - 1 ; if ( this . lastIndex != index ) { this . readRecord ( index ) ; } ret = this . recLen ; return ret ;
public class HashtableOnDisk { /** * Search disk for the indicated entry and return it and its * predecessor if any . */ private HashtableEntry findEntry ( EvictionTableEntry evt , int retrieveMode , long current , int tableid ) throws IOException , EOFException , FileManagerException , ClassNotFoundException , Hasht...
int hashcode = evt . hashcode ; long previous = 0 ; long next = 0 ; int hash = 0 ; initReadBuffer ( current ) ; next = headerin . readLong ( ) ; hash = headerin . readInt ( ) ; while ( current != 0 ) { // System . out . println ( " current : " + current + " next : " + next ) ; if ( hash == hashcode ) { // hash the same...
public class ImageUtils { /** * private static final ClassLoader loader = Thread . currentThread ( ) . getContextClassLoader ( ) ; */ public static Image load ( String path ) { } }
BufferedImage image = null ; try { InputStream in = ImageUtils . class . getClassLoader ( ) . getResourceAsStream ( path ) ; image = ImageIO . read ( in ) ; in . close ( ) ; } catch ( Exception e ) { throw new RuntimeException ( "Could not load image with path: " + path , e ) ; } return image ;
public class SSOSamlPostProfileHandlerController { /** * Handle SSO HEAD profile redirect request ( not allowed ) . * @ param response the response * @ param request the request */ @ RequestMapping ( path = SamlIdPConstants . ENDPOINT_SAML2_SSO_PROFILE_REDIRECT , method = { } }
RequestMethod . HEAD } ) public void handleSaml2ProfileSsoRedirectHeadRequest ( final HttpServletResponse response , final HttpServletRequest request ) { LOGGER . info ( "Endpoint [{}] called with HTTP HEAD returning 400 Bad Request" , SamlIdPConstants . ENDPOINT_SAML2_SSO_PROFILE_REDIRECT ) ; response . setStatus ( Ht...
public class TaskClient { /** * Retrieve pending tasks by type * @ param taskType Type of task * @ param startKey id of the task from where to return the results . NULL to start from the beginning . * @ param count number of tasks to retrieve * @ return Returns the list of PENDING tasks by type , starting with ...
Preconditions . checkArgument ( StringUtils . isNotBlank ( taskType ) , "Task type cannot be blank" ) ; Object [ ] params = new Object [ ] { "startKey" , startKey , "count" , count } ; return getForEntity ( "tasks/in_progress/{taskType}" , params , taskList , taskType ) ;
public class GoConfigFieldWriter { /** * TODO this is duplicated from magical cruiseconfig loader */ private void parseFields ( Element e , Object o ) { } }
for ( GoConfigFieldWriter field : new GoConfigClassWriter ( o . getClass ( ) , configCache , registry ) . getAllFields ( o ) ) { field . setValueIfNotNull ( e , o ) ; }
public class A_CmsListExplorerDialog { /** * Returns the show explorer flag . < p > * @ return the show explorer flag */ private boolean getShowExplorer ( ) { } }
if ( getParamShowexplorer ( ) != null ) { return Boolean . valueOf ( getParamShowexplorer ( ) ) . booleanValue ( ) ; } Map < ? , ? > dialogObject = ( Map < ? , ? > ) getSettings ( ) . getDialogObject ( ) ; if ( dialogObject == null ) { return false ; } Boolean storedParam = ( Boolean ) dialogObject . get ( getClass ( )...
public class MapBindTransformation { /** * / * ( non - Javadoc ) * @ see com . abubusoft . kripton . processor . bind . transform . BindTransform # generateSerializeOnJackson ( com . abubusoft . kripton . processor . bind . BindTypeContext , com . squareup . javapoet . MethodSpec . Builder , java . lang . String , co...
this . generateSerializeOnJacksonInternal ( context , methodBuilder , serializerName , beanClass , beanName , property , false ) ;
public class TextFormat { /** * Outputs a textual representation of the Protocol Message supplied into * the parameter output . ( This representation is the new version of the * classic " ProtocolPrinter " output from the original Protocol Buffer system ) */ public static void print ( final MessageOrBuilder message...
DEFAULT_PRINTER . print ( message , new TextGenerator ( output ) ) ;
public class MtasFieldsProducer { /** * ( non - Javadoc ) * @ see org . apache . lucene . index . Fields # terms ( java . lang . String ) */ @ Override public Terms terms ( String field ) throws IOException { } }
return new MtasTerms ( delegateFieldsProducer . terms ( field ) , indexInputList , indexInputOffsetList , version ) ;
public class IsoInterval { /** * / * [ deutsch ] * < p > Ermittelt , ob dieses Intervall sich mit dem angegebenen Intervall so & uuml ; berschneidet , da & szlig ; * mindestens ein gemeinsamer Zeitpunkt existiert . < / p > * @ param other another interval which might have an intersection with this interval * @ ...
if ( this . isEmpty ( ) || other . isEmpty ( ) ) { return false ; } boolean startALessEqEndB = ( this . getStart ( ) . isInfinite ( ) || other . getEnd ( ) . isInfinite ( ) ) ; if ( ! startALessEqEndB ) { T startA = this . getClosedFiniteStart ( ) ; if ( other . getEnd ( ) . isOpen ( ) ) { startALessEqEndB = startA . i...
public class WrappingUtils { /** * Finds the immediate parent of a leaf drawable . */ static DrawableParent findDrawableParentForLeaf ( DrawableParent parent ) { } }
while ( true ) { Drawable child = parent . getDrawable ( ) ; if ( child == parent || ! ( child instanceof DrawableParent ) ) { break ; } parent = ( DrawableParent ) child ; } return parent ;
public class AbstractExecutor { /** * { @ inheritDoc } */ @ Override public void execute ( ExecutionContext executionContext ) { } }
initialize ( ) ; try { failOnInvalidContext ( executionContext ) ; establishFacts ( executionContext . getFacts ( ) ) ; goSteps ( executionContext . getSteps ( ) ) ; expectResults ( executionContext . getResults ( ) ) ; } finally { shutdown ( ) ; }
public class MP3FileID3Controller { /** * Set the year of this mp3. * @ param year of the mp3 */ public void setYear ( String year , int type ) { } }
if ( allow ( type & ID3V1 ) ) { id3v1 . setYear ( year ) ; } if ( allow ( type & ID3V2 ) ) { id3v2 . setTextFrame ( ID3v2Frames . YEAR , year ) ; }
public class FacesConfigRenderKitTypeImpl { /** * Returns all < code > client - behavior - renderer < / code > elements * @ return list of < code > client - behavior - renderer < / code > */ public List < FacesConfigClientBehaviorRendererType < FacesConfigRenderKitType < T > > > getAllClientBehaviorRenderer ( ) { } }
List < FacesConfigClientBehaviorRendererType < FacesConfigRenderKitType < T > > > list = new ArrayList < FacesConfigClientBehaviorRendererType < FacesConfigRenderKitType < T > > > ( ) ; List < Node > nodeList = childNode . get ( "client-behavior-renderer" ) ; for ( Node node : nodeList ) { FacesConfigClientBehaviorRend...
public class AddressClient { /** * Deletes the specified address resource . * < p > Sample code : * < pre > < code > * try ( AddressClient addressClient = AddressClient . create ( ) ) { * ProjectRegionAddressName address = ProjectRegionAddressName . of ( " [ PROJECT ] " , " [ REGION ] " , " [ ADDRESS ] " ) ; ...
DeleteAddressHttpRequest request = DeleteAddressHttpRequest . newBuilder ( ) . setAddress ( address == null ? null : address . toString ( ) ) . build ( ) ; return deleteAddress ( request ) ;
public class DatabaseServiceRamp { /** * Starts a map call on the local node . * @ param sql the select query for the search * @ param result callback for the result iterator * @ param args arguments to the sql */ @ Override public void map ( MethodRef method , String sql , Object ... args ) { } }
_kraken . map ( method , sql , args ) ;
public class JSLocalConsumerPoint { /** * Set the consumerSession ' s recoverability */ private void setBaseRecoverability ( Reliability unrecoverableReliability ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setBaseRecoverability" , new Object [ ] { this , unrecoverableReliability } ) ; setUnrecoverability ( unrecoverableReliability ) ; _baseUnrecoverableOptions = _unrecoverableOptions ; if ( TraceComponent . isAnyTracingEnable...
public class JmxClient { /** * Return an array of the operations associated with the bean name . */ public MBeanOperationInfo [ ] getOperationsInfo ( String domainName , String beanName ) throws JMException { } }
return getOperationsInfo ( ObjectNameUtil . makeObjectName ( domainName , beanName ) ) ;
public class CacheProviderWrapper { /** * PM21179 */ @ Override public void clearMemory ( boolean clearDisk ) { } }
final String methodName = "clearDisk" ; if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , methodName + " cacheName=" + cacheName + " ERROR because it should not be called" ) ; }
public class WSJobOperatorImpl { /** * @ param appName * @ param jobXMLName * @ return newly created JobInstance ( Note : job instance must be started separately ) * Note : Inline JSL takes precedence over JSL within . war */ @ Override public WSJobInstance createJobInstance ( String appName , String jobXMLName ,...
if ( authService != null ) { authService . authorizedJobSubmission ( ) ; } return batchKernelService . createJobInstance ( appName , jobXMLName , batchSecurityHelper . getRunAsUser ( ) , jsl , correlationId ) ;
public class FilterFileSystem { /** * { @ inheritDoc } */ @ Override public void setTimes ( Path p , long mtime , long atime ) throws IOException { } }
fs . setTimes ( p , mtime , atime ) ;
public class HtmlTableRendererBase { /** * Renders everything inside the TBODY tag by iterating over the row objects * between offsets first and first + rows and applying the UIColumn components * to those objects . * This method is separated from the encodeChildren so that it can be overridden by * subclasses ...
UIData uiData = ( UIData ) component ; ResponseWriter writer = facesContext . getResponseWriter ( ) ; int rowCount = uiData . getRowCount ( ) ; int newspaperColumns = getNewspaperColumns ( component ) ; if ( rowCount == - 1 && newspaperColumns == 1 ) { encodeInnerHtmlUnknownRowCount ( facesContext , component ) ; retur...
public class XmlSchemaParser { /** * Scan XML for all message definitions and save in map * @ param document for the XML parsing * @ param xPath for XPath expression reuse * @ param typeByNameMap to use for Type objects * @ return { @ link java . util . Map } of schemaId to Message * @ throws Exception on par...
final Map < Long , Message > messageByIdMap = new HashMap < > ( ) ; final ObjectHashSet < String > distinctNames = new ObjectHashSet < > ( ) ; forEach ( ( NodeList ) xPath . compile ( MESSAGE_XPATH_EXPR ) . evaluate ( document , XPathConstants . NODESET ) , ( node ) -> addMessageWithIdCheck ( distinctNames , messageByI...
public class Base64 { /** * Encode this string as base64. * @ param string * @ return */ @ Deprecated public static byte [ ] encodeToBytes ( byte [ ] bytes ) { } }
try { char [ ] chars = Base64 . encode ( bytes ) ; String string = new String ( chars ) ; return string . getBytes ( DEFAULT_ENCODING ) ; } catch ( UnsupportedEncodingException e ) { e . printStackTrace ( ) ; return null ; }
public class ProcfsBasedProcessTree { /** * Get a dump of the process - tree . * @ return a string concatenating the dump of information of all the processes * in the process - tree */ public String getProcessTreeDump ( ) { } }
StringBuilder ret = new StringBuilder ( ) ; // The header . ret . append ( String . format ( "\t|- PID PPID PGRPID SESSID CMD_NAME " + "USER_MODE_TIME(MILLIS) SYSTEM_TIME(MILLIS) VMEM_USAGE(BYTES) " + "RSSMEM_USAGE(PAGES) FULL_CMD_LINE\n" ) ) ; for ( ProcessInfo p : processTree . values ( ) ) { if ( p != null ) { ret ....
public class DeclareTEI { /** * purposely inherit JavaDoc and semantics from TagExtraInfo */ @ Override public VariableInfo [ ] getVariableInfo ( TagData data ) { } }
// construct the relevant VariableInfo object VariableInfo id = new VariableInfo ( data . getAttributeString ( "id" ) , data . getAttributeString ( "type" ) == null ? "java.lang.Object" : data . getAttributeString ( "type" ) , true , VariableInfo . AT_END ) ; return new VariableInfo [ ] { id } ;
public class BeanProcessor { /** * Look for the method to create a new instance of the bean . If none are found or the bean is abstract or an interface , we considered it * as non instantiable . * @ param typeOracle the oracle * @ param logger logger * @ param beanType type to look for constructor * @ param b...
if ( isObjectOrSerializable ( beanType ) ) { return ; } Optional < JClassType > mixinClass = configuration . getMixInAnnotations ( beanType ) ; List < JClassType > accessors = new ArrayList < JClassType > ( ) ; if ( mixinClass . isPresent ( ) ) { accessors . add ( mixinClass . get ( ) ) ; } accessors . add ( beanType )...
public class JSR303ValidatorEngine { /** * Méthode d ' obtention de l ' instance de moteur de Validation * @ param validatorFactory Fabrique de valudateurs * @ return Instance de moteur de Validation */ public static synchronized JSR303ValidatorEngine getInstance ( ValidatorFactory validatorFactory ) { } }
// Si l ' instance est nulle if ( _instance == null ) _instance = new JSR303ValidatorEngine ( ) ; // On positionne la fabrique de validateur _instance . setValidatorFactory ( validatorFactory ) ; // On retourne l ' instance return _instance ;
public class A_CmsContextMenuItem { /** * Implements the hover over action for a item . < p > * First closes all sub menus that are not required anymore . * And then reopens the necessary sub menus and activates the selected item . < p > * @ param event the mouse over event */ protected void onHoverIn ( MouseOver...
if ( ( getParentMenu ( ) . getSelectedItem ( ) != null ) && ( getParentMenu ( ) . getSelectedItem ( ) != this ) && getParentMenu ( ) . getSelectedItem ( ) . hasSubmenu ( ) ) { getParentMenu ( ) . getSelectedItem ( ) . getSubMenu ( ) . onClose ( ) ; getParentMenu ( ) . getSelectedItem ( ) . deselectItem ( ) ; } if ( has...
public class JavascriptObject { /** * Invoke the specified JavaScript function in the JavaScript runtime . * @ param function The function to invoke * @ param args Any arguments to pass to the function * @ return The result of the function . */ protected Object invokeJavascript ( String function , Object ... args...
Object [ ] jsArgs = new Object [ args . length ] ; for ( int i = 0 ; i < jsArgs . length ; i ++ ) { if ( args [ i ] instanceof JavascriptObject ) { jsArgs [ i ] = ( ( JavascriptObject ) args [ i ] ) . getJSObject ( ) ; } else if ( args [ i ] instanceof JavascriptEnum ) { jsArgs [ i ] = ( ( JavascriptEnum ) args [ i ] )...
public class SchemaImpl { /** * Gets a mode with the given name from the mode map . * If not present then it creates a new mode extending the default base mode . * @ param name The mode to look for or create if it does not exist . * @ return Always a not null mode . */ private Mode lookupCreateMode ( String name ...
if ( name == null ) return null ; name = name . trim ( ) ; Mode mode = ( Mode ) modeMap . get ( name ) ; if ( mode == null ) { mode = new Mode ( name , defaultBaseMode ) ; modeMap . put ( name , mode ) ; } return mode ;
public class GeometryRendererImpl { public void onTentativeMove ( GeometryEditTentativeMoveEvent event ) { } }
try { Coordinate [ ] vertices = editingService . getIndexService ( ) . getSiblingVertices ( editingService . getGeometry ( ) , editingService . getInsertIndex ( ) ) ; String geometryType = editingService . getIndexService ( ) . getGeometryType ( editingService . getGeometry ( ) , editingService . getInsertIndex ( ) ) ;...
public class CommerceShippingFixedOptionRelLocalServiceBaseImpl { /** * Returns the number of rows matching the dynamic query . * @ param dynamicQuery the dynamic query * @ param projection the projection to apply to the query * @ return the number of rows matching the dynamic query */ @ Override public long dyna...
return commerceShippingFixedOptionRelPersistence . countWithDynamicQuery ( dynamicQuery , projection ) ;
public class TaskConfig { /** * Given the registration domain in the job , and the default registration domain for the agent , * figure out what domain we should actually register the job in . * @ return The full registration domain . */ private String fullyQualifiedRegistrationDomain ( ) { } }
if ( job . getRegistrationDomain ( ) . endsWith ( "." ) ) { return job . getRegistrationDomain ( ) ; } else if ( "" . equals ( job . getRegistrationDomain ( ) ) ) { return defaultRegistrationDomain ; } else { return job . getRegistrationDomain ( ) + "." + defaultRegistrationDomain ; }
public class CliUtils { /** * Executes the specified command line and blocks until the process has finished . The output of * the process is captured , returned , as well as logged with info ( stdout ) and error ( stderr ) * level , respectively . * @ param cli * the command line * @ param loggerName * the ...
try { String cliString = CommandLineUtils . toString ( cli . getShellCommandline ( ) ) ; LOGGER . info ( "Executing command-line: {}" , cliString ) ; LoggingStreamConsumer out = new LoggingStreamConsumer ( loggerName , logMessagePrefix , false ) ; LoggingStreamConsumer err = new LoggingStreamConsumer ( loggerName , log...
public class PeerUtil { /** * Creates a proxy object implementing the specified provider interface ( a subinterface of * { @ link InvocationProvider } that forwards requests to the given service implementation * ( a subinterface of { @ link InvocationService } corresponding to the provider interface ) * on the sp...
return clazz . cast ( Proxy . newProxyInstance ( clazz . getClassLoader ( ) , new Class < ? > [ ] { clazz } , new InvocationHandler ( ) { public Object invoke ( Object proxy , Method method , Object [ ] args ) throws Throwable { Method smethod = _pmethods . get ( method ) ; if ( smethod == null ) { Class < ? > [ ] ptyp...
public class BeanPropertyPathExtension { /** * Emits a bean and its parent beans before if needed . * Returns the list of beans that were emitted . */ private static Set < TsBeanModel > writeBeanAndParentsFieldSpecs ( Writer writer , Settings settings , TsModel model , Set < TsBeanModel > emittedSoFar , TsBeanModel b...
if ( emittedSoFar . contains ( bean ) ) { return new HashSet < > ( ) ; } final TsBeanModel parentBean = getBeanModelByType ( model , bean . getParent ( ) ) ; final Set < TsBeanModel > emittedBeans = parentBean != null ? writeBeanAndParentsFieldSpecs ( writer , settings , model , emittedSoFar , parentBean ) : new HashSe...
public class WorkflowServiceImpl { /** * Lists workflows for the given correlation id . * @ param name Name of the workflow . * @ param includeClosed CorrelationID of the workflow you want to start . * @ param includeTasks IncludeClosed workflow which are not running . * @ param correlationIds Includes tasks as...
Map < String , List < Workflow > > workflowMap = new HashMap < > ( ) ; for ( String correlationId : correlationIds ) { List < Workflow > workflows = executionService . getWorkflowInstances ( name , correlationId , includeClosed , includeTasks ) ; workflowMap . put ( correlationId , workflows ) ; } return workflowMap ;
public class SoyListData { /** * Gets the data value at a given index . * @ param index The index . * @ return The data at the given index , or null of the index is undefined . */ @ Override public SoyData get ( int index ) { } }
try { return list . get ( index ) ; } catch ( IndexOutOfBoundsException ioobe ) { return null ; }
public class WebElementUtils { /** * Escapes characters incorrectly handled by { @ code WebElement . sendKeys } to workaround Selenium issue # 1723. * @ see WebElement # sendKeys ( CharSequence . . . ) * @ see < a href = " https : / / code . google . com / p / selenium / issues / detail ? id = 1723 " > Issue # 1723...
CharSequence [ ] escapedKeys = new CharSequence [ keys . length ] ; for ( int index = 0 ; index < keys . length ; index ++ ) { escapedKeys [ index ] = escapeKeys ( keys [ index ] ) ; } return escapedKeys ;
public class StringUtils { /** * Reads the contents of a file into a byte array . * @ param aFile The file from which to read * @ return The bytes read from the file * @ throws IOException If the supplied file could not be read in its entirety */ private static byte [ ] readBytes ( final File aFile ) throws IOExc...
final FileInputStream fileStream = new FileInputStream ( aFile ) ; final ByteBuffer buf = ByteBuffer . allocate ( ( int ) aFile . length ( ) ) ; final int read = fileStream . getChannel ( ) . read ( buf ) ; if ( read != aFile . length ( ) ) { fileStream . close ( ) ; throw new IOException ( LOGGER . getI18n ( MessageCo...
public class Behavior { /** * Add the name / value pair to the IBehaviorConsumer parent of the tag . * @ throws JspException if a JSP exception has occurred */ public void doTag ( ) throws JspException { } }
if ( hasErrors ( ) ) { reportErrors ( ) ; return ; } JspTag tag = SimpleTagSupport . findAncestorWithClass ( this , IBehaviorConsumer . class ) ; if ( tag == null ) { String s = Bundle . getString ( "Tags_BehaviorInvalidParent" ) ; registerTagError ( s , null ) ; reportErrors ( ) ; return ; } IBehaviorConsumer ac = ( I...
public class ModuleItem { /** * Return an array of children - synchronized ? */ public ModuleItem [ ] children ( ) { } }
if ( children == null ) return null ; ModuleItem [ ] members = new ModuleItem [ children . size ( ) ] ; children . values ( ) . toArray ( members ) ; return members ;
public class VFMCSMapper { /** * { @ inheritDoc } * @ param targetMolecule targetMolecule graph */ @ Override public boolean hasMap ( IAtomContainer targetMolecule ) { } }
IState state = new VFState ( query , new TargetProperties ( targetMolecule ) ) ; maps . clear ( ) ; return mapFirst ( state ) ;
public class FragmentBundlerCompat { /** * Constructs a FragmentBundlerCompat for the provided Fragment instance * @ param fragment the fragment instance * @ return this bundler instance to chain method calls */ public static < F extends Fragment > FragmentBundlerCompat < F > create ( F fragment ) { } }
return new FragmentBundlerCompat < F > ( fragment ) ;
public class OverrideService { /** * Update the response code for a given enabled override * @ param overrideId - override ID to update * @ param pathId - path ID to update * @ param ordinal - can be null , Index of the enabled override to edit if multiple of the same are enabled * @ param responseCode - respon...
if ( ordinal == null ) { ordinal = 1 ; } try { // get ID of the ordinal int enabledId = getEnabledEndpoint ( pathId , overrideId , ordinal , clientUUID ) . getId ( ) ; updateResponseCode ( enabledId , responseCode ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; }
public class ModuleExtensionNameProcessor { /** * { @ inheritDoc } */ public void undeploy ( final DeploymentUnit deploymentUnit ) { } }
final ExtensionInfo extensionInfo = deploymentUnit . getAttachment ( Attachments . EXTENSION_INFORMATION ) ; if ( extensionInfo == null ) { return ; } // we need to remove the extension on undeploy final ServiceController < ? > extensionIndexController = deploymentUnit . getServiceRegistry ( ) . getRequiredService ( Se...
public class ResponseImpl { /** * Get the header values for the given header name , if it exists . There can be more than one value * for a given header name . * @ param name the name of the header to get * @ return the values of the given header name */ public List < String > getHeader ( String name ) { } }
if ( headers == null ) { return null ; } return headers . values ( name ) ;
public class RegisteredServicesEndpoint { /** * Handle and produce a list of services from registry . * @ return the web async task */ @ ReadOperation ( produces = { } }
ActuatorMediaType . V2_JSON , "application/vnd.cas.services+yaml" , MediaType . APPLICATION_JSON_VALUE } ) public Collection < RegisteredService > handle ( ) { return this . servicesManager . load ( ) ;
public class MassToFormulaTool { /** * Put in order the elements of the molecular formula . * @ param formula The IMolecularFormula to put in order * @ return IMolecularFormula object */ private IMolecularFormula putInOrder ( IMolecularFormula formula ) { } }
IMolecularFormula new_formula = formula . getBuilder ( ) . newInstance ( IMolecularFormula . class ) ; for ( int i = 0 ; i < orderElements . length ; i ++ ) { IElement element = builder . newInstance ( IElement . class , orderElements [ i ] ) ; if ( MolecularFormulaManipulator . containsElement ( formula , element ) ) ...
public class TagVFilter { /** * Converts the tag map to a filter list . If a filter already exists for a * tag group by , then the duplicate is skipped . * @ param tags A set of tag keys and values . May be null or empty . * @ param filters A set of filters to add the converted filters to . This may * not be nu...
mapToFilters ( tags , filters , true ) ;
public class MultiStepGUI { /** * Main method that just spawns the UI . * @ param args command line parameters */ public static void main ( final String [ ] args ) { } }
GUIUtil . logUncaughtExceptions ( LOG ) ; GUIUtil . setLookAndFeel ( ) ; OutputStep . setDefaultHandlerVisualizer ( ) ; javax . swing . SwingUtilities . invokeLater ( new Runnable ( ) { @ Override public void run ( ) { try { final MultiStepGUI gui = new MultiStepGUI ( ) ; gui . run ( ) ; if ( args != null && args . len...
public class Math { /** * Returns the product of the arguments , * throwing an exception if the result overflows an { @ code int } . * @ param x the first value * @ param y the second value * @ return the result * @ throws ArithmeticException if the result overflows an int * @ since 1.8 */ public static int...
long r = ( long ) x * ( long ) y ; if ( ( int ) r != r ) { throw new ArithmeticException ( "integer overflow" ) ; } return ( int ) r ;
public class BaseClient { /** * Retrieve a user profile . * @ param credentials the credentials * @ param context the web context * @ return the user profile */ protected final Optional < UserProfile > retrieveUserProfile ( final C credentials , final WebContext context ) { } }
final Optional < UserProfile > profile = this . profileCreator . create ( credentials , context ) ; logger . debug ( "profile: {}" , profile ) ; return profile ;
public class RecordEnvelope { /** * Set the record metadata * @ param key key for the metadata * @ param value value of the metadata * @ implNote should not be called concurrently */ public void setRecordMetadata ( String key , Object value ) { } }
if ( _recordMetadata == null ) { _recordMetadata = new HashMap < > ( ) ; } _recordMetadata . put ( key , value ) ;
public class VariablesInner { /** * Retrieve a list of variables . * @ param resourceGroupName Name of an Azure Resource group . * @ param automationAccountName The name of the automation account . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the Page...
return listByAutomationAccountWithServiceResponseAsync ( resourceGroupName , automationAccountName ) . map ( new Func1 < ServiceResponse < Page < VariableInner > > , Page < VariableInner > > ( ) { @ Override public Page < VariableInner > call ( ServiceResponse < Page < VariableInner > > response ) { return response . b...
public class Vertex { /** * 创建一个标点符号实例 * @ param realWord 标点符号对应的真实字串 * @ return 标点符号顶点 */ public static Vertex newPunctuationInstance ( String realWord ) { } }
return new Vertex ( realWord , new CoreDictionary . Attribute ( Nature . w , 1000 ) ) ;
public class CmsModuleRow { /** * Gets the name of the module . < p > * @ return the module name */ @ Column ( header = Messages . GUI_MODULES_HEADER_NAME_0 , styleName = OpenCmsTheme . HOVER_COLUMN , width = 350 , order = 10 ) public String getName ( ) { } }
return m_module . getName ( ) ;
public class Criteria { /** * Crates new { @ link Predicate } without any wildcards . Strings with blanks will be escaped * { @ code " string \ with \ blank " } * @ param o * @ return */ public Criteria is ( @ Nullable Object o ) { } }
if ( o == null ) { return isNull ( ) ; } predicates . add ( new Predicate ( OperationKey . EQUALS , o ) ) ; return this ;
public class ListPopupWindow { /** * Dismiss the popup window . */ public void dismiss ( ) { } }
mPopup . dismiss ( ) ; removePromptView ( ) ; mPopup . setContentView ( null ) ; mDropDownList = null ; mHandler . removeCallbacks ( mResizePopupRunnable ) ;
public class UnicodeSet { /** * for internal use only , after checkFrozen has been called */ private final UnicodeSet add_unchecked ( int c ) { } }
if ( c < MIN_VALUE || c > MAX_VALUE ) { throw new IllegalArgumentException ( "Invalid code point U+" + Utility . hex ( c , 6 ) ) ; } // find smallest i such that c < list [ i ] // if odd , then it is IN the set // if even , then it is OUT of the set int i = findCodePoint ( c ) ; // already in set ? if ( ( i & 1 ) != 0 ...
public class CmsSitesWebserverThread { /** * Creates the new web server configuration files from the given template file . < p > * @ throws IOException if something goes wrong */ private void createAllWebserverConfigs ( ) throws IOException { } }
List < CmsSite > sites = OpenCms . getSiteManager ( ) . getAvailableSites ( getCms ( ) , true ) ; for ( CmsSite site : sites ) { if ( ( site . getSiteMatcher ( ) != null ) && site . isWebserver ( ) ) { String filename = m_targetPath + m_filePrefix + "_" + generateWebserverConfigName ( site . getSiteMatcher ( ) , "_" ) ...
public class LdapConnectionWrapper { /** * Formats the principal in username @ domain format or in a custom format if is specified in the config file . * If LDAP _ AUTH _ USERNAME _ FMT is configured to a non - empty value , the substring % s in this value will be replaced with the entered username . * The recommen...
if ( StringUtils . isNotBlank ( LDAP_AUTH_USERNAME_FMT ) ) { return String . format ( LDAP_AUTH_USERNAME_FMT , username ) ; } return username ;
public class Validation { /** * method to check the validation of the attachment * @ param listMonomersOne * List of Monomers of the source * @ param listMonomersTwo * List of Monomers of the target * @ param not * ConnectionNotation * @ param helm2notation * HELM2Notation object * @ param interconnec...
boolean specific = spec ; if ( listMonomersOne . size ( ) > 1 || listMonomersTwo . size ( ) > 1 ) { specific = false ; } for ( Monomer monomerOne : listMonomersOne ) { for ( Monomer monomerTwo : listMonomersTwo ) { if ( monomerOne . getCanSMILES ( ) . equals ( "*|X|N" ) || monomerTwo . getCanSMILES ( ) . equals ( "*|X|...
public class CompletableFuture { /** * Traverses stack and unlinks dead Completions . */ final void cleanStack ( ) { } }
for ( Completion p = null , q = stack ; q != null ; ) { Completion s = q . next ; if ( q . isLive ( ) ) { p = q ; q = s ; } else if ( p == null ) { casStack ( q , s ) ; q = stack ; } else { p . next = s ; if ( p . isLive ( ) ) q = s ; else { p = null ; // restart q = stack ; } } }
public class JaxWsHttpServletRequestAdapter { /** * ( non - Javadoc ) * @ see javax . servlet . ServletRequest # getParameterMap ( ) */ @ Override public Map < String , String [ ] > getParameterMap ( ) { } }
try { collaborator . preInvoke ( componentMetaData ) ; return request . getParameterMap ( ) ; } finally { collaborator . postInvoke ( ) ; }
public class ArrayPathToken { /** * Check if model is non - null and array . * @ param currentPath * @ param model * @ param ctx * @ return false if current evaluation call must be skipped , true otherwise * @ throws PathNotFoundException if model is null and evaluation must be interrupted * @ throws Invali...
if ( model == null ) { if ( ! isUpstreamDefinite ( ) ) { return false ; } else { throw new PathNotFoundException ( "The path " + currentPath + " is null" ) ; } } if ( ! ctx . jsonProvider ( ) . isArray ( model ) ) { if ( ! isUpstreamDefinite ( ) ) { return false ; } else { throw new PathNotFoundException ( format ( "Fi...
public class SimonConsoleRequestProcessor { /** * Add a resource action binding to the { @ link # actionBindings } list . * @ param actionPath Path of the action * @ param resourcePath Path of a resource located under */ public void addResourceActionBinding ( final String actionPath , final String resourcePath ) { ...
this . addActionBinding ( new ActionBinding ( ) { public boolean supports ( ActionContext actionContext ) { return actionContext . getPath ( ) . equals ( actionPath ) ; } public Action create ( ActionContext actionContext ) { return new ResourceAction ( actionContext , resourcePath ) ; } } ) ;
public class SebContextWait { /** * Until method using function functional interface . It solves ambiguity * when using basic until method without typed parameter . * Repeatedly applies this instance ' s input value to the given function * until one of the following occurs : * < ol > * < li > the function ret...
return super . until ( new com . google . common . base . Function < SebContext , V > ( ) { @ Override public V apply ( SebContext input ) { return isTrue . apply ( input ) ; } } ) ;
public class GeoPackageImpl { /** * { @ inheritDoc } */ @ Override public AttributesDao getAttributesDao ( Contents contents ) { } }
if ( contents == null ) { throw new GeoPackageException ( "Non null " + Contents . class . getSimpleName ( ) + " is required to create " + AttributesDao . class . getSimpleName ( ) ) ; } if ( contents . getDataType ( ) != ContentsDataType . ATTRIBUTES ) { throw new GeoPackageException ( Contents . class . getSimpleName...
public class TableBuilder { /** * Set a border on the outline of the whole table , as well as around the first row . * @ param style the style to apply * @ return this , for method chaining */ public TableBuilder addHeaderBorder ( BorderStyle style ) { } }
this . addBorder ( 0 , 0 , 1 , model . getColumnCount ( ) , OUTLINE , style ) ; return addOutlineBorder ( style ) ;
public class ResourceDMBean { /** * Returns a string with the first letter being lowercase */ protected static String toLowerCase ( String input ) { } }
if ( Character . isUpperCase ( input . charAt ( 0 ) ) ) return input . substring ( 0 , 1 ) . toLowerCase ( ) + input . substring ( 1 ) ; return input ;
public class Functions { /** * A { @ code Function } that always ignores its argument and returns a constant value . * @ return a { @ code Function } that always ignores its argument and returns a constant value . * @ since 0.5 */ public static < T > Function < Object , T > returnConstant ( final T constant ) { } }
return new Function < Object , T > ( ) { @ Override public T apply ( Object ignored ) { return constant ; } } ;
public class PeerEurekaNode { /** * Send the status information of of the ASG represented by the instance . * ASG ( Autoscaling group ) names are available for instances in AWS and the * ASG information is used for determining if the instance should be * registered as { @ link InstanceStatus # DOWN } or { @ link ...
long expiryTime = System . currentTimeMillis ( ) + maxProcessingDelayMs ; nonBatchingDispatcher . process ( asgName , new AsgReplicationTask ( targetHost , Action . StatusUpdate , asgName , newStatus ) { public EurekaHttpResponse < ? > execute ( ) { return replicationClient . statusUpdate ( asgName , newStatus ) ; } } ...
public class Config { /** * Gets the value of a property for a given class * @ param clazz The class * @ param propertyComponents The components * @ return The value associated with clazz . propertyName */ public static Val get ( Class < ? > clazz , String ... propertyComponents ) { } }
return get ( clazz . getName ( ) , propertyComponents ) ;
public class BlockLeaf { /** * Searches for a row matching the cursor ' s key in the block . * If the key is found , fill the cursor with the row . */ int findAndFill ( RowCursor cursor ) { } }
int ptr = find ( cursor ) ; if ( ptr >= 0 ) { cursor . setRow ( _buffer , ptr ) ; cursor . setLeafBlock ( this , ptr ) ; } return ptr ;
public class SynchronousReplicator { /** * Completes futures . */ private void completeFutures ( ) { } }
long commitIndex = queues . values ( ) . stream ( ) . map ( queue -> queue . ackedIndex ) . reduce ( Math :: min ) . orElse ( 0L ) ; for ( long i = context . getCommitIndex ( ) + 1 ; i <= commitIndex ; i ++ ) { CompletableFuture < Void > future = futures . remove ( i ) ; if ( future != null ) { future . complete ( null...