Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
* Copyright 1999-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 ...
0
public void consume(final ByteBuffer src) throws IOException {
0
import org.apache.batik.util.XMLResourceDescriptor; return XMLResourceDescriptor.getXMLParserClassName();
0
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.Lists.newArrayList; import static java.util.concurrent.Executors.newSingleThreadExecutor; import static org.assertj.core.api.Assertions.assertThat; import com.amazonaws.regions.Regions; import java.io.IOException; ...
0
private ClassPath _path = null; private final Map<String, SoftReference<JavaClass>> _loadedClasses = new HashMap<>(); // CLASSNAME X JAVACLASS this._path = path; _loadedClasses.put(clazz.getClassName(), new SoftReference<>(clazz)); _loadedClasses.remove(clazz.getClassName()); fin...
0
private String description = null; * @return the description */ public String getDescription() { return description; } /** * @param description * the description to set */ public void setDescription(String description) { this.description = description; } /** if (descr...
0
import org.apache.hc.core5.http.config.Http1Config; * @param http1Config the message http1Config. If {@code null} * {@link Http1Config#DEFAULT} will be used. final Http1Config http1Config) { super(lineParser, http1Config); public DefaultHttpResponseParser(final Http1Config http1Confi...
0
import org.apache.hc.core5.net.InetAddressUtils; @Override public String toString() { final StringBuilder buffer = new StringBuilder(); InetAddressUtils.formatAddress(buffer, getRemoteAddress()); buffer.append("->"); InetAddressUtils.formatAddress(buffer, getLocalAddress()); ...
0
double tracePercent = localConf.getFraction(Property.REPLICATION_TRACE_PERCENT); ProbabilitySampler sampler = TraceUtil.probabilitySampler(tracePercent); try (TraceScope replicaSpan = Trace.startSpan("AccumuloReplicaSystem", sampler)) { span.getSpan().addKVAnnotation("file", p.toString()); ...
0
AccumuloInputFormat.setClientProperties(job, getClientProperties()); AccumuloInputFormat.setClientProperties(job, getClientProperties());
0
if(value.contains(".") && (value.contains("e") || value.contains("E"))){ }else{ }
0
if (!f.isDirectory()) { return false; } else { File[] files = f.listFiles(new FileFilter() { @Override public boolean accept(File pathname) { return pathname.getName().endsWith("site.xml"); } }); return files != null && files.length > 0; }
0
* @since 2.0
0
query = "SELECT kph FROM KerberosPrincipalHostEntity kph WHERE kph.hostId=:hostId") @Column(name = "host_id", insertable = true, updatable = false, nullable = false) private Long hostId; @JoinColumn(name = "host_id", referencedColumnName = "host_id", nullable = false, insertable = false, updatable = false...
0
import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; * An in-memory copy of type categories vs types for convenience. private Multimap<DataTypes.TypeCategory, String> typeCategoriesToTypeNamesMap; typeCategoriesToTypeNamesMap = ArrayListMultimap.create(DataType...
0
import com.google.common.collect.Lists; import com.twitter.mesos.gen.JobConfiguration; import com.twitter.mesos.scheduler.httphandlers.SchedulerzHome.Role; import com.twitter.mesos.scheduler.httphandlers.SchedulerzRole.Job; public static final Comparator<Role> SORT_USERS_BY_NAME = new Comparator<Role>() { @Ov...
0
import org.apache.sshd.server.session.ServerSession;
0
* <p>Two transcoding hints (<code>KEY_WIDTH</code> and * <code>KEY_HEIGHT</code>) can be used to respectively specify the image * <p>The <code>KEY_BACKGROUND_COLOR</code> defines the background color * <p>The <code>KEY_AOI</code> represents the area of interest to paint * <p><code>KEY_LANGUAGE</code> to set the de...
0
import java.util.Optional;
0
import org.apache.avalon.framework.context.Context; import org.apache.avalon.framework.service.ServiceManager; import org.apache.cocoon.components.ContextHelper; import org.apache.cocoon.environment.Redirector; * @version CVS $Id: AO_FOM_Cocoon.java,v 1.5 2004/02/20 18:48:23 sylvain Exp $ private Redirector redire...
0
public OpenFuture open(int recipient, int rwSize, int packetSize, Buffer buffer) { this.remoteWindow.init(rwSize, packetSize, session.getFactoryManager().getProperties()); public void handleOpenSuccess(int recipient, int rwSize, int packetSize, Buffer buffer) throws IOException { throw new Unsup...
0
private final CommandRepositoryFeature feature = new CommandRepositoryFeature();
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/test/org/apache/commons/jxpath/ri/model/BeanModelTestCase.java,v 1.4 2002/11/29 07:22:01 dmitri Exp $ * $Revision: 1.4 $ * $Date: 2002/11/29 07:22:01 $ * @version $Revision: 1.4 $ $Date: 2002/11/29 07:22:01 $ } ...
0
* @param pmdKnownBroken Oracle drivers don't support * {@link java.sql.ParameterMetaData.ParameterMetaData#getParameterType(int) };
0
public abstract class AbstractAsyncPushHandler<T> implements AsyncPushConsumer { private final AsyncResponseConsumer<T> responseConsumer; public AbstractAsyncPushHandler(final AsyncResponseConsumer<T> responseConsumer) { protected abstract void handleResponse( final HttpRequest promise, final T ...
0
/* * Copyright 2002,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...
0
* Copyright 2000-2009 The Apache Software Foundation
0
import org.springframework.security.core.context.SecurityContextHolder; JMXHostProviderModule providerModule = new JMXHostProviderModule(controller); JMXHostProviderModule providerModule = new JMXHostProviderModule(controller); JMXHostProviderModule providerModule = new JMXHostProviderModule(controller);...
0
// * thread 1 creates and initializes byte array // thread 1 set the volatile,
0
IdResolver.registerElementById(this._constructionElement, Id);
0
import org.apache.commons.beanutils.ConvertUtils; import org.apache.commons.beanutils.Converter; WeakReference<ClassLoader> ref = new WeakReference<ClassLoader>(componentLoader); WeakReference<ClassLoader> weakRefToComponent1 = new WeakReference<ClassLoader>(componentLoader1); Class<?...
0
private TransformResult<T> finishBundle( TransformResult<T> result = evaluator.finishBundle()
0
.setInstructionId("1L") .setProcessBundle(BeamFnApi.ProcessBundleRequest.getDefaultInstance()) .build(); .setInstructionId("1L") .setProcessBundle(BeamFnApi.ProcessBundleResponse.getDefaultInstance()) .build(); BeamFnApi.InstructionRequest.newBuilder() .setInstructionId("...
0
if (data == null) {
0
@Override
0
* @param lang the value of the language.
0
static String quoteMailboxName(String input) {
0
c.tableOperations().setProperty(MetadataTable.NAME, Property.TABLE_SPLIT_THRESHOLD.getKey(), "10000");
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
private void makeConfig(Cluster cluster, String type, String tag, Map<String, String> values, Map<String, Map<String, String>> attributes) {
0
static Map<URI,Templates> cache = new ConcurrentHashMap<URI,Templates>(); Templates templates = cache.get(xslt.toURI()); cache.put(xslt.toURI(), templates);
0
import org.apache.felix.dm.Component.ServiceScope; default B scope(ServiceScope scope) { andThenBuild(compBuilder -> compBuilder.scope(scope)); return (B) this; }
0
public FileChannel newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException { Collection<SftpClient.OpenMode> modes = SftpClient.OpenMode.fromOpenOptions(options); modes = EnumSet.of(SftpClient.OpenMode.Read, SftpClient.OpenMode.Write); /...
0
.putInputs("timer", "timer.pc") .putOutputs("timer", "timer.pc") PCollection timer = PCollection.newBuilder().setUniqueName("timer.pc").build(); .putPcollections("timer.pc", timer) TimerReference.of(transformNode, "timer", PipelineNode.pCollection("timer.pc", timer));
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableMap;
0
private final OrderedMapIterator<K, V> iterator; public static <K, V> OrderedMapIterator<K, V> unmodifiableOrderedMapIterator(final OrderedMapIterator<K, V> iterator) { private UnmodifiableOrderedMapIterator(final OrderedMapIterator<K, V> iterator) { public V setValue(final V value) {
0
@Override @Override @Override
0
import java.io.IOException; import java.net.URL; import java.nio.charset.StandardCharsets; import com.google.common.io.Resources; private void assertResponseStatus( String path, Status expectedStatus, Optional<URL> responseResource) throws IOException { if (responseResource.isPresent()) { ...
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
import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NameClassPair; import javax.naming.NamingEnumeration; import javax.naming.NamingException; * @version $Id: JNDIConfiguration.java,v 1.11 2004/04/28 22:58:58 epugh Exp $ private void recursiveGetKeys(List keys, Context parentConte...
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 ...
0
import java.util.Collection; import java.util.TreeSet; import org.apache.felix.http.base.internal.runtime.dto.state.FailureFilterState; import org.apache.felix.http.base.internal.runtime.dto.state.FailureServletState; import org.apache.felix.http.base.internal.runtime.dto.state.FilterState; import org.apache.felix.htt...
0
ACTION_EXECUTION_FINISHED, /** * The cluster was renamed. */ CLUSTER_RENAME; /** * {@inheritDoc} */ @Override public String toString() { StringBuilder buffer = new StringBuilder(getClass().getSimpleName()); buffer.append("{eventType=").append(m_eventType); buffer.append("...
0
import java.util.stream.Collectors; import static java.util.stream.Collectors.toList; return this.wrap.getPartitions().stream().map(WrapPartition::new).collect(toList());
0
import org.apache.hc.core5.function.Supplier; public MessageExchangeHandler(final Supplier<AsyncEntityConsumer<T>> dataConsumerSupplier) { this(new BasicRequestConsumer<>(dataConsumerSupplier)); }
0
import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.TextFormat;
0
import com.google.common.base.Charsets; import com.google.common.io.Files; import java.io.File; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern;
0
/** Transforms for reading and writing using HCatalog. */
1
DEFAULT.verify("foo.co.jp", x509); DEFAULT.verify("\u82b1\u5b50.co.jp", x509); checkMatching(bhv, "a.gov.uk", cns, alt, false); // OK checkMatching(bhv, "s.a.gov.uk", cns, alt, false); // OK checkMatching(bhv, "a.gov.uk", cns, alt, false); // OK
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/ArrayUnsignedByteList.java,v 1.5 2003/11/07 17:24:13 rwaldhoff Exp $ * @version $Revision: 1.5 $ $Date: 2003/11/07 17:24:13 $ * @deprecated This code has been mo...
0
import java.io.IOException; import java.io.InterruptedIOException; // TODO once JDK 8+ becomes the minimum for this project, make it a static method in the Closeable interface public static void close(Closeable closeable) throws IOException { if (closeable == null) { return; } ...
0
if (servletName == null) throw new RuntimeException("Could not find connection named '" + servletReference + "'. Did you forgot to declare it in servlet bean configuration?");
0
Copyright 2001,2003 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...
0
public synchronized Service setServiceProperties(Dictionary serviceProperties) { return this; protected void ensureNotActive() {
0
* Represents information required to run and collection of alerts. private Source source = null; /** * @return the service name */ /** * @param name the service name */ /** * @return the component name */ /** * * @param name the component name */ * @return the interval * @...
0
* @version $Revision$ $Date$
0
* $Revision: 1.3 $ * $Date: 2003/10/09 21:03:57 $ * Alternately, this acknowledgement may appear in the software itself, * if and wherever such third-party acknowledgements normally appear. * permission of the Apache Software Foundation.
0
import java.util.ArrayList; @Transactional public List<HostComponentConfigMappingEntity> findByHostComponentAndType( long clusterId, String serviceName, String componentName, String hostname, Collection<String> configTypes) { if (configTypes.isEmpty()) { return new ArrayList<HostComponen...
1
import static java.util.stream.Collectors.toList; import static org.apache.beam.sdk.values.reflect.ReflectionUtils.getPublicGetters; return ImmutableList.of( new GeneratedGetterFactory(), new ReflectionGetterFactory(), clazz -> getPublicGetters(clazz).stream().map(ReflectionGetter::new).coll...
0
OptionBuilder.hasArg(type != null); OptionBuilder.isRequired(required); OptionBuilder.withType(type); options.addOption(OptionBuilder.create(opt)); OptionBuilder.hasArg(type != null); OptionBuild...
0
import org.apache.commons.io.IOUtils; { /* ignore - will use defaults */ IOUtils.closeQuietly( ins ); /** * Retrieves the shared instance * * @return the singleton instance of the object */ /** * @see org.apache.felix.webconsole.BrandingPlugin#getBrandName(...
0
s_upgradeHelper.updateDesiredRepositoriesAndConfigs(upgradeContext); StackId configurationPackSourceStackId = upgradeContext.getSourceVersions().values().iterator().next().getStackId();
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 static org.apache.accumulo.core.util.ByteBufferUtil.toBytes; return appendPrintableString(ba, offset, len, maxLen, new StringBuilder()).toString(); } public static StringBuilder appendPrintableString(byte ba[], int offset, int len, int maxLen, StringBuilder sb) { return sb; } private Strin...
0
* url = * urls = * * }
1
import org.apache.http.conn.SchemePortResolver; context.getAttribute(HttpClientContext.SOCKET_FACTORY_REGISTRY);
0
transfer.toKey, mask(transfer, valueToCopy))); configType, transfer.toKey, mask(transfer, transfer.defaultValue))); mask(keyValuePair, value))); private static String mask(ConfigureTask.Masked mask, String value) { if (mask.mask) { return StringUtils.repeat("*"...
0
import org.apache.batik.gvt.TextNode; import org.apache.batik.gvt.text.GVTAttributedCharacterIterator; this.offset = adjustOffset(offset); public void draw(Graphics2D g2d) { layout.draw(g2d, (float) offset.getX(), (float) offset.getY()); } /** * Returns the current text position at the...
0
log.info("Existing splits on metadata table. Saving them, and applying" + " single original split of '~'");
0
Method updateKAFKAConfigs = UpgradeCatalog251.class.getDeclaredMethod("updateKAFKAConfigs"); Method updateSTORMConfigs = UpgradeCatalog251.class.getDeclaredMethod("updateSTORMConfigs"); .addMockedMethod(addNewConfigurationsFromXml) .addMockedMethod(updateKAFKAConfigs) .addMoc...
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
assertEquals(6, steps.size()); Step addNullKeyStep = steps.get(1); assertEquals("ParallelDo", addNullKeyStep.getKind()); Step groupByKeyStep = steps.get(2); assertEquals("GroupByKey", groupByKeyStep.getKind()); Step combineGroupedValuesStep = steps.get(3); assertEquals("ParallelDo", combin...
0
package com.twitter.aurora.scheduler.storage; import com.twitter.aurora.gen.JobConfiguration; import com.twitter.aurora.gen.JobKey;
1
return "JEXL.out.print("+StringParser.escapeString(toDisplay, '\'')+")";
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.accumulo.tserver.replication.ReplicationWorker; private ReplicationWorker replWorker = null; this.replWorker = new ReplicationWorker(instance, fs, aconf); ThreadPoolExecutor replicationThreadPool = new SimpleThreadPool(getSystemConfiguration().getCount(Property.REPLICATION_WORKER_THREADS), "...
1
import java.util.ArrayList; import java.util.Collection; import java.util.concurrent.atomic.AtomicBoolean; private final Collection<FnApiControlClient> vendedClients = new ArrayList<>(); private AtomicBoolean closed = new AtomicBoolean(); // Add the client to the pool of vended clients before making it availa...
0
Map<TreeSet<String>,Long> diskUsage = TableDiskUsage.getDiskUsage(context.getServerConfigurationFactory().getConfiguration(), tableIds, fs, context.getConnector());
0
import java.nio.file.LinkOption; Path linkPath = lclSftp.resolve("link-" + sourcePath.getFileName()); String remLinkPath = "/" + Utils.resolveRelativeRemotePath(parentPath, linkPath); LinkOption[] options = IoUtils.getLinkOptions(false); if (Files.exists(linkPath, options...
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 u...
0
* * <b>Deprecation note:</b> due to the way this class modifies a response body * without changing the response headers to reflect the entity changes, it cannot * be used as the &quot;backend&quot; for a {@link CachingHttpClient} and still * have uncompressed responses be cached. Users are encouraged to use the ...
0
* {@code org.apache.commons.configuration.PropertiesConfiguration} class in
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.log4j.Logger; @SuppressWarnings("deprecation") private static final Logger log = Logger.getLogger(ArbitraryTablePropertiesIT.class); @Override
0
new Object[] { value, getPropertyName() }); "invalid.lexical.unit", new Object[] { new Integer(lu.getLexicalUnitType()), getPropertyName() }); protected class NumberFactory extends AbstractValueFactory { new Obj...
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
throws SAXException { throws SAXException {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/ValidatorTestSuite.java,v 1.13 2004/01/11 23:30:21 dgraham Exp $ * $Revision: 1.13 $ * $Date: 2004/01/11 23:30:21 $ * Copyright (c) 2000-2004 The Apache Software Foundation. All ri...
0
if (in != null) { in.close(); } } in.close(); }
0
import org.apache.http.util.Args; this.name = Args.notNull(name, "Name");
0