Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.http.entity.BufferedHttpEntity;
static JsonNode parseResponse(HttpEntity responseEntity) throws IOException {
return mapper.readValue(responseEntity.getContent(), JsonNode.class);
static void checkForErrors(HttpEntity responseEntity, int backendVersion) throws IOException {
JsonNode search... | 0 |
if (!"algorithms.HMACOutputLengthMin".equals(ex.getMsgID())) {
if (!"algorithms.HMACOutputLengthMin".equals(ex.getMsgID())) { | 0 |
final boolean valid = managedConn.isOpen();
} catch (final SocketException ex) { | 0 |
String page = req.getRequestURI();
String namespace = BasicServlet.getCookieValue(req, "namespaceDropdown." + BasicServlet.encode(page) + "." + BasicServlet.encode("tableList") + "."
+ "selected");
if (namespace == null) {
namespace = "*";
}
Tables.getNameToIdMap(Monitor.getContext(... | 0 |
/** flag if close should be propagated */ | 0 |
final List<MimeFileObject> vfs = new ArrayList<>(); | 0 |
/** TODO: complete javadoc. */ | 0 |
if (Shell.isDebuggingEnabled())
for (ConstraintViolationSummary cvs : e.getConstraintViolationSummaries())
log.trace(cvs.toString());
if (Shell.isDebuggingEnabled())
for (ConstraintViolationSummary cvs : e.getConstraintViolationSummaries())
log.trace(cvs... | 1 |
return ((Integer) item).intValue() < 0;
assertThat("Comparing " + phs[i].getPhonemeText() + " to " + phs[j].getPhonemeText() + " should be negative", Integer.valueOf(c), | 0 |
key = KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, KeyEvent.SHIFT_DOWN_MASK);
key = KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, KeyEvent.SHIFT_DOWN_MASK);
key = KeyStroke.getKeyStroke(KeyEvent.VK_UP, KeyEvent.SHIFT_DOWN_MASK);
key = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, KeyEvent.SHIFT_DOWN_... | 0 |
public final void consume(final ByteBuffer src) throws IOException { | 0 |
package org.apache.hc.client5.http.entity.mime; | 0 |
package org.apache.accumulo.start;
public class Platform {
public static void main(String[] args) {
System.out.println(getPlatform());
}
public static String getPlatform()
{
return (System.getProperty("os.name") + "-" +
System.getProperty("os.arch") + "-" +... | 1 |
// for (int i=0; i<newSize; i++) {
// System.err.println("GGIS["+i+"]: " + newGGIS[i].start + " -> " +
// newGGIS[i].end);
// } | 0 |
import org.apache.felix.sigil.eclipse.repository.ResolutionMonitorAdapter; | 0 |
Copyright 2000-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 l... | 0 |
import org.apache.http.util.Args;
Args.notNull(httphost, "HTTP host"); | 0 |
// int id = CompositeGraphicsNodeEvent.GRAPHICS_NODE_REMOVED;
// dispatchEvent(new CompositeGraphicsNodeEvent(this, id, oldNode));
// id = CompositeGraphicsNodeEvent.GRAPHICS_NODE_ADDED;
// dispatchEvent(new CompositeGraphicsNodeEvent(this, id, node));
// int id = CompositeGraphi... | 0 |
import org.apache.batik.util.CSSConstants; | 0 |
* <p></p>
* <p></p>
* <p></p>
* <p></p>
* <p></p> | 0 |
this.match = match.clone();
this.targets = targets.clone(); | 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... | 1 |
private XmlAttrStack xmlattrStack = new XmlAttrStack(false); | 0 |
package org.apache.beam.runners.dataflow;
import org.apache.beam.runners.dataflow.options.DataflowPipelineOptions;
import org.apache.beam.runners.dataflow.testing.TestDataflowPipelineOptions;
import org.apache.beam.runners.dataflow.util.MonitoringUtil; | 0 |
import org.apache.beam.sdk.extensions.sql.schema.BeamSqlRecordType;
import org.apache.beam.sdk.values.BeamRecord;
BeamSqlRecordType type = BeamSqlRecordType.create(fieldNames, fieldTypes);
BeamRecord row = new BeamRecord(type);
PCollection<BeamRecord> inputTable = PBegin.in(p).apply(Create.of(row)
.... | 0 |
* Provides a XML stream with embedded JSTL and XPath expression substitution
* access to data sent by Cocoon Flowscripts.
*
* Provides a XML stream with embedded JSTL and XPath expression substitution | 0 |
* @since Commons IO 1.1
* @since Commons IO 1.1
* @since Commons IO 1.1
* @since Commons IO 1.1
* @since Commons IO 1.1
* @since Commons IO 1.1
* @since Commons IO 1.1
* @since Commons IO 1.1
* @since Commons IO 1.1
* @since Commons IO 1.1
* @since Commons IO 1.1
... | 0 |
for (int i = 0; i < this.parts.size(); i++) {
final Part part = (Part) this.parts.get(i);
this.rootElementIndex = part.stripRootElement ? -1 : 0;
if (part.element != null) {
this.currentElement = part.element;
startElem(part.element);
... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/Attic/EnumerationIterator.java,v 1.5 2002/08/15 20:04:31 pjack Exp $
* $Revision: 1.5 $
* $Date: 2002/08/15 20:04:31 $
/**
* Constructs a new <Code>EnumerationIterator<... | 0 |
.addValues(inputRows.get(i).getInt32(0))
.addValues(inputRows.get(0).getInt32(0)) | 0 |
private final boolean eofOnClose;
public ChannelOutputStream(AbstractChannel channel, Window remoteWindow, Logger log, byte cmd, boolean eofOnClose) {
this(channel, remoteWindow, PropertyResolverUtils.getLongProperty(channel, WAIT_FOR_SPACE_TIMEOUT, DEFAULT_WAIT_FOR_SPACE_TIMEOUT), log, cmd, eofOnClose)... | 0 |
Copyright 2002-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 |
assertEquals("", conf.getProperty("test.comment"));
assertEquals("", property);
* Tests handling of empty elements.
*/
public void testEmptyElements() throws ConfigurationException
{
assertTrue(conf.containsKey("empty"));
assertEquals("", conf.getString("empty"));
... | 0 |
* @version $Id$
/**
* Tests the conversion of a configuration object to properties if scalar
* values are involved. This test is related to CONFIGURATION-432.
*/
public void testConfigurationToPropertiesScalarValue()
{
BaseConfiguration config = new BaseConfiguration();
conf... | 0 |
Object o1 = clazz1.getDeclaredConstructor().newInstance();
Object o2 = clazz2.getDeclaredConstructor().newInstance();
Object o1 = clazz1.getDeclaredConstructor().newInstance();
Object o2 = clazz2.getDeclaredConstructor().newInstance(); | 0 |
private TarArchiveEntry entry;
void setTarEntry(final TarArchiveEntry entry) | 0 |
return null; | 0 |
System.arraycopy(lmHash, 0, keyBytes, 0, 8);
Arrays.fill(keyBytes, 8, keyBytes.length, (byte)0xbd);
int lmRespOffset = 76; // allocate space for the version
if (sessionKeyLen != 0)
addULong(sessionKeyOffset);
else
... | 0 |
config.putAll(systemStoreConfig(options));
config.put(JobConfig.JOB_ID(), options.getJobInstance());
private static Map<String, String> systemStoreConfig(SamzaPipelineOptions options) {
ImmutableMap.Builder<String, String> configBuilder =
ImmutableMap.<String, String>builder()
.pu... | 0 |
import java.nio.charset.StandardCharsets;
byte[] keyBytes = "abcdefghijklmnopqrstuvwx".getBytes(StandardCharsets.US_ASCII);
byte[] keyBytes = "abcdefghijklmnopqrstuvwxyz012345".getBytes(StandardCharsets.US_ASCII);
byte[] keyBytes = "abcdefghijklmnopqrstuvwx".getBytes(StandardCharsets.US_ASCII);
... | 0 |
storage.prepare();
stateMachine.transition(State.STORAGE_PREPARED);
dieOnError(Closures.filter(NOT_DEAD, prepareStorage)),
dieOnError(Closures.filter(NOT_DEAD, handleLeading)),
dieOnError(Closures.filter(NOT_DEAD, handleRegistered)),
private Closure<Transition<State... | 0 |
range = range.clip(new Range(RootTable.EXTENT.getMetadataEntry(), false, null, true)); | 0 |
Iterator iter = interpreterMap.values().iterator();
while (iter.hasNext()) {
Interpreter interpreter = (Interpreter)iter.next();
interpreter.dispose();
}
interpreterMap.clear();
| 0 |
final private static int BATCH_WRITER_MAX_LATENCY = 5;
final private static long SCHEDULE_PERIOD = 1000;
final private static long SCHEDULE_DELAY = 1000;
writer = new AtomicReference<BatchWriter>(this.connector.createBatchWriter(table, new BatchWriterConfig().setMaxLatency(BATCH_WRITER_MAX_LATENCY, TimeUnit.S... | 0 |
* @version $Revision$ $Date$ | 0 |
values.put(CSS_MONOSPACE_VALUE, MONOSPACE_VALUE); | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* v... | 1 |
if (request.getServiceName() == null || request.getComponentName() == null) {
// Ignore the exception if either the service name or component name are not specified.
// This is an artifact of how we get host_components and can happen in the case where
// we get all ... | 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 ma... | 0 |
import org.apache.cocoon.core.container.spring.avalon.AvalonEnvironment;
import org.apache.cocoon.core.container.spring.avalon.ConfigurationInfo;
// create a minimal Avalon Context (TODO)
DefaultContext avalonContext = new DefaultContext();
// DefaultContext avalonContext = CoreUtil.createContext(this.setti... | 0 |
private int lastItemIndex = -1; | 0 |
* Gets a property of type {@link PropertyType#BYTES} or {@link PropertyType#MEMORY}, interpreting the value properly.
* @param property
* Property to get
* @throws IllegalArgumentException
* if the property is of the wrong type | 0 |
import java.util.Arrays;
System.arraycopy( wordMap, 0, ret, 0, ext );
Arrays.fill( ret, ext, sz, -1 );
float lineHeight = 1.0f; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/BasicVariables.java,v 1.5 2003/03/11 00:59:11 dmitri Exp $
* $Revision: 1.5 $
* $Date: 2003/03/11 00:59:11 $
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* @vers... | 0 |
import static org.junit.Assert.assertFalse;
@Test
public void testClusterRendererDefaults() throws Exception {
Renderer clusterBlueprintRenderer =
new ClusterBlueprintRenderer();
assertFalse("ClusterBlueprintRenderer should not require property provider input",
clusterBlueprintRenderer.requires... | 0 |
* Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
* The <code>getSession</code> methods are used to open a session on a specified
* subtree of the DMT. A typical way of usage:
*
* constants in {@link DmtSession}). This determines whether the session can run
* in parallel with other sessions, and t... | 0 |
import org.apache.beam.sdk.transforms.windowing.BoundedWindow;
public void processElement(ProcessContext c, BoundedWindow window) {
BeamSQLRow inputRecord = c.element();
List<Object> results = executor.execute(inputRecord);
outRow.updateWindowRange(inputRecord, window);
| 0 |
* Copyright 2001-2006 The Apache Software Foundation | 0 |
resource.getQuery().getInternalPredicate()); | 0 |
package org.apache.aurora.scheduler.events;
import org.aopalliance.intercept.MethodInterceptor;
import org.apache.aurora.scheduler.events.NotifyingSchedulingFilter.NotifyDelegate;
import org.apache.aurora.scheduler.events.PubsubEvent.EventSubscriber;
import org.apache.aurora.scheduler.events.PubsubEvent.Interceptors.S... | 0 |
import org.apache.ambari.server.security.AmbariEntryPoint;
import org.springframework.security.web.AuthenticationEntryPoint;
bind(AuthenticationEntryPoint.class).to(AmbariEntryPoint.class).in(Scopes.SINGLETON);
| 0 |
package org.apache.hc.core5.testing.nio; | 0 |
import static org.junit.jupiter.api.Assertions.assertNull;
@org.junit.jupiter.api.Test | 0 |
return new PortalObjects((PortalService) this.manager.lookup(org.apache.cocoon.portal.PortalService.class.getName())); | 0 |
@SuppressWarnings("deprecation")
org.apache.accumulo.core.client.Connector conn = accumulo.getConnector("root", "superSecret");
org.apache.accumulo.core.client.Connector uconn = accumulo.getConnector("user1", "pass1");
@SuppressWarnings("deprecation")
org.apache.accumulo.core.client.Connector conn = acc... | 0 |
import cz.seznam.euphoria.core.client.dataset.partitioning.Partitioning; | 0 |
* The <code>JAffineTransformChooser</code> is a pane that contains
* make up an <code>AffineTransform</code>
* The <code>AffineTransform</code> value represented by the
* configure an <code>AffineTransform</code> | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap; | 0 |
import org.apache.aurora.scheduler.storage.log.LogManager.DeduplicateSnapshots;
import static org.apache.aurora.scheduler.storage.log.LogManager.DeflateSnapshots;
import static org.apache.aurora.scheduler.storage.log.LogManager.LogEntryHashFunction;
import static org.apache.aurora.scheduler.storage.log.SnapshotDeduplic... | 0 |
public static final String ERR_URI_IMAGE_INVALID = "uri.image.invalid";
* The error code when the bridge tries to read an image and the image
* url can't be opened or the contents aren't usable.
* <pre>
* {0} = the uri
* {1} = the reason it can't be opened.
* </pre>
public static f... | 0 |
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("count", count).append("average", avg).append("minimum", min)
.append("maximum", max).toString(); | 0 |
StringBuilder buffer = new StringBuilder("AggregateAlertRecalculateEvent{"); | 0 |
package org.apache.accumulo.examples.shard;
import java.util.Collections;
import java.util.Map.Entry;
import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.client.BatchScanner;
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.IteratorSetting;
import org.apa... | 1 |
import org.apache.batik.gvt.text.GVTAttributedCharacterIterator;
import org.apache.batik.gvt.text.TextPaintInfo;
public static final
AttributedCharacterIterator.Attribute PAINT_INFO =
GVTAttributedCharacterIterator.TextAttribute.PAINT_INFO;
public void swapTextPaintInfo(TextPaintInfo newInfo, ... | 0 |
// backing VDF does not define the package version for any of the hosts, cannot install (allows a VDF with package-version)
for (Host host : hosts) {
if (StringUtils.isBlank(desiredVersionDefinition.getPackageVersion(host.getOsFamily()))) {
String msg = String.format("Ambari cannot install... | 0 |
import java.util.List;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;
import com.google.common.collect.ImmutableList;
import org.apache.aurora.scheduler.config.CliOptions;
import org.apache.aurora.scheduler.http.api.security.HttpSecurityModule.Options.HttpAuthenticationMechanism;
@Para... | 0 |
* Copyright (c) 2001-2004 The Apache Software Foundation. All rights | 0 |
import com.twitter.aurora.scheduler.configuration.ConfigurationManager.TaskDescriptionException;
// TODO(Bill Farner): Avoid using StateManagerImpl.
throws ScheduleException {
JobConfiguration job = parsedConfiguration.getJobConfig();
if (manager.receiveJob(parsedConfiguration)) {
public synchronize... | 0 |
* <p>A file system can also implement {@link VfsComponent}.
*
* Returns the root file of this file system.
void setAttribute( String attrName, Object value )
throws FileSystemException; | 0 |
import org.apache.commons.jxpath.NodeSet;
if (result instanceof NodeSet) {
return new ValueIterator(((NodeSet) result).getPointers().iterator());
}
if (result instanceof NodeSet) {
return new PointerIterator(((NodeSet) result).getPointers().iterator(),
... | 0 |
components.registerEnvironment(Environments.createDockerEnvironment("java"));
components.registerEnvironment(Environments.createDockerEnvironment("java"));
components.registerEnvironment(Environments.createDockerEnvironment("java"));
components.registerEnvironment(Environments.createDockerEnvironment("j... | 0 |
keyPoints.add(keyPointCoord);
ret[j] = (Float) keyPoints.get(j); | 0 |
ServiceDirectory serviceDirectory = new CommonServiceDirectory(serviceFolder.getPath()); | 0 |
@Override
@Override
@Override
@Override
@Override
@Override
public ServiceReference<?>[] getAllServiceReferences( String arg0, String arg1 )
@Override
@Override
@Override
@Override
@Override
@Override
@Override
public ServiceReference<?> getServiceReference( S... | 0 |
import com.google.cloud.dataflow.sdk.runners.inprocess.InMemoryWatermarkManager.TimerUpdate;
import com.google.cloud.dataflow.sdk.runners.inprocess.InMemoryWatermarkManager.TransformWatermarks; | 0 |
protected Class<?> getExpectedType() { | 0 |
* Since v4.1 only transformers which are considered to be safe are | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/comparators/BooleanComparator.java,v 1.5 2003/01/15 20:36:38 scolebourne Exp $
* @version $Revision: 1.5 $ $Date: 2003/01/15 20:36:38 $
*
* @param trueFirst when <code>... | 0 |
String CSS_LINE_HEIGHT_PROPERTY = "line-height"; | 0 |
* Stops the embedded Apache HTTP Server. | 0 |
protected void doParse() throws ParseException { | 0 |
resolveReferences();
resolveReferences();
resolveReferences();
resolveReferences();
resolveReferences();
resolveReferences();
resolveReferences();
resolveReferences();
resolveReferences();
At... | 0 |
* {@link org.apache.http.conn.scheme.LayeredSchemeSocketFactory} mockup implementation. | 0 |
.put(FINISHED, EnumSet.of(KILLED, FINISHED))
.put("status", scheduledTask.getStatus())
.put("statusTimestamp", Tasks.getLatestEvent(scheduledTask).getTimestamp())
if (scheduledTask.getStatus() == ScheduleStatus.PENDING) { | 0 |
statusBuf.append("'files':0,'total':0");
String command = WebConsoleUtil.getParameter(req, "command"); | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableSet; | 0 |
import org.apache.http.HttpResponseFactory;
protected final ByteBufferAllocator allocator;
protected final NHttpClientHandler handler;
protected final SSLContext sslcontext;
protected final SSLIOSessionHandler sslHandler;
protected final HttpParams params;
protected HttpResponseFactory createHtt... | 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 u... | 0 |
* https://github.com/apache/beam/pull/1353.
* https://github.com/apache/beam/pull/1353. | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/SetPropertyRule.java,v 1.12 2003/08/16 18:18:26 craigmcc Exp $
* $Revision: 1.12 $
* $Date: 2003/08/16 18:18:26 $
* @version $Revision: 1.12 $ $Date: 2003/08/16 18:18:26 $ | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.