Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
public class BaseManagementPlugin { protected BaseManagementPlugin() { public void setBundleContext( BundleContext bundleContext ) { public void setLogger( Logger log ) { protected BundleContext getBundleContext() { protected Logger getLog() { protected StartLevel ...
0
import org.apache.batik.ext.awt.image.GraphicsUtil; import org.apache.batik.ext.awt.image.rendered.DisplacementMapRed8Bit; float scaleX = (float)(scale*atScaleX); float scaleY = (float)(scale*atScaleY); // if ((scaleX > 255) || (scaleY > 255)) { // System.out.println("Scales: [" + scal...
0
import org.apache.beam.sdk.util.GcsUtil; import org.apache.beam.sdk.util.GcsUtil.GcsUtilFactory; private final GcsUtil gcsUtil; gcsUtil = new GcsUtilFactory().create(options); gcsUtil.copy(srcFilenames, destFilenames); gcsUtil.remove(filenames);
0
import java.nio.charset.StandardCharsets; import org.apache.hc.core5.http.entity.ContentType; import org.apache.hc.core5.http.message.BasicNameValuePair; .setCharset(StandardCharsets.UTF_8) Assert.assertEquals(StandardCharsets.UTF_8, entity.getMultipart().charset); .setCharset(St...
0
import org.apache.hc.core5.pool.ConnPoolPolicy; private ConnPoolPolicy connPoolPolicy; * Assigns {@link ConnPoolPolicy} instance. */ public final H2RequesterBootstrap setConnPoolPolicy(final ConnPoolPolicy connPoolPolicy) { this.connPoolPolicy = connPoolPolicy; return this; } ...
0
import java.util.Optional;
0
import org.apache.ambari.server.events.ServiceCredentialStoreUpdateEvent; @Subscribe public void onServiceCredentialStoreUpdate(ServiceCredentialStoreUpdateEvent serviceCredentialStoreUpdateEvent) throws AmbariException { Cluster cluster = m_clusters.get().getCluster(serviceCredentialStoreUpdateEvent.getCluste...
0
@ManyToMany
0
private static final OptionBuilder instance = new OptionBuilder();
0
import org.apache.beam.sdk.transforms.windowing.BoundedWindow; import org.apache.beam.sdk.util.SideInputReader; import org.apache.beam.sdk.values.PCollectionView;
0
package org.apache.batik.svggen; * @see org.apache.batik.svggen.SVGLinearGradient * @see org.apache.batik.svggen.SVGTexturePaint * @see org.apache.batik.svggen.SVGDescriptor
0
* Sets the DomTreeManager this image handler may need to void setDOMTreeManager(DOMTreeManager domTreeManager); Element createElement(SVGGeneratorContext generatorContext); AffineTransform handleImage(Image image, Element imageElement, AffineTransform handleImage(RenderedImage image, Element imageE...
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
implements RoleMatcher { public MultipleRoleMatcher(String roles) { while (tokenizer.hasMoreTokens()) { public boolean matches(User user) { for (int i = 0; i < length; i++) { if (!user.hasRole(this.roles[i])) { } }
0
Response response2 = fileService.getFile(filePath, 0L, null); Response response = fileService.getFile(filePath, 0L, null); response = fileService.getFile(filePath, 1L, null); response = fileService.getFile(filePath, 2L, null); fileService.getFile(filePath, 3L, null); Response response = fileServ...
0
* @param user the user making the change for audit purposes * @return <code>true</code> if the config was added, or <code>false</code> * if the config is already set as the current public boolean addDesiredConfig(String user, Config config);
0
import org.apache.beam.sdk.extensions.sql.impl.rule.BeamJoinAssociateRule; import org.apache.beam.sdk.extensions.sql.impl.rule.BeamJoinPushThroughJoinRule; import org.apache.calcite.rel.rules.JoinCommuteRule; JoinCommuteRule.INSTANCE, BeamJoinAssociateRule.INSTANCE, BeamJoinPushThroughJoin...
0
solrAliasDao.setupAlias(getSolrClient(), solrAuditLogPropsConfig); solrSchemaFieldDao.auditCollectionSetUp();
0
// clear out the data in options in case it's been used before (CLI-71) for (Iterator it = options.helpOptions().iterator(); it.hasNext();) { Option opt = (Option) it.next(); opt.clearValues(); } }
0
* Shows an alert dialog box. */ void showAlert(String message); /** * Shows a prompt dialog box. */ String showPrompt(String message); /** * Shows a prompt dialog box. */ String showPrompt(String message, String defaultValue); /** * Shows a confirm dialog bo...
0
import com.google.inject.assistedinject.Assisted;
0
private final HashMap parameters = new HashMap(); return this.parameters.get(name); * @param names array of parameter names /** * Is the parameter set? * <p> * Uses {@link #getParameter(String)} (which is overrideable) to * fetch the parameter value, if any. * <p> * Al...
0
import java.awt.Shape; import java.lang.ref.SoftReference; import org.apache.batik.ext.awt.geom.SegmentList; protected SoftReference bboxShape = null; protected Rectangle2D bbox = null; Shape s = node.getOutline(); if ((bboxShape != null) && (s == bboxShape.get())) return bbox; ...
0
private final Set<AbstractSession> sessions = new CopyOnWriteArraySet<>();
0
private long entrySize; final long numToSkip = entrySize - entryOffset; // Use our internal skip to move to the end of the current entry longSkip(numToSkip); entrySize = currEntry.getSize(); long remaining = entrySize - entryOffset; if(remai...
0
byte[] bytes = text.getBytes("US-ASCII");
0
if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) { ...
0
private final boolean chunking; TestRequestHandler() { this(false); } TestRequestHandler(boolean chunking) { super(); this.chunking = chunking; } entity.setChunked(this.chunking);
0
import org.apache.cocoon.woody.event.ValueChangedListener; } else if (listenerClass == ValueChangedListener.class) {
0
import java.util.Collections; import java.util.List; context.append("="); @Override public List<GroovyExpression> getChildren() { return Collections.singletonList(value); } @Override public GroovyExpression copy(List<GroovyExpression> newChildren) { assert newChildren.size(...
0
* "License"); you may not use this file except in compliance * distributed under the License is distributed on an "AS IS" BASIS,
0
* @param buffer The request {@link Buffer} * @throws Exception If failed to process the request
0
private static final Logger log = Logger.getLogger(DefaultSecretKeyEncryptionStrategy.class); private Map<String,String> context; public SecretKeyEncryptionStrategyContext encryptSecretKey(SecretKeyEncryptionStrategyContext context) { Map<String,String> cryptoContext = context.getContext(); ...
0
import org.apache.felix.dm.Dependency; import org.apache.felix.dm.Service; import org.apache.felix.dm.ServiceStateListener;
0
import org.apache.hc.core5.net.InetAddressUtils; import org.slf4j.LoggerFactory; connLog.debug(LoggingSupport.getId(session) + " TLS session started: " + formatSession(session)); connLog.debug(LoggingSupport.getId(session) + " TLS inbound: " + formatSession(session)); connLog.debug(L...
0
import javax.inject.Qualifier; @Qualifier
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterables;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestShortArrayList.java,v 1.3 2002/08/19 21:19:03 pjack Exp $ * $Revision: 1.3 $ * $Date: 2002/08/19 21:19:03 $ * @version $Revision: 1.3 $ $Date: 2002/08/19 21...
0
import org.apache.http.config.MessageConstraints; import org.apache.http.params.HttpParamConfig; MessageConstraints constraints = HttpParamConfig.getMessageConstraints(params);
0
Dataset<IN> positiveOutput = Filter .named(name + POSITIVE_FILTER_SUFFIX) .of(input) .by(predicate) .output(); Dataset<IN> negativeOutput = Filter .named(name + NEGATIVE_FILTER_SUFFIX) .of(input) .by((UnaryPredicate<IN>) what -> !predicat...
0
private static final String POST_PROCESS_EXISTING_USERS_SPEC_KEY = "post_process_existing_users"; boolean postProcessExistingUsers = false; } else if (key.equalsIgnoreCase(POST_PROCESS_EXISTING_USERS_SPEC_KEY)) { postProcessExistingUsers = "true".equalsIgnoreCase(entry.getValue()); Lda...
0
public List<StageEntity> findAll() { return daoUtils.selectAll(entityManagerProvider.get(), StageEntity.class); } @Transactional
0
assertEquals("root", referenceElement.getLocalName());
0
/** * UFT-32BE BOM (Big-Endian) * @since 2.2 */ /** * UTF-32LE BOM (Big-Endian) * @since 2.2 */
0
public static CloudObjectTranslator<Coder> javaSerialized() { return new CloudObjectTranslator<Coder>() { public CloudObject toCloudObject(Coder target) { // CustomCoder is used as the "marker" for a java-serialized coder public Coder fromCloudObject(CloudObject cloudObject) { return (...
0
private static final SimpleDateFormat format = new SimpleDateFormat
0
public <OUT> SortableOutputBuilder<T, T, OUT> reduceBy( return new SortableOutputBuilder<>( name, input, e -> e, reducer, null); public <OUT> SortableOutputBuilder<T, VALUE, OUT> reduceBy( name, input, valueExtractor, reducer, windowing, valueComparator);
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
* @param cmd the command * @param buffer the packet contents positioned after the command boolean next(int cmd, Buffer buffer) throws Exception;
0
max = Math.max(max, Integer.parseInt(s));
0
private final RulesBinderImpl rulesBinder = new RulesBinderImpl(); if (!classLoader.equals(this.rulesBinder.getContextClassLoader())) { this.rulesBinder.initialize(classLoader); for (RulesModule rulesModule : rulesModules) { rulesModule.configure(this.rulesBinder);
0
* @version $Revision: 1.5 $ $Date: 2004/06/01 23:07:12 $ suite.addTest(TestSynchronizedCollection.suite());
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/PackageFunctions.java,v 1.5 2002/04/26 03:28:36 dmitri Exp $ * $Revision: 1.5 $ * $Date: 2002/04/26 03:28:36 $ * @version $Revision: 1.5 $ $Date: 2002/04/26 03:28:36 $ * <li><b>subpa...
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
import org.apache.excalibur.xml.xpath.XPathProcessor; * @version CVS $Id: DefaultContextManager.java,v 1.5 2003/12/18 14:29:03 cziegeler Exp $ /** The xpath processor */ private XPathProcessor xpathProcessor; this.xpathProcessor = (XPathProcessor)this.manager.lookup(XPathProcessor.ROLE); ...
0
import org.apache.felix.webconsole.SimpleWebConsolePlugin; class UpdateHelper extends BaseUpdateInstallHelper UpdateHelper( final SimpleWebConsolePlugin plugin, final Bundle bundle, boolean refreshPackages ) this( plugin, bundle, null, refreshPackages ); UpdateHelper( final SimpleWebConsolePlugin plugin...
0
import com.google.inject.Inject; import org.apache.atlas.web.service.ServiceState; private ServiceState serviceState; @Inject public AdminResource(ServiceState serviceState) { this.serviceState = serviceState; } @GET @Path("status") @Produces(Servlets.JSON_MEDIA_TYPE) public Re...
0
public void setTimer(TimerData timerData) { timerUpdateBuilder.setTimer(timerData);
0
import java.util.concurrent.ForkJoinPool; m_threadPool = new ForkJoinPool(Math.max(cores, DEPENDENCIES + 3 /* start/stop/configure */)); if (! m_parallel && m_threadPool != null) { m_threadPool.shutdown(); m_threadPool.awaitTermination(60, TimeUnit.SECONDS); ...
0
import org.apache.accumulo.server.AccumuloServerContext; private final AccumuloServerContext context; public FileManager(AccumuloServerContext context, VolumeManager fs, int maxOpen, BlockCache dataCache, BlockCache indexCache) { this.context = context; this.maxIdleTime = context.getConfiguration().getT...
1
throw new RuntimeException(" !!! Not implemented.");
0
public class TableNamespacesIT {
0
if ( target == null ) String result; Method m; context.setCurrentAccessor(
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
XMLUtils.circumventBug2650(doc);
0
// New connection is needed int maxPerRoute = getMaxPerRoute(route); // Shrink the pool prior to allocating a new connection int excess = Math.max(0, pool.getAllocatedCount() + 1 - maxPerRoute); if (excess > 0) { for (in...
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
serviceThemes.add(serviceInfo.getThemesMap().get(themeFileName));
0
package org.apache.beam.sdk.extensions.euphoria.core.translate; import static org.apache.beam.sdk.extensions.euphoria.core.translate.TestUtils.defaultOptions; import org.apache.beam.sdk.extensions.euphoria.core.translate.io.KryoCoder; import org.apache.beam.sdk.values.TypeDescriptors; /** * Tests getting coder from fu...
0
return session.getStringProperty(KB_INTERACTIVE_NAME_PROP, DEFAULT_KB_INTERACTIVE_NAME); return session.getStringProperty(KB_INTERACTIVE_INSTRUCTION_PROP, DEFAULT_KB_INTERACTIVE_INSTRUCTION); return session.getStringProperty(KB_INTERACTIVE_LANG_PROP, DEFAULT_KB_INTERACTIVE_LANG); return ...
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
import java.io.FileInputStream; import java.security.KeyStore; import java.security.cert.X509Certificate; checkXmlSignatureSoftwareStack(false); } public void testCheckXmlSignatureSoftwareStackWithCert() throws Exception { checkXmlSignatureSoftwareStack(true); } private void checkXmlSignatureSoftwareS...
0
* @author John Keyes (john at integralsource.com)
0
String nameService = m_configHelper.getValueFromDesiredConfigurations(cluster, ConfigHelper.HDFS_SITE, "dfs.internal.nameservices");
0
import org.apache.beam.vendor.grpc.v1p13p1.io.netty.channel.unix.DomainSocketAddress;
0
package org.apache.batik.svggen;
0
if (localHistory.canGoBack()) { localHistory.back(); } if (localHistory.canGoForward()) { localHistory.forward(); }
0
ClusterInformation clusterInformation = new ClusterInformation("cluster", false, null, null, null);
0
if (key instanceof DSAPublicKey) {
0
import java.util.Collections; if (proplist == null) { proplist = Collections.emptyList(); }
0
return ConnectionConfiguration.create(
0
if (source.hasNext()) source.doNextPreCheck(); if (nextEntries.length < MAX_READ_AHEAD_ENTRIES) nextEntries = new Entry[Math.min(nextEntries.length * 2, MAX_READ_AHEAD_ENTRIES)]; if (amountRead > READ_AHEAD_BYTES) break; if (iter.hasNext()) entry = iter.next()...
1
* By definition, these methods are safe to call without impacting the state of FATE. They should * also be safe to call without impacting the state of system components.
0
if (userName != null ? !userName.equals(that.userName) : that.userName != null) { return false; } return true;
0
* @since 2.0
1
return Query.isJobScoped(query) && (query.getStatusesSize() == 0) && (query.getTaskIdsSize() == 0);
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
import org.apache.accumulo.fate.util.LoggingRunnable;
1
private static final int[] TOKENS = new int[] { TokenTypes.METHOD_DEF }; @Override public int[] getAcceptableTokens() { return TOKENS; } return TOKENS; } @Override public int[] getRequiredTokens() { return TOKENS;
0
builder.delegate(CombineFnWithContext.this);
0
executorClock.advance(Amount.of(2L, Time.MILLISECONDS));
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.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.ToStringBuilder; @Nullable void restartTasks(Set<String> taskIds) throws RestartException; @Override public boolean equals(Object o) { if (!(o instanceof TwitterTask)) { return false; } Tw...
0
package org.apache.felix.sigil.repository; import org.apache.felix.sigil.model.IModelElement;
0
import org.apache.accumulo.server.cli.ClientOpts; import com.beust.jcommander.Parameter; static class Opts extends ClientOpts { @Parameter(names={"-t", "--tableId"}, description="table id", required=true) String tableId; @Parameter(names={"-e", "--endRow"}, description="end row") String endRow; @...
1
import org.apache.beam.sdk.PipelineRunner;
0
import org.apache.avalon.framework.activity.Disposable; import org.apache.avalon.framework.component.Component; * @version CVS $Id: FlowNode.java,v 1.5 2004/06/08 13:09:27 cziegeler Exp $ implements Composable, Contextualizable, Disposable { ComponentSelector interpreterSelector; this.interpret...
0
((BundleRevisionImpl) bundle.adapt(BundleRevision.class)) (String) ((BundleRevisionImpl) bundle.adapt(BundleRevision.class)) + ((BundleRevisionImpl) bundle.adapt(BundleRevision.class)) ((BundleRevisionImpl) bundle.adapt(BundleRevision.class)) ...
0
package org.apache.accumulo.core.clientImpl; import org.apache.accumulo.core.clientImpl.TabletLocatorImpl.TabletServerLockChecker; import org.apache.accumulo.core.dataImpl.KeyExtent;
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...
0