Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.Properties;
0
import org.apache.hc.client5.http.impl.AuthSupport; AuthSupport.extractFromAuthority(authority, (CredentialsStore) credsProvider); final HttpHost target = AuthSupport.resolveAuthTarget(request, route);
0
import org.apache.commons.exec.CommandLine; protected CommandLine getProcEnvCommand() { CommandLine commandLine = new CommandLine(); commandLine.setExecutable("show"); commandLine.addArgument("logical"); return commandLine;
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"); 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 in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */
0
public void visitLocalVariableInstruction( LocalVariableInstruction i ) { public void visitArrayInstruction( ArrayInstruction i ) { public void visitFieldInstruction( FieldInstruction i ) { public void visitInvokeInstruction( InvokeInstruction i ) { public void visitAllocationInstruction( AllocationInstruction i ) { public void visitLDC( LDC i ) { public void visitLDC2_W( LDC2_W i ) { public void visitConstantPushInstruction( ConstantPushInstruction i ) { public void visitINSTANCEOF( INSTANCEOF i ) { public void visitCHECKCAST( CHECKCAST i ) { public void visitReturnInstruction( ReturnInstruction i ) { public void visitBranchInstruction( BranchInstruction bi ) { public void visitRET( RET i ) {
0
windowToString((IntervalWindow) window(0, 10), windowCoder), new Instant(9), "k"))); runner.processElement(WindowedValue.valueInEmptyWindows( TimerOrElement.<KV<String, String>>timer( // TODO: To simplify tests, create a timer manager that can sweep a watermark past some timers // and fire them as appropriate. This would essentially be the batch timer context. runner.processElement(WindowedValue.valueInEmptyWindows( TimerOrElement.<KV<String, Long>>timer( windowToString((IntervalWindow) window(0, 10), windowCoder), new Instant(9), "k")));
0
@Override @Override @Override @Override @Override @Override @Override @Override @Override @Override
0
cnxnFactory.start();
0
import org.apache.hc.core5.http.HttpVersion; import org.apache.hc.core5.http.ProtocolVersion; import org.apache.hc.core5.http.message.RequestLine; ProtocolVersion transportVersion = message.getVersion(); if (transportVersion == null || transportVersion.greaterEquals(HttpVersion.HTTP_2_0)) { transportVersion = HttpVersion.HTTP_1_1; } getLineFormatter().formatRequestLine(lineBuf, new RequestLine(message.getMethod(), message.getUri(), transportVersion));
0
for (Object o : targets.entrySet()) { Map.Entry e = (Map.Entry) o; (DoublyIndexedTable.Entry) j.next(); targetListener); targetListener); for (Map.Entry e : targetEntries) { (DoublyIndexedTable.Entry) j.next(); && sandwich.animation.isDirty) { sandwich.lowestAnimation.usesUnderlyingValue(); targetListener); false, targetListener); && sandwich.animation.isDirty) { sandwich.lowestAnimation.usesUnderlyingValue(); targetListener); targetListener); && sandwich.animation.isDirty) {
0
@Override @Override @Override
0
reportError("character.unexpected", new Object[] { new Integer(current) });
0
private final static Set<String> KEYWORDS = new HashSet<>( Arrays.asList("abstract", "continue", "for", "new", "switch", "super", "while")); public void set(CommandSession session, String[] argv) { for (String key : new TreeSet<>(Shell.getVariables(session))) { Class<?> clazz = target.getClass(); list = new ArrayList<>(); Set<String> snames = new TreeSet<>(); Map<String, Integer> scopes = new TreeMap<>(); Set<String> cmds = new LinkedHashSet<>(); ArrayList<Method> list = new ArrayList<>();
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.MoreObjects;
0
import org.apache.hc.core5.http.ConnectionClosedException; if (sock == null) { throw new ConnectionClosedException("Connection is closed"); }
0
import com.google.common.collect.ImmutableSet; import org.apache.aurora.gen.Metadata; .setMetadata(ImmutableSet.<Metadata>of())
0
* * * @return FileObject representing the base folder. * @return The FileObject. * @return The depth of the file relative to the base folder.
0
Set<Pair<Text,Text>> fetchedColumns = new HashSet<>(); fetchedColumns.add(new Pair<>(new Text("colf1"), new Text("colq1"))); fetchedColumns.add(new Pair<>(new Text("colf2"), new Text("colq2"))); ArrayList<IteratorSetting> iterators = new ArrayList<>();
0
SortedMap<String,TableInfo> tableStats = new TreeMap<>(Monitor.getMmi().tableMap);
0
String.format("Cannot provide a coder for wildcard type %s.", type), ReasonCode.UNKNOWN);
0
__input.close(); __output.close();
0
import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.fail; @org.junit.jupiter.api.Test @org.junit.jupiter.api.Test
0
* Copyright (C) 2015 Google Inc.
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 use this file except in compliance with * the License. You may obtain a copy of the License at
0
import junit.framework.TestCase;
0
* @version CVS $Id: ObjectModelHelper.java,v 1.2 2003/03/17 02:28:12 vgritsenko Exp $ /** Key for the expiration value (Long) in the object model. */ /** * Key for a {@link Map} containing information from * a parent request provided to a sub-request (internal processing) */
0
import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Lob; import javax.persistence.Table;
0
byte[] data = Base64.decodeBase64(merges.getBytes());
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/MapUtils.java,v 1.23 2003/05/09 18:41:34 scolebourne Exp $ * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * any, must include the following acknowledgment: * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * permission of the Apache Software Foundation. import org.apache.commons.collections.decorators.FixedSizeMap; import org.apache.commons.collections.decorators.FixedSizeSortedMap; import org.apache.commons.collections.decorators.LazyMap; import org.apache.commons.collections.decorators.LazySortedMap; import org.apache.commons.collections.decorators.PredicatedMap; import org.apache.commons.collections.decorators.PredicatedSortedMap; import org.apache.commons.collections.decorators.TypedMap; import org.apache.commons.collections.decorators.TypedSortedMap; * @version $Revision: 1.23 $ $Date: 2003/05/09 18:41:34 $ return PredicatedMap.decorate(map, keyPred, valuePred); return TypedMap.decorate(map, keyType, valueType); return FixedSizeMap.decorate(map); return LazyMap.decorate(map, factory); return LazyMap.decorate(map, transformerFactory); return PredicatedSortedMap.decorate(map, keyPred, valuePred); return TypedSortedMap.decorate(map, keyType, valueType); return FixedSizeSortedMap.decorate(map); return LazySortedMap.decorate(map, factory); return LazySortedMap.decorate(map, transformerFactory);
0
import javax.inject.Singleton;
1
* {@link KeySelector} that retrieves a key from a {@link KV}. This will return the key as encoded * by the provided {@link Coder} in a {@link ByteBuffer}. This ensures that all key * comparisons/hashing happen on the encoded form. implements KeySelector<WindowedValue<KV<K, V>>, ByteBuffer>, ResultTypeQueryable<ByteBuffer> {
1
import java.io.IOException; import javax.xml.parsers.ParserConfigurationException; import org.xml.sax.SAXException; Document inputDoc = null; if (input.getSubNode() != null) { inputDoc = XMLUtils.getOwnerDocument(input.getSubNode()); } else { inputDoc = XMLUtils.getOwnerDocument(input.getNodeSet()); } } catch (SAXException ex) { throw new TransformationException("empty", ex); } catch (IOException ex) { throw new TransformationException("empty", ex); } catch (ParserConfigurationException ex) { throw new TransformationException("empty", ex);
0
static <W, T> Dataset<Pair<W, T>> extractWindowsToPair(Dataset<T> input, Class<W> expectedWindowType) { return FlatMap.of(input) .using((UnaryFunctor<T, Pair<W, T>>) (elem, context) -> { Object actualWindow = context.getWindow(); if (actualWindow != null && !expectedWindowType.isAssignableFrom(actualWindow.getClass())) { throw new IllegalStateException( "Encountered window of type " + actualWindow.getClass() + " but expected only " + expectedWindowType); } @SuppressWarnings("unchecked") Pair<W, T> out = Pair.of((W) actualWindow, elem); context.collect(out); }) .output(); }
0
package org.apache.ambari.server.state; import org.apache.ambari.server.state.DeployState; import org.apache.ambari.server.state.State; public class DeployStateTest { State s1 = new State(); State s2 = new State(); s1.setState(DeployState.INSTALLED);
0
package org.apache.batik.gvt.filter; import org.apache.batik.ext.awt.image.GraphicsUtil;
0
* number of elements in the vector or array, where −2147483648 * (Integer.MIN_INT) describes an unbounded Vector and 2147483647 * (Integer.MAX_INT) describes an unbounded array. If the cardinality is * zero, the property is a scalar value. If the defined value of the * property is set in the value attribute, the cardinality defaults to0 * (zero for scalar value). If the property is defined in one or more * properties starting with values, the cardinality defaults to * 2147483647 (Integer.MAX_INT), that is an unbounded array.
0
final InstructionHandle toThis = ih;
1
// Implementation methods
0
@Override @Override @Override @Override @Override @Override @Override @Override
0
public void acceptOffers(Protos.OfferID offerId, Collection<Protos.Offer.Operation> operations, Protos.Filters filter) {
0
final Integer elta = new Integer(17); // Cannot use valueOf here final Integer eltb = new Integer(17);
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 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 in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.beam.runners.fnexecution.control; /** Control client pool that exposes a source and sink of control clients. */ public interface ControlClientPool<T extends InstructionRequestHandler> { /** Source of control clients. */ ClientSource<T> getSource(); /** Sink for control clients. */ ClientSink<T> getSink(); /** A source of control clients. */ @FunctionalInterface interface ClientSource<T> { T take() throws Exception; } /** A sink for control clients. */ @FunctionalInterface interface ClientSink<T> { void put(T controlClient) throws Exception; } }
0
/** The engine for this expression. */ protected final JexlEngine jexl; public ScriptImpl(JexlEngine engine, String scriptText, ASTJexlScript scriptTree) { jexl = engine; Interpreter interpreter = jexl.createInterpreter(context); return interpreter.interpret(parsedScript, jexl.isSilent());
0
static final String[] functions = { "telnetd" };
0
*/ public I2S() { super(org.apache.bcel.Constants.I2S); } /** * Call corresponding visitor method(s). The order is: * Call visitor methods of implemented interfaces first, then * call methods according to the class hierarchy in descending order, * i.e., the most specific visitXXX() call comes last. * * @param v Visitor object */ public void accept( Visitor v ) { v.visitTypedInstruction(this); v.visitStackProducer(this); v.visitStackConsumer(this); v.visitConversionInstruction(this); v.visitI2S(this); }
0
* import org.apache.bcel.classfile.ConstantModule; import org.apache.bcel.classfile.ConstantPackage; /** @since 6.1 */ public int constantModuleCount = 0; /** @since 6.1 */ public int constantPackageCount = 0; // TODO Auto-generated method stub // TODO Auto-generated method stub } /** @since 6.1 */ @Override public void visitConstantPackage(ConstantPackage constantPackage) { constantPackageCount++; } /** @since 6.1 */ @Override public void visitConstantModule(ConstantModule constantModule) { constantModuleCount++;
0
* @version $Revision$
0
throw new RuntimeException(e);
0
/** * Get a blueprint * @response.representation.200.doc Get a blueprint * @response.representation.200.mediaType application/json * @param blueprintName Name of the blueprint * @param revision The optional blueprint revision to get * @return blueprint definition * @throws Exception throws Exception (TBD) /** * Delete the blueprint * @response.representation.200.doc Delete a blueprint * @response.representation.200.mediaType application/json /** * Update a current blueprint. * * @response.representation.200.doc Updates a current blueprint to * update some of its fields. * @response.representation.200.mediaType application/json * @param blueprintName Name of the blueprint * @param blueprint Input blueprint object specifying the blueprint definition * @return Returns the new revision of the blueprint * @throws Exception throws Exception
0
import org.apache.aurora.scheduler.storage.durability.ThriftBackfill;
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 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 in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ambari.server.events.publishers; import java.util.concurrent.Executors; import org.apache.ambari.server.events.AmbariUpdateEvent; import com.google.common.eventbus.AsyncEventBus; import com.google.common.eventbus.EventBus; import com.google.inject.Singleton; @Singleton public final class StateUpdateEventPublisher { private final EventBus m_eventBus; public StateUpdateEventPublisher() { m_eventBus = new AsyncEventBus("ambari-update-bus", Executors.newSingleThreadExecutor()); } public void publish(AmbariUpdateEvent event) { m_eventBus.post(event); } public void register(Object object) { m_eventBus.register(object); } }
1
* Copyright 2001-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 or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * @version $Revision: 1.7 $ $Date: 2004/02/28 13:18:33 $
0
/* * 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 or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.cocoon.woody.formmodel; import org.apache.cocoon.woody.Constants; import org.apache.cocoon.woody.util.DomHelper; import org.w3c.dom.Element; /** * Builds {@link FormDefinition}s. * * @version $Id: FormDefinitionBuilder.java,v 1.11 2004/03/09 13:53:56 reinhard Exp $ */ public class FormDefinitionBuilder extends AbstractWidgetDefinitionBuilder { public WidgetDefinition buildWidgetDefinition(Element formElement) throws Exception { FormDefinition formDefinition = new FormDefinition(); setLocation(formElement, formDefinition); formDefinition.setId(""); setDisplayData(formElement, formDefinition); setValidators(formElement, formDefinition); Element widgetsElement = DomHelper.getChildElement(formElement, Constants.WD_NS, "widgets", true); // All child elements of the widgets element are widgets Element[] widgetElements = DomHelper.getChildElements(widgetsElement, Constants.WD_NS); for (int i = 0; i < widgetElements.length; i++) { Element widgetElement = widgetElements[i]; WidgetDefinition widgetDefinition = buildAnotherWidgetDefinition(widgetElement); formDefinition.addWidgetDefinition(widgetDefinition); } formDefinition.resolve(); return formDefinition; } }
0
import org.apache.aurora.gen.Container; import org.apache.aurora.gen.MesosContainer; import org.apache.aurora.scheduler.base.TaskTestUtil; .setTaskConfig(makeTaskConfig())); private static TaskConfig makeTaskConfig() { TaskConfig config = TaskTestUtil.makeConfig(JOB_KEY).newBuilder(); config.setIsService(false); // Bypassing a command-line argument in ConfigurationManager that by default disallows the // docker container type. config.setContainer(Container.mesos(new MesosContainer())); return config; }
0
/* * 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 or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.cocoon.forms.datatype.validationruleimpl; import org.apache.cocoon.forms.datatype.ValidationRule; import org.apache.cocoon.forms.util.DomHelper; import org.w3c.dom.Element; import org.outerj.expression.Expression; /** * Builds {@link AssertValidationRule}s. * * @version $Id$ */ public class AssertValidationRuleBuilder extends AbstractValidationRuleBuilder { public ValidationRule build(Element validationRuleElement) throws Exception { String exprStr = validationRuleElement.getAttribute("test"); if (exprStr.length() == 0) throw new Exception("assert validation rule requires a \"test\" attribute at " + DomHelper.getLocation(validationRuleElement)); Expression testExpression = parseExpression(exprStr, validationRuleElement, "test"); if (testExpression.getResultType() != null && !Boolean.class.isAssignableFrom(testExpression.getResultType())) throw new Exception("Expression should evaluate to a boolean on assert validation rule at " + DomHelper.getLocation(validationRuleElement)); AssertValidationRule rule = new AssertValidationRule(testExpression); buildFailMessage(validationRuleElement, rule); return rule; } }
0
public ConfigurationResponse createConfiguration(ConfigurationRequest request) * Get service config version history * @param requests service config version requests * @return service config versions * @throws AmbariException */ Set<ServiceConfigVersionResponse> getServiceConfigVersions(Set<ServiceConfigVersionRequest> requests) throws AmbariException; /** * Get cached clusterUpdateResults, used only for service config versions currently * @param clusterRequest * @return */ ClusterResponse getClusterUpdateResults(ClusterRequest clusterRequest); /**
0
/** * Copyright 2016-2017 Seznam.cz, a.s. * * 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 in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package cz.seznam.euphoria.spark; import cz.seznam.euphoria.core.client.accumulators.AccumulatorProvider; import cz.seznam.euphoria.core.client.accumulators.Counter; import cz.seznam.euphoria.core.client.accumulators.Histogram; import cz.seznam.euphoria.core.client.accumulators.Timer; import cz.seznam.euphoria.core.util.Settings; import java.io.Serializable; import java.util.Objects; class LazyAccumulatorProvider implements AccumulatorProvider, Serializable { private final Factory factory; private final Settings settings; private transient AccumulatorProvider accumulators; LazyAccumulatorProvider(Factory factory, Settings settings) { this.factory = Objects.requireNonNull(factory); this.settings = Objects.requireNonNull(settings); } @Override public Counter getCounter(String name) { return getAccumulatorProvider().getCounter(name); } @Override public Histogram getHistogram(String name) { return getAccumulatorProvider().getHistogram(name); } @Override public Timer getTimer(String name) { return getAccumulatorProvider().getTimer(name); } AccumulatorProvider getAccumulatorProvider() { if (accumulators == null) { accumulators = factory.create(settings); } return accumulators; } }
0
import org.apache.zookeeper.client.ZKClientConfig; System.setProperty(ZKClientConfig.LOGIN_CONTEXT_NAME_KEY, "MyZookeeperClient"); System.setProperty(ZKClientConfig.ENABLE_CLIENT_SASL_KEY, "false"); System.setProperty(ZKClientConfig.ENABLE_CLIENT_SASL_KEY, "true");
0
* @version $Id$
0
/** * Invoked if the user configured usage of a proprietary heartbeat mechanism. * <B>Note:</B> by default throws {@code UnsupportedOperationException} so * users who configure a proprietary heartbeat mechanism option must provide * an implementation for this method. * * @param service The {@link ConnectionService} through which the heartbeat * is being executed. * @return {@code true} whether heartbeat actually sent - <B>Note:</B> used * mainly for debugging purposes. * @throws Exception If failed to send the heartbeat - <B>Note:</B> causes * associated session termination. */ default boolean sendReservedHeartbeat(ConnectionService service) throws Exception { throw new UnsupportedOperationException("Reserved heartbeat not implemented for " + service); }
0
public class ComponentLayoutRecommendationCommand extends public ComponentLayoutRecommendationCommand(File recommendationsDir, String stackAdvisorScript, int requestId, StackAdvisorRunner saRunner, AmbariMetaInfo metaInfo) { if (request.getHosts() == null || request.getHosts().isEmpty() || request.getServices() == null || request.getServices().isEmpty()) {
0
Kind value() default Kind.UNSPECIFIED; enum Kind {
0
authSocket = this.getString(SshAgent.SSH_AUTHSOCKET_ENV_NAME); final int copyBufSize = this.getIntProperty(FORWARDER_BUFFER_SIZE, DEFAULT_FORWARDER_BUF_SIZE);
0
throw new MojoExecutionException("getExternalFieldByName not supported for this class."); throw new MojoExecutionException("getReferencedClass not supported for this class.");
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 use this file except in compliance with * the License. You may obtain a copy of the License at
1
@NamedQuery(name = "principalByPrivilegeId", query = "SELECT principal FROM PrincipalEntity principal JOIN principal.privileges privilege WHERE privilege.permission.id=:permission_id"), @NamedQuery(name = "principalByPrincipalType", query = "SELECT principal FROM PrincipalEntity principal WHERE principal.principalType.name = :principal_type")
0
Map<String, String> commandParams = actionExecContext.getParameters() != null ? actionExecContext.getParameters() : new TreeMap<>();
0
import org.apache.felix.dependencymanager.test2.components.Ensure; import org.apache.felix.dependencymanager.test2.integration.common.TestBase; import org.ops4j.pax.exam.junit.PaxExam;
0
import org.apache.hc.client5.http.ssl.DefaultClientTlsStrategy; return createHttp2Minimal(h2Config, ioReactorConfig, DefaultClientTlsStrategy.getDefault());
0
import org.junit.Rule; import org.junit.rules.ExpectedException; @Rule public ExpectedException thrown = ExpectedException.none(); public void testVerifyCompatibility() throws IncompatibleWindowException { SlidingWindows.of(new Duration(10)).verifyCompatibility(SlidingWindows.of(new Duration(10))); thrown.expect(IncompatibleWindowException.class); SlidingWindows.of(new Duration(10)).verifyCompatibility(SlidingWindows.of(new Duration(20))); } @Test
0
import java.sql.Connection; * @version CVS $Id: PervasiveEsqlQuery.java,v 1.3 2003/03/20 21:51:43 tcurdt Exp $ public PervasiveEsqlQuery(Connection connection, String query) {
0
* @version CVS $Id: TreeProcessor.java,v 1.32 2004/05/26 01:31:06 joerg Exp $
0
shellState.getAccumuloClient().namespaceOperations().create(namespace); if (shellState.getAccumuloClient().namespaceOperations().exists(namespace)) { configuration = shellState.getAccumuloClient().namespaceOperations().getProperties(copy); shellState.getAccumuloClient().namespaceOperations().setProperty(namespace, entry.getKey(), entry.getValue());
0
/** Major version number of class files for Java 9. * @see #MINOR_9 public static final short MAJOR_9 = 53; /** Minor version number of class files for Java 9. * @see #MAJOR_9 public static final short MINOR_9 = 0; /** * @deprecated Use {@link #MAJOR_9} instead */ @Deprecated public static final short MAJOR_1_9 = MAJOR_9; /** * @deprecated Use {@link #MINOR_9} instead */ @Deprecated public static final short MINOR_1_9 = MINOR_9; * @see #MINOR_10 public static final short MAJOR_10 = 54; * @see #MAJOR_10 public static final short MINOR_10 = 0; * @see #MINOR_11 public static final short MAJOR_11 = 55; * @see #MAJOR_11 public static final short MINOR_11 = 0;
0
import org.apache.cocoon.forms.datatype.convertor.ConversionResult; * @version $Id: AbstractDatatype.java,v 1.5 2004/05/06 14:59:44 bruno Exp $ public ConversionResult convertFromString(String value, Locale locale) {
0
LOG.debug(ShellCommandUtil.hideOpenSslPassword(command));
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/iterators/FilterListIterator.java,v 1.3 2003/08/31 17:25:49 scolebourne Exp $ * 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.3 $ $Date: 2003/08/31 17:25:49 $
0
import org.apache.accumulo.server.security.SecurityOperationImpl; security = SecurityOperationImpl.getInstance();
0
if (isKnopflerfish()) { return; // Test disabled on KF }
0
* @since 6.0
0
public void testDebuggerConfig() throws IOException { final String cdbgVersion = "test-v1"; DataflowPipelineOptions options = buildPipelineOptions(); options.setCdbgVersion(cdbgVersion); String expectedConfig = "{\"version\":\"test-v1\"}"; Pipeline p = buildPipeline(options); p.traverseTopologically(new RecordingPipelineVisitor()); Job job = DataflowPipelineTranslator.fromOptions(options).translate( p, Collections.<DataflowPackage>emptyList()); for (WorkerPool pool : job.getEnvironment().getWorkerPools()) { if (pool.getKind() == DataflowPipelineTranslator.HARNESS_WORKER_POOL) { assertEquals(pool.getMetadata().get("debugger"), expectedConfig); } } } @Test
0
package org.apache.beam.sdk.extensions.sql.planner; import org.apache.beam.sdk.extensions.sql.BeamSqlEnv; import org.apache.beam.sdk.extensions.sql.rel.BeamLogicalConvention; import org.apache.beam.sdk.extensions.sql.rel.BeamRelNode; import org.apache.beam.sdk.extensions.sql.schema.BaseBeamTable; import org.apache.beam.sdk.extensions.sql.schema.BeamSqlRow;
0
p.apply(Create.of(Arrays.asList(TABLE)).withCoder( KvCoder.of(StringUtf8Coder.of(), BigEndianIntegerCoder.of()))); p.apply(Create.of(Arrays.asList(EMPTY_TABLE)).withCoder( KvCoder.of(StringUtf8Coder.of(), BigEndianIntegerCoder.of())));
0
* @version CVS $Id: PlainFloatConvertor.java,v 1.2 2004/01/30 00:40:34 joerg Exp $ return new Float(value); return Float.class;
0
* @version CVS $Id: PortletRequest.java,v 1.1 2004/02/23 15:14:01 cziegeler Exp $
0
import org.apache.ambari.server.state.HostHealthStatus; import org.apache.ambari.server.state.HostState; import org.apache.ambari.server.state.HostHealthStatus.HealthStatus;
0
import org.apache.beam.sdk.transforms.OldDoFn; .apply("Identity", ParDo.of(new OldDoFn<T, T>() {
0
package org.apache.jute;
0
ZooKeeper zk = new ZooKeeper(HOSTPORT, CONNECTION_TIMEOUT, this);
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 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 in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ambari.server.serveraction.kerberos; import org.junit.Assert; import org.junit.Test; public class KerberosOperationHandlerFactoryTest { @Test public void testForAD() { Assert.assertEquals(MITKerberosOperationHandler.class, KerberosOperationHandlerFactory.getKerberosOperationHandler(KDCType.MIT_KDC).getClass()); } @Test public void testForMIT() { Assert.assertEquals(ADKerberosOperationHandler.class, KerberosOperationHandlerFactory.getKerberosOperationHandler(KDCType.ACTIVE_DIRECTORY).getClass()); } }
0
/** * Extracts the array of SubjectAlt DNS names from an X509Certificate. * Returns null if there aren't any. * <p/> * Note: Java doesn't appear able to extract international characters * from the SubjectAlts. It can only extract international characters * from the CN field. * <p/> * (Or maybe the version of OpenSSL I'm using to test isn't storing the * international characters correctly in the SubjectAlts?). * * @param cert X509Certificate * @return Array of SubjectALT DNS names stored in the certificate. */ public static String[] getDNSSubjectAlts(final X509Certificate cert) { return extractSubjectAlts(cert, null); }
0
* of RFC 977.
0
int result = 17; if (id != null) { result = 31 * result + id.hashCode(); } if (encoding != null) { result = 31 * result + encoding.hashCode(); } if (mimeType != null) { result = 31 * result + mimeType.hashCode(); } result = 31 * result + content.hashCode(); return result;
0
/** Generate {@link Schema} from {@code RelDataType} which is used to create table. */
0
handleRequest(request, connState, conn); connState.setOutputState(ServerConnState.RESPONSE_DONE); connState.resetOutput(); connState.resetInput(); connState.setOutputState(ServerConnState.RESPONSE_BODY_DONE); connState.resetOutput(); connState.resetInput(); final HttpRequest request, connState.setInputState(ServerConnState.REQUEST_RECEIVED); connState.setRequest(request); HttpParamsLinker.link(request, this.params); if (connState.getOutputState() == ServerConnState.RESPONSE_DONE && conn.isOpen()) { connState.resetInput(); connState.resetOutput(); public static final int RESPONSE_BODY_DONE = 32; public static final int RESPONSE_DONE = 32;
0
import org.apache.batik.css.engine.value.ValueManager;
0
class BHttpConnectionBase implements BHttpConnection { final SessionInputBufferImpl inbuffer; final SessionOutputBufferImpl outbuffer; final MessageConstraints messageConstraints; final HttpConnectionMetricsImpl connMetrics; final AtomicReference<Socket> socketHolder; BHttpConnectionBase( final MessageConstraints messageConstraints) { Socket getSocket() { protected OutputStream createContentOutputStream( if (len >= 0) { return new ContentLengthOutputStream(outbuffer, len); } else if (len == ContentLengthStrategy.CHUNKED) { return new IdentityOutputStream(outbuffer); protected InputStream createContentInputStream( if (len > 0) { return new ContentLengthInputStream(inbuffer, len); } else if (len == 0) { } else if (len == ContentLengthStrategy.CHUNKED) { return new ChunkedInputStream(inbuffer, this.messageConstraints); return new IdentityInputStream(inbuffer); HttpEntity createIncomingEntity( final HttpMessage message, final SessionInputBuffer inbuffer, final long len) throws HttpException { if (len >= 0) { entity.setContentLength(len); } else if (len == ContentLengthStrategy.CHUNKED) { entity.setChunked(true); entity.setContentLength(-1); entity.setContent(createContentInputStream(len, inbuffer)); this.outbuffer.flush();
0
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @SuppressFBWarnings("NN_NAKED_NOTIFY") @Override
0
@Override protected void setUp() throws Exception { listener = new CollectionFilesystemListener(true); super.setUp(); }
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/map/TestFlat3Map.java,v 1.1 2003/11/18 23:23:05 scolebourne Exp $ package org.apache.commons.collections.map; import org.apache.commons.collections.BulkTest; * @version $Revision: 1.1 $ $Date: 2003/11/18 23:23:05 $
0