Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
* 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.
0
import org.apache.http.message.BasicHttpRequest; return new BasicHttpRequest("GET", "/");
0
/* * @author <a href="mailto:[email protected]">Felix Project Team</a> */
0
final String instanceID = getConnector().getInstanceID(); String instanceID = getConnector().getInstanceID();
0
sb.append("<*"); sb.append("*>"); case '*': { if (filterChars[pos + 1] == '>') { pos += 2; break; if (filterChars[pos + 1] == '*') { pos += 2; return new FilterImpl(FilterImpl.SUBSET, attr, parse_value()); } if (c == '<' && filterChars[pos+1] == '*') { if (c == '*' && filterChars[pos+1] == '>') {
0
import java.util.Set; Set<ClassInfo> classes = cp.getTopLevelClasses(IteratorTestCase.class.getPackage().getName());
0
expose(PendingTaskProcessor.class);
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
HashMap<String,String> site = new HashMap<>(); HashMap<String,String> site = new HashMap<>();
0
/** * Column family for tracking files that require replication */ public static class ReplicationColumnFamily { public static final Text NAME = new Text("repl"); }
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
import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.hadoop.io.Writable; import org.apache.hadoop.io.WritableUtils; public class IteratorSetting implements Writable { public IteratorSetting(DataInput din) throws IOException { this.properties = new HashMap<String,String>(); this.readFields(din); } @Override public void readFields(DataInput din) throws IOException { priority = WritableUtils.readVInt(din); name = WritableUtils.readString(din); iteratorClass = WritableUtils.readString(din); properties.clear(); int size = WritableUtils.readVInt(din); while (size > 0) { properties.put(WritableUtils.readString(din), WritableUtils.readString(din)); size--; } } @Override public void write(DataOutput dout) throws IOException { WritableUtils.writeVInt(dout, priority); WritableUtils.writeString(dout, name); WritableUtils.writeString(dout, iteratorClass); WritableUtils.writeVInt(dout, properties.size()); for (Entry<String,String> e : properties.entrySet()) { WritableUtils.writeString(dout, e.getKey()); WritableUtils.writeString(dout, e.getValue()); } }
0
import org.apache.hc.core5.annotation.Internal; * HTTP/2 multiplexing client side message exchange initiator. * /** * Use {@link Http2MultiplexingRequesterBootstrap} to create instances of this class. */ @Internal
0
import org.apache.http.ExceptionLogger; private final ExceptionLogger exceptionLogger; /** * Creates new instance of <tt>HttpAsyncRequestExecutor</tt>. * @param waitForContinue wait for continue time period. * @param exceptionLogger Exception logger. If <code>null</code> * {@link ExceptionLogger#NO_OP} will be used. Please note that the exception * logger will be only used to log I/O exception thrown while closing * {@link java.io.Closeable} objects (such as {@link org.apache.http.HttpConnection}). * * @since 4.4 */ public HttpAsyncRequestExecutor( final int waitForContinue, final ExceptionLogger exceptionLogger) { super(); this.waitForContinue = Args.positive(waitForContinue, "Wait for continue time"); this.exceptionLogger = exceptionLogger != null ? exceptionLogger : ExceptionLogger.NO_OP; } this(waitForContinue, null); this(DEFAULT_WAIT_FOR_CONTINUE, null); this.exceptionLogger.log(ex);
0
* @version $Id$
1
deleteWithCheck(fileHandle); private void deleteWithCheck(File handle){ if (!handle.delete()){ System.err.println("Failed to delete: "+handle.getPath()); } } deleteWithCheck(fileHandle); deleteWithCheck(fileHandle); deleteWithCheck(fileHandle);
0
* @return The index of the glyph within the coverage, or -1 if the glyph
1
configureAdditionalContentTypes(root); private void configureAdditionalContentTypes(ServletContextHandler root) { root.getMimeTypes().addMimeMapping("woff", "application/font-woff"); root.getMimeTypes().addMimeMapping("ttf", "application/font-sfnt"); }
0
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
0
// There should only be one extra WALog that replication doesn't know about replRows.removeAll(wals); Assert.assertEquals(2, wals.size()); Assert.assertEquals(0, replRows.size());
0
if (!(pObject instanceof String)) {
0
import org.apache.accumulo.core.util.DeprecationUtil; DeprecationUtil.setMockInstance(split, true); Assert.assertEquals(DeprecationUtil.isMockInstanceSet(split), DeprecationUtil.isMockInstanceSet(newSplit));
0
import org.apache.ambari.server.orm.entities.RepoDefinitionEntity; import org.apache.ambari.server.orm.entities.RepoOsEntity;
0
package org.apache.batik.extension.svg; import org.apache.batik.gvt.text.GVTAttributedCharacterIterator;
1
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
* Modified method attached to the dependency. */ private String m_modified; /** if (m_modified != null) { Element cb = new Element("callback", ""); cb.addAttribute(new Attribute("type", "modified")); cb.addAttribute(new Attribute("method", m_modified)); dep.addElement(cb); } * Sets the dependency modified method. * @param modified the modified method * @return the current dependency object. */ public Dependency setModifiedMethod(String modified) { m_modified = modified; return this; } /**
0
package org.apache.commons.ognl; import org.apache.commons.ognl.enhance.OrderedReturn; import org.apache.commons.ognl.enhance.UnsupportedCompilationException;
0
/* * $Id$ * 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
if (server.equals(migrations.get(tls.extent))) migrations.remove(tls.extent); // log.info("Current servers " + currentTServers.keySet()); if (dest != null) { // if destination is still good, assign it if (destinations.keySet().contains(dest)) { assignments.add(new Assignment(tls.extent, dest)); } else { // get rid of this migration migrations.remove(tls.extent); unassigned.put(tls.extent, server); } // log.info("Current servers " + currentTServers.keySet()); migrations.keySet().retainAll(found);
0
public static RunnerApi.Pipeline toProto(Pipeline pipeline) { return toProto(pipeline, SdkComponents.create()); } public static RunnerApi.Pipeline toProto( final Pipeline pipeline, final SdkComponents components) {
0
HttpConnectionManagerParams.setTimeout(params, 10L);
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
try (AccumuloClient client = createClient()) { try (AccumuloClient client = createClient()) { try (AccumuloClient client = createClient()) { try (AccumuloClient client = createClient()) { try (AccumuloClient client = createClient()) { try (AccumuloClient client = createClient()) { try (AccumuloClient client = createClient()) { try (AccumuloClient client = createClient()) { try (AccumuloClient client = createClient()) { try (AccumuloClient client = createClient()) { try (AccumuloClient client = createClient()) { try (AccumuloClient client = createClient()) { try (AccumuloClient client = createClient()) {
0
import com.google.common.base.Charsets; testValues(toBytes("a")).write("b".getBytes(Charsets.UTF_8)); builder.add(value.getBytes(Charsets.UTF_8));
0
ColumnAgeOffFilter copy = (ColumnAgeOffFilter) super.deepCopy(env); copy.currentTime = currentTime; copy.ttls = ttls; return copy;
0
import org.apache.ambari.server.stack.upgrade.Direction;
0
.coder( CalciteUtils.toCoder(
0
try (BufferedWriter out = new BufferedWriter(new OutputStreamWriter(failFile, UTF_8))) {
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory;
0
package aQute.libg.sax.filters; import java.util.Collections; import java.util.LinkedList; import java.util.List; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import aQute.libg.sax.ContentFilterImpl; import aQute.libg.sax.SAXElement; public class MergeContentFilter extends ContentFilterImpl { private int elementDepth = 0; private final List<SAXElement> rootElements = new LinkedList<SAXElement>(); @Override public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { if (elementDepth++ == 0) { if (rootElements.isEmpty()) super.startElement(uri, localName, qName, atts); else if (!rootElements.get(0).getqName().equals(qName)) throw new SAXException(String.format("Documents have inconsistent root element names: first was %s, current is %s.", rootElements.get(0).getqName(), qName)); rootElements.add(new SAXElement(uri, localName, qName, atts)); } else { super.startElement(uri, localName, qName, atts); } } @Override public void endElement(String uri, String localName, String qName) throws SAXException { if (--elementDepth > 0) { super.endElement(uri, localName, qName); } } @Override public void processingInstruction(String target, String data) throws SAXException { if (rootElements.isEmpty()) super.processingInstruction(target, data); } public void closeRootAndDocument() throws SAXException { if (!rootElements.isEmpty()) { SAXElement root = rootElements.get(0); super.endElement(root.getUri(), root.getLocalName(), root.getqName()); } super.endDocument(); } public List<SAXElement> getRootElements() { return Collections.unmodifiableList(rootElements); } }
0
assertEquals("(x)->{ x + x; };", fsstr); public void testLambdaLambda() throws Exception { JexlEngine jexl = new Engine(); String strs = "var t = 19; ( (x, y)->{ var t = 20; x + y + t} )(15, 7);"; JexlScript s42 = jexl.createScript(strs); Object result = s42.execute(null); assertEquals(42, result); strs = "( (x, y)->{ ( (xx, yy)->{xx + yy } )(x, y) } )(15, 27)"; s42 = jexl.createScript(strs); result = s42.execute(null); assertEquals(42, result); strs = "var t = 19; var s = (x, y)->{ var t = 20; x + y + t}; t = 54; s(15, 7)"; s42 = jexl.createScript(strs); result = s42.execute(null); assertEquals(42, result); } public void testNestLambda() throws Exception { JexlEngine jexl = new Engine(); String strs = "( (x)->{ (y)->{ x + y } })(15)(27)"; JexlScript s42 = jexl.createScript(strs); Object result = s42.execute(null); assertEquals(42, result); }
1
* @version CVS $Id: CronJob.java,v 1.3 2003/09/05 10:13:55 giacomo Exp $ *
0
if (response.countHeaders(HeaderConstants.AGE) > 1) { if (response.countHeaders(HeaderConstants.EXPIRES) > 1) { if (response.countHeaders(HttpHeaders.DATE) > 1) { if (request.countHeaders(HeaderConstants.AUTHORIZATION) > 0
0
* Wrapped data transmitter that all calls are delegated to. private final HttpDataTransmitter out; * @param out The data transmitter to wrap public ContentLengthOutputStream(final HttpDataTransmitter out, long contentLength) { throw new IllegalArgumentException("HTTP data transmitter may not be null"); this.out = out; this.out.flush(); this.out.flush(); this.out.write(b, off, len); this.out.write(b);
0
package org.apache.sshd.cli.client; ClientSession session = SshClientCliSupport.setupClientSession("-P", stdin, stdout, stderr, args);
0
public int hashCode() { // uncomment when JDK 1.4 is required // assert false : "hashCode not designed"; return 58; }
0
import java.util.ArrayList; import org.apache.http.NameValuePair; import org.apache.http.client.utils.URLEncodedUtils; import org.apache.http.message.BasicNameValuePair; /** * Converts the new corrected property names to the old names for the backend. * Because both the /stacks and /stacks2 api use the same underlying classes, we * need to convert the new corrected property names to the old names for the backend. * This should be removed when /stacks2 is removed and we can change the property names * in the resource definitions to the new form. */ private String normalizeComponentNames(String value) { if (value == null) { return null; } value = value.replaceAll("services/", "stackServices/"); value = value.replaceAll("components/", "serviceComponents/"); value = value.replaceAll("operating_systems/", "operatingSystems/"); return value; } String uriPath = m_delegate.getRequestUri().getPath(); UriBuilder uriBuilder = UriBuilder.fromUri(m_delegate.getRequestUri()); List<NameValuePair> parametersList = URLEncodedUtils.parse(m_delegate.getRequestUri(), "UTF-8"); List<NameValuePair> newQuery = new ArrayList<NameValuePair>(); for (NameValuePair nameValuePair : parametersList) { newQuery.add(new BasicNameValuePair(normalizeComponentNames(nameValuePair.getName()), normalizeComponentNames(nameValuePair.getValue()))); uriBuilder.replacePath(normalizeComponentNames(uriPath)); uriBuilder.replaceQuery(URLEncodedUtils.format(newQuery, "UTF-8")); return uriBuilder.build();
0
private int maxWaitMillis = (int)Math.min(Integer.MAX_VALUE, GenericObjectPoolConfig.DEFAULT_MAX_WAIT_MILLIS); public int getMaxWaitMillis() { return (this.maxWaitMillis); public void setMaxWaitMillis(int maxWaitMillis) { this.maxWaitMillis = maxWaitMillis; config.setMaxWaitMillis(getMaxWaitMillis()); if (maxWaitMillis == 0) {
0
assertEquals("HTTP/1.1 200 ", s); // compare with "testParseSuccess" above: trailing space is correct
0
transfer.mask = true; fooKey3.mask = true; assertTrue(report.getStdOut().contains("******"));
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: ChainMetaModule.java,v 1.4 2004/03/05 13:02:48 bdelacretaz Exp $
1
final String instanceID = getAccumuloClient().getInstanceID(); String instanceID = getAccumuloClient().getInstanceID();
0
import static org.apache.ambari.server.controller.metrics.MetricsServiceProvider.MetricsService.GANGLIA;
0
package org.apache.ambari.server.stack.upgrade; import org.apache.ambari.server.stack.upgrade.ConfigUpgradeChangeDefinition.ConfigurationKeyValue; import org.apache.ambari.server.stack.upgrade.ConfigUpgradeChangeDefinition.Insert; import org.apache.ambari.server.stack.upgrade.ConfigUpgradeChangeDefinition.Replace; import org.apache.ambari.server.stack.upgrade.ConfigUpgradeChangeDefinition.Transfer; import org.apache.ambari.server.stack.upgrade.orchestrate.StageWrapper;
0
/** * 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. */ package org.apache.aurora.scheduler.storage.db; import java.util.List; import org.apache.aurora.gen.Lock; import org.apache.aurora.gen.LockKey; import org.apache.aurora.scheduler.storage.db.views.LockRow; /** * MyBatis mapper class for LockMapper.xml * * See http://mybatis.github.io/mybatis-3/sqlmap-xml.html for more details. */ interface LockMapper { /** * Inserts a lock into the database. */ void insert(Lock lock); /** * Deletes all locks from the database with the given lockKey. */ void delete(LockKey lockKey); /** * Deletes all locks from the database. */ void truncate(); /** * Selects all locks from the database as {@link LockRow} instances. */ List<LockRow> selectAll(); /** * Fetches the lock with the given lock key. */ LockRow select(LockKey lockKey); }
0
import java.net.SocketException; public void setSocketTimeout(int timeout) throws SocketException { assertOpen(); if (this.socket != null) { this.socket.setSoTimeout(timeout); } }
0
client = new Http2TestClient(buildReactorConfig(), protected IOReactorConfig buildReactorConfig() { return IOReactorConfig.DEFAULT; }
0
} catch (final UnsupportedEncodingException ex) {
0
import javax.persistence.EntityManager; import org.apache.ambari.server.orm.entities.HostComponentStateEntity; import org.apache.ambari.server.orm.entities.HostEntity; import org.junit.Test; import com.google.inject.Provider;
0
p.run().waitUntilFinish(); p.run().waitUntilFinish(); p.run().waitUntilFinish();
0
void initialize(GVTBuilder gvtBuilder) {
0
public Response getDefinitions(@Context HttpHeaders headers, return handleRequest(headers, null, ui, Request.Type.GET, public Response getDefinitions(@Context HttpHeaders headers, return handleRequest(headers, null, ui, Request.Type.GET,
0
* @version $Id$
0
* @version $Id$
0
* Support for the 'preserveAspectRatio' interface on the SVG element.
0
* {@code startDate} to {@code startDate + 100 years}. This value may * be {@code null}. When {@code null} is given as a parameter, year
0
package org.apache.beam.sdk.extensions.gcp.storage;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbutils/src/java/org/apache/commons/dbutils/Attic/ColumnProcessor.java,v 1.2 2003/12/07 17:25:01 dgraham Exp $ * $Revision: 1.2 $ * $Date: 2003/12/07 17:25:01 $ import java.beans.PropertyDescriptor; import java.sql.ResultSetMetaData; * <code>ColumnProcessor</code> implementations match * column names to bean property names and convert * <code>ResultSet</code> columns into objects for those bean properties. * The processor is invoked when creating a JavaBean from a * <code>ResultSet</code>. * Special array index used by <code>mapColumnsToProperties</code> that * indicates there is no bean property that matches a column from a * <code>ResultSet</code>. */ public static final int PROPERTY_NOT_FOUND = -1; /** * The positions in the returned array represent column numbers. The * values stored at each position represent the index in the * <code>PropertyDescriptor[]</code> for the bean property that matches * the column name. If no bean property was found for a column, the * position is set to <code>PROPERTY_NOT_FOUND</code>. * * @param rsmd The <code>ResultSetMetaData</code> containing column * information. * * @param props The bean property descriptors. * * @return An int[] with column index to property index mappings. The 0th * element is meaningless because JDBC column indexing starts at 1. * * @throws SQLException */ public int[] mapColumnsToProperties( ResultSetMetaData rsmd, PropertyDescriptor[] props) throws SQLException; /**
0
package org.apache.beam.runners.core.metrics; import org.apache.beam.runners.core.metrics.ExecutionStateTracker.ExecutionState; /** Tests for {@link org.apache.beam.runners.core.metrics.ExecutionStateSampler}. */
0
* http://www.apache.org/licenses/LICENSE-2.0 *
1
/** Generated serial version ID. */
0
import org.osgi.framework.ServiceReference; import org.osgi.service.startlevel.StartLevel; // Get start level service. ServiceReference ref = m_context.getServiceReference( org.osgi.service.startlevel.StartLevel.class.getName()); StartLevel sl = null; if (ref != null) { sl = (StartLevel) m_context.getService(ref); } if (sl == null) { out.println("StartLevel service is unavailable."); } printBundleList((Bundle[]) found.toArray(new Bundle[found.size()]), sl, out, false, false, false);
0
package org.apache.felix.serializer.impl.json; import org.apache.felix.serializer.impl.json.MyDTO.Count; import org.apache.felix.serializer.impl.json.MyEmbeddedDTO.Alpha; import org.apache.felix.serializer.serializer.json.JsonCodecImpl; String json = jsonCodec.serialize(m).toString(); Map m2 = jsonCodec.deserialize(Map.class).from(json); String json = jsonCodec.with(ca).serialize(m).toString(); String json = jsonCodec.serialize(dto).toString(); MyDTO dto2 = jsonCodec.deserialize(MyDTO.class).from(json);
0
* @author <A HREF="mailto:[email protected]">M. Dahm</A> /** Get the ClassPath associated with this Repository */ public ClassPath getClassPath();
0
private Log log = LogFactory.getLog(LocaleBeanUtilsBean.class);
0
public void mergeBufferAndPost(List<HostComponentsUpdateEvent> events, EventBus m_eventBus) { List<HostComponentUpdate> hostComponentUpdates = events.stream().flatMap( u -> u.getHostComponentUpdates().stream()).collect(Collectors.toList()); HostComponentsUpdateEvent resultEvents = new HostComponentsUpdateEvent(hostComponentUpdates); //TODO add logging and metrics posting m_eventBus.post(resultEvents);
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 * 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
public ClassPathRepository(final ClassPath classPath) { _path = classPath; * Stores a new JavaClass instance into this Repository. public void storeClass(final JavaClass javaClass) { _loadedClasses.put(javaClass.getClassName(), javaClass); javaClass.setRepository(this); * Removes class from repository public void removeClass(final JavaClass javaClass) { _loadedClasses.remove(javaClass.getClassName()); * Finds an already defined (cached) JavaClass object by name. * Finds a JavaClass object by name. If it is already in this Repository, the Repository version is returned. Otherwise, the Repository's classpath is * Finds the JavaClass object for a runtime Class object. If a class with the same name is already in this Repository, the Repository version is returned. private JavaClass loadClass(final InputStream inputStream, final String className) throws ClassNotFoundException { if (inputStream != null) { final ClassParser parser = new ClassParser(inputStream, className); if (inputStream != null) { inputStream.close(); * Clears all entries from cache.
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbcp/src/test/org/apache/commons/dbcp/TesterConnection.java,v 1.5 2003/08/11 23:40:40 dirkv Exp $ * $Revision: 1.5 $ * $Date: 2003/08/11 23:40:40 $ * @version $Id: TesterConnection.java,v 1.5 2003/08/11 23:40:40 dirkv Exp $ protected SQLWarning warnings = null; public void setWarnings(SQLWarning warning) { this.warnings = warning; } warnings = null; return warnings;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/xml/Attic/ParseTag.java,v 1.3 2002/02/19 15:40:58 jstrachan Exp $ * $Revision: 1.3 $ * $Date: 2002/02/19 15:40:58 $ * $Id: ParseTag.java,v 1.3 2002/02/19 15:40:58 jstrachan Exp $ import org.apache.commons.logging.LogFactory; * @version $Revision: 1.3 $ private static final Log log = LogFactory.getLog( ParseTag.class );
0
import org.ow2.chameleon.testing.helpers.TimeUtils; TimeUtils.grace(500);
0
import java.util.Objects; return Objects.hash(title, link); return Objects.equals(title, other.title) && Objects.equals(link, other.link); @Override public boolean equals(Object o) { if (!(o instanceof DisplayMetric)) { return false; } DisplayMetric other = (DisplayMetric) o; return super.equals(o) && display.equals(other.display); } @Override public int hashCode() { return Objects.hash(super.hashCode(), display); }
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
import org.apache.accumulo.server.test.MiniAccumuloCluster;
0
for (final Field f : publicFields) {
0
import org.apache.commons.collections4.Unmodifiable; //----------------------------------------------------------------------- public void testUnmodifiable() { assertTrue(makeObject() instanceof Unmodifiable); assertTrue(makeFullMap() instanceof Unmodifiable); } public void testDecorateFactory() { final SortedBidiMap<K, V> map = makeFullMap(); assertSame(map, UnmodifiableSortedBidiMap.unmodifiableSortedBidiMap(map)); try { UnmodifiableSortedBidiMap.unmodifiableSortedBidiMap(null); fail(); } catch (final IllegalArgumentException ex) {} }
0
import org.apache.ambari.server.controller.RootComponent; import org.apache.ambari.server.controller.RootService; String ambariServiceName = RootService.AMBARI.name(); String agentComponentName = RootComponent.AMBARI_AGENT.name();
0
import org.apache.sshd.util.test.CommonTestSupportUtils; CommonTestSupportUtils.generateKeyPair(KeyUtils.RSA_ALGORITHM, 1024), CommonTestSupportUtils.generateKeyPair(KeyUtils.DSS_ALGORITHM, 512), CommonTestSupportUtils.generateKeyPair(KeyUtils.EC_ALGORITHM, 256)); final KeyPair clientIdentity = CommonTestSupportUtils.generateKeyPair(KeyUtils.EC_ALGORITHM, 256); KeyPair otherPair = org.apache.sshd.util.test.CommonTestSupportUtils.generateKeyPair(KeyUtils.RSA_ALGORITHM, 1024); KeyPair clientIdentity = CommonTestSupportUtils.generateKeyPair(KeyUtils.RSA_ALGORITHM, 1024); KeyPair hostClientKey = CommonTestSupportUtils.generateKeyPair(KeyUtils.RSA_ALGORITHM, 1024); KeyPair kp = CommonTestSupportUtils.generateKeyPair(KeyUtils.RSA_ALGORITHM, 1024);
0
import org.apache.atlas.exception.AtlasBaseException; public abstract void apply() throws AtlasBaseException;
0
public static final boolean isMultipartContent( * @param fileItemFactory The factory to use for creating file items. throws FileUploadException { throws FileUploadException, IOException {
0
* {@link org.apache.hc.core5.reactor.IOEventHandler} that implements * client side HTTP/2 messaging protocol with full support for * multiplexed message transmission.
0
* @version $Id$
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/impl/TagScript.java,v 1.34 2003/01/24 10:04:32 morgand Exp $ * $Revision: 1.34 $ * $Date: 2003/01/24 10:04:32 $ * $Id: TagScript.java,v 1.34 2003/01/24 10:04:32 morgand Exp $ * @version $Revision: 1.34 $ throws JellyException {
0
} catch (NumberFormatException nfEx ) { (ctx, filterElement, nfEx, ERR_ATTRIBUTE_VALUE_MALFORMED, } catch (NumberFormatException nfEx ) { (ctx, filterElement, nfEx, ERR_ATTRIBUTE_VALUE_MALFORMED,
0
import jline.console.completer.Completer;
0
/** * Map of service to set of excluded config types */ private Map<String, Set<String>> excludedConfigurationTypes = new HashMap<String, Set<String>>(); parseExcludedConfigurations(stackService); * Get the set of excluded configuration types * for this service * * @param service service name * * @return Set of names of excluded config types */ public Set<String> getExcludedConfigurationTypes(String service) { return excludedConfigurationTypes.get(service); } /** * Obtain the excluded configuration types from the StackServiceResponse * * @param stackServiceResponse the response object associated with this stack service */ private void parseExcludedConfigurations(StackServiceResponse stackServiceResponse) { excludedConfigurationTypes.put(stackServiceResponse.getServiceName(), stackServiceResponse.getExcludedConfigTypes()); } /**
0
package org.apache.hc.core5.testing.nio.http;
0
package org.apache.commons.dbcp2;
1
* Bridge class for the &lt;image&gt; element. * Constructs a new bridge for the &lt;image&gt; element.
0