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 gleich elemente , bei denen es mit // sicherheit nicht funktionieren kann if ( destPath . startsWith ( getPath ( ) ) ) { for ( MultipleSyntaxElements l : childContainers ) { if ( l . propagateValue ( destPath , value , tryToCreate , allowOverwrite ) ) { ret = true ; break ; } } if ( ! ret && tryToCreate ) { // der Wert konnte nicht gesetzt werden - > möglicherweise // existiert ja nur der entsprechende child - container noch // nicht log . trace ( getPath ( ) + ": could not set value for " + destPath ) ; // Namen des fehlenden Elementes ermitteln String subPath = destPath . substring ( getPath ( ) . length ( ) + 1 ) ; log . trace ( " subpath is " + subPath ) ; int dotPos = subPath . indexOf ( '.' ) ; if ( dotPos == - 1 ) { dotPos = subPath . length ( ) ; } String subType = subPath . substring ( 0 , dotPos ) ; log . trace ( " subname is " + subType ) ; int counterPos = subType . indexOf ( '_' ) ; if ( counterPos != - 1 ) { subType = subType . substring ( 0 , counterPos ) ; } log . trace ( " subType is " + subType ) ; // hier überprüfen , ob es wirklich noch keinen child - container // mit diesem Namen gibt . Wenn z . B . der pfad msg . gv . ueb . kik . blz // gesucht wird und msg . gv schon existiert , wird diese methode // hier in msg . gv ausgeführt . wenn sie fehlschlägt ( z . b . weil // tatsächlich kein . ueb . kik . blz angelegt werden kann ) , wird false // ( " can not propagate " ) zurückgegeben . im übergeordneten modul // ( msg ) soll dann nicht versucht werden , das nächste sub - element // ( gv ) anzulegen - dieser test merkt , dass es " gv " schon gibt boolean found = false ; for ( MultipleSyntaxElements c : childContainers ) { if ( c . getName ( ) . equals ( subType ) ) { found = true ; break ; } } if ( ! found ) { // jetzt durch alle child - elemente des definierenden XML - Knotens // loopen und den ref - Knoten suchen , der das fehlende Element // beschreibt int newChildIdx = 0 ; Node ref ; found = false ; for ( ref = def . getFirstChild ( ) ; ref != null ; ref = ref . getNextSibling ( ) ) { if ( ref . getNodeType ( ) == Node . ELEMENT_NODE ) { String type = ( ( Element ) ref ) . getAttribute ( "type" ) ; String name = ( ( Element ) ref ) . getAttribute ( "name" ) ; if ( name . length ( ) == 0 ) { name = type ; } if ( name . equals ( subType ) ) { found = true ; break ; } newChildIdx ++ ; } } if ( found ) { // entsprechenden child - container erzeugen MultipleSyntaxElements child = createNewChildContainer ( ref , document ) ; child . setParent ( this ) ; child . setSyntaxIdx ( newChildIdx ) ; if ( getElementTypeName ( ) . equals ( "MSG" ) ) log . trace ( "child container " + child . getPath ( ) + " has syntaxIdx=" + child . getSyntaxIdx ( ) ) ; // aktuelle child - container - liste durchlaufen und den neu // erzeugten child - container dort richtig einsortieren int newPosi = 0 ; for ( MultipleSyntaxElements c : childContainers ) { if ( c . getSyntaxIdx ( ) > newChildIdx ) { // der gerade betrachtete child - container hat einen idx // gröÃer als den des einzufügenden elementes , also wird // sich diese position gemerkt und das element hier eingefügt break ; } newPosi ++ ; } log . trace ( " inserting child container with syntaxIdx " + newChildIdx + " at position " + newPosi ) ; childContainers . add ( newPosi , child ) ; // now try to propagate the value to the newly created child ret = child . propagateValue ( destPath , value , tryToCreate , allowOverwrite ) ; } } else { log . trace ( " subtype " + subType + " already existing - will not try to create" ) ; } } } } return ret ;
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 resource" , ex ) ; return false ; }
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 updateAuthEventFeedbackRequest * @ return Result of the UpdateAuthEventFeedback operation returned by the service . * @ throws InvalidParameterException * This exception is thrown when the Amazon Cognito service encounters an invalid parameter . * @ throws ResourceNotFoundException * This exception is thrown when the Amazon Cognito service cannot find the requested resource . * @ throws TooManyRequestsException * This exception is thrown when the user has made too many requests for a given operation . * @ throws NotAuthorizedException * This exception is thrown when a user is not authorized . * @ throws UserNotFoundException * This exception is thrown when a user is not found . * @ throws UserPoolAddOnNotEnabledException * This exception is thrown when user pool add - ons are not enabled . * @ throws InternalErrorException * This exception is thrown when Amazon Cognito encounters an internal error . * @ sample AWSCognitoIdentityProvider . UpdateAuthEventFeedback * @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / cognito - idp - 2016-04-18 / UpdateAuthEventFeedback " * target = " _ top " > AWS API Documentation < / a > */ @ Override public UpdateAuthEventFeedbackResult updateAuthEventFeedback ( UpdateAuthEventFeedbackRequest request ) { } }
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 . xmlText ( ) ; String prefix = srcString . substring ( 0 , srcString . indexOf ( ">" ) + 1 ) ; String sufix = srcString . substring ( srcString . lastIndexOf ( "<" ) ) ; List < String > addParts = new ArrayList < String > ( ) ; for ( NiceXWPFDocument docMerge : docMerges ) { addParts . add ( extractMergePart ( docMerge ) ) ; } CTP makeBody = CTP . Factory . parse ( prefix + StringUtils . join ( addParts , "" ) + sufix ) ; ctp . set ( makeBody ) ; String xmlText = body . xmlText ( ) ; xmlText = xmlText . replaceAll ( "<w:p><w:p>" , "<w:p>" ) . replaceAll ( "<w:p><w:p\\s" , "<w:p " ) . replaceAll ( "<w:p><w:tbl>" , "<w:tbl>" ) . replaceAll ( "<w:p><w:tbl\\s" , "<w:tbl " ) ; xmlText = xmlText . replaceAll ( "</w:sectPr></w:p>" , "</w:sectPr>" ) . replaceAll ( "</w:p></w:p>" , "</w:p>" ) . replaceAll ( "</w:tbl></w:p>" , "</w:tbl>" ) . replaceAll ( "<w:p(\\s[A-Za-z0-9:\\s=\"]*)?/></w:p>" , "" ) ; // System . out . println ( xmlText ) ; body . set ( CTBody . Factory . parse ( xmlText ) ) ; return generate ( ) ;
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 , ? > > Map < T , String > sort ( List < T > datas , String property ) { } }
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 ) ; return tag0 . compareTo ( tag1 ) ; } } ) ; return sortedMap ;
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 . * @ return The data stream that is the result of applying the fold function to the window . * @ deprecated use { @ link # aggregate ( AggregationFunction ) } instead */ @ Deprecated public < R > SingleOutputStreamOperator < R > fold ( R initialValue , FoldFunction < T , R > function ) { } }
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 . getCallLocationName ( ) , true ) ; return fold ( initialValue , function , resultType ) ;
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 ( Range rangeInSeq1 ) { } }
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 , final SelectionMode selectionMode ) { } }
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 false ; } // Item is specificially set to selectable / unselectable Boolean itemSelectable = ( ( MenuItemSelectable ) item ) . getSelectability ( ) ; if ( itemSelectable != null ) { return itemSelectable ; } // Container has selection turned on return SelectionMode . SINGLE . equals ( selectionMode ) || SelectionMode . MULTIPLE . equals ( selectionMode ) ;
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 none was found . */ public static int indexOfNonWhiteSpace ( CharSequence seq , int offset ) { } }
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 */ public String getDelimited ( String [ ] outTemplate , String separator ) { } }
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 , boolean bDisplayOption , int moveMode ) { } }
// 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 ( override ) * return 10.0; * return b ; * < / pre > * @ param fn Map function to be applied to the result when getValue is called * @ return Mutable that lazily applies the provided function when getValue is called to the return value */ public MutableLong mapOutput ( final LongUnaryOperator fn ) { } }
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_CURRENT_DEPLOYMENT_URL , method = RequestMethod . GET ) public ResponseEntity < Deployment > getCurrentDeployment ( @ PathVariable ( ENV_PATH_VAR_NAME ) String env , @ PathVariable ( SITE_NAME_PATH_VAR_NAME ) String siteName ) throws DeployerException { } }
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 new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
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 ) throws Exception { } }
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 timeout } < = 0 */ public CircuitBreaker < R > withTimeout ( Duration timeout ) { } }
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 . isSecondsVisible ( ) ) ; Helper . enableNode ( sectionsPane , tile . getSectionsVisible ( ) ) ; } else if ( "SECTION" . equals ( EVENT_TYPE ) ) { sectionMap . clear ( ) ; for ( TimeSection section : tile . getTimeSections ( ) ) { sectionMap . put ( section , new Arc ( ) ) ; } sectionsPane . getChildren ( ) . setAll ( sectionMap . values ( ) ) ; resize ( ) ; redraw ( ) ; }
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 use , or null ; if non - null , the session must be in an opened state * @ param image * the image to upload * @ param callback * a callback that will be called when the request is completed to handle success or error conditions * @ return a RequestAsyncTask that is executing the request */ @ Deprecated public static RequestAsyncTask executeUploadPhotoRequestAsync ( Session session , Bitmap image , Callback callback ) { } }
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 in the result set . Thus , < code > 0 < / code > refers to the first result in the set . Setting both < code > start < / code > and < code > end < / code > to { @ link QueryUtil # ALL _ POS } will return the full result set . If < code > orderByComparator < / code > is specified , then the query will include the given ORDER BY logic . If < code > orderByComparator < / code > is absent and pagination is required ( < code > start < / code > and < code > end < / code > are not { @ link QueryUtil # ALL _ POS } ) , then the query will include the default ORDER BY logic from { @ link CommerceAddressModelImpl } . If both < code > orderByComparator < / code > and pagination are absent , for performance reasons , the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order . * @ param commerceRegionId the commerce region ID * @ param start the lower bound of the range of commerce addresses * @ param end the upper bound of the range of commerce addresses ( not inclusive ) * @ return the range of matching commerce addresses */ public static List < CommerceAddress > findByCommerceRegionId ( long commerceRegionId , int start , int end ) { } }
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 ( ) ; } break ; case 2 : // org / javaruntype / type / parser / Type . g : 1:16 : UNKNOWN { mUNKNOWN ( ) ; } break ; case 3 : // org / javaruntype / type / parser / Type . g : 1:24 : BEGINTYPEPARAM { mBEGINTYPEPARAM ( ) ; } break ; case 4 : // org / javaruntype / type / parser / Type . g : 1:39 : ENDTYPEPARAM { mENDTYPEPARAM ( ) ; } break ; case 5 : // org / javaruntype / type / parser / Type . g : 1:52 : COMMA { mCOMMA ( ) ; } break ; case 6 : // org / javaruntype / type / parser / Type . g : 1:58 : EXTENDS { mEXTENDS ( ) ; } break ; case 7 : // org / javaruntype / type / parser / Type . g : 1:66 : SUPER { mSUPER ( ) ; } break ; case 8 : // org / javaruntype / type / parser / Type . g : 1:72 : EXT { mEXT ( ) ; } break ; case 9 : // org / javaruntype / type / parser / Type . g : 1:76 : SUP { mSUP ( ) ; } break ; case 10 : // org / javaruntype / type / parser / Type . g : 1:80 : CLASSNAME { mCLASSNAME ( ) ; } break ; case 11 : // org / javaruntype / type / parser / Type . g : 1:90 : WS { mWS ( ) ; } break ; }
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 . If the caller is done with the < code > src < / code > image * after getting the result of this operation , remember to call * { @ link BufferedImage # flush ( ) } on the < code > src < / code > to free up native * resources and make it easier for the GC to collect the unused image . * @ param src * The image to crop . * @ param width * The width of the bounding cropping box . * @ param height * The height of the bounding cropping box . * @ param ops * < code > 0 < / code > or more ops to apply to the image . If * < code > null < / code > or empty then < code > src < / code > is return * unmodified . * @ return a new { @ link BufferedImage } representing the cropped region of * the < code > src < / code > image with any optional operations applied * to it . * @ throws IllegalArgumentException * if < code > src < / code > is < code > null < / code > . * @ throws IllegalArgumentException * if any coordinates of the bounding crop box is invalid within * the bounds of the < code > src < / code > image ( e . g . negative or * too big ) . * @ throws ImagingOpException * if one of the given { @ link BufferedImageOp } s fails to apply . * These exceptions bubble up from the inside of most of the * { @ link BufferedImageOp } implementations and are explicitly * defined on the imgscalr API to make it easier for callers to * catch the exception ( if they are passing along optional ops * to be applied ) . imgscalr takes detailed steps to avoid the * most common pitfalls that will cause { @ link BufferedImageOp } s * to fail , even when using straight forward JDK - image * operations . */ public static BufferedImage crop ( BufferedImage src , int width , int height , BufferedImageOp ... ops ) throws IllegalArgumentException , ImagingOpException { } }
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 & lt ; ExpressRouteCircuitInner & gt ; object */ public Observable < Page < ExpressRouteCircuitInner > > listByResourceGroupNextAsync ( final String nextPageLink ) { } }
return listByResourceGroupNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < ExpressRouteCircuitInner > > , Page < ExpressRouteCircuitInner > > ( ) { @ Override public Page < ExpressRouteCircuitInner > call ( ServiceResponse < Page < ExpressRouteCircuitInner > > response ) { return response . body ( ) ; } } ) ;
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 , int height , int x , int y , boolean rotated ) { } }
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 ) dep ) . initIcon ( this , width , height , x , y , rotated ) ; else dep . copyFrom ( this ) ; }
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 relatedTableName , String relationName ) { } }
try { if ( extendedRelationsDao . isTableExists ( ) ) { List < ExtendedRelation > extendedRelations = getRelations ( baseTableName , relatedTableName , relationName , null ) ; for ( ExtendedRelation extendedRelation : extendedRelations ) { removeRelationship ( extendedRelation ) ; } } } catch ( SQLException e ) { throw new GeoPackageException ( "Failed to remove relationship '" + relationName + "' between " + baseTableName + " and " + relatedTableName , e ) ; }
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 ( GROUPPATH , id ) ;
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 jarOutputRet The in - memory jar to populate or null if the caller doesn ' t provide one . * @ return The InMemoryJarfile containing the compiled catalog if * successful , null if not . If the caller provided an InMemoryJarfile , the * return value will be the same object , not a copy . */ private InMemoryJarfile compileInternal ( final VoltCompilerReader cannonicalDDLIfAny , final Catalog previousCatalogIfAny , final List < VoltCompilerReader > ddlReaderList , final InMemoryJarfile jarOutputRet ) { } }
// 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 ( ) ) { addErr ( "One or more DDL files are required." ) ; return null ; } // clear out the warnings and errors m_warnings . clear ( ) ; m_infos . clear ( ) ; m_errors . clear ( ) ; // do all the work to get the catalog final Catalog catalog = compileCatalogInternal ( cannonicalDDLIfAny , previousCatalogIfAny , ddlReaderList , jarOutput ) ; if ( catalog == null ) { return null ; } Cluster cluster = catalog . getClusters ( ) . get ( "cluster" ) ; assert ( cluster != null ) ; Database database = cluster . getDatabases ( ) . get ( "database" ) ; assert ( database != null ) ; // Build DDL from Catalog Data String ddlWithBatchSupport = CatalogSchemaTools . toSchema ( catalog ) ; m_canonicalDDL = CatalogSchemaTools . toSchemaWithoutInlineBatches ( ddlWithBatchSupport ) ; // generate the catalog report and write it to disk try { generateCatalogReport ( m_catalog , ddlWithBatchSupport , standaloneCompiler , m_warnings , jarOutput ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; return null ; } jarOutput . put ( AUTOGEN_DDL_FILE_NAME , m_canonicalDDL . getBytes ( Constants . UTF8ENCODING ) ) ; if ( DEBUG_VERIFY_CATALOG ) { debugVerifyCatalog ( jarOutput , catalog ) ; } // WRITE CATALOG TO JAR HERE final String catalogCommands = catalog . serialize ( ) ; byte [ ] catalogBytes = catalogCommands . getBytes ( Constants . UTF8ENCODING ) ; try { // Don ' t update buildinfo if it ' s already present , e . g . while upgrading . // Note when upgrading the version has already been updated by the caller . if ( ! jarOutput . containsKey ( CatalogUtil . CATALOG_BUILDINFO_FILENAME ) ) { addBuildInfo ( jarOutput ) ; } jarOutput . put ( CatalogUtil . CATALOG_FILENAME , catalogBytes ) ; } catch ( final Exception e ) { e . printStackTrace ( ) ; return null ; } assert ( ! hasErrors ( ) ) ; if ( hasErrors ( ) ) { return null ; } return jarOutput ;
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 @ Override public com . liferay . commerce . model . CommerceOrderItem deleteCommerceOrderItem ( com . liferay . commerce . model . CommerceOrderItem commerceOrderItem ) throws com . liferay . portal . kernel . exception . PortalException { } }
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 ( "Initializing component" , "comp" , comp ) ; comp . init ( ) ; return true ; } } ) ;
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 ( workspaceBundle . getOwner ( ) , OWNER_BINDING ) ; protocolMarshaller . marshall ( workspaceBundle . getDescription ( ) , DESCRIPTION_BINDING ) ; protocolMarshaller . marshall ( workspaceBundle . getRootStorage ( ) , ROOTSTORAGE_BINDING ) ; protocolMarshaller . marshall ( workspaceBundle . getUserStorage ( ) , USERSTORAGE_BINDING ) ; protocolMarshaller . marshall ( workspaceBundle . getComputeType ( ) , COMPUTETYPE_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
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 = eatUtf8 ( s , eatLength ) ; if ( eatLength [ 0 ] <= 0 ) { c = s . charAt ( 0 ) ; eatLength [ 0 ] = 1 ; } } } } b . append ( c ) ; s = s . substring ( eatLength [ 0 ] ) ; } return ( b . toString ( ) ) ;
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 # withClientVpnTargetNetworks ( java . util . Collection ) } if you want to override the existing values . * @ param clientVpnTargetNetworks * Information about the associated target networks . * @ return Returns a reference to this object so that method calls can be chained together . */ public DescribeClientVpnTargetNetworksResult withClientVpnTargetNetworks ( TargetNetwork ... clientVpnTargetNetworks ) { } }
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 DefaultMessage ( "" ) ) ) { xmlMessageValidator = ( DomXmlMessageValidator ) messageValidator ; } } if ( xmlMessageValidator == null ) { LOG . warn ( "No XML message validator found in Spring bean context - setting default validator" ) ; xmlMessageValidator = new DomXmlMessageValidator ( ) ; xmlMessageValidator . setApplicationContext ( applicationContext ) ; }
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 ( Map < String , String > sourceProps , Map < String , String > destProps ) { } }
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 have seen the value before returning the index . * @ return the index where the value is found in the array , else - 1. */ public static int search ( int [ ] intArray , int value , int occurrence ) { } }
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 ( valuesSeen == occurrence ) { return i ; } } } return - 1 ;
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 指定每一个Sheet写入几个Bean * @ throws WriteExcelException */ public static < T > void writeWorkBook ( File file , int excelType , List < T > beans , int count ) throws WriteExcelException { } }
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 < String , Object > map = null ; if ( beans . get ( 0 ) instanceof Map ) { map = ( Map < String , Object > ) beans . get ( 0 ) ; } else { map = CommonUtils . toMap ( beans . get ( 0 ) ) ; } if ( map == null ) { throw new WriteExcelException ( "获取bean属性失败" ) ; } List < String > properties = new ArrayList < String > ( ) ; properties . addAll ( map . keySet ( ) ) ; WriteExcelUtils . writeWorkBook ( workbook , count , beans , properties , properties , null ) ; OutputStream os = null ; try { os = new FileOutputStream ( file ) ; WriteExcelUtils . writeWorkBookToExcel ( workbook , os ) ; } catch ( Exception e ) { throw new WriteExcelException ( e . getMessage ( ) ) ; } finally { CommonUtils . closeIOStream ( null , os ) ; }
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 > expr2 ) { } }
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 void createSubtree ( Node n , BoxTreeCreationStatus stat ) { } }
// 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 ( ( Element ) n , stat ) ; // Create the child subtree if ( ! istext ) { // Determine the containing boxes of the children BoxTreeCreationStatus newstat = new BoxTreeCreationStatus ( stat ) ; newstat . parent = ( ElementBox ) newbox ; if ( ( ( ElementBox ) newbox ) . mayContainBlocks ( ) ) // the new box forms a block context { BlockBox block = ( BlockBox ) newbox ; // propagate overflow if necessary if ( ! overflowPropagated ) overflowPropagated = viewport . checkPropagateOverflow ( block ) ; // positioned element ? if ( block . position == BlockBox . POS_ABSOLUTE || block . position == BlockBox . POS_RELATIVE || block . position == BlockBox . POS_FIXED ) { // A positioned box forms a content box for following absolutely positioned boxes newstat . absbox = block ; // update clip box for the block ElementBox cblock = block . getContainingBlockBox ( ) ; if ( cblock instanceof BlockBox && ( cblock . getClipBlock ( ) == null || ( ( BlockBox ) cblock ) . getOverflowX ( ) != Overflow . VISIBLE ) ) block . setClipBlock ( ( BlockBox ) cblock ) ; else block . setClipBlock ( cblock . getClipBlock ( ) ) ; // A box with overflow : hidden creates a clipping box if ( block . overflowX != BlockBox . OVERFLOW_VISIBLE || block . clipRegion != null ) newstat . clipbox = block ; else newstat . clipbox = block . getClipBlock ( ) ; } else // not positioned element { // A box with overflow : hidden creates a clipping box if ( block . overflowX != BlockBox . OVERFLOW_VISIBLE ) newstat . clipbox = block ; } // Any block box forms a containing box for not positioned elements newstat . contbox = block ; // Last inflow box is local for block boxes newstat . lastinflow = null ; // TODO this does not work in some cases ( absolute . html ) // create the subtree createBoxTree ( newstat ) ; // remove trailing whitespaces in blocks removeTrailingWhitespaces ( block ) ; } else createBoxTree ( newstat ) ; } // Add the new box to the parent according to its type addToTree ( newbox , stat ) ;
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 default polling strategy or custom polling strategy . */ public Waiter < DescribeServicesRequest > servicesStable ( ) { } }
return new WaiterBuilder < DescribeServicesRequest , DescribeServicesResult > ( ) . withSdkFunction ( new DescribeServicesFunction ( client ) ) . withAcceptors ( new ServicesStable . IsMISSINGMatcher ( ) , new ServicesStable . IsDRAININGMatcher ( ) , new ServicesStable . IsINACTIVEMatcher ( ) , new ServicesStable . IsTrueMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 40 ) , new FixedDelayStrategy ( 15 ) ) ) . withExecutorService ( executorService ) . build ( ) ;
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 accentColor , boolean darkMode ) { } }
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 ( states , colors ) ;
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 ( resource , IResource . DEPTH_ZERO ) ; if ( allMarkers . length == 0 ) { return ; } // Discover relevant markers , i . e . FindBugsMarkers AbstractMarkerAnnotationModel model = getModel ( ) ; IDocument document = getDocument ( ) ; for ( int i = 0 ; i < allMarkers . length ; i ++ ) { if ( includesRulerLine ( model . getMarkerPosition ( allMarkers [ i ] ) , document ) ) { if ( MarkerUtil . isFindBugsMarker ( allMarkers [ i ] ) ) { markers . add ( allMarkers [ i ] ) ; } } }
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 structure , OutputStream outputStream ) throws IOException { } }
// 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 ) ; outputStream . write ( outputBytes , 0 , outputBytes . length ) ;
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 ) ; setLastPath ( 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 . setInitParameter ( CrossOriginFilter . ALLOWED_ORIGINS_PARAM , "*" ) ; filter . setInitParameter ( CrossOriginFilter . ACCESS_CONTROL_ALLOW_ORIGIN_HEADER , "*" ) ; filter . setInitParameter ( "allowedHeaders" , "Content-Type,Authorization,X-Requested-With,Content-Length,Accept,Origin" ) ; filter . setInitParameter ( "allowCredentials" , "true" ) ;
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 " + ejbClass . getName ( ) + " must be defined as public : " + beanName ) ; } if ( Modifier . isFinal ( modifiers ) ) { // Log the error and throw meaningful exception . d457128.2 Tr . error ( tc , "JIT_INVALID_FINAL_CLASS_CNTR5004E" , new Object [ ] { beanName , ejbClass . getName ( ) } ) ; throw new EJBConfigurationException ( "EJB class " + ejbClass . getName ( ) + " must not be defined as final : " + beanName ) ; } // CMP 2 . x beans must be abstract , whereas CMP 1 . x beans must NOT be // abstract , so just skipping CMP beans entirely . if ( beanType != InternalConstants . TYPE_CONTAINER_MANAGED_ENTITY ) { if ( Modifier . isAbstract ( modifiers ) ) { // Log the error and throw meaningful exception . d457128.2 Tr . error ( tc , "JIT_INVALID_ABSTRACT_CLASS_CNTR5005E" , new Object [ ] { beanName , ejbClass . getName ( ) } ) ; throw new EJBConfigurationException ( "EJB class " + ejbClass . getName ( ) + " must not be defined as abstract : " + beanName ) ; } } if ( ejbClass . getEnclosingClass ( ) != null ) { // Log the error and throw meaningful exception . d457128.2 Tr . error ( tc , "JIT_NOT_TOP_LEVEL_CLASS_CNTR5006E" , new Object [ ] { beanName , ejbClass . getName ( ) } ) ; throw new EJBConfigurationException ( "EJB class " + ejbClass . getName ( ) + " must be a top level class : " + beanName ) ; } try { ejbClass . getConstructor ( NO_PARAMS ) ; } catch ( Throwable ex ) { // FFDC is not needed , as a meaningful exception is being thrown . // FFDCFilter . processException ( ejbex , CLASS _ NAME + " . validateEjbClass " , " 653 " ) ; // Log the error and throw meaningful exception . d457128.2 Tr . error ( tc , "JIT_NO_DEFAULT_CTOR_CNTR5007E" , new Object [ ] { beanName , ejbClass . getName ( ) } ) ; throw new EJBConfigurationException ( "EJB class " + ejbClass . getName ( ) + " must have a public constructor that takes no parameters : " + beanName , ex ) ; } try { ejbClass . getDeclaredMethod ( "finalize" , NO_PARAMS ) ; // Log the error and throw meaningful exception . d457128.2 Tr . error ( tc , "JIT_INVALID_FINALIZE_MTHD_CNTR5008E" , new Object [ ] { beanName , ejbClass . getName ( ) } ) ; throw new EJBConfigurationException ( "EJB class " + ejbClass . getName ( ) + " must not define the finalize() method : " + beanName ) ; } catch ( Throwable ex ) { // FFDC is not needed . . . finalize method should NOT be found . // FFDCFilter . processException ( ejbex , CLASS _ NAME + " . validateEjbClass " , " 667 " ) ; } if ( beanType == InternalConstants . TYPE_BEAN_MANAGED_ENTITY || beanType == InternalConstants . TYPE_CONTAINER_MANAGED_ENTITY ) { if ( ! ( EntityBean . class ) . isAssignableFrom ( ejbClass ) ) { // Log the error and throw meaningful exception . d457128.2 Tr . error ( tc , "JIT_MISSING_ENTITYBEAN_CNTR5009E" , new Object [ ] { beanName , ejbClass . getName ( ) } ) ; throw new EJBConfigurationException ( "EJB Entity class " + ejbClass . getName ( ) + " must implement javax.ejb.EntityBean : " + beanName ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "validateEjbClass : successful : " + ejbClass . getName ( ) ) ;
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 flow type checker * will attempt to determine an < i > expected < / i > reference type . In order to then * determine the appropriate expected type for element expression < code > x < / code > * it filters < code > & int | null < / code > down to just < code > & int < / code > . * @ param target * Target type for this value * @ param expr * Source expression for this value * @ author David J . Pearce */ public Type . Reference selectReference ( Type target , Expr expr , Environment environment ) { } }
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 , byte [ ] b , int off , int len ) throws BufferOverflowException { } }
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 IOException { } }
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 . axis . v201902 . MobileDeviceSubmodelTargeting mobileDeviceSubmodelTargeting ) { } }
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 . transform . TransformerException { } }
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 < / code > or < code > REQUEST < / code > authorizer , this is not defined . * @ param providerARNs * 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 < / code > or < code > REQUEST < / code > authorizer , this is not defined . */ public void setProviderARNs ( java . util . Collection < String > providerARNs ) { } }
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 cloud formation stack records < / code > operation to get a list of * the CloudFormation stacks created . * < important > * Wait until after your new Amazon EC2 instance is created before running the * < code > create cloud formation stack < / code > operation again with the same export snapshot record . * < / important > * @ param createCloudFormationStackRequest * @ return Result of the CreateCloudFormationStack operation returned by the service . * @ throws ServiceException * A general service exception . * @ throws InvalidInputException * Lightsail throws this exception when user input does not conform to the validation rules of an input * field . < / p > < note > * Domain - related APIs are only available in the N . Virginia ( us - east - 1 ) Region . Please set your AWS Region * configuration to us - east - 1 to create , view , or edit these resources . * @ throws NotFoundException * Lightsail throws this exception when it cannot find a resource . * @ throws OperationFailureException * Lightsail throws this exception when an operation fails to execute . * @ throws AccessDeniedException * Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to * access a resource . * @ throws AccountSetupInProgressException * Lightsail throws this exception when an account is still in the setup in progress state . * @ throws UnauthenticatedException * Lightsail throws this exception when the user has not been authenticated . * @ sample AmazonLightsail . CreateCloudFormationStack * @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / lightsail - 2016-11-28 / CreateCloudFormationStack " * target = " _ top " > AWS API Documentation < / a > */ @ Override public CreateCloudFormationStackResult createCloudFormationStack ( CreateCloudFormationStackRequest request ) { } }
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 = chemFile . getChemSequence ( 0 ) ; IChemModel chemModel = chemSequence . getChemModel ( 0 ) ; IAtomContainerSet setOfMolecules = chemModel . getMoleculeSet ( ) ; protein = ( IBioPolymer ) setOfMolecules . getAtomContainer ( 0 ) ; } catch ( IOException | CDKException exc ) { logger . error ( "Could not read BioPolymer from file>" + biopolymerFile + " due to: " + exc . getMessage ( ) ) ; logger . debug ( exc ) ; }
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 final DependencyConfig pDepConfig ) { } }
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 = is . read ( bytes ) ) != - 1 ) { os . write ( bytes , 0 , length ) ; } } finally { os . close ( ) ; } } finally { swapFile . spoolDone ( ) ; is . close ( ) ; } tempFile = swapFile ;
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 this communication protocol is in * coming ( received ) or outgoing ( transmitted ) * @ return A formatted message in the format : * " Rx : / Tx : protocol [ & lt ; protocol & gt ; ] source [ & lt ; source & gt ; ] destination [ & lt ; destination & gt ; ] & lt ; message & gt ; " * < br / > * e . g . Rx : protocol [ OpenCAS ] source [ 234.234.234.234:4321] * destination [ 123.123.123.123:4567 ] 0x0a0b0c0d0e0f */ public static String formatCommunicationMessage ( final String protocol , final String source , final String destination , final String message , final IN_OUT_MODE inOutMODE ) { } }
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 numEdits ;
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 . */ public static int getCompressionMethodOfEntry ( File zip , String name ) { } }
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 . List < com . liferay . commerce . product . model . CProduct > getCProductsByUuidAndCompanyId ( String uuid , long companyId ) { } }
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 object * @ throws java . io . IOException If serialisation of the object failed . */ protected String recurse ( Object input ) throws IOException { } }
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 { number = Integer . valueOf ( sysPropDomainValue ) ; } catch ( NumberFormatException nfe ) { // ignored } if ( number > 0 ) { defaultDomainValue = number ; // this one is in ms } else { ControllerLogger . MGMT_OP_LOGGER . invalidDefaultBlockingTimeout ( sysPropDomainValue , DOMAIN_TEST_SYSTEM_PROPERTY , DEFAULT_DOMAIN_TIMEOUT_ADDER ) ; defaultDomainValue = DEFAULT_DOMAIN_TIMEOUT_ADDER ; } } return defaultDomainValue ;
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 . getMaxKey ( ) , newLeaf . getMaxKey ( ) , 0 ) < 0 ) { System . err . println ( " DERP: " + oldPage + " " + page ) ; Thread . dumpStack ( ) ; /* throw new IllegalStateException ( " DERP : old = " + oldPage + " " + page + " old - dirt : " + oldPage . isDirty ( ) ) ; */ } } boolean result = _pages . compareAndSet ( pid , oldPage , page ) ; return result ;
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.linkedlist.Entry.checkEntryParent" , "1:246:1.3" , this ) ; SibTr . exception ( tc , e ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0001" , new Object [ ] { "com.ibm.ws.sib.processor.utils.linkedlist.Entry" , "1:253:1.3" } ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "checkEntryParent" , e ) ; throw e ; }
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 . workspaceToElement ( ) ) ; } return doc ;
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 params The parameters that need to be passed to super * @ param typarams The type parameters that need to be passed to super * @ param based Is first parameter a this $ n ? */ JCExpressionStatement SuperCall ( TreeMaker make , List < Type > typarams , List < JCVariableDecl > params , boolean based ) { } }
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 ( typeargs , meth , make . Idents ( params ) ) ) ;
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 * @ param scoreProvider the provider to use for assigning scores when none is given explicitly . * @ return the { @ link JedisSortedSet } instance */ public static JedisSortedSet getSortedSet ( Jedis jedis , String key , ScoreProvider scoreProvider ) { } }
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 ( ByteOrder . BIG_ENDIAN ) ; // Now get the decoded string length . int length = decodeLength ( buffer ) ; StringBuilder stringBuilder = new StringBuilder ( ) ; for ( int i = 0 ; i < length ; i ++ ) { if ( m_isUtf8 ) { stringBuilder . append ( ( char ) buffer . get ( ) ) ; } else { int byte1 = buffer . get ( ) ; int byte2 = buffer . get ( ) ; stringBuilder . append ( ( char ) ( byte2 | byte1 ) ) ; } } return stringBuilder . toString ( ) ;
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 ArrayList < CmsResourceTableProperty > ( ) ; Object [ ] visibleCols = m_fileTable . getVisibleColumns ( ) ; for ( int i = 0 ; i < visibleCols . length ; i ++ ) { if ( m_fileTable . isColumnCollapsed ( visibleCols [ i ] ) ) { collapsedCollumns . add ( ( CmsResourceTableProperty ) visibleCols [ i ] ) ; } } fileTableState . setCollapsedColumns ( collapsedCollumns ) ; return fileTableState ;
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 ( type . asClassDoc ( ) . name ( ) ) ; li . addContent ( typeParameters ) ; } else { li . addContent ( type . asClassDoc ( ) . qualifiedName ( ) ) ; li . addContent ( typeParameters ) ; } } else { Content link = getLink ( new LinkInfoImpl ( configuration , LinkInfoImpl . Kind . CLASS_TREE_PARENT , type ) . label ( configuration . getClassName ( type . asClassDoc ( ) ) ) ) ; li . addContent ( link ) ; } return li ;
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 . trim ( ) ; int i = line . indexOf ( '>' , 1 ) ; int j = line . indexOf ( ' ' , 1 ) ; int end = i == - 1 ? j : j == - 1 ? i : i < j ? i : j ; int token = ArrayUtils . indexOf ( TOKENS , end < 1 ? "" : line . substring ( 1 , end ) . toLowerCase ( ) ) ; if ( stack . isEmpty ( ) && token != 0 ) { continue ; } switch ( token ) { case 0 : // < ul > if ( closingTag != null ) { write ( outputStream , ">" , true , 0 ) ; closingTag = "</topic>" ; } stack . push ( closingTag ) ; closingTag = null ; break ; case 1 : // < / ul > write ( outputStream , closingTag , true , 0 ) ; closingTag = stack . pop ( ) ; writeClosingTag ( outputStream , closingTag , stack . size ( ) ) ; closingTag = null ; break ; case 2 : // < li > writeClosingTag ( outputStream , closingTag , 0 ) ; write ( outputStream , "<topic" , false , stack . size ( ) ) ; closingTag = " />" ; break ; case 3 : // < param > String name = extractAttribute ( "name" , line ) ; String value = extractAttribute ( "value" , line ) ; if ( "name" . equalsIgnoreCase ( name ) ) { if ( label == null ) { label = value ; } else { id = value ; } } else if ( "local" . equalsIgnoreCase ( name ) ) { url = value ; } break ; case 4 : // < / object > writeAttribute ( outputStream , "id" , id ) ; writeAttribute ( outputStream , "label" , label ) ; writeAttribute ( outputStream , "url" , url ) ; id = label = url = null ; break ; } } }
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 < DescribeConversionTasksResult > describeConversionTasksAsync ( com . amazonaws . handlers . AsyncHandler < DescribeConversionTasksRequest , DescribeConversionTasksResult > asyncHandler ) { } }
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 of { @ code CacheManager } * @ return a new builder ready to build a more specific subtype of cache manager * @ see # persistence ( String ) * @ see PersistentCacheManager * @ see CacheManagerPersistenceConfiguration */ public < N extends T > CacheManagerBuilder < N > with ( CacheManagerConfiguration < N > cfg ) { } }
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 list * @ throws CyclePresentException if the graph has cycles * @ throws IllegalArgumentException if the graph is not directed or allows self loops */ public static < T extends Comparable < ? super T > > @ NonNull List < T > orderedTopologicalSort ( final @ NonNull Graph < T > graph ) { } }
return topologicalSort ( graph , SortType . comparable ( ) ) ;