Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
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
* 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 applic...
0
* * * Iterator itemsIterator = getUberspect().getIterator(
0
import org.apache.commons.configuration.BaseHierarchicalConfiguration; import org.apache.commons.configuration.beanutils.XMLBeanDeclaration; return new XMLBeanDeclaration( new BaseHierarchicalConfiguration(), "bean", true, Object.cl...
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
/* * 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 ...
1
import java.io.File;
0
assertEquals(AmbariMetaInfo.ANY_OS, anyOs.getOsFamily()); assertEquals("centos6", c6Os.getOsFamily());
0
* * @param <IN> the type of elements processed * @param <W> the type of windows handled * @return the window time assigner extracts timestamp from given element
0
* @author <a href="mailto:deweese@apache.org">l449433</a>
1
@Parameter(names = {"-f", "--force"}, description = "force the given server to stop by removing its lock") @Parameters(commandDescription = "stop the tablet server on the given hosts") @Parameter(description = "<host> {<host> ... }") @Parameters(commandDescription = "stop the master") static class Stop...
0
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not u...
0
Thread.currentThread().interrupt(); throw new InterruptedIOException();
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
// greedy '**' patter swallows all until last '/' and thus doesn't match assertNull(result); // greedy '**' patter swallows all until last '/' and thus doesn't match assertNull(result); // greedy '**' patter swallows all until last '/' and thus doesn't match assertNull(re...
0
* @version $Id$
0
if (conn.isOpen()) { conn.requestInput(); }
0
private static final String DOT_REPLACEMENT_CHAR = "#"; if (property.contains(DOT_REPLACEMENT_CHAR)) { property = property.replaceAll(DOT_REPLACEMENT_CHAR, "."); }
0
public ParseException(final String message) {
0
assertTrue(v1f.mkdir() || v1f.isDirectory()); assertTrue(v2f.mkdir() || v2f.isDirectory()); assertTrue(v4f.mkdir() || v4f.isDirectory());
0
import java.io.Serializable;
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 static String generateNameFromStagePayload(ExecutableStagePayload stagePayload) { StringBuilder sb = new StringBuilder(); RunnerApi.Components components = stagePayload.getComponents(); final int transformsCount = stagePayload.getTransformsCount(); sb.append("[").append(transformsCount).append...
0
sks = new KeySelectors.SecretKeySelector("secret".getBytes("ASCII"));
0
public interface CompositeRable extends FilterColorInterpolation { /** * The sources to be composited togeather. * @param srcs The list of images to be composited by the composite rule. */ /** * Set the composite rule to use for combining the sources. * @param cr Composite rule to use....
0
/** <b><i>For internal use only; no backwards-compatibility guarantees.</i></b> */ /** Returns the {@code PipelineOptions} specified with the {@link PipelineRunner}. */ /** Returns the value of the side input for the corresponding state window. */ /** Returns the window corresponding to the state. */
1
break; // satisfy Findbugs
0
Authorizations userAuthorizations = conn.securityOperations().getUserAuthorizations(opts.principal); conn.securityOperations().changeUserAuthorizations(opts.principal, new Authorizations(auths));
1
package org.apache.commons.net.ftp.ftp2.parser; * @version $Id: NTFTPEntryParser.java,v 1.11 2004/06/29 04:54:29 dfs Exp $
0
* $Header: /cvshome/build/org.osgi.service.http/src/org/osgi/service/http/HttpService.java,v 1.13 2006/07/12 21:22:13 hargrave Exp $ * Copyright (c) OSGi Alliance (2000, 2006). All Rights Reserved. import java.util.Dictionary; * @version $Revision: 1.13 $ * "unget"s the Http Service without calling {@link #unregi...
0
package com.google.cloud.dataflow.sdk.runners.inprocess; class UnboundedReadEvaluatorFactory implements TransformEvaluatorFactory {
0
String uniqPropName = ctx.getAttribute() != null ? ctx.getAttribute().getVertexUniquePropertyName() : null; if (uniqPropName != null) { if (AtlasGraphUtilsV2.getState(ctx.getReferringVertex()) == DELETED) { ctx.getReferringVertex().removeProperty(uniqPropName); }...
0
* Define the {@code exitValue} of the process to be considered * Define a list of {@code exitValue} of the process to be considered * Checks whether {@code exitValue} signals a failure. If no * @return {@code true} if {@code exitValue} signals a failure
0
import org.apache.http.util.TextUtils; public void parse( final SetCookie cookie, final String value) throws MalformedCookieException { cookie.setPath(!TextUtils.isBlank(value) ? value : "/");
0
* @version $Revision$
1
import org.apache.beam.vendor.grpc.v1p13p1.io.grpc.ClientInterceptor; import org.apache.beam.vendor.grpc.v1p13p1.io.grpc.ManagedChannel; import org.apache.beam.vendor.grpc.v1p13p1.io.grpc.ManagedChannelBuilder; import org.apache.beam.vendor.grpc.v1p13p1.io.grpc.netty.NettyChannelBuilder; import org.apache.beam.vendor.g...
0
@Override public String toString() { return super.toString() + "[" + wrappedEntity + "]"; }
0
public Coder<String> getOutputCoder() {
0
public int m_modified = 0; @SuppressWarnings("unused") private void modified( ComponentContext context ) { setConfig( context.getProperties() ); m_modified++; }
0
/* * Copyright 2000-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 applic...
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 net.jcip.annotations.Immutable; @Immutable
0
import java.util.Map; import org.apache.ambari.server.state.Host; private void setOsFamily(Host host, String osFamily, String osVersion) { Map<String, String> hostAttributes = new HashMap<String, String>(); hostAttributes.put("os_family", osFamily); hostAttributes.put("os_release_version", osVersion); ...
0
import java.sql.SQLException; import java.util.Properties; import org.apache.commons.lang.BooleanUtils; import org.apache.cocoon.util.AbstractLogEnabled; private String url; private Properties properties; private boolean multipleResults; return query;
0
import com.twitter.aurora.scheduler.storage.entities.IQuota; private static final IQuota QUOTA = IQuota.build(new Quota(1, 1, 1)); thrift.setQuota(USER, QUOTA.newBuilder(), new SessionKey().setData(user.getBytes())) .getResponseCode());
0
import static org.apache.mesos.Protos.TaskStatus.Reason.REASON_RECONCILIATION; private static void logStatusUpdate(Logger logger, TaskStatus status) { // Periodic task reconciliation runs generate a large amount of no-op messages. // Suppress logging for reconciliation status updates by default. Level lev...
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
* Copyright 2016 Seznam.cz, a.s.
0
return metaStore(metaStore, false); public BeamSqlCli metaStore(MetaStore metaStore, boolean autoLoadUdfUdaf) {
0
RepaintThread t = panel.getRepaintThread(); if (!t.isAlive()) { t.start(); } else { t.safeResume(); } panel.getRepaintThread().safeSuspend(); panel.getRepaintThread().safeResume(); p...
0
import org.apache.ambari.view.commons.exceptions.NotFoundFormattedException; import org.apache.ambari.view.commons.exceptions.ServiceFormattedException; import org.apache.ambari.view.commons.hdfs.HdfsService; public class FilePreviewService extends HdfsService {
0
migrationresult.setFlag(0);
0
package org.apache.beam.examples.snippets;
0
import javax.annotation.Nullable; private <T> void runTestRead(@Nullable final String applyName, applyName == null ? pipeline.apply(read) : pipeline.apply(applyName, read); // test read using generated class null, generatedClass ...
0
* responsible for creating and maintaining an appropriate object
1
throws IOException if (read == -1) { // EOF break; } Set<Node> nodeSet = new HashSet<Node>(); while (i.hasNext()) { Node n = i.next(); nodeSet.add(n); // insert attributes nodes to comply with XPath if (n.get...
1
import static org.apache.ambari.server.configuration.Configuration.JDBC_IN_MEMORY_URL; import static org.apache.ambari.server.configuration.Configuration.JDBC_IN_MEMROY_DRIVER; import static org.easymock.EasyMock.capture; import static org.easymock.EasyMock.createMock; import static org.easymock.EasyMock.expect; import...
1
private static final Map /* <Key, Method> */ m_methodCache; static { int size = 2048; try { String value = System.getProperty(DependencyManager.METHOD_CACHE_SIZE); if (value != null) { size = Integer.parseInt(value); } } catch (...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/buffer/UnboundedFifoBuffer.java,v 1.2 2003/12/28 16:36:48 scolebourne Exp $ * @since Commons Collections 3.0 (previously in main package v2.1) * @version $Revision: 1.2 $ $Date: ...
0
import javax.annotation.PostConstruct; @PostConstruct @Override
0
DataSource newDataSource; gop.setSoftMinEvictableIdleTimeMillis(softMinEvictableIdleTimeMillis);
0
Collection<String> components = group1.getComponentNames(); components = group2.getComponentNames();
0
@SuppressWarnings("ClassCanBeStatic") // Converting class to static is an API change.
0
/** * Generated serial version ID. */ private static final long serialVersionUID = -1772433262105175184L;
0
import java.util.HashMap; import java.util.Map; import java.util.Set; case HostComponentProcess: resourceDefinition = new HostComponentProcessResourceDefinition(); break;
0
private static final String[] AUTH_CACHEABLE_PARAMS = { "s-maxage", HeaderConstants.CACHE_CONTROL_MUST_REVALIDATE, HeaderConstants.PUBLIC }; if (authNHeaders != null && authNHeaders.length > 0 && !hasCacheControlParameterFrom(response, AUTH_CACHEABLE_PARAMS)) { ...
0
import static java.util.stream.Collectors.toList; import java.util.ArrayList; import org.apache.beam.sdk.metrics.MetricKey; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList; private static final String ILLEGAL_CHARACTERS = "[^A-Za-z0-9-]"; MetricKey key = metricResult.getKey(); ...
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
public class InMemoryStateInternals<K> implements StateInternals { protected final StateTable inMemoryState = new StateTable() { protected StateBinder binderForNamespace(StateNamespace namespace, StateContext<?> c) { return new InMemoryStateBinder(c); public <T extends State> T state(StateNamespace namesp...
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
import java.util.Collections; import java.util.Map; import static org.easymock.EasyMock.anyLong; private Clusters clusters = null; private Cluster cluster = null; clusters = createStrictMock(Clusters.class); cluster = createStrictMock(Cluster.class); Request request = createNiceMock(Request.class); ...
1
import org.apache.sshd.common.RuntimeSshException; } catch (Throwable e) { try { if ((factory == null) || (filter == null) || (!filter.canForwardAgent(session))) { if (log.isDebugEnabled()) { log.debug("handleAgentForwarding(" + this + ")[haveFactory="...
0
protected List parseSubstitutions(Reader in) throws Exception {
0
String keytabFileGroupAccess, String keytabFileCanCache) keytabFileCanCache); KEYTAB_FILE_IS_CACHABLE);
0
package aQute.bnd.build; import java.io.*; import java.util.*; public abstract class ProjectTester { final Project project; final Collection<Container> testbundles; final ProjectLauncher launcher; final List<String> tests = new ArrayList<String>(); File reportDir; boolean continuous = true; ...
0
public class SigilLibraryPage extends WizardPage implements IClasspathContainerPage { public SigilLibraryPage() { public void createControl( Composite parent ) { setTitle( "Sigil Library" ); Label label = new Label( parent, SWT.NONE ); label.setText( "Press Finish to add the ...
0
import org.apache.ambari.server.controller.internal.TemporalInfoImpl; import org.apache.ambari.server.controller.spi.TemporalInfo; public Map<PropertyId, TemporalInfo> getFields() { Map<PropertyId, TemporalInfo> mapProperties; mapProperties = Collections.emptyMap(); Set<String> setMatches = new HashSe...
0
SSLUtil.ensureStorePasswords(); SSLUtil.loadKeystore(); LOG.debug("============================Server Dump======================================="); LOG.debug("=============================================================================="); String errorMessage = "Web Resource Folder " + WEB_RESOURC...
0
import org.apache.commons.collections.AbstractObjectTest; public class TestIdentityMap<K, V> extends AbstractObjectTest {
0
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.TimelineMetricStore; import org.apache.hadoop.yarn.webapp.GenericExceptionHandler; import org.apache.hadoop.yarn.webapp.WebApp; import org.apache.hadoop.yarn.webapp.YarnJacksonJaxbJsonProvider; public class AMSWebApp extends WebApp implemen...
0
WindowingStrategy<?, IntervalWindow> windowingStrategy = WindowingStrategy.of(SlidingWindows.of(Duration.millis(20)).every(Duration.millis(10))) .withOutputTimeFn(OutputTimeFns.outputAtEarliestInputTimestamp()); window(0, 15).maxTimestamp().getMillis(), // aggregate timestamp ...
0
private static class SimpleService implements HttpRequestHandler {
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
assertEquals("Result is wrong", new Integer(10), o); assertEquals("Result is wrong", new Integer(512), o); assertEquals("x is wrong", new Integer(10), jc.getVars().get("x")); assertEquals("y is wrong", new Integer(512), jc.getVars().get("y"));
0
if (args != null) { for (int i = 0; i < args.length; i++) { result += args[i] != null ?args[i] : -100; } } else { result = -1000; result += args[i] != null ?args[i] : -100; } else { ...
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger log = LoggerFactory.getLogger(VolumeManagerImpl.class); log.debug("Exception", ex); // ACCUMULO-3651 Changed level to error and added FATAL to message for slf4j compatibility log.error("FATAL {}", msg);
0
*/ public void parse(final SetCookie cookie, String value) public void validate(final Cookie cookie, final CookieOrigin origin) "Illegal path attribute \"" + cookie.getPath()
0
* * <h3>Streaming Support</h3> * * <p>{@link SpannerIO.Write} currently does not support unbounded writes hence should not be used * as a sink for streaming pipelines.
0
import org.apache.cocoon.ProcessingException; * @version CVS $Id: MountNode.java,v 1.12 2004/03/10 14:18:01 stephan Exp $ if (resolvedSource.length()==0) throw new ProcessingException("Source of mount statement is empty"); TreeProcessor processor = getProcessor(resolvedSource); ...
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
expect(conn.createBatchScanner(MetadataTable.NAME, Authorizations.EMPTY, 4)).andReturn(bs); expect(conn.createBatchScanner(MetadataTable.NAME, Authorizations.EMPTY, 4)).andReturn(bs); expect(conn.createBatchScanner(MetadataTable.NAME, Authorizations.EMPTY, 4)).andReturn(bs); expect(conn.createBatchScann...
0
shutdownRegistry.addAction(EasyMock.<ExceptionalCommand<?>>capture(shutdownCommand));
0
import org.apache.ambari.server.H2DatabaseCleaner; import org.junit.AfterClass; @AfterClass public static void tearDown() throws AmbariException, SQLException { H2DatabaseCleaner.clearDatabaseAndStopPersistenceService(injector);
0
processServiceComponentHosts(cluster, kerberosDescriptor, schToProcess, identityFilter, dataDirectory, kerberosConfigurations, true);
0
private static final List<List<Integer>> TEST_VALUES = Arrays.asList( Collections.emptyList(), CoderProperties.coderDecodeEncodeContentsInSameOrder( CoderProperties.coderDecodeEncodeEqual(coder, list); CoderProperties.coderDecodeEncodeEqual(coder, list); CoderProperties.coderDecodeEncodeEqual(...
0
import java.util.Set; import org.apache.ambari.server.RoleCommand; import com.google.common.collect.ImmutableSet; START { @Override public Set<RoleCommand> tasksToAbortOnFailure() { return ImmutableSet.of(RoleCommand.START); } }, ; private static Set<RoleCommand> ALL_TASKS ...
0
Assert.assertTrue(newEnhancedProperty.getPropertyValueAttributes().getEntries().isEmpty()); // Assert.assertNull(newEnhancedProperty.getPropertyValueAttributes().getEntryDescriptions()); // Assert.assertNull(newEnhancedProperty.getPropertyValueAttributes().getEntryLabels());
0
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * v...
0
import org.apache.htrace.HTraceConfiguration;
0
/** * Copyright 2013 Apache Software Foundation
0