Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
package org.apache.ambari.server.fsm; public interface ActionFSM { }
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
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPropertyPointer.java,v 1.15 2003/10/09 21:31:40 rdonkin Exp $ * $Revision: 1.15 $ * $Date: 2003/10/09 21:31:40 $ * any, must include the following acknowledgement: ...
0
import static org.apache.ambari.metrics.core.timeline.TimelineMetricConfiguration.CLUSTER_AGGREGATOR_APP_IDS; import static org.apache.ambari.metrics.core.timeline.TimelineMetricConfiguration.HOST_APP_ID; if (appId.equalsIgnoreCase(HOST_APP_ID)) { TimelineMetricMetadataKey appKey = new TimelineMetricMetadataK...
0
import java.io.Closeable; class ConnectionReleaseTriggerImpl implements ConnectionReleaseTrigger, Cancellable, Closeable { public void close() throws IOException { abortConnection(); }
0
/** The provider's capabilities */
0
* @version $Revision$ $Date$
0
/** * Closes the object. * @throws IOException An I/O error occurred. */ void close() throws IOException; /** * Returns, whether the object is already closed. * @return True, if the object is closed, otherwise false. * @throws IOException An I/O error occurred. */ bool...
0
(configurationProperties.get("hdfs-site").containsKey("dfs.nameservices") || configurationProperties.get("hdfs-site").containsKey("dfs.internal.nameservices"));
0
* Executes the given closure on each but the last element in the iterator. * <p> * If the input iterator is null no change is made. * * @param <E> the type of object the {@link Iterator} contains * @param <C> the closure type * @param iterator the iterator to get the input from, ma...
0
import org.apache.cocoon.components.container.CocoonComponentManager; * @version CVS $Id: SitemapLanguage.java,v 1.11 2004/05/25 07:28:25 cziegeler Exp $
0
IZooReaderWriter zk = getZooReaderWriter(shellState.getInstance(), cl.getOptionValue(secretOption.getOpt())); Gson gson = new GsonBuilder().registerTypeAdapter(ReadOnlyRepo.class, new InterfaceSerializer<>()) .registerTypeAdapter(Repo.class, new InterfaceSerializer<>()) ...
0
package com.twitter.mesos.scheduler.app;
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 org.junit.Test;
0
* @version $Id$
0
import java.util.List; private List<JRecord> mRecList; CSharpGenerator(String name, List<JFile> ilist, List<JRecord> rlist,
0
@Default.String("gs://apache-beam-samples/traffic_sensor/"
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...
0
public int read (final byte[] b, final int off, final int len) throws java.io.IOException { int chunk = len; chunk = (int) (contentLength - pos); final int count = this.in.read(b, off, chunk);
0
@Override public TaskSchedulerResult schedule(String taskId) { @Override public TaskGroup load(GroupKey key) { @Override public void run() { @Override public void execute() {
0
sb.append(this.method).append(" ").append(this.scheme).append("://").append(this.authority).append(this.path);
0
* @version CVS $Id: JavaScriptJXPathBinding.java,v 1.3 2004/04/23 11:42:58 mpo Exp $ Widget widget = selectWidget(frmModel,this.id); Widget widget = selectWidget(frmModel,this.id);
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
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Charsets; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList;
0
VolumeChooserEnvironment chooserEnv = new VolumeChooserEnvironment(extent.getTableId());
0
@GET @Path("/metrics/instances") @Produces({ MediaType.APPLICATION_JSON }) public Map<String, Set<String>> getClusterHostsMetadata( @Context HttpServletRequest req, @Context HttpServletResponse res ) { init(res); try { return timelineMetricStore.getInstanceHostsMetadata(); } catch (...
0
private static final String IDENTITY_REPOSITORY_FACTORY = _PREFIX + "IDENTITY_REPOSITORY_FACTORY"; * Get the identity repository factory * * @param opts * The FileSystem options. * @return the IdentityRepositoryFactory */ public IdentityRepositoryFactory getIdentityRep...
0
SimpleDateFormat sdf = (SimpleDateFormat) parser.getRecentDateFormat().clone(); // assume we're in the US Pacific Time Zone TimeZone tzla = TimeZone.getTimeZone("America/Los_Angeles"); sdf.setTimeZone(tzla); // get formatted versions of time in L.A. String fmtTimePlusOneHour = sdf.format(anH...
0
* @version CVS $Id$
0
* * * * * * * * * * * * * * * * * * * * * * * * *
0
private static final long serialVersionUID = 8749750216946526117L;
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
new Object[] {expectedChar, currentChar}); new Object[] {currentChar});
0
* @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
0
import org.apache.cocoon.woody.FormHandler; private FormHandler formHandler; public void setFormHandler(FormHandler formHandler) { this.formHandler = formHandler; } if (formContext.getActionEvent() != null && formHandler != null) { formHandler.handleActionEvent(formContext.getAc...
0
put("timeline.metrics.sink.collection.period", "60"); put("timeline.metrics.sink.collection.period", "10");
0
* A {@link org.apache.cocoon.forms.datatype.Datatype Datatype} implementation * @version $Id: DecimalType.java,v 1.2 2004/03/09 11:31:11 joerg Exp $
0
package org.apache.felix.sigil.config;
0
<A> void checkAdapt(Class<A> type) !caller.getName().startsWith("org.apache.felix.framework.")))
1
/** String used to denote a script can't be parsed */ private static final String BAD_PARSE = "Could not parse Jelly script"; throw new JellyException(JellyContext.BAD_PARSE, e); throw new JellyException(JellyContext.BAD_PARSE, e); throw new JellyException(JellyContext.B...
0
@Override public String toString() { return "EmissionWindow{" + "inner=" + inner + ", emissionWatermark=" + emissionWatermark + '}'; }
0
* @return a <code>DataReference</code>. * @return a <code>KeyReference</code>.
0
/** * Thrown when more than one option in an option group * has been provided. public class AlreadySelectedException extends ParseException { /** * Construct a new <code>AlreadySelectedException</code> * with the specified detail message. }
0
import com.google.cloud.dataflow.sdk.util.WindowedValue; static class SingletonTestReaderFactory implements ReaderFactory { @Override public Reader<?> create( CloudObject spec, @Nullable Coder<?> coder, @Nullable PipelineOptions options, @Nullable ExecutionContext executionCont...
0
* Copyright (c) 2002 The Apache Software Foundation. All rights
0
import org.apache.accumulo.core.data.TableId; Map<TableId,Long> tableToTimeCreated = new HashMap<>(); TableId tableId; tableId = TableId.of(colq.toString()); for (Entry<TableId,Long> entry : tableToTimeCreated.entrySet()) { orderMutation.putDelete(OrderSection.NAME, new Text(entry.getKey().c...
0
public TabletMutator deleteFile(FileMeta path); public TabletMutator deleteScan(FileMeta path); public TabletMutator putChopped();
0
@Contract(threading = ThreadingBehavior.STATELESS)
0
private static Thread slowScan(final Connector c, final String tableName, final AtomicBoolean stop) {
0
package org.apache.accumulo.core.iterators.user; import java.util.Iterator; import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.iterators.LongCombiner; public class SummingCombiner extends LongCombiner { @Override public Long typedReduce(Key key, Iterator<Long> iter) { long sum = 0; whil...
1
package org.apache.felix.scrplugin.processing; import org.apache.felix.scrplugin.SCRDescriptorException; import org.apache.felix.scrplugin.SCRDescriptorFailureException; import org.apache.felix.scrplugin.annotations.AnnotationProcessor; import org.apache.felix.scrplugin.annotations.ClassAnnotation; import org.apache.fe...
0
setConfig(buildSVGURL(dirNfile[0], dirNfile[1], dirNfile[2]),
0
import org.apache.aurora.scheduler.base.TaskTestUtil; TaskTestUtil.CONFIGURATION_MANAGER, SanitizedConfiguration sanitized = SanitizedConfiguration.fromUnsanitized(TaskTestUtil.CONFIGURATION_MANAGER, job);
0
Document doc = XMLUtils.read(fis, false); Document doc = XMLUtils.read(fis, false);
0
public interface BagState<T> extends CombiningValueState<T, Iterable<T>> {
0
final Registry<String> reg = RegistryBuilder.<String>create().register("Stuff", "Stuff").build();
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/iterators/TestFilterListIterator.java,v 1.7 2003/10/01 21:54:54 scolebourne Exp $ * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * permission of the Apa...
0
* @return The column visibility
0
import org.apache.http.conn.ssl.SSLConnectionSocketFactory; ssl = SSLConnectionSocketFactory.getSystemSocketFactory(); final SSLContext sslcontext; sslcontext = SSLContext.getInstance(SSLConnectionSocketFactory.TLS); ssl = new SSLConnectionSocketFactory(sslcontext...
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
* 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 org.apache.atlas.ApplicationProperties; import org.apache.commons.configuration.Configuration; try { Configuration configuration = ApplicationProperties.get(); this.adDomain = configuration.getString("atlas.authentication.method.ldap.ad.domain"); this.adURL = configur...
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 org.apache.ambari.server.state.fsm.InvalidStateTransitionException; private void doWork() throws InvalidStateTransitionException {
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
package org.apache.felix.sigil.ui.eclipse.handlers;
0
String.format("WordCountIT-%tF-%<tH-%<tM-%<tS-%<tL", new Date()), "output", "results"}));
0
import org.apache.hc.core5.annotation.ThreadSafe; import org.apache.hc.core5.util.Args;
1
protected String convertToString(Object value) { return (String)getDefault(String.class); return buffer.toString();
0
import org.apache.felix.http.base.internal.service.ResourceServlet;
0
buffer.append("["); buffer.append("]");
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
private Map<PropertyId, String> m_properties = new HashMap<PropertyId, String>(); public void setProperty(PropertyId property, String value) { public void setProperties(Map<PropertyId, String> mapProperties) { public Map<PropertyId, String> getProperties() {
0
/* * Copyright 2013 Twitter, 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 t...
0
import java.util.Map; @Deprecated Map<String, String> data = context.getInstanceData(); return data.containsKey(s);
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
* http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libcrypt/crypt-md5.c?rev=1.1;content-type=text%2Fplain<br/> * <p>Conversion to Kotlin and from there to Java in 2012.</p> * * <p>The C style comments are from the original C code, the ones with "//" from the port.</p> * Generates an Apache htpasswd compatible "$a...
0
package org.apache.felix.ipojo.runtime.core.components.controller; import org.apache.felix.ipojo.runtime.core.services.CheckService; import org.apache.felix.ipojo.runtime.core.services.FooService; import java.util.Properties; public class DoubleControllerCheckService implements FooService, CheckService { ...
0
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.withBnd; mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo").version(asInProject()) .add( IA.class ) .build( withBnd() ) ...
0
import java.awt.event.KeyListener; import java.awt.event.WindowListener; import javax.swing.Action; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JScrollPane; import javax.swing.JSplitPane; import javax.swing.RootPaneContainer; import org.apache.commons.jelly.tags....
0
private final String OS_MAPPING = "mapping"; private final String OS_ALIASES = "aliases"; private JsonOsFamilyRoot jsonOsFamily = null; Type type = new TypeToken<JsonOsFamilyRoot>() {}.getType(); jsonOsFamily = gson.fromJson(new InputStreamReader(inputStream), type); osMap = jsonOsFa...
0
* Write a {@link CacheEntry} to an {@link OutputStream}. * @param cacheEntry the entry to write * @param os the output stream to write to * @throws IOException if problems occur writing the entry * Read a {@link CacheEntry} from an {@link InputStream} * @param is the input stream to read f...
0
package com.twitter.mesos.scheduler.http;
0
public OpenFuture open(int recipient, long rwSize, long packetSize, Buffer buffer) { public void handleOpenSuccess(int recipient, long rwSize, long packetSize, Buffer buffer) throws IOException {
0
import org.apache.beam.model.pipeline.v1.RunnerApi; import org.apache.beam.runners.core.construction.graph.PipelineNode; import org.apache.beam.runners.core.construction.graph.PipelineNode.PCollectionNode; private PCollectionNode created; private PCollectionNode downstream; created = PipelineNode.pColle...
0
* @version CVS $Id: CocoonCrawling.java,v 1.1 2003/09/04 12:42:41 cziegeler Exp $
0
import org.apache.cocoon.configuration.Settings; final Settings settings = (Settings)this.manager.lookup(Settings.ROLE); this.directory = settings.getWorkDirectory(); this.manager.release(settings);
0
public interface PropertyMetaData { public PropertyMetaData setHeading(String heading); public PropertyMetaData setId(String id); public PropertyMetaData setType(Class type); public PropertyMetaData setDefaults(String[] defaults); public PropertyMetaData setDescription(String description); publi...
0
package aQute.libg.cryptography; import java.math.*; import java.security.*; import java.security.interfaces.*; import java.security.spec.*; import aQute.libg.tuple.*; public class RSA { final static String ALGORITHM = "RSA"; final static KeyFactory factory = getKeyFactory(); static private KeyFactory getKeyF...
0
public class HttpServer implements AutoCloseable { @Override public void close() throws Exception { shutdown(5, TimeUnit.SECONDS); }
0
* test parenthesized exprs */ asserter.assertExpression("(4 + 3) * 6", new Long(42)); asserter.assertExpression("(8 - 2) * 7", new Long(42)); /* jexl.setCache(128); debuggerCheck(jexl);
0
LOG.error("getByGuid: {} failed!", guid, e);
0
* The specific event type for builder reset events. Events of this type are * generated each time the builder's {@code resetResult()} method is called. */ public static final EventType<ConfigurationBuilderEvent> RESET = new EventType<ConfigurationBuilderEvent>(ANY, "RESET"); /**
0
import org.apache.beam.sdk.extensions.protobuf.ByteStringCoder;
0
super(doc); super(element, BaseURI); public String getBaseLocalName() { return Constants._TAG_TRANSFORM; }
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
Set<Integer> desiredInstances = instructions.isSetDesiredState() ? expandInstanceIds(ImmutableSet.of(instructions.getDesiredState())) : ImmutableSet.<Integer>of(); Optional<ITaskConfig> desiredStateConfig; desiredStateConfig = desiredInstances.contains(instanceId) d...
0
// This prevents a serious memory leak where // all the SVG document state is preserved.
1