Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
public FileCleanerTestCase(String name) {
0
private volatile long lastTimeoutCheckMillis; final long selectTimeoutMillis = this.reactorConfig.getSelectIntervalMillis(); final int readyCount = this.selector.select(selectTimeoutMillis); final long currentTimeMillis = System.currentTimeMillis(); if( (currentTimeMillis - this....
0
* @version CVS $Id: HTMLEventLinkTransformer.java,v 1.3 2004/03/11 09:44:02 cziegeler Exp $ if ( "a".equals(name) || "form".equals(name) ) {
0
import static java.nio.charset.StandardCharsets.UTF_8; import java.util.Collections; import org.apache.accumulo.core.Constants; // want the instance id to be stable for the life of this instance object, // so only get it once String instanceNamePath = Constants.ZROOT + Constants.ZINSTANCES + "/" + ins...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/xml/Attic/ParseTag.java,v 1.2 2002/02/12 21:34:34 jstrachan Exp $ * $Revision: 1.2 $ * $Date: 2002/02/12 21:34:34 $ * $Id: ParseTag.java,v 1.2 2002/02/12 21:34:34 jstrachan Exp $ impor...
0
import org.apache.commons.configuration.tree.DefaultConfigurationNode; public void testSetRootNode() { config.setRootNode(new DefaultConfigurationNode("testNode")); assertNotSame("Same root node", config.getRootNode(), config.getRoot()); assertEquals("Wrong name of root node", "testNode"...
0
* Constructs a new <code>PixelToMMTest</code>. * Creates the <code>TranscoderInput</code>.
0
private ConcurrentMap<String, String> systemNameToComputationIdMap; this.systemNameToComputationIdMap = new ConcurrentHashMap<>(); String computationId = systemNameToComputationIdMap.containsKey(mapTask.getSystemName()) ? systemNameToComputationIdMap.get(mapTask.getSystemName()) ...
0
if ((backgroundRenderThread != null) && (backgroundRenderThread.isAlive())) { backgroundRenderThread.interrupt(); } clearBuffer(w, h); // BUG: something is not initialized or // got destroyed in the interr...
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
switch (userAuth.next(null)) { case Success: authFuture.setAuthed(true); username = userAuth.getUsername(); authed = true; setState(State.Running); break; case Failure: ...
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
* Implementation of <code>SVGContext</code> for if (info.glyphIndexStart == info.glyphIndexEnd) { if (it.isGlyphVisible(info.glyphIndexStart)) { b = it.getGlyphCellBounds(info.glyphIndexStart); } for (int k = info.glyphIndexStart; k <= info.glyphIndexEnd;...
0
ITaskConfig newTask = buildScheduledTask(0, 5).getAssignedTask().getTask(); assertResponse(OK, thrift.startJobUpdate(request, SESSION));
0
import org.apache.beam.sdk.values.KV; final PCollection<KV<String, Long>> pCollection = .containsInAnyOrder(KV.of("A", 3L), KV.of("B", 1L), KV.of("C", 2L), KV.of("X", 1L));
0
// Follow this Vertex's edges if this isn't the last level of depth if (counter < max) { while (edgeIterator != null && edgeIterator.hasNext()) { Edge edge = edgeIterator.next(); String label = edge.getLabel(); Map<String,String> ...
0
package aQute.libg.reporter; import java.util.*; public interface Reporter { void error(String s, Object ... args); void warning(String s, Object ... args); void progress(String s, Object ... args); void trace(String s, Object ... args); List<String> getWarnings(); List<String> getErrors(); boolean isPedant...
0
import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; private static final Cache<String, Throwable> exceptionsCache = CacheBuilder.newBuilder() .expireAfterWrite(5, TimeUnit.MINUTES) .build(); protected static String logException(final Throwable throwable) { fin...
0
import org.apache.accumulo.core.clientImpl.ClientContext;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/PropertyUtils.java,v 1.26 2002/07/07 23:08:41 craigmcc Exp $ * $Revision: 1.26 $ * $Date: 2002/07/07 23:08:41 $ * @version $Revision: 1.26 $ $Date: 2002/07/07 23:08:41 $ Map...
0
/** Retrieve settings of this flow. */
0
private MetricsMap<MetricName, GaugeCell> gauges = new MetricsMap<>(new MetricsMap.Factory<MetricName, GaugeCell>() { @Override public GaugeCell createInstance(MetricName unusedKey) { return new GaugeCell(); } }); /** * Return the {@link DistributionCell} that shoul...
0
String basedir = System.getProperty("basedir"); String file = "file:" + basedir + "/build.xml"; uriAttr.setValue(file); ResourceResolver res = ResourceResolver.getInstance(uriAttr, file);
0
import java.io.Serializable; * @throws NullPointerException if either argument is null throw new NullPointerException("Predicate must not be null"); throw new NullPointerException("Transformers must not be null"); * @throws NullPointerException if either argument is null t...
0
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
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 ...
0
* @version CVS $Id: AbstractStreamSource.java,v 1.5 2004/02/28 04:17:50 antonio Exp $ m.invoke(xhtmlconvert, new Object[] { Boolean.TRUE }); m.invoke(xhtmlconvert, new Object[] { Boolean.TRUE }); m.invoke(xhtmlconvert, new Object[] { Boolean.FALSE });
0
private static final String PROP_DIRECTORY = "configurator.binaries"; // JSON or URLs ? if ( !initial.trim().startsWith("{") ) { // JSON
0
/* $Id: LogUtils.java,v 1.7 2004/05/10 06:36:38 skitching Exp $ * Copyright 2004 The Apache Software Foundation.
0
import java.util.List; import org.apache.http.nio.reactor.IOReactorException; assertTrue(ex instanceof IOReactorException); assertNotNull(ex.getCause()); assertTrue(ex.getCause() instanceof IllegalStateException); List<ExceptionEvent> auditlog = this.server.getAuditLog(); ...
0
/* * Copyright (C) 2014 Google Inc. * * 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 ...
0
BasicHttpRequest request = new BasicHttpRequest("GET", host, targets[i]);
0
private Collection<ComponentConfigMappingEntity> configMappingEntities; @OneToMany(mappedBy = "serviceComponentDesiredStateEntity") public Collection<ComponentConfigMappingEntity> getComponentConfigMappingEntities() { return configMappingEntities; } public void setComponentConfigMappingEntities(Collec...
0
public class ResourceAdapterServiceImpl extends FilterService { private Object m_callbackInstance = null; private String m_callbackChanged = "changed"; public ResourceAdapterServiceImpl(DependencyManager dm, String resourceFilter, boolean propagate, Object callbackInstance, String callbackChanged) { ...
0
import java.io.IOException;
0
@Test(enabled = false) @BeforeClass(enabled = false) @Test(enabled=false)
0
Table.ID tableId = Table.ID.of(conn.tableOperations().tableIdMap().get(tableName)); Table.ID tableId = Table.ID.of(conn.tableOperations().tableIdMap().get(tableName));
1
PCollectionList.of(pcol1).and(pcol2).apply(Flatten.pCollections());
0
@Override public String getMask() { return mask; }
0
package org.apache.http.impl.client.integration; import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.impl.client.TargetAuthenticationStrategy; public class TestClientAuthentication extends IntegrationTestBase { startServer(); ...
0
if (!saslEnabled()) {
0
import org.apache.hc.core5.util.Timeout; private final Timeout socketTimeout; protected EndpointDetails(final SocketAddress remoteAddress, final SocketAddress localAddress, final Timeout socketTimeout) { this.socketTimeout = socketTimeout; public Timeout getSocketTimeout() { return socketTim...
0
import java.util.HashMap; import java.util.Map; import org.apache.ambari.server.api.resources.ResourceInstance; import org.apache.ambari.server.controller.spi.Resource; import org.apache.ambari.server.orm.entities.ViewInstanceEntity; import org.apache.ambari.server.security.authorization.AuthorizationException; import...
0
import org.apache.xml.security.utils.resolver.ResourceResolverContext; public XMLSignatureInput engineResolveURI(ResourceResolverContext context) Document doc = context.attr.getOwnerElement().getOwnerDocument(); if (context.uriToResolve.equals("")) { String id = context.uriToResolve.sub...
0
log.debug("Iterator options: " + iterOpts); log.debug("Loading " + iterInfo.className + " " + iterInfo.iterName + " " + iterInfo.priority);
0
import org.apache.http.client.config.AuthSchemes; import org.apache.http.client.config.RequestConfig; RequestConfig config = RequestConfig.custom() .setTargetPreferredAuthSchemes(Arrays.asList(AuthSchemes.BASIC)) .build(); context.setAttribute(ClientContext.REQUEST_CONFIG, confi...
0
* listing and converting that information into an * <a href="org.apache.commons.net.ftp.FTPFile.html"> FTPFile </a> instance. * @version $Id: FTPFileEntryParser.java,v 1.2 2002/04/30 13:59:42 brekke Exp $
0
import static org.apache.commons.beanutils.BeanUtils.setProperty; import static org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor; PropertyDescriptor desc = getPropertyDescriptor( top, actualName ); setProperty( top, actualName, actualValue );
0
import org.apache.sshd.common.PropertyResolverUtils; this.pool = new LinkedBlockingQueue<>(PropertyResolverUtils.getIntProperty(session, POOL_SIZE_PROP, DEFAULT_POOL_SIZE));
0
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * *...
0
validateArgumentCount(arguments, tableOp, 1); validateArgumentCount(arguments, tableOp, 2); validateArgumentCount(arguments, tableOp, 1); validateArgumentCount(arguments, tableOp, 2); validateArgumentCount(arguments, tableOp, 2); validateArgumentCount(arguments, tableOp, ...
0
/** Expressions implementing array operations. */
0
ViewInstanceEntity persistedInstance = mergeViewInstance(instanceEntity, viewEntity.getResourceType()); String viewName = view.getName(); ViewEntity persistedView = viewDAO.findByName(viewName); // create an admin resource type to represent this view ResourceTypeEntity resourceTyp...
0
Assert.assertTrue(capturedCRProperties.containsKey("create_ambari_principal")); } else if ("create_ambari_principal".equals(property)) { Assert.assertEquals(property, propertiesKerberosEnv.get(property), "false"); Assert.assertTrue(capturedCRProperties.containsKey("create_ambari_principal")); ...
0
ImmutableList.<HierarchicalTypeDefinition<ClassType>>of(classDef)); public EnumType defineEnumType(String name, EnumValue...values) throws MetadataException { assert name != null; if (types.containsKey(name)) { throw new MetadataException(String.format("Redefinition of ty...
0
private static boolean matchIdentity(final String host, final String identity, final boolean strict) { if (host == null) { return false; } final String normalizedHost = host.toLowerCase(Locale.ROOT); final String normalizedIdentity = identity.toLowerCase(Locale.ROOT); ...
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 applic...
0
package org.apache.accumulo.monitor.rest.trace;
0
import org.apache.ambari.server.api.services.AmbariMetaInfo; * Gets a list of stacks which are between the current stack version and the * target stack version inclusive. For example, if upgrading from HDP-2.2 to * HDP-2.4, this should include HDP-2.3 and HDP-2.4. * <p/> * This method is used to combine ...
0
public PCollection<T> expand(PCollection<T> input) {
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
/** If set, the snapshot from which the job should be created. */ @Hidden @Experimental @Description("If set, the snapshot from which the job should be created.") String getCreateFromSnapshot(); void setCreateFromSnapshot(String value);
0
if (waitTillSuspended) { while (state == SUSPENDING) { try { stateLock.wait(); } catch(InterruptedException ie) { } } }
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 com.google.common.base.Preconditions;
0
final ServletInfo info = new ServletInfo("test", "/test", Collections.<String, String> emptyMap()); final ServletInfo info1 = new ServletInfo("test", "/test", Collections.<String, String> emptyMap()); final ServletInfo info2 = new ServletInfo("test", "/test", Collections.<String, String> emptyMa...
0
Option oopt = new Option("o", false, "Use HTTP/S 1.0"); oopt.setRequired(false); Option topt = new Option("t", true, "Client side socket timeout (in ms) - default 60 Secs"); topt.setRequired(false); topt.setArgName("socket-Timeout"); "header lines. (repeatable as -H...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/MapIterator.java,v 1.5 2004/01/05 21:37:13 scolebourne Exp $ * Copyright (c) 2003-2004 The Apache Software Foundation. All rights * @version $Revision: 1.5 $ $Date: 2004/01/05 2...
0
public FileBasedReader<String> createSingleFileReader(PipelineOptions options) { Reader<String> reader = source.createReader(options); try (BoundedSource.BoundedReader<String> reader = source.createReader(null)) {
0
import java.util.ArrayList; import java.util.List; public class TraceList { public String id; public Long start; public List<TraceInformation> traces; public TraceList() { traces = new ArrayList<>(); public TraceList(String id) { this.id = id; this.traces = new ArrayList<>(); public void addTrac...
0
/** * Update stacks from the files at stackRoot. * * @return a track action response * @throws AmbariException if */ public RequestStatusResponse updateStacks() throws AmbariException;
0
* @param url the java.net.URL class we reference.
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.beam.sdk.extensions.euphoria.beam.window.WindowingUtils;
0
import java.util.Iterator; import java.util.Objects; import java.util.function.Predicate; /** * @since 4.4 */ @Override public boolean removeIf(final Predicate<? super C> filter) { if (Objects.isNull(filter)) { return false; } boolean changed = false; fi...
0
import org.apache.felix.dm.annotation.api.Property; @Service(properties={@Property(name="language", value="fr")})
0
* @version $Revision$ $Date$
0
import org.apache.beam.sdk.schemas.Schema.FieldType; FieldType keyDescriptor = sourceSchema.getField(refIndexKey).getType(); CalciteUtils.toSqlTypeName(keyDescriptor), FieldType valueDescriptor = sourceSchema.getField(refIndexValue).getType(); CalciteUtils.toSqlTypeName(v...
0
for (final String protocol: protocols) { for (final String cipher: ciphers) {
0
protected FileSystem createFileSystem(final FileName name, final FileObject file, final FileSystemOptions fileSystemOptions)
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
import org.apache.http.util.Args; Args.notNull(host, "HTTP host"); Args.notNull(host, "HTTP host"); Args.notNull(host, "HTTP host");
0
"enabledServices", protected List<String> enabledServices = null; * @return the enabledServices public List<String> getEnabledServices() { return enabledServices; * @param enabledServices the enabledServices to set public void setEnabledServices(List<String> enabledServices) { ...
0
public void testWithNamespace() throws IOException, XmlPullParserException { String empty = "<metatype:MetaData xmlns:metatype=\"http://www.osgi.org/xmlns/metatype/v1.0.0\" " + "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ></metatype:MetaData>"; MetaData mti = read( empty )...
0
private transient final Log log = LogFactory.getLog(getClass()); this.log.debug("User credentials not available"); if (this.log.isErrorEnabled()) { this.log.error("Authentication error: " + ex.getMessage());
0
pkgs = new ExportedPackage[exporters.length];
0
* Copyright 2002-2006 The Apache Software Foundation. * * * /** text of the script. */ /** syntax tree. */ /** * Create a new Script from the given string and parsed syntax. * @param scriptText the text of the script. * @param scriptTree the parsed script. */ * @return the value...
0
ApproximateQuantilesCombineFn<T, Top.Natural<T>> create(int numQuantiles) { return create(numQuantiles, new Top.Natural<T>());
0
* Parent element. /** * Is the visit annotation a class annotation? */ private boolean m_classAnnotation; * Metadata collector. * @param elem the parent element * @param collector the metadata collector * @param root is the annotation a root * @param clazz the annota...
0
* @version CVS $Id: LogicsheetCodeGenerator.java,v 1.1 2004/03/10 12:58:04 stephan Exp $
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
Connector conn = WalkingSecurity.get(state).getSystemConnector(); String tableName = WalkingSecurity.get(state).getTableName(); boolean exists = WalkingSecurity.get(state).getTableExists(); boolean hasPermission = WalkingSecurity.get(state).canCreateTable(WalkingSecurity.get(state).getSysAuthInfo()); ...
1
package org.apache.hc.core5.http.impl.nio;
1
delegate.setUser("userName"); final Connection conn1 = ds.getConnection("userName", "password"); final Connection conn2 = ds.getConnection("userName", "password"); final Connection conn3 = ds.getConnection("userName", "password"); final UserPassKey key = new UserPassKey("userName", ...
0
"dataflow.gcr.io/v1beta3/beam-java-batch:beam-master-20160926"; "dataflow.gcr.io/v1beta3/beam-java-streaming:beam-master-20160926";
0
import org.apache.http.HttpResponse; class ResponseEntityProxy extends HttpEntityWrapper implements EofSensorWatcher { private final ConnectionHolder connHolder; public static void enchance(final HttpResponse response, final ConnectionHolder connHolder) { final HttpEntity entity = response.getEntity(); ...
0
@Test public void testTANH() throws Exception { Schema resultType = Schema.builder().addNullableField("field", Schema.FieldType.DOUBLE).build(); Row resultRow1 = Row.withSchema(resultType).addValues(Math.tanh(1.0)).build(); String sql1 = "SELECT TANH(CAST(1.0 as DOUBLE))"; PCollection<Row> result1 ...
0
* Accumulo was the same as Property.INSTANCE_DFS_DIR. If any other HDFS directory was used, any interactions with the table would fail because the relative * path in the metadata table (created by the ImportTable process) would be converted to a non-existent absolute path.
0
ZipFile zip; ZipEntry entry; long lastModified; String extra; ZipResource(ZipFile zip, ZipEntry entry, long lastModified) throws UnsupportedEncodingException { this.zip = zip; this.entry = entry; this.lastModified = lastModified; byte[] data = entry.getExtra(); if (data != null) this.extra = new St...
0
String pythonCmd = configs.getProperty(Configuration.AMBARI_PYTHON_WRAP_KEY); commandParams.put("output_file", componentName + "-configs" + Configuration.DEF_ARCHIVE_EXTENSION); String cmd = pythonCmd + " " + commandScriptAbsolute + " generate_configs " + jsonFileName.getAbsolutePath() + " " +
0