Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
package aQute.bnd.service.url; import java.io.InputStream; /** * Represents a data stream that has a tag associated with it; the primary * use-case is an HTTP response stream with an ETag header. * * @author Neil Bartlett * */ public class TaggedData { private final String tag; private final InputStream in...
0
package org.apache.batik.svggen;
0
import java.io.FileInputStream; org.w3c.dom.Document doc = XMLUtils.parse(new FileInputStream(f), false);
0
Response response = handleRequest(null, null, new LocalUriInfo(servicesURI),
0
import java.io.PrintStream; import org.apache.felix.gogo.commands.Argument; System.err.println("Unknown bundle and/or version: " System.out.println(""); printResource(System.out, resources[resIdx]); private void printResource(PrintStream out, Resource reso...
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
* 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
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestDoubleOrderedMap.java,v 1.10 2003/10/07 22:20:57 scolebourne Exp $ * @version $Revision: 1.10 $ $Date: 2003/10/07 22:20:57 $ public boolean isAllowNullKey() { public b...
0
* $Revision: 1.4 $ * $Date: 2003/10/09 21:05:29 $ * 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
* Use <code>transformerPredicate</code> if you want that.
0
if (currentPosition == keys.size()) readNextRow();
1
public boolean willUse(Offer offer) { return true;
0
throw new XMLEncryptionException(e); }
0
byte[] ret = new byte[len - 1];
0
package org.apache.hc.client5.http.auth; * Supported authentication schemes. public enum AuthSchemes { BASIC("Basic"), DIGEST("Digest"), NTLM("NTLM"), SPNEGO("Negotiate"), KERBEROS("Kerberos"), CREDSSP("CredSSP"); public final String ident; AuthSchemes(final String ident) { thi...
0
public Interpreter createInterpreter(Document document, String language) { return createInterpreter(document, language, null); } /** * Creates a new interpreter for the specified document and * according to the specified language. This method can ...
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
* @version $Id$
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
@Ignore
0
* @throws NullPointerException if list or predicate is null * @throws NullPointerException if list or predicate is null
0
final List<Process> tabletServerProcesses = new ArrayList<Process>(); synchronized (tabletServerProcesses) { try { for (Process tserver : tabletServerProcesses) { try { cluster.stopProcessWithTimeout(tserver, 30, TimeUnit.SECONDS); } catch (Exe...
0
encodeEntities( String.valueOf( (char)i ) ) :
0
* Coordinations created by the Coordinator implementation. public class CoordinationMgr void configure(final long participationTimeout) long completeWaitTime = participationTimeOut; long cutOff = System.currentTimeMillis() + completeWaitTime; final long waitTime = (complete...
0
in.apply("AddKeys", MapElements.via(new SimpleFunction<V, KV<K, V>>() { @Override public KV<K, V> apply(V element) { return KV.of(fn.apply(element), element);
0
import org.apache.beam.sdk.transforms.windowing.GlobalWindow; public void testCoderIsSerializableWithWellKnownCoderType() throws Exception { CoderProperties.coderSerializable(ListCoder.of(GlobalWindow.Coder.INSTANCE)); } @Test
0
/** * $Id$ */
0
* 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 applicabl...
0
import java.util.Arrays; import java.util.Collection; import java.util.Collections; import org.apache.accumulo.core.client.Connector; import org.junit.After; import org.junit.Before; import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger log = LoggerFactory.getLogger(MetaSplitIT.class); ...
0
package org.apache.accumulo.monitor.util;
1
* Based on SimpleRepeater code. * @version CVS $Id: TempRepeaterJXPathBindingBuilder.java,v 1.2 2004/01/11 20:51:16 vgritsenko Exp $ CommonAttributes commonAtts = JXpathBindingBuilderBase.getCommonAttributes(bindingElem);
0
* Copyright 2016 Seznam.cz, a.s.
0
addAuthInfo(new Id("ip", addr.getHostAddress()));
0
package org.apache.beam.sdk.io.hbase;
0
public static final FragmentIdentifierHandler INSTANCE
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument; import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkNotNull; import org.apache.beam.vendor.guava.v20_0.com.google.common.annotations.VisibleForTesting; import org.apache.beam.vendo...
0
import org.apache.accumulo.core.dataImpl.KeyExtent;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/adapters/Attic/TestIteratorShortIterator.java,v 1.2 2003/08/31 17:28:38 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately, this ...
0
obj = main.getConstructor().newInstance();
0
import org.apache.hc.client5.http.ClientProtocolException; import org.apache.hc.client5.http.classic.methods.HttpGet; import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; import org.apache.hc.client5.http.impl.classic.HttpClients;
0
regSearch = "export HBASE_HEAPSIZE="; replacement = "#export HBASE_HEAPSIZE="; content = content.replaceAll(regSearch, replacement); content += "\n" + "# The maximum amount of heap to use for hbase shell.\n" + "export HBASE_SHELL_OPTS=\"-Xmx256m\"\n";
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 com.google.common.base.Strings; && !Strings.isNullOrEmpty(jobKey.getRole()) && !Strings.isNullOrEmpty(jobKey.getEnvironment()) && !Strings.isNullOrEmpty(jobKey.getName()); * Create a "/"-delimited String representation of a job key, suitable for logging but not * necessarily suitabl...
0
import org.apache.beam.sdk.options.ValueProvider.StaticValueProvider; new PubsubUnboundedSource<>( clock, factory, null, null, StaticValueProvider.of(SUBSCRIPTION), StringUtf8Coder.of(), TIMESTAMP_LABEL, ID_LABEL); StaticValueProvider.of(PubsubClient.projectPathFromId("my_pro...
0
wordCounts.apply(GroupByKey.create()).apply(Combine.groupedValues(Sum.ofLongs())); PCollectionList.of(wordCounts).and(wordCountsPlusOne).apply(Flatten.pCollections()); .apply(read.withoutMetadata()) .setCoder(stringKvCoder)
0
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull;
0
Copyright 2001-2003,2005 The Apache Software Foundation import org.apache.batik.bridge.svg12.DefaultXBLManager; import org.apache.batik.bridge.svg12.SVG12BridgeContext; import org.apache.batik.dom.events.AbstractEvent; import org.apache.batik.util.XMLConstants; ctx.xblManager = new DefaultXBLManager(d,...
1
* Copyright (C) 2015 Google Inc.
0
public static WatermarkCallbackExecutor create(ExecutorService executor) { return new WatermarkCallbackExecutor(executor); private WatermarkCallbackExecutor(ExecutorService executor) { this.executor = executor;
0
return new ScheduledTask()
0
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * *...
1
IScheduledTask f1 = makeTask(FINISHED, 100); IScheduledTask f2 = makeTask(FINISHED, 200); IScheduledTask f3 = makeTask(FINISHED, 300); IScheduledTask r1 = makeTask(RUNNING, 400); IScheduledTask r2 = makeTask(RUNNING, 500); IScheduledTask r3 = makeTask(RUNNING, 600); private IScheduledTask mak...
0
@Override @Override
0
case "KafkaSpout": { String topicName = config.get("KafkaSpout.kafkaSpoutConfig.translator.topic"); String uri = config.get("KafkaSpout.kafkaSpoutConfig.kafkaProps.bootstrap.servers"); if (StringUtils.isEmpty(topicName)) { topicName ...
0
int frameworkStartLevel; if (startBundles) { int startLevel = systemBundle.adapt(FrameworkStartLevel.class).getStartLevel(); boolean doStart = isStateChanged() || startLevel != frameworkStartLevel; frameworkStartLevel = startLevel; if (doStart) { ...
0
private volatile boolean persisted = false;
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
* Autogenerated by Thrift Compiler (0.11.0) @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
0
package org.apache.accumulo.shell;
0
import org.apache.beam.sdk.util.PropertyNames;
0
* @since 4.0
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/beans/Attic/DynamicPointerFactory.java,v 1.3 2002/07/03 21:12:36 dmitri Exp $ * $Revision: 1.3 $ * $Date: 2002/07/03 21:12:36 $ * @version $Revision: 1.3 $ $Date: 2002/07/03 21:1...
0
import java.util.Set; Set<String> propsToExclude = new HashSet<String>(); propsToExclude.add(propKey2); c.tableNamespaceOperations().clone(n1, n3, true, propsToSet, propsToExclude, true); assertTrue(!checkTableNamespaceHasProp(c, n3, propKey2, propVal3));
0
import org.apache.sshd.common.util.threads.ThreadUtils;
1
* @author <a href="mailto:tkormann@apache.org">Thierry Kormann</a>
0
String expectedResult = String inputData = expectedResult = expectedResult =
1
assertEquals("", FilenameUtils.getPath("/noseperator.inthispath")); assertEquals("", FilenameUtils.getPath("\\noseperator.inthispath")); assertEquals("", FilenameUtils.getPathNoEndSeparator("/noseperator.inthispath")); assertEquals("", FilenameUtils.getPathNoEndSeparator("\\noseperator.i...
0
* Copyright 2016 Seznam.cz, a.s.
0
ServerActionTask.class, ConfigureFunction.class, AddComponentTask.class, RegenerateKeytabsTask.class }) ADD_COMPONENT, /** * Create keytab regeneration steps as part of the upgrade. */ REGENERATE_KEYTABS; STOP, SERVICE_CHECK, REGENERATE_KEYTABS);
0
public class SoftRefFilesCacheTests extends AbstractFilesCacheTestsBase { public void testFilesCache() throws Exception { public void testClass() {
1
import org.apache.accumulo.core.client.ClientConfiguration; import org.apache.accumulo.core.client.security.tokens.AuthenticationToken; * <li>{@link AccumuloRowInputFormat#setConnectorInfo(Job, String, AuthenticationToken)} * <li>{@link AccumuloRowInputFormat#setZooKeeperInstance(Job, ClientConfiguration)}
0
import org.apache.hc.core5.http.EntityDetails; final EntityDetails entityDetails, final String contentType = entityDetails.getContentType();
0
/** * Gets the job's type identifier. May be {@code null} if not provided. * @return job type identifier */ String getJobType();
0
if (!Property.isValidPropertyKey(key) || !Property.isSensitive(key)) { Configuration conf = new Configuration(false);
0
public long getDataDirSize(); public long getLogDirSize(); public long getDataDirSize() { return provider.getDataDirSize(); } public long getLogDirSize() { return provider.getLogDirSize(); }
1
Copyright 2001 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 or...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/locale/converters/LongLocaleConverter.java,v 1.3 2003/01/15 21:59:44 rdonkin Exp $ * $Revision: 1.3 $ * $Date: 2003/01/15 21:59:44 $ * Copyright (c) 1999-2003 The Apache Software Fo...
0
instanceConfiguration.putAll(conf); dict.put("instance.name", name);
0
import org.apache.ambari.server.controller.MaintenanceStateHelper; * Used to calculate the maintenance state of new alerts being created. * Consider the case where you have disabled alerts for a component in MM. * This means that there are no current alerts in the system since disabling * them removes all c...
0
addOptions(properties);
0
MetadataTableUtil.addDeleteEntries(extent, datafiles, master); MetadataTableUtil.addDeleteEntries(extent, datafiles, master); MetadataTableUtil.addDeleteEntries(extent, datafiles, master); MetadataTableUtil.addTablet(new KeyExtent(extent.getTableId(), null, extent.getPrevEndRow()),...
1
public static final String CONTEXT_FACTORY = MockInitialContextFactory.class.getName();
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkNotNull; import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkState; import org.apache.beam.vendor.guava.v20_0.com.google.common.annotations.VisibleForTesting; import org.apache.beam.vendor.g...
0
final Map<String,Set<Text>> groups = shellState.getAccumuloClient().tableOperations()
0
import com.google.common.collect.Lists; import java.util.Arrays; import java.util.List;
0
import org.apache.beam.sdk.schemas.Schema.FieldType; FieldType.INT64, "order_id", FieldType.INT32, "site_id", FieldType.DOUBLE, "price" FieldType.INT64, "order_id", FieldType.INT32, "site_id", FieldType.DOUBLE, "price" FieldType.INT64, ...
0
* @param output The OutputStream to write to. * @see FileContent#write(OutputStream) final OutputStream output) file.getContent().write(output); * @see FileContent#write(FileContent) * @see FileContent#write(FileObject) srcFile.getContent().write(d...
0
* or more contributor license agreements. See the NOTICE file * regarding copyright ownership. The ASF licenses this file * with the License. You may obtain a copy of the License at * KIND, either express or implied. See the License for the
0
* @cocoon.sitemap.component.documentation * This action adds the <code>Last-Modified</code>, <code>Expires</code> and * <code>Cache-Control</code> HTTP headers to the response. *
0
private Long timestamp; this.timestamp = System.currentTimeMillis(); public Long getTimestamp() { return timestamp; } public void setTimestamp(Long timestamp) { this.timestamp = timestamp; } public SortedMap<String, ClusterConfigs> getClustersConfigs() { return clustersConfigs; }
0
/* Mask to convert unsigned int to a long (i.e. keep 32 bits) */ private static final long UNSIGNED_INT_MASK = 0x0FFFFFFFFL; * @throws RuntimeException if the correct count is greater than {@code Integer.MAX_VALUE} * @deprecated use {@link #getAddressCountLong()} instead */ ...
1
package org.apache.beam.runners.direct.portable; import org.apache.beam.runners.direct.DirectGraphs; import org.apache.beam.runners.direct.portable.DirectGroupByKey.DirectGroupByKeyOnly; /** Tests for {@link GroupByKeyOnlyEvaluatorFactory}. */ @Rule public TestPipeline p = TestPipeline.create().enableAbandonedNodeEnf...
0
token = new TypeToken<T>(getClass()) {}; TypeToken<T> unresolvedToken = new TypeToken<T>(getClass()) {};
0
* {@link #readLine(CharArrayBuffer)} method of this class treat a lone * LF as valid line delimiters in addition to CR-LF required
0
* 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
* 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.felix.dm.DependencyManager; import org.apache.felix.dm.annotation.api.Inject; import org.apache.felix.dm.annotation.api.Registered; import org.osgi.framework.BundleContext; // Check auto config injections @Inject BundleContext m_bc; BundleContext m_bcNotInjected; @Inject D...
0
* @version $Revision: 1.25 $ $Date: 2004/10/06 00:34:14 $ if (s1 == null) { return s2 == null || s2.trim().length() == 0; if (s2 == null) { return s1 == null || s1.trim().length() == 0;
0
* @version $Revision: 6542 $ * <li> {@link FrameworkEvent#WAIT_TIMEDOUT WAIT_TIMEDOUT} - This * method has timed out and returned before this Framework has * stopped.</li>
0
@NamedQuery(name = "AlertNoticeEntity.findAll", query = "SELECT notice FROM AlertNoticeEntity notice"), @NamedQuery(name = "AlertNoticeEntity.findByState", query = "SELECT notice FROM AlertNoticeEntity notice WHERE notice.notifyState = :notifyState"), @NamedQuery(name = "AlertNoticeEntity.findByUuid", query = "SE...
0