Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
type = FileType.IMAGINARY;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/Var.java,v 1.8 2003/08/21 21:43:06 rleland Exp $ * $Revision: 1.8 $ * $Date: 2003/08/21 21:43:06 $ * A variable that can be associated with a <code>Field</code> for * passing in i...
1
/** * Pool entry containing a connection object along with its route information. * * @param <T> route * @param <C> connection * * @since 4.2 */
0
/* * Copyright 2005 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...
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
* @author Enver Haase
0
assertEquals("Check - 1", prim.getFloat(), 1.1f, 0); assertEquals("Check - 2", prim.getFloat(), 2.2f, 0); assertEquals("Check - 1", prim.getDouble(), 1.1, 0); assertEquals("Check - 2", prim.getDouble(), 2.2, 0);
0
package org.apache.felix.dm.test.components;
0
import java.sql.SQLException; import org.apache.ambari.server.H2DatabaseCleaner; H2DatabaseCleaner.resetSequences(injector); public void tearDown() throws AmbariException, SQLException { H2DatabaseCleaner.clearDatabaseAndStopPersistenceService(injector);
0
import org.apache.hc.client5.http.classic.ExecChain;
0
* @param commandline the commandline * @throws Exception on exception * @return PrintStream the console print stream * @param name the name * @return Object * @return Object * @param target the target * @param level the level * @return CharSequence * @param type the typ...
0
public interface SourceOptions { public interface TableOptions { public interface ColumnOptions { ColumnOptions fetchFiles(); ColumnOptions fetchLoaded(); ColumnOptions fetchLocation(); ColumnOptions fetchPrev(); ColumnOptions fetchLast(); Iterable<TabletMetadata> build()
0
if (log.isTraceEnabled()) log.trace("Using existing connection to " + entry.getKey().getLocation() + ":" + entry.getKey().getPort()); if (log.isTraceEnabled()) log.trace("Using existing connection to " + cacheKey.getLocation() + ":" + cacheKey.getPort()); if (log....
1
* @version $Id: FTPParseTestFramework.java,v 1.2 2002/08/06 20:32:04 brekke Exp $ private FTPFileEntryParser parser = null; public FTPParseTestFramework(String name) public void testBadListing() throws Exception String[] badsamples = getBadListing(); for (int i = 0; i < badsamples.length...
0
import javax.annotation.Nullable; @Nullable void setGcsUploadBufferSizeBytes(@Nullable Integer bytes);
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
* Copyright 2003-2005 The Apache Software Foundation public boolean canProcess(final WriteableCommandLine commandLine, final String arg) { return source.canProcess(commandLine, arg) || dest.canProcess(commandLine, arg);
0
/** Shared utility methods among operator translators. */ /** Transform input to KV elements. */ Coder<K> keyCoder, Coder<ValueT> valueCoder, String transformName) {
0
import org.apache.cocoon.portal.layout.LayoutFeatures; public class RemoveLayoutEvent public RemoveLayoutEvent(Layout target) { public RemoveLayoutEvent(PortalService service, String eventData) { this.target = LayoutFeatures.searchLayout(service, eventData.substring(1), rootLayout); ...
0
import com.twitter.common.stats.StatsProvider; import org.apache.aurora.scheduler.testing.FakeStatsProvider; bind(StatsProvider.class).toInstance(new FakeStatsProvider());
0
void deleteTypesDef(AtlasTypesDef atlasTypesDef) throws AtlasBaseException;
0
import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader; pluginClazz = AccumuloVFSClassLoader.loadClass(ent.getValue(), clazz);
1
* 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
import java.util.concurrent.atomic.AtomicBoolean; /** * An extension on ZooTraceClient which acts as a latch on updateHostsFromZooKeeper using the provided {@link AtomicBoolean} */ private static class UpdateHostsDelegate extends ZooTraceClient { private final AtomicBoolean done; private UpdateHosts...
0
Copyright 2000-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.concurrent.TimeUnit; * @Parameter(names = "--shardTable", required = true, description = "name of the shard table") @Parameter(names = "--doc2Term", required = true, description = "name of the doc2Term table") @Parameter(names = "--terms", required = true, description = "the number of ter...
0
if (b == (byte) TelnetCommand.IAC) { // cast is necessary because IAC is outside the signed byte range
0
"CREATE EXTERNAL TABLE tablename ( "
0
import org.apache.beam.sdk.values.PBegin; public static class Bound<T> extends PTransform<PBegin, PCollection<T>> { public PCollection<T> apply(PBegin input) {
0
* @version CVS $Id: CocoonServlet.java,v 1.21 2003/12/02 14:47:21 vgritsenko Exp $ // Pass uri into environment without URLDecoding, as it is already decoded. env = getEnvironment(uri, request, res);
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
package org.apache.commons.collections4.trie.analyzer; import org.apache.commons.collections4.trie.KeyAnalyzer; public class CharacterKeyAnalyzer extends KeyAnalyzer<Character> { /** A singleton instance of the {@link CharacterKeyAnalyzer}. */ /** The length of a {@link Character} in bits. */ /** A bit mas...
0
import org.apache.beam.runners.direct.DirectExecutionContext.DirectStepContext; import org.apache.beam.runners.direct.WatermarkManager.TimerUpdate; import org.apache.beam.runners.direct.WatermarkManager.TransformWatermarks; * This implementation is not thread safe. A new {@link DirectExecutionContext} must be created ...
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. * @version $Revision: 1.5 $ $Date: 2003/10/09 21:31:42 $
0
import org.apache.commons.digester3.Rule;
1
if (instanceName != null) { if (advertiseHost != null) { if (data.length != 0) {
0
import org.apache.beam.sdk.schemas.Schema.FieldType; private static final Map<FieldType, SerializableFunction<BigDecimal, ? extends Number>> .<FieldType, SerializableFunction<BigDecimal, ? extends Number>>builder() .put(FieldType.INT32, BigDecimal::intValue) .put(FieldType.INT16, BigDecimal::shortVa...
0
import org.apache.ambari.server.controller.RootComponent; if (cluster.getService(service) != null && !component.equals(RootComponent.AMBARI_SERVER.name())) {
0
package aQute.bnd.service; import java.util.*; import aQute.lib.osgi.*; public interface MakePlugin { /** * This plugin is called when Include-Resource detects a reference to a resource * that it can not find in the file system. * * @param builder The current builder * @param source ...
0
// DBCP-372. clearBatch with throw an exception if called when the // connection is marked as closed. if (batchAdded) { clearBatch(); }
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.commons.vfs2.provider.smb; import org.apache.commons.vfs2.FileSystemException; import org.apache.commons.vfs2.provider.AbstractRandomAccessContent; import org.apache.commons.vfs2.util.RandomAccessMode;
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 ...
0
.build(); .build(); .setPoolMaxTotal(8).build(); public DataSourceConfiguration withPoolMaxTotal(int poolMaxTotal) { return builder().setPoolMaxTotal(poolMaxTotal).build(); builder.add(DisplayData.item("poolMaxTotal", getPoolMaxTotal())); poolConfig.setBlo...
0
import java.net.Authenticator; import java.net.PasswordAuthentication; import com.google.inject.name.Named; /** * Sets up proxy authentication. This must be done before the server is * initialized since <code>AmbariMetaInfo</code> requires potential URL * lookups that may need the proxy. */ stati...
0
* {@code index &lt; 0 || index &gt;= size()}) * than {@code Integer.MAX_VALUE} elements, returns * {@code Integer.MAX_VALUE}. * if the {@code set} operation is not supported by this list * {@code index &lt; 0 || index &gt;= size()}) * if the ...
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 applicable law o...
0
* * @since 4.0
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/ConsumerTag.java,v 1.2 2003/10/09 21:21:20 rdonkin Exp $ * $Revision: 1.2 $ * $Date: 2003/10/09 21:21:20 $ * any, must include the following acknowledgement: * ...
0
/** * Create a cluster with a service, and verify that the request tasks have the correct output log and error log paths. */ public void testRequestStatusLogs() throws Exception { testCreateServiceComponentHostSimple(); String clusterName = "foo1"; String serviceName = "HDFS"; Cluster cluste...
1
if (heap != null) throw new IllegalStateException("heap already exist"); if (source.hasTop()) heap.add(new Index(source)); if (heap.size() > 0) currentIter = ((Index) heap.get()).iter; else currentIter = null;
1
private void killMacGc() throws ProcessNotFoundException, InterruptedException, KeeperException {
0
import org.apache.sshd.common.file.FileSystemFactory;
0
import java.nio.charset.StandardCharsets; try (InputStream is = new ByteArrayInputStream(SAMPLE_MSG.getBytes(StandardCharsets.UTF_8))) {
1
import org.apache.beam.sdk.transforms.OldDoFn; * new OldDoFn<KV<K, CoGbkResult>, T>() { * A OldDoFn to construct a UnionTable (i.e., a OldDoFn<KV<K, V>, KV<K, RawUnionValue>> { * A OldDoFn to construct a CoGbkResult from an input grouped union extends OldDoFn<KV<K, Iterable<RawUnionValue>>, ...
0
"Cluster100", "Service100", "Component100", "Component 100", "Host100", State.INSTALLED.toString(), stackId.getStackId(), State.STARTED.toString(), "Cluster100", "Service100", "Component101", "Component 101", "Host100", State.INSTALLED.toString(), stackId.getStackId(), State.STARTED.toString(), ...
0
match[i] = low + i;
0
if (iterators != null) { for (PIteratorSetting is : iterators) { result.add(getIteratorSetting(is)); } pscan.table = scan.getTable(); e.getTableId().toString(), e.getTableId().toString(), result.add(pcomp); public void securityOperations_changeUserAutho...
0
String WINDOW_SIZE = "window-size"; String WINDOW_TIMEOUT = "window-timeout"; String MAX_PACKET_SIZE = "packet-size"; String NIO_WORKERS = "nio-workers"; int DEFAULT_NIO_WORKERS = Runtime.getRuntime().availableProcessors() + 1; String AUTH_TIMEOUT = "auth-timeout"; String IDLE_TIMEOUT = "idl...
0
import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; public FileAlterationObserverTestCase() { @Test @Test @Test @Test @Test @Test @Test
0
this.getMappedSourceEnvironment().setOutputStream(out); return this.getPipeline().getMimeType(); return this.getPipeline().shouldSetContentLength(); // Should use SourceResolver and context of the this // components' sitemap, not caller sitemap EnvironmentHelper.enterEnvi...
0
import org.apache.beam.sdk.coders.ByteArrayCoder; * {@link PCollection PCollection&lt;KV&lt;byte[], Iterable&lt;Mutation&gt;&gt;&gt;}, where the * {@code byte[]} is the key of the row being mutated, and each {@link Mutation} represents an * PCollection<KV<byte[], Iterable<Mutation>>> data = ...; extends ...
0
private final static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(DigesterOutputStream.class);
0
try { return ApplicationProperties.getClass(DELETE_HANDLER_IMPLEMENTATION_PROPERTY, SoftDeleteHandler.class.getName(), DeleteHandler.class); } catch (AtlasException e) { throw new RuntimeException(e); }
0
import org.junit.Test; public PragmaTest() { super("PragmaTest"); @Test
0
public void testIsNotRevocable() {
0
import org.apache.atlas.repository.graph.GraphHelper; boolean ret = false; .has(Constants.GUID_PROPERTY_KEY, guid) .vertices().iterator(); AtlasVertex entityVertex = results.next(); List<St...
1
import org.apache.hc.client5.http.classic.methods.HttpGet; import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse; import org.apache.hc.client5.http.impl.classic.HttpClients;
0
Map<String, String> mockProperties = new HashMap<String, String>() {{ put("yarn.nodemanager.aux-services", "some_service"); }}; Config yarnConfig = EasyMock.createNiceMock(Config.class); expect(yarnConfig.getType()).andReturn("yarn-site").anyTimes(); expect(yarnConfig.getProperties()).andRetur...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/xml/src/java/org/apache/commons/jelly/tags/xml/AttributeTag.java,v 1.3 2003/10/09 21:21:26 rdonkin Exp $ * $Revision: 1.3 $ * $Date: 2003/10/09 21:21:26 $ * any, must include the following acknowledgement: * ...
0
if (g<0) g = 0; else if (g>fastGradientArraySize) g = fastGradientArraySize;
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
int initialSize = DomHelper.getAttributeAsInteger(repeaterElement, "initial-size", 0); RepeaterDefinition repeaterDefinition = new RepeaterDefinition(initialSize);
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
import java.io.IOException; import org.apache.accumulo.core.replication.ReplicationSchema.StatusSection; import org.apache.accumulo.core.replication.ReplicationTarget; import org.apache.hadoop.io.DataOutputBuffer; // Only pull records about data that has been ingested and is ready for replication StatusSect...
0
IZooReaderWriter writer = new ZooReaderWriterFactory() .getZooReaderWriter(cluster.getZooKeepers(), 30 * 1000, secret);
0
* distributed under the License is distributed on an "AS IS" BASIS, AmbariManagementController controller = createNiceMock(AmbariManagementController.class); expect(controller.getStackServices(anyObject())).andReturn(Collections.emptySet()).anyTimes(); expect(controller.getStackLevelConfigurations(anyObjec...
0
/* * Copyright 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 may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required ...
0
* @cocoon.sitemap.component.documentation
0
MASTER("Master"), ZOOKEEPER("ZooKeeper"), TABLET_SERVER("TServer"); private final String prettyPrint; public String prettyPrint() { return prettyPrint; } ServerType(String prettyPrint) { this.prettyPrint = prettyPrint; }
0
results = entity == null ? Collections.emptyList() :
0
ClusterControllerImpl controller = new ClusterControllerImpl(new TestProviderModule()); ClusterControllerImpl controller = new ClusterControllerImpl(new TestProviderModule()); ClusterControllerImpl controller = new ClusterControllerImpl(new TestProviderModule()); ClusterControllerImpl controller = new C...
0
import org.apache.commons.configuration.interpol.ConfigurationInterpolator; import org.apache.commons.lang.text.StrSubstitutor; /** The object for handling variable substitution in key patterns. */
0
@Override @Override @Override } else {
0
* @version $Id$
0
* @version $Id$
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/JellyException.java,v 1.13 2003/01/22 15:36:07 jstrachan Exp $ * $Revision: 1.13 $ * $Date: 2003/01/22 15:36:07 $ * $Id: JellyException.java,v 1.13 2003/01/22 15:36:07 jstrachan Exp $ * @v...
0
public void testNewStringNullInput() { Assert.assertNull(StringUtils.newString(null, "UNKNOWN")); } @Test
0
package org.apache.accumulo.test.randomwalk;
0
import org.apache.beam.sdk.util.NoopPathValidator; options.as(GcsOptions.class).setPathValidatorClass(NoopPathValidator.class);
0
/** {@code BeamSqlMathUnaryExpression} for 'DEGREES' function. */ @Override public BeamSqlPrimitive calculate(BeamSqlPrimitive op) { return BeamSqlPrimitive.of( SqlTypeName.DOUBLE, SqlFunctions.degrees(SqlFunctions.toDouble(op.getValue())));
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/antlr/src/java/org/apache/commons/jelly/tags/antlr/AntlrTagLibrary.java,v 1.2 2003/10/09 21:21:15 rdonkin Exp $ * $Revision: 1.2 $ * $Date: 2003/10/09 21:21:15 $ * any, must include the following acknowledgeme...
0
new HashSet<>(Arrays.asList(new String[]{ SERVICE_NAME_ID, COMPONENT_NAME_ID})); Set<Resource> resources = new HashSet<>(); List<DependencyInfo> dependencies = new ArrayList<>(); Collection<Resource> resources = new ArrayList<>();
1
* <p><code>get<strong>Property</strong>(String key)</code> and * <p><code>set<strong>Property</strong>(String key, Object value)</code>,
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/bag/UnmodifiableBag.java,v 1.3 2003/12/03 12:27:37 scolebourne Exp $ * @version $Revision: 1.3 $ $Date: 2003/12/03 12:27:37 $ public final class UnmodifiableBag extends AbstractBa...
0
System.setProperty("zookeeper.letAnySaslUserDoX","anyone"); zk = createClient(); try { zk.getData("/abc", null, null); Assert.fail("Should not be able to read data when not authenticated"); } catch (KeeperException.NoAuthException e) { // success } ...
0
// TODO(William Farner): Push lifecycle management into storage. WorkEntry(WorkCommand command, TaskStateMachine stateMachine, Closure<ScheduledTask> mutation) { final ScheduleStatus newState, final Optional<String> auditMessage) { return changeState(query, new Function<TaskStateMachine, Boolean>(...
0
import org.apache.commons.configuration.event.Event; import org.apache.commons.configuration.event.EventListener; import org.apache.commons.configuration.event.EventType; @Override public <T extends Event> void addEventListener(EventType<T> eventType, EventListener<? super T> listener) ...
0
public RenderedImage createRendering(RenderContext rc) {
0
private final byte[] inData = TestUtils.generateTestData(FILE_SIZE);
0