signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class GPXPoint { /** * Set ID of DGPS station used in differential correction for a point . * @ param contentBuffer Contains the information to put in the table */ public final void setDgpsid ( StringBuilder contentBuffer ) { } }
ptValues [ GpxMetadata . PTDGPSID ] = Integer . parseInt ( contentBuffer . toString ( ) ) ;
public class NioGroovyMethods { /** * Write the bytes from the byte array to the Path . * @ param self the file to write to * @ param bytes the byte [ ] to write to the file * @ throws java . io . IOException if an IOException occurs . * @ since 2.3.0 */ public static void setBytes ( Path self , byte [ ] bytes ) throws IOException { } }
IOGroovyMethods . setBytes ( Files . newOutputStream ( self ) , bytes ) ;
public class AWSIotClient { /** * Deletes the rule . * @ param deleteTopicRuleRequest * The input for the DeleteTopicRule operation . * @ return Result of the DeleteTopicRule operation returned by the service . * @ throws InternalException * An unexpected error has occurred . * @ throws InvalidRequestException * The request is not valid . * @ throws ServiceUnavailableException * The service is temporarily unavailable . * @ throws UnauthorizedException * You are not authorized to perform this operation . * @ throws ConflictingResourceUpdateException * A conflicting resource update exception . This exception is thrown when two pending updates cause a * conflict . * @ sample AWSIot . DeleteTopicRule */ @ Override public DeleteTopicRuleResult deleteTopicRule ( DeleteTopicRuleRequest request ) { } }
request = beforeClientExecution ( request ) ; return executeDeleteTopicRule ( request ) ;
public class CertificateIssuerName { /** * Get the attribute value . */ public Object get ( String name ) throws IOException { } }
if ( name . equalsIgnoreCase ( DN_NAME ) ) { return ( dnName ) ; } else if ( name . equalsIgnoreCase ( DN_PRINCIPAL ) ) { if ( ( dnPrincipal == null ) && ( dnName != null ) ) { dnPrincipal = dnName . asX500Principal ( ) ; } return dnPrincipal ; } else { throw new IOException ( "Attribute name not recognized by " + "CertAttrSet:CertificateIssuerName." ) ; }
public class BioCDocumentWriter { /** * Closes the writer , flushing it first . Once the writer has been closed , * further writeCollection ( ) invocations will cause an IOException to be * thrown . Closing a previously closed writer has no effect . */ @ Override public final void close ( ) throws IOException { } }
try { // end collection writer . writeEndCollection ( ) . writeEndDocument ( ) . close ( ) ; } catch ( XMLStreamException e ) { throw new IOException ( e . getMessage ( ) ) ; }
public class MemberLookupCompleter { /** * This method tries to find the class which is defined for the given filter and returns a set with all methods and fields of the class * @ param variableName * @ param text * @ param document * @ return Set of methods and fields , never null */ private Set < String > resolveClass ( String variableName , String text , Document document ) { } }
Set < String > items = new LinkedHashSet < > ( ) ; FileObject fo = getFileObject ( document ) ; ClassPath sourcePath = ClassPath . getClassPath ( fo , ClassPath . SOURCE ) ; ClassPath compilePath = ClassPath . getClassPath ( fo , ClassPath . COMPILE ) ; ClassPath bootPath = ClassPath . getClassPath ( fo , ClassPath . BOOT ) ; if ( sourcePath == null ) { return items ; } ClassPath cp = ClassPathSupport . createProxyClassPath ( sourcePath , compilePath , bootPath ) ; MemberLookupResolver resolver = new MemberLookupResolver ( text , cp ) ; Set < MemberLookupResult > results = resolver . performMemberLookup ( StringUtils . defaultString ( StringUtils . substringBeforeLast ( variableName , "." ) , variableName ) ) ; for ( MemberLookupResult result : results ) { Matcher m = GETTER_PATTERN . matcher ( result . getMethodName ( ) ) ; if ( m . matches ( ) && m . groupCount ( ) >= 2 ) { items . add ( result . getVariableName ( ) + "." + WordUtils . uncapitalize ( m . group ( 2 ) ) ) ; } else { items . add ( result . getVariableName ( ) + "." + WordUtils . uncapitalize ( result . getMethodName ( ) ) ) ; } } return items ;
public class URLNormalizer { /** * < p > Converts < code > http < / code > scheme to < code > https < / code > . < / p > * < code > http : / / www . example . com / & rarr ; https : / / www . example . com / < / code > * @ return this instance */ public URLNormalizer secureScheme ( ) { } }
Matcher m = PATTERN_SCHEMA . matcher ( url ) ; if ( m . find ( ) ) { String schema = m . group ( 1 ) ; if ( "http" . equalsIgnoreCase ( schema ) ) { url = m . replaceFirst ( schema + "s$2" ) ; } } return this ;
public class ListEnabledProductsForImportResult { /** * A list of ARNs for the resources that represent your subscriptions to products . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setProductSubscriptions ( java . util . Collection ) } or { @ link # withProductSubscriptions ( java . util . Collection ) } * if you want to override the existing values . * @ param productSubscriptions * A list of ARNs for the resources that represent your subscriptions to products . * @ return Returns a reference to this object so that method calls can be chained together . */ public ListEnabledProductsForImportResult withProductSubscriptions ( String ... productSubscriptions ) { } }
if ( this . productSubscriptions == null ) { setProductSubscriptions ( new java . util . ArrayList < String > ( productSubscriptions . length ) ) ; } for ( String ele : productSubscriptions ) { this . productSubscriptions . add ( ele ) ; } return this ;
public class ApiOvhEmailpro { /** * Get this object properties * REST : GET / email / pro / { service } / domain / { domainName } * @ param service [ required ] The internal name of your pro organization * @ param domainName [ required ] Domain name * API beta */ public OvhDomain service_domain_domainName_GET ( String service , String domainName ) throws IOException { } }
String qPath = "/email/pro/{service}/domain/{domainName}" ; StringBuilder sb = path ( qPath , service , domainName ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhDomain . class ) ;
public class ImageRetinaApiImpl { /** * { @ inheritDoc } */ @ Override public ByteArrayInputStream compare ( Model model1 , Model model2 ) throws JsonProcessingException , ApiException { } }
return compare ( null , null , model1 , model2 ) ;
public class MvtValue { /** * Convert { @ link VectorTile . Tile . Value } to String or boxed primitive object . * @ param value target for conversion * @ return String or boxed primitive */ public static Object toObject ( VectorTile . Tile . Value value ) { } }
Object result = null ; if ( value . hasDoubleValue ( ) ) { result = value . getDoubleValue ( ) ; } else if ( value . hasFloatValue ( ) ) { result = value . getFloatValue ( ) ; } else if ( value . hasIntValue ( ) ) { result = value . getIntValue ( ) ; } else if ( value . hasBoolValue ( ) ) { result = value . getBoolValue ( ) ; } else if ( value . hasStringValue ( ) ) { result = value . getStringValue ( ) ; } else if ( value . hasSintValue ( ) ) { result = value . getSintValue ( ) ; } else if ( value . hasUintValue ( ) ) { result = value . getUintValue ( ) ; } return result ;
public class InternalService { /** * Returns observable to add a list of participants to a conversation . * @ param conversationId ID of a conversation to update . * @ param participants New conversation participants details . * @ param callback Callback to deliver new session instance . */ public void addParticipants ( @ NonNull final String conversationId , @ NonNull final List < Participant > participants , @ Nullable Callback < ComapiResult < Void > > callback ) { } }
adapter . adapt ( addParticipants ( conversationId , participants ) , callback ) ;
public class ProductHandler { /** * Patches the product module names * @ param name String * @ param moduleNames List < String > */ public void setProductModules ( final String name , final List < String > moduleNames ) { } }
final DbProduct dbProduct = getProduct ( name ) ; dbProduct . setModules ( moduleNames ) ; repositoryHandler . store ( dbProduct ) ;
public class ExecutionGroupVertex { /** * Checks if this group vertex is wired to the given group vertex . * @ param groupVertex * the group vertex to check for * @ return < code > true < / code > if there is a wire from the current group vertex to the specified group vertex , * otherwise < code > false < / code > */ boolean isWiredTo ( final ExecutionGroupVertex groupVertex ) { } }
final Iterator < ExecutionGroupEdge > it = this . forwardLinks . iterator ( ) ; while ( it . hasNext ( ) ) { final ExecutionGroupEdge edge = it . next ( ) ; if ( edge . getTargetVertex ( ) == groupVertex ) { return true ; } } return false ;
public class Vector2f { /** * / * ( non - Javadoc ) * @ see org . joml . Vector2fc # negate ( org . joml . Vector2f ) */ public Vector2f negate ( Vector2f dest ) { } }
dest . x = - x ; dest . y = - y ; return dest ;
public class JAXBAnnotationsHelper { /** * Puts name space and name for XML node or attribute . * @ param ns name space * @ param name name * @ param property property instance to be updated * @ return < code > true < / code > if name space and name have been set */ private static boolean setName ( String ns , String name , Schema property ) { } }
boolean apply = false ; final String cleanName = StringUtils . trimToNull ( name ) ; final String useName ; if ( ! isEmpty ( cleanName ) && ! cleanName . equals ( ( ( SchemaImpl ) property ) . getName ( ) ) ) { useName = cleanName ; apply = true ; } else { useName = null ; } final String cleanNS = StringUtils . trimToNull ( ns ) ; final String useNS ; if ( ! isEmpty ( cleanNS ) ) { useNS = cleanNS ; apply = true ; } else { useNS = null ; } // Set everything or nothing if ( apply ) { getXml ( property ) . name ( useName ) . namespace ( useNS ) ; } return apply ;
public class StylesContainer { /** * Write the data styles in the automatic - styles . They belong to content . xml / automatic - styles * @ param util an XML util * @ param appendable the destination * @ throws IOException if the styles can ' t be written */ public void writeHiddenDataStyles ( final XMLUtil util , final Appendable appendable ) throws IOException { } }
for ( final DataStyle dataStyle : this . dataStylesContainer . getValues ( Dest . CONTENT_AUTOMATIC_STYLES ) ) { dataStyle . appendXMLContent ( util , appendable ) ; }
public class DefaultParser { /** * Handles the following tokens : * @ param token the command line token to handle */ private void handleLongOptionWithoutEqual ( String token ) throws ParseException { } }
List < String > matchingOpts = options . getMatchingOptions ( token ) ; if ( matchingOpts . isEmpty ( ) ) { handleUnknownToken ( currentToken ) ; } else if ( matchingOpts . size ( ) > 1 ) { throw new AmbiguousOptionException ( token , matchingOpts ) ; } else { handleOption ( options . getOption ( matchingOpts . get ( 0 ) ) ) ; }
public class LNGHeap { /** * Clears the heap . */ public void clear ( ) { } }
for ( int i = 0 ; i < this . heap . size ( ) ; i ++ ) this . indices . set ( this . heap . get ( i ) , - 1 ) ; this . heap . clear ( ) ;
public class BaseDataJsonFieldBo { /** * Set the whole " data " field . * @ param data * @ return * @ since 0.10.0 */ public BaseDataJsonFieldBo setData ( Object data ) { } }
return setData ( data != null ? SerializationUtils . toJson ( data ) : null ) ;
public class CompilationUnitParser { /** * Parses and process the java source code as a compilation unit and the result it abstract syntax tree ( AST ) representation * and this action uses the third edition of java Language Specification , that gets the possibility to support J2SE 5 during * the parsing . * @ param source - the java source to be parsed ( i . e . the char [ ] contains Java source ) . * @ param resolveBindings - for resolving bindings to get more informations from the unit . * @ return Abstract syntax tree representation . */ public static ASTNode runJLS3Conversion ( char [ ] source , boolean resolveBindings ) { } }
// needed to be parse 1.5 code Map < ? , ? > options = createCompilerParameters ( ) ; // Create parser ASTParser parser = ASTParser . newParser ( AST . JLS3 ) ; parser . setSource ( source ) ; parser . setKind ( ASTParser . K_COMPILATION_UNIT ) ; parser . setResolveBindings ( resolveBindings ) ; parser . setCompilerOptions ( options ) ; // Parse compilation unit return parser . createAST ( null ) ;
public class ChannelOutboundBuffer { /** * Removes the fully written entries and update the reader index of the partially written entry . * This operation assumes all messages in this buffer is { @ link ByteBuf } . */ public void removeBytes ( long writtenBytes ) { } }
for ( ; ; ) { Object msg = current ( ) ; if ( ! ( msg instanceof ByteBuf ) ) { assert writtenBytes == 0 ; break ; } final ByteBuf buf = ( ByteBuf ) msg ; final int readerIndex = buf . readerIndex ( ) ; final int readableBytes = buf . writerIndex ( ) - readerIndex ; if ( readableBytes <= writtenBytes ) { if ( writtenBytes != 0 ) { progress ( readableBytes ) ; writtenBytes -= readableBytes ; } remove ( ) ; } else { // readableBytes > writtenBytes if ( writtenBytes != 0 ) { buf . readerIndex ( readerIndex + ( int ) writtenBytes ) ; progress ( writtenBytes ) ; } break ; } } clearNioBuffers ( ) ;
public class TreeInsertProcess { /** * Modifies a cluster tree as a result of adding a new elements in the * tree . * @ param tree Tree where the element is inserted . * @ param elements Elements to be inserted in the tree * @ return Results of inserting the elements * @ throws Exception */ static public Result insertElements ( Tree tree , List < TreeElement > elements , NowReference now ) throws Exception { } }
ResultImpl result = new ResultImpl ( tree ) ; TreeNodeRegular regularRootNode = tree . getRegularRootNode ( ) ; TreeNodeOngoing ongoingRootNode = tree . getOngoingRootNode ( ) ; for ( TreeElement element : elements ) { TimeInterval elementInterval = element . getInterval ( ) ; if ( elementInterval . isOngoing ( ) ) { ongoingRootNode . insertElement ( element , result , tree . getOperations ( ) , now ) ; } else { regularRootNode . insertElement ( element , result , tree . getOperations ( ) , now ) ; } } return result ;
public class Main { /** * Validates that param { @ code value } does not begin with the character { @ code - } . For use in cases where * the legal value for an argument would not begin with that character . Usage is to detect missing argument * values , where the command line includes another argument instead of the value for the last argument . * @ param argument the last argument , whose value should be { @ code value } * @ param value the next item in the command line arguments , which should be the value for { @ code argument } * @ return { @ code value } if it is valid , or { @ code null } if it is not */ private static String checkValueIsNotAnArg ( String argument , String value ) { } }
if ( value . startsWith ( "-" ) ) { STDERR . println ( HostControllerLogger . ROOT_LOGGER . argumentHasNoValue ( argument , usageNote ( ) ) ) ; return null ; } return value ;
public class MapTransitionExtractor { /** * Get the tile transition between two groups . * @ param neighborGroups The neighbor groups ( must contain two groups ) . * @ return The tile transition . */ private static Transition getTransitionTwoGroups ( Collection < String > neighborGroups ) { } }
final Iterator < String > iterator = new HashSet < > ( neighborGroups ) . iterator ( ) ; final String groupIn = iterator . next ( ) ; final String groupOut = iterator . next ( ) ; final TransitionType type = getTransitionType ( groupIn , neighborGroups ) ; return new Transition ( type , groupIn , groupOut ) ;
public class DetachElasticLoadBalancerRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DetachElasticLoadBalancerRequest detachElasticLoadBalancerRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( detachElasticLoadBalancerRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( detachElasticLoadBalancerRequest . getElasticLoadBalancerName ( ) , ELASTICLOADBALANCERNAME_BINDING ) ; protocolMarshaller . marshall ( detachElasticLoadBalancerRequest . getLayerId ( ) , LAYERID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class DescribeDimensionKeysRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DescribeDimensionKeysRequest describeDimensionKeysRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( describeDimensionKeysRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeDimensionKeysRequest . getServiceType ( ) , SERVICETYPE_BINDING ) ; protocolMarshaller . marshall ( describeDimensionKeysRequest . getIdentifier ( ) , IDENTIFIER_BINDING ) ; protocolMarshaller . marshall ( describeDimensionKeysRequest . getStartTime ( ) , STARTTIME_BINDING ) ; protocolMarshaller . marshall ( describeDimensionKeysRequest . getEndTime ( ) , ENDTIME_BINDING ) ; protocolMarshaller . marshall ( describeDimensionKeysRequest . getMetric ( ) , METRIC_BINDING ) ; protocolMarshaller . marshall ( describeDimensionKeysRequest . getPeriodInSeconds ( ) , PERIODINSECONDS_BINDING ) ; protocolMarshaller . marshall ( describeDimensionKeysRequest . getGroupBy ( ) , GROUPBY_BINDING ) ; protocolMarshaller . marshall ( describeDimensionKeysRequest . getPartitionBy ( ) , PARTITIONBY_BINDING ) ; protocolMarshaller . marshall ( describeDimensionKeysRequest . getFilter ( ) , FILTER_BINDING ) ; protocolMarshaller . marshall ( describeDimensionKeysRequest . getMaxResults ( ) , MAXRESULTS_BINDING ) ; protocolMarshaller . marshall ( describeDimensionKeysRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class BlockGimpyRenderer { /** * { @ inheritDoc } */ @ Override public void gimp ( BufferedImage image ) { } }
BlockFilter filter = new BlockFilter ( ) ; filter . setBlockSize ( _blockSize ) ; filter . filter ( image , image ) ;
public class NoteDocumentRepositoryMongoImpl { /** * { @ inheritDoc } */ @ Override public final Iterable < NoteDocument > findAll ( final RootDocument rootDocument ) { } }
final Iterable < NoteDocument > noteDocuments = findAll ( rootDocument . getFilename ( ) ) ; if ( noteDocuments == null ) { return null ; } for ( final NoteDocument noteDocument : noteDocuments ) { final Note note = noteDocument . getGedObject ( ) ; note . setParent ( rootDocument . getGedObject ( ) ) ; } return noteDocuments ;
public class PathMatchers { /** * Perhaps so , assuming Path always canonicalizes its separators */ public static PathMatcher getPathMatcher ( String syntaxAndPattern , String separators , ImmutableSet < PathNormalization > normalizations ) { } }
int syntaxSeparator = syntaxAndPattern . indexOf ( ':' ) ; checkArgument ( syntaxSeparator > 0 , "Must be of the form 'syntax:pattern': %s" , syntaxAndPattern ) ; String syntax = Ascii . toLowerCase ( syntaxAndPattern . substring ( 0 , syntaxSeparator ) ) ; String pattern = syntaxAndPattern . substring ( syntaxSeparator + 1 ) ; switch ( syntax ) { case "glob" : pattern = GlobToRegex . toRegex ( pattern , separators ) ; // fall through case "regex" : return fromRegex ( pattern , normalizations ) ; default : throw new UnsupportedOperationException ( "Invalid syntax: " + syntaxAndPattern ) ; }
public class DateUtils { /** * 生成圆整至小时的当前时间 例如 : 若给定时间为 ( 2004-08-01 11:30:58 ) , 将获得 ( 2004-08-01 11:00:00 ) 的日期对象 * @ param dt Date java . util . Date对象 * @ return Date java . util . Date对象 */ public static Date getRoundedHourDate ( Date dt ) { } }
Calendar cal = new GregorianCalendar ( ) ; cal . setTime ( dt ) ; cal . clear ( Calendar . MINUTE ) ; cal . clear ( Calendar . SECOND ) ; cal . clear ( Calendar . MILLISECOND ) ; return cal . getTime ( ) ;
public class BasicQueryOutputProcessor { /** * { @ inheritDoc } */ public < T > List < T > toBeanList ( List < QueryParameters > paramsList , Class < T > type ) throws MjdbcException { } }
List < T > result = new ArrayList < T > ( ) ; T bean = null ; int [ ] columnToProperty = null ; PropertyDescriptor [ ] props = MappingUtils . propertyDescriptors ( type ) ; QueryParameters singleParam = null ; Iterator < QueryParameters > iterator = paramsList . iterator ( ) ; // skipping header if ( iterator . hasNext ( ) == true ) { iterator . next ( ) ; } while ( iterator . hasNext ( ) == true ) { singleParam = iterator . next ( ) ; columnToProperty = this . mapColumnsToProperties ( singleParam , props ) ; bean = this . createBean ( singleParam , type , props , columnToProperty ) ; result . add ( bean ) ; } return result ;
public class AWSAmplifyClient { /** * List domains with an app * @ param listDomainAssociationsRequest * Request structure for the list Domain Associations request . * @ return Result of the ListDomainAssociations operation returned by the service . * @ throws BadRequestException * Exception thrown when a request contains unexpected data . * @ throws UnauthorizedException * Exception thrown when an operation fails due to a lack of access . * @ throws InternalFailureException * Exception thrown when the service fails to perform an operation due to an internal issue . * @ sample AWSAmplify . ListDomainAssociations * @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / amplify - 2017-07-25 / ListDomainAssociations " target = " _ top " > AWS * API Documentation < / a > */ @ Override public ListDomainAssociationsResult listDomainAssociations ( ListDomainAssociationsRequest request ) { } }
request = beforeClientExecution ( request ) ; return executeListDomainAssociations ( request ) ;
public class Se3FromEssentialGenerator { /** * Computes the camera motion from the set of observations . The motion is from the first * into the second camera frame . * @ param dataSet Associated pairs in normalized camera coordinates . * @ param model The best pose according to the positive depth constraint . */ @ Override public boolean generate ( List < AssociatedPair > dataSet , Se3_F64 model ) { } }
if ( ! computeEssential . process ( dataSet , E ) ) return false ; // extract the possible motions decomposeE . decompose ( E ) ; selectBest . select ( decomposeE . getSolutions ( ) , dataSet , model ) ; return true ;
public class Bus { /** * Add void listener * @ param key - object class * @ param value - event listener * @ param < A > - event listener */ public < A > void listen ( Class < A > key , VoidEvent < A > value ) { } }
map . wire ( key , value ) ;
public class BaseDestinationHandler { /** * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . impl . interfaces . DestinationHandler # deleteDurableSubscription ( java . lang . String , com . ibm . ws . sib . msgstore . transactions . Transaction ) */ @ Override public void deleteDurableSubscription ( String subscriptionId , String durableHome ) throws SIDestinationLockedException , SIDurableSubscriptionNotFoundException , SIResourceException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "deleteDurableSubscription" , new Object [ ] { subscriptionId , durableHome } ) ; // ASSERT : subState . getDurableHome ( ) . equals ( messageProcessor . getMessagingEngineName ( ) _pubSubRealization . deleteLocalDurableSubscription ( subscriptionId ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "deleteDurableSubscription" ) ;
public class WebMBeanAdapter { /** * Get the Operation metadata for a single operation on an MBean by name . * @ param operationName the Operation name ( can be URL - encoded ) . * @ return the { @ link MBeanOperationInfo } for the operation . * @ throws OperationNotFoundException Method was not found * @ throws UnsupportedEncodingException if the encoding is not supported . */ public MBeanOperationInfo getOperationInfo ( String operationName ) throws OperationNotFoundException , UnsupportedEncodingException { } }
String decodedOperationName = sanitizer . urlDecode ( operationName , encoding ) ; Map < String , MBeanOperationInfo > operationMap = getOperationMetadata ( ) ; if ( operationMap . containsKey ( decodedOperationName ) ) { return operationMap . get ( decodedOperationName ) ; } throw new OperationNotFoundException ( "Could not find operation " + operationName + " on MBean " + objectName . getCanonicalName ( ) ) ;
public class ItemDeletion { /** * Deregister the supplied { @ link Item } for deletion . * @ param item the { @ link Item } that was to be deleted and is now either deleted or the delete was aborted . */ public static void deregister ( @ Nonnull Item item ) { } }
ItemDeletion instance = instance ( ) ; if ( instance != null ) { instance . lock . writeLock ( ) . lock ( ) ; try { instance . registrations . remove ( item ) ; } finally { instance . lock . writeLock ( ) . unlock ( ) ; } }
public class PyGenerator { /** * Generate the given object . * @ param interf the interface . * @ param context the context . */ protected void _generate ( SarlInterface interf , IExtraLanguageGeneratorContext context ) { } }
final JvmDeclaredType jvmType = getJvmModelAssociations ( ) . getInferredType ( interf ) ; final PyAppendable appendable = createAppendable ( jvmType , context ) ; if ( generateTypeDeclaration ( this . qualifiedNameProvider . getFullyQualifiedName ( interf ) . toString ( ) , interf . getName ( ) , true , interf . getExtends ( ) , getTypeBuilder ( ) . getDocumentation ( interf ) , true , interf . getMembers ( ) , appendable , context , null ) ) { final QualifiedName name = getQualifiedNameProvider ( ) . getFullyQualifiedName ( interf ) ; writeFile ( name , appendable , context ) ; }
public class BigtableTableAdminGrpcClient { /** * { @ inheritDoc } */ @ Override public ListenableFuture < Operation > snapshotTableAsync ( SnapshotTableRequest request ) { } }
return createUnaryListener ( request , snapshotTableRpc , request . getName ( ) ) . getAsyncResult ( ) ;
public class DoubleIntegerDBIDArrayList { /** * Add an entry , consisting of distance and internal index . * @ param dist Distance * @ param id Internal index */ protected void addInternal ( double dist , int id ) { } }
if ( size == dists . length ) { grow ( ) ; } dists [ size ] = dist ; ids [ size ] = id ; ++ size ;
public class DestinationManager { /** * This method supports the Core SPI implementation of addDestinationListener * which includes a destinationNamePattern parameter . It returns a list of * destination addresses that match the pattern , the destination availability * and the destination type . * It is assumed that the addresses returned will be an array of either queue , * port or service destinations and not topicspace destinations . */ private SIDestinationAddress [ ] getDestinationAddresses ( DestinationNamePattern destinationNamePattern , DestinationType destinationType , DestinationAvailability destinationAvailability ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getDestinationAddresses" , new Object [ ] { destinationNamePattern , destinationType , destinationAvailability } ) ; BaseDestinationHandler destinationHandler = null ; SIDestinationAddress [ ] destinationAddresses = null ; DestinationTypeFilter filter = new DestinationTypeFilter ( ) ; filter . LOCAL = Boolean . TRUE ; filter . FOREIGN_DESTINATION = Boolean . FALSE ; filter . ALIAS = Boolean . FALSE ; filter . QUEUE = Boolean . TRUE ; // Any destination type apart from topicspace is treated as a queue filter . VISIBLE = Boolean . TRUE ; SIMPIterator iterator = destinationIndex . iterator ( filter ) ; int i = 0 ; List < String > addresses = new Vector < String > ( ) ; while ( iterator . hasNext ( ) ) { destinationHandler = ( BaseDestinationHandler ) iterator . next ( ) ; if ( isAvailable ( destinationHandler , destinationAvailability ) && ( ! ( destinationHandler . isSystem ( ) ) ) ) { // Check that the destination is the type that we want if ( destinationHandler . getDestinationType ( ) == destinationType ) { String destinationName = destinationHandler . getName ( ) ; // Check whether the user has specified a pattern to match against . if ( destinationNamePattern == null || destinationNamePattern . match ( destinationName ) ) { // Add this destination to the Address list . addresses . add ( i , destinationName ) ; i ++ ; } } } } destinationAddresses = new SIDestinationAddress [ addresses . size ( ) ] ; for ( int cursor = 0 ; cursor < addresses . size ( ) ; cursor ++ ) { // Create the new SIDestinationAddress destinationAddresses [ cursor ] = ( ( SIDestinationAddressFactory ) MessageProcessor . getSingletonInstance ( SIMPConstants . SI_DESTINATION_ADDRESS_FACTORY ) ) . createSIDestinationAddress ( addresses . get ( cursor ) , true ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getDestinationAddresses" , new Object [ ] { destinationAddresses } ) ; return destinationAddresses ;
public class ChineseCalendar { /** * Return true if there is a leap month on or after month newMoon1 and * at or before month newMoon2. * @ param newMoon1 days after January 1 , 1970 0:00 astronomical base zone of a * new moon * @ param newMoon2 days after January 1 , 1970 0:00 astronomical base zone of a * new moon */ private boolean isLeapMonthBetween ( int newMoon1 , int newMoon2 ) { } }
// This is only needed to debug the timeOfAngle divergence bug . // Remove this later . Liu 11/9/00 // DEBUG if ( synodicMonthsBetween ( newMoon1 , newMoon2 ) >= 50 ) { throw new IllegalArgumentException ( "isLeapMonthBetween(" + newMoon1 + ", " + newMoon2 + "): Invalid parameters" ) ; } return ( newMoon2 >= newMoon1 ) && ( isLeapMonthBetween ( newMoon1 , newMoonNear ( newMoon2 - SYNODIC_GAP , false ) ) || hasNoMajorSolarTerm ( newMoon2 ) ) ;
public class WSKeyStore { /** * Set a new certificate into the keystore and save the updated store . * @ param alias * @ param cert * @ throws KeyStoreException * - if the store is read only or not found * @ throws KeyException * - if an error happens updating the store with the cert */ public void setCertificateEntry ( String alias , Certificate cert ) throws KeyStoreException , KeyException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( this , tc , "setCertificateEntry" , new Object [ ] { alias , cert } ) ; } if ( Boolean . parseBoolean ( getProperty ( Constants . SSLPROP_KEY_STORE_READ_ONLY ) ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "Unable to update readonly store" ) ; } throw new KeyStoreException ( "Unable to add to read-only store" ) ; } final KeyStoreManager mgr = KeyStoreManager . getInstance ( ) ; try { KeyStore jKeyStore = getKeyStore ( false , false ) ; if ( null == jKeyStore ) { final String keyStoreLocation = getProperty ( Constants . SSLPROP_KEY_STORE ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Cannot load the Java keystore at location \"" + keyStoreLocation + "\"" ) ; } throw new KeyStoreException ( "Cannot load the Java keystore at location \"" + keyStoreLocation + "\"" ) ; } // store the cert . . . errors are thrown if conflicts or errors occur jKeyStore . setCertificateEntry ( alias , cert ) ; try { store ( ) ; } catch ( IOException e ) { // Note : debug + ffdc in store ( ) itself // on z / OS we have an issue where the certificate may be stored but the // alias // already exists in RACF so the keystore API will through an // IOException // we need to catch this condition on z / OS and if the certs is in the // keystore // prior after adding the certificate then we know the cert was actually // added and its not // a true failure . If the cert was not added then we need to rethrow the // exception . final String ksType = getProperty ( Constants . SSLPROP_KEY_STORE_TYPE ) ; if ( ( ksType . equals ( Constants . KEYSTORE_TYPE_JCERACFKS ) || ksType . equals ( Constants . KEYSTORE_TYPE_JCECCARACFKS ) || ksType . equals ( Constants . KEYSTORE_TYPE_JCEHYBRIDRACFKS ) ) ) { KeyStore ks = getKeyStore ( true , false ) ; if ( mgr . checkIfSignerAlreadyExistsInTrustStore ( ( X509Certificate ) cert , ks ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Certificate already exists in RACF: " + e . getMessage ( ) ) ; } } else { throw new KeyException ( e . getMessage ( ) , e ) ; } } else { throw new KeyException ( e . getMessage ( ) , e ) ; } } } catch ( KeyStoreException kse ) { throw kse ; } catch ( KeyException ke ) { throw ke ; } catch ( Exception e ) { throw new KeyException ( e . getMessage ( ) , e ) ; } // after adding the certificate , clear the keystore and SSL caches so it // reloads it . AbstractJSSEProvider . clearSSLContextCache ( ) ; mgr . clearJavaKeyStoresFromKeyStoreMap ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( this , tc , "setCertificateEntry" ) ; }
public class AnnotatedElementNameUtil { /** * Returns the value of the { @ link Header } annotation which is specified on the { @ code element } if * the value is not blank . If the value is blank , it returns the name of the specified * { @ code nameRetrievalTarget } object which is an instance of { @ link Parameter } or { @ link Field } . * < p > Note that the name of the specified { @ code nameRetrievalTarget } will be converted as * { @ link CaseFormat # LOWER _ HYPHEN } that the string elements are separated with one hyphen ( { @ code - } ) * character . The value of the { @ link Header } annotation will not be converted because it is clearly * specified by a user . */ static String findName ( Header header , Object nameRetrievalTarget ) { } }
requireNonNull ( nameRetrievalTarget , "nameRetrievalTarget" ) ; final String value = header . value ( ) ; if ( DefaultValues . isSpecified ( value ) ) { checkArgument ( ! value . isEmpty ( ) , "value is empty" ) ; return value ; } return toHeaderName ( getName ( nameRetrievalTarget ) ) ;
public class AbstractConsoleEditor { /** * Moves cursor to the end of the current line . */ public void moveToStartOfLine ( ) { } }
String currentLine = getContent ( getLine ( ) ) ; LinkedList < String > toDisplayLines = toDisplayLines ( currentLine ) ; int remainingLines = toDisplayLines . size ( ) - getColumn ( ) / terminal . getWidth ( ) ; for ( int r = 0 ; r < remainingLines ; r ++ ) { toDisplayLines . removeLast ( ) ; } frameColumn = 1 ; delegate . moveToStartOfLine ( ) ; for ( int l = toDisplayLines . size ( ) - 1 ; l >= 0 ; l -- ) { frameLine -- ; if ( frameLine <= 0 ) { frameLine = 1 ; scrollDown ( 1 ) ; console . out ( ) . print ( ansi ( ) . cursor ( frameLine + getHeaderSize ( ) , 1 ) ) ; displayText ( toDisplayLines . get ( l ) ) ; console . out ( ) . print ( ansi ( ) . cursor ( frameLine + getHeaderSize ( ) , getColumn ( ) ) ) ; } } console . out ( ) . print ( ansi ( ) . cursor ( frameLine + getHeaderSize ( ) , frameColumn ) ) ;
public class MEC { /** * Clustering the data . * @ param data the dataset for clustering . * @ param y the initial clustering labels , which could be produced by any * other clustering methods . * @ param nns the data structure for neighborhood search . * @ param k the number of clusters . Note that this is just a hint . The final * number of clusters may be less . * @ param radius the radius for neighbor range search . */ private void learn ( T [ ] data , RNNSearch < T , T > nns , int k , double radius , int [ ] y ) { } }
if ( k < 2 ) { throw new IllegalArgumentException ( "Invalid k: " + k ) ; } if ( radius <= 0.0 ) { throw new IllegalArgumentException ( "Invalid radius: " + radius ) ; } this . k = k ; this . nns = nns ; this . radius = radius ; this . y = y ; this . size = new int [ k ] ; int n = data . length ; for ( int i = 0 ; i < n ; i ++ ) { size [ y [ i ] ] ++ ; } // Initialize the neighborhood list for each sample . double [ ] px = new double [ n ] ; // Neighbors of each sample . ArrayList < ArrayList < Integer > > neighbors = new ArrayList < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { ArrayList < Neighbor < T , T > > list = new ArrayList < > ( ) ; nns . range ( data [ i ] , radius , list ) ; ArrayList < Integer > neighbor = new ArrayList < > ( list . size ( ) ) ; neighbors . add ( neighbor ) ; for ( Neighbor < T , T > nt : list ) { neighbor . add ( nt . index ) ; } px [ i ] = ( double ) list . size ( ) / n ; } // Initialize a posterior probabilities . // The count of each cluster in the neighborhood . int [ ] [ ] neighborhoodClusterSize = new int [ n ] [ k ] ; // The most significant cluster in the neighborhood . int [ ] mostSignificantNeighborhoodCluster = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j : neighbors . get ( i ) ) { neighborhoodClusterSize [ i ] [ y [ j ] ] ++ ; } } for ( int i = 0 ; i < n ; i ++ ) { int max = 0 ; for ( int j = 0 ; j < k ; j ++ ) { if ( neighborhoodClusterSize [ i ] [ j ] > max ) { mostSignificantNeighborhoodCluster [ i ] = j ; max = neighborhoodClusterSize [ i ] [ j ] ; } } } // The number of samples with nonzero conditional entropy . entropy = 0.0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( ! neighbors . get ( i ) . isEmpty ( ) ) { int ni = neighbors . get ( i ) . size ( ) ; double m = 0.0 ; for ( int j = 0 ; j < k ; j ++ ) { double r = ( ( double ) neighborhoodClusterSize [ i ] [ j ] ) / ni ; if ( r > 0 ) { m -= r * Math . log2 ( r ) ; } } m *= px [ i ] ; entropy += m ; } } double eps = 1.0 ; while ( eps >= 1E-7 ) { for ( int i = 0 ; i < n ; i ++ ) { if ( mostSignificantNeighborhoodCluster [ i ] != y [ i ] ) { double oldMutual = 0.0 ; double newMutual = 0.0 ; for ( int neighbor : neighbors . get ( i ) ) { double nk = neighbors . get ( neighbor ) . size ( ) ; double r1 = ( double ) neighborhoodClusterSize [ neighbor ] [ y [ i ] ] / nk ; double r2 = ( double ) neighborhoodClusterSize [ neighbor ] [ mostSignificantNeighborhoodCluster [ i ] ] / nk ; if ( r1 > 0 ) { oldMutual -= r1 * Math . log2 ( r1 ) * px [ neighbor ] ; } if ( r2 > 0 ) { oldMutual -= r2 * Math . log2 ( r2 ) * px [ neighbor ] ; } r1 = ( neighborhoodClusterSize [ neighbor ] [ y [ i ] ] - 1.0 ) / nk ; r2 = ( neighborhoodClusterSize [ neighbor ] [ mostSignificantNeighborhoodCluster [ i ] ] + 1.0 ) / nk ; if ( r1 > 0 ) { newMutual -= r1 * Math . log2 ( r1 ) * px [ neighbor ] ; } if ( r2 > 0 ) { newMutual -= r2 * Math . log2 ( r2 ) * px [ neighbor ] ; } } if ( newMutual < oldMutual ) { for ( int neighbor : neighbors . get ( i ) ) { -- neighborhoodClusterSize [ neighbor ] [ y [ i ] ] ; ++ neighborhoodClusterSize [ neighbor ] [ mostSignificantNeighborhoodCluster [ i ] ] ; int mi = mostSignificantNeighborhoodCluster [ i ] ; int mk = mostSignificantNeighborhoodCluster [ neighbor ] ; if ( neighborhoodClusterSize [ neighbor ] [ mi ] > neighborhoodClusterSize [ neighbor ] [ mk ] ) { mostSignificantNeighborhoodCluster [ neighbor ] = mostSignificantNeighborhoodCluster [ i ] ; } } size [ y [ i ] ] -- ; size [ mostSignificantNeighborhoodCluster [ i ] ] ++ ; y [ i ] = mostSignificantNeighborhoodCluster [ i ] ; } } } double prevObj = entropy ; entropy = 0.0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( ! neighbors . get ( i ) . isEmpty ( ) ) { int ni = neighbors . get ( i ) . size ( ) ; double m = 0.0 ; for ( int j = 0 ; j < k ; j ++ ) { double r = ( ( double ) neighborhoodClusterSize [ i ] [ j ] ) / ni ; if ( r > 0 ) { m -= r * Math . log2 ( r ) ; } } m *= px [ i ] ; entropy += m ; } } eps = prevObj - entropy ; } // Collapse clusters by removing clusters with no samples . int nk = 0 ; for ( int i = 0 ; i < k ; i ++ ) { if ( size [ i ] > 0 ) { nk ++ ; } } int [ ] count = new int [ nk ] ; for ( int i = 0 , j = 0 ; i < k ; i ++ ) { if ( size [ i ] > 0 ) { count [ j ] = size [ i ] ; size [ i ] = j ++ ; } } for ( int i = 0 ; i < n ; i ++ ) { y [ i ] = size [ y [ i ] ] ; } this . k = nk ; size = count ;
public class CloseableIterators { /** * Divides a closeableiterator into unmodifiable sublists of the given size , padding * the final iterator with null values if necessary . For example , partitioning * a closeable iterator containing { @ code [ a , b , c , d , e ] } with a partition size of 3 * yields { @ code [ [ a , b , c ] , [ d , e , null ] ] } - - an outer iterator containing * two inner lists of three elements each , all in the original order . * < p > The returned lists implement { @ link java . util . RandomAccess } . */ public static < T > CloseableIterator < List < T > > paddedParition ( final CloseableIterator < T > iterator , final int size ) { } }
return wrap ( Iterators . paddedPartition ( iterator , size ) , iterator ) ;
public class ForwardingClient { /** * Get all the active remote forwarding tunnels * @ return * @ throws IOException */ public ActiveTunnel [ ] getRemoteForwardingTunnels ( ) throws IOException { } }
Vector < ActiveTunnel > v = new Vector < ActiveTunnel > ( ) ; String [ ] remoteForwardings = getRemoteForwardings ( ) ; for ( int i = 0 ; i < remoteForwardings . length ; i ++ ) { ActiveTunnel [ ] tmp = getRemoteForwardingTunnels ( remoteForwardings [ i ] ) ; for ( int x = 0 ; x < tmp . length ; x ++ ) { v . add ( tmp [ x ] ) ; } } return ( ActiveTunnel [ ] ) v . toArray ( new ActiveTunnel [ v . size ( ) ] ) ;
public class NativeInterface { public static void newObj ( Object created , String createdClass , String callerClass , String callerMethod , int callerValKind , Object caller ) { } }
System . err . println ( "newObj(" + "created=" + created + ", " + "createdClass=" + createdClass + ", " + "callerClass=" + callerClass + ", " + "callerMethod=" + callerMethod + ", " + "callerValKind=" + valKindToString ( callerValKind ) + ", " + "caller=" + caller + ", " + ")" ) ;
public class TypeSafeResolver { /** * Gets the matching beans for binding criteria from a list of beans * @ param resolvable the resolvable * @ return A set of filtered beans */ private Set < T > findMatching ( R resolvable ) { } }
Set < T > result = new HashSet < T > ( ) ; for ( T bean : getAllBeans ( resolvable ) ) { if ( matches ( resolvable , bean ) ) { result . add ( bean ) ; } } return result ;
public class FlexyPoolHibernateConnectionProvider { /** * Substitute the already configured { @ link DataSource } with the { @ link FlexyPoolDataSource } * @ param props JPA / Hibernate properties */ @ Override public void configure ( Map props ) { } }
super . configure ( props ) ; LOGGER . debug ( "Hibernate switched to using FlexyPoolDataSource" ) ; Properties overridingProperties = new Properties ( ) ; for ( Map . Entry < String , Object > propsEntry : ( ( Map < String , Object > ) props ) . entrySet ( ) ) { if ( propsEntry . getKey ( ) . startsWith ( FLEXY_POOL_PROPERTY_PREFIX ) && propsEntry . getValue ( ) instanceof String ) { overridingProperties . setProperty ( propsEntry . getKey ( ) , ( String ) propsEntry . getValue ( ) ) ; } } flexyPoolDataSource = new FlexyPoolDataSource < DataSource > ( getDataSource ( ) , overridingProperties ) ;
public class FieldColumnInfo { /** * Processes & # 64 ; Column annotated fields . */ private void processColumnAnnotation ( ) { } }
Column columnAnnotation = field . getAnnotation ( Column . class ) ; String columnName = columnAnnotation . name ( ) ; setColumnName ( columnName ) ; this . columnTableName = columnAnnotation . table ( ) ; insertable = columnAnnotation . insertable ( ) ; updatable = columnAnnotation . updatable ( ) ;
public class MarshallUtil { /** * A special marshall implementation for integer . * This method supports negative values but they are handles as { @ link # NULL _ VALUE } . It means that the real value is * lost and { @ link # NULL _ VALUE } is returned by { @ link # unmarshallSize ( ObjectInput ) } . * The integer is marshalled in a variable length from 1 to 5 bytes . Negatives values are always marshalled in 1 * byte . * @ param out { @ link ObjectOutput } to write . * @ param value Integer value to marshall . * @ throws IOException If any of the usual Input / Output related exceptions occur . */ public static void marshallSize ( ObjectOutput out , int value ) throws IOException { } }
if ( value < 0 ) { out . writeByte ( 0x80 ) ; // meaning it is a negative value ! return ; } if ( ( value & ~ 0x3F ) == 0 ) { // fits in 1 byte out . writeByte ( value & 0x3F ) ; // first bit is 0 ( = = positive ) and second bit is zero ( = = not more bytes ) return ; } out . writeByte ( ( value & 0x3F ) | 0x40 ) ; // set second bit to 1 ( = = more bytes ) value >>>= 6 ; // 6 bits written so far // normal code for unsigned int . only the first byte is special while ( ( value & ~ 0x7F ) != 0 ) { out . writeByte ( ( byte ) ( ( value & 0x7f ) | 0x80 ) ) ; value >>>= 7 ; } out . writeByte ( ( byte ) value ) ;
public class FacesConfigApplicationResourceLibraryContractsTypeImpl { /** * Returns all < code > contract - mapping < / code > elements * @ return list of < code > contract - mapping < / code > */ public List < FacesConfigApplicationResourceLibraryContractsContractMappingType < FacesConfigApplicationResourceLibraryContractsType < T > > > getAllContractMapping ( ) { } }
List < FacesConfigApplicationResourceLibraryContractsContractMappingType < FacesConfigApplicationResourceLibraryContractsType < T > > > list = new ArrayList < FacesConfigApplicationResourceLibraryContractsContractMappingType < FacesConfigApplicationResourceLibraryContractsType < T > > > ( ) ; List < Node > nodeList = childNode . get ( "contract-mapping" ) ; for ( Node node : nodeList ) { FacesConfigApplicationResourceLibraryContractsContractMappingType < FacesConfigApplicationResourceLibraryContractsType < T > > type = new FacesConfigApplicationResourceLibraryContractsContractMappingTypeImpl < FacesConfigApplicationResourceLibraryContractsType < T > > ( this , "contract-mapping" , childNode , node ) ; list . add ( type ) ; } return list ;
public class URI { /** * Set the fragment for this URI . A non - null value is valid only * if this is a URI conforming to the generic URI syntax and * the path value is not null . * @ param p _ fragment the fragment for this URI * @ throws MalformedURIException if p _ fragment is not null and this * URI does not conform to the generic * URI syntax or if the path is null */ public void setFragment ( String p_fragment ) throws MalformedURIException { } }
if ( p_fragment == null ) { m_fragment = null ; } else if ( ! isGenericURI ( ) ) { throw new MalformedURIException ( Utils . messages . createMessage ( MsgKey . ER_FRAG_FOR_GENERIC_URI , null ) ) ; // " Fragment can only be set for a generic URI ! " ) ; } else if ( getPath ( ) == null ) { throw new MalformedURIException ( Utils . messages . createMessage ( MsgKey . ER_FRAG_WHEN_PATH_NULL , null ) ) ; // " Fragment cannot be set when path is null ! " ) ; } else if ( ! isURIString ( p_fragment ) ) { throw new MalformedURIException ( Utils . messages . createMessage ( MsgKey . ER_FRAG_INVALID_CHAR , null ) ) ; // " Fragment contains invalid character ! " ) ; } else { m_fragment = p_fragment ; }
public class TransactionRequestProcessor { /** * Handles a commit request from a client */ void commitTransaction ( HotRodHeader header , Subject subject , XidImpl xid ) { } }
CommitTransactionOperation operation = new CommitTransactionOperation ( header , server , subject , xid , this :: writeTransactionResponse ) ; executor . execute ( operation ) ;
public class EndpointService { /** * Remove resources matching the given { @ code location } and all their direct and indirect descendant resources . * Note that this method may block if a discovery scan is currently in progress . The removal will occur when * the discovery scan finishes - only then will this method return . * @ param location a location that can contain wildcards */ public void removeResources ( L location ) { } }
status . assertRunning ( getClass ( ) , "removeResources()" ) ; try ( S session = openSession ( ) ) { // we must not alter the resource manager while a discovery scan is in progress WriteLock lock = EndpointService . this . discoveryScanRWLock . writeLock ( ) ; lock . lock ( ) ; try { List < Resource < L > > removed = getResourceManager ( ) . removeResources ( location , session . getLocationResolver ( ) ) ; inventoryListenerSupport . fireResourcesRemoved ( removed ) ; } finally { lock . unlock ( ) ; } } catch ( Exception e ) { LOG . errorCouldNotAccess ( this , e ) ; }
public class ExtensionScript { /** * Registers a new type of script . * The script is added to the tree of scripts and its templates loaded , if any . * @ param type the new type of script * @ throws InvalidParameterException if a script type with same name is already registered * @ see # removeScripType ( ScriptType ) */ public void registerScriptType ( ScriptType type ) { } }
if ( typeMap . containsKey ( type . getName ( ) ) ) { throw new InvalidParameterException ( "ScriptType already registered: " + type . getName ( ) ) ; } this . typeMap . put ( type . getName ( ) , type ) ; this . getTreeModel ( ) . addType ( type ) ; if ( shouldLoadTemplatesOnScriptTypeRegistration ) { loadScriptTemplates ( type ) ; } synchronized ( trackedDirs ) { for ( File dir : trackedDirs ) { addScriptsFromDir ( dir , type , null ) ; } }
public class EPGImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } }
switch ( featureID ) { case AfplibPackage . EPG__PAGE_NAME : return getPageName ( ) ; case AfplibPackage . EPG__TRIPLETS : return getTriplets ( ) ; } return super . eGet ( featureID , resolve , coreType ) ;
public class Docket { /** * Builds the Docket by merging / overlaying user specified values . * It is not necessary to call this method when defined as a spring bean . * NOTE : Calling this method more than once has no effect . * @ see DocumentationPluginsBootstrapper */ public DocumentationContext configure ( DocumentationContextBuilder builder ) { } }
return builder . apiInfo ( apiInfo ) . selector ( apiSelector ) . applyDefaultResponseMessages ( applyDefaultResponseMessages ) . additionalResponseMessages ( responseMessages ) . additionalOperationParameters ( globalOperationParameters ) . additionalIgnorableTypes ( ignorableParameterTypes ) . ruleBuilders ( ruleBuilders ) . groupName ( groupName ) . pathProvider ( pathProvider ) . securityContexts ( securityContexts ) . securitySchemes ( securitySchemes ) . apiListingReferenceOrdering ( apiListingReferenceOrdering ) . apiDescriptionOrdering ( apiDescriptionOrdering ) . operationOrdering ( operationOrdering ) . produces ( produces ) . consumes ( consumes ) . host ( host ) . protocols ( protocols ) . genericsNaming ( genericsNamingStrategy ) . pathMapping ( pathMapping ) . enableUrlTemplating ( enableUrlTemplating ) . additionalModels ( additionalModels ) . tags ( tags ) . vendorExtentions ( vendorExtensions ) . build ( ) ;
public class StringUtil { /** * < p > Utility method for { @ link # createNumber ( java . lang . String ) } . < / p > * < p > Returns mantissa of the given number . < / p > * @ param str the string representation of the number * @ param stopPos the position of the exponent or decimal point * @ return mantissa of the given number */ private static String getMantissa ( final String str , final int stopPos ) { } }
final char firstChar = str . charAt ( 0 ) ; final boolean hasSign = firstChar == '-' || firstChar == '+' ; return hasSign ? str . substring ( 1 , stopPos ) : str . substring ( 0 , stopPos ) ;
public class SnapshotUtil { /** * Write the . complete file for finished snapshot */ public static Runnable writeSnapshotCompletion ( String path , String nonce , int hostId , final VoltLogger logger , boolean isTruncationSnapshot ) throws IOException { } }
final File f = new VoltFile ( path , constructCompletionFilenameForNonce ( nonce , hostId ) ) ; if ( f . exists ( ) ) { if ( ! f . delete ( ) ) { if ( isTruncationSnapshot ) { VoltDB . crashLocalVoltDB ( "Unexpected exception while attempting to remove old Completion file for truncation snapshot" ) ; } throw new IOException ( "Failed to replace existing " + f . getName ( ) ) ; } } return new Runnable ( ) { @ Override public void run ( ) { try { f . createNewFile ( ) ; } catch ( IOException e ) { if ( isTruncationSnapshot ) { VoltDB . crashLocalVoltDB ( "Unexpected exception while attempting to create Completion file for truncation snapshot" , true , e ) ; } throw new RuntimeException ( "Failed to create .complete file for " + f . getName ( ) , e ) ; } } } ;
public class BingNewsImpl { /** * The News Search API lets you send a search query to Bing and get back a list of news that are relevant to the search query . This section provides technical details about the query parameters and headers that you use to request news and the JSON response objects that contain them . For examples that show how to make requests , see [ Searching the web for news ] ( https : / / docs . microsoft . com / en - us / azure / cognitive - services / bing - news - search / search - the - web ) . * @ param query The user ' s search query string . The query string cannot be empty . The query string may contain [ Bing Advanced Operators ] ( http : / / msdn . microsoft . com / library / ff795620 . aspx ) . For example , to limit news to a specific domain , use the [ site : ] ( http : / / msdn . microsoft . com / library / ff795613 . aspx ) operator . Use this parameter only with the News Search API . Do not specify this parameter when calling the Trending Topics API or News Category API . * @ param acceptLanguage A comma - delimited list of one or more languages to use for user interface strings . The list is in decreasing order of preference . For additional information , including expected format , see [ RFC2616 ] ( http : / / www . w3 . org / Protocols / rfc2616 / rfc2616 - sec14 . html ) . This header and the [ setLang ] ( https : / / docs . microsoft . com / en - us / rest / api / cognitiveservices / bing - news - api - v7 - reference # setlang ) query parameter are mutually exclusive ; do not specify both . If you set this header , you must also specify the [ cc ] ( https : / / docs . microsoft . com / en - us / rest / api / cognitiveservices / bing - news - api - v7 - reference # cc ) query parameter . To determine the market to return results for , Bing uses the first supported language it finds from the list and combines it with the cc parameter value . If the list does not include a supported language , Bing finds the closest language and market that supports the request or it uses an aggregated or default market for the results . To determine the market that Bing used , see the BingAPIs - Market header . Use this header and the cc query parameter only if you specify multiple languages . Otherwise , use the [ mkt ] ( https : / / docs . microsoft . com / en - us / rest / api / cognitiveservices / bing - news - api - v7 - reference # mkt ) and [ setLang ] ( https : / / docs . microsoft . com / en - us / rest / api / cognitiveservices / bing - news - api - v7 - reference # setlang ) query parameters . A user interface string is a string that ' s used as a label in a user interface . There are few user interface strings in the JSON response objects . Any links to Bing . com properties in the response objects apply the specified language . * @ param userAgent The user agent originating the request . Bing uses the user agent to provide mobile users with an optimized experience . Although optional , you are encouraged to always specify this header . The user - agent should be the same string that any commonly used browser sends . For information about user agents , see [ RFC 2616 ] ( http : / / www . w3 . org / Protocols / rfc2616 / rfc2616 - sec14 . html ) . The following are examples of user - agent strings . Windows Phone : Mozilla / 5.0 ( compatible ; MSIE 10.0 ; Windows Phone 8.0 ; Trident / 6.0 ; IEMobile / 10.0 ; ARM ; Touch ; NOKIA ; Lumia 822 ) . Android : Mozilla / 5.0 ( Linux ; U ; Android 2.3.5 ; en - us ; SCH - I500 Build / GINGERBREAD ) AppleWebKit / 533.1 ( KHTML ; like Gecko ) Version / 4.0 Mobile Safari / 533.1 . iPhone : Mozilla / 5.0 ( iPhone ; CPU iPhone OS 6_1 like Mac OS X ) AppleWebKit / 536.26 ( KHTML ; like Gecko ) Mobile / 10B142 iPhone4 ; 1 BingWeb / 3.03.1428.20120423 . PC : Mozilla / 5.0 ( Windows NT 6.3 ; WOW64 ; Trident / 7.0 ; Touch ; rv : 11.0 ) like Gecko . iPad : Mozilla / 5.0 ( iPad ; CPU OS 7_0 like Mac OS X ) AppleWebKit / 537.51.1 ( KHTML , like Gecko ) Version / 7.0 Mobile / 11A465 Safari / 9537.53 * @ param clientId Bing uses this header to provide users with consistent behavior across Bing API calls . Bing often flights new features and improvements , and it uses the client ID as a key for assigning traffic on different flights . If you do not use the same client ID for a user across multiple requests , then Bing may assign the user to multiple conflicting flights . Being assigned to multiple conflicting flights can lead to an inconsistent user experience . For example , if the second request has a different flight assignment than the first , the experience may be unexpected . Also , Bing can use the client ID to tailor web results to that client ID ’ s search history , providing a richer experience for the user . Bing also uses this header to help improve result rankings by analyzing the activity generated by a client ID . The relevance improvements help with better quality of results delivered by Bing APIs and in turn enables higher click - through rates for the API consumer . IMPORTANT : Although optional , you should consider this header required . Persisting the client ID across multiple requests for the same end user and device combination enables 1 ) the API consumer to receive a consistent user experience , and 2 ) higher click - through rates via better quality of results from the Bing APIs . Each user that uses your application on the device must have a unique , Bing generated client ID . If you do not include this header in the request , Bing generates an ID and returns it in the X - MSEdge - ClientID response header . The only time that you should NOT include this header in a request is the first time the user uses your app on that device . Use the client ID for each Bing API request that your app makes for this user on the device . Persist the client ID . To persist the ID in a browser app , use a persistent HTTP cookie to ensure the ID is used across all sessions . Do not use a session cookie . For other apps such as mobile apps , use the device ' s persistent storage to persist the ID . The next time the user uses your app on that device , get the client ID that you persisted . Bing responses may or may not include this header . If the response includes this header , capture the client ID and use it for all subsequent Bing requests for the user on that device . If you include the X - MSEdge - ClientID , you must not include cookies in the request . * @ param clientIp The IPv4 or IPv6 address of the client device . The IP address is used to discover the user ' s location . Bing uses the location information to determine safe search behavior . Although optional , you are encouraged to always specify this header and the X - Search - Location header . Do not obfuscate the address ( for example , by changing the last octet to 0 ) . Obfuscating the address results in the location not being anywhere near the device ' s actual location , which may result in Bing serving erroneous results . * @ param location A semicolon - delimited list of key / value pairs that describe the client ' s geographical location . Bing uses the location information to determine safe search behavior and to return relevant local content . Specify the key / value pair as & lt ; key & gt ; : & lt ; value & gt ; . The following are the keys that you use to specify the user ' s location . lat ( required ) : The latitude of the client ' s location , in degrees . The latitude must be greater than or equal to - 90.0 and less than or equal to + 90.0 . Negative values indicate southern latitudes and positive values indicate northern latitudes . long ( required ) : The longitude of the client ' s location , in degrees . The longitude must be greater than or equal to - 180.0 and less than or equal to + 180.0 . Negative values indicate western longitudes and positive values indicate eastern longitudes . re ( required ) : The radius , in meters , which specifies the horizontal accuracy of the coordinates . Pass the value returned by the device ' s location service . Typical values might be 22m for GPS / Wi - Fi , 380m for cell tower triangulation , and 18,000m for reverse IP lookup . ts ( optional ) : The UTC UNIX timestamp of when the client was at the location . ( The UNIX timestamp is the number of seconds since January 1 , 1970 . ) head ( optional ) : The client ' s relative heading or direction of travel . Specify the direction of travel as degrees from 0 through 360 , counting clockwise relative to true north . Specify this key only if the sp key is nonzero . sp ( optional ) : The horizontal velocity ( speed ) , in meters per second , that the client device is traveling . alt ( optional ) : The altitude of the client device , in meters . are ( optional ) : The radius , in meters , that specifies the vertical accuracy of the coordinates . Specify this key only if you specify the alt key . Although many of the keys are optional , the more information that you provide , the more accurate the location results are . Although optional , you are encouraged to always specify the user ' s geographical location . Providing the location is especially important if the client ' s IP address does not accurately reflect the user ' s physical location ( for example , if the client uses VPN ) . For optimal results , you should include this header and the X - MSEdge - ClientIP header , but at a minimum , you should include this header . * @ param countryCode A 2 - character country code of the country where the results come from . This API supports only the United States market . If you specify this query parameter , it must be set to us . If you set this parameter , you must also specify the Accept - Language header . Bing uses the first supported language it finds from the languages list , and combine that language with the country code that you specify to determine the market to return results for . If the languages list does not include a supported language , Bing finds the closest language and market that supports the request , or it may use an aggregated or default market for the results instead of a specified one . You should use this query parameter and the Accept - Language query parameter only if you specify multiple languages ; otherwise , you should use the mkt and setLang query parameters . This parameter and the mkt query parameter are mutually exclusive — do not specify both . * @ param count The number of news articles to return in the response . The actual number delivered may be less than requested . The default is 10 and the maximum value is 100 . The actual number delivered may be less than requested . You may use this parameter along with the offset parameter to page results . For example , if your user interface displays 20 articles per page , set count to 20 and offset to 0 to get the first page of results . For each subsequent page , increment offset by 20 ( for example , 0 , 20 , 40 ) . It is possible for multiple pages to include some overlap in results . * @ param freshness Filter news by the date and time that Bing discovered the news . The following are the possible filter values . Day : Return news discovered within the last 24 hours . Week : Return news discovered within the last 7 days . Month : Return news discovered within the last 30 days . Use this parameter only with the News Search API . Do not specify this parameter when calling the News Category API or the Trending Topics API . Possible values include : ' Day ' , ' Week ' , ' Month ' * @ param market The market where the results come from . Typically , mkt is the country where the user is making the request from . However , it could be a different country if the user is not located in a country where Bing delivers results . The market must be in the form & lt ; language code & gt ; - & lt ; country code & gt ; . For example , en - US . The string is case insensitive . For a list of possible market values , see [ Market Codes ] ( https : / / docs . microsoft . com / en - us / rest / api / cognitiveservices / bing - news - api - v7 - reference # market - codes ) . NOTE : If known , you are encouraged to always specify the market . Specifying the market helps Bing route the request and return an appropriate and optimal response . If you specify a market that is not listed in [ Market Codes ] ( https : / / docs . microsoft . com / en - us / rest / api / cognitiveservices / bing - news - api - v7 - reference # market - codes ) , Bing uses a best fit market code based on an internal mapping that is subject to change . This parameter and the [ cc ] ( https : / / docs . microsoft . com / en - us / rest / api / cognitiveservices / bing - news - api - v7 - reference # cc ) query parameter are mutually exclusive — do not specify both . * @ param offset The zero - based offset that indicates the number of news to skip before returning news . The default is 0 . The offset should be less than ( [ totalEstimatedMatches ] ( https : / / docs . microsoft . com / en - us / rest / api / cognitiveservices / bing - news - api - v7 - reference # news - totalmatches ) - count ) . Use this parameter along with the count parameter to page results . For example , if your user interface displays 20 news per page , set count to 20 and offset to 0 to get the first page of results . For each subsequent page , increment offset by 20 ( for example , 0 , 20 , 40 ) . It is possible for multiple pages to include some overlap in results . * @ param originalImage A Boolean value that determines whether the image ' s contentUrl contains a URL that points to a thumbnail of the original article ' s image or the image itself . If the article includes an image , and this parameter is set to true , the image ' s contentUrl property contains a URL that you may use to download the original image from the publisher ' s website . Otherwise , if this parameter is false , the image ' s contentUrl and thumbnailUrl URLs both point to the same thumbnail image . Use this parameter only with the News Search API . Do not specify this parameter when calling the Trending Topics API or News Category API . * @ param safeSearch Filter news for adult content . The following are the possible filter values . Off : Return news articles with adult text , images , or videos . Moderate : Return news articles with adult text but not adult images or videos . Strict : Do not return news articles with adult text , images , or videos . If the request comes from a market that Bing ' s adult policy requires that safeSearch is set to Strict , Bing ignores the safeSearch value and uses Strict . If you use the site : query operator , there is the chance that the response may contain adult content regardless of what the safeSearch query parameter is set to . Use site : only if you are aware of the content on the site and your scenario supports the possibility of adult content . Possible values include : ' Off ' , ' Moderate ' , ' Strict ' * @ param setLang The language to use for user interface strings . Specify the language using the ISO 639-1 2 - letter language code . For example , the language code for English is EN . The default is EN ( English ) . Although optional , you should always specify the language . Typically , you set setLang to the same language specified by mkt unless the user wants the user interface strings displayed in a different language . This parameter and the [ Accept - Language ] ( https : / / docs . microsoft . com / en - us / rest / api / cognitiveservices / bing - news - api - v7 - reference # acceptlanguage ) header are mutually exclusive ; do not specify both . A user interface string is a string that ' s used as a label in a user interface . There are few user interface strings in the JSON response objects . Also , any links to Bing . com properties in the response objects apply the specified language . * @ param sortBy The order to return the news in . The following are the possible case - insensitive values . Date : If the request is through the News Search API , the response returns news articles sorted by date from the most recent to the oldest . If the request is through the News Trending Topics API , the response returns trending topics sorted by date from the most recent to the oldest . * @ param textDecorations A Boolean value that determines whether display strings contain decoration markers such as hit highlighting characters . If true , the strings may include markers . The default is false . To specify whether to use Unicode characters or HTML tags as the markers , see the [ textFormat ] ( https : / / docs . microsoft . com / en - us / rest / api / cognitiveservices / bing - news - api - v7 - reference # textformat ) query parameter . For information about hit highlighting , see [ Hit Highlighting ] ( https : / / docs . microsoft . com / azure / cognitive - services / bing - news - search / hit - highlighting ) . * @ param textFormat The type of markers to use for text decorations ( see the textDecorations query parameter ) . Possible values are Raw — Use Unicode characters to mark content that needs special formatting . The Unicode characters are in the range E000 through E019 . For example , Bing uses E000 and E001 to mark the beginning and end of query terms for hit highlighting . HTML — Use HTML tags to mark content that needs special formatting . For example , use & lt ; b & gt ; tags to highlight query terms in display strings . The default is Raw . For display strings that contain escapable HTML characters such as & lt ; , & gt ; , and & amp ; , if textFormat is set to HTML , Bing escapes the characters as appropriate ( for example , & lt ; is escaped to & amp ; lt ; ) . Possible values include : ' Raw ' , ' Html ' * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the NewsModel object */ public Observable < ServiceResponse < NewsModel > > searchWithServiceResponseAsync ( String query , String acceptLanguage , String userAgent , String clientId , String clientIp , String location , String countryCode , Integer count , Freshness freshness , String market , Integer offset , Boolean originalImage , SafeSearch safeSearch , String setLang , String sortBy , Boolean textDecorations , TextFormat textFormat ) { } }
if ( query == null ) { throw new IllegalArgumentException ( "Parameter query is required and cannot be null." ) ; } final String xBingApisSDK = "true" ; return service . search ( xBingApisSDK , acceptLanguage , userAgent , clientId , clientIp , location , countryCode , count , freshness , market , offset , originalImage , query , safeSearch , setLang , sortBy , textDecorations , textFormat ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponse < NewsModel > > > ( ) { @ Override public Observable < ServiceResponse < NewsModel > > call ( Response < ResponseBody > response ) { try { ServiceResponse < NewsModel > clientResponse = searchDelegate ( response ) ; return Observable . just ( clientResponse ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ;
public class ApiBuilder { /** * Validate and convert the limit property * @ param limit * @ return */ public static String validateLimit ( int limit ) { } }
if ( limit < 1 ) { // 0 is a valid , null value return "" ; } if ( limit > LIMIT_MAX ) { return String . valueOf ( LIMIT_MAX ) ; } return String . valueOf ( limit ) ;
public class UtilLoggingEntityResolver { /** * { @ inheritDoc } */ public InputSource resolveEntity ( final String publicId , final String systemId ) { } }
if ( systemId . endsWith ( "logger.dtd" ) ) { return new InputSource ( new ByteArrayInputStream ( new byte [ 0 ] ) ) ; } else { return null ; }
public class MBeanUtil { /** * Overloaded method with ' replace ' parameter set to false . * See : * { @ link MBeanUtil # registerMBean ( Object , String , boolean ) } */ public String registerMBean ( Object bean , String name ) throws MalformedObjectNameException , NotCompliantMBeanException , MBeanRegistrationException { } }
return registerMBean ( bean , name , false ) ;
public class Constants { /** * non instantiable */ public static void main ( String [ ] args ) { } }
System . out . println ( "Hello World!" ) ; /* Executor exec = Executors . newCachedThreadPool ( ) ; for ( int i = 0 ; i < 20 ; i + + ) { final int v = i ; exec . execute ( new Runnable ( ) { @ Override public void run ( ) { System . out . println ( v ) ; */ LongStream . rangeClosed ( 0 , 5 ) . map ( n -> n * n ) . forEach ( s -> System . out . print ( s + " " ) ) ;
public class CommerceTierPriceEntryLocalServiceWrapper { /** * Deletes the commerce tier price entry from the database . Also notifies the appropriate model listeners . * @ param commerceTierPriceEntry the commerce tier price entry * @ return the commerce tier price entry that was removed * @ throws PortalException */ @ Override public com . liferay . commerce . price . list . model . CommerceTierPriceEntry deleteCommerceTierPriceEntry ( com . liferay . commerce . price . list . model . CommerceTierPriceEntry commerceTierPriceEntry ) throws com . liferay . portal . kernel . exception . PortalException { } }
return _commerceTierPriceEntryLocalService . deleteCommerceTierPriceEntry ( commerceTierPriceEntry ) ;
public class RestMapObject { /** * Remove mappings for given key */ public void removeKey ( String key ) { } }
if ( key != null && ! key . isEmpty ( ) ) { for ( int i = 0 ; i < map . size ( ) ; i ++ ) { KeyValue kv = map . get ( i ) ; if ( key . equals ( kv . getKey ( ) ) ) { map . remove ( i ) ; return ; } } }
public class Datamodel { /** * Creates an { @ link LexemeDocument } . * @ param lexemeIdValue * the id of the lexeme that data is about * @ param lexicalCategory * the lexical category to which the lexeme belongs * ( noun , verb . . . ) * @ param language * the language to which the lexeme belongs * ( French , British English . . . ) * @ param lemmas * the human readable representations of the lexeme * @ param statementGroups * the list of statement groups of this lexeme ; all of them must * have the given lexemeIdValue as their subject * @ param forms * the forms of the lexeme * @ param senses * the senses of the lexeme * @ return a { @ link LexemeDocument } corresponding to the input */ public static LexemeDocument makeLexemeDocument ( LexemeIdValue lexemeIdValue , ItemIdValue lexicalCategory , ItemIdValue language , List < MonolingualTextValue > lemmas , List < StatementGroup > statementGroups , List < FormDocument > forms , List < SenseDocument > senses ) { } }
return factory . getLexemeDocument ( lexemeIdValue , lexicalCategory , language , lemmas , statementGroups , forms , senses , 0 ) ;
public class DefaultCopyProviderConfiguration { /** * Adds a new { @ code Class } - { @ link Copier } pair to this configuration object * @ param clazz the { @ code Class } for which this copier is * @ param copierClass the { @ link Copier } type to use * @ param < T > the type of objects the copier will deal with * @ return this configuration instance * @ throws NullPointerException if any argument is null * @ throws IllegalArgumentException in a case a mapping for { @ code clazz } already exists */ public < T > DefaultCopyProviderConfiguration addCopierFor ( Class < T > clazz , Class < ? extends Copier < T > > copierClass ) { } }
return addCopierFor ( clazz , copierClass , false ) ;
public class StoringenEnWerkzaamhedenRequest { /** * { @ inheritDoc } * @ see nl . pvanassen . ns . ApiRequest # getRequestString ( ) */ @ Override String getRequestString ( ) { } }
StringBuilder requestString = new StringBuilder ( ) ; if ( station != null && station . trim ( ) . length ( ) != 0 ) { requestString . append ( "station=" ) . append ( station ) . append ( '&' ) ; } if ( actual != null ) { requestString . append ( "actual=" ) . append ( actual ) . append ( '&' ) ; } if ( unplanned != null ) { requestString . append ( "unplanned=" ) . append ( unplanned ) . append ( '&' ) ; } return requestString . toString ( ) ;
public class REEFScheduler { /** * Greedily acquire resources by launching a Mesos Task ( w / our custom MesosExecutor ) on REEF Evaluator request . * Either called from onResourceRequest ( for a new request ) or resourceOffers ( for an outstanding request ) . * TODO [ JIRA REEF - 102 ] : reflect priority and rack / node locality specified in resourceRequestEvent . */ private synchronized void doResourceRequest ( final ResourceRequestEvent resourceRequestEvent ) { } }
int tasksToLaunchCounter = resourceRequestEvent . getResourceCount ( ) ; for ( final Offer offer : this . offers . values ( ) ) { final int cpuSlots = getCpu ( offer ) / resourceRequestEvent . getVirtualCores ( ) . get ( ) ; final int memSlots = getMemory ( offer ) / resourceRequestEvent . getMemorySize ( ) . get ( ) ; final int taskNum = Math . min ( Math . min ( cpuSlots , memSlots ) , tasksToLaunchCounter ) ; if ( taskNum > 0 && satisfySlaveConstraint ( resourceRequestEvent , offer ) ) { final List < TaskInfo > tasksToLaunch = new ArrayList < > ( ) ; tasksToLaunchCounter -= taskNum ; // Launch as many MesosTasks on the same node ( offer ) as possible to exploit locality . for ( int j = 0 ; j < taskNum ; j ++ ) { final String id = offer . getId ( ) . getValue ( ) + "-" + String . valueOf ( j ) ; final String executorLaunchCommand = getExecutorLaunchCommand ( id , resourceRequestEvent . getMemorySize ( ) . get ( ) ) ; final ExecutorInfo executorInfo = ExecutorInfo . newBuilder ( ) . setExecutorId ( ExecutorID . newBuilder ( ) . setValue ( id ) . build ( ) ) . setCommand ( CommandInfo . newBuilder ( ) . setValue ( executorLaunchCommand ) . addUris ( URI . newBuilder ( ) . setValue ( reefTarUri ) . build ( ) ) . build ( ) ) . build ( ) ; final TaskInfo taskInfo = TaskInfo . newBuilder ( ) . setTaskId ( TaskID . newBuilder ( ) . setValue ( id ) . build ( ) ) . setName ( id ) . setSlaveId ( offer . getSlaveId ( ) ) . addResources ( Resource . newBuilder ( ) . setName ( "mem" ) . setType ( Type . SCALAR ) . setScalar ( Value . Scalar . newBuilder ( ) . setValue ( resourceRequestEvent . getMemorySize ( ) . get ( ) ) . build ( ) ) . build ( ) ) . addResources ( Resource . newBuilder ( ) . setName ( "cpus" ) . setType ( Type . SCALAR ) . setScalar ( Value . Scalar . newBuilder ( ) . setValue ( resourceRequestEvent . getVirtualCores ( ) . get ( ) ) . build ( ) ) . build ( ) ) . setExecutor ( executorInfo ) . build ( ) ; tasksToLaunch . add ( taskInfo ) ; this . executorIdToLaunchedRequests . put ( id , resourceRequestEvent ) ; } final Filters filters = Filters . newBuilder ( ) . setRefuseSeconds ( 0 ) . build ( ) ; mesosMaster . launchTasks ( Collections . singleton ( offer . getId ( ) ) , tasksToLaunch , filters ) ; } else { mesosMaster . declineOffer ( offer . getId ( ) ) ; } } // the offers are no longer valid ( all launched or declined ) this . offers . clear ( ) ; // Save leftovers that couldn ' t be launched outstandingRequests . add ( ResourceRequestEventImpl . newBuilder ( ) . mergeFrom ( resourceRequestEvent ) . setResourceCount ( tasksToLaunchCounter ) . build ( ) ) ;
public class SQLException { /** * Adds an < code > SQLException < / code > object to the end of the chain . * @ param ex the new exception that will be added to the end of * the < code > SQLException < / code > chain * @ see # getNextException */ public void setNextException ( SQLException ex ) { } }
SQLException current = this ; for ( ; ; ) { SQLException next = current . next ; if ( next != null ) { current = next ; continue ; } if ( nextUpdater . compareAndSet ( current , null , ex ) ) { return ; } current = current . next ; }
public class WhileyFileParser { /** * Parse a token representing a binary literal , such as " 0b0110 " , " 0b1111_0101 " , * etc . * @ param input * The token representing the byte value . * @ return */ private byte parseBinaryLiteral ( Token input ) { } }
String text = input . text ; if ( text . length ( ) > 11 ) { // FIXME : this will be deprecated ! syntaxError ( "invalid binary literal (too long)" , input ) ; } int val = 0 ; // Start past 0b for ( int i = 2 ; i != text . length ( ) ; ++ i ) { char c = text . charAt ( i ) ; // Skip underscore if ( c == '_' ) { continue ; } val = val << 1 ; if ( c == '1' ) { val = val | 1 ; } else if ( c == '0' ) { } else { syntaxError ( "invalid binary literal (invalid characters)" , input ) ; } } return ( byte ) val ;
public class AtomContactSet { /** * Returns the corresponding AtomContact or null if no contact exists between the 2 given atoms * @ param atom1 * @ param atom2 * @ return */ public AtomContact getContact ( Atom atom1 , Atom atom2 ) { } }
return contacts . get ( new Pair < AtomIdentifier > ( new AtomIdentifier ( atom1 . getPDBserial ( ) , atom1 . getGroup ( ) . getChainId ( ) ) , new AtomIdentifier ( atom2 . getPDBserial ( ) , atom2 . getGroup ( ) . getChainId ( ) ) ) ) ;
public class VirtualMachineScaleSetsInner { /** * Power off ( stop ) one or more virtual machines in a VM scale set . Note that resources are still attached and you are getting charged for the resources . Instead , use deallocate to release resources and avoid charges . * @ param resourceGroupName The name of the resource group . * @ param vmScaleSetName The name of the VM scale set . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable for the request */ public Observable < OperationStatusResponseInner > powerOffAsync ( String resourceGroupName , String vmScaleSetName ) { } }
return powerOffWithServiceResponseAsync ( resourceGroupName , vmScaleSetName ) . map ( new Func1 < ServiceResponse < OperationStatusResponseInner > , OperationStatusResponseInner > ( ) { @ Override public OperationStatusResponseInner call ( ServiceResponse < OperationStatusResponseInner > response ) { return response . body ( ) ; } } ) ;
public class JKTableModel { public JKTableRecord getRecord ( final int row ) { } }
if ( row >= getRowCount ( ) ) { throw new IllegalStateException ( "Row : " + row + " is out of index" ) ; } return this . records . get ( row ) ;
public class JarFile { /** * Reads all the bytes for a given entry . Used to process the * META - INF files . */ private byte [ ] getBytes ( ZipEntry ze ) throws IOException { } }
try ( InputStream is = super . getInputStream ( ze ) ) { return IOUtils . readFully ( is , ( int ) ze . getSize ( ) , true ) ; }
public class AmazonLexModelBuildingClient { /** * Deletes a specific version of a bot . To delete all versions of a bot , use the < a > DeleteBot < / a > operation . * This operation requires permissions for the < code > lex : DeleteBotVersion < / code > action . * @ param deleteBotVersionRequest * @ return Result of the DeleteBotVersion operation returned by the service . * @ throws NotFoundException * The resource specified in the request was not found . Check the resource and try again . * @ throws ConflictException * There was a conflict processing the request . Try your request again . * @ throws LimitExceededException * The request exceeded a limit . Try your request again . * @ throws InternalFailureException * An internal Amazon Lex error occurred . Try your request again . * @ throws BadRequestException * The request is not well formed . For example , a value is invalid or a required field is missing . Check the * field values , and try again . * @ throws ResourceInUseException * The resource that you are attempting to delete is referred to by another resource . Use this information * to remove references to the resource that you are trying to delete . < / p > * The body of the exception contains a JSON object that describes the resource . * < code > { " resourceType " : BOT | BOTALIAS | BOTCHANNEL | INTENT , < / code > * < code > " resourceReference " : { < / code > * < code > " name " : < i > string < / i > , " version " : < i > string < / i > } } < / code > * @ sample AmazonLexModelBuilding . DeleteBotVersion * @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / lex - models - 2017-04-19 / DeleteBotVersion " target = " _ top " > AWS * API Documentation < / a > */ @ Override public DeleteBotVersionResult deleteBotVersion ( DeleteBotVersionRequest request ) { } }
request = beforeClientExecution ( request ) ; return executeDeleteBotVersion ( request ) ;
public class ApiOvhDedicatedserver { /** * Get this object properties * REST : GET / dedicated / server / { serviceName } / option / { option } * @ param serviceName [ required ] The internal name of your dedicated server * @ param option [ required ] The option name */ public OvhOption serviceName_option_option_GET ( String serviceName , net . minidev . ovh . api . dedicated . server . OvhOptionEnum option ) throws IOException { } }
String qPath = "/dedicated/server/{serviceName}/option/{option}" ; StringBuilder sb = path ( qPath , serviceName , option ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhOption . class ) ;
public class LogManager { /** * Returns a formatter Logger using the fully qualified name of the Class as the Logger name . * This logger let you use a { @ link java . util . Formatter } string in the message to format parameters . * Short - hand for { @ code getLogger ( clazz , StringFormatterMessageFactory . INSTANCE ) } * @ param clazz The Class whose name should be used as the Logger name . * @ return The Logger , created with a { @ link StringFormatterMessageFactory } * @ throws UnsupportedOperationException if { @ code clazz } is { @ code null } and the calling class cannot be * determined . * @ see Logger # fatal ( Marker , String , Object . . . ) * @ see Logger # fatal ( String , Object . . . ) * @ see Logger # error ( Marker , String , Object . . . ) * @ see Logger # error ( String , Object . . . ) * @ see Logger # warn ( Marker , String , Object . . . ) * @ see Logger # warn ( String , Object . . . ) * @ see Logger # info ( Marker , String , Object . . . ) * @ see Logger # info ( String , Object . . . ) * @ see Logger # debug ( Marker , String , Object . . . ) * @ see Logger # debug ( String , Object . . . ) * @ see Logger # trace ( Marker , String , Object . . . ) * @ see Logger # trace ( String , Object . . . ) * @ see StringFormatterMessageFactory */ public static Logger getFormatterLogger ( final Class < ? > clazz ) { } }
return getLogger ( clazz != null ? clazz : StackLocatorUtil . getCallerClass ( 2 ) , StringFormatterMessageFactory . INSTANCE ) ;
public class ResteasyDispatcher { /** * Hack for Microsoft Azure App Service : receives https calls but tomcat reports http : / / as the RequestURL < br / > * This means that any redirects sent from within the JAX - RS environment are to http : / / pages which is undesirable < br / > * This hack works by recognising an http : / / RequestURL with an x - forwarded - proto set of HTTPS . < br / > * In addition if the request is not marked as Secure in this case it will mark it as secure by returning a new * HttpServletRequest instance to use * @ param request * implementation that also changes isSecure in this case ? We ' d need a way to guarantee that we were definitely behind the * Azure HTTP server and not just setting this */ private HttpServletRequest fixupRequest ( HttpServletRequest request ) { } }
if ( isAzureAppService ( request ) ) { final StringBuffer requestUrl = request . getRequestURL ( ) ; if ( requestUrl . indexOf ( "http://" ) == 0 ) { final String forwardedProto = request . getHeader ( "x-forwarded-proto" ) ; if ( StringUtils . equals ( "https" , forwardedProto ) ) { // Modify the RequestURL in - place to convert http : / / to https : / / // N . B . this modifies the underlying value so in the future request . getRequestURL will continue to return this value requestUrl . insert ( 4 , 's' ) ; assert ( requestUrl . indexOf ( "https://" ) == 0 ) ; return new AzureAppServiceHttpsServletRequest ( request ) ; } } return request ; } else { // Don ' t modify the request whatsoever return request ; }
public class IotHubResourcesInner { /** * Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container . For more information , see : https : / / docs . microsoft . com / azure / iot - hub / iot - hub - devguide - identity - registry # import - and - export - device - identities . * Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container . For more information , see : https : / / docs . microsoft . com / azure / iot - hub / iot - hub - devguide - identity - registry # import - and - export - device - identities . * @ param resourceGroupName The name of the resource group that contains the IoT hub . * @ param resourceName The name of the IoT hub . * @ param exportDevicesParameters The parameters that specify the export devices operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the JobResponseInner object */ public Observable < ServiceResponse < JobResponseInner > > exportDevicesWithServiceResponseAsync ( String resourceGroupName , String resourceName , ExportDevicesRequest exportDevicesParameters ) { } }
if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( resourceName == null ) { throw new IllegalArgumentException ( "Parameter resourceName is required and cannot be null." ) ; } if ( this . client . apiVersion ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.apiVersion() is required and cannot be null." ) ; } if ( exportDevicesParameters == null ) { throw new IllegalArgumentException ( "Parameter exportDevicesParameters is required and cannot be null." ) ; } Validator . validate ( exportDevicesParameters ) ; return service . exportDevices ( this . client . subscriptionId ( ) , resourceGroupName , resourceName , this . client . apiVersion ( ) , exportDevicesParameters , this . client . acceptLanguage ( ) , this . client . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponse < JobResponseInner > > > ( ) { @ Override public Observable < ServiceResponse < JobResponseInner > > call ( Response < ResponseBody > response ) { try { ServiceResponse < JobResponseInner > clientResponse = exportDevicesDelegate ( response ) ; return Observable . just ( clientResponse ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ;
public class AbstractSMTPClientFuture { /** * Notify all registered { @ link SMTPClientFutureListener } ' s */ protected final void notifyListeners ( ) { } }
Iterator < SMTPClientFutureListener < E > > it = null ; synchronized ( this ) { if ( listeners != null ) { // notify the listeners it = listeners . iterator ( ) ; listeners = null ; } } if ( it != null ) { while ( it . hasNext ( ) ) { SMTPClientFutureListener < E > listener = null ; try { listener = it . next ( ) ; listener . operationComplete ( this ) ; } catch ( Throwable e ) { LOGGER . warn ( "Exception thrown while executing " + SMTPClientFutureListener . class . getName ( ) + " " + listener , e ) ; } } }
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getMPORG ( ) { } }
if ( mporgEClass == null ) { mporgEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 421 ) ; } return mporgEClass ;
public class ComparePathQuery { /** * Construct a { @ link Query } implementation that scores documents such that the node represented by the document has a path * that is greater than the supplied constraint path . * @ param constraintPath the constraint path ; may not be null * @ param fieldName the name of the document field containing the path value ; may not be null * @ param factories the value factories that can be used during the scoring ; may not be null * @ param caseOperation the operation that should be performed on the indexed values before the constraint value is being * evaluated ; may be null which indicates that no case conversion should be done * @ return the path query ; never null */ public static ComparePathQuery createQueryForNodesWithPathGreaterThan ( Path constraintPath , String fieldName , ValueFactories factories , Function < String , String > caseOperation ) { } }
return new ComparePathQuery ( fieldName , constraintPath , factories . getPathFactory ( ) , ( path1 , path2 ) -> PATH_COMPARATOR . compare ( path1 , path2 ) > 0 , caseOperation ) ;
public class HashingInputStream { /** * Reads the next byte of data from the underlying input stream and updates the hasher with the * byte read . */ @ Override public int read ( ) throws IOException { } }
int b = in . read ( ) ; if ( b != - 1 ) { hasher . put ( ( byte ) b ) ; } return b ;
public class CommonOps_DDF2 { /** * Returns the value of the element in the vector that has the largest value . < br > * < br > * Max { a < sub > i < / sub > } for all i < br > * @ param a A vector . Not modified . * @ return The max element value of the matrix . */ public static double elementMax ( DMatrix2 a ) { } }
double max = a . a1 ; if ( a . a2 > max ) max = a . a2 ; return max ;
public class CommonTypeFactory { /** * Pure search for median type without edge cases checks ( no arrays or wildcards and not equal types ) . * Complete hierarchies are resolved for both types in order to find minimal base class and all * common interfaces . * @ param first first type * @ param second second type * @ param alwaysIncludeInterfaces always search for common interfaces * @ param cache resolution types cache * @ return resolved common type or Object if no commodity found */ private static Type resolveCommonType ( final Type first , final Type second , final boolean alwaysIncludeInterfaces , final PathsCache cache ) { } }
// resolve complete hierarchies , preserving all generics // ( even if types are ParameterizedType it will be counted ) final Map < Class < ? > , LinkedHashMap < String , Type > > firstContext = resolveHierarchy ( first ) ; final Map < Class < ? > , LinkedHashMap < String , Type > > secondContext = resolveHierarchy ( second ) ; // all types in hierarchies final Set < Class < ? > > firstComposingTypes = new HashSet < Class < ? > > ( firstContext . keySet ( ) ) ; final Set < Class < ? > > secondComposingTypes = new HashSet < Class < ? > > ( secondContext . keySet ( ) ) ; Class < ? > commonRoot = Object . class ; final Set < Class < ? > > commonContracts = new HashSet < Class < ? > > ( ) ; for ( Class < ? > type : firstComposingTypes ) { if ( secondComposingTypes . contains ( type ) ) { if ( type . isInterface ( ) ) { commonContracts . add ( type ) ; } else { // but it might be less specific as hierarchies contain all classes till Object if ( commonRoot . isAssignableFrom ( type ) ) { commonRoot = type ; } } } } return buildResultType ( commonRoot , commonContracts , firstContext , secondContext , alwaysIncludeInterfaces , cache ) ;
public class DeviceSelectionResult { /** * The filters in a device selection result . * @ param filters * The filters in a device selection result . */ public void setFilters ( java . util . Collection < DeviceFilter > filters ) { } }
if ( filters == null ) { this . filters = null ; return ; } this . filters = new java . util . ArrayList < DeviceFilter > ( filters ) ;
public class ScanProgressTableModel { /** * Inner method for elapsed time label formatting * @ param elapsed the time in milliseconds * @ return the label with the elapsed time in readable format */ private String getElapsedTimeLabel ( long elapsed ) { } }
return ( elapsed >= 0 ) ? String . format ( "%02d:%02d.%03d" , elapsed / 60000 , ( elapsed % 60000 ) / 1000 , ( elapsed % 1000 ) ) : null ;
public class StringMetaData { /** * Is the given object valid for this column , * given the column type and any * restrictions given by the * ColumnMetaData object ? * @ param input object to check * @ return true if value , false if invalid */ @ Override public boolean isValid ( Object input ) { } }
String str = input . toString ( ) ; int len = str . length ( ) ; if ( minLength != null && len < minLength ) return false ; if ( maxLength != null && len > maxLength ) return false ; return regex == null || str . matches ( regex ) ;
public class DNSUtil { /** * Returns a list of HostAddresses under which the specified XMPP server can be reached at for client - to - server * communication . A DNS lookup for a SRV record in the form " _ xmpp - client . _ tcp . example . com " is attempted , according * to section 3.2.1 of RFC 6120 . If that lookup fails , it ' s assumed that the XMPP server lives at the host resolved * by a DNS lookup at the specified domain on the default port of 5222. * As an example , a lookup for " example . com " may return " im . example . com : 5269 " . * @ param domain the domain . * @ param failedAddresses on optional list that will be populated with host addresses that failed to resolve . * @ param dnssecMode DNSSec mode . * @ return List of HostAddress , which encompasses the hostname and port that the * XMPP server can be reached at for the specified domain . */ public static List < HostAddress > resolveXMPPServiceDomain ( DnsName domain , List < HostAddress > failedAddresses , DnssecMode dnssecMode ) { } }
return resolveDomain ( domain , DomainType . client , failedAddresses , dnssecMode ) ;
public class CommerceOrderLocalServiceBaseImpl { /** * Deletes the commerce order from the database . Also notifies the appropriate model listeners . * @ param commerceOrder the commerce order * @ return the commerce order that was removed * @ throws PortalException */ @ Indexable ( type = IndexableType . DELETE ) @ Override public CommerceOrder deleteCommerceOrder ( CommerceOrder commerceOrder ) throws PortalException { } }
return commerceOrderPersistence . remove ( commerceOrder ) ;
public class BasicBinder { /** * Resolve a Binding with the given source and target class . * A binding unifies a marshaller and an unmarshaller and both must be available to resolve a binding . * The source class is considered the owning class of the binding . The source can be marshalled * into the target class . Similarly , the target can be unmarshalled to produce an instance of the source type . * @ param key The key to look up */ @ SuppressWarnings ( "unlikely-arg-type" ) public < S , T > Binding < S , T > findBinding ( ConverterKey < S , T > key ) { } }
FromUnmarshaller < ? , ? > fromUnmarshaller = null ; ToMarshaller < ? , ? > toMarshaller = null ; Converter < S , T > toTarget = findConverter ( key ) ; if ( toTarget instanceof FromUnmarshallerConverter < ? , ? > ) { fromUnmarshaller = ( ( FromUnmarshallerConverter < ? , ? > ) toTarget ) . getUnmarshaller ( ) ; } else if ( toTarget instanceof ToMarshallerConverter < ? , ? > ) { toMarshaller = ( ( ToMarshallerConverter < ? , ? > ) toTarget ) . getMarshaller ( ) ; } Converter < T , S > toSource = findConverter ( key . invert ( ) ) ; if ( toSource instanceof FromUnmarshallerConverter < ? , ? > ) { fromUnmarshaller = ( ( FromUnmarshallerConverter < ? , ? > ) toSource ) . getUnmarshaller ( ) ; } else if ( toSource instanceof ToMarshallerConverter < ? , ? > ) { toMarshaller = ( ( ToMarshallerConverter < ? , ? > ) toSource ) . getMarshaller ( ) ; } if ( fromUnmarshaller != null && toMarshaller != null ) { if ( fromUnmarshaller . equals ( toMarshaller ) && Binding . class . isAssignableFrom ( fromUnmarshaller . getClass ( ) ) ) { Binding < ? , ? > theBinding = ( Binding < ? , ? > ) fromUnmarshaller ; if ( theBinding . getBoundClass ( ) . equals ( key . getInputClass ( ) ) ) { @ SuppressWarnings ( "unchecked" ) final Binding < S , T > myBinding = ( Binding < S , T > ) theBinding ; return myBinding ; } } if ( fromUnmarshaller . getBoundClass ( ) . equals ( key . getInputClass ( ) ) ) { @ SuppressWarnings ( "unchecked" ) final Binding < S , T > myBinding = new CompositeBinding < S , T > ( ( ToMarshaller < S , T > ) toMarshaller , ( FromUnmarshaller < S , T > ) fromUnmarshaller ) ; return myBinding ; } else { @ SuppressWarnings ( "unchecked" ) final Binding < S , T > myBinding = new InverseCompositeBinding < S , T > ( ( ToMarshaller < T , S > ) toMarshaller , ( FromUnmarshaller < T , S > ) fromUnmarshaller ) ; return myBinding ; } } return null ;
public class LofUpdater { /** * 学習データモデルの更新を行なわず 、 LOF値の算出のみを行う 。 * @ param recievedPoint 受信データ * @ param dataSet 学習モデルデータ * @ return LOF値算出結果 */ protected double calculateLofWithoutUpdate ( LofPoint recievedPoint , LofDataSet dataSet ) { } }
double result = 0.0d ; if ( this . hasIntermediate ) { result = LofCalculator . calculateLofWithoutUpdate ( this . kn , recievedPoint , dataSet ) ; } else { result = LofCalculator . calculateLofNoIntermediate ( this . kn , recievedPoint , dataSet ) ; } return result ;
public class AttrContext { /** * Duplicate this context , replacing scope field and copying all others . */ AttrContext dup ( WriteableScope scope ) { } }
AttrContext info = new AttrContext ( ) ; info . scope = scope ; info . staticLevel = staticLevel ; info . isSelfCall = isSelfCall ; info . selectSuper = selectSuper ; info . pendingResolutionPhase = pendingResolutionPhase ; info . lint = lint ; info . enclVar = enclVar ; info . returnResult = returnResult ; info . defaultSuperCallSite = defaultSuperCallSite ; info . isSerializable = isSerializable ; info . isLambda = isLambda ; info . isSpeculative = isSpeculative ; info . isAnonymousDiamond = isAnonymousDiamond ; info . isNewClass = isNewClass ; info . preferredTreeForDiagnostics = preferredTreeForDiagnostics ; info . visitingServiceImplementation = visitingServiceImplementation ; return info ;
public class WSX509KeyManager { /** * @ see javax . net . ssl . X509KeyManager # getClientAliases ( java . lang . String , * java . security . Principal [ ] ) */ @ Override public String [ ] getClientAliases ( String keyType , Principal [ ] issuers ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getClientAliases" , new Object [ ] { keyType , issuers } ) ; String [ ] rc = getX509KeyManager ( ) . getClientAliases ( keyType , issuers ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getClientAliases" , rc ) ; return rc ;