Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/buffer/PriorityBuffer.java,v 1.1 2004/01/02 02:14:29 scolebourne Exp $
* to provide synchronized access to a <code>PriorityBuffer</code>:
* Buffer heap = SynchronizedBuffer.decor... | 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 |
if (!request.containsHeader("Accept-Encoding")) {
request.addHeader("Accept-Encoding", "gzip,deflate");
} | 0 |
pcf.setPoolStatements(true);
pcf.setMaxOpenPrepatedStatements(10); | 0 |
* @param <E> the type of elements in this list | 0 |
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import javax.xml.transform.ErrorListener;
import javax.xml.transform.SourceLocator;
import javax.xml.transform.TransformerException;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeLi... | 0 |
String agentDefaultCommandTimeout = configs.getDefaultAgentTaskTimeout();
String scriptCommandTimeout = "";
scriptCommandTimeout = String.valueOf(script.getTimeout());
String actualTimeout = (!scriptCommandTimeout.equals("") ? scriptCommandTimeout : agentDefaultCommandTimeout);
// Because th... | 0 |
return this.foo; | 0 |
@Override
@Override
@Override
@Override
@Override | 0 |
import org.apache.commons.lang.StringUtils;
* @version CVS $Id: IOUtils.java,v 1.4 2004/03/28 14:28:04 antonio Exp $
if (org.apache.cocoon.util.StringUtils.isAlphaNumeric(chars[j])) { | 0 |
package org.apache.commons.digester3;
/*
* 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 Licens... | 0 |
* "Apache" nor may "Apache" appear in their name without prior
* @version $Id: StringDecoder.java,v 1.6 2003/10/05 21:45:48 tobrien Exp $ | 0 |
String value = element.getAttribute(PROCESSOR_CLASS_NAME_ATTR);
if ( value != null && value.trim().length() > 0 ) { | 0 |
import org.junit.FixMethodOrder;
import org.junit.runners.MethodSorters;
@FixMethodOrder(MethodSorters.NAME_ASCENDING) | 0 |
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDete... | 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 |
* Copyright 2016-2017 Seznam.cz, a.s. | 0 |
public List<Cookie> parse(final Header header, final CookieOrigin origin)
public List<Header> formatCookies(final List<Cookie> cookies) { | 0 |
* Get a registered value. | 0 |
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableList;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import java.util.List; | 0 |
synchronized (reloadLock)
synchronized (reloadLock)
synchronized (reloadLock)
synchronized (reloadLock)
synchronized (reloadLock) | 0 |
Key wc = super.getTopKey();
Value w = super.getTopValue();
boolean b = super.hasTop();
super.seek(range, columnFamilies, inclusive); | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.MoreObjects;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.graph.MutableNetwork;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.graph.NetworkBuilder; | 0 |
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.persist.PersistService;
import org.apache.ambari.server.orm.GuiceJpaInitializer;
import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
private Injector injector;
injector = Guice.createInjector(new InMemoryDefault... | 0 |
public void testBackPointers() throws Exception {
// todo disabled until a wrapping issuen in SharedPoolDataSource are resolved
}
| 0 |
* Default implementation of {@link RedirectHandler}. | 0 |
return Double.compare(o1.doubleValue(), o2.doubleValue()); | 0 |
wire.output("[write] I/O error: " + ex.getMessage());
wire.output("[write] I/O error: " + ex.getMessage());
wire.output("[write] I/O error: " + ex.getMessage());
wire.output("[flush] I/O error: " + ex.getMessage());
wire.output("[close] I/O error: " + ex.getMe... | 0 |
/**
* The resource definition for the specified type.
*/
ResourceDefinition resourceDefinition;
//todo: consider ResourceDependencyManager : Map<Resource.Type, ResourceDefinition>
resourceDefinition = new ComponentResourceDefinition();
... | 0 |
package org.apache.aurora.scheduler.storage.durability;
import org.apache.aurora.scheduler.storage.durability.DurableStorage.TransactionManager;
public class WriteAheadStorage implements
public WriteAheadStorage( | 0 |
import org.apache.aurora.scheduler.offers.HostOffer; | 0 |
import org.apache.http.conn.routing.HttpRoute; | 0 |
if (propertyValue == null || propertyValue.toLowerCase().equals("null") || propertyValue.isEmpty()) { | 0 |
client = createClient(); | 0 |
@Override
@Override | 0 |
private void verify(TreeMap<Key,Value> source, int expectedSourceSize, Map<String,String> options,
Text expectedCF, Text expectedCQ, Text expectedCV, int expectedFinalCount)
throws IOException {
// System.out.println(DefaultFormatter.formatEntry(Collections.singletonMap(filter.getTopKey(),
// ... | 0 |
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.google.inject.Inject; | 0 |
private final Object lock = new Object();
public final static long CONFIG_FILE_RELOAD_DELAY = 60000; | 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 may ... | 0 |
* @see #getPixelUnitToMillimeter() | 0 |
* @version CVS $Id: CompiledProgrammingLanguage.java,v 1.1 2004/03/10 12:58:07 stephan Exp $ | 0 |
import com.google.cloud.dataflow.sdk.util.WeightedValue;
List<Iterator<WeightedValue<T>>> iterators = Lists.newArrayList();
Iterator<WeightedValue<T>> sorted = Iterators.mergeSorted(
new Comparator<WeightedValue<T>>() {
public int compare(WeightedValue<T> a, WeightedValue<T> b) {
... | 0 |
import org.apache.accumulo.core.client.BatchWriterConfig;
BatchWriter bw = conn.createBatchWriter("table1", new BatchWriterConfig()); | 0 |
buffer.append(line).append("\n"); | 0 |
CSSStyleDeclaration decl;
decl = ctx.getViewCSS().getComputedStyle(element, null);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx, decl);
Rectangle2D rect = CSSUtilities.convertEnableBackground((SVGElement)element,
... | 0 |
private final long creationTimeMillis;
this.creationTimeMillis = System.currentTimeMillis();
long getLastReadTimeMillis() {
return creationTimeMillis; | 0 |
* Creates a UDP datagram containing all the TFTP
* data packet data in the proper format.
* method. | 0 |
filterRegion, | 0 |
@SuppressWarnings({"unused"}) public enum CompactionType implements org.apache.thrift.TEnum { | 0 |
import java.io.File;
import org.apache.avalon.framework.context.Context;
import org.apache.avalon.framework.context.ContextException;
import org.apache.avalon.framework.context.Contextualizable;
extends ServiceableGenerator
implements Contextualizable {
/** The component context. */
protected Context co... | 0 |
* An input stream that reads data without any transformation.
* <p>
* Note that this class NEVER closes the underlying stream, even when close
* gets called. Instead, it will read until the end of the stream (until
* <code>-1</code> is returned).
/**
* Wraps session input stream and reads input until th... | 0 |
super.setupDefinition(element, definition);
definition.makeImmutable(); | 0 |
package org.apache.felix.ipojo.runtime.core.components.inheritance.b;
import org.apache.felix.ipojo.runtime.core.components.inheritance.a.IA;
public interface IB extends IA {
public String methTwo();
} | 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 |
Connector connector = instance.getConnector(args[2], args[3].getBytes()); | 0 |
* Return when {@code window} should be garbage collected. If the window's expiration time is on
* or after the end of the global window, it will be truncated to the end of the global window.
// If the end of the window + allowed lateness is beyond the "end of time" aka the end of the
// global window, th... | 0 |
lit.set(interpolate(lit.next())); | 0 |
import cz.seznam.euphoria.core.client.triggers.Trigger;
import cz.seznam.euphoria.core.client.triggers.TriggerContext;
import cz.seznam.euphoria.core.executor.TriggerScheduler;
import java.util.LinkedHashMap;
private static final class LRU<K, V> extends LinkedHashMap<K, V> {
private final int maxSize;
LRU(int... | 0 |
Schema resultType = RowSqlTypes.builder()
Schema resultType = RowSqlTypes.builder()
Schema resultType = RowSqlTypes.builder()
Schema resultType = RowSqlTypes.builder()
Schema subStrSchema = RowSqlTypes.builder() | 0 |
* https://beam.apache.org/documentation/pipelines/test-your-pipeline/ | 0 |
tableRow(sb, (highlight = !highlight), "<a href='/tservers'>Tablet Servers</a>", NumberType.commas(info.tServerInfo.size(), 1, Long.MAX_VALUE));
tableRow(sb, (highlight = !highlight), "<a href='/tservers'>Dead Tablet Servers</a>", NumberType.commas(info.deadTabletServers.size(), 0, 0));
... | 0 |
return true;
return true; | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
*... | 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 |
public RequestStatus deleteResources(Request request, Predicate predicate) throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException { | 0 |
+ "support updating streaming pipelines.") | 0 |
if (fs.exists(mylog))
break; | 1 |
package org.apache.felix.ipojo.tests.core.service;
public interface MyService {
public void foo();
} | 0 |
import org.apache.http.annotation.Immutable;
@Immutable // provided injected dependencies are immutable | 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... | 0 |
import java.util.Optional;
return Optional.empty(); | 0 |
if (attrs.containsKey(attrName))
{
return attrs.get(attrName);
}
return attrs.get(attrName.toLowerCase()); | 0 |
package org.apache.beam.sdk.extensions.sql.interpreter.operator.string;
import org.apache.beam.sdk.extensions.sql.interpreter.BeamSqlFnExecutorTestBase;
import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlExpression;
import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlPrimitive; | 0 |
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import org.apache.ambari.annotations.Experimental;
import org.apache.ambari.annotations.ExperimentalFeature;
import org.apache.ambari.server.state.stack.RepoTag;
import org.apache.commons.lang.StringUtils;
private Set... | 0 |
* @param factory SAXParserFactory to be configured
} | 0 |
/**
* Copyright 2016 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 agree... | 0 |
ExtraContextFactory<InputT, OutputT> extra) {
// The outer DoFn is immaterial - it exists only to avoid typing InputT and OutputT repeatedly
DoFn<InputT, OutputT>.ProcessContext newCtx =
extra.processContext(new DoFn<InputT, OutputT>() {});
DoFnAdapters.adaptProcessContext(fn, ne... | 0 |
mgr.closeWal(server.getKey(), path); | 0 |
import com.twitter.aurora.gen.TaskConfig;
.setTask(new TaskConfig()
.setTask(new TaskConfig()
.setTask(new TaskConfig()
TaskConfig task = productionTask();
TaskConfig task = productionTask().setNumCpus(0.0);
TaskConfig task = productionTask().setRamMb(-123);
TaskConfi... | 0 |
* @version $Revision$ | 0 |
import org.junit.Assert;
*
public void registerSideChannel(SortedKeyValueIterator<Key,Value> iter) {}
| 0 |
import org.apache.zookeeper.PortAssignment;
import org.apache.zookeeper.server.quorum.QuorumPeer.QuorumServer;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.util.HashMap;
import java.util.Map;
long myId = qp.getId();
int clientPort = PortAssignment.unique();
Map<Lo... | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Lists;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Maps; | 0 |
@Deprecated
@Deprecated | 1 |
this.scrConfiguration.configure(properties, true); | 0 |
import com.google.inject.persist.Transactional;
@Transactional
void convertRolePrincipals() { | 0 |
* Copyright 2000-2009 The Apache Software Foundation | 0 |
/** Convert {@code itr} to strings capturing values and timestamps. */
static <T> Set<String> toValueTimestamp(Iterator<TimestampedValue<T>> itr) {
Set<String> strings = new HashSet<>(); | 0 |
System.err.println("Thread \"" + Thread.currentThread().getName() + "\" died " + e);
System.err.println("Uncaught exception: " + t);
System.exit(1); | 0 |
* @version CVS $Id: PortletObjectModelHelper.java,v 1.1 2004/02/23 15:14:01 cziegeler Exp $ | 0 |
import org.apache.accumulo.core.client.impl.Table;
public Table.ID tableID;
public ProblemSummaryInformation(String tableName, Table.ID tableID, Integer fileRead, Integer fileWrite, Integer tableLoad) { | 1 |
String factoryClassName = widgetConfs[i].getAttribute("src"); | 0 |
public class TestThrottlingNHttpHandlers extends TestCase {
public TestThrottlingNHttpHandlers(String testName) {
String[] testCaseName = { TestThrottlingNHttpHandlers.class.getName() };
return new TestSuite(TestThrottlingNHttpHandlers.class); | 0 |
sks = new KeySelectors.SecretKeySelector("testkey".getBytes("ASCII"));
("testkey".getBytes("ASCII")), sks);
("testkey".getBytes("ASCII")), sks);
("testkey".getBytes("ASCII")), sks); | 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 |
*
* @version $Id$ | 0 |
* limitations under the License. | 0 |
package org.apache.felix.bnd;
import java.util.List;
import java.util.ArrayList;
import aQute.lib.spring.XMLTypeProcessor;
import aQute.lib.spring.XMLType;
import aQute.lib.osgi.Analyzer;
public class BlueprintComponent extends XMLTypeProcessor {
protected List<XMLType> getTypes(Analyzer analyzer) throws Except... | 0 |
/**
* TODO: add javadoc.
* @param <W>
* @param <K>
*/ | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.