Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.batik.bridge.UpdateManagerAdapter;
addUpdateManagerListener(new UpdateManagerAdapter () {
UpdateManager um = updateManager;
public void managerStopped(UpdateManagerEvent e) {
// Remove ourselves from the old update manger,
... | 0 |
import javax.inject.Singleton;
| 1 |
package org.apache.sshd.common.forward;
import org.apache.sshd.common.Session;
import org.apache.sshd.common.TcpipForwarder;
import org.apache.sshd.common.TcpipForwarderFactory;
* The default {link TcpipForwarderFactory} implementation.
*
* @see DefaultTcpipForwarder
public class DefaultTcpipForwarderFactory impleme... | 0 |
/** How many of the values with each key are to be read.
* Note that the order matters as the conversion to ordinal is used below.
*/
READ_ALL_VALUES,
/** Read all the values twice. */
READ_ALL_VALUES_TWICE
if (valuesToRead.ordinal() >= ValuesToRead.READ_ALL_VALUES.ordinal()) {
... | 0 |
XmlHelper.setTextContent(require,this.getValue()); | 0 |
import org.apache.accumulo.core.conf.Property;
/**
* This class is responsible for managing the distribution of tablets throughout an Accumulo cluster. In most cases, users will want a balancer implementation
* which ensures a uniform distribution of tablets, so that no individual tablet server is handling significan... | 0 |
/*
* @author <a href="mailto:felix-dev@incubator.apache.org">Felix Project Team</a>
*/ | 0 |
prov.put("instance.name","FooProvider");
i3.put("instance.name","Object");
i4.put("instance.name","Ref");
i5.put("instance.name","Both"); | 0 |
ClassRepository classRepository;
public interface ClassRepository {
public byte[] getCompiledClass(String className);
public void addCompiledClass(String className,
Source source,
byte[] contents);
}
... | 0 |
* Defines a composite service using a composition manager that is used to
* instantiate component instances, depending of what is found from the configuration.
* The configuration is created from the org.apache.felix.dependencymanager.samples.conf.Configurator component.
* | 0 |
* @param chunkSizeHint fragment size hint defining an minimal size of a fragment
final int chunkSizeHint) {
this.fragHint = chunkSizeHint > 0 ? chunkSizeHint : 0; | 1 |
import org.apache.beam.sdk.annotations.Experimental;
import org.apache.beam.sdk.annotations.Experimental.Kind; | 0 |
/** {@link org.apache.commons.logging} logging facility */
static org.apache.commons.logging.Log log =
org.apache.commons.logging.LogFactory.getLog(SignatureAlgorithmSpi.class.getName()); | 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 |
if (needsSplit()) {
tabletServer.executeSplit(Tablet.this);
} else {
initiateMajorCompaction(MajorCompactionReason.NORMAL);
}
if (needsSplit()) {
tabletServer.executeSplit(this);
} else {
initiateMajorCompaction(MajorCompactionReaso... | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
if (currentTime >= stage.getLastAttemptTime(hostName, role) | 0 |
ServerContext context = new ServerContext(); | 0 |
protected boolean isKeyType(final ReferenceStrength type) { | 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 org.apache.beam.sdk.coders.AtomicCoder;
public static class NonDeterministicCoder extends AtomicCoder<String> {
public void verifyDeterministic() throws NonDeterministicException {
throw new NonDeterministicException(this, "Not Deterministic");
}
// success!
return;
fail("Expecte... | 0 |
case Blueprint:
resourceDefinition = new BlueprintResourceDefinition();
break;
| 0 |
*
*
*
*
inLocal.seek(pos);
| 0 |
private final Map<String, Pass3aVerifier> p3avs = new HashMap<String, Pass3aVerifier>();
private final Map<String, Pass3bVerifier> p3bvs = new HashMap<String, Pass3bVerifier>(); | 0 |
List<ServiceComponentHost> potentialHosts = new
ArrayList<ServiceComponentHost>();
for (ServiceComponentHost potentialSch : sc
.getServiceComponentHosts().values()) {
if (!potentialSch.getHostState().equals(HostState
.HEARTBEAT_LOST)) {
pot... | 0 |
package org.apache.beam.sdk.extensions.sql.impl.interpreter.operator;
import static com.google.common.base.Preconditions.checkArgument;
/** An operator that is applied to already-evaluated arguments. */
public interface BeamSqlBinaryOperator extends BeamSqlOperator {
default BeamSqlPrimitive apply(List<BeamSqlPrimiti... | 0 |
* limitations under the License. | 0 |
/** The coplet instance id. */
protected String copletInstanceId;
public void setCopletInstanceId(String cid) {
this.copletInstanceId = cid;
public String getCopletInstanceId() {
return this.copletInstanceId;
clone.copletInstanceId = null;
clone.copletInstanceId = this.co... | 0 |
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState; | 0 |
alert.setClusterId(-1L); | 0 |
public NullOutputStream() { | 0 |
import org.apache.felix.framework.util.manifestparser.NativeLibrary; | 0 |
new IdentityDoFn<String>(),
new MultiOutputDoFn(sideOutput1, sideOutput2),
new IdentityDoFn<String>(), | 0 |
private class FilePatternReader extends BoundedReader<T> { | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/map/AbstractLinkedMap.java,v 1.7 2004/01/08 22:37:30 scolebourne Exp $
* @version $Revision: 1.7 $ $Date: 2004/01/08 22:37:30 $
* @param threshold the threshold, must be sen... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/ContextClassLoaderLocal.java,v 1.4 2003/12/22 21:26:47 rdonkin Exp $
* $Revision: 1.4 $
* $Date: 2003/12/22 21:26:47 $
* @see java.lang.Thread#getContextClassLoader | 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 (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* v... | 1 |
import java.util.Collections;
import org.apache.http.NameValuePair;
import org.apache.http.auth.AuthChallenge;
import org.apache.http.auth.ChallengeType;
basicScheme.processChallenge(ChallengeType.TARGET, new AuthChallenge("basic", null, Collections.<NameValuePair>emptyList()));
basicScheme.proc... | 0 |
/**
* @version $Revision: 1.5 $ $Date: 2004/02/28 12:18:17 $
*/ | 0 |
import org.apache.beam.sdk.schemas.FieldValueGetter;
import org.apache.beam.sdk.schemas.FieldValueSetter; | 0 |
import org.apache.ambari.logsearch.config.api.ShipperConfigElementDescription;
import org.apache.ambari.logsearch.config.api.ShipperConfigTypeDescription;
@ShipperConfigTypeDescription(
name = "File Input",
description = "File inputs have some additional parameters:"
)
@ShipperConfigElementDescription(
path =... | 0 |
* @version CVS $Id: EPName.java,v 1.4 2004/01/31 08:50:39 antonio Exp $
public class EPName extends BaseElementProcessor {
public EPName() {
public String getName() {
if (_name == null) {
public void endProcessing() throws IOException {
} // end public class EPName | 0 |
* @throws IOException on error
/*** Same as <code> selectArticle(articleNumber, null) </code>
/*** Same as <code> selectPreviousArticle((ArticleInfo) null) </code>
* @return true if successful
/*** Same as <code> selectNextArticle((ArticleInfo) null) </code>
* @throws IOException tba | 0 |
import org.apache.atlas.repository.graphdb.GraphDBMigrator;
public PathTest(AtlasGraph graph, GraphDBMigrator migrator) {
super(graph, migrator); | 0 |
import org.apache.ambari.view.commons.hdfs.UserService;
* Checks connection to User HomeDirectory
* @param context View Context
*/
public static void userhomeSmokeTest(ViewContext context) {
try {
UserService userservice = new UserService(context);
userservice.homeDir();
} catch (WebAppli... | 0 |
assertEquals(0, hostVersionsH1Before.size());
assertEquals(1, hostVersionsH1After.size());
assertEquals(1, hostVersionsH1After.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 |
public static final String DATA_PROTOCOL = "data";
if ( externalResourceURL == null
||
!DATA_PROTOCOL.equals(externalResourceURL.getProtocol()) ) {
}
| 0 |
* @version CVS $Id: JspGenerator.java,v 1.3 2003/07/10 23:38:04 joerg Exp $
// TODO (KP): Should we exclude not supported protocols, say 'context'? | 0 |
import org.apache.commons.collections.AbstractObjectTest;
public class TestMultiValueMap<K, V> extends AbstractObjectTest { | 0 |
BootstrapClassLoaderManager.logDebug(context, "ShieldingListener: Loading listener class " + className); | 0 |
if (position > mark + readlimit) { | 0 |
import static org.apache.beam.sdk.transforms.display.DisplayDataMatchers.hasDisplayItem;
import org.apache.beam.sdk.transforms.display.DisplayData;
@Test
public void testDisplayData() {
Duration offset = Duration.standardSeconds(1234);
Duration size = Duration.standardSeconds(2345);
FixedWindows fixed... | 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 |
*
* @cocoon.sitemap.component.documentation
* A simple parser converting a Comma Separated Values (CSV) file into XML.
*
* @version $Id$ | 0 |
/*
* Copyright 2000-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 applic... | 0 |
String calculatedDigest =
Base64.getMimeEncoder().encodeToString(digestOutputStream.getDigestValue());
String calculatedDigest =
Base64.getMimeEncoder().encodeToString(this.digestOutputStream.getDigestValue()); | 0 |
*
*
*
*
*
*
*
*
*
*
*
*
| 1 |
private <T> void translateReadHelper(
PubsubIO.Read.Bound<T> transform,
context.addInput(PropertyNames.PUBSUB_DROP_LATE_DATA, transform.getDropLateData());
private <T> void translateWriteHelper(
PubsubIO.Write.Bound<T> transform,
context.addEncodingInput(WindowedValue.getValueOnlyCod... | 0 |
DIRECTION_VERB_PROPER("direction.verb.proper"); | 0 |
import com.google.cloud.dataflow.sdk.testing.RunnableOnService;
@Category(RunnableOnService.class)
@Category(RunnableOnService.class)
@Category(RunnableOnService.class)
@Category(RunnableOnService.class)
@Category(RunnableOnService.class)
@Category(RunnableOnService.class)
@Category(RunnableOnService.clas... | 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 ... | 1 |
import org.apache.beam.sdk.metrics.MetricFiltering;
return MetricFiltering.matches(filter, metricResult.getKey()); | 0 |
public static <E> Set<E> unmodifiableSet(final Set<? extends E> set) {
@SuppressWarnings("unchecked") // safe to upcast
final Set<E> tmpSet = (Set<E>) set;
return tmpSet;
@SuppressWarnings("unchecked") // safe to upcast
private UnmodifiableSet(final Set<? extends E> set) ... | 0 |
sink.initialize();
sink.commit();
try {
writer.rollback();
sink.rollback();
} catch (IOException ioex) {
// swallow exception
}
} finally {
try {
writer.close();
} catch (IOE... | 0 |
* Copyright (c) 2004 The Apache Software Foundation. All rights
* @version $Id: FTPFileList.java,v 1.5 2004/01/01 21:04:20 scohen Exp $ | 0 |
PTransformTranslation.SPLITTABLE_PROCESS_KEYED_URN), | 0 |
import org.apache.hc.core5.annotation.Contract;
import org.apache.hc.core5.annotation.ThreadingBehavior;
@Contract(threading = ThreadingBehavior.SAFE) | 0 |
* Base64 string to convert into its original form
* A decoder exception is thrown if a failure condition is encountered during the decode process.
throw new DecoderException(e.getMessage(), e); | 0 |
Date predictNextRun(CrontabEntry schedule); | 0 |
if (null != xml && StringUtils.isNotBlank(xml.getPackageVersion(osFamily))) {
params.put(KeyNames.PACKAGE_VERSION, xml.getPackageVersion(osFamily)); | 0 |
LOG.debug("Error checking {} server host component state: ", componentName, e); | 1 |
import org.apache.commons.vfs.provider.http.HttpFileSystem;
* @version $Revision: 1.8 $ $Date: 2004/06/17 19:29:29 $
if (folder.getFileSystem() instanceof HttpFileSystem)
{
// bad hack, but this test might not fail on HttpFileSystem as there are no direcotries.
// A Directory do... | 0 |
* Whether to update the currently running pipeline with the same name as this one.
*/
@Override
@SuppressWarnings("deprecation") // base class member deprecated in favor of this one.
@Description(
"If set, replace the existing pipeline with the name specified by --jobName with "
+ "this pipe... | 0 |
*
* <p>Example: The initial interval is .5 seconds and the maximum interval is 60 secs.
* retry# retry_interval randomized_interval
* 1 0.5 [0.25, 0.75]
* 2 0.75 [0.375, 1.125]
* 3 1.125 [0.562, 1.687]
* 4 1.68... | 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 |
throw new FileSystemException( "vfs.provider/missing-double-slashes.error", uri );
throw new FileSystemException( "vfs.provider/missing-hostname.error", uri );
throw new FileSystemException( "vfs.provider/missing-port.error", uri );
throw new FileSystemException( "vfs.pro... | 0 |
if (this.key.selector().isOpen()) {
this.key.selector().wakeup();
} | 0 |
/**
* 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
* distribu... | 0 |
* @version $Revision: 1.7 $ $Date: 2004/02/28 12:18:17 $ | 0 |
Constructor constructor = m_clazz.getConstructor(new Class[] {ComponentManager.class, BundleContext.class});
instance = constructor.newInstance(new Object[] {this, m_factory.getBundleContext()});
if (instance == null) {
Constructor constructor = m_clazz.getConstructor(new Class[] {ComponentManager.class... | 0 |
import org.apache.calcite.util.Pair;
public MergeAggregationRecord(Schema outSchema, int windowStartFieldIdx) {
public AggregationAdaptor(
List<Pair<AggregateCall, String>> aggregationCalls, Schema sourceSchema) {
for (Pair<AggregateCall, String> aggCall : aggregationCalls) {
AggregateCall... | 0 |
package org.apache.felix.karaf.admin;
import org.apache.felix.karaf.admin.InstanceSettings;
import org.junit.Assert;
InstanceSettings is =
Assert.assertNull(is.getLocation());
Assert.assertFalse(is.equals(null));
Assert.assertFalse(is.equals(new Object())); | 0 |
if (getType() != data[1]) {
}
if (index >= length) {
} | 1 |
* @version CVS $Id: CopletInstanceData.java,v 1.7 2003/06/17 20:10:39 cziegeler Exp $
protected CopletData copletData; | 0 |
if (fieldIndices.get(field.getName()) != null) {
throw new IllegalArgumentException(
"Duplicate field " + field.getName() + " added to schema");
} | 0 |
float newInterval(Interval interval) {
return Float.POSITIVE_INFINITY;
float removeInterval(Interval interval) {
return Float.POSITIVE_INFINITY;
float handleTimebaseUpdate(InstanceTime instanceTime, float newTime) {
return Float.POSITIVE_INFINITY; | 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 |
return new SSLConnectionSocketFactory(SSLContexts.createDefault(), HttpsSupport.getDefaultHostnameVerifier());
(javax.net.ssl.SSLSocketFactory) javax.net.ssl.SSLSocketFactory.getDefault(),
HttpsSupport.getSystemProtocols(),
HttpsSupport.getSystemCipherSuits(),
... | 0 |
assertTrue("Total watches was not less than 650, but was " + total, total < 600); | 0 |
InputStream is; | 0 |
*
} catch (Exception e) {
log.error("Caught exception replicating data to {} at {}", peerInstance.getInstanceName(), peerTserver, e);
throw e; | 0 |
responseWrapper.setHeader("X-Content-Type-Options", "nosniff");
responseWrapper.setHeader("X-XSS-Protection", "1; mode=block");
responseWrapper.setHeader("Strict-Transport-Security", "max-age=31536000; includeSubDomains"); | 0 |
final Config cfg = new Config("a", | 0 |
@Override
public TrackActionResponse createOperations(Set<OperationRequest> request)
throws AmbariException {
// TODO Auto-generated method stub
return null;
}
@Override
public void getOperations(Set<OperationRequest> request)
throws AmbariException {
// TODO Auto-generated method stu... | 0 |
import org.apache.mina.util.CopyOnWriteMap;
return new HashMap<String, ServiceComponentHost>(hostComponents); | 0 |
* @version $Id$ | 0 |
String ns = System.getProperty("hc.benchmark.n-requests", "200000");
new TestHttpClient3(),
new TestHttpJRE(),
new TestHttpCore(),
new TestJettyHttpClient(),
new TestNingHttpClient() | 0 |
import org.osgi.framework.wiring.BundleRevision;
BundleRevisionImpl module = (BundleRevisionImpl) bundle.adapt(BundleRevision.class);
BundleRevisionImpl module = ((BundleRevisionImpl) bundle.adapt(BundleRevision.class));
BundleRevisionImpl module = (BundleRevisionImpl) pd.getRevision();
... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.