Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
public class OracleQuerySetHueDb extends QuerySetHueDb { @Override protected String fetchUserNameSql() { return "select username from auth_user"; }
0
public static final String AGENT_TASK_TIMEOUT_DEFAULT = "600";
0
public boolean logConfgs(Priority level) { if (!super.logConfgs(level)) {
0
public void setTimeout(final int timeout) {
0
} else { stats.incKeepAliveCount();
0
@Test(timeout = 30000) opts.merge(Constants.METADATA_TABLE_NAME, new Text("01"), new Text("02"));
0
import org.apache.commons.jelly.Script; import org.apache.commons.jelly.test.BaseJellyTest; public class TestCustomExpressionFactory extends BaseJellyTest { "id=2; attr=${TEST FACTORY: 2 + 3 }; text=<sometag>${TEST FACTORY: 'goodbye cruel' + \" world\" }</sometag>\n"; setUpScript("jelly1.xml"); Script script ...
0
import org.apache.accumulo.core.data.NamespaceId; import org.apache.accumulo.core.data.TableId; private TableId tableId; private NamespaceId namespaceId; public CleanUp(TableId tableId, NamespaceId namespaceId) { fs.deleteRecursively(new Path(dir, tableId.canonical()));
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/example/org/apache/commons/validator/example/ValidateExample.java,v 1.10 2003/05/25 18:00:24 dgraham Exp $ * $Revision: 1.10 $ * $Date: 2003/05/25 18:00:24 $ * @version $Revision: 1.10 $ $Date: 2003/05/25 18:00:24 $...
0
* <table summary="" border="0" cellspacing="0" cellpadding="1"> * <table summary="" border="0" cellspacing="0" cellpadding="1"> * <table summary="" border="0" cellspacing="0" cellpadding="1"> * <table summary="" border="0" cellspacing="0" cellpadding="1"> * <table summary="" border="0" cellspac...
0
try (Scanner scanner = conn.createScanner(tableName, Authorizations.EMPTY)) { scanner.setRange(new KeyExtent(Table.ID.of("1"), null, null).toMetadataRange()); for (Entry<Key,Value> entry : scanner) { if (entry.getKey().getColumnFamily().equals(DataFileColumnFamily.NAME)) files.add(entr...
0
* ((AbstractFileComparator) DirectoryFileComparator.DIRECTORY_COMPARATOR).sort(list); * ((AbstractFileComparator) DirectoryFileComparator.DIRECTORY_REVERSE).sort(array);
0
if (log.isDebugEnabled()) log.debug("Created IntegrityHmacSHA1 using "
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
SortedKeyValueIterator<Key,Value> a = ColumnQualifierFilter.wrap(new SortedMapIterator(tm), hsc); a = ColumnQualifierFilter.wrap(new SortedMapIterator(tm), hsc); a = ColumnQualifierFilter.wrap(new SortedMapIterator(tm), hsc); SortedKeyValueIterator<Key,Value> a = VisibilityFilter.wrap(new SortedMapItera...
0
import org.apache.beam.sdk.schemas.Schema.TypeName; * the input {@link TypeName}. private static final Map<TypeName, SerializableFunction<BigDecimal, ? extends Number>> .<TypeName, SerializableFunction<BigDecimal, ? extends Number>>builder() .put(TypeName.INT32, BigDecimal::intValue) .put(TypeName....
0
package org.apache.ambari.logsearch.model.request.impl; import org.apache.ambari.logsearch.common.Marker; @Marker public class AuditServiceLoadRequest extends BaseLogRequest {
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
/** * Connection timeout property */ /** * Connection request limit property */ /** * Thread pool timeout property */ /** * Thread pool limit property */ /** * Flag to enable debugging for this service implementation. The default is false. */ /*...
0
* Interface used to handle both Files and URLs in the * * Returns the name of the source. That would be the String getName(); InputStream openStream() throws IOException; boolean isSameAs(String srcStr); boolean isReadable(); String getURI();
0
long replicateKeyValues() throws RemoteReplicationException;
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
if (properties.getProperty("Bundle-Activator") != null && properties.getProperty("Bundle-Activator").isEmpty()) { properties.remove("Bundle-Activator"); } header( properties, Analyzer.PLUGIN, ScrPlugin.class.getName() + "," ...
0
* A test that verifies Beam metrics are reported to Spark's metrics sink in both batch and * streaming modes. .apply(Create.of(WORDS).withCoder(StringUtf8Coder.of())) .apply(new WordCount.CountWords()) .apply(MapElements.via(new WordCount.FormatAsTextFn())); CreateStream.of...
1
import org.apache.beam.sdk.testing.NeedsRunner; @Category(NeedsRunner.class) @Category(NeedsRunner.class) @Category(NeedsRunner.class) @Category(NeedsRunner.class)
0
@Override @Override @Override
0
// Try in WEB-INF/classes (WAR files) je = m_inputJar.getJarEntry("WEB-INF/classes/" + classname); if (je == null) { // If still null, throw an exception. throw new IOException("The class " + classname + " connot be found in the input Jar file"); ...
0
import org.apache.commons.compress.compressors.zstandard.ZstdCompressorInputStream; import org.apache.commons.compress.compressors.zstandard.ZstdCompressorOutputStream; /** * ZStandard compression. * * <p>The {@code .zst} extension is specified in <a href=https://tools.ietf.org/html/rfc8478>RFC * 8478</a>...
0
protected static final Map mappingFiles = new HashMap(); protected DOMParser parser; protected Document doc; protected PrefixResolver prefixResolver; protected RE xmlRE; protected String xpath; protected XPathProcessor processor;
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
package org.apache.commons.vfs2.cache; import org.apache.commons.vfs2.FileName; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystem; import org.apache.commons.vfs2.VfsLog; import org.apache.commons.vfs2.impl.DefaultFileSystemManager; import org.apache.commons.vfs2.util.Messages; pri...
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/UnsignedByteArrayList.java,v 1.9 2003/04/11 22:01:25 rwaldhoff Exp $ * @version $Revision: 1.9 $ $Date: 2003/04/11 22:01:25 $ * @deprecated See {@link ArrayUnsig...
0
* Copyright 2000-2009 The Apache Software Foundation
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
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/Digester.java,v 1.21 2001/10/13 01:34:59 craigmcc Exp $ * $Revision: 1.21 $ * $Date: 2001/10/13 01:34:59 $ * @version $Revision: 1.21 $ $Date: 2001/10/13 01:34:59 $ * Has this Di...
0
public static FileHandler fromMap(Map<String, ?> map)
0
String SVG_SCRIPT_TYPE_APPLICATION_ECMASCRIPT = "application/ecmascript"; String SVG_SCRIPT_TYPE_JAVASCRIPT = "text/javascript"; String SVG_SCRIPT_TYPE_APPLICATION_JAVASCRIPT = "application/javascript";
0
assertEncoded("foo", "Zm9v"); assertEncoded("foobar", "Zm9vYmFy");
0
final Header header = new BasicHeader("name", "value"); final Header header = new BasicHeader("name", null); } catch (final IllegalArgumentException ex) { final Header header1 = new BasicHeader("name1", "value1"); final Header header2 = new BasicHeader("name2", null); fin...
0
* @param type * the type to set. */ public void setType(SourceType type) { this.type = type; } /** *
0
@SuppressWarnings({ "resource", "deprecation" }) // 'in' is deliberately not closed IOUtils.copy(in, writer); // deliberately testing deprecated method @SuppressWarnings("deprecation") // deliberately testing deprecated method @SuppressWarnings("deprecation") // deliberately testing deprecated metho...
0
@JsonIgnore @XmlElement(name = "restartRequiredAfterChange") private Boolean restartRequiredAfterChange; public Boolean isRestartRequiredAfterChange() { return restartRequiredAfterChange; } public void setRestartRequiredAfterChange(Boolean restartRequiredAfterChange) { this.restartRequiredAfterC...
0
import java.util.Properties; * public interface SystemBundle { String SECURITY = "org.osgi.framework.security"; String STORAGE = "org.osgi.framework.storage"; */ String LIBRARIES = "org.osgi.framework.libraries"; */ String EXECPERMISSION = "org.osgi.framework.command.execpermission"; */ String R...
0
import org.apache.sshd.common.kex.extension.KexExtensionHandler; private KexExtensionHandler kexExtensionHandler; @Override public KexExtensionHandler getKexExtensionHandler() { KexFactoryManager parent = getDelegate(); return resolveEffectiveProvider( KexExtensionHandler.class, ...
0
final StringBuilder buf = new StringBuilder(); buf.append(this.method).append(" ").append(this.uri).append(" ").append(this.protoversion); return buf.toString();
0
* * @since 4.0
0
// handle the 'color-interpolation-filters' property handleColorInterpolationFilters(convolve, filterElement);
0
public static final String S_SINGLETON = "-singleton"; { S_ACTIVATOR, S_DEFAULTS, S_ID, S_SYM_NAME, S_VERSION, S_SINGLETON };
0
public static final String RELATIONSHIP_PROPERTY_KEY_PREFIX = "_r"; public static final String RELATIONSHIP_GUID_PROPERTY_KEY = RELATIONSHIP_PROPERTY_KEY_PREFIX + GUID_PROPERTY_KEY;
0
if (method == null) { } if (propertyName == null) { } if (!found) { } if (causeMessage == null) { causeMessage = ""; }
0
columns.add(new Pair<>(cf, cq));
0
import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.IOException; import java.io.Serializable; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Map; import java.ut...
0
* @version $Id$ public abstract class AbstractSVGPreserveAspectRatio protected short align = protected abstract void setAttributeValue(String value) protected abstract DOMException createDOMException(short type, String key, protected class PreserveAspectRatioParserHandler public shor...
0
import com.twitter.aurora.scheduler.storage.entities.IScheduledTask; final IScheduledTask task =
0
import static org.apache.beam.sdk.io.synthetic.SyntheticOptions.fromJsonString;
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
public final class CoreOSGIServiceException extends CoreException { public CoreOSGIServiceException(String message) { public CoreOSGIServiceException(String message, Throwable cause) {
0
while (!expectedBundles.isEmpty()) { AbstractInfo entry = source.getNextEntry(); if (entry == null) { throw new DeploymentException(DeploymentException.CODE_OTHER_ERROR, "Expected more bundles in the stream: " + expectedBundles.keySet()); } ...
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 cz.seznam.euphoria.core.annotation.audience.Audience; @Audience(Audience.Type.CLIENT)
0
ValidateUtils.checkNotNull(key, "No public key provided");
0
ClientContext context = new ClientContext(opts.getInstance(), new Credentials(opts.getPrincipal(), opts.getToken()), opts.getClientConfiguration());
0
import org.apache.cocoon.forms.event.*; * @version $Id: BooleanField.java,v 1.8 2004/04/28 13:11:10 bruno Exp $ public class BooleanField extends AbstractWidget implements ValueChangedListenerEnabled { * TODO is there a use case for boolean fields having validators?
0
private static Map<Integer, File> signedFiles = new TreeMap<>(); private static Map<Integer, File> encryptedFiles = new TreeMap<>();
0
import org.apache.http.annotation.Immutable;
0
* <p>A {@code PValueBase} that adds tracking of its producing * <p>For internal use. * <p>For internal use only. * <p>To be invoked only by {@link POutput#recordAsOutput}
0
private synchronized int writePlain(final ByteBuffer src) throws SSLException { private synchronized int readPlain(final ByteBuffer dst) throws SSLException { if (this.status == ACTIVE) { return 0; } else { return -1; } return write...
0
import java.io.DataOutputStream; protected void writeAnnotations(DataOutputStream dos) throws IOException { dos.writeShort(annotation_table_length); for (int i = 0; i < annotation_table_length; i++) annotation_table[i].dump(dos); }
0
import org.apache.felix.inventory.InventoryPrinterHandler; import org.apache.felix.inventory.InventoryPrinterManager; * The web console plugin for a inventory printer. public class DefaultWebConsolePlugin extends AbstractWebConsolePlugin implements InventoryPrinterHandler { * @param inventoryPrinterAdapter The ad...
0
org.apache.ambari.server.controller.spi.Request request = new RequestImpl(Collections.emptySet(), Collections.singleton(properties), Collections.emptyMap(), null); org.apache.ambari.server.controller.spi.Request request = new RequestImpl(Collections.emptySet(), return request == null ? Collections.e...
0
import javax.annotation.Nullable; import org.apache.beam.sdk.transforms.windowing.BoundedWindow; import org.apache.beam.sdk.transforms.windowing.PaneInfo; StaticValueProvider.of(outputDirectory), DynamicFileDestinations.constant(new FakeFilenamePolicy())) { private static class FakeFi...
0
package org.apache.bcel.data;
1
import java.io.IOException; int len; while((len=is.read(buff)) != -1) { fos.write(buff, 0, len); final String header; line = br.readLine(); // header if (line.startsWith("# Version ")) { header = line.substring(2); System.out.printl...
0
package com.twitter.mesos.scheduler; /** * Exception class to signal a failure to schedule a task or job. * * @author wfarner */ public class ScheduleException extends Exception { public ScheduleException(String msg) { super(msg); } public ScheduleException(String msg, Throwable t) { super(msg, t); } ...
0
import com.google.cloud.dataflow.sdk.util.MergingStateContext; import com.google.cloud.dataflow.sdk.util.StateContext;
0
"dataflow.gcr.io/v1beta3/beam-java-batch:beam-master-20160804-dofn"; "dataflow.gcr.io/v1beta3/beam-java-streaming:beam-master-20160804-dofn";
0
doReturn(STAGE_LAST_ATTEMPT_TIME).when(stageInProgress1).getLastAttemptTime(anyString(), anyString()); doReturn(STAGE_LAST_ATTEMPT_TIME).when(stageInProgress2).getLastAttemptTime(anyString(), anyString()); doReturn(STAGE_LAST_ATTEMPT_TIME).when(stageInProgress3).getLastAttemptTime(anyString(), anyString());...
0
import org.apache.accumulo.core.data.TableId; public TableId getTableId() { return threadPoolExtent.getTableId();
0
public RuleLoader findLoader(Digester d, Class<?> pluginClass, Properties p) {
0
import org.apache.http.testserver.HttpCoreNIOTestBase; import org.apache.http.testserver.LoggingClientConnectionFactory; import org.apache.http.testserver.LoggingServerConnectionFactory;
0
import org.apache.ambari.server.state.PassiveState; @Column(name = "passive_state", nullable = false, insertable = true, updatable = true) @Enumerated(value = EnumType.STRING) private PassiveState passiveState = PassiveState.ACTIVE; public PassiveState getPassiveState() { return passiveState; } ...
0
@Override public int hashCode() { int result = 17; if (publicKey != null) { result = 31 * result + publicKey.hashCode(); } return result; } // curElem = DOMUtils.getNextSiblingElement(curElem);
0
Dimension2D dim = bridgeContext.getDocumentSize(); setPreferredSize(new Dimension((int)dim.getWidth(), (int)dim.getHeight()));
0
for (CoderCloudObjectTranslatorRegistrar coderRegistrar : ServiceLoader.load(CoderCloudObjectTranslatorRegistrar.class)) { /** Convert the provided {@link Coder} into a {@link CloudObject}. */
1
ImmediateComponentManager cm = new ImmediateComponentManager( getActivator(), getComponentMetadata(), componentId ); // inject configuration cm.setFactoryProperties( configuration ); cm.enable( synchronous );
0
import cz.seznam.euphoria.core.client.dataset.windowing.WindowedElement; DataStream<WindowedElement> input = (DataStream<WindowedElement>) context.getSingleInputStream(operator); return input.partitionCustom(flinkPartitioner, elem -> elem.get());
0
* Copyright (C) 2015 Google Inc.
0
Copyright 2000-2003 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...
0
this.server.addEventListener(mBeanContainer); this.server.removeEventListener(mBeanContainer);
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.state.stack.OsFamily; protected static final String HOST_OS_FAMILY_PROPERTY_ID = PropertyHelper.getPropertyId("Hosts", "os_family"); @Inject private OsFamily osFamily; String hostOsFamily = osFamily.find(response.getOsType()); if (hostOsFamily == null) { ...
0
public OutputDefinition getOutputDefinition() { return definition; }
0
protected static final Integer maximumAllowedEncryptedDataEvents = Integer.valueOf(ConfigurationProperties.getProperty("MaximumAllowedEncryptedDataEvents")); if (++count >= maximumAllowedEncryptedDataEvents) { throw new XMLSecurityException("stax.xmlStructureSizeExceeded", maximu...
0
* @param baseURI public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) { * @param baseURI Element element, String baseURI, StorageResolver storage * @param baseURI Element element, String baseURI, StorageResolver storage * @param baseURI ...
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...
0
* Returns true if the graphics node has to be displayed, false * otherwise. */ public boolean getDisplay(Element e) { return CSSUtilities.convertDisplay(e); } /**
0
* Generic singleton timer. Don't use this if you are going to do anything that will take very long. * Please use it to reduce the number of threads dedicated to simple events. * Gets the timer instance. If an instance has already been created, it will have the number of * threads supplied when it was constructe...
0
* Retrieve the <code>ForwardingFilter</code> to be used by the SSH server. * @return the <code>ForwardingFilter</code> or <code>null</code> ForwardingFilter getForwardingFilter();
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 l...
0
import java.io.File; import java.io.FileInputStream; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import junit.framework.Assert;
0