Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
private boolean runGC = false; /** * Whether or not the Accumulo garbage collector proces will run * @return */ public boolean shouldRunGC() { return runGC; } /** * Sets if the Accumulo garbage collector process should run * @param shouldRunGC */ public void runGC(boolean shouldR...
0
transport = ThriftUtil.createTransport(AddressUtil.parseAddress(tserver, false), ServerConfigurationUtil.getConfiguration(instance));
0
protected void initBuffer(int buffersize, int linebuffersize) { this.chbuffer = CharBuffer.allocate(linebuffersize); this.chbuffer.put(buffer.buffer(), offset, l);
0
import org.apache.beam.runners.spark.SparkRunner; @Default.InstanceFactory(InputFactory.class) /** * Return default input file path according to runner type. * * <p><ul> * <li>SparkRunner: * .../src/test/resources/LICENSE</li> * <li>other runners: * gs://dataflow-sampl...
0
* @since 3.0
0
private final Collection<String> matchingOptions;
0
@SuppressWarnings({"unused"}) public enum MasterState implements org.apache.thrift.TEnum {
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
import org.apache.beam.runners.core.construction.SdkComponents; CloudObject toCloudObject(T target, SdkComponents sdkComponents);
0
import org.apache.hc.core5.annotation.NotThreadSafe; import org.apache.hc.core5.util.CharArrayBuffer;
1
PartitionInfo pi = new PartitionInfo("topic", 0, Node.noNode(), null, null);
0
import org.apache.http.protocol.HttpCoreContext; context.setAttribute(HttpCoreContext.HTTP_CONNECTION, managedConn);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/ExtendMapBean.java,v 1.2 2003/10/05 13:33:29 rdonkin Exp $ * $Revision: 1.2 $ * $Date: 2003/10/05 13:33:29 $ * * Copyright (c) 2001-2003 The Apache Software Foundation. All right...
0
loggedMsgCache.get(this.getClass().getName(), () -> { sawDeleteLog.error("Combiner of type {} saw a delete during a" + " partial compaction. This could cause undesired results. See" + " ACCUMULO-2232. Will not log subsequent occurences for at least" + " 1 hour.", ...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/CharListIterator.java,v 1.3 2003/11/07 17:24:13 rwaldhoff Exp $ * @version $Revision: 1.3 $ $Date: 2003/11/07 17:24:13 $ * @deprecated This code has been moved t...
0
SortedSet<String> candidates; try { candidates = getCandidates(); status.current.candidates = candidates.size(); } finally { candidatesSpan.stop(); } try { confirmDeletes(candidates); } finally { confirmDeletesSpan.stop();...
0
import org.apache.accumulo.server.mini.MiniAccumuloCluster;
0
import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.io.Serializable; * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
0
private static final String API_CLUSTER_ALERT_ALL_PATTERN = API_VERSION_PREFIX + "/clusters/.*?/alert.*"; private static final String API_CLUSTER_HOSTS_ALL_PATTERN = API_VERSION_PREFIX + "/clusters/.*?/hosts.*"; private static final String API_HOSTS_ALL_PATTERN = API_VERSION_PREFIX + "/hosts.*"; private static ...
0
import org.apache.aurora.scheduler.BatchWorker; import org.apache.aurora.scheduler.SchedulerModule.TaskEventBatchWorker; private final TaskEventBatchWorker batchWorker; public MaintenanceControllerImpl( Storage storage, StateManager stateManager, TaskEventBatchWorker batchWorker) { ...
0
* {@code AccumuloFileOutputFormat#setSummarizers(JobConf, SummarizerConfiguration...)} or * {@link WriterOptions#withSummarizers(SummarizerConfiguration...)} @Override
0
import java.util.List; import org.apache.aurora.scheduler.storage.entities.IJobUpdateQuery; public List<IJobUpdateSummary> fetchJobUpdateSummaries(IJobUpdateQuery query) { public List<IJobUpdateDetails> fetchAllJobUpdateDetails() {
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 cluster.getClientProperties();
0
import com.google.common.base.MoreObjects; import com.google.common.base.Supplier; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import java.io.IOException; import java.util.Collection; import java.util.HashMap; import java....
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
Digester<D> digester; this.digester = digester; @Override public void write(byte[] buffer, int offset, int length) throws IOException { } catch (SignatureException e) { @Override public void write(int b) throws IOException { } catch (SignatureException e) {
0
import org.apache.atlas.authorize.AtlasAuthorizationUtils; import org.apache.atlas.authorize.AtlasPrivilege; import org.apache.atlas.authorize.AtlasRelationshipAccessRequest; import org.apache.atlas.model.instance.AtlasEntityHeader; String relationShipType = GraphHelper.getTypeName(edge); At...
0
package org.apache.commons.vfs2.provider; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; import org.apache.commons.vfs2.FileSystemOptions; import org.apache.commons.vfs2.FileType;
1
import static org.junit.Assert.assertFalse; assertFalse(res.isSuccess());
0
Map<String, Iterable<PCollectionView<?>>> ptransformIdToPCollectionViewMap, Map<String, NameContext> pcollectionToPartialNameContextMap) { ptransformIdToPCollectionViewMap, pcollectionToPartialNameContextMap); public abstract Map<String, NameContext> getPCollectionToPartialNameCo...
0
public class AdminPlugin extends AbstractResourceAwareWebConsolePlugin {
0
Copyright 2002-2003 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 law...
0
import java.util.LinkedList; import java.util.TreeMap; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; private static Log LOG = LogFactory.getLog(ActionQueue.class); public ActionQueue() { hostQueues = new TreeMap<String, Queue<AgentCommand>>(); } if (q ...
0
import org.apache.beam.model.pipeline.v1.RunnerApi; private static final Instant END_OF_GLOBAL_WINDOW = extractMaxTimestampFromProto(); /** Parses the max timestamp for global windows from the proto. */ private static Instant extractMaxTimestampFromProto() { return new Instant( Long.parseLong( ...
0
import org.apache.ambari.server.state.stack.ConfigUpgradePack; import org.apache.ambari.server.state.stack.upgrade.ConfigUpgradeChangeDefinition.Condition; import org.apache.ambari.server.state.stack.upgrade.ConfigUpgradeChangeDefinition.ConfigurationKeyValue; import org.apache.ambari.server.state.stack.upgrade.ConfigU...
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
return HostAndPort.fromParts(InetAddress.getLocalHost().getHostAddress(), port);
0
* @version CVS $Id: LinkGatherer.java,v 1.2 2003/03/28 12:55:42 nicolaken Exp $ if (!this.links.contains(href)){ this.addLink(href); } if (!this.links.contains(href)){ this.addLink(href); } int anchorPos = href.indexOf('#'); ...
0
import org.apache.beam.sdk.io.Write;
0
* <code>Iterator</code> of <code>String</code> objects. * method returns an empty <code>Iterator</code>. The header name is * @return an <code>Iterator</code> containing the values of the * that name, return an empty <code>Iterator</code> * Returns an <code>Iterator</code> of all the he...
0
* * @since 4.0
0
public static File createDirectory(File file) { String absolutePath; try { absolutePath = file.getCanonicalPath(); } catch (IOException e) { throw new DeploymentException("A problem occured while reading the canonical path of '" + file.getAbsolutePath() + "'"); }
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/WrapDynaBeanTestCase.java,v 1.7 2004/01/08 22:38:11 rdonkin Exp $ * $Revision: 1.7 $ * $Date: 2004/01/08 22:38:11 $ * Copyright (c) 2001-2004 The Apache Software Foundation. All ri...
0
Map<String, Form> pForms = getForms(); Map<String, Form> dForms = depends.getForms(); for (Iterator<Entry<String, Form>> it = dForms.entrySet().iterator(); it.hasNext(); ) { Entry<String, Form> entry = it.next(); String key = entry.getKey(); ...
0
import org.apache.beam.sdk.transforms.OldDoFn; static class KeyBasedOnCountFn<T> extends OldDoFn<T, KV<Integer, T>> {
0
private final HttpResponse response; final HttpResponse response, this.response = response;
0
for (MergeInfo merge : merges()) { if (merge.getRange() != null) { mergeStatsCache.put(merge.getRange().getTableId(), new MergeStats(merge)); } }
0
import org.apache.beam.dsls.sql.planner.MockedBeamSqlTable; import org.apache.beam.dsls.sql.schema.BeamSqlRow; private static MockedBeamSqlTable stringTable = MockedBeamSqlTable private static MockedBeamSqlTable intTable = MockedBeamSqlTable PCollection<BeamSqlRow> rows = BeamSqlCli.compilePipeline(sql, pipelin...
0
} catch (final DecoderException e) { void assertDecodeObject(final byte[] bits, final String encodeMe) throws DecoderException { final Object obj = new byte[0]; } catch (final EncoderException e) {
1
public static final String[] VARIATION_PLATFORMS = org.apache.batik.test.svg.PreconfiguredRenderingTest.DEFAULT_VARIATION_PLATFORMS; String[] variationURLs = new String[VARIATION_PLATFORMS.length + 1]; variationURLs[0] = GENERATOR_REFERENCE_BASE + RENDERING_DIR + "/" + ACCEPTED_VARIATION_D...
0
String ATTR_DX = "dx"; String ATTR_DY = "dy"; String VALUE_FONT_WEIGHT_700 = "700"; float DEFAULT_VALUE_DX = 0f; float DEFAULT_VALUE_DY = 0f;
0
return Type.size(Type.getTypeSize(getSignature(cpg)));
0
import com.google.cloud.dataflow.sdk.values.TypeDescriptor; public <T> Coder<T> getCoder(TypeDescriptor<T> type) throws CannotProvideCoderException;
0
@SuppressWarnings("boxing") // test code
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. * permission of the Apache Software Foundation.
0
import org.apache.aurora.common.args.ArgParser; import org.apache.aurora.common.args.parsers.NonParameterizedTypeParser;
0
throw new UnsupportedOperationException();
0
public void map(Key k, Value v, OutputCollector<Text,Mutation> output, Reporter reporter) {
0
* <p> * This class implements throw away objects. It is instantiated whenever * waiting thread experiences a spurious wake up and continues to wait. * </p> * <p> * </p> * @deprecated (4.2) do not use * or {@code null} * @return the condition on which to wait, never {@code null} *...
0
import org.apache.accumulo.core.metadata.schema.DataFileValue;
1
// If the package is stale, then return null per the spec. Set<Bundle> set = m_felix.getRequiringBundles(m_bundle); return set.toArray(new Bundle[set.size()]);
0
ListeningIOReactor ioReactor = new DefaultListeningIOReactor();
0
package aQute.lib.spring; import java.util.*; import aQute.lib.osgi.*; /** * This component is called when we find a resource in the META-INF/*.xml * pattern. We parse the resource and and the imports to the builder. * * Parsing is done with XSLT (first time I see the use of having XML for the * Spring configu...
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 org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class)
0
import org.apache.accumulo.core.clientImpl.bulk.BulkSerialize;
0
Collections.emptyList(), false, false, false)).andReturn(stageContainer).once(); RequestStageContainer requestStages = provider.updateHostComponents(null, requests, requestProperties, runSmokeTest, false);
1
import java.util.Properties; import org.apache.cocoon.portal.PortalException; * @see org.apache.cocoon.portal.layout.renderer.aspect.impl.AbstractAspect#prepareConfiguration(java.util.Properties) public Object prepareConfiguration(Properties configuration) throws PortalException { if ( configurati...
0
import org.eclipse.jetty.server.session.SessionCache; * Shares specified sessionCache between all views' handlers * @param serverSessionCache the sessionCache instance */ void shareSessionCacheToViews(SessionCache serverSessionCache); /**
0
XmlHandler handler = new XmlHandler( m_bundle, this, getConfiguration().isFactoryEnabled(), getConfiguration().keepInstances() );
0
import org.apache.hc.core5.http.Header; import org.apache.hc.core5.http.HttpHost; import org.apache.hc.core5.http.ProtocolException; import org.apache.hc.core5.http.StatusLine; import org.apache.hc.core5.http.message.BasicHeader; private HttpHost host; host = new HttpHost("foo.example.com", 80); rou...
0
public class StackId implements Comparable<StackId> { @Override public int compareTo(StackId other) { if (this == other) { return 0; } if (other == null) { throw new RuntimeException("Cannot compare with a null value."); } int returnValue = getStackName().compareTo(other.getStackNa...
0
if (server == null) { throw new AmbariException("Error stopping the server"); } else { try { server.stop(); } catch (Exception e) { LOG.error("Error stopping the server", e); }
0
// NOTE: This class is focused on InputStream, OutputStream, Reader and
0
* @param sourcefile_index
0
factory.setProperty(XMLInputFactory.SUPPORT_DTD, false); factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
0
Capability.SET_LAST_MODIFIED_FILE, Capability.SET_LAST_MODIFIED_FOLDER,
0
* to be update - <B>Note:</B> assumption is that the encoded data starts /** * Updates a 32-bit &quot;placeholder&quot location for data length - moves * the write position to the specified placeholder position, updates the length * value and then moves the write position it back to its ori...
0
import org.apache.cocoon.util.AbstractLogEnabled; public class TraxErrorListener extends AbstractLogEnabled implements ErrorListener { public TraxErrorListener(String uri) { if (getLogger().isWarnEnabled()) { getLogger().warn(ex.getMessage() + " at " + (loc == nul...
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
* * @since 2.5 /** * Reads the next item from the target, updating internal flags in the process * @return the next int read from the target stream * @throws IOException upon error */ /** * Handles the eof-handling at the end of the stream * @return The next char to output to the...
1
* } catch (Exception e) { } catch (IOException e) { Map<String, Object> props = sshd.getProperties();
1
import org.apache.beam.sdk.values.Row; import org.apache.beam.sdk.values.RowType; RowType resultType = RowSqlType.builder() Row row = Row.withRowType(resultType).addValues(0, 30).build(); PCollection<Row> result1 = PAssert.that(result1).containsInAnyOrder(row); PCollection<Row> result2 = PAssert...
0
package org.apache.commons.codec;
1
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument;
0
private final RuleSetCache cachedRuleSet = new RuleSetCache();
0
final byte[] inputBytes = input.getBytes();
0
private static class FilesystemIterator implements Iterator {
0
/** The IDENTITY_ELEMENT is used to start accumulating distributions. */ public static final DistributionResult IDENTITY_ELEMENT = create(0, 0, Long.MAX_VALUE, Long.MIN_VALUE);
0
gc = new DiskGarbageCollector("Test", root, fileFilter, GC_THRESHOLD, gcCallback);
0
* Cross Reference for column name --> dyna property name
0
private static final String VALUE_TRUE = Boolean.TRUE.toString(); public static final String PID = "org.apache.felix.scr.ScrService"; public static final String PROP_FACTORY_ENABLED = "ds.factory.enabled"; public static final String PROP_DELAYED_KEEP_INSTANCES = "ds.delayed.keepInstances"; public ...
0
* Executes the given closure on each but the last element in the collection. * <p> * If the input collection or closure is null, there is no change made. * * @param <T> the type of object the {@link Collection} contains * @param <C> the closure type * @param collection the collecti...
0
/** {@inheritDoc} */
0
DirectPipelineRunner.class;
0
import org.apache.accumulo.core.file.rfile.bcfile.Compression; import org.apache.log4j.Logger; private static final Logger log = Logger.getLogger(CreateEmpty.class); String[] algorithms = Compression.getSupportedAlgorithms(); throw new ParameterException("Compression codec must be one of " + Arrays.toSt...
0
/* * $HeadURL$ * $Revision$ * $Date$ * ==================================================================== * * Copyright 1999-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 ma...
0
import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; private static Log LOG = LogFactory.getLog( ValueJXPathBinding.class ); LOG.warn("Convertor ignored on backend-value which isn't of type String."); if (LOG.isDebugEnabled()) { LOG.debug("Done lo...
0
* @return the number of annotation entries in this parameter annotation
0