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 may ...
0
public BeamQueryPlanner(BeamSqlEnv sqlEnv, SchemaPlus schema) { FrameworkConfig config = Frameworks.newConfigBuilder() .parserConfig(SqlParser.configBuilder().setLex(Lex.MYSQL).build()) .defaultSchema(schema) .traitDefs(traitDefs) .context(Contexts.EMPTY_CON...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/PropertyUtils.java,v 1.35 2002/12/01 22:38:27 rdonkin Exp $ * $Revision: 1.35 $ * $Date: 2002/12/01 22:38:27 $ * @version $Revision: 1.35 $ $Date: 2002/12/01 22:38:27 $ * to co...
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger LOG = LoggerFactory.getLogger(BigQueryIOTranslator.class); // If user does not specify a project we assume the table to be located in the project // that owns the Dataflow job. String projectIdFromOptio...
0
* href="../datasources/package-summary.html">jdbc2pool package documentation</a> * @version $Id: DriverAdapterCPDS.java,v 1.3 2003/08/13 12:17:36 dirkv Exp $
0
public static String getDirectory(String subDir) { final String userDir = System.getProperty("user.dir"); return getTestFilePath(userDir, subDir, ""); }
0
* HTTP protocol processor is a collection of protocol interceptors that * implements the 'Chain of Responsibility' pattern, where each individual * protocol interceptor is expected to work on a particular aspect of the HTTP * protocol the interceptor is responsible for. * <p> * Usually the order in which inte...
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
cookie_value = ObjectModelHelper.getCookie(objectModel, cookie_name, -1).getValue(); // ignore }
0
import org.apache.http.params.HttpParamsLinker; this.httpexecutor = new HttpRequestExecutor(); HttpParamsLinker.link(request, params); HttpParamsLinker.link(response, params);
0
import org.apache.sshd.util.test.NoIoTestCase; import org.junit.experimental.categories.Category; @Category({ NoIoTestCase.class })
0
import java.util.ArrayList; static abstract class GetRanges<K, V> extends InputFormatBase<K,V> { public static List<Range> getRanges(Configuration conf) throws IOException { return InputFormatBase.getRanges(conf); } }; @Test public void testSetRanges() throws IOException { JobContext job = C...
0
|| (ap.handleAuthentication(this, authPacket.getAuth()) != KeeperException.Code.OK)) { KeeperException.Code.AUTHFAILED.intValue()); KeeperException.Code.OK.intValue());
0
import java.util.Iterator; import java.util.List; import org.apache.cocoon.configuration.PropertyProvider; protected String sitemapUri; protected List directories; protected boolean useDefaultIncludes; protected Properties globalSitemapVariables; protected MutableSettings createSettings() { ...
0
import org.apache.cocoon.objectmodel.ObjectModel; import org.apache.cocoon.xml.NamespacesTable; ObjectModel objectModel, ExecutionContext executionContext, MacroContext macroContext, NamespacesTable namespaces, ev = ev.execute(consumer, objectModel, ...
0
import static org.apache.felix.http.sslfilter.internal.SslFilterConstants.HDR_X_FORWARDED_PORT; @Test public void test_getServerPort() throws Exception { HttpServletRequest req = Mockito.mock(HttpServletRequest.class); SslFilterRequest sreq = new SslFilterRequest(req, null); ...
0
/** * The Ephemeral TLS Diffie-Hellman (DH) key size. * Supported from Java 8. */ @Markdown(description = "The Ephemeral TLS Diffie-Hellman (DH) key size. Supported from Java 8.") public static final ConfigurationProperty<Integer> TLS_EPHEMERAL_DH_KEY_SIZE = new ConfigurationProperty<>( "security.ser...
0
public static final ScannerOpts SOPTS = new ScannerOpts(); public static final BatchWriterOpts BWOPTS = new BatchWriterOpts();
0
package org.apache.batik.gvt.filter; import org.apache.batik.ext.awt.image.GraphicsUtil;
0
import org.apache.beam.sdk.transforms.DoFn; /** * Category tag for validation tests which utilize splittable {@link ParDo} with a {@link * DoFn.BoundedPerElement} {@link DoFn}. */ public interface UsesBoundedSplittableParDo {}
0
PTransformTranslation.toProto(transform, Collections.emptyList(), SdkComponents.create()) transform, Collections.emptyList(), SdkComponents.create())
0
import org.apache.beam.sdk.transforms.windowing.BoundedWindow; import org.apache.beam.sdk.values.TimestampedValue; import org.joda.time.Duration; import org.joda.time.Instant; import org.junit.Assert;
0
operator.setup(); operator.teardown();
0
import java.util.concurrent.Future; import org.apache.hc.core5.concurrent.FutureCallback; * Multi-core I/O reactor that can ask as both {@link ConnectionInitiator} * and {@link ConnectionAcceptor}. Internally this I/O reactor distributes newly created * I/O session equally across multiple I/O worker threads for a mo...
0
* </p>
0
//private String bundleVersion; private String importPackage; /* */ if (getImportPackage() != null) { entries.put("Import-Package", getImportPackage()); } /* */ public String getImportPackage() { return importPackage; } public void setImportPacka...
0
import org.apache.ambari.server.ldap.LdapModule; Injector injector = Guice.createInjector(new ControllerModule(), new MpackCheckerAuditModule(), new LdapModule());
0
@Override
0
public static <J, K, U, V> TransformedMap<J, K, U, V> transformingMap(final Map<K, V> map, final Transformer<? super J, ? extends K> keyTransformer, final Transformer<? super U, ? extends V> valueTransformer) { protected TransformedMap(final Map<K, V> map, final Transformer<? super J, ? ...
0
import org.apache.commons.configuration.event.ConfigurationErrorListener; import org.apache.commons.configuration.event.ConfigurationListener; import org.apache.commons.configuration.event.EventSource; import org.easymock.EasyMock; /** * Tests asEventSource() if the passed in object implements this interface....
0
public static class TestContext extends MapContext implements JexlContext.NamespaceResolver {
0
import com.google.common.collect.ImmutableSet; ClassType(TypeSystem typeSystem, String name, String description, ImmutableSet<String> superTypes, int numFields) { ClassType(TypeSystem typeSystem, String name, String description, ImmutableSet<String> superTypes, AttributeInfo... fields)
0
while (n != null) { getElementsByTagName(n, name, result); n = n.getNextSibling(); } while (n != null) { getElementsByTagNameNS(n, namespaceURI, localName, result); n = n.getNextSibling(); }
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 u...
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.accumulo.core.client.impl.Table; public static TabletLocator getTabletLocator(Class<?> implementingClass, Configuration conf, Table.ID tableId) throws TableNotFoundException { public static Map<String,Map<KeyExtent,List<Range>>> binOffline(Table.ID tableId, List<Range> ranges, Instance instance, C...
1
/** * TODO Add javadoc * * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> * @version $Rev$, $Date$ */
0
import org.apache.batik.ext.awt.g2d.GraphicContext;
0
/** * Abstract {@link NHttpMessageWriter} that serves as a base for all message * writer implementations. * * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a> * * @version $Revision$ */ /** * Creates an instance of this class. * * @param buffer the session output buffer. *...
0
import org.apache.beam.sdk.testing.TestPipeline; public final TestPipeline p = TestPipeline.create();
0
// for debugging @Override public String toString() { return super.toString() + " ACK " + _blockNumber; }
0
if(layout != null) { } clone.layout.setParent(clone);
0
this.charSequence = charSequence != null ? charSequence : ""; if (length < 0 || offset < 0 || offset + length > array.length) { int dest = (int)Math.min(charSequence.length(), idx + n);
0
import org.apache.hadoop.metadata.repository.typestore.GraphBackedTypeStore; this.typeStore = GraphBackedTypeStore.class;
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
final byte[] bytes = "Message content".getBytes(Consts.ASCII.name()); final InputStream content = new ByteArrayInputStream(bytes); final BasicHttpEntity httpentity = new BasicHttpEntity(); final byte[] bytes = "Message content".getBytes(Consts.ASCII.name()); final InputStream con...
0
log.debug("{} with {} iterations and {} threads and cache invalidates {}% took {} second(s)", tableConf, iterations, numThreads, ((1. / randomMax) * 100.), (end - start) / 1000);
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ArrayListMultimap; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ListMultimap; import org.apache.beam.vendor.guava.v26_0...
0
import org.apache.accumulo.core.clientImpl.ClientConfConverter; import org.apache.accumulo.core.clientImpl.ConnectorImpl; import org.apache.accumulo.core.clientImpl.Credentials; import org.apache.accumulo.core.clientImpl.Namespace; import org.apache.accumulo.core.clientImpl.thrift.TableOperationExceptionType; import or...
0
import org.apache.http.NotImplementedException; @Test(expected = NotImplementedException.class)
0
if (c.trigger().areAllSubtriggersFinished()) { for (ExecutableTrigger<W> subTrigger : c.trigger().unfinishedSubTriggers()) { for (ExecutableTrigger<W> subTrigger : c.trigger().subTriggers()) {
0
@SuppressWarnings("deprecation") KerberosToken krbToken = new KerberosToken(principal, rootUser.getKeytab(), true); token = krbToken; @SuppressWarnings("deprecation") KerberosToken krbToken = new KerberosToken(systemUser.getPrincipal(), systemUser.getKeytab(), true); Connector conn =...
0
public enum BuiltinDigests implements DigestInformation, NamedFactory<Digest> { md5(Constants.MD5, "MD5", 16), sha1(Constants.SHA1, "SHA-1", 20), sha256(Constants.SHA256, "SHA-256", 32), sha384(Constants.SHA384, "SHA-384", 48), sha512(Constants.SHA512, "SHA-512", 64); private final String algor...
0
.withIsReady(elementsAllowed::get)
0
values.put(CSSConstants.CSS_BLOCK_VALUE, values.put(CSSConstants.CSS_COMPACT_VALUE, values.put(CSSConstants.CSS_INLINE_VALUE, values.put(CSSConstants.CSS_INLINE_TABLE_VALUE, values.put(CSSConstants.CSS_LIST_ITEM_VALUE, values.put(CSSConstants.CSS_MARKER_VALUE, val...
1
/* import java.util.Enumeration; public Enumeration getResources(String name) { try { return getClass().getClassLoader().getResources(name); } catch (IOException ex) { return null; } }
1
* * * /**
1
import org.apache.felix.dm.Component; Component consumer = m.createComponent().setImplementation(c).add(m.createBundleDependency().setCallbacks("add", "remove")); Component consumerWithFilter = m.createComponent().setImplementation(new FilteredConsumer(e)).add(m.createBundleDependency().setFilter("(Bund...
0
public void close() throws IOException { reader.close(); }
0
import java.io.IOException; FileUtils.deleteQuietly(reportDir); if (!reportDir.mkdirs()) { throw new IOException("Unable to (re-)create " + reportDir);
0
import com.google.common.base.Joiner;
0
import org.osgi.framework.Bundle; import org.osgi.framework.BundleException; private Map props; props = new HashMap(); public void start() throws BundleException { framework = new Felix(props, null); framework.start(); while(framework.getState()!=Bundle.ACTIVE) { framework.stopAnd...
0
import org.apache.accumulo.core.trace.TraceSamplers; import org.apache.htrace.impl.ProbabilitySampler; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @SuppressFBWarnings(value = "PATH_TRAVERSAL_IN", justification = "path provided by admin") ProbabilitySampler sampler = TraceSamplers.probabilitySamp...
0
import static com.google.cloud.dataflow.sdk.util.common.Counter.AggregationKind.SUM; import com.google.cloud.dataflow.sdk.util.common.Counter; public static final String SOURCE_NAME = "GroupingShuffleSource"; @Nullable final CounterSet.AddCounterMutator addCounterMutator; @Nullable final String operationName; /...
0
throw new IllegalStateException("An exception occurs during factory initialization", e);
0
import org.junit.Assert;
0
public SampleTransform() throws InvalidTransformException {
0
* Java byte code version. */ private int m_version; /** m_version = ck.getClassVersion(); public int getClassVersion() { return m_version; }
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 ...
1
import org.apache.accumulo.core.data.TabletID; * @deprecated since 1.7.0 use {@link #getTablet()} @Deprecated public abstract org.apache.accumulo.core.data.KeyExtent getExtent(); /** * @return tablet the scan is running against, if a batch scan may be one of many or null * @since 1.7.0 */ public ab...
1
* Copyright 2003-2005 The Apache Software Foundation
0
import org.apache.batik.dom.svg.XMLBaseSupport; String baseURI = XMLBaseSupport.getXMLBase(ref);
0
import org.apache.felix.ipojo.util.DependencyMetadataHelper; int policy = DependencyMetadataHelper.getPolicy(service); Comparator cmp = DependencyMetadataHelper.getComparator(service, getCompositeManager().getGlobalContext()); Comparator cmp = DependencyMetadataHelper.getComparator(imp, getC...
0
List<String> counterValues = new ArrayList<String>(); for (Exception ex : exceptions) { counterValues.add(ex.getMessage()); } assertTrue("" + counterValues, exceptions.isEmpty());
0
import org.apache.atlas.model.typedef.AtlasStructDef;
0
"at least one between 'className', 'attributeName' or 'creationFactory' has to be specified" );
0
import org.apache.beam.runners.core.construction.SerializablePipelineOptions; private final SerializablePipelineOptions serializedOptions; this.serializedOptions = new SerializablePipelineOptions(pipelineOptions); serializedOptions.get(), restored.getValue())); source.createReader(serial...
0
public void removed(ServerSession session, Path path, boolean isDirectory, Throwable thrown) throws IOException {
0
/* * Copyright 2005 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 ...
1
public class ByteOrderUtilsTest { return ByteOrderUtils.parseByteOrder(value);
0
* * package org.apache.commons.vfs2.provider.ftp.test; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemManager; import org.apache.commons.vfs2.FileSystemOptions; import org.apache.commons.vfs2.impl.DefaultFileSystemManager; import org.apache.commons.vfs2.provider.ftp.FtpFileProvide...
1
Job job = Job.getInstance(getConf());
0
import org.apache.beam.sdk.transforms.OldDoFn; * {@link OldDoFn.ProcessContext} for {@link FlinkMultiOutputDoFnFunction} that supports OldDoFn<InputT, OutputT> doFn,
0
import org.apache.beam.sdk.transforms.windowing.BoundedWindow; import org.apache.beam.sdk.transforms.windowing.GlobalWindow; public void processElement(@Element T element, OutputReceiver<T> out, BoundedWindow window) { String message = prefix + element.toString(); if (!(window ...
0
public class Usage { int m_stack = 0; * List of used objects. Object[] m_objects; * Increment the statck level. */ public void inc() { m_stack++; } /** * Decrement the stack level. * @return ...
0
public interface Storage<T> {
0
} else if (this.queryParams != null && !this.queryParams.isEmpty()) {
0
* @version $Revision$ $Date$
0
@SuppressWarnings("unused") @SuppressWarnings("unused") @SuppressWarnings("unused") @SuppressWarnings("unused")
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...
0
org.apache.commons.logging.LogFactory.getLog(X509SKIResolver.class);
0
package org.apache.xml.security.test.dom.c14n.helper;
0
import java.util.Optional; (task, jobState, storeProvider) -> Optional.empty();
0
* </p> * </p> * </p> * </p> * </p> * </p>
0
/* ==================================================================== * Copyright (c) 2001-2004 The Apache Software Foundation. All rights * @version $Id: BulkTest.java,v 1.9 2004/01/14 21:34:31 scolebourne Exp $
0
public void process(ProcessContext context, OffsetRangeTracker tracker) for (long i = tracker.currentRestriction().getFrom(); tracker.tryClaim(i); ++i) {
0
* Helper to create a context. In the current implementation of JEXL, there * is one implementation of JexlContext - {@link HashMapContext}, and there * is no reason not to directly instantiate {@link HashMapContext} in your * own application. * @version $Id: JexlHelper.java,v 1.4 2004/06/12 23:53:17 tobrien ...
0
import java.util.Collections; protected String path; public ScpCommand(String command) { this.name = command; log.debug("Executing command {}", command); String[] args = command.split(" "); } else { path = command.substring(command.indexOf(args[i-1]) + args[i-...
0
log.debug("Send SSH_MSG_USERAUTH_REQUEST for publickey");
0