Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
/**
* 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 |
for (final String name : names) {
} catch (final CloneNotSupportedException ex) {
final BasicHttpParams clone = (BasicHttpParams) super.clone();
for (final Map.Entry<String, Object> me : this.parameters.entrySet()) { | 0 |
LOG.trace("Putting monitor to sleep for " + threadWakeupInterval + " " +
"milliseconds");
Thread.sleep(threadWakeupInterval);
LOG.trace("Generated " + cmds.size() + " status commands for host: " +
hostname); | 0 |
this.heartbeatMonitor = new HeartbeatMonitor(fsm, aq, am, 60000, ambariMetaInfo); | 0 |
package org.apache.commons.cli2.bug;
import junit.framework.TestCase;
import org.apache.commons.cli2.*;
import org.apache.commons.cli2.builder.ArgumentBuilder;
import org.apache.commons.cli2.builder.DefaultOptionBuilder;
import org.apache.commons.cli2.builder.GroupBuilder;
import org.apache.commons.cli2.commandline.Pa... | 0 |
m_factoryName = cm.getAttribute("name");
if (m_isPublic) {
// Exposition of the factory service
m_sr = m_context.registerService(new String[] { Factory.class.getName() }, this, getProperties());
} | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/PriorityQueue.java,v 1.7 2003/08/31 17:26:44 scolebourne Exp $
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear in the soft... | 0 |
import java.util.Map;
ServerCnxn cnxn = pendingRevalidations.remove(sessionId);
Map<Long, Integer> touchTable = zk.getTouchSnapshot(); | 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 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 |
private interface Options extends PipelineOptions { | 0 |
import junit.framework.Assert;
| 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/decorators/Attic/TransformedSet.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 BEFORE v3.0 | 0 |
* FIXME - Remove dependency to Xerces (XPathAPI)
*
* @version $Id: History.java,v 1.3 2004/03/01 21:00:27 cziegeler Exp $ | 0 |
private final RegexValidator regexValidator;
private final int minLength;
private final int maxLength;
private final CheckDigit checkdigit;
if (regex != null && regex.length() > 0) {
this.regexValidator = new RegexValidator(regex);
} else {
this.regexValidator = n... | 0 |
* <p>Implementation of <strong>org.apache.commons.digester.Digester</strong> | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger LOG = LoggerFactory.getLogger(FileTxnSnapLog.class); | 0 |
import org.apache.beam.sdk.fn.channel.ManagedChannelFactory; | 0 |
package com.twitter.mesos.scheduler.events;
import com.google.common.eventbus.EventBus;
import com.google.inject.Binder;
import com.google.inject.PrivateModule;
import com.google.inject.Provides;
import com.google.inject.Singleton;
import com.twitter.common.base.Closure;
import com.twitter.common.inject.ProviderMetho... | 0 |
import org.apache.http.conn.SecureSocketFactory; | 0 |
*
ArrayList<String> list = new ArrayList<String>();
return list.toArray(new String[list.size()]); | 0 |
package org.apache.bcel.data; | 1 |
* Gets the summary of the task or {@code null}.
*
* @return the task summary or {@code null}.
*/
public String getSummary() {
return summary;
}
/** | 0 |
import org.apache.accumulo.core.file.blockfile.cache.BlockCacheManager;
import org.apache.accumulo.core.file.blockfile.cache.CacheType;
import org.apache.accumulo.core.file.blockfile.cache.lru.LruBlockCache;
import org.apache.accumulo.core.file.blockfile.cache.lru.LruBlockCacheManager;
private BlockCacheManager man... | 0 |
/* $Id$
*
* 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"); ... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestCharListIterator.java,v 1.2 2003/08/31 17:28:41 scolebourne Exp $
* any, must include the following acknowledgement:
* Alternately, this acknowledgemen... | 0 |
import org.apache.commons.lang.ObjectUtils;
if (StringUtils.isNotBlank(ObjectUtils.toString(propertyMap.get(REPOSITORY_VERSION_UPGRADE_PACK_PROPERTY_ID)))) {
throw new AmbariException("Upgrade pack can't be changed for repository version which is " +
final String upgradePackage = pro... | 0 |
CryptoModuleParameters encryptSecretKey(CryptoModuleParameters params);
CryptoModuleParameters decryptSecretKey(CryptoModuleParameters params); | 0 |
/*
* Copyright 2013 Twitter, Inc.
*
* 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 t... | 0 |
protected int estimateElementsLen(final HeaderElement[] elems) {
boolean quote,
protected int estimateHeaderElementLen(final HeaderElement elem) {
protected int estimateParametersLen(final NameValuePair[] nvps) {
final NameVal... | 0 |
* Map of themes, single value currently
*/
private Map<String, ThemeModule> themeModules = new HashMap<String, ThemeModule>();
/**
protected boolean valid = true;
populateThemeModules();
mergeThemes(parentModule, allStacks, commonServices);
private void populateThemeModules() {
ThemeModule ... | 0 |
public class EnableBackgroundResolver implements RelativeValueResolver {
return SVGValueConstants.CSS_ENABLE_BACKGROUND_PROPERTY;
return new CSSOMReadOnlyValue(SVGValueConstants.ACCUMULATE_VALUE); | 0 |
/*
* Copyright 2001-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 applicable la... | 0 |
/**
* A single key/value pair inside a Configuration.
*/ | 0 |
package org.apache.batik.anim.dom;
import org.apache.batik.dom.svg.SVGPathSegConstants; | 0 |
package org.apache.commons.vfs2.impl;
import org.apache.commons.vfs2.FileObject;
import org.apache.commons.vfs2.FileSelector;
import org.apache.commons.vfs2.FileSystemException;
import org.apache.commons.vfs2.Selectors;
import org.apache.commons.vfs2.VfsLog;
import org.apache.commons.vfs2.provider.AbstractVfsComponent;... | 1 |
Set<String> applicationTags = yarnApp.getApplicationTags();
if (applicationTags != null && applicationTags.size() > 0) {
for (String tag : applicationTags) {
int index = tag.indexOf(':');
if (index > 0 && index < tag.length() - 1) {
String key = tag.substring(0, index).trim();
... | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList; | 0 |
throw (RuntimeSshException) new RuntimeSshException("Failed to get the session.", (Throwable) v); | 0 |
() -> storage.write((NoResult.Quiet) storeProvider -> { | 0 |
import com.google.cloud.dataflow.sdk.util.DefaultTrigger;
import com.google.cloud.dataflow.sdk.util.WindowingStrategy;
SerializableUtils.serializeToByteArray(
new DoFnInfo(fn, WindowingStrategy.globalDefault())));
normalParDoFn.fnFactory.createDoFnInfo().getWindowingStrategy().getWin... | 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 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/compiler/LocationPath.java,v 1.4 2002/04/24 04:05:38 dmitri Exp $
* $Revision: 1.4 $
* $Date: 2002/04/24 04:05:38 $
* @version $Revision: 1.4 $ $Date: 2002/04/24 04:05:38 $ | 0 |
import org.apache.beam.sdk.schemas.SchemaCoder;
import org.apache.beam.sdk.transforms.SerializableFunctions;
SchemaCoder.of(
PAYLOAD_SCHEMA, SerializableFunctions.identity(), SerializableFunctions.identity()), | 0 |
import java.util.UUID;
import org.apache.ambari.server.state.alert.SourceType;
long clusterId = injector.getInstance(OrmTestHelper.class).createCluster(
"cluster" + System.currentTimeMillis());
Cluster cluster = clusters.getClusterById(clusterId);
List<AlertDefinitionEntity> definitions = dao.findAl... | 0 |
import org.apache.accumulo.core.util.CachedConfiguration;
import org.apache.accumulo.server.fs.ViewFSUtils;
// if path points to a viewfs path, then resolve to underlying filesystem
if (ViewFSUtils.isViewFS(ns)) {
Path newSource = ViewFSUtils.resolvePath(ns, source);
if (!newSource.equals(source) &... | 0 |
import org.apache.zookeeper.ZooKeeper;
/**
* this is only for testing purposes.
* should never be useed otherwise
*/
public static boolean failCreate = false;
if (lastSlash == -1 || path.indexOf('\0') != -1 || failCreate) {
LOG.warn("Invalid path " + ... | 0 |
protected class CanvasSVGListener extends ExtendedSVGListener { | 1 |
import java.io.File;
import java.net.URISyntaxException;
import javax.imageio.IIOException;
import org.apache.hadoop.fs.FSDataInputStream;
import org.apache.hadoop.fs.FileSystem;
Path path;
File tempFile = new File(CUTFILE_KEY);
if (tempFile.exists()) {
path = new Path(CUTFILE_KEY);
} e... | 0 |
import org.apache.beam.sdk.io.DynamicFileDestinations;
import org.apache.beam.sdk.transforms.SerializableFunctions;
StreamingShardedWriteFactory<Object, Void, Object> factory =
WriteFiles<Object, Void, Object> original =
WriteFiles.to(new TestSink(tmpFolder.toString()), SerializableFunctions.identity())... | 0 |
/**
* A specialized instance which is configured to suppress the special {@code class}
* properties of Java beans. Unintended access to the property {@code class} (which is
* common to all Java objects) can be a security risk because it also allows access to
* the class loader. Adding this insta... | 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 org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.AccumuloSecurityException;
import org.apache.accumulo.core.client.TableExistsException;
import org.apache.accumulo.core.client.TableNotFoundException;
connector = ensureTraceTableExists(conf);
int port = conf.getPo... | 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 java.util.Optional;
assertEquals(Optional.empty(), select()); | 0 |
pipeline.getCoderRegistry().registerCoderForClass(MyInteger.class, myIntegerCoder);
pipeline.getCoderRegistry().registerCoderForClass(MyInteger.class, myIntegerCoder);
pipeline.getCoderRegistry().registerCoderForClass(MyInteger.class, myIntegerCoder);
pipeline.getCoderRegistry().registerCoderForClass(My... | 0 |
if (nextLineTabStop >= width)
{
// stops infinite loop happening
throw new IllegalStateException("Total width is less than the width of the argument and indent " +
"- no room for the description");
}
| 0 |
import org.apache.beam.runners.core.KeyedWorkItem;
import org.apache.beam.runners.core.KeyedWorkItems; | 0 |
private GroupByKeyIterator<String, Integer, GlobalWindow> createGbkIterator() {
ItemFactory( | 0 |
public InetAddress[] resolve(final String host) throws UnknownHostException { | 0 |
return ASTArrayAccess.evaluateExpr(obj, val, getUberspect()); | 0 |
import org.apache.ambari.server.orm.entities.RepoOsEntity;
RepoOsEntity osEntity = repoVersionHelper.getOSEntityForHost(host, repoVersion); | 0 |
package org.apache.felix.moduleloader; | 1 |
import org.apache.atlas.TestModules;
@Guice(modules = {TestModules.TestOnlyModule.class})
// AtlasGraphProvider.cleanup(); | 0 |
protected void map(Key key, Value value, Context context) {
protected void cleanup(Context context) { | 0 |
import org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection;
import org.apache.hc.core5.http.io.HttpRequestHandler;
import org.apache.hc.core5.http.testserver.io.HttpClient;
import org.apache.hc.core5.http.testserver.io.HttpServer; | 1 |
import org.apache.avalon.framework.activity.Startable;
Startable,
public void start() throws Exception {
public void stop( ) { | 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 |
Set<ByteBuffer> splits = new HashSet<ByteBuffer>();
splits.add(ByteBuffer.wrap("a".getBytes()));
splits.add(ByteBuffer.wrap("c".getBytes()));
splits.add(ByteBuffer.wrap("z".getBytes()));
tpc.proxy().tableOperations_merge(userpass, testtable, ByteBuffer.wrap("b".getBytes()), ByteBuffer.wrap("d".getBy... | 0 |
public static ZooKeeperConfig create(Iterable<InetSocketAddress> servers) { | 0 |
/**
* Returns the document descriptor associated with the latest created
* document.
* @return null if no document or descriptor was previously generated.
*/
DocumentDescriptor getDocumentDescriptor(); | 0 |
private HttpCache mockCache;
HttpCache cache = new BasicHttpCache(MAX_ENTRIES); | 0 |
* nor may "Apache" appear in their name, without
import org.apache.commons.net.io.SocketInputStream; | 0 |
import org.apache.beam.sdk.runners.PTransformOverrideFactory.ReplacementOutput;
import org.apache.beam.sdk.values.PValue;
WriteFilesResult<Void> originalResult = objs.apply(original);
WriteFilesResult<Void> replacementResult = objs.apply(replacement);
Map<PValue, ReplacementOutput> res = factory
.m... | 0 |
} catch (NumberFormatException nfEx ) {
(ctx, filterElement, nfEx, ERR_ATTRIBUTE_VALUE_MALFORMED,
new Object[] {SVG_RADIUS_ATTRIBUTE, s, nfEx }); | 0 |
private static final Runnable DUMMY_RUNNABLE = new Runnable() { public void run() {}; };
// for now just put some non-null value in there so we can never
// get a race condition when two threads enter this section after
// one another (causing sheduleNext() to be invoked twice below)
m_active =... | 0 |
/** Apex {@link PipelineRunner} for testing. */
return delegate.run(pipeline).getApexDAG();
@SuppressWarnings("Finally") | 0 |
* @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> | 0 |
public interface MetadataService { | 0 |
package org.apache.felix.sigil.eclipse.ui.internal.editors.project; | 0 |
public void testOptionalAttributesInMetaData() throws IOException, XmlPullParserException
{
String name = "myattribute";
String value = "working";
String localization = "test";
String empty = "<MetaData " + name + "=\"" + value + "\" localization=\"" + localization + "\" />";
... | 0 |
IZooReaderWriter zk = ZooReaderWriter.getInstance(); | 0 |
// !!! a) if we are reverting, that can only happen via PATCH or MAINT
// b) if orchestration is a revertible type (on upgrade)
summary.isSwitchBits = m_isRevert || m_orchestration.isRevertable();
/**
* MAINT or PATCH upgrades are meant to just be switching the bits and no other
* incomp... | 0 |
log.warn("Could not find class named '" + className + "' in testClassLoad.", e); | 0 |
import org.apache.flink.runtime.checkpoint.OperatorSubtaskState;
OperatorSubtaskState snapshot = testHarness.snapshot(0, 0); | 0 |
import cz.seznam.euphoria.core.annotation.audience.Audience;
import cz.seznam.euphoria.core.executor.graph.DAG;
@Audience(Audience.Type.CLIENT)
| 0 |
package org.apache.xml.security.test.signature;
import junit.framework.Test;
import junit.framework.TestSuite;
public class AllTests {
public static Test suite() {
TestSuite suite = new TestSuite(
"Test for org.apache.xml.security.test.signature");
//$JUnit-BEGIN$
suite.addTest(CreateSignatureTest.suite()... | 0 |
import org.apache.flink.streaming.api.functions.sink.SinkFunction;
top.addSink(new SinkFunction<Tuple3<Long, String, Double>>() {
@Override
public void invoke(Tuple3<Long, String, Double> value, SinkFunction.Context context)
throws Exception {
Date now = new Date();
Date stam... | 0 |
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear. | 0 |
package org.apache.xml.security.test.algorithms;
import junit.framework.Test;
import junit.framework.TestSuite;
public class AllTests {
public static Test suite() {
TestSuite suite = new TestSuite(
"Test for org.apache.xml.security.test.algorithms");
//$JUnit-BEGIN$
suite.addTest(SignatureAlgorithmTest.su... | 0 |
import org.apache.hc.core5.http.nio.SessionInputBuffer; | 1 |
package org.apache.felix.sigil.eclipse.property;
import org.apache.felix.sigil.eclipse.SigilCore; | 0 |
import static org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.PhoenixTransactSQL.DefaultCondition;
Condition condition = new DefaultCondition(null, null, null, null, startTime,
Condition condition = new DefaultCondition(null, null, null, null, startTime, | 0 |
import static org.junit.Assert.assertEquals;
import org.apache.accumulo.tracer.thrift.RemoteSpan;
import org.apache.htrace.HTraceConfiguration;
import org.apache.htrace.Span;
import org.apache.htrace.impl.MilliSpan;
import org.junit.Test;
protected String getSpanKey(Map<String,String> data) { | 0 |
return (getState().isRemovableState()); | 0 |
IResourceAggregate.build(new ResourceAggregate(3, 3, 3)), quotaInfo.getProdConsumption());
IResourceAggregate.build(new ResourceAggregate(2, 2, 2)),
quotaInfo.getNonProdConsumption());
assertEquals(ResourceAggregates.none(), quotaInfo.getProdConsumption());
assertEquals(ResourceAggregate... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/functors/FunctorUtils.java,v 1.3 2003/11/23 23:25:33 scolebourne Exp $
import org.apache.commons.collections.Transformer;
* @version $Revision: 1.3 $ $Date: 2003/11/23 23:25:33 $
... | 0 |
printConfigurationInventory( pw, PrinterMode.TEXT, handler );
printConfigurationInventory( pw, PrinterMode.JSON, handler );
if ( handler.supports(PrinterMode.HTML_FRAGMENT) ) {
handler.print(PrinterMode.HTML_FRAGMENT, pw, false);
} else if ( handler.suppor... | 0 |
import org.apache.aurora.scheduler.storage.entities.ITaskEvent;
private static ITaskEvent getSecondToLatestEvent(IScheduledTask task) {
return task.getTaskEvents().get(task.getTaskEvents().size() - 2);
}
updateStats(stats, getSecondToLatestEvent(task).getStatus()); | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.