Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/buffer/PriorityBuffer.java,v 1.1 2004/01/02 02:14:29 scolebourne Exp $ * to provide synchronized access to a <code>PriorityBuffer</code>: * Buffer heap = SynchronizedBuffer.decorate(new PriorityBuffer()); * @version $Revision: 1.1 $ $Date: 2004/01/02 02:14:29 $ public class PriorityBuffer extends AbstractCollection implements Buffer { * The default capacity for the buffer. * The elements in this buffer. * The number of elements currently in this buffer. public PriorityBuffer() { public PriorityBuffer(Comparator comparator) { public PriorityBuffer(boolean ascendingOrder) { public PriorityBuffer(boolean ascendingOrder, Comparator comparator) { public PriorityBuffer(int capacity) { public PriorityBuffer(int capacity, Comparator comparator) { public PriorityBuffer(int capacity, boolean ascendingOrder) { public PriorityBuffer(int capacity, boolean ascendingOrder, Comparator comparator) {
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.sshd.common.kex.extension.parser; import java.io.IOException; import org.apache.sshd.common.util.buffer.Buffer; /** * @author <a href="mailto:[email protected]">Apache MINA SSHD Project</a> * @see <A HREF="https://tools.ietf.org/html/rfc8308#section-3.4">RFC-8308 - section 3.4</A> */ public class Elevation extends AbstractKexExtensionParser<String> { public static final String NAME = "elevation"; public static final Elevation INSTANCE = new Elevation(); public Elevation() { super(NAME); } @Override public String parseExtension(Buffer buffer) throws IOException { return buffer.getString(); } @Override protected void encode(String value, Buffer buffer) throws IOException { buffer.putString(value); } }
0
if (!request.containsHeader("Accept-Encoding")) { request.addHeader("Accept-Encoding", "gzip,deflate"); }
0
pcf.setPoolStatements(true); pcf.setMaxOpenPrepatedStatements(10);
0
* @param <E> the type of elements in this list
0
import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import javax.xml.transform.ErrorListener; import javax.xml.transform.SourceLocator; import javax.xml.transform.TransformerException; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; XPathContext context = new XPathContext(); context.setSecureProcessing(true); Node contextNode, Node xpathnode, String str, Node namespaceNode ) throws TransformerException { /** * Evaluate an XPath string and return true if the output is to be included or not. * @param contextNode The node to start searching from. * @param xpathnode The XPath node * @param str The XPath expression * @param namespaceNode The node from which prefixes in the XPath will be resolved to namespaces. */ public boolean evaluate(Node contextNode, Node xpathnode, String str, Node namespaceNode) throws TransformerException { XObject object = eval(contextNode, xpathnode, str, namespaceNode); return object.bool(); } * Evaluate an XPath string to an XObject. XPath namespace prefixes are resolved from the * namespaceNode. * @param xpathnode The XPath node * @param str The XPath expression * @return An XObject, which can be used to obtain a string, number, nodelist, etc, * should never be null. private XObject eval(Node contextNode, Node xpathnode, String str, Node namespaceNode) throws TransformerException { XPathContext context = new XPathContext(xpathnode); context.setSecureProcessing(true); int ctxtNode = context.getDTMHandleFromNode(contextNode); return xpath.execute(context, ctxtNode, prefixResolver);
0
String agentDefaultCommandTimeout = configs.getDefaultAgentTaskTimeout(); String scriptCommandTimeout = ""; scriptCommandTimeout = String.valueOf(script.getTimeout()); String actualTimeout = (!scriptCommandTimeout.equals("") ? scriptCommandTimeout : agentDefaultCommandTimeout); // Because the INSTALL command can take much longer than typical commands, set the timeout to be the max // between the script's service component timeout and the agent default timeout. if (roleCommand.equals(RoleCommand.INSTALL) && !agentDefaultCommandTimeout.equals("") && Integer.parseInt(actualTimeout) < Integer.parseInt(agentDefaultCommandTimeout)) { actualTimeout = agentDefaultCommandTimeout; } commandParams.put(COMMAND_TIMEOUT, actualTimeout);
0
return this.foo;
0
@Override @Override @Override @Override @Override
0
import org.apache.commons.lang.StringUtils; * @version CVS $Id: IOUtils.java,v 1.4 2004/03/28 14:28:04 antonio Exp $ if (org.apache.cocoon.util.StringUtils.isAlphaNumeric(chars[j])) {
0
package org.apache.commons.digester3; /* * 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
* "Apache" nor may "Apache" appear in their name without prior * @version $Id: StringDecoder.java,v 1.6 2003/10/05 21:45:48 tobrien Exp $
0
String value = element.getAttribute(PROCESSOR_CLASS_NAME_ATTR); if ( value != null && value.trim().length() > 0 ) {
0
import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING)
0
import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;
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 2016-2017 Seznam.cz, a.s.
0
public List<Cookie> parse(final Header header, final CookieOrigin origin) public List<Header> formatCookies(final List<Cookie> cookies) {
0
* Get a registered value.
0
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.Serializable; import java.util.List;
0
synchronized (reloadLock) synchronized (reloadLock) synchronized (reloadLock) synchronized (reloadLock) synchronized (reloadLock)
0
Key wc = super.getTopKey(); Value w = super.getTopValue(); boolean b = super.hasTop(); super.seek(range, columnFamilies, inclusive);
0
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.graph.MutableNetwork; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.graph.NetworkBuilder;
0
import com.google.inject.Guice; import com.google.inject.Injector; import com.google.inject.persist.PersistService; import org.apache.ambari.server.orm.GuiceJpaInitializer; import org.apache.ambari.server.orm.InMemoryDefaultTestModule; private Injector injector; injector = Guice.createInjector(new InMemoryDefaultTestModule()); injector.getInstance(GuiceJpaInitializer.class); clusters = injector.getInstance(Clusters.class); injector.getInstance(PersistService.class).stop();
0
public void testBackPointers() throws Exception { // todo disabled until a wrapping issuen in SharedPoolDataSource are resolved }
0
* Default implementation of {@link RedirectHandler}.
0
return Double.compare(o1.doubleValue(), o2.doubleValue());
0
wire.output("[write] I/O error: " + ex.getMessage()); wire.output("[write] I/O error: " + ex.getMessage()); wire.output("[write] I/O error: " + ex.getMessage()); wire.output("[flush] I/O error: " + ex.getMessage()); wire.output("[close] I/O error: " + ex.getMessage());
0
/** * The resource definition for the specified type. */ ResourceDefinition resourceDefinition; //todo: consider ResourceDependencyManager : Map<Resource.Type, ResourceDefinition> resourceDefinition = new ComponentResourceDefinition(); return new ResourceInstanceImpl(mapIds, resourceDefinition, this);
0
package org.apache.aurora.scheduler.storage.durability; import org.apache.aurora.scheduler.storage.durability.DurableStorage.TransactionManager; public class WriteAheadStorage implements public WriteAheadStorage(
0
import org.apache.aurora.scheduler.offers.HostOffer;
0
import org.apache.http.conn.routing.HttpRoute;
0
if (propertyValue == null || propertyValue.toLowerCase().equals("null") || propertyValue.isEmpty()) {
0
client = createClient();
0
@Override @Override
0
private void verify(TreeMap<Key,Value> source, int expectedSourceSize, Map<String,String> options, Text expectedCF, Text expectedCQ, Text expectedCV, int expectedFinalCount) throws IOException { // System.out.println(DefaultFormatter.formatEntry(Collections.singletonMap(filter.getTopKey(), // filter.getTopValue()).entrySet().iterator().next(), * if not explicitly filtering bad labels, they will still be filtered while validating against * authorizations, but it will be very verbose in the logs Map<String,String> options = Collections.singletonMap("auths", new Authorizations("x", "def", "y").serialize());
0
import java.util.HashMap; import java.util.Map; import java.util.Set; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.google.inject.Inject;
0
private final Object lock = new Object(); public final static long CONFIG_FILE_RELOAD_DELAY = 60000;
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 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
* @see #getPixelUnitToMillimeter()
0
* @version CVS $Id: CompiledProgrammingLanguage.java,v 1.1 2004/03/10 12:58:07 stephan Exp $
0
import com.google.cloud.dataflow.sdk.util.WeightedValue; List<Iterator<WeightedValue<T>>> iterators = Lists.newArrayList(); Iterator<WeightedValue<T>> sorted = Iterators.mergeSorted( new Comparator<WeightedValue<T>>() { public int compare(WeightedValue<T> a, WeightedValue<T> b) { WeightedValue<T> weightedElement = sorted.next(); double current = weightedElement.getWeight(); weightedElement = sorted.next(); current += weightedElement.getWeight(); newElements.add(weightedElement.getValue()); public Iterator<WeightedValue<T>> sizedIterator() { return new UnmodifiableIterator<WeightedValue<T>>() { @Override public WeightedValue<T> next() { return WeightedValue.of(iter.next(), weight);
0
import org.apache.accumulo.core.client.BatchWriterConfig; BatchWriter bw = conn.createBatchWriter("table1", new BatchWriterConfig());
0
buffer.append(line).append("\n");
0
CSSStyleDeclaration decl; decl = ctx.getViewCSS().getComputedStyle(element, null); UnitProcessor.Context uctx = new DefaultUnitProcessorContext(ctx, decl); Rectangle2D rect = CSSUtilities.convertEnableBackground((SVGElement)element, decl, uctx); if (rect != null) { result.setBackgroundEnable(rect); }
0
private final long creationTimeMillis; this.creationTimeMillis = System.currentTimeMillis(); long getLastReadTimeMillis() { return creationTimeMillis;
0
* Creates a UDP datagram containing all the TFTP * data packet data in the proper format. * method.
0
filterRegion,
0
@SuppressWarnings({"unused"}) public enum CompactionType implements org.apache.thrift.TEnum {
0
import java.io.File; import org.apache.avalon.framework.context.Context; import org.apache.avalon.framework.context.ContextException; import org.apache.avalon.framework.context.Contextualizable; extends ServiceableGenerator implements Contextualizable { /** The component context. */ protected Context context; public void contextualize(Context context) throws ContextException { this.context = context; } final long totalMemory = Runtime.getRuntime().totalMemory(); final long freeMemory = Runtime.getRuntime().freeMemory(); addValue("total", String.valueOf(totalMemory)); addValue("used", String.valueOf(totalMemory - freeMemory)); addValue("free", String.valueOf(freeMemory)); // BEGIN CONTEXT CLASSPATH String contextClassPath = null; try { contextClassPath = (String)this.context.get(Constants.CONTEXT_CLASSPATH); } catch (ContextException ce) { // we ignore this } if ( contextClassPath != null ) { List paths = new ArrayList(); StringTokenizer tokenizer = new StringTokenizer(contextClassPath, File.pathSeparator); while (tokenizer.hasMoreTokens()) { paths.add(tokenizer.nextToken()); } addMultilineValue("context-classpath", paths); } // END CONTEXT CLASSPATH this.addMultilineValue(Settings.KEY_EXTRA_CLASSPATHS, s.getExtraClasspaths()); this.addMultilineValue(Settings.KEY_LOAD_CLASSES, s.getLoadClasses());
0
* An input stream that reads data without any transformation. * <p> * Note that this class NEVER closes the underlying stream, even when close * gets called. Instead, it will read until the end of the stream (until * <code>-1</code> is returned). /** * Wraps session input stream and reads input until the the end of stream. * * @param in The session input buffer */
0
super.setupDefinition(element, definition); definition.makeImmutable();
0
package org.apache.felix.ipojo.runtime.core.components.inheritance.b; import org.apache.felix.ipojo.runtime.core.components.inheritance.a.IA; public interface IB extends IA { public String methTwo(); }
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
Connector connector = instance.getConnector(args[2], args[3].getBytes());
0
* Return when {@code window} should be garbage collected. If the window's expiration time is on * or after the end of the global window, it will be truncated to the end of the global window. // If the end of the window + allowed lateness is beyond the "end of time" aka the end of the // global window, then we truncate it. The conditional is phrased like it is because the // addition of EOW + allowed lateness might even overflow the maximum allowed Instant if (GlobalWindow.INSTANCE .maxTimestamp() .minus(windowingStrategy.getAllowedLateness()) .isBefore(window.maxTimestamp())) { return GlobalWindow.INSTANCE.maxTimestamp(); return window.maxTimestamp().plus(windowingStrategy.getAllowedLateness());
0
lit.set(interpolate(lit.next()));
0
import cz.seznam.euphoria.core.client.triggers.Trigger; import cz.seznam.euphoria.core.client.triggers.TriggerContext; import cz.seznam.euphoria.core.executor.TriggerScheduler; import java.util.LinkedHashMap; private static final class LRU<K, V> extends LinkedHashMap<K, V> { private final int maxSize; LRU(int maxSize) { this.maxSize = maxSize; } @Override protected boolean removeEldestEntry(Map.Entry<K, V> eldest) { return size() > maxSize; } } WindowStorage(Window window, int maxKeysStates) { if (maxKeysStates > 0) { this.keyStates = new LRU<>(maxKeysStates); } else { this.keyStates = new HashMap<>(); } final int maxKeyStatesPerWindow; boolean isBounded, int maxKeyStatesPerWindow) this.maxKeyStatesPerWindow = maxKeyStatesPerWindow; public Pair<Window, State> getWindowStateForUpdate(Window w, Object itemKey) { // ~ remove and re-insert to give LRU based implementations a chance Map<Object, State> keyStates = wStore.getKeyStates(); State state = keyStates.remove(itemKey); keyStates.put(itemKey, state); LOG.debug("wStore({}).keyStates.size: {}", w, wStore.getKeyStates().size()); } else { keyStates.put(itemKey, state); wRegistry.setWindow(wStore = new WindowStorage(w, maxKeyStatesPerWindow)); int maxKeyStatesPerWindow, isBounded, maxKeyStatesPerWindow); processing.getWindowStateForUpdate(itemWindow, itemKey);
0
Schema resultType = RowSqlTypes.builder() Schema resultType = RowSqlTypes.builder() Schema resultType = RowSqlTypes.builder() Schema resultType = RowSqlTypes.builder() Schema subStrSchema = RowSqlTypes.builder()
0
* https://beam.apache.org/documentation/pipelines/test-your-pipeline/
0
tableRow(sb, (highlight = !highlight), "<a href='/tservers'>Tablet&nbsp;Servers</a>", NumberType.commas(info.tServerInfo.size(), 1, Long.MAX_VALUE)); tableRow(sb, (highlight = !highlight), "<a href='/tservers'>Dead&nbsp;Tablet&nbsp;Servers</a>", NumberType.commas(info.deadTabletServers.size(), 0, 0)); tableRow(sb, (highlight = !highlight), "Tablets", NumberType.commas(Monitor.getTotalTabletCount(), 1, Long.MAX_VALUE));
0
return true; return true;
0
* http://www.apache.org/licenses/LICENSE-2.0
0
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * version 1.1, a copy of which has been included with this distribution in * * the LICENSE file. * *****************************************************************************/ package org.apache.batik.svggen.font.table; import java.io.IOException; import java.io.RandomAccessFile; /** * * @author <a href="mailto:[email protected]">David Schweinsberg</a> * @version $Id$ */ public abstract class KernSubtable { /** Creates new KernSubtable */ protected KernSubtable() { } public abstract int getKerningPairCount(); public abstract KerningPair getKerningPair(int i); public static KernSubtable read(RandomAccessFile raf) throws IOException { KernSubtable table = null; int version = raf.readUnsignedShort(); int length = raf.readUnsignedShort(); int coverage = raf.readUnsignedShort(); int format = coverage >> 8; switch (format) { case 0: table = new KernSubtableFormat0(raf); break; case 2: table = new KernSubtableFormat2(raf); break; default: break; } return table; } }
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 RequestStatus deleteResources(Request request, Predicate predicate) throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
0
+ "support updating streaming pipelines.")
0
if (fs.exists(mylog)) break;
1
package org.apache.felix.ipojo.tests.core.service; public interface MyService { public void foo(); }
0
import org.apache.http.annotation.Immutable; @Immutable // provided injected dependencies are immutable
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.typeimpl; /** * A {@link org.apache.cocoon.forms.datatype.Datatype Datatype} implementation for * java.lang.Boolean's. * @version $Id$ */ public class BooleanType extends AbstractDatatype { public Class getTypeClass() { return Boolean.class; } public String getDescriptiveName() { return "boolean"; } }
0
import java.util.Optional; return Optional.empty();
0
if (attrs.containsKey(attrName)) { return attrs.get(attrName); } return attrs.get(attrName.toLowerCase());
0
package org.apache.beam.sdk.extensions.sql.interpreter.operator.string; import org.apache.beam.sdk.extensions.sql.interpreter.BeamSqlFnExecutorTestBase; import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlExpression; import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlPrimitive;
0
import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; import org.apache.ambari.annotations.Experimental; import org.apache.ambari.annotations.ExperimentalFeature; import org.apache.ambari.server.state.stack.RepoTag; import org.apache.commons.lang.StringUtils; private Set<RepoTag> tags = new HashSet<>(); getRepoName(), getDistribution(), getComponents(), getMirrorsList(), getDefaultBaseUrl(), getTags()); /** * @return the tags for this repository */ public Set<RepoTag> getTags() { return tags; } /** * @param repoTags the tags for this repository */ public void setTags(Set<RepoTag> repoTags) { tags = repoTags; }
0
* @param factory SAXParserFactory to be configured }
0
/** * Copyright 2016 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.core.client.operator; import java.io.Serializable; @FunctionalInterface public interface ExtractEventTime<I> extends Serializable { /** Extracts event time (in millis since epoch) of the given element. */ long extractTimestamp(I elem); }
0
ExtraContextFactory<InputT, OutputT> extra) { // The outer DoFn is immaterial - it exists only to avoid typing InputT and OutputT repeatedly DoFn<InputT, OutputT>.ProcessContext newCtx = extra.processContext(new DoFn<InputT, OutputT>() {}); DoFnAdapters.adaptProcessContext(fn, newCtx, extra);
0
mgr.closeWal(server.getKey(), path);
0
import com.twitter.aurora.gen.TaskConfig; .setTask(new TaskConfig() .setTask(new TaskConfig() .setTask(new TaskConfig() TaskConfig task = productionTask(); TaskConfig task = productionTask().setNumCpus(0.0); TaskConfig task = productionTask().setRamMb(-123); TaskConfig task = productionTask().setDiskMb(0); TaskConfig task = new TaskConfig() TaskConfig storedConfig = productionTask(); TaskConfig modifiedConfig = TaskConfig storedConfig = productionTask(); TaskConfig modifiedConfig = TaskConfig task = nonProductionTask(); TaskConfig task = nonProductionTask(); TaskConfig task = nonProductionTask(); TaskConfig ownedCronJobTask = nonProductionTask() TaskConfig ownedImmediateTaskInfo = defaultTask(false) TaskConfig immediateTaskConfig = defaultTask(false) private JobConfiguration makeJob(TaskConfig task) { private JobConfiguration makeJob(TaskConfig task, int shardCount) { private static TaskConfig defaultTask(boolean production) { return new TaskConfig() private static TaskConfig productionTask() { private static TaskConfig nonProductionTask() {
0
* @version $Revision$
0
import org.junit.Assert; * public void registerSideChannel(SortedKeyValueIterator<Key,Value> iter) {}
0
import org.apache.zookeeper.PortAssignment; import org.apache.zookeeper.server.quorum.QuorumPeer.QuorumServer; import java.net.InetAddress; import java.net.InetSocketAddress; import java.util.HashMap; import java.util.Map; long myId = qp.getId(); int clientPort = PortAssignment.unique(); Map<Long, QuorumServer> peersView = new HashMap<Long, QuorumServer>(); InetAddress clientIP = InetAddress.getLoopbackAddress(); peersView.put(Long.valueOf(myId), new QuorumServer(myId, new InetSocketAddress(clientIP, PortAssignment.unique()), new InetSocketAddress(clientIP, PortAssignment.unique()), new InetSocketAddress(clientIP, clientPort), LearnerType.PARTICIPANT)); when(quorumVerifierMock.getAllMembers()).thenReturn(peersView);
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Lists; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Maps;
0
@Deprecated @Deprecated
1
this.scrConfiguration.configure(properties, true);
0
import com.google.inject.persist.Transactional; @Transactional void convertRolePrincipals() {
0
* Copyright 2000-2009 The Apache Software Foundation
0
/** Convert {@code itr} to strings capturing values and timestamps. */ static <T> Set<String> toValueTimestamp(Iterator<TimestampedValue<T>> itr) { Set<String> strings = new HashSet<>();
0
System.err.println("Thread \"" + Thread.currentThread().getName() + "\" died " + e); System.err.println("Uncaught exception: " + t); System.exit(1);
0
* @version CVS $Id: PortletObjectModelHelper.java,v 1.1 2004/02/23 15:14:01 cziegeler Exp $
0
import org.apache.accumulo.core.client.impl.Table; public Table.ID tableID; public ProblemSummaryInformation(String tableName, Table.ID tableID, Integer fileRead, Integer fileWrite, Integer tableLoad) {
1
String factoryClassName = widgetConfs[i].getAttribute("src");
0
public class TestThrottlingNHttpHandlers extends TestCase { public TestThrottlingNHttpHandlers(String testName) { String[] testCaseName = { TestThrottlingNHttpHandlers.class.getName() }; return new TestSuite(TestThrottlingNHttpHandlers.class);
0
sks = new KeySelectors.SecretKeySelector("testkey".getBytes("ASCII")); ("testkey".getBytes("ASCII")), sks); ("testkey".getBytes("ASCII")), sks); ("testkey".getBytes("ASCII")), sks);
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.atlas.storm.model; import org.apache.atlas.addons.ModelDefinitionDump; import org.apache.atlas.typesystem.TypesDef; import org.apache.atlas.typesystem.json.TypesSerialization; import java.io.IOException; public class StormDataModelGenerator { public static void main(String[] args) throws IOException { StormDataModel.main(new String[]{}); TypesDef typesDef = StormDataModel.typesDef(); String stormTypesAsJSON = TypesSerialization.toJson(typesDef); if (args.length == 1) { ModelDefinitionDump.dumpModelToFile(args[0], stormTypesAsJSON); return; } System.out.println("stormTypesAsJSON = " + stormTypesAsJSON); } }
0
* * @version $Id$
0
* limitations under the License.
0
package org.apache.felix.bnd; import java.util.List; import java.util.ArrayList; import aQute.lib.spring.XMLTypeProcessor; import aQute.lib.spring.XMLType; import aQute.lib.osgi.Analyzer; public class BlueprintComponent extends XMLTypeProcessor { protected List<XMLType> getTypes(Analyzer analyzer) throws Exception { List<XMLType> types = new ArrayList<XMLType>(); String header = analyzer.getProperty("Bundle-Blueprint", "OSGI-INF/blueprint"); process(types,"blueprint.xsl", header, ".*\\.xml"); return types; } }
0
/** * TODO: add javadoc. * @param <W> * @param <K> */
0