idx int64 0 34.9k | question stringlengths 12 26.4k | target stringlengths 15 2.15k |
|---|---|---|
1,600 | public String toString ( ) { return String . format ( "0x%02X" , value ) ; } | Add Rule to use for validation. |
1,601 | @ Override public Resource createRelative ( String relativePath ) throws MalformedURLException { if ( relativePath . startsWith ( "/" ) ) { relativePath = relativePath . substring ( 1 ) ; } return new UrlResource ( new URL ( this . url , relativePath ) ) ; } | Return substring starting with the line specified by startLine (0-based). |
1,602 | private void drawChunk ( Image image , Graphics g , boolean stretch , int dx1 , int dy1 , int dx2 , int dy2 , int sx1 , int sy1 , int sx2 , int sy2 , boolean xDirection ) { if ( dx2 - dx1 <= 0 || dy2 - dy1 <= 0 || sx2 - sx1 <= 0 || sy2 - sy1 <= 0 ) { return ; } if ( stretch ) { g . drawImage ( image , dx1 , dy1 , dx2 ,... | Checks if is given volume list same as in storage group. |
1,603 | public void testCargoDaemonWelcomePage ( ) throws Exception { PingUtils . assertPingTrue ( "Cargo Daemon not started" , "Welcome to Cargo Daemon Web site" , CargoDaemonBrowserTest . daemonUrl , logger ) ; } | method to check if any errors were generated during DITA generation |
1,604 | public static Document jsoup2DOM ( org . jsoup . nodes . Document jsoupDocument ) { Document document = null ; try { DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory . newInstance ( ) ; DocumentBuilder docBuilder = docBuilderFactory . newDocumentBuilder ( ) ; document = docBuilder . newDocument ( ) ; M... | Adds a recorded value. |
1,605 | protected void assertBusinessObjectData ( Integer expectedDataVersion , BusinessObjectData actualBusinessObjectData ) { assertBusinessObjectData ( expectedDataVersion , getTestAttributes ( ) , getTestBusinessObjectDataParents ( ) , actualBusinessObjectData ) ; } | Executes the given piece of SQL with parameters. Also calls the provided processResults Closure to process any ResultSet or UpdateCount results that executing the SQL might produce. <p> This method supports named and named ordinal parameters. See the class Javadoc for more details. <p> Resource handling is performed a... |
1,606 | private static KdbGroup deserializeGroup ( KdbGroup lastGroup , DataInput dataInput ) throws IOException { int fieldType ; KdbGroup group = new KdbGroup ( ) ; while ( ( fieldType = dataInput . readUnsignedShort ( ) ) != 0xFFFF ) { switch ( fieldType ) { case 0x0000 : readExtData ( dataInput ) ; break ; case 0x0001 : UU... | Checks if the session handle is terminated (i.e., can be discarded) and the underlying vendor xa connection/session can be reused or destroyed. |
1,607 | public int lastIndexOf ( String string ) { return lastIndexOf ( string , length ( ) ) ; } | Construct a vector by appending one vector to another vector. |
1,608 | public Builder withTrustStorePassword ( String trustStorePassword ) { properties . setProperty ( NettyOptions . SSL_TRUST_STORE_PASSWORD , Assert . notNull ( trustStorePassword , "trustStorePassword" ) ) ; return this ; } | Append a Node onto the vector. |
1,609 | @ Override public final boolean isOpen ( ) { return isOpen . get ( ) ; } | Calculates the time it should take to scroll the given distance (in pixels) |
1,610 | private void sendTapEvent ( BitSet bitset , Shift shift , boolean decision ) { if ( mSymbolEventTap != null ) { SymbolEvent event = new SymbolEvent ( bitset . get ( 0 , mSymbolLength ) , mSymbolLength , decision , shift ) ; mSymbolEventTap . receive ( event ) ; } } | Called after security check for system loader access checks have been made. |
1,611 | public final void addRequiredImports ( Set < DeclaredTypeName > imports ) { imports . add ( TypeConstants . PROPERTY ) ; imports . add ( TypeConstants . VALUES_STORAGE ) ; imports . add ( getModelSuperclass ( ) ) ; for ( PropertyGenerator generator : propertyGenerators ) { generator . registerRequiredImports ( imports ... | Add two negative numbers of different length. The second is longer. |
1,612 | public void readContent ( ) throws IOException { if ( offset + length > buffer . length ) { throw new ASN1Exception ( "Unexpected end of encoding" ) ; } if ( in == null ) { offset += length ; } else { int bytesRead = in . read ( buffer , offset , length ) ; if ( bytesRead != length ) { int c = bytesRead ; do { if ( c <... | Bring the task matching the given tab ID to the front. |
1,613 | public void validateBusinessObjectDataAvailability ( BusinessObjectDataAvailabilityRequest request , List < BusinessObjectDataStatus > expectedAvailableStatuses , List < BusinessObjectDataStatus > expectedNotAvailableStatuses , BusinessObjectDataAvailability actualBusinessObjectDataAvailability ) { assertNotNull ( actu... | We're performing a slightly unusual shared element transition i.e. from one view (image in the grid) to two views (the image & also the background of the details view, to produce the expand effect). After changing orientation, the transition system seems unable to map both shared elements (only seems to map the shot, ... |
1,614 | void initFromNode ( final Node fromNode , final double startTime , final PseudoRemovePriorityQueue < Node > pendingNodes ) { DijkstraNodeData data = getData ( fromNode ) ; visitNode ( fromNode , data , pendingNodes , startTime , 0 , null ) ; } | Adds all the listed block objects to the specified export path parameters. |
1,615 | public void unlockUI ( ) { generateComplete ( ) ; } | Creates a category graph using a subset (that may also be the full set :) of the categories. |
1,616 | public void remove ( T object ) { int pos ; synchronized ( mLock ) { pos = getPosition ( object ) ; if ( pos == - 1 ) return ; mObjects . remove ( pos ) ; } if ( mNotifyOnChange ) notifyItemRemoved ( pos ) ; } | Checks whether a given number of bytes can be read. |
1,617 | private void preBufferAccess ( ) { _mostRecentUse = System . currentTimeMillis ( ) ; _lock . lock ( ) ; try { while ( _flushPending ) { _flushComplete . await ( ) ; } ensureBufferAvailable ( this ) ; ensureLoaded ( ) ; _bufferUseCount ++ ; } catch ( Exception e ) { throw Throwables . propagate ( e ) ; } finally { _lock... | 'Touch' this template and thereby resetting the nextCheck field. |
1,618 | private void addMethod ( MappedClass clazz , String [ ] parts ) { String original = "" ; String newName = "" ; String desc = "" ; if ( parts . length == 3 ) { original = parts [ 1 ] ; newName = parts [ 1 ] ; desc = parts [ 2 ] ; } else if ( parts . length == 4 ) { original = parts [ 1 ] ; newName = parts [ 2 ] ; desc =... | Updates the value of the an attribute identified by the given name. If this attribute is not present, the value is added to the attribute list at the end of the already present attributes. Note that it is not possible to add an attribute in the middle of the attribute list if already certain other attributes are prese... |
1,619 | public synchronized void animatePanAndZoomTo ( final Point2D p , double scale , long duration ) { Point2D pp = new Point2D . Double ( ) ; m_itransform . transform ( p , pp ) ; animatePanAndZoomToAbs ( pp , scale , duration ) ; } | Snaps to the center of an smd pin, if the location location on p_layer is inside an smd pin of the own net, |
1,620 | private int modifyAllContacts ( Iterator < String > contactsIter ) { int totalContactsModified = 0 ; while ( contactsIter . hasNext ( ) ) totalContactsModified += modifyContact ( contactsIter . next ( ) , contactsIter . next ( ) ) ; return totalContactsModified ; } | Searches the adapter for a position matching mSyncRowId. The search starts at mSyncPosition and then alternates between moving up and moving down until 1) we find the right position, or 2) we run out of time, or 3) we have looked at every position |
1,621 | public ConsolePrintStream ( java . io . OutputStream out ) { super ( out , true ) ; } | parses [int]weekday, putting the pieces into parallel array entries |
1,622 | FormatSpecifierParser ( String format ) { this . format = format ; this . length = format . length ( ) ; } | Synchronously waits for a file to increase in size (such as to monitor that a download is progressing). |
1,623 | void addChangesRecursively ( Server server , List < MaterialRevision > outChanges ) throws MalformedURLException , IOException { if ( ! changed ) { return ; } if ( ! isPipeline ( ) ) { if ( ! outChanges . contains ( this ) ) outChanges . add ( this ) ; } else { for ( Modification m : modifications ) { Matcher matcher =... | Is called when this has hit the given defender. Determines how much hitpoints the defender will lose, based on this's ATK experience and weapon(s), the defender's DEF experience and defensive items, and a random generator. |
1,624 | public boolean addMember ( Principal p ) { return true ; } | tests if city is a paris district, if so it is probably a pplx that is newly considered as ppl http://forum.geonames.org/gforum/posts/list/2063.page |
1,625 | private Parsed currentParsed ( ) { return parsed . get ( parsed . size ( ) - 1 ) ; } | Do a double set : add (not replace !) the House Numbers to the current street and for each House numbers : set the current street as the street of the House Numbers |
1,626 | public void commit ( ) { activeValues . clear ( ) ; activeValues . addAll ( pendingValues ) ; } | Log all the statistics. |
1,627 | public void firePropertyChange ( String propertyName , double oldValue , double newValue ) { if ( changeSupport == null || oldValue == newValue ) { return ; } firePropertyChange ( propertyName , Double . valueOf ( oldValue ) , Double . valueOf ( newValue ) ) ; } | Adds fill components to empty cells in the first row and first column of the grid. This ensures that the grid spacing will be the same as shown in the designer. |
1,628 | protected List < IResource > updateCache ( IResource parent , final ISVNStatus [ ] statuses ) throws CoreException { final List < IResource > result = new ArrayList < IResource > ( ) ; if ( statuses != null ) { for ( ISVNStatus status : statuses ) { IResource resource = SVNWorkspaceRoot . getResourceFor ( parent , stat... | Writes the tags from this ExifInterface object into a jpeg compressed bitmap, removing prior exif tags. |
1,629 | private void push ( final int type ) { if ( outputStack == null ) { outputStack = new int [ 10 ] ; } int n = outputStack . length ; if ( outputStackTop >= n ) { int [ ] t = new int [ Math . max ( outputStackTop + 1 , 2 * n ) ] ; System . arraycopy ( outputStack , 0 , t , 0 , n ) ; outputStack = t ; } outputStack [ outp... | Get the current value or set if it has not been set yet |
1,630 | private boolean finishLine ( boolean sawNewline ) throws IOException { handleLine ( line . toString ( ) , sawReturn ? ( sawNewline ? "\r\n" : "\r" ) : ( sawNewline ? "\n" : "" ) ) ; line = new StringBuilder ( ) ; sawReturn = false ; return sawNewline ; } | Checks that the given string is a valid Java identifier. |
1,631 | public static Set < String > putSetIntoMap ( String key , Map < String , Set < String > > map , String value ) { Set < String > set = new HashSet < String > ( ) ; set . add ( value ) ; map . put ( key , set ) ; return set ; } | Checks that this field node is compatible with the given ASM API version. This methods checks that this node, and all its nodes recursively, do not contain elements that were introduced in more recent versions of the ASM API than the given version. |
1,632 | void convertType ( Class < ? > arg , Class < ? > target , Class < ? > functional ) { if ( arg . equals ( target ) && arg . equals ( functional ) ) { return ; } if ( arg == Void . TYPE || target == Void . TYPE ) { return ; } if ( arg . isPrimitive ( ) ) { Wrapper wArg = Wrapper . forPrimitiveType ( arg ) ; if ( target .... | Fills the list from top to bottom, starting with mFirstPosition |
1,633 | static String toC ( String identifier ) { return identifier . replace ( '.' , '_' ) ; } | This utility verifies whether cg Name already exists in the list or not. Since VPLEX Ingestion already populates the cluster & cg name, we don't need to add again here. |
1,634 | public static SelectManagerJni create ( ) { try { if ( ! isEnabled ( ) ) { return null ; } SelectManagerJni pollManager = _jniSelectManager . get ( ) ; if ( pollManager == null ) { pollManager = new SelectManagerJni ( ) ; if ( pollManager . start ( ) ) { _jniSelectManager . set ( pollManager ) ; } } return _jniSelectMa... | Delete favorite from favorite channel list, make it as searched station |
1,635 | public ListenableSocketChannel ( SocketChannel channel , Executor executor , AsyncSelector selectorThread ) throws IOException { logger . debug ( "ListenableSocketChannel: channel={}" , channel ) ; if ( channel == null || executor == null ) throw new IllegalArgumentException ( ) ; if ( channel . isBlocking ( ) ) throw ... | Add an init param to a filter. |
1,636 | public static RoutingKey create ( Object object ) { return new RoutingKey ( object . hashCode ( ) ) ; } | Allocates a new runtime table (at runtime). |
1,637 | private boolean runConfig ( ) { if ( lineSeparator == null ) { logger . error ( "Set lineSeparator" ) ; return false ; } if ( categoryIdentifers == null ) { logger . error ( "Set categoryIdentifers" ) ; return false ; } if ( languageIdentifers == null ) { logger . error ( "Set languageIdentifers" ) ; return false ; } i... | Adds or updates an extension field value for this User. When updating, the old value of the extension field is removed from this user and the new one will be added. |
1,638 | private void connect ( InetAddress anAddr , int aPort , int timeout ) throws IOException { InetAddress normalAddr = anAddr . isAnyLocalAddress ( ) ? InetAddress . getLocalHost ( ) : anAddr ; if ( streaming && usingSocks ( ) ) { socksConnect ( anAddr , aPort , 0 ) ; } else { IoBridge . connect ( fd , normalAddr , aPort ... | Clear a transparent image to 100% transparent |
1,639 | public int size ( ) { return count . get ( ) ; } | Order Discount. Make sure that last line is discount and check correctness |
1,640 | public Double convertWalkDistanceToWalkTime ( double walkDistance ) { Double walkTime = null ; switch ( studyAreaCode ) { case 1 : double a = 5.858772e-01 ; double b = 1.070014e-02 ; double c = - 1.464301e-06 ; double d = 2.694900e-09 ; double wt = a + b * walkDistance + c * Math . pow ( walkDistance , 2 ) + d * Math .... | Creates a new job definition create request based on fixed parameters and a specified activiti XML. |
1,641 | @ Override protected Statement classBlock ( RunNotifier notifier ) { return childrenInvoker ( notifier ) ; } | Ensured String x ends with expectedString |
1,642 | public static boolean [ ] convertStringToBooleanArr ( String noDictionaryColMapping ) { String [ ] splittedValue = null != noDictionaryColMapping ? noDictionaryColMapping . split ( CarbonCommonConstants . COMA_SPC_CHARACTER ) : new String [ 0 ] ; boolean [ ] noDictionaryMapping = new boolean [ splittedValue . length ] ... | Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices). |
1,643 | @ Deprecated protected void insertAtBoundry ( JEditorPane editor , HTMLDocument doc , int offset , Element insertElement , String html , HTML . Tag parentTag , HTML . Tag addTag ) { Element e ; Element commonParent ; boolean isFirst = ( offset == 0 ) ; if ( offset > 0 || insertElement == null ) { e = doc . getDefaultRo... | Copy glyph position data into a result array starting at the indicated offset in the array. If the passed-in result array is null, a new array will be allocated and returned. This is an internal method and does no extra argument checking. |
1,644 | public String reportError ( XMLLocator location , String domain , String key , Object [ ] arguments , short severity , Exception exception ) throws XNIException { MessageFormatter messageFormatter = getMessageFormatter ( domain ) ; String message ; if ( messageFormatter != null ) { message = messageFormatter . formatMe... | Creates a ReplyMessageAttribute from the on-the-wire octets. |
1,645 | protected GenericContainer deserializeWithSchemaAndVersion ( String topic , boolean isKey , byte [ ] payload ) throws SerializationException { return ( GenericContainer ) deserialize ( true , topic , isKey , payload , null ) ; } | Check status and retry the negotiation process if needed. |
1,646 | public static boolean amFetcher ( ) { return isFetcher ( Thread . currentThread ( ) ) ; } | Creates a new AsyncSocket object. |
1,647 | public static int readInts ( final File f , final int fileOffset , final int fileEnd , final CommonIndex a , final long offset , final long addend ) throws IOException { final int length = ( fileEnd - fileOffset ) * 4 ; final byte [ ] b = new byte [ length ] ; try ( InputStream stream = new FileInputStream ( f ) ) { in... | Subscribes to a given topic at the given qos |
1,648 | Thread newStartedThread ( Runnable runnable ) { Thread t = new Thread ( runnable ) ; t . setDaemon ( true ) ; t . start ( ) ; return t ; } | Call to Isilon Device to Create Replication Session |
1,649 | protected void connectionUp ( ) { if ( connectedStatus != null ) { connectedStatus . setText ( STATUS_CONNECTED ) ; connectedStatus . setBackground ( Color . green ) ; } } | Deactivates all previously bound cursors and unregisters their observers, prepares views for new data bindings |
1,650 | public R paramsToJsonEntity ( ) { try { mHttpEntity = createJsonStreamerEntity ( null ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return ( R ) this ; } | This resets the volatile double buffer. |
1,651 | public void testUsingProxySelector ( ) throws Exception { MockServer server = new MockServer ( "server" ) ; MockServer proxy = new MockServer ( "proxy" ) ; URL url = new URL ( "http://localhost:" + server . port ( ) ) ; ProxySelector defPS = ProxySelector . getDefault ( ) ; ProxySelector . setDefault ( new TestProxySel... | This will connect the specified unit to be an input to this unit. |
1,652 | public static void debug ( final Throwable throwable ) { final StringWriter errors = new StringWriter ( ) ; throwable . printStackTrace ( new PrintWriter ( errors ) ) ; debugLogger . accept ( errors . toString ( ) ) ; } | Builds a type checking extension relying on a Groovy script (type checking DSL). |
1,653 | BleachComposer ( Color c ) { int color = c . getRGB ( ) ; int [ ] components = new int [ 4 ] ; splitRgb ( color , components ) ; red = Math . max ( 1 , components [ RED ] ) ; green = Math . max ( 1 , components [ GREEN ] ) ; blue = Math . max ( 1 , components [ BLUE ] ) ; } | Take a string formatted as a six-figure OS grid reference (e.g. "TG514131") and create a new OSRef object that represents that grid reference. The first character must be H, N, S, O or T. The second character can be any uppercase character from A through Z excluding I. |
1,654 | public boolean appliesTo ( String line , String route ) { if ( ! lines . isEmpty ( ) && ! lines . contains ( line ) ) return false ; if ( ! routes . isEmpty ( ) && ! routes . contains ( route ) ) return false ; return true ; } | parse the text prepared in docBuf into a result DocData, no synchronization is required. |
1,655 | private void outputWarehouses ( Properties ctx , PrintWriter out , int orgID , int warehouseID , boolean includeAny ) { out . println ( "<warehouses orgID='" + orgID + "'>" ) ; if ( includeAny ) { out . println ( "<warehouse id='-1'" ) ; if ( warehouseID == 0 ) out . println ( " selected='selected'" ) ; out . println (... | Decrypt the string with the secret key. |
1,656 | private static void usage ( String s ) { err . println ( "\n** " + s + "\n" ) ; err . println ( "usage: java GenerateMBeanHTML xmlFile htmlFile" ) ; err . println ( "" ) ; err . println ( "Converts an MBeans description XML file into an HTML" ) ; err . println ( "file suitable for documentation" ) ; err . println ( "" ... | Move all preCondition block instructions before conditionBlock instructions |
1,657 | static public UniqueString resolveSynonym ( UniqueString name ) { Operator n = ( Operator ) DefinitionTable . get ( name ) ; if ( n == null ) return name ; else return n . getIdentifier ( ) ; } | Find the _Fields constant that matches fieldId, or null if its not found. |
1,658 | public static void start ( String [ ] args ) { startedAsService = true ; startCMR ( ) ; } | This method transforms a Method given in input, into a ConversionMethod. |
1,659 | public static boolean recycle ( File file ) { if ( OSUtils . isWindows ( ) && isLoaded ) { String path = null ; try { path = file . getCanonicalPath ( ) ; } catch ( IOException err ) { LOG . error ( "IOException" , err ) ; path = file . getAbsolutePath ( ) ; } return recycleNative ( path ) ; } else { return false ; } } | Converts params into an application/x-www-form-urlencoded encoded string. |
1,660 | public void update ( int from , int to ) { Change . Source < ? > source = IdRangeChangeSource . forItems ( from , to , 30 ) ; ExecutorService executorService = new ThreadPoolExecutor ( 0 , 10 , 0 , TimeUnit . SECONDS , new LinkedBlockingQueue < Runnable > ( ) ) ; WikibaseUris uris = new WikibaseUris ( "www.wikidata.org... | Show tips on startup? |
1,661 | public void write ( byte [ ] b , int o , int len ) { while ( len > 0 ) { int n = len <= availLen ? len : availLen ; System . arraycopy ( b , o , buf , offset , n ) ; incrementOffset ( n ) ; len -= n ; o += n ; } } | Checks whether the extension of the filename is one of those specified. <p> This method obtains the extension as the textual part of the filename after the last dot. There must be no directory separator after the dot. The extension check is case-sensitive on all platforms. |
1,662 | public void writeUpdate ( LogOutputStream out , Object value ) throws Exception { MarshalOutputStream s = new MarshalOutputStream ( out ) ; s . writeObject ( value ) ; s . flush ( ) ; } | Remove the row at the passed position from the cursor if exists. |
1,663 | public static Symbol GetBuiltInSymbol ( String str , boolean pcalMode ) { Symbol sym ; if ( pcalMode ) { sym = ( Symbol ) pcalBuiltInHashTable . get ( str ) ; } else { sym = ( Symbol ) builtInHashTable . get ( str ) ; } if ( sym == null || ( sym . pcal && ! pcalMode ) ) { return null ; } return sym ; } | adds a new Server Response line to the test elements, with the specified location. |
1,664 | @ Override public DataTable sample ( int newSize ) { int rowCount = getRowNumber ( ) ; if ( rowCount <= newSize ) { return this ; } int [ ] sampledSelectedIndices = new int [ rowCount ] ; for ( int i = 0 ; i < rowCount ; ++ i ) { sampledSelectedIndices [ i ] = i ; } Random rng = new Random ( 0 ) ; int swapIdx ; int tmp... | Finds a space proxy at the specified URL. |
1,665 | public void updateConfiguration ( @ NotNull Configuration configuration ) { myConfiguration = configuration ; invalidateGraphicsRenderer ( ) ; } | Returns a list of snapshots from repository sorted by snapshot creation date |
1,666 | protected void insert ( Object [ ] row ) throws SQLException { String key = getKey ( row ) ; int hash = key . hashCode ( ) ; prepInsertRow . setInt ( 1 , hash ) ; prepInsertRow . setInt ( 2 , index . id ) ; prepInsertRow . setString ( 3 , key ) ; prepInsertRow . execute ( ) ; ResultSet rs = prepInsertRow . getGenerated... | Create a proper formatting instance with a custom number format for the whole, numerator, and denominator. |
1,667 | public Pair < Pair < String , String [ ] > , List < String > > rewrite ( List < String > results ) { String commandId = null ; String [ ] args = null ; List < String > rewrittenResults = new ArrayList < > ( ) ; for ( String result : results ) { Triple triple = rewrite ( result ) ; rewrittenResults . add ( triple . mStr... | Converts all of the members in this list to lower case. |
1,668 | public ReliableLog ( String dirPath , LogHandler handler ) throws IOException { dir = new File ( dirPath ) ; if ( ! ( dir . exists ( ) ? dir . isDirectory ( ) : dir . mkdirs ( ) ) ) { throw new LogException ( "could not create directory for log: " + dirPath ) ; } this . handler = handler ; try { DataInputStream in = ne... | Iteratively adds paths to the code emission block order. |
1,669 | public static long timeTakenStringToInt ( String timeTakenString ) { RaptorStringTokenizer tok = new RaptorStringTokenizer ( timeTakenString , ":()." , true ) ; int minutes = Integer . parseInt ( tok . nextToken ( ) ) ; int seconds = Integer . parseInt ( tok . nextToken ( ) ) ; int millis = Integer . parseInt ( tok . n... | Pop, or undeclare all namespace definitions that are currently declared at the given element depth, or deepter. |
1,670 | private ASN1EncodableVector buildUnauthenticatedAttributes ( byte [ ] timeStampToken ) throws IOException { if ( timeStampToken == null ) return null ; String ID_TIME_STAMP_TOKEN = "1.2.840.113549.1.9.16.2.14" ; ASN1InputStream tempstream = new ASN1InputStream ( new ByteArrayInputStream ( timeStampToken ) ) ; ASN1Encod... | adds or updates a photo to an existing user if the .getValue() already exists a update will be done. If not a new one will be added |
1,671 | public boolean removeEntry ( T e ) { if ( e == null ) return false ; boolean removed = mYVals . remove ( e ) ; if ( removed ) { float val = e . getVal ( ) ; mYValueSum -= val ; calcMinMax ( ) ; } return removed ; } | Returns the count of rows in the trep_commit_seqno table. |
1,672 | @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { CheckBox enableComponentCheckbox = ( CheckBox ) view . findViewById ( R . id . enable_component_checkbox ) ; enableComponentCheckbox . performClick ( ) ; } | Returns the number of members (name/value pairs) in this object. |
1,673 | public void testLongConversionAndOrdering ( ) throws Exception { BytesRef previous = null ; BytesRef current = new BytesRef ( new byte [ Long . BYTES ] ) ; for ( long value = - 100000L ; value < 100000L ; value ++ ) { NumericUtils . longToSortableBytes ( value , current . bytes , current . offset ) ; if ( previous == n... | Write the movie in SWF format to the given file. |
1,674 | private static boolean isPaymentTypeRecurse ( GenericValue paymentType , String inputTypeId ) throws GenericEntityException { String parentTypeId = paymentType . getString ( "parentTypeId" ) ; if ( parentTypeId == null ) { return false ; } if ( parentTypeId . equals ( inputTypeId ) ) { return true ; } return isPaymentT... | Ensure the internal array's capacity. |
1,675 | public static double pdf ( double x , double k , double theta , double shift ) { if ( x <= shift || x == Double . POSITIVE_INFINITY ) { return 0. ; } x = ( x - shift ) * theta ; final double ex = Math . exp ( x ) ; return ex < Double . POSITIVE_INFINITY ? Math . exp ( k * x - ex - GammaDistribution . logGamma ( k ) ) *... | Makes this object immutable. |
1,676 | public Address __rmul__ ( final Object rhs ) { return new Address ( m_value . multiply ( getBigInteger ( rhs ) ) ) ; } | Apply the passed values to the current Transform |
1,677 | public void appendToNalUnit ( byte [ ] data , int offset , int limit ) { if ( ! isFilling ) { return ; } int readLength = limit - offset ; if ( buffer . length < bufferLength + readLength ) { buffer = Arrays . copyOf ( buffer , ( bufferLength + readLength ) * 2 ) ; } System . arraycopy ( data , offset , buffer , buffer... | Return a List of Node objects that have the given name and are immediate children of the given element; if name is null, all child elements will be included. |
1,678 | public RuleName ruleName ( ) { String labelStr = toString ( ) ; int colonLocation = labelStr . lastIndexOf ( ':' ) ; int ruleNameStart = colonLocation + 1 ; String ruleNameStr = labelStr . substring ( ruleNameStart ) ; return RuleName . create ( ruleNameStr ) ; } | Loads an anchor pane using the supplied loader. |
1,679 | public void exception ( Throwable e ) { final String msg = e . getMessage ( ) ; log ( Level . SEVERE , msg != null ? msg : "An exception occurred." , e ) ; } | Submerge attacking/defending SUBS if they're alone OR with TRNS against only AIRCRAFT |
1,680 | public static boolean containsModifiedMessage ( TlsContext tlsContext ) { return ( getModifiedMessagePosition ( tlsContext ) != - 1 ) ; } | Writes this object out to a stream (i.e., serializes it). |
1,681 | public void remove ( HistoryReference href ) { synchronized ( hrefList ) { int index = hrefList . indexOf ( href ) ; if ( index >= 0 ) { hrefList . remove ( index ) ; fireTableRowsDeleted ( index , index ) ; } } } | Construct a new regular expression filter with the specified flags case sensitivity. |
1,682 | private static boolean isAssignableFrom ( Type from , ParameterizedType to , Map < String , Type > typeVarMap ) { if ( from == null ) { return false ; } if ( to . equals ( from ) ) { return true ; } Class < ? > clazz = $Gson$Types . getRawType ( from ) ; ParameterizedType ptype = null ; if ( from instanceof Parameteriz... | Updates the progress in the Windows 7+ task bar, if available. |
1,683 | public static int prefixCodedToInt ( final BytesRef val ) { int sortableBits = 0 ; for ( int i = val . offset + 1 , limit = val . offset + val . length ; i < limit ; i ++ ) { sortableBits <<= 7 ; final byte b = val . bytes [ i ] ; if ( b < 0 ) { throw new NumberFormatException ( "Invalid prefixCoded numerical value rep... | Starts the syncing process |
1,684 | @ Nullable public static String mergeXml ( @ NotNull RenderingContext context , String sourceXml , String targetXml , File targetFile ) { boolean ok ; String fileName = targetFile . getName ( ) ; String contents ; if ( fileName . equals ( SdkConstants . FN_ANDROID_MANIFEST_XML ) ) { Document currentDocument = XmlUtils ... | send a list of trains known by Operations to the client |
1,685 | synchronized Pair < String , Map < VariantSetType , List < Variant > > > nextSet ( ) throws IOException { final Pair < String , Map < VariantSetType , List < Variant > > > set = mVariantSet . nextSet ( ) ; if ( set == null ) { return null ; } final String name = set . getA ( ) ; synchronized ( mNames ) { mNames . add (... | Writes the attribute set to a file. |
1,686 | public static StringBuilder leftShift ( StringBuilder self , Object value ) { self . append ( value ) ; return self ; } | This isn't what the RI does. The RI doesn't have hard-coded defaults, so supplying your own "content.types.user.table" means you don't get any of the built-ins, and the built-ins come from "$JAVA_HOME/lib/content-types.properties". |
1,687 | public boolean parseKMLFile ( File file ) { mLocalFile = file ; Log . d ( BonusPackHelper . LOG_TAG , "KmlProvider.parseKMLFile:" + mLocalFile . getAbsolutePath ( ) ) ; InputStream stream ; boolean ok ; try { stream = new BufferedInputStream ( new FileInputStream ( mLocalFile ) ) ; ok = parseKMLStream ( stream , null )... | Interpolate between two color values by the given mixing proportion. A mixing fraction of 0 will result in c1, a value of 1.0 will result in c2, and value of 0.5 will result in the color mid-way between the two in RGB color space. |
1,688 | private boolean isRedundant ( Coordinate pt ) { if ( ptList . size ( ) < 1 ) return false ; Coordinate lastPt = ( Coordinate ) ptList . get ( ptList . size ( ) - 1 ) ; double ptDist = pt . distance ( lastPt ) ; if ( ptDist < minimimVertexDistance ) return true ; return false ; } | Used by unit tests. |
1,689 | private void writeEscUTF16 ( String s , int start , int length , boolean isAttVal ) throws SAXException { String subString = s . substring ( start , start + length ) ; write ( StringEscapeUtils . escapeHtml4 ( subString ) ) ; } | Zooms the view to fit. |
1,690 | public void resume ( ) { mPaused = false ; mLastFrameTime = System . currentTimeMillis ( ) ; invalidate ( ) ; } | Utility function of sparse-unsafe operations. |
1,691 | public void runTest ( ) throws Throwable { Document doc ; NodeList elementList ; Node nameNode ; CharacterData child ; String childData ; doc = ( Document ) load ( "staff" , true ) ; elementList = doc . getElementsByTagName ( "name" ) ; nameNode = elementList . item ( 0 ) ; child = ( CharacterData ) nameNode . getFirst... | Creates a new AtomicInteger with the given initial value. |
1,692 | public void remove ( String key ) { Iterator < Pair < String , ArrayList < String > > > it = store . iterator ( ) ; while ( it . hasNext ( ) ) { String thisKey = it . next ( ) . first ; if ( key . equals ( thisKey ) ) { it . remove ( ) ; break ; } } } | Generates a String representation of a Java Date object. The string is formatted according to the specification for GnuStep ASCII property list dates. |
1,693 | public String toString ( ) { StringBuffer s = new StringBuffer ( ) ; boolean colon = false ; s . append ( "ClassHierarchy:{" ) ; for ( TypeNode typeNode : typeNodeList ) { if ( colon ) { s . append ( "," ) ; } else { colon = true ; } s . append ( typeNode ) ; } s . append ( "}" ) ; return s . toString ( ) ; } | Calculates the partitions for a given split number. |
1,694 | private void movePos ( float deltaY ) { if ( ( deltaY < 0 && mPtrIndicator . isInStartPosition ( ) ) ) { if ( DEBUG ) { PtrCLog . e ( LOG_TAG , String . format ( "has reached the top" ) ) ; } return ; } int to = mPtrIndicator . getCurrentPosY ( ) + ( int ) deltaY ; if ( mPtrIndicator . willOverTop ( to ) ) { if ( DEBUG... | Sorts the specified array in ascending numerical order. |
1,695 | public final AssertSubscriber < T > await ( ) { if ( cdl . getCount ( ) == 0 ) { return this ; } try { cdl . await ( ) ; } catch ( InterruptedException ex ) { throw new AssertionError ( "Wait interrupted" , ex ) ; } return this ; } | Overwrite this method to provide smarter storage visit plans |
1,696 | public static float computeDiscardScale ( float amount , float range , boolean fromClick ) { if ( Math . abs ( amount ) < 1.0f ) return 1.0f ; float t = amount / range ; float endScale = fromClick ? DISCARD_END_SCALE_CLICK : DISCARD_END_SCALE_SWIPE ; return MathUtils . interpolate ( 1.0f , endScale , Math . abs ( t ) )... | Get the max value for a long |
1,697 | public boolean finish ( ) { if ( ! started ) return false ; boolean ok = true ; started = false ; try { out . write ( 0x3b ) ; out . flush ( ) ; if ( closeStream ) { out . close ( ) ; } } catch ( IOException e ) { ok = false ; } return ok ; } | Check if items must be classic |
1,698 | public DViewCertCsrPem ( JFrame parent , String title , X509Certificate cert ) throws CryptoException { super ( parent , title , Dialog . ModalityType . DOCUMENT_MODAL ) ; this . cert = cert ; initComponents ( ) ; } | Since unsafe.fieldOffset(Field) will give us the offset to the first byte of that field all we need to do is find which of the non-static declared fields has the greatest offset. |
1,699 | public static ByteString valueOfUtf8 ( final CharSequence s ) { if ( s . length ( ) == 0 ) { return EMPTY ; } return wrap ( StaticUtils . getBytes ( s ) ) ; } | Called by various layout mechanisms to compute the height based on the configured height percentage. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.