signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class AbstractTreeNode { /** * Fire the event for the removed node child . * @ param event the event . */ void firePropertyChildRemoved ( TreeNodeRemovedEvent event ) { } }
if ( this . nodeListeners != null ) { for ( final TreeNodeListener listener : this . nodeListeners ) { if ( listener != null ) { listener . treeNodeChildRemoved ( event ) ; } } } final N parentNode = getParentNode ( ) ; if ( parentNode != null ) { parentNode . firePropertyChildRemoved ( event ) ; }
public class AnalyticsServiceElasticsearch { /** * This method builds a map of communication summary stats related to the supplied * criteria . * @ param stats The map of communication summary stats * @ param index The index * @ param criteria The criteria * @ param addMetrics Whether to add metrics on the no...
if ( ! refresh ( index ) ) { return ; } // Don ' t specify target class , so that query provided that can be used with // CommunicationDetails and CompletionTime BoolQueryBuilder query = buildQuery ( criteria , ElasticsearchUtil . TRANSACTION_FIELD , null ) ; // Only want external communications query = query . mustNot...
public class UserInstanceManagerImpl { /** * Returns the UserInstance object that is associated with the given request . * @ param request Incoming HttpServletRequest * @ return UserInstance object associated with the given request */ @ Override public IUserInstance getUserInstance ( HttpServletRequest request ) th...
try { request = this . portalRequestUtils . getOriginalPortalRequest ( request ) ; } catch ( IllegalArgumentException iae ) { // ignore , just means that this isn ' t a wrapped request } // Use request attributes first for the fastest possible retrieval IUserInstance userInstance = ( IUserInstance ) request . getAttrib...
public class JDK8TriggerBuilder { /** * Add the given key - value pair to the Trigger ' s { @ link JobDataMap } . * @ param dataKey * Job data key . * @ param value * Job data value * @ return the updated JDK8TriggerBuilder * @ see ITrigger # getJobDataMap ( ) */ @ Nonnull public JDK8TriggerBuilder < T > us...
m_aJobDataMap . put ( dataKey , value ) ; return this ;
public class ScatterChartPanel { /** * Sets the operation mode . * In zero - based mode coordinate axes always start at 0 and end near the maximum value of the corresponding dimension . * Otherwise axes start at the minimum value . * @ param zeroBased Operation mode */ public void setZeroBased ( boolean zeroBased...
if ( zeroBased != this . zeroBased ) { this . zeroBased = zeroBased ; for ( ValueDimension dim : tickInfo . keySet ( ) ) tickInfo . get ( dim ) . setZeroBased ( zeroBased ) ; }
public class InteropFramework { /** * Top level entry point of this class , when called from the command line . * See method { @ link CommandLineArguments # main ( String [ ] ) } */ public int run ( ) { } }
if ( outfile == null && compare == null ) return CommandLineArguments . STATUS_NO_OUTPUT_OR_COMPARISON ; if ( infile == null && generator == null && merge == null ) return CommandLineArguments . STATUS_NO_INPUT ; if ( ( infile == "-" ) && ( bindings == "-" ) ) throw new InteropException ( "Cannot use standard input for...
public class PersistentFactory { /** * Creates the specified object with the data provided in the specified state under * the governance of the specified transaction . * @ param xaction the transaction governing this event * @ param state the new state for the new object * @ throws PersistenceException an error...
if ( create == null ) { synchronized ( this ) { while ( create == null ) { compileCreator ( ) ; try { wait ( 1000L ) ; } catch ( InterruptedException ignore ) { /* ignore this */ } } } } state . put ( "--key--" , getKey ( ) ) ; xaction . execute ( create , state ) ; if ( dependency != null ) { dependency . createDepend...
public class ValidationResult { /** * Adds a validation message to the result . * @ param message a validation message to be added */ private void addMessage ( ValidationMessage < Origin > message ) { } }
if ( message == null ) { return ; } if ( null != defaultOrigin ) { message . addOrigin ( defaultOrigin ) ; } this . messages . add ( message ) ;
public class V1InstanceCreator { /** * Create a new ChangeSet with a name and reference . * @ param name Initial name . * @ param reference Reference value . * @ return A newly minted ChangeSet that exists in the VersionOne system . */ public ChangeSet changeSet ( String name , String reference ) { } }
return changeSet ( name , reference , null ) ;
public class DynamoDBMapper { /** * Queries an Amazon DynamoDB table and returns the matching results as an * unmodifiable list of instantiated objects . The table to query is * determined by looking at the annotations on the specified class , which * declares where to store the object data in Amazon DynamoDB , a...
config = mergeConfig ( config ) ; QueryRequest queryRequest = createQueryRequestFromExpression ( clazz , queryExpression , config ) ; QueryResult queryResult = db . query ( applyUserAgent ( queryRequest ) ) ; return new PaginatedQueryList < T > ( this , clazz , db , queryRequest , queryResult ) ;
public class SarlBatchCompiler { /** * Replies if the given resource is a script . * @ param resource the resource to test . * @ return < code > true < / code > if the given resource is a script . */ @ SuppressWarnings ( "static-method" ) protected boolean isSourceFile ( Resource resource ) { } }
if ( resource instanceof BatchLinkableResource ) { return ! ( ( BatchLinkableResource ) resource ) . isLoadedFromStorage ( ) ; } return false ;
public class BuildDataHelper { /** * Calculate build data from downstream builds , that could be a shared library * which is loaded first in a pipeline . For that reason , this method compares * all remote URLs for each build data , with the real project name , to determine * the proper build data . This way , th...
if ( buildDataList == null ) { return null ; } if ( buildDataList . size ( ) == 1 ) { return buildDataList . get ( 0 ) ; } String projectName = parentFullName . replace ( parentName , "" ) ; if ( projectName . endsWith ( "/" ) ) { projectName = projectName . substring ( 0 , projectName . lastIndexOf ( '/' ) ) ; } for (...
public class CmsListMetadata { /** * Returns < code > true < / code > if any column definition contains a single action . < p > * @ return < code > true < / code > if any column definition contains a single action */ public boolean hasSingleActions ( ) { } }
Iterator < CmsListColumnDefinition > itCols = m_columns . elementList ( ) . iterator ( ) ; while ( itCols . hasNext ( ) ) { CmsListColumnDefinition col = itCols . next ( ) ; if ( ! col . getDefaultActions ( ) . isEmpty ( ) || ! col . getDirectActions ( ) . isEmpty ( ) ) { return true ; } } return false ;
public class Table { /** * Adds an element if the element at the given index is null . Returns true if no element existed at the given index , * else returns false and doesn ' t set the element . * @ param seqno * @ param element * @ return True if the element at the computed index was null , else false */ publ...
lock . lock ( ) ; try { return _add ( seqno , element , true , null ) ; } finally { lock . unlock ( ) ; }
public class ResultSummary { /** * CHECKSTYLE : CONSTANTS - OFF */ public static String createSummary ( final TasksResult result ) { } }
StringBuilder summary = new StringBuilder ( ) ; int tasks = result . getNumberOfAnnotations ( ) ; summary . append ( Messages . Tasks_ResultAction_Summary ( ) ) ; summary . append ( " " ) ; if ( tasks > 0 ) { summary . append ( "<a href=\"tasksResult\">" ) ; } if ( tasks == 1 ) { summary . append ( Messages . Tasks_Res...
public class PerformanceCache { /** * returns a cached performance object , null if not yet in the cache . * @ param cvthe number of folds in the cross - validation * @ param valuesthe point in the space * @ returnthe cached performance item , null if not in cache */ public Performance get ( int cv , Point < Obje...
return m_Cache . get ( getID ( cv , values ) ) ;
public class PeerEventServiceClient { /** * Peer eventing */ void peerVent ( TransactionContext transactionContext ) throws TransactionException { } }
logger . trace ( toString ( ) + "peerVent transaction: " + transactionContext ) ; final Envelope envelope ; try { Ab . SeekPosition . Builder start = Ab . SeekPosition . newBuilder ( ) ; if ( null != peerOptions . getNewest ( ) ) { start . setNewest ( Ab . SeekNewest . getDefaultInstance ( ) ) ; } else if ( peerOption...
public class CPDefinitionSpecificationOptionValuePersistenceImpl { /** * Returns an ordered range of all the cp definition specification option values where CPDefinitionId = & # 63 ; and CPOptionCategoryId = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances ....
return findByC_COC ( CPDefinitionId , CPOptionCategoryId , start , end , orderByComparator , true ) ;
public class ConcurrentLinkedDeque { /** * Returns the predecessor of p , or the last node if p . prev has been * linked to self , which will only be true if traversing with a * stale pointer that is now off the list . */ final Node < E > pred ( Node < E > p ) { } }
Node < E > q = p . prev ; // j2objc : q = = p . prev = = sentinel means node GC - unlinked return ( sentinel ( ) == q ) ? last ( ) : q ;
public class RequestCallbackInInterceptor { /** * This functions reads SAM flowId and sets it * as message property for subsequent store in CallContext * @ param message */ private static void setupFlowId ( SoapMessage message ) { } }
String flowId = FlowIdHelper . getFlowId ( message ) ; if ( flowId == null ) { flowId = FlowIdProtocolHeaderCodec . readFlowId ( message ) ; } if ( flowId == null ) { flowId = FlowIdSoapCodec . readFlowId ( message ) ; } if ( flowId == null ) { Exchange ex = message . getExchange ( ) ; if ( null != ex ) { Message reqMs...
public class NioSocketIOChannel { /** * Close the socket */ public void close ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( this , tc , "close" ) ; } // Doing a channel . close ( ) will actually put the keys associated with this // channel // into the associated selectors cancelledKey list , but they don ' t get // removed until the // next time the se...
public class ApiOvhTelephony { /** * Transfer security deposit between two billing accounts * REST : POST / telephony / { billingAccount } / transferSecurityDeposit * @ param amount [ required ] The amount , in euros , you want to transfer * @ param billingAccountDestination [ required ] The destination billing a...
String qPath = "/telephony/{billingAccount}/transferSecurityDeposit" ; StringBuilder sb = path ( qPath , billingAccount ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "amount" , amount ) ; addBody ( o , "billingAccountDestination" , billingAccountDestination ) ; exec ( qPath , "...
public class ReporterConfigMetadata { /** * This method will generate JSON string representation of the all items in current ReportConfigMetadata . */ public static String toJsonAsString ( ) { } }
logger . entering ( ) ; Gson gson = new GsonBuilder ( ) . setPrettyPrinting ( ) . create ( ) ; JsonObject configItem = new JsonObject ( ) ; for ( Entry < String , Map < String , String > > entry : ReporterConfigMetadata . getReporterMetaData ( ) . entrySet ( ) ) { Map < String , String > subMap = entry . getValue ( ) ;...
public class MPPResourceField { /** * Retrieve an instance of the ResourceField class based on the data read from an * MS Project file . * @ param value value from an MS Project file * @ return ResourceField instance */ public static ResourceField getInstance ( int value ) { } }
ResourceField result = null ; if ( value >= 0 && value < FIELD_ARRAY . length ) { result = FIELD_ARRAY [ value ] ; } else { if ( ( value & 0x8000 ) != 0 ) { int baseValue = ResourceField . ENTERPRISE_CUSTOM_FIELD1 . getValue ( ) ; int id = baseValue + ( value & 0xFFF ) ; result = ResourceField . getInstance ( id ) ; } ...
public class FieldMap { /** * Creates a field map for tasks . * @ param props props data */ public void createTaskFieldMap ( Props props ) { } }
byte [ ] fieldMapData = null ; for ( Integer key : TASK_KEYS ) { fieldMapData = props . getByteArray ( key ) ; if ( fieldMapData != null ) { break ; } } if ( fieldMapData == null ) { populateDefaultData ( getDefaultTaskData ( ) ) ; } else { createFieldMap ( fieldMapData ) ; }
public class CommerceUserSegmentEntryPersistenceImpl { /** * Returns the first commerce user segment entry in the ordered set where groupId = & # 63 ; . * @ param groupId the group ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the first matchi...
CommerceUserSegmentEntry commerceUserSegmentEntry = fetchByGroupId_First ( groupId , orderByComparator ) ; if ( commerceUserSegmentEntry != null ) { return commerceUserSegmentEntry ; } StringBundler msg = new StringBundler ( 4 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "groupId=" ) ; msg . append ( ...
public class VoiceApi { /** * Perform a single - step transfer to the specified destination . * @ param connId The connection ID of the call to transfer . * @ param destination The number where the call should be transferred . * @ param userData Key / value data to include with the call . ( optional ) */ public v...
this . singleStepTransfer ( connId , destination , null , userData , null , null ) ;
public class JspTagUtils { /** * Gets the class name ( without package ) for the given class . */ private static String getClassName ( Class < ? > clazz ) { } }
String name = clazz . getSimpleName ( ) ; int dotPos = name . lastIndexOf ( '.' ) ; return dotPos == - 1 ? name : name . substring ( dotPos + 1 ) ;
public class ArrayViewList { public int indexOf ( Object o ) { } }
if ( o == null ) { for ( int i = start ; i < start + length ; i ++ ) if ( a [ i ] == null ) return i - start ; } else { for ( int i = start ; i < start + length ; i ++ ) if ( o . equals ( a [ i ] ) ) return i - start ; } return - 1 ;
public class SluggishGui { /** * overrides the visitor to reset look for gui interfaces * @ param classContext * the context object for the currently parsed class */ @ Override public void visitClassContext ( ClassContext classContext ) { } }
try { guiInterfaces = new HashSet < > ( ) ; JavaClass cls = classContext . getJavaClass ( ) ; JavaClass [ ] infs = cls . getAllInterfaces ( ) ; for ( JavaClass inf : infs ) { String name = inf . getClassName ( ) ; if ( ( name . startsWith ( "java.awt." ) || name . startsWith ( "javax.swing." ) ) && name . endsWith ( "L...
public class A_CmsDirectEditButtons { /** * Adds the highlighting and option bar . < p > */ protected void addHighlightingAndBar ( ) { } }
timer = null ; highlightElement ( ) ; getElement ( ) . addClassName ( org . opencms . gwt . client . ui . css . I_CmsLayoutBundle . INSTANCE . stateCss ( ) . cmsHovering ( ) ) ;
public class ByteArrayBindTransform { /** * Generate parse on jackson internal . * @ param context the context * @ param methodBuilder the method builder * @ param parserName the parser name * @ param beanClass the bean class * @ param beanName the bean name * @ param property the property * @ param onStr...
if ( property . isNullable ( ) ) { methodBuilder . beginControlFlow ( "if ($L.currentToken()!=$T.VALUE_NULL)" , parserName , JsonToken . class ) ; } if ( property . hasTypeAdapter ( ) ) { if ( onString ) { methodBuilder . addStatement ( setter ( beanClass , beanName , property , PRE_TYPE_ADAPTER_TO_JAVA + "$T.decode($L...
public class FeatureTransform { /** * Transform an array of feature vectors . * @ param x an array of feature vectors . The feature * vectors may be modified on output if copy is false . * @ return the transformed feature vectors . */ public double [ ] [ ] transform ( double [ ] [ ] x ) { } }
double [ ] [ ] y = new double [ x . length ] [ ] ; for ( int i = 0 ; i < y . length ; i ++ ) { y [ i ] = transform ( x [ i ] ) ; } return y ;
public class Apptentive { /** * Must be called from the { @ link Application # onCreate ( ) } method in the { @ link Application } object defined in your app ' s manifest . * Note : application key and signature would be resolved from the AndroidManifest . xml * @ param application The { @ link Application } object...
if ( application == null ) { throw new IllegalArgumentException ( "Application is null" ) ; } String apptentiveKey = Util . getManifestMetadataString ( application , Constants . MANIFEST_KEY_APPTENTIVE_KEY ) ; if ( StringUtils . isNullOrEmpty ( apptentiveKey ) ) { ApptentiveLog . e ( "Unable to initialize Apptentive SD...
public class GVRAnimation { /** * Sets the offset for the animation . * @ param startOffset animation will start at the specified offset value * @ return { @ code this } , so you can chain setProperty ( ) calls . * @ throws IllegalArgumentException * If { @ code startOffset } is either negative or greater than ...
if ( startOffset < 0 || startOffset > mDuration ) { throw new IllegalArgumentException ( "offset should not be either negative or greater than duration" ) ; } animationOffset = startOffset ; mDuration = mDuration - animationOffset ; return this ;
public class AWSCloud { /** * Puts the given key / value into the given map only if the value is not null . * @ param parameters the map to add to * @ param key the key of the value * @ param value the value to add if not null */ public static void addValueIfNotNull ( @ Nonnull Map < String , String > parameters ...
if ( value == null ) { return ; } parameters . put ( key , value . toString ( ) ) ;
public class ActionBarSherlock { /** * Wrap an activity with an action bar abstraction which will enable the * use of a custom implementation on platforms where a native version does * not exist . * @ param activity Owning activity . * @ param flags Option flags to control behavior . * @ return Instance to in...
// Create a local implementation map we can modify HashMap < Implementation , Class < ? extends ActionBarSherlock > > impls = new HashMap < Implementation , Class < ? extends ActionBarSherlock > > ( IMPLEMENTATIONS ) ; boolean hasQualfier ; /* DPI FILTERING */ hasQualfier = false ; for ( Implementation key : impls . ke...
public class MsgFuncGenerator { /** * Private helper to process and collect all variables used within this msg node for code * generation . * @ return A Map populated with all the variables used with in this message node , using { @ link * MsgPlaceholderInitialNode # genBasePhName } . */ private Map < PyExpr , Py...
Map < PyExpr , PyExpr > nodePyVarToPyExprMap = new LinkedHashMap < > ( ) ; for ( Map . Entry < String , MsgSubstUnitNode > entry : msgNode . getVarNameToRepNodeMap ( ) . entrySet ( ) ) { MsgSubstUnitNode substUnitNode = entry . getValue ( ) ; PyExpr substPyExpr = null ; if ( substUnitNode instanceof MsgPlaceholderNode ...
public class Encoding { /** * Adds a unit clause to the given SAT solver . * @ param s the sat solver * @ param a the unit literal * @ param blocking the blocking literal */ private void addUnitClause ( final MiniSatStyleSolver s , int a , int blocking ) { } }
assert this . clause . size ( ) == 0 ; assert a != LIT_UNDEF ; assert var ( a ) < s . nVars ( ) ; this . clause . push ( a ) ; if ( blocking != LIT_UNDEF ) this . clause . push ( blocking ) ; s . addClause ( this . clause , null ) ; this . clause . clear ( ) ;
public class ServletContextAccess { /** * / * ( non - Javadoc ) * @ see com . att . cadi . PropAccess # log ( java . lang . Exception , java . lang . Object [ ] ) */ @ Override public void log ( Exception e , Object ... elements ) { } }
StringBuilder sb = buildMsg ( Level . ERROR , elements ) ; context . log ( sb . toString ( ) , e ) ;
public class CmsExportPointDriver { /** * Deletes a file or a folder in the real file sytem . < p > * If the given resource name points to a folder , then this folder is only deleted if it is empty . * This is required since the same export point RFS target folder may be used by multiple export points . * For exa...
File file = getExportPointFile ( resourceName , exportpoint ) ; if ( file . exists ( ) && file . canWrite ( ) ) { // delete the file ( or folder ) file . delete ( ) ; // also delete empty parent directories File parent = file . getParentFile ( ) ; if ( parent . canWrite ( ) ) { parent . delete ( ) ; } }
public class JSONArray { /** * Returns the value at { @ code index } , or null if the array has no value * at { @ code index } . */ public Object opt ( int index ) { } }
if ( index < 0 || index >= values . size ( ) ) { return null ; } return values . get ( index ) ;
public class Boxing { /** * Returns any multidimensional array into an array of boxed values . * @ param src source array * @ return multidimensional array */ public static Object deepBox ( Object src ) { } }
Class < ? > resultType = arrayBoxingType ( src . getClass ( ) ) ; return deepBox ( resultType , src ) ;
public class ProtocolSerializer { /** * Read a message from the input byte stream and send it to the event handler . * @ param messageBytes An array of bytes that contains the message to be deserialized . * @ param observer An implementation of the MultiObserver interface which will be called * to process the des...
try ( final InputStream inputStream = new ByteArrayInputStream ( messageBytes ) ) { // Binary decoder for both the header and the message . final BinaryDecoder decoder = DecoderFactory . get ( ) . binaryDecoder ( inputStream , null ) ; // Read the header message . final Header header = this . headerReader . read ( null...
public class PermittedRepository { /** * Find permitted entities by parameters . * @ param whereCondition the parameters condition * @ param conditionParams the parameters map * @ param pageable the page info * @ param entityClass the entity class to get * @ param privilegeKey the privilege key for permission...
return findByCondition ( whereCondition , conditionParams , null , pageable , entityClass , privilegeKey ) ;
public class RouterExample { /** * tag : : negotiationBasedOnAccepts [ ] */ @ Route ( method = HttpMethod . POST , uri = "/consume" , accepts = "application/xml" ) public Result fromXML ( @ Body Data form ) { } }
return ok ( form ) . xml ( ) ;
public class DocumentModelResources { /** * Load the external resources such as gazetters and clustering lexicons . * @ param params * the training parameters * @ return the map contanining and id and the resource * @ throws IOException * if io error */ public static Map < String , Object > loadParseResources...
final Map < String , Object > resources = new HashMap < String , Object > ( ) ; @ SuppressWarnings ( "rawtypes" ) final Map < String , ArtifactSerializer > artifactSerializers = SequenceLabelerModel . createArtifactSerializers ( ) ; if ( Flags . isBrownFeatures ( params ) ) { final String ClusterLexiconPath = Flags . g...
public class CommandGroup { /** * Create a button bar with buttons for all the commands in this group . Adds * a border top and bottom of 2 spaces . * @ param minimumButtonSize if null , then there is no minimum size * @ return never null */ public JComponent createButtonBar ( Size minimumButtonSize ) { } }
return createButtonBar ( minimumButtonSize , GuiStandardUtils . createTopAndBottomBorder ( UIConstants . TWO_SPACES ) ) ;
public class WhiteboxImpl { /** * Find the method whose parameter types most closely matches the { @ code types } . * @ param firstMethodCandidate The first method candidate * @ param secondMethodCandidate The second method candidate * @ return The method that most closely matches the provided types or { @ code n...
Class < ? > [ ] firstMethodCandidateParameterTypes = firstMethodCandidate . getParameterTypes ( ) ; Class < ? > [ ] secondMethodCandidateParameterTypes = secondMethodCandidate . getParameterTypes ( ) ; Method bestMatch = null ; for ( int i = 0 ; i < firstMethodCandidateParameterTypes . length ; i ++ ) { Class < ? > can...
public class ProtocolVersionImpl { /** * ( non - Javadoc ) * @ see org . restcomm . protocols . ss7 . tcap . asn . Encodable # decode ( org . mobicents . protocols . asn . AsnInputStream ) */ public void decode ( AsnInputStream ais ) throws ParseException { } }
try { BitSetStrictLength readV = ais . readBitString ( ) ; if ( readV . getStrictLength ( ) >= 1 && readV . get ( 0 ) ) { // ok } else { this . supportedVersion = false ; } } catch ( IOException e ) { throw new ParseException ( PAbortCauseType . BadlyFormattedTxPortion , null , "IOException while decoding ProtocolVersi...
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EEnum getIfcAheadOrBehind ( ) { } }
if ( ifcAheadOrBehindEEnum == null ) { ifcAheadOrBehindEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 774 ) ; } return ifcAheadOrBehindEEnum ;
public class MessageListenerExample { /** * NOTE THE @ Override ! * This method is actually overriding a method in the ListenerAdapter class ! We place an @ Override annotation * right before any method that is overriding another to guarantee to ourselves that it is actually overriding * a method from a super cla...
// These are provided with every event in JDA JDA jda = event . getJDA ( ) ; // JDA , the core of the api . long responseNumber = event . getResponseNumber ( ) ; // The amount of discord events that JDA has received since the last reconnect . // Event specific information User author = event . getAuthor ( ) ; // The us...
public class SelectStatement { /** * Get aggregation select items . * @ return aggregation select items */ public List < AggregationSelectItem > getAggregationSelectItems ( ) { } }
List < AggregationSelectItem > result = new LinkedList < > ( ) ; for ( SelectItem each : items ) { if ( each instanceof AggregationSelectItem ) { AggregationSelectItem aggregationSelectItem = ( AggregationSelectItem ) each ; result . add ( aggregationSelectItem ) ; result . addAll ( aggregationSelectItem . getDerivedAg...
public class GeneratedDContactDaoImpl { /** * query - by method for field tags * @ param tags the specified attribute * @ return an Iterable of DContacts for the specified tags */ public Iterable < DContact > queryByTags ( Object parent , java . lang . Object tags ) { } }
return queryByField ( parent , DContactMapper . Field . TAGS . getFieldName ( ) , tags ) ;
public class CmsResourceUtil { /** * Returns the lock icon path for the given resource . < p > * Relative to < code > / system / workplace / resources / < / code > . < p > * Returns < code > explorer / project _ none . gif < / code > if request context is < code > null < / code > . < p > * @ return the lock icon ...
CmsLock lock = getLock ( ) ; String iconPath = null ; if ( ! lock . isUnlocked ( ) && ( m_request != null ) && isInsideProject ( ) ) { if ( getLock ( ) . isOwnedBy ( m_request . getCurrentUser ( ) ) && ( getLockedInProjectId ( ) . equals ( getReferenceProject ( ) . getUuid ( ) ) ) ) { if ( lock . isShared ( ) ) { iconP...
public class BigQueryDataMarshallerByType { /** * Converts the input object into a nested map of field name to field value . Recursively breaks * down complex field types to simple Bigquery types as listed in { @ link BigQueryDataTypeUtil } . * Uses reflection to infer the type and value of fields . Only accessible...
"rawtypes" , "unchecked" } ) List < Object > mapRepeatedFieldToListOfValues ( Field field , Object fieldValue ) { Class < ? > fieldType = getParameterTypeOfRepeatedField ( field ) ; Collection fieldToMap = null ; if ( isCollection ( field . getType ( ) ) ) { fieldToMap = ( Collection ) fieldValue ; } else if ( field . ...
public class Transfer { /** * Method declaration */ private void initGUI ( ) { } }
Font fFont = new Font ( "Dialog" , Font . PLAIN , 12 ) ; setLayout ( new BorderLayout ( ) ) ; Panel p = new Panel ( ) ; p . setBackground ( SystemColor . control ) ; p . setLayout ( new GridLayout ( 16 , 1 ) ) ; tSourceTable = new TextField ( ) ; tSourceTable . setEnabled ( false ) ; tDestTable = new TextField ( ) ; tD...
public class SQLRecoverableUnitImpl { /** * Forces to the underlying recovery log information from the recoverable unit * sections . The amount of information written depends on the input argument * ' rewriteRequired ' . If this flag is false then only information that has not * not previously been written will b...
if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "forceSections" , new java . lang . Object [ ] { this , new Boolean ( rewriteRequired ) } ) ; // If the parent recovery log instance has experienced a serious internal error then prevent // this operation from executing . if ( _recLog . failed ( ) ) { if ( tc . isEntryEn...
public class TypeBindingProbe { /** * 确定表达式的类型 */ protected void infer ( ) { } }
InferContext ctx = new InferContext ( ) ; ctx . types = types ; ctx . gt = this . program . gt ; for ( Statement st : this . program . metaData . statements ) { st . infer ( ctx ) ; }
public class XML { public static Collection < Node > findElementsByName ( String elementName , Node node ) { } }
if ( node == null || node . getNodeType ( ) == Node . COMMENT_NODE || node . getNodeType ( ) == Node . TEXT_NODE ) return null ; HashSet < Node > results = new HashSet < Node > ( ) ; if ( elementName . equals ( node . getNodeName ( ) ) ) { results . add ( node ) ; } NodeList nodeList = node . getChildNodes ( ) ; if ( n...
public class EncryptionAtRestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( EncryptionAtRest encryptionAtRest , ProtocolMarshaller protocolMarshaller ) { } }
if ( encryptionAtRest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( encryptionAtRest . getCatalogEncryptionMode ( ) , CATALOGENCRYPTIONMODE_BINDING ) ; protocolMarshaller . marshall ( encryptionAtRest . getSseAwsKmsKeyId ( ) , SSEAWSKMS...
public class Bits { /** * Exposes a < code > SortedSet < / code > of < code > Integer < / code > as * { @ link BitStore } . The < code > start < / code > and < code > finish < / code > * parameters must form a valid sub - range of the set . Since it is not * possible to determine whether a set is modifiable , the...
if ( set == null ) throw new IllegalArgumentException ( "null set" ) ; if ( start < 0L ) throw new IllegalArgumentException ( "negative start" ) ; if ( finish < start ) throw new IllegalArgumentException ( "start exceeds finish" ) ; set = set . subSet ( start , finish ) ; return new IntSetBitStore ( set , start , finis...
public class ReflectUtil { /** * Return the name of the package from which the given type can be used . * < p > Returns a package from which all the type names contained in the given * type literal are visible . Throws { @ link IllegalArgumentException } if there * is no such package . If there are multiple such ...
Map < String , Class < ? > > packageNames = new LinkedHashMap < String , Class < ? > > ( ) ; getTypePackageNames ( typeLiteral . getType ( ) , packageNames ) ; if ( packageNames . size ( ) == 0 ) { // All type names are public , so typeLiteral is visible from any package . // Arbitrarily put it in the package declaring...
public class Sanitizers { /** * Converts plain text to HTML by entity escaping , stripping tags in sanitized content so the * result can safely be embedded in an unquoted HTML attribute value . */ public static String escapeHtmlAttributeNospace ( SoyValue value ) { } }
value = normalizeNull ( value ) ; if ( isSanitizedContentOfKind ( value , SanitizedContent . ContentKind . HTML ) ) { // | escapeHtmlAttributeNospace should only be used on attribute values that cannot have tags . return stripHtmlTags ( value . coerceToString ( ) , null , false ) ; } return escapeHtmlAttributeNospace (...
public class AssetHolderDelegate { private boolean validAsset ( OrchidPage asset , String targetExtension ) { } }
return asset . getReference ( ) . getOutputExtension ( ) . equalsIgnoreCase ( targetExtension ) ;
public class Database { public void put_class_attribute_property ( String classname , DbAttribute attr ) throws DevFailed { } }
databaseDAO . put_class_attribute_property ( this , classname , attr ) ;
public class InternalSimpleAntlrParser { /** * InternalSimpleAntlr . g : 1277:1 : ruleParenthesized returns [ EObject current = null ] : ( this _ OPEN _ 0 = RULE _ OPEN this _ Alternatives _ 1 = ruleAlternatives otherlv _ 2 = ' ) ' ) ; */ public final EObject ruleParenthesized ( ) throws RecognitionException { } }
EObject current = null ; Token this_OPEN_0 = null ; Token otherlv_2 = null ; EObject this_Alternatives_1 = null ; enterRule ( ) ; try { // InternalSimpleAntlr . g : 1280:28 : ( ( this _ OPEN _ 0 = RULE _ OPEN this _ Alternatives _ 1 = ruleAlternatives otherlv _ 2 = ' ) ' ) ) // InternalSimpleAntlr . g : 1281:1 : ( this...
public class Detector { /** * Gets the coordinate of the first point with a different color in the given direction */ private Point getFirstDifferent ( Point init , boolean color , int dx , int dy ) { } }
int x = init . getX ( ) + dx ; int y = init . getY ( ) + dy ; while ( isValid ( x , y ) && image . get ( x , y ) == color ) { x += dx ; y += dy ; } x -= dx ; y -= dy ; while ( isValid ( x , y ) && image . get ( x , y ) == color ) { x += dx ; } x -= dx ; while ( isValid ( x , y ) && image . get ( x , y ) == color ) { y ...
public class BlacklistUrlFilter { /** * Initialize " deny " parameter from web . xml . * @ param filterConfig A filter configuration object used by a servlet container * to pass information to a filter during initialization . */ public void init ( final FilterConfig filterConfig ) { } }
final String denyParam = filterConfig . getInitParameter ( "denyUrls" ) ; if ( StringUtils . isNotBlank ( denyParam ) ) { this . denyUrls = denyParam . split ( "," ) ; } final String ignoreParam = filterConfig . getInitParameter ( "ignoreUrls" ) ; if ( StringUtils . isNotBlank ( ignoreParam ) ) { this . ignoreUrls = ig...
public class FileSystemUtilities { /** * If the supplied fileOrDir is a File , it is added to the returned List if any of the filters Match . * If the supplied fileOrDir is a Directory , it is listed and any of the files immediately within the fileOrDir * directory are returned within the resulting List provided th...
return listFiles ( fileOrDir , fileFilters , false , log ) ;
public class AmazonEC2Client { /** * Displays details about an import virtual machine or import snapshot tasks that are already created . * @ param describeImportImageTasksRequest * Contains the parameters for DescribeImportImageTasks . * @ return Result of the DescribeImportImageTasks operation returned by the s...
request = beforeClientExecution ( request ) ; return executeDescribeImportImageTasks ( request ) ;
public class HttpClient { /** * Perform a delete against the WSAPI * @ param url the request url * @ return the JSON encoded string response * @ throws IOException if a non - 200 response code is returned or if some other * problem occurs while executing the request */ public String doDelete ( String url ) thro...
HttpDelete httpDelete = new HttpDelete ( getWsapiUrl ( ) + url ) ; return doRequest ( httpDelete ) ;
public class ContextFromVertx { /** * This will give you the request body nicely parsed . You can register your * own parsers depending on the request type . * @ param classOfT The class of the result . * @ return The parsed request or null if something went wrong . */ @ Override public < T > T body ( Class < T >...
String rawContentType = request ( ) . contentType ( ) ; // If the Content - type : xxx header is not set we return null . // we cannot parse that request . if ( rawContentType == null ) { return null ; } // If Content - type is application / json ; charset = utf - 8 we split away the charset // application / json Strin...
public class PrettyTimeFormat { /** * Convenience format method for precise durations . * @ param ref * The date of reference . * @ param then * The future date . * @ param precision * The precision to retain in milliseconds . * @ return a relative format date as text representation or an empty string *...
List < Duration > durations = DurationHelper . calculatePreciseDuration ( ref , then , prettyTime . getUnits ( ) ) ; List < Duration > retained = retainPrecision ( durations , precision ) ; return retained . isEmpty ( ) ? "" : prettyTime . format ( retained ) ;
public class CommerceShippingFixedOptionRelPersistenceImpl { /** * Removes all the commerce shipping fixed option rels where commerceShippingFixedOptionId = & # 63 ; from the database . * @ param commerceShippingFixedOptionId the commerce shipping fixed option ID */ @ Override public void removeByCommerceShippingFixe...
for ( CommerceShippingFixedOptionRel commerceShippingFixedOptionRel : findByCommerceShippingFixedOptionId ( commerceShippingFixedOptionId , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ) { remove ( commerceShippingFixedOptionRel ) ; }
public class ProcessRecordService { /** * Write all fields of a record to HBase . To be used in initial insert , or to * overwrite whatever values are there in HBase . * Consider using { @ link # setProcessState ( ProcessRecord , ProcessState ) } if you * want to update only the state . * @ param processRecord ...
byte [ ] key = keyConv . toBytes ( processRecord . getKey ( ) ) ; Put put = new Put ( key ) ; // Constants . JOB _ FILE _ PROCESS _ TABLE _ BYTES put . addColumn ( Constants . INFO_FAM_BYTES , Constants . MIN_MOD_TIME_MILLIS_COLUMN_BYTES , Bytes . toBytes ( processRecord . getMinModificationTimeMillis ( ) ) ) ; put . a...
public class ChronoEntity { /** * / * [ deutsch ] * < p > L & auml ; & szlig ; t die angegebene Abfrage diese Entit & auml ; t * auswerten . < / p > * < p > Entspricht { @ code function . apply ( this ) } . Hier & uuml ; ber wird der * Vorgang der Zeitinterpretation externalisiert und erm & ouml ; glicht * so...
return function . apply ( this . getContext ( ) ) ;
public class GetConnectionsFilterMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetConnectionsFilter getConnectionsFilter , ProtocolMarshaller protocolMarshaller ) { } }
if ( getConnectionsFilter == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getConnectionsFilter . getMatchCriteria ( ) , MATCHCRITERIA_BINDING ) ; protocolMarshaller . marshall ( getConnectionsFilter . getConnectionType ( ) , CONNECTIONTYP...
public class ClassPathSpringRestClientScanner { /** * { @ inheritDoc } */ @ Override protected boolean checkCandidate ( String beanName , BeanDefinition beanDefinition ) throws IllegalStateException { } }
if ( super . checkCandidate ( beanName , beanDefinition ) ) { return true ; } else { log . warn ( "Skipping SpringRestClientFactoryBean with name '" + beanName + "' and '" + beanDefinition . getBeanClassName ( ) + "' interfaceClazz" + ". Bean already defined with the same name!" ) ; return false ; }
public class ProximityTracker { /** * Removes from the tracker the object that is referentially equal to * ( < code > o1 = = object < / code > ) the specified object . * @ return true if an object was located and removed , false if not . */ public boolean removeObject ( Object object ) { } }
for ( int i = 0 ; i < _size ; i ++ ) { if ( _records [ i ] . object == object ) { // shift everything down System . arraycopy ( _records , i + 1 , _records , i , _size - ( i + 1 ) ) ; // clear out the trailing reference _records [ -- _size ] = null ; return true ; } } return false ;
public class CronTab { /** * Checks if this crontab entry looks reasonable , * and if not , return an warning message . * The point of this method is to catch syntactically correct * but semantically suspicious combinations , like */ public @ CheckForNull String checkSanity ( ) { } }
OUTER : for ( int i = 0 ; i < 5 ; i ++ ) { long bitMask = ( i < 4 ) ? bits [ i ] : ( long ) dayOfWeek ; for ( int j = BaseParser . LOWER_BOUNDS [ i ] ; j <= BaseParser . UPPER_BOUNDS [ i ] ; j ++ ) { if ( ! checkBits ( bitMask , j ) ) { // this rank has a sparse entry . // if we have a sparse rank , one of them better ...
public class AnimaQuery { /** * Querying a list * @ param type model type * @ param sql sql statement * @ param params params * @ param < S > * @ return List < S > */ public < S > List < S > queryList ( Class < S > type , String sql , List < Object > params ) { } }
return this . queryList ( type , sql , params . toArray ( ) ) ;
public class GeometryConverterService { /** * Convert a Geomajas geometry to a JTS geometry . * @ param geometry Geomajas geometry * @ return JTS geometry * @ throws JtsConversionException conversion failed */ public static com . vividsolutions . jts . geom . Geometry toJts ( Geometry geometry ) throws JtsConvers...
if ( geometry == null ) { throw new JtsConversionException ( "Cannot convert null argument" ) ; } int srid = geometry . getSrid ( ) ; int precision = geometry . getPrecision ( ) ; PrecisionModel model ; if ( precision == - 1 ) { model = new PrecisionModel ( PrecisionModel . FLOATING ) ; } else { model = new PrecisionMo...
public class AdHocCompilerCache { /** * Start a timer that prints cache stats to the console every 5s . * Used for development until we get better stats integration . */ public void startPeriodicStatsPrinting ( ) { } }
if ( m_statsTimer == null ) { m_statsTimer = new Timer ( ) ; m_statsTimer . scheduleAtFixedRate ( new TimerTask ( ) { @ Override public void run ( ) { printStats ( ) ; } } , 5000 , 5000 ) ; }
public class CachingPersonAttributeDaoImpl { /** * / * ( non - Javadoc ) * @ see org . jasig . services . persondir . IPersonAttributeDao # getPossibleUserAttributeNames ( ) */ @ Override @ JsonIgnore public Set < String > getPossibleUserAttributeNames ( final IPersonAttributeDaoFilter filter ) { } }
return this . cachedPersonAttributesDao . getPossibleUserAttributeNames ( filter ) ;
public class RecastMesh { /** * / @ see rcAllocPolyMesh , rcContourSet , rcPolyMesh , rcConfig */ public static PolyMesh buildPolyMesh ( Context ctx , ContourSet cset , int nvp ) { } }
ctx . startTimer ( "BUILD_POLYMESH" ) ; PolyMesh mesh = new PolyMesh ( ) ; RecastVectors . copy ( mesh . bmin , cset . bmin , 0 ) ; RecastVectors . copy ( mesh . bmax , cset . bmax , 0 ) ; mesh . cs = cset . cs ; mesh . ch = cset . ch ; mesh . borderSize = cset . borderSize ; mesh . maxEdgeError = cset . maxError ; int...
public class CPOptionValueUtil { /** * Returns the last cp option value in the ordered set where CPOptionId = & # 63 ; . * @ param CPOptionId the cp option ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the last matching cp option value , or < ...
return getPersistence ( ) . fetchByCPOptionId_Last ( CPOptionId , orderByComparator ) ;
public class CmsGalleryControllerHandler { /** * Will be triggered when the categories tab is selected . < p > */ public void onCategoriesTabSelection ( ) { } }
if ( ! m_galleryDialog . getCategoriesTab ( ) . isInitOpen ( ) ) { m_galleryDialog . getCategoriesTab ( ) . onContentChange ( ) ; return ; } m_galleryDialog . getCategoriesTab ( ) . openFirstLevel ( ) ; m_galleryDialog . getCategoriesTab ( ) . setInitOpen ( false ) ;
public class CreateActivityRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CreateActivityRequest createActivityRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( createActivityRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( createActivityRequest . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( createActivityRequest . getTags ( ) , TAGS_BINDING ) ; } catch ( Exception e...
public class MetricsProtoUtils { /** * BucketOptions . */ private static DistributionValue . BucketOptions toBucketOptionsProto ( Distribution . BucketOptions bucketOptions ) { } }
final DistributionValue . BucketOptions . Builder builder = DistributionValue . BucketOptions . newBuilder ( ) ; bucketOptions . match ( new Function < Distribution . BucketOptions . ExplicitOptions , Void > ( ) { @ Override public Void apply ( Distribution . BucketOptions . ExplicitOptions arg ) { builder . setExplici...
public class BizwifiAPI { /** * 设置微信首页欢迎语 * 设置微信首页欢迎语 , 可选择 “ 欢迎光临XXX ” 或 “ 已连接XXXWiFi ” , XXX为公众号名称或门店名称 。 * @ param accessToken accessToken * @ param barSet barSet * @ return BaseResult */ public static BaseResult barSet ( String accessToken , BarSet barSet ) { } }
return barSet ( accessToken , JsonUtil . toJSONString ( barSet ) ) ;
public class XMLParser { /** * Skip . * @ throws IOException Signals that an I / O exception has occurred . * @ throws KriptonRuntimeException the kripton runtime exception */ private void skip ( ) throws IOException , KriptonRuntimeException { } }
while ( position < limit || fillBuffer ( 1 ) ) { int c = buffer [ position ] ; if ( c > ' ' ) { break ; } position ++ ; }
public class RabbitmqClusterContext { /** * キュー一覧を検証して設定する 。 * @ param queueList the queueList to set * @ throws RabbitmqCommunicateException キュー一覧が指定されていない場合 */ public void setQueueList ( List < String > queueList ) throws RabbitmqCommunicateException { } }
if ( queueList == null || queueList . size ( ) == 0 ) { String message = "QueueList is not defined." ; throw new RabbitmqCommunicateException ( message ) ; } this . queueList = queueList ;
public class PropertyHelper { /** * Checks whether the property of the given name is allowed for the model element . * @ param defClass The class of the model element * @ param propertyName The name of the property * @ return < code > true < / code > if the property is allowed for this type of model elements */ p...
HashMap props = ( HashMap ) _properties . get ( defClass ) ; return ( props == null ? true : props . containsKey ( propertyName ) ) ;
public class CommerceWarehouseUtil { /** * Returns the last commerce warehouse in the ordered set where groupId = & # 63 ; and active = & # 63 ; . * @ param groupId the group ID * @ param active the active * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @...
return getPersistence ( ) . findByG_A_Last ( groupId , active , orderByComparator ) ;
public class ObjectUtils { /** * < p > Appends the toString that would be produced by { @ code Object } * if a class did not override toString itself . { @ code null } * will throw a NullPointerException for either of the two parameters . < / p > * < pre > * ObjectUtils . identityToString ( appendable , " " ) =...
Validate . notNull ( object , "Cannot get the toString of a null identity" ) ; appendable . append ( object . getClass ( ) . getName ( ) ) . append ( '@' ) . append ( Integer . toHexString ( System . identityHashCode ( object ) ) ) ;
public class ServerStats { /** * Gets the time when the varios percentile data was last updated . */ @ Monitor ( name = "ResponseTimePercentileWhen" , type = DataSourceType . INFORMATIONAL , description = "The time the percentile values were computed" ) public String getResponseTimePercentileTime ( ) { } }
return dataDist . getTimestamp ( ) ;
public class ElementGroup { /** * Add a new element to the group . * @ param element the element to add to the group */ public void add ( IRenderingElement element ) { } }
if ( element != null ) { if ( element . getClass ( ) . equals ( ElementGroup . class ) ) elements . addAll ( ( ( ElementGroup ) element ) . elements ) ; else elements . add ( element ) ; }
public class SourceFile { /** * Helper function for sanity checking marker existence . */ protected void check ( File source , String mname , int mline , String fname , int fline ) throws IOException { } }
if ( mline == - 1 && fline != - 1 ) { throw new IOException ( "Found " + fname + " marker (at line " + ( fline + 1 ) + ") but no " + mname + " marker in '" + source + "'." ) ; }
public class WSJdbcStatement { /** * < p > Close the first result set stored in childWrapper . < / p > * @ param closeWrapperOnly boolean flag to indicate that only wrapper - closure activities * should be performed , but close of the underlying object is unnecessary . * < p > When this method is called , the chi...
// close and remove the first result set // - remove childWrapper ! = null check since the precondition of this method // is that the childWrapper is not null try { ( ( WSJdbcObject ) childWrapper ) . close ( closeWrapperOnly ) ; } catch ( SQLException ex ) { // Just trace the error since we need to continue FFDCFilter...