Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
/**
* 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 in writing, software
* distribu... | 0 |
import com.twitter.mesos.JNICallback;
@JNICallback
@JNICallback
@JNICallback
@JNICallback
@JNICallback
@JNICallback | 0 |
* @author Geoff Howard (ghoward@apache.org)
* @version $CVS$
/**
* Constructor requires any subclass of Event.
* @param ev
*/
/**
* Returns the specific Event this validity is based on.
*
* @return Event
*/
/**
* Basic implementation is always valid until event sign... | 0 |
import org.apache.accumulo.test.categories.MiniClusterOnlyTests;
@Category({MiniClusterOnlyTests.class, SunnyDayTests.class}) | 0 |
protected final List requestInterceptors = new ArrayList();
protected final List responseInterceptors = new ArrayList(); | 0 |
import org.apache.http.Consts;
SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, Consts.ASCII);
SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, Consts.ASCII);
SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, Consts.ASCII);
SessionO... | 0 |
package cz.seznam.euphoria.executor.local;
* Object passed inside local executor's processing pipelines.
| 0 |
import static java.nio.charset.StandardCharsets.UTF_8;
private boolean rootHasWritePermission;
wal.write(DfsLogger.LOG_FILE_HEADER_V3.getBytes(UTF_8), 0, DfsLogger.LOG_FILE_HEADER_V3.length() / 2); | 0 |
queryParser.setAllowLeadingWildcard(true); | 0 |
import static org.hamcrest.MatcherAssert.assertThat;
import org.apache.beam.sdk.util.CoderUtils;
@Test
public void testCoder() throws Exception {
TestStream<String> testStream =
TestStream.create(StringUtf8Coder.of())
.addElements("hey")
.advanceWatermarkTo(Instant.ofEpochMilli(... | 0 |
private final Map<PropertyId, Object> properties = new HashMap<PropertyId, Object>();
properties.put(predicate.getPropertyId(), predicate.getValue());
for (BasePredicate predicate1 : predicates) {
predicate1.accept(this);
public Map<PropertyId, Object> getProperties() { | 0 |
package org.apache.felix.ipojo.test.scenarios.service.dependency;
import org.apache.felix.ipojo.test.scenarios.service.dependency.service.CheckService;
| 0 |
package org.apache.felix.sigil.junit.activator;
import org.apache.felix.sigil.junit.server.JUnitService;
import org.apache.felix.sigil.junit.server.impl.JUnitServiceFactory; | 0 |
identitiesProvider = AuthenticationIdentitiesProvider.wrap(identities);
int index = AuthenticationIdentitiesProvider.findIdentityIndex(
identities, AuthenticationIdentitiesProvider.PASSWORD_IDENTITY_COMPARATOR, password);
int index = AuthenticationIdentitiesProvider.findIdentityI... | 0 |
public class ByteValidatorTest extends AbstractNumberValidatorTest { | 0 |
try (AccumuloClient c = getAccumuloClient()) {
String[] tableNames = getUniqueNames(2);
String table1 = tableNames[0];
c.tableOperations().create(table1);
String table2 = tableNames[1];
c.tableOperations().create(table2);
TreeSet<Text> splitRows = new TreeSet<>();
int split... | 0 |
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.availability.MetricCollectorHAController;
MetricCollectorHAController haController) { | 0 |
import org.apache.hc.core5.http.impl.BasicHttpTransportMetrics;
final BasicHttpTransportMetrics metrics,
final BasicHttpTransportMetrics metrics) { | 1 |
AccumuloClient c = getAccumuloClient(); | 0 |
/**
* 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 in writing, software
* distribu... | 0 |
import org.apache.aurora.scheduler.storage.entities.IMetadata;
if (!update.getSummary().getMetadata().isEmpty()) {
detailsMapper.insertJobUpdateMetadata(
key,
IMetadata.toBuildersSet(update.getSummary().getMetadata()));
}
| 0 |
import org.apache.beam.sdk.transforms.DoFnSchemaInformation;
new TupleTag<>(PropertyNames.OUTPUT) /* main output id */,
DoFnSchemaInformation.create()); | 0 |
public class SVGPolygonElementBridge extends SVGDecoratedShapeElementBridge {
protected boolean hasStartMarker(){
return false;
}
protected boolean hasEndMarker(){
return false;
} | 0 |
private static final SecureAction m_secureAction = new SecureAction();
m_secureAction.invokeBundleEventHook(
(org.osgi.framework.hooks.bundle.EventHook) eh,
(BundleEvent) event, shrinkable); | 0 |
exitWithError(ex.getMessage(), 1);
exit(0);
public void exit(int status) {
System.exit(status);
}
public void exitWithError(String message, int status) {
System.err.println(message);
exit(status);
} | 0 |
@NamedQuery(name = "ServiceConfigEntity.findLatestServiceConfigsByService", query = "SELECT scv FROM ServiceConfigEntity scv WHERE scv.clusterId = :clusterId AND scv.serviceName = :serviceName AND scv.version = (SELECT MAX(scv2.version) FROM ServiceConfigEntity scv2 WHERE (scv2.serviceName = :serviceName AND scv2.c... | 0 |
import org.apache.accumulo.core.replication.proto.Replication.Status;
/**
* Determine if the given absolute file is still pending replication
* @param absolutePath Absolute path to a file
* @return True if the file still needs to be replicated
* @throws AccumuloException
* @throws AccumuloSecurityExce... | 0 |
* @version $Revision$ | 1 |
* @return
* @return
* @return
return new URI(new URI(BaseURI), uri); | 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 |
answer = value.evaluateAsString(context); | 0 |
Copyright 2001,2003 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... | 0 |
private final List<ElementValueGen> evalues; | 0 |
final SoftReference<Object> ref = new SoftReference<>(new Object());
ArrayList<Object> list = new ArrayList<>(); | 0 |
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> | 0 |
return "Master Server" + (masters.size() == 0 ? "" : ":" + AddressUtil.parseAddress(masters.get(0), false).getHost());
row.add(masters.size() == 0 ? "<div class='error'>Down</div>" : AddressUtil.parseAddress(masters.get(0), false).getHost());
row.add(AddressUtil.parseAddress(server.name, false).ge... | 1 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/BidiMap.java,v 1.3 2003/10/06 23:47:17 scolebourne Exp $
* This extended <code>Map</code> represents a mapping where a key may
* lookup a value and a value may lookup a key with ... | 0 |
import static org.apache.commons.lang.StringUtils.defaultString;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.pers... | 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 |
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileOutputStream;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.apache.xml.security.signature.ObjectContainer;
import org.apache.xml.security.signature.XMLSignature;
import org.apache.xml.s... | 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 |
out.println(sb); | 0 |
public Object clone() {
return super.clone(); | 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 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap; | 0 |
public XMLSignatureFactoryTest() throws Exception {
fail("Should raise a NPE for null mechanismType");
" if specified provider is not found");
fail("Should raise a NPE for null mechanismType");
fail("Should raise a NPE for null provider");
factory.isF... | 1 |
Map<String,InputTableConfig> configMap = new HashMap<>(); | 1 |
activeUser.setUserName(UserName.fromString(login)); | 0 |
import org.apache.commons.io.IOUtils;
IOUtils.closeQuietly( input ); | 0 |
new DefaultHttpResponseFactory(),
reqistry,
this.params); | 0 |
package aQute.lib.collections;
import java.util.*;
public class MultiMap<K,V> extends HashMap<K,Set<V>> {
private static final long serialVersionUID = 1L;
final Set<V> EMPTY = Collections.emptySet();
public boolean add( K key, V value ) {
Set<V> set = get(key);
if ( set == null) {
set=new HashSet<V>();
... | 0 |
V old = put(index, entry.getKey(), entry.getValue());
if (old == null) {
// if no key was replaced, increment the index
index++;
} else {
// otherwise put the next item after the currently inserted key
index = indexOf(en... | 0 |
@Test
public void testSupportedCipher() throws Exception {
for (BuiltinCiphers expected : BuiltinCiphers.VALUES) {
if (!expected.isSupported()) {
System.out.append("Skip unsupported cipher: ").println(expected);
continue;
}
Cipher ciphe... | 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 |
* @since 3.0 | 0 |
import java.util.Optional;
return Optional.empty(); | 0 |
public ICapability getCapability(); | 0 |
Assert.assertTrue(filter.accept(createFileSelectInfo(new File("Test.java"))));
Assert.assertTrue(filter.accept(createFileSelectInfo(new File("test-10.java"))));
Assert.assertFalse(filter.accept(createFileSelectInfo(new File("test-.java"))));
Assert.assertTrue(filter.accept(createFileSele... | 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 |
* @return this <code>CommandBuilder</code> | 0 |
@Override
public StageWrapper.Type getStageWrapperType() {
return StageWrapper.Type.SERVER_SIDE_ACTION;
} | 0 |
super(org.apache.commons.bcel6.Const.MULTIANEWARRAY, index); | 0 |
*/
public IAND() {
super(org.apache.bcel.Constants.IAND);
}
/**
* Call corresponding visitor method(s). The order is:
* Call visitor methods of implemented interfaces first, then
* call methods according to the class hierarchy in descending order,
* i.e., the most specific visi... | 0 |
@SuppressWarnings("boxing") // test 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
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 0 |
checkState(
ModelCoders.urns().equals(BEAM_MODEL_CODER_URNS.values()),
"All Model %ss should have an associated java %s",
Coder.class.getSimpleName(),
Coder.class.getSimpleName()); | 0 |
* or more contributor license agreements. See the NOTICE file
* regarding copyright ownership. The ASF licenses this file
* with the License. You may obtain a copy of the License at
* KIND, either express or implied. See the License for the | 0 |
import org.testng.Assert;
assertCredentialEntryCorrect(entry);
assertCredentialEntryCorrect(entry);
assertCredentialEntryCorrect(entry);
}
protected void assertCredentialEntryCorrect(CredentialProvider.CredentialEntry entry) {
assertCredentialEntryCorrect(entry, defaultPass);
... | 0 |
import org.apache.xml.security.stax.impl.util.IDGenerator;
new KeyNameSecurityToken(keyName, inboundSecurityContext);
new AbstractInboundSecurityToken(inboundSecurityContext, IDGenerator.generateID(null),
SecurityTokenConstants.KeyIdentifier_NoKeyI... | 0 |
* @version $Id$ | 0 |
private static final String ARTIFACT_TABLE = "artifact";
createArtifactTable();
private void createArtifactTable() throws SQLException {
ArrayList<DBColumnInfo> columns = new ArrayList<DBColumnInfo>();
columns.add(new DBColumnInfo("artifact_name", String.class, 255, null, false));
columns.add(new DB... | 0 |
import org.apache.accumulo.core.file.FileOperations;
import org.apache.accumulo.hadoopImpl.mapreduce.lib.ConfiguratorBase;
FileSKVIterator sample = FileOperations.getInstance().newReaderBuilder() | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/MultiMap.java,v 1.5 2002/11/24 19:33:19 scolebourne Exp $
* $Revision: 1.5 $
* $Date: 2002/11/24 19:33:19 $
* <p>
* A <code>MultiMap</code> is a Map with slightly different sem... | 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 |
import org.apache.xml.security.stax.ext.XMLSecurityUtils;
XMLSecurityUtils.copy(inputStream, byteArrayOutputStream); | 0 |
Set<SubResourceDefinition> subs = new HashSet<>(); | 0 |
public static <K, V> Map<K, V> defaultedMap(Map<K, V> map, V defaultValue) {
return new DefaultedMap<K, V>(map, ConstantTransformer.constantTransformer(defaultValue));
public static <K, V> IterableMap<K, V> defaultedMap(Map<K, V> map, Factory<? extends V> factory) {
return new DefaultedMap<K, V>... | 0 |
@SuppressWarnings("deprecation") // tests some deprecated classes | 0 |
import org.apache.ambari.api.services.serializers.ResultSerializer;
* Provides common functionality to all services.
public abstract class BaseService {
/**
* All requests are funneled through this method so that common logic can be executed.
* This consists of creating a {@link Request} instance, invoking the... | 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 ... | 0 |
/**
* Apply the configured iterators from the configuration to the scanner for the specified table name
*
* @param context
* the Hadoop context for the configured job
* @param scanner
* the scanner to configure
* @since 1.6.0
*/
@Override
protecte... | 0 |
import java.util.TreeMap;
TreeMap<Long, Double> vals = new TreeMap<Long, Double>(); | 0 |
import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder;
import java.nio.ByteBuffer;
private static class EmptySeekableByteChannel implements SeekableByteChannel {
@Override
public long position() {
return 0L;
}
@Override
public SeekableByteChannel position(l... | 0 |
tlsStrategy != null ? tlsStrategy : new H2ClientTlsStrategy()); | 0 |
if ( port != null && port.equals( "21" ) )
if ( userInfo != null )
if ( idx == -1 ) | 0 |
import org.apache.sshd.common.util.KeyUtils;
String alg = KeyUtils.getKeyType(key);
buffer.putString(alg);
Signature verif = NamedFactory.Utils.create(session.getFactoryManager().getSignatureFactories(), alg);
bs.putString(alg);
bs.putStrin... | 0 |
if (schedulingFilter.filter(slot, host, task.getTask()).isEmpty()) { | 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 |
/** Tests for {@link AfterEach}. */
assertEquals(
new Instant(9),
AfterEach.inOrder(AfterWatermark.pastEndOfWindow(), AfterPane.elementCountAtLeast(4))
assertEquals(
BoundedWindow.TIMESTAMP_MAX_VALUE,
Repeatedly.forever(
AfterFirst.of(trigger1.getContinuationTrigger()... | 1 |
binarySnapshotStore = createMock(new Clazz<SnapshotStore<byte[]>>() { }); | 0 |
Text row_value = new Text(
Long.toString(((r.nextLong() & 0x7fffffffffffffffl) / 177) % 100000000000l));
BatchWriter bw = connector.createBatchWriter(opts.getTableName(),
bwOpts.getBatchWriterConfig()); | 0 |
import org.apache.beam.sdk.transforms.windowing.TimestampCombiner;
public void testTimestampCombinerEarliest() {
.withTimestampCombiner(TimestampCombiner.EARLIEST))
public void testTimestampCombinerLatest() {
.withTimestampCombiner(TimestampCombiner.LATEST)) | 0 |
/** index of the loop variable. */
private static final int VAR_INDEX = 0;
/** index of the items. */
private static final int ITEMS_INDEX = 1;
/** index of the code to execute. */
private static final int STATEMENT_INDEX = 2;
/**
* Create the node given an id.
*
* @param id... | 0 |
ClusterVersionEntity effectiveClusterVersion = cluster.getEffectiveClusterVersion();
if (effectiveClusterVersion != null) {
commandParams.put(VERSION, effectiveClusterVersion.getRepositoryVersion().getVersion());
// TODO Alejandro, Called First. insert params.version. Called during Rebalan... | 0 |
import junit.framework.TestCase;
ConfigurationMap<String> holder = new TestConfigurationMap( new String[]
ConfigurationMap<String> holder = new TestConfigurationMap( null );
ConfigurationMap<String> holder = new TestConfigurationMap( null );
ConfigurationMap<String> holder = new TestCon... | 0 |
uri2 = folder2.getRoot().toURI() + ".*"; | 0 |
TestSecurityEventListener securityEventListener = new TestSecurityEventListener();
XMLStreamReader securityStreamReader =
inboundXMLSec.processInMessage(xmlStreamReader, null, securityEventListener);
// Check the SecurityEvents
checkSignatureToken(securityEventListe... | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument;
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkNotNull;
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkState;
import org.apache.be... | 0 |
import org.apache.beam.runners.core.construction.SerializablePipelineOptions;
private final SerializablePipelineOptions serializedOptions;
this.serializedOptions = new SerializablePipelineOptions(options);
serializedOptions.get(), doFn,
if ((serializedOptions.get().as(FlinkPipelineOptions.class)) | 0 |
List<String> octetList = new ArrayList<>(Arrays.asList(octets)); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.