Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
GenericObjectPool pool = new GenericObjectPool(); | 0 |
import org.apache.batik.anim.dom.AnimationTarget; | 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 |
import java.util.Set; | 0 |
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.osgi.framework.Version;
import org.osgi.util.converter.MyDTO.Count;
import org.osgi.util.converter.MyEmbeddedDTO.Alpha;
public void testCustomErrorHandlingProxy() {
ConverterFunction errHandler = new ConverterFunction() {
... | 0 |
stats.extent = new KeyExtent(tableId, new Text(tserver.host() + String.format("%03d", i + 1)), new Text(tserver.host() + String.format("%03d", i)))
.toThrift();
String key = migration.tablet.getTableId(); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/beans/Attic/DynamicPointer.java,v 1.3 2002/05/30 02:04:57 dmitri Exp $
* $Revision: 1.3 $
* $Date: 2002/05/30 02:04:57 $
* @version $Revision: 1.3 $ $Date: 2002/05/30 02:04:57 $ | 0 |
Arrays.asList(window(0, 10)),
null),
Arrays.asList(window(0, 10)),
null),
Arrays.asList(window(10, 20)),
null)))));
Arrays.asList(window(-10, 10), window(0, 20)),
null),
Arrays... | 0 |
private static final int REQUESTS_RESULT_LIMIT_WITH_FILTER = 20;
private static final int REQUESTS_RESULT_LIMIT = 200;
resultsLimit = REQUESTS_RESULT_LIMIT_WITH_FILTER;
} else {
resultsLimit = REQUESTS_RESULT_LIMIT;
| 1 |
public interface IoServiceFactory extends Closeable, IoServiceEventListenerManager { | 0 |
* dependency is added, changed or removed. When you specify callbacks, the auto
* configuration feature is automatically turned off, because we're assuming you don't
* need it in this case.
* @param added the method to call when a service was added
* @param changed the method to call when a s... | 0 |
import org.w3c.dom.Document;
import org.w3c.dom.Element; | 1 |
import org.apache.accumulo.core.security.thrift.SecurityErrorCode;
import org.apache.accumulo.core.security.thrift.ThriftSecurityException; | 0 |
private static Key newKeyValue(SortedMap<Key,Value> tm, String row, String cf, String cq,
String val) { | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/adapters/Attic/TestByteListIteratorListIterator.java,v 1.3 2003/10/01 21:54:55 scolebourne Exp $
import org.apache.commons.collections.iterators.AbstractTestListIterator... | 0 |
import java.io.IOException;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import org.apache.felix.http.base.internal.handler.HandlerRegistry;
public static final String REQUEST_DISPATCHER_PROVIDER = "org.apache.felix.http.requestDispatcherProvider";
private static final FilterChain... | 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 |
* Specifies if manifest headers from the bundle should be propagated to the service. | 0 |
import org.apache.http.nio.ContentDecoder;
import org.apache.http.nio.ContentEncoder;
import org.apache.http.nio.NHttpServerConnection;
import org.apache.http.nio.NHttpServiceHandler;
import org.apache.http.nio.reactor.IOEventDispatch;
import org.apache.http.nio.reactor.IOReactor; | 0 |
private static final long RECENTLY_SPLIT_MILLIES = 60*1000;
// ignore any tablets that have recently split
Iterator<KeyExtent> each = onlineOverlapping.iterator();
while (each.hasNext()) {
Tablet tablet = onlineTablets.get(each.next());
if (... | 0 |
* <strong>N.B.</strong>Patterns can only be specified using the <i>standard</i>
* pattern characters and NOT in <i>localized</i> form (see <code>java.text.DecimalFormat</code>).
* See <code>java.text.DecimalFormat</code> for details
* See <code>java.text.DecimalFormat</code> for details | 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 |
return in.apply(Combine.globally(new SampleAnyCombineFn<T>(limit)).withoutDefaults()) | 0 |
public class StringComparator implements Comparator<String>
@Override
public int compare(String o1, String o2)
return o1.compareTo(o2);
return o1.compareToIgnoreCase(o2); | 0 |
import org.apache.beam.sdk.schemas.FieldAccessDescriptor;
import org.apache.beam.sdk.values.Row;
/**
* Provides a link to the input element converted to a {@link Row} object. The input
* collection must have a schema registered for this to be called.
*/
Row asRow(FieldAccessDescriptor fieldAccess... | 0 |
import org.apache.accumulo.server.rpc.TCredentialsUpdatingWrapper;
import org.apache.accumulo.server.rpc.ThriftServerType;
Iface rpcProxy = RpcWrapper.service(this);
final Processor<Iface> processor;
if (ThriftServerType.SASL == getThriftServerType()) {
Iface tcProxy = TCredentialsUpdatingWrapper.serv... | 1 |
* @version CVS $Id: VerticalAlignment.java,v 1.4 2004/01/31 08:50:39 antonio Exp $
public class VerticalAlignment {
private int _alignment;
private static final int _top = 1;
private static final int _bottom = 2;
private static final int _center = 4;
private static final int _justify = 8;
priva... | 0 |
Request request = PropertyHelper.getCreateRequest(propertySet, null);
Request request = PropertyHelper.getUpdateRequest(properties, null); | 0 |
@Test
public void testHttp204ContentLengthGreaterThanZero() throws Exception {
final HttpResponse response = new BasicHttpResponse(204, "OK");
response.addHeader("Content-Length", "10");
response.addHeader("Connection", "keep-alive");
Assert.assertFalse(reuseStrategy.keepAlive(nu... | 0 |
if ((line = chargenInput.readLine()) == null) {
} | 1 |
public static final ResettableIterator RESETTABLE_INSTANCE = new EmptyIterator<>(); | 1 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
public class CountingOutputStreamTest {
@Test
@Test | 0 |
import org.apache.batik.util.awt.image.GraphicsUtil;
GraphicsUtil.copyData(origSrc, src);
srcCMPre = GraphicsUtil.coerceColorModel(srcCM, true);
GraphicsUtil.copyData(origSrc, src);
dstCMPre = GraphicsUtil.coerceColorModel(dstCM, true);
GraphicsUtil.copyData(... | 0 |
public boolean offer(final E element) { | 0 |
// !!! % | 0 |
accumuloClient = createAccumuloClient(); | 0 |
ScheduledExecutorService executor = factoryManager.getScheduledExecutorService();
log.info("Disconnecting: {} - {}", reason, msg); | 0 |
private Set<E> contained;
public EmptySetMutator(Set<E> set) { | 0 |
// The base package name for imports; assumes Const is at the top level
// N.B we use the class so renames will be detected by the compiler/IDE
private static final String CONSTANT_PREFIX = Const.class.getSimpleName()+".";
_out.println("public class " + class_name + "Creator {");
... | 0 |
import java.util.Collection;
import java.util.List;
import org.osgi.service.component.runtime.ServiceComponentRuntime;
import org.osgi.service.component.runtime.dto.ComponentDescriptionDTO;
private final ServiceComponentRuntime scrService;
static ScrCommand register(BundleContext bundleContext, ServiceComponent... | 0 |
protected boolean stringContent;
XMLReader parser =
XMLReaderFactory.createXMLReader(parserClassName);
inDTD = false;
inCDATA = false;
currentNode = null;
document = null;
documentDescriptor.setLocationLine(e, locator.getLineN... | 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 |
// Printing Graphics is always set up for 72dpi, so scale
// according to what user agent thinks it should be.
double pixSzMM = userAgent.getPixelUnitToMillimeter();
double pixSzInch = (25.4/pixSzMM); | 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 |
public final class Atlas {
private static final Logger LOG = LoggerFactory.getLogger(Atlas.class);
private Atlas() { | 0 |
import javax.net.ssl.SSLParameters;
import org.apache.hc.core5.function.Callback;
private final NamedEndpoint targetEndpoint;
private final Callback<SSLIOSession> callback;
final SSLSessionVerifier verifier,
final Callback<SSLIOSession> callback) {
this(targetEndpoint, session, s... | 0 |
* @version $Revision$ $Date$ | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
createEvaluator(singletonView, fn, inputPc, output);
PCollection<Integer> input,
input.getWindowingStrategy(), | 0 |
// Every removed configurable propery gets reset to its default value
for (int i = 0; i < m_configurableProperties.size(); i++) {
Property prop = (Property) m_configurableProperties.get(i);
if (configuration.get(prop.getName()) == null) {
reconfigureProperty(prop,... | 0 |
import com.google.common.collect.ImmutableSet;
import org.apache.shiro.realm.text.IniRealm;
private static final String MISSING_SECTIONS_SHIRO_INI = "shiro-missing-sections.ini";
private static final String NO_SECTIONS_SHURO_INI = "shiro-malformed-no-sections.ini";
ShiroIniParser.ALLOWED_SECTION_NAMES,
@... | 0 |
import com.google.common.base.Function;
import com.google.common.base.MoreObjects;
import com.google.common.collect.FluentIterable;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.common.collect.Sets;
import jav... | 0 |
import org.apache.beam.sdk.options.BigQueryOptions;
import org.apache.beam.sdk.options.GcsOptions;
import org.apache.beam.sdk.options.PubsubOptions; | 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 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/dynabeans/DynaBeanPropertyPointer.java,v 1.2 2002/10/20 03:47:18 dmitri Exp $
* $Revision: 1.2 $
* $Date: 2002/10/20 03:47:18 $
* @version $Revision: 1.2 $ $Date: 2002/10/20 03:4... | 0 |
/**
* Local {@link ExecutorProvider}.
*/ | 0 |
public BeamQueryPlanner(SchemaPlus schema) {
.ruleSets(BeamRuleSets.getRuleSets())
public PCollection<Row> compileBeamPipeline(String sqlStatement, Pipeline basePipeline)
throws Exception { | 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 applicabl... | 0 |
import org.apache.beam.sdk.values.TaggedPValue;
for (TaggedPValue consumed : node.getInputs()) {
toFinalize.remove(consumed.getValue());
}
for (TaggedPValue value : node.getInputs()) {
primitiveConsumers.put(value.getValue(), appliedTransform);
if (value instanceof PCollectionView) {
... | 0 |
* @param parser the line parser. If {@code null}
* @param requestFactory the request factory. If {@code null}
* @param constraints Message constraints. If {@code null} | 0 |
import org.apache.accumulo.core.security.thrift.TCredentials;
import org.apache.accumulo.core.security.tokens.AuthenticationToken;
public static void setConnectorInfo(JobConf job, String principal, AuthenticationToken token) throws AccumuloSecurityException {
* @see #setConnectorInfo(JobConf, String, Authenticatio... | 1 |
@SuppressWarnings("boxing") // test code | 0 |
tickOfNextAckDeadline = leader.self.tick.get()
tickOfNextAckDeadline = leader.self.tick.get() + leader.self.syncLimit;
&& leader.self.tick.get() <= tickOfNextAckDeadline; | 0 |
import java.util.Properties;
* @see org.apache.cocoon.portal.PortalManagerAspect#render(org.apache.cocoon.portal.PortalManagerAspectRenderContext, org.apache.cocoon.portal.PortalService, org.xml.sax.ContentHandler, java.util.Properties)
Properties properties)
aspectContext.invokeNext... | 0 |
import java.util.EnumSet;
import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
conn.tableOperations().checkIteratorConflicts(t, null, EnumSet.allOf(IteratorScope.class)); | 0 |
/* Used by most IOIT */ | 0 |
package org.apache.cocoon.configuration; | 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 |
assignments = new HashMap<>(); | 1 |
* <p>Automatically invoked whenever this {@link POutput} is output, after
* {@link PValue#finishSpecifyingOutput(String, PInput, PTransform)} has been called on each
* component {@link PValue} returned by {@link #expand()}.
void finishSpecifyingOutput(String transformName, PInput input, PTransform<?, ?> tran... | 0 |
bind(Scheduler.class).toInstance(
Scheduler.newFixedRateSchedule(
TASK_STAT_INTERVAL.get().getValue(),
TASK_STAT_INTERVAL.get().getValue(),
TASK_STAT_INTERVAL.get().getUnit().getTimeUnit()));
bind(Scheduler.class).toInstance(
Schedu... | 0 |
(CSS_MARKER_PROPERTY,
(CSS_MARKER_START_PROPERTY,
(CSS_MARKER_MID_PROPERTY,
(CSS_MARKER_END_PROPERTY,
orient =
// Extract the overflow property
= CSSUtilities.getComputedStyle(paintedElement);
// Set the markerContentNode's ... | 0 |
Class<?> clazz = Class.forName(objectStreamClass.getName(), false, classLoader); | 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 |
* Returns {@code true} if this map contains no key-value mappings.
* @return {@code true} if this map contains no key-value mappings
* Returns {@code true} if this map contains a mapping for the specified
* key. More formally, returns {@code true} if and only if this map
* contains a mapping fo... | 0 |
import org.apache.sshd.util.test.NoIoTestCase;
import org.junit.experimental.categories.Category;
@Category({ NoIoTestCase.class }) | 0 |
import org.apache.log4j.Logger;
return parseConfig(Property.TSERV_MAJC_DELAY + "=10ms");
UtilWaitThread.sleep(12000);
Logger.getLogger(LargeRowTest.class).warn("checking splits");
// give split time to complete
getConnector().tableOperations().flush(table, null, null, true); | 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 by applica... | 0 |
import org.apache.sshd.common.util.SelectorUtils;
public Path resolveLocalPath(String basedir, String subpath) throws IOException {
public Path resolveLocalPath(String remotePath) throws IOException {
// In case double slashes and other patterns are used
String path = SelectorUtils.normalizePat... | 0 |
import java.util.Collections;
import java.util.List;
protected List<Service> getServices() {
return (currentService != null)
? Collections.singletonList(currentService)
: Collections.<Service>emptyList(); | 0 |
* @version $Revision$ | 1 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/bag/UnmodifiableSortedBag.java,v 1.4 2004/01/05 21:54:06 scolebourne Exp $
* Copyright (c) 2003-2004 The Apache Software Foundation. All rights
* @version $Revision: 1.4 $ $Date... | 0 |
package org.apache.felix.sigil.eclipse.ui.internal.preferences.repository; | 0 |
/*
* Copyright 1999-2002,2004-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 requ... | 0 |
return new ECDH(ECCurves.nistp256);
return new ECDH(ECCurves.nistp384);
return new ECDH(ECCurves.nistp521);
return NamedResource.Utils.findByName(name, String.CASE_INSENSITIVE_ORDER, VALUES); | 0 |
private static final Pattern STACK_ADVISOR_REGEX = Pattern.compile("/api/v[0-9]+/stacks/[^/]+/versions/[^/]+/(validations|recommendations).*"); | 0 |
package org.apache.http.impl.io;
import org.apache.http.io.HttpDataReceiver; | 0 |
import java.net.InetSocketAddress;
import java.net.SocketAddress;
private static void formatAddress(final StringBuilder buffer, final SocketAddress socketAddress) {
if (socketAddress instanceof InetSocketAddress) {
InetSocketAddress addr = ((InetSocketAddress) socketAddress);
buffer.... | 0 |
private String processorClassName;
Logger logger,
String processorClassName) {
this.processorClassName = processorClassName;
settings.setProcessorClassName(this.processorClassName); | 0 |
DoFnRunner<KV<String, Iterable<WindowedValue<String>>>, KV<String, Iterable<String>>> runner =
DoFnRunner<KV<String, Iterable<WindowedValue<String>>>, KV<String, Iterable<String>>> runner =
DoFnRunner<KV<String, Iterable<WindowedValue<String>>>, KV<String, Iterable<String>>> runner =
DoFnRunner<KV<Strin... | 0 |
* Copyright (c) OSGi Alliance (2017). All Rights Reserved.
*
* 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
* @author $Id$ | 0 |
import com.google.common.base.Optional; | 0 |
FieldType.of(ARRAY).withCollectionElementType(INT32.type()))
FieldType.of(ARRAY).withCollectionElementType(INT32.type())) | 0 |
import org.apache.commons.jxpath.util.ReverseComparator;
Collections.sort(list, ReverseComparator.INSTANCE); | 0 |
expect(serviceDirectory.getConfigurationDirectory(dir, StackDirectory.SERVICE_PROPERTIES_FOLDER_NAME)).andReturn(configDir).anyTimes(); | 0 |
import org.apache.commons.configuration.tree.ExpressionEngine;
/**
* An expression engine used for converting child configurations to
* hierarchical ones.
*/
private ExpressionEngine conversionExpressionEngine;
* Returns the <code>ExpressionEngine</code> for converting flat child
* con... | 0 |
import org.apache.hc.core5.http.ClassicHttpResponse;
import org.apache.hc.core5.http.ContentType;
import org.apache.hc.core5.http.HttpStatus;
import org.apache.hc.core5.http.io.ResponseHandler;
import org.apache.hc.core5.http.io.entity.EntityUtils;
public Document handleResponse(final ClassicHttpResponse re... | 0 |
import org.apache.hc.core5.http.HttpResponse;
import org.apache.hc.core5.http.HttpStatus; | 0 |
return Collections.singletonList(BuiltinSignatures.rsa);
return Collections.singletonList(BuiltinSignatures.dsa); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.