Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
this(false); | 0 |
@SuppressWarnings("rawtypes")
public static final ResettableListIterator RESETTABLE_INSTANCE = new EmptyListIterator<Object>();
@SuppressWarnings("rawtypes")
public static final ListIterator INSTANCE = RESETTABLE_INSTANCE; | 0 |
int FUNCTION_ENDS_WITH = 59;
int FUNCTION_CONTAINS = 60;
int FUNCTION_SUBSTRING_BEFORE = 61;
int FUNCTION_SUBSTRING_AFTER = 62;
int FUNCTION_SUBSTRING = 63;
int FUNCTION_STRING_LENGTH = 64;
int FUNCTION_NORMALIZE_SPACE = 65;
int FUNCTION_TRANSLATE = 66;
int FUNCTION_BOOLEAN = 67;
int FUNCTION_NOT = ... | 0 |
/**
* Copyright 2016 Seznam a.s.
*
* 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 static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
assertNotNull("CorrelationID of SecurityEvent is null: " + securityEvent.getSecurityEventType(), securityEvent.getCorrelationID());
assertTrue("CorrelationID of SecurityEvent is empty: " + securityEvent.getSecurity... | 0 |
return new AlertDefinitionResourceProvider(amc); | 0 |
/** Internal implementation of the Beam runner for Apache Flink. */ | 1 |
import org.apache.http.impl.io.PlainSocketFactory;
SocketFactory socketfactory = PlainSocketFactory.getSocketFactory(); | 0 |
/** A provider of storage instances. */ | 0 |
int type = convertType(filterElement, ctx);
float a = convertValuesToHueRotate(filterElement, ctx);
float [][] matrix = convertValuesToMatrix(filterElement, ctx);
float s = convertValuesToSaturate(filterElement, ctx);
* @param ctx the BridgeContext to use for error infor... | 1 |
import static org.easymock.EasyMock.anyObject;
import static org.easymock.EasyMock.createMockBuilder;
import static org.easymock.EasyMock.createNiceMock;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.reset;
Stage s = new Stage(requestId, ... | 0 |
package com.twitter.aurora.scheduler.state;
import com.twitter.aurora.gen.ScheduleStatus;
import com.twitter.aurora.gen.ScheduledTask;
import com.twitter.aurora.gen.TaskEvent; | 1 |
* @version $Id: JexlTest.java,v 1.2 2002/05/17 07:53:47 jstrachan Exp $
/**
* test some simple mathematical calculations
*/
public void testCalculations()
throws Exception
{
Expression e = ExpressionFactory.createExpression("foo + 2");
JexlContext jc = JexlHelper.crea... | 0 |
import java.io.BufferedOutputStream;
import java.io.OutputStream;
import org.apache.xml.security.utils.SignerOutputStream;
OutputStream so=new BufferedOutputStream(new SignerOutputStream(sa));
si.signInOctectStream(so);
SignerOutputStream so=new SignerOutputStream(sa);
... | 0 |
import org.apache.batik.constants.XMLConstants; | 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 |
public static <T> List<T> synchronizedList(List<T> list) { | 0 |
SamplerConfigurationImpl.toThrift(options.getSamplerConfiguration()), options.batchTimeOut, options.classLoaderContext); | 1 |
import com.google.common.collect.ImmutableList; | 0 |
this.invokeListener(identifier, listener, event); | 0 |
default SummaryRetriever summaries(String tableName) {
throw new UnsupportedOperationException();
}
default void addSummarizers(String tableName, SummarizerConfiguration... summarizers)
throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
throw new UnsupportedOperationExcept... | 0 |
import org.apache.commons.configuration.tree.DefaultConfigurationNode;
XMLPropertyListHandler handler = new XMLPropertyListHandler(getRootNode());
printNode(writer, 1, getRootNode());
printNode(out, indentLevel, ((HierarchicalConfiguration) value).getRootNode());
Configuratio... | 0 |
public TConstraintViolationException(Violations violations, List<Mutation> violators,
List<Mutation> nonViolators, CommitSession commitSession) { | 0 |
request = new UpgradeCheckRequest(clusterInformation, UpgradeType.ROLLING, repoVersion(), null, null); | 0 |
* Copyright 2000-2009 The Apache Software Foundation | 0 |
import org.apache.accumulo.shell.ShellOptions;
tableOpt = new Option(ShellOptions.tableOption, "table", true, "table to display/set/delete properties for");
namespaceOpt = new Option(ShellOptions.namespaceOption, "namespace", true, "namespace to display/set/delete properties for"); | 1 |
String configFile = System.getProperty("org.apache.accumulo.config.file", "accumulo-site.xml.1GBstandalone-example"); | 0 |
import javax.ws.rs.PathParam;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;
import org.apache.ambari.server.bootstrap.BSResponse;
import org.apache.ambari.server.bootstrap.BootStrapImpl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.goog... | 0 |
return storage.read(new Work.Quiet<Response>() { | 0 |
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.doReturn;
import aQute.bnd.osgi.Analyzer;
import aQute.bnd.osgi.Jar;
import aQute.bnd.osgi.Resource;
import aQute.bnd.osgi.URLResource;
import aQute.service.reporter.Reporter;
import junit.framework.TestCase; | 0 |
this(sslcontext, sslHandler, DefaultHttpResponseFactory.INSTANCE,
HeapByteBufferAllocator.INSTANCE, params); | 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.
* @version $Revision: 1.9 $ $Date: 2003/10/13 08:44:28 $ | 0 |
*
* @deprecated use {@link DefaultServerIODispatch}
@Deprecated | 0 |
final List<T> rows = new ArrayList<>(); | 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
... | 0 |
public static class UserAuthPasswordFactory implements UserAuthFactory { | 0 |
import org.apache.hadoop.io.MapFile;
import org.apache.hadoop.io.SequenceFile;
public static MapFile.Reader openMapFile(AccumuloConfiguration acuconf, FileSystem fs, String dirName, Configuration conf) throws IOException {
MapFile.Reader mfr = null;
mfr = new MapFile.Reader(fs, dirName, conf);
public stat... | 0 |
* @since 3.4 | 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 not... | 0 |
/* $Id: LoaderFromStream.java,v 1.5 2004/05/10 06:34:01 skitching Exp $
* Copyright 2004 The Apache Software Foundation. | 0 |
private static byte[] getBytes(final String string, final Charset charset) {
public static byte[] getBytesIso8859_1(final String string) {
public static byte[] getBytesUnchecked(final String string, final String charsetName) {
} catch (final UnsupportedEncodingException e) {
public static byte[]... | 1 |
import org.apache.hc.core5.annotation.NotThreadSafe;
import org.apache.hc.core5.util.Args; | 1 |
import org.apache.accumulo.core.client.impl.Table;
MetadataTableUtil.splitDatafiles(midRow, splitRatio, firstAndLastRows, getDatafileManager().getDatafileSizes(), lowDatafileSizes, highDatafileSizes,
highDatafilesToRemove);
private static String createTabletDirectory(VolumeManager fs, Table.ID tableId... | 1 |
conn.tableOperations().addSplits(table, new TreeSet<>(Arrays.asList(new Text(row)))); | 0 |
repositoryVersion, null, null);
repositoryVersion, null, null); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/MapUtils.java,v 1.5 2002/06/12 03:59:15 mas Exp $
* $Revision: 1.5 $
* $Date: 2002/06/12 03:59:15 $
* @since 1.0 | 0 |
*
*
*
/**
* @version $Revision: 1.5 $
//------------------------------------------------------------------------- | 1 |
EqualsPredicate predicate1 = new EqualsPredicate<>(propertyId1, "v1");
EqualsPredicate predicate2 = new EqualsPredicate<>(propertyId2, "v2");
EqualsPredicate predicate3 = new EqualsPredicate<>(propertyId3, "v3");
EqualsPredicate predicate1 = new EqualsPredicate<>(propertyId1, "v1");
EqualsPredicate ... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/io/Attic/InputStreamByteIterator.java,v 1.2 2003/08/31 12:58:19 scolebourne Exp $
* @version $Revision: 1.2 $ $Date: 2003/08/31 12:58:19 $
// TODO:... | 0 |
private static final long serialVersionUID = -4528733406576671849L;
| 0 |
import java.util.Enumeration;
ClassLoader cl = findClassLoader();
Enumeration enumResources = null;
try
{
enumResources = cl.getResources(PLUGIN_CONFIG_RESOURCE);
}
catch (IOException e)
{
throw new FileSystemException(e);
}
while (enumResources.hasMoreElements())
{
URL url = (URL) enum... | 0 |
private static Log logger = LogFactory.getLog(LazyDynaBean.class); | 0 |
keyCoder.encode(kv.getKey(), outStream);
K key = keyCoder.decode(inStream); | 0 |
package org.apache.felix.ipojo.test.scenarios.factories;
import org.apache.felix.ipojo.test.scenarios.factories.service.BarService;
import org.apache.felix.ipojo.test.scenarios.factories.service.FooService;
ServiceReference ref1 = Utils.getServiceReferenceByName(context, Factory.class.getName(), "Factories-FooProvide... | 0 |
import org.apache.felix.http.base.internal.util.PatternUtil;
// TODO - do we need to check the prefix?
boolean valid = super.isValid() && !isEmpty(this.patterns) && !isEmpty(this.prefix);
if ( valid ) {
for(final String p : patterns)
{
if ( !PatternUtil.is... | 0 |
if (entity != null) {
entity.consumeContent();
} | 0 |
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import org.junit.Test;
public class TestMultiFileHierarchicalConfiguration
@Test
@Test
@Test
@Test
@Test
@Test
@Test
@... | 0 |
* @author Enver Haase | 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.logsearch.model.request.impl.query.EventHistoryQueryRequest;
EventHistoryRequest request = new EventHistoryQueryRequest(); | 0 |
//FIXME: Not sure if UTF-8 should always be used, do we have defined this encoding somewhere in Cocoon?
IOUtils.copy(new StringReader(xml), servletSource.getOutputStream(), "UTF-8"); | 0 |
package org.apache.bcel.data;
@MarkerAnnotationInvisible
@MarkerAnnotation
public class MarkedType
{
} | 0 |
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting; | 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 |
* @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> | 0 |
/*
* $HeadURL$
* $Revision$
* $Date$
* ====================================================================
* 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 ow... | 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 |
* If the property {@code dataflow.spark.directBroadcast} is set to
* {@code true} then Spark serialization (Kryo) will be used to broadcast values
* the appropriate {@link Coder}.
* {@link Coder} to encode values as byte arrays | 0 |
protected final RequestSpec request_spec; | 0 |
import com.google.api.client.util.Base64;
import org.apache.beam.sdk.util.SerializableUtils; | 0 |
import org.apache.atlas.model.typedef.AtlasBaseTypeDef;
import org.apache.atlas.model.typedef.AtlasClassificationDef;
import org.apache.atlas.model.typedef.AtlasEntityDef;
import org.apache.atlas.model.typedef.AtlasEnumDef;
import org.apache.atlas.model.typedef.AtlasRelationshipDef;
import org.apache.atlas.model.typede... | 0 |
line = GenericUtils.replaceWhitespaceAndTrim(line); | 0 |
* Copyright 2005-2011 The Apache Software Foundation.
throws InvalidAlgorithmParameterException
{
throws InvalidAlgorithmParameterException
{
Map<String, String> namespaceMap =
new HashMap<String, String>(length);
Attr attr = (Attr)attributes.item(i);
... | 0 |
* Return stream for class or resource on CLASSPATH.
*
InputStream is = null;
try {
is = getClass().getClassLoader().getResourceAsStream(name + suffix);
} catch(Exception e) { }
if(is != null)
return is;
| 0 |
/** Unit test for {@link DatetimeReinterpretConversions}. */
private static final BeamSqlPrimitive DATE_PRIMITIVE =
BeamSqlPrimitive.of(SqlTypeName.DATE, DATE);
private static final BeamSqlPrimitive TIME_PRIMITIVE =
BeamSqlPrimitive.of(SqlTypeName.TIME, TIME);
private static final BeamSqlPrimitive TIM... | 0 |
package org.apache.felix.utils.resource;
import org.apache.felix.utils.resource.RequirementImpl;
RequirementImpl r2 = new RequirementImpl("org.foo.bar", attrs, dirs, res);
Resource res = Mockito.mock(Resource.class);
res);
RequirementImpl r3 = new RequirementImpl(res, r);
... | 0 |
import io.gearpump.streaming.dsl.api.functions.FoldFunction;
import io.gearpump.streaming.dsl.api.functions.MapFunction;
import io.gearpump.streaming.dsl.javaapi.JavaStream;
import io.gearpump.streaming.dsl.window.impl.Window;
/**
* Constructs a partial union from the given union tag and value.
*
* @... | 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 |
setTitle(title + ": " + dt);
if (i == -1)
if (i == -1) {
setTitle(title + ": " + s);
setTitle(title + ": " + s.substring(i + 1)); | 0 |
return VoidCounter.INSTANCE;
return VoidHistogram.INSTANCE;
return VoidTimer.INSTANCE;
LOG.warn("Using accumulators with VoidAccumulatorProvider will have no effect");
public static Factory get() {
return INSTANCE;
}
private static class VoidCounter implements Counter {
private sta... | 0 |
protected void updated(DictionaryConfiguration cnf) {
m_lang = cnf.lang();
m_words.clear();
for (String word : cnf.words()) {
m_words.add(word); | 0 |
import org.apache.ambari.server.orm.entities.RepoDefinitionEntity;
import org.apache.ambari.server.orm.entities.RepoOsEntity;
private static final Function<RepoDefinitionEntity, String> REPO_ENTITY_TO_NAME = new Function<RepoDefinitionEntity, String>() {
@Override
public String apply(@Nullable RepoDefinitionE... | 0 |
this.responseFactory = DefaultHttpResponseFactory.INSTANCE; | 0 |
package org.apache.commons.vfs2.impl;
import org.apache.commons.vfs2.FileListener;
import org.apache.commons.vfs2.FileMonitor;
import org.apache.commons.vfs2.FileName;
import org.apache.commons.vfs2.FileObject;
import org.apache.commons.vfs2.FileSystemException;
import org.apache.commons.vfs2.provider.AbstractFileSyste... | 1 |
private static final org.slf4j.Logger LOG = | 1 |
fn.extractOutput(accumulator); // Extract output to simulate multiple firings | 0 |
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/TestBean.java,v 1.10 2002/07/20 19:12:45 craigmcc Exp $
* $Revision: 1.10 $
* $Date: 2002/07/20 19:12:45 $
* @version $Revision: 1.10 $ $Date: 2002/07/20 19:12:45 $
* A mapped ... | 0 |
* @throws IOException
* If some I/O error occurs.
* @throws IOException
* If some I/O error occurs.
* @throws SecurityException
* if a security manager exists and its {@code checkRead} method denies read access to the file. | 0 |
public void testBuildConditionalRequestWithLastModified() {
public void testBuildConditionalRequestWithETag() { | 0 |
ids[0] = Hex.decodeHex("94ed8d0319e4493399560fb67404d370");
ids[1] = Hex.decodeHex("2bf7cc2701fe4397b49ebeed5acc7090");
ids[2] = Hex.decodeHex("64be154b6ffa40258d1a01288e7c31ca");
ids[3] = Hex.decodeHex("ff7f8fc01cdb471a8c8b5a9306183fe8"); | 0 |
Copyright 2002 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 or... | 0 |
import javax.ws.rs.PUT;
* Handles: PUT /clusters/{clusterId}/requests/{requestId} or /requests/{requestId}
* Change state of existing requests. Usually used to cancel running requests
*
* @param body http body
* @param headers http headers
* @param ui uri info
* @return informat... | 0 |
import org.apache.beam.sdk.extensions.sql.impl.rule.BeamIOSinkRule;
import org.apache.calcite.plan.RelOptPlanner;
import org.apache.calcite.sql2rel.RelStructuredTypeFlattener;
public class BeamIOSinkRel extends TableModify
implements BeamRelNode, RelStructuredTypeFlattener.SelfFlatteningRel {
private final BeamSq... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/DynaTag.java,v 1.5 2002/09/30 17:38:16 jstrachan Exp $
* $Revision: 1.5 $
* $Date: 2002/09/30 17:38:16 $
* $Id: DynaTag.java,v 1.5 2002/09/30 17:38:16 jstrachan Exp $
* @version $Revision:... | 0 |
this.logSet = new ArrayList<>(le.logSet);
ArrayList<String> logSet = new ArrayList<>(count); | 0 |
import org.apache.sshd.common.PropertyResolverUtils;
String headerConfig = PropertyResolverUtils.getString(this, ServerFactoryManager.SERVER_EXTRA_IDENTIFICATION_LINES);
String[] headers = GenericUtils.split(headerConfig, ServerFactoryManager.SERVER_EXTRA_IDENT_LINES_SEPARATOR);
sendServerIdenti... | 0 |
import com.google.cloud.dataflow.sdk.util.common.worker.NativeReader;
NativeReader<?> reader =
ReaderFactory.Registry.defaultRegistry()
.create(
cloudSource,
PipelineOptionsFactory.create(),
BatchModeExecutionContext.fromOptions(PipelineOptionsFact... | 0 |
import org.apache.beam.vendor.grpc.v1p21p0.io.grpc.BindableService;
import org.apache.beam.vendor.grpc.v1p21p0.io.grpc.ManagedChannel;
import org.apache.beam.vendor.grpc.v1p21p0.io.grpc.Server;
import org.apache.beam.vendor.grpc.v1p21p0.io.grpc.inprocess.InProcessChannelBuilder;
import org.apache.beam.vendor.grpc.v1p21... | 0 |
import scala.math.BigInt;
} else if ( val instanceof Integer || val instanceof BigInt) { | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.