comment_sentence_id int64 1 5.52k | class stringlengths 9 50 | comment_sentence stringlengths 1 1.32k | partition int64 0 1 | instance_type int64 0 1 | category stringclasses 1
value | label int64 0 1 | combo stringlengths 15 1.35k | __index_level_0__ int64 7.6k 16.5k |
|---|---|---|---|---|---|---|---|---|
2,712 | ArbitraryInstances.java | for mutable types, a fresh | 0 | 0 | Pointer | 0 | for mutable types, a fresh | ArbitraryInstances.java | 8,798 |
3,736 | SmoothRateLimiter.java | so, if rate 1 permit per second, and | 0 | 0 | Pointer | 0 | so, if rate 1 permit per second, and | SmoothRateLimiter.java | 8,799 |
2,713 | ArbitraryInstances.java | instance is created each time @code get is called. | 0 | 0 | Pointer | 0 | instance is created each time @code get is called. | ArbitraryInstances.java | 8,800 |
3,737 | SmoothRateLimiter.java | arrivals come exactly one second after the previous, then storedpermits is never increased | 0 | 0 | Pointer | 0 | arrivals come exactly one second after the previous, then storedpermits is never increased | SmoothRateLimiter.java | 8,801 |
2,714 | ArbitraryInstances.java | @author kevin bourrillion | 0 | 0 | Pointer | 0 | @author kevin bourrillion | ArbitraryInstances.java | 8,802 |
3,738 | SmoothRateLimiter.java | we would only increase it for arrivals later than the expected one second. | 0 | 0 | Pointer | 0 | we would only increase it for arrivals later than the expected one second. | SmoothRateLimiter.java | 8,803 |
2,715 | ArbitraryInstances.java | @author ben yu | 0 | 0 | Pointer | 0 | @author ben yu | ArbitraryInstances.java | 8,804 |
3,739 | SmoothRateLimiter.java | the time when the next request no matter its size will be granted. | 0 | 0 | Pointer | 0 | the time when the next request no matter its size will be granted. | SmoothRateLimiter.java | 8,805 |
2,716 | ArbitraryInstances.java | @since 120 | 0 | 0 | Pointer | 0 | @since 120 | ArbitraryInstances.java | 8,806 |
3,740 | SmoothRateLimiter.java | after granting a request, | 0 | 0 | Pointer | 0 | after granting a request, | SmoothRateLimiter.java | 8,807 |
3,741 | SmoothRateLimiter.java | this is pushed further in the future. | 0 | 0 | Pointer | 0 | this is pushed further in the future. | SmoothRateLimiter.java | 8,808 |
3,742 | SmoothRateLimiter.java | large requests push this further than small requests. | 0 | 0 | Pointer | 0 | large requests push this further than small requests. | SmoothRateLimiter.java | 8,809 |
3,743 | SmoothRateLimiter.java | this implements the following function where coldinterval coldfactor stableinterval. | 0 | 0 | Pointer | 0 | this implements the following function where coldinterval coldfactor stableinterval. | SmoothRateLimiter.java | 8,810 |
3,744 | SmoothRateLimiter.java | pre | 0 | 0 | Pointer | 0 | pre | SmoothRateLimiter.java | 8,811 |
3,745 | SmoothRateLimiter.java | ^ throttling | 0 | 0 | Pointer | 0 | ^ throttling | SmoothRateLimiter.java | 8,812 |
3,746 | SmoothRateLimiter.java | cold | 0 | 0 | Pointer | 0 | cold | SmoothRateLimiter.java | 8,813 |
3,747 | SmoothRateLimiter.java | interval . | 0 | 0 | Pointer | 0 | interval . | SmoothRateLimiter.java | 8,814 |
3,748 | SmoothRateLimiter.java | warmup period is the area of the trapezoid between | 0 | 0 | Pointer | 0 | warmup period is the area of the trapezoid between | SmoothRateLimiter.java | 8,815 |
3,749 | SmoothRateLimiter.java | thresholdpermits and maxpermits | 0 | 0 | Pointer | 0 | thresholdpermits and maxpermits | SmoothRateLimiter.java | 8,816 |
3,750 | SmoothRateLimiter.java | stable warm . | 0 | 0 | Pointer | 0 | stable warm . | SmoothRateLimiter.java | 8,817 |
3,751 | SmoothRateLimiter.java | interval . | 0 | 0 | Pointer | 0 | interval . | SmoothRateLimiter.java | 8,818 |
3,752 | SmoothRateLimiter.java | up . | 0 | 0 | Pointer | 0 | up . | SmoothRateLimiter.java | 8,819 |
3,753 | SmoothRateLimiter.java | period. | 0 | 0 | Pointer | 0 | period. | SmoothRateLimiter.java | 8,820 |
3,754 | SmoothRateLimiter.java | 0 storedpermits | 0 | 0 | Pointer | 0 | 0 storedpermits | SmoothRateLimiter.java | 8,821 |
3,755 | SmoothRateLimiter.java | 0 thresholdpermits maxpermits | 0 | 0 | Pointer | 0 | 0 thresholdpermits maxpermits | SmoothRateLimiter.java | 8,822 |
3,756 | SmoothRateLimiter.java | pre | 0 | 0 | Pointer | 0 | pre | SmoothRateLimiter.java | 8,823 |
3,757 | SmoothRateLimiter.java | before going into the details of this particular function, let s keep in mind the basics | 0 | 0 | Pointer | 0 | before going into the details of this particular function, let s keep in mind the basics | SmoothRateLimiter.java | 8,824 |
3,758 | SmoothRateLimiter.java | ol | 0 | 0 | Pointer | 0 | ol | SmoothRateLimiter.java | 8,825 |
3,759 | SmoothRateLimiter.java | li the state of the ratelimiter storedpermits is a vertical line in this figure. | 0 | 0 | Pointer | 0 | li the state of the ratelimiter storedpermits is a vertical line in this figure. | SmoothRateLimiter.java | 8,826 |
3,760 | SmoothRateLimiter.java | li when the ratelimiter is not used, this goes right up to maxpermits | 0 | 0 | Pointer | 0 | li when the ratelimiter is not used, this goes right up to maxpermits | SmoothRateLimiter.java | 8,827 |
3,761 | SmoothRateLimiter.java | li when the ratelimiter is used, this goes left down to zero , since if we have | 0 | 0 | Pointer | 0 | li when the ratelimiter is used, this goes left down to zero , since if we have | SmoothRateLimiter.java | 8,828 |
3,762 | SmoothRateLimiter.java | storedpermits, we serve from those first | 0 | 0 | Pointer | 0 | storedpermits, we serve from those first | SmoothRateLimiter.java | 8,829 |
3,763 | SmoothRateLimiter.java | li when unused , we go right at a constant rate! | 0 | 0 | Pointer | 0 | li when unused , we go right at a constant rate! | SmoothRateLimiter.java | 8,830 |
3,764 | SmoothRateLimiter.java | the rate at which we move to the right is | 0 | 0 | Pointer | 0 | the rate at which we move to the right is | SmoothRateLimiter.java | 8,831 |
3,766 | SmoothRateLimiter.java | this ensures that the time it takes to go from 0 to | 0 | 0 | Pointer | 0 | this ensures that the time it takes to go from 0 to | SmoothRateLimiter.java | 8,832 |
3,768 | SmoothRateLimiter.java | li when used , the time it takes, as explained in the introductory class note, is equal to | 0 | 0 | Pointer | 0 | li when used , the time it takes, as explained in the introductory class note, is equal to | SmoothRateLimiter.java | 8,833 |
3,769 | SmoothRateLimiter.java | the integral of our function, between x permits and x k permits, assuming we want to | 0 | 0 | Pointer | 0 | the integral of our function, between x permits and x k permits, assuming we want to | SmoothRateLimiter.java | 8,834 |
2,746 | ArrayListMultimapGwtSerializationDependencies.java | a dummy superclass to support gwt serialization of the element types of an @link | 0 | 0 | Pointer | 0 | a dummy superclass to support gwt serialization of the element types of an @link | ArrayListMultimapGwtSerializationDependencies.java | 8,835 |
3,770 | SmoothRateLimiter.java | spend k saved permits. | 0 | 0 | Pointer | 0 | spend k saved permits. | SmoothRateLimiter.java | 8,836 |
2,747 | ArrayListMultimapGwtSerializationDependencies.java | arraylistmultimap . | 0 | 0 | Pointer | 0 | arraylistmultimap . | ArrayListMultimapGwtSerializationDependencies.java | 8,837 |
3,771 | SmoothRateLimiter.java | ol | 0 | 0 | Pointer | 0 | ol | SmoothRateLimiter.java | 8,838 |
2,748 | ArrayListMultimapGwtSerializationDependencies.java | the gwt supersource for this class contains a field for each type. | 0 | 0 | Pointer | 0 | the gwt supersource for this class contains a field for each type. | ArrayListMultimapGwtSerializationDependencies.java | 8,839 |
3,772 | SmoothRateLimiter.java | p in summary, the time it takes to move to the left spend k permits , is equal to the area of | 0 | 0 | Pointer | 0 | p in summary, the time it takes to move to the left spend k permits , is equal to the area of | SmoothRateLimiter.java | 8,840 |
3,773 | SmoothRateLimiter.java | the function of width k. | 0 | 0 | Pointer | 0 | the function of width k. | SmoothRateLimiter.java | 8,841 |
3,774 | SmoothRateLimiter.java | p assuming we have saturated demand, the time to go from maxpermits to thresholdpermits is | 0 | 0 | Pointer | 0 | p assuming we have saturated demand, the time to go from maxpermits to thresholdpermits is | SmoothRateLimiter.java | 8,842 |
3,775 | SmoothRateLimiter.java | equal to warmupperiod. | 0 | 0 | Pointer | 0 | equal to warmupperiod. | SmoothRateLimiter.java | 8,843 |
3,776 | SmoothRateLimiter.java | and the time to go from thresholdpermits to 0 is warmupperiod 2. | 0 | 0 | Pointer | 0 | and the time to go from thresholdpermits to 0 is warmupperiod 2. | SmoothRateLimiter.java | 8,844 |
3,777 | SmoothRateLimiter.java | the | 0 | 0 | Pointer | 0 | the | SmoothRateLimiter.java | 8,845 |
3,778 | SmoothRateLimiter.java | reason that this is warmupperiod 2 is to maintain the behavior of the original implementation | 0 | 0 | Pointer | 0 | reason that this is warmupperiod 2 is to maintain the behavior of the original implementation | SmoothRateLimiter.java | 8,846 |
3,779 | SmoothRateLimiter.java | where coldfactor was hard coded as 3. | 0 | 0 | Pointer | 0 | where coldfactor was hard coded as 3. | SmoothRateLimiter.java | 8,847 |
3,780 | SmoothRateLimiter.java | p it remains to calculate thresholdspermits and maxpermits. | 0 | 0 | Pointer | 0 | p it remains to calculate thresholdspermits and maxpermits. | SmoothRateLimiter.java | 8,848 |
3,782 | SmoothRateLimiter.java | li the time to go from thresholdpermits to 0 is equal to the integral of the function | 0 | 0 | Pointer | 0 | li the time to go from thresholdpermits to 0 is equal to the integral of the function | SmoothRateLimiter.java | 8,849 |
3,783 | SmoothRateLimiter.java | between 0 and thresholdpermits. | 0 | 0 | Pointer | 0 | between 0 and thresholdpermits. | SmoothRateLimiter.java | 8,850 |
2,760 | AtomicDoubleArrayTest.java | unit test for @link atomicdoublearray . | 0 | 0 | Pointer | 0 | unit test for @link atomicdoublearray . | AtomicDoubleArrayTest.java | 8,851 |
3,784 | SmoothRateLimiter.java | this is thresholdpermits stableintervals. | 0 | 0 | Pointer | 0 | this is thresholdpermits stableintervals. | SmoothRateLimiter.java | 8,852 |
3,787 | SmoothRateLimiter.java | therefore | 0 | 0 | Pointer | 0 | therefore | SmoothRateLimiter.java | 8,853 |
2,765 | BaseEncodingBenchmark.java | benchmark for @code baseencoding performance. | 0 | 0 | Pointer | 0 | benchmark for @code baseencoding performance. | BaseEncodingBenchmark.java | 8,854 |
3,789 | SmoothRateLimiter.java | thresholdpermits 05 warmupperiod stableinterval | 0 | 0 | Pointer | 0 | thresholdpermits 05 warmupperiod stableinterval | SmoothRateLimiter.java | 8,855 |
2,767 | BloomFilter.java | a bloom filter for instances of @code t . | 0 | 0 | Pointer | 0 | a bloom filter for instances of @code t . | BloomFilter.java | 8,856 |
3,791 | SmoothRateLimiter.java | li the time to go from maxpermits to thresholdpermits is equal to the integral of the | 0 | 0 | Pointer | 0 | li the time to go from maxpermits to thresholdpermits is equal to the integral of the | SmoothRateLimiter.java | 8,857 |
2,768 | BloomFilter.java | a bloom filter offers an approximate containment test | 0 | 0 | Pointer | 0 | a bloom filter offers an approximate containment test | BloomFilter.java | 8,858 |
3,792 | SmoothRateLimiter.java | function between thresholdpermits and maxpermits. | 0 | 0 | Pointer | 0 | function between thresholdpermits and maxpermits. | SmoothRateLimiter.java | 8,859 |
2,769 | BloomFilter.java | with one sided error if it claims that an element is contained in it, this might be in error, | 0 | 0 | Pointer | 0 | with one sided error if it claims that an element is contained in it, this might be in error, | BloomFilter.java | 8,860 |
3,793 | SmoothRateLimiter.java | this is the area of the pictured | 0 | 0 | Pointer | 0 | this is the area of the pictured | SmoothRateLimiter.java | 8,861 |
2,770 | BloomFilter.java | but if it claims that an element is i not i contained in it, then this is definitely true. | 0 | 0 | Pointer | 0 | but if it claims that an element is i not i contained in it, then this is definitely true. | BloomFilter.java | 8,862 |
3,794 | SmoothRateLimiter.java | trapezoid, and it is equal to 05 stableinterval coldinterval maxpermits | 0 | 0 | Pointer | 0 | trapezoid, and it is equal to 05 stableinterval coldinterval maxpermits | SmoothRateLimiter.java | 8,863 |
3,795 | SmoothRateLimiter.java | thresholdpermits . | 0 | 0 | Pointer | 0 | thresholdpermits . | SmoothRateLimiter.java | 8,864 |
3,798 | SmoothRateLimiter.java | maxpermits thresholdpermits 2 warmupperiod stableinterval coldinterval | 0 | 0 | Pointer | 0 | maxpermits thresholdpermits 2 warmupperiod stableinterval coldinterval | SmoothRateLimiter.java | 8,865 |
3,801 | SmoothRateLimiter.java | how is the ratelimiter designed, and why? | 0 | 0 | Pointer | 0 | how is the ratelimiter designed, and why? | SmoothRateLimiter.java | 8,866 |
3,802 | SmoothRateLimiter.java | the primary feature of a ratelimiter is its stable rate , the maximum rate that is should | 0 | 0 | Pointer | 0 | the primary feature of a ratelimiter is its stable rate , the maximum rate that is should | SmoothRateLimiter.java | 8,867 |
3,803 | SmoothRateLimiter.java | allow at normal conditions. | 0 | 0 | Pointer | 0 | allow at normal conditions. | SmoothRateLimiter.java | 8,868 |
2,780 | BloomFilter.java | both serialized forms will continue to be | 0 | 0 | Pointer | 0 | both serialized forms will continue to be | BloomFilter.java | 8,869 |
3,804 | SmoothRateLimiter.java | this is enforced by throttling incoming requests as needed, ie | 0 | 0 | Pointer | 0 | this is enforced by throttling incoming requests as needed, ie | SmoothRateLimiter.java | 8,870 |
2,781 | BloomFilter.java | supported by future versions of this library. | 0 | 0 | Pointer | 0 | supported by future versions of this library. | BloomFilter.java | 8,871 |
3,805 | SmoothRateLimiter.java | compute, for an incoming request, the appropriate throttle time, and make the calling thread | 0 | 0 | Pointer | 0 | compute, for an incoming request, the appropriate throttle time, and make the calling thread | SmoothRateLimiter.java | 8,872 |
2,782 | BloomFilter.java | however, serial forms generated by newer versions | 0 | 0 | Pointer | 0 | however, serial forms generated by newer versions | BloomFilter.java | 8,873 |
3,806 | SmoothRateLimiter.java | wait as much. | 0 | 0 | Pointer | 0 | wait as much. | SmoothRateLimiter.java | 8,874 |
2,783 | BloomFilter.java | of the code may not be readable by older versions of the code eg, a serialized bloom filter | 0 | 0 | Pointer | 0 | of the code may not be readable by older versions of the code eg, a serialized bloom filter | BloomFilter.java | 8,875 |
3,807 | SmoothRateLimiter.java | the simplest way to maintain a rate of qps is to keep the timestamp of the last granted | 0 | 0 | Pointer | 0 | the simplest way to maintain a rate of qps is to keep the timestamp of the last granted | SmoothRateLimiter.java | 8,876 |
2,784 | BloomFilter.java | generated today may i not i be readable by a binary that was compiled 6 months ago . | 0 | 0 | Pointer | 0 | generated today may i not i be readable by a binary that was compiled 6 months ago . | BloomFilter.java | 8,877 |
3,808 | SmoothRateLimiter.java | request, and ensure that 1 qps seconds have elapsed since then. | 0 | 0 | Pointer | 0 | request, and ensure that 1 qps seconds have elapsed since then. | SmoothRateLimiter.java | 8,878 |
2,785 | BloomFilter.java | p as of guava 230, this class is thread safe and lock free. | 0 | 0 | Pointer | 0 | p as of guava 230, this class is thread safe and lock free. | BloomFilter.java | 8,879 |
3,809 | SmoothRateLimiter.java | for example, for a rate of | 0 | 0 | Pointer | 0 | for example, for a rate of | SmoothRateLimiter.java | 8,880 |
2,786 | BloomFilter.java | it internally uses atomics and | 0 | 0 | Pointer | 0 | it internally uses atomics and | BloomFilter.java | 8,881 |
3,810 | SmoothRateLimiter.java | qps 5 5 tokens per second , if we ensure that a request isn t granted earlier than 200ms after | 0 | 0 | Pointer | 0 | qps 5 5 tokens per second , if we ensure that a request isn t granted earlier than 200ms after | SmoothRateLimiter.java | 8,882 |
2,787 | BloomFilter.java | compare and swap to ensure correctness when multiple threads are used to access it. | 0 | 0 | Pointer | 0 | compare and swap to ensure correctness when multiple threads are used to access it. | BloomFilter.java | 8,883 |
3,811 | SmoothRateLimiter.java | the last one, then we achieve the intended rate. | 0 | 0 | Pointer | 0 | the last one, then we achieve the intended rate. | SmoothRateLimiter.java | 8,884 |
2,788 | BloomFilter.java | @param t the type of instances that the @code bloomfilter accepts | 0 | 0 | Pointer | 0 | @param t the type of instances that the @code bloomfilter accepts | BloomFilter.java | 8,885 |
3,812 | SmoothRateLimiter.java | if a request comes and the last request was | 0 | 0 | Pointer | 0 | if a request comes and the last request was | SmoothRateLimiter.java | 8,886 |
2,789 | BloomFilter.java | @author dimitris andreou | 0 | 0 | Pointer | 0 | @author dimitris andreou | BloomFilter.java | 8,887 |
3,813 | SmoothRateLimiter.java | granted only 100ms ago, then we wait for another 100ms. | 0 | 0 | Pointer | 0 | granted only 100ms ago, then we wait for another 100ms. | SmoothRateLimiter.java | 8,888 |
2,790 | BloomFilter.java | @author kevin bourrillion | 0 | 0 | Pointer | 0 | @author kevin bourrillion | BloomFilter.java | 8,889 |
3,814 | SmoothRateLimiter.java | at this rate, serving 15 fresh permits | 0 | 0 | Pointer | 0 | at this rate, serving 15 fresh permits | SmoothRateLimiter.java | 8,890 |
2,791 | BloomFilter.java | @since 110 thread safe since 230 | 0 | 0 | Pointer | 0 | @since 110 thread safe since 230 | BloomFilter.java | 8,891 |
3,815 | SmoothRateLimiter.java | ie for an acquire 15 request naturally takes 3 seconds. | 0 | 0 | Pointer | 0 | ie for an acquire 15 request naturally takes 3 seconds. | SmoothRateLimiter.java | 8,892 |
2,792 | BloomFilter.java | cheat sheet m total bits n expected insertions b m n, bits per insertion p expected false positive probability 1 optimal k b ln2 2 p 1 e ^ kn m ^k 3 for optimal k p 2 ^ k 06185^b 4 for optimal k m nlnp ln2 ^ 2 | 0 | 0 | Pointer | 0 | cheat sheet m total bits n expected insertions b m n, bits per insertion p expected false positive probability 1 optimal k b ln2 2 p 1 e ^ kn m ^k 3 for optimal k p 2 ^ k 06185^b 4 for optimal k m nlnp ln2 ^ 2 | BloomFilter.java | 8,893 |
3,816 | SmoothRateLimiter.java | it is important to realize that such a ratelimiter has a very superficial memory of the past | 0 | 0 | Pointer | 0 | it is important to realize that such a ratelimiter has a very superficial memory of the past | SmoothRateLimiter.java | 8,894 |
2,793 | BloomFilter.java | a strategy to translate t instances, to @code numhashfunctions bit indexes. | 0 | 0 | Pointer | 0 | a strategy to translate t instances, to @code numhashfunctions bit indexes. | BloomFilter.java | 8,895 |
3,817 | SmoothRateLimiter.java | it only remembers the last request. | 0 | 0 | Pointer | 0 | it only remembers the last request. | SmoothRateLimiter.java | 8,896 |
2,794 | BloomFilter.java | p implementations should be collections of pure functions ie stateless . | 0 | 0 | Pointer | 0 | p implementations should be collections of pure functions ie stateless . | BloomFilter.java | 8,897 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.