Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import java.security.AccessController;
import java.security.PrivilegedAction;
import org.apache.commons.digester.annotations.internal.GetDeclaredFieldsPrivilegedAction;
import org.apache.commons.digester.annotations.internal.GetDeclaredMethodsPrivilegedAction;
for (Field field : run(new GetDeclaredFieldsPrivile... | 0 |
try (BatchWriter bw = c.createBatchWriter(table)) {
try (BatchWriter bw = c.createBatchWriter(table)) {
try (BatchWriter bw = c.createBatchWriter(table)) { | 0 |
boolean success =
"src/test/resources/at/iaik/ixsil/coreFeatures/signatures",
"src/test/resources/at/iaik/ixsil/coreFeatures/signatures",
| 1 |
package org.apache.hc.core5.http.nio.support;
import org.apache.hc.core5.http.nio.AsyncClientExchangeHandler;
import org.apache.hc.core5.http.nio.AsyncRequestProducer;
import org.apache.hc.core5.http.nio.AsyncResponseConsumer;
import org.apache.hc.core5.http.nio.CapacityChannel;
import org.apache.hc.core5.http.nio.Data... | 1 |
injector.getInstance(GroupDAO.class), injector.getInstance(ViewInstanceDAO.class), injector.getInstance(PrivilegeDAO.class)); | 0 |
@VisibleForTesting
static final String DEFAULT_USER = "UNSECURE";
String getRemoteUserName() {
.orElse(DEFAULT_USER);
com.google.common.base.Optional<String> transitionedBy() {
return com.google.common.base.Optional.of("Transition forced by " + getRemoteUserName());
com.google.common.base.Optiona... | 0 |
import java.util.regex.MatchResult;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
private Matcher _preparse_matcher_;
//_preparse_matcher_ = new Perl5Matcher();
_preparse_pattern_ = Pattern.compile(PRE_PARSE_REGEX);
cat... | 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... | 0 |
* Tests for {@link FlinkStateInternals}. This is based on the tests for
* {@code InMemoryStateInternals}. | 0 |
import org.apache.http.conn.util.SocketUtils;
SocketUtils.connect(sock, host, port, timeout); | 0 |
return parsePatterns(GenericUtils.isEmpty(patterns) ? Collections.emptyList() : Arrays.asList(patterns));
return PATTERN_CHARS.indexOf(ch) >= 0; | 0 |
import org.apache.cocoon.woody.FormContext;
public void readFromRequest(FormContext formContext) {
enteredValue = formContext.getRequest().getParameter(getFullyQualifiedId());
value = definition.getDatatype().convertFromStringLocalized(enteredValue, formContext.getLocale());
public boolean v... | 0 |
import org.apache.http.util.Args;
this.out = Args.notNull(out, "Session output buffer"); | 0 |
* @return A {@link DaemonController} object that can be used to control
* the {@link Daemon} instance that this <code>DaemonContext</code>
* is passed to.
* @return An array of {@link String} arguments supplied by the environment
* corresponding to the array of argume... | 0 |
return IOUtils.toByteArray(in); // Do NOT use file.length() - see IO-453 | 0 |
import org.apache.beam.sdk.values.WindowingStrategy; | 0 |
* @version $Revision: 1.3 $ $Date: 2003/01/11 05:41:23 $
public NameAttributeTest(Expression namePath, Expression nameValue) {
public Expression getNameTestExpression() { | 1 |
import javax.inject.Singleton;
| 1 |
protected static synchronized boolean isXalanInstalled() { | 0 |
List<Object> list = Arrays.asList(data);
IOUtils.writeLines((List<?>) null, "*", out);
List<Object> list = Arrays.asList(data);
List<Object> list = Arrays.asList(data);
List<Object> list = Arrays.asList(data);
IOUtils.writeLines((List<?>) null, "*", out, "US-ASCII");
... | 0 |
* @version CVS $Id: JSIntrospector.java,v 1.4 2003/03/24 14:33:56 stefano Exp $
Context.enter();
Context.enter();
Context.enter();
Context.enter();
Context.enter(); | 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 |
private final static String PROP_DEFAULT_QUERYTIMEOUT = "defaultQueryTimeout";
PROP_ENABLE_AUTOCOMMIT_ON_RETURN,
PROP_DEFAULT_QUERYTIMEOUT
value = properties.getProperty(PROP_DEFAULT_QUERYTIMEOUT);
if (value != null) {
dataSource.setDefaultQueryTimeout(Integer.valueOf(val... | 0 |
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.ParserConfigurationException;
private static DocumentBuilder documentBuilder;
static {
try {
documentBuilder = XMLUtils.createDocumentBuilder(false);
} catch (ParserConfigurationException e) {
throw new R... | 0 |
import org.apache.commons.net.ftp.FTPSClient;
* Usage: ftp [-s] [-b] [-l] [-#] [-k nnn] <hostname> <username> <password> <remote file> <local file> [<SSLprotocol>]
"Usage: ftp [-s] [-b] [-l|-f] [-a] [-e] [-k secs [-w msec]] [-#] <hostname> <username> <password> <remote file> <local file> [TLS|etc.]\n" +
... | 0 |
public abstract RemoteInputDestination<WindowedValue<?>> getRemoteInputDestination(); | 0 |
new PassThroughThenCleanup<>(
new PassThroughThenCleanup<>( | 0 |
*/
public IOR() {
super(org.apache.bcel.Constants.IOR);
}
/**
* Call corresponding visitor method(s). The order is:
* Call visitor methods of implemented interfaces first, then
* call methods according to the class hierarchy in descending order,
* i.e., the most specific visitX... | 0 |
/* This is not thread safe
filesystemClose(key.getFileSystem());
*/
Reference old = (Reference)files.put(file.getName(), ref);
if (old != null)
{
refReverseMap.remove(old);
... | 0 |
* @version $Id$
* @see org.springframework.beans.factory.xml.BeanDefinitionParser#parse(Element, ParserContext)
final String location = getAttributeValue(element, "location", DEFAULT_COCOON_XCONF_LOCATION);
final ConfigurationInfo info = readConfiguration(location, resourceLoader);
... | 0 |
public static Set<String> pkPropertyIds = new HashSet<>();
new HashMap<>();
public static Set<String> propertyIds = new HashSet<>();
Set<Resource> resources = new HashSet<>();
Set<Resource> resources = new HashSet<>();
Set<Resource> resources = new HashSet<>();
descriptor = new HashMap<>... | 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 |
@XmlElement
| 1 |
import org.apache.accumulo.cluster.ClusterUser;
import org.apache.accumulo.core.client.ClientConfiguration;
import org.apache.accumulo.core.client.ClientConfiguration.ClientProperty;
import org.apache.accumulo.core.client.Instance;
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
import org.a... | 0 |
import javax.swing.SwingUtilities;
* The OK button.
*/
protected JButton okButton;
/**
JDialog dialog =
dialog.getRootPane().setDefaultButton(okButton);
okButton = bf.createJButton("OKButton"); | 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... | 0 |
import com.google.cloud.dataflow.sdk.values.TimestampedValue;
public <T> Iterable<TimestampedValue<T>> readTagList(CodedTupleTag<T> tag) throws IOException { | 0 |
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
else if (element instanceof IBundleRepository)
else if (element instanceof Throwable) {
return PlatformUI.getWorkbench().getSharedImages().getImage(
... | 0 |
values.put(CSSConstants.CSS_BASELINE_VALUE,
values.put(CSSConstants.CSS_SUB_VALUE,
values.put(CSSConstants.CSS_SUPER_VALUE,
return false;
return CSSConstants.CSS_BASELINE_SHIFT_PROPERTY;
Object v = values.get(lu.getStringValue().toLowerCase().intern());
if... | 1 |
* @version $Id$ | 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 |
package org.apache.zookeeper.server.quorum;
public interface LocalPeerMXBean extends ServerMXBean {
* @return the number of milliseconds of each tick
*/
public int getTickTime();
/**
* @return the number of ticks that the initial sync phase can take
*/
public int getInitLimit()... | 0 |
try (SftpClient sftp = createSftpClient(session)) {
try (SftpClient sftp = createSftpClient(session)) { | 0 |
final String enc = mock.calculateHttpEncoding( | 0 |
public static boolean isMultiple(Requirement req)
{
return Namespace.CARDINALITY_MULTIPLE.equals(req.getDirectives()
.get(Namespace.REQUIREMENT_CARDINALITY_DIRECTIVE)) && !isDynamic(req);
}
public static boolean isDynamic(Requirement req)
{
return PackageNamespace.RESOLUTION_D... | 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 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 |
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Singleton;
@Singleton
Injector injector = Guice.createInjector(new ControllerModule());
Controller controller = injector.getInstance(Controller.class); | 0 |
@SuppressWarnings("unchecked")
Class<? extends PipelineOptions> clazz = (Class<? extends PipelineOptions>) args[0];
return as(clazz); | 0 |
import org.apache.beam.runners.flink.translation.types.FlinkCoder;
UnboundedFlinkSource<T> flinkSourceFunction = (UnboundedFlinkSource<T>) transform.getSource();
DataStream<T> flinkSource = context.getExecutionEnvironment()
.addSource(flinkSourceFunction.getFlinkSource());
flinkSour... | 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 java.util.Map;
public class DefaultDatatypeManager implements DatatypeManager {
private Map datatypeBuilders;
private Map validatorRuleBuilders;
DatatypeBuilder builder = (DatatypeBuilder) datatypeBuilders.get(typeName);
if (builder == null) {
throw new Exception("Unknown dat... | 0 |
import org.apache.atlas.model.instance.AtlasRelationship;
/**
* This is upon adding new relationships to the repository.
*
* @param relationships the created relationships
* @param isImport
*/
void onRelationshipsAdded(List<AtlasRelationship> relationships, boolean isImport) throws Atl... | 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 no... | 0 |
*
* added in front of the jexl engine, or after in the evaluation.
public interface JexlExprResolver {
/** represents an expression result of no value. */
* Evaluates an expression against the context.
* @return value (may be null) or the NO_VALUE object to | 0 |
import org.apache.accumulo.core.conf.SiteConfiguration;
private static SiteConfiguration siteConfg = SiteConfiguration.create();
super(context, siteConfg); | 0 |
* The lookup for Base64 decoding.
BASE64_DECODER("base64Decoder", new StringLookupAdapter(StringLookupFactory.INSTANCE.base64StringLookup())),
/**
* The lookup for Base64 decoding.
*
* @since 2.4
*/
//BASE64_ENCODER("base64Encoder", new StringLookupAdapter(StringLookupFactory.INST... | 0 |
implements Initializable { | 0 |
"The path relative to the top level instance directory (instance.dfs.dir) where to store the key encryption key within HDFS."),
CRYPTO_DEFAULT_KEY_STRATEGY_KEY_LOCATION("crypto.default.key.strategy.key.location", "/crypto/secret/keyEncryptionKey", PropertyType.ABSOLUTEPATH,
"The path relative to the top l... | 0 |
package org.apache.http.conn; | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
columnLineageProcess.setAttribute(ATTRIBUTE_NAME, hiveProcess.getAttribute(ATTRIBUTE_QUALIFIED_NAME) + ":" + outputColumn.getAttribute(ATTRIBUTE_NAME)); | 0 |
import org.apache.xml.security.stax.ext.XMLSecurityUtils;
XMLSecurityConstants.KeyIdentifierType keyIdentifierType = getSecurityProperties().getSignatureKeyIdentifierType();
if (x509Certificates == null) {
return;
}
if (keyIdentifierType == XMLSecurityConstants.XMLK... | 0 |
import org.apache.http.HttpHeaders;
request.addHeader(HttpHeaders.TRANSFER_ENCODING, "chunked");
request.addHeader(HttpHeaders.TRANSFER_ENCODING, "chunked"); | 0 |
* Copyright 2016 Seznam.cz, a.s. | 0 |
import org.apache.accumulo.core.client.security.tokens.PasswordToken; | 0 |
Map<String,Set<String>> expectedHashes) { | 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 java.util.LinkedList;
import com.google.common.collect.Lists;
import org.apache.aurora.common.quantity.Amount;
import org.apache.aurora.common.quantity.Time;
import org.apache.commons.io.FileUtils;
* {@link #ZooKeeperTestServer()}.
private final LinkedList<Runnable> cleanupActions = Lists.newLinkedList();
... | 0 |
public class BeamRecordSqlType extends BeamRecordType {
public List<Integer> fieldTypes;
protected BeamRecordSqlType(List<String> fieldsName, List<Coder> fieldsCoder) {
private BeamRecordSqlType(List<String> fieldsName, List<Integer> fieldTypes
this.fieldTypes = fieldTypes;
public static BeamRecordSqlType c... | 0 |
return new TestSuite(LocaleBeanUtilsTestCase.class); | 0 |
boolean useOnlyIPV4 = Boolean.valueOf(getPropertyDefault(Activator.bc,Constants.NET_ONLY_IPV4_PROP,"true")).booleanValue();
boolean useOnlyIPV6 = Boolean.valueOf(getPropertyDefault(Activator.bc,Constants.NET_ONLY_IPV6_PROP,"true")).booleanValue();
boolean useLoopback = Boolean.valueOf(getPropertyDefault(Activator... | 0 |
final String versionToCompare;
final String summaryReleaseVersion;
if (StringUtils.isEmpty(manifest.releaseVersion)) {
versionToCompare = release.getFullVersion();
summaryReleaseVersion = release.version;
} else {
versionToCompare = manifest.releaseVersion;
summar... | 0 |
import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.InvalidProtocolBufferException; | 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 |
|| (!request.endsWith(REQUEST_SUFFIX))) { | 1 |
import java.util.List;
final List<? extends Header> trailers = decoder.getTrailers();
Assert.assertEquals(null, trailers);
final List<? extends Header> trailers = decoder.getTrailers();
Assert.assertEquals(2, trailers.size());
Assert.assertEquals("Footer1", trailers.get(0).getNam... | 1 |
private final Tablet committer;
CommitSession(Tablet committer, long seq, InMemoryMap imm) { | 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 |
Option histogramOption = new Option("h", "histogram", false, "print a histogram of the key-value sizes");
opts.addOption(histogramOption);
boolean dump = commandLine.hasOption(dumpKeys.getOpt());
boolean doHistogram = commandLine.hasOption(histogramOption.getOpt());
long countBuckets[] = new long[11... | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Objects; | 0 |
import javax.naming.AuthenticationException;
import javax.naming.CommunicationException;
import javax.naming.Context;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttribut... | 0 |
import cz.seznam.euphoria.testing.DatasetAssert; | 0 |
if (response.getStatusLine().getStatusCode() >= HttpStatus.SC_SUCCESS) { | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/BidiMap.java,v 1.2 2003/10/05 20:38:55 scolebourne Exp $
* @version $Revision: 1.2 $ $Date: 2003/10/05 20:38:55 $
* Puts the key-value pair into the map, replacing any previo... | 0 |
System.out.println("query [" + dslQuery + "] failed, results:" + results); | 0 |
package org.apache.beam.sdk.options;
import org.apache.beam.sdk.options.Validation.Required;
import org.apache.beam.sdk.util.common.ReflectHelpers; | 0 |
import org.apache.http.testserver.SimpleEventListener;
import org.apache.http.testserver.SimpleHttpRequestHandlerResolver; | 0 |
final int buffersize,
final int buffersize,
public void setSocketTimeout(final int timeout) { | 0 |
public CompositeMap(Map<K, V>... composite) { | 0 |
* Copyright (C) 2015 Google Inc. | 0 |
import org.apache.batik.ext.awt.image.SpotLight;
if (light instanceof SpotLight) {
SpotLight slight = (SpotLight)light;
final double[][] LA = new double[w][4];
slight.getLightRow4(x, y+i*scaleY, scaleX, w, NR, LA);
double vs = L[3];
... | 0 |
*
* @deprecated use {@link javax.servlet.http.Cookie} instead. | 0 |
package org.apache.commons.digester3; | 1 |
if (!s.keepAlive(this.conn, this.response)) { | 0 |
import org.apache.batik.svggen.font.table.Os2Table;
import org.apache.batik.svggen.font.table.Table;
import org.apache.batik.svggen.font.table.TableDirectory; | 0 |
this(null);
super(createNodeModel(c));
* Creates the {@code NodeModel} for this configuration based on a passed in
* source configuration. This implementation creates an
* {@link InMemoryNodeModel}. If the passed in source configuration is
* defined, its root node also becomes the ro... | 0 |
if (ke instanceof SessionMovedException) {
throw ke;
}
if (subTxnResult.err == Code.SESSIONMOVED.intValue()) {
throw new SessionMovedException();
} | 0 |
public class CheckAccessTransformer
extends AbstractSAXTransformer
implements Disposable {
/* (non-Javadoc)
public void startElement(String uri, String name, String raw, Attributes attr)
throws SAXException {
if (RIGHTS_NAMESPACE_URI.equals(uri) && ACCESS_TAG.equals(name)) {
if(!urs.us... | 0 |
FlinkBatchPortablePipelineTranslator.createTranslationContext(
jobInfo, pipelineOptions, filesToStage);
FlinkStreamingPortablePipelineTranslator.createTranslationContext(
jobInfo, pipelineOptions, filesToStage); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.