Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
List<CheckQualification> qualifications = Lists.newArrayList(
0
ALWAYS_APPLY(true, true), NEVER_APPLY(false, false), ONLY_STACK_DEFAULTS_APPLY(true, false), ALWAYS_APPLY_DONT_OVERRIDE_CUSTOM_VALUES(true, false); public static ConfigRecommendationStrategy defaultForAddService() { return ALWAYS_APPLY_DONT_OVERRIDE_CUSTOM_VALUES; } private final boolean useStackAdvisor; private final boolean overrideCustomValues; public boolean shouldUseStackAdvisor() { return useStackAdvisor; } public boolean shouldOverrideCustomValues() { return overrideCustomValues; } ConfigRecommendationStrategy(boolean useStackAdvisor, boolean overrideCustomValues) { this.useStackAdvisor = useStackAdvisor; this.overrideCustomValues = overrideCustomValues; }
0
* $HeadURL:https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/TestBuffers.java $ * $Revision:503277 $ * $Date:2007-02-03 18:22:45 +0000 (Sat, 03 Feb 2007) $ package org.apache.http.nio.util; import org.apache.http.nio.util.InputBuffer; import org.apache.http.nio.util.OutputBuffer; * @version $Id:TestBuffers.java 503277 2007-02-03 18:22:45 +0000 (Sat, 03 Feb 2007) olegk $
0
package org.apache.felix.sigil.common.repository;
0
* @since 4.2
0
* @version CVS $Id: PortletEnvironment.java,v 1.3 2004/05/01 00:05:44 joerg Exp $ * In portlet environment this is the same as {@link #redirect(boolean, String)}
0
FILE, EXTERNAL_AUTH, SIMPLE
0
@Override
0
void verify(HttpRequest request, EntityDetails entityDetails, ExpectationChannel expectationChannel) throws HttpException, IOException;
0
import org.apache.cocoon.components.RequestLifecycleComponent; * @version CVS $Id: AuthenticationManager.java,v 1.2 2003/03/19 12:47:34 cziegeler Exp $ implements Configurable, SitemapConfigurable, RequestLifecycleComponent {
0
new ImmutableSet.Builder<>();
0
* @return The interval between the subsequent retry in milliseconds. long getRetryInterval(HttpResponse response, HttpContext context);
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
@Override @Override @Override @Override
0
BatchScanConfig tableConfig1 = new BatchScanConfig(table1); BatchScanConfig tableConfig2 = new BatchScanConfig(table2); * Verify {@link BatchScanConfig} objects get correctly serialized in the JobContext. BatchScanConfig table1 = new BatchScanConfig(TEST_TABLE_1).setRanges(Collections.singletonList(new Range("a", "b"))) BatchScanConfig table2 = new BatchScanConfig(TEST_TABLE_2).setRanges(Collections.singletonList(new Range("a", "b")))
0
import java.util.LinkedList; import java.util.List; @Override public List<Set<AuthProperty>> getProperties() { List<Set<AuthProperty>> toRet = new LinkedList<Set<AuthProperty>>(); Set<AuthProperty> internal = new TreeSet<AuthProperty>(); internal.add(new AuthProperty("password", "the password for the principal")); toRet.add(internal); return toRet; }
0
"BeamProjectRel(order_id=[$0], site_id=[$1], price=[$2], shipping=[$3], notes=[$4])\n" + " BeamProjectRel(order_id=[$0], site_id=[$1], price=[$2], shipping=[null]," + " notes=[null])\n"
0
* <code>"M</code>&uuml;<code>ller-L</code>&uuml;<code>denscheidt" =&gt; "MULLERLUDENSCHEIDT" =&gt; "6005507500206880022"</code> * <code>"6005507500206880022" =&gt; "6050750206802"</code></li> * <code>"6050750206802" =&gt; "65752682"</code></li>
0
Path rootPath = new Path(fs.getUri().toString() + cluster.getTemporaryPath(), getClass().getName());
0
Copyright 2001-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 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
* Does nothing. This factory does not cache user credentials. // Does nothing. This factory does not cache user credentials.
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.hadoop.yarn.server.applicationhistoryservice.metrics.timeline; /** * Is used to determine metrics aggregate table. * * @see org.apache.hadoop.yarn.server.applicationhistoryservice.webapp.TimelineWebServices#getTimelineMetric * @see org.apache.hadoop.yarn.server.applicationhistoryservice.webapp.TimelineWebServices#getTimelineMetrics */ public enum Precision { SECONDS, MINUTES, HOURS; public static class PrecisionFormatException extends IllegalArgumentException { public PrecisionFormatException(String message, Throwable cause) { super(message, cause); } } public static Precision getPrecision(String precision) throws PrecisionFormatException { if (precision == null ) { return null; } try { return Precision.valueOf(precision.toUpperCase()); } catch (IllegalArgumentException e) { throw new PrecisionFormatException("precision should be seconds, minutes or hours", e); } } }
0
import org.apache.beam.sdk.io.Source; XMLReader(XmlSource<T> source) {
0
/** * Copyright 2016 Seznam 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. */
0
/* * Copyright 2002-2006 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. */
0
/* * Copyright 2006 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 demo; public class MyBean { public String message = "This is a message coming from a Spring bean."; }
0
assertTrue("Expecting NEW_VAL in "+environment,environment.indexOf("NEW_VAL") >= 0); } public void testAddEnvironmentVariableEmbeddedQuote() throws Exception { Map myEnvVars = new HashMap(); myEnvVars.putAll(EnvironmentUtils.getProcEnvironment()); String name = "NEW_VAR"; String value = "NEW_\"_VAL"; myEnvVars.put(name,value); exec.execute(new CommandLine(environmentSript), myEnvVars); String environment = baos.toString().trim(); assertTrue("Expecting "+name+" in "+environment,environment.indexOf(name) >= 0); assertTrue("Expecting "+value+" in "+environment,environment.indexOf(value) >= 0);
0
Properties proxyProps = new Properties(); proxyProps.put("tokenClass", PasswordToken.class.getName()); proxyProps.putAll(getConnectionInfo().getProperties()); final TServer proxyServer = Proxy.createProxyServer( HostAndPort.fromParts("localhost", proxyPort), protocol, proxyProps).server;
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.zookeeper.metrics; /** * A generic exception thrown during the licecycle of a MetricsProvider. * <p>These exception will prevent the system from booting.</p> * <p>Normally these exception will be ignored during shutdown.</p> */ public class MetricsProviderLifeCycleException extends Exception { private static final long serialVersionUID = 1L; public MetricsProviderLifeCycleException() { } public MetricsProviderLifeCycleException(String message) { super(message); } public MetricsProviderLifeCycleException(String message, Throwable cause) { super(message, cause); } public MetricsProviderLifeCycleException(Throwable cause) { super(cause); } }
0
@SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
0
* @return the names, as a Set&lt;String&gt;
0
tabletsByGroup.add(new ComparablePair<>(partitioner.apply(entry.getKey()), entry.getKey())); serversGroupsToRemove.add(new Pair<>(group, srcTgi.getTserverInstance())); serversToRemove.add(new Pair<>(group, srcTgi)); emptyServerGroups.add(new Pair<>(group, srcTgi.getTserverInstance())); return new Pair<>(extent, loc);
0
if (modelsDirContents != null && modelsDirContents.length > 0) { Arrays.sort(modelsDirContents); for (File folder : modelsDirContents) { if (folder.isFile()) { // ignore files continue; } else if (!folder.getName().equals(PATCHES_FOLDER_NAME)){ // load the models alphabetically in the subfolders apart from patches loadModelsInFolder(folder); } }
0
import java.awt.color.ColorSpace; import java.awt.image.ComponentSampleModel; import java.lang.ref.Reference; import java.lang.ref.WeakReference;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/Attic/TransformIterator.java,v 1.6 2002/08/15 23:13:51 pjack Exp $ * $Revision: 1.6 $ * $Date: 2002/08/15 23:13:51 $ * @deprecated this class has been moved to the iterators subpackage public class TransformIterator extends org.apache.commons.collections.iterators.TransformIterator { super(); super( iterator, transformer );
0
package org.apache.accumulo.examples.simple.client;
0
public class BoundedSideInputJoin extends NexmarkQueryTransform {
0
if(width==0 || height==0){ if(image instanceof RenderedImage){ handleHREF((RenderedImage)image, imageElement); } else{ BufferedImage buf = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); Graphics2D g = buf.createGraphics(); g.drawImage(image, 0, 0, null); handleHREF((RenderedImage)buf, imageElement); }
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/AbstractFactory.java,v 1.5 2003/01/11 05:41:21 dmitri Exp $ * $Revision: 1.5 $ * $Date: 2003/01/11 05:41:21 $ * The {@link JXPathContext#createPath JXPathContext.createPath()} method of * JXPathContext can create missing objects as it traverses an XPath; it * utilizes an AbstractFactory for that purpose. Install a factory on * JXPathContext by calling {@link JXPathContext#setFactory JXPathContext. * setFactory()}. * All methods of this class return false. Override any of them to return true * to indicate that the factory has successfully created the described object. * @version $Revision: 1.5 $ $Date: 2003/01/11 05:41:21 $ * The parameters may describe a collection element or an individual * object. It is up to the factory to infer which one it is. If it is a * collection, the factory should check if the collection exists. If not, * it should create the collection. Then it should create the index'th * element of the collection and return true. * @param context can be used to evaluate other XPaths, get to variables * etc. * @param parent is the object that will server as a parent of the new * object * @param name is the name of the child of the parent that needs to be * created. In the case of DOM may be qualified. * @param index is used if the pointer represents a collection element. You * may need to expand or even create the collection to accomodate the new * element. Object parent, String name, int index) { * @param context hosts variable pools. See * {@link JXPathContext#getVariables() JXPathContext.getVariables()} public boolean declareVariable(JXPathContext context, String name) {
1
if (!doubleBufferedRendering) { suspendInteractions = false; } if (doubleBufferedRendering) { suspendInteractions = false; } if (doubleBufferedRendering) { suspendInteractions = false; }
0
import org.apache.felix.scr.impl.helper.ComponentMethods; * @param componentMethods ComponentMetadata metadata, ComponentMethods componentMethods ) super( activator, metadata, componentMethods ); final MethodResult result = getComponentMethods().getActivateMethod().invoke( implementationObject, new ActivatorParameter( final MethodResult result = getComponentMethods().getDeactivateMethod().invoke( implementationObject, new ActivatorParameter( componentContext, final MethodResult result = getComponentMethods().getModifiedMethod().invoke( getInstance(),
0
private boolean returnRawTypes; public ConvertType(boolean returnRawTypes) { this.returnRawTypes = returnRawTypes; } TypeDescriptor ret = createListType(type); return returnRawTypes ? ret.getRawType() : ret.getType(); return returnRawTypes ? type.getRawType() : type.getType();
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. */ * @version CVS $Id: DomHelper.java,v 1.15 2004/03/05 13:02:34 bdelacretaz Exp $
1
* <li>{@link #findFiles} to find a set of matching descendants in in the same file system. *<p>You can iterate over a FileObject using the Java "foreach" statement, which provides all descendants of a File * Finds the set of matching descendants of this file, in depthwise order. * Finds the set of matching descendants of this file. * folder that has children. Does not delete any descendants of this file, * Deletes all descendants of this file that match a selector. Does * @throws FileSystemException If this file or one of its descendants is read-only, or on error * deleting this file or one of its descendants. * Copies another file, and all its descendants, to this file.
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.base.Preconditions.checkNotNull; import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.MoreObjects; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap;
0
ResourceDependency setPropagate(boolean propagate);
0
AlgorithmSuiteSecurityEvent algorithmSuiteSecurityEvent = new AlgorithmSuiteSecurityEvent(); algorithmSuiteSecurityEvent.setAlgorithmURI(digestAlgorithm.getURI()); algorithmSuiteSecurityEvent.setKeyUsage(XMLSecurityConstants.Dig); algorithmSuiteSecurityEvent.setCorrelationID(referenceType.getId()); securityContext.registerSecurityEvent(algorithmSuiteSecurityEvent);
0
/** Determine if this is windows. */ private static final boolean WINDOWS = (File.separatorChar == '\\'); //----------------------------------------------------------------------- public void testConstants() throws Exception { assertEquals('/', IOUtils.DIR_SEPARATOR_UNIX); assertEquals('\\', IOUtils.DIR_SEPARATOR_WINDOWS); assertEquals("\n", IOUtils.LINE_SEPARATOR_UNIX); assertEquals("\r\n", IOUtils.LINE_SEPARATOR_WINDOWS); if (WINDOWS) { assertEquals('\\', IOUtils.DIR_SEPARATOR); assertEquals("\r\n", IOUtils.LINE_SEPARATOR); } else { assertEquals('/', IOUtils.DIR_SEPARATOR); assertEquals("\n", IOUtils.LINE_SEPARATOR); } } //-----------------------------------------------------------------------
0
EXT_XML, Collections.singletonList(FILE_PARAMS)); Collections.singletonList("org.apache.commons.configuration2.builder.XMLBuilderParametersImpl")); Collections.singletonList("org.apache.commons.configuration2.builder.JndiBuilderParametersImpl")); Collections.singletonList("org.apache.commons.configuration2.builder.BasicBuilderParameters")); Collections.singletonList(FILE_PARAMS)); Collections.singletonList("org.apache.commons.configuration2.builder.BasicBuilderParameters")); EXT_XML, Collections.singletonList(FILE_PARAMS));
0
public void encode(WindowedValue<T> windowedElem, OutputStream outStream) throws CoderException, IOException { encode(windowedElem, outStream, Context.NESTED); } @Override public WindowedValue<T> decode(InputStream inStream) throws CoderException, IOException { return decode(inStream, Context.NESTED); } @Override public void encode(WindowedValue<T> windowedElem, OutputStream outStream) throws CoderException, IOException { encode(windowedElem, outStream, Context.NESTED); } @Override public WindowedValue<T> decode(InputStream inStream) throws CoderException, IOException { return decode(inStream, Context.NESTED); } @Override
0
* @version $Revision$ $Date$
0
addNewConfigurationsFromXml();
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.
0
+ "`process`, deletes will supress data. When set to `fail`, any deletes seen will cause" + " an exception. The purpose of `fail` is to support tables that never delete data and" + " need fast seeks within the timestamp range of a column. When setting this to fail, " + "also consider configuring the `" + NoDeleteConstraint.class.getName() + "` " + "constraint."),
0
Document n = (Document)newNode(); if (deep) { for (Node c = getFirstChild(); c != null; c = c.getNextSibling()) { n.appendChild(n.importNode(c, deep)); } } return n;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/LongTest.java,v 1.6 2003/05/22 03:12:18 dgraham Exp $ * $Revision: 1.6 $ * $Date: 2003/05/22 03:12:18 $ * @version $Revision: 1.6 $ $Date: 2003/05/22 03:12:18 $ resources = new ValidatorResources(in);
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
* Copyright (c) 2002 The Apache Software Foundation. All rights
0
public void execute(final E input) {
0
* Copyright 2016 Seznam.cz, a.s.
0
ServerContext context = ServerContext.getInstance(opts.iname, opts.keepers, zkTimeOut); TransactionWatcher watcher = new TransactionWatcher(context);
0
r.addDescriptionEntry(ENTRY_EXPECTED_KEY, SelfContainedSVGOnLoadTest.ENTRY_KEY_NUMBER_OF_TEST_RESULT_ELEMENTS);
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.commons.io.serialization; import java.io.Closeable; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.junit.After; import org.junit.Before; /** Test base class that keeps track of Closeable objects * and cleans them up. */ public class ClosingBase { private final List<Closeable> toClose = new ArrayList<Closeable>(); protected <T extends Closeable> T willClose(T t) { toClose.add(t); return t; } @Before public void setup() throws IOException { toClose.clear(); } @After public void cleanup() { for (Closeable c : toClose) { try { c.close(); } catch (IOException ignored) { } } } }
0
* Implementation of a PATRICIA Trie (Practical Algorithm to Retrieve Information * Coded in Alphanumeric). * <p> * A PATRICIA {@link Trie} is a compressed {@link Trie}. Instead of storing * <p> * Most importantly, PATRICIA requires very few comparisons to keys while * <p> * The {@link Trie} can return operations in lexicographical order using the * <p> * This PATRICIA {@link Trie} supports both variable length & fixed length * <p> * Any methods here that take an {@link Object} argument may throw a
0
* limitations under the License.
0
streamApp.submit();
0
import org.apache.kafka.clients.consumer.OffsetAndTimestamp; hasRecordTimestamp = ConsumerRecord .class .getMethod("timestamp", (Class<?>[]) null) .getReturnType() .equals(Long.TYPE); hasOffsetsForTimes = Consumer .class .getMethod("offsetsForTimes", Map.class) .getReturnType() .equals(Map.class); } catch (NoSuchMethodException | SecurityException e) { if (!hasRecordTimestamp || (timestamp = rawRecord.timestamp()) <= 0L) { timestamp = System.currentTimeMillis(); // 'value' in the map returned by offsetFoTime() is null if there is no offset for the time. OffsetAndTimestamp offsetAndTimestamp = Iterables.getOnlyElement( consumer .offsetsForTimes(ImmutableMap.of(topicPartition, time.getMillis())) .values()); if (offsetAndTimestamp == null) { throw new RuntimeException("There are no messages has a timestamp that is greater than or " + "equals to the target time or the message format version in this partition is " + "before 0.10.0, topicPartition is: " + topicPartition); } else { return offsetAndTimestamp.offset();
0
* @version $Id$
0
import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse;
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.
0
* @version $Revision$
0
* <p>Please see 'build_rules.gradle' file for instructions regarding * running this test using Beam performance testing framework.</p>
0
* @version $Revision$
0
* Discovers a DuckSetExecutor. * * @param is the introspector * @param clazz the class to find the set method from * @param key the key to use as 1st argument to the set method * @param value the value to use as 2nd argument to the set method * @return the executor if found, null otherwise */ public static DuckSetExecutor discover(Introspector is, Class<?> clazz, Object key, Object value) { java.lang.reflect.Method method = is.getMethod(clazz, "set", makeArgs(key, value)); return method == null? null : new DuckSetExecutor(clazz, method, key); } /** * @param clazz the class the set method applies to * @param method the method called through this executor * @param key the key to use as 1st argument to the set method private DuckSetExecutor(Class<?> clazz, java.lang.reflect.Method method, Object key) { super(clazz, method); public Object invoke(Object obj, Object value) throws IllegalAccessException, InvocationTargetException { public Object tryInvoke(Object obj, Object key, Object value) {
0
import org.apache.sshd.common.util.logging.AbstractLoggingBean;
0
// Set the node mask // Set the node clip
0
Arg.create(Amount.of(10L, Time.SECONDS));
0
@Override @Override @Override
0
import com.google.cloud.dataflow.sdk.transforms.windowing.Trigger.OnElementEvent; import com.google.cloud.dataflow.sdk.transforms.windowing.Trigger.OnMergeEvent; import com.google.cloud.dataflow.sdk.transforms.windowing.Trigger.OnTimerEvent; isTriggerContext(), Mockito.<OnElementEvent<IntervalWindow>>any())) isTriggerContext(), Mockito.<OnElementEvent<IntervalWindow>>any())) when(mockTrigger1.onTimer(isTriggerContext(), Mockito.<OnTimerEvent<IntervalWindow>>any())) when(mockTrigger1.onTimer(isTriggerContext(), Mockito.<OnTimerEvent<IntervalWindow>>any())) when(mockTrigger1.onTimer(isTriggerContext(), Mockito.<OnTimerEvent<IntervalWindow>>any())) when(mockTrigger1.onTimer(isTriggerContext(), Mockito.<OnTimerEvent<IntervalWindow>>any())) when(mockTrigger2.onTimer(isTriggerContext(), Mockito.<OnTimerEvent<IntervalWindow>>any())) when(mockTrigger2.onTimer(isTriggerContext(), Mockito.<OnTimerEvent<IntervalWindow>>any())) when(mockTrigger2.onTimer(isTriggerContext(), Mockito.<OnTimerEvent<IntervalWindow>>any())) when(mockTrigger2.onTimer(isTriggerContext(), Mockito.<OnTimerEvent<IntervalWindow>>any())) when(mockTrigger2.onTimer(isTriggerContext(), Mockito.<OnTimerEvent<IntervalWindow>>any())) when(mockTrigger1.onTimer(isTriggerContext(), Mockito.<OnTimerEvent<IntervalWindow>>any())) Mockito.<OnMergeEvent<IntervalWindow>>any())).thenReturn(TriggerResult.FIRE_AND_FINISH); Mockito.<OnMergeEvent<IntervalWindow>>any())).thenReturn(TriggerResult.FIRE_AND_FINISH); Mockito.<OnMergeEvent<IntervalWindow>>any())).thenReturn(TriggerResult.FIRE); Mockito.<OnMergeEvent<IntervalWindow>>any())).thenReturn(TriggerResult.FIRE_AND_FINISH);
0
import org.apache.commons.digester3.spi.TypeConverter; /** * Allows retrieve the bound converter for the given type. * * NOTE: the first version will be a commons-beanutils Converter façade. * * @param <T> * @param type * @return */ <T> TypeConverter<T> lookupConverter(Class<T> type);
0
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
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. * permission of the Apache Software Foundation.
0
import org.apache.batik.ext.awt.image.renderable.Clip; import org.apache.batik.ext.awt.image.renderable.Filter;
0
* @cocoon.sitemap.component.documentation
0
import org.apache.accumulo.server.ServerConstants; import org.apache.accumulo.server.fs.VolumeManager; import org.apache.accumulo.server.fs.VolumeManagerImpl; public static String createTabletDirectory(VolumeManager fs, String tableId, Text endRow) { String volume = fs.choose(ServerConstants.getTablesDirs()); Path lowDirectoryPath = new Path(volume + "/" + tableId + "/" + lowDirectory); return lowDirectoryPath.makeQualified(fs.getFileSystemByPath(lowDirectoryPath)).toString(); Path lowDirectoryPath = new Path(volume + "/" + tableId + "/" + lowDirectory); return lowDirectoryPath.makeQualified(fs.getFileSystemByPath(lowDirectoryPath)).toString(); log.warn("Failed to create dir for tablet in table " + tableId + " in volume " + volume + " + will retry ..."); VolumeManager fs = VolumeManagerImpl.get();
1
* Defines the maximum number of ignorable lines before we expect * a HTTP response's status code. * <p> * With HTTP/1.1 persistent connections, the problem arises that * broken scripts could return a wrong Content-Length * (there are more bytes sent than specified).<br /> * Unfortunately, in some cases, this is not possible after the bad response, * but only before the next one. <br /> * So, HttpClient must be able to skip those surplus lines this way. * </p> * <p> * Set this to 0 to disallow any garbage/empty lines before the status line.<br /> * To specify no limit, use {@link java.lang.Integer#MAX_VALUE} (default in lenient mode). * </p> * * This parameter expects a value of type {@link Integer}. */ public static final String MAX_STATUS_LINE_GARBAGE = "http.connection.max-status-line-garbage"; /**
0
* @param bucketAccessible next return values private GcsUtil buildMockGcsUtil(Boolean bucketExist, Boolean... bucketAccessible) when(mockGcsUtil.bucketAccessible(any(GcsPath.class))) .thenReturn(bucketExist, bucketAccessible);
0
assertTrue(schema.getField("str").getType().getNullable()); assertFalse(schema.getField("anInt").getType().getNullable());
0
package org.apache.cocoon.xml.util; import org.apache.cocoon.xml.util.NamespacesTable;
0
package javax.activation; import java.net.URL; /** * Mock class providing the declarations required to compile the Cocoon code when * the actual library is not present. * * @version CVS $Id: URLDataSource.java,v 1.1 2003/08/08 11:35:03 cziegeler Exp $ */ public class URLDataSource implements DataSource { public URLDataSource(URL url) { throw new NoSuchMethodError("This is a mock object"); } public String getName() { throw new NoSuchMethodError("This is a mock object"); } }
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
private static final String AMS_GRAFANA_INI = "ams-grafana-ini"; Config amsGrafanaIni = cluster.getDesiredConfigByType(AMS_GRAFANA_INI); if (amsGrafanaIni != null) { Map<String, String> amsGrafanaIniProperties = amsGrafanaIni.getProperties(); String content = amsGrafanaIniProperties.get("content"); Map<String, String> newProperties = new HashMap<>(); newProperties.put("content", updateAmsGrafanaIniContent(content)); updateConfigurationPropertiesForCluster(cluster, AMS_GRAFANA_INI, newProperties, true, true); } protected String updateAmsGrafanaIniContent(String content) { if (content == null) { return null; } String toReplace = "admin_password = {{ams_grafana_admin_pwd}}"; String replaceWith = ";admin_password ="; content = content.replace(toReplace, replaceWith); return content; }
0
package org.apache.felix.upnp.basedriver.util;
0
* @see ResourceOrigin
0
coder.structuralValue(windowedKey.getValue()),
0
return ImmutableList.of(new S3FileSystem(options.as(S3Options.class)));
0
ProviderTestSuite suite = new ProviderTestSuite(new WebdavProviderTestCase()); suite.addTests(WebdavVersioningTests.class); return suite;
0
import java.util.SortedMap; private SortedMap<String, SortedMap<String, String>> configurations; private SortedMap<String, SortedMap<String, SortedMap<String, String>>> configurationAttributes; public ClusterConfigs(SortedMap<String, SortedMap<String, String>> configurations, SortedMap<String, SortedMap<String, SortedMap<String, String>>> configurationAttributes) { public SortedMap<String, SortedMap<String, String>> getConfigurations() { public void setConfigurations(SortedMap<String, SortedMap<String, String>> configurations) { public SortedMap<String, SortedMap<String, SortedMap<String, String>>> getConfigurationAttributes() { public void setConfigurationAttributes(SortedMap<String, SortedMap<String, SortedMap<String, String>>> configurationAttributes) {
0
maxDuration != null && maxDuration.isLongerThan(Duration.ZERO), "maxDuration must be greater than 0"); * {@link RetryPredicate#test(Object)} returns true, {@link Write} tries to resend the requests * to the Solr server if the {@link RetryConfiguration} permits it. "Error writing to Solr (no attempt made to retry)", exception);
1
// This is called before gatherInformation, so need to always queue for compaction until // context
0