Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
@Deprecated | 0 |
import org.apache.sshd.common.util.AbstractLoggingBean;
public class AgentServer extends AbstractLoggingBean implements Closeable {
@SuppressWarnings("synthetic-access")
log.error("Failed to run session", e);
@SuppressWarnings("synthetic-access")
log.error("Failed... | 0 |
if (!SVG_NAMESPACE_URI.equals(refElement.getNamespaceURI()))
return null; // Not an SVG element.
if (refElement.getLocalName().equals(SVG_GLYPH_TAG)) {
if (refElement.getLocalName().equals(SVG_ALT_GLYPH_DEF_TAG)) {
Element agc = (Element)altGlyphChild;
... | 0 |
import java.net.MalformedURLException;
import java.net.URL;
import org.apache.batik.bridge.BridgeException;
// <!> TO BE FIXED WHEN WE DO ERROR HANDLING PROPERLY
// initialize the SVG document with the appropriate context
// build the GVT tree
GVTBuilder builder = new GVTBuilder();
... | 0 |
* Copyright (c) 2001-2004 The Apache Software Foundation. All rights
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their name without prior
* @version $Id: StringEncoderComparator.java,v 1.11 2004/01/02 07:01:47 ggregory Exp $ | 0 |
CloudObject encoding = translateCoder(coder, translator);
CloudObject encoding = translateCoder(valueCoder, translator);
translateCoder(transform.getRestrictionCoder(), context));
private static CloudObject translateCoder(Coder<?> coder, TranslationContext context) {
return CloudObj... | 0 |
import org.apache.beam.sdk.transforms.Reshuffle;
.apply("Calculate hashcode", Combine.globally(new HashingFn()))
.apply(Reshuffle.<String>viaRandomKey()); | 0 |
import java.util.HashMap;
import java.util.Map;
public class TestHostMappingProvider implements HostMappingProvider {
private static Map<String, String> HOST_MAPPING = new HashMap<String, String>();
static {
HOST_MAPPING.put("domU-12-31-39-0E-34-E1.compute-1.internal", "ec2-50-17-129-192.compute-1.amazonaws.c... | 0 |
/**
* Returns the timeout in milliseconds used when retrieving a
* {@link org.apache.http.conn.ManagedClientConnection} from the
* {@link org.apache.http.conn.ClientConnectionManager}.
*
* @return timeout in milliseconds.
*/
public static long getTimeout(final HttpParams params) ... | 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 |
* or {@link javax.xml.dsig.XMLStructure} | 0 |
package org.apache.commons.vfs2.impl;
import org.apache.commons.vfs2.FileObject;
import org.apache.commons.vfs2.FileSystemException;
import org.apache.commons.vfs2.FileUtil; | 1 |
import org.apache.batik.css.engine.value.ValueManager;
* @author <a href="mailto:deweese@apache.org">l449433</a> | 1 |
Long maxFileSize = AccumuloConfiguration.getMemoryInBytes(tableConfiguration.get(Property.TABLE_MINC_MAX_MERGE_FILE_SIZE));
datafileManager = new DatafileManager(this, datafiles, maxFileSize); | 0 |
* call compaction with iterators and/or a compaction strategy, then one will fail. | 0 |
Job[] jobs = new Job[connNo * reqNo];
jobs[i] = new Job();
Queue<Job> queue = new ConcurrentLinkedQueue<Job>();
Job testjob = jobs[i];
HttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
protected HttpRequest generateRequest(J... | 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 ma... | 0 |
import com.thinkaurelius.titan.core.TitanGraph;
import org.apache.hadoop.metadata.repository.graph.GraphProvider;
import org.testng.Assert;
private GraphProvider<TitanGraph> graphProvider;
Assert.assertNotNull(graphProvider);
Assert.assertNotNull(graphProvider.get()); | 0 |
*
* @version $Id: OS2FTPEntryParser.java,v 1.11 2004/04/21 23:30:33 scohen Exp $
"(\\s+|[0-9]+)\\s*"
+ "(\\s+|[A-Z]+)\\s*"
+ "(DIR|\\s+)\\s*"
+ "((?:0[1-9])|(?:1[0-2]))-"
+ "((?:0[1-9])|(?:[1-2]\\d)|(?:3[0-1]))-"
+ "(\\d\\d)\\s*"
+ "(?:([0-1]\\d)|(?:2[0-3])):"
... | 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 |
* @version CVS $Id: JspGenerator.java,v 1.7 2003/09/05 07:04:35 cziegeler Exp $
public class JspGenerator extends ServletGenerator { | 0 |
@Category(ValidatesRunner.class) | 0 |
this.ioThreadCount = Args.positive(ioThreadCount, "ioThreadCount");
this.ioThreadCount = Runtime.getRuntime().availableProcessors(); | 0 |
import java.net.InetAddress;
import java.net.UnknownHostException;
String advertiseHost = hostname;
if (advertiseHost.equals("0.0.0.0")) {
try {
advertiseHost = InetAddress.getLocalHost().getHostName();
} catch (UnknownHostException e) {
log.error("Unable to get hostname", e);
... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/expression/jexl/JexlExpression.java,v 1.13 2002/11/27 13:07:27 jstrachan Exp $
* $Revision: 1.13 $
* $Date: 2002/11/27 13:07:27 $
* $Id: JexlExpression.java,v 1.13 2002/11/27 13:07:27 jstra... | 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 |
@Test
public void test286() {
String s286 = "var x = 0; for(x : 1..2){}; return x";
JexlEngine jexl = new JexlBuilder().strict(true).create();
Assert.assertEquals(2, jexl.createScript(s286).execute(null));
} | 0 |
PCollection<List<Integer>> quantiles = input.apply(ApproximateQuantiles.globally(5));
PCollection<KV<String, List<Integer>>> quantiles =
input.apply(ApproximateQuantiles.perKey(2));
PCollection<KV<String, List<Integer>>> quantiles =
input.apply(ApproximateQuantiles.perKey(2, new De... | 0 |
/*
* Copyright 2006-2009 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 b... | 0 |
* Creates a Jettison JSONObject from this Element.
* @param propertyKeys The property keys at the root of the element to serialize.
* If null, then all keys are serialized.
String getIdForDisplay(); | 1 |
queryThreadPool =
new SimpleThreadPool(numQueryThreads, "batch scanner " + batchReaderInstance + "-"); | 0 |
cvsmap = new HashMap<>();
return new ArrayList<>(cvsmap.values()); | 0 |
package org.apache.felix.sigil.eclipse.runtime.config;
public interface OSGiLaunchConfigurationConstants
{
String FORM_FILE_LOCATION = "org.apache.felix.sigil.form.location";
String AUTOMATIC_ADD = "org.apache.felix.sigil.automatic.add";
} | 0 |
import java.util.EnumSet;
import java.util.Set;
Set<RepositoryVersionState> allowed = EnumSet.of(RepositoryVersionState.INSTALLED,
RepositoryVersionState.NOT_REQUIRED);
if (request.isRevert()) {
allowed.add(RepositoryVersionState.CURRENT);
}
&& allowed.conta... | 0 |
/*
* $HeadURL$
* $Revision$
* $Date$
*
* ====================================================================
*
* 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... | 0 |
client = new RestClusterClient<>(configuration, "RemoteStreamEnvironment"); | 0 |
* @version $Revision$ $Date$ | 0 |
* Interface of Samza operator for BEAM. This interface demultiplexes messages from BEAM so that
* elements and side inputs can be handled separately in Samza. Watermark propagation can be
* overridden so we can hold watermarks for side inputs. The output values and watermark will be
* collected via {@link OpEmitter... | 1 |
import static org.junit.Assert.*;
| 0 |
{ "jar", "bundle" } );
if ( !supportedProjectTypes.contains( artifact.getType() ) ) | 0 |
* @version $Id$ | 0 |
public static void deleteRecursive(File file) {
if (file != null) {
if (file.isDirectory()) {
File[] children = file.listFiles();
if (children != null) {
for (File child : children) {
deleteRecursive(child);
... | 0 |
Map<String,String> config = parseConfig(Property.TABLE_CONSTRAINT_PREFIX + "1=org.apache.accumulo.examples.simple.constraints.NumericValueConstraint",
Property.TABLE_CONSTRAINT_PREFIX + "2=org.apache.accumulo.examples.simple.constraints.AlphaNumKeyConstraint");
if (!cvs.constrainClass.equals("org.ap... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/TransformerUtils.java,v 1.2 2003/08/31 13:07:26 scolebourne Exp $
* @version $Revision: 1.2 $ $Date: 2003/08/31 13:07:26 $
throw new IllegalArgumentException("The obje... | 0 |
return op.equals(">>>") ? IUSHR : ISHR;
return op.equals(">>>") ? LUSHR : LSHR;
return (size == 2) ? POP2 : POP;
return (size == 2) ? DUP2 : DUP;
return (size == 2) ? DUP2_X2 : DUP_X2;
return (size == 2) ? DUP2_X1 : DUP_X1;
return new NEWAR... | 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 |
/*
* 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 |
List<Node> children = new ArrayList<>();
List<String> children = new ArrayList<>(node.children.size());
assertEquals(new HashSet<>(children), new HashSet<>(Arrays.asList("b", "c")));
assertEquals(new HashSet<>(children), new HashSet<>(Arrays.asList("b"))); | 0 |
long zxid = hdr.getZxid();
while (!zks.outstandingChanges.isEmpty()
&& zks.outstandingChanges.get(0).zxid <= zxid) {
ChangeRecord cr = zks.outstandingChanges.remove(0);
if (cr.zxid < zxid) {
LOG.warn("... | 0 |
import java.util.Collections;
import java.util.Map;
import org.apache.ambari.server.audit.event.AuditEvent; | 0 |
* Adds URI query parameters. The parameter name / values are expected to be unescaped
* and may contain non ASCII characters.
* <p/>
* Please note query parameters and custom query component are mutually exclusive. This method
* will remove custom query if present.
*
* @since 4.3
... | 0 |
* @return the string from the node | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//fileupload/src/java/org/apache/commons/fileupload/FileUpload.java,v 1.15 2002/12/25 04:05:07 martinc Exp $
* $Revision: 1.15 $
* $Date: 2002/12/25 04:05:07 $
* @version $Id: FileUpload.java,v 1.15 2002/12/25 04:05:07 martinc Exp ... | 0 |
import static org.ops4j.pax.exam.CoreOptions.systemProperty;
systemProperty("dm.log").value( "true" ), | 0 |
import java.util.Map;
@Override
public Map<String, Object> getValuesMap() throws MetadataException {
throw new MetadataException("Get/Set not supported on an Id object");
}
| 0 |
Collections.unmodifiableList(new ArrayList<>(other));
Collections.unmodifiableList(new ArrayList<>(other));
List<XMLStructure> other = new ArrayList<>(); | 0 |
@FunctionalInterface | 0 |
import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader;
Class<? extends K> clazz = AccumuloVFSClassLoader.loadClass(className, c); | 1 |
import org.apache.atlas.impala.model.LineageVertex;
import org.apache.atlas.impala.model.LineageVertexMetadata;
import org.apache.commons.lang.StringUtils;
public String getQualifiedNameForColumn(LineageVertex vertex) {
// get database name and table name
LineageVertexMetadata metadata = vertex.getM... | 0 |
package org.apache.beam.sdk.coders;
import org.apache.beam.sdk.testing.CoderProperties;
import org.apache.beam.sdk.util.CoderUtils;
* {@link org.apache.beam.sdk.coders.PrintBase64Encodings}. | 0 |
/**
public void init(final FrameworkListener... listeners) throws BundleException
{
// add framework listeners
if ( listeners != null )
{
for(final FrameworkListener fl : listeners)
{
addFrameworkListener(this, fl);
}
}
... | 0 |
import org.apache.felix.dm.annotation.api.dependency.ServiceDependency; | 0 |
import org.apache.beam.sdk.util.state.CombiningState;
final StateTag<K, CombiningState<InputT, AccumT, OutputT>> bufferTag; | 0 |
* @param <K> the type of keys maintained by the returned map
* @param <V> the type of mapped values | 0 |
List<SortRequestProperty> getProperties();
List<String> getPropertyIds();
enum Order { | 0 |
fileScanner.clear();
| 0 |
final Context itsContext = (Context)this.itsContainer.getBeanFactory().getBean(AvalonUtils.CONTEXT_ROLE);
this.itsManager = (ServiceManager) this.itsContainer.getBeanFactory().getBean(AvalonUtils.SERVICE_MANAGER_ROLE); | 0 |
import static org.junit.Assert.assertEquals;
@Test
public void testStructuralValueReturnTheSameValue() {
ReadableDuration expected = Duration.millis(3_000);
Object actual = TEST_CODER.structuralValue(expected);
assertEquals(expected, actual);
} | 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 |
/*
* 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.felix.scr.annotations; | 0 |
private static final String CURRENT_COUNTER_PROPERTY = "currentCounter";
public static final String STATUS_NOT_STARTED = "NOT_STARTED";
public static final String STATUS_IN_PROGRESS = "IN_PROGRESS";
public void update(Graph graph, Long counter, boolean stageEnd) {
migrationStatus.property(CURR... | 0 |
HttpGet httpget = new HttpGet("https://httpbin.org/get"); | 0 |
new Object[] { new Integer(lu.getLexicalUnitType()),
getPropertyName() });
new Object[] { value, getPropertyName() }); | 0 |
import org.apache.beam.sdk.extensions.euphoria.core.client.util.PCollectionLists;
import org.apache.beam.sdk.values.PCollection;
import org.apache.beam.sdk.values.PCollectionList;
* @see OfBuilder#of(PCollection)
public static <InputT> ByBuilder<InputT> of(PCollection<InputT> input) {
<InputT> ByBuilder<InputT... | 0 |
// do not report instances for views that are not loaded.
if (viewDefinition.isLoaded()){
if (viewName == null || viewName.equals(viewDefinition.getCommonName())) {
for (ViewInstanceEntity viewInstanceDefinition : viewRegistry.getInstanceDefinitions(viewDefinition)) {
... | 0 |
out.writeObject(decorated());
setCollection((Collection<E>) in.readObject()); // (1) | 0 |
import org.apache.commons.jexl3.parser.ASTUnaryPlusNode;
protected Object visit(ASTUnaryPlusNode node, Object data) {
return prefixChild(node, "+", data);
}
@Override | 0 |
import org.apache.accumulo.core.security.CredentialHelper;
import org.apache.accumulo.core.security.thrift.Credential;
import org.apache.accumulo.core.security.thrift.tokens.PasswordToken;
Credential credentials = getCredentials();
public Credential getCredentials() {
return CredentialHelper.createSquelchEr... | 1 |
import org.apache.accumulo.core.client.AccumuloClient;
AccumuloClient c = getAccumuloClient();
try (Scanner scanner = getAccumuloClient().createScanner(table, Authorizations.EMPTY)) { | 0 |
*
* http://www.apache.org/licenses/LICENSE-2.0
*
/**
* Deserializer for ImmutableList used by AbstractNotificationConsumer.GSON.
*/
public static class ImmutableListDeserializer implements JsonDeserializer<ImmutableList<?>> {
public static final Type LIST_TYPE = new TypeToken<List<?>>()... | 0 |
prov.put("instance.name","FooProvider1");
prov2.put("instance.name","FooProvider2");
i3.put("instance.name","Object");
i4.put("instance.name","Ref");
i5.put("instance.name","Both"); | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.MoreObjects;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterables; | 0 |
.addState(
State.CONSTRUCTED,
State.PREPARED, State.STOPPED)
.addState(
State.PREPARED,
State.READY, State.STOPPED)
.addState(
State.READY,
State.STOPPED)
.addState(
State.STOPPED,
// Allow cycles in STOPPED to preve... | 0 |
package org.apache.accumulo.core.util.shell.commands;
import java.security.SecureRandom;
import java.util.Random;
import org.apache.accumulo.core.util.shell.Shell;
import org.apache.accumulo.core.util.shell.ShellCommandException;
import org.apache.accumulo.core.util.shell.Shell.Command;
import org.apache.accumulo.cor... | 1 |
return "ContentLength="
+ this.getContentLength()
+ ", ContentType="
+ this.getContentType(); | 0 |
*/
private short b;
/**
* Empty constructor needed for the Class.newInstance() statement in
* Instruction.readInstruction(). Not to be used otherwise.
*/
SIPUSH() {
}
public SIPUSH(short b) {
super(org.apache.bcel.Constants.SIPUSH, (short) 3);
this.b = b;
}
... | 0 |
import org.apache.http.entity.BasicHttpEntity;
post.setEntity(new BasicHttpEntity());
post.setEntity(new BasicHttpEntity());
impl = new CachingHttpClient(mockBackend, mockCache, new HeapResourceFactory(), params);
impl = new CachingHttpClient(mockBackend, mockCache, new HeapResourceFacto... | 0 |
when(filter1Reference.getProperty(Constants.SERVICE_ID)).thenReturn(4L); | 0 |
import java.util.Map;
protected Object getPropertyOfMapBean(Map<?, ?> bean, String propertyName)
protected void setPropertyOfMapBean(Map<String, Object> bean, String propertyName, Object value) | 0 |
private static final Pattern p = Pattern.compile("(\\$_\\$)|(\\$\\$)|(\\$)|(__)|(_)");
String replacement = "";
if (m.group(1) != null) replacement = "-";
if (m.group(2) != null) replacement = "\\$";
if (m.group(3) != null) replacement = "";
if (m.group(4)... | 0 |
import java.util.Objects;
private final Ordering<T> ordering;
protected ActiveLimitedStrategy(Ordering<T> ordering, int maxActive) {
this.ordering = Objects.requireNonNull(ordering);
.from(ordering.sortedCopy(doGetNextGroup(idle, active))) | 0 |
* The original filename in the user's file system.
* @param fileName The original filename in the user's file system, or
* Returns the original filename in the client's file system.
* @return The original filename in the client's file system. | 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 ma... | 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.core.conf.AccumuloConfiguration;
public static ServerPort startServer(AccumuloConfiguration conf, Property portHintProperty, TProcessor processor, String serverName, String threadName,
Property portSearchProperty,
int portHint = conf.getPort(portHintProperty);
minThreads = c... | 1 |
import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode; | 0 |
public AbstractSortedSetTest(final String name) {
final Iterator<E> colliter = getCollection().iterator();
final Iterator<E> confiter = getConfirmed().iterator();
final Object[] elements = new Object[30];
final Object[] elements = new Object[30];
final int length = getFullEle... | 0 |
package org.apache.aurora.scheduler.metadata;
import org.apache.aurora.gen.AssignedTask;
import org.apache.aurora.gen.ScheduleStatus;
import org.apache.aurora.gen.ScheduledTask;
import org.apache.aurora.scheduler.events.PubsubEvent.TaskStateChange;
import org.apache.aurora.scheduler.events.PubsubEvent.TasksDeleted;
imp... | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.