Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import org.apache.xml.security.stax.impl.util.UnsynchronizedByteArrayInputStream; InputStream in = new UnsynchronizedByteArrayInputStream(data);
0
if (outputMap.size() == 1) {
0
@Element KV<String, Integer> element,
0
javax.xml.parsers.DocumentBuilder db = XMLUtils.createDocumentBuilder(false); javax.xml.parsers.DocumentBuilder db = XMLUtils.createDocumentBuilder(false);
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger log = LoggerFactory.getLogger(ReplicationDriver.class); long sleepMillis = conf.getTimeInMillis(Property.MASTER_REPLICATION_SCAN_INTERVAL); log.debug("Sleeping for {}ms before re-running", sleepMillis); try { ...
0
} catch (Throwable t) { filt = ImageTagRegistry.getBrokenLinkImage (errCode, errParam);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/xml/Attic/ParseTag.java,v 1.13 2002/10/30 19:16:23 jstrachan Exp $ * $Revision: 1.13 $ * $Date: 2002/10/30 19:16:23 $ * Copyright (c) 2002 The Apache Software Foundation. All rights ...
0
if (table == null) { table = "KARAF_LOCK"; } if ( clusterName == null) { clusterName = "karaf"; }
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
return status >= HttpStatus.SC_SUCCESS if (response.getStatusLine().getStatusCode() >= HttpStatus.SC_SUCCESS && this.incoming != null) {
0
import org.apache.accumulo.core.client.IteratorSetting; compact(tableName, start, end, new ArrayList<IteratorSetting>(), flush, wait); } public void compact(String tableName, Text start, Text end, List<IteratorSetting> iterators, boolean flush, boolean wait) throws AccumuloSecurityException, TableNotFo...
0
private final KeyedObjectPool<K, PoolablePreparedStatement<K,S>> _pool; private final K _key;
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
* * * * * * * * *
0
import org.apache.batik.constants.XMLConstants;
0
this.hasBufferedInput = this.inbuf.hasData(); this.hasBufferedOutput = this.outbuf.hasData();
0
import org.apache.beam.sdk.PipelineRunner; * this transform and each {@link PipelineRunner} to implement
0
currentScope.exchangeId,
0
public void testAppendCharSequence() throws Exception { proxy.close(); public void testWriteString() throws Exception { proxy.close(); public void testWriteStringPartial() throws Exception { proxy.close(); public void testWriteCharArray() throws Exception { proxy....
0
import org.apache.accumulo.core.client.BatchWriterConfig; BatchWriter dirBW = conn.createBatchWriter(nameTable, new BatchWriterConfig()); BatchWriter indexBW = conn.createBatchWriter(indexTable, new BatchWriterConfig()); BatchWriter dataBW = conn.createBatchWriter(dataTable, new BatchWriterConfig());
0
public static final String actionVerb = "Executing"; @Override public StageWrapper.Type getStageWrapperType() { return StageWrapper.Type.RU_TASKS; } @Override public String getActionVerb() { return actionVerb; }
0
import org.apache.sshd.util.test.CommonTestSupportUtils; KeyPair identity = CommonTestSupportUtils.getFirstKeyPair(sshd); CommonTestSupportUtils.createTestHostKeyProvider(clientIdFile.resolve(getCurrentTestName() + ".pem")); KeyPair specificIdentity = CommonTestSupportUtils.getFirstKeyPair(s...
0
private final Set<String> propertyIds = new HashSet<String>(); /** * Factory method. * * @param predicates the predicate array * * @return a new ArrayPredicate */ public abstract BasePredicate create(BasePredicate... predicates); public Set<String> getPropertyIds() {
1
if (lines.isEmpty()) {
0
EventSourceSupport.BUILDER);
0
synchronized public void setLastCompactionID(Long compactionId) {
0
final long len) {
0
import org.apache.hc.core5.http.nio.support.BasicRequestProducer; import org.apache.hc.core5.http.nio.support.BasicResponseConsumer;
0
import java.awt.Container; * the second argument of {@link Container#add(Component,Object)}.
0
import java.io.IOException; import java.net.SocketAddress; import java.util.concurrent.Future; import org.apache.hc.core5.concurrent.FutureCallback; import org.apache.hc.core5.io.ShutdownType; import org.apache.hc.core5.net.NamedEndpoint; import org.apache.hc.core5.reactor.IOReactorService; import org.apache.hc.core5.r...
0
public WidgetDefinition buildWidgetDefinition(Element element, WidgetDefinitionBuilderContext context) throws Exception { setupDefinition(element, definition, context); setDisplayData(element, definition); setupContainer(element, "widgets", definition, context);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/test/org/apache/commons/digester/RuleTestCase.java,v 1.25 2003/10/05 15:35:36 rdonkin Exp $ * $Revision: 1.25 $ * $Date: 2003/10/05 15:35:36 $ * * Copyright (c) 2001-2003 The Apache Software Foundation. All rights...
0
import java.util.Set; /** * Validate the state of the instance. * * @param viewEntity the view entity to which this instance will be bound * * @throws IllegalStateException if the instance is not in a valid state */ public void validate(ViewEntity viewEntity) throws IllegalStateException { /...
0
package org.apache.commons.ognl.test.objects;
0
import java.util.HashMap; import java.util.Map; import java.util.Set; @Override public Map<Long, Set<Long>> getSessionExpiryMap() { return new HashMap<Long, Set<Long>>(); }
1
@Parameter(names="--search", description="find a file or directory with the given name")
0
* @version $Id$
0
* When coupled with a {@link org.apache.http.ConnectionReuseStrategy}, if * {@link org.apache.http.ConnectionReuseStrategy#keepAlive( * HttpResponse, HttpContext)} returns true, this allows you to control * how long the reuse will last. If keepAlive returns false, this should * have no meanin...
0
import org.apache.cocoon.el.Expression;
0
* Copyright (C) 2015 Google Inc.
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 applicable law o...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/compiler/VariableReference.java,v 1.6 2003/01/19 23:59:24 dmitri Exp $ * $Revision: 1.6 $ * $Date: 2003/01/19 23:59:24 $ * @version $Revision: 1.6 $ $Date: 2003/01/19 23:59:24 $ ...
0
public void service(ServiceManager serviceManager) { this.manager = serviceManager; public void contextualize(Context avalonContext) { this.context = avalonContext;
0
String DATA_FILE_NAME = "identity.dat"; String HOSTNAME = "hostname"; String SERVICE = "service"; String COMPONENT = "component"; String PRINCIPAL = "principal"; String PRINCIPAL_TYPE = "principal_type"; String KEYTAB_FILE_PATH = "keytab_file_path"; String KEYTAB_FILE_OWNER_NAME = "keytab_file_owner_nam...
0
import org.apache.accumulo.core.util.HostAndPort;
1
public ClusterDefinition getCluster(String clusterName) { }*/return null; public List<String> getAssociatedRoleNames(Node n) {
0
import org.apache.hc.core5.io.CloseMode; client.shutdown(CloseMode.GRACEFUL);
0
import java.util.concurrent.ConcurrentLinkedQueue; private final ConcurrentLinkedQueue<Inbound> clients; this.clients = new ConcurrentLinkedQueue<>(); public void close() throws Exception { Exception thrown = null; for (Inbound inbound : clients) { try { inbound.outboundObserver.onComplete...
0
import java.io.IOException; import java.util.ArrayList; import org.apache.cocoon.xml.dom.DOMStreamer; import org.apache.xerces.dom.NodeImpl; import org.apache.xerces.parsers.DOMParser; import org.apache.xerces.xni.Augmentations; import org.apache.xerces.xni.NamespaceContext; import org.apache.xerces.xni.QName; import ...
0
import org.apache.xml.security.stax.impl.DocumentContextImpl; import org.apache.xml.security.stax.impl.OutboundSecurityContextImpl; import org.apache.xml.security.stax.impl.OutputProcessorChainImpl; import org.apache.xml.security.stax.impl.XMLSecurityStreamWriter; import org.apache.xml.security.stax.securityEvent.Secur...
0
/* * Copyright 2002, 2003,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 requi...
0
if (resolverTmp.canResolve(context)) {
0
* @see org.apache.commons.digester.Digester#addSetProperties(String,String[],String[])
0
* Copyright 2002,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
/** * Saves a job update configuration. * * @param updateConfiguration Configuration to store. */ /** * Fetches the update configuration (if present) for the given role/job. * * @param role Role the job is under. * @param job Job to fetch update configuration for. * @return Optional job ...
0
import org.apache.maven.plugins.annotations.Component; import org.apache.maven.plugins.annotations.Execute; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; @Mojo( name = "deploy-file", requiresProject = ...
0
private Class type = String.class; public void setType(Class type)
0
import org.apache.accumulo.core.client.impl.ClientContext; ClientContext context = new ClientContext(instance, new Credentials(principal, token), ClientConfiguration.loadDefault()); scanner = new ScannerImpl(context, split.getTableId(), authorizations); ClientContext clientContext = new Cl...
1
@Override public String toString() { return "DescriptionContainer [options=" + options + ", components=" + components + "]"; }
0
public ClusterImpl(Cluster cluster, int revision, ClusterState clusterState) throws IOException {
0
package org.apache.hc.core5.http2.impl.nio.entity;
0
// constant for reluctant policy option public static final String POLICY_OPTION_RELUCTANT = "reluctant"; // constant for greedy policy option public static final String POLICY_OPTION_GREEDY = "greedy"; // set of valid policy option settings private static final Set POLICY_OPTION_VALID; /...
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Charsets;
0
public FTPFile[] listFiles(String relPath) throws IOException return getFtpClient().listFiles(relPath); return getFtpClient().listFiles(relPath);
0
import java.io.File; import java.io.OutputStream; import java.io.Serializable; import java.net.MalformedURLException; import org.apache.avalon.framework.CascadingRuntimeException; import org.apache.avalon.framework.activity.Disposable; import org.apache.avalon.framework.service.ServiceException; import org.apache.aval...
0
/* * $Header: /cvshome/build/org.osgi.service.url/src/org/osgi/service/url/URLConstants.java,v 1.7 2006/03/14 01:21:36 hargrave Exp $ * * Copyright (c) OSGi Alliance (2002, 2005). All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compl...
0
* @version $Revision$ $Date$
0
* Extension of {@link AbstractTestList} for exercising the
0
import org.apache.felix.scr.ScrService; m_runtime_reg = m_context.registerService(new String[] {ScrService.class.getName(), ServiceComponentRuntime.class.getName()},
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestFastArrayList.java,v 1.8 2003/10/05 21:11:06 scolebourne Exp $ * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * permission of the Apache Software Fo...
0
* $HeadURL$ * $Revision$ * $Date$ @Override protected void setUp() throws Exception { @Override protected void tearDown() throws Exception {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/decorators/Attic/TestFixedSizeMap.java,v 1.3 2003/08/31 17:28:42 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately, this acknowledgement ma...
0
+ "It should be changed prior to the initialization of Accumulo. To change it after Accumulo has been initialized, use the ChangeSecret tool " + "and then update conf/accumulo-site.xml everywhere. Before using the ChangeSecret tool, make sure Accumulo is not running and you are logged " + ...
0
import org.junit.Test; public final class BaseResultSetHandlerTest extends BaseTestCase {
1
package org.apache.metadata; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import junit.framework.TestCase; import org.apache.metadata.storage.TypedStruct; import org.apache.metadata.types.*; import org.junit.Before; import org.junit.Test; import java.math.BigDecimal; import java.math...
0
import cz.seznam.euphoria.core.annotation.audience.Audience; @Audience(Audience.Type.CLIENT)
0
private boolean secureValidation; /** * Set whether secure validation is enabled or not. The default is false. */ public void setSecureValidation(boolean secureValidation) { this.secureValidation = secureValidation; } ki.setSecureValidation(secureValidation); ...
0
objectsCF = new HashSet<>(); objectsCol = new HashSet<>(); return new Pair<>(decode(cols[0]), null); return new Pair<>(decode(cols[0]), decode(cols[1]));
0
import org.eclipse.jetty.server.session.SessionCache; private final SessionCache sessionCache = createNiceMock(SessionCache.class); expect(handler.getSessionHandler()).andReturn(createNiceMock(SessionHandler.class)); expect(sessionHandler.getSessionCache()).andReturn(sessionCache); replay(handler, server...
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
import javax.ws.rs.*; import org.apache.ambari.view.filebrowser.utils.ServiceFormattedException; throws IOException, InterruptedException { @FormDataParam("path") String path) { try { if (!path.endsWith("/")) path = path + "/"; String filePath = path + contentDisposition.getFileName(...
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ComparisonChain;
0
import org.apache.aurora.scheduler.HostOffer; public MachineResource apply(HostOffer offer) { Resources resources = Resources.from(offer.getOffer()); return new MachineResource(quota, Conversions.isDedicated(offer.getOffer()));
0
import org.apache.commons.vfs.FileSystemOptions; * @version $Revision: 1.4 $ $Date: 2004/05/01 18:14:29 $ * protected FileName parseUri(final String uri) return ZipFileName.parseUri(uri); * * @param file The file to create the file system on top of. protected FileSystem doCreateFileSys...
0
entry.getValue().storage.putAllSubstituted(dynamic.get(entry.getKey()));
0
/** * File bean */ private String filePath; private String fileContent; private boolean hasNext; private long page; private long pageCount; public String getFilePath() { return filePath; } public void setFilePath(String filePath) { this.filePath = filePath; } public String getFileConten...
0
import org.osgi.framework.BundleEvent; import org.osgi.framework.BundleListener; public class DirectoryWatcher extends Thread implements BundleListener this.context.addBundleListener(this); public void bundleChanged(BundleEvent bundleEvent) { if (bundleEvent.getType() == BundleEvent.UNINSTALLED)...
0
for (int i=0; i<s.getLength(); i++) { Reference r = s.item(i); String fn = "merlin16_"+i+".html"; System.out.println("Wrote Reference " + i + " to file " + fn); JavaUtils.writeBytesToFilename(fn, r.getHTMLRepresentation().getBytes()); } /* */
0
ConfigurationCopy confCopy = new ConfigurationCopy(Iterables.filter(siteConf, input -> !input.getKey().startsWith(Property.TABLE_SAMPLER.getKey())));
0
import java.util.NoSuchElementException; throw new NoSuchElementException();
0
p.apply( Create.of(ungroupedPairs) .withCoder(KvCoder.of(StringUtf8Coder.of(), BigEndianIntegerCoder.of()))) .apply(Window.into(Sessions.withGapDuration(Duration.standardMinutes(1)))); input.apply("GroupByKey", GroupByKey.create()).apply("GroupByKeyAgain", Gro...
0
// Do nothing.
0
import org.apache.ambari.server.controller.internal.ResourceImpl; import org.apache.ambari.server.controller.spi.PropertyId; import org.apache.ambari.server.controller.spi.Request; import org.apache.ambari.server.controller.spi.Resource; import org.apache.ambari.server.controller.utilities.PropertyHelper; import org.ju...
0
import static org.easymock.EasyMock.replay; import org.easymock.EasyMock; context = EasyMock.createMock(ClientContext.class); EasyMock.expect(context.getRootTabletLocation()).andReturn("tserver1").anyTimes(); EasyMock.expect(context.getInstanceID()).andReturn("instance1").anyTimes(); replay(context); ...
0
import org.apache.commons.configuration.DefaultListDelimiterHandler; .setListDelimiterHandler( new DefaultListDelimiterHandler(';')); params.setInterpolator(ci).setListDelimiterHandler( new DefaultListDelimiterHandler('#')); Default...
0
* * @version CVS $Id: RepeaterJXPathBindingBuilder.java,v 1.9 2004/01/11 20:51:16 vgritsenko Exp $ CommonAttributes commonAtts = JXpathBindingBuilderBase.getCommonAttributes(bindingElm); convertor, convertorLocale,
0
private final int bufferSize; H1Config(final int bufferSize, final int chunkSizeHint, final int waitForContinueTimeout, final int maxLineLength, final int maxHeaderCount, final int maxEmptyLineCount) { this.bufferSize = bufferSize; public int getBufferSize() { return bufferSize;...
0
private final FileName rootName; * Retrieves the attribute with the specified name. The default
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.beam.sdk.coders.ByteArrayCoder; import org.apache.beam.sdk.coders.Coder; import org.apache.beam.sdk.coders.StringUtf8Coder; import org.apache.beam.sdk.coders.VarIntCoder; import org.apache.beam.sdk.coders.VoidCoder; public void createRootBundleShouldCreateWithEmptyKey() { assertThat(bundle.getKe...
0