signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class ConfigurationService { /** * Load data source configurations .
* @ param shardingSchemaName sharding schema name
* @ return data source configurations */
@ SuppressWarnings ( "unchecked" ) public Map < String , DataSourceConfiguration > loadDataSourceConfigurations ( final String shardingSchemaName ) {... | Map < String , YamlDataSourceConfiguration > result = ( Map ) YamlEngine . unmarshal ( regCenter . getDirectly ( configNode . getDataSourcePath ( shardingSchemaName ) ) ) ; Preconditions . checkState ( null != result && ! result . isEmpty ( ) , "No available data sources to load for orchestration." ) ; return Maps . tr... |
public class MonitoringResultsCollector { /** * Update the worker thread jmeter context with the main thread one
* @ param isInit if true the context a full copy is done , if false only update is done */
private void syncContext ( boolean isInit ) { } } | // jmeter context synchronisation
JMeterContext current = JMeterContextService . getContext ( ) ; JMeterContext ctx = this . getThreadContext ( ) ; if ( isInit ) { current . setCurrentSampler ( ctx . getCurrentSampler ( ) ) ; current . setEngine ( ctx . getEngine ( ) ) ; current . setRestartNextLoop ( ctx . isRestartNe... |
public class OpenIntDoubleHashMap { /** * Fills all values contained in the receiver into the specified list .
* Fills the list , starting at index 0.
* After this call returns the specified list has a new size that equals < tt > this . size ( ) < / tt > .
* Iteration order is guaranteed to be < i > identical < /... | list . setSize ( distinct ) ; double [ ] elements = list . elements ( ) ; double [ ] val = values ; byte [ ] stat = state ; int j = 0 ; for ( int i = stat . length ; i -- > 0 ; ) { if ( stat [ i ] == FULL ) elements [ j ++ ] = val [ i ] ; } |
public class AmazonCognitoIdentityClient { /** * Sets the roles for an identity pool . These roles are used when making calls to < a > GetCredentialsForIdentity < / a >
* action .
* You must use AWS Developer credentials to call this API .
* @ param setIdentityPoolRolesRequest
* Input to the < code > SetIdentit... | request = beforeClientExecution ( request ) ; return executeSetIdentityPoolRoles ( request ) ; |
public class RunInstancesRequest { /** * An elastic GPU to associate with the instance . An Elastic GPU is a GPU resource that you can attach to your
* Windows instance to accelerate the graphics performance of your applications . For more information , see < a
* href = " https : / / docs . aws . amazon . com / AWS... | if ( elasticGpuSpecification == null ) { elasticGpuSpecification = new com . amazonaws . internal . SdkInternalList < ElasticGpuSpecification > ( ) ; } return elasticGpuSpecification ; |
public class RythmEngine { /** * trim " rythm . " from conf keys */
private Map < String , Object > _processConf ( Map < String , ? > conf ) { } } | Map < String , Object > m = new HashMap < String , Object > ( conf . size ( ) ) ; for ( String s : conf . keySet ( ) ) { Object o = conf . get ( s ) ; if ( s . startsWith ( "rythm." ) ) s = s . replaceFirst ( "rythm\\." , "" ) ; m . put ( s , o ) ; } return m ; |
public class CustomFieldValueReader9 { /** * Reads outline code custom field values and populates container . */
private void processOutlineCodeValues ( ) throws IOException { } } | DirectoryEntry outlineCodeDir = ( DirectoryEntry ) m_projectDir . getEntry ( "TBkndOutlCode" ) ; FixedMeta fm = new FixedMeta ( new DocumentInputStream ( ( ( DocumentEntry ) outlineCodeDir . getEntry ( "FixedMeta" ) ) ) , 10 ) ; FixedData fd = new FixedData ( fm , new DocumentInputStream ( ( ( DocumentEntry ) outlineCo... |
public class NotifdEventConsumer { private void cleanup_event_filters ( ) { } } | Enumeration keys = event_callback_map . keys ( ) ; while ( keys . hasMoreElements ( ) ) { String name = ( String ) keys . nextElement ( ) ; EventCallBackStruct callback_struct = event_callback_map . get ( name ) ; if ( callback_struct . consumer instanceof NotifdEventConsumer ) { try { EventChannelStruct ec_struct = ch... |
public class DescribeNetworkInterfacesRequest { /** * This method is intended for internal use only . Returns the marshaled request configured with additional
* parameters to enable operation dry - run . */
@ Override public Request < DescribeNetworkInterfacesRequest > getDryRunRequest ( ) { } } | Request < DescribeNetworkInterfacesRequest > request = new DescribeNetworkInterfacesRequestMarshaller ( ) . marshall ( this ) ; request . addParameter ( "DryRun" , Boolean . toString ( true ) ) ; return request ; |
public class InternalXbaseParser { /** * InternalXbase . g : 867:1 : ruleXOtherOperatorExpression returns [ EObject current = null ] : ( this _ XAdditiveExpression _ 0 = ruleXAdditiveExpression ( ( ( ( ( ) ( ( ruleOpOther ) ) ) ) = > ( ( ) ( ( ruleOpOther ) ) ) ) ( ( lv _ rightOperand _ 3_0 = ruleXAdditiveExpression ) ... | EObject current = null ; EObject this_XAdditiveExpression_0 = null ; EObject lv_rightOperand_3_0 = null ; enterRule ( ) ; try { // InternalXbase . g : 873:2 : ( ( this _ XAdditiveExpression _ 0 = ruleXAdditiveExpression ( ( ( ( ( ) ( ( ruleOpOther ) ) ) ) = > ( ( ) ( ( ruleOpOther ) ) ) ) ( ( lv _ rightOperand _ 3_0 = ... |
public class TransliteratorRegistry { /** * Given a simple ID ( forward direction , no inline filter , not
* compound ) attempt to instantiate it from the registry . Return
* 0 on failure .
* Return a non - empty aliasReturn value if the ID points to an alias .
* We cannot instantiate it ourselves because the a... | Object [ ] entry = find ( ID ) ; return ( entry == null ) ? null : instantiateEntry ( ID , entry , aliasReturn ) ; |
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public String convertIfcRailingTypeEnumToString ( EDataType eDataType , Object instanceValue ) { } } | return instanceValue == null ? null : instanceValue . toString ( ) ; |
public class UfsStatus { /** * Converts an array of UFS file status to a listing result where each element in the array is
* a file or directory name .
* @ param children array of listing statuses
* @ return array of file or directory names , or null if the input is null */
@ Nullable public static String [ ] con... | if ( children == null ) { return null ; } String [ ] ret = new String [ children . length ] ; for ( int i = 0 ; i < children . length ; ++ i ) { ret [ i ] = children [ i ] . getName ( ) ; } return ret ; |
public class CmsXmlContentPropertyHelper { /** * Reads property nodes from the given location . < p >
* @ param cms the current cms context
* @ param baseLocation the base location
* @ return the properties */
public static Map < String , String > readProperties ( CmsObject cms , I_CmsXmlContentLocation baseLocat... | Map < String , String > result = new HashMap < String , String > ( ) ; String elementName = CmsXmlContentProperty . XmlNode . Properties . name ( ) ; String nameElementName = CmsXmlContentProperty . XmlNode . Name . name ( ) ; List < I_CmsXmlContentValueLocation > propertyLocations = baseLocation . getSubValues ( eleme... |
public class BaseNeo4jEntityQueries { /** * Example : CREATE ( n : ENTITY : table { id : { 0 } } ) RETURN n */
private static String initCreateEntityQuery ( EntityKeyMetadata entityKeyMetadata ) { } } | StringBuilder queryBuilder = new StringBuilder ( "CREATE " ) ; appendEntityNode ( ENTITY_ALIAS , entityKeyMetadata , queryBuilder ) ; queryBuilder . append ( " RETURN " ) ; queryBuilder . append ( ENTITY_ALIAS ) ; return queryBuilder . toString ( ) ; |
public class SeaGlassInternalFrameTitlePane { /** * Resets the menuButton icon to match that of the frame . */
private void updateMenuIcon ( ) { } } | Icon frameIcon = frame . getFrameIcon ( ) ; SeaGlassContext context = getContext ( this ) ; if ( frameIcon != null ) { Dimension maxSize = ( Dimension ) context . getStyle ( ) . get ( context , "InternalFrameTitlePane.maxFrameIconSize" ) ; int maxWidth = 16 ; int maxHeight = 16 ; if ( maxSize != null ) { maxWidth = max... |
public class example { /** * This is an example to show you can compress unsorted integers
* as long as most are small . */
public static void unsortedExample ( ) { } } | final int N = 1333333 ; int [ ] data = new int [ N ] ; // initialize the data ( most will be small
for ( int k = 0 ; k < N ; k += 1 ) data [ k ] = 3 ; // throw some larger values
for ( int k = 0 ; k < N ; k += 5 ) data [ k ] = 100 ; for ( int k = 0 ; k < N ; k += 533 ) data [ k ] = 10000 ; int [ ] compressed = new int ... |
public class LObjDblConsumerBuilder { /** * One of ways of creating builder . This might be the only way ( considering all _ functional _ builders ) that might be utilize to specify generic params only once . */
@ Nonnull public static < T > LObjDblConsumerBuilder < T > objDblConsumer ( Consumer < LObjDblConsumer < T >... | return new LObjDblConsumerBuilder ( consumer ) ; |
public class BaseDuoSecurityAuthenticationService { /** * Sign http users request http .
* @ param request the request
* @ return the http */
@ SneakyThrows protected Http signHttpUserPreAuthRequest ( final Http request ) { } } | request . signRequest ( duoProperties . getDuoIntegrationKey ( ) , duoProperties . getDuoSecretKey ( ) ) ; return request ; |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link CombinerParameterType } { @ code > } } */
@ XmlElementDecl ( namespace = "urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" , name = "CombinerParameter" ) public JAXBElement < CombinerParameterType > createCombinerParame... | return new JAXBElement < CombinerParameterType > ( _CombinerParameter_QNAME , CombinerParameterType . class , null , value ) ; |
public class TextProcessor { /** * < p > Konstruiert eine neue Instanz . < / p >
* @ param element element to be formatted
* @ return new processor instance */
static < V > TextProcessor < V > create ( TextElement < V > element ) { } } | return new TextProcessor < > ( element , false , Locale . ROOT , TextWidth . WIDE , OutputContext . FORMAT , Leniency . SMART , 0 ) ; |
public class DependencyContainer { /** * Sets the modified . */
public void setModified ( boolean isModified ) { } } | _isModified = isModified ; if ( _isModified ) _checkExpiresTime = Long . MAX_VALUE / 2 ; else _checkExpiresTime = CurrentTime . currentTime ( ) + _checkInterval ; if ( ! isModified ) _isModifiedLog = false ; |
public class CompoundList { /** * Creates a list of a left and right list .
* @ param left The left list .
* @ param right The right list .
* @ param < S > The type of the list ' s elements .
* @ return A compound list representing the elements of both lists . */
public static < S > List < S > of ( List < ? ext... | List < S > list = new ArrayList < S > ( left . size ( ) + right . size ( ) ) ; list . addAll ( left ) ; list . addAll ( right ) ; return list ; |
public class ArrayBlockingQueueWithShutdown { /** * Inserts the specified element into this queue , waiting if necessary
* for space to become available .
* This may throw an { @ link InterruptedException } in two cases
* < ol >
* < li > If the queue was shut down . < / li >
* < li > If the thread was was int... | checkNotNull ( e ) ; lock . lockInterruptibly ( ) ; try { putInternal ( e , true ) ; } finally { lock . unlock ( ) ; } |
public class AbstractCacheService { /** * Gets the name of the quorum associated with specified cache
* @ param cacheName name of the cache
* @ return name of the associated quorum
* null if there is no associated quorum */
@ Override public String getQuorumName ( String cacheName ) { } } | CacheConfig cacheConfig = getCacheConfig ( cacheName ) ; if ( cacheConfig == null ) { return null ; } return cacheConfig . getQuorumName ( ) ; |
public class LssClient { /** * Get your live recording preset by live recording preset name .
* @ param recording Live recording preset name .
* @ return Your live recording preset */
public GetRecordingResponse getRecording ( String recording ) { } } | checkStringNotEmpty ( recording , "The parameter recording should NOT be null or empty string." ) ; GetRecordingRequest request = new GetRecordingRequest ( ) ; InternalRequest internalRequest = createRequest ( HttpMethodName . GET , request , RECORDING , recording ) ; return invokeHttpClient ( internalRequest , GetReco... |
public class RequestBuilder { /** * GET */
private static HttpRequestBase addParamsGet ( AsyncRequest asyncRequest ) { } } | HttpGet get = new HttpGet ( asyncRequest . getUrl ( ) ) ; Parameters parameter = asyncRequest . getParameter ( ) ; if ( parameter != null && parameter . getNameValuePair ( ) != null ) { try { get . setURI ( new URIBuilder ( get . getURI ( ) ) . addParameters ( parameter . getNameValuePair ( ) ) . build ( ) ) ; } catch ... |
public class ClassUtil { /** * Returns the property set method declared in the specified { @ code cls }
* with the specified property name { @ code propName } .
* { @ code null } is returned if no method is found .
* @ param cls
* @ param propName
* @ return */
public static Method getPropSetMethod ( final Cl... | Map < String , Method > propSetMethodMap = entityPropSetMethodPool . get ( cls ) ; if ( propSetMethodMap == null ) { loadPropGetSetMethodList ( cls ) ; propSetMethodMap = entityPropSetMethodPool . get ( cls ) ; } Method method = propSetMethodMap . get ( propName ) ; if ( method == null ) { synchronized ( entityDeclared... |
public class CaseEventSupport { /** * fire * CaseRoleAssignmentRemoved */
public void fireBeforeCaseRoleAssignmentRemoved ( String caseId , CaseFileInstance caseFile , String role , OrganizationalEntity entity ) { } } | final Iterator < CaseEventListener > iter = getEventListenersIterator ( ) ; if ( iter . hasNext ( ) ) { final CaseRoleAssignmentEvent event = new CaseRoleAssignmentEvent ( identityProvider . getName ( ) , caseId , caseFile , role , entity ) ; do { iter . next ( ) . beforeCaseRoleAssignmentRemoved ( event ) ; } while ( ... |
public class LoadBalancerSupportImpl { /** * Find all VIP
* @ param loadBalancerId optional filter
* @ return
* @ throws CloudException
* @ throws InternalException */
private List < JSONObject > findAllVips ( @ Nullable String loadBalancerId ) throws CloudException , InternalException { } } | NovaMethod method = new NovaMethod ( getProvider ( ) ) ; JSONObject result = method . getNetworks ( getListenersResource ( ) , null , false , "?tenant_id=" + getContext ( ) . getAccountNumber ( ) ) ; List < JSONObject > listeners = new ArrayList < JSONObject > ( ) ; if ( result != null && result . has ( "vips" ) ) { tr... |
public class TargetStreamManager { /** * Handle an ControlAckExpected message . This will result in either a ControlAreYouFlushed
* or a ControlNack being sent back to the source .
* @ param cMsg
* @ throws SIException */
public void handleAckExpectedMessage ( ControlAckExpected cMsg ) throws SIResourceException ... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "handleAckExpectedMessage" , new Object [ ] { cMsg } ) ; int priority = cMsg . getPriority ( ) . intValue ( ) ; Reliability reliability = cMsg . getReliability ( ) ; SIBUuid12 streamID = cMsg . getGuaranteedStreamUUID... |
public class SideEffectsAnalysis { /** * Determines whether it is safe to move code ( { @ code source } ) across
* an environment to another program point ( immediately preceding
* { @ code destination } ) .
* < p > The notion of " environment " is optimization - specific , but it should
* include any code that... | checkNotNull ( locationAbstraction ) ; checkArgument ( ! nodeHasAncestor ( destination , source ) ) ; // It is always safe to move pure code .
if ( isPure ( source ) ) { return true ; } // Don ' t currently support interprocedural analysis
if ( nodeHasCall ( source ) ) { return false ; } LocationSummary sourceLocationS... |
public class ServiceCall { /** * Creates new { @ link ServiceCall } ' s definition with a given router .
* @ param router given .
* @ return new { @ link ServiceCall } instance . */
public ServiceCall router ( Router router ) { } } | ServiceCall target = new ServiceCall ( this ) ; target . router = router ; return target ; |
public class Util { /** * Checks whether the given resource is a Java source file .
* @ param resource
* The resource to check .
* @ return < code > true < / code > if the given resource is a Java source file ,
* < code > false < / code > otherwise . */
public static boolean isJavaArchive ( IResource resource )... | if ( resource == null || ( resource . getType ( ) != IResource . FILE ) ) { return false ; } String name = resource . getName ( ) ; return Archive . isArchiveFileName ( name ) ; |
public class Order { /** * Specify the attribute to be used for sorting
* @ param attributeName
* @ return */
public OrderDirection BY ( String attributeName ) { } } | OrderBy ob = this . orderExpression . getCreateOrderCriteriaFor ( attributeName ) ; OrderDirection ret = new OrderDirection ( ob ) ; QueryRecorder . recordInvocation ( this , "BY" , ret , QueryRecorder . literal ( attributeName ) ) ; return ret ; |
public class CPAttachmentFileEntryPersistenceImpl { /** * Returns the cp attachment file entry with the primary key or throws a { @ link com . liferay . portal . kernel . exception . NoSuchModelException } if it could not be found .
* @ param primaryKey the primary key of the cp attachment file entry
* @ return the... | CPAttachmentFileEntry cpAttachmentFileEntry = fetchByPrimaryKey ( primaryKey ) ; if ( cpAttachmentFileEntry == null ) { if ( _log . isDebugEnabled ( ) ) { _log . debug ( _NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey ) ; } throw new NoSuchCPAttachmentFileEntryException ( _NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey ) ;... |
public class Unchecked { /** * Wrap a { @ link CheckedCallable < T > } in a { @ link Callable < T > } with a custom handler for checked exceptions .
* Example :
* < code > < pre >
* Executors . newFixedThreadPool ( 1 ) . submit ( Unchecked . callable (
* throw new Exception ( " Cannot execute this task " ) ;
... | return ( ) -> { try { return callable . call ( ) ; } catch ( Throwable e ) { handler . accept ( e ) ; throw new IllegalStateException ( "Exception handler must throw a RuntimeException" , e ) ; } } ; |
public class VirtualFlow { /** * Hits this virtual flow at the given coordinates .
* @ param x x offset from the left edge of the viewport
* @ param y y offset from the top edge of the viewport
* @ return hit info containing the cell that was hit and coordinates
* relative to the cell . If the hit was before th... | double bOff = orientation . getX ( x , y ) ; double lOff = orientation . getY ( x , y ) ; bOff += breadthOffset0 . getValue ( ) ; if ( items . isEmpty ( ) ) { return orientation . hitAfterCells ( bOff , lOff ) ; } layout ( ) ; int firstVisible = getFirstVisibleIndex ( ) ; firstVisible = navigator . fillBackwardFrom0 ( ... |
public class IdentityHashMap { /** * Saves the state of the < tt > IdentityHashMap < / tt > instance to a stream
* ( i . e . , serializes it ) .
* @ serialData The < i > size < / i > of the HashMap ( the number of key - value
* mappings ) ( < tt > int < / tt > ) , followed by the key ( Object ) and
* value ( Ob... | // Write out and any hidden stuff
s . defaultWriteObject ( ) ; // Write out size ( number of Mappings )
s . writeInt ( size ) ; // Write out keys and values ( alternating )
Object [ ] tab = table ; for ( int i = 0 ; i < tab . length ; i += 2 ) { Object key = tab [ i ] ; if ( key != null ) { s . writeObject ( unmaskNull... |
public class MemberTasks { /** * We will always try to gather as many results as possible and never throw an exception .
* TODO : Make MemberResponse hold an exception that we can populate if something bad happens so we always
* get to return something for a member in order to indicate a failure . Getting the resul... | Collection < MemberResponse < T > > result = new ArrayList < MemberResponse < T > > ( members . size ( ) ) ; Map < Member , Future < T > > resultFutures = execSvc . submitToMembers ( callable , members ) ; for ( Entry < Member , Future < T > > futureEntry : resultFutures . entrySet ( ) ) { Future < T > future = futureE... |
import java . util . HashSet ; import java . util . Set ; public class IdenticalCharacters { /** * Verify if two strings have identical characters irrespective of their frequency or order .
* @ param str1 The first string
* @ param str2 The second string
* @ return True if both strings share the exact characters ... | Set < Character > set1 = new HashSet < > ( ) ; for ( char c : str1 . toCharArray ( ) ) { set1 . add ( c ) ; } Set < Character > set2 = new HashSet < > ( ) ; for ( char c : str2 . toCharArray ( ) ) { set2 . add ( c ) ; } return set1 . equals ( set2 ) ; |
public class QuickLauncher { /** * Configures and spawns a VM that hosts a cache server . The standard output
* and error are redirected to file prefixed with " start _ " . */
private int start ( final String [ ] args ) throws IOException , InterruptedException { } } | final ArrayList < String > commandLine = new ArrayList < > ( 16 ) ; final HashMap < String , String > env = new HashMap < > ( 2 ) ; final String snappyHome = System . getenv ( "SNAPPY_HOME" ) ; if ( snappyHome == null || snappyHome . isEmpty ( ) ) { throw new IllegalArgumentException ( "SNAPPY_HOME not set" ) ; } // ad... |
public class HiveMetaStoreBasedRegister { /** * Sets create time if not already set . */
private Table gettableWithCreateTime ( Table table , int createTime ) { } } | if ( table . isSetCreateTime ( ) && table . getCreateTime ( ) > 0 ) { return table ; } Table actualtable = table . deepCopy ( ) ; actualtable . setCreateTime ( createTime ) ; return actualtable ; |
public class ModuleContentTypes { /** * Fetch a specific snapshot of this content type .
* @ param contentType the contentType whose snapshot to be returned .
* @ param snapshotId the snapshot to be returned .
* @ return an array of snapshots .
* @ throws IllegalArgumentException if contentType is null .
* @ ... | assertNotNull ( contentType , "contentType" ) ; assertNotNull ( snapshotId , "snapshotId" ) ; final String contentTypeId = getResourceIdOrThrow ( contentType , "contentType" ) ; final String spaceId = getSpaceIdOrThrow ( contentType , "contentType" ) ; final String environmentId = contentType . getEnvironmentId ( ) ; r... |
public class DMatrixUtils { /** * Creates a matrix from the provided range for columns with the given number of rows .
* @ param lower The lower bound ( inclusive ) for the range .
* @ param upper The upper bound ( exclusive ) for the range .
* @ param rows The number of rows .
* @ return A new matrix . */
publ... | // Get the number of columns :
final int cols = lower . length ; // Initialize the return value :
final double [ ] [ ] matrix = new double [ rows ] [ cols ] ; // Iterate over columns and fill the array :
for ( int col = 0 ; col < cols ; col ++ ) { // Get the sequence :
final double [ ] sequence = DMatrixUtils . sequenc... |
public class XmlStringBuilder { /** * Add a new element to this builder .
* @ param name
* @ param content
* @ return the XmlStringBuilder */
public XmlStringBuilder element ( String name , CharSequence content ) { } } | return element ( name , content . toString ( ) ) ; |
public class InterceptorMetaDataFactory { /** * d463727 entire method added . */
private void validateEJBCallbackMethod ( InterceptorMethodKind actualKind , Method m , boolean annotation ) throws EJBConfigurationException { } } | // Get the name of the method .
String methodName = m . getName ( ) ; // Map the method name into one of the InterceptorMethodKind enum value
// it is required to be by the EJB 3 specification .
InterceptorMethodKind requiredKind = mapEjbCallbackName ( methodName ) ; // If the method is required to be a interceptor lif... |
public class Document { /** * setter for events - sets
* @ generated
* @ param v value to set into the feature */
public void setEvents ( FSArray v ) { } } | if ( Document_Type . featOkTst && ( ( Document_Type ) jcasType ) . casFeat_events == null ) jcasType . jcas . throwFeatMissing ( "events" , "de.julielab.jules.types.ace.Document" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( Document_Type ) jcasType ) . casFeatCode_events , jcasType . ll_cas . ll_getFSRef ( v ) )... |
public class UniformUtils { /** * Makes sure that a property name is not empty an is lower - case . Throws an { @ code IllegalArgumentException } if the key is null or empty after trimming .
* @ param key Original key
* @ return Trimmed and lower - case key */
public static String checkPropertyNameAndLowerCase ( St... | if ( key == null ) { throw new IllegalArgumentException ( "key cannot be null" ) ; } key = key . trim ( ) . toLowerCase ( ) ; if ( key . isEmpty ( ) ) { throw new IllegalArgumentException ( "key cannot be empty" ) ; } return key ; |
public class Transaction { /** * Loops the outputs of a coinbase transaction to locate the witness commitment . */
public Sha256Hash findWitnessCommitment ( ) { } } | checkState ( isCoinBase ( ) ) ; for ( TransactionOutput out : Lists . reverse ( outputs ) ) { Script scriptPubKey = out . getScriptPubKey ( ) ; if ( ScriptPattern . isWitnessCommitment ( scriptPubKey ) ) return ScriptPattern . extractWitnessCommitmentHash ( scriptPubKey ) ; } return null ; |
public class VorbisFile { /** * - 1 if the stream is not seekable ( we can ' t know the length ) */
public long raw_total ( int i ) { } } | if ( ! seekable || i >= links ) return ( - 1 ) ; if ( i < 0 ) { long acc = 0 ; // bug ?
for ( int j = 0 ; j < links ; j ++ ) { acc += raw_total ( j ) ; } return ( acc ) ; } else { return ( offsets [ i + 1 ] - offsets [ i ] ) ; } |
public class JK { /** * Throww .
* @ param e the e
* @ param msg the msg */
public static void throww ( Throwable e , String msg ) { } } | if ( e instanceof RuntimeException ) { throw ( RuntimeException ) e ; } throw new JKException ( msg , e ) ; |
public class BufferedWriteFilter { /** * { @ inheritDoc }
* @ throws Exception if < code > writeRequest . message < / code > isn ' t an
* { @ link IoBuffer } instance . */
@ Override public void filterWrite ( NextFilter nextFilter , IoSession session , WriteRequest writeRequest ) throws Exception { } } | Object data = writeRequest . getMessage ( ) ; if ( data instanceof IoBuffer ) { write ( session , ( IoBuffer ) data ) ; } else { throw new IllegalArgumentException ( "This filter should only buffer IoBuffer objects" ) ; } |
public class TOperationHandle { /** * Returns true if field corresponding to fieldID is set ( has been assigned a value ) and false otherwise */
public boolean isSet ( _Fields field ) { } } | if ( field == null ) { throw new IllegalArgumentException ( ) ; } switch ( field ) { case OPERATION_ID : return isSetOperationId ( ) ; case OPERATION_TYPE : return isSetOperationType ( ) ; case HAS_RESULT_SET : return isSetHasResultSet ( ) ; case MODIFIED_ROW_COUNT : return isSetModifiedRowCount ( ) ; } throw new Illeg... |
public class MapLayer { /** * Fire the event that indicates this object has changed .
* Only the { @ link GISEditableChangeListener } are notified . */
public void fireElementChanged ( ) { } } | if ( this . listeners != null && isEventFirable ( ) ) { final GISEditableChangeListener [ ] theListeners = this . listeners . getListeners ( GISEditableChangeListener . class ) ; for ( final GISEditableChangeListener listener : theListeners ) { listener . editableGISElementHasChanged ( this ) ; } } |
public class Configuration { /** * Gets the fully qualified name of the current WAS server
* @ return String The fully qualified name of the WAS server */
public static final String fqServerName ( ) { } } | if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "fqServerName" ) ; String fqServerName = _serverName ; // RLSUtils . FQHAMCompatibleServerName ( _ cellName , _ nodeName , _ serverName ) ; tWAS
if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "fqServerName" , fqServerName ) ; return fqServerName ; |
public class DefaultProxyTimerService { /** * / * ( non - Javadoc )
* @ see org . mobicents . servlet . sip . core . timers . ProxyTimerService # cancel ( org . mobicents . servlet . sip . proxy . ProxyBranchTimerTask ) */
public void cancel ( TimerTask task ) { } } | // CANCEL needs to remove the shceduled timer see http : / / bugs . sun . com / bugdatabase / view _ bug . do ? bug _ id = 6602600
// to improve perf
ScheduledFuture < ? > future = null ; Object [ ] array = super . getQueue ( ) . toArray ( ) ; for ( int i = 0 ; i < array . length ; i ++ ) { if ( array [ i ] instanceof ... |
public class DecisionTaskMapper { /** * This method gets the list of tasks that need to scheduled when the the task to scheduled is of type { @ link TaskType # DECISION } .
* @ param taskMapperContext : A wrapper class containing the { @ link WorkflowTask } , { @ link WorkflowDef } , { @ link Workflow } and a string ... | logger . debug ( "TaskMapperContext {} in DecisionTaskMapper" , taskMapperContext ) ; List < Task > tasksToBeScheduled = new LinkedList < > ( ) ; WorkflowTask taskToSchedule = taskMapperContext . getTaskToSchedule ( ) ; Workflow workflowInstance = taskMapperContext . getWorkflowInstance ( ) ; Map < String , Object > ta... |
public class ProcessAdapter { /** * Restarts this { @ link Process } by first attempting to stop this { @ link Process } if running
* and then running this { @ link Process } by executing this { @ link Process Process ' s }
* { @ link # getCommandLine ( ) command - line } in the given { @ link # getDirectory ( ) di... | if ( isRunning ( ) ) { stopAndWait ( ) ; } Assert . state ( isNotRunning ( ) , "Process [%d] failed to stop" , safeGetId ( ) ) ; return execute ( this , getProcessContext ( ) ) ; |
public class DoubleBinaryOperatorBuilder { /** * One of ways of creating builder . This is possibly the least verbose way where compiler should be able to guess the generic parameters . */
@ Nonnull public static DoubleBinaryOperator dblBinaryOperatorFrom ( Consumer < DoubleBinaryOperatorBuilder > buildingFunction ) { ... | DoubleBinaryOperatorBuilder builder = new DoubleBinaryOperatorBuilder ( ) ; buildingFunction . accept ( builder ) ; return builder . build ( ) ; |
public class ChargingStationEventListener { /** * Updates the location of the charging station .
* @ param event The event which contains the data of the location .
* @ return { @ code true } if the update has been performed , { @ code false } if the charging station can ' t be found . */
private boolean updateChar... | ChargingStation chargingStation = repository . findOne ( event . getChargingStationId ( ) . getId ( ) ) ; if ( chargingStation != null ) { if ( event . getCoordinates ( ) != null ) { chargingStation . setLatitude ( event . getCoordinates ( ) . getLatitude ( ) ) ; chargingStation . setLongitude ( event . getCoordinates ... |
public class StringUtils { /** * Returns the index of the first appearance of the given range of the
* target in the given range of the source , source , starting at the
* given index , using the given comparator for characters . Returns - 1 if
* the target string is not found .
* @ param source The source stri... | int fromIndex = startIndex ; // Adapted from String # indexOf
if ( fromIndex >= sourceCount ) { return ( targetCount == 0 ? sourceCount : - 1 ) ; } if ( fromIndex < 0 ) { fromIndex = 0 ; } if ( targetCount == 0 ) { return fromIndex ; } char first = target . charAt ( targetOffset ) ; int max = sourceOffset + ( sourceCou... |
public class AbstractUuidValueObject { /** * Verifies that a given string is a valid UUID .
* @ param value
* Value to check . A < code > null < / code > value returns < code > true < / code > .
* @ return TRUE if it ' s a valid key , else FALSE . */
public static boolean isValid ( final String value ) { } } | if ( value == null ) { return true ; } final String uuidPattern = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-" + "[0-9a-f]{4}-[0-9a-f]{12}$" ; return Pattern . matches ( uuidPattern , value ) ; |
public class Http2ClientInitializer { /** * Configure the pipeline for a cleartext useing Prior - Knowledge method to start http2. */
private void configureClearTextWithPriorKnowledge ( SocketChannel ch ) { } } | ch . pipeline ( ) . addLast ( connectionHandler , new PrefaceFrameWrittenEventHandler ( ) , new UserEventLogger ( ) ) ; configureEndOfPipeline ( ch . pipeline ( ) ) ; |
public class QualityWidgetScore { /** * Calculate Violations score based on Blocker , Critical & Major violations
* @ param qualityViolationsSettings Violations Param Settings
* @ param codeQualityIterable Quality values
* @ param categoryScores List of category scores */
private void processQualityViolationsScor... | ScoreWeight qualityViolationsScore = getCategoryScoreByIdName ( categoryScores , WIDGET_QUALITY_VIOLATIONS_ID_NAME ) ; Double qualityBlockerRatio = fetchQualityValue ( codeQualityIterable , QUALITY_PARAM_BLOCKER_VIOLATIONS ) ; Double qualityCriticalRatio = fetchQualityValue ( codeQualityIterable , QUALITY_PARAM_CRITICA... |
public class BaseProfile { /** * generate outbound code
* @ param def Definition */
void generateOutboundCode ( Definition def ) { } } | if ( def . isSupportOutbound ( ) ) { if ( def . getMcfDefs ( ) == null ) throw new IllegalStateException ( "Should define at least one mcf class" ) ; for ( int num = 0 ; num < def . getMcfDefs ( ) . size ( ) ; num ++ ) { generateMultiMcfClassCode ( def , "Mcf" , num ) ; generateMultiMcfClassCode ( def , "Mc" , num ) ; ... |
public class DomConfigurationFactory { /** * Parse an email tag .
* @ param el tag element
* @ return Configuration EMAIL . */
private Email parseEmail ( Node el ) { } } | return new Email ( nodeAttribute ( el , TAG_VAR_ATTR_NAME , Email . DEFAULT_NAME ) , nodeAttribute ( el , TAG_ATTR_GHOST , PatternElement . DEFAULT_GHOST_VALUE ) ) ; |
public class IPMolecularLearningDescriptor { /** * put in increasing order the ArrayList
* @ param array The ArrayList to order
* @ return The DoubleArrayResult ordered */
private DoubleArrayResult arrangingEnergy ( ArrayList < Double > array ) { } } | DoubleArrayResult results = new DoubleArrayResult ( ) ; int count = array . size ( ) ; for ( int i = 0 ; i < count ; i ++ ) { double min = array . get ( 0 ) ; int pos = 0 ; for ( int j = 0 ; j < array . size ( ) ; j ++ ) { double value = array . get ( j ) ; if ( value < min ) { min = value ; pos = j ; } } array . remov... |
public class PolygonImageEvaluator { /** * Render the polygons as an image and then do a pixel - by - pixel comparison
* against the target image . The fitness score is the total error . A lower
* score means a closer match .
* @ param candidate The image to evaluate .
* @ param population Not used .
* @ retu... | // Use one renderer per thread because they are not thread safe .
Renderer < List < ColouredPolygon > , BufferedImage > renderer = threadLocalRenderer . get ( ) ; if ( renderer == null ) { renderer = new PolygonImageRenderer ( new Dimension ( width , height ) , false , transform ) ; threadLocalRenderer . set ( renderer... |
public class OperationsInner { /** * Lists operations for the resource provider .
* Lists all the supported operations by the Microsoft . DevSpaces resource provider along with their description .
* @ param nextPageLink The NextLink from the previous successful call to List operation .
* @ throws IllegalArgumentE... | return listNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < ResourceProviderOperationDefinitionInner > > , Page < ResourceProviderOperationDefinitionInner > > ( ) { @ Override public Page < ResourceProviderOperationDefinitionInner > call ( ServiceResponse < Page < ResourceProvi... |
public class RollupConfig { /** * Fetches the RollupInterval corresponding to the integer interval in seconds .
* It returns a list of matching RollupInterval and best next matches in the
* order . It will help to search on the next best rollup tables .
* It is guaranteed that it return a non - empty list
* For... | if ( interval <= 0 ) { throw new IllegalArgumentException ( "Interval cannot be null or empty" ) ; } final Map < Long , RollupInterval > rollups = new TreeMap < Long , RollupInterval > ( Collections . reverseOrder ( ) ) ; boolean right_match = false ; for ( RollupInterval rollup : forward_intervals . values ( ) ) { if ... |
public class N1qlParams { /** * Sets the { @ link DocumentFragment } s resulting of a mutation this query should be consistent with .
* @ param fragments the fragments returned from a mutation .
* @ return this { @ link N1qlParams } for chaining . */
@ InterfaceStability . Committed public N1qlParams consistentWith... | return consistentWith ( MutationState . from ( fragments ) ) ; |
public class MapDotApi { /** * Walks by map ' s nodes and extracts optional value of type T .
* @ param < T > value type
* @ param clazz type of value
* @ param map subject
* @ param pathString nodes to walk in map
* @ return value of type T */
public static < T > T dotGetNullable ( final Map map , final Clas... | if ( pathString == null || pathString . isEmpty ( ) ) { throw new IllegalArgumentException ( PATH_MUST_BE_SPECIFIED ) ; } if ( ! pathString . contains ( SEPARATOR ) ) { return ( T ) map . get ( pathString ) ; } final Object [ ] path = pathString . split ( SEPARATOR_REGEX ) ; return MapApi . getUnsafe ( map , clazz , pa... |
public class PrimMSTFinder { public void computeMST ( double [ ] [ ] costs , UndirectedGraph graph ) throws ContradictionException { } } | g = graph ; for ( int i = 0 ; i < n ; i ++ ) { Tree . getNeighOf ( i ) . clear ( ) ; } this . costs = costs ; heap . clear ( ) ; inTree . clear ( ) ; treeCost = 0 ; tSize = 0 ; prim ( ) ; |
public class MoneyUtil { /** * 人民币金额单位转换 , 元转换成分 , 例如 : 1 = > 100 */
public static BigDecimal yuan2fen ( String y ) { } } | return new BigDecimal ( Math . round ( new BigDecimal ( y ) . multiply ( new BigDecimal ( 100 ) ) . doubleValue ( ) ) ) ; |
public class DataSetUtils { /** * Range - partitions a DataSet on the specified tuple field positions . */
public static < T > PartitionOperator < T > partitionByRange ( DataSet < T > input , DataDistribution distribution , int ... fields ) { } } | return new PartitionOperator < > ( input , PartitionOperatorBase . PartitionMethod . RANGE , new Keys . ExpressionKeys < > ( fields , input . getType ( ) , false ) , distribution , Utils . getCallLocationName ( ) ) ; |
public class MapReference { /** * Decodes a document in to entities
* @ param datastore the datastore
* @ param mapper the mapper
* @ param mappedField the MappedField
* @ param dbObject the DBObject to decode
* @ return the entities */
public static MapReference decode ( final Datastore datastore , final Map... | final Class subType = mappedField . getTypeParameters ( ) . get ( 0 ) . getSubClass ( ) ; final Map < String , Object > ids = ( Map < String , Object > ) mappedField . getDbObjectValue ( dbObject ) ; MapReference reference = null ; if ( ids != null ) { reference = new MapReference ( datastore , mapper . getMappedClass ... |
public class Semver { /** * Returns the greatest difference between 2 versions .
* For example , if the current version is " 1.2.3 " and compared version is " 1.3.0 " , the biggest difference
* is the ' MINOR ' number .
* @ param version the version to compare
* @ return the greatest difference */
public Versio... | if ( ! Objects . equals ( this . major , version . getMajor ( ) ) ) return VersionDiff . MAJOR ; if ( ! Objects . equals ( this . minor , version . getMinor ( ) ) ) return VersionDiff . MINOR ; if ( ! Objects . equals ( this . patch , version . getPatch ( ) ) ) return VersionDiff . PATCH ; if ( ! areSameSuffixes ( vers... |
public class CommonMatchers { /** * = = > COMMON = = > */
public static Matcher < JsonElement > isOfType ( final String type ) { } } | return new TypeSafeDiagnosingMatcher < JsonElement > ( ) { @ Override protected boolean matchesSafely ( JsonElement item , Description mismatchDescription ) { if ( type . equals ( item . getJsonType ( ) ) ) return true ; else { mismatchDescription . appendText ( ", mismatch type '" + item . getJsonType ( ) + "'" ) ; re... |
public class AFPTwister { /** * Set the list of equivalent residues in the two proteins given a list of
* AFPs
* WARNING : changes the values for FocusRes1 , focusRes2 and FocusResn in
* afpChain !
* @ param afpChain
* the AFPChain to store resuts
* @ param afpn
* nr of afp
* @ param afpPositions
* @ ... | int [ ] res1 = afpChain . getFocusRes1 ( ) ; int [ ] res2 = afpChain . getFocusRes2 ( ) ; int minLen = afpChain . getMinLen ( ) ; int n = 0 ; List < AFP > afpSet = afpChain . getAfpSet ( ) ; for ( int i = listStart ; i < listStart + afpn ; i ++ ) { int a = afpPositions [ i ] ; for ( int j = 0 ; j < afpSet . get ( a ) .... |
public class SeaGlassRootPaneUI { /** * Installs the necessary Listeners on the parent < code > Window < / code > , if
* there is one .
* < p > This takes the parent so that cleanup can be done from < code >
* removeNotify < / code > , at which point the parent hasn ' t been reset yet . < / p >
* @ param root t... | if ( parent instanceof Window ) { window = ( Window ) parent ; } else { window = SwingUtilities . getWindowAncestor ( parent ) ; } if ( window != null ) { if ( mouseInputListener == null ) { mouseInputListener = createWindowMouseInputListener ( root ) ; } window . addMouseListener ( mouseInputListener ) ; window . addM... |
public class CmsXmlContentDefinition { /** * Generates a valid locale ( language ) element for the XML schema of this content definition . < p >
* @ param cms the current users OpenCms context
* @ param document the OpenCms XML document the XML is created for
* @ param root the root node of the document where to ... | // add an element with a " locale " attribute to the given root node
Element element = root . addElement ( getInnerName ( ) ) ; element . addAttribute ( XSD_ATTRIBUTE_VALUE_LANGUAGE , locale . toString ( ) ) ; // now generate the default XML for the element
return createDefaultXml ( cms , document , element , locale ) ... |
public class CouponSetUrl { /** * Get Resource Url for UpdateCouponSet
* @ param couponSetCode The unique identifier of the coupon set .
* @ param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object . This parameter should only be used to ... | UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/couponsets/{couponSetCode}?responseFields={responseFields}" ) ; formatter . formatUrl ( "couponSetCode" , couponSetCode ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl... |
public class PrefixedProperties { /** * ( non - Javadoc )
* @ see java . util . Properties # save ( java . io . OutputStream , java . lang . String ) */
@ SuppressWarnings ( "deprecation" ) @ Override public void save ( final OutputStream out , final String comments ) { } } | lock . readLock ( ) . lock ( ) ; try { properties . save ( out , comments ) ; } finally { lock . readLock ( ) . unlock ( ) ; } |
public class EvaluationBinary { /** * Merge the other evaluation object into this one . The result is that this { @ link # EvaluationBinary } instance contains the counts
* etc from both
* @ param other EvaluationBinary object to merge into this one . */
@ Override public void merge ( EvaluationBinary other ) { } } | if ( other . countTruePositive == null ) { // Other is empty - no op
return ; } if ( countTruePositive == null ) { // This evaluation is empty - > take results from other
this . countTruePositive = other . countTruePositive ; this . countFalsePositive = other . countFalsePositive ; this . countTrueNegative = other . co... |
public class tmglobal_auditnslogpolicy_binding { /** * Use this API to fetch filtered set of tmglobal _ auditnslogpolicy _ binding resources .
* filter string should be in JSON format . eg : " port : 80 , servicetype : HTTP " . */
public static tmglobal_auditnslogpolicy_binding [ ] get_filtered ( nitro_service servic... | tmglobal_auditnslogpolicy_binding obj = new tmglobal_auditnslogpolicy_binding ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; tmglobal_auditnslogpolicy_binding [ ] response = ( tmglobal_auditnslogpolicy_binding [ ] ) obj . getfiltered ( service , option ) ; return response ; |
public class ClientRegistry { /** * Renders the { @ link ItemStack } with a registered { @ link IItemRenderer } .
* @ param itemStack the item stack
* @ return true , if successful */
boolean renderItem ( ItemStack itemStack ) { } } | if ( itemStack . isEmpty ( ) ) return false ; IItemRenderer renderer = getItemRendererOverride ( itemStack ) ; if ( renderer == null ) renderer = itemRenderers . get ( itemStack . getItem ( ) ) ; if ( renderer == null ) return false ; renderer . renderItem ( itemStack , MalisisRenderer . getPartialTick ( ) ) ; return t... |
public class AbstractPluginManager { /** * Tests for already loaded plugins on given path .
* @ param pluginPath the path to investigate
* @ return id of plugin or null if not loaded */
protected String idForPath ( Path pluginPath ) { } } | for ( PluginWrapper plugin : plugins . values ( ) ) { if ( plugin . getPluginPath ( ) . equals ( pluginPath ) ) { return plugin . getPluginId ( ) ; } } return null ; |
public class CommerceOrderUtil { /** * Removes all the commerce orders where userId = & # 63 ; and createDate & lt ; & # 63 ; and orderStatus = & # 63 ; from the database .
* @ param userId the user ID
* @ param createDate the create date
* @ param orderStatus the order status */
public static void removeByU_LtC_... | getPersistence ( ) . removeByU_LtC_O ( userId , createDate , orderStatus ) ; |
public class CmsCloneModuleThread { /** * Creates the target folder for the module clone . < p >
* @ param targetModule the target module
* @ param sourceClassesPath the source module class path
* @ param targetBaseClassesPath the ' classes ' folder of the target module
* @ throws CmsException if something goes... | StringTokenizer tok = new StringTokenizer ( targetModule . getName ( ) , "." ) ; int folderId = CmsResourceTypeFolder . getStaticTypeId ( ) ; String targetClassesPath = targetBaseClassesPath ; while ( tok . hasMoreTokens ( ) ) { String folder = tok . nextToken ( ) ; targetClassesPath += folder + "/" ; if ( ! getCms ( )... |
public class TypefaceHelper { /** * Apply fonts from map to all children of view ( or view itself )
* @ param view view for which to typeface fonts
* @ param typefaceCollection Collection of typefaces */
public static void typeface ( View view , TypefaceCollection typefaceCollection ) { } } | if ( view instanceof ViewGroup ) { applyTypeface ( ( ViewGroup ) view , typefaceCollection ) ; } else { applyForView ( view , typefaceCollection ) ; } |
public class ElasticSearchSchemaService { /** * testable version of { @ link ElasticSearchSchemaService # extractResponse ( Response ) }
* @ param statusCode
* @ param entity
* @ return */
@ VisibleForTesting static String doExtractResponse ( int statusCode , HttpEntity entity ) { } } | String message = null ; if ( entity != null ) { try ( ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ) { entity . writeTo ( baos ) ; message = baos . toString ( "UTF-8" ) ; } catch ( IOException ex ) { throw new SystemException ( ex ) ; } } // if the response is in the 400 range , use IllegalArgumentExcepti... |
public class MtasSolrResultUtil { /** * Rewrite .
* @ param nl the nl
* @ param searchComponent the search component
* @ throws IOException Signals that an I / O exception has occurred . */
public static void rewrite ( NamedList < Object > nl , MtasSolrSearchComponent searchComponent ) throws IOException { } } | rewrite ( nl , searchComponent , true ) ; |
public class Main { /** * Main method of LWJGFont in command line mode . */
public static void main ( String [ ] args ) throws IOException , FontFormatException , URISyntaxException { } } | CliArgumentParser parser = new CliArgumentParser ( args ) ; LwjgFontFactory lwjgFont = new LwjgFontFactory ( parser . get ( _p ) ) ; if ( parser . hasArgument ( _x ) ) { // キャラクターファイルを展開する
lwjgFont . extractCharacterFiles ( ) ; } else if ( parser . hasArgument ( _v ) ) { // バージョンを表示する
lwjgFont . printVersion ( ) ; } ... |
public class DefaultTaskManager { /** * TaskManager implementation */
public void run ( ) { } } | this . currentThread = Thread . currentThread ( ) ; this . running . set ( true ) ; while ( this . running . get ( ) ) { Task nextTask = null ; try { if ( _logger . isDebugEnabled ( ) ) _logger . debug ( "Waiting for next task..." ) ; nextTask = this . taskSet . take ( ) ; if ( _logger . isDebugEnabled ( ) ) _logger . ... |
public class ProfileUtilities { public static String describeExtensionContext ( StructureDefinition ext ) { } } | CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder ( ) ; for ( StringType t : ext . getContext ( ) ) b . append ( t . getValue ( ) ) ; if ( ! ext . hasContextType ( ) ) throw new Error ( "no context type on " + ext . getUrl ( ) ) ; switch ( ext . getContextType ( ) ) { case DATATYPE : return "Use on data t... |
public class PaxChronology { /** * Obtains a local date in Pax calendar system from the
* era , year - of - era and day - of - year fields .
* @ param era the Pax era , not null
* @ param yearOfEra the year - of - era
* @ param dayOfYear the day - of - year
* @ return the Pax local date , not null
* @ throw... | return dateYearDay ( prolepticYear ( era , yearOfEra ) , dayOfYear ) ; |
public class EnumHelper { /** * Get the enum value with the passed ID . If no such ID is present , an
* { @ link IllegalArgumentException } is thrown .
* @ param < KEYTYPE >
* The ID type
* @ param < ENUMTYPE >
* The enum type
* @ param aClass
* The enum class
* @ param aID
* The ID to search
* @ re... | final ENUMTYPE aEnum = getFromIDOrNull ( aClass , aID ) ; if ( aEnum == null ) throw new IllegalArgumentException ( "Failed to resolve ID " + aID + " within class " + aClass ) ; return aEnum ; |
public class RequestUtils { /** * Returns a cookie by name , null if not found .
* @ param name name of a cookie .
* @ return a cookie by name , null if not found . */
public static Cookie cookie ( String name ) { } } | javax . servlet . http . Cookie [ ] servletCookies = RequestContext . getHttpRequest ( ) . getCookies ( ) ; if ( servletCookies != null ) { for ( javax . servlet . http . Cookie servletCookie : servletCookies ) { if ( servletCookie . getName ( ) . equals ( name ) ) { return Cookie . fromServletCookie ( servletCookie ) ... |
public class BondSigmaElectronegativityDescriptor { /** * The method calculates the sigma electronegativity of a given bond
* It is needed to call the addExplicitHydrogensToSatisfyValency method from the class tools . HydrogenAdder .
* @ param atomContainer AtomContainer
* @ return return the sigma electronegativ... | IAtomContainer ac ; IBond bond ; try { ac = ( IAtomContainer ) atomContainer . clone ( ) ; bond = ac . getBond ( atomContainer . indexOf ( aBond ) ) ; AtomContainerManipulator . percieveAtomTypesAndConfigureAtoms ( ac ) ; } catch ( CDKException e ) { return getDummyDescriptorValue ( e ) ; } catch ( CloneNotSupportedExc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.