signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class KamImpl { /** * { @ inheritDoc } */ @ Override public Set < KamNode > getAdjacentNodes ( KamNode kamNode ) { } }
return getAdjacentNodes ( kamNode , EdgeDirectionType . BOTH , null , null ) ;
public class Agg { /** * Get a { @ link Collector } that calculates the < code > FIRST < / code > function . * Note that unlike in ( Oracle ) SQL , where the < code > FIRST < / code > function * is an ordered set aggregate function that produces a set of results , this * collector just produces the first value in...
return Collectors . reducing ( ( v1 , v2 ) -> v1 ) ;
public class JavaUtils { /** * Liberty change start */ @ FFDCIgnore ( NumberFormatException . class ) private static boolean determineIsJava8Before161 ( String version ) { } }
try { return version != null && version . startsWith ( "1.8.0_" ) && Integer . parseInt ( version . substring ( 6 ) ) < 161 ; } catch ( NumberFormatException ex ) { // no - op } return false ;
public class Normalizer { /** * Check whether the given character sequence < code > src < / code > is normalized * according to the normalization method < code > form < / code > . * @ param src character sequence to check * @ param form normalization form to check against * @ return true if normalized according...
return normalize ( src , form ) . equals ( src ) ;
public class MetaMediaManager { /** * Our media front end should implement { @ link FrameParticipant } and call this method in their * { @ link FrameParticipant # tick } method . They must also first check { @ link # isPaused } and not * call this method if we are paused . As they will probably want to have willTic...
// now tick our animations and sprites _animmgr . tick ( tickStamp ) ; _spritemgr . tick ( tickStamp ) ; // if performance debugging is enabled , if ( FrameManager . _perfDebug . getValue ( ) ) { if ( _perfLabel == null ) { _perfLabel = new Label ( "" , Label . OUTLINE , Color . white , Color . black , new Font ( "Aria...
public class HttpConnection { /** * Attempts to shutdown the { @ link Socket } ' s output , via Socket . shutdownOutput ( ) * when running on JVM 1.3 or higher . * @ deprecated unused */ @ Deprecated public void shutdownOutput ( ) { } }
LOG . trace ( "enter HttpConnection.shutdownOutput()" ) ; try { socket . shutdownOutput ( ) ; } catch ( Exception ex ) { LOG . debug ( "Unexpected Exception caught" , ex ) ; // Ignore , and hope everything goes right } // close output stream ?
public class SettingsImpl { /** * Get the inputrc file , if not set it defaults to : * System . getProperty ( " user . home " ) + Config . getPathSeparator ( ) + " . inputrc " * @ return inputrc */ @ Override public File inputrc ( ) { } }
if ( inputrc == null ) { inputrc = new File ( System . getProperty ( "user.home" ) + Config . getPathSeparator ( ) + ".inputrc" ) ; } return inputrc ;
public class CmsUserIconHelper { /** * Returns the file suffix . < p > * @ param fileName the file name * @ return the suffix */ private String getSuffix ( String fileName ) { } }
int index = fileName . lastIndexOf ( "." ) ; if ( index > 0 ) { return fileName . substring ( index ) ; } else { return fileName ; }
public class Symbol { /** * An accessor method for the attributes of this symbol . * Attributes of class symbols should be accessed through the accessor * method to make sure that the class symbol is loaded . */ public List < Attribute . Compound > getRawAttributes ( ) { } }
return ( metadata == null ) ? List . < Attribute . Compound > nil ( ) : metadata . getDeclarationAttributes ( ) ;
public class DesktopPane { /** * ( non - Javadoc ) * @ see javax . swing . Icon # paintIcon ( java . awt . Component , java . awt . Graphics , int , int ) */ @ Override public void paintIcon ( Component c , Graphics g , int x , int y ) { } }
Graphics2D g2d = ( Graphics2D ) g . create ( ) ; g2d . translate ( x , y ) ; double coef1 = ( double ) this . width / ( double ) getOrigWidth ( ) ; double coef2 = ( double ) this . height / ( double ) getOrigHeight ( ) ; g2d . scale ( coef1 , coef2 ) ; paint ( g2d ) ; g2d . dispose ( ) ;
public class DijkstraSSSP { /** * Start the search . This method may only be invoked once . */ public void findSSSP ( ) { } }
Record < N , E > initRec = new Record < > ( init , 0.0f ) ; if ( records . put ( init , initRec ) != null ) { throw new IllegalStateException ( "Search has already been performed!" ) ; } SmartDynamicPriorityQueue < Record < N , E > > pq = BinaryHeap . create ( graph . size ( ) ) ; initRec . ref = pq . referencedAdd ( i...
public class ConvexHull { /** * Returns true if the given path of the input MultiPath is convex . Returns false otherwise . * \ param multi _ path The MultiPath to check if the path is convex . * \ param path _ index The path of the MultiPath to check if its convex . */ static boolean isPathConvex ( MultiPath multi...
MultiPathImpl mimpl = ( MultiPathImpl ) multi_path . _getImpl ( ) ; int path_start = mimpl . getPathStart ( path_index ) ; int path_end = mimpl . getPathEnd ( path_index ) ; boolean bxyclosed = ! mimpl . isClosedPath ( path_index ) && mimpl . isClosedPathInXYPlane ( path_index ) ; AttributeStreamOfDbl position = ( Attr...
public class Tuple15 { /** * Skip 7 degrees from this tuple . */ public final Tuple8 < T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 > skip7 ( ) { } }
return new Tuple8 < > ( v8 , v9 , v10 , v11 , v12 , v13 , v14 , v15 ) ;
public class TranscoderDB { /** * / * get _ transcoder _ entry */ public static Entry getEntry ( byte [ ] source , byte [ ] destination ) { } }
CaseInsensitiveBytesHash < Entry > sHash = transcoders . get ( source ) ; return sHash == null ? null : sHash . get ( destination ) ;
public class LifecycleInjector { /** * Create an injector that is a child of the bootstrap bindings only * @ param modules binding modules * @ return injector */ public Injector createChildInjector ( Collection < Module > modules ) { } }
Injector childInjector ; Collection < Module > localModules = modules ; for ( ModuleTransformer transformer : transformers ) { localModules = transformer . call ( localModules ) ; } // noinspection deprecation if ( mode == LifecycleInjectorMode . REAL_CHILD_INJECTORS ) { childInjector = injector . createChildInjector (...
public class ListFunctionsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListFunctionsRequest listFunctionsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listFunctionsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listFunctionsRequest . getMasterRegion ( ) , MASTERREGION_BINDING ) ; protocolMarshaller . marshall ( listFunctionsRequest . getFunctionVersion ( ) , FUNCTIONVERSIO...
public class BeanPropertyAccessor { /** * Returns a new or cached BeanPropertyAccessor for the given class . */ public static < B > BeanPropertyAccessor < B > forClass ( Class < B > clazz ) { } }
return forClass ( clazz , PropertySet . ALL ) ;
public class DirectoryServiceClient { /** * Get the Service . * @ param serviceName * the serviceName . * @ param watcher * the Watcher . * @ return * the ModelService . */ public ModelService getService ( String serviceName , Watcher watcher ) { } }
WatcherRegistration wcb = null ; if ( watcher != null ) { wcb = new WatcherRegistration ( serviceName , watcher ) ; } ProtocolHeader header = new ProtocolHeader ( ) ; header . setType ( ProtocolType . GetService ) ; GetServiceProtocol p = new GetServiceProtocol ( serviceName ) ; p . setWatcher ( watcher != null ) ; Get...
public class EasterRule { /** * Return true if the given Date is on the same day as Easter */ @ Override public boolean isOn ( Date date ) { } }
synchronized ( calendar ) { calendar . setTime ( date ) ; int dayOfYear = calendar . get ( Calendar . DAY_OF_YEAR ) ; calendar . setTime ( computeInYear ( calendar . getTime ( ) , calendar ) ) ; return calendar . get ( Calendar . DAY_OF_YEAR ) == dayOfYear ; }
public class RootDocImpl { /** * Do lazy initialization of " documentation " string . */ @ Override protected String documentation ( ) { } }
if ( documentation == null ) { JavaFileObject overviewPath = getOverviewPath ( ) ; if ( overviewPath == null ) { // no doc file to be had documentation = "" ; } else { // read from file try { documentation = readHTMLDocumentation ( overviewPath . openInputStream ( ) , overviewPath ) ; } catch ( IOException exc ) { docu...
public class PropertiesWriter { /** * Converts unicodes to encoded & # 92 ; uxxxx and escapes special characters * with a preceding slash */ private String saveConvert ( String theString , boolean escapeSpace ) { } }
int len = theString . length ( ) ; int bufLen = len * 2 ; if ( bufLen < 0 ) { bufLen = Integer . MAX_VALUE ; } StringBuffer outBuffer = new StringBuffer ( bufLen ) ; for ( int x = 0 ; x < len ; x ++ ) { char aChar = theString . charAt ( x ) ; // Handle common case first , selecting largest block that // avoids the spec...
public class ScrollAnimator { /** * Perform the " translateY " animation using the new scroll position and the old scroll position to show or hide * the animated view . * @ param oldScrollPosition * @ param newScrollPosition */ private void onScrollPositionChanged ( int oldScrollPosition , int newScrollPosition )...
int newScrollDirection ; if ( newScrollPosition < oldScrollPosition ) { newScrollDirection = SCROLL_TO_TOP ; } else { newScrollDirection = SCROLL_TO_BOTTOM ; } if ( directionHasChanged ( newScrollDirection ) ) { translateYAnimatedView ( newScrollDirection ) ; }
public class CreateTeaseTrainingSet { /** * read the data set */ private void run ( ) throws IOException { } }
PrintWriter pw = new PrintWriter ( new FileWriter ( outputFile ) ) ; LineNumberReader lr = new LineNumberReader ( new FileReader ( inputFile ) ) ; String line = null ; int j = 0 ; // String t = null ; while ( ( line = lr . readLine ( ) ) != null ) { logger . info ( j + " " + line ) ; pw . print ( "1" ) ; pw . print ( "...
public class PhaseThreeApplication { /** * Logic to recover from a failed protein family document . * @ param pn * @ param bldr * @ param pfLocation * @ param e * @ return */ private ProtoNetwork failProteinFamilies ( final ProtoNetwork pn , final StringBuilder bldr , String pfLocation , String errorMessage )...
bldr . append ( "PROTEIN FAMILY RESOLUTION FAILURE in " ) ; bldr . append ( pfLocation ) ; bldr . append ( "\n\treason: " ) ; bldr . append ( errorMessage ) ; stageWarning ( bldr . toString ( ) ) ; // could not resolve protein family resource so return original // proto network . return pn ;
public class BindDataSourceSubProcessor { /** * Process second round . * @ param annotations * the annotations * @ param roundEnv * the round env * @ return true , if successful */ public boolean processSecondRound ( Set < ? extends TypeElement > annotations , RoundEnvironment roundEnv ) { } }
for ( SQLiteDatabaseSchema schema : schemas ) { // Analyze beans BEFORE daos , because beans are needed for DAO // definition for ( String daoName : schema . getDaoNameSet ( ) ) { // check dao into bean definition if ( globalDaoGenerated . contains ( daoName ) ) { createSQLEntityFromDao ( schema , schema . getElement (...
public class SliderBar { /** * Draw the tick along the line . */ private void drawTicks ( ) { } }
// Abort if not attached if ( ! isAttached ( ) ) { return ; } // Draw the ticks int lineWidth = lineElement . getOffsetWidth ( ) ; if ( numTicks > 0 ) { // Create the ticks or make them visible for ( int i = 0 ; i <= numTicks ; i ++ ) { Element tick = null ; if ( i < tickElements . size ( ) ) { tick = tickElements . ge...
public class Splash { /** * Paints the image on the window . */ public void paint ( Graphics g ) { } }
g . drawImage ( image , 0 , 0 , this ) ; // Notify method splash that the window has been painted . if ( ! paintCalled ) { paintCalled = true ; synchronized ( this ) { notifyAll ( ) ; } }
public class CmsXmlPage { /** * Converts the XML structure of the pre 5.5.0 development version of * the XML page to the final 6.0 version . < p > */ private void convertOldDocument ( ) { } }
Document newDocument = DocumentHelper . createDocument ( ) ; Element root = newDocument . addElement ( NODE_PAGES ) ; root . add ( I_CmsXmlSchemaType . XSI_NAMESPACE ) ; root . addAttribute ( I_CmsXmlSchemaType . XSI_NAMESPACE_ATTRIBUTE_NO_SCHEMA_LOCATION , XMLPAGE_XSD_SYSTEM_ID ) ; Map < String , Element > pages = new...
public class HadoopResourceFinder { /** * Finds the file with the specified name and returns a reader for that * files contents . * @ param fileName the name of a file * @ return a { @ code BufferedReader } to the contents of the specified file * @ throws IOException if the resource cannot be found or if an err...
Path filePath = new Path ( fileName ) ; if ( ! hadoopFs . exists ( filePath ) ) { throw new IOException ( fileName + " does not exist in HDFS" ) ; } BufferedReader br = new BufferedReader ( new InputStreamReader ( hadoopFs . open ( filePath ) ) ) ; return br ;
public class TinyPlugz { /** * Default implementation for { @ link # getResource ( String ) } building upon * result of { @ link # getClassLoader ( ) } . * @ param name Name of the resource . * @ return An url to the resource . */ protected final Optional < URL > defaultGetResource ( String name ) { } }
return Optional . ofNullable ( getClassLoader ( ) . getResource ( name ) ) ;
public class Result { /** * For UPDATE _ RESULT results * The parameters are set by this method as the Result is reused */ public void setPreparedResultUpdateProperties ( Object [ ] parameterValues ) { } }
if ( navigator . getSize ( ) == 1 ) { ( ( RowSetNavigatorClient ) navigator ) . setData ( 0 , parameterValues ) ; } else { navigator . clear ( ) ; navigator . add ( parameterValues ) ; }
public class DefaultGroovyMethods { /** * Multiply a BigDecimal and a Double . * Note : This method was added to enforce the Groovy rule of * BigDecimal * Double = = Double . Without this method , the * multiply ( BigDecimal ) method in BigDecimal would respond * and return a BigDecimal instead . Since BigDecim...
return NumberMath . multiply ( left , right ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link IdentifierType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link IdentifierType } { @ code > } */ ...
return new JAXBElement < IdentifierType > ( _ParameterID_QNAME , IdentifierType . class , null , value ) ;
public class SparqlLogicConceptMatcher { /** * Obtain all the matching resources with the URIs of { @ code origin } within the range of MatchTypes provided , both inclusive . * @ param origins URIs to match * @ param minType the minimum MatchType we want to obtain * @ param maxType the maximum MatchType we want t...
return obtainMatchResults ( origins , minType , maxType ) ;
public class WebhookResourcesImpl { /** * Resets the shared secret for the specified Webhook . For more information about how a shared secret is used , * see Authenticating Callbacks . * It mirrors to the following Smartsheet REST API method : POST / webhooks / { webhookId } / resetsharedsecret * @ param webhookI...
HttpRequest request = createHttpRequest ( this . getSmartsheet ( ) . getBaseURI ( ) . resolve ( "webhooks/" + webhookId + "/resetsharedsecret" ) , HttpMethod . POST ) ; HttpResponse response = getSmartsheet ( ) . getHttpClient ( ) . request ( request ) ; WebhookSharedSecret secret = null ; switch ( response . getStatus...
public class CmsUser { /** * Sets the email address of this user . < p > * @ param email the email address to set */ public void setEmail ( String email ) { } }
checkEmail ( email ) ; if ( email != null ) { email = email . trim ( ) ; } m_email = email ;
public class SamlMetadataUIParserAction { /** * Gets entity id from request . * @ param requestContext the request context * @ return the entity id from request */ protected String getEntityIdFromRequest ( final RequestContext requestContext ) { } }
val request = WebUtils . getHttpServletRequestFromExternalWebflowContext ( requestContext ) ; return request . getParameter ( this . entityIdParameterName ) ;
public class Part { /** * Get the table name . */ public String getTableNames ( boolean bAddQuotes ) { } }
return ( m_tableName == null ) ? Record . formatTableNames ( PART_FILE , bAddQuotes ) : super . getTableNames ( bAddQuotes ) ;
public class NumberSelectorServiceImpl { /** * Here we expect a perfect match in DB . * Several rules regarding organization scoping will be applied in the DAO * filter to ensure only applicable numbers in DB are retrieved . * @ param number the number to match against IncomingPhoneNumbersDao * @ param sourceOr...
NumberSelectionResult matchedNumber = new NumberSelectionResult ( null , false , null ) ; IncomingPhoneNumberFilter . Builder filterBuilder = IncomingPhoneNumberFilter . Builder . builder ( ) ; filterBuilder . byPhoneNumber ( number ) ; int unfilteredCount = numbersDao . getTotalIncomingPhoneNumbers ( filterBuilder . b...
public class WebFragmentTypeImpl { /** * Returns all < code > security - role < / code > elements * @ return list of < code > security - role < / code > */ public List < SecurityRoleType < WebFragmentType < T > > > getAllSecurityRole ( ) { } }
List < SecurityRoleType < WebFragmentType < T > > > list = new ArrayList < SecurityRoleType < WebFragmentType < T > > > ( ) ; List < Node > nodeList = childNode . get ( "security-role" ) ; for ( Node node : nodeList ) { SecurityRoleType < WebFragmentType < T > > type = new SecurityRoleTypeImpl < WebFragmentType < T > >...
public class ValidDBInstanceModificationsMessage { /** * Valid storage options for your DB instance . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setStorage ( java . util . Collection ) } or { @ link # withStorage ( java . util . Collection ) } if you wan...
if ( this . storage == null ) { setStorage ( new java . util . ArrayList < ValidStorageOptions > ( storage . length ) ) ; } for ( ValidStorageOptions ele : storage ) { this . storage . add ( ele ) ; } return this ;
public class ViSearch { /** * send search actions after finishing search * @ param action * @ param reqId */ private void sendSolutionActions ( String action , String reqId ) { } }
if ( reqId != null && ! reqId . equals ( "" ) ) { Map < String , String > map = Maps . newHashMap ( ) ; map . put ( "action" , action ) ; map . put ( "reqid" , reqId ) ; this . sendEvent ( map ) ; }
public class ExpressionAggregate { /** * Get the result of a SetFunction or an ordinary value * @ param currValue instance of set function or value * @ param session context * @ return object */ public Object getAggregatedValue ( Session session , Object currValue ) { } }
if ( currValue == null ) { // A VoltDB extension APPROX _ COUNT _ DISTINCT return opType == OpTypes . COUNT || opType == OpTypes . APPROX_COUNT_DISTINCT ? ValuePool . INTEGER_0 : null ; /* disable 2 lines . . . return opType = = OpTypes . COUNT ? ValuePool . INTEGER _ 0 : null ; . . . disabled 2 lines */ // End o...
public class FileHdrScreen { /** * Set up all the screen fields . */ public void setupSFields ( ) { } }
Record query = this . getMainRecord ( ) ; for ( int fieldSeq = query . getFieldSeq ( FileHdr . FILE_NAME ) ; fieldSeq < query . getFieldSeq ( FileHdr . FILE_NOTES ) ; fieldSeq ++ ) query . getField ( fieldSeq ) . setupFieldView ( this ) ; // Add this view to the list for ( int fieldSeq = query . getFieldSeq ( FileHdr ....
public class MwRevisionDumpFileProcessor { /** * Processes current XML starting from a & lt ; siteinfo & gt ; start tag up to * the corresponding end tag . This method uses the current state of * { @ link # xmlReader } and stores its results in according member fields . * When the method has finished , { @ link #...
this . xmlReader . next ( ) ; // skip current start tag while ( this . xmlReader . hasNext ( ) ) { switch ( this . xmlReader . getEventType ( ) ) { case XMLStreamConstants . START_ELEMENT : switch ( xmlReader . getLocalName ( ) ) { case MwRevisionDumpFileProcessor . E_SITENAME : this . sitename = this . xmlReader . get...
public class WordNumberCollectorBundle { /** * Add word word number collector bundle . * @ param key the key * @ param word the word * @ return the word number collector bundle */ public WordNumberCollectorBundle addWord ( String key , String word ) { } }
wordCollector . add ( key , word ) ; return this ;
public class ClosureRewriteModule { /** * Rewrites top level var names from * " var foo ; console . log ( foo ) ; " to * " var module $ contents $ Foo _ foo ; console . log ( module $ contents $ Foo _ foo ) ; " */ private void maybeUpdateTopLevelName ( NodeTraversal t , Node nameNode ) { } }
String name = nameNode . getString ( ) ; if ( ! currentScript . isModule || ! currentScript . topLevelNames . contains ( name ) ) { return ; } Var var = t . getScope ( ) . getVar ( name ) ; // If the name refers to a var that is not from the top level scope . if ( var == null || var . getScope ( ) . getRootNode ( ) != ...
public class AsymmetricCrypto { /** * 加密 * @ param data 被加密的bytes * @ param keyType 私钥或公钥 { @ link KeyType } * @ return 加密后的bytes */ @ Override public byte [ ] encrypt ( byte [ ] data , KeyType keyType ) { } }
final Key key = getKeyByType ( keyType ) ; final int inputLen = data . length ; final int maxBlockSize = this . encryptBlockSize < 0 ? inputLen : this . encryptBlockSize ; lock . lock ( ) ; try ( ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ; ) { cipher . init ( Cipher . ENCRYPT_MODE , key ) ; int offSet =...
public class LazyObject { /** * Fields for an object are attached as children on the token representing * the object itself . This method finds the correct field for a given key * and returns its first child - the child being the value for that field . * This is a utility method used internally to extract field v...
LazyNode child = root . child ; while ( child != null ) { if ( keyMatch ( key , child ) ) { return child . child ; } child = child . next ; } throw new LazyException ( "Unknown field '" + key + "'" ) ;
public class CPDefinitionVirtualSettingUtil { /** * Returns the cp definition virtual setting where classNameId = & # 63 ; and classPK = & # 63 ; or returns < code > null < / code > if it could not be found , optionally using the finder cache . * @ param classNameId the class name ID * @ param classPK the class pk ...
return getPersistence ( ) . fetchByC_C ( classNameId , classPK , retrieveFromCache ) ;
public class Utils { /** * Converts the first character of the string to uppercase . Does NOT deal with surrogate pairs . */ public static String initCaps ( String in ) { } }
return in . length ( ) < 2 ? in . toUpperCase ( ) : in . substring ( 0 , 1 ) . toUpperCase ( ) + in . substring ( 1 ) ;
public class AbstractTrace { /** * ( non - Javadoc ) * @ see com . ibm . ws . objectManager . utils . Trace # debug ( java . lang . Object , java . lang . Class , java . lang . String , java . lang . Object ) */ public final void debug ( Object source , Class sourceClass , String methodName , Object object ) { } }
debug ( source , sourceClass , methodName , new Object [ ] { object } ) ;
public class IO { /** * { @ inheritDoc } */ @ Override public final < B > IO < B > zip ( Applicative < Function < ? super A , ? extends B > , IO < ? > > appFn ) { } }
@ SuppressWarnings ( "unchecked" ) IO < Object > source = ( IO < Object > ) this ; @ SuppressWarnings ( "unchecked" ) IO < Function < Object , Object > > zip = ( IO < Function < Object , Object > > ) ( Object ) appFn ; return new Compose < > ( source , a ( zip ) ) ;
public class Predicate { /** * Gets the operator value for this Predicate . * @ return operator * The operator to use for filtering the data returned . * < span class = " constraint Required " > This field is required * and should not be { @ code null } . < / span > */ public com . google . api . ads . adwords . ...
return operator ;
public class FontFidelityImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } }
switch ( featureID ) { case AfplibPackage . FONT_FIDELITY__STP_FNT_EX : return getStpFntEx ( ) ; } return super . eGet ( featureID , resolve , coreType ) ;
public class InternalXtextParser { /** * InternalXtext . g : 128:1 : entryRuleAbstractMetamodelDeclaration : ruleAbstractMetamodelDeclaration EOF ; */ public final void entryRuleAbstractMetamodelDeclaration ( ) throws RecognitionException { } }
try { // InternalXtext . g : 129:1 : ( ruleAbstractMetamodelDeclaration EOF ) // InternalXtext . g : 130:1 : ruleAbstractMetamodelDeclaration EOF { before ( grammarAccess . getAbstractMetamodelDeclarationRule ( ) ) ; pushFollow ( FollowSets000 . FOLLOW_1 ) ; ruleAbstractMetamodelDeclaration ( ) ; state . _fsp -- ; afte...
public class Solo { /** * Checks if a CheckBox displaying the specified text is checked . * @ param text the text that the { @ link CheckBox } displays , specified as a regular expression * @ return { @ code true } if a { @ link CheckBox } displaying the specified text is checked and { @ code false } if it is not c...
if ( config . commandLogging ) { Log . d ( config . commandLoggingTag , "isCheckBoxChecked(\"" + text + "\")" ) ; } return checker . isButtonChecked ( CheckBox . class , text ) ;
public class CDDImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case AfplibPackage . CDD__XOC_BASE : setXocBase ( ( Integer ) newValue ) ; return ; case AfplibPackage . CDD__YOC_BASE : setYocBase ( ( Integer ) newValue ) ; return ; case AfplibPackage . CDD__XOC_UNITS : setXocUnits ( ( Integer ) newValue ) ; return ; case AfplibPackage . CDD__YOC_UNITS : setYo...
public class XMLHelper { /** * Get the first direct child element of the passed element . * @ param aStartNode * The element to start searching . May be < code > null < / code > . * @ return < code > null < / code > if the passed element does not have any direct * child element . */ @ Nullable public static Ele...
if ( aStartNode == null ) return null ; return NodeListIterator . createChildNodeIterator ( aStartNode ) . findFirstMapped ( filterNodeIsElement ( ) , x -> ( Element ) x ) ;
public class ImgCompressUtils { /** * 采用JPEG编码图片 * @ param desFile 指定压缩后图片存放地址 , 包括图片名称 * @ param desImg 编码源图片 * @ param quality 编码质量 * @ throws Exception */ private static void encodeImg ( String desFile , BufferedImage desImg , Float quality ) { } }
FileOutputStream out = null ; try { if ( quality != null ) { if ( quality > 1.0 || quality < 0.0 ) { throw new Exception ( "quality参数指定值不正确" ) ; } } out = new FileOutputStream ( desFile ) ; // 图片采用JPEG格式编码 JPEGImageEncoder encoder = JPEGCodec . createJPEGEncoder ( out ) ; if ( quality != null ) { // 编码参数 JPEGEncodePara...
public class RPC { /** * Construct a server for a protocol implementation instance listening on a * port and address . */ public static Server getServer ( final Object instance , final String bindAddress , final int port , final int numHandlers ) throws IOException { } }
return new Server ( instance , bindAddress , port , numHandlers ) ;
public class StandardResponsesApi { /** * Remove a Standard Response from Favorites * @ param id id of the Standard Response to remove from Favorites ( required ) * @ param removeFavoritesData Request parameters . ( optional ) * @ return ApiSuccessResponse * @ throws ApiException If fail to call the API , e . g...
ApiResponse < ApiSuccessResponse > resp = deleteStandardResponseFavoriteWithHttpInfo ( id , removeFavoritesData ) ; return resp . getData ( ) ;
public class Nfs3 { /** * / * ( non - Javadoc ) * @ see com . emc . ecs . nfsclient . nfs . Nfs # wrapped _ sendRmdir ( com . emc . ecs . nfsclient . nfs . NfsRmdirRequest ) */ public Nfs3RmdirResponse wrapped_sendRmdir ( NfsRmdirRequest request ) throws IOException { } }
RpcResponseHandler < Nfs3RmdirResponse > responseHandler = new NfsResponseHandler < Nfs3RmdirResponse > ( ) { /* ( non - Javadoc ) * @ see com . emc . ecs . nfsclient . rpc . RpcResponseHandler # makeNewResponse ( ) */ protected Nfs3RmdirResponse makeNewResponse ( ) { return new Nfs3RmdirResponse ( ) ; } } ; _rpcWrap...
public class ScanBenchmark { /** * / * Just get everything */ private static Druids . ScanQueryBuilder basicA ( final BenchmarkSchemaInfo basicSchema ) { } }
final QuerySegmentSpec intervalSpec = new MultipleIntervalSegmentSpec ( Collections . singletonList ( basicSchema . getDataInterval ( ) ) ) ; return Druids . newScanQueryBuilder ( ) . dataSource ( "blah" ) . intervals ( intervalSpec ) . order ( ordering ) ;
public class CommerceUserSegmentCriterionPersistenceImpl { /** * Removes all the commerce user segment criterions where commerceUserSegmentEntryId = & # 63 ; from the database . * @ param commerceUserSegmentEntryId the commerce user segment entry ID */ @ Override public void removeByCommerceUserSegmentEntryId ( long ...
for ( CommerceUserSegmentCriterion commerceUserSegmentCriterion : findByCommerceUserSegmentEntryId ( commerceUserSegmentEntryId , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ) { remove ( commerceUserSegmentCriterion ) ; }
public class MPIO { /** * Test whether or not a particular ME is reachable . * @ param me The ME to test . * @ return True if TRM has a path to this ME , false otherwise . */ public boolean isMEReachable ( SIBUuid8 meUuid ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "isMEReachable" , new Object [ ] { this , meUuid } ) ; boolean result = ( findMPConnection ( meUuid ) != null ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "isMEReachable"...
public class NFSubstitution { /** * Parses the description , creates the right kind of substitution , * and initializes it based on the description . * @ param pos The substitution ' s position in the rule text of the * rule that owns it . * @ param rule The rule containing this substitution * @ param rulePre...
// if the description is empty , return a NullSubstitution if ( description . length ( ) == 0 ) { return null ; } switch ( description . charAt ( 0 ) ) { case '<' : if ( rule . getBaseValue ( ) == NFRule . NEGATIVE_NUMBER_RULE ) { // throw an exception if the rule is a negative number rule // / CLOVER : OFF // If you l...
public class BasicValidator { /** * the Bond tests */ private ValidationReport validateStereoChemistry ( IBond bond ) { } }
ValidationReport report = new ValidationReport ( ) ; ValidationTest bondStereo = new ValidationTest ( bond , "Defining stereochemistry on bonds is not safe." , "Use atom based stereochemistry." ) ; if ( bond . getStereo ( ) != IBond . Stereo . NONE ) { report . addWarning ( bondStereo ) ; } else { report . addOK ( bond...
public class FilesystemPath { /** * Essentially chroot */ public PathImpl createRoot ( SchemeMap schemeMap ) { } }
FilesystemPath restriction = ( FilesystemPath ) copy ( ) ; restriction . _schemeMap = schemeMap ; restriction . _root = this ; restriction . _pathname = "/" ; restriction . _userPath = "/" ; return restriction ;
public class HadoopRandomIndexing { /** * Creates an { @ link IntegerVector } of the kind specified by the user . */ private IntegerVector createSemanticVector ( ) { } }
IntegerVector v = ( useSparseSemantics ) ? new CompactSparseIntegerVector ( vectorLength ) : new DenseIntVector ( vectorLength ) ; return v ;
public class RequestExpirationScheduler { /** * Aborts the scheduled request . If force is true , it will abort even if the request is not completed * @ param requestId , unique identifier of the request * @ param force , force abort */ public void abortScheduling ( String requestId , boolean force ) { } }
if ( trace ) { log . tracef ( "Request[%s] abort scheduling" , requestId ) ; } ScheduledRequest scheduledRequest = scheduledRequests . get ( requestId ) ; if ( scheduledRequest != null && ( scheduledRequest . request . isDone ( ) || force ) ) { scheduledRequest . scheduledFuture . cancel ( false ) ; scheduledRequests ....
public class SparkUtils { /** * Write an object to HDFS ( or local ) using default Java object serialization * @ param path Path to write the object to * @ param toWrite Object to write * @ param sc Spark context */ public static void writeObjectToFile ( String path , Object toWrite , SparkContext sc ) throws IOE...
writeObjectToFile ( path , toWrite , sc . hadoopConfiguration ( ) ) ;
public class LogImpl { /** * Set if debugging is on or off . * @ param debug */ public synchronized void setDebug ( boolean debug ) { } }
boolean oldDebug = _debugOn ; if ( _debugOn && ! debug ) this . message ( DEBUG , "DEBUG OFF" ) ; _debugOn = debug ; if ( ! oldDebug && debug ) this . message ( DEBUG , "DEBUG ON" ) ;
public class MaterialComboBox { /** * Set directly all the values that will be stored into * combobox and build options into it . */ public void setValues ( List < T > values , boolean fireEvents ) { } }
String [ ] stringValues = new String [ values . size ( ) ] ; for ( int i = 0 ; i < values . size ( ) ; i ++ ) { stringValues [ i ] = keyFactory . generateKey ( values . get ( i ) ) ; } suppressChangeEvent = ! fireEvents ; $ ( listbox . getElement ( ) ) . val ( stringValues ) . trigger ( "change" , selectedIndex ) ; sup...
public class AbstractUserArgumentProcessor { /** * Do a DB search with the input file against representative PDB domains * @ param cache * @ param searchFile * @ param outputFile * @ throws ConfigurationException */ private void runDbSearch ( AtomCache cache , String searchFile , String outputFile , int useNrCP...
System . out . println ( "will use " + useNrCPUs + " CPUs." ) ; PDBFileReader reader = new PDBFileReader ( ) ; Structure structure1 = null ; try { structure1 = reader . getStructure ( searchFile ) ; } catch ( IOException e ) { throw new ConfigurationException ( "could not parse as PDB file: " + searchFile ) ; } File se...
public class ListTemplateElementBuilder { /** * Adds a button which redirects to an URL when clicked to the current * { @ link ListTemplateElement } . There can be at most 3 buttons per element . * @ param title * the button label . * @ param url * the URL to whom redirect when clicked . * @ return this bui...
Button button = ButtonFactory . createUrlButton ( title , url ) ; this . element . addButton ( button ) ; return this ;
public class XmlHttpProxyServlet { /** * / * Allow for a EL style replacements in the serviceURL * The constant REMOTE _ USER will replace the contents of $ { REMOTE _ USER } * with the return value of request . getRemoteUserver ( ) if it is not null * otherwise the $ { REMOTE _ USER } is replaced with a blank . ...
String serviceURL = url ; int start = url . indexOf ( "${" ) ; int end = url . indexOf ( "}" , start ) ; if ( end != - 1 ) { String prop = url . substring ( start + 2 , end ) . trim ( ) ; // no matter what we will remove the $ { } // default to blank like the JSP EL String replace = "" ; if ( REMOTE_USER . equals ( pro...
public class Manager { /** * Reads all registered output parameters from specified statement . * @ param connection an SQL database connection . * @ param statement an SQL callable statement . * @ throws SQLException if error occurs while setting up parameters . * @ see Connection * @ see Statement * @ sinc...
for ( Object key : mappings . keySet ( ) ) { Parameter parameter = mappings . get ( key ) ; if ( parameter . getOutput ( ) != null ) { Object output = statement . read ( key ) ; Converter decoder = parameter . getDecoder ( ) ; if ( decoder != null ) { output = decoder . perform ( connection , output ) ; } parameter . g...
public class TridiagonalDecompositionHouseholder_DDRM { /** * Extracts the tridiagonal matrix found in the decomposition . * @ param T If not null then the results will be stored here . Otherwise a new matrix will be created . * @ return The extracted T matrix . */ @ Override public DMatrixRMaj getT ( DMatrixRMaj T...
T = UtilDecompositons_DDRM . checkZeros ( T , N , N ) ; T . data [ 0 ] = QT . data [ 0 ] ; for ( int i = 1 ; i < N ; i ++ ) { T . set ( i , i , QT . get ( i , i ) ) ; double a = QT . get ( i - 1 , i ) ; T . set ( i - 1 , i , a ) ; T . set ( i , i - 1 , a ) ; } if ( N > 1 ) { T . data [ ( N - 1 ) * N + N - 1 ] = QT . da...
public class Redwood { /** * Captures System . out and System . err and redirects them * to Redwood logging . * @ param captureOut True is System . out should be captured * @ param captureErr True if System . err should be captured */ protected static void captureSystemStreams ( boolean captureOut , boolean captu...
if ( captureOut ) { System . setOut ( new RedwoodPrintStream ( STDOUT , realSysOut ) ) ; } if ( captureErr ) { System . setErr ( new RedwoodPrintStream ( STDERR , realSysErr ) ) ; }
public class jazz_license { /** * < pre > * Converts API response of bulk operation into object and returns the object array in case of get request . * < / pre > */ protected base_resource [ ] get_nitro_bulk_response ( nitro_service service , String response ) throws Exception { } }
jazz_license_responses result = ( jazz_license_responses ) service . get_payload_formatter ( ) . string_to_resource ( jazz_license_responses . class , response ) ; if ( result . errorcode != 0 ) { if ( result . errorcode == SESSION_NOT_EXISTS ) service . clear_session ( ) ; throw new nitro_exception ( result . message ...
public class EhCacheService { /** * Gets an entry from the cache . * @ param key Item key . * @ return the stored object , { @ literal null } if none of expired . */ @ Override public Object get ( String key ) { } }
Element element = cache . get ( key ) ; if ( element != null ) { return element . getObjectValue ( ) ; } return null ;
public class DateUtils { /** * Roll the java . util . Date forward or backward . * @ param startDate - The start date * @ param period Calendar . YEAR etc * @ param amount - Negative to rollbackwards . */ public static java . util . Date rollDateTime ( java . util . Date startDate , int period , int amount ) { } ...
GregorianCalendar gc = new GregorianCalendar ( ) ; gc . setTime ( startDate ) ; gc . add ( period , amount ) ; return new java . util . Date ( gc . getTime ( ) . getTime ( ) ) ;
public class SimpleDocTreeVisitor { /** * { @ inheritDoc } This implementation calls { @ code defaultAction } . * @ param node { @ inheritDoc } * @ param p { @ inheritDoc } * @ return the result of { @ code defaultAction } */ @ Override public R visitIndex ( IndexTree node , P p ) { } }
return defaultAction ( node , p ) ;
public class DoubleParameter { /** * Set the minimum value . The minimum value is an acceptable value if and * only if inclusive is set to true . * @ param minimumValue the minimum value * @ param inclusive whether the minimum value is a valid value * @ return this */ public DoubleParameter setMinimumValue ( do...
if ( hasDefaultValue ) { if ( inclusive ) { Util . checkParameter ( minimumValue <= defaultValue , "Minimum value (" + minimumValue + ") must be less than or equal to default (" + defaultValue + ")" ) ; } else { Util . checkParameter ( minimumValue < defaultValue , "Minimum value (" + minimumValue + ") must be less tha...
public class Encryptor { /** * < p > Generates an initialization vector . < / p > */ private byte [ ] generateIV ( ) { } }
byte [ ] iv = new byte [ ivLength ] ; SecureRandom random = new SecureRandom ( ) ; random . nextBytes ( iv ) ; return iv ;
public class AbstractDockerMojo { /** * Attempt to load a GCR compatible RegistryAuthSupplier based on a few conditions : * < ol > * < li > First check to see if the environemnt variable DOCKER _ GOOGLE _ CREDENTIALS is set and points * to a readable file < / li > * < li > Otherwise check if the Google Applicat...
GoogleCredentials credentials = null ; final String googleCredentialsPath = System . getenv ( "DOCKER_GOOGLE_CREDENTIALS" ) ; if ( googleCredentialsPath != null ) { final File file = new File ( googleCredentialsPath ) ; if ( file . exists ( ) ) { try { try ( FileInputStream inputStream = new FileInputStream ( file ) ) ...
public class PushOptions { /** * Sets the sort value for the update * @ param field the field to sort by * @ param direction the direction of the sort * @ return this */ public PushOptions sort ( final String field , final int direction ) { } }
if ( sort != null ) { throw new IllegalStateException ( "sortDocument can not be set if sort already is" ) ; } if ( sortDocument == null ) { sortDocument = new BasicDBObject ( ) ; } sortDocument . put ( field , direction ) ; return this ;
public class Timecode { /** * Breaks a string on any non - numeric character and returns the index token , zero indexed */ private int getToken ( String inString , int index ) throws Timecode . TimecodeException { } }
inString = inString . trim ( ) ; String valid = "0123456789" ; String token = "" ; int count = 0 ; for ( int i = 0 ; i < inString . length ( ) ; i ++ ) { char current = inString . charAt ( i ) ; if ( valid . indexOf ( current ) > - 1 ) { token += current ; } else { count ++ ; if ( count > index ) break ; // Found the t...
public class Matrix4d { /** * Set the values of this matrix by reading 16 float values from the given { @ link ByteBuffer } in column - major order , * starting at its current position . * The ByteBuffer is expected to contain the values in column - major order . * The position of the ByteBuffer will not be chang...
MemUtil . INSTANCE . getf ( this , buffer . position ( ) , buffer ) ; properties = 0 ; return this ;
public class DefaultDOManager { /** * Checks the object registry for the given object . */ @ Override public boolean objectExists ( String pid ) throws StorageDeviceException { } }
boolean registered = objectExistsInRegistry ( pid ) ; boolean exists = false ; if ( ! registered && m_checkableStore ) { try { exists = ( ( ICheckable ) m_permanentStore ) . objectExists ( pid ) ; } catch ( LowlevelStorageException e ) { throw new StorageDeviceException ( e . getMessage ( ) , e ) ; } } if ( exists && !...
public class JDBCXAResource { /** * Stub . See implementation comment in the method for why this is * not implemented yet . * @ return false . */ public boolean isSameRM ( XAResource xares ) throws XAException { } }
if ( ! ( xares instanceof JDBCXAResource ) ) { return false ; } return xaDataSource == ( ( JDBCXAResource ) xares ) . getXADataSource ( ) ;
public class Aggregate { /** * < div color = ' red ' style = " font - size : 24px ; color : red " > < b > < i > < u > JCYPHER < / u > < / i > < / b > < / div > * < div color = ' red ' style = " font - size : 18px ; color : red " > < i > calculate the standard deviation for a given value over a group ; * < br / > us...
ReturnExpression rx = getReturnExpression ( ) ; ReturnAggregate ra = ( ReturnAggregate ) rx . getReturnValue ( ) ; ra . setType ( AggregateFunctionType . STDEV ) ; ra . setArgument ( property ) ; RElement < RElement < ? > > ret = new RElement < RElement < ? > > ( rx ) ; return ret ;
public class BNFHeadersImpl { /** * Save a reference to a new buffer with header parse information . This is * not part of the " created list " and will not be released by this message * class . * @ param buffer */ public void addParseBuffer ( WsByteBuffer buffer ) { } }
// increment where we ' re about to put the new buffer in int index = ++ this . parseIndex ; if ( null == this . parseBuffers ) { // first parse buffer to track this . parseBuffers = new WsByteBuffer [ BUFFERS_INITIAL_SIZE ] ; this . parseBuffersStartPos = new int [ BUFFERS_INITIAL_SIZE ] ; for ( int i = 0 ; i < BUFFER...
public class StencilEngine { /** * Sets the active global scopes * @ param globalScopes New active global scopes */ public void setGlobalScopes ( Iterable < GlobalScope > globalScopes ) { } }
this . globalScopes = Lists . newArrayList ( Iterables . concat ( globalScopes , serviceGlobalScopes ) ) ;
public class LoadBalancerLoadBalancingRulesInner { /** * Gets all the load balancing rules in a load balancer . * @ param resourceGroupName The name of the resource group . * @ param loadBalancerName The name of the load balancer . * @ throws IllegalArgumentException thrown if parameters fail the validation * @...
return listWithServiceResponseAsync ( resourceGroupName , loadBalancerName ) . map ( new Func1 < ServiceResponse < Page < LoadBalancingRuleInner > > , Page < LoadBalancingRuleInner > > ( ) { @ Override public Page < LoadBalancingRuleInner > call ( ServiceResponse < Page < LoadBalancingRuleInner > > response ) { return ...
public class ExceptionUtils { /** * < p > Produces a < code > List < / code > of stack frames - the message * is not included . Only the trace of the specified exception is * returned , any caused by trace is stripped . < / p > * < p > This works in most cases - it will only fail if the exception * message cont...
final String stackTrace = getStackTrace ( t ) ; final String linebreak = System . lineSeparator ( ) ; final StringTokenizer frames = new StringTokenizer ( stackTrace , linebreak ) ; final List < String > list = new ArrayList < > ( ) ; boolean traceStarted = false ; while ( frames . hasMoreTokens ( ) ) { final String to...
public class JcrManagedConnection { /** * Gets the metadata information for this connection ' s underlying EIS resource manager instance . * @ return ManagedConnectionMetaData instance * @ throws ResourceException generic exception if operation fails */ @ Override public ManagedConnectionMetaData getMetaData ( ) th...
try { return new JcrManagedConnectionMetaData ( mcf . getRepository ( ) , session ) ; } catch ( Exception e ) { throw new ResourceException ( e ) ; }
public class AnalyzeLocal { /** * Analyze the data quality of sequence data - provides a report on missing values , values that don ' t comply with schema , etc * @ param schema Schema for data * @ param data Data to analyze * @ return DataQualityAnalysis object */ public static DataQualityAnalysis analyzeQuality...
int nColumns = schema . numColumns ( ) ; List < QualityAnalysisState > states = new ArrayList < > ( ) ; QualityAnalysisAddFunction addFn = new QualityAnalysisAddFunction ( schema ) ; while ( data . hasNext ( ) ) { List < List < Writable > > seq = data . sequenceRecord ( ) ; for ( List < Writable > step : seq ) { states...
public class TaskExecutor { @ Override public CompletableFuture < Acknowledge > submitTask ( TaskDeploymentDescriptor tdd , JobMasterId jobMasterId , Time timeout ) { } }
try { final JobID jobId = tdd . getJobId ( ) ; final JobManagerConnection jobManagerConnection = jobManagerTable . get ( jobId ) ; if ( jobManagerConnection == null ) { final String message = "Could not submit task because there is no JobManager " + "associated for the job " + jobId + '.' ; log . debug ( message ) ; th...