Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
assertEquals(new String(baos.toByteArray(), "UTF-8"), c14nXML);
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
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Optional; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableMap; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Lists; impor...
0
import com.google.inject.persist.Transactional; * @param stackEntity Stack entity * @param stackId stack id * @param stackEntity Stack entity @Transactional @RequiresSession
0
// ACCUMULO-3320 WALs cannot be closed while a TabletServer may still use it later. // // In addition to the WALs that are actively referenced in the metadata table, tservers can also hold on to a WAL that is not presently referenced by any // tablet. For example, a tablet could MinC which would end in ...
0
/** * Basic {@link org.apache.hc.core5.http.nio.AsyncEntityConsumer} implementation * that processes the data stream content into a byte array. * * @since 5.0 */
0
Matchers.<Class<?>>equalTo( com.google.cloud.BaseServiceException.ExceptionData.Builder.class),
1
import org.apache.hc.core5.reactor.ssl.SSLBufferMode; private final SSLBufferMode sslBufferMode; final SSLBufferMode sslBufferMode, this.sslBufferMode = sslBufferMode; sslBufferMode,
0
case OpCode.create2: return "create2";
0
import org.apache.ambari.server.state.SecurityType; updateAccumuloConfigs(); protected void updateAccumuloConfigs() throws AmbariException { AmbariManagementController ambariManagementController = injector.getInstance(AmbariManagementController.class); for (final Cluster cluster : getCheckedClusterMap(amb...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.java,v 1.5 2003/10/05 13:34:17 rdonkin Exp $ * $Revision: 1.5 $ * $Date: 2003/10/05 13:34:17 $ * * Copyright (c) 2001-2003 The Apache Soft...
0
logger.warn("Report work item status response: null");
0
* @author <a href="mailto:deweese@apache.org">deweese</a>
0
if(name.indexOf(':')!=-1) name = name.substring(name.indexOf(':')+1); ExpressionAttribute expat = (ExpressionAttribute) entry.getValue(); Expression expression = expat.exp; if(expat.prefix!=null || expat.prefix.length()>0 && tag instanc...
0
/* * Copyright (C) 2016 Google Inc. * * 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 ...
0
public StreamingWindowedElement(W window, long timestamp, T element) { super(window, timestamp, element);
0
Protos.Attribute::getName; attribute -> { switch (attribute.getType()) { case SCALAR: return String.valueOf(attribute.getScalar().getValue()); case TEXT: return attribute.getText().getValue(); default: LOG.finest("Unrecognized attri...
0
super(eventHandlerFactory, ioReactorConfig, ioSessionDecorator, sessionListener, ShutdownCommand.GRACEFUL_IMMEDIATE_CALLBACK, DefaultAddressResolver.INSTANCE);
0
import static com.google.common.base.Preconditions.checkArgument; input -> { if ("E".equals(input) || "J".equals(input) || "M".equals(input) || "O".equals(input)) { return input.toLowerCase(); } checkArgument( !input.toLowerCase().equals(input), ...
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
import org.apache.commons.vfs2.VFS; final String scheme = UriParser.extractScheme(VFS.getManager().getSchemes(), uri, buffer);
0
import org.apache.http.ReadableByteChannelMockup;
0
String.format("Failed to encode key %s for side input id %s.", k, sideInputId), e); new DataStreams.DataStreamDecoder( valueCoder, StateFetchingIterators.forFirstChunk(beamFnStateClient, requestBuilder.build()))));
1
* 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 applicable law o...
0
* @version CVS $Id: CopletInstanceDataManager.java,v 1.3 2003/05/26 14:29:53 cziegeler Exp $
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/AbstractShortArrayList.java,v 1.11 2003/08/31 17:21:14 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately, this acknowledge...
0
import javax.net.ssl.HttpsURLConnection; private HostnameVerifier hostnameVerifier = HostnameVerifier.DEFAULT; this.socketfactory = HttpsURLConnection.getDefaultSSLSocketFactory(); SSLSocket sslSocket = (SSLSocket) this.socketfactory.createSocket(); sslSocket.bind(new InetSocketAddress(l...
0
* * * * * *
0
package org.apache.beam.sdk.extensions.euphoria.core.client.operator; import org.apache.beam.sdk.extensions.euphoria.core.client.operator.state.State; import org.apache.beam.sdk.extensions.euphoria.core.client.operator.state.StateMerger;
0
package org.apache.beam.sdk.extensions.euphoria.core.translate.join; import org.apache.beam.sdk.extensions.euphoria.core.translate.SingleValueCollector;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestPredicateUtils.java,v 1.4 2003/11/23 14:41:27 scolebourne Exp $ import org.apache.commons.collections.functors.FunctorException; * @version $Revision: 1.4 $ $Date: 2003/11/23...
0
import org.apache.ambari.server.stack.upgrade.UpgradePack.PrerequisiteCheckConfig; import org.apache.ambari.server.stack.upgrade.UpgradeType;
0
import org.apache.felix.ipojo.composite.service.importer.ImportHandler; /** * iPOJO Default Namespace. */ public static final String IPOJO_NAMESPACE = "org.apache.felix.ipojo"; ImportHandler.class,
0
* @return The {@link ASN1Type} value - {@code null} if no match found * @return The {@link ASN1Type} value - {@code null} if no match found
0
public String getFamilyName() { return fontFace.getFamilyName(); }
0
@SuppressWarnings("deprecation") Assert.assertEquals( 0, MRTester.main(new String[] {user, "", "testtable", "testPartialInputSplitDelegationToConfiguration", EmptySplitsAccumuloInputFormat.class.getCanonicalName()})); assertNull(e2); } // We should fail before we even get i...
0
import java.util.UUID; /** * Given a zooCache and instanceId, look up the instance name. */ public static String lookupInstanceName(ZooCache zooCache, UUID instanceId) { checkArgument(zooCache != null, "zooCache is null"); checkArgument(instanceId != null, "instanceId is null"); for (String name ...
1
}, -1, null));
0
Buffer buffer = new ByteArrayBuffer((Integer.SIZE / Byte.SIZE) + GenericUtils.length(opcode) + extraSize + Byte.SIZE, false);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/BeanUtils.java,v 1.20 2002/04/08 17:19:59 craigmcc Exp $ * $Revision: 1.20 $ * $Date: 2002/04/08 17:19:59 $ * @version $Revision: 1.20 $ $Date: 2002/04/08 17:19:59 $ ...
0
DistributedTrace.enable("localhost", "testTrace", getClientConfig());
1
if ( "bundle".equals( mainArtifact.getType() ) ) { // workaround for MNG-1682: force maven to install artifact using the "jar" handler mainArtifact.setArtifactHandler( m_artifactHandlerManager.getArtifactHandler( "jar" ) ); } String extension; ...
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.http.impl.nio.codecs;
0
import static com.google.common.base.Charsets.UTF_8; ref.set(Long.parseLong(new String(val, offset, 16, UTF_8), 16)); sb.append(new String(ContinuousIngest.genRow(ref), UTF_8));
0
@Override @Override
0
* <strong>This map will violate the detail of various Map and map view contracts.</strong> * </p> * </p> * * @param out the output stream * @throws IOException if an error occurs while writing to the stream * * @param in the input stream * @throws IOException if an error occurs while r...
0
private boolean hasServlet; private String servletClass; private Configuration servletConfiguration; Configuration servletElement = block.getChild("servlet", false); this.hasServlet = servletElement != null; if (this.hasServlet) { this.servletClass = servletElement.getAtt...
0
String createEntities(String entityDefinition) throws AtlasException; * Return the definition given type and attribute. The attribute has to be unique attribute for the type * @param entityType - type name * @param attribute - attribute name * @param value - attribute value * @return *...
1
/** * Accept the given visitor. * * @param visitor the visitor */
0
import org.apache.accumulo.core.client.Accumulo; try (AccumuloClient client = Accumulo.newClient().from(getClientProperties()).build()) {
0
import org.apache.accumulo.core.dataImpl.KeyExtent;
0
final Object attachment = conn.getContext().getAttribute(IOSession.ATTACHMENT_KEY); } catch (final Exception ex) { } catch (final Exception ex) {
0
import com.google.gson.Gson; import org.apache.ambari.server.controller.ExecuteActionRequest; protected static final String REQUEST_RESOURCE_FILTER_ID = "Requests/resource_filters"; protected static final String SERVICE_ID = "service_name"; protected static final String COMPONENT_ID = "component_name"; protecte...
0
this.constraints = new ArrayList<>(5); constraints.add(new PredicateCondition<>(key, predicate, condition)); return Iterables.filter(new QueryProcessor<>(query, tx.elementProcessor), Vertex.class); return Iterables.filter(new QueryProcessor<>(query, tx.elementProcessor), Edge.class); ...
0
import org.apache.ambari.server.orm.entities.RepoOsEntity; private static final List<RepoOsEntity> osRedhat6 = new ArrayList<>(); { RepoOsEntity repoOsEntity = new RepoOsEntity(); repoOsEntity.setFamily("redhat6"); repoOsEntity.setAmbariManaged(true); osRedhat6.add(repoOsEntity); } entity1.ad...
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger LOG = LoggerFactory.getLogger(DoFnFunction.class); try { mFunction.setup(); mFunction.startBundle(ctxt); return ctxt.getOutputIterable(iter, mFunction); } catch (Exception e) { try { // this t...
0
public boolean isRegisterByteSizeObserverCheap(KeyPrefix value) { public long getEncodedElementByteSize(KeyPrefix value) public boolean isRegisterByteSizeObserverCheap(Footer value) { public long getEncodedElementByteSize(Footer value)
0
* @author William Farner // TODO(William Farner): Exit cleanly.
0
if (l > max) max = l;
1
import org.apache.http.HttpMessage; public class HttpResponseParser extends AbstractMessageParser<HttpMessage> { protected HttpMessage parseHead(
0
private static final long serialVersionUID = -4021755905444053495L;
0
final String USER_DIRECTORY = "/user"; FileSystem fs = FileSystem.get(conf); String[] subDirs = dir.split("/"); String dirPath = USER_DIRECTORY; for(int i=2;i<subDirs.length;i++) { dirPath += "/"+subDirs[i]; fs.setOwner(new Path(dirPath), username, user...
0
ZipFiles.zipDirectory(classpathElement, countingOutputStream); ZipFiles.zipDirectory(classpathElementFile, Channels.newOutputStream(outputChannel));
0
in = new ByteArrayInputStream(CertificatesToPlayWith.S_GOOGLE_COM); x509 = (X509Certificate) cf.generateCertificate(in); impl.verify("*.google.com", x509); in = new ByteArrayInputStream(CertificatesToPlayWith.S_GOOGLE_COM); x509 = (X509Certificate) cf.generateCertificate(in); ...
0
/** * True if the visited class does not have the @Component annotation. */ if (arg0.equals("public_factory") || arg0.equals("publicFactory")) { // public_factory is deprecated, but must sill be supported if (arg0.equals("factory_method") || arg0.equals("factoryMetho...
0
package org.apache.accumulo.test.randomwalk.concurrent; import org.apache.accumulo.test.randomwalk.State; import org.apache.accumulo.test.randomwalk.Test;
0
public Object setAttributeIfAbsent(Object key, Object value) { return null; } @Override
0
public boolean canCreateTable(TCredentials c, String tableName, String namespaceId) throws ThriftSecurityException { boolean result = super.canCreateTable(c, tableName, namespaceId);
0
import org.junit.Assert; /** This is duplicated from {@code euphoria-testing} due to maven lifecycle cyclic dependency. */ * final Map<T, Integer> leftCounted = left.stream().collect(Collectors.toMap(e -> e, e -> 1, (a, b) -> a + b)); final Map<T, Integer> rightCounted = right.stream().collec...
0
container.init(this.servletContext);
0
JexlNode ptyNode = null; ptyNode = objectNode; // the last one may be null ptyNode = c != numChildren - 1? objectNode : null; break; // } else if (ptyNode != null) { return unsolvableProperty(node, ptyNode != nul...
0
import com.twitter.aurora.gen.TaskConfig; private Function<TaskConfig, String> taskIdGenerator; taskIdGenerator = createMock(new Clazz<Function<TaskConfig, String>>() { }); TaskConfig task = makeTask(JIM, MY_JOB, 0); TaskConfig task = makeTask(JIM, MY_JOB, 0); TaskConfig taskInfo = makeTask(JIM, MY_JO...
0
public interface HttpAsyncContinueTrigger extends HttpAsyncResponseTrigger {
0
import static org.junit.Assert.assertEquals;
0
* {@link org.apache.http.cookie.CookieSpecProvider} implementation that provides an instance of * {@link org.apache.http.impl.cookie.NetscapeDraftSpec}. The instance returned by this factory * can be shared by multiple threads. private final CookieSpec cookieSpec; this.cookieSpec = new NetscapeDraftSpec(...
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
* Determines whether the {@code parent} directory contains the {@code child} element (a file or directory). * <p> * Files are normalized before comparison. * </p> * * Edge cases: * <ul> * <li>A {@code directory} must not be null: if null, throw IllegalArgumentException</li> ...
0
static final int LINE_NUMBER_UNKNOWN = 1; static final int COLUMN_NUMBER_UNKNOWN = 1;
0
final HttpAsyncExchange httpexchange,
0
ZooTrace.logTraceMessage(LOG, ZooTrace.getTextTraceLevel(), "NIOServerCnxn factory exitedloop."); * // ZooLog.logTraceMessage(LOG, // ZooLog.CLIENT_DATA_PACKET_TRACE_MASK, // "Add a buffer to outgoingBuffers"); ...
0
* @version CVS $Id: LinkSerializer.java,v 1.3 2003/10/07 16:39:47 vgritsenko Exp $ if (traversable(href)) { print(href); } if (traversable(href)) { print(href); } // TODO: Xalan encodes international characters into URL encoding
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
ver.put("version", "0.8.0");
0
import java.util.Map; import org.apache.cocoon.components.source.SourceResolverAdapter; * @version CVS $Id: AbstractActionTestCase.java,v 1.2 2003/07/10 00:25:25 ghoward Exp $
0
repositoryVersion.getId(), dStateStr);
0
xmlConf = new XMLConfiguration(); FileHandler handler3 = new FileHandler(xmlConf); handler3.load(new File(testPropertiesXML));
0
/* * $Header: /cvshome/build/org.osgi.service.prefs/src/org/osgi/service/prefs/PreferencesService.java,v 1.9 2006/03/14 01:21:15 hargrave Exp $ * * Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file excep...
0
shellState.getAccumuloClient().tableOperations().setLocalityGroups(tableName, groups);
0
return new Aggregator(getResourceManager(), atsParser, operationController);
0
DELETE_ENTITY(BASE_URI + URI_ENTITY, HttpMethod.DELETE, Response.Status.OK), /** * Supports Deletion of an entity identified by its unique attribute value * @param entityType Type of the entity being deleted * @param uniqueAttributeName Attribute Name that uniquely identifies the entity ...
0
import org.apache.beam.sdk.schemas.Schema; /** A factory for creating {@link FieldValueGetter} objects for a JavaBean object. */ public List<FieldValueGetter> createGetters(Class<?> targetClass, Schema schema) { return JavaBeanUtils.getGetters(targetClass, schema);
0
import org.apache.commons.pool2.impl.GenericObjectPool;
1
import org.apache.accumulo.core.tabletserver.thrift.LogCopyInfo; import org.apache.accumulo.core.util.CachedConfiguration; import org.apache.accumulo.core.util.StringUtil; import org.apache.accumulo.server.trace.TraceFileSystem; import org.apache.accumulo.server.zookeeper.ZooCache; import org.apache.hadoop.conf.Configu...
0
package org.apache.batik.gvt.text;
0
import java.util.EnumSet; import java.util.HashSet; import org.apache.ambari.server.metadata.RoleCommandOrder; import org.apache.ambari.server.metadata.RoleCommandPair; private CommandExecutionType commandExecutionType = CommandExecutionType.STAGE; clusterId = stageEntity.getClusterId().longValue(); commandE...
0
/** * An array with interfaces to be implemented by a proxy for an immutable * hierarchical configuration. */ private static final Class<?>[] IMMUTABLE_HIERARCHICAL_CONFIG_IFCS = { ImmutableHierarchicalConfiguration.class }; return createUnmodifiableConfiguration(IMMUTABLE_CO...
0
import org.apache.beam.model.pipeline.v1.RunnerApi; import org.apache.beam.model.pipeline.v1.RunnerApi.ParDoPayload;
0
* <p>FIXME: Provide a link to the documents discussing servlet (and sitemap) services.</p> * * @cocoon.sitemap.component.documentation * The <code>ServletServiceGenerator</code> POSTs its input data to a called service and passes the XML data returned * by the service down the pipeline. * @cocoon.sitemap.compone...
0
* @version CVS $Id: CommandLineContext.java,v 1.2 2003/05/25 09:00:30 jefft Exp $ if (!f.exists()) return null;
0