Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
line = GenericUtils.replaceWhitespaceAndTrim(line);
String s = GenericUtils.replaceWhitespaceAndTrim(value); | 0 |
HttpResponse response = this.responseFactory.newHttpResponse(HttpVersion.HTTP_1_0,
HttpResponse response = connState.getResponse();
NHttpResponseTrigger trigger = new ResponseTriggerImpl(connState, conn);
HttpResponse response = this.responseFactory.newHttpResponse(
... | 0 |
LOG.debug("Setting up server " + serverId); | 0 |
private final AtomicBoolean masterInitialized = new AtomicBoolean(false);
// The master is fully initialized. Clients are allowed to connect now.
masterInitialized.set(true);
return masterInitialized.get(); | 0 |
import org.apache.cocoon.sitemap.SitemapParameters;
* @version CVS $Id: AbstractProcessingPipeline.java,v 1.20 2004/03/08 12:07:39 cziegeler Exp $
String value = null;
if ( param instanceof SitemapParameters ) {
value = ((SitemapParameters)param).getStatementLocation();
}
if... | 0 |
import com.google.common.collect.Lists;
import org.joda.time.Instant; | 0 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not u... | 0 |
if (log.isDebugEnabled()) {
log.debug("destroy(" + username + ")[" + command + "] failure details", e);
} | 0 |
public class OperatingSystemResourceDefinition extends BaseResourceDefinition {
return "operating_systems";
return "operating_system"; | 0 |
import java.io.FileReader;
import java.io.FileWriter;
import java.util.List;
import java.util.Set;
Thread.sleep(1100); | 0 |
* Copyright 1999-2004 The Apache Software Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law o... | 0 |
return getGlyphLogicalBounds(glyphIndex).getBounds2D(); | 0 |
// just delegate to the base class
} catch (MethodMap.AmbiguousException ae) {
// whoops. Ambiguous. Make a nice log message and return null... | 0 |
protected final HashMap<String, Object> features = new HashMap<String, Object>(); | 0 |
c.setTimeZone(TimeZone.getTimeZone("GMT")); | 0 |
m_bind = new BindMethod( m_componentManager.getComponentMetadata().isDS11(),
m_dependencyMetadata.getBind(),
m_unbind = new UnbindMethod( m_componentManager.getComponentMetadata().isDS11(),
m_dependencyMetadata.getUnbind(), | 0 |
* nor may "Apache" appear in their name, without | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* v... | 0 |
static final Query.Builder PENDING_QUERY = Query.statusScoped(PENDING);
static final Query.Builder ACTIVE_NOT_PENDING_QUERY = Query.statusScoped(
private List<AssignedTask> fetch(Query.Builder query, Predicate<ScheduledTask> filter) {
private List<AssignedTask> fetch(Query.Builder query) { | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
protected static final String EXPIRES_PATTERN = "EEE, dd-MMM-yyyy HH:mm:ss z";
private final String[] datepatterns;
public NetscapeDraftSpec(final String[] datepatterns) {
if (datepatterns != null) {
this.datepatterns = datepatterns.clone();
} else {
this.d... | 0 |
assertNull("PREFIX property " + prop.name() + " has unexpected non-null default value.",
prop.getDefaultValue());
assertTrue(
"Property " + prop + " has invalid default value " + prop.getDefaultValue()
+ " for type " + prop.getType(),
assertFalse("Descriptio... | 0 |
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may... | 0 |
/*
import java.util.TreeMap;
static final Map<String, Object> MAP_VALUE;
static final Map<String, Object> MAP_VALUE_ALT;
static final Map<String, Object> MAP_VALUE_REFERENCE;
static {
MAP_VALUE = new TreeMap<String, Object>();
MAP_VALUE.put("name", "identity_1");
MAP_VALUE.put("principal", Kerberos... | 0 |
package org.apache.felix.http.base.internal.service.listener; | 0 |
* Copyright 2001-2004 The Apache Software Foundation.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... | 0 |
int l = inputCopy.read(buf);
| 0 |
@Override
@Override | 0 |
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import javax.persistence.EntityManager;
import javax.persistence.TypedQuery;
import com.googl... | 0 |
long time = closer.close(master.getConfiguration(), master.getContext().getHadoopConf(),
master.getFileSystem(), new Path(source));
String switchedWalog = VolumeUtil.switchVolume(walog, FileType.WAL, ServerConstants
.getVolumeReplacements(master.getConfiguration(), master.getCont... | 0 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | 0 |
import org.apache.felix.http.base.internal.handler.HttpServiceFilterHandler;
import org.apache.felix.http.base.internal.handler.HttpServiceServletHandler;
ServletRuntime servletHandler = new HttpServiceServletHandler(0, context_0, servletInfo, servlet);
FilterRuntime filterHandler = new HttpServiceFilte... | 0 |
public void setUp() { | 0 |
import com.google.common.annotations.VisibleForTesting;
import java.util.concurrent.ThreadLocalRandom; | 0 |
*
* @since 4.0 | 0 |
Map<String, List<String>> headerParamsToForward = new HashMap<>();
List<String> userRemoteParams = new LinkedList<>();
Map<String, List<String>> headerParamsToForward = new HashMap<>();
List<String> userRemoteParams = new LinkedList<>();
Map<String, List<String>> headerParamsToForward = new HashMap<... | 1 |
/*
* Copyright (C) 2015 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterables; | 0 |
* Minimal interface to write a block to a
*
| 0 |
package org.apache.sshd.common.session.helpers; | 0 |
entity.setCreateTimestamp(Long.valueOf(System.currentTimeMillis()));
entity.setUser("_test");
Assert.assertEquals("Expected selected flag 0", 0, target.get(0).isSelected());
Assert.assertEquals("Expected version to be '" + entity2.getVersion() + "'", entity2.getVersion(), target.getVersion()); | 0 |
if ( methods[i].isFinal() ){
if (!(methods[i].isPrivate())) {
throw new ClassConstraintException("Method '"+name_and_sig+"' in class '"+hashmap.get(name_and_sig)+"' overrides the final (not-overridable) definition in class '"+jc.getClassName()+"'.");
}
else{
addMessage("Method ... | 0 |
import org.apache.ambari.server.state.stack.upgrade.UpgradeType;
@UpgradeCheck(
group = UpgradeCheckGroup.MAINTENANCE_MODE,
order = 5.0f,
required = { UpgradeType.ROLLING, UpgradeType.NON_ROLLING, UpgradeType.HOST_ORDERED })
@Override | 0 |
public static final ContentType IMAGE_SVG= create(
"image/svg+xml");
public static final ContentType IMAGE_TIFF = create(
"image/tiff");
IMAGE_SVG,
IMAGE_TIFF, | 0 |
@Override
@Override
@Override
@Override
@Override
@Override | 0 |
System.out.printf("%32s %16s%n", tabletServer, holder); | 0 |
package org.apache.beam.sdk.extensions.euphoria.operator.test;
import org.apache.beam.sdk.extensions.euphoria.core.client.dataset.Dataset;
import org.apache.beam.sdk.extensions.euphoria.core.client.dataset.windowing.Time;
import org.apache.beam.sdk.extensions.euphoria.core.client.dataset.windowing.TimeInterval;
import... | 0 |
input = applyWindowing(input);
| 0 |
protected void addRequirement(BundleImpl bundle, String s) throws BundleException
{
// TODO: EXPERIMENTAL - Experimental implicit wire concept to try
// to deal with code generation.
synchronized (m_factory)
{
IRequirement[] reqs = ManifestParser.parseImportHead... | 0 |
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not... | 1 |
* Returns additional information regarding the <code>AgreementMethod</code>.
Iterator<Element> getAgreementMethodInformation();
* Returns information relating to the recipient's shared secret. | 0 |
final RequestConfig config = context.getRequestConfig();
final int maxRedirects = config.getMaxRedirects() > 0 ? config.getMaxRedirects() : 50;
final CloseableHttpResponse response = requestExecutor.execute(
final HttpRequest redirect = this.redirectStrategy.getRedirect(c... | 0 |
import org.apache.beam.sdk.values.Row;
PCollection<Row> rows = compilePipeline(sql, pipeline, BEAM_SQL_ENV);
PCollection<Row> rows = compilePipeline(sql, pipeline, BEAM_SQL_ENV);
PCollection<Row> rows = compilePipeline(sql, pipeline, BEAM_SQL_ENV);
PCollection<Row> rows = compilePipeline(sql, pipeline, ... | 0 |
import org.apache.http.Header;
public Header getContentType() {
if (this.contentType != null) {
return new Header(HttpEntity.CONTENT_TYPE, this.contentType);
} else {
return null;
}
public Header getContentEncoding() {
if (this.contentEncoding != null) {
... | 0 |
this.getBaseNamespace(), this.getBaseLocalName());
//Element nscontext = XMLUtils.createDSctx(doc, "x", namespace);
return Base64.decodeBigIntegerFromText(
(Text)XMLUtils.selectNode(this._constructionElement.getFirstChild(),
namespace,localname,0).getFirstChild(... | 0 |
import org.apache.sshd.common.FactoryManager;
import org.apache.sshd.common.kex.KexProposalOption;
import org.apache.sshd.common.util.ValidateUtils;
String algo = session.getNegotiatedKexParameter(KexProposalOption.SERVERKEYS);
FactoryManager manager = session.getFactoryManager();
Signature sig ... | 0 |
* limitations under the License. | 0 |
import org.apache.accumulo.core.clientImpl.Table; | 0 |
@org.junit.AfterClass
public static void cleanup() throws Exception {
Security.removeProvider("org.bouncycastle.jce.provider.BouncyCastleProvider");
} | 0 |
package org.apache.beam.sdk.extensions.euphoria.core.client.operator.state;
import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience; | 0 |
final Integer i = Integer.valueOf(3);
elements.add((E) Integer.valueOf(3));
!list.contains(Integer.valueOf(3)));
list.set(0, (E) Integer.valueOf(3)); | 0 |
if (level != null) { | 0 |
public CharArrayBuffer formatRequestLine(final CharArrayBuffer buffer,
final RequestLine reqline) {
public CharArrayBuffer formatHeader(final CharArrayBuffer buffer,
final Header header) { | 0 |
import java.math.BigDecimal;
import java.math.BigInteger;
* @version $Id: CompositeConfiguration.java,v 1.5 2004/02/12 12:59:19 epugh Exp $
public BigDecimal getBigDecimal(String key) throws NoSuchElementException {
return getFirstMatchingConfig(key).getBigDecimal(key);
}
public BigDecimal getBig... | 0 |
import org.apache.beam.sdk.nexmark.sources.generator.Generator;
import org.apache.beam.sdk.nexmark.sources.generator.GeneratorConfig; | 0 |
import org.apache.accumulo.core.conf.ClientConfiguration;
import org.apache.accumulo.core.conf.ClientConfiguration.ClientProperty;
import org.apache.accumulo.core.conf.ConfigSanityCheck;
import org.easymock.EasyMock;
@PrepareForTest({Shell.class, ZooUtil.class, ConfigSanityCheck.class})
ClientConfiguration clientCo... | 0 |
import com.google.api.services.bigquery.model.TableFieldSchema;
import com.google.api.services.bigquery.model.TableReference;
import com.google.api.services.bigquery.model.TableRow;
import com.google.api.services.bigquery.model.TableSchema;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List; | 0 |
import com.google.common.collect.Lists;
update.setTaskInfos(Lists.<LiveTaskInfo>newArrayList()); | 0 |
setZooKeeperInstance(job, ClientConfiguration.create().withInstance(instanceName).withZkHosts(zooKeepers)); | 0 |
import cz.seznam.euphoria.testing.DatasetAssert; | 0 |
import com.google.common.collect.ImmutableMap;
Assert.assertEquals(false, exp1.evaluate(row, null, ImmutableMap.of()).getValue());
Assert.assertEquals(true, exp2.evaluate(row, null, ImmutableMap.of()).getValue());
Assert.assertEquals(false, exp1.evaluate(row, null, ImmutableMap.of()).getValue());
Assert... | 0 |
import org.apache.felix.http.base.internal.logger.SystemLogger;
SystemLogger.warning("Deprecation warning: " +
"Servlet registered through Apache Felix whiteboard service: " + ref +
". Please change your code to the OSGi Whiteboard Service.", null); | 0 |
NetscapeDraftSpec(final boolean strictDomainValidation, final String[] datepatterns) {
registerAttribHandler(ClientCookie.DOMAIN_ATTR,
strictDomainValidation ? new NetscapeDomainHandler() : new BasicDomainHandler());
public NetscapeDraftSpec(final String[] datepatterns) {
this(tr... | 0 |
import org.apache.sshd.common.channel.ChannelListener;
import org.apache.sshd.common.util.GenericUtils;
ChannelListener listener = getChannelListenerProxy();
listener.channelOpenSuccess(this);
} catch (Throwable t) {
Throwable e = GenericUtils.peelException(t);
try {... | 0 |
/*
* Copyright 2016-2018 Seznam.cz, a.s. | 0 |
}
final Iterator<String> it = new BasicTokenIterator(new BasicHeaderIterator(connHeaders, null));
while (it.hasNext()) {
final String token = it.next();
if (HeaderElements.KEEP_ALIVE.equalsIgnoreCase(token)) {
return true;
... | 0 |
if (request.getSession() != null) { // incase of form based login mark it as local login in session
request.getSession().setAttribute("locallogin","true");
request.getServletContext().setAttribute(request.getSession().getId(), "locallogin");
}
| 0 |
public interface KeyExchangeFuture extends SshFuture<KeyExchangeFuture>, VerifiableFuture<KeyExchangeFuture> {
* or if the connection attempt is successful (use {@link #isDone()} to
* distinguish between the two). | 0 |
public interface StreamingWordExtractOptions | 0 |
* </p>
* </p>
* </p> | 0 |
import org.apache.ambari.view.hive20.actor.message.GetDatabaseMetadataJob;
import java.sql.DatabaseMetaData;
}else if (message instanceof GetDatabaseMetadataJob) {
getDatabaseMetaData((GetDatabaseMetadataJob) message);
private void getDatabaseMetaData(GetDatabaseMetadataJob message) {
try {
Datab... | 0 |
private long scanId;
this.scanId = activeScan.scanId;
return scanId; | 0 |
import org.apache.http.params.HttpParams;
* @deprecated (4.1-alpha1) Use {@link HttpParams#setParameter(String, Object)} to set the parameters
* {@link org.apache.http.auth.params.AuthPNames#TARGET_AUTH_PREF AuthPNames#TARGET_AUTH_PREF} and
* {@link org.apache.http.auth.params.AuthPNames#PROXY_AUTH_PREF... | 0 |
public static void alter(State state, Properties props) throws Exception {
| 0 |
* nor may "Apache" appear in their name, without | 0 |
import org.apache.beam.sdk.schemas.FieldValueTypeInformation;
private static final Map<ClassWithSchema, List<FieldValueTypeInformation>> CACHED_FIELD_TYPES =
Maps.newConcurrentMap();
public static List<FieldValueTypeInformation> getFieldTypes(Class<?> clazz, Schema schema) {
return CACHED_FIELD_TYPES.com... | 0 |
import com.google.cloud.dataflow.sdk.transforms.windowing.PaneInfo.Timing;
// Skip empty panes unless they have interesting pane info.
if (!buffer.isEmpty().read()
|| c.paneInfo().isLast() || Timing.ON_TIME == c.paneInfo().getTiming()) { | 0 |
import org.apache.commons.lang.StringUtils;
// Maximum string size for MySql TEXT (utf8) column data type
protected final static int MAX_ALERT_TEXT_SIZE = 32617;
// middle-ellipsize the text to reduce the size to 32617 characters
text = StringUtils.abbreviateMiddle(alertText, "…", MAX_ALERT_TEXT_SIZE); | 0 |
import org.apache.beam.vendor.grpc.v1_13_1.com.google.protobuf.Timestamp;
import org.apache.beam.vendor.grpc.v1_13_1.io.grpc.ManagedChannel;
import org.apache.beam.vendor.grpc.v1_13_1.io.grpc.Status;
import org.apache.beam.vendor.grpc.v1_13_1.io.grpc.stub.CallStreamObserver;
import org.apache.beam.vendor.grpc.v1_13_1.i... | 0 |
* useful for tests. | 0 |
import org.apache.beam.runners.core.metrics.MetricsContainerStepMap; | 0 |
@Override
public String getTargetVersion() {
return "1.6.0";
}
/**
* {@inheritDoc}
*/
@Override
public String[] getCompatibleVersions() {
return new String[] {"1.6.*", "1.7.*", "2.0.*"};
}
| 0 |
import org.apache.hc.core5.http.config.Http1Config;
final Http1Config http1Config) throws IOException {
http1Config,
public void start(final Http1Config http1Config) throws IOException {
start(HttpProcessors.client(), http1Config);
start(Http1Config.DEFAULT); | 0 |
import java.util.Set;
(ServiceListener) listeners[offset + LISTENER_OBJECT_OFFSET],
Set<ServiceReference<EventHook>> eventHooks =
m_serviceRegistry.getHooks(EventHook.class);
if ((eventHooks != null) && !eventHooks.isEmpty())
InvokeHookCallback callba... | 0 |
import org.apache.aurora.scheduler.TierModule;
import org.apache.aurora.scheduler.base.TaskTestUtil;
new TierModule(TaskTestUtil.DEV_TIER_CONFIG), | 0 |
/**
* Copyright 2016 Seznam a.s.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | 0 |
String description = "This iterator suppresses rows that exceed a specified"
+ " number of columns. Once\n" | 0 |
import javax.annotation.Nullable;
@Nullable | 0 |
import org.osgi.framework.BundleContext;
/**
* Return the classname of the component type.
* For factories which does not contains a class, return "composite"
* @return the class name of the component type or "composite"
*/
String getClassName();
/**
* Return the state of the facto... | 0 |
import java.util.Objects;
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Referenceable that = (Referenceable) o;
return Objects.equals(id, that.id) &&
Objects.equals(traits, that.t... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.