signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class BaseConvertToMessage { /** * Create the root element for this message .
* You SHOULD override this if the unmarshaller has a native method to unmarshall a dom node .
* @ return The root element . */
public Object unmarshalRootElement ( Node node , BaseXmlTrxMessageIn soapTrxMessage ) throws Exception {... | // Override this ! ( If you can ! )
TransformerFactory tFact = TransformerFactory . newInstance ( ) ; Source source = new DOMSource ( node ) ; Writer writer = new StringWriter ( ) ; Result result = new StreamResult ( writer ) ; Transformer transformer = tFact . newTransformer ( ) ; transformer . transform ( source , re... |
public class GoogleHadoopFileSystemBase { /** * { @ inheritDoc } */
@ Override public void setXAttr ( Path path , String name , byte [ ] value , EnumSet < XAttrSetFlag > flags ) throws IOException { } } | logger . atFine ( ) . log ( "GHFS.setXAttr: %s, %s, %s, %s" , path , name , lazy ( ( ) -> new String ( value , UTF_8 ) ) , flags ) ; checkNotNull ( path , "path should not be null" ) ; checkNotNull ( name , "name should not be null" ) ; checkArgument ( flags != null && ! flags . isEmpty ( ) , "flags should not be null ... |
public class EOCImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public boolean eIsSet ( int featureID ) { } } | switch ( featureID ) { case AfplibPackage . EOC__OBJ_CNAME : return OBJ_CNAME_EDEFAULT == null ? objCName != null : ! OBJ_CNAME_EDEFAULT . equals ( objCName ) ; case AfplibPackage . EOC__TRIPLETS : return triplets != null && ! triplets . isEmpty ( ) ; } return super . eIsSet ( featureID ) ; |
public class GenericConnectionFactory { /** * { @ inheritDoc } */
public Connection getJdbcConnection ( boolean readOnly ) throws RepositoryException { } } | try { Connection conn = dbDataSource . getConnection ( ) ; if ( readOnly ) { // set this feature only if it asked
conn . setReadOnly ( readOnly ) ; } return conn ; } catch ( SQLException e ) { String err = "Error of JDBC connection open. SQLException: " + e . getMessage ( ) + ", SQLState: " + e . getSQLState ( ) + ", V... |
public class VFS { /** * Create and mount a real file system , returning a single handle which will unmount and close the filesystem when
* closed .
* @ param realRoot the real filesystem root
* @ param mountPoint the point at which the filesystem should be mounted
* @ return a handle
* @ throws IOException i... | return doMount ( new RealFileSystem ( realRoot ) , mountPoint ) ; |
public class Currency { /** * Returns the set of available currencies . The returned set of currencies contains all of the
* available currencies , including obsolete ones . The result set can be modified without
* affecting the available currencies in the runtime .
* @ return The set of available currencies . Th... | CurrencyMetaInfo info = CurrencyMetaInfo . getInstance ( ) ; List < String > list = info . currencies ( CurrencyFilter . all ( ) ) ; HashSet < Currency > resultSet = new HashSet < Currency > ( list . size ( ) ) ; for ( String code : list ) { resultSet . add ( getInstance ( code ) ) ; } return resultSet ; |
public class CmsSolrCopyModifiedUpateProcessorFactory { /** * Read the parameters on initialization .
* @ see org . apache . solr . update . processor . UpdateRequestProcessorFactory # init ( org . apache . solr . common . util . NamedList ) */
@ Override public void init ( NamedList args ) { } } | Object regex = args . remove ( PARAM_REGEX ) ; if ( null == regex ) { throw new SolrException ( ErrorCode . SERVER_ERROR , "Missing required init parameter: " + PARAM_REGEX ) ; } try { m_regex = Pattern . compile ( regex . toString ( ) ) ; } catch ( PatternSyntaxException e ) { throw new SolrException ( ErrorCode . SER... |
public class AbstractExtensionPropertySerializer { /** * Creates a new { @ link Element } with the given name and text content .
* @ param document the document used to create the new { @ link Element } .
* @ param elementName the name of the element to create
* @ param elementTextContent the text content of the ... | Element element = createRootElement ( document , elementName ) ; element . setTextContent ( elementTextContent ) ; return element ; |
public class MessageLogGridScreen { /** * Does the current user have permission to access this screen .
* @ return NORMAL _ RETURN if access is allowed , ACCESS _ DENIED or LOGIN _ REQUIRED otherwise . */
public int checkSecurity ( ) { } } | int iErrorCode = super . checkSecurity ( ) ; if ( ( iErrorCode == DBConstants . NORMAL_RETURN ) || ( iErrorCode == Constants . READ_ACCESS ) ) { // Okay , their group can access this screen , but can this user access this data ?
String strUserContactType = this . getProperty ( DBParams . CONTACT_TYPE ) ; String strUser... |
public class Alignments { /** * Return the alignment matches in the specified alignment pair as 0 - based [ closed , open ) ranges .
* @ param alignmentPair alignment pair , must not be null
* @ return the alignment matches in the alignment pair as 0 - based [ closed , open ) ranges */
public static List < Range < ... | checkNotNull ( alignmentPair ) ; List < Range < Long > > matches = new ArrayList < Range < Long > > ( ) ; int matchStart = - 1 ; for ( int i = 1 , length = alignmentPair . length ( ) + 1 ; i < length ; i ++ ) { if ( isMatchSymbol ( alignmentPair . symbolAt ( i ) ) ) { if ( matchStart < 0 ) { matchStart = i ; } } else {... |
public class SearchIndex { /** * Creates a lucene < code > Document < / code > for a node state using the
* namespace mappings < code > nsMappings < / code > .
* @ param node
* the node state to index .
* @ param nsMappings
* the namespace mappings of the search index .
* @ param indexFormatVersion
* the ... | NodeIndexer indexer = new NodeIndexer ( node , getContext ( ) . getItemStateManager ( ) , nsMappings , extractor ) ; indexer . setSupportHighlighting ( supportHighlighting ) ; indexer . setIndexingConfiguration ( indexingConfig ) ; indexer . setIndexFormatVersion ( indexFormatVersion ) ; indexer . setLoadBatchingThresh... |
public class DialogResponseAPDUImpl { /** * ( non - Javadoc )
* @ see org . restcomm . protocols . ss7 . tcap . asn . Encodable # encode ( org . mobicents . protocols . asn . AsnOutputStream ) */
public void encode ( AsnOutputStream aos ) throws EncodeException { } } | if ( acn == null ) throw new EncodeException ( "Error encoding DialogResponseAPDU: Application Context Name must not be null" ) ; if ( result == null ) throw new EncodeException ( "Error encoding DialogResponseAPDU: Result must not be null" ) ; if ( diagnostic == null ) throw new EncodeException ( "Error encoding Dialo... |
public class CouchbaseConnection { /** * Get the major version of Couchbase server , that is 4 . x or 5 . x
* @ return */
protected int getMajorVersion ( ) { } } | return this . cluster . authenticate ( this . passwordAuthenticator ) . clusterManager ( ) . info ( 5 , TimeUnit . SECONDS ) . getMinVersion ( ) . major ( ) ; |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link MactionType } { @ code > } } */
@ XmlElementDecl ( namespace = "http://www.w3.org/1998/Math/MathML" , name = "maction" ) public JAXBElement < MactionType > createMaction ( MactionType value ) { } } | return new JAXBElement < MactionType > ( _Maction_QNAME , MactionType . class , null , value ) ; |
public class LogPublishingOptionsStatus { /** * The log publishing options configured for the Elasticsearch domain .
* @ param options
* The log publishing options configured for the Elasticsearch domain .
* @ return Returns a reference to this object so that method calls can be chained together . */
public LogPu... | setOptions ( options ) ; return this ; |
public class MultiColumnRegexFilter { /** * Clear all text fields in this instance */
public void clearAll ( ) { } } | for ( int i = 0 ; i < textFields . size ( ) ; i ++ ) { JTextField textField = textFields . get ( i ) ; if ( textField == null ) { continue ; } textField . setText ( "" ) ; } |
public class AtomContainerManipulator { /** * Suppress any explicit hydrogens in the provided container . Only hydrogens
* that can be represented as a hydrogen count value on the atom are
* suppressed . The container is updated and no elements are copied , please
* use either { @ link # copyAndSuppressedHydrogen... | boolean anyHydrogenPresent = false ; for ( IAtom atom : org . atoms ( ) ) { if ( "H" . equals ( atom . getSymbol ( ) ) ) { anyHydrogenPresent = true ; break ; } } if ( ! anyHydrogenPresent ) return org ; // crossing atoms , positional variation atoms etc
Set < IAtom > xatoms = Collections . emptySet ( ) ; Collection < ... |
public class MCWrapper { /** * Marks this connection for destruction . Used as part of purging the entire
* connection pool . Called on connections which are in use at the time of
* the pool being purged .
* If this object is marked stale when cleanup ( ) is called , a call to destroy ( ) will
* happen under th... | final boolean isTracingEnabled = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTracingEnabled && tc . isEntryEnabled ( ) ) { Tr . entry ( this , tc , "markStale" ) ; } // This update must be thread safe . I ' m assuming here that a boolean assignment
// is atomic . If that ' s incorrect , then we ' ll need to add a... |
public class DefaultPersistenceDelegate { /** * Returns an expression that represents a call to the bean ' s constructor . The constructor may take zero or more parameters , as specified when this
* < code > DefaultPersistenceDelegate < / code > is constructed .
* @ param oldInstance
* the old instance
* @ para... | Object [ ] args = null ; // Set the constructor arguments if any property names exist
if ( this . propertyNames . length > 0 ) { // Prepare the property descriptors for finding getter method later
BeanInfo info = null ; HashMap < String , PropertyDescriptor > proDscMap = null ; try { info = Introspector . getBeanInfo (... |
public class ManagedClustersInner { /** * Reset AAD Profile of a managed cluster .
* Update the AAD Profile for a managed cluster .
* @ param resourceGroupName The name of the resource group .
* @ param resourceName The name of the managed cluster resource .
* @ param parameters Parameters supplied to the Reset... | if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( resourc... |
public class DeviceAppearanceImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public void eSet ( int featureID , Object newValue ) { } } | switch ( featureID ) { case AfplibPackage . DEVICE_APPEARANCE__DEV_APP : setDevApp ( ( Integer ) newValue ) ; return ; case AfplibPackage . DEVICE_APPEARANCE__RESERVED : setReserved ( ( byte [ ] ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ; |
public class DescribeMaintenanceWindowTasksResult { /** * Information about the tasks in the Maintenance Window .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setTasks ( java . util . Collection ) } or { @ link # withTasks ( java . util . Collection ) } if... | if ( this . tasks == null ) { setTasks ( new com . amazonaws . internal . SdkInternalList < MaintenanceWindowTask > ( tasks . length ) ) ; } for ( MaintenanceWindowTask ele : tasks ) { this . tasks . add ( ele ) ; } return this ; |
public class CmsDefaultXmlContentHandler { /** * The errorHandler parameter is optional , if < code > null < / code > is given a new error handler
* instance must be created . < p >
* @ param cms the current OpenCms user context
* @ param value the value to resolve the validation rules for
* @ param errorHandle... | if ( ! value . isSimpleType ( ) ) { // do not validate complex types
return errorHandler ; } I_CmsWidget widget = null ; widget = CmsWidgetUtil . collectWidgetInfo ( value ) . getWidget ( ) ; if ( ! ( widget instanceof CmsCategoryWidget ) ) { // do not validate widget that are not category widgets
return errorHandler ;... |
public class Label { /** * Parses the expression into a label expression tree .
* TODO : replace this with a real parser later */
public static Label parseExpression ( String labelExpression ) throws ANTLRException { } } | LabelExpressionLexer lexer = new LabelExpressionLexer ( new StringReader ( labelExpression ) ) ; return new LabelExpressionParser ( lexer ) . expr ( ) ; |
public class ReflectionUtil { /** * Replies the type that corresponds to the specified class .
* If the name corresponds to a primitive type , the low - level type
* will be replied .
* This method extends
* { @ link Class # forName ( String ) } with autoboxing support .
* @ param name is the name of the clas... | "checkstyle:returncount" , "checkstyle:npathcomplexity" } ) public static Class < ? > forName ( String name ) throws ClassNotFoundException { if ( name == null || "" . equals ( name ) || "null" . equals ( name ) // $ NON - NLS - 1 $ / / $ NON - NLS - 2 $
|| "void" . equals ( name ) ) { // $ NON - NLS - 1 $
return void ... |
public class Utils { /** * Returns index of minimum element in a given
* array of doubles . First minimum is returned .
* @ param doubles the array of doubles
* @ return the index of the minimum element */
public static /* @ pure @ */
int minIndex ( double [ ] doubles ) { } } | double minimum = 0 ; int minIndex = 0 ; for ( int i = 0 ; i < doubles . length ; i ++ ) { if ( ( i == 0 ) || ( doubles [ i ] < minimum ) ) { minIndex = i ; minimum = doubles [ i ] ; } } return minIndex ; |
public class GitHubServerConfig { /** * Tries to find { @ link StringCredentials } by id and returns secret from it .
* @ param credentialsId id to find creds
* @ return secret from creds or empty optional */
@ Nonnull public static Optional < Secret > secretFor ( String credentialsId ) { } } | List < StringCredentials > creds = filter ( lookupCredentials ( StringCredentials . class , Jenkins . getInstance ( ) , ACL . SYSTEM , Collections . < DomainRequirement > emptyList ( ) ) , withId ( trimToEmpty ( credentialsId ) ) ) ; return FluentIterableWrapper . from ( creds ) . transform ( new NullSafeFunction < Str... |
public class Builder { /** * Adds { @ code cachePrefix } to the key . This ensures there are no cache
* collisions if the same EVCache app is used across multiple use cases .
* If the cache is not shared we recommend to set this to
* < code > null < / code > . Default is < code > null < / code > .
* @ param cac... | this . _cachePrefix = cachePrefix ; if ( _cachePrefix != null && _cachePrefix . indexOf ( ':' ) != - 1 ) throw new IllegalArgumentException ( "param cacheName cannot contain ':' character." ) ; return this ; |
public class QueryLifecycle { /** * Emit logs and metrics for this query .
* @ param e exception that occurred while processing this query
* @ param remoteAddress remote address , for logging ; or null if unknown
* @ param bytesWritten number of bytes written ; will become a query / bytes metric if > = 0 */
@ Sup... | if ( baseQuery == null ) { // Never initialized , don ' t log or emit anything .
return ; } if ( state == State . DONE ) { log . warn ( "Tried to emit logs and metrics twice for query[%s]!" , baseQuery . getId ( ) ) ; } state = State . DONE ; final boolean success = e == null ; try { final long queryTimeNs = System . n... |
public class RealmTableImpl { /** * ( non - Javadoc )
* @ see org . jdiameter . client . api . controller . IRealmTable # matchRealm ( org . jdiameter . client . api . IAnswer , java . lang . String ) */
@ Override public Realm matchRealm ( IAnswer message , String destRealm ) { } } | return this . matchRealm ( ( IMessage ) message , destRealm ) ; |
public class OperaSettings { /** * Sets the X display to use . Only works on GNU / Linux . Typically this allows you to open Opera
* in an X virtual framebuffer .
* @ param display the X display to use
* @ throws UnsupportedOperationException if on a non - GNU / Linux operating system */
public void setDisplay ( ... | if ( ! Platform . getCurrent ( ) . is ( LINUX ) ) { throw new UnsupportedOperationException ( "Unsupported platform: " + Platform . getCurrent ( ) ) ; } options . get ( DISPLAY ) . setValue ( display ) ; |
public class AbderaAtomFeedProvider { /** * TODO : Implement properly
* We require the request URL
* @ param matchingResults
* @ return */
public static Feed generateFeed ( String request , String matcherDetails , Map < URI , MatchResult > matchingResults ) { } } | Feed feed = initialiseFeed ( request , matcherDetails ) ; // Return empty feed if null
if ( matchingResults == null ) { return feed ; } int numResults = matchingResults . size ( ) ; log . debug ( matchingResults . keySet ( ) . toString ( ) ) ; Set < Map . Entry < URI , MatchResult > > entries = matchingResults . entryS... |
public class Years { /** * Subtracts this amount from the specified temporal object .
* This returns a temporal object of the same observable type as the input
* with this amount subtracted .
* In most cases , it is clearer to reverse the calling pattern by using
* { @ link Temporal # minus ( TemporalAmount ) }... | if ( years != 0 ) { temporal = temporal . minus ( years , YEARS ) ; } return temporal ; |
public class Async { /** * Sends a non - expiring { @ link TextMessage } with average priority .
* @ param queueName name of queue
* @ param text body of message */
public void sendTextMessage ( String queueName , String text ) { } } | sendTextMessage ( queueName , text , DeliveryMode . NON_PERSISTENT , 4 , 0 ) ; |
public class OssIndexAnalyzer { /** * Transform OSS Index component - report to ODC vulnerability . */
private Vulnerability transform ( final ComponentReport report , final ComponentReportVulnerability source ) { } } | Vulnerability result = new Vulnerability ( ) ; result . setSource ( Vulnerability . Source . OSSINDEX ) ; if ( source . getCve ( ) != null ) { result . setName ( source . getCve ( ) ) ; } else { String cve = null ; if ( source . getTitle ( ) != null ) { Matcher matcher = CVE_PATTERN . matcher ( source . getTitle ( ) ) ... |
public class AbstractMutableMapBuilder { /** * Post a delta consisting of a single update .
* @ param key
* key of entry to update .
* @ param mutate
* mutation specification . */
protected final void doUpdates ( final K key , final Function < ? super V , ? extends V > mutate ) { } } | apply ( new Update < > ( key , mutate ) ) ; |
public class SARLHighlightingCalculator { /** * Replies if the given call is for a capacity function call .
* @ param feature the feature to test .
* @ return { @ code true } if the feature is capacity ( s method . */
protected boolean isCapacityMethodCall ( JvmOperation feature ) { } } | if ( feature != null ) { final JvmDeclaredType container = feature . getDeclaringType ( ) ; if ( container instanceof JvmGenericType ) { return this . inheritanceHelper . isSarlCapacity ( ( JvmGenericType ) container ) ; } } return false ; |
public class MisoScenePanel { /** * Dirties the specified indicator . */
protected void dirtyIndicator ( SceneObjectIndicator indic ) { } } | if ( indic != null ) { Rectangle r = indic . getBounds ( ) ; if ( r != null ) { _remgr . invalidateRegion ( r ) ; } } |
public class InternalSARLParser { /** * InternalSARL . g : 8980:1 : ruleXUnaryOperation returns [ EObject current = null ] : ( ( ( ) ( ( ruleOpUnary ) ) ( ( lv _ operand _ 2_0 = ruleXUnaryOperation ) ) ) | this _ XPostfixOperation _ 3 = ruleXPostfixOperation ) ; */
public final EObject ruleXUnaryOperation ( ) throws Re... | EObject current = null ; EObject lv_operand_2_0 = null ; EObject this_XPostfixOperation_3 = null ; enterRule ( ) ; try { // InternalSARL . g : 8986:2 : ( ( ( ( ) ( ( ruleOpUnary ) ) ( ( lv _ operand _ 2_0 = ruleXUnaryOperation ) ) ) | this _ XPostfixOperation _ 3 = ruleXPostfixOperation ) )
// InternalSARL . g : 8987:2... |
public class KiteTicker { /** * Creates url for websocket connection . */
private void createUrl ( String accessToken , String apiKey ) { } } | wsuri = new Routes ( ) . getWsuri ( ) . replace ( ":access_token" , accessToken ) . replace ( ":api_key" , apiKey ) ; |
public class BusinessProcess { /** * Signals the current execution , see { @ link RuntimeService # signal ( String ) }
* Ends the current unit of work ( flushes changes to process variables set
* using { @ link # setVariable ( String , Object ) } or made on
* { @ link BusinessProcessScoped @ BusinessProcessScoped... | assertExecutionAssociated ( ) ; processEngine . getRuntimeService ( ) . setVariablesLocal ( associationManager . getExecutionId ( ) , getAndClearCachedLocalVariableMap ( ) ) ; processEngine . getRuntimeService ( ) . signal ( associationManager . getExecutionId ( ) , getAndClearCachedVariableMap ( ) ) ; associationManag... |
public class RibbonLoadBalancerClient { /** * New : Select a server using a ' key ' .
* @ param serviceId of the service to choose an instance for
* @ param hint to specify the service instance
* @ return the selected { @ link ServiceInstance } */
public ServiceInstance choose ( String serviceId , Object hint ) {... | Server server = getServer ( getLoadBalancer ( serviceId ) , hint ) ; if ( server == null ) { return null ; } return new RibbonServer ( serviceId , server , isSecure ( server , serviceId ) , serverIntrospector ( serviceId ) . getMetadata ( server ) ) ; |
public class Destination { /** * An array that contains the email addresses of the " BCC " ( blind carbon copy ) recipients for the email .
* @ param bccAddresses
* An array that contains the email addresses of the " BCC " ( blind carbon copy ) recipients for the email . */
public void setBccAddresses ( java . util... | if ( bccAddresses == null ) { this . bccAddresses = null ; return ; } this . bccAddresses = new java . util . ArrayList < String > ( bccAddresses ) ; |
public class ParamUtil { /** * 将Map型转为请求参数型
* @ param data Map类型的参数
* @ return url请求的参数
* @ throws UnsupportedEncodingException 异常 */
public static String getUrlParamsByMap ( Map < String , String > data ) throws UnsupportedEncodingException { } } | if ( data == null || data . isEmpty ( ) ) return null ; StringBuilder sb = new StringBuilder ( ) ; for ( Map . Entry < String , String > i : data . entrySet ( ) ) { sb . append ( i . getKey ( ) ) . append ( "=" ) . append ( URLEncoder . encode ( i . getValue ( ) , Charset . UTF_8 ) ) . append ( "&" ) ; } String str = s... |
public class SegmentAggregator { /** * Processes an UpdateAttributesOperation .
* @ param operation The Operation to process . */
private void addUpdateAttributesOperation ( UpdateAttributesOperation operation ) { } } | if ( ! this . metadata . isSealedInStorage ( ) ) { // Only process the operation if the Segment is not sealed in Storage . If it is , then so is the Attribute Index ,
// and it means this operation has already been applied to the index .
Map < UUID , Long > attributes = getExtendedAttributes ( operation ) ; if ( ! attr... |
public class Persistence { /** * Gets the value of the persistenceUnit property .
* This accessor method returns a reference to the live list ,
* not a snapshot . Therefore any modification you make to the
* returned list will be present inside the JAXB object .
* This is why there is not a < CODE > set < / COD... | if ( persistenceUnit == null ) { persistenceUnit = new ArrayList < Persistence . PersistenceUnit > ( ) ; } return this . persistenceUnit ; |
public class JwkProviderBuilder { /** * Enable the cache specifying size and expire time .
* @ param bucketSize max number of jwks to deliver in the given rate .
* @ param refillRate amount of time to wait before a jwk can the jwk will be cached
* @ param unit unit of time for the expire of jwk
* @ return the b... | bucket = new BucketImpl ( bucketSize , refillRate , unit ) ; return this ; |
public class RxApollo { /** * Converts an { @ link ApolloQueryWatcher } into an Observable .
* @ param watcher the ApolloQueryWatcher to convert
* @ param backpressureMode the back pressure strategy to apply to the observable source .
* @ param < T > the value type
* @ return the converted Observable */
@ NotNu... | checkNotNull ( backpressureMode , "backpressureMode == null" ) ; checkNotNull ( watcher , "watcher == null" ) ; return Observable . create ( new Action1 < Emitter < Response < T > > > ( ) { @ Override public void call ( final Emitter < Response < T > > emitter ) { final AtomicBoolean canceled = new AtomicBoolean ( ) ; ... |
public class FeatureTokens { /** * indexed setter for beginnings - sets an indexed value -
* @ generated
* @ param i index in the array to set
* @ param v value to set into the array */
public void setBeginnings ( int i , int v ) { } } | if ( FeatureTokens_Type . featOkTst && ( ( FeatureTokens_Type ) jcasType ) . casFeat_beginnings == null ) jcasType . jcas . throwFeatMissing ( "beginnings" , "ch.epfl.bbp.uima.types.FeatureTokens" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( FeatureTokens_Type ) jcasType ) . ... |
public class FileFetcher { /** * Downloads an object . It retries downloading { @ link # maxFetchRetry }
* times and throws an exception .
* @ param object an object to be downloaded
* @ param outFile a file which the object data is stored
* @ return number of downloaded bytes */
@ Override protected long downl... | try { return RetryUtils . retry ( ( ) -> { try ( final InputStream is = openObjectFunction . open ( object ) ; final OutputStream os = new FileOutputStream ( outFile ) ) { return IOUtils . copyLarge ( is , os , buffer ) ; } } , retryCondition , outFile :: delete , maxFetchRetry + 1 , StringUtils . format ( "Failed to d... |
public class ChronoFormatter { /** * also called in PatternType */
static boolean hasUnixChronology ( Chronology < ? > chronology ) { } } | Chronology < ? > c = chronology ; do { if ( UnixTime . class . isAssignableFrom ( c . getChronoType ( ) ) ) { return true ; } } while ( ( c = c . preparser ( ) ) != null ) ; return false ; |
public class ProjectionOperationFactory { /** * Ensures that all expressions have a derivable name . There is a few categories and naming
* rules that apply :
* < ul >
* < li > { @ link FieldReferenceExpression } , { @ link TableReferenceExpression } ,
* { @ link LocalReferenceExpression } and { @ link BuiltInF... | return IntStream . range ( 0 , expression . size ( ) ) . mapToObj ( idx -> { currentFieldIndex = idx ; return expression . get ( idx ) . accept ( namingVisitor ) ; } ) . collect ( Collectors . toList ( ) ) ; |
public class Constraints { /** * Get a { @ link Predicate } for testing entity objects that match the given
* { @ link StorageKey } .
* @ param < E > The type of entities to be matched
* @ param key a StorageKey for entities tested with the Predicate
* @ return a Predicate to test if entity objects satisfy this... | if ( key != null ) { Map < String , Predicate > predicates = minimizeFor ( key ) ; if ( predicates . isEmpty ( ) ) { return alwaysTrue ( ) ; } return entityPredicate ( predicates , schema , accessor , strategy ) ; } return toEntityPredicate ( accessor ) ; |
public class policyhttpcallout { /** * Use this API to fetch policyhttpcallout resource of given name . */
public static policyhttpcallout get ( nitro_service service , String name ) throws Exception { } } | policyhttpcallout obj = new policyhttpcallout ( ) ; obj . set_name ( name ) ; policyhttpcallout response = ( policyhttpcallout ) obj . get_resource ( service ) ; return response ; |
public class PermilOperator { /** * Gets the permil of the amount .
* This returns the monetary amount in permil . For example , for 10 % ' EUR
* 2.35 ' will return 0.235.
* This is returned as a { @ code MonetaryAmount } .
* @ return the permil result of the amount , never { @ code null } */
@ Override public ... | Objects . requireNonNull ( amount , "Amount required." ) ; return amount . multiply ( permilValue ) ; |
public class YarnJobSubmissionClient { /** * We leave a file behind in job submission directory so that clr client can figure out
* the applicationId and yarn rest endpoint .
* @ param driverFolder
* @ param applicationId
* @ throws IOException */
private void writeDriverHttpEndPoint ( final File driverFolder ,... | final FileSystem fs = FileSystem . get ( yarnConfiguration ) ; final Path httpEndpointPath = new Path ( dfsPath , fileNames . getDriverHttpEndpoint ( ) ) ; String trackingUri = null ; LOG . log ( Level . INFO , "Attempt to reading " + httpEndpointPath . toString ( ) ) ; for ( int i = 0 ; i < 60 ; i ++ ) { try { LOG . l... |
public class NetworkInterfaceTapConfigurationsInner { /** * Deletes the specified tap configuration from the NetworkInterface .
* @ param resourceGroupName The name of the resource group .
* @ param networkInterfaceName The name of the network interface .
* @ param tapConfigurationName The name of the tap configu... | beginDeleteWithServiceResponseAsync ( resourceGroupName , networkInterfaceName , tapConfigurationName ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class JUnitInContainerLaunchShortcut { /** * / * ( non - Javadoc )
* @ see org . eclipse . jdt . junit . launcher . JUnitLaunchShortcut # createLaunchConfiguration ( org . eclipse . jdt . core . IJavaElement ) */
@ Override protected ILaunchConfigurationWorkingCopy createLaunchConfiguration ( IJavaElement elem... | ILaunchConfigurationWorkingCopy wc = super . createLaunchConfiguration ( element ) ; String containerUrl = JicUnitPlugin . getDefault ( ) . getPreferenceStore ( ) . getString ( CONTAINER_URL ) ; String extraVwArg = "-D" + CONTAINER_URL + "=" + containerUrl ; wc . setAttribute ( IJavaLaunchConfigurationConstants . ATTR_... |
public class DockerRule { /** * return { @ link CLI } for specified jenkins container ID */
public DockerCLI createCliForContainer ( String containerId ) throws IOException , InterruptedException { } } | LOG . trace ( "Creating cli for container {}." , containerId ) ; final InspectContainerResponse inspect = getDockerCli ( ) . inspectContainerCmd ( containerId ) . exec ( ) ; return createCliForInspect ( inspect ) ; |
public class BeanExtractor { /** * { @ inheritDoc } */
@ SuppressWarnings ( "PMD.CompareObjectsWithEquals" ) public Object extractObject ( ObjectToJsonConverter pConverter , Object pValue , Stack < String > pPathParts , boolean jsonify ) throws AttributeNotFoundException { } } | // Wrap fault handler if a wildcard path pattern is present
ValueFaultHandler faultHandler = pConverter . getValueFaultHandler ( ) ; String pathPart = pPathParts . isEmpty ( ) ? null : pPathParts . pop ( ) ; if ( pathPart != null ) { // Still some path elements available , so dive deeper
Object attributeValue = extract... |
public class AbstractBigtableTable { /** * { @ inheritDoc } */
@ Override public Result [ ] get ( List < Get > gets ) throws IOException { } } | LOG . trace ( "get(List<>)" ) ; if ( gets == null || gets . isEmpty ( ) ) { return new Result [ 0 ] ; } else if ( gets . size ( ) == 1 ) { try { return new Result [ ] { get ( gets . get ( 0 ) ) } ; } catch ( IOException e ) { throw createRetriesExhaustedWithDetailsException ( e , gets . get ( 0 ) ) ; } } else { try ( S... |
public class DfuServiceInitiator { /** * Starts the DFU service .
* @ param context the application context
* @ param service the class derived from the BaseDfuService */
public DfuServiceController start ( @ NonNull final Context context , @ NonNull final Class < ? extends DfuBaseService > service ) { } } | if ( fileType == - 1 ) throw new UnsupportedOperationException ( "You must specify the firmware file before starting the service" ) ; final Intent intent = new Intent ( context , service ) ; intent . putExtra ( DfuBaseService . EXTRA_DEVICE_ADDRESS , deviceAddress ) ; intent . putExtra ( DfuBaseService . EXTRA_DEVICE_N... |
public class FeatureState { /** * Sets a new value for the given parameter . */
public FeatureState setParameter ( String name , String value ) { } } | if ( value != null ) { this . parameters . put ( name , value ) ; } else { this . parameters . remove ( name ) ; } return this ; |
public class ArrayUtil { /** * Basic sort for small arrays of int . */
public static void sortArray ( int [ ] array ) { } } | boolean swapped ; do { swapped = false ; for ( int i = 0 ; i < array . length - 1 ; i ++ ) { if ( array [ i ] > array [ i + 1 ] ) { int temp = array [ i + 1 ] ; array [ i + 1 ] = array [ i ] ; array [ i ] = temp ; swapped = true ; } } } while ( swapped ) ; |
public class ZipFileSubsystemInputStreamSources { /** * Adds all file sources in the specified zip file .
* @ param file
* @ throws IOException */
public void addAllSubsystemFileSourcesFromZipFile ( File file ) throws IOException { } } | try ( ZipFile zip = new ZipFile ( file ) ) { // extract subsystem template and schema , if present
if ( zip . getEntry ( "subsystem-templates" ) != null ) { Enumeration < ? extends ZipEntry > entries = zip . entries ( ) ; while ( entries . hasMoreElements ( ) ) { ZipEntry entry = entries . nextElement ( ) ; if ( ! entr... |
public class JpaSource { /** * Return an iterator that iterates over this source .
* @ return a source iterator
* @ see JpaIterator */
public Iterator iterator ( ) { } } | Query readAll = m_em . createQuery ( createReadAllQuery ( m_entityClass . getSimpleName ( ) ) ) ; return new JpaIterator ( readAll , m_batchSize ) ; |
public class NmeaStreamProcessor { /** * Returns the index of the earliest timestamp ( PGHP ) line . If none found
* returns null .
* @ param lines
* @ return */
private static Integer getEarliestTimestampLineIndex ( List < LineAndTime > lines ) { } } | Integer i = 0 ; for ( LineAndTime line : lines ) { if ( isExactEarthTimestamp ( line . getLine ( ) ) ) return i ; else i ++ ; } return null ; |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link SurfacePropertyType } { @ code > }
* @ param value
* Java instance representing xml element ' s value .
* @ return
* the new instance of { @ link JAXBElement } { @ code < } { @ link SurfacePropertyType } { @ co... | return new JAXBElement < SurfacePropertyType > ( _BaseSurface_QNAME , SurfacePropertyType . class , null , value ) ; |
public class UpdateRecoveryPointLifecycleRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( UpdateRecoveryPointLifecycleRequest updateRecoveryPointLifecycleRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( updateRecoveryPointLifecycleRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateRecoveryPointLifecycleRequest . getBackupVaultName ( ) , BACKUPVAULTNAME_BINDING ) ; protocolMarshaller . marshall ( updateRecoveryPointLifecyc... |
public class AllRowsReader { /** * Wait for all tasks to finish .
* @ param futures
* @ return true if all tasks returned true or false otherwise . */
private boolean waitForTasksToFinish ( ) throws Exception { } } | Boolean succeeded = true ; // Tracking state for multiple exceptions , if any
List < StackTraceElement > stackTraces = new ArrayList < StackTraceElement > ( ) ; StringBuilder sb = new StringBuilder ( ) ; int exCount = 0 ; for ( Future < Boolean > future : futures ) { try { if ( ! future . get ( ) ) { cancel ( ) ; succe... |
public class PasswordHash { /** * Returns a salted PBKDF2 hash of the password .
* @ param password
* the password to hash
* @ return a salted PBKDF2 hash of the password
* @ throws NoSuchAlgorithmException if jdk does not support the algorithm
* @ throws InvalidKeySpecException if the password or salt are in... | // Generate a random salt
SecureRandom random = new SecureRandom ( ) ; byte [ ] salt = new byte [ SALT_BYTE_SIZE ] ; random . nextBytes ( salt ) ; // Hash the password
byte [ ] hash = pbkdf2 ( password , salt , PBKDF2_ITERATIONS , HASH_BYTE_SIZE ) ; // format iterations : salt : hash
return PBKDF2_ITERATIONS + ":" + to... |
public class CMM_GTAnalysis { /** * Calculates the relative number of errors being caused by the underlying cluster model
* @ return quality of the model */
public double getModelQuality ( ) { } } | for ( int p = 0 ; p < numPoints ; p ++ ) { CMMPoint cmdp = cmmpoints . get ( p ) ; for ( int hc = 0 ; hc < numGTClusters ; hc ++ ) { if ( gtClustering . get ( hc ) . getGroundTruth ( ) != cmdp . trueClass ) { if ( gtClustering . get ( hc ) . getInclusionProbability ( cmdp ) >= 1 ) { if ( ! cmdp . isNoise ( ) ) pointErr... |
public class AjaxWPaginationExample { /** * Override preparePaintComponent in order to set up the example data the first time through .
* @ param request the request being responded to . */
@ Override protected void preparePaintComponent ( final Request request ) { } } | super . preparePaintComponent ( request ) ; if ( ! isInitialised ( ) ) { List < Serializable > items = new ArrayList < > ( ) ; items . add ( new SimpleTableBean ( "A" , "none" , "thing" ) ) ; items . add ( new SimpleTableBean ( "B" , "some" , "thing2" ) ) ; items . add ( new SimpleTableBean ( "C" , "little" , "thing3" ... |
public class FormalParameterBuilderImpl { /** * Replies the JvmIdentifiable that corresponds to the formal parameter .
* @ param container the feature call that is supposed to contains the replied identifiable element . */
public void setReferenceInto ( XFeatureCall container ) { } } | JvmVoid jvmVoid = this . jvmTypesFactory . createJvmVoid ( ) ; if ( jvmVoid instanceof InternalEObject ) { final InternalEObject jvmVoidProxy = ( InternalEObject ) jvmVoid ; final EObject param = getSarlFormalParameter ( ) ; final Resource resource = param . eResource ( ) ; // Get the derived object
final SarlFormalPar... |
public class DoubleTupleDistanceFunctions { /** * Computes the squared Euclidean distance between the given tuples
* @ param t0 The first tuple
* @ param t1 The second tuple
* @ return The squared distance
* @ throws IllegalArgumentException If the given tuples do not
* have the same { @ link Tuple # getSize ... | Utils . checkForEqualSize ( t0 , t1 ) ; double sum = 0 ; int n = t0 . getSize ( ) ; for ( int i = 0 ; i < n ; i ++ ) { double value0 = t0 . get ( i ) ; double value1 = t1 . get ( i ) ; double d = value1 - value0 ; double dd = d * d ; sum += dd ; } return sum ; |
public class PAbstractObject { /** * Get a property as a double or defaultValue .
* @ param key the property name
* @ param defaultValue the default value */
@ Override public final Double optDouble ( final String key , final Double defaultValue ) { } } | Double result = optDouble ( key ) ; return result == null ? defaultValue : result ; |
public class NewChunk { /** * Slow - path append data */
private void append2slowUUID ( ) { } } | final int CHUNK_SZ = 1 << H2O . LOG_CHK ; if ( _sparseLen > CHUNK_SZ ) throw new ArrayIndexOutOfBoundsException ( _sparseLen ) ; if ( _ds == null && _ls != null ) { // This can happen for columns with all NAs and then a UUID
_xs = null ; alloc_doubles ( _sparseLen ) ; Arrays . fill ( _ls , C16Chunk . _LO_NA ) ; Arrays ... |
public class CudaDirectProvider { /** * This method provides PointersPair to memory chunk specified by AllocationShape
* @ param shape shape of desired memory chunk
* @ param point target AllocationPoint structure
* @ param location either HOST or DEVICE
* @ return */
@ Override public PointersPair malloc ( All... | // log . info ( " shape onCreate : { } , target : { } " , shape , location ) ;
switch ( location ) { case HOST : { long reqMem = AllocationUtils . getRequiredMemory ( shape ) ; // FIXME : this is WRONG , and directly leads to memleak
if ( reqMem < 1 ) reqMem = 1 ; val pointer = nativeOps . mallocHost ( reqMem , 0 ) ; i... |
public class XMLUtils { /** * Returns a non - validating XML parser . The parser ignores both DTDs and XSDs .
* @ return An XML parser in the form of a DocumentBuilder */
public static DocumentBuilder getXmlParser ( ) { } } | DocumentBuilder db = null ; try { DocumentBuilderFactory dbf = DocumentBuilderFactory . newInstance ( ) ; dbf . setValidating ( false ) ; // Disable DTD loading and validation
// See http : / / stackoverflow . com / questions / 155101 / make - documentbuilder - parse - ignore - dtd - references
dbf . setFeature ( "http... |
public class CompoundServiceFilter { /** * Calls filters ' filtrate ( ) method . Any exception stops the process . */
@ Override public void filtrate ( DataBinder parameters ) { } } | first . filtrate ( parameters ) ; second . filtrate ( parameters ) ; |
public class AbstractNotificationBuilder { /** * Sets the type of the push notification being sent .
* As of Windows Phone OS 7.0 , the supported types are :
* < ul >
* < li > token ( for Tile messages ) < / li >
* < li > toast < / li >
* < li > raw < / li >
* < / ul >
* This method should probably not be... | this . headers . add ( Pair . of ( "X-WindowsPhone-Target" , type ) ) ; return ( A ) this ; |
public class AbstractTeam { /** * Kill all players and the coach ( if connected ) . */
public void killAll ( ) { } } | for ( int i = 0 ; i < size ( ) ; i ++ ) { if ( i == 0 ) { players [ i ] . bye ( ) ; players [ i ] . stopRunning ( ) ; } else if ( i >= 1 ) { try { players [ i ] . bye ( ) ; players [ i ] . stopRunning ( ) ; } catch ( Exception ex ) { players [ i ] . handleError ( ex . getMessage ( ) ) ; } } pause ( 500 ) ; } if ( hasCo... |
public class MavenModelScannerPlugin { /** * Create plugin descriptors for the given plugins .
* @ param plugins
* The plugins .
* @ param context
* The scanner context .
* @ return The plugin descriptors . */
private List < MavenPluginDescriptor > createMavenPluginDescriptors ( List < Plugin > plugins , Scan... | Store store = context . getStore ( ) ; List < MavenPluginDescriptor > pluginDescriptors = new ArrayList < > ( ) ; for ( Plugin plugin : plugins ) { MavenPluginDescriptor mavenPluginDescriptor = store . create ( MavenPluginDescriptor . class ) ; MavenArtifactDescriptor artifactDescriptor = getArtifactResolver ( context ... |
public class SipSessionKey { /** * Sets the to tag on the key when we receive a response .
* We recompute the session id only for derived session otherwise the id will change
* when the a request is received or sent and the response is sent back or received which should not happen
* See TCK test SipSessionListene... | this . toTag = toTag ; if ( toTag != null && recomputeSessionId ) { // Issue 2365 : to tag needed for getApplicationSession ( ) . getSipSession ( < sessionId > ) to return forked session and not the parent one
computeToString ( ) ; } |
public class JmxScraper { /** * Get a list of mbeans on host _ port and scrape their values .
* Values are passed to the receiver in a single thread . */
public void doScrape ( ) throws Exception { } } | MBeanServerConnection beanConn ; JMXConnector jmxc = null ; if ( jmxUrl . isEmpty ( ) ) { beanConn = ManagementFactory . getPlatformMBeanServer ( ) ; } else { Map < String , Object > environment = new HashMap < String , Object > ( ) ; if ( username != null && username . length ( ) != 0 && password != null && password .... |
public class JSpinners { /** * Disable dragging for the given spinner , by removing all
* mouse motion listeners that are { @ link SpinnerDraggingHandler } s
* from the spinner buttons
* @ param spinner The spinner */
private static void disableSpinnerDragging ( JSpinner spinner ) { } } | int n = spinner . getComponentCount ( ) ; for ( int i = 0 ; i < n ; i ++ ) { Component c = spinner . getComponent ( i ) ; String name = c . getName ( ) ; if ( "Spinner.nextButton" . equals ( name ) || "Spinner.previousButton" . equals ( name ) ) { MouseMotionListener mouseMotionListeners [ ] = c . getMouseMotionListene... |
public class InjectReactiveMojo { /** * Expects a directory . */
private void walkDir ( File dir ) { } } | walkDir ( dir , new FileFilter ( ) { @ Override public boolean accept ( File pathname ) { return ( pathname . isFile ( ) && pathname . getName ( ) . endsWith ( ".class" ) ) ; } } , new FileFilter ( ) { @ Override public boolean accept ( File pathname ) { return ( pathname . isDirectory ( ) ) ; } } ) ; |
public class TemplateDrivenMultiBranchProject { /** * Sets various implementation - specific fields and forwards wrapped req / rsp objects on to the
* { @ link # template } ' s { @ link AbstractProject # doConfigSubmit ( StaplerRequest , StaplerResponse ) } method .
* < br >
* { @ inheritDoc } */
@ Override publi... | super . submit ( req , rsp ) ; makeDisabled ( req . getParameter ( "disable" ) != null ) ; template . doConfigSubmit ( new TemplateStaplerRequestWrapper ( req ) , new TemplateStaplerResponseWrapper ( req . getStapler ( ) , rsp ) ) ; ItemListener . fireOnUpdated ( this ) ; // notify the queue as the project might be now... |
public class Memoize { /** * Convert a Supplier into one that caches it ' s result
* @ param s Supplier to memoise
* @ param cache Cachable to store the results
* @ return Memoised Supplier */
public static < T > Function0 < T > memoizeSupplier ( final Supplier < T > s , final Cacheable < T > cache ) { } } | return ( ) -> cache . soften ( ) . computeIfAbsent ( "k" , a -> s . get ( ) ) ; |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getIfcRelAssigns ( ) { } } | if ( ifcRelAssignsEClass == null ) { ifcRelAssignsEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 518 ) ; } return ifcRelAssignsEClass ; |
public class CachedScheduledThreadPool { /** * After initialDelay executes commands using collections iterator until either iterator has no more commands or command throws exception .
* @ param initialDelay
* @ param period
* @ param unit
* @ param commands
* @ return
* @ see java . util . concurrent . Sche... | return iterateAtFixedRate ( initialDelay , period , unit , commands . iterator ( ) ) ; |
public class RedoLog { /** * Initializes the { @ link # out } stream if it is not yet set .
* @ throws IOException if an error occurs while creating the
* output stream . */
private synchronized void initOut ( ) throws IOException { } } | if ( out == null ) { OutputStream os = new IndexOutputStream ( dir . createOutput ( REDO_LOG ) ) ; out = new BufferedWriter ( new OutputStreamWriter ( os ) ) ; } |
public class SslContextFactory { /** * Does an object array include an object .
* @ param arr The array
* @ param obj The object */
private static boolean contains ( Object [ ] arr , Object obj ) { } } | for ( Object o : arr ) { if ( o . equals ( obj ) ) return true ; } return false ; |
public class ChronosServerWatcher { /** * Deal with the connection event .
* @ param event the ZooKeeper event . */
@ Override protected void processConnection ( WatchedEvent event ) { } } | super . processConnection ( event ) ; switch ( event . getState ( ) ) { case Disconnected : if ( beenActiveMaster ) { LOG . fatal ( hostPort . getHostPort ( ) + " disconnected from ZooKeeper, stop serving and exit immediately" ) ; System . exit ( 0 ) ; } else { LOG . warn ( hostPort . getHostPort ( ) + " disconnected f... |
public class SearchCommand { /** * - - - - - builder methods - - - - - */
@ Override public org . structr . core . app . Query < T > disableSorting ( ) { } } | this . doNotSort = true ; return this ; |
public class MongoNativeExtractor { /** * Gets shards .
* @ param collection the collection
* @ return the shards */
private Map < String , String [ ] > getShards ( DBCollection collection ) { } } | DB config = collection . getDB ( ) . getSisterDB ( "config" ) ; DBCollection configShards = config . getCollection ( "shards" ) ; DBCursor cursorShards = configShards . find ( ) ; Map < String , String [ ] > map = new HashMap < > ( ) ; while ( cursorShards . hasNext ( ) ) { DBObject currentShard = cursorShards . next (... |
public class BootstrapChildFirstURLClassloader { /** * Any changes must be made to both sources */
@ Override protected synchronized Class < ? > loadClass ( String name , boolean resolve ) throws ClassNotFoundException { } } | synchronized ( getClassLoadingLock ( name ) ) { Class < ? > result = null ; if ( name == null || name . length ( ) == 0 ) return null ; result = findLoadedClass ( name ) ; if ( result == null ) { if ( name . regionMatches ( 0 , BootstrapChildFirstJarClassloader . KERNEL_BOOT_CLASS_PREFIX , 0 , BootstrapChildFirstJarCla... |
public class CustomTypeAdapterFactory { /** * Override this to define how this is serialized in { @ code toSerialize } to
* the outgoing JSON stream . */
protected void write ( JsonWriter out , T value , TypeAdapter < JsonElement > elementAdapter , TypeAdapter < T > delegate ) throws IOException { } } | JsonElement tree = delegate . toJsonTree ( value ) ; beforeWrite ( value , tree ) ; elementAdapter . write ( out , tree ) ; |
public class IterableLens { /** * A lens focusing on the tail of an { @ link Iterable } .
* @ param < A > the Iterable element type
* @ return a lens focusing on the tail of an { @ link Iterable } */
public static < A > Lens . Simple < Iterable < A > , Iterable < A > > tail ( ) { } } | return simpleLens ( Tail :: tail , fn2 ( Head . < A > head ( ) . andThen ( o -> o . fmap ( cons ( ) ) . orElse ( id ( ) ) ) ) . toBiFunction ( ) ) ; |
public class Encoder { /** * Updates a pseudo - Boolean encoding .
* @ param s the solver
* @ param rhs the new right hand side
* @ throws IllegalStateException if the pseudo - Boolean encoding is unknown */
public void updatePB ( final MiniSatStyleSolver s , int rhs ) { } } | switch ( this . pbEncoding ) { case SWC : this . swc . update ( s , rhs ) ; break ; default : throw new IllegalStateException ( "Unknown pseudo-Boolean encoding: " + this . pbEncoding ) ; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.