Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/AbstractCharCollectionCollection.java,v 1.2 2003/08/31 17:21:17 scolebourne Exp $
* any, must include the following acknowledgement:
* Alternately... | 0 |
* Copyright 2001-2006 The Apache Software Foundation | 0 |
String updated = upgradeCatalog270.updateLuceneMatchVersion(solrConfigXml,"7.3.0");
assertThat(updated.contains("<luceneMatchVersion>7.3.0</luceneMatchVersion>"), is(true)); | 0 |
public static <K, V> SizedWeigher<K, V> withBaseWeight(int baseWeight) {
return new SizedWeigher<>(baseWeight);
}
private SizedWeigher(int baseWeight) { | 0 |
* @version CVS $Id: Web3Client.java,v 1.2 2003/03/16 17:49:09 vgritsenko Exp $ | 0 |
@Override
public void setUp() throws ClassNotFoundException | 0 |
* Copyright (C) 2015 Google Inc. | 0 |
* Returns a filter that returns true if the file name starts with the specified text.
* @param prefix the file name prefix
* Returns a filter that returns true if the file name starts with the specified text.
* @param prefix the file name prefix
* Returns a filter that returns true if the fil... | 0 |
import org.junit.Assert;
import org.junit.Test;
@Test
Assert.fail("should have timed out");
Assert.assertTrue(future.isCancelled());
@Test
Assert.fail("should have timed out");
Assert.assertTrue(future.isCancelled());
@Test
Assert.fail("should have timed o... | 0 |
import com.google.cloud.dataflow.sdk.values.TypeDescriptor;
return InstanceBuilder.ofType(new TypeDescriptor<Reader<T>>() { | 0 |
short MODIFICATION = 1;
short ADDITION = 2;
short REMOVAL = 3;
Node getRelatedNode();
String getPrevValue();
String getNewValue();
String getAttrName();
short getAttrChange();
void initMutationEvent(String typeArg,
... | 0 |
* @return host id
*/
Long getHostId();
/** | 0 |
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@RunWith(JUnit4.class) | 0 |
* nor may "Apache" appear in their name, without | 0 |
Element patternContent
0,
// StringBuffer patternAttrBuf = new StringBuffer(URL_PREFIX);
// patternAttrBuf.append(SIGN_POUND);
// patternAttrBuf.append(patternDef.getAttributeNS(null, SVG_ID_ATTRIBUTE));
// patternAttrBuf.append(URL_SUFFIX);
... | 0 |
LOG.info(
+ "{} >= current stop position: {}",
forkShufflePosition, this.stopPosition.encodeBase64());
return null; | 0 |
* @version CVS $Id: PortletAdapter.java,v 1.5 2004/03/04 09:17:48 cziegeler Exp $
contentHandler.endPrefixMapping("portal"); | 0 |
public long getEncodedElementByteSize(String value)
int size = Utf8.encodedLength(value);
return VarInt.getLength(size) + size; | 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 |
localResource.getBundle().update(new URL(deployResources[i].getURI()).openStream());
URL url = new URL(deployResources[i].getURI()); | 0 |
package org.apache.atlas.repository;
import org.apache.atlas.MetadataException;
import org.apache.atlas.typesystem.IReferenceableInstance;
import org.apache.atlas.typesystem.ITypedReferenceableInstance;
import org.apache.atlas.typesystem.ITypedStruct;
import org.apache.atlas.typesystem.types.AttributeInfo;
import org.... | 0 |
import org.apache.commons.configuration.ex.ConfigurationRuntimeException; | 0 |
import java.util.Optional; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/Attic/AbstractBag.java,v 1.2 2002/02/10 08:07:42 jstrachan Exp $
* $Revision: 1.2 $
* $Date: 2002/02/10 08:07:42 $
* Copyright (c) 1999-2002 The Apache Software Foundation. All... | 0 |
if (arect.intersects(rect) == false)
return null;
if (arect.intersects(srect) == false)
return null;
if (srect.intersects(outputRgn) == false)
return new Rectangle2D.Float();
Rectangle2D bounds = getBounds2D();
if (srect.intersects(bounds) ==... | 0 |
public BeamMinusRel(
RelOptCluster cluster, RelTraitSet traits, List<RelNode> inputs, boolean all) {
delegate = new BeamSetOperatorRelBase(this, BeamSetOperatorRelBase.OpType.MINUS, inputs, all);
@Override
public SetOp copy(RelTraitSet traitSet, List<RelNode> inputs, boolean all) { | 0 |
public ClusterState getState(); | 0 |
/**
* Method toString
* @inheritDoc
*
*/
public String toString() {
if (this.isNodeSet()) {
return "XMLSignatureInput/NodeSet/" + this._inputNodeSet.size()
}
if (this.isElement()) {
return "XMLSignatureInput/Element/" + this._subNode
... | 0 |
import org.apache.felix.sigil.eclipse.ui.util.DefaultTableProvider; | 0 |
public String[] getDNChains(String root, IContentLoader bundleRevision)
} | 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 n... | 0 |
closeSocket(); | 0 |
public String getHostName(String clusterName, String componentName);
public Map<String, String> getHostMapping(String clusterName); | 0 |
import org.apache.ambari.server.orm.dao.HostRoleCommandDAO;
bind(HostRoleCommandDAO.class).toInstance(createMock(HostRoleCommandDAO.class)); | 0 |
import java.net.URL;
*
* @param documentURL the url for the document which will be scripted
public Interpreter createInterpreter(URL documentURL); | 0 |
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import java.util.Map; | 0 |
package org.apache.commons.beanutils2.locale;
import org.apache.commons.beanutils2.ConversionException;
import org.apache.commons.beanutils2.locale.LocaleConvertUtils;
value = LocaleConvertUtils.convert("org.apache.commons.beanutils2.Undefined", Class.class); | 1 |
import org.apache.beam.runners.dataflow.DataflowPipelineJob;
import org.apache.beam.runners.dataflow.DataflowPipelineRunner;
import org.apache.beam.runners.dataflow.options.DataflowPipelineOptions;
import org.apache.beam.runners.dataflow.util.MonitoringUtil; | 0 |
import java.nio.charset.StandardCharsets;
zoo.putPersistentData(ZKUserPath, rootuser.getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.FAIL); | 0 |
repoAdmin.removeRepository(repos[i].getURI()); | 0 |
REDIRECT, BACK_OFF, RETRY_SERVICE_UNAVAILABLE, RETRY_IO_ERROR, PROTOCOL, CONNECT, MAIN_TRANSPORT | 0 |
package org.apache.jute.compiler.generated; | 0 |
* Copyright 2001-2005 The Apache Software Foundation. | 0 |
import org.apache.excalibur.source.SourceParameters;
import org.apache.excalibur.xml.dom.DOMParser;
import org.apache.cocoon.util.AbstractLogEnabled;
| 0 |
* The EvaluationContext allows us to define pipeline instructions and translate between
* {@code PObject<T>}s or {@code PCollection<T>}s and Ts or DStreams/RDDs of Ts.
public class EvaluationContext {
public JavaSparkContext getSparkContext() {
/**
* Retrieve an object of Type T associated with the PValue pass... | 0 |
*
* <p>It does not check for correct types on the OperandStack or in the
* stack). Monitor-specific behaviour is not simulated.</p>
* <b>Conventions:</b>
* <p>Type.VOID will never be pushed onto the stack. Type.DOUBLE and Type.LONG
* object on the stack here.</p>
*
* <p>If a two-slot type is stored into a loc... | 0 |
* {@code "Discard"} cookie attribute handler for RFC 2965 cookie spec. | 0 |
package org.apache.felix.ipojo.runtime.core.components;
import org.apache.felix.ipojo.runtime.core.services.CheckService;
import java.util.Properties;
public class SeveralConstructors implements CheckService {
private String name;
public SeveralConstructors(){
this("hello world"... | 0 |
import org.apache.batik.ext.awt.image.GraphicsUtil;
(newAOI.getX()-1/scaleX,
newAOI.getY()-1/scaleY,
newAOI.getWidth()+2/scaleX,
newAOI.getHeight()+2/scaleY);
(GraphicsUtil.wrap(result), | 0 |
import org.apache.ambari.server.orm.OrmTestHelper;
import org.apache.ambari.server.orm.entities.RepositoryVersionEntity;
import org.junit.Assert;
Cluster cluster = clusters.getCluster(CLUSTER1);
OrmTestHelper helper = injector.getInstance(OrmTestHelper.class);
RepositoryVersionEntity repositoryVersion = he... | 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$ $Date$ | 0 |
import org.apache.felix.dependencymanager.test2.components.Ensure;
import org.apache.felix.dependencymanager.test2.integration.common.TestBase; | 0 |
insert(HOST_B_ATTRS); // Double insert should be allowed. | 0 |
private static final DisplayData EMPTY = new DisplayData(Maps.newHashMap());
return new Path(ImmutableList.of()); | 0 |
* return null. A destination must have deterministic hash and equality methods defined.
* Finalizes writing by copying temporary output files to their final location.
* <p>Returns the set of temporary files generated. Callers must call {@link
* #removeTemporaryFiles(Set)} to cleanup these files.
... | 0 |
package org.apache.felix.http.base.internal.service;
import org.apache.felix.http.base.internal.context.ExtServletContext; | 0 |
this.trailerBufs = new ArrayList<>(); | 0 |
import org.apache.ambari.server.state.StackId;
public Stack(StackId stackId, AmbariManagementController ambariManagementController) throws AmbariException {
this(stackId.getStackName(), stackId.getStackVersion(), ambariManagementController);
}
| 0 |
import com.twitter.aurora.gen.AssignedTask;
import com.twitter.aurora.gen.ScheduledTask;
import com.twitter.aurora.gen.TaskEvent;
public void testAddTasks() {
ITaskConfig task = makeTask(JIM, MY_JOB, 3);
String taskId = "a";
expect(taskIdGenerator.apply(task)).andReturn(taskId);
expectStateTransitions... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/core/InvokeTag.java,v 1.4 2003/10/09 21:21:29 rdonkin Exp $
* $Revision: 1.4 $
* $Date: 2003/10/09 21:21:29 $
* any, must include the following acknowledgement:
* Alternately, t... | 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... | 0 |
String name;
String signature;
String access; // Short cuts to constant pool | 0 |
* Remove the resource identified by the name from the list.
* @param c The {@link Comparator} to decide whether the {@link NamedResource#getName()}
* matches the <tt>name</tt> parameter
* @return the removed resource from the list or {@code null} if not in the list
pub... | 0 |
* Gets the transformers.
*
* @return a copy of the transformers
return FunctorUtils.copy(iTransformers); | 0 |
public class EvenOdd
{
* Returns "even" or "odd". Whatever it returns on one invocation, it will return the opposite on the next. By
* default, the first value returned is "even".
public void setEven( boolean value ) | 0 |
originalNetwork.successors(node).stream()
originalNetwork.nodes().stream() | 0 |
* @author $Id: 04bd934c71fcf7b89f513a3538a3369e08002710 $
class FunctioningImpl extends AbstractSpecifying<Functioning>
implements Functioning {
private InternalConverter converter;
FunctioningImpl(InternalConverter converterImpl) {
converter = converterImpl;
}
@Override
public <T> Function<Object,T> to(Class... | 0 |
/**
* Returns the number of listeners in the list.
*/
public int size() {
return n;
}
| 0 |
* A first component that is not handled in parallel.
public class MyComponent {
private final String m_name;
MyComponent(String name) {
m_name = name;
}
public void start() throws InterruptedException {
System.out.println("Starting Component " + m_name + " current thread=" + Thread... | 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.hc.core5.annotation.Contract;
import org.apache.hc.core5.annotation.ThreadingBehavior;
@Contract(threading = ThreadingBehavior.IMMUTABLE) | 0 |
import java.util.List;
*
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
buf.append(propertiesToString(ref, null));
buf.append("}");
return buf.toString();
}
}
/**
* Converts the properties of a service reference to a string.
... | 0 |
assertEquals(8, resp.getUpgradePacks().size()); | 0 |
// let the definition know where it comes from
definition.setEnclosingLibrary(this);
// add def to our list of defs | 0 |
@Override
public String toString() { | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/Attic/Constant.java,v 1.6 2003/05/28 04:14:32 dgraham Exp $
* $Revision: 1.6 $
* $Date: 2003/05/28 04:14:32 $
* @version $Revision: 1.6 $ $Date: 2003/05/28 04:14:32 $
* @deprecate... | 0 |
import org.apache.accumulo.core.rpc.ThriftUtil; | 1 |
import com.twitter.common.collections.Pair;
import com.twitter.mesos.Tasks;
LOG.info(String.format("Staging task for job %s", Tasks.jobKey(task)));
return String.format("%s/%d", Tasks.jobKey(task), task.getTaskId()); | 0 |
* @since 6.0 | 0 |
attribInfo.put("defaultValue", attributeDef.getDefaultValue());
ret.setDefaultValue((String) attribInfo.get("defaultValue")); | 0 |
* SSH identifier for ED25519 elliptic curve keys
*/
String SSH_ED25519 = "ssh-ed25519";
/** | 0 |
import static org.apache.aurora.scheduler.updater.JobUpdateStateMachine.AUTO_RESUME_STATES;
LOG.info("Automatically restoring pulse state for " + key);
if (AUTO_RESUME_STATES.contains(status)) {
LOG.info("Automatically resuming update " + key);
try {
changeJo... | 0 |
@Description("Fixed number of shards to produce per window, or null for runner-chosen sharding")
Integer getNumShards();
void setNumShards(Integer numShards);
.apply(new WriteOneFilePerWindow(output, options.getNumShards())); | 0 |
* or more contributor license agreements. See the NOTICE file
* regarding copyright ownership. The ASF licenses this file
* with the License. You may obtain a copy of the License at
* KIND, either express or implied. See the License for the | 0 |
final static Partitioner DEFAULT_PARTITIONER = new DefaultPartitioner();
default Partitioner<T> getPartitioner() {
return DEFAULT_PARTITIONER;
}
return getPartitioner() instanceof DefaultPartitioner; // DefaultPartitioner is final | 0 |
public void close() throws IOException {
if (this.shutdown) {
return;
}
writeCompleted();
}
| 0 |
* Some of the sample strings from RFC 3492
assertEquals("\u0644\u064A\u0647\u0645\u0627\u0628\u062A\u0643\u0644" +
assertEquals("\u004D\u0061\u006A\u0069\u3067\u004B\u006F\u0069\u3059" +
"\u308B\u0035\u79D2\u524D",
assertEquals("\u0644\u064A\u0647\u0645\u0627\u0628... | 0 |
assertEquals(AmbariSNMPDispatcher.AMBARI_ALERT_TRAP_OID, variableBindings.get(SnmpConstants.snmpTrapOID.toString()).toValueString());
assertEquals(String.valueOf(ALERT_STATE.getIntValue()), variableBindings.get(AmbariSNMPDispatcher.AMBARI_ALERT_STATE_OID).toValueString());
assertEquals(AmbariSNM... | 0 |
private List<DiskInfo> mounts = new ArrayList<>();; | 1 |
import java.nio.charset.Charset;
private static final Charset utf8 = Charset.forName("UTF8");
this.value = new Value(Integer.toString(count).getBytes(utf8)); | 0 |
import org.apache.sshd.common.scp.helpers.DefaultScpStreamResolverFactory;
protected final ScpStreamResolverFactory streamFactory;
FileSystem fileSystem, ScpFileOpener opener,
ScpStreamResolverFactory streamFactory, ScpTransferEventListener eventListener) {
this.streamFactory = (stre... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/converters/DoubleConverterTestCase.java,v 1.2 2003/10/05 13:32:38 rdonkin Exp $
* $Revision: 1.2 $
* $Date: 2003/10/05 13:32:38 $
*
* Copyright (c) 2001-2003 The Apache Software F... | 0 |
final Date now = new Date();
final HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, entry
final HttpEntity entity = new CacheEntity(entry);
final long age = this.validityStrategy.getCurrentAgeSecs(entry, now);
final HttpResponse response = new BasicHttpResp... | 0 |
import org.apache.beam.sdk.annotations.Experimental;
| 0 |
* @return CollectionMutator<E> | 0 |
import java.sql.SQLException;
import org.apache.ambari.server.AmbariException;
import org.apache.ambari.server.H2DatabaseCleaner;
public void teardown() throws AmbariException, SQLException {
H2DatabaseCleaner.clearDatabaseAndStopPersistenceService(injector);
} | 0 |
.toInstance(MoreExecutors.directExecutor()); | 0 |
package org.apache.hc.core5.http.nio.codecs; | 0 |
public String getReason(int status, Locale loc); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.