Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
// Required protocol interceptors
// Recommended protocol interceptors | 0 |
import org.apache.cocoon.el.util.MultiMap; | 0 |
import org.apache.http.HttpResponseFactory;
protected final ByteBufferAllocator allocator;
protected final NHttpClientHandler handler;
protected final HttpParams params;
protected HttpResponseFactory createHttpResponseFactory() {
return new DefaultHttpResponseFactory();
}
... | 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.main;
import org.apache.felix.framework.Felix; | 0 |
import org.apache.commons.configuration.event.EventSource;
public interface ConfigurationBuilder<T extends Configuration> extends EventSource | 0 |
storage.write(new MutateWork.NoResult.Quiet() { | 0 |
private static void dump(final File repoDirectory) throws Exception
final TransientRepository repository = getTransientRepository(repoDirectory);
private static void dump(final Node node) throws RepositoryException
final PropertyIterator properties = node.getProperties();
final Prope... | 1 |
import org.apache.zookeeper.TestableZooKeeper;
TestableZooKeeper zk = createClient();
// we've asked to close, wait for it to finish closing
// all the sub-threads otw the selector may not be
// closed when we check (false positive on test ... | 0 |
import java.util.HashMap;
import java.util.Set;
import java.util.Map.Entry;
import org.apache.accumulo.core.security.thrift.SecurityErrorCode;
HashMap<String,Set<SecurityErrorCode>> tables = new HashMap<String,Set<SecurityErrorCode>>();
for (Entry<KeyExtent,Set<SecurityErrorCode>> ke : e.getAuthorizatio... | 0 |
package org.apache.felix.framework.cache;
import org.apache.felix.moduleloader.*;
// We do not actually close the associated content
// from which we are filtering our directory because
// we assume that this will be close manually by
// the owner of that content.
public synchronized... | 0 |
enum LockArea {
LockArea(String configurationProperty) {
enum LockType { | 0 |
*
*
*
*
*
*
*
* | 1 |
* @version CVS $Id: Processor.java,v 1.4 2003/07/31 03:20:37 vgritsenko Exp $
* If no match is found in the sitemap <code>false</code> | 0 |
n= (Integer) hints.get(PNGTranscoder.KEY_INDEXED); | 0 |
@Test(timeout=60*1000)
BatchScanner bs = getConnector().createBatchScanner("bss", Authorizations.EMPTY, 4);
bs.close(); | 0 |
* @version $Revision: 1.14 $ $Date: 2004/05/20 13:07:43 $
if (isReadOnly()) {
throw new SQLException("Cannot commit a readonly connection");
}
if (isReadOnly()) {
throw new SQLException("Cannot rollback a readonly connection");
} | 0 |
assertTrue(ac.get(0) instanceof ExecutionCommand);
assertEquals("1-977", ((ExecutionCommand) (ac.get(0))).getCommandId());
assertEquals(clusterHostInfo, ((ExecutionCommand) (ac.get(0))).getClusterHostInfo());
ac = waitForQueueSize(hostname, aq, 1, scheduler);
assertTrue(ac.get(0) instanceof Executio... | 0 |
/*
* Copyright (C) 2015 Google Inc.
*
* 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 |
import org.apache.commons.collections.CollectionUtils;
if(CollectionUtils.isNotEmpty(groups)) {
for (String group : groups) {
isAccessAllowed = checkAccess(group, resourceType, resource, map);
if (isAccessAllowed) {
break;
} | 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
... | 0 |
* <p>This class is immutable and thread-safe.</p> | 0 |
ctx.initialize((SVGDocument)svgDocument, this); | 0 |
/*
JavaUtils.writeBytesToFilename("data/temp" + "/c14n-" + i
*/ | 0 |
package org.apache.commons.digester3.plugins; | 1 |
boolean isStatic = Modifier.isStatic( method.getModifiers() ); | 0 |
private static final org.slf4j.Logger LOG = | 1 |
private static final LONG_Upper singleton = new LONG_Upper();
return singleton; | 0 |
BigQueryReader.BigQueryReaderIterator iterator = reader.iterator();
BigQueryReader.BigQueryReaderIterator iterator = reader.iterator();
BigQueryReader.BigQueryReaderIterator iterator = reader.iterator(); | 0 |
// InclusiveWithComments C14N 1.1 | 0 |
JobUpdateKey mutableKey,
final IJobUpdateKey key = IJobUpdateKey.build(mutableKey);
JobKeys.assertValid(key.getJob());
context = authorizeJobUpdateAction(key, session);
change.modifyUpdate(jobUpdateController, key, context.getIdentity());
void modifyUpdate(JobUpdateController controlle... | 0 |
* <p>Adds all necessary coders to the components builder.
*
* <p>Adds all necessary coders to the components builder.
*
* @return id of a windowed value coder containing the PCollection's element coder | 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 |
@Path("znodes/v1{path: /.*}")
private void ensurePathNotNull(String path) {
if (path == null) {
throw new IllegalArgumentException("Invalid path \"" + path + "\"");
}
}
MediaType.APPLICATION_XML})
public Response existsZNode(@PathParam("path") String path,
@C... | 0 |
public void testDurationIsDeterministic() throws NonDeterministicException {
// Duration can be encoded deterministically.
verifyDeterministic(ProtoCoder.of(Duration.class)); | 0 |
final ClusterDAO clusterDAO = injector.getInstance(ClusterDAO.class);
List<ClusterEntity> clusters = clusterDAO.findAll();
for (ClusterEntity cluster : clusters) {
for (ClusterConfigMappingEntity configMapping : cluster.getConfigMappingEntities()) {
if (configMapping.getType().equals(Configura... | 0 |
* @throws IOEXception if an I/O Exception occurs in readUnsignedShort
* @throws IOEXception if an I/O Exception occurs in writeShort | 0 |
package org.apache.felix.dm.impl; | 0 |
* <p>{@link Empty} is an override used in {@link JdbcDriver#connect(TableProvider,
* org.apache.beam.sdk.options.PipelineOptions)} to avoid loading all available table providers.
* This is the override to create an empty schema, used in {@link JdbcDriver#connect(TableProvider
* , org.apache.beam.sdk.options.Pip... | 0 |
private Set<String> errors = new HashSet<>();
Map<String, QuickLinks> map = new HashMap<>(); | 0 |
public void startVector(List<?> v, String tag) throws IOException {
public void endVector(List<?> v, String tag) throws IOException {
public void startMap(TreeMap<?,?> v, String tag) throws IOException {
public void endMap(TreeMap<?,?> v, String tag) throws IOException { | 0 |
lazzyRef = Utils.getServiceReference(context, Architecture.class.getName(), "(architecture.instance="+compName+")");
immRef = Utils.getServiceReference(context, Architecture.class.getName(), "(architecture.instance="+compName2+")"); | 0 |
import org.apache.http.conn.util.SocketUtils;
SocketUtils.connect(sock, host, port, connTimeout);
| 0 |
@Override
@Override
@Override | 0 |
package org.apache.cocoon.portal.sitemap.modules; | 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 |
public static final TokenType DerivedKeyToken = new TokenType("DerivedKeyToken"); | 0 |
try (AccumuloClient client = getClient()) {
client.tableOperations().create(tableName);
SortedSet<Text> splits = new TreeSet<>();
for (int i = 0; i < 1000; i++) {
splits.add(new Text("" + i));
}
client.tableOperations().addSplits(tableName, splits);
// give a short wait f... | 0 |
* Copyright 2016-2017 Seznam.cz, a.s. | 0 |
List<TableCell> cells = new ArrayList<>();
public void testInsertAll() throws Exception {
ids.add(""); | 0 |
import java.util.HashSet;
import java.util.Set;
* @version CVS $Id: FOM_JavaScriptInterpreter.java,v 1.21 2004/02/11 18:15:29 coliver Exp $
String uri = src.getURI();
Set set = (Set)sourceToClass.get(uri);
if (set == null) {
set = new HashSet();
sourc... | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Charsets;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList; | 0 |
ImmutableList.of(SparkPipelineOptions.class), | 0 |
options.setStreaming(true); | 0 |
State windowState = getWindowState(window);
windowState.add(element.getValue());
// inlining: processTriggerResult(window, triggerResult, null);
if (triggerResult.isFlush()) {
windowState.flush();
}
if (triggerResult.isPurge()) {
windowState.close();
... | 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 |
properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY, "src/test/resources/"); | 0 |
for (String variantURI : parent.getVariantMap().values()) { | 0 |
import org.apache.batik.util.SVGConstants;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
protected Boolean complex = null;
/**
* This method looks at the SVG font and checks if any of
* the glyphs use renderable child elements. If so this
* is a complex font in that full CSS inhe... | 0 |
private String note;
@JsonProperty("service_config_version_note")
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
} | 0 |
import javax.persistence.EntityManager;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.assertTrue;
import static org.easymock.EasyMock.anyObject;
import static org.easymock.EasyM... | 0 |
addReturnToSelf();
appendSelf(transforms);
addReturnToSelf();
MessageDigestAlgorithm.getInstance(getDocument(), messageDigestAlgorithm);
appendSelf(digestMethodElem);
addReturnToSelf();
XMLUtils.createElementInSignatureSpace(getDocument(), Constant... | 0 |
import org.apache.sshd.server.Environment;
import org.apache.sshd.server.SignalListener;
public class SshTerminal extends Terminal implements SignalListener {
private Environment environment;
public SshTerminal(Environment environment) {
return Integer.valueOf(this.environment.getEnv().get(Environment.E... | 0 |
Element rect = domFactory.createElementNS(SVG_NAMESPACE_URI, SVG_RECT_TAG);
Element rect = domFactory.createElementNS(SVG_NAMESPACE_URI, SVG_RECT_TAG); | 0 |
* Autogenerated by Thrift Compiler (0.12.0)
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)")
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer colFamily; // required
public @org.apac... | 0 |
import org.apache.beam.runners.core.metrics.MetricsContainerImpl;
* {@link MetricsContainerImpl} to be active.
* Source.Reader decorator which registers {@link MetricsContainerImpl}. | 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 |
Object result = new Object[1];
result = getAttribute(name, modeConf, objectModel);
return (result == null? null : new Object[]{result}); | 0 |
* @version $Revision$ | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/ReceiveTag.java,v 1.3 2003/10/09 21:21:20 rdonkin Exp $
* $Revision: 1.3 $
* $Date: 2003/10/09 21:21:20 $
* any, must include the following acknowledgement:
* ... | 0 |
import java.util.Map;
this.m_logger = logger;
this.m_revisionRootDir = revisionRootDir;
this.m_location = location;
return this.m_logger;
return this.m_revisionRootDir;
return this.m_location; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/map/CompositeMap.java,v 1.5 2004/01/08 22:37:30 scolebourne Exp $
* @version $Revision: 1.5 $ $Date: 2004/01/08 22:37:30 $
* @param composite the CompositeMap with the c... | 0 |
import java.util.Optional;
public Type getType() {
return eventTimeFn.getClass() == Time.ProcessingTime.class
? Type.PROCESSING : Type.EVENT;
@Override
public Optional<UnaryFunction<T, Long>> getTimeAssigner() {
if (getType() == Type.EVENT)
return Optional.of(eventTimeFn);
return Opt... | 0 |
public interface IModelWalker
{
boolean visit( IModelElement element ); | 0 |
ReplicationTarget target = DistributedWorkQueueWorkAssignerHelper.fromQueueKey(workID)
.getValue();
log.error("Could not instantiate ReplicaSystem for {}, waiting before returning the work",
target, e);
log.debug("Current status for {} replicating to {}: {}", file, target,
Protob... | 0 |
clusters.mapAndPublishHostsToCluster(hostNames, clusterName);
clusters.mapAndPublishHostsToCluster(Collections.singleton("h-5"), clusterName); | 1 |
XmlAdapter<JaxbMapKeyMap[], Map<String, Map<String, String>>> {
public JaxbMapKeyMap[] marshal(Map<String, Map<String, String>> map)
JaxbMapKeyMap[] list = new JaxbMapKeyMap[map.size()];
int index=0;
JaxbMapKeyVal[] keyValList = mapAdapter.marshal(value);
list[index++] = new JaxbMapKeyMap(key,... | 1 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
} else if (Enum.class.isAssignableFrom(cls)) {
return null;
} else if (Enum.class.isAssignableFrom(targetCls)) {
if (object instanceof Boolean) {
try {
Method m = targetCls.getMethod("valueOf", String.class);
return m.invoke... | 0 |
import java.util.Collection;
import java.util.Collections;
import org.apache.ambari.server.orm.entities.ResourceEntity;
import org.apache.ambari.server.orm.entities.ResourceTypeEntity;
private static final long serialVersionUID = 1L;
static{
createAdminPrivilegeEntity(ADMIN_PRIV_ENTITY);
}
private stat... | 0 |
import org.apache.ambari.server.controller.spi.Predicate;
import org.apache.ambari.server.controller.utilities.PredicateHelper;
private static final Predicate PREDICATE_1 = new PredicateBuilder().property(PROPERTY_A).equals("Monkey").toPredicate();
private static final Predicate PREDICATE_2 = new PredicateBuilder()... | 0 |
import org.apache.ambari.server.controller.internal.AbstractPropertyProvider;
import org.apache.ambari.server.controller.internal.PropertyInfo;
import org.apache.ambari.server.controller.spi.Predicate;
import org.apache.ambari.server.controller.spi.Request;
import org.apache.ambari.server.controller.spi.Resource;
impor... | 0 |
* the value {@code -1} is returned. This method blocks until input
* {@code null} is returned. This method blocks until input data is | 0 |
} else if (!file.canRead() || file.isDirectory()) { | 0 |
expectedException.expectMessage(provider.SCHEMA_IS_NOT_SUPPORTED_MESSAGE); | 0 |
ElementProcessor createElementProcessor(final String name) | 0 |
List<AtlasEntity> entities = toAtlasEntities(entityHeaders, operation);
private List<AtlasEntity> toAtlasEntities(List<AtlasEntityHeader> entityHeaders, EntityOperation operation) throws AtlasBaseException {
String entityGuid = entityHeader.getGuid();
String ... | 0 |
import org.apache.commons.configuration.io.FileHandler;
FileHandler handler = new FileHandler(conf1);
handler.setFileName(testProperties);
handler.load(); | 0 |
package org.apache.batik.gvt.filter; | 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 ... | 1 |
import org.junit.Before;
import org.junit.Rule;
import org.junit.rules.TestName;
private void checkResults(final Iterable<Entry<Key,Value>> scanner, final List<Key> results, final PartialKey pk) {
@Rule
public TestName test = new TestName();
private Connector conn;
@Before
public void setupInstance() thro... | 0 |
m_parser.addBuilder(new ComponentBuilder()); | 0 |
* The key or value the variable.
* Whether the variable is a resource [false]
*/
private boolean resource = false;
/**
* The bundle for a variable (when resource = 'true').
*/
private String bundle = null;
/**
* Tests whether or not the value is a resource key or literal ... | 0 |
String worker = System.getProperty("worker_id");
expectedLogs.verifyDebug("Upload ID for url " + url + " on worker " + worker + " is abc"); | 0 |
// Implementation methods
} | 0 |
return super.toInt(character, leftPos, rightPos);
return super.toCheckDigit(charValue); | 0 |
import org.apache.ambari.server.orm.entities.ViewInstanceDataEntity;
* Remove the data entry keyed by the given key from the given instance entity.
*
* @param instanceEntity the instance entity
* @param key the data key
*/
public void removeInstanceData(ViewInstanceEntity instanceEntity, S... | 0 |
*
*
*/
* superclass are returned by reflection but an IllegalAccessException is thrown
*
| 0 |
import org.apache.beam.runners.direct.DirectRunner.CommittedBundle;
import org.apache.beam.runners.direct.WatermarkManager.FiredTimers;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.transforms.AppliedPTransform;
import org.apache.beam.sdk.transforms.PTransform;
import org.apache.beam.sdk.util.KeyedWor... | 0 |
.addExpr("LPAD('a', CAST(5 AS BIGINT), ' ')", " a")
.addExpr("LPAD('a', CAST(3 AS BIGINT), '-')", "--a")
@Test
public void testRightPad() throws Exception {
ExpressionChecker checker =
new ExpressionChecker()
.addExpr("RPAD('abcdef', CAST(0 AS BIGINT))", "")
... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.