Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
package org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.date; import org.apache.beam.sdk.extensions.sql.impl.interpreter.BeamSqlFnExecutorTestBase; import org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.BeamSqlExpression; import org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.Beam...
0
return
0
access = access.isEmpty() ? "" : (access + " ");
0
package org.apache.zookeeper.jmx; public static final String DOMAIN="org.apache.ZookeeperService";
0
import org.apache.commons.collections.iterators.EmptyIterator; import org.apache.commons.collections.iterators.EmptyMapIterator; * @version $Revision: 1.18 $ $Date: 2004/05/26 21:56:05 $ return EmptyMapIterator.INSTANCE; return EmptyIterator.INSTANCE; return EmptyIterator.IN...
0
* Copyright 2002,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 ap...
0
public void setClusterName(String clusterName) { this.clusterName = clusterName; } public String getClusterName() { return this.clusterName; }
1
import com.google.common.base.Function; import com.google.common.base.Supplier; import org.apache.aurora.common.base.ExceptionalSupplier; return backoffHelper.doUntilResult(new ExceptionalSupplier<ServiceInstance, RuntimeException>() {
0
Map<String, ServiceComponentHost> serviceComponentHosts = components.get(componentName).getServiceComponentHosts(); if (!components.containsKey(componentName) || serviceComponentHosts.size() == 0) { return serviceComponentHosts.keySet();
0
if (key != null && value.length() > 0) {
0
public enum Type { HDFS, MAPREDUCE, HBASE, HIVE, OOZIE, WEBHCAT, SQOOP, NAGIOS, GANGLIA, ZOOKEEPER }
0
public Map<String,List<IteratorSetting>> scanIteratorOptions = new HashMap<>(); public Map<String,List<IteratorSetting>> iteratorProfiles = new HashMap<>(); public final Map<String,Command> commandFactory = new TreeMap<>(); public final Map<String,Command[]> commandGrouping = new TreeMap<>(); Map<Command.Co...
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.http.client.config.RequestConfig; final HttpClientContext clientContext = HttpClientContext.adapt(context); final RequestConfig requestConfig = clientContext.getRequestConfig(); if (!request.containsHeader("Accept-Encoding") && requestConfig.isContentCompressionEnabled()) {
0
AccumuloRowInputFormat.configure().clientProperties(getClientInfo().getProperties()) .table(table).auths(Authorizations.EMPTY).store(job);
0
import org.apache.ambari.server.controller.internal.RootServiceComponentConfigurationResourceProvider; .implement(ResourceProvider.class, Names.named("rootServiceHostComponentConfiguration"), RootServiceComponentConfigurationResourceProvider.class)
0
import cz.seznam.euphoria.core.client.dataset.windowing.Window; class Datum extends WindowedElement<Window, Object> { static Datum of(Window window, Object element, long stamp) { return new Datum(window, element, stamp); static Datum windowTrigger(Window window, long stamp) { return new WindowTrigger(window...
0
if (parent == null || !(parent instanceof javax.xml.crypto.dom.DOMStructure)) { throw new ClassCastException("parent must be of type DOMStructure"); } if (parent == null || !(parent instanceof javax.xml.crypto.dom.DOMStructure)) { throw new ClassCastException("parent must...
1
import org.xml.sax.SAXException; throw new SAXException( sb.toString() );
0
// If this is the framework's "felix:" extension protocol, then // return the ExtensionManager.m_extensionManager handler for // that immediately - this is a workaround for certain jvms that // do a toString() on the extension url we add to the global // URLC...
0
* @version CVS $Id: Binding.java,v 1.6 2004/02/03 12:22:08 joerg Exp $ void loadFormFromModel(Widget frmModel, Object objModel) throws BindingException;
0
* @version CVS $Id: TraxTransformer.java,v 1.2 2003/03/19 15:42:14 cziegeler Exp $ public java.io.Serializable getKey() { public SourceValidity getValidity() {
0
new ConcurrentHashMap<>(); clusterMapping = new ConcurrentHashMap<>(); List<AlertDefinition> definitions = new ArrayList<>( entities.size()); Set<String> affectedHosts = new HashSet<>(); List<String> uuids = new ArrayList<>(definitions.size()); Set<AlertDefinitionEntity> definitions = ne...
1
import org.apache.commons.lang.StringUtils; import java.util.ArrayList; import java.util.List; final String tezConfigType = "tez-site"; final String coreSiteConfigType = "core-site"; final DesiredConfig tezDesiredConfig = desiredConfigs.get(tezConfigType); final Config tezConfig = cluster.getConfig(tezC...
0
kerberosEnvProperties.put("kdc_hosts", expectedHostName + ",secondary.kdc.org"); kerberosEnvProperties.put("master_kdc", expectedHostName); assertFalse("master_kdc should not be present in exported blueprint in kerberos-env", kerberosEnvProperties.containsKey("master_kdc"));
0
import org.apache.ambari.server.audit.event.kerberos.DestroyPrincipalKerberosAuditEvent; DestroyPrincipalKerberosAuditEvent.DestroyPrincipalKerberosAuditEventBuilder auditEventBuilder = DestroyPrincipalKerberosAuditEvent.builder() .withTimestamp(System.currentTimeMillis()) .withPrincipal(evaluatedPrinci...
1
/** * TODO Add javadoc * * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> * @version $Rev$, $Date$ */
0
/** snappy codec **/ public static final String COMPRESSION_SNAPPY = "snappy"; * <li>"snappy" - Snappy compression
0
getManagedBuilders().get(fileName); ConcurrentUtils.putIfAbsent(getManagedBuilders(), fileName, for (FileBasedConfigurationBuilder<T> b : getManagedBuilders().values()) for (FileBasedConfigurationBuilder<T> b : getManagedBuilders().values()) for (FileBasedConf...
0
assertEquals(18, stacks.size()); assertEquals(14, stacks.size());
0
private Set<String> errors = new HashSet<>(); Map<String, Theme> map = new HashMap<>();
1
package org.apache.bcel; import org.apache.bcel.classfile.JavaClass; public class AnnotationAccessFlagTestCase extends AbstractTestCase { /** * If you write an annotation and compile it, the class file generated * should be marked as an annotation type - which is detectable through * BCEL. */ public void te...
0
import static junit.framework.Assert.*; /** * Test checking the availability of the architecture instance according to the instance state. * The architecture instance is available even in the STOPPED state. */ @Test public void testArchitectureServiceAvailability() { String instanceNa...
0
import static junit.framework.TestCase.assertTrue; import static org.junit.Assert.assertFalse; public void testNotConsistentWithEquals() { ListCoder<byte[]> coder = ListCoder.of(ByteArrayCoder.of()); assertFalse(coder.consistentWithEquals()); } @Test public void testConsistentWithEquals() { ListCod...
0
this.ambariMetaInfo = new AmbariMetaInfo(stackRoot, new File("../version"));
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
o = System.getProperty(key.toUpperCase().replace('.', '_'));
0
import java.util.concurrent.ExecutionException; import java.util.concurrent.FutureTask; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; /** * Used to track the last state we delivered to any state listeners. */ schedule(true /* synchronously */, () -> ...
0
public SqlDateConverter(final Object defaultValue) {
0
import static org.easymock.EasyMock.createMock; import static org.easymock.EasyMock.createMockBuilder; import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.expectLastCall; import static org.easymock.EasyMock.replay; import static org.easymock.EasyMock.verify; import static org.junit.Assert.as...
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 aQute.bnd.osgi.Analyzer; import aQute.bnd.osgi.Builder; import aQute.bnd.osgi.Jar;
0
import org.apache.beam.runners.flink.FlinkRunner; options.setRunner(FlinkRunner.class);
0
package org.apache.felix.ipojo.manipulation; import java.io.File; import junit.framework.Assert; import junit.framework.TestCase; import org.apache.felix.ipojo.manipulator.Pojoization; public class PojoizationTest extends TestCase { public void testJarManipulation() { Pojoization pojoization = new Pojoization()...
0
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; import org.apache.http.client.methods.HttpExecutionAware; import org.apache.http.concurrent.Cancellable; class InternalHttpRequest extends AbstractHttpMessage implements HttpUriRequest, HttpExecutionAware, Conf...
0
private final Map<FileName, ArrayList<FileListener>> listenerMap = new HashMap<FileName, ArrayList<FileListener>>(); ArrayList<FileListener> listeners = listenerMap.get(file.getName()); listeners = new ArrayList<FileListener>(); final ArrayList<?> listeners = listenerMap.get(...
0
import org.apache.accumulo.harness.AccumuloClusterHarness; public class MetaSplitIT extends AccumuloClusterHarness {
0
package org.apache.accumulo.monitor.rest.api.table; /** * * Generates a list of tables as a JSON object * * @since 2.0.0 * */ // Variable names become JSON keys /** * Initializes array list */ /** * Add a table to the list * * @param table * Table to add */
0
/** Tests for {@link TupleTag}. */ "org.apache.beam.sdk.values.TupleTagTest$AnotherClass#0", AnotherClass.anotherTag.getId()); assertThat( Iterables.get(Splitter.on('#').split(tag.getId()), 0), assertThat( Integer.parseInt( Iterables.get( Splitter.on(':').spl...
1
import org.apache.beam.sdk.testing.UsesKms; import org.junit.experimental.categories.Category; @Category(UsesKms.class)
0
import org.apache.sshd.common.util.threads.ExecutorService; this(null); public AgentServer(ExecutorService executor) { this(new AgentImpl(), executor); public AgentServer(SshAgent agent, ExecutorService executor) { this.service = (executor == null) ? ThreadUtils.newSingle...
1
jceDigestAlgorithm = JCEAlgorithmMapper.translateURItoJCEID(digestMethodType.getAlgorithm()); String jceMGFAlgorithm = JCEAlgorithmMapper.translateURItoJCEID(mgfType.getAlgorithm()); mgfParameterSpec = new MGF1Pa...
0
Shape clip = CSSUtilities.convertClipPath(element, node, ctx); node.setClippingArea(clip);
0
if (logsForDeadServers != null) { List<Path> logs = logsForDeadServers.get(tls.current); if (logs != null) { for (Path log : logs) { LogEntry entry = new LogEntry(tls.extent, 0, tls.current.hostPort(), log.toString()); m.put(entry.getColumn...
0
testDir = new File(baseDir, TestUpgradePathForWALogs.class.getName());
0
import org.apache.hc.core5.concurrent.CancellableDependency; ExecRuntime fork(CancellableDependency cancellableAware);
0
private static final long serialVersionUID = -8114699256840851439L;
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
import org.osgi.annotation.versioning.ConsumerType; @ConsumerType
0
@Parameter(names = "--vis", description = "use a given visibility for the new counts", converter = VisibilityConverter.class)
0
* @param svgCanvasSize SVG Canvas size. May be null (equivalent to 100%, 100%) * @param extensionHandler new extension handler this SVGGraphics2D * should use * this Graphics2D generates. * Creates a new SVGGraphics2D object. * @param generatorCtx the <code>SVGGene...
0
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.checkNotNull; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList; import org.apache.beam.vendor.guava...
0
responseBuffer.putLong(current.getId()); responseBuffer.putLong(current.getZxid()); responseBuffer.putLong(current.getId()); leader.learners)
0
import java.io.PrintWriter; import java.io.StringWriter; private StringWriter sw; sw = new StringWriter(); ds.setAbandonedLogWriter(new PrintWriter(sw)); assertTrue(sw.toString().contains("testAbandonedClose")); assertTrue(sw.toString().contains("testAbandonedCloseWithExceptions"));
0
import org.apache.log4j.Logger; import com.yahoo.zookeeper.server.ZooKeeperServer; private static final Logger LOG = Logger.getLogger(ZooKeeperServer.class); LOG.error("this should be impossible!", e); LOG.error("from " + t.getName(), e); LOG.error("Some...
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
PCollection<String> pc = p.apply( TextIO.read().from(testPath("testFile*").toString()));
0
import org.apache.accumulo.core.client.NamespaceNotFoundException; import org.apache.accumulo.core.client.impl.Namespaces; String info = "Namespace not found while trying to create table"; throw new IllegalArgumentException(new NamespaceNotFoundException(null, namespace, info)); } else if (namespace.eq...
0
/* * (c) COPYRIGHT 1999 World Wide Web Consortium * (Massachusetts Institute of Technology, Institut National de Recherche * en Informatique et en Automatique, Keio University). * All Rights Reserved. http://www.w3.org/Consortium/Legal/ * * $Id$ */ package org.w3c.flute.parser; /** * @version $Revision$ * @a...
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
import org.ow2.chameleon.testing.helpers.Stability; Stability.waitForStability(bc);
0
StackInfo stackInfo = getStackInfo(stackName, version); if (stackInfo != null) { exist = true; } ServiceInfo info= getServiceInfo(stackName, version, serviceName); if (info != null) { exist = true; }
0
boolean closeFilesystem; closeFilesystem = files.size() < 1; if (closeFilesystem) endThread(); // files.clear(); synchronized (filesystemCache) { filesystemCache.clear(); refReverseMap.clear();
0
import java.io.StreamCorruptedException; public static class SignatureECDSA256 extends SignatureECDSA { public static final String DEFAULT_ALGORITHM = "SHA256withECDSA"; public SignatureECDSA256() { super(DEFAULT_ALGORITHM); } } public static class SignatureECDSA384 ext...
0
String DIRECTION_PROPERTY = "direction"; String WRITING_MODE_PROPERTY = "writing-mode"; String UNICODE_BIDI_PROPERTY = "unicode-bidi"; String BASELINE_SHIFT_PROPERTY = "baseline-shift";
0
package org.apache.felix.ipojo.test.scenarios.component; import foo.ipojo.IPOJOFoo; @IPOJOFoo(bar="bar") public class OnlyiPOJOFoo { }
0
bind(WorkQueue.class).to(WorkQueueImpl.class).in(Singleton.class); return new EncodingPersistenceLayer(binaryPersistence);
0
import java.util.Properties; if (count % 1000 == 0) makingProgress();
1
import org.apache.http.annotation.Obsolete; * <p> * Rendered obsolete by {@link org.apache.http.impl.cookie.RFC6265CookieSpecProvider} * @see org.apache.http.impl.cookie.RFC6265CookieSpecProvider @Obsolete
0
if (SortedLogState.FAILED.getMarker().equals(child.getPath().getName())) { continue; }
0
walFailureRetryMax, RetryFactory.DEFAULT_LOG_INTERVAL); final RetryFactory walWritingRetryFactory = new RetryFactory(walFailureRetryIncrement, walFailureRetryIncrement, walFailureRetryMax, RetryFactory.DEFAULT_LOG_INTERVAL);
0
} // ### this is a hack - remove this when we have support for pluggable Scopes if ( answer == null ) { try { answer = System.getProperty(name); } catch (Throwable t) { // ignore security exceptions
0
String[] mountEntries = new String[] {"rootfs / rootfs rw 0 0", "proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0", "securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0", "tmpfs /dev/shm tmpfs rw,seclabel,nosuid,nodev 0 0", "devpts /dev/pts devpts rw,sec...
0
registerTag( "windowListener", WindowListenerTag.class );
0
@Parameters(name = "{0}, charset={1}") return Arrays.asList(new Object[][]{ {"test-file-20byteslength.bin", "ISO_8859_1", null}, {"test-file-iso8859-1-shortlines-win-linebr.bin", "ISO_8859_1", null}, {"test-file-iso8859-1.bin", "ISO_8859_1", null}, ...
1
apiConnector.setPort(configs.getClientApiPort());
0
String ROOT_LOGGER_NAME = "ROOT";
0
import org.apache.felix.ipojo.api.HandlerConfiguration; public class ProvidedService implements HandlerConfiguration {
0
return FlinkKeyUtils.encodeKey(key, keyCoder);
0
import org.apache.aurora.scheduler.storage.JobUpdateStore; link(JobUpdateStore.Mutable.class);
0
final SchemeRegistry registry = getSchemeRegistry(context); final Scheme schm = registry.getScheme(target.getSchemeName()); final SchemeSocketFactory sf = schm.getSchemeSocketFactory(); final InetAddress[] addresses = resolveHostname(target.getHostName()); final int port = schm.r...
0
throws DOMException { super(name, owner); nodeName = name; nodeName = v; return nodeName; return readonly; readonly = v; super.export(n, d); GenericElement ge = (GenericElement)n; ge.nodeName = nodeName; return n; super.deep...
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 ...
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 ma...
0
public static final String ZOOKEEPER_CLIENT_CNXN_SOCKET = "zookeeper.clientCnxnSocket"; @Override cnxn = new ClientCnxn(connectString, sessionTimeout, this, watchManager, getClientCnxnSocket()); cnxn = new ClientCnxn(connectString, sessionTimeout, this, watchM...
0
private static final Offer OFFER_A = Offers.makeOffer("OFFER_A", "HOST_A"); private static final Offer OFFER_B = Offers.makeOffer("OFFER_B", "HOST_B"); private static final Offer OFFER_C = Offers.makeOffer("OFFER_C", "HOST_C"); private static final Offer OFFER_D = Offers.makeOffer("OFFER_D", "HOST_D"); Offe...
0
import javax.annotation.Nullable;
0
Configuration subset; subset = createSubnodeConfiguration(getSectionNode(section)); } else { subset = getSection(null);
0
package org.apache.felix.sigil.eclipse.internal.builders; import org.apache.felix.sigil.bnd.BundleBuilder; import org.apache.felix.sigil.config.IBldProject; import org.apache.felix.sigil.eclipse.SigilCore; import org.apache.felix.sigil.eclipse.model.project.ISigilProjectModel; import org.apache.felix.sigil.eclipse.mode...
0
String USE_CACHEDURLS_PROPS = "felix.bundlecodesource.usecachedurls";
0