Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
* Tests {@link AmazonKinesisMock}.
0
Writer small = new RFile.Writer( new BCFile.Writer(fs.create(new Path(smallName)), null, "gz", conf, cryptoService), blockSize); Writer large = new RFile.Writer( new BCFile.Writer(fs.create(new Path(largeName)), null, "gz", conf, cryptoService), ...
0
.compile("\\s*([^=\\s:]+)\\s*(?::\\s*(Boolean|Byte|Character|Short|Integer|Long|Float|Double|String)\\s*)?=(.*)");
0
/** * Creates builder object for construction of custom HTTP/2 * {@link CloseableHttpAsyncClient} instances. */ public static CachingHttp2AsyncClientBuilder customHttp2() { return CachingHttp2AsyncClientBuilder.create(); } /** * Creates HTTP/2 {@link CloseableHttpAsyncClient...
0
import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDe...
0
* A plan for a compaction: the input files, the files that are *not* inputs to a compaction that * should simply be deleted, and the optional parameters used to create the resulting output file. throw new IllegalStateException("plan contains overlap in inputFiles and deleteFiles " + Sets.intersection(...
0
this.env = BeamSqlEnv.builder() .setInitializeTableProvider(metaStore) .loadUdfUdafFromProvider() .build();
0
import org.apache.felix.framework.util.manifestparser.R4LibraryClause; //Add all startup properties so we can match selection-filters attributes.putAll(m_configMap); attributes.put(NativeNamespace.CAPABILITY_PROCESSOR_ATTRIBUTE, R4LibraryClause.getProcessorWithAliases(osArchitecture...
0
import org.apache.accumulo.core.data.TableId; public TableId tableID; public ProblemSummaryInformation(String tableName, TableId tableId, Integer fileRead,
0
/* * Copyright 2003-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 ...
0
package org.apache.http.impl.nio.reactor;
0
//set the session owner // as the follower that // owns the session
0
Map<String, DesiredConfig> clusterDesiredConfigs = cl.getDesiredConfigs(false);
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkState; import org.apache.beam.vendor.guava.v20_0.com.google.common.annotations.VisibleForTesting; import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Throwables;
0
* * @deprecated since 2.0. This class maintained for backwards compatibility please do not remove. * New users see org.apache.accumulo.hadoop.mapreduce.AccumuloInputFormat @Deprecated
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/IntArrayList.java,v 1.4 2002/08/21 23:54:18 pjack Exp $ * $Revision: 1.4 $ * $Date: 2002/08/21 23:54:18 $ * @version $Revision: 1.4 $ $Date: 2002/08/21 23:54:18...
0
if ( requestURI == null ) { requestURI = ""; } if ( requestURI == null ) { requestURI = ""; }
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.commons.jexl2.parser.ParseException; import org.apache.log4j.Logger; import parser.EventFields; import parser.QueryEvaluator; protected SortedKeyValueIterator<Key,Value> iterator; * @throws IOException public abstract boolean isKeyAccepted(Key key) throws IOException;
0
public static final String PAR_DO_TRANSFORM_URN = getUrn(StandardPTransforms.Primitives.PAR_DO); public static final String FLATTEN_TRANSFORM_URN = getUrn(StandardPTransforms.Primitives.FLATTEN); public static final String IMPULSE_TRANSFORM_URN = getUrn(StandardPTransforms.Primitives.IMPULSE); public static fin...
1
import org.apache.ambari.server.orm.entities.RepoDefinitionEntity; import org.apache.ambari.server.orm.entities.RepoOsEntity; List<RepoOsEntity> operatingSystems = repoVersionEnt.getRepoOsEntities(); Map<String, List<RepoDefinitionEntity>> perOsRepos = new HashMap<>(); for (RepoOsEntity operatingSystem : op...
0
private void obtainLock( Lock lock ) final void obtainActivationReadLock( ) obtainLock( m_activationLock.readLock()); final void releaseActivationReadLock( ) final void obtainActivationWriteLock( ) obtainLock( m_activationLock.writeLock()); final void releaseActivationWriteeLock( ) ...
0
* @version $Id: EnterpriseUnixFTPEntryParser.java,v 1.12 2004/07/28 05:01:47 dfs Exp $ file.setSize(Long.parseLong(filesize));
0
cfg.setProperty(Property.REPLICATION_WORK_ASSIGNMENT_SLEEP, "1s");
0
/** * Returns the width of the viewport which directly contains the * associated element. */ float getViewportWidth(); /** * Returns the height of the viewport which directly contains the * associated element. */ float getViewportHeight(); /** * Returns the font...
0
return new Values<>(elems, Optional.absent(), Optional.absent()); Optional.absent()); return new Values<>(new ArrayList<T>(), Optional.absent(), Optional.of(type)); Optional.absent(), Optional.absent());
0
private static final transient Logger log = LoggerFactory.getLogger(XMLEncryptedKeyInputHandler.class); log.warn("Unwrapping of the encrypted key failed with error: " + e.getMessage() + ". " +
0
LOGGER.warn("Unable to reload Karaf instance list", e); copyResourceToDir(serviceMixBase, "etc/org.apache.felix.karaf.features.cfg", true); copyFilteredResourceToDir(serviceMixBase, "bin/karaf.bat", props); copyFilteredResourceToDir(serviceMixBase, "bin/karaf", props); ...
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
* @param o the object to get the property from. * @return the property value. * @throws Exception on any error. * @return the method name.
0
private TabletStats total; private TabletStats historical; public TabletServersRecovery getTserverRecovery() { TabletServersRecovery recoveryList = new TabletServersRecovery(); String serv = AddressUtil.parseAddress(server.name, false).getHostText(); String log = recovery.name; i...
0
} catch (final NoSuchAlgorithmException e) { } catch (final NoSuchAlgorithmException e) {
0
AgentConfigsUpdateEvent agentConfigsUpdateEvent = new AgentConfigsUpdateEvent(hostId, clustersConfigs);
0
// method needs to be protected for 1.0 if ( specVersion == Constants.VERSION_1_0 ) { if (method.isPublic()) { iLog.addWarning(this.getMessage("Method " + method.getName() + " should be declared protected")); } else if (!method.isProtected()) { iLo...
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument;
0
super.initializeFrom(definition);
0
sshd.setSubsystemFactories(Collections.<NamedFactory<Command>>singletonList(new SftpSubsystemFactory()));
0
hostRequestEntityHost1Matched.setTopologyHostTaskEntities(Collections.emptySet()); hostRequestEntityHost2Matched.setTopologyHostTaskEntities(Collections.emptySet()); hostRequestEntityHost3NotMatched.setTopologyHostTaskEntities(Collections.emptySet()); hostRequestEntityHost4NotMatched.setTopologyHostTask...
0
protected SshdSocketAddress localEntry; this.localEntry = new SshdSocketAddress((InetSocketAddress) serverSession.getLocalAddress()); public void updateLocalForwardingEntry(LocalForwardingEntry entry) { Objects.requireNonNull(entry, "No local forwarding entry provided"); localEntry = new...
0
* Use this short option name. The first name is used as the preferred * display name for the Command and then later names are used as aliases. * * Use this long option name. The first name is used as the preferred * display name for the Command and then later names are used as aliases. *...
0
int w = (Integer) aci.getAttribute(WORD_LIMIT); paraEnds.add(asb.length()); paraEnds.add(asb.length()); int nextLN = (Integer) lnIter.next(); end = (Integer) paraEnds.get(i); lineBreak = (Integer) lnLocs.get(lnLocs.size() - 1); ...
0
* to the Rhino interpreter's * org.mozilla.javascript.ContextFactory.
0
/** * Wraps a group of {@link Supplier}s of {@link Iterable} instances into a &quot;unified&quot; * {@link Iterable} of their values, in the same order as the suppliers - i.e., once the values * from a specific supplier are exhausted, the next one is consulted, and so on, until all * suppliers h...
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ArrayListMultimap; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ListMultimap;
0
* Simple test to get the list of stacks. Does not touch the DB. public class GetStacksTest extends ServerTestBase { getMethod.addRequestHeader("Authorization", getBasicAdminAuthentication());
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Sets;
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 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 class HBaseTimelineMetricsServiceTest { HBaseTimelineMetricsService.parseMetricNamesToAggregationFunctions(metricNames); Map<Long, Double> rates = HBaseTimelineMetricsService.updateValuesAsRate(new TreeMap<>(metricValues), false); Map<Long, Double> rates = HBaseTimelineMetricsService.updateValuesAs...
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
return "status_update_" + status.getReason() + "_" + result;
0
* This cookie comparator ensures that multiple cookies satisfying * * This comparator assumes that Path attributes of two cookies *
0
import org.xml.sax.ContentHandler; * the results of {@link #toSAX(ContentHandler)} that must be implemented by concrete
0
assertEquals("Result Size", 1 + dirs.length + ioFiles.length + outputFiles.length, results.size()); assertEquals("[D] Result Size", 1 + dirs.length + ioFiles.length, results.size()); assertEquals("[DirAndFile1] Result Size", 1 + dirs.length + ioFiles.length, results.size()); assertTrue("...
0
private static final long serialVersionUID = -4248110651729635749L;
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 applic...
0
assertEquals(1, Integer.parseInt(table.get("nc"),16));
0
* Creates a <code>DOMTransform</code> from an element. It unmarshals any
1
import org.apache.commons.collections.collection.PredicatedCollectionTest; * Extension of {@link PredicatedCollectionTest} for exercising the public class TestPredicatedBuffer<E> extends PredicatedCollectionTest<E> {
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 static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; @org.junit.jupiter.api.Test
0
import com.google.common.collect.ImmutableMap; private static final Map<Class, Integer> JAVA_CLASS_TO_SQL_TYPE = ImmutableMap .<Class, Integer> builder() .put(Byte.class, Types.TINYINT) .put(Short.class, Types.SMALLINT) .put(Integer.class, Types.INTEGER) .put(Long.class, Types.BIGINT) ...
0
.map( input -> { List<String> empData = Splitter.on('_').splitToList(input.getValue()); return KV.of( new Text(input.getKey()), new Employee(empData.get(0), empData.get(1))); }) .collect(Collectors.toList()...
0
// [START DocInclude_WindowAndTrigger] // [END DocInclude_WindowAndTrigger] // [START DocInclude_ProcTimeTrigger] // [END DocInclude_ProcTimeTrigger]
0
final HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK"); final BasicHttpEntity entity = new BasicHttpEntity(); final UriHttpAsyncRequestHandlerMapper registry = new UriHttpAsyncRequestHandlerMapper(); final ListenerEndpoint endpoint = this.ser...
0
public int hashCode() { // uncomment when JDK 1.4 is required // assert false : "hashCode not designed"; return 48; }
0
package org.apache.beam.examples.testing; import org.apache.beam.sdk.util.FluentBackoff;
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.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
0
package org.apache.beam.runners.core.triggers; * Tests for {@link ExecutableTriggerStateMachine}. public class ExecutableTriggerStateMachineTest { StubStateMachine t1 = new StubStateMachine(); ExecutableTriggerStateMachine executable = ExecutableTriggerStateMachine.create(t1); StubStateMachine t1 = new Stu...
0
conn = new DefaultBHttpClientConnection(H1Config.DEFAULT,
0
return new Nio2Session(this, manager, handler, socket, null);
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
/* * $HeadURL$ * $Revision$ * $Date$ * * ==================================================================== * 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...
0
@Test public void canReadNonLatin1Properties() { Assert.assertEquals("árvíztűrő tükörfúrógép", new Configuration().getProperty("encoding.test")); }
0
/* ==================================================================== * @version $Revision: 1.28 $ $Date: 2004/01/14 21:43:04 $
0
/** * Exception thrown during parsing signalling an unrecognized * option was seen. public class UnrecognizedOptionException extends ParseException { /** * Construct a new <code>UnrecognizedArgumentException</code> * with the specified detail message. }
0
package org.apache.commons.net;
0
import java.io.PrintStream; import org.apache.tools.ant.DemuxOutputStream; // according to org.apache.tools.ant.Main, redirect stdout and stderr PrintStream initialOut = System.out; PrintStream initialErr = System.err; PrintStream newOut = new PrintStream(...
0
final EntityDetails entityDetails, final HttpContext context) throws HttpException, IOException { responseConsumer.consumeResponse(response, entityDetails, context, }, context);
0
public String[] getInitializationExpression() { return ClassUtil.getInitializationExpression(this.field.getDeclaringClass(), this.field.getName());
0
import org.apache.hc.core5.http.protocol.HttpDateGenerator; System.out.println(HttpDateGenerator.INSTANCE.getCurrentDate() + " | " + endpoint + " | serving file " + file.getPath());
0
@Override
0
SimpleDateFormat fmt = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss,SSSS");
0
import org.osgi.service.obr.Resource; private Resource m_resource; public Resource getResource() { return m_resource; } public void setResource(Resource resource) { m_resource = resource; }
0
* @param <E> the type held in the multiset
0
package org.apache.commons.net.nntp; * @author Rory Winston * @author Ted Wise throws IOException /*** * Private implementation of XHDR functionality. * * See <a href="org.apache.commons.nntp.NNTP.html#xhdr"> * for legal agument formats. Alternatively...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/ListIteratorByteListIterator.java,v 1.2 2003/08/31 17:21:17 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately, th...
0
* @return the size of the file * Returns the size of a file
0
private static final long serialVersionUID = 0L;
0
+ "]");
0
* @deprecated (since 6.0) will be made private and final; do not access directly, use getter * @deprecated (since 6.0) will be made private and final; do not access directly, use getter
0
if(servers.size() > 0) {
0
driver.acknowledgeStatusUpdate(status); // We re-throw the exception here to trigger an abort of the driver. // Even though we have not handled this update, we acknowledge it to prevent an unbounded // growth of status update retries from Mesos. driver.acknowledgeStatusUpdate(status);
0
List <BSHostStatus> hostStatusList = tmpStatus.getHostsStatus(); if (hostStatusList != null) { for (BSHostStatus status : hostStatusList) { if (status.getStatus().equals("RUNNING")) { pendingHosts = true; } } else { //Fail...
0
import org.apache.beam.model.fnexecution.v1.BeamFnApi; * <p>Can be re-used serially across {@link BeamFnApi.ProcessBundleRequest}s.
0
public static int CLIENT_API_PORT = 8080; private Server serverForAgent = null; server = new Server(CLIENT_API_PORT); serverForAgent = new Server(); Context agentroot = new Context(serverForAgent, "/", Context.SESSIONS); /* Configure default servlet for...
0
* * <p>For the best compatibility use Java >= 1.6 as it supports SPNEGO authentication more * The registry key <em>allowtgtsessionkey</em> should be added, and set correctly, to allow * Value: 0x01 * EntityUtils.consume(entity); // When HttpClient instance is no longer needed, httpcli...
0
// Notice that scheduling the handling of the configuration update in the component queue also // allows to safely check if the component is still active (it could be being stopped concurrently: // see the invokeUpdated method which tests if our dependency is still alive (by calling super....
0
import org.apache.accumulo.server.util.PortUtils; String gcPort = Integer.toString(PortUtils.getRandomFreePort()); Map<String,String> config = ImmutableMap.of(Property.GC_CYCLE_DELAY.getKey(), "1s", Property.GC_CYCLE_START.getKey(), "0s", Property.GC_PORT.getKey(), gcPort);
0