Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
/* * Copyright 2016-2018 Seznam.cz, a.s.
0
package org.apache.batik.anim.dom; import org.apache.batik.dom.svg.SVGTestsSupport;
0
.setEnvironmentId(components.getOnlyEnvironmentId()) .getDefaultJavaEnvironmentUrl())); .setEnvironmentId(components.getOnlyEnvironmentId()) .getDefaultJavaEnvironmentUrl()));
0
package org.apache.beam.sdk.extensions.sql.interpreter.operator.logical; import org.apache.beam.sdk.extensions.sql.interpreter.BeamSqlFnExecutorTestBase; import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlExpression; import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlPrimitive;
0
ComponentDef definition = AnnotationReader.getDefinition(c, analyzer); if (definition != null) { definition.sortReferences(); definition.prepare(analyzer); String name = "OSGI-INF/" + definition.name + ".xml"; names.add(name); analyzer.getJar().putResource(name, new TagResource(d...
0
* method based on the schema.
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
@FunctionalInterface
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
package org.apache.accumulo.server.test.randomwalk.bulk; import org.apache.accumulo.core.data.Value; import org.apache.accumulo.server.test.randomwalk.State; public class BulkMinusOne extends BulkTest { private static final Value negOne = new Value("-1".getBytes()); @Override protected void runLate...
1
import org.slf4j.Logger;
0
/** BeamRelNode to replace a {@code Project} node. */ /** projects: {@link RexLiteral}, {@link RexInputRef}, {@link RexCall}. */ public BeamProjectRel( RelOptCluster cluster, RelTraitSet traits, RelNode input, List<? extends RexNode> projects, RelDataType rowType) { public Project co...
0
package org.apache.bcel.generic;
1
* import org.apache.commons.ognl.Ognl; * import org.apache.commons.ognl.OgnlException; * ... * try * { * result = Ognl.getValue( expression, root ); * } * catch ( OgnlException ex ) * { * // Report error or recover * } * private Map&lt;String, Object&gt; context = new HashMap&lt;String, Object&gt;()...
0
public void testTableGet() throws InterruptedException, IOException { BigQueryServicesImpl.DatasetServiceImpl services = new BigQueryServicesImpl.DatasetServiceImpl(mockClient, options); services.getTable("project", "dataset", "table");
0
import com.twitter.common.quantity.Amount; import com.twitter.common.quantity.Time; import com.twitter.mesos.gen.TaskEvent; // Add a grace period to prevent race condition where newly-scheduled tasks are not // yet reported by the slave. long taskAgeMillis = System.currentTimeM...
0
import javax.servlet.http.HttpServletRequest; import java.util.Date; import java.util.Set; // Spring Security 4 Change => request.getServletPath() -> request.getPathInfo() this(AtlasAuthorizationUtils.getAtlasResourceType(request.getPathInfo()), "*", AtlasAuthorizationUtils
0
* @param resourceURL url for the resource, as defined in * the resource's xlink:href attribute. If that * resource was found.
1
* @version $Revision$
0
public boolean isBound() { return this.outstream != null; } if (this.outstream != null) { this.outstream.flush(); }
0
buffer.append("interest ops: ");
0
import org.apache.hc.core5.concurrent.CancellableDependency; private final CancellableDependency cancellableDependency; public ExecutionCommand( final AsyncClientExchangeHandler exchangeHandler, final CancellableDependency cancellableDependency, final HttpContext context) { ...
0
StateTag<? super K, WatermarkHoldState> address) { Map<W, WatermarkHoldState> map = context.accessInEachMergingWindow(address); WatermarkHoldState result = context.access(address); && result.getTimestampCombiner().dependsOnlyOnEarliestTimestamp()) { if (result.getTimestampCombiner().dependsOnl...
0
Map<Resource.Type, String> mapIds = new HashMap<>(); Map<Resource.Type, String> mapIds = new HashMap<>(); Map<Resource.Type, String> mapIds = new HashMap<>(); Set<String> expected = new HashSet<>(); Map<Resource.Type, String> mapIds = new HashMap<>(); Set<String> expected = new HashSet<>();
1
* any, must include the following acknowledgement: * Alternately, this acknowledgement may appear in the software itself, * if and wherever such third-party acknowledgements normally appear. * permission of the Apache Software Foundation.
0
* @version $Id$
0
* <p>Concepts: The batch and streaming runners, GroupByKey, sliding windows. * <p>The pipeline reads traffic sensor data from {@literal --inputFile}. * <p>The example is configured to use the default BigQuery table from the example common package * (there are no defaults for a general Dataflow pipeline). * You can...
0
import com.google.common.base.Function; import com.google.common.collect.FluentIterable; import java.io.IOException; import java.nio.channels.ReadableByteChannel; import java.nio.channels.WritableByteChannel; import java.util.Collection; import java.util.List; import org.apache.beam.sdk.io.fs.CreateOptions; class GcsFi...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/pointers/Attic/VariablePointer.java,v 1.5 2002/04/12 02:28:06 dmitri Exp $ * $Revision: 1.5 $ * $Date: 2002/04/12 02:28:06 $ * @version $Revision: 1.5 $ $Date: 2002/04/12 02:28:06 $
0
* @version $Revision$ $Date$
0
package org.apache.cocoon.forms.datatype; import org.apache.cocoon.forms.Constants; * @version CVS $Id: DynamicSelectionListTestCase.java,v 1.1 2004/03/09 13:03:10 cziegeler Exp $ Element datatypeElement = (Element) sourceDoc.getElementsByTagNameNS(Constants.FD_NS, "convertor").item(0); actual.getDocum...
0
// add ambari classes as system classes webAppContext.addSystemClass("org.apache.ambari.server."); webAppContext.addSystemClass("org.apache.ambari.view."); // add as system classes to avoid conflicts and linkage errors webAppContext.addSystemClass("com.sun.jersey.");
0
* Tests whether getKeys(String prefix) is correctly synchronized. */ @Test public void testGetKeysPrefixSynchronized() { config.getKeys("test"); sync.verify(Methods.BEGIN_READ, Methods.END_READ); } /**
0
@Test public void testMergeServices_BothConfigTypesAreNull() throws Exception { File stackRoot = new File(stackRootStr); StackExtensionHelper helper = new StackExtensionHelper(injector, stackRoot); ServiceInfo child = new ServiceInfo(); ServiceInfo parent = new ServiceInfo(); child.setConfigTy...
0
private static final String OSCAR_HTTPS_ENABLE = "org.ungoverned.osgi.bundle.https.enable"; public static final String FELIX_HTTP_NIO = "org.apache.felix.http.nio"; public static final String FELIX_HTTPS_NIO = "org.apache.felix.https.nio"; * Returns <code>true</code> if HTTP is configured to be used ( ...
0
import org.apache.htrace.Trace; import org.apache.htrace.TraceScope; try (TraceScope candidatesSpan = Trace.startSpan("getCandidates")) { try (TraceScope confirmDeletesSpan = Trace.startSpan("confirmDeletes")) { try (TraceScope deleteSpan = Trace.startSpan("deleteFiles")) {
0
* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * - Redistributions of source code must retain the above copyright * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and ...
0
import java.util.List; import org.osgi.framework.Bundle; import org.osgi.service.coordinator.Coordination; import org.osgi.service.coordinator.CoordinationException; import org.osgi.service.coordinator.Participant; public CoordinationImpl(final CoordinatorImpl owner, final long id, final String name, final long tim...
0
/** * REST interface for data discovery using dsl or full text search */ /** * Retrieve data for the specified DSL * @param query DSL query * @param limit limit the result set to only include the specified number of entries * @param offset start offset of the result set (useful for pagination)...
0
private final int connectTimeout; private final TimeUnit tunit; /** * @deprecated (4.3) use {@link BasicNIOConnPool#BasicNIOConnPool(ConnectingIOReactor, * NIOConnFactory, int, TimeUnit)} */ @Deprecated this.connectTimeout = Config.getInt(params, CoreConnectionPNames.CONNECTION_...
0
dbAccessor.executeQuery("UPDATE clusterconfig " + if (Configuration.MYSQL_DB_NAME.equals(dbType)) { dbAccessor.executeQuery("ALTER TABLE clusterconfig MODIFY version BIGINT NOT NULL"); } else { dbAccessor.setNullable("clusterconfig", "version", false); } dbAccessor.executeQuery("AL...
0
ns.addMappingAndRender("generated-command", "http://foo.com/command",node1); ns.addMappingAndRender("directory", "http://foo.com/io/directory", node1);
0
import java.util.function.Function; import javax.servlet.ServletContext; protected Function<ServletContext, Module> getChildServletModule() { return (servletContext) -> Modules.EMPTY_MODULE;
0
properties.setProperty("softMinEvictableIdleTimeMillis", "3000"); assertEquals(3000, ds.getSoftMinEvictableIdleTimeMillis());
0
*{@inheritDoc}
0
import org.apache.accumulo.core.client.security.tokens.PasswordToken;
1
public final void setLocalVariableTable(LocalVariable[] local_variable_table) { this.local_variable_type_table = local_variable_table; }
0
* @version $Revision$
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/core/JellyTag.java,v 1.10 2002/12/11 12:40:54 jstrachan Exp $ * $Revision: 1.10 $ * $Date: 2002/12/11 12:40:54 $ * $Id: JellyTag.java,v 1.10 2002/12/11 12:40:54 jstrachan Exp $ * @ve...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/NodePointerFactory.java,v 1.5 2003/10/09 21:31:40 rdonkin Exp $ * $Revision: 1.5 $ * $Date: 2003/10/09 21:31:40 $ * any, must include the following acknowledgement: * Alte...
0
import org.apache.calcite.jdbc.CalciteConnection; final CalciteConnection connection; final SchemaPlus defaultSchema; connection = JdbcDriver.connect(tableProvider); defaultSchema = JdbcDriver.getDefaultSchema(connection); planner = new BeamQueryPlanner(connection); defaultSchema.add(functionName, S...
0
final boolean isConfigured = mt.isConfigured(); TestCase.assertTrue( "Last update call must have been with configuration", isConfigured); final boolean isConfigured = mt.isConfigured(); TestCase.assertTrue( "Last update call must have been with configuration", isConfig...
0
final Integer max = this.maxPerHostMap.get(route);
0
public final class HttpHost implements Cloneable { public Object clone() throws CloneNotSupportedException { return super.clone(); }
0
private static final Amount<Long, Time> MAX_REGISTRATION_DELAY = Amount.of(1L, Time.MINUTES);
0
import static java.util.Objects.requireNonNull; boolean launchFirst(Function<HostOffer, Optional<TaskInfo>> acceptor) throws LaunchException; Iterable<HostOffer> getOffers(); /** * Encapsulate an offer from a host, and the host's maintenance mode. */ class HostOffer { private final Offer offer; ...
0
import org.codehaus.jackson.annotate.JsonAnySetter; @JsonAnySetter public void setOption(String key, String value) { if (null == options) { options = new HashMap<>(); } options.put(key, value); }}
0
/* * Copyright 2016-2018 Seznam.cz, a.s.
0
import org.apache.hc.core5.http.entity.EntityUtils;
0
if (value == null && getParentInterpolator() != null) { } if (value == null && getParentInterpolator() != null) { * public void registerLocalLookups(ConfigurationInterpolator interpolator) { * Sets the parent interpolator. This object is used if th...
0
* @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
0
* @version CVS $Id: LinkSamplingEnvironment.java,v 1.2 2003/05/12 13:26:17 stephan Exp $ CommandLineContext cliContext,
0
Random random = Utils.getRandomizerInstance();
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
byte[] data = (getClass().getName() + "#" + getCurrentTestName()).getBytes(StandardCharsets.UTF_8); byte[] bytes = data.getBytes(StandardCharsets.UTF_8); os.write(data.getBytes(StandardCharsets.UTF_8)); os.write((command + "\n").getBytes(StandardCharsets.UTF_8)); ...
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 ...
1
/** The connection manager, to get at the scheme registry. */ protected ClientConnectionManager connectionManager; /** The proxy selector to use, or <code>null</code> for system default. */ protected ProxySelector proxySelector; /** * Obtains the proxy selector to use. * * @return t...
0
import org.apache.hc.core5.http.nio.AsyncClientExchangeHandler; private void failPendingCommands(final Exception cause) { for (;;) { final Command command = ioSession.getCommand(); if (command != null) { if (command instanceof ExecutionCommand) { f...
0
package org.apache.beam.sdk.extensions.sql.interpreter.operator.arithmetic; import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlExpression;
0
import java.io.IOException; ByteArrayOutputStream baos = getByteArrayOutputStream(numWrites); @Test public void defaultConstructor() throws IOException { final AtomicInteger numWrites = new AtomicInteger(); ByteArrayOutputStream baos = getByteArrayOutputStream(numWrites); Chunke...
0
* Constrast this with {@link #decorateTransform}. /** * Factory method to create a transforming sorted bag that will transform * existing contents of the specified sorted bag. * <p> * If there are any elements already in the bag being decorated, they * will be transformed by this metho...
0
* Copyright (c) 2004 The Apache Software Foundation. All rights * @version $Id: EnterpriseUnixFTPEntryParser.java,v 1.3 2004/01/01 21:04:18 scohen Exp $
0
// Clean up the bundle context, if necessary. if (info.getContext() != null) { ((BundleContextImpl) info.getContext()).invalidate(); info.setContext(null); } // Clean up the bundle context, if necessary. if (info.getContext...
0
import org.apache.accumulo.core.util.UtilWaitThread; while (!dfs.recoverLease(source)) { log.info("Waiting for file to be closed " + source.toString()); UtilWaitThread.sleep(1000); }
0
* @deprecated (4.0) use {@link #writeTo(OutputStream)}
0
import static java.nio.charset.StandardCharsets.UTF_8; public int hashCode() { return super.hashCode(); } @Override throw new IllegalArgumentException("ConditionalMutation had no conditions " + new String(mut.getRow(), UTF_8));
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
handler = this.getComponentHandler( componentClass, final AbstractComponentHandler handler = this.getComponentHandler( component,
0
@Deprecated
0
", \"firewallRunning\": \"true\", \"firewallName\": \"iptables\", \"transparentHugePage\": \"never\", \"hasUnlimitedJcePolicy\" : true}"; Assert.assertTrue(agentEnv.getHasUnlimitedJcePolicy());
0
* @version $Revision: 1.10 $ $Date: 2004/04/16 23:53:59 $ if (size >= maxSize && removeLRU(header.after)) {
0
* server side action directory path */ protected File serverActionsDir; /** * Server actions directory name */ protected static final String SERVER_ACTIONS_FOLDER_NAME = "server_actions"; /** * Obtain the server side actions directory path. * * @return server side actions directory path ...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/xml/JDOMParser.java,v 1.2 2003/01/11 05:41:27 dmitri Exp $ * $Revision: 1.2 $ * $Date: 2003/01/11 05:41:27 $ * @version $Revision: 1.2 $ $Date: 2003/01/11 05:41:27 $ public Object par...
1
/** * The text of the override style declaration for this element has been * modified. */ void overrideStyleTextChanged(CSSStylableElement e, String text); /** * A property in the override style declaration has been removed. */ void overrideStylePropertyRemoved(CSSStylableElem...
0
* * * * * * Returns the byte array containing the field of row key from the given DataInputStream din. Assumes that din first has the length of the field, followed by * the field itself. throw new IOException(String.format("Expected to read %d bytes but read %d", len, readLen));
0
* * * * * that can be retrieved from the specified URI. * can be created quickly. Form createForm(String uri) throws Exception; * that can be read from the specified source. * * <p>To avoid having to resolve the Source object yourself, * use the {@link #createForm(String)} method....
0
WindowedStream<StreamingWindowedElement<LABEL, Pair<KEY, VALUE>>, DataStream<StreamingWindowedElement<LABEL, Pair<KEY, VALUE>>> mapped return new StreamingWindowedElement<>(wid, Pair.of(key, val)) final KeyedStream<StreamingWindowedElement<LABEL, Pair<KEY, VALUE>>, KEY> keyed; KeySelector<Stre...
0
String handle = (String) properties.get(CLUSTER_HANDLE_PROPERTY_ID); if (handle != null) { viewInstanceEntity.setClusterHandle(Long.valueOf(handle)); } else { viewInstanceEntity.setClusterHandle(null);
0
@Override public void close() { consumerConnector.shutdown(); }
0
public class C14N11Test extends org.junit.Assert { public C14N11Test() throws Exception { dir = new File(base + fs + "data" + fs + "interop" + fs + "xmldsig" + fs + "c14n11"); sks = new KeySelectors.SecretKeySelector("secret".getBytes("ASCII")); @org.junit.Test @org.junit.Test ...
0
package org.apache.beam.sdk.io.range;
0
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; SourceUtil.toSAX(this.manager, source, null, annotationsFilter); EnvironmentHelper.enterProcessor(this, env); /** * @see org.apache.cocoon.Processor#getBeanFactory() */ public ConfigurableListableBeanFact...
0
* @throws IllegalArgumentException if the initial capacity is negative * @throws IllegalArgumentException if the initial capacity is negative
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/converters/BigIntegerConverter.java,v 1.3 2002/07/13 02:22:08 craigmcc Exp $ * $Revision: 1.3 $ * $Date: 2002/07/13 02:22:08 $ * @version $Revision: 1.3 $ $Date: 2002/07/13 02:22:08...
0
package org.apache.xml.security.stax.test; import org.apache.xml.security.stax.impl.util.IVSplittingOutputStream; import org.apache.xml.security.stax.impl.util.ReplaceableOuputStream;
0
package org.apache.hc.core5.testing.nio; import org.apache.hc.core5.function.Callback; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class LoggingExceptionCallback implements Callback<Exception> { public final static LoggingExceptionCallback INSTANCE = new LoggingExceptionCallback(); private f...
0
import org.apache.accumulo.fate.zookeeper.ZooUtil;
0
import org.apache.http.impl.conn.DefaultClientConnectionOperator;
0
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; private NotificationConsumer<EntityNotification> notificationConsumer; notificationConsumer = consumers.iterator().next(); waitForNotification(notificationConsumer, ...
0