Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
int bands = dstOut.getNumBands();
int y, i, b, val, max;
for (y = y0; y<y1; y++) {
for (i=0; i<srcPix.length; i++) {
max=0;
for (b=1; b<bands; b++, i++) {
val =(int)((kk1*srcPix[i]*dstPix[i]) +
... | 0 |
import static org.junit.Assert.assertEquals;
import org.junit.Test;
@Test
@Test | 1 |
.withFinalDelay(Duration.ofSeconds(2)); | 0 |
import org.apache.sshd.common.session.SessionContext;
protected KeyPair reloadClientIdentity(SessionContext session, Path path) throws IOException, GeneralSecurityException {
return super.reloadClientIdentity(session, path);
KeyPair actualIdentity = provider.getClientIdentity(null); | 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 |
public static final String VIEWINSTANCE_TABLE = "viewinstance";
public static final String SHORT_URL_COLUMN = "short_url";
updateViewInstanceEntityTable();
}
private void updateViewInstanceEntityTable() throws SQLException {
dbAccessor.addColumn(VIEWINSTANCE_TABLE,
new DBColumnInfo(SHORT_U... | 0 |
import java.util.Locale;
paramName = paramName.toLowerCase(Locale.ENGLISH); | 0 |
* @version $Revision: 1.18 $
if (opt.hasArg()) | 0 |
import java.io.DataInput;
* Initialize instance from input data.
* @param input input stream
ConstantMethodref(DataInput input) throws IOException {
super(Constants.CONSTANT_Methodref, input); | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.annotations.VisibleForTesting; | 0 |
import org.testng.annotations.AfterTest;
import static org.apache.atlas.repository.impexp.ZipFileResourceTestUtils.getDefaultImportRequest;
import static org.apache.atlas.repository.impexp.ZipFileResourceTestUtils.getZipSource;
import static org.apache.atlas.repository.impexp.ZipFileResourceTestUtils.loadModelFromJson;... | 0 |
import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
private static final Resources REZ =
ResourceManager.getPackageResources( AbstractFileSystem.class );
private FileObject parentLayer;
final FileName root... | 0 |
FileSKVWriter writer = FileOperations.getInstance().openWriter(tempFile.toString(), fs, defaultConf, null, AccumuloConfiguration.getDefaultConfiguration()); | 1 |
buffer = session.createBuffer(SshConstants.SSH_MSG_USERAUTH_BANNER);
buffer = session.createBuffer(SshConstants.SSH_MSG_USERAUTH_SUCCESS);
buffer = session.createBuffer(SshConstants.SSH_MSG_USERAUTH_FAILURE);
buffer = session.createBuffer(SshConstants.SSH_... | 0 |
return "Metadata Tablets"; | 0 |
public synchronized boolean isParameterSetLocally(final String name) {
public synchronized void clear() { | 0 |
import org.apache.accumulo.fate.zookeeper.ZooCache; | 0 |
package org.apache.felix.sigil.common.junit.server.impl;
import org.apache.felix.sigil.common.junit.server.JUnitService; | 0 |
return RowHelper.ShortCoder.of();
return RowHelper.FloatCoder.of();
return RowHelper.DoubleCoder.of();
return RowHelper.BooleanCoder.of();
return RowHelper.TimeCoder.of();
return RowHelper.DateCoder.of();
return RowHelper.DateCoder.of(); | 0 |
if (isKnopflerfish()) { | 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 |
+ " [-w password] [-c cipherlist] [-m maclist] hostname/user@host"); | 0 |
import org.apache.accumulo.fate.zookeeper.ZooLock;
import org.apache.accumulo.fate.zookeeper.ZooUtil; | 0 |
import org.apache.http.impl.io.HttpTransportMetricsImpl;
final HttpTransportMetricsImpl metrics,
super(channel, buffer, metrics);
if (bytesRead > 0) {
this.metrics.incrementBytesTransferred(bytesRead);
}
if (bytesRead > 0) {
this.me... | 0 |
import org.apache.hc.core5.http.HeaderElements;
import org.apache.hc.core5.util.Args;
expectContinue = expect != null && HeaderElements.CONTINUE.equalsIgnoreCase(expect.getValue()); | 0 |
import org.apache.commons.jexl3.JexlException;
public Object invoke(Object o, Object... args) throws IllegalAccessException, InvocationTargetException {
} catch (InvocationTargetException xinvoke) {
throw JexlException.tryFailed(xinvoke); // throw | 0 |
import org.apache.log4j.Logger;
private static final Logger LOG = Logger.getLogger(QuorumTest.class);
LOG.warn("Setup finished");
LOG.warn("creating QuorumPeer 1");
LOG.warn("creating QuorumPeer 2");
LOG.warn("creating QuorumPeer 3");
LOG.warn("creating QuorumPeer 4");
... | 0 |
public void testOnlySensitivePropertiesExtractedFromCredentialProvider()
throws SecurityException, NoSuchMethodException {
SiteConfiguration siteCfg = EasyMock.createMockBuilder(SiteConfiguration.class)
.addMockedMethod("getHadoopConfiguration").createMock();
// site-cfg.jceks={'ignored.property... | 0 |
case KILLING: | 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.sshd.util.EchoShell;
sshd = Utils.setupTestServer();
client = Utils.setupTestClient();
TestEchoShell.latch = new CountDownLatch(1);
assertTrue("Session latch not signalled in time", latch.await(1L, TimeUnit.SECONDS));
assertTrue("Shell latch not signalled in tim... | 0 |
package org.apache.hc.core5.concurrent; | 1 |
* @version $Revision$ $Date$ | 0 |
public final void addProperty(String key, Object value)
addPropertyInternal(key, value);
* Actually adds a property to this configuration. This method is called by
* {@code addProperty()}. It performs list splitting if necessary and
* delegates to {@link #addPropertyDirect(String, Object)... | 0 |
Utils.unreserveTable(cloneInfo.srcTableId, tid, false);
Utils.unreserveTable(cloneInfo.tableId, tid, true);
Utils.unreserveTable(cloneInfo.tableId, tid, true);
public CloneTable(String user, String srcTableId, String tableName, Map<String,String> propertiesToSet, Set<String> propertiesToExclude) {
Ins... | 0 |
*
*
*
* @version $Revision: 1.4 $
| 1 |
public void clear() {
this.properties.clear();
} | 0 |
* @author Gary D. Gregory
* @version $Id: Shell.java,v 1.5 2003/11/28 17:27:16 ggregory Exp $
/**
* Does a 'cd' command.
* If the taget directory does not exist, a message is printed to <code>System.err</code>.
*/
private void cd(final String[] cmd) throws Exception {
if (cmd.length >... | 0 |
* @version $Id$ | 0 |
* @version CVS $Id: ParserTransformerTestCase.java,v 1.3 2003/04/17 07:36:25 stephan Exp $
/*public void testParserTransformer3() {
}*/ | 0 |
Vector<URL> results = new Vector<>(); | 0 |
public class TestProtocolRequirements extends AbstractProtocolTest { | 0 |
@SuppressWarnings("OctalInteger") | 0 |
if (null == method)
{
c = sb.charAt(2);
if (Character.isLowerCase(c)) {
sb.setCharAt(2, Character.toUpperCase(c));
} else {
sb.setCharAt(2, Character.toLowerCase(c));
}
metho... | 0 |
import org.apache.accumulo.core.iterators.user.RegExFilter;
IteratorSetting more = new IteratorSetting(20 + i, "ii" + i, RegExFilter.class);
RegExFilter.setRegexs(more, null, null, null, "(^|(.*\\s))" + words[i] + "($|(\\s.*))", false); | 0 |
import org.apache.accumulo.core.client.Accumulo;
try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) {
try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) { | 0 |
if (!sourceIter.hasTop()) | 0 |
import org.apache.sshd.common.channel.ChannelHolder;
public interface SubsystemClient
extends SessionHolder<ClientSession>,
ClientSessionHolder,
NamedResource,
ChannelHolder,
Channel { | 0 |
* @version $Id: SoundexTest.java,v 1.20 2004/10/08 22:56:22 ggregory Exp $
return new TestSuite(SoundexTest.class); | 0 |
import org.apache.commons.net.io.CopyStreamEvent;
Util.copyStream(local, output, Util.DEFAULT_COPY_BUFFER_SIZE,
CopyStreamEvent.UNKNOWN_STREAM_SIZE, null,
false);
Util.copyStream(input, local, Util.DEFAULT_COPY_BUFFER_SIZE,
... | 0 |
public boolean isValid(final int timeoutSeconds) throws SQLException {
return connection.isValid(timeoutSeconds); | 0 |
import org.apache.sshd.common.NamedResource;
SessionContext session, NamedResource resourceKey,
SessionContext session, NamedResource resourceKey,
public List<KeyPair> extractKeyPairs(NamedResource resourceKey, Collection<? extends Subkey> subKeys)
public PublicKey extractPublicKey(Named... | 0 |
import org.apache.hc.core5.http.HttpResponse;
import org.apache.hc.core5.http.HttpStatus;
import org.apache.hc.core5.http.HttpVersion;
import org.apache.hc.core5.http.message.BasicHttpResponse; | 0 |
package org.apache.ambari.server.audit.request.eventcreator; | 1 |
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> | 0 |
AtlasSearchResult searchResult = atlasClientV2.dslSearch(dslQuery);
AtlasSearchResult searchResult = atlasClientV2.dslSearch(dslQuery);
searchResult = atlasClientV2.dslSearchWithParams(dslQuery, 10, 0);
searchResult = atlasClientV2.dslSearchWithParams(dslQuery, -1, -1);
searchRes... | 0 |
public class HostTest {
registerHost(host, true);
}
private void registerHost(Host host, boolean firstReg) throws Exception {
if (!firstReg) {
Assert.assertTrue(host.isPersisted());
}
Host host = clusters.getHost("foo");
host.setIPv4("ipv4");
host.setIPv6("ipv6");
registerHost(ho... | 0 |
Mockito.any(String.class))) | 0 |
String propsPath = getPropertiesPath();
siteConfig = (propsPath == null ? SiteConfiguration.fromEnv()
: SiteConfiguration.fromFile(new File(propsPath))).withOverrides(getOverrides()).build(); | 0 |
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.commons.vfs;
/**
* A {@link FileSelector... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/core/ExprTag.java,v 1.9 2002/06/11 21:41:11 jstrachan Exp $
* $Revision: 1.9 $
* $Date: 2002/06/11 21:41:11 $
* $Id: ExprTag.java,v 1.9 2002/06/11 21:41:11 jstrachan Exp $
* @tag out... | 0 |
protected final Logger log = Logger.getLogger(this.getClass());
public abstract void setUp(State state) throws Exception;
public abstract void tearDown(State state) throws Exception; | 1 |
* A {@link StreamObserver} which uses synchronization on the underlying {@link CallStreamObserver}
* to provide thread safety.
* which waits for advancement of the phase if the {@link CallStreamObserver} is not ready. Creator
* is expected to advance the {@link Phaser} whenever the underlying {@link CallStreamObser... | 1 |
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
* @version $Id: GenericProxyGenerator.java,v 1.2 2003/09/04 09:38:37 cziegeler Exp $
public class GenericProxyGenerator extends ServiceableGenerator {
public void service(ServiceManager manager) ... | 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 |
StringBuilder buffer = new StringBuilder(); | 0 |
* Empty constructor needed for Instruction.readInstruction.
* Not to be used otherwise. | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger log = LoggerFactory.getLogger(BloomFilter.class); | 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/ConnectionTag.java,v 1.2 2003/01/26 06:24:47 morgand Exp $
* $Revision: 1.2 $
* $Date: 2003/01/26 06:24:47 $
* $Id: ConnectionTag.java,v 1.2 2003/01/26 06:24:47 morg... | 0 |
/*
*
public static HandlerFactory[] getHandlerFactories(BundleContext bc) {
ServiceReference[] refs;
try {
refs = bc.getServiceReferences(HandlerFactory.class.getName(), null);
if (refs == null) {
System.err.println("Cannot get the handler factories");
... | 0 |
import org.apache.beam.sdk.loadtests.metrics.ByteMonitor;
pipeline.apply("Read input", SyntheticBoundedIO.readFrom(sourceOptions));
input = input.apply("Collect start time metrics (input)", ParDo.of(runtimeMonitor));
applyStepIfPresent(input, "Synthetic step for input", syntheticStep);
pipeline.... | 0 |
* Copyright 2000-2009 The Apache Software Foundation | 0 |
protected void setParameters(HttpUrlMethod method) {
((UrlPostMethod) method).addParameter(parameter); | 0 |
@org.apache.felix.ipojo.handlers.event.Publisher(name="p2", synchronous=false, topics="foo,bar", dataKey="data")
@Subscriber(name="s1", dataKey="data")
@Subscriber(name="s3", topics="foo", dataKey="data", dataType="java.lang.String")
| 0 |
// Ignore trailing whitespace.
for (int ch = lexer.get(); ch != EOF; ch = lexer.get())
if (!Character.isWhitespace(ch))
{
throw new ParseException(
"expected <EOF>; found '" + ((char) ch) + "'");
} | 0 |
input -> {
Iterator<KV<String, Long>> inputIterator = input.iterator();
// first element
long count0 = inputIterator.next().getValue();
// window duration is 6 and batch size is 5, so there should be 2 elements in the
// window (flush bec... | 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 |
@Category({ValidatesRunner.class})
@Category({ValidatesRunner.class})
@Category({ValidatesRunner.class, UsesFailureMessage.class})
@Category({ValidatesRunner.class, UsesFailureMessage.class}) | 0 |
TraceWrap.service(new MasterReplicationCoordinator(this)));
| 0 |
* Standard and common HTTP cookie management policies. | 0 |
public Class<?>[] getExceptions() {
Class<?>[] cs = new Class[1 + ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length]; | 0 |
ErrorContainer<T> errorContainer,
boolean skipInvalidRows,
boolean ignoreUnknownValues) | 0 |
* Copyright 2003-2005 The Apache Software Foundation | 0 |
import java.util.Set; | 0 |
import org.apache.accumulo.core.client.sample.RowSampler;
import org.apache.accumulo.core.client.sample.Sampler; | 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.atlas.model.legacy.EntityResult;
import org.apache.atlas.typesystem.types.*;
import org.springframework.stereotype.Component;
import java.util.Set;
@Component
final Set<TypesChangeListener> typesChangeListeners,
final Set<EntityChange... | 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 |
void setParams(HttpParams params); | 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 |
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 |
/**
* 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 |
serviceRequests.add(new ServiceRequest(clusterName, service, stackId.getStackId(),
repositoryVersion, null, credentialStoreEnabled)); | 0 |
if (!StatusUtil.isSafeForRemoval(pendingReplica.getValue())) { | 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. | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/AbstractListIntList.java,v 1.2 2003/08/31 17:21:17 scolebourne Exp $
* any, must include the following acknowledgement:
* Alternately, this acknow... | 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 |
entity.setSource("{\"type\" : \"METRIC\"}"); | 0 |
int DEFAULT_BACKLOG = 0; | 1 |
import org.apache.zookeeper.metrics.Counter;
public class SimpleCounter extends Metric
implements Counter {
public long get() {
m.put(name, this.get()); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.