Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
package org.apache.felix.dm.test.annotation;
public interface Sequencer
{
void next(int step);
} | 0 |
import org.apache.commons.collections.iterators.IteratorChain;
@SuppressWarnings("unchecked")
IteratorChain chain = new IteratorChain();
for (Range range : ranges) {
SortedKeyValueIterator<Key,Value> i = new SortedMapIterator(table.table);
try {
i = new RangesFilter(createFilter(i), ranges... | 0 |
package com.twitter.mesos.scheduler.async;
import org.apache.mesos.Protos.FrameworkID;
import org.apache.mesos.Protos.Offer;
import org.apache.mesos.Protos.OfferID;
import org.apache.mesos.Protos.SlaveID;
/**
* Utility class for creating resource offers.
*/
final class Offers {
private Offers() {
// Utility c... | 0 |
copyFilteredResourceToDir(karafBase, "bin/karaf.bat", props);
copyFilteredResourceToDir(karafBase, "bin/karaf", props);
chmod(new File(karafBase, "bin/karaf"), "a+x"); | 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 |
* @version $Revision: 1.4 $ $Date: 2002/10/25 03:59:10 $
destFolder.createFolder(); | 0 |
* @author John D. McNally
* @version $Revision: 1.5 $ $Date: 2004/02/28 12:18:17 $ | 0 |
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class PortletRegistryImpl extends GenericPortletRegistryImpl
implements StateChangedListener {
protected final Log logger = LogFactory.getLog(getClass()); | 0 |
package org.apache.felix.ipojo.test;
public class FooProvider implements FooService {
public String foo;
public void foo() {
if (foo.equals("foo")) {
foo = "bar";
} else {
foo = "foo";
}
}
} | 0 |
* heartbeating and not in maintenance mode.
*
* @see HostMaintenanceModeCheck
/**
* {@inheritDoc}
*/ | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/Attic/Context.java,v 1.6 2002/04/24 13:03:03 jstrachan Exp $
* $Revision: 1.6 $
* $Date: 2002/04/24 13:03:03 $
* $Id: Context.java,v 1.6 2002/04/24 13:03:03 jstrachan Exp $
* @version $Re... | 0 |
package org.apache.batik.gvt.filter; | 0 |
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.beam.sdk.util.common.ReflectHelpers;
private static final ObjectMapper MAPPER =
new ObjectMapper()
.registerModules(ObjectMapper.findModules(ReflectHelpers.findClassLoader()... | 0 |
package org.apache.beam.sdk.util; | 0 |
private static Set<String> pkPropertyIds = new HashSet<>(
Arrays.asList(new String[]{STACK_NAME_PROPERTY_ID,
STACK_VERSION_PROPERTY_ID, SERVICE_NAME_PROPERTY_ID}));
final Set<StackServiceRequest> requests = new HashSet<>();
Set<Resource> resources = new HashSet<>(); | 1 |
final LinkedHashMap<Integer,Page> cache = new LinkedHashMap<Integer,Index.Page>();
}
catch (IOException e) {
}
catch (IOException e) {
sb.append(String.format("%s %02d:%02d %20s %s %d\n", indent, number, i, hex(k(i), 0, 4), leaf ? "=="
: "->", c(i)));
throw new IllegalStateException("Inv... | 0 |
-1, -1,
DefaultHttpRequestFactory.INSTANCE);
-1, -1,
DefaultHttpRequestFactory.INSTANCE);
-1, -1,
DefaultHttpRequestFactory.INSTANCE);
-1, -1,
DefaultHttpRequestFactory.INSTANCE); | 0 |
import static java.nio.charset.StandardCharsets.UTF_8;
import org.apache.accumulo.core.util.DeprecationUtil;
return DeprecationUtil.makeMockInstance(getInstanceName());
/**
* @deprecated since 1.8.0; use MiniAccumuloCluster or a standard mock framework
*/
@Deprecated
/**
* @deprecated since 1.8.0;... | 0 |
import org.apache.beam.sdk.values.PCollectionView;
/**
* Returns whether output was produced by the evaluation of this transform. True if
* {@link #getOutputBundles()} is nonempty, or if pipeline-visible state has changed (for example,
* the contents of a {@link PCollectionView} were updated).
*/
bool... | 0 |
* @author <a href="mailto:bluetkemeier@s-und-n.de">Björn Lütkemeier</a>
* @version CVS $Id: Environment.java,v 1.5 2003/07/10 13:17:03 cziegeler Exp $ | 0 |
package org.apache.accumulo.tserver;
import org.apache.accumulo.tserver.InMemoryMap.MemoryIterator; | 1 |
import java.util.EnumSet;
import org.eclipse.jetty.server.AbstractConnectionFactory;
import org.eclipse.jetty.server.SslConnectionFactory;
private final Server server;
private final ServerConnector connector;
private final ServletContextHandler handler;
connector = new ServerConnector(server, getConnectionFac... | 0 |
return AtlasAttribute.encodePropertyKey(key);
return AtlasAttribute.decodePropertyKey(key); | 0 |
import java.util.HashMap;
private Map<String, List<Method>> methodByNameMap = new HashMap<String, List<Method>>();
public synchronized void add(Method method) {
List<Method> l = methodByNameMap.get(methodName);
l = new ArrayList<Method>();
public synchronized List<Method> get(String key)... | 0 |
import org.apache.commons.configuration.tree.ExpressionEngine;
import org.easymock.EasyMock;
* Tests whether a parameters object for a hierarchical configuration can be
* created.
*/
@Test
public void testHierarchical()
{
ExpressionEngine engine = EasyMock.createMock(ExpressionEngine.... | 0 |
TreeMap<Long, Double> metricValues = new TreeMap<>(); | 1 |
throw RESTErrorUtil.createRESTException(e.getMessage(), MessageEnums.ERROR_SYSTEM);
if (JSONUtil.isJSONValid(hadoopServiceConfig)) {
throw RESTErrorUtil.createRESTException("Improper JSON", MessageEnums.ERROR_SYSTEM);
SolrUtil.setStart(lastPageQuery, 0);
SolrUtil.setRowCount(lastPageQuery, max... | 0 |
/**
* Sets up the target to have the same list of interceptors
* as the current instance.
*
* @param target object to be initialised
*/
target.requestInterceptors.clear();
target.requestInterceptors.addAll(this.requestInterceptors);
target.responseInterceptors.clear... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//fileupload/src/java/org/apache/commons/fileupload/FileUpload.java,v 1.18 2003/03/15 22:34:22 martinc Exp $
* $Revision: 1.18 $
* $Date: 2003/03/15 22:34:22 $
* @version $Id: FileUpload.java,v 1.18 2003/03/15 22:34:22 martinc Exp ... | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument;
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkState;
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.MoreObjects;
import org.apache.beam.vendor.guava.v20_0.c... | 0 |
import org.apache.beam.vendor.grpc.v1.io.grpc.ManagedChannel;
import org.apache.beam.vendor.grpc.v1.io.grpc.Server;
import org.apache.beam.vendor.grpc.v1.io.grpc.stub.CallStreamObserver;
import org.apache.beam.vendor.grpc.v1.io.grpc.stub.StreamObserver; | 0 |
@Mock private DoFn.ArgumentProvider<String, String> mockArgumentProvider;
when(mockArgumentProvider.window()).thenReturn(mockWindow);
OnTimerInvokers.forTimer(fn, timerId).invokeOnTimer(mockArgumentProvider); | 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 use ... | 0 |
// Make sure we haven't been interrupted
if (Thread.currentThread().isInterrupted()) {
// The Thread has been interrupted. Invalidate
// any cached values and proceed.
invalidateGeometryCache();
} | 0 |
import org.apache.batik.css.engine.CSSEngine;
import org.apache.batik.dom.svg.SVGDOMImplementation;
BridgeContext ctx = new BridgeContext(userAgent);
SVGOMDocument svgDoc = (SVGOMDocument)document;
svgDoc.setSVGContext(svgCtx);
* Returns this user agent's alternate style-sheet title.
... | 0 |
if (name == null || name.isEmpty()) { | 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 |
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.security.KeyStore;
import java.security.PrivateKey;
import java.security.cert.X509Certificate;
import org.apache.xml.security.keys.content.RetrievalMethod;
import org.apache.xml.securi... | 0 |
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
private final String DATE_FORMAT_ISO8601_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
private final DateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT_ISO8601_FORMAT);
public GremlinQueryCo... | 0 |
final byte[] buffer = new byte[200]; | 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 not u... | 0 |
@Test(timeout = 10 * 60 * 1000)
splits.add(new Text(new byte[] {0, 0, i}));
} catch (TableNotFoundException ex) {} catch (Exception ex) { | 0 |
import com.google.inject.Singleton;
@Singleton
recordAudit(httpRequest, requestTimeISO9601); | 0 |
* <p/> | 0 |
import org.apache.ambari.server.api.stomp.NamedTasksSubscriptions;
import org.apache.ambari.server.events.NamedTaskUpdateEvent;
private NamedTasksSubscriptions namedTasksSubscriptions;
STOMPUpdatePublisher STOMPUpdatePublisher, NamedTasksSubscriptions namedTasksSubscriptions) {
this.n... | 0 |
import org.apache.accumulo.core.client.impl.Credentials; | 1 |
import org.apache.http.annotation.ThreadSafe;
@ThreadSafe // since DefaultHttpClient is | 0 |
import org.apache.felix.webconsole.WebConsoleUtil;
WebConsoleUtil.keyVal( jw, "Symbolic Name", bundle.getSymbolicName() );
WebConsoleUtil.keyVal( jw, "Version", headers.get( Constants.BUNDLE_VERSION ) );
WebConsoleUtil.keyVal( jw, "Bundle Location", bundle.getLocation() );
WebConsoleUtil... | 0 |
* @version $Revision$ $Date$ | 0 |
return (desiredSecurityState == SecurityState.SECURED_KERBEROS) &&
(sch.getSecurityState() != SecurityState.SECURED_KERBEROS) &&
(sch.getSecurityState() != SecurityState.SECURING); | 0 |
Collection<WindowedValue<?>> windowValues =
valuesPerWindow.computeIfAbsent(window, k -> new ArrayList<>());
WindowedValue::getValue); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/bag/TreeBag.java,v 1.5 2003/12/28 17:58:53 scolebourne Exp $
* @version $Revision: 1.5 $ $Date: 2003/12/28 17:58:53 $
* Constructs a <code>TreeBag</code> containing all the m... | 0 |
expect(cluster.getServiceComponentHosts(anyObject(String.class))).andReturn(serviceComponentHosts).anyTimes();
expect(cluster.getCurrentStackVersion()).andReturn(stackId).atLeastOnce(); | 0 |
throw new BufferOverflowException(
"Exceeded buffer size of " + maxBufferSize + " for row: " + sourceTopKey.getRow()); | 0 |
pid.setType(PropertyType.String); | 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 |
package test.switches;
/**
* A component using switch on integers and enum.
*/
public class Switches {
public int switchOnInteger(int i) {
switch (i) {
case 0 : return 0;
case 1 : return 1;
case 2 : return 2;
default: return 3;
}
}
public... | 0 |
import org.apache.cocoon.el.objectmodel.ObjectModel; | 0 |
evaluationContext.createBundle(
(PCollection<InputT>) Iterables.getOnlyElement(transform.getOutputs()).getValue()); | 0 |
descentStr = String.valueOf(unitsPerEm*0.2);
* the returned list may contain Strings and ParsedURLs
ret.add(purl); // here we add a ParsedURL
String s = ffname.getAttribute("name");
ret.add(s); ... | 0 |
import org.apache.batik.dom.svg.SVGOMElement;
import org.apache.batik.dom.util.XLinkSupport;
ImageNode imageNode = (ImageNode)super.createGraphicsNode(ctx, e);
if (imageNode == null) {
protected void initializeDynamicSupport(BridgeContext ctx,
Element e,
... | 0 |
* Repository version is not required
*/
NOT_REQUIRED,
/**
INSTALLING,
INSTALLED,
INSTALL_FAILED,
OUT_OF_SYNC,
CURRENT,
UPGRADING,
UPGRADE_FAILED,
UPGRADED | 0 |
import org.apache.hadoop.metadata.repository.Constants; | 0 |
@Column(name = "view_instance_id", nullable = false, insertable = false, updatable = false)
private Long viewInstanceId;
@JoinColumn(name = "view_instance_id", referencedColumnName = "view_instance_id", nullable = false),
@JoinColumn(name = "view_name", referencedColumnName = "view_name", nullable = false)... | 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 void consume(final ByteBuffer byteBuffer) throws IOException { | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/decorators/Attic/TypedSet.java,v 1.4 2003/08/31 17:24:46 scolebourne Exp $
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear... | 0 |
import org.apache.http.protocol.HttpCoreContext;
import org.apache.http.protocol.HttpProcessorBuilder;
HttpProcessor httpproc = HttpProcessorBuilder.create()
.add(new ResponseDate())
.add(new ResponseServer("Test/1.1"))
.add(new ResponseContent())
... | 0 |
assertEquals(tpc.proxy().getMaxRow(userpass, testtable, null, null, true, null, true), ByteBuffer.wrap("9".getBytes()));
assertEquals(tpc.proxy().getMaxRow(userpass, testtable, null, null, true, null, true), ByteBuffer.wrap("5".getBytes())); | 1 |
protected Class<?> getterClass;
if ( getterClass != null )
return getterClass;
getterClass = value.getClass();
ret = new StringBuilder( "((" ).append(
ExpressionCompiler.getCastString( context.getCurrentObject().getClass() ) ).append( ")" ).append(
... | 0 |
/* $Id$
*
* 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"); ... | 0 |
import org.apache.felix.scr.impl.BundleComponentActivator;
// component activator may be null if disposed concurrently
BundleComponentActivator bca = m_componentManager.getActivator();
if ( bca == null )
{
return null;
}
// get bun... | 0 |
package org.apache.accumulo.maven.plugin; | 0 |
import org.apache.accumulo.core.client.ClientInfo;
* <li>{@link AccumuloInputFormat#setClientInfo(JobConf, ClientInfo)} | 0 |
static org.slf4j.Logger LOG =
LOG.error("Verification crashed for " + filename);
LOG.error("Verification failed for " + filename);
LOG.error("Verification crashed for " + filename);
LOG.error("Verification failed for " + filename);
LOG.error("Verification ... | 0 |
groupHolder.skippable = group.skippable;
groupHolder.allowRetry = group.allowRetry;
* Indicate whether retry is allowed for the stages in this group.
*/
public boolean allowRetry = true;
/**
* Indicates whether the stages in this group are skippable on failure. If a
* stage is ... | 0 |
throw exception; | 0 |
private static Map unknown_attributes = new HashMap(); | 0 |
String zkRoot = HAConfiguration.getZookeeperProperties(configuration).getZkRoot();
leaderLatch = curatorFactory.leaderLatchInstance(serverId, zkRoot); | 0 |
public void initialize(ServerContext context) {
zkAuthenticator.initialize(context); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/test/org/apache/commons/digester/BeanPropertySetterRuleTestCase.java,v 1.11 2003/10/05 15:35:50 rdonkin Exp $
* $Revision: 1.11 $
* $Date: 2003/10/05 15:35:50 $
* =====================================================... | 0 |
private CacheEntryFactory mockEntryGenerator;
mockEntryGenerator = EasyMock.createMock(CacheEntryFactory.class); | 0 |
/** Tests the CoGbkResult. */
* This will create a list of RawUnionValues whose tags are as given and values are increasing
* starting at 0 (i.e. the index in the constructor).
/** Returns the highest position iterated to so far, useful for ensuring laziness. */ | 1 |
Constructor cons = c.getConstructor(new Class[0]);
Object o = cons.newInstance(new Object[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... | 0 |
@Override | 0 |
try (final SSLSocket sslSocket = (SSLSocket) socketFactory.connectSocket(
TimeValue.ZERO_MILLISECONDS,
socket,
target,
remoteAddress,
null,
try (final SSLSocket sslSocket = (SSLSocket) socketFacto... | 0 |
* messages will only contain a {@link PubsubMessage#getPayload() payload}, but no {@link
* messages will contain both a {@link PubsubMessage#getPayload() payload} and {@link
payload = message.getPayload();
return new String(input.getPayload(), StandardCharsets.UTF_8);
return CoderUtils.decod... | 0 |
if (total == 1 && info.getRange().isMeta()) {
// root tablet watcher trying to merge metadata tablets it won't even scan
log.debug("ignoring merge of " + info.getRange());
return state;
}
if (extent.isMeta())
range = new Range(Constants.METADATA_ROOT_TABLET_KEYSPACE); | 0 |
("resources/svg10.dtd").toString()); | 0 |
public void testConfigOverrides() {
SiteConfiguration conf = SiteConfiguration.create();
SiteConfiguration.clearInstance();
conf = SiteConfiguration.create((URL) null,
ImmutableMap.of(Property.INSTANCE_ZK_HOST.getKey(), "myhost:2181"));
Map<String,String> results = new HashMap<>();
conf.g... | 0 |
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
| 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/PrimitiveBean.java,v 1.2 2003/10/05 13:33:29 rdonkin Exp $
* $Revision: 1.2 $
* $Date: 2003/10/05 13:33:29 $
* ====================================================================
... | 0 |
import org.apache.ambari.server.controller.spi.Resource; | 0 |
ServiceConfigVersion,
public static final Type ServiceConfigVersion = InternalType.ServiceConfigVersion.getType(); | 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 |
/*
* Copyright 2001-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 la... | 0 |
List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes()), ByteBuffer.wrap(timeType.name().getBytes()));
List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes()), start == null ? EMPTY : TextUtil.getByteBuffer(start), end == null ? EMPTY
List<ByteBuffer> args = Arrays.as... | 0 |
public void fetch(ScannerBase sb) {
sb.fetchColumn(colf, colq);
public void put(Mutation m, Value v) {
m.put(colf, colq, v);
public void putDelete(Mutation m) {
m.putDelete(colf, colq);
| 0 |
import java.io.*;
import java.util.*;
import java.util.jar.*;
URL[] path = new URL[artifacts.size() + 1];
final String targetDirectory = this.getProject().getBuild().getOutputDirectory();
try {
path[path.length - 1] = new File(targetDirectory).toURI().toURL();
} catch (IOExce... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.