Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
/** * Handler description. */ private ProvidedServiceHandlerDescription m_description; m_description = new ProvidedServiceHandlerDescription(this, m_services, m_exporters); return m_description;
0
if (tid == 9) { }
0
import java.io.IOException; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; * @version CVS $Id: ServletResponseImpl.java,v 1.3 2004/03/01 03:50:59 antonio Exp $
0
import org.apache.commons.jelly.JellyContext; // create a new child context so that each test case // will have its own variable scopes JellyContext newContext = new JellyContext( context ); // invoke the test case getBody(...
0
@Override @Override @Override Object configPid = cad.getValue("configurationPid"); if ( configPid instanceof String ) { component.setConfigurationPid((String)configPid); } else if ( configPid instanceof String[] && ((String[])configPid).length == 1 ) { component....
0
SimpleTestBean bean = digester.parse(xmlTestReader(TEST_XML_1)); SimpleTestBean bean = digester.parse(xmlTestReader(TEST_XML_2)); SimpleTestBean bean = digester.parse(xmlTestReader(TEST_XML_2)); SimpleTestBean bean = digester.parse(xmlTestReader(TEST_XML_3));
0
AccumuloInputFormat.setConnectorInfo(job, user, getPassword()); AccumuloInputFormat.setInputTableName(job, getTableName()); AccumuloInputFormat.setScanAuthorizations(job, auths); AccumuloOutputFormat.setConnectorInfo(job, user, getPassword()); AccumuloOutputFormat.setCreateTables(job, true); Acc...
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
expect(dao.findByCategory(LDAP_CONFIG_CATEGORY)).andReturn(createEntities(AmbariServerConfigurationCategory.LDAP_CONFIGURATION.getCategoryName(), expectedProperties)).times(2);
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.BufferedWriter; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; private static final Logger LOG = LoggerFactory.getLogger(HiveTypeSystemTest.class); public void testHiveImport() throws M...
0
XMLUtils.addReturnToElement(this.constructionElement); XMLUtils.addReturnToElement(this.constructionElement);
0
if (mmi == null) {
0
* $Id$ * $Date$
0
import org.apache.commons.lang3.StringUtils; String[] parts = StringUtils.split(filename, '/'); m.put(CurrentLogsSection.COLF, new Text(filename), new Value(EMPTY_BYTES)); String[] parts = StringUtils.split(filename, '/');
0
* <p>JEXL variable names in their simplest form are 'java-like' identifiers. * JEXL also considers 'ant' inspired variables expressions as valid.
1
import org.apache.http.params.DefaultedHttpParams; request.setParams( new DefaultedHttpParams(request.getParams(), this.params)); response.setParams( new DefaultedHttpParams(response.getParams(), this.params)); ...
0
* @version CVS $Id: CocoonWrapper.java,v 1.4 2003/09/01 14:07:33 upayavira Exp $ final FileInputStream fis = new FileInputStream(new File(this.context, logKit));
0
if (!userRightsService.userIsAllowed(url, ptm.getPortalObjects().getPortalService().getUserService().getUser())) {
0
package org.apache.metadata.types; import org.apache.metadata.MetadataException; import java.io.IOException; abstract class AbstractDataType<T> implements IDataType<T> { protected T convertNull( Multiplicity m) throws MetadataException { if (!m.nullAllowed() ) { throw new ValueConversionExce...
0
// Add the session request to the session context session.setAttribute(SessionRequest.ATTRIB_KEY, sessionRequest); final SocketAddress localAddress, final Object attachment) throws IOException { SessionRequestImpl sessionRequest = new Sess...
0
* limitations under the License.
0
e = new InputStreamEntity(this.stream, -1, getContentOrDefault(ContentType.DEFAULT_BINARY));
0
import org.apache.aurora.scheduler.resources.ResourceSlot; import org.apache.aurora.scheduler.resources.Resources; import static org.apache.aurora.scheduler.resources.ResourceSlot.sum;
0
public void reset() { requestCount = 0; responseCount = 0; sentBytesCount = 0; receivedBytesCount = 0; this.metricsCache = null; }
0
import java.util.concurrent.atomic.AtomicBoolean; private final AtomicBoolean requestSent; private final AtomicBoolean keepAlive; private final AtomicBoolean closed; this.requestSent = new AtomicBoolean(false); this.keepAlive = new AtomicBoolean(false); this.closed = new AtomicBoolea...
0
* @version $Revision: 1.13 $ $Date: 2004/05/21 22:01:04 $
0
import org.osgi.framework.startlevel.FrameworkStartLevel; logger.info("HealthCheckExecutor active at start level {}", getCurrentStartLevel()); logger.info("HealthCheckExecutor shutdown at start level {}", getCurrentStartLevel()); } private int getCurrentStartLevel() { return bundle...
0
import static org.apache.beam.sdk.testing.SerializableMatchers.anything; import static org.apache.beam.sdk.testing.SerializableMatchers.not; * Basic test of succeeding {@link PAssert} using a {@link SerializableMatcher}. */ @Test @Category(RunnableOnService.class) public void testBasicMatcherSuccess() thro...
0
Boolean secureValidation = (Boolean) context.getProperty("org.apache.jcp.xml.dsig.secureValidation"); boolean secVal = false; if (secureValidation != null && secureValidation.booleanValue()) { secVal = true; } int refCount = 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 may ...
0
import com.google.common.collect.ImmutableMap; import com.google.common.collect.Sets; public static final String HOST_COMPONENT_ROLE_ID = PropertyHelper.getPropertyId("HostRoles", "role_id"); /** * The key property ids for a HostComponent resource. */ public static Map<Resource.Type, String> keyPrope...
0
package org.apache.beam.sdk.extensions.euphoria.core.translate;
0
// sign the whole contract and no signature and exclude condition1 String xp1Old = "not(ancestor-or-self::ds:Signature)" + " and not(ancestor-or-self::node()[@Id='cond1'])"; // sign the contract with condition2 and codition3 and no signature String xp1 = "not(ancestor-or-self::ds:Si...
0
* Methods arguments annotated with {@code CallParam} will be bound with {@code CallParamRule} digester rule. * @Retention( RetentionPolicy.RUNTIME ) @Target( ElementType.PARAMETER ) @DigesterRule( reflectsRule = CallParamRule.class, providedBy = CallParamRuleProvider.class ) public @interface CallParam { * ...
1
/** Returns a mapping of URN to {@link CoderTranslator}. */
1
* @param date Current time public boolean isExpired(final Date date) { if (date == null) { throw new IllegalArgumentException("Date may not be null"); } && cookieExpiryDate.getTime() <= date.getTime());
0
nowTimestamp); nowTimestamp); sch.getServiceName(), sch.getServiceComponentName(), sch.getHostName(), null);
0
import cz.seznam.euphoria.core.executor.graph.DAG;
0
package com.twitter.mesos.scheduler.configuration; import org.junit.Test; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static com.twitter.mesos.gen.test.Constants.INVALID_IDENTIFIERS; import static com.twitter.mesos.gen.test.Constants.VALID_IDENTIFIERS; import static...
0
super(HttpException.clean(message));
0
for (final Object key : keys) { for (final Object key : keys) {
0
Element gradientStop = domFactory.createElement(SVG_STOP_TAG); gradientStop.setAttribute(SVG_OFFSET_ATTRIBUTE, gradientStop = domFactory.createElement(SVG_STOP_TAG); gradientStop.setAttribute(SVG_OFFSET_ATTRIBUTE,
0
import com.google.common.collect.Ordering; import com.twitter.mesos.scheduler.TaskState; public static final Function<TaskState, ScheduledTask> STATE_TO_SCHEDULED = new Function<TaskState, ScheduledTask>() { @Override public ScheduledTask apply(TaskState state) { return state.task; } ...
0
import java.util.Set; private static final String IMPORT_SERVICE = "Import-Service"; private static final String EXPORT_SERVICE = "Export-Service"; private boolean m_buildImportExportService; // Possibly set the Import-Service/Export-Service header if (m_buil...
0
return; final Attribute[] attrs = AnnotationEntryGen.getParameterAnnotationAttributes(cp,param_annotations); if (attrs != null) { for (final Attribute attr : attrs) { addAttribute(attr); }
0
* When SASL is enabled, this parses properties from the site configuration to build up a set of all * users capable of impersonating another user, the users which may be impersonated and the hosts in * which the impersonator may issue requests from. // Property.INSTANCE_RPC_SASL_ALLOWED_USER_IMPERSONATION is tre...
0
* This package provides classes to compare two sequences of objects. * the shortest possible {@link #EditScript edit script} containing * all the {@link #EditCommand commands} needed to transform the first sequence * {@link #SequencesComparator} class. * the {@link #CommandVisitor} interface. * simple {@link #Rep...
0
public static final RenderingHints.Key KEY_BUFFERED_IMAGE = new BufferedImageHintKey();
0
@Override PageResponse response = getResources(type, request, predicate, null); return response.getIterable(); public PageResponse getResources(Resource.Type type, Request request, Predicate predicate, PageRequest pageRequest) throws UnsupportedPropertyException, SystemException, ...
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkState; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterables;
0
} catch (Exception e) { return create(new RSAPublicKeySpec(m, e)); return create(new RSAPrivateKeySpec(m, e)); public static Pair<RSAPrivateKey,RSAPublicKey> generate() throws NoSuchAlgorithmException { return new Pair<RSAPrivateKey,RSAPublicKey>((RSAPrivateKey) keypair.getPrivate(), (RSAPublicKey) k...
0
transient float loadFactor; transient int size; transient HashEntry<K, V>[] data; transient int threshold; transient int modCount; transient EntrySet<K, V> entrySet; transient KeySet<K> keySet; transient Values<V> values;
0
import java.util.Collection; import org.apache.felix.scrplugin.Source; final org.apache.felix.scrplugin.Log scrLog = new MavenLog(getLog(), buildContext); // TODO - should we skip performing these operations just one descriptor file is generated? this.cleanUpDeleted...
0
/** Test class for MetricsHttpSink. */ @Test public void testSerializer() throws Exception {
0
Reader<?> reader = ReaderFactory.create(PipelineOptionsFactory.create(), cloudSource, context, null, null);
0
* or more contributor license agreements. See the NOTICE file * regarding copyright ownership. The ASF licenses this file * with the License. You may obtain a copy of the License at * KIND, either express or implied. See the License for the
0
@Override public void clearCache(String user) { zooCache.clear(ZKUserPath + "/" + user); } @Override public void clearCache(String user, String tableId) { zooCache.clear(ZKUserPath + "/" + user + ZKUserTablePerms + "/" + tableId); }
0
return response.setResponseCode(OK);
0
package org.apache.aurora.scheduler.reconciliation; import org.apache.aurora.scheduler.async.AsyncModule.AsyncExecutor; @AsyncExecutor ScheduledExecutorService executor,
0
import org.apache.excalibur.source.SourceResolver; new SourceResourceLoader(resourceLoader, (SourceResolver)parentContext.getBean(SourceResolver.ROLE)));
0
throw new JXPathException("Predicate is null: " + value);
0
* @throws IllegalStateException if {@link #getPooledConnection()} has been called * @return value of description, may be null. * @see #setDescription(String) * @throws IllegalStateException if {@link #getPooledConnection()} has been called * @throws IllegalStateException if {@link #getPooledCon...
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 not...
0
import org.apache.commons.vfs.FileType; final String path, final FileType type) super(scheme, path, type); public FileName createName(final String path, FileType type) return new LocalFileName(getScheme(), rootFile, path, type);
0
* @version CVS $Id$ final Layout old = portalService.getEntryLayout(null); portalService.setEntryLayout( null, startingLayout ); // ignore this here
0
import java.util.stream.StreamSupport; static String dedicatedRoleStatName(String role) { return "tasks_lost_dedicated_" + role.replace("*", "_"); } @VisibleForTesting rack = storage.read(storeProvider -> StreamSupport.stream( AttributeStore.Util.attributesOrNone(storeProvider, ...
0
AccumuloClient accumuloClient = opts.getClient();
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
* @version $Revision$ $Date$
0
// Get the state of the job before listing messages. This ensures we always fetch job // messages after the job finishes to ensure we have all them. Job job = null; try { job = dataflowClient.v1b3().projects().jobs().get(project, jobId).execute(); } catch (GoogleJsonResponseExcepti...
0
/** * TODO Add javadoc * * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> * @version $Rev$, $Date$ */
0
createAggregator("elements", Sum.ofLongs()); createAggregator("batches", Sum.ofLongs()); createAggregator("elements", Sum.ofLongs()); createAggregator("bytes", Sum.ofLongs());
0
@Override public String toString() { return "MessageVersion[version=" + version + "]"; }
1
* @return <code>true</code> if the key/value pair is accepted by the filter.
0
case LOGICAL_TYPE: // TODO: shouldn't we handle this differently? return javaTypeForFieldType(fieldType.getLogicalType().getBaseType()); // TODO: Convert for registered logical types.
0
props.put(ClientProperty.AUTH_PRINCIPAL.getKey(), user); ClientProperty.setPassword(props, password);
0
@SuppressWarnings({"unused"}) public enum TabletLoadState implements org.apache.thrift.TEnum {
0
verify("gtmk", "306"); verify("isro", "rw");
0
for (int i = 0; i < count; i++) { if (indexes[i] == idx) { // Replace existing property values, // unless they are important! if (prio || (priorities[i] == prio)) { values [i] = v; priorities[i] = prio; ...
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 not...
1
if( StringUtils.equals(RootService.AMBARI.name(), serviceName)){
0
package org.apache.http.impl.nio;
0
/** * 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 in writing, software * distribu...
0
for (char aCa : ca) { printCharacter(aCa); for (Object attribute : attributes) { AttributeInfo ai = (AttributeInfo) attribute; ? Boolean.TRUE : Boolean.FALSE)); for (char aText : text) { if (aTex...
0
private static final long serialVersionUID = -2518741982574515847L;
0
GearpumpPipelineResult result = delegate.run(pipeline); result.waitUntilFinish(); cluster.stop(); return result;
0
if (datagram.getLength() < MIN_PACKET_SIZE) { }
1
import org.apache.beam.sdk.testing.ValidatesRunner; @Category(ValidatesRunner.class) @Category(ValidatesRunner.class) @Category(ValidatesRunner.class) @Category(ValidatesRunner.class) @Category(ValidatesRunner.class) @Category(ValidatesRunner.class)
0
import org.apache.accumulo.core.util.MapCounter;
1
package org.apache.hc.client5.testing.fluent; import org.apache.hc.client5.http.fluent.Content; import org.apache.hc.client5.http.fluent.Executor; import org.apache.hc.client5.http.fluent.Request; import org.apache.hc.client5.testing.sync.LocalServerTestBase;
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...
1
import org.apache.http.impl.SessionInputBufferMockup;
0
* <li>two values that compare as equal (via {@code Object.equals()} * or {@code Comparable.compareTo()}, if supported) have the same * <li>two values that compare as equal (via {@code Object.equals()} * or {@code Comparable.compareTo()}, if supported) have the same
0
catalogBinder.addBinding().to(UpgradeCatalog280.class);
0
public static List<Row> toRowList(BeamRelNode node) { final ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(BeamEnumerableConverter.class.getClassLoader()); final PipelineOptions options = createPipelineOptions(no...
0
public class ClassicIntegrationTest {
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.ambari.server.api.services.AmbariMetaInfo; AmbariMetaInfo ambariMetaInfo = injector.getInstance(AmbariMetaInfo.class); CommandRepository commandRepo = ambariMetaInfo.getCommandRepository(cluster, componentRM, host); commandRepo = ambariMetaInfo.getCommandRepository(cluster, componentRM, ho...
0
import org.apache.accumulo.harness.AccumuloClusterHarness; public class SparseColumnFamilyIT extends AccumuloClusterHarness {
0
import org.apache.sshd.common.scp.ScpFileOpener; public Builder withFileOpener(ScpFileOpener opener) { factory.setFileOpener(opener); return this; } private ScpFileOpener fileOpener; public ScpFileOpener getFileOpener() { return fileOpener; } /** * ...
0