signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ULocale { /** * < strong > [ icu ] < / strong > Returns a locale ' s country localized for display in the provided locale . * < b > Warning : < / b > this is for the region part of a valid locale ID ; it cannot just be the region code ( like " FR " ) . * To get the display name for a region alone , or for other options , use { @ link LocaleDisplayNames } instead . * This is a cover for the ICU4C API . * @ param localeID the id of the locale whose country will be displayed . * @ param displayLocale the locale in which to display the name . * @ return the localized country name . */ public static String getDisplayCountry ( String localeID , ULocale displayLocale ) { } }
return getDisplayCountryInternal ( new ULocale ( localeID ) , displayLocale ) ;
public class CDKMCS { /** * Transforms an AtomContainer into atom BitSet ( which ' s size = number of bondA1 * in the atomContainer , all the bit are set to true ) . * @ param atomContainer AtomContainer to transform * @ return The bitSet */ public static BitSet getBitSet ( IAtomContainer atomContainer ) { } }
BitSet bitSet ; int size = atomContainer . getBondCount ( ) ; if ( size != 0 ) { bitSet = new BitSet ( size ) ; for ( int i = 0 ; i < size ; i ++ ) { bitSet . set ( i ) ; } } else { bitSet = new BitSet ( ) ; } return bitSet ;
public class ResourcePatternUtils { /** * Return a default ResourcePatternResolver for the given ResourceLoader . * < p > This might be the ResourceLoader itself , if it implements the * ResourcePatternResolver extension , or a PathMatchingResourcePatternResolver * built on the given ResourceLoader . * @ param resourceLoader the ResourceLoader to build a pattern resolver for * ( may be { @ code null } to indicate a default ResourceLoader ) * @ return the ResourcePatternResolver * @ see PathMatchingResourcePatternResolver */ public static ResourcePatternResolver getResourcePatternResolver ( ResourceLoader resourceLoader ) { } }
Assert . notNull ( resourceLoader , "ResourceLoader must not be null" ) ; if ( resourceLoader instanceof ResourcePatternResolver ) { return ( ResourcePatternResolver ) resourceLoader ; } else if ( resourceLoader != null ) { return new PathMatchingResourcePatternResolver ( resourceLoader ) ; } else { return new PathMatchingResourcePatternResolver ( ) ; }
public class ResponseTimeRootCauseMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ResponseTimeRootCause responseTimeRootCause , ProtocolMarshaller protocolMarshaller ) { } }
if ( responseTimeRootCause == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( responseTimeRootCause . getServices ( ) , SERVICES_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class JSON { /** * Encodes a object into a JSON string and outputs a file . * @ param source A object to encode . * @ param file An output file . * @ throws IOException * If an I / O error is occurred . * @ throws ParserException * If an error is occurred while parsing the read data . */ public void encode ( Object source , File file ) throws IOException , ParserException { } }
Writer writer = null ; try { writer = new Writer ( file ) ; net . arnx . jsonic . JSON . encode ( source , writer , true ) ; } catch ( net . arnx . jsonic . JSONException e ) { throw new ParserException ( e . getMessage ( ) ) ; } finally { if ( writer != null ) writer . close ( ) ; }
public class FieldAccessor { /** * { @ link XlsMapColumns } フィールド用のラベル情報を設定します 。 * < p > ラベル情報を保持するフィールドがない場合は 、 処理はスキップされます 。 < / p > * @ param targetObj フィールドが定義されているクラスのインスタンス * @ param label ラベル情報 * @ param key マップのキー * @ throws IllegalArgumentException { @ literal targetObj = = null or label = = null or key = = null } * @ throws IllegalArgumentException { @ literal label or key is empty . } */ public void setMapLabel ( final Object targetObj , final String label , final String key ) { } }
ArgUtils . notNull ( targetObj , "targetObj" ) ; ArgUtils . notEmpty ( label , "label" ) ; ArgUtils . notEmpty ( key , "key" ) ; mapLabelSetter . ifPresent ( setter -> setter . set ( targetObj , label , key ) ) ;
public class UserDataHelpers { /** * Reads user data from a string and processes with with # { @ link UserDataHelpers # processUserData ( Properties , File ) } . * @ param rawProperties the user data as a string * @ param outputDirectory a directory into which files should be written * If null , files sent with { @ link # ENCODE _ FILE _ CONTENT _ PREFIX } will not be written . * @ return a non - null object * @ throws IOException if something went wrong */ public static Properties readUserData ( String rawProperties , File outputDirectory ) throws IOException { } }
Properties result = new Properties ( ) ; StringReader reader = new StringReader ( rawProperties ) ; result . load ( reader ) ; return processUserData ( result , outputDirectory ) ;
public class DescribeHostReservationsResult { /** * Details about the reservation ' s configuration . * @ return Details about the reservation ' s configuration . */ public java . util . List < HostReservation > getHostReservationSet ( ) { } }
if ( hostReservationSet == null ) { hostReservationSet = new com . amazonaws . internal . SdkInternalList < HostReservation > ( ) ; } return hostReservationSet ;
public class VMath { /** * Computes component - wise v1 * s1 - v2 * s2. * @ param v1 first vector * @ param s1 the scaling factor for v1 * @ param v2 the vector to be subtracted from this vector * @ param s2 the scaling factor for v2 * @ return v1 * s1 - v2 * s2 */ public static double [ ] timesMinusTimes ( final double [ ] v1 , final double s1 , final double [ ] v2 , final double s2 ) { } }
assert v1 . length == v2 . length : ERR_VEC_DIMENSIONS ; final double [ ] sub = new double [ v1 . length ] ; for ( int i = 0 ; i < v1 . length ; i ++ ) { sub [ i ] = v1 [ i ] * s1 - v2 [ i ] * s2 ; } return sub ;
public class RpcUtils { /** * Calls the given { @ link RpcCallable } and handles any exceptions thrown . If the RPC fails , a * warning or error will be logged . * @ param logger the logger to use for this call * @ param callable the callable to call * @ param methodName the name of the method , used for metrics * @ param description the format string of the description , used for logging * @ param responseObserver gRPC response observer * @ param args the arguments for the description * @ param < T > the return type of the callable */ public static < T > void call ( Logger logger , RpcCallable < T > callable , String methodName , String description , StreamObserver < T > responseObserver , Object ... args ) { } }
call ( logger , callable , methodName , false , description , responseObserver , args ) ;
public class TimeParametersImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public NotificationChain basicSetProcessingTime ( Parameter newProcessingTime , NotificationChain msgs ) { } }
Parameter oldProcessingTime = processingTime ; processingTime = newProcessingTime ; if ( eNotificationRequired ( ) ) { ENotificationImpl notification = new ENotificationImpl ( this , Notification . SET , BpsimPackage . TIME_PARAMETERS__PROCESSING_TIME , oldProcessingTime , newProcessingTime ) ; if ( msgs == null ) msgs = notification ; else msgs . add ( notification ) ; } return msgs ;
public class Requirement { /** * Builds a requirement following the rules of NPM . * @ param requirement the requirement as a string * @ return the generated requirement */ public static Requirement buildNPM ( String requirement ) { } }
if ( requirement . isEmpty ( ) ) { requirement = "*" ; } return buildWithTokenizer ( requirement , Semver . SemverType . NPM ) ;
public class PartitionManagerImpl { /** * Calculate a new partition based on the current topology . * It should be invoked as a result of a topology event and it is executed by the coordinator node . * It updated the new and old partition state on the " partition " cache . * This can take some time , avoid timeouts by allowing longer waits for pending client calls */ @ SuppressWarnings ( "unchecked" ) private void processTopologyChange ( ) { } }
if ( distributed && cacheManager . isCoordinator ( ) ) { /* Process nodes / buckets map */ Map < Integer , Integer > oldBuckets = ( Map < Integer , Integer > ) partitionCache . get ( BUCKETS ) ; List < Integer > members = new ArrayList ( ) ; cacheManager . getMembers ( ) . stream ( ) . forEach ( a -> { members . add ( a . hashCode ( ) ) ; } ) ; Map < Integer , Integer > newBuckets = updateBuckets ( oldBuckets , members ) ; if ( log . isDebugEnabled ( ) ) { log . debug ( "Processing Topology Change" ) ; log . debugf ( "Old buckets: %s" , oldBuckets ) ; log . debugf ( "New buckets: %s" , newBuckets ) ; } /* Process partition map */ final List < PartitionEntry > entries = new ArrayList < > ( ) ; Map < PartitionEntry , Integer > oldPartition = ( Map < PartitionEntry , Integer > ) partitionCache . get ( CURRENT ) ; Map < PartitionEntry , Integer > newPartition ; if ( oldPartition == null ) { // Initial load of all triggers Collection < Trigger > triggers ; try { triggers = definitionsService . getAllTriggers ( ) ; triggers . stream ( ) . forEach ( t -> { PartitionEntry entry = new PartitionEntry ( t . getTenantId ( ) , t . getId ( ) ) ; entries . add ( entry ) ; } ) ; } catch ( Exception e ) { log . errorCannotInitializePartitionManager ( e . toString ( ) ) ; } } else { oldPartition . keySet ( ) . stream ( ) . forEach ( e -> { entries . add ( e ) ; } ) ; } newPartition = calculatePartition ( entries , newBuckets ) ; if ( log . isDebugEnabled ( ) ) { log . debugf ( "Old partition: %s" , oldPartition ) ; log . debugf ( "New partition: %s" , newPartition ) ; } partitionCache . startBatch ( ) ; partitionCache . put ( BUCKETS , newBuckets ) ; if ( oldPartition != null ) { partitionCache . put ( PREVIOUS , oldPartition ) ; } partitionCache . put ( CURRENT , newPartition ) ; partitionCache . endBatch ( true ) ; partitionCache . put ( PARTITION_CHANGE , new Date ( ) , LIFESPAN , TimeUnit . MILLISECONDS ) ; }
public class ProxyManager { /** * Given a proxy URL returns a two element arrays containing the user name and the password . The second component * of the array is null if no password is specified . * @ param url The proxy host URL . * @ return An optional containing an array of the user name and the password or empty when none are present or * the url is empty . */ private Optional < String [ ] > parseCredentials ( String url ) { } }
if ( ! Strings . isNullOrEmpty ( url ) ) { int p ; if ( ( p = url . indexOf ( "://" ) ) != - 1 ) { url = url . substring ( p + 3 ) ; } if ( ( p = url . indexOf ( '@' ) ) != - 1 ) { String [ ] result = new String [ 2 ] ; String credentials = url . substring ( 0 , p ) ; if ( ( p = credentials . indexOf ( ':' ) ) != - 1 ) { result [ 0 ] = credentials . substring ( 0 , p ) ; result [ 1 ] = credentials . substring ( p + 1 ) ; } else { result [ 0 ] = credentials ; result [ 1 ] = "" ; } return Optional . of ( result ) ; } } return Optional . empty ( ) ;
public class InternalUtils { /** * Write an error to the response . */ public static void sendError ( String messageKey , Throwable cause , ServletRequest request , HttpServletResponse response , Object [ ] messageArgs ) throws IOException { } }
// TODO : the following null check will be unnecessary once the deprecated // FlowController . sendError ( String , HttpServletResponse ) is removed . boolean avoidDirectResponseOutput = request != null ? avoidDirectResponseOutput ( request ) : false ; sendError ( messageKey , messageArgs , request , response , cause , avoidDirectResponseOutput ) ;
public class EntityListenersService { /** * Removes an entity listener for a entity of the given class * @ param entityListener entity listener for a entity * @ return boolean */ public boolean removeEntityListener ( String repoFullName , EntityListener entityListener ) { } }
lock . writeLock ( ) . lock ( ) ; try { verifyRepoRegistered ( repoFullName ) ; SetMultimap < Object , EntityListener > entityListeners = this . entityListenersByRepo . get ( repoFullName ) ; if ( entityListeners . containsKey ( entityListener . getEntityId ( ) ) ) { entityListeners . remove ( entityListener . getEntityId ( ) , entityListener ) ; return true ; } return false ; } finally { lock . writeLock ( ) . unlock ( ) ; }
public class Stream { /** * Zip together the iterators until all of them runs out of values . * Each array of values is combined into a single value using the supplied zipFunction function . * @ param c * @ param valuesForNone value to fill for any iterator runs out of values . * @ param zipFunction * @ return */ public static < T , R > Stream < R > zip ( final Collection < ? extends Stream < ? extends T > > c , final List < ? extends T > valuesForNone , final Function < ? super List < ? extends T > , R > zipFunction ) { } }
if ( N . isNullOrEmpty ( c ) ) { return Stream . empty ( ) ; } final int len = c . size ( ) ; if ( len != valuesForNone . size ( ) ) { throw new IllegalArgumentException ( "The size of 'valuesForNone' must be same as the size of the collection of iterators" ) ; } final Stream < ? extends T > [ ] ss = c . toArray ( new Stream [ len ] ) ; final ObjIterator < ? extends T > [ ] iters = new ObjIterator [ len ] ; for ( int i = 0 ; i < len ; i ++ ) { iters [ i ] = ss [ i ] . iteratorEx ( ) ; } return new IteratorStream < > ( new ObjIteratorEx < R > ( ) { @ Override public boolean hasNext ( ) { for ( int i = 0 ; i < len ; i ++ ) { if ( iters [ i ] != null ) { if ( iters [ i ] . hasNext ( ) ) { return true ; } else if ( iters [ i ] != null ) { iters [ i ] = null ; ss [ i ] . close ( ) ; } } } return false ; } @ Override public R next ( ) { final Object [ ] args = new Object [ len ] ; boolean hasNext = false ; for ( int i = 0 ; i < len ; i ++ ) { if ( iters [ i ] != null && iters [ i ] . hasNext ( ) ) { hasNext = true ; args [ i ] = iters [ i ] . next ( ) ; } else { args [ i ] = valuesForNone . get ( i ) ; } } if ( hasNext == false ) { throw new NoSuchElementException ( ) ; } return zipFunction . apply ( Arrays . asList ( ( T [ ] ) args ) ) ; } } ) ;
public class CmsEditLoginView { /** * Checks whether the entered start end end times are valid . < p > * @ return < code > true < / code > in case the times are valid */ boolean hasValidTimes ( ) { } }
if ( ( getEnd ( ) > 0L ) && ( getEnd ( ) < System . currentTimeMillis ( ) ) ) { return false ; } return ( ( getEnd ( ) == 0 ) | ( getStart ( ) == 0 ) ) || ( getEnd ( ) >= getStart ( ) ) ;
public class StringValueArray { @ Override public int compareTo ( ValueArray < StringValue > o ) { } }
StringValueArray other = ( StringValueArray ) o ; // sorts first on number of data in the array , then comparison between // the first non - equal element in the arrays int cmp = Integer . compare ( position , other . position ) ; if ( cmp != 0 ) { return cmp ; } for ( int i = 0 ; i < position ; i ++ ) { cmp = Byte . compare ( data [ i ] , other . data [ i ] ) ; if ( cmp != 0 ) { return cmp ; } } return 0 ;
public class Bzip2HuffmanAllocator { /** * Fills the code array with extended parent pointers . * @ param array The code length array */ private static void setExtendedParentPointers ( final int [ ] array ) { } }
final int length = array . length ; array [ 0 ] += array [ 1 ] ; for ( int headNode = 0 , tailNode = 1 , topNode = 2 ; tailNode < length - 1 ; tailNode ++ ) { int temp ; if ( topNode >= length || array [ headNode ] < array [ topNode ] ) { temp = array [ headNode ] ; array [ headNode ++ ] = tailNode ; } else { temp = array [ topNode ++ ] ; } if ( topNode >= length || ( headNode < tailNode && array [ headNode ] < array [ topNode ] ) ) { temp += array [ headNode ] ; array [ headNode ++ ] = tailNode + length ; } else { temp += array [ topNode ++ ] ; } array [ tailNode ] = temp ; }
public class ErrorMessages { /** * Report an error message . This may additionally sanity check the supplied * context . * @ param e * @ param code * @ param context */ public static void syntaxError ( SyntacticItem e , int code , SyntacticItem ... context ) { } }
WyilFile wf = ( WyilFile ) e . getHeap ( ) ; // Allocate syntax error in the heap ) ) ; SyntacticItem . Marker m = wf . allocate ( new WyilFile . SyntaxError ( code , e , new Tuple < > ( context ) ) ) ; // Record marker to ensure it gets written to disk wf . getModule ( ) . addAttribute ( m ) ;
public class Stream { /** * Implementation methods responsible of forwarding all the elements of the Stream to the * Handler specified . This method is called by { @ link # toHandler ( Handler ) } to perform internal * iteration , with the guarantee that it is called at most once and with the Stream in the * < i > available < / i > state . As a best practice , the method should intercept * { @ link Thread # interrupt ( ) } requests and stop iteration , if possible ; also remember to call * { @ link Handler # handle ( Object ) } with a null argument after the last element is reached , in * order to signal the end of the sequence . * @ param handler * the { @ code Handler } where to forward elements * @ throws Throwable * in case of failure */ protected void doToHandler ( final Handler < ? super T > handler ) throws Throwable { } }
final Iterator < T > iterator = doIterator ( ) ; while ( iterator . hasNext ( ) ) { if ( Thread . interrupted ( ) ) { return ; } handler . handle ( iterator . next ( ) ) ; } handler . handle ( null ) ;
public class ColumnVisibility { /** * Properly quotes terms in a column visibility expression . If no quoting is needed , then nothing is done . * Examples of using quote : * < pre > * import static org . apache . accumulo . core . security . ColumnVisibility . quote ; * ColumnVisibility cv = new ColumnVisibility ( quote ( & quot ; A # C & quot ; ) + & quot ; & amp ; & quot ; + quote ( & quot ; FOO & quot ; ) ) ; * < / pre > * @ param term term to quote * @ return quoted term ( unquoted if unnecessary ) */ public static String quote ( String term ) { } }
return new String ( quote ( term . getBytes ( Constants . UTF8 ) ) , Constants . UTF8 ) ;
public class PointerCoords { /** * Gets the value associated with the specified axis . * @ param axis The axis identifier for the axis value to retrieve . * @ return The value associated with the axis , or 0 if none . */ public float getAxisValue ( int axis ) { } }
switch ( axis ) { case AXIS_X : return x ; case AXIS_Y : return y ; case AXIS_PRESSURE : return pressure ; case AXIS_SIZE : return size ; case AXIS_TOUCH_MAJOR : return touchMajor ; case AXIS_TOUCH_MINOR : return touchMinor ; case AXIS_TOOL_MAJOR : return toolMajor ; case AXIS_TOOL_MINOR : return toolMinor ; case AXIS_ORIENTATION : return orientation ; default : { if ( axis < 0 || axis > 63 ) { throw new IllegalArgumentException ( "Axis out of range." ) ; } final long bits = mPackedAxisBits ; final long axisBit = 1L << axis ; if ( ( bits & axisBit ) == 0 ) { return 0 ; } final int index = Long . bitCount ( bits & ( axisBit - 1L ) ) ; return mPackedAxisValues [ index ] ; } }
public class WDataTable { /** * Updates the bean using the table data model ' s { @ link TableDataModel # setValueAt ( Object , int , int ) } method . */ @ Override public void updateBeanValue ( ) { } }
TableDataModel model = getDataModel ( ) ; if ( model instanceof ScrollableTableDataModel ) { LOG . warn ( "UpdateBeanValue only updating the current page for ScrollableTableDataModel" ) ; updateBeanValueCurrentPageOnly ( ) ; } else if ( model . getRowCount ( ) > 0 ) { // Temporarily widen the pagination on the repeater to hold all rows // Calling setBean with a non - null value overrides the DataTableBeanProvider repeater . setBean ( new RowIdList ( 0 , model . getRowCount ( ) - 1 ) ) ; updateBeanValueCurrentPageOnly ( ) ; repeater . setBean ( null ) ; }
public class CommonOps_DDF3 { /** * Returns the value of the element in the matrix that has the largest value . < br > * < br > * Max { a < sub > ij < / sub > } for all i and j < br > * @ param a A matrix . Not modified . * @ return The max element value of the matrix . */ public static double elementMax ( DMatrix3x3 a ) { } }
double max = a . a11 ; if ( a . a12 > max ) max = a . a12 ; if ( a . a13 > max ) max = a . a13 ; if ( a . a21 > max ) max = a . a21 ; if ( a . a22 > max ) max = a . a22 ; if ( a . a23 > max ) max = a . a23 ; if ( a . a31 > max ) max = a . a31 ; if ( a . a32 > max ) max = a . a32 ; if ( a . a33 > max ) max = a . a33 ; return max ;
public class SparkUtils { /** * Equivalent to { @ link # balancedRandomSplit ( int , int , JavaRDD ) } but for Pair RDDs */ public static < T , U > JavaPairRDD < T , U > [ ] balancedRandomSplit ( int totalObjectCount , int numObjectsPerSplit , JavaPairRDD < T , U > data ) { } }
return balancedRandomSplit ( totalObjectCount , numObjectsPerSplit , data , new Random ( ) . nextLong ( ) ) ;
public class GraphHandler { /** * Helper method to write metric name and timestamp . * @ param writer The writer to which to write . * @ param metric The metric name . * @ param timestamp The timestamp . */ private static void printMetricHeader ( final PrintWriter writer , final String metric , final long timestamp ) { } }
writer . print ( metric ) ; writer . print ( ' ' ) ; writer . print ( timestamp / 1000L ) ; writer . print ( ' ' ) ;
public class CurrencyHelper { /** * Reinitialize all the { @ link PerCurrencySettings } to the original state . */ public static void reinitializeCurrencySettings ( ) { } }
s_aRWLock . writeLocked ( ( ) -> { s_aSettingsMap . clear ( ) ; for ( final ECurrency e : ECurrency . values ( ) ) { s_aSettingsMap . put ( e , new PerCurrencySettings ( e ) ) ; for ( final Locale aLocale : e . matchingLocales ( ) ) if ( ! localeSupportsCurrencyRetrieval ( aLocale ) ) throw new IllegalArgumentException ( "Passed locale " + aLocale + " does not support currency retrieval!" ) ; } } ) ;
public class DbIdentityServiceProvider { /** * tenants / / / / / */ public Tenant createNewTenant ( String tenantId ) { } }
checkAuthorization ( Permissions . CREATE , Resources . TENANT , null ) ; return new TenantEntity ( tenantId ) ;
public class ContentUriBaseErrorListener { /** * / * ( non - Javadoc ) * @ see org . antlr . v4 . runtime . ANTLRErrorListener # reportAmbiguity ( org . antlr . v4 . runtime . Parser , org . antlr . v4 . runtime . dfa . DFA , int , int , boolean , java . util . BitSet , org . antlr . v4 . runtime . atn . ATNConfigSet ) */ @ Override public void reportAmbiguity ( Parser recognizer , DFA dfa , int startIndex , int stopIndex , boolean exact , BitSet ambigAlts , ATNConfigSet configs ) { } }
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link BridgeConstructionElementType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link BridgeConstructionElementType } { @ code > } */ @ XmlElementDecl ( namespace = "http://www.opengis.net/citygml/bridge/2.0" , name = "BridgeConstructionElement" , substitutionHeadNamespace = "http://www.opengis.net/citygml/2.0" , substitutionHeadName = "_CityObject" ) public JAXBElement < BridgeConstructionElementType > createBridgeConstructionElement ( BridgeConstructionElementType value ) { } }
return new JAXBElement < BridgeConstructionElementType > ( _BridgeConstructionElement_QNAME , BridgeConstructionElementType . class , null , value ) ;
public class JcrNodeTypeManager { /** * Get the node definition given the supplied identifier . * @ param definitionId the identifier of the node definition * @ return the node definition , or null if there is no such definition ( or if the ID was null ) */ JcrNodeDefinition getNodeDefinition ( NodeDefinitionId definitionId ) { } }
if ( definitionId == null ) return null ; return nodeTypes ( ) . getChildNodeDefinition ( definitionId ) ;
public class TrainingJobMarshaller { /** * Marshall the given parameter object . */ public void marshall ( TrainingJob trainingJob , ProtocolMarshaller protocolMarshaller ) { } }
if ( trainingJob == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( trainingJob . getTrainingJobName ( ) , TRAININGJOBNAME_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getTrainingJobArn ( ) , TRAININGJOBARN_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getTuningJobArn ( ) , TUNINGJOBARN_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getLabelingJobArn ( ) , LABELINGJOBARN_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getModelArtifacts ( ) , MODELARTIFACTS_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getTrainingJobStatus ( ) , TRAININGJOBSTATUS_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getSecondaryStatus ( ) , SECONDARYSTATUS_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getFailureReason ( ) , FAILUREREASON_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getHyperParameters ( ) , HYPERPARAMETERS_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getAlgorithmSpecification ( ) , ALGORITHMSPECIFICATION_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getRoleArn ( ) , ROLEARN_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getInputDataConfig ( ) , INPUTDATACONFIG_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getOutputDataConfig ( ) , OUTPUTDATACONFIG_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getResourceConfig ( ) , RESOURCECONFIG_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getVpcConfig ( ) , VPCCONFIG_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getStoppingCondition ( ) , STOPPINGCONDITION_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getCreationTime ( ) , CREATIONTIME_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getTrainingStartTime ( ) , TRAININGSTARTTIME_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getTrainingEndTime ( ) , TRAININGENDTIME_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getLastModifiedTime ( ) , LASTMODIFIEDTIME_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getSecondaryStatusTransitions ( ) , SECONDARYSTATUSTRANSITIONS_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getFinalMetricDataList ( ) , FINALMETRICDATALIST_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getEnableNetworkIsolation ( ) , ENABLENETWORKISOLATION_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getEnableInterContainerTrafficEncryption ( ) , ENABLEINTERCONTAINERTRAFFICENCRYPTION_BINDING ) ; protocolMarshaller . marshall ( trainingJob . getTags ( ) , TAGS_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class Props { /** * Returns the long representation of the value . If the value is null , then the default value is * returned . If the value isn ' t a long , then a parse exception will be thrown . */ public long getLong ( final String name , final long defaultValue ) { } }
if ( containsKey ( name ) ) { return Long . parseLong ( get ( name ) ) ; } else { return defaultValue ; }
public class MapperConstructor { /** * This method writes the mapping based on the value of the three MappingType taken in input . * @ param makeDest true if destination is a new instance , false otherwise * @ param mtd mapping type of destination * @ param mts mapping type of source * @ return a String that contains the mapping */ public StringBuilder mapping ( boolean makeDest , MappingType mtd , MappingType mts ) { } }
StringBuilder sb = new StringBuilder ( ) ; if ( isNullSetting ( makeDest , mtd , mts , sb ) ) return sb ; if ( makeDest ) sb . append ( newInstance ( destination , stringOfSetDestination ) ) ; for ( ASimpleOperation simpleOperation : simpleOperations ) sb . append ( setOperation ( simpleOperation , mtd , mts ) . write ( ) ) ; for ( AComplexOperation complexOperation : complexOperations ) sb . append ( setOperation ( complexOperation , mtd , mts ) . write ( makeDest ) ) ; return sb ;
public class XmlSocketUtility { /** * Strips off the top level tag from XML string . < br > * 从XML字符串中去掉最上层的Tag 。 * @ param xmlStringThe XMl string to be processed * @ returnThe result string with top level tag removed . */ static public String stripTopLevelTag ( String xmlString ) { } }
return xmlString . substring ( xmlString . indexOf ( '>' ) + 1 , xmlString . lastIndexOf ( '<' ) ) ;
public class nsparam { /** * Use this API to fetch all the nsparam resources that are configured on netscaler . */ public static nsparam get ( nitro_service service ) throws Exception { } }
nsparam obj = new nsparam ( ) ; nsparam [ ] response = ( nsparam [ ] ) obj . get_resources ( service ) ; return response [ 0 ] ;
public class ProxyBlockingStateDao { /** * Ordering is critical here , especially for Junction */ public static List < BlockingState > sortedCopy ( final Iterable < BlockingState > blockingStates ) { } }
final List < BlockingState > blockingStatesSomewhatSorted = Ordering . < BlockingState > natural ( ) . immutableSortedCopy ( blockingStates ) ; final List < BlockingState > result = new LinkedList < BlockingState > ( ) ; // Make sure same - day transitions are always returned in the same order depending on their attributes final Iterator < BlockingState > iterator = blockingStatesSomewhatSorted . iterator ( ) ; BlockingState prev = null ; while ( iterator . hasNext ( ) ) { final BlockingState current = iterator . next ( ) ; if ( iterator . hasNext ( ) ) { final BlockingState next = iterator . next ( ) ; if ( prev != null && current . getEffectiveDate ( ) . equals ( next . getEffectiveDate ( ) ) && current . getBlockedId ( ) . equals ( next . getBlockedId ( ) ) && ! current . getService ( ) . equals ( next . getService ( ) ) ) { // Same date , same blockable id , different services ( for same - service events , trust the total ordering ) // Make sure block billing transitions are respected first BlockingState prevCandidate = insertTiedBlockingStatesInTheRightOrder ( result , current , next , prev . isBlockBilling ( ) , current . isBlockBilling ( ) , next . isBlockBilling ( ) ) ; if ( prevCandidate == null ) { // Then respect block entitlement transitions prevCandidate = insertTiedBlockingStatesInTheRightOrder ( result , current , next , prev . isBlockEntitlement ( ) , current . isBlockEntitlement ( ) , next . isBlockEntitlement ( ) ) ; if ( prevCandidate == null ) { // And finally block changes transitions prevCandidate = insertTiedBlockingStatesInTheRightOrder ( result , current , next , prev . isBlockChange ( ) , current . isBlockChange ( ) , next . isBlockChange ( ) ) ; if ( prevCandidate == null ) { // Trust the current sorting result . add ( current ) ; result . add ( next ) ; prev = next ; } else { prev = prevCandidate ; } } else { prev = prevCandidate ; } } else { prev = prevCandidate ; } } else { result . add ( current ) ; result . add ( next ) ; prev = next ; } } else { // End of the list result . add ( current ) ; } } return result ;
public class TransactionRomanticContext { /** * Get the value of the romantic transaction . * @ return The value of the transaction time . ( NullAllowed ) */ public static RomanticTransaction getRomanticTransaction ( ) { } }
final Stack < RomanticTransaction > stack = threadLocal . get ( ) ; return stack != null ? stack . peek ( ) : null ;
public class Argument { /** * / * pp */ void expand ( @ Nonnull Preprocessor p ) throws IOException , LexerException { } }
/* Cache expansion . */ if ( expansion == null ) { this . expansion = p . expand ( this ) ; // System . out . println ( " Expanded arg " + this ) ; }
public class CanvasSize { /** * Clip a line on the margin ( modifies arrays ! ) * @ param origin Origin point , < b > will be modified < / b > * @ param target Target point , < b > will be modified < / b > * @ return { @ code false } if entirely outside the margin */ public boolean clipToMargin ( double [ ] origin , double [ ] target ) { } }
assert ( target . length == 2 && origin . length == 2 ) ; if ( ( origin [ 0 ] < minx && target [ 0 ] < minx ) || ( origin [ 0 ] > maxx && target [ 0 ] > maxx ) || ( origin [ 1 ] < miny && target [ 1 ] < miny ) || ( origin [ 1 ] > maxy && target [ 1 ] > maxy ) ) { return false ; } double deltax = target [ 0 ] - origin [ 0 ] ; double deltay = target [ 1 ] - origin [ 1 ] ; double fmaxx = ( maxx - origin [ 0 ] ) / deltax ; double fmaxy = ( maxy - origin [ 1 ] ) / deltay ; double fminx = ( minx - origin [ 0 ] ) / deltax ; double fminy = ( miny - origin [ 1 ] ) / deltay ; double factor1 = MathUtil . min ( 1 , fmaxx > fminx ? fmaxx : fminx , fmaxy > fminy ? fmaxy : fminy ) ; double factor2 = MathUtil . max ( 0 , fmaxx < fminx ? fmaxx : fminx , fmaxy < fminy ? fmaxy : fminy ) ; if ( factor1 <= factor2 ) { return false ; // Clipped ! } target [ 0 ] = origin [ 0 ] + factor1 * deltax ; target [ 1 ] = origin [ 1 ] + factor1 * deltay ; origin [ 0 ] += factor2 * deltax ; origin [ 1 ] += factor2 * deltay ; return true ;
public class AbstractMessage { /** * / * ( non - Javadoc ) * @ see javax . jms . Message # setShortProperty ( java . lang . String , short ) */ @ Override public final void setShortProperty ( String name , short value ) throws JMSException { } }
setProperty ( name , Short . valueOf ( value ) ) ;
public class RegisteredServiceAccessStrategyUtils { /** * Ensure service access is allowed . * @ param service the service * @ param registeredService the registered service */ public static void ensureServiceAccessIsAllowed ( final String service , final RegisteredService registeredService ) { } }
if ( registeredService == null ) { val msg = String . format ( "Unauthorized Service Access. Service [%s] is not found in service registry." , service ) ; LOGGER . warn ( msg ) ; throw new UnauthorizedServiceException ( UnauthorizedServiceException . CODE_UNAUTHZ_SERVICE , msg ) ; } if ( ! registeredService . getAccessStrategy ( ) . isServiceAccessAllowed ( ) ) { val msg = String . format ( "Unauthorized Service Access. Service [%s] is not enabled in service registry." , service ) ; LOGGER . warn ( msg ) ; throw new UnauthorizedServiceException ( UnauthorizedServiceException . CODE_UNAUTHZ_SERVICE , msg ) ; } if ( ! ensureServiceIsNotExpired ( registeredService ) ) { val msg = String . format ( "Expired Service Access. Service [%s] has been expired" , service ) ; LOGGER . warn ( msg ) ; throw new UnauthorizedServiceException ( UnauthorizedServiceException . CODE_EXPIRED_SERVICE , msg ) ; }
public class RecoveryDirectorImpl { /** * Register the recovery event callback listener . * @ param rel The new recovery event listener */ @ Override public void registerRecoveryEventListener ( RecoveryEventListener rel ) /* @ MD19638A */ { } }
if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "registerRecoveryEventListener" , rel ) ; RegisteredRecoveryEventListeners . instance ( ) . add ( rel ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "registerRecoveryEventListener" ) ;
public class PDFDomTree { /** * Creates an element that represents a single page . * @ return the resulting DOM element */ protected Element createPageElement ( ) { } }
String pstyle = "" ; PDRectangle layout = getCurrentMediaBox ( ) ; if ( layout != null ) { /* System . out . println ( " x1 " + layout . getLowerLeftX ( ) ) ; System . out . println ( " y1 " + layout . getLowerLeftY ( ) ) ; System . out . println ( " x2 " + layout . getUpperRightX ( ) ) ; System . out . println ( " y2 " + layout . getUpperRightY ( ) ) ; System . out . println ( " rot " + pdpage . findRotation ( ) ) ; */ float w = layout . getWidth ( ) ; float h = layout . getHeight ( ) ; final int rot = pdpage . getRotation ( ) ; if ( rot == 90 || rot == 270 ) { float x = w ; w = h ; h = x ; } pstyle = "width:" + w + UNIT + ";" + "height:" + h + UNIT + ";" ; pstyle += "overflow:hidden;" ; } else log . warn ( "No media box found" ) ; Element el = doc . createElement ( "div" ) ; el . setAttribute ( "id" , "page_" + ( pagecnt ++ ) ) ; el . setAttribute ( "class" , "page" ) ; el . setAttribute ( "style" , pstyle ) ; return el ;
public class TagTypeImpl { /** * If not already created , a new < code > variable < / code > element will be created and returned . * Otherwise , the first existing < code > variable < / code > element will be returned . * @ return the instance defined for the element < code > variable < / code > */ public VariableType < TagType < T > > getOrCreateVariable ( ) { } }
List < Node > nodeList = childNode . get ( "variable" ) ; if ( nodeList != null && nodeList . size ( ) > 0 ) { return new VariableTypeImpl < TagType < T > > ( this , "variable" , childNode , nodeList . get ( 0 ) ) ; } return createVariable ( ) ;
public class Counters { /** * Returns the named counter group , or an empty group if there is none * with the specified name . */ public synchronized CounterGroup getGroup ( String groupName ) { } }
CounterGroup grp = groups . get ( groupName ) ; if ( grp == null ) { grp = new CounterGroup ( groupName ) ; groups . put ( groupName , grp ) ; } return grp ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcTextLiteral ( ) { } }
if ( ifcTextLiteralEClass == null ) { ifcTextLiteralEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 601 ) ; } return ifcTextLiteralEClass ;
public class MavenDependencyUpstreamCause { /** * TODO create a PR on jenkins - core to make { @ link hudson . model . Cause . UpstreamCause # print ( TaskListener , int ) } protected instead of private * Mimic { @ link hudson . model . Cause . UpstreamCause # print ( TaskListener , int ) } waiting for this method to become protected instead of private * @ see UpstreamCause # print ( TaskListener , int ) */ private void print ( TaskListener listener , int depth ) { } }
indent ( listener , depth ) ; Run < ? , ? > upstreamRun = getUpstreamRun ( ) ; if ( upstreamRun == null ) { listener . getLogger ( ) . println ( "Started by upstream build " + ModelHyperlinkNote . encodeTo ( '/' + getUpstreamUrl ( ) , getUpstreamProject ( ) ) + "\" #" + ModelHyperlinkNote . encodeTo ( '/' + getUpstreamUrl ( ) + getUpstreamBuild ( ) , Integer . toString ( getUpstreamBuild ( ) ) ) + " generating Maven artifact: " + getMavenArtifactsDescription ( ) ) ; } else { listener . getLogger ( ) . println ( "Started by upstream build " + ModelHyperlinkNote . encodeTo ( '/' + upstreamRun . getUrl ( ) , upstreamRun . getFullDisplayName ( ) ) + " generating Maven artifacts: " + getMavenArtifactsDescription ( ) ) ; } if ( getUpstreamCauses ( ) != null && ! getUpstreamCauses ( ) . isEmpty ( ) ) { indent ( listener , depth ) ; listener . getLogger ( ) . println ( "originally caused by:" ) ; for ( Cause cause : getUpstreamCauses ( ) ) { if ( cause instanceof MavenDependencyUpstreamCause ) { ( ( MavenDependencyUpstreamCause ) cause ) . print ( listener , depth + 1 ) ; } else { indent ( listener , depth + 1 ) ; cause . print ( listener ) ; } } }
public class FieldDescriptorConstraints { /** * Constraint that ensures that the field has a column property . If none is specified , then * the name of the field is used . * @ param fieldDef The field descriptor * @ param checkLevel The current check level ( this constraint is checked in all levels ) */ private void ensureColumn ( FieldDescriptorDef fieldDef , String checkLevel ) { } }
if ( ! fieldDef . hasProperty ( PropertyHelper . OJB_PROPERTY_COLUMN ) ) { String javaname = fieldDef . getName ( ) ; if ( fieldDef . isNested ( ) ) { int pos = javaname . indexOf ( "::" ) ; // we convert nested names ( ' _ ' for ' : : ' ) if ( pos > 0 ) { StringBuffer newJavaname = new StringBuffer ( javaname . substring ( 0 , pos ) ) ; int lastPos = pos + 2 ; do { pos = javaname . indexOf ( "::" , lastPos ) ; newJavaname . append ( "_" ) ; if ( pos > 0 ) { newJavaname . append ( javaname . substring ( lastPos , pos ) ) ; lastPos = pos + 2 ; } else { newJavaname . append ( javaname . substring ( lastPos ) ) ; } } while ( pos > 0 ) ; javaname = newJavaname . toString ( ) ; } } fieldDef . setProperty ( PropertyHelper . OJB_PROPERTY_COLUMN , javaname ) ; }
public class ReflectUtil { /** * public static boolean hasException ( AnnotatedMethod < ? > method , Class < ? > exn ) * Class < ? > [ ] methodExceptions = method . getJavaMember ( ) . getExceptionTypes ( ) ; * for ( int j = 0 ; j < methodExceptions . length ; j + + ) { * if ( methodExceptions [ j ] . isAssignableFrom ( exn ) ) * return true ; * return false ; */ public static Field [ ] getDeclaredFields ( Class < ? > cl ) { } }
try { return cl . getDeclaredFields ( ) ; } catch ( NoClassDefFoundError e ) { log . finer ( e . toString ( ) ) ; log . log ( Level . FINEST , e . toString ( ) , e ) ; return new Field [ 0 ] ; }
public class WebSphereCDIDeploymentImpl { /** * Find the bda with the same classloader as the beanClass and then add the beanclasses to it * @ param beanClass * @ param beanClassCL the beanClass classloader * @ return the found bda * @ throws CDIException */ private BeanDeploymentArchive findCandidateBDAtoAddThisClass ( Class < ? > beanClass ) throws CDIException { } }
for ( WebSphereBeanDeploymentArchive wbda : getWebSphereBeanDeploymentArchives ( ) ) { if ( wbda . getClassLoader ( ) == beanClass . getClassLoader ( ) ) { wbda . addToBeanClazzes ( beanClass ) ; return wbda ; } // if the cl is null , which means the classloader is the root classloader // for this kind of bda , its id ends with CDIUtils . BDA _ FOR _ CLASSES _ LOADED _ BY _ ROOT _ CLASSLOADER // all classes loaded by the root classloader should be in a bda with the id ends with CDIUtils . BDA _ FOR _ CLASSES _ LOADED _ BY _ ROOT _ CLASSLOADER if ( ( beanClass . getClassLoader ( ) == null ) && ( wbda . getId ( ) . endsWith ( CDIUtils . BDA_FOR_CLASSES_LOADED_BY_ROOT_CLASSLOADER ) ) ) { wbda . addToBeanClazzes ( beanClass ) ; return wbda ; } } return null ;
public class Numbers { /** * Compares the provided { @ link Number } instances . * The method accepts { @ link Comparable } instances because to compare * something it must be comparable , but { @ link Number } is not comparable . * Special numeric comparison logic is used for { @ link Double } , { @ link Long } , * { @ link Float } , { @ link Integer } , { @ link Short } and { @ link Byte } : * comparison is performed by taking into account only the magnitudes and * signs of the passed numbers , disregarding the actual underlying types . * @ param lhs the left - hand side { @ link Number } . Can ' t be { @ code null } . * @ param rhs the right - hand side { @ link Number } . Can ' t be { @ code null } . * @ return a negative integer , zero , or a positive integer as the left - hand * side { @ link Number } is less than , equal to , or greater than the * right - hand side { @ link Number } . */ @ SuppressWarnings ( "unchecked" ) public static int compare ( Comparable lhs , Comparable rhs ) { } }
Class lhsClass = lhs . getClass ( ) ; Class rhsClass = rhs . getClass ( ) ; assert lhsClass != rhsClass ; assert lhs instanceof Number ; assert rhs instanceof Number ; Number lhsNumber = ( Number ) lhs ; Number rhsNumber = ( Number ) rhs ; if ( isDoubleRepresentable ( lhsClass ) ) { if ( isDoubleRepresentable ( rhsClass ) ) { return Double . compare ( lhsNumber . doubleValue ( ) , rhsNumber . doubleValue ( ) ) ; } else if ( isLongRepresentable ( rhsClass ) ) { return - Integer . signum ( compareLongWithDouble ( rhsNumber . longValue ( ) , lhsNumber . doubleValue ( ) ) ) ; } } else if ( isLongRepresentable ( lhsClass ) ) { if ( isDoubleRepresentable ( rhsClass ) ) { return compareLongWithDouble ( lhsNumber . longValue ( ) , rhsNumber . doubleValue ( ) ) ; } else if ( isLongRepresentable ( rhsClass ) ) { return compareLongs ( lhsNumber . longValue ( ) , rhsNumber . longValue ( ) ) ; } } return lhs . compareTo ( rhs ) ;
public class FLV { /** * Sets a group of writer post processors . * @ param writerPostProcessors IPostProcess implementation class names */ @ SuppressWarnings ( "unchecked" ) public void setWriterPostProcessors ( Set < String > writerPostProcessors ) { } }
if ( writePostProcessors == null ) { writePostProcessors = new LinkedList < > ( ) ; } for ( String writerPostProcessor : writerPostProcessors ) { try { writePostProcessors . add ( ( Class < IPostProcessor > ) Class . forName ( writerPostProcessor ) ) ; } catch ( Exception e ) { log . debug ( "Write post process implementation: {} was not found" , writerPostProcessor ) ; } }
public class BoxAPIResponse { /** * Gets an InputStream for reading this response ' s body which will report its read progress to a ProgressListener . * @ param listener a listener for monitoring the read progress of the body . * @ return an InputStream for reading the response ' s body . */ public InputStream getBody ( ProgressListener listener ) { } }
if ( this . inputStream == null ) { String contentEncoding = this . connection . getContentEncoding ( ) ; try { if ( this . rawInputStream == null ) { this . rawInputStream = this . connection . getInputStream ( ) ; } if ( listener == null ) { this . inputStream = this . rawInputStream ; } else { this . inputStream = new ProgressInputStream ( this . rawInputStream , listener , this . getContentLength ( ) ) ; } if ( contentEncoding != null && contentEncoding . equalsIgnoreCase ( "gzip" ) ) { this . inputStream = new GZIPInputStream ( this . inputStream ) ; } } catch ( IOException e ) { throw new BoxAPIException ( "Couldn't connect to the Box API due to a network error." , e ) ; } } return this . inputStream ;
public class ConfigurationHooksSupport { /** * Register hook for current thread . Must be called before application initialization , otherwise will not * be used at all . * @ param hook hook to register */ public static void register ( final GuiceyConfigurationHook hook ) { } }
if ( HOOKS . get ( ) == null ) { // to avoid duplicate registrations HOOKS . set ( new LinkedHashSet < > ( ) ) ; } HOOKS . get ( ) . add ( hook ) ;
public class FixedDurationTemporalRandomIndexingMain { /** * Prints the instructions on how to execute this program to standard out . */ protected void usage ( ) { } }
System . out . println ( "usage: java FixedDurationTemporalRandomIndexingMain [options] " + "<output-dir>\n\n" + argOptions . prettyPrint ( ) + "\nFixed-Duration TRI provides four main output options:\n\n" + " 1) Outputting each semantic partition as a separate .sspace file. " + "Each file\n is named using the yyyy_MM_ww_dd_hh format to " + "indicate it start date.\n This is the most expensive of the " + "operations due to I/O overhead.\n\n" + " The remaining options require the use of the -I " + "--interestingTokenList option to\n specify a set of word for use" + " in tracking temporal changes.\n\n 2) For each of the interesting" + "words, -P, --printInterestingTokenShifts will track\n" + " the semantics" + " through time and report the semantic shift along with other\n" + " distance statistics.\n\n" + " 3) For each of the interesting words, -N, " + "--printInterestingTokenNeighbors\n will print the nearest " + "neighbor for each in the semantic space. The\n number " + "of neighbors to print should be specified.\n\n" + " 4) For each of the interesting words, generate the list of " + "similar\n neighbors using the --printInterestingTokenNeighbors" + " and then compare\n those neighbors with each other using " + "the\n --printInterestingTokenNeighborComparison option. " + "This creates a file\n with the pair-wise cosine similarities " + "for all neighbors. Note that this\n option requires both " + "flags to be specified.\n\n" + "Semantic filters limit the set of tokens for which the " + "semantics are kept.\nThis limits the potential memory overhead " + "for calculating semantics for a\nlarge set of words." + "\n\n" + OptionDescriptions . COMPOUND_WORDS_DESCRIPTION + "\n\n" + OptionDescriptions . TOKEN_FILTER_DESCRIPTION + "\n\n" + OptionDescriptions . FILE_FORMAT_DESCRIPTION + "\n\n" + OptionDescriptions . HELP_DESCRIPTION ) ;
public class RamlCompilerMojo { /** * Generate the raml file from a given controller source file . * @ param source The controller source file . * @ param model The controller model * @ throws WatchingException If there is a problem while creating the raml file . */ @ Override public void controllerParsed ( File source , ControllerModel < Raml > model ) throws WatchingException { } }
Raml raml = new Raml ( ) ; // Create a new raml file raml . setBaseUri ( baseUri ) ; // set the base uri raml . setVersion ( project ( ) . getVersion ( ) ) ; // Visit the controller model to populate the raml model model . accept ( controllerVisitor , raml ) ; getLog ( ) . info ( "Create raml file for controller " + raml . getTitle ( ) ) ; try { // create the file File output = getRamlOutputFile ( source ) ; FileUtils . write ( output , ramlEmitter . dump ( raml ) ) ; getLog ( ) . info ( "Created the RAML description for " + source . getName ( ) + " => " + output . getAbsolutePath ( ) ) ; } catch ( IOException ie ) { throw new WatchingException ( "Cannot create raml file" , source , ie ) ; } catch ( IllegalArgumentException e ) { throw new WatchingException ( "Cannot create Controller Element from" , e ) ; }
public class CustomTheme { /** * Set the primary colors based on this ( primary1 ) color . */ public void setPrimaryColor ( ColorUIResource primary ) { } }
primaryColor3 = primary ; primaryColor2 = CustomTheme . darken ( primaryColor3 ) ; primaryColor1 = CustomTheme . darken ( primaryColor2 ) ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcEngine ( ) { } }
if ( ifcEngineEClass == null ) { ifcEngineEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 233 ) ; } return ifcEngineEClass ;
public class PartitionedStepControllerImpl { /** * check the batch status of each subJob after it ' s done to see if we need to issue a rollback * start rollback if any have stopped or failed */ private void checkFinishedPartitions ( ) { } }
List < String > failingPartitionSeen = new ArrayList < String > ( ) ; boolean stoppedPartitionSeen = false ; for ( PartitionReplyMsg replyMsg : finishedWork ) { BatchStatus batchStatus = replyMsg . getBatchStatus ( ) ; if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( "For partitioned step: " + getStepName ( ) + ", the partition # " + replyMsg . getPartitionPlanConfig ( ) . getPartitionNumber ( ) + " ended with status '" + batchStatus ) ; } // Keep looping , just to see the log messages perhaps . if ( batchStatus . equals ( BatchStatus . FAILED ) ) { String msg = "For partitioned step: " + getStepName ( ) + ", the partition # " + replyMsg . getPartitionPlanConfig ( ) . getPartitionNumber ( ) + " ended with status '" + batchStatus ; failingPartitionSeen . add ( msg ) ; } // This code seems to suggest it might be valid for a partition to end up in STOPPED state without // the " top - level " step having been aware of this . It ' s unclear from the spec if this is even possible // or a desirable spec interpretation . Nevertheless , we ' ll code it as such noting the ambiguity . // However , in the RI at least , we won ' t bother updating the step level BatchStatus , since to date we // would only transition the status in such a way independently . if ( batchStatus . equals ( BatchStatus . STOPPED ) ) { stoppedPartitionSeen = true ; } } if ( ! failingPartitionSeen . isEmpty ( ) ) { markStepForFailure ( ) ; rollbackPartitionedStep ( ) ; throw new BatchContainerRuntimeException ( "One or more partitions failed: " + failingPartitionSeen ) ; } else if ( isStoppingStoppedOrFailed ( ) ) { rollbackPartitionedStep ( ) ; } else if ( stoppedPartitionSeen ) { // At this point , the top - level job is still running . // If we see a stopped partition , we mark the step / job failed markStepForFailure ( ) ; rollbackPartitionedStep ( ) ; } else { // Call before completion if ( this . partitionReducerProxy != null ) { this . partitionReducerProxy . beforePartitionedStepCompletion ( ) ; } }
public class UIContextHolder { /** * Clears the UIContext stack . This method is called by internal WComponent containers ( e . g . WServlet ) after a * request has been processed . */ public static void reset ( ) { } }
if ( DebugUtil . isDebugFeaturesEnabled ( ) ) { UIContext context = getCurrent ( ) ; ALL_ACTIVE_CONTEXTS . remove ( context ) ; } CONTEXT_STACK . remove ( ) ;
public class Binder { /** * Construct a new Binder using a return type and argument types . * @ param returnType the return type of the incoming signature * @ param argType0 the first argument type of the incoming signature * @ param argTypes the remaining argument types of the incoming signature * @ return the Binder object */ public static Binder from ( Class < ? > returnType , Class < ? > argType0 , Class < ? > ... argTypes ) { } }
return from ( MethodType . methodType ( returnType , argType0 , argTypes ) ) ;
public class ThreadIdentityManager { /** * Remove a J2CIdentityService reference . This method is called by * ThreadIdentityManagerConfigurator when a J2CIdentityService leaves * the OSGI framework . * @ param j2cIdentityService */ public static void removeJ2CIdentityService ( J2CIdentityService j2cIdentityService ) { } }
if ( j2cIdentityService != null ) { j2cIdentityServices . remove ( j2cIdentityService ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "A J2CIdentityService implementation was removed." , j2cIdentityService . getClass ( ) . getName ( ) ) ; } }
public class RequestParam { /** * Returns a request parameter as double . * @ param request Request . * @ param param Parameter name . * @ param defaultValue Default value . * @ return Parameter value or default value if it does not exist or is not a number . */ public static double getDouble ( @ NotNull ServletRequest request , @ NotNull String param , double defaultValue ) { } }
String value = request . getParameter ( param ) ; return NumberUtils . toDouble ( value , defaultValue ) ;
public class Node { /** * Creates a new node as a child of the current node . * @ param name the name of the new node * @ param attributes the attributes of the new node * @ param value the value of the new node * @ return the newly created < code > Node < / code > */ public Node appendNode ( Object name , Map attributes , Object value ) { } }
return new Node ( this , name , attributes , value ) ;
public class Gauge { /** * Returns the color that will be used to colorize the bar background of * the gauge ( if it has a bar ) . * @ param COLOR */ public void setBarBackgroundColor ( final Color COLOR ) { } }
if ( null == barBackgroundColor ) { _barBackgroundColor = COLOR ; fireUpdateEvent ( REDRAW_EVENT ) ; } else { barBackgroundColor . set ( COLOR ) ; }
public class AbstractBlobClob { /** * Throws an exception if the pos value exceeds the max value by which the large object API can * index . * @ param pos Position to write at . * @ param len number of bytes to write . * @ throws SQLException if something goes wrong */ protected void assertPosition ( long pos , long len ) throws SQLException { } }
checkFreed ( ) ; if ( pos < 1 ) { throw new PSQLException ( GT . tr ( "LOB positioning offsets start at 1." ) , PSQLState . INVALID_PARAMETER_VALUE ) ; } if ( pos + len - 1 > Integer . MAX_VALUE ) { throw new PSQLException ( GT . tr ( "PostgreSQL LOBs can only index to: {0}" , Integer . MAX_VALUE ) , PSQLState . INVALID_PARAMETER_VALUE ) ; }
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EEnum getCMRFidelityRepCMREx ( ) { } }
if ( cmrFidelityRepCMRExEEnum == null ) { cmrFidelityRepCMRExEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 169 ) ; } return cmrFidelityRepCMRExEEnum ;
public class ReceiveMessageBuilder { /** * Sets explicit header validators by name . * @ param validatorNames * @ return */ @ SuppressWarnings ( "unchecked" ) public T headerValidator ( String ... validatorNames ) { } }
Assert . notNull ( applicationContext , "Citrus application context is not initialized!" ) ; for ( String validatorName : validatorNames ) { headerValidationContext . addHeaderValidator ( applicationContext . getBean ( validatorName , HeaderValidator . class ) ) ; } return self ;
public class KerasMasking { /** * Get layer output type . * @ param inputType Array of InputTypes * @ return output type as InputType * @ throws InvalidKerasConfigurationException Invalid Keras config */ public InputType getOutputType ( InputType ... inputType ) throws InvalidKerasConfigurationException { } }
if ( inputType . length > 1 ) throw new InvalidKerasConfigurationException ( "Keras Masking layer accepts only one input (received " + inputType . length + ")" ) ; return this . getMaskingLayer ( ) . getOutputType ( - 1 , inputType [ 0 ] ) ;
public class MultiFileJournalHelper { /** * Get the requested parameter , or throw an exception if it is not found . */ static String getRequiredParameter ( Map < String , String > parameters , String parameterName ) throws JournalException { } }
String value = parameters . get ( parameterName ) ; if ( value == null ) { throw new JournalException ( "'" + parameterName + "' is required." ) ; } return value ;
public class VisitState { /** * Checks whether the current robots information has expired and , if necessary , schedules a new < code > robots . txt < / code > download . * @ param time the current time . */ public void checkRobots ( final long time ) { } }
if ( ! RuntimeConfiguration . FETCH_ROBOTS ) return ; /* Safeguard : if there ' s no robots filter , and I ' m not fetching it , and it ' s not the first * path in the queue , then something ' s wrong . */ if ( robotsFilter == null && lastRobotsFetch != Long . MAX_VALUE && ( isEmpty ( ) || firstPath ( ) != ROBOTS_PATH ) ) { LOGGER . error ( "No robots filter and no robots path for " + this ) ; lastRobotsFetch = Long . MAX_VALUE ; // This inhibits further enqueueing until robots . txt is fetched . enqueueRobots ( ) ; return ; } if ( lastExceptionClass == null ) { // If we are not retrying an exception , we check whether it is time to reload robots . txt final long robotsExpiration = frontier . rc . robotsExpiration ; if ( time - robotsExpiration >= lastRobotsFetch ) { if ( robotsFilter == null ) { if ( lastRobotsFetch == 0 ) LOGGER . info ( "Going to get robots for {} for the first time" , Util . toString ( schemeAuthority ) ) ; else LOGGER . info ( "Going to try again to get robots for {}" , Util . toString ( schemeAuthority ) ) ; } else LOGGER . info ( "Going to get robots for {} because it has expired ({} >= {} ms have passed)" , Util . toString ( schemeAuthority ) , Long . valueOf ( time - lastRobotsFetch ) , Long . valueOf ( robotsExpiration ) ) ; lastRobotsFetch = Long . MAX_VALUE ; // This inhibits further enqueueing until robots . txt is fetched . enqueueRobots ( ) ; } }
public class CmsJspTagProperty { /** * Internal action method . < p > * @ param property the property to look up * @ param action the search action * @ param defaultValue the default value * @ param escape if the result html should be escaped or not * @ param req the current request * @ return the value of the property or < code > null < / code > if not found ( and no defaultValue was provided ) * @ throws CmsException if something goes wrong */ public static String propertyTagAction ( String property , String action , String defaultValue , boolean escape , ServletRequest req ) throws CmsException { } }
return propertyTagAction ( property , action , defaultValue , escape , req , null ) ;
public class ResponseCacheImpl { /** * ( non - Javadoc ) * @ see org . fcrepo . server . security . xacml . pep . ResponseCache # invalidate ( ) */ @ Override public void invalidate ( ) { } }
// thread - safety on cache operations synchronized ( requestCache ) { requestCache = new HashMap < String , ResponseCtx > ( CACHE_SIZE ) ; requestCacheTimeTracker = new HashMap < String , Long > ( CACHE_SIZE ) ; requestCacheUsageTracker = new ArrayList < String > ( CACHE_SIZE ) ; }
public class UIViewAction { /** * < p class = " changed _ added _ 2_2 " > Attempt to set the lifecycle phase * in which this instance will queue its { @ link ActionEvent } . Pass * the argument < code > phase < / code > to { @ link * PhaseId # phaseIdValueOf } . If the result is not one of the * following values , < code > FacesException < / code > must be thrown . < / p > * < ul > * < li > < p > { @ link PhaseId # APPLY _ REQUEST _ VALUES } < / p > < / li > * < li > < p > { @ link PhaseId # PROCESS _ VALIDATIONS } < / p > < / li > * < li > < p > { @ link PhaseId # UPDATE _ MODEL _ VALUES } < / p > < / li > * < li > < p > { @ link PhaseId # INVOKE _ APPLICATION } < / p > < / li > * < / ul > * < p > If set , this value takes precedence over the immediate flag . < / p > * @ since 2.2 */ public void setPhase ( final String phase ) { } }
PhaseId myPhaseId = PhaseId . phaseIdValueOf ( phase ) ; if ( PhaseId . ANY_PHASE . equals ( myPhaseId ) || PhaseId . RESTORE_VIEW . equals ( myPhaseId ) || PhaseId . RENDER_RESPONSE . equals ( myPhaseId ) ) { throw new FacesException ( "View actions cannot be executed in specified phase: [" + myPhaseId . toString ( ) + "]" ) ; } getStateHelper ( ) . put ( PropertyKeys . phase , myPhaseId ) ;
public class ChangedListBackupManager { /** * Removes all but the most recent backup files */ private void cleanupBackupDir ( int keep ) { } }
File [ ] backupDirFiles = getSortedBackupDirFiles ( ) ; if ( backupDirFiles . length > keep ) { for ( int i = keep ; i < backupDirFiles . length ; i ++ ) { backupDirFiles [ i ] . delete ( ) ; } }
public class ConverterUtil { /** * Convertes a map to a Properties object . * @ param _ map * @ return Properties object */ public static Properties toProperties ( Map < ? , ? > _map ) { } }
Properties props = new Properties ( ) ; props . putAll ( _map ) ; return props ;
public class CoGProperties { /** * Returns the Cert cache lifetime . If this property is * set to zero or less , no caching is done . The value is the * number of milliseconds the certificates are cached without checking for * modifications on disk . * Defaults to 60s . * @ throws NumberFormatException if the cache lifetime property * could not be parsed * @ return the Cert cache lifetime in milliseconds */ public long getCertCacheLifetime ( ) throws NumberFormatException { } }
long value = 60 * 1000 ; String property = getProperty ( CERT_CACHE_LIFETIME ) ; if ( property != null && property . length ( ) > 0 ) { long parsedValue = Long . parseLong ( property ) ; if ( parsedValue > 0 ) { value = parsedValue ; } } // System property takes precedence property = System . getProperty ( CERT_CACHE_LIFETIME ) ; if ( property != null && property . length ( ) > 0 ) { long parsedValue = Long . parseLong ( property ) ; if ( parsedValue > 0 ) { value = parsedValue ; } } return value ;
public class QueryParser { /** * src / riemann / Query . g : 72:1 : f : ' false ' ; */ public final QueryParser . f_return f ( ) throws RecognitionException { } }
QueryParser . f_return retval = new QueryParser . f_return ( ) ; retval . start = input . LT ( 1 ) ; CommonTree root_0 = null ; Token string_literal85 = null ; CommonTree string_literal85_tree = null ; try { // src / riemann / Query . g : 72:3 : ( ' false ' ) // src / riemann / Query . g : 72:5 : ' false ' { root_0 = ( CommonTree ) adaptor . nil ( ) ; string_literal85 = ( Token ) match ( input , 28 , FOLLOW_28_in_f559 ) ; string_literal85_tree = ( CommonTree ) adaptor . create ( string_literal85 ) ; adaptor . addChild ( root_0 , string_literal85_tree ) ; } retval . stop = input . LT ( - 1 ) ; retval . tree = ( CommonTree ) adaptor . rulePostProcessing ( root_0 ) ; adaptor . setTokenBoundaries ( retval . tree , retval . start , retval . stop ) ; } catch ( RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; retval . tree = ( CommonTree ) adaptor . errorNode ( input , retval . start , input . LT ( - 1 ) , re ) ; } finally { } return retval ;
public class AwsSecurityFindingFilters { /** * The process ID . * @ param processPid * The process ID . */ public void setProcessPid ( java . util . Collection < NumberFilter > processPid ) { } }
if ( processPid == null ) { this . processPid = null ; return ; } this . processPid = new java . util . ArrayList < NumberFilter > ( processPid ) ;
public class ContextualStorage { /** * Restores the Bean from its beanKey . * @ see # getBeanKey ( javax . enterprise . context . spi . Contextual ) */ public Contextual < ? > getBean ( Object beanKey ) { } }
if ( passivationCapable ) { return beanManager . getPassivationCapableBean ( ( String ) beanKey ) ; } else { return ( Contextual < ? > ) beanKey ; }
public class SessionManager { /** * Associates the channel with the session from the upgrade request . * @ param event the event * @ param channel the channel */ @ Handler ( priority = 1000 ) public void onProtocolSwitchAccepted ( ProtocolSwitchAccepted event , IOSubchannel channel ) { } }
event . requestEvent ( ) . associated ( Session . class ) . ifPresent ( session -> { channel . setAssociated ( Session . class , session ) ; } ) ;
public class Layer { /** * Enables event handling on this object . * @ param listening * @ param Layer */ @ Override public Layer setListening ( final boolean listening ) { } }
super . setListening ( listening ) ; if ( listening ) { if ( isShowSelectionLayer ( ) ) { if ( null != getSelectionLayer ( ) ) { doShowSelectionLayer ( true ) ; } } } else { if ( isShowSelectionLayer ( ) ) { doShowSelectionLayer ( false ) ; } m_select = null ; } return this ;
public class InterpolatedTSC { /** * Interpolates a group name , based on the most recent backward and oldest * forward occurence . * @ param name The name of the group to interpolate . * @ return The interpolated name of the group . */ private TimeSeriesValue interpolateTSV ( GroupName name ) { } }
final Map . Entry < DateTime , TimeSeriesValue > backTSV = findName ( backward , name ) , forwTSV = findName ( forward , name ) ; final long backMillis = max ( new Duration ( backTSV . getKey ( ) , getTimestamp ( ) ) . getMillis ( ) , 0 ) , forwMillis = max ( new Duration ( getTimestamp ( ) , forwTSV . getKey ( ) ) . getMillis ( ) , 0 ) ; final double totalMillis = forwMillis + backMillis ; final double backWeight = forwMillis / totalMillis ; final double forwWeight = backMillis / totalMillis ; return new InterpolatedTSV ( name , backTSV . getValue ( ) . getMetrics ( ) , forwTSV . getValue ( ) . getMetrics ( ) , backWeight , forwWeight ) ;
public class TreeWalker { /** * Perform a pre - order traversal non - recursive style . * Note that TreeWalker assumes that the subtree is intended to represent * a complete ( though not necessarily well - formed ) document and , during a * traversal , startDocument and endDocument will always be issued to the * SAX listener . * @ param pos Node in the tree where to start traversal * @ throws TransformerException */ public void traverse ( Node pos ) throws org . xml . sax . SAXException { } }
this . m_contentHandler . startDocument ( ) ; traverseFragment ( pos ) ; this . m_contentHandler . endDocument ( ) ;
public class DefaultSettingsEntity { /** * Adds a listener for this settings entity that fires on entity updates * @ param settingsEntityListener listener for this settings entity */ public void addListener ( SettingsEntityListener settingsEntityListener ) { } }
RunAsSystemAspect . runAsSystem ( ( ) -> entityListenersService . addEntityListener ( entityTypeId , new EntityListener ( ) { @ Override public void postUpdate ( Entity entity ) { settingsEntityListener . postUpdate ( entity ) ; } @ Override public Object getEntityId ( ) { return getEntityType ( ) . getId ( ) ; } } ) ) ;
public class ECFImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . ECF__RS_NAME : setRSName ( RS_NAME_EDEFAULT ) ; return ; } super . eUnset ( featureID ) ;
public class ContainerMetadataUpdateTransaction { /** * Gets an UpdateableSegmentMetadata for the given Segment . If already registered , it returns that instance , * otherwise it creates and records a new Segment metadata . */ private SegmentMetadataUpdateTransaction getOrCreateSegmentUpdateTransaction ( String segmentName , long segmentId ) { } }
SegmentMetadataUpdateTransaction sm = tryGetSegmentUpdateTransaction ( segmentId ) ; if ( sm == null ) { SegmentMetadata baseSegmentMetadata = createSegmentMetadata ( segmentName , segmentId ) ; sm = new SegmentMetadataUpdateTransaction ( baseSegmentMetadata , this . recoveryMode ) ; this . segmentUpdates . put ( segmentId , sm ) ; } return sm ;
public class Parser { /** * for ( { let | var } ? identifier of expression ) statement */ private ParseTree parseForOfStatement ( SourcePosition start , ParseTree initializer ) { } }
eatPredefinedString ( PredefinedName . OF ) ; ParseTree collection = parseExpression ( ) ; eat ( TokenType . CLOSE_PAREN ) ; ParseTree body = parseStatement ( ) ; return new ForOfStatementTree ( getTreeLocation ( start ) , initializer , collection , body ) ;
public class MapOnlyMapper { /** * Returns a MapOnlyMapper for a given Mapper passing only the values to the output . */ public static < I , Void , V > MapOnlyMapper < I , V > forMapper ( Mapper < I , Void , V > mapper ) { } }
return new MapperAdapter < > ( mapper ) ;
public class LinkedTransferQueue { /** * Reconstitutes the Queue instance from a stream ( that is , * deserializes it ) . * @ param s the stream */ private void readObject ( java . io . ObjectInputStream s ) throws java . io . IOException , ClassNotFoundException { } }
s . defaultReadObject ( ) ; for ( ; ; ) { @ SuppressWarnings ( "unchecked" ) E item = ( E ) s . readObject ( ) ; if ( item == null ) break ; else offer ( item ) ; }
public class Quat4f { /** * public void mul ( Quat4f q ) { * Quat4f q3 = new Quat4f ( ) ; * Vector3f vectorq1 = new Vector3f ( x , y , z ) ; * Vector3f vectorq2 = new Vector3f ( q . x , q . y , q . z ) ; * Vector3f tempvec1 = new Vector3f ( vectorq1 ) ; * Vector3f tempvec2; * Vector3f tempvec3; * q3 . w = ( w * q . w ) - tempvec1 . dot ( vectorq2 ) ; * tempvec1 . cross ( vectorq2 ) ; * tempvec2 . x = w * q . x ; * tempvec2 . y = w * q . y ; * tempvec2 . z = w * q . z ; * tempvec3 . x = q . w * x ; * tempvec3 . y = q . w * y ; * tempvec3 . z = q . w * z ; * q3 . x = tempvec1 . x + tempvec2 . x + tempvec3 . x ; * q3 . y = tempvec1 . y + tempvec2 . y + tempvec3 . y ; * q3 . z = tempvec1 . z + tempvec2 . z + tempvec3 . z ; * set ( q3 ) ; */ public void set ( Matrix4f m ) { } }
float s ; int i ; float tr = m . m00 + m . m11 + m . m22 ; if ( tr > 0.0 ) { s = ( float ) Math . sqrt ( tr + 1.0f ) ; w = s / 2.0f ; s = 0.5f / s ; x = ( m . m12 - m . m21 ) * s ; y = ( m . m20 - m . m02 ) * s ; z = ( m . m01 - m . m10 ) * s ; } else { i = 0 ; if ( m . m11 > m . m00 ) { i = 1 ; if ( m . m22 > m . m11 ) { i = 2 ; } else { } } else { if ( m . m22 > m . m00 ) { i = 2 ; } else { } } switch ( i ) { case 0 : s = ( float ) Math . sqrt ( ( m . m00 - ( m . m11 + m . m22 ) ) + 1.0f ) ; x = s * 0.5f ; if ( s != 0.0 ) s = 0.5f / s ; w = ( m . m12 - m . m21 ) * s ; y = ( m . m01 + m . m10 ) * s ; z = ( m . m02 + m . m20 ) * s ; break ; case 1 : s = ( float ) Math . sqrt ( ( m . m11 - ( m . m22 + m . m00 ) ) + 1.0f ) ; y = s * 0.5f ; if ( s != 0.0 ) s = 0.5f / s ; w = ( m . m20 - m . m02 ) * s ; z = ( m . m12 + m . m21 ) * s ; x = ( m . m10 + m . m01 ) * s ; break ; case 2 : s = ( float ) Math . sqrt ( ( m . m00 - ( m . m11 + m . m22 ) ) + 1.0f ) ; z = s * 0.5f ; if ( s != 0.0 ) s = 0.5f / s ; w = ( m . m01 - m . m10 ) * s ; x = ( m . m20 + m . m02 ) * s ; y = ( m . m21 + m . m12 ) * s ; break ; } }
public class Confusion { /** * Computes accuracy from the confusion matrix . This is the sum of the fraction correct divide by total number * of types . The number of each sample for each type is not taken in account . * @ return overall accuracy */ public double computeAccuracy ( ) { } }
double totalCorrect = 0 ; double totalIncorrect = 0 ; for ( int i = 0 ; i < actualCounts . length ; i ++ ) { for ( int j = 0 ; j < actualCounts . length ; j ++ ) { if ( i == j ) { totalCorrect += matrix . get ( i , j ) ; } else { totalIncorrect += matrix . get ( i , j ) ; } } } return totalCorrect / ( totalCorrect + totalIncorrect ) ;
public class AbstractManagedType { /** * ( non - Javadoc ) * @ see javax . persistence . metamodel . ManagedType # getAttributes ( ) */ @ Override public Set < Attribute < ? super X , ? > > getAttributes ( ) { } }
Set < Attribute < ? super X , ? > > attributes = new HashSet < Attribute < ? super X , ? > > ( ) ; Set < Attribute < X , ? > > declaredAttribs = getDeclaredAttributes ( ) ; if ( declaredAttribs != null ) { attributes . addAll ( declaredAttribs ) ; } if ( superClazzType != null ) { attributes . addAll ( superClazzType . getAttributes ( ) ) ; } return attributes ;
public class HybridTreetankStorageModule { /** * { @ inheritDoc } */ public void read ( byte [ ] bytes , long storageIndex ) throws IOException { } }
LOGGER . debug ( "Starting to read with param: " + "\nstorageIndex = " + storageIndex + "\nbytes.length = " + bytes . length ) ; jCloudsStorageModule . read ( bytes , storageIndex ) ;
public class BaseRTMPClientHandler { /** * Connect to client shared object . * @ param name * Client shared object name * @ param persistent * SO persistence flag * @ return Client shared object instance */ @ Override public IClientSharedObject getSharedObject ( String name , boolean persistent ) { } }
log . debug ( "getSharedObject name: {} persistent {}" , new Object [ ] { name , persistent } ) ; ClientSharedObject result = sharedObjects . get ( name ) ; if ( result != null ) { if ( result . isPersistent ( ) != persistent ) { throw new RuntimeException ( "Already connected to a shared object with this name, but with different persistence." ) ; } return result ; } result = new ClientSharedObject ( name , persistent ) ; sharedObjects . put ( name , result ) ; return result ;
public class SimpleCompareFileExtensions { /** * Compare files by absolute path . * @ param sourceFile * the source file * @ param fileToCompare * the file to compare * @ return true if the absolute path are equal , otherwise false . */ public static boolean compareFilesByAbsolutePath ( final File sourceFile , final File fileToCompare ) { } }
return CompareFileExtensions . compareFiles ( sourceFile , fileToCompare , false , true , true , true , true , true ) . getAbsolutePathEquality ( ) ;
public class StringCleaner { /** * Convenience method which tokenizes the URLs and the SMILEYS _ MAPPING , removes accents * and symbols and eliminates the extra spaces from the provided text . * @ param text * @ return */ public static String clear ( String text ) { } }
text = StringCleaner . tokenizeURLs ( text ) ; text = StringCleaner . tokenizeSmileys ( text ) ; text = StringCleaner . removeAccents ( text ) ; text = StringCleaner . removeSymbols ( text ) ; text = StringCleaner . removeExtraSpaces ( text ) ; return text . toLowerCase ( Locale . ENGLISH ) ;