Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
final PersistenceManager persistenceManager, final String baseId, final String bundleLocation ) this.staticBundleLocation = bundleLocation; // 104.15.2.8 The bundle location will be set persistently this.staticBundleLocation = bundleLocation; storeSilently(); if ( ( this...
0
package aQute.bnd.service.diff; import aQute.lib.osgi.*; /** * Compare two Jars and report the differences. */ public interface Differ { Tree tree(Analyzer source ) throws Exception; Tree tree(Jar source) throws Exception; Tree deserialize(Tree.Data data) throws Exception; }
0
implements Parameterizable {
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
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/java/org/apache/commons/io/output/ByteArrayOutputStream.java,v 1.3 2003/10/13 07:04:31 rdonkin Exp $ * $Revision: 1.3 $ * $Date: 2003/10/13 07:04:31 $ * any, must include the following acknowledgement: * Alternately...
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
/* * 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
@Retention(RetentionPolicy.RUNTIME)
0
private final Map<String, ServiceRegistration> registeredConfigurations = new LinkedHashMap<>(); private final List<CloseableHttpClient> trackedHttpClients = new LinkedList<>(); final Hashtable<String, Object> props = new Hashtable<>();
0
import org.apache.cocoon.portal.coplet.CopletInstance; public void service(ServiceManager aManager) throws ServiceException { super.service(aManager); Object preparableObject = object; preparableObject = ((Map)object).values(); preparableObject = this.checkAvailab...
0
import java.util.LinkedHashMap; /** * The OptionDescriber interface allows you to set up iterator properties interactively in the accumulo shell. If your iterator and/or filter must implement * this interface for the interactive part. The alternative would be to manually set configuration options with the config -t t...
0
throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] { new Integer(getNodeType()), getNodeName() }); throw createDOMException(...
1
import java.util.Arrays; import java.util.List; import java.util.regex.Pattern; import org.apache.ambari.server.utils.CollectionPresentationUtils; // Depends on hashing, string representation can be different // We need a sophisticated comparison List<String> parts = Arrays.asList(dump.substring(1, 522).spl...
0
import org.ow2.chameleon.testing.helpers.BaseTest; import java.util.Arrays; import java.util.List; public class TestTypeBoxing extends BaseTest { @Override protected List<String> getExtraExports() { return Arrays.asList("org.apache.felix.ipojo.runtime.core.components"); }
0
final String servicePid = getKeyPid( key ); if ( servicePid != null ) { return this.configurations.get( servicePid ); } // the targeted PID does not match here return null; final String servicePid = getKeyPid( key ); if ( servicePid != null ) ...
0
import org.apache.http.HttpHost; // Populate the context with a default HTTP host based on the // inet address of the target host if (conn instanceof HttpInetConnection) { InetAddress address = ((HttpInetConnection) conn).getRemoteAddress(); int port = ((HttpInetConnecti...
0
import org.apache.ambari.server.configuration.Configuration; import org.quartz.SimpleTrigger; import java.util.Properties; Properties properties; InMemoryDefaultTestModule defaultTestModule = new InMemoryDefaultTestModule(); properties = defaultTestModule.getProperties(); injector = Guice.createInjector...
0
import org.apache.ambari.server.configuration.Configuration; Configuration configuration = EasyMock.createMock(Configuration.class); expect(configuration.getRollingUpgradeMinStack()).andReturn("HDP-2.2").anyTimes(); expect(configuration.getRollingUpgradeMaxStack()).andReturn("").anyTimes(); replay(confi...
0
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @BeforeEach
0
package org.apache.bcel.generic; super(org.apache.bcel.Const.D2I);
1
package org.apache.accumulo.shell.commands; import org.apache.accumulo.shell.Shell; import org.apache.accumulo.shell.Shell.Command;
0
boolean ret = updateRenderingTransform(); initialTransform = new AffineTransform(); if (!initialTransform.equals(getRenderingTransform())) { setRenderingTransform(initialTransform, false); ret = true; Dimension d = getSize(); if (d.width < 1) d.wi...
0
import org.apache.beam.runners.core.SplittableParDo.GBKIntoKeyedWorkItems; import org.apache.beam.sdk.runners.PTransformOverrideFactory; GBKIntoKeyedWorkItems<KeyT, InputT>> { getReplacementTransform(GBKIntoKeyedWorkItems<KeyT, InputT> transform) {
0
import static org.apache.aurora.gen.apiConstants.BYPASS_LEADER_REDIRECT_HEADER_NAME; if (request.getHeader(BYPASS_LEADER_REDIRECT_HEADER_NAME) != null) { LOG.info(BYPASS_LEADER_REDIRECT_HEADER_NAME + " header was present on the request, bypassing " + "leader redirection."); chain.doFilter(requ...
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
String[] tableDirs = ServerConstants.getTablesDirs(master.getContext());
0
import org.apache.accumulo.server.rpc.TServerUtils;
1
* Copyright 2016-2017 Seznam.cz, a.s.
0
import static org.apache.beam.sdk.extensions.sql.impl.schema.BeamTableUtils.csvLine2BeamRow; import org.apache.beam.sdk.values.Row; import org.apache.beam.sdk.values.RowType; extends PTransform<PCollection<String>, PCollection<Row>> protected RowType rowType; public BeamTextCSVTableIOReader(RowType rowType, Str...
0
* </p> * </p>
0
* @version $Id$
0
private static final String SECURITY_JSON_LOCATION = "security-json-location"; + "\n./solrCloudCli.sh --setup-kerberos-plugin -z host1:2181,host2:2181 -zn /ambari-solr --security-json-location /etc/infra-solr/conf/security.json\n"; final Option securityJsonLocationOption = Option.builder("sjl") .longO...
0
import org.apache.beam.sdk.values.Row; private static final Row NULL_ROW = null;
0
package org.apache.zookeeper.server.quorum; import org.apache.jute.BinaryInputArchive; import org.apache.jute.BinaryOutputArchive; import org.apache.jute.Record; import org.apache.zookeeper.ZooDefs.OpCode; import org.apache.zookeeper.server.ZooKeeperServer; import org.apache.zookeeper.server.ZooTrace; import org.apache...
0
package org.apache.felix.mishell; import java.io.PrintStream; import java.util.HashSet; import java.util.Set; import java.util.Map.Entry; import java.util.logging.Logger; import javax.script.ScriptContext; public class Commander extends HashSet<Command> implements Command{ private Logger log=Logger.getLogger(this....
0
final boolean alphaPremult; this.tiledRegion = tiledRegion; this.xStep = xStep; this.yStep = yStep; this.hints = hints; this.alphaPremult = false; SampleModel sm = fixSampleModel(tile, xStep, yStep); ColorModel cm = fixColorModel(tile, a...
0
public class CaseTransform implements Transform { public void setCase( String caseType ) { if ( caseType.equalsIgnoreCase( "upper" ) ) else public String transform( String s ) { if ( toLower )
0
this.pool = new LinkedBlockingQueue<>(session.getIntProperty(POOL_SIZE_PROP, DEFAULT_POOL_SIZE));
0
/** Tests for the {@link POJOUtils} class. */
0
public class KerberosConfigDataFileReader extends AbstractKerberosDataFileReader implements KerberosConfigDataFile{ * @throws java.io.IOException if an error occurs while accessing the file KerberosConfigDataFileReader(File file) throws IOException {
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.cocoon.blocks;
0
String s = (String) m_configMap.get(Constants.FRAMEWORK_BEGINNING_STARTLEVEL); }
0
import static org.junit.Assert.*; import org.junit.After; import org.junit.Before; import org.junit.Test; public class BeanPropertySetterRuleTestCase { @Before @After @Test @Test @Test @Test @Test
0
import java.io.IOException; public synchronized void putEntry(String url, HttpCacheEntry entry) throws IOException { public synchronized HttpCacheEntry getEntry(String url) throws IOException { public synchronized void removeEntry(String url) throws IOException { HttpCacheUpdateCallback callback...
0
import org.apache.batik.ext.awt.image.rendered.TurbulencePatternRed8Bit; final Rectangle devRect if ((devRect.width <= 0) || (devRect.height <= 0)) Rectangle2D tile = null; if (stitched) tile = (Rectangle2D)region.clone(); return new TurbulencePat...
0
* Tests manipulating the list delimiter handler. This object is derived * from the parent. public void testSetListDelimiterHandler() ListDelimiterHandler handler1 = new DefaultListDelimiterHandler('/'); ListDelimiterHandler handler2 = new DefaultListDelimiterHandler(';'); parent.se...
0
//it has already been deactivated.... this should cause an exception? //FactoryInstance.deactivate disposes the instance. Don't do it again // instanceNonMatch.dispose(); // TestCase.assertNull( SimpleComponent.INSTANCE ); // TestCase.assertNull( instanceNonMatch.getInstance() ); /...
0
return shape.getBounds2D();
0
package org.apache.felix.fileinstall.internal; import org.apache.felix.fileinstall.ArtifactInstaller; import org.apache.felix.fileinstall.ArtifactListener; import org.apache.felix.fileinstall.ArtifactTransformer; import org.apache.felix.fileinstall.internal.Util; * It uses {@link Artifact#getPath()} as location
0
public AuthFuture authAgent(String user) throws IOException { userAuth = new UserAuthAgent(this, user); public AuthFuture authPassword(String user, String password) throws IOException { userAuth = new UserAuthPassword(this, user, password); public AuthFuture authPublicKey(String user...
0
ioSession.updateReadTime(); ioSession.updateWriteTime(); ioSession.updateReadTime(); ioSession.updateWriteTime(); public void updateReadTime() { ioSession.updateReadTime(); } @Override public void updateWriteTime() { ioSess...
0
* Version of {@link java.io.ByteArrayOutputStream} that allows to retrieve the internal byte[] * buffer without incurring an array copy. /** Get the underlying byte array. */
1
import org.apache.batik.css.value.SystemColorResolver.Color;
0
@Test public void test() { } public static void main(String[] args) { long now = System.currentTimeMillis(); for (long i = 0; i < 1000 * 1000; i++) { @SuppressWarnings("unused") Long x = new Long(i); } System.out.println(String.format("Trivial took %d millis", System.currentTim...
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/adapters/Attic/TestAll.java,v 1.7 2003/04/15 01:55:21 rwaldhoff Exp $ * @version $Revision: 1.7 $ $Date: 2003/04/15 01:55:21 $ suite.addTest(TestCollectionByteC...
0
import org.apache.felix.dm.annotation.api.dependency.ServiceDependency;
0
/** * Test setting a value out of a mapped Map */ public void testSetMappedMap() { TestBean bean = new TestBean(); Map map = new HashMap(); map.put("sub-key-1", "sub-value-1"); map.put("sub-key-2", "sub-value-2"); map.put("sub-key-3", "sub-value-3"); bea...
0
package cz.seznam.euphoria.inmem; import cz.seznam.euphoria.core.client.operator.Distinct; import cz.seznam.euphoria.core.client.operator.FlatMap; import cz.seznam.euphoria.core.client.operator.ReduceByKey; import cz.seznam.euphoria.core.client.operator.ReduceWindow;
0
conn.setSocketTimeoutMillis(123); conn.setSocketTimeoutMillis(123); Assert.assertEquals(-1, conn.getSocketTimeoutMillis()); Assert.assertEquals(345, conn.getSocketTimeoutMillis()); Assert.assertEquals(-1, conn.getSocketTimeoutMillis()); Assert.assertEquals(-1, conn.getSoc...
0
private final Map<Integer, SshdSocketAddress> localToRemote = new HashMap<>(); private final Map<Integer, SshdSocketAddress> remoteToLocal = new HashMap<>(); private final Map<Integer, SocksProxy> dynamicLocal = new HashMap<>(); private final Set<LocalForwardingEntry> localForwards = new HashSet<>(); ...
0
/** * @see Method * * @param file Input stream * @param constant_pool Array of constants * @return Attribute * @throws IOException * @throws ClassFormatException
0
import java.util.Collections; import org.apache.sshd.common.util.threads.ExecutorService; public ChannelAgentForwarding(ExecutorService executor) { super("", Collections.emptyList(), executor);
1
import org.apache.beam.sdk.testing.DataflowPortabilityApiUnsupported; @Category({ValidatesRunner.class, DataflowPortabilityApiUnsupported.class}) @Category({ValidatesRunner.class, DataflowPortabilityApiUnsupported.class})
0
private static ThreadPoolExecutor readaheadPool = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 3L, if (0L == readaheadThreshold) {
0
/** {@link org.apache.commons.logging} logging facility */ static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog( ResolverAnonymous.class.getName());
0
ResultSet rs = null; try { rs = statement.executeQuery(query); if (rs != null) { if (rs.next()) { return rs.getInt(1) > 0; } } } catch (Exception e) { LOG.error("Unable to check if table " + tableName + " has any data. Exception: " + e.getMessage()); } ...
0
package org.apache.bcel.util; import org.apache.bcel.classfile.JavaClass;
1
ParDo.SingleOutput<Integer, EmptyClass> uninferrableParDo = ParDo.of(new EmptyClassDoFn());
0
import org.apache.hc.core5.annotation.Contract; import org.apache.hc.core5.annotation.ThreadingBehavior; @Contract(threading = ThreadingBehavior.IMMUTABLE)
0
// Add any patterns } // If we didn't get any tables, and we have a table selected, add the current table if (tablesToFlush.isEmpty() && !shellState.getTableName().isEmpty()) {
0
import org.apache.beam.runners.fnexecution.environment.InProcessEnvironmentFactory; import org.apache.beam.sdk.options.PipelineOptionsFactory; InProcessEnvironmentFactory.create( PipelineOptionsFactory.create(), loggingServer, controlServer, (workerId, timeout) ->...
0
* @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
0
public void dump(DataOutputStream dos) throws IOException dos.writeShort(type_index); // u2 index of type name in cpool dos.writeShort(element_value_pairs.size()); // u2 element_value pair count for (int i = 0 ; i<element_value_pairs.size();i++) { ElementValuePair envp = (ElementValuePair) element_value_pairs...
0
* Copyright (c) 1999 The Apache Software Foundation. All rights * notice, this list of conditions and the following disclaimer. * if any, must include the following acknowledgment: * software without prior written permission. For written * The development of this software was partly funded by the Eu...
0
import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost;
0
import org.apache.beam.sdk.util.state.CombiningState; private static final StateTag<Object, CombiningState<Integer, int[], Integer>> CombiningState<Integer, int[], Integer> value1 = CombiningState<Integer, int[], Integer> value2 = CombiningState<Integer, int[], Integer> value1 = CombiningState<Integer...
0
* @version $Revision: 1.8 $ $Date: 2004/06/02 22:12:14 $ suite.addTest(TestTypedSet.suite());
0
import org.apache.accumulo.core.client.impl.Namespace; public static boolean setNamespaceProperty(Namespace.ID namespaceId, String property, String value) throws KeeperException, InterruptedException { public static void removeNamespaceProperty(Namespace.ID namespaceId, String property) throws InterruptedException,...
1
try{ zks.getZKDatabase().close(); } catch (IOException ie) { LOG.warn("Error closing logs ", ie); }
0
public final class Dispatcher final HttpServletRequest wrappedRequest = new ServletRequestWrapper(req, servletContext, requestInfo, null, public void forward(final ServletResolution resolution, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException final Strin...
0
// Read by hostname (hosts=h1) // Read by hostname (hosts/host_name=h1) predicate = new PredicateBuilder().property(ConfigGroupResourceProvider .CONFIGGROUP_CLUSTER_NAME_PROPERTY_ID).equals("Cluster100").and() .property(ConfigGroupResourceProvider.CONFIGGROUP_HOSTS_HOSTNAME_PROPERTY_ID) .e...
0
new scala.collection.immutable.Map.Map1<>(
0
@Command(scope = "obr", name = "listUrl", description = "Displays the repository URLs currently associated with the OBR service.")
0
public class TestHttpServerNio { public TestHttpServerNio(final HttpParams params) throws IOException {
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
import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.WebApplicationException; import java.util.Collection; import java.util.HashSet; import java.util.Set; }
0
package org.apache.felix.sigil.model.osgi; import org.apache.felix.sigil.model.IModelElement;
0
import org.apache.cocoon.forms.formmodel.library.Library; /** * Gets the Library object containing this definition */ Library getEnclosingLibrary(); /** * Sets the Library object containing this definition (should only be used by Library itself!) */ void setEnclosingLibrary...
0
import org.apache.cocoon.environment.ObjectModelHelper; import org.apache.cocoon.environment.Request; * @version CVS $Id: SessionContextImpl.java,v 1.2 2003/05/04 20:19:41 cziegeler Exp $ /** The current request */ private Request request; this.request = ObjectModelHelper.getRequest( objectModel )...
0
import cz.seznam.euphoria.testing.DatasetAssert;
0
if (this.paramTypes.length == 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...
0
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
1
self.maxSessionTimeout, self.clientPortListenBacklog, zkDb, self.getInitialConfig());
0
* <p> * This class cuts the wrapped InputStream off after a specified number of bytes. * </p> * <p> * Note that this class NEVER closes the underlying stream, even when close * gets called. Instead, it will read until the "end" of its chunking on close, * which allows for the seamless invocation of subsequent H...
0
tservers = new ArrayList<>();
1
* * * if (definition == null) { throw new Exception("Widget '" + id + "' not found! (at " + DomHelper.getLocation(element) + ")"); }
0
return getOSFamilyFromHostAttributes(hostAttributes); } @Override public String getOSFamilyFromHostAttributes(Map<String, String> hostAttributes) { try { String majorVersion = hostAttributes.get(OS_RELEASE_VERSION).split("\\.")[0]; return hostAttributes.get(OSFAMILY) + majorVersion; } catc...
0
import org.apache.beam.dsls.sql.schema.BeamSqlRowType; BeamSqlRowType type = BeamSqlRowType.create( .of(BeamSqlRowType.create(names, types))
0