Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import java.net.URL; import org.apache.commons.jci.stores.ResourceStore; if (!src.exists()) { throw new ConfigurationException(src.getURI() + " doesn't exist"); } configureStore(configBean,src.getURI(),child.getChild("store",false)); ...
0
@Inject DaoUtils daoUtils; final TypedQuery<HostComponentStateEntity> query = entityManagerProvider.get().createNamedQuery("HostComponentStateEntity.findAll", HostComponentStateEntity.class); /** * Retrieve all of the Host Component States for the given host. * * @param hostName HOst name * @retur...
0
import org.apache.beam.sdk.io.Source; new BoundedReadEvaluatorFactory.InputProvider(context).getInitialInputs(transform, 1); TransformEvaluator<?> evaluator = factory.forApplication(transform, null); private final int firstSplitIndex; public TestSource(Coder<T> coder, int firstSplitIndex, T... e...
0
* @version $Revision$
0
import java.sql.Connection; import java.sql.DriverManager; private static final String[] rcaTableNames = {"workflow", "job", "task", "taskAttempt", "hdfsEvent", "mapreduceEvent", "clusterEvent"}; public void cleanUpRCATables() { LOG.info("Cleaning up RCA tables."); for (String tableName : rcaTableNames) { ...
0
private static final ThreadLocal<DateFormat> DSL_DATE_FORMAT = ThreadLocal.withInitial(() -> { DateFormat ret = new SimpleDateFormat(ISO8601_FORMAT); ret.setTimeZone(TimeZone.getTimeZone("UTC")); return ret; }); if(!isNestedQuery) { addFrom(typeName); } ...
0
import org.apache.commons.jelly.JellyTagException; public void doTag(XMLOutput output) throws TimeoutException, RequirementException, JellyTagException { throw new JellyTagException("This tag requires that you set the thread or group attribute");
0
public static String reconfig(ZooKeeper zk, List<String> joiningServers,
0
List<ElementValuePairGen> elements = new ArrayList<>(); List<ElementValuePairGen> elements = new ArrayList<>(); List<AnnotationEntryGen> v = new ArrayList<>(); List<AnnotationEntryGen> v2 = new ArrayList<>();
0
components.registerEnvironment(Environments.createDockerEnvironment("java")); components.registerEnvironment(Environments.createDockerEnvironment("java"));
0
channel.getInvertedIn().write(buffer.array(), buffer.rpos(), buffer.available()); channel.getInvertedIn().flush();
0
HttpAsyncRequestHandlerRegistry registry = new HttpAsyncRequestHandlerRegistry(); registry.register("*", new BufferingAsyncRequestHandler(new SimpleRequestHandler())); registry,
0
HttpClientConnection conn = new DefaultHttpClientConnection(host); conn.open(connparams);
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory;
0
import java.sql.SQLException; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import com.google.inject.Inject; import com.google.inject.Injector; // add viewparameter columns dbAc...
0
import org.junit.Before; @Before @Override
0
for (final byte b : alwaysEncodeCharsArray) { final int expectedEncodingBytes = expectedEncodingBytes(bytes); final boolean willEncode = expectedEncodingBytes != bytes.length; private byte[] doEncode(final byte[] bytes, final int expectedLength, final boolean willEncode) { fi...
0
import org.apache.hadoop.conf.Configuration; int res = ToolRunner.run(new Configuration(), new UniqueColumns(), args);
0
import javax.annotation.Nullable;
0
import org.apache.avalon.excalibur.i18n.ResourceManager; import org.apache.avalon.excalibur.i18n.Resources; private final FTPClient client; client = new FTPClient(); client.connect( hostname ); int reply = client.getReplyCode(); if ( !FTPReply.isPositiveCompletion( re...
0
import org.osgi.framework.hooks.resolver.ResolverHookFactory; ResolverHookFactory.class,
0
if (group == null) { //expected if thread died, ignore it continue; } int activeCount = group.activeCount(); Thread[] groupThreads = new Thread[activeCount];
0
* @version CVS $Id$
0
EvaluationResult res = SparkPipelineRunner.create().run(p); res.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
.apply("Read parquet files", ParquetIO.readFiles(SCHEMA))
0
/** * Tests whether all children can be replaced at once. */ @Test public void testReplaceChildren() { final int childCount = 8; Collection<ImmutableNode> newChildren = new ArrayList<ImmutableNode>(childCount); for (int i = 0; i < childCount; i++) ...
0
import org.apache.zookeeper.server.auth.ServerAuthenticationProvider; * @param zks : the ZooKeeper server * @param cnxn : the server connection * @param acl : set of ACLs for the node * @param perm : the permission that the client is requesting * @param ids : the credentials s...
0
final ClientHttp2StreamMultiplexerFactory http2StreamHandlerFactory = new ClientHttp2StreamMultiplexerFactory( httpProcessor, exchangeHandlerFactory, h2Config, charCodingConfig, null); return new Http2OnlyClientProtocolNegot...
0
public static final String ATTRIBUTE_NAME = "property"; public static final String ATTRIBUTE_VALUE = "value"; /** * Updates property for the entity corresponding to guid * @param guid * @param property * @param value */ public JSONObject updateEntity(String guid, String property...
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
/* * 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
EvaluationResult res = SparkPipelineRunner.create().run(p); res.close();
0
private AccumuloClient client; client = createMock(AccumuloClient.class); assigner = new SequentialWorkAssigner(conf, client); assigner.setClient(client); expect(client.getInstanceID()).andReturn("instance"); replay(workQueue, zooCache, client); verify(workQueue, zooCache, client);
0
// (KV<String, Set<String>> e, Collector<String> c) -> // e.getValue().stream().forEachOrdered(c::collect)) // .mapElements(KV::getValue)
0
import java.io.OutputStream;
0
package org.apache.beam.runners.dataflow; class DataflowUnboundedReadFromBoundedSource<T> extends PTransform<PBegin, PCollection<T>> {
0
import org.apache.atlas.AtlasConfiguration; private static final int INDEXED_STR_SAFE_LEN = AtlasConfiguration.GRAPHSTORE_INDEXED_STRING_SAFE_LENGTH.getInt(); String value = ret.toString(); if (value.length() > INDEXED_STR_SAFE_LEN) { RequestContext requestContext = Request...
0
* * * * /** Seeks methods named get{P,p}property and is{P,p}property. */ /** Seeks map methods get/put. */ /** Seeks list methods get/set. */ /** Seeks any get/{set,put} method (quacking like a list or a map). */ /** Seeks public instance me...
0
public String getPassword(String resourceKey, int retryIndex) throws IOException { assertEquals("Mismatched retries count", count, retryIndex + 1); String resourceKey, int retryIndex, String password, Exception err)
0
public final class FilesystemStore extends AbstractFilesystemStore { /** The default logger for this class. */ private Log logger = LogFactory.getLog(getClass()); private Settings settings; enableLogging(new CLLoggerWrapper(this.logger)); if (getLogger().isDebugEnabled()) { ...
0
systemProperty("dm.runtime.log").value( "true" ),
0
if (raster != null) { }
0
return new ActiveCompaction(compactor.extent.toThrift(), System.currentTimeMillis() - compactor.startTime, new ArrayList<String>( compactor.filesToCompact.keySet()), compactor.outputFile, type, reason, localityGroup, entriesRead, entriesWritten, iiList, iterOptions);
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.hc.core5.annotation.Contract; import org.apache.hc.core5.annotation.Internal; import org.apache.hc.core5.annotation.ThreadingBehavior; /** * Internal implementation of HTTP/2 only {@link CloseableHttpAsyncClient}. * <p> * Concurrent message exchanges with the same connection route executed by * th...
0
import org.apache.cocoon.objectmodel.ObjectModel; public Object evaluate(ObjectModel objectModel) throws ExpressionException { Iterator iter = objectModel.entrySet().iterator(); public Iterator iterate(ObjectModel objectModel) throws ExpressionException { Object result = evaluate(objectModel...
0
package org.apache.felix.sigil.ui.eclipse.actions; import org.apache.felix.sigil.eclipse.SigilCore; import org.apache.felix.sigil.eclipse.model.project.ISigilProjectModel; import org.apache.felix.sigil.eclipse.model.repository.IRepositoryModel; import org.apache.felix.sigil.repository.IBundleRepository; import org.apac...
0
resource.setPopulateRequiredFlag(true); resource.setPopulateRequiredFlag(true); resource.setPopulateRequiredFlag(true); resource.setPopulateRequiredFlag(true); resource.setPopulateRequiredFlag(true); resource.setPopulateRequiredFlag(true); resource.setPopulateRequiredFlag(true); resource...
0
import org.apache.ambari.server.events.HostsAddedEvent; import org.apache.ambari.server.events.HostsRemovedEvent; * The {@link AlertHostListener} class handles {@link HostsAddedEvent} and * {@link HostsRemovedEvent} and ensures that {@link AlertCurrentEntity} * Handles the {@link HostsAddedEvent} by performing the...
1
public class StreamingWindowedElement<LABEL, T> extends WindowedElement<LABEL, T> public StreamingWindowedElement(WindowID<LABEL> windowID, T element) { public StreamingWindowedElement<LABEL, T> withEmissionWatermark(long watermark) {
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
result = new StringMap(adapt(BundleRevisionImpl.class).getHeaders()); Map headers = new StringMap(adapt(BundleRevisionImpl.class).getHeaders());
1
suite.addTest(TestDumbHelpers.suite());
0
package com.twitter.nexus.scheduler.persistence;
0
import org.apache.aurora.scheduler.storage.db.DbUtil; storage = DbUtil.createStorage();
0
assertEquals(15, services.size()); expectedServices.add("TEZ");
0
@Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override
0
* * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. *
0
import java.util.Vector; /* (non-Javadoc) * @see org.apache.cocoon.environment.Request#get(java.lang.String) */ public Object get(String name) { String[] values = this.getParameterValues(name); if (values == null || values.length == 0) { return null; } else if (val...
0
import org.apache.aurora.gen.ResourceAggregate; import org.apache.aurora.scheduler.storage.entities.IResourceAggregate; @Test public void testResourceAggregateFieldsToSet() { ResourceAggregate aggregate = new ResourceAggregate() .setNumCpus(1.0) .setRamMb(32) .setDiskMb(64); IResou...
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap;
0
* to the gradient Paint. The definiton of the
0
* <p> * This class is not thread safe.
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/beans/CollectionPointerFactory.java,v 1.3 2003/01/11 05:41:24 dmitri Exp $ * $Revision: 1.3 $ * $Date: 2003/01/11 05:41:24 $ * @version $Revision: 1.3 $ $Date: 2003/01/11 05:41:2...
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbutils/src/test/org/apache/commons/dbutils/BaseTestCase.java,v 1.3 2003/11/09 04:50:46 dgraham Exp $ * $Revision: 1.3 $ * $Date: 2003/11/09 04:50:46 $ "notDate" };
0
/** */
1
public boolean isLabelProperty(Object element, String property) public void addListener(ILabelProviderListener listener) public void removeListener(ILabelProviderListener listener)
0
import org.apache.accumulo.core.client.mapreduce.lib.impl.InputConfigurator;
0
import org.apache.commons.fileupload.MultipartStream.ItemInputStream; final ItemInputStream itemStream = multi.newInputStream(); InputStream istream = itemStream; itemStream.close(true);
0
assertEquals(14, resp.getUpgradePacks().size());
0
package org.apache.felix.ipojo.runtime.core.components; public class ParentClass { private String name; public ParentClass(final String n) { name = n; } public ParentClass(final StringBuffer n) { name = n.toString(); } }
0
* Basic implementation of {@link AsyncResponseConsumer} that represents response message as * a {@link Message} and relies on a {@link AsyncEntityConsumer} to process response entity * stream. *
0
Copyright 2001 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 applicable law or a...
0
import org.apache.hc.core5.annotation.Immutable;
1
import org.osgi.framework.namespace.BundleNamespace; import org.osgi.framework.namespace.PackageNamespace; public void testCapabilities() throws Exception assertEquals(1, res.getCapabilities(BundleNamespace.BUNDLE_NAMESPACE).size()); assertEquals(8, res.getCapabilities(PackageNamespace.PACKAGE_NAMES...
0
* @version $Id$
0
@Override
0
Assert.assertEquals("tserver.cache.config.lru.data.", BlockCacheManager.getFullyQualifiedPropertyPrefix("lru", CacheType.DATA)); Assert.assertEquals("tserver.cache.config.lru.index.", BlockCacheManager.getFullyQualifiedPropertyPrefix("lru", CacheType.INDEX)); Assert.assertEquals("tserver.cache.config.lru.su...
0
Collections.<Long,List<String>>emptyMap(), Collections.<Long,List<String>>emptyMap());
0
import java.util.HashMap; HashMap attrs = getPseudoAttributes();
0
if (baseSource != null) { } if (logger.isDebugEnabled()) { logger.debug("XMLBaseSupport: resolved location " + location + " against base URI " + baseURI + " to " + source.getURI()); }
0
import org.apache.ambari.logsearch.common.Marker; @Marker public interface FieldAuditLogRequest extends BaseLogRequest, FieldParamDefinition, UserParamDefinition {
0
import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.ByteString;
0
private static final Logger LOG = LoggerFactory.getLogger(HIFIOWithElasticTest.class); LOG.info("Elastic in memory server started."); LOG.info("Prepared index " + ELASTIC_INDEX_NAME LOG.info("Deleted index " + ELASTIC_INDEX_NAME + " from elastic in memory server"); LOG.info("Closed elastic in ...
0
.addDBAccessorBinding(mockDBDbAccessor).addLdapBindings().build()
0
sendStatus(prepareReply(buffer), id, sendStatus(prepareReply(buffer), id, SftpConstants.SSH_FX_OK, ""); sendStatus(prepareReply(buffer), id, SftpConstants.SSH_FX_FAILURE, "Unsupported version " + proposed); sendStatus(prepareReply(buffer), id, SftpConstants.SSH_FX_EOF...
0
* http://www.apache.org/licenses/LICENSE-2.0
0
MetadataTableUtil.deleteTable(tableId, refCount != 0, master, null); ProblemReports.getInstance(master).deleteProblemReports(tableId); AuditedSecurityOperation.getInstance(master).deleteTable(master.rpcCreds(), tableId, namespaceId); private String tableId; String namespaceId = Tables.getNamespa...
1
private static void matchIdent( MyByteArrayInputStream in, StringBuffer buf ) { private static void matchGJIdent( MyByteArrayInputStream in, StringBuffer buf ) {
0
import org.apache.batik.util.resources.ResourceManager;
0
/** Descriptor of list storage. */ public static <T> ListStorageDescriptor<T> of(String name, Class<T> elementCls) { return new ListStorageDescriptor<>(name, elementCls); }
0
Map<String,String> siteConfig = new HashMap<String,String>();
0
import org.apache.atlas.exception.AtlasBaseException; public void testClassificationSerDe() throws AtlasBaseException { public void testClassificationSerDeWithSuperType() throws AtlasBaseException { public void testClassificationSerDeWithSuperTypes() throws AtlasBaseException {
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 org.apache.hc.core5.http.ClassicHttpResponse; import org.apache.hc.core5.http.io.entity.EntityUtils; final ClassicHttpResponse response = this.httpclient.execute(this.target, this.request); final int status = response.getCode();
0
final int attributes_count = file.readUnsignedShort(); for (final Attribute attribute : attributes) { } catch(final CloneNotSupportedException e) {
1
import org.apache.cocoon.util.AbstractLogEnabled; public class Web3ClientImpl extends AbstractLogEnabled implements Web3Client, Disposable, Recyclable, Poolable {
0
import java.util.Set; processServiceComponentHosts(cluster, kerberosDescriptor, schToProcess, identityFilter, dataDirectory, kerberosConfigurations, null, null, true, "true".equalsIgnoreCase(getCommandParameterValue(commandParameters, KerberosServerAction.INCLUDE_AMBARI_IDENTITY))); processConfi...
0
import org.apache.http.nio.ContentDecoder; import org.apache.http.nio.ContentEncoder; import org.apache.http.nio.NHttpClientConnection; import org.apache.http.nio.NHttpClientHandler; import org.apache.http.nio.reactor.IOEventDispatch; import org.apache.http.nio.reactor.IOReactor; import org.apache.http.nio.reactor.Sess...
0