Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
.setGoogleClientRequestInitializer(options.getGoogleApiTrace());
.setGoogleClientRequestInitializer(options.getGoogleApiTrace());
.setGoogleClientRequestInitializer(options.getGoogleApiTrace());
.setGoogleClientRequestInitializer(options.getGoogleApiTrace());
.setGoogleClientRequ... | 0 |
bws = new HashMap<>(); | 1 |
@DefaultAnnotation(NonNull.class)
import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
import edu.umd.cs.findbugs.annotations.NonNull; | 0 |
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDe... | 0 |
} else if (blankAsPlus && b == ' ') {
buf.append('+');
buf.append("%");
char hex1 = Character.toUpperCase(Character.forDigit((b >> 4) & 0xF, RADIX));
char hex2 = Character.toUpperCase(Character.forDigit(b & 0xF, RADIX));
buf.app... | 0 |
private static final Map<Resource.Type, String> keyPropertyIds = ImmutableMap.<Resource.Type, String>builder()
private static final Set<String> propertyIds = Sets.newHashSet( | 0 |
if (FileObjectUtils.exists(destFile) && destFile.getType() != srcFile.getType()) { | 0 |
public interface ServiceComponentHost {
* Get the Host this object maps to
* @return Host's hostname
public String getHostName();
* ServiceComponentHost level
* Get ServiceComponent-Host State
* @return ServiceComponentHostState
public ServiceComponentHostState getState();
* Set the State for this... | 0 |
import org.apache.beam.sdk.values.PBegin;
public static class Unbound<K, V> extends PTransform<PBegin, PCollection<KV<K, V>>> {
public PCollection<KV<K, V>> apply(PBegin input) { | 0 |
SimpleTimer.getInstance(serverConfig.getConfiguration()).schedule(new Runnable() {
SimpleTimer.getInstance(serverConfig.getConfiguration()).schedule(new Runnable() { | 1 |
@Property(name = "adapter", value = "true")
@AdapterService(adapteeService = S1.class)
@AdapterService(adapteeService = S1.class, field = "m_s1")
@Property(name = "adapter", value = "true")
@AdapterService(adapteeService = S1.class, added = "bind", removed = "removed")
@Property(name = "adapter"... | 0 |
"the protected property 'service.id'.", current.getSource() ); | 0 |
new Thread(() -> {
try {
client.set(zkClient.get());
} catch (ZooKeeperConnectionException e) {
throw new RuntimeException(e);
} catch (InterruptedException e) {
throw new RuntimeException(e);
} finally {
blockingGetComplete.countDown();
Thread getThread =... | 0 |
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Collections;
import java.util.List;
import org.apache.beam.sdk.coders.ByteArrayCoder;
import org.apache.beam.sdk.coders.StructuredCoder;
/** The Coder for the Runner's encoded representation of a key. */
static cl... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/parser/XMLParser.java,v 1.47 2003/10/09 21:21:29 rdonkin Exp $
* $Revision: 1.47 $
* $Date: 2003/10/09 21:21:29 $
* any, must include the following acknowledgement:
* Alternately, th... | 0 |
private UpgradeCheckStatus status = UpgradeCheckStatus.PASS; | 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... | 0 |
m.put(p.getFirst(), p.getSecond()); | 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 ... | 0 |
* Copyright 2005-2011 The Apache Software Foundation.
public ApacheOctetStreamData(XMLSignatureInput xi)
throws CanonicalizationException, IOException
{ | 0 |
*
*
*
* @version CVS $Id$
public abstract class AbstractXMLPipe extends AbstractXMLProducer
implements XMLPipe { | 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 |
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* | 0 |
import org.apache.felix.webconsole.json.JSONWriter;
if ( null != bipReg )
{
bipReg.unregister();
bipReg = null;
}
throws IOException
private void keyVal( JSONWriter jw, String key, Object val) throws IOException
{
if ( val != null )
{
... | 0 |
import org.apache.batik.gvt.renderer.RendererFactory;
RendererFactory rendererFactory = new StaticRendererFactory();
ctx.setGraphicsNodeRenderContext(rendererFactory.getRenderContext());
Renderer renderer = rendererFactory.createRenderer(img);
| 0 |
/*
* $Header: /cvshome/build/ee.foundation/src/java/io/CharConversionException.java,v 1.6 2006/03/14 01:20:23 hargrave Exp $
*
* (C) Copyright 2001 Sun Microsystems, Inc.
* Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may... | 0 |
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
* permission of the Apache Software Foundation.
* @version $Revision: 1.5 $ $Date: 2003/10/13 08:42:27 $ | 0 |
@Parameter(names = "--old", description = "old zookeeper password", password = true, hidden = true)
@Parameter(names = "--new", description = "new zookeeper password", password = true, hidden = true)
| 0 |
protected List<GlobalRequestHandler> globalRequestHandlers;
public List<GlobalRequestHandler> getGlobalRequestHandlers() {
return globalRequestHandlers;
}
public void setGlobalRequestHandlers(List<GlobalRequestHandler> globalRequestHandlers) {
this.globalRequestHandlers = globalRequest... | 0 |
/**
* Do not do anything in the follower.
*/
@Override
public void addCommittedProposal(Request r) {
//do nothing
}
| 0 |
import org.apache.hc.client5.http.entity.EntityBuilder;
final HttpEntity original = EntityBuilder.create().setText("encoded stuff").setContentEncoding("GZip").build();
final HttpEntity original = EntityBuilder.create().setText("").setContentEncoding("GZip").build();
final HttpEntity original = E... | 0 |
import org.apache.felix.gogo.commands.Command;
@Command(scope = "obr", name = "info", description = "Print informations about OBR bundles") | 0 |
* Copyright 1999-2005 The Apache Software Foundation.
import org.apache.cocoon.sitemap.ComponentLocator;
/** Optional application container */
protected ComponentLocator applicationContainer;
/** Optional event listeners for the enter sitemap event */
protected List enterSitemapEventListeners = new Ar... | 0 |
private static final String CONN_KEEPALIVE = "Keep-Alive";
request.addHeader(new Header(CONN_DIRECTIVE, CONN_KEEPALIVE, true)); | 0 |
: (month + (12 - monthOfFirstQuarter)); // CHECKSTYLE IGNORE MagicNumber
int quarter = ((relativeMonth / 3) + 1); // CHECKSTYLE IGNORE MagicNumber
return (year * 10) + quarter; // CHECKSTYLE IGNORE MagicNumber | 0 |
import org.apache.commons.lang3.StringUtils;
final String userName = getUserName(propertyMap);
final String userName = getUserName(propertyMap);
private String getUserName(Map<String, Object> propertyMap) {
String userName = propertyMap.get(WIDGETLAYOUT_USERNAME_PROPERTY_ID) == null ? "" : propert... | 0 |
// interoperability tests using test vectors from other implementations
suite.addTest(org.apache.xml.security.test.interop.IBMTest.suite()); | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList; | 0 |
import java.util.concurrent.TimeUnit;
import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
sleepUninterruptibly(1, TimeUnit.SECONDS); | 1 |
package org.apache.felix.karaf.shell.console.completer;
import org.apache.felix.karaf.shell.console.Completer; | 0 |
*
*
*
*
* | 0 |
private static final Logger LOG = LoggerFactory.getLogger(RetryHelper.class); | 0 |
* @version $Revision$ | 0 |
@SuppressWarnings("unchecked")
@SuppressWarnings("unchecked") | 0 |
log.error("Problem getting real goal state from zookeeper: " + e);
break;
break;
break;
}catch(Throwable t) {
log.error("Error occurred reading / switching master goal state. Will continue with attempt to update status", t);
}
tr... | 0 |
/** Test operator Distinct. */
Dataset<String> uniq =
Distinct.named("Distinct1")
.of(dataset)
.windowBy(windowing)
.triggeredBy(trigger)
.accumulationMode(AccumulationMode.DISCARDING_FIRED_PANES)
.output();
Dataset<String> uniq =
Disti... | 0 |
* @version $Revision$ $Date$ | 0 |
try (AccumuloClient client = getAccumuloClient()) {
// Eliminate whole tablets
for (int test = 0; test < 10; test++) {
// create a table
log.info("Test {}", test);
client.tableOperations().create(tableName);
// put some data in it
fillTable(client, tableName);
... | 0 |
client = MasterClient.getConnectionWithRetry(HdfsZooInstance.getInstance()); | 0 |
public final HttpClientBuilder setMaxConnTotal(final int maxConnTotal) {
public final HttpClientBuilder setMaxConnPerRoute(final int maxConnPerRoute) { | 0 |
@Deprecated | 0 |
public class TransformedBuffer<E> extends TransformedCollection<E> implements Buffer<E> {
public static <E> Buffer<E> decorate(Buffer<E> buffer, Transformer<? super E, ? extends E> transformer) {
return new TransformedBuffer<E>(buffer, transformer);
// TODO: Generics
decorated.decorated(... | 0 |
public static final String PROPERTY_VALUE_ATTRIBUTES_PROPERTY_ID = PropertyHelper
.getPropertyId("StackConfigurations", "property_value_attributes");
public static final String PROPERTY_DEPENDS_ON_PROPERTY_ID = PropertyHelper
.getPropertyId("StackConfigurations", "property_depends_on");
public stati... | 0 |
import org.apache.excalibur.source.impl.validity.AbstractAggregatedValidity;
* @version $Id: EventAwareCacheImpl.java,v 1.7 2003/10/28 13:39:36 unico Exp $
if (val instanceof AbstractAggregatedValidity) {
handleAggregatedValidity((AbstractAggregatedValidity)val, key);
... | 0 |
import org.apache.accumulo.core.rpc.SaslConnectionParams.SaslMechanism;
public static final ThreadLocal<SaslMechanism> rpcMechanism = new ThreadLocal<SaslMechanism>();
public static ThreadLocal<String> getRpcPrincipalThreadLocal() {
return rpcPrincipal;
}
public static SaslMechanism rpcMechanism() {
r... | 1 |
/** Optional output type descriptor. */
@Nullable protected final transient TypeDescriptor<OutputT> outputType; | 0 |
import static org.easymock.EasyMock.expectLastCall;
import static org.easymock.EasyMock.getCurrentArguments;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.context.SecurityContextHolder;
Authentication auth = new UsernamePasswordAuthe... | 0 |
* limitations under the License. | 0 |
import org.apache.felix.scr.impl.manager.AbstractComponentManager;
import org.osgi.framework.BundleContext;
private BundleContext m_context;
m_context = ( BundleContext ) EasyMock.createNiceMock( BundleContext.class );
EasyMock.expect( m_context.getService( m_serviceReference ) ).andReturn( m_servic... | 0 |
MethodUtils.invokeMethod(parent, "getName", null);
MethodUtils.invokeMethod(parent, "getName", null, null);
MethodUtils.invokeExactMethod(parent, "getName", null);
MethodUtils.invokeExactMethod(parent, "getName", null, null); | 0 |
*
*
*
public void doTag(XMLOutput output) throws JellyTagException {
Document actualDocument = parseBody();
AssertDocumentsEqualTag assertTag =
(AssertDocumentsEqualTag) findAncestorWithClass(AssertDocumentsEqualTag
.class);
assertTag.setActual(actualDocument);... | 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 |
protected long getEncodedElementByteSize(ByteString value) throws Exception {
public boolean isRegisterByteSizeObserverCheap(ByteString value) { | 0 |
import java.util.Objects;
static final class Result<DestinationT> implements Serializable {
@Override
public boolean equals(Object other) {
if (other instanceof Result) {
Result<DestinationT> o = (Result<DestinationT>) other;
return Objects.equals(this.filename, o.filename)
... | 0 |
import org.apache.beam.sdk.transforms.windowing.BoundedWindow;
import org.apache.beam.sdk.util.TimeDomain;
import org.joda.time.Instant;
* Calls a {@link DoFn DoFn's} {@link DoFn.OnTimer @OnTimer} method for the given timer
* in the given window.
*/
void onTimer(String timerId, BoundedWindow window, Instant ... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/test/org/apache/commons/digester/plugins/TestInline.java,v 1.2 2003/10/05 15:30:03 rdonkin Exp $
* $Revision: 1.2 $
* $Date: 2003/10/05 15:30:03 $
* ===================================================================... | 0 |
import java.io.File;
import java.io.IOException;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentMap;
| 0 |
securityContext, encryptedKeyType.getId(), null) { | 0 |
@Override
@Override
@Override
@Override
@Override | 0 |
private static final ViewRegistry singleton = createMock(ViewRegistry.class);
ViewRegistry.initInstance(singleton);
reset(singleton);
expect(singleton.checkAdmin()).andReturn(true);
expect(singleton.checkAdmin()).andReturn(false);
replay(singleton, viewEntity, viewInstanceEntity);
verify(singl... | 0 |
boolean expectContinue();
| 0 |
* Tests a {@link FileSystemException} containing info with a URL containing a complete basic authentication.
final FileSystemException fse = new FileSystemException("vfs.provider/rename.error", "file://test.bin",
"http://foo:bar@junit.org/test.bin");
* Tests a {@link FileSystemExceptio... | 1 |
base64 = new Base64(-1, new byte[]{'A'}); // TODO do we need to check sep if len = -1? | 0 |
* ZLib delayed compression.
*
* @see Compression#isDelayed()
/**
* Named factory for the ZLib Delayed Compression.
*/
/**
* Create a new instance of a delayed ZLib compression
*/
public CompressionDelayedZlib() {
}
| 0 |
import org.apache.beam.sdk.coders.StringUtf8Coder;
// we know that it is keyed on String
Coder<?> keyCoder = StringUtf8Coder.of();
StateInternalsFactory<String> stateInternalsFactory =
(StateInternalsFactory<String>) this.currentKeyStateInternals.getFactory();
TimerInternalsFactory<Str... | 0 |
return bo.getBytes() != 0; | 0 |
package org.apache.beam.runners.direct.portable;
import org.apache.beam.runners.direct.DirectGraphs;
import org.apache.beam.runners.direct.ExecutableGraph;
/** Tests for {@link WatermarkCallbackExecutor}. */
@Rule public TestPipeline p = TestPipeline.create().enableAbandonedNodeEnforcement(false);
ExecutableGraph... | 0 |
JwtAuthenticationProperties jwtProperties = propertiesProvider.get();
JwtAuthenticationProperties jwtProperties = propertiesProvider.get();
JwtAuthenticationProperties jwtProperties = propertiesProvider.get();
JwtAuthenticationProperties jwtProperties = propertiesProvider.get();
JwtAuthentic... | 0 |
/* Later - when we allow search limitation by "type".
ArrayList<String> typesList = new ArrayList<String>();
for (String s: types.split(",")) {
// Types validity check.
if (typesList.contains(s)) {
LOG.error("Specifyed type is not a member of the Type System... | 0 |
/*
* Copyright 2013 Twitter, 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 t... | 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... | 0 |
try (AccumuloClient client = createAccumuloClient()) {
try (AccumuloClient client = createAccumuloClient()) {
try (AccumuloClient client = createAccumuloClient()) { | 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... | 0 |
* @since 3.0 | 0 |
public AbstractFileName(final String scheme, final String absPath, FileType type)
* @param buffer A StringBuilder to use to construct the URI.
protected abstract void appendRootUri(StringBuilder buffer, boolean addPassword);
final StringBuilder buffer = new StringBuilder();
final String... | 0 |
for (HttpHost element : this.proxyChain) {
hash = LangUtils.hashCode(hash, element); | 0 |
@Override | 0 |
protected Request createControllerRequest(Set<Map<String, Object>> setProperties) { | 1 |
@Value("${logsearch.solr.config_set.folder:/usr/lib/ambari-logsearch-portal/conf/solr_configsets}")
examples = {"/usr/lib/ambari-logsearch-portal/conf/solr_configsets"},
defaultValue = "/usr/lib/ambari-logsearch-portal/conf/solr_configsets", | 0 |
import org.apache.accumulo.core.iterators.user.SummingCombiner;
t.append(SummingCombiner.FIXED_LEN_ENCODER.encode(s), 0, 8); | 0 |
static org.slf4j.Logger log =
(ResourceResolverTest.class); | 1 |
import com.fasterxml.jackson.core.type.TypeReference;
Map<String, Object> probingOptionsMap =
MAPPER.readValue(optionsJson, new TypeReference<Map<String, Object>>() {});
if (probingOptionsMap.containsKey("options")) {
//Legacy options.
return MAPPER.readValue(optionsJson, PipelineO... | 0 |
boolean bb = ve.evaluate(new ColumnVisibility(testVis.toArray())); | 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 ... | 0 |
suite.addTest(new TestSuite(FileWriterWithEncodingTest.class)); | 0 |
super(org.apache.commons.bcel6.Const.JSR, target);
if (super.getOpcode() == org.apache.commons.bcel6.Const.JSR) {
super.setOpcode(org.apache.commons.bcel6.Const.JSR_W); | 0 |
@Test(dependsOnMethods = "testSubmitEntity", expectedExceptions = IllegalArgumentException.class)
public void testAddNullProperty() throws Exception {
final String guid = tableId._getId();
//add property
addProperty(guid, null, "foo bar");
Assert.fail();
}
@Test(dependsO... | 0 |
import org.apache.http.nio.reactor.SessionRequest;
public SessionRequest openConnection(final InetSocketAddress address, final Object attachment) {
return this.ioReactor.connect(address, null, attachment, null); | 0 |
import static org.junit.Assert.assertTrue;
import java.io.UnsupportedEncodingException;
import java.util.Arrays;
import org.junit.Test;
public class Base64Codec13Test {
@Test
@Test
@Test
@Test
@Test
@Test
@Test
@Test | 1 |
/*
* 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 applica... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.