Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
/** * {@inheritDoc} * <p> * This implementation iterates over the elements of this list, checking each element in * turn to see if it's contained in <code>coll</code>. If it's contained, it's removed * from this list. As a consequence, it is advised to use a collection type for * <cod...
0
CreateUpdateEntitiesResult creationResult = metadataService.createEntities(entitiesJson.toString()); Map<String,String> guidMap = creationResult.getGuidMapping().getGuidAssignments(); Map<Id, Referenceable> referencedObjects = findReferencedObjects(entity);
0
* Copyright (c) OSGi Alliance (2000, 2012). All Rights Reserved. * An {@code InvalidSyntaxException} object indicates that a filter string * parameter has an invalid syntax and cannot be parsed. See {@link Filter} for * a description of the filter string syntax. * @version $Id: 8820ca2db85b557cef8da09ee861249dfb5e...
0
import org.apache.commons.jelly.JellyTagException; public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { throw new JellyTagException( "This tag must be nested within an Ant task tag" );
0
import org.apache.http.params.BasicHttpParams; HttpParams params = new BasicHttpParams();
0
MouseEvent mevent = (MouseEvent) ((DocumentEvent)elmt.getOwnerDocument()).createEvent("MouseEvents");
1
/** * 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 agreed to in writing, software * distribu...
0
if ( configurationManager.isLogEnabled( LogService.LOG_DEBUG ) ) { configurationManager.log( LogService.LOG_DEBUG, "Running task " + task, null ); } if ( configurationManager.isLogEnabled( LogService.LOG_DEBUG ) ) { ...
0
import org.apache.beam.sdk.values.WindowingStrategy;
0
if (commandCount <= i || i < 0) { // don't allow redoing this redo
0
* @param dStart gradient start point, in user space * @param dEnd gradient end point, in user space
1
import static org.easymock.EasyMock.createNiceMock; import static org.easymock.EasyMock.createStrictMock; import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.replay; import static org.easymock.EasyMock.verify; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assert...
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
* <pre><code> * </code></pre>
0
import org.apache.beam.runners.direct.DirectGroupByKey.DirectGroupAlsoByWindow; import org.apache.beam.runners.direct.DirectGroupByKey.DirectGroupByKeyOnly; import org.apache.beam.sdk.util.WindowingStrategy; import org.apache.beam.sdk.values.TupleTag; import org.apache.beam.sdk.values.TupleTagList; p ...
0
if (Files.isDirectory(child)) { } else if (Files.isRegularFile(child)) { if (Files.isRegularFile(child)) {
0
BufferedImage img = createImage(w, h); * Creates a new image of the specified dimension. * @param w the width of the image * @param h the height of the image */ public abstract BufferedImage createImage(int w, int h); /**
0
* @see "<a href='http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1'>Chapter 17.13.4 'Form content types'</a>"
0
import org.apache.accumulo.core.Constants; byte[] bytes = output.getBytes(Constants.UTF8); byte[] len = String.format("%6s#", Integer.toString(bytes.length, 36)).getBytes(Constants.UTF8); String strLen = new String(len, Constants.UTF8); String strFields = new String(bytes, Constants.UTF8);
0
final String requestURI = UriUtils.concat(this.requestInfo.servletPath, this.requestInfo.pathInfo); final String requestURI = UriUtils.concat(this.requestInfo.servletPath, this.requestInfo.pathInfo);
0
label = label + "[" + listener.getCreatedDirectories().size() + " " + listener.getChangedDirectories().size() + " " + listener.getDeletedDirectories().size() + " " + listener.getCreatedFiles().size() + " " + listener...
0
import org.apache.ambari.view.pig.utils.BadRequestFormattedException; import org.apache.ambari.view.pig.utils.NotFoundFormattedException; import org.junit.rules.ExpectedException; @Rule public ExpectedException thrown = ExpectedException.none(); thrown.expect(NotFoundFormattedException.class); scriptSer...
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 applic...
0
import java.nio.charset.StandardCharsets; Scanner file = new Scanner(new File(filename), StandardCharsets.UTF_8.name()); result.add(decode ? new Text(Base64.decodeBase64(line.getBytes(StandardCharsets.UTF_8))) : new Text(line));
0
* Copyright (C) 2015 Google Inc.
0
/** Table schema for KafkaIO. */
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/adapters/Attic/TestAll.java,v 1.9 2003/04/16 18:32:38 rwaldhoff Exp $ * @version $Revision: 1.9 $ $Date: 2003/04/16 18:32:38 $ suite.addTest(TestCollectionCharC...
0
svg12Factories.put(SVG12Constants.SVG_HANDLER_TAG, new HandlerElementFactory()); /** * To create a 'handler' element. */ protected static class HandlerElementFactory implements ElementFactory { public HandlerElementFactory() { } /**...
0
public long expirationTime(final Integer key, final String value) { public PassiveExpiringMapTest(final String testName) { final Map<Integer, String> m = new HashMap<Integer, String>(); final Map<Integer, String> m = new PassiveExpiringMap<Integer, String>( final Map<String, Stri...
0
/* * $HeadURL$ * $Revision$ * $Date$ * ==================================================================== * 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 ow...
0
package org.apache.sshd.client.auth;
0
import com.google.api.client.util.BackOff; import com.google.api.client.util.BackOffUtils; import com.google.api.client.util.Sleeper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger LOG = LoggerFactory.getLogger(BigQueryTableRowIterator.class); // The maximum number of times a B...
0
import static org.ow2.chameleon.testing.tinybundles.ipojo.IPOJOBuilder.withiPOJO; import org.ow2.chameleon.testing.helpers.IPOJOHelper; import org.ow2.chameleon.testing.helpers.OSGiHelper; mavenBundle().groupId( "org.apache.felix" ).artifactId( "org.apache.felix.log" ).version(asInProject()),...
0
@Deprecated @Deprecated
0
import java.util.stream.Collectors; public static List<FieldValueTypeInformation> sortBySchema( List<FieldValueTypeInformation> types, Schema schema) { Map<String, FieldValueTypeInformation> typeMap = types .stream() .collect(Collectors.toMap(FieldValueTypeInformation::getNam...
0
import org.apache.http.client.methods.HttpRequestWrapper; private final boolean allowHeadResponseCaching; this.allowHeadResponseCaching = config.isHeadResponseCachingEnabled(); new CacheInvalidator(uriExtractor, storage, config.isHeadResponseCachingEnabled())); if (resource == null) ...
0
package org.w3c.dom.svg; public interface SVGLocatable { public SVGElement getNearestViewportElement( ); public SVGElement getFarthestViewportElement( ); public SVGRect getBBox ( ); public SVGMatrix getCTM ( ); public SVGMatrix getScreenCTM ( ); public SVGMatrix getTransfor...
0
import org.apache.sshd.util.EchoShell; sshd = Utils.setupTestServer(); client = Utils.setupTestClient(); TestEchoShell.latch = new CountDownLatch(1); TestEchoShell.latch.await(); TestEchoShell.latch = null; } public static class TestEchoShell extends EchoShell...
0
import java.io.Serializable; import org.apache.beam.sdk.util.SerializableUtils; public static <InT, OutT extends Serializable> SerializableFunction<InT, OutT> clonesOf( final OutT base) { return new SerializableFunction<InT, OutT>() { @Override public OutT apply(InT input) { return Seria...
0
* Returns the bounding box of the specified glyph, considering only the * glyph's metrics (ascent, descent, advance) rather than the actual glyph * shape. */ public Rectangle2D getGlyphCellBounds(int glyphIndex) { return getGlyphLogicalBounds(glyphIndex).getBounds2D(); } /**
0
import java.util.*; import javax.servlet.*; import org.apache.felix.webconsole.*; import org.apache.felix.webconsole.internal.*; import org.osgi.framework.*;
0
@Override @Override @Override
0
import org.apache.xml.security.utils.XMLUtils; _builder = XMLUtils.createDocumentBuilder(false);
0
import org.apache.http.impl.io.HttpTransportMetricsImpl; import org.apache.http.impl.nio.reactor.SessionOutputBuffer; public LengthDelimitedEncoder( final WritableByteChannel channel, final SessionOutputBuffer buffer, final HttpTransportMetricsImpl metrics, long con...
0
package org.apache.commons.dbcp2;
1
depth = Integer.MAX_VALUE;
0
InputT, WindowInT, KeyInT, K, OutputT, OperatorT extends StateAwareWindowWiseSingleInputOperator<InputT, WindowInT, KeyInT, K, OutputT, W, OperatorT>> extends StateAwareWindowWiseOperator<InputT, WindowInT, KeyInT, K, OutputT, W, OperatorT> { protected final Dataset...
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
} else if (context.window().maxTimestamp().isBefore(inputWM)) { if (eowHold.isBefore(inputWM)) { Preconditions.checkState(!gcHold.isBefore(inputWM),
0
* Copyright (c) 2004 The Apache Software Foundation. All rights
0
import org.apache.commons.beanutils.expression.Resolver; * @see Resolver * * @deprecated The notation used for property name expressions is now * dependant on the {@link Resolver} implementation being used. * * @deprecated The notation used for property name expressions is now * dependant...
0
import org.apache.cocoon.util.log.DeprecationLogger; // Get the "command" attribute String actionCommand = DomHelper.getAttribute(widgetElement, "command", null); // If unspecified, check the deprecated "action-command" deprecated attribute if (actionCommand == null) { ...
0
import java.util.NavigableMap; public static final Set<PtyMode> MODES = Collections.unmodifiableSet(EnumSet.allOf(PtyMode.class)); private static final NavigableMap<Integer, PtyMode> COMMANDS = Collections.unmodifiableNavigableMap( GenericUtils.toSortedMap(MODES, PtyMode::toInt, Func...
0
DoFnOperator<InputT, OutputT> createDoFnOperator( DoFnOperator<InputT, OutputT> doFnOperator = DoFnOperator<InputT, OutputT> doFnOperator = public DoFnOperator<InputT, OutputT> createDoFnOperator( OutputT> createDoFnOperator(
0
final boolean release = obtainReadLock(); if ( release ) { releaseReadLock(); } final boolean release = obtainReadLock(); if ( release ) { releaseReadLock(); }
0
implements ImageOperation { private String prefix; private boolean enabled; private float shearX; private float shearY; public void setPrefix( String prefix ) { this.prefix = prefix; public void setup( Parameters params ) { enabled = params.getParameterAsBoolean( prefi...
0
// version 0 of the uberSpect is an illusion due to order of construction; no need to clear cache if (version > 0) { script.clearCache(); } return execute(context);
0
* public class WebdavFileNameParser extends HttpFileNameParser { public WebdavFileNameParser() { public static FileNameParser getInstance() {
1
final CacheTestSuite suite = new CacheTestSuite(new NullFilesCacheTestCase());
1
import org.apache.accumulo.examples.wikisearch.ingest.WikipediaInputFormat; import org.apache.accumulo.examples.wikisearch.ingest.WikipediaInputFormat.WikipediaInputSplit; conf.set(WikipediaConfiguration.NUM_GROUPS, "1"); WikipediaInputSplit split = new WikipediaInputSplit(new FileSplit(tmpFile, 0, fs.pathToFil...
0
import org.apache.accumulo.server.fs.VolumeChooserEnvironmentImpl; VolumeChooserEnvironment chooserEnv = new VolumeChooserEnvironmentImpl(tableInfo.tableId, endRow, master.getContext());
0
import org.apache.hc.core5.annotation.NotThreadSafe; import org.apache.hc.core5.util.Args;
1
* @throws IllegalArgumentException * @throws IllegalArgumentException
0
import org.apache.http.client.AuthState;
0
public Mname(SchedulerCore scheduler) {
0
import com.twitter.common.zookeeper.testing.ZooKeeperTestServer; ZooKeeperTestServer zooKeeperServer = new ZooKeeperTestServer(0, shutdownRegistry); zooKeeperServer.startNetwork(); LOG.info("Embedded zookeeper cluster started on port " + zooKeeperServer.getPort()); return zooKeeperServer.createClient(zo...
0
zkAdmin.reconfigure(joiners, null, null, -1, new Stat());
0
import org.apache.atlas.repository.store.graph.v2.AtlasEntityChangeNotifier; import org.apache.atlas.repository.store.graph.v2.AtlasGraphUtilsV2; List<String> glossaryGuids = AtlasGraphUtilsV2.findEntityGUIDsByType(GlossaryUtils.ATLAS_GLOSSARY_TYPENAME, sortOrder); AtlasVertex vertex = AtlasGraph...
1
import javax.xml.parsers.ParserConfigurationException; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.InvalidCanonicalizerException; import org.apache.xml.security.c14n.implementations.Canonicalizer20010315ExclOmitComments; import org.apache.xml.security.signature.X...
0
* @version $Id$
0
/** * Initialize the form by recursively initializing all its children. Any events occuring within the * initialization phase are buffered and fired after initialization is complete, so that any action * from a widget on another one occurs after that other widget has been given the opportunity t...
0
import org.apache.accumulo.fate.zookeeper.ZooReader; DistributedTrace.enable(instance, new ZooReader(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut()), "shell", InetAddress.getLocalHost() .getHostName());
1
import org.ops4j.pax.exam.junit.PaxExam; @RunWith(PaxExam.class)
0
import org.apache.accumulo.core.util.TableDiskUsage.Printer; public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws IOException, TableNotFoundException { TableDiskUsage.printDiskUsage(acuConf, tablesToFlush, FileSystem.get(new Configuration()), shellState.getConnector(...
0
private static final Map<String, String> configTagVersion2Properties = new HashMap<String, String>() { { put("hive.server2.thrift.port", "10010"); } }; }).times(3); expect(configHelper.getEffectiveDesiredTags(EasyMock.anyObject(Cluster.class), EasyMock.eq("h1"))).andReturn(new HashMap<String...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//cli/src/java/org/apache/commons/cli/BasicParser.java,v 1.5 2003/10/09 20:57:01 rdonkin Exp $ * $Revision: 1.5 $ * $Date: 2003/10/09 20:57:01 $ * any, must include the following acknowledgement: * Alternately, this acknowle...
0
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * v...
0
import org.apache.beam.sdk.values.Row; @Override public BeamSqlPrimitive evaluate(Row inputRow, BoundedWindow window) {
0
* @version $Revision$
0
private final WatermarkPolicyFactory watermarkPolicyFactory; WatermarkPolicyFactory watermarkPolicyFactory, watermarkPolicyFactory, WatermarkPolicyFactory watermarkPolicyFactory, this.watermarkPolicyFactory = watermarkPolicyFactory; watermarkPolicyFactory, watermarkPolicy...
0
* * natural order, as per {@link java.util.Collections#reverseOrder()}. * * * * Returns <code>true</code> iff <i>that</i> Object is * is a {@link Comparator} whose ordering is known to be * equals <code>this.getClass()</code>, and the underlying *
0
import org.junit.jupiter.api.BeforeEach; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; @BeforeEach @org.junit.jupiter.a...
0
package org.apache.commons.vfs2; * @throws org.apache.commons.vfs2.FileSystemException * @see org.apache.commons.vfs2.FileContent#getAttribute
1
Thread.sleep(Math.min(timeRemaining, 500));
0
package org.apache.beam.sdk.runners.inprocess; import org.apache.beam.sdk.Pipeline.PipelineVisitor; import org.apache.beam.sdk.runners.TransformTreeNode; import org.apache.beam.sdk.transforms.GroupByKey; import org.apache.beam.sdk.transforms.PTransform; import org.apache.beam.sdk.values.PValue;
0
import org.apache.beam.sdk.transforms.DoFn.ProcessContinuation; /** Whether this {@link DoFn} returns a {@link ProcessContinuation} or void. */ public abstract boolean hasReturnValue(); @Nullable TypeDescriptor<? extends BoundedWindow> windowT, boolean hasReturnValue) { windowT, ...
0
@Override public void testDefaultPrecision() { testPrecision("-rw-r--r-- 78440 49231 127671 Jul 22 2010 Filename with whitespace.jpg", CalendarUnit.DAY_OF_MONTH); } @Override public void testRecentPrecision() { testPrecision("-rw-r--r-- 78440 49231 127671 Jul ...
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
* @version $Id$
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 ...
0
import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.Point2D;
0
import org.apache.http.impl.conn.PoolingClientConnectionManager; PoolingClientConnectionManager cm = new PoolingClientConnectionManager();
0
import com.google.cloud.dataflow.sdk.options.PipelineOptions; import com.google.cloud.dataflow.sdk.util.BatchModeExecutionContext; import org.junit.Before; private PipelineOptions options; @Before public void setUp() { options = PipelineOptionsFactory.create(); } options, BatchMode...
0
for (Entry<Object, Object> entry : src.entrySet())
0
IOChannelUtils.registerIOFactoriesAllowOverride(options); IOChannelUtils.registerIOFactoriesAllowOverride(options); IOChannelUtils.registerIOFactoriesAllowOverride(options);
0
NumberType<Long> filesPendingFormat = new NumberType<>(Long.valueOf(0), Long.valueOf(2 * totalWorkQueueSize), Long.valueOf(0),
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//fileupload/src/java/org/apache/commons/fileupload/FileUpload.java,v 1.22 2003/06/01 17:33:24 martinc Exp $ * $Revision: 1.22 $ * $Date: 2003/06/01 17:33:24 $ * @version $Id: FileUpload.java,v 1.22 2003/06/01 17:33:24 martinc Exp ...
0
/** * The {@code getNull} string prefix. * @since 1.4 */ private static final String GET_NULL_PREFIX = "getNull"; if (methodName.startsWith(GET_NULL_PREFIX)) { String normalName = "get" + methodName.substring(GET_NULL_PREFIX.length());
0
package org.apache.accumulo.tserver;
1
@SuppressWarnings({"unchecked", "serial", "rawtypes", "unused"}) public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fields>, java.io.Serializable, Cloneable, Comparable<GCStatus> { public enum _Fields implements org.apache.thrift.TFieldIdEnum {
0