Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import org.apache.accumulo.core.client.mapreduce.lib.impl.InputConfigurator;
0
row = processor.toBean(this.rs, TestBean.class); row = processor.toBean(this.rs, TestBean.class); List<TestBean> list = processor.toBeanList(this.rs, TestBean.class); TestBean b = list.get(0); b = list.get(1); Map<String, Object> m = processor.toMap(this.rs);
0
assertEquals("TextIO.Write", NameUtils.approximatePTransformName(TextIO.Write.class));
0
import org.apache.hadoop.conf.Configuration; public void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) {
0
public static ClusterRequest clusterRequest(Long clusterId, String clusterName, String stackVersion, Set<String> hostNames) public ClusterRequestMatcher(Long clusterId, String clusterName, String stackVersion, Set<String> hostNames) {
0
import org.w3c.dom.DOMException; * Returns the CSS text associated with the given type/value pair. */ public static String getCssText(short unit, float value) { if (unit < 0 || unit >= UNITS.length) { throw new DOMException(DOMException.SYNTAX_ERR, ""); } String s = Str...
0
* Returns a filter that returns true if the file was last modified before * or at the specified cutoff time. * Returns a filter that returns true if the file was last modified before * or at the specified cutoff date. * Returns a filter that returns true if the file was last modified before ...
0
import net.jcip.annotations.NotThreadSafe; @NotThreadSafe
0
* nor may "Apache" appear in their name, without
0
* <p>To prevent losing actual type arguments due to erasure, create an anonymous subclass
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 org.apache.ambari.server.state.AlertState; protected static final String ALERT_REPEAT_TOLERANCE = "Alert/repeat_tolerance"; protected static final String ALERT_OCCURRENCES = "Alert/occurrences"; protected static final String ALERT_REPEAT_TOLERANCE_REMAINING = "Alert/repeat_tolerance_remaining"; PROPER...
0
* @version CVS $Id: NetUtils.java,v 1.4 2003/09/18 12:11:50 upayavira Exp $ /** * Remove any authorisation details from a URI */ public static String removeAuthorisation(String uri) { if (uri.indexOf("@")!=-1 && (uri.startsWith("ftp://") || uri.startsWith("http://"))) { return uri...
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
/** Runtime context for the Samza runner. */
1
* @version CVS $Id$ } for(Enumeration e = req.getParameterNames(); e.hasMoreElements(); ) { String name = (String)e.nextElement(); if (name.startsWith(Constants.ACTION_PARAM_PREFIX)) { if (name.endsWith(".x") || name.endsWith(".y")) { return n...
0
import org.apache.accumulo.core.data.TableId; throw new AcceptableThriftTableOperationException(tableInfo.tableID.canonical(), throw new AcceptableThriftTableOperationException(tableInfo.tableID.canonical(), throw new AcceptableThriftTableOperationException(tableInfo.tableID.canonical(), Table...
0
* Copyright (c) OSGi Alliance (2002, 2008). All Rights Reserved. * @version $Revision: 5673 $
0
// Since this test does not rely on the BookKeeper client needing to // know via ZooKeeper which Bookies are available, okay, so pass in null // for the zkServers input parameter when constructing the BookieServer. bs = new BookieServer(port, null, tmpDir, new File[] { tmpDir });
0
import static com.google.common.base.Charsets.UTF_8; out.append(new String(expression, root.start, root.end - root.start, UTF_8)); return builder.toString().getBytes(UTF_8); throw new BadArgumentException("operator or missing parens", new String(expression, UTF_8), index - 1); throw new B...
0
* @Deprecated public void setMaxStatusLineGarbage (final int maxStatusLineGarbage) {
0
import java.util.concurrent.ConcurrentHashMap; import org.apache.http.annotation.ThreadSafe; @ThreadSafe private final Map<String, Object> parameters = new ConcurrentHashMap<String, Object>(); if (name == null) { return this; } if (value != null) { this.parameters.put...
0
if(attributeDef.getOptions() != null) { attribInfo.put("options", AtlasType.toJson(attributeDef.getOptions())); } if(attribInfo.get("options") != null) { ret.setOptions(AtlasType.fromJson((String) attribInfo.get("options"), Map.class)); }
0
/* * Copyright (c) OSGi Alliance (2010, 2012). 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 re...
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.io.PrintWriter; import jline.Terminal; import org.apache.felix.karaf.shell.console.jline.TerminalFactory; Terminal terminal = null; terminal = new TerminalFactory().getTerminal(); ConsoleReader reader = new ConsoleReader(System.in, new PrintWriter(System.out), ...
0
import com.google.cloud.dataflow.sdk.transforms.windowing.GlobalWindow; counterSet.getAddCounterMutator(), new GlobalWindow());
0
@Override @Override @Override @Override @Override Thread thread=new Thread(this); thread.setDaemon(true); thread.start(); @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 may not u...
0
* http://www.apache.org/licenses/LICENSE-2.0
0
* <p> * transparent client-side caching. * </p> * <p> * The current implementation is conditionally * </p> * <p> * </p> * <p> * </p>
0
public String getType() { return m_type.getName(); } /** * Gets the handler managing the property. * @return the configuration handler. */ public Handler getHandler() { return m_handler; }
0
* * public class JavaScriptJXPathBindingBuilder extends JXPathBindingBuilderBase implements Contextualizable { public JXPathBindingBase buildBinding(Element element, Assistant assistant) throws BindingException { if (otherBinding != null) { ...
0
import org.apache.ambari.view.hive20.internal.dto.ColumnInfo; private final List<ColumnInfo> header; public TableDataReader(Iterator<Row> rowIterator, List<ColumnInfo> header, boolean encode) {
0
import org.apache.aurora.common.testing.easymock.EasyMockTest;
0
URI repositoryXml = ObrUtils.findRepositoryXml( mavenRepository, obrRepository ); URI bundleJar = ObrUtils.findBundleJar( localRepository, project.getArtifact() ); update = new ObrUpdate( repositoryXml, obrXml, project, bundleJar, mavenRepository, userConfig, log );
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//fileupload/src/java/org/apache/commons/fileupload/DefaultFileItem.java,v 1.16 2003/03/07 23:29:26 sullis Exp $ * $Revision: 1.16 $ * $Date: 2003/03/07 23:29:26 $ * Copyright (c) 2001-2003 The Apache Software Foundation. All righ...
0
keys = JobUpdates.saveUpdates( storage, new JobUpdates.Builder().setNumInstanceEvents(instances).build(1)); keys = JobUpdates.saveUpdates( storage, new JobUpdates.Builder().setNumInstanceOverrides(instanceOverrides).build(1));
0
/** * This interface specifies a {@link #convert(Object)} method that * returns an {@link InternalConverting} rather than a normal Converting * instance. */ interface InternalConverter extends Converter { /** * Start a conversion for the given object. This method overrides the * {@link Converter#conve...
0
return (T) convert(type.getType(), o); Class resultType = getRawClass(type); if (o == null) { if (resultType.isPrimitive()|| Number.class.isAssignableFrom(resultType)) return convert(type,0); } if (Map.class.isAssignableFrom(actualType) && resultType.isInterface()) { return proxy(resultType, (Ma...
0
dataConsumer.releaseResources();
0
if (value!=null) { if (((String) value).equals("??/??/??")) { setBackground(Color.white); } else{ setBackground((Color) eventName.get(state)); }
0
import java.util.Arrays; this.rows.addAll(buildRows(type, Arrays.asList(args))); return this; } /** * Add rows to the builder. * * <p>Note: check the class javadoc for for detailed example. */ public RowsBuilder addRows(final List args) { public static List<BeamSqlRow> bui...
0
return TableState.ONLINE == Tables.getTableState(conn.getInstance(), ID);
0
public void testUnrederedNodes() { ns.addMapping("a","http://a",node2); assertTrue(l.contains(node2)); assertFalse(l.contains(node2)); assertTrue(l.contains(node2));
0
byte otherValue = other != null ? other.byteValue() : 0; int value1 = prefix.byteValue() << offsetInBits; mask |= 0x1 << i;
0
* @version $Id: JexlTest.java,v 1.60 2004/09/01 00:35:38 dion Exp $ assertExpression(jc, "\"foo\" + \"bar\" == \"foobar\"", Boolean.TRUE); assertExpression(jc, "x.a", Boolean.TRUE); assertExpression(jc, "!x.a", Boolean.FALSE); assertExpression(jc, "!x.b", Boolean.TRUE); //asser...
0
import static org.junit.Assert.assertEquals; import java.util.Collections; import java.util.List; import com.google.inject.Guice; import com.google.inject.Inject; import com.google.inject.Injector; "cluster1", List<ExecutionCommandWrapper> executionCommands = stage.getExecutionCommands(null);
1
import java.util.Optional; import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.Stream; public Iterable<KeyPair> loadKeys() { return loadKeys(null); } protected Iterable<KeyPair> loadKeys(Predicate<KeyPair> filter) { return () -> { Stre...
0
import org.apache.hc.core5.reactor.DefaultListeningIOReactor; import org.apache.hc.core5.reactor.IOEventDispatch; import org.apache.hc.core5.reactor.IOReactorConfig; import org.apache.hc.core5.reactor.IOReactorException; import org.apache.hc.core5.reactor.IOReactorExceptionHandler; import org.apache.hc.core5.reactor.Li...
1
import org.apache.log4j.Logger; private static final Logger LOG = Logger.getLogger(QuorumPeer.class); LOG.error("Got more than just an xid! Len = " LOG.error("FIXMSG",e); LOG.error("QuorumPeer responder thread exited"); LOG.warn("LOOKING"...
0
import static org.junit.Assert.assertEquals; @Test public void testFireDeadline() throws Exception { assertEquals(BoundedWindow.TIMESTAMP_MAX_VALUE, AfterPane.elementCountAtLeast(1).getWatermarkCutoff( new IntervalWindow(new Instant(0), new Instant(10)))); }
0
import org.apache.accumulo.server.cli.ClientOpts;
0
package org.apache.accumulo.tserver.tablet;
0
if (key instanceof RSAPublicKey ) {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/DynaBean.java,v 1.8 2003/10/09 20:43:15 rdonkin Exp $ * $Revision: 1.8 $ * $Date: 2003/10/09 20:43:15 $ * Alternately, this acknowledgement may appear in the software itself, * ...
0
if (uri != null && !uri.isEmpty()) {
0
package com.google.cloud.dataflow.sdk.transforms.windowing; import org.joda.time.Instant; * {@code CompositeTrigger} performs much of the book-keeping necessary for implementing a trigger * that has multiple sub-triggers. Specifically, it includes support for passing events to the * sub-triggers, and tracking the f...
0
private final H1Config h1Config; public DefaultHttpRequestParserFactory( final H1Config h1Config, final HttpRequestFactory<HttpRequest> requestFactory, final LineParser lineParser) { this.h1Config = h1Config != null ? h1Config : H1Config.DEFAULT; public DefaultHtt...
0
this.headergroup.updateHeader(header); } public void setHeaders(final Header[] headers) { this.headergroup.setHeaders(headers);
0
import org.apache.beam.dsls.sql.BeamSqlCli; import org.apache.beam.dsls.sql.BeamSqlEnv; BeamSqlEnv.registerTable("ORDER_DETAILS", getOrderTable()); BeamSqlEnv.registerTable("ORDER_SUMMARY", getSummaryTable()); BeamSqlCli.compilePipeline(sql, pipeline); BeamSqlCli.compilePipeline(sql, pipeline);
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
* @deprecated (3.3) Use {@link FTPClient#_openDataConnection_(FTPCmd, String)} instead
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.Collections; import java.util.Map; import java.util.WeakHashMap; // global storage for all existing ListDataSources private static final Map<ListDataSource<?>, List<List<?>>> storage = Collections.synchronizedMap(new WeakHashMap<>()); return new ListDataSource<>(true, Arrays.asList(parti...
0
/** * Retrieve the list of global request handlers. * * @return a list of named <code>GlobalRequestHandler</code> */ List<GlobalRequestHandler> getGlobalRequestHandlers();
0
public List<PubsubSource<T>> split( // This reader has never been started and there was no call to #split; // create a single random subscription, which will be kept in the checkpoint.
0
import com.google.cloud.dataflow.sdk.util.common.worker.SourceFormat; public static SourceFormat.OperationRequest public static SourceFormat.OperationResponse public static SourceFormat.SourceSpec cloudSourceToSourceSpec( @Nullable SourceFormat.OperationRequest request) { @Nullable SourceFormat.Opera...
0
import com.google.gson.Gson; import java.util.Collections; import java.util.Map;
0
* @version CVS $Id: ValueChangedEvent.java,v 1.3 2004/02/11 09:27:55 antonio Exp $
0
protected byte[] workBuf = new byte[Math.max(DEFAULT_FILE_HANDLE_SIZE, Integer.BYTES)]; ValidateUtils.checkTrue(length >= (Integer.BYTES + 1 /* command */), "Bad length to read: %d", length); Buffer buffer = new ByteArrayBuffer(length + Integer.BYTES + Long.SIZE /* a bit extra */, fa...
0
public void testGetOptions() { CommandLine cmd = new CommandLine(); assertNotNull(cmd.getOptions()); assertEquals(0, cmd.getOptions().length); cmd.addOption(new Option("a", null)); cmd.addOption(new Option("b", null)); cmd.addOption(new Option("c", null)...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/decorators/Attic/TestTransformedSortedSet.java,v 1.5 2003/10/12 06:37:30 psteitz Exp $ import java.util.SortedSet; import org.apache.commons.collections.BulkTest; * @version $Revi...
0
/** * Indicates whether the current ambari server instance is the active instance. * If this property is missing, the value will be considered to be true. * If present, it should be explicitly set to "true" to set this as the active instance. * Any other value will be taken as a false. */ @Markdown(d...
0
Objects.equals(relationGuid, that.relationGuid) && return Objects.hash(categoryGuid, parentCategoryGuid, relationGuid, description);
0
* Whether or not the current document was transformed. */ protected boolean documentTransformed; /** documentTransformed = false; if (!documentTransformed) { computeTransform(); rotateAngle = 0; rotateCos = 1; previou...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/Script.java,v 1.10 2003/10/09 21:21:27 rdonkin Exp $ * $Revision: 1.10 $ * $Date: 2003/10/09 21:21:27 $ * any, must include the following acknowledgement: * Alternately, this acknowl...
0
import org.apache.xml.security.exceptions.XMLSecurityException; throw new XMLSecurityException(e);
0
public final V get( Class<?> key )
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList;
0
package org.apache.commons.net; * {@link org.apache.commons.net.DatagramSocketClient} * implementations.
0
* @version $Id$
1
m.add(m.createComponent().setImplementation(this).setInterface(Sequencer.class.getName(), props)); m.add(m.createComponent().setImplementation(this).setInterface(Sequencer.class.getName(), props));
0
for (@SuppressWarnings("unused") Entry<Key,Value> e : s) {}
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
.transform(path -> LocalResourceId.fromPath(path, isDirectory)) .transformAndConcat(matchResult -> { try { return matchResult.metadata(); } catch (IOException e) { throw new RuntimeException(e); } }) .transform(metadata -> ((LocalReso...
0
/** * Returns the KeyedCombineFn used by this Combine operation. */ public KeyedCombineFn<? super K, ? super VI, ?, VO> getFn() { return fn; }
0
package org.apache.beam.sdk.options; import org.apache.beam.sdk.runners.BlockingDataflowPipelineRunner;
0
* * * * @version CVS $Id: ContinuationsManagerImpl.java,v 1.10 2004/04/09 19:52:54 vgritsenko Exp $ int timeToLive, * wk.dispose(); private WebContinuation generateContinuation(Object kont, WebContinu...
0
package org.apache.zookeeper.server; * This class implements the ZooKeeper server MBean interface. private final Date startTime; private final String name; protected final ZooKeeperServer zks; public ZooKeeperServerBean(ZooKeeperServer zks) { startTime = new Date(); this.zks = zks;...
0
* @version $Id: JexlTest.java,v 1.45 2004/08/20 06:08:54 dion Exp $ assertExpression(jc, "empty nullthing", Boolean.TRUE); assertExpression(jc, "empty string", Boolean.TRUE); assertExpression(jc, "empty array", Boolean.TRUE); assertExpression(jc, "empty map", Boolean.TRUE); ass...
0
return new MapBackedSet<>(map, dummyValue);
1
return new DefaultHttpServerIODispatch(serviceHandler);
0
@Setup public void setup() throws Exception { TextMessage message = session.createTextMessage(value); producer.send(message); @Teardown public void teardown() throws Exception {
0
fbLength = 0;
0
"org/apache/batik/apps/svgbrowser/resources/svgbrowser.policy");
0
* Copyright 2003-2006 The Apache Software Foundation * A {@link java.util.Map.Entry Map.Entry} tied to a map underneath. * Compares this <code>Map.Entry</code> with another <code>Map.Entry</code>.
0
* * * /** private XMLOutput output; public JellyStylesheet() { setValueOfAction( public void run(Node node) throws Exception { ); } // Properties //------------------------------------------------------------------------- /** * Returns the output. ...
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
* 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