Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
for (Map.Entry<String, String> entry : m.entrySet()) { JaxbMapKeyVal jaxbMap = new JaxbMapKeyVal(entry.getKey(), entry.getValue());
0
import org.apache.aurora.scheduler.storage.db.EnumBackfill; final EnumBackfill enumBackfill = createMock(EnumBackfill.class); TemporaryStorageFactory factory = new TemporaryStorageFactory(TaskTestUtil.THRIFT_BACKFILL, enumBackfill);
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
this.writer = writer; @Override
0
package org.apache.felix.karaf.gshell.admin.internal.commands; import org.apache.felix.karaf.gshell.admin.Instance;
0
* @since 1.5 /** VPay (Visa) Card Validator * @since 1.5 */
0
import cz.seznam.euphoria.beam.common.InputToKvDoFn; /** * {@link OperatorTranslator Translator } for Euphoria {@link Join} operator. */ private <K, LeftT, RightT, OutputT, W extends Window<W>> JoinFn<LeftT, RightT, K, OutputT> chooseJoinFn(
0
import org.apache.http.impl.io.ChunkedOutputStream; import org.apache.http.impl.io.ContentLengthOutputStream; import org.apache.http.impl.io.IdentityOutputStream;
0
this(objectStrings, c, null); ClassNotFoundException, IOException { this();
0
protected Map createProcEnvironment() throws IOException {
0
LOG.debug("Changed working set for update to " + filterByStatus(instances, WORKING));
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
import org.apache.sshd.util.test.BaseTestSupport;
0
package aQute.bnd.annotation.component; public enum ConfigurationPolicy { optional, require, ignore; }
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
import com.google.common.collect.ImmutableMap; import com.google.common.collect.Sets; /** * The key property ids for a HostComponentProcess resource. */ private static Map<Resource.Type, String> keyPropertyIds = ImmutableMap.<Resource.Type, String>builder() .put(Resource.Type.Cluster, HC_PROCESS_CLUSTE...
0
Set<PropertyDependencyInfo> setOfDependencyInfo = new HashSet<>(); andReturn(new HashSet<>(Arrays.asList( stackConfigurationResponse, stackConfigurationResponse2))).anyTimes(); expect(stackServiceResponse.getExcludedConfigTypes()).andReturn(Collections.singleton(testSiteConfigType));
1
buf.putInt(SshConstants.SSH_EXTENDED_DATA_STDERR);
0
@QueryParam("excludeDeletedEntities") boolean excludeDeletedEntities, return atlasDiscoveryService.searchUsingFullTextQuery(query, excludeDeletedEntities, limit, offset); public AtlasSearchResult searchUsingBasic(@QueryParam("query") Stri...
0
import org.apache.http.impl.nio.DefaultHttpServerIODispatch; IOEventDispatch ioEventDispatch = new DefaultHttpServerIODispatch(protocolHandler, connFactory);
0
baos.write(header.getBytes("US-ASCII")); baos.write("\r\n".getBytes("US-ASCII")); baos.write("-----1234--\r\n".getBytes("US-ASCII"));
0
/* * Copyright 2016-2018 Seznam.cz, a.s.
0
import org.apache.batik.util.SVGConstants; if (getType().equals(SVGConstants.CSS_MIME_TYPE)) { if (hasAttributeNS(null, SVG_TYPE_ATTRIBUTE)) return getAttributeNS(null, SVG_TYPE_ATTRIBUTE); else return SVGConstants.CSS_MIME_TYPE;
0
throw new IllegalStateException("union tag " + unionTag + " has no corresponding tuple tag in the result schema"); throw new IllegalArgumentException("TupleTag " + tag + " is not in the schema");
0
return HttpVersion.get(major, minor);
0
if (cd != null) { cd = cd.toLowerCase(); if (cd.startsWith(FORM_DATA) || cd.startsWith(ATTACHMENT)) { ParameterParser parser = new ParameterParser(); parser.setLowerCaseNames(true); // Parameter parser can handle null input ...
0
private String mpackUri; public String getMpackUri() { return mpackUri; public void setMpackUri(String mpackUri) { this.mpackUri = mpackUri; equalsBuilder.append(mpackName, that.mpackName); equalsBuilder.append(mpackVersion, that.mpackVersion); return Objects.hash(mpackId, mpackName, mpackVers...
0
private final long time; if (timestamp != null) { this.time = timestamp.getTime(); } else { this.time = 0; } return new Date(this.time); buffer.append(new Date(this.time));
0
/* * Copyright 2015 Data Artisans GmbH * 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
0
package org.apache.beam.runners.core; import org.apache.beam.runners.core.LateDataDroppingDoFnRunner.LateDataFilter; import org.apache.beam.sdk.util.TimerInternals; import org.apache.beam.sdk.util.WindowedValue; import org.apache.beam.sdk.util.WindowingStrategy;
0
/** * @return Some identifier useful as {@link #toString()} value */ Object getId();
0
this.conf = master.getConfiguration();
1
/** * * * http://www.apache.org/licenses/LICENSE-2.0 * * Creates a command line. * Query to see if an option has been set. * Query to see if an option has been set. * Return the <code>Object</code> type of this <code>Option</code>. * Return the <code>Object</code> type of this <code>Opt...
0
/** Test usage of hints in different operators. */ /** Test every node in DAG which was unfolded from original operator, if preserves hints. */
0
import java.util.Arrays; import java.util.List; import java.util.regex.Pattern;
0
/** * TODO Add javadoc * * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> * @version $Rev$, $Date$ */
0
import java.io.IOException; import org.apache.hc.core5.http.HttpException; import org.apache.hc.core5.http.impl.io.bootstrap.HttpRequester; import org.apache.hc.core5.http.impl.io.bootstrap.RequesterBootstrap; import org.apache.hc.core5.http.io.ResponseHandler; * Example of POST request with trailers execution using c...
0
import org.apache.http.ConnectionClosedException; doExecute(handler, conn); return handler.getFuture(); } private <T> void doExecute( final HttpAsyncRequestExecutionHandler<T> handler, final NHttpClientConnection conn) { if (!conn.isOpen()) { handler.failed(new C...
0
static public InetSocketAddress parseAddress(String address, int defaultPort) throws NumberFormatException { final String[] parts = address.split(":", 2); if (parts.length == 2) { if (parts[1].isEmpty()) return new InetSocketAddress(parts[0], defaultPort); return new InetSocketAddress(parts[0], In...
1
* Java 5, Sun Java 6. It's also pretty close to IE6. This implementation * appears to be compliant with RFC 2818 for dealing with wildcards.
0
TableConfiguration acuTableConf = ServerConfiguration.getTableConfiguration(instance, session.threadPoolExtent.getTableId().toString()); long maxResultsSize = acuTableConf.getMemoryInBytes(Property.TABLE_SCAN_MAXMEM);
0
package org.apache.felix.sigil.ui.eclipse.ui.editors.project; import org.apache.felix.sigil.eclipse.SigilCore; import org.apache.felix.sigil.model.common.VersionRange; import org.apache.felix.sigil.model.common.VersionRangeBoundingRule; import org.apache.felix.sigil.model.osgi.IVersionedModelElement; import org.apache....
0
private static final ImmutableMap<SqlTypeName, FieldType> CALCITE_TO_BEAM_TYPE_MAPPING = ImmutableMap.<SqlTypeName, FieldType>builder() .put(SqlTypeName.TINYINT, TINY_INT) .put(SqlTypeName.SMALLINT, SMALL_INT) .put(SqlTypeName.INTEGER, INTEGER) .put(SqlTypeName.BIGINT, BI...
0
if (EphemeralTypeEmulate353.get(ephemeralOwner) == EphemeralTypeEmulate353.TTL) {
0
import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Locale; import org.apache.commons.beanutils.converters.DateConverter; public void testConvertToString() throws Exception { ConvertUtilsBean utils = new ConvertUtilsBean(); // Register a DateConverter using Locale.US ...
0
import org.apache.felix.service.command.CommandProcessor; import org.apache.felix.service.command.CommandSession; import org.apache.felix.service.command.Converter;
0
int v = c.charValue();
0
private static final long serialVersionUID = -2242528405240201000L;
0
public interface AsyncClientExchangeHandler extends AsyncDataExchangeHandler {
0
super(org.apache.commons.bcel6.Const.L2D);
0
/* * Copyright 2013 Twitter, Inc. * * 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 t...
0
this.directives = computeDirectives(); return requirement.getAttributes(); Map<String, String> result; if (requirement.getDirectives() == null) result = new HashMap<String, String>(); else result = new HashMap<String, String>(requirement.getDirectives()); ...
0
@SerializedName("clusterLevelParams") private Map<String, String> clusterLevelParams = new HashMap<>(); private boolean overrideConfigs = false; public Map<String, String> getClusterLevelParams() { return clusterLevelParams; } public void setClusterLevelParams(Map<String, String> clusterLevelParams) {...
0
@Override
0
public void addError(String error) { public Collection<String> getErrors() { public void addErrors(Collection<String> errors) { this.errorSet.addAll(errors);
0
package org.apache.beam.runners.core; import org.apache.beam.sdk.util.KeyedWorkItem; import org.apache.beam.sdk.util.WindowedValue;
0
Property minThreadProperty, Property timeBetweenThreadChecksProperty, Property maxMessageSizeProperty) throws UnknownHostException { long maxMessageSize = 10 * 1000 * 1000; if (maxMessageSizeProperty != null) maxMessageSize = conf.getMemoryInBytes(maxMessageSizeProperty); ret...
0
/* * Copyright 2002, 2003,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 requi...
0
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * v...
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
/* * 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
void setJobName(String jobName);
0
import org.apache.ambari.server.AmbariException; public Map<String, String> getDesiredConfigVersionsRecursive(); public Map<String, Config> getConfigs() throws AmbariException;
1
* @version $Id$
0
public static <T> Predicate<T> onePredicate(final Collection<? extends Predicate<? super T>> predicates) {
0
import java.util.concurrent.ConcurrentHashMap; protected final Map<SocketAddress, Channel> boundAddresses = new ConcurrentHashMap<>(); .channel(NioServerSocketChannel.class) .option(ChannelOption.SO_BACKLOG, 100) // TODO make this configurable .handler(new LoggingHandler(LogLeve...
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 appl...
0
import org.apache.xml.security.samples.SampleUtils; Element nscontext = SampleUtils.createDSctx(doc, "ds",
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/map/StaticBucketMap.java,v 1.5 2003/12/29 15:08:15 scolebourne Exp $ * @version $Revision: 1.5 $ $Date: 2003/12/29 15:08:15 $ public boolean equals(Object obj) { ...
0
ByteBuffer _elem2; // required ByteBuffer _elem7; // required
0
import org.apache.ambari.logfeeder.conf.LogFeederSecurityConfig; import org.apache.ambari.logfeeder.conf.MetricsCollectorConfig; import javax.annotation.PostConstruct; import javax.inject.Inject; private HashMap<String, TimelineMetric> metricsMap = new HashMap<>(); @Inject private MetricsCollectorConfig metricsC...
0
import java.nio.charset.Charset; private static final Charset utf8 = Charset.forName("UTF8"); store.put(Constants.ZROOT_TABLET_FUTURE_LOCATION, value.getBytes(utf8)); store.put(Constants.ZROOT_TABLET_LOCATION, value.getBytes(utf8)); store.put(Constants.ZROOT_TABLET_LAST_LOCATION, value.getBytes(utf8));
0
package com.twitter.aurora.scheduler.stats; import com.twitter.aurora.gen.Quota; import com.twitter.aurora.gen.TwitterTaskInfo; import com.twitter.aurora.scheduler.base.Query; import com.twitter.aurora.scheduler.base.Tasks; import com.twitter.aurora.scheduler.configuration.ConfigurationManager; import com.twitter.auror...
1
* @version $Revision$
0
import java.io.*; Result result; StringWriter buffer = null; if (isSchemaValidation()) { buffer = new StringWriter(); result = new StreamResult(buffer); } else { result = new StreamResult(...
0
Map<String,Variant> variants = null; variants = responseCache.getVariantCacheEntriesWithEtags(target, request); if (variants != null && variants.size() > 0) { return negotiateResponseFromVariants(target, request, context, variants); Map<String, Var...
0
decryptInputStream = applyTransforms(referenceType, decryptInputStream); protected InputStream applyTransforms(ReferenceType referenceType, InputStream inputStream) throws XMLSecurityException { return inputStream; }
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
List<String> policies = new ArrayList<>(); Map<String, List<AtlasActionTypes>> groupMap = new HashMap<>(); List<AtlasActionTypes> accessList1 = new ArrayList<>(); List<AtlasActionTypes> accessList2 = new ArrayList<>(); Map<String, List<AtlasActionTypes>> usersMap = new HashMap<>(...
0
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; assertNotNull(new DigestUtils());
0
public static void unreserveTable(Master env, Table.ID tableId, long tid, boolean writeLock) { boolean writeLock) { private static Lock getLock(ServerContext context, AbstractId id, long tid, boolean writeLock) { public static Lock getReadLock(Master env, AbstractId tableId, long tid) {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/jmx/src/java/org/apache/commons/jelly/tags/jmx/ServerTag.java,v 1.2 2003/10/09 21:21:21 rdonkin Exp $ * $Revision: 1.2 $ * $Date: 2003/10/09 21:21:21 $ * any, must include the following acknowledgement: * ...
0
package org.apache.beam.sdk.extensions.euphoria.core.client.operator; import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience; import org.apache.beam.sdk.extensions.euphoria.core.annotation.operator.Derived; import org.apache.beam.sdk.extensions.euphoria.core.annotation.operator.StateComplexit...
0
float PixSzMM = userAgent.getPixelUnitToMillimeter(); // num Pixs in 100 Meters int numPix = (int)(((1000*100)/PixSzMM)+0.5);
0
public Set<String> getPropertyIds();
1
import org.testng.annotations.BeforeClass; import org.testng.asserts.SoftAssert; public SoftAssert SOFT_ASSERT; @BeforeClass public void beforeClass() { SOFT_ASSERT = new SoftAssert(); }
0
@Override
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/ArrayUnsignedShortList.java,v 1.6 2003/04/13 22:30:57 rwaldhoff Exp $ * @version $Revision: 1.6 $ $Date: 2003/04/13 22:30:57 $ public class ArrayUnsignedShortList...
0
/** * Quote an input string if necessary. * If the string is enclosed in double-quotes it is assumed * to be quoted already and is returned unchanged. * If it is the empty string, "" is returned. * If it contains a space * then it is enclosed in double quotes, escaping the * char...
0
package org.apache.felix.dm.test.integration.api; import org.apache.felix.dm.test.components.Ensure; import org.apache.felix.dm.test.integration.common.TestBase;
0
final Builder<T, ?, ?, ?> cast = (Builder) this; cast.input = input; return cast; final Builder<InputT, T, InputT, ?> cast = (Builder) this; cast.keyExtractor = requireNonNull(keyExtractor); cast.keyType = keyType; return cast; final Builder<InputT, KeyT, T, ?> cast = (Bu...
0
import java.util.Collection; import org.apache.beam.sdk.transforms.display.DisplayData.Item;
0
throw new BindingException("Error creating binding from " + source.getURI(), e); throw new BindingException("Error resolving binding source: " + bindingURI); binding = getBuilderAssistant().getBindingForConfigurationElement(bindingElement); throw new BindingEx...
0
* serviceHandler, }
0
* @param message the exception detail message, or {@code null}
0
* Copyright 2000-2009 The Apache Software Foundation
0
public void addErrorServlet(String errorPage, ServletHandler handler) throws ServletException { // TODO }
0
import cz.seznam.euphoria.core.client.io.MockStreamDataSource; private Flow flow; flow = Flow.create("TestFlow"); Dataset<Object> input = flow.createInput(new MockStreamDataSource<>());
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/AbstractLongCollection.java,v 1.2 2003/08/31 17:21:14 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately, this acknowledgem...
0
return ExceptionConstants.createExceptions(ExceptionConstants.EXCS.EXCS_FIELD_AND_METHOD_RESOLUTION, ExceptionConstants.NULL_POINTER_EXCEPTION, ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR, ExceptionConstants.ABSTRACT_METHOD_ERROR, ExceptionConstants.UNSATIS...
0