Diff stringlengths 5 2k | FaultInducingLabel int64 0 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 org.apache.http.ConnectionClosedException;
if (socket == null) {
throw new ConnectionClosedException("Connection is closed");
} | 0 |
package com.twitter.common.net.http.handlers;
import java.util.List;
import java.util.Map;
import com.google.common.base.Supplier;
import com.google.common.collect.Lists;
import org.junit.Before;
import com.twitter.common.stats.Stat;
import com.twitter.common.testing.easymock.EasyMockTest;
import static org.easymo... | 0 |
package org.apache.cocoon.blocks.util; | 0 |
* Closes the given Closeable in a null-safe manner.
* @param closeable what to close.
* @throws IOException
public static void close(final Closeable closeable) throws IOException {
if (closeable != null) {
closeable.close();
}
}
/**
* Closes the given Closeab... | 0 |
ownerDocument = owner;
setNodeValue(value);
return "#text";
return TEXT_NODE;
return readonly;
readonly = v;
return getOwnerDocument().createTextNode(text); | 1 |
// default rather than public constructor | 0 |
import static com.google.cloud.dataflow.sdk.testing.SystemNanoTimeSleeper.sleepMillis;
sleepMillis(millis); | 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 n... | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
attrSet.add(SVG_CLIP_PATH_ATTRIBUTE);
attrSet.add(SVG_COLOR_INTERPOLATION_ATTRIBUTE);
attrSet.add(SVG_COLOR_RENDERING_ATTRIBUTE);
attrSet.add(SVG_ENABLE_BACKGROUND_ATTRIBUTE);
attrSet.add(SVG_FILL_ATTRIBUTE);
attrSet.add(SVG_FILL_OPACITY_ATTRIBUTE);
attrSet.add(SV... | 0 |
// ignore other AMBARI components as they are server-side only
if (ambariServiceName.equalsIgnoreCase(definitionServiceName)) {
return Collections.emptySet();
}
| 0 |
* @version CVS $Id: CellType.java,v 1.4 2003/09/05 07:31:40 cziegeler Exp $ | 0 |
* @param generatorContext the SVG generator context
* @param extensionHandler new extension handler this object should use | 0 |
* @version $Revision: 1.13 $ $Date$
private boolean srcDirIsBase;
* Sets whether the source directory should be consider as the base directory.
*/
public void setSrcDirIsBase(final boolean srcDirIsBase)
{
this.srcDirIsBase = srcDirIsBase;
}
/**
FileName srcDirName = null;... | 0 |
interface Clock { | 0 |
package com.twitter.nexus.scheduler;
import com.twitter.nexus.gen.NexusSchedulerManager;
import nexus.NexusSchedulerDriver;
@Option(name = "nexus_scheduler_ns", required = true,
usage = "The name service name for the nexus scheduler thrift server.")
String nexusSchedulerNameSpec;
@Option(name = ... | 0 |
import org.apache.commons.configuration.exception.ConfigurationLoadException;
import org.xml.sax.SAXParseException;
* @version $Id: TestConfigurationFactory.java,v 1.4 2004/01/23 11:52:36 epugh Exp $
private File testDigesterBadXML = new File("conf/testDigesterBadXML.xml");
public void testThrowingConfigurat... | 0 |
* Copyright 2000-2001,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 ... | 0 |
public void addHeader(final String name, final String value) {
if (name == null) {
throw new IllegalArgumentException("Header name may not be null");
}
this.headergroup.addHeader(new BasicHeader(name, value));
}
public void setHeader(final String name, final String value... | 0 |
public static <K, V> LazySortedMap<K, V> lazySortedMap(final SortedMap<K, V> map, final Factory<? extends V> factory) {
public static <K, V> LazySortedMap<K, V> lazySortedMap(final SortedMap<K, V> map,
final Transformer<? super K, ? extends V> factory) ... | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* 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 ... | 0 |
import org.apache.beam.runners.core.AssignWindowsDoFn; | 0 |
private ServiceReference<HealthCheck>[] callSelectHealthCheckReferences(HealthCheckSelector selector) {
return U.callSelectHealthCheckReferences(executor, selector);
ServiceReference<HealthCheck>[] s = callSelectHealthCheckReferences(null);
ServiceReference<HealthCheck>[] s = callSelectHealt... | 0 |
("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI()); | 0 |
import java.io.InterruptedIOException;
/*
* Lines below removed because they are unsafe,
* (and were causing hangs);
* thread should stop itself by checking a
* flag instead - or, better, using Thread.interrupt()
* and calls to isInterrupted().
*/
//thread.stop();
// T... | 0 |
KEY_CONTAINER_ENCODING + " : " + this.getContainerEncoding() + '\n'; | 0 |
import static org.mockito.Mockito.*;
@SuppressWarnings("unchecked") | 0 |
import org.apache.ambari.logsearch.conf.LogSearchConfigApiConfig;
private LogSearchConfigApiConfig logSearchConfigApiConfig;
@Inject
if (logSearchConfigApiConfig.isConfigApiEnabled()) {
while (!logSearchConfigState.isLogSearchConfigAvailable()) {
LOG.info("Log Search config not available yet, wai... | 0 |
import org.apache.beam.sdk.values.BeamRecordType;
private MockedUnboundedTable(BeamRecordType beamRowType) {
super(beamRowType);
TestStream.Builder<BeamRecord> values = TestStream.create(beamRecordType.getRecordCoder()); | 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 |
import org.apache.ambari.server.controller.internal.ClusterResourceProvider;
import io.swagger.annotations.ApiModelProperty;
private final Long clusterId; // for GET
private final String clusterName; // for GET/CREATE/UPDATE
private final String stackVersion; // for CREATE/UPDATE
private final String provision... | 0 |
return convertObjToString(nameValueList); | 0 |
/** The features. */
private JexlFeatures features = null;
* Sets the features the engine will use.
* @param f the features
* @return this builder
*/
public JexlBuilder features(JexlFeatures f) {
this.features = f;
return this;
}
/** @return the features */
... | 0 |
// tests the char methods of CommandLine that delegate to
// the String methods
assertEquals("flag a", "foo", line.getOptionValue('a'));
assertEquals("string flag a", "foo", line.getOptionObject('a'));
assertEquals("object flag b", new java.util.Vector(), line.get... | 0 |
kryo.register(clazz, new StatelessJavaSerializer()); | 0 |
* Returns a {@code GroupByKey<K, V>} {@code PTransform} that assumes it will be grouping
* a small number of keys.
static <K, V> GroupByKey<K, V> createWithFewKeys() {
return new GroupByKey<>(true); | 0 |
private long numberOfDocs = -1;
public long getNumberOfDocs() {
return numberOfDocs;
}
public void setNumberOfDocs(long numberOfDocs) {
this.numberOfDocs = numberOfDocs;
}
| 0 |
@Override | 0 |
package org.apache.aurora.auth;
import org.apache.aurora.gen.SessionKey; | 0 |
/*
* Copyright 2016-2018 Seznam.cz, a.s. | 0 |
public static final Factory<SshClient> DEFAULT_SSH_CLIENT_FACTORY = new Factory<SshClient>() {
public SshClient create() {
return new SshClient();
}
};
return SshBuilder
.client()
.factory(DEFAULT_SSH_CLIENT_FACTORY)
.build(); | 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 |
@Override
public String toString() {
return "[request date=" + requestDate + "; response date=" + responseDate
+ "; status=" + status + "]";
}
| 0 |
Iterator it = original.iterator();
while (it.hasNext()){
String entry = (String) it.next();
if (null == parseFTPEntry(entry)) {
it.remove();
} else {
break;
}
} | 0 |
private class CologneOutputBuffer extends CologneBuffer {
public CologneOutputBuffer(int buffSize) {
private class CologneInputBuffer extends CologneBuffer {
public CologneInputBuffer(char[] data) {
CologneOutputBuffer output = new CologneOutputBuffer(text.length() * 2);
CologneI... | 0 |
import org.apache.felix.webconsole.SimpleWebConsolePlugin;
class InstallHelper extends BaseUpdateInstallHelper
InstallHelper( final SimpleWebConsolePlugin plugin, final BundleContext bundleContext, final File bundleFile,
final String location, final int startlevel, final boolean doStart, final boolean refr... | 0 |
if (getUpgradeState().equals(UpgradeState.IN_PROGRESS) ||
getUpgradeState().equals(UpgradeState.VERSION_MISMATCH) ||
State.UNKNOWN.toString().equals(version)) {
// TODO: we still recalculate host version if upgrading component failed. It seems to be ok
// Recalculate only if no upgrade in ... | 0 |
* The list of all EventListener attached by bridges that need to
* be removed on a dispose() call.
protected List eventListenerList = new LinkedList();
* Adds to the eventListenerList the specified event listener
* registration.
*/
protected void storeEventListener(EventTarget t,
... | 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 |
* Thrown when parsing fails due to a disallowed feature.
*
* @since 3.2
*/
public static class Feature extends Parsing {
/** The feature code. */
private final int code;
/**
* Creates a new Ambiguous statement exception instance.
* @param info the locat... | 0 |
public IF_ICMPNE(final InstructionHandle target) {
public void accept( final Visitor v ) { | 0 |
throw new ConnectionClosedException(String.format(
"Premature end of Content-Length delimited message body (expected: %,d; received: %,d)",
contentLength, pos));
throw new ConnectionClosedException(String.format(
... | 0 |
@Override | 0 |
import org.apache.xml.security.exceptions.XMLSecurityException;
public XMLSignatureReferenceVerifyInputProcessor(
InputProcessorChain inputProcessorChain, SignatureType signatureType, SecurityToken securityToken,
XMLSecurityProperties securityProperties) throws XMLSecurityException {
| 0 |
* @version $Revision$ | 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 |
throw new FormsException("A widget with a selection list requires a datatype.",
DomHelper.getLocationObject(widgetElement)); | 0 |
/** Expressions implementing map operations. */ | 0 |
* @version CVS $Id: AbstractLayout.java,v 1.10 2003/09/02 08:34:17 cziegeler Exp $ | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/BufferOverflowException.java,v 1.6 2003/08/31 17:26:44 scolebourne Exp $
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear i... | 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.util.logging.AbstractLoggingBean; | 0 |
* {@code null} if nothing is established | 0 |
public void encode(Record value, OutputStream outStream)
public Record decode(InputStream inStream) throws CoderException, IOException {
OutputStream outStream)
InputStream inStream) | 0 |
private static org.slf4j.Logger log =
org.slf4j.LoggerFactory.getLogger(DOMSignedInfo.class);
log.debug(e.getMessage(), e); | 1 |
import java.io.IOException;
import java.util.List;
import java.util.TreeMap; | 0 |
BackToLinkedRuleBuilder callParamPath(int paramIndex);
BackToLinkedRuleBuilder setProperty(String name, String value); | 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 |
* TODO(wfarner): Make this the owner of SchedulerState, and persistence.
* | 0 |
import org.apache.ambari.logfeeder.util.LogFeederPropertiesUtil;
this.level = LogFeederPropertiesUtil.getSimulateLogLevel();
this.numberOfWords = LogFeederPropertiesUtil.getSimulateNumberOfWords();
this.minLogWords = LogFeederPropertiesUtil.getSimulateMinLogWords();
this.maxLogWords = LogFeederProperti... | 0 |
if (defaultValue == NO_DEFAULT) {
this.useDefault = false;
} else {
this.defaultValue = defaultValue;
this.useDefault = true;
}
// ------------------------------------------------------- Static Variables
/**
* This is a special reference that can... | 0 |
* Please note that if an entity has already been set for this response and it depends on
* an input stream ({@link HttpEntity#isStreaming()} returns <code>true</code>),
*
* @see org.apache.http.util.EntityUtils#updateEntity(HttpResponse, HttpEntity) | 0 |
@Deprecated
@Deprecated
@Deprecated
@Deprecated | 0 |
import org.apache.felix.http.base.internal.service.ServletContextImpl; | 0 |
* Copyright (c) 2002 The Apache Software Foundation. All rights | 0 |
import java.util.Calendar;
public void testPrecisionSeconds() {
FTPFile file = getParser().parseFTPEntry("1-JUN.LIS;1 9/9 2-JUN-1998 07:32:04 [TRANSLATED] (RWED,RD,,)");
assertNotNull(file);
Calendar stamp = file.getTimestamp();
assertNotNull(stamp);
... | 0 |
import org.apache.beam.sdk.coders.StringUtf8Coder;
StructuralKey<String> fooKey = StructuralKey.of("foo", StringUtf8Coder.of());
UncommittedBundle<KeyedWorkItem<String, Integer>> fooBundle = bundleFactory.createKeyedBundle(
null, fooKey,
groupedKvs);
StructuralKey<String> barKey = Structural... | 0 |
import org.apache.accumulo.server.replication.DistributedWorkQueueWorkAssignerHelper;
Entry<String,ReplicationTarget> entry = DistributedWorkQueueWorkAssignerHelper.fromQueueKey(work);
String queueKey = DistributedWorkQueueWorkAssignerHelper.getQueueKey(path.getName(), target); | 0 |
4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
Stefano Mazzocchi <stefano@apache.org>. For more information on the Apache
Software Foundation, please see <http://www.apache.org/>.
* @version $Id: ActionImpl.java,v 1.2 2004/03/01 20:11:17 joerg Exp $
* @see Object#toString()
... | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument; | 0 |
* The class to which this annotation is applied is thread-safe. This means that
* no sequences of accesses (reads and writes to public fields, calls to public methods)
* may put the object into an invalid state, regardless of the interleaving of those actions
* by the runtime, and without requiring any additional ... | 0 |
static final int UNDEFINED = -1;
/**
* Creates a TimeValue.
*
* @param duration
* the time duration in the given {@code timeUnit}.
* @param timeUnit
* the time unit for the given durarion.
* @return a Timeout
*/
hash = LangUtils.hashCode(has... | 0 |
import org.apache.batik.ext.awt.image.DistantLight;
import org.apache.batik.ext.awt.image.Light;
import org.apache.batik.ext.awt.image.PointLight;
import org.apache.batik.ext.awt.image.SpotLight; | 0 |
import org.apache.ambari.server.controller.AmbariManagementController;
import org.apache.ambari.server.state.Cluster;
import org.apache.ambari.server.state.Clusters;
import java.lang.reflect.Method;
import java.util.Collections;
import java.util.Map;
import static org.easymock.EasyMock.createMockBuilder;
import static ... | 0 |
* @throws IOException
* @throws IOException | 0 |
public long isReady(long tid, Master master) throws Exception {
if (!master.hasCycled(creationTime)) {
Scanner scanner = master.getConnector().createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
MetaDataTableScanner.configureScanner(scanner, master);
TabletState state = locationState.g... | 1 |
TableConfiguration tconf = aconf.getTableConfiguration(ke.getTableId()); | 0 |
* @since 1.4 | 0 |
import org.apache.beam.sdk.runners.AppliedPTransform; | 0 |
* @version $Id$
public class CircularFifoBufferTest<E> extends AbstractCollectionTest<E> {
public CircularFifoBufferTest(String n) {
return BulkTest.makeSuite(CircularFifoBufferTest.class); | 0 |
package org.apache.beam.sdk.extensions.euphoria.core.client.operator;
import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience;
import org.apache.beam.sdk.extensions.euphoria.core.client.dataset.windowing.Window;
import org.apache.beam.sdk.extensions.euphoria.core.client.dataset.windowing.Windo... | 0 |
//@@@ how to configure the parser?
return new HttpRequestParser(buffer, null, requestFactory, params); | 0 |
* $Id: BugsTest.java,v 1.16 2003/01/17 20:00:14 jkeyes Exp $
assertEquals( "Two Words", line.getOptionValue( "m" ) ); | 0 |
/*
* Copyright (C) 2015 Google Inc.
*
* 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 or agreed to ... | 0 |
import com.google.common.base.Function; | 0 |
assertTrue( bm.getServiceObject( new BindParameters(cc, refPair), m_context ) );
bm.invoke( component, bp, null );
@Override
@Override
@Override | 0 |
import org.apache.beam.dsls.sql.schema.BeamSqlRow;
public BeamSqlPrimitive<Date> evaluate(BeamSqlRow inputRecord) { | 0 |
for (final K k : sm.keySet()) { | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.