Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import org.apache.beam.sdk.util.CloudObject; /** * Generated data to check that the wire format has not changed. To regenerate, see * {@link org.apache.beam.sdk.coders.PrintBase64Encodings}. */ private static final List<String> TEST_ENCODINGS = ImmutableList.of( "AwoLDA", "Ag0D", "Ag0O", "AA"); @Test public void testCloudObjectRepresentation() throws Exception { CloudObject cloudObject = TEST_CODER.asCloudObject(); assertEquals("kind:length_prefix", cloudObject.getClassName()); } new byte[][]{{ 0xa, 0xb, 0xc }}); new byte[][]{{ 0xa, 0xb, 0xc }, {}, {}, { 0xd, 0xe }, {}});
0
acceptStatement(child, null); // the last line TemplateExpression te = getPrintStatement(child); if (te != null) { newJxltLine(); return visit(te, data); } else { return super.acceptStatement(child, data); private TemplateExpression getPrintStatement(JexlNode child) { if (exprs != null && child instanceof ASTFunctionNode) { if (n >= 0 && n < exprs.length) { return exprs[n]; return null; switch (c) { case '\n': builder.append("$$ "); return; case '}': builder.append("\n$$ "); return; case ' ': case ';': return; /** * Insert \n when needed. */ private void newJxltLine() { int length = builder.length(); for (int i = length - 1; i >= 0; --i) { char c = builder.charAt(i); switch (c) { case '\n': case ';': return; case '}': builder.append('\n'); return; } } }
0
* @version CVS $Id: XMLDBSource.java,v 1.17 2004/05/16 16:13:25 cziegeler Exp $ public static final String PREFIX = "db";
0
* * @version $Id$
0
viewInstanceDefinition.putProperty("p8", null); Assert.assertEquals(8, properties.size()); Assert.assertNull(properties.get("p8")); Assert.assertEquals(8, properties.size()); Assert.assertNull(properties.get("p8"));
0
public TriggerResult onElement(TriggerContext<W> c, OnElementEvent<W> e) throws Exception { BitSet firedSet = c.lookup(SUBTRIGGERS_FIRED_SET_TAG, e.window()); SubTriggerExecutor subExecutor = subExecutor(c, e.window()); if (subExecutor.onElement(c, i, e).isFire()) { return wrapResult(c, e.window(), firedSet, subExecutor); public TriggerResult onMerge(TriggerContext<W> c, OnMergeEvent<W> e) throws Exception { for (BitSet oldFiredSet : c.lookup(SUBTRIGGERS_FIRED_SET_TAG, e.oldWindows()).values()) { SubTriggerExecutor subExecutor = subExecutor(c, e); TriggerResult earlyResult = wrapResult(c, e.newWindow(), newFiredSet, subExecutor); if (subExecutor.onMerge(c, i, e).isFire()) { return wrapResult(c, e.newWindow(), newFiredSet, subExecutor);
0
/* * $Header: $ * $Revision$ * $Date$ * * ==================================================================== * * 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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package org.apache.http; /** * <p> * </p> * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a> * * @version $Revision$ * * @since 4.0 */ public interface HttpEntityEnclosingMessage { void setEntity(HttpOutgoingEntity entity); void setUseChunkEncoding(boolean b); }
0
import org.apache.accumulo.core.security.Authorizations; mdScanner = connector.createBatchScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY, 8); @Override } }
0
import java.util.HashSet; import java.util.Set;
0
handleRequest(connState, conn); final NHttpServerConnection conn) throws HttpException, IOException { HttpContext context = conn.getContext(); HttpRequest request = connState.getRequest();
0
* Allows the tailer to complete its current loop and return. public void stop() {
0
private FileSystemProviderContext context; return context; this.context = context;
0
class DoFnForTestSimpleTimerIdNamedDoFn extends DoFn<KV<String, Integer>, Long> { @TimerId("foo") private final TimerSpec bizzle = TimerSpecs.timer(TimeDomain.EVENT_TIME); @ProcessElement public void foo(ProcessContext context) {} @OnTimer("foo") public void onFoo() {} } class DoFnOverridingAbstractStateUse extends DoFnDeclaringStateAndAbstractUse { @Override public void processWithState(ProcessContext c, ValueState<String> state) {} } DoFnSignatures.INSTANCE.getSignature(new DoFnOverridingAbstractStateUse().getClass()); StateParameter stateParam = (StateParameter) sig.processElement().extraParameters().get(0); class DoFnForTestSimpleStateIdNamedDoFn extends DoFn<KV<String, Integer>, Long> { @StateId("foo") private final StateSpec<Object, ValueState<Integer>> bizzle = StateSpecs.value(VarIntCoder.of()); @ProcessElement public void foo(ProcessContext context) {} } class DoFnForTestGenericStatefulDoFn<T> extends DoFn<KV<String, T>, Long> { // Note that in order to have a coder for T it will require initialization in the constructor, // but that isn't important for this test @StateId("foo") private final StateSpec<Object, ValueState<T>> bizzle = null; @ProcessElement public void foo(ProcessContext context) {} }
0
List<SignatureProperty> list = new Vector<SignatureProperty>(); // use raw List type to test for invalid SignatureProperty types List invalidList = new Vector(); addEntryToRawList(invalidList, strEntry); @SuppressWarnings("unchecked") SignatureProperties props2 = factory.newSignatureProperties(invalidList, id); @SuppressWarnings("unchecked") List<SignatureProperty> unmodifiable = props.getProperties(); List<SignatureProperty> list = new Vector<SignatureProperty>(); @SuppressWarnings("unchecked") private static void addEntryToRawList(List list, Object entry) { list.add(entry); }
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 org.apache.batik.ext.awt.image.spi; import java.util.Iterator; import java.util.Map; import java.util.HashMap; import org.apache.batik.ext.awt.image.spi.RegistryEntry; import org.apache.batik.util.Service; public class ImageWriterRegistry { private static ImageWriterRegistry instance; private Map imageWriterMap = new HashMap(); private ImageWriterRegistry() { setup(); } public static ImageWriterRegistry getInstance() { if (instance == null) { instance = new ImageWriterRegistry(); } return instance; } private void setup() { Iterator iter = Service.providers(ImageWriter.class); while (iter.hasNext()) { ImageWriter writer = (ImageWriter)iter.next(); // System.out.println("RE: " + writer); register(writer); } } public void register(ImageWriter writer) { imageWriterMap.put(writer.getMIMEType(), writer); } public ImageWriter getWriterFor(String mime) { return (ImageWriter)imageWriterMap.get(mime); } }
0
/** * @todo need to implement the daystart bits */ /** * @todo need to implement the daystart bits */ /** * @todo needs to handle +5 for > 5 and -5 for < 5. * @todo Also needs to handle k, m, g, as suffixes. */
0
KV<String, BeamFnApi.Target> inputLocation, KV<String, BeamFnApi.Target> outputLocation,
0
import org.apache.felix.sigil.common.model.IModelElement;
0
package org.apache.ambari.logfeeder.loglevelfilter; String logId = (String) jsonObj.get(LogFeederConstants.SOLR_COMPONENT); if (StringUtils.isNotBlank(hostName) && StringUtils.isNotBlank(logId) && StringUtils.isNotBlank(level)) { return LogLevelFilterHandler.isAllowed(hostName, logId, level); } else {
0
import org.apache.thrift.TException; import org.apache.thrift.TSerializer; private final TSerializer serializer = new TSerializer(); ConcreteTaskDescription concreteTaskDescription = trackedTask.getTask(); if (ConfigurationManager.satisfied(concreteTaskDescription, offer)) { LOG.info("Offer is being assigned to a concreteTaskDescription within " + jobName); LOG.info("Consuming cpus: " + String.valueOf(concreteTaskDescription.getNumCpus())); LOG.info("Consuming memory: " + String.valueOf(concreteTaskDescription.getRamBytes())); params.set("cpus", String.valueOf((int) concreteTaskDescription.getNumCpus())); params.set("mem", String.valueOf(concreteTaskDescription.getRamBytes())); // concreteTaskDescription requirement might be a fraction of the offer. byte[] taskInBytes = null; try { taskInBytes = serializer.serialize(concreteTaskDescription); } catch (TException e) { LOG.log(Level.SEVERE,"Error serializing Thrift ConcreteTaskDescription",e); //todo(flo):maybe cleanup and exit cleanly throw new RuntimeException(e); } jobName + "-" + trackedTask.getTaskId(), params, taskInBytes);
0
ElasticsearchIOTestUtils.deleteIndex(connectionConfiguration, restClient);
0
Iterable<TabletMetadata> tmi = MetadataScanner.builder().from(ctx).scanMetadataTable() return MetadataScanner.builder().from(ctx).scanMetadataTable() .overRange(tableId, startRow, endRow).fetchFiles().fetchPrev().build().stream() .mapToInt(tm -> tm.getFiles().size()).sum();
0
public class ScriptingEnvironment extends BaseScriptingEnvironment { protected Timer timer = new Timer(true); * @param ctx the bridge context public ScriptingEnvironment(BridgeContext ctx) { super(ctx); updateManager = ctx.getUpdateManager(); updateRunnableQueue = updateManager.getUpdateRunnableQueue(); public org.apache.batik.script.Window createWindow (Interpreter interp, String lang) { protected class Window implements org.apache.batik.script.Window {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/TestBean.java,v 1.9 2002/07/16 02:41:08 craigmcc Exp $ * $Revision: 1.9 $ * $Date: 2002/07/16 02:41:08 $ import java.util.Map; * @version $Revision: 1.9 $ $Date: 2002/07/16 02:41:08 $ * A mapped property with only a getter and setter for a Map. */ private Map mapProperty = null; public Map getMapProperty() { // Create the map the very first time if (mapProperty == null) { mapProperty = new HashMap(); mapProperty.put("First Key", "First Value"); mapProperty.put("Second Key", "Second Value"); } return (mapProperty); } public void setMapProperty(Map mapProperty) { // Create the map the very first time if (mapProperty == null) { mapProperty = new HashMap(); mapProperty.put("First Key", "First Value"); mapProperty.put("Second Key", "Second Value"); } this.mapProperty = mapProperty; } /**
0
assertEquals(3, ds.getConnectionProperties().size()); assertEquals("value1", ds.getConnectionProperties().getProperty("name1")); assertEquals("value2", ds.getConnectionProperties().getProperty("name2")); assertEquals("value3", ds.getConnectionProperties().getProperty("name3")); assertEquals(2, ds.getConnectionProperties().size()); assertEquals("value1", ds.getConnectionProperties().getProperty("name1")); assertEquals("value2", ds.getConnectionProperties().getProperty("name2")); assertFalse(ds.getConnectionProperties().containsKey("name3")); assertEquals(2, ds.getConnectionProperties().size()); assertEquals("value1", ds.getConnectionProperties().getProperty("name1")); assertEquals("", ds.getConnectionProperties().getProperty("name2")); assertEquals(2, ds.getConnectionProperties().size()); assertEquals("value1", ds.getConnectionProperties().getProperty("name1")); assertEquals("", ds.getConnectionProperties().getProperty("name2")); assertEquals(1, ds.getConnectionProperties().size()); assertEquals("value1", ds.getConnectionProperties().getProperty("name1")); assertEquals(1, ds.getConnectionProperties().size()); assertEquals("value1", ds.getConnectionProperties().getProperty("name1")); assertEquals(1, ds.getConnectionProperties().size()); assertEquals("", ds.getConnectionProperties().getProperty("name1")); assertEquals(false, ds.getConnectionPool().getTestOnBorrow()); assertEquals(false, ds.getConnectionPool().getTestWhileIdle()); assertEquals(true, ds.getConnectionPool().getTestOnReturn()); assertNull(ds.getConnectionPool());
0
this.nonDefaultColumnFamilies = new HashSet<>(); HashMap<ByteSequence,MutableLong> map = new HashMap<>(); private ConcurrentSkipListMap<Key,Value> map = new ConcurrentSkipListMap<>(new MemKeyComparator()); HashSet<ByteSequence> allfams = new HashSet<>();
1
package org.apache.ambari.server.stack.upgrade.orchestrate; import org.apache.ambari.server.stack.upgrade.ExecuteHostType; import org.apache.ambari.server.stack.upgrade.ExecuteTask; import org.apache.ambari.server.stack.upgrade.Task;
0
* http://www.apache.org/licenses/LICENSE-2.0
0
if ( cachedResponse.getContentType() != null ) { environment.setContentType(cachedResponse.getContentType()); } else { this.setMimeTypeForSerializer(environment); } this.setMimeTypeForSerializer(environment); this.setMimeTypeForSerializer(environment); cachedResponse.setContentType(environment.getContentType()); if ( cachedResponse.getContentType() != null ) { environment.setContentType(cachedResponse.getContentType()); } else { this.setMimeTypeForReader(environment); } this.setMimeTypeForReader(environment); cachedResponse.setContentType(environment.getContentType());
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/bidimap/TreeBidiMap.java,v 1.8 2004/01/08 22:26:08 scolebourne Exp $ * @version $Revision: 1.8 $ $Date: 2004/01/08 22:26:08 $ * @return negative value if o1 &lt; o2; 0 if o1 == o2; positive * value if o1 &gt; o2 return o1.compareTo(o2);
0
import org.apache.beam.runners.core.construction.SerializablePipelineOptions; private final SerializablePipelineOptions serializableOptions; this.serializableOptions = new SerializablePipelineOptions(options); public SerializablePipelineOptions getSerializableOptions() { return serializableOptions; return serializableOptions.get().as(SparkPipelineOptions.class).getStorageLevel();
0
random.nextBytes(buff);
0
import org.apache.commons.jelly.*; protected void addCustomTagLib(JellyContext context) { context.registerTagLibrary(TJTagLibrary.NS, TJTagLibrary.class.getName()); }
0
// No action required // Expected result // Expected result // Expected result // Expected result // Expected result // Expected result // Expected result // Expected result // Expected result // Expected result // Expected result // Expected result
0
import cz.seznam.euphoria.core.client.dataset.windowing.Count; .windowBy(Count.of(2)) .windowBy(Count.of(8))
0
package org.apache.commons.digester3.xmlrules; final class XmlRulesModule
0
assertEquals("instance", read.getBigtableConfig().getInstanceId()); assertEquals("project", read.getBigtableConfig().getProjectId()); assertEquals(PORT_CONFIGURATOR, read.getBigtableConfig().getBigtableOptionsConfigurator()); .withProjectId("project"); assertEquals("table", write.getBigtableConfig().getTableId()); assertEquals("instance", write.getBigtableConfig().getInstanceId()); assertEquals("project", write.getBigtableConfig().getProjectId()); .getBigtableConfig() .getBigtableConfig() .getBigtableConfig() .getBigtableConfig()
0
import org.easymock.EasyMock; expect(factory.getRootServiceHostComponent((RootServiceHostComponentRequest) anyObject(), EasyMock.<Set<HostResponse>>anyObject())).
0
@SuppressWarnings("deprecation") // most of the static methods are deprecated @SuppressWarnings("deprecation") // most of the static methods are deprecated @SuppressWarnings("deprecation") // most of the static methods are deprecated @SuppressWarnings("deprecation") // most of the static methods are deprecated @SuppressWarnings("deprecation") // most of the static methods are deprecated @SuppressWarnings("deprecation") // most of the static methods are deprecated @SuppressWarnings("deprecation") // most of the static methods are deprecated @SuppressWarnings("deprecation") // most of the static methods are deprecated @SuppressWarnings("deprecation") // most of the static methods are deprecated @SuppressWarnings("deprecation") // most of the static methods are deprecated @SuppressWarnings("deprecation") // most of the static methods are deprecated @SuppressWarnings("deprecation") // most of the static methods are deprecated @SuppressWarnings("deprecation") // most of the static methods are deprecated @SuppressWarnings("deprecation") // most of the static methods are deprecated @SuppressWarnings("deprecation") // most of the static methods are deprecated @SuppressWarnings("deprecation") // most of the static methods are deprecated @SuppressWarnings("deprecation") // most of the static methods are deprecated @SuppressWarnings("deprecation") // most of the static methods are deprecated
0
* @version CVS $Id: MatchNode.java,v 1.6 2004/07/16 12:36:45 sylvain Exp $ Matcher matcher = (Matcher)getComponent(); try { objectModel, matcher, resolvedPattern, resolvedParams); } finally { releaseComponent(matcher);
0
NamespacedBox namespacedBox = d.peek(); namespacedBox.setNamespaces(namespaces);
0
return new XPathExpression(attributeValue, xpath, tagScript); return new XPathPatternExpression(attributeValue, pattern);
0
import java.util.List; List<String> childs = zk.getChildren("/hammers", false);
0
public boolean deploy(Block[] blocks, String serverArtifact, File[] libraries, Logger log, boolean transactional);
0
protected String initialConfig; initialConfig = config.getInitialConfig();
0
* Returns the size of a px CSS unit in millimeters. */ public float getPixelUnitToMillimeter() { SVGContext ctx = ((SVGOMElement)element).getSVGContext(); return ctx.getPixelUnitToMillimeter(); } /** * Returns the size of a px CSS unit in millimeters. * This will be removed after next release. * @see #getPixelUnitToMillimeter(); return getPixelUnitToMillimeter();
0
public ObjectGraphIterator(final E root, final Transformer<? super E, ? extends E> transformer) { public ObjectGraphIterator(final Iterator<? extends E> rootIterator) { protected void findNext(final E value) { protected void findNextByIterator(final Iterator<? extends E> iterator) { final E result = currentValue;
0
put(BatchRequestJob.BATCH_REQUEST_FAILED_TASKS_IN_CURRENT_BATCH_KEY, 0);
0
String inAttr = filterElement.getAttributeNS(null, SVG_IN_ATTRIBUTE);
0
ITypedReferenceableInstance cached = RequestContext.get().getInstance(guid); if(cached != null) { return cached; }
0
try (BatchWriter b = accumuloClient.createBatchWriter(tableName)) { // populate for (int i = 0; i < N; i++) { Mutation m = new Mutation(new Text(String.format("%05d", i))); m.put(new Text("col" + Integer.toString((i % 3) + 1)), new Text("qual"), new Value("junk".getBytes(UTF_8))); b.addMutation(m); }
0
private static Integer numberOfTextLines;
0
* A default implementation that can be used for writing own generators. * * @deprecated Use the {@link ServiceableGenerator} instead. * @version CVS $Id: ComposerGenerator.java,v 1.2 2003/09/03 15:00:56 cziegeler Exp $ protected ComponentManager manager;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/EvalContext.java,v 1.19 2002/11/26 01:20:06 dmitri Exp $ * $Revision: 1.19 $ * $Date: 2002/11/26 01:20:06 $ import org.apache.commons.jxpath.ExpressionContext; import org.apache.commons.jxpath.JXPathContext; import org.apache.commons.jxpath.Pointer; import org.apache.commons.jxpath.ri.axes.RootContext; * @version $Revision: 1.19 $ $Date: 2002/11/26 01:20:06 $
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; protected final Logger log = LoggerFactory.getLogger(this.getClass());
0
import com.google.common.collect.Maps; public class MemSchedulerStore implements SchedulerStore.Mutable.Transactioned { private static final String FRAMEWORK_ID_KEY = "framework_id"; private final TransactionalMap<String, String> entries = TransactionalMap.wrap(Maps.<String, String>newHashMap()); @Override public void commit() { entries.commit(); } @Override public void rollback() { entries.rollback(); } entries.put(FRAMEWORK_ID_KEY, newFrameworkId); return entries.get(FRAMEWORK_ID_KEY);
0
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
0
import org.apache.accumulo.core.client.AccumuloClient; InstanceOperations iops = getAccumuloClient().instanceOperations(); InstanceOperations iops = getAccumuloClient().instanceOperations(); final AccumuloClient c = getAccumuloClient(); private long batchScan(AccumuloClient c, String tableName, List<Range> ranges, int threads)
0
/** Thread that requested this connection. */ private final Thread executionThread; super(); executionThread = Thread.currentThread(); // Usually #abortConnection() is expected to be called from // a helper thread in order to unblock the main execution thread // blocked in an I/O operation. It may be unsafe to call // #releaseConnection() from the helper thread, so we have to rely // on an IOException thrown by the closed socket on the main thread // to trigger the release of the connection back to the // connection manager. // // However, if this method is called from the main execution thread // it should be safe to release the connection immediately. Besides, // this also helps ensure the connection gets released back to the // manager if #abortConnection() is called from the main execution // thread while there is no blocking I/O operation. if (executionThread.equals(Thread.currentThread())) { releaseConnection(); }
0
package org.apache.beam.runners.spark.translation; import org.apache.beam.runners.spark.SparkPipelineRunner;
0
@Override public final boolean isRepeatable() { return false; }
0
Assert.assertEquals(15, resources.size());
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.Iterables;
0
this.supported = Constants.NONE.equals(factoryName) || Cipher.checkSupported(this.transformation, this.keysize); return NamedResource.findByName(name, String.CASE_INSENSITIVE_ORDER, VALUES);
0
element.setAttributeNS(SVG_NAMESPACE_URI, ATTR_TRANSFORM, transform); if(element.getAttributeNS(SVG_NAMESPACE_URI, attrName).length() == 0) element.setAttributeNS(SVG_NAMESPACE_URI, attrName, (String)attrMap.get(attrName)); rect.setAttributeNS(SVG_NAMESPACE_URI, ATTR_FILL, VALUE_NONE); polygon.setAttributeNS(SVG_NAMESPACE_URI, ATTR_STROKE, VALUE_NONE);
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
import org.apache.accumulo.core.trace.TraceUtil; stats = client.getMasterStats(TraceUtil.traceInfo(), context.rpcCreds());
0
.apply(name + ".Rekey", ParDo.of(new DoFn<Bid, KV<Long, Void>>() { @ProcessElement .apply(name + ".ToResult", ParDo.of(new DoFn<KV<Long, Long>, BidsPerSession>() { @ProcessElement
0
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may 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. */
1
boolean compile(Project project, Collection<File> sources, Collection<Container> buildpath, File bin) throws Exception;
0
import java.util.Comparator; /** * Set the comparator. * The indicated class must implement {@link Comparator} */ Class comparator() default Comparator.class;
0
import org.apache.batik.anim.dom.AnimatableElement; import org.apache.batik.anim.dom.AnimatedLiveAttributeValue; import org.apache.batik.anim.dom.AnimationTarget; import org.apache.batik.anim.dom.AnimationTargetListener; import org.apache.batik.anim.dom.SVGOMElement;
0
import org.apache.beam.sdk.values.ShardedKey;
0
import javax.servlet.ServletConfig; import org.apache.avalon.framework.context.Context; import org.apache.avalon.framework.context.ContextException; import org.apache.avalon.framework.context.Contextualizable; import org.apache.cocoon.servlet.CocoonServlet; * @version CVS $Id: PortletWindowAspect.java,v 1.2 2004/02/06 13:07:17 cziegeler Exp $ public final class PortletWindowAspect extends AbstractAspect implements Contextualizable { /** The environment */ protected PortletContainerEnvironment environment; /* (non-Javadoc) * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context) */ public void contextualize(Context context) throws ContextException { // now get the portal manager ServletConfig servletConfig = (ServletConfig) context.get(CocoonServlet.CONTEXT_SERVLET_CONFIG); PortletPortalManager portalManager = (PortletPortalManager) servletConfig.getServletContext().getAttribute(PortalManager.ROLE); if ( portalManager != null ) { this.environment = portalManager.getPortletContainerEnvironment(); } } if ( this.environment != null ) { InformationProviderService ips = (InformationProviderService) this.environment.getContainerService(InformationProviderService.class);
0
import com.google.cloud.dataflow.sdk.coders.VarLongCoder; import com.google.cloud.dataflow.sdk.transforms.Sum; import com.google.cloud.dataflow.sdk.util.state.CombiningValueState; import com.google.cloud.dataflow.sdk.util.state.StateContents; import com.google.cloud.dataflow.sdk.util.state.StateTag; import com.google.cloud.dataflow.sdk.util.state.StateTags; private static final StateTag<CombiningValueState<Long, Long>> ELEMENTS_IN_PANE_TAG = StateTags.combiningValue("count", VarLongCoder.of(), new Sum.SumLongFn()); CombiningValueState<Long, Long> elementsInPane = c.access(ELEMENTS_IN_PANE_TAG); StateContents<Long> countContents = elementsInPane.get(); elementsInPane.add(1L); // TODO: Consider waiting to read the value until the end of a bundle, since we don't need to // fire immediately when the count exceeds countElems. long count = countContents.read(); CombiningValueState<Long, Long> elementsInPane = c.accessAcrossMergingWindows(ELEMENTS_IN_PANE_TAG); long count = elementsInPane.get().read(); return count >= countElems ? MergeResult.FIRE_AND_FINISH : MergeResult.CONTINUE; c.access(ELEMENTS_IN_PANE_TAG).clear();
0
fireGraphicsNodeChangeStarted(); fireGraphicsNodeChangeCompleted(); fireGraphicsNodeChangeStarted(); fireGraphicsNodeChangeCompleted();
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/adapters/Attic/TestDoubleListList.java,v 1.3 2003/10/02 22:14:31 scolebourne Exp $ import org.apache.commons.collections.AbstractTestList; * @version $Revision: 1.3 $ $Date: 2003/10/02 22:14:31 $ public class TestDoubleListList extends AbstractTestList {
0
import org.apache.ambari.server.state.PropertyInfo.PropertyType; Set<String> userSet = configHelper.getPropertyValuesWithPropertyType(stackId, PropertyType.USER, cluster); String userList = gson.toJson(userSet); hostLevelParams.put(USER_LIST, userList); Set<String> groupSet = configHelper.getPropertyValuesWithPropertyType(stackId, PropertyType.GROUP, cluster); String groupList = gson.toJson(groupSet); hostLevelParams.put(GROUP_LIST, groupList);
0
import java.io.FileOutputStream; import javax.xml.transform.TransformerFactory; import javax.xml.transform.Transformer; import javax.xml.transform.stream.StreamSource; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerConfigurationException; /*import org.apache.xalan.xslt.XSLTProcessorFactory; import org.apache.xalan.xslt.XSLTProcessor;*/ TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformer = tFactory.newTransformer(new StreamSource(stylesheet)); transformer.transform(new StreamSource(xmlReport.toURL().toString()), new StreamResult(new FileOutputStream(createNewReportOutput().getAbsolutePath())));
0
protected String[] flatten(Options options, String[] arguments, boolean stopAtNonOption)
0
import javax.servlet.ServletContext; import org.apache.cocoon.portal.util.AbstractBean; public class PortalStartup extends AbstractBean
0
* @return true if the map changed as a result of this operation * @return true if the map changed as a result of this operation
0
import org.apache.cocoon.util.location.Location; } catch(Exception e) { // Wrap with our location throw ProcessingException.throwLocated("Sitemap: error when calling sub-sitemap", e, getLocation());
0
@Deprecated public static DateFormat getDateFormatter() { return THREAD_LOCAL_DATE_FORMAT.get(); } private static final ThreadLocal<DateFormat> THREAD_LOCAL_DATE_FORMAT = new ThreadLocal<DateFormat>() { @Override public DateFormat initialValue() { DateFormat ret = new SimpleDateFormat(SERIALIZED_DATE_FORMAT_STR); ret.setTimeZone(TimeZone.getTimeZone("UTC")); return ret; } }; sb.append(getDateFormatter().format(value));
0
ConfigurableListableBeanFactory createBeanFactory(ClassLoader classLoader, Logger sitemapLogger, Configuration config, Context sitemapContext, SourceResolver resolver, Settings settings)
0
assertEquals("option missing an argument", "b", e.getOption().getOpt());
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
package org.apache.cocoon.template.jxtg.instructions; import org.apache.cocoon.template.jxtg.script.event.StartElement; import org.apache.cocoon.template.jxtg.script.event.StartInstruction;
0
import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.utils.ElementProxy; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList;
0
sideInputs.put(view.getTagInternal().getId(), ParDoTranslation.translateView(view));
0
CommandRepository commandRepository = executionCommand.getRepositoryFile(); if (null == commandRepository && null != host && null != serviceName) { commandRepository = repoVersionHelper.getCommandRepository(cluster, cluster.getService(serviceName), host, executionCommand.getComponentName()); setVersions(cluster, commandRepository); executionCommand.setRepositoryFile(commandRepository); public void setVersions(Cluster cluster, CommandRepository commandRepository) { if (null != commandRepository && repositoryVersion.isResolved() && !repositoryVersion.getVersion().equals(commandRepository.getRepoVersion())) { commandRepository.setRepoVersion(repositoryVersion.getVersion()); commandRepository.setResolved(true); }
0
/* FALL THRU */
0
* Return the current web application context or if the attributes are null, the parent context. // return the root context return WebApplicationContextUtils.getRequiredWebApplicationContext(ServletContextFactoryBean.getServletContext());
0
return BATIK_12_NAMESPACE_URI;
0
Copyright 2000 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
/** Accept the visitor. */
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting; 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.ImmutableSet;
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.controller.gsinstaller; /** * Test gsInstaller state provider. */ public class TestGSInstallerStateProvider implements GSInstallerStateProvider { private boolean healthy = true; public void setHealthy(boolean healthy) { this.healthy = healthy; } @Override public boolean isHealthy(String hostName, String componentName) { return healthy; } }
0
import org.apache.zookeeper.CreateMode; zk.create("/" + i, null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
0