Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import static org.testng.Assert.assertEquals; //API should accept single entity (or jsonarray of entities) public void testEntityDeduping() throws Exception { Referenceable db = new Referenceable(DATABASE_TYPE); String dbName = "db" + randomString(); db.set("name", dbName); db.s...
0
private List<String> hosts = new ArrayList<>();
0
import org.apache.atlas.model.impexp.AtlasExportRequest; import org.apache.atlas.model.typedef.AtlasClassificationDef; import org.apache.atlas.model.typedef.AtlasEntityDef; import org.apache.atlas.model.typedef.AtlasEnumDef; import org.apache.atlas.model.typedef.AtlasStructDef; import org.apache.atlas.utils.TestResourc...
0
* Check how short date is interpreted at a given time. * Check both with and without lenient future dates checkShortParse(msg, now, input, true); * Check only using specified lenient future dates setting parser.setLenientFutureDates(lenient); public void testParseJan01() throws Except...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/FileUtilsTestCase.java,v 1.9 2003/12/30 07:00:03 bayard Exp $ * $Revision: 1.9 $ * $Date: 2003/12/30 07:00:03 $ * @version $Id: FileUtilsTestCase.java,v 1.9 2003/12/30 07:00:03 bayard Exp $ publi...
0
import org.apache.hadoop.metrics2.MetricType; timelineMetricsCache.putTimelineMetric(metric, MetricType.COUNTER); timelineMetricsCache.putTimelineMetric(metric, MetricType.COUNTER); timelineMetricsCache.putTimelineMetric(metric, MetricType.COUNTER); timelineMetricsCache.putTimelineMetric(metric, MetricT...
0
if (propagateTags != null && propagateTags && classification.getEntityGuid() != null && !StringUtils.equals(classification.getEntityGuid(), guid)) { continue; } if (classification.getEntityGuid() == null...
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.io.BaseEncoding;
0
Map<Resource.Type,String> mapIds = new HashMap<>();
1
public Iterator getKeys(String prefix) return new PrefixedKeysIterator(getKeys(), prefix);
0
* @version $Revision$
0
@Override
0
PropertyMetaData[] metadata() default {};
0
private static final String SERVICE_COMPONENT = "Service-Component"; private String serviceComponent; if ( getServiceComponent() != null ) { entries.put( SERVICE_COMPONENT, getServiceComponent() ); } public String getServiceComponent() { return serviceCompon...
0
* <p> * Unit tests that exercise the new (in 1.8) methods for passing in <code>URL</code> arguments instead of strings. * </p> public class URLTestCase { public void setUp() { public void tearDown() { * <p> * Public identifier of the Digester Rules DTD. * </p> private static final ...
1
* @revision $Revision: 1.2 $ $Date: 2001/09/05 03:33:26 $ * @param identifier Used to tell which TestRule is which /** * Constructor sets namespace URI. * * @param digester The digester with which this rule is associated * @param identifier Used to tell which TestRule is which * @par...
0
* <li>{@code resourceId.resolve("*", StandardResolveOptions.RESOLVE_FILE)} returns a {@code * ResourceId} which matches all files in this {@code ResourceId}. * <li>{@code resourceId.resolve("*", StandardResolveOptions.RESOLVE_DIRECTORY)} returns a * {@code ResourceId} which matches all direc...
0
Map<String,Set<Text>> groups = new TreeMap<>(); Map<String,Set<Text>> groups = new TreeMap<>(); Set<Text> cols = new HashSet<>();
1
import org.apache.atlas.model.TypeCategory; private final TypeCategory category; protected AtlasBaseTypeDef(TypeCategory category, String name, String description, String typeVersion) { this.category = category; protected AtlasBaseTypeDef(AtlasBaseTypeDef other) { this.category = other....
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
@Deprecated
0
.setIsService(true) .setIsService(true)
0
import org.apache.commons.lang.NumberUtils; return NumberUtils.createNumber(str);
0
import org.apache.accumulo.core.security.Credentials; public MultiTableBatchWriterImpl(Instance instance, Credentials credentials, BatchWriterConfig config) { @Override @Override
0
.withName( element.getName() );
0
/* $Id$
0
import org.apache.avalon.framework.container.ContainerUtil; protected LibraryManager libraryManager; this.libraryManager = new LibraryManagerImpl(); /** * @see org.apache.avalon.framework.logger.AbstractLogEnabled#enableLogging(org.apache.avalon.framework.logger.Logger) */ ContainerUti...
0
public ByteSequence getTerm(byte[] expression) {
0
public enum ClusterStateFSM {
0
final String fileString = file.toString(); Assert.assertEquals(fileString, TEST_DATA.length(), ra.length()); Assert.assertEquals(fileString, 1, ra.length()); Assert.assertEquals(fileString, ra.readByte(), TEST_DATA.charAt(0)); Assert.assertEquals(fileString, 2...
0
import org.apache.cocoon.core.container.spring.avalon.ComponentInfo; import org.apache.cocoon.core.container.spring.avalon.ConfigurationInfo; * @see org.apache.cocoon.CocoonTestCase#addComponents(org.apache.cocoon.core.container.spring.avalon.ConfigurationInfo)
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
package org.apache.felix.karaf.features; import java.util.EventObject; public class FeatureEvent extends EventObject { public static enum EventType { FeatureInstalled, FeatureUninstalled } private final EventType type; private final Feature feature; private final boolean replay; ...
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 org.apache.batik.dom.anim.AnimatableElement;
0
File repository = new File(System.getProperty("java.io.tmpdir"), "file"); File repository = new File(System.getProperty("java.io.tmpdir"), "\0");
0
app.setTypeId(value.toUpperCase() + "-" + app.getAppVersion()); app.setTypeId(app.getType() + "-" + value); app.setTypeId(appType.getId()); appType.setId(application.getName() + "-" + application.getVersion()); final String appTypeId = json.get("typeName").getAsSt...
0
// work from sufficiently privilages code. // search through all methods
0
package org.apache.felix.inventory.impl.webconsole;
0
import static org.junit.Assert.fail; }
0
String message = "sideOutput is an unsupported operation for doFunctions, use a " + "MultiDoFunction instead."; "sideOutputWithTimestamp is an unsupported operation for doFunctions, use a " + "MultiDoFunction instead.";
0
* a different <code>ServiceManager</code>.
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
* @since 1.8.0 * @since 1.8.0 * @since 1.8.0 * @since 1.8.0
0
boolean isZKServerRunning() { return zkServer == null || !zkServer.isRunning(); }
1
import org.apache.hc.core5.http.ssl.TLS; import org.apache.hc.core5.http.ssl.TlsCiphers; sslParameters.setProtocols(TLS.excludeWeak(sslParameters.getProtocols())); sslParameters.setCipherSuites(TlsCiphers.excludeH2Blacklisted(sslParameters.getCipherSuites()));
0
public interface FieldValueSetterFactory extends Factory<List<FieldValueSetter>> { @Override List<FieldValueSetter> create(Class<?> targetClass, Schema schema);
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...
0
try (BatchWriter bw = c.createBatchWriter(tableName)) { bw.addMutation(m); }
0
content = new DefaultFileContent(this, getFileContentInfoFactory()); protected FileContentInfoFactory getFileContentInfoFactory() return getFileSystem().getFileSystemManager().getFileContentInfoFactory();
0
* $Revision: 1.11 $ * $Date: 2003/10/09 21:04:44 $ * Alternately, this acknowledgement may appear in the software itself, * if and wherever such third-party acknowledgements normally appear. * permission of the Apache Software Foundation. * @version $Id: PoolingDataSource.java,v 1.11 2003/10/09 21:04:44 ...
0
final boolean removed = Runtime.getRuntime().removeShutdownHook( } catch (final InterruptedException ie) { final boolean processRemoved = processes.removeElement(process); final Enumeration e = processes.elements(); final Process process = (Process) e.nextElement(); ...
0
private Comparators(){ // constructor hiden from potential users }
0
private JobConfiguration fetchJob(String managerId, String jobKey) {
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument; import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Joiner;
0
import org.apache.beam.sdk.annotations.Experimental; import org.apache.beam.sdk.transforms.SerializableFunction; import org.apache.beam.sdk.values.Row; @Experimental /** * Given atype, return a function that converts that type to a {@link Row} object. */ public abstract <T> SerializableFunction<T, Row> toRow...
0
/* * $Header: /cvshome/build/ee.foundation/src/java/io/BufferedReader.java,v 1.6 2006/03/14 01:20:23 hargrave Exp $ * * (C) Copyright 2001 Sun Microsystems, Inc. * Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use ...
0
* * <pre>{@code * PCollection<MyRecord> records = * foo.apply(...).setCoder(WritableCoder.of(MyRecord.class)); * }</pre> * throw new NonDeterministicException(this, "Hadoop Writable may be non-deterministic."); * Returns a {@link CoderProvider} which uses the {@link WritableCoder} for Hadoop {@link W...
1
import org.apache.beam.sdk.io.gcp.bigquery.BigQueryIO;
0
import org.apache.cocoon.portal.services.PortalManager;
0
/** the maximum number of entries allowed for this pool */ protected final int maxEntries; * @param route the route for which to pool * @param maxEntries the maximum number of entries allowed for this pool public RouteSpecificPool(HttpRoute route, int maxEntries) { this.maxEntries = m...
0
v.visitConstantMethodType(this);
0
// input.setCanonicalizerURI(Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS);
0
@Nullable return getTable( new TableReference().setProjectId(projectId).setDatasetId(datasetId).setTableId(tableId), Sleeper.DEFAULT); } @VisibleForTesting @Nullable Table getTable(TableReference ref, BackOff backoff, Sleeper sleeper) throws IOException, Interrupte...
0
* Evaluates the given key and finds the corresponding child node of the * root node of the specified tree data object. This is a convenience method * that works like the method with the same name, but obtains the root node * from the given data object. * * @param td the {@code TreeData} in...
0
public StringMap getIdentifiers() {
0
import org.junit.After; import org.junit.Before; @Before public void setUpTest() throws Exception { TestByteBufAllocatorTestHelper.setTestAllocator(TestByteBufAllocator.getInstance()); } @After public void tearDownTest() throws Exception { TestByteBufAllocatorTestHelper.clearTestAl...
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
/* * $Header: /cvshome/build/ee.foundation/src/java/io/UTFDataFormatException.java,v 1.6 2006/03/14 01:20:23 hargrave Exp $ * * (C) Copyright 2001 Sun Microsystems, Inc. * Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may ...
0
import com.google.common.base.Supplier; import java.io.OutputStream; private static class FixedOutputStreamFactory implements Supplier<OutputStream> { private OutputStream[] streams; private int next = 0; public FixedOutputStreamFactory(OutputStream... streams) { this.streams = streams; } ...
0
import javax.annotation.Nullable; @Nullable private Coder<K> keyCoder; this(pipeline, new ArrayList<TaggedKeyedPCollection<K, ?>>(), TupleTagList.empty(), null); @Nullable Coder<K> keyCoder) {
0
this((HierarchicalConfiguration<ImmutableNode>) null); this(createNodeModel(c)); } /** * Creates a new instance of {@code BaseHierarchicalConfiguration} and * initializes it with the given {@code NodeModel}. * * @param model the {@code NodeModel} */ protected BaseHi...
0
* Copyright 1999-2009 The Apache Software Foundation.
0
package org.apache.beam.runners.direct;
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 java.io.FileOutputStream; import java.nio.channels.FileChannel; switch (attribute) { case Size: { long newSize = (Long) value; FileChannel outChan = new FileOutputStream(file, true).getChannel(); outChan.truncate(...
0
* @version $Id$
0
import com.google.common.collect.Lists; static final List<GameActionInfo> GAME_ACTION_INFO_LIST = Lists.newArrayList( new GameActionInfo("user0_MagentaKangaroo", "MagentaKangaroo", 3, 1447955630000L), new GameActionInfo("user13_ApricotQuokka", "ApricotQuokka", 15, 1447955630000L), ...
0
final X509HostnameVerifier DEFAULT = new BrowserCompatHostnameVerifier(); final X509HostnameVerifier STRICT = new StrictHostnameVerifier(); final X509HostnameVerifier ALLOW_ALL = new AllowAllHostnameVerifier(); final CertificateFactory cf = CertificateFactory.getInstance("X.509"); ...
0
* </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 may not...
0
* http://www.apache.org/licenses/LICENSE-2.0
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
* Copyright (c) 2002 The Apache Software Foundation. All rights
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
protected Iterator<String> getKeysInternal() @Override protected Iterator<String> getKeysInternal()
0
static void deleteAllEntities(V1TestOptions options, String project, String ancestor) throws Exception { Datastore datastore = getDatastore(options, project); static long countEntities(V1TestOptions options, String project, String ancestor) throws Exception { Datastore datastore = V1TestUtil.get...
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
* @throws IOReactorException - not thrown currently * @throws IOReactorException - not thrown currently
0
import java.util.stream.Collectors; import java.util.stream.StreamSupport; StreamSupport.stream( elements .stream() .filter( Predicates.compose(new StartsWith("a"), new ExtractWriteDestination()) ...
0
String name = names.get(0); name = names.get(1);
0
import org.apache.beam.runners.core.StateTag.StateBinder;
0
protected ContentEncoder createContentEncoder( final long len, return super.createContentEncoder(len, channel, buffer, metrics);
0
"The first component of the Kerberos principal, the 'primary', " + "that Accumulo servers use to login"); log.warn("Client configuration constructed with a Configuration that did not have " + "list delimiter disabled or overridden, multi-valued config " + "prope...
0
implements Blocks, Configurable, blockManager.setBlocks(this);
0
resolver = new MasterHostResolver(configHelper, cluster, version);
0
public class JavascriptLanguage extends AbstractProgrammingLanguage {
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 org.w3c.dom.svg; public interface SVGAnimateMotionElement extends SVGAnimationElement { }
1
import org.apache.commons.codec.Charsets;
0