Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
beginRead(false);
beginWrite(false);
* additional actions before this read operation. The boolean
* <em>optimize</em> argument can be evaluated by overridden methods in
* derived classes. Some operations which require a lock do not need a fully
* initialized configuration obj... | 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 ap... | 1 |
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 |
protected Amount(T value, U unit, T maxValue) { | 0 |
import org.apache.accumulo.core.cli.MapReduceClientOnRequiredTable;
static class Opts extends MapReduceClientOnRequiredTable {
if (!opts.getConnector().tableOperations().exists(opts.getTableName())) {
log.info("Creating table " + opts.getTableName());
opts.getConnector().tableOperations().create(opts.... | 0 |
* There isn't a good way to build this off of the {@link AccumuloClusterIT} (as would be the logical place) because we need to start the MiniAccumuloCluster in
* a static BeforeClass-annotated method. Because it is static and invoked before any other BeforeClass methods in the implementation, the actual test classes | 0 |
values.put(CSSConstants.CSS_ALL_VALUE,
ValueConstants.ALL_VALUE); | 0 |
* @param opts
*
*
*
* @param opts
*
| 0 |
* Here: <a href="http://hsqldb.sourceforge.net">HSQLDB</a> 1.6 IDENTITY columns
* @version CVS $Id: HsqlIdentityAutoIncrementModule.java,v 1.2 2004/02/19 22:13:28 joerg Exp $ | 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 ap... | 1 |
dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder();
javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); | 0 |
import org.apache.http.nio.protocol.BasicAsyncRequestConsumer;
import org.apache.http.nio.protocol.BasicAsyncResponseConsumer;
*
* @deprecated use {@link BasicAsyncRequestConsumer} or {@link BasicAsyncResponseConsumer} | 0 |
package org.apache.felix.dm.annotation.plugin.bnd;
/**
* The type of parameters which can be found in a component descriptor.
*/
public enum EntryParam
{
init,
start,
stop,
destroy,
impl,
provide,
properties,
composition,
service,
filter,
defaultImpl,
requir... | 0 |
HashSet<String> validPrefixes = new HashSet<>();
HashSet<String> propertyNames = new HashSet<>();
HashSet<Integer> usedPorts = new HashSet<>();
final TreeMap<String,String> extras = new TreeMap<>();
TreeSet<String> expected = new TreeSet<>();
TreeSet<String> actual = new TreeSet<>(); | 0 |
import org.junit.Assert;
import org.junit.Test;
public class TestRFC2617Scheme {
@Test
Assert.assertEquals("test", authscheme.getSchemeName());
Assert.assertEquals("realm1", authscheme.getParameter("realm"));
Assert.assertEquals(null, authscheme.getParameter("test"));
Assert.assertEq... | 0 |
import java.util.Map;
* @version CVS $Id: AbstractInterpreter.java,v 1.3 2003/05/07 04:36:33 coliver Exp $
Map objectModel = environment.getObjectModel();
Flow.setContextObject(objectModel, bizData);
Flow.setWebContinuation(objectModel, continuation);
PipelinesNode.getRedirector(environment).redirect(f... | 0 |
@Override
@Override
@Override | 0 |
try (SshServer sshd = Utils.setupTestServer()) {
try (SshServer sshd = Utils.setupTestServer()) {
try (SshServer sshd = Utils.setupTestServer()) { | 0 |
} catch (RuntimeException re) {
throw new RuntimeException(re); | 0 |
import java.util.Locale;
* @return The content type encoding (upcased)
encoding = (encoding != null) ? encoding.toUpperCase(Locale.US) : null; | 0 |
try (Scanner scanner = c.createScanner(MetadataTable.NAME, Authorizations.EMPTY)) {
scanner.setRange(MetadataSchema.DeletesSection.getRange());
for (Entry<Key,Value> entry : scanner) {
String row = entry.getKey().getRow().toString();
if (!row.contains("/" + tableId + "/")) {
lo... | 0 |
import org.apache.atlas.model.typedef.AtlasClassificationDef;
public final static AtlasClassificationType MATCH_ALL_CLASSIFICATION = new AtlasClassificationType(new AtlasClassificationDef("*"));
String classificationName = searchParameters.getClassification();
this.entityAttributes = new HashSet... | 0 |
* The provided service properties take precedence over the propagated bundle manifest headers.
* It means a bundle manifest header won't override a component service property having the same name.
* The provided service properties take precedence over the propagated bundle manifest headers.
* It m... | 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 |
/* $Id$
*
* 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"); ... | 0 |
import java.util.Map;
import org.apache.ambari.server.state.Cluster;
import org.apache.ambari.server.state.HostComponentAdminState;
import org.apache.ambari.server.state.Service;
import org.apache.ambari.server.state.ServiceComponent;
import org.apache.ambari.server.state.ServiceComponentHost;
import org.apache.ambari... | 0 |
import java.util.Iterator;
for (String root : map.keySet())
{
for (Iterator<Attribute> it = newAttr.iterator(); it.hasNext();)
Attribute a = it.next();
it.remove();
orgAttr.addAll(newAttr); | 0 |
private int adapt(int delta, final int numpoints, final boolean firsttime) {
private int digit(final char c) {
public String toUnicode(final String punycode) { | 0 |
Method method = ClustersImpl.class.getDeclaredMethod("loadClustersAndHosts"); | 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 |
final int dfaultPort = ServerConfiguration.getDefaultConfiguration().getPort(Property.TSERV_CLIENTPORT); | 0 |
@Test
public void testDeleteEntity() throws Exception {
final String tableName = "table-" + randomString();
Referenceable tableInstance = createHiveTableInstance(DATABASE_NAME, tableName);
final Id tableId = createInstance(tableInstance);
final String guid = tableId._getId();
... | 0 |
* Extension of {@link AbstractSetTest} for exercising the
* @since 3.0
* @version $Id$
public class UnmodifiableSetTest<E> extends AbstractSetTest<E> {
public UnmodifiableSetTest(String testName) {
return BulkTest.makeSuite(UnmodifiableSetTest.class); | 0 |
import org.apache.sshd.util.test.BaseTestSupport;
import org.apache.sshd.util.test.BogusChannel; | 0 |
import org.apache.http.nio.protocol.HttpAsyncServerProtocolHandler;
HttpAsyncServerProtocolHandler serviceHandler = new HttpAsyncServerProtocolHandler(
HttpAsyncServerProtocolHandler serviceHandler = new HttpAsyncServerProtocolHandler(
HttpAsyncServerProtocolHandler serviceHandler = new HttpAsyn... | 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 |
class DefaultCacheInvalidator implements HttpCacheInvalidator {
* Create a new {@link DefaultCacheInvalidator} for a given {@link HttpCache} and
public DefaultCacheInvalidator( | 0 |
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.apache.accumulo.core.metadata.MetadataTable;
import org.junit.Rule;
import org.junit.rules.TemporaryFolder;
@Rule
public TemporaryFolder folder = new TemporaryFolder(new Fil... | 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 |
* Tests the copy constructor.
*/
public void testInitCopy()
{
fillLayout();
PropertiesConfigurationLayout l2 = new PropertiesConfigurationLayout(
config, layout);
assertEquals("Wrong number of keys", layout.getKeys().size(), l2
.getKeys().size())... | 0 |
import java.util.stream.Collectors;
public Map<TupleTag<?>, Coder<?>> getOutputCoders() {
return currentTransform
.getOutputs()
.entrySet()
.stream()
.filter(e -> e.getValue() instanceof PCollection)
.collect(Collectors.toMap(e -> e.getKey(), e -> ((PCollection) e.getValue(... | 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 |
expect(runner.launch()).andReturn(LocalService.auxiliaryService("a", 100, shutdown));
assertEquals(Optional.<InetSocketAddress>absent(), registry.getPrimarySocket());
assertEquals(ImmutableMap.of("a", getLocalAddress(100)), registry.getAuxiliarySockets()); | 0 |
package org.apache.cocoon.forms.formmodel;
public class RepeaterFilterFieldDefinition extends FieldDefinition {
private String repeaterName;
private String field;
public String getRepeaterName() {
return repeaterName;
}
public void setRepeaterName(String repeaterName) {
this.repeaterName = repeaterName;
... | 0 |
this.session.close(); | 0 |
import org.apache.xml.security.utils.XMLUtils;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
Document doc = XMLUtils.createDocumentBuilder(false).newDocument();
Document doc = XMLUtils.createDocumentBuilder(false).newDocument(); | 0 |
* <p>
* </p>
* <p>
* </p>
* <p>
* </p>
* <p>
* </p>
* <p>
* </p>
* <p>
* </p>
* <p>
* </p>
* <p>
* </p> | 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 ... | 1 |
@Override | 0 |
List candidates = state.getResolvedCandidates(target, importer);
candidates.addAll(state.getUnresolvedCandidates(target, importer));
List candidates = state.getResolvedCandidates(reqs[reqIdx], targetModule);
candidates.addAll(state.getUnresolvedCandidates(reqs[req... | 1 |
import java.awt.Graphics2D;
import org.apache.batik.transcoder.SVGAbstractTranscoder; | 0 |
@Override | 0 |
return success == other.success | 0 |
private final ConfigurationInterpolator localSubst;
localSubst = initLocalInterpolator();
localSubst = initLocalInterpolator();
String path = String.valueOf(getInterpolator().interpolate(pattern));
String path = String.valueOf(localSubst.interpolate(pattern));
/**
* Creates ... | 0 |
* matches the implemented interface and filter. The adapter will be registered
* with the specified interface and existing properties from the original service
* plus any extra properties you supply here. It will also inherit all dependencies,
* and if you declare the original service as a member it will be inje... | 0 |
public void testSetURLWithParams() throws Exception
{
FileConfiguration config = new PropertiesConfiguration();
URL url = new URL(
"http://issues.apache.org/bugzilla/show_bug.cgi?id=37886");
config.setURL(url);
assertEquals("Base path incorrect",
... | 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 |
* @param index Index into the collection. | 0 |
SelectionEvent.SELECTION_START, | 0 |
import org.w3c.dom.Document;
import org.w3c.dom.DocumentFragment;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.Text;
* @version CVS $Id: PortalManager.java,v 1.9 2003/08/07 17:13:39 joerg Exp $ | 0 |
public Shape getPaintedArea(){ | 0 |
import com.twitter.mesos.gen.TaskQuery;
public interface SchedulerCore
extends Function<TaskQuery, Iterable<TwitterTaskInfo>>, TaskLauncher {
Set<ScheduledTask> getTasks(TaskQuery query);
void setTaskStatus(TaskQuery query, ScheduleStatus status, @Nullable String message);
void killTasks(TaskQuery query, Stri... | 0 |
return GlobalWindows.class.hashCode(); // all GlobalWindow instances have the same hash code. | 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
... | 0 |
*
*
*
*
*
*
*
*
*
*
* @param instanceName
* the Accumulo instance name
* @param zooKeepers
* a comma-separated list of zookeeper servers
* @since 1.5.0
* @deprecated since 1.6.0; Use {@link #setZooKeeperInstance(Job, ClientConfiguration)} instead.
*/
... | 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 |
* 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.aurora.scheduler.resources.ResourceSlot;
import org.apache.aurora.scheduler.resources.ResourceType; | 0 |
* Helper class to hold {@link Schema} and {@link FieldValueGetter}s which were used to create it.
/** Returns a {@link Schema}. */
* Returns the list of {@link FieldValueGetter}s which were used to create {@link
* SchemaGetters#schema()}. | 1 |
import org.apache.xml.security.encryption.XMLEncryptionException;
/**
* Method addEncryptedKey
*
* @param encryptedKey
* @throws XMLEncryptionException
*/
public void add(EncryptedKey encryptedKey)
throws XMLEncryptionException {
if (this._state == MODE_SIGN) {
XMLCipher cipher = XMLCipher.getInst... | 0 |
* Copyright 2000-2009 The Apache Software Foundation | 0 |
import org.apache.ambari.api.resources.ResourceDefinition;
expect(requestFactory.createRequest(eq(httpHeaders), isNull(String.class), eq(uriInfo), eq(Request.Type.GET),
expect(requestFactory.createRequest(eq(httpHeaders), isNull(String.class), eq(uriInfo), eq(Request.Type.GET),
expect(requestFactory.createR... | 0 |
* $Header: /cvshome/build/org.osgi.service.useradmin/src/org/osgi/service/useradmin/Authorization.java,v 1.11 2007/02/07 18:53:08 hargrave Exp $
* Copyright (c) OSGi Alliance (2001, 2007). All Rights Reserved.
* @version $Revision: 1.11 $
* Gets the names of all roles implied by this <code>Authorization</code>
*... | 0 |
import org.apache.aurora.scheduler.async.OfferManager.OfferManagerImpl;
import org.apache.aurora.scheduler.async.OfferManager.OfferReturnDelay;
bind(OfferManager.class).to(OfferManagerImpl.class);
bind(OfferManagerImpl.class).in(Singleton.class);
expose(OfferManager.class);
PubsubEventModule... | 0 |
@Override
@Override | 1 |
import java.util.List;
List<JexlUberspect.ResolverType> strategy = (node == null) || !(node.jjtGetParent()instanceof ASTArrayAccess)
? JexlUberspect.POJO : JexlUberspect.MAP;
JexlPropertyGet vg = uberspect.getPropertyGet(strategy, object, attribute);
... | 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 ap... | 1 |
import static org.apache.aurora.gen.ScheduleStatus.DRAINING;
checkOutstandingTimer(DRAINING, 0);
checkOutstandingTimer(DRAINING, 0); | 0 |
import org.apache.hc.core5.io.CloseMode;
import org.apache.hc.core5.net.NamedEndpoint;
import org.apache.hc.core5.reactor.ProtocolLayer;
import org.apache.hc.core5.reactor.ssl.SSLBufferMode;
this.socketTimeout = ioSession.getSocketTimeoutMillis();
public void close(final CloseMode closeMode) {
... | 0 |
import org.apache.hc.core5.annotation.NotThreadSafe; | 0 |
final Options options = new Options();
final HelpFormatter formatter = new HelpFormatter();
final StringWriter out = new StringWriter(); | 0 |
import org.apache.hc.core5.annotation.Internal;
@Internal | 0 |
import java.util.Map;
* Returns a map of properties which correspond to {@link ValueProvider.RuntimeValueProvider},
* keyed by the property name. The value is a map containing type and default information.
*/
Map<String, Map<String, Object>> outputRuntimeOptions();
/** | 0 |
import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;
@Parameters(separators = "=")
public static class Options {
@Parameter(
names = "-enable_h2_console",
description = "Enable H2 DB management console.",
arity = 1)
public boolean enableH2Console = false;
... | 0 |
package org.apache.beam.sdk.extensions.sql.interpreter.operator;
import org.apache.beam.sdk.extensions.sql.interpreter.BeamSqlFnExecutorTestBase; | 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 m... | 0 |
Connector connector = opts.getConnector();
connector.securityOperations().changeUserAuthorizations(opts.principal, AUTHS); | 0 |
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.assertFalse;
@Test(dataProvider = "salesNewTypeAttrs-next")
public void transformUpdatesForSubTypes(ZipSource zipSource) throws IOException, A... | 0 |
masterStatus.addSortableColumn("# Tablets", new NumberType<Integer>(0, Integer.MAX_VALUE, 2, Integer.MAX_VALUE), null); | 0 |
public class SimpleAnnotationsTest extends AnnotationBase | 0 |
import org.apache.hc.core5.reactor.ssl.SSLBufferMode;
final SSLBufferMode sslBufferMode,
sslBufferMode, | 0 |
import org.osgi.util.converter.ConversionException;
import org.osgi.util.converter.ConvertFunction;
import org.osgi.util.converter.Converter;
import org.osgi.util.converter.ConverterBuilder;
import org.osgi.util.converter.Converting;
import org.osgi.util.converter.Function;
import org.osgi.util.converter.Rule;
import o... | 0 |
import org.apache.beam.sdk.extensions.sql.QueryTransform;
QueryTransform.withQueryString(
customersFromWonderland.apply(
QueryTransform.withQueryString("SELECT COUNT(id) FROM PCOLLECTION"));
QueryTransform.withQueryString( | 0 |
AsynchronousSocketChannel socket =
setSocketOptions(openAsynchronousSocketChannel(address, group)); | 1 |
private MultiIterator(List<SortedKeyValueIterator<Key,Value>> iters, Range seekFence,
boolean init) {
public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive)
throws IOException {
public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options,
... | 0 |
import org.apache.felix.dm.annotation.api.ServiceDependency.Any; | 0 |
package org.apache.hc.core5.http.impl.nio;
import org.apache.hc.core5.http.ContentLengthStrategy;
import org.apache.hc.core5.http.nio.NHttpConnectionFactory;
import org.apache.hc.core5.http.nio.NHttpMessageParserFactory;
import org.apache.hc.core5.http.nio.NHttpMessageWriterFactory;
import org.apache.hc.core5.util.Byte... | 1 |
@org.junit.AfterClass
public static void cleanup() throws Exception {
Security.removeProvider("org.bouncycastle.jce.provider.BouncyCastleProvider");
}
| 0 |
log.debug("EXCEPTION {}", e.getMessage());
log.debug("EXCEPTION {}", e.getMessage()); | 0 |
public interface MetricCell<DataT> { | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.