Diff stringlengths 5 2k | FaultInducingLabel int64 0 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... | 0 |
final Users users = createMockBuilder(Users.class)
.addMockedMethod("getUserEntity", String.class)
.addMockedMethod("getUserAuthorities", UserEntity.class)
.createMock();
bind(Users.class).toInstance(users); | 0 |
import org.apache.ambari.server.events.UpdateEventType;
import org.apache.ambari.server.events.UpgradeUpdateEvent;
import org.apache.ambari.server.events.publishers.StateUpdateEventPublisher;
@Inject
private StateUpdateEventPublisher stateUpdateEventPublisher;
@Inject
private HostRoleCommandDAO hostRoleCommand... | 0 |
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
impor... | 0 |
import org.apache.accumulo.server.conf.ConfigSanityCheck;
expectSet.put("check-server-config", ConfigSanityCheck.class); | 0 |
import org.apache.atlas.model.instance.AtlasEntity.AtlasEntitiesWithExtInfo;
public AtlasEntitiesWithExtInfo toAtlasEntitiesWithExtInfo(List<String> guids) throws AtlasBaseException {
AtlasEntitiesWithExtInfo ret = new AtlasEntitiesWithExtInfo();
for (String guid : guids) {
AtlasVertex ... | 1 |
protected GraphicContext gc;
protected DOMTreeManager domTreeManager;
protected SVGGraphicContext groupGC;
protected Element currentGroup;
SVGGraphicContext deltaGC;
deltaGC = processDeltaGC(groupGC,
domTreeManager.defaultGC);
protected in... | 0 |
private boolean rangesContainsKey(List<ByteKeyRange> ranges, ByteKey key) { | 0 |
/**
* Get the fields of this class
* @return All fields or an empty array
*/
JavaField getFieldByName(String name) throws MojoExecutionException;
| 0 |
import org.apache.accumulo.core.client.admin.TimeType;
@Deprecated
public void create(String tableName, boolean limitVersion) throws AccumuloException, AccumuloSecurityException, TableExistsException {
create(tableName, limitVersion, TimeType.MILLIS);
}
@Override
@Deprecated
public void c... | 0 |
import org.osgi.framework.ServiceReference; | 0 |
public void testHandle() throws SQLException {
ResultSetHandler<TestBean> h = new BeanHandler<TestBean>(TestBean.class);
assertNotNull(results);
assertEquals("1", results.getOne());
assertEquals("2", results.getTwo());
assertEquals("3", results.getThree());
}
| 0 |
package org.apache.commons.jexl2.internal; | 0 |
@Override | 0 |
info("Arrays cannot be used for proxied dependencies - Disable the proxy mode"); | 0 |
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.conn.scheme.SocketFactory; | 0 |
public void testRegenerateKeytabsValidateRequestStageContainer() throws Exception {
testRegenerateKeytabs(new KerberosCredential("principal", "password", "keytab"), false);
}
@Test
testRegenerateKeytabs(new KerberosCredential("principal", "password", "keytab"), false);
private void testRegenerateKeytab... | 0 |
assertEquals(1,
cluster
.exec(RandomizeVolumes.class, "-c", cluster.getClientPropsPath(), "-t", tableName)
.getProcess().waitFor()); | 0 |
* @author <a href="mailto:scohen@apache.org">Steve Cohen</a>
* @version $Id: OS2FTPEntryParserTest.java,v 1.3 2003/03/02 19:47:00 scohen Exp $ | 0 |
allMessages.sort(new TimeStampComparator()); | 0 |
package com.google.cloud.dataflow.examples.cookbook; | 0 |
@Test
public void extractPropertyNameFromAttribute() throws Exception
{
Employee expected = new Employee( "John", "Doe" );
Employee actual = newLoader( new AbstractRulesModule()
{
@Override
protected void configure()
{
forPattern(... | 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 |
windowFn, value, timestamp, GlobalWindow.INSTANCE));
private BoundedWindow window;
public TestAssignContext(
WindowFn<Object, W> windowFn, Object element, Instant timestamp, BoundedWindow window) {
this.window = window;
public BoundedWindow window() {
return window; | 0 |
String expectedMetric1App1 = "{\"timelineMetric\":{\"metadata\":{},\"metricname\":\"metricName1\",\"appid\":\"app1\",\"starttime\":0,\"metrics\":{}},\"metricAggregate\":{\"sum\":6.0,\"deviation\":0.0,\"max\":3.0,\"min\":1.0,\"numberOfSamples\":3}}";
String expectedMetric2App2 = "{\"timelineMetric\":{\"m... | 0 |
* Translates a GroupByKey while ignoring window assignments. Current ignores windows. | 0 |
@Lob
@Basic
@Column(name = "description", nullable = true, length = 32672)
private String description;
* Gets the optional description for this alert definition.
*
* @return the description, or {@code null} if none.
*/
public String getDescription() {
return description;
}
/**
* Gets ... | 0 |
/**
String [] splited=StringSplitter.split(location, '/');
String value=splited[0]+"/"+"/"+splited[2];
return value; | 0 |
* @version $Revision: 1.5 $ $Date: 2003/12/30 06:55:58 $
public static IOFileFilter INSTANCE = new FalseFileFilter(); | 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.accumulo.trace.thrift.TInfo; | 0 |
protected boolean isHostInMemoryAggregationEnabled() {
return false;
}
@Override
protected int getHostInMemoryAggregationPort() {
return 61888;
}
@Override | 0 |
/*
* $Header: /cvshome/build/ee.foundation/src/java/lang/UnsupportedClassVersionError.java,v 1.6 2006/03/14 01:20:25 hargrave Exp $
*
* (C) Copyright 2001 Sun Microsystems, Inc.
* Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* ... | 0 |
import com.google.cloud.dataflow.sdk.options.GcpOptions;
static final GcpOptions testPipelineOptions() {
GcpOptions options = PipelineOptionsFactory.as(GcpOptions.class);
sink.validate(testPipelineOptions());
sink.validate(testPipelineOptions());
List<DatastoreIO.Source> bundles = io.splitIntoBundles(... | 0 |
import org.apache.commons.configuration.Initializable;
* If the newly created {@code Configuration} object implements the
* {@code Initializable} interface, its {@code initialize()} method is called
* after all initialization properties have been set. This way a concrete
* implementation class can perform arbitrary... | 0 |
protected ApplicationHistoryClientService createApplicationHistoryClientService(
return new ApplicationHistoryClientService(historyManager, metricConfiguration); | 0 |
* Copyright 2006-2009 The Apache Software Foundation. | 0 |
/* (non-Javadoc)
* @see org.apache.cocoon.portal.LinkService#encodeURL(String url).
*/
public String encodeURL(String url) {
return ContextHelper.getResponse(this.context).encodeURL(url);
} | 0 |
UnboundedFifoBuffer<String> buffer = new UnboundedFifoBuffer<String>();
buffer = (UnboundedFifoBuffer<String>) serializeDeserialize(buffer); | 0 |
public void testExpected() throws Exception {
public void testLong() throws Exception {
public void testPrimitiveLong() throws Exception {
public void testResolveProxyClass() throws Exception { | 0 |
@Override
public void visit(State state, Properties props) throws Exception {
state.getMultiTableBatchWriter().flush();
log.debug("Committed " + state.getInteger("numWrites") + " writes. Total writes: " + state.getInteger("totalWrites"));
state.set("numWrites", new Integer(0));
}
| 1 |
import org.apache.avalon.framework.configuration.Configurable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.cocoon.xml.XMLPipe;
extends CachingProcessingPipeline implements Configurable {
private boolean saxs... | 0 |
@SuppressWarnings("unchecked")
public static final Comparator NATURAL_COMPARATOR = ComparableComparator.<Comparable>getInstance();
@SuppressWarnings("unchecked")
public static <E extends Comparable<? super E>> Comparator<E> naturalComparator() {
@SuppressWarnings("unchecked")
public static <E ex... | 0 |
extensionInfo.setActive(emx.getVersion().isActive());
extensionInfo.setAutoLink(emx.isAutoLink()); | 0 |
import org.apache.zookeeper.client.ZKClientConfig;
ClientCnxnSocketNIO(ZKClientConfig clientConfig) throws IOException {
this.clientConfig = clientConfig;
initProperties(); | 0 |
import org.apache.aurora.gen.storage.RemoveLock;
import org.apache.aurora.gen.storage.SaveLock;
builder.add(Op.saveLock(new SaveLock()));
// TODO(jly): Deprecated, this is a no-op to be removed in 0.21. See AURORA-1959.
builder.add(Op.removeLock(new RemoveLock()));
// TODO(jly): Deprecated, this is a n... | 0 |
return (String[]) tokens.toArray(new String[tokens.size()]);
} | 0 |
MethodVariableAccess.REFERENCE.loadFrom(0),
StackManipulation pushExtraContextFactory = MethodVariableAccess.REFERENCE.loadFrom(1);
MethodVariableAccess.REFERENCE.loadFrom(0),
MethodVariableAccess.REFERENCE.loadFrom(0),
MethodVariable... | 0 |
config.addPropertyDirect("key3", "value4");
config.addPropertyDirect("key3", "value5");
List list = config.getList("key3");
assertNotNull("no list found for the 'key3' property", list);
List expected = new ArrayList();
expected.add("value3");
expected.add("value... | 0 |
org.w3c.dom.Document doc = XMLUtils.newDocument(false);
org.w3c.dom.Document doc = XMLUtils.parse(is, false); | 0 |
import static org.junit.Assert.assertArrayEquals;
assertArrayEquals(new byte[] {1}, zrw.mutate(path, value, acls, mutator));
assertArrayEquals(new byte[] {1}, zrw.mutate(path, value, acls, mutator)); | 0 |
import java.util.NoSuchElementException;
import java.util.Optional;
@Test(expected = NoSuchElementException.class)
expect(attributeStore.getHostAttributes("a")).andReturn(Optional.empty()); | 0 |
LOG.info("Disabling and unmapping configuration {}", serviceConfigEntity);
// unmapping all service configs
for (ClusterConfigEntity clusterConfigEntity : serviceConfigEntity.getClusterConfigEntities()) {
if (!clusterConfigEntity.isUnmapped()) {
LOG.info("Unmapping configuration {}... | 0 |
public static final String USE_LOCALURLS_PROP = "felix.jarurls"; | 0 |
// Check in the cache for the file system
final FileName rootName = getContext().getFileSystemManager().resolveName(name, FileName.ROOT_PATH);
FileSystem fs;
synchronized (this)
{
fs = findFileSystem(rootName, fileSystemOptions);
if (fs == null)
... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/observed/Attic/TestObservedList.java,v 1.2 2003/09/21 16:00:56 scolebourne Exp $
* @version $Revision: 1.2 $ $Date: 2003/09/21 16:00:56 $
return ObservableList.decorate(ne... | 0 |
*
* @deprecated use {@link org.apache.http.nio.reactor.ssl.SSLSetupHandler}
@Deprecated | 0 |
* Copyright 1999-2006 The Apache Software Foundation | 0 |
@Deprecated | 0 |
* @version $Revision: 1.6 $
public int getSize()
{
return 22;
} | 0 |
StringBuilder buf = new StringBuilder( pid.substring( 0, first ) );
final StringBuilder pidBuffer = new StringBuilder( pid.length() );
private void appendEncoded( StringBuilder buf, final char c )
@Override
@Override
@Override
@Override
@Override
@Ove... | 0 |
public NEWARRAY(final byte type) {
public NEWARRAY(final BasicType type) {
public void dump( final DataOutputStream out ) throws IOException {
public String toString( final boolean verbose ) {
protected void initFromFile( final ByteSequence bytes, final boolean wide ) throws IOException {
public... | 0 |
import java.awt.geom.Point2D;
/**
* Returns true if pt is in the area painted by this shape painter
*/
public boolean inPaintedArea(Point2D pt){
if (painters == null)
return false;
for (int i=0; i < count; ++i) {
if (painters[i].inPaintedArea(pt))
... | 0 |
import java.util.ArrayList;
import java.util.List;
import org.apache.ambari.server.state.RepositoryInfo;
@Override
@Test
public void testSerializeOperatingSystems() throws Exception {
final List<RepositoryInfo> repositories = new ArrayList<RepositoryInfo>();
final RepositoryInfo repository = new Repos... | 0 |
component(c, comp -> comp.withFuture(futureLinks, future -> future.cbi(this::setLinks))); | 0 |
import org.apache.commons.lang.StringUtils;
import org.apache.kafka.clients.consumer.KafkaConsumer;
import java.util.Arrays;
import java.util.HashMap;
import java.util.ArrayList;
private KafkaConsumer consumer = null;
properties.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
Boole... | 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.cocoon.processing.ProcessInfoProvider;
private ProcessInfoProvider processInfoProvider;
public JavaScriptWidgetListener(Function func, ProcessInfoProvider processInfoProvider) {
this.processInfoProvider = processInfoProvider;
Map objectModel = processInfoProvider.getOb... | 0 |
* This filter primitive lights an image using the alpha channel as a bump map.
* component of the Phong lighting model. The resulting image depends on the light color,
* This filter follows the specification of the feDiffuseLighting filter in
Filter getSource();
void setSource(Filter src);
Light getLight... | 0 |
javax.xml.parsers.DocumentBuilder db = XMLUtils.createDocumentBuilder(false, false);
org.w3c.dom.Document doc = db.parse(new java.io.FileInputStream(f));
javax.xml.parsers.DocumentBuilder db = XMLUtils.createDocumentBuilder(false, false);
org.w3c.dom.Document doc = db.parse(f); | 0 |
import org.apache.ambari.server.orm.dao.RepositoryVersionDAO;
RepositoryVersionDAO repositoryVersionDAO = createNiceMock(RepositoryVersionDAO.class);
replay(maintenanceStateHelper, repositoryVersionDAO);
AbstractResourceProvider provider = new ServiceResourceProvider(propertyIds, keyPropertyIds,
ma... | 0 |
} else if (! (m.isStatic())){ // implies it's not abstract, verified in pass 2. | 0 |
package org.apache.bcel.generic;
import org.apache.bcel.Const;
import org.apache.bcel.ExceptionConst;
import org.apache.bcel.classfile.ConstantInvokeDynamic;
import org.apache.bcel.classfile.ConstantNameAndType;
import org.apache.bcel.classfile.ConstantPool;
import org.apache.bcel.util.ByteSequence; | 1 |
import org.apache.ambari.server.security.authorization.ResourceType;
expect(resourceEntity.getId()).andReturn(54L).anyTimes();
expect(resourceTypeEntity.getId()).andReturn(ResourceType.VIEW.getId()).anyTimes();
expect(resourceTypeEntity.getName()).andReturn(ResourceType.VIEW.name()).anyTimes();
Security... | 0 |
expect(storageUtil.jobStore.fetchJobs())
storageUtil.jobStore.saveAcceptedJob(IJobConfiguration.build(job.getJobConfiguration())); | 0 |
private static Map<Credentials,Writer> writers = new HashMap<>(); | 1 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.annotations.VisibleForTesting;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ArrayListMultimap;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.HashMultimap;
import org.apache.beam.vendor.guava.v20_0.com.google.common.... | 0 |
public Response getUsers(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
return handleRequest(headers, body, ui, Request.Type.GET, createUserResource(null));
public Response getUser(String body, @Context HttpHeaders headers, @Context UriInfo ui,
return handleRequest(headers, body, ui, Requ... | 0 |
Cookie cookie = new BasicCookie("name", null);
Cookie cookie = new BasicCookie("name", null);
Cookie cookie = new BasicCookie("name", null);
Cookie cookie = new BasicCookie("name", null);
Cookie cookie = new BasicCookie("name", null);
Cookie cookie = new BasicCookie("name... | 0 |
/**
* This Set contains the names (Strings like "xmlns" or "xmlns:foo") of
* the inclusive namespaces.
*/
TreeSet _inclusiveNSSet = null;
return super.engineCanonicalizeSubTree(rootNode,excl);
NamedNodeMap attrs=null;
int attrsLength = 0;
if (E.hasAttributes()) {
... | 0 |
static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(TabletServerMinCMetrics.class); | 0 |
public ClassConverter(final Object defaultValue) {
protected String convertToString(final Object value) {
protected <T> T convertToType(final Class<T> type, final Object value) throws Throwable {
} catch (final ClassNotFoundException ex) { | 0 |
import org.apache.bcel.classfile.BootstrapMethods;
public int bootstrapMethodsCount = 0;
public void visitStackMapTable(StackMapTable obj)
{
public void visitStackMapTableEntry(StackMapTableEntry obj)
{
public void visitBootstrapMethods(BootstrapMethods obj)
{
bootstrapMethodsCount++;
} | 0 |
* "License"); you may not use this file except in compliance
* distributed under the License is distributed on an "AS IS" BASIS, | 0 |
public static final String DGI_URL_PROPERTY = "hive.hook.dgi.url"; | 0 |
package org.apache.commons.beanutils2.locale.converters;
import org.apache.commons.beanutils2.locale.converters.ShortLocaleConverter; | 1 |
svgRoot.getFirstChild()); | 0 |
package org.apache.hc.core5.ssl; | 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 ... | 0 |
/** The Spark context factory. */
* If the property {@code beam.spark.test.reuseSparkContext} is set to {@code true} then the Spark
* context will be reused for beam pipelines. This property should only be enabled for tests.
private SparkContextFactory() {}
if (Boolean.getBoolean(TEST_REUSE_SPARK_CONTEXT) &... | 1 |
public boolean authenticate(String username, PublicKey key, ServerSession session) {
return true; | 0 |
EventDispatcher ed = new EventDispatcher(logger, registry); | 0 |
import com.google.common.base.Optional;
/***
* A name that refers to a service has a format like /[<service name>/[<component name>/]]<identity name>
* @return an optional referenced service name
*/
public Optional<String> getReferencedServiceName() {
return parseServiceName(reference).or(parseService... | 0 |
import org.apache.accumulo.core.client.ClientConfiguration;
| 0 |
public boolean isPropertySet(Property prop, boolean cacheAndWatch) { | 0 |
AccumuloConfiguration aconf = master.getConfiguration();
AccumuloConfiguration aconf = master.getConfiguration();
AccumuloConfiguration aconf = master.getConfiguration();
delay = aconf.getTimeInMillis(Property.MASTER_RECOVERY_DELAY); | 1 |
updateTypesWithNoRefResolve(typesDef);
resolveReferences();
}
if (LOG.isDebugEnabled()) {
LOG.debug("<== AtlasTypeRegistry.updateTypes({})", typesDef);
}
}
public void updateTypesWithNoRefResolve(AtlasTypesDef typesDe... | 0 |
import org.apache.beam.sdk.testing.CoderProperties;
public void testFullWindowedValueCoderIsSerializableWithWellKnownCoderType() {
CoderProperties.coderSerializable(WindowedValue.getFullCoder(
GlobalWindow.Coder.INSTANCE, GlobalWindow.Coder.INSTANCE));
}
@Test
public void testValueOnlyWindowedValue... | 0 |
public static final List<Bid> RESULTS = ImmutableList.of(
BIDS.get(0),
BIDS.get(1),
BIDS.get(2),
BIDS.get(4)); | 0 |
"http://xml.apache.org/batik/ext/multi-image/1.0" ,
ctx.putBridge(new BatikMultiImageElementBridge()); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.