Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
@Test public void testGetAuroraStatUnit() { assertEquals("cores", CPUS.getAuroraStatUnit()); }
0
import org.apache.atlas.typesystem.types.cache.TypeCache; final Collection<Provider<EntityChangeListener>> entityListenerProviders, TypeCache typeCache) TypeSystem.getInstance(), ApplicationProperties.get(), typeCache); final Configuration configur...
0
* * package org.apache.cocoon.components.serializers.util; import javax.servlet.http.HttpServletRequest; import org.xml.sax.helpers.AttributesImpl; * * This serializer is reusable. Inbetween uses, {@link #recycle()} should be * called, folled by {@link #setup(HttpServletRequest)} when starting a new serializatio...
0
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 use this file except in compliance with the License. You may obta...
0
package org.apache.beam.runners.flink.translation.wrappers.streaming.io; import org.apache.beam.runners.flink.FlinkPipelineRunner;
0
package org.apache.felix.ipojo.runtime.core.api.components; import org.apache.felix.ipojo.annotations.Component; import org.apache.felix.ipojo.runtime.core.api.services.Foo; /** * This class is marked as a component to be manipulated. */ @Component(name="do-not-use-this-factory", public_factory = false) public clas...
0
return streamNames.stream()
0
// This should throw ReadOnlyBufferException, but THRIFT-883 requires that the ByteBuffers // themselves not be read-only
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 $Revision$
0
import org.springframework.stereotype.Component; @Component
0
* * * // the localization context's resource bundle final private ResourceBundle bundle; // the localization context's locale final private Locale locale; /** * Constructs an empty I18N localization context. */ public LocalizationContext() { bundle = null; locale ...
0
protected class DOMAttrModifiedEventListener implements EventListener {
0
List<List<Integer>> partitionMax = ListUtils.partition(strings, Integer.MAX_VALUE); assertEquals(1, partitionMax.size()); assertEquals(strings.size(), partitionMax.get(0).size()); assertEquals(strings, partitionMax.get(0));
0
public static final String ACCUMULO_CLASSPATH_VALUE = + "$ACCUMULO_HOME/lib/[^.].*.jar,\n" + "$ZOOKEEPER_HOME/zookeeper[^.].*.jar,\n" + "$HADOOP_PREFIX/[^.].*.jar,\n" + "$HADOOP_CONF_DIR,\n"
0
public boolean isAbsoluteName(final String name) StringBuffer b = new StringBuffer(name); UriParser.fixSeparators(b); extractRootPrefix(name, b); catch (FileSystemException e) protected abstract String extractRootPrefix(final String uri, ...
0
import java.net.Socket; import java.util.Map; import java.util.Set; * A strategy allowing for a choice of an alias during SSL authentication. * * @since 4.3 public interface PrivateKeyStrategy { /** * Determines what key material to use for SSL authentication. */ String chooseAlias(Map<String, Priv...
0
* @since 3.0
0
import org.apache.accumulo.core.security.crypto.impl.AESKeyUtils; key = AESKeyUtils.generateKey(sr, 16); key = AESKeyUtils.generateKey(sr, 24); key = AESKeyUtils.generateKey(sr, 32); key = AESKeyUtils.generateKey(sr, 11); java.security.Key kek = AESKeyUtils.generateKey(sr, 16); java.security.Key...
0
if (LOG.isTraceEnabled()) { LOG.trace("==> AtlasPluginClassLoader.findClass(" + name + ")"); if (LOG.isTraceEnabled()) { LOG.trace("AtlasPluginClassLoader.findClass(" + name + "): calling pluginClassLoader.findClass()"); if (LOG.isTraceEnabled()) { ...
0
import java.io.File; import java.net.MalformedURLException; import java.net.URL; import org.apache.commons.configuration.ConfigurationUtils; /** Constant for the jar URL protocol.*/ private static final String JAR_PROTOCOL = "jar"; /** Stores a reference to the configuration to be monitored.*/ ...
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 com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import java.util.List; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotatio...
0
if (Character.toUpperCase(c1) != Character.toUpperCase(c2) && Character.toLowerCase(c1) != Character.toLowerCase(c2)) {
0
* $todo$ Currently, the test vectors are in the file system under the data/ directory. It is planned to put them all into a single jar/zip which is deployed with the library.
0
import org.apache.avalon.framework.parameters.ParameterException; import org.apache.avalon.framework.parameters.Parameters; * @version CVS $Id: WindowAspect.java,v 1.3 2003/06/15 16:56:08 cziegeler Exp $ final PreparedConfiguration config = (PreparedConfiguration)context.getAspectConfiguration(); XMLU...
0
* * * * @Test
0
import org.junit.Assert; final String string = instructionHandle.getInstruction().toString(cp.getConstantPool()); Assert.assertNotNull(string); // TODO Need real assertions. // System.out.println(string);
0
* {@link DoFn.ProcessElement @ProcessElement}.
0
@Override
0
import org.apache.beam.sdk.runners.AppliedPTransform;
0
RepositoryVersionEntity repositoryVersionEntity = clusterVersionEntity.getRepositoryVersion(); StackId repoVersionStackId = repositoryVersionEntity.getStackId(); if (repoVersionStackId.equals(currentStackId) ClusterConfigMappingEntity entityStored = temp.get(type); return temp.v...
0
/* * Copyright 2005 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
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); dbf.setAttribute("http://xml.org/sax/features/namespaces", Boolean.TRUE); DocumentBuilder db = dbf.newDocumentBuilder(); Document d = db.parse( new InputSource(new ...
0
Mutation m = new Mutation(String.format("%016x", rand.nextLong() & 0x7fffffffffffffffl)); long val = rand.nextLong() & 0x7fffffffffffffffl;
0
expect(parentClassLoader.loadClass("org.slf4j.LoggerFactory")).andReturn(parentClass).once(); // should be loaded by parent loader clazz = classLoader.loadClass("org.slf4j.LoggerFactory"); Assert.assertNotNull(clazz); Assert.assertSame(parentClass, clazz);
0
import org.apache.sshd.client.SshClient; import org.apache.sshd.client.channel.ClientChannel; import org.apache.sshd.client.session.ClientSession; import org.apache.sshd.server.SshServer;
0
case AdapterService: service = createAdapterService(b, dm, parser); break; * Creates an Adapter Service. * @param b * @param dm * @param parser * @return */ private Service createAdapterService...
0
import static org.junit.Assert.fail; import org.apache.ambari.server.controller.internal.ConfigurationTopologyException; import org.apache.ambari.server.topology.ConfigRecommendationStrategy; import org.apache.ambari.server.topology.Configuration; import org.apache.ambari.server.topology.HostGroup; import org.apache.a...
0
import com.google.common.primitives.Longs; Map<String,String> data = s.getKVAnnotations(); s.getSpanId(), Longs.asList(s.getParents()), s.getStartTimeMillis(), s.getStopTimeMillis(), s.getDescription(), data, annotations));
0
package org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.math; import org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.BeamSqlExpression; import org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.BeamSqlPrimitive;
0
properties.setProperty(Configuration.OS_VERSION_KEY, "centos5");
1
public final boolean isUnique; public final boolean isIndexable; this.isUnique = def.isUnique; this.isIndexable = def.isIndexable; ", isUnique=" + isUnique + ", isIndexable=" + isIndexable +
0
if (activateContext.getServiceReference() != null) { result.put( "theValue", "anotherValue1" ); }
0
userResourceProvider = new UserResourceProvider(amc);
0
if (rgn.intersects(alphaRed.getBounds())) rgn = rgn.intersection(alphaRed.getBounds()); else return wr; final int bands = wr.getSampleModel().getNumBands(); int i=0, a, b; a = alphaData[x]&0xFF; ...
0
List<? extends BoundedSource<TableRow>> sources = bqSource.split(100, options); List<? extends BoundedSource<TableRow>> sources = bqSource.split(100, options); List<? extends BoundedSource<TableRow>> sources = bqSource.split(100, options); stringSource, stringSource.split(100, options), options); ...
0
package org.apache.jcp.xml.dsig.internal.dom;
0
import org.apache.accumulo.server.zookeeper.IZooReaderWriter; IZooReaderWriter session = ZooReaderWriter.getInstance();
0
import org.apache.avalon.framework.service.ServiceException; * @version CVS $Id: BaseCachingProcessingPipeline.java,v 1.3 2004/07/15 12:49:50 sylvain Exp $ } catch (ServiceException ce) {
0
* Uses the last modification date of the directory and the contained files.
0
public class ParameterTest extends AbstractCommonTest {
0
@Override @Override @Override @Override
0
if (!hostsType.unhealthy.isEmpty()) { context.addUnhealthy(hostsType.unhealthy); }
0
Object[] values = copy.value; @Override protected CopyOnWriteList<V> compute(K key) { return new CopyOnWriteList<V>(); }
0
@SuppressWarnings("deprecation") public void consumeContent() {
0
private void addClassifications(String entityGuid, String typeName, String qualifiedName, List<AtlasClassification> list) { entitiesStore.addClassifications(entityGuid, list); summarize(PROCESS_ADD, entityGuid, typeName, qualifiedName, classificationNames, status); private vo...
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.felix.bundlerepository.Repository; public void testRemoveRepository() throws Exception { URL url = getClass().getResource("/repo_for_resolvertest.xml"); RepositoryAdminImpl repoAdmin = createRepositoryAdmin(); Repository repository = repoAdmin.addRepository(url); ...
0
/** * This method is for test usage only */ public Write<T> withTestServices(BigQueryServices testServices) {
0
ots.addTestSuite(OptionalNoNullableDependencies.class);
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
AgeOffFilter.setTTL(is, 101L); AgeOffFilter.setCurrentTime(is, 1001L); ColumnAgeOffFilter.addTTL(is, new IteratorSetting.Column("a"), 901L); ColumnAgeOffFilter.addTTL(is, new IteratorSetting.Column("a", "b"), 101L); ColumnAgeOffFilter.addTTL(is, new IteratorSetting.Column("a"), 901L); ColumnAgeO...
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...
1
public static final String IS_HEALTHY = "OK\n"; private static final String IS_NOT_HEALTHY = "SICK\n";
0
import org.apache.aurora.scheduler.resources.ResourceTestUtil; import static org.apache.aurora.scheduler.resources.ResourceTestUtil.mesosScalar; import static org.apache.aurora.scheduler.resources.ResourceType.CPUS; import static org.apache.aurora.scheduler.resources.ResourceType.DISK_MB; import static org.apache.auror...
0
* Management interface for {@link ManagedClientConnection client connections}. * The purpose of an HTTP connection manager is to serve as a factory for new * HTTP connections, manage persistent connections and synchronize access to * persistent connections making sure that only one thread of execution can * data m...
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
assertThat(options.getSavepointPath(), is(nullValue())); assertThat(options.getAllowNonRestoredState(), is(false));
0
if (element != null && element.getParentNode() == null) { throw new XMLEncryptionException("empty", "The element can't be serialized as it has no parent"); } if (element != null && element.getParentNode() == null) { throw new XMLEncryptionException("empty", "The ...
0
import java.util.ArrayDeque; private final Queue<Iterable<TimestampedValue<T>>> batches = new ArrayDeque<>(); private final Deque<SparkWatermarks> times = new ArrayDeque<>();
0
* A {@link CollectionCoder} encodes {@link Collection Collections} in the format of {@link * IterableLikeCoder}. * @return the decoded elements directly, since {@link List} is a subtype of {@link Collection}.
1
return 0;
0
* Matches the target host ("Host" request header) against a wildcard expression. * public class WildcardHostMatcher extends AbstractWildcardMatcher {
0
@Override @Override @Override @Override @Override
0
/* * @author <a href="mailto:felix-dev@incubator.apache.org">Felix Project Team</a> */
0
import java.util.regex.Pattern; private final Pattern redir = Pattern.compile("[0-9&]?>|[0-9]?>>|[0-9]?>&|[0-9]?<|[0-9]?<>"); Token t, tn; case '>': case '<': t = text.subSequence(start, index); tn = text.subSequence(start, index + 1)...
0
zks.getFollower().request(request);
0
import java.util.UUID; import org.apache.accumulo.proxy.thrift.TableExistsException; import org.apache.accumulo.proxy.thrift.UnknownScanner; import org.apache.accumulo.proxy.thrift.UnknownWriter; public void testExists() throws Exception { client.createTable(creds, "ett1", false, TimeType.MILLIS); client.crea...
0
@Override
0
* * @deprecated (4.3) do not use @Deprecated
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestCollectionUtils.java,v 1.25 2003/10/05 21:03:44 scolebourne Exp $ * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * permission of the Apache Software...
0
import java.io.IOException; import org.apache.accumulo.server.fs.VolumeManager; import org.apache.hadoop.fs.Path; private final VolumeManager fs; public StatusMaker(Connector conn, VolumeManager fs) { this.fs = fs; try { // If the createdTime is not set, work around the issue by retrieving the...
0
* * * * @version CVS $Id$ /** * Constructor. Set the namespace. */ super.defaultNamespaceURI = SessionConstants.SESSION_NAMESPACE_URI; if (namespaceURI.equals(uri) && name.equals(GETXML_ELEMENT)) { if (namespaceURI.equals(uri) && name.equals(GETXML_ELEM...
0
import java.util.ArrayList; import java.util.List;
0
* @version CVS $Id: AuthenticationContext.java,v 1.5 2003/05/08 12:33:56 cziegeler Exp $ frag = this.authContext.getXML(path); frag = this.authContext.getXML(path); this.authContext.setXML(path, fragment); this.authContext.setXML(path, fragment); this.authCon...
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
boolean isInternal = isInternalType(edge.getInVertex()) && isInternalType(edge.getOutVertex()); deleteEdge(edge, isInternalType(inVertex) && isInternalType(outVertex));
0
import org.junit.Assert; import org.junit.Test; public class TestByteArrayEntity { @Test Assert.assertEquals(bytes.length, httpentity.getContentLength()); Assert.assertNotNull(httpentity.getContent()); Assert.assertTrue(httpentity.isRepeatable()); Assert.assertFalse(httpentity.isStre...
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList;
0
static QuickLinksProfile create(List<Filter> globalFilters, List<Service> services) { QuickLinksProfile profile = new QuickLinksProfile(); profile.setFilters(globalFilters); profile.setServices(services); return profile; }
0
import org.apache.log4j.Logger; private static final Logger LOG = Logger.getLogger(AckRequestProcessor.class); QuorumPeer self = leader.self; if(self != null) leader.processAck(self.getId(), request.zxid, null); else LOG.error("Null QuorumPeer");
0
if ( type.equals( address.getType() ) ) { }
0
m_configurations = new ConcurrentHashMap<>(); m_hosts = new ConcurrentHashMap<>(); Set<Map<String, Object>> hostnames = new HashSet<>(); Map<String, Object> hostMap = new HashMap<>(); Set<Map<String, Object>> configObjMap = new HashSet<>(); Map<String, Object> configMap = new HashMap<>();
1
import org.apache.aurora.common.quantity.Time; import org.apache.aurora.scheduler.maintenance.MaintenanceModule; opts.sla.minRequiredInstances, opts.sla.maxSlaDuration.as(Time.SECONDS), install(new MaintenanceModule(options.maintenance));
0
SERVICE; public static KerberosPrincipalType translate(String string) { if(string == null) return null; else { string = string.trim(); if(string.isEmpty()) return null; else { return valueOf(string.toUpperCase()); } } } public static String translate(...
0
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * v...
0
protected String convertToString(Object value) { String result = null; } else { result = value.toString(); if (log().isDebugEnabled()) { log().debug(" Converted to String using toString() '" + result + "'"); }
0
private byte[] columnFamily; private byte[] columnQualifier; private byte[] columnVisibility; private long timestamp; private boolean hasTimestamp; private byte[] val; private byte[] data; private int tsOffset; private boolean deleted; public ColumnUpdate(byte[] cf, byte[] cq, byte[] cv, boole...
1