Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
return Runtime.getRuntime().exec(cmd.toStrings(),
0
package org.apache.beam.sdk.options;
0
if (a2 == null) { return true; } else { return true;
0
if (!(actual instanceof HttpRequest)) { return false; }
0
* Random Access Content. * Get the input stream.
0
import java.io.FileInputStream; Document doc = XMLUtils.newDocument(false); Document doc = XMLUtils.parse(new FileInputStream(file), false);
0
import cz.seznam.euphoria.flink.functions.WindowedElementUnaryFunctorWrapper; .flatMap(new WindowedElementUnaryFunctorWrapper(mapper))
0
import org.apache.beam.sdk.transforms.windowing.WindowMappingFn; public WindowMappingFn<BoundedWindow> getDefaultWindowMappingFn() { throw new UnsupportedOperationException("Cannot be used as a side input");
0
import java.util.Collections; import org.apache.accumulo.core.client.IteratorSetting; import org.apache.accumulo.core.client.IteratorSetting.Column; import org.apache.accumulo.core.iterators.Combiner; import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope; import org.apache.accumulo.server.replication.Sta...
0
@SuppressWarnings({"AbstractMethodCallInConstructor", "OverriddenMethodCallDuringObjectConstruction"}) * Given a string representation which was unable to be parsed, produce a {@link javax.ws.rs * .core.Response.Status} for the if (this == obj) { return true; } ...
0
import org.apache.beam.sdk.extensions.sql.impl.BeamSqlEnv; import org.apache.calcite.tools.RuleSets; * {@link RuleSet} used in {@link BeamQueryPlanner}. It translates a standard Calcite {@link * RelNode} tree, to represent with {@link BeamRelNode} public static RuleSet[] getRuleSets(BeamSqlEnv sqlEnv) { return ...
0
long last = 0; // The last time the file was checked for changes long position = 0; // position within the file RandomAccessFile reader = null; last = System.currentTimeMillis(); position = readLines(reader); las...
0
cr.setStructuredOut("STRUCTURED_OUTPUT"); assertEquals( "STRUCTURED_OUTPUT", am.getAction(requestId, stageId) .getHostRoleCommand(hostname, "HBASE_MASTER").getStructuredOut()); cr.setStructuredOut(outLog); assertEquals( outLog.length(), am.getAction(requestId, stageId...
1
* 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
package org.apache.commons.jexl2.scripting;
0
import org.apache.accumulo.core.client.IteratorSetting.Column; * Adds a column to the list of columns that will be fetch by this scanner. * * @param column * the {@link Column} to fetch * @since 1.7.0 */ void fetchColumn(Column column); /**
0
import org.apache.commons.bcel6.Constants; final class ConstantHTML { file.println("<H4> <A NAME=cp" + index + ">" + index + "</A> " + Constants.CONSTANT_NAMES[tag] case Constants.CONSTANT_InterfaceMethodref: case Constants.CONSTANT_Methodref: if (tag == Constants.CONSTAN...
0
public void testCount() { public void testWithEventTimeWindow() {
0
rootNode = ConfigurationUtils getConversionExpressionEngine()).getRootNode(); atParent.appendChildren(rootNode); atParent.appendAttributes(rootNode);
0
* http://www.apache.org/licenses/LICENSE-2.0
0
package org.apache.accumulo.monitor.rest.api.tserver; import org.apache.accumulo.monitor.rest.api.master.MasterInformation; /** * * Generates a list of servers, bad servers, and dead servers * * @since 2.0.0 * */ // Variable names become JSON keys public List<BadTabletServerInformation> badServers; public ...
0
import java.net.ProtocolException; super.maxCnxns = 1; super.exceptionOnFailedConnect = true; /** * In the {@link #setUp()} routine, the maximum number of connections per IP * is set to 1. This tests that if more than one connection is attempted, the * connection fails. */ @T...
0
* @return a boolean indicating if authentication succeeded or not boolean authenticate(String username, PublicKey key, ServerSession session);
0
PCollection<BeamSQLRow> upstream = planCreator.popUpstream();
0
/* * $Header: /cvshome/build/ee.foundation/src/java/lang/OutOfMemoryError.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 ...
0
import org.apache.commons.configuration.ex.ConfigurationException;
0
public abstract class AbstractProviderTestConfig extends AbstractProviderTestCase
0
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.antlr.stringtemplate.StringTemplate;
0
import static org.apache.commons.io.IOUtils.EOF; if( EOF == value ) {
0
import org.apache.ambari.server.state.StackId; import org.apache.ambari.server.utils.VersionUtils; import java.util.Collections; private static final String HBASE_ENV_CONFIG = "hbase-env"; private static final String CONTENT_PROPERTY = "content"; addNewConfigurationsFromXml(); updateStormConfigs(); upda...
0
Copyright 2000-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...
0
* </p> * </p>
0
* * */ return new TestSuite(ByteConverterTestCase.class); String[] message= { Object[] input = { Byte[] expected = {
0
CombinedEntity combinedEntity = new CombinedEntity(resource, instream); HttpEntity entity = response.getEntity(); if (entity != null) { combinedEntity.setContentType(entity.getContentType()); combinedEntity.setContentEncoding(entity.getContentEncoding()); } ...
0
factory.createFileEntryParser(
0
import org.apache.aurora.common.base.Closure; import org.apache.aurora.common.base.Closures; import org.apache.aurora.common.base.Command; import org.apache.aurora.common.base.MorePreconditions; import org.apache.aurora.common.stats.Stats; import org.apache.aurora.common.util.StateMachine; import org.apache.aurora.comm...
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
throw new IllegalArgumentException(String.format("[%s] is not valid.", parameterNode));
0
/* * Copyright 2016-2018 Seznam.cz, a.s.
0
p.put("instance.name","importer"); p1.put("instance.name","foo1"); p2.put("instance.name","foo2");
0
"hashcode is not implemented for class " + this.getClass());
0
Iterator<Entry<Key,Value>> slow = scanner.iterator(); // do not close scanner, since all data is consumed it should close the sessions Scanner scanner2 = c.createScanner(tableName, new Authorizations()); scanner2.setRange(new Range(String.format("%08d", 0), String.format("%08d"...
0
import org.apache.accumulo.core.conf.DefaultConfiguration; public enum ClassloaderType { // Use the Accumulo custom classloader. Should only be used by Accumulo server side code. ACCUMULO, // Use basic Java classloading mechanism. Should be use by Accumulo client code. JAVA } public static Crypto...
0
"Callback %s is for undeclared timer %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...
0
import org.apache.cocoon.objectmodel.ObjectModelProvider; import org.apache.cocoon.objectmodel.PackagesEntryObjectModelProvider; * Adds java packages to {@link org.apache.cocoon.el.objectmodel.ObjectModel ObjectModel}. Allows to construct java objects.
0
package org.apache.beam.sdk.coders; import org.apache.beam.sdk.testing.CoderProperties; import org.apache.beam.sdk.util.CoderUtils; * {@link org.apache.beam.sdk.coders.PrintBase64Encodings}.
0
public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, final Mutation m = new Mutation(new Text(cl.getArgs()[0].getBytes(Shell.CHARSET))); final Text colf = new Text(cl.getArgs()[1].getBytes(Shell....
0
import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; assertEquals(split.getTableName(), newSplit.getTableName()); assertEquals(split.getTableId(), newSplit.getTableId()); assertEquals(split.getRanges(), newSplit.getRanges(...
0
import org.easymock.classextension.EasyMock;
0
import org.apache.sshd.common.RuntimeSshException; ValidateUtils.checkNotNull(ioSession, "No I/O session").setAttribute(SESSION, ValidateUtils.checkNotNull(session, "No SSH session")); } catch (Throwable e) { if (e instanceof Exception) { throw (Exception) e; } el...
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 URL getEntryAsURL(String name) { return null; } public URL getLocalURL(int index, String urlPath) { return getClass().getClassLoader().getResource(urlPath); }
0
import java.util.Arrays; Arrays.fill( times, 100 );
0
import org.apache.beam.sdk.metrics.SinkMetrics; private final Counter elementCounter = SinkMetrics.elementsWritten(); private final Counter byteCounter = SinkMetrics.bytesWritten();
0
import org.apache.cocoon.forms.FormsException; throw new FormsException("Required attribute 'command' is missing.", DomHelper.getLocationObject(widgetElement)); throw new FormsException("Use 'on-action' instead of 'on-activate' on row-action.", ...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/adapters/Attic/TestShortListList.java,v 1.5 2003/11/16 22:15:08 scolebourne Exp $ import org.apache.commons.collections.list.AbstractTestList; import org.apache.commons....
0
* "License"); you may not use this file except in compliance * distributed under the License is distributed on an "AS IS" BASIS,
0
import static org.junit.Assert.fail; fail();
0
public synchronized void addServlet(@Nonnull final ServletHandler handler) private void removeFromNameMapping(final String servletName, final ServletHandler handler) if ( oldStatus != null ) { final RegistrationStatus newOldStatus = new RegistrationSta...
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
.setRowSchema(ROW_TYPE);
0
* any, must include the following acknowledgement: * Alternately, this acknowledgement may appear in the software itself, * if and wherever such third-party acknowledgements normally appear. * @version $Revision: 1.2 $ $Date: 2003/10/09 21:31:39 $
0
String valueToCopy = null; if( null == transfer.fromType ) { // copying from current configuration valueToCopy = base.get(transfer.fromKey); // copying from another configuration if (null != other){ if (otherValues.containsKey(transfer.fr...
0
import org.codehaus.jackson.annotate.JsonProperty;
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
* * * * * * * * * * * *
0
import com.fasterxml.jackson.annotation.JsonFilter; @JsonFilter("committedMetrics")
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
* * @param <ArgT> the argument type public <ArgT> InstanceBuilder<T> withArg(Class<? super ArgT> argType, ArgT value) {
0
* Returns true if this manager has a provider for a particular scheme. */ public boolean hasProvider(final String scheme); /**
0
/* ==================================================================== * Copyright (c) 2001-2004 The Apache Software Foundation. All rights * @version $Revision: 1.10 $ $Date: 2004/01/14 21:34:26 $
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.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.metadata.schema.TabletMetadata; import org.apache.accumulo.core.metadata.schema.TabletsMetadata; private void nextTablet() throws TableNotFoundException, AccumuloException, IOException, AccumuloSecurityException { ...
0
import java.util.Map; * @return A map of <code>FileItem</code> instances parsed from the request. * * @throws FileUploadException if there are problems reading/parsing * the request or storing files. * * @since 1.3 */ public Map<String, List<FileItem>> ...
0
import org.apache.felix.http.base.internal.handler.ServletHandler; abstract class BaseServletDTOBuilder /** * Build a servlet DTO from a servlet info * @param info The servlet info * @return A servlet DTO */ public static void fill(final BaseServletDTO dto, final ServletHandler handler) ...
0
// if(is1.available() == 6) //{ //} //else { // System.err.println("is1.available() = " + is1.available() + ", should be 6"); //} //if(is2.available() == 6) //{ //} assertTrue("Expected read_ok to be true, got " + read_ok, read_ok)...
0
lh.setAddConfirmed(readCounter);
0
public enum RandomAccessMode READ(true, false), READWRITE(true, true);
0
((CapabilityImpl) cap).setResource(this);
0
* public class SwallowedExceptionLogger implements SwallowedExceptionListener { * Create a SwallowedExceptionLogger with the given logger. By default, expired connection logging is turned on. * @param log * logger * Create a SwallowedExceptionLogger with the given logger and expired con...
0
runMergeTest(c, tableName + tc++, new String[] {"m"}, new String[] {"a"}, null, null, "b", 2L); runMergeTest(c, tableName + tc++, new String[] {"m"}, new String[] {"z"}, null, null, "b", 2L); 2L); "b", 3L); "b", 3L); 2L); 2L); 2L); null, "b", 2L); ...
0
protected Lock getLockToAcquireForStateAccessDuringBundles() { return stateBackendLock; } @Override
0
import org.apache.beam.sdk.transforms.DoFn; new DoFn<KV<K, CoGbkResult>, KV<K, KV<V1, V2>>>() { @ProcessElement new DoFn<KV<K, CoGbkResult>, KV<K, KV<V1, V2>>>() { @ProcessElement new DoFn<KV<K, CoGbkResult>, KV<K, KV<V1, V2>>>() { @ProcessElement
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.beam.model.pipeline.v1.RunnerApi.Environment; @Test public void testEnvironment() { SdkComponents sdkComponents = SdkComponents.create(); Environment env = Environment.newBuilder().setUrl("java_test").build(); String id = sdkComponents.registerEnvironment(env); RehydratedComponent...
0
import org.apache.aurora.common.stats.StatsProvider; import org.apache.aurora.common.util.Clock; import org.apache.aurora.common.util.testing.FakeClock;
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 $Revision$ $Date$
0
import java.lang.reflect.Method; // Set up the component manager of the block try { // FIXME make the component manager class configurable String serviceManagerClassName = "org.apache.cocoon.container.ECMBlockServiceManager"; this.serviceManager = (ServiceManager) Cla...
0
import org.apache.beam.sdk.state.BagState; import org.apache.beam.sdk.state.CombiningState; import org.apache.beam.sdk.state.GroupingState; import org.apache.beam.sdk.state.MapState; import org.apache.beam.sdk.state.ReadableState; import org.apache.beam.sdk.state.SetState; import org.apache.beam.sdk.state.ValueState; i...
0
// Implementation methods
0
import java.util.stream.IntStream; import org.apache.beam.sdk.extensions.sql.SqlTypeCoder.SqlArrayCoder; private static final long UNLIMITED_ARRAY_SIZE = -1L; SqlTypeName fieldTypeName = relFieldType.getType().getSqlTypeName(); if (SqlTypeName.ARRAY.equals(fieldTypeName)) { RelDataType elementType = re...
0
public HttpRequestHandler lookup(final HttpRequest request) {
0
String getPrevNamespaceURI(); String getPrevNodeName(); void initMutationNameEvent(String typeArg, boolean canBubbleArg, boolean cancelableArg, Node relatedNodeArg, String prevNamespac...
0
this.charencoder.reset();
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
* * @since 4.0
0
if (childWrapElement == null) throw new BindingException("RepeaterBinding misses '<on-bind>' child definition. " + DomHelper.getLocation(bindingElm)); JXPathBindingBase[] childBindings = assistant.makeChildBindings(childWrapElement); JXPathBindingBase[] deleteBindings =...
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