signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class LetterSegmenter { /** * / * ( non - Javadoc ) * @ see org . wltea . analyzer . core . ISegmenter # analyze ( org . wltea . analyzer . core . AnalyzeContext ) */ public void analyze ( AnalyzeContext context ) { } }
boolean bufferLockFlag = false ; // 处理英文字母 bufferLockFlag = this . processEnglishLetter ( context ) || bufferLockFlag ; // 处理阿拉伯字母 bufferLockFlag = this . processArabicLetter ( context ) || bufferLockFlag ; // 处理混合字母 bufferLockFlag = this . processMixLetter ( context ) || bufferLockFlag ; // 判断是否锁定缓冲区 if ( bufferLockFl...
public class DateUtils { /** * Returns a Java representation of a Facebook " short " { @ code date } string . * @ param date * Facebook { @ code date } string . * @ return Java date representation of the given Facebook " short " { @ code date } string or { @ code null } if { @ code date } * is { @ code null } o...
if ( date == null ) { return null ; } Date parsedDate = toDateWithFormatString ( date , FACEBOOK_SHORT_DATE_FORMAT ) ; // Fall back to variant if initial parse fails if ( parsedDate == null ) { parsedDate = toDateWithFormatString ( date , FACEBOOK_ALTERNATE_SHORT_DATE_FORMAT ) ; } return parsedDate ;
public class CPSpecificationOptionUtil { /** * Returns the first cp specification option in the ordered set where uuid = & # 63 ; and companyId = & # 63 ; . * @ param uuid the uuid * @ param companyId the company ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code...
return getPersistence ( ) . fetchByUuid_C_First ( uuid , companyId , orderByComparator ) ;
public class WorkspaceCache { /** * Signal that changes have been made to the persisted data . Related information in the cache is cleared , and this workspace ' s * listener is notified of the changes . * @ param changes the changes to be made ; may not be null */ public void changed ( ChangeSet changes ) { } }
checkNotClosed ( ) ; if ( LOGGER . isTraceEnabled ( ) ) { LOGGER . trace ( "Cache for workspace '{0}' received {1} changes from local sessions: {2}" , workspaceName , changes . size ( ) , changes ) ; } // Clear this workspace ' s cached nodes ( iteratively is okay since it ' s a ConcurrentMap ) . . . for ( NodeKey key ...
public class LocalBufferPool { private void returnMemorySegment ( MemorySegment segment ) { } }
assert Thread . holdsLock ( availableMemorySegments ) ; numberOfRequestedMemorySegments -- ; networkBufferPool . recycle ( segment ) ;
public class CmsFlexCacheClearDialog { /** * Returns a list with the possible modes for the clean action . < p > * @ return a list with the possible modes for the clean action */ private List getModes ( ) { } }
ArrayList ret = new ArrayList ( ) ; ret . add ( new CmsSelectWidgetOption ( MODE_VARIATIONS , getMode ( ) . equals ( MODE_VARIATIONS ) , key ( Messages . GUI_FLEXCACHE_CLEAN_MODE_VARIATIONS_0 ) ) ) ; ret . add ( new CmsSelectWidgetOption ( MODE_ALL , getMode ( ) . equals ( MODE_ALL ) , key ( Messages . GUI_FLEXCACHE_CL...
public class Table { /** * Select records from database table using < I > obj < / I > object as template . * @ param obj example object for search : selected objects should match all * non - null fields . */ public final Cursor < T > queryByExample ( Connection conn , T obj ) { } }
return new Cursor < T > ( this , conn , obj , null , false ) ;
public class LoadProperties { /** * Copy the loaded properties into a map . */ public void into ( Map < String , String > map ) { } }
for ( String name : properties . stringPropertyNames ( ) ) { map . put ( name , properties . getProperty ( name ) ) ; }
public class DirRecord { /** * Add the attribute value to the table . If an attribute already exists * add it to the end of its values . * @ param attr String attribute name * @ param val Object value * @ throws NamingException */ public void addAttr ( String attr , Object val ) throws NamingException { } }
// System . out . println ( " addAttr " + attr ) ; Attribute a = findAttr ( attr ) ; if ( a == null ) { setAttr ( attr , val ) ; } else { a . add ( val ) ; }
public class GetReconciliationReportForLastBillingPeriod { /** * Runs the example . * @ param adManagerServices the services factory . * @ param session the session . * @ throws ApiException if the API request failed with one or more service errors . * @ throws RemoteException if the API request failed due to o...
ReconciliationReportServiceInterface reconciliationReportService = adManagerServices . get ( session , ReconciliationReportServiceInterface . class ) ; // Get the NetworkService . NetworkServiceInterface networkService = adManagerServices . get ( session , NetworkServiceInterface . class ) ; // Get the first day of las...
public class Descriptors { /** * Creates a new named { @ link Descriptor } instance . If the name specified is null , the default name for this type * will be assigned . * @ param < T > * @ param type * @ param descriptorName * the descriptor name * @ return * @ throws IllegalArgumentException * If the ...
// Precondition checks if ( type == null ) { throw new IllegalArgumentException ( "type must be specified" ) ; } // Create return DescriptorInstantiator . createFromUserView ( type , descriptorName ) ;
public class DeleteRunRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DeleteRunRequest deleteRunRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( deleteRunRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteRunRequest . getArn ( ) , ARN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e...
public class TagletManager { /** * Check the taglet to see if it is a legacy taglet . Also * check its name for errors . */ private void checkTaglet ( Object taglet ) { } }
if ( taglet instanceof Taglet ) { checkTagName ( ( ( Taglet ) taglet ) . getName ( ) ) ; } else if ( taglet instanceof com . sun . tools . doclets . Taglet ) { com . sun . tools . doclets . Taglet legacyTaglet = ( com . sun . tools . doclets . Taglet ) taglet ; customTags . remove ( legacyTaglet . getName ( ) ) ; custo...
public class BaseDriftDetector { /** * Returns a new list containing up to { @ link # getMaxHistory ( ) } objects in * the history that drifted away from the prior state of the model . < br > * The 0 index in the list will be the most recently added item , and the * largest index will be the oldest item . * @ r...
int historyToGram = Math . min ( time - driftStart , history . size ( ) ) ; ArrayList < V > histList = new ArrayList < V > ( historyToGram ) ; Iterator < V > histIter = history . descendingIterator ( ) ; while ( histIter . hasNext ( ) && historyToGram > 0 ) { historyToGram -- ; histList . add ( histIter . next ( ) ) ; ...
public class HandlerEntityRequest { /** * < p > Handle request . * actions that change database use read _ commited TI * this usually required only for complex transactions like loading * or withdrawal warehouse ( receipt or issue ) . * WHandlerAndJsp requires handle NULL request , so if parameter * " nmEnt "...
String nmEnt = pRqDt . getParameter ( "nmEnt" ) ; if ( nmEnt == null ) { // WHandlerAndJsp requires handle NULL request : return ; } Class < ? > entityClass = this . entitiesMap . get ( nmEnt ) ; if ( entityClass == null ) { this . secureLogger . error ( null , HandlerEntityRequest . class , "Trying to work with forbid...
public class FlipView { /** * draw top / left half shadow * @ param canvas */ private void drawPreviousShadow ( Canvas canvas ) { } }
final float degreesFlipped = getDegreesFlipped ( ) ; if ( degreesFlipped > 90 ) { final int alpha = ( int ) ( ( ( degreesFlipped - 90 ) / 90f ) * MAX_SHADOW_ALPHA ) ; mShadowPaint . setAlpha ( alpha ) ; canvas . drawPaint ( mShadowPaint ) ; }
public class ORMapping { /** * 獲取某字段對應的get方法 * @ param column */ public Method getSetter ( String column ) { } }
MappingItem methods = getMethodPair ( column ) ; return methods == null ? null : methods . getSetter ( ) ;
public class techsupport { /** * Use this API to fetch filtered set of techsupport resources . * set the filter parameter values in filtervalue object . */ public static techsupport [ ] get_filtered ( nitro_service service , filtervalue [ ] filter ) throws Exception { } }
techsupport obj = new techsupport ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; techsupport [ ] response = ( techsupport [ ] ) obj . getfiltered ( service , option ) ; return response ;
public class UpdateBuilder { /** * Removes all values in ' fields ' that are not specified in ' fieldMask ' . */ private Map < FieldPath , Object > applyFieldMask ( Map < String , Object > fields , List < FieldPath > fieldMask ) { } }
List < FieldPath > remainingFields = new ArrayList < > ( fieldMask ) ; Map < FieldPath , Object > filteredData = applyFieldMask ( fields , remainingFields , FieldPath . empty ( ) ) ; if ( ! remainingFields . isEmpty ( ) ) { throw new IllegalArgumentException ( String . format ( "Field masks contains invalid path. No da...
public class WSContextFactory { /** * called by DS to activate this component */ protected void activate ( ComponentContext cc ) { } }
Bundle usingBundle = cc . getUsingBundle ( ) ; userContext = usingBundle . getBundleContext ( ) ;
public class PagingHelper { /** * Return a single page of the list with the given paging parameters . * @ param list * @ param pageSize * @ param page * @ return subList */ public static < T > List < T > subList ( final List < T > list , int pageSize , int page ) { } }
if ( pageSize <= 0 || page == 0 ) { return Collections . EMPTY_LIST ; } int size = list . size ( ) ; int fromIndex = page > 0 ? ( page - 1 ) * pageSize : size + ( page * pageSize ) ; int toIndex = fromIndex + pageSize ; int finalFromIndex = Math . max ( 0 , fromIndex ) ; int finalToIndex = Math . min ( size , Math . ma...
public class Converter { /** * Convert a common namespace to a WS namespace . WS namespace will not have * its ID populated as it is not a { @ link KamStoreObject } * @ param ns * @ return */ public static Namespace convert ( final org . openbel . framework . common . model . Namespace ns ) { } }
Namespace ws = OBJECT_FACTORY . createNamespace ( ) ; ws . setPrefix ( ns . getPrefix ( ) ) ; ws . setResourceLocation ( ns . getResourceLocation ( ) ) ; return ws ;
public class XMLUtil { /** * Replies the long value that corresponds to the specified attribute ' s path . * < p > The path is an ordered list of tag ' s names and ended by the name of * the attribute . * Be careful about the fact that the names are case sensitives . * @ param document is the XML document to ex...
assert document != null : AssertMessages . notNullParameter ( 0 ) ; return getAttributeLongWithDefault ( document , true , defaultValue , path ) ;
public class GrpcStatus { /** * Maps GRPC status codes to http status , as defined in upstream grpc - gateway * < a href = " https : / / github . com / grpc - ecosystem / grpc - gateway / blob / master / third _ party / googleapis / google / rpc / code . proto " > code . proto < / a > . */ public static HttpStatus gr...
switch ( grpcStatusCode ) { case OK : return HttpStatus . OK ; case CANCELLED : return HttpStatus . CLIENT_CLOSED_REQUEST ; case UNKNOWN : case INTERNAL : case DATA_LOSS : return HttpStatus . INTERNAL_SERVER_ERROR ; case INVALID_ARGUMENT : case FAILED_PRECONDITION : case OUT_OF_RANGE : return HttpStatus . BAD_REQUEST ;...
public class CPDisplayLayoutLocalServiceWrapper { /** * Adds the cp display layout to the database . Also notifies the appropriate model listeners . * @ param cpDisplayLayout the cp display layout * @ return the cp display layout that was added */ @ Override public com . liferay . commerce . product . model . CPDis...
return _cpDisplayLayoutLocalService . addCPDisplayLayout ( cpDisplayLayout ) ;
public class AbstractDataServlet { /** * - - - - - protected methods - - - - - */ protected void commitResponse ( final SecurityContext securityContext , final HttpServletRequest request , final HttpServletResponse response , final RestMethodResult result , final boolean wrapSingleResultInArray ) { } }
final String outputDepthSrc = request . getParameter ( REQUEST_PARAMTER_OUTPUT_DEPTH ) ; final int outputDepth = Services . parseInt ( outputDepthSrc , config . getOutputNestingDepth ( ) ) ; final String baseUrl = request . getRequestURI ( ) ; final Map < String , String > headers = result . getHeaders ( ) ; // set hea...
public class FileUtils { /** * Just like { @ link Files # asCharSource ( java . io . File , java . nio . charset . Charset ) } , but decompresses * the incoming data using GZIP . */ public static CharSource asCompressedCharSource ( File f , Charset charSet ) throws IOException { } }
return asCompressedByteSource ( f ) . asCharSource ( charSet ) ;
public class StatsInstanceImpl { /** * Create instance under group ( same type ) */ public static StatsInstanceImpl createGroupInstance ( String name , StatsGroup igroup , ObjectName userProvidedMBeanObjectName , boolean bCreateDefaultMBean , StatisticActions actionLsnr ) throws StatsFactoryException { } }
StatsGroupImpl group = ( StatsGroupImpl ) igroup ; // construct path String [ ] parentPath = group . getPath ( ) ; String [ ] path = new String [ parentPath . length + 1 ] ; for ( int i = 0 ; i < parentPath . length ; i ++ ) { path [ i ] = parentPath [ i ] ; } path [ parentPath . length ] = name ; StatsInstanceImpl ins...
public class JKAbstractContext { /** * Sets the session map . * @ param sessionMap the session map */ public void setSessionMap ( final Map < String , Object > sessionMap ) { } }
JKThreadLocal . setValue ( JKContextConstants . HTTP_SESSION_MAP , sessionMap ) ;
public class CalendarPeriod { /** * false if not */ public boolean IsInside ( String pDate ) { } }
if ( periods == null ) { if ( days == null ) // security added to avoid null exception return false ; if ( days . getDay ( CalendarFunctions . date_get_day ( pDate ) ) . get ( ) > 0 ) return true ; return false ; } for ( int i = 0 ; i < periods . size ( ) ; i ++ ) { Period period = periods . get ( i ) ; if ( period . g...
public class Batch { /** * create _ and _ buy */ public static Batch create_and_buy ( Map < String , Object > params ) throws EasyPostException { } }
return create_and_buy ( params , null ) ;
public class ExpandableRecyclerAdapter { /** * Calls through to the ParentViewHolder to expand views for each * RecyclerView the specified parent is a child of . * These calls to the ParentViewHolder are made so that animations can be * triggered at the ViewHolder level . * @ param flatParentPosition The index ...
PVH viewHolder ; for ( RecyclerView recyclerView : mAttachedRecyclerViewPool ) { viewHolder = ( PVH ) recyclerView . findViewHolderForAdapterPosition ( flatParentPosition ) ; if ( viewHolder != null && ! viewHolder . isExpanded ( ) ) { viewHolder . setExpanded ( true ) ; viewHolder . onExpansionToggled ( false ) ; } } ...
public class CustomTopicXMLValidator { /** * Check to see if a Topic is a normal topic , instead of a Revision History or Legal Notice * @ param topic The topic to be checked . * @ return True if the topic is a normal topic , otherwise false . */ public static boolean isTopicANormalTopic ( final BaseTopicWrapper < ...
return ! ( topic . hasTag ( serverSettings . getEntities ( ) . getRevisionHistoryTagId ( ) ) || topic . hasTag ( serverSettings . getEntities ( ) . getLegalNoticeTagId ( ) ) || topic . hasTag ( serverSettings . getEntities ( ) . getAuthorGroupTagId ( ) ) || topic . hasTag ( serverSettings . getEntities ( ) . getInfoTag...
public class AbstractCountBasedFeatureSelector { /** * { @ inheritDoc } */ @ Override protected Set < TypeInference . DataType > getSupportedYDataTypes ( ) { } }
return new HashSet < > ( Arrays . asList ( TypeInference . DataType . BOOLEAN , TypeInference . DataType . CATEGORICAL , TypeInference . DataType . ORDINAL ) ) ;
public class Analyzer { private void merge ( final int insn , final Frame < V > frame , final Subroutine subroutine ) throws AnalyzerException { } }
Frame < V > oldFrame = frames [ insn ] ; Subroutine oldSubroutine = subroutines [ insn ] ; boolean changes ; if ( oldFrame == null ) { frames [ insn ] = newFrame ( frame ) ; changes = true ; } else { changes = oldFrame . merge ( frame , interpreter ) ; } if ( oldSubroutine == null ) { if ( subroutine != null ) { subrou...
public class EventBus { /** * Emit a event object with parameters and force all listeners to be called asynchronously . * @ param event * the target event * @ param args * the arguments passed in * @ see # emit ( EventObject , Object . . . ) */ public EventBus emitAsync ( EventObject event , Object ... args )...
return _emitWithOnceBus ( eventContextAsync ( event , args ) ) ;
public class JDBMLookup { /** * Opens the index , for subsequent lookups . * @ throws IOException Thrown if an I / O related exception occurs while * creating or opening the record manager */ public synchronized void open ( ) throws IOException { } }
if ( tmap != null ) { return ; } final RecordManager rm = createRecordManager ( indexPath ) ; if ( valueSerializer == null ) { tmap = rm . treeMap ( IndexerConstants . INDEX_TREE_KEY ) ; } else { tmap = rm . treeMap ( IndexerConstants . INDEX_TREE_KEY , valueSerializer ) ; } if ( tmap . isEmpty ( ) ) { rm . close ( ) ;...
public class Job { /** * Returns the oldest build in the record . * @ see LazyBuildMixIn # getFirstBuild */ @ Exported @ QuickSilver public RunT getFirstBuild ( ) { } }
SortedMap < Integer , ? extends RunT > runs = _getRuns ( ) ; if ( runs . isEmpty ( ) ) return null ; return runs . get ( runs . lastKey ( ) ) ;
public class YearMonthDay { /** * Returns a copy of this date with the day of month field updated . * YearMonthDay is immutable , so there are no set methods . * Instead , this method returns a new instance with the value of * day of month changed . * @ param dayOfMonth the day of month to set * @ return a co...
int [ ] newValues = getValues ( ) ; newValues = getChronology ( ) . dayOfMonth ( ) . set ( this , DAY_OF_MONTH , newValues , dayOfMonth ) ; return new YearMonthDay ( this , newValues ) ;
public class ScaleSelect { /** * Make sure that the scale in the scale select is applied on the map , when the user presses the ' Enter ' key . * @ see com . smartgwt . client . widgets . form . fields . events . KeyPressHandler # onKeyPress * ( com . smartgwt . client . widgets . form . fields . events . KeyPressE...
String name = event . getKeyName ( ) ; if ( KeyNames . ENTER . equals ( name ) ) { reorderValues ( ) ; }
public class Node { /** * Gets the ancestor node relative to this . * @ param level 0 = this , 1 = the parent , etc . */ @ Nullable public final Node getAncestor ( int level ) { } }
checkArgument ( level >= 0 ) ; Node node = this ; while ( node != null && level -- > 0 ) { node = node . getParent ( ) ; } return node ;
public class FessMessages { /** * Add the created action message for the key ' errors . could _ not _ open _ on _ system ' with parameters . * < pre > * message : Could not open { 0 } . & lt ; br / & gt ; Please check if the file is associated with an application . * < / pre > * @ param property The property na...
assertPropertyNotNull ( property ) ; add ( property , new UserMessage ( ERRORS_could_not_open_on_system , arg0 ) ) ; return this ;
public class RelatedTablesCoreExtension { /** * Determine if has one or more relations matching the non null provided * values * @ param baseTable * base table name * @ param baseColumn * base primary column name * @ param relatedTable * related table name * @ param relatedColumn * related primary col...
return ! getRelations ( baseTable , baseColumn , relatedTable , relatedColumn , relation , mappingTable ) . isEmpty ( ) ;
public class SendRedirect { public void doGet ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { } }
response . setContentType ( "text/html" ) ; response . setHeader ( "Pragma" , "no-cache" ) ; response . setHeader ( "Cache-Control" , "no-cache,no-store" ) ; String url = request . getParameter ( "URL" ) ; if ( url != null && url . length ( ) > 0 ) { response . sendRedirect ( url ) ; } else { PrintWriter pout = respons...
public class LocaleIDs { /** * Returns a three - letter abbreviation for the language . If language is * empty , returns the empty string . Otherwise , returns * a lowercase ISO 639-2 / T language code . * The ISO 639-2 language codes can be found on - line at * < a href = " ftp : / / dkuug . dk / i18n / iso - ...
int offset = findIndex ( _languages , language ) ; if ( offset >= 0 ) { return _languages3 [ offset ] ; } else { offset = findIndex ( _obsoleteLanguages , language ) ; if ( offset >= 0 ) { return _obsoleteLanguages3 [ offset ] ; } } return "" ;
public class MapMessage { /** * Removes the element with the specified name . * @ param key The name of the element . * @ return The previous value of the element . */ public String remove ( final String key ) { } }
final String result = data . getValue ( key ) ; data . remove ( key ) ; return result ;
public class Quaternion { /** * Sets the value of this quaternion to the normalized value * of quaternion q1. * @ param q1 the quaternion to be normalized . */ public final void normalize ( Quaternion q1 ) { } }
double norm ; norm = ( q1 . x * q1 . x + q1 . y * q1 . y + q1 . z * q1 . z + q1 . w * q1 . w ) ; if ( norm > 0f ) { norm = 1f / Math . sqrt ( norm ) ; this . x = norm * q1 . x ; this . y = norm * q1 . y ; this . z = norm * q1 . z ; this . w = norm * q1 . w ; } else { this . x = 0f ; this . y = 0f ; this . z = 0f ; this...
public class JBBPBitInputStream { /** * Read a long value from the stream . * @ param byteOrder the order of bytes to be used to decode the read value * @ return the long value from stream * @ throws IOException it will be thrown for any transport problem during the * operation * @ throws EOFException if the ...
if ( byteOrder == JBBPByteOrder . BIG_ENDIAN ) { return ( ( ( long ) readInt ( byteOrder ) & 0xFFFFFFFFL ) << 32 ) | ( ( long ) readInt ( byteOrder ) & 0xFFFFFFFFL ) ; } else { return ( ( long ) readInt ( byteOrder ) & 0xFFFFFFFFL ) | ( ( ( long ) readInt ( byteOrder ) & 0xFFFFFFFFL ) << 32 ) ; }
public class DynamoDBMapperTableModel { /** * Gets the hash key field model for the specified type . * @ param < H > The hash key type . * @ return The hash key field model . * @ throws DynamoDBMappingException If the hash key is not present . */ @ SuppressWarnings ( "unchecked" ) public < H > DynamoDBMapperField...
final DynamoDBMapperFieldModel < T , H > field = ( DynamoDBMapperFieldModel < T , H > ) keys . get ( HASH ) ; if ( field == null ) { throw new DynamoDBMappingException ( targetType . getSimpleName ( ) + "; no mapping for HASH key" ) ; } return field ;
public class JsonWriter { /** * Enters a new scope by appending any necessary whitespace and the given * bracket . */ private JsonWriter open ( JsonScope empty , String openBracket ) throws IOException { } }
beforeValue ( true ) ; stack . add ( empty ) ; out . write ( openBracket ) ; return this ;
public class ResourceAssignment { /** * Set a baseline value . * @ param baselineNumber baseline index ( 1-10) * @ param value baseline value */ public void setBaselineBudgetWork ( int baselineNumber , Duration value ) { } }
set ( selectField ( AssignmentFieldLists . BASELINE_BUDGET_WORKS , baselineNumber ) , value ) ;
public class DataRequirement { /** * @ param value { @ link # mustSupport } ( Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation . This does not mean that a value is required for this element , only that th...
StringType t = new StringType ( ) ; t . setValue ( value ) ; if ( this . mustSupport == null ) this . mustSupport = new ArrayList < StringType > ( ) ; this . mustSupport . add ( t ) ; return this ;
public class CmsContentEditor { /** * Registers a deep copy of the source entity with the given target entity id . < p > * @ param sourceEntityId the source entity id * @ param targetEntityId the target entity id */ public void registerClonedEntity ( String sourceEntityId , String targetEntityId ) { } }
CmsEntityBackend . getInstance ( ) . getEntity ( sourceEntityId ) . createDeepCopy ( targetEntityId ) ;
public class PerspectiveOps { /** * Renders a point in world coordinates into the image plane in pixels or normalized image * coordinates . * @ param worldToCamera Transform from world to camera frame * @ param K Optional . Intrinsic camera calibration matrix . If null then normalized image coordinates are return...
return ImplPerspectiveOps_F64 . renderPixel ( worldToCamera , K , X ) ; // if ( K = = null ) // return renderPixel ( worldToCamera , X ) ; // return ImplPerspectiveOps _ F64 . renderPixel ( worldToCamera , // K . data [ 0 ] , K . data [ 1 ] , K . data [ 2 ] , K . data [ 4 ] , K . data [ 5 ] , X ) ;
public class IllegalInstantException { /** * Checks if the exception is , or has a cause , of { @ code IllegalInstantException } . * @ param ex the exception to check * @ return true if an { @ code IllegalInstantException } */ public static boolean isIllegalInstant ( Throwable ex ) { } }
if ( ex instanceof IllegalInstantException ) { return true ; } while ( ex . getCause ( ) != null && ex . getCause ( ) != ex ) { return isIllegalInstant ( ex . getCause ( ) ) ; } return false ;
public class TraceConsumer { /** * Reads the results from the retrieval phase from the DOCUMENT and the DOCUEMNT _ GS views of the * JCAs , and generates and evaluates them using the evaluate method from the FMeasureConsumer * class . */ @ Override public void process ( CAS aCAS ) throws AnalysisEngineProcessExcept...
try { JCas jcas = aCAS . getJCas ( ) ; ExperimentUUID experiment = ProcessingStepUtils . getCurrentExperiment ( jcas ) ; AnnotationIndex < Annotation > steps = jcas . getAnnotationIndex ( ProcessingStep . type ) ; String uuid = experiment . getUuid ( ) ; Trace trace = ProcessingStepUtils . getTrace ( steps ) ; Key key ...
public class SettablePromise { /** * Sets the result of this { @ code SettablePromise } and * completes it . { @ code AssertionError } is thrown when you * try to set result for an already completed { @ code Promise } . */ @ Override public void set ( T result ) { } }
assert ! isComplete ( ) ; this . result = result ; this . exception = null ; complete ( result ) ;
public class CmsObject { /** * Returns the access control list ( summarized access control entries ) of a given resource . < p > * If < code > inheritedOnly < / code > is set , only inherited access control entries are returned . < p > * @ param resourceName the name of the resource * @ param inheritedOnly if set...
CmsResource res = readResource ( resourceName , CmsResourceFilter . ALL ) ; return m_securityManager . getAccessControlList ( m_context , res , inheritedOnly ) ;
public class FieldEditor { /** * documentation inherited from interface */ public void actionPerformed ( ActionEvent event ) { } }
Object value = null ; try { value = getDisplayValue ( ) ; } catch ( Exception e ) { updateBorder ( true ) ; return ; } // submit an attribute changed event with the new value if ( ! valueMatches ( value ) ) { _accessor . set ( _field , value ) ; }
public class Utils { /** * This method check network state for opening Google Play Store If network * is not avaible AppRate will not try to show up . * This method return true if application doesn ' t has " ACCESS _ NETWORK _ STATE " permission . */ public static boolean isOnline ( Context context ) { } }
int res = context . checkCallingOrSelfPermission ( Manifest . permission . ACCESS_NETWORK_STATE ) ; if ( res == PackageManager . PERMISSION_GRANTED ) { ConnectivityManager cm = ( ConnectivityManager ) context . getSystemService ( Context . CONNECTIVITY_SERVICE ) ; NetworkInfo netInfo = cm . getActiveNetworkInfo ( ) ; i...
public class EJSHome { /** * d112604.5 */ @ Override public void setCustomFinderAccessIntentThreadState ( boolean cfwithupdateaccess , boolean readonly , String methodname ) { } }
container . setCustomFinderAccessIntentThreadState ( cfwithupdateaccess , readonly , methodname ) ;
public class ArrayFunctions { /** * Returned expression results in new array with the concatenation of the input arrays . */ public static Expression arrayConcat ( JsonArray array1 , JsonArray array2 ) { } }
return arrayConcat ( x ( array1 ) , x ( array2 ) ) ;
public class XalanUtil { /** * Return the XPathContext to be used for evaluating expressions . * If the child is nested withing a forEach tag its iteration context is used . * Otherwise , a new context is created based on an empty Document . * @ param child the tag whose context should be returned * @ param pag...
// if within a forEach tag , use its context ForEachTag forEachTag = ( ForEachTag ) TagSupport . findAncestorWithClass ( child , ForEachTag . class ) ; if ( forEachTag != null ) { return forEachTag . getContext ( ) ; } // otherwise , create a new context referring to an empty document XPathContext context = new XPathCo...
public class TurfMeasurement { /** * Takes a set of features , calculates the bbox of all input features , and returns a bounding box . * @ param polygon a { @ link Polygon } object * @ return a double array defining the bounding box in this order { @ code [ minX , minY , maxX , maxY ] } * @ since 2.0.0 */ public...
List < Point > resultCoords = TurfMeta . coordAll ( polygon , false ) ; return bboxCalculator ( resultCoords ) ;
public class SoffitConnectorController { /** * Implementation */ private ResponseWrapper fetchContentFromCacheIfAvailable ( final RenderRequest req , final String serviceUrl ) { } }
ResponseWrapper rslt = null ; // default final List < CacheTuple > cacheKeysToTry = new ArrayList < > ( ) ; // Don ' t use private - scope caching for anonymous users if ( req . getRemoteUser ( ) != null ) { cacheKeysToTry . add ( // Private - scope cache key new CacheTuple ( serviceUrl , req . getPortletMode ( ) . toS...
public class Database { /** * Adds an account to a parent . This will first check to see if the account * already has a parent and if so remove it from that parent before adding it * to the new parent . * @ param parent The parent to add the child under . * @ param child The child to add . * @ throws Exceptio...
// Check to see if the account physically already exists - there is something funny with // some Firefox RDF exports where an RDF : li node gets duplicated multiple times . for ( Account dup : parent . getChildren ( ) ) { if ( dup == child ) { logger . warning ( "Duplicate RDF:li=" + child . getId ( ) + " detected. Dro...
public class MultiIndex { /** * Performs indexing while re - indexing is in progress * @ param remove * @ param add * @ throws IOException */ private void doUpdateOffline ( final Collection < String > remove , final Collection < Document > add ) throws IOException { } }
SecurityHelper . doPrivilegedIOExceptionAction ( new PrivilegedExceptionAction < Object > ( ) { public Object run ( ) throws Exception { for ( Iterator < String > it = remove . iterator ( ) ; it . hasNext ( ) ; ) { Term idTerm = new Term ( FieldNames . UUID , it . next ( ) ) ; offlineIndex . removeDocument ( idTerm ) ;...
public class ClassTree { /** * Generate mapping for the sub - classes for every class in this run . * Return the sub - class set for java . lang . Object which will be having * sub - class listing for itself and also for each sub - class itself will * have their own sub - class lists . * @ param classes all the...
for ( TypeElement aClass : classes ) { // In the tree page ( e . g overview - tree . html ) do not include // information of classes which are deprecated or are a part of a // deprecated package . if ( configuration . nodeprecated && ( utils . isDeprecated ( aClass ) || utils . isDeprecated ( utils . containingPackage ...
public class OrientModelGraph { /** * Recursive path search function . It performs a depth first search with integrated loop check to find a path from * the start model to the end model . If the id list is not empty , then the function only returns a path as valid if * all transformations defined with the id list a...
List < ODocument > neighbors = getNeighborsOfModel ( start ) ; for ( ODocument neighbor : neighbors ) { if ( alreadyVisited ( neighbor , steps ) || ! OrientModelGraphUtils . getActiveFieldValue ( neighbor ) ) { continue ; } ODocument nextStep = getEdgeWithPossibleId ( start , OrientModelGraphUtils . getIdFieldValue ( n...
public class LocalCacheStream { /** * Method to inject a cache into a consumer . Note we only support this for the consumer at this * time . * @ param cacheAware the instance that may be a { @ link CacheAware } */ private void injectCache ( Consumer < ? super R > cacheAware ) { } }
if ( cacheAware instanceof CacheAware ) { ( ( CacheAware ) cacheAware ) . injectCache ( registry . getComponent ( Cache . class ) ) ; }
public class Splash { /** * Invokes the main method of the provided class name . * @ param args the command line arguments */ public static void invokeMain ( String className , String [ ] args ) { } }
try { Class < ? > clazz = null ; if ( ClassServiceUtility . getClassService ( ) . getClassFinder ( null ) != null ) clazz = ClassServiceUtility . getClassService ( ) . getClassFinder ( null ) . findClass ( className , null ) ; if ( clazz == null ) clazz = Class . forName ( className ) ; Method method = clazz . getMetho...
public class AbstractToggleButton { /** * Specifies that this button acts as a toggle , for instance for a parent { @ link org . gwtbootstrap3 . client . ui . DropDown } * or { @ link org . gwtbootstrap3 . client . ui . ButtonGroup } * Adds a { @ link Caret } as a child widget . * @ param toggle Kind of toggle */...
toggleMixin . setDataToggle ( toggle ) ; // We defer to make sure the elements are available to manipulate their position Scheduler . get ( ) . scheduleDeferred ( new Scheduler . ScheduledCommand ( ) { @ Override public void execute ( ) { separator . removeFromParent ( ) ; caret . removeFromParent ( ) ; if ( toggle == ...
public class Maven { /** * - - load poms */ public MavenProject loadPom ( Artifact artifact ) throws RepositoryException , ProjectBuildingException { } }
return loadPom ( resolve ( new DefaultArtifact ( artifact . getGroupId ( ) , artifact . getArtifactId ( ) , "pom" , artifact . getVersion ( ) ) ) , false ) ;
public class AutoCompleteTextFieldComponent { /** * Clears the textfield and resets the validation icon . */ public void clear ( ) { } }
queryTextField . clear ( ) ; validationIcon . setValue ( FontAwesome . CHECK_CIRCLE . getHtml ( ) ) ; validationIcon . setStyleName ( "hide-status-label" ) ;
public class CSVLoader { /** * Load all files in the given folder whose name matches a known table . */ private void loadFolder ( File folder ) { } }
m_logger . info ( "Scanning for files in folder: {}" , folder . getAbsolutePath ( ) ) ; File [ ] files = folder . listFiles ( ) ; if ( files == null || files . length == 0 ) { m_logger . error ( "No files found in folder: {}" , folder . getAbsolutePath ( ) ) ; return ; } for ( File file : files ) { String fileName = fi...
public class CreateAdditionalAssignmentsForHITRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CreateAdditionalAssignmentsForHITRequest createAdditionalAssignmentsForHITRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( createAdditionalAssignmentsForHITRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( createAdditionalAssignmentsForHITRequest . getHITId ( ) , HITID_BINDING ) ; protocolMarshaller . marshall ( createAdditionalAssignmentsForHITReq...
public class GroovyMain { /** * Get a new GroovyCodeSource for a script which may be given as a location * ( isScript is true ) or as text ( isScript is false ) . * @ param isScriptFile indicates whether the script parameter is a location or content * @ param script the location or context of the script * @ ret...
// check the script is currently valid before starting a server against the script if ( isScriptFile ) { // search for the file and if it exists don ' t try to use URIs . . . File scriptFile = huntForTheScriptFile ( script ) ; if ( ! scriptFile . exists ( ) && URI_PATTERN . matcher ( script ) . matches ( ) ) { return n...
public class Channel { /** * Add a peer to the channel * @ param peer The Peer to add . * @ param peerOptions see { @ link PeerRole } * @ return Channel The current channel added . * @ throws InvalidArgumentException */ public Channel addPeer ( Peer peer , PeerOptions peerOptions ) throws InvalidArgumentExcepti...
if ( shutdown ) { throw new InvalidArgumentException ( format ( "Channel %s has been shutdown." , name ) ) ; } if ( null == peer ) { throw new InvalidArgumentException ( "Peer is invalid can not be null." ) ; } if ( peer . getChannel ( ) != null && peer . getChannel ( ) != this ) { throw new InvalidArgumentException ( ...
public class HttpClient { /** * Setup a callback called when { @ link HttpClientResponse } has not been fully * received . * @ param doOnResponse a consumer observing response failures * @ return a new { @ link HttpClient } */ public final HttpClient doOnResponseError ( BiConsumer < ? super HttpClientResponse , ?...
Objects . requireNonNull ( doOnResponse , "doOnResponse" ) ; return new HttpClientDoOnError ( this , null , doOnResponse ) ;
public class GosuStringUtil { /** * < p > Reverses a String as per { @ link StringBuffer # reverse ( ) } . < / p > * < p > A < code > null < / code > String returns < code > null < / code > . < / p > * < pre > * GosuStringUtil . reverse ( null ) = null * GosuStringUtil . reverse ( " " ) = " " * GosuStringUtil...
if ( str == null ) { return null ; } return new StringBuffer ( str ) . reverse ( ) . toString ( ) ;
public class GrammarKeywordAccessFragment2 { /** * Replies the keywords in the given grammar . * @ param grammar the grammar . * @ return the keywords . */ protected static Iterable < Keyword > getAllKeywords ( Grammar grammar ) { } }
final Map < String , Keyword > keywords = new HashMap < > ( ) ; final List < ParserRule > rules = GrammarUtil . allParserRules ( grammar ) ; for ( final ParserRule parserRule : rules ) { final List < Keyword > list = typeSelect ( eAllContentsAsList ( parserRule ) , Keyword . class ) ; for ( final Keyword keyword : list...
public class WalkerState { /** * Seeks to the given season within the given year * @ param seasonString * @ param yearString */ public void seekToSeasonYear ( String seasonString , String yearString ) { } }
Season season = Season . valueOf ( seasonString ) ; assert ( season != null ) ; seekToIcsEventYear ( SEASON_ICS_FILE , yearString , season . getSummary ( ) ) ;
public class KTypeVTypeHashMap { /** * { @ inheritDoc } */ @ Override public VType indexReplace ( int index , VType newValue ) { } }
assert index >= 0 : "The index must point at an existing key." ; assert index <= mask || ( index == mask + 1 && hasEmptyKey ) ; VType previousValue = Intrinsics . < VType > cast ( values [ index ] ) ; values [ index ] = newValue ; return previousValue ;
public class transformpolicylabel { /** * Use this API to fetch filtered set of transformpolicylabel resources . * filter string should be in JSON format . eg : " port : 80 , servicetype : HTTP " . */ public static transformpolicylabel [ ] get_filtered ( nitro_service service , String filter ) throws Exception { } }
transformpolicylabel obj = new transformpolicylabel ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; transformpolicylabel [ ] response = ( transformpolicylabel [ ] ) obj . getfiltered ( service , option ) ; return response ;
public class SpringSecurityWebAuditMetaData { /** * { @ inheritDoc } * @ see org . audit4j . core . MetaData # getActor ( ) */ @ Override public String getActor ( ) { } }
Authentication authentication = SecurityContextHolder . getContext ( ) . getAuthentication ( ) ; if ( authentication != null && authentication . getPrincipal ( ) instanceof UserDetails ) { return ( ( UserDetails ) authentication . getPrincipal ( ) ) . getUsername ( ) ; } else if ( authentication != null && authenticati...
public class JDBCDatabaseMetaData { /** * Retrieves a description of the given table ' s primary key columns . They * are ordered by COLUMN _ NAME . * < P > Each primary key column description has the following columns : * < OL > * < LI > < B > TABLE _ CAT < / B > String = > table catalog ( may be < code > null...
if ( table == null ) { throw Util . nullArgument ( "table" ) ; } schema = translateSchema ( schema ) ; StringBuffer select = toQueryPrefix ( "SYSTEM_PRIMARYKEYS" ) . append ( and ( "TABLE_CAT" , "=" , catalog ) ) . append ( and ( "TABLE_SCHEM" , "=" , schema ) ) . append ( and ( "TABLE_NAME" , "=" , table ) ) ; // By d...
public class StringExpression { /** * Create a { @ code this . containsIgnoreCase ( str ) } expression * < p > Returns true if the given String is contained , compare case insensitively < / p > * @ param str string * @ return this . containsIgnoreCase ( str ) expression */ public BooleanExpression containsIgnoreC...
return Expressions . booleanOperation ( Ops . STRING_CONTAINS_IC , mixin , str ) ;
public class ReflectionUtils { /** * Invokes the specified constructor without throwing any checked exceptions . * This is only valid for constructors that are not declared to throw any checked * exceptions . Any unchecked exceptions thrown by the specified constructor will be * re - thrown ( in their original fo...
try { return constructor . newInstance ( arguments ) ; } catch ( IllegalAccessException ex ) { // This cannot happen if the constructor is public . throw new IllegalArgumentException ( "Constructor is not publicly accessible." , ex ) ; } catch ( InstantiationException ex ) { // This can only happen if the constructor b...
public class ChunkListener { /** * Checks if the listener { @ link BlockPos } has a { @ link IBlockListener . Pre } component and if the modified { @ code BlockPos } is in range . * @ param chunk the chunk * @ param listener the listener * @ param modified the modified * @ param oldState the old state * @ par...
if ( listener . equals ( modified ) ) return false ; IBlockListener . Post bl = IComponent . getComponent ( IBlockListener . Post . class , chunk . getWorld ( ) . getBlockState ( listener ) . getBlock ( ) ) ; if ( bl != null && bl . isInRange ( listener , modified ) ) return true ; return false ;
public class DTask { /** * Capture the first exception in _ ex . Later setException attempts are ignored . */ public synchronized void setException ( Throwable ex ) { } }
if ( _ex == null ) { _ex = AutoBuffer . javaSerializeWritePojo ( ( ( ex instanceof DistributedException ) ? ( DistributedException ) ex : new DistributedException ( ex , false /* don ' t want this setException ( ex ) call in the stacktrace */ ) ) ) ; }
public class ItemStorageManager { /** * / * ( non - Javadoc ) * @ see com . ibm . ws . sib . msgstore . cache . CacheStatistics # getCurrentCount ( ) */ public final long getCurrentCount ( ) { } }
long result = 0 ; result = result + _storedItemManager . getCurrentCount ( ) ; result = result + _unstoredItemManager . getCurrentCount ( ) ; return result ;
public class DescribeScalingPlansRequest { /** * The sources for the applications ( up to 10 ) . If you specify scaling plan names , you cannot specify application * sources . * @ param applicationSources * The sources for the applications ( up to 10 ) . If you specify scaling plan names , you cannot specify * ...
if ( applicationSources == null ) { this . applicationSources = null ; return ; } this . applicationSources = new java . util . ArrayList < ApplicationSource > ( applicationSources ) ;
public class BTree { /** * 循环搜索路径上存储的k - v * @ param currentNode * @ param layout * @ param number 逆向出来的数值key */ protected final void forEach ( Node < V > currentNode , int layout , int number , BitConsumer < V > consumer ) { } }
if ( layout == 0 ) { consumer . accept ( number , currentNode . getData ( ) ) ; return ; } Node < V > [ ] sub = currentNode . getSub ( ) ; for ( int i = 0 ; i < sub . length ; i ++ ) { Node < V > node = sub [ i ] ; if ( node != null ) { layout -- ; int num = number + i & getConfig ( ) . mask << layout ; forEach ( node ...
public class LogicManagementClientImpl { /** * Lists all of the available Logic REST API operations . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the PagedList & ...
return listOperationsNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < OperationInner > > , Page < OperationInner > > ( ) { @ Override public Page < OperationInner > call ( ServiceResponse < Page < OperationInner > > response ) { return response . body ( ) ; } } ) ;
public class ValidationRelation { /** * Applies only to ManyToOne or OneToOne . * When x to one has an inverse relation , we never mark it as @ NotNull * as it would break navigation ( indeed , the mandatory value is set transparently once the entity is added to the collection ) * However , in test ( XxxGenerator...
if ( ! relation . isManyToOne ( ) && ! relation . isOneToOne ( ) ) { return "" ; } if ( relation . isMandatory ( ) && ! relation . hasInverse ( ) ) { if ( relation . getFromEntity ( ) . getName ( ) . equals ( relation . getToEntity ( ) . getName ( ) ) ) { // TODO ? : mandatory relation on self is complicated to handled...
public class JDBCDatabaseMetaData { /** * Retrieves a description of a table ' s optimal set of columns that * uniquely identifies a row . They are ordered by SCOPE . * < P > Each column description has the following columns : * < OL > * < LI > < B > SCOPE < / B > short = > actual scope of result * < UL > *...
if ( table == null ) { throw Util . nullArgument ( "table" ) ; } String scopeIn ; switch ( scope ) { case bestRowTemporary : scopeIn = BRI_TEMPORARY_SCOPE_IN_LIST ; break ; case bestRowTransaction : scopeIn = BRI_TRANSACTION_SCOPE_IN_LIST ; break ; case bestRowSession : scopeIn = BRI_SESSION_SCOPE_IN_LIST ; break ; def...
public class RESTAppListener { /** * { @ inheritDoc } */ @ Override public void contextRootRemoved ( String contextRoot , VirtualHost virtualHost ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Removed contextRoot {0} from virtual host {1}" , contextRoot , virtualHost . getName ( ) ) ; } if ( contextRoot != null && contextRoot . contains ( APIConstants . JMX_CONNECTOR_API_ROOT_PATH ) ) { registeredContextRoot = nul...
public class Distribution { /** * Maps a counter representing the linear weights of a multiclass * logistic regression model to the probabilities of each class . */ public static < E > Distribution < E > distributionFromLogisticCounter ( Counter < E > cntr ) { } }
double expSum = 0.0 ; int numKeys = 0 ; for ( E key : cntr . keySet ( ) ) { expSum += Math . exp ( cntr . getCount ( key ) ) ; numKeys ++ ; } Distribution < E > probs = new Distribution < E > ( ) ; probs . counter = new ClassicCounter < E > ( ) ; probs . reservedMass = 0.0 ; probs . numberOfKeys = numKeys ; for ( E key...
public class DebugStructureInterceptor { /** * Writes debugging information for the given component . * @ param component the component to write debugging information for . * @ param xml the writer to send the debug output to . */ protected void writeDebugInfo ( final WComponent component , final XmlStringBuilder x...
if ( component != null && ( component . isVisible ( ) || component instanceof WInvisibleContainer ) ) { xml . appendTagOpen ( "ui:debugInfo" ) ; xml . appendAttribute ( "for" , component . getId ( ) ) ; xml . appendAttribute ( "class" , component . getClass ( ) . getName ( ) ) ; xml . appendOptionalAttribute ( "type" ,...
public class DAOValidatorHelper { /** * Methode permettant de resoudre les variables d ' environnement dans une chemin * @ param expressionExpression du chemin * @ returnExpression resolue */ public static String resolveEnvironmentsParameters ( String expression ) { } }
// Si l ' expression est vide if ( expression == null || expression . trim ( ) . length ( ) == 0 ) { // On retourne null return null ; } // Tant que la chaene traitee contient des ENVs while ( isExpressionContainPattern ( expression , ENV_CHAIN_PATTERN ) ) { // Obtention de la liste des ENVs String [ ] envs = extractTo...