Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
c14n.setSecureValidation(secureValidation); | 0 |
} catch (NumberFormatException e)
* @param line a response line
* @return the parsed {@link Article}, if unparseable then isDummy()
*
return new ReplyIterator(_reader_);
return new ReplyIterator(_reader_);
* @see #iterateNewNewsgroups(NewGroupsOrNewsQuery)
*... | 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 ... | 0 |
store.setDefault( RepositoryConfiguration.REPOSITORY_DEFAULT_SET, "org.apache.felix.sigil.core.workspaceprovider" ); | 0 |
private static final String RM_GET_SCHEDULER_CONFIG = "%s/ws/v1/cluster/scheduler";
/**
* Gets scheduler info from RM
*
* @return scheduler info
*/
@GET
@Produces(MediaType.APPLICATION_JSON)
@Path("/rmCurrentConfig")
public Response getRmSchedulerConfig() {
try {
String url = String.fo... | 0 |
* Copyright (C) 2015 Google Inc. | 0 |
import java.util.Properties;
ClientContext context = new ClientContext(inst, creds, new Properties());
ClientContext context = new ClientContext(inst, creds, new Properties()); | 0 |
import org.junit.Rule;
import org.junit.rules.ExpectedException;
@Rule
public ExpectedException thrown = ExpectedException.none();
@Test
thrown.expect(IllegalArgumentException.class);
@Test
thrown.expect(IllegalArgumentException.class);
@Test
thrown.expect(IllegalArgumentException.class);
@Test... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/ArrayStack.java,v 1.2 2001/04/16 22:39:21 geirm Exp $
* $Revision: 1.2 $
* $Date: 2001/04/16 22:39:21 $
* @version $Revision: 1.2 $ $Date: 2001/04/16 22:39:21 $
/**
* R... | 0 |
* Copyright 2000-2009 The Apache Software Foundation | 0 |
if (cl.hasOption(OptUtil.tableNamespaceOpt().getOpt())) {
String namespace = shellState.getConnector().tableNamespaceOperations().namespaceIdMap().get(OptUtil.getTableNamespaceOpt(cl, shellState));
o.addOption(OptUtil.tableNamespaceOpt("name of table namespace to list only its tables")); | 0 |
EVERYWHERE
if (required) { | 0 |
import java.util.Collections;
import java.util.Map;
public void writeTo(final OutputStream out, int mode) throws IOException {
byte[] tmp = new byte[4096];
int l;
while ((l = in.read(tmp)) != -1) {
out.write(tmp, 0, l);
}
out.flush();
p... | 0 |
return getFramework().findBundleEntries(
adapt(BundleRevision.class), path, filePattern, recurse); | 1 |
package org.apache.accumulo.core.clientImpl; | 0 |
public SVGAnimatedPreserveAspectRatio getPreserveAspectRatio( );
| 1 |
/**
* Returns the {@link GlobalCombineFn} used by this Combine operation.
*/
public GlobalCombineFn<? super InputT, ?, OutputT> getFn() {
return fn;
}
| 0 |
@JsonProperty("tags") | 0 |
* @version $Revision$ | 0 |
public static final HeaderElement[] parseElements(
final CharArrayBuffer buffer, final int indexFrom, final int indexTo) {
int cur = indexFrom;
int from = indexFrom;
while (cur < indexTo) {
char ch = buffer.charAt(cur);
element = parse(buffer, from, cu... | 0 |
private LinkedList<Widget> children = new LinkedList<Widget>();
public List<Widget> getChildren() { | 0 |
if (source.hasNext())
currentRow = source.peek().getKey().getRow();
if (disabled)
throw new IllegalStateException("SingleRowIter no longer valid");
if (disabled)
throw new IllegalStateException("SingleRowIter no longer valid");
if (currentRow == null)
throw new No... | 1 |
import com.google.cloud.dataflow.sdk.transforms.windowing.GlobalWindows;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
final Map<TupleTag<?>, Map<BoundedWindow, Object>> sideInputCache;
<T> T sideInput(PCollectionView<T> view, BoundedWindow mainInputWindow) {
Map<BoundedWi... | 0 |
String instanceName = c.info().getInstanceName();
String zookeepers = c.info().getZooKeepers(); | 0 |
return m_name.equals(capability.getName()) && m_filter.matchCase(capability.getProperties()); | 0 |
import java.nio.charset.StandardCharsets;
byte[] hmacKey = "secret".getBytes(StandardCharsets.US_ASCII);
XMLStreamWriter xmlStreamWriter = outboundXMLSec.processOutMessage(baos, StandardCharsets.UTF_8.name());
// System.out.println("Got:\n" + new String(baos.toByteArray(), StandardCharsets.UTF_8... | 1 |
final String username = proxyConfiguration.getUsername();
final String password = proxyConfiguration.getPassword();
return new UsernamePasswordCredentials(username, password != null ? password.toCharArray() : null); | 0 |
import org.apache.http.nio.protocol.TestAllProtocol;
suite.addTest(TestAllProtocol.suite()); | 0 |
Table.ID tableId = Table.ID.of(c.tableOperations().tableIdMap().get(tableName)); | 1 |
TabletBalancer balancer = ServerConfiguration.getSystemConfiguration(instance).instantiateClassProperty(Property.MASTER_TABLET_BALANCER,
TabletBalancer.class, | 0 |
try {
channel.close();
} catch (final IOException ignore) {} | 0 |
package org.apache.commons.collections.functors;
import static org.apache.commons.collections.functors.EqualPredicate.equalPredicate;
import static org.apache.commons.collections.functors.NullPredicate.nullPredicate;
import static org.junit.Assert.assertSame;
import org.apache.commons.collections.Predicate;
import or... | 0 |
import org.apache.accumulo.test.categories.AnyClusterTest;
import org.apache.accumulo.test.categories.SunnyDayTests;
import org.junit.experimental.categories.Category;
@Category({AnyClusterTest.class, SunnyDayTests.class}) | 0 |
package org.apache.commons.dbcp2.managed;
import org.apache.commons.dbcp2.ConnectionFactory; | 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 ... | 0 |
@Internal
public PipelineOptions getOptions(){
return defaultOptions;
}
| 0 |
BasicClientCookie cookie = new BasicClientCookie("name", null);
BasicClientCookie cookie = new BasicClientCookie("name", null);
BasicClientCookie cookie = new BasicClientCookie("name", null);
BasicClientCookie cookie = new BasicClientCookie("name", null);
BasicClientCookie cookie... | 0 |
import java.util.ArrayList;
List<String> list;
if (obj instanceof String) {
list = new ArrayList<String>();
list.add((String)obj);
}
else {
list = (List<String>)obj;
}
return (T)Enum.valueOf(enumC... | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger LOG = LoggerFactory.getLogger(ViewDataMigrationService.class); | 1 |
* Creates a candidate that can be used to offer leadership for the given {@code group}.
final Membership membership = group.join(IP_ADDRESS_DATA_SUPPLIER, new Command() {
return Iterables.isEmpty(memberIds) ? null : MOST_RECENT_JUDGE.apply(memberIds); | 0 |
@Override | 0 |
MasterMonitorInfo mmi = monitor.getMmi();
if (mmi == null)
return servers;
for (String server : mmi.serversShuttingDown) { | 0 |
import org.apache.beam.vendor.grpc.v1_13_1.com.google.protobuf.Timestamp; | 0 |
* <tr><td>d+</td><td>-d [classname] (creates object via empty constructor)</td></tr>
* <tr><td>e%</td><td>-e [number] (creates Double/Long instance depending on existing of a '.')</td></tr> | 0 |
import java.util.TimerTask;
import java.util.concurrent.atomic.AtomicReference;
import org.apache.accumulo.monitor.servlets.BasicServlet;
import org.apache.accumulo.server.util.time.SimpleTimer;
public static AtomicReference<String> cachedInstanceName = new AtomicReference<String>("(Unavailable)");
// Learn ou... | 0 |
* @param _msgID
public ResourceResolverException(String _msgID, Attr uri, String BaseURI) {
super(_msgID);
* @param _msgID
public ResourceResolverException(String _msgID, Object exArgs[], Attr uri,
super(_msgID, exArgs);
* @param _msgID
public ResourceResolverException(String _msgID, Ex... | 0 |
String CSS_FONT_PROPERTY = "font";
String CSS_CENTER_VALUE = "center"; | 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 u... | 0 |
import org.apache.ambari.server.controller.metrics.MetricsHostProvider;
public abstract class AbstractProviderModule implements ProviderModule, ResourceProviderObserver, JMXHostProvider, GangliaHostProvider, MetricsHostProvider {
// ----- MetricsHostProvider ---------------------------------------------------
// --... | 0 |
values.apply(new DirectGroupByKeyOnly<>()); | 0 |
@SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum { | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/bag/TransformedSortedBag.java,v 1.2 2004/01/05 21:54:06 scolebourne Exp $
* Copyright (c) 2003-2004 The Apache Software Foundation. All rights
* @version $Revision: 1.2 $ $Date:... | 0 |
import javax.servlet.http.HttpSession;
* @version $Id$
HttpSession session = request.getSession(false); | 0 |
if (req.isSatisfied(caps[capIdx]))
if (req.isSatisfied(caps[capIdx])) | 0 |
* @version $Revision$ | 1 |
* @version CVS $Id: CopletThread.java,v 1.2 2003/05/16 07:19:44 cziegeler Exp $
SourceUtil.toSAX(source, xc); | 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 ... | 1 |
SecurityContextHolder.getContext().setAuthentication(TestAuthenticationFactory.createAdministrator());
String serviceName, State desiredState)
throws AmbariException, AuthorizationException {
throws AmbariException, AuthorizationException {
... | 0 |
try {
//update service info due to new stack
service.updateServiceInfo();
//update component info due to new stack
for (ServiceComponent sc : service.getServiceComponents().values()) {
}
} catch (AmbariException e) {
} | 0 |
valueCoder.encode(value.value, outStream);
valueCoder.decode(inStream), | 0 |
channel.getInvertedIn().write(buffer.array(), buffer.rpos(), buffer.available());
channel.getInvertedIn().flush();
invertedIn = out = new ChannelOutputStream(this, remoteWindow, log, SshConstants.SSH_MSG_CHANNEL_DATA); | 0 |
public void clearHeaders() {
this.headergroup.clear();
}
| 0 |
dsVersion, configurableServiceProperties
dsVersion, configurableServiceProperties
dsVersion, configurableServiceProperties | 0 |
* Copyright 2016-2017 Seznam.cz, a.s. | 0 |
/* (non-Javadoc)
* @see org.apache.cocoon.Processor#getComponentConfigurations()
public Configuration[] getComponentConfigurations() {
return null; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/dom/DOMNamespaceIterator.java,v 1.7 2003/10/09 21:31:41 rdonkin Exp $
* $Revision: 1.7 $
* $Date: 2003/10/09 21:31:41 $
* any, must include the following acknowledgement:
* ... | 0 |
import com.google.common.collect.Iterators;
assertTrue(Iterators.size(((Iterable<?>) s).iterator()) > 0);
assertEquals(0, Iterators.size(((Iterable<?>) s).iterator())); | 0 |
* @see org.apache.sshd.server.SshServer#setSessionFactory(SessionFactory) | 0 |
package org.apache.felix.ipojo.test.scenarios.component;
import foo.Foo;
@Foo(bar="bar")
public class OnlyFoo {
} | 0 |
import java.util.regex.Matcher;
Pattern pattern = Pattern.compile(nameSpace);
String nmSpace = namespaceDescriptor.getName();
Matcher matcher = pattern.matcher(nmSpace);
if (matcher.find()){ | 0 |
import org.apache.geronimo.gshell.clp.Option;
@Argument(required = true, multiValued = true, description = "Bundle IDs")
@Option(name = "--force")
boolean force;
if (force || !Util.isASystemBundle(getBundleContext(), bundle) || Util.accessToSystemBundleIsAllowed(bundle.getBundleId(), io... | 0 |
import org.apache.ambari.server.stack.upgrade.orchestrate.UpgradeContextFactory; | 0 |
* @version $Id$ | 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 ... | 1 |
import org.apache.hc.core5.io.CloseMode;
server.close(CloseMode.IMMEDIATE); | 0 |
import com.twitter.aurora.gen.AuroraAdmin;
bind(AuroraAdmin.Iface.class).to(SchedulerThriftInterface.class); | 0 |
package org.apache.commons.vfs2.provider.http;
import org.apache.commons.vfs2.FileSystemException;
import org.apache.commons.vfs2.provider.AbstractRandomAccessStreamContent;
import org.apache.commons.vfs2.util.MonitorInputStream;
import org.apache.commons.vfs2.util.RandomAccessMode; | 1 |
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
* @version $Id: NodeSet.java,v 1.2 2003/10/09 21:31:38 rdonkin Exp $ | 0 |
* Copyright 2002,2004 The Apache Software Foundation.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... | 1 |
Set<String> propertyIdSet = null;
List<String> parameterList = null;
if (metric_name != null) {
propertyIdSet = metrics.get(metric_name);
parameterList = new LinkedList<String>();
if (propertyIdSet == null) {
for (Map.Entry<String, Set<String>> entry : metrics.entrySe... | 0 |
config.put("proxy.user", "u"); | 0 |
package org.apache.commons.vfs2.example;
import org.apache.commons.vfs2.FileObject;
import org.apache.commons.vfs2.FileSystemException;
import org.apache.commons.vfs2.FileSystemManager;
import org.apache.commons.vfs2.FileType;
import org.apache.commons.vfs2.VFS;
System.err.println("e.g. java org.apache.comm... | 1 |
mainInput.getCoder(), | 0 |
* Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
import info.dmtree.DmtData;
import info.dmtree.DmtException;
import info.dmtree.DmtSession;
import info.dmtree.MetaNode;
* etc. All errors described by the error codes {@link DmtException#INVALID_URI}, {@link DmtException#URI_TOO_LONG}, {@link DmtExcept... | 0 |
assertEquals("Expected 14 colums, but found " + parts.length + " instead for '" + Arrays.toString(parts) + "'", 14, parts.length);
// Scan ID should be a long (throwing an exception if it fails to parse)
Long.parseLong(parts[11].trim()); | 0 |
@SuppressWarnings("unchecked") // cannot easily avoid this warning
Collections.sort(testList, sCompare); // unchecked | 0 |
*
* {@code Import-Package: org.osgi.converter; version="[1.0,2.0)"}
* {@code Import-Package: org.osgi.converter; version="[1.0,1.1)"}
*
* @author $Id: 1b82a2a1db1431c5e4398f368662b5b6fb5f8547 $
package org.osgi.converter; | 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 ma... | 0 |
import org.apache.beam.sdk.options.GcsOptions;
import org.apache.beam.sdk.util.gcsfs.GcsPath; | 0 |
import java.io.InputStream;
import java.util.Iterator;
import org.apache.commons.vfs.FileContent;
import org.apache.commons.vfs.FileSystemException;
import org.apache.commons.vfs.FileType;
import org.apache.commons.vfs.NameScope;
* @version $Revision: 1.3 $ $Date: 2003/02/13 04:28:46 $
* Tests concurrent reads on... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/impl/TagScript.java,v 1.35 2003/01/24 19:03:24 morgand Exp $
* $Revision: 1.35 $
* $Date: 2003/01/24 19:03:24 $
* $Id: TagScript.java,v 1.35 2003/01/24 19:03:24 morgand Exp $
import org.apa... | 1 |
if (sendCommand("STLS") != POP3Reply.OK) | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/map/TestAll.java,v 1.11 2003/12/14 21:42:55 psteitz Exp $
* @version $Revision: 1.11 $ $Date: 2003/12/14 21:42:55 $
suite.addTest(TestCompositeMap.suite()); | 0 |
/** Tests for {@link MultiStepCombine}. */ | 1 |
DataflowRunner.verifyStateSupportForWindowingStrategy(input.getWindowingStrategy());
DataflowRunner.verifyStateSupportForWindowingStrategy(input.getWindowingStrategy()); | 0 |
import com.esotericsoftware.kryo.io.InputChunked;
import com.esotericsoftware.kryo.io.OutputChunked;
private static ThreadLocal<OutputChunked> threadLocalOutput =
ThreadLocal.withInitial(() -> new OutputChunked(DEFAULT_BUFFER_SIZE));
private static ThreadLocal<InputChunked> threadLocalInput =
ThreadLoca... | 0 |
import org.apache.accumulo.core.client.impl.AccumuloClientImpl;
import org.apache.accumulo.core.client.impl.ConnectorImpl;
* @deprecated since 2.0.0. Use {@link AccumuloClient} for writing new code. Connector is available
@Deprecated
return new ConnectorImpl((AccumuloClientImpl) client); | 0 |
package org.apache.accumulo.core.iterators.user;
import org.apache.accumulo.core.iterators.IteratorEnvironment;
import org.apache.accumulo.core.iterators.IteratorUtil;
import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
import org.apache.accumulo.core.iterators.SortedMapIterator;
import org.apache.accumul... | 0 |
if ( securityManager != null && !cache.getMethodPerm( method ) )
throw new IllegalAccessException( "Method [" + method + "] cannot be accessed." );
if ( method == null || ( method.getParameterTypes().length
> methodDescriptor.getMethod().getParamet... | 0 |
meth = bundle.getClass().getMethod("getBundleContext", new Class[0]); // This method is public and is specified in the Bundle interface.
m_logger.log(Logger.ERROR, "Cannot get the BundleContext by invoking " + fields[i].getName(), e);
m_logger.log(Logger.ERROR, "Canno... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.