Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import org.apache.atlas.groovy.ComparisonExpression.ComparisonOperator; import org.apache.atlas.groovy.LogicalExpression.LogicalOperator; import java.util.ArrayList; import java.util.List; if(op.equals("in")) { return new FieldExpression(tExpr, "in"); }
1
import javax.inject.Inject; @Inject private Monitor monitor; return new GarbageCollectorStatus(monitor.getGcStatus()); GCStatus gcStatus = monitor.getGcStatus(); GCStatus status = monitor.getGcStatus(); GCStatus status = monitor.getGcStatus(); GCStatus gcStatus = monitor.getGcStatus(); GCSt...
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
shellIn.write(data, off, len); shellIn.flush(); in = new ChannelPipedInputStream(localWindow); shellIn = new ChannelPipedOutputStream((ChannelPipedInputStream) in); shell.setInputStream(in); shell.setOutputStream(out); shell.setErrorStream(err); shell.setE...
0
hints.put(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE); hints.put(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE);
0
throw new SQLException("Cannot get a connection, pool error " + e.getMessage(), e); throw new SQLException("Cannot get a connection, general error", e);
0
public class JdbcJarTest {
0
public static void main(String[] args)
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/SendTag.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: * Al...
0
* * @deprecated (4.3) use configuration classes provided 'org.apache.http.config' * and 'org.apache.http.client.config'
0
boolean beginUpdatingLogsUsed(InMemoryMap memTable, DfsLogger copy, boolean mincFinish);
0
final StringBuffer sb = new StringBuffer(super.toString()); sb.append("["); sb.append(userName); sb.append(']');
0
static org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(TestVectorResolver.class);
1
* @version CVS $Id: MutableEnvironmentFacade.java,v 1.2 2003/10/01 08:53:49 sylvain Exp $ // Track the first values set for prefix and uri private String prefix = null; private String uri = null; if (this.uri == null) { // First call : keep the values to restore them on th...
0
/** * TODO Add javadoc * * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> * @version $Rev$, $Date$ */
0
tester.assertHasOnlyGlobalAndFinishedSetsFor( new IntervalWindow(new Instant(0), new Instant(10))); public void testAfterProcessingTimeWithMergingWindow() throws Exception { Duration windowDuration = Duration.millis(10); TriggerTester<Integer, Iterable<Integer>, IntervalWindow> tester = TriggerTes...
0
* @since 2.0
0
package aQute.bnd.build.model.conversions; import aQute.bnd.build.model.EE; public final class EEFormatter implements Converter<String,EE> { public String convert(EE input) throws IllegalArgumentException { return input != null ? input.getEEName() : null; } }
0
@Component(factoryPid="org.apache.felix.dm.runtime.itest.components.MethodSignatures$FactoryPidComponent") @Component(factoryPid="org.apache.felix.dm.runtime.itest.components.MethodSignatures$FactoryPidComponent2") @Component(factoryPid="org.apache.felix.dm.runtime.itest.components.MethodSignatures$Config")
0
@SuppressWarnings("serial")
0
private Set<String> getNames(final HttpParams params) {
0
Arg.create(Amount.of(5L, Time.MINUTES));
0
* * <p>Usage example: * <p>Does not modify this object. * <p>Does not modify this object. * <p>This may take a long time to execute if the splits of this source are slow to read
0
if (status.last.finished > 0) gcActivity.addRow("File&nbsp;Collection,&nbsp;Last&nbsp;Cycle", status.last.finished, status.last.candidates, status.last.deleted, status.last.inUse, status.last.errors, status.last.finished - status.last.started); if (status.current.started > 0) gcA...
1
} if (request.getRequestId() != null) { if (responses.size() == 0) { throw new ObjectNotFoundException("Task resource doesn't exist."); }
0
// spaces are allowed in encoded data assertTrue("Expected to find " + messageText + " in '" + em + "'",em.contains(messageText)); }
0
import org.apache.beam.sdk.values.TupleTag; public InputT getInput(Map<TupleTag<?>, PValue> inputs, Pipeline p) { public Map<PValue, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PValue> outputs, OutputT newOutput) {
0
public boolean isRepeatable() { return true; } @Override public void releaseResourcesInternal() { this.content.clear();
0
super(URLEncodedUtils.format(parameters, charset != null ? charset : HTTP.DEF_CONTENT_CHARSET.name()), super(URLEncodedUtils.format(parameters, charset != null ? charset : HTTP.DEF_CONTENT_CHARSET), final Iterable <? extends NameValuePair> parameters) {
0
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; PoolingHttpClientConnectionManager mgr = new PoolingHttpClientConnectionManager(); PoolingHttpClientConnectionManager mgr = new PoolingHttpClientConnectionManager(); PoolingHttpClientConnectionManager mgr = new PoolingHttpClien...
0
import static org.junit.Assert.assertEquals; import org.junit.Test; public class FileSystemExceptionTest { @Test @Test @Test
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 ap...
1
/* * 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
Assert.assertEquals(expectation.keySet(), new HashSet<>(keys)); Map<String,String> expectations = new HashMap<>(); Map<String,String> expectations = new HashMap<>(); Map<String,String> expectations = new HashMap<>();
1
import org.joda.time.DateTime; new DateTime(p.dateTime), row.getDateTime("dateTime").getMillis(), new DateTime(b.dateTime), row.getDateTime("dateTime").getMillis(), new DateTime(a.dateTime), new DateTime(a.expires), row.g...
0
import org.apache.ambari.spi.upgrade.UpgradeType;
0
import org.apache.avalon.framework.component.Component; public class DefaultFormManager extends AbstractLogEnabled implements FormManager, ThreadSafe, Composable, Disposable, Configurable, Component { protected ComponentManager manager; protected Map widgetDefinitionBuilders = new HashMap(); pr...
0
storage.write((NoResult.Quiet) store -> { for (IScheduledTask scheduledTask : tasksToAssign) { taskScheduler.schedule(store, scheduledTask.getAssignedTask().getTaskId()); } }); return storage.write((Storage.MutateWork.Quiet<Boolean>) store -> { boolean result = false;...
1
suite.addTest(TestParameterFormatter.suite());
0
import org.apache.atlas.RequestContext; import org.apache.atlas.utils.AtlasPerfMetrics.MetricRecorder; MetricRecorder metric = RequestContext.get().startMetricRecord("findByUniqueAttributes"); RequestContext.get().endMetricRecord(metric); MetricRecorder metric = RequestContext.get().startMetri...
0
return allowLocal && hostnameRegex.isValid(domain); return str;
0
static final class StorageKey {
0
import java.text.MessageFormat; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import javax.persistence.EntityManager; import javax.persistence.TypedQuery; import javax.persistence.criteria.CriteriaQuery;...
0
WARNING,
0
@Override
0
* @param listener The notification {@link SshFutureListener} - never {@code null} * @param listener The register {@link SshFutureListener} - never {@code null}.
0
/* * Copyright 2000-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 may ...
0
public boolean shouldCompact(MajorCompactionRequest request) { public void gatherInformation(MajorCompactionRequest request) { public CompactionPlan getCompactionPlan(MajorCompactionRequest request) {
0
* * Java Bean suited for selection list IDs. For this an optional * &lt;fd:id-path&gt;jx-path&lt;/fd:id-path&gt; attribute can be specified to public BeanConvertor(final String className, final String idPath) { try { m_class = Thread.currentThread().getContextClassLoader().loadClass(className...
0
Collections.unmodifiableSet(GenericUtils.asSet( PosixFileAttributeView.class, FileOwnerAttributeView.class, BasicFileAttributeView.class )); return SftpVersionSelector.fixedVersionSelector(Integer.parseInt(values[0])); ...
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
return EVALUATORS.containsKey(clazz);
0
import org.apache.beam.model.pipeline.v1.Endpoints; import org.apache.beam.model.pipeline.v1.RunnerApi;
0
if (metricResult.hasCommitted()) {
0
fused.getFusedStages().stream() fused.getFusedStages().stream() s.getComponents().getTransformsOrThrow(flattenTransform.getUniqueName()) .getInputsMap().values().stream())
0
final Map<String, String> properties = new HashMap<>(); properties.put(AmbariLdapConfigurationKeys.LDAP_ENABLED.key(), "true"); expect(ambariConfigurationDao.reconcileCategory(AmbariServerConfigurationCategory.LDAP_CONFIGURATION.getCategoryName(), properties, false)).andReturn(true).once(); final Map<...
0
context.setAttribute("LIST", attachment); context.setAttribute("REQ-COUNT", Integer.valueOf(0)); context.setAttribute("RES-COUNT", Integer.valueOf(0)); context.setAttribute("REQ-COUNT", Integer.valueOf(i + 1)); context.setAttribute("RES...
0
Assert.assertEquals(refs.get(0).getValuesMap(), values1); Assert.assertEquals(refs.get(1).getValuesMap(), values2);
0
protected Map portalConfigurations = new HashMap(); final protected static String KEY = PortalServiceImpl.class.getName(); PortalServiceInfo info = (PortalServiceInfo) request.getAttribute(KEY, Request.GLOBAL_SCOPE); request.setAttribute(KEY, info, Request.GLOBAL_SCOPE); this.po...
0
import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter; Certificate cert = generateCert(keyName, kp, false, signerCert.getPublicKey(), signerKey); Certificate cert = generateCert(keyName, kp, true, kp.getPublic(), kp.getPrivate()); private Certificate generateCert(String keyName, KeyPair kp, boolean ...
0
xmlSecurityStreamWriter.writeStartDocument("UTF-8", "1.0"); stdXmlStreamWriter.writeStartDocument("UTF-8", "1.0");
0
else if ( isLogEnabled( LogService.LOG_DEBUG ) ) { log( LogService.LOG_DEBUG, "No ManagedService registered for updates to configuration {0}", new Object[] { config.getPid() } ); }
0
* </p> * </p>
0
return isPowerOfTwo(dispatchers.length) ? new PowerOfTwoSelector(dispatchers) : new GenericSelector(dispatchers);
0
package org.apache.bcel.util; * @see org.apache.bcel.Repository
1
import java.util.Map;
0
@Deprecated
0
import java.net.URI; protected static Configuration conf = null; protected static DefaultFileSystemManager vfs = null; protected static MiniDFSCluster cluster = null; // TODO Given that the URI for the NameNode is statically declared in config files // in src/test/resources, we have to assert the given ...
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
0
response.setHeader( HEADER_WWW_AUTHENTICATE, AUTHENTICATION_SCHEME_BASIC + " realm=\"" + this.realm + "\"" ); response.setStatus( HttpServletResponse.SC_UNAUTHORIZED ); response.flushBuffer(); // failed sending the response ... cannot do anything about it
0
ComponentInstance instance = createInstance(fact); m_factories.put(ref, instance); m_handler .info("An arriving factory is already used, ignore the creation : " + fact.getName()); m_handler.info("Dispose ...
0
* @version $Revision$
0
private final ArrayList<String> markers = new ArrayList<String>( 2 ); private final ArrayList<Map<String, Object>> sources = new ArrayList<Map<String, Object>>( 2 );
0
import org.apache.ambari.server.configuration.ComponentSSLConfiguration; ComponentSSLConfiguration configuration, super(componentPropertyInfoMap, streamProvider, configuration, hostProvider,
0
public HostImpl(String hostName) { this.hostName = hostName;
0
import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.ByteString; import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.util.Timestamps;
0
* General file manipulation utilities. * Facilities are provided in the following areas: * <li>writing to a file * <li>reading from a file * <li>make a directory including parent directories * <li>copying files and directories * <li>deleting files and directories * <li>converting to and from a URL * <li>listin...
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
* Default implementation of a {@link IncludeCacheManager}. * @version CVS $Id: DefaultIncludeCacheManager.java,v 1.2 2003/03/11 16:33:37 vgritsenko Exp $ * @see IncludeCacheManager#getSession(org.apache.avalon.framework.parameters.Parameters) * @see IncludeCacheManager#load(java.lang.String, IncludeCacheMa...
0
public static final String PARTITION_TYPE = "partition_type"; public static final String SERDE_TYPE = "serdeType"; createRequiredAttrDef("serde", DataTypes.STRING_TYPE), createOptionalAttrDef("description", DataTypes.STRING_TYPE)}); //map ...
1
import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; private final ExecutorCore executor; public ExecutorHome(ExecutorCore executor, @CacheTemplates boolean cacheTemplates) { this.executor = executor; template.setAttribute("tasks", ImmutableList.copyOf(executor.getTask...
0
import org.apache.http.HttpVersion; import org.apache.http.params.CoreProtocolPNames; ProtocolVersion ver = (ProtocolVersion) getParams().getParameter( CoreProtocolPNames.PROTOCOL_VERSION); return ver != null ? ver : HttpVersion.HTTP_1_1;
0
import org.apache.johnzon.core.JsonProviderImpl; // Jonhzon is packaged in, so we can just use the impl type to avoid ClassLoader mess try (final JsonReader reader = new JsonProviderImpl().createReader(new StringReader(contents)) ) { final JsonStructure obj = reader.read(); if ( ...
0
@Override
0
//Cannot be instantiated
0
/** * Create a new resource provider for the given management controller. This * constructor will initialize the specified {@link Resource.Type} with the * provided keys. It should be used in cases where the provider declares its * own keys instead of reading them from a JSON file. * * @param type ...
0
import org.apache.hc.core5.io.CloseMode; Mockito.anyLong(), Mockito.<TimeUnit>any())).thenThrow(new TimeoutException("timeout")); Mockito.verify(connectionEndpoint).close(CloseMode.IMMEDIATE); Mockito.verify(connectionEndpoint, Mockito.times(1)).close(CloseMode.IMMEDIATE); Mockit...
0
import org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleProgressResponse; import org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleResponse; import org.apache.beam.runners.flink.metrics.FlinkMetricContainer; private transient FlinkMetricContainer flinkMetricContainer; flinkMetricContainer = n...
0
Assert.assertTrue(check.getFailedDetail().isEmpty()); Assert.assertFalse(check.getFailedDetail().isEmpty());
0
static Event FAILED(Bundle webAppBundle, Bundle extenderBundle, Throwable exception, String collision, Long collisionBundles) Dictionary<String, Object> props = createBaseProperties(webAppBundle, extenderBundle); if (exception != null) { if (collision != null) { if (c...
0
import com.google.cloud.dataflow.sdk.transforms.Create; import com.google.cloud.dataflow.sdk.transforms.DoFn; import com.google.cloud.dataflow.sdk.transforms.PTransform; import com.google.cloud.dataflow.sdk.transforms.ParDo; import com.google.cloud.dataflow.sdk.transforms.Sum; private static final List<String> WORD...
0
* Transport that simply wraps another transport. This is the equivalent of FilterInputStream for * Thrift transports.
0
x1 = SVGUtilities.svgToUserSpace(svgElement, ATTR_X1, s, uctx, UnitProcessor.HORIZONTAL_LENGTH); y1 = SVGUtilities.svgToUserSpace(svgElement, ...
0
import java.util.Collection; import java.util.HashMap; import java.util.Map; @Override protected Map<String, T> bulkRestore(final Collection<String> storageKeys) throws ResourceIOException { final Map<String, T> resultMap = new HashMap<>(); for (final String storageKey: storageKeys) { ...
0
import org.apache.hc.core5.http.impl.ConnectionListener;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/DoubleIteratorIterator.java,v 1.3 2003/11/07 20:09:15 rwaldhoff Exp $ * * @deprecated This code has been moved to Jakarta Commons Primitives (http://ja...
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
private final ConfigurationInterpolator localSubst; localSubst = initLocalInterpolator(); localSubst = initLocalInterpolator(); String key = String.valueOf(localSubst.interpolate(keyPattern)); * Creates a {@code ConfigurationInterpolator} instance for performing local * variable su...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/BeanMap.java,v 1.25 2003/12/05 20:23:57 scolebourne Exp $ import org.apache.commons.collections.keyvalue.AbstractMapEntry; * @version $Revision: 1.25 $ $Date: 2003/12/05 20:23:57 ...
0