Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
predefinedSinkFactories.put("IsmSink", IsmSinkFactory.class.getName()); @SuppressWarnings("unchecked")
0
/** * Tests setting an attribute on the root element. */ public void testSetRootAttribute() throws ConfigurationException { conf.setProperty("[@test]", "true"); assertEquals("Root attribute not set", "true", conf .getString("[@test]")); conf.save(testSaveCon...
0
* Copyright (c) 2002 The Apache Software Foundation. All rights
0
if(entry == null) { MiniC.addError(name.getLine(), name.getColumn(), "Applying unknown function " + fname + "."); } else { if(!(entry instanceof Function)) { MiniC.addError(name.getLine(), name.getColumn(), "Applying non-function " + fname + "."); } else {...
0
@Test /** * Make sure global mapping is avaliable when global.xml is * in the path. * @throws Exception */ public void testGlobalMapping() throws Exception { ServiceInfo sinfo = metaInfo.getServiceInfo("HDP", "0.2", "HDFS"); List<PropertyInfo> pinfo = sinfo.getProperties(); /**...
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
package org.apache.bcel.classfile;
1
customizerRef.set( customizer );
0
this(NanoClock.SYSTEM, Sleeper.DEFAULT, additionalIgnoredResponseCodes, RetryHttpRequestInitializer(
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 ...
0
} catch (ClosedChannelException ex) { throw new LogClosedException(); try { key.write(encryptingLogFile); value.write(encryptingLogFile); encryptingLogFile.flush(); } catch (ClosedChannelException e) { throw new LogClosedException(); }
0
public static Attribute readAttribute(DataInputStream file,
0
package org.apache.beam.runners.flink.translation.wrappers.streaming.io;
0
private Signature signatureAlgorithm = null; for (i = rLength; i > 0 && asn1Bytes[4 + rLength - i] == 0; i--); j > 0 && asn1Bytes[6 + rLength + sLength - j] == 0; j--); if (asn1Bytes[0] != 48 || asn1Bytes[1] != asn1Bytes.length - 2 || asn1Bytes[2] != 2 || i > 20 |...
0
@Description("Batch interval for Spark streaming in milliseconds.") @Default.Long(1000) Long getBatchIntervalMillis(); void setBatchIntervalMillis(Long batchInterval);
0
private SystemReduceFn.Factory<K, InputT, OutputT, W> reduceFnFactory; SystemReduceFn.Factory<K, InputT, OutputT, W> reduceFnFactory) { this.reduceFnFactory = reduceFnFactory; droppedDueToClosedWindow, droppedDueToLateness, reduceFnFactory.create(key));
0
import static java.util.Objects.requireNonNull; this.dir = requireNonNull(dir); this.interval = requireNonNull(interval); this.delegate = requireNonNull(delegate); this.clock = requireNonNull(clock); this.config = requireNonNull(config);
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterables;
0
* @version $Id$
0
* @since 2.0
0
* @throws ConversionException if conversion cannot be performed
0
import org.apache.xml.security.utils.XMLUtils; super(doc); super(doc); XMLUtils.addReturnToElement(this._constructionElement); XMLUtils.addReturnToElement(this._constructionElement); super(element, BaseURI); public String getBaseLocalName() { return EncryptionConstants._TAG_CIPHE...
0
MergeState newState = stats.nextMergeState(connector, state); // now we should be ready to merge but, we have an inconsistent !METADATA table Assert.assertEquals(MergeState.WAITING_FOR_OFFLINE, stats.nextMergeState(connector, state)); Assert.assertEquals(MergeState.WAITING_FOR_CHOPPED, stats.nextMergeSt...
0
// Staged files need to be set before initializing the execution environments // Transform replacements need to receive the finalized PipelineOptions // including execution mode (batch/streaming) and parallelism. pipeline.replaceAll(FlinkTransformOverrides.getDefaultOverrides(options));
0
public static final String STRING_UTF8_CODER_URN = getUrn(StandardCoders.Enum.STRING_UTF8); STRING_UTF8_CODER_URN,
0
org.apache.ambari.server.configuration.Configuration serverConfig = BlueprintImplTest.setupConfigurationWithGPLLicense(true); replay(blueprint, stack, group1, group2, dependency1, serverConfig); org.apache.ambari.server.configuration.Configuration serverConfig = BlueprintImplTest.setupConfi...
0
try (AccumuloClient client = opts.createClient()) { Scanner scanner = client.createScanner(opts.getTableName(), opts.auths); scanner.setBatchSize(scanOpts.scanBatchSize); Range range = new Range(new Text("start:" + Long.toHexString(startTime)), new Text("start:" + Long.toHexString(endTim...
0
if (hostConfigMappingByHost.containsKey(hostEntity.getHostId())) {
0
import org.apache.commons.configuration2.ImmutableConfiguration; * Definition of an interface for objects that can create {@link ImmutableConfiguration} * or {@link org.apache.commons.configuration2.Configuration Configuration} objects of a * specific type. * This interface defines an abstract way of creating a {@c...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/ValidatorResults.java,v 1.6 2003/05/24 19:48:03 dgraham Exp $ * $Revision: 1.6 $ * $Date: 2003/05/24 19:48:03 $ * @version $Revision: 1.6 $ $Date: 2003/05/24 19:48:03 $ this.add(...
0
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
0
import org.apache.sshd.common.io.AbstractIoServiceFactory; public class MinaServiceFactory extends AbstractIoServiceFactory { public MinaServiceFactory(FactoryManager factoryManager, ExecutorService service, boolean shutdownOnExit) { super(factoryManager, service == null ? ThreadUtils.newCache...
0
import org.apache.accumulo.server.tablets.TabletTime; import org.apache.accumulo.server.util.MasterMetadataUtil; import org.apache.accumulo.tserver.TabletServer; MasterMetadataUtil.addNewTablet(low, "/lowDir", instance, lowDatafileSizes, bulkFiles, SystemCredentials.get(), TabletTime.LOGICAL_TIME_ID + "0", -1l,
1
private static final String BRANDING_PROPERTIES = "/META-INF/webconsole.properties"; //$NON-NLS-1$ brandName = props.getProperty( "webconsole.brand.name", "Apache Felix Web Console" ); //$NON-NLS-1$ productName = props.getProperty( "webconsole.product.name", "Apache Felix" ); //$NON-NLS-1$ p...
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
public class CSSOMDirectAdjacentSelector extends AbstractSiblingSelector { public CSSOMDirectAdjacentSelector(short type, Selector parent, super(type, parent, simple); return ((ExtendedSelector)getSelector()).match((Element)n, ((ExtendedSelector)getSiblingSelector()...
0
private final static String MOCKS_DIR = "src/test/mocks"; private final static String OUTPUT_DIR = "target/test"; return new File(getMockDirectory(), artifact); } public File getMockDirectory() { return new File(basedir, MOCKS_DIR);
0
package org.apache.accumulo.test.randomwalk.unit; import org.apache.accumulo.test.randomwalk.State; import org.apache.accumulo.test.randomwalk.Test;
0
* @param cause the {@code Throwable} that caused this exception, or {@code null}
0
this(username, new MockAccumulo(MockInstance.getDefaultFileSystem()), instance);
0
bcfr.close();
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.annotations.VisibleForTesting;
0
} else { LOG.info("Kill request for task in state " + task.getScheduleStatus() + " ignored.");
0
* http://www.apache.org/licenses/LICENSE-2.0
0
if (!shellState.getConnector().instanceOperations().testClassLoad(classname, SortedKeyValueIterator.class.getName())) throw new ShellCommandException(ErrorCode.INITIALIZATION_FAILURE, "Servers are unable to load " + classname + " as type " + SortedKeyValueIterator.class.getName()); if (group...
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
import com.twitter.mesos.scheduler.Query; import com.twitter.mesos.scheduler.TaskStore.TaskState; import java.util.Set; Multimap<String, TaskState> userJobs = HashMultimap.create(); Set<TaskState> tasks = scheduler.getTasks(Query.GET_ALL); for (TaskState state : tasks) { User user = us...
0
* @version $Revision$ $Date$
0
import aQute.service.reporter.*;
0
if (host.trim().length() == 0) { if (path.trim().length() != 0) { buffer.append('['); buffer.append(':'); buffer.append(']');
0
private static int javaVersion; javaVersion = 7; if (parts.length > 0) { try { final int majorVersion = Integer.parseInt(parts[0]); if (majorVersion > 1) { javaVersion = majorVersion; } else if (majorVersion == 1 && part...
0
* Duplicated to avoid dependency on beam-examlpes.
0
@Parameter(names = "--isolate", description = "true to turn on scan isolation, false to turn off. default is false.") @Parameter(names = "--scan-batch-size", description = "scanner batch size")
0
package com.twitter.mesos.scheduler; import org.apache.mesos.Protos.CommandInfo; import org.apache.mesos.Protos.CommandInfo.URI; import org.junit.Test; import static org.junit.Assert.assertEquals; public class CommandUtilTest { @Test public void testUriBasename() { test("c", "c"); test("c", "/a/b/c"); ...
0
* Conditionally insert row into table if it does not already exist * * @param tableName * @param columnNames * @param values * @param ignoreFailure * @return * @throws SQLException */ boolean insertRowIfMissing(String tableName, String[] columnNames, String[] values, boolean ignoreFailure) ...
0
FileSystem fs = FileSystem.getLocal(cluster.getServerContext().getHadoopConf());
0
void data(final int pByte) throws IOException {} void data(final byte[] pBuffer, final int pOffset, final int pLength) throws IOException {} void error(final IOException pException) throws IOException { throw pException; } public ObservableInputStream(final InputStream pProxy) { public v...
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
public String getSourceName() { return "SlingFilter"; } @Override
0
import java.util.Optional; import org.apache.ambari.server.state.ServiceInfo; * @return an optional ServiceInfo of the given serviceName or Optional.empty() if the service doesn't exist in the stack */ public Optional<ServiceInfo> getServiceInfo(String serviceName) { try { return Optional.of(controlle...
0
List<ConfigurationNode> nds = config.getExpressionEngine().query(config.getRootNode(),
0
@Override @Override @Override
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
* @since 4.0
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
* @version CVS $Id: RepeaterJXPathBindingBuilder.java,v 1.11 2004/02/03 12:26:21 joerg Exp $ extends JXPathBindingBuilderBase { CommonAttributes commonAtts = JXPathBindingBuilderBase.getCommonAttributes(bindingElm);
0
/* * Copyright 1999-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
import java.io.IOException; import java.util.List; import org.apache.avalon.framework.service.ServiceManager; /** Our ServiceManager */ private ServiceManager manager; SitemapExecutor sitemapExecutor) { public void setProcessorData(ServiceManager manager, ProcessingNo...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/observed/standard/Attic/StandardPostModificationEvent.java,v 1.3 2003/09/07 10:33:33 scolebourne Exp $ * @version $Revision: 1.3 $ $Date: 2003/09/07 10:33:33 $ * @param obsCo...
0
* threads will continue this process indefinitely. If <expectError> is true, exactly 1/2 of the * threads are expected to either throw exceptions or fail to complete. If <expectError> is false,
0
protected final long heartbeatReplyMaxWait; heartbeatReplyMaxWait = this.getLongProperty( ClientFactoryManager.HEARTBEAT_REPLY_WAIT, ClientFactoryManager.DEFAULT_HEARTBEAT_REPLY_WAIT); protected boolean sendHeartBeat() { boolean withReply = heartbeatReplyMaxWait > 0L; ...
0
public Collection<KeyPair> loadKeyPairs( NamedResource resourceKey, PuttyKeyReader pubReader, PuttyKeyReader prvReader) throws IOException, GeneralSecurityException {
0
import org.apache.http.client.CredentialsStore; * Implementation of {@link CredentialsStore} backed by standard public class SystemDefaultCredentialsProvider implements CredentialsStore {
0
tds.setDefaultMaxWaitMillis((int)(getMaxWaitMillis())); ((SharedPoolDataSource)ds).setDefaultMaxWaitMillis(maxWaitMillis); ((SharedPoolDataSource) ds).setDefaultMaxWaitMillis(defaultMaxWaitMillis); ((SharedPoolDataSource) ds).setDefaultMaxWaitMillis(defaultMaxWaitMillis); tds.set...
0
package org.apache.beam.sdk.extensions.euphoria.core.client.util; import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience; import static java.util.Objects.requireNonNull;
0
final String uriPrefix = uri.substring(0, uri.lastIndexOf("/") + 1);
0
import java.util.Collection; import java.util.HashMap; import java.util.Map; @Override public Map<String, HttpCacheEntry> getEntries(final Collection<String> keys) throws ResourceIOException { Args.notNull(keys, "Key"); final Map<String, HttpCacheEntry> resultMap = new HashMap<>(keys.size()); ...
0
import cz.seznam.euphoria.shaded.guava.com.google.common.base.Preconditions;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/MultipleConfigFilesTest.java,v 1.6 2003/08/12 00:29:34 dgraham Exp $ * $Revision: 1.6 $ * $Date: 2003/08/12 00:29:34 $ import org.xml.sax.SAXException; protected void setUp() th...
0
* Copyright (c) 2004 The Apache Software Foundation. All rights
0
final List<Header> newWarningHeaders = new ArrayList<>(); final List<Header> newHeaders = new ArrayList<>();
0
this.artifactServerFactory = artifactServerFactory;
0
import org.apache.accumulo.master.tableOps.deprecated.BulkImport; if (error == null || !fs.exists(new Path(error, BulkImport.FAILURES_TXT)))
0
public class ShieldingServletFilter implements Filter {
0
import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertFalse; import static junit.framework.Assert.assertNotNull; import static junit.framework.Assert.assertNull; import static junit.framework.Assert.assertTrue; import static junit.framework.Assert.fail; import static org.easymock...
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.apache.sshd.common.FactoryManager; import org.apache.sshd.common.PropertyResolverUtils; AbstractAgentProxy rtn = new AbstractAgentProxy() { rtn.setChannelType(PropertyResolverUtils.getString(getSession(), FactoryManager.AGENT_FORWARDING_TYPE)); return rtn;
0
import com.fasterxml.jackson.core.type.TypeReference; import java.util.Map; import org.apache.beam.sdk.testutils.TestResult; public class NexmarkPerf implements TestResult { @Override public Map<String, Object> toMap() { return NexmarkUtils.MAPPER.convertValue(this, new TypeReference<Map<String, Object>>() {}...
0
* http://www.apache.org/licenses/LICENSE-2.0
0
public static <K, V> MultiKeyMap<K, V> multiKeyMap(AbstractHashedMap<MultiKey<? extends K>, V> map) { * {@link #multiKeyMap(AbstractHashedMap)}.
0
public enum SCOPE {
0
* Key used to configure the timeout used when receiving a close request * on a channel to wait until the command cleanly exits after setting * an EOF on the input stream. In milliseconds. */ public static final String COMMAND_EXIT_TIMEOUT = "command-exit-timeout"; /**
0
import java.util.Arrays; import org.junit.Before; import org.junit.Test;
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
final HttpAsyncRequestHandler<Object> requestHandler = getRequestHandler(request, context); private HttpAsyncRequestHandler<Object> getRequestHandler(final HttpRequest request, final HttpContext context) { handler = (HttpAsyncRequestHandler<Object>) this.handlerMapper.lookup(request, context);
0
* @version CVS $Id: JSPEngineImplWLS.java,v 1.5 2004/01/19 14:55:58 joerg Exp $ * @param url * @param servletRequest * @param servletResponse * @param servletContext
0
import org.apache.batik.gvt.GraphicsNodeRenderContext; /* * The GraphicsNodeRenderContext which this event dispatcher uses for * context-dependent dispatches (such as TextNode hit testing). */ protected GraphicsNodeRenderContext nodeRenderContext = null; public ConcreteEventDispatcher(Graphi...
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
* * * // Package private: outside this package, use Location.UNKNOWN. static final LocationImpl UNKNOWN = new LocationImpl(null, null, -1, -1); * * * * * * * * Location other = (Location) obj; return this.line == other.getLineNumber() &...
0
* */ private static final long serialVersionUID = 1L;
1