Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbutils/src/test/org/apache/commons/dbutils/handlers/BeanHandlerTest.java,v 1.2 2004/01/11 22:30:38 dgraham Exp $ * $Revision: 1.2 $ * $Date: 2004/01/11 22:30:38 $ * Copyright (c) 2003-2004 The Apache Software Foundation. All rights
0
import org.apache.beam.sdk.transforms.Distinct; /** Unit tests for {@link Distinct}. */ public class DistinctExampleTest { public void testDistinct() { input.apply(Distinct.<String>create()); public void testDistinctEmpty() { input.apply(Distinct.<String>create());
0
* Copyright (C) 2015 Google Inc.
0
import com.fasterxml.jackson.annotation.JsonProperty; @JsonProperty("alertDefinitions") @JsonProperty("configurations") @JsonProperty("clusterName") @JsonProperty("hostName")
0
import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlTransient; @XmlAccessorType(XmlAccessType.FIELD) private String fileName; @XmlElement(name = "default") private Boolean isDefault = false; private Boolean deleted = false; @XmlTransient "deleted=" + deleted + ", fileName='" + fileName + '\'' + ", isDefault=" + isDefault + ", themeMap=" + themeMap + public String getFileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } public Boolean getIsDefault() { return isDefault; } public void setIsDefault(Boolean isDefault) { this.isDefault = isDefault; } public Boolean isDeleted() { return deleted; } public void setDeleted(Boolean deleted) { this.deleted = deleted; }
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 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 in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.sigil.eclipse; import java.io.File; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; /** * @author dave * */ public class PathUtil { /** * @param sourceRootPath * @return */ public static IPath newPathIfNotNull(String path) { return path == null ? null : new Path(path); } /** * @param absolutePath * @return */ public static IPath newPathIfExists(File file) { if (file == null) return null; if (file.exists()) return new Path(file.getAbsolutePath()); // fine return null; } }
0
return new User("testuser", "password", Collections.emptyList()); ResourceInstance resource = new QueryImpl(new HashMap<>(), new HostComponentResourceDefinition(), null); ResourceInstance resource = new QueryImpl(new HashMap<>(), new HostComponentResourceDefinition(), null); ResourceInstance resource = new QueryImpl(new HashMap<>(), new HostComponentResourceDefinition(), null);
0
this.log.error( "Shell Features service is unavailable." ); this.log.error( "Shell Features service is unavailable." ); this.log.error( "Shell Features service is unavailable." ); this.log.error( "Shell Features service is unavailable." ); this.log.error( "Shell Features service is unavailable." ); this.log.error( "Shell Features service is unavailable." ); this.log.error( "Shell Features service is unavailable." );
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 applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
1
import org.apache.beam.sdk.values.Row; @Override public PCollection<Row> buildBeamPipeline(PCollectionTuple inputPCollections
0
Copyright 2001-2002,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 applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */
0
Constants.setSignatureSpecNSprefix("ds");
0
package org.apache.aurora.scheduler; import org.apache.aurora.scheduler.configuration.Resources; import org.apache.aurora.scheduler.storage.entities.ITaskConfig;
0
assertTrue(results.stream().anyMatch(s -> s.startsWith("NULL") && s.endsWith("" + 1))); assertTrue(results.stream().anyMatch(s -> s.startsWith("19700101") && s.endsWith("" + 2)));
0
public void execute(Storage.MutableStoreProvider storeProvider) {
0
* for (int i = offset; i &lt; length; i++) {
0
@Override
1
params.put("auth","NONE");
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 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 in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.ipojo.manipulator; import org.apache.felix.ipojo.manipulator.util.Strings; import org.apache.felix.ipojo.metadata.Element; /** * Component Info. * Represent a component type to be manipulated or already manipulated. * @author <a href="mailto:[email protected]">Felix Project Team</a> */ public class ManipulationUnit { private Element m_componentMetadata; private String m_resourcePath; private String m_className; /** * Constructor. * @param resourcePath class name * @param meta component type metadata */ public ManipulationUnit(String resourcePath, Element meta) { m_resourcePath = resourcePath; m_componentMetadata = meta; m_className = Strings.asClassName(resourcePath); } /** * @return Component Type metadata. */ public Element getComponentMetadata() { return m_componentMetadata; } /** * @return Resource path */ public String getResourcePath() { return m_resourcePath; } /** * @return Fully qualified class name */ public String getClassName() { return m_className; } }
0
package org.apache.felix.ipojo.test.scenarios.component.temporal; import org.apache.felix.ipojo.annotations.Component; import org.apache.felix.ipojo.handler.temporal.Requires; import org.apache.felix.ipojo.test.scenarios.annotations.service.FooService; @Component public class TemporalWithTimeout { @Requires(timeout=100) private FooService fs; }
0
import org.apache.commons.vfs.FileName; * @version $Revision: 1.3 $ $Date: 2003/02/12 02:05:20 $ super( scheme, zipFileUri, path ); * Builds the root URI for this file name. protected void appendRootUri( final StringBuffer buffer ) buffer.append( getScheme() ); UriParser.appendEncoded( buffer, getOuterUri(), ZIP_URL_RESERVED_CHARS ); } /** * Factory method for creating name instances. */ protected FileName createName( final String path ) { return new ZipFileName( getScheme(), getOuterUri(), path );
0
ByteArrayOutputStream bout = new ByteArrayOutputStream(string.length() * 2 / 3); decode(rdr, bout); } catch (Exception e) { while ((c = rdr.read()) >= 0) { throw new IllegalArgumentException("Invalid base64 character in " + rdr + ", character value > 128 "); if (c == '=') { if (v < 0) throw new IllegalArgumentException("Invalid base64 character in " + rdr + ", " + c); } case 0 : out.write(0xFF & (register >> 16)); out.write(0xFF & (register >> 8)); out.write(0xFF & (register >> 0)); break; case 1 : out.write(0xFF & (register >> 16)); out.write(0xFF & (register >> 8)); break; case 2 : out.write(0xFF & (register >> 16)); encode(bin, sw); } catch (IOException e) { // StringBuilder sb = new StringBuilder();
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/decorators/Attic/TestAll.java,v 1.11 2003/09/13 16:12:47 psteitz Exp $ * @version $Revision: 1.11 $ $Date: 2003/09/13 16:12:47 $ suite.addTest(TestPredicatedMap.suite()); suite.addTest(TestPredicatedSortedMap.suite());
0
Set<String> percentMetrics = new HashSet<>(); Set<String> metricsWithAggregateFunctionIds = new HashSet<>();
0
* @param session The (never {@code null}) client session instance
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 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 in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */
0
String propertyCategory = PropertyHelper.getPropertyCategory(entry.getKey()); if (propertyCategory != null && propertyCategory.equals("config")) {
0
@Deprecated public Socket createLayeredSocket(
0
* --runner=BlockingDataflowRunner
0
protected final AuthState targetAuthState; protected final AuthState proxyAuthState; this.targetAuthState = new AuthState(); this.proxyAuthState = new AuthState(); context.setAttribute(ClientContext.TARGET_AUTH_STATE, targetAuthState); context.setAttribute(ClientContext.PROXY_AUTH_STATE, proxyAuthState); if (this.authenticator.isAuthenticationRequested(proxy, response, HttpHost target = (HttpHost) context.getAttribute(ExecutionContext.HTTP_TARGET_HOST); if (target == null) { target = route.getTargetHost(); } if (target.getPort() < 0) { Scheme scheme = connManager.getSchemeRegistry().getScheme(target); target = new HttpHost(target.getHostName(), scheme.getDefaultPort(), target.getSchemeName()); } if (this.authenticator.isAuthenticationRequested(target, response, HttpHost proxy = route.getProxyHost(); if (this.authenticator.isAuthenticationRequested(proxy, response,
0
@Override
0
import static org.junit.Assert.assertTrue;
0
/** {@link org.apache.commons.logging} logging facility */ private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(XMLUtils.class); } catch (IOException ex) { if (log.isDebugEnabled()) { log.debug(ex); } } if (log.isDebugEnabled()) { log.debug(ex); } if (log.isDebugEnabled()) { log.debug(ex); } if (log.isDebugEnabled()) { log.debug(ex); } if (log.isDebugEnabled()) { log.debug(ex); } if (log.isDebugEnabled()) { log.debug(ex); } }
0
Copyright 2002-2003 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 applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */
0
final X509HostnameVerifier verifier = SSLConnectionSocketFactory.BROWSER_COMPATIBLE_HOSTNAME_VERIFIER;
0
import org.apache.accumulo.core.security.thrift.ThriftSecurityException;
0
try (final BufferedOutputStream output1 = new BufferedOutputStream(new FileOutputStream(m_testFile1))) { try (final BufferedOutputStream output = new BufferedOutputStream(new FileOutputStream(m_testFile2))) {
0
package org.w3c.dom.svg; import org.w3c.dom.DOMException; public interface SVGAnimatedNumberList { public SVGNumberList getBaseVal( ); public void setBaseVal( SVGNumberList baseVal ) throws DOMException; public SVGNumberList getAnimVal( ); }
1
* @version $Id: TestPropertiesConfiguration.java,v 1.16 2004/11/14 18:29:02 oheger Exp $ public void testLoadUnexistingFile() { try { conf = new PropertiesConfiguration("Unexisting file"); fail("Unexisting file was loaded."); } catch(ConfigurationException cex) { // fine } }
0
import java.util.Collections; @Test public void testReseekUnconsumed() throws Exception { TestRFile trf = new TestRFile(); trf.openWriter(); for (int i = 0; i < 2500; i++) { trf.writer.append(nk(nf("r_", i), "cf1", "cq1", "L1", 42), nv("foo" + i)); } trf.closeWriter(); trf.openReader(); Set<ByteSequence> cfs = Collections.emptySet(); Random rand = new Random(); for (int count = 0; count < 100; count++) { int start = rand.nextInt(2300); Range range = new Range(nk(nf("r_", start), "cf1", "cq1", "L1", 42), nk(nf("r_", start + 100), "cf1", "cq1", "L1", 42)); trf.reader.seek(range, cfs, false); int numToScan = rand.nextInt(100); for (int j = 0; j < numToScan; j++) { assertTrue(trf.reader.hasTop()); assertEquals(nk(nf("r_", start + j), "cf1", "cq1", "L1", 42), trf.reader.getTopKey()); trf.reader.next(); } assertTrue(trf.reader.hasTop()); assertEquals(nk(nf("r_", start + numToScan), "cf1", "cq1", "L1", 42), trf.reader.getTopKey()); // seek a little forward from the last range and read a few keys within the unconsumed portion of the last range int start2 = start + numToScan + rand.nextInt(3); int end2 = start2 + rand.nextInt(3); range = new Range(nk(nf("r_", start2), "cf1", "cq1", "L1", 42), nk(nf("r_", end2), "cf1", "cq1", "L1", 42)); trf.reader.seek(range, cfs, false); for (int j = start2; j <= end2; j++) { assertTrue(trf.reader.hasTop()); assertEquals(nk(nf("r_", j), "cf1", "cq1", "L1", 42), trf.reader.getTopKey()); trf.reader.next(); } assertFalse(trf.reader.hasTop()); } trf.closeReader(); }
0
public abstract static class Builder { public abstract Builder setName(String name); public abstract Builder setDescription(String description); public abstract Builder setType(FieldType fieldType); public abstract Builder setNullable(Boolean nullable); public abstract Field build();
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 this file except in compliance with * the License. You may obtain a copy of the License at
0
String PARAM_YARN_ATS_URL = "yarn.ats.url"; String PARAM_YARN_RESOURCEMANAGER_URL = "yarn.resourcemanager.url"; String PARAM_YARN_PROTOCOL = "yarn.protocol"; /** * @return The authentication type for RM. Check: https://hadoop.apache.org/docs/r1.2.1/HttpAuthentication.html */ String getRMAuthenticationType(); /** * @return The authentication used for timeline server HTTP endpoint. Check: https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/TimelineServer.html */ String getATSAuthenticationType();
0
* @version CVS $Id: RendererFactory.java,v 1.2 2004/01/19 09:27:26 antonio Exp $ Renderer createRenderer(String mimeType);
0
import org.apache.accumulo.core.client.BatchWriterConfig; bw = connector.createBatchWriter(table, new BatchWriterConfig());
0
Path root = new Path(fs.getUri().toString() + cluster.getTemporaryPath(), getClass().getName());
0
import java.net.Socket; * ClientConnectionOperator represents a strategy for creating * {@link OperatedClientConnection} instances and updating the underlying * {@link Socket} of those objects. Implementations will most likely make use * of {@link SocketFactory}s to create {@link Socket} instances.
0
Collections.unmodifiableSet(EnumSet.allOf(Result.class));
0
* @return {@code true</code> if the request should be redirected, <code>false}
0
private static final Logger log = Logger.getLogger(SecurityHelper.class);
0
Document document = XMLUtils.parse(sourceDocument, false); document = StAX2DOM.readDoc(XMLUtils.newDocument(false), securityStreamReader); Document document = XMLUtils.parse(sourceDocument, false); document = StAX2DOM.readDoc(XMLUtils.newDocument(false), securityStreamReader); Document document = XMLUtils.parse(sourceDocument, false); document = StAX2DOM.readDoc(XMLUtils.newDocument(false), securityStreamReader); Document document = XMLUtils.parse(sourceDocument, false); document = StAX2DOM.readDoc(XMLUtils.newDocument(false), securityStreamReader); Document document = XMLUtils.parse(sourceDocument, false); document = StAX2DOM.readDoc(XMLUtils.newDocument(false), securityStreamReader); Document document = XMLUtils.parse(sourceDocument, false); document = StAX2DOM.readDoc(XMLUtils.newDocument(false), securityStreamReader); Document document = XMLUtils.parse(sourceDocument, false); document = StAX2DOM.readDoc(XMLUtils.newDocument(false), securityStreamReader); Document document = XMLUtils.parse(sourceDocument, false); document = StAX2DOM.readDoc(XMLUtils.newDocument(false), securityStreamReader); Document document = XMLUtils.parse(sourceDocument, false); document = StAX2DOM.readDoc(XMLUtils.newDocument(false), securityStreamReader); Document document = XMLUtils.parse(sourceDocument, false); document = StAX2DOM.readDoc(XMLUtils.newDocument(false), securityStreamReader); Document document = XMLUtils.parse(sourceDocument, false); document = StAX2DOM.readDoc(XMLUtils.newDocument(false), securityStreamReader);
0
Request nextPending = null; case OpCode.check:
0
package org.apache.hadoop.metrics2.sink.timeline.cache; public static final int MAX_RECS_PER_NAME_DEFAULT = 10000; public static final int MAX_EVICTION_TIME_MILLIS = 59000; // ~ 1 min public TimelineMetricsCache(int maxRecsPerName, int maxEvictionTimeInMillis) {
0
private static final Map<Integer,TTransportFactory> factoryCache = new HashMap<>();
0
public void testSuperCallWithBC() { try { Factory fact = Utils.getFactoryByName(context, "org.apache.felix.ipojo.test.scenarios.component.CallSuperConstructorWithBC"); ComponentInstance ci = fact.createComponentInstance(null); ci.dispose(); } catch (Throwable e) { fail(e.getMessage()); } }
0
* @version CVS $Id$
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 this file except in compliance with * the License. You may obtain a copy of the License at
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 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 * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
0
import org.apache.bcel.classfile.LocalVariableTypeTable; } else if (a instanceof LocalVariableTypeTable) { LocalVariable[] lv = ((LocalVariableTypeTable) a).getLocalVariableTypeTable(); removeLocalVariables(); for (int k = 0; k < lv.length; k++) { LocalVariable l = lv[k]; InstructionHandle start = il.findHandle(l.getStartPC()); InstructionHandle end = il.findHandle(l.getStartPC() + l.getLength()); // Repair malformed handles if (null == start) { start = il.getStart(); } if (null == end) { end = il.getEnd(); } addLocalVariable(l.getName(), Type.getType(l.getSignature()), l .getIndex(), start, end); } for (int i = 0; i < getAttributes().length; i++) { Attribute a = getAttributes()[i]; if (!((a instanceof Code) || (a instanceof ExceptionTable))) { buf.append(" [").append(a.toString()).append("]"); } }
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 applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ * @version CVS $Id: AvalonToCocoonSource.java,v 1.5 2004/03/05 13:02:41 bdelacretaz Exp $
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/rss/Attic/Channel.java,v 1.4 2003/02/02 15:53:56 rdonkin Exp $ * $Revision: 1.4 $ * $Date: 2003/02/02 15:53:56 $ * Copyright (c) 1999-2003 The Apache Software Foundation. All rights * @version $Revision: 1.4 $ $Date: 2003/02/02 15:53:56 $
0
* Creates a new instance of <code>Node</code> and sets the name and the value.
0
log.trace(String.format("tservers per batch : %,8.2f avg %,6d min %,6d max", tabletServersBatchSum / (double) numBatches, minTabletServersBatch, log.trace(String.format("tablets per batch : %,8.2f avg %,6d min %,6d max", tabletBatchSum / (double) numBatches, minTabletBatch, maxTabletBatch)); log.trace(String.format("JVM Compile Time : %,10.2f secs", (finalCompileTimes - initialCompileTimes) / 1000.0)); log.error("Server side error on " + server + ": " + e);
0
/** * A demonstration of reading entire rows and deleting entire rows. */
0
import org.apache.accumulo.core.security.tokens.UserPassToken; if (!shellState.getConnector().securityOperations().authenticateUser(new UserPassToken(currentUser, oldPassword))) shellState.getConnector().securityOperations().changeUserPassword(new UserPassToken(user, pass)); shellState.updateUser(user, pass);
0
/** * * * * * *
0
import static org.apache.beam.sdk.extensions.sql.SqlTypeCoders.INTEGER; import static org.apache.beam.sdk.extensions.sql.SqlTypeCoders.VARCHAR; .coder(INTEGER) .coder(VARCHAR)
0
/** * Abstract {@link ParamTypeBuilder} implementation for {@code setNext()}, {@code setRoot()} and {@code setTop()} * * @param <R> The rule type has to be created */ /** * {@inheritDoc} */ /** * {@inheritDoc} */ /** * {@inheritDoc} */ /** * {@inheritDoc} */
0
* Autogenerated by Thrift Compiler (0.9.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 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 in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.beam.sdk.testing; /** Category for tests that use {@link org.apache.beam.sdk.transforms.Impulse} transformations. */ public class UsesImpulse {}
0
private final boolean masterComponent; String hostName, boolean recoveryEnabled, boolean masterComponent) { this.masterComponent = masterComponent; public boolean isMasterComponent() { return masterComponent; } buffer.append("clusterId=").append(m_clusterId);
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 this file except in compliance with * the License. You may obtain a copy of the License at
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 this file except in compliance with the License. You may obtain a copy of the License at
0
* @version CVS $Id: PatternTransformer.java,v 1.6 2003/10/25 17:37:42 cziegeler Exp $ /* if (this.lexiconSource.getInputStream()==null) { }*/
0
/** * This plugin is called after analysis. The plugin is free to modify the * jar and/or change the classpath information (see referred, contained). * This plugin is called after analysis of the JAR but before manifest * generation. * * @param analyzer * @return true if the classpace has been modified so that the bundle * classpath must be reanalyzed * @throws Exception */ boolean analyzeJar(Analyzer analyzer) throws Exception;
0
// no arg constructor should do minimal work since its used in Main ServiceLoader public Shell() {} * @throws IOException * if problems occur creating the ConsoleReader public boolean config(String... args) throws IOException { if (this.reader == null) this.reader = new ConsoleReader(); new Shell(new ConsoleReader()).execute(args);
0
* Copyright 2002,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 applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * @version $Revision: 1.4 $
0
int b = this.buffer.get(); if (b < 0) { b = 256 + b; } return b;
0
import java.io.Serializable; import java.util.Objects; class ShardedKey<K> implements Serializable { @Override public String toString() { return "key: " + key + " shard: " + shardNumber; } @Override public boolean equals(Object o) { if (!(o instanceof ShardedKey)) { return false; } ShardedKey<K> other = (ShardedKey<K>) o; return (key == other.key) && (shardNumber == other.shardNumber); } @Override public int hashCode() { return Objects.hash(key, shardNumber); }
0
poolEntry.shutdownEntry(); poolEntry.shutdownEntry();
0
package org.apache.beam.runners.flink;
0
import org.apache.avalon.framework.service.ServiceException; import org.apache.avalon.framework.service.ServiceManager; * @version CVS $Id: Logicsheet.java,v 1.3 2004/02/07 15:20:09 joerg Exp $ * The ServiceManager of this instance. private ServiceManager manager; public Logicsheet(Source source, ServiceManager manager, SourceResolver resolver) public Logicsheet(String systemId, ServiceManager manager, SourceResolver resolver) } catch (ServiceException e) {
0
import java.lang.reflect.Method; import org.apache.beam.sdk.PipelineRunner; import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger LOG = LoggerFactory.getLogger(SerializableCoder.class); @Override public boolean consistentWithEquals() { return false; } /** * The structural value of the object is the object itself. The {@link SerializableCoder} should * be only used for objects with a proper {@link Object#equals} implementation. */ @Override public Object structuralValue(T value) { return value; } checkEqualsMethodDefined(clazz); private static <T extends Serializable> void checkEqualsMethodDefined(Class<T> clazz) { boolean warn = clazz.isInterface(); if (!warn) { Method method; try { method = clazz.getMethod("equals", Object.class); } catch (NoSuchMethodException e) { // All concrete classes have an equals method declared in their class hierarchy. throw new AssertionError(String.format("Concrete class %s has no equals method", clazz)); } // Check if not default Object#equals implementation. warn = Object.class.equals(method.getDeclaringClass()); } if (warn) { LOG.warn("Can't verify serialized elements of type {} have well defined equals method. " + "This may produce incorrect results on some {}", clazz.getSimpleName(), PipelineRunner.class.getSimpleName()); } }
0
import org.apache.accumulo.core.client.admin.ReplicationOperations; /** * Retrieves a ReplicationOperations object to manage replication configuration. * * @return an object to modify replication configuration * @since 1.7.0 */ public abstract ReplicationOperations replicationOperations();
0
info(getInstanceManager().getInstanceName() + " is reconfiguring the properties : " + configuration);
0
public static <T> PredicatedCollection<T> predicatedCollection(final Collection<T> coll, final Predicate<? super T> predicate) { protected PredicatedCollection(final Collection<E> coll, final Predicate<? super E> predicate) { for (final E item : coll) { protected void validate(final E object) { public boolean add(final E object) { public boolean addAll(final Collection<? extends E> coll) { for (final E item : coll) {
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 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 in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
0
final HttpRequestHandler handler = handlerResolver.lookup(requestURI);
0
* @see org.apache.felix.ipojo.architecture.Architecture#getDescription()
0
BeanUtilsBean.getInstance().getPropertyUtils().clearDescriptors();
0
import org.apache.ambari.server.state.UpgradeState; stateEntity.setUpgradeState(UpgradeState.NONE); } /*** * To be called during the upgrade of a specific Component in a host. * The potential upgrade states are NONE (default), PENDING, IN_PROGRESS, FAILED. * If the upgrade completes successfully, the upgradeState should be set back to NONE. * If the upgrade fails, then the user can retry to set it back into PENDING or IN_PROGRESS. * If the upgrade is aborted, then the upgradeState should be set back to NONE. * @param upgradeState */ @Override public void setUpgradeState(UpgradeState upgradeState) { clusterGlobalLock.readLock().lock(); try { writeLock.lock(); try { stateEntity.setUpgradeState(upgradeState); saveIfPersisted(); } finally { writeLock.unlock(); } } finally { clusterGlobalLock.readLock().unlock(); }
0
@Test public void setIterTest() throws IOException { Shell.log.debug("Starting setiter test --------------------------"); exec("createtable t", true); String cmdJustClass = "setiter -class VersioningIterator -p 1"; exec(cmdJustClass, false, "java.lang.IllegalArgumentException", false); exec(cmdJustClass, false, "fully qualified package name", true); String cmdFullPackage = "setiter -class o.a.a.foo -p 1"; exec(cmdFullPackage, false, "java.lang.IllegalArgumentException", false); exec(cmdFullPackage, false, "class not found", true); String cmdNoOption = "setiter -class java.lang.String -p 1"; exec(cmdNoOption, false, "Loaded", true); exec("deletetable t -f", true, "Table: [t] has been deleted"); }
0
* <p><em>Note:</em> This method does not work correctly with custom bean * introspection under certain circumstances. It may return {@code null} * even if a write method is defined for the property in question. Use * {@link #getWriteMethod(Class, PropertyDescriptor)} to be sure that the * correct result is returned.</p> * @since 1.9.1 public Method getWriteMethod(Class<?> clazz, PropertyDescriptor descriptor) {
0
* A SyncRequestProcessor is also spawned off to log proposals from the leader. public class FollowerZooKeeperServer extends LearnerZooKeeperServer { this.self = self; } new SendAckRequestProcessor((Learner)getFollower())); /** * When a COMMIT message is received, eventually this method is called, * which matches up the zxid from the COMMIT with (hopefully) the head of * the pendingTxns queue and hands it to the commitProcessor to commit. * @param zxid - must correspond to the head of pendingTxns if it exists */ @Override public Learner getLearner() { return getFollower(); }
0
import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set;
0
import java.util.Iterator;
0
import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.apache.atlas.ocf.properties.beans.Connection; import java.util.List; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) private ArrayList<TypeDefSummary> typeDefList = null; public List<TypeDefSummary> getTypeDefList() if (typeDefList == null) { return null; } else { return new ArrayList<>(typeDefList); } public void setTypeDefList(List<TypeDefSummary> typeDefList) if (typeDefList == null) { this.typeDefList = null; } else { this.typeDefList = new ArrayList<>(typeDefList); }
0
import org.apache.excalibur.source.Source; import org.apache.excalibur.source.SourceException; import org.apache.excalibur.source.SourceNotFoundException; import org.apache.excalibur.source.SourceValidity; import org.apache.excalibur.source.impl.validity.TimeStampValidity; * @version CVS $Id: CocoonToAvalonSource.java,v 1.3 2004/03/01 03:50:59 antonio Exp $
0
* according to {@link Object#equals(Object)}, the encoded bytes are * @throws NonDeterministicException never, unless overridden. A * {@link DeterministicStandardCoder} is presumed deterministic.
0
* @param target A target path {@link String} or {@link Handle} or {@code byte[]} * @param target A target path {@link String} or {@link Handle} or {@code byte[]} * @param target A target path {@link String} or {@link Handle} or {@code byte[]}
0