signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class GoogleApacheHttpTransport { /** * Returns a new instance of { @ link ApacheHttpTransport } that uses
* { @ link GoogleUtils # getCertificateTrustStore ( ) } for the trusted certificates . */
public static ApacheHttpTransport newTrustedTransport ( ) throws GeneralSecurityException , IOException { } } | // Set socket buffer sizes to 8192
SocketConfig socketConfig = SocketConfig . custom ( ) . setRcvBufSize ( 8192 ) . setSndBufSize ( 8192 ) . build ( ) ; PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager ( - 1 , TimeUnit . MILLISECONDS ) ; // Disable the stale connection check... |
public class SarlBehaviorUnitBuilderImpl { /** * Change the guard .
* @ param value the value of the guard . It may be < code > null < / code > . */
@ Pure public IExpressionBuilder getGuard ( ) { } } | IExpressionBuilder exprBuilder = this . expressionProvider . get ( ) ; exprBuilder . eInit ( getSarlBehaviorUnit ( ) , new Procedures . Procedure1 < XExpression > ( ) { public void apply ( XExpression expr ) { getSarlBehaviorUnit ( ) . setGuard ( expr ) ; } } , getTypeResolutionContext ( ) ) ; return exprBuilder ; |
public class Sentence { /** * As already described , but if separator is not null , then objects
* such as TaggedWord
* @ param separator The string used to separate Word and Tag
* in TaggedWord , etc */
public static < T > String listToString ( List < T > list , final boolean justValue , final String separator )... | StringBuilder s = new StringBuilder ( ) ; for ( Iterator < T > wordIterator = list . iterator ( ) ; wordIterator . hasNext ( ) ; ) { T o = wordIterator . next ( ) ; s . append ( wordToString ( o , justValue , separator ) ) ; if ( wordIterator . hasNext ( ) ) { s . append ( ' ' ) ; } } return s . toString ( ) ; |
public class Triangle3d { /** * { @ inheritDoc } */
public void setProperties ( Point3d point1 , Point3d point2 , Point3d point3 ) { } } | this . p1 . setProperties ( point1 . xProperty , point1 . yProperty , point1 . zProperty ) ; this . p2 . setProperties ( point2 . xProperty , point2 . yProperty , point2 . zProperty ) ; this . p3 . setProperties ( point3 . xProperty , point3 . yProperty , point3 . zProperty ) ; clearBufferedData ( ) ; |
public class RefundService { /** * This function refunds a { @ link Transaction } that has been created previously and was refunded in parts or wasn ' t refunded at
* all . The inserted amount will be refunded to the credit card / direct debit of the original { @ link Transaction } . There will
* be some fees for t... | ValidationUtils . validatesAmount ( amount ) ; ParameterMap < String , String > params = new ParameterMap < String , String > ( ) ; params . add ( "amount" , String . valueOf ( amount ) ) ; if ( StringUtils . isNotBlank ( description ) ) params . add ( "description" , description ) ; return RestfulUtils . create ( Refu... |
public class UpdateJobRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( UpdateJobRequest updateJobRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( updateJobRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateJobRequest . getJobName ( ) , JOBNAME_BINDING ) ; protocolMarshaller . marshall ( updateJobRequest . getJobUpdate ( ) , JOBUPDATE_BINDING ) ; } catch ( Exception ... |
public class SwaggerMethodParser { /** * Checks whether or not the Swagger method expects the response to contain a body .
* @ return true if Swagger method expects the response to contain a body , false otherwise */
public boolean expectsResponseBody ( ) { } } | boolean result = true ; if ( TypeUtil . isTypeOrSubTypeOf ( returnType , Void . class ) ) { result = false ; } else if ( TypeUtil . isTypeOrSubTypeOf ( returnType , Mono . class ) || TypeUtil . isTypeOrSubTypeOf ( returnType , Flux . class ) ) { final ParameterizedType asyncReturnType = ( ParameterizedType ) returnType... |
public class BasicSourceMapConsumer { /** * Returns the original source , line , and column information for the generated source ' s line and column positions provided . The only argument is
* an object with the following properties :
* < ul >
* < li > line : The line number in the generated source . < / li >
*... | ParsedMapping needle = new ParsedMapping ( line , column ) ; if ( bias == null ) { bias = Bias . GREATEST_LOWER_BOUND ; } int index = this . _findMapping ( needle , this . _generatedMappings ( ) , "generatedLine" , "generatedColumn" , ( mapping1 , mapping2 ) -> Util . compareByGeneratedPositionsDeflated ( mapping1 , ma... |
public class DefaultGroovyMethods { /** * Drops the given number of elements from the tail of this Iterable .
* < pre class = " groovyTestCase " >
* def strings = [ ' a ' , ' b ' , ' c ' ]
* assert strings . dropRight ( 0 ) = = [ ' a ' , ' b ' , ' c ' ]
* assert strings . dropRight ( 2 ) = = [ ' a ' ]
* asser... | Collection < T > selfCol = self instanceof Collection ? ( Collection < T > ) self : toList ( self ) ; if ( selfCol . size ( ) <= num ) { return createSimilarCollection ( selfCol , 0 ) ; } if ( num <= 0 ) { Collection < T > ret = createSimilarCollection ( selfCol , selfCol . size ( ) ) ; ret . addAll ( selfCol ) ; retur... |
public class CharsetDetector { /** * Return an array of all charsets that appear to be plausible
* matches with the input data . The array is ordered with the
* best quality match first .
* Raise an exception if
* < ul >
* < li > no charsets appear to match the input data . < / li >
* < li > no input text h... | ArrayList < CharsetMatch > matches = new ArrayList < CharsetMatch > ( ) ; MungeInput ( ) ; // Strip html markup , collect byte stats .
// Iterate over all possible charsets , remember all that
// give a match quality > 0.
for ( int i = 0 ; i < ALL_CS_RECOGNIZERS . size ( ) ; i ++ ) { CSRecognizerInfo rcinfo = ALL_CS_RE... |
public class NamespaceDefinitionMessage { /** * Checks that there aren ' t namespaces that depend on namespaces that don ' t exist in the list ,
* and creates a list of all Namespace Objects in the list .
* @ throws XmlException if there are any dependencies missing . */
protected Map < Namespace , List < String > ... | ArrayList < Namespace > namespaces = new ArrayList < Namespace > ( ) ; // add all root namespaces
for ( NamespaceDefinition namespaceDef : namespaceDefs ) { Namespace node = new Namespace ( namespaceDef ) ; if ( namespaces . contains ( node ) ) { throw new XmlException ( "duplicate NamespaceDefinitions found: " + node ... |
public class ResultSetUtility { /** * Convert all rows of the ResultSet to a list of beans of a dynamically generated class . It requires CGLIB .
* @ param rs the ResultSet
* @ return a list of beans
* @ throws SQLException */
public List < ? > convertAllToDynamicBeans ( ResultSet rs ) throws SQLException { } } | ResultSetMetaData rsmd = rs . getMetaData ( ) ; Map < String , ColumnMetaData > columnToPropertyMappings = createColumnToPropertyMappings ( rsmd ) ; Class < ? > beanClass = reuseOrBuildBeanClass ( rsmd , columnToPropertyMappings ) ; BeanProcessor beanProcessor = new BeanProcessor ( simpleColumnToPropertyMappings ( colu... |
public class ResourceToModelAdapterUpdater { /** * Obtains all { @ link OsgiModelSource model sources } from the
* { @ link io . neba . core . resourcemodels . registration . ModelRegistrar } and adds the { @ link OsgiModelSource # getModelType ( )
* model type name } as well as the type name of all of its supercla... | List < OsgiModelSource < ? > > modelSources = this . registry . getModelSources ( ) ; Set < String > modelNames = new HashSet < > ( ) ; for ( OsgiModelSource < ? > source : modelSources ) { Class < ? > c = source . getModelType ( ) ; modelNames . add ( c . getName ( ) ) ; modelNames . addAll ( toClassnameList ( getAllI... |
public class WebSecurityValidatorImpl { /** * { @ inheritDoc } */
@ Override public boolean checkDataConstraints ( String contextId , Object httpServletRequest , WebUserDataPermission webUDPermission ) { } } | HttpServletRequest req = null ; if ( httpServletRequest != null ) { try { req = ( HttpServletRequest ) httpServletRequest ; } catch ( ClassCastException cce ) { Tr . error ( tc , "JACC_WEB_SPI_PARAMETER_ERROR" , new Object [ ] { httpServletRequest . getClass ( ) . getName ( ) , "checkDataConstraints" , "HttpServletRequ... |
public class FNNRG2Impl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public void eUnset ( int featureID ) { } } | switch ( featureID ) { case AfplibPackage . FNNRG2__TSID_LEN : setTSIDLen ( TSID_LEN_EDEFAULT ) ; return ; case AfplibPackage . FNNRG2__TSID : setTSID ( TSID_EDEFAULT ) ; return ; } super . eUnset ( featureID ) ; |
public class DefaultGroovyMethods { /** * Iterates over the collection of items and returns each item that matches
* the given filter - calling the < code > { @ link # isCase ( java . lang . Object , java . lang . Object ) } < / code >
* method used by switch statements . This method can be used with different
* ... | return ( List < T > ) grep ( ( Collection < T > ) self , filter ) ; |
public class UpdateCore { /** * Take a list of list of table names and collapse into a map
* which maps all table names to false . We will set the correct
* values later on . We just want to get the structure right now .
* Note that tables may be named multiple time in the lists of
* lists of tables . Everythin... | Map < String , Boolean > answer = new TreeMap < > ( ) ; for ( List < String > tables : allTableSets ) { for ( String table : tables ) { answer . put ( table , false ) ; } } return answer ; |
public class BlurImageOps { /** * Applies mean box filter to a { @ link Planar }
* @ param input Input image . Not modified .
* @ param output ( Optional ) Storage for output image , Can be null . Modified .
* @ param radius Radius of the box blur function .
* @ param storage ( Optional ) Storage for intermedia... | if ( storage == null ) storage = GeneralizedImageOps . createSingleBand ( input . getBandType ( ) , input . width , input . height ) ; if ( output == null ) output = input . createNew ( input . width , input . height ) ; for ( int band = 0 ; band < input . getNumBands ( ) ; band ++ ) { GBlurImageOps . mean ( input . ge... |
public class HomographyDirectLinearTransform { /** * More versatile process function . Lets any of the supporting data structures be passed in .
* @ param points2D List of 2D point associations . Can be null .
* @ param points3D List of 3D point or 2D line associations . Can be null .
* @ param conics List of con... | // no sanity check is done to see if the minimum number of points and conics has been provided because
// that is actually really complex to determine . Especially for conics
int num2D = points2D != null ? points2D . size ( ) : 0 ; int num3D = points3D != null ? points3D . size ( ) : 0 ; int numConic = conics != null ?... |
public class Files { /** * Reads the contents of a file into a String .
* The file is always closed . */
public static String readFileToString ( File file , Charset charset ) throws IOException { } } | InputStream in = null ; try { in = new FileInputStream ( file ) ; StringBuilderWriter sw = new StringBuilderWriter ( ) ; if ( null == charset ) IOs . copy ( new InputStreamReader ( in ) , sw ) ; else IOs . copy ( new InputStreamReader ( in , charset . name ( ) ) , sw ) ; return sw . toString ( ) ; } finally { IOs . clo... |
public class MPSImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public void eUnset ( int featureID ) { } } | switch ( featureID ) { case AfplibPackage . MPS__RG_LENGTH : setRGLength ( RG_LENGTH_EDEFAULT ) ; return ; case AfplibPackage . MPS__RESERVED : setReserved ( RESERVED_EDEFAULT ) ; return ; case AfplibPackage . MPS__FIXED_LENGTH_RG : getFixedLengthRG ( ) . clear ( ) ; return ; } super . eUnset ( featureID ) ; |
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EClass getIfcAirTerminalBoxType ( ) { } } | if ( ifcAirTerminalBoxTypeEClass == null ) { ifcAirTerminalBoxTypeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 7 ) ; } return ifcAirTerminalBoxTypeEClass ; |
public class Snackbar { /** * Displays the { @ link Snackbar } at the bottom of the
* { @ link android . view . ViewGroup } provided .
* @ param parent
* @ param usePhoneLayout */
public void show ( ViewGroup parent , boolean usePhoneLayout ) { } } | MarginLayoutParams params = init ( parent . getContext ( ) , null , parent , usePhoneLayout ) ; updateLayoutParamsMargins ( null , params ) ; showInternal ( null , params , parent ) ; |
public class OptionalInt { /** * Invokes mapping function on inner value if present .
* @ param < U > the type of result value
* @ param mapper mapping function
* @ return an { @ code Optional } with transformed value if present ,
* otherwise an empty { @ code Optional }
* @ throws NullPointerException if val... | if ( ! isPresent ( ) ) return Optional . empty ( ) ; return Optional . ofNullable ( mapper . apply ( value ) ) ; |
public class ReportBreakScreen { /** * Print this field ' s data in XML format .
* @ return true if default params were found for this form .
* @ param out The http output stream .
* @ exception DBException File exception . */
public boolean printData ( PrintWriter out , int iPrintOptions ) { } } | this . setLastBreak ( this . isBreak ( ) ) ; if ( ! this . isLastBreak ( ) ) return false ; if ( ( iPrintOptions & HtmlConstants . FOOTING_SCREEN ) != HtmlConstants . FOOTING_SCREEN ) this . setLastBreak ( false ) ; // For footers only
boolean bInputFound = super . printData ( out , iPrintOptions ) ; return bInputFound... |
public class ConsoleAnnotatorFactory { /** * For which context type does this annotator work ? */
public Class < ? > type ( ) { } } | Type type = Types . getBaseClass ( getClass ( ) , ConsoleAnnotatorFactory . class ) ; if ( type instanceof ParameterizedType ) return Types . erasure ( Types . getTypeArgument ( type , 0 ) ) ; else return Object . class ; |
public class LetContentNode { /** * Creates a LetContentNode for a compiler - generated variable . Use this in passes that rewrite the
* tree and introduce local temporary variables . */
public static LetContentNode forVariable ( int id , SourceLocation sourceLocation , String varName , SourceLocation varNameLocation... | LetContentNode node = new LetContentNode ( id , sourceLocation , varName , varNameLocation , contentKind ) ; SoyType type = ( contentKind != null ) ? SanitizedType . getTypeForContentKind ( contentKind ) : StringType . getInstance ( ) ; node . getVar ( ) . setType ( type ) ; return node ; |
public class BinaryLog { /** * note that the string is already trim ( ) ' d by command - line parsing unless user explicitly escaped a space */
private static boolean looksLikeHelp ( String taskname ) { } } | if ( taskname == null ) return false ; // applied paranoia , since this isn ' t in a performance path
int start = 0 , len = taskname . length ( ) ; while ( start < len && ! Character . isLetter ( taskname . charAt ( start ) ) ) ++ start ; return ACTION_HELP . equalsIgnoreCase ( taskname . substring ( start ) . toLowerC... |
public class SharedSymbolTable { /** * Constructs a new shared symbol table from the parameters .
* As per { @ link IonSystem # newSharedSymbolTable ( String , int , Iterator , SymbolTable . . . ) } ,
* any duplicate or null symbol texts are skipped .
* Therefore , < b > THIS METHOD IS NOT SUITABLE WHEN READING S... | if ( name == null || name . length ( ) < 1 ) { throw new IllegalArgumentException ( "name must be non-empty" ) ; } if ( version < 1 ) { throw new IllegalArgumentException ( "version must be at least 1" ) ; } List < String > symbolsList = new ArrayList < String > ( ) ; Map < String , Integer > symbolsMap = new HashMap <... |
public class BaseXmlParser { /** * Adds all attributes of the specified elements as properties in the current builder .
* @ param element Element whose attributes are to be added .
* @ param builder Target builder . */
protected void addProperties ( Element element , BeanDefinitionBuilder builder ) { } } | NamedNodeMap attributes = element . getAttributes ( ) ; for ( int i = 0 ; i < attributes . getLength ( ) ; i ++ ) { Node node = attributes . item ( i ) ; String attrName = getNodeName ( node ) ; attrName = "class" . equals ( attrName ) ? "clazz" : attrName ; builder . addPropertyValue ( attrName , node . getNodeValue (... |
public class FieldUtils { /** * Writes a { @ code public } { @ link Field } . Only the specified class will be considered .
* @ param target
* the object to reflect , must not be { @ code null }
* @ param fieldName
* the field name to obtain
* @ param value
* to set
* @ throws IllegalArgumentException
*... | writeDeclaredField ( target , fieldName , value , false ) ; |
public class InternalSARLParser { /** * InternalSARL . g : 9915:1 : ruleInnerVarID returns [ AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken ( ) ] : ( this _ ID _ 0 = RULE _ ID | kw = ' abstract ' | kw = ' annotation ' | kw = ' class ' | kw = ' create ' | kw = ' def ' | kw = ' dispatch ' | kw = ' enum ' | k... | AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken ( ) ; Token this_ID_0 = null ; Token kw = null ; enterRule ( ) ; try { // InternalSARL . g : 9921:2 : ( ( this _ ID _ 0 = RULE _ ID | kw = ' abstract ' | kw = ' annotation ' | kw = ' class ' | kw = ' create ' | kw = ' def ' | kw = ' dispatch ' | kw = ' enum ' ... |
public class Marshaller { /** * Marshals both created and updated timestamp fields . */
private void marshalCreatedAndUpdatedTimestamp ( ) { } } | PropertyMetadata createdTimestampMetadata = entityMetadata . getCreatedTimestampMetadata ( ) ; PropertyMetadata updatedTimestampMetadata = entityMetadata . getUpdatedTimestampMetadata ( ) ; long millis = System . currentTimeMillis ( ) ; if ( createdTimestampMetadata != null ) { applyAutoTimestamp ( createdTimestampMeta... |
public class CmsPublishNotification { /** * Appends the contents of a list to the buffer with every entry in a new line . < p >
* @ param buffer The buffer were the entries of the list will be appended .
* @ param list The list with the entries to append to the buffer . */
private void appendList ( StringBuffer buf... | Iterator < Object > iter = list . iterator ( ) ; while ( iter . hasNext ( ) ) { Object entry = iter . next ( ) ; buffer . append ( entry ) . append ( "<br/>\n" ) ; } |
public class LifecycleQueryApprovalStatusRequest { /** * The chaincode endorsment policy for the approval being queried for . Only this or { link { @ link # setValidationParameter ( byte [ ] ) } }
* may be used in a request .
* @ param lifecycleChaincodeEndorsementPolicy
* @ throws InvalidArgumentException */
pub... | if ( null == lifecycleChaincodeEndorsementPolicy ) { throw new InvalidArgumentException ( "The parameter lifecycleChaincodeEndorsementPolicy may not be null." ) ; } this . validationParameter = lifecycleChaincodeEndorsementPolicy . getByteString ( ) ; |
public class OrExpressionImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public NotificationChain basicSetLeft ( Expression newLeft , NotificationChain msgs ) { } } | Expression oldLeft = left ; left = newLeft ; if ( eNotificationRequired ( ) ) { ENotificationImpl notification = new ENotificationImpl ( this , Notification . SET , SimpleExpressionsPackage . OR_EXPRESSION__LEFT , oldLeft , newLeft ) ; if ( msgs == null ) msgs = notification ; else msgs . add ( notification ) ; } retur... |
public class Feature { /** * Sets additional information and calculates values which should be calculated during object creation .
* @ param jsonFileNo index of the JSON file
* @ param configuration configuration for the report */
public void setMetaData ( int jsonFileNo , Configuration configuration ) { } } | for ( Element element : elements ) { element . setMetaData ( this ) ; if ( element . isScenario ( ) ) { scenarios . add ( element ) ; } } reportFileName = calculateReportFileName ( jsonFileNo ) ; featureStatus = calculateFeatureStatus ( ) ; calculateSteps ( ) ; |
public class VisualizeAssociationScoreApp { /** * Detects the locations of the features in the image and extracts descriptions of each of
* the features . */
private void extractImageFeatures ( final ProgressMonitor progressMonitor , final int progress , T image , List < TupleDesc > descs , List < Point2D_F64 > locs ... | SwingUtilities . invokeLater ( new Runnable ( ) { public void run ( ) { progressMonitor . setNote ( "Detecting" ) ; } } ) ; detector . detect ( image ) ; SwingUtilities . invokeLater ( new Runnable ( ) { public void run ( ) { progressMonitor . setProgress ( progress + 1 ) ; progressMonitor . setNote ( "Describing" ) ; ... |
public class EntityHomeHandle { /** * Return < code > EJBHome < / code > reference for this HomeHandle . < p > */
public EJBHome getEJBHome ( ) throws RemoteException { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getEJBHome" ) ; if ( home == null ) { try { Class homeClass = null ; try { // If we are running on the server side , then the thread
// context loader would have been set appropriately by
// the container . If running on a cli... |
public class AbstractChannelFactory { /** * Configures the compression options that should be used by the channel .
* @ param builder The channel builder to configure .
* @ param name The name of the client to configure . */
protected void configureCompression ( final T builder , final String name ) { } } | final GrpcChannelProperties properties = getPropertiesFor ( name ) ; if ( properties . isFullStreamDecompression ( ) ) { builder . enableFullStreamDecompression ( ) ; } |
public class ManagedClustersInner { /** * Gets access profile of a managed cluster .
* Gets the accessProfile for the specified role name of the managed cluster with a specified resource group and name .
* @ param resourceGroupName The name of the resource group .
* @ param resourceName The name of the managed cl... | return getAccessProfilesWithServiceResponseAsync ( resourceGroupName , resourceName , roleName ) . map ( new Func1 < ServiceResponse < ManagedClusterAccessProfileInner > , ManagedClusterAccessProfileInner > ( ) { @ Override public ManagedClusterAccessProfileInner call ( ServiceResponse < ManagedClusterAccessProfileInne... |
public class DefaultJsonMapper { /** * Given a { @ code json } value of something like { @ code MyValue } or { @ code 123 } , return a representation of that value
* of type { @ code type } .
* This is to support non - legal JSON served up by Facebook for API calls like { @ code Friends . get } ( example result :
... | // cleanup the json string
if ( json . length ( ) > 1 && json . startsWith ( "\"" ) && json . endsWith ( "\"" ) ) { json = json . replaceFirst ( "\"" , "" ) ; json = json . substring ( 0 , json . length ( ) - 1 ) ; } if ( String . class . equals ( type ) ) { return ( T ) json ; } if ( Integer . class . equals ( type ) ... |
public class RemoteQueueBrowser { /** * / * ( non - Javadoc )
* @ see net . timewalker . ffmq4 . common . session . AbstractQueueBrowser # onQueueBrowserClose ( ) */
@ Override protected void onQueueBrowserClose ( ) { } } | super . onQueueBrowserClose ( ) ; try { CloseBrowserQuery query = new CloseBrowserQuery ( ) ; query . setSessionId ( session . getId ( ) ) ; query . setBrowserId ( id ) ; transportEndpoint . blockingRequest ( query ) ; } catch ( JMSException e ) { ErrorTools . log ( e , log ) ; } |
public class SortedLists { /** * Searches the specified list for the specified object using the binary search algorithm . The
* list must be sorted into ascending order according to the specified comparator ( as by the
* { @ link Collections # sort ( List , Comparator ) Collections . sort ( List , Comparator ) } me... | checkNotNull ( comparator ) ; checkNotNull ( list ) ; checkNotNull ( presentBehavior ) ; checkNotNull ( absentBehavior ) ; if ( ! ( list instanceof RandomAccess ) ) { list = Lists . newArrayList ( list ) ; } // TODO ( user ) : benchmark when it ' s best to do a linear search
int lower = 0 ; int upper = list . size ( ) ... |
public class LNGBoundedIntQueue { /** * Grows this queue to a given size .
* @ param size the size */
private void growTo ( int size ) { } } | this . elems . growTo ( size , 0 ) ; this . first = 0 ; this . maxSize = size ; this . queueSize = 0 ; this . last = 0 ; |
public class MessageProcessor { /** * Invokes the activation method of the passed instance . */
@ Override public void activate ( final T instance , final Object key ) throws DempsyException { } } | wrap ( ( ) -> activationMethod . invoke ( instance , key ) ) ; |
public class AdminBadwordAction { @ Execute public HtmlResponse details ( final int crudMode , final String id ) { } } | verifyCrudMode ( crudMode , CrudMode . DETAILS ) ; saveToken ( ) ; return asDetailsHtml ( ) . useForm ( EditForm . class , op -> { op . setup ( form -> { badWordService . getBadWord ( id ) . ifPresent ( entity -> { copyBeanToBean ( entity , form , copyOp -> { copyOp . excludeNull ( ) ; } ) ; form . crudMode = crudMode ... |
public class GeoCodeLoader { /** * Read places from an input stream . The format is | separated . It may
* contain just a historical place name or both historical and modern
* places names .
* @ param istream the input stream */
public final void loadAndFind ( final InputStream istream ) { } } | load ( istream , ( s1 , s2 ) -> gcc . find ( s1 , s2 ) ) ; |
public class SoyAutoescapeException { /** * Creates a SoyAutoescapeException , with meta info filled in based on the given Soy node .
* @ param message The error message .
* @ param cause The cause of this exception .
* @ param node The node from which to derive the exception meta info .
* @ return The new SoyA... | return new SoyAutoescapeException ( message , cause , node ) ; |
public class MarkLogicClientImpl { /** * clears triples from named graph
* @ param tx
* @ param contexts */
public void performClear ( Transaction tx , Resource ... contexts ) { } } | if ( notNull ( contexts ) ) { for ( int i = 0 ; i < contexts . length ; i ++ ) { if ( notNull ( contexts [ i ] ) ) { graphManager . delete ( contexts [ i ] . stringValue ( ) , tx ) ; } else { graphManager . delete ( DEFAULT_GRAPH_URI , tx ) ; } } } else { graphManager . delete ( DEFAULT_GRAPH_URI , tx ) ; } |
public class StAXEncoder { /** * Writes an xml comment with the data enclosed
* ( non - Javadoc )
* @ see javax . xml . stream . XMLStreamWriter # writeComment ( java . lang . String ) */
public void writeComment ( String data ) throws XMLStreamException { } } | if ( preserveComment ) { try { this . checkPendingATEvents ( ) ; // TODO improve EXI API
char [ ] chars = data . toCharArray ( ) ; encoder . encodeComment ( chars , 0 , chars . length ) ; } catch ( Exception e ) { throw new XMLStreamException ( e . getLocalizedMessage ( ) , e ) ; } } |
public class XMLUtil { /** * Read an XML fragment from an XML file .
* The XML file is well - formed . It means that the fragment will contains a single element : the root element
* within the input file .
* @ param file is the file to read
* @ param skipRoot if { @ code true } the root element itself is not pa... | assert file != null : AssertMessages . notNullParameter ( ) ; try ( FileInputStream fis = new FileInputStream ( file ) ) { return readXMLFragment ( fis , skipRoot ) ; } |
public class FixedFatJarExportPage { /** * Open an appropriate ant script browser so that the user can specify a source
* to import from */
private void handleAntScriptBrowseButtonPressed ( ) { } } | FileDialog dialog = new FileDialog ( getContainer ( ) . getShell ( ) , SWT . SAVE ) ; dialog . setFilterExtensions ( new String [ ] { "*." + ANTSCRIPT_EXTENSION } ) ; // $ NON - NLS - 1 $
String currentSourceString = getAntScriptValue ( ) ; int lastSeparatorIndex = currentSourceString . lastIndexOf ( File . separator )... |
public class MethodlessRouter { /** * This method does nothing if the path pattern has already been added .
* A path pattern can only point to one target . */
public MethodlessRouter < T > addRoute ( String pathPattern , T target ) { } } | PathPattern p = new PathPattern ( pathPattern ) ; if ( routes . containsKey ( p ) ) { return this ; } routes . put ( p , target ) ; return this ; |
public class VersionTreeResponseEntity { /** * { @ inheritDoc } */
public void write ( OutputStream outputStream ) throws IOException { } } | try { this . xmlStreamWriter = XMLOutputFactory . newInstance ( ) . createXMLStreamWriter ( outputStream , Constants . DEFAULT_ENCODING ) ; xmlStreamWriter . setNamespaceContext ( namespaceContext ) ; xmlStreamWriter . writeStartDocument ( ) ; xmlStreamWriter . writeStartElement ( "D" , "multistatus" , "DAV:" ) ; xmlSt... |
public class EglCore { /** * Returns true if our context and the specified surface are current . */
public boolean isCurrent ( EGLSurface eglSurface ) { } } | return mEGLContext . equals ( EGL14 . eglGetCurrentContext ( ) ) && eglSurface . equals ( EGL14 . eglGetCurrentSurface ( EGL14 . EGL_DRAW ) ) ; |
public class JGTProcessingRegion { /** * Reprojects a { @ link JGTProcessingRegion region } .
* @ param sourceCRS
* the original { @ link CoordinateReferenceSystem crs } of the
* region .
* @ param targetCRS
* the target { @ link CoordinateReferenceSystem crs } of the
* region .
* @ param lenient
* defi... | MathTransform transform = CRS . findMathTransform ( sourceCRS , targetCRS , lenient ) ; Envelope envelope = getEnvelope ( ) ; Envelope targetEnvelope = JTS . transform ( envelope , transform ) ; return new JGTProcessingRegion ( targetEnvelope . getMinX ( ) , targetEnvelope . getMaxX ( ) , targetEnvelope . getMinY ( ) ,... |
public class SLF4JLog { /** * Converts the first input parameter to String and then delegates to the
* wrapped < code > org . slf4j . Logger < / code > instance .
* @ param message
* the message to log . Converted to { @ link String }
* @ param t
* the exception to log */
public void debug ( Object message , ... | logger . debug ( String . valueOf ( message ) , t ) ; |
public class ResourceBundlesHandlerImpl { /** * ( non - Javadoc )
* @ seenet . jawr . web . resource . bundle . handler . ResourceBundlesHandler #
* getGlobalResourceBundlePaths
* ( net . jawr . web . resource . bundle . iterator . ConditionalCommentCallbackHandler ,
* java . lang . String ) */
@ Override publi... | List < JoinableResourceBundle > currentBundles = new ArrayList < > ( ) ; for ( JoinableResourceBundle bundle : globalBundles ) { if ( bundle . getId ( ) . equals ( bundleId ) ) { currentBundles . add ( bundle ) ; break ; } } return getBundleIterator ( getDebugMode ( ) , currentBundles , commentCallbackHandler , variant... |
public class JNote { /** * Moves the note to a new position in order to set the new stem
* begin position to the new location . */
public void setStemBeginPosition ( Point2D newStemBeginPos ) { } } | double xDelta = newStemBeginPos . getX ( ) - getStemBeginPosition ( ) . getX ( ) ; double yDelta = newStemBeginPos . getY ( ) - getStemBeginPosition ( ) . getY ( ) ; // System . out . println ( " translating " + this + " with " + xDelta + " / " + yDelta ) ;
Point2D newBase = new Point2D . Double ( getBase ( ) . getX ( ... |
public class RestRequest { /** * Executes the request . This will automatically retry if we hit a ratelimit .
* @ param function A function which processes the rest response to the requested object .
* @ return A future which will contain the output of the function . */
public CompletableFuture < T > execute ( Func... | api . getRatelimitManager ( ) . queueRequest ( this ) ; CompletableFuture < T > future = new CompletableFuture < > ( ) ; result . whenComplete ( ( result , throwable ) -> { if ( throwable != null ) { future . completeExceptionally ( throwable ) ; return ; } try { future . complete ( function . apply ( result ) ) ; } ca... |
public class FixBondOrdersTool { /** * kekuliseAromaticRings - function to add double / single bond order information for molecules having rings containing all atoms marked SP2 or Planar3 hybridisation .
* @ param molecule The { @ link IAtomContainer } to kekulise
* @ return The { @ link IAtomContainer } with kekul... | IAtomContainer mNew = null ; try { mNew = ( IAtomContainer ) molecule . clone ( ) ; } catch ( Exception e ) { throw new CDKException ( "Failed to clone source molecule" ) ; } IRingSet ringSet ; try { ringSet = removeExtraRings ( mNew ) ; } catch ( CDKException x ) { throw x ; } catch ( Exception x ) { throw new CDKExce... |
public class JSType { /** * Coerces this type to an Object type , then gets the type of the property whose name is given .
* < p > Unlike { @ link ObjectType # getPropertyType } , returns null if the property is not found .
* @ return The property ' s type . { @ code null } if the current type cannot have propertie... | @ Nullable JSType propertyType = findPropertyTypeWithoutConsideringTemplateTypes ( propertyName ) ; if ( propertyType == null ) { return null ; } // Do templatized type replacing logic here , and make this method final , to prevent a subclass
// from forgetting to replace template types
if ( getTemplateTypeMap ( ) . is... |
public class ServiceAgentManagedService { /** * Update the SLP service agent ' s configuration , unregistering from the
* OSGi service registry and stopping it if it had already started . The
* new SLP service agent will be started with the new configuration and
* registered in the OSGi service registry using the... | LOGGER . entering ( CLASS_NAME , "updated" , dictionary ) ; synchronized ( lock ) { if ( serviceAgent != null ) { serviceRegistration . unregister ( ) ; if ( LOGGER . isLoggable ( Level . FINER ) ) LOGGER . finer ( "Server " + this + " stopping..." ) ; serviceAgent . stop ( ) ; if ( LOGGER . isLoggable ( Level . FINE )... |
public class MtasSolrComponentPrefix { /** * ( non - Javadoc )
* @ see
* mtas . solr . handler . component . util . MtasSolrComponent # distributedProcess ( org .
* apache . solr . handler . component . ResponseBuilder ,
* mtas . codec . util . CodecComponent . ComponentFields ) */
@ SuppressWarnings ( "uncheck... | // rewrite
NamedList < Object > mtasResponse = null ; try { mtasResponse = ( NamedList < Object > ) rb . rsp . getValues ( ) . get ( "mtas" ) ; } catch ( ClassCastException e ) { log . debug ( e ) ; mtasResponse = null ; } if ( mtasResponse != null ) { ArrayList < Object > mtasResponsePrefix ; try { mtasResponsePrefix ... |
public class DefaultEntityTagFunction { /** * Appends a 64 - bit integer without its leading zero bytes . */
private static int appendLong ( byte [ ] data , int offset , long value ) { } } | offset = appendByte ( data , offset , value >>> 56 ) ; offset = appendByte ( data , offset , value >>> 48 ) ; offset = appendByte ( data , offset , value >>> 40 ) ; offset = appendByte ( data , offset , value >>> 32 ) ; offset = appendInt ( data , offset , value ) ; return offset ; |
public class NormalizerSerializer { /** * Check if a serializer strategy supports a normalizer . If the normalizer is a custom opType , it checks if the
* supported normalizer class matches .
* @ param strategy
* @ param normalizerType
* @ param normalizerClass
* @ return whether the strategy supports the nor... | if ( ! strategy . getSupportedType ( ) . equals ( normalizerType ) ) { return false ; } if ( strategy . getSupportedType ( ) . equals ( NormalizerType . CUSTOM ) ) { // Strategy should be instance of CustomSerializerStrategy
if ( ! ( strategy instanceof CustomSerializerStrategy ) ) { throw new IllegalArgumentException ... |
public class RequeryOnUpdateHandler { /** * Set the field or file that owns this listener .
* @ param owner My owner . */
public void setOwner ( ListenerOwner owner ) { } } | super . setOwner ( owner ) ; if ( owner != null ) if ( m_recordToSync != null ) m_recordToSync . addListener ( new FileRemoveBOnCloseHandler ( this ) ) ; |
public class StreamSet { /** * Set the persistent data for a specific stream
* @ param priority
* @ param reliability
* @ param completedPrefix
* @ throws SIResourceException */
protected void setPersistentData ( int priority , Reliability reliability , long completedPrefix ) throws SIResourceException { } } | getSubset ( reliability ) . setPersistentData ( priority , completedPrefix ) ; |
public class Quicksort { /** * Routine that arranges the elements in ascending order around a pivot . This routine
* runs in O ( n ) time .
* @ param < E > the type of elements in this list .
* @ param list array that we want to sort
* @ param start index of the starting point to sort
* @ param end index of t... | E pivot = list . get ( end ) ; int index = start - 1 ; for ( int j = start ; j < end ; j ++ ) { if ( list . get ( j ) . compareTo ( pivot ) <= 0 ) { index ++ ; TrivialSwap . swap ( list , index , j ) ; } } TrivialSwap . swap ( list , index + 1 , end ) ; return index + 1 ; |
public class Entity { /** * Returns the internationalized entity title */
public String getTitle ( ) { } } | final String key = String . format ( "pm.entity.%s" , getId ( ) ) ; final String message = pm . message ( key ) ; if ( key . equals ( message ) ) { if ( getExtendzEntity ( ) != null ) { return getExtendzEntity ( ) . getTitle ( ) ; } } return message ; |
public class CmsJSONSearchConfigurationParser { /** * Returns a map with additional request parameters , mapping the parameter names to Solr query parts .
* @ return A map with additional request parameters , mapping the parameter names to Solr query parts . */
protected Map < String , String > getAdditionalParameter... | Map < String , String > result ; try { JSONArray additionalParams = m_configObject . getJSONArray ( JSON_KEY_ADDITIONAL_PARAMETERS ) ; result = new HashMap < String , String > ( additionalParams . length ( ) ) ; for ( int i = 0 ; i < additionalParams . length ( ) ; i ++ ) { try { JSONObject currentParam = additionalPar... |
public class MethodUtils { /** * < p > Return an accessible method ( that is , one that can be invoked via
* reflection ) that implements the specified Method . If no such method
* can be found , return < code > null < / code > . < / p >
* @ param clazz The class of the object
* @ param method The method that w... | // Make sure we have a method to check
if ( method == null ) { return ( null ) ; } // If the requested method is not public we cannot call it
if ( ! Modifier . isPublic ( method . getModifiers ( ) ) ) { return ( null ) ; } boolean sameClass = true ; if ( clazz == null ) { clazz = method . getDeclaringClass ( ) ; } else... |
public class DRL5Expressions { /** * src / main / resources / org / drools / compiler / lang / DRL5Expressions . g : 603:1 : creator : ( nonWildcardTypeArguments ) ? createdName ( arrayCreatorRest | classCreatorRest ) ; */
public final void creator ( ) throws RecognitionException { } } | try { // src / main / resources / org / drools / compiler / lang / DRL5Expressions . g : 604:5 : ( ( nonWildcardTypeArguments ) ? createdName ( arrayCreatorRest | classCreatorRest ) )
// src / main / resources / org / drools / compiler / lang / DRL5Expressions . g : 604:7 : ( nonWildcardTypeArguments ) ? createdName ( ... |
public class PdfTransparencyGroup { /** * Determining the initial backdrop against which its stack is composited .
* @ param isolated */
public void setIsolated ( boolean isolated ) { } } | if ( isolated ) put ( PdfName . I , PdfBoolean . PDFTRUE ) ; else remove ( PdfName . I ) ; |
public class EditableNamespaceContext { /** * Returns all prefixes with a namespace binding . */
@ Override public Iterator < String > getPrefixes ( String namespaceURI ) { } } | // per javax . xml . namespace . NamespaceContext doc
if ( namespaceURI == null ) throw new IllegalArgumentException ( "Cannot find prefix for null namespace URI" ) ; List < String > list = new ArrayList < > ( ) ; if ( XMLConstants . XML_NS_URI . equals ( namespaceURI ) ) list . add ( XMLConstants . XML_NS_PREFIX ) ; e... |
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EClass getGSLE ( ) { } } | if ( gsleEClass == null ) { gsleEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 486 ) ; } return gsleEClass ; |
public class ByteArrayUtil { /** * Put the source < i > float < / i > into the destination byte array starting at the given offset
* in little endian order .
* There is no bounds checking .
* @ param array destination byte array
* @ param offset destination offset
* @ param value source < i > float < / i > */... | putIntLE ( array , offset , Float . floatToRawIntBits ( value ) ) ; |
public class ByteBufferOutputStream { /** * Write byte range to start of the buffer .
* @ param b
* @ param offset
* @ param length */
public void prewrite ( byte [ ] b , int offset , int length ) { } } | ensureReserve ( length ) ; System . arraycopy ( b , offset , _buf , _start - length , length ) ; _start -= length ; |
public class PatchedRuntimeEnvironmentBuilder { /** * Adds and asset .
* @ param asset asset
* @ param type type
* @ return this RuntimeEnvironmentBuilder */
public RuntimeEnvironmentBuilder addAsset ( Resource asset , ResourceType type ) { } } | if ( asset == null || type == null ) { return this ; } _runtimeEnvironment . addAsset ( asset , type ) ; return this ; |
public class Jronn { /** * Convert raw scores to ranges . Gives ranges for given probability of disorder value
* @ param scores the raw probability of disorder scores for each residue in the sequence .
* @ param probability the cut off threshold . Include all residues with the probability of disorder greater then t... | assert scores != null && scores . length > 0 ; assert probability > 0 && probability < 1 ; int count = 0 ; int regionLen = 0 ; List < Range > ranges = new ArrayList < Range > ( ) ; for ( float score : scores ) { count ++ ; // Round to 2 decimal points before comparison
score = ( float ) ( Math . round ( score * 100.0 )... |
public class HtmlTableRendererBase { /** * Renders the start of a new row of body content .
* @ param facesContext the < code > FacesContext < / code > .
* @ param writer the < code > ResponseWriter < / code > .
* @ param uiData the < code > UIData < / code > being rendered .
* @ throws IOException if an except... | writer . startElement ( HTML . TR_ELEM , null ) ; // uiData ) ;
renderRowStyle ( facesContext , writer , uiData , styles , rowStyleIndex ) ; Object rowId = uiData . getAttributes ( ) . get ( org . apache . myfaces . shared . renderkit . JSFAttr . ROW_ID ) ; if ( rowId != null ) { writer . writeAttribute ( HTML . ID_ATT... |
public class AnalyzerJobHelper { /** * Gets the " best candidate " analyzer job based on search criteria offered
* in parameters .
* @ param descriptorName
* @ param analyzerName
* @ param analyzerInputName
* @ return */
public AnalyzerJob getAnalyzerJob ( final String descriptorName , final String analyzerNa... | List < AnalyzerJob > candidates = new ArrayList < > ( _jobs ) ; // filter analyzers of the corresponding type
candidates = CollectionUtils2 . refineCandidates ( candidates , o -> { final String actualDescriptorName = o . getDescriptor ( ) . getDisplayName ( ) ; return descriptorName . equals ( actualDescriptorName ) ; ... |
public class SerializerMarshaller { /** * Marshall the given parameter object . */
public void marshall ( Serializer serializer , ProtocolMarshaller protocolMarshaller ) { } } | if ( serializer == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( serializer . getParquetSerDe ( ) , PARQUETSERDE_BINDING ) ; protocolMarshaller . marshall ( serializer . getOrcSerDe ( ) , ORCSERDE_BINDING ) ; } catch ( Exception e ) { thro... |
public class DateTimeUtils { /** * Generates a DateTimeFormatter using a custom pattern with the default locale or a new one
* according to what language and country are provided as params .
* @ param format the pattern
* @ param lang the language
* @ param country the country
* @ return the DateTimeFormatter... | if ( StringUtils . isNotBlank ( format ) ) { DateTimeFormatter dateFormat = DateTimeFormat . forPattern ( format ) ; if ( StringUtils . isNotBlank ( lang ) ) { return dateFormat . withLocale ( DateTimeUtils . getLocaleByCountry ( lang , country ) ) ; } return dateFormat ; } return formatWithDefault ( lang , country ) ; |
public class ModelFactory { /** * Constructor - method to use when services with inbound and outbound services
* @ param groupId
* @ param artifactId
* @ param version
* @ param service
* @ return the new model instance */
public static IModel newModel ( String groupId , String artifactId , String version , S... | return doCreateNewModel ( groupId , artifactId , version , service , muleVersion , null , null , inboundTransport , outboundTransport , transformerType , null , null ) ; |
public class FlashImpl { /** * Get the proper map according to the current phase :
* Normal case :
* - First request , restore view phase ( create a new one ) : render map n
* - First request , execute phase : Skipped
* - First request , render phase : render map n
* Render map n saved and put as execute map ... | FacesContext facesContext = FacesContext . getCurrentInstance ( ) ; if ( PhaseId . RENDER_RESPONSE . equals ( facesContext . getCurrentPhaseId ( ) ) || ! facesContext . isPostback ( ) ) { return _getRenderFlashMap ( facesContext ) ; } else { return _getExecuteFlashMap ( facesContext ) ; } |
public class JavaUtil { /** * Equals with null checking
* @ param a first argument
* @ param b second argument
* @ return is equals result */
public static < T > boolean equalsE ( T a , T b ) { } } | if ( a == null && b == null ) { return true ; } if ( a != null && b == null ) { return false ; } if ( a == null ) { return false ; } return a . equals ( b ) ; |
public class InsertToSeries { /** * Get body parameters
* @ return Values of body parameters ( name of parameter : value of the parameter ) */
@ Override public Map < String , Object > getBodyParameters ( ) { } } | HashMap < String , Object > params = new HashMap < String , Object > ( ) ; params . put ( "itemType" , this . itemType ) ; params . put ( "itemId" , this . itemId ) ; params . put ( "time" , this . time ) ; if ( this . cascadeCreate != null ) { params . put ( "cascadeCreate" , this . cascadeCreate ) ; } return params ; |
public class XmlBeanAssert { /** * Compares the attributes of the elements at the current position of two XmlCursors .
* The ordering of the attributes is ignored in the comparison . Fails the JUnit test
* case if the attributes or their values are different .
* @ param message to display on test failure ( may be... | Map < QName , String > map1 = new HashMap < QName , String > ( ) ; Map < QName , String > map2 = new HashMap < QName , String > ( ) ; boolean attr1 = expected . toFirstAttribute ( ) ; boolean attr2 = actual . toFirstAttribute ( ) ; if ( attr1 != attr2 ) { if ( expected . isAttr ( ) || actual . isAttr ( ) ) { expected .... |
public class XMLUtils { /** * Look up namespace attribute declarations in the specified node and
* store them in a binding map , where the key is the namespace prefix and the value
* is the namespace uri .
* @ param referenceNode XML node to search for namespace declarations .
* @ return map containing namespac... | Map < String , String > namespaces = new HashMap < String , String > ( ) ; Node node ; if ( referenceNode . getNodeType ( ) == Node . DOCUMENT_NODE ) { node = referenceNode . getFirstChild ( ) ; } else { node = referenceNode ; } if ( node != null && node . hasAttributes ( ) ) { for ( int i = 0 ; i < node . getAttribute... |
public class JmxUtils { /** * Create a model mbean from an object using the description given in the
* Jmx annotation if present . Only operations are supported so far , no
* attributes , constructors , or notifications
* @ param o The object to create an MBean for
* @ return The ModelMBean for the given object... | try { ModelMBean mbean = new RequiredModelMBean ( ) ; JmxManaged annotation = o . getClass ( ) . getAnnotation ( JmxManaged . class ) ; String description = annotation == null ? "" : annotation . description ( ) ; ModelMBeanInfo info = new ModelMBeanInfoSupport ( o . getClass ( ) . getName ( ) , description , extractAt... |
public class Bot { /** * / * Type */
public static void type ( String text , WebElement webElement ) { } } | if ( text == null ) { return ; } webElement . sendKeys ( text ) ; |
public class MalmoEnv { /** * Convenience method to load a Malmo mission specification from an XML - file
* @ param filename name of XML file
* @ return Mission specification loaded from XML - file */
public static MissionSpec loadMissionXML ( String filename ) { } } | MissionSpec mission = null ; try { String xml = new String ( Files . readAllBytes ( Paths . get ( filename ) ) ) ; mission = new MissionSpec ( xml , true ) ; } catch ( Exception e ) { // e . printStackTrace ( ) ;
throw new RuntimeException ( e ) ; } return mission ; |
public class SessionApi { /** * Login to get private token . This functionality is not available on GitLab servers 10.2 and above .
* < pre > < code > GitLab Endpoint : POST / session < / code > < / pre >
* @ param username the username to login
* @ param email the email address to login
* @ param password the ... | if ( ( username == null || username . trim ( ) . length ( ) == 0 ) && ( email == null || email . trim ( ) . length ( ) == 0 ) ) { throw new IllegalArgumentException ( "both username and email cannot be empty or null" ) ; } Form formData = new Form ( ) ; addFormParam ( formData , "email" , email , false ) ; addFormParam... |
public class AuthConfig { /** * Retrieves the resource id of the given Style index .
* @ param context a valid Context
* @ param index The index to search on the Style definition .
* @ return the id if found or - 1. */
int getIdForResource ( @ NonNull Context context , @ StyleableRes int index ) { } } | final int [ ] attrs = new int [ ] { index } ; final TypedArray typedArray = context . getTheme ( ) . obtainStyledAttributes ( styleRes , attrs ) ; int id = typedArray . getResourceId ( 0 , - 1 ) ; typedArray . recycle ( ) ; return id ; |
public class FieldUtils { /** * Returns a set of all fields matching the supplied filter
* declared in the target class or any of its super classes .
* @ param filter Filter to use .
* @ return All matching fields declared by the target class . */
public static Set < Field > getFields ( Class < ? > target , Field... | Class < ? > clazz = target ; Set < Field > fields = getDeclaredFields ( clazz , filter ) ; while ( ( clazz = clazz . getSuperclass ( ) ) != null ) { fields . addAll ( getDeclaredFields ( clazz , filter ) ) ; } return fields ; |
public class AbbreviationManager { /** * A get a java . nio . file . Path object from a file name .
* @ param fileName The file name
* @ return The Path object
* @ throws IOException
* @ throws URISyntaxException */
private Path getPath ( String fileName ) throws IOException , URISyntaxException { } } | Path path ; URL url = getClass ( ) . getClassLoader ( ) . getResource ( fileName ) ; if ( url == null ) { throw new IOException ( String . format ( "File %s is not existing" , fileName ) ) ; } URI uri = url . toURI ( ) ; Map < String , String > env = new HashMap < > ( ) ; if ( uri . toString ( ) . contains ( "!" ) ) { ... |
public class AWSCognitoIdentityProviderClient { /** * Resends the confirmation ( for confirmation of registration ) to a specific user in the user pool .
* @ param resendConfirmationCodeRequest
* Represents the request to resend the confirmation code .
* @ return Result of the ResendConfirmationCode operation ret... | request = beforeClientExecution ( request ) ; return executeResendConfirmationCode ( request ) ; |
public class GetAccountSummaryResult { /** * A set of key – value pairs containing information about IAM entity usage and IAM quotas .
* @ param summaryMap
* A set of key – value pairs containing information about IAM entity usage and IAM quotas .
* @ return Returns a reference to this object so that method calls... | setSummaryMap ( summaryMap ) ; return this ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.