Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import java.util.concurrent.TimeUnit; import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly; sleepUninterruptibly(Math.max(0, now + 11 * 1000 - System.currentTimeMillis()), TimeUnit.MILLISECONDS);
1
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/output/ByteArrayOutputStreamTestCase.java,v 1.4 2003/12/30 07:00:04 bayard Exp $ * $Revision: 1.4 $ * $Date: 2003/12/30 07:00:04 $ public class ByteArrayOutputStreamTestCase extends TestCase { ...
0
* @param prefix the prefix * @param lookup the {@code Lookup} instance private DefaultLookups(final String prefix, final Lookup lookup) this.prefix = prefix; this.lookup = lookup;
0
* * @since 4.0
0
package org.apache.http.impl.client.cache.memcached; import static org.junit.Assert.*; import org.apache.http.client.cache.HttpCacheEntry; import org.apache.http.client.cache.memcached.MemcachedCacheEntry; import org.apache.http.impl.client.cache.HttpTestUtils; import org.junit.Test; public class TestMemcachedCache...
0
/* * Copyright 2005 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 applicabl...
0
/** Schedule the provided work to be eventually executed. */ * Finish executing the provided work. This may cause additional {@link DirectTransformExecutor * TransformExecutors} to be evaluated. * Cancel any outstanding work, if possible. Any future calls to schedule should ignore any work.
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/ClosureUtils.java,v 1.2 2003/08/31 13:03:12 scolebourne Exp $ * @version $Revision: 1.2 $ $Date: 2003/08/31 13:03:12 $ throw new IllegalArgumentException("The object a...
0
public ParseException(final String message)
0
public class ServiceComponentHostOpFailedEvent extends ServiceComponentHostEvent { public ServiceComponentHostOpFailedEvent(String serviceComponentName, String hostName, long opTimestamp) { super(ServiceComponentHostEventType.HOST_SVCCOMP_OP_FAILED, serviceComponentName, hostName, opTimestamp);
0
public Class<?>[] getExceptions() {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/map/ReferenceMap.java,v 1.3 2003/12/06 13:03:15 scolebourne Exp $ import org.apache.commons.collections.KeyValue; * @version $Revision: 1.3 $ $Date: 2003/12/06 13:03:15 $ priv...
0
Scanner scanner = master.getContext().createScanner(MetadataTable.NAME, Authorizations.EMPTY); AccumuloClient client = master.getContext();
0
final boolean generateUnicodeTlds = false; // Change this to generate Unicode TLDs as well final String unicodeTld; // only different from asciiTld if that was punycode final String asciiTld = line.toLowerCase(Locale.ENGLISH); unicodeTld = toUnicode(toUnic...
0
for(Header h : request.getHeaders(HeaderConstants.CACHE_CONTROL)) { if (HeaderConstants.CACHE_CONTROL_MAX_STALE.equals(elt.getName())) { return (request.getFirstHeader(HeaderConstants.IF_RANGE) != null || request.getFirstHeader(HeaderConstants.IF_MATCH) != null ...
0
* For example usages, see the unit tests of classes such as {@code AvroSource} or * {@code TextSource}.
0
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; import org.apache.beam.sdk.options.PipelineOptions; public static byte[] serializePipelineOptions(PipelineOptions options) { try { return new ObjectMapper().writeValueAs...
0
import org.apache.http.HttpMutableEntity; HttpMutableEntity entity = new BasicHttpEntity(); HttpMutableEntity entity = new BasicHttpEntity(); HttpMutableEntity entity = new BasicHttpEntity();
0
package org.apache.aurora.scheduler.async; import com.twitter.common.quantity.Amount; import com.twitter.common.quantity.Time; import com.twitter.common.testing.easymock.EasyMockTest; import com.twitter.common.util.concurrent.ExecutorServiceShutdown; import org.apache.aurora.gen.MaintenanceMode; import org.apache.auro...
0
/* ==================================================================== * Copyright (c) 2001-2004 The Apache Software Foundation. All rights * @version $Revision: 1.2 $ $Date: 2004/01/14 21:34:36 $
0
/** * Get the avalon configuration information. */ /** * Register a child context as a listener. This allows a child context to destroy itself * when the parent is destroyed. * @param childContext The child context. */ * Create a new bean factory and add a bean post processor ...
0
import org.apache.commons.collections.ComparatorUtils; public class TransformingComparator<E> implements Comparator<E> { protected Comparator<E> decorated; protected Transformer<? super E, ? extends E> transformer; @SuppressWarnings("unchecked") public TransformingComparator(Transformer<? super E, ? ext...
0
package org.apache.http.impl.client;
0
TestStreams.throwingErrorHandler(), private static Consumer<Throwable> throwingErrorHandler() { return new Consumer<Throwable>() { @Override public void accept(Throwable item) { throw new RuntimeException(item); } }; }
0
public boolean hasTableNamespacePermission(String principal, String tableNamespace, TableNamespacePermission perm) throws AccumuloException, AccumuloSecurityException { throw new AccumuloSecurityException(tableNamespace, SecurityErrorCode.TABLE_NAMESPACE_DOESNT_EXIST); public void gran...
0
import javax.net.ssl.SSLEngine; * used to establish the SSL session. * @param sslEngine the SSL engine. void initialize(NamedEndpoint endpoint, SSLEngine sslEngine);
0
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.HBaseTimelineMetricsService; @PrepareForTest({ PhoenixHBaseAccessor.class, HBaseTimelineMetricsService.class, UserGroupInformation.class,
0
long lengthDataBits = ((long) binaryData.length) * ((long) EIGHTBIT); if (lengthDataBits == 0L) { long fewerThan24bits = lengthDataBits % ((long) TWENTYFOURBITGROUP); int numberTriplets = (int) (lengthDataBits / TWENTYFOURBITGROUP); int numberQuartet = fewerThan24bits != 0L ? num...
0
String failok = analyzer.getProperty( "-failok" ); if ( analyzer.getProperty( Analyzer.EXPORT_PACKAGE ) == null && analyzer.getProperty( Analyzer.EXPORT_CONTENTS ) == null && analyzer.getProperty( Analyzer.PRIVATE_PACKAGE ) == null ) Collection embeddableArtifacts =...
0
import org.apache.beam.sdk.extensions.euphoria.core.client.operator.Join.BuilderParams; * from streams into {@link Window}s. The join operation is performed within same windows produced * on left and right side of input {@link Dataset}s. final BuilderParams<LeftT, RightT, ?, ?, ?> params = new Builder...
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
protected boolean isRedirectable(final String method) {
0
Socket s = null; s = new Socket("localhost", config.getZooKeeperPort()); } finally { if (s != null) s.close();
0
import org.apache.beam.dsls.sql.interpreter.BeamSqlFnExecutorTestBase; public class BeamSqlUpperExpressionTest extends BeamSqlFnExecutorTestBase {
0
private static final Properties validUserPasswords = new Properties();
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap;
0
/* Copyright 2006 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 l...
1
/** * Construct a "root" PluginManager, ie one with no parent. * * @param r The object containing data that should only exist once for each Digester instance. */ * * @param className The {@link Declaration} class name * * @param digester The digeste rinstance where locating p...
0
private RequestLine requestLine; this.requestLine = null; this.requestLine = null; if (this.requestLine == null) { String requestUri; if (this.uri != null) { requestUri = this.uri.toASCIIString(); } else { requestUri = this....
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 ...
0
import org.apache.aurora.scheduler.cron.CronJobManager; import static com.google.common.base.Preconditions.checkNotNull; private final CronJobManager cronJobManager; public StructDump(Storage storage, CronJobManager cronJobManager) { this.storage = checkNotNull(storage); this.cronJobManager = checkNotNull(...
0
private enum ParseState { enum BlockType { DIRECTIVE
0
package org.apache.accumulo.examples.wikisearch.ingest; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import junit.framework.Assert; impor...
0
buffer = session.createBuffer(SshConstants.SSH_MSG_USERAUTH_REQUEST);
0
log.info("Finished iteration {}", i); log.info("Iteration {}", i); for (Thread thread : threads) { thread.start();
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/beans/PropertyOwnerPointer.java,v 1.15 2003/10/09 21:31:40 rdonkin Exp $ * $Revision: 1.15 $ * $Date: 2003/10/09 21:31:40 $ * any, must include the following acknowledgement: ...
0
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. ...
0
import org.apache.http.testserver.HttpCoreNIOTestBase; import org.apache.http.testserver.LoggingClientConnectionFactory; import org.apache.http.testserver.LoggingServerConnectionFactory;
0
persistSSLClientConfiguration((org.apache.commons.configuration.Configuration) configuration); configuration.setProperty("atlas.authentication.method.kerberos", "true"); configuration.setProperty("atlas.authentication.keytab",userKeytabFile.getAbsolutePath()); configuration.setProperty(...
0
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
0
new EventListenerRegistrationData<>(
0
* Copyright 1999-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...
1
public static final String sccs="$Id$";
0
@Override protected synchronized String findPreferredCollectHost() { return "localhost"; }
0
switch (ae.getSecurityErrorCode()) { switch (ae.getSecurityErrorCode()) { switch (ae.getSecurityErrorCode()) {
0
if (value instanceof Number) { return value; }
0
package org.apache.accumulo.core.util.shell.commands; import org.apache.accumulo.core.util.shell.Shell; import org.apache.accumulo.core.util.shell.Shell.Command;
0
import java.awt.Font; import java.io.IOException; import java.io.UnsupportedEncodingException; try { lastVisitedBuffer.append (URLEncoder.encode(lastVisited.elementAt(i).toString(), "UTF-8")); } catch (UnsupportedEncoding...
0
// do some bounds checking first if (fileOffset < 0 || srcoff < 0 || len < 0) { throw new IllegalArgumentException("please ensure all parameters are non-negative values"); } if (srcoff + len > src.length) { throw new IllegalArgumentException("cannot read bytes " +...
0
import org.apache.hc.core5.io.CloseMode; public void close(final CloseMode closeMode) { ioReactor.close(closeMode);
0
* http://www.apache.org/licenses/LICENSE-2.0
0
public UsageGroup usageGroup() { return UsageGroup.PROCESS; } @Override
0
boolean isOutputDirectory = file.equals( getOutputDirectory() ); && analyzer.getProperty( Analyzer.PRIVATE_PACKAGE ) == null && !isOutputDirectory ) // if we spot Embed-Dependency and the bundle is "target/classes", assume we need to rebuild if ( analyzer.getProperty( DependencyEmbe...
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Iterables;
0
import com.google.api.services.dataflow.Dataflow; import com.google.api.services.dataflow.model.DataflowPackage; import com.google.api.services.dataflow.model.Job; import com.google.api.services.dataflow.model.ListJobsResponse; import com.google.common.base.Throwables; import com.google.common.collect.ImmutableList; im...
0
import org.apache.accumulo.server.log.WalStateManager; WalStateManager wals = new WalStateManager(conn.getInstance(), ZooReaderWriter.getInstance());
1
import static org.junit.Assert.assertEquals;
0
import org.apache.beam.sdk.testing.ValueInSingleWindow; import org.apache.beam.sdk.transforms.windowing.GlobalWindow; new Function<ValueInSingleWindow<OutputT>, TimestampedValue<OutputT>>() { public TimestampedValue<OutputT> apply(ValueInSingleWindow<OutputT> input) { for (ValueInSingleWindow<Outp...
0
@XmlElements(@XmlElement(name = "versionAdvertised")) private boolean versionAdvertised = true; versionAdvertised = prototype.versionAdvertised; public void setVersionAdvertised(boolean versionAdvertised) { this.versionAdvertised = versionAdvertised; public boolean isVersionAdvertised() { return ver...
0
import org.apache.felix.scr.impl.metadata.DSVersion; final Class<?> componentClass, final DSVersion dsVersion, final boolean configurableServiceProperties ) super( methodName, methodName != null, componentClass, dsVersion, configurableServiceProperties );
0
protected TestableZooKeeper createClient(CountdownWatcher watcher) throws IOException, InterruptedException { return createClient(watcher, hostPort); }
0
* set to true Metatype Service data is generated in the
0
import org.apache.beam.sdk.testing.UsesUnboundedSplittableParDo; @Category({NeedsRunner.class, UsesUnboundedSplittableParDo.class})
0
.apply(CoGroupByKey.create());
0
PCollection<String> output = input.apply(ToString.elements());
0
* this(httpProcessor, responseFactory, connStrategy,
0
public DefaultConfigFileHostEntryResolver(Path path, boolean strict, LinkOption... options) {
0
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * v...
1
@JsonIgnore @XmlElement(name = "themes-dir") private String themesDir = AmbariMetaInfo.SERVICE_THEMES_FOLDER_NAME; @JsonIgnore @XmlElementWrapper(name = "themes") @XmlElements(@XmlElement(name = "theme")) private List<ThemeInfo> themes; @XmlTransient private volatile Map<String, ThemeInfo> themesMa...
0
public NFileEntity(final File file, final String contentType) { this(file, contentType, true); }
0
* @since 3.0
0
public class GetExecutor extends AbstractExecutor { * * @param r The instance log. * @param ispect The JEXL introspector. * @param c The class being examined. * @param key The key for the get(key) operation. * @throws Exception Failure while trying to obtain the pertinent method. publi...
0
/** * Query 10, but slow and small for debugging. */ SMALL_LOGGER(smallLogger()), private static List<NexmarkConfiguration> smallLogger() { NexmarkConfiguration configuration = NexmarkConfiguration.DEFAULT.copy(); configuration.query = NexmarkQueryName.LOG_TO_SHARDED_FILES; configuration.isR...
0
public Response createTable(TableInput tableInput) { return Response.ok(job).build(); public Response insertFromTempTable(InsertFromQueryInput input) { return Response.ok(job).build(); public Response deleteTable(DeleteQueryInput input) { return Response.ok(job).build();
0
.apply(Count.perElement()); .apply(Count.perElement()); PCollectionList.of(foos).and(msync).apply(Flatten.pCollections()); PCollection<KV<byte[], Long>> counts = bytes.apply(Count.perElement());
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
public StringMap getIdentifiers() {
0
HttpRequest receiveRequest(HttpParams params) throws HttpException, IOException;
0
* Service controller. */ private String m_controller; /** * Service Controller value. */ private boolean m_controllerValue; /** if (m_controller != null) { Element ctrl = new Element("controller", ""); ctrl.addAttribute(new Attribute...
0
import org.apache.aurora.gen.storage.RemoveHostMaintenanceRequest; import org.apache.aurora.gen.storage.SaveHostMaintenanceRequest; import org.apache.aurora.scheduler.storage.HostMaintenanceStore; import org.apache.aurora.scheduler.storage.entities.IHostMaintenanceRequest; JobUpdateStore.Mutable, HostMaintenanc...
0
* Copyright (c) 2002, 2003 The Apache Software Foundation. All rights * @version $Revision: 1.13 $ $Date: 2003/02/12 07:56:17 $
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/plugins/PluginAssertionFailure.java,v 1.2 2004/01/10 17:41:26 rdonkin Exp $ * $Revision: 1.2 $ * $Date: 2004/01/10 17:41:26 $ * Copyright (c) 2001-2004 The Apache Software Foundation....
0
import org.apache.ambari.view.slider.SliderAppsViewController; quickLinks.put(SliderAppsViewController.METRICS_API_NAME, entry.getValue().getAsString());
0
import org.apache.ambari.annotations.ApiIgnore; @POST @ApiIgnore // until documented
0
@Override @Override @Override @Override @Override value = iter.getTopValue(); @Override String msg = "Closed tablet " + extent + " has walog entries in " + Constants.METADATA_TABLE_...
0
PREFIX(null, Predicates.<String>alwaysFalse(), null), PATH("path", Predicates.<String>alwaysTrue(), STRING("string", Predicates.<String>alwaysTrue(), URI("uri", Predicates.<String>alwaysTrue(), "A valid URI");
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/xml/src/java/org/apache/commons/jelly/tags/xml/SetTag.java,v 1.3 2003/10/09 21:21:26 rdonkin Exp $ * $Revision: 1.3 $ * $Date: 2003/10/09 21:21:26 $ * any, must include the following acknowledgement: * Alt...
0
* @since 2.1
0
List<ZipFileObject> strongRef = new ArrayList<ZipFileObject>(100); Enumeration<? extends ZipEntry> entries = getZipFile().entries(); ZipEntry entry = entries.nextElement();
0