Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
public SingletonIterator2Test(final String testName) {
final SingletonIterator<E> iter = new SingletonIterator<E>((E) testValue);
final Iterator<E> iter = makeObject();
final E iterValue = iter.next();
} catch (final Exception e) {
final ResettableIterator<E> it = makeObject(... | 0 |
import static com.google.common.base.Charsets.UTF_8;
rowMatcher.reset(new String(m.getRow(), UTF_8)); | 0 |
import org.apache.http.HttpHeaders;
import org.apache.http.impl.io.EmptyInputStream;
} else if (len == 0L) {
return EmptyInputStream.INSTANCE;
final Header contentTypeHeader = message.getFirstHeader(HttpHeaders.CONTENT_TYPE);
final Header contentEncodingHeader = message.getFirstHeade... | 0 |
public String[] buildVariationURLs(String svgDir, String svgFile){
return new String[] {getVariationPrefix() + svgDir + getVariationSuffix() +
svgFile + '-' +textID+ '-' + start + '-' + end +PNG_EXTENSION}; | 0 |
import org.apache.atlas.services.MetadataService;
import org.apache.atlas.typesystem.json.InstanceSerialization;
import org.codehaus.jettison.json.JSONArray;
import java.util.List;
public static String createInstance(MetadataService metadataService, Referenceable entity) throws Exception {
RequestContext.c... | 0 |
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not... | 0 |
* Basic implementation of an HTTP request that can be modified. Methods of the
* {@link AbortableHttpRequest) interface implemented by this class are thread safe.
private volatile boolean aborted;
if (this.aborted) {
throw new IOException("Request already aborted");
}
if (this.... | 0 |
import org.apache.beam.runners.core.KeyedWorkItem;
import org.apache.beam.runners.core.KeyedWorkItems;
private TransformEvaluator<KeyedWorkItem<K, KV<K, InputT>>> createEvaluator(
PCollection<? extends KeyedWorkItem<K, KV<K, InputT>>>, PCollectionTuple,
CommittedBundle<KeyedWorkItem<K, KV<K, Input... | 0 |
Element svgPolygon = domFactory.createElementNS(SVG_NAMESPACE_URI, TAG_POLYGON);
svgPolygon.setAttributeNS(null, ATTR_POINTS, points.substring(0, points.length() - 1)); | 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 ... | 1 |
final CharsetEncoder charencoder) {
super(buffersize);
this(buffersize, linebuffersize, charset != null ? charset.newEncoder() : null);
this(buffersize, linebuffersize, (CharsetEncoder) null);
}
/**
* @since 4.3
*/
public SessionOutputBufferImpl(final int buffe... | 0 |
import org.apache.hadoop.metrics2.util.Servers; | 0 |
import org.apache.http.protocol.BasicHttpContext;
HttpContext context = new BasicHttpContext();
HttpContext context = new BasicHttpContext();
HttpContext context = new BasicHttpContext();
HttpContext context = new BasicHttpContext(); | 0 |
if (!cbuf.hasRemaining()) {
return;
} | 0 |
if (cc== null || cc.length() == 0) {
}
for (String recpt : ccList) {
} | 1 |
/* $Id$ | 0 |
dataset.computeIfAbsent(tableReference.getTableId(), k -> new TableContainer(table)); | 0 |
package org.apache.felix.dm.test.bundle.annotation.composite;
public interface C1Service
{
} | 0 |
PCollectionConsumerRegistry consumers =
new PCollectionConsumerRegistry(
metricsContainerRegistry, mock(ExecutionStateTracker.class));
PCollectionConsumerRegistry consumers =
new PCollectionConsumerRegistry(
metricsContainerRegistry, mock(ExecutionStateTracker.class));
... | 0 |
import java.util.Collection;
import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.map.annotate.JsonSerialize; | 0 |
throw Throwables.propagate(t); | 0 |
} catch (RuntimeException e) {
return false; | 0 |
try (BigQueryTableRowIterator ignored = iterator) {
List<TableRow> elems = new ArrayList<>();
iterator.open();
while (iterator.advance()) {
elems.add(iterator.getCurrent());
}
LOG.info("Number of records read from BigQuery: {}", elems.size());
context.setPCollection(conte... | 0 |
/**
* @version $Id: ScriptableWidget.java,v 1.10 2004/02/11 10:43:32 antonio Exp $
*
*/ | 0 |
$Id: ConditionFactory.java,v 1.3 2004/03/01 11:24:11 andreas Exp $
* Factory to build conditions.
* @author <a href="mailto:andreas@apache.org">Andreas Hartmann</a>
* @version $Id: ConditionFactory.java,v 1.3 2004/03/01 11:24:11 andreas Exp $ | 0 |
protected EnumerationUtils() {} | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/decorators/Attic/LazyList.java,v 1.2 2003/05/07 11:20:21 scolebourne Exp $
* @version $Revision: 1.2 $ $Date: 2003/05/07 11:20:21 $
//-----------------------------------------... | 0 |
public void changed(@SuppressWarnings("unused") File file) {}
public void signal(@SuppressWarnings("unused") Reporter reporter) { | 0 |
package org.apache.zookeeper.server; | 0 |
this(headerIterator, BasicHeaderValueParser.INSTANCE); | 0 |
* @param <T> the type of the value stored in the broadcast variable
* @param <T> the type of the value stored in the broadcast variable | 0 |
PROPAGATED_CLASSIFICATION_NOT_ASSOCIATED_WITH_ENTITY(400, "ATLAS-400-00-070", "Propagated classification {0} is not associated with entity"), | 1 |
package org.apache.jcp.xml.dsig.internal.dom; | 0 |
import org.apache.ambari.server.state.HostComponentAdminState;
@Enumerated(value = EnumType.STRING)
@Column(name = "admin_state", nullable = true, insertable = true, updatable = true)
private HostComponentAdminState adminState;
public HostComponentAdminState getAdminState() {
return adminState;
}
pub... | 0 |
import java.util.List;
import org.apache.beam.sdk.testutils.NamedTestResult;
static void handleFailure(
final PipelineResult pipelineResult, final List<NamedTestResult> testResults)
Optional<JobFailure> failure = lookForFailure(pipelineResult, testResults);
PipelineResult pipelineResult, List<NamedTes... | 0 |
import cz.seznam.euphoria.shaded.guava.com.google.common.base.Joiner; | 0 |
private boolean closed;
this.closed = false;
if (closed) {
throw new IllegalStateException("Already closed.");
}
closed = true;
if (closed) {
throw new IllegalStateException("Already closed.");
} | 0 |
throw new XmlStreamReaderException(msg, bomEnc, xmlGuessEnc, xmlEnc); | 0 |
import org.apache.beam.sdk.values.PCollectionList;
public List<RelNode> getPCollectionInputs() {
return ImmutableList.of(BeamSqlRelUtils.getBeamRelInput(left));
public PTransform<PCollectionList<Row>, PCollection<Row>> buildPTransform() {
private class Transform extends PTransform<PCollectionList<Row>, PColle... | 0 |
Configuration.class.getMethod( "getChangeCount", (Class<?>[]) null );
private ServiceRegistration<?> m_registration;
Dictionary<String, Object> props = new Hashtable<String, Object>();
public boolean configureComponentHolder(final ComponentHolder<?> holder)
Collection<ComponentHolder... | 0 |
* @version $Revision: 561984 $ $Date: 2007-08-01 15:56:34 -0700 (Wed, 01 Aug 2007) $ | 0 |
import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AGENT_STACK_RETRY_ON_UNAVAILABILITY;
import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AGENT_STACK_RETRY_COUNT;
Map<String, String> hostLevelParams = execCmd.getHostLevelParams();
hostLevelParams.put(AGENT_STACK_RETR... | 0 |
return getDigester().from(data);
}
public static MD5 digest(File f) throws NoSuchAlgorithmException, Exception {
return getDigester().from(f);
}
public static MD5 digest(InputStream f) throws NoSuchAlgorithmException, Exception {
return getDigester().from(f); | 0 |
import org.apache.batik.util.gui.resource.ResourceManager;
* The resource manager to decode messages.
*/
protected static ResourceManager resourceManager =
new ResourceManager(localizableSupport.getResourceBundle());
/**
resourceManager = new ResourceManager(localizableSupport.getReso... | 0 |
private static org.slf4j.Logger log =
org.slf4j.LoggerFactory.getLogger(PrivateKeyResolver.class);
String alias = aliases.nextElement();
String alias = aliases.nextElement();
String alias = aliases.nextElement();
String alias = aliases.nextElement(); | 1 |
public int getFirst() { return 0; }
public int getLast() { return 0; }
| 0 |
* Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
* <code>ScheduledApplication</code> instances are registered as services. The
* {@link #APPLICATION_PID} service property contains the PID of the application
* being scheduled, the {@link #SCHEDULE_ID} service property contains the
* schedule identif... | 0 |
List<TabletMigration> result = new ArrayList<>(migrations.size()); | 1 |
if (exp >= 128) {
if (mant >= (1 << 26)) { | 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
... | 1 |
package org.apache.http.nio.reactor; | 0 |
@Override
public void snapshot() {
// No-op.
} | 0 |
public interface IRepositoryType
{
String getType();
String getId();
Image getIcon();
boolean isDynamic(); | 0 |
WAL, RFILE | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/SetRootRule.java,v 1.6 2002/08/05 20:52:30 craigmcc Exp $
* $Revision: 1.6 $
* $Date: 2002/08/05 20:52:30 $
* @version $Revision: 1.6 $ $Date: 2002/08/05 20:52:30 $
* Should we u... | 0 |
int result = sendData(
int result = sendData(new String(Base64.encodeBase64(toEncode)));
if (sendData(
int result = sendData( | 0 |
public long getDataDirSize() {
return zks.getDataDirSize();
}
public long getLogDirSize() {
return zks.getLogDirSize();
} | 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 ma... | 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... | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* v... | 0 |
private BulkInfo info;
public CompleteBulkImport(BulkInfo info) {
this.info = info;
return new CleanUpBulkImport(info); | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList; | 0 |
import org.apache.cocoon.forms.event.*;
* @version CVS $Id: Field.java,v 1.10 2004/04/27 09:17:01 bruno Exp $
/** Overrides selection list defined in FieldDefinition, if any. */
/** Additional listeners to those defined as part of the widget definition (if any). */
private ValueChangedListener listener;
... | 0 |
*
*
*
@Parameter(names = "--num", required = true)
@Parameter(names = "--min")
@Parameter(names = "--max")
@Parameter(names = "--size", required = true, description = "size of the value to write")
@Parameter(names = "--vis", converter = VisibilityConverter.class)
@Parameter(name... | 0 |
import com.google.common.annotations.VisibleForTesting;
static boolean isLoaded() {
@VisibleForTesting
void mutate(List<Mutation> mutations, int mutationCount) {
@VisibleForTesting | 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 |
/*
* $Header: /cvshome/build/ee.foundation/src/java/security/spec/EncodedKeySpec.java,v 1.6 2006/03/14 01:20:30 hargrave Exp $
*
* (C) Copyright 2001 Sun Microsystems, Inc.
* Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you m... | 0 |
new String[]{"blueprint_name", "hostgroup_name"}, "hostgroup", new String[]{"blueprint_name", "name"}, true); | 0 |
package org.apache.atlas.typesystem.types;
import org.apache.atlas.MetadataException;
import org.apache.atlas.typesystem.IStruct;
import org.apache.atlas.typesystem.ITypedInstance;
import org.apache.atlas.typesystem.ITypedStruct;
import org.apache.atlas.typesystem.Struct;
import static org.apache.atlas.typesystem.types... | 0 |
* Tests if reloads are recognized by subset().
*/
public void testSubsetWithReload() throws ConfigurationException
{
XMLConfiguration c = setUpReloadTest();
Configuration sub = c.subset("test");
assertEquals("New value not read", "newValue", sub.getString("entity"));
}
... | 0 |
ClientContext context = new ClientContext(getClientInfo()); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/DestinationTag.java,v 1.3 2003/10/09 21:21:20 rdonkin Exp $
* $Revision: 1.3 $
* $Date: 2003/10/09 21:21:20 $
* any, must include the following acknowledgement:
... | 0 |
import org.apache.commons.lang.StringUtils;
userName = StringUtils.lowerCase(userEntity.getUserName()); // normalize to lower case | 0 |
return Response.status(status).entity(errorEntity).type(JSON_MEDIA_TYPE).build(); | 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$ | 0 |
import org.apache.commons.vfs.*;
final FileObject[] children;
try
{
children = file.getChildren();
}
// VFS-210
catch (FileNotFolderException e)
{
throw new FileNotFolderException(getName(), e);
... | 0 |
package org.apache.commons.jexl2;
import org.apache.commons.jexl2.parser.ASTJexlScript; | 0 |
Servers.parse(configuration.getProperty(configuration.getProperty(COLLECTOR_HOST_PROPERTY)), 6188); | 0 |
import com.fasterxml.jackson.annotation.JsonCreator;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream; | 0 |
* A scanner that presents a row isolated view of an accumulo table. Rows are buffered in memory on the client side. If you think your rows may not fit into | 0 |
public static final String KERBEROS_KEYTAB_CACHE_DIR_KEY = "kerberos.keytab.cache.dir";
public static final String KERBEROS_KEYTAB_CACHE_DIR_DEFAULT = "/var/lib/ambari-server/data/cache";
* Gets the directory where Ambari is to store cached keytab files.
*
* @return a File containing the path to the direct... | 0 |
*
*
*
*
*
} | 1 |
suite.addTest(TestTimeoutBuffer.suite()); | 0 |
import java.util.HashMap; | 0 |
import java.util.ArrayList;
import java.util.Collection;
import java.util.List; | 0 |
import org.apache.sshd.client.subsystem.sftp.impl.DefaultCloseableHandle; | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.MoreObjects.firstNonNull;
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument;
import org.apache.beam.vendor.guava.v20_0.com.google.common.annotations.VisibleForTesting;
import org.apache.beam.vendor.... | 0 |
import java.util.ArrayDeque;
import java.util.Deque;
Deque<Long> packetsCommitted = new ArrayDeque<>();
Deque<PacketInFlight> packetsNotCommitted = new ArrayDeque<>(); | 0 |
protected static class ForwardEventListener
implements UnwrappedEventListener { | 0 |
public static final String WALOG_ARCHIVE_DIR = "walogArchive";
public static final String FILE_ARCHIVE_DIR = "fileArchive";
return VolumeConfiguration.prefix(getBaseUris(), WALOG_ARCHIVE_DIR);
}
public static String[] getFileArchives() {
return VolumeConfiguration.prefix(getBaseUris(), FILE_ARCHIVE_DIR... | 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 |
in = new ContentLengthInputStream(new SessionInputBufferMockup(new byte[20]), 10L);
in.skip(5);
assertEquals(5, in.read(new byte[20])); | 0 |
BootstrapEnvironment env = new OSGiBootstrapEnvironment(this.classLoader, ctx);
env.log("OSGiBootstrapEnvironment created");
CoreUtil coreUtil = new CoreUtil(env);
env.log("CoreUtil created");
this.core = coreUtil.getCore();
this.processor = coreUtil.createCocoon();
... | 0 |
assertEquals(char[].class, column.getType()); | 0 |
package org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.comparison; | 0 |
Long getId();
String getClusterName();
Batch getBatch();
void setBatch(Batch batch);
Schedule getSchedule();
void setSchedule(Schedule schedule);
RequestScheduleResponse convertToResponse();
void persist();
void refresh();
void delete();
String getStatus();
void setDescription(String description... | 0 |
AtlasTypesDef toCreate = new AtlasTypesDef(Collections.<AtlasEnumDef>emptyList(),
Collections.<AtlasStructDef>emptyList(),
classificationDefs,
Collections.<AtlasEntityDef>emptyList());
toCreate = new AtlasTypesDef(Collections.<AtlasEnumDef>emptyList(),
... | 0 |
*
*
* Takes a {@link CryptoModuleParameters} object containing an {@link OutputStream} to wrap within a {@link CipherOutputStream}. The various other parts of
* the {@link CryptoModuleParameters} object specify the details about the type of encryption to use. Callers should pay special attention to the
*
... | 0 |
} else {
// If the stat is null, the node is now gone which is fine.
return; | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.