Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
package org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.date; import org.apache.beam.sdk.extensions.sql.impl.interpreter.BeamSqlFnExecutorTestBase; import org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.BeamSqlExpression; import org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.BeamSqlPrimitive;
0
return
0
access = access.isEmpty() ? "" : (access + " ");
0
package org.apache.zookeeper.jmx; public static final String DOMAIN="org.apache.ZookeeperService";
0
import org.apache.commons.collections.iterators.EmptyIterator; import org.apache.commons.collections.iterators.EmptyMapIterator; * @version $Revision: 1.18 $ $Date: 2004/05/26 21:56:05 $ return EmptyMapIterator.INSTANCE; return EmptyIterator.INSTANCE; return EmptyIterator.INSTANCE; return EmptyIterator.INSTANCE;
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 applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
0
public void setClusterName(String clusterName) { this.clusterName = clusterName; } public String getClusterName() { return this.clusterName; }
1
import com.google.common.base.Function; import com.google.common.base.Supplier; import org.apache.aurora.common.base.ExceptionalSupplier; return backoffHelper.doUntilResult(new ExceptionalSupplier<ServiceInstance, RuntimeException>() {
0
Map<String, ServiceComponentHost> serviceComponentHosts = components.get(componentName).getServiceComponentHosts(); if (!components.containsKey(componentName) || serviceComponentHosts.size() == 0) { return serviceComponentHosts.keySet();
0
if (key != null && value.length() > 0) {
0
public enum Type { HDFS, MAPREDUCE, HBASE, HIVE, OOZIE, WEBHCAT, SQOOP, NAGIOS, GANGLIA, ZOOKEEPER }
0
public Map<String,List<IteratorSetting>> scanIteratorOptions = new HashMap<>(); public Map<String,List<IteratorSetting>> iteratorProfiles = new HashMap<>(); public final Map<String,Command> commandFactory = new TreeMap<>(); public final Map<String,Command[]> commandGrouping = new TreeMap<>(); Map<Command.CompletionSet,Set<String>> options = new HashMap<>(); Set<String> commands = new HashSet<>(); Set<String> modifiedUserlist = new HashSet<>(); Set<String> modifiedTablenames = new HashSet<>(); Set<String> modifiedNamespaces = new HashSet<>();
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 this file except in compliance with * the License. You may obtain a copy of the License at
0
import org.apache.http.client.config.RequestConfig; final HttpClientContext clientContext = HttpClientContext.adapt(context); final RequestConfig requestConfig = clientContext.getRequestConfig(); if (!request.containsHeader("Accept-Encoding") && requestConfig.isContentCompressionEnabled()) {
0
AccumuloRowInputFormat.configure().clientProperties(getClientInfo().getProperties()) .table(table).auths(Authorizations.EMPTY).store(job);
0
import org.apache.ambari.server.controller.internal.RootServiceComponentConfigurationResourceProvider; .implement(ResourceProvider.class, Names.named("rootServiceHostComponentConfiguration"), RootServiceComponentConfigurationResourceProvider.class)
0
import cz.seznam.euphoria.core.client.dataset.windowing.Window; class Datum extends WindowedElement<Window, Object> { static Datum of(Window window, Object element, long stamp) { return new Datum(window, element, stamp); static Datum windowTrigger(Window window, long stamp) { return new WindowTrigger(window, stamp); WindowTrigger(Window window, long stamp) { super(window, null, stamp); this.stamp = stamp; return "WindowTrigger(" + getWindow() + ", " + stamp + ")"; private Datum(Window window, Object element, long stamp) { super(window, element); this.stamp = stamp; return "Datum(" + this.getWindow() + ", " + stamp + ", " + get() + ")";
0
if (parent == null || !(parent instanceof javax.xml.crypto.dom.DOMStructure)) { throw new ClassCastException("parent must be of type DOMStructure"); } if (parent == null || !(parent instanceof javax.xml.crypto.dom.DOMStructure)) { throw new ClassCastException("parent must be of type DOMStructure"); }
1
import org.xml.sax.SAXException; throw new SAXException( sb.toString() );
0
// If this is the framework's "felix:" extension protocol, then // return the ExtensionManager.m_extensionManager handler for // that immediately - this is a workaround for certain jvms that // do a toString() on the extension url we add to the global // URLClassloader. if (protocol.equals("felix")) { handler = ExtensionManager.m_extensionManager; if (m_streamHandlerCache == null) { m_streamHandlerCache = new HashMap(); } m_streamHandlerCache.put(protocol, handler); return handler; }
0
* @version CVS $Id: Binding.java,v 1.6 2004/02/03 12:22:08 joerg Exp $ void loadFormFromModel(Widget frmModel, Object objModel) throws BindingException;
0
* @version CVS $Id: TraxTransformer.java,v 1.2 2003/03/19 15:42:14 cziegeler Exp $ public java.io.Serializable getKey() { public SourceValidity getValidity() {
0
new ConcurrentHashMap<>(); clusterMapping = new ConcurrentHashMap<>(); List<AlertDefinition> definitions = new ArrayList<>( entities.size()); Set<String> affectedHosts = new HashSet<>(); List<String> uuids = new ArrayList<>(definitions.size()); Set<AlertDefinitionEntity> definitions = new HashSet<>(); Set<String> services = new HashSet<>();
1
import org.apache.commons.lang.StringUtils; import java.util.ArrayList; import java.util.List; final String tezConfigType = "tez-site"; final String coreSiteConfigType = "core-site"; final DesiredConfig tezDesiredConfig = desiredConfigs.get(tezConfigType); final Config tezConfig = cluster.getConfig(tezConfigType, tezDesiredConfig.getTag()); final DesiredConfig coreSiteDesiredConfig = desiredConfigs.get(coreSiteConfigType); final Config coreSiteConfig = cluster.getConfig(coreSiteConfigType, coreSiteDesiredConfig.getTag()); final String libUris = tezConfig.getProperties().get("tez.lib.uris"); final String useHadoopLibs = tezConfig.getProperties().get("tez.use.cluster.hadoop-libs"); final String defaultFS = coreSiteConfig.getProperties().get("fs.defaultFS"); List<String> errorMessages = new ArrayList<String>(); if (libUris == null || libUris.isEmpty()) { errorMessages.add("Property tez.lib.uris is missing from tez-site, please add it."); if (useHadoopLibs == null || useHadoopLibs.isEmpty()) { errorMessages.add("Property tez.use.cluster.hadoop-libs is missing from tez-site, please add it."); } if (!errorMessages.isEmpty()) { prerequisiteCheck.setFailReason(StringUtils.join(errorMessages, " ")); if (!libUris.matches("^[^:]*dfs:.*") && (defaultFS == null || !defaultFS.matches("^[^:]*dfs:.*"))) { errorMessages.add("Property tez.lib.uris in tez-site should use a distributed file system. Please make sure that either tez-site's tez.lib.uris or core-site's fs.defaultFS begins with *dfs:"); } if (!libUris.contains("tar.gz")) { errorMessages.add("Property tez.lib.uris in tez-site should end in tar.gz"); } errorMessages.add("Property tez.use.cluster.hadoop-libs in tez-site should be set to false"); } if (!errorMessages.isEmpty()) { prerequisiteCheck.setFailReason(StringUtils.join(errorMessages, " "));
0
kerberosEnvProperties.put("kdc_hosts", expectedHostName + ",secondary.kdc.org"); kerberosEnvProperties.put("master_kdc", expectedHostName); assertFalse("master_kdc should not be present in exported blueprint in kerberos-env", kerberosEnvProperties.containsKey("master_kdc"));
0
import org.apache.ambari.server.audit.event.kerberos.DestroyPrincipalKerberosAuditEvent; DestroyPrincipalKerberosAuditEvent.DestroyPrincipalKerberosAuditEventBuilder auditEventBuilder = DestroyPrincipalKerberosAuditEvent.builder() .withTimestamp(System.currentTimeMillis()) .withPrincipal(evaluatedPrincipal); try { operationHandler.removePrincipal(evaluatedPrincipal); } catch (KerberosOperationException e) { message = String.format("Failed to remove identity for %s from the KDC - %s", evaluatedPrincipal, e.getMessage()); LOG.warn(message); actionLog.writeStdErr(message); auditEventBuilder.withReasonOfFailure(message); } try { KerberosPrincipalEntity principalEntity = kerberosPrincipalDAO.find(evaluatedPrincipal); if (principalEntity != null) { String cachedKeytabPath = principalEntity.getCachedKeytabPath(); kerberosPrincipalDAO.remove(principalEntity); } catch (Throwable t) { message = String.format("Failed to remove identity for %s from the Ambari database - %s", evaluatedPrincipal, t.getMessage()); LOG.warn(message); actionLog.writeStdErr(message); auditEventBuilder.withReasonOfFailure(message); } } finally { auditLog(auditEventBuilder.build());
1
/** * TODO Add javadoc * * @author <a href="mailto:[email protected]">Apache MINA SSHD Project</a> * @version $Rev$, $Date$ */
0
/** snappy codec **/ public static final String COMPRESSION_SNAPPY = "snappy"; * <li>"snappy" - Snappy compression
0
getManagedBuilders().get(fileName); ConcurrentUtils.putIfAbsent(getManagedBuilders(), fileName, for (FileBasedConfigurationBuilder<T> b : getManagedBuilders().values()) for (FileBasedConfigurationBuilder<T> b : getManagedBuilders().values()) for (FileBasedConfigurationBuilder<T> b : getManagedBuilders().values()) for (FileBasedConfigurationBuilder<T> b : getManagedBuilders().values()) for (FileBasedConfigurationBuilder<T> b : getManagedBuilders().values()) getManagedBuilders().clear(); * Returns the map with the managed builders created so far by this * {@code MultiFileConfigurationBuilder}. This map is exposed to derived * classes so they can access managed builders directly. However, derived * classes are not expected to manipulate this map. * * @return the map with the managed builders */ protected ConcurrentMap<String, FileBasedConfigurationBuilder<T>> getManagedBuilders() { return managedBuilders; } /**
0
assertEquals(18, stacks.size()); assertEquals(14, stacks.size());
0
private Set<String> errors = new HashSet<>(); Map<String, Theme> map = new HashMap<>();
1
package org.apache.bcel; import org.apache.bcel.classfile.JavaClass; public class AnnotationAccessFlagTestCase extends AbstractTestCase { /** * If you write an annotation and compile it, the class file generated * should be marked as an annotation type - which is detectable through * BCEL. */ public void testAnnotationClassSaysItIs() throws ClassNotFoundException { JavaClass clazz = getTestClass("org.apache.bcel.data.SimpleAnnotation"); assertTrue( "Expected SimpleAnnotation class to say it was an annotation - but it didn't !", clazz.isAnnotation()); clazz = getTestClass("org.apache.bcel.data.SimpleClass"); assertTrue( "Expected SimpleClass class to say it was not an annotation - but it didn't !", !clazz.isAnnotation()); } }
0
import static junit.framework.Assert.*; /** * Test checking the availability of the architecture instance according to the instance state. * The architecture instance is available even in the STOPPED state. */ @Test public void testArchitectureServiceAvailability() { String instanceName = instance1.getInstanceName(); // Check architecture of instance1 Architecture arch = ipojoHelper.getArchitectureByName(instanceName); assertNotNull(arch); assertEquals(ComponentInstance.VALID, arch.getInstanceDescription().getState()); // We stop the instance instance1.stop(); arch = ipojoHelper.getArchitectureByName(instanceName); assertNotNull(arch); assertEquals(ComponentInstance.STOPPED, arch.getInstanceDescription().getState()); // Restart. instance1.start(); arch = ipojoHelper.getArchitectureByName(instanceName); assertNotNull(arch); assertEquals(ComponentInstance.VALID, arch.getInstanceDescription().getState()); // Disposal instance1.dispose(); arch = ipojoHelper.getArchitectureByName(instanceName); assertNull(arch); }
0
import static junit.framework.TestCase.assertTrue; import static org.junit.Assert.assertFalse; public void testNotConsistentWithEquals() { ListCoder<byte[]> coder = ListCoder.of(ByteArrayCoder.of()); assertFalse(coder.consistentWithEquals()); } @Test public void testConsistentWithEquals() { ListCoder<Integer> coder = ListCoder.of(VarIntCoder.of()); assertTrue(coder.consistentWithEquals()); public void testEncodedTypeDescriptor() throws Exception { TypeDescriptor<List<Integer>> typeDescriptor = new TypeDescriptor<List<Integer>>() {}; assertThat(TEST_CODER.getEncodedTypeDescriptor(), equalTo(typeDescriptor));
0
this.ambariMetaInfo = new AmbariMetaInfo(stackRoot, new File("../version"));
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 this file except in compliance with * the License. You may obtain a copy of the License at
0
o = System.getProperty(key.toUpperCase().replace('.', '_'));
0
import java.util.concurrent.ExecutionException; import java.util.concurrent.FutureTask; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; /** * Used to track the last state we delivered to any state listeners. */ schedule(true /* synchronously */, () -> { m_isStarted = false; handleChange(); }); // executor. There is one corner case: if this is a REMOVE event, we must try to stay synchronous // because if the remove event corresponds to a service being unregistered, then we must try to stop // our component depending on the lost service before the lost service is actually stopped. boolean synchronously = (type == EventType.REMOVED); schedule(synchronously, () -> { private void schedule(boolean synchronously, Runnable task) { if (synchronously) { FutureTask<Void> future = new FutureTask<Void>(task, null); getExecutor().execute(future); try { future.get(DependencyManager.SCHEDUME_TIMEOUT_VAL, TimeUnit.MILLISECONDS); } catch (InterruptedException | ExecutionException | TimeoutException e) { m_logger.warn("task could not be scheduled timely in component %s (exception:%s)", this, e.toString()); } } else { getExecutor().execute(task); } }
0
public SqlDateConverter(final Object defaultValue) {
0
import static org.easymock.EasyMock.createMock; import static org.easymock.EasyMock.createMockBuilder; import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.expectLastCall; import static org.easymock.EasyMock.replay; import static org.easymock.EasyMock.verify; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.util.Collections; import java.util.HashMap; import java.util.Map; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Sets; import com.google.inject.Guice; import com.google.inject.Injector;
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 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 * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ambari.spi.upgrade; /** * Type of prerequisite check. */ public enum UpgradeCheckType { SERVICE, HOST, CLUSTER }
0
import aQute.bnd.osgi.Analyzer; import aQute.bnd.osgi.Builder; import aQute.bnd.osgi.Jar;
0
import org.apache.beam.runners.flink.FlinkRunner; options.setRunner(FlinkRunner.class);
0
package org.apache.felix.ipojo.manipulation; import java.io.File; import junit.framework.Assert; import junit.framework.TestCase; import org.apache.felix.ipojo.manipulator.Pojoization; public class PojoizationTest extends TestCase { public void testJarManipulation() { Pojoization pojoization = new Pojoization(); File in = new File("target/test-classes/tests.manipulation-no-annotations.jar"); File out = new File("target/test-classes/tests.manipulation-no-annotations-manipulated.jar"); out.delete(); File metadata = new File("target/test-classes/metadata.xml"); pojoization.pojoization(in, out, metadata); Assert.assertTrue(out.exists()); } public void testManipulationWithAnnotations() { Pojoization pojoization = new Pojoization(); File in = new File("target/test-classes/tests.manipulator-annotations.jar"); File out = new File("target/test-classes/tests.manipulation-annotations-manipulated.jar"); out.delete(); pojoization.pojoization(in, out, (File) null); Assert.assertTrue(out.exists()); } public void testJarManipulationJava5() { Pojoization pojoization = new Pojoization(); File in = new File("target/test-classes/tests.manipulation.java5.jar"); File out = new File("target/test-classes/tests.manipulation.java5-manipulated.jar"); out.delete(); pojoization.pojoization(in, out, (File) null); Assert.assertTrue(out.exists()); } }
0
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; import org.apache.http.client.methods.HttpExecutionAware; import org.apache.http.concurrent.Cancellable; class InternalHttpRequest extends AbstractHttpMessage implements HttpUriRequest, HttpExecutionAware, Configurable { private final AtomicBoolean aborted; private final AtomicReference<Cancellable> cancellableRef; this.aborted = new AtomicBoolean(false); this.cancellableRef = new AtomicReference<Cancellable>(null); if (this.aborted.compareAndSet(false, true)) { final Cancellable cancellable = this.cancellableRef.getAndSet(null); if (cancellable != null) { cancellable.cancel(); } } return this.aborted.get(); } @Override public void setCancellable(final Cancellable cancellable) { if (!this.aborted.get()) { this.cancellableRef.set(cancellable); }
0
private final Map<FileName, ArrayList<FileListener>> listenerMap = new HashMap<FileName, ArrayList<FileListener>>(); ArrayList<FileListener> listeners = listenerMap.get(file.getName()); listeners = new ArrayList<FileListener>(); final ArrayList<?> listeners = listenerMap.get(file.getName()); final ArrayList<?> listeners = listenerMap.get(file.getName()); fileListeners = listeners.toArray(new FileListener[listeners.size()]);
0
import org.apache.accumulo.harness.AccumuloClusterHarness; public class MetaSplitIT extends AccumuloClusterHarness {
0
package org.apache.accumulo.monitor.rest.api.table; /** * * Generates a list of tables as a JSON object * * @since 2.0.0 * */ // Variable names become JSON keys /** * Initializes array list */ /** * Add a table to the list * * @param table * Table to add */
0
/** Tests for {@link TupleTag}. */ "org.apache.beam.sdk.values.TupleTagTest$AnotherClass#0", AnotherClass.anotherTag.getId()); assertThat( Iterables.get(Splitter.on('#').split(tag.getId()), 0), assertThat( Integer.parseInt( Iterables.get( Splitter.on(':').split(Iterables.get(Splitter.on('#').split(tag.getId()), 0)), 1)),
1
import org.apache.beam.sdk.testing.UsesKms; import org.junit.experimental.categories.Category; @Category(UsesKms.class)
0
import org.apache.sshd.common.util.threads.ExecutorService; this(null); public AgentServer(ExecutorService executor) { this(new AgentImpl(), executor); public AgentServer(SshAgent agent, ExecutorService executor) { this.service = (executor == null) ? ThreadUtils.newSingleThreadExecutor("AgentServer[" + agent + "]") : executor; if ((executor != null) && (!executor.isShutdown())) {
1
jceDigestAlgorithm = JCEAlgorithmMapper.translateURItoJCEID(digestMethodType.getAlgorithm()); String jceMGFAlgorithm = JCEAlgorithmMapper.translateURItoJCEID(mgfType.getAlgorithm()); mgfParameterSpec = new MGF1ParameterSpec(jceMGFAlgorithm);
0
Shape clip = CSSUtilities.convertClipPath(element, node, ctx); node.setClippingArea(clip);
0
if (logsForDeadServers != null) { List<Path> logs = logsForDeadServers.get(tls.current); if (logs != null) { for (Path log : logs) { LogEntry entry = new LogEntry(tls.extent, 0, tls.current.hostPort(), log.toString()); m.put(entry.getColumnFamily(), entry.getColumnQualifier(), entry.getValue()); } } }
0
testDir = new File(baseDir, TestUpgradePathForWALogs.class.getName());
0
import org.apache.hc.core5.concurrent.CancellableDependency; ExecRuntime fork(CancellableDependency cancellableAware);
0
private static final long serialVersionUID = -8114699256840851439L;
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 * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
0
import org.osgi.annotation.versioning.ConsumerType; @ConsumerType
0
@Parameter(names = "--vis", description = "use a given visibility for the new counts", converter = VisibilityConverter.class)
0
* @param svgCanvasSize SVG Canvas size. May be null (equivalent to 100%, 100%) * @param extensionHandler new extension handler this SVGGraphics2D * should use * this Graphics2D generates. * Creates a new SVGGraphics2D object. * @param generatorCtx the <code>SVGGeneratorContext</code> instance * @return the svg root node of the SVG document associated with * this object. * @param x the x coordinate in user space where the upper left * corner of the image is rendered * @param y the y coordinate in user space where the upper left * corner of the image is rendered * @param trans2 the transformation from image space into user space * <p> * {@link #drawRenderedImage(RenderedImage, AffineTransform)}. * @param trans2 the transformation from image space into user space * @param x the x coordinate where the <code>String</code> * should be rendered * @param y the y coordinate where the <code>String</code> * should be rendered * @param x the x coordinate where the iterator's text is to be rendered * @param y the y coordinate where the iterator's text is to be rendered
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument; import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkNotNull; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableSet; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Maps; import org.apache.beam.vendor.guava.v20_0.com.google.common.graph.EndpointPair; import org.apache.beam.vendor.guava.v20_0.com.google.common.graph.MutableNetwork; import org.apache.beam.vendor.guava.v20_0.com.google.common.graph.Network;
0
responseBuffer.putLong(current.getId()); responseBuffer.putLong(current.getZxid()); responseBuffer.putLong(current.getId()); leader.learners)
0
import java.io.PrintWriter; import java.io.StringWriter; private StringWriter sw; sw = new StringWriter(); ds.setAbandonedLogWriter(new PrintWriter(sw)); assertTrue(sw.toString().contains("testAbandonedClose")); assertTrue(sw.toString().contains("testAbandonedCloseWithExceptions"));
0
import org.apache.log4j.Logger; import com.yahoo.zookeeper.server.ZooKeeperServer; private static final Logger LOG = Logger.getLogger(ZooKeeperServer.class); LOG.error("this should be impossible!", e); LOG.error("from " + t.getName(), e); LOG.error("Somehow a null cb got to EventThread!"); LOG.warn("Priming connection to " LOG.warn("Trying to connect to " + addr); LOG.warn("Closing: " + e.getMessage());
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 this file except in compliance * with the License. You may obtain a copy of the License at
0
PCollection<String> pc = p.apply( TextIO.read().from(testPath("testFile*").toString()));
0
import org.apache.accumulo.core.client.NamespaceNotFoundException; import org.apache.accumulo.core.client.impl.Namespaces; String info = "Namespace not found while trying to create table"; throw new IllegalArgumentException(new NamespaceNotFoundException(null, namespace, info)); } else if (namespace.equals(Constants.SYSTEM_NAMESPACE)) { String info = "Namespace not found while cloning table"; throw new IllegalArgumentException(new NamespaceNotFoundException(null, namespace, info)); // get the properties that are only in the namespace so that we can exclude them when copying table properties. Iterable<Entry<String,String>> n = new NamespaceOperationsImpl(instance, credentials).getProperties(namespace); } catch (NamespaceNotFoundException e) { throw new IllegalStateException(new NamespaceNotFoundException(null, namespace, null)); String info = "Namespace not found while renaming table"; throw new IllegalArgumentException(new NamespaceNotFoundException(null, namespace, info)); String info = "Namespace not found while importing to table"; throw new RuntimeException(new NamespaceNotFoundException(null, namespace, info)); return Namespaces.getNameToIdMap(instance).containsKey(namespace);
0
/* * (c) COPYRIGHT 1999 World Wide Web Consortium * (Massachusetts Institute of Technology, Institut National de Recherche * en Informatique et en Automatique, Keio University). * All Rights Reserved. http://www.w3.org/Consortium/Legal/ * * $Id$ */ package org.w3c.flute.parser; /** * @version $Revision$ * @author Philippe Le Hegaret */ class ThrowedParseException extends RuntimeException { ParseException e; /** * Creates a new ThrowedParseException */ ThrowedParseException(ParseException e) { this.e = e; } }
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 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
0
import org.ow2.chameleon.testing.helpers.Stability; Stability.waitForStability(bc);
0
StackInfo stackInfo = getStackInfo(stackName, version); if (stackInfo != null) { exist = true; } ServiceInfo info= getServiceInfo(stackName, version, serviceName); if (info != null) { exist = true; }
0
boolean closeFilesystem; closeFilesystem = files.size() < 1; if (closeFilesystem) endThread(); // files.clear(); synchronized (filesystemCache) { filesystemCache.clear(); refReverseMap.clear();
0
import java.io.StreamCorruptedException; public static class SignatureECDSA256 extends SignatureECDSA { public static final String DEFAULT_ALGORITHM = "SHA256withECDSA"; public SignatureECDSA256() { super(DEFAULT_ALGORITHM); } } public static class SignatureECDSA384 extends SignatureECDSA { public static final String DEFAULT_ALGORITHM = "SHA384withECDSA"; public SignatureECDSA384() { super(DEFAULT_ALGORITHM); } } public static class SignatureECDSA521 extends SignatureECDSA { public static final String DEFAULT_ALGORITHM = "SHA512withECDSA"; public SignatureECDSA521() { super(DEFAULT_ALGORITHM); } } throw new StreamCorruptedException("Invalid signature format - not a DER SEQUENCE: 0x" + Integer.toHexString(type)); * throw new StreamCorruptedException("Invalid signature format - not enough encoded data length: " + remainLen); throw new StreamCorruptedException("Signature had padding - remaining=" + remaining);
0
String DIRECTION_PROPERTY = "direction"; String WRITING_MODE_PROPERTY = "writing-mode"; String UNICODE_BIDI_PROPERTY = "unicode-bidi"; String BASELINE_SHIFT_PROPERTY = "baseline-shift";
0
package org.apache.felix.ipojo.test.scenarios.component; import foo.ipojo.IPOJOFoo; @IPOJOFoo(bar="bar") public class OnlyiPOJOFoo { }
0
bind(WorkQueue.class).to(WorkQueueImpl.class).in(Singleton.class); return new EncodingPersistenceLayer(binaryPersistence);
0
import java.util.Properties; if (count % 1000 == 0) makingProgress();
1
import org.apache.http.annotation.Obsolete; * <p> * Rendered obsolete by {@link org.apache.http.impl.cookie.RFC6265CookieSpecProvider} * @see org.apache.http.impl.cookie.RFC6265CookieSpecProvider @Obsolete
0
if (SortedLogState.FAILED.getMarker().equals(child.getPath().getName())) { continue; }
0
walFailureRetryMax, RetryFactory.DEFAULT_LOG_INTERVAL); final RetryFactory walWritingRetryFactory = new RetryFactory(walFailureRetryIncrement, walFailureRetryIncrement, walFailureRetryMax, RetryFactory.DEFAULT_LOG_INTERVAL);
0
} // ### this is a hack - remove this when we have support for pluggable Scopes if ( answer == null ) { try { answer = System.getProperty(name); } catch (Throwable t) { // ignore security exceptions
0
String[] mountEntries = new String[] {"rootfs / rootfs rw 0 0", "proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0", "securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0", "tmpfs /dev/shm tmpfs rw,seclabel,nosuid,nodev 0 0", "devpts /dev/pts devpts rw,seclabel,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0", "tmpfs /run tmpfs rw,seclabel,nosuid,nodev,mode=755 0 0", "pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0", "cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0", "cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0", "configfs /sys/kernel/config configfs rw,relatime 0 0", "/dev/vda1 / xfs rw,seclabel,relatime,attr2,inode64,noquota 0 0", "/dev/vda2 /ignoreme reiserfs rw 0 0", "rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0", "selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0", "debugfs /sys/kernel/debug debugfs rw,relatime 0 0", "mqueue /dev/mqueue mqueue rw,seclabel,relatime 0 0", "hugetlbfs /dev/hugepages hugetlbfs rw,seclabel,relatime 0 0", "sunrpc /proc/fs/nfsd nfsd rw,relatime 0 0", assertTrue("Did not expect to find " + mount, expectedCheckedMountPoints.remove(mount.mountPoint)); assertEquals("Should not have any extra mount points: " + expectedCheckedMountPoints, 0, expectedCheckedMountPoints.size());
0
registerTag( "windowListener", WindowListenerTag.class );
0
@Parameters(name = "{0}, charset={1}") return Arrays.asList(new Object[][]{ {"test-file-20byteslength.bin", "ISO_8859_1", null}, {"test-file-iso8859-1-shortlines-win-linebr.bin", "ISO_8859_1", null}, {"test-file-iso8859-1.bin", "ISO_8859_1", null}, {"test-file-shiftjis.bin", "Shift_JIS", null}, {"test-file-utf16be.bin", "UTF-16BE", null}, {"test-file-utf16le.bin", "UTF-16LE", null}, {"test-file-utf8-cr-only.bin", "UTF-8", null}, {"test-file-utf8-win-linebr.bin", "UTF-8", null}, {"test-file-utf8-win-linebr.bin", "UTF-8", 1}, {"test-file-utf8-win-linebr.bin", "UTF-8", 2}, {"test-file-utf8-win-linebr.bin", "UTF-8", 3}, {"test-file-utf8-win-linebr.bin", "UTF-8", 4}, {"test-file-utf8.bin", "UTF-8", null}, }); this.buffSize = buffsize == null ? 4096 : buffsize; final File testFileIso = new File(this.getClass().getResource("/" + fileName).toURI()); while ((line = bufferedReader.readLine()) != null) { while ((line = reversedLinesFileReader.readLine()) != null) { } catch (final Exception e) { } catch (final Exception e) {
1
apiConnector.setPort(configs.getClientApiPort());
0
String ROOT_LOGGER_NAME = "ROOT";
0
import org.apache.felix.ipojo.api.HandlerConfiguration; public class ProvidedService implements HandlerConfiguration {
0
return FlinkKeyUtils.encodeKey(key, keyCoder);
0
import org.apache.aurora.scheduler.storage.JobUpdateStore; link(JobUpdateStore.Mutable.class);
0
final SchemeRegistry registry = getSchemeRegistry(context); final Scheme schm = registry.getScheme(target.getSchemeName()); final SchemeSocketFactory sf = schm.getSchemeSocketFactory(); final InetAddress[] addresses = resolveHostname(target.getHostName()); final int port = schm.resolvePort(target.getPort()); final InetAddress address = addresses[i]; final boolean last = i == addresses.length - 1; final InetSocketAddress remoteAddress = new HttpInetSocketAddress(target, address, port); final Socket connsock = sf.connectSocket(sock, remoteAddress, localAddress, params); } catch (final ConnectException ex) { } catch (final ConnectTimeoutException ex) { final SchemeRegistry registry = getSchemeRegistry(context); final Scheme schm = registry.getScheme(target.getSchemeName()); final SchemeLayeredSocketFactory lsf = (SchemeLayeredSocketFactory) schm.getSchemeSocketFactory(); } catch (final ConnectException ex) { final int linger = HttpConnectionParams.getLinger(params);
0
throws DOMException { super(name, owner); nodeName = name; nodeName = v; return nodeName; return readonly; readonly = v; super.export(n, d); GenericElement ge = (GenericElement)n; ge.nodeName = nodeName; return n; super.deepExport(n, d); GenericElement ge = (GenericElement)n; ge.nodeName = nodeName; return n; GenericElement ge = (GenericElement)super.copyInto(n); ge.nodeName = nodeName; return n; GenericElement ge = (GenericElement)super.deepCopyInto(n); ge.nodeName = nodeName; return n;
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 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 distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.sshd.client.auth.deprecated; import java.io.IOException; import org.apache.sshd.common.util.Buffer; /** * TODO Add javadoc * * @author <a href="mailto:[email protected]">Apache MINA SSHD Project</a> */ public interface UserAuth { enum Result { Success, Failure, Continued } Result next(Buffer buffer) throws IOException; }
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 this file except in compliance with * the License. You may obtain a copy of the License at
0
public static final String ZOOKEEPER_CLIENT_CNXN_SOCKET = "zookeeper.clientCnxnSocket"; @Override cnxn = new ClientCnxn(connectString, sessionTimeout, this, watchManager, getClientCnxnSocket()); cnxn = new ClientCnxn(connectString, sessionTimeout, this, watchManager, getClientCnxnSocket(), sessionId, sessionPasswd); if (!cnxn.getState().isAlive()) { return cnxn.getState(); return cnxn.sendThread.getClientCnxnSocket().getRemoteSocketAddress(); return cnxn.sendThread.getClientCnxnSocket().getLocalSocketAddress(); } private static ClientCnxnSocket getClientCnxnSocket() throws IOException { String clientCnxnSocketName = System .getProperty(ZOOKEEPER_CLIENT_CNXN_SOCKET); if (clientCnxnSocketName == null) { clientCnxnSocketName = ClientCnxnSocketNIO.class.getName(); } try { return (ClientCnxnSocket) Class.forName(clientCnxnSocketName) .newInstance(); } catch (Exception e) { IOException ioe = new IOException("Couldn't instantiate " + clientCnxnSocketName); ioe.initCause(e); throw ioe; }
0
private static final Offer OFFER_A = Offers.makeOffer("OFFER_A", "HOST_A"); private static final Offer OFFER_B = Offers.makeOffer("OFFER_B", "HOST_B"); private static final Offer OFFER_C = Offers.makeOffer("OFFER_C", "HOST_C"); private static final Offer OFFER_D = Offers.makeOffer("OFFER_D", "HOST_D"); Offer offerAB = Offers.makeOffer("OFFER_B").toBuilder().setSlaveId(OFFER_A.getSlaveId()).build();
0
import javax.annotation.Nullable;
0
Configuration subset; subset = createSubnodeConfiguration(getSectionNode(section)); } else { subset = getSection(null);
0
package org.apache.felix.sigil.eclipse.internal.builders; import org.apache.felix.sigil.bnd.BundleBuilder; import org.apache.felix.sigil.config.IBldProject; import org.apache.felix.sigil.eclipse.SigilCore; import org.apache.felix.sigil.eclipse.model.project.ISigilProjectModel; import org.apache.felix.sigil.eclipse.model.util.JavaHelper;
0
String USE_CACHEDURLS_PROPS = "felix.bundlecodesource.usecachedurls";
0