Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
if (parentNode != null && Node.ELEMENT_NODE != parentNode.getNodeType()) { | 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 |
((PCollection<?>) Iterables.getOnlyElement(transform.getInputs().values())) | 0 |
import com.google.common.annotations.VisibleForTesting;
private static Scanner createCloneScanner(String tableName, String tableId, Connector conn) throws TableNotFoundException {
@VisibleForTesting
public static void initializeClone(String tableName, String srcTableId, String tableId, Connector conn, BatchWriter... | 0 |
import org.apache.accumulo.core.util.StringUtil;
HashSet<String> nameSpacesReferenced = new HashSet<String>();
if (file.contains(":") && parts.length > 3) {
List<String> base = Arrays.asList(Arrays.copyOf(parts, parts.length - 3));
nameSpacesReferenced.add(StringUtil.join(base, "/"... | 0 |
if (log.isDebugEnabled()) {
log.debug("Updating replication for " + extent + " with " + files + " using " + stat.toString().replace("\n", ", ")); | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger LOG = LoggerFactory.getLogger(CompatibleRepositoryVersionResourceProvider.class);
| 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 u... | 0 |
* Gets whether to keep on running.
*
* @return whether to keep on running.
* @since 2.5
*/
protected boolean getRun() {
return run;
}
/**
while (getRun() && reader == null) {
while (getRun()) {
if (getRun() && reOpen) {
while... | 0 |
EvaluationContext evaluationContext)
EvaluationContext evaluationContext) {
new DirectAssignContext<>(windowFn, element);
public TransformResult finishBundle() throws Exception {
private static class DirectAssignContext<InputT, W extends BoundedWindow>
public DirectAssignContext(WindowFn... | 0 |
* {@link PTransform} for serializing objects to JSON {@link String Strings}. Transforms a {@code
* PCollection<InputT>} into a {@link PCollection} of JSON {@link String Strings} representing
* objects in the original {@link PCollection} using Jackson.
/** Use custom Jackson {@link ObjectMapper} instead of the defa... | 1 |
ENDS_WITH(new String[]{"endsWith", "ENDSWITH", "ends_with", "ENDS_WITH"}),
CONTAINS_ALL(new String[]{"containsAll", "CONTAINSALL", "contains_all", "CONTAINS_ALL"}),
IS_NULL(new String[]{"isNull", "ISNULL", "is_null", "IS_NULL"}),
NOT_NULL(new String[]{"notNull", "NOTNULL", "not_null", "N... | 0 |
import com.google.common.base.Preconditions;
import org.springframework.transaction.TransactionException;
import com.twitter.mesos.scheduler.StateManagerVars.MutableState;
import com.twitter.mesos.scheduler.storage.Storage.Work.NoResult.Quiet;
protected MutableState mutableState;
private int transactionsUntilFailur... | 0 |
* Copyright (C) 2015 Google Inc. | 0 |
CompositeIndexType compositeIndex = (CompositeIndexType)index;
subcondition = indexCover(compositeIndex, conditions, subcover);
// if this is unique index, use it!!
if (compositeIndex.getCardinality() == Cardinality.SINGLE && subcondition... | 0 |
import javax.persistence.EntityManager;
import org.apache.ambari.server.controller.MpackRequest;
import org.apache.ambari.server.controller.spi.Predicate;
import org.apache.ambari.server.controller.spi.Request;
import org.apache.ambari.server.controller.utilities.PredicateBuilder;
import org.apache.ambari.server.contr... | 0 |
package org.apache.commons.beanutils2.locale.converters;
import org.apache.commons.beanutils2.ConversionException;
import org.apache.commons.beanutils2.locale.BaseLocaleConverter;
* <p>Standard {@link org.apache.commons.beanutils2.locale.LocaleConverter}
* {@link org.apache.commons.beanutils2.ConversionException}
... | 1 |
@SuppressWarnings("unchecked") | 0 |
if ( index < 0 || itemList == null || index >= itemList.size() ){ | 0 |
import com.google.cloud.dataflow.sdk.values.TypeDescriptor;
return new CoderFactoryFromStaticMethods(clazz);
private CoderFactoryFromStaticMethods(Class<?> coderClazz) {
this.factoryMethod = getFactoryMethod(coderClazz);
this.getComponentsMethod = getInstanceComponentsMethod(coderClazz);
private... | 0 |
/*
* $HeadURL:$
* $Revision:$
* $Date:$
*
* ====================================================================
* 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 copyri... | 0 |
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> | 0 |
* @author William Farner | 0 |
private static final Map<Resource.Type, String> keyPropertyIds = ImmutableMap.<Resource.Type, String>builder()
private static final Set<String> propertyIds = Sets.newHashSet( | 0 |
import org.apache.commons.io.IOUtils;
import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.verify;
import java.net.URI;
import java.net.URL;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Hash... | 0 |
import org.apache.felix.ipojo.ConstructorInjector;
* This class managed the method invocation, field injection
* and constructor injection.
public class Property implements FieldInterceptor, ConstructorInjector {
* The index of the parameter in case of
* constructor injection.
*/
private int m_inde... | 0 |
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> | 0 |
public boolean consistentWithEquals() {
return true; | 0 |
*
*
*
*
*
| 0 |
catch (final IOException ignored)
/* ignore on close exception. */
// TODO: close os | 0 |
package org.apache.commons.dbcp2.managed;
import org.apache.commons.dbcp2.AbandonedConfig;
import org.apache.commons.dbcp2.BasicDataSource;
import org.apache.commons.dbcp2.ConnectionFactory;
import org.apache.commons.dbcp2.PoolableConnectionFactory;
import org.apache.commons.dbcp2.PoolingDataSource; | 1 |
public FileObject[] findFiles( final FileSelector selector ) throws FileSystemException
return (FileObject[])list.toArray( new FileObject[ list.size() ] ); | 0 |
import java.io.IOException;
import org.apache.hc.core5.http.HttpException;
void sendResponse(ResponseChannel channel) throws HttpException, IOException; | 0 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 0 |
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@Test
public void testAtMaxAttempts() throws Exception {
AttemptBoundedExponentialBackOff backOff = new AttemptBoundedExponentialBackOff(3, 500);
assertFalse(backOff.atMaxAttempts());
backOff.nextBackOffMillis();
... | 0 |
if (!super.equals(obj)) {
return false;
}
CSSAttributeCondition c = (CSSAttributeCondition)obj;
return (c.namespaceURI.equals(namespaceURI) &&
c.localName.equals(localName) &&
c.specified == specified); | 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 u... | 0 |
* Copyright 2016-2017 Seznam.cz, a.s. | 0 |
import java.util.List;
import javax.naming.Reference;
import javax.naming.StringRefAddr;
@Test
public void testValidateProperties() throws Exception {
try {
StackMessageLog.lock();
final Reference ref = new Reference("javax.sql.DataSource",
... | 0 |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... | 0 |
import java.io.OutputStream;
import jline.console.ConsoleReader;
protected OutputStream out;
public MockShell(InputStream in, OutputStream out) throws IOException {
this.out = out;
this.reader = new ConsoleReader(in, out);
this.reader.setHistoryEnabled(false);
this.reader.setPaginationEnabled(fals... | 0 |
* Creates a new SVGClipDescriptor.
* @param clipPathValue the clip path value | 0 |
/** Expression[] of arguments */
protected Expression[] args;
/**
* Create a new Operation.
* @param args Expression[]
*/
public Operation(Expression[] args) {
/**
* Get the arguments.
* @return Expression[]
*/
/**
* {@inheritDoc}
*/ | 1 |
import org.apache.sshd.util.test.NoIoTestCase;
import org.junit.experimental.categories.Category;
@Category({ NoIoTestCase.class }) | 0 |
// Calling du not in a table context shouldn't throw an error
output.clear();
exec("du", true, "", true);
output.clear(); | 0 |
/**
* Returns a new {@link BoundedReader} that reads from this source.
*/
public abstract BoundedReader<T> createReader(PipelineOptions options) throws IOException; | 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 |
@JsonProperty("properties")
private List<String> properties;
public List<String> getProperties() {
return properties;
public void setProperties(List<String> properties) {
this.properties = properties;
if (null == properties && null != parentLink.properties) {
properties = parentLink.properties... | 0 |
/**
* {@inheritDoc}
*/
/**
* {@inheritDoc}
*/
/**
* {@inheritDoc}
*/
/**
* {@inheritDoc}
*/ | 0 |
// Surprised we got away without pausing before.
try {
Thread.sleep(100);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
public static void main(String args[]) throws Exception
{
Func... | 0 |
private static final long serialVersionUID = -2654603322338049674L; | 0 |
* Returns the RenderableImage for this node. The returned
* RenderableImage this node before any of the filter operations
* have been applied.
*/
public Filter getGraphicsNodeRable() {
return image;
}
/** | 0 |
package org.apache.beam.sdk.runners.inprocess;
import org.apache.beam.sdk.coders.CannotProvideCoderException;
import org.apache.beam.sdk.coders.Coder;
import org.apache.beam.sdk.coders.CoderException;
import org.apache.beam.sdk.io.BoundedSource;
import org.apache.beam.sdk.io.OffsetBasedSource;
import org.apache.beam.s... | 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 |
try (ClientSession session = client.connect(getCurrentTestName(), TEST_LOCALHOST, port).verify(7L, TimeUnit.SECONDS).getSession()) { | 0 |
import org.apache.http.client.methods.CloseableHttpResponse;
final CloseableHttpResponse httpResponse = cachingExec.revalidateCacheEntry(route, request, context, execAware, cacheEntry);
try {
final int statusCode = httpResponse.getStatusLine().getStatusCode();
ret... | 0 |
import com.google.cloud.dataflow.sdk.util.common.worker.NativeReader;
public class PartitioningShuffleReader<K, V> extends NativeReader<WindowedValue<KV<K, V>>> {
public NativeReaderIterator<WindowedValue<KV<K, V>>> iterator() throws IOException {
PartitioningShuffleReaderIterator iterator(ShuffleEntryReader reader... | 0 |
* whatever delimits one entry from the next. This default implementation | 0 |
/**
* Standard HTTP/2 frame types.
*
* @since 5.0
*/ | 0 |
import org.apache.cocoon.components.modules.input.InputModuleHelper;
* @version CVS $Id: VariableRewriterTransformer.java,v 1.8 2004/05/26 11:23:47 unico Exp $
private InputModuleHelper modHelper;
this.modHelper = new InputModuleHelper(); | 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 |
import java.nio.charset.Charset;
FileUtils.writeStringToFile(new File(requestDirectory, "hosts.json"), adjusted.hostsJSON,
Charset.defaultCharset());
FileUtils
.writeStringToFile(new File(requestDirectory, "services.json"), adjusted.servicesJSON,
Charset.def... | 0 |
* @version $Revision: 1.9 $ $Date$
setParam(opts, PASSIVE_MODE, passiveMode?Boolean.TRUE:Boolean.FALSE); | 0 |
@Test
public void testDHG() throws Exception {
for (DHFactory expected : BuiltinDHFactories.VALUES) {
if (!expected.isGroupExchange()) {
if (expected.isSupported()) {
assertNotNull("Null DH created", expected.create());
}
}
... | 0 |
*
@Parameter(names = "-m", description = "the maximum size of the key/value pair to shunt to the small file")
@Parameter(description = "<file.rf> { <file.rf> ... }")
| 0 |
package org.apache.commons.ognl.test;
import org.apache.commons.ognl.test.objects.Root; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/FastArrayList.java,v 1.13 2004/01/05 22:46:33 scolebourne Exp $
* Copyright (c) 2001-2004 The Apache Software Foundation. All rights
* Double-Checked Locking Idiom Is Broken Dec... | 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 |
import java.util.List;
import java.util.Map;
import org.apache.ambari.server.api.services.AmbariMetaInfo;
import org.apache.ambari.server.orm.entities.StackEntity;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.persist.PersistService;
private StackDAO stackDAO;
// re... | 0 |
if (!shell.isAlive()) {
callback.onExit(shell.exitValue());
return;
} | 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 |
elasticsearchIOTestCommon.testSplit(10_000); | 0 |
public class Query0 extends NexmarkQueryTransform<Event> {
public Query0() {
super("Query0");
@Override
public PCollection<Event> expand(PCollection<Event> events) { | 0 |
return getAnimatedStringAttribute(null, SVG_TARGET_ATTRIBUTE);
} | 0 |
import java.util.Arrays;
import java.util.List;
@Test
public void testPublishCollectionOfRecords() {
List<SampleTestResult> results =
Arrays.asList(new SampleTestResult("a", "b"), new SampleTestResult("a", "b"));
publisher.publish(results, TABLE_NAME);
assertEquals(2, bigQueryClient.getRows(TA... | 0 |
/**
* Adds alerts for the current cluster.
*/
public void addAlerts(Collection<Alert> alerts);
/**
* @return a collection of current known alerts.
*/
public Collection<Alert> getAlerts();
| 0 |
// Serializable /////////////////////////////////////////////////
| 0 |
assertNotNull(children);
assertNotNull(child);
assertNotNull(child);
assertNotNull(children);
assertNotNull(child);
assertNotNull(child); | 0 |
ExecutorServiceConfigurer configurer = (ExecutorServiceConfigurer) factory;
BuiltinIoServiceFactoryFactories builtin = BuiltinIoServiceFactoryFactories.fromFactoryName(factory); | 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... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/ReferenceMap.java,v 1.18 2003/12/05 20:23:57 scolebourne Exp $
import org.apache.commons.collections.keyvalue.DefaultMapEntry;
* @version $Revision: 1.18 $ $Date: 2003/12/05 20:23... | 0 |
import javax.ws.rs.WebApplicationException;
// don't try to handle jersey exceptions ourselves
if (e instanceof WebApplicationException) {
WebApplicationException ie =(WebApplicationException) e;
return ie.getResponse();
}
"Error processing re... | 0 |
* @return count | 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 static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkState;
import static org.apach... | 0 |
import org.apache.batik.util.DoublyIndexedTable; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/java/org/apache/commons/io/HexDump.java,v 1.6 2004/02/21 02:32:50 bayard Exp $
* $Revision: 1.6 $
* $Date: 2004/02/21 02:32:50 $
* @version $Revision: 1.6 $ $Date: 2004/02/21 02:32:50 $
* Instances should NOT be const... | 1 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/iterators/LoopingIterator.java,v 1.6 2003/11/14 22:58:27 scolebourne Exp $
* @version $Revision: 1.6 $ $Date: 2003/11/14 22:58:27 $
public class LoopingIterator implements Resetta... | 0 |
public static final String SDI_DYNAMIC_FIELDS = "sdi_*"; | 0 |
private String contentEncoding = null;
public void setContentType(final String contentType) {
this.contentType = contentType;
}
public String getContentEncoding() {
return this.contentEncoding;
}
public void setContentEncoding(final String contentEncoding) {
this.conten... | 0 |
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.data.Key;
import org.apache.ac... | 0 |
package org.apache.felix.ipojo;
import java.util.Set;
/**
* Instance Manager Fake.
* We're using a fake to avoid the cyclic build dependency:
* manipulator -> ipojo -> maven-ipojo-plugin -> manipulator
*/
public class InstanceManager {
public Set getRegistredFields() {
return null;
}
public ... | 0 |
protected void doJoin(ProcessContext c, K key, CoGbkResult value, Iterable<LeftT> leftSideIter,
Iterable<RightT> rightSideIter) {
for (RightT rightValue : rightSideIter) { | 0 |
//
// This test fails with the IBM JDK
//
if ("IBM Corporation".equals(System.getProperty("java.vendor"))) {
return;
} | 0 |
* if the "dm.runtime.log" is not configured or it it is set to false, then we'll use | 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 javax.xml.XMLConstants;
import javax.xml.xpath.XPathFactoryConfigurationException;
private XPathFactory xpf;
private String xpathStr;
private XPath xpath;
if (xpf == null) {
xpf = XPathFactory.newInstance();
try {
xpf.setFeature(XML... | 0 |
import org.junit.BeforeClass;
private static AmbariMetaInfo ambariMetaInfo;
private static OrmTestHelper helper;
@BeforeClass
public static void classSetUp() {
@Before
public void setup() throws Exception {
cleanup();
}
}
private void cleanup() throws AmbariException {
Clusters clusters = i... | 0 |
* @cocoon.sitemap.component.documentation | 0 |
import org.apache.accumulo.server.security.SecurityUtil; | 0 |
import org.apache.felix.moduleloader.IContent;
private final IContent m_archive;
public SignerMatcher(String root, long lastModified, IContent archive, BundleDNParser parser) | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.