Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
package org.apache.accumulo.core.file.blockfile.cache.lru;
0
@SuppressWarnings({"unchecked", "serial", "rawtypes", "unused"}) public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResult._Fields>, java.io.Serializable, Cloneable, Comparable<ScanResult> { public enum _Fields implements org.apache.thrift.TFieldIdEnum {
0
if (fs.getFileStatus(path).isFile()) {
0
public static final String BATCH_WORKER_HARNESS_CONTAINER_IMAGE = "dataflow.gcr.io/v1beta3/beam-java-batch:beam-master-20160714"; public static final String STREAMING_WORKER_HARNESS_CONTAINER_IMAGE = "dataflow.gcr.io/v1beta3/beam-java-streaming:beam-master-20160714";
0
.apply(WithKeys.<URI, String>of(uri).setName("WithKeys(" + uriString + ")")); .apply(Keys.<URI>create().setName("GetURIs")) .apply(RemoveDuplicates.<URI>create().setName("RemoveDuplicateDocs")) .apply(RemoveDuplicates.<KV<URI, String>>create().setName("RemoveDuplicateWords")) ...
0
import java.io.File; private static final String APPLICATION_PROPERTIES = "application.properties"; String proprtiesLocation = System.getProperty("metadata.properties.location"); if (proprtiesLocation == null) { return new PropertiesConfiguration(PropertiesUtil.class.getResource("/" + A...
0
Cluster cluster = clusters.getCluster(clusterName); Map<String, Map<String, String>> configTags = new TreeMap<String, Map<String, String>>(); findConfigurationPropertiesWithOverrides(configurations, configTags, cluster, serviceName, namenodeHost); execCmd.setConfigurationTags(configTags);
0
import org.apache.accumulo.core.security.Credentials; hasPerm = WalkingSecurity.get(state).canChangePassword(new Credentials(principal, token).toThrift(state.getInstance()), target);
0
defaultParams = new BasicHttpParams();
0
String metadetadir = temp.newFolder("metadetadir").toString(); String serverVersionFilePath = temp.newFolder("serverVersionFilePath").toString(); LOG.info("Metadetadir is " + metadetadir); LOG.info("ServerVersionFilePath is " + serverVersionFilePath); properties.setProperty(Configuration.METADETA_...
0
Utils.configureObject(p, LogService.class); Utils.configureObject(p, Component.class, Utils.createMockObjectAdapter(Component.class, new Object() { return new DependencyManager((BundleContext) Utils.createNullObject(BundleContext.class)); Utils.configureObject(p, PersistencyManag...
0
File serverActions = oozie.getServerActionsFolder(); assertNotNull(serverActions); assertTrue("Server actions dir is " + serverActions.getPath(), serverActions.getPath().contains("extensions/EXT/0.1/services/OOZIE2/server_actions")); serverActions = oozie.getServerActionsFolder(); assertNotNull(serv...
0
/* * Copyright 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 by applica...
0
* @deprecated (4.3) use {@link HttpClientBuilder} see also {@link CloseableHttpClient}.
0
* Sets the user language. If the value is null, then the default (see * {@link org.apache.batik.bridge.UserAgent#getLanguages}) * (see {@link org.apache.batik.bridge.UserAgent#getPixelToMM}) * <P>This method modifies the result filename, it changes the existing * suffix to correspong the resu...
0
import com.google.common.base.Optional; import com.twitter.mesos.gen.JobConfiguration; import com.twitter.mesos.gen.JobKey; import com.twitter.mesos.scheduler.JobKeys; .entity("<html>Usage: /structdump/{task_id} or /structdump/job/{role}/{env}/{job}</html>") return dumpEntity("Task " + taskId, new Work.Quie...
0
* Copyright (C) 2015 Google Inc.
0
private Signature signatureAlgorithm;
1
/* */ fw = new FunctionWrapper(interp, (Function)args[0], new Object[0]); /* */ fw = new FunctionWrapper(interp, (Function)args[0], new Object[0]);
0
* @see #getPixelUnitToMillimeter()
0
return new CombinedResourceBundle( bundleResourceBundle, defaultResourceBundle, locale );
0
import org.apache.hadoop.mapreduce.JobID; public void test3() { String s = "`~!@#$%^&*()-_=+[]{}|,.<>/?;:'\""; test(s, s, s, new HashMap<String,String[]>()); } public void test4() { Map<String,String[]> adj = new HashMap<String,String[]>(); adj.put("X", new String[] {}); test("", "jobName",...
0
Document doc = XMLUtils.read(this.getOctetStream(), secureValidation); Document document = XMLUtils.read(is, secureValidation);
0
public NavigableSet<E> subSet(final E fromElement, final boolean fromInclusive, final E toElement, final boolean toInclusive) { public NavigableSet<E> headSet(final E toElement, final boolean inclusive) { public NavigableSet<E> tailSet(final E fromElement, final boolean inclusive) {
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 net.jcip.annotations.Immutable; @Immutable
0
private static final Arg<File> TIER_CONFIG_FILE = Arg.create(); new LeadingOptions(MAX_REGISTRATION_DELAY.get(), MAX_LEADING_DURATION.get())); .toInstance(MAX_STATUS_UPDATE_BATCH_SIZE.get()); private static Optional<String> readTierFile() { if (TIER_CONFIG_FILE.hasAppliedValue()) { r...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/compiler/VariableReference.java,v 1.8 2003/10/09 21:31:39 rdonkin Exp $ * $Revision: 1.8 $ * $Date: 2003/10/09 21:31:39 $ * any, must include the following acknowledgement: * Al...
0
* The system property ({@value}) which can be used to override the system type. * @since 3.0 * @since 3.0 * @since 3.0 * @since 3.0 * @since 3.0
0
import org.apache.hc.core5.http.HttpException; import org.apache.hc.core5.http.HttpHost; import org.apache.hc.core5.http.HttpRequest; import org.apache.hc.core5.http.HttpResponse; import org.apache.hc.core5.http.HttpStatus; import org.apache.hc.core5.http.entity.EntityUtils; import org.apache.hc.core5.http.entity.Strin...
0
out = new ChannelOutputStream(this, remoteWindow, log, SshConstants.SSH_MSG_CHANNEL_DATA, true); } catch (Throwable err) { Throwable ignored = GenericUtils.peelException(err); if (log.isDebugEnabled()) { log.debug("doInit(" + this + ") inform l...
0
import java.lang.reflect.Constructor; import org.apache.felix.framework.util.SecureAction; // Secure action to make object constructors accessible. private static final SecureAction m_secureAction = new SecureAction(); // The constructor may not be public, so we need to make it ...
0
import com.google.common.io.ByteStreams; private static void writeString(String value, OutputStream dos) throws IOException { private static String readString(InputStream dis) throws IOException { ByteStreams.readFully(dis, bytes); writeString(value, outStream); return readString(inStream);
0
Path remoteDir = getTempTargetRelativeFile( getClass().getSimpleName(), getCurrentTestName(), ScpHelper.SCP_COMMAND_PREFIX, "virtual"); sshd.setFileSystemFactory(new VirtualFileSystemFactory(remoteDir));
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 org.apache.http.util.LangUtils; return // Do the cheapest checks first (this.layered == that.layered) && LangUtils.equals(this.targetHost, that.targetHost) && LangUtils.equals(this.localAddress, that.localAddress) && LangUtils.equals(this.pro...
0
checkCombinedRootNotConstructed();
0
package org.apache.beam.sdk.io.gcp.datastore;
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 static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; @org.junit.jupiter.api.Test @org.junit.jupiter.api.Test @org.junit.jupiter.api.Test @org.junit.jupiter.api.Test
0
import com.google.common.collect.ImmutableList; import java.util.List; import java.util.Objects; final Pipeline pipeline; public List<TaggedPValue> expand() { ImmutableList.Builder<TaggedPValue> values = ImmutableList.builder(); for (Map.Entry<TupleTag<?>, PCollection<?>> entry : pcollectionMap.entrySet()) ...
0
thrown.expectMessage("Failed to create job"); thrown.expectMessage("Failed to create job with prefix"); thrown.expectMessage("last failed job"); tester.finishBundle();
0
package org.apache.commons.fileupload2.util;
0
return numberUnit(c, true); return numberUnit(c, false); protected int numberUnit(int c, boolean integer) throws IOException { return (integer) ? LexicalUnits.INTEGER : LexicalUnits.FLOAT;
0
private static String toHexString(byte[] ba) { StringBuilder str = new StringBuilder(); for (int i = 0; i < ba.length; i++) { str.append(String.format("%x", ba[i])); } return str.toString(); } /* Test constructing a Mutation using a byte buffer. The byte array * returned as the row is co...
0
import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableMap; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java...
0
protected void doRename(final FileObject newfile) throws Exception LocalFile newLocalFile = (LocalFile) FileObjectUtils.getAbstractFileObject(newfile); if (!file.renameTo(newLocalFile.getLocalFile()))
0
public static void test2(final Object o){ public static void test3(final Serializable o){ public static void test4(final Cloneable o){ public static Object foo(final String s){
0
* in the {@link TimeDomain#EVENT_TIME} time domain. * <li>Is never {@literal null}, but may be {@link BoundedWindow#TIMESTAMP_MIN_VALUE}.
0
import java.io.InputStream; import static com.google.common.base.Preconditions.checkNotNull; private final ThriftConfiguration configuration; interface ThriftConfiguration { InputStream getSslKeyStream() throws IOException; int getServingPort(); } ThriftServerLauncher( Iface schedulerThriftInter...
0
public class GetContentInfoFunctionalTest { * @throws FileSystemException thrown when the getContentInfo API fails. public void testGetContentInfo() throws FileSystemException {
1
Iterable<Edge> iterable = new IteratorToIterableAdapter<>(it); Iterable<Vertex> iterable = new IteratorToIterableAdapter<>(it); Iterable<Edge> result = it;
0
public UnmodifiableCollectionTest(final String testName) { final List<E> list = new ArrayList<E>(); final ArrayList<E> list = new ArrayList<E>();
0
import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader; clazz = (Class<? extends SortedKeyValueIterator<K,V>>) AccumuloVFSClassLoader.loadClass(iterInfo.className, SortedKeyValueIterator.class);
0
* inconvenient for use with a remote interactive shell. The TelnetClient
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
renderingHints = new RenderingHints(null); renderingHints.add(rh); renderingHints = new RenderingHints(null); renderingHints.add(defaultRenderingHints); renderingHints = new RenderingHints(null); renderingHints.add(rh);
0
storeProvider.getUnsafeTaskStore().saveTasks(ImmutableSet.of(task));
0
public class ProcessingInstructionTest {
0
package org.apache.beam.sdk.extensions.euphoria.core.client.io; import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience;
0
import org.apache.excalibur.source.Source; import org.apache.excalibur.source.SourceException; import org.apache.excalibur.source.SourceValidity; * <code>LinkRewriterReader<code> implements <code>servlet:</code> link rewriting in * text resources. It should be used especially for serving JavaScript files that have ...
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
zk[i] = ClientBase.createZKClient("127.0.0.1:" + clientPorts[i]); zk[i] = ClientBase.createZKClient("127.0.0.1:" + clientPorts[i]); zk[i] = ClientBase.createZKClient("127.0.0.1:" + clientPorts[i]); ZooKeeper zk = ClientBase.createZKClient("127.0.0.1:" + clientPorts[0]); ...
0
* @author <a href="mailto:deweese@apache.org">l449433</a>
0
executer = new TaskExecuter(currentThreadId, m_running_threads); private final long threadId; public TaskExecuter(final long threadId, final Map<Long, TaskExecuter> runningThreads) { this.threadId = threadId; this.m_running_threads.remove(threadId);
0
sendName(id, p.getFile().listSshFiles()); if (p.listSshFiles().size() == 0) {
0
if (!"algorithms.HMACOutputLengthMin".equals(ex.getMsgID())) {
0
.setInstructionId("1L") .addProcessBundleDescriptor(BeamFnApi.ProcessBundleDescriptor.newBuilder().setId("1L") BeamFnApi.FunctionSpec.newBuilder().setId("10L")).build())) .addProcessBundleDescriptor(BeamFnApi.ProcessBundleDescriptor.newBuilder().setId("2L") ...
0
return new TestPath(getFileSystem(), root, names);
0
if (log.isDebugEnabled()) { log.debug("process({}@{})[{}] no more passwords to send", username, session, service); }
0
String BASE64 = "http://www.w3.org/2000/09/xmldsig#base64"; String ENVELOPED = String XPATH = "http://www.w3.org/TR/1999/REC-xpath-19991116"; String XPATH2 = "http://www.w3.org/2002/06/xmldsig-filter2"; String XSLT = "http://www.w3.org/TR/1999/REC-xslt-19991116";
1
* @version $Revision: 1.15 $ $Date: 2004/07/30 13:51:01 $ return nodePointer.getValue();
0
package org.apache.bcel.classfile;
1
import org.slf4j.Logger; import org.slf4j.LoggerFactory;
0
sqlNode = ParserTestUtils.parse(createTable);
0
} catch (final NoSuchElementException e) { } catch (final RuntimeException e) { } catch (final SQLException e) { } catch (final Exception e) { } catch (final SQLException ex) { } catch (final javax.naming.NamingException ne) { } catch (final NoSuch...
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
0
* limitations under the License.
0
Copyright 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 by applicable l...
0
import org.apache.sshd.client.UserInteraction; import org.apache.sshd.common.SshdSocketAddress;
0
/******************************************************************************* * Copyright (c) Intel Corporation * Copyright (c) 2017 * * 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 ...
0
* @version CVS $Id: RemovableAspect.java,v 1.2 2003/05/22 12:32:46 cziegeler Exp $ Boolean mandatory = (Boolean)cid.getCopletData().getAspectData("mandatory"); if ( !mandatory.booleanValue() ) {
0
* recommended for use in operations that require deterministic inputs.
0
* A lexicoder for date objects. It preserves the native Java sort order for Date.
0
* The units values. */ protected final static String[] UNITS_VALUES = { "", SVG_USER_SPACE_ON_USE_VALUE, SVG_OBJECT_BOUNDING_BOX_VALUE }; /** return getAnimatedEnumerationAttribute (null, SVG_MASK_UNITS_ATTRIBUTE, UNITS_VALUES, (short)2); ...
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument; import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkNotNull; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.apache.beam.vendor.guava.v26_0_jre.com.go...
0
* Copyright 2004,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
public Object convert(String[] values, Class clazz) {
0
package cz.seznam.euphoria.executor.local; class LocalSpillTools implements SpillTools {
0
import static org.junit.Assert.fail; import com.google.cloud.dataflow.sdk.coders.Coder.NonDeterministicException; try { coder.verifyDeterministic(); } catch (NonDeterministicException e) { fail("Expected that the coder is deterministic"); }
0
import org.apache.sshd.util.test.NoIoTestCase; import org.junit.experimental.categories.Category; @Category({ NoIoTestCase.class })
0
if (connReq.getLastZxidSeen() > zk.getZKDatabase().getDataTreeLastProcessedZxid()) { + Long.toHexString(zk.getZKDatabase().getDataTreeLastProcessedZxid()) sb.append(zk.getZKDatabase().dumpEphemerals()).append("\n"); sb.append("Node count: ").append(zk.getZKDatabas...
0
"replace following properties with real passwords:\n" + errorMessage);
1
import org.apache.accumulo.core.security.Credentials; public RootTabletStateStore(Instance instance, Credentials credentials, CurrentState state) { super(instance, credentials, state, RootTable.NAME); return new MetaDataTableScanner(instance, credentials, MetadataSchema.TabletsSection.getRange(), state, RootT...
0
import org.apache.sshd.client.keyverifier.ServerKeyVerifier;
0
package com.twitter.nexus.scheduler;
0
* @author Apache Software Foundation
0
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
0
/** * Default HTTP client implementation. * <p/> * The usual execution flow can be demonstrated by the code snippet below: * <pre> * CloseableHttpClient httpclient = HttpClients.createDefault(); * try { * HttpGet httpGet = new HttpGet("http://targethost/homepage"); * CloseableHttpResponse response = ...
0
import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set;
0