Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.hc.core5.annotation.Immutable;
import org.apache.hc.core5.util.Args; | 1 |
import static org.apache.commons.collections.map.LazySortedMap.getLazySortedMap;
import org.junit.Test;
public class TestLazySortedMap<K, V> extends AbstractTestSortedMap<K, V> {
private static final Factory<Integer> oneFactory = FactoryUtils.constantFactory(1);
@Override
public SortedMap<K,V> makeObje... | 0 |
public long getContextServiceId() | 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.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.service.Serviceable;
* @version CVS $Id: XScriptObject.java,v 1.3 2004/02/07 15:20:09 joerg Exp $
public abstract class XScriptObject implements Source, Serviceable... | 0 |
import org.apache.accumulo.cluster.ClusterServerType;
assertEquals(96 * 1024 * 1024l, config.getMemory(ClusterServerType.MASTER));
assertEquals(96 * 1024 * 1024l, config.getMemory(ClusterServerType.TABLET_SERVER));
config.setMemory(ClusterServerType.MASTER, 256, MemoryUnit.MEGABYTE);
assertEquals(256 * ... | 0 |
// Make sure that the magic number is written before padding.
logStream.flush(); | 0 |
import org.apache.accumulo.core.client.IteratorSetting;
import org.apache.accumulo.core.client.admin.TableOperations;
import org.apache.accumulo.core.iterators.user.VersioningIterator;
public static Map<String,String> generateAggTableProperties(List<? extends PerColumnIteratorConfig> aggregators) {
Map<String,Str... | 0 |
import org.apache.sshd.util.test.BaseTestSupport;
File path = assertHierarchyTargetFolderExists(getTargetRelativeFile(TEMP_SUBFOLDER_NAME, getClass().getSimpleName())); | 0 |
import org.apache.accumulo.trace.thrift.TInfo;
* @see org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Iface#removeLogs(org.apache.accumulo.trace.thrift.TInfo, | 0 |
CRYPTO_SECURITY_PROVIDER("crypto.security.provider", "", PropertyType.STRING,
"States the security provider to use, and defaults to the system configured provider"),
@Experimental | 0 |
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights | 0 |
public class JellyGenerator extends ServiceableGenerator | 0 |
static final ByteKey[] RANGE_TEST_KEYS = | 0 |
"will be used to ensure backwards compatibility with older Hadoop versions. A value of 'hflush' is the alternative to the default value " +
"of 'hsync' which will result in faster writes, but with less durability"), | 0 |
* This renderer aspect tests, if a coplet is sizable and/or maxpageable and adds
* tags holding URIs for switching to currently inactive modes (i.e. maximize or
* minimize).
*
* <h2>Example XML:</h2>
* <pre>
* <minimize-uri>minimize-event</minimize-uri>
* <!-- output from following renderers... | 0 |
private boolean isInitialized = false;
this.aggregate = Suppliers.memoize(
() -> {
initialize();
return aggregate.get();
}
);
}
private void initialize() {
isInitialized = true; // inlining this assignment yields a PMD false positive
private static ImmutableMult... | 0 |
private static final Logger LOG = LoggerFactory.getLogger(JdbcIOTest.class);
LOG.info("Starting Derby database on {}", port); | 0 |
public static final short TYPE = 3; | 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 |
public boolean testableWaitForShutdown(int wait)
throws InterruptedException
{
return super.testableWaitForShutdown(wait);
} | 0 |
import org.apache.http.client.config.RequestConfig;
*
* @deprecated (4.3) use {@link RequestConfig}
@Deprecated | 0 |
/*
* Copyright 2006 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 |
* 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 |
for (String key : map.keySet()) { | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/decorators/Attic/ProxyIntListIterator.java,v 1.4 2003/11/07 20:17:13 rwaldhoff Exp $
* @deprecated This code has been moved to Jakarta Commons Primitives (http://jakart... | 0 |
import static org.easymock.EasyMock.createNiceMock;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.replay;
import org.apache.ambari.server.state.StackId;
import org.apache.ambari.server.state.State;
if (type == Resource.Type.Cluster) {
}
if (type == Resource.Type.Serv... | 0 |
public StdoutSink() {
this(false);
}
public StdoutSink(boolean debug) {
this(debug, 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 to You under the Apache License, Version 2.0
* (the "License"); you may not... | 0 |
import org.apache.hc.core5.util.Timeout;
* Secures current session layer with TLS security.
* @param handshakeTimeout the timeout to use while performing the TLS handshake; may be {@code null}.
Object attachment,
Timeout handshakeTimeout); | 0 |
public final class Canonicalizer { | 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 |
protected BeamKafkaTable(Schema beamSchema) {
super(beamSchema);
}
| 0 |
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.options.PipelineOptionsFactory;
PipelineOptions options = PipelineOptionsFactory.create().as(TestSparkPipelineOptions.class);
TestSparkPipelineOptions options =
PipelineOptionsFactory.create().as(TestSparkPipelineOptions.clas... | 0 |
kryo -> { //KryoRegistrar of your uwn | 0 |
public CharArrayBuffer formatRequestLine(CharArrayBuffer buffer,
RequestLine reqline) {
public CharArrayBuffer formatStatusLine(CharArrayBuffer buffer,
StatusLine statline) {
/**
* Formats a header.
*
* @... | 0 |
import org.apache.felix.utils.json.JSONParser;
JSONParser jp = new JSONParser(in); | 0 |
* Registers {@code coderClazz} as the default {@link Coder} class to handle encoding and
* decoding instances of {@code clazz}, overriding prior registrations if any exist.
* <p> Supposing {@code T} is the static type corresponding to the {@code clazz}, then
* {@code coderClazz} should have a static factory... | 0 |
p.apply("ReadLines", TextIO.read().from(options.getInput())) | 0 |
package examples;
import org.apache.commons.net.*; | 0 |
if (bs.offset() != 0) {
throw new IllegalArgumentException("The offset cannot be non-zero.");
} | 0 |
dos.writeByte(super.getType()); // u1 type of value (ANNOTATION == '@') | 0 |
final Dataset<OUT> createOutput(final Dataset<IN> input, Set<OutputHint> outputHints) {
this.hints = outputHints; | 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 |
/**
* 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 to in writing, software
* distribu... | 0 |
/**
*
* @since 4.0
*/ | 0 |
@SuppressWarnings("deprecation")
* @deprecated since 4.1, use {@link MultiValuedMap} instead
@Deprecated
* @param collectionClass the type of collections to return from the map
* (must contain public no-arg constructor and extend Collection)
* @deprecated since 4.1, use {@link MultiValuedMap}... | 0 |
import com.google.common.util.concurrent.AbstractIdleService;
class NoopCronScheduler extends AbstractIdleService implements CronScheduler {
public void startUp() throws Exception {
LOG.warning("NO-OP cron scheduler is in use. Cron jobs submitted will not be triggered!");
}
@Override
public void shutDown()... | 0 |
KEY_SHOW_VERSION + " : " + this.showCocoonVersion + '\n'; | 0 |
init(true);
@Test
public void missingClusterVersionShouldNotCauseException() throws Exception {
init(false);
activeRepoUpdater.process();
}
public void init(boolean addClusterVersion) throws Exception {
if (addClusterVersion) {
repoVersion = new RepositoryVersionEntity();
repoVersio... | 0 |
import java.io.InputStream;
* @param buffer Session input buffer
* @param inputStream Input stream
T parse(SessionInputBuffer buffer, InputStream inputStream) throws IOException, HttpException; | 1 |
PrintStream out =
new PrintStream(new BufferedOutputStream(fs.create(new Path(opts.outputFile)))); | 0 |
return (SftpClient) Proxy.newProxyInstance(loader, interfaces, (proxy, method, args) -> {
Throwable err = null;
Object result = null;
String name = method.getName();
try {
result = method.invoke(client, args);
} catch (Throwable t) {
... | 0 |
package org.apache.bcel.generic;
super(org.apache.bcel.Const.POP); | 1 |
public AgentCommandType getCommandType() {
return commandType;
}
public void setCommandType(AgentCommandType commandType) {
this.commandType = commandType;
} | 1 |
import org.apache.beam.sdk.transforms.OldDoFn;
PCollection<String> output = strings.apply(ParDo.of(new OldDoFn<String, String>() { | 0 |
@Override
public void run() { | 0 |
import org.apache.hc.core5.http.nio.pool.BasicNIOPoolEntry; | 0 |
* Static utility methods for working with {@link CoderProvider CoderProviders}.
* implements {@link Coder}. The requirements for this method are precisely the requirements
* for a {@link Coder} class to be usable with {@link DefaultCoder} annotations. | 0 |
import org.apache.accumulo.server.master.Master;
public long close(Master master, FileSystem fs, Path path) throws IOException; | 0 |
import org.apache.felix.framework.Logger;
import org.apache.felix.framework.util.FelixConstants;
import org.apache.felix.framework.util.Util;
import org.apache.felix.framework.util.WeakZipFileFactory;
import org.apache.felix.framework.util.WeakZipFileFactory.WeakZipFile;
import org.osgi.framework.Constants;
... | 0 |
localWindow.consumeAndCheck(len); | 0 |
* Autogenerated by Thrift Compiler (0.9.3) | 0 |
public static final String CONFIGURATION_CONFIG_VERSION_PROPERTY_ID =
PropertyHelper.getPropertyId(null, "version");
resource.setProperty(CONFIGURATION_CONFIG_VERSION_PROPERTY_ID, response.getVersion()); | 0 |
import org.apache.http.util.Args;
Args.notNull(channel, "Channel"); | 0 |
import java.util.Set;
import com.google.common.collect.FluentIterable;
import com.twitter.aurora.scheduler.base.Tasks;
Query.Builder query = Query.unscoped();
Set<String> ids = FluentIterable.from(storeProvider.getTaskStore().fetchTasks(query))
.transform(Tasks.SCHEDULED_TO_ID)
.... | 0 |
* @version $Id$
if (servletPath == null) {
newServletPath = pathInfo.substring(0, prefix.length() + 1);
newServletPath = servletPath + pathInfo.substring(0, prefix.length() + 1);
manageException(req, res, env, uri, errorStatus, title, message, description, e, settings, logger.... | 0 |
*
*
*
*
* after initial setup.
*
*
*
*
*
}
return QuotedPrintableCodec.decodeQuotedPrintable(bytes);
*
*
*
*
*
*
*
*
*
*
*
throw new EncoderException("Objects of type " +
obj.getClass().getName() +... | 1 |
import javax.servlet.ServletContext;
import org.apache.avalon.framework.logger.Log4JLogger;
ApplicationContext parent,
boolean addCocoon)
final String xmlConfig = (new XmlConfig... | 0 |
public Service add(List dependencies); | 0 |
/**
* 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 to in writing, software
* distribu... | 0 |
import java.util.*;
import org.apache.felix.framework.searchpolicy.R4Package;
import org.apache.felix.framework.util.ManifestParser;
R4Package[] pkgs = ManifestParser.parseImportExportHeader(pkgString); | 0 |
import org.apache.beam.model.fnexecution.v1.BeamFnApi; | 0 |
import java.io.UnsupportedEncodingException;
import javax.mail.internet.MimeUtility;
if (paramValue != null) {
try {
paramValue = MimeUtility.decodeText(paramValue);
} catch (UnsupportedEncodingException e) {
// le... | 0 |
Thread.sleep(attempts * 250L); | 0 |
import org.apache.ambari.server.events.publishers.STOMPUpdatePublisher;
private STOMPUpdatePublisher STOMPUpdatePublisher;
public ServiceUpdateListener(STOMPUpdatePublisher STOMPUpdatePublisher, AmbariEventPublisher ambariEventPublisher) {
STOMPUpdatePublisher.register(this);
this.STOMPUpdatePublisher = STO... | 1 |
import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryo.io.Input;
import com.esotericsoftware.kryo.io.Output;
import org.objenesis.strategy.StdInstantiatorStrategy;
kryo.setInstantiatorStrategy(new StdInstantiatorStrategy());
//Serialization of object without any memoization
ByteArrayOutputS... | 0 |
import org.apache.mesos.Protos.Credential;
import org.apache.mesos.Protos.FrameworkInfo;
import org.apache.mesos.v1.Protos;
import static org.apache.aurora.scheduler.mesos.ProtosConversion.convert;
Protos.FrameworkInfo frameworkInfo,
FrameworkInfo convertedFrameworkInfo = convert(frameworkInfo);
Optional... | 0 |
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List; | 0 |
* Copyright 2004,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 |
public final class InstanceofPredicate implements Predicate<Object>, Serializable {
private final Class<?> iType;
*
public static Predicate<Object> getInstance(Class<?> type) {
*
public InstanceofPredicate(Class<?> type) {
*
*
public Class<?> getType() { | 0 |
* @throws ParseException if there are any problems encountered
* while parsing the command line token. | 0 |
/**
* Copyright 2013 Apache Software Foundation | 0 |
import org.apache.beam.sdk.testing.FileChecksumMatcher;
options.setOnSuccessMatcher(
new FileChecksumMatcher("c04722202dee29c442b55ead54c6000693e85e77",
options.getOutput() + "*")); | 0 |
private static final ImmutableListBundleFactory FACTORY = new ImmutableListBundleFactory();
return FACTORY; | 0 |
return INSTANCE; | 0 |
// do not use the DefaultEquator to keep backwards compatibility
// the DefaultEquator returns also true if the two object references are equal
this(object, null);
if (equator != null) {
return equator.equate(iValue, object);
} else {
return iValue.equals(... | 0 |
* @version CVS $Id: JSPEngineImplNamedDispatcherInclude.java,v 1.2 2003/03/24 14:33:56 stefano Exp $ | 0 |
import org.apache.ambari.server.hooks.HookContextFactory;
import org.apache.ambari.server.hooks.HookService;
import org.apache.ambari.server.hooks.users.UserHookService;
bind(HookService.class).toInstance(createMock(HookService.class));
bind(HookContextFactory.class).toInstance(createMock(HookConte... | 0 |
public class BufferUtilsTest extends BulkTest {
public BufferUtilsTest(String name) {
return BulkTest.makeSuite(BufferUtilsTest.class); | 0 |
@Column(name="from_version", nullable = false)
private String fromVersion = null;
@Column(name="to_version", nullable = false)
private String toVersion = null;
/**
* @return the "from" version
*/
public String getFromVersion() {
return fromVersion;
}
/**
* @param version the "from" vers... | 0 |
if (!name.equals(oldProperties[i].getName())) { | 0 |
package org.apache.felix.ipojo.runtime.core.test.components;
import org.apache.felix.ipojo.annotations.Component;
@Component(architecture=false)
public class NoArch {
} | 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 |
package org.apache.cocoon.portal.util;
* @version CVS $Id: CopletBaseDataReferenceFieldHandler.java,v 1.1 2003/05/26 14:29:52 cziegeler Exp $
if (copletBaseData == null)
throw new IllegalArgumentException("Referenced Coplet Base Data "+value+" does not exist."); | 0 |
boolean hasNamespacePermission(String user, String namespace, NamespacePermission permission)
throws NamespaceNotFoundException;
boolean hasCachedNamespacePermission(String user, String namespace,
void grantNamespacePermission(String user, String namespace, NamespacePermission permission)
void revokeNames... | 0 |
* This class represents a <font-face> element or @font-face rule | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableSet;
import org.apache.beam.vendor.guava.v20_0.com.google.common.graph.MutableNetwork; | 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 ASTArrayLiteral extends JexlNode {
protected boolean isConstant(boolean literal) {
return constant;
/** {
* @inheritDoc} */
constant = true;
if (children != null) {
for (int c = 0; c < children.length && constant; ++c) {
JexlNode child ... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.