Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
sig.sign(getSecretKey("secret".getBytes("ASCII"))); SecretKey sk = signature.createSecretKey("secret".getBytes("ASCII"));
0
.apply("ProcessAndFilter", ParDo .apply("ParseGameEvent", ParDo.of(new ParseEventFn())); .apply("FilterOutSpammers", ParDo
0
import org.apache.http.HttpResponse; * Updates entity in a response by first consuming an existing entity, then setting the new one. * * @param response the response with an entity to update. * @param entity the entity to set in the response. * @throws IOException if an error occurs while readi...
0
Method m = service.getClass().getMethod("getComponent", String.class, HttpHeaders.class, UriInfo.class, String.class); Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), "componentName"}; m = service.getClass().getMethod("getComponents", String.class, HttpHeaders.class, UriInfo.class); ...
0
import org.apache.cocoon.portal.factory.impl.AbstractProducible; * @version CVS $Id: AbstractParameters.java,v 1.2 2003/05/20 14:06:43 cziegeler Exp $ public abstract class AbstractParameters extends AbstractProducible implements Parameters {
0
wals.retainAll(fileToStatus.keySet()); Assert.assertEquals(1, wals.size());
0
LOG.info("Already progressed to offset {}, which is after the requested split offset {}",
0
import org.apache.ambari.annotations.ApiIgnore; @GET @ApiIgnore // until documented @GET @ApiIgnore // until documented
0
@Override public JarEntry getJarEntry() throws IOException { return getJarFile().getJarEntry(getEntryName()); }
0
import java.util.Properties; private static TitanGraph graphInstance; Properties sysProperties = System.getProperties(); LOG.info("System properties: "); LOG.info(sysProperties.toString()); if(graphInstance == null) { synchronized (TitanGraphProvider.class) { ...
0
loadProcess("loadSalesDaily" + randomString(), "John ETL", ImmutableList.of(salesFact, timeDim), loadProcess("loadSalesMonthly" + randomString(), "John ETL", ImmutableList.of(salesFactDaily),
0
import javax.xml.datatype.DatatypeConfigurationException; public static XMLGregorianCalendar getXMLGregorianCalendar (Date date) { try { return DatatypeFactory.newInstance().newXMLGregorianCalendar(cal); } catch (NullPointerException ne) { } catch (DatatypeConfigurationExcepti...
0
authstate.update(authscheme, creds); authstate.update(authscheme, creds); authstate.update(authscheme, creds); authstate.update(authscheme, creds);
0
* Returns all Element children of an Element that belong to the given namespace and have the given local name. */ public static Element[] getChildElements(Element element, String namespace, String localName) { ArrayList elements = new ArrayList(); NodeList nodeList = element.getChildNodes(...
0
* @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
0
void accept( Visitor obj );
0
import org.apache.beam.sdk.transforms.windowing.WindowMappingFn; public WindowMappingFn<BoundedWindow> getDefaultWindowMappingFn() {
0
import org.junit.After; import org.junit.Before; public abstract class AbstractParserTest { @Before public void setUp() throws Exception { @After public void tearDown() throws Exception {
0
* Copyright 1999-2002,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 ...
1
new HashSet<>(Arrays.asList(new String[]{ TASK_ID_PROPERTY_ID})); static final Set<String> PROPERTY_IDS = new HashSet<>(); Set<Resource> results = new LinkedHashSet<>();
0
return desiredTids;
0
assertTrue(message, file.exists());
0
* Copyright 2002-2005 The Apache Software Foundation.
0
import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; private MiniAccumuloConfigImpl impl; MiniAccumuloConfig(MiniAccumuloConfigImpl config) { this.impl = config; } MiniAccumuloConfigImpl getImpl() { return impl; } this.impl = new MiniAccumuloConfigImpl(dir, rootPassword); ...
0
package org.apache.ambari.server.api.handlers; import org.apache.ambari.server.api.resources.ResourceDefinition; import org.apache.ambari.server.api.services.PersistenceManager; import org.apache.ambari.server.api.services.Request;
0
* <br></br>
0
import javax.servlet.http.HttpSession; HttpSession session = getRequest().getSession(true); HttpSession session = getRequest().getSession(true);
0
/* * $Header: /cvshome/build/ee.foundation/src/java/io/FileNotFoundException.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 n...
0
* Repaints the associated GVT tree under the list of <code>areas</code>.
0
@java.lang.Deprecated
0
// Since revising a bundle adds a revision to the global // state, we must remove it from the global state on rollback. getFramework().getResolver().removeRevision(br); /// Now that the revision is added to the bundle, we can update // the resolver's state to be aware of any new...
0
import org.apache.hc.core5.reactor.ProtocolIOSession; public IOEventHandler createHandler(final ProtocolIOSession ioSession, final Object attachment) {
0
KerberosCredential kc = new KerberosCredential(DEFAULT_ADMIN_PRINCIPAL, DEFAULT_ADMIN_PASSWORD.toCharArray(), null); KerberosCredential kc = new KerberosCredential(DEFAULT_ADMIN_PRINCIPAL, DEFAULT_ADMIN_PASSWORD.toCharArray(), null); KerberosCredential kc = new KerberosCredential(DEFAULT_ADMIN_PRINCIPAL, "w...
0
log.debug("Cloning table " + srcTableName + " " + newTableName + " " + flush);
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
public static final String ENABLE_CLIENT_SASL_KEY = "zookeeper.sasl.client"; public static final String ENABLE_CLIENT_SASL_DEFAULT = "true"; /** * Returns true if the SASL client is enabled. By default, the client * is enabled but can be disabled by setting the system property * <code>zookee...
0
public void startBundle(StartBundleContext c) throws Exception { public void finishBundle() throws Exception {
0
final File file = new File(getTestDirectory(), "tailer-eof-test.txt");
0
import org.apache.beam.vendor.protobuf.v3.com.google.protobuf.InvalidProtocolBufferException;
0
if (FileInstall.getStartLevel().getStartLevel() >= activeLevel && context.getBundle(0).getState() == Bundle.ACTIVE) protected void checkRemovedListener() { List/*<ArtifactListener>*/ listeners = FileInstall.getListeners(); for (Iterator it = currentManage...
0
* @version $Revision$ $Date$
0
import org.apache.batik.dom.events.NodeEventTarget; * Implements {@link * org.apache.batik.dom.events.NodeEventTarget#getParentNodeEventTarget()}. */ public NodeEventTarget getParentNodeEventTarget() { return (NodeEventTarget) getCSSParentNode(); } /**
0
/** * @since 2.6.0 */ public DataSource getDataSource() { return dataSource; } /** * @since 2.6.0 */ public String getUserName() { return userName; } /** * @since 2.6.0 */ public char[] getUserPassword() { return userPassword; ...
0
import org.apache.hc.core5.http.impl.ConnectionListener; import org.apache.hc.core5.http.impl.Http1StreamListener;
0
org.apache.log4j.Category.getInstance(ResolverXPointer.class.getName()); NodeList resultNodes = null;
0
// All other cases go through FileIO + ReadFiles .apply("Match All", FileIO.matchAll().withConfiguration(getMatchConfiguration())) "Read Matches", FileIO.readMatches() .withDirectoryTreatment(DirectoryTreatment.PROHIBIT)) .apply("Via ReadFiles", r...
0
* --runner=BlockingDataflowRunner
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 com.twitter.nexus.scheduler.persistence; import com.google.common.base.Preconditions; import com.google.common.io.Files; import java.io.File; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; /** * Persistence layer that stores data on the local file system. * * ...
0
private static final Logger logger = Logger.getLogger(LogFeederAMSClient.class); private String collectorHosts = null;
0
private static final StateTag<CombiningState<Long, long[], Long>>
0
package org.apache.beam.runners.flink.translation.wrappers.streaming; import org.apache.beam.runners.flink.translation.types.CoderTypeInformation; import org.apache.beam.runners.flink.translation.wrappers.SerializableFnAggregatorWrapper; import org.apache.beam.runners.flink.translation.wrappers.streaming.state.*;
0
@Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Override @Overrid...
1
private static final String URI_TYPES = "types"; private static final String URI_ENTITIES = "entities"; private static final String URI_TRAITS = "traits"; private static final String URI_SEARCH = "discovery/search"; CREATE_TYPE(BASE_URI + URI_TYPES, HttpMethod.POST), GET_TYPE(BASE_URI + ...
0
* or more contributor license agreements. See the NOTICE file * regarding copyright ownership. The ASF licenses this file * with the License. You may obtain a copy of the License at * KIND, either express or implied. See the License for the
0
EntityResult entityResult = atlasClientV1.updateEntityAttribute(guid, "db", newDBId); assertEquals(entityResult.getUpdateEntities().size(), 2); assertEquals(entityResult.getUpdateEntities().get(0), newDBId); assertEquals(entityResult.getUpdateEntities().get(1), guid);
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument; import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.io.Files.fileTraverser; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Predicates; import org.apache.beam.vendor.guava.v26...
0
import java.util.Vector; Vector document = new Vector(); document.add(new Byte((byte) c)); assertiondocument = new byte[document.size()]; for (i = 0; i < document.size(); i++) { assertiondocument[i] = ((Byte)document.get(i)).byteValue(); }
0
import static java.nio.charset.StandardCharsets.UTF_8; import static org.apache.calcite.avatica.util.DateTimeUtils.MILLIS_PER_DAY; import java.util.Arrays; import org.apache.beam.sdk.extensions.sql.impl.utils.CalciteUtils; if (Arrays.equals(type.getMetadata(), CalciteUtils.TIMESTAMP.getMetadata())) { ...
0
dashArrayBuf.append(COMMA);
0
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.Collections; import java.util.List; import com.google.inject.Guice; import com.google.inject.Inject; import com.google.inject.Injector; i...
0
@Test public void skipReturnValueWithBom() throws IOException { byte[] baseData = new byte[]{(byte) 0x31, (byte) 0x32, (byte) 0x33}; BOMInputStream is1 = new BOMInputStream(createUtf8DataStream(baseData, true)); assertEquals(2, is1.skip(2)); assertEquals((byte) 0x33, is1.read())...
0
* @return Transformer&lt;Class&lt;? extends T&gt;, T&gt;
0
String failok = builder.getProperty( "-failok" ); includeMavenResources( currentProject, builder, getLog() ); if ( builder.getProperty( Analyzer.EXPORT_PACKAGE ) == null && builder.getProperty( Analyzer.PRIVATE_PACKAGE ) == null ) if ( builder.getProperty( Analyz...
0
if (LOG.isTraceEnabled()) { ZooTrace.logQuorumPacket(LOG, traceMask, 'o', p); } if (LOG.isTraceEnabled()) { ZooTrace.logQuorumPacket(LOG, traceMask, 'i', qp); } if (LOG.isTraceEnabled()) { ...
0
assertThat(p.getFullNameForTesting(min), Matchers.startsWith("Min")); assertThat(p.getFullNameForTesting(max), Matchers.startsWith("Max")); assertThat(p.getFullNameForTesting(mean), Matchers.startsWith("Mean")); assertThat(p.getFullNameForTesting(sum), Matchers.startsWith("Sum"));
0
if (!shellState.getConnector().instanceOperations().testClassLoad(classname, SortedKeyValueIterator.class.getName())) { throw new ShellCommandException(ErrorCode.INITIALIZATION_FAILURE, "Servers are unable to load " + classname + " as type " + SortedKeyValueIterator.class.getName()); // instead ...
0
final String redirectURL = res.getRedirectURL(); HttpServletResponse response = (HttpServletResponse) objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT); response.sendRedirect(redirectURL);
0
throw new HttpCacheUpdateException("Failed to processChallenge");
0
bos.close(); } catch (IOException e) { //Imposible } if (!sa.verify(sigBytes)) { return false; } return si.verify(this._followManifestsDuringValidation);
0
* @deprecated Use {@link #ofMicroseconds(long)} @Deprecated * @param milliseconds the duration in milliseconds and the given {@code timeUnit}. * @return a Timeout */ public static Timeout ofMilliseconds(final long milliseconds) { return of(milliseconds, TimeUnit.MILLISECONDS); } ...
0
tabletAssignedToServer1 = new TabletLocationState(extent, null, server1, null, null, walogs, false); tabletAssignedToServer2 = new TabletLocationState(extent, null, server2, null, null, walogs, false);
0
FileSystem fs; if (arg.contains(":")) fs = path.getFileSystem(conf); else fs = hadoopFs.exists(path) ? hadoopFs : localFs; // fall back to local
0
} catch (ParseException pEx) { pEx, ERR_ATTRIBUTE_VALUE_MALFORMED, } catch (NumberFormatException nfEx ) { (ctx, glyphElement, nfEx, ERR_ATTRIBUTE_VALUE_MALFORMED, } catch (NumberFormatException nfEx ) { (ctx, glyphEle...
0
// Blueprint Config columns.clear(); columns.add(new DBColumnInfo("blueprint_name", String.class, 255, null, false)); columns.add(new DBColumnInfo("type_name", String.class, 255, null, false)); columns.add(new DBColumnInfo("config_data", String.class, 32000, null, false)); dbAccessor.createTabl...
0
public final class SqlTimestampConverter implements Converter {
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
/** * This interface marks an event as targetted at a * {@link org.apache.cocoon.portal.om.Layout} object. * * @version $Id$ */ import org.apache.cocoon.portal.event.Event; /** * This interface marks an event as targetted at a * {@link org.apache.cocoon.portal.om.Layout} object. * * @version $Id$ */ public ab...
0
(doFn1, sideInputs1, context1, tagsToOutputTags, tagsToCoders, tagsToIds, inputCoder, keyCoder, transformedSideInputs) -> new DoFnOperator<>( doFn1, ...
0
protected abstract void sessionCreated(SelectionKey key, IOSession session); protected abstract IOSession getSession(SelectionKey key); IOSession session = getSession(key); queueClosedSession(session); protected void queueClosedSession(final IOSession session) { i...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java,v 1.4 2001/09/21 23:22:43 dmitri Exp $ * $Revision: 1.4 $ * $Date: 2001/09/21 23:22:43 $ * @version $Revision: 1.4 $ $Date: 2001/09/21 23:22:43 $ ...
0
import java.util.NoSuchElementException; static class BigQueryReaderIterator extends NativeReaderIterator<WindowedValue<TableRow>> { private WindowedValue<TableRow> current; public boolean start() throws IOException { try { rowIterator.open(); } catch (InterruptedException e) { thr...
0
import static org.junit.Assert.assertFalse; assertFalse(pd.isFeatureSupported("not supported"));
0
* A {@code ListCoder} encodes {@code List}s.
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
IPath spath = e.getSourceAttachmentPath(); if (spath != null) { spath = JavaCore.getResolvedVariablePath(spath); } spath, e.getSourceAttachmentRootPath(),
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbcp/src/java/org/apache/commons/dbcp/PoolablePreparedStatement.java,v 1.5 2003/08/11 16:01:25 dirkv Exp $ * $Revision: 1.5 $ * $Date: 2003/08/11 16:01:25 $ * @version $Id: PoolablePreparedStatement.java,v 1.5 2003/08/11 16:01:25...
0
* Creates a <tt>FilterRegion</tt> for the input mask * element. */ public static FilterRegion convertPatternRegion(Element maskElement, Element maskedElement, GraphicsNode node, UnitProcessor.Context uctx){...
0
* Copyright (C) 2015 Google Inc.
0
final byte[] beginning = "beginning; ".getBytes(Consts.ASCII);
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.hc.core5.reactor;
1
public void sendActions(List<Stage> stages, String clusterHostInfo, ExecuteActionRequest actionRequest) throws AmbariException { Request request = requestFactory.createNewFromStages(stages, clusterHostInfo, actionRequest);
0
+ "name varchar COMMENT 'name', \n" + "name varchar COMMENT 'name', \n" + "name varchar COMMENT 'name', \n" + "name varchar COMMENT 'name', \n"
0
// niallp 2010-10-06 - remove following 2 tests - I reinstated // checks for non-UTF-16 encodings (18 tests) and these failed //_testHttpValid("application/xml", "no-bom", "US-ASCII", null); //_testHttpValid("application/xml", "UTF-8-bom", "US-ASCII", null); // (niallp 2010-...
0
* Property minThreadProperty, Property timeBetweenThreadChecksProperty,
0
import org.apache.commons.configuration.resolver.EntityResolverSupport; import org.xml.sax.EntityResolver; implements ConfigurationListener, ConfigurationErrorListener, EntityResolverSupport /** The EntityResolver */ private EntityResolver entityResolver; public void setEntityResolver(EntityResolver en...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//fileupload/src/java/org/apache/commons/fileupload/MultipartStream.java,v 1.5 2002/07/22 07:21:54 martinc Exp $ * $Revision: 1.5 $ * $Date: 2002/07/22 07:21:54 $ * @version $Id: MultipartStream.java,v 1.5 2002/07/22 07:21:54 marti...
0
/** A custom, bounded source of event records. */ * Event source we purporting to be reading from. (We can't use Java's capture-outer-class * pointer since we must update this field on calls to splitAtFraction.) @Nullable private TimestampedValue<Event> currentEvent; public List<BoundedEventSource> spli...
1
@Test(timeout = 10 * 1000) @SuppressWarnings("FutureReturnValueIgnored") // failure will cause test to timeout.
0