Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
String user = getViewParameterValue(PROPERTY_SLIDER_USER); boolean securityEnabled = Boolean.valueOf(getViewParameterValue(PROPERTY_SLIDER_SECURITY_ENABLED)); String viewPrincipal = getViewParameterValue(PROPERTY_VIEW_PRINCIPAL); String viewPrincipalKeytab = getViewParameterValue(PROPERTY_VIEW...
0
FileSKVIterator reader = FileOperations.getInstance().newReaderBuilder().forFile(path.toString(), ns, ns.getConf()) .withTableConfiguration(conf).seekToBeginning().build();
0
package org.apache.hc.core5.http.integration; import org.apache.hc.core5.http.impl.nio.BasicAsyncRequestConsumer; import org.apache.hc.core5.http.nio.HttpAsyncExchange; import org.apache.hc.core5.http.nio.HttpAsyncRequestConsumer; import org.apache.hc.core5.http.nio.HttpAsyncRequestHandler; import org.apache.hc.core5.h...
1
* @version CVS $Id: DefaultTreeBuilder.java,v 1.6 2004/02/06 15:39:57 sylvain Exp $ RoleManager roles = new DefaultRoleManager(this.parentRoleManager);
0
ServerSocket socket = getServerSocket(); schedulerThriftServer.start( socket, new AuroraAdmin.Processor<>(schedulerThriftInterface)); return LocalService.primaryService(socket.getLocalPort(), shutdown);
0
import java.util.HashSet; if(clusterConfigs == null || !clusterConfigs.getProperties().containsKey(property.getName())) { if (property.getValue() == null || property.getPropertyTypes().contains(PropertyInfo.PropertyType.DONT_ADD_ON_UPGRADE)) { continue; } ...
0
this(new MemCacheEntryFactory());
0
public static List<HostConfigEntry> findMatchingEntries(String host, HostConfigEntry... entries) { public static List<Pair<Pattern, Boolean>> parsePatterns(CharSequence... patterns) {
0
package org.apache.beam.sdk.transforms; import org.apache.beam.sdk.coders.Coder; import org.apache.beam.sdk.coders.Coder.Context; import org.apache.beam.sdk.coders.CoderException; import org.apache.beam.sdk.coders.CoderRegistry; import org.apache.beam.sdk.coders.KvCoder; import org.apache.beam.sdk.coders.SerializableC...
0
this(null, null, type, null); Bound(String name, String filepattern, Class<T> type, Schema schema) { return new Bound<>(name, filepattern, type, schema); return new Bound<>(name, filepattern, type, ReflectData.get().getSchema(type)); return new Bound<>(name, filepattern, GenericRec...
0
public void encodeImage(BufferedImage buf, File imageFile) throws SVGGraphics2DIOException { try{ OutputStream os = new FileOutputStream(imageFile); JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(os); JPEGEncodeParam param = encoder.getDefaultJPEGEncodePar...
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
* Copyright 1999-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 ...
1
import org.apache.http.cookie.ClientCookie; import org.apache.http.cookie.CommonCookieAttributeHandler; AbstractCookieAttributeHandler implements CommonCookieAttributeHandler { @Override public String getAttributeName() { return ClientCookie.VERSION_ATTR; }
0
public static MessageDigest getDigest(final String algorithm, final MessageDigest defaultMessageDigest) { public static boolean isAvailable(final String messageDigestAlgorithm) { public DigestUtils(final MessageDigest digest) { public DigestUtils(final String name) {
0
import org.apache.felix.dm.service.Service; mavenBundle().groupId("org.osgi").artifactId("org.osgi.compendium").version("4.1.0"),
0
* Returns the receiver as a URI String for public display, like, without a * password. * * @return A URI String without a password, never {@code null}. */ String getPublicURIString(); /**
0
log.warn("Could not deserialize protobuf for: " + input.getKey());
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 by applic...
0
* @since 2.0
0
* * * * @version CVS $Id$
0
if (collectionState != null) { List<String> shards = new ArrayList<>(collectionState.getSlicesMap().keySet()); Collections.sort(shards); this.shards = shards; }
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
package org.apache.accumulo.core.clientImpl;
0
package com.twitter.mesos.scheduler.filter; import com.twitter.mesos.scheduler.Query; import com.twitter.mesos.scheduler.configuration.Resources; import static com.twitter.mesos.scheduler.filter.SchedulingFilterImpl.ResourceVector.CPU; import static com.twitter.mesos.scheduler.filter.SchedulingFilterImpl.ResourceVector...
0
import org.apache.cocoon.components.ComponentInfo; super(new ComponentInfo(), logger);
0
@SuppressWarnings("serial")
0
* @param lineParser the line parser. If <code>null</code> * {@link org.apache.http.message.BasicLineParser#INSTANCE} will be used
0
/* * Copyright (c) OSGi Alliance (2011). All Rights Reserved. * * 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
query -> query.get().getSlaveHosts().isEmpty() ? Optional.absent() : Optional.of(query.get().getSlaveHosts()); if (query.get().getTaskIds().isEmpty()) { } else { taskQueriesById.incrementAndGet(); from = Optional.of(fromIdIndex(query.get().getTaskIds()));
0
import org.apache.beam.runners.fnexecution.control.BundleProgressHandler; private transient BundleProgressHandler progressHandler; progressHandler = BundleProgressHandler.unsupported(); new ReceiverFactory(collector, outputMap), stateRequestHandler, progressHandler)) {
0
* A very basic {@link ConnFactory} implementation that creates * {@link HttpClientConnection} instances given a {@link HttpHost} instance. * * @see HttpHost
0
private final Map<String, Map<String, String>> queries = new HashMap<>();
0
* @version CVS $Id$ // Nothing to do
0
* @version $Id: TestConfigurationFactory.java,v 1.14 2004/08/20 15:49:27 ebourg Exp $ assertNotNull(config.getProperty("element2.subelement.subsubelement")); assertEquals("value", config.getProperty("element3")); assertEquals("foo", config.getProperty("element3[@name]"));
0
import static com.google.common.base.Charsets.UTF_8; transport.write("stat\n".getBytes(UTF_8), 0, 5); response.append(new String(buffer, 0, n, UTF_8));
0
package org.apache.felix.ipojo.test.scenarios.component; import foo.RGB; import foo.ipojo.IPOJOFoo; import org.apache.felix.ipojo.annotations.Component; @Component @IPOJOFoo(bar="bar", rgb = RGB.RED, colors = {RGB.BLUE, RGB.RED}) public class CustomAnnotationWithEnum { }
0
/** * We effectively maintain the set of completely processed service event tracking counts. This method waits for all events prior * to the parameter tracking count to complete, then returns. See further documentation in EdgeInfo. * @param trackingCount */ m_activated = false...
0
final FTPClient client1 = new FTPClient(); final FTPClient client2 = new FTPClient();
1
import java.lang.reflect.InvocationTargetException; import java.util.function.Supplier; private String sslContextSupplierClassProperty = getConfigPrefix() + "context.supplier.class"; public String getSslContextSupplierClassProperty() { return sslContextSupplierClassProperty; } @SuppressWarnings...
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
* Implements the <a href="http://de.wikipedia.org/wiki/K%C3%B6lner_Phonetik">K&ouml;lner Phonetik</a> * (Cologne Phonetic) algorithm issued by Hans Joachim Postel in 1969. * <p> * The <i>K&ouml;lner Phonetik</i> is a phonetic algorithm which is optimized for the German language. * It is related to the well-known s...
0
import org.apache.http.client.cache.HttpCacheContext; private HttpCacheContext context; private ClientExecChain impl; context = HttpCacheContext.create(); impl = createCachingExecChain(mockBackend, cache, config); } protected ClientExecChain createCachingExecChain( final Cl...
0
// they are regularly captured within OldDoFn's.
0
varExpr = JXTExpression.compileExpr(var, "set: \"var\":", locator); valueExpr = JXTExpression.compileExpr(value, "set: \"value\":", locator);
0
private static final Set<String> PROPERTY_IDS = new HashSet<>(); private static final Map<Resource.Type, String> KEY_PROPERTY_IDS = new HashMap<>(); new HashSet<>(Arrays.asList(new String[]{ CONFIGURATION_CLUSTER_NAME_PROPERTY_ID, CONFIGURATION_CONFIG_TYPE_PROPERTY_ID})); Map<String, String> c...
0
String propertyValue = resource.getPropertyValue(getPropertyId()); return propertyValue == null ? false : getValue().compareTo(resource.getPropertyValue(getPropertyId())) < 0;
0
if ( factoryPid != null && ( pid == null || pid.equals( PLACEHOLDER_PID ) ) )
0
public interface Repository extends java.io.Serializable {
0
package org.apache.commons.exec.launcher; import java.io.File; import java.io.IOException; import org.apache.commons.exec.CommandLine; import org.apache.commons.exec.CommandLineImpl; import org.apache.commons.exec.environment.Environment; /** * A command launcher that uses an auxiliary script to launch commands in ...
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 ap...
1
* <p> * It allows querying of a boolean {@link #hasOption(String opt)}, * for options requiring arguments. * <p> * Additionally, any left-over or unrecognized arguments, * are available for further processing. * @version $Id$
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/set/TestUnmodifiableSortedSet.java,v 1.4 2003/12/03 11:19:10 scolebourne Exp $ import org.apache.commons.collections.BulkTest; * @version $Revision: 1.4 $ $Date: 2003/12/03 11:19...
0
package org.apache.commons.ognl.enhance; * http://www.apache.org/licenses/LICENSE-2.0
0
LOG.debug(event);
0
import org.apache.beam.sdk.coders.Coder; import org.apache.beam.sdk.transforms.DoFn; import org.apache.beam.sdk.util.WindowedValue.FullWindowedValueCoder; import org.apache.beam.sdk.util.WindowedValue.WindowedValueCoder; PCollection<InputT> input = context.getInput(); Coder<InputT> inputCoder = input.getCoder()...
0
* $Id: DelegatingCallableStatement.java,v 1.7 2003/03/06 00:04:58 rwaldhoff Exp $ * $Revision: 1.7 $ * $Date: 2003/03/06 00:04:58 $ * @version $Revision: 1.7 $ $Date: 2003/03/06 00:04:58 $ /* JDBC_3_ANT_KEY_BEGIN */ /* JDBC_3_ANT_KEY_END */
0
import static org.apache.beam.sdk.testing.PCollectionViewTesting.materializeValuesFor; import org.apache.beam.sdk.coders.KvCoder; import org.apache.beam.sdk.coders.VoidCoder; PCollectionViewWriter<?, Iterable<Integer>> viewWriter = IterableCoder.of(KvCoder.of(VoidCoder.of(), VarIntCoder.of()))), ...
0
final JavaClass jc = Repository.lookupClass(class_name); } catch (final ClassNotFoundException e) { final JavaClass jc = Repository.lookupClass(class_name); } catch (final ClassNotFoundException e) { final JavaClass jc = Repository.lookupClass(class_name); final J...
1
package org.apache.beam.sdk.options; import org.apache.beam.sdk.options.GoogleApiDebugOptions.GoogleApiTracer; import org.apache.beam.sdk.util.TestCredential; import org.apache.beam.sdk.util.Transport;
0
package org.apache.commons.digester3.examples.api.addressbook;
0
import static org.junit.Assert.*; import java.io.File; import java.util.List; import org.apache.commons.fileupload2.disk.DiskFileItem; /** Proposed test for FILEUPLOAD-293. As of yet, doesn't reproduce the problem. */ @Test public void testMoveFile() throws Exception { DiskFileUpload myUpload ...
0
import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.isA; import static org.junit.internal.matchers.ThrowableCauseMatcher.hasCause; import static org.junit.internal.matchers.ThrowableMessageMatcher.hasMessage; import org.apache.kafka.common.KafkaException; if (config.get...
0
for (Module m : m_modules) // Remove the module from the resolver state. getFramework().getResolver().removeModule(m); // Set fragments to null, which will remove the module from all // of its dependent fragment modules. try { ...
0
import java.util.Enumeration; import java.util.Locale; import java.util.Map; import java.util.StringTokenizer; import javax.servlet.http.Cookie; import javax.servlet.http.HttpSession; import org.apache.avalon.framework.parameters.Parameters; HttpSession session = request.getSession(false); HttpSess...
0
value = ElementValue.readElementValue(file, constant_pool);
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
package aQute.libg.filters; public final class NotFilter extends Filter { private final Filter child; public NotFilter(Filter child) { this.child = child; } @Override public void append(StringBuilder builder) { builder.append("(!"); child.append(builder); builder.append(")"); } }
0
import java.util.Optional;
0
cm.setMaxTotal(50);
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
import org.apache.http.client.cache.Resource; return new HttpCacheEntry(requestDate, new HeapResource(body), return new HttpCacheEntry(requestDate, new HeapResource(body), Resource orig = entry.getResource(); if (orig instanceof HeapResource) { ...
0
long replicateLog(ClientContext context, String tableName, WalEdits data) long replicateKeyValues(ClientContext context, String tableName, KeyValues kvs)
0
* Interface to be implemented by Widgets which contain other widgets. So all * widgets together form a widget tree, with its root being the {@link Form} * widget, the {@link ContainerWidget}s being the branches/forks, and the * {@link Widget}s with values being the leaves. * @version $Id: ContainerWidget.java,v 1....
0
package cz.seznam.euphoria.core.client.dataset; import cz.seznam.euphoria.core.client.flow.Flow; import cz.seznam.euphoria.core.client.operator.Operator; import java.util.Collection; /** * A dataset registered in flow. */ public abstract class FlowAwareDataset<T> implements Dataset<T> { private final Flow flow;...
0
@Override @Override @Override
1
import org.apache.accumulo.core.data.TableId; TableId testId = TableId.of("TEST");
0
Collection<SftpClient.OpenMode> modes = EnumSet.noneOf(SftpClient.OpenMode.class); } else if (option == StandardOpenOption.SPARSE) { /* * As per the Javadoc: * * The option is ignored when the file system does not ...
0
* http://www.apache.org/licenses/LICENSE-2.0
0
} catch (Throwable t) { UserCodeException innermostUserCodeException = null; Throwable current = t; for (; current.getCause() != null; current = current.getCause()) { if (current instanceof UserCodeException) { innermostUserCodeException = ((UserCodeException) current); if ...
0
import java.util.Iterator; public AgentCommand dequeue(String hostname, String commandId) { Queue<AgentCommand> q = getQueue(hostname); if (q == null) { return null; } synchronized (q) { if (q.isEmpty()) { return null; } else { AgentCommand c = null; for (Ite...
0
public int size(){
0
import org.apache.accumulo.core.security.tokens.SecurityToken; public OfflineIterator(ScannerOptions options, Instance instance, SecurityToken credentials, Authorizations authorizations, Text table, Range range) { private SecurityToken credentials; public OfflineScanner(Instance instance, SecurityToken credential...
0
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken; connector = getInstance().getConnector(getUserName(), getToken()); String username = getUserName(); AuthenticationToken password = getToken(); return CredentialHelper.createSquelchError(username, password, getInstance().getIns...
0
import org.apache.hc.core5.io.CloseMode; this.conn.close(CloseMode.IMMEDIATE);
0
public static int size(Map<?, ?> map) {
0
new Function<HostStatus, MaintenanceMode>() { @Override public MaintenanceMode apply(HostStatus status) { return status.getMode(); } };
0
mavenBundle().groupId("org.osgi").artifactId("org.osgi.compendium").version(Base.OSGI_SPEC_VERSION), // TODO this test is broken, it assumes that the order in which listeners are added to the BundleContext will also // be the order in which they're invoked (which from a spec point of vie...
0
* serialVersionUID format is YYYYMMDD for the date of the last binary change.
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 java.util.Iterator; import org.apache.hc.core5.annotation.Immutable; import org.apache.hc.core5.http.Header; import org.apache.hc.core5.http.HttpEntity; import org.apache.hc.core5.http.HttpResponse; import org.apache.hc.core5.http.HttpStatus; import org.apache.hc.core5.http.HttpVersion; import org.apache.hc.core...
0
public void encode(T value, OutputStream outStream, Context context) throws CoderException, IOException { encode(value, outStream); } public T decode(InputStream inStream, Context context) throws CoderException, IOException { return decode(inStream); }
0
Copyright 2001-2005 The Apache Software Foundation Node n = CSSEngine.getCSSParentNode(elt); while (n != null && n.getNodeType() != Node.ELEMENT_NODE) { n = CSSEngine.getCSSParentNode(elt); } return (Element) n; URIResolver resolver = ctx.createURIResolve...
1
SelectionListBuilder builder = null; // listType can be null, meaning we will use the default selection list String listType = selectionListElement.getAttribute("type"); if ("".equals(listType)) { listType = null; } ...
0
protected String getStatMetricName() { return "output.kafka.write_logs"; } @Override protected String getWriteBytesMetricName() { return "output.kafka.write_bytes"; } @Override LOG.error("Kafka is down. messageNumber=" + kafkaCallBack.thisMessageNumber + ". Going to sleep for " + ...
0
import org.apache.cocoon.el.ExpressionFactory;
0
* This is a glue object, to convert short file references to long references. The metadata may contain old relative file references. This class keeps track of * the short file reference, so it can be removed properly from the metadata tables. return compareTo((FileRef) obj) == 0;
0
* The InspectableAwareCachingSourceFactory inherits from {@link CachingSourceFactory} and only * adds support for wrapped sources of type {@link InspectableSource}. *
0
package org.apache.beam.examples.complete.game; import org.apache.beam.examples.common.DataflowExampleOptions; import org.apache.beam.examples.common.DataflowExampleUtils; import org.apache.beam.examples.complete.game.utils.WriteToBigQuery; import org.apache.beam.examples.complete.game.utils.WriteWindowedToBigQuery; i...
0
import org.apache.accumulo.core.util.FastFormat;
0