Diff
stringlengths 5
2k
| FaultInducingLabel
int64 0
1
|
---|---|
import org.apache.beam.runners.core.construction.TransformInputs;
return Iterables.getOnlyElement(TransformInputs.nonAdditionalInputs(getCurrentTransform())); | 0 |
* @version $Revision$ $Date$ | 0 |
import org.apache.hc.core5.http.ClassicHttpRequest;
import org.apache.hc.core5.http.ClassicHttpResponse;
import org.apache.hc.core5.http.message.BasicClassicHttpRequest;
final ClassicHttpResponse response = conn.receiveResponseHeader();
final ClassicHttpResponse response = conn.receiveResponseHeader();
final ClassicHttpResponse response = conn.receiveResponseHeader();
final ClassicHttpResponse response = conn.receiveResponseHeader();
final ClassicHttpResponse response = conn.receiveResponseHeader();
final ClassicHttpRequest request = new BasicClassicHttpRequest("GET", "/stuff");
final ClassicHttpRequest request = new BasicClassicHttpRequest("POST", "/stuff");
final ClassicHttpRequest request = new BasicClassicHttpRequest("POST", "/stuff");
final ClassicHttpRequest request = new BasicClassicHttpRequest("POST", "/stuff");
final ClassicHttpRequest request = new BasicClassicHttpRequest("POST", "/stuff");
final ClassicHttpRequest request = new BasicClassicHttpRequest("POST", "/stuff");
final ClassicHttpRequest request = new BasicClassicHttpRequest("POST", "/stuff");
final ClassicHttpRequest request = new BasicClassicHttpRequest("POST", "/stuff"); | 0 |
* <p>
* This class is Serializable from Commons Collections 3.1.
* @version $Revision: 1.6 $ $Date: 2004/04/09 10:36:01 $
*
* @param out the output stream
* @throws IOException
* @since Commons Collections 3.1
*
* @param in the input stream
* @throws IOException
* @throws ClassNotFoundException
* @since Commons Collections 3.1 | 0 |
Object getDetail();
void initCustomEventNS(String namespaceURI,
String typeArg,
boolean canBubbleArg,
boolean cancelableArg,
Object detailArg); | 0 |
import org.joda.time.Duration;
import org.joda.time.Instant;
private static final Instant NOW = Instant.now();
WatermarkPolicyFactory watermarkPolicyFactory = WatermarkPolicyFactory.withArrivalTimePolicy();
iterator =
new ShardRecordsIterator(
firstCheckpoint, kinesisClient, watermarkPolicyFactory, recordFilter);
when(a.getApproximateArrivalTimestamp()).thenReturn(NOW);
when(b.getApproximateArrivalTimestamp()).thenReturn(NOW.plus(Duration.standardSeconds(1)));
when(c.getApproximateArrivalTimestamp()).thenReturn(NOW.plus(Duration.standardSeconds(2)));
when(d.getApproximateArrivalTimestamp()).thenReturn(NOW.plus(Duration.standardSeconds(3)));
when(a.getApproximateArrivalTimestamp()).thenReturn(NOW);
when(b.getApproximateArrivalTimestamp()).thenReturn(NOW.plus(Duration.standardSeconds(1)));
| 0 |
public interface DerivedTestOptions extends BaseTestOptions {
/** Test interface. */
public interface ConflictedTestOptions extends BaseTestOptions {
/** Test interface. */
public interface BaseTestOptions extends PipelineOptions {
/** Test interface. */
public interface ValueProviderOptions extends PipelineOptions { | 0 |
import javax.persistence.CascadeType;
@ManyToOne(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH})
return (widgetLayout.equals(that.widgetLayout) && widget.equals(that.widget)); | 0 |
import static org.apache.atlas.model.typedef.AtlasBaseTypeDef.SERVICE_TYPE_ATLAS_CORE;
super(AtlasBaseTypeDef.getArrayTypeName(elementType.getTypeName()), TypeCategory.ARRAY, SERVICE_TYPE_ATLAS_CORE);
super(AtlasBaseTypeDef.getArrayTypeName(elementTypeName), TypeCategory.ARRAY, SERVICE_TYPE_ATLAS_CORE); | 0 |
import com.google.cloud.dataflow.sdk.io.AvroIO.Write.Bound;
import java.io.IOException;
private void runTestWrite(String[] expectedElements, int numShards) throws IOException {
File baseOutputFile = new File(tmpFolder.getRoot(), "prefix");
String outputFilePrefix = baseOutputFile.getAbsolutePath();
Bound<String> write = AvroIO.Write.to(outputFilePrefix).withSchema(String.class);
if (numShards > 1) {
write = write.withNumShards(numShards).withShardNameTemplate(ShardNameTemplate.INDEX_OF_MAX);
} else {
write = write.withoutSharding();
}
p.apply(Create.<String>of(expectedElements)).apply(write);
List<File> expectedFiles = new ArrayList<>();
if (numShards == 1) {
expectedFiles.add(baseOutputFile);
} else {
for (int i = 0; i < numShards; i++) {
expectedFiles.add(
new File(
IOChannelUtils.constructName(
outputFilePrefix,
ShardNameTemplate.INDEX_OF_MAX,
"" /* no suffix */,
i,
numShards)));
}
}
List<String> actualElements = new ArrayList<>();
for (File outputFile : expectedFiles) {
assertTrue("Expected output file " + outputFile.getName(), outputFile.exists());
try (DataFileReader<String> reader =
new DataFileReader<>(outputFile, AvroCoder.of(String.class).createDatumReader())) {
Iterators.addAll(actualElements, reader);
}
assertThat(actualElements, containsInAnyOrder(expectedElements));
@Test
public void testAvroSinkWrite() throws Exception {
String[] expectedElements = new String[] {"first", "second", "third"};
runTestWrite(expectedElements, 1);
}
@Test
public void testAvroSinkShardedWrite() throws Exception {
String[] expectedElements = new String[] {"first", "second", "third", "fourth", "fifth"};
runTestWrite(expectedElements, 4);
}
// TODO: for Write only, test withSuffix, | 0 |
import org.apache.beam.sdk.annotations.Experimental;
* Sets a {@link Schema} on this {@link PCollection}. This is a wrapper around
* {@link #setCoder(Coder)}.
*/
@Experimental
public PCollection<T> setSchema(
Schema schema,
SerializableFunction<T, Row> toRowFunction,
SerializableFunction<Row, T> fromRowFunction) {
return setCoder(SchemaCoder.of(getTypeDescriptor(), schema, toRowFunction, fromRowFunction));
}
/** | 0 |
Copyright 2001 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 or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/ | 0 |
public void createControl(Composite parent)
formText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
browse.addSelectionListener(new SelectionAdapter()
{
public void widgetSelected(SelectionEvent e)
{
FormSelectionDialog dialog = new FormSelectionDialog(getShell());
if (dialog.open() == Window.OK)
{
configurationView.setLayout(new GridLayout(3, false));
if (loc.trim().length() > 0)
{
setErrorMessage("Invalid form file " + e.getMessage());
else
{
public void initializeFrom(ILaunchConfiguration config)
formLocation = config.getAttribute(
OSGiLaunchConfigurationConstants.FORM_FILE_LOCATION, "");
public void performApply(ILaunchConfigurationWorkingCopy config)
config.setAttribute(OSGiLaunchConfigurationConstants.FORM_FILE_LOCATION,
formLocation);
config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER,
OSGiLaunchConfigurationConstants.CLASSPATH_PROVIDER);
config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER,
OSGiLaunchConfigurationConstants.CLASSPATH_PROVIDER);
public void setDefaults(ILaunchConfigurationWorkingCopy config)
config.setAttribute(OSGiLaunchConfigurationConstants.FORM_FILE_LOCATION,
(String) null); | 0 |
/**
* {@link org.apache.http.protocol.HttpContext Context}
* attribute names for client.
*/
public interface ClientContext { | 0 |
public Object invoke(final Object proxy, final Method method, final Object[] args) | 0 |
import org.apache.beam.sdk.util.WindowingStrategy;
return getTypeInfo(collection.getCoder(), collection.getWindowingStrategy());
}
@SuppressWarnings("unchecked")
public <T> TypeInformation<WindowedValue<T>> getTypeInfo(
Coder<T> coder,
WindowingStrategy<?, ?> windowingStrategy) {
coder,
windowingStrategy.getWindowFn().windowCoder()); | 0 |
__threaded = true; // tell _processChar that we are running threaded | 0 |
if (status.isDirectory()) { | 0 |
cipherOutputStream, "UTF-8")); | 0 |
private static Map<Resource.Type, String> keyPropertyIds = new HashMap<>();
private static Set<String> propertyIds = new HashSet<>();
return new HashSet<>(keyPropertyIds.values()); | 1 |
final UnaryFunction stateFactory = reduceStateByKey.getStateFactory(); | 0 |
return new NullIsExceptionPredicate<>(predicate); | 1 |
context.getClient()); | 0 |
public void process(@Element Integer e,
MultiOutputReceiver r) {
for (int i = 0; i < e; i++) {
r.get(food).outputWithTimestamp(
KV.of("foo", e),
r.get(originals).output(e);
public void process(@Element KV<String, Iterable<Integer>> e,
OutputReceiver<KV<String, Set<Integer>>> r) {
r.output(
KV.of(e.getKey(), ImmutableSet.copyOf(e.getValue()))); | 0 |
import org.apache.atlas.utils.AtlasPerfTracer;
import org.slf4j.Logger;
private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.TypesREST");
AtlasPerfTracer perf = null;
try {
if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "TypesREST.createAtlasTypeDefs(" +
AtlasTypeUtil.toDebugString(typesDef) + ")");
}
return typeDefStore.createTypesDef(typesDef);
} finally {
AtlasPerfTracer.log(perf);
}
AtlasPerfTracer perf = null;
try {
if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "TypesREST.updateAtlasTypeDefs(" +
AtlasTypeUtil.toDebugString(typesDef) + ")");
}
return typeDefStore.updateTypesDef(typesDef);
} finally {
AtlasPerfTracer.log(perf);
}
AtlasPerfTracer perf = null;
try {
if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "TypesREST.deleteAtlasTypeDefs(" +
AtlasTypeUtil.toDebugString(typesDef) + ")");
}
typeDefStore.deleteTypesDef(typesDef);
} finally {
AtlasPerfTracer.log(perf);
}
}
} | 0 |
* @version CVS $Id: EPTop.java,v 1.2 2003/03/11 19:05:01 vgritsenko Exp $ | 0 |
private boolean staleConfig = false;
/**
* @return if the configs are stale
*/
public boolean isStaleConfig() {
return staleConfig;
}
/**
* @param stale
*/
public void setStaleConfig(boolean stale) {
staleConfig = stale;
}
| 0 |
*
@Mojo( name = "bundleall", requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.PACKAGE )
* Process up to some depth
@Override
*
*
*
*
*
@Override
* TODO there has to be another way to do this using Maven libs
*
* @param bundleName bundle file name | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/jeez/src/java/org/apache/commons/jelly/tags/jeez/Attic/JeezTagLibrary.java,v 1.8 2002/10/03 18:14:43 jstrachan Exp $
* $Revision: 1.8 $
* $Date: 2002/10/03 18:14:43 $
* $Id: JeezTagLibrary.java,v 1.8 2002/10/03 18:14:43 jstrachan Exp $
* @version $Revision: 1.8 $
return new TagScript(
return new TagScript(
return new TagScript( | 0 |
package cz.seznam.euphoria.core.client.dataset;
import cz.seznam.euphoria.core.client.flow.Flow; | 0 |
package cz.seznam.euphoria.core.executor.io;
import org.junit.Before;
TmpFolderSpillFileFactory spillFiles;
@Before
public void setUp() {
spillFiles = new TmpFolderSpillFileFactory(folder);
assertEquals(Collections.emptyList(), spillFiles.getCreatedFiles());
assertEquals(1, spillFiles.getCreatedFiles().size());
assertTrue(spillFiles.getCreatedFiles().get(0).exists());
assertFalse(spillFiles.getCreatedFiles().get(0).exists());
assertEquals(1, spillFiles.getCreatedFiles().size());
assertTrue(spillFiles.getCreatedFiles().get(0).exists());
assertFalse(spillFiles.getCreatedFiles().get(0).exists()); | 0 |
// FIXME - this is a workaround
if ( this.environment.classloader == null ) {
this.environment.classloader = Thread.currentThread().getContextClassLoader();
if ( this.environment.classloader == null ) {
this.environment.classloader = this.getClass().getClassLoader();
}
}
this.serviceClass = this.environment.classloader.loadClass(this.serviceInfo.getServiceClassName()); | 0 |
public ImageHandlerJPEGEncoder(String imageDir, String urlRoot)
throws SVGGraphics2DIOException {
public final String getSuffix() {
public final String getPrefix() {
public void encodeImage(BufferedImage buf, File imageFile)
throws SVGGraphics2DIOException {
} catch(IOException e) {
throw new SVGGraphics2DIOException(ERR_WRITE+imageFile.getName()); | 0 |
public <R,P> R accept(NodeVisitor<? extends R, ? super P> visitor, P data)
{
return visitor.visit(this, data);
} | 0 |
if (ambariServer != null) {
ambariServer.run();
} | 0 |
this.authenticator = new HttpAuthenticator(log); | 0 |
public class HtmlCleaningConvertorBuilder implements StringConvertorBuilder {
private CacheManager cacheManager;
private SourceResolver sourceResolver;
public void setCacheManager( CacheManager cacheManager )
{
this.cacheManager = cacheManager;
}
public void setSourceResolver( SourceResolver sourceResolver )
{
this.sourceResolver = sourceResolver;
} | 0 |
c.setDst(new File("ZYZ::/cannotCreate\000")); | 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 use this file except in compliance with
* the License. You may obtain a copy of the License at | 0 |
private long agentStartTime;
public long getAgentStartTime() {
return agentStartTime;
}
public void setAgentStartTime(long agentStartTime) {
this.agentStartTime = agentStartTime;
}
"startTime=" + agentStartTime + "\n" + | 0 |
public class XMLX509IssuerSerial extends SignatureElementProxy implements XMLX509DataContent {
private static org.apache.commons.logging.Log log =
org.apache.commons.logging.LogFactory.getLog(XMLX509IssuerSerial.class.getName());
public XMLX509IssuerSerial(Element element, String baseURI) throws XMLSecurityException {
public XMLX509IssuerSerial(Document doc, String x509IssuerName, BigInteger x509SerialNumber) {
public XMLX509IssuerSerial(Document doc, String x509IssuerName, String x509SerialNumber) {
public XMLX509IssuerSerial(Document doc, String x509IssuerName, int x509SerialNumber) {
this(doc, x509IssuerName, new BigInteger(Integer.toString(x509SerialNumber)));
this(
doc,
RFC2253Parser.normalize(x509certificate.getIssuerDN().getName()),
x509certificate.getSerialNumber()
);
String text =
this.getTextFromChildElement(Constants._TAG_X509SERIALNUMBER, Constants.SignatureSpecNS);
if (log.isDebugEnabled()) {
}
return RFC2253Parser.normalize(
this.getTextFromChildElement(Constants._TAG_X509ISSUERNAME, Constants.SignatureSpecNS)
);
&& this.getIssuerName().equals(other.getIssuerName()); | 0 |
import org.apache.ambari.server.state.SecurityState;
@Column(name = "security_state", nullable = false, insertable = true, updatable = true)
@Enumerated(value = EnumType.STRING)
private SecurityState securityState = SecurityState.UNSECURED;
@Basic
public SecurityState getSecurityState() {
return securityState;
}
public void setSecurityState(SecurityState securityState) {
this.securityState = securityState;
}
| 0 |
/**
* @since 6.0
*/
/**
* @since 6.0
*/
/**
* @since 6.0
*/
/**
* @since 6.0
*/
/**
* @since 6.0
*/
/**
* @since 6.0
*/ | 0 |
import org.apache.http.concurrent.Cancellable;
@SuppressWarnings("deprecation")
implements HttpUriRequest, HttpExecutionAware, AbortableHttpRequest, Cloneable {
private Cancellable cancellable;
@Deprecated
public void setConnectionRequest(final ClientConnectionRequest connRequest) {
return;
this.cancellable = new Cancellable() {
public boolean cancel() {
connRequest.abortRequest();
return true;
}
};
@Deprecated
public void setReleaseTrigger(final ConnectionReleaseTrigger releaseTrigger) {
return;
this.cancellable = new Cancellable() {
public boolean cancel() {
try {
releaseTrigger.abortConnection();
return true;
} catch (IOException ex) {
return false;
}
}
};
private void cancelExecution() {
if (this.cancellable != null) {
this.cancellable.cancel();
this.cancellable = null;
cancelExecution();
* @since 4.2
*/
public void started() {
}
/**
* @since 4.2
*/
public void setCancellable(final Cancellable cancellable) {
if (this.aborted) {
return;
}
this.abortLock.lock();
try {
this.cancellable = cancellable;
} finally {
this.abortLock.unlock();
}
}
/**
* @since 4.2
*/
public void completed() {
this.abortLock.lock();
try {
this.cancellable = null;
} finally {
this.abortLock.unlock();
}
}
/**
cancelExecution();
clone.cancellable = null; | 0 |
import com.twitter.common.application.ShutdownRegistry;
import com.twitter.common.base.Command;
EventSink eventSink,
ShutdownRegistry shutdownRegistry) {
eventSink,
shutdownRegistry);
final EventSink eventSink,
final ShutdownRegistry shutdownRegistry) {
checkNotNull(shutdownRegistry);
shutdownRegistry.addAction(new Command() {
@Override
public void execute() {
stateMachine.transition(State.DEAD);
}
});
| 0 |
package org.apache.accumulo.server.util;
import java.net.InetSocketAddress;
import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.server.conf.ServerConfiguration;
public class AddressUtil {
static public InetSocketAddress parseAddress(String address, Property portDefaultProperty) {
final int dfaultPort = ServerConfiguration.getSystemConfiguration().getPort(Property.TSERV_CLIENTPORT);
return org.apache.accumulo.core.util.AddressUtil.parseAddress(address, dfaultPort);
}
} | 1 |
* ImageWriter implementation that uses Batik's PNG codec to | 0 |
import org.apache.http.HttpVersion;
public class BasicHttpResponse extends AbstractHttpMessage implements HttpResponse {
public HttpVersion getHttpVersion() {
return this.statusline.getHttpVersion();
}
| 0 |
* @author <a href="mailto:[email protected]">Felix Project Team</a> | 0 |
import net.jcip.annotations.ThreadSafe;
* A connection manager for a single connection. This connection manager
* maintains only one active connection at a time. Even though this class
* is thread-safe it ought to be used by one execution thread only.
* SingleClientConnManager will make an effort to reuse the connection
* for subsequent requests with the same {@link HttpRoute route}.
* It will, however, close the existing connection and open it
* for the given route, if the route of the persistent connection does
* not match that of the connection request. If the connection has been
* already been allocated {@link IllegalStateException} is thrown.
@ThreadSafe
protected final SchemeRegistry schemeRegistry;
protected final ClientConnectionOperator connOperator;
}
protected final void assertStillUp() throws IllegalStateException {
public synchronized ManagedClientConnection getConnection(HttpRoute route, Object state) {
throw new IllegalStateException(MISUSE_MESSAGE);
public synchronized void releaseConnection(
ManagedClientConnection conn,
long validDuration, TimeUnit timeUnit) {
}
public synchronized void closeExpiredConnections() {
public synchronized void closeIdleConnections(long idletime, TimeUnit tunit) {
public synchronized void shutdown() {
* @deprecated no longer used
@Deprecated
protected void close() throws IOException {
protected void shutdown() throws IOException {
}
} | 0 |
import org.apache.ambari.view.utils.ViewUserLocal;
import org.apache.ambari.view.utils.hdfs.HdfsApi;
ViewUserLocal.dropAllConnections(HdfsApi.class); //cleanup API connection | 0 |
import org.apache.beam.vendor.grpc.v1_13_1.com.google.protobuf.ByteString; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/compiler/Expression.java,v 1.4 2003/01/11 05:41:23 dmitri Exp $
* $Revision: 1.4 $
* $Date: 2003/01/11 05:41:23 $
* @version $Revision: 1.4 $ $Date: 2003/01/11 05:41:23 $
protected static final Double ZERO = new Double(0);
protected static final Double ONE = new Double(1);
protected static final Double NOT_A_NUMBER = new Double(Double.NaN);
protected Expression(int typeCode) {
public int getExpressionTypeCode() {
protected Expression[] getArguments() {
public boolean isContextDependent() {
if (!contextDependencyKnown) {
public String toString() {
if (args != null) {
for (int i = 0; i < args.length; i++) {
if (i > 0) {
protected String opCodeToString() {
switch(typeCode) {
public Iterator iterate(EvalContext context) {
if (result instanceof EvalContext) {
return new ValueIterator((EvalContext) result);
public Iterator iteratePointers(EvalContext context) {
if (result == null) {
if (result instanceof EvalContext) {
return (EvalContext) result;
public PointerIterator(Iterator it, QName qname, Locale locale) {
public boolean hasNext() {
public Object next() {
public void remove() {
public ValueIterator(Iterator it) {
public boolean hasNext() {
public Object next() {
if (o instanceof Pointer) {
return ((Pointer) o).getValue();
public void remove() { | 1 |
// FELIX-1488: If a configuration is bound to a location and a new
// location is statically set, the old binding must be removed
// by removing the configuration from the targets and the new binding
// must be setup by updating the configuration for new targets
boolean replace = ( this instanceof ConfigurationImpl ) && ( bundleLocation != null );
if ( replace && getDynamicBundleLocation() != null && !bundleLocation.equals( getDynamicBundleLocation() ) )
{
// remove configuration from current managed service [factory]
getConfigurationManager().deleted( ( ConfigurationImpl ) this, false );
}
// check whether we have to assign the configuration to new targets
if ( replace )
{
getConfigurationManager().updated( ( ConfigurationImpl ) this, false );
} | 0 |
/**
* Copyright 2013 Apache Software Foundation | 0 |
@Inject
SessionHandlerConfigurer sessionHandlerConfigurer;
sessionHandlerConfigurer.configureSessionHandler(sessionHandler);
handlerList.shareSessionCacheToViews(sessionHandler.getSessionCache()); | 0 |
Copyright 2002-2003 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 or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/ | 0 |
// Note: Java 1.3 requires JUnit 3.8.1 which does not have assertTrue(Boolean)
assertTrue(((Boolean) entry.getValue()).booleanValue()); | 0 |
import java.io.File;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentMap;
import com.google.inject.Inject; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/DefaultMapBag.java,v 1.2 2002/06/11 02:41:47 mas Exp $
* $Revision: 1.2 $
* $Date: 2002/06/11 02:41:47 $
* @author <a href="mailto:[email protected]">Michael A. Smith</a> | 0 |
return new AtlasJanusGraphSolrIndexClient(this); | 0 |
return parent.addNode(name, type); | 0 |
import org.apache.hc.core5.annotation.Immutable;
import org.apache.hc.core5.util.Args;
import org.apache.hc.core5.util.TextUtils; | 0 |
public TestExecutionState(String stateName) {
super(stateName);
private final TestExecutionState step1act1 = new TestExecutionState("activity1");
private final TestExecutionState step1act2 = new TestExecutionState("activity2");
private final TestExecutionState step2act1 = new TestExecutionState("activity1");
return new ExecutionStateTracker(sampler); | 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 or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.cocoon.forms.datatype;
import java.util.Locale;
import org.apache.cocoon.forms.datatype.*;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
/**
* Interface to be implemented by selection lists.
* @version $Id: SelectionList.java,v 1.1 2004/03/09 10:34:01 reinhard Exp $
*/
public interface SelectionList {
public static final String SELECTION_LIST_EL = "selection-list";
public static final String ITEM_EL = "item";
public static final String LABEL_EL = "label";
Datatype getDatatype();
void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException;
} | 0 |
import java.util.Set;
private final InputStream local;
public DefaultScpStreamResolver(
String name, Path mockPath, Collection<PosixFilePermission> perms,
ScpTimestamp time, long size, InputStream local, String cmd) {
public InputStream resolveSourceStream(
Session session, long length, Set<PosixFilePermission> permissions, OpenOption... options)
throws IOException { | 0 |
Registration.registerServlet(binder(), "/structdump", StructDump.class, true); | 0 |
import org.apache.beam.sdk.transforms.OldDoFn;
private static class ElementValueDiff extends OldDoFn<Long, Long> { | 0 |
TransformResult<Integer> result = evaluator.finishBundle(); | 0 |
import org.apache.beam.runners.core.construction.ForwardingPTransform; | 0 |
StringBuilder sb = new StringBuilder(pathname.length() + 3); | 0 |
public static void defineDeptEmployeeTypes(TypeSystem ts) throws AtlasException {
public static Referenceable createDeptEg1(TypeSystem ts) throws AtlasException { | 0 |
public static final String CONTEXT = ".context";
if (CONTEXT.equals(name))
{
return processor.getContext();
}
| 0 |
import org.apache.beam.sdk.PipelineResult;
import com.google.common.base.Joiner;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
private static final Map<String, PipelineResult> EXECUTION_RESULTS =
new ConcurrentHashMap<String, PipelineResult>();
dataflowOptions.setStagingLocation(Joiner.on("/").join(
new String[]{dataflowOptions.getTempRoot(),
dataflowOptions.getJobName(), "output", "results"}));
public static PipelineResult getPipelineResultByJobName(String jobName) {
return EXECUTION_RESULTS.get(jobName);
}
EXECUTION_RESULTS.put(options.getJobName(), job); | 0 |
Map<String,String> props = new HashMap<>(); | 0 |
import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.zookeeper.AsyncCallback.VoidCallback;
@Override
public void sync(final String path) throws KeeperException, InterruptedException {
final AtomicBoolean waiter = new AtomicBoolean(false);
getZooKeeper().sync(path, new VoidCallback() {
@Override
public void processResult(int arg0, String arg1, Object arg2) {
synchronized (waiter) {
waiter.set(true);
waiter.notifyAll();
}
}}, null);
synchronized (waiter) {
if (!waiter.get())
waiter.wait();
}
} | 1 |
public void close() throws Exception { | 0 |
/**
* A factory for <code>service-consumer:</code> source.
* @see ServletServiceConsumerSource
*/ | 0 |
/**
* Tags any IOExceptions thrown, wrapping and re-throwing.
*
* @param e The IOException thrown
* @throws IOException if an I/O error occurs
*/
protected void handleIOException(IOException e) throws IOException {
throw new TaggedIOException(e, this); | 0 |
import java.util.Map;
public Map getUsedServices() {
Map hm = new HashMap(); | 0 |
cryptoService = CryptoServiceFactory.newInstance(aconf);
cryptoService = CryptoServiceFactory.newInstance(aconf); | 0 |
public RequestStatus deleteResources(Request request, Predicate predicate) throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException { | 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 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.beam.runners.jet;
import com.hazelcast.jet.core.Vertex;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.runners.AppliedPTransform;
import org.apache.beam.sdk.runners.TransformHierarchy;
import org.apache.beam.sdk.transforms.PTransform;
interface JetTransformTranslator<T extends PTransform> {
Vertex translate(Pipeline pipeline, AppliedPTransform<?, ?, ?> appliedTransform, TransformHierarchy.Node node, JetTranslationContext context);
} | 0 |
/**
* Checks that the given {@code File} exists and is a directory.
*
* @param directory The {@code File} to check.
* @throws IllegalArgumentException if the given {@code File} does not exist or is not a directory.
*/ | 0 |
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; | 0 |
/**
* Copyright 2016 Seznam a.s.
*
* 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ | 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 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License. | 0 |
private static List<KeyExtent> findTablets(ClientContext context, boolean selectLocalTablets, String tableName, SortedMap<KeyExtent,String> tabletLocations)
throws Exception {
// TODO Remove deprecation warning suppression when Hadoop1 support is dropped
| 0 |
assertEquals('1', (char) converter.convert("123").to(Character.class));
assertEquals('Q', (char) converter.convert(null).defaultValue('Q').to(Character.class));
assertEquals((char) 123, (char) converter.convert(123L).to(Character.class)); | 0 |
@SuppressWarnings("unused")
new MultipartStream( | 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 this file except in compliance with
* the License. You may obtain a copy of the License at | 0 |
import java.io.File;
import com.google.common.io.Files;
File tempDir = Files.createTempDir();
try {
bind(ZooKeeperTestServer.class).toInstance(
new ZooKeeperTestServer(
ZooKeeperTestServer.DEFAULT_SESSION_TIMEOUT,
tempDir,
tempDir));
} catch (IOException e) {
throw Throwables.propagate(e);
}
| 0 |
Copyright 2001 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 or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/ | 0 |
@Override
@Override
@Override
@Override
@Override
@Override
@Override | 0 |
import org.apache.accumulo.core.security.thrift.ThriftInstanceTokenWrapper;
import org.apache.accumulo.core.security.tokens.AccumuloToken;
import org.apache.accumulo.core.security.tokens.InstanceTokenWrapper;
import org.apache.accumulo.core.security.tokens.UserPassToken;
private static final AccumuloToken<?,?> systemToken = new UserPassToken(SYSTEM_USERNAME, SYSTEM_PASSWORD);
private static final InstanceTokenWrapper systemCredentials = new InstanceTokenWrapper(systemToken, HdfsZooInstance.getInstance().getInstanceID());
public static InstanceTokenWrapper getSystemCredentials() {
public static ThriftInstanceTokenWrapper getThriftSystemCredentials() {
return systemCredentials.toThrift();
}
| 0 |
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream; | 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 this file except in compliance with
the License. You may obtain a copy of the License at | 0 |
InputStream decorate(final InputStream wrapped) throws IOException { | 0 |
import org.apache.hc.core5.http.config.Http1Config;
Http1Config.DEFAULT); | 0 |
import org.apache.aurora.scheduler.state.TaskAssigner.FirstFitTaskAssigner;
import static org.apache.aurora.scheduler.state.TaskAssigner.FirstFitTaskAssigner.ASSIGNER_EVALUATED_OFFERS;
import static org.apache.aurora.scheduler.state.TaskAssigner.FirstFitTaskAssigner.ASSIGNER_LAUNCH_FAILURES;
import static org.apache.aurora.scheduler.state.TaskAssigner.FirstFitTaskAssigner.LAUNCH_FAILED_MSG;
public class FirstFitTaskAssignerTest extends EasyMockTest {
private FirstFitTaskAssigner assigner;
assigner = new FirstFitTaskAssigner( | 0 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.