Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
public static <E> SortedBag<E> decorateTransform(SortedBag<E> bag, Transformer<? super E, ? extends E> transformer) {
TransformedSortedBag<E> decorated = new TransformedSortedBag<E>(bag, transformer);
@SuppressWarnings("unchecked") // bag is type E
E[] values = (E[]) bag.toArray(); | 0 |
import org.apache.mesos.Protos.Value.Range;
import org.apache.mesos.Protos.Value.Ranges;
import org.apache.mesos.Protos.Value.Scalar;
import org.apache.mesos.Protos.Value.Type; | 0 |
Class<?> cl = loader.loadClass(class_name);
Class<?> r = method.getReturnType(); | 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 ma... | 0 |
import java.lang.reflect.Modifier;
public UberspectImpl(Log runtimeLogger) {
* Returns a class field.
* @param obj the object
* @param name the field name
* @param info debug info
* @return a {@link Field}.
*/
public Field getField(Object obj, String name, JexlInfo info) {
... | 0 |
import org.apache.cocoon.el.objectmodel.ObjectModel; | 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 org.apache.beam.runners.apex.ApexRunnerResult;
import org.apache.beam.sdk.PipelineResult; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/adapters/Attic/TestDoubleListList.java,v 1.4 2003/11/16 22:15:08 scolebourne Exp $
import org.apache.commons.collections.list.AbstractTestList;
import org.apache.commons... | 0 |
super(typeSystem, new TaxonomyResourceDefinition());
@Override
@Override
resourceDefinition.validateCreatePayload(request);
String taxonomyId = getResourceId(request);
@Override
public void updateResourceById(Request request) throws ResourceNotFoundException, InvalidPayloadExcept... | 0 |
import java.util.function.Predicate;
public boolean test(Window input) {
public boolean test(Window input) {
if (predicate.test(this)) { | 0 |
package org.apache.bcel.classfile;
import org.apache.bcel.Const; | 1 |
public static final String[] PATH_PROPERTY_ENV_VARS = new String[] {"$ACCUMULO_HOME", "$ACCUMULO_CONF_DIR"};
public static final String DEFAULT_NAMESPACE = "";
public static final String ACCUMULO_NAMESPACE = "accumulo";
public static final String DEFAULT_NAMESPACE_ID = "+default";
public static final String A... | 1 |
import org.apache.zookeeper.ZKTestCase;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
public class DataTreeUnitTest extends ZKTestCase {
@Before
@After
@Test
Assert.assertFalse("Root node watch not triggered",!watcher.fired); | 0 |
* @see org.apache.bcel.verifier.Verifier | 0 |
"Unable to add %s to %s because the cluster is still being provisioned and the repository for the service is not %s: %s", | 0 |
* @version $Revision: 1.18 $ $Date: 2004/06/03 21:16:56 $
try{
return fclz.getDeclaredMethods();
} catch (SecurityException ex) {
// this means we're in a limite... | 0 |
int cleanAlertNoticesForClusterBeforeDate(Long clusterId, long beforeDateMillis) {
int cleanAlertCurrentsForClusterBeforeDate(long clusterId, long beforeDateMillis) {
int cleanAlertHistoriesForClusterBeforeDate(Long clusterId, long beforeDateMillis) { | 0 |
package org.apache.commons.codec2; | 0 |
XmlIO.<Bird>write()
.toFilenamePrefix(testFilePrefix)
.withRecordClass(Bird.class)
.withRootElement("birds")
.createSink()
.createWriteOperation(options);
public void testBuildXmlWriteTransform() {
XmlIO.Write<Bird> write =
XmlIO.<Bird>wr... | 0 |
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.Precision;
@QueryParam("precision") String precision,
Precision.getPrecision(precision), parseIntStr(limit));
} catch (Precision.PrecisionFormatException pfe) {
throw new BadRequestException("precision should be second... | 0 |
import org.apache.beam.sdk.values.TupleTag;
<InputT extends PInput> Map<TupleTag<?>, PValue> getInputs(PTransform<InputT, ?> transform);
<OutputT extends POutput> Map<TupleTag<?>, PValue> getOutputs(PTransform<?, OutputT> transform); | 0 |
abstract class AbstractXmlMethodRule
extends AbstractXmlRule
{
public AbstractXmlMethodRule( RulesBinder targetRulesBinder, PatternStack patternStack )
{
super( targetRulesBinder, patternStack );
protected final void bindRule( LinkedRuleBuilder linkedRuleBuilder, Attributes attributes )
... | 0 |
/*
* $Id: Parameter.java 44 2007-07-13 20:49:41Z hargrave@us.ibm.com $
*
* Copyright (c) OSGi Alliance (2002, 2006, 2007). All Rights Reserved.
*
* 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 L... | 0 |
LinkOption[] opts = IoUtils.getLinkOptions(false);
try (ByteArrayOutputStream local = new ByteArrayOutputStream()) {
upload(new String[]{ValidateUtils.checkNotNullAndNotEmpty(local, "Invalid argument local: %s", local)}, remote, options);
upload(new Path[]{ValidateUtils.checkNotNull(loc... | 1 |
import java.io.IOException;
import java.io.OutputStream; | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
* @since 2.0 | 0 |
import org.apache.samza.operators.TimerRegistry;
public interface Op<InT, OutT, K> extends Serializable {
TimerRegistry<KeyedTimerData<K>> timerRegistry,
void processElement(WindowedValue<InT> inputElement, OpEmitter<OutT> emitter);
default void processWatermark(Instant watermark, OpEmitter<OutT... | 0 |
List<Coder<?>> coderComponents = new ArrayList<>(); | 0 |
* @param available Extra versions available - may be empty and/or contain only the current one
static SftpVersionSelector fixedVersionSelector(int version) {
return new NamedVersionSelector(Integer.toString(version), (session, current, available) -> version);
static SftpVersionSelector preferredVer... | 0 |
TreeProcessor treeProcessor = new TreeProcessor();
null,
null,
serviceManager,
... | 0 |
import org.apache.beam.sdk.transforms.AppliedPTransform;
import org.apache.beam.sdk.transforms.windowing.BoundedWindow;
import org.apache.beam.sdk.util.WindowingStrategy;
import org.joda.time.Instant; | 0 |
Base64.encodeBase64StringUnChunked(("\000" + username + "\000" + password).getBytes(this.getCharset()))
hmac_md5.init(new SecretKeySpec(password.getBytes(this.getCharset()), "HmacMD5"));
byte[] hmacResult = _convertToHexString(hmac_md5.doFinal(serverChallenge)).getBytes(this.... | 0 |
import org.apache.felix.dm.annotation.api.Stop;
@Stop
public void stop() | 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 |
public static Vertex createVertexWithIdentity(Graph graph,
ITypedReferenceableInstance typedInstance) {
final Vertex vertexWithIdentity = createVertexWithoutIdentity(
graph, typedInstance.getTypeName(), typedInstance.getId());
// add... | 1 |
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import org.apache.ambari.server.controller.internal.URLStrea... | 0 |
Object callStaticMethod( Map<String, Object> context, Class<?> targetClass, String methodName, Object[] args ) | 0 |
* @param useHex if {@code true} then use Base32 Hex alphabet
* @param useHex if {@code true} then use Base32 Hex alphabet
* if {@code true}, then use Base32 Hex alphabet, otherwise use Base32 alphabet
* if {@code true}, then use Base32 Hex alphabet, otherwise use Base32 alphabe... | 0 |
public Object getProperty( Map<String, Object> context, Object target, Object name )
public boolean hasGetProperty( Map<String, Object> context, Object target, Object oname ) | 0 |
if ( props != null )
Enumeration keys = props.keys();
while ( keys.hasMoreElements() )
{
Object key = keys.nextElement();
// check the correct syntax of the key
checkKey( key );
// check uniqueness of key
... | 0 |
@Override
| 1 |
/** Serialization version */
private static final long serialVersionUID = 1L;
| 0 |
import java.util.Objects;
this.lock = Objects.requireNonNull(lock, "No lock"); | 0 |
public final class DOMX509IssuerSerial extends BaseStructure
@Override
@Override | 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 |
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* | 0 |
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.JavaVersion;
import org.apache.commons.lang3.SystemUtils;
static final byte[] STANDARD_SHA224_RESULT_BYTES = new byte[] { -120, -1, -117, 84, 103, 93, 57, -72, -9, 35, 34,
-26, 95, -7, 69, -59, 45, -106, 55, -103, -120, -... | 0 |
Capture<Collection<Long>> requestIdsCapture = EasyMock.newCapture();
Capture<Collection<Long>> requestIdsCapture = EasyMock.newCapture();
Capture<ExecuteActionRequest> actionRequest = EasyMock.newCapture();
Capture<HashMap<String, String>> propertyMap = EasyMock.newCapture();
Capture<Request> reques... | 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 java.util.concurrent.atomic.AtomicBoolean;
import org.apache.aurora.scheduler.storage.Storage.MutableStoreProvider;
import org.easymock.IAnswer;
import static org.easymock.EasyMock.expectLastCall;
import static org.junit.Assert.assertFalse;
@Test
public void testFlushWithReentrantWrites() {
final Atomi... | 0 |
request.setTargetRepositoryVersion(m_repositoryVersion);
request.setTargetRepositoryVersion(m_repositoryVersion);
request.setTargetRepositoryVersion(m_repositoryVersion);
| 0 |
* Copyright (c) OSGi Alliance (2005, 2008). All Rights Reserved.
* <code>StatusVariable</code>s, to switch event sending on or off or to start
* monitoring jobs. The target of the permission is the identifier of the
* <code>switchevents</code>, or the combination of these separated by commas.
* Action names are in... | 0 |
import org.apache.accumulo.core.metadata.MetadataTable;
import org.apache.accumulo.core.metadata.RootTable; | 1 |
import java.lang.annotation.*;
@Retention(RetentionPolicy.CLASS) | 0 |
*
* @param is The input stream that contains the image.
* @param needRawData If true the image returned should not have
* any default color correction the file may
* specify applied.
public Filter handleStream(InputStream is, boolean needRawData);
| 0 |
import org.apache.sshd.common.config.keys.FilePasswordProviderHolder;
ClientIdentityLoaderHolder.loaderHolderOf(Objects.requireNonNull(loader, "No client identity loader")),
FilePasswordProviderHolder.providerHolderOf(Objects.requireNonNull(provider, "No password provider")),
public Defaul... | 0 |
public class WorkspaceRepositoryProvider implements IRepositoryProvider
{
private static WorkspaceRepository repository;
public static WorkspaceRepository getWorkspaceRepository()
{
return repository;
}
public IBundleRepository createRepository( String id, Properties preferences )
... | 0 |
import com.google.common.collect.ImmutableList;
import java.io.ByteArrayOutputStream;
import java.io.NotSerializableException;
import java.io.ObjectOutputStream;
import java.util.List; | 0 |
/**
* The name of the form to validate
*/
/**
* The name of the field on the form to validate
* @since 1.2.0
*/
protected String fieldName = null;
/**
* Construct a <code>Validator</code> that will
* use the <code>ValidatorResources</code>
* passed in to... | 0 |
if ((name != null) && (name.length() > 0) && (name.charAt(0) == '['))
} | 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 |
* You may also want to override the {@link #refresh(File)} method. | 0 |
ClientResponse cr = znodesr.path(path).queryParam("dataformat", encoding)
assertEquals(znodesr.path(path).toString(), zstat.uri); | 0 |
import org.apache.hc.client5.http.methods.RoutedHttpRequest;
import org.apache.hc.core5.annotation.Contract;
import org.apache.hc.core5.annotation.ThreadingBehavior;
import org.apache.hc.core5.http.ClassicHttpRequest;
import org.apache.hc.core5.http.ClassicHttpResponse;
import org.apache.hc.core5.net.URIAuthority;
@Con... | 0 |
private static final Text SPAN_CF = new Text("span"); | 0 |
protected void updated(DictionaryConfiguration cnf) {
m_lang = cnf.lang();
m_words.clear();
for (String word : cnf.words()) {
m_words.add(word); | 0 |
if (!entry.getValue().equals(new Value(Integer.toString(i).getBytes(UTF_8)))) { | 0 |
actionContext.setRepositoryVersion(repoVersionEnt);
repoVersionHelper.addCommandRepositoryToContext(actionContext, osEntity); | 0 |
signaturePartDef.setC14nAlgo(securePart.getC14nMethod());
String digestMethod = securePart.getDigestMethod();
if (digestMethod == null) {
digestMethod = getSecurityProperties().getSignatureDigestAlgorithm();
... | 0 |
* @since 1.4
* @since 2.0
* @since 2.0 | 1 |
context.put(ContextHelper.CONTEXT_REQUEST_OBJECT, this.getRequest());
context.put(ContextHelper.CONTEXT_RESPONSE_OBJECT, this.getResponse());
context.put(ContextHelper.CONTEXT_OBJECT_MODEL, this.getObjectModel());
context.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, this.getContext());
... | 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 com.google.common.collect.ImmutableMap;
import org.apache.aurora.scheduler.discovery.ServiceInstance;
import org.apache.aurora.scheduler.discovery.ServiceInstance.Endpoint;
schedulers.set(ImmutableSet.of(
new ServiceInstance(new Endpoint(host, port), ImmutableMap.of()))); | 0 |
import java.util.Set;
import org.apache.aurora.scheduler.base.TaskGroupKey;
private final BiCache<PreemptionSlot, TaskGroupKey> slotCache;
BiCache<PreemptionSlot, TaskGroupKey> slotCache) {
MutableStoreProvider store) {
TaskGroupKey groupKey = TaskGroupKey.from(pendingTask.getTask());
S... | 0 |
(this, errCode, errParam);
(this, errCode, errParam); | 0 |
if ( layout.equals(service.getEntryLayout(null)) ) { | 0 |
package org.apache.accumulo.cloudtrace.instrument; | 0 |
@Test
public void testMarkSupported() throws Exception {
InputStream r = new CharSequenceInputStream("test", "UTF-8");
assertTrue(r.markSupported());
}
| 0 |
import org.apache.beam.sdk.extensions.gcp.util.RetryHttpRequestInitializer; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/priv/PrivateBean.java,v 1.2 2001/12/15 19:19:24 craigmcc Exp $
* $Revision: 1.2 $
* $Date: 2001/12/15 19:19:24 $
* @version $Revision: 1.2 $ $Date: 2001/12/15 19:19:24 $
* A me... | 0 |
import org.apache.commons.jexl2.introspection.Uberspect;
import org.apache.commons.jexl2.util.Introspector;
JexlContext ctxt = new MapContext(vars);
JexlContext jc = new MapContext();
jc.set("foo", new Foo());
JexlContext ctxt = new MapContext();
JexlContext ctxt = new MapContext... | 0 |
import java.nio.charset.StandardCharsets;
tpc.proxy().createLocalUser(login, "testuser", ByteBuffer.wrap("testpass".getBytes(StandardCharsets.UTF_8)));
ColumnUpdate update = new ColumnUpdate(ByteBuffer.wrap(("cf" + i).getBytes(StandardCharsets.UTF_8)), ByteBuffer.wrap(("cq" + i).getBytes(StandardCharsets.UT... | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger LOG = LoggerFactory.getLogger(CredentialResourceProvider.class);
| 0 |
assertOkResponse(thrift.killTasks(JOB_KEY.newBuilder(), null));
assertOkResponse(thrift.killTasks(JOB_KEY.newBuilder(), ImmutableSet.of(1)));
thrift.killTasks(JOB_KEY.newBuilder(), null));
Response response = thrift.killTasks(JOB_KEY.newBuilder(), null); | 0 |
// Make it 2049, because when full, one slot will go unused, and we
// want a 2048 byte buffer just to have a round number (base 2 that is)
// Need to explicitly notify() so available() works properly
if(__bytesAvailable == 0 && __threaded) {
__queue.notify();
}
| 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 |
* @since 4.0 | 0 |
this.requestCompliance = new RequestProtocolCompliance(config.isWeakETagOnPutDeleteAllowed()); | 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 java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
&& (revision.getWiring() != null))
for (BundleWire bw : revision.getWiring().getRequiredWires(null))
{
... | 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 |
prov.put("instance.name","FooProvider1");
prov.put("instance.name","FooProvider2");
i1.put("instance.name","Subscriber1");
i2.put("instance.name","Subscriber2");
i3.put("instance.name","Subscriber3"); | 0 |
public Reader.DynamicSplitResult requestDynamicSplit(Reader.DynamicSplitRequest request) { | 0 |
import org.apache.ambari.logsearch.config.api.model.loglevelfilter.LogLevelFilter;
import org.apache.ambari.logsearch.config.api.model.loglevelfilter.LogLevelFilterMap;
void createInputConfig(String clusterName, String serviceName, String inputConfig) throws Exception;
/**
* Modifies the input configurati... | 0 |
import org.apache.felix.service.threadio.ThreadIO;
| 0 |
import org.apache.http.annotation.ThreadSafe;
@ThreadSafe
private final Lock lock;
this.lock = new ReentrantLock(); | 0 |
import org.apache.atlas.model.legacy.EntityResult;
EntityResult deleteEntities(List<String> guids) throws AtlasException;
EntityResult deleteEntityByUniqueAttribute(String typeName, String uniqueAttributeName,
String attrValue) throws AtlasException; | 0 |
import org.apache.accumulo.core.security.tokens.PasswordToken;
import org.apache.accumulo.core.security.tokens.SecurityToken; | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.