Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
* Method flag prefix. | 0 |
if (val.equalsIgnoreCase("inherit")) {
return CSSLexicalUnit.createSimple(LexicalUnit.SAC_INHERIT,
prev);
} else {
return CSSLexicalUnit.createString(LexicalUnit.SAC_IDENT,
... | 0 |
public final class HttpHost implements Serializable { | 0 |
import org.apache.aurora.scheduler.base.TaskTestUtil;
ScheduledTask builder = TaskTestUtil.makeTask("test", TaskTestUtil.JOB).newBuilder();
builder.setStatus(INIT.getStatus().get());
builder.getAssignedTask().getTask()
.setMaxTaskFailures(0)
.setIsService(service);
return builder; | 0 |
import java.util.Map;
import org.apache.aurora.scheduler.storage.db.views.DBResourceAggregate;
import org.apache.aurora.scheduler.storage.db.views.DBSaveQuota;
* Inserts the quota for the given {@code role}.
* @param role Role to insert quota for.
* @param result Container for auto-generated ID of the inserted... | 0 |
final boolean saslEnabled =
Boolean.parseBoolean(clientConf.get(ClientProperty.INSTANCE_RPC_SASL_ENABLED)); | 0 |
c = ((Comparable) cap1.getAttributes().get(BundleRevision.BUNDLE_NAMESPACE))
.compareTo(cap2.getAttributes().get(BundleRevision.BUNDLE_NAMESPACE));
c = ((Comparable) cap1.getAttributes().get(BundleRevision.PACKAGE_NAMESPACE))
.compareTo(cap2.getAttributes().get(Bu... | 1 |
import java.util.Set;
/**
* Return a Set of indexed properties in the graph.
* No parameters.
*/
@Override
public Set<String> getGraphIndexedFields() {
return repository.getGraphIndexedFields();
}
| 0 |
* Copyright 1999-2006 The Apache Software Foundation | 0 |
/*
* Copyright 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 appl... | 0 |
import com.twitter.common.quantity.Amount;
import com.twitter.common.quantity.Time;
private static final Arg<File> MESOS_SSL_KEY_FILE = Arg.create();
private static final Arg<Integer> THRIFT_PORT = Arg.create(0);
@CmdLine(name = "task_reaper_start_delay", help =
"Time to wait after startup before running t... | 0 |
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@Test(timeout = ReadOperation.DEFAULT_PROGRESS_UPDATE_PERIOD_MS * 60)
CounterUpdate resultCounter = metricsCounterUpdates.iterator().next();
assertTrue(
new CounterHamcrestMatchers.CounterUpdateIntegerValueMatcher(... | 0 |
public NavigableSet<E> subSet(final E fromElement, final boolean fromInclusive, final E toElement,
final boolean toInclusive) { | 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 |
record = SerializeUtils.deserializeTxn(bytes, hdr); | 0 |
Request request = PropertyHelper.getReadRequest(Collections.emptySet(), temporalInfoMap); | 0 |
@Deprecated | 0 |
/** {@link org.apache.commons.logging} logging facility */
static org.apache.commons.logging.Log log =
org.apache.commons.logging.LogFactory.getLog(RetrievalMethod.class.getName()); | 0 |
" <description>Description</description>" +
public void testGetDescription() throws Exception {
ViewConfig config = getConfig();
Assert.assertEquals("Description", config.getDescription());
}
@Test | 0 |
props.put("instance.name","under-test");
props2.put("instance.name","under-test");
props2.put("instance.name","under-test"); | 0 |
* A {@code WritableCoder} is a {@link Coder} for a Java class that implements {@link Writable}. | 0 |
/** CreateGearpumpPCollectionView bridges input stream to down stream transforms. */
public class CreateGearpumpPCollectionViewTranslator<ElemT, ViewT>
implements TransformTranslator<
CreateStreamingGearpumpView.CreateGearpumpPCollectionView<ElemT, ViewT>> {
JavaStream<WindowedValue<List<ElemT>>> inputS... | 1 |
package org.apache.commons.io;
/*
* 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, Versi... | 0 |
@Init
void init() {
System.out.println("ServiceProvider.init");
}
@Destroy
void destroy() {
System.out.println("ServiceProvider.destroy");
}
@Init
void init() {
System.out.println("ServiceAspect... | 0 |
import org.apache.atlas.repository.graphdb.AtlasVertex;
protected void assertVerticesDeleted(List<AtlasVertex> vertices) {
for (AtlasVertex vertex : vertices) {
assertEquals(GraphHelper.getSingleValuedProperty(vertex, Constants.STATE_PROPERTY_KEY, String.class), Id.EntityState.DELETED.name()); | 1 |
package org.apache.commons.ognl.internal.entry;
import org.apache.commons.ognl.OgnlRuntime;
import org.apache.commons.ognl.internal.CacheException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* User: Maurizio Cucchiara
* Da... | 0 |
if (Math.abs(expected - actual) > Math.max(delta, 1000)) // getLastModTimeAccuracy() is not accurate | 0 |
import org.apache.batik.ext.awt.image.renderable.Filter;
import org.apache.batik.ext.awt.image.renderable.CompositeRule;
import org.apache.batik.ext.awt.image.renderable.PadMode;
import org.apache.batik.ext.awt.image.renderable.AbstractRable;
import org.apache.batik.ext.awt.image.renderable.CompositeRable8Bit;
import o... | 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 |
* must be {@link ReferenceStrength#HARD HARD},
* {@link ReferenceStrength#SOFT SOFT}, | 0 |
for (String teststr : teststrs) {
chbuffer.append(teststr);
for (String teststr : teststrs) {
expected += (teststr.length() + 2/*CRLF*/);
for (String teststr : teststrs) {
Assert.assertEquals(teststr, inbuffer.readLine());
for (String teststr : teststr... | 0 |
public static final String JAVA_SERIALIZED_COMBINE_FN_URN = "urn:beam:java:combinefn:v1"; | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/ValidatorResources.java,v 1.30 2004/02/21 17:10:29 rleland Exp $
* $Revision: 1.30 $
* $Date: 2004/02/21 17:10:29 $
* Copyright 2001-2004 The Apache Software Foundation
* Licensed... | 0 |
} catch(IOException e) {
e.printStackTrace();
} finally {
try { ds.close(); } catch(IOException e2) { e2.printStackTrace(); }
} | 0 |
import org.apache.ambari.server.orm.dao.HostDAO;
import org.apache.ambari.server.orm.entities.HostEntity;
private HostDAO hostDAO;
hostDAO = injector.getInstance(HostDAO.class);
HostEntity entity = hostDAO.findByName(host.getHostName());
Assert.assertEquals(currentTime,
entity.getLastRegistration... | 0 |
*
*
*
* @param conn the {@link DelegatingConnection} that created this CallableStatement
public PoolableCallableStatement(CallableStatement stmt, Object key,
KeyedObjectPool pool, DelegatingConnection<Connection> conn) {
super(conn, stmt);
// Remove from trace now because thi... | 0 |
import java.util.ArrayList;
import java.util.Collection;
public static void validateUpdateLink(StackManager stackManager, StackInfo stack, ExtensionInfo oldExtension, ExtensionInfo newExtension) throws AmbariException {
validateSupportedStackVersion(stack, newExtension);
validateServiceDuplication(stackManag... | 0 |
import org.junit.experimental.categories.Category;
@Category({ category.KerberosTest.class}) | 0 |
private CommonUtil() {
throw new UnsupportedOperationException();
}
| 0 |
import java.util.Collections;
public void testMatchDirectory() throws Exception {
create("dir/file", "data".getBytes(StandardCharsets.UTF_8));
final MatchResult matchResult =
Iterables.getOnlyElement(
fileSystem.match(Collections.singletonList(testPath("dir").toString())));
assertThat(... | 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.hc.core5.annotation.Contract;
import org.apache.hc.core5.annotation.ThreadingBehavior;
@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL) | 0 |
*
*
*
*
*
*
*
*
*
* | 0 |
/**
* Copyright 2013 Apache Software Foundation | 0 |
assertEquals(ex.getStatus(), ClientResponse.Status.BAD_REQUEST); | 1 |
public static final String CONTEXT = ".context";
processor = new CommandProcessorImpl(tio);
// Setup the variables and commands exposed in an OSGi environment.
processor.addConstant(CONTEXT, context);
processor.addCommand("osgi", processor, "addCommand");
processor.addComma... | 0 |
File[] EMPTY_FILES = new File[0];
protected File root;
Registry registry;
boolean canWrite = true;
Pattern REPO_FILE = Pattern.compile("([-a-zA-z0-9_\\.]+)-([0-9\\.]+|latest)\\.(jar|lib)");
Reporter reporter;
boolean dirty;
String name;
public FileRepo() {}
public void set... | 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 |
* </p>
* </p> | 0 |
Connector conn = accumulo.getConnector("root", "superSecret"); | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Supplier;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableSet; | 0 |
* Tests whether interpolation works as expected after cloning.
*/
@Test
public void testCloneInterpolation()
{
CompositeConfiguration cc2 = (CompositeConfiguration) cc.clone();
assertNotSame("Interpolator was not cloned", cc.getInterpolator(),
cc2.getInterpolator())... | 0 |
package org.apache.commons.vfs.provider.url;
import org.apache.commons.vfs.provider.URLFileName;
import org.apache.commons.vfs.provider.UriParser;
/**
* Created by IntelliJ IDEA.
* User: im
* Date: 28.06.2005
* Time: 16:00:19
* To change this template use File | Settings | File Templates.
*/
public class UrlFil... | 0 |
// Not for client use | 0 |
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
private List m_resourceList;
m_resourceList = new ArrayList();
if (m_resources == null) {
Collections.sort(m_resourceList, m_nameComparator);
m_resources = (Resource[]) m_resourceList.toArray(new... | 0 |
public ArrayList<Mutation> result = new ArrayList<>();
ArrayList<Path> dirs = new ArrayList<>();
Map<String,KeyValue[]> logs = new TreeMap<>();
Map<String,KeyValue[]> logs = new TreeMap<>();
Map<String,KeyValue[]> logs = new TreeMap<>();
Map<String,KeyValue[]> logs = new TreeMap<>();
Map<Str... | 1 |
import org.apache.atlas.ApplicationProperties;
import org.apache.commons.configuration.Configuration;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
public class AtlasAuthenticationProvider extends AtlasAbstractAuthenticationProvider {
final AtlasLdapAuthenticationProvider ldapAuthenticationPro... | 0 |
import java.io.FileNotFoundException;
import org.apache.accumulo.core.conf.ClientConfiguration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
public MiniAccumuloInstance(String instanceName, File directory) throws FileNotFoundException... | 0 |
package org.apache.felix.ipojo.test.scenarios.annotations;
import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;
import org.apache.felix.ipojo.metadata.Element;
import org.apache.felix.ipojo.test.scenarios.util.Utils;
public class Factory extends OSGiTestCase {
public void testArch() {
Element meta ... | 0 |
log.warn("Failed to get credential for {} from {}", alias, providerObj, e);
log.warn("Failed to get credential for {} from {}", alias, providerObj, e);
log.warn("Failed to get credential for {} from {}", alias, providerObj, e);
// If we didn't find it, this isn't an error, it just wasn't se... | 0 |
import java.io.Serializable;
* @version CVS $Id: Cache.java,v 1.4 2003/08/07 08:52:15 cziegeler Exp $
void store(Serializable key, | 0 |
public X509IssuerSerialTest() throws Exception {
"distinguished name does not conform to RFC 2253");
x509is.isFeatureSupported(null);
fail("Should raise a NPE for null feature");
| 1 |
@Override
@Override | 0 |
/**
* 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 in writing, software
* distribu... | 0 |
@Override
@Override
@Override
@Override | 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 |
/*
* 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 |
for (KeyExtent extent : migrations) { | 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 |
@NamedQuery(name = "AlertGroupEntity.findByNameInCluster", query = "SELECT alertGroup FROM AlertGroupEntity alertGroup WHERE alertGroup.groupName = :groupName AND alertGroup.clusterId = :clusterId"),
@NamedQuery(name = "AlertGroupEntity.findByAssociatedDefinition", query = "SELECT alertGroup FROM AlertGroupEnti... | 0 |
@Test
public void testSingleElement() {
PCollection<Row> input =
PBegin
.in(pipeline)
.apply(
"boundedInput1",
Create
.of(
Row.withRowType(INPUT_ROW_TYPE)
.addValues(1)
... | 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 |
/* $Id$ | 0 |
* @version CVS $Id$ | 0 |
* Translator to support translation between Beam transformations and Spark transformations. | 0 |
import org.apache.hc.core5.http.impl.BasicHttpTransportMetrics;
final BasicHttpTransportMetrics metrics, | 1 |
import net.jcip.annotations.Immutable;
@Immutable | 0 |
import org.apache.beam.sdk.extensions.gcp.util.GcsUtil;
import org.apache.beam.sdk.extensions.gcp.util.gcsfs.GcsPath; | 0 |
import org.apache.beam.sdk.values.BeamRecordType;
BeamRecordType resultType = BeamRecordSqlType.builder()
.withIntegerField("f_int")
.withBigIntField("f_long")
.build();
BeamRecord record = new BeamRecord(resultType,
recordsInTableA.get(0).getFieldValue(0),
recordsInTable... | 0 |
statsProvider); | 0 |
import com.twitter.nexus.gen.ExecutorQueryResponse;
import com.twitter.nexus.gen.ResourceConsumption;
import com.twitter.nexus.scheduler.persistence.Codec;
import com.twitter.nexus.scheduler.persistence.ThriftBinaryCodec;
import nexus.FrameworkMessage;
private final Codec<ExecutorQueryResponse, byte[]> queryResponseC... | 0 |
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.StringReader;
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.AttributesImpl;
import org.xml.sax.helpers.DefaultHandler;
import com.su... | 0 |
import org.apache.commons.jelly.JellyTagException;
public void addChild(Component component, Object constraints) throws JellyTagException {
throw new JellyTagException( "this tag must be nested within a <tr> tag" ); | 0 |
import org.apache.felix.ipojo.architecture.Architecture;
import org.apache.felix.ipojo.test.composite.service.FooService;
props.put("name", "under-A");
| 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 |
* <p>Group bids by the same user into sessions with {@code windowSizeSec} max gap. However limit
* the session to at most {@code maxLogEvents}. Emit the number of bids per session.
PCollection<Long> bidders =
events
.apply(JUST_BIDS)
.apply(
name + ".Rekey",
... | 1 |
import javax.ws.rs.Consumes;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.ext.MessageBodyReader;
import javax.ws.rs.ext.MessageBodyWriter;
import javax.ws.rs.ext.Provider;
import org.slf4j.Logger;
... | 0 |
import org.apache.accumulo.core.client.AccumuloClient;
AccumuloClient c = getAccumuloClient();
BatchWriter bw = getAccumuloClient().createBatchWriter(tableName, new BatchWriterConfig());
bw = getAccumuloClient().createBatchWriter(tableName, new BatchWriterConfig());
try (Scanner scanner = getAccumuloCli... | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* v... | 0 |
package org.apache.batik.anim.dom; | 0 |
return tester.getTimerInternals();
this.tester.advanceProcessingTime(currentProcessingTime);
List<TimerInternals.TimerData> timers = tester.advanceProcessingTime(currentProcessingTime); | 0 |
Map<String, Map<String, String>> userProvidedConfigurations = clusterTopology.getConfiguration().getFullProperties(1);
Configuration clusterConfiguration = clusterTopology.getConfiguration();
Map<String, Map<String, String>> existingConfigurations = clusterConfiguration.getFullProperties();
... | 0 |
* <p>See {@link BeamSqlEqualsExpression}, {@link BeamSqlLessThanExpression}, {@link
* BeamSqlLessThanOrEqualsExpression}, {@link BeamSqlGreaterThanExpression}, {@link
* BeamSqlGreaterThanOrEqualsExpression} and {@link BeamSqlNotEqualsExpression} for more details.
/** Compare operation must have 2 operands. */
... | 0 |
import org.apache.beam.sdk.coders.AtomicCoder;
import org.apache.beam.sdk.coders.ByteArrayCoder;
import org.apache.beam.sdk.coders.CoderException; | 0 |
package org.apache.commons.fileupload2.portlet;
import org.apache.commons.fileupload2.FileUploadBase; | 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 |
import org.apache.beam.sdk.schemas.annotations.DefaultSchema; | 0 |
/**
* @deprecated (4.3) use {@link org.apache.http.client.protocol.HttpClientContext#REDIRECT_LOCATIONS}.
*/
@Deprecated
HttpClientContext.REDIRECT_LOCATIONS);
context.setAttribute(HttpClientContext.REDIRECT_LOCATIONS, redirectLocations); | 0 |
import org.apache.cocoon.forms.datatype.typeimpl.EnumType;
* @version CVS $Id: EnumSelectionListTestCase.java,v 1.3 2004/03/10 07:55:55 cziegeler Exp $ | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.