signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class GrailsPlugin { /** * called by the modified code */ public static void recordInstance ( Object obj ) { } }
// obj will be a ClassPropertyFetcher instance System . err . println ( "new instance queued " + System . identityHashCode ( obj ) ) ; // TODO urgent - race condition here , can create Co - modification problem if adding whilst another thread is processing classPropertyFetcherInstances . add ( new WeakReference < Objec...
public class RubyObject { /** * Executes a method of any Object by Java reflection . * @ param o * an Object * @ param methodName * name of the method * @ param arg * a Byte * @ return the result of the method called */ public static < E > E send ( Object o , String methodName , Byte arg ) { } }
return send ( o , methodName , ( Object ) arg ) ;
public class CmsJspImageBean { /** * Returns a lazy initialized Map that provides access to width scaled instances of this image bean . < p > * @ return a lazy initialized Map that provides access to width scaled instances of this image bean */ public Map < String , CmsJspImageBean > getScaleWidth ( ) { } }
if ( m_scaleWidth == null ) { m_scaleWidth = CmsCollectionsGenericWrapper . createLazyMap ( new CmsScaleWidthTransformer ( ) ) ; } return m_scaleWidth ;
public class AddMessages { /** * Add BugCategory elements . * @ param bugCategorySet * all bug categories referenced in the BugCollection */ private void addBugCategories ( Set < String > bugCategorySet ) { } }
Element root = document . getRootElement ( ) ; for ( String category : bugCategorySet ) { Element element = root . addElement ( "BugCategory" ) ; element . addAttribute ( "category" , category ) ; Element description = element . addElement ( "Description" ) ; description . setText ( I18N . instance ( ) . getBugCategory...
public class AbstractCommand { /** * Performs initialisation and validation of this instance after its * dependencies have been set . If subclasses override this method , they * should begin by calling { @ code super . afterPropertiesSet ( ) } . */ public void afterPropertiesSet ( ) { } }
if ( getId ( ) == null ) { logger . info ( "Command " + this + " has no set id; note: anonymous commands cannot be used in registries." ) ; } if ( this instanceof ActionCommand && ! isFaceConfigured ( ) ) { logger . info ( "The face descriptor property is not yet set for action command '" + getId ( ) + "'; configuring"...
public class UriEscaper { /** * Returns whether or not this character is illegal in the given state */ private boolean isIllegal ( final char c , final State state ) { } }
switch ( state ) { case FRAGMENT : return ( strict ? STRICT_ILLEGAL_IN_FRAGMENT : ILLEGAL_IN_FRAGMENT ) . matches ( c ) ; case QUERY : return ( strict ? STRICT_ILLEGAL_IN_QUERY : ILLEGAL_IN_QUERY ) . matches ( c ) ; case QUERY_PARAM : return ( strict ? STRICT_ILLEGAL_IN_QUERY_PARAM : ILLEGAL_IN_QUERY_PARAM ) . matches ...
public class CollectionNumbers { /** * Copies the content of the collection to an array . * @ param coll the collection * @ return the array */ public static double [ ] doubleArrayCopyOf ( CollectionNumber coll ) { } }
double [ ] data = new double [ coll . size ( ) ] ; IteratorNumber iter = coll . iterator ( ) ; int index = 0 ; while ( iter . hasNext ( ) ) { data [ index ] = iter . nextDouble ( ) ; index ++ ; } return data ;
public class BinaryTreeNode { /** * Clear the tree . * < p > Caution : this method also destroyes the * links between the child nodes inside the tree . * If you want to unlink the first - level * child node with * this node but leave the rest of the tree * unchanged , please call < code > setChildAt ( i , n...
if ( this . left != null ) { final N child = this . left ; setLeftChild ( null ) ; child . clear ( ) ; } if ( this . right != null ) { final N child = this . right ; setRightChild ( null ) ; child . clear ( ) ; } removeAllUserData ( ) ;
public class ListViewCompat { /** * Measures the height of the given range of children ( inclusive ) and returns the height * with this ListView ' s padding and divider heights included . If maxHeight is provided , the * measuring will stop when the current height reaches maxHeight . * @ param widthMeasureSpec Th...
final int paddingTop = getListPaddingTop ( ) ; final int paddingBottom = getListPaddingBottom ( ) ; final int paddingLeft = getListPaddingLeft ( ) ; final int paddingRight = getListPaddingRight ( ) ; final int reportedDividerHeight = getDividerHeight ( ) ; final Drawable divider = getDivider ( ) ; final ListAdapter ada...
public class NodeRegisterImpl { /** * { @ inheritDoc } */ public synchronized void handlePingInRegister ( ArrayList < Node > ping ) { } }
for ( Node pingNode : ping ) { if ( pingNode . getIp ( ) == null ) { // https : / / telestax . atlassian . net / browse / LB - 9 Prevent Routing of Requests to Nodes that exposed null IP address logger . warn ( "[" + pingNode + "] not added as its IP is null, the node is sending bad information" ) ; } else { Boolean is...
public class Grego { /** * Convenient method for formatting time to ISO 8601 style * date string . * @ param time long time * @ return ISO - 8601 date string */ public static String timeToString ( long time ) { } }
int [ ] fields = timeToFields ( time , null ) ; int millis = fields [ 5 ] ; int hour = millis / MILLIS_PER_HOUR ; millis = millis % MILLIS_PER_HOUR ; int min = millis / MILLIS_PER_MINUTE ; millis = millis % MILLIS_PER_MINUTE ; int sec = millis / MILLIS_PER_SECOND ; millis = millis % MILLIS_PER_SECOND ; return String . ...
public class LUDecomposition { /** * Return lower triangular factor * @ return L */ public Matrix getL ( ) { } }
Matrix X = new Matrix ( m , n ) ; double [ ] [ ] L = X . getArray ( ) ; for ( int i = 0 ; i < m ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { if ( i > j ) { L [ i ] [ j ] = LU [ i ] [ j ] ; } else if ( i == j ) { L [ i ] [ j ] = 1.0 ; } else { L [ i ] [ j ] = 0.0 ; } } } return X ;
public class ForallDescr { /** * Returns the remaining patterns from the forall CE * @ return */ public List < BaseDescr > getRemainingPatterns ( ) { } }
if ( this . patterns . size ( ) > 1 ) { return this . patterns . subList ( 1 , this . patterns . size ( ) ) ; } else if ( this . patterns . size ( ) == 1 ) { // in case there is only one pattern , we do a rewrite , so : // forall ( Cheese ( type = = " stilton " ) ) // becomes // forall ( BASE _ IDENTIFIER : Cheese ( ) ...
public class BaseMessageFilter { /** * Update this object ' s filter with this new map information . * @ param propFilter New filter information ( ie , bookmark = 345 ) pass null to sync the local and remote filters . */ public final void updateFilterMap ( Map < String , Object > propFilter ) { } }
if ( propFilter == null ) propFilter = new HashMap < String , Object > ( ) ; // Then handleUpdateFilterMap can modify the filter propFilter = this . handleUpdateFilterMap ( propFilter ) ; // Update this object ' s local filter . this . setFilterMap ( propFilter ) ; // Update any remote copy of this .
public class JStormUtils { /** * If it is backend , please set resultHandler , such as DefaultExecuteResultHandler * If it is frontend , ByteArrayOutputStream . toString will return the calling result * This function will ignore whether the command is successfully executed or not * @ param command command to be e...
String [ ] cmdlist = command . split ( " " ) ; CommandLine cmd = new CommandLine ( cmdlist [ 0 ] ) ; for ( String cmdItem : cmdlist ) { if ( ! StringUtils . isBlank ( cmdItem ) ) { cmd . addArgument ( cmdItem ) ; } } DefaultExecutor executor = new DefaultExecutor ( ) ; executor . setExitValue ( 0 ) ; if ( ! StringUtils...
public class ZWaveMultiInstanceCommandClass { /** * Handles Multi Channel Encapsulation message . Decapsulates * an Application Command message and handles it using the right * endpoint . * @ param serialMessage the serial message to process . * @ param offset the offset at which to start procesing . */ private...
logger . trace ( "Process Multi-channel Encapsulation" ) ; CommandClass commandClass ; ZWaveCommandClass zwaveCommandClass ; int endpointId = serialMessage . getMessagePayloadByte ( offset ) ; int commandClassCode = serialMessage . getMessagePayloadByte ( offset + 2 ) ; commandClass = CommandClass . getCommandClass ( c...
public class StpConnection { /** * Queues up an STP / 0 message sent from another thread and wakes up selector to register it to the * key . * @ param message to add to the request queue */ private void send ( String message ) { } }
String scopeMessage = message . length ( ) + " " + message ; logger . finest ( "WRITE : " + scopeMessage ) ; byte [ ] bytes = null ; try { bytes = scopeMessage . getBytes ( "UTF-16BE" ) ; } catch ( UnsupportedEncodingException e ) { close ( ) ; connectionHandler . onException ( e ) ; return ; } ByteBuffer buffer = Byte...
public class AWSLogsClient { /** * Deletes the specified log stream and permanently deletes all the archived log events associated with the log * stream . * @ param deleteLogStreamRequest * @ return Result of the DeleteLogStream operation returned by the service . * @ throws InvalidParameterException * A para...
request = beforeClientExecution ( request ) ; return executeDeleteLogStream ( request ) ;
public class JobInProgress { /** * Find a non - running task in the passed list of TIPs * @ param tips a collection of TIPs * @ param ttStatus the status of tracker that has requested a task to run * @ param numUniqueHosts number of unique hosts that run trask trackers * @ param removeFailedTip whether to remov...
Iterator < TaskInProgress > iter = tips . iterator ( ) ; while ( iter . hasNext ( ) ) { TaskInProgress tip = iter . next ( ) ; // Select a tip if // 1 . runnable : still needs to be run and is not completed // 2 . ~ running : no other node is running it // 3 . earlier attempt failed : has not failed on this host // and...
public class DescribeServicesResult { /** * A JSON - formatted list of AWS services . * @ param services * A JSON - formatted list of AWS services . */ public void setServices ( java . util . Collection < Service > services ) { } }
if ( services == null ) { this . services = null ; return ; } this . services = new com . amazonaws . internal . SdkInternalList < Service > ( services ) ;
public class VirtualRouterSpecMarshaller { /** * Marshall the given parameter object . */ public void marshall ( VirtualRouterSpec virtualRouterSpec , ProtocolMarshaller protocolMarshaller ) { } }
if ( virtualRouterSpec == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( virtualRouterSpec . getListeners ( ) , LISTENERS_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getM...
public class SearchIO { /** * This method is declared private because it is the default action of constructor * when file exists * @ throws java . io . IOException for file access related issues * @ throws java . text . ParseException for file format related issues */ private void readResults ( ) throws IOExcepti...
factory . setFile ( file ) ; results = factory . createObjects ( evalueThreshold ) ;
public class SnsAPI { /** * code 换取 session _ key ( 微信小程序 ) * @ since 2.8.3 * @ param appid appid * @ param secret secret * @ param js _ code js _ code * @ return result */ public static Jscode2sessionResult jscode2session ( String appid , String secret , String js_code ) { } }
HttpUriRequest httpUriRequest = RequestBuilder . get ( ) . setUri ( BASE_URI + "/sns/jscode2session" ) . addParameter ( "appid" , appid ) . addParameter ( "secret" , secret ) . addParameter ( "js_code" , js_code ) . addParameter ( "grant_type" , "authorization_code" ) . build ( ) ; return LocalHttpClient . executeJsonR...
public class CmsStaticResourceHandler { /** * Returns the URL to a static resource . < p > * @ param resourcePath the static resource path * @ return the resource URL */ public static URL getStaticResourceURL ( String resourcePath ) { } }
URL resourceURL = null ; if ( isStaticResourceUri ( resourcePath ) ) { String path = removeStaticResourcePrefix ( resourcePath ) ; path = CmsStringUtil . joinPaths ( OPENCMS_PATH_PREFIX , path ) ; resourceURL = OpenCms . getSystemInfo ( ) . getClass ( ) . getClassLoader ( ) . getResource ( path ) ; } return resourceURL...
public class TextImporter { /** * Opens a file for reading , handling gzipped files . * @ param path The file to open . * @ return A buffered reader to read the file , decompressing it if needed . * @ throws IOException when shit happens . */ private static BufferedReader open ( final String path ) throws IOExcep...
if ( path . equals ( "-" ) ) { return new BufferedReader ( new InputStreamReader ( System . in ) ) ; } InputStream is = new FileInputStream ( path ) ; if ( path . endsWith ( ".gz" ) ) { is = new GZIPInputStream ( is ) ; } // I < 3 Java ' s IO library . return new BufferedReader ( new InputStreamReader ( is ) ) ;
public class HashFunctions { /** * Fowler - Noll - Vo 32 bit hash ( FNV - 1a ) for integer key . This is big - endian version ( native endianess of JVM ) . < br / > * < p / > < h3 > Algorithm < / h3 > < p / > * < pre > * hash = offset _ basis * for each octet _ of _ data to be hashed * hash = hash xor octet _...
long hash = FNV_BASIS ; hash ^= c >>> 24 ; hash *= FNV_PRIME_32 ; hash ^= 0xFF & ( c >>> 16 ) ; hash *= FNV_PRIME_32 ; hash ^= 0xFF & ( c >>> 8 ) ; hash *= FNV_PRIME_32 ; hash ^= 0xFF & c ; hash *= FNV_PRIME_32 ; return ( int ) hash ;
public class ArmeriaCentralDogma { /** * Encodes the specified { @ link JsonNode } into a byte array . */ private static byte [ ] toBytes ( JsonNode content ) { } }
try { return Jackson . writeValueAsBytes ( content ) ; } catch ( JsonProcessingException e ) { // Should never reach here . throw new Error ( e ) ; }
public class UpdateDeploymentGroupResult { /** * If the output contains no data , and the corresponding deployment group contained at least one Auto Scaling group , * AWS CodeDeploy successfully removed all corresponding Auto Scaling lifecycle event hooks from the AWS account . If * the output contains data , AWS C...
if ( hooksNotCleanedUp == null ) { this . hooksNotCleanedUp = null ; return ; } this . hooksNotCleanedUp = new com . amazonaws . internal . SdkInternalList < AutoScalingGroup > ( hooksNotCleanedUp ) ;
public class OverviewPlot { /** * Refresh the overview plot . */ private synchronized void reinitialize ( ) { } }
if ( plot == null ) { initializePlot ( ) ; } else { final ActionEvent ev = new ActionEvent ( this , ActionEvent . ACTION_PERFORMED , OVERVIEW_REFRESHING ) ; for ( ActionListener actionListener : actionListeners ) { actionListener . actionPerformed ( ev ) ; } } // Detach existing elements : for ( Pair < Element , Visual...
public class Highlights { /** * Return the first highlight that match in any value of this instance with * some of the highlights values . * @ param entity The entity * @ param instance The instance * @ return The Highlinght */ public Highlight getHighlight ( Entity entity , Object instance ) { } }
for ( Highlight highlight : highlights ) { if ( highlight . getScope ( ) . equals ( INSTANCE ) ) { for ( Field field : entity . getOrderedFields ( ) ) { if ( match ( instance , field , highlight ) ) { return highlight ; } } } } return null ;
public class DiskClient { /** * Sets the access control policy on the specified resource . Replaces any existing policy . * < p > Sample code : * < pre > < code > * try ( DiskClient diskClient = DiskClient . create ( ) ) { * ProjectZoneDiskResourceName resource = ProjectZoneDiskResourceName . of ( " [ PROJECT ]...
SetIamPolicyDiskHttpRequest request = SetIamPolicyDiskHttpRequest . newBuilder ( ) . setResource ( resource ) . setZoneSetPolicyRequestResource ( zoneSetPolicyRequestResource ) . build ( ) ; return setIamPolicyDisk ( request ) ;
public class TagValue { /** * Gets the name of the tag . * @ return the name */ public String getName ( ) { } }
String name = "" + id ; if ( TiffTags . hasTag ( id ) ) name = TiffTags . getTag ( id ) . getName ( ) ; return name ;
public class EntityManagerProvider { /** * Allows to pass in overriding Properties that may be specific to the JPA Vendor . * @ param unitName unit name * @ param overridingPersistenceProps properties to override persistence . xml props or define additions to them * @ return EntityManagerProvider instance */ publ...
overridingProperties = overridingPersistenceProps ; return instance ( unitName ) ;
public class ClassUtil { /** * Call registerXMLBindingClassForPropGetSetMethod first to retrieve the property * getter / setter method for the class / bean generated / wrote by JAXB * specificatio * @ param cls * @ return */ public static Map < String , Method > getPropGetMethodList ( final Class < ? > cls ) { ...
Map < String , Method > getterMethodList = entityDeclaredPropGetMethodPool . get ( cls ) ; if ( getterMethodList == null ) { loadPropGetSetMethodList ( cls ) ; getterMethodList = entityDeclaredPropGetMethodPool . get ( cls ) ; } return getterMethodList ;
public class WebJarsLocatorPathResolver { /** * List assets within a folder . * @ param folder * the root path to the folder . * @ return a set of folder paths that match . */ public Set < String > getResourceNames ( String folder ) { } }
String path = super . getResourcePath ( folder ) ; Set < String > assets = locator . listAssets ( path ) ; Set < String > resourceNames = new HashSet < > ( ) ; for ( String asset : assets ) { int idx = asset . indexOf ( path ) ; if ( idx != - 1 ) { String name = asset . substring ( idx + path . length ( ) ) ; idx = nam...
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcBoundaryEdgeCondition ( ) { } }
if ( ifcBoundaryEdgeConditionEClass == null ) { ifcBoundaryEdgeConditionEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 46 ) ; } return ifcBoundaryEdgeConditionEClass ;
public class MethodFinder { /** * Basis of { @ link # findConstructor } and { @ link # findMethod } . The member list fed to this * method will be either all { @ link Constructor } objects or all { @ link Method } objects . */ protected Member findMemberIn ( List < Member > memberList , Class < ? > [ ] parameterTypes...
List < Member > matchingMembers = new ArrayList < Member > ( ) ; for ( Iterator < Member > it = memberList . iterator ( ) ; it . hasNext ( ) ; ) { Member member = it . next ( ) ; Class < ? > [ ] methodParamTypes = _paramMap . get ( member ) ; // check for exactly equal method signature if ( Arrays . equals ( methodPara...
public class GVRBoundsPicker { /** * Get a collidabled based on its index ( as returned * by # addCollidable ) . * @ param index index of collidable to get * @ returns { @ link GVRSceneObject } or null if not found */ public GVRSceneObject getCollidable ( int index ) { } }
synchronized ( mCollidables ) { if ( ( index < 0 ) || ( index >= mCollidables . size ( ) ) ) { return null ; } return mCollidables . get ( index ) ; }
public class AppiumElementLocator { /** * This methods makes sets some settings of the { @ link By } according to * the given instance of { @ link SearchContext } . If there is some { @ link ContentMappedBy } * then it is switched to the searching for some html or native mobile element . * Otherwise nothing happe...
if ( ! ContentMappedBy . class . isAssignableFrom ( currentBy . getClass ( ) ) ) { return currentBy ; } return ContentMappedBy . class . cast ( currentBy ) . useContent ( getCurrentContentType ( currentContent ) ) ;
public class ProcessableDetectorStream { /** * @ see DetectorStreamProcessor # process ( net . sf . mmm . util . io . api . spi . DetectorStreamBuffer , Map , boolean ) * @ param buffer is the next part of the streamed data . * @ param eos - { @ code true } if the end of the stream has been reached and the given { ...
if ( buffer != null ) { this . firstBuffer . append ( buffer ) ; } this . firstBuffer . process ( getMutableMetadata ( ) , eos ) ; if ( eos ) { setDone ( ) ; }
public class ConstantsSummaryWriterImpl { /** * Get the class name in the table caption and the table header . * @ param classStr the class name to print . * @ return the table caption and header */ protected Content getClassName ( Content classStr ) { } }
Content table = HtmlTree . TABLE ( HtmlStyle . constantsSummary , 0 , 3 , 0 , constantsTableSummary , getTableCaption ( classStr ) ) ; table . addContent ( getSummaryTableHeader ( constantsTableHeader , "col" ) ) ; return table ;
public class WriteRender { /** * ( non - Javadoc ) * @ see com . alibaba . simpleimage . ImageRender # render ( ) */ @ Override public ImageWrapper render ( ) throws SimpleImageException { } }
try { if ( image == null ) { image = imageRender . render ( ) ; } ImageWriteHelper . write ( image , stream , outputFormat , param ) ; } catch ( Exception e ) { throw new SimpleImageException ( e ) ; } return null ;
public class I18nUtils { /** * Given a string representing a Locale , returns the Locale object for that string . * @ return A Locale object built from the string provided */ public static Locale parseLocale ( String localeString ) { } }
if ( localeString == null ) { return Locale . US ; } String [ ] groups = localeString . split ( "[-_]" ) ; switch ( groups . length ) { case 1 : return new Locale ( groups [ 0 ] ) ; case 2 : return new Locale ( groups [ 0 ] , Ascii . toUpperCase ( groups [ 1 ] ) ) ; case 3 : return new Locale ( groups [ 0 ] , Ascii . t...
public class Petite { /** * Get component or bean by type . * @ param < T > * @ param type * @ return Component */ @ SuppressWarnings ( "unchecked" ) public < T > T get ( final Class < T > type ) { } }
T bean = ( T ) components . get ( type ) ; if ( bean != null ) { return bean ; } return ( T ) get ( type . getName ( ) ) ;
public class XmlWriter { /** * Convenience method , same as doing a startLineElement ( ) , writeText ( text ) , * endLineElement ( ) . */ public void writeLineElement ( String name , Object text ) { } }
startLineElement ( name ) ; writeText ( text ) ; endLineElement ( name ) ;
public class CassandraTableScanJavaRDD { /** * Selects a subset of columns mapped to the key of a JavaPairRDD . * The selected columns must be available in the CassandraRDD . * If no selected columns are given , all available columns are selected . * @ param rrf row reader factory to convert the key to desired ty...
Seq < ColumnRef > columnRefs = JavaApiHelper . toScalaSeq ( columns ) ; CassandraRDD < Tuple2 < K , R > > resultRDD = columns . length == 0 ? rdd ( ) . keyBy ( keyClassTag , rrf , rwf ) : rdd ( ) . keyBy ( columnRefs , keyClassTag , rrf , rwf ) ; return new CassandraJavaPairRDD < > ( resultRDD , keyClassTag , classTag ...
public class GeopaparazziUtilities { /** * Get the map of metadata of the project . * @ param connection the db connection . * @ return the map of metadata . * @ throws SQLException */ public static LinkedHashMap < String , String > getProjectMetadata ( IHMConnection connection ) throws Exception { } }
LinkedHashMap < String , String > metadataMap = new LinkedHashMap < > ( ) ; try ( IHMStatement statement = connection . createStatement ( ) ) { statement . setQueryTimeout ( 30 ) ; // set timeout to 30 sec . String sql = "select " + MetadataTableFields . COLUMN_KEY . getFieldName ( ) + ", " + MetadataTableFields . COLU...
public class NetworkInterface { /** * Get a List of all or a subset of the < code > InterfaceAddresses < / code > * of this network interface . * If there is a security manager , its < code > checkConnect < / code > * method is called with the InetAddress for each InterfaceAddress . * Only InterfaceAddresses wh...
java . util . List < InterfaceAddress > lst = new java . util . ArrayList < InterfaceAddress > ( 1 ) ; SecurityManager sec = System . getSecurityManager ( ) ; for ( int j = 0 ; j < bindings . length ; j ++ ) { try { if ( sec != null ) { sec . checkConnect ( bindings [ j ] . getAddress ( ) . getHostAddress ( ) , - 1 ) ;...
public class AssertContains { /** * Asserts that the element ' s options contains the provided expected * option . If the element isn ' t present or a select , this will constitute a * failure , same as a mismatch . This information will be logged and * recorded , with a screenshot for traceability and added debu...
String [ ] options = checkSelectOption ( expectedOption , 0 , 0 ) ; String reason = NO_ELEMENT_FOUND ; if ( options == null && getElement ( ) . is ( ) . present ( ) ) { reason = ELEMENT_NOT_SELECT ; } assertNotNull ( reason , options ) ; assertTrue ( "Option not found: element options of '" + String . join ( "," , opti...
public class BaseCrashReportDialog { /** * Send crash report given user ' s comment and email address . * @ param comment Comment ( may be null ) provided by the user . * @ param userEmail Email address ( may be null ) provided by the client . */ protected final void sendCrash ( @ Nullable String comment , @ Nullab...
new Thread ( ( ) -> { final CrashReportPersister persister = new CrashReportPersister ( ) ; try { if ( ACRA . DEV_LOGGING ) ACRA . log . d ( LOG_TAG , "Add user comment to " + reportFile ) ; final CrashReportData crashData = persister . load ( reportFile ) ; crashData . put ( USER_COMMENT , comment == null ? "" : comme...
public class ViewDragHelper { /** * Attempt to capture the view with the given pointer ID . The callback will be involved . * This will put us into the " dragging " state . If we ' ve already captured this view with * this pointer this method will immediately return true without consulting the callback . * @ para...
if ( toCapture == mCapturedView && mActivePointerId == pointerId ) { // Already done ! return true ; } if ( toCapture != null && mCallback . tryCaptureView ( toCapture , pointerId ) ) { mActivePointerId = pointerId ; captureChildView ( toCapture , pointerId ) ; return true ; } return false ;
public class DefaultWarpRequestSpecifier { /** * ( non - Javadoc ) * @ see org . jboss . arquillian . warp . client . execution . FilterSpecifier # filter ( java . lang . Class ) */ @ Override public SingleInspectionSpecifier observe ( Class < ? extends RequestObserver > what ) { } }
initializeSingleGroup ( ) ; singleGroup . observe ( createFilterInstance ( what ) ) ; return this ;
public class DescribeUserPoolRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DescribeUserPoolRequest describeUserPoolRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( describeUserPoolRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeUserPoolRequest . getUserPoolId ( ) , USERPOOLID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON...
public class OutputUtil { /** * Appends all elements of < code > list < / code > to buffer , separated by delimiter * @ param < T > Type of elements stored in < code > list < / code > * @ param sb StringBuilder to be modified * @ param list List of elements * @ param delimiter Delimiter to separate elements *...
boolean firstRun = true ; for ( T elem : list ) { if ( ! firstRun ) sb . append ( delimiter ) ; else firstRun = false ; sb . append ( elem . toString ( ) ) ; } return sb ;
public class IniFile { /** * Returns the specified date property from the specified section . * @ param pstrSection the INI section name . * @ param pstrProp the property to be retrieved . * @ return the date property value . */ public Date getTimestampProperty ( String pstrSection , String pstrProp ) { } }
Timestamp tsRet = null ; Date dtTmp = null ; String strVal = null ; DateFormat dtFmt = null ; INIProperty objProp = null ; INISection objSec = null ; objSec = ( INISection ) this . mhmapSections . get ( pstrSection ) ; if ( objSec != null ) { objProp = objSec . getProperty ( pstrProp ) ; try { if ( objProp != null ) st...
public class ConfigElement { /** * Uses the server configuration to resolve a variable into a string . * For example , with this in server config : { @ code < variable name = " key " value = " val " / > } * Calling < code > expandVariable ( config , " $ { key } " ) ; < / code > would return " val " * @ param conf...
if ( value == null ) return null ; if ( ! value . startsWith ( "${" ) || ! value . endsWith ( "}" ) ) return value ; String variableName = value . substring ( 2 , value . length ( ) - 1 ) ; Variable var = config . getVariables ( ) . getBy ( "name" , variableName ) ; return var . getValue ( ) ;
public class ConnectionManager { /** * Lazy Connection Association Optimization ( smart handles ) */ @ Override public void associateConnection ( Object connection , ManagedConnectionFactory mcf , ConnectionRequestInfo cri ) throws ResourceException { } }
final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) { Tr . entry ( this , tc , "associateConnection" ) ; } /* * Get the subject information */ Subject subject = ( containerManagedAuth ? getFinalSubject ( cri , mcf , this ) : null ) ; // Give the security help...
public class Javadoc { /** * For tags like " @ return good things " where * tagName is " return " , * and the rest is content . */ public Javadoc addBlockTag ( String tagName , String content ) { } }
return addBlockTag ( new JavadocBlockTag ( tagName , content ) ) ;
public class WMultiTextField { /** * The string is a comma seperated list of the string inputs . * @ return A string concatenation of the string inputs . */ @ Override public String getValueAsString ( ) { } }
String result = null ; String [ ] inputs = getValue ( ) ; if ( inputs != null && inputs . length > 0 ) { StringBuffer stringValues = new StringBuffer ( ) ; for ( int i = 0 ; i < inputs . length ; i ++ ) { if ( i > 0 ) { stringValues . append ( ", " ) ; } stringValues . append ( inputs [ i ] ) ; } result = stringValues ...
public class DefaultGroovyMethods { /** * Round the value * @ param number a Double * @ param precision the number of decimal places to keep * @ return the Double rounded to the number of decimal places specified by precision * @ since 1.6.4 */ public static double round ( Double number , int precision ) { } }
return Math . floor ( number * Math . pow ( 10 , precision ) + 0.5 ) / Math . pow ( 10 , precision ) ;
public class IdGenerator { /** * Generate Id when given table generation strategy . * @ param m * @ param client * @ param keyValue * @ param e */ private Object onTableGenerator ( EntityMetadata m , Client < ? > client , IdDiscriptor keyValue , Object e ) { } }
Object tablegenerator = getAutoGenClazz ( client ) ; if ( tablegenerator instanceof TableGenerator ) { Object generatedId = ( ( TableGenerator ) tablegenerator ) . generate ( keyValue . getTableDiscriptor ( ) , ( ClientBase ) client , m . getIdAttribute ( ) . getJavaType ( ) . getSimpleName ( ) ) ; try { generatedId = ...
public class ProtoUtil { /** * Returns java package name . */ public static String getPackage ( Proto proto ) { } }
DynamicMessage . Value javaPackage = proto . getOptions ( ) . get ( OPTION_JAVA_PACKAGE ) ; if ( javaPackage != null ) { return javaPackage . getString ( ) ; } return proto . getPackage ( ) . getValue ( ) ;
public class EventHubSpout { /** * This is a extracted method that is easy to test * @ param config * @ param totalTasks * @ param taskIndex * @ param collector * @ throws Exception */ public void preparePartitions ( Map config , int totalTasks , int taskIndex , SpoutOutputCollector collector ) throws Excepti...
this . collector = collector ; if ( stateStore == null ) { String zkEndpointAddress = eventHubConfig . getZkConnectionString ( ) ; if ( zkEndpointAddress == null || zkEndpointAddress . length ( ) == 0 ) { // use storm ' s zookeeper servers if not specified . @ SuppressWarnings ( "unchecked" ) List < String > zkServers ...
public class Database { /** * Create a placeholder for SQL query syntax e . g . " ( ? , ? , ? ) " . * @ param length Number of values that will be inserted to the placeholder . * @ return A placeholder for SQL query syntax . */ private String queryPlaceholder ( int length ) { } }
StringBuilder sb = new StringBuilder ( length * 2 + 1 ) ; sb . append ( "(?" ) ; for ( int i = 1 ; i < length ; i ++ ) { sb . append ( ",?" ) ; } sb . append ( ")" ) ; return sb . toString ( ) ;
public class ObjectIdentifierAndLinkNameTupleMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ObjectIdentifierAndLinkNameTuple objectIdentifierAndLinkNameTuple , ProtocolMarshaller protocolMarshaller ) { } }
if ( objectIdentifierAndLinkNameTuple == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( objectIdentifierAndLinkNameTuple . getObjectIdentifier ( ) , OBJECTIDENTIFIER_BINDING ) ; protocolMarshaller . marshall ( objectIdentifierAndLinkNameTup...
public class AptUtil { /** * Returns the package name of the given element . * NB : This method requires the given element has the kind of { @ link ElementKind # CLASS } . * @ param elementUtils * @ param element * @ return the package name * @ author vvakame */ public static String getPackageName ( Elements ...
return elementUtils . getPackageOf ( element ) . getQualifiedName ( ) . toString ( ) ;
public class DefaultPayload { /** * Static factory method for a text payload . Mainly looks better than " new DefaultPayload ( data ) " * @ param data the data of the payload . * @ return a payload . */ public static Payload create ( CharSequence data ) { } }
return create ( StandardCharsets . UTF_8 . encode ( CharBuffer . wrap ( data ) ) , null ) ;
public class MpMessages { /** * 群发视频消息给所有人 * @ param mediaId * @ param title * @ param desc * @ return */ public long video ( String mediaId , String title , String desc ) { } }
return video ( new Filter ( true , null ) , null , mediaId , title , desc ) ;
public class BrowserSessionProxy { /** * f169897.2 added */ public void reset ( ) throws SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException , SIResourceException , SIConnectionLostException , SIErrorException { } }
if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "reset" ) ; checkAlreadyClosed ( ) ; synchronized ( lock ) { try { closeLock . readLock ( ) . lockInterruptibly ( ) ; try { proxyQueue . reset ( ) ; } finally { closeLock . readLock ( ) . unlock ( ) ; } } catch ( InterruptedException e ) { // No FFDC code neede...
public class UserManager { /** * Check if the passed combination of user ID and password matches . * @ param sUserID * The ID of the user * @ param sPlainTextPassword * The plan text password to validate . * @ return < code > true < / code > if the password hash matches the stored hash for * the specified u...
// No password is not allowed if ( sPlainTextPassword == null ) return false ; // Is there such a user ? final IUser aUser = getOfID ( sUserID ) ; if ( aUser == null ) return false ; // Now compare the hashes final String sPasswordHashAlgorithm = aUser . getPasswordHash ( ) . getAlgorithmName ( ) ; final IPasswordSalt ...
public class URLCoder { /** * Decodes { @ code x - www - form - urlencoded } string into Java string . * @ param encoded encoded value * @ return decoded value * @ see URLDecoder # decode ( String , String ) */ public static String decode ( String encoded ) { } }
try { return URLDecoder . decode ( encoded , ENCODING_FOR_URL ) ; } catch ( UnsupportedEncodingException e ) { throw new IllegalStateException ( "Unable to decode URL entry via " + ENCODING_FOR_URL + ". This should not happen" , e ) ; }
public class TldLearning { /** * Mark regions which were local maximums and had high confidence as negative . These regions were * candidates for the tracker but were not selected */ protected void learnAmbiguousNegative ( Rectangle2D_F64 targetRegion ) { } }
TldHelperFunctions . convertRegion ( targetRegion , targetRegion_I32 ) ; if ( detection . isSuccess ( ) ) { TldRegion best = detection . getBest ( ) ; // see if it found the correct solution double overlap = helper . computeOverlap ( best . rect , targetRegion_I32 ) ; if ( overlap <= config . overlapLower ) { template ...
public class SaveEditingAction { /** * Saves editing , and also removes the { @ link FeatureTransaction } object from the map . * @ param event * The { @ link MenuItemClickEvent } from clicking the action . */ public void onClick ( MenuItemClickEvent event ) { } }
FeatureTransaction featureTransaction = mapModel . getFeatureEditor ( ) . getFeatureTransaction ( ) ; if ( featureTransaction != null ) { List < Activity > activities = new ArrayList < Activity > ( ) ; activities . add ( new ValidationActivity ( ) ) ; activities . add ( new CommitActivity ( ) ) ; WorkflowProcessor proc...
import java . util . ArrayList ; import java . util . Collections ; import java . util . HashSet ; import java . util . List ; class FindCommonElements { /** * This function returns a sorted list of unique common elements between two lists . * @ param list1 The first list . * @ param list2 The second list . * @ r...
HashSet < Integer > set1 = new HashSet < > ( list1 ) ; set1 . retainAll ( new HashSet < > ( list2 ) ) ; List < Integer > commonElements = new ArrayList < > ( set1 ) ; Collections . sort ( commonElements ) ; return commonElements ;
public class Prefs { /** * Reloads this preference file from the hard disk */ public void reload ( ) { } }
try { if ( file . exists ( ) ) { try ( FileReader fileReader = new FileReader ( file ) ) { props . load ( fileReader ) ; } } } catch ( IOException e ) { FOKLogger . log ( Prefs . class . getName ( ) , Level . SEVERE , FOKLogger . DEFAULT_ERROR_TEXT , e ) ; }
public class MapperFactory { /** * Creates a mapper for the given class . * @ param clazz * the class * @ return the mapper for the given class . */ private Mapper createMapper ( Class < ? > clazz ) { } }
Mapper mapper ; if ( Enum . class . isAssignableFrom ( clazz ) ) { mapper = new EnumMapper ( clazz ) ; } else if ( Map . class . isAssignableFrom ( clazz ) ) { mapper = new MapMapper ( clazz ) ; } else if ( clazz . isAnnotationPresent ( Embeddable . class ) ) { mapper = new EmbeddedObjectMapper ( clazz ) ; } else { thr...
public class CmsSqlManager { /** * Attempts to close the connection , statement and result set after a statement has been executed . < p > * @ param dbc the current database context * @ param con the JDBC connection * @ param stmnt the statement * @ param res the result set */ public void closeAll ( CmsDbContex...
// NOTE : we have to close Connections / Statements that way , because a dbcp PoolablePreparedStatement // is not a DelegatedStatement ; for that reason its not removed from the trace of the connection when it is closed . // So , the connection tries to close it again when the connection is closed itself ; // as a resu...
public class MessageBatch { /** * Returns the number of non - null messages */ public int size ( ) { } }
int retval = 0 ; for ( int i = 0 ; i < index ; i ++ ) if ( messages [ i ] != null ) retval ++ ; return retval ;
public class SerializerFactory { /** * Set true if the collection serializer should send the java type . */ public void setSendCollectionType ( boolean isSendType ) { } }
if ( _collectionSerializer == null ) _collectionSerializer = new CollectionSerializer ( ) ; _collectionSerializer . setSendJavaType ( isSendType ) ; if ( _mapSerializer == null ) _mapSerializer = new MapSerializer ( ) ; _mapSerializer . setSendJavaType ( isSendType ) ;
public class MediaClient { /** * Create a preset which help to convert audio files on be played in a wide range of devices . * @ param presetName The name of the new preset . * @ param container The container type for the output file . Valid values include mp4 , flv , hls , mp3 , m4a . * @ param clip The clip pro...
return createPreset ( presetName , null , container , false , clip , audio , null , encryption , null ) ;
public class ApptentiveTaskManager { /** * region PayloadSender . Listener */ @ Override public void onFinishSending ( PayloadSender sender , PayloadData payload , boolean cancelled , String errorMessage , int responseCode , JSONObject responseData ) { } }
ApptentiveNotificationCenter . defaultCenter ( ) . postNotification ( NOTIFICATION_PAYLOAD_DID_FINISH_SEND , NOTIFICATION_KEY_PAYLOAD , payload , NOTIFICATION_KEY_SUCCESSFUL , errorMessage == null && ! cancelled ? TRUE : FALSE , NOTIFICATION_KEY_RESPONSE_CODE , responseCode , NOTIFICATION_KEY_RESPONSE_DATA , responseDa...
public class ReportClean { /** * Remove the report directory . */ @ Override protected void runUnsafe ( ) throws Exception { } }
Path reportDirectory = getReportDirectoryPath ( ) ; Files . walkFileTree ( reportDirectory , new DeleteVisitor ( ) ) ; LOGGER . info ( "Report directory <{}> was successfully cleaned." , reportDirectory ) ;
public class CaduceusProgram { /** * Read Caduceus program . * @ param resource the resource * @ return the lyre program * @ throws IOException the io exception */ public static CaduceusProgram read ( @ NonNull Resource resource ) throws IOException { } }
CaduceusProgram program = new CaduceusProgram ( ) ; try ( Reader reader = resource . reader ( ) ) { List < Object > rules = ensureList ( new Yaml ( ) . load ( reader ) , "Caduceus rules should be specified in a list" ) ; for ( Object entry : rules ) { Map < String , Object > ruleMap = ensureMap ( entry , "Rule entry sh...
public class BouncyCastleUtil { /** * Returns certificate type of the given TBS certificate . < BR > * The certificate type is { @ link GSIConstants # CA GSIConstants . CA } * < B > only < / B > if the certificate contains a * BasicConstraints extension and it is marked as CA . < BR > * A certificate is a GSI -...
X509Extensions extensions = crt . getExtensions ( ) ; X509Extension ext = null ; if ( extensions != null ) { ext = extensions . getExtension ( X509Extension . basicConstraints ) ; if ( ext != null ) { BasicConstraints basicExt = BasicConstraints . getInstance ( ext ) ; if ( basicExt . isCA ( ) ) { return GSIConstants ....
public class PRJUtil { /** * Return the SRID value stored in a prj file * If the the prj file * - is null , * - is empty * then a default srid equals to 0 is added . * @ param prjFile * @ return * @ throws IOException */ public static int getSRID ( File prjFile ) throws IOException { } }
int srid = 0 ; if ( prjFile == null ) { log . debug ( "This prj file is null. \n A default srid equals to 0 will be added." ) ; } else { PrjParser parser = new PrjParser ( ) ; String prjString = readPRJFile ( prjFile ) ; if ( ! prjString . isEmpty ( ) ) { Map < String , String > p = parser . getParameters ( prjString )...
public class OSchemaHelper { /** * Create { @ link OIndex } on a set of fields if required * @ param name name of an index * @ param type type of an index * @ param fields fields to create index on * @ return this helper */ public OSchemaHelper oIndex ( String name , INDEX_TYPE type , String ... fields ) { } }
checkOClass ( ) ; lastIndex = lastClass . getClassIndex ( name ) ; if ( lastIndex == null ) { lastIndex = lastClass . createIndex ( name , type , fields ) ; } else { // We can ' t do something to change type and fields if required } return this ;
public class ScanResult { /** * Index { @ link Resource } and { @ link ClassInfo } objects . */ private void indexResourcesAndClassInfo ( ) { } }
// Add backrefs from Info objects back to this ScanResult final Collection < ClassInfo > allClassInfo = classNameToClassInfo . values ( ) ; for ( final ClassInfo classInfo : allClassInfo ) { classInfo . setScanResult ( this ) ; } // If inter - class dependencies are enabled , create placeholder ClassInfo objects for an...
public class Cache { /** * Delete the object . * @ param obj the obj */ @ Override public void delete ( ApiType obj ) { } }
String key = keyFunc . apply ( obj ) ; lock . lock ( ) ; try { boolean exists = this . items . containsKey ( key ) ; if ( exists ) { this . deleteFromIndices ( this . items . get ( key ) , key ) ; this . items . remove ( key ) ; } } finally { lock . unlock ( ) ; }
public class URLConnection { /** * Returns the value of the named field parsed as a number . * This form of < code > getHeaderField < / code > exists because some * connection types ( e . g . , < code > http - ng < / code > ) have pre - parsed * headers . Classes for that connection type can override this method ...
String value = getHeaderField ( name ) ; try { return Integer . parseInt ( value ) ; } catch ( Exception e ) { } return Default ;
public class BootstrapContextImpl { /** * DS method to deactivate this component . * Best practice : this should be a protected method , not public or private * @ param context for this component instance * @ throws Exception if the attempt to stop the resource adapter fails */ protected void deactivate ( Compone...
contextProviders . deactivate ( context ) ; bvalRef . deactivate ( context ) ; tranInflowManagerRef . deactivate ( context ) ; tranSyncRegistryRef . deactivate ( context ) ; jcaSecurityContextRef . deactivate ( context ) ; latch . countDown ( ) ; latches . remove ( resourceAdapterID , latch ) ; FutureMonitor futureMoni...
public class PackageTransformer { /** * Read the manifest from supplied input stream , which is closed before return . */ private static Manifest getManifest ( final RegisteredResource rsrc ) throws IOException { } }
try ( final InputStream ins = rsrc . getInputStream ( ) ) { if ( ins != null ) { try ( JarInputStream jis = new JarInputStream ( ins ) ) { return jis . getManifest ( ) ; } } else { return null ; } }
public class ReplyFactory { /** * Adds an Airline Itinerary Template to the response . * @ param introMessage * the message to send before the template . It can ' t be empty . * @ param locale * the current locale . It can ' t be empty and must be in format * [ a - z ] { 2 } _ [ A - Z ] { 2 } . Locale must be...
return new AirlineItineraryTemplateBuilder ( introMessage , locale , pnrNumber , totalPrice , currency ) ;
public class CommerceWarehouseItemUtil { /** * Returns all the commerce warehouse items where CProductId = & # 63 ; and CPInstanceUuid = & # 63 ; . * @ param CProductId the c product ID * @ param CPInstanceUuid the cp instance uuid * @ return the matching commerce warehouse items */ public static List < CommerceW...
return getPersistence ( ) . findByCPI_CPIU ( CProductId , CPInstanceUuid ) ;
public class Slf4jMDCAdapter { /** * For all the methods that operate against the context , return true if the MDC should use the PaxContext object from the PaxLoggingManager , * or if the logging manager is not set , or does not have its context available yet , use a default context local to this MDC . * @ return ...
if ( m_context == null && m_paxLogging != null ) { m_context = ( m_paxLogging . getPaxLoggingService ( ) != null ) ? m_paxLogging . getPaxLoggingService ( ) . getPaxContext ( ) : null ; } return m_context != null ? m_context : m_defaultContext ;
public class PrecisionRecallCurve { /** * Get the point ( index , threshold , precision , recall ) at the given precision . < br > * Specifically , return the points at the lowest threshold that has precision equal to or greater than the * requested precision . * @ param precision Precision to get the point for ...
// Find the LOWEST threshold that gives the specified precision for ( int i = 0 ; i < this . precision . length ; i ++ ) { if ( this . precision [ i ] >= precision ) { return new Point ( i , threshold [ i ] , this . precision [ i ] , recall [ i ] ) ; } } // Not found , return last point . Should never happen though . ....
public class OutputControllerManager { /** * Returns a { @ link Optional } object that may or may not contain the desired { @ link OutputControllerModel } , * depending on whether it was registered with Izou or not . * @ param identifiable The ID of the OutputController that should be retrieved . * @ return The {...
return outputControllers . stream ( ) . filter ( outputController -> outputController . getID ( ) . equals ( identifiable . getID ( ) ) ) . findFirst ( ) ;
public class Node { /** * Sets the child for a given index . * @ param idx * the alphabet symbol index * @ param alphabetSize * the overall alphabet size ; this is needed if a new children array needs to be created * @ param child * the new child */ public void setChild ( int idx , int alphabetSize , Node <...
if ( children == null ) { children = new ResizingArrayStorage < > ( Node . class , alphabetSize ) ; } children . array [ idx ] = child ;
public class CommerceShippingFixedOptionUtil { /** * Returns the commerce shipping fixed options before and after the current commerce shipping fixed option in the ordered set where commerceShippingMethodId = & # 63 ; . * @ param commerceShippingFixedOptionId the primary key of the current commerce shipping fixed opt...
return getPersistence ( ) . findByCommerceShippingMethodId_PrevAndNext ( commerceShippingFixedOptionId , commerceShippingMethodId , orderByComparator ) ;
public class ResolvingXMLConfiguration { /** * Resolve the IP address from a URL . * @ param url and URL that will return an IP address * @ param name the name of the variable * @ return the result from the HTTP GET operations or null of an error */ private String ipAddressFromURL ( String url , String name ) { }...
String ipAddr = null ; if ( _urlValidator . isValid ( url ) ) { WebTarget resolver = ClientBuilder . newClient ( ) . target ( url ) ; try { ipAddr = resolver . request ( ) . get ( String . class ) ; } catch ( Exception e ) { warn ( "URL Cannot Resolve for resolveIP named [" + name + "]. The requested URL is invalid ["...
public class CountedCompleter { /** * Regardless of pending count , invokes { @ link # onCompletion } , * marks this task as complete with a { @ code null } return value , * and further triggers { @ link # tryComplete } on this task ' s * completer , if one exists . This method may be useful when * forcing comp...
CountedCompleter p ; onCompletion ( this ) ; quietlyComplete ( ) ; if ( ( p = completer ) != null ) p . tryComplete ( ) ;