Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
public class TextRenderingFactory
extends AbstractIdentifierFactory
implements SVGValueConstants {
values.put(CSS_AUTO_VALUE, AUTO_VALUE);
values.put(CSS_GEOMETRICPRECISION_VALUE, GEOMETRICPRECISION_VALUE);
values.put(CSS_OPTIMIZELEGIBILITY_VALUE, OPTIMIZELEGIBILITY_VALUE);
values.put(CSS_O... | 0 |
import org.apache.beam.runners.spark.SparkPipelineOptions;
SparkPipelineOptions options =
PipelineOptionsFactory.as(SparkPipelineOptions.class);
EvaluationResult res = (EvaluationResult) p.run(); | 0 |
/**
* Copyright 2013 Apache Software Foundation | 0 |
@Override
public Optional<IJobKey> apply(Query.Builder query) {
@Override
public Optional<String> apply(Query.Builder query) {
@Override
public Task apply(IScheduledTask task) {
@Override
public boolean apply(Task canonicalTask) {
@Override
pub... | 0 |
Class<?> pluginClass)
public List<RuleFinder> getRuleFinders() {
public void setRuleFinders(List<RuleFinder> ruleFinders) {
public List<Rule> rules() {
public List<Rule> match(String path) {
public List<Rule> match(String namespaceURI, String path) {
List<Rule> matches; | 0 |
* Like an ASTIdentifier, but with array access allowed.
/** dummy velocity info. */
private static final Info DUMMY = new Info("", 1, 1); | 0 |
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 use this file except in compliance with
the License. You may obta... | 0 |
import org.apache.accumulo.core.constraints.DefaultKeySizeConstraint;
props.put(Property.TABLE_CONSTRAINT_PREFIX.toString() + "1", DefaultKeySizeConstraint.class.getName());
| 0 |
import java.util.ArrayList;
import java.util.Enumeration;
/**
* This method is the same as Collections#list(Enumeration). The reason to
* duplicate it here, is that it is missing in OSGi/Minimum execution
* environment.
*
* @param e the enumeration which to convert
* @return the list ... | 0 |
import org.apache.http.client.protocol.HttpClientContext;
import org.apache.http.conn.routing.RouteInfo;
HttpClientContext localContext = HttpClientContext.create();
RouteInfo route = localContext.getHttpRoute();
authState = localContext.getTargetAuthState();
... | 0 |
import org.apache.sshd.client.session.ClientSession;
@FunctionalInterface
public int selectVersion(ClientSession session, int current, List<Integer> available) {
@Override
public String toString() {
return "CURRENT";
}
public int selectVersion(ClientSession session, ... | 0 |
Object entry = ref.get(); // TrackingPoolEntry
* This method assumes that the new connection will be handed
* out immediately.
entry.plannedRoute = route;
* Handles cleaning up for a lost connection with the given config.
* Decrements any connection... | 0 |
public abstract class AbstractDatabaseAction extends AbstractComplementaryConfigurableAction implements Disposable { | 0 |
import org.apache.aurora.common.args.ArgParser;
import org.apache.aurora.common.args.parsers.NonParameterizedTypeParser; | 0 |
import static java.util.Objects.requireNonNull;
requireNonNull(co); | 0 |
* @throws IOException
* @throws IOException | 0 |
final Map<String, ?> params)
final Map<String, ?> params, final boolean createIfMissing)
public void inheritFrom(final Map<String, ?> source)
final CombinedBuilderParametersImpl srcParams = fromParameters(source);
final boolean inheritSettings)
final Configura... | 0 |
import org.apache.ambari.server.view.ViewRegistry;
import java.util.HashMap;
import java.util.Set;
/**
* Map of external resource definitions (added through views).
*/
private final static Map<Resource.Type, ResourceDefinition> resourceDefinitions =
new HashMap<Resource.Type, ResourceDefinition>();
... | 0 |
private static final String CONFIG_TYPE_UPDATE_LOCK_MAX_WAIT_TIME_IN_SECONDS = "atlas.server.type.update.lock.max.wait.time.seconds";
private static final Integer DEFAULT_TYPE_UPDATE_LOCK_MAX_WAIT_TIME_IN_SECONDS = Integer.valueOf(15);
private static Integer typeUpdateLockMaxWaitTimeInSeconds = null;
... | 0 |
assertEquals(ImmutableList.of(DataflowRunner.class, TestDataflowRunner.class), | 0 |
import org.apache.http.annotation.NotThreadSafe;
@NotThreadSafe | 0 |
import java.sql.SQLException;
import org.apache.ambari.server.AmbariException;
import org.apache.ambari.server.H2DatabaseCleaner;
H2DatabaseCleaner.resetSequences(injector);
public void after() throws AmbariException, SQLException {
H2DatabaseCleaner.clearDatabaseAndStopPersistenceService(injector); | 0 |
import org.apache.hc.core5.reactor.ssl.TransportSecurityLayer;
final TransportSecurityLayer tlsSession,
tlsSession.start(sslContext, sslBufferManagement, initializer, verifier); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/impl/Attic/BeanTagScript.java,v 1.8 2002/05/28 23:38:57 jstrachan Exp $
* $Revision: 1.8 $
* $Date: 2002/05/28 23:38:57 $
* $Id: BeanTagScript.java,v 1.8 2002/05/28 23:38:57 jstrachan Exp $... | 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 void testGetBackoffStrategy() {
control.replay();
assertEquals(backoffStrategy, backoffHelper.getBackoffStrategy());
}
@Test | 0 |
/** The special servlet settings. */
protected final ServletSettings servletSettings;
this.servletSettings = new ServletSettings(this.settings);
if (this.servletSettings.isShowVersion()) {
this.servletSettings, this.getLogger(), this);
... | 0 |
public LocalityGroup(InterruptibleIterator iterator,
Map<ByteSequence,MutableLong> columnFamilies, boolean isDefaultLocalityGroup) {
public LocalityGroup(Map<ByteSequence,MutableLong> columnFamilies,
boolean isDefaultLocalityGroup) {
public void init(SortedKeyValueIterator<Key,Value> source, M... | 0 |
import java.awt.event.InputEvent;
InputEvent.CTRL_MASK, true)); | 0 |
import org.apache.ambari.logsearch.solr.SolrConstants;
import org.apache.commons.lang.StringUtils;
import java.util.Arrays;
import java.util.List;
addInFiltersIfNotNullAndEnabled(query, request.getUserList(),
SolrConstants.AuditLogConstants.AUDIT_REQUEST_USER,
StringUtils.isNotBlank(request.getUserList... | 0 |
public synchronized boolean enlistResource(final XAResource xaRes) { | 0 |
import org.apache.http.nio.NHttpClientHandler;
public class AsyncNHttpClientHandler extends NHttpHandlerBase
implements NHttpClientHandler {
public void exception(final NHttpClientConnection conn, final HttpException ex) {
closeConnection(conn, ex);
if (this.even... | 0 |
* Copyright 2006-2009 The Apache Software Foundation. | 0 |
import org.apache.accumulo.core.client.NewTableConfiguration;
create(tableName, new NewTableConfiguration());
@Deprecated
@Deprecated
NewTableConfiguration ntc = new NewTableConfiguration().setTimeType(timeType);
create(tableName, ntc);
create(tableName, ntc.withoutDefaultIterators());
}
/*... | 0 |
public UserPassToken getAccumuloToken() {
return new UserPassToken(user, password.value);
return new UserPassToken(user, securePassword.value);
@Override
return getInstance().getConnector(this.getAccumuloToken());
AccumuloInputFormat.setZooKeeperInstance(job, instance, zookeepers);
AccumuloOut... | 1 |
if (isDistributed() && isReconfigEnabled()) {
// we also don't backup if reconfig feature is disabled. | 0 |
public class KeyValueTest extends org.junit.Assert {
public KeyValueTest() throws Exception {
@org.junit.Test
String filename =
"data/ie/baltimore/merlin-examples/merlin-xmldsig-twenty-three/signature-enveloping-dsa.xml";
f = new File(BASEDIR + SEP + filename);
f = n... | 0 |
* The {@link CoderCloudObjectTranslatorRegistrar} containing the default collection of {@link
* Coder} {@link CloudObjectTranslator Cloud Object Translators}.
return builder.build(); | 1 |
import org.apache.ambari.server.controller.spi.*;
import java.util.*;
private static final String SERVICE_DISPLAY_NAME_PROPERTY_ID = PropertyHelper.getPropertyId(
"StackServices", "display_name");
setResourceProperty(resource, SERVICE_DISPLAY_NAME_PROPERTY_ID,
response.getServiceDisplayNam... | 0 |
package com.twitter.mesos;
import com.google.common.collect.Maps;
import com.twitter.common.base.Closure;
import com.twitter.mesos.gen.MachineDrain;
import com.twitter.mesos.gen.ExecutorMessage;
import com.twitter.mesos.gen.ExecutorMessageType;
import org.apache.thrift.TBase;
import org.easymock.IMocksControl;
import ... | 0 |
import org.apache.commons.lang.SystemUtils;
* @version CVS $Id: Deploy.java,v 1.5 2004/07/11 23:02:54 antonio Exp $
SystemUtils.FILE_SEPARATOR + "WEB-INF"+
SystemUtils.FILE_SEPARATOR + "web.xml"); | 0 |
.add(dpBuilder.createBundleResource().setUrl(getTestBundleURL("bundleapi1", "bundleapi1", "1.0.0")))
.add(dpBuilder.createBundleResource().setUrl(getTestBundleURL("bundleapi2", "bundleapi2", "2.0.0")));
.add(dpBuilder.createBundleResource().setUrl(getTestBundleURL("bundleapi1", "bund... | 0 |
// noop | 0 |
* nor may "Apache" appear in their name, without
* @version $Id: CopyStreamException.java,v 1.6 2003/01/26 04:33:32 brekke Exp $ | 0 |
return new TagScript( | 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: FileSourceFactory.java,v 1.2 2003/03/16 17:49:10 vgritsenko Exp $ | 0 |
import org.apache.http.auth.AuthSchemeProvider;
import org.apache.http.config.Lookup;
import org.apache.http.config.RegistryBuilder;
private final Lookup<AuthSchemeProvider> authSchemeRegistry;
this.authSchemeRegistry = RegistryBuilder.<AuthSchemeProvider>create()
.register(AuthSchemes.BASIC... | 0 |
* Interface to be implemented by any object that wishes to be notified of blocking I/O operations
* that could be cancelled.
*
* @param cancellable
* {@link Cancellable} for the ongoing operation. | 0 |
public interface RequestHandler<T> {
enum Result {
Unsupported,
Replied,
ReplySuccess,
ReplyFailure
}
* @param t
* @return
Result process(T t, String request, boolean wantReply, Buffer buffer) throws Exception; | 0 |
// at this point, Enumeration<LedgerEntry> ls is filled with the returned | 0 |
Collection<String> actualStrings = toCollection(relevantResults(actual).iterator());
Assert.assertThat("wrong pipeline output", actualStrings, IsEqual.equalTo(expectedStrings)); | 1 |
* {@link PCollection}.
* {@link PCollection} which must contain a single {@code Iterable<T>}
* value.
* Constructs a {@link SingletonAssert} for the value of the provided {@link PCollection}.
* Constructs a {@link SingletonAssert} for the value of the provided {@link PCollection},
* which must have at... | 0 |
/*
* Copyright 2002-2005 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 |
visibleFileInfo = createFileSelectInfo(visibleFile);
hiddenFileInfo = createFileSelectInfo(hiddenFile);
notExistingFileInfo = createFileSelectInfo(notExistingFile);
zipFile = new File(getTempDir(), HiddenFileFilterTest.class.getName() + ".zip");
files = zipFileObj.findFiles(new F... | 0 |
amsSite.put("timeline.metrics.service.webapp.address", "localhost:6188"); | 0 |
import org.apache.cocoon.components.flow.CompilingInterpreter;
* @version CVS $Id: FOM_JavaScriptInterpreter.java,v 1.11 2003/10/15 17:02:05 cziegeler Exp $
public class FOM_JavaScriptInterpreter extends CompilingInterpreter
Source src = this.sourceresolver.resolveURI(sourceURI);
en... | 0 |
private static final Logger LOG =
Logger.getLogger(FollowerZooKeeperServer.class);
super(logFactory, self.tickTime, self.minSessionTimeout,
self.maxSessionTimeout, treeBuilder, zkDb, self); | 0 |
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
private static final long serialVersionUID = 1L;
public static final String OPTION_FETCH_TYPE = "fetchType";
public static final String OPTION_ATTR_MATCH_TYPE = "matchType";
... | 0 |
@Override
public List<SecurityTokenProvider> getRegisteredSecurityTokenProviders() {
return new ArrayList<SecurityTokenProvider>(securityTokenProviders.values());
} | 0 |
catch (final FileSystemException exc)
final FileSystem fs = getFileSystem(rootName, fileSystemOptions);
protected synchronized FileSystem getFileSystem(final FileName rootName, final FileSystemOptions fileSystemOptions) | 1 |
} catch (AccumuloException | AccumuloSecurityException | TableNotFoundException e) {
public void testRandom() { | 0 |
* @param remoteAddress remote socket address.
SocketAddress remoteAddress, | 0 |
import org.apache.accumulo.core.client.sample.SamplerConfiguration; | 0 |
* @author <a href="http://commons.apache.org/configuration/team-list.html">Commons Configuration team</a> | 0 |
import java.util.HashSet;
import java.util.Set;
Set<String> authorityNames = new HashSet<String>();
for (GrantedAuthority authority : authorities) {
authorityNames.add(authority.getAuthority());
}
Assert.assertTrue(authorityNames.contains("CLUSTER.READ@1"));
Assert.assertTrue(authorityNames.... | 0 |
public void testLoadable() {
public void testInstantiate() {
public void testCreateInterfaceInstance() {
public void testCreateProtectedInstance() {
public void testClassloader() { | 0 |
package org.apache.beam.sdk.transforms.windowing; | 0 |
import javax.inject.Named;
@Named | 0 |
private volatile boolean disposed;
disposed = true;
if ( disposed )
{
throw new IllegalStateException( "enable: " + this );
}
if ( !isActivatorActive() )
{
log( LogService.LOG_DEBUG, "Bundle's component activator is not active; not en... | 0 |
ReduceFn<K, InputT, OutputT, W>.Context directContext =
contextFactory.base(window, StateStyle.DIRECT);
if (triggerRunner.isClosed(directContext.state())) {
// This window has already been closed.
droppedDueToClosedWindow.addValue(1L);
WindowTracing.debug(
"Red... | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger LOG = LoggerFactory.getLogger(AppCookieManager.class);
LOG.info("Successful SPNego authentication to URL:" + uri); | 1 |
renderedImage = new ConcreteBufferedImageCachableRed
(offScreen, renderedArea.x, renderedArea.y); | 0 |
import java.nio.charset.StandardCharsets;
try (InputStream is = new ByteArrayInputStream(DATA.getBytes(StandardCharsets.UTF_8))) {
try (InputStream is = new ByteArrayInputStream(MULTIPLE_USER_DATA.getBytes(StandardCharsets.UTF_8))) { | 0 |
while (n != null) {
}
Element e =
Element e =
}
Element e =
}
Element e =
}
Element e =
} | 1 |
static org.slf4j.Logger LOG =
LOG.debug(" signature.checkSignatureValue finished: " + verify);
LOG.debug("Reference " + i + " was OK");
LOG.debug("Reference " + i + " failed: " + algo); | 0 |
package com.twitter.mesos.executor;
import com.twitter.mesos.gen.ResourceConsumption;
import com.twitter.mesos.gen.ScheduleStatus;
import com.twitter.mesos.gen.TwitterTaskInfo;
import java.io.File;
/**
* @author wfarner
*/
public interface Task {
public int getId();
public void run() throws TaskRunException;... | 0 |
import java.util.Map;
import java.util.function.Supplier;
@Override
public CacheEntry getBlock(String blockName, Loader loader) {
Map<String,Loader> depLoaders = loader.getDependencies();
Map<String,byte[]> depData;
switch (depLoaders.size()) {
case 0:
depData = Collections... | 0 |
throw new ConfigurationException("A requirement filter is invalid : " + filter, e); | 0 |
package org.apache.accumulo.test.randomwalk.security;
import org.apache.accumulo.test.randomwalk.State;
import org.apache.accumulo.test.randomwalk.Test; | 0 |
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpResponseException;
* A {@link org.apache.http.client.ResponseHandler} that returns the response body as a String
* body is consumed and an {@link org.apache.http.client.HttpResponseException} is thrown.
* org.apache.http.client.methods.HttpUriRe... | 0 |
import org.apache.aurora.gen.BatchJobUpdateStrategy;
import org.apache.aurora.gen.JobUpdateStrategy;
.setUpdateStrategy(
JobUpdateStrategy.batchStrategy(new BatchJobUpdateStrategy().setGroupSize(1))) | 0 |
private String serviceName;
String tag, String serviceName, String description,
Set<String> hosts, Map<String, Config> configs) {
this.serviceName = serviceName;
public String getServiceName() {
return serviceName;
}
public void setServiceName(Str... | 1 |
Table outputTbl = event.getOutputs().iterator().next().getTable();
outputTbl = dgiBridge.hiveClient.getTable(outputTbl.getDbName(), outputTbl.getTableName());
List<FieldSchema> newColList = outputTbl.getAllCols(); | 0 |
package org.apache.commons.ognl.test.objects; | 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 |
Document doc = XMLUtils.createDocumentBuilder(false).newDocument();
Document doc = XMLUtils.createDocumentBuilder(false).newDocument(); | 0 |
/**
*
* @version $Id$
*/
public class DefaultBrokenLinkProvider
String res = base.getClass().getPackage().getName() +
".resources.Messages";
// of base's class loader to this class's class loader.
public Filter getBrokenLinkImage(Object base,
ht.put(BROKEN_LI... | 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.beam.runners.direct.DirectRunner.CommittedBundle;
import org.apache.beam.runners.direct.DirectRunner.UncommittedBundle; | 0 |
private final CMProtectionDomain domain;
// FELIX-5908 - Eagerly instantiate this class
// to avoid a potential NoClassDefFoundError
this.domain = new CMProtectionDomain(bundle);
return new ProtectionDomain[] { domain }; | 0 |
* @version $Revision$ $Date$ | 0 |
import static javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag;
this.realmName = Util.trimToNull((String) serviceReference.getProperty(LoginModuleFactory.JAAS_REALM_NAME)); | 0 |
if (includeButSearch != null && includeButSearch.trim().length() > 0) {
if (excludeButSearch != null && excludeButSearch.trim().length() > 0) {
if (exclude != null && exclude.trim().length() > 0) {
if (xp.length() > 2 && !Character.isWhitespace(xp.charAt(0))) { | 0 |
import org.apache.aurora.gen.storage.StoredCronJob;
ImmutableSet.Builder<StoredCronJob> jobs = ImmutableSet.builder();
for (IJobConfiguration config : store.getCronJobStore().fetchJobs()) {
jobs.add(new StoredCronJob(config.newBuilder()));
snapshot.setCronJobs(jobs.build());
... | 0 |
/**
* Invalidates the given connection.
*
* @param conn connection to invalidate
* @throws SQLException if the connection is not a
* <code>PoolGuardConnectionWrapper</code> or an error occurs invalidating
* the connection
* @since 1.2.2
*/ | 0 |
import java.util.function.Function;
@FunctionalInterface
public interface Transformer<I, O> extends Function<I, O> {
@Override
default O apply(I input) {
return transform(input);
}
@SuppressWarnings({ "unchecked" })
return IDENTITY; | 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
* use th... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbutils/src/java/org/apache/commons/dbutils/handlers/MapHandler.java,v 1.2 2003/11/28 19:32:10 dgraham Exp $
* $Revision: 1.2 $
* $Date: 2003/11/28 19:32:10 $
private RowProcessor convert = ArrayHandler.ROW_PROCESSOR; | 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... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.