Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
package org.apache.beam.sdk.nexmark.model;
import org.apache.beam.sdk.nexmark.NexmarkUtils; | 0 |
value = enableLineWrapping(value);
private static final String enableLineWrapping(final String value)
{
StringBuffer sb = new StringBuffer(value.length() * 2 / 3);
synchronized (sb)
{ // faster
for (int i = 0; i < value.length(); i++)
{
... | 0 |
// Create two connections
assertNotNull(basicManagedDataSource.getTransactionRegistry().getXAResource(conn));
conn2.close(); // Return one connection to the pool
conn.close(); // No room at the inn - this will trigger reallyClose(), which should unregister | 0 |
Class c, String key) { | 0 |
/** @inheritDoc */
/** @inheritDoc */ | 0 |
properties.setProperty(Configuration.METADATA_DIR_PATH,"src/test/resources/stacks"); | 0 |
public OpenFuture open(int recipient, long rwSize, long packetSize, Buffer buffer) {
public void handleOpenSuccess(int recipient, long rwSize, long packetSize, Buffer buffer) {
protected void doWriteData(byte[] data, int off, long len) throws IOException {
ValidateUtils.checkTrue(len <= Integer.MAX_... | 0 |
package org.apache.commons.jexl2.scripting; | 0 |
public Object get(Object key) {
//FIXME: This should be done more elegantly
if ("this".equals(key))
return this;
return super.get(key);
}
| 0 |
* The current display thread.
*/
protected Thread displayThread;
/**
if (displayThread != null) {
displayThread.interrupt();
}
displayThread = new DisplayThread();
displayThread.start();
message.setText(s);
if (displayThread != null) {
... | 0 |
final List<E> elements = new ArrayList<>();
final List<E> elements = new ArrayList<>(); | 1 |
public CanonicalizationException(Exception ex) {
super(ex);
} | 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 org.apache.accumulo.core.client.AccumuloClient;
private AccumuloClient conn; | 0 |
import javax.xml.bind.annotation.XmlElementRef;
@XmlElement(name="on-stack-upgrade", required = true)
private PropertyUpgradeBehavior propertyStackUpgradeBehavior;
@XmlElement(name="on-ambari-upgrade", required = true)
private PropertyUpgradeBehavior propertyAmbariUpgradeBehavior;
public PropertyUpgradeBeh... | 0 |
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/TestBean.java,v 1.15 2003/02/01 07:45:29 craigmcc Exp $
* $Revision: 1.15 $
* $Date: 2003/02/01 07:45:29 $
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* @... | 0 |
private static final long CACHE_BLOCK_SIZE = AccumuloConfiguration.getDefaultConfiguration()
.getMemoryInBytes(Property.TSERV_DEFAULT_BLOCKSIZE);
throw new IllegalArgumentException(
"Set authorizations and specified not to use system iterators");
Preconditions.checkArgument(opts.useSystemIte... | 0 |
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/iterators/EnumerationIterator.java,v 1.4 2003/09/29 22:02:33 scolebourne Exp $
* @version $Revision: 1.4 $ $Date: 2003/09/29 22:02:33 $
* Constructs a new <code>EnumerationI... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/list/TestFixedSizeList.java,v 1.3 2003/11/18 22:37:14 scolebourne Exp $
* @version $Revision: 1.3 $ $Date: 2003/11/18 22:37:14 $
public List makeFullList() {
public boolea... | 0 |
Copyright 2002 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 a... | 0 |
SourceResolver resolver,
// add local resolver
if ( resolver != null ) {
factory.registerSingleton(SourceResolver.ROLE + "/Local", resolver);
} | 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 |
* @since 2.0
* @version $Id: ReverseComparator.java,v 1.8 2002/06/12 03:59:17 mas Exp $ | 0 |
private static final String REQUIRED_SERVICES_ID = PropertyHelper.getPropertyId(
"StackServices", "required_services");
setResourceProperty(resource, REQUIRED_SERVICES_ID,
response.getRequiredServices(), requestedIds); | 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 |
/*
* 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 |
private static final long serialVersionUID = 6210271677940926200L; | 0 |
UnmodifiableSortedMap.unmodifiableSortedMap(new TreeMap<>());
final Map<String, Object> map = new HashMap<>();
final Map<V, K> out = new HashMap<>(map.size()); | 1 |
*
*
*
/**
* @version $Revision: 1.4 $
* in the package of the given class.
* For example a test could call
* which would loaad the 'suite.jelly script from the same package as the Foo
*
throw new Exception(
"Could not find Jelly script: " + script
+ " ... | 1 |
public boolean roleAttributesEqual(Object obj) {
AgentRoleState agentObj = (AgentRoleState)obj;
return (clusterDefinitionRevision ==
agentObj.clusterDefinitionRevision &&
agentObj.clusterId.equals(clusterId) &&
agentObj.componentName.equals(componentName) &&
agentObj.roleN... | 0 |
byte[] pojo = POJOWriter.dump(clazz, m_name, getFieldList(), getMethodList(), m_handler);
Attribute factory = new Attribute("public", "false"); | 0 |
* @param source The declaration.
* Parse a CSS priority value (e.g. "!important"). | 0 |
import net.jcip.annotations.NotThreadSafe;
@NotThreadSafe // proxy | 0 |
import org.apache.mesos.Protos;
import org.apache.mesos.Protos.SlaveID;
ExecutorKey executorKey = new ExecutorKey(defaultExecutorId, offer.getHostname()); | 0 |
queue.transfer(elem); | 0 |
public class ClientAbortMethod {
HttpProtocolParams.setUserAgent(params, "Apache-HttpClient/4.0"); | 0 |
* @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> | 0 |
import org.apache.sshd.common.NamedResource;
String algs = NamedResource.Utils.getNames(getFactoryManager().getSignatureFactories()); | 0 |
static final List<String> CUSTOM_TRANSFORM_ATTRIBUTES = Arrays.asList(HIVE_DB_NAME_ATTRIBUTE, HIVE_TABLE_NAME_ATTRIBUTE, HIVE_DB_CLUSTER_NAME_ATTRIBUTE);
super(transformers);
private boolean isCustomAttributeUpdated = false;
public Object getAttribute(EntityAttribute attribute) {
... | 0 |
import org.apache.avalon.framework.CascadingRuntimeException;
* @version CVS $Id: InsertBeanJXPathBinding.java,v 1.7 2004/01/27 11:43:29 joerg Exp $ | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/decorators/Attic/UnmodifiableSortedBag.java,v 1.3 2003/11/16 00:39:37 scolebourne Exp $
* @version $Revision: 1.3 $ $Date: 2003/11/16 00:39:37 $
* @deprecated TO BE REMOVED BEFOR... | 0 |
* @since 1.0 | 0 |
anError = requestContainsNoCacheDirectiveWithFieldName(request);
if (anError != null) {
theErrors.add(anError);
}
case NO_CACHE_DIRECTIVE_WITH_FIELD_NAME:
return new BasicHttpResponse(new BasicStatusLine(CachingHttpClient.HTTP_1_1,
... | 0 |
// TODO - should this be synch? Is remove MT safe?
// TODO - should this be synch? Is remove MT safe? | 0 |
Assert.assertEquals(887717691390L, resource.getPropertyValue(PropertyHelper.getPropertyId("metrics/dfs/FSNamesystem", "CapacityTotal")));
Assert.assertEquals(184320, resource.getPropertyValue(PropertyHelper.getPropertyId("metrics/dfs/FSNamesystem", "CapacityUsed")));
Assert.assertEquals(842207944704L, resou... | 0 |
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import java.io.IOException;
import java.net.URISyntaxException;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
public class FrameworkTest {
// Need to use... | 0 |
Integer.valueOf(i), relPath | 0 |
private long chunkSize;
private long pos;
this.pos = 0L;
return (int) Math.min(len, this.chunkSize - this.pos);
final int bytesRead = buffer.read(b, off, (int) Math.min(len, chunkSize - pos), inputStream);
if (chunkSize < 0L) {
pos = 0L;
if (chunkSize ... | 1 |
TelnetInputStream tmp = new TelnetInputStream(_input_, this, readerThread);
__output = new TelnetOutputStream(this); | 0 |
@Override
public String toString(){
return getClass().getName() + "[source=" + source
+ ", total=" + totalBytesTransferred
+ ", bytes=" + bytesTransferred
+ ", size=" + streamSize
+ "]";
} | 0 |
if (id != null && !"".equals(id)){
return id;
} else {
return getClass().getName();
} | 0 |
assertEquals("generic signature",
"java.util.Map<X, java.util.List<Y>>",
Utility.signatureToString("Ljava/util/Map<TX;Ljava/util/List<TY;>;>;"));
assertEquals("generic signature",
"java.util.Set<? extends java.nio.file.OpenOption>"
, Utilit... | 0 |
import com.twitter.mesos.gen.StartCronResponse;
import static com.twitter.common.base.MorePreconditions.checkNotBlank;
@Override
public StartCronResponse startCronJob(String jobName, SessionKey session) {
checkNotBlank(jobName, "Job name must not be blank.");
checkNotNull(session, "Session must be provided.... | 0 |
Map<Resource.Type, String> mapIds = new HashMap<>(); | 1 |
@Override
public String toString() {
return options.toString();
} | 0 |
import org.apache.commons.collections.PredicateUtils;
Predicate typeNamePredicate = SearchPredicateUtil.getINPredicateGenerator()
.generatePredicate(Constants.TYPE_NAME_PROPERTY_KEY, typeAndSubTypes, String.class);
Predicate attribut... | 0 |
private final byte[] __dummyData = new byte[1];
private final byte[] __timeData = new byte[4]; | 0 |
import java.util.List;
List<String> getDefaultLogLevels(); | 0 |
// read number of rows from request, and make an according number of rows
String sizeParameter = formContext.getRequest().getParameter(getRequestParameterName() + ".size");
if (sizeParameter != null) {
int size = 0;
try {
size = Integer.parseInt(sizeParame... | 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 |
* Copyright 2016-2017 Seznam.cz, a.s. | 0 |
public int defaultTimeoutSeconds() {
return 60;
}
@Override
@Test | 0 |
// Return true if the file associated with the entry exists,
// unless the entry name ends with "/", in which case only
// return true if the file is really a directory.
File file = new File(m_dir, name);
return BundleCache.getSecureAction().fileExists(file)
&& (name.... | 0 |
ONLY_STACK_DEFAULTS_APPLY,
/**
* Configuration recommendations are always applied, overriding stack defaults but they don't
* override configuration defined by the user in the Blueprint and/or Cluster Creation Template.
*/
ALWAYS_APPLY_DONT_OVERRIDE_CUSTOM_VALUES; | 0 |
suite.addTest(TestCookieRFC2109Spec.suite()); | 0 |
private ConcurrentHashMap<String, DataNode> nodes =
new ConcurrentHashMap<String, DataNode>();
* Get the size of the nodes based on path and data length.
* @return size of the data
*/
public long approximateDataSize() {
long result = 0;
for (Map.Entry<String, DataNode> ent... | 0 |
Path root = new Path(fs.getUri().toString() + cluster.getTemporaryPath(), getClass().getName());
fs.deleteOnExit(root);
fs.deleteOnExit(testrf); | 0 |
import org.apache.hc.core5.http.nio.SessionInputBuffer; | 1 |
import org.apache.ambari.server.controller.internal.RequestOperationLevel;
import org.apache.ambari.server.controller.spi.Resource;
import org.apache.ambari.server.orm.entities.RequestOperationLevelEntity;
private RequestOperationLevel operationLevel;
this.operationLevel = actionRequest.getOperationLevel();
... | 0 |
public synchronized Object getElementAt( int index ) { | 0 |
import com.google.common.collect.Sets; | 0 |
tlsSession.startTls(sslContext, sslBufferManagement, | 0 |
public static int indexOf(CharSequence cs, char c) {
int len = length(cs);
for (int pos = 0; pos < len; pos++) {
char ch = cs.charAt(pos);
if (ch == c) {
return pos;
}
}
return -1;
}
public static int lastIndexOf(CharSeque... | 0 |
public void shudownOutputStream() throws IOException {
if (log.isDebugEnabled()) {
log.debug("shudownOutputStream({})", this);
} | 0 |
public interface AlignedWindow extends Window<Void> { | 0 |
package org.apache.felix.scr.impl.parser; | 0 |
if (multiplier == 100) { // CHECKSTYLE IGNORE MagicNumber
scale += 2; // CHECKSTYLE IGNORE MagicNumber
} else if (multiplier == 1000) { // CHECKSTYLE IGNORE MagicNumber
scale += 3; // CHECKSTYLE IGNORE MagicNumber
scale += 2; // CHECKSTYLE IGNORE Magic... | 0 |
for (Entry<String,String> prop : setting.getOptions().entrySet()) { | 0 |
ComponentRegistry componentRegistry )
super( activator, metadata, componentRegistry ); | 0 |
assertEquals(mi.getTopKey(), newKey(3, 0));
assertEquals("1", mi.getTopValue().toString());
assertEquals(mi.getTopKey(), newKey(4, 0));
assertEquals("2", mi.getTopValue().toString());
assertEquals(mi.getTopKey(), newKey(4, 0));
assertEquals("2", mi.getTopValue().toString());
assertEquals(mi.... | 0 |
public static RuleSet[] getRuleSets() {
return new RuleSet[] {
BeamUncollectRule.INSTANCE,
BeamUnnestRule.INSTANCE,
BeamUnnestRule.INSTANCE,
BeamJoinRule.INSTANCE,
BeamEnumerableConverterRule.INSTANCE,
PruneEmptyRules.UNION_INSTANCE) | 0 |
return withTableProvider(inMemoryMetaStore);
throws ParseException {
try {
return planner.convertToBeamRel(query).toPTransform();
} catch (ValidationException | RelConversionException | SqlParseException e) {
throw new ParseException("Unable to parse query", e);
}
public boolean isDd... | 0 |
import org.apache.hc.core5.io.ShutdownType;
private void forceShutdown() {
public void shutdown(final ShutdownType shutdownType) {
if (shutdownType == ShutdownType.GRACEFUL) {
awaitShutdown(2, TimeUnit.SECONDS);
}
@Override
public void close() {
shutdown(S... | 0 |
progressUpdater = new DataflowWorkProgressUpdater(workItem, worker, workUnitClient, options) {
// Shorten reporting interval boundaries for faster testing.
@Override
protected long getMinReportingInterval() {
return 100;
}
@Override
protected long getLeaseRenewalLatencyM... | 0 |
int indexOfAt = serviceHostnameAndKerbDomain.indexOf("@");
// Handle Kerberos Service as well as User Principal Names
final String servicePrincipalName, serviceHostname;
if (indexOf > 0){
// e.g.... | 0 |
package org.apache.felix.sigil.common.config.internal;
import org.apache.felix.sigil.common.config.IBldProject; | 0 |
import java.util.Map;
@Override
public Map<String, Object> getPragmas() {
return script.getPragmas();
} | 0 |
package org.apache.beam.runners.spark.translation;
import org.apache.beam.runners.spark.EvaluationResult;
import org.apache.beam.runners.spark.SparkPipelineOptions;
import org.apache.beam.runners.spark.SparkPipelineRunner; | 0 |
private interface FileOperations { | 0 |
final Rule.Phoneme a_b = new Rule.Phoneme(a, b);
final Rule.Phoneme cd_ef = new Rule.Phoneme(cd, ef);
final Rule.Phoneme a_b_cd = new Rule.Phoneme(new Rule.Phoneme(a, b), cd); | 0 |
import org.apache.accumulo.server.security.AuditedSecurityOperation;
this.security = AuditedSecurityOperation.getInstance(master.getContext()); | 0 |
public interface Framework extends Bundle { | 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 |
* Users should extend this class and implement a static method using the {@code @Parameters}
* annotation.
public BaseJUnit4IteratorTest(IteratorTestInput input, IteratorTestOutput expectedOutput,
IteratorTestCase testCase) {
* A helper function to convert input, output and a list of test cases into a two-... | 0 |
dbAccessor.addColumn("viewinstance", new DBColumnInfo("xml_driven",
Character.class, 1, null, true)); | 0 |
* This interface lets <code>GraphicsNode</code> create instances of
* <code>GraphicsNodeRable</code> appropriate for the filter module
* Returns a <code>GraphicsNodeRable</code> initialized with the
* input <code>GraphicsNode</code>. | 0 |
* Describes the type of destination for an <code>SVGConverter</code>
* @return Transcoder object or <code>null</code> if there isn't a proper transcoder. | 0 |
updateIdEntry(a, isId);
updateIdEntry(a, isId);
updateIdEntry(a, isId);
private void updateIdEntry(AbstractAttr a, boolean isId) {
if (a.isIdAttr) {
if (!isId) {
ownerDocument.removeIdEntry(this, a.getValue());
}
} else if (isId) {
... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.