Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
FileInputStream fis = null;
fis = new FileInputStream(file);
content = IOUtils.toString(fis);
} finally {
if (fis != null) {
try {
fis.close();
} catch (IOException ex) {
}
} | 0 |
public class AdapterAnnotationTest extends AnnotationBase { | 0 |
buffer.putRawPublicKey(kp.getPublic()); | 0 |
* <a href="http://en.wikipedia.org/wiki/International_Bank_Account_Number">Wikipedia -
private static final long serialVersionUID = -3600191725934382801L;
private static final long MAX = 999999999;
private static final long MODULUS = 97;
try {
throw new CheckDigitException("Invali... | 0 |
import java.security.InvalidKeyException;
import java.security.KeyPairGenerator;
import java.security.interfaces.RSAPrivateCrtKey;
import java.security.interfaces.RSAPrivateKey;
import java.security.spec.RSAPrivateCrtKeySpec;
public class RSAPublicKeyDecoder extends AbstractPublicKeyEntryDecoder<RSAPublicKey,RSAPrivate... | 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 |
Rectangle2D getBounds();
Rectangle2D getTransformedBounds(AffineTransform txf);
Rectangle2D getPrimitiveBounds();
Rectangle2D getTransformedPrimitiveBounds(AffineTransform txf);
Rectangle2D getGeometryBounds();
Rectangle2D getTransformedGeometryBounds(AffineTransform txf);
boolean contains(P... | 0 |
private final boolean m_recoveryEnabled;
String hostName, boolean recoveryEnabled) {
m_recoveryEnabled = recoveryEnabled;
* @return recovery enabled.
*/
public boolean isRecoveryEnabled() {
return m_recoveryEnabled;
}
/**
buffer.append(", recoveryEnabled=").append(m_recoveryEnabled); | 0 |
Canonicalizer11_OmitComments c14ner = new Canonicalizer11_OmitComments(); | 0 |
prov.put("instance.name","FooProvider1");
prov2.put("instance.name","FooProvider2");
i1.put("instance.name","Simple");
i2.put("instance.name","Void");
i3.put("instance.name","Object");
i4.put("instance.name","Ref"); | 0 |
import org.apache.commons.jelly.xpath.XPathSource;
import org.apache.commons.jelly.xpath.XPathTagSupport; | 0 |
Assert.assertEquals(new HttpHost("bar", -1, "http"), context.getTargetHost());
Assert.assertEquals(new HttpHost("foo", 8080, "http"), context.getTargetHost()); | 0 |
final ConnectionConfig cconfig = config != null ? config : ConnectionConfig.DEFAULT;
final Charset charset = cconfig.getCharset();
final CodingErrorAction malformedInputAction = cconfig.getMalformedInputAction() != null ?
final CodingErrorAction unmappableInputAction = cconfig.getUnmappa... | 0 |
import org.apache.commons.collections.CollectionUtils;
@Override
public synchronized void updateMembers(Set<MemberRequest> requests) throws AmbariException {
final Map<String, List<String>> membersPerGroup = new HashMap<String, List<String>>();
for (MemberRequest request : requests) {
if (StringUti... | 0 |
ArrayList<CompactionInfo> compactions = new ArrayList<>();
HashSet<ByteSequence> allColumnFamilies = new HashSet<>();
List<SortedKeyValueIterator<Key,Value>> iters = new ArrayList<>(filesToCompact.size());
ArrayList<FileSKVIterator> readers = new ArrayList<>(filesToCompact.size()); | 1 |
import org.apache.cocoon.portal.util.SaxBuffer; | 0 |
List<String> validHosts = new ArrayList<>();
List<String> newHosts = new ArrayList<>(); | 0 |
stageDAO.create(stageEntity);
| 1 |
WidgetEntity widgetEntity = new WidgetEntity();
widgetEntity.setId(1L);
widgetEntity.setListWidgetLayoutUserWidgetEntity(new ArrayList<WidgetLayoutUserWidgetEntity>());
WidgetEntity widgetEntity2 = new WidgetEntity();
widgetEntity2.setId(2L);
widgetEntity2.setListWidgetLayoutUserWidgetEntity(new... | 0 |
import org.apache.commons.lang.StringUtils;
public static final int DEFAULT_COMPILED_QUERY_CACHE_EVICTION_WARNING_THROTTLE = 0;
public static final int DEFAULT_COMPILED_QUERY_CACHE_CAPACITY = 1000;
public static final String TYPE_CACHE_IMPLEMENTATION_PROPERTY ... | 0 |
import org.apache.beam.sdk.schemas.LogicalTypes.PassThroughLogicalType;
static class TestType extends PassThroughLogicalType<Long> {
TestType(String id, String arg) {
super(id, arg, FieldType.INT64);
}
}
@Test
public void testLogicalType() {
Schema schema1 =
Schema.builder().addLogic... | 0 |
ds.setRemoveAbandonedOnBorrow(true);
ds.setRemoveAbandonedOnMaintenance(true); | 0 |
import com.google.auto.service.AutoService;
import org.apache.beam.sdk.extensions.sql.meta.provider.TableProvider;
@AutoService(TableProvider.class) | 0 |
* @see BasicHeaderValueParser#parseElements | 0 |
} catch (final HttpException | IOException ignore) {
} catch (final HttpException | IOException ignore) { | 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 2016-2017 Seznam.cz, a.s. | 0 |
* @version $Id$ | 0 |
* @cocoon.sitemap.component.documentation.caching Yes.
* Currently, validity of used i18n catalogues is not verified | 0 |
* @version CVS $Id: JavaScriptAspectWeaver.java,v 1.3 2003/09/08 23:06:08 reinhard Exp $
* to make intercepting easier events are added (start function,
* stop function, stop execution, continue execution) | 0 |
import com.google.inject.persist.Transactional;
boolean isPersisted();
@Transactional
void persist();
void refresh();
public void debugDump(StringBuilder sb); | 0 |
import java.util.ArrayList;
import java.util.List;
static final String PARSE_ERROR_MESSAGE_AMBIGUOUS_FILTER =
static final String PARSE_ERROR_MESSAGE_INVALID_JSON_TAG =
"Invalid attribute(s) in filter declaration: ";
List<String> invalidAttributes = new ArrayList<>();
throw new JsonParseExcep... | 0 |
/*
* $Header: /cvshome/build/ee.foundation/src/java/lang/StackOverflowError.java,v 1.6 2006/03/14 01:20:25 hargrave Exp $
*
* (C) Copyright 2001 Sun Microsystems, Inc.
* Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may no... | 0 |
public static <T> DefaultEquator<T> defaultEquator() { | 0 |
import org.apache.ambari.logfeeder.input.InputFileMarker;
import org.apache.ambari.logfeeder.plugin.input.Input;
InputFileMarker inputMarker = new InputFileMarker(EasyMock.mock(Input.class), null, 0); | 0 |
return (regex == null || value == null) ? true : regex.matcher(value).matches(); | 0 |
import org.apache.hc.core5.http.impl.nio.BasicAsyncResponseProducer;
import org.apache.hc.core5.http.impl.nio.DefaultHttpClientIODispatch;
import org.apache.hc.core5.http.impl.nio.DefaultHttpServerIODispatch;
import org.apache.hc.core5.http.impl.nio.HttpAsyncRequestExecutor;
import org.apache.hc.core5.http.impl.nio.Htt... | 1 |
public void minorCompactionFinished(final CommitSession commitSession, final long walogSeq,
final Durability durability) throws IOException {
write(singletonList(commitSession), true,
logger -> logger.minorCompactionFinished(walogSeq, commitSession.getLogId(), durability), | 0 |
import org.apache.commons.httpclient.Cookie;
import org.apache.commons.vfs.UserAuthenticator;
import org.apache.commons.vfs.UserAuthenticationData;
import org.apache.commons.vfs.util.UserAuthenticatorUtils;
UserAuthenticator proxyAuth = HttpFileSystemConfigBuilder.getInstance().getProxyAuthenticator(fi... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/decorators/Attic/UnmodifiableSortedBag.java,v 1.2 2003/08/31 17:24:46 scolebourne Exp $
* any, must include the following acknowledgement:
* Alternately, this acknowledgeme... | 0 |
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import javax... | 0 |
private final EvaluationContext context;
public EvaluatorKey(AppliedPTransform<?, ?, ?> transform, EvaluationContext context) { | 0 |
package org.apache.sling.felix.webconsole.internal.core;
import org.apache.sling.felix.webconsole.Action;
import org.apache.sling.felix.webconsole.internal.BaseManagementPlugin; | 0 |
acquireBundleLock(m_bundle,
Bundle.INSTALLED | Bundle.RESOLVED | Bundle.STARTING |
Bundle.ACTIVE | Bundle.STOPPING);
try
m_oldState = m_bundle.getState();
stopBundle(m_bundle, false);
}
catch (Throwab... | 0 |
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
public String[] getAttributeNames(int scope) {
Enumeration names = null;
if ( scope == RequestAttributes.SCOPE_REQUEST ) {
names = this.request.getLocalAttributeNames();
} else if ( scope == ... | 0 |
import org.apache.batik.css.engine.value.ValueManager; | 0 |
package org.apache.felix.ipojo.test.scenarios.service.dependency.di; | 0 |
@SuppressWarnings("deprecation")
KerberosToken krbToken = new KerberosToken(getUserName(), keytabFile, true);
return krbToken; | 0 |
IdentifiedRegistrar registrar = IdentifiedRegistrar
.of((k) -> k.register(ClassToBeEncoded.class));
IdentifiedRegistrar registrar = IdentifiedRegistrar.of((k) -> { /* No-op */});
IdentifiedRegistrar registrarCoding = IdentifiedRegistrar
.of((k) -> k.register(ClassToBeEncoded.class));
Id... | 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 |
throw new RuntimeException(ex);
// Fire UNRESOLVED event without holding the lock.
fireBundleEvent(BundleEvent.UNRESOLVED, bundle);
| 0 |
log.debug(String.format("Found midPoint from indexes in %6.2f secs.%n", ((t2 - t1) / 1000.0))); | 0 |
public static final String SORT_VALUES = "sort_values"; | 0 |
* @version $Revision: 1.3 $ $Date: 2003/01/11 05:41:26 $
public String[] getPropertyNames(Object session) {
Enumeration e = ((HttpSession) session).getAttributeNames();
public Object getProperty(Object session, String property) {
return ((HttpSession) session).getAttribute(property);
public... | 1 |
import org.apache.ambari.logfeeder.input.InputSimulate;
addSimulatedInputs();
}
private void addSimulatedInputs() {
int simulatedInputNumber = LogFeederUtil.getIntProperty("logfeeder.simulate.input_number", 0);
if (simulatedInputNumber == 0)
return;
InputSimulate.loadTypeToFi... | 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... | 1 |
throws DOMException {
super(qname, owner);
namespaceURI = nsURI;
String prefix = DOMUtilities.getPrefix(qname);
if (prefix != null) {
if (nsURI == null ||
("xml".equals(prefix) &&
!XMLSupport.XML_NAMESPACE_URI.equals(nsURI))) {
... | 1 |
import static org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.TimelineMetricConfiguration.OUT_OFF_BAND_DATA_TIME_ALLOWANCE;
// Unit tests insert values into the future
metricsConf.setLong(OUT_OFF_BAND_DATA_TIME_ALLOWANCE, 600000); | 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.atlas.type.AtlasTypeRegistry;
public class AtlasEnumDefStoreV1 extends AtlasAbstractDefStoreV1 implements AtlasEnumDefStore {
public AtlasEnumDefStoreV1(AtlasTypeDefGraphStoreV1 typeDefStore, AtlasTypeRegistry typeRegistry) {
super(typeDefStore, typeRegistry);
public List<AtlasEnumDef>... | 0 |
/*
* Copyright 2008, Yahoo! Inc.
*
* 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... | 0 |
import org.apache.accumulo.fate.zookeeper.ZooCache; | 1 |
/*
* Copyright 2001-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 applica... | 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 java.util.function.Function;
Function<KeyIdentityProvider, Iterable<KeyPair>> LOADER = p -> | 0 |
package org.apache.http.client.impl; | 0 |
@Override
@Override
@Override
@Override
@Override | 0 |
import cz.seznam.euphoria.core.client.dataset.windowing.MergingWindowing;
/**
* <p>
* Broadcast hash join is a special case of Left or Right join, which does not require shuffle.
* The optional side is loaded into memory and broadcasted to all executors. We can then use
* map side join with lookups to in memo... | 0 |
new Object[] {(int) getNodeType(),
new Object[] {(int) getNodeType(), | 0 |
statusCmd.setHostname(hostname); | 0 |
import org.apache.accumulo.core.security.Credentials;
String outString = new Credentials("root", new PasswordToken("")).serialize(); | 0 |
* Copyright 1999-2006 The Apache Software Foundation | 0 |
StringBuilder sb = new StringBuilder();
StringBuilder sb = new StringBuilder(endIdx - startIdx);
StringBuilder sb = new StringBuilder();
StringBuilder ss = new StringBuilder();
StringBuilder sb = new StringBuilder(); | 0 |
/**
* @param buffer The {@link Buffer} to process - {@code null} if not a response buffer
* @return {@code true} if request handled - {@code false} if the next authentication
* mechanism should be used
* @throws Exception
*/ | 0 |
* Copyright 2005-2006 The Apache Software Foundation
* @param factory the factory to use to create entries, must not be null
* @param transformer the transformer to use as a factory to create entries, must not be null
public static Map decorate(Map map, Transformer transformer) {
if (transform... | 0 |
import org.apache.batik.css.engine.CSSEngine;
import org.apache.batik.css.engine.CSSStyleSheetNode;
import org.apache.batik.css.engine.StyleSheet;
import org.apache.batik.dom.util.HashTable;
implements CSSStyleSheetNode {
* The style-sheet.
*/
protected StyleSheet styleSheet;
/**
* Returns ... | 0 |
import org.apache.batik.svggen.SVGGeneratorContext.GraphicContextDefaults;
import java.awt.Font;
SVGGeneratorContext ctx = SVGGeneratorContext.createDefault(domFactory);
GraphicContextDefaults defaults
= new GraphicContextDefaults();
defaults.font = new Font("Lucida Sans", Font.PLA... | 0 |
for (int aCharMap : charMap) {
if (index == aCharMap) | 0 |
public TemporaryFolder folder =
new TemporaryFolder(new File(System.getProperty("user.dir") + "/target")); | 0 |
* @since 1.8.0 | 0 |
public static <I> I service(final I instance) {
InvocationHandler handler = getInvocationHandler(instance);
protected static <T> RpcServerInvocationHandler<T> getInvocationHandler(final T instance) {
// thrift will log the exception in ProcessFunction
throw new TException(e); | 1 |
opts.setClientProperties(getClientProperties());
vopts.setClientProperties(getClientProperties()); | 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 java.util.Optional;
assertEquals(Optional.empty(), getRedirectPort(null));
assertEquals(Optional.empty(), getRedirectPort(ImmutableMap.of()));
assertEquals(Optional.empty(), getRedirectPort(ImmutableMap.of("thrift", 5))); | 0 |
header(properties, Analyzer.INCLUDE_RESOURCE, "src/main/resources"); | 0 |
public LinkedHashMap<Integer, LocalVariableNode> getLocals() {
return m_locals;
} | 0 |
SortedSet<Text> splits = new TreeSet<>(); | 1 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/converters/IntegerConverter.java,v 1.7 2003/10/09 20:43:16 rdonkin Exp $
* $Revision: 1.7 $
* $Date: 2003/10/09 20:43:16 $
* Alternately, this acknowledgement may appear in the s... | 0 |
import com.twitter.aurora.scheduler.storage.entities.ITaskConfig;
bind(new TypeLiteral<Function<ITaskConfig, String>>() { }).to(TaskIdGenerator.class); | 0 |
// ATLAS-2118: Reserved regex characters in attribute value can cause the graph query to fail when parsing the contains regex
StringBuilder escapedAttrVal = new StringBuilder(".*");
for (int i = 0; i < attributeValue.length(); i++) {
final char c = attributeValue.charAt(i);
... | 0 |
SignatureFactoriesManager.resolveSignatureFactories(this, session), | 0 |
* @deprecated (4.3) use constructor parameters of configuration API provided by HttpClient | 0 |
import static org.junit.Assert.assertNull;
history.setHostName("h1");
@Test
public void testFindCurrentByHostAndName() throws Exception {
AlertCurrentEntity entity = dao.findCurrentByHostAndName(clusterId.longValue(), "h2", "Alert Definition 1");
assertNull(entity);
entity = dao.findCurr... | 0 |
throw new XMLSignatureException(ex, "empty");
throw new XMLSignatureException(ex, "empty");
throw new XMLSignatureException(ex, "empty");
throw new XMLSignatureException(ex, "empty");
throw new XMLSignatureException(ex, "empty");
throw new XMLSigna... | 0 |
* This {@link CookieSpec} implementation conforms to the original draft
* specification published by Netscape Communications. It should be avoided
* unless absolutely necessary for compatibility with legacy code. | 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 |
* @version $Revision: 468603 $ | 0 |
import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
private static final String WEB_INF_COCOON_PROPS = "WEB-INF/cocoon/properties/rcl.properties";
private static final String WEB_INF_RCLWRAPPER_RCL_CONF = "WEB-INF/cocoon/rclwrapper.rcl.conf";
// based on the RCL conf... | 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... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.