Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
private Rectangle2D patternRegion; private AffineTransform nodeTransform; * @param nodeTransform Additional transform to AffineTransform nodeTransform, Rectangle2D patternRegion, this.nodeTransform = nodeTransform; return (Rec...
0
import java.security.cert.CRLException; import java.security.cert.CertificateEncodingException; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509CRL; import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.Arrays;...
0
/* * $Header: /cvshome/build/ee.foundation/src/java/lang/NoSuchFieldException.java,v 1.6 2006/03/14 01:20:24 hargrave Exp $ * * (C) Copyright 2001 Sun Microsystems, Inc. * Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may ...
0
* Copyright (c) 2002 The Apache Software Foundation. All rights
0
import org.apache.beam.sdk.coders.Coder; import org.apache.beam.sdk.util.TimerInternals; import org.apache.beam.sdk.util.state.InMemoryStateInternals; import org.apache.beam.sdk.util.state.StateInternals; import java.io.IOException; import java.util.Collection; return new WindowingInternals<InT, OutT>() { ...
0
|| e.getMessage().indexOf("Broken pipe") > -1
0
import static org.osgi.service.http.runtime.dto.DTOConstants.FAILURE_REASON_SERVICE_IN_USE; throw new RegistrationFailureException(handler.getServletInfo(), FAILURE_REASON_SERVICE_IN_USE,
0
@SuppressWarnings("unchecked") // OK, empty collection is compatible with any type @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type public static boolean isFull(final Collection<? extends Object> coll) { UnmodifiableBoundedCollection.unmodifiableBoundedC...
0
return new Range(metadataPrevRow, getPrevEndRow() == null, getMetadataEntry(), true);
0
AtlasEntity processExecution = getHiveProcessExecutionEntity(process); ret.addEntity(processExecution);
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
package org.apache.commons.digester3; import org.apache.commons.digester3.ExtendedBaseRules; import org.apache.commons.digester3.Rule; import org.apache.commons.digester3.Rules;
1
import java.net.URI; import org.apache.hadoop.filecache.DistributedCache; import org.apache.hadoop.fs.FileSystem; import org.apache.log4j.Logger; private static final Logger log = Logger.getLogger(ContinuousVerify.class); if (args.length != 10) { + " <instance name> <zookeepers> <user> <pass> <table> <o...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/pairs/Attic/AbstractTestMapEntry.java,v 1.3 2003/11/18 22:37:18 scolebourne Exp $ * @version $Revision: 1.3 $ $Date: 2003/11/18 22:37:18 $ public Map.Entry makeMapEntry() { ...
0
package org.apache.felix.obrplugin;
0
public void registerContext(@Nonnull final ContextHandler contextHandler) { this.handlerRegistry.add(contextHandler.getContextInfo()); } public void unregisterContext(@Nonnull final ContextHandler contextHandler) { this.handlerRegistry.remove(contextHandler.getContextInfo()); }
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.joda.time.DateTime; import org.joda.time.Instant; import org.joda.time.chrono.ISOChronology; import org.joda.time.format.DateTimeFormatter; import org.joda.time.format.DateTimeFormatterBuilder; .put(TypeName.DATETIME, str -> new DateTime((long) (Double.parseDouble(str) * 1000), ISOChr...
0
import org.apache.ambari.server.controller.ServiceComponentHostResponse; import org.apache.ambari.server.state.job.Job; * Get the Cluster that this object maps to */ public String getClusterName(); /** public State getDesiredState(); public void setDesiredState(State state); public Map<String, Config...
1
import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_FIELD; public String getField() { return getParam(PARAM_FIELD, String.class); } public void setField(String field) { addParam(PARAM_FIELD, field); }
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/AbstractRandomAccessIntList.java,v 1.9 2003/01/13 21:52:28 rwaldhoff Exp $ * @version $Revision: 1.9 $ $Date: 2003/01/13 21:52:28 $ /** Constructs an empty li...
0
import com.google.common.collect.Maps; import java.util.Map; ReflectData.makeNullable(org.apache.avro.Schema.create(Type.BYTES))), .addArrayField("array", FieldType.BYTES.withNullable(true)) Map<String, Object> nullMap = Maps.newHashMap(); nullMap.put("k1", null); GenericRecord ...
0
// resue the static history, so our commands are remembered
0
package org.apache.felix.sigil.eclipse.cheatsheets.actions;
0
/** * TODO Add javadoc * * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> * @version $Rev$, $Date$ */
0
private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SignerOutputStream.class.getName()); this.sa = sa; throw new RuntimeException("" + e); throw new RuntimeException("" + e); StringBuilder sb = new StringB...
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 Iterable<V> get(K k) {
0
BridgeUpdateEvent be = new BridgeUpdateEvent(this);
0
import java.net.URI; import java.net.URISyntaxException; import org.apache.ambari.server.state.alert.AlertDefinition; import org.apache.ambari.server.state.alert.AlertDefinitionFactory; import org.apache.ambari.server.state.alert.PortSource; /** * Modifies the JSON of some of the alert definitions which have chang...
0
quorumPeer.setConnectToLearnerMasterLimit(config.getConnectToLearnerMasterLimit());
0
TConstraintViolationSummary _elem56; // required TConstraintViolationSummary _elem73; // required
0
ResultSetHandler<List<Map<String,Object>>> h = new MapListHandler(); List<Map<String,Object>> results = h.handle(this.rs); Iterator<Map<String,Object>> iter = results.iterator(); Map<String,Object> row = null; row = iter.next(); row = iter.next(); ResultSetHandler<List<Map<String,Object>>> h =...
0
* @param SpengoGenerator - An SpnegoTokenGenerator implementation Class
0
/** If true, a call to {@code encodeToByteArray} is already on the call stack. */ private static ThreadLocal<Boolean> threadLocalOutputStreamInUse = ThreadLocal.withInitial(() -> false);
0
import org.apache.batik.css.engine.value.ValueManager;
1
@Override public void stateChanged(int state) { if (state == ComponentInstance.DISPOSED) { // Cleanup all dependencies for (Dependency dep : m_dependencies) { dep.cleanup(); } } super.stateChanged(state); }
0
} else { if (log.isDebugEnabled()) { log.debug("Closed client loop exception", e); }
0
* @version CVS $Id: AbstractSAXTransformer.java,v 1.2 2003/06/18 12:11:07 jefft Exp $ if (this.getLogger().isDebugEnabled()) { if (this.getLogger().isDebugEnabled()) { if (this.getLogger().isDebugEnabled()) { if (this.getLogger().isDebugEnabled()) { if (this.getLogger().isDebugE...
0
* Copyright (c) 2002 The Apache Software Foundation. All rights
0
* * @since 4.0
0
return addDesiredConfig(user, config, null); } @Override public ServiceConfigVersionResponse addDesiredConfig(String user, Config config, String serviceConfigVersionNote) { applyConfig(config.getType(), config.getTag(), user, serviceConfigVersionNote); public boolean setServiceConfigVersion(Str...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/test/org/apache/commons/digester/Nameable.java,v 1.2 2003/02/02 15:52:14 rdonkin Exp $ * $Revision: 1.2 $ * $Date: 2003/02/02 15:52:14 $ * Copyright (c) 1999-2003 The Apache Software Foundation. All rights
0
import org.apache.accumulo.shell.ShellOptions; tableOpt = new Option(ShellOptions.tableOption, "table", true, "table to export");
1
private interface Mutation<T> { private synchronized <T> T mutate(OpStats stats, Mutation<T> mutation) { @VisibleForTesting static class LogPosition implements org.apache.aurora.scheduler.log.Log.Position {
0
* * * * @version $Revision: 1.4 $
1
HostEntity hostEntity = hostComponentDesiredStateEntity.getHostEntity();
0
// CHECKSTYLE:OFF // CHECKSTYLE:ON long unallocated = store.getUnallocatedSpace(); long usable = store.getUsableSpace(); int result = GenericUtils.hashCode(bytesOnDevice); result = 31 * result + GenericUtils.hashCode(unusedBytesOnDevice); result = 31 * result + GenericU...
1
assertEquals(PCollection.IsBounded.UNBOUNDED, matchMetadata.isBounded()); assertEquals(PCollection.IsBounded.UNBOUNDED, matchAllMetadata.isBounded());
0
/** {@inheritDoc} */ @Override public Object structuralValue(Long value) { return value; }
0
super(DeleteHostRequestAuditEventBuilder.class);
0
Reference ref = createReference(file, refqueue); protected Reference createReference(FileObject file, ReferenceQueue refqueue) { return new SoftReference(file, refqueue); } Reference ref = (Reference) files.get(name);
0
import org.apache.ambari.logsearch.solr.SolrConstants; import org.apache.commons.lang.StringUtils; import org.springframework.data.solr.core.query.SimpleFacetQuery; @Override public void appendFacetQuery(SimpleFacetQuery facetQuery, TopFieldAuditLogRequest request) { addInFiltersIfNotNullAndEnabled(facetQuery, ...
0
package org.apache.beam.runners.spark;
0
import java.io.IOException; @Override public void close() { try { this.getConnection().close(); } catch (IOException ignore) { } } @Override public boolean isClosed() { return !this.getConnection().isOpen(); }
0
this.saveUserCopletInstanceDatas(layoutKey); this.saveUserLayout(layoutKey); * @see org.apache.cocoon.portal.profile.ProfileManager#saveUserCopletInstanceDatas(java.lang.String) public void saveUserCopletInstanceDatas(String layoutKey) {
0
public static Predicate<TwitterTaskInfo> IS_THERMOS_TASK = new Predicate<TwitterTaskInfo>() { @Override public boolean apply(TwitterTaskInfo task) { // Length check is an artifact of thrift 0.5.0 NPE workaround from ConfigurationManager. // See MESOS-370. return task.isSetThermosConfig() && (tas...
0
package org.apache.batik.anim.dom;
0
stages = new ArrayList<>(); stages.addAll(actionDB.getAllStages(requestId2));
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 com.google.gson.Gson; * Gets the injected instance of the {@link Gson} serializer/deserializer. * * @return the injected {@link Gson} instance. */ protected Gson getGson() { return gson; } /**
0
package org.apache.commons.dbcp2.datasources; import org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS; pcds.setDriver("org.apache.commons.dbcp2.TesterDriver");
1
// collect references from class tags and fields this.propertyHandler.testProperty(props[i], null, null, description == currentDescription); this.propertyHandler.handleField(fields[i], description == currentDescription); this.propertyHandler.processProperties(component, o...
0
import org.apache.hc.core5.annotation.Contract; import org.apache.hc.core5.annotation.ThreadingBehavior; @Contract(threading = ThreadingBehavior.IMMUTABLE)
0
import org.apache.hadoop.conf.Configuration; public void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) {
0
import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.lang.reflect.Constructor; import java.util.Properties; import org.apache.accumulo.server.mini.MiniAccumuloCluster; import com.google.common.io.Files;
0
// compact the buffer if necessary if (this.bufferpos > 0) { int len = this.bufferlen - this.bufferpos; this.bufferpos = 0; this.bufferlen = len; } int l; int off = this.bufferlen; int len = this.buffer.length - off; l = this.in...
0
* @version $Revision$
0
import java.util.HashMap; import java.util.Set; import java.util.Map.Entry; import org.apache.accumulo.core.cli.BatchWriterOpts; import org.apache.accumulo.core.cli.ClientOnRequiredTable; import org.apache.accumulo.core.security.thrift.SecurityErrorCode; import com.beust.jcommander.Parameter; static class Opts exten...
1
for (Id authId : ids) { if (authId.getScheme().equals("super")) { return; } } for (Id authId : ids) {
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
* 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
import org.apache.beam.sdk.PipelineResult; PipelineResult.State state = result.waitUntilFinish(); assert(state == PipelineResult.State.DONE);
0
buffer = session.createBuffer(SshConstants.SSH_MSG_CHANNEL_REQUEST); buffer = session.createBuffer(SshConstants.SSH_MSG_CHANNEL_REQUEST); buffer = session.createBuffer(SshConstants.SSH_MSG_CHANNEL_REQUEST); buffer = session.createBuffer(SshConstants.SSH_MSG_CHANNEL_REQUES...
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
public MesosSchedulerImpl( SchedulerCore schedulerCore,
0
@Override
0
import java.io.StringWriter; * Serializes the given node. */ public String printNode(Node n) { try { Writer writer = new StringWriter(); DOMUtilities.writeNode(n, writer); writer.close(); return writer.toString(); ...
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger logger = LoggerFactory
0
*/ * @version CVS $Id: FilterTransformer.java,v 1.3 2003/12/10 18:54:30 huber Exp $ Map objectModel, String source, Parameters parameters) COUNT + " parameters need to be specified"); // fix Bugzilla Bug 13904, check if co...
0
import org.apache.atlas.AtlasClient; private final AtlasClient metadataServiceClient; metadataServiceClient = new AtlasClient(baseUrl); String guid = jsonObject.getString(AtlasClient.GUID); JSONObject results = response.getJSONObject(AtlasClient.RESULTS);
0
import org.apache.ambari.logfeeder.util.LogFeederUtil;
0
public interface IModelInfo { String getGroupName(); String getGroupURI(); String getName();
0
public Map<Long, ConfigGroup> getConfigGroupsByServiceName(String serviceName) { Map<Long, ConfigGroup> configGroups = new HashMap<>(); for (Entry<Long, ConfigGroup> groupEntry : clusterConfigGroups.entrySet()) { Long id = groupEntry.getKey(); ConfigGroup group = groupEntry.getValue(); if (...
0
if (BrokenLinkProvider.hasBrokenLinkProperty(img)) { Object o=img.getProperty(BrokenLinkProvider.BROKEN_LINK_PROPERTY); if (o instanceof String) msg = (String)o;
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.UncheckedIOException; import org.apache.ambari.server.utils.LoggingPreconditions; private static final LoggingPreconditions CHECK = new LoggingPreconditions(LOG); try { return AddServiceRequest.of(requestInfoProperties.get(Request.REQUEST_INFO_BODY_PROPERTY)); } catch (UncheckedIOExceptio...
0
package org.apache.commons.beanutils2.locale.converters; import org.apache.commons.beanutils2.ConversionException; import org.apache.commons.beanutils2.locale.converters.BigIntegerLocaleConverter;
1
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * v...
0
final HttpEntity httpentity = new EntityTemplate(new ContentProducer() { } catch (final IllegalArgumentException ex) { final HttpEntity httpentity = new EntityTemplate(new ContentProducer() { final ByteArrayOutputStream out = new ByteArrayOutputStream(); final byte[] bytes2 = out...
0
* BigQueryIO.Read.fromQuery("SELECT year, mean_temp FROM [samples.weather_stations]"));
0
// shortcut for empty or missing values if ( value == null || value.length() == 0 ) { return null; }
0
String esc0 = StringParser.unescapeIdentifier(id); Assert.assertFalse(esc0.contains("\\")); String esc1 = StringParser.escapeIdentifier(esc0);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/NonSerializableListLongList.java,v 1.2 2003/08/31 17:21:17 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately, thi...
0
throw new IllegalStateException("Service cannot be retrieved - probably activate() failed or there are unsatisfied references");
0
@Override @Override @Override
0
* </p> * </p>
0
manager.addProvider("jar", new JarFileProvider());
0
return satisfies(SerializableMatchers.<T>containsInAnyOrder(elementMatchers));
0
import org.apache.aurora.scheduler.Driver.SettableDriver; bind(SettableDriver.class).to(DriverImpl.class);
0