Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
super(org.apache.commons.bcel6.Const.BALOAD); | 0 |
import java.io.IOException;
import java.io.OutputStream;
import java.security.Key;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import javax.xml.stream.XMLStreamException;... | 0 |
import org.apache.atlas.model.TypeCategory; | 0 |
try (java.util.Scanner it = new java.util.Scanner(file, UTF_8)) {
try (java.util.Scanner it = new java.util.Scanner(distCpTxt, UTF_8)) { | 0 |
import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient;
public abstract class AbstractHttpAsyncRedirectsTest <T extends CloseableHttpAsyncClient> extends AbstractIntegrationTestBase<T> {
public AbstractHttpAsyncRedirectsTest(final URIScheme scheme) {
public BasicRedirectService(final int stat... | 0 |
import org.osgi.service.http.whiteboard.HttpWhiteboardConstants;
private final String enabled;
this.enabled = this.getStringProperty(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_LISTENER);
}
@Override
public boolean isValid()
{
return super.isValid() && "true".equalsIgnoreCase(thi... | 0 |
Trigger<W> trigger,
return new TriggerTester<VI, VO, W>(objectWindowFn, trigger, windowSetFactory);
Trigger<W> trigger,
this.windowFn = windowFn;
this.stubContexts = new StubContexts(); | 0 |
import java.util.Collections;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
* @version CVS $Id: XMLResourceBundleFactory.java,v 1.15 2004/07/13 16:00:12 sylvain Exp $
public class XMLResourceBundleFactory
implements BundleFactory, Serviceable, Configurable, Disposable, ThreadSafe, LogEnabled {
... | 0 |
import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.repository;
mavenBundle().groupId("org.ow2.chameleon").artifactId("transaction-geronimo").version(asInProject()),
),
repository("http://maven.ow2.org/maven2-snapshot/"),
osgi.waitForServic... | 0 |
import org.apache.beam.sdk.extensions.sql.impl.udf.BeamBuiltinFunctionProvider;
private void registerBuiltinUdf(Map<String, List<Method>> methods) {
public void loadBeamBuiltinFunctions() {
for (BeamBuiltinFunctionProvider provider :
ServiceLoader.load(BeamBuiltinFunctionProvider.class)) {
registe... | 0 |
public class Window extends AbstractLoggingBean implements java.nio.channels.Channel, ChannelHolder {
init(resolver.getLongProperty(FactoryManager.WINDOW_SIZE, FactoryManager.DEFAULT_WINDOW_SIZE),
resolver.getLongProperty(FactoryManager.MAX_PACKET_SIZE, FactoryManager.DEFAULT_MAX_PACKET_SIZE),
... | 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 |
// Skip INSTALL task in case SysPrepped hosts and in case of server components. In case of server component
// START task should run configuration script.
if (Boolean.parseBoolean(configs.areHostsSysPrepped()) &&
"INITIAL_INSTALL".equals(requestProperties.get("phase... | 0 |
* @version CVS $Id: EP_Grid.java,v 1.4 2004/01/31 08:50:39 antonio Exp $
public class EP_Grid extends BaseElementProcessor {
public EP_Grid() {
public boolean getValue() throws IOException {
if (_value == null) { | 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 |
BufferedImage.TYPE_INT_ARGB); | 0 |
private final boolean isActive;
public UserResponse(String name, boolean isLdapUser, boolean isActive) {
this.isActive = isActive;
public boolean isActive() {
return isActive;
} | 0 |
if (ipSegment == null || ipSegment.length() == 0) {
if (octet.length() == 0) { | 0 |
import org.apache.commons.codec.CharEncoding; | 0 |
BigQuerySourceBase.ExtractResult res =
source.extractFiles(c.getPipelineOptions());
for (ResourceId file : res.extractedFiles) {
c.output(tableSchemaTag, BigQueryHelpers.toJsonString(res.schema)); | 0 |
writeOp(new MutateWork.NoResult.Quiet() {
writeOp(initializationLogic);
super.writeOp(new MutateWork.NoResult<CodingException>() {
public synchronized <T, E extends Exception> T writeOp(final MutateWork<T, E> work)
return super.writeOp(work);
return super.writeOp(new MutateWork<T, E>() {
... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/RequiredNameTest.java,v 1.5 2002/12/15 21:46:41 martinc Exp $
* $Revision: 1.5 $
* $Date: 2002/12/15 21:46:41 $
import org.apache.commons.logging.LogFactory;
* @version $Revision: 1... | 0 |
/*
* Servlet Specification 2.2, 6.5 Closure of Response Object:
*
* A number of events can indicate that the servlet has provided all of the
* content to satisfy the request and that the response object can be
* considered to be closed. ... | 0 |
/** @inheritDoc */
/** @inheritDoc */ | 0 |
super();
super(defaultValue);
}
/**
* Return the default type this <code>Converter</code> handles.
*
* @return The default type this <code>Converter</code> handles.
*/
protected Class getDefaultType() {
return Date.class; | 0 |
import org.apache.felix.gogo.runtime.CommandProcessorImpl;
import org.apache.felix.gogo.runtime.CommandSessionImpl; | 0 |
// XXX see FELIX-1395
// The following code has been commented out as it causes
// problems with require bundle dependencies
// VersionRange version = versions.get( name );
// String rev = version != null ? version.toSt... | 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 final ITaskConfig canonicalTask;
this.canonicalTask = task;
return Objects.hashCode(canonicalTask);
return Objects.equal(canonicalTask, other.canonicalTask);
return JobKeys.toPath(Tasks.INFO_TO_JOB_KEY.apply(canonicalTask)); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestLinkedList.java,v 1.7 2003/11/18 22:37:15 scolebourne Exp $
* @version $Revision: 1.7 $ $Date: 2003/11/18 22:37:15 $
public List makeEmptyList() {
public List makeFull... | 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 |
if (firstPrevRowValue == null) {
log.debug("tablet already merged");
return;
}
| 0 |
public class TestRFC6265CookieSpec {
final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec(h1, h2);
final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec();
final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec();
final RFC6265CookieSpec cookiespec = new RFC6265CookieSpec(... | 0 |
System.out.println("Scanning with sampler configuration. Data was written"
+ " before sampler was set on table, scan should fail.");
System.out.println("Scanning sample after updating content for docId 2317"
+ " (should see content change in sample data) : ");
System.out.println("Scanning wi... | 0 |
* Implementation for any url based file system. | 0 |
* Method used to set the property value of an object.
* @param obj Object on which the property setter will be called with the value
Object invoke(Object obj, Object arg) throws Exception;
* Attempts to reuse this JexlPropertySet, checking that it is compatible with
* the actual set of arguments... | 0 |
IteratorSetting cfg;
Stopwatch sw;
Iterator<Entry<Key,Value>> iterator;
try (Scanner s = c.createScanner(table, new Authorizations())) {
cfg = new IteratorSetting(100, SlowIterator.class);
// A batch size of one will end up calling seek() for each element with no calls to next()
SlowIt... | 0 |
* @param cause the javacc cause
* @param cause the javacc cause
protected static class Return extends JexlException {
/** The returned value. */
/**
* Creates a new instance of Return.
* @param node the return node
* @param msg the message
* @p... | 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 |
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.google.common.collect.ImmutableMap;
import java.util.Collections; | 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 |
// Don't do any caching of content for dynamic case
// Since we don't cache we don't need to flush
return;
}
/**
* Flush a list of rectangles of cached image data.
*/
public void flush(List areas) {
// Since we don't cache we don't need to flush | 0 |
/*
* Copyright 2016-2018 Seznam.cz, a.s. | 0 |
} catch (IOException | SQLException e) {
} catch (SQLException | IOException e) { | 0 |
settings.setInitClassloader(true); | 0 |
import org.apache.http.entity.AbstractHttpEntity; | 0 |
configuration.getRequestConnectTimeout(),
configuration.getRequestReadTimeout(), | 0 |
Rectangle2D bounds = null, nodeBounds = null;
AffineTransform txf = null;
txf = children[0].getTransform();
nodeBounds = children[0].getBounds();
bounds = txf.createTransformedShape(nodeBounds).getBounds2D();
// With the following empty groups may have bad... | 0 |
* Autogenerated by Thrift Compiler (0.11.0) | 0 |
package org.w3c.dom.svg;
import org.w3c.dom.events.EventTarget;
public interface SVGImageElement extends
SVGElement,
SVGURIReference,
SVGTests,
SVGLangSpace,
SVGExternalResourcesRequired,
SVGStylable,
SVGTransfo... | 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.sdk.Pipeline;
import org.apache.beam.sdk.testing.TestPipeline;
AppliedPTransform<?, ?, ?> appliedTransform =
appliedPTransform(fullName, pTransform, TestPipeline.create());
AppliedPTransform<?, ?, ?> appliedTransform =
appliedPTransform(fullName, pTransform, TestPipeline.c... | 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 final HashSet<Column> columnSet = new HashSet<>(); | 1 |
SortedMap<Key,Value> map = new TreeMap<>(); | 0 |
this.tokens = new ArrayList<>(); | 0 |
return !ver.lessEquals(HttpVersion.HTTP_1_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 |
import java.io.InputStream;
import org.apache.hadoop.io.serializer.Deserializer;
import org.apache.hadoop.io.serializer.SerializationFactory;
import org.apache.hadoop.io.serializer.Serializer;
public HadoopSplit(
HadoopSource<K, V> source,
InputSplit inputSplit) {
this.inputSplitBytes = serializeSpli... | 0 |
* @param parameters function arguments
* @return Object result | 0 |
public static SdkFunctionSpec toProto(WindowFn<?, ?> windowFn, SdkComponents components) {
.setEnvironmentId(
components.registerEnvironment(Environments.JAVA_SDK_HARNESS_ENVIRONMENT))
.setEnvironmentId(
components.registerEnvironment(Environments.JAVA_SDK_HARNESS_ENVIR... | 0 |
import java.io.IOException;
public ConnectFuture connect(String host, int port) throws IOException {
public ConnectFuture connect(SocketAddress address) throws IOException {
client.setTcpipForwarderFactory(tcpipForwarderFactory); | 0 |
import net.bytebuddy.description.type.TypeDescription;
static <T> FieldValueGetter<T> createGetter(Field field) {
DynamicType.Builder<FieldValueGetter> builder =
ByteBuddyUtils.subclassGetterInterface(BYTE_BUDDY, field.getDeclaringClass());
DynamicType.Builder<FieldValueSetter> builder =
ByteB... | 0 |
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
import org.apache.cocoon.forms.Constants;
import org.apache.cocoon.xml.AttributesImpl;
* @version CVS $Id: FormattingDateConvertor.java,v 1.2 2004/04/10 13:40:27 bruno Exp $
private static final String CONVERTOR_EL = "convertor";
public void... | 0 |
import java.io.IOException;
try {
so.close();
} catch (IOException e) {
//Imposible
}
BufferedOutputStream bos=new BufferedOutputStream(so);
this._signedInfo.signInOctectStream(bos);
try {
bos.close();
} catch (IOExcepti... | 0 |
/* Create indexes first so that if index creation fails then we rollback
the typesystem and also do not persist the graph
*/
typeStore.store(typeSystem, ImmutableList.copyOf(typesAdded.keySet()));
typeSystem.removeTypes(typesAdded.keySe... | 0 |
private PriorityQueue<TermSource> sorted = new PriorityQueue<>(5);
this.sources = new ArrayList<>();
this.sources = new ArrayList<>(); | 1 |
String tableName = getUniqueNames(1)[0]; | 0 |
BeamRecordSqlType beamSQLRowType = CalciteUtils.toBeamRowType( | 0 |
modifiedNamespaces.add(b.isEmpty() ? "\"\"" : b);
| 0 |
long getCurrentPos() {
long getCompressedSize() {
public long getRawSize() { | 0 |
import com.twitter.common.base.Supplier;
/**
* Fetch tasks matching the query returned by {@code querySupplier} from {@code storage} in a
* read transaction. Intended for use with {@link com.twitter.mesos.scheduler.Query.Builder}
* instances.
*
* @see #fetchTasks(Storage, com.twitter.meso... | 0 |
import cz.seznam.euphoria.core.client.dataset.WindowContext;
public class SumByKey<IN, KEY, WLABEL, W extends WindowContext<?, WLABEL>,
public <WLABEL, W extends WindowContext<?, WLABEL>> OutputBuilder<IN, KEY, WLABEL, W>
public static class OutputBuilder<IN, KEY, WLABEL, W extends WindowContext<?, WLABEL>> | 0 |
import com.google.common.collect.ImmutableMap;
assertEquals(
"aaa", arrayExpression.evaluate(NULL_ROW, NULL_WINDOW, ImmutableMap.of()).getValue());
new BeamSqlDotExpression(elements, SqlTypeName.VARCHAR)
.evaluate(NULL_ROW, NULL_WINDOW, ImmutableMap.of()); | 0 |
import org.apache.beam.sdk.schemas.annotations.DefaultSchema; | 0 |
private final OfferQueue offerQueue;
OfferQueue offerQueue) {
this.offerQueue = checkNotNull(offerQueue);
OfferQueue offerQueue,
offerQueue);
if (!offerQueue.launchFirst(assignment)) {
} catch (OfferQueue.LaunchException e) { | 0 |
pipeCloseOnExit = executor != pipeService || shutdownOnExit; | 0 |
import java.util.Properties;
import javax.xml.transform.OutputKeys;
* @version CVS $Id: SourceUtil.java,v 1.14 2004/03/17 12:09:51 cziegeler Exp $
Properties props = XMLUtils.createPropertiesForXML(false);
props.put(OutputKeys.ENCODING, "ISO-8859-1");
final Str... | 0 |
package org.apache.commons.ognl.test;
import org.apache.commons.ognl.test.objects.Root;
import org.apache.commons.ognl.test.objects.SimpleNumeric;
import org.apache.commons.ognl.test.objects.TestModel; | 0 |
Function<IResourceAggregate, Integer> counter =
machineSlack -> ResourceAggregates.divide(machineSlack, slotSize); | 0 |
public void setTimeout(final int timeout) { | 0 |
implements StringCallback, VoidCallback, DataCallback
private static class CountdownWatcher implements Watcher {
volatile CountDownLatch clientConnected = new CountDownLatch(1);
public void process(WatcherEvent event) {
if (event.getState() == Event.KeeperStateSyncConnected) {
... | 0 |
if (dataSource.initialSize > 0) {
dataSource.getLogWriter();
} | 0 |
import static org.junit.Assert.*;
@Test
public void testDeleteServiceComponent() throws Exception {
Service hdfs = cluster.addService("HDFS");
Service mapReduce = cluster.addService("MAPREDUCE");
hdfs.persist();
ServiceComponent nameNode = hdfs.addServiceComponent("NAMENODE");
nameNode.persis... | 0 |
public class NOPClosure<E> implements Closure<E>, Serializable {
public static final Closure<Object> INSTANCE = new NOPClosure<Object>();
@SuppressWarnings("unchecked")
public static <E> Closure<E> getInstance() {
return (Closure<E>) INSTANCE;
public void execute(E input) {
/**
* {@inhe... | 0 |
argList.addAll(Arrays.asList(javaBin, "-Dproc=" + clazz.getSimpleName(), "-cp", classpath)); | 0 |
* Creates a <code>Filter</code> primitive according to the specified
* @param inputFilter the <code>Filter</code> that represents the current
* <code>Filter</code> it creates. Other <code>FilterBridge</code>s | 0 |
import java.util.concurrent.atomic.AtomicReference;
import org.apache.accumulo.monitor.Monitor.MonitorFactory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
config.register(new MonitorFactory(monitor.get()));
private static AtomicReference<Monitor> monitor = new AtomicReference<>(null);
@BeforeCla... | 0 |
* given {@link ConnPoolControl}. | 0 |
* @param paramType Java class name of the parent method's argument (if you wish to use a primitive type,
* specify the corresonding Java wrapper class instead, such as <code>java.lang.Boolean</code>
* for a <code>boolean</code> parameter)
* correson... | 0 |
* @version CVS $Id: XMLResourceBundleFactory.java,v 1.6 2003/11/27 18:40:03 joerg Exp $ | 0 |
.withCollectionElementType(TypeName.STRING.type());
.withCollectionElementType(TypeName.ROW.type()
.withCollectionElementType(TypeName.ARRAY.type()
.withCollectionElementType(TypeName.STRING.type())); | 0 |
import org.apache.accumulo.trace.instrument.Trace; | 0 |
package org.apache.sshd.common.forward;
private final Logger log;
log = LoggerFactory.getLogger(getClass());
log.info("setUp() echo address = {}", acceptor.getLocalAddress());
final RuntimeException lenOK[] = new RuntimeException[NUM_ITERATIONS];
final RuntimeException dataOK... | 0 |
public Node setNamedItem(String ns, String name, Node arg) throws DOMException {
Attr result = (Attr)super.setNamedItem(ns, name, arg);
HashMap hm = (HashMap)liveAttributeValues.get(ns);
setNamedItemNS(attr);
/**
* <b>DOM</b>: Implements {@link
* org.w3c.dom.NamedNodeMap#removeNamedItemNS(Str... | 0 |
Set<Bundle> oldBundles = new HashSet<Bundle>(state.bundles);
oldBundles.removeAll(state.installed);
if (!oldBundles.isEmpty()) {
for (Bundle b : state.installed) {
String hostHeader = (String) b.getHeaders().get(Constants.FRAGMENT_HOST);
if (hostHeader... | 0 |
* See Main.java. | 0 |
* @deprecated since 1.3, the two-pass parsing with the flatten method is not enough flexible to handle complex cases | 0 |
import java.util.Iterator;
import java.util.Locale;
import org.apache.commons.exec.OS;
* java-gjc.
/**
* On Windows platforms test that accessing environment variables
* can be done in a case-insensitive way, e.g. "PATH", "Path" and
* "path" would reference the same environment variable.
... | 0 |
return new FixedSizeMap<>(map); | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.