signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class Reflections { /** * Checks if the given type is fully resolved . */ public static boolean isResolved ( Type type ) { } }
if ( type instanceof GenericArrayType ) { return isResolved ( ( ( GenericArrayType ) type ) . getGenericComponentType ( ) ) ; } if ( type instanceof ParameterizedType ) { for ( Type t : ( ( ParameterizedType ) type ) . getActualTypeArguments ( ) ) { if ( ! isResolved ( t ) ) { return false ; } } return true ; } return ...
public class CycledLeScanner { /** * Tells the cycler the scan rate and whether it is in operating in background mode . * Background mode flag is used only with the Android 5.0 scanning implementations to switch * between LOW _ POWER _ MODE vs . LOW _ LATENCY _ MODE * @ param backgroundFlag */ @ MainThread public...
LogManager . d ( TAG , "Set scan periods called with %s, %s Background mode must have changed." , scanPeriod , betweenScanPeriod ) ; if ( mBackgroundFlag != backgroundFlag ) { mRestartNeeded = true ; } mBackgroundFlag = backgroundFlag ; mScanPeriod = scanPeriod ; mBetweenScanPeriod = betweenScanPeriod ; if ( mBackgroun...
public class Bits { /** * Reads an int from a buffer . * @ param buf the buffer * @ return the int read from the buffer */ public static int readInt ( ByteBuffer buf ) { } }
byte len = buf . get ( ) ; if ( len == 0 ) return 0 ; return makeInt ( buf , len ) ;
public class CopyToModule { /** * Copy files and replace workdir PI contents . * @ param src source URI in temporary directory * @ param target target URI in temporary directory * @ param copytoTargetFilename target URI relative to temporary directory * @ param inputMapInTemp input map URI in temporary director...
assert src . isAbsolute ( ) ; assert target . isAbsolute ( ) ; assert ! copytoTargetFilename . isAbsolute ( ) ; assert inputMapInTemp . isAbsolute ( ) ; final File workdir = new File ( target ) . getParentFile ( ) ; if ( ! workdir . exists ( ) && ! workdir . mkdirs ( ) ) { logger . error ( "Failed to create copy-to tar...
public class JMXetricXmlConfigurationService { /** * Makes a list of { @ link MBeanAttribute } that corresponds to an < attribute > * node that contains multiple < composite > nodes . * @ param attr * the < attribute > node * @ param mBeanName * name of the parent mbean * @ param mBeanPublishName * publis...
List < MBeanAttribute > mbas = new Vector < MBeanAttribute > ( ) ; MBeanAttribute mba = null ; NodeList composites = getXmlNodeSet ( "composite" , attr ) ; String name = selectParameterFromNode ( attr , "name" , "NULL" ) ; for ( int l = 0 ; l < composites . getLength ( ) ; l ++ ) { Node composite = composites . item ( ...
public class NlsBundleFactoryGenerator { /** * Generates the { @ code createBundle } method . * @ param sourceWriter is the { @ link SourceWriter } . * @ param logger is the { @ link TreeLogger } . * @ param context is the { @ link GeneratorContext } . */ protected void generateMethodCreateBundle ( SourceWriter s...
// method declaration sourceWriter . print ( "public <BUNDLE extends " ) ; sourceWriter . print ( NlsBundle . class . getSimpleName ( ) ) ; sourceWriter . println ( "> BUNDLE createBundle(Class<BUNDLE> bundleInterface) {" ) ; sourceWriter . indent ( ) ; // method body sourceWriter . println ( "BUNDLE bundle = getBundle...
public class Type { /** * Returns the descriptor corresponding to this type . * @ return the descriptor corresponding to this type . */ public String getDescriptor ( ) { } }
if ( sort == OBJECT ) { return valueBuffer . substring ( valueBegin - 1 , valueEnd + 1 ) ; } else if ( sort == INTERNAL ) { StringBuilder stringBuilder = new StringBuilder ( ) ; stringBuilder . append ( 'L' ) ; stringBuilder . append ( valueBuffer , valueBegin , valueEnd ) ; stringBuilder . append ( ';' ) ; return stri...
public class ZealotKhala { /** * 根据指定的模式字符串生成带 " AND " 前缀的 " NOT LIKE " 模糊查询的SQL片段 . * < p > 示例 : 传入 { " b . title " , " Java % " } 两个参数 , 生成的SQL片段为 : " AND b . title NOT LIKE ' Java % ' " < / p > * @ param field 数据库字段 * @ param pattern 模式字符串 * @ return ZealotKhala实例 */ public ZealotKhala andNotLikePattern ( St...
return this . doLikePattern ( ZealotConst . AND_PREFIX , field , pattern , true , false ) ;
public class Span { /** * Returns a Span that covers all rows beginning with a prefix . */ public static Span prefix ( Bytes rowPrefix ) { } }
Objects . requireNonNull ( rowPrefix ) ; Bytes fp = followingPrefix ( rowPrefix ) ; return new Span ( rowPrefix , true , fp == null ? Bytes . EMPTY : fp , false ) ;
public class UserDictionary { /** * Lookup words in text * @ param text text to look up user dictionary matches for * @ return list of UserDictionaryMatch , not null */ public List < UserDictionaryMatch > findUserDictionaryMatches ( String text ) { } }
List < UserDictionaryMatch > matchInfos = new ArrayList < > ( ) ; int startIndex = 0 ; while ( startIndex < text . length ( ) ) { int matchLength = 0 ; while ( startIndex + matchLength < text . length ( ) && entries . containsKeyPrefix ( text . substring ( startIndex , startIndex + matchLength + 1 ) ) ) { matchLength +...
public class ProxyDataSourceBuilder { /** * Register { @ link CommonsSlowQueryListener } . * @ param thresholdTime slow query threshold time * @ param timeUnit slow query threshold time unit * @ return builder * @ since 1.4.1 */ public ProxyDataSourceBuilder logSlowQueryByCommons ( long thresholdTime , TimeUnit...
return logSlowQueryByCommons ( thresholdTime , timeUnit , null , null ) ;
public class IdType { /** * Creates a new instance of this ID which is identical , but refers to the * specific version of this resource ID noted by theVersion . * @ param theVersion * The actual version string , e . g . " 1" * @ return A new instance of IdType which is identical , but refers to the * specifi...
Validate . notBlank ( theVersion , "Version may not be null or empty" ) ; String existingValue = getValue ( ) ; int i = existingValue . indexOf ( "_history" ) ; String value ; if ( i > 1 ) { value = existingValue . substring ( 0 , i - 1 ) ; } else { value = existingValue ; } return new IdType ( value + '/' + "_history"...
public class OperationsInner { /** * Gets a list of compute operations . * @ param serviceCallback the async ServiceCallback to handle successful and failed responses . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the { @ link ServiceFuture } object */ public ServiceFutu...
return ServiceFuture . fromResponse ( listWithServiceResponseAsync ( ) , serviceCallback ) ;
public class GoogleAnalyticsUnsampledExtractor { /** * Copy WorkUnitState so that work unit also contains job state . FileBasedExtractor needs properties from job state ( mostly source . * properties ) , * where it has been already removed when reached here . * @ param src * @ return */ private WorkUnitState copy...
WorkUnit copiedWorkUnit = WorkUnit . copyOf ( src . getWorkunit ( ) ) ; copiedWorkUnit . addAllIfNotExist ( src . getJobState ( ) ) ; WorkUnitState workUnitState = new WorkUnitState ( copiedWorkUnit , src . getJobState ( ) ) ; workUnitState . addAll ( src ) ; return workUnitState ;
public class ReadWriteLockPoint { /** * To call when the thread leaves the read mode and release this lock point . */ public void endRead ( ) { } }
SynchronizationPoint < NoException > sp ; synchronized ( this ) { // if others are still reading , nothing to do if ( -- readers > 0 ) return ; // if nobody is waiting to write , nothing to do if ( writersWaiting == null ) return ; sp = writersWaiting . removeFirst ( ) ; if ( writersWaiting . isEmpty ( ) ) writersWaiti...
public class CouchDBSchemaManager { /** * Drop database . * @ throws IOException * Signals that an I / O exception has occurred . * @ throws ClientProtocolException * the client protocol exception * @ throws URISyntaxException * the URI syntax exception */ private void dropDatabase ( ) throws IOException , ...
HttpResponse delRes = null ; try { URI uri = new URI ( CouchDBConstants . PROTOCOL , null , httpHost . getHostName ( ) , httpHost . getPort ( ) , CouchDBConstants . URL_SEPARATOR + databaseName . toLowerCase ( ) , null , null ) ; HttpDelete delete = new HttpDelete ( uri ) ; delRes = httpClient . execute ( httpHost , de...
public class SecurityConstraintCollectionImpl { /** * { @ inheritDoc } */ @ Override public MatchResponse getMatchResponse ( String resourceName , String method ) { } }
if ( securityConstraints == null || securityConstraints . isEmpty ( ) ) { return MatchResponse . NO_MATCH_RESPONSE ; } return MatchingStrategy . match ( this , resourceName , method ) ;
public class ClinicalMongoDBAdaptor { private QueryResult getClinvarPhenotypeGeneRelations ( QueryOptions queryOptions ) { } }
List < Bson > pipeline = new ArrayList < > ( ) ; pipeline . add ( new Document ( "$match" , new Document ( "clinvarSet.referenceClinVarAssertion.clinVarAccession.acc" , new Document ( "$exists" , 1 ) ) ) ) ; // pipeline . add ( new Document ( " $ match " , new Document ( " clinvarSet " , new Document ( " $ exists " , 1...
public class ProvFactory { /** * Factory method to create an instance of the PROV - DM prov : value attribute ( see { @ link Value } ) . * Use class { @ link Name } for predefined { @ link QualifiedName } s for the common types . * @ param value an { @ link Object } * @ param type a { @ link QualifiedName } to de...
if ( value == null ) return null ; Value res = of . createValue ( ) ; res . setType ( type ) ; res . setValueFromObject ( value ) ; return res ;
public class JacksonDBCollection { /** * Inserts objects into the database . * if the objects _ id is null , one will be generated * you can get the _ id that were generated by calling getSavedObjects ( ) or getSavedIds ( ) on the result * @ param objects The objects to insert * @ param concern the write concer...
DBObject [ ] dbObjects = convertToDbObjects ( objects ) ; return new WriteResult < T , K > ( this , dbCollection . insert ( concern , dbObjects ) , dbObjects ) ;
public class DefaultDirectSuperclasses { /** * Get the direct superclasses of a class . * This is complicated , and possibly evil : in dylan , any class * which does not have another direct superclass extends Object . * In java , interfaces do not extend Object , or any equivalent . * This implementation makes ...
if ( c . isPrimitive ( ) ) { return primitiveSuperclasses ( c ) ; } else if ( c . isArray ( ) ) { return arrayDirectSuperclasses ( 0 , c ) ; } else { List < Class < ? > > interfaces = Arrays . asList ( c . getInterfaces ( ) ) ; Class < ? > superclass = c . getSuperclass ( ) ; if ( c == Object . class ) { return Immutab...
public class Assert { /** * Asserts that a confirmation present on the page has content matching the * expected text . This information will be logged and recorded , with a * screenshot for traceability and added debugging support . * @ param expectedConfirmationPattern the expected text of the confirmation */ @ ...
String confirmation = checkConfirmationMatches ( expectedConfirmationPattern , 0 , 0 ) ; assertTrue ( "Confirmation Text Mismatch: confirmation text of '" + confirmation + DOES_NOT_MATCH_PATTERN + expectedConfirmationPattern + "'" , confirmation . matches ( expectedConfirmationPattern ) ) ;
public class AbstractMatcher { /** * Obtains all the matching resources that have a precise MatchType with the URIs of { @ code origin } . * @ param origins URIs to match * @ param type the MatchType we want to obtain * @ return a { @ link com . google . common . collect . Table } with the result of the matching ...
return listMatchesWithinRange ( origins , type , type ) ;
public class StringUtil { /** * HC specific settings , operands etc . use this method . * Creates an uppercase string from the given string . * @ param s the given string * @ return an uppercase string , or { @ code null } / empty if the string is { @ code null } / empty */ public static String upperCaseInternal ...
if ( isNullOrEmpty ( s ) ) { return s ; } return s . toUpperCase ( LOCALE_INTERNAL ) ;
public class ScopeUtil { /** * Creates a new event scope execution and moves existing event subscriptions to this new execution */ public static void createCopyOfSubProcessExecutionForCompensation ( ExecutionEntity subProcessExecution ) { } }
EventSubscriptionEntityManager eventSubscriptionEntityManager = Context . getCommandContext ( ) . getEventSubscriptionEntityManager ( ) ; List < EventSubscriptionEntity > eventSubscriptions = eventSubscriptionEntityManager . findEventSubscriptionsByExecutionAndType ( subProcessExecution . getId ( ) , "compensate" ) ; L...
public class Nbvcxz { /** * Gets the entropy from the number of guesses passed in . * @ param guesses a { @ code BigDecimal } representing the number of guesses . * @ return entropy { @ code Double } that is calculated based on the guesses . */ public static Double getEntropyFromGuesses ( final BigDecimal guesses )...
Double guesses_tmp = guesses . doubleValue ( ) ; guesses_tmp = guesses_tmp . isInfinite ( ) ? Double . MAX_VALUE : guesses_tmp ; return Math . log ( guesses_tmp ) / Math . log ( 2 ) ;
public class Main { /** * Function to sum two integers num1 and num2. * Examples : * sumTwoNumbers ( 2 , 3 ) ; returns 5 * sumTwoNumbers ( 5 , 7 ) ; returns 12 * @ param num1 The first number . * @ param num2 The second number . * @ return The sum of num1 and num2 */ public static int sumTwoNumbers ( int nu...
return num1 + num2 ;
public class DoubleStream { /** * Returns a stream consisting of the results of replacing each element of * this stream with the contents of a mapped stream produced by applying * the provided mapping function to each element . * < p > This is an intermediate operation . * < p > Example : * < pre > * mapper...
return new DoubleStream ( params , new DoubleFlatMap ( iterator , mapper ) ) ;
public class DependencyBuilder { /** * @ param identifier of the form " groupId : artifactId " , " groupId : artifactId : version " , " groupId : artifactId : scope , " * groupId : artifactId : version : scope " , " groupId : artifactId : version : scope : packaging " * For classifier specification , see { @ link #...
DependencyBuilder dependencyBuilder = new DependencyBuilder ( ) ; if ( identifier != null ) { String [ ] split = identifier . split ( ":" ) ; if ( split . length > 0 ) { dependencyBuilder . setGroupId ( split [ 0 ] . trim ( ) ) ; } if ( split . length > 1 ) { dependencyBuilder . setArtifactId ( split [ 1 ] . trim ( ) )...
public class ConnectionUtil { /** * this is useful if we want to test the connection */ public static Connection createTempConnection ( StorageService storageService , final DataSource dataSource ) throws RepositoryException { } }
if ( DataSource . JNDI_VENDOR . equals ( dataSource . getVendor ( ) ) ) { return getJNDIConnection ( storageService , dataSource ) ; } final String driver = dataSource . getDriver ( ) ; try { Class . forName ( driver ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; LOG . error ( e . getMessage ( ) , e ) ; throw ...
public class CodepointHelper { /** * Verifies a sequence of codepoints using the specified profile * @ param aArray * char array * @ param eProfile * profile to use */ public static void verify ( @ Nullable final char [ ] aArray , @ Nonnull final ECodepointProfile eProfile ) { } }
if ( aArray != null ) verify ( new CodepointIteratorCharArray ( aArray ) , eProfile ) ;
public class Utils { /** * This sets up a search view to use Calendar ' s search suggestions provider * and to allow refining the search . * @ param view The { @ link android . widget . SearchView } to set up * @ param act The activity using the view */ public static void setUpSearchView ( SearchView view , Activ...
SearchManager searchManager = ( SearchManager ) act . getSystemService ( Context . SEARCH_SERVICE ) ; view . setSearchableInfo ( searchManager . getSearchableInfo ( act . getComponentName ( ) ) ) ; view . setQueryRefinementEnabled ( true ) ;
public class PipelineInterpreter { /** * Evaluates all pipelines that apply to the given messages , based on the current stream routing * of the messages . * The processing loops on each single message ( passed in or created by pipelines ) until the set * of streams does not change anymore . No cycle detection is...
interpreterListener . startProcessing ( ) ; // message id + stream id final Set < Tuple2 < String , String > > processingBlacklist = Sets . newHashSet ( ) ; final List < Message > toProcess = Lists . newArrayList ( messages ) ; final List < Message > fullyProcessed = Lists . newArrayListWithExpectedSize ( toProcess . s...
public class ScorecardPMMLUtils { public static String getExtensionValue ( List extensions , String extensionName ) { } }
for ( Object obj : extensions ) { if ( obj instanceof Extension ) { Extension extension = ( Extension ) obj ; if ( extensionName . equalsIgnoreCase ( extension . getName ( ) ) ) { return extension . getValue ( ) ; } } } return null ;
public class CmsDefaultPageEditor { /** * Performs the cleanup body action of the editor . < p > */ public void actionCleanupBodyElement ( ) { } }
try { // save eventually changed content of the editor to the temporary file Locale oldLocale = CmsLocaleManager . getLocale ( getParamOldelementlanguage ( ) ) ; performSaveContent ( getParamOldelementname ( ) , oldLocale ) ; } catch ( CmsException e ) { // show error page try { showErrorPage ( this , e ) ; } catch ( J...
public class NettyMessagingService { /** * Executes the given callback on a transient connection . * @ param address the connection address * @ param callback the callback to execute * @ param executor an executor on which to complete the callback future * @ param < T > the callback response type */ private < T...
CompletableFuture < T > future = new CompletableFuture < > ( ) ; if ( address . equals ( returnAddress ) ) { callback . apply ( localConnection ) . whenComplete ( ( result , error ) -> { if ( error == null ) { executor . execute ( ( ) -> future . complete ( result ) ) ; } else { executor . execute ( ( ) -> future . com...
public class AbstractJRebirthPreloader { /** * Gets the message from code . * @ param messageCode the message code * @ return the message from code */ private String getMessageFromCode ( final int messageCode ) { } }
String res = "" ; switch ( messageCode ) { case 100 : res = "Initializing" ; break ; case 200 : res = "" ; // Provisioned for custom pre - init task break ; case 300 : res = "" ; // Provisioned for custom pre - init task break ; case 400 : res = "Loading Messages Properties" ; break ; case 500 : res = "Loading Paramete...
public class ExpirationManager { /** * Starts scheduling of the task that clears expired entries . * Calling this method multiple times has same effect . */ public void scheduleExpirationTask ( ) { } }
if ( nodeEngine . getLocalMember ( ) . isLiteMember ( ) || scheduled . get ( ) || ! scheduled . compareAndSet ( false , true ) ) { return ; } scheduledExpirationTask = globalTaskScheduler . scheduleWithRepetition ( task , taskPeriodSeconds , taskPeriodSeconds , SECONDS ) ; scheduledOneTime . set ( true ) ;
public class TransactionGeomIndex { public Geometry getGeometry ( FeatureTransaction featureTransaction ) { } }
if ( featureIndex >= 0 && featureTransaction . getNewFeatures ( ) != null && featureTransaction . getNewFeatures ( ) . length > featureIndex ) { return featureTransaction . getNewFeatures ( ) [ featureIndex ] . getGeometry ( ) ; } return null ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcCurveStyleFontAndScaling ( ) { } }
if ( ifcCurveStyleFontAndScalingEClass == null ) { ifcCurveStyleFontAndScalingEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 166 ) ; } return ifcCurveStyleFontAndScalingEClass ;
public class JinjavaInterpreter { /** * Resolve a variable from the interpreter context , returning null if not found . This method updates the template error accumulators when a variable is not found . * @ param variable * name of variable in context * @ param lineNumber * current line number , for error repor...
if ( StringUtils . isBlank ( variable ) ) { return "" ; } Variable var = new Variable ( this , variable ) ; String varName = var . getName ( ) ; Object obj = context . get ( varName ) ; if ( obj != null ) { if ( obj instanceof DeferredValue ) { throw new DeferredValueException ( variable , lineNumber , startPosition ) ...
public class Mail { /** * Add a custom argument to the email . * @ param key argument ' s key . * @ param value the argument ' s value . */ public void addCustomArg ( String key , String value ) { } }
this . customArgs = addToMap ( key , value , this . customArgs ) ;
public class Capacity { /** * return the next power of two after @ param capacity or * capacity if it is already */ public static int getCapacity ( int capacity ) { } }
int c = 1 ; if ( capacity >= MAX_POWER2 ) { c = MAX_POWER2 ; } else { while ( c < capacity ) c <<= 1 ; } if ( isPowerOf2 ( c ) ) { return c ; } else { throw new RuntimeException ( "Capacity is not a power of 2." ) ; }
public class ApiOvhPackxdsl { /** * Get resiliation terms * REST : GET / pack / xdsl / { packName } / resiliationTerms * @ param resiliationDate [ required ] The desired resiliation date * @ param packName [ required ] The internal name of your pack */ public OvhResiliationTerms packName_resiliationTerms_GET ( St...
String qPath = "/pack/xdsl/{packName}/resiliationTerms" ; StringBuilder sb = path ( qPath , packName ) ; query ( sb , "resiliationDate" , resiliationDate ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhResiliationTerms . class ) ;
public class ExpressionsParser { /** * P1 */ Rule level1ExpressionChaining ( ) { } }
return Sequence ( primaryExpression ( ) . label ( "head" ) , set ( ) , ZeroOrMore ( FirstOf ( arrayAccessOperation ( ) . label ( "arrayAccess" ) , methodInvocationWithTypeArgsOperation ( ) . label ( "methodInvocation" ) , select ( ) . label ( "select" ) ) ) , set ( actions . createLevel1Expression ( node ( "head" ) , n...
public class NotificationBoard { /** * Set the x location of pivot point around which this board is rotated . * @ param x */ public void setBoardPivotX ( float x ) { } }
if ( mListeners != null ) { for ( StateListener l : mListeners ) { l . onBoardPivotX ( this , x ) ; } } mContentView . setPivotX ( x ) ;
public class DbSqlSession { /** * delete / / / / / */ @ Override protected void deleteEntity ( DbEntityOperation operation ) { } }
final DbEntity dbEntity = operation . getEntity ( ) ; // get statement String deleteStatement = dbSqlSessionFactory . getDeleteStatement ( dbEntity . getClass ( ) ) ; ensureNotNull ( "no delete statement for " + dbEntity . getClass ( ) + " in the ibatis mapping files" , "deleteStatement" , deleteStatement ) ; LOG . exe...
public class SftpFileAttributes { /** * Set the permissions from a string in the format " rwxr - xr - x " * @ param newPermissions */ public void setPermissions ( String newPermissions ) { } }
int cp = 0 ; if ( permissions != null ) { cp = cp | ( ( ( permissions . longValue ( ) & S_IFMT ) == S_IFMT ) ? S_IFMT : 0 ) ; cp = cp | ( ( ( permissions . longValue ( ) & S_IFSOCK ) == S_IFSOCK ) ? S_IFSOCK : 0 ) ; cp = cp | ( ( ( permissions . longValue ( ) & S_IFLNK ) == S_IFLNK ) ? S_IFLNK : 0 ) ; cp = cp | ( ( ( p...
public class CameraEncoder { /** * Apply a filter to the camera input * @ param filter */ public void applyFilter ( int filter ) { } }
Filters . checkFilterArgument ( filter ) ; mDisplayRenderer . changeFilterMode ( filter ) ; synchronized ( mReadyForFrameFence ) { mNewFilter = filter ; }
public class WebSocketClientHandshaker { /** * Validates and finishes the opening handshake initiated by { @ link # handshake } } . * @ param channel * Channel * @ param response * HTTP response containing the closing handshake details */ public final void finishHandshake ( Channel channel , FullHttpResponse re...
verify ( response ) ; // Verify the subprotocol that we received from the server . // This must be one of our expected subprotocols - or null / empty if we didn ' t want to speak a subprotocol String receivedProtocol = response . headers ( ) . get ( HttpHeaderNames . SEC_WEBSOCKET_PROTOCOL ) ; receivedProtocol = receiv...
public class FileUtil { /** * write the content to a file ; * @ param output * @ param content * @ throws Exception */ public static void createFile ( String output , String content ) throws Exception { } }
OutputStreamWriter fw = null ; PrintWriter out = null ; try { if ( ENCODING == null ) ENCODING = PropsUtil . ENCODING ; fw = new OutputStreamWriter ( new FileOutputStream ( output ) , ENCODING ) ; out = new PrintWriter ( fw ) ; out . print ( content ) ; } catch ( Exception ex ) { throw new Exception ( ex ) ; } finally ...
public class CreateRouteRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CreateRouteRequest createRouteRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( createRouteRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( createRouteRequest . getApiId ( ) , APIID_BINDING ) ; protocolMarshaller . marshall ( createRouteRequest . getApiKeyRequired ( ) , APIKEYREQUIRED_BINDING ) ; protocol...
public class NetworkInterfacesInner { /** * Get the specified network interface ip configuration in a virtual machine scale set . * @ param resourceGroupName The name of the resource group . * @ param virtualMachineScaleSetName The name of the virtual machine scale set . * @ param virtualmachineIndex The virtual ...
ServiceResponse < Page < NetworkInterfaceIPConfigurationInner > > response = listVirtualMachineScaleSetIpConfigurationsSinglePageAsync ( resourceGroupName , virtualMachineScaleSetName , virtualmachineIndex , networkInterfaceName , expand ) . toBlocking ( ) . single ( ) ; return new PagedList < NetworkInterfaceIPConfigu...
public class JMainScreen { /** * Push this command onto the history stack . * NOTE : Do not use this method in most cases , use the method in BaseApplet . * @ param strHistory The history command to push onto the stack . */ public void pushHistory ( String strHistory ) { } }
if ( m_vHistory == null ) m_vHistory = new Vector < String > ( ) ; m_vHistory . addElement ( strHistory ) ;
public class DefaultExtensionRepositoryManager { /** * AdvancedSearchable */ @ Override public IterableResult < Extension > search ( ExtensionQuery query ) throws SearchException { } }
return RepositoryUtils . search ( query , this . repositories ) ;
public class Matcher { /** * Replaces every subsequence of the input sequence that matches the * pattern with the given replacement string . * < p > This method first resets this matcher . It then scans the input * sequence looking for matches of the pattern . Characters that are not * part of any match are app...
reset ( ) ; StringBuffer buffer = new StringBuffer ( input . length ( ) ) ; while ( find ( ) ) { appendReplacement ( buffer , replacement ) ; } return appendTail ( buffer ) . toString ( ) ;
public class DBIDUtil { /** * Compute the set intersection size of two sets . * @ param first First set * @ param second Second set * @ return size */ private static int internalIntersectionSize ( DBIDs first , DBIDs second ) { } }
second = second . size ( ) > 16 && ! ( second instanceof SetDBIDs ) ? newHashSet ( second ) : second ; int c = 0 ; for ( DBIDIter it = first . iter ( ) ; it . valid ( ) ; it . advance ( ) ) { if ( second . contains ( it ) ) { c ++ ; } } return c ;
public class MeterRegistry { /** * Register a custom meter type . * @ param id Id of the meter being registered . * @ param type Meter type , which may be used by naming conventions to normalize the name . * @ param measurements A sequence of measurements describing how to sample the meter . * @ return The regi...
return registerMeterIfNecessary ( Meter . class , id , id2 -> newMeter ( id2 , type , measurements ) , NoopMeter :: new ) ;
public class ProcessClosurePrimitives { /** * Verifies that setCssNameMapping is called with the correct methods . * @ return Whether the arguments checked out okay */ private boolean verifySetCssNameMapping ( Node methodName , Node firstArg ) { } }
DiagnosticType diagnostic = null ; if ( firstArg == null ) { diagnostic = NULL_ARGUMENT_ERROR ; } else if ( ! firstArg . isObjectLit ( ) ) { diagnostic = EXPECTED_OBJECTLIT_ERROR ; } else if ( firstArg . getNext ( ) != null ) { Node secondArg = firstArg . getNext ( ) ; if ( ! secondArg . isString ( ) ) { diagnostic = E...
public class _MethodExpressionToMethodBinding { /** * - - - - - StateHolder methods - - - - - */ public void restoreState ( FacesContext context , Object state ) { } }
if ( state != null ) { methodExpression = ( MethodExpression ) state ; }
public class CmsUserDataFormLayout { /** * Store fields to given user . < p > * @ param user User to write information to * @ param cms CmsObject * @ param afterWrite runnable which gets called after writing user */ public void submit ( CmsUser user , CmsObject cms , Runnable afterWrite ) { } }
submit ( user , cms , afterWrite , false ) ;
public class Iterate { /** * Returns a new collection with the results of applying the specified function for each element of the iterable . * Example using a Java 8 lambda expression : * < pre > * Collection & lt ; String & gt ; names = * Iterate . < b > collect < / b > ( people , person - > person . getFirstN...
if ( iterable instanceof MutableCollection ) { return ( ( MutableCollection < T > ) iterable ) . collect ( function ) ; } if ( iterable instanceof ArrayList ) { return ArrayListIterate . collect ( ( ArrayList < T > ) iterable , function ) ; } if ( iterable instanceof RandomAccess ) { return RandomAccessListIterate . co...
public class FastAdapterDiffUtil { /** * convenient function for { @ link # set ( FastItemAdapter , List , DiffCallback , boolean ) } * @ return the adapter to allow chaining */ public static < A extends FastItemAdapter < Item > , Item extends IItem > A set ( final A adapter , DiffUtil . DiffResult result ) { } }
set ( adapter . getItemAdapter ( ) , result ) ; return adapter ;
public class S3SignedObjectMarshaller { /** * Marshall the given parameter object . */ public void marshall ( S3SignedObject s3SignedObject , ProtocolMarshaller protocolMarshaller ) { } }
if ( s3SignedObject == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( s3SignedObject . getBucketName ( ) , BUCKETNAME_BINDING ) ; protocolMarshaller . marshall ( s3SignedObject . getKey ( ) , KEY_BINDING ) ; } catch ( Exception e ) { throw ...
public class PApplicationException { /** * Exception message . * @ return Optional of the < code > message < / code > field value . */ @ javax . annotation . Nonnull public java . util . Optional < String > optionalMessage ( ) { } }
return java . util . Optional . ofNullable ( mMessage ) ;
public class PolicyChecker { /** * Initializes the internal state of the checker from parameters * specified in the constructor * @ param forward a boolean indicating whether this checker should be * initialized capable of building in the forward direction * @ throws CertPathValidatorException if user wants to ...
if ( forward ) { throw new CertPathValidatorException ( "forward checking not supported" ) ; } certIndex = 1 ; explicitPolicy = ( expPolicyRequired ? 0 : certPathLen + 1 ) ; policyMapping = ( polMappingInhibited ? 0 : certPathLen + 1 ) ; inhibitAnyPolicy = ( anyPolicyInhibited ? 0 : certPathLen + 1 ) ;
public class MapUtil { /** * 将map转成字符串 * @ param < K > 键类型 * @ param < V > 值类型 * @ param map Map * @ param separator entry之间的连接符 * @ param keyValueSeparator kv之间的连接符 * @ return 连接字符串 * @ since 3.1.1 */ public static < K , V > String join ( Map < K , V > map , String separator , String keyValueSeparator ) ...
return join ( map , separator , keyValueSeparator , false ) ;
public class MathUtils { /** * Given a start and end and a number of steps this method generates a sequence of expontentially spaced integer * values , starting at the start ( inclusive ) and finishing at the end ( inclusive ) with the specified number of * values in the sequence . An exponentially spaced sequence ...
// Check that there are at least two steps . if ( steps < 2 ) { throw new IllegalArgumentException ( "There must be at least 2 steps." ) ; } List < Integer > result = new ArrayList < Integer > ( ) ; // Calculate the sequence using floating point , then round into the results . double fStart = start ; double fEnd = end ...
public class DefaultWhereClauseGenerator { /** * Explicitly disallow reflexivity . * Can be used if the other conditions allow reflexivity but the operator not . * It depends on the search conditions if two results are not equal . * < b > For two nodes ( including searches for token ) : < / b > < br / > * node ...
Validate . isTrue ( node != target , "notReflexive(...) implies that source " + "and target node are not the same, but someone is violating this constraint!" ) ; Validate . notNull ( node ) ; Validate . notNull ( target ) ; if ( node . getNodeAnnotations ( ) . isEmpty ( ) && target . getNodeAnnotations ( ) . isEmpty ( ...
public class ProtegeKnowledgeSourceBackend { /** * Returns the Cls from Protege if a matching Cls is found with the given * ancestor * @ param name Name of the class to fetch * @ param superClass name of the anscestor * @ return A Cls containing the given class name * @ throws KnowledgeSourceReadException */ ...
Cls cls = this . cm . getCls ( name ) ; Cls superCls = this . cm . getCls ( superClass ) ; if ( cls != null && cls . hasSuperclass ( superCls ) ) { return cls ; } else { return null ; }
public class EJBUtils { /** * Returns the ' methodId ' of the specified method , which is basically * the index of the method in the array of all methods . < p > * The methodId is ' hard coded ' into the generated code , and passed to * preInvoke , to allow the runtime to quickly associate the method * call wit...
int numMethods = allMethods . length ; for ( int i = startIndex ; i < numMethods ; ++ i ) { if ( methodsMatch ( method , allMethods [ i ] ) ) return i ; } // Search through from the beginning back to the starting point , // in case the method is on multiple interfaces , and thus may // be sorted in a different order in...
public class MySqlDdlParser { /** * { @ inheritDoc } * @ see org . modeshape . sequencer . ddl . StandardDdlParser # parseDropStatement ( org . modeshape . sequencer . ddl . DdlTokenStream , * org . modeshape . sequencer . ddl . node . AstNode ) */ @ Override protected AstNode parseDropStatement ( DdlTokenStream to...
assert tokens != null ; assert parentNode != null ; if ( tokens . matches ( STMT_DROP_DATABASE ) ) { return parseStatement ( tokens , STMT_DROP_DATABASE , parentNode , TYPE_DROP_DATABASE_STATEMENT ) ; } else if ( tokens . matches ( STMT_DROP_EVENT ) ) { return parseStatement ( tokens , STMT_DROP_EVENT , parentNode , TY...
public class FactoryDescribeImageDense { /** * Creates a dense HOG descriptor . * @ see DescribeDenseHogFastAlg * @ see DescribeDenseHogAlg * @ param config Configuration for HOG descriptor . Can ' t be null . * @ param imageType Type of input image . Can be single band or planar * @ return Dense HOG extracto...
if ( config == null ) config = new ConfigDenseHoG ( ) ; config . checkValidity ( ) ; ImageType actualType ; if ( imageType . getDataType ( ) != ImageDataType . F32 ) { actualType = new ImageType ( imageType . getFamily ( ) , ImageDataType . F32 , imageType . getNumBands ( ) ) ; } else { actualType = imageType ; } BaseD...
public class MapMessage { /** * Get the message data as a XML String . * @ return The XML String . */ public String getXML ( boolean bIncludeHeader ) { } }
StringBuffer sbXML = new StringBuffer ( ) ; String rootTag = ROOT_TAG ; if ( this . getMessageDataDesc ( null ) != null ) if ( this . getMessageDataDesc ( null ) . getKey ( ) != null ) rootTag = this . getMessageDataDesc ( null ) . getKey ( ) ; Util . addStartTag ( sbXML , rootTag ) . append ( Constant . RETURN ) ; Uti...
public class ScenarioParametersImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public NotificationChain basicSetDuration ( Parameter newDuration , NotificationChain msgs ) { } }
Parameter oldDuration = duration ; duration = newDuration ; if ( eNotificationRequired ( ) ) { ENotificationImpl notification = new ENotificationImpl ( this , Notification . SET , BpsimPackage . SCENARIO_PARAMETERS__DURATION , oldDuration , newDuration ) ; if ( msgs == null ) msgs = notification ; else msgs . add ( not...
public class JarVerifier { /** * true if file is part of the signature mechanism itself */ static boolean isSigningRelated ( String name ) { } }
name = name . toUpperCase ( Locale . ENGLISH ) ; if ( ! name . startsWith ( "META-INF/" ) ) { return false ; } name = name . substring ( 9 ) ; if ( name . indexOf ( '/' ) != - 1 ) { return false ; } if ( name . endsWith ( ".DSA" ) || name . endsWith ( ".RSA" ) || name . endsWith ( ".SF" ) || name . endsWith ( ".EC" ) |...
public class CmsJspActionElement { /** * Returns the HTML for an < code > & lt ; img src = " . . . " / & gt ; < / code > tag that includes the given image scaling parameters . < p > * @ param target the target URI of the file in the OpenCms VFS * @ param scaler the image scaler to use for scaling the image * @ pa...
try { return CmsJspTagImage . imageTagAction ( target , scaler , attributes , partialTag , getRequest ( ) ) ; } catch ( Throwable t ) { handleException ( t ) ; } CmsMessageContainer msgContainer = Messages . get ( ) . container ( Messages . GUI_ERR_IMG_SCALE_2 , target , scaler == null ? "null" : scaler . toString ( ) ...
public class ListProvisioningArtifactsForServiceActionResult { /** * An array of objects with information about product views and provisioning artifacts . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setProvisioningArtifactViews ( java . util . Collection ...
if ( this . provisioningArtifactViews == null ) { setProvisioningArtifactViews ( new java . util . ArrayList < ProvisioningArtifactView > ( provisioningArtifactViews . length ) ) ; } for ( ProvisioningArtifactView ele : provisioningArtifactViews ) { this . provisioningArtifactViews . add ( ele ) ; } return this ;
public class PriorityQueue { /** * Version of remove using reference equality , not equals . * Needed by iterator . remove . * @ param o element to be removed from this queue , if present * @ return { @ code true } if removed */ boolean removeEq ( Object o ) { } }
for ( int i = 0 ; i < size ; i ++ ) { if ( o == queue [ i ] ) { removeAt ( i ) ; return true ; } } return false ;
public class JCudaDriver { /** * Load a module ' s data with options . < br / > * < br / > * < b > Note < / b > : It is hardly possible to properly pass in the required * option values for this method . Thus , the arguments here must be < br / > * numOptions = 0 < br / > * options = new int [ 0 ] < br / > *...
// Although it should be possible to pass ' null ' for these parameters // when numOptions = = 0 , the driver crashes when they are ' null ' , so // they are replaced by non - null ( but empty ) arrays here . // Also see the corresponding notes in the native method . if ( numOptions == 0 ) { if ( options == null ) { op...
public class NumberPath { /** * Method to construct the equals expression for integer * @ param value the integer * @ return Expression */ public Expression < Integer > eq ( int value ) { } }
String valueString = "'" + value + "'" ; return new Expression < Integer > ( this , Operation . eq , valueString ) ;
public class StoriesBase { /** * Adds a comment to a task . The comment will be authored by the * currently authenticated user , and timestamped when the server receives * the request . * Returns the full record for the new story added to the task . * @ param task Globally unique identifier for the task . * @...
String path = String . format ( "/tasks/%s/stories" , task ) ; return new ItemRequest < Story > ( this , Story . class , path , "POST" ) ;
public class DestinationManager { /** * Method destinationExists * @ param addr * @ return boolean * @ throws SIMPNullParameterException * < p > This method returns true if the named destination is known in the * destination manager , otherwise it returns false . < / p > */ public boolean destinationExists ( ...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "destinationExists" , new Object [ ] { addr } ) ; // Now look for the destination in the hash table boolean exists = destinationExists ( addr . getDestinationName ( ) , addr . getBusName ( ) ) ; if ( TraceComponent . isAnyTr...
public class GeoJsonToAssembler { /** * Creates the correct TO starting from any geolatte geometry . * @ param geometry the geometry to convert * @ return a TO that , once serialized , results in a valid geoJSON representation of the geometry */ public GeoJsonTo toTransferObject ( Geometry geometry ) { } }
if ( geometry instanceof Point ) { return toTransferObject ( ( Point ) geometry ) ; } else if ( geometry instanceof LineString ) { return toTransferObject ( ( LineString ) geometry ) ; } else if ( geometry instanceof MultiPoint ) { return toTransferObject ( ( MultiPoint ) geometry ) ; } else if ( geometry instanceof Mu...
public class MainActivity { /** * Called when the activity is first created . */ @ Override public void onCreate ( Bundle savedInstanceState ) { } }
super . onCreate ( savedInstanceState ) ; setContentView ( R . layout . main ) ; final ActionBar ab = getSupportActionBar ( ) ; // set defaults for logo & home up ab . setDisplayHomeAsUpEnabled ( showHomeUp ) ; ab . setDisplayUseLogoEnabled ( useLogo ) ; // set up tabs nav for ( int i = 1 ; i < 4 ; i ++ ) { ab . addTab...
public class FactoryTrackerAlg { /** * Creates a { @ link KltTracker } . * NOTE : The pyramid ' s structure is determined by the input pyramid that is processed . * @ param config KLT configuration * @ param imageType Type of input image * @ param derivType Type of image derivative * @ param < I > Input image...
if ( config == null ) config = new KltConfig ( ) ; if ( derivType == null ) derivType = GImageDerivativeOps . getDerivativeType ( imageType ) ; InterpolateRectangle < I > interpInput = FactoryInterpolation . < I > bilinearRectangle ( imageType ) ; InterpolateRectangle < D > interpDeriv = FactoryInterpolation . < D > bi...
public class JmxExecRequest { /** * Conver string tags if required */ private static List < String > convertSpecialStringTags ( List < String > extraArgs ) { } }
if ( extraArgs == null ) { return null ; } List < String > args = new ArrayList < String > ( ) ; for ( String arg : extraArgs ) { args . add ( StringToObjectConverter . convertSpecialStringTags ( arg ) ) ; } return args ;
public class StringUtils { /** * Convert byte size into machine friendly format . * @ param size the human friendly byte size ( includes units ) * @ return a number of bytes * @ throws NumberFormatException if failed parse given size */ @ SuppressWarnings ( "fallthrough" ) public static long convertToMachineFrien...
double d ; try { d = Double . parseDouble ( size . replaceAll ( "[GMK]?[B]?$" , "" ) ) ; } catch ( NumberFormatException e ) { String msg = "Size must be specified as bytes (B), " + "kilobytes (KB), megabytes (MB), gigabytes (GB). " + "E.g. 1024, 1KB, 10M, 10MB, 100G, 100GB" ; throw new NumberFormatException ( msg + " ...
public class SipCall { /** * This method is equivalent to the basic respondToReinvite ( ) method except that it allows the * caller to specify additional JAIN - SIP API message headers to add to or replace in the outbound * message . Use of this method requires knowledge of the JAIN - SIP API . * NOTE : The addit...
initErrorInfo ( ) ; try { ContactHeader contact_hdr = null ; if ( newContact == null ) { contact_hdr = ( ContactHeader ) parent . getContactInfo ( ) . getContactHeader ( ) . clone ( ) ; } else { contact_hdr = parent . updateContactInfo ( newContact , displayName ) ; } if ( additionalHeaders == null ) additionalHeaders ...
public class PolynomialSolver { /** * A cubic polynomial of the form " f ( x ) = a + b * x + c * x < sup > 2 < / sup > + d * x < sup > 3 < / sup > " has * three roots . These roots will either be all real or one real and two imaginary . This function * will return a root which is always real . * WARNING : Not as ...
// normalize for numerical stability double norm = Math . max ( Math . abs ( a ) , Math . abs ( b ) ) ; norm = Math . max ( norm , Math . abs ( c ) ) ; norm = Math . max ( norm , Math . abs ( d ) ) ; a /= norm ; b /= norm ; c /= norm ; d /= norm ; // proceed with standard algorithm double insideLeft = 2 * c * c * c - 9...
public class CmsRepositoryManager { /** * Gets a list of the repositories for the given superclass . < p > * @ param cls the superclass * @ return the repositories for whose classes the given class is a superclass */ @ SuppressWarnings ( "unchecked" ) public < REPO extends I_CmsRepository > List < REPO > getReposit...
List < REPO > result = new ArrayList < REPO > ( ) ; for ( I_CmsRepository repo : m_repositoryMap . values ( ) ) { if ( cls . isInstance ( repo ) ) { result . add ( ( REPO ) repo ) ; } } return result ;
public class DirectoryConnection { /** * Generate the obfuscated auth data . * @ param userName * the user name . * @ param password * the password . * @ return * the AuthData . */ private AuthData generateDirectoryAuthData ( String userName , String password ) { } }
if ( password != null && ! password . isEmpty ( ) ) { byte [ ] secret = ObfuscatUtil . base64Encode ( password . getBytes ( ) ) ; return new AuthData ( AuthScheme . DIRECTORY , userName , secret , true ) ; } else { return new AuthData ( AuthScheme . DIRECTORY , userName , null , false ) ; }
public class ChemObjectRef { /** * { @ inheritDoc } */ @ Override public void setProperty ( Object description , Object property ) { } }
chemobj . setProperty ( description , property ) ;
public class SequencesUtils { /** * Used to write legacy file formats . * @ return Bit2Array representation of nucleotide sequence */ public static Bit2Array convertNSequenceToBit2Array ( NucleotideSequence seq ) { } }
if ( seq . containWildcards ( ) ) throw new IllegalArgumentException ( "Sequences with wildcards are not supported." ) ; Bit2Array bar = new Bit2Array ( seq . size ( ) ) ; for ( int i = 0 ; i < seq . size ( ) ; i ++ ) bar . set ( i , seq . codeAt ( i ) ) ; return bar ;
public class JsonRpcUtils { /** * Perform a HTTP PUT request . * @ param client * @ param url * @ param headers * @ param urlParams * @ param requestData * @ return * @ since 0.9.1.6 */ public static RequestResponse callHttpPut ( HttpJsonRpcClient client , String url , Map < String , Object > headers , Ma...
return client . doPut ( url , headers , urlParams , requestData ) ;
public class XmlUtil { /** * 根据节点名获得第一个子节点 * @ param element 节点 * @ param tagName 节点名 * @ return 节点 */ public static Element getElement ( Element element , String tagName ) { } }
final NodeList nodeList = element . getElementsByTagName ( tagName ) ; if ( nodeList == null || nodeList . getLength ( ) < 1 ) { return null ; } int length = nodeList . getLength ( ) ; for ( int i = 0 ; i < length ; i ++ ) { Element childEle = ( Element ) nodeList . item ( i ) ; if ( childEle == null || childEle . getP...
public class NativeInt8Array { /** * List implementation ( much of it handled by the superclass ) */ @ Override public Byte get ( int i ) { } }
if ( checkIndex ( i ) ) { throw new IndexOutOfBoundsException ( ) ; } return ( Byte ) js_get ( i ) ;
public class RoleGraphEditingPlugin { /** * If the mouse is pressed in an empty area , create a new vertex there . * If the mouse is pressed on an existing vertex , prepare to create * an edge from that vertex to another */ @ SuppressWarnings ( "unchecked" ) public void mousePressed ( MouseEvent e ) { } }
if ( checkModifiers ( e ) ) { final VisualizationViewer < String , String > vv = ( VisualizationViewer < String , String > ) e . getSource ( ) ; final Point2D p = e . getPoint ( ) ; GraphElementAccessor < String , String > pickSupport = vv . getPickSupport ( ) ; if ( pickSupport != null ) { final String vertex = pickSu...
public class OutSegment { /** * Syncs the segment to the disk . After the segment ' s data is synced , the * headers can be written . A second sync is needed to complete the header * writes . */ private void fsyncImpl ( Result < Boolean > result , FsyncType fsyncType ) { } }
try { flushData ( ) ; ArrayList < SegmentFsyncCallback > fsyncListeners = new ArrayList < > ( _fsyncListeners ) ; _fsyncListeners . clear ( ) ; Result < Boolean > resultNext = result . then ( ( v , r ) -> afterDataFsync ( r , _position , fsyncType , fsyncListeners ) ) ; if ( _isDirty || ! fsyncType . isSchedule ( ) ) {...
public class CDKAtomTypeMatcher { /** * Count the number of doubly bonded atoms . * @ param connectedBonds bonds connected to the atom * @ param atom the atom being looked at * @ param order the desired bond order of the attached bonds * @ param symbol If not null , then it only counts the double bonded atoms w...
// count the number of double bonded oxygens int neighborcount = connectedBonds . size ( ) ; int doubleBondedAtoms = 0 ; for ( int i = neighborcount - 1 ; i >= 0 ; i -- ) { IBond bond = connectedBonds . get ( i ) ; if ( bond . getOrder ( ) == order ) { if ( bond . getAtomCount ( ) == 2 ) { if ( symbol != null ) { // if...