Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
FILE_READ, FILE_WRITE, TABLET_LOAD
1
* @version $Id: ASTArrayAccess.java,v 1.3 2002/06/07 03:35:30 geirm Exp $ /* * evaluate array access upon a base object * * foo.bar[2] * * makes me rethink the array operator :) */ public Object execute(Object obj, JexlContext jc) throws Exception { ...
0
checkValidity(); // CONCURRENCY NOTE: This is a check-then-act situation, // but we ignore it since the time window is small and // the result is the same as if the calling thread had // won the race condition. final Object sm = System.getSecurityM...
0
* See docs/examples/README.constraint for instructions.
0
Text[] nullText = new Text[0];
0
if (getInputs() != null) { for (ReadEntity input : getInputs()) { if (getOutputs() != null) { for (WriteEntity output : getOutputs()) { LineageInfo lineageInfo = getLineageInfo(); Set<ReadEntity> inputs = getInputs(); Set<WriteEntity> out...
0
import org.junit.Assert;
0
String zpath = ZooUtil.getRoot(getConnector().getInstanceID()) + RootTable.ZROOT_TABLET_PATH; String zpath = ZooUtil.getRoot(getConnector().getInstanceID()) + RootTable.ZROOT_TABLET_PATH;
0
import com.google.api.services.bigquery.model.TableRow;
0
import org.w3c.dom.DOMException; implements org.apache.batik.dom.dom3.Notation { * <b>DOM</b>: Implements {@link org.w3c.dom.Node#setTextContent(String)}. */ public void setTextContent(String s) throws DOMException { } /**
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.ognl.test.objects;
0
/** * If this method returns true, the caller must call {@link #finishUpdatingLogsUsed()} to clean up */
0
* any, must include the following acknowledgement: * Alternately, this acknowledgement may appear in the software itself, * if and wherever such third-party acknowledgements normally appear. * permission of the Apache Software Foundation. * @version $Revision: 1.8 $ $Date: 2003/10/13 08:44:42 $
0
/** * Translate flow for Flink Batch Mode. Only first translation match is used in flow */ extends BiFunction<LocatableInputSplit[], Integer, InputSplitAssigner>, Serializable { } Map<Class, List<Translation>> idx, Class<O> type, BatchOperatorTranslator<O> translator) { Map<Class, List...
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 use...
0
private static ThreadLocal consumed_chars = new ThreadLocal() { protected Object initialValue() { return new Integer(0); } };//int consumed_chars=0; // Remember position in string, see getArgumentTypes private static int unwrap(ThreadLocal tl) { return ((Integer)tl.get()).int...
0
import org.apache.felix.scrplugin.tags.*; return this.docletTag.getContext().getParent().getParentSource().getURL() + ", line " + this.docletTag.getLineNumber();
0
String getName();
0
* @since 2.2
0
/* * Copyright (c) 2014, Cloudera, Inc. All Rights Reserved. * * Cloudera, Inc. licenses this file to you 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-...
0
FileSystem hadoopFs = FileUtil.getFileSystem(conf, AccumuloConfiguration.getSiteConfiguration()); FileSystem localFs = FileSystem.getLocal(conf); FileSystem fs = hadoopFs.exists(path) ? hadoopFs : localFs; // fall back to local
0
import org.apache.http.util.Args; Args.notNull(unit, "Time unit"); final boolean success;
0
* @version $Revision$ $Date$
0
private final Map<String,String> fixedProps = Collections.synchronizedMap(new HashMap<String,String>());
0
static byte[][] randomData(int size, boolean urlSafe) { /** * Tests the supplied byte[] array to see if it contains the specified byte c. * * @param bytes byte[] array to test * @param c byte to look for * @return true if bytes contains c, false otherwise */ static boolean byte...
0
this.splitCreationTime = 0; public Tablet(final TabletServer tabletServer, final KeyExtent extent, final TabletResourceManager trm, TabletData data) throws IOException { TabletFiles tabletPaths = VolumeUtil .updateTabletVolumes(tabletServer, tabletServer.getLock(), tabletServer.getFileSystem(), extent...
1
public int getFirst() { return 0; } public int getLast() { return 0; }
0
* The nodes associated with a role.
0
* @version CVS $Id$ mimeType = ((SitemapLanguage)this.treeBuilder).getMimeType(Reader.ROLE, type);
0
private final String name; private Purpose(String name) { this.name = name; } /** * Returns a string representation of this purpose ("sign", * "verify", "encrypt", or "decrypt"). * * @return a string representation of this purpose */ public S...
1
final StringBuilder buf = new StringBuilder(BUFFER_SIZE); final String resourceName = buf.toString(); public void closeFileSystem(final FileSystem filesystem)
1
import org.w3c.dom.Attr; * add-comments: if specified, overrides the ant task value * add-attribute-<i>name</i>: add attribute <i>name</i> with the specified value * @version CVS $Revision: 1.26 $ $Date: 2004/05/07 18:32:45 $ // Override addComments from ant task if specified as an attribute ...
0
* ambari.properties doesn't contain "security.agent.hostname.validate" option */ @Test public void testValidateAgentHostnames() { Assert.assertTrue(new Configuration().validateAgentHostnames()); } /** * ambari.properties contains "security.agent.hostname.validate=true" option */ @Test publi...
0
* This little class keeps track of writes in progress and allows readers to wait for writes that started before the read. It assumes that the operation ids are * monotonically increasing. }
0
import org.apache.commons.jxpath.JXPathAbstractFactoryException; import org.apache.commons.jxpath.JXPathInvalidAccessException; private static final long serialVersionUID = -5720585681149150822L; throw new JXPathAbstractFactoryException( throw new JXPathInvalidAccessException("...
0
Script s = JEXL.createScript(code); Script s = JEXL.createScript(testScript); Script s = JEXL.createScript(testUrl); Expression e = JEXL.createExpression(jexlCode); Script s = JEXL.createScript(jexlCode);
0
package org.apache.atlas.web.security; import org.apache.atlas.web.TestUtils; public class SSLIT extends BaseSSLAndKerberosTest { public org.apache.commons.configuration.Configuration getConfiguration() { String persistDir = TestUtils.getTempDirectory(); setupCredentials(); final Propert...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/TestResultSet.java,v 1.2 2002/12/09 22:13:36 rwaldhoff Exp $ * $Revision: 1.2 $ * $Date: 2002/12/09 22:13:36 $ * @version $Revision: 1.2 $ $Date: 2002/12/09 22:13:36 $ /** @depr...
0
* @version $Id$ for (Iterator<String> keys = a.getKeys(); keys.hasNext();) String key = keys.next(); for (Iterator<String> keys = b.getKeys(); keys.hasNext();) String key = keys.next();
0
import com.google.cloud.dataflow.sdk.runners.inprocess.InProcessPipelineRunner.CommittedBundle; import com.google.cloud.dataflow.sdk.runners.inprocess.InProcessPipelineRunner.InProcessExecutionContext.InProcessStepContext; import com.google.cloud.dataflow.sdk.runners.inprocess.InProcessPipelineRunner.UncommittedBundle;...
0
setConfigurationsOnCluster(clusterTopology, TopologyManager.INITIAL_CONFIG_TAG, Collections.<String>emptySet()); Set<String> updatedConfigTypes = Collections.emptySet(); updatedConfigTypes = configurationProcessor.doUpdateForClusterCreate(); setConfigurationsOnCluster(clusterTopology, Topol...
0
package org.apache.felix.bundlerepository.impl.metadataparser; import org.apache.felix.bundlerepository.impl.Logger; import org.apache.felix.bundlerepository.impl.metadataparser.kxmlsax.KXml2SAXParser;
0
public class TaggedIOException extends IOException {
0
import org.apache.ambari.server.stack.upgrade.orchestrate.UpgradeContextFactory;
0
import java.util.Map; import java.util.Map.Entry; return toString("(", ",", ")"); } public String toString(String prefix, String separator, String suffix) { return prefix + first + separator + second + suffix; } public Entry<A,B> toMapEntry() { return new Map.Entry<A,B>() { @Overr...
1
* Copyright 2003-2005 The Apache Software Foundation public boolean canProcess(final WriteableCommandLine commandLine, final String argument) { if (!canProcess(commandLine, arg)) {
0
final ConstantUtf8 c = (ConstantUtf8) super.getConstantPool().getConstant(signature_index, final StringBuilder buf2 = new StringBuilder(); final StringBuilder buf2 = new StringBuilder(); final StringBuilder buf = new StringBuilder(); final String s = getSignature();
1
public void testSynchronizedRemoveFromMapIterator() throws InterruptedException { iter.next(); if (iter.getValue() == this) { public void testSynchronizedRemoveFromKeySet() throws InterruptedException { String name = (String) iter.next(); ...
0
import java.util.ArrayList; import java.util.List; * List[service reference] of the used service. private List m_usedServices = new ArrayList(); private List m_serviceReferences; * @param itf : the needed interface * @param optional : is the dependency optional ? m_serviceReferences = new...
0
import java.io.PushbackInputStream; private PushbackInputStream pushbackInputStream; if (pushbackInputStream == null) { return pushbackInputStream; /** * Prepend some bytes that have already been read back to the socket's input stream. Note that this method can be * called at most once with a non-0 le...
0
if (LOG.isDebugEnabled()) {
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
sb.append(device).append(" on ").append(mountPoint).append(" as ").append(filesystemType).append(" with options ").append(options);
0
static org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(ForbiddenRefCountTest.class.getName());
1
if (prefix == null || prefix.trim().length() == 0) { throw new IllegalArgumentException("You must supply a prefix"); }
0
package org.apache.felix.ipojo.runtime.core.test.components.comparator; import org.apache.felix.ipojo.runtime.core.test.services.FooService; import java.util.Properties; public class GradedFooServiceProvider implements FooService { private int grade; public boolean foo() { return grade > 0...
0
if (!consumed) { return true; } else { return original.isRepeatable(); }
0
public static CompactionReason findByValue(int value) {
0
static class Opts extends ClientOnDefaultTable { public Opts() { super("trace"); } @Parameter(names = {"--traceid"}, description = "The hex string id of a given trace, for example 16cfbbd7beec4ae3") public String traceId = ""; } public void dump(Opts opts) throws TableNotFoundException, Ac...
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.beam.sdk.state.BagState; import org.apache.beam.sdk.state.CombiningState; import org.apache.beam.sdk.state.GroupingState; import org.apache.beam.sdk.state.ReadableState;
0
* Empty constructor needed for Instruction.readInstruction. * Not to be used otherwise.
0
* to simplify manipulation of the HTTP protocol specific parameters. * Defines the charset to be used when encoding credentials. * If not defined then the * entity enclosing methods. The purpose of the 'Expect: 100-Continue' * Returns the charset to be used for credentials. * If not configure...
0
SnapshotInfo lastSnapshotInfo = null; * get information of the last saved/restored snapshot * @return info of last snapshot */ public SnapshotInfo getLastSnapshotInfo() { return this.lastSnapshotInfo; } /** lastSnapshotInfo = new SnapshotInfo(dt.lastProcessedZxid, snap.la...
0
import com.google.common.collect.Iterables; import com.google.common.collect.Sets;
0
private static final ResultPair[] testEmailFromPerl = {
0
tataFactory = (ComponentFactory) Utils.getFactoryByName(getContext(), "tata"); totoFactory = (ComponentFactory) Utils.getFactoryByName(getContext(), "toto"); tataFactory2 = (ComponentFactory) Utils.getFactoryByName(getContext(), "comp-6"); Factory factory = Utils.getFactoryByName(getCont...
0
import org.apache.hc.core5.http.HttpRequest; import org.apache.hc.core5.http.config.H1Config; public class DefaultHttpRequestParserFactory implements NHttpMessageParserFactory<HttpRequest> { private final HttpRequestFactory<HttpRequest> requestFactory; public DefaultHttpRequestParserFactory(final HttpRequestFac...
1
import org.apache.ambari.server.security.authentication.AmbariAuthenticationEventHandlerImpl; import org.apache.ambari.server.security.authentication.AmbariLocalAuthenticationProvider; import org.apache.ambari.server.security.authentication.jwt.AmbariJwtAuthenticationProvider; import org.apache.ambari.server.security.a...
0
ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntityToDelete = serviceComponentDesiredStateDAO.findByName( clusterEntity.getClusterId(), serviceNameToBeDeleted, componentName); serviceComponentDesiredStateDAO.create(serviceComponentDesiredStateEntity);
0
package org.apache.accumulo.monitor.servlets; import org.apache.accumulo.monitor.Monitor; import org.apache.accumulo.monitor.util.Table; import org.apache.accumulo.monitor.util.TableRow; import org.apache.accumulo.monitor.util.celltypes.CellType; import org.apache.accumulo.monitor.util.celltypes.DateTimeType; import or...
1
// apply custom partitioner if different from default if (!origOperator.getPartitioning().hasDefaultPartitioner()) {
0
import org.apache.http.ProtocolVersion; public ProtocolVersion getProtocolVersion() {
0
public void testHoistLambda() throws Exception { // redefining an hoisted var is not resolved correctly in left hand side; // declare the var in local frame, resolved in local frame instead of parent // @Test // public void test271e() throws Exception { // JexlEngine jexl = createEngine();...
0
import java.io.StringWriter; import java.io.Writer; import org.apache.commons.configuration.resolver.EntityRegistry; import org.apache.commons.configuration.tree.ConfigurationNode; if (text.length() > 0 || (!node.hasChildren() && node != getRoot()))
0
* Returns the current line number. */ public int getLine() { return inputBuffer.getLine(); } /** * Returns the current column number. */ public int getColumn() { return inputBuffer.getColumn(); } /** return (integer) ? LexicalUnits.INTEGER : Lexi...
0
import org.apache.http.annotation.Immutable;
0
* @version CVS $Id: XHTMLSerializer.java,v 1.3 2004/04/30 22:57:22 joerg Exp $ * @param attributes An array of <code>String</code> objects containing
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/compiler/Path.java,v 1.9 2003/03/11 00:59:22 dmitri Exp $ * $Revision: 1.9 $ * $Date: 2003/03/11 00:59:22 $ * Copyright (c) 1999-2003 The Apache Software Foundation. All rights * @ve...
0
int i = st.indexOf( '#' ); int i = s.indexOf( '#' ); List components = new LinkedList(); List components = new LinkedList(); List components = new LinkedList(); if (s.indexOf( '#' ) != -1) {
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 use ...
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument; import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkNotNull; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting; import org.apach...
0
return SVGValueConstants.CSS_CLIP_PATH_PROPERTY; if (lu.getStringValue().equalsIgnoreCase(CSS_NONE_VALUE)) { value.equalsIgnoreCase(CSS_NONE_VALUE)) {
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.batik.parser.ParseException; import org.w3c.dom.Element; * Bridge class for the &lt;line> element. * @author <a href="mailto:tkormann@apache.org">Thierry Kormann</a> * Constructs a new bridge for the &lt;line> element. */ public SVGLineElementBridge() {} /** * Constructs a l...
0
} else if (api.startsWith("relation")) { resourceTypes.add(AtlasResourceTypes.RELATION);
1
byte[] row = new byte[250];
0
return new DoFnTester<InputT, OutputT>(DoFnAdapters.toOldDoFn(fn));
0
/** Utility methods related to type awareness. */ public class TypeAwareness {
0
/** * exitstatus is a code of error which was rised on server side. * exitstatus = 0 (OK - Default) * exitstatus = 1 (Registration failed because * different version of agent and server) */ @JsonProperty("exitstatus") private int exitstatus; /** * log - message, which will be ...
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
final BasicHttpCache cache = new BasicHttpCache(resourceFactory, httpCacheStorage);
0
* Copyright 1999-2005 The Apache Software Foundation. * @version $Id$ /** * Empty attributes (for performance). This can be used * do create own attributes, but make sure to clean them * afterwords. */ protected static final Attributes EMPTY_ATTRIBUTES = XMLUtils.EMPTY_ATTRIBUTES; ...
0
import org.apache.cocoon.portal.layout.aspect.CompositeLayoutStatus; * @version CVS $Id: MaxPageAspect.java,v 1.2 2003/05/08 13:38:11 cziegeler 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 ...
0
System.setProperty("HOME", getFolder().getAbsolutePath()); shell.config("-u", "root", "-p", ROOT_PASSWORD, "-z", getStaticCluster().getConfig().getInstanceName(), getStaticCluster().getConfig().getZooKeepers(), "--config-file", getStaticCluster().getConfig().getClientConfFile().getAbsolutePath()); t...
0
* @version $Revision: 1.4 $ $Date: 2004/05/14 18:35:37 $ public void touchFile(FileObject file)
0
* Copyright (C) 2015 Google Inc.
0
import static org.easymock.EasyMock.anyObject; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set;
0