Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
* @version $Id$
0
* NOTE: * Modifying the decorated list directly would results in influencing the outcome * of method calls on this object. For example, the bounds of this list would reflect * a newly added object to the underlying list. * <p>
0
* Signals that the connection has been shut down or released back to the *
0
for (Object o : cssNavigableDocumentListeners.keySet()) { (CSSNavigableDocumentListener) o; for (Object o : cssNavigableDocumentListeners.keySet()) { (CSSNavigableDocumentListener) o; for (Object o : cssNavigableDocumentListeners.keySet()) { ...
0
import java.io.StringWriter; import java.util.Properties; import org.apache.excalibur.source.Source; import org.apache.cocoon.ProcessingException; import org.apache.cocoon.components.source.SourceUtil; import org.apache.cocoon.util.AbstractLogEnabled; import org.apache.cocoon.util.TraxErrorHandler; import org.apache....
0
expect(clusterTopology.getConfigRecommendationStrategy()).andReturn(ConfigRecommendationStrategy.ONLY_STACK_DEFAULTS_APPLY); expect(clusterTopology.getConfigRecommendationStrategy()).andReturn(ConfigRecommendationStrategy.ONLY_STACK_DEFAULTS_APPLY);
0
return NamedResource.findByName(name, String.CASE_INSENSITIVE_ORDER, VALUES);
0
* Creates a new sequence. The given byte array is used directly as the backing array, so later * changes made to the array reflect into the new sequence. * Creates a new sequence from a subsequence of the given byte array. The given byte array is used * directly as the backing array, so later changes made t...
0
transform.validate(input); @Deprecated @Deprecated
0
long newSize = block.tryRecordSize(size); if (newSize >= 0 && newSize > acceptableSize() && !evictionInProgress) {
0
public static void test() {
0
private static final Set<String> propertyIds = Sets.newHashSet( private static final Map<Resource.Type, String> keyPropertyIds = ImmutableMap.<Resource.Type, String>builder()
0
final FileItemStream item = iter.next(); // Don't use getName() here to prevent an InvalidFileNameException. final String fileName = ((org.apache.commons.fileupload.FileUploadBase.FileItemIteratorImpl.FileItemStreamImpl) item).name; fileName); ...
0
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
0
import org.apache.mina.core.future.IoFuture; import org.apache.sshd.common.Closeable; import org.apache.sshd.common.future.DefaultCloseFuture; import org.apache.sshd.common.util.CloseableUtils; public class MinaSession extends CloseableUtils.AbstractInnerCloseable implements IoSession { @Override protected Clos...
0
if (stateToHosts.containsKey(RepositoryVersionState.INSTALL_FAILED) && !stateToHosts.get(RepositoryVersionState.INSTALL_FAILED).isEmpty()) { // Installation failed on some host(s). But // cluster version state should transition to Install Failed only after // all hosts have finished installa...
0
* @version $Revision: 1.2 $ $Date: 2004/11/08 21:07:44 $ Capability.URI, Capability.COMPRESS
0
* <p> * NOTE: in the original {@link Map} interface, {@link Map#put(Object, Object)} is known * to have the same return type as {@link Map#get(Object)}, namely {@code V}. {@link Put} * makes no assumptions in this regard (there is no association with, nor even knowledge * of, a "reading" interface) and thus define...
0
* @version $Id: TestXMLConfiguration.java,v 1.16 2004/12/23 18:42:25 oheger Exp $ conf = new XMLConfiguration(); conf.setFile(new File(testProperties)); conf.load(); assertNull(key, conf.getProperty(key)); assertNull(key, conf.getProperty(key)); assertNull(key, conf.getP...
0
import org.apache.commons.io.IOUtils; IOUtils.closeQuietly( ins ); // return new String(IOUtils.toCharArray(resource, "ISO-8859-1")); // the method below is faster that the one above return new String(IOUtils.toByteArray(resource), "ISO-8859-1"); IOUti...
0
import org.apache.accumulo.core.cli.ClientOnDefaultTable; public Configuration conf = null; public FileSystem fs = null;
0
import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Map; import static org.apache.felix.ipojo.bnd.Manifests.hasEmbedComponents; private static final String PROPERTY_INCLUDE_EMBED_BUNDLES = "include-embed-bundles"; private static final boolean DEFAULT_INCLUDE_EMBED_BUNDLES ...
0
import org.apache.felix.http.base.internal.service.HttpServiceFactory; final String sessionId = contextId == null ? String.valueOf(HttpServiceFactory.HTTP_SERVICE_CONTEXT_SERVICE_ID) : String.valueOf(contextId); this.sessionId = contextId == null ? String.valueOf(HttpServiceFactory.HTTP_SERVICE_CONTEXT_...
0
import org.apache.ambari.server.state.StackId; public static StackAdvisorRequestBuilder forStack(StackId stackId) { return forStack(stackId.getStackName(), stackId.getStackVersion()); }
0
* @param dict : dictionary of properties to add
0
+ entry.getValue() + ")"); throw new Exception("ERROR : expected value " + expected + " saw " + v);
0
import java.util.HashMap; import java.util.Map; private String four; public String getFour() { return four; } public void setFour(String four) { this.four = four; } public void testMapColumnToPropertiesWithOverrides() throws Exception { Map...
0
/** * Creates a {@link DBObject} with the given role and name. * * @param roleName the name of the role to serialize, cannot be <code>null</code> or empty (unchecked!); * @param type the type of the role to serialize. * @return a {@link DBObject} representing the role with the given name...
0
* http://www.apache.org/licenses/LICENSE-2.0
0
* @version $Id$
1
import java.io.Closeable; import org.apache.http.HttpConnection; import org.apache.http.protocol.HttpExpectationVerifier; * <tt>HttpAsyncService</tt> is a fully asynchronous HTTP server side protocol * handler based on the non-blocking (NIO) I/O model. * <tt>HttpAsyncServerProtocolHandler</tt> translates individual...
0
import com.google.common.base.Optional; import com.twitter.mesos.gen.storage.JobUpdateConfiguration; assertFalse(store.fetchQuota("jane").isPresent()); assertEquals(Optional.of(quota), store.fetchQuota("jane")); assertEquals(Optional.of(quota2), store.fetchQuota("jane")); assertFalse(store.fetchQuota("j...
0
// Futures ignored as exceptions will be flushed out in the commitTxn // Exceptions arising from the cache cleanup are ignored
0
import java.io.IOException; throws MalformedURLException, IOException {
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
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.accumulo.core.iterators.LongCombiner.FixedLenEncoder; import org.apache.accumulo.core.iterators.LongCombiner.VarLenEncoder; Encoder<Long> encoder = LongCombiner.VAR_LEN_ENCODER; Encoder<Long> encoder = LongCombiner.VAR_LEN_ENCODER; LongCombiner.setEncodingType(is, VarLenEncoder.class); ...
0
import java.lang.annotation.*; * The class value(s) of the property. * This attribute should not be used in combination with any of the other * value attributes or the type attribute. * @since 1.5 */ Class<?>[] classValue() default {}; /**
0
final boolean isBlueprintInstall = isBlueprintInstall(commandParamsInp); if (isBlueprintInstall) { LOG.info("AmbariManagementControllerImpl.createHostAction: Blueprint install detected, forcing refresh of all configuration types"); } scHost.getServiceComponentName()).getExecutionCommand(isBluep...
0
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.MapUtils; supportAggregates(timelineMetric) private boolean supportAggregates(TimelineMetric metric) { return MapUtils.isEmpty(metric.getMetadata()) || !(String.valueOf(true).equals(metric.getMetadata().get("...
0
import org.apache.hc.core5.http.config.H1Config; final H1Config constraints,
1
private String componentName; @JsonProperty("componentName") public String getComponentName() { return componentName; } @JsonProperty("componentName") public void setComponentName(String componentName) { this.componentName = componentName; }
1
* * * * * * * * * * * *
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
super.addScanIterator(new IteratorSetting(Integer.MAX_VALUE, BatchDeleter.class.getName() + ".NOVALUE", SortedKeyIterator.class));
0
throw new IllegalStateException( "When finalizing a windowed write, should have set fixed sharding");
0
final BranchHandle bh = bh_list; final int x = bi.updatePosition(offset, max_offset);
1
* The JAVA JCE DSA Signature algorithm creates ASN.1 encoded (r, s) value * The JAVA JCE DSA Signature algorithm creates ASN.1 encoded (r, s) value
0
// Need to normalize the log file from LogEntry logs.put(new Path(log).toString(), logEntry.extent.getTableId().toString());
0
byte buf[] = new byte[4 * 1024]; return baos.toByteArray();
0
import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.apache.xml.security.samples.DSNamespaceContext; XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); xpath.setNamespaceContext(new DSNamespaceContext(...
0
Class<?> safeModeAction; safeModeAction = Class.forName("org.apache.hadoop.hdfs.protocol.HdfsConstants$SafeModeAction"); safeModeAction = Class.forName("org.apache.hadoop.hdfs.protocol.FSConstants$SafeModeAction");
0
* @version CVS $Id: FragmentExtractorTransformer.java,v 1.8 2003/11/24 19:31:55 joerg Exp $ * @return "1" * @return NOPValidity object * - if the input is valid the output is valid as well.
0
import org.apache.ambari.server.utils.StageUtils; String hostname = record.get(KerberosIdentityDataFileReader.HOSTNAME); if(KerberosHelper.AMBARI_SERVER_HOST_NAME.equals(hostname)) { // Replace KerberosHelper.AMBARI_SERVER_HOST_NAME with the actual hostname where the Ambari // serve...
0
import java.util.Arrays; public void testParameterAnnotations() { Method method = null; try { method = this.clazz.getMethod("doSomethingWithParams", new Class[] {String.class, String.class, String.class}); } catch (Exception e) { fail("Cannot find the doSomethingWithP...
0
items.put(id.toLowerCase(Locale.ROOT), item);
0
FileSystem fs = FileSystem.getLocal(conf); FileSystem fs = FileSystem.getLocal(conf);
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/plugins/PluginRules.java,v 1.7 2003/11/18 22:32:16 rdonkin Exp $ * $Revision: 1.7 $ * $Date: 2003/11/18 22:32:16 $ * @param pattern Nesting pattern to be matched for this Rule. ...
0
* @version $Revision$
0
@Override
0
"signature.Canonicalizer.UnknownCanonicalizer", exArgs, e
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/NonSerializableLongListList.java,v 1.3 2003/11/07 20:07:50 rwaldhoff Exp $ * * @deprecated This code has been moved to Jakarta Commons Primitives (http...
0
MyBean mb = converter.convert(m).targetAsBean().to(MyBean.class);
0
import org.apache.avalon.framework.activity.Disposable; public final class StringTemplateParserVariableResolver extends VariableResolver implements Disposable { public void dispose() { //nothing to do }
0
/** * Cleans up any state maintained by this {@link TransformEvaluatorFactory}. Called after a * {@link Pipeline} is shut down. No more calls to * {@link #forApplication(AppliedPTransform, CommittedBundle, EvaluationContext)} will be made * after a call to {@link #cleanup()}. */ void cleanup() throw...
0
* limitations under the License.
0
package org.apache.hc.core5.http.nio;
1
* Copyright (c) OSGi Alliance (2012, 2017). All Rights Reserved.
0
} Header lastModified = cacheEntry.getFirstHeader(HeaderConstants.LAST_MODIFIED); if (lastModified != null) {
0
private final JexlEngine jexl; public static final boolean canRun = comSunToolsJavacMain(); /** * Check if we can invoke Sun's java compiler. * @return true if it is possible, false otherwise */ private static boolean comSunToolsJavacMain() { try { Class<?> javac = Cla...
0
import java.util.Collection; import java.util.Collections; import org.apache.sshd.common.config.keys.KeyUtils; import org.apache.sshd.common.util.GenericUtils; * Checks against a {@link Collection} of {@link PublicKey}s */ public static class KeySetPublickeyAuthenticator extends AbstractLoggingBean implem...
0
log.debug("Rebuilding dynamic classloader using files- {}", stringify(files)); log.error(e.getMessage(), e); log.error(e.getMessage(), ie); log.debug("monitoring {}", file); log.debug("{} created, recreating classloader", event.getFile().getURL().toString()); log.debug(...
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.NavigableMap; public static <T, K, U> NavigableMap<K, U> toSortedMap( public static <T, K, U> Collector<T, ?, NavigableMap<K, U>> toSortedMap( public static <V extends Comparable<V>> NavigableSet<V> asSortedSet(V... values) { public static <V extends Comparable<V>> NavigableSet<V> asSor...
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
@Contract(threading = ThreadingBehavior.STATELESS)
0
public IOSession create(final String route, final IOSession session) throws IOException { final ConnectingIOReactor ioreactor, final int defaultMaxPerRoute, final int maxTotal) {
0
import org.apache.cocoon.portal.util.ReferenceFieldHandler; * This is a component that converts the profiles (= object tree) to XML and vice-versa * using Castor. * * In order to work properly the methods provided by this interface require some * parameters: * objectmap : containing a map of objects for resolvi...
0
final Integer one = Integer.valueOf(1); final Integer one = Integer.valueOf(1); final Integer two = Integer.valueOf(2); final Integer one = Integer.valueOf(1); final Integer one = Integer.valueOf(1);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/observed/Attic/TestObservedList.java,v 1.1 2003/09/03 23:54:25 scolebourne Exp $ package org.apache.commons.collections.observed; * @version $Revision: 1.1 $ $Date: 2003/09/03 23:...
0
try (BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream); new UnsyncBufferedOutputStream(digestOutputStream)) {
0
Number get();
0
public class ManifestParserTest extends TestCase { public void testIdentityCapabilityMinimal() throws BundleException { public void testIdentityCapabilityFull() throws BundleException { private BundleCapability findCapability(Collection<BundleCapability> capabilities, String namespace) { ...
0
private <W extends Window<W>, T> Iterable<W> assignWindows(Windowing<T, W> windowing,
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Charsets;
0
* Contains various authentication data. * Represents a user authentication item. /** * Creates a new Type * * @param type the type */ /** * Creates a new uninitialized instance. */ // do nothing * Sets a data to this collection. * Gets a...
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 by...
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
class RecoveryException extends RuntimeException { public RecoveryException(String message) { public RecoveryException(String message, Throwable cause) {
0
import org.apache.batik.gvt.renderer.Renderer; import org.apache.batik.gvt.renderer.RendererFactory; RendererFactory rendFactory = new StaticRendererFactory(); GraphicsNodeRenderContext rc = rendFactory.getRenderContext(); // <!> FIX ME ctx = null; builder = null; // create the...
0
import static org.apache.beam.dsls.sql.BeamSqlEnv.planner; import static org.apache.beam.dsls.sql.BeamSqlEnv.registerTable; private static class QueryTransform extends PTransform<PCollectionTuple, PCollection<BeamSqlRow>> { registerTable(sourceTag.getId(), new BeamPCollectionTable(sourceSt...
0
import org.apache.accumulo.core.client.impl.ClientContext; public ClientContext getClientContext() { return new ClientContext(getClientInfo()); }
0
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import org.apache.commons.configuration2.ex.ConfigurationException; import org.junit.Before; import org.junit.Test; import org.yaml.snakeyaml.Yaml;
0
return attributes != null && attributes.getLength() != 0;
0
CopyUtils.copy(in, out);
0
* @version $Id$
0
import org.apache.sshd.client.session.ClientSession;
0
import org.apache.felix.http.base.internal.runtime.HandlerRuntime; public synchronized List<HandlerRuntime> getRuntime() { List<HandlerRuntime> handlerRuntimes = new ArrayList<HandlerRuntime>(); for (PerContextHandlerRegistry contextRegistry : this.registrations) { handlerRu...
0
package org.apache.commons.digester3; import org.apache.commons.digester3.Digester; import org.apache.commons.digester3.ObjectParamRule;
1
* @param name file name * @param file file name
0