signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class WhitelistingApi { /** * Get whitelisted vdids of a device type . * Get whitelisted vdids of a device type . * @ param dtid Device Type ID . ( required ) * @ param count Max results count . ( optional ) * @ param offset Result starting offset . ( optional ) * @ return WhitelistResultEnvelope * @...
ApiResponse < WhitelistResultEnvelope > resp = getWhitelistWithHttpInfo ( dtid , count , offset ) ; return resp . getData ( ) ;
public class MapBuilder { /** * Adds the string value to the provided map under the provided field name , * if it should be included . */ public MapBuilder add ( String fieldName , boolean include , @ Nullable String value ) { } }
if ( include && value != null ) { map . put ( getFieldName ( fieldName ) , value ) ; } return this ;
public class ImageIOGreyScale { /** * Returns an < code > Iterator < / code > containing all currently registered < code > ImageReader < / code > s that * claim to be able to decode files with the given MIME type . * @ param MIMEType * a < code > String < / code > containing a file suffix ( < i > e . g . < / i > ...
if ( MIMEType == null ) { throw new IllegalArgumentException ( "MIMEType == null!" ) ; } // Ensure category is present Iterator iter ; try { iter = theRegistry . getServiceProviders ( ImageReaderSpi . class , new ContainsFilter ( readerMIMETypesMethod , MIMEType ) , true ) ; } catch ( IllegalArgumentException e ) { ret...
public class JmsConnectionImpl { /** * ( non - Javadoc ) * @ see com . ibm . ws . sib . api . jms . JmsConnection # reportException ( javax . jms . JMSException ) */ @ Override public void reportException ( JMSException e ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "reportException" , e ) ; if ( elRef . get ( ) != null ) { asyncExceptionTask . handleException ( e ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "...
public class Operators { /** * where */ private void setOperatorName ( Tag tag , String name ) { } }
setOperatorName ( tag , names . fromString ( name ) ) ;
public class Chain { /** * Set and connect to the peer to be used as the event source . * @ param peerUrl peerUrl * @ param pem permission */ public void eventHubConnect ( String peerUrl , String pem ) { } }
this . eventHub . setPeerAddr ( peerUrl , pem ) ; this . eventHub . connect ( ) ;
public class DrizzleResultSet { /** * Retrieves the value of the designated column in the current row of this < code > ResultSet < / code > object as a * < code > java . net . URL < / code > object in the Java programming language . * @ param columnLabel the label for the column specified with the SQL AS clause . I...
try { return new URL ( getValueObject ( columnLabel ) . getString ( ) ) ; } catch ( MalformedURLException e ) { throw SQLExceptionMapper . getSQLException ( "Could not parse as URL" ) ; }
public class SegmentFactory { /** * use getShape method to get object of type shape */ public Segment getSegment ( SEGMENT_TYPE segmentType ) { } }
if ( segmentType == null ) { return null ; } if ( segmentType == SEGMENT_TYPE . LINEAR ) { return new LinearSegment ( ) ; } else if ( segmentType == SEGMENT_TYPE . SPATIAL ) { return new SpatialSegment ( ) ; } else if ( segmentType == SEGMENT_TYPE . TEMPORAL ) { return new TemporalSegment ( ) ; } else if ( segmentType ...
public class FreemarkerEngine { /** * 创建配置项 * @ param config 模板配置 * @ return { @ link Configuration } */ private static Configuration createCfg ( TemplateConfig config ) { } }
if ( null == config ) { config = new TemplateConfig ( ) ; } final Configuration cfg = new Configuration ( Configuration . VERSION_2_3_28 ) ; cfg . setLocalizedLookup ( false ) ; cfg . setDefaultEncoding ( config . getCharset ( ) . toString ( ) ) ; switch ( config . getResourceMode ( ) ) { case CLASSPATH : cfg . setTemp...
public class InboundResourceadapterTypeImpl { /** * If not already created , a new < code > messageadapter < / code > element with the given value will be created . * Otherwise , the existing < code > messageadapter < / code > element will be returned . * @ return a new or existing instance of < code > Messageadapt...
Node node = childNode . getOrCreate ( "messageadapter" ) ; MessageadapterType < InboundResourceadapterType < T > > messageadapter = new MessageadapterTypeImpl < InboundResourceadapterType < T > > ( this , "messageadapter" , childNode , node ) ; return messageadapter ;
public class HashUserRealm { /** * Add a user to a role . * @ param userName * @ param roleName */ public synchronized void addUserToRole ( String userName , String roleName ) { } }
HashSet userSet = ( HashSet ) _roles . get ( roleName ) ; if ( userSet == null ) { userSet = new HashSet ( 11 ) ; _roles . put ( roleName , userSet ) ; } userSet . add ( userName ) ;
public class APSPSolver { /** * Create many new variables ( batch ) - i . e . , many timepoints . */ @ Override protected Variable [ ] createVariablesSub ( int num ) { } }
int [ ] tp = tpCreate ( num ) ; Variable [ ] ret = new Variable [ num ] ; for ( int i = 0 ; i < tp . length ; i ++ ) { ret [ i ] = tPoints [ tp [ i ] ] ; } return ret ;
public class DateUtil { /** * 查询时间是否在今日 * @ param date 时间字符串 * @ param format 时间字符串的格式 * @ return 如果指定日期对象在今天则返回 < code > true < / code > */ public static boolean isToday ( String date , String format ) { } }
String now = getFormatDate ( SHORT ) ; String target = getFormatDate ( SHORT , parse ( date , format ) ) ; return now . equals ( target ) ;
public class WSubMenu { /** * Indicates whether this is a top - level menu ( ie . attached to a menu bar ) . * @ return { @ code true } if this is a top - level menu . */ public boolean isTopLevelMenu ( ) { } }
MenuContainer container = WebUtilities . getAncestorOfClass ( MenuContainer . class , this ) ; if ( container instanceof WMenuItemGroup ) { container = WebUtilities . getAncestorOfClass ( MenuContainer . class , container ) ; } return container instanceof WMenu ;
public class RollableScalableResourceOperation { /** * Let ' s wait until there are enough Ready pods . */ private void waitUntilScaled ( final int count ) { } }
final ArrayBlockingQueue < Object > queue = new ArrayBlockingQueue < > ( 1 ) ; final AtomicReference < Integer > replicasRef = new AtomicReference < > ( 0 ) ; final String name = checkName ( getItem ( ) ) ; final String namespace = checkNamespace ( getItem ( ) ) ; final Runnable tPoller = ( ) -> { try { T t = get ( ) ;...
public class CollectionProxyDefaultImpl { /** * Determines the number of elements that the query would return . Override this * method if the size shall be determined in a specific way . * @ return The number of elements */ protected synchronized int loadSize ( ) throws PersistenceBrokerException { } }
PersistenceBroker broker = getBroker ( ) ; try { return broker . getCount ( getQuery ( ) ) ; } catch ( Exception ex ) { throw new PersistenceBrokerException ( ex ) ; } finally { releaseBroker ( broker ) ; }
public class Mappings { /** * Filter the mappings for those which cover a unique set of atoms in the * target . The unique atom mappings are a subset of the unique bond * matches . * @ return fluent - api instance * @ see # uniqueBonds ( ) */ public Mappings uniqueAtoms ( ) { } }
// we need the unique predicate to be reset for each new iterator - // otherwise multiple iterations are always filtered ( seen before ) return new Mappings ( query , target , new Iterable < int [ ] > ( ) { @ Override public Iterator < int [ ] > iterator ( ) { return Iterators . filter ( iterable . iterator ( ) , new U...
public class TagResourceRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( TagResourceRequest tagResourceRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( tagResourceRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( tagResourceRequest . getResourceArn ( ) , RESOURCEARN_BINDING ) ; protocolMarshaller . marshall ( tagResourceRequest . getTagsToAdd ( ) , TAGSTOADD_BINDING ) ; } catc...
public class Raytrace { /** * Gets the closest { @ link Point } of the origin . * @ param points the points * @ return the closest point */ private Pair < EnumFacing , Point > getClosest ( List < Pair < EnumFacing , Point > > points ) { } }
double distance = Double . MAX_VALUE ; Pair < EnumFacing , Point > ret = null ; for ( Pair < EnumFacing , Point > pair : points ) { double d = Point . distanceSquared ( src , pair . getRight ( ) ) ; if ( distance > d ) { distance = d ; ret = pair ; } } return ret ;
public class ObjectUtil { /** * Compare the type Writable . * @ param one the original object * @ param other the object to be compared . * @ return if 0 , are equal . */ public static int typeCompareTo ( Writable one , Writable other ) { } }
PrimitiveObject noOne = hadoop2Primitive ( one ) ; PrimitiveObject noOther = hadoop2Primitive ( other ) ; if ( noOne . getType ( ) != noOther . getType ( ) ) { return - 1 ; } return 0 ;
public class RottenTomatoesApi { /** * Pulls the complete movie cast for a movie * @ param movieId RT Movie ID * @ return * @ throws RottenTomatoesException */ public List < RTCast > getCastInfo ( int movieId ) throws RottenTomatoesException { } }
properties . clear ( ) ; properties . put ( ApiBuilder . PROPERTY_ID , String . valueOf ( movieId ) ) ; properties . put ( ApiBuilder . PROPERTY_URL , URL_CAST_INFO ) ; WrapperLists wrapper = response . getResponse ( WrapperLists . class , properties ) ; if ( wrapper != null && wrapper . getCast ( ) != null ) { return ...
public class PartitionTable { /** * Sort the set of variables and join to a comma - delimited string . */ private static String buildKey ( Set < String > variables ) { } }
return variables . stream ( ) . sorted ( ) . collect ( Collectors . joining ( ", " ) ) ;
public class DBDataProvider { /** * { @ inheritDoc } * @ throws TechnicalException * is thrown if you have a technical error ( IOException on . sql file ) in NoraUi . */ @ Override public int getNbLines ( ) throws TechnicalException { } }
String sqlRequest = "" ; try { final Path file = Paths . get ( dataInPath + scenarioName + ".sql" ) ; sqlRequest = new String ( Files . readAllBytes ( file ) , Charset . forName ( Constants . DEFAULT_ENDODING ) ) ; sqlSanitized4readOnly ( sqlRequest ) ; } catch ( final IOException e ) { throw new TechnicalException ( M...
public class AbstractCoalescingBufferQueue { /** * Copy all pending entries in this queue into the destination queue . * @ param dest to copy pending buffers to . */ public final void copyTo ( AbstractCoalescingBufferQueue dest ) { } }
dest . bufAndListenerPairs . addAll ( bufAndListenerPairs ) ; dest . incrementReadableBytes ( readableBytes ) ;
public class LBiObjSrtPredicateBuilder { /** * One of ways of creating builder . This is possibly the least verbose way where compiler should be able to guess the generic parameters . */ @ Nonnull public static < T1 , T2 > LBiObjSrtPredicate < T1 , T2 > biObjSrtPredicateFrom ( Consumer < LBiObjSrtPredicateBuilder < T1 ...
LBiObjSrtPredicateBuilder builder = new LBiObjSrtPredicateBuilder ( ) ; buildingFunction . accept ( builder ) ; return builder . build ( ) ;
public class JsonSerializer { /** * Deserializes a Json string representation to an object . */ public Object deserialize ( String jsonObject ) { } }
if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "Deserializing Json object" ) ; } XStream xstream = new XStream ( new JettisonMappedXmlDriver ( ) ) ; Object obj = xstream . fromXML ( jsonObject ) ; if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "Object deserialized" ) ; } return obj ;
public class VersionListener { /** * Simple semantic version */ @ Override public void exitPostfix_version ( VersionParser . Postfix_versionContext ctx ) { } }
SemanticVersion version = null ; int count = ctx . getChildCount ( ) ; Object o = stack . pop ( ) ; if ( ! ( o instanceof String ) ) { throw new InvalidRangeRuntimeException ( "Expected string, got " + o . getClass ( ) . getSimpleName ( ) + " (" + o + ")" ) ; } String postfix = ( String ) o ; switch ( count ) { case 4 ...
public class ReflectionUtils { /** * Returns the ( first ) instance of the annotation , on the class ( or any superclass , or interfaces implemented ) . * @ param c the class to examine * @ param annotation the annotation to find * @ param < T > the type of the annotation * @ return the list of annotations */ @...
final List < T > found = new ArrayList < T > ( ) ; // TODO isn ' t that actually breaking the contract of @ Inherited ? if ( c . isAnnotationPresent ( annotation ) ) { found . add ( ( T ) c . getAnnotation ( annotation ) ) ; } Class parent = c . getSuperclass ( ) ; while ( ( parent != null ) && ( parent != Object . cla...
public class PlanAssembler { /** * Get the unique set of names of all columns that are part of an index on * the given table . * @ param table * The table to build the list of index - affected columns with . * @ return The set of column names affected by indexes with duplicates * removed . */ private static S...
HashSet < String > columns = new HashSet < > ( ) ; for ( Index index : table . getIndexes ( ) ) { for ( ColumnRef colRef : index . getColumns ( ) ) { columns . add ( colRef . getColumn ( ) . getTypeName ( ) ) ; } } return columns ;
public class Logger { /** * Log a message with specific log level . * @ param logLevel the specific log level * @ param format the format of the message to log , null if just need to concat arguments * @ param args the arguments of the message to log * @ since 1.4.0 */ public void log ( int logLevel , String fo...
println ( logLevel , format , args ) ;
public class FbBotMillBean { /** * Retrieves the recipient from an envelope . It never returns null . * @ param envelope * the message envelope . * @ return a { @ link User } containing the recipient if found , empty * otherwise . It never returns null . */ protected User safeGetRecipient ( MessageEnvelope enve...
if ( envelope != null && envelope . getRecipient ( ) != null && envelope . getRecipient ( ) . getId ( ) != null ) { return envelope . getRecipient ( ) ; } return new User ( ) ;
public class DerParser { /** * Read next object . If it ' s constructed , the value holds * encoded content and it should be parsed by a new * parser from < code > Asn1Object . getParser < / code > . * @ return A object * @ throws IOException */ public Asn1Object read ( ) throws IOException { } }
int tag = in . read ( ) ; if ( tag == - 1 ) throw new IOException ( "Invalid DER: stream too short, missing tag" ) ; // $ NON - NLS - 1 $ int length = getLength ( ) ; byte [ ] value = new byte [ length ] ; int n = in . read ( value ) ; if ( n < length ) throw new IOException ( "Invalid DER: stream too short, missing va...
public class Maps { /** * Returns the value associated with the specified { @ code key } if it exists in the specified { @ code map } contains , or the new put { @ code Map } if it ' s absent . * @ param map * @ param key * @ return */ public static < K , KK , VV > Map < KK , VV > getAndPutMapIfAbsent ( final Map...
Map < KK , VV > v = map . get ( key ) ; if ( v == null ) { v = new HashMap < > ( ) ; v = map . put ( key , v ) ; } return v ;
public class JsonReader { /** * Reads the next array as a collection . * @ param < T > the collection type * @ param supplier the supplier to create a new collection * @ return the collection containing the items in the next array * @ throws IOException Something went wrong reading */ public < T extends Collect...
return nextCollection ( supplier , StringUtils . EMPTY ) ;
public class ExportConfigurationsInner { /** * Create a Continuous Export configuration of an Application Insights component . * @ param resourceGroupName The name of the resource group . * @ param resourceName The name of the Application Insights component resource . * @ param exportProperties Properties that ne...
return createWithServiceResponseAsync ( resourceGroupName , resourceName , exportProperties ) . map ( new Func1 < ServiceResponse < List < ApplicationInsightsComponentExportConfigurationInner > > , List < ApplicationInsightsComponentExportConfigurationInner > > ( ) { @ Override public List < ApplicationInsightsComponen...
public class BaseConnectionSource { /** * Return true if the connection being released is the one that has been saved . */ protected boolean isSavedConnection ( DatabaseConnection connection ) { } }
NestedConnection currentSaved = specialConnection . get ( ) ; if ( currentSaved == null ) { return false ; } else if ( currentSaved . connection == connection ) { // ignore the release when we have a saved connection return true ; } else { return false ; }
public class Interval { /** * Returns a new interval based on this interval but with a different start * and end time . * @ param startTime the new start time * @ param endTime the new end time * @ return a new interval */ public Interval withTimes ( LocalTime startTime , LocalTime endTime ) { } }
requireNonNull ( startTime ) ; requireNonNull ( endTime ) ; return new Interval ( this . startDate , startTime , this . endDate , endTime , this . zoneId ) ;
public class WCOutputStream31 { /** * @ see javax . servlet . ServletOutputStream # print ( double ) */ public void print ( double d ) throws IOException { } }
if ( this . _listener != null && ! checkIfCalledFromWLonError ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "non blocking print double , WriteListener enabled: " + this . _listener ) ; this . print_NonBlocking ( Double . toString ( d ) ) ; } else { if ( TraceCompon...
public class MBTilesDb { /** * Get the bounds of a zoomlevel in tile indexes . * < p > This comes handy when one wants to navigate all tiles of a zoomlevel . * @ param zoomlevel the zoom level . * @ return the tile indexes as [ minTx , maxTx , minTy , maxTy ] . * @ throws Exception */ public int [ ] getBoundsIn...
String sql = "select min(tile_column), max(tile_column), min(tile_row), max(tile_row) from tiles where zoom_level=" + zoomlevel ; return database . execOnConnection ( connection -> { try ( IHMStatement statement = connection . createStatement ( ) ; IHMResultSet resultSet = statement . executeQuery ( sql ) ; ) { if ( re...
public class BeetlUtil { /** * 渲染模板 , 如果为相对路径 , 则渲染ClassPath模板 , 否则渲染本地文件模板 * @ param path 路径 * @ param templateFileName 模板文件名 * @ param bindingMap 绑定参数 * @ return 渲染后的内容 * @ since 3.2.0 */ public static String render ( String path , String templateFileName , Map < String , Object > bindingMap ) { } }
if ( FileUtil . isAbsolutePath ( path ) ) { return render ( getFileTemplate ( path , templateFileName ) , bindingMap ) ; } else { return render ( getClassPathTemplate ( path , templateFileName ) , bindingMap ) ; }
public class CnvBnRsToLong { /** * < p > Convert parameter with using name . < / p > * @ param pAddParam additional params , e . g . entity class UserRoleTomcat * to reveal derived columns for its composite ID , or field Enum class * to reveal Enum value by index . * @ param pFrom from a bean * @ param pName ...
return pFrom . getLong ( pName ) ;
public class BaseFilterQueryBuilder { /** * Add a Field Search Condition that will check if the id field exists in an array of values . eg . { @ code field IN ( values ) } * @ param property The field id as defined in the Entity mapping class . * @ param values The List of Ids to be compared to . */ protected void ...
if ( values != null && ! values . isEmpty ( ) ) { fieldConditions . add ( getCriteriaBuilder ( ) . not ( property . in ( values ) ) ) ; }
public class Cli { /** * Utility method to start the CommonsCli using a main class and command line arguments * @ param mainClass * @ param args */ public static void start ( Class < ? > mainClass , final String [ ] args ) { } }
try { LifecycleInjector . bootstrap ( mainClass , new AbstractModule ( ) { @ Override protected void configure ( ) { bind ( String [ ] . class ) . annotatedWith ( Main . class ) . toInstance ( args ) ; } } ) ; } catch ( Exception e ) { throw new ProvisionException ( "Error instantiating main class" , e ) ; }
public class KernelCapabilities { /** * The Linux capabilities for the container that have been removed from the default configuration provided by * Docker . This parameter maps to < code > CapDrop < / code > in the < a * href = " https : / / docs . docker . com / engine / api / v1.35 / # operation / ContainerCreat...
if ( drop == null ) { this . drop = null ; return ; } this . drop = new com . amazonaws . internal . SdkInternalList < String > ( drop ) ;
public class SarlDocumentationParser { /** * Read the given file and transform its content in order to have a raw text . * @ param inputFile the input file . * @ return the raw file context . */ public String transform ( File inputFile ) { } }
final String content ; try ( FileReader reader = new FileReader ( inputFile ) ) { content = read ( reader ) ; } catch ( IOException exception ) { reportError ( Messages . SarlDocumentationParser_0 , exception ) ; return null ; } return transform ( content , inputFile ) ;
public class ListSubscriptionsByTopicResult { /** * A list of subscriptions . * @ param subscriptions * A list of subscriptions . */ public void setSubscriptions ( java . util . Collection < Subscription > subscriptions ) { } }
if ( subscriptions == null ) { this . subscriptions = null ; return ; } this . subscriptions = new com . amazonaws . internal . SdkInternalList < Subscription > ( subscriptions ) ;
public class I18nProvider { /** * Converts a parameter using the application - specific constants . Only converts parameters of the form " $ { . . . . } " . * @ param parameter * parameter to look up ( must be of the form " $ { . . . . } " ) * @ return the converted parameter ( if conformal ) or the parameter its...
if ( parameter . startsWith ( "i18n:" ) ) { String methodName = parameter . substring ( 5 ) . replace ( '.' , '_' ) ; return lookup . getString ( methodName ) ; } else { return parameter ; }
public class SunburstChart { /** * Defines if the text color of the chart data should be adjusted according to the chart data fill color * @ param AUTOMATIC */ public void setAutoTextColor ( final boolean AUTOMATIC ) { } }
if ( null == autoTextColor ) { _autoTextColor = AUTOMATIC ; adjustTextColors ( ) ; redraw ( ) ; } else { autoTextColor . set ( AUTOMATIC ) ; }
public class CPDefinitionInventoryLocalServiceWrapper { /** * Returns a range of cp definition inventories matching the UUID and company . * @ param uuid the UUID of the cp definition inventories * @ param companyId the primary key of the company * @ param start the lower bound of the range of cp definition inven...
return _cpDefinitionInventoryLocalService . getCPDefinitionInventoriesByUuidAndCompanyId ( uuid , companyId , start , end , orderByComparator ) ;
public class StringMan { /** * Takes a string encoded in hex ( 00 - FF ) , two chars per byte , and returns an array of bytes . * array . length will be hex . length / 2 after hex has been run through { @ link # decompressHexString } */ public static byte [ ] decodeStringToBytes ( String hex ) { } }
hex = decompressHexString ( hex ) ; int stringLength = hex . length ( ) ; byte [ ] b = new byte [ stringLength / 2 ] ; for ( int i = 0 , j = 0 ; i < stringLength ; i += 2 , j ++ ) { int high = charToNibble ( hex . charAt ( i ) ) ; int low = charToNibble ( hex . charAt ( i + 1 ) ) ; b [ j ] = ( byte ) ( ( high << 4 ) | ...
public class ListTargetsByRuleResult { /** * The targets assigned to the rule . * @ param targets * The targets assigned to the rule . */ public void setTargets ( java . util . Collection < Target > targets ) { } }
if ( targets == null ) { this . targets = null ; return ; } this . targets = new java . util . ArrayList < Target > ( targets ) ;
public class DescribeChangeSetResult { /** * A list of < code > Parameter < / code > structures that describes the input parameters and their values used to create * the change set . For more information , see the < a * href = " https : / / docs . aws . amazon . com / AWSCloudFormation / latest / APIReference / API...
if ( this . parameters == null ) { setParameters ( new com . amazonaws . internal . SdkInternalList < Parameter > ( parameters . length ) ) ; } for ( Parameter ele : parameters ) { this . parameters . add ( ele ) ; } return this ;
public class SubsystemChannel { /** * Send a byte array as a message . * @ param msg * @ throws SshException * @ deprecated This has changed internally to use a * { @ link com . sshtools . ssh . Packet } and it is recommended that * all implementations change to use * { @ link com . sshtools . ssh . Packet ...
try { Packet pkt = createPacket ( ) ; pkt . write ( msg ) ; sendMessage ( pkt ) ; } catch ( IOException ex ) { throw new SshException ( SshException . UNEXPECTED_TERMINATION , ex ) ; }
public class Vertex { /** * Translates this { @ link Vertex } by the specified amount . * @ param x the x * @ param y the y * @ param z the z * @ return the vertex */ public Vertex translate ( double x , double y , double z ) { } }
this . x += x ; this . y += y ; this . z += z ; return this ;
public class EclipseAjcMojo { /** * TODO remove javac builder if aspectJ builder is used */ private boolean mergeBuilders ( Document document ) throws MojoExecutionException { } }
NodeList buildCommandList = document . getElementsByTagName ( "buildCommand" ) ; for ( int i = 0 ; i < buildCommandList . getLength ( ) ; i ++ ) { Element buildCommand = ( Element ) buildCommandList . item ( i ) ; NodeList nameList = buildCommand . getElementsByTagName ( "name" ) ; for ( int j = 0 ; j < nameList . getL...
public class RemoveUnusedCode { /** * Traverses a node recursively . Call this once per pass . */ private void traverseAndRemoveUnusedReferences ( Node root ) { } }
// Create scope from parent of root node , which also has externs as a child , so we ' ll // have extern definitions in scope . Scope scope = scopeCreator . createScope ( root . getParent ( ) , null ) ; if ( ! scope . hasSlot ( NodeUtil . JSC_PROPERTY_NAME_FN ) ) { // TODO ( b / 70730762 ) : Passes that add references ...
public class MpscArrayQueue { /** * { @ link # offer } } if { @ link # size ( ) } is less than threshold . * @ param e the object to offer onto the queue , not null * @ param threshold the maximum allowable size * @ return true if the offer is successful , false if queue size exceeds threshold * @ since 1.0.1 *...
if ( null == e ) { throw new NullPointerException ( ) ; } final long mask = this . mask ; final long capacity = mask + 1 ; long producerLimit = lvProducerLimit ( ) ; // LoadLoad long pIndex ; do { pIndex = lvProducerIndex ( ) ; // LoadLoad long available = producerLimit - pIndex ; long size = capacity - available ; if ...
public class CourierTemplateSpecGenerator { /** * Determine name and class for unnamed types . */ private ClassInfo classInfoForUnnamed ( ClassTemplateSpec enclosingClass , String name , DataSchema schema ) { } }
assert ! ( schema instanceof NamedDataSchema ) ; assert ! ( schema instanceof PrimitiveDataSchema ) ; final ClassInfo classInfo = classNameForUnnamedTraverse ( enclosingClass , name , schema ) ; final String className = classInfo . fullName ( ) ; final DataSchema schemaFromClassName = _classNameToSchemaMap . get ( clas...
public class CmsMessageBundleEditorModel { /** * Locks the bundle descriptor . * @ throws CmsException thrown if locking fails . */ private void lockDescriptor ( ) throws CmsException { } }
if ( ( null == m_descFile ) && ( null != m_desc ) ) { m_descFile = LockedFile . lockResource ( m_cms , m_desc ) ; }
public class AbstractGenericsContext { /** * Shortcut for { @ link # resolveGenericsOf ( Type ) } useful for single generic types or * when just first generic required . * Check if type containing generics , belonging to different context in current hierarchy and * automatically change context to properly resolve...
final List < Class < ? > > res = resolveGenericsOf ( type ) ; return res . isEmpty ( ) ? null : res . get ( 0 ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link SimpleTextureType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link SimpleTextureType } { @ code >...
return new JAXBElement < SimpleTextureType > ( _SimpleTexture_QNAME , SimpleTextureType . class , null , value ) ;
public class GSECOLImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . GSECOL__COLOR : setCOLOR ( COLOR_EDEFAULT ) ; return ; } super . eUnset ( featureID ) ;
public class ClassBundleFactory { /** * Get the classes for all the fields * @ param clz The class * @ return The classes ; empty array if none */ private static Class < ? > [ ] getFields ( Class < ? > clz ) { } }
List < Class < ? > > result = new ArrayList < Class < ? > > ( ) ; Class < ? > c = clz ; while ( ! c . equals ( Object . class ) ) { try { Field [ ] fields = SecurityActions . getDeclaredFields ( c ) ; if ( fields . length > 0 ) { for ( Field f : fields ) { Class < ? > defClz = f . getType ( ) ; String defClzName = defC...
public class InternalSimpleAntlrParser { /** * InternalSimpleAntlr . g : 736:1 : entryRuleOtherElement returns [ EObject current = null ] : iv _ ruleOtherElement = ruleOtherElement EOF ; */ public final EObject entryRuleOtherElement ( ) throws RecognitionException { } }
EObject current = null ; EObject iv_ruleOtherElement = null ; try { // InternalSimpleAntlr . g : 737:2 : ( iv _ ruleOtherElement = ruleOtherElement EOF ) // InternalSimpleAntlr . g : 738:2 : iv _ ruleOtherElement = ruleOtherElement EOF { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getOtherElem...
public class VarBindingDef { /** * Returns the effective condition that defines when this binding is applicable . */ public ICondition getEffectiveCondition ( ) { } }
if ( effCondition_ == null ) { effCondition_ = getValueDef ( ) . getEffectiveCondition ( getVarDef ( ) . getEffectiveCondition ( ) ) ; } return effCondition_ ;
public class Scanners { /** * A scanner that succeeds and consumes the current character if it satisfies the given * { @ link CharPredicate } . * @ param predicate the predicate . * @ param name the name of what ' s expected logically . Is used in error message . * @ return the scanner . * @ deprecated Implem...
return Patterns . isChar ( predicate ) . toScanner ( name ) ;
public class CmsNewResourceTypeDialog { /** * Creates the parents of nested XML elements if necessary . * @ param xmlContent the XML content that is edited . * @ param xmlPath the path of the ( nested ) element , for which the parents should be created * @ param l the locale for which the XML content is edited . ...
if ( CmsXmlUtils . isDeepXpath ( xmlPath ) ) { String parentPath = CmsXmlUtils . removeLastXpathElement ( xmlPath ) ; if ( null == xmlContent . getValue ( parentPath , l ) ) { createParentXmlElements ( xmlContent , parentPath , l ) ; xmlContent . addValue ( m_cms , parentPath , l , CmsXmlUtils . getXpathIndexInt ( pare...
public class TableIndexDao { /** * Delete a TableIndex by id , cascading * @ param id * id * @ return rows deleted * @ throws SQLException * upon deletion failure */ public int deleteByIdCascade ( String id ) throws SQLException { } }
int count = 0 ; if ( id != null ) { TableIndex tableIndex = queryForId ( id ) ; if ( tableIndex != null ) { count = deleteCascade ( tableIndex ) ; } } return count ;
public class CmsLogFilter { /** * Returns an extended filter with the given type restriction . < p > * @ param type the relation type to include * @ return an extended filter with the given type restriction */ public CmsLogFilter includeType ( CmsLogEntryType type ) { } }
CmsLogFilter filter = ( CmsLogFilter ) clone ( ) ; filter . m_includeTypes . add ( type ) ; return filter ;
public class AbstractRasMethodAdapter { /** * Generate the instruction sequence needed to " box " a sensitive local variable * as a < code > null < / code > reference or the string * & quot ; & lt ; sensitive < i > type < / i > & gt ; & quot ; * @ param type * the < code > Type < / code > of the object in the s...
if ( type . getSize ( ) == 2 ) { visitInsn ( POP2 ) ; } else { visitInsn ( POP ) ; } visitLdcInsn ( "<sensitive " + type . getClassName ( ) + ">" ) ;
public class Replicator { /** * Removes a document from the replicator database . * @ return { @ link Response } */ public com . cloudant . client . api . model . Response remove ( ) { } }
Response couchDbResponse = replicator . remove ( ) ; com . cloudant . client . api . model . Response response = new com . cloudant . client . api . model . Response ( couchDbResponse ) ; return response ;
public class WasInformedBy { /** * Gets the value of the informed property . * @ return * possible object is * { @ link org . openprovenance . prov . sql . IDRef } */ @ ManyToOne ( targetEntity = org . openprovenance . prov . sql . QualifiedName . class , cascade = { } }
CascadeType . ALL } ) @ JoinColumn ( name = "INFORMED" ) public org . openprovenance . prov . model . QualifiedName getInformed ( ) { return informed ;
public class Replacer { /** * Replaces the next occurrence of a matcher ' s pattern in a matcher ' s target by a given substitution , appending the * result to a buffer but not writing the remainder of m ' s match to the end of dest . * < br > * The substitution starts from current matcher ' s position , current ...
boolean firstPass = true ; int c = 0 , count = 1 ; while ( c < count && m . find ( ) ) { if ( m . end ( ) == 0 && ! firstPass ) continue ; // allow to replace at " ^ " if ( m . start ( ) > 0 ) m . getGroup ( MatchResult . PREFIX , dest ) ; substitution . appendSubstitution ( m , dest ) ; c ++ ; m . setTarget ( m , Matc...
public class DateTimeFormatterBuilder { /** * Instructs the printer to emit a field value as a decimal number , and the * parser to expect an unsigned decimal number . * @ param fieldType type of field to append * @ param minDigits minimum number of digits to < i > print < / i > * @ param maxDigits maximum numb...
if ( fieldType == null ) { throw new IllegalArgumentException ( "Field type must not be null" ) ; } if ( maxDigits < minDigits ) { maxDigits = minDigits ; } if ( minDigits < 0 || maxDigits <= 0 ) { throw new IllegalArgumentException ( ) ; } if ( minDigits <= 1 ) { return append0 ( new UnpaddedNumber ( fieldType , maxDi...
public class PdfCopy { /** * Grabs a page from the input document * @ param reader the reader of the document * @ param pageNumber which page to get * @ return the page */ public PdfImportedPage getImportedPage ( PdfReader reader , int pageNumber ) { } }
if ( currentPdfReaderInstance != null ) { if ( currentPdfReaderInstance . getReader ( ) != reader ) { try { currentPdfReaderInstance . getReader ( ) . close ( ) ; currentPdfReaderInstance . getReaderFile ( ) . close ( ) ; } catch ( IOException ioe ) { // empty on purpose } currentPdfReaderInstance = reader . getPdfRead...
public class CoreUtils { /** * Return the local hostname , if it ' s resolvable . If not , * return the IPv4 address on the first interface we find , if it exists . * If not , returns whatever address exists on the first interface . * @ return the String representation of some valid host or IP address , * if we...
final InetAddress addr = m_localAddressSupplier . get ( ) ; if ( addr == null ) return "" ; return ReverseDNSCache . hostnameOrAddress ( addr ) ;
public class ArtifactFactoryConfig { /** * Returns the factory instance . If it does not exist , it will be created . Requires that { @ link # init ( SrcGen4JContext , Map ) } was called * once before . * @ return Factory . */ @ NotNull public final ArtifactFactory < ? > getFactory ( ) { } }
if ( factory == null ) { if ( factoryClassName == null ) { throw new IllegalStateException ( "Factory class name was not set: " + artifact ) ; } if ( context == null ) { throw new IllegalStateException ( "Context class loader was not set: " + artifact ) ; } final Object obj = Utils4J . createInstance ( factoryClassName...
public class TimeParametersImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setWaitTime ( Parameter newWaitTime ) { } }
if ( newWaitTime != waitTime ) { NotificationChain msgs = null ; if ( waitTime != null ) msgs = ( ( InternalEObject ) waitTime ) . eInverseRemove ( this , EOPPOSITE_FEATURE_BASE - BpsimPackage . TIME_PARAMETERS__WAIT_TIME , null , msgs ) ; if ( newWaitTime != null ) msgs = ( ( InternalEObject ) newWaitTime ) . eInverse...
public class Span { /** * Returns a Span that covers all columns beginning with a row and { @ link Column } prefix . The * { @ link Column } passed to this method can be constructed without a qualifier or visibility to * create a prefix Span at the family or qualifier level . String parameters will be encoded as ...
Objects . requireNonNull ( row ) ; Objects . requireNonNull ( colPrefix ) ; return prefix ( Bytes . of ( row ) , colPrefix ) ;
public class MediaSessionReceiver { /** * Propagate lock screen event to the player . * @ param context context used to start service . * @ param action action to send . */ private void sendAction ( Context context , String action ) { } }
Intent intent = new Intent ( context , PlaybackService . class ) ; intent . setAction ( action ) ; LocalBroadcastManager . getInstance ( context ) . sendBroadcast ( intent ) ;
public class Parser { /** * Set the " state object " from the parser ( can be used to parse state between parser functions ) . * @ param state * The state object . * @ return The old value of the state object . */ public Object setState ( final Object state ) { } }
final Object oldState = this . state ; this . state = state ; return oldState ;
public class FacesConfigDefaultValidatorsTypeImpl { /** * Creates for all String objects representing < code > validator - id < / code > elements , * a new < code > validator - id < / code > element * @ param values list of < code > validator - id < / code > objects * @ return the current instance of < code > Fac...
if ( values != null ) { for ( String name : values ) { childNode . createChild ( "validator-id" ) . text ( name ) ; } } return this ;
public class IOUtil { /** * 简单写入String到OutputStream . */ public static void write ( final String data , final OutputStream output ) throws IOException { } }
if ( data != null ) { output . write ( data . getBytes ( Charsets . UTF_8 ) ) ; }
public class Log { /** * / * package */ static boolean isLoggingEnabled ( String tag , int logLevel ) { } }
// this hashmap lookup might be a little expensive , and so it might make // sense to convert this over to a CopyOnWriteArrayList Integer logLevelForTag = enabledTags . get ( tag ) ; return logLevel >= ( logLevelForTag == null ? INFO : logLevelForTag ) ;
public class Multimap { /** * Returns the total count of all the elements in all values . * @ return */ public int totalCountOfValues ( ) { } }
int count = 0 ; for ( V v : valueMap . values ( ) ) { count += v . size ( ) ; } return count ;
public class JSONUtil { /** * 美化传入的json , 使得该json字符串容易查看 * @ param jsonString 需要处理的json串 * @ return 美化后的json串 */ public static String prettyFormatJson ( String jsonString ) { } }
requireNonNull ( jsonString , "jsonString is null" ) ; return JSON . toJSONString ( getJSONFromString ( jsonString ) , true ) ;
public class CmsWorkplaceConfiguration { /** * Sets the generated workplace manager . < p > * @ param manager the workplace manager to set */ public void setWorkplaceManager ( CmsWorkplaceManager manager ) { } }
m_workplaceManager = manager ; if ( CmsLog . INIT . isInfoEnabled ( ) ) { CmsLog . INIT . info ( Messages . get ( ) . getBundle ( ) . key ( Messages . INIT_WORKPLACE_INIT_FINISHED_0 ) ) ; }
public class PdfStamper { /** * Adds a file attachment at the document level . Existing attachments will be kept . * @ param description the file description * @ param fileStore an array with the file . If it ' s < CODE > null < / CODE > * the file will be read from the disk * @ param file the path to the file ...
addFileAttachment ( description , PdfFileSpecification . fileEmbedded ( stamper , file , fileDisplay , fileStore ) ) ;
public class PackageTypeLoader { /** * { @ inheritDoc } */ public Type < T > loadType ( String className ) { } }
for ( String packageName : packages ) { Type < T > type = parent . loadType ( packageName + className ) ; if ( type != null ) return type ; } return null ;
public class Importer { private void addAction ( NamedParameterStatement nps , Map < String , String > keysToColumns , Map < String , Object > [ ] maps ) throws SQLException { } }
Map < String , Object > params = new HashMap < > ( ) ; for ( Map . Entry < String , String > entry : keysToColumns . entrySet ( ) ) { for ( Map < String , Object > map : maps ) { if ( map . containsKey ( entry . getKey ( ) ) ) { params . put ( entry . getValue ( ) , map . get ( entry . getKey ( ) ) ) ; break ; } } } if...
public class AbstractSamlProfileHandlerController { /** * Log cas validation assertion . * @ param assertion the assertion */ protected void logCasValidationAssertion ( final Assertion assertion ) { } }
LOGGER . debug ( "CAS Assertion Valid: [{}]" , assertion . isValid ( ) ) ; LOGGER . debug ( "CAS Assertion Principal: [{}]" , assertion . getPrincipal ( ) . getName ( ) ) ; LOGGER . debug ( "CAS Assertion authentication Date: [{}]" , assertion . getAuthenticationDate ( ) ) ; LOGGER . debug ( "CAS Assertion ValidFrom Da...
public class EasyGcm { /** * Removes the current registration id effectively forcing the app to register again . * @ param context application ' s context . */ public static void removeRegistrationId ( Context context ) { } }
final SharedPreferences prefs = getGcmPreferences ( context ) ; prefs . edit ( ) . remove ( PROPERTY_REG_ID ) . remove ( PROPERTY_APP_VERSION ) . apply ( ) ;
public class CmdLineProcessor { /** * Add a { @ linkplain CmdLineAction } for switch argument ( { @ code e . g . - - switch } ) processing . * @ param action The { @ linkplain Consumer } to invoke with the argument string . * @ return The created { @ linkplain CmdLineAction } . */ public CmdLineAction onSwitch ( Co...
SwitchCmdLineAction switchAction = new SwitchCmdLineAction ( action ) ; this . switchActions . add ( switchAction ) ; return switchAction ;
public class CrumbIssuer { /** * Get a crumb from a request parameter and validate it against other data * in the current request . The salt and request parameter that is used is * defined by the current configuration . * @ param request */ public boolean validateCrumb ( ServletRequest request ) { } }
CrumbIssuerDescriptor < CrumbIssuer > desc = getDescriptor ( ) ; String crumbField = desc . getCrumbRequestField ( ) ; String crumbSalt = desc . getCrumbSalt ( ) ; return validateCrumb ( request , crumbSalt , request . getParameter ( crumbField ) ) ;
public class CmsSearchIndexSource { /** * Sets the class name of the indexer . < p > * An Exception is thrown to allow GUI - display of wrong input . < p > * @ param indexerClassName the class name of the indexer * @ throws CmsIllegalArgumentException if the given String is not a fully qualified classname ( withi...
try { m_indexer = ( I_CmsIndexer ) Class . forName ( indexerClassName ) . newInstance ( ) ; m_indexerClassName = indexerClassName ; } catch ( Exception exc ) { if ( LOG . isWarnEnabled ( ) ) { LOG . warn ( Messages . get ( ) . getBundle ( ) . key ( Messages . LOG_INDEXER_CREATION_FAILED_1 , m_indexerClassName ) , exc )...
public class Examples { /** * / * retrieve individual mutualfunds sip */ public void getMFSIP ( KiteConnect kiteConnect ) throws KiteException , IOException { } }
System . out . println ( "mf sip: " + kiteConnect . getMFSIP ( "291156521960679" ) . instalments ) ;
public class Wildfly8PluginRegistry { /** * Creates the directory to use for the plugin registry . The location of * the plugin registry is in the Wildfly data directory . */ private static File getPluginDir ( ) { } }
String dataDirPath = System . getProperty ( "jboss.server.data.dir" ) ; // $ NON - NLS - 1 $ File dataDir = new File ( dataDirPath ) ; if ( ! dataDir . isDirectory ( ) ) { throw new RuntimeException ( "Failed to find WildFly data directory at: " + dataDirPath ) ; // $ NON - NLS - 1 $ } File pluginsDir = new File ( data...
public class DiskInfoMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DiskInfo diskInfo , ProtocolMarshaller protocolMarshaller ) { } }
if ( diskInfo == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( diskInfo . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( diskInfo . getPath ( ) , PATH_BINDING ) ; protocolMarshaller . marshall ( diskInfo . getSizeInGb ( ) ,...
public class AbstractCommandBuilder { /** * Resolves the path relative to the parent and normalizes it . * @ param parent the parent path * @ param path the path * @ return the normalized path */ protected Path normalizePath ( final Path parent , final String path ) { } }
return parent . resolve ( path ) . toAbsolutePath ( ) . normalize ( ) ;
public class CheckStateDrawable { /** * Set the Tint ColorStateList * @ param tintStateList ColorStateList */ public void setColorStateList ( ColorStateList tintStateList ) { } }
if ( tintStateList == null ) tintStateList = ColorStateList . valueOf ( Color . BLACK ) ; mColorStateList = tintStateList ; onStateChange ( getState ( ) ) ;