Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
/**
* 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.SocketAddress;
import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.sshd.client.ServerKeyVerifier;
@Test
public void testWaitAuth() throws Exception {
SshClient client = SshClient.setUpDefaultClient();
final AtomicBoolean ok = new AtomicBoolean();
client.se... | 0 |
setLocation(widgetElement, definition); | 0 |
import org.apache.batik.gvt.event.EventDispatcher;
textSelectionManager = createTextSelectionManager
(eventDispatcher);
(new UnixTextSelectionListener());
protected TextSelectionManager
createTextSelectionManager(EventDispatcher ed) {
return ... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//cli/src/java/org/apache/commons/cli/Util.java,v 1.2 2002/12/09 23:47:25 jkeyes Exp $
* $Revision: 1.2 $
* $Date: 2002/12/09 23:47:25 $
/**
* <p>Remove the hyphens from the begining of <code>str</code> and
* return th... | 1 |
if (! (o instanceof UninitializedObjectType)) {
return false;
} | 0 |
ImmutableSet.of(new QuotaConfiguration("steve", Quotas.noQuota().newBuilder())); | 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.awt.Paint;
* Fills the input image with a given paint
* Set the flood paint.
* @param paint the flood paint to use when filling
public void setFloodPaint(Paint paint);
* Get the flood paint.
* @return The current flood paint for the filter
public Paint getFloodPaint();
* @p... | 0 |
import org.w3c.dom.Node;
protected SVGOMImageElement() {
result = new SVGOMAnimatedLength(this, null, "x", null);
result = new SVGOMAnimatedLength(this, null, "y", null);
result = new SVGOMAnimatedLength(this, null, "width", null);
result = new SVGOMAnimatedLength(this, null, "height", null);
... | 0 |
origStage.getRequestContext(), origStage.getClusterHostInfo()); | 0 |
* BigQueryIO.Read.from("clouddataflow-readonly:samples.weather_stations"));
* BigQueryIO.Read.fromQuery("SELECT year, mean_temp FROM samples.weather_stations")); | 0 |
import org.apache.http.HttpEntity;
import org.apache.http.HttpStatus;
import org.apache.http.params.HttpProtocolParams;
private HttpEntity entity = null;
public BasicHttpResponse() {
super();
setStatusCode(HttpStatus.SC_OK);
}
setStatusLine(statusline);
public HttpEntity getEnti... | 0 |
import com.google.common.collect.Maps;
import java.util.Map;
public static final Function<TaskState, TwitterTaskInfo> STATE_TO_INFO =
Functions.compose(ASSIGNED_TO_INFO, STATE_TO_ASSIGNED);
public static final Function<TaskState, Integer> STATE_TO_SHARD_ID =
Functions.compose(INFO_TO_SHARD_ID, STATE_TO... | 0 |
int i = c;
int i = c; | 0 |
public void updateClusterName(String oldName, String newName);
public Cluster getClusterById(long id) throws AmbariException;
public Map<String, Host> getHostsForCluster(String clusterName)
throws AmbariException;
| 0 |
import org.eclipse.swt.widgets.Decorations;
} else if (parent instanceof Decorations) {
Decorations item = (Decorations) parent;
item.setImage(image);
| 0 |
throw new AssertionError(e);
throw new AssertionError(e);
throw new AssertionError(e);
throw new AssertionError(e);
throw new AssertionError(e);
throw new AssertionError(e); | 0 |
if (!dir.exists() && !dir.mkdirs()) {
throw new IOException("Could not create directory " + dir);
}
@Override
@Override
@Override
if (!root.exists() && !root.mkdirs()) {
throw new IOException("Could not create cache directory " + root);
}
throw new IllegalArgumentException("Cache direc... | 0 |
package org.apache.hc.core5.http.impl;
public class BasicHttpTransportMetrics implements HttpTransportMetrics {
public BasicHttpTransportMetrics() { | 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 ... | 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 |
throw new InvalidUsernamePasswordCombinationException(null); | 0 |
setupServerHeartbeat(sshd, options, System.out);
| 0 |
import org.apache.felix.sigil.eclipse.ui.SigilUI; | 0 |
* @return encoded string
* @return encoded string
* @return encoded string
* @return encoded string
* @return encoded string | 0 |
public void testFullTextUriExists() throws Exception {
@Test
public void testLineageUriExists() throws Exception {
WebResource resource = service
.path("api/metadata/discovery/search/relationships/1")
.queryParam("depth", "1").queryParam("edgesToFollow","bar");
... | 0 |
import org.apache.ambari.server.api.services.stackadvisor.commands.ComponentLayoutRecommendationCommand;
import org.apache.ambari.server.api.services.stackadvisor.commands.ComponentLayoutValidationCommand;
import org.apache.ambari.server.api.services.stackadvisor.commands.ConfigurationDependenciesRecommendationCommand;... | 0 |
* Copyright (c) 2002 The Apache Software Foundation. All rights | 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 appl... | 0 |
package org.apache.commons.vfs2.provider.ftp;
import org.apache.commons.vfs2.FileSystemException;
import org.apache.commons.vfs2.FileSystemOptions;
import org.apache.commons.vfs2.util.UserAuthenticatorUtils;
| 1 |
HttpRequest httprequest = parser.parse();
httprequest = parser.parse(); | 0 |
import org.apache.commons.vfs2.FileSystemException;
import org.apache.commons.vfs2.provider.AbstractRandomAccessContent;
import org.apache.commons.vfs2.util.RandomAccessMode;
| 0 |
if (l <= Integer.MAX_VALUE && l >= Integer.MIN_VALUE) { | 0 |
/** The stack overflow limit. */
private int stackOverflow = Integer.MAX_VALUE;
* Sets the number of script/expression evaluations that can be stacked.
* @param size if not strictly positive, limit is reached when java StackOverflow is thrown.
* @return this builder
*/
public JexlBu... | 0 |
y */
import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
public class SocketOutputStream extends FilterOutputStream
{
private Socket __socket;
/***
* Creates a SocketOutputStream instance wrapping an output stream and
* storing a referenc... | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument; | 0 |
import org.apache.batik.svggen.font.table.CmapFormat;
import org.apache.batik.svggen.font.table.Feature;
import org.apache.batik.svggen.font.table.FeatureTags;
import org.apache.batik.svggen.font.table.GsubTable;
import org.apache.batik.svggen.font.table.KerningPair;
import org.apache.batik.svggen.font.table.PostTable;... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestShortIterator.java,v 1.2 2003/08/31 17:28:41 scolebourne Exp $
* any, must include the following acknowledgement:
* Alternately, this acknowledgement m... | 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 whether the KeyResolverSpi is able to perform the requested action.
* @param baseURI | 0 |
* Home directory
* @return home directory
* @throws Exception
*/
public Path getHomeDir() throws Exception {
return ugi.doAs(new PrivilegedExceptionAction<Path>() {
public Path run() throws IOException {
return fs.getHomeDirectory();
}
});
}
/**
* Hdfs Status
* @retu... | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* v... | 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... | 0 |
assertEquals(
expected, filter.accept(file));
assertEquals(
expected, filter.accept(file.getParentFile(), file.getName()));
assertEquals(
expected, filter.accept(file)); | 0 |
import org.osgi.framework.dto.ServiceReferenceDTO;
ServiceReferenceDTO serviceDTO = runtimeDTO.serviceDTO;
assertNotNull(serviceDTO);
assertNotNull(serviceDTO.properties);
assertTrue(serviceDTO.properties.containsKey(HTTP_SERVICE_ID));
assertTrue(serviceDTO.properties.containsKey... | 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 m... | 0 |
package org.apache.commons.digester3.examples.api.documentmarkup;
| 0 |
public void buildGraphicsNode(GraphicsNode node, BridgeContext ctx,
Element element) {
}
| 0 |
XMLUtils.addReturnToElement(this.constructionElement);
this.constructionElement.appendChild(dsaKeyValue.getElement());
XMLUtils.addReturnToElement(this.constructionElement);
XMLUtils.addReturnToElement(this.constructionElement);
this.constructionElement.appendChild(rsaKeyValue.ge... | 0 |
if (obj == null || (obj.getClass() != getClass())) {
return false;
}
AbstractAttributeCondition c = (AbstractAttributeCondition)obj;
return c.value.equals(value); | 0 |
@Override
public Optional<TaskInfo> apply(Offer offer) {
@Override
public ImmutableSet<IScheduledTask> get() {
@Override
public TaskSchedulerResult apply(MutableStoreProvider store) {
@Override
public long read() {
@Override
... | 0 |
/**
* {@inheritDoc}
*/ | 0 |
* This method is called when a thread enters in a method.
* The given argument array is created from the method argument.
* This method must not modify the returned object. | 0 |
package org.apache.hc.client5.http.cache;
import java.io.Serializable;
import org.apache.hc.core5.util.Args;
public final class HttpCacheStorageEntry implements Serializable {
private final String key;
private final HttpCacheEntry content;
public HttpCacheStorageEntry(final String key, final HttpCacheEntr... | 0 |
import org.apache.ambari.server.api.services.parsers.BodyParseExceptionTest;
import org.apache.ambari.server.api.services.parsers.JsonRequestBodyParserTest;
JsonRequestBodyParserTest.class, CreateHandlerTest.class, UpdateHandlerTest.class, DeleteHandlerTest.class,
DeleteRequestTest.class, QueryPostRequestTest.c... | 0 |
NHttpMessageParser<T> create(H1Config h1Config); | 1 |
Constants.METADATA_DIRECTORY_COLUMN.put(m, new Value(FastFormat.toZeroPaddedString(dirCount++, 8, 16, "/c-".getBytes())));
Constants.METADATA_DIRECTORY_COLUMN.put(m, new Value(FastFormat.toZeroPaddedString(dirCount++, 8, 16, "/c-".getBytes()))); | 0 |
import com.thoughtworks.qdox.model.Annotation;
public SlingServletPropertyTag(Annotation annotation, String name, String[] values, JavaClassDescription desc) {
super(annotation, desc, null); | 0 |
* @version $Revision$ $Date$ | 0 |
assertGzipEncodedGet("/");
assertGzipEncodedGet("/updates");
assertGzipEncodedGet("/updates/");
assertGzipEncodedGet("/assets/bower_components/angular/angular.js");
assertResponseStatus("/updates", expectedStatus);
assertResponseStatus("/updates/", expectedStatus); | 0 |
* Copyright 1999-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 ... | 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 ... | 0 |
package org.apache.http.nio.buffer; | 0 |
* @version $Revision$ $Date$ | 0 |
final String[] args = new String[] {"-c", "-a", "foo", "-b", "java.util.Vector", "-e", "build.xml", "-f", "java.util.Calendar", "-n", "4.5", "-t", "https://commons.apache.org", "-z", "Thu Jun 06 17:48:57 EDT 2002", "-m", "test*"};
assertEquals("url flag t", new URL("https://commons.apache.org"), line.ge... | 0 |
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import com.apple.eawt.AppEvent;
import org.junit.Rule;
import org.junit.rules.TemporaryFolder;
@Rule
public TemporaryFolder tmpFolder = new TemporaryFolder();
@Test
public void testMetaInfoFileFilter() throws Exception {
String buildDir = ... | 0 |
// validate if entity, not already associated with classifications
validateEntityAssociations(guid, classifications);
// validate if entity, not already associated with classifications
validateEntityAssociations(guid, classifications);
/**
* Validate if classification... | 0 |
setImageAttributes(imageElement, x, y, width, height,
setImageAttributes(imageElement, x, y, width, height,
generatorContext); | 0 |
* MMM [d]d
* N.B. use non-space for MMM to allow for languages such as German which use
* diacritics (e.g. umlaut) in some abbreviations.
+ "((?:\\d+[-/]\\d+[-/]\\d+)|(?:\\S{3}\\s+\\d{1,2})|(?:\\d{1,2}\\s+\\S{3}))\\s+" | 0 |
package org.apache.hc.core5.http.bootstrap.io;
import org.apache.hc.core5.http.impl.io.HttpService;
import org.apache.hc.core5.http.io.HttpConnectionFactory;
import org.apache.hc.core5.http.io.HttpServerConnection; | 1 |
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import com.google.inject.name.Named;
public class ExecutorCore implements TaskManager {
/**
* {@literal @Named} binding key for the executor root directory.
*/
static final String EXECUTOR_ROOT_DIR =
"com.twitter.mesos.... | 0 |
((Element)newEntry).setAttribute("href", htmlName);
} | 0 |
import org.apache.felix.dm.DependencyManager;
import org.osgi.framework.BundleContext;
public void init(BundleContext ctx, DependencyManager dm) throws Exception {
.withSrv(LogService.class, log -> log.cb(ProviderImpl::set))); | 0 |
SystemStatus getStatus(StateType stateType); | 0 |
import org.apache.beam.sdk.extensions.euphoria.core.client.type.TypeAwareness;
TypeAwareness.orObjects(operator.getKeyType()),
TypeAwareness.orObjects(operator.getValueType())));
TypeAwareness.orObjects(operator.getKeyType()),
TypeDescriptors.itera... | 0 |
ctx.setViewport(new SVGViewport(svgElement, uctx)); | 0 |
long totalRows = job.getConfiguration().getLong(NUMROWS, 0);
int numSplits = job.getConfiguration().getInt(NUMSPLITS, 1); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbutils/src/java/org/apache/commons/dbutils/handlers/BeanHandler.java,v 1.3 2004/01/11 22:30:38 dgraham Exp $
* $Revision: 1.3 $
* $Date: 2004/01/11 22:30:38 $
* Copyright (c) 2003-2004 The Apache Software Foundation. All rights | 0 |
if (everythingLooksGood)
System.out.println("All is well for table " + tablename);
else
sawProblems = true;
if (sawProblems)
System.exit(-1); | 1 |
import org.eclipse.jetty.security.HashLoginService;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.SessionManager;
import org.eclipse.jetty.server.bio.SocketConnector;
import org.eclipse.jetty.server.handler.StatisticsHandler;
import org.eclipse.jetty.... | 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 |
public static CocoonXmlWebApplicationContext createRootApplicationContext(AvalonEnvironment env) | 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 |
@SuppressWarnings("deprecation") | 0 |
package org.apache.beam.sdk.nexmark.queries;
import org.apache.beam.sdk.nexmark.NexmarkConfiguration;
import org.apache.beam.sdk.nexmark.NexmarkUtils;
import org.apache.beam.sdk.nexmark.model.Auction;
import org.apache.beam.sdk.nexmark.model.AuctionBid;
import org.apache.beam.sdk.nexmark.model.Bid;
import org.apache.be... | 0 |
m_context = bc; | 0 |
import org.apache.batik.anim.dom.AnimatedLiveAttributeValue;
import org.apache.batik.anim.dom.SVGOMElement; | 0 |
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
private Log log = LogFactory.getLog(TrustEveryoneUserInfo.class);
log.info(s + " - Answer: False");
log.info(s + " - Answer: False");
log.debug(s + " - Answer: Yes");
log.debug(s); | 0 |
* @deprecated (4.2) use {@link SPNegoSchemeFactory} or {@link KerberosSchemeFactory}.
@Deprecated | 0 |
*
* <p>Provides a bridge between the high-level {@code Source} API and the raw
@Override
*
* <p>TODO: Consider changing the API of Reader.ReaderIterator so this adapter wouldn't be
* needed. | 0 |
new Object[] {(int) getNodeType(),
new Object[] {offset});
new Object[] {(int) n.getNodeType(),
new Object[] {(int) n.getNodeType(), | 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 la... | 0 |
document = XMLUtils.createDocumentBuilder(false).parse(is);
document = XMLUtils.createDocumentBuilder(false).parse(is);
document = XMLUtils.createDocumentBuilder(false).parse(is);
document = XMLUtils.createDocumentBuilder(false).parse(is);
document = XMLUtils.... | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Predicates;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Sets;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.io.ByteStreams; | 0 |
* @deprecated No longer used.
* | 0 |
import org.apache.accumulo.core.cli.ClientOpts;
import com.beust.jcommander.Parameter;
static class Opts extends ClientOpts {
@Parameter(names="--shardTable", required=true, description="name of the shard table")
String table = null;
@Parameter(names="--doc2Term", required=true, description="name of t... | 0 |
/**
* Copyright 2016-2017 Seznam.cz, 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 ... | 0 |
import org.apache.log4j.Logger;
private static final Logger LOG = Logger.getLogger(NIOServerCnxn.class);
LOG.error("FIXMSG",e);
LOG.error("=====> Goodbye cruel world <======");
LOG.error("FIXMSG",e);
LOG.error("FIXMSG",e);
// LOG.error("F... | 0 |
@Override | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.