signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class Polygon { /** * Removes the corner of Polygon . * @ param index The index number of the corner . */ public void removeVertex ( int index ) { } }
this . cornerX . remove ( index ) ; this . cornerY . remove ( index ) ; this . cornerZ . remove ( index ) ; if ( isGradation ( ) == true ) this . cornerColor . remove ( index ) ; setNumberOfCorner ( this . cornerX . size ( ) ) ; calcG ( ) ;
public class JsonServiceDocumentWriter { /** * Writes the kind of the entity . * @ param jsonGenerator jsonGenerator * @ param entity entity from the container */ private void writeKind ( JsonGenerator jsonGenerator , Object entity ) throws IOException { } }
jsonGenerator . writeFieldName ( KIND ) ; if ( entity instanceof EntitySet ) { jsonGenerator . writeObject ( ENTITY_SET ) ; } else { jsonGenerator . writeObject ( SINGLETON ) ; }
public class Helpers { /** * Create a text message that will be stored in the database . Must be called inside a transaction . */ static void createMessage ( String textMessage , JobInstance jobInstance , DbConn cnx ) { } }
cnx . runUpdate ( "message_insert" , jobInstance . getId ( ) , textMessage ) ;
public class ToolBarEastState { /** * { @ inheritDoc } */ public boolean isInState ( JComponent c ) { } }
JToolBar toolbar = ( JToolBar ) c ; return SeaGlassLookAndFeel . resolveToolbarConstraint ( toolbar ) == BorderLayout . EAST ;
public class TerminateJobFlowsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( TerminateJobFlowsRequest terminateJobFlowsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( terminateJobFlowsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( terminateJobFlowsRequest . getJobFlowIds ( ) , JOBFLOWIDS_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JS...
public class AbstractDataDictionaryParser { /** * Parses all mapping definitions and adds those to the bean definition * builder as property value . * @ param builder the target bean definition builder . * @ param element the source element . */ private void parseMappingDefinitions ( BeanDefinitionBuilder builder...
HashMap < String , String > mappings = new HashMap < String , String > ( ) ; for ( Element matcher : DomUtils . getChildElementsByTagName ( element , "mapping" ) ) { mappings . put ( matcher . getAttribute ( "path" ) , matcher . getAttribute ( "value" ) ) ; } if ( ! mappings . isEmpty ( ) ) { builder . addPropertyValue...
public class DetectLabelsResult { /** * An array of labels for the real - world objects detected . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setLabels ( java . util . Collection ) } or { @ link # withLabels ( java . util . Collection ) } if you want to ...
if ( this . labels == null ) { setLabels ( new java . util . ArrayList < Label > ( labels . length ) ) ; } for ( Label ele : labels ) { this . labels . add ( ele ) ; } return this ;
public class GoogleCloudStorageFileSystem { /** * Construct a URI using the legacy path codec . * @ deprecated This method is deprecated as each instance of GCS FS can be configured * with a codec . */ @ Deprecated public static URI getPath ( String bucketName , String objectName ) { } }
return LEGACY_PATH_CODEC . getPath ( bucketName , objectName , false /* do not allow empty object */ ) ;
public class BlockBox { /** * Sets the height of the content while considering the min - and max - height . * @ param height the height the set if possible */ public void setContentHeight ( int height ) { } }
int h = height ; if ( max_size . height != - 1 && h > max_size . height ) h = max_size . height ; if ( min_size . height != - 1 && h < min_size . height ) h = min_size . height ; content . height = h ;
public class JSONObject { /** * Put a key / int pair in the JSONObject . * @ param key A key string . * @ param value An int which is the value . * @ return this * @ throws JSONException If the key is null . */ public JSONObject put ( String key , int value ) throws JSONException { } }
put ( key , Integer . valueOf ( value ) ) ; return this ;
public class GoogleMapShapeConverter { /** * Convert a { @ link com . google . android . gms . maps . model . Polygon } to a * { @ link Polygon } * @ param polygon polygon * @ param hasZ has z flag * @ param hasM has m flag * @ return polygon */ public Polygon toPolygon ( com . google . android . gms . maps ....
return toPolygon ( polygon . getPoints ( ) , polygon . getHoles ( ) , hasZ , hasM ) ;
public class SimpleFieldValidation { /** * Adds the rule against the field address path . If the rule returns an error , it will be added to the list of errors * @ param fieldPath the path to the field * @ param rule the rule function * @ return this validator */ public SimpleFieldValidation addRule ( ExecutionPa...
rules . put ( fieldPath , rule ) ; return this ;
public class CountSqlParser { /** * 判断Orderby是否包含参数 , 有参数的不能去 * @ param orderByElements * @ return */ public boolean orderByHashParameters ( List < OrderByElement > orderByElements ) { } }
if ( orderByElements == null ) { return false ; } for ( OrderByElement orderByElement : orderByElements ) { if ( orderByElement . toString ( ) . contains ( "?" ) ) { return true ; } } return false ;
public class KeyVaultClientBaseImpl { /** * The update key operation changes specified attributes of a stored key and can be applied to any key type and key version stored in Azure Key Vault . * In order to perform this operation , the key must already exist in the Key Vault . Note : The cryptographic material of a k...
return updateKeyWithServiceResponseAsync ( vaultBaseUrl , keyName , keyVersion ) . toBlocking ( ) . single ( ) . body ( ) ;
public class CSVDumper { /** * Connect to the Doradus server and download the requested application ' s schema . */ private void loadSchema ( ) { } }
m_logger . info ( "Loading schema for application: {}" , m_config . app ) ; m_client = new Client ( m_config . host , m_config . port , m_config . getTLSParams ( ) ) ; m_client . setCredentials ( m_config . getCredentials ( ) ) ; m_session = m_client . openApplication ( m_config . app ) ; // throws if unknown app m_app...
public class WebContainerMonitor { /** * Method : initServletStats ( ) * @ param _ app = Application Name * @ param _ ser = Servlet Name * This method will create ServletStats object for current servlet . * This method needs to be synchronised . * This method gets called only at first request . */ public sync...
String _key = _app + "." + _ser ; ServletStats nStats = this . servletCountByName . get ( _key ) ; if ( nStats == null ) { nStats = new ServletStats ( _app , _ser ) ; this . servletCountByName . put ( _key , nStats ) ; } return nStats ;
public class DSet { /** * Creates an < b > immutable < / b > view of this distributed set as a Java set . */ public Set < E > asSet ( ) { } }
return new AbstractSet < E > ( ) { @ Override public boolean add ( E o ) { throw new UnsupportedOperationException ( ) ; } @ Override public boolean remove ( Object o ) { throw new UnsupportedOperationException ( ) ; } @ Override public boolean contains ( Object o ) { if ( ! ( o instanceof DSet . Entry ) ) { return fal...
public class ByteVector { /** * Get a copy of the raw byte [ ] array . * @ return copy of values array . */ public byte [ ] getValues ( ) { } }
byte [ ] copy = new byte [ values . length ] ; System . arraycopy ( values , 0 , copy , 0 , values . length ) ; return copy ;
public class IfcSpaceImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) public EList < IfcRelSpaceBoundary > getBoundedBy ( ) { } }
return ( EList < IfcRelSpaceBoundary > ) eGet ( Ifc2x3tc1Package . Literals . IFC_SPACE__BOUNDED_BY , true ) ;
public class AbstractAgent { /** * { @ inheritDoc } * @ see jp . co . future . uroborosql . SqlAgent # close ( ) */ @ Override public void close ( ) { } }
transactionManager . close ( ) ; if ( coverageHandlerRef . get ( ) != null ) { coverageHandlerRef . get ( ) . onSqlAgentClose ( ) ; }
public class DocumentBlock { /** * setter for hasManyFontsizes - sets * @ generated * @ param v value to set into the feature */ public void setHasManyFontsizes ( boolean v ) { } }
if ( DocumentBlock_Type . featOkTst && ( ( DocumentBlock_Type ) jcasType ) . casFeat_hasManyFontsizes == null ) jcasType . jcas . throwFeatMissing ( "hasManyFontsizes" , "ch.epfl.bbp.uima.types.DocumentBlock" ) ; jcasType . ll_cas . ll_setBooleanValue ( addr , ( ( DocumentBlock_Type ) jcasType ) . casFeatCode_hasManyFo...
public class Jenkins { /** * / * package */ void trimLabels ( ) { } }
for ( Iterator < Label > itr = labels . values ( ) . iterator ( ) ; itr . hasNext ( ) ; ) { Label l = itr . next ( ) ; resetLabel ( l ) ; if ( l . isEmpty ( ) ) itr . remove ( ) ; }
public class AbstractBuilder { /** * Replies if the type could contains functions with a body . */ @ Pure protected boolean isActionBodyAllowed ( XtendTypeDeclaration type ) { } }
return ! ( type instanceof SarlAnnotationType || type instanceof SarlCapacity || type instanceof SarlEvent || type instanceof SarlInterface ) ;
public class IonIon { /** * - - - WRITER FACTORY - - - */ public CachedWriter createWriter ( boolean pretty ) throws IOException { } }
CachedWriter writer = new CachedWriter ( ) ; writer . buffer = new ByteArrayOutputStream ( 512 ) ; writer . writer = IonBinaryWriterBuilder . standard ( ) . build ( writer . buffer ) ; return writer ;
public class AnalyticsBot { /** * Use this method to get a list of administrators in a chat . * @ param chat _ id Unique identifier for the target chat or username of the target supergroup or channel ( in the format @ channelusername ) * @ return On success , returns an Array of ChatMember objects that contains inf...
AnalyticsData data = new AnalyticsData ( "getChatAdministrators" ) ; IOException ioException = null ; ChatMember [ ] admins = null ; data . setValue ( "chat_id" , chat_id ) ; try { admins = bot . getChatAdministrators ( chat_id ) ; data . setReturned ( admins ) ; } catch ( IOException e ) { ioException = e ; data . set...
public class BigRational { /** * Returns the smallest of the specified rational numbers . * @ param values the rational numbers to compare * @ return the smallest rational number , 0 if no numbers are specified */ public static BigRational min ( BigRational ... values ) { } }
if ( values . length == 0 ) { return BigRational . ZERO ; } BigRational result = values [ 0 ] ; for ( int i = 1 ; i < values . length ; i ++ ) { result = result . min ( values [ i ] ) ; } return result ;
public class ExecutionGraph { /** * Returns the result of { @ link # computeAllPriorAllocationIds ( ) } , but only if the scheduling really requires it . * Otherwise this method simply returns an empty set . */ private Set < AllocationID > computeAllPriorAllocationIdsIfRequiredByScheduling ( ) { } }
// This is a temporary optimization to avoid computing all previous allocations if not required // This can go away when we progress with the implementation of the Scheduler . if ( slotProvider instanceof Scheduler && ( ( Scheduler ) slotProvider ) . requiresPreviousExecutionGraphAllocations ( ) ) { return computeAllPr...
public class TransitionFilter { /** * Prepare the filter for the transiton at a given time . * The default implementation sets the given filter property , but you could override this method to make other changes . * @ param transition the transition time in the range 0 - 1 */ public void prepareFilter ( float trans...
try { method . invoke ( filter , new Object [ ] { new Float ( transition ) } ) ; } catch ( Exception e ) { throw new IllegalArgumentException ( "Error setting value for property: " + property ) ; }
public class WsLogRecord { /** * Set a throwable associated with the log event . * @ param throwable * a throwable */ @ Override public void setThrown ( Throwable thrown ) { } }
if ( thrown != null ) { super . setThrown ( thrown ) ; this . ivStackTrace = DataFormatHelper . throwableToString ( thrown ) ; }
public class AppServiceEnvironmentsInner { /** * Get usage metrics for a worker pool of an App Service Environment . * Get usage metrics for a worker pool of an App Service Environment . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException t...
return listWebWorkerUsagesNextSinglePageAsync ( nextPageLink ) . concatMap ( new Func1 < ServiceResponse < Page < UsageInner > > , Observable < ServiceResponse < Page < UsageInner > > > > ( ) { @ Override public Observable < ServiceResponse < Page < UsageInner > > > call ( ServiceResponse < Page < UsageInner > > page )...
public class CatalogDiffEngine { /** * After we decide we can ' t modify , add or delete something on a full table , * we do a check to see if we can do that on an empty table . The original error * and any response from the empty table check is processed here . This code * is basically in this method so it ' s n...
assert ( errorMessage != null ) ; // if no requirements , then it ' s just not possible if ( responseList == null ) { m_supported = false ; m_errors . append ( errorMessage + "\n" ) ; return ; } // otherwise , it ' s possible if a specific table is empty // collect the error message ( s ) and decide if it can be done i...
public class Serializer { /** * Registers an abstract type serializer for the given abstract type . * Abstract serializers allow abstract types to be serialized without explicitly registering a concrete type . * The concept of abstract serializers differs from { @ link # registerDefault ( Class , TypeSerializerFact...
registry . registerAbstract ( abstractType , factory ) ; return this ;
public class Sql { /** * 根据Sql变量位置获取变量名称 * 仅对于PreperedStatment有效 * @ param index 变量位置 * @ return 变量名称 */ public String getKeyByIndex ( int index ) { } }
Set < String > keySet = keyIndexs . keySet ( ) ; for ( String key : keySet ) { int idx = keyIndexs . get ( key ) ; if ( index == idx ) { return key ; } } return null ;
public class Table { /** * Generates xPath from element locator and path to the row ( & lt ; tr & gt ; tag ) < br > * Checks if table has & lt ; TBODY & gt ; tag and adds it to the xPath < br > * @ return String with beginning of xPath < br > */ public String getXPathBase ( ) { } }
String xPathBase = "" ; if ( this . getElement ( ) != null ) { String locator = getLocator ( ) ; if ( ! locator . startsWith ( "link=" ) && ! locator . startsWith ( "xpath=" ) && ! locator . startsWith ( "/" ) ) { if ( locator . startsWith ( "id=" ) || locator . startsWith ( "name=" ) ) { String tmp = locator . substri...
public class LatLonGridlineOverlay { /** * resets the settings * @ since 5.6.3 */ public static void setDefaults ( ) { } }
lineColor = Color . BLACK ; fontColor = Color . WHITE ; backgroundColor = Color . BLACK ; lineWidth = 1f ; fontSizeDp = 32 ; DEBUG = false ; DEBUG2 = false ;
public class JScoreComponent { /** * Writes the currently set tune score to a PNG output stream . * @ param os The PNG output stream * @ throws IOException Thrown if the given file cannot be accessed . */ public void writeScoreTo ( OutputStream os ) throws IOException { } }
if ( m_jTune != null ) { setTune ( m_jTune . getTune ( ) ) ; } BufferedImage bufferedImage = new BufferedImage ( ( int ) m_dimension . getWidth ( ) , ( int ) m_dimension . getHeight ( ) , BufferedImage . TYPE_INT_ARGB ) ; Graphics2D bufferedImageGfx = bufferedImage . createGraphics ( ) ; bufferedImageGfx . setColor ( g...
public class UserFilteringPortalEventHandler { /** * If no < code > supportedUserNames < / code > { @ link Collection } is configured all user - names are * supported otherwise exact String equality matching is done to determine supported userNames . * The property defaults to null ( all user names ) * @ param su...
if ( supportedUserNames == null ) { this . supportedUserNames = null ; } else { this . supportedUserNames = ImmutableSet . copyOf ( supportedUserNames ) ; }
public class LogQueryBean { /** * sets the current value for the minimum and maximum time * @ param minTime minimum time * @ param maxTime maximum time * @ throws IllegalArgumentException if minTime is later than maxTime */ public void setTime ( Date minTime , Date maxTime ) throws IllegalArgumentException { } }
if ( minTime != null && maxTime != null && minTime . after ( maxTime ) ) { throw new IllegalArgumentException ( "Value of the minTime parameter should specify time before the time specified by the value of the maxTime parameter" ) ; } this . minTime = minTime ; this . maxTime = maxTime ;
public class XsdAsmElements { /** * Creates some class specific methods that all implementations of { @ link XsdAbstractElement } should have , which are : * Constructor ( ElementVisitor visitor ) - Assigns the argument to the visitor field ; * Constructor ( Element parent ) - Assigns the argument to the parent fie...
generateClassMethods ( classWriter , className , className , apiName , true ) ;
public class InternalUtilities { /** * Wake up every 1 second to check whether to abort * @ param millis * @ throws InterruptedException */ public static void sleep ( long millis ) throws InterruptedException { } }
while ( millis > 0 ) { // abort if the user kills mlcp in local mode String shutdown = System . getProperty ( "mlcp.shutdown" ) ; if ( shutdown != null ) { break ; } if ( millis > 1000 ) { Thread . sleep ( 1000 ) ; millis -= 1000 ; } else { Thread . sleep ( millis ) ; millis = 0 ; } }
public class AbstractManagedType { /** * Returns declared singular attribute . * @ param paramString * the param string * @ param checkValidity * the check validity * @ return the declared singular attribute */ private SingularAttribute < X , ? > getDeclaredSingularAttribute ( String paramString , boolean che...
SingularAttribute < X , ? > attribute = null ; if ( declaredSingluarAttribs != null ) { attribute = declaredSingluarAttribs . get ( paramString ) ; } if ( checkValidity ) { checkForValid ( paramString , attribute ) ; } return attribute ;
public class UNode { /** * Parse the given JSON text and return the appropriate UNode object . The only JSON * documents we allow are in the form : * < pre > * { " something " : [ value ] } * < / pre > * This means that when we parse the JSON , we should see an object with a single * member . The UNode retu...
assert text != null && text . length ( ) > 0 ; SajListener listener = new SajListener ( ) ; new JSONAnnie ( text ) . parse ( listener ) ; return listener . getRootNode ( ) ;
public class TreebankChunker { /** * / * inherieted java doc */ protected boolean validOutcome ( String outcome , Sequence sequence ) { } }
String prevOutcome = null ; List tagList = sequence . getOutcomes ( ) ; int lti = tagList . size ( ) - 1 ; if ( lti >= 0 ) { prevOutcome = ( String ) tagList . get ( lti ) ; } return validOutcome ( outcome , prevOutcome ) ;
public class AbstractCommandExtension { /** * Analyze method parameters , search for extensions and prepare parameters context . * @ param descriptor repository method descriptor * @ param context repository method context */ protected void analyzeParameters ( final T descriptor , final DescriptorContext context ) ...
final CommandParamsContext paramsContext = new CommandParamsContext ( context ) ; spiService . process ( descriptor , paramsContext ) ;
public class PegDownProcessor { /** * Converts the given markdown source to HTML . * If the input cannot be parsed within the configured parsing timeout the method returns null . * @ param markdownSource the markdown source to convert * @ param linkRenderer the LinkRenderer to use * @ return the HTML */ public ...
return markdownToHtml ( markdownSource . toCharArray ( ) , linkRenderer ) ;
public class DependencyIdentifier { /** * TODO * @ param type * @ param typeList */ private static void addTypeToList ( Type type , List < Type > typeList ) { } }
if ( type instanceof ParameterizedType ) { ParameterizedType parameterizedType = ( ParameterizedType ) type ; addTypeToList ( parameterizedType . getRawType ( ) , typeList ) ; for ( Type actualTypeArgument : parameterizedType . getActualTypeArguments ( ) ) { addTypeToList ( actualTypeArgument , typeList ) ; } } else { ...
public class SafeIterableMap { /** * Removes the mapping for a key from this map if it is present . * @ param key key whose mapping is to be removed from the map * @ return the previous value associated with the specified key , * or { @ code null } if there was no mapping for the key */ public V remove ( @ NonNul...
Entry < K , V > toRemove = get ( key ) ; if ( toRemove == null ) { return null ; } mSize -- ; if ( ! mIterators . isEmpty ( ) ) { for ( SupportRemove < K , V > iter : mIterators . keySet ( ) ) { iter . supportRemove ( toRemove ) ; } } if ( toRemove . mPrevious != null ) { toRemove . mPrevious . mNext = toRemove . mNext...
public class Story { /** * Continue the story until the next choice point or until it runs out of * content . This is as opposed to the Continue ( ) method which only evaluates one * line of output at a time . * @ return The resulting text evaluated by the ink engine , concatenated * together . */ public String...
ifAsyncWeCant ( "ContinueMaximally" ) ; StringBuilder sb = new StringBuilder ( ) ; while ( canContinue ( ) ) { sb . append ( Continue ( ) ) ; } return sb . toString ( ) ;
public class ChainingTextWriter { /** * Writes the iCalendar objects to a string . * @ return the iCalendar string */ public String go ( ) { } }
StringWriter sw = new StringWriter ( ) ; try { go ( sw ) ; } catch ( IOException e ) { // should never be thrown because we ' re writing to a string throw new RuntimeException ( e ) ; } return sw . toString ( ) ;
public class Frame { /** * Get the slot the object instance referred to by given instruction is * located in . * @ param ins * the Instruction * @ param cpg * the ConstantPoolGen for the method * @ return stack slot the object instance is in * @ throws DataflowAnalysisException */ public int getInstanceSl...
if ( ! isValid ( ) ) { throw new DataflowAnalysisException ( "Accessing invalid frame at " + ins ) ; } int numConsumed = ins . consumeStack ( cpg ) ; if ( numConsumed == Const . UNPREDICTABLE ) { throw new DataflowAnalysisException ( "Unpredictable stack consumption in " + ins ) ; } if ( numConsumed > getStackDepth ( )...
public class FacebookRestClient { /** * Sends a message via SMS to the user identified by < code > userId < / code > in response * to a user query associated with < code > mobileSessionId < / code > . * @ param userId a user ID * @ param response the message to be sent via SMS * @ param mobileSessionId the mobi...
this . callMethod ( FacebookMethod . SMS_SEND_MESSAGE , new Pair < String , CharSequence > ( "uid" , userId . toString ( ) ) , new Pair < String , CharSequence > ( "message" , response ) , new Pair < String , CharSequence > ( "session_id" , mobileSessionId . toString ( ) ) ) ;
public class UpdateCreatives { /** * Runs the example . * @ param adManagerServices the services factory . * @ param session the session . * @ param creativeId the ID of the creative to update . * @ throws ApiException if the API request failed with one or more service errors . * @ throws RemoteException if t...
// Get the CreativeService . CreativeServiceInterface creativeService = adManagerServices . get ( session , CreativeServiceInterface . class ) ; // Create a statement to only select a single creative by ID . StatementBuilder statementBuilder = new StatementBuilder ( ) . where ( "id = :id" ) . orderBy ( "id ASC" ) . lim...
public class CommercePriceEntryUtil { /** * Returns the first commerce price entry in the ordered set where companyId = & # 63 ; . * @ param companyId the company ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the first matching commerce price ...
return getPersistence ( ) . findByCompanyId_First ( companyId , orderByComparator ) ;
public class Computer { /** * @ deprecated Implementation of CLI command " connect - node " moved to { @ link hudson . cli . ConnectNodeCommand } . * @ param force * If true cancel any currently pending connect operation and retry from scratch */ @ Deprecated public void cliConnect ( boolean force ) throws Executio...
checkPermission ( CONNECT ) ; connect ( force ) . get ( ) ;
public class NetHttpResponse { /** * { @ inheritDoc } * < p > Returns { @ link HttpURLConnection # getInputStream } when it doesn ' t throw { @ link IOException } , * otherwise it returns { @ link HttpURLConnection # getErrorStream } . * < p > Upgrade warning : in prior version 1.16 { @ link # getContent ( ) } re...
InputStream in = null ; try { in = connection . getInputStream ( ) ; } catch ( IOException ioe ) { in = connection . getErrorStream ( ) ; } return in == null ? null : new SizeValidatingInputStream ( in ) ;
public class RestrictionsContainer { /** * Methode d ' ajout de la restriction Eq * @ param propertyNom de la Propriete * @ param valueValeur de la propriete * @ param < Y > Type de valeur * @ returnConteneur */ public < Y extends Comparable < ? super Y > > RestrictionsContainer addEq ( String property , Y valu...
// Ajout de la restriction restrictions . add ( new Eq < Y > ( property , value ) ) ; // On retourne le conteneur return this ;
public class ThreadedServer { /** * Open the server socket . This method can be called to open the server socket in advance of * starting the listener . This can be used to test if the port is available . * @ exception IOException if an error occurs */ public void open ( ) throws IOException { } }
if ( _listen == null ) { _listen = newServerSocket ( _address , _acceptQueueSize ) ; if ( _address == null ) _address = new InetAddrPort ( _listen . getInetAddress ( ) , _listen . getLocalPort ( ) ) ; else { if ( _address . getInetAddress ( ) == null ) _address . setInetAddress ( _listen . getInetAddress ( ) ) ; if ( _...
public class OpportunitiesApi { /** * Get opportunities group Return information of an opportunities group - - - * This route expires daily at 11:05 * @ param groupId * ID of an opportunities group ( required ) * @ param acceptLanguage * Language to use in the response ( optional , default to en - us ) * @ ...
com . squareup . okhttp . Call call = getOpportunitiesGroupsGroupIdValidateBeforeCall ( groupId , acceptLanguage , datasource , ifNoneMatch , language , null ) ; Type localVarReturnType = new TypeToken < OpportunitiesGroupResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class SDPLogarithmicBarrier { /** * Create the barrier function for the Phase I . * It is an instance of this class for the constraint : * < br > G + Sum [ x _ i * F _ i ( x ) , i ] < t * I * @ see " S . Boyd and L . Vandenberghe , Convex Optimization , 11.6.2" */ @ Override public BarrierFunction createPh...
List < double [ ] [ ] > FiPh1MatrixList = new ArrayList < double [ ] [ ] > ( ) ; for ( int i = 0 ; i < this . Fi . length ; i ++ ) { FiPh1MatrixList . add ( FiPh1MatrixList . size ( ) , this . Fi [ i ] . getData ( ) ) ; } FiPh1MatrixList . add ( FiPh1MatrixList . size ( ) , MatrixUtils . createRealIdentityMatrix ( p ) ...
public class JsHdrsImpl { /** * Set the contents of the ReverseRoutingPath field in the message header . * The field in the message must be set to a copy so that any updates to the * original list are not reflected in the message . * Javadoc description supplied by SIBusMessage interface . */ final void setRRP ( ...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setRRP" , value ) ; if ( value == null ) { getHdr2 ( ) . setField ( JsHdr2Access . REVERSEROUTINGPATH_DESTINATIONNAME , null ) ; getHdr2 ( ) . setField ( JsHdr2Access . REVERSEROUTINGPATH_MEID , null ) ; getHdr2 ( ) ...
public class EntityJsonParser { /** * Parse an EntityJSON instance from the given URL . * Callers may prefer to catch EntityJSONException and treat all failures in the same way . * @ param instanceUrl A URL pointing to the JSON representation of an EntityJSON instance . * @ return An EntityJSON instance . * @ t...
try { return new EntityJson ( validate ( ENTITY_JSON_SCHEMA_URL , instanceUrl ) ) ; } catch ( NoSchemaException | InvalidSchemaException e ) { // In theory this cannot happen throw new RuntimeException ( e ) ; }
public class JdbcMetadataUtils { /** * Derives the OJB platform to use for a database that is connected via a url using the specified * subprotocol , and where the specified jdbc driver is used . * @ param jdbcSubProtocol The JDBC subprotocol used to connect to the database * @ param jdbcDriver The JDBC driver us...
String platform = ( String ) jdbcSubProtocolToPlatform . get ( jdbcSubProtocol ) ; if ( platform == null ) { platform = ( String ) jdbcDriverToPlatform . get ( jdbcDriver ) ; } return platform ;
public class SameJSONAs { /** * Creates a matcher that compares { @ code JSONObject } s or { @ code JSONArray } s represented as { @ code String } s . * @ param expected the expected JSON document * @ return the { @ code Matcher } instance */ @ Factory public static SameJSONAs < ? super String > sameJSONAs ( String...
return new SameJSONAs < String > ( expected , modalComparatorFor ( stringComparison ( ) ) ) ;
public class TVRageApi { /** * Get the information for a specific episode * @ param showID * @ param seasonId * @ param episodeId * @ return * @ throws com . omertron . tvrageapi . TVRageException */ public Episode getEpisodeInfo ( String showID , String seasonId , String episodeId ) throws TVRageException { ...
if ( ! isValidString ( showID ) || ! isValidString ( seasonId ) || ! isValidString ( episodeId ) ) { return new Episode ( ) ; } StringBuilder tvrageURL = buildURL ( API_EPISODE_INFO , showID ) ; // Append the Season & Episode to the URL tvrageURL . append ( "&ep=" ) . append ( seasonId ) ; tvrageURL . append ( "x" ) . ...
public class BondEnergies { /** * Returns bond energy for a bond type , given atoms and bond type * @ param sourceAtom First bondEnergy * @ param targetAtom Second bondEnergy * @ param bondOrder ( single , double etc ) * @ return bond energy */ public int getEnergies ( IAtom sourceAtom , IAtom targetAtom , Orde...
int dKJPerMol = - 1 ; for ( Map . Entry < Integer , BondEnergy > entry : bondEngergies . entrySet ( ) ) { BondEnergy bondEnergy = entry . getValue ( ) ; String atom1 = bondEnergy . getSymbolFirstAtom ( ) ; String atom2 = bondEnergy . getSymbolSecondAtom ( ) ; if ( ( atom1 . equalsIgnoreCase ( sourceAtom . getSymbol ( )...
public class ReflectUtil { /** * Finds any method matching the method name and parameter types . */ public static Method findDeclaredMethod ( Class < ? > cl , Method testMethod ) { } }
if ( cl == null ) return null ; for ( Method method : cl . getDeclaredMethods ( ) ) { if ( isMatch ( method , testMethod ) ) return method ; } return null ;
public class ApiOvhTelephony { /** * Generate a phone call for validation . Returned validation code should be typed when asked . * REST : POST / telephony / { billingAccount } / trunk / { serviceName } / externalDisplayedNumber / { number } / validate * @ param billingAccount [ required ] The name of your billingA...
String qPath = "/telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber/{number}/validate" ; StringBuilder sb = path ( qPath , billingAccount , serviceName , number ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhTrunkExternalDisplayedNumberValidation ...
public class ByteUtils { /** * Return the < code > double < / code > represented by the bytes in * < code > data < / code > staring at offset < code > offset [ 0 ] < / code > . * @ param data the array from which to read * @ param offset A single element array whose first element is the index in * data from whi...
long bits = bytesToLong ( data , offset ) ; return Double . longBitsToDouble ( bits ) ;
public class RecordingListener { /** * Get the file we ' d be recording to based on scope and given name . * @ param scope * scope * @ param name * name * @ return file */ public static File getRecordFile ( IScope scope , String name ) { } }
// get stream filename generator IStreamFilenameGenerator generator = ( IStreamFilenameGenerator ) ScopeUtils . getScopeService ( scope , IStreamFilenameGenerator . class , DefaultStreamFilenameGenerator . class ) ; // generate filename String fileName = generator . generateFilename ( scope , name , ".flv" , Generation...
public class ProbeManagerImpl { /** * Remove all probes that were fired at the specified listener . * @ param listener the listener that probes were fired to * @ return the probes that were assocaited with the listener */ synchronized Collection < ProbeImpl > removeProbesByListener ( ProbeListener listener ) { } }
Set < ProbeImpl > listenerProbes = probesByListener . remove ( listener ) ; if ( listenerProbes == null ) { listenerProbes = Collections . emptySet ( ) ; } return listenerProbes ;
public class TransactionControlImpl { /** * Resume the global transaction associated with the given Control instance . * The inactivity timeout is either started or stopped , according * to action . If InvalidTransactionException is raised by the global tx service * it is passed on to the caller of this method . ...
try { // LIDB1673.2.1.5 txService . resume ( ctrl ) ; // LIDB1673.2.1.5 } // LIDB1673.2.1.5 catch ( SystemException e ) // LIDB1673.2.1.5 { // LIDB1673.2.1.5 FFDCFilter . processException ( e , CLASS_NAME + ".resumeGlobalTx" , "814" , this ) ; // LIDB1673.2.1.5 if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEv...
public class CobolDataItem { /** * Pretty printing for a renames entry . * @ param sb the string builder */ private void toStringRenames ( final StringBuilder sb ) { } }
if ( getRenamesSubject ( ) != null ) { sb . append ( ',' ) ; sb . append ( "renamesSubject:" + getRenamesSubject ( ) ) ; } if ( getRenamesSubjectRange ( ) != null ) { sb . append ( ',' ) ; sb . append ( "renamesSubjectRange:" + getRenamesSubjectRange ( ) ) ; }
public class Yoke { /** * Adds a Render Engine to the library . Render Engines are Template engines you * might want to use to speed the development of your application . Once they are * registered you can use the method render in the YokeResponse to * render a template . * @ param engine The implementation of ...
engine . setVertx ( vertx ) ; engineMap . put ( engine . extension ( ) , engine ) ; return this ;
public class NavigationMapboxMap { /** * Enables or disables the way name chip underneath the location icon . * @ param isEnabled true to enable , false to disable */ public void updateWaynameQueryMap ( boolean isEnabled ) { } }
if ( mapWayName != null ) { mapWayName . updateWayNameQueryMap ( isEnabled ) ; } else { settings . updateWayNameEnabled ( isEnabled ) ; }
public class Reporter { /** * Takes the headers set in the HTTP request , and writes them to the output * file , in properly HTML formatted fashion * @ param http - the http object that is making the call * @ return String : an HTML formatted string with headers */ public static String getRequestHeadersOutput ( H...
if ( http == null ) { return "" ; } StringBuilder requestHeaders = new StringBuilder ( ) ; String uuid = getUUID ( ) ; requestHeaders . append ( ONCLICK_TOGGLE ) . append ( uuid ) . append ( "\")'>Toggle Headers</a> " ) ; requestHeaders . append ( SPAN_ID ) . append ( uuid ) . append ( DISPLAY_NONE ) ; requestHeaders ....
public class SwipeBackLayout { /** * Find out the scrollable child view from a ViewGroup . * @ param viewGroup */ private void findScrollView ( ViewGroup viewGroup ) { } }
scrollChild = viewGroup ; if ( viewGroup . getChildCount ( ) > 0 ) { int count = viewGroup . getChildCount ( ) ; View child ; for ( int i = 0 ; i < count ; i ++ ) { child = viewGroup . getChildAt ( i ) ; if ( child instanceof AbsListView || child instanceof ScrollView || child instanceof ViewPager || child instanceof W...
public class RMI { @ SuppressWarnings ( "unchecked" ) public static < T > T lookup ( URI rmiUrl ) { } }
try { return ( T ) Naming . lookup ( rmiUrl . toString ( ) ) ; } catch ( Exception e ) { throw new ConnectionException ( rmiUrl + " ERROR:" + Debugger . stackTrace ( e ) ) ; }
public class Jdk9PlusJBossModulesAwareCompiler { /** * unix file separator */ @ Override public boolean compileFiles ( String [ ] files ) { } }
JavaCompiler compiler = ToolProvider . getSystemJavaCompiler ( ) ; if ( compiler == null ) { throw new IllegalStateException ( "No compiler detected, make sure you are running on top of a JDK instead of a JRE." ) ; } StandardJavaFileManager fileManager = compiler . getStandardFileManager ( null , null , null ) ; Iterab...
public class InMemoryFileSystem { /** * Register a file with its size . This will also register a checksum for the * file that the user is trying to create . This is required since none of * the FileSystem APIs accept the size of the file as argument . But since it * is required for us to apriori know the size of...
RawInMemoryFileSystem mfs = ( RawInMemoryFileSystem ) getRawFileSystem ( ) ; synchronized ( mfs ) { boolean b = mfs . reserveSpace ( f , size ) ; if ( b ) { long checksumSize = getChecksumFileLength ( f , size ) ; b = mfs . reserveSpace ( getChecksumFile ( f ) , checksumSize ) ; if ( ! b ) { mfs . unreserveSpace ( f ) ...
public class UserDataHelpers { /** * Processes user data that were already read . * This method handles the { @ link # ENCODE _ FILE _ CONTENT _ PREFIX } prefix . * File contents are written on the disk and references are updated if necessary . * @ param properties the user data as properties * @ param outputDi...
interceptWritingFiles ( properties , outputDirectory ) ; return properties ;
public class AbstractExtraLanguageGenerator { /** * Create the generator context for this generator . * @ param fsa the file system access . * @ param context the global context . * @ param resource the resource . * @ return the context . */ protected IExtraLanguageGeneratorContext createGeneratorContext ( IFil...
if ( context instanceof IExtraLanguageGeneratorContext ) { return ( IExtraLanguageGeneratorContext ) context ; } return new ExtraLanguageGeneratorContext ( context , fsa , this , resource , getPreferenceID ( ) ) ;
public class AuthIdentificationResult { /** * Factory method for error in authentication . * @ param aCredentialValidationFailure * The validation failure . May not be < code > null < / code > in case of * failure ! * @ return Never < code > null < / code > . */ @ Nonnull public static AuthIdentificationResult ...
ValueEnforcer . notNull ( aCredentialValidationFailure , "CredentialValidationFailure" ) ; return new AuthIdentificationResult ( null , aCredentialValidationFailure ) ;
public class WildcardStringParser { /** * Parses a string according to the rules stated above . * @ param pStringToParse the string to parse . * @ return { @ code true } if and only if the string are accepted by the automaton . */ public boolean parseString ( final String pStringToParse ) { } }
if ( debugging ) { out . println ( "parsing \"" + pStringToParse + "\"..." ) ; } // Update statistics totalNumberOfStringsParsed ++ ; // Check string to be parsed for nullness if ( pStringToParse == null ) { if ( debugging ) { out . println ( "string to be parsed is null - rejection!" ) ; } return false ; } // Create p...
public class InternalPureXbaseParser { /** * InternalPureXbase . g : 5040:1 : ruleXConstructorCall returns [ EObject current = null ] : ( ( ) otherlv _ 1 = ' new ' ( ( ruleQualifiedName ) ) ( ( ( ' < ' ) = > otherlv _ 3 = ' < ' ) ( ( lv _ typeArguments _ 4_0 = ruleJvmArgumentTypeReference ) ) ( otherlv _ 5 = ' , ' ( ( ...
EObject current = null ; Token otherlv_1 = null ; Token otherlv_3 = null ; Token otherlv_5 = null ; Token otherlv_7 = null ; Token lv_explicitConstructorCall_8_0 = null ; Token otherlv_11 = null ; Token otherlv_13 = null ; EObject lv_typeArguments_4_0 = null ; EObject lv_typeArguments_6_0 = null ; EObject lv_arguments_...
public class IndirectSort { /** * Returns the order of elements between indices < code > start < / code > and * < code > length < / code > , as indicated by the given < code > comparator < / code > . * This routine uses merge sort . It is guaranteed to be stable . */ public static int [ ] mergesort ( int start , in...
final int [ ] src = createOrderArray ( start , length ) ; if ( length > 1 ) { final int [ ] dst = ( int [ ] ) src . clone ( ) ; topDownMergeSort ( src , dst , 0 , length , comparator ) ; return dst ; } return src ;
public class ConcurrentEvictingQueue { /** * Atomically removes all of the elements from this queue . * The queue will be empty after this call returns . */ @ Override public void clear ( ) { } }
Supplier < Object > clearStrategy = ( ) -> { if ( size == 0 ) { return null ; } Arrays . fill ( ringBuffer , null ) ; size = 0 ; headIndex = 0 ; tailIndex = 0 ; modificationsCount ++ ; return null ; } ; writeConcurrently ( clearStrategy ) ;
public class SlaveMain { /** * Warning emitter . Uses whatever alternative non - event communication channel is . */ @ SuppressForbidden ( "legitimate sysstreams." ) public static void warn ( String message , Throwable t ) { } }
PrintStream w = ( warnings == null ? System . err : warnings ) ; try { w . print ( "WARN: " ) ; w . print ( message ) ; if ( t != null ) { w . print ( " -> " ) ; try { t . printStackTrace ( w ) ; } catch ( OutOfMemoryError e ) { // Ignore , OOM . w . print ( t . getClass ( ) . getName ( ) ) ; w . print ( ": " ) ; w . p...
public class MenuTree { /** * Gets the menu state that ' s associated with a given menu item . This is the * current value for the menu item . * @ param item the item which the state belongs to * @ param < T > determined automatically * @ return the state for the given menu item */ @ SuppressWarnings ( "uncheck...
return ( MenuState < T > ) menuStates . get ( item . getId ( ) ) ;
public class Triangle3d { /** * { @ inheritDoc } */ @ Override public Quaternion getOrientation ( ) { } }
Quaternion orient = null ; if ( this . orientation != null ) { orient = this . orientation . get ( ) ; } if ( orient == null ) { Vector3d norm = getNormal ( ) ; assert ( norm != null ) ; CoordinateSystem3D cs = CoordinateSystem3D . getDefaultCoordinateSystem ( ) ; assert ( cs != null ) ; Vector3f up = cs . getUpVector ...
public class EvaluateClustering { /** * Test if a clustering result is a valid reference result . * @ param t Clustering to test . * @ return { @ code true } if it is considered to be a reference result . */ private boolean isReferenceResult ( Clustering < ? > t ) { } }
// FIXME : don ' t hard - code strings return "bylabel-clustering" . equals ( t . getShortName ( ) ) || "bymodel-clustering" . equals ( t . getShortName ( ) ) || "allinone-clustering" . equals ( t . getShortName ( ) ) || "allinnoise-clustering" . equals ( t . getShortName ( ) ) ;
public class EntityActionSupport { /** * 将request中的参数设置到clazz对应的bean 。 * @ param clazz * @ param shortName */ protected final < T > T populate ( Class < T > clazz , String shortName ) { } }
return PopulateHelper . populate ( clazz , shortName ) ;
public class DefaultEntityManager { /** * Executes the entity listeners associated with the given list of entities . * @ param callbackType * the callback type * @ param entities * the entities */ public void executeEntityListeners ( CallbackType callbackType , List < ? > entities ) { } }
for ( Object entity : entities ) { executeEntityListeners ( callbackType , entity ) ; }
public class MMDImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EList < MMDRG > getRG ( ) { } }
if ( rg == null ) { rg = new EObjectContainmentEList . Resolving < MMDRG > ( MMDRG . class , this , AfplibPackage . MMD__RG ) ; } return rg ;
public class Vector3f { /** * / * ( non - Javadoc ) * @ see org . joml . Vector3fc # half ( org . joml . Vector3fc , org . joml . Vector3f ) */ public Vector3f half ( Vector3fc other , Vector3f dest ) { } }
return half ( other . x ( ) , other . y ( ) , other . z ( ) , dest ) ;
public class Strings { /** * Properly java - escape the string for printing to console . * @ param string The string to escape . * @ return The escaped string . */ public static String escape ( CharSequence string ) { } }
StringBuilder builder = new StringBuilder ( ) ; for ( int i = 0 ; i < string . length ( ) ; ++ i ) { char c = string . charAt ( i ) ; switch ( c ) { case '\b' : builder . append ( '\\' ) . append ( 'b' ) ; break ; case '\t' : builder . append ( '\\' ) . append ( 't' ) ; break ; case '\n' : builder . append ( '\\' ) . a...
public class CommerceWarehousePersistenceImpl { /** * Returns all the commerce warehouses where groupId = & # 63 ; and commerceCountryId = & # 63 ; and primary = & # 63 ; . * @ param groupId the group ID * @ param commerceCountryId the commerce country ID * @ param primary the primary * @ return the matching co...
return findByG_C_P ( groupId , commerceCountryId , primary , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ;
public class DataResource { /** * Adds a column */ @ PUT @ Path ( "/{keyspace}/{columnFamily}/{key}/{columnName}" ) @ Produces ( { } }
"application/json" } ) public void addColumn ( @ PathParam ( "keyspace" ) String keyspace , @ PathParam ( "columnFamily" ) String columnFamily , @ PathParam ( "key" ) String key , @ PathParam ( "columnName" ) String columnName , @ QueryParam ( "index" ) boolean index , String body , @ HeaderParam ( CONSISTENCY_LEVEL_HE...
public class FileUtils { /** * If the file is like name . extension This function returns extension * for filename = name . this returns " " * for filemane = name this retuns null ; * for filemane = . extension this retuns extension ; * for filemane = . this retuns " " ; * @ param fileNameAndPath * @ return...
if ( fileName == null ) { return null ; } else { int number = fileName . lastIndexOf ( '.' ) ; if ( number >= 0 ) { return fileName . substring ( number + 1 , fileName . length ( ) ) ; } else { return null ; } }
public class GetRunRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetRunRequest getRunRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getRunRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getRunRequest . getArn ( ) , ARN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class FileResourceBundle { /** * Returns the cache directory used for unpacked resources . */ public static File getCacheDir ( ) { } }
if ( _tmpdir == null ) { String tmpdir = System . getProperty ( "java.io.tmpdir" ) ; if ( tmpdir == null ) { log . info ( "No system defined temp directory. Faking it." ) ; tmpdir = System . getProperty ( "user.home" ) ; } setCacheDir ( new File ( tmpdir ) ) ; } return _tmpdir ;