signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class CmsCoreProvider { /** * Returns the absolute link to the given root path . < p >
* @ param rootPath the root path
* @ param callback the callback to execute */
public void substituteLinkForRootPath ( final String rootPath , final I_CmsSimpleCallback < String > callback ) { } } | CmsRpcAction < String > action = new CmsRpcAction < String > ( ) { @ Override public void execute ( ) { getVfsService ( ) . substituteLinkForRootPath ( getSiteRoot ( ) , rootPath , this ) ; } @ Override protected void onResponse ( String result ) { callback . execute ( result ) ; } } ; action . execute ( ) ; |
public class DWR3BeanGenerator { /** * Get all interfaces in one script
* @ param context
* The GeneratorContext
* @ return All interfaces scripts as a single string
* @ throws IOException */
private String getAllPublishedInterfaces ( final GeneratorContext context ) throws IOException { } } | StringBuilder sb = new StringBuilder ( ) ; Container container = getContainer ( context ) ; // The creatormanager holds the list of beans
CreatorManager ctManager = ( CreatorManager ) container . getBean ( CreatorManager . class . getName ( ) ) ; if ( null != ctManager ) { Collection < String > creators ; if ( ctManage... |
public class CacheHeader { /** * Compares the " If - Modified - Since header " of the incoming request with the last modification date of an aggregated
* resource . If the resource was not modified since the client retrieved the resource , a 304 - redirect is send to the
* response ( and the method returns true ) .... | boolean isAuthor = WCMMode . fromRequest ( request ) != WCMMode . DISABLED ; return isNotModified ( dateProvider , request , response , isAuthor ) ; |
public class TreeGraphNode { /** * Return a set of node - node dependencies , represented as Dependency
* objects , for the Tree .
* @ param hf The HeadFinder to use to identify the head of constituents .
* If this is < code > null < / code > , then nodes are assumed to already
* be marked with their heads .
... | Set < Dependency < Label , Label , Object > > deps = Generics . newHashSet ( ) ; for ( Tree t : this ) { TreeGraphNode node = safeCast ( t ) ; if ( node == null || node . isLeaf ( ) || node . children ( ) . length < 2 ) { continue ; } TreeGraphNode headWordNode ; if ( hf != null ) { headWordNode = safeCast ( node . hea... |
public class DefaultExchangeRate { /** * Internal method to set the rate chain , which also ensure that the chain
* passed , when not null , contains valid elements .
* @ param chain the chain to set . */
private void setExchangeRateChain ( List < ExchangeRate > chain ) { } } | this . chain . clear ( ) ; if ( chain == null || chain . isEmpty ( ) ) { this . chain . add ( this ) ; } else { for ( ExchangeRate rate : chain ) { if ( rate == null ) { throw new IllegalArgumentException ( "Rate Chain element can not be null." ) ; } } this . chain . addAll ( chain ) ; } |
public class NavigationDrawerFragment { /** * Users of this fragment must call this method to set up the navigation drawer interactions .
* @ param fragmentId The android : id of this fragment in its activity ' s layout .
* @ param drawerLayout The DrawerLayout containing this fragment ' s UI . */
public void setUp... | mFragmentContainerView = getActivity ( ) . findViewById ( fragmentId ) ; mDrawerLayout = drawerLayout ; mActionBarToolbar = ( Toolbar ) getActivity ( ) . findViewById ( R . id . toolbar ) ; // set a custom shadow that overlays the main content when the drawer opens
mDrawerLayout . setDrawerShadow ( R . drawable . drawe... |
public class DwgEllipse { /** * Read a Ellipse in the DWG format Version 15
* @ param data Array of unsigned bytes obtained from the DWG binary file
* @ param offset The current bit offset where the value begins
* @ throws Exception If an unexpected bit value is found in the DWG file . Occurs
* when we are look... | int bitPos = offset ; bitPos = readObjectHeaderV15 ( data , bitPos ) ; Vector v = DwgUtil . getBitDouble ( data , bitPos ) ; bitPos = ( ( Integer ) v . get ( 0 ) ) . intValue ( ) ; double x = ( ( Double ) v . get ( 1 ) ) . doubleValue ( ) ; v = DwgUtil . getBitDouble ( data , bitPos ) ; bitPos = ( ( Integer ) v . get (... |
public class NotifySettings { /** * Set type of Notify ( CSS style class name ) . Default is INFO .
* @ param type one of INFO , WARNING , DANGER , SUCCESS
* @ see NotifyType */
public final void setType ( final NotifyType type ) { } } | setType ( ( type != null ) ? type . getCssName ( ) : NotifyType . INFO . getCssName ( ) ) ; |
public class StartServersHandler { /** * { @ inheritDoc } */
@ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } } | if ( ! context . isBooting ( ) ) { throw new OperationFailedException ( HostControllerLogger . ROOT_LOGGER . invocationNotAllowedAfterBoot ( operation . require ( OP ) ) ) ; } if ( context . getRunningMode ( ) == RunningMode . ADMIN_ONLY ) { throw new OperationFailedException ( HostControllerLogger . ROOT_LOGGER . cann... |
public class JMMap { /** * Put get new v .
* @ param < V > the type parameter
* @ param < K > the type parameter
* @ param map the map
* @ param key the key
* @ param newValue the new value
* @ return the v */
public static < V , K > V putGetNew ( Map < K , V > map , K key , V newValue ) { } } | synchronized ( map ) { map . put ( key , newValue ) ; return newValue ; } |
public class AskServlet { /** * Processes requests for both HTTP < code > GET < / code > and < code > POST < / code >
* methods .
* @ param request servlet request
* @ param response servlet response
* @ throws ServletException if a servlet - specific error occurs
* @ throws IOException if an I / O error occu... | response . setContentType ( "application/json;charset=UTF-8" ) ; response . setCharacterEncoding ( "UTF-8" ) ; request . setCharacterEncoding ( "UTF-8" ) ; String questionStr = request . getParameter ( "q" ) ; String n = request . getParameter ( "n" ) ; int topN = - 1 ; if ( n != null && StringUtils . isNumeric ( n ) )... |
public class InjectInjectionObjectFactory { /** * / * support method . . . Purely for debug purposes */
@ Trivial private static final void debugInjectionObjects ( Object [ ] injectionObjects ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { if ( injectionObjects . length == 0 ) { Tr . debug ( tc , " []" ) ; return ; } StringBuilder buffer = new StringBuilder ( injectionObjects . length * 16 ) ; buffer . append ( '[' ) ; for ( int i = 0 ; i < injectionObjects . length ; i ++ ) { i... |
public class VoiceApi { /** * Cancel call forwarding
* Cancel call forwarding for the current agent .
* @ param cancelForwardBody Request parameters . ( optional )
* @ return ApiResponse & lt ; ApiSuccessResponse & gt ;
* @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize... | com . squareup . okhttp . Call call = cancelForwardValidateBeforeCall ( cancelForwardBody , null , null ) ; Type localVarReturnType = new TypeToken < ApiSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ; |
public class FullDTDReader { /** * Method that handles rest of external entity declaration , after
* it ' s been figured out entity is not internal ( does not continue
* with a quote ) .
* @ param inputSource Input source for the start of the declaration .
* Needed for resolving relative system references , if ... | boolean isPublic = checkPublicSystemKeyword ( c ) ; String pubId = null ; // Ok , now we can parse the reference ; first public id if needed :
if ( isPublic ) { c = skipObligatoryDtdWs ( ) ; if ( c != '"' && c != '\'' ) { throwDTDUnexpectedChar ( c , "; expected a quote to start the public identifier" ) ; } pubId = par... |
public class RoaringArray { /** * Create a ContainerPointer for this RoaringArray
* @ param startIndex starting index in the container list
* @ return a ContainerPointer */
public ContainerPointer getContainerPointer ( final int startIndex ) { } } | return new ContainerPointer ( ) { int k = startIndex ; @ Override public void advance ( ) { ++ k ; } @ Override public ContainerPointer clone ( ) { try { return ( ContainerPointer ) super . clone ( ) ; } catch ( CloneNotSupportedException e ) { return null ; // will not happen
} } @ Override public int compareTo ( Cont... |
public class ConnectorServiceImpl { /** * Declarative Services method for unsetting the AuthDataService reference .
* @ param ref reference to the service */
protected void unsetAuthDataService ( ServiceReference < AuthDataService > ref ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "unsetAuthDataService" , ref ) ; authDataServiceRef . unsetReference ( ref ) ; |
public class HtmlOutputLink { /** * < p > Set the value of the < code > fragment < / code > property . < / p > */
public void setFragment ( java . lang . String fragment ) { } } | getStateHelper ( ) . put ( PropertyKeys . fragment , fragment ) ; |
public class Beta { /** * Continued fraction expansion # 1 for incomplete beta integral .
* @ param a Value .
* @ param b Value .
* @ param x Value .
* @ return Result . */
public static double Incbcf ( double a , double b , double x ) { } } | double xk , pk , pkm1 , pkm2 , qk , qkm1 , qkm2 ; double k1 , k2 , k3 , k4 , k5 , k6 , k7 , k8 ; double r , t , ans , thresh ; int n ; double big = 4.503599627370496e15 ; double biginv = 2.22044604925031308085e-16 ; k1 = a ; k2 = a + b ; k3 = a ; k4 = a + 1.0 ; k5 = 1.0 ; k6 = b - 1.0 ; k7 = k4 ; k8 = a + 2.0 ; pkm2 = ... |
public class MapView { /** * sets the value of the mapType property in the OL map . */
private void setMapTypeInMap ( ) { } } | if ( getInitialized ( ) ) { final String mapTypeName = getMapType ( ) . toString ( ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "setting map type in OpenLayers map: {}" , mapTypeName ) ; } bingMapsApiKey . ifPresent ( apiKey -> jsMapView . call ( "setBingMapsApiKey" , apiKey ) ) ; wmsParam . ifPresent ( wm... |
public class PDTWebDateHelper { /** * Parses a Date out of a String with a date in RFC822 format . < br >
* It parsers the following formats :
* < ul >
* < li > " EEE , dd MMM uuuu HH : mm : ss z " < / li >
* < li > " EEE , dd MMM uuuu HH : mm z " < / li >
* < li > " EEE , dd MMM uu HH : mm : ss z " < / li > ... | if ( StringHelper . hasNoText ( sDate ) ) return null ; final WithZoneId aPair = extractDateTimeZone ( sDate . trim ( ) ) ; return parseZonedDateTimeUsingMask ( RFC822_MASKS , aPair . getString ( ) , aPair . getZoneId ( ) ) ; |
public class FeatureUtilities { /** * Convert a csv file to a FeatureCollection .
* < b > This for now supports only point geometries < / b > . < br >
* For different crs it also performs coor transformation .
* < b > NOTE : this doesn ' t support date attributes < / b >
* @ param csvFile the csv file .
* @ p... | GeometryFactory gf = new GeometryFactory ( ) ; Map < String , Class < ? > > typesMap = JGrassConstants . CSVTYPESCLASSESMAP ; String [ ] typesArray = JGrassConstants . CSVTYPESARRAY ; if ( separator == null ) { separator = "," ; } SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder ( ) ; b . setName ( "csvimport"... |
public class SolrTemplate { /** * ( non - Javadoc )
* @ see org . springframework . data . solr . core . SolrOperations # convertBeanToSolrInputDocument ( java . lang . Object ) */
@ Override public SolrInputDocument convertBeanToSolrInputDocument ( Object bean ) { } } | if ( bean instanceof SolrInputDocument ) { return ( SolrInputDocument ) bean ; } SolrInputDocument document = new SolrInputDocument ( ) ; getConverter ( ) . write ( bean , document ) ; return document ; |
public class GeoPackageCoreImpl { /** * { @ inheritDoc } */
@ Override public TileMatrixSet createTileTableWithMetadata ( ContentsDataType dataType , String tableName , BoundingBox contentsBoundingBox , long contentsSrsId , BoundingBox tileMatrixSetBoundingBox , long tileMatrixSetSrsId ) { } } | TileMatrixSet tileMatrixSet = null ; // Get the SRS
SpatialReferenceSystem contentsSrs = getSrs ( contentsSrsId ) ; SpatialReferenceSystem tileMatrixSetSrs = getSrs ( tileMatrixSetSrsId ) ; // Create the Tile Matrix Set and Tile Matrix tables
createTileMatrixSetTable ( ) ; createTileMatrixTable ( ) ; // Create the user... |
public class HttpClient { /** * Perform a post against the WSAPI
* @ param url the request url
* @ param body the body of the post
* @ return the JSON encoded string response
* @ throws IOException if a non - 200 response code is returned or if some other
* problem occurs while executing the request */
public... | HttpPost httpPost = new HttpPost ( getWsapiUrl ( ) + url ) ; httpPost . setEntity ( new StringEntity ( body , "utf-8" ) ) ; return doRequest ( httpPost ) ; |
public class PackageIndexWriter { /** * Adds the overview comment as provided in the file specified by the
* " - overview " option on the command line .
* @ param htmltree the documentation tree to which the overview comment will
* be added */
protected void addOverviewComment ( Content htmltree ) { } } | if ( ! utils . getFullBody ( configuration . overviewElement ) . isEmpty ( ) ) { addInlineComment ( configuration . overviewElement , htmltree ) ; } |
public class RoleGraphEditingPlugin { /** * If startVertex is non - null , and the mouse is released over an
* existing vertex , create an undirected edge from startVertex to
* the vertex under the mouse pointer . If shift was also pressed ,
* create a directed edge instead . */
@ SuppressWarnings ( "unchecked" )... | if ( checkModifiers ( e ) ) { final VisualizationViewer < String , String > vv = ( VisualizationViewer < String , String > ) e . getSource ( ) ; final Point2D p = e . getPoint ( ) ; Layout < String , String > layout = vv . getModel ( ) . getGraphLayout ( ) ; GraphElementAccessor < String , String > pickSupport = vv . g... |
public class ShadowClassLoader { /** * Defines the package for this class by trying to load the manifest for the package and if that fails just sets all of the package properties to < code > null < / code > .
* @ param classBytesResourceInformation
* @ param packageName */
@ FFDCIgnore ( IllegalArgumentException . ... | /* * We don ' t extend URL classloader so we automatically pass the manifest from the JAR to our supertype , still try to get hold of it though so that we can see if
* we can load the information ourselves from it */
Manifest manifest = classBytesResourceInformation . getManifest ( ) ; try { if ( manifest == null ) {... |
public class FloatingIOWriter { /** * count number of bits from high - order 1 bit to low - order 1 bit ,
* inclusive . */
private static int countBits ( long v ) { } } | // the strategy is to shift until we get a non - zero sign bit
// then shift until we have no bits left , counting the difference .
// we do byte shifting as a hack . Hope it helps .
if ( v == 0L ) return 0 ; while ( ( v & highbyte ) == 0L ) { v <<= 8 ; } while ( v > 0L ) { // i . e . while ( ( v & highbit ) = = 0L )
v... |
public class Kernel { /** * Determine the total execution time of all previous Kernel . execute ( range ) calls for all threads
* that ran this kernel for the device used in the last kernel execution .
* < br / >
* < b > Note1 : < / b > This is kept for backwards compatibility only , usage of
* { @ link # getAc... | KernelProfile profile = KernelManager . instance ( ) . getProfile ( getClass ( ) ) ; synchronized ( profile ) { return profile . getAccumulatedTotalTime ( ) ; } |
public class JmsJcaManagedConnectionFactoryImpl { /** * Returns an object containing the username and password with which to
* connect . In order of precedence :
* < ol >
* < li > If passed a < code > Subject < / code > and it contains a
* < code > PasswordCredential < / code > for this managed connection facto... | if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "getUserDetails" , new Object [ ] { JmsJcaManagedConnection . subjectToString ( subject ) , requestInfo } ) ; } JmsJcaUserDetails result = null ; if ( subject == null ) { // We don ' t have a subject ( case 3 ... |
public class NtpClient { /** * returns the offest from the ntp server to local system
* @ return
* @ throws IOException */
public long getOffset ( ) throws IOException { } } | // / Send request
DatagramSocket socket = null ; try { socket = new DatagramSocket ( ) ; socket . setSoTimeout ( 20000 ) ; InetAddress address = InetAddress . getByName ( serverName ) ; byte [ ] buf = new NtpMessage ( ) . toByteArray ( ) ; DatagramPacket packet = new DatagramPacket ( buf , buf . length , address , 123 ... |
public class JdiDefaultExecutionControl { /** * Interrupts a running remote invoke by manipulating remote variables
* and sending a stop via JDI .
* @ throws EngineTerminationException the execution engine has terminated
* @ throws InternalException an internal problem occurred */
@ Override public void stop ( ) ... | synchronized ( STOP_LOCK ) { if ( ! userCodeRunning ) { return ; } vm ( ) . suspend ( ) ; try { OUTER : for ( ThreadReference thread : vm ( ) . allThreads ( ) ) { // could also tag the thread ( e . g . using name ) , to find it easier
for ( StackFrame frame : thread . frames ( ) ) { if ( remoteAgent . equals ( frame . ... |
public class Configs { /** * Add a config to a Yaml configuration map .
* @ param content the Yaml configuration map .
* @ param config the configuration .
* @ param injector the injector to be used for creating the configuration objects . */
@ SuppressWarnings ( "checkstyle:npathcomplexity" ) public static void ... | assert content != null ; assert config != null ; final Class < ? > type = ( Class < ? > ) config . getType ( ) ; final String sectionName = config . getName ( ) ; final Pattern setPattern = Pattern . compile ( "^set([A-Z])([a-zA-Z0-9]+)$" ) ; // $ NON - NLS - 1 $
Object theConfig = null ; for ( final Method setterMetho... |
public class AbstractDataflowAnalysis { /** * Get the dataflow fact representing the point just after given Location .
* Note " after " is meant in the logical sense , so for backward analyses ,
* after means before the location in the control flow sense .
* @ param location
* the location
* @ return the fact... | BasicBlock basicBlock = location . getBasicBlock ( ) ; InstructionHandle handle = location . getHandle ( ) ; if ( handle == ( isForwards ( ) ? basicBlock . getLastInstruction ( ) : basicBlock . getFirstInstruction ( ) ) ) { return getResultFact ( basicBlock ) ; } else { return getFactAtLocation ( new Location ( isForwa... |
public class CachedFwAssistantDirector { public FwAssistDirection assistAssistDirection ( ) { } } | if ( assistDirection != null ) { return assistDirection ; } synchronized ( this ) { if ( assistDirection != null ) { return assistDirection ; } final FwAssistDirection direction = createAssistDirection ( ) ; prepareAssistDirection ( direction ) ; assistDirection = direction ; } return assistDirection ; |
public class QueryBasedExtractor { /** * Remove all upper bounds in the predicateList used for pulling data */
private void removeDataPullUpperBounds ( ) { } } | log . info ( "Removing data pull upper bound for last work unit" ) ; Iterator < Predicate > it = predicateList . iterator ( ) ; while ( it . hasNext ( ) ) { Predicate predicate = it . next ( ) ; if ( predicate . getType ( ) == Predicate . PredicateType . HWM ) { log . info ( "Remove predicate: " + predicate . condition... |
public class ProtoUtils { /** * Returns true if fieldDescriptor holds a map where the values are a sanitized proto type . */
public static boolean isSanitizedContentMap ( FieldDescriptor fieldDescriptor ) { } } | if ( ! fieldDescriptor . isMapField ( ) ) { return false ; } Descriptor valueDesc = getMapValueMessageType ( fieldDescriptor ) ; if ( valueDesc == null ) { return false ; } return SAFE_PROTO_TYPES . contains ( valueDesc . getFullName ( ) ) ; |
public class Utils { /** * The inverse operation of backQuoteChars ( ) .
* Converts back - quoted carriage returns and new lines in a string
* to the corresponding character ( ' \ r ' and ' \ n ' ) .
* Also " un " - back - quotes the following characters : ` " \ \ t and %
* @ param string the string
* @ retur... | int index ; StringBuffer newStringBuffer ; // replace each of the following characters with the backquoted version
String charsFind [ ] = { "\\\\" , "\\'" , "\\t" , "\\n" , "\\r" , "\\\"" , "\\%" , "\\u001E" } ; char charsReplace [ ] = { '\\' , '\'' , '\t' , '\n' , '\r' , '"' , '%' , '\u001E' } ; int pos [ ] = new int ... |
public class Quaterniond { /** * Apply a rotation to < code > this < / code > that rotates the < code > fromDir < / code > vector to point along < code > toDir < / code > .
* Since there can be multiple possible rotations , this method chooses the one with the shortest arc .
* If < code > Q < / code > is < code > t... | return rotateTo ( fromDirX , fromDirY , fromDirZ , toDirX , toDirY , toDirZ , this ) ; |
public class InternalXtextParser { /** * InternalXtext . g : 779:1 : ruleTerminalRuleCall : ( ( rule _ _ TerminalRuleCall _ _ RuleAssignment ) ) ; */
public final void ruleTerminalRuleCall ( ) throws RecognitionException { } } | int stackSize = keepStackSize ( ) ; try { // InternalXtext . g : 783:2 : ( ( ( rule _ _ TerminalRuleCall _ _ RuleAssignment ) ) )
// InternalXtext . g : 784:2 : ( ( rule _ _ TerminalRuleCall _ _ RuleAssignment ) )
{ // InternalXtext . g : 784:2 : ( ( rule _ _ TerminalRuleCall _ _ RuleAssignment ) )
// InternalXtext . g... |
public class Input { /** * Reads the 1-5 byte int part of a varint flag . The position is advanced so if the boolean part is needed it should be read
* first with { @ link # readVarIntFlag ( ) } . */
public int readVarIntFlag ( boolean optimizePositive ) { } } | if ( require ( 1 ) < 5 ) return readVarIntFlag_slow ( optimizePositive ) ; int b = buffer [ position ++ ] ; int result = b & 0x3F ; // Mask first 6 bits .
if ( ( b & 0x40 ) != 0 ) { // Bit 7 means another byte , bit 8 means UTF8.
byte [ ] buffer = this . buffer ; int p = position ; b = buffer [ p ++ ] ; result |= ( b &... |
public class MyFiles { /** * 删除文件
* @ param filename */
public static void delete ( String filename ) { } } | File file = new File ( filename ) ; if ( file . exists ( ) ) { file . delete ( ) ; } |
public class DemoActivity { /** * ISimpleDialogListener */
@ Override public void onPositiveButtonClicked ( int requestCode ) { } } | if ( requestCode == REQUEST_SIMPLE_DIALOG ) { Toast . makeText ( c , "Positive button clicked" , Toast . LENGTH_SHORT ) . show ( ) ; } |
public class SerializationUtils { /** * Deserialize a { @ link JsonNode } , with custom class loader .
* @ param json
* @ param clazz
* @ return
* @ since 0.6.2 */
public static < T > T fromJson ( JsonNode json , Class < T > clazz , ClassLoader classLoader ) { } } | if ( json == null ) { return null ; } ClassLoader oldClassLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ; if ( classLoader != null ) { Thread . currentThread ( ) . setContextClassLoader ( classLoader ) ; } try { ObjectMapper mapper = poolMapper . borrowObject ( ) ; if ( mapper != null ) { try { return... |
public class DTDNmTokenAttr { /** * Method called by the validator
* to let the attribute do necessary normalization and / or validation
* for the value . */
@ Override public String validate ( DTDValidatorBase v , char [ ] cbuf , int start , int end , boolean normalize ) throws XMLStreamException { } } | int origLen = end - start ; // Let ' s trim leading white space first . . .
while ( start < end && WstxInputData . isSpaceChar ( cbuf [ start ] ) ) { ++ start ; } // Empty value ?
if ( start >= end ) { return reportValidationProblem ( v , "Empty NMTOKEN value" ) ; } -- end ; // so that it now points to the last char
wh... |
public class ActivityChooserModel { /** * Adds a historical record .
* @ param historicalRecord The record to add .
* @ return True if the record was added . */
private boolean addHisoricalRecord ( HistoricalRecord historicalRecord ) { } } | final boolean added = mHistoricalRecords . add ( historicalRecord ) ; if ( added ) { mHistoricalRecordsChanged = true ; pruneExcessiveHistoricalRecordsIfNeeded ( ) ; persistHistoricalDataIfNeeded ( ) ; sortActivitiesIfNeeded ( ) ; notifyChanged ( ) ; } return added ; |
public class LongTaskTimer { /** * Creates a timer for tracking long running tasks .
* @ param registry
* Registry to use .
* @ param id
* Identifier for the metric being registered .
* @ return
* Timer instance . */
public static LongTaskTimer get ( Registry registry , Id id ) { } } | ConcurrentMap < Id , Object > state = registry . state ( ) ; Object obj = Utils . computeIfAbsent ( state , id , i -> { LongTaskTimer timer = new LongTaskTimer ( registry , id ) ; PolledMeter . using ( registry ) . withId ( id ) . withTag ( Statistic . activeTasks ) . monitorValue ( timer , LongTaskTimer :: activeTasks... |
public class JAXBContextFactory { /** * Creates a new { @ link javax . xml . bind . Marshaller } that handles the supplied class . */
public Marshaller createMarshaller ( Class < ? > clazz ) throws JAXBException { } } | Marshaller marshaller = getContext ( clazz ) . createMarshaller ( ) ; setMarshallerProperties ( marshaller ) ; return marshaller ; |
public class ContainerDefinition { /** * The list of port mappings for the container . Port mappings allow containers to access ports on the host container
* instance to send or receive traffic .
* For task definitions that use the < code > awsvpc < / code > network mode , you should only specify the
* < code > c... | if ( portMappings == null ) { this . portMappings = null ; return ; } this . portMappings = new com . amazonaws . internal . SdkInternalList < PortMapping > ( portMappings ) ; |
public class DiscordianDate { /** * Obtains a { @ code DiscordianDate } representing a date in the Discordian calendar
* system from the proleptic - year , month - of - year and day - of - month fields .
* This returns a { @ code DiscordianDate } with the specified fields .
* The day must be valid for the year an... | return DiscordianDate . create ( prolepticYear , month , dayOfMonth ) ; |
public class HelpParser { /** * Output this screen using HTML . */
public void printHtmlTechInfo ( PrintWriter out , String strTag , String strParams , String strData ) { } } | if ( m_recDetail . getClassType ( ) . equalsIgnoreCase ( "Record" ) ) { m_recDetail . printHtmlTechInfo ( out , strTag , strParams , strData ) ; } |
public class AmazonEC2Client { /** * Purchase a reservation with configurations that match those of your Dedicated Host . You must have active
* Dedicated Hosts in your account before you purchase a reservation . This action results in the specified
* reservation being purchased and charged to your account .
* @ ... | request = beforeClientExecution ( request ) ; return executePurchaseHostReservation ( request ) ; |
public class NASAOtherProjectInformationV1_0Generator { /** * This method creates { @ link XmlObject } of type
* { @ link NASAOtherProjectInformationDocument } by populating data from the
* given { @ link ProposalDevelopmentDocumentContract }
* @ param proposalDevelopmentDocument
* for which the { @ link XmlObj... | this . pdDoc = proposalDevelopmentDocument ; answerHeaders = getPropDevQuestionAnswerService ( ) . getQuestionnaireAnswerHeaders ( pdDoc . getDevelopmentProposal ( ) . getProposalNumber ( ) ) ; return getNasaOtherProjectInformation ( ) ; |
public class OAuth2AuthorizationActivity { /** * Adds a callback on the web view to catch the redirect URL */
private void prepareWebView ( ) { } } | mWebView . getSettings ( ) . setJavaScriptEnabled ( true ) ; mWebView . setVisibility ( View . VISIBLE ) ; mWebView . setWebViewClient ( new WebViewClient ( ) { private boolean done = false ; @ Override public void onPageFinished ( WebView view , String url ) { // Catch the redirect url with the parameters added by the... |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link String } { @ code > } */
@ XmlElementDecl ( namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/" , name = "folderId" , scope = RemoveObjectFromFolder . class ) public JAXBElement < String > createRemoveOb... | return new JAXBElement < String > ( _CreateDocumentFolderId_QNAME , String . class , RemoveObjectFromFolder . class , value ) ; |
public class GeocoderUtilService { /** * Transform a { @ link Envelope } from the source to the target CRS .
* @ param source source geometry
* @ param sourceCrs source CRS
* @ param targetCrs target CRS
* @ return transformed source , now in target CRS
* @ throws GeomajasException building the transformation... | if ( sourceCrs == targetCrs ) { // NOPMD
// only works when the caching of the CRSs works
return source ; } CrsTransform crsTransform = geoService . getCrsTransform ( sourceCrs , targetCrs ) ; return geoService . transform ( source , crsTransform ) ; |
public class IterableExtensions { /** * Returns a set that contains all the unique entries of the given iterable in the order of their appearance . If the
* iterable is of type { @ link Set } , itself is returned . Therefore an unchecked cast is performed .
* In all other cases , the result set is a copy of the ite... | if ( iterable instanceof Set < ? > ) { Set < T > result = ( Set < T > ) iterable ; return result ; } return Sets . newLinkedHashSet ( iterable ) ; |
public class AdaptiveRandomNeighborhood { /** * Add random neighbors to all the neighborhoods */
private void addRandomNeighbors ( ) { } } | for ( int i = 0 ; i < solutionListSize ; i ++ ) { while ( neighbours . get ( i ) . size ( ) <= numberOfRandomNeighbours ) { int random = randomGenerator . getRandomValue ( 0 , solutionListSize - 1 ) ; neighbours . get ( i ) . add ( random ) ; } } |
public class A_CmsUsersList { /** * Adds an " activate " column . < p >
* @ param metadata the list metadata
* @ param enable the action for enabling
* @ param deactivate the action for disabling */
private void addActivateColumn ( CmsListMetadata metadata , CmsListDirectAction enable , CmsListDirectAction deacti... | // create column for activation / deactivation
CmsListColumnDefinition actCol = new CmsListColumnDefinition ( LIST_COLUMN_ACTIVATE ) ; actCol . setName ( Messages . get ( ) . container ( Messages . GUI_USERS_LIST_COLS_ACTIVATE_0 ) ) ; actCol . setHelpText ( Messages . get ( ) . container ( Messages . GUI_USERS_LIST_COL... |
public class JsonConfig { /** * Finds a JsonBeanProcessor registered to the target class . < br >
* Returns null if none is registered . < br >
* [ Java - & gt ; JSON ]
* @ param target a class used for searching a JsonBeanProcessor . */
public JsonBeanProcessor findJsonBeanProcessor ( Class target ) { } } | if ( ! beanProcessorMap . isEmpty ( ) ) { Object key = jsonBeanProcessorMatcher . getMatch ( target , beanProcessorMap . keySet ( ) ) ; return ( JsonBeanProcessor ) beanProcessorMap . get ( key ) ; } return null ; |
public class StepFactory { /** * Step that runs a Pig script on your job flow using the specified Pig version .
* @ param script
* The script to run .
* @ param pigVersion
* The Pig version to use .
* @ param scriptArgs
* Arguments that get passed to the script .
* @ return HadoopJarStepConfig that can be... | List < String > pigArgs = new ArrayList < String > ( ) ; pigArgs . add ( "--pig-versions" ) ; pigArgs . add ( pigVersion ) ; pigArgs . add ( "--run-pig-script" ) ; pigArgs . add ( "--args" ) ; pigArgs . add ( "-f" ) ; pigArgs . add ( script ) ; pigArgs . addAll ( Arrays . asList ( scriptArgs ) ) ; return newHivePigStep... |
public class NotesAddDialog { /** * This method initializes btnStop
* @ return javax . swing . JButton */
private JButton getBtnCancel ( ) { } } | if ( btnCancel == null ) { btnCancel = new JButton ( ) ; btnCancel . setText ( Constant . messages . getString ( "all.button.cancel" ) ) ; btnCancel . setMaximumSize ( new java . awt . Dimension ( 100 , 40 ) ) ; btnCancel . setMinimumSize ( new java . awt . Dimension ( 70 , 30 ) ) ; btnCancel . setPreferredSize ( new j... |
public class CmsOrganizationalUnit { /** * Returns the last name of the given fully qualified name . < p >
* @ param fqn the fully qualified name to get the last name from
* @ return the last name of the given fully qualified name */
public static final String getSimpleName ( String fqn ) { } } | String parentFqn = getParentFqn ( fqn ) ; if ( parentFqn != null ) { fqn = fqn . substring ( parentFqn . length ( ) ) ; } if ( ( fqn != null ) && fqn . startsWith ( CmsOrganizationalUnit . SEPARATOR ) ) { fqn = fqn . substring ( CmsOrganizationalUnit . SEPARATOR . length ( ) ) ; } return fqn ; |
public class Jronn { /** * Calculates the disordered regions of the sequence . More formally , the regions for which the
* probability of disorder is greater then 0.50.
* @ param sequence an instance of FastaSequence object , holding the name and the sequence .
* @ return the array of ranges if there are any resi... | float [ ] scores = getDisorderScores ( sequence ) ; return scoresToRanges ( scores , RonnConstraint . DEFAULT_RANGE_PROBABILITY_THRESHOLD ) ; |
public class MongoDbTicketRegistry { /** * Calculate the time at which the ticket is eligible for automated deletion by MongoDb .
* Makes the assumption that the CAS server date and the Mongo server date are in sync . */
private static Date getExpireAt ( final Ticket ticket ) { } } | val expirationPolicy = ticket . getExpirationPolicy ( ) ; val ttl = ticket instanceof TicketState ? expirationPolicy . getTimeToLive ( ( TicketState ) ticket ) : expirationPolicy . getTimeToLive ( ) ; if ( ttl < 1 ) { return null ; } return new Date ( System . currentTimeMillis ( ) + TimeUnit . SECONDS . toMillis ( ttl... |
public class DateMapper { /** * { @ inheritDoc } */
@ Override public Optional < Field > indexedField ( String name , Long value ) { } } | return Optional . of ( new LongField ( name , value , STORE ) ) ; |
public class ClassFile { /** * Add a method to this class . This method is handy for implementing
* methods defined by a pre - existing interface . */
public MethodInfo addMethod ( Method method ) { } } | Modifiers modifiers = Modifiers . getInstance ( method . getModifiers ( ) ) . toAbstract ( false ) ; MethodInfo mi = addMethod ( modifiers , method . getName ( ) , MethodDesc . forMethod ( method ) ) ; // exception stuff . . .
Class [ ] exceptions = method . getExceptionTypes ( ) ; for ( int i = 0 ; i < exceptions . le... |
public class PushNotificationManager { /** * Read and process any pending error - responses .
* If an error - response packet is received for a particular message , this
* method assumes that messages following the one identified in the packet
* were completely ignored by Apple , and as such automatically retries... | if ( useEnhancedNotificationFormat ) { logger . debug ( "Reading responses" ) ; int responsesReceived = ResponsePacketReader . processResponses ( this ) ; while ( responsesReceived > 0 ) { PushedNotification skippedNotification = null ; List < PushedNotification > notificationsToResend = new ArrayList < PushedNotificat... |
public class MisoUtil { /** * Convert the given screen - based pixel coordinates to their
* corresponding tile - based coordinates . Converted coordinates
* are placed in the given point object .
* @ param sx the screen x - position pixel coordinate .
* @ param sy the screen y - position pixel coordinate .
* ... | // determine the upper - left of the quadrant that contains our point
int zx = ( int ) Math . floor ( ( float ) sx / metrics . tilewid ) ; int zy = ( int ) Math . floor ( ( float ) sy / metrics . tilehei ) ; // these are the screen coordinates of the tile ' s top
int ox = ( zx * metrics . tilewid ) , oy = ( zy * metric... |
public class MenuScreen { /** * OpenMainFile Method .
* @ return The new main file . */
public Record openMainRecord ( ) { } } | Record record = Record . makeRecordFromClassName ( MenusModel . THICK_CLASS , this ) ; record . setOpenMode ( DBConstants . OPEN_READ_ONLY ) ; // This will optimize the cache when client is remote .
return record ; |
public class NonBlockingReader { /** * Returns a new callable for reading strings from a reader with a given timeout .
* @ param reader input stream to read from
* @ param timeout read timeout in milliseconds , very low numbers and 0 are accepted but might result in strange behavior
* @ param emptyPrint a printou... | return new Callable < String > ( ) { @ Override public String call ( ) throws IOException { String ret = "" ; while ( "" . equals ( ret ) ) { try { while ( ! reader . ready ( ) ) { Thread . sleep ( timeout ) ; } ret = reader . readLine ( ) ; if ( "" . equals ( ret ) && emptyPrint != null ) { System . out . print ( empt... |
public class CmsReplaceDialog { /** * Sets the file input . < p >
* @ param fileInput the file input */
protected void setFileInput ( CmsFileInput fileInput ) { } } | // only accept file inputs with a single selected file
if ( fileInput . getFiles ( ) . length == 1 ) { if ( m_okButton != null ) { m_okButton . enable ( ) ; } if ( m_fileInput != null ) { m_fileInput . removeFromParent ( ) ; } m_fileInput = fileInput ; RootPanel . get ( ) . add ( m_fileInput ) ; m_mainPanel . setContai... |
public class AtomPlacer3D { /** * Calculates the geometric center of all placed atoms in the atomcontainer .
* @ param molecule
* @ return Point3d the geometric center */
public Point3d geometricCenterAllPlacedAtoms ( IAtomContainer molecule ) { } } | IAtomContainer allPlacedAtoms = getAllPlacedAtoms ( molecule ) ; return GeometryUtil . get3DCenter ( allPlacedAtoms ) ; |
public class FoundationFileRollingAppender { /** * < b > Warning < / b > Use of this property requires Java 6.
* @ param value */
public void setMinFreeDiskSpace ( String value ) { } } | if ( value == null ) { LogLog . warn ( "Null min free disk space supplied for appender [" + this . getName ( ) + "], defaulting to " + this . getProperties ( ) . getMinFreeDiscSpace ( ) ) ; return ; } value = value . trim ( ) ; if ( "" . equals ( value ) ) { LogLog . warn ( "Empty min free disk space supplied for appen... |
public class UnbilledCharge { public static InvoiceUnbilledChargesRequest invoiceUnbilledCharges ( ) throws IOException { } } | String uri = uri ( "unbilled_charges" , "invoice_unbilled_charges" ) ; return new InvoiceUnbilledChargesRequest ( Method . POST , uri ) ; |
public class HystrixRollingNumber { /** * Force a reset of all rolling counters ( clear all buckets ) so that statistics start being gathered from scratch .
* This does NOT reset the CumulativeSum values . */
public void reset ( ) { } } | // if we are resetting , that means the lastBucket won ' t have a chance to be captured in CumulativeSum , so let ' s do it here
Bucket lastBucket = buckets . peekLast ( ) ; if ( lastBucket != null ) { cumulativeSum . addBucket ( lastBucket ) ; } // clear buckets so we start over again
buckets . clear ( ) ; |
public class ProxyTask { /** * Get application properties from proxy properties .
* @ return Just the application properties */
public Map < String , Object > getApplicationProperties ( Map < String , Object > properties ) { } } | if ( properties == null ) return null ; Map < String , Object > propApp = new Hashtable < String , Object > ( ) ; if ( properties . get ( DBParams . LANGUAGE ) != null ) propApp . put ( DBParams . LANGUAGE , properties . get ( DBParams . LANGUAGE ) ) ; if ( properties . get ( DBParams . DOMAIN ) != null ) propApp . put... |
public class ProvisioningArtifactParameterMarshaller { /** * Marshall the given parameter object . */
public void marshall ( ProvisioningArtifactParameter provisioningArtifactParameter , ProtocolMarshaller protocolMarshaller ) { } } | if ( provisioningArtifactParameter == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( provisioningArtifactParameter . getParameterKey ( ) , PARAMETERKEY_BINDING ) ; protocolMarshaller . marshall ( provisioningArtifactParameter . getDefaultVa... |
public class JppFactory { /** * Why support for invalid JSON data at JsonFactory ! ? It ' s crazy ! ! > : ( */
StubParser adhocSolutions ( String value ) { } } | if ( Boolean . toString ( true ) . equals ( value ) ) { return new StubParser ( this ) { @ Override public JsonToken nextToken ( ) { return JsonToken . VALUE_TRUE ; } @ Override public JsonToken getCurrentToken ( ) { return JsonToken . VALUE_TRUE ; } } ; } else if ( Boolean . toString ( false ) . equals ( value ) ) { r... |
public class BaseTransport { /** * Add this method param to the param list .
* @ param strParam The param name .
* @ param strValue The param value . */
public void addParam ( String strParam , Object obj ) { } } | String strValue = this . objectToString ( obj ) ; this . addParam ( strParam , strValue ) ; |
public class ToolArbitrateEvent { /** * 查询当前的remedy index记录 */
public List < RemedyIndexEventData > listRemedyIndexs ( Long pipelineId ) { } } | String path = StagePathUtils . getRemedyRoot ( pipelineId ) ; List < RemedyIndexEventData > datas = new ArrayList < RemedyIndexEventData > ( ) ; try { List < String > nodes = zookeeper . getChildren ( path ) ; for ( String node : nodes ) { RemedyIndexEventData data = RemedyIndexEventData . parseNodeName ( node ) ; data... |
public class TextBuffer { /** * Method used to determine size of the next segment to
* allocate to contain textual content . */
private int calcNewSize ( int latestSize ) { } } | // Let ' s grow segments by 50 % , when over 8k
int incr = ( latestSize < 8000 ) ? latestSize : ( latestSize >> 1 ) ; int size = latestSize + incr ; // but let ' s not create too big chunks
return Math . min ( size , MAX_SEGMENT_LENGTH ) ; |
public class CodeChunk { /** * { @ link # doFormatInitialStatements } and { @ link Expression # doFormatOutputExpr } are the main
* methods subclasses should override to control their formatting . Subclasses should only override
* this method in the special case that a code chunk needs to control its formatting whe... | FormattingContext initialStatements = new FormattingContext ( startingIndent ) ; initialStatements . appendInitialStatements ( this ) ; FormattingContext outputExprs = new FormattingContext ( startingIndent ) ; if ( this instanceof Expression ) { outputExprs . appendOutputExpression ( ( Expression ) this ) ; outputExpr... |
public class TypeVariableUtils { /** * The same as { @ link GenericsUtils # resolveTypeVariables ( Type [ ] , Map ) } , except it also process
* { @ link ExplicitTypeVariable } variables . Useful for special cases when variables tracking is used .
* For example , type resolved with variables as a template and then ... | return GenericsUtils . resolveTypeVariables ( types , generics , true ) ; |
public class XDSSourceAuditor { /** * Audits an ITI - 15 Provide And Register Document Set event for XDS . a Document Source actors .
* @ param eventOutcome The event outcome indicator
* @ param repositoryEndpointUri The endpoint of the repository in this transaction
* @ param submissionSetUniqueId The UniqueID o... | if ( ! isAuditorEnabled ( ) ) { return ; } auditProvideAndRegisterEvent ( new IHETransactionEventTypeCodes . ProvideAndRegisterDocumentSet ( ) , eventOutcome , repositoryEndpointUri , userName , submissionSetUniqueId , patientId , null , null ) ; |
public class PopupMenu { /** * Shows menu below ( or above if not enough space ) given actor .
* @ param stage stage instance that this menu is being added to
* @ param actor used to get calculate menu position in stage , menu will be displayed above or below it */
public void showMenu ( Stage stage , Actor actor )... | Vector2 pos = actor . localToStageCoordinates ( tmpVector . setZero ( ) ) ; float menuY ; if ( pos . y - getHeight ( ) <= 0 ) { menuY = pos . y + actor . getHeight ( ) + getHeight ( ) - sizes . borderSize ; } else { menuY = pos . y + sizes . borderSize ; } showMenu ( stage , pos . x , menuY ) ; |
public class AutoscalerClient { /** * Updates an autoscaler in the specified project using the data included in the request . This
* method supports PATCH semantics and uses the JSON merge patch format and processing rules .
* < p > Sample code :
* < pre > < code >
* try ( AutoscalerClient autoscalerClient = Au... | PatchAutoscalerHttpRequest request = PatchAutoscalerHttpRequest . newBuilder ( ) . setAutoscaler ( autoscaler ) . setZone ( zone == null ? null : zone . toString ( ) ) . setAutoscalerResource ( autoscalerResource ) . addAllFieldMask ( fieldMask ) . build ( ) ; return patchAutoscaler ( request ) ; |
public class DataConverters { /** * Convert this string to a Date .
* Runs sequentually through the following formats : DateTime , DateShortTime ,
* Date , DateShort , Time .
* @ param strString string to convert .
* @ return Date value .
* @ throws Exception NumberFormatException . */
public static Date stri... | Date objData ; Exception except = null ; initGlobals ( ) ; // Make sure you have the utilities
if ( ( strString == null ) || ( strString . equals ( Constant . BLANK ) ) ) return null ; for ( int i = 1 ; i <= 6 ; i ++ ) { DateFormat df = null ; switch ( i ) { case 1 : df = gDateTimeFormat ; break ; case 2 : df = gDateSh... |
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EClass getIfcDaylightSavingHour ( ) { } } | if ( ifcDaylightSavingHourEClass == null ) { ifcDaylightSavingHourEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 664 ) ; } return ifcDaylightSavingHourEClass ; |
public class authenticationcertpolicy_vpnvserver_binding { /** * Use this API to fetch authenticationcertpolicy _ vpnvserver _ binding resources of given name . */
public static authenticationcertpolicy_vpnvserver_binding [ ] get ( nitro_service service , String name ) throws Exception { } } | authenticationcertpolicy_vpnvserver_binding obj = new authenticationcertpolicy_vpnvserver_binding ( ) ; obj . set_name ( name ) ; authenticationcertpolicy_vpnvserver_binding response [ ] = ( authenticationcertpolicy_vpnvserver_binding [ ] ) obj . get_resources ( service ) ; return response ; |
public class JSONValue { /** * Check Json Syntax from input Reader
* @ return if the input is valid */
public static boolean isValidJson ( Reader in ) throws IOException { } } | try { new JSONParser ( DEFAULT_PERMISSIVE_MODE ) . parse ( in , FakeMapper . DEFAULT ) ; return true ; } catch ( ParseException e ) { return false ; } |
public class ExceptionUtils { /** * Does the throwable ' s causal chain have an immediate or wrapped exception
* of the given type ?
* @ param chain
* The root of a Throwable causal chain .
* @ param type
* The exception type to test .
* @ return true , if chain is an instance of type or is an
* Undeclare... | if ( chain instanceof UndeclaredThrowableException ) { chain = chain . getCause ( ) ; } return type . isInstance ( chain ) ; |
public class ColorUtils { /** * Resolves a color resource .
* @ param color the color resource
* @ param context the current context
* @ return a color int */
@ SuppressWarnings ( "deprecation" ) public static @ ColorInt int resolveColor ( @ ColorRes int color , Context context ) { } } | if ( Build . VERSION . SDK_INT >= 23 ) { return context . getResources ( ) . getColor ( color , context . getTheme ( ) ) ; } else { return context . getResources ( ) . getColor ( color ) ; } |
public class TargetPoolClient { /** * Adds an instance to a target pool .
* < p > Sample code :
* < pre > < code >
* try ( TargetPoolClient targetPoolClient = TargetPoolClient . create ( ) ) {
* ProjectRegionTargetPoolName targetPool = ProjectRegionTargetPoolName . of ( " [ PROJECT ] " , " [ REGION ] " , " [ TA... | AddInstanceTargetPoolHttpRequest request = AddInstanceTargetPoolHttpRequest . newBuilder ( ) . setTargetPool ( targetPool == null ? null : targetPool . toString ( ) ) . setTargetPoolsAddInstanceRequestResource ( targetPoolsAddInstanceRequestResource ) . build ( ) ; return addInstanceTargetPool ( request ) ; |
public class LCSQoSImpl { /** * ( non - Javadoc )
* @ see org . restcomm . protocols . ss7 . map . api . primitives . MAPAsnPrimitive # encodeData
* ( org . mobicents . protocols . asn . AsnOutputStream ) */
public void encodeData ( AsnOutputStream asnOs ) throws MAPException { } } | if ( this . horizontalAccuracy != null ) { try { asnOs . writeOctetString ( Tag . CLASS_CONTEXT_SPECIFIC , _TAG_HORIZONTAL_ACCURACY , new byte [ ] { this . horizontalAccuracy . byteValue ( ) } ) ; } catch ( IOException e ) { throw new MAPException ( "IOException when encoding parameter horizontalAccuracy: " , e ) ; } c... |
public class DynamicAccessModule { /** * Perform a dissemination for a method that belongs to a dynamic
* disseminator that is associate with the digital object . The method
* belongs to the dynamic service definition and is implemented by a
* dynamic Service Deployment ( which is an internal service in the
* r... | setParameter ( "useCachedObject" , "" + false ) ; // < < < STILL REQUIRED ?
return da . getDissemination ( context , PID , sDefPID , methodName , userParms , asOfDateTime , m_manager . getReader ( Server . USE_DEFINITIVE_STORE , context , PID ) ) ; |
public class JVnTextPro { /** * Process the text and return the processed text
* pipeline : sentence segmentation , tokenization , word segmentation , part of speech tagging .
* @ param text text to be processed
* @ return processed text */
public String process ( String text ) { } } | String ret = text ; // Pipeline
ret = convertor . convert ( ret ) ; ret = senSegment ( ret ) ; ret = senTokenize ( ret ) ; ret = wordSegment ( ret ) ; ret = postProcessing ( ret ) ; ret = posTagging ( ret ) ; return ret ; |
public class UserApi { /** * Get a Pager of users .
* < pre > < code > GitLab Endpoint : GET / users < / code > < / pre >
* @ param itemsPerPage the number of User instances that will be fetched per page
* @ return a Pager of User
* @ throws GitLabApiException if any exception occurs */
public Pager < User > ge... | return ( new Pager < User > ( this , User . class , itemsPerPage , createGitLabApiForm ( ) . asMap ( ) , "users" ) ) ; |
public class ItemsSketch { /** * From an existing sketch , this creates a new sketch that can have a smaller value of K .
* The original sketch is not modified .
* @ param newK the new value of K that must be smaller than current value of K .
* It is required that this . getK ( ) = newK * 2 ^ ( nonnegative intege... | final ItemsSketch < T > newSketch = ItemsSketch . getInstance ( newK , comparator_ ) ; ItemsMergeImpl . downSamplingMergeInto ( this , newSketch ) ; return newSketch ; |
public class PropertiesManager { /** * Save the given property using an Enum constant . See
* { @ link # saveProperty ( Object , String ) } for additional details . < br >
* < br >
* Please note that the Enum value saved here is case insensitive . See
* { @ link # getEnumProperty ( Object , Class ) } for additi... | saveProperty ( property , value . name ( ) ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.