Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
ServerMutation m = (ServerMutation) mutation; if (mv1.charAt(0) != mv2.charAt(0)) throw new IllegalArgumentException("Time types differ " + mv1 + " " + mv2); if (t1 < t2) return mv2; else return mv1; if (mv1.charAt(0) != LOGICAL_TIME_ID && mv1.charAt(0) != MILLI...
0
import org.apache.commons.vfs.FileSystem; * @version $Revision: 1.3 $ $Date: 2002/08/22 02:42:46 $
0
* If {@code coderType} is a subclass of {@link Coder} for a specific type {@code T}, returns * {@code T.class}. Otherwise, raises IllegalArgumentException. private <T, CoderT extends Coder> TypeDescriptor<T> getCodedType( TypeDescriptor<CoderT> coderType) { TypeDescriptor<? super CoderT> cod...
0
* Get the OS Type: RHEL6/CentOS6/...
0
import org.apache.batik.anim.dom.XBLOMContentElement;
0
import org.apache.felix.framework.util.manifestparser.NativeLibraryClause; s = NativeLibraryClause.normalizeOSName(System.getProperty("os.name")); s = NativeLibraryClause.normalizeProcessor(System.getProperty("os.arch"));
0
if (provider == null) { } else { try { spi = TransformService.getInstance(c14nalg, "DOM", provider); } catch (NoSuchAlgorithmException nsae) { spi = TransformService.getInstanc...
0
* Calculate a modulus <i>Check Digit</i> for a code which does not yet have one. * @param code The code for which to calculate the Check Digit; * the check digit should not be included * @throws CheckDigitException if an error occurs calculating the check digit
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
// paintedArea = shapePainter.getPaintedArea(); // primitiveBounds = paintedArea.getBounds2D(); primitiveBounds = shapePainter.getPaintedBounds();
0
@Override @Override
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 m...
0
private static final long serialVersionUID = 8012776320318623652L; * Constructs a new VerificationException with null as its error message string. */ VerificationException(){ super(); } /** * Constructs a new VerificationException with the specified error message. */ Veri...
0
import org.apache.xml.security.test.TestUtils; Element nscontext = TestUtils.createDSctx(doc, "ds", Constants.SignatureSpecNS);
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...
0
import org.apache.log4j.Logger; private static final Logger log = Logger.getLogger(ZKAuthenticatorTest.class); log.error(e);
0
* @version $Revision: 1.4 $, $Date: 2004/06/16 18:13:53 $ * @throws ConfigurationException If error reading data source. * @throws ConfigurationException If error reading data source. final StringBuffer subhierarchy = initProperties(child, } String ...
0
import org.apache.accumulo.core.client.mapreduce.RangeInputSplit;
0
import org.apache.http.conn.HttpClientConnectionManager; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; HttpClientConnectionManager connManager = new PoolingHttpClientConnectionManager(schemeRegistry);
0
package org.apache.bcel.generic; super(org.apache.bcel.Const.DSTORE, org.apache.bcel.Const.DSTORE_0); super(org.apache.bcel.Const.DSTORE, org.apache.bcel.Const.DSTORE_0, n);
1
cf.addListener(f -> future.setValue(Boolean.TRUE)); session.write(buffer).addListener((IoFutureListener<WriteFuture>) cf -> { Throwable t = cf.getException(); if (t != null) { future.setException(t); } else { future.setWritten()...
0
import cz.seznam.euphoria.core.annotation.audience.Audience; @Audience(Audience.Type.INTERNAL)
0
IOSGiInstall findInstall(String id); IOSGiInstallType findInstallType(String location);
0
final private Map<Long,AtomicInteger> counts = new HashMap<>();
1
// Allow the special default table IDs String ALPHA_NUM_REGEX_TABLE_ID = "[!+]?\\w+";
0
Copyright 2001 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 a...
0
import org.apache.ambari.server.state.repository.VersionDefinitionXml; /** * Parse the version XML into its object representation. This causes the XML to be lazy-loaded * from storage. * @return {@code null} if the XSD is not available. * @throws Exception */ public VersionDefinitionXml getRepositor...
0
* @param path * @param arguments * {@link #generateWidget(Widget, Map)}.
0
import static org.apache.ambari.metrics.adservice.prototype.common.StatisticUtils.median; import static org.apache.ambari.metrics.adservice.prototype.common.StatisticUtils.sdev;
0
public static final String ACCUMULO_CLASSPATH_VALUE = "$ACCUMULO_HOME/conf,\n" + "$ACCUMULO_HOME/lib/[^.].*.jar,\n" + "$ZOOKEEPER_HOME/zookeeper[^.].*.jar,\n" + "$HADOOP_PREFIX/[^.].*.jar,\n" + "$HADOOP_CONF_DIR,\n" + "$HADOOP_PREFIX/lib/[^.].*.jar,\n"; // Register the shutdown hook ...
1
* 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 ap...
0
/** * 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
* This mechanism provides isolation for web apps deployed in the same container. * * @return The (pseudo-singleton) BeanUtils bean instance * This mechanism provides isolation for web apps deployed in the same container. * * @param newInstance The (pseudo-singleton) BeanUtils bean instanc...
0
import org.junit.Test; @Test @Test @Test
0
public boolean isChallenged( public boolean prepareAuthResponse( Asserts.notNull(authScheme, "AuthScheme"); public void addAuthResponse( switch (authState.getState()) { case HANDSHAKE: Asserts.notNull(authScheme, "AuthScheme"); break; default:
0
OgnlContext context = (OgnlContext) Ognl.createDefaultContext( null ); assertEquals( ListSource.class, OgnlRuntime.getCompiler( context ).getSuperOrInterfaceClass( m, list.getClass() ) ); OgnlContext context = (OgnlContext) Ognl.createDefaultContext( null ); assertEquals( Iterable.class,...
0
package org.apache.beam.sdk.coders; * Coder for {@link BitSet}. if (value == null) { throw new CoderException("cannot encode a null BitSet"); } @Override public boolean consistentWithEquals() { return true; }
0
* Copyright (C) 2015 Google Inc.
0
List<XMLSecurityConstants.Action> actions = new ArrayList<>(); List<XMLSecurityConstants.Action> actions = new ArrayList<>(); List<XMLSecurityConstants.Action> actions = new ArrayList<>(); List<XMLSecurityConstants.Action> actions = new ArrayList<>(); List<XMLSecurityConstants.Ac...
0
* treated as case insensitive - i.e. there is no difference between {@code a=2} and * {@code A=3} and so you cannot parse uri like {@code http://my-site.org?a=2&A=2} * otherwise {@link java.lang.IllegalStateException} for duplicated parameter is thrown. * {@code null} values are also not supported.
0
import org.apache.accumulo.core.trace.TraceUtil; tsStats.addAll(client.getTabletStats(TraceUtil.traceInfo(), context.rpcCreds(), tableId)); historical = client.getHistoricalStats(TraceUtil.traceInfo(), context.rpcCreds());
0
/** Advance the processing time to the specified time, firing any timers that should fire. */ public void advanceSynchronizedProcessingTime(Instant newSynchronizedProcessingTime) throws Exception { timerInternals.advanceSynchronizedProcessingTime(newSynchronizedProcessingTime); } /** Current proces...
0
public class SPNegoSchemeFactory implements AuthSchemeProvider {
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
/** * Used for retrieving the clientConfiguration which was provided (if any); should not be considered public API. */ public final Configuration getClientConfiguration() { // TODO ACCUMULO-3199 return clientConf;
0
public ComponentContextImpl<?> getComponentContext()
0
* Copyright (C) 2015 Google Inc.
0
/** * This constructor is used by the system bundle (i.e., the framework), * since it needs a constructor that does not throw an exception. **/ BundleImpl() { __m_felix = null; m_archive = null; m_state = Bundle.INSTALLED; m_stale = false; m_activator = ...
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
import java.util.Arrays; import java.util.Comparator; ". Will follow only the first one. Using " + logFiles[0].getAbsolutePath()); File[] logFiles = searchFile.getParentFile().listFiles(fileFilter); Arrays.sort(logFiles, new Comparator<File>() { @Override publ...
0
package org.apache.http.impl.client; public class HttpRequestFutureTask<V> extends FutureTask<V> { private final HttpRequestTaskCallable<V> callable; public HttpRequestFutureTask( final HttpRequestTaskCallable<V> httpCallable) { return callable.getScheduled(); return callable.getStar...
0
public void testScpUploadOverwrite() throws Exception { SshClient client = SshClient.setUpDefaultClient(); client.start(); ClientSession session = client.connect("test", "localhost", port).await().getSession(); session.addPasswordIdentity("test"); session.auth().verify(); ...
0
SortedKeyValueIterator<Key,Value> iter = IteratorUtil.loadIterators(IteratorScope.minc, source, new KeyExtent(Table.ID.of("tab"), null, null), conf, SortedKeyValueIterator<Key,Value> iter = IteratorUtil.loadIterators(IteratorScope.majc, source, new KeyExtent(Table.ID.of("tab"), null, null), conf, SortedKeyV...
1
* * package org.apache.commons.vfs2.test; import org.apache.commons.vfs2.Capability; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.Selectors;
1
this.requestFactory = requestFactory != null ? requestFactory : DefaultHttpRequestFactory.INSTANCE;
0
"org.apache.commons.configuration2.MockInitialContextFactory");
0
import org.apache.ambari.server.topology.validators.TopologyValidatorService; /** * internal token for topology related async tasks */ @Inject private TopologyValidatorService topologyValidatorService; SecurityType securityType = null; Credential credential = null; securityType = SecurityType...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/locale/converters/StringLocaleConverter.java,v 1.3 2003/01/15 21:59:44 rdonkin Exp $ * $Revision: 1.3 $ * $Date: 2003/01/15 21:59:44 $ * Copyright (c) 1999-2003 The Apache Software ...
0
import org.apache.hc.core5.net.NamedEndpoint; final NamedEndpoint remoteEndpoint; remoteEndpoint = this.addressResolver.resolveRemoteEndpoint(route); remoteEndpoint, localAddress, route, this.sessionRequestCallback);
0
private static String getRole(ValueConstraint constraint) { return Iterables.getOnlyElement(constraint.getValues()).split("/")[0]; String dedicatedRole = getRole(valueConstraint); if (!role.equals(dedicatedRole)) { throw new ScheduleException( "Only " + dedicatedRole + " may use ho...
0
LOG.info("BeamSQL>\n" + RelOptUtil.toString(beamRelNode));
0
import com.google.common.base.Objects; @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Event event = (Event) o; return Objects.equal(newPerson, event.newPerson) && Objects.equal(new...
0
out.setName(op.getName() + "-persisted").persist(storageLevel);
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
* 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 ap...
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 u...
0
import org.apache.accumulo.core.security.CredentialHelper; import org.apache.accumulo.core.security.thrift.Credential; import org.apache.accumulo.core.security.thrift.tokens.SecurityToken; * @throws AccumuloSecurityException public static void setConnectorInfo(JobConf job, String principal, SecurityToken token) t...
1
Capability.ATTRIBUTES, Capability.RANDOM_ACCESS_READ
0
import static org.apache.aurora.scheduler.thrift.SchedulerThriftInterface.NO_CRON_UPDATES; assertEquals(invalidResponse(NO_CRON_UPDATES), thrift.startJobUpdate(request, SESSION));
0
volatile InternalConverter converter; private volatile Class< ? > sourceClass; private volatile Type[] typeArguments; return MapDelegate.forDTO(object, sourceClass, this); return MapDelegate.forBean(object, sourceClass, this); Set<Class< ? >> interfaces = getInterfaces(s...
0
* http://www.apache.org/licenses/LICENSE-2.0
0
import java.util.Objects; Objects.requireNonNull(sql, "null connectionInitSqls element");
0
import cz.seznam.euphoria.operator.test.junit.AbstractOperatorTest; import cz.seznam.euphoria.operator.test.junit.Processing; import org.junit.Test; @Processing(Processing.Type.ALL) public class TopPerKeyTest extends AbstractOperatorTest { @Test public void testOnBatch() throws Exception { execute(new AbstractT...
0
import org.apache.accumulo.core.client.AccumuloClient; AccumuloClient conn = opts.getConnector();
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.ambari.server.events.publishers.STOMPUpdatePublisher; STOMPUpdatePublisher STOMPUpdatePublisher; STOMPUpdatePublisher.register(src);
1
import org.osgi.framework.wiring.BundleRevisions; public synchronized boolean hasDependents(Bundle bundle) List<BundleRevision> revisions = bundle.adapt(BundleRevisions.class).getRevisions(); public synchronized Set<Bundle> getDependentBundles(Bundle bundle) List<BundleRevision> revisions = bund...
1
public class SslIT extends ConfigurableMacBase {
0
* @version CVS $Id: DefaultLinkRenderer.java,v 1.3 2003/07/18 14:41:45 cziegeler Exp $ String layoutKey = (String)layout.getAspectData("link-layout-key"); String layoutId = (String)layout.getAspectData("link-layout-id"); if ( layoutKey == null && layoutId == null){ // get default values ...
0
import java.text.AttributedCharacterIterator; * Factory instance that returns TextSpanLayouts appropriate to * AttributedCharacterIterator instances. * * @param aci The character iterator to be laid out * @param offset The offset position for the text layout. * @param frc The font render context t...
0
String filePath = Objects.toString(options.remove(KnownHostsServerKeyVerifier.KNOWN_HOSTS_FILE_OPTION), null); if (GenericUtils.isEmpty(filePath)) { current = new DefaultKnownHostsServerKeyVerifier(current); } else { // if user specifies a different location than default be lenien...
0
import java.util.Set; import com.google.common.collect.ImmutableSet; public void testAddErrors() { Set<String> errors = ImmutableSet.of("one error", "two errors"); QuickLinksConfigurationModule module = new QuickLinksConfigurationModule((File) null); module.addErrors(errors); assertEquals(errors, Immu...
0
new HashSet<>(Arrays.asList(new String[]{ FEED_NAME_PROPERTY_ID})); Set<Resource> resources = new HashSet<>(); Map<String, String> properties = new HashMap<>(); Map<String, Object> updateMap = new HashMap<>();
1
public class XmlMetadataHandler extends MetadataHandler { public XmlMetadataHandler(Logger logger) { /** * Called to parse the InputStream and set bundle list and package hash map */ public void parse(InputStream istream) throws ParserConfigurationException, IOException, SAXException { ...
0
* entry, the new response SHOULD be used to processChallenge the header fields
0
* @version $Id$
0
if (!rowIterator.hasNext()) return false;
1
if (ex.getStackTrace().length<1){ trace = ExceptionUtils.getStackTrace(this); }else{ trace = ExceptionUtils.getStackTrace(ex); } if (this.getMessage()!=null){ response.put("message", this.getMessage()); }else if (this.getCause()!=null){ response.put("message...
0
import org.apache.beam.harness.test.TestExecutors; import org.apache.beam.harness.test.TestExecutors.TestExecutorService; import org.apache.beam.harness.test.TestStreams;
0
LedgerEntry entry = seq.nextElement(); lh.getLastAddConfirmed(), entry.getLength(), entry.getEntry());
0
* This is the "global" logger used by the implementation for all logging * not directly related to an extended bundle (and its components) public class ScrLogger extends LogServiceEnabledLogger public ScrLogger(final ScrConfiguration config, final BundleContext bundleContext) super(config, bundleContext);...
0
* @version $Id: FileUtils.java,v 1.30 2004/04/23 22:47:39 jeremias Exp $ //makes sure it is not the same file if (source.getCanonicalPath().equals(destination.getCanonicalPath())) { String message = "Unable to write file " + source + " on itself."; throw ...
0
import java.util.Optional; return Optional.ofNullable(jobs.get(jobKey));
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
* Copyright (c) 2002, 2003 The Apache Software Foundation. All rights
0
import java.util.Locale; final String normalizedHost = host.toLowerCase(Locale.ROOT); final String normalizedSubjectAlt = subjectAlt.toLowerCase(Locale.ROOT); if (matchIdentityStrict(normalizedHost, normalizedSubjectAlt)) { // RFC 2818, 3.1. Server Identity // "...Names m...
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
* A {@link PTransform} that performs a {@link CoGroupByKey} on a tuple of tables. A {@link * CoGroupByKey} groups results from all tables by like keys into {@link CoGbkResult}s, from which * the results for any specific table can be accessed by the {@link * org.apache.beam.sdk.values.TupleTag} supplied with the ini...
1
InputStream in = icon.getInputStream(); if (null == in) { // this is buggy implementations response.setStatus(HttpServletResponse.SC_NOT_FOUND); return; }
0
/** The FTPS {@link TrustManager} implementation, default validate only * {@link TrustManagerUtils#getValidateServerCertificateTrustManager()}. */
0