Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
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 m...
0
return doExecute(target, request, null);
0
import java.util.Enumeration; import java.util.Hashtable; /* * Used by custom handlers to keep and retrieve custom info. */ private Dictionary m_handlerInfoSlot = new Hashtable(); /** * Adds the HandlerInfo for specified handler. * @param handlerNs Handler's namespace * @p...
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 java.util.TreeMap; import org.apache.felix.http.base.internal.runtime.dto.FilterDTOBuilder; import org.osgi.service.http.runtime.dto.FailedFilterDTO; import org.osgi.service.http.runtime.dto.FilterDTO; import org.osgi.service.http.runtime.dto.ServletContextDTO; * The filter registry keeps track of all filter ma...
0
import static java.util.stream.Collectors.toList; import org.apache.beam.sdk.schemas.Schema; private final List<Schema.Field> columnList; public SqlCreateTable( SqlParserPos pos, boolean replace, boolean ifNotExists, SqlIdentifier name, List<Schema.Field> columnList, SqlNode type...
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
package org.apache.felix.karaf.gshell.console; import org.apache.felix.gogo.commands.Action; import org.osgi.service.command.CommandSession; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public abstract class OsgiCommandSupport implements Action, BundleContextAware { protected final Logger log = LoggerFa...
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
* * @since 4.0
0
import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; private final static Log LOG = LogFactory.getLog(SecurityFilter.class); //System.out.println("req url:" + reqUrl); LOG.info("doFilter: Incoming request " + reqUrl); if (isRequestAllowed(reqUrl)) { LOG.info("Requ...
0
* Copyright (c) 2001-2004 The Apache Software Foundation. All rights
0
package com.twitter.aurora.scheduler.base;
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 ...
0
public Long getLong(String key) { return (Long) stateMap.get(key); } }
0
public OpenFuture open(int recipient, long rwsize, long rmpsize, Buffer buffer) {
0
@SuppressWarnings("UnusedDeclaration")
0
private final MockConfigurationManager configMgr = new MockConfigurationManager() { boolean isActive() { return true; } };
0
this.logger.debug("..generating separate descs: " + this.options.isGenerateSeparateDescriptors()); final List<String> descriptorFiles = ComponentDescriptorIO.generateDescriptorFiles(module, this.options, logger); if ( descriptorFiles != null ) { result.setScrFiles(descriptorFiles);
0
* @version CVS $Id: SVGSerializer.java,v 1.9 2003/10/09 15:26:54 sylvain Exp $ value = parameters[i].getAttribute("value", "");
0
/** * @since 3.0
1
if (outgoing != null) { outgoing.produceOutput(); }
0
initialMetadataConf.put(Property.TABLE_SPLIT_THRESHOLD.getKey(), "64M");
0
import org.apache.aurora.scheduler.offers.HostOffer;
0
* Creates a <code>GraphicsNode</code> according to the specified parameters. * Creates a <code>GraphicsNode</code> from the input element and * populates the input <code>CompositeGraphicsNode</code> * Creates a <code>CompositeGraphicsNode</code>.
0
import com.twitter.common.stats.StatImpl; Stats.export(new StatImpl<Integer>("executor_restarts_pending") { @Override public Integer read() { return ExecutorTrackerImpl.this.restartQueue.size(); } });
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/ShortIterator.java,v 1.3 2003/11/07 17:24:13 rwaldhoff Exp $ * @version $Revision: 1.3 $ $Date: 2003/11/07 17:24:13 $ * @deprecated This code has been moved to J...
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
requestProperties.put("log_output", "false"); Assert.assertEquals("Expect log_output to be set", true, cParams.containsKey("log_output")); Assert.assertEquals("Expect log_output to be false", "false", cParams.get("log_output"));
0
.apply("FixedWindowsUser", Window.<KV<String, Integer>>into( FixedWindows.of(Duration.standardMinutes(options.getFixedWindowDuration())))) .apply("WindowIntoFixedWindows", Window.<GameActionInfo>into( FixedWindows.of(Duration.standardMinutes(options.getFixedWindowDuration())))) ...
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap;
0
.setDetails(buildInfo.getProperties());
0
public DerivedMultiKey(final T key1, final T key2) {
0
package org.apache.commons.digester3.annotations.utils;
1
package org.apache.ambari.resource.statemachine; public enum RoleState { INACTIVE, STARTING, ACTIVE, FAIL, STOPPING, UNCLEAN_STOP }
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
}, false, null); @Deprecated @Deprecated
1
Copyright 2001,2003-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
public void testEnsureCapacity() throws Exception { ByteArrayBuffer buffer = new ByteArrayBuffer(4); buffer.ensureCapacity(2); assertEquals(4, buffer.capacity()); buffer.ensureCapacity(8); assertEquals(8, buffer.capacity()); } public void testIndexOf() throws Except...
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.felix.bundlerepository.impl;
1
import com.google.common.collect.Iterables; import java.util.List; Iterable<List<WindowedValue<InputT>>> chunks = Iterables.partition(c.element().getValue(), 1000); for (Iterable<WindowedValue<InputT>> chunk : chunks) { // Process the chunk of elements. runner.processElements(chun...
0
import org.apache.sshd.common.util.ValidateUtils; protected synchronized void doWriteData(byte[] data, int off, long len) throws IOException { ValidateUtils.checkTrue(len <= Integer.MAX_VALUE, "Data length exceeds int boundaries: %d", len); serverSession.write(ByteArrayBuffer.getCompactClone(data, o...
0
import com.twitter.common.application.modules.LifecycleModule; import org.apache.aurora.scheduler.async.TaskHistoryPruner.HistoryPrunnerSettings; @CmdLine(name = "job_update_history_per_job_threshold", help = "Maximum number of completed job updates to retain in a job update history.") private static final A...
0
== PermissionEntity.AMBARI_ADMINISTRATOR_PERMISSION || == PermissionEntity.CLUSTER_ADMINISTRATOR_PERMISSION) {
0
String TAG_TREF = "tref";
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/ExtensionTest.java,v 1.2 2004/11/26 21:35:19 dgraham Exp $ * $Revision: 1.2 $ * $Date: 2004/11/26 21:35:19 $ // Load resources InputStream in = null; try { in = this.getCla...
0
* @version CVS $Id: EP_ValString.java,v 1.3 2003/09/05 07:31:40 cziegeler Exp $
0
char lastChar = str.charAt(str.length() - 1); if (lastChar == 'b') { log.warn("The 'b' in " + str + " is being considered as bytes. " + "Setting memory by bits is not supported"); } try { switch (Character.toUpperCase(lastChar)) { case 'G': multip...
0
final InspectableSourceMeta imeta = ((InspectableSourceMeta) meta);
0
if (finished == true || lastRowFound == null) else { finished = true; break; } private boolean finished = true; @Override public boolean hasTop() { return !finished && getSource().hasTop(); } finished = false;
0
// Check the include/exclude filters from the target package // to make sure that the class is actually visible. We delegate // to the exporting module, rather than its content, so it can // it can follow any internal wires it may have (e.g., if the // package...
1
static { org.apache.xml.security.Init.init(); }
0
import org.apache.http.nio.NHttpClientProtocolHandler; public class DefaultClientIODispatch extends AbstractIODispatch<DefaultNHttpClientConnection> { private final NHttpClientProtocolHandler handler; private final NHttpConnectionFactory<DefaultNHttpClientConnection> connFactory; ...
0
* @param encData Assumed to contain at least {@code key-type base64-data} * (anything beyond the BASE64 data is ignored) - ignored if {@code null}/empty
0
/** Program Counter (PC) corresponds to line */ private short start_pc; /** number in source file */ private short line_number; * * @param c the object to copy *
0
try (RecoveryLogsIterator rli = new RecoveryLogsIterator(fs, recoveryLogs, minKey(DEFINE_TABLET), maxKey(DEFINE_TABLET))) { return new AbstractMap.SimpleEntry<>(-1, Collections.<Path>emptyList());
0
// Process each element from the (input) iterator, which produces, zero, one or more // output elements (of type V) in the output iterator. Note that the output // collection (and iterator) is reset between each call to processElement, so the // collection only holds the output values fo...
0
* {@link PointsHandler}. * The {@link ListHandler} to pass newly created {@link SVGPointItem} * objects to. * Implements {@link PointsHandler#startPoints()}. * Implements {@link PointsHandler#point(float,float)}. * Implements {@link PointsHandler#endPoints()}.
0
KerberosDescriptor descriptor; descriptor = getKerberosDescriptor(commonServicesDirectory, "OOZIE", "4.0.0.2.0");
0
import org.apache.accumulo.core.client.Accumulo; try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) { try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) { try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) {
0
* @param content The buffer. void setContent(final byte[] content) this.content = content;
0
SortedKeyValueIterator<Key,Value> a = ColumnQualifierFilter.wrap(new SortedMapIterator(tm), hsc); a = ColumnQualifierFilter.wrap(new SortedMapIterator(tm), hsc); a = ColumnQualifierFilter.wrap(new SortedMapIterator(tm), hsc); SortedKeyValueIterator<Key,Value> a = VisibilityFilter.wrap(new SortedMapItera...
0
import java.util.Random; @Test public void testSpillingOverOutputStream() throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); // buffer will be size 12 BlockedOutputStream blockOut = new BlockedOutputStream(baos, 16, 16); Random r = new Random(22); byte[] under...
0
* Extension of {@link AbstractMapTest} for exercising the public class PredicatedMapTest<K, V> extends AbstractIterableMapTest<K, V> { public PredicatedMapTest(String testName) {
0
* any, must include the following acknowledgement: * Alternately, this acknowledgement may appear in the software itself, * if and wherever such third-party acknowledgements normally appear. * @version $Revision: 1.3 $ $Date: 2003/10/13 07:04:16 $
0
Collection<V> col = map.get(key); Collection<V> col = map.get(key); Collection<V> col = map.get(key);
0
package org.apache.beam.sdk.extensions.sql.interpreter.operator.arithmetic; import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlExpression;
0
import org.apache.beam.sdk.extensions.sql.schema.BeamSqlRecordType; import org.apache.beam.sdk.values.BeamRecord; public class BeamTextCSVTableIOWriter extends PTransform<PCollection<BeamRecord>, PDone> protected BeamSqlRecordType beamSqlRowType; public BeamTextCSVTableIOWriter(BeamSqlRecordType beamSqlRowType, Str...
0
public final class OsFamily { OsFamily(final String name) { OsFamily(final String name, final OsFamily[] families) { * public String getName() { * public OsFamily[] getFamilies() {
1
if ( adding.remove( item ) ) { /* * if the item is in the process of * being added */ if ( DEBUG ) { System.out.println( "AbstractTracked.untrack[being added]: " + ...
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
/** * Is the property mandatory? * Default: false */ boolean mandatory() default false;
0
Map<String, String> updates = new HashMap<>(); Map<String, String> newStormProps = new HashMap<>(); Map<String, String> updates = new HashMap<>();
1
* * @deprecated (4.3) use {@link HttpCoreConfigBuilder} @Deprecated
0
VarLongCoder.of().encode(value.getIndexOffset(), outStream); VarLongCoder.of().decode(inStream));
0
pw.println( "<div id='plugin_content'/>");
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
* <p> * If there is the need to clean up resources at the end of the request, the * method {@link #finishSecurity(HttpServletRequest, HttpServletResponse)} * can be implemented. That method is only called if this method returns {@code true}. * * the Http Whiteboard implementation will terminat...
0
return (Map.class.isAssignableFrom(type)); // it's another class return ((Class<?>) in.readObject());
0
import org.apache.beam.vendor.grpc.v1p21p0.com.google.protobuf.ByteString; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.io.ByteStreams;
0
return new Long(l & r); return new Long(~l); return new Long(l | r); return new Long(l ^ r); return new Double(0.0); return new Double(0.0); return Integer.valueOf(sizeOf(node, val)); return Integer.valueOf(sizeOf(node, data...
0
/* * Copyright 2003-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
/** * Create a new JXPathInvalidSyntaxException. * @param message relevant message */
0
update.updateRepository( bundleJar, null, null );
0
Map<String, String> objectId1 = new HashMap<>(); Map<Object, Object> objectId2 = new HashMap<>(); Map<Object, Object> objectId3 = new HashMap<>(); Map<Object, Object> objectId4 = new HashMap<>(); Map<Object, Object> objectId5 = new HashMap<>(); List<String> messages = new...
0
BundleWiring scrWiring = bundle.adapt(BundleWiring.class); List<BundleWire> extenderWires = scrWiring.getRequiredWires(ExtenderNamespace.EXTENDER_NAMESPACE); boolean wired = false; for (BundleWire wire: extenderWires) if (ComponentConstants.COMPONENT_CAPABILITY_NAME.equals(wi...
0
import org.apache.batik.dom.util.DoublyIndexedTable; import org.apache.batik.util.SVGTypes; // /** // * Table mapping XML attribute names to TraitInformation objects. // */ // protected static DoublyIndexedTable xmlTraitInformation; // static { // DoublyIndexedTable t = new DoublyIndexedTa...
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
* Copyright (c) 2002, 2003 The Apache Software Foundation. All rights * @version $Revision: 1.5 $ $Date: 2003/02/12 07:56:19 $
0
import com.google.common.annotations.VisibleForTesting; @VisibleForTesting public class MemKey extends Key { private int kvCount; public int getKVCount() { return this.kvCount; }
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
/** * 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
import org.apache.ambari.server.configuration.Configuration; Configuration config = Mockito.mock(Configuration.class); Mockito.when(config.getRollingUpgradeMinStack()).thenReturn("HDP-2.2"); Mockito.when(config.getRollingUpgradeMaxStack()).thenReturn(""); m_check.config = config;
0
import java.nio.charset.StandardCharsets; BufferedReader in = new BufferedReader(new InputStreamReader(failFile, StandardCharsets.UTF_8)); bifCopyQueue.addWork(orig.getName(), (failure + "," + dest).getBytes(StandardCharsets.UTF_8)); BufferedWriter out = new BufferedWriter(new OutputStreamWriter(failFil...
0
import org.junit.Assert; import org.junit.Test; public class TestRfc3492Idn { @Test Assert.assertEquals("\u0644\u064A\u0647\u0645\u0627\u0628\u062A\u0643\u0644" + Assert.assertEquals("\u4ED6\u4EEC\u4E3A\u4EC0\u4E48\u4E0D\u8BF4\u4E2D\u6587", Assert.assertEquals("\u043F\u043E\u0447\u0435\u043C...
0
* @version $Revision$
1
import org.apache.http.util.Asserts; Asserts.check(!this.completed, "Encoding process already completed");
0
* FileFilter fileFilter = new RegexFileFilter("^.*[tT]est(-\\d+)?\\.java$"); public class RegexFileFilter extends AbstractFileFilter { public RegexFileFilter(String pattern) { public RegexFileFilter(String pattern, IOCase caseSensitivity) { public RegexFileFilter(String pattern, int flags) { public Reg...
0
private final Map<String, ConfigurationProvider> providers;
0