Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
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
options.setProject(PROJECT_ID); DataflowPipelineJob job = new DataflowPipelineJob(JOB_ID, options, dataflowAggregatorTransforms); DataflowPipelineJob job = new DataflowPipelineJob(JOB_ID, options, dataflowAggregatorTransforms); DataflowPipelineJob job = new DataflowPipelineJob(JO...
0
import org.apache.http.util.Asserts; Asserts.check(!this.shutdown && !this.endOfStream, "Buffer already closed for writing"); Asserts.check(!this.shutdown && !this.endOfStream, "Buffer already closed for writing");
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
public void setContentBufferSize (final int contentBufferSize) { public void setSelectInterval (final long selectInterval) {
0
doc = XMLUtils.read(is, true, false, new org.apache.xml.security.utils.IgnoreAllErrorHandler());
0
import org.apache.accumulo.core.security.tokens.PasswordToken;
0
for (Object beginDependent : beginDependents) { InstanceTime it = (InstanceTime) beginDependent; for (Object endDependent : endDependents) { InstanceTime it = (InstanceTime) endDependent;
0
import com.google.common.base.Joiner; import static org.apache.accumulo.tserver.logger.LogEvents.COMPACTION_FINISH; import static org.apache.accumulo.tserver.logger.LogEvents.COMPACTION_START; import static org.apache.accumulo.tserver.logger.LogEvents.DEFINE_TABLET; import static org.apache.accumulo.tserver.logger.LogE...
0
URL url = BundleCache.getSecureAction().createURL(null, getLocation(), null);
1
/** * * @version $Id$ */ public class TIFFRegistryEntry * any default color correction the file may public Filter handleStream(InputStream inIS, SeekableStream ss =
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
import org.apache.beam.runners.spark.translation.streaming.utils.SparkTestPipelineOptionsForStreaming; public SparkTestPipelineOptionsForStreaming commonOptions = new SparkTestPipelineOptionsForStreaming();
0
public OpenFuture open(int recipient, int rwsize, int rmpsize, Buffer buffer) { throw new IllegalStateException(); }
0
package org.apache.hc.core5.http.nio.pool;
0
* widgets descriptor file path */ private String widgetsDescriptorFilePath; /** * Obtain the path to the (stack-level) widgets descriptor file * * @return the path to the (stack-level) widgets descriptor file */ public String getWidgetsDescriptorFilePath() { return widgetsDescriptorFilePath...
0
import org.apache.cocoon.portal.coplet.CopletInstance; public ContentItem(CopletInstance cid, boolean content) {
0
@Test
0
import com.twitter.aurora.scheduler.storage.entities.IScheduledTask; IScheduledTask task1 = createTask("foo", "id1", 1, 1, 1); IScheduledTask task2 = createTask("foo", "id2", 1, 1, 1); ScheduledTask builder = createTask("foo", "id1", 3, 3, 3).newBuilder(); builder.getAssignedTask().getTask().setProducti...
0
* @version $Id$
0
iterEnv = new TabletIteratorEnvironment(context, IteratorScope.majc, !propogateDeletes, acuTableConf, getMajorCompactionReason()); iterEnv = new TabletIteratorEnvironment(context, IteratorScope.minc, acuTableConf);
0
protected static final Logger log = Logger.getLogger(SimpleMacIT.class);
0
* <p>{@link com.google.cloud.dataflow.sdk.options.PipelineOptions} encapsulates the various
0
public interface Params { String clusterName(); String serversetPath(); default List<Class<? extends Module>> extraModules() { return ImmutableList.of(); } default String statsUrlPrefix() { return ""; } } public static void main(Params params, Module appEnvironmentModule) {...
0
/** * IOReactorStatus represents an internal status of an I/O reactor. */ /** * The reactor is inactive / has not been started */ /** * The reactor is active / processing I/O events. */ /** * Shutdown of the reactor has been requested. */ /** * The rea...
0
* Copyright 2002-2004,2006 The Apache Software Foundation * If the array of predicates is empty, then this predicate returns true. * If the collection of predicates is empty, then this predicate returns true. * If the array of predicates is empty, then this predicate returns false. * If the collec...
0
private final Set<String> resourceNames = new HashSet<>(); this.pkPropertyIds = new HashSet<>(getKeyPropertyIds().values()); Set<Resource> resourceSet = new HashSet<>(); Set<ViewInstanceEntity> instanceDefinitions = new HashSet<>(); Map<Resource.Type, String> keyPropertyIds = new HashMap<>(); Set...
0
public void createAmbariResources(ClusterTopology topology, String clusterName, SecurityType securityType, String repoVersionString, Long repoVersionId) { if (null == repoVersionString && null == repoVersionId) { Long defaultRepoVersionId = null; defaultRepo...
0
import cz.seznam.euphoria.shadow.com.google.common.base.Preconditions; import cz.seznam.euphoria.shadow.com.google.common.collect.AbstractIterator;
0
log.info("Accumulo data dirs are " + Arrays.asList(ServerConstants.getConfiguredBaseDirs(ServerConfiguration.getSiteConfiguration()))); log.fatal("It appears the directories " + Arrays.asList(ServerConstants.getConfiguredBaseDirs(ServerConfiguration.getSiteConfiguration())) + " were previously i...
0
OfflineResolver.register( "http://www.w3.org/Signature/2002/04/xml-stylesheet.b64", "data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/xml-stylesheet.b64", "text/plain");
0
return consumers.computeIfAbsent(endpoint, (LogicalEndpoint unused) -> SettableFuture.create());
0
import java.util.concurrent.CountDownLatch; import com.yahoo.zookeeper.server.ServerStats; private static final int CONNECTION_TIMEOUT=30000; private CountDownLatch clientConnected; ServerStats.registerAsConcrete(); ServerStats.unregister(); clientConnected=null; private ZooKeeper createClie...
0
import org.apache.accumulo.core.security.thrift.TCredentials; private TCredentials credentials; public ConnectorImpl(Instance instance, TCredentials cred) throws AccumuloException, AccumuloSecurityException { if (!iface.authenticate(Tracer.traceInfo(), credentials))
1
* * */ ArrayConverter dateArrayConverter = new ConvertUtilsBean(), new ConvertUtilsBean(), new PropertyUtilsBean()); assertEquals("Set property failed (...
0
request.setClusters(null);
0
expect(m_vdfXml.getClusterSummary(EasyMock.anyObject(Cluster.class), EasyMock.anyObject(AmbariMetaInfo.class))).andReturn(
0
import org.apache.accumulo.core.volume.VolumeConfiguration; FileSystem fs = VolumeConfiguration.getVolume(dir, CachedConfiguration.getInstance(), ServerConfigurationUtil.getConfiguration(instance)).getFileSystem();
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 ...
0
* @version CVS $Id: SessionContextProvider.java,v 1.3 2003/05/23 12:13:13 cziegeler Exp $ String ROLE = SessionContextProvider.class.getName();
0
if (kke == null) { KerberosPrincipalEntity kpe = kerberosPrincipalDAO.find(principal.getPrincipal()); if(kpe == null) { kpe = new KerberosPrincipalEntity(principal.getPrincipal(), principal.isService(), principal.getCacheFile()); kerberosPrincipalDAO.create(kpe); } Kerbe...
0
assertEquals( AttributeDefinition.PASSWORD, AD.toType( "Password" ) );
0
final Logger logger, final Context context, final ServiceManager serviceManager,
0
// Simulate a KILLED ack from the executor. @Test public void testKillNoTasksDoesNotThrow() throws Exception { control.replay(); buildScheduler(); scheduler.killTasks(Query.roleScoped("role_absent"), OWNER_A.getUser()); }
0
return setNamespaceAndReturn( new CallMethodRule(targetOffset, methodName, paramCount, paramTypes, useExactMatch));
0
import org.apache.sshd.util.test.JUnitTestSupport; public class BuiltinCompressionsTest extends JUnitTestSupport {
0
@Override @Override @Override @Override @Override
0
// **** This has been changed due to BEANUTILS-449 **** //convertValueToType(converter, "(B)", Integer.class, localizedDecimalValue, localizedDecimalPattern, expectedValue);
0
import com.google.common.collect.Maps; import org.apache.aurora.common.util.testing.FakeBuildInfo; import static org.apache.aurora.common.util.testing.FakeBuildInfo.generateBuildInfo; snapshotStore = new SnapshotStoreImpl( generateBuildInfo(), clock, storageUtil.storage); metadata.setDet...
0
package com.google.cloud.dataflow.examples.cookbook;
0
private static final Map<ClassLoader, DocumentBuilder[][]> DOCUMENT_BUILDERS = Collections.synchronizedMap(new WeakHashMap<ClassLoader, DocumentBuilder[][]>()); public static DocumentBuilder createDocumentBuilder(boolean validating) throws ParserConfigurationException { return createDocumentBuil...
0
* @deprecated see {@link java.io.DataInputStream#readLine()} This method will be removed when it is * removed from the DataInput interface this class implements (which will probably never happen).
0
import org.apache.sshd.common.util.Transformer;
0
// add auto instance configurations if required addAutoInstanceDefinition(viewDefinition); private void addAutoInstanceDefinition(ViewEntity viewEntity) { ViewConfig viewConfig = viewEntity.getConfiguration(); String viewName = viewEntity.getViewName(); AutoInstanceConfig autoInstanceCon...
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.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
0
* @param image the image to distort * @param offsets the displacement map * @param xChannel defines the channel of off whose values will be * on X-axis operation * @param yChannel defines the channel of off whose values will be * @param rh the rendering hints * @param ...
1
} catch (final NullPointerException ex) {}
0
@Override @Override
0
import org.apache.cocoon.blocks.servlet.BlockConstants; import org.apache.cocoon.blocks.servlet.ServiceManagerRegistry;
0
/* * We suppress the "try" warning here because the close() method's signature * allows it to throw InterruptedException which is strongly advised against * by AutoCloseable (see: http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html#close()). * close() will never throw an InterruptedException but t...
0
import cz.seznam.euphoria.core.annotation.audience.Audience; @Audience(Audience.Type.INTERNAL)
0
public final class ASTIntegerLiteral extends JexlNode implements JexlNode.Literal<Integer> {
0
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @SuppressFBWarnings(value = "PATH_TRAVERSAL_IN", justification = "process runs in same security context as admin who provided path")
0
this.services = new EnumMap<>(Service.class);
0
* <p>The parameters are described via the external xml * @cocoon.sitemap.component.documentation * This is the action used to validate Request parameters. *
0
storageUtil.expectOperations();
0
public static String asString(InputStream pStream) throws IOException { public static String asString(InputStream pStream, String pEncoding)
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
package org.apache.commons.codec;
1
public int read() throws IOException { public int read(byte[] b, int off, int len) throws IOException { public int read(byte[] b) throws IOException { public int available() throws IOException { public void close() throws IOException {
0
package org.apache.cocoon.auth.impl; import org.apache.cocoon.auth.SecurityHandler;
0
.setRowSchema(CalciteUtils.toBeamSchema(getRowType()));
0
import static org.junit.Assert.assertFalse; public void testUpgradeBehaviorTag() throws JAXBException { // given String xml = "<property>\n" + " <name>prop_name</name>\n" + " <value>prop_val</value>\n" + " <on-ambari-upgrade add=\"false\" change=\"true\" delete=\"true\"/>\n" + ...
0
/** * The {@link HostPredicate} interaface is used as a way to pass a custom * implementation into one of the many * {@link MaintenanceStateHelper#isOperationAllowed(org.apache.ambari.server.controller.spi.Resource.Type, Service)} * methods. */ public static interface HostPredicate { /** * G...
0
* the response objects can be {@code null} if there is no incoming or * Otherwise returns {@code null}. * @return HTTP request, if available, {@code null} otherwise. * @return HTTP response, if available, {@code null} otherwise.
0
import org.apache.cocoon.portal.services.aspects.PortalManagerAspect; import org.apache.cocoon.portal.services.aspects.PortalManagerAspectPrepareContext; import org.apache.cocoon.portal.services.aspects.PortalManagerAspectRenderContext; * @see org.apache.cocoon.portal.services.aspects.PortalManagerAspect#prepare(o...
0
import java.nio.charset.StandardCharsets; sks = new KeySelectors.SecretKeySelector("secret".getBytes(StandardCharsets.US_ASCII));
0
import org.apache.batik.util.Platform; Toolkit toolkit = Toolkit.getDefaultToolkit(); Cursor moveCursor = Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR); if (Platform.isOSX) { try { Image img = toolkit.createImage (CursorManager.class.getResource("...
0
* * Note that this is the original URI, and is * unaffected by redirects. * * To find the final URI after any redirects have been processed, * please see the section entitled * <a href="http://hc.apache.org/httpcomponents-client/tutorial/html/fundamentals.html#d4e205">HTTP executio...
0
private Map<String, String> hostAttributes = new HashMap<>(); Set<String> hostNames = new HashSet<>(); List<HostEntity> hostEntities = new ArrayList<>(); HashSet<State> validStates = new HashSet<>(); HashSet<State> invalidStates = new HashSet<>(); Set<String> hostNames = new HashSet<>(); HashM...
1
* Default {@link org.apache.http.nio.reactor.IOEventDispatch} implementation * that supports both plain (non-encrypted) and SSL encrypted client side HTTP * connections.
0
import org.apache.http.HttpConnection; import org.apache.http.conn.HttpSSLConnection; import org.apache.http.protocol.ExecutionContext; HttpConnection conn = (HttpConnection) context.getAttribute( ExecutionContext.HTTP_CONNECTION); if (conn instanceof HttpSSLConnection) { ...
0
import org.apache.sshd.common.Factory; Factory<Command> getShellFactory(); List<NamedFactory<Command>> getSubsystemFactories();
0
XMLUtils.read(input.getOctetStream(), false, secureValidation);
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
public class AtlasServerIdSelectorTest { String atlasServerId = AtlasServerIdSelector.selectServerId(configuration); AtlasServerIdSelector.selectServerId(configuration); AtlasServerIdSelector.selectServerId(configuration);
0
/** A {@link BigQuerySourceBase} for reading BigQuery tables. */ static <T> BigQueryTableSource<T> create( SerializableFunction<SchemaAndRecord, T> parseFn) { TableReference table = setDefaultProjectIfAbsent( options.as(BigQueryOptions.class), BigQueryIO.JSON_FACTORY....
1
import com.fasterxml.jackson.databind.Module; import org.apache.beam.sdk.util.common.ReflectHelpers; out.writeUTF(createMapper().writeValueAsString(pipelineOptions)); this.pipelineOptions = createMapper().readValue(s, PipelineOptions.class) /** * Use an {@link ObjectMapper} configured with any {@link Modul...
0
package org.apache.beam.sdk.io; import org.apache.beam.sdk.coders.Coder; import org.apache.beam.sdk.coders.Coder.Context; import org.apache.beam.sdk.coders.StringUtf8Coder; import org.apache.beam.sdk.coders.VoidCoder; import org.apache.beam.sdk.io.Read.Bounded; import org.apache.beam.sdk.options.PipelineOptions; import...
0
import com.fasterxml.jackson.databind.node.ObjectNode; public void testStatusOfActiveServerIsReturned() { ObjectNode entity = (ObjectNode) response.getEntity(); assertEquals(entity.get("Status").asText(), "ACTIVE"); public void testResourceGetsValueFromServiceState() { ObjectNode entity ...
0
public ServletConfiguration(final Servlet servlet) public ServletConfiguration(final ServletConfig config) protected Object getPropertyInternal(final String key) final Enumeration<String> en = config.getInitParameterNames();
0
if ("true".equals(System.getProperty("org.apache.accumulo.test.functional.useCredProviderForIT"))) { cfg.setUseCredentialProvider(true); }
0
package com.twitter.mesos.scheduler.httphandlers; import java.util.Map; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import com.google.common.collect.ImmutableMap; import com.google.inject.Inject; import com.twitte...
0
import org.apache.cocoon.spring.ResourceUtils;
0
import org.apache.accumulo.server.security.SecurityUtil; SecurityUtil.serverLogin(); Instance instance = HdfsZooInstance.getInstance(); public SimpleGarbageCollector() {}
0
import org.osgi.converter.Converter; * Specify the converter to be used by the code, if an alternative, adapted, * converter is to be used. * @param converter The converter to use. * @return This Deserializing object to allow further invocations on it. Deserializing<T> with(Converter converter);
0
import static com.google.common.base.Charsets.UTF_8; log.error(" saw = " + new String(entry.getValue().get()) + " expected = " + new String(value, UTF_8));
0
return nm(row, cf, cq, new Value(value.getBytes(Constants.UTF8)));
0
import java.lang.reflect.Type; import javax.annotation.Nullable; * <p>Implementations of this interface are generated at runtime to map Row fields back into * objet fields. /** * Sets the specified field on object to value. */ /** * Returns the name of the field. */ String name(); /** * Retur...
0