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
3,438
Preconditions.java
calculate square root
0
0
Pointer
0
calculate square root | Preconditions.java
8,598
3,439
Preconditions.java
pre
1
0
Pointer
0
pre | Preconditions.java
8,599
3,440
Preconditions.java
p so that a hypothetical bad caller of this method, such as
0
0
Pointer
0
p so that a hypothetical bad caller of this method, such as | Preconditions.java
8,600
3,441
Preconditions.java
pre @code
1
0
Pointer
0
pre @code | Preconditions.java
8,601
3,442
Preconditions.java
void examplebadcaller
0
0
Pointer
0
void examplebadcaller | Preconditions.java
8,602
3,443
Preconditions.java
double d sqrt 10
1
0
Pointer
0
double d sqrt 10 | Preconditions.java
8,603
3,444
Preconditions.java
pre
0
0
Pointer
0
pre | Preconditions.java
8,604
3,445
Preconditions.java
p would be flagged as having called @code sqrt with an illegal argument.
1
0
Pointer
0
p would be flagged as having called @code sqrt with an illegal argument. | Preconditions.java
8,605
3,446
Preconditions.java
h3 performance h3
0
0
Pointer
0
h3 performance h3 | Preconditions.java
8,606
3,447
Preconditions.java
p avoid passing message arguments that are expensive to compute your code will always compute
1
0
Pointer
0
p avoid passing message arguments that are expensive to compute your code will always compute | Preconditions.java
8,607
3,448
Preconditions.java
them, even though they usually won t be needed.
0
0
Pointer
0
them, even though they usually won t be needed. | Preconditions.java
8,608
3,449
Preconditions.java
if you have such arguments, use the conventional
1
0
Pointer
0
if you have such arguments, use the conventional | Preconditions.java
8,609
3,450
Preconditions.java
if throw idiom instead.
0
0
Pointer
0
if throw idiom instead. | Preconditions.java
8,610
3,451
Preconditions.java
p depending on your message arguments, memory may be allocated for boxing and varargs array
1
0
Pointer
0
p depending on your message arguments, memory may be allocated for boxing and varargs array | Preconditions.java
8,611
3,452
Preconditions.java
creation.
0
0
Pointer
0
creation. | Preconditions.java
8,612
3,453
Preconditions.java
however, the methods of this class have a large number of overloads that prevent such
1
0
Pointer
0
however, the methods of this class have a large number of overloads that prevent such | Preconditions.java
8,613
3,454
Preconditions.java
allocations in many common cases.
0
0
Pointer
0
allocations in many common cases. | Preconditions.java
8,614
3,455
Preconditions.java
p the message string is not formatted unless the exception will be thrown, so the cost of the
1
0
Pointer
0
p the message string is not formatted unless the exception will be thrown, so the cost of the | Preconditions.java
8,615
3,456
Preconditions.java
string formatting itself should not be a concern.
0
0
Pointer
0
string formatting itself should not be a concern. | Preconditions.java
8,616
3,457
Preconditions.java
p as with any performance concerns, you should consider profiling your code in a production
1
0
Pointer
0
p as with any performance concerns, you should consider profiling your code in a production | Preconditions.java
8,617
3,458
Preconditions.java
environment if possible before spending a lot of effort on tweaking a particular element.
0
0
Pointer
0
environment if possible before spending a lot of effort on tweaking a particular element. | Preconditions.java
8,618
3,459
Preconditions.java
h3 other types of preconditions h3
1
0
Pointer
0
h3 other types of preconditions h3 | Preconditions.java
8,619
3,460
Preconditions.java
p not every type of precondition failure is supported by these methods.
0
0
Pointer
0
p not every type of precondition failure is supported by these methods. | Preconditions.java
8,620
3,461
Preconditions.java
continue to throw
1
0
Pointer
0
continue to throw | Preconditions.java
8,621
3,462
Preconditions.java
standard jdk exceptions such as @link java^util.nosuchelementexception or @link
0
0
Pointer
0
standard jdk exceptions such as @link java^util.nosuchelementexception or @link | Preconditions.java
8,622
3,463
Preconditions.java
unsupportedoperationexception in the situations they are intended for.
1
0
Pointer
0
unsupportedoperationexception in the situations they are intended for. | Preconditions.java
8,623
3,464
Preconditions.java
h3 non preconditions h3
0
0
Pointer
0
h3 non preconditions h3 | Preconditions.java
8,624
3,465
Preconditions.java
p it is of course possible to use the methods of this class to check for invalid conditions
1
0
Pointer
0
p it is of course possible to use the methods of this class to check for invalid conditions | Preconditions.java
8,625
3,466
Preconditions.java
which are i not the caller s fault i .
0
0
Pointer
0
which are i not the caller s fault i . | Preconditions.java
8,626
3,467
Preconditions.java
doing so is b not recommended b because it is
1
0
Pointer
0
doing so is b not recommended b because it is | Preconditions.java
8,627
3,468
Preconditions.java
misleading to future readers of the code and of stack traces.
0
0
Pointer
0
misleading to future readers of the code and of stack traces. | Preconditions.java
8,628
3,474
Preconditions.java
h3 @code java^util.objects^requirenonnull h3
1
0
Pointer
0
h3 @code java^util.objects^requirenonnull h3 | Preconditions.java
8,629
3,475
Preconditions.java
p projects which use @code com^google.common should generally avoid the use of @link
0
0
Pointer
0
p projects which use @code com^google.common should generally avoid the use of @link | Preconditions.java
8,630
3,476
Preconditions.java
java^util.objects#requirenonnull object .
1
0
Pointer
0
java^util.objects#requirenonnull object . | Preconditions.java
8,631
3,477
Preconditions.java
instead, use whichever of @link
0
0
Pointer
0
instead, use whichever of @link | Preconditions.java
8,632
3,478
Preconditions.java
#checknotnull object or @link verify#verifynotnull object is appropriate to the situation.
1
0
Pointer
0
#checknotnull object or @link verify#verifynotnull object is appropriate to the situation. | Preconditions.java
8,633
3,479
Preconditions.java
the same goes for the message accepting overloads.
0
0
Pointer
0
the same goes for the message accepting overloads. | Preconditions.java
8,634
3,480
Preconditions.java
h3 only @code %s is supported h3
1
0
Pointer
0
h3 only @code %s is supported h3 | Preconditions.java
8,635
3,481
Preconditions.java
p @code preconditions uses @link strings#lenientformat to format error message template
0
0
Pointer
0
p @code preconditions uses @link strings#lenientformat to format error message template | Preconditions.java
8,636
3,482
Preconditions.java
strings.
1
0
Pointer
0
strings. | Preconditions.java
8,637
3,483
Preconditions.java
this only supports the @code %s specifier, not the full range of @link
0
0
Pointer
0
this only supports the @code %s specifier, not the full range of @link | Preconditions.java
8,638
3,484
Preconditions.java
java^util.formatter specifiers.
1
0
Pointer
0
java^util.formatter specifiers. | Preconditions.java
8,639
3,485
Preconditions.java
however, note that if the number of arguments does not match the
0
0
Pointer
0
however, note that if the number of arguments does not match the | Preconditions.java
8,640
3,486
Preconditions.java
number of occurrences of @code %s in the format string, @code preconditions will still
1
0
Pointer
0
number of occurrences of @code %s in the format string, @code preconditions will still | Preconditions.java
8,641
3,487
Preconditions.java
behave as expected, and will still include all argument values in the error message the message
0
0
Pointer
0
behave as expected, and will still include all argument values in the error message the message | Preconditions.java
8,642
3,488
Preconditions.java
will simply not be formatted exactly as intended.
1
0
Pointer
0
will simply not be formatted exactly as intended. | Preconditions.java
8,643
3,493
Preconditions.java
@author kevin bourrillion
0
0
Pointer
0
@author kevin bourrillion | Preconditions.java
8,644
3,494
Preconditions.java
@since 20
1
0
Pointer
0
@since 20 | Preconditions.java
8,645
3,581
RegularImmutableList_CustomFieldSerializer.java
@author hayward chan
0
0
Pointer
0
@author hayward chan | RegularImmutableList_CustomFieldSerializer.java
8,646
3,585
ReserializingTestCollectionGenerator.java
reserializes the sets created by another test set generator.
1
0
Pointer
0
reserializes the sets created by another test set generator. | ReserializingTestCollectionGenerator.java
8,647
3,587
ReserializingTestCollectionGenerator.java
@author jesse wilson
0
0
Pointer
0
@author jesse wilson | ReserializingTestCollectionGenerator.java
8,648
3,590
Resources.java
provides utility methods for working with resources in the classpath.
1
0
Pointer
0
provides utility methods for working with resources in the classpath. | Resources.java
8,649
3,594
Resources.java
p all method parameters must be non null unless documented otherwise.
0
0
Pointer
0
p all method parameters must be non null unless documented otherwise. | Resources.java
8,650
3,595
Resources.java
@author chris nokleberg
1
0
Pointer
0
@author chris nokleberg | Resources.java
8,651
3,596
Resources.java
@author ben yu
0
0
Pointer
0
@author ben yu | Resources.java
8,652
3,597
Resources.java
@author colin decker
1
0
Pointer
0
@author colin decker | Resources.java
8,653
3,598
Resources.java
@since 10
0
0
Pointer
0
@since 10 | Resources.java
8,654
3,599
Resources.java
a byte source that reads from a url using @link url#openstream .
1
0
Pointer
0
a byte source that reads from a url using @link url#openstream . | Resources.java
8,655
3,607
SmoothRateLimiter.java
how is the ratelimiter designed, and why?
0
0
Pointer
0
how is the ratelimiter designed, and why? | SmoothRateLimiter.java
8,656
3,608
SmoothRateLimiter.java
the primary feature of a ratelimiter is its stable rate , the maximum rate that is should
1
0
Pointer
0
the primary feature of a ratelimiter is its stable rate , the maximum rate that is should | SmoothRateLimiter.java
8,657
3,609
SmoothRateLimiter.java
allow at normal conditions.
0
0
Pointer
0
allow at normal conditions. | SmoothRateLimiter.java
8,658
3,610
SmoothRateLimiter.java
this is enforced by throttling incoming requests as needed, ie
1
0
Pointer
0
this is enforced by throttling incoming requests as needed, ie | SmoothRateLimiter.java
8,659
3,611
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,660
3,612
SmoothRateLimiter.java
wait as much.
1
0
Pointer
0
wait as much. | SmoothRateLimiter.java
8,661
3,613
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,662
3,614
SmoothRateLimiter.java
request, and ensure that 1 qps seconds have elapsed since then.
1
0
Pointer
0
request, and ensure that 1 qps seconds have elapsed since then. | SmoothRateLimiter.java
8,663
3,615
SmoothRateLimiter.java
for example, for a rate of
0
0
Pointer
0
for example, for a rate of | SmoothRateLimiter.java
8,664
3,616
SmoothRateLimiter.java
qps 5 5 tokens per second , if we ensure that a request isn t granted earlier than 200ms after
1
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,665
3,617
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,666
3,618
SmoothRateLimiter.java
if a request comes and the last request was
1
0
Pointer
0
if a request comes and the last request was | SmoothRateLimiter.java
8,667
3,619
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,668
3,620
SmoothRateLimiter.java
at this rate, serving 15 fresh permits
1
0
Pointer
0
at this rate, serving 15 fresh permits | SmoothRateLimiter.java
8,669
3,621
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,670
3,622
SmoothRateLimiter.java
it is important to realize that such a ratelimiter has a very superficial memory of the past
1
0
Pointer
0
it is important to realize that such a ratelimiter has a very superficial memory of the past | SmoothRateLimiter.java
8,671
3,623
SmoothRateLimiter.java
it only remembers the last request.
0
0
Pointer
0
it only remembers the last request. | SmoothRateLimiter.java
8,672
3,624
SmoothRateLimiter.java
what if the ratelimiter was unused for a long period of
1
0
Pointer
0
what if the ratelimiter was unused for a long period of | SmoothRateLimiter.java
8,673
3,625
SmoothRateLimiter.java
time, then a request arrived and was immediately granted?
0
0
Pointer
0
time, then a request arrived and was immediately granted? | SmoothRateLimiter.java
8,674
3,626
SmoothRateLimiter.java
this ratelimiter would immediately
1
0
Pointer
0
this ratelimiter would immediately | SmoothRateLimiter.java
8,675
3,627
SmoothRateLimiter.java
forget about that past underutilization.
0
0
Pointer
0
forget about that past underutilization. | SmoothRateLimiter.java
8,676
3,628
SmoothRateLimiter.java
this may result in either underutilization or
1
0
Pointer
0
this may result in either underutilization or | SmoothRateLimiter.java
8,677
3,629
SmoothRateLimiter.java
overflow, depending on the real world consequences of not using the expected rate.
0
0
Pointer
0
overflow, depending on the real world consequences of not using the expected rate. | SmoothRateLimiter.java
8,678
3,630
SmoothRateLimiter.java
past underutilization could mean that excess resources are available.
1
0
Pointer
0
past underutilization could mean that excess resources are available. | SmoothRateLimiter.java
8,679
3,631
SmoothRateLimiter.java
then, the ratelimiter
0
0
Pointer
0
then, the ratelimiter | SmoothRateLimiter.java
8,680
3,632
SmoothRateLimiter.java
should speed up for a while, to take advantage of these resources.
1
0
Pointer
0
should speed up for a while, to take advantage of these resources. | SmoothRateLimiter.java
8,681
3,633
SmoothRateLimiter.java
this is important when the
0
0
Pointer
0
this is important when the | SmoothRateLimiter.java
8,682
3,634
SmoothRateLimiter.java
rate is applied to networking limiting bandwidth , where past underutilization typically
1
0
Pointer
0
rate is applied to networking limiting bandwidth , where past underutilization typically | SmoothRateLimiter.java
8,683
3,635
SmoothRateLimiter.java
translates to almost empty buffers , which can be filled immediately.
0
0
Pointer
0
translates to almost empty buffers , which can be filled immediately. | SmoothRateLimiter.java
8,684
3,636
SmoothRateLimiter.java
on the other hand, past underutilization could mean that the server responsible for handling
1
0
Pointer
0
on the other hand, past underutilization could mean that the server responsible for handling | SmoothRateLimiter.java
8,685
3,637
SmoothRateLimiter.java
the request has become less ready for future requests , ie its caches become stale, and
0
0
Pointer
0
the request has become less ready for future requests , ie its caches become stale, and | SmoothRateLimiter.java
8,686
3,638
SmoothRateLimiter.java
requests become more likely to trigger expensive operations a more extreme case of this
1
0
Pointer
0
requests become more likely to trigger expensive operations a more extreme case of this | SmoothRateLimiter.java
8,687
3,639
SmoothRateLimiter.java
example is when a server has just booted, and it is mostly busy with getting itself up to
0
0
Pointer
0
example is when a server has just booted, and it is mostly busy with getting itself up to | SmoothRateLimiter.java
8,688
3,640
SmoothRateLimiter.java
speed .
1
0
Pointer
0
speed . | SmoothRateLimiter.java
8,689
3,641
SmoothRateLimiter.java
to deal with such scenarios, we add an extra dimension, that of past underutilization ,
0
0
Pointer
0
to deal with such scenarios, we add an extra dimension, that of past underutilization , | SmoothRateLimiter.java
8,690
3,642
SmoothRateLimiter.java
modeled by storedpermits variable.
0
0
Pointer
0
modeled by storedpermits variable. | SmoothRateLimiter.java
8,691
3,643
SmoothRateLimiter.java
this variable is zero when there is no underutilization,
0
0
Pointer
0
this variable is zero when there is no underutilization, | SmoothRateLimiter.java
8,692
3,644
SmoothRateLimiter.java
and it can grow up to maxstoredpermits, for sufficiently large underutilization.
0
0
Pointer
0
and it can grow up to maxstoredpermits, for sufficiently large underutilization. | SmoothRateLimiter.java
8,693
3,645
SmoothRateLimiter.java
so, the
0
0
Pointer
0
so, the | SmoothRateLimiter.java
8,694
3,646
SmoothRateLimiter.java
requested permits, by an invocation acquire permits , are served from
0
0
Pointer
0
requested permits, by an invocation acquire permits , are served from | SmoothRateLimiter.java
8,695
3,647
SmoothRateLimiter.java
stored permits if available
0
0
Pointer
0
stored permits if available | SmoothRateLimiter.java
8,696
3,648
SmoothRateLimiter.java
fresh permits for any remaining permits
0
0
Pointer
0
fresh permits for any remaining permits | SmoothRateLimiter.java
8,697