Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import static org.apache.ambari.logsearch.doc.DocConstants.PublicOperationDescriptions.OBTAIN_GENERAL_CONFIG_OD;
@Api(value = "public", description = "Public operations")
@ApiOperation(OBTAIN_GENERAL_CONFIG_OD) | 0 |
import org.apache.cocoon.portal.PortalException;
public class AspectChain {
/** The aspect class. */
protected final Class aspectClass;
public AspectChain(Class aClass) {
this.aspectClass = aClass;
}
throws ConfigurationException, PortalException {
if ( !this.aspectClas... | 0 |
import org.apache.accumulo.core.file.blockfile.cache.BlockCacheManager;
import org.apache.accumulo.core.file.blockfile.cache.CacheType;
private BlockCacheManager blockCacheManager = null;
public long getMaxHeapSize() {
return getMaxSize();
}
@Override
if (opts.indexCacheSize > 0 || opts.dataCa... | 0 |
import org.apache.xml.security.c14n.helper.C14nHelper; | 0 |
* filter = "(Service-Component=*)"
* stateMask = Bundle.ACTIVE) | 0 |
Bundle bundle = bc.getBundle(); | 0 |
import jline.console.ConsoleReader;
String tokenBase64 = Base64.getEncoder().encodeToString(AuthenticationTokenSerializer.serialize(token)); | 0 |
import org.apache.ambari.server.state.HostEvent;
import org.apache.ambari.server.state.HostEventType;
| 0 |
package org.apache.beam.sdk.testing;
import org.apache.beam.sdk.coders.Coder.Context;
import org.apache.beam.sdk.coders.CoderException;
import org.apache.beam.sdk.coders.CustomCoder;
import org.apache.beam.sdk.coders.StringUtf8Coder;
| 0 |
package org.apache.aurora.scheduler.quota;
import org.apache.aurora.scheduler.base.Query;
import org.apache.aurora.scheduler.base.Tasks;
import org.apache.aurora.scheduler.storage.Storage;
import org.apache.aurora.scheduler.storage.Storage.StoreProvider;
import org.apache.aurora.scheduler.storage.Storage.Work;
import o... | 0 |
String clusterName = r.getPropertyValue(clusterNamePropertyId).toString();
String componentName = r.getPropertyValue(componentNamePropertyId).toString();
Cluster cluster = clusters.getCluster(clusterName);
StackId stack = cluster.getDesiredStackVersion();
String svc = me... | 0 |
public class ExprLookup implements Lookup
/** The StrSubstitutor for performing replace operations. */
private StrSubstitutor substitutor;
installSubstitutor(config);
if(substitutor == null)
{
return var;
}
String result = substitutor.replace(var);
* Cre... | 0 |
import org.apache.atlas.GraphTransaction;
GraphBackedDiscoveryService(GraphProvider<TitanGraph> graphProvider, MetadataRepository metadataRepository)
throws DiscoveryException {
titanGraph.indexQuery(Constants.FULLTEXT_INDEX, graphQuery).vertices().iterator();
GremlinQuery gremlinQuery =... | 0 |
*
*
*
*
*
*
*
*
| 0 |
public static Class loadClassUsingClass(Class clazz, String name, SecureAction action)
ClassLoader loader = action.getClassLoader(clazz);
loader = (loader == null) ? action.getSystemClassLoader() : loader;
loadedClass = loadClassUsingClass(ifcs[i], name, action); | 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 class TypeNotFoundException extends AtlasException { | 0 |
* @throws IOException if an input/output error occurs | 0 |
public static class ActiveBundle<InputT> implements RemoteBundle<InputT> {
public String getId() { | 0 |
import java.util.ArrayList;
final ArrayList<String> list = new ArrayList<String>();
list.add(current.toString());
list.add(current.toString());
final String[] args = new String[list.size()];
return list.toArray(args); | 0 |
package org.apache.jute.compiler; | 0 |
final Integer[] ints = new Integer[theList.size()];
for (final Integer k : ints) { | 1 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Logger LOG = LoggerFactory.getLogger(InstanceActionHandler.class); | 0 |
import java.util.Collection;
import java.util.Iterator;
import java.util.Set;
import org.apache.avalon.framework.parameters.ParameterException;
if (rootScope == null) {
}
cocoon.put("parameters", parameters); | 0 |
private static final StateNamespace NAMESPACE_1 = new StateNamespaceForTest("ns1");
private static final StateTag<ValueState<String>> STRING_VALUE_ADDR =
private static final StateTag<CombiningState<Integer, int[], Integer>>
private static final StateTag<BagState<String>> STRING_BAG_ADDR =
private static fina... | 0 |
import org.apache.batik.ext.awt.image.Light; | 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 |
* example using Apache Tomcat and JNDI and it also contains a non-JNDI example. | 0 |
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.replay;
import java.util.Arrays;
import java.util.HashSet;
import org.easymock.EasyMock;
import org.mockito.Mockito;
import com.google.inject.AbstractModule;
m_masterHostResolver = EasyMock.createMock(MasterHostResolver.class);
... | 0 |
private void checkNotMetadataID(String tableId, TableOperation operation) throws ThriftTableOperationException {
if (MetadataTable.ID.equals(tableId) || RootTable.ID.equals(tableId)) {
String why = "Table names cannot be == " + RootTable.NAME + " or " + MetadataTable.NAME;
log.warn(why);
throw n... | 1 |
import org.junit.Test;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class FilenameUtilsWildcardTestCase {
@Test
@Test
@Test
@Test
assertArrayEquals(new... | 0 |
import static org.junit.Assert.assertEquals;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.UriInfo;
import org.apache.ambari.server.api.resources.ResourceInstance;
import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
import org.apache.ambari.server.api.services.serializers.ResultSeria... | 0 |
context.setAttribute(HttpClientContext.HTTP_ROUTE, route);
context.setAttribute(HttpClientContext.HTTP_TARGET_HOST, target);
context.setAttribute(HttpClientContext.HTTP_REQUEST, request);
context.setAttribute(HttpClientContext.HTTP_RESPONSE, out);
context.setAttribute(HttpClientC... | 0 |
import com.sun.istack.NotNull;
ACTIVE_DIRECTORY;
/**
* Translates a String to a KDCType.
* <p/>
* The translation logic attempts to nicely convert a String to a KDCType by replacing all '-'
* characters to '_' characters and converting the String to uppercase. Allowing for values like
* "mit_kdc" t... | 0 |
import org.apache.beam.sdk.annotations.Experimental.Kind;
@Experimental(Kind.SCHEMAS) | 0 |
Map<String, Map<String, String>> actualConfig = getKerberosHelper().calculateConfigurations(getCluster(), null, kerberosDescriptor, false, false); | 0 |
package org.apache.accumulo.tserver.log;
import static org.apache.accumulo.tserver.logger.LogEvents.COMPACTION_FINISH;
import static org.apache.accumulo.tserver.logger.LogEvents.COMPACTION_START;
import static org.apache.accumulo.tserver.logger.LogEvents.DEFINE_TABLET;
import static org.apache.accumulo.tserver.logger.L... | 1 |
/**
* Method which matches signature but which has wrong parameters
*/
public String testAddChild(String badParameter) {
return null;
}
/**
* Method which matches signature but which has wrong parameters
*/
public String testAddChild2(String ignore, String badParameter... | 0 |
import org.junit.After;
@After
public void closeClient() {
accumuloClient.close();
}
return accumuloClient.createMultiTableBatchWriter(); | 0 |
* Returns the first child element of the specified node and checks that
* the local name is equal to {@code localName}.
*
* @param node the node
* @return the first child element of the specified node
* @throws NullPointerException if {@code node == null}
* @throws MarshalException if... | 0 |
/**
* Returns the name of this {@code PValue}.
*/
public String getName(); | 0 |
import org.apache.ambari.server.configuration.AmbariServerConfigurationKey;
return AmbariServerConfigurationKey.GROUP_MEMBER_ATTRIBUTE.key(); | 0 |
* Display data representing a Java class.
* <p>Java classes can be registered as display data via | 0 |
* only these tests. <br>
* The test uses an dummy <testRun> which contains: <br>
* - testSuite, href="testSuiteA.xml" <br>
* - testSuite, href="testSuiteB.xml" <br>
* Where: <br>
* - testSuite, id="A" <br>
* - test, id="A1" <br>
* - test, id="A2" <br>
* - test, id="duplicateId" <br>
... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/CallMethodRule.java,v 1.19 2002/09/30 19:48:50 rdonkin Exp $
* $Revision: 1.19 $
* $Date: 2002/09/30 19:48:50 $
* @version $Revision: 1.19 $ $Date: 2002/09/30 19:48:50 $
O... | 0 |
import org.apache.atlas.type.AtlasType;
* @param dataTypes the data types
void onAdd(Collection<? extends AtlasType> dataTypes) throws AtlasException;
* @param dataTypes the data types
void onChange(Collection<? extends AtlasType> dataTypes) throws AtlasException; | 1 |
import org.apache.cocoon.processing.ProcessInfoProvider;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
private static Log LOG = LogFactory.getLog( JavaScriptJXPathBinding.class );
private ProcessInfoProvider processInfoProvider;
public JavaScriptJXPathBinding(Proc... | 0 |
m_name = (String) configuration.get("instance.name"); | 0 |
if (!outputMap.containsKey(taggedValue.getTag())) { | 0 |
*
// Create and initialize scheme registry
cm.setMaxTotal(100);
// When HttpClient instance is no longer needed,
httpClient.getConnectionManager().shutdown();
| 0 |
import java.util.List;
public class ResolveBundle extends BundlesCommandOptional {
protected void doExecute(List<Bundle> bundles) throws Exception {
if (bundles.isEmpty()) {
pa.resolveBundles(null);
} else {
pa.resolveBundles(bundles.toArray(new Bundle[bundle... | 0 |
import org.apache.accumulo.core.util.UnsynchronizedBuffer;
assertEquals(1, UnsynchronizedBuffer.nextArraySize(0));
assertEquals(1, UnsynchronizedBuffer.nextArraySize(1));
assertEquals(2, UnsynchronizedBuffer.nextArraySize(2));
assertEquals(4, UnsynchronizedBuffer.nextArraySize(3));
assertEquals(4, U... | 1 |
.apply("PubsubUnboundedSource.Stats",
ParDo.of(new StatsFn<T>(pubsubFactory, subscription, timestampLabel, idLabel))); | 0 |
package com.twitter.mesos.auth;
* Binding module to set up an authentication system, exposed as {@link SessionValidator}.
@CmdLine(name = "auth_mode", help = "Enforces RPC authentication with mesos client.")
private static final Arg<AuthMode> AUTH_MODE = Arg.create(AuthMode.SECURE);
| 0 |
package org.apache.batik.gvt.text; | 0 |
* @version $Revision$ | 1 |
* Copyright 2016 Seznam.cz, a.s. | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/QName.java,v 1.4 2002/10/13 02:25:36 dmitri Exp $
* $Revision: 1.4 $
* $Date: 2002/10/13 02:25:36 $
import org.apache.commons.jxpath.JXPathException;
* @version $Revision: 1.4 $ $Date... | 0 |
*/
package org.apache.http.client.protocol;
import org.apache.http.client.entity.DeflateDecompressingEntity;
import org.apache.http.client.entity.GzipDecompressingEntity;
public class ContentEncodingProcessor
implements HttpResponseInterceptor, HttpRequestInterceptor { | 0 |
return NamedResource.getNames(getSignatureFactories());
return NamedResource.getNameList(getSignatureFactories()); | 0 |
import com.google.inject.Singleton;
@Singleton | 1 |
import org.apache.cocoon.el.objectmodel.ObjectModel; | 0 |
targetCounts.put(target, 1L); | 0 |
if (future != null)
futureSession = parse(future);
if (last != null)
lastSession = parse(last);
if (assignments.size() != 1)
throw new IllegalArgumentException("There is only one root tablet");
if (assignment.tablet.compareTo(Constants.ROOT_TABLET_EXTENT) != 0)
... | 1 |
for(final Map.Entry<Object, Object> e : System.getProperties().entrySet()) | 0 |
* Autogenerated by Thrift Compiler (0.12.0)
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)")
@org.apache.thrift.annotation.Nullable | 0 |
*
* @cocoon.sitemap.component.documentation.disabled | 0 |
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
private static Log LOG = LogFactory.getLog( AggregateJXPathBinding.class );
if (LOG.isDebugEnabled()) {
LOG.debug("Done loading " + this);
if (LOG.isDebugEnabled()) {
LOG.debug("Done saving "... | 0 |
import com.twitter.mesos.scheduler.JobManager.JobUpdateResult;
import com.twitter.mesos.scheduler.configuration.ConfigurationManager.TaskDescriptionException;
public Set<String> restartTasks(Set<String> taskIds) throws RestartException;
/**
* Triggers an update to a job.
*
* @param updatedJob The updated ... | 0 |
import org.apache.felix.service.command.CommandProcessor;
import org.apache.felix.service.command.CommandSession; | 0 |
// TODO(BEAM-6274): Is this always true? Do we always send the input element to the main input receiver?
// TODO(BEAM-6274): do we have to put this in the "start" method as well?
// TODO(BEAM-6274): Why do we need to namespace this to "user"?
// TODO(BEAM-6274): investigate if this is the corr... | 0 |
* Interface for opening {@link OperatedClientConnection connections}.
* @since 4.0
public interface ClientConnectionOperator {
void openConnection(OperatedClientConnection conn,
void updateSecureConnection(OperatedClientConnection conn,
} // interface ClientConnectionOperator | 0 |
/* ====================================================================
* Copyright (c) 2001-2004 The Apache Software Foundation. All rights
* @version $Revision: 1.2 $ $Date: 2004/01/14 21:34:35 $ | 0 |
/**
* Get the global context, i.e. the bundle context of the factory.
* @return the global bundle context.
*/
public BundleContext getGlobalContext() {
return m_bundleContext;
} | 0 |
* @version CVS $Id: JobScheduler.java,v 1.3 2003/09/04 12:42:44 cziegeler Exp $
* Schedule a periodic job.
* The job is started the first time when the period has passed.
* Note that if a Job already has same name then it is overwritten.
*
* @param name the name of the job
* @param jobro... | 0 |
import org.apache.felix.framework.resolver.Content;
public class JarContent implements Content
public Content getEntryAsContent(String entryName) | 0 |
public OrFileFilter(final IOFileFilter filter1, final IOFileFilter filter2) {
public boolean removeFileFilter(final IOFileFilter ioFileFilter) {
for (final IOFileFilter fileFilter : fileFilters) {
for (final IOFileFilter fileFilter : fileFilters) {
final StringBuilder buffer = new String... | 1 |
public boolean error;
error = true;
public boolean error;
error = true;
if (eir.error) {
cancel();
}
if (eihr.error) {
cancel();
... | 0 |
import org.apache.accumulo.shell.ShellUtil;
private Option executionHintsOpt;
scanner.setExecutionHints(ShellUtil.parseMapOpt(cl, executionHintsOpt));
executionHintsOpt = new Option(null, "execution-hints", true, "Execution hints map");
executionHintsOpt.setArgName("<key>=<value>{,<key>=<value>}");
... | 0 |
*
*
*
/**
*
* @version $Revision: 1.5 $
//-------------------------------------------------------------------------
/**
//-------------------------------------------------------------------------
newClassLoader =
| 1 |
if ( this.clazz.getClassLoader() != null ) {
try {
Class<?> typeClass = this.clazz.getClassLoader().loadClass( type );
return typeClass.isAssignableFrom( this.clazz );
} catch (ClassNotFoundException cnfe) {
// cannot load the check type th... | 0 |
import org.apache.beam.examples.common.ExampleUtils;
String[] words = c.element().split(ExampleUtils.TOKENIZER_PATTERN); | 0 |
public Output(OutputDefinition definition) { | 0 |
import javax.xml.parsers.DocumentBuilder;
import org.apache.xml.security.utils.XMLUtils;
db = XMLUtils.createDocumentBuilder(false);
doc = XMLUtils.createDocumentBuilder(false).parse | 0 |
log.info("Unable to read key {}: {}", files[i], e); | 0 |
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@O... | 0 |
package org.apache.felix.karaf.main.spi;
} | 0 |
import javax.ws.rs.POST;
* Handles: POST /{clustername}/stack_versions requests
* Distribute repositories/install packages.
*
* @param body http body
* @param headers http headers
* @param ui uri info
* @return information regarding the created services
*/
@POST
@Produces... | 0 |
Request request = PropertyHelper.getCreateRequest(propertySet, null);
Request request = PropertyHelper.getUpdateRequest(properties, null); | 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... | 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 m... | 0 |
operator.setup();
operator.teardown(); | 0 |
.addActionDBAccessorConfigsBindings().addPasswordEncryptorBindings().build().configure(binder); | 0 |
import org.apache.ambari.server.api.query.render.ClusterBlueprintRenderer;
import org.apache.ambari.server.api.query.render.Renderer;
public Renderer getRenderer(String name) {
if (name != null && name.equals("blueprint")) {
return new ClusterBlueprintRenderer();
} else {
return super.getRenderer... | 0 |
import org.apache.commons.lang3.StringUtils; | 0 |
File fp = f.getParentFile();
if (!fp.exists() && !fp.mkdirs()) {
throw new IOException("Could not create directory " + fp);
}
@Override
@Override
@Override | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Lists; | 0 |
public void testCreationFromSystemProperties() throws Exception {
// Set a non-default value for testing
.put("sdk_pipeline_options", "{\"options\":{\"numWorkers\":999}}")
assertEquals(999, options.getNumWorkers()); | 0 |
package org.apache.commons.vfs2.provider.ftp;
import org.apache.commons.vfs2.FileSystemException; | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.