Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
package org.apache.commons.digester3; import org.apache.commons.digester3.Digester; "/org/apache/commons/digester3/xmlrules/digester-rules.dtd"; "/org/apache/commons/digester3/xmlrules/test-call-param-rules.xml";
1
import org.apache.ambari.server.security.authorization.UserType; public UserEntity findUserByNameAndType(String userName, UserType userType) { TypedQuery<UserEntity> query = entityManagerProvider.get().createQuery("SELECT user FROM UserEntity user WHERE " + "user.userType=:type AND user.userName=:name", U...
0
import org.apache.cocoon.acting.ConfigurableServiceableAction; * @version CVS $Id: AbstractMethodAction.java,v 1.3 2003/10/15 20:47:15 cziegeler Exp $ public abstract class AbstractMethodAction extends ConfigurableServiceableAction {
0
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
0
import javax.persistence.UniqueConstraint; initialValue = 0, uniqueConstraints=@UniqueConstraint(columnNames={"layout_name", "cluster_id"}) @Column(name = "layout_name", nullable = false, length = 255)
0
public class DefaultFileMonitorTests extends AbstractVfsTestCase { public void setUp() throws Exception { if (testFile.exists()) { public void tearDown() throws Exception { if (testFile != null && testFile.exists()) { public void testFileCreated() throws Exception { try { public ...
1
if (properties == null) return; if (!this.properties.containsKey(scope)) this.properties.put(scope, new HashMap<String,String>());
1
endTimes[i].deinitialize();
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/axes/DescendantContext.java,v 1.5 2002/04/21 21:52:32 dmitri Exp $ * $Revision: 1.5 $ * $Date: 2002/04/21 21:52:32 $ import org.apache.commons.jxpath.ri.model.*; * @version $Revision: ...
0
Element context = doc.createElement("nscontext"); context.setAttribute( "xmlns:x", "http://www.xmlsecurity.org/NS/#configuration"); Element cipherAlgos = (Element) XPathAPI.selectSingleNode(doc, "/x:Configuration/x:EncryptionM...
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
package org.apache.aurora.scheduler.http; import org.antlr.stringtemplate.StringTemplate; import org.apache.aurora.gen.CronCollisionPolicy; import org.apache.aurora.gen.ScheduleStatus; import org.apache.aurora.gen.apiConstants; import org.apache.aurora.scheduler.base.JobKeys; import org.apache.aurora.scheduler.base.Qu...
0
* A {@link PCollectionView PCollectionView<T>} is an immutable view of a {@link PCollection} as a * value of type {@code T} that can be accessed e.g. as a side input to a * {@link com.google.cloud.dataflow.sdk.transforms.DoFn}. * <p>A {@code PCollectionView} should always be the output of a * {@link com.google.clo...
0
import java.util.TreeMap; * <li>format: html|json|jsonp|txt|verbose.txt private static final String CORS_ORIGIN_HEADER_NAME = "Access-Control-Allow-Origin"; private Map<Result.Status, Integer> defaultStatusMapping; this.defaultStatusMapping = getStatusMapping(configuration.httpStatusMapping()); ...
0
/* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.commons.vfs.provider.url; import org.apac...
0
return (byte[]) bytes.clone();
0
stats = client.getMasterStats(Tracer.traceInfo(), creds.toThrift(c.instanceOperations().getInstanceID()));
0
import org.apache.commons.vfs2.FileObject;
0
import org.apache.ambari.logfeeder.util.LogFeederPropertiesUtil; String logFeederConfigFilesProperty = LogFeederPropertiesUtil.getConfigFiles(); int simulatedInputNumber = LogFeederPropertiesUtil.getSimulateInputNumber();
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
Buffer buffer = getCommandBuffer(Integer.BYTES + NumberUtils.length(srcId) + Integer.BYTES + NumberUtils.length(dstId) + (3 * (Long.SIZE + Integer.BYTES)));
0
/** * Constructs a {@link PriorityQueue} of multiple SortedKeyValueIterators. Provides a simple way to interact with multiple SortedKeyValueIterators in sorted * order. */
0
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.fail; assertEquals("r1", entry.getKey().getRow().toString()); assertEquals("cf1", entry.getKey().getColumnFamily().toString()); assertEquals...
0
if(StringUtils.isNumeric(stringValue)) { long value = Long.valueOf(stringValue).longValue(); matches = value == Long.valueOf(parts[1]).longValue(); } else { matches = stringValue.equals(parts[1]); }
0
import java.io.*; import java.util.Map; @Test public void testRevokeExistingAgentCert() throws Exception { Map<String,String> config = certMan.configs.getConfigsMap(); config.put(Configuration.PASSPHRASE_KEY,"passphrase"); String agentHostname = "agent_hostname1"; SignCertResponse scr = certMan.s...
0
.apply(Latest.globally()); .apply(Latest.globally()); PCollection<Long> output = emptyInput.apply(Latest.globally()); .apply(Latest.perKey()); .apply(Latest.perKey()); .apply(Latest.perKey());
0
* Constructes an GVTFontFace with the specfied font-face attributes.
0
/* * $Id$ * 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...
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 ...
0
package org.apache.beam.sdk.util.common;
0
private static final int COLLECTOR_DEFAULT_PORT = 6188; collectorPort != null ? Integer.parseInt(collectorPort) : COLLECTOR_DEFAULT_PORT));
0
import java.awt.Rectangle; import java.awt.image.BufferedImageOp; import java.awt.image.ConvolveOp; import java.awt.image.Kernel;
0
private final boolean hasLegacyAttributeEnd; AtlasRelationshipEndDef end1Def = relationshipDef != null ? relationshipDef.getEndDef1() : null; AtlasRelationshipEndDef end2Def = relationshipDef != null ? relationshipDef.getEndDef2() : null; this.relationshipDef = relationsh...
0
Copyright 2003 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
Invoker.executeNode(consumer, val);
0
package org.apache.sshd.common.session;
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.sshd.util.test.JUnitTestSupport; public class IoUtilsTest extends JUnitTestSupport {
0
Provider provider = (Provider)cons.newInstance();
0
byte[] row = {1}; byte[] colFamily = {0, 1}; byte[] colQualifier = {0, 0, 1}; byte[] colVisibility = {0, 0, 0, 1};
0
* <p>Anything stored within the in-memory buffer from offset {@link #size()} is considered * temporary unused storage. * <p>This coder does not support encoding positive infinity. * <p>The {@link UnsignedLexicographicalComparator} supports comparing {@link RandomAccessData}
0
final ClassWriter writer = new ClassWriter(0); mv.visitFieldInsn(Opcodes.PUTFIELD, this.getName().replace('.', '/'), propertyName, type.toString()); mv.visitMaxs(2, 2);
0
Connector conn = state.getInstance().getConnector(source);
0
* @param obj the object to compare with return // Do the cheapest tests first LangUtils.equals(this.targetHost, that.targetHost) && LangUtils.equals(this.localAddress, that.localAddress) &&
0
import java.util.ArrayList; import java.util.Collections; import java.util.Dictionary; import java.util.Enumeration; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; final Dictionary<String, Object> properties = new OrderedDictionary();
0
/* * Copyright 2016-2018 Seznam.cz, a.s.
0
* {@link SourceValidity#VALID}, as (in theory) Cocoon always accesses us return SourceValidity.VALID; * <p>This method will return {@link SourceValidity#VALID} if and only if * {@link SourceValidity#INVALID} in all other cases.</p> return (this.equals(validity)? VALID:...
0
import org.apache.accumulo.fate.zookeeper.ZooUtil; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @SuppressFBWarnings(value = {"PATH_TRAVERSAL_IN", "URLCONNECTION_SSRF_FD"}, justification = "path provided by test; url provided by test") SSLContext ctx = SSLContext.getInstance("TLSv1.2"); ...
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 by applic...
0
* @version $Id$
0
ClassLoader cl = extractor.extractViewArchive(viewDefinition, archiveFile, extractedArchiveDirFile); } viewDefinition.setConfiguration(viewConfig); for (InstanceConfig instanceConfig : viewConfig.getInstances()) { ViewInstanceEntity instanceEntity = createViewInstanceDefinition(vi...
0
import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Random;
0
import org.apache.ambari.server.state.State; private boolean validateScanResults(Map<ServiceComponentHost, Boolean> scanResuls) { int startedComponents = 0; activeMasters += (entry.getValue() && entry.getKey().getState() == State.STARTED) ? 1 : 0; startedComponents += (entry.getKey().getState() == Sta...
0
import java.util.Collections; import java.util.List; List<Range> ranges = Collections.singletonList(new Range(new Key("a"), new Key("b"))); BatchInputSplit split = new BatchInputSplit("table", Table.ID.of("1"), ranges, List<Range> ranges = Collections.singletonList(new Range(new Key("a"), new Key("b"))); ...
0
package org.apache.commons.vfs2.util; import org.apache.commons.vfs2.FileSystemConfigBuilder; import org.apache.commons.vfs2.FileSystemException; import org.apache.commons.vfs2.FileSystemManager; import org.apache.commons.vfs2.FileSystemOptions;
1
* The connection must already be open or tunnelled * to the host and port, but the scheme of the target
0
public void testCommandLineParsingWithExpansion3() {
0
final List<OperatingSystemEntity> operatingSystems = new ArrayList<>();
0
import java.util.Map; Map<Long,QuorumServer> peers;
0
return requestPoolEntry(route, state).getPoolEntry(timeout, tunit); public abstract PoolEntryRequest requestPoolEntry(HttpRoute route, Object state);
0
import java.util.Collection;
0
package org.apache.beam.sdk.util.state;
0
* The name/key the set of validation rules is stored under. * @deprecated Subclasses should use getFieldMap() instead. public void setExtends(String inherit) { this.inherit = inherit; /** * Returns a Map of String field keys to Field objects. * @since Validator 1.2.0 */ pro...
1
import org.apache.commons.jxpath.JXPathTypeConversionException; String string = value == null ? "null" : value.getClass().getName(); throw new JXPathTypeConversionException( "Cannot convert value of class " + string + " to type " + type, ex);
0
600_000, "e2add2f680de9024e9bc46cd3912545e",
0
Collection<PublicKey> keys = tracker.loadMatchingAuthorizedEntries(session, Collections.singletonList(pke)); PublicKey expected = pke.resolvePublicKey(session, Collections.emptyMap(), tracker);
0
import org.apache.accumulo.trace.instrument.Span; import org.apache.accumulo.trace.instrument.Trace; import org.apache.accumulo.trace.instrument.Tracer; import org.apache.accumulo.trace.thrift.TInfo;
0
@Override
0
import java.util.Collection; assertEquals("Number of configurations", 2, cc.getNumberOfConfigurations()); assertEquals("Number of configurations", 2, cc.getNumberOfConfigurations()); assertEquals("Number of configurations", 3, cc.getNumberOfConfigurations()); assertEquals("Number of conf...
0
URL getURL() throws FileSystemException;
0
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 a...
0
* Copyright 2002-2005 The Apache Software Foundation.
0
import org.apache.ambari.server.orm.dao.ResourceTypeDAO; import org.apache.ambari.server.orm.entities.ResourceEntity; import org.apache.ambari.server.orm.entities.ResourceTypeEntity; import javax.persistence.EntityManager; ResourceTypeDAO resourceTypeDAO = injector.getInstance(ResourceTypeDAO.class); // create...
0
import java.util.SortedMap;
0
public static <E> Set<E> decorateTransform(Set<E> set, Transformer<? super E, ? extends E> transformer) { TransformedSet<E> decorated = new TransformedSet<E>(set, transformer); @SuppressWarnings("unchecked") // set is type E E[] values = (E[]) set.toArray();
0
package org.apache.felix.dm.test.components;
0
LOG.debug("Extracting {}", entryPath); LOG.debug("Making directory {}", entryPath); LOG.debug("Begin copying from {} to {}", jarEntry.getName(), entryPath); LOG.debug("Finish copying from {} to {}", jarEntry.getName(), entryPath);
1
import org.apache.felix.service.command.Descriptor; @ServiceProperty(name = "osgi.command.scope", value = "ipojo") String m_scope; @ServiceProperty(name = "osgi.command.function", value = "{}") @Descriptor("Display iPOJO instances") @Descriptor("Display the architecture of a specific instance") ...
0
* Most users should use {@link GenerateSequence} instead. * * <p>A source that produces longs. When used as a {@link BoundedSource}, {@link CountingSource} * starts at {@code 0} and counts up to a specified maximum. When used as an {@link * UnboundedSource}, it counts up to {@link Long#MAX_VALUE} and then never pr...
0
import org.apache.commons.vfs.Capability; protected void addCapabilities(Collection<Capability> caps)
0
// for each text run, see if it contains the current char. int idx = layout.getGlyphIndex(charIndex);
0
* * import java.util.EventListener; import org.osgi.framework.Bundle; import org.osgi.framework.Filter; public class ListenerInfo implements ListenerHook.ListenerInfo private final Bundle m_bundle; private final Class m_listenerClass; private final EventListener m_listener; private final Filter m_fil...
0
String tempLocation = bqOptions.getTempLocation(); checkArgument( !Strings.isNullOrEmpty(tempLocation), "BigQueryIO.Read needs a GCS temp location to store temp files."); if (bigQueryServices == null) { try { GcsPath.fromUri(tempLocation); ...
0
private static final Set<String> RESERVED_KEYS = new HashSet<String>(11);
0
import org.apache.beam.runners.core.construction.ReplacementOutputs; import org.apache.beam.sdk.io.WriteFilesResult; class WriteWithShardingFactory<InputT, DestinationT> PCollection<InputT>, WriteFilesResult<DestinationT>, PTransform<PCollection<InputT>, WriteFilesResult<DestinationT>>> { public PTran...
0
import com.google.common.base.Preconditions;
0
static final int DATASTORE_BATCH_UPDATE_BYTES_LIMIT = 9_000_000;
0
/* * $Header: /cvshome/build/ee.foundation/src/java/util/ListIterator.java,v 1.6 2006/03/14 01:20:25 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
File[] files = f.listFiles(pathname -> pathname.getName().endsWith("site.xml"));
0
Map<String, Set<String>> componentHostGroupMap = new HashMap<>(); Set<String> components1 = new HashSet<>(); Set<String> components2 = new HashSet<>(); new HashMap<>(); Set<String> componentNames1 = new HashSet<>(); Set<String> componentNames2 = new HashSet<>();
0
* * @author Scott Sanders - Added ASL, removed external dependencies public class ObjectTestImpl { private Long longValue = new Long( -1L ); public ObjectTestImpl() { public String toString() { for ( Object o : children ) { public void add( Object o ) { children...
1
import org.apache.atlas.web.integration.BaseResourceIT;
0
public void setUp() throws Exception { initServer(); public void tearDown() throws Exception { shutDownServer();
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 ma...
0
return getManifest( project, new LinkedHashMap(), new Properties(), classpath ); boolean hasErrors = reportErrors( "Manifest " + project.getArtifact(), analyzer ); if ( hasErrors ) Builder analyzer = getOSGiBuilder( project, instructions, properties, classpath ); addMavenInstruct...
0
package org.apache.accumulo.test.randomwalk.security; import org.apache.accumulo.test.randomwalk.State; import org.apache.accumulo.test.randomwalk.Test;
0
import org.apache.atlas.exception.AtlasBaseException; import org.apache.atlas.repository.store.bootstrap.AtlasTypeDefStoreInitializer; import org.apache.atlas.type.AtlasTypeRegistry; import org.apache.commons.io.FileUtils; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileNotFoundException; ...
0
import org.apache.beam.vendor.grpc.v1p21p0.io.grpc.ClientInterceptor; import org.apache.beam.vendor.grpc.v1p21p0.io.grpc.ManagedChannel; import org.apache.beam.vendor.grpc.v1p21p0.io.grpc.ManagedChannelBuilder; import org.apache.beam.vendor.grpc.v1p21p0.io.grpc.netty.NettyChannelBuilder; import org.apache.beam.vendor.g...
0
import org.apache.atlas.repository.store.graph.v1.AtlasEntityStream; import java.util.Map; EntityGraphDiscoveryContext discoverEntities() throws AtlasBaseException;
1