Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import com.google.common.collect.ImmutableList; taskGroups.taskChangedState(TaskStateChange.transition(copy, oldState)); final IScheduledTask a = makeTask("a", KILLED); final IScheduledTask b = makeTask("b", PENDING); store.getUnsafeTaskStore().saveTasks(ImmutableSet.of(a, b, c)); for (ISchedule...
0
private LONG_Upper() { public static LONG_Upper theInstance() {
0
private final InstructionFactory _factory; private final ConstantPoolGen _cp; private final ClassGen _cg;
0
protected final static int[] IDENTIFIER_START = { 0x0, 0x0, 0x7FFFFFE, 0x7FFFFFE }; // { 0x0, 0x0, 0x87FFFFFE, 0x7FFFFFE }; // For use with CSS 2.1 add '_' protected final static int[] NAME = { 0, 0x3FF2000, 0x07FFFFFE, 0x7FFFFFE }; // { 0, 0x3FF2000, 0x87FFFFFE, 0x7FFFFFE };// For use with CS...
0
StringBuilder buf = new StringBuilder(); StringBuilder args = new StringBuilder();
0
import java.util.HashMap; import java.util.Map; private final HashMap<String, String> cleanedDirectives; private final String filter; String f = requirement.getDirectives().get(Constants.FILTER_DIRECTIVE); if (f != null) { for (String ns : NamespaceTranslator.getTranslatedO...
0
syspkgs = ((pkgextra == null) || (pkgextra.trim().length() == 0)) ? syspkgs : syspkgs + "," + pkgextra; syscaps = ((capextra == null) || (capextra.trim().length() == 0)) ? syscaps : syscaps + "," + capextra;
0
* Change the durability for the BatchWriter session. The default durability is "default" which * public BatchWriterConfig setDurability(Durability durability) { return this;
0
return new Value(Long.toString(min).getBytes());
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/locale/LocaleConvertUtils.java,v 1.2 2002/12/07 23:34:41 craigmcc Exp $ * $Revision: 1.2 $ * $Date: 2002/12/07 23:34:41 $ * @return The FastHashMap instance contains the all {@l...
0
import java.nio.file.Files; import java.nio.file.Paths; import java.util.Objects; private static final JsonFactory JSON_FACTORY = Transport.getJsonFactory(); private final FakeDatasetService datasetService; throws IOException { throws IOException { public void startQueryJob(JobReference jobRef, JobCon...
0
bind(ClusterState.class).to(ClusterStateImpl.class); bind(ClusterStateImpl.class).in(Singleton.class);
0
for (int file_to_verify = start; file_to_verify < end; file_to_verify++) { String filename = filenames[file_to_verify]; //create a namespace context for use in the XPath expression below //retrieve the signature Element from the document //Creates a XMLSignature ...
0
import static org.junit.Assert.assertEquals; @Test public void testFromEndOfWindowToString() { Trigger trigger = AfterWatermark.pastEndOfWindow(); assertEquals("AfterWatermark.pastEndOfWindow()", trigger.toString()); } @Test public void testLateFiringsToString() { Trigger trigger = AfterWatermar...
0
if (getSaslParams() != null) {
0
import org.osgi.framework.ServiceRegistration; private ServiceRegistration mbean_sr=null; //this.registerToAgent(servicereference); //this.unRegisterFromAgent(); java.util.Properties p = new java.util.Properties(); p.put(org.apache.felix.mosgi.jmx.agent.Constants.OBJECTNAME, REMOTE_LOGGER...
0
import org.apache.hc.core5.annotation.Internal; @Internal
0
package org.apache.ambari.server.agent;
0
* or more contributor license agreements. See the NOTICE file * regarding copyright ownership. The ASF licenses this file * with the License. You may obtain a copy of the License at * KIND, either express or implied. See the License for the
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList;
0
package test; public class NoValidConstructor { String m_s; public NoValidConstructor(String s) { m_s = s; } public String getS() { return m_s; } }
0
final String s = eventType.toString();
0
} in.close(); }
0
Packages resourcePkgs = resourcePkgMap.get(resource); if (resourcePkgs != null) if (resourcePkgs.m_isCalculated) { return; } else { resourcePkgs.m_isCalculated = true; } resourcePkgs = resourc...
0
private int unnamedRepoId = 0; private String name; public String getName() { return name; } String temp = doc.getDocumentElement().getAttribute( "name" ); if ("".equals(temp)) { name = "repo-" + String.valueOf(unnamedRepoId++); } ...
0
* @param file
0
zipExtractor.addRule("**legacy/cocoon.xconf", new SingleFileDeployer("WEB-INF/cocoon")); zipExtractor.addRule("**legacy**.xconf", new SingleFileDeployer("WEB-INF/cocoon/xconf")); zipExtractor.addRule("**legacy**.xmap", new SingleFileDeployer("WEB-INF/cocoon/site...
0
* Copyright (c) 2002 The Apache Software Foundation. All rights
0
public void createResources(Request request) { //To change body of implemented methods use File | Settings | File Templates. } @Override public void updateResources(Request request, Predicate predicate) { //To change body of implemented methods use File | Settings | File Templates. } ...
0
import org.apache.commons.jexl2.Expression; import org.apache.commons.jexl2.JexlContext; import org.apache.commons.jexl2.JexlEngine; import org.apache.commons.jexl2.MapContext; import org.apache.commons.jexl2.parser.ParserTreeConstants; import org.apache.hadoop.io.Text; import org.apache.log4j.Level; import org.apache....
0
TreeMap<Key,Value> testData = new TreeMap<>(); TreeMap<Key,Value> expectedData = new TreeMap<>(); TreeMap<Key,Value> filteredData = new TreeMap<>(); TreeMap<Key,Value> testData = new TreeMap<>(); TreeMap<Key,Value> expectedData = new TreeMap<>(); TreeMap<Key,Value> filteredData = new Tre...
0
import com.google.common.collect.ImmutableMap; QuotaCheckResult quotaCheck = quotaManager.checkQuota( ImmutableMap.<ITaskConfig, Integer>of(), task, instances);
0
import java.util.Properties; ClientContext context = new ClientContext(instance, credentials, new Properties());
0
@Override @Override @Override @Override
0
import java.util.Map; import org.apache.sshd.common.channel.PtyChannelConfigurationHolder; public ChannelExec(String command, PtyChannelConfigurationHolder configHolder, Map<String, ?> env) { super(false, configHolder, env);
0
* A transaction consists of a number of operations. To use, first create a transaction id, and then * seed the transaction with an initial operation. An executor service can then execute the * transaction's operation, possibly pushing more operations onto the transaction as each step * successfully completes. If a ...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/xmlrules/FromXmlRuleSet.java,v 1.9 2003/10/09 21:09:48 rdonkin Exp $ * $Revision: 1.9 $ * $Date: 2003/10/09 21:09:48 $ * Alternately, this acknowledgement may appear in the softwar...
0
import java.util.List; private WrapFactory wrapFactory = new BatikWrapFactory(this); * Default Context for scripts. This is used only for efficiency * reason. */ protected Context defaultContext; /** * Context vector, to make sure we are not * setting the security context too many ...
1
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkNotNull; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions;
0
* Copyright 2001-2005 The Apache Software Foundation. * @version $Revision$ $Date$ } else if (index >= 0 && descriptor instanceof IndexedPropertyDescriptor) {
0
* A generic streamed entity being received on a connection. *
0
SortedSet<Attr> result = new TreeSet<>(COMPARE);
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
reader = new BufferedReader(new InputStreamReader(_input_, this.getCharsetName())); // Java 1.6 can use getCharset()
0
import org.apache.sshd.common.keyprovider.KeyPairProvider;
0
package org.apache.batik.css.engine; /** * An interface for {@link org.w3c.dom.css.CSSStyleDeclaration} objects to * expose their underlying {@link StyleDeclaration} objects storing the * properties. */ public interface StyleDeclarationProvider { /** * Returns the object storing the properties of this st...
0
* Apply options to this arithmetic which eventually may create another instance. * @see #createWithOptions(boolean, java.math.MathContext, int) * * @param context the context that may extend {@link JexlEngine.Options} to use * @return a new arithmetic instance or this */ public JexlAri...
0
import org.apache.bcel.Repository; import org.apache.bcel.classfile.JavaClass; import org.apache.bcel.classfile.Method; import org.apache.bcel.generic.ConstantPoolGen; import org.apache.bcel.generic.InstructionHandle; import org.apache.bcel.generic.InstructionList; import org.apache.bcel.generic.InstructionTargeter; im...
0
marshal(context.getParent(), context.getNextSibling(), DOMUtils.getSignaturePrefix(context), context); @Override public int hashCode() { assert false : "hashCode not designed"; return 42; // any arbitrary constant will do } @Override pub...
0
import com.google.common.collect.Iterables;
0
public final static String FACTORYSET = "ExtraFactoryServiceProperties.FACTORYSET"; public final static String ENSURE = "ExtraFactoryServiceProperties"; @Component(properties = {@Property(name = "foo", value = "bar")}, factorySet = FACTORYSET) @ServiceDependency(filter = "(" + Component.FACTORY_NAM...
0
import java.util.SortedMap; getMetadataClusterLevelParams(cl, stackId), null); getMetadataAmbariLevelParams(), getMetadataAgentConfigs()); getMetadataClusterLevelParams(cl, stackId), null); null, getMetadataAgentConfigs()); getMetadataClusterLevelConfigsParams...
0
/** * String representation of this file comparator. * * @return String representation of this file comparator */ public String toString() { return super.toString() + "[caseSensitivity=" + caseSensitivity + "]"; }
0
* Implements the part usable for all stream-based random access.
0
/** * Tries to determine whether the given class is part of the framework or not. * Framework classes include everything in org.apache.felix.framework.* and * org.osgi.framework.*. We also consider ClassLoader and Class to be internal * classes, because they are inserted into the stack trace as ...
0
import com.google.common.io.BaseEncoding; import java.nio.ByteBuffer; new TableFieldSchema().setName("sound").setType("BYTES").setMode("NULLABLE"), // Test type conversion for TIMESTAMP, INTEGER, BOOLEAN, BYTES, and FLOAT. byte[] soundBytes = "chirp,chirp".getBytes(); ByteBuffer soundByte...
0
@Property(name= "foo")
0
CacheConfiguration cacheConfiguration = createCacheConfiguration(); Cache cache = new Cache(cacheConfiguration); // Decorate with UpdatingSelfPopulatingCache timelineMetricsCache = new TimelineMetricCache(cache, cacheEntryFactory); LOG.info("Registering metrics cache with provider: name = " + ...
0
* @version $Id$
0
* the shard table (created by {@link Index}) using the {@link IntersectingIterator}. * See docs/examples/README.shard for instructions.
0
final ClassLoader origContextClassLoader = Thread.currentThread().getContextClassLoader(); final WeakReference<ClassLoader> ref = new WeakReference<ClassLoader>(componentLoader); final ClassLoader origContextClassLoader = Thread.currentThread().getContextClassLoader(); final ClassLoa...
0
package org.apache.accumulo.shell.commands; import org.apache.accumulo.shell.Shell;
0
// Compare module capabilities. // Compare package capabilities. else if ((c == 0) && cap1.getNamespace().equals(Capability.PACKAGE_NAMESPACE))
0
import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; * * @deprecated Use the OSGi annotations from org.osgi.service.component.annotations.* @Deprecated
0
private Map<String, HostGroup> hostGroups = new HashMap<>(); Collection<String> services = new HashSet<>(); Collection<String> components = new HashSet<>(); Collection<HostGroup> resultGroups = new HashSet<>(); Collection<HostGroup> resultGroups = new HashSet<>(); Map<String, Map<String, String>> ...
1
import org.apache.beam.runners.core.construction.ReadTranslation; abstract static class UnboundedSourceShard<T, CheckpointT extends CheckpointMark> implements SourceShard<T> { @Override public abstract UnboundedSource<T, CheckpointT> getSource(); static class InputProvider<T> implements RootInpu...
0
import static org.easymock.EasyMock.anyObject; import static org.easymock.EasyMock.expect;
0
import java.lang.reflect.InvocationTargetException; import org.apache.commons.jelly.JellyTagException; public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { try { Class theClass = getClassLoader().loadClass( className ); Object object = null; ...
0
package org.apache.atlas;
0
if (m_conditionInfos == null) { return true; }
0
@Override public void unableToMonitorLockNode(Throwable e) { System.exit(-1); }
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/Field.java,v 1.18 2003/06/08 06:03:16 dgraham Exp $ * $Revision: 1.18 $ * $Date: 2003/06/08 06:03:16 $ * @version $Revision: 1.18 $ $Date: 2003/06/08 06:03:16 $ * @return The ...
0
* @version CVS $Id$
0
List<AlertCurrentEntity> currentAlerts = new ArrayList<>();
1
* @version $Id$
0
* hdfs.getServiceComponent(DATANODE).addServiceComponentHost(DummyHostname1); hdfs.getServiceComponent(NAMENODE).addServiceComponentHost(DummyHostname1); hdfs.getServiceComponent(DATANODE).addServiceComponentHost(DummyHostname1); hdfs.getServiceComponent(NAMENODE).addServiceComponentHost(DummyHostnam...
0
import org.apache.sshd.common.Channel; import org.apache.sshd.common.RequestHandler; addRequestHandler(new ExitStatusChannelRequestHandler()); addRequestHandler(new ExitSignalChannelRequestHandler()); public Integer getExitStatus() { return exitStatus; } private class ExitStatusChan...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/map/TestFixedSizeSortedMap.java,v 1.1 2003/11/16 00:05:46 scolebourne Exp $ package org.apache.commons.collections.map; * @version $Revision: 1.1 $ $Date: 2003/11/16 00:05:46 $
0
// Non Rolling Upgrades require a group with name "UPDATE_DESIRED_REPOSITORY_ID". The Upgrade Pack is responsible for calling {@link org.apache.ambari.server.serveraction.upgrades.UpdateDesiredRepositoryAction}
0
* Copyright 1999-2005 The Apache Software Foundation. // Dispose the old processor, if any if (oldProcessor != null) { oldProcessor.markForDisposal(); }
0
public void setContentLengthLong(long len) { throw new UnsupportedOperationException(); }
0
List<Path> paths = new ArrayList<>(files.size());
0
* serialVersionUID format is YYYYMMDD for the data of the last binary change. */ private static final long serialVersionUID = 20101208L; /**
0
import java.util.Iterator; /** * Returns an iterator over the list. */ public Iterator iterator() { return list.iterator(); }
0
for (Capability cap : m_host.getCapabilities(namespace)) for (Capability cap : fragment.getCapabilities(namespace))
0
import org.apache.atlas.utils.AtlasEntityUtil; for (String attrName : entityType.getRelationshipAttributes().keySet()) { Object attrVal = entity.getRelationshipAttribute(attrName); String relationshipType = AtlasEntityUtil.getRelationshipType(attrVal); ...
0
private static Set<String> pkPropertyIds = new HashSet<>( Arrays.asList(ALERT_ID, ALERT_DEFINITION_NAME)); private static final Set<String> PROPERTY_IDS = new HashSet<>(); private static final Map<Resource.Type, String> KEY_PROPERTY_IDS = new HashMap<>(); Set<Resource> results = new LinkedHashSet<>();
1
* a known prefix to the results of another {@code KeyHashingScheme}.
0
import java.io.InputStream; * @version CVS $Id$ /* (non-Javadoc) * @see org.apache.cocoon.environment.Request#getInputStream() */ public InputStream getInputStream() throws UnsupportedOperationException { throw new UnsupportedOperationException(); }
0
return ((hosts != null) && (hosts.size() > 0)) ? hosts.toArray(new Bundle[hosts.size()]) : null;
0
* Returns total capacity of the buffer * * @return total capacity */ int capacity(); /** * Returns available space in the buffer. * * @return available space. */ int available(); /**
0
public int isNodeInclude(Node n) { if ((n==exclude)) return -1; if ((n==exclude) || XMLUtils.isDescendantOrSelf(exclude,n)) return -1; return 1; //return !XMLUtils.isDescendantOrSelf(exclude,n);
0
private CacheKeyGenerator extractor; extractor = new CacheKeyGenerator();
0
public boolean accept(final File file) { public boolean accept(final File dir, final String name) {
1
private final int proxyPort;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/log/src/java/org/apache/commons/jelly/tags/log/WarnTag.java,v 1.2 2003/01/25 18:02:25 morgand Exp $ * $Revision: 1.2 $ * $Date: 2003/01/25 18:02:25 $ * $Id: WarnTag.java,v 1.2 2003/01/25 18:02:25 morgand Exp $ im...
0
package aQute.libg.xslt; import java.io.*; import java.net.*; import java.util.*; import java.util.concurrent.*; import javax.xml.transform.*; import javax.xml.transform.stream.*; public class Transform { static TransformerFactory transformerFactory = TransformerFactory ...
0
public TemporaryFolder tmpDir = new TemporaryFolder(new File(System.getProperty("user.dir") + "/target")); EasyMock.expect(mockService.<Integer>submit(EasyMock.anyObject(Callable.class))) EasyMock.expect(mockService.shutdownNow()).andReturn(Collections.<Runnable>emptyList()).once();
0
import org.apache.ambari.server.controller.RootComponent; import org.apache.ambari.server.controller.RootService; : RootComponent.AMBARI_SERVER.name(); null, KerberosHelper.AMBARI_SERVER_HOST_NAME, ambariServerHostID(), RootService.AMBARI.name(), componentName, kerberosConfigurations, cu...
0
.append(": ").println(e.getMessage());
0