signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ResourceSpecificResult { /** * Additional details about the results of the evaluation decision . When there are both IAM policies and resource * policies , this parameter explains how each set of policies contributes to the final evaluation decision . When * simulating cross - account access to a resou...
setEvalDecisionDetails ( evalDecisionDetails ) ; return this ;
public class QualityAnalyzer { /** * @ param bestSol * @ param topology * @ param cloudCharacteristics * @ return The calculated availability of the system . * This method will be recursive . The availablity of the system will * be the product of the availability of its first module and the * modules it req...
visited = new HashSet < String > ( ) ; TopologyElement initialElement = topology . getInitialElement ( ) ; visited . add ( initialElement . getName ( ) ) ; String cloudUsedInitialElement = bestSol . getCloudOfferNameForModule ( initialElement . getName ( ) ) ; double instancesUsedInitialElement = - 1 ; try { instancesU...
public class NameTable { /** * Gets the name of the variable as it is declared in ObjC , fully qualified . */ public String getVariableQualifiedName ( VariableElement var ) { } }
String shortName = getVariableShortName ( var ) ; if ( ElementUtil . isGlobalVar ( var ) ) { String className = getFullName ( ElementUtil . getDeclaringClass ( var ) ) ; if ( ElementUtil . isEnumConstant ( var ) ) { // Enums are declared in an array , so we use a macro to shorten the // array access expression . return...
public class HeaderHandler { /** * Add the generic value to this handler with no required key . * @ param inputValue * @ return boolean ( true means success adding ) */ public boolean add ( String inputValue ) { } }
String value = Normalizer . normalize ( inputValue , Normalizer . NORMALIZE_LOWER ) ; if ( ! contains ( this . genericValues , value ) ) { addElement ( value ) ; return true ; } return false ;
public class MarkLogicRepositoryConnection { /** * add triple statements * @ param statements * @ param contexts * @ throws RepositoryException */ @ Override public void add ( Iterable < ? extends Statement > statements , Resource ... contexts ) throws RepositoryException { } }
Iterator < ? extends Statement > iter = statements . iterator ( ) ; while ( iter . hasNext ( ) ) { Statement st = iter . next ( ) ; add ( st , mergeResource ( st . getContext ( ) , contexts ) ) ; }
public class StorageAccountsInner { /** * List service SAS credentials of a specific resource . * @ param resourceGroupName The name of the resource group within the user ' s subscription . The name is case insensitive . * @ param accountName The name of the storage account within the specified resource group . Sto...
if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( accountName == null ) { throw new IllegalArgumentException ( "Parameter accountName is required and cannot be null." ) ; } if ( this . client . subscriptionId ( ) == null ) { ...
public class ScopedAttributeResolver { /** * side effect : modifies the list */ private static void addDescriptorsToList ( final List < FeatureDescriptor > descriptorList , final Map < String , Object > scopeMap ) { } }
for ( Object name : scopeMap . keySet ( ) ) { String strName = ( String ) name ; Class < ? > runtimeType = scopeMap . get ( strName ) . getClass ( ) ; descriptorList . add ( makeDescriptor ( strName , runtimeType ) ) ; }
public class PHS398ChecklistV1_3Generator { /** * This method will set values to income budget periods */ private static void setIncomeBudgetPeriods ( PHS398Checklist13 phsChecklist , List < ? extends BudgetProjectIncomeContract > projectIncomes ) { } }
if ( projectIncomes . isEmpty ( ) ) { phsChecklist . setProgramIncome ( YesNoDataType . N_NO ) ; } else { phsChecklist . setProgramIncome ( YesNoDataType . Y_YES ) ; } phsChecklist . setIncomeBudgetPeriodArray ( getIncomeBudgetPeriod ( projectIncomes ) ) ;
public class PropNbCC { @ Override public ESat isEntailed ( ) { } }
if ( k . getUB ( ) < minCC ( ) || k . getLB ( ) > maxCC ( ) ) { return ESat . FALSE ; } if ( isCompletelyInstantiated ( ) ) { return ESat . TRUE ; } return ESat . UNDEFINED ;
public class CheckJSDocStyle { /** * Checks that the inline type annotations are correct . */ private void checkInlineParams ( NodeTraversal t , Node function ) { } }
Node paramList = NodeUtil . getFunctionParameters ( function ) ; for ( Node param : paramList . children ( ) ) { JSDocInfo jsDoc = param . getJSDocInfo ( ) ; if ( jsDoc == null ) { t . report ( param , MISSING_PARAMETER_JSDOC ) ; return ; } else { JSTypeExpression paramType = jsDoc . getType ( ) ; checkNotNull ( paramT...
public class PolicyQualifierInfo { /** * Returns a DER - encodable representation of this instance . * @ return a < code > DERObject < / code > value */ public DERObject toASN1Object ( ) { } }
ASN1EncodableVector dev = new ASN1EncodableVector ( ) ; dev . add ( policyQualifierId ) ; dev . add ( qualifier ) ; return new DERSequence ( dev ) ;
public class SWTUtil { /** * Sets width and height hint for the button control . * < b > Note : < / b > This is a NOP if the button ' s layout data is not * an instance of < code > GridData < / code > . * @ param buttonthe button for which to set the dimension hint */ public static void setButtonDimensionHint ( B...
Assert . isNotNull ( button ) ; Object gd = button . getLayoutData ( ) ; if ( gd instanceof GridData ) { ( ( GridData ) gd ) . widthHint = getButtonWidthHint ( button ) ; ( ( GridData ) gd ) . horizontalAlignment = GridData . FILL ; }
public class AjaxController { /** * Handles request for deleting account */ @ RequestMapping ( value = "/delete" , method = RequestMethod . POST ) public @ ResponseBody void delete ( @ RequestParam ( value = "username" , required = true ) String username , HttpServletResponse response ) { } }
logger . debug ( "Received request to delete account" ) ; ResponseAccount responseAccount = accountService . getAccountByUsername ( username ) ; if ( responseAccount . getAccount ( ) == null ) { try { response . sendError ( 500 , "No such user exists: " + username ) ; } catch ( IOException e ) { e . printStackTrace ( )...
public class FlowIdSoapCodec { /** * Write flow id to message . * @ param message the message * @ param flowId the flow id */ public static void writeFlowId ( Message message , String flowId ) { } }
if ( ! ( message instanceof SoapMessage ) ) { return ; } SoapMessage soapMessage = ( SoapMessage ) message ; Header hdFlowId = soapMessage . getHeader ( FLOW_ID_QNAME ) ; if ( hdFlowId != null ) { LOG . warning ( "FlowId already existing in soap header, need not to write FlowId header." ) ; return ; } try { soapMessage...
public class CommerceNotificationAttachmentPersistenceImpl { /** * Returns the last commerce notification attachment in the ordered set where uuid = & # 63 ; . * @ param uuid the uuid * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the last matchin...
int count = countByUuid ( uuid ) ; if ( count == 0 ) { return null ; } List < CommerceNotificationAttachment > list = findByUuid ( uuid , count - 1 , count , orderByComparator ) ; if ( ! list . isEmpty ( ) ) { return list . get ( 0 ) ; } return null ;
public class Graphs { /** * Returns a view of { @ code network } with the direction ( if any ) of every edge reversed . All other * properties remain intact , and further updates to { @ code network } will be reflected in the view . */ public static < N , E > Network < N , E > transpose ( Network < N , E > network ) ...
if ( ! network . isDirected ( ) ) { return network ; // the transpose of an undirected network is an identical network } if ( network instanceof TransposedNetwork ) { return ( ( TransposedNetwork < N , E > ) network ) . network ; } return new TransposedNetwork < N , E > ( network ) ;
public class ModuleDependency { /** * / * ( non - Javadoc ) * @ see org . jboss . staxmapper . XMLElementWriter # writeContent ( org . jboss . staxmapper . XMLExtendedStreamWriter , java . lang . Object ) */ @ Override public void writeContent ( XMLExtendedStreamWriter writer , Dependency value ) throws XMLStreamExce...
if ( value != null && this != value ) { throw new IllegalStateException ( "Wrong target dependency." ) ; } writer . writeStartElement ( ModuleConfigImpl . MODULE ) ; writer . writeAttribute ( ModuleConfigImpl . NAME , name ) ; if ( export ) { writer . writeAttribute ( ModuleConfigImpl . EXPORT , "true" ) ; } writer . w...
public class MjdbcPoolBinder { /** * Returns new Pooled { @ link DataSource } implementation * @ param poolProperties pool properties * @ return new Pooled { @ link DataSource } implementation * @ throws SQLException */ public static DataSource createDataSource ( Properties poolProperties ) throws SQLException { ...
assertNotNull ( poolProperties ) ; try { return BasicDataSourceFactory . createDataSource ( poolProperties ) ; } catch ( Exception e ) { throw new SQLException ( e . getMessage ( ) ) ; }
public class KTypeArrayList { /** * { @ inheritDoc } */ @ Override public void insert ( int index , KType e1 ) { } }
assert ( index >= 0 && index <= size ( ) ) : "Index " + index + " out of bounds [" + 0 + ", " + size ( ) + "]." ; ensureBufferSpace ( 1 ) ; System . arraycopy ( buffer , index , buffer , index + 1 , elementsCount - index ) ; buffer [ index ] = e1 ; elementsCount ++ ;
public class AbstractProvisioner { /** * Removes all previously made attachments to static class . * @ param cls */ public void detach ( Class < ? > cls ) { } }
Iterator < Map . Entry < String , List < InstanceMethod > > > ki = map . entrySet ( ) . iterator ( ) ; while ( ki . hasNext ( ) ) { Map . Entry < String , List < InstanceMethod > > entry = ki . next ( ) ; Iterator < InstanceMethod > li = entry . getValue ( ) . iterator ( ) ; while ( li . hasNext ( ) ) { InstanceMethod ...
public class LinearViterbi { /** * 回溯获得最优路径 * @ param lattice 网格 * @ return 最优路径及其得分 */ protected Predict < int [ ] > getPath ( Node [ ] [ ] lattice ) { } }
Predict < int [ ] > res = new Predict < int [ ] > ( ) ; if ( lattice . length == 0 ) return res ; float max = Float . NEGATIVE_INFINITY ; int cur = 0 ; for ( int c = 0 ; c < ysize ( ) ; c ++ ) { if ( lattice [ lattice . length - 1 ] [ c ] == null ) continue ; if ( lattice [ lattice . length - 1 ] [ c ] . score > max ) ...
public class SemanticParserExampleLoss { /** * Writes a collection of losses to { @ code filename } in JSON * format . * @ param filename * @ param losses * @ param annotations */ public static void writeJsonToFile ( String filename , List < SemanticParserExampleLoss > losses , List < Map < String , Object > > ...
Preconditions . checkArgument ( annotations . size ( ) == losses . size ( ) ) ; List < String > lines = Lists . newArrayList ( ) ; for ( int i = 0 ; i < losses . size ( ) ; i ++ ) { lines . add ( losses . get ( i ) . toJson ( annotations . get ( i ) ) ) ; } IoUtils . writeLines ( filename , lines ) ;
public class Ifc4FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public String convertIfcDistributionSystemEnumToString ( EDataType eDataType , Object instanceValue ) { } }
return instanceValue == null ? null : instanceValue . toString ( ) ;
public class CPInstanceUtil { /** * Returns all the cp instances where displayDate & lt ; & # 63 ; and status = & # 63 ; . * @ param displayDate the display date * @ param status the status * @ return the matching cp instances */ public static List < CPInstance > findByLtD_S ( Date displayDate , int status ) { } ...
return getPersistence ( ) . findByLtD_S ( displayDate , status ) ;
public class Fields { /** * < p > Filters the { @ link Field } s whose < b > case insensitive < / b > name equals the given name and returns * a new instance of { @ link Fields } that wrap the filtered collection . * @ param fieldName * the { @ link Field } s having this case insensitive name will be filtered *...
assertNotEmpty ( fieldName ) ; return new Fields ( filter ( new Criterion ( ) { @ Override public boolean evaluate ( Field field ) { return field . getName ( ) . equalsIgnoreCase ( fieldName ) ; } } ) ) ;
public class ListDocumentClassifiersResult { /** * A list containing the properties of each job returned . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setDocumentClassifierPropertiesList ( java . util . Collection ) } or * { @ link # withDocumentClassif...
if ( this . documentClassifierPropertiesList == null ) { setDocumentClassifierPropertiesList ( new java . util . ArrayList < DocumentClassifierProperties > ( documentClassifierPropertiesList . length ) ) ; } for ( DocumentClassifierProperties ele : documentClassifierPropertiesList ) { this . documentClassifierPropertie...
public class FedoraObject { /** * Creates an instance based on the current state of this one . * @ return a deep copy . */ public FedoraObject copy ( ) { } }
FedoraObject copy = new FedoraObject ( ) . pid ( pid ) . state ( state ) . label ( label ) . ownerId ( ownerId ) . createdDate ( Util . copy ( createdDate ) ) . lastModifiedDate ( Util . copy ( lastModifiedDate ) ) ; for ( Datastream ds : datastreams . values ( ) ) { copy . putDatastream ( ds . copy ( ) ) ; } return co...
public class Var2Data { /** * This method retrieves a byte array containing the data at the * given offset in the block . If no data is found at the given offset * this method returns null . * @ param offset offset of required data * @ return byte array containing required data */ public byte [ ] getByteArray (...
byte [ ] result = null ; if ( offset != null ) { result = m_map . get ( offset ) ; } return ( result ) ;
public class JCudaDriver { /** * < code > < pre > * \ brief Suggest a launch configuration with reasonable occupancy * Returns in \ p * blockSize a reasonable block size that can achieve * the maximum occupancy ( or , the maximum number of active warps with * the fewest blocks per multiprocessor ) , and in \ p ...
// The callback involves a state on the native side , // so ensure synchronization here synchronized ( OCCUPANCY_LOCK ) { return checkResult ( cuOccupancyMaxPotentialBlockSizeNative ( minGridSize , blockSize , func , blockSizeToDynamicSMemSize , dynamicSMemSize , blockSizeLimit ) ) ; }
public class OptionsProcessorContext { /** * Returns true if the { @ link Options } attached to this context contains the * given feature . * @ param feature * the feature for which to look . * @ return true if the context contains this feature , false if not . */ public boolean containsFeature ( Feature featur...
switch ( feature ) { case DRILLDOWN : return ! getDrilldownOptions ( ) . isEmpty ( ) ; case GLOBAL : return getGlobal ( ) != null ; case INTERACTION : return ! getInteractionFunctions ( ) . isEmpty ( ) ; case LIVEDATA : return ! getLiveDataSeries ( ) . isEmpty ( ) ; case SELECTION : return ! getSelectionFunctions ( ) ....
public class CreateLoggerDefinitionVersionRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CreateLoggerDefinitionVersionRequest createLoggerDefinitionVersionRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( createLoggerDefinitionVersionRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( createLoggerDefinitionVersionRequest . getAmznClientToken ( ) , AMZNCLIENTTOKEN_BINDING ) ; protocolMarshaller . marshall ( createLoggerDefinitionVe...
public class XmlConfiguration { private synchronized static void initParser ( ) throws IOException { } }
if ( __parser != null ) return ; __parser = new XmlParser ( ) ; URL config13URL = XmlConfiguration . class . getClassLoader ( ) . getResource ( "org/browsermob/proxy/jetty/xml/configure_1_3.dtd" ) ; __parser . redirectEntity ( "configure.dtd" , config13URL ) ; __parser . redirectEntity ( "configure_1_3.dtd" , config13U...
public class FactoryOrientationAlgs { /** * Estimates the orientation without calculating the image derivative . * @ see ImplOrientationImageAverageIntegral * @ param sampleRadius Radius of the region being considered in terms of samples . Typically 6. * @ param samplePeriod How often the image is sampled . This ...
return ( OrientationIntegral < II > ) new ImplOrientationImageAverageIntegral ( objectRadiusToScale , sampleRadius , samplePeriod , sampleWidth , weightSigma , integralImage ) ;
public class ThresholdEventWriter { /** * Write an Event via the delegate writer * @ param event the Event to write * @ throws IOException as thrown by the delegate writer */ @ Override public synchronized void write ( final Event event ) throws IOException { } }
if ( ! acceptsEvents ) { log . warn ( "Writer not ready, discarding event: {}" , event ) ; return ; } delegate . write ( event ) ; uncommittedWriteCount ++ ; commitIfNeeded ( ) ;
public class StringList2VarcharFieldConversion { /** * / * ( non - Javadoc ) * @ see org . apache . ojb . broker . accesslayer . conversions . FieldConversion # sqlToJava ( java . lang . Object ) */ public Object sqlToJava ( Object source ) throws ConversionException { } }
if ( source == null ) { return null ; } if ( source . toString ( ) . equals ( NULLVALUE ) ) { return null ; } if ( source . toString ( ) . equals ( EMPTYCOLLEC ) ) { return new ArrayList ( ) ; } List v = new ArrayList ( ) ; StringBuffer input = new StringBuffer ( ) ; StringBuffer newString = new StringBuffer ( ) ; int ...
public class JdbcParameterFactory { /** * { @ link java . sql . Connection # createSQLXML ( ) } のラッパー * @ param conn コネクション * @ return SQLXMLインタフェースを実装しているオブジェクト * @ see java . sql . Connection # createSQLXML ( ) */ public static SQLXML createSQLXML ( final Connection conn ) { } }
try { return conn . createSQLXML ( ) ; } catch ( SQLException e ) { throw new UroborosqlRuntimeException ( e ) ; }
public class CmsXmlContentPropertyHelper { /** * Given a string which might be a id or a ( sitemap or VFS ) URI , this method will return * a bean containing the right ( sitemap or vfs ) root path and ( sitemap entry or structure ) id . < p > * @ param cms the current CMS context * @ param idOrUri a string contai...
CmsVfsFileValueBean result ; if ( CmsUUID . isValidUUID ( idOrUri ) ) { CmsUUID id = new CmsUUID ( idOrUri ) ; String uri = getUriForId ( cms , id ) ; result = new CmsVfsFileValueBean ( cms . getRequestContext ( ) . addSiteRoot ( uri ) , id ) ; } else { String uri = idOrUri ; CmsUUID id = getIdForUri ( cms , idOrUri ) ...
public class TriMarkers { /** * Get the normal vector to this triangle , of length 1. * @ param t input triangle * @ return vector normal to the triangle . */ public static Vector3D getNormalVector ( Triangle t ) throws IllegalArgumentException { } }
if ( Double . isNaN ( t . p0 . z ) || Double . isNaN ( t . p1 . z ) || Double . isNaN ( t . p2 . z ) ) { throw new IllegalArgumentException ( "Z is required, cannot compute triangle normal of " + t ) ; } double dx1 = t . p0 . x - t . p1 . x ; double dy1 = t . p0 . y - t . p1 . y ; double dz1 = t . p0 . z - t . p1 . z ;...
public class CathDomain { /** * Returns the chains this domain is defined over ; contains more than 1 element only if this domains is a multi - chain domain . */ public Set < String > getChains ( ) { } }
Set < String > chains = new HashSet < String > ( ) ; List < ResidueRange > rrs = toCanonical ( ) . getResidueRanges ( ) ; for ( ResidueRange rr : rrs ) chains . add ( rr . getChainName ( ) ) ; return chains ; } @ Override public String getIdentifier ( ) { return getCATH ( ) ; } @ Override public SubstructureIdentifier ...
public class DockerAgentUtils { /** * Get image ID from imageTag on the current agent . * @ param imageTag * @ return */ public static String getImageIdFromAgent ( Launcher launcher , final String imageTag , final String host ) throws IOException , InterruptedException { } }
return launcher . getChannel ( ) . call ( new MasterToSlaveCallable < String , IOException > ( ) { public String call ( ) throws IOException { return DockerUtils . getImageIdFromTag ( imageTag , host ) ; } } ) ;
public class IscsiWriteTrx { /** * { @ inheritDoc } */ @ Override public void bootstrap ( byte [ ] bytes ) throws TTException { } }
BlockDataElement data = new BlockDataElement ( getPageTransaction ( ) . incrementDataKey ( ) , bytes ) ; if ( mDelegate . getCurrentData ( ) != null ) { getPageTransaction ( ) . setData ( data ) ; mDelegate . moveTo ( data . getDataKey ( ) ) ; } else { getPageTransaction ( ) . setData ( data ) ; mDelegate . moveTo ( da...
public class FNORGImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setMaxBExt ( Integer newMaxBExt ) { } }
Integer oldMaxBExt = maxBExt ; maxBExt = newMaxBExt ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . FNORG__MAX_BEXT , oldMaxBExt , maxBExt ) ) ;
public class PyCodeBuilder { /** * Pops off the current output variable . The previous output variable again becomes the current . */ void popOutputVar ( ) { } }
outputVars . pop ( ) ; OutputVar outputVar = outputVars . peek ( ) ; // null if outputVars is now empty if ( outputVar != null ) { currOutputVarName = outputVar . name ( ) ; currOutputVarIsInited = outputVar . isInited ( ) ; } else { currOutputVarName = null ; currOutputVarIsInited = false ; }
public class AbstractLifecycle { /** * Execute a lifecycle stage . */ @ Override public void execute ( @ Nonnull final LifecycleStage lifecycleStage ) { } }
List < LifecycleListener > lifecycleListeners = listeners . get ( lifecycleStage ) ; if ( lifecycleListeners == null ) { throw illegalStage ( lifecycleStage ) ; } log ( "Stage '%s' starting..." , lifecycleStage . getName ( ) ) ; // Reverse the order for the STOP stage , so that dependencies are torn down in reverse ord...
public class NumberType { /** * Converter from a numeric object to Double . Input is checked to be * within range represented by Double */ private static Double convertToDouble ( Object a ) { } }
double value ; if ( a instanceof java . lang . Double ) { return ( Double ) a ; } else if ( a instanceof BigDecimal ) { BigDecimal bd = ( BigDecimal ) a ; value = bd . doubleValue ( ) ; int signum = bd . signum ( ) ; BigDecimal bdd = new BigDecimal ( value + signum ) ; if ( bdd . compareTo ( bd ) != signum ) { throw Er...
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link FunctionsType } { @ code > } } */ @ XmlElementDecl ( namespace = "http://www.w3.org/1998/Math/MathML" , name = "ident" ) public JAXBElement < FunctionsType > createIdent ( FunctionsType value ) { } }
return new JAXBElement < FunctionsType > ( _Ident_QNAME , FunctionsType . class , null , value ) ;
public class JsonReaderI { /** * add a value in an array json object . */ public void addValue ( Object current , Object value ) throws ParseException , IOException { } }
throw new RuntimeException ( ERR_MSG + " addValue(Object current, Object value) in " + this . getClass ( ) ) ;
public class IOUtils { /** * Read bytes from an input stream . * This implementation guarantees that it will read as many bytes * as possible before giving up ; this may not always be the case for * subclasses of { @ link InputStream } . * @ param input where to read input from * @ param buffer destination ...
if ( length < 0 ) { throw new IllegalArgumentException ( "Length must not be negative: " + length ) ; } int remaining = length ; try { while ( remaining > 0 ) { int location = length - remaining ; int count = input . read ( buffer , offset + location , remaining ) ; if ( EOF == count ) { // EOF break ; } remaining -= c...
public class GoogleCloudStorageFileSystem { /** * If the given item is a directory then the paths of its * children are returned , otherwise the path of the given item is returned . * @ param fileInfo FileInfo of an item . * @ param recursive If true , path of all children are returned ; * else , only immediate...
Preconditions . checkNotNull ( fileInfo ) ; URI path = fileInfo . getPath ( ) ; logger . atFine ( ) . log ( "listFileNames(%s)" , path ) ; List < URI > paths = new ArrayList < > ( ) ; List < String > childNames ; // If it is a directory , obtain info about its children . if ( fileInfo . isDirectory ( ) ) { if ( fileInf...
public class ApiOvhXdsl { /** * Return the broken equipment in instantRefund * REST : POST / xdsl / spare / { spare } / returnMerchandise * @ param spare [ required ] The internal name of your spare */ public void spare_spare_returnMerchandise_POST ( String spare ) throws IOException { } }
String qPath = "/xdsl/spare/{spare}/returnMerchandise" ; StringBuilder sb = path ( qPath , spare ) ; exec ( qPath , "POST" , sb . toString ( ) , null ) ;
public class StormConfigUtil { /** * Storm設定オブジェクトから文字列型の設定値を取得する 。 < br > * 存在しない場合は空リストを返す 。 * @ param stormConf Storm設定オブジェクト * @ param key 設定値のキー * @ return 個別設定値 ( { @ literal List < String > } 型 ) */ @ SuppressWarnings ( "unchecked" ) public static List < String > getStringListValue ( Config stormConf...
List < String > configList = ( List < String > ) stormConf . get ( key ) ; if ( configList == null ) { configList = new ArrayList < String > ( ) ; } return configList ;
public class CassandraClientProperties { /** * Populate client properties . * @ param client the client * @ param properties the properties */ public void populateClientProperties ( Client client , Map < String , Object > properties ) { } }
this . cassandraClientBase = ( CassandraClientBase ) client ; if ( properties != null ) { for ( String key : properties . keySet ( ) ) { Object value = properties . get ( key ) ; if ( checkNull ( key , value ) ) { if ( key . equals ( CONSISTENCY_LEVEL ) ) { setConsistencylevel ( value ) ; } else if ( key . equals ( CQL...
public class DateUtils { /** * < p > Constructs an < code > Iterator < / code > over each day in a date * range defined by a focus date and range style . < / p > * < p > For instance , passing Thursday , July 4 , 2002 and a * < code > RANGE _ MONTH _ SUNDAY < / code > will return an < code > Iterator < / code > ...
if ( focus == null ) { throw new IllegalArgumentException ( "The date must not be null" ) ; } if ( focus instanceof Date ) { return iterator ( ( Date ) focus , rangeStyle ) ; } else if ( focus instanceof Calendar ) { return iterator ( ( Calendar ) focus , rangeStyle ) ; } else { throw new ClassCastException ( "Could no...
public class UpdateGroupPermissionHandler { /** * Called when a change is the record status is about to happen / has happened . * @ param field If this file change is due to a field , this is the field . * @ param iChangeType The type of change that occurred . * @ param bDisplayOption If true , display any change...
if ( ( iChangeType == DBConstants . AFTER_UPDATE_TYPE ) || ( iChangeType == DBConstants . AFTER_ADD_TYPE ) || ( iChangeType == DBConstants . AFTER_DELETE_TYPE ) ) { int iGroupID = ( int ) this . getOwner ( ) . getField ( UserPermission . USER_GROUP_ID ) . getValue ( ) ; if ( m_iOldGroupID != - 1 ) if ( iGroupID != m_iO...
public class ChessboardCornerClusterFinder { /** * Greedily select the next edge that will belong to the final graph . * @ param firstIdx Index of the edge CW of the one being considered * @ param splitterSet Set of edges that the splitter can belong to * @ param candidateSet Set of edges that the next edge can b...
Edge e0 = candidateSet . get ( firstIdx ) ; results . index = - 1 ; results . error = Double . MAX_VALUE ; boolean checkParallel = ! Double . isNaN ( parallel ) ; for ( int i = 0 ; i < candidateSet . size ( ) ; i ++ ) { if ( i == firstIdx ) continue ; // stop considering edges when they are more than 180 degrees away E...
public class DeleteEntryOnErrorFix { /** * it will report the fixer message , if entry is set to be deleted . */ public ValidationResult check ( Entry entry ) { } }
result = new ValidationResult ( ) ; if ( entry . isDelete ( ) ) { reportMessage ( Severity . FIX , entry . getOrigin ( ) , FIX_ID , entry . getPrimaryAccession ( ) ) ; } return result ;
public class ResourceXMLGenerator { /** * Write Document to a file * @ param output stream * @ param doc document * @ throws IOException on error */ private static void serializeDocToStream ( final OutputStream output , final Document doc ) throws IOException { } }
final OutputFormat format = OutputFormat . createPrettyPrint ( ) ; final XMLWriter writer = new XMLWriter ( output , format ) ; writer . write ( doc ) ; writer . flush ( ) ;
public class DescribeHostReservationsRequest { /** * The host reservation IDs . * @ return The host reservation IDs . */ public java . util . List < String > getHostReservationIdSet ( ) { } }
if ( hostReservationIdSet == null ) { hostReservationIdSet = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return hostReservationIdSet ;
public class AwsSecurityFindingFilters { /** * The label of a finding ' s severity . * @ param severityLabel * The label of a finding ' s severity . */ public void setSeverityLabel ( java . util . Collection < StringFilter > severityLabel ) { } }
if ( severityLabel == null ) { this . severityLabel = null ; return ; } this . severityLabel = new java . util . ArrayList < StringFilter > ( severityLabel ) ;
public class PatchSchedulesInner { /** * Create or replace the patching schedule for Redis cache ( requires Premium SKU ) . * @ param resourceGroupName The name of the resource group . * @ param name The name of the Redis cache . * @ param scheduleEntries List of patch schedules for a Redis cache . * @ throws I...
if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( name == null ) { throw new IllegalArgumentException ( "Parameter name is required and cannot be null." ) ; } if ( this . client . subscriptionId ( ) == null ) { throw new Ille...
public class ClassLoaderLeakPreventorFactory { /** * Get instance of { @ link ClassLoaderPreMortemCleanUp } for further configuring . * Please be aware that { @ link ClassLoaderLeakPreventor } s created by the same factory share the same * { @ link PreClassLoaderInitiator } and { @ link ClassLoaderPreMortemCleanUp ...
return ( C ) this . cleanUps . get ( clazz . getName ( ) ) ;
public class JsonWriter { /** * Encodes the property name and date value ( ISO format ) . * Output is for example < code > " theDate " : " 2013-01-24 " < / code > . * @ throws org . sonar . api . utils . text . WriterException on any failure */ public JsonWriter propDate ( String name , @ Nullable Date value ) { } ...
return name ( name ) . valueDate ( value ) ;
public class FieldInfo { /** * Initialize this field . * After setting up the input params , initField ( ) is called . * @ param record The parent record . This field is added to the record ' s field list . * @ param strName The field name . * @ param iDataLength The maximum length ( DEFAULT _ FIELD _ LENGTH if...
m_record = ( FieldList ) record ; if ( m_record != null ) m_record . addField ( this ) ; m_strFieldName = strName ; m_iMaxLength = iDataLength ; m_strFieldDesc = strDesc ; if ( objDefault != null ) m_classData = objDefault . getClass ( ) ; else m_classData = String . class ; m_bHidden = false ; m_bModified = false ; m_...
public class StringUtils { /** * Encodes the given string into a sequence of bytes using the UTF - 8 charset , storing the result * into a new byte array . * @ param string the String to encode , may be < code > null < / code > * @ return encoded bytes , or < code > null < / code > if the input string was < code ...
if ( string == null ) { return null ; } return string . getBytes ( StandardCharsets . UTF_8 ) ;
public class Factory { /** * Registers a component using its type ( a constructor function ) . * @ param locator a locator to identify component to be created . * @ param type a component type . */ public void registerAsType ( Object locator , Class < ? > type ) { } }
if ( locator == null ) throw new NullPointerException ( "Locator cannot be null" ) ; if ( type == null ) throw new NullPointerException ( "Type cannot be null" ) ; IComponentFactory factory = new DefaultComponentFactory ( type ) ; _registrations . add ( new Registration ( locator , factory ) ) ;
public class HashCodeBuilder { /** * Append a < code > hashCode < / code > for an < code > Object < / code > . * @ param object * the Object to add to the < code > hashCode < / code > * @ return this */ public HashCodeBuilder append ( final Object object ) { } }
if ( object == null ) { iTotal = iTotal * iConstant ; } else { if ( object . getClass ( ) . isArray ( ) ) { // ' Switch ' on type of array , to dispatch to the correct handler // This handles multi dimensional arrays if ( object instanceof long [ ] ) { append ( ( long [ ] ) object ) ; } else if ( object instanceof int ...
public class ge_p3_dbl { /** * r = 2 * p */ public static void ge_p3_dbl ( ge_p1p1 r , ge_p3 p ) { } }
ge_p2 q = new ge_p2 ( ) ; ge_p3_to_p2 . ge_p3_to_p2 ( q , p ) ; ge_p2_dbl . ge_p2_dbl ( r , q ) ;
public class JSDocInfoBuilder { /** * Records that the { @ link JSDocInfo } being built should have its * { @ link JSDocInfo # isDeprecated ( ) } flag set to { @ code true } . */ public boolean recordDeprecated ( ) { } }
if ( ! currentInfo . isDeprecated ( ) ) { currentInfo . setDeprecated ( true ) ; populated = true ; return true ; } else { return false ; }
public class CharTrie { /** * Add char trie . * @ param z the z * @ return the char trie */ public CharTrie add ( CharTrie z ) { } }
return reduceSimple ( z , ( left , right ) -> ( null == left ? 0 : left ) + ( null == right ? 0 : right ) ) ;
public class Context { /** * Set the current locale . * @ see java . util . Locale */ public final Locale setLocale ( Locale loc ) { } }
if ( sealed ) onSealedMutation ( ) ; Locale result = locale ; locale = loc ; return result ;
public class UserApiKeyAuthProviderClientImpl { /** * Creates a user API key that can be used to authenticate as the current user . * @ param name The name of the API key to be created * @ return A { @ link Task } that contains the created API key . */ @ Override public Task < UserApiKey > createApiKey ( @ NonNull ...
return dispatcher . dispatchTask ( new Callable < UserApiKey > ( ) { @ Override public UserApiKey call ( ) { return createApiKeyInternal ( name ) ; } } ) ;
public class SectionedViewSectionDescriptor { /** * Checks if the include regular expression is valid . */ public FormValidation doCheckIncludeRegex ( @ QueryParameter String value ) throws IOException , ServletException , InterruptedException { } }
String v = Util . fixEmpty ( value ) ; if ( v != null ) { try { Pattern . compile ( v ) ; } catch ( PatternSyntaxException pse ) { return FormValidation . error ( pse . getMessage ( ) ) ; } } return FormValidation . ok ( ) ;
public class Criteria { /** * Adds not Null criteria , * customer _ id is not Null * The attribute will NOT be translated into column name * @ param column The column name to be used without translation */ public void addColumnNotNull ( String column ) { } }
// PAW // SelectionCriteria c = ValueCriteria . buildNotNullCriteria ( column , getAlias ( ) ) ; SelectionCriteria c = ValueCriteria . buildNotNullCriteria ( column , getUserAlias ( column ) ) ; c . setTranslateAttribute ( false ) ; addSelectionCriteria ( c ) ;
public class ApplicationPermissionValue { /** * region > implies , refutes */ @ Programmatic public boolean implies ( final ApplicationFeatureId featureId , final ApplicationPermissionMode mode ) { } }
if ( getRule ( ) != ApplicationPermissionRule . ALLOW ) { // only allow rules can imply return false ; } if ( getMode ( ) == ApplicationPermissionMode . VIEWING && mode == ApplicationPermissionMode . CHANGING ) { // an " allow viewing " permission does not imply ability to change return false ; } // determine if this p...
public class ExtendedBitInput { public static String readAscii ( final BitInput bitInput , final int lengthSize ) throws IOException { } }
return new String ( readBytes ( bitInput , lengthSize , true , 7 ) , "ASCII" ) ;
public class StreamHelpers { /** * Reads a number of bytes from the given InputStream and returns it as the given byte array . * @ param source The InputStream to read . * @ param length The number of bytes to read . * @ return A byte array containing the contents of the Stream . * @ throws IOException If unabl...
byte [ ] ret = new byte [ length ] ; int readBytes = readAll ( source , ret , 0 , ret . length ) ; if ( readBytes < ret . length ) { throw new EOFException ( String . format ( "Was only able to read %d bytes, which is less than the requested length of %d." , readBytes , ret . length ) ) ; } return ret ;
public class GSCAImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case AfplibPackage . GSCA__XPOS : setXPOS ( ( Integer ) newValue ) ; return ; case AfplibPackage . GSCA__YPOS : setYPOS ( ( Integer ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ;
public class SpatialKeyAlgo { /** * This method returns latitude and longitude via latLon - calculated from specified spatialKey * @ param spatialKey is the input */ @ Override public final void decode ( long spatialKey , GHPoint latLon ) { } }
// Performance : calculating ' midLon ' and ' midLat ' on the fly is not slower than using // precalculated values from arrays and for ' bits ' a precalculated array is even slightly slower ! // Use the value in the middle = > start from " min " use " max " as initial step - size double midLat = ( bbox . maxLat - bbox ...
public class CommonCfg { /** * printTrace : This method print the messages to the trace file . * @ param key * @ param value * @ param tabLevel */ @ Trivial public static void printTrace ( String key , Object value , int tabLevel ) { } }
if ( tc . isDebugEnabled ( ) ) { StringBuilder msg = new StringBuilder ( ) ; for ( int count = 0 ; count < tabLevel ; count ++ ) { msg . append ( "\t" ) ; } if ( value != null ) { msg . append ( key ) ; msg . append ( ":" ) ; msg . append ( value ) ; } else { msg . append ( key ) ; } Tr . debug ( tc , msg . toString ( ...
public class OidcWebFingerDiscoveryService { /** * Normalize uri components . * @ param resource the resource * @ return the uri components */ protected UriComponents normalize ( final String resource ) { } }
val builder = UriComponentsBuilder . newInstance ( ) ; val matcher = RESOURCE_NORMALIZED_PATTERN . matcher ( resource ) ; if ( ! matcher . matches ( ) ) { LOGGER . error ( "Unable to match the resource [{}] against pattern [{}] for normalization" , resource , matcher . pattern ( ) . pattern ( ) ) ; return null ; } buil...
public class ManagementEnforcer { /** * hasNamedPolicy determines whether a named authorization rule exists . * @ param ptype the policy type , can be " p " , " p2 " , " p3 " , . . * @ param params the " p " policy rule . * @ return whether the rule exists . */ public boolean hasNamedPolicy ( String ptype , List ...
return model . hasPolicy ( "p" , ptype , params ) ;
public class CertificatePoliciesExtension { /** * Get the attribute value . */ public List < PolicyInformation > get ( String name ) throws IOException { } }
if ( name . equalsIgnoreCase ( POLICIES ) ) { // XXXX May want to consider cloning this return certPolicies ; } else { throw new IOException ( "Attribute name [" + name + "] not recognized by " + "CertAttrSet:CertificatePoliciesExtension." ) ; }
public class ApiOvhOrder { /** * Create order * REST : POST / order / overTheBox / new / { duration } * @ param offer [ required ] Offer name * @ param deviceId [ required ] The id of the device * @ param voucher [ required ] An optional voucher * @ param duration [ required ] Duration */ public OvhOrder over...
String qPath = "/order/overTheBox/new/{duration}" ; StringBuilder sb = path ( qPath , duration ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "deviceId" , deviceId ) ; addBody ( o , "offer" , offer ) ; addBody ( o , "voucher" , voucher ) ; String resp = exec ( qPath , "POST" , s...
public class DefuzzifierFactory { /** * Creates a Defuzzifier by executing the registered constructor * @ param key is the unique name by which constructors are registered * @ param type is the type of a WeightedDefuzzifier * @ return a Defuzzifier by executing the registered constructor and setting * its type ...
Defuzzifier result = constructObject ( key ) ; if ( result instanceof WeightedDefuzzifier ) { ( ( WeightedDefuzzifier ) result ) . setType ( type ) ; } return result ;
public class MakeValidOp { /** * If X or Y is null , return an empty Point */ private Point makePointValid ( Point point ) { } }
CoordinateSequence sequence = point . getCoordinateSequence ( ) ; GeometryFactory factory = point . getFactory ( ) ; CoordinateSequenceFactory csFactory = factory . getCoordinateSequenceFactory ( ) ; if ( sequence . size ( ) == 0 ) { return point ; } else if ( Double . isNaN ( sequence . getOrdinate ( 0 , 0 ) ) || Doub...
public class LoadClient { /** * Record the event elapsed time to the histogram and delay initiation of the next event based * on the load distribution . */ void delay ( long alreadyElapsed ) { } }
recorder . recordValue ( alreadyElapsed ) ; if ( distribution != null ) { long nextPermitted = Math . round ( distribution . sample ( ) * 1000000000.0 ) ; if ( nextPermitted > alreadyElapsed ) { LockSupport . parkNanos ( nextPermitted - alreadyElapsed ) ; } }
public class LinkArgs { /** * Custom properties that my be used by application - specific markup builders or processors . * @ param map Property map . Is merged with properties already set . * @ return this */ public @ NotNull LinkArgs properties ( Map < String , Object > map ) { } }
if ( map == null ) { throw new IllegalArgumentException ( "Map argument must not be null." ) ; } getProperties ( ) . putAll ( map ) ; return this ;
public class HttpPushBuilder { /** * Methods required by com . ibm . wsspi . http . ee8 . HttpPushBuilder */ @ Override public Set < HeaderField > getHeaders ( ) { } }
HashSet < HeaderField > headerFields = new HashSet < HeaderField > ( ) ; if ( _headers . size ( ) > 0 ) { Iterator < String > headerNames = _headers . keySet ( ) . iterator ( ) ; while ( headerNames . hasNext ( ) ) { Iterator < HttpHeaderField > headers = _headers . get ( headerNames . next ( ) ) . iterator ( ) ; while...
public class PropertyConverter { /** * Converts a string denoting an amount of time into seconds . Strings are expected to follow this form where # equals a digit : # M The following are permitted for denoting time : H = hours , M = minutes , S = seconds * @ param time * time * @ return time in seconds */ public ...
int result = 0 ; if ( time . endsWith ( "H" ) ) { int hoursToAdd = Integer . valueOf ( StringUtils . remove ( time , 'H' ) ) ; result = ( 60 * 60 ) * hoursToAdd ; } else if ( time . endsWith ( "M" ) ) { int minsToAdd = Integer . valueOf ( StringUtils . remove ( time , 'M' ) ) ; result = 60 * minsToAdd ; } else if ( tim...
public class FOPServlet { /** * { @ inheritDoc } */ @ Override public void init ( ) throws ServletException { } }
this . uriResolver = new RepositoryURIResolver ( ) ; this . transFactory = TransformerFactory . newInstance ( ) ; this . transFactory . setURIResolver ( this . uriResolver ) ; // Configure FopFactory as desired this . fopFactory = FopFactory . newInstance ( ) ; this . fopFactory . setURIResolver ( this . uriResolver ) ...
public class UpdateConfigurationTemplateResult { /** * A list of the configuration options and their values in this configuration set . * @ return A list of the configuration options and their values in this configuration set . */ public java . util . List < ConfigurationOptionSetting > getOptionSettings ( ) { } }
if ( optionSettings == null ) { optionSettings = new com . amazonaws . internal . SdkInternalList < ConfigurationOptionSetting > ( ) ; } return optionSettings ;
public class GenericMethod { /** * Generates a request entity from the post parameters , if present . Calls * { @ link EntityEnclosingMethod # generateRequestBody ( ) } if parameters have not been set . * @ since 3.0 */ @ Override protected RequestEntity generateRequestEntity ( ) { } }
if ( ! this . params . isEmpty ( ) ) { // Use a ByteArrayRequestEntity instead of a StringRequestEntity . // This is to avoid potential encoding issues . Form url encoded strings // are ASCII by definition but the content type may not be . Treating the content // as bytes allows us to keep the current charset without w...
public class TedDriver { /** * register task ( configuration ) with own retryScheduler */ public void registerTaskConfig ( String taskName , TedProcessorFactory tedProcessorFactory , TedRetryScheduler retryScheduler ) { } }
tedDriverImpl . registerTaskConfig ( taskName , tedProcessorFactory , null , retryScheduler , null ) ;
public class BaseMonetaryCurrenciesSingletonSpi { /** * Allows to check if a { @ link javax . money . CurrencyUnit } instance is defined , i . e . * accessible from { @ link BaseMonetaryCurrenciesSingletonSpi # getCurrency ( String , String . . . ) } . * @ param code the currency code , not { @ code null } . * @ ...
return ! getCurrencies ( CurrencyQueryBuilder . of ( ) . setCurrencyCodes ( code ) . setProviderNames ( providers ) . build ( ) ) . isEmpty ( ) ;
public class DefaultProviderSelector { /** * Find any provider loaders which are available in the container . */ private Map findLoaders ( ) { } }
Map loaders = getContainer ( ) . getComponentDescriptorMap ( ProviderLoader . class . getName ( ) ) ; if ( loaders == null ) { throw new Error ( "No provider loaders found" ) ; } Set keys = loaders . keySet ( ) ; Map found = null ; ProviderLoader defaultLoader = null ; for ( Iterator iter = keys . iterator ( ) ; iter ....
public class AsciiString { /** * Concatenates this string and the specified string . * @ param string the string to concatenate * @ return a new string which is the concatenation of this string and the specified string . */ public AsciiString concat ( CharSequence string ) { } }
int thisLen = length ( ) ; int thatLen = string . length ( ) ; if ( thatLen == 0 ) { return this ; } if ( string . getClass ( ) == AsciiString . class ) { AsciiString that = ( AsciiString ) string ; if ( isEmpty ( ) ) { return that ; } byte [ ] newValue = PlatformDependent . allocateUninitializedArray ( thisLen + thatL...
public class MoskitoAction { /** * This method allows you to perform some tasks prior to call to the moskitoExecute . * @ param mapping * @ param af * @ param req * @ param res * @ throws Exception */ protected void preProcessExecute ( ActionMapping mapping , ActionForm af , HttpServletRequest req , HttpServl...
public class LoggingSubsystemParser { /** * Parses a property element . * The { @ code name } attribute is required . If the { @ code value } attribute is not present an * { @ linkplain org . jboss . dmr . ModelNode UNDEFINED ModelNode } will set on the operation . * @ param operation the operation to add the par...
while ( reader . nextTag ( ) != END_ELEMENT ) { final int cnt = reader . getAttributeCount ( ) ; String name = null ; String value = null ; for ( int i = 0 ; i < cnt ; i ++ ) { requireNoNamespaceAttribute ( reader , i ) ; final String attrValue = reader . getAttributeValue ( i ) ; final Attribute attribute = Attribute ...
public class ContainerAS { /** * This method is called after the ActivitySession associated with * this < code > ContainerAS < / code > has completed . */ public void afterCompletion ( int status ) { } }
final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) // d144064 Tr . entry ( tc , "afterCompletion (" + status + ") : " + this ) ; try { // inform the activator that the session has ended // so the beans can be passivated if necessary BeanO [ ] beanOs = getBea...
public class DBaseFileField { /** * Update the sizes with the given ones if and only if * they are greater than the existing ones . * This test is done according to the type of the field . * @ param fieldLength is the size of this field * @ param decimalPointPosition is the position of the decimal point . */ @ ...
switch ( this . type ) { case STRING : if ( fieldLength > this . length ) { this . length = fieldLength ; } break ; case FLOATING_NUMBER : case NUMBER : if ( decimalPointPosition > this . decimal ) { final int intPart = this . length - this . decimal ; this . decimal = decimalPointPosition ; this . length = intPart + t...