Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import org.apache.zookeeper.client.ZKClientConfig; System.setProperty(ZKClientConfig.DISABLE_AUTO_WATCH_RESET, "false"); /** * When ZooKeeper is created this property will get used. */ System.setProperty(ZKClientConfig.DISABLE_AUTO_WATCH_RESET, "true"); System.setProper...
0
Map<Resource.Type,String> mapIds = new HashMap<>();
1
* @version $Revision: 1.5 $ $Date: 2004/03/31 22:06:11 $ /** Singleton predicate instance */ /** * Factory returning the singleton instance. * * @return the singleton instance */ public static Transformer getInstance() { return INSTANCE; }
0
//Naïve approach probably wasting lots of memory
1
/* ==================================================================== * @version $Revision: 1.4 $ $Date: 2004/01/14 21:43:09 $
0
import org.apache.sshd.common.AttributeRepository; * @see <A HREF="http://www.gsp.com/cgi-bin/man.cgi?topic=ssh_config">ssh_config</A> * An &quot;empty&quot; implementation that does not resolve any entry - i.e., * uses the original entry as-is public HostConfigEntry resolveEffectiveHost( ...
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
import org.apache.beam.fn.harness.data.PTransformFunctionRegistry; PTransformFunctionRegistry startFunctionRegistry, PTransformFunctionRegistry finishFunctionRegistry, // TODO make the receiver aware of its transform context as well. startFunctionRegistry.register(pTransformId, runner::start...
0
* @version CVS $Id: EP_Top.java,v 1.3 2003/09/05 07:31:40 cziegeler Exp $
0
package org.apache.commons.dbcp2;
1
if (text != null) { int idx = text.lastIndexOf('/'); text = text.substring(0, idx + 1); return new URL(text); } else { return null; }
0
* @cocoon.sitemap.component.documentation * Matches a sitemap parameter against a wildcard expression. *
0
* Secure socket factory based on {@link javax.net.ssl JSSE} *. // non-javadoc, see interface org.apache.http.conn.SocketFactory public Socket createSocket() throws IOException { // the cast makes sure that the factory is working as expected return (SSLSocket) this.socketfactory.creat...
0
int m_actionMask = 0; AdminPermission(String filter, int actionMask) } final class AdminPermissionCollection extends PermissionCollection { private static final long serialVersionUID = 3747361397420496672L; private HashMap m_map = new HashMap(); public void add(Permission permission) { if (!...
0
config.getServletContext().log("ShieldingServlet: Loading servlet class " + servletName);
0
public void addRequestInterceptor( final HttpRequestInterceptor itcp, int index) { public void addResponseInterceptor( final HttpResponseInterceptor itcp, int index) { public final void addInterceptor(final HttpRequestInterceptor interceptor) { public final void addInterceptor(f...
0
ActionListener, ValueChangedListener, ProcessingPhaseListener, RepeaterListener { // -- RepeaterListener -------------------------------------- public void repeaterModified(RepeaterEvent e) { ((RepeaterListener)a).repeaterModified(e); ((RepeaterListener)b).repeaterModified(e); } ...
0
static class MyUserAgentAdapter extends UserAgentAdapter implements MyUserAgent {
0
import org.apache.aurora.scheduler.resources.ResourceType; Set<ResourceType> types = ImmutableSet.<ResourceType>builder() .addAll(left.streamResourceVectors().map(e -> e.getKey()).iterator()) .addAll(right.streamResourceVectors().map(e -> e.getKey()).iterator()) .build(); ...
0
import org.apache.ambari.server.controller.spi.TemporalInfo; private static Number[][] getGangliaLikeDatapoints(TimelineMetric metric, TemporalInfo temporalInfo) { return rpt.reportMetricData(metric, temporalInfo); protected static Object getValue(TimelineMetric metric, TemporalInfo temporalInfo) { Number[]...
0
Object[] copy = stack.clone(); System.arraycopy(values, 0, copy, 0, Math.min(copy.length, values.length)); return new Frame(copy);
1
return "unsatisfied";
0
import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly; import org.apache.accumulo.core.conf.ConfigurationTypeHelper; Thread.sleep(ConfigurationTypeHelper.getTimeInMillis(majcDelay));
0
* @deprecated since 1.4, replaced by {@link org.apache.accumulo.core.iterators.user.MinCombiner} with * {@link org.apache.accumulo.core.iterators.LongCombiner.Type#STRING}
0
package org.apache.bcel; import org.apache.bcel.classfile.JavaClass;
0
import org.apache.hc.core5.annotation.Contract; import org.apache.hc.core5.annotation.ThreadingBehavior; @Contract(threading = ThreadingBehavior.IMMUTABLE)
0
import org.apache.cocoon.core.CoreUtil; final List propertyUris = new ArrayList(); propertyUris.add(src); // sort Collections.sort(propertyUris, CoreUtil.getSourceComparator()); // now process final Iterator i = prop...
0
VerifierConstraintViolatedException(final String message){ VerifierConstraintViolatedException(final String message, final Throwable initCause){
0
private final Object lock = new Object();
0
package org.apache.http.impl.nio.entity; import org.apache.http.impl.nio.ContentInputBuffer;
0
import java.nio.charset.StandardCharsets; byte[] content = contentString.getBytes(StandardCharsets.UTF_8); byte[] content2 = contentString2.getBytes(StandardCharsets.UTF_8); String readContentString = new String(content, StandardCharsets.UTF_8); String readContentString2 = new String(content2, StandardC...
0
@FunctionalInterface
0
protected final ComponentContainer<S> m_container; protected AbstractComponentManager( ComponentContainer<S> container, ComponentMethods componentMethods ) protected AbstractComponentManager( ComponentContainer<S> container, ComponentMethods componentMethods, boolean factoryInstance ) m_componentMet...
0
/* * Copyright 2005 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 ...
1
String[] sa = fileStatus.getPath().getName().split("\\.");
0
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public static class Validation { public static enum TYPE { ERROR, WARN } public String message; public String type; public Validation(String message, String type) { this.message = messa...
0
import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader; clazz = AccumuloVFSClassLoader.loadClass(classname, Aggregator.class);
0
@Override @Override @Override @Override
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
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/map/TestFixedSizeSortedMap.java,v 1.2 2003/11/16 22:15:11 scolebourne Exp $ * @version $Revision: 1.2 $ $Date: 2003/11/16 22:15:11 $
0
throws ParseException;
0
public PublicKey engineLookupAndResolvePublicKey( public X509Certificate engineLookupResolveX509Certificate( public javax.crypto.SecretKey engineLookupAndResolveSecretKey(
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
//Exposing KMS configuration for Ambari Files View Instance with a "Local" cluster configuration if(context.getCluster() != null) { String encryptionKeyProviderUri = getEncryptionKeyProviderUri(); if(encryptionKeyProviderUri != null) { conf.set("dfs.encryption.key.provider.uri", encryptionK...
0
UUID uuid = null; try { uuid = UUID.fromString(scanner); } catch (IllegalArgumentException e) { throw new UnknownScanner(e.getMessage()); } if (scannerCache.asMap().remove(uuid) == null) { throw new UnknownScanner("Scanner never existed or no longer exists"); } } cat...
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
public PriorityBufferTest(final String testName) { final PriorityBuffer<E> heap = getCollection(); final E[] tree = heap.elements; final E parent = tree[i]; final ArrayList<E> list = new ArrayList<E>(); final Buffer<E> buffer = getCollection(); } catch (final Buff...
0
import com.google.cloud.dataflow.sdk.values.TimestampedValue; tester.injectElements(TimestampedValue.of(element, new Instant(element)));
0
import com.google.cloud.dataflow.sdk.Pipeline; import com.google.cloud.dataflow.sdk.PipelineResult; import com.google.cloud.dataflow.sdk.runners.DataflowPipelineRunner; import com.google.cloud.dataflow.sdk.runners.PipelineRunner; public void testSettingRunnerFullName() { String[] args = new String[] {Stri...
0
* @version CVS $Id: ValueJXPathBinding.java,v 1.13 2004/02/29 06:07:37 vgritsenko Exp $ Object value = jxpc.getValue(this.xpath); if (getLogger().isDebugEnabled()) { getLogger().debug("Done loading " + toString() + " -- value= " + value); }
0
import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.AssistedInject; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.EnumMap; import java.util.EnumSet; import java.util.HashMap; import java.util.HashSet...
0
* @version $Id$ * @param <E> the type that the closure acts on * @param <E> the type that the closure acts on public static <E> Closure<E> ifClosure(Predicate<? super E> predicate, Closure<? super E> trueClosure, Closur...
0
new String[] {"http://" + ES_IP + ":" + esHttpPort}, getEsIndex(), ES_TYPE) .withSocketAndRetryTimeout(90000) .withConnectTimeout(5000);
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
/* * 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 ...
0
import org.junit.Ignore; @Ignore("known as broken after interception inception in service dependencies")
0
* new DoFn<KV<K, CoGbkResult>, T>() }{ * {@code @ProcessElement * }})); * </pre>
0
protected PStmtKey createKey(final String sql, final int resultSetType, final int resultSetConcurrency, final int resultSetHoldability, final StatementType statementType) { protected PStmtKey createKey(final String sql, final int resultSetType, final int resultSetConcurrency, final State...
0
/* import java.util.TreeMap; * Set the properties of the configuration data represented by this KerberosConfigurationDescriptor * * @param properties a Map of properties */ public void setProperties(Map<String, String> properties) { if (properties == null) { this.properties = null; } else { ...
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 use...
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
package org.apache.commons.ognl.internal.entry; import org.apache.commons.ognl.internal.CacheException; import org.apache.commons.ognl.internal.entry.ClassCacheEntryFactory; import java.lang.reflect.Field; import java.util.HashMap; import java.util.Map; /** * User: Maurizio Cucchiara * Date: 10/15/11 * Time: 9:47...
0
import org.apache.beam.sdk.transforms.Sum.SumLongFn; public void handleResultCommitsAggregators() { Class<?> fn = getClass(); DirectExecutionContext fooContext = context.getExecutionContext(created.getProducingTransformInternal(), null); DirectExecutionContext.StepContext stepContext = fooContext....
0
private boolean watch; private Exception caught; private boolean killedProcess; this.killedProcess = false; this.watch = false; this.watchdog = new Watchdog(timeout); this.watchdog.addTimeoutObserver(this); * Destroys the running process manually. */ public sync...
0
import org.apache.beam.sdk.annotations.Experimental; import org.joda.time.Instant;
0
import static org.apache.commons.beanutils.MethodUtils.getAccessibleMethod; import org.apache.commons.logging.Log; Method rulesMethod = getAccessibleMethod( rulesClass, methodName, paramSpec );
0
* @version CVS $Id: RepeaterJXPathBinding.java,v 1.17 2004/01/27 20:58:52 vgritsenko Exp $ int initialSize = repeater.getSize(); Repeater.RepeaterRow thisRow; if (initialSize > 0) { thisRow = repeater.getRow(--initialSize); } else { thisRow = ...
0
Property property();
0
import java.util.Arrays; @Test public void testArrays() throws Exception { Context c = new Context(); c.addCommand("echo", this); c.addCommand("tac", this); c.addCommand("cat", this); c.execute("a = [ 1 2 3 ]"); c.execute("b = [ a b c ]"); c.execute("...
0
REST_API_ENABLE_DELETE_TYPE_OVERRIDE("atlas.rest.enable.delete.type.override", false),
0
Algorithm algorithm = getAlgorithm(algorithmURI); Algorithm algorithm = getAlgorithm(algorithmURI); Algorithm algorithm = getAlgorithm(algorithmURI); Algorithm algorithm = getAlgorithm(algorithmURI); if (algorithm != null) { Algorithm algorithm = getAlgorithm(algorithmUR...
0
public final class C14nHelper {
0
package org.apache.accumulo.examples.simple.combiner;
0
package org.apache.accumulo.server.test.randomwalk.concurrent; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Properties; import java.util.Random; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.client.TableExistsException; import org.apac...
1
private transient StageBundleFactory<InputT> stageBundleFactory;
0
JSONArray rows = results.getJSONArray(MetadataServiceClient.ROWS); int numRows = response.getInt(MetadataServiceClient.COUNT); Assert.assertEquals(numRows, 1); int numRows = response.getInt(MetadataServiceClient.COUNT); Assert.assertEquals(numRows, 1);
0
public void setStringProperty(final String stringProperty) { public FluentIntrospectionTestBean setFluentProperty(final String value) { final String fluentGetProperty) {
0
LOG.error("Unexpected exception causing exit", e); LOG.info("FollowerRequestProcessor exited loop!");
0
* public RowBufferingIterator(Scanner scanner, ScannerOptions opts, Range range, long timeout, int batchSize, long readaheadThreshold, RowBufferFactory bufferFactory) {
0
log.info("Granted namespace permission {} for user {} on the namespace {} at the request of user {}", permission, user, namespace, c.getPrincipal()); log.info("Revoked namespace permission {} for user {} on the namespace {} at the request of user {}", permission, user, namespace, c.getPrincipal());
0
prerequisiteCheck.setFailReason(formatEntityList(prerequisiteCheck.getFailedOn()) + " must have repository version " + request.getRepositoryVersion() + " installed");
0
* &lt;fb:javascript id="foo" path="@foo"&gt; * &lt;fb:load-form&gt; * &lt;/fb:load-form&gt; * &lt;fb:save-form&gt; * &lt;/fb:save-form&gt; * &lt;/fb:javascript&gt; * This example is rather trivial and could be replaced by a simple &lt;fb:value&gt;, but * <li>The &lt;fb:save-form&gt; snippet ...
0
import org.apache.felix.ipojo.test.scenarios.configuration.service.CheckService; Factory fact = Utils.getFactoryByName(context, "CONFIG-BothConfigurableCheckService");
0
/* $Id: RulesBaseTestCase.java,v 1.12 2004/05/07 01:29:59 skitching Exp $ * * @version $Revision: 1.12 $ $Date: 2004/05/07 01:29:59 $
0
* @throws IllegalArgumentException if the buffer is not large enough to hold a complete character // Ensure that buffer is long enough to hold a complete character final float maxBytesPerChar = encoder.maxBytesPerChar(); if (bufferSize < maxBytesPerChar) { throw new IllegalArgum...
0
throw new ResourceIOException("Resouce already dispoased");
0
import java.net.URI; @Test public void testGetRequestByName() throws Exception { final HttpHost target = start(); final String baseURL = "http://localhost:" + target.getPort(); final String message = Request.create("GET", baseURL + "/").execute().returnContent().asString(); Asser...
0
import org.apache.beam.runners.core.SideInputReader;
0
HttpContext context = new BasicHttpContext(); HttpContext context = new BasicHttpContext(); HttpContext context = new BasicHttpContext();
0
throw new IOException(e.getMessage()); throw new IOException(e.getMessage());
0
* Contrast this with {@link #transformedMap(Map, Transformer, Transformer)}. public static <K, V> IterableMap<K, V> transformingMap(Map<K, V> map, * Contrast this with {@link #transformingMap(Map, Transformer, Transformer)}. public static <K, V> Map<K, V> transformedMap(Map<K, V> map,
0
try (JarFile jar = new JarFile(file)) { Enumeration<JarEntry> en = jar.entries(); while (en.hasMoreElements()) { JarEntry e = en.nextElement(); final String name = e.getName(); if (name.endsWith(".class")) { // System.ou...
0
* to the user, or the user will be given the opportunity to download the heap file.
0
import org.apache.hc.core5.annotation.Contract; import org.apache.hc.core5.annotation.ThreadingBehavior; @Contract(threading = ThreadingBehavior.SAFE)
0
private static final WeakFastHashMap cache = new WeakFastHashMap(); static { cache.setFast(true); }
0
public void writeTo(final OutputStream outStream) throws IOException { original.writeTo(outStream);
0
* @see #ExecuteWatchdog(long) * @deprecated Use constructor with a long type instead. (1.4.x * compatibility) */ public ExecuteWatchdog(final int timeout) { this((long) timeout); } /**
0
parentTransformer = XMLSecurityUtils.getTransformer(parentTransformer, inclusiveNamespaces, algorithm, XMLSecurityConstants.DIRECTION.IN); XMLSecurityUtils.getTransformer(inclusiveNamespaces, outputStream, algorithm, XMLSecurityConstants.DIRECTION.IN); get...
0
import org.apache.sshd.common.util.buffer.Buffer; import org.apache.sshd.common.util.buffer.BufferUtils; import org.apache.sshd.common.util.buffer.ByteArrayBuffer; Buffer buffer = new ByteArrayBuffer();
0
public HttpResponse execute(final HttpHost targetHost, final HttpRequest request, HttpHost target = targetHost; final String s; * @param targetHost the target host for the request. protected HttpRoute determineRoute(final HttpHost targetHost, return this.routePlann...
0