Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
@SafeVarargs public static <E extends Enum<E>> Set<E> asEnumSet(E... values) { if (isEmpty(values)) { return Collections.emptySet(); } Set<E> s = EnumSet.of(values[0]); for (int index = 1 /* we used [0] to populate the initial set */; index < values.length; index++) ...
0
import org.junit.Test; @Test @Test
0
/** factory order constant */ /** * {@inheritDoc} */ /** * {@inheritDoc} */ public NodePointer createNodePointer(QName name, Object bean, Locale locale) { /** * {@inheritDoc} */ public NodePointer createNodePointer(NodePointer parent, QName name, Object ...
0
// TODO the following setup appears to duplicate that in the super class methods
0
String rootPath = getUsableDir();
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
while (scanner.hasNextLine() && !hasExited()) { }
0
* "stale-while-revalidate" * revalidation.
0
@Override @Override @Override @Override @Override
0
import org.apache.beam.runners.core.TimerInternals.TimerData;
0
* Copyright (C) 2015 Google Inc.
0
public class TestUnmodifiableOrderedMapIterator<K, V> extends AbstractTestOrderedMapIterator<K, V> { public OrderedMapIterator<K, V> makeEmptyIterator() { ListOrderedMap.decorate(new HashMap<K, V>()).mapIterator()); public OrderedMapIterator<K, V> makeObject() { return UnmodifiableOrdere...
0
TriggerStateMachines.stateMachineForTrigger(windowingStrategy.getTrigger())),
0
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; /** * General servlet for providing a bunch of information on the statusz page. * * <p><b>Not actually serializable</b>. Its superclass is serializable but this subclass is not. */ @SuppressFBWarnings("SE_BAD_FIELD") // not serializable
0
import org.junit.BeforeClass; @BeforeClass public static void jschInit() { JSchLogger.init(); }
0
import org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor; import org.apache.beam.model.pipeline.v1.RunnerApi;
0
err.append(sw);
1
import org.apache.excalibur.source.SourceValidity; import org.apache.cocoon.util.AbstractLogEnabled; public abstract class AbstractProcessingPipeline extends AbstractLogEnabled implements ProcessingPipeline, Parameterizable, ...
0
* @version CVS $Id$
0
boolean inSection = false; inSection = true; if(!inSection && !globalSection) { globalSection = true; sections.add(null); }
0
package aQute.bnd.build.model.conversions; import java.util.*; import java.util.Map.Entry; import aQute.lib.osgi.*; import aQute.libg.header.*; import aQute.libg.tuple.*; public class ClauseListConverter<R> implements Converter<List<R>,String> { private final Converter< ? extends R, ? super Pair<String,Attrs>> ite...
0
@Override public String toString() { return String.format("%s:%s", stepName(), metricName()); }
0
/** * This is the main, starting class of the Bundle. It initializes and disposes * the Apache Web Console upon bundle lifecycle requests. */ /** * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) */ /** * @see org.osgi.framework.BundleActivator#stop(org.osgi.fr...
0
Map<String, ServiceInfo> serviceMap = new HashMap<>();
0
* any executorService will do here. E.g. * {@link java.util.concurrent.Executors#newFixedThreadPool(int)}
0
import java.util.GregorianCalendar; // Initialize calendar also with same ms to avoid a failing test in a new time slice ((GregorianCalendar)date[1]).setTimeInMillis(now);
0
import org.apache.beam.sdk.testing.CrashingRunner; options.setRunner(CrashingRunner.class);
0
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
1
import org.apache.batik.constants.XMLConstants;
0
if (!content.contains("AMS_HBASE_NORMALIZER_ENABLED")) { "# HBase normalizer enabled\n" + "export AMS_HBASE_NORMALIZER_ENABLED={{ams_hbase_normalizer_enabled}}\n"; if (!content.contains("AMS_HBASE_FIFO_COMPACTION_ENABLED")) { "export AMS_HBASE_FIFO_COMPACTION_ENABLED={{ams_hbase_fifo_com...
0
@Override public String toShortString() { return String.format("struct[type=%s]", dataTypeName); }
1
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * v...
0
import com.google.common.base.Function; import com.google.common.base.Functions; private static final Function<TwitterTaskInfo, TwitterTaskInfo> COPY_AND_RESET_START_COMMAND = new Function<TwitterTaskInfo, TwitterTaskInfo>() { @Override public TwitterTaskInfo apply(TwitterTaskInfo task) { Twit...
0
Assert.assertThat(host2, CoreMatchers.equalTo(new HttpHost("https", "somehost", 8443)));
0
* @version CVS $Id: AO_FOM_Cocoon.java,v 1.2 2003/09/12 18:16:37 reinhard Exp $ /* NOTE (SM): These are the hooks to the future FOM Event Model that will be designed in the future. It has been postponed because we think there are more important things to do at the moment, but these are left here t...
0
throw new FileSystemException("vfs.provider.ftp/change-work-directory.error", workingDirectory);
0
@Deprecated @Deprecated @Deprecated
0
final MockBundleContext bundleContext = new MockBundleContext(); RepositoryAdminImpl repoAdmin = new RepositoryAdminImpl(bundleContext, new Logger(bundleContext)); }
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbcp/src/java/org/apache/commons/dbcp/AbandonedTrace.java,v 1.5 2003/04/09 00:19:37 dgraham Exp $ * $Revision: 1.5 $ * $Date: 2003/04/09 00:19:37 $ * Copyright (c) 1999-2003 The Apache Software Foundation. All rights * @versio...
0
@Override @Override @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 may ...
0
int getTimeoutMillis() { return ioSession.getSocketTimeoutMillis(); void onTimeout(final int timeoutMillis) throws IOException { handler.timeout(this, timeoutMillis); public int getSocketTimeoutMillis() { return ioSession.getSocketTimeoutMillis(); public void setSocketTimeoutMill...
0
import org.apache.commons.jelly.JellyTagException; protected void processBean(String var, Object bean) throws JellyTagException { throws JellyTagException { throw new JellyTagException(e); throw new JellyTagException(e); throw new JellyTagException...
0
* @version CVS $Id: SimpleMappingMetaModule.java,v 1.3 2004/02/15 19:09:38 haul Exp $ if (modeConf!=null && modeConf.getChildren().length > 0) { if (modeConf!=null && modeConf.getChildren().length > 0) { if (modeConf!=null && modeConf.getChildren().length > 0) {
0
package org.apache.commons.vfs2.util; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException;
1
* waiting for a compaction thread. Once a thread is available, the {@link #gatherInformation(MajorCompactionRequest)} method is called outside the tablets' * lock. This gives the strategy the ability to read information that maybe expensive to fetch. Once the gatherInformation returns, the tablet lock is grabbed * a...
0
* @version CVS $Id: ActionSetNodeBuilder.java,v 1.4 2003/08/07 17:13:39 joerg Exp $
0
WidgetEntity widgetEntity = new WidgetEntity(); widgetEntity.setId(1L); widgetEntity.setListWidgetLayoutUserWidgetEntity(new ArrayList<WidgetLayoutUserWidgetEntity>()); WidgetEntity widgetEntity2 = new WidgetEntity(); widgetEntity2.setId(2L); widgetEntity2.setListWidgetLayoutUserWidgetEntity(new...
0
package org.apache.felix.ipojo.runtime.core.test.components; public class NoAnnotation { }
0
* @version CVS $Id: Form.java,v 1.2 2003/03/16 17:49:14 vgritsenko Exp $
0
import org.apache.felix.http.base.internal.service.HttpServiceImpl; this.manager = new ExtenderManager((HttpServiceImpl)factory.getService(this.bundleContext.getBundle(), this.serviceReg), this.bundleContext);
0
import org.apache.beam.sdk.PipelineRunner;
0
MacroContext macroContext, Event startEvent, Event endEvent) macroContext, getNext(), getEndInstruction());
0
import org.apache.beam.runners.dataflow.testing.TestDataflowPipelineOptions; import org.apache.beam.sdk.options.PipelineOptionsFactory; import org.joda.time.Duration; private TestDataflowPipelineOptions options; options = PipelineOptionsFactory.as(TestDataflowPipelineOptions.class); options.setDataflowClien...
0
import java.util.Properties; AccumuloOutputFormat.setClientProperties(job, getClientProperties()); Properties clientProps = Accumulo.newClientProperties().to(instanceName, zooKeepers) .as(user, pass).build(); AccumuloInputFormat.setClientProperties(job, clientProps); AccumuloOutputForm...
0
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.ImmutableMap;
0
package org.apache.sshd.server;
0
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
0
private ClientContext context; public OfflineIterator(ScannerOptions options, ClientContext context, this.context = context; conn = context.getConnector(); if (Tables.getTableState(context, tableId) != TableState.OFFLINE) { Tables.clearCache(context); if (Tables.getTableState(context...
0
throw new IllegalArgumentException("Iterator name is already in use " + si.getName()); @Override public synchronized void removeScanIterator(String iteratorName) { ArgumentChecker.notNull(iteratorName); // if no iterators are set, we don't have it, so it is already removed if (serverSideIterator...
0
import org.apache.hc.client5.http.impl.sync.CloseableHttpResponse; import org.apache.hc.core5.http.ClassicHttpRequest; import org.apache.hc.core5.http.ClassicHttpResponse; import org.apache.hc.core5.http.io.entity.EntityUtils; final ClassicHttpRequest request, final ClassicHttpRe...
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
configureForEnvironment(cfg, ExamplesIT.class); @Test(timeout = 90 * 1000) @Test(timeout = 30 * 1000) @Test(timeout = 90 * 1000)
0
+ " 0, it will be automatically set by the runner by looking at different parameters " + "(e.g. number of CPU cores on the worker machine).")
0
Map<String,String> result = new HashMap<>(); HashSet<String> tableIds = new HashSet<>(); List<TDiskUsage> retUsages = new ArrayList<>(); retUsages.add(new TDiskUsage(new ArrayList<>(usageItem.getKey()), usageItem.getValue()));
1
package org.apache.ambari.server.state.live; import org.apache.ambari.server.state.fsm.InvalidStateTransitonException; * Get the list of Jobs that are currently being tracked at the * @return List of Jobs */ public List<Job> getJobs(); /** * Get Node State * @return NodeState public NodeState get...
0
m.put(new Text(""), new Text(""), new Value("foo1".getBytes(Constants.UTF8))); m.put(new Text("cf"), new Text("cq"), new Value(Long.toString(i).getBytes(Constants.UTF8))); m.put(new Text(key), new Text("cq"), new Value(Long.toString(i).getBytes(Constants.UTF8))); m.put(new Text("cf"), ...
0
import org.apache.beam.sdk.values.Row; /** Returns an {@link OutputReceiver} for the given tag. **/ /** Returns a {@link OutputReceiver} for publishing {@link Row} objects to the given tag. * * <p>The {@link PCollection} representing this tag must have a schema registered in order to * call this...
0
Map<Status, String> pair = getNameNodePair(componentHosts); private Map<Status, String> getNameNodePair(Set<String> componentHosts) throws AmbariException { if (!componentHosts.contains(hp.host)){ //This may happen when NN HA is configured on dual network card machines with public/privat...
0
* Copyright 2001-2006 The Apache Software Foundation private static final DateValidator DATE_VALIDATOR = new DateValidator(); return DATE_VALIDATOR;
0
protected void doTableOp(final Shell shellState, final String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException { public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
0
import org.apache.felix.framework.util.manifestparser.Capability; import org.apache.felix.moduleloader.ICapability; private ICapability[] m_exports = null; m_exports = (ICapability[]) ManifestParser.parseExportHeader( getFelix().getConfig().get(Constants.FRAMEWORK_SYSTEMPACKAGES)); ...
0
return 10 * 60; assertTrue(usage > 700 && usage < 900);
0
String sql1 = "select MY_FUNC(c1), c2 from PCOLLECTION"; PCollection<BeamSqlRow> outputTableA = inputTableA.apply(BeamSql.simpleQuery(sql1)); * * <p>Make sure to query it from a static table name <em>PCOLLECTION</em>. private static final String PCOLLECTION_TABLE_NAME = "PCOLLECTION"; validateQuery(); ...
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
import org.apache.bcel.generic.Type; * @return Major number of class file version. * @return A org.apache.bcel.classfile.Method corresponding to * java.lang.reflect.Method if any */ public Method getMethod(java.lang.reflect.Method m) { for(int i = 0; i < methods.length; i++) { Method method = m...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/UrlTest.java,v 1.5 2003/08/23 02:24:07 rleland Exp $ * $Revision: 1.5 $ * $Date: 2003/08/23 02:24:07 $ * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * an...
0
/* * 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 applicable la...
0
* nor may "Apache" appear in their name, without
0
LoggerFactory.getLogger(ClonePermissions.class).error("{}", e.getMessage(), e); }
0
final ByteBuffer oldbuffer = this.buffer; final StringBuilder sb = new StringBuilder(); final int mode = getMode();
0
/** * {@link AlertDefinitionCommand}s are used to isntruct the agent as to which * alert definitions it needs to schedule. */ @JsonProperty("alertDefinitionCommands") private List<AlertDefinitionCommand> alertDefinitionCommands = new ArrayList<AlertDefinitionCommand>(); /** * Gets the alert defini...
0
* @param keyType A key type name - ignored if {@code null}/empty * @return A {@link List} of they canonical key name and all its aliases * @see #getCanonicalKeyType(String) */ public static List<String> getAllEquivalentKeyTypes(String keyType) { if (GenericUtils.isEmpty(keyType)) { ...
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 ...
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
/* * 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 ...
0
import java.io.OutputStream; public static class TestOutputStream extends OutputStream { StringBuilder sb = new StringBuilder(); @Override public void write(int b) throws IOException { sb.append((char) (0xff & b)); } public String get() { return sb.toString(); } public void...
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.util.concurrent.MoreExecutors;
0
public JettyNIOServer(int port) {
0
while (clazz != null) { AccessibleObject.setAccessible(clazz.getDeclaredMethods(), true); try { try { method = clazz.getDeclaredMethod(methodName, new Class[] {ServiceReference.class, Object.class}); method.invoke(instance, new Object[] {reference...
0
import org.apache.ambari.server.orm.dao.StackDAO; import org.apache.ambari.server.orm.entities.StackEntity; StackDAO stackDAO = injector.getInstance(StackDAO.class); StackEntity stackEntity = new StackEntity(); stackEntity.setStackName("HDP"); stackEntity.setStackVersion("2.1.1"); stackDAO.create(...
0
import com.twitter.mesos.gen.Identity; import com.twitter.mesos.gen.TwitterTaskInfo; .setTaskId(taskId) .setTask(new TwitterTaskInfo() .setOwner(new Identity().setRole("role-" + taskId).setUser("user-" + taskId))));
0
import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import org.apache.ambari.server.controller.metrics.MetricPropertyProv...
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 applicabl...
0
basicSetup(typeDefStore, typeRegistry);
0
import org.apache.http.mockup.HttpClientNio; import org.apache.http.mockup.HttpServerNio; static class CustomTestHttpServer extends HttpServerNio { protected HttpClientNio client; this.client = new HttpClientNio(clientParams); NHttpRequestExecutionHandler requestExecutionHandler = new RequestExe...
0
/* * Copyright (c) OSGi Alliance (2010, 2014). All Rights Reserved. * * 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 req...
0
public void init() { }
0
* Autogenerated by Thrift Compiler (0.9.3) import javax.annotation.Generated; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-16") public class Condition implements org.apache.thrift.TBase<Condition, Condition._Fiel...
0
public class LoginProcessorIT { LoginProcessor processor = new LoginProcessor() { processor.login(); LoginProcessor processor = new LoginProcessor() { config.setProperty("metadata.authentication.method", "kerberos"); config.setProperty("metadata.authentication.pri...
0