Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.primitives.UnsignedBytes;
0
Assert.assertEquals(5, definitionDao.findAll().size());
0
import org.apache.beam.sdk.values.BeamRecordType; protected BeamRecordType beamRecordType; public BeamTextCSVTableIOWriter(BeamRecordType beamRecordType, String filePattern, CSVFormat csvFormat) { this.beamRecordType = beamRecordType; @Overri...
0
ServerContext context = new ServerContext(new SiteConfiguration()); IZooReaderWriter zk = context.getZooReaderWriter();
0
prepare(context, roles, components);
0
@ThreadSafe
0
public VirtualProcessingPipeline() { this.resolver = (SourceResolver)this.manager.lookup(SourceResolver.ROLE + "/Local");
0
* * An entity is an "instance" of a Type. Entities conform to the definition * of the Type they correspond with.
0
package org.apache.aurora.scheduler; import org.apache.aurora.scheduler.events.PubsubEvent.DriverRegistered; import org.apache.aurora.scheduler.events.PubsubEvent.EventSubscriber; import org.apache.aurora.scheduler.storage.Storage.MutableStoreProvider; import org.apache.aurora.scheduler.storage.Storage.MutateWork; impo...
0
import javax.annotation.Nullable; import java.util.List; // Maps from the our unique job identifier (<owner>/<jobName>) to the unique identifier used public Iterable<JobConfiguration> getState() { return Iterables.transform(scheduledJobs.values(), new Function<Pair<String, JobConfiguration>, JobConfigur...
0
import com.twitter.mesos.scheduler.storage.SnapshotStore; private SnapshotStore<Snapshot> snapshotStore; snapshotStore = createMock(new Clazz<SnapshotStore<Snapshot>>() {}); snapshotStore, Entry entry1 = createMock(Entry.class); Entry entry2 = createMock(Entry.class); String frameworkId1 =...
0
* @author $Id: 802ba8cc0fdbfbffc871e3232b822f43338eaaf0 $ @ProviderType
0
import org.apache.accumulo.core.security.thrift.Credential; private static Credential credentials;
1
* Interface for handling null results from Chains. Object has the opportunity to substitute an object for the null and * continue. * * Method called on target returned null. public Object nullMethodResult( Map context, Object target, String methodName, Object[] args ); * Property in target evaluated t...
0
} else { throw new IllegalStateException("Work Item was neither a MapTask nor a SourceOperation");
0
protected static final String CONFIGURATIONS_PROPERTY_ID = "recommendations/blueprint/configurations/"; protected Map<String, Map<String, Map<String, String>>> calculateConfigurations(Request request) { String value = properties.get(property).toString();
0
* * * this.iterations = iterations;
0
else if (action == GET_DECLARED_CONSTRUCTOR_ACTION) { return ((Class) arg1).getDeclaredConstructor((Class[]) arg2); }
0
buffer = session.createBuffer(SshConstants.SSH_MSG_KEX_DH_GEX_GROUP);
0
private final Configuration configuration; private final String name; private final Collection<String> atPath; private final String at;
0
import org.apache.batik.anim.dom.AbstractSVGAnimatedLength; import org.apache.batik.anim.dom.AnimatedLiveAttributeValue; import org.apache.batik.anim.dom.SVGOMAnimatedEnumeration; import org.apache.batik.anim.dom.SVGOMAnimatedLengthList; import org.apache.batik.anim.dom.SVGOMAnimatedNumberList; import org.apache.batik....
0
import org.apache.cocoon.util.AbstractLogEnabled; implements Serviceable, Parameterizable, Initializable, Disposable, JMSConnectionEventListener {
0
ConfigurableBeanFactory mainContext = BeanFactoryUtil.createBeanFactory(env, result, rootContext, true);
0
import java.util.HashMap; import java.util.Map;
0
import org.apache.xml.security.c14n.implementations.Canonicalizer20010315OmitComments; import org.apache.xml.security.c14n.implementations.Canonicalizer11_OmitComments;
0
public void test21WildcardURIMatch() throws Exception { Map result = WildcardMatcherHelper.match("*/**", "samples/blocks/"); assertNotNull(result); assertEquals("", result.get("1")); } public void testEmptyPattern() throws Exception {
0
/* * Copyright 2002, 2003,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 requi...
0
* http://www.apache.org/licenses/LICENSE-2.0
0
public boolean isMaintenanceModeIgnored() { public void setMaintenanceModeIgnored(boolean ignore) {
0
log.debug("deep copying MapFile: {} -> {}", this, other);
0
/** A context that is passed to stateful operators when creating {@code State}. */ /** @return {@code StorageProvider} implementation. */ /** @return {@code SpillTools} for possible externalization of data to local storage. */
0
(String) anyObject(), (String) anyObject(), EasyMock.anyObject(), EasyMock.anyObject())).andReturn(configGroup).anyTimes(); andReturn(new ConfigGroupResponse(1L, "", "", "", "", new HashSet<>(), new HashSet<>())).atLeastOnce();
0
import static org.junit.Assert.*; import java.util.LinkedList; import java.util.List; import org.junit.Test; public class TestConfigurablePluginAttributes { @Test Utils.getInputStream(this, "test7.xml")); @Test Utils.getInputStream(this, "test7.xml")); @Test ...
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
private volatile int defaultTransactionIsolation = PoolableConnectionFactory.UNKNOWN_TRANSACTION_ISOLATION;
0
new String[4], // 1xx // Early Hints - see RFC 8297 setReason(HttpStatus.SC_EARLY_HINTS, "Early Hints");
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...
0
* </p> * </p>
0
* @throws IllegalArgumentException if no property name is specified * @throws IllegalAccessException if the Class or the appropriate * @throws InstantiationException if this Class represents an abstract
0
cfg.setProperty(Property.INSTANCE_ZK_TIMEOUT, "5s"); Text path = new Text(); for (String table : new String[]{RootTable.NAME, MetadataTable.NAME}) { Scanner meta = conn.createScanner(table, Authorizations.EMPTY); meta.setRange(MetadataSchema.CurrentLogsSection.getRange()); outer: for (Entr...
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
import org.apache.beam.model.pipeline.v1.Endpoints;
0
import org.apache.commons.digester3.annotations.handlers.SetTopHandler; @DigesterRule( reflectsRule = SetTopRule.class, handledBy = SetTopHandler.class )
0
Document testDocument = XMLUtils.newDocument();
0
* Default class resolution. Uses ClassLoader.loadClass() to look up classes by name. It also looks in the "java.lang" package * Resolves a class for a given className * * @param className The name of the Class * @return The resulting Class object * @throws ClassNotFoundException If the class c...
0
* <p>Example 1: get the mean of a {@code PCollection} of {@code Long}s. * <p>Example 2: calculate the mean of the {@code Integer}s * <p>See {@link Combine.PerKey} for how this affects timestamps and bucketing. * <p>Returns {@code Double.NaN} if combining zero elements.
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
* <code>../../</code> etc) to the base of the current request or sitemap URI. For * <code>{baselink:SitemapBaseLink}</code> would evaluate to <code>../../</code>. final static Vector returnNames = new Vector() { { add("RequestBaseLink"); add("SitemapBaseLink"); ...
0
@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 ...
0
expect(conf.getInt(eq(METRICS_SEND_INTERVAL), anyInt())).andReturn(10).anyTimes(); expect(metric.value()).andReturn(6.0).once(); expect(record.timestamp()).andReturn(now + 100l).times(2); // time = t4 sink.putMetrics(record); Assert.assertEquals(new Double(1.0), values.next()); Assert.assert...
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
return getIter2().hasNext();
0
* Copyright (C) 2015 Google Inc.
0
BufferedReader reader = (BufferedReader) pop3.retrieveMessageTop(msginfo.number, 0);
0
"Cluster100", "Service100", "Component100", "Host100", State.INSTALLED.toString(), stackId.getStackId(), State.STARTED.toString(), "Cluster100", "Service100", "Component101", "Host100", State.INSTALLED.toString(), stackId.getStackId(), State.STARTED.toString(), "Cluster100", "Service100", "Compo...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestObject.java,v 1.8 2002/02/26 18:08:58 morgand Exp $ * $Revision: 1.8 $ * $Date: 2002/02/26 18:08:58 $ * @version $Id: TestObject.java,v 1.8 2002/02/26 18:08:58 morgand...
0
package org.apache.commons.digester3.annotations;
1
this.fileFilters = new ArrayList<>(); this.fileFilters = new ArrayList<>(); this.fileFilters = new ArrayList<>(fileFilters); this.fileFilters = new ArrayList<>(2);
0
package org.apache.commons.configuration.io; import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.ConfigurationRuntimeException;
0
package org.ognl.test.objects; /** * */ public class GameGenericObject implements GenericObject { public GameGenericObject() { super(); } public int getId() { return 20; } public String getDisplayName() { return "Halo 3"; } public String getHappy() ...
0
SimpleRequestProducer.create(request),
0
if (watermark.equals(BoundedWindow.TIMESTAMP_MAX_VALUE)) {
0
package org.apache.beam.sdk.extensions.euphoria.core.testkit; import org.apache.beam.sdk.extensions.euphoria.core.testkit.junit.AbstractOperatorTest; import org.apache.beam.sdk.extensions.euphoria.core.testkit.junit.Processing;
0
* @version $Id: TestBaseConfiguration.java,v 1.17 2004/10/18 21:38:45 epugh Exp $
0
import org.apache.accumulo.core.client.AccumuloSecurityException; } catch (RuntimeException e) { if (e.getCause() instanceof AccumuloSecurityException) { log.debug("BatchScan " + tableName + " failed, permission error"); } else { throw e; }
1
import org.apache.beam.runners.dataflow.DataflowPipelineRunner;
0
import org.apache.commons.jexl3.internal.Debugger;
1
import static org.mockito.Mockito.never; new ArrayList<Provider<EntityChangeListener>>(), typeSystem, configuration, null); new ArrayList<Provider<EntityChangeListener>>(), typeSystem, configuration, null); verify(typeSystem, never()).defineTypes(Matchers.<TypesDef>any()); ...
0
@SuppressWarnings("synthetic-access") @SuppressWarnings("synthetic-access") try(SshClient client = SshClient.setUpDefaultClient()) { client.start(); try(ClientSession session = client.connect("smx", "localhost", port).await().getSession()) { ...
0
import org.apache.ambari.server.controller.spi.ExtendedResourceProvider; import org.apache.ambari.server.controller.spi.QueryResponse; public class AlertHistoryResourceProvider extends AbstractResourceProvider implements ExtendedResourceProvider{ historyRequest.Predicate = predicate; historyRequest.Pagination ...
0
import static org.junit.Assert.assertArrayEquals; assertArrayEquals(digest, digest2); assertArrayEquals(digest, digest2); assertArrayEquals(digest, digest2); assertArrayEquals(digest, digest2); assertArrayEquals(digest, digest2); assertArrayEquals(digest, digest2); ...
0
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
0
/** * Wait and verify that the channel has been successfully opened. * * @param timeout The number of time units to wait * @param unit The wait {@link TimeUnit} * @throws IOException If failed to verify successfully on time */ /** * Wait and verify that the channel has been...
0
/** * Returns a DefaultFileSystemManager instance (or subclass instance). */ public DefaultFileSystemManager getDefaultFileSystemManager() { return config.getDefaultFileSystemManager(); }
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.Collections; import java.util.HashMap; transient protected Map temporaryAttributes = Collections.EMPTY_MAP; if ( this.temporaryAttributes.size() == 0 ) { this.temporaryAttributes = new HashMap(); } * This includes copies of items and coplet instances. if...
0
public interface StateSpec<StateT extends State> extends Serializable { StateT bind(String id, StateBinder binder); * Given {code coders} are inferred from type arguments defined for this class. Coders which are * already set should take precedence over offered coders. * * @param coders Array of coders in...
0
TestIngest.ingest(c, opts, new BatchWriterOpts()); VerifyIngest.Opts vopts = new VerifyIngest.Opts(); vopts.tableName = tableName; VerifyIngest.verifyIngest(c, vopts, new ScannerOpts()); getCluster().getClusterControl().stopAllServers(ServerType.TABLET_SERVER); getCluster().getClusterControl().s...
0
* A MapReduce that computes a histogram of byte frequency for each file and stores the histogram alongside the file data. The {@link ChunkInputFormat} is used * to read the file data from Accumulo. See docs/examples/README.filedata for instructions.
0
import org.apache.atlas.type.*; import org.apache.atlas.type.AtlasBuiltInTypes.AtlasObjectIdType; private void visitReference(AtlasObjectIdType type, Object val) throws AtlasBaseException { switch (attrType.getTypeCategory()) { case PRIMITIVE: case ENUM: return; ...
0
import org.apache.ambari.server.orm.entities.KerberosPrincipalEntity; import org.apache.ambari.server.serveraction.ActionLog; installAmbariIdentity(ambariServerIdentity, configurations); /** * Performs tasks needed to install the Kerberos identities created for the Ambari server. * * @param ambariS...
0
private static final long serialVersionUID = -5668999920978520157L;
0
/** Create a new {@link RunnerPCollectionView} from the provided components. */ throw new UnsupportedOperationException( String.format("A %s cannot be expanded", RunnerPCollectionView.class.getSimpleName()));
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestFastTreeMap.java,v 1.3 2001/04/21 12:22:30 craigmcc Exp $ * $Revision: 1.3 $ * $Date: 2001/04/21 12:22:30 $ import java.util.TreeMap; * @version $Id: TestFastTreeMap.java,v ...
0
import org.apache.http.annotation.Immutable;
0
public static final String DEFAULT_SSH_VERSION_PREFIX="SSH-2.0-";
0
public void deleteLocks(IZooReaderWriter zk, String path, String txidStr)
0
/** * Copyright 2013 Apache Software Foundation
0
if (painters == null) Area paintedArea = new Area(); for (int i=0; i < count; ++i) { Shape s = painters[i].getPaintedArea(); if (s != null) { paintedArea.add(new Area(s)); } return paintedArea; if (painters == null) Re...
0
final SSLContext sslcontext;
0
@Override @Override
0
* than <code>invokeExactMethod()</code>. * @return The value returned by the invoked method * @return The value returned by the invoked method * @return The value returned by the invoked method * @return The value returned by the invoked method * <code>getAccessibleMethod()</code>.</p> ...
0
private static final Logger LOG = LoggerFactory.getLogger(Users.class);
0
("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI());
0
import org.apache.hc.core5.http.ClassicHttpRequest; * Extracts request path from the given {@link ClassicHttpRequest} protected String getRequestPath(final ClassicHttpRequest request) { public HttpRequestHandler lookup(final ClassicHttpRequest request, final HttpContext context) {
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 static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap;
0
import org.apache.cocoon.util.ClassUtils; * @version CVS $Id: AbstractTextSerializer.java,v 1.3 2003/03/19 17:37:12 sylvain Exp $ Configuration tFactoryConf = conf.getChild("transformer-factory", false); if (tFactoryConf != null) { String tFactoryClass = tFactoryConf.getValue(); ...
0
.setSlaveId( Protos.SlaveID.newBuilder().setValue(t.getAssignedTask().getSlaveId()).build())
0