Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import java.util.Enumeration; import javax.xml.transform.TransformerException; import org.w3c.dom.Attr; Attr nodeToDelete = (Attr) nodesToRemove.get(i); Element nodeToDeleteParent = (Element) node; // nodeToDelete.getParentNode(); if (lh == null && ch instanceof LexicalHandle...
0
import java.io.StringWriter; /** * Tests whether the correct line separator is used. */ public void testLineSeparator() throws ConfigurationException { final String EOL = System.getProperty("line.separator"); conf = new PropertiesConfiguration(); conf.setHeader("My header"...
0
StringBuilder buffer = new StringBuilder("ServiceRemovedEvent{");
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
* @version CVS $Id: ParserTransformerTestCase.java,v 1.5 2004/02/02 12:35:04 stephan Exp $ public void testParserTransformer1() throws Exception { public void testParserTransformer2() throws Exception { /*public void testParserTransformer3() throws Exception {
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument; import org.apache.beam.vendor.guava.v20_0.com.google.common.base.MoreObjects;
0
/* $Id$ * * 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"); ...
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
return new TestSuite(Jira345TestCase.class);
0
/** Transforms for reading and writing Xml files. */
1
int ivLen = JCEMapper.getIVLengthFromURI(algorithm) / 8; byte[] temp = new byte[ivLen]; XMLSecurityConstants.secureRandom.nextBytes(temp); IvParameterSpec paramSpec = new IvParameterSpec(temp); c.init(cipherMode, key, paramSpec); int ivLen = JCEMapper....
0
new LinkedBlockingQueue<>(configuration.getAuditLoggerCapacity()), new AuditLogThreadFactory(),
0
final int buffersize, public LoggingBHttpClientConnection(final int buffersize) {
0
val.append( " from " );
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 javax.annotation.Nullable; * FlinkBatchPortablePipelineTranslator.createTranslationContext(jobInfo, confDir, filesToStage); JobInfo jobInfo, FlinkPipelineOptions pipelineOptions, @Nullable String confDir, List<String> filesToStage) { FlinkExecutionEnvironments.createBatchEx...
0
private static final String[] TRANSFORM_ALGOS = {
0
import java.io.BufferedReader; import java.io.IOException; import java.net.MalformedURLException; import java.security.Principal; import java.util.Enumeration; import java.util.Iterator; import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.Vector; import javax.servlet.RequestDispatcher...
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument; import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkNotNull; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
0
/** * @since 4.6 */ public String getValue() { return this.value; }
0
conn.setSocketTimeout(Timeout.ofMilliseconds(123)); conn.setSocketTimeout(Timeout.ofMilliseconds(123)); Assert.assertEquals(Timeout.ofMilliseconds(345), conn.getSocketTimeout());
0
/* $Id$ * * 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"); ...
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...
0
import java.io.ByteArrayInputStream;
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 ...
1
import org.apache.accumulo.harness.UnmanagedAccumuloIT; public class CredentialsIT extends UnmanagedAccumuloIT {
0
private static final ByteKey KEY_LARGER_THAN_END = ByteKey.of(0x35); @Test public void testGetFractionConsumedAfterDone() { ByteKeyRangeTracker tracker = ByteKeyRangeTracker.of(INITIAL_RANGE); double delta = 0.00001; assertTrue(tracker.tryReturnRecordAt(true, INITIAL_START_KEY)); tracker.markDone...
0
FtpFileSystemConfigBuilder.getInstance().setConnectTimeout(opts, 10000);
0
package org.apache.beam.sdk.util; import org.apache.beam.sdk.coders.Coder; import org.apache.beam.sdk.options.PipelineOptions; import org.apache.beam.sdk.transforms.windowing.BoundedWindow; import org.apache.beam.sdk.transforms.windowing.PaneInfo; import org.apache.beam.sdk.util.TimerInternals.TimerData; import org.apa...
0
import org.apache.batik.util.SVGTypes; * Implements {@link ValueManager#isAnimatableProperty()}. */ public boolean isAnimatableProperty() { return true; } /** * Implements {@link ValueManager#isAdditiveProperty()}. */ public boolean isAdditiveProperty() { return fal...
1
* Returns an invoker that will call the given {@link DoFn DoFn's} {@link OnTimer @OnTimer} method * for the given {@code timerId}, using a default choice of {@link OnTimerInvokerFactory}. * <p>The default is permitted to change at any time. Users of this method may not depend on any * details {@link OnTimer...
0
import static org.junit.Assert.assertNotEquals; assertEquals(r, r); assertEquals(r, r2); assertEquals(r2, r); assertNotEquals(r, rx1); assertNotEquals(r, rx2); assertNotEquals(r, rx3); assertEquals(r, re1); assertEquals(r, re2);
0
import javax.ws.rs.*;
0
final Properties pomProps = ResourceUtils.getPOMProperties("org.apache.cocoon", "cocoon-spring-configurator"); final String version; if ( pomProps != null ) { version = pomProps.getProperty("version"); } else { version = null; } this.servletContex...
0
@Override public int defaultTimeoutSeconds() { return 5 * 60; } @Test @Test @Test @Test @Test
0
AccumuloClient c = Accumulo.newClient().from(clientInfo.getProperties()).build();
0
import static java.nio.charset.StandardCharsets.UTF_8; import java.util.Base64; return encode ? new String(Base64.getEncoder().encode(TextUtil.getBytes(text)), UTF_8) : DefaultFormatter.appendText(new StringBuilder(), text, length) .toString(); return new String(Base64.getEncoder().encode(digester.dige...
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkState;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/Digester.java,v 1.39 2002/01/12 22:32:37 sanders Exp $ * $Revision: 1.39 $ * $Date: 2002/01/12 22:32:37 $ * @version $Revision: 1.39 $ $Date: 2002/01/12 22:32:37 $ String ...
0
package org.apache.felix.sigil.repository; import org.apache.felix.sigil.model.IModelElement; import org.apache.felix.sigil.model.eclipse.ISigilBundle;
0
public class FtpFileSystem extends AbstractFileSystem { // private final String hostname; // private final int port; // private final String username; // private final String password; */ final FileSystemOptions fileSystemOptions) { protected void doCloseCommunicationLink() { ...
1
@Override
0
import org.apache.cocoon.portal.om.Item; import org.apache.cocoon.portal.om.LayoutFeatures; import org.apache.cocoon.portal.om.LayoutInstance; import org.apache.cocoon.portal.om.NamedItem; extends LayoutInstanceChangeAttributeEvent { public ChangeTabEvent(LayoutInstance instance, Item item, boolean useName) { ...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/bidimap/AbstractTestOrderedBidiMap.java,v 1.2 2003/11/20 00:31:42 scolebourne Exp $ import java.util.Map; import org.apache.commons.collections.BulkTest; import org.apache.commons....
0
String encodedPassword = Base64.getMimeEncoder().encodeToString(password.getBytes("ISO-8859-1")); String authString = "Basic " + Base64.getMimeEncoder().encodeToString(password.getBytes("ISO-8859-1"));
0
firstNonNull(transformStepNames, ImmutableMap.of()));
0
int cmd = buffer.getUByte();
0
/** The key for properties in the login context. */ String LOGIN_CONTEXT_PROPERTIES_KEY = "properties"; /** The key for properties in the logout context. */ String LOGOUT_CONTEXT_PROPERTIES_KEY = "properties";
0
import java.util.Map; import javax.xml.transform.Transformer; * Apply a XSLT stylesheet to the contained layout. All following renderer aspects * are applied first before the XML is fed into the XSLT. All layout parameters * are made available to the stylesheet. * * <h2>Example XML:</h2> * <pre> * &lt;-- resul...
0
List<AtlasKafkaMessage<HookNotificationMessage>> messages = consumer.receive();
0
assertSortOrder(new LongLexicoder(), Arrays.asList(Long.MIN_VALUE, 0xff1234567890abcdl, 0xffff1234567890abl, 0xffffff567890abcdl, 0xffffffff7890abcdl, 0xffffffffff90abcdl, 0xffffffffffffabcdl, 0xffffffffffffffcdl, -1l, 0l, 0x01l, 0x1234l, 0x123456l, 0x12345678l, 0x1234567890l, 0x1234...
0
package org.apache.batik.bridge; import org.apache.batik.gvt.filter.ConcreteTileRable;
0
package org.apache.accumulo.server.tables;
1
import org.apache.ambari.view.hive2.resources.uploads.ColumnDescriptionImpl; import java.util.List; private List<ColumnDescriptionImpl> header; private Boolean unhexInsert = Boolean.FALSE; public InsertFromQueryInput(String fromDatabase, String fromTable, String toDatabase, String toTable, List<ColumnDescriptio...
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.AbstractIterator; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Iterables; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Iterators; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common....
0
/* * $Header: /cvshome/build/ee.foundation/src/java/security/Principal.java,v 1.6 2006/03/14 01:20:27 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"); * you may not use...
0
import java.util.Collection; import java.util.HashMap; import javax.servlet.Servlet; import org.apache.felix.http.api.ExtHttpService; import org.apache.felix.http.base.internal.logger.SystemLogger; import org.osgi.framework.Bundle; import org.osgi.framework.Constants; import org.osgi.framework.ServiceReference; import...
0
return Content.NO_CONTENT;
0
import org.apache.http.annotation.Immutable; /** * @since 4.2 */ @Immutable
0
private final EvaluationContext evaluationContext; FlattenEvaluatorFactory(EvaluationContext evaluationContext) { this.evaluationContext = evaluationContext; } CommittedBundle<?> inputBundle ) { (AppliedPTransform) application, inputBundle); final CommittedBundle<InputT> inputB...
0
public void testAllowLocal() { DomainValidator noLocal = DomainValidator.getInstance(false); DomainValidator allowLocal = DomainValidator.getInstance(true); // Default is false, and should use singletons assertEquals(noLocal, validator); // Default won't allow...
0
* Copyright 2000-2009 The Apache Software Foundation
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
// FIXME: workaround for JXPath bug iter = new JSIntrospector.NativeArrayIterator((NativeArray)val); iter = compiledExpression.iteratePointers(jxpathContext);
0
p.put("instance.name","importer"); p1.put("instance.name","foo1"); p2.put("instance.name","foo2");
0
import java.text.AttributedCharacterIterator; import java.util.ArrayList; import java.util.Iterator; import java.awt.geom.Point2D; import java.awt.font.FontRenderContext; import java.awt.font.TextAttribute; import java.util.HashSet; import java.util.LinkedList; import java.util.Set; import org.apache.batik.gvt.font.G...
0
* @version $Id$
0
import java.util.LinkedList; import java.util.List; import java.util.Set; import java.util.TreeSet; @Override public List<Set<AuthProperty>> getProperties() { Set<AuthProperty> internal = new TreeSet<AuthProperty>(); List<Set<AuthProperty>> toRet = new LinkedList<Set<AuthProperty>>(); toRet.add(inter...
0
import org.cometd.bayeux.server.BayeuxServer; public BayeuxServer getBayeuxServer()
0
if (targetpath == null) { targetpath = "/"; }
0
if (entry.getKey().startsWith(Property.TRACE_TOKEN_PROPERTY_PREFIX.getKey())) continue;
0
private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(DOMSignedInfo.class); if (log.isDebugEnabled()) { log.debug("Canonicalized SignedInfo:"); StringBuilder sb = new StringBuilder(signedInfoBytes.length); log.debug(sb.t...
0
public RepositoryVersionService getRepositoryVersionHandler(@PathParam("stackVersionId") String stackVersionId) {
0
import org.apache.hc.core5.http.nio.AsyncClientEndpoint; Future<AsyncClientEndpoint> future = requester.connect(target, 5, TimeUnit.SECONDS); AsyncClientEndpoint clientEndpoint = future.get();
0
* methods provided by the {@link OldDoFn} abstract class.
0
this.encodeSize = 4 + lineSeparator.length;
0
import org.apache.http.client.protocol.ClientContext; import org.apache.http.protocol.SyncBasicHttpContext; return new SyncBasicHttpContext(null); ClientContext.AUTHSCHEME_REGISTRY, ClientContext.COOKIESPEC_REGISTRY, ClientContext.HTTP_STATE,
0
State state = ensureNotNull(getState(conn)); synchronized (state) { if (state.getResponseState().compareTo(MessageState.READY) > 0) { conn.suspendInput(); } else { conn.close(); } }
0
/** * Copyright 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 by applic...
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableMap;
0
OutgoingMessage message = new OutgoingMessage(DATA.getBytes(), ImmutableMap.of(), TIMESTAMP, getRecordId(DATA)); PubsubTestClient.createFactoryForPublish(TOPIC, outgoing, ImmutableList.of())) { PubsubTestClient.createFactoryForPublish(TOPIC, outgoing, ImmutableList.of())) { outgoing.ad...
0
package org.apache.beam.sdk.extensions.euphoria.beam.testkit; import org.apache.beam.sdk.extensions.euphoria.beam.testkit.junit.AbstractOperatorTest; import org.apache.beam.sdk.extensions.euphoria.beam.testkit.junit.Processing;
0
* Gets all cluster stack versions. return handleRequest(headers, null, ui, Request.Type.GET, createResource(null)); * Handles: GET /clusters/{clustername}/stack_versions/{stackVersionId} requests. @Path("{stackVersionId}") @PathParam("stackVersionId") String stackVersionId) { return handleRequest(...
0
import com.dataartisans.flink.dataflow.translation.types.VoidCoderTypeSerializer; @SuppressWarnings("unchecked") OUT outValue = coder.decode(bai, Coder.Context.OUTER); if (outValue == null) { // TODO Flink doesn't allow null values in records out.collect((OUT) VoidCoderTypeSerializer.VoidValue.INSTANCE)...
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
* @version $Revision$ $Date$
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger log = LoggerFactory.getLogger(CredentialProviderFactoryShimTest.class); if (!keystoreFile.delete()) { log.error("Unable to delete {}", keystoreFile); }
0
public interface SizedSideInputReader extends SideInputReader { * value of this method must still be non-{@code null}. It should be a {@link Sized} * object where {@link Sized#getValue()} returns {@code null} and {@link Sized#getSize()} may * still return any non-negative value. <T> Sized<T> getSized(PCollec...
0
* Structure storing the reference, the factory and the registration. * Reference of the represented factory from the external context. * Represented Factory. * @param arg0 : the service listener object to add * @throws InvalidSyntaxException : occurs if the LDAP filter is malformed ...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/xml/Attic/ExprTag.java,v 1.4 2002/05/15 06:25:49 jstrachan Exp $ * $Revision: 1.4 $ * $Date: 2002/05/15 06:25:49 $ * $Id: ExprTag.java,v 1.4 2002/05/15 06:25:49 jstrachan Exp $ import ...
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...
0
package org.apache.ambari.infra.solr.commands; import org.apache.ambari.infra.solr.AmbariSolrCloudClient;
0
* @version CVS $Id: LuceneIndexTransformer.java,v 1.6 2003/08/04 03:12:16 joerg Exp $ if (!indexExists) { } Directory directory = LuceneCocoonHelper.getDirectory(indexDirectory, createIndex); ...
0
* This class implements {@link SVGRectElement}. * <b>DOM</b>: Implements {@link Node#getLocalName()}. return SVG_RECT_TAG; * <b>DOM</b>: Implements {@link SVGRectElement#getX()}. throw new RuntimeException(" !!! TODO: getX()"); * <b>DOM</b>: Implements {@link SVGRectElement#getY()}. ...
0
@Override public String getLogType() { return "service"; }
0
package com.twitter.mesos.scheduler.configuration;
0
public synchronized DatagramPacket getDatagramPacket() { if (dp == null) { dp = new DatagramPacket(buf, buf.length); dp.setPort(NTP_PORT); }
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
public HttpAsyncRequestExecutor(final int waitForContinue) { public void setTimeout(final int timeout) {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/AbstractRandomAccessIntList.java,v 1.5 2003/01/09 13:40:10 rwaldhoff Exp $ * $Revision: 1.5 $ * $Date: 2003/01/09 13:40:10 $ import org.apache.commons.collection...
0