method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public Object getAttribute(String attributeName) throws BasicException
{
try
{
Object attributeValue = getConnection().getAttribute(m_objectName, attributeName);
return attributeValue;
}
catch (InstanceNotFoundException e)
{
String message = "Attribute not found: "
+ String.format(MESSAGE... | Object function(String attributeName) throws BasicException { try { Object attributeValue = getConnection().getAttribute(m_objectName, attributeName); return attributeValue; } catch (InstanceNotFoundException e) { String message = STR + String.format(MESSAGE_FORMAT_SERVER_OBJECT, m_serverName, m_objectName.toString());... | /**
* Generic method to read a single attribute from a remote MBean.
* This method does a network call.
* This method is also used by all the getAttributeAs<Type> methods.
*
* @param attributeName name of the attribute within the currently selected MBean
* @return The JMX matching object
* @throws Ba... | Generic method to read a single attribute from a remote MBean. This method does a network call. This method is also used by all the getAttributeAs methods | getAttribute | {
"repo_name": "ExpediaDotCom/EchoX3",
"path": "EchoX3Client/src/main/java/com/expedia/echox3/basics/monitoring/jvm/BasicMBeanProxy.java",
"license": "apache-2.0",
"size": 12110
} | [
"com.expedia.echox3.basics.monitoring.event.BasicEvent",
"com.expedia.echox3.basics.monitoring.event.BasicException",
"javax.management.InstanceNotFoundException"
] | import com.expedia.echox3.basics.monitoring.event.BasicEvent; import com.expedia.echox3.basics.monitoring.event.BasicException; import javax.management.InstanceNotFoundException; | import com.expedia.echox3.basics.monitoring.event.*; import javax.management.*; | [
"com.expedia.echox3",
"javax.management"
] | com.expedia.echox3; javax.management; | 644,897 |
// TODO: logging?
// TODO: are @nullable and @non-null annotations still a thing?
// TODO: prolly belongs in a factory.
public static PatentDocument patentDocumentFromXMLFile(File inputPath)
throws IOException, ParserConfigurationException,
SAXException, TransformerConfigurationException,
Tran... | static PatentDocument function(File inputPath) throws IOException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, XPathExpressionException { InputStream iStream = null; iStream = new BufferedInputStream(new FileInputStream(inputPath)); if (GZIP_PATTERN.matcher(input... | /**
* Converts an XML file into a patent document object, extracting relevant fields from the patent XML.
*
* @param inputPath A path to the file to be read.
* @return A patent object if the XML can be read, or null otherwise.
* @throws IOException Thrown on file I/O errors.
* @throws... | Converts an XML file into a patent document object, extracting relevant fields from the patent XML | patentDocumentFromXMLFile | {
"repo_name": "20n/act",
"path": "reachables/src/main/java/com/twentyn/patentExtractor/PatentDocument.java",
"license": "gpl-3.0",
"size": 21702
} | [
"java.io.BufferedInputStream",
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream",
"java.util.zip.GZIPInputStream",
"javax.xml.parsers.ParserConfigurationException",
"javax.xml.transform.TransformerConfigurationException",
"javax.xml.transform.TransformerExceptio... | import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.zip.GZIPInputStream; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerConfigurationException; import javax.xml.tra... | import java.io.*; import java.util.zip.*; import javax.xml.parsers.*; import javax.xml.transform.*; import javax.xml.xpath.*; import org.xml.sax.*; | [
"java.io",
"java.util",
"javax.xml",
"org.xml.sax"
] | java.io; java.util; javax.xml; org.xml.sax; | 881,246 |
public int getDepth() {
return getSize() - 1;
}
private static class StringBufferOutputStream extends OutputStream {
private StringWriter writer = new StringWriter();
| int function() { return getSize() - 1; } private static class StringBufferOutputStream extends OutputStream { private StringWriter writer = new StringWriter(); | /**
* Get the depth of this relationship. Depth is a concept that can be defined by each relationship type.
* The default notion of depth is the number of pointers that need to be traversed to go from the source
* to target synset. This is basically getSize() - 1.
*/ | Get the depth of this relationship. Depth is a concept that can be defined by each relationship type. The default notion of depth is the number of pointers that need to be traversed to go from the source to target synset. This is basically getSize() - 1 | getDepth | {
"repo_name": "duguyue100/chomsky",
"path": "resource/jwnl14-rc2/src/net/didion/jwnl/data/relationship/Relationship.java",
"license": "gpl-3.0",
"size": 3608
} | [
"java.io.OutputStream",
"java.io.StringWriter"
] | import java.io.OutputStream; import java.io.StringWriter; | import java.io.*; | [
"java.io"
] | java.io; | 1,856,416 |
public String toString(String pattern) {
if (pattern == null) {
return toString();
}
return DateTimeFormat.forPattern(pattern).print(this);
} | String function(String pattern) { if (pattern == null) { return toString(); } return DateTimeFormat.forPattern(pattern).print(this); } | /**
* Output the date using the specified format pattern.
* Unsupported fields will appear as special unicode characters.
*
* @param pattern the pattern specification, null means use <code>toString</code>
* @see org.joda.time.format.DateTimeFormat
*/ | Output the date using the specified format pattern. Unsupported fields will appear as special unicode characters | toString | {
"repo_name": "syntelos/gap-data",
"path": "types/lib/joda-time/src/org/joda/time/Partial.java",
"license": "lgpl-3.0",
"size": 38829
} | [
"org.joda.time.format.DateTimeFormat"
] | import org.joda.time.format.DateTimeFormat; | import org.joda.time.format.*; | [
"org.joda.time"
] | org.joda.time; | 1,350,242 |
@Nullable
public static String optString(@Nullable Bundle bundle, @Nullable String key) {
return optString(bundle, key, null);
} | static String function(@Nullable Bundle bundle, @Nullable String key) { return optString(bundle, key, null); } | /**
* Returns a optional {@link java.lang.String} value. In other words, returns the value mapped by key if it exists and is a {@link java.lang.String}.
* The bundle argument is allowed to be {@code null}. If the bundle is null, this method returns null.
* @param bundle a bundle. If the bundle is null, t... | Returns a optional <code>java.lang.String</code> value. In other words, returns the value mapped by key if it exists and is a <code>java.lang.String</code>. The bundle argument is allowed to be null. If the bundle is null, this method returns null | optString | {
"repo_name": "nohana/Amalgam",
"path": "amalgam/src/main/java/com/amalgam/os/BundleUtils.java",
"license": "apache-2.0",
"size": 55053
} | [
"android.os.Bundle",
"android.support.annotation.Nullable"
] | import android.os.Bundle; import android.support.annotation.Nullable; | import android.os.*; import android.support.annotation.*; | [
"android.os",
"android.support"
] | android.os; android.support; | 1,168,830 |
public static LinkedBuffer writeAscii(final String str, final WriteSession session,
final OutputStream out, final LinkedBuffer lb) throws IOException
{
final int len = str.length();
if(len == 0)
return lb;
int offset = lb.offset;
final in... | static LinkedBuffer function(final String str, final WriteSession session, final OutputStream out, final LinkedBuffer lb) throws IOException { final int len = str.length(); if(len == 0) return lb; int offset = lb.offset; final int limit = lb.buffer.length; final byte[] buffer = lb.buffer; session.size += len; if(offset... | /**
* Writes the ascii bytes from the string into the {@link LinkedBuffer}.
* It is the responsibility of the caller to know in advance that the string is 100% ascii.
* E.g if you convert a double/float to a string, you are sure it only contains ascii chars.
*/ | Writes the ascii bytes from the string into the <code>LinkedBuffer</code>. It is the responsibility of the caller to know in advance that the string is 100% ascii. E.g if you convert a double/float to a string, you are sure it only contains ascii chars | writeAscii | {
"repo_name": "waahoo/protostuff",
"path": "protostuff-api/src/main/java/com/dyuproject/protostuff/StreamedStringSerializer.java",
"license": "apache-2.0",
"size": 21335
} | [
"java.io.IOException",
"java.io.OutputStream"
] | import java.io.IOException; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 453,518 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<JobInner>> getWithResponseAsync(
String resourceGroupName, String accountName, String transformName, String jobName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<JobInner>> function( String resourceGroupName, String accountName, String transformName, String jobName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() ==... | /**
* Gets a Job.
*
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
* @param transformName The Transform name.
* @param jobName The Job name.
* @param context The context to associate with t... | Gets a Job | getWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsClientImpl.java",
"license": "mit",
"size": 66903
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.mediaservices.fluent.models.JobInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.mediaservices.fluent.models.JobInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.mediaservices.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 299,450 |
@Override
public void endVisit(ParenthesizedExpression node) {
Expression expr = node.getExpression();
if (expr instanceof ParenthesizedExpression) {
Expression inner = ((ParenthesizedExpression) expr).getExpression();
if (isEqualityExpression(inner)) {
node.replaceWith(TreeUtil.remove(e... | void function(ParenthesizedExpression node) { Expression expr = node.getExpression(); if (expr instanceof ParenthesizedExpression) { Expression inner = ((ParenthesizedExpression) expr).getExpression(); if (isEqualityExpression(inner)) { node.replaceWith(TreeUtil.remove(expr)); } } else if (!(node.getParent() instanceof... | /**
* If an equality (==) expression has double-parentheses, remove one set.
* This avoids clang's -Wparentheses-equality warning.
*/ | If an equality (==) expression has double-parentheses, remove one set. This avoids clang's -Wparentheses-equality warning | endVisit | {
"repo_name": "zhakui/j2objc",
"path": "translator/src/main/java/com/google/devtools/j2objc/translate/ComplexExpressionExtractor.java",
"license": "apache-2.0",
"size": 7545
} | [
"com.google.devtools.j2objc.ast.Expression",
"com.google.devtools.j2objc.ast.ParenthesizedExpression",
"com.google.devtools.j2objc.ast.TreeUtil"
] | import com.google.devtools.j2objc.ast.Expression; import com.google.devtools.j2objc.ast.ParenthesizedExpression; import com.google.devtools.j2objc.ast.TreeUtil; | import com.google.devtools.j2objc.ast.*; | [
"com.google.devtools"
] | com.google.devtools; | 802,173 |
private void checkTravelTimeDimension (RegionalWorkResult workResult) {
// In one-to-one mode, we expect only one value per origin, the destination point at the same pointset index as
// the origin point. Otherwise, for each origin, we expect one value per destination.
final int nDestination... | void function (RegionalWorkResult workResult) { final int nDestinations = job.templateTask.oneToOne ? 1 : destinationPointSet.featureCount(); checkDimension(workResult, STR, workResult.travelTimeValues.length, nPercentiles); for (int[] percentileResult : workResult.travelTimeValues) { checkDimension(workResult, STR, pe... | /**
* Check that each dimension of the 2D results array matches the expected size for the job being processed.
* There are different dimension requirements for accessibility and travel time results, so two different methods.
*/ | Check that each dimension of the 2D results array matches the expected size for the job being processed. There are different dimension requirements for accessibility and travel time results, so two different methods | checkTravelTimeDimension | {
"repo_name": "conveyal/analysis-backend",
"path": "src/main/java/com/conveyal/analysis/results/MultiOriginAssembler.java",
"license": "mit",
"size": 17795
} | [
"com.conveyal.r5.analyst.cluster.RegionalWorkResult"
] | import com.conveyal.r5.analyst.cluster.RegionalWorkResult; | import com.conveyal.r5.analyst.cluster.*; | [
"com.conveyal.r5"
] | com.conveyal.r5; | 1,175,996 |
RedisFuture<String> flushall(FlushMode flushMode); | RedisFuture<String> flushall(FlushMode flushMode); | /**
* Remove all keys from all databases using the specified {@link FlushMode}.
*
* @param flushMode the flush mode (sync/async).
* @return String simple-string-reply.
* @since 6.1
*/ | Remove all keys from all databases using the specified <code>FlushMode</code> | flushall | {
"repo_name": "lettuce-io/lettuce-core",
"path": "src/main/java/io/lettuce/core/api/async/RedisServerAsyncCommands.java",
"license": "apache-2.0",
"size": 12930
} | [
"io.lettuce.core.FlushMode",
"io.lettuce.core.RedisFuture"
] | import io.lettuce.core.FlushMode; import io.lettuce.core.RedisFuture; | import io.lettuce.core.*; | [
"io.lettuce.core"
] | io.lettuce.core; | 1,732,122 |
@ServiceMethod(returns = ReturnType.SINGLE)
BackupVaultResourceInner update(String vaultName, String resourceGroupName, PatchResourceRequestInput parameters); | @ServiceMethod(returns = ReturnType.SINGLE) BackupVaultResourceInner update(String vaultName, String resourceGroupName, PatchResourceRequestInput parameters); | /**
* Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource.
*
* @param vaultName The name of the backup vault.
* @param resourceGroupName The name of the resource group where the backup vault is present.
* @param parameters Request body for ope... | Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource | update | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupVaultsClient.java",
"license": "mit",
"size": 15644
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner",
"com.azure.resourcemanager.dataprotection.models.PatchResourceRequestInput"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner; import com.azure.resourcemanager.dataprotection.models.PatchResourceRequestInput; | import com.azure.core.annotation.*; import com.azure.resourcemanager.dataprotection.fluent.models.*; import com.azure.resourcemanager.dataprotection.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 563,321 |
public static Label waitLabel(Container cont, ComponentChooser chooser) {
return waitLabel(cont, chooser, 0);
} | static Label function(Container cont, ComponentChooser chooser) { return waitLabel(cont, chooser, 0); } | /**
* Waits Label in container.
*
* @param cont Container to search component in.
* @param chooser a component chooser specifying searching criteria.
* @return Label instance.
* @throws TimeoutExpiredException
*/ | Waits Label in container | waitLabel | {
"repo_name": "md-5/jdk10",
"path": "test/jdk/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/LabelOperator.java",
"license": "gpl-2.0",
"size": 12364
} | [
"java.awt.Container",
"java.awt.Label",
"org.netbeans.jemmy.ComponentChooser"
] | import java.awt.Container; import java.awt.Label; import org.netbeans.jemmy.ComponentChooser; | import java.awt.*; import org.netbeans.jemmy.*; | [
"java.awt",
"org.netbeans.jemmy"
] | java.awt; org.netbeans.jemmy; | 2,382,504 |
private Serializer getSerializer(final Class<?> clazz,
final Class<?> jsoClazz) {
if (log.isDebugEnabled()) {
log.info("getSerializer", "looking for serializer - java:"
+ (clazz == null ? "null" : clazz.getName()) + " json:"
+ (jsoClazz == nul... | Serializer function(final Class<?> clazz, final Class<?> jsoClazz) { if (log.isDebugEnabled()) { log.info(STR, STR + (clazz == null ? "null" : clazz.getName()) + STR + (jsoClazz == null ? "null" : jsoClazz.getName())); } synchronized (serializerSet) { Serializer s = serializableMap.get(clazz); if (s != null && s.canSer... | /**
* Find the serializer for the given Java type and/or JSON type.
*
* @param clazz
* The Java class to lookup.
* @param jsoClazz
* The JSON class type to lookup (may be null in the marshalling
* case in which case only the class is used to lookup the... | Find the serializer for the given Java type and/or JSON type | getSerializer | {
"repo_name": "isandlaTech/cohorte-org.jabsorb.ng",
"path": "src/org/jabsorb/ng/JSONSerializer.java",
"license": "apache-2.0",
"size": 34325
} | [
"java.util.Iterator",
"org.jabsorb.ng.serializer.Serializer"
] | import java.util.Iterator; import org.jabsorb.ng.serializer.Serializer; | import java.util.*; import org.jabsorb.ng.serializer.*; | [
"java.util",
"org.jabsorb.ng"
] | java.util; org.jabsorb.ng; | 2,822,963 |
@Test public void testPosixTimeZone() {
// NOTE jvs 31-July-2007: First two tests are disabled since
// not everyone may have patched their system yet for recent
// DST change.
// Pacific Standard Time. Effective 2007, the local time changes from
// PST to PDT at 02:00 LST to 03:00 LDT on the se... | @Test void function() { if (false) { assertEquals( STR, Util.toPosix(TimeZone.getTimeZone("PST"), false)); assertEquals( STR, Util.toPosix(TimeZone.getTimeZone("PST"), true)); } assertEquals( "JST9", Util.toPosix(TimeZone.getTimeZone(STR), true)); String posixTime = Util.toPosix(TimeZone.getTimeZone(STR), true); if (po... | /**
* Tests the {@link Util#toPosix(TimeZone, boolean)} method.
*/ | Tests the <code>Util#toPosix(TimeZone, boolean)</code> method | testPosixTimeZone | {
"repo_name": "joshelser/incubator-calcite",
"path": "core/src/test/java/org/apache/calcite/util/UtilTest.java",
"license": "apache-2.0",
"size": 52179
} | [
"java.util.TimeZone",
"org.junit.Assert",
"org.junit.Test"
] | import java.util.TimeZone; import org.junit.Assert; import org.junit.Test; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 457,082 |
@Override
public int byteN(final String nodeName, final int depth) {
final long hashCode = fnv(nodeName);
switch (depth) {
case 0:
return (byte) (hashCode >>> 56) & 0xFF;
case 1:
return (byte) (hashCode >>> 48) & 0xFF;
... | int function(final String nodeName, final int depth) { final long hashCode = fnv(nodeName); switch (depth) { case 0: return (byte) (hashCode >>> 56) & 0xFF; case 1: return (byte) (hashCode >>> 48) & 0xFF; case 2: return (byte) (hashCode >>> 40) & 0xFF; case 3: return (byte) (hashCode >>> 32) & 0xFF; case 4: return (byt... | /**
* Computes the bucket index that corresponds to the given node name at the given depth.
*
* @return and Integer between zero and {@link RevTree#MAX_BUCKETS} minus one
*/ | Computes the bucket index that corresponds to the given node name at the given depth | byteN | {
"repo_name": "state-hiu/GeoGit",
"path": "src/core/src/main/java/org/geogit/storage/NodePathStorageOrder.java",
"license": "bsd-3-clause",
"size": 9794
} | [
"com.google.common.hash.HashFunction"
] | import com.google.common.hash.HashFunction; | import com.google.common.hash.*; | [
"com.google.common"
] | com.google.common; | 1,671,445 |
protected void renderToEndOfStream() throws ExoPlaybackException {
// Do nothing.
} | void function() throws ExoPlaybackException { } | /**
* Incrementally renders any remaining output.
* <p>
* The default implementation is a no-op.
*
* @throws ExoPlaybackException Thrown if an error occurs rendering remaining output.
*/ | Incrementally renders any remaining output. The default implementation is a no-op | renderToEndOfStream | {
"repo_name": "KiminRyu/ExoPlayer",
"path": "library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java",
"license": "apache-2.0",
"size": 51683
} | [
"com.google.android.exoplayer2.ExoPlaybackException"
] | import com.google.android.exoplayer2.ExoPlaybackException; | import com.google.android.exoplayer2.*; | [
"com.google.android"
] | com.google.android; | 2,592,267 |
public Set<String> getNamespaces(Settings settings) {
return settings.keySet().stream().filter(this::match).map(key::getNamespace).collect(Collectors.toSet());
} | Set<String> function(Settings settings) { return settings.keySet().stream().filter(this::match).map(key::getNamespace).collect(Collectors.toSet()); } | /**
* Returns distinct namespaces for the given settings
*/ | Returns distinct namespaces for the given settings | getNamespaces | {
"repo_name": "gingerwizard/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/common/settings/Setting.java",
"license": "apache-2.0",
"size": 83142
} | [
"java.util.Set",
"java.util.stream.Collectors"
] | import java.util.Set; import java.util.stream.Collectors; | import java.util.*; import java.util.stream.*; | [
"java.util"
] | java.util; | 2,087,172 |
private void initialiseHeader()
{
ListHead head = null;
head = super.getListHead();
//init only once
if (head != null)
{
return;
}
head = new ListHead();
// render list head
if (this.getItemRenderer() instanceof WListItemRenderer)
{
((WListItemRender... | void function() { ListHead head = null; head = super.getListHead(); if (head != null) { return; } head = new ListHead(); if (this.getItemRenderer() instanceof WListItemRenderer) { ((WListItemRenderer)this.getItemRenderer()).renderListHead(head); } else { throw new ApplicationException(STR + this.getItemRenderer().getCl... | /**
* Create the listbox header by fetching it from the renderer and adding
* it to the Listbox.
*
*/ | Create the listbox header by fetching it from the renderer and adding it to the Listbox | initialiseHeader | {
"repo_name": "neuroidss/adempiere",
"path": "zkwebui/WEB-INF/src/org/adempiere/webui/component/WListbox.java",
"license": "gpl-2.0",
"size": 37836
} | [
"org.adempiere.webui.exception.ApplicationException"
] | import org.adempiere.webui.exception.ApplicationException; | import org.adempiere.webui.exception.*; | [
"org.adempiere.webui"
] | org.adempiere.webui; | 123,044 |
public IrFile getIrFile() {
return irFile;
}
| IrFile function() { return irFile; } | /**
* Get the file
*
* @return
*/ | Get the file | getIrFile | {
"repo_name": "nate-rcl/irplus",
"path": "ir_core/src/edu/ur/ir/researcher/ResearcherFile.java",
"license": "apache-2.0",
"size": 6707
} | [
"edu.ur.ir.file.IrFile"
] | import edu.ur.ir.file.IrFile; | import edu.ur.ir.file.*; | [
"edu.ur.ir"
] | edu.ur.ir; | 1,245,485 |
private RegistrationResponse registerJobMasterInternal(
final JobMasterGateway jobMasterGateway,
JobID jobId,
String jobManagerAddress,
ResourceID jobManagerResourceId) {
if (jobManagerRegistrations.containsKey(jobId)) {
JobManagerRegistration oldJobManagerRegistration = jobManagerRegistrations.get(jobI... | RegistrationResponse function( final JobMasterGateway jobMasterGateway, JobID jobId, String jobManagerAddress, ResourceID jobManagerResourceId) { if (jobManagerRegistrations.containsKey(jobId)) { JobManagerRegistration oldJobManagerRegistration = jobManagerRegistrations.get(jobId); if (Objects.equals(oldJobManagerRegis... | /**
* Registers a new JobMaster.
*
* @param jobMasterGateway to communicate with the registering JobMaster
* @param jobId of the job for which the JobMaster is responsible
* @param jobManagerAddress address of the JobMaster
* @param jobManagerResourceId ResourceID of the JobMaster
* @return RegistrationRe... | Registers a new JobMaster | registerJobMasterInternal | {
"repo_name": "jinglining/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java",
"license": "apache-2.0",
"size": 47516
} | [
"java.util.Objects",
"org.apache.flink.api.common.JobID",
"org.apache.flink.runtime.clusterframework.types.ResourceID",
"org.apache.flink.runtime.jobmaster.JobMasterGateway",
"org.apache.flink.runtime.registration.RegistrationResponse",
"org.apache.flink.runtime.resourcemanager.registration.JobManagerRegi... | import java.util.Objects; import org.apache.flink.api.common.JobID; import org.apache.flink.runtime.clusterframework.types.ResourceID; import org.apache.flink.runtime.jobmaster.JobMasterGateway; import org.apache.flink.runtime.registration.RegistrationResponse; import org.apache.flink.runtime.resourcemanager.registrati... | import java.util.*; import org.apache.flink.api.common.*; import org.apache.flink.runtime.clusterframework.types.*; import org.apache.flink.runtime.jobmaster.*; import org.apache.flink.runtime.registration.*; import org.apache.flink.runtime.resourcemanager.registration.*; | [
"java.util",
"org.apache.flink"
] | java.util; org.apache.flink; | 1,030,233 |
@Test(expected = IllegalArgumentException.class)
public void invalidSettingsPath() {
// this should fail
Maven.configureResolver().fromFile("src/test/invalid/custom-settings.xml")
.resolve("org.jboss.shrinkwrap.test:test-deps-c:1.0.0").withTransitivity().as(File.class);
} | @Test(expected = IllegalArgumentException.class) void function() { Maven.configureResolver().fromFile(STR) .resolve(STR).withTransitivity().as(File.class); } | /**
* Tests passing invalid path to a settings XML
*/ | Tests passing invalid path to a settings XML | invalidSettingsPath | {
"repo_name": "shrinkwrap/resolver",
"path": "maven/impl-maven/src/test/java/org/jboss/shrinkwrap/resolver/impl/maven/integration/DependenciesUnitTestCase.java",
"license": "apache-2.0",
"size": 8554
} | [
"java.io.File",
"org.jboss.shrinkwrap.resolver.api.maven.Maven",
"org.junit.Test"
] | import java.io.File; import org.jboss.shrinkwrap.resolver.api.maven.Maven; import org.junit.Test; | import java.io.*; import org.jboss.shrinkwrap.resolver.api.maven.*; import org.junit.*; | [
"java.io",
"org.jboss.shrinkwrap",
"org.junit"
] | java.io; org.jboss.shrinkwrap; org.junit; | 263,172 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<DiskPoolZoneInfoInner> list(String location, Context context); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<DiskPoolZoneInfoInner> list(String location, Context context); | /**
* Lists available Disk Pool Skus in an Azure location.
*
* @param location The location of the resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.excep... | Lists available Disk Pool Skus in an Azure location | list | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/DiskPoolZonesClient.java",
"license": "mit",
"size": 1915
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context",
"com.azure.resourcemanager.storagepool.fluent.models.DiskPoolZoneInfoInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.storagepool.fluent.models.DiskPoolZoneInfoInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.storagepool.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,100,753 |
protected void onRefresh() {
this.themeSource = UiApplicationContextUtils.initThemeSource(this);
}
| void function() { this.themeSource = UiApplicationContextUtils.initThemeSource(this); } | /**
* Initialize the theme capability.
*/ | Initialize the theme capability | onRefresh | {
"repo_name": "besom/bbossgroups-mvn",
"path": "bboss_mvc/src/main/java/org/frameworkset/web/servlet/context/WebApplicationContext.java",
"license": "apache-2.0",
"size": 14591
} | [
"org.frameworkset.web.ui.context.UiApplicationContextUtils"
] | import org.frameworkset.web.ui.context.UiApplicationContextUtils; | import org.frameworkset.web.ui.context.*; | [
"org.frameworkset.web"
] | org.frameworkset.web; | 2,000,562 |
private void dynInit()
{
// Set Attribute/Value
fAttribute.setText(m_DisplayAttribute);
lAttributeValue.setText(m_Attribute);
fValue.setText(m_DisplayValue);
lValueValue.setText(m_Value);
if (LogManager.isLevelFine())
{
lAttributeValue.setVisible(false);
lValueValue.setVisible(false);
}
//... | void function() { fAttribute.setText(m_DisplayAttribute); lAttributeValue.setText(m_Attribute); fValue.setText(m_DisplayValue); lValueValue.setText(m_Value); if (LogManager.isLevelFine()) { lAttributeValue.setVisible(false); lValueValue.setVisible(false); } cbClient.setEnabled(false); cbClient.setSelected(true); final ... | /**
* Dynamic Init
*/ | Dynamic Init | dynInit | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/client/src/main/java-legacy/org/compiere/grid/ed/ValuePreference.java",
"license": "gpl-2.0",
"size": 17615
} | [
"de.metas.logging.LogManager",
"org.adempiere.ad.security.permissions.UserPreferenceLevelConstraint",
"org.compiere.apps.ConfirmPanel"
] | import de.metas.logging.LogManager; import org.adempiere.ad.security.permissions.UserPreferenceLevelConstraint; import org.compiere.apps.ConfirmPanel; | import de.metas.logging.*; import org.adempiere.ad.security.permissions.*; import org.compiere.apps.*; | [
"de.metas.logging",
"org.adempiere.ad",
"org.compiere.apps"
] | de.metas.logging; org.adempiere.ad; org.compiere.apps; | 532,271 |
//-----------------------------------------------------------------------
public LocalDate getPaymentDate() {
return paymentDate;
} | LocalDate function() { return paymentDate; } | /**
* Gets the adjusted payment date.
* <p>
* This is an adjusted date, which should be a valid business day
* @return the value of the property, not null
*/ | Gets the adjusted payment date. This is an adjusted date, which should be a valid business day | getPaymentDate | {
"repo_name": "nssales/Strata",
"path": "modules/finance/src/main/java/com/opengamma/strata/finance/credit/SinglePayment.java",
"license": "apache-2.0",
"size": 11885
} | [
"java.time.LocalDate"
] | import java.time.LocalDate; | import java.time.*; | [
"java.time"
] | java.time; | 2,407,542 |
public ServiceFuture<AgentPoolInner> beginCreateOrUpdateAsync(String resourceGroupName, String managedClusterName, String agentPoolName, AgentPoolInner parameters, final ServiceCallback<AgentPoolInner> serviceCallback) {
return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceG... | ServiceFuture<AgentPoolInner> function(String resourceGroupName, String managedClusterName, String agentPoolName, AgentPoolInner parameters, final ServiceCallback<AgentPoolInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, managedClusterName, agent... | /**
* Creates or updates an agent pool.
* Creates or updates an agent pool in the specified managed cluster.
*
* @param resourceGroupName The name of the resource group.
* @param managedClusterName The name of the managed cluster resource.
* @param agentPoolName The name of the agent pool.... | Creates or updates an agent pool. Creates or updates an agent pool in the specified managed cluster | beginCreateOrUpdateAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/containerservice/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_04_01/implementation/AgentPoolsInner.java",
"license": "mit",
"size": 47221
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 349,888 |
protected void addSyncBehaviorPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AnimateMotionType_syncBehavior_feature"),
getString("_UI_Prope... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), LanguagePackage.Literals.ANIMATE_MOTION_TYPE__SYNC_BEHAVIOR, true, false, false, ItemPropertyDesc... | /**
* This adds a property descriptor for the Sync Behavior feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Sync Behavior feature. | addSyncBehaviorPropertyDescriptor | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.edit/src/org/w3/_2001/smil20/language/provider/AnimateMotionTypeItemProvider.java",
"license": "apache-2.0",
"size": 266226
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor",
"org.w3._2001.smil20.language.LanguagePackage"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.w3._2001.smil20.language.LanguagePackage; | import org.eclipse.emf.edit.provider.*; import org.w3.*; | [
"org.eclipse.emf",
"org.w3"
] | org.eclipse.emf; org.w3; | 2,887,569 |
public boolean isManageOrganizationDetailModelValid(ManageOrganizationDetailModel model) {
boolean isModelValid = true;
List<String> validationErrors = getValidationErrors(model);
if(validationErrors.size() > 0) {
isModelValid = false;
}
return isModelValid;
} | boolean function(ManageOrganizationDetailModel model) { boolean isModelValid = true; List<String> validationErrors = getValidationErrors(model); if(validationErrors.size() > 0) { isModelValid = false; } return isModelValid; } | /** Checks if is valid Organization detail.
*
* @param model the model
* @return boolean */ | Checks if is valid Organization detail | isManageOrganizationDetailModelValid | {
"repo_name": "MeasureAuthoringTool/MeasureAuthoringTool_LatestSprint",
"path": "mat/src/main/java/mat/shared/AdminManageOrganizationModelValidator.java",
"license": "cc0-1.0",
"size": 1321
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 419,850 |
public Observable<ServiceResponse<VirtualNetworkTapInner>> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String tapName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if ... | Observable<ServiceResponse<VirtualNetworkTapInner>> function(String resourceGroupName, String tapName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (tapName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentExce... | /**
* Updates an VirtualNetworkTap tags.
*
* @param resourceGroupName The name of the resource group.
* @param tapName The name of the tap.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualNetworkTapInner object
*/ | Updates an VirtualNetworkTap tags | beginUpdateTagsWithServiceResponseAsync | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VirtualNetworkTapsInner.java",
"license": "mit",
"size": 72534
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 373,403 |
boolean persistManagedSchemaToZooKeeper(boolean createOnly) {
final ZkSolrResourceLoader zkLoader = (ZkSolrResourceLoader)loader;
final ZkController zkController = zkLoader.getZkController();
final SolrZkClient zkClient = zkController.getZkClient();
final String managedSchemaPath = zkLoader.getConfigS... | boolean persistManagedSchemaToZooKeeper(boolean createOnly) { final ZkSolrResourceLoader zkLoader = (ZkSolrResourceLoader)loader; final ZkController zkController = zkLoader.getZkController(); final SolrZkClient zkClient = zkController.getZkClient(); final String managedSchemaPath = zkLoader.getConfigSetZkPath() + "/" +... | /**
* Persists the managed schema to ZooKeeper using optimistic concurrency.
* <p/>
* If createOnly is true, success is when the schema is created or if it previously existed.
* <p/>
* If createOnly is false, success is when the schema is persisted - this will only happen
* if schemaZkVersion matches ... | Persists the managed schema to ZooKeeper using optimistic concurrency. If createOnly is true, success is when the schema is created or if it previously existed. If createOnly is false, success is when the schema is persisted - this will only happen if schemaZkVersion matches the version in ZooKeeper | persistManagedSchemaToZooKeeper | {
"repo_name": "PATRIC3/p3_solr",
"path": "solr/core/src/java/org/apache/solr/schema/ManagedIndexSchema.java",
"license": "apache-2.0",
"size": 59279
} | [
"java.io.StringWriter",
"java.nio.charset.StandardCharsets",
"org.apache.solr.cloud.ZkController",
"org.apache.solr.cloud.ZkSolrResourceLoader",
"org.apache.solr.common.SolrException",
"org.apache.solr.common.cloud.SolrZkClient",
"org.apache.zookeeper.CreateMode",
"org.apache.zookeeper.KeeperException... | import java.io.StringWriter; import java.nio.charset.StandardCharsets; import org.apache.solr.cloud.ZkController; import org.apache.solr.cloud.ZkSolrResourceLoader; import org.apache.solr.common.SolrException; import org.apache.solr.common.cloud.SolrZkClient; import org.apache.zookeeper.CreateMode; import org.apache.zo... | import java.io.*; import java.nio.charset.*; import org.apache.solr.cloud.*; import org.apache.solr.common.*; import org.apache.solr.common.cloud.*; import org.apache.zookeeper.*; import org.apache.zookeeper.data.*; | [
"java.io",
"java.nio",
"org.apache.solr",
"org.apache.zookeeper"
] | java.io; java.nio; org.apache.solr; org.apache.zookeeper; | 988,402 |
@Deprecated
public void setFinancialObject(ObjectCode financialObject); | void function(ObjectCode financialObject); | /**
* Sets the financialObject
*
* @param financialObject The financialObject to set.
*/ | Sets the financialObject | setFinancialObject | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/integration/ld/LaborLedgerPositionObjectBenefit.java",
"license": "apache-2.0",
"size": 4312
} | [
"org.kuali.kfs.coa.businessobject.ObjectCode"
] | import org.kuali.kfs.coa.businessobject.ObjectCode; | import org.kuali.kfs.coa.businessobject.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 1,578,893 |
public DrawerFrameLayout addFixedItems(List<DrawerItem> items) {
mDrawer.addFixedItems(items);
return this;
} | DrawerFrameLayout function(List<DrawerItem> items) { mDrawer.addFixedItems(items); return this; } | /**
* Adds fixed items to the drawer
*
* @param items Items to add
*/ | Adds fixed items to the drawer | addFixedItems | {
"repo_name": "huhu/material-drawer",
"path": "library/src/main/java/com/heinrichreimersoftware/materialdrawer/DrawerFrameLayout.java",
"license": "apache-2.0",
"size": 16081
} | [
"com.heinrichreimersoftware.materialdrawer.structure.DrawerItem",
"java.util.List"
] | import com.heinrichreimersoftware.materialdrawer.structure.DrawerItem; import java.util.List; | import com.heinrichreimersoftware.materialdrawer.structure.*; import java.util.*; | [
"com.heinrichreimersoftware.materialdrawer",
"java.util"
] | com.heinrichreimersoftware.materialdrawer; java.util; | 560,644 |
private boolean isElementPresent_internal() throws WidgetException {
try {
try {
final boolean isPotentiallyXpathWithLocator =
(locator instanceof EByFirstMatching) || (locator instanceof EByXpath);
if (isPotentiallyXpathWithLocator && isElementPresentJavaXPath())
return true;
... | boolean function() throws WidgetException { try { try { final boolean isPotentiallyXpathWithLocator = (locator instanceof EByFirstMatching) (locator instanceof EByXpath); if (isPotentiallyXpathWithLocator && isElementPresentJavaXPath()) return true; } catch (Exception e) { } findElement(); return true; } catch (NoSuchE... | /**
* Use the JavaXPath to determine if element is present. If not, then try
* finding element. Return false if the element does not exist
*
* @return true or false
* @throws WidgetException
*/ | Use the JavaXPath to determine if element is present. If not, then try finding element. Return false if the element does not exist | isElementPresent_internal | {
"repo_name": "FINRAOS/JTAF-ExtWebDriver",
"path": "src/main/java/org/finra/jtaf/ewd/widget/element/Element.java",
"license": "apache-2.0",
"size": 34860
} | [
"org.finra.jtaf.ewd.widget.WidgetException",
"org.openqa.selenium.NoSuchElementException"
] | import org.finra.jtaf.ewd.widget.WidgetException; import org.openqa.selenium.NoSuchElementException; | import org.finra.jtaf.ewd.widget.*; import org.openqa.selenium.*; | [
"org.finra.jtaf",
"org.openqa.selenium"
] | org.finra.jtaf; org.openqa.selenium; | 1,085,646 |
public boolean isRegistered(ObjectName objName) {
boolean result = false;
final MBeanServer mbs = getMBeanServer();
result = mbs.isRegistered(objName);
return result;
} | boolean function(ObjectName objName) { boolean result = false; final MBeanServer mbs = getMBeanServer(); result = mbs.isRegistered(objName); return result; } | /**
* Check whether the MBean Object Name has been registered in MBean Server
*
* @param objName
* : the object name of a MBean
* @return
*/ | Check whether the MBean Object Name has been registered in MBean Server | isRegistered | {
"repo_name": "yuwnloyblog/disconman",
"path": "src/main/java/com/yuwnloy/disconman/ConfigManager.java",
"license": "apache-2.0",
"size": 21006
} | [
"javax.management.MBeanServer",
"javax.management.ObjectName"
] | import javax.management.MBeanServer; import javax.management.ObjectName; | import javax.management.*; | [
"javax.management"
] | javax.management; | 2,608,285 |
public void setHomeLogo(int _resId) {
// TODO: Add possibility to add an IntentAction as well.
mLogoView.setImageResource(_resId);
mLogoView.setVisibility(View.VISIBLE);
mHomeLayout.setVisibility(View.GONE);
}
| void function(int _resId) { mLogoView.setImageResource(_resId); mLogoView.setVisibility(View.VISIBLE); mHomeLayout.setVisibility(View.GONE); } | /**
* Shows the provided logo to the left in the action bar.
*
* This is ment to be used instead of the setHomeAction and does not draw a
* divider to the left of the provided logo.
*
* @param _resId
* The drawable resource id
*/ | Shows the provided logo to the left in the action bar. This is ment to be used instead of the setHomeAction and does not draw a divider to the left of the provided logo | setHomeLogo | {
"repo_name": "vaugan/ampdroid-mod",
"path": "src/com/mediaportal/ampdroid/activities/actionbar/ActionBar.java",
"license": "gpl-2.0",
"size": 5272
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 734,987 |
final String getCompanionFieldName(Interface def) {
return naming.getCompanionFieldName(def);
} | final String getCompanionFieldName(Interface def) { return naming.getCompanionFieldName(def); } | /**
* Returns the name of the field in classes which holds the companion
* instance.
*/ | Returns the name of the field in classes which holds the companion instance | getCompanionFieldName | {
"repo_name": "gijsleussink/ceylon",
"path": "compiler-java/src/com/redhat/ceylon/compiler/java/codegen/AbstractTransformer.java",
"license": "apache-2.0",
"size": 262988
} | [
"com.redhat.ceylon.model.typechecker.model.Interface"
] | import com.redhat.ceylon.model.typechecker.model.Interface; | import com.redhat.ceylon.model.typechecker.model.*; | [
"com.redhat.ceylon"
] | com.redhat.ceylon; | 2,419,625 |
public void setAuditLoggerName(ObjectName name) {
auditLogName = name;
} | void function(ObjectName name) { auditLogName = name; } | /**
* Set the name of the AuditLogger MBean.
* <p>
* This bean is used to create Audit Logs.
*
* @param name The Audit Logger Name to set.
*/ | Set the name of the AuditLogger MBean. This bean is used to create Audit Logs | setAuditLoggerName | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4jboss-all/tags/DCM4CHEE_2_13_5/dcm4jboss-wado/src/java/org/dcm4chex/wado/mbean/RIDSupport.java",
"license": "apache-2.0",
"size": 39279
} | [
"javax.management.ObjectName"
] | import javax.management.ObjectName; | import javax.management.*; | [
"javax.management"
] | javax.management; | 424,535 |
@SuppressWarnings("MismatchedQueryAndUpdateOfCollection")
public Subscription[] getAllDurableQueueSubscriptions() throws BrokerManagerAdminException {
List<Subscription> allSubscriptions = new ArrayList<Subscription>();
Subscription[] subscriptionsDTO;
try {
SubscriptionManag... | @SuppressWarnings(STR) Subscription[] function() throws BrokerManagerAdminException { List<Subscription> allSubscriptions = new ArrayList<Subscription>(); Subscription[] subscriptionsDTO; try { SubscriptionManagerService subscriptionManagerService = AndesBrokerManagerAdminServiceDSHolder.getInstance().getSubscriptionMa... | /**
* Gets all durable queue subscriptions.
* Suppressing 'MismatchedQueryAndUpdateOfCollection' as 'allSubscriptions' is used to convert
* to an array.
*
* @return An array of {@link Subscription}.
* @throws BrokerManagerAdminException
*/ | Gets all durable queue subscriptions. Suppressing 'MismatchedQueryAndUpdateOfCollection' as 'allSubscriptions' is used to convert to an array | getAllDurableQueueSubscriptions | {
"repo_name": "ThilankaBowala/carbon-business-messaging",
"path": "components/andes/org.wso2.carbon.andes.admin/src/main/java/org/wso2/carbon/andes/admin/AndesAdminService.java",
"license": "apache-2.0",
"size": 57298
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"org.wso2.carbon.andes.admin.internal.Exception",
"org.wso2.carbon.andes.admin.internal.Subscription",
"org.wso2.carbon.andes.admin.util.AndesBrokerManagerAdminServiceDSHolder",
"org.wso2.carbon.andes.core.SubscriptionManagerException",
... | import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.wso2.carbon.andes.admin.internal.Exception; import org.wso2.carbon.andes.admin.internal.Subscription; import org.wso2.carbon.andes.admin.util.AndesBrokerManagerAdminServiceDSHolder; import org.wso2.carbon.andes.core.Subscription... | import java.util.*; import org.wso2.carbon.andes.admin.internal.*; import org.wso2.carbon.andes.admin.util.*; import org.wso2.carbon.andes.core.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 234,572 |
public static Set<LinkAbstraction> parseJuniperLldp(HierarchicalConfiguration info) {
Set<LinkAbstraction> neighbour = new HashSet<>();
List<HierarchicalConfiguration> subtrees =
info.configurationsAt(LLDP_LIST_NBR_INFO);
for (HierarchicalConfiguration neighborsInfo : subtree... | static Set<LinkAbstraction> function(HierarchicalConfiguration info) { Set<LinkAbstraction> neighbour = new HashSet<>(); List<HierarchicalConfiguration> subtrees = info.configurationsAt(LLDP_LIST_NBR_INFO); for (HierarchicalConfiguration neighborsInfo : subtrees) { List<HierarchicalConfiguration> neighbors = neighborsI... | /**
* Parses neighbours discovery information and returns a list of
* link abstractions.
*
* @param info interface configuration
* @return set of link abstractions
*/ | Parses neighbours discovery information and returns a list of link abstractions | parseJuniperLldp | {
"repo_name": "LorenzReinhart/ONOSnew",
"path": "drivers/juniper/src/main/java/org/onosproject/drivers/juniper/JuniperUtils.java",
"license": "apache-2.0",
"size": 23473
} | [
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"org.apache.commons.configuration.HierarchicalConfiguration",
"org.onlab.packet.ChassisId",
"org.onlab.packet.MacAddress"
] | import java.util.HashSet; import java.util.List; import java.util.Set; import org.apache.commons.configuration.HierarchicalConfiguration; import org.onlab.packet.ChassisId; import org.onlab.packet.MacAddress; | import java.util.*; import org.apache.commons.configuration.*; import org.onlab.packet.*; | [
"java.util",
"org.apache.commons",
"org.onlab.packet"
] | java.util; org.apache.commons; org.onlab.packet; | 792,280 |
private VerticalDatum parseVertDatum(final Element parent) throws ParseException {
final Element element = parent.pullElement("VERT_DATUM");
final String name = element.pullString("name");
final int datum = element.pullInteger("datum");
final Map<String, ?> properties = parseAuthorit... | VerticalDatum function(final Element parent) throws ParseException { final Element element = parent.pullElement(STR); final String name = element.pullString("name"); final int datum = element.pullInteger("datum"); final Map<String, ?> properties = parseAuthority(element, name); element.close(); final VerticalDatumType ... | /**
* Parses a "VERT_DATUM" element. This element has the following pattern:
*
* <blockquote>
*
* <code>
* VERT_DATUM["<name>", <datum type> {,<authority>}]
* </code>
*
* </blockquote>
*
* @param parent The parent element.
* @return The "VERT_DATUM" element as... | Parses a "VERT_DATUM" element. This element has the following pattern: <code> VERT_DATUM["", {,}] </code> | parseVertDatum | {
"repo_name": "geotools/geotools",
"path": "modules/library/referencing/src/main/java/org/geotools/referencing/wkt/Parser.java",
"license": "lgpl-2.1",
"size": 50996
} | [
"java.text.ParseException",
"java.util.Map",
"org.geotools.metadata.i18n.ErrorKeys",
"org.geotools.metadata.i18n.Errors",
"org.geotools.referencing.datum.DefaultVerticalDatum",
"org.opengis.referencing.FactoryException",
"org.opengis.referencing.datum.VerticalDatum",
"org.opengis.referencing.datum.Ver... | import java.text.ParseException; import java.util.Map; import org.geotools.metadata.i18n.ErrorKeys; import org.geotools.metadata.i18n.Errors; import org.geotools.referencing.datum.DefaultVerticalDatum; import org.opengis.referencing.FactoryException; import org.opengis.referencing.datum.VerticalDatum; import org.opengi... | import java.text.*; import java.util.*; import org.geotools.metadata.i18n.*; import org.geotools.referencing.datum.*; import org.opengis.referencing.*; import org.opengis.referencing.datum.*; | [
"java.text",
"java.util",
"org.geotools.metadata",
"org.geotools.referencing",
"org.opengis.referencing"
] | java.text; java.util; org.geotools.metadata; org.geotools.referencing; org.opengis.referencing; | 1,103,139 |
public PromoteFileVersion setVersionId(String versionId) {
mBodyMap.put(BoxFileVersion.FIELD_TYPE, BoxFileVersion.TYPE);
mBodyMap.put(BoxFolder.FIELD_ID, versionId);
return this;
} | PromoteFileVersion function(String versionId) { mBodyMap.put(BoxFileVersion.FIELD_TYPE, BoxFileVersion.TYPE); mBodyMap.put(BoxFolder.FIELD_ID, versionId); return this; } | /**
* Sets the id of the version to promote.
*
* @param versionId id of the version to promote.
* @return request with the updated version id.
*/ | Sets the id of the version to promote | setVersionId | {
"repo_name": "seema-at-box/box-android-sdk",
"path": "box-content-sdk/src/main/java/com/box/androidsdk/content/requests/BoxRequestsFile.java",
"license": "apache-2.0",
"size": 70631
} | [
"com.box.androidsdk.content.models.BoxFileVersion",
"com.box.androidsdk.content.models.BoxFolder"
] | import com.box.androidsdk.content.models.BoxFileVersion; import com.box.androidsdk.content.models.BoxFolder; | import com.box.androidsdk.content.models.*; | [
"com.box.androidsdk"
] | com.box.androidsdk; | 49,099 |
@RestrictTo(LIBRARY_GROUP)
public void setHideableInternal(boolean hideable) {
this.hideable = hideable;
} | @RestrictTo(LIBRARY_GROUP) void function(boolean hideable) { this.hideable = hideable; } | /**
* Sets whether this bottom sheet can hide when it is swiped down.
*
* @param hideable {@code true} to make this bottom sheet hideable.
* @hide
*/ | Sets whether this bottom sheet can hide when it is swiped down | setHideableInternal | {
"repo_name": "material-components/material-components-android",
"path": "lib/java/com/google/android/material/bottomsheet/BottomSheetBehavior.java",
"license": "apache-2.0",
"size": 75669
} | [
"androidx.annotation.RestrictTo"
] | import androidx.annotation.RestrictTo; | import androidx.annotation.*; | [
"androidx.annotation"
] | androidx.annotation; | 2,287,482 |
public static ByteBuf wrappedBuffer(int maxNumComponents, ByteBuffer... buffers) {
return wrappedBuffer(maxNumComponents, CompositeByteBuf.BYTE_BUFFER_WRAPPER, buffers);
} | static ByteBuf function(int maxNumComponents, ByteBuffer... buffers) { return wrappedBuffer(maxNumComponents, CompositeByteBuf.BYTE_BUFFER_WRAPPER, buffers); } | /**
* Creates a new big-endian composite buffer which wraps the slices of the specified
* NIO buffers without copying them. A modification on the content of the
* specified buffers will be visible to the returned buffer.
*/ | Creates a new big-endian composite buffer which wraps the slices of the specified NIO buffers without copying them. A modification on the content of the specified buffers will be visible to the returned buffer | wrappedBuffer | {
"repo_name": "tbrooks8/netty",
"path": "buffer/src/main/java/io/netty/buffer/Unpooled.java",
"license": "apache-2.0",
"size": 31566
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,047,196 |
protected void loadOtherLocale(final String locale) {
CmsRpcAction<CmsPreviewInfo> previewAction = new CmsRpcAction<CmsPreviewInfo>() {
| void function(final String locale) { CmsRpcAction<CmsPreviewInfo> previewAction = new CmsRpcAction<CmsPreviewInfo>() { | /**
* Loads preview for another locale.<p>
*
* @param locale the locale to load
*/ | Loads preview for another locale | loadOtherLocale | {
"repo_name": "sbonoc/opencms-core",
"path": "src-gwt/org/opencms/gwt/client/ui/CmsPreviewDialog.java",
"license": "lgpl-2.1",
"size": 11735
} | [
"org.opencms.gwt.client.rpc.CmsRpcAction",
"org.opencms.gwt.shared.CmsPreviewInfo"
] | import org.opencms.gwt.client.rpc.CmsRpcAction; import org.opencms.gwt.shared.CmsPreviewInfo; | import org.opencms.gwt.client.rpc.*; import org.opencms.gwt.shared.*; | [
"org.opencms.gwt"
] | org.opencms.gwt; | 463,854 |
public BlockFace getBlockFace() {
return blockFace;
} | BlockFace function() { return blockFace; } | /**
* Returns the face of the block that the hanging entity was placed on
*
* @return the face of the block that the hanging entity was placed on
*/ | Returns the face of the block that the hanging entity was placed on | getBlockFace | {
"repo_name": "Scrik/Cauldron-1",
"path": "eclipse/cauldron/src/main/java/org/bukkit/event/hanging/HangingPlaceEvent.java",
"license": "gpl-3.0",
"size": 1799
} | [
"org.bukkit.block.BlockFace"
] | import org.bukkit.block.BlockFace; | import org.bukkit.block.*; | [
"org.bukkit.block"
] | org.bukkit.block; | 1,003,697 |
@Override
SocketAddress getRemoteSocketAddress() {
// a lot could go wrong here, so rather than put in a bunch of code
// to check for nulls all down the chain let's do it the simple
// yet bulletproof way
try {
return ((SocketChannel) sockKey.channel()).socket()
... | SocketAddress getRemoteSocketAddress() { try { return ((SocketChannel) sockKey.channel()).socket() .getRemoteSocketAddress(); } catch (NullPointerException e) { return null; } } | /**
* Returns the address to which the socket is connected.
*
* @return ip address of the remote side of the connection or null if not
* connected
*/ | Returns the address to which the socket is connected | getRemoteSocketAddress | {
"repo_name": "rakeshadr/ZooKeeper",
"path": "src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java",
"license": "apache-2.0",
"size": 9778
} | [
"java.net.SocketAddress",
"java.nio.channels.SocketChannel"
] | import java.net.SocketAddress; import java.nio.channels.SocketChannel; | import java.net.*; import java.nio.channels.*; | [
"java.net",
"java.nio"
] | java.net; java.nio; | 1,069,399 |
Object getPropertyValue(String propertyName) throws NoSuchPropertyException, PropertyAccessException; | Object getPropertyValue(String propertyName) throws NoSuchPropertyException, PropertyAccessException; | /**
* Reads the value of the given property
* @param propertyName the name of the property
* @return the value of the property
* @throws NoSuchPropertyException if no property exists with the given name
* @throws PropertyAccessException if there was a problem reading the value of the propert... | Reads the value of the given property | getPropertyValue | {
"repo_name": "agileapes/couteau",
"path": "couteau-reflection/src/main/java/com/mmnaseri/couteau/reflection/beans/BeanAccessor.java",
"license": "mit",
"size": 2825
} | [
"com.mmnaseri.couteau.reflection.error.NoSuchPropertyException",
"com.mmnaseri.couteau.reflection.error.PropertyAccessException"
] | import com.mmnaseri.couteau.reflection.error.NoSuchPropertyException; import com.mmnaseri.couteau.reflection.error.PropertyAccessException; | import com.mmnaseri.couteau.reflection.error.*; | [
"com.mmnaseri.couteau"
] | com.mmnaseri.couteau; | 2,542,875 |
protected void buildFeedMetadata(Map<String, Object> model, T feed, HttpServletRequest request) {
} | void function(Map<String, Object> model, T feed, HttpServletRequest request) { } | /**
* Populate the feed metadata (title, link, description, etc.).
* <p>Default is an empty implementation. Subclasses can override this method
* to add meta fields such as title, link description, etc.
* @param model the model, in case meta information must be populated from it
* @param feed the feed being p... | Populate the feed metadata (title, link, description, etc.). Default is an empty implementation. Subclasses can override this method to add meta fields such as title, link description, etc | buildFeedMetadata | {
"repo_name": "QBNemo/spring-mvc-showcase",
"path": "src/main/java/org/springframework/web/servlet/view/feed/AbstractFeedView.java",
"license": "apache-2.0",
"size": 3873
} | [
"java.util.Map",
"javax.servlet.http.HttpServletRequest"
] | import java.util.Map; import javax.servlet.http.HttpServletRequest; | import java.util.*; import javax.servlet.http.*; | [
"java.util",
"javax.servlet"
] | java.util; javax.servlet; | 1,614,982 |
public Object createOutboundImplementation(final Object implementor, final Class<?>[] interfaces) {
assertGameNotOver();
final InvocationHandler ih = (proxy, method, args) -> {
assertGameNotOver();
final boolean threadLocks = currentThreadHasReadLock();
if (threadLocks) {
leaveDelega... | Object function(final Object implementor, final Class<?>[] interfaces) { assertGameNotOver(); final InvocationHandler ih = (proxy, method, args) -> { assertGameNotOver(); final boolean threadLocks = currentThreadHasReadLock(); if (threadLocks) { leaveDelegateExecution(); } try { return method.invoke(implementor, args);... | /**
* Used to create an object the exits delegate execution.
* <p>
* Objects on this method will decrement the thread lock count when called, and will increment it again when execution
* is finished.
*/ | Used to create an object the exits delegate execution. Objects on this method will decrement the thread lock count when called, and will increment it again when execution is finished | createOutboundImplementation | {
"repo_name": "simon33-2/triplea",
"path": "src/games/strategy/engine/delegate/DelegateExecutionManager.java",
"license": "gpl-2.0",
"size": 7056
} | [
"games.strategy.engine.GameOverException",
"games.strategy.engine.message.MessengerException",
"java.lang.reflect.InvocationHandler",
"java.lang.reflect.InvocationTargetException",
"java.lang.reflect.Proxy"
] | import games.strategy.engine.GameOverException; import games.strategy.engine.message.MessengerException; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Proxy; | import games.strategy.engine.*; import games.strategy.engine.message.*; import java.lang.reflect.*; | [
"games.strategy.engine",
"java.lang"
] | games.strategy.engine; java.lang; | 2,432,240 |
RoutesDefinition loadRoutesDefinition(InputStream is) throws Exception; | RoutesDefinition loadRoutesDefinition(InputStream is) throws Exception; | /**
* Loads a collection of route definitions from the given {@link java.io.InputStream}.
*
* @param is input stream with the route(s) definition to add
* @throws Exception if the route definitions could not be loaded for whatever reason
* @return the route definitions
*/ | Loads a collection of route definitions from the given <code>java.io.InputStream</code> | loadRoutesDefinition | {
"repo_name": "FingolfinTEK/camel",
"path": "camel-core/src/main/java/org/apache/camel/CamelContext.java",
"license": "apache-2.0",
"size": 66958
} | [
"java.io.InputStream",
"org.apache.camel.model.RoutesDefinition"
] | import java.io.InputStream; import org.apache.camel.model.RoutesDefinition; | import java.io.*; import org.apache.camel.model.*; | [
"java.io",
"org.apache.camel"
] | java.io; org.apache.camel; | 795,178 |
@Nonnull
public DeviceConfigurationUserStatusCollectionRequest orderBy(@Nonnull final String value) {
addOrderByOption(value);
return this;
} | DeviceConfigurationUserStatusCollectionRequest function(@Nonnull final String value) { addOrderByOption(value); return this; } | /**
* Sets the order by clause for the request
*
* @param value the order by clause
* @return the updated request
*/ | Sets the order by clause for the request | orderBy | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/DeviceConfigurationUserStatusCollectionRequest.java",
"license": "mit",
"size": 6427
} | [
"com.microsoft.graph.requests.DeviceConfigurationUserStatusCollectionRequest",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.requests.DeviceConfigurationUserStatusCollectionRequest; import javax.annotation.Nonnull; | import com.microsoft.graph.requests.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 2,616,552 |
@Override
public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
int rc = super.tightMarshal1(wireFormat, o, bs);
return rc + 4;
} | int function(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 4; } | /**
* Write the booleans that this object uses to a BooleanStream
*/ | Write the booleans that this object uses to a BooleanStream | tightMarshal1 | {
"repo_name": "apache/activemq-openwire",
"path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/IntegerResponseMarshaller.java",
"license": "apache-2.0",
"size": 3931
} | [
"java.io.IOException",
"org.apache.activemq.openwire.codec.BooleanStream",
"org.apache.activemq.openwire.codec.OpenWireFormat"
] | import java.io.IOException; import org.apache.activemq.openwire.codec.BooleanStream; import org.apache.activemq.openwire.codec.OpenWireFormat; | import java.io.*; import org.apache.activemq.openwire.codec.*; | [
"java.io",
"org.apache.activemq"
] | java.io; org.apache.activemq; | 730,116 |
@Override
public String toString() {
StringBuilder ret = new StringBuilder("DASU=[ID=");
ret.append(id);
ret.append("], output=[");
Optional.ofNullable(output).ifPresent(io -> ret.append(io.getId()));
ret.append("], logLevel=");
Optional.ofNullable(logLevel).ifPresent(x -> ret.append(x.toString()));
r... | String function() { StringBuilder ret = new StringBuilder(STR); ret.append(id); ret.append(STR); Optional.ofNullable(output).ifPresent(io -> ret.append(io.getId())); ret.append(STR); Optional.ofNullable(logLevel).ifPresent(x -> ret.append(x.toString())); ret.append(STR); for (AsceDao asce: getAsces()) { ret.append(" ")... | /**
* toString() prints a human readable version of the DASU
* where linked objects (like ASCES) are represented by their
* IDs only.
*/ | toString() prints a human readable version of the DASU where linked objects (like ASCES) are represented by their IDs only | toString | {
"repo_name": "IntegratedAlarmSystem-Group/ias",
"path": "Cdb/src/main/java/org/eso/ias/cdb/pojos/DasuDao.java",
"license": "lgpl-3.0",
"size": 4744
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 2,900,550 |
public void teleportPlayer(Player player, LocalGate fromGate) throws ReservationException {
ReservationImpl res = new ReservationImpl(player, (LocalGateImpl)fromGate);
res.depart();
} | void function(Player player, LocalGate fromGate) throws ReservationException { ReservationImpl res = new ReservationImpl(player, (LocalGateImpl)fromGate); res.depart(); } | /**
* Teleports the specified player as if they stepped into the specified gate.
* <p>
* This method will return before the teleportation is complete and may
* not throw an exception even if the teleportation fails, under some
* circumstances.
*
* @param player the player to telepo... | Teleports the specified player as if they stepped into the specified gate. This method will return before the teleportation is complete and may not throw an exception even if the teleportation fails, under some circumstances | teleportPlayer | {
"repo_name": "InsomniaxGaming/TransporterReloaded",
"path": "src/com/frdfsnlght/transporter/api/API.java",
"license": "gpl-2.0",
"size": 7048
} | [
"com.frdfsnlght.transporter.LocalGateImpl",
"com.frdfsnlght.transporter.ReservationImpl",
"org.bukkit.entity.Player"
] | import com.frdfsnlght.transporter.LocalGateImpl; import com.frdfsnlght.transporter.ReservationImpl; import org.bukkit.entity.Player; | import com.frdfsnlght.transporter.*; import org.bukkit.entity.*; | [
"com.frdfsnlght.transporter",
"org.bukkit.entity"
] | com.frdfsnlght.transporter; org.bukkit.entity; | 1,926,859 |
IgnoreCaseNamespacesTestFactory getIgnoreCaseNamespacesTestFactory();
interface Literals
{
EClass MODEL = eINSTANCE.getModel();
EReference MODEL__IMPORTS = eINSTANCE.getModel_Imports();
EClass IMPORT = eINSTANCE.getImport();
EAttribute IMPORT__IMPORTED_NAMESPACE = eINSTA... | IgnoreCaseNamespacesTestFactory getIgnoreCaseNamespacesTestFactory(); interface Literals { EClass MODEL = eINSTANCE.getModel(); EReference MODEL__IMPORTS = eINSTANCE.getModel_Imports(); EClass IMPORT = eINSTANCE.getImport(); EAttribute IMPORT__IMPORTED_NAMESPACE = eINSTANCE.getImport_ImportedNamespace(); } | /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the factory that creates the instances of the model.
* @generated
*/ | Returns the factory that creates the instances of the model. | getIgnoreCaseNamespacesTestFactory | {
"repo_name": "miklossy/xtext-core",
"path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/linking/ignoreCaseNamespacesTest/IgnoreCaseNamespacesTestPackage.java",
"license": "epl-1.0",
"size": 7432
} | [
"org.eclipse.emf.ecore.EAttribute",
"org.eclipse.emf.ecore.EClass",
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,593,592 |
@Override
public void onStop() {
if (ctlr!=null) {
ctlr.stop();
}
EventBus.getDefault().unregister(this);
super.onStop();
} | void function() { if (ctlr!=null) { ctlr.stop(); } EventBus.getDefault().unregister(this); super.onStop(); } | /**
* Standard lifecycle method, for when the fragment moves into
* the stopped state. Passed along to the CameraController.
*/ | Standard lifecycle method, for when the fragment moves into the stopped state. Passed along to the CameraController | onStop | {
"repo_name": "philipgiuliani/cwac-cam2",
"path": "cam2/src/main/java/com/commonsware/cwac/cam2/CameraFragment.java",
"license": "apache-2.0",
"size": 11713
} | [
"de.greenrobot.event.EventBus"
] | import de.greenrobot.event.EventBus; | import de.greenrobot.event.*; | [
"de.greenrobot.event"
] | de.greenrobot.event; | 2,183,202 |
public static Object getFieldValue(final Object obj, final String name) throws NoSuchFieldException {
final Field field = getField(obj, name);
try {
return field.get(obj);
} catch (IllegalArgumentException e) {
throw new RuntimeException(e);
} catch (IllegalAc... | static Object function(final Object obj, final String name) throws NoSuchFieldException { final Field field = getField(obj, name); try { return field.get(obj); } catch (IllegalArgumentException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeException(e); } } | /**
* This method returns the contents of an object variable .The class hierarchy is recursively
* searched to find such a field (even if it is private).
*
* @param obj Object.
* @param name Variable name.
* @return Contents of variable.
* @throws NoSuchFieldException ... | This method returns the contents of an object variable .The class hierarchy is recursively searched to find such a field (even if it is private) | getFieldValue | {
"repo_name": "m-31/qedeq",
"path": "QedeqBase/src/org/qedeq/base/utility/YodaUtility.java",
"license": "gpl-2.0",
"size": 9550
} | [
"java.lang.reflect.Field"
] | import java.lang.reflect.Field; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 201,655 |
public static <M extends Map<K,V>,K,V> M notEmpty(M map, String message) {
if (Maps.isEmpty(map)) {
throw new IllegalArgumentException(message);
}
return map;
}
| static <M extends Map<K,V>,K,V> M function(M map, String message) { if (Maps.isEmpty(map)) { throw new IllegalArgumentException(message); } return map; } | /**
* Assert that a Map has entries; that is, it must not be <code>null</code> and must have at least one entry.
*
* <pre class="code">
* Assert.notEmpty(map, "Map must have entries");
* </pre>
*
* @param map the map to check
* @param message the exception message to use if the asser... | Assert that a Map has entries; that is, it must not be <code>null</code> and must have at least one entry. Assert.notEmpty(map, "Map must have entries"); </code> | notEmpty | {
"repo_name": "bingo-open-source/bingo-core",
"path": "core-lang/src/main/java/bingo/lang/Assert.java",
"license": "apache-2.0",
"size": 25408
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,177,047 |
@Test
public void testUsingClassicLazySingletonUsingSynchronizedMethod() throws Exception {
final ClassicLazySingletonUsingSynchronizedMethod firstAccessAttempt =
ClassicLazySingletonUsingSynchronizedMethod.getInstance();
final ClassicLazySingletonUsingSynchronizedMethod secondAc... | void function() throws Exception { final ClassicLazySingletonUsingSynchronizedMethod firstAccessAttempt = ClassicLazySingletonUsingSynchronizedMethod.getInstance(); final ClassicLazySingletonUsingSynchronizedMethod secondAccessAttempt = ClassicLazySingletonUsingSynchronizedMethod.getInstance(); assertTrue(firstAccessAt... | /**
* Shows the 'classic' way of using an <em>lazy</em> Singleton using synchronized method.
* <p>
* NOTE: This technique works on all versions of Java. But, it is less perfomant than the
* Double Checked Locking approach.
*/ | Shows the 'classic' way of using an lazy Singleton using synchronized method. Double Checked Locking approach | testUsingClassicLazySingletonUsingSynchronizedMethod | {
"repo_name": "gazbert/java-design-patterns",
"path": "src/test/java/com/gazbert/patterns/creational/singleton/TestSingletonPattern.java",
"license": "mit",
"size": 5112
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 660,983 |
public boolean contains(Iterable<KeyValuePair<String, V>> keyValuePairs) {
checkNotNull(keyValuePairs);
for (KeyValuePair<String, V> pair : keyValuePairs) {
if (!contains(pair.getKey()))
return false;
final V value1 = get(pair.getKey());
final V value2 = pair.getValue();
if... | boolean function(Iterable<KeyValuePair<String, V>> keyValuePairs) { checkNotNull(keyValuePairs); for (KeyValuePair<String, V> pair : keyValuePairs) { if (!contains(pair.getKey())) return false; final V value1 = get(pair.getKey()); final V value2 = pair.getValue(); if (value1 == null value2 == null) { if (value1 == null... | /**
* Check if a given list of key-value pairs is included in the current one.
*
* @return true if the list of key-value pairs is included in the current one, false otherwise.
*/ | Check if a given list of key-value pairs is included in the current one | contains | {
"repo_name": "MNCC/minusandcortex",
"path": "src/fr/mncc/minusandcortex/primitives/shared/KeyValueMap.java",
"license": "mit",
"size": 9216
} | [
"fr.mncc.minusandcortex.primitives.shared.Preconditions"
] | import fr.mncc.minusandcortex.primitives.shared.Preconditions; | import fr.mncc.minusandcortex.primitives.shared.*; | [
"fr.mncc.minusandcortex"
] | fr.mncc.minusandcortex; | 534,592 |
public SpatialArgs parse(String v, SpatialContext ctx) throws ParseException, InvalidShapeException {
int idx = v.indexOf('(');
int edx = v.lastIndexOf(')');
if (idx < 0 || idx > edx) {
throw new ParseException("missing parens: " + v, -1);
}
SpatialOperation op = SpatialOperation.get(v.sub... | SpatialArgs function(String v, SpatialContext ctx) throws ParseException, InvalidShapeException { int idx = v.indexOf('('); int edx = v.lastIndexOf(')'); if (idx < 0 idx > edx) { throw new ParseException(STR + v, -1); } SpatialOperation op = SpatialOperation.get(v.substring(0, idx).trim()); String body = v.substring(id... | /**
* Parses a string such as "Intersects(ENVELOPE(-10,-8,22,20)) distErrPct=0.025".
*
* @param v The string to parse. Mandatory.
* @param ctx The spatial context. Mandatory.
* @return Not null.
* @throws IllegalArgumentException if the parameters don't make sense or an add-on parameter is unknown
... | Parses a string such as "Intersects(ENVELOPE(-10,-8,22,20)) distErrPct=0.025" | parse | {
"repo_name": "yintaoxue/read-open-source-code",
"path": "solr-4.7.2/src/org/apache/lucene/spatial/query/SpatialArgsParser.java",
"license": "apache-2.0",
"size": 5544
} | [
"com.spatial4j.core.context.SpatialContext",
"com.spatial4j.core.exception.InvalidShapeException",
"com.spatial4j.core.shape.Shape",
"java.text.ParseException",
"java.util.Map"
] | import com.spatial4j.core.context.SpatialContext; import com.spatial4j.core.exception.InvalidShapeException; import com.spatial4j.core.shape.Shape; import java.text.ParseException; import java.util.Map; | import com.spatial4j.core.context.*; import com.spatial4j.core.exception.*; import com.spatial4j.core.shape.*; import java.text.*; import java.util.*; | [
"com.spatial4j.core",
"java.text",
"java.util"
] | com.spatial4j.core; java.text; java.util; | 714,691 |
public LpBelegnummer getNextBelegNr(String name, String mandantCNr,
TheClientDto theClientDto) throws EJBExceptionLP {
try {
return getNextBelegNr(
getParameterFac().getGeschaeftsjahr(mandantCNr), name,
mandantCNr, theClientDto);
} catch (RemoteException ex) {
throwEJBExceptionLPRespectOld(ex)... | LpBelegnummer function(String name, String mandantCNr, TheClientDto theClientDto) throws EJBExceptionLP { try { return getNextBelegNr( getParameterFac().getGeschaeftsjahr(mandantCNr), name, mandantCNr, theClientDto); } catch (RemoteException ex) { throwEJBExceptionLPRespectOld(ex); return null; } } | /**
* Liefert die naechste Belegnummer aus dem aktuellen Geschaeftsjahr fuer
* ein Modul.
*
* @param name
* String
* @param mandantCNr
* String
* @param theClientDto
* String
* @return Integer
* @throws EJBExceptionLP
*/ | Liefert die naechste Belegnummer aus dem aktuellen Geschaeftsjahr fuer ein Modul | getNextBelegNr | {
"repo_name": "erdincay/ejb",
"path": "src/com/lp/server/system/pkgenerator/ejbfac/BNGeneratorFacBean.java",
"license": "agpl-3.0",
"size": 22210
} | [
"com.lp.server.system.pkgenerator.format.LpBelegnummer",
"com.lp.server.system.service.TheClientDto",
"com.lp.util.EJBExceptionLP",
"java.rmi.RemoteException"
] | import com.lp.server.system.pkgenerator.format.LpBelegnummer; import com.lp.server.system.service.TheClientDto; import com.lp.util.EJBExceptionLP; import java.rmi.RemoteException; | import com.lp.server.system.pkgenerator.format.*; import com.lp.server.system.service.*; import com.lp.util.*; import java.rmi.*; | [
"com.lp.server",
"com.lp.util",
"java.rmi"
] | com.lp.server; com.lp.util; java.rmi; | 10,699 |
@Test (timeout = 30000)
public void testSetAndClearSpaceQuotaPathIsFile() throws Exception {
final Path parent = new Path(
PathUtils.getTestPath(getClass()),
GenericTestUtils.getMethodName());
final Path file = new Path(parent, "path-is-file");
DFSTestUtil.createFile(dfs, file, 1024L, (... | @Test (timeout = 30000) void function() throws Exception { final Path parent = new Path( PathUtils.getTestPath(getClass()), GenericTestUtils.getMethodName()); final Path file = new Path(parent, STR); DFSTestUtil.createFile(dfs, file, 1024L, (short) 1L, 0); assertTrue(dfs.isFile(file)); testSetAndClearSpaceQuotaPathIsFi... | /**
* Test to set and clear space quote when path is a file.
*/ | Test to set and clear space quote when path is a file | testSetAndClearSpaceQuotaPathIsFile | {
"repo_name": "legend-hua/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestQuota.java",
"license": "apache-2.0",
"size": 54483
} | [
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.test.GenericTestUtils",
"org.apache.hadoop.test.PathUtils",
"org.junit.Assert",
"org.junit.Test"
] | import org.apache.hadoop.fs.Path; import org.apache.hadoop.test.GenericTestUtils; import org.apache.hadoop.test.PathUtils; import org.junit.Assert; import org.junit.Test; | import org.apache.hadoop.fs.*; import org.apache.hadoop.test.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 1,793,386 |
public RequestDispatcher getErrorDispatcherByClass(
Throwable exception) {
// Check for exception class match
Class exceptionClasses[] = this.errorPagesByExceptionKeysSorted;
Throwable errWrapper = new ServletException(exception);
while (errWrapper instanceof ServletExc... | RequestDispatcher function( Throwable exception) { Class exceptionClasses[] = this.errorPagesByExceptionKeysSorted; Throwable errWrapper = new ServletException(exception); while (errWrapper instanceof ServletException) { errWrapper = ((ServletException) errWrapper).getRootCause(); if (errWrapper == null) { break; } for... | /**
* Gets a dispatcher, set up for error dispatch.
*/ | Gets a dispatcher, set up for error dispatch | getErrorDispatcherByClass | {
"repo_name": "pedrosino/tnoodle",
"path": "winstone/src/winstone/WebAppConfiguration.java",
"license": "gpl-3.0",
"size": 85639
} | [
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletResponse"
] | import javax.servlet.ServletException; import javax.servlet.http.HttpServletResponse; | import javax.servlet.*; import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 289,801 |
public void fadeIn() {
fade(increment);
}
private Timer timer; | void function() { fade(increment); } private Timer timer; | /**
* Fade the label from 0% opacity to 100% according to the given parameters
*/ | Fade the label from 0% opacity to 100% according to the given parameters | fadeIn | {
"repo_name": "Subterranean-Security/Crimson",
"path": "src/main/java/com/subterranean_security/crimson/viewer/ui/common/components/labels/FadeLabel.java",
"license": "apache-2.0",
"size": 5281
} | [
"javax.swing.Timer"
] | import javax.swing.Timer; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,200,378 |
public static void skipFully(InputStream in, long n) throws IOException {
while (n > 0) {
long amt = in.skip(n);
if (amt == 0) {
// Force a blocking read to avoid infinite loop
if (in.read() == -1) {
throw new EOFException();
}
n--;
} else {
n -=... | static void function(InputStream in, long n) throws IOException { while (n > 0) { long amt = in.skip(n); if (amt == 0) { if (in.read() == -1) { throw new EOFException(); } n--; } else { n -= amt; } } } | /**
* Discards {@code n} bytes of data from the input stream. This method
* will block until the full amount has been skipped. Does not close the
* stream.
*
* @param in the input stream to read from
* @param n the number of bytes to skip
* @throws EOFException if this stream reaches the end before... | Discards n bytes of data from the input stream. This method will block until the full amount has been skipped. Does not close the stream | skipFully | {
"repo_name": "eugeneiiim/AndroidCollections",
"path": "src/com/google/common/io/ByteStreams.java",
"license": "apache-2.0",
"size": 24892
} | [
"java.io.EOFException",
"java.io.IOException",
"java.io.InputStream"
] | import java.io.EOFException; import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,369,684 |
@Test
public void testConcatWholeAndDecThenConvertBigInteger() {
// Given
Money moneyA = new Money(10, 2634);
Money moneyB = new Money(30, 12);
BigInteger[] expectedResult = new BigInteger[] {
new BigInteger("4"),
new BigInteger("102634"),
... | void function() { Money moneyA = new Money(10, 2634); Money moneyB = new Money(30, 12); BigInteger[] expectedResult = new BigInteger[] { new BigInteger("4"), new BigInteger(STR), new BigInteger(STR) }; BigInteger[] result = ConversionTypeUtil .concatWholeAndDecThenConvertBigInteger(moneyA, moneyB); Assert.assertArrayEq... | /**
* Test of concatWholeAndDecThenConvertBigInteger method, of class ConversionTypeUtil.
*/ | Test of concatWholeAndDecThenConvertBigInteger method, of class ConversionTypeUtil | testConcatWholeAndDecThenConvertBigInteger | {
"repo_name": "ShaunPlummer/daytron-money",
"path": "src/test/java/com/github/daytron/daytronmoney/utility/ConversionTypeUtilTest.java",
"license": "mit",
"size": 2528
} | [
"com.github.daytron.daytronmoney.currency.Money",
"java.math.BigInteger",
"org.junit.Assert"
] | import com.github.daytron.daytronmoney.currency.Money; import java.math.BigInteger; import org.junit.Assert; | import com.github.daytron.daytronmoney.currency.*; import java.math.*; import org.junit.*; | [
"com.github.daytron",
"java.math",
"org.junit"
] | com.github.daytron; java.math; org.junit; | 582,595 |
public static SoyData toSoyData(String value) {
return StringData.forValue(value);
} | static SoyData function(String value) { return StringData.forValue(value); } | /**
* Converts a String value to a SoyData (specifically a StringData).
* @param value The String value to convert.
*/ | Converts a String value to a SoyData (specifically a StringData) | toSoyData | {
"repo_name": "core9/closure-templates",
"path": "src/impl/java/com/google/template/soy/tofu/restricted/SoyTofuFunctionUtils.java",
"license": "apache-2.0",
"size": 2321
} | [
"com.google.template.soy.data.SoyData",
"com.google.template.soy.data.restricted.StringData"
] | import com.google.template.soy.data.SoyData; import com.google.template.soy.data.restricted.StringData; | import com.google.template.soy.data.*; import com.google.template.soy.data.restricted.*; | [
"com.google.template"
] | com.google.template; | 2,301,012 |
private RegularTimePeriod createInstance(Class periodClass,
Date millisecond, TimeZone zone, Locale locale) {
RegularTimePeriod result = null;
try {
Constructor c = periodClass.getDeclaredConstructor(new Class[] {
Date.class, TimeZone.class, Locale.class}... | RegularTimePeriod function(Class periodClass, Date millisecond, TimeZone zone, Locale locale) { RegularTimePeriod result = null; try { Constructor c = periodClass.getDeclaredConstructor(new Class[] { Date.class, TimeZone.class, Locale.class}); result = (RegularTimePeriod) c.newInstance(new Object[] { millisecond, zone,... | /**
* A utility method used to create a particular subclass of the
* {@link RegularTimePeriod} class that includes the specified millisecond,
* assuming the specified time zone.
*
* @param periodClass the class.
* @param millisecond the time.
* @param zone the time zone.
* @pa... | A utility method used to create a particular subclass of the <code>RegularTimePeriod</code> class that includes the specified millisecond, assuming the specified time zone | createInstance | {
"repo_name": "JSansalone/JFreeChart",
"path": "source/org/jfree/chart/axis/PeriodAxis.java",
"license": "lgpl-2.1",
"size": 44491
} | [
"java.lang.reflect.Constructor",
"java.util.Date",
"java.util.Locale",
"java.util.TimeZone",
"org.jfree.data.time.RegularTimePeriod"
] | import java.lang.reflect.Constructor; import java.util.Date; import java.util.Locale; import java.util.TimeZone; import org.jfree.data.time.RegularTimePeriod; | import java.lang.reflect.*; import java.util.*; import org.jfree.data.time.*; | [
"java.lang",
"java.util",
"org.jfree.data"
] | java.lang; java.util; org.jfree.data; | 2,613,794 |
public static void loadUnhandledXmlObject() throws SamlException {
xmlObjectsList.add(ISSUER_MCK);
mockery.checking(new Expectations() {
{
one(ISSUER_MCK).getElementQName();
will(returnValue(NO_SUPPORTED_QNAME_IN_XMLOBJECT));
}
});
... | static void function() throws SamlException { xmlObjectsList.add(ISSUER_MCK); mockery.checking(new Expectations() { { one(ISSUER_MCK).getElementQName(); will(returnValue(NO_SUPPORTED_QNAME_IN_XMLOBJECT)); } }); } | /**
* This method add an unhandled XMLObject to the Assertion.
*/ | This method add an unhandled XMLObject to the Assertion | loadUnhandledXmlObject | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.security.saml.sso/test/com/ibm/ws/security/saml/sso20/token/Saml20TokenImplTest.java",
"license": "epl-1.0",
"size": 42461
} | [
"com.ibm.ws.security.saml.error.SamlException",
"org.jmock.Expectations"
] | import com.ibm.ws.security.saml.error.SamlException; import org.jmock.Expectations; | import com.ibm.ws.security.saml.error.*; import org.jmock.*; | [
"com.ibm.ws",
"org.jmock"
] | com.ibm.ws; org.jmock; | 2,728,063 |
@Test
public void whenDeleteUserThenDeleteUser() {
BankTracker bankTracker = new BankTracker();
User user = new User("Max", "MaxPassport");
bankTracker.addUser(user);
bankTracker.deleteUser(user);
assertTrue(bankTracker.getBankTracker().isEmpty());
} | void function() { BankTracker bankTracker = new BankTracker(); User user = new User("Max", STR); bankTracker.addUser(user); bankTracker.deleteUser(user); assertTrue(bankTracker.getBankTracker().isEmpty()); } | /**
* public void whenDeleteUserThenDeleteUser().
*/ | public void whenDeleteUserThenDeleteUser() | whenDeleteUserThenDeleteUser | {
"repo_name": "mixed2004/borisovm",
"path": "chapter_003/src/test/java/ru/job4j/bank/BankTest.java",
"license": "apache-2.0",
"size": 4454
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 273,549 |
public void addUserTemplateAuthzGroup(Collection rv, String id)
{
if (id == null) {
id = "";
}
// user type template
String template = "!user.template";
try {
User user = userDirectoryService.getUser(id);
String type = user.getType();
if (type != null) {
rv.add(template + "." + type);
... | void function(Collection rv, String id) { if (id == null) { id = STR!user.templateSTR.STR!user.template"); } | /**
* Add the AuthzGroup for this user id, or for the user's type template, or for the general template.
*
* @param rv
* The list.
* @param id
* The user id.
*/ | Add the AuthzGroup for this user id, or for the user's type template, or for the general template | addUserTemplateAuthzGroup | {
"repo_name": "rodriguezdevera/sakai",
"path": "kernel/kernel-impl/src/main/java/org/sakaiproject/entity/impl/ReferenceComponent.java",
"license": "apache-2.0",
"size": 8826
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 482,373 |
protected void setUsage (int value) {
if (isBound) throw new GdxRuntimeException("Cannot change usage while VBO is bound");
usage = value;
}
| void function (int value) { if (isBound) throw new GdxRuntimeException(STR); usage = value; } | /** Set the GL enum used in the call to {@link GL20#glBufferData(int, int, java.nio.Buffer, int)}, can only be called when the
* VBO is not bound. */ | Set the GL enum used in the call to <code>GL20#glBufferData(int, int, java.nio.Buffer, int)</code>, can only be called when the | setUsage | {
"repo_name": "GreenLightning/libgdx",
"path": "gdx/src/com/badlogic/gdx/graphics/glutils/VertexBufferObject.java",
"license": "apache-2.0",
"size": 8733
} | [
"com.badlogic.gdx.utils.GdxRuntimeException"
] | import com.badlogic.gdx.utils.GdxRuntimeException; | import com.badlogic.gdx.utils.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 201,171 |
public String generateUpdateSQL()
{
CharBuffer cb = new CharBuffer();
for (int i = 0; i < _columns.size(); i++) {
if (i != 0)
cb.append(", ");
cb.append(_columns.get(i).getName() + "=?");
}
return cb.toString();
} | String function() { CharBuffer cb = new CharBuffer(); for (int i = 0; i < _columns.size(); i++) { if (i != 0) cb.append(STR); cb.append(_columns.get(i).getName() + "=?"); } return cb.toString(); } | /**
* Generates SQL select.
*/ | Generates SQL select | generateUpdateSQL | {
"repo_name": "mdaniel/svn-caucho-com-resin",
"path": "modules/resin/src/com/caucho/amber/table/LinkColumns.java",
"license": "gpl-2.0",
"size": 14471
} | [
"com.caucho.util.CharBuffer"
] | import com.caucho.util.CharBuffer; | import com.caucho.util.*; | [
"com.caucho.util"
] | com.caucho.util; | 524,214 |
@Test
public void testComplement13()
{
List<Integer> expected = Lists.newArrayList();
int length = 10;
for (int i = 0; i < length; i++) {
expected.add(i);
}
ImmutableConciseSet testSet = new ImmutableConciseSet();
verifyComplement(expected, testSet, length);
} | void function() { List<Integer> expected = Lists.newArrayList(); int length = 10; for (int i = 0; i < length; i++) { expected.add(i); } ImmutableConciseSet testSet = new ImmutableConciseSet(); verifyComplement(expected, testSet, length); } | /**
* Complement with empty list of some length
*/ | Complement with empty list of some length | testComplement13 | {
"repo_name": "b-slim/druid",
"path": "extendedset/src/test/java/io/druid/extendedset/intset/ImmutableConciseSetTest.java",
"license": "apache-2.0",
"size": 38403
} | [
"com.google.common.collect.Lists",
"java.util.List"
] | import com.google.common.collect.Lists; import java.util.List; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 87,099 |
public static String getSilverpeasVersion(Properties mavenProperties) {
return getMavenProperty(mavenProperties, "silverpeas.version");
} | static String function(Properties mavenProperties) { return getMavenProperty(mavenProperties, STR); } | /**
* Gets the silverpeas version.
* @return the silverpeas version.
*/ | Gets the silverpeas version | getSilverpeasVersion | {
"repo_name": "SilverDav/Silverpeas-Core",
"path": "core-api/src/test/java/org/silverpeas/core/test/rule/MavenTargetDirectoryRule.java",
"license": "agpl-3.0",
"size": 6652
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 128,681 |
@PUT
@Path("{dm_id}/clear-history")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response clearDmHistory(@PathParam("md_name") String mdName,
@PathParam("ma_name") String maName,
@PathParam("mep_id") short ... | @Path(STR) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response function(@PathParam(STR) String mdName, @PathParam(STR) String maName, @PathParam(STR) short mepId, @PathParam("dm_id") int dmId) { log.debug(STR, mdName + "/STR/STR/" + dmId); try { MdId mdId = MdIdCharStr.asMdId(mdName); M... | /**
* Clear DM history stats by MD name, MA name, Mep Id and DM Id.
*
* @param mdName The name of a Maintenance Domain
* @param maName The name of a Maintenance Association belonging to the MD
* @param mepId The Id of the MEP
* @param dmId The Id of the DM
* @return 200 OK or 304 if n... | Clear DM history stats by MD name, MA name, Mep Id and DM Id | clearDmHistory | {
"repo_name": "sdnwiselab/onos",
"path": "apps/cfm/src/main/java/org/onosproject/soam/rest/DmWebResource.java",
"license": "apache-2.0",
"size": 11849
} | [
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response",
"org.onosproject.incubator.net.l2monitoring.cfm.identifier.MaIdCharStr",
"org.onosproject.incubator.net.l2monitoring.cfm.identifier.MaIdShort",
"org... | import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.onosproject.incubator.net.l2monitoring.cfm.identifier.MaIdCharStr; import org.onosproject.incubator.net.l2monitoring.cfm.identi... | import javax.ws.rs.*; import javax.ws.rs.core.*; import org.onosproject.incubator.net.l2monitoring.cfm.identifier.*; import org.onosproject.incubator.net.l2monitoring.cfm.service.*; import org.onosproject.incubator.net.l2monitoring.soam.*; | [
"javax.ws",
"org.onosproject.incubator"
] | javax.ws; org.onosproject.incubator; | 2,901,463 |
EList<OrType> getOr(); | EList<OrType> getOr(); | /**
* Returns the value of the '<em><b>Or</b></em>' containment reference list.
* The list contents are of type {@link org.liquibase.xml.ns.dbchangelog.OrType}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Or</em>' containment reference list isn't clear,
* there really should be more of a de... | Returns the value of the 'Or' containment reference list. The list contents are of type <code>org.liquibase.xml.ns.dbchangelog.OrType</code>. If the meaning of the 'Or' containment reference list isn't clear, there really should be more of a description here... | getOr | {
"repo_name": "dzonekl/LiquibaseEditor",
"path": "plugins/org.liquidbase.model/src/org/liquibase/xml/ns/dbchangelog/OrType.java",
"license": "mit",
"size": 19957
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 152,256 |
@SuppressWarnings("fallthrough")
public List<Message> processBuffer() {
List<Message> msgs = new ArrayList<Message>();
boolean done = false;
while (!done) {
Logging.logCheckedFine(LOG, MessageFormat.format("{0} processBuffer({1}). Buffer stats:{2}, elements remaining {3}",... | @SuppressWarnings(STR) List<Message> function() { List<Message> msgs = new ArrayList<Message>(); boolean done = false; while (!done) { Logging.logCheckedFine(LOG, MessageFormat.format(STR, Thread.currentThread(), state.getClass(), buffer.toString(), buffer.remaining())); switch (state.get()) { case WELCOME: boolean wse... | /**
* processes the input byte buffer
* @return the list of messages present in the buffer
*/ | processes the input byte buffer | processBuffer | {
"repo_name": "johnjianfang/jxse",
"path": "src/main/java/net/jxta/impl/endpoint/tcp/TcpMessenger.java",
"license": "apache-2.0",
"size": 43928
} | [
"java.io.IOException",
"java.nio.ByteBuffer",
"java.text.MessageFormat",
"java.util.ArrayList",
"java.util.List",
"net.jxta.endpoint.Message",
"net.jxta.impl.endpoint.transportMeter.TransportMeterBuildSettings",
"net.jxta.impl.util.TimeUtils",
"net.jxta.logging.Logging"
] | import java.io.IOException; import java.nio.ByteBuffer; import java.text.MessageFormat; import java.util.ArrayList; import java.util.List; import net.jxta.endpoint.Message; import net.jxta.impl.endpoint.transportMeter.TransportMeterBuildSettings; import net.jxta.impl.util.TimeUtils; import net.jxta.logging.Logging; | import java.io.*; import java.nio.*; import java.text.*; import java.util.*; import net.jxta.endpoint.*; import net.jxta.impl.endpoint.*; import net.jxta.impl.util.*; import net.jxta.logging.*; | [
"java.io",
"java.nio",
"java.text",
"java.util",
"net.jxta.endpoint",
"net.jxta.impl",
"net.jxta.logging"
] | java.io; java.nio; java.text; java.util; net.jxta.endpoint; net.jxta.impl; net.jxta.logging; | 990,212 |
public DoublyConnectedEdgeList<V, E, F> unmarshal(XmlDoublyConnectedEdgeList<V, E, F> xmlDcel, DoublyConnectedEdgeList<V, E, F> dcel) throws Exception {
for (DcelVertex<V, E, F> vertex : xmlDcel.getDcelVertices()) {
dcel.getVertexMap().put(vertex.getVertex(), vertex);
}
for (... | DoublyConnectedEdgeList<V, E, F> function(XmlDoublyConnectedEdgeList<V, E, F> xmlDcel, DoublyConnectedEdgeList<V, E, F> dcel) throws Exception { for (DcelVertex<V, E, F> vertex : xmlDcel.getDcelVertices()) { dcel.getVertexMap().put(vertex.getVertex(), vertex); } for (DcelHalfEdge<V, E, F> halfEdge : xmlDcel.getDcelHalf... | /**
* This function is called before the IDResolver finishes resolving. At this point,
* only idrefs that reference ids earlier in the document are resolved. The other
* idrefs will be resolved after this method.
* @param xmlDcel
* @param dcel
* @return
* @throws Exception
*/ | This function is called before the IDResolver finishes resolving. At this point, only idrefs that reference ids earlier in the document are resolved. The other idrefs will be resolved after this method | unmarshal | {
"repo_name": "trickl/trickl-graph",
"path": "src/main/java/com/trickl/graph/planar/xml/XmlDoublyConnectedEdgeListAdapter.java",
"license": "gpl-3.0",
"size": 4135
} | [
"com.trickl.graph.planar.DcelFace",
"com.trickl.graph.planar.DcelHalfEdge",
"com.trickl.graph.planar.DcelVertex",
"com.trickl.graph.planar.DoublyConnectedEdgeList"
] | import com.trickl.graph.planar.DcelFace; import com.trickl.graph.planar.DcelHalfEdge; import com.trickl.graph.planar.DcelVertex; import com.trickl.graph.planar.DoublyConnectedEdgeList; | import com.trickl.graph.planar.*; | [
"com.trickl.graph"
] | com.trickl.graph; | 1,290,372 |
context = new MockCodecContext();
constraintCodec = context.codec(Constraint.class);
assertThat(constraintCodec, notNullValue());
expect(mockCoreService.registerApplication(FlowRuleCodec.REST_APP_ID))
.andReturn(APP_ID).anyTimes();
replay(mockCoreService);
contex... | context = new MockCodecContext(); constraintCodec = context.codec(Constraint.class); assertThat(constraintCodec, notNullValue()); expect(mockCoreService.registerApplication(FlowRuleCodec.REST_APP_ID)) .andReturn(APP_ID).anyTimes(); replay(mockCoreService); context.registerService(CoreService.class, mockCoreService); } | /**
* Sets up for each test. Creates a context and fetches the flow rule
* codec.
*/ | Sets up for each test. Creates a context and fetches the flow rule codec | setUp | {
"repo_name": "kuujo/onos",
"path": "core/common/src/test/java/org/onosproject/codec/impl/ConstraintCodecTest.java",
"license": "apache-2.0",
"size": 7285
} | [
"org.easymock.EasyMock",
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.onosproject.core.CoreService",
"org.onosproject.net.intent.Constraint"
] | import org.easymock.EasyMock; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.onosproject.core.CoreService; import org.onosproject.net.intent.Constraint; | import org.easymock.*; import org.hamcrest.*; import org.onosproject.core.*; import org.onosproject.net.intent.*; | [
"org.easymock",
"org.hamcrest",
"org.onosproject.core",
"org.onosproject.net"
] | org.easymock; org.hamcrest; org.onosproject.core; org.onosproject.net; | 1,501,555 |
@Test
@Ignore
public void _testExec36_4() throws Exception {
CommandLine cmdl;
final String line = "./script/jrake "
+ "cruise:publish_installers "
+ "INSTALLER_VERSION=unstable_2_1 "
+ "INSTALLER_PATH=\"/var/lib/cruise-agent/installers\" "
... | void function() throws Exception { CommandLine cmdl; final String line = STR + STR + STR + STR/var/lib/cruise-agent/installers\" " + STR + STR; cmdl = CommandLine.parse(line); final String[] args = cmdl.toStrings(); assertEquals(STR, args[0]); assertEquals(STR, args[1]); assertEquals(STR, args[2]); assertEquals(STR/var... | /**
* Some complex real-life command line from
* http://blogs.msdn.com/b/astebner/archive/2005/12/13/503471.aspx
*/ | Some complex real-life command line from HREF | _testExec36_4 | {
"repo_name": "apache/commons-exec",
"path": "src/test/java/org/apache/commons/exec/issues/Exec36Test.java",
"license": "apache-2.0",
"size": 8182
} | [
"org.apache.commons.exec.CommandLine",
"org.junit.Assert"
] | import org.apache.commons.exec.CommandLine; import org.junit.Assert; | import org.apache.commons.exec.*; import org.junit.*; | [
"org.apache.commons",
"org.junit"
] | org.apache.commons; org.junit; | 2,360,107 |
Iterator<B> getBuckets(); | Iterator<B> getBuckets(); | /**
* Returns an iterator of buckets. The order of iteration is consistent with the
* segment numbers.
*/ | Returns an iterator of buckets. The order of iteration is consistent with the segment numbers | getBuckets | {
"repo_name": "apache/avro",
"path": "lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/Histogram.java",
"license": "apache-2.0",
"size": 7107
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 604,980 |
@DisabledTest
public void testDuplicateHttpPostDownload_CreateNew() throws Exception {
// Download a file.
loadUrl(mTestServer.getURL("/chrome/test/data/android/download/post.html"));
waitForFocus();
View currentView = getActivity().getActivityTab().getView();
int callCou... | void function() throws Exception { loadUrl(mTestServer.getURL(STR)); waitForFocus(); View currentView = getActivity().getActivityTab().getView(); int callCount = getChromeDownloadCallCount(); singleClickView(currentView); assertTrue(STR, waitForChromeDownloadToFinish(callCount)); loadUrl(mTestServer.getURL(STR)); waitF... | /**
* Bug http://crbug/597230
* @MediumTest
* @Feature({"Downloads"})
*/ | Bug HREF | testDuplicateHttpPostDownload_CreateNew | {
"repo_name": "was4444/chromium.src",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadTest.java",
"license": "bsd-3-clause",
"size": 17370
} | [
"android.view.View",
"org.chromium.chrome.test.util.InfoBarUtil"
] | import android.view.View; import org.chromium.chrome.test.util.InfoBarUtil; | import android.view.*; import org.chromium.chrome.test.util.*; | [
"android.view",
"org.chromium.chrome"
] | android.view; org.chromium.chrome; | 1,270,067 |
public void xtestQuerySession() throws Exception
{
// define a query that will return a lot of hits i.e. EVERYTHING
Query query = new Query(Constants.QUERY_LANG_LUCENE, "*");
// add the query configuration header to the call
int batchSize = 5;
QueryConfiguration queryCfg... | void function() throws Exception { Query query = new Query(Constants.QUERY_LANG_LUCENE, "*"); int batchSize = 5; QueryConfiguration queryCfg = new QueryConfiguration(); queryCfg.setFetchSize(batchSize); WebServiceFactory.getRepositoryService().setHeader(new RepositoryServiceLocator() .getServiceName().getNamespaceURI()... | /**
* Tests the ability to retrieve the results of a query in batches
*/ | Tests the ability to retrieve the results of a query in batches | xtestQuerySession | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/web-service-client/source/test-java/org/alfresco/webservice/test/RepositoryServiceSystemTest.java",
"license": "lgpl-3.0",
"size": 53853
} | [
"org.alfresco.webservice.repository.QueryResult",
"org.alfresco.webservice.repository.RepositoryServiceLocator",
"org.alfresco.webservice.types.Query",
"org.alfresco.webservice.types.QueryConfiguration",
"org.alfresco.webservice.types.ResultSet",
"org.alfresco.webservice.util.Constants",
"org.alfresco.w... | import org.alfresco.webservice.repository.QueryResult; import org.alfresco.webservice.repository.RepositoryServiceLocator; import org.alfresco.webservice.types.Query; import org.alfresco.webservice.types.QueryConfiguration; import org.alfresco.webservice.types.ResultSet; import org.alfresco.webservice.util.Constants; i... | import org.alfresco.webservice.repository.*; import org.alfresco.webservice.types.*; import org.alfresco.webservice.util.*; | [
"org.alfresco.webservice"
] | org.alfresco.webservice; | 2,538,969 |
@Override
public Color[] apply(final Category category) {
final int[] ARGB = customizedColors.get(key(category));
if (ARGB != null) {
final Color[] colors = new Color[ARGB.length];
for (int i=0; i<colors.length; i++) {
colors[i] = new Color(ARGB[i], true);... | Color[] function(final Category category) { final int[] ARGB = customizedColors.get(key(category)); if (ARGB != null) { final Color[] colors = new Color[ARGB.length]; for (int i=0; i<colors.length; i++) { colors[i] = new Color(ARGB[i], true); } return colors; } return fallback.apply(category); } | /**
* Returns the colors to apply for the given category, or {@code null} for transparent.
* This method returns copies of internal arrays; changes to the returned array do not
* affect this {@code CoverageStyling} (assuming {@link #fallback} also does copies).
*
* @param category the categor... | Returns the colors to apply for the given category, or null for transparent. This method returns copies of internal arrays; changes to the returned array do not affect this CoverageStyling (assuming <code>#fallback</code> also does copies) | apply | {
"repo_name": "apache/sis",
"path": "application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/CoverageStyling.java",
"license": "apache-2.0",
"size": 9066
} | [
"java.awt.Color",
"org.apache.sis.coverage.Category"
] | import java.awt.Color; import org.apache.sis.coverage.Category; | import java.awt.*; import org.apache.sis.coverage.*; | [
"java.awt",
"org.apache.sis"
] | java.awt; org.apache.sis; | 2,873,002 |
EAttribute getConstants_DISABILITY_FLAT_RATE_FOR_MISCELLANEOUS_EXPENSE();
| EAttribute getConstants_DISABILITY_FLAT_RATE_FOR_MISCELLANEOUS_EXPENSE(); | /**
* Returns the meta object for the attribute '{@link TaxationWithRoot.Constants#getDISABILITY_FLAT_RATE_FOR_MISCELLANEOUS_EXPENSE <em>DISABILITY FLAT RATE FOR MISCELLANEOUS EXPENSE</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>DISABILITY FLAT R... | Returns the meta object for the attribute '<code>TaxationWithRoot.Constants#getDISABILITY_FLAT_RATE_FOR_MISCELLANEOUS_EXPENSE DISABILITY FLAT RATE FOR MISCELLANEOUS EXPENSE</code>'. | getConstants_DISABILITY_FLAT_RATE_FOR_MISCELLANEOUS_EXPENSE | {
"repo_name": "viatra/VIATRA-Generator",
"path": "Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/TaxationWithRoot/TaxationPackage.java",
"license": "epl-1.0",
"size": 295635
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,233,012 |
private void logout ()
{
prefs.edit().remove(Gatekeeper.PREF_USERNAME).remove(Gatekeeper.PREF_PASSWORD);
prefs.edit().remove(Gatekeeper.PREF_LOGGEDIN).commit();
connector = null;
startActivity(new Intent(this, WelcomeActivity.class));
finish();
} | void function () { prefs.edit().remove(Gatekeeper.PREF_USERNAME).remove(Gatekeeper.PREF_PASSWORD); prefs.edit().remove(Gatekeeper.PREF_LOGGEDIN).commit(); connector = null; startActivity(new Intent(this, WelcomeActivity.class)); finish(); } | /**
* Deletes the stored username and password from the preferences effectivly
* logging out of the app
*/ | Deletes the stored username and password from the preferences effectivly logging out of the app | logout | {
"repo_name": "agargiulo/gatekeeper-android",
"path": "src/edu/rit/csh/agargiulo/Gatekeeper/GatekeeperActivity.java",
"license": "mit",
"size": 8940
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 1,719,494 |
@Override
public BytesReference sourceRef() {
try {
this.source = CompressorFactory.uncompressIfNeeded(this.source);
return this.source;
} catch (IOException e) {
throw new ElasticsearchParseException("failed to decompress source", e);
}
} | BytesReference function() { try { this.source = CompressorFactory.uncompressIfNeeded(this.source); return this.source; } catch (IOException e) { throw new ElasticsearchParseException(STR, e); } } | /**
* Returns bytes reference, also un compress the source if needed.
*/ | Returns bytes reference, also un compress the source if needed | sourceRef | {
"repo_name": "xuzha/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/search/internal/InternalSearchHit.java",
"license": "apache-2.0",
"size": 28036
} | [
"java.io.IOException",
"org.elasticsearch.ElasticsearchParseException",
"org.elasticsearch.common.bytes.BytesReference",
"org.elasticsearch.common.compress.CompressorFactory"
] | import java.io.IOException; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.compress.CompressorFactory; | import java.io.*; import org.elasticsearch.*; import org.elasticsearch.common.bytes.*; import org.elasticsearch.common.compress.*; | [
"java.io",
"org.elasticsearch",
"org.elasticsearch.common"
] | java.io; org.elasticsearch; org.elasticsearch.common; | 73,428 |
static String[] getSuffixIDs(final Configuration conf, final String addressKey,
String knownNsId, String knownNNId,
final AddressMatcher matcher) {
String nameserviceId = null;
String namenodeId = null;
int found = 0;
Collection<String> nsIds = getNameServiceIds(conf);
for (String... | static String[] getSuffixIDs(final Configuration conf, final String addressKey, String knownNsId, String knownNNId, final AddressMatcher matcher) { String nameserviceId = null; String namenodeId = null; int found = 0; Collection<String> nsIds = getNameServiceIds(conf); for (String nsId : emptyAsSingletonNull(nsIds)) { ... | /**
* Returns nameservice Id and namenode Id when the local host matches the
* configuration parameter {@code addressKey}.<nameservice Id>.<namenode Id>
*
* @param conf Configuration
* @param addressKey configuration key corresponding to the address.
* @param knownNsId only look at configs for the gi... | Returns nameservice Id and namenode Id when the local host matches the configuration parameter addressKey. | getSuffixIDs | {
"repo_name": "Wajihulhassan/Hadoop-2.7.0",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java",
"license": "apache-2.0",
"size": 69832
} | [
"java.net.InetSocketAddress",
"java.util.Collection",
"org.apache.hadoop.HadoopIllegalArgumentException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.net.NetUtils"
] | import java.net.InetSocketAddress; import java.util.Collection; import org.apache.hadoop.HadoopIllegalArgumentException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.net.NetUtils; | import java.net.*; import java.util.*; import org.apache.hadoop.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.net.*; | [
"java.net",
"java.util",
"org.apache.hadoop"
] | java.net; java.util; org.apache.hadoop; | 2,653,975 |
public void suspendEncoding() throws java.io.IOException {
flushBase64();
this.suspendEncoding = true;
} // end suspendEncoding | void function() throws java.io.IOException { flushBase64(); this.suspendEncoding = true; } | /**
* Suspend encoding.
*
* @throws IOException Signals that an I/O exception has occurred.
*/ | Suspend encoding | suspendEncoding | {
"repo_name": "UweTrottmann/MovieTracker",
"path": "SeriesGuideMovies/src/com/uwetrottmann/tmdb/util/Base64.java",
"license": "apache-2.0",
"size": 65585
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 313,518 |
void cancelCalls() {
for (ListenableFuture<RESULT> call : allCalls) {
call.cancel(true);
}
} | void cancelCalls() { for (ListenableFuture<RESULT> call : allCalls) { call.cancel(true); } } | /**
* Cancel any outstanding calls.
*/ | Cancel any outstanding calls | cancelCalls | {
"repo_name": "apurtell/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/QuorumCall.java",
"license": "apache-2.0",
"size": 11924
} | [
"org.apache.hadoop.thirdparty.com.google.common.util.concurrent.ListenableFuture"
] | import org.apache.hadoop.thirdparty.com.google.common.util.concurrent.ListenableFuture; | import org.apache.hadoop.thirdparty.com.google.common.util.concurrent.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,347,676 |
void setOut(HttpServletRequest currentRequest, Writer out2); | void setOut(HttpServletRequest currentRequest, Writer out2); | /**
* Sets the current write for the request
* @param currentRequest The request
* @param out2 The writer
*/ | Sets the current write for the request | setOut | {
"repo_name": "lpicanco/grails",
"path": "src/web/org/codehaus/groovy/grails/web/servlet/GrailsApplicationAttributes.java",
"license": "apache-2.0",
"size": 5629
} | [
"java.io.Writer",
"javax.servlet.http.HttpServletRequest"
] | import java.io.Writer; import javax.servlet.http.HttpServletRequest; | import java.io.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 676,287 |
@Override
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
super.looseUnmarshal(wireFormat, o, dataIn);
WireFormatInfo info = (WireFormatInfo) o;
info.beforeUnmarshall(wireFormat);
info.setMagic(looseUnmarshalConstByteArray... | void function(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); WireFormatInfo info = (WireFormatInfo) o; info.beforeUnmarshall(wireFormat); info.setMagic(looseUnmarshalConstByteArray(dataIn, 8)); info.setVersion(dataIn.readInt()); info.setMarshalle... | /**
* Un-marshal an object instance from the data input stream
*
* @param o
* the object to un-marshal
* @param dataIn
* the data input stream to build the object from
* @throws IOException
*/ | Un-marshal an object instance from the data input stream | looseUnmarshal | {
"repo_name": "apache/activemq-openwire",
"path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/WireFormatInfoMarshaller.java",
"license": "apache-2.0",
"size": 5088
} | [
"java.io.DataInput",
"java.io.IOException",
"org.apache.activemq.openwire.codec.OpenWireFormat",
"org.apache.activemq.openwire.commands.WireFormatInfo"
] | import java.io.DataInput; import java.io.IOException; import org.apache.activemq.openwire.codec.OpenWireFormat; import org.apache.activemq.openwire.commands.WireFormatInfo; | import java.io.*; import org.apache.activemq.openwire.codec.*; import org.apache.activemq.openwire.commands.*; | [
"java.io",
"org.apache.activemq"
] | java.io; org.apache.activemq; | 2,281,422 |
public void testHashCode() {
CategoryAnchor a1 = CategoryAnchor.START;
CategoryAnchor a2 = CategoryAnchor.START;
assertTrue(a1.equals(a2));
int h1 = a1.hashCode();
int h2 = a2.hashCode();
assertEquals(h1, h2);
} | void function() { CategoryAnchor a1 = CategoryAnchor.START; CategoryAnchor a2 = CategoryAnchor.START; assertTrue(a1.equals(a2)); int h1 = a1.hashCode(); int h2 = a2.hashCode(); assertEquals(h1, h2); } | /**
* Two objects that are equal are required to return the same hashCode.
*/ | Two objects that are equal are required to return the same hashCode | testHashCode | {
"repo_name": "linuxuser586/jfreechart",
"path": "tests/org/jfree/chart/axis/junit/CategoryAnchorTests.java",
"license": "lgpl-2.1",
"size": 4006
} | [
"org.jfree.chart.axis.CategoryAnchor"
] | import org.jfree.chart.axis.CategoryAnchor; | import org.jfree.chart.axis.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 2,047,272 |
public DoubleMatrix2D getAttributeAsDoubleMatrix (String key , DoubleMatrix2D defaultValue)
{
checkAttachedToNetPlanObject();
final String val = attributes.get(key);
if (val == null) return defaultValue;
try
{
final String [] rows = val.split(MATRIX_ROWSEPARATOR,-1);
final List<List<Double>> res ... | DoubleMatrix2D function (String key , DoubleMatrix2D defaultValue) { checkAttachedToNetPlanObject(); final String val = attributes.get(key); if (val == null) return defaultValue; try { final String [] rows = val.split(MATRIX_ROWSEPARATOR,-1); final List<List<Double>> res = new ArrayList<> (rows.length); int numCols = 0... | /**
* Returns the value of a given attribute for this network element, in form of a matrix, as stored using the setAttributeAsDoubleMatrix method
* @param key Attribute name
* @param defaultValue default value to return if not found, or could not be parsed
* @return see above
*/ | Returns the value of a given attribute for this network element, in form of a matrix, as stored using the setAttributeAsDoubleMatrix method | getAttributeAsDoubleMatrix | {
"repo_name": "girtel/Net2Plan",
"path": "Net2Plan-Core/src/main/java/com/net2plan/interfaces/networkDesign/NetworkElement.java",
"license": "bsd-2-clause",
"size": 21575
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,265,166 |
private static String getLockName(Enum<?> rank) {
return rank.getDeclaringClass().getSimpleName() + "." + rank.name();
}
@Beta
public static final class WithExplicitOrdering<E extends Enum<E>>
extends CycleDetectingLockFactory {
private final Map<E, LockGraphNode> lockGraphNodes;
@Visibl... | static String function(Enum<?> rank) { return rank.getDeclaringClass().getSimpleName() + "." + rank.name(); } public static final class WithExplicitOrdering<E extends Enum<E>> extends CycleDetectingLockFactory { private final Map<E, LockGraphNode> lockGraphNodes; WithExplicitOrdering( Policy policy, Map<E, LockGraphNod... | /**
* For the given Enum value {@code rank}, returns the value's
* {@code "EnumClass.name"}, which is used in exception and warning
* output.
*/ | For the given Enum value rank, returns the value's "EnumClass.name", which is used in exception and warning output | getLockName | {
"repo_name": "sensui/guava-libraries",
"path": "guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java",
"license": "apache-2.0",
"size": 36199
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,683,353 |
protected Map<Character, Integer> match_alphabet(String pattern) {
Map<Character, Integer> s = new HashMap<Character, Integer>();
char[] char_pattern = pattern.toCharArray();
for (char c : char_pattern) {
s.put(c, 0);
}
int i = 0;
for (char c : char_patter... | Map<Character, Integer> function(String pattern) { Map<Character, Integer> s = new HashMap<Character, Integer>(); char[] char_pattern = pattern.toCharArray(); for (char c : char_pattern) { s.put(c, 0); } int i = 0; for (char c : char_pattern) { s.put(c, s.get(c) (1 << (pattern.length() - i - 1))); i++; } return s; } | /**
* Initialise the alphabet for the Bitap algorithm.
*
* @param pattern The text to encode.
* @return Hash of character locations.
*/ | Initialise the alphabet for the Bitap algorithm | match_alphabet | {
"repo_name": "boundlessgeo/GeoGig",
"path": "src/core/src/main/java/org/locationtech/geogig/api/plumbing/diff/DiffMatchPatch.java",
"license": "bsd-3-clause",
"size": 102502
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,639,795 |
public FeatureResultSet queryFeaturesForChunk(boolean distinct,
String[] columns, BoundingBox boundingBox, String orderBy,
int limit) {
return queryFeaturesForChunk(distinct, columns,
boundingBox.buildEnvelope(), orderBy, limit);
} | FeatureResultSet function(boolean distinct, String[] columns, BoundingBox boundingBox, String orderBy, int limit) { return queryFeaturesForChunk(distinct, columns, boundingBox.buildEnvelope(), orderBy, limit); } | /**
* Query for features within the bounding box, starting at the offset and
* returning no more than the limit
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param boundingBox
* bounding box
* @param orderBy
* order by
* @param lim... | Query for features within the bounding box, starting at the offset and returning no more than the limit | queryFeaturesForChunk | {
"repo_name": "ngageoint/geopackage-java",
"path": "src/main/java/mil/nga/geopackage/extension/rtree/RTreeIndexTableDao.java",
"license": "mit",
"size": 349361
} | [
"mil.nga.geopackage.BoundingBox",
"mil.nga.geopackage.features.user.FeatureResultSet"
] | import mil.nga.geopackage.BoundingBox; import mil.nga.geopackage.features.user.FeatureResultSet; | import mil.nga.geopackage.*; import mil.nga.geopackage.features.user.*; | [
"mil.nga.geopackage"
] | mil.nga.geopackage; | 1,962,502 |
@Override
public void setConf(Configuration conf) {
super.setConf(conf);
featureFirstColumn = conf.getInt(FEATURE_FIRST_COLUMN, 0);
hasLabel = conf.getBoolean(HAS_LABELS, true);
multilabel = conf.getBoolean(MULTILABEL, false);
labelFirstColumn = conf.getInt(LABEL_FIRST_CO... | void function(Configuration conf) { super.setConf(conf); featureFirstColumn = conf.getInt(FEATURE_FIRST_COLUMN, 0); hasLabel = conf.getBoolean(HAS_LABELS, true); multilabel = conf.getBoolean(MULTILABEL, false); labelFirstColumn = conf.getInt(LABEL_FIRST_COLUMN, -1); labelLastColumn = conf.getInt(LABEL_LAST_COLUMN, -1);... | /**
* Set DataVec configuration
*
* @param conf
*/ | Set DataVec configuration | setConf | {
"repo_name": "deeplearning4j/DataVec",
"path": "datavec-api/src/main/java/org/datavec/api/records/writer/impl/misc/SVMLightRecordWriter.java",
"license": "apache-2.0",
"size": 10653
} | [
"org.datavec.api.conf.Configuration"
] | import org.datavec.api.conf.Configuration; | import org.datavec.api.conf.*; | [
"org.datavec.api"
] | org.datavec.api; | 2,060,265 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.