Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
private final ClientHammerTest cht = new ClientHammerTest(); cht.hostPort = hostPort; cht.setUpAll(); cht.tearDownAll(); cht.runHammer(5, 10);
0
import javax.management.StandardMBean; import org.apache.accumulo.master.metrics.ReplicationMetrics; final SystemCredentials creds = SystemCredentials.get(); try { ReplicationMetrics beanImpl = new ReplicationMetrics(this.instance.getConnector(creds.getPrincipal(), creds.getToken())); beanImpl.regi...
0
* /** FIXME: re-enable when associated pool problem is resolved ***** */
1
new Lifecycle(shutdownRegistry),
0
import cz.seznam.euphoria.core.executor.io.SerializerFactory; import java.io.InputStream; import java.io.OutputStream; static class SparkSerializerOutput implements Output { SparkSerializerOutput(SerializationStream s) { static class SparkSerializerInput implements Input { SparkSerializerInput(Deser...
0
* Copyright (c) 2002 The Apache Software Foundation. All rights
0
URIBuilder uriBuilder = AMSPropertyProvider.getAMSUriBuilder("localhost", 8188); URIBuilder uriBuilder = AMSPropertyProvider.getAMSUriBuilder("localhost", 8188); URIBuilder uriBuilder2 = AMSPropertyProvider.getAMSUriBuilder("localhost", 8188); URIBuilder uriBuilder = AMSPropertyProvider.getAMSUriBuilder...
0
* Default type conversion. Converts among numeric types and also strings. * public class DefaultTypeConverter implements TypeConverter public Object convertValue( Map context, Object value, Class toType ) return OgnlOps.convertValue( value, toType ); public Object convertValue( Map context, Objec...
0
URL url = new URL( this.ocd.getMetadata().getSource(), iconPath );
0
System.err.println( "Usage: accumulo " + SetGoalState.class.getName() + " [NORMAL|SAFE_MODE|CLEAN_STOP]"); ZooReaderWriter.getInstance().putPersistentData( ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZMASTER_GOAL_STATE, args[0].getBytes(UTF_8), NodeExistsPolicy.OVERWRI...
0
public void testToString_InputStream() throws Exception { public void testCopy_String_Writer() throws Exception { public void testCopy_ByteArray_Writer() throws Exception { public void testToString_ByteArray() throws Exception { public void testContentEquals_Reader_Reader() throws Exception { pu...
0
byte[] row = "r".getBytes(); byte[] cf = "cf".getBytes(); byte[] cq = "cq".getBytes(); byte[] cv = "cv".getBytes();
0
import org.apache.commons.bcel6.ExceptionConst; return ExceptionConst.createExceptions(ExceptionConst.EXCS.EXCS_CLASS_AND_INTERFACE_RESOLUTION);
0
* * @version $Id$
0
public long getLastZxid() { return lastZxid; }
0
// see verifyValues: retrieve the values collection only when verifying them // this.values = getMap().values(); // bug in IBM JDK: IBM J9 VM build 2.4, JRE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260sr12-20121024_126067 // a call to values() on an empty map retrieved via TreeMap#he...
0
/** * Visitor pattern to traverse nodes in the model. * * @see ICompoundModelElement#visit(IModelWalker); * * @author dave * */ /** * Callback method providing the part of the model currently being visited. * * @param element the element being visited * * @return true to continue...
0
for (String shortMonthName : shortMonthNames) shortMonthNamesStr.append(shortMonthName);
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
* * */ // I guess this is one of the limitations of DecimalFormat // Again this is one of the limitations of DecimalFormat // * * * *
0
// if the state is already set to the desired state or state is unknown then skip it if (s != StateProvider.State.Unknown && !state.equals(getServiceState(serviceName))) { if(state.equals(getHostComponentState(hostName, componentName))) continue; if(state.equals(getHostComponentState(h...
0
import static com.google.datastore.v1.client.DatastoreHelper.makeKey; import static com.google.datastore.v1.client.DatastoreHelper.makeValue; import com.google.datastore.v1.Entity; import com.google.datastore.v1.Key; import com.google.datastore.v1.Value; .apply(DatastoreIO.v1().write().withProjectId(MoreObjects.f...
0
import org.apache.accumulo.core.security.thrift.TCredentials; private TCredentials credentials; public void init(FileSystem fs, Instance instance, TCredentials credentials, boolean noTrash) throws IOException { public GCStatus getStatus(TInfo info, TCredentials credentials) {
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 ...
0
@Override
0
private static final String ENVIRONMENT_MAJOR_VERSION = "3"; if (transform instanceof Combine.GroupedValues || transform instanceof GroupByKey) {
0
HashMap<String, Integer> existingEntries = new HashMap<String, Integer>(); Integer nv = Integer.valueOf(version); Integer existing = existingEntries.get(name); if (nv.intValue() < existing.intValue()) { iter.remove(); // removes older ...
0
private TypeDescriptor<T> typeDescriptor; * Returns a {@code TypeDescriptor<T>} with some reflective information public TypeDescriptor<T> getTypeDescriptor() { return typeDescriptor; * Sets the {@code TypeDescriptor<T>} associated with this class. Better public TypedPValue<T> setTypeDescriptorInternal(T...
0
indexMutation.put(new Text(s.description), new Text(s.sender), new Value((idString + ":" + Long.toHexString(diff)).getBytes(Constants.UTF8))); at = new PasswordToken(conf.get(p).getBytes(Constants.UTF8)); String path = zoo.putEphemeralSequential(root + "/trace-", name.getBytes(Constants.UTF8));
0
import java.nio.ByteBuffer; import java.util.Collection; import java.util.List; @Override public boolean isValidAuthorizations(String user, List<ByteBuffer> auths) throws AccumuloSecurityException { Collection<ByteBuffer> userauths = getCachedUserAuthorizations(user).getAuthorizationsBB(); for (ByteBuffe...
1
@Override
0
FieldDefinition definition = new FieldDefinition(); setupDefinition(widgetElement, definition); definition.makeImmutable(); return definition; protected void setupDefinition(Element widgetElement, FieldDefinition definition) throws Exception { super.setupDefinition(widgetElem...
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
* @version CVS $Id: EPMaxRow.java,v 1.3 2003/09/05 07:31:40 cziegeler Exp $
0
public SimpleWriteOperation createWriteOperation() {
0
import javax.xml.parsers.DocumentBuilder; DocumentBuilder builder = XMLUtils.createDocumentBuilder(false); Document document = builder.parse(sourceDocument); DocumentBuilder builder = XMLUtils.createDocumentBuilder(false); Document document = builder.parse(sourceDocument); Docume...
0
private final ContentBody body;
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkState; import org.apache.beam.vendor.guava.v20_0.com.google.common.annotations.VisibleForTesting; import org.apache.beam.vendor.guava.v20_0.com.google.common.cache.CacheBuilder; import org.apache.beam.vendor.guava.v20_0.com.googl...
0
* @throws SecurityException if a security manager is installed and the * caller does not have permission to set the default prefix JavaUtils.checkRegisterPermission();
0
package org.apache.beam.sdk.extensions.sql; .includingPackage("org.apache.beam.sdk.extensions.sql.schema", .pruningPattern("org[.]apache[.]beam[.]sdk[.]extensions[.]sql[.].*Test") .pruningPattern("org[.]apache[.]beam[.]sdk[.]extensions[.]sql[.].*TestBase");
0
= new ConcreteBufferedImageCachableRed(destBI, minX, minY);
0
log.warn("DefaultFilesystemManager.close: not all components are closed: " + components.toString());
0
"health", "http", "HTTP", "web", "admin");
0
import org.apache.ambari.view.commons.hdfs.UserService; * Checks connection to User HomeDirectory * @param context View Context */ public static void userhomeSmokeTest(ViewContext context) { try { UserService userservice = new UserService(context); userservice.homeDir(); } catch (WebAppl...
0
* */ private static final long serialVersionUID = 1L;
1
import java.util.Properties; import org.apache.cocoon.portal.PortalException; Object prepareConfiguration(Properties configuration) throws PortalException;
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
* @version $Revision$ $Date$
0
import org.apache.batik.gvt.font.DefaultFontFamilyResolver; import org.apache.batik.gvt.font.FontFamilyResolver; /** * Returns the Font Family Resolver */ public FontFamilyResolver getFontFamilyResolver() { return DefaultFontFamilyResolver.SINGLETON; }
0
if (FTPReply.SECURITY_MECHANISM_IS_OK == replyCode) { } else if (FTPReply.SECURITY_DATA_EXCHANGE_COMPLETE != replyCode) { if (FTPReply.COMMAND_OK != sendCommand( if (FTPReply.COMMAND_OK != sendCommand( if (FTPReply.COMMAND_OK == repCode) {
0
import org.apache.ambari.server.state.State; boolean isLogSearchEnabled = cluster.getServices().containsKey(LOGSEARCH_SERVICE_NAME); if (!isLogSearchEnabled) { // log search not enabled, just return null, since no helper impl is necessary return null; } ...
0
/* * Copyright 2003-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
0
Licensed 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 org.apache.avalon.framework.context.Context; * @author <a href="mailto:reinhard.at.apache.org">Reinhard P�tz</a> * @version CVS $Id: FOM_Cocoon.java,v 1.20 2003/11/24 12:12:44 antonio Exp $ private Context avalonContext; Context avalonContext, return org.mozilla.javascript.Contex...
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
* time is used as the threshold age of the files * time is used as the threshold age of the files
0
// test INIConfiguration assertEquals("Property from ini file not found", "yes", config.getString("testini.loaded"));
0
@Override public RecordReader<Key,Value> createRecordReader(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException { log.setLevel(getLogLevel(context)); return new RecordReaderBase<Key,Value>() { @Override public boolean nextKeyValue() throws IOException, Interrup...
1
import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; private boolean hasHeaderDate; if (!hasHeaderDate && "Date".equals(headerField)) { hasHeaderDate = true; } final String pattern = "EEE, dd MMM yyyy HH:mm:ss Z"; // Fri, 21 Nov 1997 09:55:06 -0600 ...
0
* @version CVS $Id$ protected String itemClassName; /** * @return Returns the itemClassName. */ public String getItemClassName() { return this.itemClassName; } /** * @param itemClassName The itemClassName to set. */ public void setItemClassName(String itemC...
0
/** * Default value of Max number of tasks to schedule in parallel for upgrades. */ @Markdown(description = "Default value of max number of tasks to schedule in parallel for upgrades. Upgrade packs can override this value.") public static final ConfigurationProperty<Integer> DEFAULT_MAX_DEGREE_OF_PARALLELIS...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/bag/AbstractMapBag.java,v 1.5 2003/12/07 01:15:36 scolebourne Exp $ * @version $Revision: 1.5 $ $Date: 2003/12/07 01:15:36 $
0
// A works-around for exception handling craziness in Sun/Oracle's SSLEngine // implementation. // // sun.security.pkcs11.wrapper.PKCS11Exception is re-thrown as // plain RuntimeException in sun.security.ssl.Handshaker#checkThrown private SSLException convert(final RuntimeException ex) throws SS...
0
* @throws Exception on error
0
log.info("Loaded native map shared library from {}", ldLibraryPath); log.debug("Trying to load native map library {}", libFile); log.info("Loaded native map shared library {}", libFile); log.debug("Native map library {} not found or is not a file.", libFile); log.info("There are {} a...
0
@DELETE @Path("databases/{database_id}") @Produces(MediaType.APPLICATION_JSON) public Response deleteDatabase(@PathParam("database_id") String databaseId) { Job job = null; try { job = proxy.deleteDatabase(databaseId, getResourceManager()); JSONObject response = new JSONObject(); respo...
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
DATA_NOT_FOUND("logsearch.error.data_not_found", "Data not found"), OPER_NOT_ALLOWED_FOR_STATE("logsearch.error.oper_not_allowed_for_state", "Operation not allowed in current state"), OPER_NOT_ALLOWED_FOR_ENTITY("logsearch.error.oper_not_allowed_for_state", "Operation not allowed for entity"), OPER_NO_PERMISSIO...
0
* @param line_number_table the line number entries for this table
0
import org.apache.cocoon.portal.profile.ProfileManager; * @version CVS $Id: DefaultCopletFactory.java,v 1.4 2003/05/27 09:15:07 cziegeler Exp $ ProfileManager profileManager = null; try { profileManager = (ProfileManager)this.manager.lookup(ProfileManager.ROLE); profileManager.r...
0
// if forcing a refresh of *, then clear out any existing // configurations so that all of the new configurations are // forcefully applied executionCommand.getConfigurations().clear();
0
import org.apache.felix.scr.impl.manager.ComponentFactoryImpl; if ( pid.equals( getComponentMetadata().getConfigurationPid() ) ) if ( pid.equals( getComponentMetadata().getConfigurationPid() ) ) /** * Compares this {@code ImmediateComponentHolder} object to another object. * * <p> ...
0
AtlasGraphUtilsV2.addToEncodedSetProperty(entityVertex, Constants.TRAIT_NAMES_PROPERTY_KEY, classificationName); AtlasGraphUtilsV2.addToEncodedListProperty(entityVertex, Constants.PROPAGATED_TRAIT_NAMES_PROPERTY_KEY, classificationName);
0
@Test public void test_location_changed_events() throws BundleException, IOException { String pid = "test_location_changed_events"; configure( pid ); delay(); configListener.assertEvents( ConfigurationEvent.CM_UPDATED, 1 ); // ensure configuration is unbound ...
0
package aQute.libg.sed; public interface Replacer { String process(String line); }
0
/** * Provides package-level access to the map of single host topology updaters. * This is useful for facilitating unit-testing of this class. * * @return the map of single host topology updaters */ static Map<String, Map<String, PropertyUpdater>> getSingleHostTopologyUpdaters() { return singleH...
0
* $todo$ implement
0
import org.mockito.ArgumentMatchers; Mockito.verify(cm, Mockito.never()).closeIdle(ArgumentMatchers.<TimeValue>any());
0
private final String userName; private final boolean isLdapUser; public UserResponse(String name, boolean isLdapUser) { this.isLdapUser = isLdapUser; @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; UserRe...
1
START, STOP, START_SUCCESS, START_FAILURE, STOP_SUCCESS, STOP_FAILURE, ROLE_STARTED
0
import java.util.Arrays; return super.isApplicable(request, Arrays.asList("YARN"), true);
0
import org.apache.accumulo.core.spi.cache.BlockCacheManager; import org.apache.accumulo.core.spi.cache.BlockCacheManager.Configuration; import org.apache.accumulo.core.spi.cache.CacheType;
0
* @version $Id: JexlTest.java,v 1.54 2004/08/20 08:22:20 dion Exp $ JexlContext jc = JexlHelper.createContext(); assertExpression(jc, "foo.bar", "123"); assertExpression(jc, "foo == \"bar\"", Boolean.TRUE); JexlContext jc = JexlHelper.createContext(); assertExpression(...
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
* An InputFormat that turns the file data ingested with {@link FileDataIngest} into an InputStream using {@link ChunkInputStream}. Mappers used with this * InputFormat must close the InputStream.
0
import org.apache.ambari.server.controller.spi.RequestStatus; public RequestStatus persist(ResourceDefinition resource) { //todo: need to account for multiple resources and user predicate return getClusterController().deleteResources(resource.getType(),
1
private final SessionOutputBuffer buffer; private final OutputStream outputStream; /** * Default constructor. * * @param buffer Session output buffer * @param outputStream Output stream */ public IdentityOutputStream(final SessionOutputBuffer buffer, final OutputStream outputStr...
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 no...
0
mgr.sessionDestroyed(session, ids);
0
import static com.google.common.base.Charsets.UTF_8; newText.append(suffix.getBytes(UTF_8), 0, suffix.length());
0
import net.jcip.annotations.NotThreadSafe; @NotThreadSafe
0
Object[] callbackInstances = getCallbackInstances(); if ((callbackInstances != null) && (m_callbackAdded != null)) { invokeCallbackMethod(callbackInstances, m_callbackAdded, reference, serviceInstance); Object[] callbackInstances = getCallbackInstances(); if ((callbackIns...
0
* * @param data the data to write * @param srcOffset the offset * @param length the length of data to write * * @throws IOException if an I/O error occurs.
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...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/plugins/PluginDeclarationRule.java,v 1.6 2003/11/16 22:37:35 rdonkin Exp $ * $Revision: 1.6 $ * $Date: 2003/11/16 22:37:35 $ public void begin(String namespace, String name, ...
0
public UninstallAction(DataInputStream in, DataOutputStream out) throws IOException super(in, out); public Void client(Long bundle) throws IOException, BundleException writeInt(UNINSTALL); writeLong(bundle); if (!checkOk()) throw new BundleException(msg); public v...
0
/* $Id$ * * 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"); ...
0
import org.junit.Assert; import org.junit.Before; import org.junit.Test; @Before public void setUp() throws Exception { @Test Assert.assertNotNull(cookies); Assert.assertEquals(1, cookies.size()); Assert.assertNotNull(cookiesupport); Assert.assertEquals("$Version=1", cookiesu...
0
public CanonicalizationException(String _msgID) { super(_msgID); public CanonicalizationException(String _msgID, Object exArgs[]) { super(_msgID, exArgs); public CanonicalizationException(String _msgID, Exception _originalException) { super(_msgID, _originalException); public Canonicalizat...
0
@Override @Override @Override @Override
0