Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
private static final long serialVersionUID = 5654582990564566355L;
0
opts.setPrincipal("root");
0
public Document createDocument(String ns, String root, String uri, Reader r) throws IOException { XMLReader parser = XMLReaderFactory.createXMLReader(parserClassName); * Returns true if the XML parser validates the XML stream, false * otherwis...
0
OnTimerMethodSpecifier onTimerMethodSpecifier = OnTimerMethodSpecifier.forClassAndTimerId(fnClass, timerId); Constructor<?> constructor = constructorCache.get(onTimerMethodSpecifier); OnTimerInvoker<InputT, OutputT> invoker = return invoker; * A cache of constructors...
0
* @param charIndex The index of the character that has been * hit. In the case of bidirectional text this will be the logical * character index not the visual index. The index is relative to * whole text within the selected TextNode. * @param leadingEdge Indicates which side of the character ha...
0
import org.apache.http.conn.scheme.SchemeRegistry;
0
* Note that this class is intended as an in-memory replacement for RFile$Reader, so its behavior reflects * the same assumptions; namely, that this iterator is not responsible for respecting the columnFamilies * passed into seek(). If you want a Map-backed Iterator that returns only sought CFs, construct a new * ...
0
for (final CharArrayBuffer buffer : this.headerBufs) {
0
assertEquals("org.apache.accumulo.core.security.crypto.CachingHDFSSecretKeyEncryptionStrategy", params.getKeyEncryptionStrategyClass()); assertEquals("org.apache.accumulo.core.security.crypto.CachingHDFSSecretKeyEncryptionStrategy", params.getKeyEncryptionStrategyClass()); assertEquals("org.apache.accumulo....
0
import com.twitter.mesos.scheduler.state.MaintenanceController;
0
* @version $Id$
0
import org.apache.sshd.util.Utils; sshd.setKeyPairProvider(Utils.createTestHostKeyProvider());
0
private final static class FileSystemOptionKey implements Comparable int ret = fileSystemClass.getName().compareTo(k.fileSystemClass.getName());
0
import org.apache.ambari.server.topology.TopologyManager; import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.expectLastCall; import static org.easymock.EasyMock.anyObject; import static org.easymock.EasyMock.eq; import static org.easymock.EasyMock.replay; TopologyManager topologyManager...
0
// should text be escaped - default to true for compatability private boolean escapeText = true; /** * Returns whether the body of this tag will be escaped or not. */ public boolean isEscapeText() { return escapeText; } /** * Sets whether the body of the tag should be es...
0
import org.apache.zookeeper.ZooDefs; import org.apache.zookeeper.server.quorum.flexible.QuorumVerifier; public synchronized void initConfigInZKDatabase(QuorumVerifier qv) { if (qv == null) return; // only happens during tests try { if (this.dataTree.getNode(ZooDefs.CONFIG_NODE) == null)...
0
interface Params { Amount<Long, Time> dlogShutdownGracePeriod(); Amount<Long, Time> dlogSnapshotInterval(); Amount<Integer, Data> dlogMaxEntrySize(); } private final Params params; public LogStorageModule() { this.params = new Params() { @Override public Amount<Long, Time> dlogSh...
0
public void init(final FilterConfig filterConfig) throws ServletException { // nothing to do } public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException, ServletException { final HttpServletRequest req = (HttpServletR...
0
Option opt = (Option) getOptions().getOption(arg).clone();
0
import java.util.Arrays; assertSortOrder(new DoubleLexicoder(), Arrays.asList(Double.MIN_VALUE, Double.MAX_VALUE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, 0.0, 0.01, 0.001, 1.0, -1.0, -1.1, -1.01, Math.nextUp(Double.NEGATIVE_INFINITY), Math.nextAfter(0.0, Double.NEGATIVE_INFINITY), Math....
0
import com.google.common.base.Predicate; import com.google.common.collect.Sets; import com.twitter.mesos.gen.ScheduleStatus; import java.util.Set; import static com.twitter.mesos.gen.ScheduleStatus.*; /** * Different states that an active task may be in. */ public static final Set<ScheduleStatus> ACTIVE_ST...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/AbstractObjectCreationFactory.java,v 1.9 2004/01/10 17:32:28 rdonkin Exp $ * $Revision: 1.9 $ * $Date: 2004/01/10 17:32:28 $ * Copyright (c) 2001-2004 The Apache Software Foundation. ...
0
import org.apache.beam.sdk.metrics.MetricKey;
0
final Path file = getTempTargetRelativeFile(getCurrentTestName());
0
void store(TypeSystem typeSystem) throws MetadataException; void store(TypeSystem typeSystem, ImmutableList<String> types) throws MetadataException; TypesDef restore() throws MetadataException;
0
package org.apache.commons.configuration.convert; import org.apache.commons.configuration.ListDelimiterHandler; import org.apache.commons.configuration.ValueTransformer;
0
"bootstrap.script", AmbariPath.getPath("/usr/lib/ambari-server/lib/ambari_server/bootstrap.py")); AmbariPath.getPath("/usr/lib/ambari-server/lib/ambari_server/setupAgent.py"));
0
* @throws Exception throws Exception @Path(value = "/{stackName0}") * @param stackName Name of the stack * @throws Exception throws Exception @Path(value = "/{stackName1}") @Path(value = "/{stackName2}")
0
this(doc, BaseURI, SignatureMethodURI, 0, Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS); Document doc, String BaseURI, String SignatureMethodURI, int HMACOutputLength) throws XMLSecurityException { this(doc, BaseURI, SignatureMethodURI, HMACOutputLength, Canonicalizer.ALGO_ID_C14N_OMIT_...
0
final String[] sa = a.split(":", 2);
0
deepCopy(existingConfigurations), null, kerberosDescriptorProperties); PrincipalKeyCredential administratorCredential = getKDCAdministratorCredentials(cluster.getClusterName()); try { kerberosOperationHandler.open(administratorCredential, kerberosDetails.getDefaultRealm(), kerberosConfigura...
0
import org.apache.atlas.typesystem.TypesDef; import scala.collection.JavaConversions; public static TypesDef getTypesDef(ImmutableList<EnumTypeDefinition> enums, ImmutableList<StructTypeDefinition> structs, ImmutableList<HierarchicalTypeDefinition<TraitType>> traits, ...
0
import org.apache.zookeeper.server.ZooKeeperServerListener; int tickTime, long id, boolean localSessionsEnabled, ZooKeeperServerListener listener) { expirer, sessionsWithTimeouts, tickTime, id, listener); createLocalSessionTracker(expirer, tickTime, id, listener);
0
package org.apache.commons.digester3.annotations.processor; /* * 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 u...
0
// Necessary for resetting clients stale configs after starting service if ((RoleCommand.INSTALL.toString().equals(report.getRoleCommand()) || (RoleCommand.CUSTOM_COMMAND.toString().equals(report.getRoleCommand()) && "INSTALL".equals(report.getCustomCommand()))) &...
0
* $HeadURL:https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/mockup/TestHttpServer.java $ * $Revision:575207 $ * $Date:2007-09-13 09:57:05 +0200 (Thu, 13 Sep 2007) $ if (this.thread != null) { this.thread.join(500); ...
0
LOG.debug("Waiting up to {} msec as assertion failed", mustEnd - System.currentTimeMillis(), e);
0
executor.submit(flow).get();
0
import java.io.IOException; import java.io.InputStream; public class ThreadInputStream extends InputStream { InputStream dflt; public ThreadInputStream(InputStream in) { dflt = in; } public int read(byte[] buffer, int offset, int length) throws IOException { return getCurrent().r...
0
/** Copied from package com.google.cloud.bigquery, see BEAM-4248. */ * Mode for a BigQuery Table field. {@link Mode#NULLABLE} fields can be set to {@code null}, {@link * Mode#REQUIRED} fields must be provided. {@link Mode#REPEATED} fields can contain more than one * value. NULLABLE, REQUIRED, REPEATED
1
public class DistributionCell implements MetricCell<Distribution, DistributionData> { /** Increment the distribution by the given amount. */ update(DistributionData.singleton(n)); } @Override public void update(DistributionData data) { } while (!value.compareAndSet(original, original.combine(data))); ...
0
assertNull("Check no foo service", getContext().getServiceReference(FooService.class.getName())); ComponentFactory factory = (ComponentFactory) Utils.getFactoryByName(getContext(), "Factories-FooProviderType-1"); assertNotNull("Check foo service", getContext().getServiceReference(FooService.class.getName())); a...
0
* The interface for things that might be input to a * Returns the owning {@link Pipeline} of this {@code PInput}. * Expands this {@code PInput} into a list of its component input {@link PValue}s. * <p> A {@link PValue} expands to itself. * <p> A tuple or list of {@link PValue}s (e.g., {@link PCollectionTup...
0
import com.google.cloud.dataflow.sdk.transforms.windowing.InvalidWindows; new InvalidWindows( public void testInvalidWindows() {
0
import org.apache.accumulo.core.security.Authorizations; import org.apache.accumulo.trace.instrument.TraceExecutorService; import org.apache.accumulo.trace.instrument.Tracer; // This needs to execute after the arbiter is stopped Scanner mscanner = new IsolatedScanner(conn.createScanner...
0
PropertiesConfiguration configProperties = new PropertiesConfiguration("atlas-buildinfo.properties"); response.put("Name", configProperties.getString("project.name", "apache-atlas")); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_...
0
import java.util.List; import org.apache.geronimo.gshell.clp.Option; import org.osgi.framework.Bundle; public class StopBundle extends BundlesCommand { protected void doExecute(List<Bundle> bundles) throws Exception { for (Bundle bundle : bundles) { bundle.stop(); }
0
return FtpFileName.parseUri( uri );
0
public void getProperties(Map<String,String> props, PropertyFilter filter) { for (Entry<String,String> prop : DefaultConfiguration.getInstance()) if (filter.accept(prop.getKey())) props.put(prop.getKey(), prop.getValue()); for (Entry<String,String> prop : xml) ...
0
package org.apache.felix.ipojo.runtime.core.test.components.comparator; import org.osgi.framework.ServiceReference; import java.util.Comparator; public class GradeComparator implements Comparator { public int compare(Object arg0, Object arg1) { ServiceReference ref0 = null; ServiceReference ref1...
0
package org.apache.commons.ognl;
0
log.error("Could not read all from cluster.", ioe);
0
@SuppressWarnings("unused") @SuppressWarnings("unused")
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 java.util.HashMap; private volatile Map<String, Object> convertedAttributes; if (convertedAttributes == null) { Map<String, Object> orgMap = capability.getPropertiesAsMap(); HashMap<String, Object> converted = new HashMap<String, Object>(orgMap.size()); for...
0
throw new IllegalStateException(e.getTargetException().getMessage());
0
import org.apache.hadoop.conf.Configuration; Configuration conf = job.getConfiguration(); AccumuloInputFormat.setInputInfo(conf, "root", "".getBytes(), "testtable1", new Authorizations()); AccumuloInputFormat.setMockInstance(conf, "testmrinstance"); AccumuloOutputFormat.setOutputInfo(conf, "root", "".ge...
0
return (Map<String, ?>) getValue(root);
0
/* * Copyright (c) 1999 World Wide Web Consortium, * (Massachusetts Institute of Technology, Institut National de * Recherche en Informatique et en Automatique, Keio University). All * Rights Reserved. This program is distributed under the W3C's Software * Intellectual Property License. This program is distributed...
1
// old style stack map: unneeded for JDK5 and below; // illegal(?) for JDK6 and above. So just delete with a warning. System.err.println("Warning: Obsolete StackMap attribute ignored."); return new Unknown(name_index, length, file, constant_pool); ...
0
import java.util.concurrent.atomic.AtomicBoolean; boolean test = false; if (initNode instanceof Test) { startTimer(initNode.toString()); test = true; } if (test) stopTimer(initNode.toString()); test = false; if (nextNode instanceof Test) { startTimer(nex...
0
import org.apache.ambari.server.controller.MaintenanceStateHelper; MaintenanceStateHelper maintHelper = createNiceMock(MaintenanceStateHelper.class); expect(injector.getInstance(MaintenanceStateHelper.class)).andReturn(maintHelper); replay(maintHelper, injector, clusters, cluster, host, response); Maint...
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 org.apache.beam.sdk.extensions.sql.impl.rel;
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
props.setProperty("test.basedir", "core/target/test-data"); "smb://HOME\\vfsusr:vfs%2f%25\\te:st@172.16.110.129/vfsusr/vfstest"); "ftp://vfsusr:vfs%2f%25\\te:st@172.16.110.129/vfstest"); props.setProperty("test.http.uri", "http://172.16.110.129/vfstest"); "webdav://vfsusr:vfs%2f%25\\te:st@172.16.110.129...
0
Range range = new KeyExtent(tableId, null, null).toMetadataRange();
0
private List<FieldObserver> observers; observers = new ArrayList<FieldObserver>(); for (Iterator<FieldObserver> e = observers.iterator(); e.hasNext();) { e.next().notify(this);
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger LOG = LoggerFactory.getLogger(HeartbeatMonitor.class); LOG.debug("Sending exec command details for {}", component); return new StringBuilder().append("requiresExecCmdDetails: ").append(requiresExecCmdDetails).toString();
1
import org.apache.cocoon.spring.configurator.impl.AbstractElementParser;
0
JexlEvalContext env = new JexlEvalContext(); JexlContext ctxt = new ReadonlyContext(env, env); env.setStrict(true); env.setSilent(false); } } env.set("x", "fourty-two"); }
1
IntersectingIterator.setColumnFamilies(ii, columns);
0
updateClassLoader(); public static Main launch(String[] args) throws Exception { updateClassLoader(); Main main = new Main(args); main.launch(); return main; } private static void updateClassLoader() throws Exception { File home = Utils.getKarafHome(); ...
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
out.print("value of " + e.getParsedText() + " is : ", o, foo.convert(1)); out.print("value of " + e.getParsedText() + " is : ", o, foo.convert(1+7)); out.print("value of " + e.getParsedText() + " is : ", o, foo.convert(1+number.intValue()));
1
import org.apache.commons.digester3.Rule; import org.apache.commons.digester3.spi.RuleProvider; interface BackToLinkedRuleBuilder<R extends Rule> extends RuleProvider<R> {
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
0
"An arbitrary string of characters whose format is unspecified" + " and interpreted based on the context of the property to which it" + " applies.",
0
public static final StrictContentLengthStrategy INSTANCE = new StrictContentLengthStrategy();
0
import org.apache.sshd.common.util.buffer.BufferUtils; import org.bouncycastle.util.Arrays; private final byte[] id; public Handle(byte[] id) { // clone the original so the handle is imutable this.id = ValidateUtils.checkNotNullAndNotEmpty(id, "No handle ID", GenericUtils.EMPTY_...
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
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/observed/standard/Attic/StandardModificationListener.java,v 1.1 2003/09/03 23:54:26 scolebourne Exp $ package org.apache.commons.collections.observed.standard; * @version $Revisio...
0
* Copyright (c) OSGi Alliance (2001, 2015). All Rights Reserved. * @author $Id: 1de8679fcf7df57b019a93219f6b82222eb1525e $ * @deprecated * @deprecated * @deprecated * @deprecated public Bundle getBundle(Class<?> clazz);
1
package org.apache.aurora.scheduler.config.types; import org.apache.aurora.common.quantity.Amount; import org.apache.aurora.common.quantity.Time; public class TimeAmount extends Amount<Long, Time> { public TimeAmount(long number, Time unit) { super(number, unit, Long.MAX_VALUE); } @Override protected Long sc...
0
import org.apache.sshd.common.util.GenericUtils; } catch (RuntimeException e) { Throwable t = GenericUtils.peelException(e); Throwable err = null; if ((t instanceof IOException) || (t instanceof GeneralSecurityException)) { err = t; } else { ...
0
/** Returns {@code true} if the trigger is finished. */ /** Sets the fact that the trigger is finished. */ /** Sets the trigger and all of its subtriggers to unfinished. */ /** Create an independent copy of this mutable {@link FinishedTriggers}. */
1
import org.apache.beam.sdk.annotations.Experimental; /** * For a {@code SerializableFunction<InputT, OutputT>} {@code fn}, returns a {@code PTransform} * given by applying {@code fn.apply(v)} to the input {@code PCollection<InputT>}. * * <p>Allows users to define a concise composite transform using a Jav...
0
import org.apache.accumulo.core.security.Authorizations; checkSplits(REG_TABLE_NAME, NUM_PRE_SPLITS / 2, NUM_PRE_SPLITS * 2); Scanner scanner = getConnector().createScanner(table, Authorizations.EMPTY);
0
import org.apache.http.message.BufferedHeader; buffer.append("Cookie: "); return new Header[] { new BufferedHeader(buffer) };
0
package org.apache.ambari.common.rest.agent;
0
list.add("A Big String A Big String A Big String A Big String A Big String A Big String A Big String A Big String A Big String A Big String " + i++);
0
import org.apache.ambari.server.configuration.Configuration; Configuration _configuration = null; if(null == _configuration) _configuration = new Configuration(); String rollingUpgradeStack = _configuration.getRollingUpgradeStack(); // not applicable if not HDP 2.2.4.2 or later if (!ro...
0
import org.apache.http.annotation.GuardedBy; import org.apache.http.annotation.ThreadSafe;
0
public class Repartition<IN> extends ElementWiseOperator<IN, IN> public static class Builder1<IN> { public Builder2<IN> partitionBy(Partitioner<IN> partitioner) { public Repartition<IN> setNumPartitions(int partitions) { public static class Builder2<IN> { public Repartition<IN> setNumPartitions(int ...
0
throw new StorageResolverException(ex, "empty");
0
// empty
0
public void beforeClusterStart(MiniAccumuloConfigImpl cfg) { TableExistsException, TableNotFoundException, IOException { public void testUserOperationsAudits() throws AccumuloSecurityException, AccumuloException, TableExistsException, IOException { public void testImportExportOperationsAudits() throws...
0
private final ExtensionManager m_extensionManager; // This overrides BundleImpl.close() which avoids removing the // system bundle module from the resolver state. @Override void close() { }
1
beginRead(false); beginRead(false); protected void beginRead(boolean optimize) beginWrite(false); // this constructs the root node protected void beginWrite(boolean optimize) super.beginRead(false); super.beginWrite(false);
0
import org.apache.beam.sdk.runners.TransformHierarchy; public CompositeBehavior enterCompositeTransform(TransformHierarchy.Node node) { public void leaveCompositeTransform(TransformHierarchy.Node node) { public void visitPrimitiveTransform(TransformHierarchy.Node node) { public void visitValue(PValue value, Tra...
0