id stringlengths 7 14 | text stringlengths 1 106k |
|---|---|
206633_90 | public boolean shouldRefetch() {
// Time after which resource should be refetched.
long refetchExpiration = isStrictNoCache() ?
date + getRefetchStrictNoCacheAfterMs() : getCacheExpiration();
return refetchExpiration <= getTimeSource().currentTimeMillis();
} |
206633_91 | public long getCacheExpiration() {
if (isError() && !NEGATIVE_CACHING_EXEMPT_STATUS.contains(httpStatusCode)) {
// If the server provides a Retry-After header use that as the cacheTtl
String retryAfter = this.getHeader("Retry-After");
if (retryAfter != null) {
if (StringUtils.isNumeric(retryAfter)) ... |
206633_92 | public List<Pair<Uri, FutureTask<RequestContext>>> fetchAll(List<HttpRequest> requests) {
List<Pair<Uri, FutureTask<RequestContext>>> futureTasks = Lists.newArrayList();
for (HttpRequest request : requests) {
futureTasks.add(Pair.of(request.getUri(), createHttpFetcher(request)));
}
return futureTasks;
} |
206633_93 | public Map<Uri, FutureTask<RequestContext>> fetchUnique(List<HttpRequest> requests) {
Map<Uri, FutureTask<RequestContext>> futureTasks = Maps.newHashMap();
for (HttpRequest request : requests) {
Uri uri = request.getUri();
if (!futureTasks.containsKey(uri)) {
futureTasks.put(uri, createHttpFetcher(req... |
206633_94 | public HttpResponse execute(HttpRequest request) throws GadgetException {
final String method = "execute";
normalizeProtocol(request);
HttpResponse cachedResponse = checkCachedResponse(request);
HttpResponse invalidatedResponse = null;
HttpResponse staleResponse = null;
// Note that we don't remove invalida... |
206633_95 | public HttpResponse execute(HttpRequest request) throws GadgetException {
final String method = "execute";
normalizeProtocol(request);
HttpResponse cachedResponse = checkCachedResponse(request);
HttpResponse invalidatedResponse = null;
HttpResponse staleResponse = null;
// Note that we don't remove invalida... |
206633_96 | public HttpResponse execute(HttpRequest request) throws GadgetException {
final String method = "execute";
normalizeProtocol(request);
HttpResponse cachedResponse = checkCachedResponse(request);
HttpResponse invalidatedResponse = null;
HttpResponse staleResponse = null;
// Note that we don't remove invalida... |
206633_97 | public HttpResponse execute(HttpRequest request) throws GadgetException {
final String method = "execute";
normalizeProtocol(request);
HttpResponse cachedResponse = checkCachedResponse(request);
HttpResponse invalidatedResponse = null;
HttpResponse staleResponse = null;
// Note that we don't remove invalida... |
206633_98 | public HttpResponse execute(HttpRequest request) throws GadgetException {
final String method = "execute";
normalizeProtocol(request);
HttpResponse cachedResponse = checkCachedResponse(request);
HttpResponse invalidatedResponse = null;
HttpResponse staleResponse = null;
// Note that we don't remove invalida... |
206633_99 | public HttpResponse execute(HttpRequest request) throws GadgetException {
final String method = "execute";
normalizeProtocol(request);
HttpResponse cachedResponse = checkCachedResponse(request);
HttpResponse invalidatedResponse = null;
HttpResponse staleResponse = null;
// Note that we don't remove invalida... |
2073724_0 | @Override
public int getColorInt(float intensity) {
return (intensity > 0.5) ? 0xffffffff: 0xff000000;
} |
2080454_0 | @Override
public boolean equals(final Object other) {
if (!(other instanceof Rating))
return false;
Rating castOther = (Rating) other;
return new EqualsBuilder().append(percentage, castOther.percentage)
.isEquals();
} |
2080454_1 | @Override
public boolean equals(final Object other) {
if (!(other instanceof Rating))
return false;
Rating castOther = (Rating) other;
return new EqualsBuilder().append(percentage, castOther.percentage)
.isEquals();
} |
2080454_2 | @Override
public boolean equals(final Object other) {
if (!(other instanceof Rating))
return false;
Rating castOther = (Rating) other;
return new EqualsBuilder().append(percentage, castOther.percentage)
.isEquals();
} |
2080454_3 | @Override
public boolean equals(final Object other) {
if (!(other instanceof Artist))
return false;
Artist castOther = (Artist) other;
return new EqualsBuilder().append(getIdentityName(), castOther.getIdentityName()).isEquals();
} |
2080454_4 | @Override
public boolean equals(final Object other) {
if (!(other instanceof Artist))
return false;
Artist castOther = (Artist) other;
return new EqualsBuilder().append(getIdentityName(), castOther.getIdentityName()).isEquals();
} |
2080454_5 | @Override
public boolean equals(final Object other) {
if (!(other instanceof Library))
return false;
Library castOther = (Library) other;
return new EqualsBuilder().append(uuid, castOther.uuid).isEquals();
} |
2080454_6 | public void addStat(StatInfo defaultStatInfo) {
stats.add(new Stat(defaultStatInfo, this));
} |
2080454_7 | @Override
public boolean equals(final Object other) {
if (!(other instanceof LibraryTo))
return false;
LibraryTo castOther = (LibraryTo) other;
return new EqualsBuilder().append(getUuid(), castOther.getUuid())
.isEquals();
} |
2080454_8 | @Override
public boolean equals(final Object other) {
if (!(other instanceof SongTo))
return false;
SongTo castOther = (SongTo) other;
return new EqualsBuilder().appendSuper(super.equals(other))
.append(getType(), castOther.getType())
.append(isPodcast(), castOther.isPodcast())
.append(albumRatingComputed... |
2080454_9 | @Override
public boolean equals(final Object other) {
if (!(other instanceof SongTo))
return false;
SongTo castOther = (SongTo) other;
return new EqualsBuilder().appendSuper(super.equals(other))
.append(getType(), castOther.getType())
.append(isPodcast(), castOther.isPodcast())
.append(albumRatingComputed... |
2088736_0 | @Override
public void beforeEach(ExtensionContext context) {
FluentTest instance = testInstanceOf(context);
instance._starting(testClassOf(context), testNameOf(context));
} |
2088736_1 | @Override
public void afterEach(ExtensionContext context) {
FluentTest instance = testInstanceOf(context);
Optional<Throwable> throwable = context.getExecutionException();
if (throwable.isPresent()) {
instance._failed(throwable.get(), testClassOf(context), testNameOf(context));
} else {
... |
2088736_2 | @Override
public void afterEach(ExtensionContext context) {
FluentTest instance = testInstanceOf(context);
Optional<Throwable> throwable = context.getExecutionException();
if (throwable.isPresent()) {
instance._failed(throwable.get(), testClassOf(context), testNameOf(context));
} else {
... |
2088736_3 | @Override
public FluentWebElementAssert isEnabled() {
isPresentAndIs(() -> !actual.enabled(), "Element in assertion is present but not enabled");
return this;
} |
2088736_4 | @Override
public FluentWebElementAssert isEnabled() {
isPresentAndIs(() -> !actual.enabled(), "Element in assertion is present but not enabled");
return this;
} |
2088736_5 | @Override
public FluentWebElementAssert isNotEnabled() {
isPresentAndIs(() -> actual.enabled(), "Element in assertion is present but enabled");
return this;
} |
2088736_6 | @Override
public FluentWebElementAssert isNotEnabled() {
isPresentAndIs(() -> actual.enabled(), "Element in assertion is present but enabled");
return this;
} |
2088736_7 | @Override
public FluentWebElementAssert isClickable() {
isPresentAndIs(() -> !actual.clickable(), "Element in assertion is present but not clickable");
return this;
} |
2088736_8 | @Override
public FluentWebElementAssert isClickable() {
isPresentAndIs(() -> !actual.clickable(), "Element in assertion is present but not clickable");
return this;
} |
2088736_9 | @Override
public FluentWebElementAssert isNotClickable() {
isPresentAndIs(() -> actual.clickable(), "Element in assertion is present but clickable");
return this;
} |
2090979_0 | public void setHost(String host) {
Assert.notNull(host, "Host may not be null");
this.host = host;
} |
209853_10 | public void validate(FacesContext facesContext, UIComponent uiComponent, Object value) throws ValidatorException {
if (value == null || "".equals(value)) return;
ResourceBundle bundle = resourceBundleFinder.getForCurrentLocale(facesContext);
ResourceBundleMessageProducer producer = new ResourceBundleMessageP... |
209853_11 | public void validate(FacesContext facesContext, UIComponent uiComponent, Object value) throws ValidatorException {
if (value == null || "".equals(value)) return;
ResourceBundle bundle = resourceBundleFinder.getForCurrentLocale(facesContext);
ResourceBundleMessageProducer producer = new ResourceBundleMessageP... |
209853_12 | public void validate(FacesContext facesContext, UIComponent uiComponent, Object value) throws ValidatorException {
ResourceBundle bundle = resourceBundleFinder.getForCurrentLocale(facesContext);
ResourceBundleMessageProducer producer = new ResourceBundleMessageProducer(bundle);
NITValidator validator = new ... |
209853_13 | public void validate(FacesContext facesContext, UIComponent uiComponent, Object value) throws ValidatorException {
ResourceBundle bundle = resourceBundleFinder.getForCurrentLocale(facesContext);
ResourceBundleMessageProducer producer = new ResourceBundleMessageProducer(bundle);
NITValidator validator = new ... |
209853_14 | public void validate(FacesContext facesContext, UIComponent uiComponent, Object value) throws ValidatorException {
ResourceBundle bundle = resourceBundleFinder.getForCurrentLocale(facesContext);
ResourceBundleMessageProducer producer = new ResourceBundleMessageProducer(bundle);
NITValidator validator = new ... |
209853_15 | @Override
protected Validator createValidator() throws JspException {
StellaCPFValidator validator = new StellaCPFValidator();
validator.setFormatted(this.formatted);
return validator;
} |
209853_16 | @Override
protected Validator createValidator() throws JspException {
StellaNITValidator validator = new StellaNITValidator();
validator.setFormatted(formatted);
return validator;
} |
209853_17 | public void validate(FacesContext facesContext, UIComponent uiComponent, Object value) throws ValidatorException {
if (value == null || "".equals(value)) return;
ResourceBundle bundle = resourceBundleFinder.getForCurrentLocale(facesContext);
ResourceBundleMessageProducer producer = new ResourceBundleMessageP... |
209853_18 | public void validate(FacesContext facesContext, UIComponent uiComponent, Object value) throws ValidatorException {
if (value == null || "".equals(value)) return;
ResourceBundle bundle = resourceBundleFinder.getForCurrentLocale(facesContext);
ResourceBundleMessageProducer producer = new ResourceBundleMessageP... |
209853_19 | public void validate(FacesContext facesContext, UIComponent uiComponent, Object value) throws ValidatorException {
if (value == null || "".equals(value)) return;
ResourceBundle bundle = resourceBundleFinder.getForCurrentLocale(facesContext);
ResourceBundleMessageProducer producer = new ResourceBundleMessageP... |
209853_20 | public void validate(FacesContext facesContext, UIComponent uiComponent, Object value) throws ValidatorException {
if (value == null || "".equals(value)) return;
ResourceBundle bundle = resourceBundleFinder.getForCurrentLocale(facesContext);
ResourceBundleMessageProducer producer = new ResourceBundleMessageP... |
209853_21 | public void validate(FacesContext facesContext, UIComponent uiComponent, Object value) throws ValidatorException {
if (value == null || "".equals(value)) return;
ResourceBundle bundle = resourceBundleFinder.getForCurrentLocale(facesContext);
ResourceBundleMessageProducer producer = new ResourceBundleMessageP... |
209853_22 | public void validate(FacesContext facesContext, UIComponent uiComponent, Object value) throws ValidatorException {
ResourceBundle bundle = resourceBundleFinder.getForCurrentLocale(facesContext);
ResourceBundleMessageProducer producer = new ResourceBundleMessageProducer(bundle);
TituloEleitoralValidator vali... |
209853_23 | public void validate(FacesContext facesContext, UIComponent uiComponent, Object value) throws ValidatorException {
ResourceBundle bundle = resourceBundleFinder.getForCurrentLocale(facesContext);
ResourceBundleMessageProducer producer = new ResourceBundleMessageProducer(bundle);
TituloEleitoralValidator vali... |
209853_24 | public void validate(FacesContext facesContext, UIComponent uiComponent, Object value) throws ValidatorException {
ResourceBundle bundle = resourceBundleFinder.getForCurrentLocale(facesContext);
ResourceBundleMessageProducer producer = new ResourceBundleMessageProducer(bundle);
TituloEleitoralValidator vali... |
209853_25 | @Override
protected Validator createValidator() throws JspException {
StellaCNPJValidator validator = new StellaCNPJValidator();
validator.setFormatted(this.formatted);
return validator;
} |
209853_26 | @Override
public void assertValid(String cpf) {
List<ValidationMessage> errors = getInvalidValues(cpf);
if (!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_27 | @Override
public void assertValid(String cpf) {
List<ValidationMessage> errors = getInvalidValues(cpf);
if (!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_28 | @Override
public void assertValid(String cpf) {
List<ValidationMessage> errors = getInvalidValues(cpf);
if (!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_29 | @Override
public void assertValid(String cpf) {
List<ValidationMessage> errors = getInvalidValues(cpf);
if (!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_30 | @Override
public void assertValid(String cpf) {
List<ValidationMessage> errors = getInvalidValues(cpf);
if (!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_31 | @Override
public void assertValid(String cpf) {
List<ValidationMessage> errors = getInvalidValues(cpf);
if (!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_32 | @Override
public boolean isEligible(String value) {
if (value == null) {
return false;
}
boolean result;
if (isFormatted) {
result = FORMATED.matcher(value).matches();
} else {
result = UNFORMATED.matcher(value).matches();
}
return result;
} |
209853_33 | @Override
public void assertValid(String cpf) {
List<ValidationMessage> errors = getInvalidValues(cpf);
if (!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_34 | @Override
public void assertValid(String cpf) {
List<ValidationMessage> errors = getInvalidValues(cpf);
if (!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_35 | @Override
public void assertValid(String cpf) {
List<ValidationMessage> errors = getInvalidValues(cpf);
if (!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_36 | @Override
public void assertValid(String cpf) {
List<ValidationMessage> errors = getInvalidValues(cpf);
if (!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_37 | @Override
public void assertValid(String cpf) {
List<ValidationMessage> errors = getInvalidValues(cpf);
if (!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_38 | @Override
public void assertValid(String cpf) {
List<ValidationMessage> errors = getInvalidValues(cpf);
if (!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_39 | @Override
public void assertValid(String cpf) {
List<ValidationMessage> errors = getInvalidValues(cpf);
if (!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_40 | @Override
public void assertValid(String cpf) {
List<ValidationMessage> errors = getInvalidValues(cpf);
if (!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_41 | @Override
public boolean isEligible(String value) {
if (value == null) {
return false;
}
boolean result;
if (isFormatted) {
result = FORMATED.matcher(value).matches();
} else {
result = UNFORMATED.matcher(value).matches();
}
return result;
} |
209853_42 | @Override
public boolean isEligible(String value) {
if (value == null) {
return false;
}
boolean result;
if (isFormatted) {
result = FORMATED.matcher(value).matches();
} else {
result = UNFORMATED.matcher(value).matches();
}
return result;
} |
209853_43 | @Override
public boolean isEligible(String value) {
if (value == null) {
return false;
}
boolean result;
if (isFormatted) {
result = FORMATED.matcher(value).matches();
} else {
result = UNFORMATED.matcher(value).matches();
}
return result;
} |
209853_44 | public List<ValidationMessage> generateValidationMessages(List<InvalidValue> invalidValues) {
List<ValidationMessage> messages = new ArrayList<ValidationMessage>();
for (InvalidValue invalidValue : invalidValues) {
ValidationMessage message = messageProducer.getMessage(invalidValue);
messages.ad... |
209853_45 | public void assertValid(List<InvalidValue> invalidValues) {
if (!invalidValues.isEmpty()) {
throw new InvalidStateException(generateValidationMessages(invalidValues));
}
} |
209853_46 | public void assertValid(List<InvalidValue> invalidValues) {
if (!invalidValues.isEmpty()) {
throw new InvalidStateException(generateValidationMessages(invalidValues));
}
} |
209853_47 | public void assertValid(String nit) {
List<ValidationMessage> errors = getInvalidValues(nit);
if (!errors.isEmpty()) {
hrow new InvalidStateException(errors);
} |
209853_48 | public void assertValid(String nit) {
List<ValidationMessage> errors = getInvalidValues(nit);
if (!errors.isEmpty()) {
hrow new InvalidStateException(errors);
} |
209853_49 | public void assertValid(String nit) {
List<ValidationMessage> errors = getInvalidValues(nit);
if (!errors.isEmpty()) {
hrow new InvalidStateException(errors);
} |
209853_50 | public void assertValid(String nit) {
List<ValidationMessage> errors = getInvalidValues(nit);
if (!errors.isEmpty()) {
hrow new InvalidStateException(errors);
} |
209853_51 | public void assertValid(String nit) {
List<ValidationMessage> errors = getInvalidValues(nit);
if (!errors.isEmpty()) {
hrow new InvalidStateException(errors);
} |
209853_52 | public void assertValid(String nit) {
List<ValidationMessage> errors = getInvalidValues(nit);
if (!errors.isEmpty()) {
hrow new InvalidStateException(errors);
} |
209853_53 | public void assertValid(String nit) {
List<ValidationMessage> errors = getInvalidValues(nit);
if (!errors.isEmpty()) {
hrow new InvalidStateException(errors);
} |
209853_54 | public void assertValid(String nit) {
List<ValidationMessage> errors = getInvalidValues(nit);
if (!errors.isEmpty()) {
hrow new InvalidStateException(errors);
} |
209853_55 | @Override
public void assertValid(String cnpj) {
List<ValidationMessage> errors = getInvalidValues(cnpj);
(!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_56 | @Override
public void assertValid(String cnpj) {
List<ValidationMessage> errors = getInvalidValues(cnpj);
(!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_57 | @Override
public void assertValid(String cnpj) {
List<ValidationMessage> errors = getInvalidValues(cnpj);
(!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_58 | @Override
public void assertValid(String cnpj) {
List<ValidationMessage> errors = getInvalidValues(cnpj);
(!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_59 | @Override
public void assertValid(String cnpj) {
List<ValidationMessage> errors = getInvalidValues(cnpj);
(!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_60 | @Override
public void assertValid(String cnpj) {
List<ValidationMessage> errors = getInvalidValues(cnpj);
(!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_61 | @Override
public void assertValid(String cnpj) {
List<ValidationMessage> errors = getInvalidValues(cnpj);
(!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_62 | @Override
public void assertValid(String cnpj) {
List<ValidationMessage> errors = getInvalidValues(cnpj);
(!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_63 | @Override
public void assertValid(String cnpj) {
List<ValidationMessage> errors = getInvalidValues(cnpj);
(!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_64 | @Override
public void assertValid(String cnpj) {
List<ValidationMessage> errors = getInvalidValues(cnpj);
(!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_65 | public boolean isEligible(String value) {
(value == null) {
eturn false;
boolean result;
if (isFormatted) {
result = FORMATED.matcher(value).matches();
} else {
result = UNFORMATED.matcher(value).matches();
}
return result;
} |
209853_66 | @Override
public void assertValid(String cnpj) {
List<ValidationMessage> errors = getInvalidValues(cnpj);
(!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_67 | @Override
public void assertValid(String cnpj) {
List<ValidationMessage> errors = getInvalidValues(cnpj);
(!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_68 | @Override
public void assertValid(String cnpj) {
List<ValidationMessage> errors = getInvalidValues(cnpj);
(!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_69 | @Override
public void assertValid(String cnpj) {
List<ValidationMessage> errors = getInvalidValues(cnpj);
(!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_70 | public boolean isEligible(String value) {
(value == null) {
eturn false;
boolean result;
if (isFormatted) {
result = FORMATED.matcher(value).matches();
} else {
result = UNFORMATED.matcher(value).matches();
}
return result;
} |
209853_71 | public boolean isEligible(String value) {
(value == null) {
eturn false;
boolean result;
if (isFormatted) {
result = FORMATED.matcher(value).matches();
} else {
result = UNFORMATED.matcher(value).matches();
}
return result;
} |
209853_72 | public boolean isEligible(String value) {
(value == null) {
eturn false;
boolean result;
if (isFormatted) {
result = FORMATED.matcher(value).matches();
} else {
result = UNFORMATED.matcher(value).matches();
}
return result;
} |
209853_73 | public void assertValid(String tituloDeEleitor) {
List<ValidationMessage> errors = getInvalidValues(tituloDeEleitor);
if (!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_74 | public void assertValid(String tituloDeEleitor) {
List<ValidationMessage> errors = getInvalidValues(tituloDeEleitor);
if (!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_75 | public void assertValid(String tituloDeEleitor) {
List<ValidationMessage> errors = getInvalidValues(tituloDeEleitor);
if (!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_76 | public void assertValid(String tituloDeEleitor) {
List<ValidationMessage> errors = getInvalidValues(tituloDeEleitor);
if (!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
209853_77 | public void assertValid(String tituloDeEleitor) {
List<ValidationMessage> errors = getInvalidValues(tituloDeEleitor);
if (!errors.isEmpty()) {
throw new InvalidStateException(errors);
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.