signature
stringlengths 43
39.1k
| implementation
stringlengths 0
450k
|
|---|---|
public class CompositeColumnEntityMapper { /** * Iterate through the list and create a column for each element
* @ param clm
* @ param entity
* @ throws IllegalArgumentException
* @ throws IllegalAccessException */
public void fillMutationBatch ( ColumnListMutation < ByteBuffer > clm , Object entity ) throws IllegalArgumentException , IllegalAccessException { } }
|
List < ? > list = ( List < ? > ) containerField . get ( entity ) ; if ( list != null ) { for ( Object element : list ) { fillColumnMutation ( clm , element ) ; } }
|
public class TaskSummaryQueryCriteriaUtil { /** * This method checks whether or not the query * already * contains a limiting criteria ( in short , a criteria that limits results
* of the query ) that refers to the user or ( the user ' s groups ) . If there is no user / group limiting criteria , then a
* { @ link QueryCriteria } with the user and group ids is added to the { @ link QueryWhere } instance
* If this method returns true , then there is no need to add additional criteria to the query to limit the query results
* to tasks that the user may see - - there is already query present in the query that takes care of this .
* @ param queryWhere The { @ link QueryWhere } instance containing the query criteria
* @ param userId The string user id of the user calling the query
* @ param userGroupCallback A { @ link UserGroupCallback } instance in order to retrieve the groups of the given user */
private void checkExistingCriteriaForUserBasedLimit ( QueryWhere queryWhere , String userId , UserGroupCallback userGroupCallback ) { } }
|
List < String > groupIds = userGroupCallback . getGroupsForUser ( userId ) ; Set < String > userAndGroupIds = new HashSet < String > ( ) ; if ( groupIds != null ) { userAndGroupIds . addAll ( groupIds ) ; } userAndGroupIds . add ( userId ) ; if ( ! criteriaListForcesUserLimitation ( userAndGroupIds , queryWhere . getCriteria ( ) ) ) { addUserRolesLimitCriteria ( queryWhere , userId , groupIds ) ; }
|
public class XmlElementWrapperPlugin { /** * Delete all candidate classes together with setter / getter methods and helper methods from
* < code > ObjectFactory < / code > .
* @ return the number of deletions performed */
private int deleteCandidates ( Outline outline , Collection < Candidate > candidates ) { } }
|
int deletionCount = 0 ; writeSummary ( "Deletions:" ) ; // Visit all candidate classes .
for ( Candidate candidate : candidates ) { if ( ! candidate . canBeRemoved ( ) ) { continue ; } // Get the defined class for candidate class .
JDefinedClass candidateClass = candidate . getClazz ( ) ; deleteClass ( outline , candidateClass ) ; deletionCount ++ ; for ( JDefinedClass objectFactoryClass : candidate . getObjectFactoryClasses ( ) ) { deletionCount += deleteFactoryMethod ( objectFactoryClass , candidate ) ; } // Replay the same for interface :
if ( candidate . isValueObjectDisabled ( ) ) { for ( Iterator < JClass > iter = candidateClass . _implements ( ) ; iter . hasNext ( ) ; ) { JClass interfaceClass = iter . next ( ) ; if ( ! isHiddenClass ( interfaceClass ) ) { deleteClass ( outline , ( JDefinedClass ) interfaceClass ) ; deletionCount ++ ; } } } } return deletionCount ;
|
public class AbstractSREInstallPage { /** * Returns whether the name is already in use by an existing SRE .
* @ param name new name .
* @ return whether the name is already in use . */
private boolean isDuplicateName ( String name ) { } }
|
if ( this . existingNames != null ) { final String newName = Strings . nullToEmpty ( name ) ; for ( final String existingName : this . existingNames ) { if ( newName . equals ( existingName ) ) { return true ; } } } return false ;
|
public class NavigationView { /** * Fired after the map is ready , this is our cue to finish
* setting up the rest of the plugins / location engine .
* Also , we check for launch data ( coordinates or route ) .
* @ param mapboxMap used for route , camera , and location UI
* @ since 0.6.0 */
@ Override public void onMapReady ( final MapboxMap mapboxMap ) { } }
|
mapboxMap . setStyle ( ThemeSwitcher . retrieveMapStyle ( getContext ( ) ) , new Style . OnStyleLoaded ( ) { @ Override public void onStyleLoaded ( @ NonNull Style style ) { initializeNavigationMap ( mapView , mapboxMap ) ; initializeWayNameListener ( ) ; onNavigationReadyCallback . onNavigationReady ( navigationViewModel . isRunning ( ) ) ; isMapInitialized = true ; } } ) ;
|
public class ClassSourceImpl_MappedSimple { /** * < p > Open a stream for a named class which used a named resource . < / p >
* < p > Answer null if the provider does not contain the named resource .
* See { @ link # isProviderResource ( String ) } . < / p >
* @ param className The name of the class which mapped to the resource .
* @ param resourceName The name of the resource used by the class .
* @ return An input stream for the resource .
* @ throws ClassSource _ Exception Thrown in case of a failure to open
* the resource . Usually , because of an { @ link IOException } from { @ link ClassSource _ MappedSimple . SimpleClassProvider # openResource ( String ) } . */
@ Override public InputStream openResourceStream ( String className , String resourceName ) throws ClassSource_Exception { } }
|
String methodName = "openResourceStream" ; if ( ! isProviderResource ( resourceName ) ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , MessageFormat . format ( "[ {0} ] [ {1} ] ENTER/RETURN [ null ]: Provider does not contain [ {2} ]" , getHashText ( ) , methodName , resourceName ) ) ; } return null ; } InputStream result ; try { long initialTime = getTime ( ) ; result = getProvider ( ) . openResource ( resourceName ) ; // throws IOException
long finalTime = getTime ( ) ; addStreamTime ( finalTime - initialTime ) ; } catch ( Throwable th ) { // defect 84235 : we are generating multiple Warning / Error messages for each error
// due to each level reporting them .
// Disable the following warning and defer message generation to a higher level ,
// preferably the ultimate consumer of the exception .
// Tr . warning ( tc , " ANNO _ CLASSSOURCE _ OPEN2 _ EXCEPTION " ,
// getHashText ( ) , resourceName , null , null , className ) ;
String eMsg = "[ " + getHashText ( ) + " ]" + " Failed to open [ " + resourceName + " ]" + " for class [ " + className + " ]" ; throw getFactory ( ) . wrapIntoClassSourceException ( CLASS_NAME , methodName , eMsg , th ) ; } if ( result == null ) { // defect 84235 : we are generating multiple Warning / Error messages for each error
// due to each level reporting them .
// Disable the following warning and defer message generation to a higher level ,
// preferably the ultimate consumer of the exception .
// Tr . warning ( tc , " ANNO _ CLASSSOURCE _ OPEN2 _ EXCEPTION " ,
// getHashText ( ) , resourceName , null , null , className ) ;
String eMsg = "[ " + getHashText ( ) + " ]" + " Failed to open [ " + resourceName + " ]" + " for class [ " + className + " ]" ; throw getFactory ( ) . newClassSourceException ( eMsg ) ; } return result ;
|
public class BlockchainImporter { /** * Gets the block .
* @ param blockNumber
* the block number
* @ return the block */
public Block getBlock ( BigInteger blockNumber ) { } }
|
return EtherObjectConverterUtil . convertEtherBlockToKunderaBlock ( client . getBlock ( blockNumber , false ) , false ) ;
|
public class Util { /** * Stores { @ code string } to { @ code file } using { @ link # ENCODING _ UTF _ 8 } .
* @ param string the { @ link String } to store
* @ param file the file to store to
* @ throws IOException on IO errors */
public static void write ( String string , File file ) throws IOException { } }
|
try ( Writer w = new OutputStreamWriter ( new FileOutputStream ( file ) , ENCODING_UTF_8 ) ) { w . write ( string ) ; }
|
public class GPXPoint { /** * Set the Magnetic variation ( in degrees ) of a point .
* @ param contentBuffer Contains the information to put in the table */
public final void setMagvar ( StringBuilder contentBuffer ) { } }
|
ptValues [ GpxMetadata . PTMAGVAR ] = Double . parseDouble ( contentBuffer . toString ( ) ) ;
|
public class QueryValidator { /** * This method traverses the predicate map and once it reaches the last operator
* in the tree , it checks it for a shorthand representation . If one exists then
* that shorthand representation is replaced with its longhand version .
* For example : { " $ ne " : . . . }
* is replaced by { " $ not " : { " $ eq " : . . . } }
* @ param predicate the map to process
* @ return the processed map */
@ SuppressWarnings ( "unchecked" ) private static Map < String , Object > replaceWithLonghand ( Map < String , Object > predicate ) { } }
|
Map < String , Object > accumulator = new HashMap < String , Object > ( ) ; if ( predicate == null || predicate . isEmpty ( ) ) { return predicate ; } String operator = ( String ) predicate . keySet ( ) . toArray ( ) [ 0 ] ; Object subPredicate = predicate . get ( operator ) ; if ( subPredicate instanceof Map ) { accumulator . put ( operator , replaceWithLonghand ( ( Map < String , Object > ) subPredicate ) ) ; } else if ( negatedShortHand . get ( operator ) != null ) { Map < String , Object > positivePredicate = new HashMap < String , Object > ( ) ; positivePredicate . put ( negatedShortHand . get ( operator ) , subPredicate ) ; accumulator . put ( NOT , positivePredicate ) ; } else { accumulator . put ( operator , subPredicate ) ; } return accumulator ;
|
public class LogRef { /** * * Log a warning level message . * *
* @ param msg
* Log message *
* @ param e
* The exception that reflects the condition . */
public void warn ( String msg , Throwable e ) { } }
|
doLog ( msg , LOG_WARNING , null , e ) ;
|
public class CPInstancePersistenceImpl { /** * Removes all the cp instances where uuid = & # 63 ; from the database .
* @ param uuid the uuid */
@ Override public void removeByUuid ( String uuid ) { } }
|
for ( CPInstance cpInstance : findByUuid ( uuid , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ) { remove ( cpInstance ) ; }
|
public class HlsSettings { /** * Gets the masterPlaylistSettings value for this HlsSettings .
* @ return masterPlaylistSettings * The settings for the master playlist . This field is optional
* and if it is not set will default
* to a { @ link MasterPlaylistSettings } with a refresh
* type of { @ link RefreshType # AUTOMATIC } . */
public com . google . api . ads . admanager . axis . v201902 . MasterPlaylistSettings getMasterPlaylistSettings ( ) { } }
|
return masterPlaylistSettings ;
|
public class RTMPMinaIoHandler { /** * { @ inheritDoc } */
@ Override public void exceptionCaught ( IoSession session , Throwable cause ) throws Exception { } }
|
log . warn ( "Exception caught {}" , cause . getMessage ( ) ) ; if ( log . isDebugEnabled ( ) ) { log . error ( "Exception detail" , cause ) ; }
|
public class JobGraph { /** * Creates the { @ link JComponent } that shows the graph
* @ return */
private JComponent createJComponent ( final DirectedGraph < Object , JobGraphLink > graph ) { } }
|
final int vertexCount = graph . getVertexCount ( ) ; logger . debug ( "Rendering graph with {} vertices" , vertexCount ) ; final JobGraphLayoutTransformer layoutTransformer = new JobGraphLayoutTransformer ( _analysisJobBuilder , graph ) ; final Dimension preferredSize = layoutTransformer . getPreferredSize ( ) ; final StaticLayout < Object , JobGraphLink > layout = new StaticLayout < > ( graph , layoutTransformer , preferredSize ) ; final Collection < Object > vertices = graph . getVertices ( ) ; for ( final Object vertex : vertices ) { // manually initialize all vertices
layout . apply ( vertex ) ; } if ( ! vertices . isEmpty ( ) && ! layoutTransformer . isTransformed ( ) ) { throw new IllegalStateException ( "Layout transformer was never invoked!" ) ; } final VisualizationViewer < Object , JobGraphLink > visualizationViewer = new VisualizationViewer < > ( layout , preferredSize ) ; visualizationViewer . setTransferHandler ( new TransferHandler ( ) { private static final long serialVersionUID = 1L ; public boolean canImport ( final TransferSupport support ) { return support . isDataFlavorSupported ( DragDropUtils . MODEL_DATA_FLAVOR ) ; } public boolean importData ( final TransferSupport support ) { final Transferable transferable = support . getTransferable ( ) ; final Object data ; try { data = transferable . getTransferData ( DragDropUtils . MODEL_DATA_FLAVOR ) ; } catch ( final Exception ex ) { logger . warn ( "Unexpected error while dropping data" , ex ) ; return false ; } if ( data == null ) { return false ; } final Point dropPoint = support . getDropLocation ( ) . getDropPoint ( ) ; if ( data instanceof Table ) { final Table table = ( Table ) data ; // position the table
JobGraphMetadata . setPointForTable ( _analysisJobBuilder , table , dropPoint . x , dropPoint . y ) ; _analysisJobBuilder . addSourceColumns ( table . getColumns ( ) ) ; } if ( data instanceof Column ) { final Column column = ( Column ) data ; final Table table = column . getTable ( ) ; final List < MetaModelInputColumn > columnsOfSameTable = _analysisJobBuilder . getSourceColumnsOfTable ( table ) ; if ( columnsOfSameTable . isEmpty ( ) ) { // the table is new - position it
JobGraphMetadata . setPointForTable ( _analysisJobBuilder , table , dropPoint . x , dropPoint . y ) ; } _analysisJobBuilder . addSourceColumn ( column ) ; } if ( data instanceof ComponentDescriptor < ? > ) { final ComponentDescriptor < ? > descriptor = ( ComponentDescriptor < ? > ) data ; final Map < String , String > metadata = JobGraphMetadata . createMetadataProperties ( dropPoint ) ; _analysisJobBuilder . addComponent ( descriptor , null , null , metadata ) ; } return true ; } } ) ; GraphUtils . applyStyles ( visualizationViewer ) ; visualizationViewer . addPreRenderPaintable ( new Paintable ( ) { @ Override public boolean useTransform ( ) { return false ; } @ Override public void paint ( final Graphics g ) { final GradientPaint paint = new GradientPaint ( 0 , 0 , WidgetUtils . BG_COLOR_BRIGHTEST , 0 , visualizationViewer . getHeight ( ) , WidgetUtils . BG_COLOR_BRIGHTEST ) ; if ( g instanceof Graphics2D ) { final Graphics2D g2d = ( Graphics2D ) g ; g2d . setPaint ( paint ) ; } else { g . setColor ( WidgetUtils . BG_COLOR_BRIGHT ) ; } g . fillRect ( 0 , 0 , visualizationViewer . getWidth ( ) , visualizationViewer . getHeight ( ) ) ; final Dimension size = _panel . getSize ( ) ; if ( size . height < adjuster . adjust ( 300 ) || size . width < adjuster . adjust ( 500 ) ) { // don ' t show the background hints - it will be too
// disturbing
return ; } final String showCanvasHints = _userPreferences . getAdditionalProperties ( ) . get ( JobGraphTransformers . USER_PREFERENCES_PROPERTY_SHOW_CANVAS_HINTS ) ; if ( "false" . equals ( showCanvasHints ) ) { // don ' t show the background hints - the user has decided
// not to have them .
return ; } String title ; String subTitle ; String imagePath ; g . setColor ( WidgetUtils . BG_COLOR_MEDIUM ) ; if ( _analysisJobBuilder . getSourceColumns ( ) . size ( ) == 0 ) { title = "Select source ..." ; subTitle = "Pick table/columns in the tree to the left.\n" + "You can drag it onto this canvas with your mouse." ; imagePath = "images/window/canvas-bg-table.png" ; } else if ( _analysisJobBuilder . getComponentCount ( ) == 0 ) { title = "Start building ..." ; subTitle = "Add components to your job. Right-click the canvas\n" + "to explore the library of available components." ; imagePath = "images/window/canvas-bg-plus.png" ; } else if ( graph . getEdgeCount ( ) == 0 ) { title = "Connect the pieces ..." ; subTitle = "Right-click the source table and select 'Link to ...'.\n" + "This directs the flow of data to the component." ; imagePath = "images/window/canvas-bg-connect.png" ; } else if ( _analysisJobBuilder . getResultProducingComponentBuilders ( ) . size ( ) == 0 && _analysisJobBuilder . getConsumedOutputDataStreamsJobBuilders ( ) . size ( ) == 0 && _analysisJobBuilder . getComponentCount ( ) <= 3 ) { title = "Your job is almost ready." ; subTitle = "Jobs need to either 'Analyze' or 'Write' something.\n" + "So add one or more such components." ; imagePath = "images/window/canvas-bg-plus.png" ; } else { title = null ; subTitle = null ; imagePath = null ; try { if ( _analysisJobBuilder . isConfigured ( true ) ) { title = "Ready to execute" ; subTitle = "Click the 'Execute' button in the upper-right\ncorner when you're ready to run the job." ; imagePath = "images/window/canvas-bg-execute.png" ; g . drawImage ( ImageManager . get ( ) . getImage ( "images/window/canvas-bg-execute-hint.png" ) , size . width - adjuster . adjust ( 175 ) , 0 , null ) ; } else { title = "Configure the job ..." ; subTitle = "Job is not correctly configured" ; imagePath = "images/window/canvas-bg-error.png" ; } } catch ( final Exception ex ) { logger . debug ( "Job not correctly configured" , ex ) ; final String errorMessage ; if ( ex instanceof UnconfiguredConfiguredPropertyException ) { final UnconfiguredConfiguredPropertyException unconfiguredConfiguredPropertyException = ( UnconfiguredConfiguredPropertyException ) ex ; final ConfiguredPropertyDescriptor configuredProperty = unconfiguredConfiguredPropertyException . getConfiguredProperty ( ) ; final ComponentBuilder componentBuilder = unconfiguredConfiguredPropertyException . getComponentBuilder ( ) ; title = "Configure " + "'" + LabelUtils . getLabel ( componentBuilder ) + "' ..." ; errorMessage = "Please set '" + configuredProperty . getName ( ) + "' to continue" ; } else { title = "Something went wrong ..." ; errorMessage = ex . getMessage ( ) ; } subTitle = errorMessage ; imagePath = "images/window/canvas-bg-error.png" ; } } final int yOffset = size . height - adjuster . adjust ( 150 ) ; final int xOffset = adjuster . adjust ( 150 ) ; final float titleFontSize ; final float subTitleFontSize ; if ( size . width < adjuster . adjust ( 650 ) ) { titleFontSize = adjuster . adjust ( 30f ) ; subTitleFontSize = adjuster . adjust ( 17f ) ; } else { titleFontSize = adjuster . adjust ( 35f ) ; subTitleFontSize = adjuster . adjust ( 20f ) ; } if ( title != null ) { g . setFont ( WidgetUtils . FONT_BANNER . deriveFont ( titleFontSize ) ) ; g . drawString ( title , xOffset , yOffset ) ; } if ( subTitle != null ) { final String [ ] lines = subTitle . split ( "\n" ) ; g . setFont ( WidgetUtils . FONT_BANNER . deriveFont ( subTitleFontSize ) ) ; int y = yOffset + adjuster . adjust ( 10 ) ; for ( final String line : lines ) { y = y + adjuster . adjust ( 30 ) ; g . drawString ( line , xOffset , y ) ; } } if ( imagePath != null ) { g . drawImage ( ImageManager . get ( ) . getImage ( imagePath ) , xOffset - adjuster . adjust ( 120 ) , yOffset - adjuster . adjust ( 30 ) , null ) ; } } } ) ; final JobGraphContext graphContext = new JobGraphContext ( this , visualizationViewer , _analysisJobBuilder ) ; final JobGraphActions actions = new JobGraphActions ( graphContext , _windowContext , _presenterRendererFactory , _componentConfigurationDialogs , _tableConfigurationDialogs ) ; final JobGraphLinkPainter linkPainter = new JobGraphLinkPainter ( graphContext , actions ) ; final JobGraphLinkPainterMousePlugin linkPainterMousePlugin = new JobGraphLinkPainterMousePlugin ( linkPainter , graphContext ) ; final GraphMouse graphMouse = visualizationViewer . getGraphMouse ( ) ; if ( graphMouse instanceof PluggableGraphMouse ) { final PluggableGraphMouse pluggableGraphMouse = ( PluggableGraphMouse ) graphMouse ; pluggableGraphMouse . add ( linkPainterMousePlugin ) ; } final JobGraphMouseListener graphMouseListener = new JobGraphMouseListener ( graphContext , linkPainter , actions , _windowContext ) ; visualizationViewer . addGraphMouseListener ( graphMouseListener ) ; visualizationViewer . addMouseListener ( graphMouseListener ) ; final RenderContext < Object , JobGraphLink > renderContext = visualizationViewer . getRenderContext ( ) ; final JobGraphTransformers transformers = new JobGraphTransformers ( graph , _userPreferences , _highlighedVertexes ) ; // instrument the render context with all our transformers and stuff
renderContext . setVertexFontTransformer ( transformers . getVertexFontTransformer ( ) ) ; renderContext . setVertexLabelTransformer ( JobGraphTransformers . VERTEX_LABEL_TRANSFORMER ) ; renderContext . setEdgeArrowPredicate ( JobGraphTransformers . EDGE_ARROW_PREDICATE ) ; renderContext . setEdgeArrowTransformer ( JobGraphTransformers . EDGE_ARROW_TRANSFORMER ) ; renderContext . setEdgeLabelTransformer ( JobGraphTransformers . EDGE_LABEL_TRANSFORMER ) ; renderContext . setEdgeShapeTransformer ( transformers . getEdgeShapeTransformer ( ) ) ; renderContext . setEdgeLabelClosenessTransformer ( JobGraphTransformers . EDGE_LABEL_CLOSENESS_TRANSFORMER ) ; renderContext . setEdgeLabelRenderer ( transformers . getEdgeLabelRenderer ( ) ) ; renderContext . setVertexIconTransformer ( JobGraphTransformers . VERTEX_ICON_TRANSFORMER ) ; renderContext . setVertexShapeTransformer ( JobGraphTransformers . VERTEX_SHAPE_TRANSFORMER ) ; final JButton graphPreferencesButton = createGraphPreferencesButton ( ) ; visualizationViewer . setLayout ( new BorderLayout ( ) ) ; visualizationViewer . add ( DCPanel . flow ( Alignment . RIGHT , 0 , 0 , graphPreferencesButton ) , BorderLayout . SOUTH ) ; // we save the values of the scrollbars in order to allow refreshes to
// retain scroll position .
final GraphZoomScrollPane scrollPane = new GraphZoomScrollPane ( visualizationViewer ) ; scrollPane . setCorner ( new DCPanel ( WidgetUtils . COLOR_DEFAULT_BACKGROUND ) ) ; if ( _scrollHorizontal > 0 ) { setScrollbarValue ( scrollPane . getHorizontalScrollBar ( ) , _scrollHorizontal ) ; } if ( _scrollVertical > 0 ) { setScrollbarValue ( scrollPane . getVerticalScrollBar ( ) , _scrollVertical ) ; } final AdjustmentListener adjustmentListener = e -> { _scrollHorizontal = scrollPane . getHorizontalScrollBar ( ) . getValue ( ) ; _scrollVertical = scrollPane . getVerticalScrollBar ( ) . getValue ( ) ; } ; scrollPane . getHorizontalScrollBar ( ) . addAdjustmentListener ( adjustmentListener ) ; scrollPane . getVerticalScrollBar ( ) . addAdjustmentListener ( adjustmentListener ) ; new JobGraphBindingsManager ( graphContext , actions , scrollPane ) . register ( ) ; return scrollPane ;
|
public class ByteBuffer { /** * Returns the short at the specified index .
* < p > The 2 bytes starting at the specified index are composed into a short according to the
* current byte order and returned . The position is not changed . < / p >
* @ param index the index , must not be negative and equal or less than { @ code limit - 2 } .
* @ return the short at the specified index .
* @ exception IndexOutOfBoundsException if { @ code index } is invalid . */
public final short getShort ( int baseOffset ) { } }
|
short bytes = 0 ; if ( order == ByteOrder . BIG_ENDIAN ) { bytes = ( short ) ( byteArray . get ( baseOffset ) << 8 ) ; bytes |= ( byteArray . get ( baseOffset + 1 ) & 0xFF ) ; } else { bytes = ( short ) ( byteArray . get ( baseOffset + 1 ) << 8 ) ; bytes |= ( byteArray . get ( baseOffset ) & 0xFF ) ; } return bytes ;
|
public class NormalizedKeySorter { /** * Gets an iterator over all records in this buffer in their logical order .
* @ return An iterator returning the records in their logical order . */
@ Override public final MutableObjectIterator < T > getIterator ( ) { } }
|
return new MutableObjectIterator < T > ( ) { private final int size = size ( ) ; private int current = 0 ; private int currentSegment = 0 ; private int currentOffset = 0 ; private MemorySegment currentIndexSegment = sortIndex . get ( 0 ) ; @ Override public T next ( T target ) { if ( this . current < this . size ) { this . current ++ ; if ( this . currentOffset > lastIndexEntryOffset ) { this . currentOffset = 0 ; this . currentIndexSegment = sortIndex . get ( ++ this . currentSegment ) ; } long pointer = this . currentIndexSegment . getLong ( this . currentOffset ) & POINTER_MASK ; this . currentOffset += indexEntrySize ; try { return getRecordFromBuffer ( target , pointer ) ; } catch ( IOException ioe ) { throw new RuntimeException ( ioe ) ; } } else { return null ; } } @ Override public T next ( ) { if ( this . current < this . size ) { this . current ++ ; if ( this . currentOffset > lastIndexEntryOffset ) { this . currentOffset = 0 ; this . currentIndexSegment = sortIndex . get ( ++ this . currentSegment ) ; } long pointer = this . currentIndexSegment . getLong ( this . currentOffset ) ; this . currentOffset += indexEntrySize ; try { return getRecordFromBuffer ( pointer ) ; } catch ( IOException ioe ) { throw new RuntimeException ( ioe ) ; } } else { return null ; } } } ;
|
public class MaterialSplitPanel { /** * Get the dock value . */
public Dock getDock ( ) { } }
|
return options . dock != null ? Dock . fromStyleName ( options . dock ) : null ;
|
public class LeaderAppender { /** * Handles an append failure . */
protected void handleAppendRequestFailure ( MemberState member , AppendRequest request , Throwable error ) { } }
|
super . handleAppendRequestFailure ( member , request , error ) ; // Trigger commit futures if necessary .
updateHeartbeatTime ( member , error ) ;
|
public class OpenCms { /** * Reads the requested resource from the OpenCms VFS ,
* and in case a directory name is requested , the default files of the
* directory will be looked up and the first match is returned . < p >
* The resource that is returned is always a < code > { @ link org . opencms . file . CmsFile } < / code > ,
* even though the content will usually not be loaded in the result . Folders are never returned since
* the point of this method is really to load the default file if just a folder name is requested . < p >
* The URI stored in the given OpenCms user context will be changed to the URI of the resource
* that was found and returned . < p >
* Implementing and configuring an < code > { @ link I _ CmsResourceInit } < / code > handler
* allows to customize the process of default resource selection . < p >
* @ param cms the current users OpenCms context
* @ param resourceName the path of the requested resource in the OpenCms VFS
* @ param req the current http request
* @ param res the current http response
* @ return the requested resource read from the VFS
* @ throws CmsException in case the requested file does not exist or the user has insufficient access permissions */
public static CmsResource initResource ( CmsObject cms , String resourceName , HttpServletRequest req , HttpServletResponse res ) throws CmsException { } }
|
return OpenCmsCore . getInstance ( ) . initResource ( cms , resourceName , req , res ) ;
|
public class PairSet { /** * Creates a new { @ link PairSet } instance with only non - empty transactions
* and items .
* @ return the compacted { @ link PairSet } instance */
public PairSet < T , I > compacted ( ) { } }
|
// trivial case
if ( isEmpty ( ) ) return empty ( ) ; // compute the new universe
final Set < T > newAllTransactions = new LinkedHashSet < T > ( involvedTransactions ( ) ) ; final Set < I > newAllItems = new LinkedHashSet < I > ( involvedItems ( ) ) ; if ( newAllTransactions . size ( ) == allTransactions . size ( ) && newAllItems . size ( ) == allItems . size ( ) ) return clone ( ) ; // compute the union of pairs
PairSet < T , I > res = new PairSet < T , I > ( matrix . empty ( ) , newAllTransactions , newAllItems ) ; res . addAll ( this ) ; return res ;
|
public class JournalCreator { /** * Create a journal entry , add the arguments , and invoke the method . */
public Date purgeObject ( Context context , String pid , String logMessage ) throws ServerException { } }
|
try { CreatorJournalEntry cje = new CreatorJournalEntry ( METHOD_PURGE_OBJECT , context ) ; cje . addArgument ( ARGUMENT_NAME_PID , pid ) ; cje . addArgument ( ARGUMENT_NAME_LOG_MESSAGE , logMessage ) ; return ( Date ) cje . invokeAndClose ( delegate , writer ) ; } catch ( JournalException e ) { throw new GeneralException ( "Problem creating the Journal" , e ) ; }
|
public class MainMenuBar { /** * This method initializes this */
private void initialize ( ) { } }
|
this . add ( getMenuFile ( ) ) ; this . add ( getMenuEdit ( ) ) ; this . add ( getMenuView ( ) ) ; this . add ( getMenuAnalyse ( ) ) ; this . add ( getMenuReport ( ) ) ; this . add ( getMenuTools ( ) ) ; this . add ( getMenuImport ( ) ) ; this . add ( getMenuOnline ( ) ) ; this . add ( getMenuHelp ( ) ) ;
|
public class ZRTPCache { /** * Updates the entry for the selected remote ZID .
* @ param retainedSecret
* the new retained secret .
* @ param expiryTime
* the expiry time , 0 means the entry should be erased .
* @ param keepRs2
* specifies whether the old rs2 should be kept rather than
* copying old rs1 into rs2.
* @ param number
* Phone Number associated with the current zid */
public void updateEntry ( long expiryTime , boolean trust , byte [ ] retainedSecret , byte [ ] rs2 , String number ) { } }
|
if ( platform . isVerboseLogging ( ) ) { platform . getLogger ( ) . log ( "ZRTPCache: updateEntry(" + expiryTime + ", " + trust + ", " + platform . getUtils ( ) . byteToHexString ( retainedSecret ) + ", " + platform . getUtils ( ) . byteToHexString ( rs2 ) + "," + number + ")" ) ; } if ( expiryTime == 0 ) { cache . remove ( currentZid ) ; currentTrust = false ; currentRs1 = null ; currentRs2 = null ; currentNumber = null ; } else { byte [ ] data = new byte [ ( rs2 == null ) ? 41 : 73 ] ; for ( int i = 0 ; i != 8 ; ++ i ) { data [ i ] = ( byte ) ( expiryTime & 0xff ) ; expiryTime >>>= 8 ; } data [ 8 ] = ( byte ) ( trust ? 1 : 0 ) ; System . arraycopy ( retainedSecret , 0 , data , 9 , 32 ) ; if ( rs2 != null ) { System . arraycopy ( rs2 , 0 , data , 41 , 32 ) ; } cache . put ( currentZid , data , number ) ; currentTrust = trust ; currentRs1 = retainedSecret ; currentRs2 = rs2 ; currentNumber = number ; }
|
public class ELParser { /** * Assignment */
final public void Assignment ( ) throws ParseException { } }
|
if ( jj_2_2 ( 4 ) ) { LambdaExpression ( ) ; } else { switch ( ( jj_ntk == - 1 ) ? jj_ntk ( ) : jj_ntk ) { case START_SET_OR_MAP : case INTEGER_LITERAL : case FLOATING_POINT_LITERAL : case STRING_LITERAL : case TRUE : case FALSE : case NULL : case LPAREN : case LBRACK : case NOT0 : case NOT1 : case EMPTY : case MINUS : case IDENTIFIER : Choice ( ) ; label_3 : while ( true ) { if ( jj_2_1 ( 2 ) ) { ; } else { break label_3 ; } jj_consume_token ( ASSIGN ) ; AstAssign jjtn001 = new AstAssign ( JJTASSIGN ) ; boolean jjtc001 = true ; jjtree . openNodeScope ( jjtn001 ) ; try { Assignment ( ) ; } catch ( Throwable jjte001 ) { if ( jjtc001 ) { jjtree . clearNodeScope ( jjtn001 ) ; jjtc001 = false ; } else { jjtree . popNode ( ) ; } if ( jjte001 instanceof RuntimeException ) { { if ( true ) throw ( RuntimeException ) jjte001 ; } } if ( jjte001 instanceof ParseException ) { { if ( true ) throw ( ParseException ) jjte001 ; } } { if ( true ) throw ( Error ) jjte001 ; } } finally { if ( jjtc001 ) { jjtree . closeNodeScope ( jjtn001 , 2 ) ; } } } break ; default : jj_la1 [ 3 ] = jj_gen ; jj_consume_token ( - 1 ) ; throw new ParseException ( ) ; } }
|
public class GitlabAPI { /** * Create a new deploy key for the project
* @ param targetProjectId The id of the Gitlab project
* @ param title The title of the ssh key
* @ param key The public key
* @ return The new GitlabSSHKey
* @ throws IOException on gitlab api call error */
public GitlabSSHKey createDeployKey ( Integer targetProjectId , String title , String key ) throws IOException { } }
|
return createDeployKey ( targetProjectId , title , key , false ) ;
|
public class UtilDecompositons_DDRM { /** * Creates a zeros matrix only if A does not already exist . If it does exist it will fill
* the lower triangular portion with zeros . */
public static DMatrixRMaj checkZerosLT ( DMatrixRMaj A , int numRows , int numCols ) { } }
|
if ( A == null ) { return new DMatrixRMaj ( numRows , numCols ) ; } else if ( numRows != A . numRows || numCols != A . numCols ) { A . reshape ( numRows , numCols ) ; A . zero ( ) ; } else { for ( int i = 0 ; i < A . numRows ; i ++ ) { int index = i * A . numCols ; int end = index + Math . min ( i , A . numCols ) ; ; while ( index < end ) { A . data [ index ++ ] = 0 ; } } } return A ;
|
public class responderpolicylabel_responderpolicy_binding { /** * Use this API to fetch responderpolicylabel _ responderpolicy _ binding resources of given name . */
public static responderpolicylabel_responderpolicy_binding [ ] get ( nitro_service service , String labelname ) throws Exception { } }
|
responderpolicylabel_responderpolicy_binding obj = new responderpolicylabel_responderpolicy_binding ( ) ; obj . set_labelname ( labelname ) ; responderpolicylabel_responderpolicy_binding response [ ] = ( responderpolicylabel_responderpolicy_binding [ ] ) obj . get_resources ( service ) ; return response ;
|
public class ObjectProperty { /** * Sets the node type . Must be one of
* { @ link Token # COLON } , { @ link Token # GET } , or { @ link Token # SET } .
* @ throws IllegalArgumentException if { @ code nodeType } is invalid */
public void setNodeType ( int nodeType ) { } }
|
if ( nodeType != Token . COLON && nodeType != Token . GET && nodeType != Token . SET && nodeType != Token . METHOD ) throw new IllegalArgumentException ( "invalid node type: " + nodeType ) ; setType ( nodeType ) ;
|
public class JiteClass { /** * Defines a new field on the target class
* @ param fieldName the field name
* @ param modifiers the modifier bitmask , made by OR ' ing constants from ASM ' s { @ link Opcodes } interface
* @ param signature the field signature , on standard JVM notation
* @ param value the default value ( null for JVM default )
* @ return the new field definition for further modification */
public FieldDefinition defineField ( String fieldName , int modifiers , String signature , Object value ) { } }
|
FieldDefinition field = new FieldDefinition ( fieldName , modifiers , signature , value ) ; this . fields . add ( field ) ; return field ;
|
public class TaskUtil { /** * Run the given tasks until any exception happen
* @ param tasks
* @ return the exception */
@ SafeVarargs @ SuppressWarnings ( "unchecked" ) public static < T extends Exception > Optional < T > firstFail ( ActionE0 < T > ... tasks ) { } }
|
for ( ActionE0 < T > task : tasks ) { try { task . call ( ) ; } catch ( Exception t ) { return Optional . of ( ( T ) t ) ; } } return Optional . empty ( ) ;
|
public class IsoJarClassLoader { /** * @ param className
* @ return String */
protected String formatClassName ( String className ) { } }
|
className = className . replace ( '/' , '~' ) ; if ( classNameReplacementChar == '\u0000' ) { // ' / ' is used to map the package to the path
className = className . replace ( '.' , '/' ) + ".class" ; } else { // Replace ' . ' with custom char , such as ' _ '
className = className . replace ( '.' , classNameReplacementChar ) + ".class" ; } className = className . replace ( '~' , '/' ) ; return className ;
|
public class hqlParser { /** * hql . g : 659:1 : exprList : ( TRAILING | LEADING | BOTH ) ? ( expression ( ( COMMA ! expression ) + | f = FROM expression | AS ! identifier ) ? | f2 = FROM expression ) ? ; */
public final hqlParser . exprList_return exprList ( ) throws RecognitionException { } }
|
hqlParser . exprList_return retval = new hqlParser . exprList_return ( ) ; retval . start = input . LT ( 1 ) ; CommonTree root_0 = null ; Token f = null ; Token f2 = null ; Token TRAILING287 = null ; Token LEADING288 = null ; Token BOTH289 = null ; Token COMMA291 = null ; Token AS294 = null ; ParserRuleReturnScope expression290 = null ; ParserRuleReturnScope expression292 = null ; ParserRuleReturnScope expression293 = null ; ParserRuleReturnScope identifier295 = null ; ParserRuleReturnScope expression296 = null ; CommonTree f_tree = null ; CommonTree f2_tree = null ; CommonTree TRAILING287_tree = null ; CommonTree LEADING288_tree = null ; CommonTree BOTH289_tree = null ; CommonTree COMMA291_tree = null ; CommonTree AS294_tree = null ; try { // hql . g : 669:2 : ( ( TRAILING | LEADING | BOTH ) ? ( expression ( ( COMMA ! expression ) + | f = FROM expression | AS ! identifier ) ? | f2 = FROM expression ) ? )
// hql . g : 669:4 : ( TRAILING | LEADING | BOTH ) ? ( expression ( ( COMMA ! expression ) + | f = FROM expression | AS ! identifier ) ? | f2 = FROM expression ) ?
{ root_0 = ( CommonTree ) adaptor . nil ( ) ; // hql . g : 669:4 : ( TRAILING | LEADING | BOTH ) ?
int alt103 = 4 ; switch ( input . LA ( 1 ) ) { case TRAILING : { alt103 = 1 ; } break ; case LEADING : { alt103 = 2 ; } break ; case BOTH : { alt103 = 3 ; } break ; } switch ( alt103 ) { case 1 : // hql . g : 669:5 : TRAILING
{ TRAILING287 = ( Token ) match ( input , TRAILING , FOLLOW_TRAILING_in_exprList3375 ) ; TRAILING287_tree = ( CommonTree ) adaptor . create ( TRAILING287 ) ; adaptor . addChild ( root_0 , TRAILING287_tree ) ; TRAILING287 . setType ( IDENT ) ; } break ; case 2 : // hql . g : 670:10 : LEADING
{ LEADING288 = ( Token ) match ( input , LEADING , FOLLOW_LEADING_in_exprList3388 ) ; LEADING288_tree = ( CommonTree ) adaptor . create ( LEADING288 ) ; adaptor . addChild ( root_0 , LEADING288_tree ) ; LEADING288 . setType ( IDENT ) ; } break ; case 3 : // hql . g : 671:10 : BOTH
{ BOTH289 = ( Token ) match ( input , BOTH , FOLLOW_BOTH_in_exprList3401 ) ; BOTH289_tree = ( CommonTree ) adaptor . create ( BOTH289 ) ; adaptor . addChild ( root_0 , BOTH289_tree ) ; BOTH289 . setType ( IDENT ) ; } break ; } // hql . g : 673:4 : ( expression ( ( COMMA ! expression ) + | f = FROM expression | AS ! identifier ) ? | f2 = FROM expression ) ?
int alt106 = 3 ; int LA106_0 = input . LA ( 1 ) ; if ( ( LA106_0 == ALL || LA106_0 == ANY || LA106_0 == AVG || LA106_0 == BNOT || LA106_0 == CASE || LA106_0 == COLON || LA106_0 == COUNT || LA106_0 == ELEMENTS || LA106_0 == EMPTY || LA106_0 == EXISTS || LA106_0 == FALSE || LA106_0 == IDENT || LA106_0 == INDICES || LA106_0 == MAX || ( LA106_0 >= MIN && LA106_0 <= MINUS ) || LA106_0 == NOT || ( LA106_0 >= NULL && LA106_0 <= NUM_LONG ) || LA106_0 == OPEN || ( LA106_0 >= PARAM && LA106_0 <= PLUS ) || LA106_0 == QUOTED_String || LA106_0 == SOME || LA106_0 == SUM || LA106_0 == TRUE ) ) { alt106 = 1 ; } else if ( ( LA106_0 == FROM ) ) { alt106 = 2 ; } switch ( alt106 ) { case 1 : // hql . g : 674:5 : expression ( ( COMMA ! expression ) + | f = FROM expression | AS ! identifier ) ?
{ pushFollow ( FOLLOW_expression_in_exprList3425 ) ; expression290 = expression ( ) ; state . _fsp -- ; adaptor . addChild ( root_0 , expression290 . getTree ( ) ) ; // hql . g : 674:16 : ( ( COMMA ! expression ) + | f = FROM expression | AS ! identifier ) ?
int alt105 = 4 ; switch ( input . LA ( 1 ) ) { case COMMA : { alt105 = 1 ; } break ; case FROM : { alt105 = 2 ; } break ; case AS : { alt105 = 3 ; } break ; } switch ( alt105 ) { case 1 : // hql . g : 674:18 : ( COMMA ! expression ) +
{ // hql . g : 674:18 : ( COMMA ! expression ) +
int cnt104 = 0 ; loop104 : while ( true ) { int alt104 = 2 ; int LA104_0 = input . LA ( 1 ) ; if ( ( LA104_0 == COMMA ) ) { alt104 = 1 ; } switch ( alt104 ) { case 1 : // hql . g : 674:19 : COMMA ! expression
{ COMMA291 = ( Token ) match ( input , COMMA , FOLLOW_COMMA_in_exprList3430 ) ; pushFollow ( FOLLOW_expression_in_exprList3433 ) ; expression292 = expression ( ) ; state . _fsp -- ; adaptor . addChild ( root_0 , expression292 . getTree ( ) ) ; } break ; default : if ( cnt104 >= 1 ) break loop104 ; EarlyExitException eee = new EarlyExitException ( 104 , input ) ; throw eee ; } cnt104 ++ ; } } break ; case 2 : // hql . g : 675:9 : f = FROM expression
{ f = ( Token ) match ( input , FROM , FOLLOW_FROM_in_exprList3448 ) ; f_tree = ( CommonTree ) adaptor . create ( f ) ; adaptor . addChild ( root_0 , f_tree ) ; pushFollow ( FOLLOW_expression_in_exprList3450 ) ; expression293 = expression ( ) ; state . _fsp -- ; adaptor . addChild ( root_0 , expression293 . getTree ( ) ) ; f . setType ( IDENT ) ; } break ; case 3 : // hql . g : 676:9 : AS ! identifier
{ AS294 = ( Token ) match ( input , AS , FOLLOW_AS_in_exprList3462 ) ; pushFollow ( FOLLOW_identifier_in_exprList3465 ) ; identifier295 = identifier ( ) ; state . _fsp -- ; adaptor . addChild ( root_0 , identifier295 . getTree ( ) ) ; } break ; } } break ; case 2 : // hql . g : 677:7 : f2 = FROM expression
{ f2 = ( Token ) match ( input , FROM , FOLLOW_FROM_in_exprList3479 ) ; f2_tree = ( CommonTree ) adaptor . create ( f2 ) ; adaptor . addChild ( root_0 , f2_tree ) ; pushFollow ( FOLLOW_expression_in_exprList3481 ) ; expression296 = expression ( ) ; state . _fsp -- ; adaptor . addChild ( root_0 , expression296 . getTree ( ) ) ; f2 . setType ( IDENT ) ; } break ; } } retval . stop = input . LT ( - 1 ) ; retval . tree = ( CommonTree ) adaptor . rulePostProcessing ( root_0 ) ; adaptor . setTokenBoundaries ( retval . tree , retval . start , retval . stop ) ; assert false : "PLEASE CHECK THAT IT WORKS !!!" ; CommonTree root = ( CommonTree ) adaptor . create ( EXPR_LIST , "exprList" ) ; root . addChild ( retval . getTree ( ) ) ; retval . tree = root ; // IASTNode root = ( IASTNode ) adaptor . Create ( EXPR _ LIST , " exprList " ) ;
// root . AddChild ( ( IASTNode ) retval . Tree ) ;
// retval . Tree = root ;
} catch ( RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; retval . tree = ( CommonTree ) adaptor . errorNode ( input , retval . start , input . LT ( - 1 ) , re ) ; } finally { // do for sure before leaving
} return retval ;
|
public class JaxRsFactoryImplicitBeanCDICustomizer { /** * ( non - Javadoc )
* @ see com . ibm . ws . jaxrs20 . api . JaxRsFactoryBeanCustomizer # onSingletonServiceInit ( java . lang . Object , java . lang . Object ) */
@ SuppressWarnings ( "unchecked" ) @ Override public < T > T onSingletonServiceInit ( T service , Object context ) { } }
|
if ( context == null ) { return null ; } Map < Class < ? > , ManagedObject < ? > > newContext = ( Map < Class < ? > , ManagedObject < ? > > ) ( context ) ; if ( newContext . isEmpty ( ) ) { return null ; } ManagedObject < ? > managedObject = newContext . get ( service . getClass ( ) ) ; Object newServiceObject = null ; if ( managedObject == null ) { newServiceObject = getInstanceFromManagedObject ( service , context ) ; } else { newServiceObject = managedObject . getObject ( ) ; } return ( T ) newServiceObject ;
|
public class RestClusterClient { /** * Creates a { @ code CompletableFuture } that polls a { @ code AsynchronouslyCreatedResource } until
* its { @ link AsynchronouslyCreatedResource # queueStatus ( ) QueueStatus } becomes
* { @ link QueueStatus . Id # COMPLETED COMPLETED } . The future completes with the result of
* { @ link AsynchronouslyCreatedResource # resource ( ) } .
* @ param resourceFutureSupplier The operation which polls for the
* { @ code AsynchronouslyCreatedResource } .
* @ param < R > The type of the resource .
* @ param < A > The type of the { @ code AsynchronouslyCreatedResource } .
* @ return A { @ code CompletableFuture } delivering the resource . */
private < R , A extends AsynchronouslyCreatedResource < R > > CompletableFuture < R > pollResourceAsync ( final Supplier < CompletableFuture < A > > resourceFutureSupplier ) { } }
|
return pollResourceAsync ( resourceFutureSupplier , new CompletableFuture < > ( ) , 0 ) ;
|
public class Constraint { /** * Builds a new constraint from the annotation data .
* @ param anno JSR - 303 annotation instance
* @ return a new constraint */
public static Constraint fromAnnotation ( Annotation anno ) { } }
|
if ( anno instanceof Min ) { return min ( ( ( Min ) anno ) . value ( ) ) ; } else if ( anno instanceof Max ) { return max ( ( ( Max ) anno ) . value ( ) ) ; } else if ( anno instanceof Size ) { return size ( ( ( Size ) anno ) . min ( ) , ( ( Size ) anno ) . max ( ) ) ; } else if ( anno instanceof Digits ) { return digits ( ( ( Digits ) anno ) . integer ( ) , ( ( Digits ) anno ) . fraction ( ) ) ; } else if ( anno instanceof Pattern ) { return pattern ( ( ( Pattern ) anno ) . regexp ( ) ) ; } else { return new Constraint ( VALIDATORS . get ( anno . annotationType ( ) ) , simplePayload ( VALIDATORS . get ( anno . annotationType ( ) ) ) ) { public boolean isValid ( Object actualValue ) { return true ; } } ; }
|
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link ReferenceSystemRefType } { @ code > }
* @ param value
* Java instance representing xml element ' s value .
* @ return
* the new instance of { @ link JAXBElement } { @ code < } { @ link ReferenceSystemRefType } { @ code > } */
@ XmlElementDecl ( namespace = "http://www.opengis.net/gml" , name = "referenceSystemRef" ) public JAXBElement < ReferenceSystemRefType > createReferenceSystemRef ( ReferenceSystemRefType value ) { } }
|
return new JAXBElement < ReferenceSystemRefType > ( _ReferenceSystemRef_QNAME , ReferenceSystemRefType . class , null , value ) ;
|
public class BamUtils { /** * Utility to compute the coverage from a BAM file , and create a wig format file with the coverage values according
* to a window size ( i . e . , span in wig format specification ) .
* @ param bamPath BAM file
* @ param coveragePath Wig file name where to save coverage values
* @ param span Span ( to group coverage contiguous values in a mean coverage )
* @ throws IOException */
public static void createCoverageWigFile ( Path bamPath , Path coveragePath , int span ) throws IOException , AlignmentCoverageException { } }
|
SAMFileHeader fileHeader = BamUtils . getFileHeader ( bamPath ) ; AlignmentOptions options = new AlignmentOptions ( ) ; options . setContained ( false ) ; BamManager alignmentManager = new BamManager ( bamPath ) ; Iterator < SAMSequenceRecord > iterator = fileHeader . getSequenceDictionary ( ) . getSequences ( ) . iterator ( ) ; PrintWriter writer = new PrintWriter ( coveragePath . toFile ( ) ) ; // chunkSize = 100000 ( too small , it takes looooong . . . )
int chunkSize = Math . max ( span , 200000 / span * span ) ; while ( iterator . hasNext ( ) ) { SAMSequenceRecord next = iterator . next ( ) ; for ( int i = 0 ; i < next . getSequenceLength ( ) ; i += chunkSize ) { Region region = new Region ( next . getSequenceName ( ) , i + 1 , Math . min ( i + chunkSize , next . getSequenceLength ( ) ) ) ; RegionCoverage regionCoverage = alignmentManager . coverage ( region , null , options ) ; printWigFormatCoverage ( regionCoverage , span , ( i == 0 ) , writer ) ; } } writer . close ( ) ;
|
public class MemoryReport { /** * Get the memory estimate ( in bytes ) for the specified type of memory , using the current ND4J data type
* @ param memoryType Type of memory to get the estimate for invites
* @ param minibatchSize Mini batch size to estimate the memory for
* @ param memoryUseMode The memory use mode ( training or inference )
* @ param cacheMode The CacheMode to use
* @ return Estimated memory use for the given memory type */
public long getMemoryBytes ( MemoryType memoryType , int minibatchSize , MemoryUseMode memoryUseMode , CacheMode cacheMode ) { } }
|
return getMemoryBytes ( memoryType , minibatchSize , memoryUseMode , cacheMode , DataTypeUtil . getDtypeFromContext ( ) ) ;
|
public class ListServersResult { /** * An array of servers that were listed .
* @ param servers
* An array of servers that were listed . */
public void setServers ( java . util . Collection < ListedServer > servers ) { } }
|
if ( servers == null ) { this . servers = null ; return ; } this . servers = new java . util . ArrayList < ListedServer > ( servers ) ;
|
public class FSSpecStore { /** * For multiple { @ link FlowSpec } s to be loaded , catch Exceptions when one of them failed to be loaded and
* continue with the rest .
* The { @ link IOException } thrown from standard FileSystem call will be propagated , while the file - specific
* exception will be caught to ensure other files being able to deserialized .
* @ param directory The directory that contains specs to be deserialized
* @ param specs Container of specs . */
private void getSpecs ( Path directory , Collection < Spec > specs ) throws Exception { } }
|
FileStatus [ ] fileStatuses = fs . listStatus ( directory ) ; for ( FileStatus fileStatus : fileStatuses ) { if ( fileStatus . isDirectory ( ) ) { getSpecs ( fileStatus . getPath ( ) , specs ) ; } else { try { specs . add ( readSpecFromFile ( fileStatus . getPath ( ) ) ) ; } catch ( Exception e ) { log . warn ( String . format ( "Path[%s] cannot be correctly deserialized as Spec" , fileStatus . getPath ( ) ) , e ) ; } } }
|
public class AWSKMSClient { /** * Returns a random byte string that is cryptographically secure .
* By default , the random byte string is generated in AWS KMS . To generate the byte string in the AWS CloudHSM
* cluster that is associated with a < a
* href = " http : / / docs . aws . amazon . com / kms / latest / developerguide / key - store - overview . html " > custom key store < / a > , specify
* the custom key store ID .
* For more information about entropy and random number generation , see the < a
* href = " https : / / d0 . awsstatic . com / whitepapers / KMS - Cryptographic - Details . pdf " > AWS Key Management Service
* Cryptographic Details < / a > whitepaper .
* @ param generateRandomRequest
* @ return Result of the GenerateRandom operation returned by the service .
* @ throws DependencyTimeoutException
* The system timed out while trying to fulfill the request . The request can be retried .
* @ throws KMSInternalException
* The request was rejected because an internal exception occurred . The request can be retried .
* @ throws CustomKeyStoreNotFoundException
* The request was rejected because AWS KMS cannot find a custom key store with the specified key store name
* or ID .
* @ throws CustomKeyStoreInvalidStateException
* The request was rejected because of the < code > ConnectionState < / code > of the custom key store . To get the
* < code > ConnectionState < / code > of a custom key store , use the < a > DescribeCustomKeyStores < / a > operation . < / p >
* This exception is thrown under the following conditions :
* < ul >
* < li >
* You requested the < a > CreateKey < / a > or < a > GenerateRandom < / a > operation in a custom key store that is not
* connected . These operations are valid only when the custom key store < code > ConnectionState < / code > is
* < code > CONNECTED < / code > .
* < / li >
* < li >
* You requested the < a > UpdateCustomKeyStore < / a > or < a > DeleteCustomKeyStore < / a > operation on a custom key
* store that is not disconnected . This operation is valid only when the custom key store
* < code > ConnectionState < / code > is < code > DISCONNECTED < / code > .
* < / li >
* < li >
* You requested the < a > ConnectCustomKeyStore < / a > operation on a custom key store with a
* < code > ConnectionState < / code > of < code > DISCONNECTING < / code > or < code > FAILED < / code > . This operation is
* valid for all other < code > ConnectionState < / code > values .
* < / li >
* @ sample AWSKMS . GenerateRandom
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / kms - 2014-11-01 / GenerateRandom " target = " _ top " > AWS API
* Documentation < / a > */
@ Override public GenerateRandomResult generateRandom ( GenerateRandomRequest request ) { } }
|
request = beforeClientExecution ( request ) ; return executeGenerateRandom ( request ) ;
|
public class TraceMarshaller { /** * Marshall the given parameter object . */
public void marshall ( Trace trace , ProtocolMarshaller protocolMarshaller ) { } }
|
if ( trace == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( trace . getId ( ) , ID_BINDING ) ; protocolMarshaller . marshall ( trace . getDuration ( ) , DURATION_BINDING ) ; protocolMarshaller . marshall ( trace . getSegments ( ) , SEGMENTS_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
public class JCalValue { /** * Creates a multi - valued value .
* @ param values the values
* @ return the jCal value */
public static JCalValue multi ( List < ? > values ) { } }
|
List < JsonValue > multiValues = new ArrayList < JsonValue > ( values . size ( ) ) ; for ( Object value : values ) { multiValues . add ( new JsonValue ( value ) ) ; } return new JCalValue ( multiValues ) ;
|
public class AVIMConversation { /** * lastMessage 的来源 :
* 1 . sqlite conversation 表中的 lastMessage , conversation query 后存储下来的
* 2 . sqlite message 表中存储的最新的消息
* 3 . 实时通讯推送过来的消息也要及时更新 lastMessage
* @ param lastMessage */
void setLastMessage ( AVIMMessage lastMessage ) { } }
|
if ( null != lastMessage ) { if ( null == this . lastMessage ) { this . lastMessage = lastMessage ; } else { if ( this . lastMessage . getTimestamp ( ) <= lastMessage . getTimestamp ( ) ) { this . lastMessage = lastMessage ; } } }
|
public class ThreadLocalStack { /** * Pop and return the top element of the stack for this thread
* @ return The previously top element of the stack for this thread
* @ throws EmptyStackException is thrown if the stack for this thread is empty */
public E pop ( ) throws EmptyStackException { } }
|
E answer = peek ( ) ; // Throws EmptyStackException if there ' s nothing there
_elements . get ( ) . remove ( _elements . get ( ) . size ( ) - 1 ) ; return answer ;
|
public class Matrices { /** * Creates a mul function that multiplies given { @ code value } by it ' s argument .
* @ param arg a value to be multiplied by function ' s argument
* @ return a closure that does { @ code _ * _ } */
public static MatrixFunction asMulFunction ( final double arg ) { } }
|
return new MatrixFunction ( ) { @ Override public double evaluate ( int i , int j , double value ) { return value * arg ; } } ;
|
public class NIORestClient { /** * HEAD */
public CompletableFuture < HttpHeaders > headForHeaders ( String url , Object ... uriVariables ) throws RestClientException { } }
|
return toCompletableFuture ( template . headForHeaders ( url , uriVariables ) ) ;
|
public class RoseStringUtil { /** * 支持 ' * ' 前后的匹配
* @ param array
* @ param value
* @ return */
public static boolean matches ( String [ ] patterns , String value ) { } }
|
for ( int i = 0 ; i < patterns . length ; i ++ ) { String pattern = patterns [ i ] ; if ( pattern . equals ( value ) ) { return true ; } if ( pattern . endsWith ( "*" ) ) { if ( value . startsWith ( pattern . substring ( 0 , pattern . length ( ) - 1 ) ) ) { return true ; } } if ( pattern . startsWith ( "*" ) ) { if ( value . endsWith ( pattern . substring ( 1 ) ) ) { return true ; } } } return false ;
|
public class MemoryFileSystem { /** * { @ inheritDoc } */
public synchronized FileEntry put ( DirectoryEntry parent , String name , InputStream content ) throws IOException { } }
|
parent . getClass ( ) ; parent = getNormalizedParent ( parent ) ; List < Entry > entries = getEntriesList ( parent ) ; for ( Iterator < Entry > i = entries . iterator ( ) ; i . hasNext ( ) ; ) { Entry entry = ( Entry ) i . next ( ) ; if ( name . equals ( entry . getName ( ) ) ) { if ( entry instanceof FileEntry ) { i . remove ( ) ; } else { return null ; } } } FileEntry entry = new MemoryFileEntry ( this , parent , name , IOUtils . toByteArray ( content ) ) ; entries . add ( entry ) ; return entry ;
|
public class WorkbookWriter { /** * Turns this { @ link WorkbookWriter } to certain sheet . Sheet names can be
* found by { @ link # getAllSheetNames } .
* @ param index
* of a sheet
* @ return this { @ link WorkbookWriter } */
public WorkbookWriter turnToSheet ( int index ) { } }
|
checkElementIndex ( index , workbook . getNumberOfSheets ( ) ) ; sheet = workbook . getSheetAt ( index ) ; return this ;
|
public class CmsUserEditDialog { /** * Initializes the site combo box . < p >
* @ param settings user settings */
void iniSite ( CmsUserSettings settings ) { } }
|
List < CmsSite > sitesList = OpenCms . getSiteManager ( ) . getAvailableSites ( m_cms , false , false , m_ou . getValue ( ) ) ; IndexedContainer container = new IndexedContainer ( ) ; container . addContainerProperty ( "caption" , String . class , "" ) ; CmsSite firstNoRootSite = null ; for ( CmsSite site : sitesList ) { if ( CmsStringUtil . isEmptyOrWhitespaceOnly ( site . getSiteRoot ( ) ) ) { if ( hasRole ( CmsRole . VFS_MANAGER ) | ( ( m_user == null ) & m_group . getValue ( ) . equals ( OpenCms . getDefaultUsers ( ) . getGroupAdministrators ( ) ) ) ) { Item item = container . addItem ( site . getSiteRoot ( ) ) ; item . getItemProperty ( "caption" ) . setValue ( site . getTitle ( ) ) ; } } else { if ( firstNoRootSite == null ) { firstNoRootSite = site ; } Item item = container . addItem ( site . getSiteRoot ( ) ) ; item . getItemProperty ( "caption" ) . setValue ( site . getTitle ( ) ) ; } } if ( container . size ( ) == 0 ) { if ( ! container . containsId ( A_CmsUI . getCmsObject ( ) . getRequestContext ( ) . getSiteRoot ( ) ) ) { Item defaultItem = container . addItem ( A_CmsUI . getCmsObject ( ) . getRequestContext ( ) . getSiteRoot ( ) ) ; defaultItem . getItemProperty ( "caption" ) . setValue ( A_CmsUI . getCmsObject ( ) . getRequestContext ( ) . getSiteRoot ( ) ) ; } m_visSites = false ; } m_site . setContainerDataSource ( container ) ; m_site . setItemCaptionPropertyId ( "caption" ) ; m_site . setNewItemsAllowed ( false ) ; m_site . setNullSelectionAllowed ( false ) ; if ( settings != null ) { if ( settings . getStartSite ( ) . length ( ) >= 1 ) { m_site . select ( settings . getStartSite ( ) . substring ( 0 , settings . getStartSite ( ) . length ( ) - 1 ) ) ; } else { LOG . error ( "The start site is unvalid configured" ) ; } } else { if ( firstNoRootSite != null ) { m_site . select ( firstNoRootSite . getSiteRoot ( ) ) ; } else { m_site . select ( container . getItemIds ( ) . get ( 0 ) ) ; } }
|
public class CriteriaReader { /** * Main entry point to read criteria data .
* @ param properties project properties
* @ param data criteria data block
* @ param dataOffset offset of the data start within the larger data block
* @ param entryOffset offset of start node for walking the tree
* @ param prompts optional list to hold prompts
* @ param fields optional list of hold fields
* @ param criteriaType optional array representing criteria types
* @ return first node of the criteria */
public GenericCriteria process ( ProjectProperties properties , byte [ ] data , int dataOffset , int entryOffset , List < GenericCriteriaPrompt > prompts , List < FieldType > fields , boolean [ ] criteriaType ) { } }
|
m_properties = properties ; m_prompts = prompts ; m_fields = fields ; m_criteriaType = criteriaType ; m_dataOffset = dataOffset ; if ( m_criteriaType != null ) { m_criteriaType [ 0 ] = true ; m_criteriaType [ 1 ] = true ; } m_criteriaBlockMap . clear ( ) ; m_criteriaData = data ; m_criteriaTextStart = MPPUtility . getShort ( m_criteriaData , m_dataOffset + getCriteriaTextStartOffset ( ) ) ; // Populate the map
int criteriaStartOffset = getCriteriaStartOffset ( ) ; int criteriaBlockSize = getCriteriaBlockSize ( ) ; // System . out . println ( ) ;
// System . out . println ( ByteArrayHelper . hexdump ( data , dataOffset , criteriaStartOffset , false ) ) ;
if ( m_criteriaData . length <= m_criteriaTextStart ) { return null ; // bad data
} while ( criteriaStartOffset + criteriaBlockSize <= m_criteriaTextStart ) { byte [ ] block = new byte [ criteriaBlockSize ] ; System . arraycopy ( m_criteriaData , m_dataOffset + criteriaStartOffset , block , 0 , criteriaBlockSize ) ; m_criteriaBlockMap . put ( Integer . valueOf ( criteriaStartOffset ) , block ) ; // System . out . println ( Integer . toHexString ( criteriaStartOffset ) + " : " + ByteArrayHelper . hexdump ( block , false ) ) ;
criteriaStartOffset += criteriaBlockSize ; } if ( entryOffset == - 1 ) { entryOffset = getCriteriaStartOffset ( ) ; } List < GenericCriteria > list = new LinkedList < GenericCriteria > ( ) ; processBlock ( list , m_criteriaBlockMap . get ( Integer . valueOf ( entryOffset ) ) ) ; GenericCriteria criteria ; if ( list . isEmpty ( ) ) { criteria = null ; } else { criteria = list . get ( 0 ) ; } return criteria ;
|
public class SendGrid { /** * Remove a request header .
* @ param key the header key to remove .
* @ return the new set of request headers . */
public Map < String , String > removeRequestHeader ( String key ) { } }
|
this . requestHeaders . remove ( key ) ; return getRequestHeaders ( ) ;
|
public class JsfFaceletScannerPlugin { /** * Tries to find a { @ link JsfFaceletDescriptor } in the store with the given
* fullFilePath . Creates a new one if no descriptor could be found .
* @ param fullFilePath
* the file path of the wanted file
* @ param context
* The scanner context .
* @ return a { @ link JsfFaceletDescriptor } representing the wanted file */
private JsfFaceletDescriptor getJsfTemplateDescriptor ( String fullFilePath , ScannerContext context ) { } }
|
// can ' t handle EL - expressions
if ( isElExpression ( fullFilePath ) ) { return null ; } return context . peek ( FileResolver . class ) . require ( fullFilePath , JsfFaceletDescriptor . class , context ) ;
|
public class CmsPublishGroupPanel { /** * Updates the check box state for this group . < p >
* @ param value the state to use for updating the check box */
public void updateCheckboxState ( CmsPublishItemStateSummary value ) { } }
|
CheckBoxUpdate update = CmsPublishSelectPanel . updateCheckbox ( value ) ; m_selectGroup . setTitle ( update . getAction ( ) ) ; m_selectGroup . setState ( update . getState ( ) , false ) ;
|
public class Vector2f { /** * Set the value of the specified component of this vector .
* @ param component
* the component whose value to set , within < code > [ 0 . . 1 ] < / code >
* @ param value
* the value to set
* @ return this
* @ throws IllegalArgumentException if < code > component < / code > is not within < code > [ 0 . . 1 ] < / code > */
public Vector2f setComponent ( int component , float value ) throws IllegalArgumentException { } }
|
switch ( component ) { case 0 : x = value ; break ; case 1 : y = value ; break ; default : throw new IllegalArgumentException ( ) ; } return this ;
|
public class SerialImpl { /** * Get the RTS ( request - to - send ) pin state .
* @ throws IllegalStateException thrown if the serial port is not already open .
* @ throws IOException thrown on any error . */
public boolean getRTS ( ) throws IllegalStateException , IOException { } }
|
// validate state
if ( isClosed ( ) ) throw new IllegalStateException ( "Serial connection is not open; cannot 'getRTS()'." ) ; // get pin state
return com . pi4j . jni . Serial . getRTS ( fileDescriptor ) ;
|
public class MwsXmlWriter { /** * Output escaped value .
* @ param value */
private void escape ( String value ) { } }
|
int n = value . length ( ) ; int i = 0 ; for ( int j = 0 ; j < n ; ++ j ) { int k = ESCAPED_CHARS . indexOf ( value . charAt ( j ) ) ; if ( k >= 0 ) { if ( i < j ) { append ( value , i , j ) ; } append ( ESCAPE_SEQ [ k ] ) ; i = j + 1 ; } } if ( i < n ) { append ( value , i , n ) ; }
|
public class RTMEventHandler { /** * Returns the Class object of the Event implementation . */
public Class < E > getEventClass ( ) { } }
|
if ( cachedClazz != null ) { return cachedClazz ; } Class < ? > clazz = this . getClass ( ) ; while ( clazz != Object . class ) { try { Type mySuperclass = clazz . getGenericSuperclass ( ) ; Type tType = ( ( ParameterizedType ) mySuperclass ) . getActualTypeArguments ( ) [ 0 ] ; cachedClazz = ( Class < E > ) Class . forName ( tType . getTypeName ( ) ) ; return cachedClazz ; } catch ( Exception e ) { } clazz = clazz . getSuperclass ( ) ; } throw new IllegalStateException ( "Failed to load event class - " + this . getClass ( ) . getCanonicalName ( ) ) ;
|
public class RDBMetadataExtractionTools { /** * Retrieves the unique attributes ( s )
* @ param md
* @ return
* @ throws SQLException */
private static void getUniqueAttributes ( DatabaseMetaData md , DatabaseRelationDefinition relation , QuotedIDFactory idfac ) throws SQLException { } }
|
RelationID id = relation . getID ( ) ; // extracting unique
try ( ResultSet rs = md . getIndexInfo ( null , id . getSchemaName ( ) , id . getTableName ( ) , true , true ) ) { extractUniqueAttributes ( relation , idfac , rs ) ; } catch ( Exception e ) { // Workaround for MySQL - connector > = 8.0
try ( ResultSet rs = md . getIndexInfo ( id . getSchemaName ( ) , null , id . getTableName ( ) , true , true ) ) { extractUniqueAttributes ( relation , idfac , rs ) ; } }
|
public class RawXJC2Mojo { /** * Returns array of command line arguments for XJC . These arguments are based on
* the configured arguments ( see { @ link # getArgs ( ) } ) but also include episode
* arguments .
* @ return String array of XJC command line options . */
protected List < String > getArguments ( ) { } }
|
final List < String > arguments = new ArrayList < String > ( getArgs ( ) ) ; final String httpproxy = getHttpproxy ( ) ; if ( httpproxy != null ) { arguments . add ( "-httpproxy" ) ; arguments . add ( httpproxy ) ; } if ( getEpisode ( ) && getEpisodeFile ( ) != null ) { arguments . add ( "-episode" ) ; arguments . add ( getEpisodeFile ( ) . getAbsolutePath ( ) ) ; } if ( getMarkGenerated ( ) ) { arguments . add ( "-mark-generated" ) ; } for ( final File episodeFile : getEpisodeFiles ( ) ) { if ( episodeFile . isFile ( ) ) { arguments . add ( episodeFile . getAbsolutePath ( ) ) ; } } return arguments ;
|
public class TieredBlockStore { /** * Increases the temp block size only if this temp block ' s parent dir has enough available space .
* @ param blockId block id
* @ param additionalBytes additional bytes to request for this block
* @ return a pair of boolean and { @ link BlockStoreLocation } . The boolean indicates if the
* operation succeeds and the { @ link BlockStoreLocation } denotes where to free more space
* if it fails .
* @ throws BlockDoesNotExistException if this block is not found */
private Pair < Boolean , BlockStoreLocation > requestSpaceInternal ( long blockId , long additionalBytes ) throws BlockDoesNotExistException { } }
|
// NOTE : a temp block is supposed to be visible for its own writer , unnecessary to acquire
// block lock here since no sharing
try ( LockResource r = new LockResource ( mMetadataWriteLock ) ) { TempBlockMeta tempBlockMeta = mMetaManager . getTempBlockMeta ( blockId ) ; if ( tempBlockMeta . getParentDir ( ) . getAvailableBytes ( ) < additionalBytes ) { return new Pair < > ( false , tempBlockMeta . getBlockLocation ( ) ) ; } // Increase the size of this temp block
try { mMetaManager . resizeTempBlockMeta ( tempBlockMeta , tempBlockMeta . getBlockSize ( ) + additionalBytes ) ; } catch ( InvalidWorkerStateException e ) { throw Throwables . propagate ( e ) ; // we shall never reach here
} return new Pair < > ( true , null ) ; }
|
public class InterfacedEventManager { /** * { @ inheritDoc }
* @ throws IllegalArgumentException
* If the provided listener does not implement { @ link net . dv8tion . jda . core . hooks . EventListener EventListener } */
@ Override public void register ( Object listener ) { } }
|
if ( ! ( listener instanceof EventListener ) ) { throw new IllegalArgumentException ( "Listener must implement EventListener" ) ; } listeners . add ( ( ( EventListener ) listener ) ) ;
|
public class ExceptionUtil { /** * Returns the ' base ' message text of any exception , stripping off all
* nested exception text ( " nested exception is : etc . " ) . < p >
* The getMessage ( ) method of both RemoteException and EJBException have
* the helpful / annoying behavior of including the message text / stack for
* all nested exceptions as well . This causes duplicate text / stack
* information to be logged by WebSphere RAS support , which also includes
* the nested exception information . And , all of this can be further
* duplicated in the EJB Container mapping code , which converts exceptions
* to Remote or Local exceptions , and would like to include the same
* message text in the mapped exception . . . which can result in the
* exception text / stack being duplicated 4 or more times . < p >
* Also , toString ( ) must be avoided , as it would include the name of
* the exception in the message text . < p >
* This method will return just the base part of an exceptions message
* text . . . removing all nested exception information . And , it will work
* for RemoteException and EJBException , as well as any other Exceptions
* that contain similar formatting . < p > */
public static String getBaseMessage ( Throwable exception ) { } }
|
String message = null ; // RemoteException contains a ' detail ' field that holds the ' cause ' ,
// instead of the normal cause defined by Throwable . When detail is
// set , getMessage ( ) will include the text and stack of the detail ,
// which may ends up duplicating the message text .
// To avoid this , ' detail ' is temporarily cleared , resulting in
// getMessage ( ) returning only the message text specified when the
// RemoteException was created . d366807
if ( exception instanceof RemoteException ) { RemoteException rex = ( RemoteException ) exception ; Throwable detail = rex . detail ; rex . detail = null ; message = rex . getMessage ( ) ; rex . detail = detail ; // We frequently create remote exceptions with an empty message
// to avoid redundant messages being printed in stack traces . If the
// remote exception has an empty message , use the detail . d739198
if ( "" . equals ( message ) && detail != null ) { message = getBaseMessage ( detail ) ; } } // Other exceptions , like EJBException , do not contain a public field
// that holds the ' cause ' . So for these exceptions , the returned
// message text is just parsed for the beginning of the nested
// exceptions . . . and then truncated .
else if ( exception != null ) { message = exception . getMessage ( ) ; if ( message != null ) { if ( message . startsWith ( "nested exception is:" ) ) { message = null ; } else { int nestIndex = message . indexOf ( "; nested exception is:" ) ; if ( nestIndex > - 1 ) message = message . substring ( 0 , nestIndex ) ; } } } return message ;
|
public class ApiOvhTelephony { /** * Check if security deposit transfer is possible between two billing accounts
* REST : POST / telephony / { billingAccount } / canTransferSecurityDeposit
* @ param billingAccountDestination [ required ] The destination billing account
* @ param billingAccount [ required ] The name of your billingAccount */
public Boolean billingAccount_canTransferSecurityDeposit_POST ( String billingAccount , String billingAccountDestination ) throws IOException { } }
|
String qPath = "/telephony/{billingAccount}/canTransferSecurityDeposit" ; StringBuilder sb = path ( qPath , billingAccount ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "billingAccountDestination" , billingAccountDestination ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , Boolean . class ) ;
|
public class ZooKeeperClient { /** * 从当前的node信息中获取对应的zk集群信息 */
private static List < String > getServerAddrs ( ) { } }
|
List < String > result = ArbitrateConfigUtils . getServerAddrs ( ) ; if ( result == null || result . size ( ) == 0 ) { result = Arrays . asList ( cluster ) ; } return result ;
|
public class Ucode { /** * Set the ucode .
* @ param ucode
* The string representation of the ucode . It must consist
* of 32 hex letters .
* @ throws IllegalArgumentException
* { @ code ucode } is { @ code null } or it does not consist of
* 32 hex letters . */
public void setUcode ( String ucode ) { } }
|
if ( ucode == null ) { throw new IllegalArgumentException ( "'ucode' is null." ) ; } if ( UCODE_PATTERN . matcher ( ucode ) . matches ( ) == false ) { throw new IllegalArgumentException ( "The format of 'ucode' is wrong: " + ucode ) ; } mUcode = ucode ; byte [ ] data = getData ( ) ; for ( int i = 0 ; i < 32 ; i += 2 ) { // Parse the two hex letters .
byte value = readHex ( ucode , i ) ; // Store the value in the little endian order .
int offset = UCODE_INDEX + ( 15 - i / 2 ) ; data [ offset ] = value ; }
|
public class LoginHandler { /** * This method adds the player session to the
* { @ link SessionRegistryService } . The key being the remote udp address of
* the client and the session being the value .
* @ param playerSession
* @ param buffer
* Used to read the remote address of the client which is
* attempting to connect via udp . */
protected void loginUdp ( PlayerSession playerSession , ChannelBuffer buffer ) { } }
|
InetSocketAddress remoteAdress = NettyUtils . readSocketAddress ( buffer ) ; if ( null != remoteAdress ) { udpSessionRegistry . putSession ( remoteAdress , playerSession ) ; }
|
public class ControllerLinkBuilderFactory { /** * ( non - Javadoc )
* @ see org . springframework . hateoas . MethodLinkBuilderFactory # linkTo ( java . lang . Object ) */
@ Override public ControllerLinkBuilder linkTo ( Object invocationValue ) { } }
|
return WebHandler . linkTo ( invocationValue , ControllerLinkBuilder :: new , ( builder , invocation ) -> { MethodParameters parameters = MethodParameters . of ( invocation . getMethod ( ) ) ; Iterator < Object > parameterValues = Arrays . asList ( invocation . getArguments ( ) ) . iterator ( ) ; for ( MethodParameter parameter : parameters . getParameters ( ) ) { Object parameterValue = parameterValues . next ( ) ; for ( UriComponentsContributor contributor : this . uriComponentsContributors ) { if ( contributor . supportsParameter ( parameter ) ) { contributor . enhance ( builder , parameter , parameterValue ) ; } } } return builder ; } ) . apply ( mapping -> ControllerLinkBuilder . getBuilder ( ) . path ( mapping ) ) ;
|
public class BaseMonetaryAmountFormat { /** * Formats the given { @ link javax . money . MonetaryAmount } to a String .
* @ param amount the amount to format , not { @ code null }
* @ return the string printed using the settings of this formatter
* @ throws UnsupportedOperationException if the formatter is unable to print */
public String format ( MonetaryAmount amount ) { } }
|
StringBuilder b = new StringBuilder ( ) ; try { print ( b , amount ) ; } catch ( IOException e ) { throw new IllegalStateException ( "Formatting error." , e ) ; } return b . toString ( ) ;
|
public class MtasDataDoubleAdvanced { /** * ( non - Javadoc )
* @ see mtas . codec . util . DataCollector . MtasDataCollector # boundaryForSegment ( ) */
@ Override protected Double boundaryForSegment ( String segmentName ) throws IOException { } }
|
if ( segmentRegistration . equals ( SEGMENT_SORT_ASC ) || segmentRegistration . equals ( SEGMENT_SORT_DESC ) ) { Double thisLast = segmentValueTopListLast . get ( segmentName ) ; if ( thisLast == null ) { return null ; } else if ( segmentRegistration . equals ( SEGMENT_SORT_ASC ) ) { return thisLast * segmentNumber ; } else { return thisLast / segmentNumber ; } } else { throw new IOException ( "can't compute boundary for segmentRegistration " + segmentRegistration ) ; }
|
public class CmsScrollPanelImpl { /** * Update the position of the scrollbars . < p >
* If only the vertical scrollbar is present , it takes up the entire height of
* the right side . If only the horizontal scrollbar is present , it takes up
* the entire width of the bottom . If both scrollbars are present , the
* vertical scrollbar extends from the top to just above the horizontal
* scrollbar , and the horizontal scrollbar extends from the left to just right
* of the vertical scrollbar , leaving a small square in the bottom right
* corner . < p > */
private void maybeUpdateScrollbars ( ) { } }
|
if ( ! isAttached ( ) ) { return ; } /* * Measure the height and width of the content directly . Note that measuring
* the height and width of the container element ( which should be the same )
* doesn ' t work correctly in IE . */
Widget w = getWidget ( ) ; int contentHeight = ( w == null ) ? 0 : w . getOffsetHeight ( ) ; // Determine which scrollbars to show .
int realScrollbarHeight = 0 ; int realScrollbarWidth = 0 ; if ( ( m_scrollbar != null ) && ( getElement ( ) . getClientHeight ( ) < contentHeight ) ) { // Vertical scrollbar is defined and required .
realScrollbarWidth = m_verticalScrollbarWidth ; } if ( realScrollbarWidth > 0 ) { m_scrollLayer . getStyle ( ) . clearDisplay ( ) ; m_scrollbar . setScrollHeight ( Math . max ( 0 , contentHeight - realScrollbarHeight ) ) ; } else if ( m_scrollLayer != null ) { m_scrollLayer . getStyle ( ) . setDisplay ( Display . NONE ) ; } if ( m_scrollbar instanceof I_CmsDescendantResizeHandler ) { ( ( I_CmsDescendantResizeHandler ) m_scrollbar ) . onResizeDescendant ( ) ; } maybeUpdateScrollbarPositions ( ) ;
|
public class CoNLLDocumentReaderAndWriter { /** * end class CoNLLIterator */
private static Iterator < String > splitIntoDocs ( Reader r ) { } }
|
if ( TREAT_FILE_AS_ONE_DOCUMENT ) { return Collections . singleton ( IOUtils . slurpReader ( r ) ) . iterator ( ) ; } else { Collection < String > docs = new ArrayList < String > ( ) ; ObjectBank < String > ob = ObjectBank . getLineIterator ( r ) ; StringBuilder current = new StringBuilder ( ) ; for ( String line : ob ) { if ( docPattern . matcher ( line ) . lookingAt ( ) ) { // Start new doc , store old one if non - empty
if ( current . length ( ) > 0 ) { docs . add ( current . toString ( ) ) ; current = new StringBuilder ( ) ; } } current . append ( line ) ; current . append ( '\n' ) ; } if ( current . length ( ) > 0 ) { docs . add ( current . toString ( ) ) ; } return docs . iterator ( ) ; }
|
public class BuildMetrics { /** * Get the profiling container for the specified project
* @ param projectPath to look up */
public ProjectMetrics getProjectProfile ( String projectPath ) { } }
|
ProjectMetrics result = projects . get ( projectPath ) ; if ( result == null ) { result = new ProjectMetrics ( projectPath ) ; projects . put ( projectPath , result ) ; } return result ;
|
public class SetUtil { /** * set1 , set2的差集 ( 在set1 , 不在set2中的对象 ) 的只读view , 不复制产生新的Set对象 .
* 如果尝试写入该View会抛出UnsupportedOperationException */
public static < E > Set < E > differenceView ( final Set < E > set1 , final Set < ? > set2 ) { } }
|
return Sets . difference ( set1 , set2 ) ;
|
public class Ifc4FactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public Object createFromString ( EDataType eDataType , String initialValue ) { } }
|
switch ( eDataType . getClassifierID ( ) ) { case Ifc4Package . TRISTATE : return createTristateFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ACTION_REQUEST_TYPE_ENUM : return createIfcActionRequestTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ACTION_SOURCE_TYPE_ENUM : return createIfcActionSourceTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ACTION_TYPE_ENUM : return createIfcActionTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ACTUATOR_TYPE_ENUM : return createIfcActuatorTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ADDRESS_TYPE_ENUM : return createIfcAddressTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_AIR_TERMINAL_BOX_TYPE_ENUM : return createIfcAirTerminalBoxTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_AIR_TERMINAL_TYPE_ENUM : return createIfcAirTerminalTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_AIR_TO_AIR_HEAT_RECOVERY_TYPE_ENUM : return createIfcAirToAirHeatRecoveryTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ALARM_TYPE_ENUM : return createIfcAlarmTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ANALYSIS_MODEL_TYPE_ENUM : return createIfcAnalysisModelTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ANALYSIS_THEORY_TYPE_ENUM : return createIfcAnalysisTheoryTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ARITHMETIC_OPERATOR_ENUM : return createIfcArithmeticOperatorEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ASSEMBLY_PLACE_ENUM : return createIfcAssemblyPlaceEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_AUDIO_VISUAL_APPLIANCE_TYPE_ENUM : return createIfcAudioVisualApplianceTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_BSPLINE_CURVE_FORM : return createIfcBSplineCurveFormFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_BSPLINE_SURFACE_FORM : return createIfcBSplineSurfaceFormFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_BEAM_TYPE_ENUM : return createIfcBeamTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_BENCHMARK_ENUM : return createIfcBenchmarkEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_BOILER_TYPE_ENUM : return createIfcBoilerTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_BOOLEAN_OPERATOR : return createIfcBooleanOperatorFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_BUILDING_ELEMENT_PART_TYPE_ENUM : return createIfcBuildingElementPartTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_BUILDING_ELEMENT_PROXY_TYPE_ENUM : return createIfcBuildingElementProxyTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_BUILDING_SYSTEM_TYPE_ENUM : return createIfcBuildingSystemTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_BURNER_TYPE_ENUM : return createIfcBurnerTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_CABLE_CARRIER_FITTING_TYPE_ENUM : return createIfcCableCarrierFittingTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_CABLE_CARRIER_SEGMENT_TYPE_ENUM : return createIfcCableCarrierSegmentTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_CABLE_FITTING_TYPE_ENUM : return createIfcCableFittingTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_CABLE_SEGMENT_TYPE_ENUM : return createIfcCableSegmentTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_CHANGE_ACTION_ENUM : return createIfcChangeActionEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_CHILLER_TYPE_ENUM : return createIfcChillerTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_CHIMNEY_TYPE_ENUM : return createIfcChimneyTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_COIL_TYPE_ENUM : return createIfcCoilTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_COLUMN_TYPE_ENUM : return createIfcColumnTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_COMMUNICATIONS_APPLIANCE_TYPE_ENUM : return createIfcCommunicationsApplianceTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_COMPLEX_PROPERTY_TEMPLATE_TYPE_ENUM : return createIfcComplexPropertyTemplateTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_COMPRESSOR_TYPE_ENUM : return createIfcCompressorTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_CONDENSER_TYPE_ENUM : return createIfcCondenserTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_CONNECTION_TYPE_ENUM : return createIfcConnectionTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_CONSTRAINT_ENUM : return createIfcConstraintEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_CONSTRUCTION_EQUIPMENT_RESOURCE_TYPE_ENUM : return createIfcConstructionEquipmentResourceTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_CONSTRUCTION_MATERIAL_RESOURCE_TYPE_ENUM : return createIfcConstructionMaterialResourceTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_CONSTRUCTION_PRODUCT_RESOURCE_TYPE_ENUM : return createIfcConstructionProductResourceTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_CONTROLLER_TYPE_ENUM : return createIfcControllerTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_COOLED_BEAM_TYPE_ENUM : return createIfcCooledBeamTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_COOLING_TOWER_TYPE_ENUM : return createIfcCoolingTowerTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_COST_ITEM_TYPE_ENUM : return createIfcCostItemTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_COST_SCHEDULE_TYPE_ENUM : return createIfcCostScheduleTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_COVERING_TYPE_ENUM : return createIfcCoveringTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_CREW_RESOURCE_TYPE_ENUM : return createIfcCrewResourceTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_CURTAIN_WALL_TYPE_ENUM : return createIfcCurtainWallTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_CURVE_INTERPOLATION_ENUM : return createIfcCurveInterpolationEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_DAMPER_TYPE_ENUM : return createIfcDamperTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_DATA_ORIGIN_ENUM : return createIfcDataOriginEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_DERIVED_UNIT_ENUM : return createIfcDerivedUnitEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_DIRECTION_SENSE_ENUM : return createIfcDirectionSenseEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_DISCRETE_ACCESSORY_TYPE_ENUM : return createIfcDiscreteAccessoryTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_DISTRIBUTION_CHAMBER_ELEMENT_TYPE_ENUM : return createIfcDistributionChamberElementTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_DISTRIBUTION_PORT_TYPE_ENUM : return createIfcDistributionPortTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_DISTRIBUTION_SYSTEM_ENUM : return createIfcDistributionSystemEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_DOCUMENT_CONFIDENTIALITY_ENUM : return createIfcDocumentConfidentialityEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_DOCUMENT_STATUS_ENUM : return createIfcDocumentStatusEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_DOOR_PANEL_OPERATION_ENUM : return createIfcDoorPanelOperationEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_DOOR_PANEL_POSITION_ENUM : return createIfcDoorPanelPositionEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_DOOR_STYLE_CONSTRUCTION_ENUM : return createIfcDoorStyleConstructionEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_DOOR_STYLE_OPERATION_ENUM : return createIfcDoorStyleOperationEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_DOOR_TYPE_ENUM : return createIfcDoorTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_DOOR_TYPE_OPERATION_ENUM : return createIfcDoorTypeOperationEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_DUCT_FITTING_TYPE_ENUM : return createIfcDuctFittingTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_DUCT_SEGMENT_TYPE_ENUM : return createIfcDuctSegmentTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_DUCT_SILENCER_TYPE_ENUM : return createIfcDuctSilencerTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ELECTRIC_APPLIANCE_TYPE_ENUM : return createIfcElectricApplianceTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ELECTRIC_DISTRIBUTION_BOARD_TYPE_ENUM : return createIfcElectricDistributionBoardTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ELECTRIC_FLOW_STORAGE_DEVICE_TYPE_ENUM : return createIfcElectricFlowStorageDeviceTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ELECTRIC_GENERATOR_TYPE_ENUM : return createIfcElectricGeneratorTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ELECTRIC_MOTOR_TYPE_ENUM : return createIfcElectricMotorTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ELECTRIC_TIME_CONTROL_TYPE_ENUM : return createIfcElectricTimeControlTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ELEMENT_ASSEMBLY_TYPE_ENUM : return createIfcElementAssemblyTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ELEMENT_COMPOSITION_ENUM : return createIfcElementCompositionEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ENGINE_TYPE_ENUM : return createIfcEngineTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_EVAPORATIVE_COOLER_TYPE_ENUM : return createIfcEvaporativeCoolerTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_EVAPORATOR_TYPE_ENUM : return createIfcEvaporatorTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_EVENT_TRIGGER_TYPE_ENUM : return createIfcEventTriggerTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_EVENT_TYPE_ENUM : return createIfcEventTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_EXTERNAL_SPATIAL_ELEMENT_TYPE_ENUM : return createIfcExternalSpatialElementTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_FAN_TYPE_ENUM : return createIfcFanTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_FASTENER_TYPE_ENUM : return createIfcFastenerTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_FILTER_TYPE_ENUM : return createIfcFilterTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_FIRE_SUPPRESSION_TERMINAL_TYPE_ENUM : return createIfcFireSuppressionTerminalTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_FLOW_DIRECTION_ENUM : return createIfcFlowDirectionEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_FLOW_INSTRUMENT_TYPE_ENUM : return createIfcFlowInstrumentTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_FLOW_METER_TYPE_ENUM : return createIfcFlowMeterTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_FOOTING_TYPE_ENUM : return createIfcFootingTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_FURNITURE_TYPE_ENUM : return createIfcFurnitureTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_GEOGRAPHIC_ELEMENT_TYPE_ENUM : return createIfcGeographicElementTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_GEOMETRIC_PROJECTION_ENUM : return createIfcGeometricProjectionEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_GLOBAL_OR_LOCAL_ENUM : return createIfcGlobalOrLocalEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_GRID_TYPE_ENUM : return createIfcGridTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_HEAT_EXCHANGER_TYPE_ENUM : return createIfcHeatExchangerTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_HUMIDIFIER_TYPE_ENUM : return createIfcHumidifierTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_INTERCEPTOR_TYPE_ENUM : return createIfcInterceptorTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_INTERNAL_OR_EXTERNAL_ENUM : return createIfcInternalOrExternalEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_INVENTORY_TYPE_ENUM : return createIfcInventoryTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_JUNCTION_BOX_TYPE_ENUM : return createIfcJunctionBoxTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_KNOT_TYPE : return createIfcKnotTypeFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_LABOR_RESOURCE_TYPE_ENUM : return createIfcLaborResourceTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_LAMP_TYPE_ENUM : return createIfcLampTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_LAYER_SET_DIRECTION_ENUM : return createIfcLayerSetDirectionEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_LIGHT_DISTRIBUTION_CURVE_ENUM : return createIfcLightDistributionCurveEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_LIGHT_EMISSION_SOURCE_ENUM : return createIfcLightEmissionSourceEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_LIGHT_FIXTURE_TYPE_ENUM : return createIfcLightFixtureTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_LOAD_GROUP_TYPE_ENUM : return createIfcLoadGroupTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_LOGICAL_OPERATOR_ENUM : return createIfcLogicalOperatorEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_MECHANICAL_FASTENER_TYPE_ENUM : return createIfcMechanicalFastenerTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_MEDICAL_DEVICE_TYPE_ENUM : return createIfcMedicalDeviceTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_MEMBER_TYPE_ENUM : return createIfcMemberTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_MOTOR_CONNECTION_TYPE_ENUM : return createIfcMotorConnectionTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_NULL_STYLE_ENUM : return createIfcNullStyleEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_OBJECT_TYPE_ENUM : return createIfcObjectTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_OBJECTIVE_ENUM : return createIfcObjectiveEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_OCCUPANT_TYPE_ENUM : return createIfcOccupantTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_OPENING_ELEMENT_TYPE_ENUM : return createIfcOpeningElementTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_OUTLET_TYPE_ENUM : return createIfcOutletTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_PERFORMANCE_HISTORY_TYPE_ENUM : return createIfcPerformanceHistoryTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_PERMEABLE_COVERING_OPERATION_ENUM : return createIfcPermeableCoveringOperationEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_PERMIT_TYPE_ENUM : return createIfcPermitTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_PHYSICAL_OR_VIRTUAL_ENUM : return createIfcPhysicalOrVirtualEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_PILE_CONSTRUCTION_ENUM : return createIfcPileConstructionEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_PILE_TYPE_ENUM : return createIfcPileTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_PIPE_FITTING_TYPE_ENUM : return createIfcPipeFittingTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_PIPE_SEGMENT_TYPE_ENUM : return createIfcPipeSegmentTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_PLATE_TYPE_ENUM : return createIfcPlateTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_PREFERRED_SURFACE_CURVE_REPRESENTATION : return createIfcPreferredSurfaceCurveRepresentationFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_PROCEDURE_TYPE_ENUM : return createIfcProcedureTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_PROFILE_TYPE_ENUM : return createIfcProfileTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_PROJECT_ORDER_TYPE_ENUM : return createIfcProjectOrderTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_PROJECTED_OR_TRUE_LENGTH_ENUM : return createIfcProjectedOrTrueLengthEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_PROJECTION_ELEMENT_TYPE_ENUM : return createIfcProjectionElementTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_PROPERTY_SET_TEMPLATE_TYPE_ENUM : return createIfcPropertySetTemplateTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_PROTECTIVE_DEVICE_TRIPPING_UNIT_TYPE_ENUM : return createIfcProtectiveDeviceTrippingUnitTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_PROTECTIVE_DEVICE_TYPE_ENUM : return createIfcProtectiveDeviceTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_PUMP_TYPE_ENUM : return createIfcPumpTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_RAILING_TYPE_ENUM : return createIfcRailingTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_RAMP_FLIGHT_TYPE_ENUM : return createIfcRampFlightTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_RAMP_TYPE_ENUM : return createIfcRampTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_RECURRENCE_TYPE_ENUM : return createIfcRecurrenceTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_REFLECTANCE_METHOD_ENUM : return createIfcReflectanceMethodEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_REINFORCING_BAR_ROLE_ENUM : return createIfcReinforcingBarRoleEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_REINFORCING_BAR_SURFACE_ENUM : return createIfcReinforcingBarSurfaceEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_REINFORCING_BAR_TYPE_ENUM : return createIfcReinforcingBarTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_REINFORCING_MESH_TYPE_ENUM : return createIfcReinforcingMeshTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ROLE_ENUM : return createIfcRoleEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_ROOF_TYPE_ENUM : return createIfcRoofTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_SI_PREFIX : return createIfcSIPrefixFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_SI_UNIT_NAME : return createIfcSIUnitNameFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_SANITARY_TERMINAL_TYPE_ENUM : return createIfcSanitaryTerminalTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_SECTION_TYPE_ENUM : return createIfcSectionTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_SENSOR_TYPE_ENUM : return createIfcSensorTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_SEQUENCE_ENUM : return createIfcSequenceEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_SHADING_DEVICE_TYPE_ENUM : return createIfcShadingDeviceTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_SIMPLE_PROPERTY_TEMPLATE_TYPE_ENUM : return createIfcSimplePropertyTemplateTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_SLAB_TYPE_ENUM : return createIfcSlabTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_SOLAR_DEVICE_TYPE_ENUM : return createIfcSolarDeviceTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_SPACE_HEATER_TYPE_ENUM : return createIfcSpaceHeaterTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_SPACE_TYPE_ENUM : return createIfcSpaceTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_SPATIAL_ZONE_TYPE_ENUM : return createIfcSpatialZoneTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_STACK_TERMINAL_TYPE_ENUM : return createIfcStackTerminalTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_STAIR_FLIGHT_TYPE_ENUM : return createIfcStairFlightTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_STAIR_TYPE_ENUM : return createIfcStairTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_STATE_ENUM : return createIfcStateEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_STRUCTURAL_CURVE_ACTIVITY_TYPE_ENUM : return createIfcStructuralCurveActivityTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_STRUCTURAL_CURVE_MEMBER_TYPE_ENUM : return createIfcStructuralCurveMemberTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_STRUCTURAL_SURFACE_ACTIVITY_TYPE_ENUM : return createIfcStructuralSurfaceActivityTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_STRUCTURAL_SURFACE_MEMBER_TYPE_ENUM : return createIfcStructuralSurfaceMemberTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_SUB_CONTRACT_RESOURCE_TYPE_ENUM : return createIfcSubContractResourceTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_SURFACE_FEATURE_TYPE_ENUM : return createIfcSurfaceFeatureTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_SURFACE_SIDE : return createIfcSurfaceSideFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_SWITCHING_DEVICE_TYPE_ENUM : return createIfcSwitchingDeviceTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_SYSTEM_FURNITURE_ELEMENT_TYPE_ENUM : return createIfcSystemFurnitureElementTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_TANK_TYPE_ENUM : return createIfcTankTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_TASK_DURATION_ENUM : return createIfcTaskDurationEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_TASK_TYPE_ENUM : return createIfcTaskTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_TENDON_ANCHOR_TYPE_ENUM : return createIfcTendonAnchorTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_TENDON_TYPE_ENUM : return createIfcTendonTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_TEXT_PATH : return createIfcTextPathFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_TIME_SERIES_DATA_TYPE_ENUM : return createIfcTimeSeriesDataTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_TRANSFORMER_TYPE_ENUM : return createIfcTransformerTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_TRANSITION_CODE : return createIfcTransitionCodeFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_TRANSPORT_ELEMENT_TYPE_ENUM : return createIfcTransportElementTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_TRIMMING_PREFERENCE : return createIfcTrimmingPreferenceFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_TUBE_BUNDLE_TYPE_ENUM : return createIfcTubeBundleTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_UNIT_ENUM : return createIfcUnitEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_UNITARY_CONTROL_ELEMENT_TYPE_ENUM : return createIfcUnitaryControlElementTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_UNITARY_EQUIPMENT_TYPE_ENUM : return createIfcUnitaryEquipmentTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_VALVE_TYPE_ENUM : return createIfcValveTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_VIBRATION_ISOLATOR_TYPE_ENUM : return createIfcVibrationIsolatorTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_VOIDING_FEATURE_TYPE_ENUM : return createIfcVoidingFeatureTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_WALL_TYPE_ENUM : return createIfcWallTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_WASTE_TERMINAL_TYPE_ENUM : return createIfcWasteTerminalTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_WINDOW_PANEL_OPERATION_ENUM : return createIfcWindowPanelOperationEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_WINDOW_PANEL_POSITION_ENUM : return createIfcWindowPanelPositionEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_WINDOW_STYLE_CONSTRUCTION_ENUM : return createIfcWindowStyleConstructionEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_WINDOW_STYLE_OPERATION_ENUM : return createIfcWindowStyleOperationEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_WINDOW_TYPE_ENUM : return createIfcWindowTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_WINDOW_TYPE_PARTITIONING_ENUM : return createIfcWindowTypePartitioningEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_WORK_CALENDAR_TYPE_ENUM : return createIfcWorkCalendarTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_WORK_PLAN_TYPE_ENUM : return createIfcWorkPlanTypeEnumFromString ( eDataType , initialValue ) ; case Ifc4Package . IFC_WORK_SCHEDULE_TYPE_ENUM : return createIfcWorkScheduleTypeEnumFromString ( eDataType , initialValue ) ; default : throw new IllegalArgumentException ( "The datatype '" + eDataType . getName ( ) + "' is not a valid classifier" ) ; }
|
public class RegxCriteria { /** * { @ inheritDoc } */
@ Override public void asDefinitionText ( final StringBuilder sb ) { } }
|
sb . append ( " --matches '" ) ; sb . append ( patternParm ) ; sb . append ( "'" ) ;
|
public class GetAggregateConfigRuleComplianceSummaryResult { /** * Returns a list of AggregateComplianceCounts object .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setAggregateComplianceCounts ( java . util . Collection ) } or
* { @ link # withAggregateComplianceCounts ( java . util . Collection ) } if you want to override the existing values .
* @ param aggregateComplianceCounts
* Returns a list of AggregateComplianceCounts object .
* @ return Returns a reference to this object so that method calls can be chained together . */
public GetAggregateConfigRuleComplianceSummaryResult withAggregateComplianceCounts ( AggregateComplianceCount ... aggregateComplianceCounts ) { } }
|
if ( this . aggregateComplianceCounts == null ) { setAggregateComplianceCounts ( new com . amazonaws . internal . SdkInternalList < AggregateComplianceCount > ( aggregateComplianceCounts . length ) ) ; } for ( AggregateComplianceCount ele : aggregateComplianceCounts ) { this . aggregateComplianceCounts . add ( ele ) ; } return this ;
|
public class ElevationUtil { /** * Returns the alpha value of a shadow by interpolating between a minimum and maximum alpha
* value , depending on a specific elevation .
* @ param elevation
* The elevation , which should be emulated , in dp as an { @ link Integer } value . The
* elevation must be at least 0 and at maximum the value of the constant
* < code > MAX _ ELEVATION < / code >
* @ param minTransparency
* The minimum alpha value , which should be used , if the given elevation is 0 , as an
* { @ link Integer } value between 0 and 255
* @ param maxTransparency
* The maximum alpha value , which should be used , if the given elevation is
* < code > MAX _ ELEVATION < / code > , as an { @ link Integer } value between 0 and 255
* @ return The alpha value of the shadow as an { @ link Integer } value between 0 and 255 */
private static int getShadowAlpha ( final int elevation , final int minTransparency , final int maxTransparency ) { } }
|
float ratio = ( float ) elevation / ( float ) MAX_ELEVATION ; int range = maxTransparency - minTransparency ; return Math . round ( minTransparency + ratio * range ) ;
|
public class AgentPoolsInner { /** * Deletes an agent pool .
* Deletes the agent pool in the specified managed cluster .
* @ param resourceGroupName The name of the resource group .
* @ param managedClusterName The name of the managed cluster resource .
* @ param agentPoolName The name of the agent pool .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ throws CloudException thrown if the request is rejected by server
* @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginDelete ( String resourceGroupName , String managedClusterName , String agentPoolName ) { } }
|
beginDeleteWithServiceResponseAsync ( resourceGroupName , managedClusterName , agentPoolName ) . toBlocking ( ) . single ( ) . body ( ) ;
|
public class MavenJDOMWriter { /** * Method updateDependencyManagement .
* @ param value
* @ param element
* @ param counter
* @ param xmlTag */
protected void updateDependencyManagement ( DependencyManagement value , String xmlTag , Counter counter , Element element ) { } }
|
boolean shouldExist = value != null ; Element root = updateElement ( counter , element , xmlTag , shouldExist ) ; if ( shouldExist ) { Counter innerCount = new Counter ( counter . getDepth ( ) + 1 ) ; iterateDependency ( innerCount , root , value . getDependencies ( ) , "dependencies" , "dependency" ) ; }
|
public class ListSelectionValueModelAdapter { /** * See if two arrays are different . */
private boolean hasChanged ( int [ ] oldValue , int [ ] newValue ) { } }
|
if ( oldValue . length == newValue . length ) { for ( int i = 0 ; i < newValue . length ; i ++ ) { if ( oldValue [ i ] != newValue [ i ] ) { return true ; } } return false ; } return true ;
|
public class Instrumentator { private void addTraceReturn ( ) { } }
|
InsnList il = this . mn . instructions ; Iterator < AbstractInsnNode > it = il . iterator ( ) ; while ( it . hasNext ( ) ) { AbstractInsnNode abstractInsnNode = it . next ( ) ; switch ( abstractInsnNode . getOpcode ( ) ) { case Opcodes . RETURN : il . insertBefore ( abstractInsnNode , getVoidReturnTraceInstructions ( ) ) ; break ; case Opcodes . IRETURN : case Opcodes . LRETURN : case Opcodes . FRETURN : case Opcodes . ARETURN : case Opcodes . DRETURN : il . insertBefore ( abstractInsnNode , getReturnTraceInstructions ( ) ) ; } }
|
public class Headers { /** * Returns the last value corresponding to the specified field parsed as an HTTP date , or null if
* either the field is absent or cannot be parsed as a date . */
public Date getDate ( String name ) { } }
|
String value = get ( name ) ; return value != null ? HttpDate . parse ( value ) : null ;
|
public class JavacState { /** * Compare the javac _ state recorded public apis of packages on the classpath
* with the actual public apis on the classpath . */
public void taintPackagesDependingOnChangedClasspathPackages ( ) throws IOException { } }
|
// 1 . Collect fully qualified names of all interesting classpath dependencies
Set < String > fqDependencies = new HashSet < > ( ) ; for ( Package pkg : prev . packages ( ) . values ( ) ) { // Check if this package was compiled . If it ' s presence is recorded
// because it was on the class path and we needed to save it ' s
// public api , it ' s not a candidate for tainting .
if ( pkg . sources ( ) . isEmpty ( ) ) continue ; pkg . typeClasspathDependencies ( ) . values ( ) . forEach ( fqDependencies :: addAll ) ; } // 2 . Extract the public APIs from the on disk . class files
// ( Reason for doing step 1 in a separate phase is to avoid extracting
// public APIs of the same class twice . )
PubApiExtractor pubApiExtractor = new PubApiExtractor ( options ) ; Map < String , PubApi > onDiskPubApi = new HashMap < > ( ) ; for ( String cpDep : fqDependencies ) { onDiskPubApi . put ( cpDep , pubApiExtractor . getPubApi ( cpDep ) ) ; } pubApiExtractor . close ( ) ; // 3 . Compare them with the public APIs as of last compilation ( loaded from javac _ state )
nextPkg : for ( Package pkg : prev . packages ( ) . values ( ) ) { // Check if this package was compiled . If it ' s presence is recorded
// because it was on the class path and we needed to save it ' s
// public api , it ' s not a candidate for tainting .
if ( pkg . sources ( ) . isEmpty ( ) ) continue ; Set < String > cpDepsOfThisPkg = new HashSet < > ( ) ; for ( Set < String > cpDeps : pkg . typeClasspathDependencies ( ) . values ( ) ) cpDepsOfThisPkg . addAll ( cpDeps ) ; for ( String fqDep : cpDepsOfThisPkg ) { String depPkg = ":" + fqDep . substring ( 0 , fqDep . lastIndexOf ( '.' ) ) ; PubApi prevPkgApi = prev . packages ( ) . get ( depPkg ) . getPubApi ( ) ; // This PubApi directly lists the members of the class ,
// i . e . [ MEMBER1 , MEMBER2 , . . . ]
PubApi prevDepApi = prevPkgApi . types . get ( fqDep ) . pubApi ; // In order to dive * into * the class , we need to add
// . types . get ( fqDep ) . pubApi below .
PubApi currentDepApi = onDiskPubApi . get ( fqDep ) . types . get ( fqDep ) . pubApi ; if ( ! currentDepApi . isBackwardCompatibleWith ( prevDepApi ) ) { List < String > apiDiff = currentDepApi . diff ( prevDepApi ) ; taintPackage ( pkg . name ( ) , "depends on classpath " + "package which has an updated package api: " + String . join ( "\n" , apiDiff ) ) ; // Log . debug ( " = = = = = " ) ;
// Log . debug ( " - - - - - PREV API - - - - - " ) ;
// prevDepApi . asListOfStrings ( ) . forEach ( Log : : debug ) ;
// Log . debug ( " - - - - - CURRENT API - - - - - " ) ;
// currentDepApi . asListOfStrings ( ) . forEach ( Log : : debug ) ;
// Log . debug ( " = = = = = " ) ;
continue nextPkg ; } } }
|
public class MultipartStream { /** * Returns a read attribute from the multipart mime . */
public String getAttribute ( String key ) { } }
|
List < String > values = _headers . get ( key . toLowerCase ( Locale . ENGLISH ) ) ; if ( values != null && values . size ( ) > 0 ) return values . get ( 0 ) ; return null ;
|
public class JSONObject { /** * Accumulate values under a key . It is similar to the put method except
* that if there is already an object stored under the key then a JSONArray
* is stored under the key to hold all of the accumulated values . If there
* is already a JSONArray , then the new value is appended to it . In
* contrast , the put method replaces the previous value .
* If only one value is accumulated that is not a JSONArray , then the result
* will be the same as using put . But if multiple values are accumulated ,
* then the result will be like append .
* @ param key
* A key string .
* @ param value
* An object to be accumulated under the key .
* @ return this .
* @ throws JSONException
* If the value is non - finite number .
* @ throws NullPointerException
* If the key is < code > null < / code > . */
public JSONObject accumulate ( String key , Object value ) throws JSONException { } }
|
testValidity ( value ) ; Object object = this . opt ( key ) ; if ( object == null ) { this . put ( key , value instanceof JSONArray ? new JSONArray ( ) . put ( value ) : value ) ; } else if ( object instanceof JSONArray ) { ( ( JSONArray ) object ) . put ( value ) ; } else { this . put ( key , new JSONArray ( ) . put ( object ) . put ( value ) ) ; } return this ;
|
public class Whitelist { /** * Updates whitelist if there ' s any change . If it needs to update whitelist , it enforces writelock
* to make sure
* there ' s an exclusive access on shared variables . */
@ VisibleForTesting Set < String > retrieveWhitelist ( FileSystem fs , Path path ) { } }
|
try { Preconditions . checkArgument ( fs . exists ( path ) , "File does not exist at " + path ) ; Preconditions . checkArgument ( fs . isFile ( path ) , "Whitelist path is not a file. " + path ) ; Set < String > result = Sets . newHashSet ( ) ; try ( BufferedReader br = new BufferedReader ( new InputStreamReader ( fs . open ( path ) , StandardCharsets . UTF_8 ) ) ) { String s = null ; while ( ! StringUtils . isEmpty ( ( s = br . readLine ( ) ) ) ) { result . add ( s ) ; } } return result ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; }
|
public class JSON { /** * / * Internal methods , writing */
protected final void _writeAndClose ( Object value , JsonGenerator g ) throws IOException { } }
|
boolean closed = false ; try { _config ( g ) ; _writerForOperation ( g ) . writeValue ( value ) ; closed = true ; g . close ( ) ; } finally { if ( ! closed ) { // need to catch possible failure , so as not to mask problem
try { g . close ( ) ; } catch ( IOException ioe ) { } } }
|
public class BitUtilBig { /** * Touches only the specified bits - it does not zero out the higher bits ( like reverse does ) . */
final long reversePart ( long v , int maxBits ) { } }
|
long rest = v & ( ~ ( ( 1L << maxBits ) - 1 ) ) ; return rest | reverse ( v , maxBits ) ;
|
public class ExecutorsUtils { /** * Get a new { @ link ThreadFactory } that uses a { @ link LoggingUncaughtExceptionHandler }
* to handle uncaught exceptions , uses the given thread name format , and produces daemon threads .
* @ param logger an { @ link Optional } wrapping the { @ link Logger } that the
* { @ link LoggingUncaughtExceptionHandler } uses to log uncaught exceptions thrown in threads
* @ param nameFormat an { @ link Optional } wrapping a thread naming format
* @ return a new { @ link ThreadFactory } */
public static ThreadFactory newDaemonThreadFactory ( Optional < Logger > logger , Optional < String > nameFormat ) { } }
|
return newThreadFactory ( new ThreadFactoryBuilder ( ) . setDaemon ( true ) , logger , nameFormat ) ;
|
public class BlobKey { /** * Decode base64 ' d getDigest into a byte array that is suitable for use
* as a blob key .
* @ param base64Digest string with base64 ' d getDigest , with leading " sha1 - " attached .
* eg , " sha1 - LKJ32423JK . . . "
* @ return a byte [ ] blob key */
private static byte [ ] decodeBase64Digest ( String base64Digest ) { } }
|
String expectedPrefix = "sha1-" ; if ( ! base64Digest . startsWith ( expectedPrefix ) ) { throw new IllegalArgumentException ( base64Digest + " did not start with " + expectedPrefix ) ; } base64Digest = base64Digest . replaceFirst ( expectedPrefix , "" ) ; byte [ ] bytes = new byte [ 0 ] ; try { bytes = Base64 . decode ( base64Digest ) ; } catch ( IOException e ) { throw new IllegalArgumentException ( e ) ; } return bytes ;
|
public class PECImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public boolean eIsSet ( int featureID ) { } }
|
switch ( featureID ) { case AfplibPackage . PEC__TRIPLETS : return triplets != null && ! triplets . isEmpty ( ) ; } return super . eIsSet ( featureID ) ;
|
public class A_CmsTreeTabDataPreloader { /** * Gets the children of a resource . < p >
* @ param resource the resource for which the children should be read
* @ return the children of the resource
* @ throws CmsException if something goes wrong */
protected List < CmsResource > getChildren ( CmsResource resource ) throws CmsException { } }
|
return m_cms . getSubFolders ( resource . getRootPath ( ) , m_filter ) ;
|
public class JsonGwtJacksonGenerator { /** * Create the serdes and return the field name . */
private String generateSerdes ( SourceWriter w , JClassType type , Json annotation ) { } }
|
final String qualifiedSourceName = type . getQualifiedSourceName ( ) ; final String qualifiedCamelCaseFieldName = replaceDotByUpperCase ( qualifiedSourceName ) ; final String qualifiedCamelCaseTypeName = Character . toUpperCase ( qualifiedCamelCaseFieldName . charAt ( 0 ) ) + qualifiedCamelCaseFieldName . substring ( 1 ) ; final String singleMapperType = qualifiedCamelCaseTypeName + "Mapper" ; final String collectionWriterType = qualifiedCamelCaseTypeName + "CollectionWriter" ; final String arrayListReaderType = qualifiedCamelCaseTypeName + "ArrayListReader" ; final String linkedListReaderType = qualifiedCamelCaseTypeName + "LinkedListReader" ; final String hashSetReaderType = qualifiedCamelCaseTypeName + "HashSetReader" ; final String linkedHashSetReaderType = qualifiedCamelCaseTypeName + "LinkedHashSetReader" ; final String treeSetReaderType = qualifiedCamelCaseTypeName + "TreeSetReader" ; // interfaces extending Gwt Jackson
w . println ( "interface %s extends ObjectMapper<%s> {}" , singleMapperType , qualifiedSourceName ) ; w . println ( "interface %s extends ObjectWriter<Collection<%s>> {}" , collectionWriterType , qualifiedSourceName ) ; w . println ( "interface %s extends ObjectReader<ArrayList<%s>> {}" , arrayListReaderType , qualifiedSourceName ) ; w . println ( "interface %s extends ObjectReader<LinkedList<%s>> {}" , linkedListReaderType , qualifiedSourceName ) ; w . println ( "interface %s extends ObjectReader<HashSet<%s>> {}" , hashSetReaderType , qualifiedSourceName ) ; w . println ( "interface %s extends ObjectReader<TreeSet<%s>> {}" , treeSetReaderType , qualifiedSourceName ) ; w . println ( "interface %s extends ObjectReader<LinkedHashSet<%s>> {}" , linkedHashSetReaderType , qualifiedSourceName ) ; w . println ( ) ; final String singleMapperField = qualifiedCamelCaseFieldName + "Mapper" ; final String collectionWriterField = qualifiedCamelCaseFieldName + "CollectionWriter" ; final String arrayListReaderField = qualifiedCamelCaseFieldName + "ArrayListReader" ; final String linkedListReaderField = qualifiedCamelCaseFieldName + "LinkedListReader" ; final String hashSetReaderField = qualifiedCamelCaseFieldName + "HashSetReader" ; final String linkedHashSetReaderField = qualifiedCamelCaseFieldName + "LinkedHashSetReader" ; final String treeSetReaderField = qualifiedCamelCaseFieldName + "TreeSetReader" ; // fields creating interfaces
w . println ( "private final %s %s = GWT.create(%s.class);" , singleMapperType , singleMapperField , singleMapperType ) ; w . println ( "private final %s %s = GWT.create(%s.class);" , collectionWriterType , collectionWriterField , collectionWriterType ) ; w . println ( "private final %s %s = GWT.create(%s.class);" , arrayListReaderType , arrayListReaderField , arrayListReaderType ) ; w . println ( "private final %s %s = GWT.create(%s.class);" , linkedListReaderType , linkedListReaderField , linkedListReaderType ) ; w . println ( "private final %s %s = GWT.create(%s.class);" , hashSetReaderType , hashSetReaderField , hashSetReaderType ) ; w . println ( "private final %s %s = GWT.create(%s.class);" , linkedHashSetReaderType , linkedHashSetReaderField , linkedHashSetReaderType ) ; w . println ( "private final %s %s = GWT.create(%s.class);" , treeSetReaderType , treeSetReaderField , treeSetReaderType ) ; w . println ( ) ; final String serdesField = qualifiedCamelCaseFieldName + "Serdes" ; final String serdesType = "JsonObjectSerdes<" + qualifiedSourceName + ">" ; // serializer field as anonymous class
w . println ( "private final %s %s = new %s(%s.class) {" , serdesType , serdesField , serdesType , qualifiedSourceName ) ; w . println ( ) ; // static field to content - types
w . println ( " private final String[] PATTERNS = new String[]{ %s };" , toCsv ( annotation . value ( ) ) ) ; w . println ( ) ; // mediaType
w . println ( " @Override" ) ; w . println ( " public String[] mediaType() {" ) ; w . println ( " return PATTERNS;" ) ; w . println ( " }" ) ; w . println ( ) ; // readJson - used when any of deserialize alternatives succeeded ( see JsonObjectSerdes )
// TODO : improve this by not requiring parsing the json to an js array and latter stringifying it ( see below )
// Here would be no - op
w . println ( " @Override" ) ; w . println ( " public %s readJson(JsonRecordReader r, DeserializationContext ctx) {" , qualifiedSourceName ) ; w . println ( " return %s.read(JsonObjectSerdes.stringify(r));" , singleMapperField ) ; w . println ( " }" ) ; w . println ( ) ; // writeJson - not used
w . println ( " @Override" ) ; w . println ( " public void writeJson(%s o, JsonRecordWriter w, SerializationContext ctx) {" , qualifiedSourceName ) ; w . println ( " return;" ) ; w . println ( " }" ) ; w . println ( ) ; // deserialize - deserialize single object using ObjectMapper
w . println ( " @Override" ) ; w . println ( " public %s deserialize(String s, DeserializationContext ctx) {" , qualifiedSourceName ) ; w . println ( " try {" ) ; w . println ( " return %s.read(s);" , singleMapperField ) ; w . println ( " } catch (com.github.nmorel.gwtjackson.client.exception.JsonDeserializationException e) {" ) ; w . println ( " throw new UnableToDeserializeException(\"The auto-generated gwt-jackson deserializer" + " failed to deserialize the response body to \" + ctx.getRequestedType().getName() + \".\", e);" ) ; w . println ( " }" ) ; w . println ( " }" ) ; w . println ( ) ; // deserialize
w . println ( " @Override" ) ; w . println ( " public <C extends Collection<%s>> C deserialize(Class<C> c, " + "String s, DeserializationContext ctx) {" , qualifiedSourceName ) ; w . println ( " try {" ) ; w . println ( " if (c == List.class || c == ArrayList.class || c == Collection.class)" ) ; w . println ( " return (C) %s.read(s);" , arrayListReaderField ) ; w . println ( " else if (c == LinkedList.class)" ) ; w . println ( " return (C) %s.read(s);" , linkedListReaderField ) ; w . println ( " else if (c == Set.class || c == HashSet.class)" ) ; w . println ( " return (C) %s.read(s);" , hashSetReaderField ) ; w . println ( " else if (c == TreeSet.class)" ) ; w . println ( " return (C) %s.read(s);" , treeSetReaderField ) ; w . println ( " else if (c == LinkedHashSet.class)" ) ; w . println ( " return (C) %s.read(s);" , linkedHashSetReaderField ) ; w . println ( " else" ) ; // TODO : improve this by not requiring parsing the json to an js array and latter stringifying it
// An alternative would be manually traverse the json array and passing each json object to serialize method
w . println ( " return super.deserialize(c, s, ctx);" ) ; w . println ( " } catch (com.github.nmorel.gwtjackson.client.exception.JsonDeserializationException e) {" ) ; w . println ( " throw new UnableToDeserializeException(\"The auto-generated gwt-jackson deserializer" + " failed to deserialize the response body" + " to \" + c.getName() + \"<\" + ctx.getRequestedType().getName() + \">.\", e);" ) ; w . println ( " }" ) ; w . println ( " }" ) ; // serialize
w . println ( " @Override" ) ; w . println ( " public String serialize(%s o, SerializationContext ctx) {" , qualifiedSourceName ) ; w . println ( " try {" ) ; w . println ( " return %s.write(o);" , singleMapperField ) ; w . println ( " } catch (com.github.nmorel.gwtjackson.client.exception.JsonDeserializationException e) {" ) ; w . println ( " throw new UnableToSerializeException(\"The auto-generated gwt-jackson serializer" + " failed to serialize the instance of \" + o.getClass().getName() + \" to JSON.\", e);" ) ; w . println ( " }" ) ; w . println ( " }" ) ; w . println ( ) ; // serialize
w . println ( " @Override" ) ; w . println ( " public String serialize(Collection<%s> c, SerializationContext ctx) {" , qualifiedSourceName ) ; w . println ( " try {" ) ; w . println ( " return %s.write(c);" , collectionWriterField ) ; w . println ( " } catch (com.github.nmorel.gwtjackson.client.exception.JsonDeserializationException e) {" ) ; w . println ( " throw new UnableToSerializeException(\"The auto-generated gwt-jackson serializer" + " failed to serialize the instance of \" + c.getClass().getName() + \" to JSON.\", e);" ) ; w . println ( " }" ) ; w . println ( " }" ) ; // end anonymous class
w . println ( "};" ) ; w . println ( ) ; return serdesField ;
|
public class XmlParserHelper { /** * Returns an input stream for the specified resource . First an attempt is made to load the resource
* via the { @ code Filer } API and if that fails { @ link Class # getResourceAsStream } is used .
* @ param resource the resource to load
* @ return an input stream for the specified resource or { @ code null } in case resource cannot be loaded */
public InputStream getInputStreamForResource ( String resource ) { } }
|
// METAGEN - 75
if ( ! resource . startsWith ( RESOURCE_PATH_SEPARATOR ) ) { resource = RESOURCE_PATH_SEPARATOR + resource ; } String pkg = getPackage ( resource ) ; String name = getRelativeName ( resource ) ; InputStream ormStream ; try { FileObject fileObject = context . getProcessingEnvironment ( ) . getFiler ( ) . getResource ( StandardLocation . CLASS_OUTPUT , pkg , name ) ; ormStream = fileObject . openInputStream ( ) ; } catch ( IOException e1 ) { // TODO - METAGEN - 12
// unfortunately , the Filer . getResource API seems not to be able to load from / META - INF . One gets a
// FilerException with the message with " Illegal name / META - INF " . This means that we have to revert to
// using the classpath . This might mean that we find a persistence . xml which is ' part of another jar .
// Not sure what else we can do here
ormStream = this . getClass ( ) . getResourceAsStream ( resource ) ; } return ormStream ;
|
public class Container { /** * Returns assembled component instance corresponding to the specified injectee
* ( Component type and qualifiers ) .
* < b > NOTE : This method is designed for an internal use . < / b >
* If the component is not found or duplicated , this method returns
* < code > null < / code > . If a { @ link Default } qualified component is included
* in the candidate , this method returns it in preference .
* @ param < T > The component type .
* @ param target The { @ link Target } constructed from the injective field to get
* the dependent component .
* @ return The component instance corresponding to the specified target . */
public < T > T component ( final Target target ) { } }
|
logger . debug ( "Component is requested with target: Target [" + target + "]" ) ; Collection < Descriptor < ? > > descriptors = new ArrayList < > ( ) ; Class < ? > deployment = deployment ( ) ; Type type = target . type ( ) ; for ( Descriptor < ? > descriptor : components . get ( ( type instanceof ParameterizedType ) ? ( Class < ? > ) ( ( ParameterizedType ) type ) . getRawType ( ) : ( Class < ? > ) type ) ) { Set < Class < ? extends Annotation > > deployments = descriptor . deployments ( ) ; if ( deployments . isEmpty ( ) || deployment == null || ( deployment != null && deployments . contains ( deployment ) ) ) { descriptors . add ( descriptor ) ; } } if ( descriptors . isEmpty ( ) ) { logger . warn ( "No component returned: Current deployment [" + ( ( deployment == null ) ? deployment : deployment . getSimpleName ( ) ) + "]; Target [" + target + "]; You must install an appropriate component on ahead " + "invoking [public <T> void install(Class<T> component)]" ) ; return null ; } final Set < Annotation > bindings = new HashSet < > ( ) ; for ( Annotation qualifier : target . qualifiers ( ) ) { if ( qualifier . annotationType ( ) . isAnnotationPresent ( Binding . class ) ) { bindings . add ( qualifier ) ; } } descriptors = Collections2 . filter ( descriptors , new Predicate < Descriptor < ? > > ( ) { public boolean apply ( Descriptor < ? > descriptor ) { return Sets . difference ( bindings , descriptor . bindings ( ) ) . size ( ) == 0 ; } } ) ; if ( descriptors . isEmpty ( ) ) { logger . warn ( "Component is missing: Target [" + target + "]; You must specify binding annotations on the field correctly" ) ; return null ; } else if ( descriptors . size ( ) == 1 ) { return instance ( component ( descriptors . toArray ( new Descriptor < ? > [ 1 ] ) [ 0 ] ) , target ) ; } else { descriptors = Collections2 . filter ( descriptors , new Predicate < Descriptor < ? > > ( ) { public boolean apply ( Descriptor < ? > descriptor ) { for ( Annotation binding : descriptor . bindings ( ) ) { if ( binding . annotationType ( ) . equals ( Default . class ) ) { return true ; } } return false ; } } ) ; if ( descriptors . size ( ) == 1 ) { Descriptor < ? > descriptor = descriptors . toArray ( new Descriptor < ? > [ 1 ] ) [ 0 ] ; logger . debug ( "@Default qualified component [" + descriptor + "] is returned in preference" ) ; return instance ( component ( descriptor ) , target ) ; } else { logger . warn ( "Component is duplicated: Target [" + target + "]; You must specify more concrete type " + "or binding annotations strictly" ) ; return null ; } }
|
public class SpringContainerPool { /** * This method gets the { @ link IocContainer } for the given { @ code xmlClasspath } .
* @ param xmlClasspath is the classpath to the XML configuration .
* @ return the requested container . */
public static IocContainer getInstance ( String xmlClasspath ) { } }
|
if ( xml2containerMap == null ) { xml2containerMap = new HashMap < > ( ) ; } SpringContainer container = xml2containerMap . get ( xmlClasspath ) ; if ( container == null ) { container = new SpringContainer ( new ClassPathXmlApplicationContext ( xmlClasspath ) ) ; xml2containerMap . put ( xmlClasspath , container ) ; } return container ;
|
public class ProgressStyle { /** * Set the progress of the progress bar
* @ param value the progress out of the max
* @ return self for chaining */
public ProgressStyle setProgress ( int value ) { } }
|
if ( mProgressStyle == HORIZONTAL ) { if ( mProgress . isIndeterminate ( ) ) mProgress . setIndeterminate ( false ) ; if ( mProgress . getMax ( ) <= value ) mProgress . setMax ( value ) ; mProgress . setProgress ( value ) ; if ( ! mIsPercentageMode ) { mProgressText . setText ( String . format ( "%d %s" , value , mSuffix ) ) ; } else { mProgressText . setVisibility ( View . GONE ) ; int progress = mProgress . getProgress ( ) ; int max = mProgress . getMax ( ) ; float percent = ( ( float ) progress / ( float ) max ) ; int percentNorm = ( int ) ( percent * 100 ) ; mProgressMax . setText ( String . format ( "%d %%" , percentNorm ) ) ; } if ( value >= mProgress . getMax ( ) && mIsCloseOnFinish && mDialogInterface != null ) { new Handler ( ) . postDelayed ( new Runnable ( ) { @ Override public void run ( ) { mDialogInterface . dismiss ( ) ; } } , 300 ) ; } } return this ;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.