signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class HttpMethodBase { /** * Per RFC 2616 section 4.3 , some response can never contain a message * body . * @ param status - the HTTP status code * @ return < tt > true < / tt > if the message may contain a body , < tt > false < / tt > if it can not * contain a message body */ private static boolean canResponseHaveBody ( int status ) { } }
LOG . trace ( "enter HttpMethodBase.canResponseHaveBody(int)" ) ; boolean result = true ; if ( ( status >= 100 && status <= 199 ) || ( status == 204 ) || ( status == 304 ) ) { // NOT MODIFIED result = false ; } return result ;
public class Contig { /** * Construct a StreamVariantsRequest for the Contig . * @ param variantSetId * @ return the request object */ @ Deprecated public StreamVariantsRequest getStreamVariantsRequest ( String variantSetId ) { } }
return StreamVariantsRequest . newBuilder ( ) . setVariantSetId ( variantSetId ) . setReferenceName ( referenceName ) . setStart ( start ) . setEnd ( end ) . build ( ) ;
public class XLSFormatter { /** * Method creates mapping [ rangeName : List & lt ; CellRangeAddress & gt ; ] . * List contains all merge regions for this named range . * Attention : if merged regions writes wrong - look on methods isMergeRegionInsideNamedRange or isNamedRangeInsideMergeRegion * todo : how to recognize if merge region must be copied with named range * @ param currentSheet Sheet which contains merge regions */ protected void initMergeRegions ( HSSFSheet currentSheet ) { } }
int rangeNumber = templateWorkbook . getNumberOfNames ( ) ; for ( int i = 0 ; i < rangeNumber ; i ++ ) { HSSFName aNamedRange = templateWorkbook . getNameAt ( i ) ; String refersToFormula = aNamedRange . getRefersToFormula ( ) ; if ( ! AreaReference . isContiguous ( refersToFormula ) ) { continue ; } AreaReference aref = new AreaReference ( refersToFormula , SpreadsheetVersion . EXCEL97 ) ; Integer rangeFirstRow = aref . getFirstCell ( ) . getRow ( ) ; Integer rangeFirstColumn = ( int ) aref . getFirstCell ( ) . getCol ( ) ; Integer rangeLastRow = aref . getLastCell ( ) . getRow ( ) ; Integer rangeLastColumn = ( int ) aref . getLastCell ( ) . getCol ( ) ; for ( int j = 0 ; j < currentSheet . getNumMergedRegions ( ) ; j ++ ) { CellRangeAddress mergedRegion = currentSheet . getMergedRegion ( j ) ; if ( mergedRegion != null ) { Integer regionFirstRow = mergedRegion . getFirstRow ( ) ; Integer regionFirstColumn = mergedRegion . getFirstColumn ( ) ; Integer regionLastRow = mergedRegion . getLastRow ( ) ; Integer regionLastColumn = mergedRegion . getLastColumn ( ) ; boolean mergedInsideNamed = isMergeRegionInsideNamedRange ( rangeFirstRow , rangeFirstColumn , rangeLastRow , rangeLastColumn , regionFirstRow , regionFirstColumn , regionLastRow , regionLastColumn ) ; boolean namedInsideMerged = isNamedRangeInsideMergeRegion ( rangeFirstRow , rangeFirstColumn , rangeLastRow , rangeLastColumn , regionFirstRow , regionFirstColumn , regionLastRow , regionLastColumn ) ; if ( mergedInsideNamed || namedInsideMerged ) { String name = aNamedRange . getNameName ( ) ; SheetRange sheetRange = new SheetRange ( mergedRegion , currentSheet . getSheetName ( ) ) ; if ( mergeRegionsForRangeNames . get ( name ) == null ) { ArrayList < SheetRange > list = new ArrayList < > ( ) ; list . add ( sheetRange ) ; mergeRegionsForRangeNames . put ( name , list ) ; } else { mergeRegionsForRangeNames . get ( name ) . add ( sheetRange ) ; } } } } }
public class AvroFilterConverter { /** * Retrieves the specified field from the inputRecord , and checks if it is equal to the expected value * { @ link # fieldValue } . If it is then it returns a { @ link org . apache . gobblin . converter . SingleRecordIterable } for the input record . * Otherwise it returns a { @ link EmptyIterable } . * { @ inheritDoc } * @ see org . apache . gobblin . converter . AvroToAvroConverterBase # convertRecord ( org . apache . avro . Schema , org . apache . avro . generic . GenericRecord , org . apache . gobblin . configuration . WorkUnitState ) */ @ Override public Iterable < GenericRecord > convertRecordImpl ( Schema outputSchema , GenericRecord inputRecord , WorkUnitState workUnit ) throws DataConversionException { } }
Optional < Object > fieldValue = AvroUtils . getFieldValue ( inputRecord , this . fieldName ) ; if ( fieldValue . isPresent ( ) && fieldValue . get ( ) . toString ( ) . equals ( this . fieldValue ) ) { return new SingleRecordIterable < > ( inputRecord ) ; } return new EmptyIterable < > ( ) ;
public class SVGParser { /** * Parse an SVG ' Length ' value ( usually a coordinate ) . * Spec says : length : : = number ( " em " | " ex " | " px " | " in " | " cm " | " mm " | " pt " | " pc " | " % " ) ? */ static Length parseLength ( String val ) throws SVGParseException { } }
if ( val . length ( ) == 0 ) throw new SVGParseException ( "Invalid length value (empty string)" ) ; int end = val . length ( ) ; Unit unit = Unit . px ; char lastChar = val . charAt ( end - 1 ) ; if ( lastChar == '%' ) { end -= 1 ; unit = Unit . percent ; } else if ( end > 2 && Character . isLetter ( lastChar ) && Character . isLetter ( val . charAt ( end - 2 ) ) ) { end -= 2 ; String unitStr = val . substring ( end ) ; try { unit = Unit . valueOf ( unitStr . toLowerCase ( Locale . US ) ) ; } catch ( IllegalArgumentException e ) { throw new SVGParseException ( "Invalid length unit specifier: " + val ) ; } } try { float scalar = parseFloat ( val , 0 , end ) ; return new Length ( scalar , unit ) ; } catch ( NumberFormatException e ) { throw new SVGParseException ( "Invalid length value: " + val , e ) ; }
public class AcceptableUsagePolicyStatus { /** * Add property . * @ param name the name * @ param value the value * @ return the acceptable usage policy status */ public AcceptableUsagePolicyStatus addProperty ( final String name , final Object value ) { } }
this . properties . put ( name , value ) ; return this ;
public class ApiOvhCore { /** * Connect to the OVH API using a consumerKey * @ param consumerKey * the consumerKey * @ return an ApiOvhCore authenticate by consumerKey */ public static ApiOvhCore getInstance ( String consumerKey ) { } }
ApiOvhCore core = new ApiOvhCore ( ) ; core . _consumerKey = consumerKey ; return core ;
public class AbstractResource { /** * Returns the help for the endpoint . For the context root , it will return the endpoint help for all major endpoints . For a specific endpoint * it will return the method help for the endpoint . * @ return Help object describing the service in JSON format . */ @ GET @ Produces ( MediaType . APPLICATION_JSON ) @ Path ( "/help" ) public Map < String , List < ? extends Object > > help ( ) { } }
Map < String , List < ? > > result = new LinkedHashMap < > ( ) ; List < EndpointHelpDto > endpoints = describeEndpoints ( getEndpoints ( ) ) ; if ( endpoints != null && ! endpoints . isEmpty ( ) ) { result . put ( "endpoints" , endpoints ) ; } List < MethodHelpDto > methods = describeMethods ( ) ; if ( methods != null && ! methods . isEmpty ( ) ) { result . put ( "methods" , methods ) ; } return result ;
public class Dynamic { /** * Resolves a var handle constant for a field . * @ param fieldDescription The field to represent a var handle for . * @ return A dynamic constant that represents the created var handle constant . */ public static JavaConstant ofVarHandle ( FieldDescription . InDefinedShape fieldDescription ) { } }
return new Dynamic ( new ConstantDynamic ( fieldDescription . getInternalName ( ) , JavaType . VAR_HANDLE . getTypeStub ( ) . getDescriptor ( ) , new Handle ( Opcodes . H_INVOKESTATIC , CONSTANT_BOOTSTRAPS , fieldDescription . isStatic ( ) ? "staticFieldVarHandle" : "fieldVarHandle" , "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;" , false ) , Type . getType ( fieldDescription . getDeclaringType ( ) . getDescriptor ( ) ) , Type . getType ( fieldDescription . getType ( ) . asErasure ( ) . getDescriptor ( ) ) ) , JavaType . VAR_HANDLE . getTypeStub ( ) ) ;
public class ApiOvhHostingweb { /** * Set a variable to this hosting * REST : POST / hosting / web / { serviceName } / envVar * @ param value [ required ] Value of the variable * @ param key [ required ] Name of the new variable * @ param type [ required ] Type of variable set * @ param serviceName [ required ] The internal name of your hosting */ public OvhTask serviceName_envVar_POST ( String serviceName , String key , net . minidev . ovh . api . hosting . web . envvar . OvhTypeEnum type , String value ) throws IOException { } }
String qPath = "/hosting/web/{serviceName}/envVar" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "key" , key ) ; addBody ( o , "type" , type ) ; addBody ( o , "value" , value ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhTask . class ) ;
public class PasswordMaker { /** * Generates a hash of the master password with settings from the account . * @ param masterPassword The password to use as a key for the various algorithms . * @ param account The account with the specific settings for the hash . * @ param inputText The text to use as the input into the password maker algorithm * @ param username The username to use for generating the password * @ return A SecureCharArray with the hashed data . * @ throws Exception if something bad happened . */ public SecureUTF8String makePassword ( SecureUTF8String masterPassword , Account account , final String inputText , final String username ) throws Exception { } }
// HMAC algorithm requires a key that is > 0 length . if ( account . isHmac ( ) && masterPassword . length ( ) == 0 ) { return new SecureUTF8String ( ) ; } LeetLevel leetLevel = account . getLeetLevel ( ) ; // int count = 0; int length = account . getLength ( ) ; SecureUTF8String output = null ; SecureUTF8String data = null ; try { if ( account . getCharacterSet ( ) . length ( ) < 2 ) throw new Exception ( "Account contains a character set that is too short" ) ; data = new SecureUTF8String ( getModifiedInputText ( inputText , account ) + username + account . getModifier ( ) ) ; // Use leet before hashing if ( account . getLeetType ( ) == LeetType . BEFORE || account . getLeetType ( ) == LeetType . BOTH ) { LeetEncoder . leetConvert ( leetLevel , masterPassword ) ; LeetEncoder . leetConvert ( leetLevel , data ) ; } // Perform the actual hashing output = hashTheData ( masterPassword , data , account ) ; // Use leet after hashing if ( account . getLeetType ( ) == LeetType . AFTER || account . getLeetType ( ) == LeetType . BOTH ) { LeetEncoder . leetConvert ( leetLevel , output ) ; } // Apply the prefix if ( account . getPrefix ( ) . length ( ) > 0 ) { SecureCharArray prefix = new SecureCharArray ( account . getPrefix ( ) ) ; output . prepend ( prefix ) ; prefix . erase ( ) ; } // Handle the suffix output . resize ( length , true ) ; if ( account . getSuffix ( ) . length ( ) > 0 ) { SecureCharArray suffix = new SecureCharArray ( account . getSuffix ( ) ) ; // If the suffix is larger than the entire password ( not smart ) , then // just replace the output with a section of the suffix that fits if ( length < suffix . size ( ) ) { output . replace ( suffix ) ; output . resize ( length , true ) ; } // Otherwise insert the prefix where it fits else { output . resize ( length - suffix . size ( ) , true ) ; output . append ( suffix ) ; } suffix . erase ( ) ; } } catch ( Exception e ) { if ( output != null ) output . erase ( ) ; throw e ; } finally { // not really needed . . . but here for completeness if ( data != null ) data . erase ( ) ; } return output ;
public class SarlBehaviorUnitImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public NotificationChain basicSetName ( JvmParameterizedTypeReference newName , NotificationChain msgs ) { } }
JvmParameterizedTypeReference oldName = name ; name = newName ; if ( eNotificationRequired ( ) ) { ENotificationImpl notification = new ENotificationImpl ( this , Notification . SET , SarlPackage . SARL_BEHAVIOR_UNIT__NAME , oldName , newName ) ; if ( msgs == null ) msgs = notification ; else msgs . add ( notification ) ; } return msgs ;
public class DocBuilderBase { /** * package private methods */ protected XContentBuilder newBuilder ( ) throws IndexException { } }
try { XContentBuilder builder = XContentFactory . jsonBuilder ( ) ; if ( debug ( ) ) { builder = builder . prettyPrint ( ) ; } return builder ; } catch ( final Throwable t ) { throw new IndexException ( t ) ; }
public class UserPreferences { /** * Read user preferences from given input stream . The InputStream is * guaranteed to be closed by this method . * @ param in * the InputStream * @ throws IOException */ public void read ( @ WillClose InputStream in ) throws IOException { } }
BufferedInputStream prefStream = null ; Properties props = new Properties ( ) ; try { prefStream = new BufferedInputStream ( in ) ; props . load ( prefStream ) ; } finally { try { if ( prefStream != null ) { prefStream . close ( ) ; } } catch ( IOException ioe ) { // Ignore } } if ( props . size ( ) == 0 ) { return ; } Properties prefixlessProperties = new Properties ( ) ; for ( Map . Entry < ? , ? > e : props . entrySet ( ) ) { if ( e . getKey ( ) instanceof String ) { String key = e . getKey ( ) . toString ( ) ; String value = e . getValue ( ) . toString ( ) ; prefixlessProperties . setProperty ( key . replace ( "/instance/edu.umd.cs.findbugs.plugin.eclipse/" , "" ) . replace ( "/instance/com.github.spotbugs.plugin.eclipse/" , "" ) , value ) ; } else { prefixlessProperties . put ( e . getKey ( ) , e . getValue ( ) ) ; } } props = prefixlessProperties ; for ( int i = 0 ; i < MAX_RECENT_FILES ; i ++ ) { String key = "recent" + i ; String projectName = ( String ) props . get ( key ) ; if ( projectName != null ) { recentProjectsList . add ( projectName ) ; } } for ( Map . Entry < ? , ? > e : props . entrySet ( ) ) { String key = ( String ) e . getKey ( ) ; if ( ! key . startsWith ( "detector" ) || key . startsWith ( "detector_" ) ) { // it is not a detector enablement property continue ; } String detectorState = ( String ) e . getValue ( ) ; int pipePos = detectorState . indexOf ( BOOL_SEPARATOR ) ; if ( pipePos >= 0 ) { String name = detectorState . substring ( 0 , pipePos ) ; String enabled = detectorState . substring ( pipePos + 1 ) ; detectorEnablementMap . put ( name , Boolean . valueOf ( enabled ) ) ; } } if ( props . get ( FILTER_SETTINGS_KEY ) != null ) { // Properties contain encoded project filter settings . filterSettings = ProjectFilterSettings . fromEncodedString ( props . getProperty ( FILTER_SETTINGS_KEY ) ) ; } else { // Properties contain only minimum warning priority threshold // ( probably ) . // We will honor this threshold , and enable all bug categories . String threshold = ( String ) props . get ( DETECTOR_THRESHOLD_KEY ) ; if ( threshold != null ) { try { int detectorThreshold = Integer . parseInt ( threshold ) ; setUserDetectorThreshold ( detectorThreshold ) ; } catch ( NumberFormatException nfe ) { // Ok to ignore } } } if ( props . get ( FILTER_SETTINGS2_KEY ) != null ) { // populate the hidden bug categories in the project filter settings ProjectFilterSettings . hiddenFromEncodedString ( filterSettings , props . getProperty ( FILTER_SETTINGS2_KEY ) ) ; } if ( props . get ( RUN_AT_FULL_BUILD ) != null ) { runAtFullBuild = Boolean . parseBoolean ( props . getProperty ( RUN_AT_FULL_BUILD ) ) ; } effort = props . getProperty ( EFFORT_KEY , EFFORT_DEFAULT ) ; includeFilterFiles = readProperties ( props , KEY_INCLUDE_FILTER ) ; excludeFilterFiles = readProperties ( props , KEY_EXCLUDE_FILTER ) ; excludeBugsFiles = readProperties ( props , KEY_EXCLUDE_BUGS ) ; customPlugins = readProperties ( props , KEY_PLUGIN ) ;
public class FoundationFileRollingAppender { /** * ( non - Javadoc ) * @ see org . apache . log4j . FileAppender # activateOptions ( ) */ public synchronized final void activateOptions ( ) { } }
this . deactivateOptions ( ) ; super . activateOptions ( ) ; if ( getFilterEmptyMessages ( ) ) { addFilter ( new EmptyMessageFilter ( ) ) ; } // rollables this . setFileRollable ( new CompositeRoller ( this , this . getProperties ( ) ) ) ; // scavenger LogFileScavenger fileScavenger = this . getLogFileScavenger ( ) ; if ( fileScavenger == null ) { fileScavenger = this . initLogFileScavenger ( new DefaultLogFileScavenger ( ) ) ; } fileScavenger . begin ( ) ; // compressor final LogFileCompressor logFileCompressor = new LogFileCompressor ( this , this . getProperties ( ) ) ; this . setLogFileCompressor ( logFileCompressor ) ; this . getFileRollable ( ) . addFileRollEventListener ( logFileCompressor ) ; logFileCompressor . begin ( ) ; // guest listener this . registerGuestFileRollEventListener ( ) ; // roll enforcer final TimeBasedRollEnforcer logRollEnforcer = new TimeBasedRollEnforcer ( this , this . getProperties ( ) ) ; this . setLogRollEnforcer ( logRollEnforcer ) ; logRollEnforcer . begin ( ) ; // roll on start - up if ( this . getProperties ( ) . shouldRollOnActivation ( ) ) { synchronized ( this ) { this . rollFile ( new StartupFileRollEvent ( ) ) ; } }
public class BaseDialogFragment { /** * Utility method for acquiring all listeners of some type for current instance of DialogFragment * @ param listenerInterface Interface of the desired listeners * @ return Unmodifiable list of listeners * @ since 2.1.0 */ @ SuppressWarnings ( "unchecked" ) protected < T > List < T > getDialogListeners ( Class < T > listenerInterface ) { } }
final Fragment targetFragment = getTargetFragment ( ) ; List < T > listeners = new ArrayList < T > ( 2 ) ; if ( targetFragment != null && listenerInterface . isAssignableFrom ( targetFragment . getClass ( ) ) ) { listeners . add ( ( T ) targetFragment ) ; } if ( getActivity ( ) != null && listenerInterface . isAssignableFrom ( getActivity ( ) . getClass ( ) ) ) { listeners . add ( ( T ) getActivity ( ) ) ; } return Collections . unmodifiableList ( listeners ) ;
public class LoggingHandlerInterceptor { /** * { @ inheritDoc } */ public boolean preHandle ( HttpServletRequest request , HttpServletResponse response , Object handler ) throws Exception { } }
handleRequest ( getRequestContent ( request ) ) ; return true ;
public class TransformerIdentityImpl { /** * Receive notification of an unparsed entity declaration . * < p > By default , do nothing . Application writers may override this * method in a subclass to keep track of the unparsed entities * declared in a document . < / p > * @ param name The entity name . * @ param publicId The entity public identifier , or null if not * available . * @ param systemId The entity system identifier . * @ param notationName The name of the associated notation . * @ throws org . xml . sax . SAXException Any SAX exception , possibly * wrapping another exception . * @ see org . xml . sax . DTDHandler # unparsedEntityDecl * @ throws SAXException */ public void unparsedEntityDecl ( String name , String publicId , String systemId , String notationName ) throws SAXException { } }
if ( null != m_resultDTDHandler ) m_resultDTDHandler . unparsedEntityDecl ( name , publicId , systemId , notationName ) ;
public class Vertex { /** * Return string representation of this vertex ' s * certificate information . * @ returns String representation of certificate info */ public String certToString ( ) { } }
StringBuilder sb = new StringBuilder ( ) ; X509CertImpl x509Cert = null ; try { x509Cert = X509CertImpl . toImpl ( cert ) ; } catch ( CertificateException ce ) { if ( debug != null ) { debug . println ( "Vertex.certToString() unexpected exception" ) ; ce . printStackTrace ( ) ; } return sb . toString ( ) ; } sb . append ( "Issuer: " ) . append ( x509Cert . getIssuerX500Principal ( ) ) . append ( "\n" ) ; sb . append ( "Subject: " ) . append ( x509Cert . getSubjectX500Principal ( ) ) . append ( "\n" ) ; sb . append ( "SerialNum: " ) . append ( x509Cert . getSerialNumber ( ) . toString ( 16 ) ) . append ( "\n" ) ; sb . append ( "Expires: " ) . append ( x509Cert . getNotAfter ( ) . toString ( ) ) . append ( "\n" ) ; boolean [ ] iUID = x509Cert . getIssuerUniqueID ( ) ; if ( iUID != null ) { sb . append ( "IssuerUID: " ) ; for ( boolean b : iUID ) { sb . append ( b ? 1 : 0 ) ; } sb . append ( "\n" ) ; } boolean [ ] sUID = x509Cert . getSubjectUniqueID ( ) ; if ( sUID != null ) { sb . append ( "SubjectUID: " ) ; for ( boolean b : sUID ) { sb . append ( b ? 1 : 0 ) ; } sb . append ( "\n" ) ; } try { SubjectKeyIdentifierExtension sKeyID = x509Cert . getSubjectKeyIdentifierExtension ( ) ; if ( sKeyID != null ) { KeyIdentifier keyID = sKeyID . get ( SubjectKeyIdentifierExtension . KEY_ID ) ; sb . append ( "SubjKeyID: " ) . append ( keyID . toString ( ) ) ; } AuthorityKeyIdentifierExtension aKeyID = x509Cert . getAuthorityKeyIdentifierExtension ( ) ; if ( aKeyID != null ) { KeyIdentifier keyID = ( KeyIdentifier ) aKeyID . get ( AuthorityKeyIdentifierExtension . KEY_ID ) ; sb . append ( "AuthKeyID: " ) . append ( keyID . toString ( ) ) ; } } catch ( IOException e ) { if ( debug != null ) { debug . println ( "Vertex.certToString() unexpected exception" ) ; e . printStackTrace ( ) ; } } return sb . toString ( ) ;
public class AndroidPoiPersistenceManager { /** * { @ inheritDoc } */ @ Override public void insertPointsOfInterest ( Collection < PointOfInterest > pois ) { } }
try { for ( PointOfInterest poi : pois ) { // POI location this . db . execSQL ( DbConstants . INSERT_INDEX_STATEMENT , new String [ ] { String . valueOf ( poi . getId ( ) ) , String . valueOf ( poi . getLatitude ( ) ) , String . valueOf ( poi . getLatitude ( ) ) , String . valueOf ( poi . getLongitude ( ) ) , String . valueOf ( poi . getLongitude ( ) ) } ) ; // POI data this . db . execSQL ( DbConstants . INSERT_DATA_STATEMENT , new String [ ] { String . valueOf ( poi . getId ( ) ) , tagsToString ( poi . getTags ( ) ) } ) ; // POI categories for ( PoiCategory cat : poi . getCategories ( ) ) { this . db . execSQL ( DbConstants . INSERT_CATEGORY_MAP_STATEMENT , new String [ ] { String . valueOf ( poi . getId ( ) ) , String . valueOf ( cat . getID ( ) ) } ) ; } } } catch ( Exception e ) { LOGGER . log ( Level . SEVERE , e . getMessage ( ) , e ) ; }
public class NotesApi { /** * Get the specified merge request ' s note . * @ param projectIdOrPath the project in the form of an Integer ( ID ) , String ( path ) , or Project instance * @ param mergeRequestIid the merge request IID to get the notes for * @ param noteId the ID of the Note to get * @ return a Note instance for the specified IDs * @ throws GitLabApiException if any exception occurs */ public Note getMergeRequestNote ( Object projectIdOrPath , Integer mergeRequestIid , Integer noteId ) throws GitLabApiException { } }
Response response = get ( Response . Status . OK , getDefaultPerPageParam ( ) , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "merge_requests" , mergeRequestIid , "notes" , noteId ) ; return ( response . readEntity ( Note . class ) ) ;
public class QueryChemObject { /** * { @ inheritDoc } */ @ Override public void setProperties ( Map < Object , Object > properties ) { } }
this . properties = null ; if ( properties != null ) addProperties ( properties ) ;
public class PopupMenuUtils { /** * Appends a separator to the end of the menu if it exists at least one non separator menu component immediately before and * if there isn ' t , already , a separator at the end of the menu . * @ param popupMenu the pop up menu that will be processed * @ return { @ code true } if the separator was added , { @ code false } otherwise . * @ see javax . swing . JPopupMenu . Separator */ public static boolean addSeparatorIfNeeded ( JPopupMenu popupMenu ) { } }
final int menuComponentCount = popupMenu . getComponentCount ( ) ; if ( menuComponentCount == 0 ) { return false ; } final Component lastMenuComponent = popupMenu . getComponent ( menuComponentCount - 1 ) ; if ( isPopupMenuSeparator ( lastMenuComponent ) ) { return false ; } popupMenu . addSeparator ( ) ; return true ;
public class XMLUtils { /** * Get first node on a Document doc , give a xpath Expression * @ param doc * @ param xPathExpression * @ return a Node or null if not found */ public static Node getFirstNode ( Document doc , String xPathExpression ) { } }
try { XPathFactory xPathfactory = XPathFactory . newInstance ( ) ; XPath xpath = xPathfactory . newXPath ( ) ; XPathExpression expr ; expr = xpath . compile ( xPathExpression ) ; NodeList nl = ( NodeList ) expr . evaluate ( doc , XPathConstants . NODESET ) ; return nl . item ( 0 ) ; } catch ( XPathExpressionException e ) { e . printStackTrace ( ) ; } return null ;
public class appfwprofile_fieldformat_binding { /** * Use this API to fetch appfwprofile _ fieldformat _ binding resources of given name . */ public static appfwprofile_fieldformat_binding [ ] get ( nitro_service service , String name ) throws Exception { } }
appfwprofile_fieldformat_binding obj = new appfwprofile_fieldformat_binding ( ) ; obj . set_name ( name ) ; appfwprofile_fieldformat_binding response [ ] = ( appfwprofile_fieldformat_binding [ ] ) obj . get_resources ( service ) ; return response ;
public class ServiceDescriptionPanel { /** * Switch what is displayed ( if anything ) with information for the indicated * service definition . If null is given , clear what is currently displayed . */ public void setSDef ( String sDefPID ) throws IOException { } }
removeAll ( ) ; if ( sDefPID != null ) { JPanel lp = m_loadedPanels . get ( sDefPID ) ; if ( lp == null ) { lp = makePanel ( sDefPID ) ; m_loadedPanels . put ( sDefPID , lp ) ; } add ( lp , BorderLayout . CENTER ) ; } if ( m_containerToValidate != null ) { m_containerToValidate . revalidate ( ) ; m_containerToValidate . repaint ( new Rectangle ( m_containerToValidate . getSize ( ) ) ) ; }
public class MockHttpServletResponse { /** * Throws exception if committed ! */ public void reset ( ) { } }
resetBuffer ( ) ; m_aCharacterEncoding = null ; m_nContentLength = 0 ; m_sContentType = null ; m_aLocale = null ; m_aCookies . clear ( ) ; m_aHeaders . clear ( ) ; m_nStatus = HttpServletResponse . SC_OK ; m_sErrorMessage = null ;
public class SoccomClient { /** * Send a request message . * @ param msg The message to be sent . * @ exception SoccomException Thrown when an IOException is encountered . */ public void putreq ( String msg ) throws SoccomException { } }
byte msgbytes [ ] = SoccomMessage . makeMessage ( msg , null ) ; logline ( "SEND: " + new String ( msgbytes ) ) ; copy_msgid ( _msgid , msgbytes ) ; try { // _ out . print ( msg ) ; _out . write ( msgbytes ) ; } catch ( IOException e ) { throw new SoccomException ( SoccomException . REQUEST ) ; }
public class XChartDemo { /** * Create the tree * @ param top */ private void createNodes ( DefaultMutableTreeNode top ) { } }
// categories DefaultMutableTreeNode category ; // leaves DefaultMutableTreeNode defaultMutableTreeNode ; // Area category = new DefaultMutableTreeNode ( "Area Charts" ) ; top . add ( category ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "AreaChart01 - 3-Series" , new AreaChart01 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "AreaChart02 - Null Y-Axis Data Points" , new AreaChart02 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "AreaChart03 - Combination Area & Line Chart" , new AreaChart03 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "AreaChart04 - Step Area Rendering" , new AreaChart04 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; // Pie category = new DefaultMutableTreeNode ( "Pie Charts" ) ; top . add ( category ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "PieChart01 - Pie Chart with 4 Slices" , new PieChart01 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "PieChart02 - Pie Chart Custom Color Palette" , new PieChart02 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "PieChart03 - Pie Chart GGPlot2 Theme" , new PieChart03 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "PieChart04 - Pie Chart with Donut Style" , new PieChart04 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "PieChart05 - Pie Chart with Donut Style and Sum" , new PieChart05 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "PieChart06 - Pie Chart with Pie Style with Annotation LabelAndValue" , new PieChart06 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; // Line category = new DefaultMutableTreeNode ( "Line Charts" ) ; top . add ( category ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "LineChart01 - Logarithmic Y-Axis" , new LineChart01 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "LineChart02 - Customized Series Style" , new LineChart02 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "LineChart03 - Extensive Chart Customization" , new LineChart03 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "LineChart04 - Hundreds of Series on One Plot" , new LineChart04 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "LineChart05 - Scatter and Line with Tool Tips" , new LineChart05 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "LineChart06 - Logarithmic Y-Axis with Error Bars" , new LineChart06 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "LineChart07 - Category Chart with Line Rendering" , new LineChart07 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "LineChart08 - Step Rendering" , new LineChart08 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; // Scatter category = new DefaultMutableTreeNode ( "Scatter Charts" ) ; top . add ( category ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "ScatterChart01 - Gaussian Blob with Y Axis on Right" , new ScatterChart01 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "ScatterChart02 - Logarithmic Data" , new ScatterChart02 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "ScatterChart03 - Single Point" , new ScatterChart03 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "ScatterChart04 - Error Bars" , new ScatterChart04 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; // Bar category = new DefaultMutableTreeNode ( "Bar Charts" ) ; top . add ( category ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "BarChart01 - Basic Bar Chart" , new BarChart01 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "BarChart02 - Date Categories" , new BarChart02 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "BarChart03 - Stacked Bar Chart" , new BarChart03 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "BarChart04 - Missing Point in Series" , new BarChart04 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "BarChart05 - GGPlot2 Theme" , new BarChart05 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "BarChart06 - Histogram Overlapped" , new BarChart06 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "BarChart07 - Histogram Not Overlapped with Tool Tips" , new BarChart07 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "BarChart08 - Histogram with Error Bars" , new BarChart08 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "BarChart09 - Category chart with Bar, Line and Scatter Series" , new BarChart09 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "BarChart10 - Stepped Bars with Line Styling" , new BarChart10 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "BarChart11 - Stacked Stepped Bars" , new BarChart11 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "BarChart12 - Stepped Bars Not Overlapped" , new BarChart12 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; // Radar category = new DefaultMutableTreeNode ( "Radar Charts" ) ; top . add ( category ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "RadarChart01 - Basic Radar Chart" , new RadarChart01 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; // Dial category = new DefaultMutableTreeNode ( "Dial Charts" ) ; top . add ( category ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "DialChart01 - Basic Dial Chart" , new DialChart01 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; // Stick category = new DefaultMutableTreeNode ( "Stick Charts" ) ; top . add ( category ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "StickChart01 - Basic Stick Chart" , new StickChart01 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; // Bubble category = new DefaultMutableTreeNode ( "Bubble Charts" ) ; top . add ( category ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "BubbleChart01 - Basic Bubble Chart" , new BubbleChart01 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; // OHLC category = new DefaultMutableTreeNode ( "OHLC Charts" ) ; top . add ( category ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "OHLCChart01 - HiLo rendering" , new OHLCChart01 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "OHLCChart02 - Candle rendering" , new OHLCChart02 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "OHLCChart03 - Candle with custom colors" , new OHLCChart03 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; // Theme category = new DefaultMutableTreeNode ( "Chart Themes" ) ; top . add ( category ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "ThemeChart01 - Default XChart Theme" , new ThemeChart01 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "ThemeChart02 - GGPlot2 Theme" , new ThemeChart02 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "ThemeChart03 - Matlab Theme" , new ThemeChart03 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "ThemeChart04 - My Custom Theme" , new ThemeChart04 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; // Date category = new DefaultMutableTreeNode ( "Date Charts" ) ; top . add ( category ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "DateChart01 - Millisecond Scale with Two Separate Y Axis Groups" , new DateChart01 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "DateChart02 - Second Scale" , new DateChart02 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "DateChart03 - Minute Scale with Two Separate Y Axis Groups" , new DateChart03 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "DateChart04 - Hour Scale" , new DateChart04 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "DateChart05 - Day Scale" , new DateChart05 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "DateChart06 - Month Scale" , new DateChart06 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "DateChart07 - Year Scale" , new DateChart07 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "DateChart08 - Rotated Tick Labels" , new DateChart08 ( ) . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; // Real - time category category = new DefaultMutableTreeNode ( "Real-time Charts" ) ; top . add ( category ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "RealtimeChart01 - Real-time XY Chart" , realtimeChart01 . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "RealtimeChart02 - Real-time Pie Chart" , realtimeChart02 . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "RealtimeChart03 - Real-time XY Chart with Error Bars" , realtimeChart03 . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "RealtimeChart04 - Real-time Bubble Chart" , realtimeChart04 . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "RealtimeChart05 - Real-time Category Chart" , realtimeChart05 . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ; defaultMutableTreeNode = new DefaultMutableTreeNode ( new ChartInfo ( "RealtimeChart06 - Real-time OHLC Chart" , realtimeChart06 . getChart ( ) ) ) ; category . add ( defaultMutableTreeNode ) ;
public class SocketEventDispatcher { /** * Dispatch socket info event . * @ param event Event to dispatch . */ private void onSocketStarted ( SocketStartEvent event ) { } }
handler . post ( ( ) -> listener . onSocketStarted ( event ) ) ; log ( "Event published " + event . toString ( ) ) ;
public class Constraints { /** * Returns a constrained view of the specified set , using the specified * constraint . Any operations that add new elements to the set will call the * provided constraint . However , this method does not verify that existing * elements satisfy the constraint . * < p > The returned set is not serializable . * @ param set the set to constrain * @ param constraint the constraint that validates added elements * @ return a constrained view of the set */ public static < E > Set < E > constrainedSet ( Set < E > set , Constraint < ? super E > constraint ) { } }
return new ConstrainedSet < E > ( set , constraint ) ;
public class FailedCreateAssociationMarshaller { /** * Marshall the given parameter object . */ public void marshall ( FailedCreateAssociation failedCreateAssociation , ProtocolMarshaller protocolMarshaller ) { } }
if ( failedCreateAssociation == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( failedCreateAssociation . getEntry ( ) , ENTRY_BINDING ) ; protocolMarshaller . marshall ( failedCreateAssociation . getMessage ( ) , MESSAGE_BINDING ) ; protocolMarshaller . marshall ( failedCreateAssociation . getFault ( ) , FAULT_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class ClientSocketStats { /** * Record the checkout queue length * @ param dest Destination of the socket to checkout . Will actually record * if null . Otherwise will call this on self and corresponding child * with this param null . * @ param queueLength The number of entries in the " synchronous " checkout * queue . */ public void recordCheckoutQueueLength ( SocketDestination dest , int queueLength ) { } }
if ( dest != null ) { getOrCreateNodeStats ( dest ) . recordCheckoutQueueLength ( null , queueLength ) ; recordCheckoutQueueLength ( null , queueLength ) ; } else { this . checkoutQueueLengthHistogram . insert ( queueLength ) ; checkMonitoringInterval ( ) ; }
public class EnvironmentVariablesConfigurationSource { /** * Convert the Environment Variable Name to the expected Properties Key formatting * @ param environmentVariableKey The Env Variable Name , possibly prefixed with the { @ link Environment } which * in this context serves as a way to namespace variables * @ param environmentContext The Environment context in format : ENVIRONMENTNAME _ * @ return A { @ link String } with the environment prefix removed and all underscores converted to periods */ private static String convertToPropertiesKey ( String environmentVariableKey , String environmentContext ) { } }
return environmentVariableKey . substring ( environmentContext . length ( ) ) . replace ( ENV_DELIMITER , PROPERTIES_DELIMITER ) ;
public class LogFileXMLReceiver { /** * Process the file */ public void activateOptions ( ) { } }
Runnable runnable = new Runnable ( ) { public void run ( ) { try { URL url = new URL ( fileURL ) ; host = url . getHost ( ) ; if ( host != null && host . equals ( "" ) ) { host = FILE_KEY ; } path = url . getPath ( ) ; } catch ( MalformedURLException e1 ) { // TODO Auto - generated catch block e1 . printStackTrace ( ) ; } try { if ( filterExpression != null ) { expressionRule = ExpressionRule . getRule ( filterExpression ) ; } } catch ( Exception e ) { getLogger ( ) . warn ( "Invalid filter expression: " + filterExpression , e ) ; } Class c ; try { c = Class . forName ( decoder ) ; Object o = c . newInstance ( ) ; if ( o instanceof Decoder ) { decoderInstance = ( Decoder ) o ; } } catch ( ClassNotFoundException e ) { // TODO Auto - generated catch block e . printStackTrace ( ) ; } catch ( InstantiationException e ) { // TODO Auto - generated catch block e . printStackTrace ( ) ; } catch ( IllegalAccessException e ) { // TODO Auto - generated catch block e . printStackTrace ( ) ; } try { reader = new InputStreamReader ( new URL ( getFileURL ( ) ) . openStream ( ) ) ; process ( reader ) ; } catch ( FileNotFoundException fnfe ) { getLogger ( ) . info ( "file not available" ) ; } catch ( IOException ioe ) { getLogger ( ) . warn ( "unable to load file" , ioe ) ; return ; } } } ; if ( useCurrentThread ) { runnable . run ( ) ; } else { Thread thread = new Thread ( runnable , "LogFileXMLReceiver-" + getName ( ) ) ; thread . start ( ) ; }
public class VTensor { /** * Implements { @ link MVec # elemAdd ( MVec ) } . */ @ Override public void elemAdd ( MVec addend ) { } }
if ( addend instanceof VTensor ) { elemAdd ( ( VTensor ) addend ) ; } else { throw new IllegalArgumentException ( "Addend must be of type " + this . getClass ( ) ) ; }
public class MaterialTooltip { /** * Set the html as value inside the tooltip . */ public void setHtml ( String html ) { } }
this . html = html ; if ( widget != null ) { if ( widget . isAttached ( ) ) { tooltipElement . find ( "span" ) . html ( html != null ? html : "" ) ; } else { widget . addAttachHandler ( event -> tooltipElement . find ( "span" ) . html ( html != null ? html : "" ) ) ; } } else { GWT . log ( "Please initialize the Target widget." , new IllegalStateException ( ) ) ; }
public class PhotosInterface { /** * Get the permission information for the specified photo . * This method requires authentication with ' read ' permission . * @ param photoId * The photo id * @ return The Permissions object * @ throws FlickrException */ public Permissions getPerms ( String photoId ) throws FlickrException { } }
Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_GET_PERMS ) ; parameters . put ( "photo_id" , photoId ) ; Response response = transport . get ( transport . getPath ( ) , parameters , apiKey , sharedSecret ) ; if ( response . isError ( ) ) { throw new FlickrException ( response . getErrorCode ( ) , response . getErrorMessage ( ) ) ; } Element permissionsElement = response . getPayload ( ) ; Permissions permissions = new Permissions ( ) ; permissions . setId ( permissionsElement . getAttribute ( "id" ) ) ; permissions . setPublicFlag ( "1" . equals ( permissionsElement . getAttribute ( "ispublic" ) ) ) ; permissions . setFamilyFlag ( "1" . equals ( permissionsElement . getAttribute ( "isfamily" ) ) ) ; permissions . setFriendFlag ( "1" . equals ( permissionsElement . getAttribute ( "isfriend" ) ) ) ; permissions . setComment ( permissionsElement . getAttribute ( "permcomment" ) ) ; permissions . setAddmeta ( permissionsElement . getAttribute ( "permaddmeta" ) ) ; return permissions ;
public class BaseGridScreen { /** * Get the next grid record . * @ param bFirstTime If true , I want the first record . * @ return the next record ( or null if EOF ) . */ public Record getNextGridRecord ( boolean bFirstTime ) throws DBException { } }
Record record = this . getMainRecord ( ) ; BaseTable table = record . getTable ( ) ; if ( bFirstTime ) table . close ( ) ; boolean bHasNext = table . hasNext ( ) ; if ( ! bHasNext ) return null ; return ( Record ) table . next ( ) ;
public class ApiOvhCloud { /** * View account current total sessions usage ( bytes ) * REST : GET / cloud / { serviceName } / pca / { pcaServiceName } / usage * @ param serviceName [ required ] The internal name of your public cloud passport * @ param pcaServiceName [ required ] The internal name of your PCA offer * @ deprecated */ public Long serviceName_pca_pcaServiceName_usage_GET ( String serviceName , String pcaServiceName ) throws IOException { } }
String qPath = "/cloud/{serviceName}/pca/{pcaServiceName}/usage" ; StringBuilder sb = path ( qPath , serviceName , pcaServiceName ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , Long . class ) ;
public class SuboptimalExpressionOrder { /** * overrides the visitor to reset the opcode stack , and initialize vars * @ param obj * the code object of the currently parsed method */ @ Override public void visitCode ( Code obj ) { } }
stack . resetForMethodEntry ( this ) ; conditionalTarget = - 1 ; sawMethodWeight = 0 ; super . visitCode ( obj ) ;
public class DataStream { /** * Writes a DataStream to the standard output stream ( stdout ) . * < p > For each element of the DataStream the result of { @ link Object # toString ( ) } is written . * < p > NOTE : This will print to stdout on the machine where the code is executed , i . e . the Flink * worker . * @ param sinkIdentifier The string to prefix the output with . * @ return The closed DataStream . */ @ PublicEvolving public DataStreamSink < T > print ( String sinkIdentifier ) { } }
PrintSinkFunction < T > printFunction = new PrintSinkFunction < > ( sinkIdentifier , false ) ; return addSink ( printFunction ) . name ( "Print to Std. Out" ) ;
public class NGServer { /** * Returns a snapshot of this NGServer ' s nail statistics . The result is a < code > java . util . Map * < / code > , keyed by class name , with < a href = " NailStats . html " > NailStats < / a > objects as values . * @ return a snapshot of this NGServer ' s nail statistics . */ public Map < String , NailStats > getNailStats ( ) { } }
Map < String , NailStats > result = new TreeMap ( ) ; synchronized ( allNailStats ) { for ( Map . Entry < String , NailStats > entry : allNailStats . entrySet ( ) ) { result . put ( entry . getKey ( ) , ( NailStats ) entry . getValue ( ) . clone ( ) ) ; } } return result ;
public class AbstractPrintQuery { /** * Method to get the instance for an < code > _ attributeName < / code > . * @ param _ attributeName name of the attribute * @ return list of instance * @ throws EFapsException on error */ public List < Instance > getInstances4Attribute ( final String _attributeName ) throws EFapsException { } }
final OneSelect oneselect = this . attr2OneSelect . get ( _attributeName ) ; return oneselect == null ? null : oneselect . getInstances ( ) ;
public class Subtypes2 { /** * Starting at the class or interface named by the given ClassDescriptor , * traverse the inheritance graph , exploring all paths from the class or * interface to java . lang . Object . * @ param start * ClassDescriptor naming the class where the traversal should * start * @ param visitor * an InheritanceGraphVisitor * @ throws ClassNotFoundException * if the start vertex cannot be resolved */ public void traverseSupertypes ( ClassDescriptor start , InheritanceGraphVisitor visitor ) throws ClassNotFoundException { } }
LinkedList < SupertypeTraversalPath > workList = new LinkedList < > ( ) ; ClassVertex startVertex = resolveClassVertex ( start ) ; workList . addLast ( new SupertypeTraversalPath ( startVertex ) ) ; while ( ! workList . isEmpty ( ) ) { SupertypeTraversalPath cur = workList . removeFirst ( ) ; ClassVertex vertex = cur . getNext ( ) ; assert ! cur . hasBeenSeen ( vertex . getClassDescriptor ( ) ) ; cur . markSeen ( vertex . getClassDescriptor ( ) ) ; if ( ! visitor . visitClass ( vertex . getClassDescriptor ( ) , vertex . getXClass ( ) ) ) { // Visitor doesn ' t want to continue on this path continue ; } if ( ! vertex . isResolved ( ) ) { // Unknown class - so , we don ' t know its immediate supertypes continue ; } // Advance to direct superclass ClassDescriptor superclassDescriptor = vertex . getXClass ( ) . getSuperclassDescriptor ( ) ; if ( superclassDescriptor != null && traverseEdge ( vertex , superclassDescriptor , false , visitor ) ) { addToWorkList ( workList , cur , superclassDescriptor ) ; } // Advance to directly - implemented interfaces for ( ClassDescriptor ifaceDesc : vertex . getXClass ( ) . getInterfaceDescriptorList ( ) ) { if ( traverseEdge ( vertex , ifaceDesc , true , visitor ) ) { addToWorkList ( workList , cur , ifaceDesc ) ; } } }
public class CacheImpl { /** * Called when a tick occurs . A tick is a logical unit of time . It basically symbolizes the time span between * calls to this method ( i . e . 15 mins ) by a job scheduler like Quartz . * Checks if some of the { @ link CacheItem } s in the cache have expired or need to be refreshed . If the item * has expired , it is removed from the cache . If it needs to be refreshed , it is added to a list of items that * need to be refreshed that is later passed to the { @ link CacheRefresher } . */ public void tick ( ) { } }
ticks . incrementAndGet ( ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Tick!" ) ; } List < CacheItem > itemsToRefresh = new ArrayList < CacheItem > ( ) ; try { Collection < String > scopes = cacheStoreAdapter . getScopes ( ) ; if ( CollectionUtils . isNotEmpty ( scopes ) ) { for ( String scope : scopes ) { Collection < Object > keys = cacheStoreAdapter . getKeys ( scope ) ; if ( CollectionUtils . isNotEmpty ( keys ) ) { for ( Object key : keys ) { CacheItem item = cacheStoreAdapter . get ( scope , key ) ; if ( item != null ) { doChecks ( item , itemsToRefresh ) ; } else { if ( logger . isDebugEnabled ( ) ) { logger . debug ( item + " was removed before it could be checked for " + "expiration/refresh" ) ; } } } } } } if ( cacheRefresher != null && CollectionUtils . isNotEmpty ( itemsToRefresh ) ) { cacheRefresher . refreshItems ( itemsToRefresh , this ) ; } } catch ( Exception ex ) { logger . warn ( "Exception while checking items for expiration/refresh" , ex ) ; }
public class ProbeMethodAdapter { /** * Create an object array and store the target method arguments in it . * @ param desc the target method descriptor */ void replaceArgsWithArray ( String desc ) { } }
Type [ ] methodArgs = Type . getArgumentTypes ( desc ) ; createObjectArray ( methodArgs . length ) ; // [ target ] args . . . array for ( int i = methodArgs . length - 1 ; i >= 0 ; i -- ) { if ( methodArgs [ i ] . getSize ( ) == 2 ) { visitInsn ( DUP_X2 ) ; // [ target ] args . . . array arg _ arg array visitLdcInsn ( Integer . valueOf ( i ) ) ; // [ target ] args . . . array arg _ arg array idx visitInsn ( DUP2_X2 ) ; // [ target ] args . . . array array idx arg _ arg array idx visitInsn ( POP2 ) ; // [ target ] args . . . array array idx arg _ arg } else { visitInsn ( DUP_X1 ) ; // [ target ] args . . . array arg array visitInsn ( SWAP ) ; // [ target ] args . . . array array arg visitLdcInsn ( Integer . valueOf ( i ) ) ; // [ target ] args . . . array array arg idx visitInsn ( SWAP ) ; // [ target ] args . . . array array idx arg } box ( methodArgs [ i ] ) ; // [ target ] args . . . array array idx boxed visitInsn ( AASTORE ) ; // [ target ] args . . . array } // [ target ] array
public class ArchiveReader { /** * Output passed record using passed format specifier . * @ param format What format to use outputting . * @ throws IOException * @ return True if handled . */ public boolean outputRecord ( final String format ) throws IOException { } }
boolean result = true ; if ( format . equals ( CDX ) ) { System . out . println ( get ( ) . outputCdx ( getStrippedFileName ( ) ) ) ; } else if ( format . equals ( ArchiveFileConstants . DUMP ) ) { // No point digesting if dumping content . setDigest ( false ) ; get ( ) . dump ( ) ; } else { result = false ; } return result ;
public class DdlParsers { /** * Parse the supplied DDL using multiple parsers , returning the result of each parser with its score in the order of highest * scoring to lowest scoring . * @ param ddl the DDL being parsed ( cannot be < code > null < / code > or empty ) * @ param firstParserId the identifier of the first parser to use ( cannot be < code > null < / code > or empty ) * @ param secondParserId the identifier of the second parser to use ( cannot be < code > null < / code > or empty ) * @ param additionalParserIds the identifiers of additional parsers that should be used ; may be empty but not contain a null * identifier value * @ return the list of { @ link ParsingResult } instances , one for each parser , ordered from highest score to lowest score ( never * < code > null < / code > or empty ) * @ throws ParsingException if there is an error parsing the supplied DDL content * @ throws IllegalArgumentException if a parser with the specified identifier cannot be found */ public List < ParsingResult > parseUsing ( final String ddl , final String firstParserId , final String secondParserId , final String ... additionalParserIds ) throws ParsingException { } }
CheckArg . isNotEmpty ( firstParserId , "firstParserId" ) ; CheckArg . isNotEmpty ( secondParserId , "secondParserId" ) ; if ( additionalParserIds != null ) { CheckArg . containsNoNulls ( additionalParserIds , "additionalParserIds" ) ; } final int numParsers = ( ( additionalParserIds == null ) ? 2 : ( additionalParserIds . length + 2 ) ) ; final List < DdlParser > selectedParsers = new ArrayList < DdlParser > ( numParsers ) ; { // add first parser final DdlParser parser = getParser ( firstParserId ) ; if ( parser == null ) { throw new ParsingException ( Position . EMPTY_CONTENT_POSITION , DdlSequencerI18n . unknownParser . text ( firstParserId ) ) ; } selectedParsers . add ( parser ) ; } { // add second parser final DdlParser parser = getParser ( secondParserId ) ; if ( parser == null ) { throw new ParsingException ( Position . EMPTY_CONTENT_POSITION , DdlSequencerI18n . unknownParser . text ( secondParserId ) ) ; } selectedParsers . add ( parser ) ; } // add remaining parsers if ( ( additionalParserIds != null ) && ( additionalParserIds . length != 0 ) ) { for ( final String id : additionalParserIds ) { final DdlParser parser = getParser ( id ) ; if ( parser == null ) { throw new ParsingException ( Position . EMPTY_CONTENT_POSITION , DdlSequencerI18n . unknownParser . text ( id ) ) ; } selectedParsers . add ( parser ) ; } } return parseUsing ( ddl , selectedParsers ) ;
public class Transformers { /** * For every onNext emission from the source stream , the { @ code valueToInsert } * Maybe is subscribed to . If the Maybe emits before the next upstream emission * then the result from the Maybe will be inserted into the stream . If the Maybe * does not emit before the next upstream emission then it is cancelled ( and no * value is inserted ) . * @ param valueToInsert * a Maybe is calculated from last source emission and subscribed to . * If succeeds before next source emission then result is inserted * into stream . * @ param < T > * stream element type * @ return source with operator insert applied */ public static < T > FlowableTransformer < T , T > insert ( final Function < ? super T , ? extends Maybe < ? extends T > > valueToInsert ) { } }
return new FlowableTransformer < T , T > ( ) { @ Override public Publisher < T > apply ( Flowable < T > source ) { return new FlowableInsertMaybe < T > ( source , valueToInsert ) ; } } ;
public class DbHelperBase { /** * Moved to DbHelper * @ deprecated */ @ Deprecated private String convertDatabaseName ( String name ) { } }
if ( propBase . getBooleanProperty ( "db.useUnderscoreNaming" ) ) { name = CamelCaseConverter . camelCaseToUnderscore ( name ) ; } name = truncateLongDatabaseName ( name ) ; name = name . toUpperCase ( ) ; return name ;
public class GCBEZRGImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public boolean eIsSet ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . GCBEZRG__XPOS : return XPOS_EDEFAULT == null ? xpos != null : ! XPOS_EDEFAULT . equals ( xpos ) ; case AfplibPackage . GCBEZRG__YPOS : return YPOS_EDEFAULT == null ? ypos != null : ! YPOS_EDEFAULT . equals ( ypos ) ; } return super . eIsSet ( featureID ) ;
public class Bean { /** * Call the onResult callback for { @ link com . punchthrough . bean . sdk . Bean # readLed ( com . punchthrough . bean . sdk . message . Callback ) } . * @ param buffer Raw message bytes from the Bean */ private void returnLed ( Buffer buffer ) { } }
Callback < LedColor > callback = getFirstCallback ( BeanMessageID . CC_LED_READ_ALL ) ; if ( callback != null ) { callback . onResult ( LedColor . fromPayload ( buffer ) ) ; }
public class JFontChooser { /** * Creates and returns a new dialog containing the specified * < code > ColorChooser < / code > pane along with " OK " , " Cancel " , and " Reset " * buttons . If the " OK " or " Cancel " buttons are pressed , the dialog is * automatically hidden ( but not disposed ) . If the " Reset " * button is pressed , the color - chooser ' s color will be reset to the * font which was set the last time < code > show < / code > was invoked on the * dialog and the dialog will remain showing . * @ param c the parent component for the dialog * @ param title the title for the dialog * @ param modal a boolean . When true , the remainder of the program * is inactive until the dialog is closed . * @ param okListener the ActionListener invoked when " OK " is pressed * @ param cancelListener the ActionListener invoked when " Cancel " is pressed * @ return a new dialog containing the font - chooser pane * @ exception HeadlessException if GraphicsEnvironment . isHeadless ( ) * returns true . * @ see java . awt . GraphicsEnvironment # isHeadless */ public JDialog createDialog ( Component c , String title , boolean modal , ActionListener okListener , ActionListener cancelListener ) { } }
return new FontChooserDialog ( c , title , modal , this , okListener , cancelListener ) ;
public class JobExecutionsInner { /** * Creates or updatess a job execution . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param serverName The name of the server . * @ param jobAgentName The name of the job agent . * @ param jobName The name of the job to get . * @ param jobExecutionId The job execution id to create the job execution under . * @ param serviceCallback the async ServiceCallback to handle successful and failed responses . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the { @ link ServiceFuture } object */ public ServiceFuture < JobExecutionInner > createOrUpdateAsync ( String resourceGroupName , String serverName , String jobAgentName , String jobName , UUID jobExecutionId , final ServiceCallback < JobExecutionInner > serviceCallback ) { } }
return ServiceFuture . fromResponse ( createOrUpdateWithServiceResponseAsync ( resourceGroupName , serverName , jobAgentName , jobName , jobExecutionId ) , serviceCallback ) ;
public class RevisionEncoder { /** * Encodes a Delete operation . * @ param part * Reference to the Delete operation * @ throws EncodingException * if the encoding failed */ private void encodeDelete ( final DiffPart part ) throws EncodingException { } }
data . writeBit ( 0 ) ; data . writeBit ( 1 ) ; data . writeBit ( 1 ) ; data . writeValue ( codecData . getBlocksizeS ( ) , part . getStart ( ) ) ; data . writeValue ( codecData . getBlocksizeE ( ) , part . getLength ( ) ) ; data . writeFillBits ( ) ;
public class Response { /** * Converts the inputstream to a string in UTF - 8 . Subsequent the inputstream will be empty / closed . */ public byte [ ] getStreamAsBytearray ( ) throws IOException { } }
byte [ ] result = null ; try { result = IOUtils . toByteArray ( getStream ( ) ) ; } catch ( NullPointerException npex ) { throw new IOException ( "Timeout has been forced by CommonHttpClient" , npex ) ; } return result ;
public class CmsImportView { /** * Shows a popup containing the import view . < p > */ public static void showPopup ( ) { } }
final CmsPopup popup = new CmsPopup ( CmsAliasMessages . messageTitleImport ( ) ) ; popup . setModal ( true ) ; popup . setGlassEnabled ( true ) ; CmsImportView importView = new CmsImportView ( ) ; popup . setMainContent ( importView ) ; popup . setWidth ( 800 ) ; popup . addDialogClose ( null ) ; popup . centerHorizontally ( 100 ) ;
public class TrifocalExtractGeometries { /** * Extract the fundamental matrices between views 1 + 2 and views 1 + 3 . The returned Fundamental * matrices will have the following properties : x < sub > i < / sub > < sup > T < / sup > * Fi * x < sub > 1 < / sub > = 0 , where i is view 2 or 3. * NOTE : The first camera is assumed to have the camera matrix of P1 = [ I | 0 ] . Thus observations in pixels for * the first camera will not meet the epipolar constraint when applied to the returned fundamental matrices . * < pre > * F21 = [ e2 ] x * [ T1 , T2 , T3 ] * e3 and F31 = [ e3 ] x * [ T1 , T2 , T3 ] * e3 * < / pre > * @ param F21 ( Output ) Fundamental matrix * @ param F31 ( Output ) Fundamental matrix */ public void extractFundmental ( DMatrixRMaj F21 , DMatrixRMaj F31 ) { } }
// compute the camera matrices one column at a time for ( int i = 0 ; i < 3 ; i ++ ) { DMatrixRMaj T = tensor . getT ( i ) ; GeometryMath_F64 . mult ( T , e3 , temp0 ) ; GeometryMath_F64 . cross ( e2 , temp0 , column ) ; F21 . set ( 0 , i , column . x ) ; F21 . set ( 1 , i , column . y ) ; F21 . set ( 2 , i , column . z ) ; GeometryMath_F64 . multTran ( T , e2 , temp0 ) ; GeometryMath_F64 . cross ( e3 , temp0 , column ) ; F31 . set ( 0 , i , column . x ) ; F31 . set ( 1 , i , column . y ) ; F31 . set ( 2 , i , column . z ) ; }
public class BasicSebConfiguration { /** * Adds { @ link System # getProperties ( ) } after specific key in actual * properties list . * @ param afterKey * The after properties key * @ return Same instance */ public BasicSebConfiguration addSystemPropertiesAfter ( String afterKey ) { } }
return ( BasicSebConfiguration ) addPropertiesAfter ( afterKey , SYSTEM_PROPERTIES_KEY , System . getProperties ( ) ) ;
public class JBBPDslBuilder { /** * Add named long array which size calculated through expression . * @ param name name of the field , can be null for anonymous * @ param sizeExpression expression to be used to calculate size , must not be null * @ return the builder instance , must not be null */ public JBBPDslBuilder LongArray ( final String name , final String sizeExpression ) { } }
final Item item = new Item ( BinType . LONG_ARRAY , name , this . byteOrder ) ; item . sizeExpression = assertExpressionChars ( sizeExpression ) ; this . addItem ( item ) ; return this ;
public class DAOValidatorHelper { /** * Methode permettant d ' obtenir la liste de tous les champs d ' une classe * @ param typeClasses source * @ param ignoreRoot ignorer ou traiter le root * @ returnListe des classes */ public static List < Field > getAllFields ( Class < ? > type , boolean ignoreRoot ) { } }
// Liste des champs List < Field > fields = new ArrayList < Field > ( ) ; // Ajout des champs directs de la classe fields . addAll ( Arrays . asList ( type . getDeclaredFields ( ) ) ) ; // Superclasse Class < ? > superType = type . getSuperclass ( ) ; // Si la super classe est Object if ( superType != null && ! superType . equals ( Object . class ) ) fields . addAll ( getAllFields ( superType , ignoreRoot ) ) ; // On retourne la liste return fields ;
public class VirtualHubsInner { /** * Creates a VirtualHub resource if it doesn ' t exist else updates the existing VirtualHub . * @ param resourceGroupName The resource group name of the VirtualHub . * @ param virtualHubName The name of the VirtualHub . * @ param virtualHubParameters Parameters supplied to create or update VirtualHub . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws ErrorException thrown if the request is rejected by server * @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @ return the VirtualHubInner object if successful . */ public VirtualHubInner beginCreateOrUpdate ( String resourceGroupName , String virtualHubName , VirtualHubInner virtualHubParameters ) { } }
return beginCreateOrUpdateWithServiceResponseAsync ( resourceGroupName , virtualHubName , virtualHubParameters ) . toBlocking ( ) . single ( ) . body ( ) ;
public class ConnectionWriteCompletedCallback { /** * Returns the first WsByteBuffer set in ' writeCtx ' , ensuring that it is the sole byte buffer set in ' writeCtx ' , and * releasing any other byte buffers that had been registered there . * @ return the sole byte buffer set in ' writeCtx ' ; maybe null if there is no such byte buffer . */ private WsByteBuffer getSoleWriteContextBuffer ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getSoleWriteContextBuffer" ) ; WsByteBuffer writeBuffer = null ; final WsByteBuffer [ ] writeBuffers = writeCtx . getBuffers ( ) ; if ( writeBuffers != null ) { final int writeBuffersSize = writeBuffers . length ; if ( writeBuffersSize > 0 ) { writeBuffer = writeBuffers [ 0 ] ; if ( writeBuffersSize > 1 ) { writeCtx . setBuffer ( writeBuffer ) ; for ( int i = 1 ; i < writeBuffersSize ; i ++ ) { if ( writeBuffers [ i ] != null ) writeBuffers [ i ] . release ( ) ; } } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getSoleWriteContextBuffer" , writeBuffer ) ; return writeBuffer ;
public class HttpBuilder { /** * Executes a HEAD request on the configured URI , with additional configuration provided by the configuration closure . The result will be cast to * the specified ` type ` . A response to a HEAD request contains no data ; however , the ` response . when ( ) ` methods may provide data based on response * headers , which will be cast to the specified type . * [ source , groovy ] * def http = HttpBuilder . configure { * request . uri = ' http : / / localhost : 10101 / date ' * Date result = http . head ( Date ) { * response . success { FromServer fromServer - > * Date . parse ( ' yyyy . MM . dd HH : mm ' , fromServer . headers . find { it . key = = ' stamp ' } . value ) * The configuration ` closure ` allows additional configuration for this request based on the { @ link HttpConfig } interface . * @ param type the type of the response content * @ param closure the additional configuration closure ( delegated to { @ link HttpConfig } ) * @ return the resulting content cast to the specified type */ public < T > T head ( final Class < T > type , @ DelegatesTo ( HttpConfig . class ) final Closure closure ) { } }
return type . cast ( interceptors . get ( HttpVerb . HEAD ) . apply ( configureRequest ( type , HttpVerb . HEAD , closure ) , this :: doHead ) ) ;
public class HttpBase { /** * 设置一个header < br > * 如果覆盖模式 , 则替换之前的值 , 否则加入到值列表中 * @ param name Header名 * @ param value Header值 * @ param isOverride 是否覆盖已有值 * @ return T 本身 */ public T header ( String name , String value , boolean isOverride ) { } }
if ( null != name && null != value ) { final List < String > values = headers . get ( name . trim ( ) ) ; if ( isOverride || CollectionUtil . isEmpty ( values ) ) { final ArrayList < String > valueList = new ArrayList < String > ( ) ; valueList . add ( value ) ; headers . put ( name . trim ( ) , valueList ) ; } else { values . add ( value . trim ( ) ) ; } } return ( T ) this ;
public class DeletePRequest { /** * < code > optional . alluxio . grpc . file . DeletePOptions options = 2 ; < / code > */ public alluxio . grpc . DeletePOptionsOrBuilder getOptionsOrBuilder ( ) { } }
return options_ == null ? alluxio . grpc . DeletePOptions . getDefaultInstance ( ) : options_ ;
public class DfuBaseService { /** * Closes the GATT device and cleans up . * @ param gatt the GATT device to be closed . */ protected void close ( final BluetoothGatt gatt ) { } }
logi ( "Cleaning up..." ) ; sendLogBroadcast ( LOG_LEVEL_DEBUG , "gatt.close()" ) ; gatt . close ( ) ; mConnectionState = STATE_CLOSED ;
public class MP3Reader { /** * { @ inheritDoc } */ @ Override public ITag readTag ( ) { } }
log . debug ( "readTag" ) ; try { lock . acquire ( ) ; if ( ! firstTags . isEmpty ( ) ) { // return first tags before media data return firstTags . removeFirst ( ) ; } AudioFrame frame = frameList . get ( frameIndex ++ ) ; if ( frame == null ) { return null ; } int frameSize = frame . getLength ( ) ; log . trace ( "Frame size: {}" , frameSize ) ; if ( frameSize == 0 ) { return null ; } tag = new Tag ( IoConstants . TYPE_AUDIO , ( int ) currentTime , frameSize + 1 , null , prevSize ) ; prevSize = frameSize + 1 ; currentTime += frame . getDuration ( ) ; IoBuffer body = IoBuffer . allocate ( tag . getBodySize ( ) ) ; body . setAutoExpand ( true ) ; byte tagType = ( IoConstants . FLAG_FORMAT_MP3 << 4 ) | ( IoConstants . FLAG_SIZE_16_BIT << 1 ) ; switch ( frame . getSampleRate ( ) ) { case 48000 : tagType |= IoConstants . FLAG_RATE_48_KHZ << 2 ; break ; case 44100 : tagType |= IoConstants . FLAG_RATE_44_KHZ << 2 ; break ; case 22050 : tagType |= IoConstants . FLAG_RATE_22_KHZ << 2 ; break ; case 11025 : tagType |= IoConstants . FLAG_RATE_11_KHZ << 2 ; break ; default : tagType |= IoConstants . FLAG_RATE_5_5_KHZ << 2 ; } tagType |= ( frame . getChannels ( ) > 1 ? IoConstants . FLAG_TYPE_STEREO : IoConstants . FLAG_TYPE_MONO ) ; body . put ( tagType ) ; // read the header and data after fixing the position log . trace ( "Allocating {} buffer" , frameSize ) ; if ( frameSize > 0 ) { ByteBuffer in = ByteBuffer . allocate ( frameSize ) . order ( ByteOrder . BIG_ENDIAN ) ; fileChannel . read ( in ) ; in . flip ( ) ; body . put ( in ) ; body . flip ( ) ; tag . setBody ( body ) ; } else { log . warn ( "Buffer size was invalid: {}" , frameSize ) ; } } catch ( InterruptedException e ) { log . warn ( "Exception acquiring lock" , e ) ; } catch ( Exception e ) { log . warn ( "Exception reading tag" , e ) ; } finally { lock . release ( ) ; } return tag ;
public class GraphEntityMapper { /** * Populates Node properties from Entity object * @ param entity * @ param m * @ param node */ private void populateNodeProperties ( Object entity , EntityMetadata m , Node node ) { } }
MetamodelImpl metaModel = ( MetamodelImpl ) kunderaMetadata . getApplicationMetadata ( ) . getMetamodel ( m . getPersistenceUnit ( ) ) ; EntityType entityType = metaModel . entity ( m . getEntityClazz ( ) ) ; // Iterate over entity attributes Set < Attribute > attributes = entityType . getSingularAttributes ( ) ; for ( Attribute attribute : attributes ) { Field field = ( Field ) attribute . getJavaMember ( ) ; // Set Node level properties if ( ! attribute . isCollection ( ) && ! attribute . isAssociation ( ) && ! ( ( SingularAttribute ) attribute ) . isId ( ) ) { String columnName = ( ( AbstractAttribute ) attribute ) . getJPAColumnName ( ) ; Object value = PropertyAccessorHelper . getObject ( entity , field ) ; if ( value != null ) { node . setProperty ( columnName , toNeo4JProperty ( value ) ) ; } } }
public class ProductsBoxGenerator { /** * { @ inheritDoc } */ @ Override public IRenderingElement generate ( IReaction reaction , RendererModel model ) { } }
if ( ! model . getParameter ( ShowReactionBoxes . class ) . getValue ( ) ) return null ; if ( reaction . getProductCount ( ) == 0 ) return new ElementGroup ( ) ; double distance = model . getParameter ( BondLength . class ) . getValue ( ) / model . getParameter ( Scale . class ) . getValue ( ) / 2 ; Rectangle2D totalBounds = null ; for ( IAtomContainer molecule : reaction . getProducts ( ) . atomContainers ( ) ) { Rectangle2D bounds = BoundsCalculator . calculateBounds ( molecule ) ; if ( totalBounds == null ) { totalBounds = bounds ; } else { totalBounds = totalBounds . createUnion ( bounds ) ; } } if ( totalBounds == null ) return null ; ElementGroup diagram = new ElementGroup ( ) ; Color foregroundColor = model . getParameter ( BasicSceneGenerator . ForegroundColor . class ) . getValue ( ) ; diagram . add ( new RectangleElement ( totalBounds . getMinX ( ) - distance , totalBounds . getMinY ( ) - distance , totalBounds . getMaxX ( ) + distance , totalBounds . getMaxY ( ) + distance , foregroundColor ) ) ; diagram . add ( new TextElement ( ( totalBounds . getMinX ( ) + totalBounds . getMaxX ( ) ) / 2 , totalBounds . getMinY ( ) - distance , "Products" , foregroundColor ) ) ; return diagram ;
public class EditText { /** * Called by the framework in response to a text completion from * the current input method , provided by it calling * { @ link InputConnection # commitCompletion * InputConnection . commitCompletion ( ) } . The default implementation does * nothing ; text views that are supporting auto - completion should override * this to do their desired behavior . * @ param text The auto complete text the user has selected . */ public void onCommitCompletion ( CompletionInfo text ) { } }
if ( mAutoCompleteMode == AUTOCOMPLETE_MODE_NONE ) ( ( InternalEditText ) mInputView ) . superOnCommitCompletion ( text ) ; else if ( mAutoCompleteMode == AUTOCOMPLETE_MODE_SINGLE ) ( ( InternalAutoCompleteTextView ) mInputView ) . superOnCommitCompletion ( text ) ; else ( ( InternalMultiAutoCompleteTextView ) mInputView ) . superOnCommitCompletion ( text ) ;
public class ClientObject { /** * Requests that the specified entry be updated in the * < code > receivers < / code > set . The set will not change until the event is * actually propagated through the system . */ @ Generated ( value = { } }
"com.threerings.presents.tools.GenDObjectTask" } ) public void updateReceivers ( InvocationReceiver . Registration elem ) { requestEntryUpdate ( RECEIVERS , receivers , elem ) ;
public class OracleAnnotationFilter { /** * / * ( non - Javadoc ) * @ see org . archive . wayback . util . ObjectFilter # filterObject ( java . lang . Object ) */ public int filterObject ( CaptureSearchResult o ) { } }
if ( client != null ) { String url = o . getOriginalUrl ( ) ; Date capDate = o . getCaptureDate ( ) ; try { Rule r = client . getRule ( url , capDate , new Date ( ) , who ) ; if ( r != null ) { String publicComment = r . getPublicComment ( ) ; o . putCustom ( "ANOTATION" , publicComment ) ; } } catch ( RuleOracleUnavailableException e ) { e . printStackTrace ( ) ; // should not happen : we forcibly disable robots retrievals } } return FILTER_INCLUDE ;
public class ScorecardModel { public static ScorecardModel parse ( PMMLParser pmml ) { } }
HashMap < String , String > attrs = pmml . attrs ( ) ; pmml . expect ( '>' ) ; pmml . skipWS ( ) . expect ( '<' ) . pGeneric ( "MiningSchema" ) ; pmml . skipWS ( ) . expect ( '<' ) . pGeneric ( "Output" ) ; pmml . skipWS ( ) . expect ( '<' ) ; RuleTable [ ] rules = pCharacteristics ( pmml ) ; pmml . skipWS ( ) . expect ( "</Scorecard>" ) ; String is = attrs . get ( "initialScore" ) ; double initialScore = is == null ? 0 : PMMLParser . getNumber ( is ) ; return make ( attrs . get ( "modelName" ) , initialScore , rules ) ;
public class ExecutorThreadPool { /** * Get the number of idle threads * @ return The number ; - 1 if not supported */ public int getIdleThreads ( ) { } }
if ( executor instanceof ThreadPoolExecutor ) { final ThreadPoolExecutor tpe = ( ThreadPoolExecutor ) executor ; return tpe . getPoolSize ( ) - tpe . getActiveCount ( ) ; } return - 1 ;
public class CPInstanceUtil { /** * Returns the first cp instance in the ordered set where CPDefinitionId = & # 63 ; . * @ param CPDefinitionId the cp definition ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the first matching cp instance , or < code > null < / code > if a matching cp instance could not be found */ public static CPInstance fetchByCPDefinitionId_First ( long CPDefinitionId , OrderByComparator < CPInstance > orderByComparator ) { } }
return getPersistence ( ) . fetchByCPDefinitionId_First ( CPDefinitionId , orderByComparator ) ;
public class WordVectorSerializer { /** * This method saves specified SequenceVectors model to target file * @ param vectors SequenceVectors model * @ param factory SequenceElementFactory implementation for your objects * @ param file Target output file * @ param < T > */ public static < T extends SequenceElement > void writeSequenceVectors ( @ NonNull SequenceVectors < T > vectors , @ NonNull SequenceElementFactory < T > factory , @ NonNull File file ) throws IOException { } }
try ( FileOutputStream fos = new FileOutputStream ( file ) ) { writeSequenceVectors ( vectors , factory , fos ) ; }
public class ConcatVectorNamespace { /** * Recreates an in - memory concat vector object from a Proto serialization . * @ param m the concat vector proto * @ return an in - memory concat vector object */ public static ConcatVectorNamespace readFromProto ( ConcatVectorNamespaceProto . ConcatVectorNamespace m ) { } }
ConcatVectorNamespace namespace = new ConcatVectorNamespace ( ) ; for ( ConcatVectorNamespaceProto . ConcatVectorNamespace . FeatureToIndexComponent component : m . getFeatureToIndexList ( ) ) { namespace . featureToIndex . put ( component . getKey ( ) , component . getData ( ) ) ; } for ( ConcatVectorNamespaceProto . ConcatVectorNamespace . SparseFeatureIndex sparseFeature : m . getSparseFeatureIndexList ( ) ) { String key = sparseFeature . getKey ( ) ; ObjectIntMap < String > sparseMap = new ObjectIntHashMap < > ( ) ; IntObjectMap < String > reverseSparseMap = new IntObjectHashMap < > ( ) ; for ( ConcatVectorNamespaceProto . ConcatVectorNamespace . FeatureToIndexComponent component : sparseFeature . getFeatureToIndexList ( ) ) { sparseMap . put ( component . getKey ( ) , component . getData ( ) ) ; reverseSparseMap . put ( component . getData ( ) , component . getKey ( ) ) ; } namespace . sparseFeatureIndex . put ( key , sparseMap ) ; namespace . reverseSparseFeatureIndex . put ( key , reverseSparseMap ) ; } return namespace ;
public class TileCacheInformation { /** * Calculate the minx and miny coordinate of the tile that is the minx and miny tile . It is the starting * point of counting tiles to render . * < p > < / p > * This equates to the minX and minY of the GridCoverage as well . * @ param envelope the area that will be displayed . * @ param geoTileSize the size of each tile in world space . */ @ Nonnull public Coordinate getMinGeoCoordinate ( final ReferencedEnvelope envelope , final Coordinate geoTileSize ) { } }
final ReferencedEnvelope tileCacheBounds = getTileCacheBounds ( ) ; final double tileCacheMinX = tileCacheBounds . getMinX ( ) ; double minGeoX = envelope . getMinX ( ) ; double minGeoY = envelope . getMinY ( ) ; double tileMinGeoX = ( tileCacheMinX + ( Math . floor ( ( minGeoX - tileCacheMinX ) / geoTileSize . x ) * geoTileSize . x ) ) ; final double tileCacheMinY = tileCacheBounds . getMinY ( ) ; double tileMinGeoY = ( tileCacheMinY + ( Math . floor ( ( minGeoY - tileCacheMinY ) / geoTileSize . y ) * geoTileSize . y ) ) ; return new Coordinate ( tileMinGeoX , tileMinGeoY ) ;
public class Encryption { /** * Load the default encryption module . * < p > By default this is the SunJCE module . */ public static void loadDefaultEncryptionModule ( ) { } }
// Be sure that the cryptographical algorithms are loaded final Provider [ ] providers = Security . getProviders ( ) ; boolean found = false ; for ( final Provider provider : providers ) { if ( provider instanceof SunJCE ) { found = true ; break ; } } if ( ! found ) { Security . addProvider ( new SunJCE ( ) ) ; }
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcTextFontSelect ( ) { } }
if ( ifcTextFontSelectEClass == null ) { ifcTextFontSelectEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 976 ) ; } return ifcTextFontSelectEClass ;
public class XLogPDescriptor { /** * Gets the aromaticNitrogensCount attribute of the XLogPDescriptor object . * @ param ac Description of the Parameter * @ param atom Description of the Parameter * @ return The aromaticNitrogensCount value */ private int getAromaticNitrogensCount ( IAtomContainer ac , IAtom atom ) { } }
List < IAtom > neighbours = ac . getConnectedAtomsList ( atom ) ; int narocounter = 0 ; for ( IAtom neighbour : neighbours ) { if ( neighbour . getSymbol ( ) . equals ( "N" ) && ( Boolean ) neighbour . getProperty ( "IS_IN_AROMATIC_RING" ) ) { narocounter += 1 ; } } return narocounter ;
public class MathBindings { /** * Binding for { @ link java . lang . Math # incrementExact ( int ) } * @ param a the value to increment * @ return the result * @ throws ArithmeticException if the result overflows an int */ public static IntegerBinding incrementExact ( final ObservableIntegerValue a ) { } }
return createIntegerBinding ( ( ) -> Math . incrementExact ( a . get ( ) ) , a ) ;
public class Line { /** * Skips spaces . * @ return < code > false < / code > if end of line is reached */ public boolean skipSpaces ( ) { } }
while ( m_nPos < m_sValue . length ( ) && m_sValue . charAt ( m_nPos ) == ' ' ) m_nPos ++ ; return m_nPos < m_sValue . length ( ) ;
public class SingleKeywordTree { /** * Checks whether the character is related to the currently used node . If * the comparison fails the keyword tree will be reseted to its root node , * otherwise the related node will replace the current node . * @ param c * character * @ return TRUE if the current node contains a keyword FALSE otherwise */ public boolean check ( final char c ) { } }
current = current . get ( c ) ; if ( current == null ) { reset ( ) ; } return current . isKeyword ( ) ;
public class Tokenizer { /** * Method to read a string from the JSON string , converting escapes accordingly . * @ return The parsed JSON string with all escapes properly converyed . * @ throws IOException Thrown on unterminated strings , invalid characters , bad escapes , and so on . Basically , invalid JSON . */ private String readString ( ) throws IOException { } }
StringBuffer sb = new StringBuffer ( ) ; int delim = lastChar ; int l = lineNo ; int c = colNo ; readChar ( ) ; while ( ( - 1 != lastChar ) && ( delim != lastChar ) ) { StringBuffer digitBuffer ; if ( lastChar != '\\' ) { sb . append ( ( char ) lastChar ) ; readChar ( ) ; continue ; } readChar ( ) ; switch ( lastChar ) { case 'b' : readChar ( ) ; sb . append ( '\b' ) ; continue ; case 'f' : readChar ( ) ; sb . append ( '\f' ) ; continue ; case 'n' : readChar ( ) ; sb . append ( '\n' ) ; continue ; case 'r' : readChar ( ) ; sb . append ( '\r' ) ; continue ; case 't' : readChar ( ) ; sb . append ( '\t' ) ; continue ; case '\'' : readChar ( ) ; sb . append ( '\'' ) ; continue ; case '"' : readChar ( ) ; sb . append ( '"' ) ; continue ; case '\\' : readChar ( ) ; sb . append ( '\\' ) ; continue ; case '/' : readChar ( ) ; sb . append ( '/' ) ; continue ; // hex constant // unicode constant case 'x' : case 'u' : digitBuffer = new StringBuffer ( ) ; int toRead = 2 ; if ( lastChar == 'u' ) toRead = 4 ; for ( int i = 0 ; i < toRead ; i ++ ) { readChar ( ) ; if ( ! isHexDigit ( lastChar ) ) throw new IOException ( "non-hex digit " + onLineCol ( ) ) ; digitBuffer . append ( ( char ) lastChar ) ; } readChar ( ) ; try { int digitValue = Integer . parseInt ( digitBuffer . toString ( ) , 16 ) ; sb . append ( ( char ) digitValue ) ; } catch ( NumberFormatException e ) { throw new IOException ( "non-hex digit " + onLineCol ( ) ) ; } break ; // octal constant default : if ( ! isOctalDigit ( lastChar ) ) throw new IOException ( "non-hex digit " + onLineCol ( ) ) ; digitBuffer = new StringBuffer ( ) ; digitBuffer . append ( ( char ) lastChar ) ; for ( int i = 0 ; i < 2 ; i ++ ) { readChar ( ) ; if ( ! isOctalDigit ( lastChar ) ) break ; digitBuffer . append ( ( char ) lastChar ) ; } try { int digitValue = Integer . parseInt ( digitBuffer . toString ( ) , 8 ) ; sb . append ( ( char ) digitValue ) ; } catch ( NumberFormatException e ) { throw new IOException ( "non-hex digit " + onLineCol ( ) ) ; } } } if ( - 1 == lastChar ) { throw new IOException ( "String not terminated " + onLineCol ( l , c ) ) ; } readChar ( ) ; return sb . toString ( ) ;
public class DefaultUriMatcher { /** * Replace any specified POSIX character classes with the Java equivalent . * @ param input * @ return a Java regex */ private String replacePosixClasses ( String input ) { } }
return input . replace ( ":alnum:" , "\\p{Alnum}" ) . replace ( ":alpha:" , "\\p{L}" ) . replace ( ":ascii:" , "\\p{ASCII}" ) . replace ( ":digit:" , "\\p{Digit}" ) . replace ( ":xdigit:" , "\\p{XDigit}" ) ;
public class AipImageSearch { /** * 相似图检索 — 更新接口 * * * 更新图库中图片的摘要和分类信息 ( 具体变量为brief 、 tags ) * * * @ param url - 图片完整URL , URL长度不超过1024字节 , URL对应的图片base64编码后大小不超过4M , 最短边至少15px , 最长边最大4096px , 支持jpg / png / bmp格式 , 当image字段存在时url字段失效 * @ param options - 可选参数对象 , key : value都为string类型 * options - options列表 : * brief 更新的摘要信息 , 最长256B 。 样例 : { " name " : " 周杰伦 " , " id " : " 666 " } * tags 1 - 65535范围内的整数 , tag间以逗号分隔 , 最多2个tag 。 样例 : " 100,11 " ; 检索时可圈定分类维度进行检索 * @ return JSONObject */ public JSONObject similarUpdateUrl ( String url , HashMap < String , String > options ) { } }
AipRequest request = new AipRequest ( ) ; preOperation ( request ) ; request . addBody ( "url" , url ) ; if ( options != null ) { request . addBody ( options ) ; } request . setUri ( ImageSearchConsts . SIMILAR_UPDATE ) ; postOperation ( request ) ; return requestServer ( request ) ;
public class JSONConverter { /** * Encode a Throwable instance as JSON : * " throwable " : Base64, * " stackTrace " : String * @ param out The stream to write JSON to * @ param value The Throwable instance to encode . Can ' t be null . * @ throws IOException If an I / O error occurs * @ see # readThrowable ( InputStream ) */ public void writeThrowable ( OutputStream out , Throwable value ) throws IOException { } }
writeStartObject ( out ) ; writeSerializedField ( out , OM_THROWABLE , value ) ; StringWriter sw = new StringWriter ( ) ; value . printStackTrace ( new PrintWriter ( sw ) ) ; writeStringField ( out , OM_STACKTRACE , sw . toString ( ) ) ; writeEndObject ( out ) ;
public class XForLoopExpressionImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case XbasePackage . XFOR_LOOP_EXPRESSION__FOR_EXPRESSION : setForExpression ( ( XExpression ) newValue ) ; return ; case XbasePackage . XFOR_LOOP_EXPRESSION__EACH_EXPRESSION : setEachExpression ( ( XExpression ) newValue ) ; return ; case XbasePackage . XFOR_LOOP_EXPRESSION__DECLARED_PARAM : setDeclaredParam ( ( JvmFormalParameter ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ;
public class MathUtils { /** * Parses a duration defined as a string , giving a duration in days , hours , minutes and seconds into a number of * milliseconds equal to that duration . * @ param duration The duration definition string . * @ return The duration in millliseconds . */ public static long parseDuration ( CharSequence duration ) { } }
// Match the duration against the regular expression . Matcher matcher = DURATION_PATTERN . matcher ( duration ) ; // Check that the argument is of the right format accepted by this method . if ( ! matcher . matches ( ) ) { throw new IllegalArgumentException ( "The duration definition is not in the correct format." ) ; } // This accumulates the duration . long result = 0 ; int numGroups = matcher . groupCount ( ) ; // Extract the days . if ( numGroups >= 1 ) { String daysString = matcher . group ( 1 ) ; result += ( daysString == null ) ? 0 : ( Long . parseLong ( daysString . substring ( 0 , daysString . length ( ) - 1 ) ) * 24 * 60 * 60 * 1000 ) ; } // Extract the hours . if ( numGroups >= 2 ) { String hoursString = matcher . group ( 2 ) ; result += ( hoursString == null ) ? 0 : ( Long . parseLong ( hoursString . substring ( 0 , hoursString . length ( ) - 1 ) ) * 60 * 60 * 1000 ) ; } // Extract the minutes . if ( numGroups >= 3 ) { String minutesString = matcher . group ( 3 ) ; result += ( minutesString == null ) ? 0 : ( Long . parseLong ( minutesString . substring ( 0 , minutesString . length ( ) - 1 ) ) * 60 * 1000 ) ; } // Extract the seconds . if ( numGroups >= 4 ) { String secondsString = matcher . group ( 4 ) ; result += ( secondsString == null ) ? 0 : ( Long . parseLong ( secondsString . substring ( 0 , secondsString . length ( ) - 1 ) ) * 1000 ) ; } return result ;
public class CacheableWorkspaceDataManager { /** * { @ inheritDoc } */ @ Override public List < NodeData > getChildNodesData ( NodeData nodeData ) throws RepositoryException { } }
return getChildNodesData ( nodeData , false ) ;
public class CompiledFEELSemanticMappings { /** * FEEL spec Table 45 * Delegates to { @ link InfixOpNode } except evaluationcontext */ public static Object div ( Object left , Object right ) { } }
return InfixOpNode . div ( left , right , null ) ;
public class GradleBuildMetricsCollector { /** * I have separated buildFinished from GradleCollector ' s BuildAdapter because we need it to be called * * after * all BuildListeners have completed their BuildFinished cycle . This is because InfoBrokerPlugin * only allows access to its reports after the BuildFinish cycle has completed . */ public void buildFinishedClosure ( BuildResult buildResult ) { } }
Throwable failure = buildResult . getFailure ( ) ; Result result = failure == null ? Result . success ( ) : Result . failure ( failure ) ; logger . info ( "Build finished with result " + result ) ; MetricsDispatcher dispatcher = dispatcherSupplier . get ( ) ; dispatcher . result ( result ) ; InfoBrokerPlugin infoBrokerPlugin = getNebulaInfoBrokerPlugin ( buildResult . getGradle ( ) . getRootProject ( ) ) ; if ( infoBrokerPlugin != null ) { Map < String , Object > reports = infoBrokerPlugin . buildReports ( ) ; for ( Map . Entry < String , Object > report : reports . entrySet ( ) ) { dispatcher . report ( report . getKey ( ) , report . getValue ( ) ) ; } } buildResultComplete . getAndSet ( true ) ; shutdownIfComplete ( ) ;
public class Client { /** * Get a batch of Roles . * @ param queryParameters Query parameters of the Resource * @ param batchSize Size of the Batch * @ param afterCursor Reference to continue collecting items of next page * @ return OneLoginResponse of Role ( Batch ) * @ throws OAuthSystemException - if there is a IOException reading parameters of the httpURLConnection * @ throws OAuthProblemException - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabled * @ throws URISyntaxException - if there is an error when generating the target URL at the URIBuilder constructor * @ see com . onelogin . sdk . model . Role * @ see < a target = " _ blank " href = " https : / / developers . onelogin . com / api - docs / 1 / roles / get - roles " > Get Roles documentation < / a > */ public OneLoginResponse < Role > getRolesBatch ( HashMap < String , String > queryParameters , int batchSize , String afterCursor ) throws OAuthSystemException , OAuthProblemException , URISyntaxException { } }
ExtractionContext context = extractResourceBatch ( queryParameters , batchSize , afterCursor , Constants . GET_ROLES_URL ) ; List < Role > roles = new ArrayList < Role > ( batchSize ) ; afterCursor = getRolesBatch ( roles , context . url , context . bearerRequest , context . oAuthResponse ) ; return new OneLoginResponse < Role > ( roles , afterCursor ) ;
public class PackagesReportHeading { /** * Add all the screen listeners . */ public void addListeners ( ) { } }
super . addListeners ( ) ; this . getScreenRecord ( ) . getField ( PackagesReportScreenRecord . JNLP_FILE_ID ) . addListener ( new ReadSecondaryHandler ( this . getRecord ( JnlpFile . JNLP_FILE_FILE ) ) ) ;
public class CmsSiteManager { /** * Returns the fav icon path for the given site . < p > * @ param siteRoot the site root * @ return the icon path */ public Resource getFavIcon ( String siteRoot ) { } }
CmsResource iconResource = null ; try { iconResource = getRootCmsObject ( ) . readResource ( siteRoot + "/" + CmsSiteManager . FAVICON ) ; } catch ( CmsException e ) { // no favicon there } if ( iconResource != null ) { return new ExternalResource ( OpenCms . getLinkManager ( ) . getPermalink ( getRootCmsObject ( ) , iconResource . getRootPath ( ) ) ) ; } return new CmsCssIcon ( OpenCmsTheme . ICON_SITE ) ;
public class BinaryOWLMetadata { /** * Gets the string value of an attribute . * @ param name The name of the attribute . Not null . * @ param defaultValue The default value for the attribute . May be null . This value will be returned if this * metadata object does not contain a string value for the specified attribute name . * @ return Either the string value of the attribute with the specified name , or the value specified by the defaultValue * object if this metadata object does not contain a string value for the specified attribute name . * @ throws NullPointerException if name is null . */ public String getStringAttribute ( String name , String defaultValue ) { } }
return getValue ( stringAttributes , name , defaultValue ) ;
public class MetricRegistry { /** * This will be removed in 0.22. * @ deprecated since 0.20 , use { @ link # addLongGauge ( String , MetricOptions ) } . * @ since 0.17 */ @ Deprecated public LongGauge addLongGauge ( String name , String description , String unit , List < LabelKey > labelKeys ) { } }
return addLongGauge ( name , MetricOptions . builder ( ) . setDescription ( description ) . setUnit ( unit ) . setLabelKeys ( labelKeys ) . build ( ) ) ;