Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
* 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
import org.apache.http.message.BasicHttpRequest; return new BasicHttpRequest("GET", "/");
0
/* * @author <a href="mailto:felix-dev@incubator.apache.org">Felix Project Team</a> */
0
final String instanceID = getConnector().getInstanceID(); String instanceID = getConnector().getInstanceID();
0
sb.append("<*"); sb.append("*>"); case '*': { if (filterChars[pos + 1] == '>') { pos += 2; break; if (filterChars[pos + 1] == '*') { pos += 2; ...
0
import java.util.Set; Set<ClassInfo> classes = cp.getTopLevelClasses(IteratorTestCase.class.getPackage().getName());
0
expose(PendingTaskProcessor.class);
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
HashMap<String,String> site = new HashMap<>(); HashMap<String,String> site = new HashMap<>();
0
/** * Column family for tracking files that require replication */ public static class ReplicationColumnFamily { public static final Text NAME = new Text("repl"); }
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.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.hadoop.io.Writable; import org.apache.hadoop.io.WritableUtils; public class IteratorSetting implements Writable { public IteratorSetting(DataInput din) throws IOException { this.properties = new HashMap<String,Strin...
0
import org.apache.hc.core5.annotation.Internal; * HTTP/2 multiplexing client side message exchange initiator. * /** * Use {@link Http2MultiplexingRequesterBootstrap} to create instances of this class. */ @Internal
0
import org.apache.http.ExceptionLogger; private final ExceptionLogger exceptionLogger; /** * Creates new instance of <tt>HttpAsyncRequestExecutor</tt>. * @param waitForContinue wait for continue time period. * @param exceptionLogger Exception logger. If <code>null</code> * {@link Exceptio...
0
* @version $Id$
1
deleteWithCheck(fileHandle); private void deleteWithCheck(File handle){ if (!handle.delete()){ System.err.println("Failed to delete: "+handle.getPath()); } } deleteWithCheck(fileHandle); deleteWithCheck(fileHandle); deleteWithCheck(fileHandle);
0
* @return The index of the glyph within the coverage, or -1 if the glyph
1
configureAdditionalContentTypes(root); private void configureAdditionalContentTypes(ServletContextHandler root) { root.getMimeTypes().addMimeMapping("woff", "application/font-woff"); root.getMimeTypes().addMimeMapping("ttf", "application/font-sfnt"); }
0
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
0
// There should only be one extra WALog that replication doesn't know about replRows.removeAll(wals); Assert.assertEquals(2, wals.size()); Assert.assertEquals(0, replRows.size());
0
if (!(pObject instanceof String)) {
0
import org.apache.accumulo.core.util.DeprecationUtil; DeprecationUtil.setMockInstance(split, true); Assert.assertEquals(DeprecationUtil.isMockInstanceSet(split), DeprecationUtil.isMockInstanceSet(newSplit));
0
import org.apache.ambari.server.orm.entities.RepoDefinitionEntity; import org.apache.ambari.server.orm.entities.RepoOsEntity;
0
package org.apache.batik.extension.svg; import org.apache.batik.gvt.text.GVTAttributedCharacterIterator;
1
Copyright 2002-2003 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...
0
* Modified method attached to the dependency. */ private String m_modified; /** if (m_modified != null) { Element cb = new Element("callback", ""); cb.addAttribute(new Attribute("type", "modified")); cb.addAttribute(new Attribute("method", m_modified))...
0
package org.apache.commons.ognl; import org.apache.commons.ognl.enhance.OrderedReturn; import org.apache.commons.ognl.enhance.UnsupportedCompilationException;
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
if (server.equals(migrations.get(tls.extent))) migrations.remove(tls.extent); // log.info("Current servers " + currentTServers.keySet()); if (dest != null) { // if destination is still good, assign it if (d...
0
public static RunnerApi.Pipeline toProto(Pipeline pipeline) { return toProto(pipeline, SdkComponents.create()); } public static RunnerApi.Pipeline toProto( final Pipeline pipeline, final SdkComponents components) {
0
HttpConnectionManagerParams.setTimeout(params, 10L);
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
try (AccumuloClient client = createClient()) { try (AccumuloClient client = createClient()) { try (AccumuloClient client = createClient()) { try (AccumuloClient client = createClient()) { try (AccumuloClient client = createClient()) { try (AccumuloClient client = createClient()) { try (Accum...
0
import com.google.common.base.Charsets; testValues(toBytes("a")).write("b".getBytes(Charsets.UTF_8)); builder.add(value.getBytes(Charsets.UTF_8));
0
ColumnAgeOffFilter copy = (ColumnAgeOffFilter) super.deepCopy(env); copy.currentTime = currentTime; copy.ttls = ttls; return copy;
0
import org.apache.ambari.server.stack.upgrade.Direction;
0
.coder( CalciteUtils.toCoder(
0
try (BufferedWriter out = new BufferedWriter(new OutputStreamWriter(failFile, UTF_8))) {
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory;
0
package aQute.libg.sax.filters; import java.util.Collections; import java.util.LinkedList; import java.util.List; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import aQute.libg.sax.ContentFilterImpl; import aQute.libg.sax.SAXElement; public class MergeContentFilter extends ContentFilterImpl { p...
0
assertEquals("(x)->{ x + x; };", fsstr); public void testLambdaLambda() throws Exception { JexlEngine jexl = new Engine(); String strs = "var t = 19; ( (x, y)->{ var t = 20; x + y + t} )(15, 7);"; JexlScript s42 = jexl.createScript(strs); Object result = s42.execute(null...
1
* @version CVS $Id: CronJob.java,v 1.3 2003/09/05 10:13:55 giacomo Exp $ *
0
if (response.countHeaders(HeaderConstants.AGE) > 1) { if (response.countHeaders(HeaderConstants.EXPIRES) > 1) { if (response.countHeaders(HttpHeaders.DATE) > 1) { if (request.countHeaders(HeaderConstants.AUTHORIZATION) > 0
0
* Wrapped data transmitter that all calls are delegated to. private final HttpDataTransmitter out; * @param out The data transmitter to wrap public ContentLengthOutputStream(final HttpDataTransmitter out, long contentLength) { throw new IllegalArgumentException("HTTP data transmitter may n...
0
package org.apache.sshd.cli.client; ClientSession session = SshClientCliSupport.setupClientSession("-P", stdin, stdout, stderr, args);
0
public int hashCode() { // uncomment when JDK 1.4 is required // assert false : "hashCode not designed"; return 58; }
0
import java.util.ArrayList; import org.apache.http.NameValuePair; import org.apache.http.client.utils.URLEncodedUtils; import org.apache.http.message.BasicNameValuePair; /** * Converts the new corrected property names to the old names for the backend. * Because both the /stacks and /stacks2 api use the sa...
0
private int maxWaitMillis = (int)Math.min(Integer.MAX_VALUE, GenericObjectPoolConfig.DEFAULT_MAX_WAIT_MILLIS); public int getMaxWaitMillis() { return (this.maxWaitMillis); public void setMaxWaitMillis(int maxWaitMillis) { this.maxWaitMillis = maxWaitMillis; config.setMaxW...
0
assertEquals("HTTP/1.1 200 ", s); // compare with "testParseSuccess" above: trailing space is correct
0
transfer.mask = true; fooKey3.mask = true; assertTrue(report.getStdOut().contains("******"));
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
final String instanceID = getAccumuloClient().getInstanceID(); String instanceID = getAccumuloClient().getInstanceID();
0
import static org.apache.ambari.server.controller.metrics.MetricsServiceProvider.MetricsService.GANGLIA;
0
package org.apache.ambari.server.stack.upgrade; import org.apache.ambari.server.stack.upgrade.ConfigUpgradeChangeDefinition.ConfigurationKeyValue; import org.apache.ambari.server.stack.upgrade.ConfigUpgradeChangeDefinition.Insert; import org.apache.ambari.server.stack.upgrade.ConfigUpgradeChangeDefinition.Replace; impo...
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 java.net.SocketException; public void setSocketTimeout(int timeout) throws SocketException { assertOpen(); if (this.socket != null) { this.socket.setSoTimeout(timeout); } }
0
client = new Http2TestClient(buildReactorConfig(), protected IOReactorConfig buildReactorConfig() { return IOReactorConfig.DEFAULT; }
0
} catch (final UnsupportedEncodingException ex) {
0
import javax.persistence.EntityManager; import org.apache.ambari.server.orm.entities.HostComponentStateEntity; import org.apache.ambari.server.orm.entities.HostEntity; import org.junit.Test; import com.google.inject.Provider;
0
p.run().waitUntilFinish(); p.run().waitUntilFinish(); p.run().waitUntilFinish();
0
void initialize(GVTBuilder gvtBuilder) {
0
public Response getDefinitions(@Context HttpHeaders headers, return handleRequest(headers, null, ui, Request.Type.GET, public Response getDefinitions(@Context HttpHeaders headers, return handleRequest(headers, null, ui, Request.Type.GET,
0
* @version $Id$
0
* @version $Id$
0
* Support for the 'preserveAspectRatio' interface on the SVG element.
0
* {@code startDate} to {@code startDate + 100 years}. This value may * be {@code null}. When {@code null} is given as a parameter, year
0
package org.apache.beam.sdk.extensions.gcp.storage;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbutils/src/java/org/apache/commons/dbutils/Attic/ColumnProcessor.java,v 1.2 2003/12/07 17:25:01 dgraham Exp $ * $Revision: 1.2 $ * $Date: 2003/12/07 17:25:01 $ import java.beans.PropertyDescriptor; import java.sql.ResultSetMetaDa...
0
package org.apache.beam.runners.core.metrics; import org.apache.beam.runners.core.metrics.ExecutionStateTracker.ExecutionState; /** Tests for {@link org.apache.beam.runners.core.metrics.ExecutionStateSampler}. */
0
* http://www.apache.org/licenses/LICENSE-2.0 *
1
/** Generated serial version ID. */
0
import org.osgi.framework.ServiceReference; import org.osgi.service.startlevel.StartLevel; // Get start level service. ServiceReference ref = m_context.getServiceReference( org.osgi.service.startlevel.StartLevel.class.getName()); StartLevel sl = null; if (ref != null) ...
0
package org.apache.felix.serializer.impl.json; import org.apache.felix.serializer.impl.json.MyDTO.Count; import org.apache.felix.serializer.impl.json.MyEmbeddedDTO.Alpha; import org.apache.felix.serializer.serializer.json.JsonCodecImpl; String json = jsonCodec.serialize(m).toString(); Map m2 = jsonCodec...
0
* @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> /** Get the ClassPath associated with this Repository */ public ClassPath getClassPath();
0
private Log log = LogFactory.getLog(LocaleBeanUtilsBean.class);
0
public void mergeBufferAndPost(List<HostComponentsUpdateEvent> events, EventBus m_eventBus) { List<HostComponentUpdate> hostComponentUpdates = events.stream().flatMap( u -> u.getHostComponentUpdates().stream()).collect(Collectors.toList()); HostComponentsUpdateEvent resultEvents = new HostComponentsUp...
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
/* * 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
public ClassPathRepository(final ClassPath classPath) { _path = classPath; * Stores a new JavaClass instance into this Repository. public void storeClass(final JavaClass javaClass) { _loadedClasses.put(javaClass.getClassName(), javaClass); javaClass.setRepository(this); * Remov...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbcp/src/test/org/apache/commons/dbcp/TesterConnection.java,v 1.5 2003/08/11 23:40:40 dirkv Exp $ * $Revision: 1.5 $ * $Date: 2003/08/11 23:40:40 $ * @version $Id: TesterConnection.java,v 1.5 2003/08/11 23:40:40 dirkv Exp $ p...
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.3 2002/02/19 15:40:58 jstrachan Exp $ * $Revision: 1.3 $ * $Date: 2002/02/19 15:40:58 $ * $Id: ParseTag.java,v 1.3 2002/02/19 15:40:58 jstrachan Exp $ impor...
0
import org.ow2.chameleon.testing.helpers.TimeUtils; TimeUtils.grace(500);
0
import java.util.Objects; return Objects.hash(title, link); return Objects.equals(title, other.title) && Objects.equals(link, other.link); @Override public boolean equals(Object o) { if (!(o instanceof DisplayMetric)) { return false; } DisplayMetric other = (DisplayMetric...
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.accumulo.server.test.MiniAccumuloCluster;
0
for (final Field f : publicFields) {
0
import org.apache.commons.collections4.Unmodifiable; //----------------------------------------------------------------------- public void testUnmodifiable() { assertTrue(makeObject() instanceof Unmodifiable); assertTrue(makeFullMap() instanceof Unmodifiable); } public void testDec...
0
import org.apache.ambari.server.controller.RootComponent; import org.apache.ambari.server.controller.RootService; String ambariServiceName = RootService.AMBARI.name(); String agentComponentName = RootComponent.AMBARI_AGENT.name();
0
import org.apache.sshd.util.test.CommonTestSupportUtils; CommonTestSupportUtils.generateKeyPair(KeyUtils.RSA_ALGORITHM, 1024), CommonTestSupportUtils.generateKeyPair(KeyUtils.DSS_ALGORITHM, 512), CommonTestSupportUtils.generateKeyPair(KeyUtils.EC_ALGORITHM, 25...
0
import org.apache.atlas.exception.AtlasBaseException; public abstract void apply() throws AtlasBaseException;
0
public static final boolean isMultipartContent( * @param fileItemFactory The factory to use for creating file items. throws FileUploadException { throws FileUploadException, IOException {
0
* {@link org.apache.hc.core5.reactor.IOEventHandler} that implements * client side HTTP/2 messaging protocol with full support for * multiplexed message transmission.
0
* @version $Id$
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/impl/TagScript.java,v 1.34 2003/01/24 10:04:32 morgand Exp $ * $Revision: 1.34 $ * $Date: 2003/01/24 10:04:32 $ * $Id: TagScript.java,v 1.34 2003/01/24 10:04:32 morgand Exp $ * @version $R...
0
} catch (NumberFormatException nfEx ) { (ctx, filterElement, nfEx, ERR_ATTRIBUTE_VALUE_MALFORMED, } catch (NumberFormatException nfEx ) { (ctx, filterElement, nfEx, ERR_ATTRIBUTE_VALUE_MALFORMED,
0
import jline.console.completer.Completer;
0
/** * Map of service to set of excluded config types */ private Map<String, Set<String>> excludedConfigurationTypes = new HashMap<String, Set<String>>(); parseExcludedConfigurations(stackService); * Get the set of excluded configuration types * for this service * * @param service serv...
0
package org.apache.hc.core5.testing.nio.http;
0
package org.apache.commons.dbcp2;
1
* Bridge class for the &lt;image&gt; element. * Constructs a new bridge for the &lt;image&gt; element.
0