signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class SyntaxElement { /** * TODO : code splitten */ public boolean propagateValue ( String destPath , String value , boolean tryToCreate , boolean allowOverwrite ) { } }
boolean ret = false ; if ( destPath . equals ( getPath ( ) ) ) { if ( value != null && value . equals ( "requested" ) ) this . haveRequestTag = true ; else throw new HBCI_Exception ( HBCIUtils . getLocMsg ( "EXCMSG_INVVALUE" , new Object [ ] { destPath , value } ) ) ; ret = true ; } else { // damit überspringen wir gl...
public class MultiPoint { /** * Get the full list of coordinates from all the points in this MultiPoint geometry . If this geometry is empty , null * will be returned . */ public Coordinate [ ] getCoordinates ( ) { } }
if ( isEmpty ( ) ) { return null ; } Coordinate [ ] coordinates = new Coordinate [ points . length ] ; for ( int i = 0 ; i < points . length ; i ++ ) { coordinates [ i ] = points [ i ] . getCoordinate ( ) ; } return coordinates ;
public class DirectLogFetcher { /** * Put a string in the buffer . * @ param s the value to put in the buffer */ protected final void putString ( String s ) { } }
ensureCapacity ( position + ( s . length ( ) * 2 ) + 1 ) ; System . arraycopy ( s . getBytes ( ) , 0 , buffer , position , s . length ( ) ) ; position += s . length ( ) ; buffer [ position ++ ] = 0 ;
public class RemoteResource { /** * { @ inheritDoc } */ @ Override public boolean exists ( ) { } }
if ( this . cachedResource != null ) return true ; try { InputStream is = get ( ) ; if ( is != null ) { is . close ( ) ; return true ; } return false ; } catch ( IOException ex ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "IOException while checking existence of resou...
public class AWSCognitoIdentityProviderClient { /** * Provides the feedback for an authentication event whether it was from a valid user or not . This feedback is used * for improving the risk evaluation decision for the user pool as part of Amazon Cognito advanced security . * @ param updateAuthEventFeedbackReques...
request = beforeClientExecution ( request ) ; return executeUpdateAuthEventFeedback ( request ) ;
public class NiceXWPFDocument { /** * 指定位置合并Word文档 * @ param docMerges * 待合并的文档 * @ param run * 合并的位置 * @ return 合并后的文档 * @ throws Exception * @ since 1.3.0 */ public NiceXWPFDocument merge ( List < NiceXWPFDocument > docMerges , XWPFRun run ) throws Exception { } }
if ( null == docMerges || docMerges . isEmpty ( ) || null == run ) return this ; // XWPFParagraph paragraph = insertNewParagraph ( run ) ; XWPFParagraph paragraph = ( XWPFParagraph ) run . getParent ( ) ; CTP ctp = paragraph . getCTP ( ) ; CTBody body = this . getDocument ( ) . getBody ( ) ; String srcString = body . x...
public class HierarchyEntityUtils { /** * 按照上下关系和指定属性排序 * @ param datas a { @ link java . util . List } object . * @ param property a { @ link java . lang . String } object . * @ param < T > a T object . * @ return a { @ link java . util . Map } object . */ public static < T extends HierarchyEntity < T , ? > > ...
final Map < T , String > sortedMap = tag ( datas , property ) ; Collections . sort ( datas , new Comparator < HierarchyEntity < T , ? > > ( ) { public int compare ( HierarchyEntity < T , ? > arg0 , HierarchyEntity < T , ? > arg1 ) { String tag0 = sortedMap . get ( arg0 ) ; String tag1 = sortedMap . get ( arg1 ) ; retur...
public class WindowedStream { /** * Applies the given fold function to each window . The window function is called for each * evaluation of the window for each key individually . The output of the reduce function is * interpreted as a regular non - windowed stream . * @ param function The fold function . * @ re...
if ( function instanceof RichFunction ) { throw new UnsupportedOperationException ( "FoldFunction can not be a RichFunction. " + "Please use fold(FoldFunction, WindowFunction) instead." ) ; } TypeInformation < R > resultType = TypeExtractor . getFoldReturnTypes ( function , input . getType ( ) , Utils . getCallLocation...
public class Alignment { /** * Converts range in sequence1 to range in sequence2 , or returns null if input range is not fully covered by * alignment * @ param rangeInSeq1 range in sequence 1 * @ return range in sequence2 or null if rangeInSeq1 is not fully covered by alignment */ public Range convertToSeq2Range ...
int from = aabs ( convertToSeq2Position ( rangeInSeq1 . getFrom ( ) ) ) ; int to = aabs ( convertToSeq2Position ( rangeInSeq1 . getTo ( ) ) ) ; if ( from == - 1 || to == - 1 ) return null ; return new Range ( from , to ) ;
public class WMenu { /** * Indicates whether the given menu item is selectable . * @ param item the menu item to check . * @ param selectionMode the select mode of the current menu / sub - menu * @ return true if the meu item is selectable , false otherwise . */ private boolean isSelectable ( final MenuItem item ...
if ( ! ( item instanceof MenuItemSelectable ) || ! item . isVisible ( ) || ( item instanceof Disableable && ( ( Disableable ) item ) . isDisabled ( ) ) ) { return false ; } // SubMenus are only selectable in a column menu type if ( item instanceof WSubMenu && ! MenuType . COLUMN . equals ( getType ( ) ) ) { return fals...
public class StringUtil { /** * Find the index of the first non - white space character in { @ code s } starting at { @ code offset } . * @ param seq The string to search . * @ param offset The offset to start searching at . * @ return the index of the first non - white space character or & lt ; { @ code 0 } if n...
for ( ; offset < seq . length ( ) ; ++ offset ) { if ( ! Character . isWhitespace ( seq . charAt ( offset ) ) ) { return offset ; } } return - 1 ;
public class BeanInfoManager { /** * Makes sure that this class has been initialized , and synchronizes * the initialization if it ' s required . */ void checkInitialized ( Logger pLogger ) throws ELException { } }
if ( ! mInitialized ) { synchronized ( this ) { if ( ! mInitialized ) { initialize ( pLogger ) ; mInitialized = true ; } } }
public class ASTHelpers { /** * Returns the list of all constructors defined in the class ( including generated ones ) . */ public static List < MethodTree > getConstructors ( ClassTree classTree ) { } }
List < MethodTree > constructors = new ArrayList < > ( ) ; for ( Tree member : classTree . getMembers ( ) ) { if ( member instanceof MethodTree ) { MethodTree methodTree = ( MethodTree ) member ; if ( getSymbol ( methodTree ) . isConstructor ( ) ) { constructors . add ( methodTree ) ; } } } return constructors ;
public class EncryptKit { /** * DES解密Base64编码密文 * @ param data Base64编码密文 * @ param key 8字节秘钥 * @ return 明文 */ public static byte [ ] decryptBase64DES ( byte [ ] data , byte [ ] key ) { } }
try { return decryptDES ( Base64 . getDecoder ( ) . decode ( data ) , key ) ; } catch ( Exception e ) { return null ; }
public class DataPipe { /** * Given an array of variable names , returns a delimited { @ link String } * of values . * @ param outTemplate an array of { @ link String } s containing the variable * names . * @ param separator the delimiter to use * @ return a pipe delimited { @ link String } of values */ publi...
StringBuilder b = new StringBuilder ( 1024 ) ; for ( String var : outTemplate ) { if ( b . length ( ) > 0 ) { b . append ( separator ) ; } b . append ( getDataMap ( ) . get ( var ) ) ; } return b . toString ( ) ;
public class FacebookJsonRestClient { /** * Extracts a Boolean from a result that consists of a Boolean only . * @ param val * @ return the Boolean */ protected boolean extractBoolean ( Object val ) { } }
try { return ( Boolean ) val ; } catch ( ClassCastException cce ) { logException ( cce ) ; return false ; }
public class IfcLightDistributionDataImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) public EList < Double > getSecondaryPlaneAngle ( ) { } }
return ( EList < Double > ) eGet ( Ifc2x3tc1Package . Literals . IFC_LIGHT_DISTRIBUTION_DATA__SECONDARY_PLANE_ANGLE , true ) ;
public class ICalComponent { /** * Adds an experimental property to this component . * @ param name the property name ( e . g . " X - ALT - DESC " ) * @ param value the property value * @ return the property object that was created */ public RawProperty addExperimentalProperty ( String name , String value ) { } }
return addExperimentalProperty ( name , null , value ) ;
public class ShortField { /** * Set the Value of this field as a double . * @ param value The value of this field . * @ param iDisplayOption If true , display the new field . * @ param iMoveMove The move mode . * @ return An error code ( NORMAL _ RETURN for success ) . */ public int setValue ( double value , bo...
// Set this field ' s value Short tempshort = new Short ( ( short ) value ) ; int errorCode = this . setData ( tempshort , bDisplayOption , moveMode ) ; return errorCode ;
public class MutableLong { /** * Use the supplied function to perform a lazy transform operation when getValue is called * < pre > * { @ code * MutableLong mutable = MutableLong . fromExternal ( ( ) - > ! this . value , val - > ! this . value ) ; * MutableLong withOverride = mutable . mapOutput ( b - > { * if...
final MutableLong host = this ; return new MutableLong ( ) { @ Override public long getAsLong ( ) { return fn . applyAsLong ( host . getAsLong ( ) ) ; } } ;
public class TargetController { /** * Gets the current deployment for a target . * @ param env the target ' s environment * @ param siteName the target ' s site name * @ return the pending and current deployments for the target * @ throws DeployerException if an error occurred */ @ RequestMapping ( value = GET_...
Target target = targetService . getTarget ( env , siteName ) ; Deployment deployment = target . getCurrentDeployment ( ) ; return new ResponseEntity < > ( deployment , RestServiceUtils . setLocationHeader ( new HttpHeaders ( ) , BASE_URL + GET_CURRENT_DEPLOYMENT_URL , env , siteName ) , HttpStatus . OK ) ;
public class BuildNotDeletedMarshaller { /** * Marshall the given parameter object . */ public void marshall ( BuildNotDeleted buildNotDeleted , ProtocolMarshaller protocolMarshaller ) { } }
if ( buildNotDeleted == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( buildNotDeleted . getId ( ) , ID_BINDING ) ; protocolMarshaller . marshall ( buildNotDeleted . getStatusCode ( ) , STATUSCODE_BINDING ) ; } catch ( Exception e ) { throw...
public class LoggingEventFieldResolver { /** * Determines if specified string is a recognized field . * @ param fieldName field name * @ return true if recognized field . */ public boolean isField ( final String fieldName ) { } }
if ( fieldName != null ) { return ( KEYWORD_LIST . contains ( fieldName . toUpperCase ( Locale . US ) ) || fieldName . toUpperCase ( ) . startsWith ( PROP_FIELD ) ) ; } return false ;
public class VitalTransformer { /** * For the given digital object , find the Fascinator package inside . * @ param object The object with a package * @ return String The payload ID of the package , NULL if not found * @ throws Exception if any errors occur */ private String getPackagePid ( DigitalObject object )...
for ( String pid : object . getPayloadIdList ( ) ) { if ( pid . endsWith ( ".tfpackage" ) ) { return pid ; } } return null ;
public class CircuitBreaker { /** * Sets the { @ code timeout } for executions . Executions that exceed this timeout are not interrupted , but are recorded * as failures once they naturally complete . * @ throws NullPointerException if { @ code timeout } is null * @ throws IllegalArgumentException if { @ code tim...
Assert . notNull ( timeout , "timeout" ) ; Assert . isTrue ( timeout . toNanos ( ) > 0 , "timeout must be greater than 0" ) ; this . timeout = timeout ; return this ;
public class TimerControlTileSkin { /** * * * * * * Methods * * * * * */ @ Override protected void handleEvents ( final String EVENT_TYPE ) { } }
super . handleEvents ( EVENT_TYPE ) ; if ( "VISIBILITY" . equals ( EVENT_TYPE ) ) { Helper . enableNode ( titleText , ! tile . getTitle ( ) . isEmpty ( ) ) ; Helper . enableNode ( text , tile . isTextVisible ( ) ) ; Helper . enableNode ( dateText , tile . isDateVisible ( ) ) ; Helper . enableNode ( second , tile . isSe...
public class UaaStringUtils { /** * Returns a pattern that does a single level regular expression match where * the * character is a wildcard until it encounters the next literal * @ param s * @ return the wildcard pattern */ public static String constructSimpleWildcardPattern ( String s ) { } }
String result = escapeRegExCharacters ( s ) ; // we want to match any characters between dots // so what we do is replace \ * in our escaped string // with [ ^ \ \ . ] + // reference http : / / www . regular - expressions . info / dot . html return result . replace ( "\\*" , "[^\\\\.]+" ) ;
public class Request { /** * Starts a new Request configured to upload a photo to the user ' s default photo album . * This should only be called from the UI thread . * This method is deprecated . Prefer to call Request . newUploadPhotoRequest ( . . . ) . executeAsync ( ) ; * @ param session * the Session to us...
return newUploadPhotoRequest ( session , image , callback ) . executeAsync ( ) ;
public class CommerceAddressUtil { /** * Returns a range of all the commerce addresses where commerceRegionId = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they are indexes i...
return getPersistence ( ) . findByCommerceRegionId ( commerceRegionId , start , end ) ;
public class TypeLexer { /** * $ ANTLR end " WS " */ public void mTokens ( ) throws RecognitionException { } }
// org / javaruntype / type / parser / Type . g : 1:8 : ( ARRAY | UNKNOWN | BEGINTYPEPARAM | ENDTYPEPARAM | COMMA | EXTENDS | SUPER | EXT | SUP | CLASSNAME | WS ) int alt3 = 11 ; alt3 = dfa3 . predict ( input ) ; switch ( alt3 ) { case 1 : // org / javaruntype / type / parser / Type . g : 1:10 : ARRAY { mARRAY ( ) ; } ...
public class Scalr { /** * Used to crop the given < code > src < / code > image from the top - left corner * and applying any optional { @ link BufferedImageOp } s to the result before * returning it . * < strong > TIP < / strong > : This operation leaves the original < code > src < / code > * image unmodified ...
return crop ( src , 0 , 0 , width , height , ops ) ;
public class ExpressRouteCircuitsInner { /** * Gets all the express route circuits in a resource group . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the PagedList...
return listByResourceGroupNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < ExpressRouteCircuitInner > > , Page < ExpressRouteCircuitInner > > ( ) { @ Override public Page < ExpressRouteCircuitInner > call ( ServiceResponse < Page < ExpressRouteCircuitInner > > response ) { retu...
public class Icon { /** * Called when the part represented by this { @ link Icon } is stiched to the texture . Sets most of the icon fields . * @ param width the width * @ param height the height * @ param x the x * @ param y the y * @ param rotated the rotated */ @ Override public void initSprite ( int width...
if ( width == 0 || height == 0 ) { // assume block atlas width = BLOCK_TEXTURE_WIDTH ; height = BLOCK_TEXTURE_HEIGHT ; } this . sheetWidth = width ; this . sheetHeight = height ; super . initSprite ( width , height , x , y , rotated ) ; for ( TextureAtlasSprite dep : dependants ) { if ( dep instanceof Icon ) ( ( Icon )...
public class Main { /** * The * @ param args * @ throws Exception */ public static void main ( String [ ] args ) throws Exception { } }
Shell shell = new ShellImpl ( ) ; shell . init ( args ) ; shell . run ( ) ; System . exit ( 0 ) ;
public class RelatedTablesCoreExtension { /** * Remove a specific relationship from the GeoPackage * @ param baseTableName * base table name * @ param relatedTableName * related table name * @ param relationName * relation name */ public void removeRelationship ( String baseTableName , String relatedTableNa...
try { if ( extendedRelationsDao . isTableExists ( ) ) { List < ExtendedRelation > extendedRelations = getRelations ( baseTableName , relatedTableName , relationName , null ) ; for ( ExtendedRelation extendedRelation : extendedRelations ) { removeRelationship ( extendedRelation ) ; } } } catch ( SQLException e ) { throw...
public class MessageBirdClient { /** * Removes a contact from group . You need to supply the IDs of the group * and contact . Does not delete the contact . */ public void deleteGroupContact ( final String groupId , final String contactId ) throws NotFoundException , GeneralException , UnauthorizedException { } }
if ( groupId == null ) { throw new IllegalArgumentException ( "Group ID must be specified." ) ; } if ( contactId == null ) { throw new IllegalArgumentException ( "Contact ID must be specified." ) ; } String id = String . format ( "%s%s/%s" , groupId , CONTACTPATH , contactId ) ; messageBirdService . deleteByID ( GROUPP...
public class VoltCompiler { /** * Internal method for compiling with and without a project . xml file or DDL files . * @ param projectReader Reader for project file or null if a project file is not used . * @ param ddlFilePaths The list of DDL files to compile ( when no project is provided ) . * @ param jarOutput...
// Expect to have either > 1 ddl file or a project file . assert ( ddlReaderList . size ( ) > 0 ) ; // Make a temporary local output jar if one wasn ' t provided . final InMemoryJarfile jarOutput = ( jarOutputRet != null ? jarOutputRet : new InMemoryJarfile ( ) ) ; if ( ddlReaderList == null || ddlReaderList . isEmpty ...
public class CommerceOrderItemLocalServiceWrapper { /** * Deletes the commerce order item from the database . Also notifies the appropriate model listeners . * @ param commerceOrderItem the commerce order item * @ return the commerce order item that was removed * @ throws PortalException */ @ Deprecated @ Overrid...
return _commerceOrderItemLocalService . deleteCommerceOrderItem ( commerceOrderItem ) ;
public class RenameProperties { /** * Gets the property renaming map ( the " answer key " ) . * @ return A mapping from original names to new names */ VariableMap getPropertyMap ( ) { } }
ImmutableMap . Builder < String , String > map = ImmutableMap . builder ( ) ; for ( Property p : propertyMap . values ( ) ) { if ( p . newName != null ) { map . put ( p . oldName , p . newName ) ; } } return new VariableMap ( map . build ( ) ) ;
public class Lifecycle { /** * Initializes all components immediately on the caller ' s thread . */ public void init ( ) { } }
if ( _initers == null ) { log . warning ( "Refusing repeat init() request." ) ; return ; } ObserverList < InitComponent > list = _initers . toObserverList ( ) ; _initers = null ; list . apply ( new ObserverList . ObserverOp < InitComponent > ( ) { public boolean apply ( InitComponent comp ) { log . debug ( "Initializin...
public class WorkspaceBundleMarshaller { /** * Marshall the given parameter object . */ public void marshall ( WorkspaceBundle workspaceBundle , ProtocolMarshaller protocolMarshaller ) { } }
if ( workspaceBundle == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( workspaceBundle . getBundleId ( ) , BUNDLEID_BINDING ) ; protocolMarshaller . marshall ( workspaceBundle . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall (...
public class Char { /** * Replaces all codes in a String by the 16 bit Unicode characters */ public static String decode ( String s ) { } }
StringBuilder b = new StringBuilder ( ) ; int [ ] eatLength = new int [ 1 ] ; while ( s . length ( ) > 0 ) { char c = eatPercentage ( s , eatLength ) ; if ( eatLength [ 0 ] <= 0 ) { c = eatAmpersand ( s , eatLength ) ; if ( eatLength [ 0 ] <= 0 ) { c = eatBackslash ( s , eatLength ) ; if ( eatLength [ 0 ] <= 0 ) { c = ...
public class DescribeClientVpnTargetNetworksResult { /** * Information about the associated target networks . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setClientVpnTargetNetworks ( java . util . Collection ) } or * { @ link # withClientVpnTargetNetwor...
if ( this . clientVpnTargetNetworks == null ) { setClientVpnTargetNetworks ( new com . amazonaws . internal . SdkInternalList < TargetNetwork > ( clientVpnTargetNetworks . length ) ) ; } for ( TargetNetwork ele : clientVpnTargetNetworks ) { this . clientVpnTargetNetworks . add ( ele ) ; } return this ;
public class RoadNetworkLayer { @ Override @ Pure public RoadPolyline getMapElementAt ( int index ) { } }
final Iterator < RoadSegment > segments = this . roadNetwork . iterator ( ) ; for ( int i = 0 ; i < index - 1 && segments . hasNext ( ) ; ++ i ) { segments . next ( ) ; } if ( segments . hasNext ( ) ) { return ( RoadPolyline ) segments . next ( ) ; } throw new IndexOutOfBoundsException ( ) ;
public class XmlValidationMatcher { /** * Initialize xml message validator if not injected by Spring bean context . * @ throws Exception */ public void afterPropertiesSet ( ) throws Exception { } }
// try to find xml message validator in registry for ( MessageValidator < ? extends ValidationContext > messageValidator : messageValidatorRegistry . getMessageValidators ( ) ) { if ( messageValidator instanceof DomXmlMessageValidator && messageValidator . supportsMessageType ( MessageType . XML . name ( ) , new Defaul...
public class AWTResultListener { /** * documentation inherited from interface */ public void requestCompleted ( final T result ) { } }
EventQueue . invokeLater ( new Runnable ( ) { public void run ( ) { _target . requestCompleted ( result ) ; } } ) ;
public class Scan { /** * Scans the named class for uses of deprecated APIs . * @ param className the class to scan * @ return true on success , false on failure */ public boolean processClassName ( String className ) { } }
try { ClassFile cf = finder . find ( className ) ; if ( cf == null ) { errorNoClass ( className ) ; return false ; } else { processClass ( cf ) ; return true ; } } catch ( ConstantPoolException ex ) { errorException ( ex ) ; return false ; }
public class DuplicationTaskProcessor { /** * Determines if source and destination properties are equal . * @ param sourceProps properties from the source content item * @ param destProps properties from the destination content item * @ return true if all properties match */ protected boolean compareProperties ( ...
return sourceProps . equals ( destProps ) ;
public class LinearSearch { /** * Search for the value in the int array and return the index of the specified occurrence from the * beginning of the array . * @ param intArray array that we are searching in . * @ param value value that is being searched in the array . * @ param occurrence number of times we hav...
if ( occurrence <= 0 || occurrence > intArray . length ) { throw new IllegalArgumentException ( "Occurrence must be greater or equal to 1 and less than " + "the array length: " + occurrence ) ; } int valuesSeen = 0 ; for ( int i = 0 ; i < intArray . length ; i ++ ) { if ( intArray [ i ] == value ) { valuesSeen ++ ; if ...
public class WriteExcelUtils { /** * 向工作簿中写入beans , 所有bean写在一个Sheet中 , 默认以bean中的所有属性作为标题且写入第0行 , 0 - based 。 * 日期格式采用默认类型 。 并输出到指定file中 * @ param file 指定Excel输出文件 * @ param excelType 输出Excel文件类型 { @ link # XLSX } 或者 { @ link # XLS } , 此类型必须与file文件名后缀匹配 * @ param beans 指定写入的Beans ( 或者泛型为Map ) * @ param count 指...
Workbook workbook = null ; if ( XLSX == excelType ) { workbook = new XSSFWorkbook ( ) ; } else if ( XLS == excelType ) { workbook = new HSSFWorkbook ( ) ; } else { throw new WriteExcelException ( "excelType参数错误" ) ; } if ( beans == null || beans . isEmpty ( ) ) { throw new WriteExcelException ( "beans参数不能为空" ) ; } Map ...
public class SQLExpressions { /** * CORR returns the coefficient of correlation of a set of number pairs . * @ param expr1 first arg * @ param expr2 second arg * @ return corr ( expr1 , expr2) */ public static WindowOver < Double > corr ( Expression < ? extends Number > expr1 , Expression < ? extends Number > exp...
return new WindowOver < Double > ( Double . class , SQLOps . CORR , expr1 , expr2 ) ;
public class BoxFactory { /** * Creates a subtree of a parent box that corresponds to a single child DOM node of this box and adds the subtree to the complete tree . * @ param n the root DOM node of the subtree being created * @ param stat curent box creation status for obtaining the containing boxes */ private voi...
// store current status for the parent stat . parent . curstat = new BoxTreeCreationStatus ( stat ) ; // Create the new box for the child Box newbox ; boolean istext = false ; if ( n . getNodeType ( ) == Node . TEXT_NODE ) { newbox = createTextBox ( ( Text ) n , stat ) ; istext = true ; } else newbox = createElementBox...
public class AmazonECSWaiters { /** * Builds a ServicesStable waiter by using custom parameters waiterParameters and other parameters defined in the * waiters specification , and then polls until it determines whether the resource entered the desired state or not , * where polling criteria is bound by either defaul...
return new WaiterBuilder < DescribeServicesRequest , DescribeServicesResult > ( ) . withSdkFunction ( new DescribeServicesFunction ( client ) ) . withAcceptors ( new ServicesStable . IsMISSINGMatcher ( ) , new ServicesStable . IsDRAININGMatcher ( ) , new ServicesStable . IsINACTIVEMatcher ( ) , new ServicesStable . IsT...
public class TextViewWithCircularIndicator { /** * Programmatically set the color state list ( see mdtp _ date _ picker _ year _ selector ) * @ param accentColor pressed state text color * @ param darkMode current theme mode * @ return ColorStateList with pressed state */ private ColorStateList createTextColor ( ...
int [ ] [ ] states = new int [ ] [ ] { new int [ ] { android . R . attr . state_pressed } , // pressed new int [ ] { android . R . attr . state_selected } , // selected new int [ ] { } } ; int [ ] colors = new int [ ] { accentColor , Color . WHITE , darkMode ? Color . WHITE : Color . BLACK } ; return new ColorStateList...
public class MarkerRulerAction { /** * Fills markers field with all of the FindBugs markers associated with the * current line in the text editor ' s ruler marign . */ protected void obtainFindBugsMarkers ( ) { } }
// Delete old markers markers . clear ( ) ; if ( editor == null || ruler == null ) { return ; } // Obtain all markers in the editor IResource resource = ( IResource ) editor . getEditorInput ( ) . getAdapter ( IFile . class ) ; if ( resource == null ) { return ; } IMarker [ ] allMarkers = MarkerUtil . getMarkers ( reso...
public class MmtfActions { /** * Write a Structure object to an { @ link OutputStream } * @ param structure the Structure to write * @ param outputStream the { @ link OutputStream } to write to * @ throws IOException an error transferring the byte [ ] */ public static void writeToOutputStream ( Structure structur...
// Set up this writer AdapterToStructureData writerToEncoder = new AdapterToStructureData ( ) ; // Get the writer - this is what people implement new MmtfStructureWriter ( structure , writerToEncoder ) ; // Now write this data to file byte [ ] outputBytes = WriterUtils . getDataAsByteArr ( writerToEncoder ) ; outputStr...
public class GuiUtilities { /** * Adds to a textfield and button the necessary to browse for a folder . * @ param pathTextField * @ param browseButton */ public static void setFolderBrowsingOnWidgets ( JTextField pathTextField , JButton browseButton ) { } }
browseButton . addActionListener ( e -> { File lastFile = GuiUtilities . getLastFile ( ) ; File [ ] res = showOpenFolderDialog ( browseButton , "Select folder" , false , lastFile ) ; if ( res != null && res . length == 1 ) { String absolutePath = res [ 0 ] . getAbsolutePath ( ) ; pathTextField . setText ( absolutePath ...
public class ConstraintSolver { /** * Get the ID of a { @ link Variable } . * @ param var The { @ link Variable } of which to get the ID . * @ return The ID of the given variable . */ public int getID ( Variable var ) { } }
Variable [ ] vars = this . getVariables ( ) ; for ( int i = 0 ; i < vars . length ; i ++ ) { if ( vars [ i ] . equals ( var ) ) return i ; } return - 1 ;
public class CommerceCountryWrapper { /** * Sets the localized name of this commerce country in the language . * @ param name the localized name of this commerce country * @ param locale the locale of the language */ @ Override public void setName ( String name , java . util . Locale locale ) { } }
_commerceCountry . setName ( name , locale ) ;
public class LDAPController { /** * Deleting a mapping */ @ RequestMapping ( value = "ldap-mapping/{id}/delete" , method = RequestMethod . DELETE ) public Ack deleteMapping ( @ PathVariable ID id ) { } }
securityService . checkGlobalFunction ( AccountGroupManagement . class ) ; return accountGroupMappingService . deleteMapping ( LDAPExtensionFeature . LDAP_GROUP_MAPPING , id ) ;
public class NewtsService { /** * Copy - pasta from http : / / jitterted . com / tidbits / 2014/09/12 / cors - for - dropwizard - 0-7 - x / */ private void configureCors ( Environment environment ) { } }
Dynamic filter = environment . servlets ( ) . addFilter ( "CORS" , CrossOriginFilter . class ) ; filter . addMappingForUrlPatterns ( EnumSet . allOf ( DispatcherType . class ) , true , "/*" ) ; filter . setInitParameter ( CrossOriginFilter . ALLOWED_METHODS_PARAM , "GET,PUT,POST,DELETE,OPTIONS" ) ; filter . setInitPara...
public class EJBUtils { /** * d457128 */ static void validateEjbClass ( Class < ? > ejbClass , String beanName , int beanType ) throws EJBConfigurationException { } }
int modifiers = ejbClass . getModifiers ( ) ; if ( ! Modifier . isPublic ( modifiers ) ) { // Log the error and throw meaningful exception . d457128.2 Tr . error ( tc , "JIT_NON_PUBLIC_CLASS_CNTR5003E" , new Object [ ] { beanName , ejbClass . getName ( ) } ) ; throw new EJBConfigurationException ( "EJB class " + ejbCla...
public class SortedCellTable { /** * Adds a column to the table and sets its sortable state * @ param column * @ param header * @ param sortable */ public void addColumn ( Column < T , ? > column , Header < ? > header , boolean sortable ) { } }
addColumn ( column , header ) ; column . setSortable ( sortable ) ; if ( sortable ) { defaultSortOrderMap . put ( column , true ) ; }
public class AbstractTypedVisitor { /** * Given an arbitrary target type , filter out the target reference types . For * example , consider the following method : * < pre > * method f ( int x ) : * & int | null xs = new ( x ) * < / pre > * When type checking the expression < code > new ( x ) < / code > the ...
Type . Reference type = asType ( expr . getType ( ) , Type . Reference . class ) ; Type . Reference [ ] references = TYPE_REFERENCE_FILTER . apply ( target ) ; return selectCandidate ( references , type , environment ) ;
public class BufferUtils { /** * Append bytes to a buffer . * @ param to Buffer is flush mode * @ param b bytes to append * @ param off offset into byte * @ param len length to append * @ throws BufferOverflowException if unable to append buffer due to space limits */ public static void append ( ByteBuffer to...
int pos = flipToFill ( to ) ; try { to . put ( b , off , len ) ; } finally { flipToFlush ( to , pos ) ; }
public class FontFileReader { /** * Return a copy of the internal array * @ param offset The absolute offset to start reading from * @ param length The number of bytes to read * @ return An array of bytes * @ throws IOException if out of bounds */ public byte [ ] getBytes ( int offset , int length ) throws IOEx...
if ( ( offset + length ) > fsize ) { throw new java . io . IOException ( "Reached EOF" ) ; } byte [ ] ret = new byte [ length ] ; System . arraycopy ( file , offset , ret , 0 , length ) ; return ret ;
public class ModuleUpnpImpl { /** * { @ inheritDoc } */ public ListUpnpServerFilesOperation buildListUpnpServerFilesOperation ( String urlUpnpServer , String directoryId , int offset , int numberElements ) { } }
return new ListUpnpServerFilesOperation ( getOperationFactory ( ) , urlUpnpServer , directoryId , offset , numberElements ) ;
public class TechnologyTargeting { /** * Sets the mobileDeviceSubmodelTargeting value for this TechnologyTargeting . * @ param mobileDeviceSubmodelTargeting * The mobile device submodels being targeted by the { @ link LineItem } . */ public void setMobileDeviceSubmodelTargeting ( com . google . api . ads . admanager ...
this . mobileDeviceSubmodelTargeting = mobileDeviceSubmodelTargeting ;
public class FuncNormalizeSpace { /** * Execute the function . The function must return * a valid object . * @ param xctxt The current execution context . * @ return A valid XObject . * @ throws javax . xml . transform . TransformerException */ public XObject execute ( XPathContext xctxt ) throws javax . xml . ...
XMLString s1 = getArg0AsString ( xctxt ) ; return ( XString ) s1 . fixWhiteSpace ( true , true , false ) ;
public class Authorizer { /** * A list of the Amazon Cognito user pool ARNs for the < code > COGNITO _ USER _ POOLS < / code > authorizer . Each element is * of this format : < code > arn : aws : cognito - idp : { region } : { account _ id } : userpool / { user _ pool _ id } < / code > . For a * < code > TOKEN < / ...
if ( providerARNs == null ) { this . providerARNs = null ; return ; } this . providerARNs = new java . util . ArrayList < String > ( providerARNs ) ;
public class AbstractParsedStmt { /** * Return StmtTableScan by table alias . In case of correlated queries , * may need to walk up the statement tree . * @ param tableAlias */ private StmtTableScan resolveStmtTableScanByAlias ( String tableAlias ) { } }
StmtTableScan tableScan = getStmtTableScanByAlias ( tableAlias ) ; if ( tableScan != null ) { return tableScan ; } if ( m_parentStmt != null ) { // This may be a correlated subquery return m_parentStmt . resolveStmtTableScanByAlias ( tableAlias ) ; } return null ;
public class AmazonLightsailClient { /** * Creates an AWS CloudFormation stack , which creates a new Amazon EC2 instance from an exported Amazon Lightsail * snapshot . This operation results in a CloudFormation stack record that can be used to track the AWS * CloudFormation stack created . Use the < code > get clou...
request = beforeClientExecution ( request ) ; return executeCreateCloudFormationStack ( request ) ;
public class ProteinPocketFinder { /** * Creates from a PDB File a BioPolymer . */ private void readBioPolymer ( String biopolymerFile ) { } }
try { // Read PDB file FileReader fileReader = new FileReader ( biopolymerFile ) ; ISimpleChemObjectReader reader = new ReaderFactory ( ) . createReader ( fileReader ) ; IChemFile chemFile = ( IChemFile ) reader . read ( ( IChemObject ) new ChemFile ( ) ) ; // Get molecule from ChemFile IChemSequence chemSequence = che...
public class BuildUtil { /** * Convenience method for getting a specific task directly . * @ param pTaskName the task to get * @ param pDepConfig the dependency configuration for which the task is intended * @ return a task object */ @ Nonnull public Task getTask ( @ Nonnull final TaskNames pTaskName , @ Nonnull ...
return project . getTasks ( ) . getByName ( pTaskName . getName ( pDepConfig ) ) ;
public class SimpleClassifierAdapter { /** * Creates a new learner object . * @ return the learner */ @ Override public SimpleClassifierAdapter create ( ) { } }
SimpleClassifierAdapter l = new SimpleClassifierAdapter ( learner , dataset ) ; if ( dataset == null ) { System . out . println ( "dataset null while creating" ) ; } return l ;
public class StreamPersistedValueData { /** * Spools the content extracted from the URL */ private void spoolContent ( InputStream is ) throws IOException , FileNotFoundException { } }
SwapFile swapFile = SwapFile . get ( spoolConfig . tempDirectory , System . currentTimeMillis ( ) + "_" + SEQUENCE . incrementAndGet ( ) , spoolConfig . fileCleaner ) ; try { OutputStream os = PrivilegedFileHelper . fileOutputStream ( swapFile ) ; try { byte [ ] bytes = new byte [ 1024 ] ; int length ; while ( ( length...
public class LoggingHelper { /** * Helper method for formatting transmission and reception messages . * @ param protocol * The protocol used * @ param source * Message source * @ param destination * Message destination * @ param message * The message * @ param inOutMODE * - Enum the designates if th...
return COMM_MESSAGE_FORMAT_IN_OUT . format ( new Object [ ] { inOutMODE , protocol , source , destination , message } ) ;
public class FSEditLogLoader { /** * Load an edit log , and apply the changes to the in - memory structure * This is where we apply edits that we ' ve been writing to disk all * along . */ int loadFSEdits ( EditLogInputStream edits , long lastAppliedTxId ) throws IOException { } }
long startTime = now ( ) ; this . lastAppliedTxId = lastAppliedTxId ; int numEdits = loadFSEdits ( edits , true ) ; FSImage . LOG . info ( "Edits file " + edits . toString ( ) + " of size: " + edits . length ( ) + ", # of edits: " + numEdits + " loaded in: " + ( now ( ) - startTime ) / 1000 + " seconds." ) ; return num...
public class ZipUtil { /** * Returns the compression method of a given entry of the ZIP file . * @ param zip * ZIP file . * @ param name * entry name . * @ return Returns < code > ZipEntry . STORED < / code > , < code > ZipEntry . DEFLATED < / code > or - 1 if * the ZIP file does not contain the given entry...
ZipFile zf = null ; try { zf = new ZipFile ( zip ) ; ZipEntry zipEntry = zf . getEntry ( name ) ; if ( zipEntry == null ) { return - 1 ; } return zipEntry . getMethod ( ) ; } catch ( IOException e ) { throw ZipExceptionUtil . rethrow ( e ) ; } finally { closeQuietly ( zf ) ; }
public class CProductLocalServiceWrapper { /** * Returns all the c products matching the UUID and company . * @ param uuid the UUID of the c products * @ param companyId the primary key of the company * @ return the matching c products , or an empty list if no matches were found */ @ Override public java . util ....
return _cProductLocalService . getCProductsByUuidAndCompanyId ( uuid , companyId ) ;
public class CmsSecurityManager { /** * Deletes a user . < p > * @ param context the current request context * @ param username the name of the user to be deleted * @ throws CmsException if something goes wrong */ public void deleteUser ( CmsRequestContext context , String username ) throws CmsException { } }
CmsUser user = readUser ( context , username ) ; deleteUser ( context , user , null ) ;
public class JsonMapper { /** * This method should only be used by serializers who need recursive calls . It prevents overflow due to circular * references and ensures that the maximum depth of different sub - parts is limited * @ param input the object to serialize * @ return the jsonserialization of the given o...
increaseDepth ( ) ; if ( depth > MAXIMUMDEPTH ) { decreaseDepth ( ) ; return "{ \"error\": \"maximum serialization-depth reached.\" }" ; } StringWriter writer = new StringWriter ( ) ; mapper . writeValue ( writer , input ) ; writer . close ( ) ; decreaseDepth ( ) ; return writer . getBuffer ( ) . toString ( ) ;
public class BlockingTimeoutImpl { /** * Allows testsuites to shorten the domain timeout adder */ private static int resolveDomainTimeoutAdder ( ) { } }
String propValue = WildFlySecurityManager . getPropertyPrivileged ( DOMAIN_TEST_SYSTEM_PROPERTY , DEFAULT_DOMAIN_TIMEOUT_STRING ) ; if ( sysPropDomainValue == null || ! sysPropDomainValue . equals ( propValue ) ) { // First call or the system property changed sysPropDomainValue = propValue ; int number = - 1 ; try { nu...
public class PageServiceImpl { /** * Updates the leaf to a new page . * Called only from TableService . */ boolean compareAndSetLeaf ( Page oldPage , Page page ) { } }
if ( oldPage == page ) { return true ; } int pid = ( int ) page . getId ( ) ; updateTailPid ( pid ) ; if ( oldPage instanceof PageLeafImpl && page instanceof PageLeafImpl ) { PageLeafImpl oldLeaf = ( PageLeafImpl ) oldPage ; PageLeafImpl newLeaf = ( PageLeafImpl ) page ; if ( BlockTree . compareKey ( oldLeaf . getMaxKe...
public class Entry { /** * Unsynchronized . Check that the parent list is not null and therefore the entry * is still valid . Otherwise , throw a runtime exception */ void checkEntryParent ( ) { } }
if ( parentList == null ) { SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0001" , new Object [ ] { "com.ibm.ws.sib.processor.utils.linkedlist.Entry" , "1:239:1.3" } , null ) ) ; // FFDC FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.utils.linkedlis...
public class AtomService { /** * Serialize an AtomService object into an XML document */ public Document serviceToDocument ( ) { } }
final AtomService service = this ; final Document doc = new Document ( ) ; final Element root = new Element ( "service" , ATOM_PROTOCOL ) ; doc . setRootElement ( root ) ; final List < Workspace > spaces = service . getWorkspaces ( ) ; for ( final Workspace space : spaces ) { root . addContent ( space . workspaceToElem...
public class Filter { /** * Returns a combined filter instance that accepts records which are only * accepted by this filter and the one given . * @ return canonical Filter instance * @ throws IllegalArgumentException if filter is null */ public Filter < S > and ( Filter < S > filter ) { } }
if ( filter . isOpen ( ) ) { return this ; } if ( filter . isClosed ( ) ) { return filter ; } return AndFilter . getCanonical ( this , filter ) ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcWindowType ( ) { } }
if ( ifcWindowTypeEClass == null ) { ifcWindowTypeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 769 ) ; } return ifcWindowTypeEClass ;
public class TypeEnter { /** * Generate call to superclass constructor . This is : * super ( id _ 0 , . . . , id _ n ) * or , if based = = true * id _ 0 . super ( id _ 1 , . . . , id _ n ) * where id _ 0 , . . . , id _ n are the names of the given parameters . * @ param make The tree factory * @ param param...
JCExpression meth ; if ( based ) { meth = make . Select ( make . Ident ( params . head ) , names . _super ) ; params = params . tail ; } else { meth = make . Ident ( names . _super ) ; } List < JCExpression > typeargs = typarams . nonEmpty ( ) ? make . Types ( typarams ) : null ; return make . Exec ( make . Apply ( typ...
public class AbstractListSelectionGuard { /** * Handle a change in the selectionHolder value . */ public void propertyChange ( PropertyChangeEvent evt ) { } }
int [ ] selected = ( int [ ] ) selectionHolder . getValue ( ) ; guarded . setEnabled ( shouldEnable ( selected ) ) ;
public class JedisCollections { /** * Get a { @ link java . util . Set } abstraction of a sorted set redis value in the specified key , using the given { @ link Jedis } . * @ param jedis the { @ link Jedis } connection to use for the sorted set operations . * @ param key the key of the sorted set value in redis *...
return new JedisSortedSet ( jedis , key , scoreProvider ) ;
public class StringBlock { /** * Extracts a string from the string pool at the given index . * @ param index Position of string in the string pool . * @ return A String representation of the encoded string pool entry . */ private String stringAt ( int index ) { } }
// Determine the offset from the start of the string pool . int offset = m_stringOffsets [ index ] ; // For convenience , wrap the string pool in ByteBuffer // so that it will handle advancing the buffer index . ByteBuffer buffer = ByteBuffer . wrap ( m_stringPool , offset , m_stringPool . length - offset ) . order ( B...
public class CmsFileTable { /** * Returns the current table state . < p > * @ return the table state */ public CmsFileExplorerSettings getTableSettings ( ) { } }
CmsFileExplorerSettings fileTableState = new CmsFileExplorerSettings ( ) ; fileTableState . setSortAscending ( m_fileTable . isSortAscending ( ) ) ; fileTableState . setSortColumnId ( ( CmsResourceTableProperty ) m_fileTable . getSortContainerPropertyId ( ) ) ; List < CmsResourceTableProperty > collapsedCollumns = new ...
public class MessageLog { /** * Get the table name . */ public String getTableNames ( boolean bAddQuotes ) { } }
return ( m_tableName == null ) ? Record . formatTableNames ( MESSAGE_LOG_FILE , bAddQuotes ) : super . getTableNames ( bAddQuotes ) ;
public class ClassWriterImpl { /** * Get the class helper tree for the given class . * @ param type the class to print the helper for * @ return a content tree for class helper */ private Content getTreeForClassHelper ( Type type ) { } }
Content li = new HtmlTree ( HtmlTag . LI ) ; if ( type . equals ( classDoc ) ) { Content typeParameters = getTypeParameterLinks ( new LinkInfoImpl ( configuration , LinkInfoImpl . Kind . TREE , classDoc ) ) ; if ( configuration . shouldExcludeQualifier ( classDoc . containingPackage ( ) . name ( ) ) ) { li . addContent...
public class ViewTransform { /** * Transforms the input to well - formed XML . */ @ Override public void transform ( InputStream inputStream , OutputStream outputStream ) throws Exception { } }
try ( BufferedReader reader = new BufferedReader ( new InputStreamReader ( inputStream , CS_WIN1252 ) ) ) { String line ; String closingTag = null ; Stack < String > stack = new Stack < > ( ) ; String id = null ; String url = null ; String label = null ; while ( ( line = reader . readLine ( ) ) != null ) { line = line ...
public class GaliosFieldTableOps { /** * Computes the following ( x * y ) mod primitive . This is done by */ public int multiply ( int x , int y ) { } }
if ( x == 0 || y == 0 ) return 0 ; return exp [ log [ x ] + log [ y ] ] ;
public class AmazonEC2AsyncClient { /** * Simplified method form for invoking the DescribeConversionTasks operation with an AsyncHandler . * @ see # describeConversionTasksAsync ( DescribeConversionTasksRequest , com . amazonaws . handlers . AsyncHandler ) */ @ Override public java . util . concurrent . Future < Desc...
return describeConversionTasksAsync ( new DescribeConversionTasksRequest ( ) , asyncHandler ) ;
public class CacheManagerBuilder { /** * Specializes the returned { @ link CacheManager } subtype through a specific { @ link CacheManagerConfiguration } which * will optionally add configurations to the returned builder . * @ param cfg the { @ code CacheManagerConfiguration } to use * @ param < N > the subtype o...
return cfg . builder ( this ) ;
public class MoreGraphs { /** * Sorts a directed acyclic graph into a list . * < p > The particular order of elements without prerequisites is determined by the natural order . < / p > * @ param graph the graph to be sorted * @ param < T > the node type , implementing { @ link Comparable } * @ return the sorted...
return topologicalSort ( graph , SortType . comparable ( ) ) ;