Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import java.util.HashMap;
import java.util.List;
@JsonProperty("config-groups")
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
private Set<ConfigGroup> configGroups;
public Set<ConfigGroup> getConfigGroups() {
return configGroups;
}
public void setConfigGroups(Set<ConfigGroup>... | 0 |
package org.apache.bcel.generic;
super(org.apache.bcel.Const.DMUL); | 1 |
import java.awt.geom.Point2D;
import org.apache.batik.dom.svg.SVGPathContext;
import org.apache.batik.ext.awt.geom.PathLength;
public class SVGPathElementBridge extends SVGDecoratedShapeElementBridge
implements SVGPathContext {
Shape pathLengthShape = null;
PathLength pathLength = null;
... | 1 |
/**
* 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
* distribu... | 0 |
* @version $Revision: 1.3 $ $Date: 2003/01/11 05:41:26 $
public String[] getPropertyNames(Object pageContext) {
Enumeration e =
((PageContext) pageContext).getAttributeNamesInScope(
PageContext.PAGE_SCOPE);
while (e.hasMoreElements()) {
e =
((PageCont... | 1 |
sshServer.setPasswordAuthenticator(BogusPasswordAuthenticator.INSTANCE); | 0 |
* A {@link Coder} that has no component {@link Coder Coders} or other configuration.
* <p>Unless the behavior is overridden, atomic coders are presumed to be deterministic.
* an {@link AtomicCoder} should have no associated configuration (instance variables, etc). | 0 |
* A {@link org.apache.cocoon.forms.datatype.Datatype Datatype} implementation for
* @version CVS $Id: EnumType.java,v 1.2 2004/03/09 11:31:11 joerg Exp $
* @see org.apache.cocoon.forms.datatype.Datatype#getTypeClass()
* @see org.apache.cocoon.forms.datatype.Datatype#getDescriptiveName() | 0 |
@Override
@Override | 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 |
String[] parts = logPath.split("/"); | 0 |
import java.io.IOException;
import org.apache.commons.io.IOUtils;
try {
return IOUtils.toString(getClass().getResourceAsStream("/banner.txt"));
} catch (IOException e) {
return "AmbariShell";
} | 0 |
* The JCE DSA Signature algorithm creates ASN.1 encoded (r, s) value
* The JCE DSA Signature algorithm creates ASN.1 encoded (r, s) value | 0 |
boolean printColon = false;
if ( config != null ) {
if ( printColon ) {
pw.print(',');
}
this.printConfigurationJson(pw, servicePid, config, pidFilter, locale);
... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/converters/IntegerConverterTestCase.java,v 1.2 2003/10/05 13:32:38 rdonkin Exp $
* $Revision: 1.2 $
* $Date: 2003/10/05 13:32:38 $
*
* Copyright (c) 2001-2003 The Apache Software ... | 0 |
boolean traceEnabled = log.isTraceEnabled();
if (traceEnabled) {
if (traceEnabled) {
boolean traceEnabled = log.isTraceEnabled();
if (traceEnabled) {
if (traceEnabled) {
boolean debugEnabled = log.isDebugEnabled();
if (d... | 0 |
PCollectionView<Iterable<KV<String, String>>> empty =
input
.apply("Consume", Filter.by(SerializableFunctions.constant(false)))
.apply(View.asIterable()); | 0 |
import java.net.InetAddress;
import java.net.UnknownHostException;
public static final String DEFAULT_HOST_NAME = "localhost";
private static final String realm;
private static String hostName;
try {
hostName = InetAddress.getLocalHost().getHostName();
} catch ... | 0 |
private final ArrayList<FileObject> resources = new ArrayList<FileObject>();
return resources.toArray(new FileObject[resources.size()]);
for (Enumeration<Permission> elem = src.elements(); elem.hasMoreElements();)
final Permission permission = elem.nextElement();
final Iterator<F... | 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... | 0 |
Tx = SVGUtilities.convertAffineTransform(Tx, gn, unitsType); | 0 |
import org.apache.cocoon.portal.services.CopletFactory;
import org.apache.cocoon.portal.services.LayoutFactory; | 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 ... | 0 |
KerberosKeytabDescriptor keytabDescriptor = identity.getKeytabDescriptor();
String keytabFile = null;
if (keytabDescriptor != null) {
keytabFile = KerberosDescriptor.replaceVariables(keytabDescriptor.getFile(), configurations);
}
... | 0 |
/*
* Copyright (C) 1993-2003 SEAGULL
*
* RequiredCharsetNamesTest.java
* Created on Jul 20, 2009, 6:08:58 PM
*
*/
package org.apache.commons.codec;
import junit.framework.Assert;
import junit.framework.TestCase;
/**
* Sanity checks.
*
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
* ... | 0 |
import org.apache.cocoon.components.flow.Flow;
* @version CVS $Id: XMLFormTransformer.java,v 1.3 2003/05/07 04:36:32 coliver Exp $
WebContinuation kont =
Flow.getWebContinuation(objectModel);
if (kont != null) { | 0 |
ResultSetHandler<List<Object>> h = new ColumnListHandler();
List<Object> results = h.handle(this.rs);
ResultSetHandler<List<Object>> h = new ColumnListHandler(2);
List<Object> results = h.handle(this.rs);
ResultSetHandler<List<Object>> h = new ColumnListHandler("Three");
... | 0 |
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly; | 0 |
package org.apache.commons.codec.language;
import org.apache.commons.codec.EncoderException;
import org.apache.commons.codec.StringEncoder; | 1 |
* <p>These XML fragments (normally all in the {@link Constants#INSTANCE_NS "CForms Instance"} namespace), can
* for the forms template transformer.</p>
* @version CVS $Id: EffectWidgetReplacingPipe.java,v 1.4 2004/03/11 02:56:32 joerg Exp $
* Form location attribute on <code>ft:form-template</code> element, con... | 0 |
SdkComponents sdkComponents = SdkComponents.create(transform.getPipeline().getOptions());
SdkComponents components = SdkComponents.create(transform.getPipeline().getOptions()); | 0 |
@Mock private EvaluationContext context;
bundleFactory = ImmutableListBundleFactory.create();
TransformResult result = evaluator.finishBundle();
TransformResult result = evaluator.finishBundle();
TransformResult result = evaluator.finishBundle(); | 0 |
* FileSystemUtils.freeSpace("C:"); // Windows
* FileSystemUtils.freeSpaceKb("C:"); // Windows
* FileSystemUtils.freeSpaceKb("/volume"); // *nix | 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... | 0 |
if (!doomed.isEmpty() && !updates.isEmpty()) | 0 |
"<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\"></html>", | 0 |
import org.apache.felix.gogo.commands.Command;
@Command(scope = "osgi", name = "resolve", description = "Resolve bundle(s)") | 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 ... | 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 |
public interface BatchWriter extends AutoCloseable {
@Override | 1 |
this.cacheConfig.isNeverCacheHTTP10ResponsesWithQuery(), config.is303CachingEnabled()); | 0 |
import static com.google.common.base.Preconditions.checkNotNull;
/** Implementation of {@link #read} and {@link #readGenericRecords}. */
@Nullable abstract ValueProvider<String> getFilepattern();
abstract Builder<T> setFilepattern(ValueProvider<String> filepattern);
public Read<T> from(ValueProvider<Str... | 0 |
protected void writeHeadLine(final HttpMessage message) | 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... | 0 |
try (final CloseableHttpClient httpclient = HttpClients.custom()
try (final CloseableHttpResponse response = httpclient.execute(target, httpget)) { | 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 ... | 0 |
Capture<DBAccessor.DBColumnInfo> capturedScDesiredVersionColumnInfo = newCapture();
dbAccessor.addColumn(eq(UpgradeCatalog240.SERVICE_COMPONENT_DESIRED_STATE_TABLE),
capture(capturedScDesiredVersionColumnInfo));
Capture<DBAccessor.DBColumnInfo> capturedClusterUpgradeColumnInfo = newCapture();
... | 0 |
import java.nio.charset.StandardCharsets;
byte[] hmacKey = "test".getBytes(StandardCharsets.US_ASCII);
byte[] hmacKey = "test".getBytes(StandardCharsets.US_ASCII);
byte[] hmacKey = "test".getBytes(StandardCharsets.US_ASCII); | 1 |
public void testToString() {
String s = "name = value; param1 = value1; param2 = value2";
HeaderElement element = new HeaderElement(s.toCharArray());
assertEquals(s, element.toString());
s = "name; param1 = value1; param2 = value2";
element = new HeaderElement(s.toCharArray()... | 0 |
import com.google.common.base.Preconditions;
import com.twitter.common.zookeeper.guice.client.ZooKeeperClientModule.ClientConfig;
private final ClientConfig zkClientConfig;
public MesosLogStreamModule(ClientConfig zkClientConfig) {
this.zkClientConfig = Preconditions.checkNotNull(zkClientConfig);
}
Log pr... | 0 |
/**
* Utility method to handle relative redirects.
* Some app servers like web sphere handle relative redirects differently
* therefore we should make an absolute url before invoking send redirect.
*/
protected void sendRedirect(final HttpServletRequest request,
... | 0 |
public synchronized void init(SortedKeyValueIterator<Key,Value> source, | 0 |
* <p>Used to wrap existing {@link StreamObserver}s to be able to install an {@link
* ClientCallStreamObserver#setOnReadyHandler(Runnable) onReadyHandler}.
ForwardingClientResponseObserver(StreamObserver<ReqT> inboundObserver, Runnable onReadyHandler) { | 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 ma... | 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... | 0 |
* @since 3.0
* @since 3.1
* @since 3.1
* @since 3.1 | 0 |
AccumuloInputFormat.setClientInfo(job, this.getClientInfo());
AccumuloOutputFormat.setClientInfo(job, this.getClientInfo()); | 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... | 0 |
import org.apache.sshd.common.util.ValidateUtils;
// NOTE: although data length is defined as UINT32, we do not expected sizes above Integer.MAX_VALUE
ValidateUtils.checkTrue(dataLength >= 0, "Illegal data length: %d", dataLength); | 0 |
import java.nio.charset.StandardCharsets;
err.write(("Unknown command: " + command + "\n").getBytes(StandardCharsets.UTF_8)); | 0 |
MemCacheEntryFactory entryGenerator = new MemCacheEntryFactory(); | 0 |
* $Revision: 1.6 $
* $Date: 2004/01/18 23:08:45 $
import java.lang.reflect.Method;
import java.sql.DriverManager;
* @version $Id: SQLNestedException.java,v 1.6 2004/01/18 23:08:45 dirkv Exp $
/* Throwable.getCause detection as found in commons-lang */
private static final Method THROWABLE_CAUSE_METHOD;
s... | 0 |
cache.add(item); | 0 |
public ClusterControl getClusterControl() { | 0 |
import java.util.List;
import javax.xml.namespace.QName;
import org.apache.xml.security.stax.ext.DocumentContext;
import org.apache.xml.security.stax.ext.InputProcessorChain;
import org.apache.xml.security.stax.ext.stax.XMLSecEvent;
import org.apache.xml.security.stax.securityEvent.SignedElementSecurityEvent;
... | 0 |
* {@link SessionOutputBuffer} mockup implementation. | 0 |
import org.apache.aurora.scheduler.quota.QuotaCheckResult;
import org.apache.aurora.scheduler.quota.QuotaManager;
import static org.apache.aurora.scheduler.quota.QuotaCheckResult.Result.INSUFFICIENT_QUOTA;
import static org.apache.aurora.scheduler.quota.QuotaCheckResult.Result.SUFFICIENT_QUOTA;
private static final Q... | 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... | 0 |
.loadTrustMaterial(new File("my.keystore"), "nopassword".toCharArray(),
new TrustSelfSignedStrategy()) | 0 |
c1.createClusterVersion(stackId.getStackName(), stackId.getStackVersion(), "admin", RepositoryVersionState.UPGRADING);
c1.createClusterVersion(stackId.getStackName(), stackId.getStackVersion(), "admin", RepositoryVersionState.UPGRADING);
foo.createClusterVersion(stackId.getStackName(), stackId.getStackVersi... | 0 |
bookie = new Bookie(5000, null, txnDir, new File[] {ledgerDir}); | 0 |
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.DefaultArtifact;
import org.apache.maven.artifact.handler.ArtifactHandler;
import org.apache.maven.artifact.handler.DefaultArtifactHandler;
import org.apache.maven.artifact.versioning.VersionRange;
import org.apache.maven.shared.dependency.grap... | 0 |
* @version CVS $Id: SlideSourceFactory.java,v 1.9 2003/12/10 17:22:47 unico Exp $
SourceCredential credential;
credential = new SourceCredential(principal);
NamespaceAccessToken nat = m_repository.getNamespaceToken(namespace);
if (nat == null) {
throw new S... | 0 |
@SuppressWarnings("fallthrough")
@SuppressWarnings("fallthrough")
@SuppressWarnings("fallthrough")
@SuppressWarnings("fallthrough")
@SuppressWarnings("fallthrough") | 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.ldap.domain.AmbariLdapConfigurationKeys;
AmbariLdapConfiguration ambariLdapConfiguration = new AmbariLdapConfiguration(Maps.newHashMap());
AmbariLdapConfiguration ambariLdapConfiguration = new AmbariLdapConfiguration(Maps.newHashMap());
configMap.put(AmbariLdapConfigurationKe... | 0 |
* A filter is a data structure which aims at offering a lossy summary of a set <code>A</code>. The
* key idea is to map entries of <code>A</code> (also called <i>keys</i>) into several positions in
* a vector through the use of several hash functions. | 0 |
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
* 4. The names "The Jakarta Project", "Commons", ... | 0 |
String metricRegEx;
if (metricNameEntry.contains("*")) {
String metricNameWithEscSeq = metricNameEntry.replace("*","\\*");
metricRegEx = metricNameWithEscSeq.replace("%", ".*");
} else {
metricRegEx = metricNameEntry.replace("%", ".*");
} | 0 |
TemplateExpression parseExpression(JexlInfo info, String expr, Scope scope) { // CSOFF: MethodLength
// CHECKSTYLE:OFF
StringBuilder strb = new StringBuilder(64); // CSOFF: MagicNumber
// CHECKSTYLE:ON
StringBuffer strb = new StringBuffer(64); // CSOF... | 0 |
} catch (final URISyntaxException | MalformedURLException ignore) { | 0 |
private MapSetExecutor(Class<?> clazz, java.lang.reflect.Method method, Object key, Object value) {
valueClass = classOf(value); | 0 |
import org.apache.ambari.server.actionmanager.CommandExecutionType;
import org.apache.ambari.server.orm.DBAccessor;
dbAccessor.addColumn("stage",
new DBAccessor.DBColumnInfo("command_execution_type", String.class, 32, CommandExecutionType.STAGE.toString(),
false));
| 0 |
import org.apache.http.message.LineFormatter;
import org.apache.http.util.Args;
Args.notNull(buffer, "Session input buffer");
Args.notNull(message, "HTTP message"); | 0 |
if (isOnlyASCII(input)) { // TODO temporary hack to work round IDN.toASCII bug
return input;
}
/*
* Check if input contains only ASCII
* Treats null as all ASCII
*/
private static boolean isOnlyASCII(String input) {
if (input == null) {
return true;... | 0 |
// Bindings for SchedulerController
bind(SchedulerController.class).to(SchedulerThriftInterface.class).in(Singleton.class);
// TODO(ksweeney): Refactor LoggingThriftInterface to LoggingSchedulerController
LoggingThriftInterface.bind(binder(), SchedulerThriftRouter.class);
bind(SchedulerThriftRouter... | 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... | 0 |
/*
* maybe do some type conversions or name mapping code...
*
super.setAttribute(name, ConvertUtils.convert(Integer.class, value));
*/ | 0 |
CLUSTER_MANAGE_ALERT_NOTIFICATIONS("CLUSTER.MANAGE_ALERT_NOTIFICATIONS"), | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/io/Attic/CharIteratorReader.java,v 1.3 2003/11/07 20:13:05 rwaldhoff Exp $
* @deprecated This code has been moved to Jakarta Commons Primitives (http://jakarta... | 0 |
return getSecurityToken(keyValueType, securityContext);
new KeyNameSecurityToken(keyName, securityContext,
new AbstractInboundSecurityToken(securityContext, null,
new AbstractInboundSecurityToken(securityContext, null,
private static Se... | 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 ... | 0 |
makeRunner(WindowingStrategy.of(FixedWindows.of(Duration.millis(10))));
makeRunner(WindowingStrategy.of(FixedWindows.of(Duration.millis(10))));
SlidingWindows.of(Duration.millis(20)).every(Duration.millis(10))));
makeRunner(WindowingStrategy.of(FixedWindows.of(Duration.millis(10))));... | 0 |
if (null != targetIds) {
Set<AlertTargetEntity> targets = new HashSet<AlertTargetEntity>();
if (ids.size() > 0) {
targets.addAll(s_dao.findTargetsById(ids));
}
| 0 |
ITypedStruct ts = structType.convert(s, Multiplicity.REQUIRED);
ITypedStruct ts = recursiveStructType.convert(s2, Multiplicity.REQUIRED); | 0 |
Map<String, String> commandParams = new HashMap<>();
Map<String, String> commandParams = new HashMap<>();
Map<String, String> commandParams = new HashMap<>(); | 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... | 0 |
import org.apache.cocoon.portal.om.CopletDefinition; | 0 |
private Run(NexmarkOptions options, NexmarkConfiguration configuration) {
runAll(options);
}
void runAll(NexmarkOptions options) throws IOException {
Instant start = Instant.now();
completion.submit(new Run(options, configuration)); | 0 |
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import static org.easymock.EasyMock.anyBoolean;
(Set.class), anyBoolean())).andReturn(kerberosConfig).once(); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.