Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
/* /** Convertion for Beam SQL. */
0
__retrieveArticleInfo(lowArticleNumber + "-" + highArticleNumber); __retrieveHeader(header,lowArticleNumber + "-" + highArticleNumber);
0
import org.apache.accumulo.core.security.crypto.CryptoServiceFactory; source.getLength(), summarySelector, factory, CryptoServiceFactory.getConfigured(acuconf));
0
* Window.<String>into(FixedWindows.of(Duration.standardMinutes(1)))
0
package org.apache.commons.collections4.sequence;
0
protected static final String CLUSTER_STACK_VERSION_ID_PROPERTY_ID = PropertyHelper.getPropertyId("ClusterStackVersions", "id"); protected static final String CLUSTER_STACK_VERSION_CLUSTER_NAME_PROPERTY_ID = PropertyHelper.getPropertyId("ClusterStackVersions", "cluster_name"); protected ...
0
import org.apache.ambari.server.hooks.HookContextFactory; import org.apache.ambari.server.hooks.HookService; bind(HookContextFactory.class).toInstance(createMock(HookContextFactory.class)); bind(HookService.class).toInstance(createMock(HookService.class));
0
boolean usingNativeMap = acuConf.getBoolean(Property.TSERV_NATIVEMAP_ENABLED) && NativeMap.isLoaded(); defaultReadAheadThreadPool = createEs(Property.TSERV_METADATA_READ_AHEAD_MAXCONCURRENT, "metadata tablets read ahead"); Cache<String,Long> fileLenCache = CacheBuilder.newBuilder().m...
0
try (AccumuloClient client = opts.createClient()) { Map<String,String> tableIdMap = client.tableOperations().tableIdMap(); ZooReaderWriter zooReaderWriter = opts.getServerContext().getZooReaderWriter(); for (Entry<String,String> entry : tableIdMap.entrySet()) { final String table = entry.g...
0
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
0
import static org.easymock.EasyMock.eq; expect(kerberosKeytabController.adjustServiceComponentFilter(anyObject(), eq(true), anyObject())).andReturn(null).anyTimes();
0
protected volatile Injector injector; // perform login operations LoginProcessor loginProcessor = new LoginProcessor(); loginProcessor.login();
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/expression/ExpressionSupport.java,v 1.5 2002/06/28 03:30:24 werken Exp $ * $Revision: 1.5 $ * $Date: 2002/06/28 03:30:24 $ * $Id: ExpressionSupport.java,v 1.5 2002/06/28 03:30:24 werken Exp...
0
import net.jcip.annotations.GuardedBy; import net.jcip.annotations.ThreadSafe; @ThreadSafe @GuardedBy("this") @GuardedBy("this")
0
itNodes.next().setValue(itValues.next()); clearNode(itNodes.next());
0
import java.util.Map.Entry; ConcurrentHashMap<Long, Integer> sessionsWithTimeout, int tickTime, long sid) { for (Entry<Long, Integer> e : sessionsWithTimeout.entrySet()) { addSession(e.getKey(), e.getValue());
0
import org.apache.ambari.server.StaticallyInject; @StaticallyInject @Inject
0
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 use this file except in compliance with the License. You may...
0
if (seed == null) r = new Random();
1
this.iter = new PeekingIterator<>(iterator);
1
mutations = new ArrayList<>(count);
1
package org.apache.commons.configuration.builder; import org.apache.commons.configuration.builder.fluent.Parameters;
0
@Override public TcpipForwarder create( ConnectionService service )
0
import com.twitter.common.stats.StatImpl; import com.twitter.common.stats.Stats; public WorkQueue() { Stats.export(new StatImpl<Integer>("work_queue_active_thread_count") { @Override public Integer read() { return workQueue.getActiveCount(); } }); Stats.export(new StatImpl<Long>("work_queue_complete...
0
msgbuf.putString(getUsername());
0
static final Color fillColor = new Color(200, 200, 255, 100); static final Color strokeColor = new Color(255, 255, 255, 255); g2d.setStroke(new java.awt.BasicStroke(1.0f));
0
BeanUtils.copyProperty(instance, name, value);
0
if (!uri.equals("")) { @Override public int hashCode() { int result = 17; if (type != null) { result = 31 * result + type.hashCode(); } if (uri != null) { result = 31 * result + uri.hashCode(); } if (transforms != null) { ...
0
FILE_MAPPING.put("8088", "resourcemanager_jmx.json"); int colonIndex = spec.indexOf(":", 5); int slashIndex = spec.indexOf("/", colonIndex); return spec.substring(colonIndex + 1, slashIndex);
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterables; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Ordering;
0
private final Collection<String> hostNames = new HashSet<>(); return new HashSet<>(hostNames);
1
import org.apache.accumulo.core.util.ShutdownUtil; if (ShutdownUtil.isShutdownInProgress()) {
0
/** * */ package ognl; import ognl.enhance.UnsupportedCompilationException; /** * Base class for boolean expressions. * * @author jkuhnert */ public abstract class BooleanExpression extends ExpressionNode implements NodeType { protected Class _getterClass; public BooleanExpression(int id) {...
0
* Copyright 2001-2006 The Apache Software Foundation. config.setListDelimiter(';');
0
super(); this.setSource(iterator); this.maxVersions = maxVersions;
0
RecoveryConfig recoveryConfig = new RecoveryConfig(autoStartConfig.getNodeRecoveryType(), autoStartConfig.getNodeRecoveryMaxCount(), autoStartConfig.getNodeRecoveryWindowInMin(), autoStartConfig.getNodeRecoveryRetryGap(), autoStartConfig.getNodeRecoveryLifetimeMaxCount(), aut...
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
package aQute.libg.clauses; import java.util.*; public class Clause extends LinkedHashMap<String,String> { private static final long serialVersionUID = 1L; }
0
import org.apache.accumulo.core.client.Accumulo; try (AccumuloClient testclient = Accumulo.newClient().from(c.properties()) .as(testUser, user.getToken()).build()) { try (AccumuloClient testclient = Accumulo.newClient().from(c.properties()) .as(testUser, user.getToken()).build()) {
0
import org.apache.beam.sdk.metrics.Distribution; * Translation of accumulators to {@link Metrics}. Metric's namespace is taken from operator name. public Counter getCounter(final String namespace, final String name) { getMetricKey(namespace, name), key -> new BeamMetricsCounter(namespace, name)); ...
0
import org.apache.accumulo.server.security.SystemCredentials; principal = SystemCredentials.get().getPrincipal(); token = SystemCredentials.get().getToken();
1
import org.apache.ambari.server.state.stack.OsFamily; bind(OsFamily.class).toInstance(createNiceMock(OsFamily.class)); bind(OsFamily.class).toInstance(createNiceMock(OsFamily.class)); binder.bind(OsFamily.class).toInstance(createNiceMock(OsFamily.class));
0
import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.concurrent.ConcurrentMap; import com.google.inject.Inject; config.save();
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/axes/ParentContext.java,v 1.5 2002/04/24 04:05:39 dmitri Exp $ * $Revision: 1.5 $ * $Date: 2002/04/24 04:05:39 $ import java.util.HashSet; import org.apache.commons.jxpath.ri.EvalContex...
0
* * * * @author <a href="mailto:ckl@dacelo.nl">Christiaan ten Klooster</a> }
1
import org.apache.batik.anim.dom.SVGOMDocument;
0
* @version $Revision: 1.11 $ $Date: 2004/05/27 19:09:37 $ private final Session session; // private final JSch jSch; final Session session, this.session = session; /* */ try {
0
import org.apache.felix.gogo.commands.Argument;
0
import cz.seznam.euphoria.core.client.util.Triple; ListDataSink<Triple<TimeInterval, String, Pair<String, Integer>>> output Dataset<Pair<String, Pair<String, Integer>>> reduced = ReduceStateByKey.of(f.createInput(source)) .stateFactory((StateFactory<Pair<String, Integer>, AccState<Pair<String, ...
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 Error("invalid rule:" + composite.getRule() );
0
long timeCreated = System.currentTimeMillis(); m.put(StatusSection.NAME, new Text(tableId), StatusUtil.fileCreatedValue(timeCreated)); workMaker.addWorkRecord(new Text(file), StatusUtil.fileCreatedValue(timeCreated), ImmutableMap.of("remote_cluster_1", "4"), tableId); Assert.assertEquals(workEntry.getVa...
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
static KeyIdentityProvider multiProvider(KeyIdentityProvider... providers) { static KeyIdentityProvider wrap(KeyPair... pairs) {
0
@Test
0
synchronized public static SiteConfiguration getInstance() { return getInstance(DefaultConfiguration.getInstance()); }
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 m...
0
try (final FSDataInputStream fsinput = fs.open(srcPath)) { DFSLoggerInputStreams inputStreams; try { inputStreams = DfsLogger.readHeaderAndReturnStream(fsinput, conf); } catch (LogHeaderIncompleteException e) { log.warn("Could not read header from write-ahea...
0
package org.apache.commons.ognl.test.objects;
0
* * @throws InterruptedException * if the calling thread is interrupted while waiting throws InterruptedException * in case of a timeout * @throws InterruptedException * if the calling thread is interrupted while waiting throws ConnectionPoolTimeoutE...
0
} else if (keyBeingReplicated.startsWith(p.getName())) { log.debug("Not re-queueing work for {} as it has already been queued fore replication to {}", file, target);
0
for (int i = 1; i < 5; i++) { Thread.sleep(1000); int fileCountAfterGCWait = FileUtils.listFiles(tables, new SuffixFileFilter(".rf"), TrueFileFilter.TRUE).size(); if (fileCountAfterGCWait < fileCountAfterCompaction) { return; } } Assert.fail("Expected to find less files afte...
0
(long)threads.length * (long)childCount * HAMMERTHREAD_LATENCY * (long)safetyFactor);
0
import org.apache.felix.sigil.eclipse.ui.SigilUI;
0
* @throws IOException If the environment can not be * retrived. public Environment getEnvironment() throws IOException { * @throws IOException if the procssing environment can not be retrived private Environment patchEnvironment() throws IOException { Environment procEnv = Environment.ge...
0
ProcessParentImplementation itself = (ProcessParentImplementation) osgiHelper.getRawServiceObject(ref1); ProcessParentImplementation itself = (ProcessParentImplementation) osgiHelper.getRawServiceObject(ref1); ProcessParentImplementation itself = (ProcessParentImplementation) osgiHelper.getRawSe...
0
ProtocolVersion parseProtocolVersion(final String value, protected ProtocolVersion createProtocolVersion(final int major, final int minor) { public Header parseHeader(final CharArrayBuffer buffer)
0
import org.apache.hc.core5.util.Args;
0
import org.apache.aurora.scheduler.thrift.Responses; .entity(Responses.error(message))
0
public class RemotePeerBeanTest {
0
public void invokeNext() {
0
throw (SQLException) new SQLException("TesterConnection failure").initCause(failure);
0
final FileItemHeaders fih = item.getHeaders(); fileItem.setHeaders(fih);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/example/org/apache/commons/validator/example/ValidateExample.java,v 1.5 2003/05/21 03:16:29 dgraham Exp $ * $Revision: 1.5 $ * $Date: 2003/05/21 03:16:29 $ * @version $Revision: 1.5 $ $Date: 2003/05/21 03:16:29 $ ...
0
return this.cause;
0
private Map<Long,TStatus> statuses = new HashMap<>(); private Set<Long> reserved = new HashSet<>(); return new ArrayList<>(statuses.keySet());
1
import org.apache.hc.core5.http.impl.bootstrap.AsyncRequesterBootstrap; import org.apache.hc.core5.http.impl.bootstrap.AsyncServerBootstrap; import org.apache.hc.core5.http.impl.bootstrap.HttpAsyncRequester; import org.apache.hc.core5.http.impl.bootstrap.HttpAsyncServer; import org.apache.hc.core5.http.impl.bootstrap.P...
0
private static final long serialVersionUID = 7179106032121985545L;
0
import org.apache.http.concurrent.Cancellable; public Cancellable verify( return null; public Cancellable handle( return null; public Cancellable verify( return null; public Cancellable handle(
0
import org.apache.commons.lang.StringUtils; if(!StringUtils.isBlank(propertiesDirectoryName)) {
0
import com.google.common.collect.ImmutableList; import java.io.IOException; import java.util.List; import java.util.NoSuchElementException;
0
* Copyright 2016 Seznam.cz, a.s.
0
return "prints how much space is used by files referenced by a table. When multiple tables are specified it prints how much space is used by files shared between tables, if any.";
0
return new UpdateErrors(new HashMap<TKeyExtent,Long>(), new ArrayList<TConstraintViolationSummary>(), new HashMap<TKeyExtent,SecurityErrorCode>()); public void removeLogs(TInfo tinfo, TCredentials credentials, List<String> filenames) throws TException {} @Parameter(names = {"-i", "--instance"}, descriptio...
0
import org.apache.hc.core5.http.config.CharCodingConfig; private final CharCodingConfig charCodingConfig; final CharCodingConfig charCodingConfig, this.charCodingConfig = charCodingConfig; ioSession, httpProcessor, exchangeHandlerFactory, charCodingConfig, h2Config,
0
return child == null ? null : new DOMNodePointer(parent, child);
1
svgCanvas.setSelectionOverlayXORMode (application.isSelectionOverlayXORMode());
0
* * @since 4.0
0
import java.util.ArrayList; * @version $Id$ for (Iterator<String> keys = config.getKeys(); keys.hasNext();) String key = keys.next(); property = new ArrayList<Object>((List<?>) property); for (Iterator<String> keys = config.getKeys(); keys.hasNext();) String key ...
0
package org.apache.batik.ext.awt.image.codec.util;
0
PubsubIO.readMessagesWithAttributes().fromSubscription(shortSubscription) PubsubIO.writeMessages().to(shortTopic)
0
/** * Identifier by which a Mac pre OS-X -based ftp server is known throughout * the commons-net ftp system. * * @since 3.1 */ // Full string is "MACOS Peter's Server"; the substring below should be enough public static final String SYST_MACOS_PETER = "MACOS PETER"; // NET-436
0
SummaryReader fileSummary = SummaryReader.load(in.getFileSystem().getConf(),
0
/** {@link org.apache.commons.logging} logging facility */ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(RSAKeyValueResolver.class.getName()); /** @inheritDoc */ public PublicKey engineLookupAndResolvePublicKey( Element element, Strin...
0
package com.twitter.aurora.scheduler.storage.mem; import com.twitter.aurora.gen.Identity; import com.twitter.aurora.gen.JobKey; import com.twitter.aurora.gen.JobUpdateConfiguration; import com.twitter.aurora.gen.TaskUpdateConfiguration; import com.twitter.aurora.gen.TwitterTaskInfo; import com.twitter.aurora.scheduler....
1
/** Singleton ISBN-10 Check Digit instance */
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
leader.waitForNewLeaderAck(getSid(), qp.getZxid(), getLearnerType());
0
* to use an external system to authenticate users before granting access to the * Web Console. * @since 3.1.0; Web Console Bundle 3.1.0 public interface WebConsoleSecurityProvider { * Authenticates the user with the given user name and password. * * @param username The name of the user presented by t...
0
import org.apache.accumulo.core.client.NamespaceNotFoundException; if (!namespaceId.equals(Constants.DEFAULT_NAMESPACE_ID) && !namespaceId.equals(Constants.SYSTEM_NAMESPACE_ID)) { name += Namespaces.getNamespaceName(instance, namespaceId) + "."; } catch (NamespaceNotFoundException e) { ...
0