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 final void init(S subject, String key, JsonNode node, ObjectMapper mapper, ConfigApplyDelegate delegate) { this.subject = checkNotNull(subject, "Subject cannot be null"); this.key = key; this.node = checkNotNull(node, "Node cannot be null"); this.obj...
final void function(S subject, String key, JsonNode node, ObjectMapper mapper, ConfigApplyDelegate delegate) { this.subject = checkNotNull(subject, STR); this.key = key; this.node = checkNotNull(node, STR); this.object = node instanceof ObjectNode ? (ObjectNode) node : null; this.array = node instanceof ArrayNode ? (Ar...
/** * Initializes the configuration behaviour with necessary context. * * @param subject configuration subject * @param key configuration key * @param node JSON node where configuration data is stored * @param mapper JSON object mapper * @param delegate delegate context, o...
Initializes the configuration behaviour with necessary context
init
{ "repo_name": "donNewtonAlpha/onos", "path": "core/api/src/main/java/org/onosproject/net/config/Config.java", "license": "apache-2.0", "size": 31880 }
[ "com.fasterxml.jackson.databind.JsonNode", "com.fasterxml.jackson.databind.ObjectMapper", "com.fasterxml.jackson.databind.node.ArrayNode", "com.fasterxml.jackson.databind.node.ObjectNode", "com.google.common.base.Preconditions" ]
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; import com.google.common.base.Preconditions;
import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.node.*; import com.google.common.base.*;
[ "com.fasterxml.jackson", "com.google.common" ]
com.fasterxml.jackson; com.google.common;
2,692,793
@ServiceMethod(returns = ReturnType.SINGLE) OrchestratorInner create( String resourceGroupName, String resourceName, OrchestratorInner parameters, Context context);
@ServiceMethod(returns = ReturnType.SINGLE) OrchestratorInner create( String resourceGroupName, String resourceName, OrchestratorInner parameters, Context context);
/** * Create a orchestrator instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. It must be a minimum of 3 characters, and a maximum of 63. * @param parameters OrchestratorInstance type parameters. ...
Create a orchestrator instance
create
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/fluent/OrchestratorInstanceServicesClient.java", "license": "mit", "size": 13751 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.util.Context", "com.azure.resourcemanager.delegatednetwork.fluent.models.OrchestratorInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.delegatednetwork.fluent.models.OrchestratorInner;
import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.delegatednetwork.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,464,891
System.setProperty("solr.jaas.debug", "true"); Path kdcDir = baseDir.resolve("minikdc"); String solrClientPrincipal = "solr"; String solrAltClientPrincipal = "solr_alt"; // An alternate principal that can be handled differently by authz tests File keytabFile = kdcDir.resolve("keytabs").toFile();...
System.setProperty(STR, "true"); Path kdcDir = baseDir.resolve(STR); String solrClientPrincipal = "solr"; String solrAltClientPrincipal = STR; File keytabFile = kdcDir.resolve(STR).toFile(); KerberosTestServices tmp = KerberosTestServices.builder() .withKdc(kdcDir.toFile()) .withJaasConfiguration(solrClientPrincipal, k...
/** * This method sets up Hadoop mini-kdc along with relevant Kerberos configuration files (e.g. * jaas.conf) as well as system properties. * * @param baseDir The directory path which should be used by the Hadoop mini-kdc * @return An instance of {@link KerberosTestServices} * @throws Exception in cas...
This method sets up Hadoop mini-kdc along with relevant Kerberos configuration files (e.g. jaas.conf) as well as system properties
setupMiniKdc
{ "repo_name": "apache/solr", "path": "solr/modules/hadoop-auth/src/test/org/apache/solr/security/hadoop/KerberosUtils.java", "license": "apache-2.0", "size": 4754 }
[ "java.io.File", "java.nio.file.Files", "java.nio.file.Path" ]
import java.io.File; import java.nio.file.Files; import java.nio.file.Path;
import java.io.*; import java.nio.file.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
862,860
@Override public COSDictionary getCOSObject() { return dictionary; }
COSDictionary function() { return dictionary; }
/** * Interface method for COSObjectable. * * @return This object as a standard COS object. */
Interface method for COSObjectable
getCOSObject
{ "repo_name": "TomRoush/PdfBox-Android", "path": "library/src/main/java/com/tom_roush/pdfbox/pdmodel/interactive/annotation/PDAnnotation.java", "license": "apache-2.0", "size": 22980 }
[ "com.tom_roush.pdfbox.cos.COSDictionary" ]
import com.tom_roush.pdfbox.cos.COSDictionary;
import com.tom_roush.pdfbox.cos.*;
[ "com.tom_roush.pdfbox" ]
com.tom_roush.pdfbox;
1,583,688
protected void setRequiredFiles( File[] requiredFiles ) { this.requiredFiles = requiredFiles; }
void function( File[] requiredFiles ) { this.requiredFiles = requiredFiles; }
/** * Sets the required files. * * @param requiredFiles an array of required files */
Sets the required files
setRequiredFiles
{ "repo_name": "drankye/directory-server", "path": "core-api/src/main/java/org/apache/directory/server/core/api/AbstractLayout.java", "license": "apache-2.0", "size": 6156 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,942,417
ServiceFuture<Void> postOptionalStringPropertyAsync(StringOptionalWrapper bodyParameter, final ServiceCallback<Void> serviceCallback);
ServiceFuture<Void> postOptionalStringPropertyAsync(StringOptionalWrapper bodyParameter, final ServiceCallback<Void> serviceCallback);
/** * Test explicitly optional integer. Please put a valid string-wrapper with 'value' = null. * * @param bodyParameter the StringOptionalWrapper value * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceFuture} object *...
Test explicitly optional integer. Please put a valid string-wrapper with 'value' = null
postOptionalStringPropertyAsync
{ "repo_name": "anudeepsharma/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/requiredoptional/Explicits.java", "license": "mit", "size": 43451 }
[ "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;
775,698
void startUpdaterThread() { updaterExecutor = Executors.newSingleThreadExecutor( new ThreadFactoryBuilder().setDaemon(true) .setNameFormat("reencryptionUpdaterThread #%d").build()); updaterExecutor.execute(reencryptionUpdater); }
void startUpdaterThread() { updaterExecutor = Executors.newSingleThreadExecutor( new ThreadFactoryBuilder().setDaemon(true) .setNameFormat(STR).build()); updaterExecutor.execute(reencryptionUpdater); }
/** * Start the re-encryption updater thread. */
Start the re-encryption updater thread
startUpdaterThread
{ "repo_name": "plusplusjiajia/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ReencryptionHandler.java", "license": "apache-2.0", "size": 30774 }
[ "com.google.common.util.concurrent.ThreadFactoryBuilder", "java.util.concurrent.Executors" ]
import com.google.common.util.concurrent.ThreadFactoryBuilder; import java.util.concurrent.Executors;
import com.google.common.util.concurrent.*; import java.util.concurrent.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
40,705
public void importStyle(String uri, SACMediaList media, String defaultNamespaceURI) throws CSSException { }
void function(String uri, SACMediaList media, String defaultNamespaceURI) throws CSSException { }
/** * <b>SAC</b>: Implements {@link * DocumentHandler#importStyle(String,SACMediaList,String)}. */
SAC: Implements <code>DocumentHandler#importStyle(String,SACMediaList,String)</code>
importStyle
{ "repo_name": "Squeegee/batik", "path": "sources/org/apache/batik/css/parser/DefaultDocumentHandler.java", "license": "apache-2.0", "size": 4652 }
[ "org.w3c.css.sac.CSSException", "org.w3c.css.sac.SACMediaList" ]
import org.w3c.css.sac.CSSException; import org.w3c.css.sac.SACMediaList;
import org.w3c.css.sac.*;
[ "org.w3c.css" ]
org.w3c.css;
1,277,136
protected Map<String, Integer> getUsedPes() { return usedPes; }
Map<String, Integer> function() { return usedPes; }
/** * Gets the used pes. * * @return the used pes */
Gets the used pes
getUsedPes
{ "repo_name": "AlphaStaxLLC/OpenSim", "path": "src/org/opensim/OpenPowerVmAllocation.java", "license": "lgpl-3.0", "size": 6158 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
534,070
@Test public void basicTwoPartSplitPacketTest() throws IOException { final int packetLen = NativeConstants.MAX_PACKET_SIZE + 20000; byte[] packet = new byte[packetLen]; // mark key positions in packet to check split packet packet[0] = 41; packet[NativeConstants.MAX_PACKET...
void function() throws IOException { final int packetLen = NativeConstants.MAX_PACKET_SIZE + 20000; byte[] packet = new byte[packetLen]; packet[0] = 41; packet[NativeConstants.MAX_PACKET_SIZE - 1] = 42; packet[NativeConstants.MAX_PACKET_SIZE] = 43; packet[packetLen - 1] = 44; final byte packetSequence = 45; this.sender...
/** * Test the situation where a single packet is split into two and the second part doesn't exceed the capacity of the second compressed packet. */
Test the situation where a single packet is split into two and the second part doesn't exceed the capacity of the second compressed packet
basicTwoPartSplitPacketTest
{ "repo_name": "ac2cz/FoxTelem", "path": "lib/mysql-connector-java-8.0.13/src/test/java/com/mysql/cj/protocol/a/CompressedPacketSenderTest.java", "license": "gpl-3.0", "size": 13894 }
[ "java.io.IOException", "org.junit.Assert" ]
import java.io.IOException; import org.junit.Assert;
import java.io.*; import org.junit.*;
[ "java.io", "org.junit" ]
java.io; org.junit;
1,873,989
public void setRemoveItems(Collection<String> removeItems) { this.removeItems = new TreeSet<>(Objects.requireNonNull(removeItems, "[" + REMOVE_ITEMS.getPreferredName()+"] must not be null")); }
void function(Collection<String> removeItems) { this.removeItems = new TreeSet<>(Objects.requireNonNull(removeItems, "[" + REMOVE_ITEMS.getPreferredName()+STR)); }
/** * The collection of items to remove from the filter * @param removeItems non-null items to remove from the filter, defaults to empty array */
The collection of items to remove from the filter
setRemoveItems
{ "repo_name": "ern/elasticsearch", "path": "client/rest-high-level/src/main/java/org/elasticsearch/client/ml/UpdateFilterRequest.java", "license": "apache-2.0", "size": 4866 }
[ "java.util.Collection", "java.util.Objects", "java.util.TreeSet" ]
import java.util.Collection; import java.util.Objects; import java.util.TreeSet;
import java.util.*;
[ "java.util" ]
java.util;
858,290
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<Flux<ByteBuffer>>> restartWithResponseAsync( String resourceGroupName, String serviceName, String appName, String deploymentName) { if (this.client.getEndpoint() == null) { return Mono .error( ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function( String resourceGroupName, String serviceName, String appName, String deploymentName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) {...
/** * Restart the deployment. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param serviceName The name of the Service resource. * @param appName The name of the A...
Restart the deployment
restartWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/DeploymentsClientImpl.java", "license": "mit", "size": 155556 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.FluxUtil", "java.nio.ByteBuffer" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import java.nio.ByteBuffer;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import java.nio.*;
[ "com.azure.core", "java.nio" ]
com.azure.core; java.nio;
2,399,543
protected char[] getPasswordFromConfig(String name) { char[] pass = null; if (getBoolean(CredentialProvider.CLEAR_TEXT_FALLBACK, true)) { String passStr = get(name); if (passStr != null) { pass = passStr.toCharArray(); } } return pass; }
char[] function(String name) { char[] pass = null; if (getBoolean(CredentialProvider.CLEAR_TEXT_FALLBACK, true)) { String passStr = get(name); if (passStr != null) { pass = passStr.toCharArray(); } } return pass; }
/** * Fallback to clear text passwords in configuration. * @param name * @return clear text password or null */
Fallback to clear text passwords in configuration
getPasswordFromConfig
{ "repo_name": "bruthe/hadoop-2.6.0r", "path": "src/common/org/apache/hadoop/conf/Configuration.java", "license": "apache-2.0", "size": 95484 }
[ "org.apache.hadoop.security.alias.CredentialProvider" ]
import org.apache.hadoop.security.alias.CredentialProvider;
import org.apache.hadoop.security.alias.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,153,605
public boolean validate(AttributedDocumentEvent event) { boolean allow = true; if (getAccountingLineForValidation().getBaseBudgetAdjustmentAmount().isNonZero() && !fiscalYearFunctionControlService.isBaseAmountChangeAllowed(getAccountingDocumentForValidation().getPostingYear())) { GlobalV...
boolean function(AttributedDocumentEvent event) { boolean allow = true; if (getAccountingLineForValidation().getBaseBudgetAdjustmentAmount().isNonZero() && !fiscalYearFunctionControlService.isBaseAmountChangeAllowed(getAccountingDocumentForValidation().getPostingYear())) { GlobalVariables.getMessageMap().putError(KFSPr...
/** * Validate that, if a base amount is entered for a line, that it can be adjusted for the posting year * * @see org.kuali.kfs.sys.document.validation.Validation#validate(org.kuali.kfs.sys.document.validation.event.AttributedDocumentEvent) */
Validate that, if a base amount is entered for a line, that it can be adjusted for the posting year
validate
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-core/src/main/java/org/kuali/kfs/fp/document/validation/impl/BudgetAdjustmentAccountingLineBaseAmountValidation.java", "license": "agpl-3.0", "size": 4530 }
[ "org.kuali.kfs.krad.util.GlobalVariables", "org.kuali.kfs.sys.KFSKeyConstants", "org.kuali.kfs.sys.KFSPropertyConstants", "org.kuali.kfs.sys.document.validation.event.AttributedDocumentEvent" ]
import org.kuali.kfs.krad.util.GlobalVariables; import org.kuali.kfs.sys.KFSKeyConstants; import org.kuali.kfs.sys.KFSPropertyConstants; import org.kuali.kfs.sys.document.validation.event.AttributedDocumentEvent;
import org.kuali.kfs.krad.util.*; import org.kuali.kfs.sys.*; import org.kuali.kfs.sys.document.validation.event.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
2,173,909
public static void addDelimitedStringConverters(ConverterRegistry registry) { ConversionService service = (ConversionService) registry; registry.addConverter(new ArrayToDelimitedStringConverter(service)); registry.addConverter(new CollectionToDelimitedStringConverter(service)); registry.addConverter(new Deli...
static void function(ConverterRegistry registry) { ConversionService service = (ConversionService) registry; registry.addConverter(new ArrayToDelimitedStringConverter(service)); registry.addConverter(new CollectionToDelimitedStringConverter(service)); registry.addConverter(new DelimitedStringToArrayConverter(service));...
/** * Add converters to support delimited strings. * @param registry the registry of converters to add to (must also be castable to * ConversionService, e.g. being a {@link ConfigurableConversionService}) * @throws ClassCastException if the given ConverterRegistry could not be cast to a * ConversionService ...
Add converters to support delimited strings
addDelimitedStringConverters
{ "repo_name": "tiarebalbi/spring-boot", "path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/ApplicationConversionService.java", "license": "apache-2.0", "size": 7329 }
[ "org.springframework.core.convert.ConversionService", "org.springframework.core.convert.converter.ConverterRegistry" ]
import org.springframework.core.convert.ConversionService; import org.springframework.core.convert.converter.ConverterRegistry;
import org.springframework.core.convert.*; import org.springframework.core.convert.converter.*;
[ "org.springframework.core" ]
org.springframework.core;
1,233,400
@SuppressWarnings("unchecked") public static <T> Template<T> getTemplate(final Class<T> clazz, final boolean create, final boolean cache, final boolean recreate) { if (! recreate) { final Template<T> template = (Template<T>) templateMap.get(clazz); if (template != nul...
@SuppressWarnings(STR) static <T> Template<T> function(final Class<T> clazz, final boolean create, final boolean cache, final boolean recreate) { if (! recreate) { final Template<T> template = (Template<T>) templateMap.get(clazz); if (template != null) { return template; } if (! create) { return null; } } Supplier<T> d...
/** * Get template for given class. * * @param clazz class to get template. * @param create if template should be created if it don't exisit yet. * @param cache if template should be saved to memory if created. * @param recreate if template should be force re-created even if it exi...
Get template for given class
getTemplate
{ "repo_name": "tpacce/Diorite", "path": "DioriteAPI/src/main/java/org/diorite/cfg/system/TemplateCreator.java", "license": "mit", "size": 12895 }
[ "java.lang.reflect.Field", "java.lang.reflect.Modifier", "java.util.ArrayList", "java.util.Collection", "java.util.Collections", "java.util.HashSet", "java.util.Set", "java.util.TreeSet", "java.util.function.Supplier", "org.diorite.cfg.annotations.CfgClass", "org.diorite.cfg.annotations.CfgExclu...
import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.Set; import java.util.TreeSet; import java.util.function.Supplier; import org.diorite.cfg.annotations.CfgClass; import org....
import java.lang.reflect.*; import java.util.*; import java.util.function.*; import org.diorite.cfg.annotations.*; import org.diorite.cfg.annotations.defaults.*; import org.diorite.utils.reflections.*;
[ "java.lang", "java.util", "org.diorite.cfg", "org.diorite.utils" ]
java.lang; java.util; org.diorite.cfg; org.diorite.utils;
342,505
public static ColorUIResource getControlDisabled() { return metalTheme.getControlDisabled(); }
static ColorUIResource function() { return metalTheme.getControlDisabled(); }
/** * Return control disabled color * @return ColorUIResource color */
Return control disabled color
getControlDisabled
{ "repo_name": "freeVM/freeVM", "path": "enhanced/archive/classlib/java6/modules/swing/src/main/java/common/javax/swing/plaf/metal/MetalLookAndFeel.java", "license": "apache-2.0", "size": 80984 }
[ "javax.swing.plaf.ColorUIResource" ]
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.*;
[ "javax.swing" ]
javax.swing;
1,744,522
public static CounterId fromInt(int n) { long lowBits = 0xC000000000000000L | n; return new CounterId(ByteBuffer.allocate(16).putLong(0, 0).putLong(8, lowBits)); }
static CounterId function(int n) { long lowBits = 0xC000000000000000L n; return new CounterId(ByteBuffer.allocate(16).putLong(0, 0).putLong(8, lowBits)); }
/** * Function for test purposes, do not use otherwise. * Pack an int in a valid CounterId so that the resulting ids respects the * numerical ordering. Used for creating handcrafted but easy to * understand contexts in unit tests (see CounterContextTest). */
Function for test purposes, do not use otherwise. Pack an int in a valid CounterId so that the resulting ids respects the numerical ordering. Used for creating handcrafted but easy to understand contexts in unit tests (see CounterContextTest)
fromInt
{ "repo_name": "miguel0afd/cassandra-cqlMod", "path": "src/java/org/apache/cassandra/utils/CounterId.java", "license": "apache-2.0", "size": 7490 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,883,487
public InetAddress getAddress() { return addr; }
InetAddress function() { return addr; }
/** * Return the address of the host to contact in order to start * unicast discovery. * * @return the address of the host to contact in order to start * unicast discovery */
Return the address of the host to contact in order to start unicast discovery
getAddress
{ "repo_name": "apache/river", "path": "src/net/jini/discovery/IncomingMulticastRequest.java", "license": "apache-2.0", "size": 5888 }
[ "java.net.InetAddress" ]
import java.net.InetAddress;
import java.net.*;
[ "java.net" ]
java.net;
2,426,846
int foundIndex = -1; for( int i = 0; i < modelFields.size(); ++i ) { final ModelField field = modelFields.get(i); if( field.getName().equals(fieldName) ) { if( foundIndex >= 0 ) { Assert.assertTrue("Field <" + fieldName + "> found more than once.", fal...
int foundIndex = -1; for( int i = 0; i < modelFields.size(); ++i ) { final ModelField field = modelFields.get(i); if( field.getName().equals(fieldName) ) { if( foundIndex >= 0 ) { Assert.assertTrue(STR + fieldName + STR, false); } foundIndex = i; } } if( foundIndex < 0 ) { Assert.assertTrue(STR + fieldName + STR, false...
/** * Assert that the given fields list contains the field with the given name. * On assertion failure index isn't naturally returned. * @param modelFields Model to check * @param fieldName Field name * @return Index in which the found field is. */
Assert that the given fields list contains the field with the given name. On assertion failure index isn't naturally returned
assertFieldFoundOnce
{ "repo_name": "juhasipo/JMobster", "path": "core/src/test/java/fi/vincit/jmobster/util/test/TestUtil.java", "license": "apache-2.0", "size": 7298 }
[ "fi.vincit.jmobster.processor.model.ModelField", "org.junit.Assert" ]
import fi.vincit.jmobster.processor.model.ModelField; import org.junit.Assert;
import fi.vincit.jmobster.processor.model.*; import org.junit.*;
[ "fi.vincit.jmobster", "org.junit" ]
fi.vincit.jmobster; org.junit;
1,486,064
private Bounds changeDomainBounds(MouseWheelEvent mouseWheelEvent) { Bounds setBounds = this.currentSetDomainBoundsEvent.getBounds(); // memorizing the domain point at the current mouse position Point originalDomainPoint = computeDomainPointAtMousePosition(mouseWheelEvent, setBounds); ...
Bounds function(MouseWheelEvent mouseWheelEvent) { Bounds setBounds = this.currentSetDomainBoundsEvent.getBounds(); Point originalDomainPoint = computeDomainPointAtMousePosition(mouseWheelEvent, setBounds); if (mouseWheelEvent.isNorth()) { setBounds = this.currentSetDomainBoundsEvent.getBounds().transformProportional( ...
/** * Computes the new domain bounds */
Computes the new domain bounds
changeDomainBounds
{ "repo_name": "ridoo/SensorWebClient", "path": "sensorwebclient-ui/src/main/java/org/n52/client/sos/ctrl/MouseWheelControl.java", "license": "gpl-2.0", "size": 18373 }
[ "com.google.gwt.event.dom.client.MouseWheelEvent", "org.eesgmbh.gimv.shared.util.Bounds", "org.eesgmbh.gimv.shared.util.Point" ]
import com.google.gwt.event.dom.client.MouseWheelEvent; import org.eesgmbh.gimv.shared.util.Bounds; import org.eesgmbh.gimv.shared.util.Point;
import com.google.gwt.event.dom.client.*; import org.eesgmbh.gimv.shared.util.*;
[ "com.google.gwt", "org.eesgmbh.gimv" ]
com.google.gwt; org.eesgmbh.gimv;
1,449,461
this.create = create; } private String name; private String description; private Date create; public Item() { } public Item(String name, String description) { this.name = name; this.description = description; }
this.create = create; } private String name; private String description; private Date create; public Item() { } public Item(String name, String description) { this.name = name; this.description = description; }
/** * Set date. * @param create creation date. */
Set date
setCreate
{ "repo_name": "VardanMatevosyan/Vardan-Git-Repository", "path": "SQL_JDBC/4.JDBC/trackerSystem/src/main/java/ru/matevosyan/model/Item.java", "license": "apache-2.0", "size": 2543 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
859,722
public DimmerBuilder inputGroupAddressForAbsoluteDimValueOverride(String dim) { this.dimAbsoluteOverride = of(createGroupAddress(dim)); return this; }
DimmerBuilder function(String dim) { this.dimAbsoluteOverride = of(createGroupAddress(dim)); return this; }
/** * Will listen for telegrams on the given GA which are considered percentage telegrams for bringing the dimmer to the desired value */
Will listen for telegrams on the given GA which are considered percentage telegrams for bringing the dimmer to the desired value
inputGroupAddressForAbsoluteDimValueOverride
{ "repo_name": "koen-serneels/HomeAutomation", "path": "src/main/java/be/error/rpi/dac/dimmer/builder/DimmerBuilder.java", "license": "apache-2.0", "size": 10397 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
1,999,535
public void failDestructive(String[] aliasesOrIndices) { if (destructiveRequiresName == false) { return; } if (aliasesOrIndices == null || aliasesOrIndices.length == 0) { throw new IllegalArgumentException("Wildcard expressions or all indices are not allowed"); ...
void function(String[] aliasesOrIndices) { if (destructiveRequiresName == false) { return; } if (aliasesOrIndices == null aliasesOrIndices.length == 0) { throw new IllegalArgumentException(STR); } else if (aliasesOrIndices.length == 1) { if (hasWildcardUsage(aliasesOrIndices[0])) { throw new IllegalArgumentException(ST...
/** * Fail if there is wildcard usage in indices and the named is required for destructive operations. */
Fail if there is wildcard usage in indices and the named is required for destructive operations
failDestructive
{ "repo_name": "ern/elasticsearch", "path": "server/src/main/java/org/elasticsearch/action/support/DestructiveOperations.java", "license": "apache-2.0", "size": 3151 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,442,150
public void stopDeletingMsgsWihoutReferencesTask(boolean hasToStop) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "stopDeletingMsgsWihoutReferencesTask", hasToStop); this.HasToStop = hasToStop; if (TraceComponent.isAnyTracingEnabled() && tc....
void function(boolean hasToStop) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, STR, hasToStop); this.HasToStop = hasToStop; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, STR, hasToStop); }
/** * Gives signal to deleteMsgsWithNoReferences() to gracefully exit. This happens in two cases * (i) When ME is stopped and (ii) When the destination is deleted * * @param hasToStop */
Gives signal to deleteMsgsWithNoReferences() to gracefully exit. This happens in two cases (i) When ME is stopped and (ii) When the destination is deleted
stopDeletingMsgsWihoutReferencesTask
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/store/itemstreams/PubSubMessageItemStream.java", "license": "epl-1.0", "size": 36725 }
[ "com.ibm.websphere.ras.TraceComponent", "com.ibm.ws.sib.utils.ras.SibTr" ]
import com.ibm.websphere.ras.TraceComponent; import com.ibm.ws.sib.utils.ras.SibTr;
import com.ibm.websphere.ras.*; import com.ibm.ws.sib.utils.ras.*;
[ "com.ibm.websphere", "com.ibm.ws" ]
com.ibm.websphere; com.ibm.ws;
251,192
public static ims.core.admin.pas.domain.objects.PendingTransfers extractPendingTransfers(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.PendingTransferForBedReadyDetailsVo valueObject) { return extractPendingTransfers(domainFactory, valueObject, new HashMap()); }
static ims.core.admin.pas.domain.objects.PendingTransfers function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.PendingTransferForBedReadyDetailsVo valueObject) { return extractPendingTransfers(domainFactory, valueObject, new HashMap()); }
/** * Create the domain object from the value object. * @param domainFactory - used to create existing (persistent) domain objects. * @param valueObject - extract the domain object fields from this. */
Create the domain object from the value object
extractPendingTransfers
{ "repo_name": "IMS-MAXIMS/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/PendingTransferForBedReadyDetailsVoAssembler.java", "license": "agpl-3.0", "size": 24960 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,067,502
@Test(expected=ATCommandException.class) public void testSetDestinationAddressDHErrorInvalidAnswer() throws XBeeException, IOException { // Throw an AT command exception when trying to set the DH parameter. Mockito.doThrow(new ATCommandException(null)).when(xbeeDevice).setParameter(Mockito.eq(PARAMETER_DH), Moc...
@Test(expected=ATCommandException.class) void function() throws XBeeException, IOException { Mockito.doThrow(new ATCommandException(null)).when(xbeeDevice).setParameter(Mockito.eq(PARAMETER_DH), Mockito.any(byte[].class)); xbeeDevice.setDestinationAddress(ADDRESS); }
/** * Test method for {@link com.digi.xbee.api.XBeeDevice#setDestinationAddress(XBee64BitAddress)}. * * <p>Verify that the destination address of an XBee device cannot be set if the answer when setting * the DH parameter is null or the response status is not OK. It is, there is an AT command exception * se...
Test method for <code>com.digi.xbee.api.XBeeDevice#setDestinationAddress(XBee64BitAddress)</code>. Verify that the destination address of an XBee device cannot be set if the answer when setting the DH parameter is null or the response status is not OK. It is, there is an AT command exception setting the DH parameter
testSetDestinationAddressDHErrorInvalidAnswer
{ "repo_name": "digidotcom/XBeeJavaLibrary", "path": "library/src/test/java/com/digi/xbee/api/SetDestinationAddressTest.java", "license": "mpl-2.0", "size": 10043 }
[ "com.digi.xbee.api.exceptions.ATCommandException", "com.digi.xbee.api.exceptions.XBeeException", "java.io.IOException", "org.junit.Test", "org.mockito.Mockito" ]
import com.digi.xbee.api.exceptions.ATCommandException; import com.digi.xbee.api.exceptions.XBeeException; import java.io.IOException; import org.junit.Test; import org.mockito.Mockito;
import com.digi.xbee.api.exceptions.*; import java.io.*; import org.junit.*; import org.mockito.*;
[ "com.digi.xbee", "java.io", "org.junit", "org.mockito" ]
com.digi.xbee; java.io; org.junit; org.mockito;
2,329,843
public void testImportJSONFromRequestParam() throws IOException, JsonException { final String testPath = TEST_BASE_PATH; Map<String, String> props = new HashMap<String, String>(); String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props); urlsToDelete.add(testNode); ...
void function() throws IOException, JsonException { final String testPath = TEST_BASE_PATH; Map<String, String> props = new HashMap<String, String>(); String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props); urlsToDelete.add(testNode); props.clear(); props.put(SlingPostConstants.RP_OPERATION, SlingPost...
/** * Test import operation for a posted json string */
Test import operation for a posted json string
testImportJSONFromRequestParam
{ "repo_name": "tmaret/sling", "path": "launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostServletImportTest.java", "license": "apache-2.0", "size": 38777 }
[ "java.io.IOException", "java.util.HashMap", "java.util.Map", "javax.json.JsonException", "javax.json.JsonObject", "org.apache.sling.launchpad.webapp.integrationtest.util.JsonUtil", "org.apache.sling.servlets.post.SlingPostConstants" ]
import java.io.IOException; import java.util.HashMap; import java.util.Map; import javax.json.JsonException; import javax.json.JsonObject; import org.apache.sling.launchpad.webapp.integrationtest.util.JsonUtil; import org.apache.sling.servlets.post.SlingPostConstants;
import java.io.*; import java.util.*; import javax.json.*; import org.apache.sling.launchpad.webapp.integrationtest.util.*; import org.apache.sling.servlets.post.*;
[ "java.io", "java.util", "javax.json", "org.apache.sling" ]
java.io; java.util; javax.json; org.apache.sling;
482,234
@Optional Property<Instant> creationDate();
Property<Instant> creationDate();
/** * Returns the Date/Time of when this state was created. * * @return the timestamp of when the state was created. */
Returns the Date/Time of when this state was created
creationDate
{ "repo_name": "Qi4j/qi4j-sdk", "path": "libraries/alarm/src/main/java/org/apache/polygene/library/alarm/AlarmStatus.java", "license": "apache-2.0", "size": 3144 }
[ "java.time.Instant", "org.apache.polygene.api.property.Property" ]
import java.time.Instant; import org.apache.polygene.api.property.Property;
import java.time.*; import org.apache.polygene.api.property.*;
[ "java.time", "org.apache.polygene" ]
java.time; org.apache.polygene;
866,845
protected Button getCancelButton() { return getButton(IDialogConstants.CANCEL_ID); }
Button function() { return getButton(IDialogConstants.CANCEL_ID); }
/** * Returns the button created when <code>createButton</code> is called * with an ID of <code>IDialogConstants.CANCEL_ID</code>. If * <code>createButton</code> was never called with this parameter, or if * <code>createButton</code> is overridden, <code>getCancelButton</code> * will return <code>null</code>....
Returns the button created when <code>createButton</code> is called with an ID of <code>IDialogConstants.CANCEL_ID</code>. If <code>createButton</code> was never called with this parameter, or if <code>createButton</code> is overridden, <code>getCancelButton</code> will return <code>null</code>
getCancelButton
{ "repo_name": "ghillairet/gef-gwt", "path": "src/main/java/org/eclipse/jface/dialogs/Dialog.java", "license": "epl-1.0", "size": 41103 }
[ "org.eclipse.swt.widgets.Button" ]
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,040,728
public Set<CordVtnNode> cordVtnNodes() { Set<CordVtnNode> nodes = Sets.newHashSet(); JsonNode sshNode = object.get(SSH); String ovsdbPort = getConfig(object, OVSDB_PORT); object.get(CORDVTN_NODES).forEach(vtnNode -> { CidrAddr localMgmtIp = CidrAddr.valueOf(get(LOCAL_MAN...
Set<CordVtnNode> function() { Set<CordVtnNode> nodes = Sets.newHashSet(); JsonNode sshNode = object.get(SSH); String ovsdbPort = getConfig(object, OVSDB_PORT); object.get(CORDVTN_NODES).forEach(vtnNode -> { CidrAddr localMgmtIp = CidrAddr.valueOf(get(LOCAL_MANAGEMENT_IP, "")); CidrAddr hostsMgmtIp = CidrAddr.valueOf(ge...
/** * Returns the set of nodes read from network config. * * @return set of CordVtnNodeConfig or empty set */
Returns the set of nodes read from network config
cordVtnNodes
{ "repo_name": "leejieyu/vtn2.0", "path": "src/main/java/org/opencord/cordvtn/api/CordVtnConfig.java", "license": "apache-2.0", "size": 12185 }
[ "com.fasterxml.jackson.databind.JsonNode", "com.google.common.base.Strings", "com.google.common.collect.Sets", "java.util.Set", "org.onlab.packet.TpPort", "org.onosproject.net.DeviceId", "org.opencord.cordvtn.api.net.CidrAddr", "org.opencord.cordvtn.api.node.CordVtnNode", "org.opencord.cordvtn.api.n...
import com.fasterxml.jackson.databind.JsonNode; import com.google.common.base.Strings; import com.google.common.collect.Sets; import java.util.Set; import org.onlab.packet.TpPort; import org.onosproject.net.DeviceId; import org.opencord.cordvtn.api.net.CidrAddr; import org.opencord.cordvtn.api.node.CordVtnNode; import ...
import com.fasterxml.jackson.databind.*; import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; import org.onlab.packet.*; import org.onosproject.net.*; import org.opencord.cordvtn.api.net.*; import org.opencord.cordvtn.api.node.*; import org.opencord.cordvtn.impl.*;
[ "com.fasterxml.jackson", "com.google.common", "java.util", "org.onlab.packet", "org.onosproject.net", "org.opencord.cordvtn" ]
com.fasterxml.jackson; com.google.common; java.util; org.onlab.packet; org.onosproject.net; org.opencord.cordvtn;
583,542
public void finish() { try { if (!out.toString().isEmpty()) { response.setContentType(CONTENT_RETURN_TYPE_JSON_TEXT); response.setCharacterEncoding("UTF-8"); response.getWriter().print(out.toString()); response.flushBuffer(); if(GlobalConfig.DEBUG) showResponse(out.toString()); } el...
void function() { try { if (!out.toString().isEmpty()) { response.setContentType(CONTENT_RETURN_TYPE_JSON_TEXT); response.setCharacterEncoding("UTF-8"); response.getWriter().print(out.toString()); response.flushBuffer(); if(GlobalConfig.DEBUG) showResponse(out.toString()); } else getOutputStream().flush(); } catch (IOE...
/** * finishes the request */
finishes the request
finish
{ "repo_name": "jkonert/socom", "path": "SocomAPI/src/de/tud/kom/socom/util/SocomRequest.java", "license": "lgpl-3.0", "size": 10879 }
[ "de.tud.kom.socom.GlobalConfig", "java.io.IOException" ]
import de.tud.kom.socom.GlobalConfig; import java.io.IOException;
import de.tud.kom.socom.*; import java.io.*;
[ "de.tud.kom", "java.io" ]
de.tud.kom; java.io;
1,592,991
private int readArgumentIndex(String pattern, ParsePosition pos) { int start = pos.getIndex(); seekNonWs(pattern, pos); StringBuffer result = new StringBuffer(); boolean error = false; for (; !error && pos.getIndex() < pattern.length(); next(pos)) { c...
int function(String pattern, ParsePosition pos) { int start = pos.getIndex(); seekNonWs(pattern, pos); StringBuffer result = new StringBuffer(); boolean error = false; for (; !error && pos.getIndex() < pattern.length(); next(pos)) { char c = pattern.charAt(pos.getIndex()); if (Character.isWhitespace(c)) { seekNonWs(pat...
/** * Read the argument index from the current format element * * @param pattern * pattern to parse * @param pos * current parse position * @return argument index */
Read the argument index from the current format element
readArgumentIndex
{ "repo_name": "mfornos/humanize", "path": "humanize-slim/src/main/java/humanize/text/ExtendedMessageFormat.java", "license": "apache-2.0", "size": 19301 }
[ "java.text.ParsePosition" ]
import java.text.ParsePosition;
import java.text.*;
[ "java.text" ]
java.text;
1,495,916
TextSpanLayout createTextLayout(AttributedCharacterIterator aci, int [] charMap, Point2D offset, FontRenderContext frc);
TextSpanLayout createTextLayout(AttributedCharacterIterator aci, int [] charMap, Point2D offset, FontRenderContext frc);
/** * Returns an instance of TextSpanLayout suitable for rendering the * AttributedCharacterIterator. * @param aci the character iterator to be laid out * @param charMap Indicates how chars in aci map to original * text char array. * @param offset The offset position for the...
Returns an instance of TextSpanLayout suitable for rendering the AttributedCharacterIterator
createTextLayout
{ "repo_name": "shyamalschandra/flex-sdk", "path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/gvt/text/TextLayoutFactory.java", "license": "apache-2.0", "size": 2001 }
[ "java.awt.font.FontRenderContext", "java.awt.geom.Point2D", "java.text.AttributedCharacterIterator" ]
import java.awt.font.FontRenderContext; import java.awt.geom.Point2D; import java.text.AttributedCharacterIterator;
import java.awt.font.*; import java.awt.geom.*; import java.text.*;
[ "java.awt", "java.text" ]
java.awt; java.text;
737,543
processor = new UniqueHashCode(); processorChain = new UniqueHashCode(new IdentityTransform()); }
processor = new UniqueHashCode(); processorChain = new UniqueHashCode(new IdentityTransform()); }
/** * Sets up the processors for the test using all constructor combinations. */
Sets up the processors for the test using all constructor combinations
setUp
{ "repo_name": "jamesbassett/super-csv", "path": "super-csv/src/test/java/org/supercsv/cellprocessor/constraint/UniqueHashCodeTest.java", "license": "apache-2.0", "size": 3977 }
[ "org.supercsv.mock.IdentityTransform" ]
import org.supercsv.mock.IdentityTransform;
import org.supercsv.mock.*;
[ "org.supercsv.mock" ]
org.supercsv.mock;
2,348,866
@Test public void testGetReplyToGroupIdIsNullForNewMessage() { AmqpJmsMessageFacade amqpMessageFacade = createNewMessageFacade(); assertNull("expected ReplyToGroupId to be null on new message", amqpMessageFacade.getReplyToGroupId()); }
void function() { AmqpJmsMessageFacade amqpMessageFacade = createNewMessageFacade(); assertNull(STR, amqpMessageFacade.getReplyToGroupId()); }
/** * Check that setting the ReplyToGroupId works on new messages without a properties * properties section. New messages lack the properties section, * as tested by {@link #testNewMessageHasNoUnderlyingPropertiesSection()}. */
Check that setting the ReplyToGroupId works on new messages without a properties properties section. New messages lack the properties section, as tested by <code>#testNewMessageHasNoUnderlyingPropertiesSection()</code>
testGetReplyToGroupIdIsNullForNewMessage
{ "repo_name": "avranju/qpid-jms", "path": "qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageFacadeTest.java", "license": "apache-2.0", "size": 79428 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,384,878
@Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(FSM.class)) { case OCCIPackage.FSM__OWNED_STATE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; case OCCIPackage.F...
void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(FSM.class)) { case OCCIPackage.FSM__OWNED_STATE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; case OCCIPackage.FSM__ATTRIBUTE: fireNotifyChanged(new Vie...
/** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */
This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>.
notifyChanged
{ "repo_name": "occiware/OCCI-Studio", "path": "plugins/org.eclipse.cmf.occi.core.edit/src-gen/org/eclipse/cmf/occi/core/provider/FSMItemProvider.java", "license": "epl-1.0", "size": 10191 }
[ "org.eclipse.cmf.occi.core.OCCIPackage", "org.eclipse.emf.common.notify.Notification", "org.eclipse.emf.edit.provider.ViewerNotification" ]
import org.eclipse.cmf.occi.core.OCCIPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification;
import org.eclipse.cmf.occi.core.*; import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.cmf", "org.eclipse.emf" ]
org.eclipse.cmf; org.eclipse.emf;
748,662
Provider<CppCompile> getCompileTask();
Provider<CppCompile> getCompileTask();
/** * Returns the compile task for this binary. * * @since 4.5 */
Returns the compile task for this binary
getCompileTask
{ "repo_name": "lsmaira/gradle", "path": "subprojects/language-native/src/main/java/org/gradle/language/cpp/CppBinary.java", "license": "apache-2.0", "size": 2912 }
[ "org.gradle.api.provider.Provider", "org.gradle.language.cpp.tasks.CppCompile" ]
import org.gradle.api.provider.Provider; import org.gradle.language.cpp.tasks.CppCompile;
import org.gradle.api.provider.*; import org.gradle.language.cpp.tasks.*;
[ "org.gradle.api", "org.gradle.language" ]
org.gradle.api; org.gradle.language;
343,441
public String getServiceAlias(GVBuffer gvBuffer) { return gvBuffer.getService(); }
String function(GVBuffer gvBuffer) { return gvBuffer.getService(); }
/** * Return the alias for the given service * * @param gvBuffer * the input service data * @return the configured alias */
Return the alias for the given service
getServiceAlias
{ "repo_name": "green-vulcano/gv-engine", "path": "gvengine/gvvcl-internal/src/main/java/it/greenvulcano/gvesb/virtual/internal/xml/XMLValidationCallOperation.java", "license": "lgpl-3.0", "size": 10001 }
[ "it.greenvulcano.gvesb.buffer.GVBuffer" ]
import it.greenvulcano.gvesb.buffer.GVBuffer;
import it.greenvulcano.gvesb.buffer.*;
[ "it.greenvulcano.gvesb" ]
it.greenvulcano.gvesb;
28,516
EList<BusinessClassPropertyReference> getPropertyReferences();
EList<BusinessClassPropertyReference> getPropertyReferences();
/** * Returns the value of the '<em><b>Property References</b></em>' containment reference list. * The list contents are of type {@link org.mendix.dsl.datacontract.mm.DataContractDsl.BusinessClassPropertyReference}. * It is bidirectional and its opposite is '{@link org.mendix.dsl.datacontract.mm.DataC...
Returns the value of the 'Property References' containment reference list. The list contents are of type <code>org.mendix.dsl.datacontract.mm.DataContractDsl.BusinessClassPropertyReference</code>. It is bidirectional and its opposite is '<code>org.mendix.dsl.datacontract.mm.DataContractDsl.BusinessClassPropertyReferenc...
getPropertyReferences
{ "repo_name": "mendix/Mendix-Core", "path": "ServiceDsl/org.mod4j.dsl.service.mm/oaw/org/mod4j/org.mod4j.dsl.datacontract.mm/src/org/mod4j/dsl/datacontract/mm/DataContractDsl/BusinessClassDto.java", "license": "epl-1.0", "size": 6311 }
[ "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;
1,449,369
public float getPersistenceSnapshotWeight() throws NoSuchObjectException, RemoteException { readyState.check(); concurrentObj.readLock(); try { return snapshotWt; } finally { concurrentObj.readUnlock(); } }//end getPer...
float function() throws NoSuchObjectException, RemoteException { readyState.check(); concurrentObj.readLock(); try { return snapshotWt; } finally { concurrentObj.readUnlock(); } }
/** * Retrieve the weight factor applied by the lookup discovery service * to the snapshot size during the test to determine whether or not to * take a "snapshot" of the system state. * * @return float value corresponding to the weight factor for snapshot * size * * @th...
Retrieve the weight factor applied by the lookup discovery service to the snapshot size during the test to determine whether or not to take a "snapshot" of the system state
getPersistenceSnapshotWeight
{ "repo_name": "apache/river", "path": "src/com/sun/jini/fiddler/FiddlerImpl.java", "license": "apache-2.0", "size": 419910 }
[ "java.rmi.NoSuchObjectException", "java.rmi.RemoteException" ]
import java.rmi.NoSuchObjectException; import java.rmi.RemoteException;
import java.rmi.*;
[ "java.rmi" ]
java.rmi;
2,415,277
List<HTMLDOMElement> getChildrenElements();
List<HTMLDOMElement> getChildrenElements();
/** * Returns the elements children of this element. * @return The elements children of this element. */
Returns the elements children of this element
getChildrenElements
{ "repo_name": "carlsonsantana/HaTeMiLe-for-Java", "path": "src/main/java/org/hatemile/util/html/HTMLDOMElement.java", "license": "apache-2.0", "size": 4161 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,564,162
default QueueEndpointConsumerBuilder timeout(Duration timeout) { doSetProperty("timeout", timeout); return this; }
default QueueEndpointConsumerBuilder timeout(Duration timeout) { doSetProperty(STR, timeout); return this; }
/** * An optional timeout applied to the operation. If a response is not * returned before the timeout concludes a RuntimeException will be * thrown. * * The option is a: <code>java.time.Duration</code> type. * * Group: queue */
An optional timeout applied to the operation. If a response is not returned before the timeout concludes a RuntimeException will be thrown. The option is a: <code>java.time.Duration</code> type. Group: queue
timeout
{ "repo_name": "adessaigne/camel", "path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/QueueEndpointBuilderFactory.java", "license": "apache-2.0", "size": 52911 }
[ "java.time.Duration" ]
import java.time.Duration;
import java.time.*;
[ "java.time" ]
java.time;
1,685,847
private static boolean fileIsInFilesDir(Context context, Uri uri) { try { final String haystack = context.getFilesDir().getParentFile().getCanonicalPath(); final String needle = new File(uri.getPath()).getCanonicalPath(); return needle.startsWith(haystack); } catch (IOException e) { return false; }...
static boolean function(Context context, Uri uri) { try { final String haystack = context.getFilesDir().getParentFile().getCanonicalPath(); final String needle = new File(uri.getPath()).getCanonicalPath(); return needle.startsWith(haystack); } catch (IOException e) { return false; } }
/** * This is more than hacky but probably way better than doing nothing * Further 'optimizations' might contain to get the parents of CacheDir and NoBackupDir * and check against those as well */
This is more than hacky but probably way better than doing nothing Further 'optimizations' might contain to get the parents of CacheDir and NoBackupDir and check against those as well
fileIsInFilesDir
{ "repo_name": "hlad/Conversations", "path": "src/main/java/eu/siacs/conversations/persistance/FileBackend.java", "license": "gpl-3.0", "size": 34706 }
[ "android.content.Context", "android.net.Uri", "java.io.File", "java.io.IOException" ]
import android.content.Context; import android.net.Uri; import java.io.File; import java.io.IOException;
import android.content.*; import android.net.*; import java.io.*;
[ "android.content", "android.net", "java.io" ]
android.content; android.net; java.io;
64,785
interface WithApplicationRuleCollections { WithCreate withApplicationRuleCollections(List<AzureFirewallApplicationRuleCollection> applicationRuleCollections); }
interface WithApplicationRuleCollections { WithCreate withApplicationRuleCollections(List<AzureFirewallApplicationRuleCollection> applicationRuleCollections); }
/** * Specifies applicationRuleCollections. * @param applicationRuleCollections Collection of application rule collections used by Azure Firewall * @return the next definition stage */
Specifies applicationRuleCollections
withApplicationRuleCollections
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/network/v2020_04_01/AzureFirewall.java", "license": "mit", "size": 15544 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,072,009
AggregatePublisher<Document> aggregate(List<? extends Bson> pipeline);
AggregatePublisher<Document> aggregate(List<? extends Bson> pipeline);
/** * Runs an aggregation framework pipeline on the database for pipeline stages * that do not require an underlying collection, such as {@code $currentOp} and {@code $listLocalSessions}. * * @param pipeline the aggregation pipeline * @return an iterable containing the result of the aggregation...
Runs an aggregation framework pipeline on the database for pipeline stages that do not require an underlying collection, such as $currentOp and $listLocalSessions
aggregate
{ "repo_name": "rozza/mongo-java-driver-reactivestreams", "path": "driver/src/main/com/mongodb/reactivestreams/client/MongoDatabase.java", "license": "apache-2.0", "size": 22823 }
[ "java.util.List", "org.bson.Document", "org.bson.conversions.Bson" ]
import java.util.List; import org.bson.Document; import org.bson.conversions.Bson;
import java.util.*; import org.bson.*; import org.bson.conversions.*;
[ "java.util", "org.bson", "org.bson.conversions" ]
java.util; org.bson; org.bson.conversions;
2,553,933
@Nonnull public static FileIOError createDirRecursive (@Nonnull final File aDir) { ValueEnforcer.notNull (aDir, "Directory"); // Does the directory already exist? if (aDir.exists ()) return EFileIOErrorCode.TARGET_ALREADY_EXISTS.getAsIOError (EFileIOOperation.CREATE_DIR_RECURSIVE, aDir); /...
static FileIOError function (@Nonnull final File aDir) { ValueEnforcer.notNull (aDir, STR); if (aDir.exists ()) return EFileIOErrorCode.TARGET_ALREADY_EXISTS.getAsIOError (EFileIOOperation.CREATE_DIR_RECURSIVE, aDir); final File aParentDir = aDir.getParentFile (); if (aParentDir != null && aParentDir.exists () && !aPar...
/** * Create a new directory. The parent directories are created if they are * missing. * * @param aDir * The directory to be created. May not be <code>null</code>. * @return A non-<code>null</code> error code. */
Create a new directory. The parent directories are created if they are missing
createDirRecursive
{ "repo_name": "phax/ph-commons", "path": "ph-commons/src/main/java/com/helger/commons/io/file/FileOperations.java", "license": "apache-2.0", "size": 26579 }
[ "com.helger.commons.ValueEnforcer", "java.io.File", "javax.annotation.Nonnull" ]
import com.helger.commons.ValueEnforcer; import java.io.File; import javax.annotation.Nonnull;
import com.helger.commons.*; import java.io.*; import javax.annotation.*;
[ "com.helger.commons", "java.io", "javax.annotation" ]
com.helger.commons; java.io; javax.annotation;
528,390
@Test public void articleSanitizerImageDilbertTest() throws Exception { // Load a feed InputStream is = getClass().getResourceAsStream("/feed/feed_rss2_dilbert.xml"); RssReader reader = new RssReader(); reader.readRssFeed(is); Feed feed = reader.getFeed(); Assert....
void function() throws Exception { InputStream is = getClass().getResourceAsStream(STR); RssReader reader = new RssReader(); reader.readRssFeed(is); Feed feed = reader.getFeed(); Assert.assertEquals(STR\"http: }
/** * Tests the article sanitizer. * * @throws Exception */
Tests the article sanitizer
articleSanitizerImageDilbertTest
{ "repo_name": "Feitianyuan/reader", "path": "reader-core/src/test/java/com/sismics/util/TestArticleSanitizer.java", "license": "gpl-2.0", "size": 17543 }
[ "com.sismics.reader.core.dao.file.rss.RssReader", "com.sismics.reader.core.model.jpa.Feed", "java.io.InputStream", "junit.framework.Assert" ]
import com.sismics.reader.core.dao.file.rss.RssReader; import com.sismics.reader.core.model.jpa.Feed; import java.io.InputStream; import junit.framework.Assert;
import com.sismics.reader.core.dao.file.rss.*; import com.sismics.reader.core.model.jpa.*; import java.io.*; import junit.framework.*;
[ "com.sismics.reader", "java.io", "junit.framework" ]
com.sismics.reader; java.io; junit.framework;
534,028
public Iterable<MediaMetadataCompat> searchMusicBySongTitle(String query) { return searchMusic(MediaMetadataCompat.METADATA_KEY_TITLE, query); }
Iterable<MediaMetadataCompat> function(String query) { return searchMusic(MediaMetadataCompat.METADATA_KEY_TITLE, query); }
/** * Very basic implementation of a search that filter music tracks with title containing * the given query. * */
Very basic implementation of a search that filter music tracks with title containing the given query
searchMusicBySongTitle
{ "repo_name": "circuitStatic/UniversalMusicPlayer", "path": "mobile/src/main/java/com/example/android/uamp/model/MusicProvider.java", "license": "apache-2.0", "size": 13174 }
[ "android.support.v4.media.MediaMetadataCompat" ]
import android.support.v4.media.MediaMetadataCompat;
import android.support.v4.media.*;
[ "android.support" ]
android.support;
1,318,732
public interface MBaseDevice extends EObject { Logger getLogger();
interface MBaseDevice extends EObject { Logger function();
/** * Returns the value of the '<em><b>Logger</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Logger</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * * @return the value of...
Returns the value of the 'Logger' attribute. If the meaning of the 'Logger' attribute isn't clear, there really should be more of a description here...
getLogger
{ "repo_name": "jowiho/openhab", "path": "bundles/binding/org.openhab.binding.tinkerforge/src/main/java/org/openhab/binding/tinkerforge/internal/model/MBaseDevice.java", "license": "epl-1.0", "size": 5794 }
[ "org.eclipse.emf.ecore.EObject", "org.slf4j.Logger" ]
import org.eclipse.emf.ecore.EObject; import org.slf4j.Logger;
import org.eclipse.emf.ecore.*; import org.slf4j.*;
[ "org.eclipse.emf", "org.slf4j" ]
org.eclipse.emf; org.slf4j;
1,036,728
public void setDocumentLocator (Locator locator) { // no op }
void function (Locator locator) { }
/** * Receive a Locator object for document events. * * <p>By default, do nothing. Application writers may override this * method in a subclass if they wish to store the locator for use * with other document events.</p> * * @param locator A locator for all SAX document events. *...
Receive a Locator object for document events. By default, do nothing. Application writers may override this method in a subclass if they wish to store the locator for use with other document events
setDocumentLocator
{ "repo_name": "svn2github/xerces-xml-commons", "path": "java/external/src/org/xml/sax/helpers/DefaultHandler.java", "license": "apache-2.0", "size": 16267 }
[ "org.xml.sax.Locator" ]
import org.xml.sax.Locator;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
1,913,198
Collection<RouteUnit> routeUnits = routeContext.getRouteUnits(); Collection<RouteUnit> toBeRemoved = new LinkedList<>(); Collection<RouteUnit> toBeAdded = new LinkedList<>(); for (RouteUnit each : routeUnits) { String logicName = each.getDataSourceMapper().getLogicName(); ...
Collection<RouteUnit> routeUnits = routeContext.getRouteUnits(); Collection<RouteUnit> toBeRemoved = new LinkedList<>(); Collection<RouteUnit> toBeAdded = new LinkedList<>(); for (RouteUnit each : routeUnits) { String logicName = each.getDataSourceMapper().getLogicName(); String shadowLogicName = each.getDataSourceMapp...
/** * Shadow route decorate. * * @param routeContext route context * @param shadowRule shadow rule * @param shadowDataSourceMappings shadow data source mappings */
Shadow route decorate
shadowRouteDecorate
{ "repo_name": "apache/incubator-shardingsphere", "path": "shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-core/src/main/java/org/apache/shardingsphere/shadow/route/engine/ShadowRouteEngine.java", "license": "apache-2.0", "size": 3003 }
[ "java.util.Collection", "java.util.LinkedList", "java.util.Optional", "org.apache.shardingsphere.infra.route.context.RouteMapper", "org.apache.shardingsphere.infra.route.context.RouteUnit" ]
import java.util.Collection; import java.util.LinkedList; import java.util.Optional; import org.apache.shardingsphere.infra.route.context.RouteMapper; import org.apache.shardingsphere.infra.route.context.RouteUnit;
import java.util.*; import org.apache.shardingsphere.infra.route.context.*;
[ "java.util", "org.apache.shardingsphere" ]
java.util; org.apache.shardingsphere;
303,053
void handleDOMCharacterDataModified(MutationEvent evt);
void handleDOMCharacterDataModified(MutationEvent evt);
/** * Invoked when an MutationEvent of type 'DOMCharacterDataModified' * is fired. */
Invoked when an MutationEvent of type 'DOMCharacterDataModified' is fired
handleDOMCharacterDataModified
{ "repo_name": "apache/batik", "path": "batik-bridge/src/main/java/org/apache/batik/bridge/BridgeUpdateHandler.java", "license": "apache-2.0", "size": 2401 }
[ "org.w3c.dom.events.MutationEvent" ]
import org.w3c.dom.events.MutationEvent;
import org.w3c.dom.events.*;
[ "org.w3c.dom" ]
org.w3c.dom;
460,141
public int doFinal( byte[] out, int outOff) throws DataLengthException, IllegalStateException, InvalidCipherTextException { if (bufOff + outOff > out.length) { throw new DataLengthException("output buffer to small in doFinal"); } int ...
int function( byte[] out, int outOff) throws DataLengthException, IllegalStateException, InvalidCipherTextException { if (bufOff + outOff > out.length) { throw new DataLengthException(STR); } int blockSize = cipher.getBlockSize(); int len = bufOff - blockSize; byte[] block = new byte[blockSize]; if (forEncryption) { if...
/** * Process the last block in the buffer. * * @param out the array the block currently being held is copied into. * @param outOff the offset at which the copying starts. * @return the number of output bytes copied to out. * @exception DataLengthException if there is insufficient space in...
Process the last block in the buffer
doFinal
{ "repo_name": "mileschet/ripple-lib-java", "path": "ripple-bouncycastle/src/main/java/org/ripple/bouncycastle/crypto/modes/CTSBlockCipher.java", "license": "isc", "size": 8619 }
[ "org.ripple.bouncycastle.crypto.BlockCipher", "org.ripple.bouncycastle.crypto.DataLengthException", "org.ripple.bouncycastle.crypto.InvalidCipherTextException" ]
import org.ripple.bouncycastle.crypto.BlockCipher; import org.ripple.bouncycastle.crypto.DataLengthException; import org.ripple.bouncycastle.crypto.InvalidCipherTextException;
import org.ripple.bouncycastle.crypto.*;
[ "org.ripple.bouncycastle" ]
org.ripple.bouncycastle;
1,415,703
private void detectActivePointers(MotionEvent event) { for (int i = 0, count = event.getPointerCount(); i < count; i++) { final int pointerId = event.getPointerId(i); if (mHasMovingActivePointer) { // If already active => nothing to do. ...
void function(MotionEvent event) { for (int i = 0, count = event.getPointerCount(); i < count; i++) { final int pointerId = event.getPointerId(i); if (mHasMovingActivePointer) { if (isActivePointer(pointerId)) { continue; } } final float pointerDeltaMove = computePointerDeltaMove(i, event); if (pointerDeltaMove > mThre...
/** * Detects the active pointers in an event. * * @param event The event to examine. */
Detects the active pointers in an event
detectActivePointers
{ "repo_name": "rex-xxx/mt6572_x201", "path": "frameworks/base/services/java/com/android/server/accessibility/TouchExplorer.java", "license": "gpl-2.0", "size": 93961 }
[ "android.view.MotionEvent" ]
import android.view.MotionEvent;
import android.view.*;
[ "android.view" ]
android.view;
691,295
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<DdosCustomPolicyInner> getByResourceGroupAsync(String resourceGroupName, String ddosCustomPolicyName) { return getByResourceGroupWithResponseAsync(resourceGroupName, ddosCustomPolicyName) .flatMap( (Response<DdosCustomPo...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<DdosCustomPolicyInner> function(String resourceGroupName, String ddosCustomPolicyName) { return getByResourceGroupWithResponseAsync(resourceGroupName, ddosCustomPolicyName) .flatMap( (Response<DdosCustomPolicyInner> res) -> { if (res.getValue() != null) { return Mono.jus...
/** * Gets information about the specified DDoS custom policy. * * @param resourceGroupName The name of the resource group. * @param ddosCustomPolicyName The name of the DDoS custom policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementExc...
Gets information about the specified DDoS custom policy
getByResourceGroupAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/DdosCustomPoliciesClientImpl.java", "license": "mit", "size": 48849 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.resourcemanager.network.fluent.models.DdosCustomPolicyInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.network.fluent.models.DdosCustomPolicyInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
393,157
public void deleteCurrentElement() { SystemElement selected = this.elementsTable.getSelectionModel().getSelectedItem(); this.elements.remove(selected); try { IDataSource ds = DataSourceFactory.getInstance().getDefaultDataSource(); if (selected.getClass().equals(Catchm...
void function() { SystemElement selected = this.elementsTable.getSelectionModel().getSelectedItem(); this.elements.remove(selected); try { IDataSource ds = DataSourceFactory.getInstance().getDefaultDataSource(); if (selected.getClass().equals(Catchment.class)) { ds.removeCatchment((Catchment) selected); } else if (sele...
/** * Delete an element */
Delete an element
deleteCurrentElement
{ "repo_name": "Ongawa/cloracion", "path": "src/main/java/org/ongawa/peru/chlorination/gui/desinfect/SystemDetails.java", "license": "apache-2.0", "size": 33663 }
[ "org.ongawa.peru.chlorination.logic.SystemElement", "org.ongawa.peru.chlorination.logic.elements.Catchment", "org.ongawa.peru.chlorination.logic.elements.ConductionPipe", "org.ongawa.peru.chlorination.logic.elements.CubicReservoir", "org.ongawa.peru.chlorination.logic.elements.DistributionPipe", "org.onga...
import org.ongawa.peru.chlorination.logic.SystemElement; import org.ongawa.peru.chlorination.logic.elements.Catchment; import org.ongawa.peru.chlorination.logic.elements.ConductionPipe; import org.ongawa.peru.chlorination.logic.elements.CubicReservoir; import org.ongawa.peru.chlorination.logic.elements.DistributionPipe...
import org.ongawa.peru.chlorination.logic.*; import org.ongawa.peru.chlorination.logic.elements.*; import org.ongawa.peru.chlorination.persistence.*;
[ "org.ongawa.peru" ]
org.ongawa.peru;
776,545
void processRegionsInTransition( final RegionTransition rt, final HRegionInfo regionInfo, final int expectedVersion) throws KeeperException { EventType et = rt.getEventType(); // Get ServerName. Could not be null. final ServerName sn = rt.getServerName(); final String encodedRegionName = ...
void processRegionsInTransition( final RegionTransition rt, final HRegionInfo regionInfo, final int expectedVersion) throws KeeperException { EventType et = rt.getEventType(); final ServerName sn = rt.getServerName(); final String encodedRegionName = regionInfo.getEncodedName(); LOG.info(STR + regionInfo.getRegionNameA...
/** * This call is invoked only (1) master assign meta; * (2) during failover mode startup, zk assignment node processing. * The locker is set in the caller. * * It should be private but it is used by some test too. */
This call is invoked only (1) master assign meta; (2) during failover mode startup, zk assignment node processing. The locker is set in the caller. It should be private but it is used by some test too
processRegionsInTransition
{ "repo_name": "francisliu/hbase_namespace", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java", "license": "apache-2.0", "size": 127265 }
[ "org.apache.hadoop.hbase.HRegionInfo", "org.apache.hadoop.hbase.RegionTransition", "org.apache.hadoop.hbase.ServerName", "org.apache.hadoop.hbase.executor.EventType", "org.apache.zookeeper.KeeperException" ]
import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.RegionTransition; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.executor.EventType; import org.apache.zookeeper.KeeperException;
import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.executor.*; import org.apache.zookeeper.*;
[ "org.apache.hadoop", "org.apache.zookeeper" ]
org.apache.hadoop; org.apache.zookeeper;
421,857
public RowMajorMatrixIterator nonZeroRowMajorIterator() { return new RowMajorMatrixIterator(rows, columns) { private long limit = (long) rows * columns; private int i = -1;
RowMajorMatrixIterator function() { return new RowMajorMatrixIterator(rows, columns) { private long limit = (long) rows * columns; private int i = -1;
/** * Returns a non-zero row-major matrix iterator. * * @return a non-zero row-major matrix iterator. */
Returns a non-zero row-major matrix iterator
nonZeroRowMajorIterator
{ "repo_name": "rabbanyk/CommunityEvaluation", "path": "libs/la4j-0.5.0/src/main/java/org/la4j/matrix/sparse/SparseMatrix.java", "license": "mit", "size": 17360 }
[ "org.la4j.iterator.RowMajorMatrixIterator" ]
import org.la4j.iterator.RowMajorMatrixIterator;
import org.la4j.iterator.*;
[ "org.la4j.iterator" ]
org.la4j.iterator;
2,707,695
public byte[] getDEREncoded() { try { return this.getEncoded(DER); } catch (IOException e) { return null; } }
byte[] function() { try { return this.getEncoded(DER); } catch (IOException e) { return null; } }
/** * Return the DER encoding of the object, null if the DER encoding can not be made. * * @return a DER byte array, null otherwise. */
Return the DER encoding of the object, null if the DER encoding can not be made
getDEREncoded
{ "repo_name": "bullda/DroidText", "path": "src/bouncycastle/repack/org/bouncycastle/asn1/ASN1Encodable.java", "license": "lgpl-3.0", "size": 2419 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,068,031
ExecutionResponse executeProcessCron(final String processName, final String cronExpression, final XMLGregorianCalendar start, final XMLGregorianCalendar end, final ProcessContextWrapper context) throws RepositoryException, PasswordInputCanceledException;
ExecutionResponse executeProcessCron(final String processName, final String cronExpression, final XMLGregorianCalendar start, final XMLGregorianCalendar end, final ProcessContextWrapper context) throws RepositoryException, PasswordInputCanceledException;
/** * Executes a process with an provided offset. Works with all process service versions. * * @throws RepositoryException * on fail * @throws PasswordInputCanceledException * if the user canceled the login dialog */
Executes a process with an provided offset. Works with all process service versions
executeProcessCron
{ "repo_name": "brtonnies/rapidminer-studio", "path": "src/main/java/com/rapidminer/repository/internal/remote/RemoteScheduler.java", "license": "agpl-3.0", "size": 6089 }
[ "com.rapid_i.repository.wsimport.ExecutionResponse", "com.rapid_i.repository.wsimport.ProcessContextWrapper", "com.rapidminer.repository.RepositoryException", "com.rapidminer.tools.PasswordInputCanceledException", "javax.xml.datatype.XMLGregorianCalendar" ]
import com.rapid_i.repository.wsimport.ExecutionResponse; import com.rapid_i.repository.wsimport.ProcessContextWrapper; import com.rapidminer.repository.RepositoryException; import com.rapidminer.tools.PasswordInputCanceledException; import javax.xml.datatype.XMLGregorianCalendar;
import com.rapid_i.repository.wsimport.*; import com.rapidminer.repository.*; import com.rapidminer.tools.*; import javax.xml.datatype.*;
[ "com.rapid_i.repository", "com.rapidminer.repository", "com.rapidminer.tools", "javax.xml" ]
com.rapid_i.repository; com.rapidminer.repository; com.rapidminer.tools; javax.xml;
653,109
public User createAdmin(String username, String password, String email) { return create(username, password, email, Arrays.asList(new Role(StaticGroup.admin))); }
User function(String username, String password, String email) { return create(username, password, email, Arrays.asList(new Role(StaticGroup.admin))); }
/** * Create a new admin user setting the minimum required parameters * * @param username * @param password * @param email * @return */
Create a new admin user setting the minimum required parameters
createAdmin
{ "repo_name": "raptorbox/raptor", "path": "raptor-sdk/src/main/java/org/createnet/raptor/sdk/admin/UserClient.java", "license": "apache-2.0", "size": 10253 }
[ "java.util.Arrays", "org.createnet.raptor.models.auth.Role", "org.createnet.raptor.models.auth.StaticGroup", "org.createnet.raptor.models.auth.User" ]
import java.util.Arrays; import org.createnet.raptor.models.auth.Role; import org.createnet.raptor.models.auth.StaticGroup; import org.createnet.raptor.models.auth.User;
import java.util.*; import org.createnet.raptor.models.auth.*;
[ "java.util", "org.createnet.raptor" ]
java.util; org.createnet.raptor;
1,969,597
public IDataset getDescription();
IDataset function();
/** * name/manufacturer/model/etc. information * * @return the value. */
name/manufacturer/model/etc. information
getDescription
{ "repo_name": "Anthchirp/dawnsci", "path": "org.eclipse.dawnsci.nexus/src/org/eclipse/dawnsci/nexus/NXdetector.java", "license": "epl-1.0", "size": 22203 }
[ "org.eclipse.dawnsci.analysis.api.dataset.IDataset" ]
import org.eclipse.dawnsci.analysis.api.dataset.IDataset;
import org.eclipse.dawnsci.analysis.api.dataset.*;
[ "org.eclipse.dawnsci" ]
org.eclipse.dawnsci;
2,242,585
@NonNull public static ListPhrase from(@NonNull CharSequence twoElementSeparator, CharSequence nonFinalElementSeparator, CharSequence finalElementSeparator) { return new ListPhrase(twoElementSeparator, nonFinalElementSeparator, finalElementSeparator); }
@NonNull static ListPhrase function(@NonNull CharSequence twoElementSeparator, CharSequence nonFinalElementSeparator, CharSequence finalElementSeparator) { return new ListPhrase(twoElementSeparator, nonFinalElementSeparator, finalElementSeparator); }
/** * Entry point into this API. * * @param twoElementSeparator separator for 2-element lists * @param nonFinalElementSeparator separator for non-final elements of lists with 3 or more * elements * @param finalElementSeparator separator for final elements in lists with 3 or more elements ...
Entry point into this API
from
{ "repo_name": "yzbzz/beautifullife", "path": "icore/src/main/java/com/ddu/icore/util/ListPhrase.java", "license": "apache-2.0", "size": 7579 }
[ "androidx.annotation.NonNull" ]
import androidx.annotation.NonNull;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
1,094,856
@Test public void getVariableIncludedInLineWithNoVariableInLineTest() { ConfigurationTemplateWriter configurationTemplateWriter = new ConfigurationTemplateWriter(); String inputLine = "hello world"; assertEquals("", configurationTemplateWriter.getVariableIncludedInLine(inputLine)); }
void function() { ConfigurationTemplateWriter configurationTemplateWriter = new ConfigurationTemplateWriter(); String inputLine = STR; assertEquals("", configurationTemplateWriter.getVariableIncludedInLine(inputLine)); }
/** * test return of an empty-string from a line without any variable included. */
test return of an empty-string from a line without any variable included
getVariableIncludedInLineWithNoVariableInLineTest
{ "repo_name": "franzbecker/test-editor", "path": "core/org.testeditor.core.test/src/org/testeditor/core/util/ConfigurationTemplateWriterTest.java", "license": "epl-1.0", "size": 5125 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
69,212
Collection<ParameterOption> getParameterOptions(URI uri, String param, Locale locale);
Collection<ParameterOption> getParameterOptions(URI uri, String param, Locale locale);
/** * Provides a collection of {@link ParameterOptions}s. * * @param uri * the uri of the config description * @param param * the parameter name for which the requested options shall be returned * @param locale * locale * @return the configur...
Provides a collection of <code>ParameterOptions</code>s
getParameterOptions
{ "repo_name": "CrackerStealth/smarthome", "path": "bundles/config/org.eclipse.smarthome.config.core/src/main/java/org/eclipse/smarthome/config/core/ConfigOptionProvider.java", "license": "epl-1.0", "size": 1191 }
[ "java.util.Collection", "java.util.Locale" ]
import java.util.Collection; import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
1,728,757
private void parseTimestamps(String line){ timestamps.clear(); for(OrgNodeTimeDate.TYPE type: OrgNodeTimeDate.TYPE.values()){ timestamps.put(type, new OrgNodeTimeDate(type, line)); } db.fastInsertTimestamp(parseStack.getCurrentNodeId(), orgFile.id, timestamps ); } private class ParseStack { ...
void function(String line){ timestamps.clear(); for(OrgNodeTimeDate.TYPE type: OrgNodeTimeDate.TYPE.values()){ timestamps.put(type, new OrgNodeTimeDate(type, line)); } db.fastInsertTimestamp(parseStack.getCurrentNodeId(), orgFile.id, timestamps ); } private class ParseStack { private Stack<Item> stack; public ParseStac...
/** * Parse the line for any timestamps * @param line * @return A HashMap<String,int> where first key is timestamp type and second is value. * Return null if no timestamp found. */
Parse the line for any timestamps
parseTimestamps
{ "repo_name": "matburt/mobileorg-android", "path": "MobileOrg/src/main/java/com/matburt/mobileorg/orgdata/OrgFileParser.java", "license": "gpl-3.0", "size": 9803 }
[ "java.util.Stack" ]
import java.util.Stack;
import java.util.*;
[ "java.util" ]
java.util;
2,252,053
@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); // Sync the toggle state after onRestoreInstanceState has occurred. mDrawerMgr.syncState(); }
void function(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); mDrawerMgr.syncState(); }
/** * When using the ActionBarDrawerToggle, you must call it during * onPostCreate() and onConfigurationChanged()... */
When using the ActionBarDrawerToggle, you must call it during onPostCreate() and onConfigurationChanged()..
onPostCreate
{ "repo_name": "jc6212/Android-UTubeTV", "path": "UTubeTVProject - Eclipse/Utube/src/com/klogicapps/tv/mainactivity/DrawerActivity.java", "license": "apache-2.0", "size": 17368 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
1,339,423
public void onMenuDismissed() { mMenuDismissedRunnableExecuted = false; // Post a task to record the item clicked histogram. Post task is used so that the runnable // executes after #onMenuItemClicked is called (if it's going to be called). PostTask.postTask(TaskTraits.CHOREOGRAPHER_...
void function() { mMenuDismissedRunnableExecuted = false; PostTask.postTask(TaskTraits.CHOREOGRAPHER_FRAME, () -> { if (!mMenuItemClicked) recordItemClickedHistogram(ITEM_NOT_CLICKED); mMenuItemClicked = false; mMenuDismissedRunnableExecuted = true; }); }
/** * Called when the menu containing the update menu item is dismissed. */
Called when the menu containing the update menu item is dismissed
onMenuDismissed
{ "repo_name": "endlessm/chromium-browser", "path": "chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateMenuItemHelper.java", "license": "bsd-3-clause", "size": 18714 }
[ "org.chromium.base.task.PostTask", "org.chromium.base.task.TaskTraits" ]
import org.chromium.base.task.PostTask; import org.chromium.base.task.TaskTraits;
import org.chromium.base.task.*;
[ "org.chromium.base" ]
org.chromium.base;
645,553
void processPick(GVRScene scene, GVRCursorController controller) { if (scene != null) { boolean markActiveNodes = false; if (controller.getActiveState() == ActiveState.ACTIVE_PRESSED) { // active is true, trigger a search for active sensors markActiveN...
void processPick(GVRScene scene, GVRCursorController controller) { if (scene != null) { boolean markActiveNodes = false; if (controller.getActiveState() == ActiveState.ACTIVE_PRESSED) { markActiveNodes = true; } else if (controller .getActiveState() == ActiveState.ACTIVE_RELEASED) { for (GVRBaseSensor sensor : sensors....
/** * Uses the GVR Picker for now .. but would need help from the renderer * later for efficiency. * * We could possibly push this functionality to the native layer. But for * now we keep it here. */
Uses the GVR Picker for now .. but would need help from the renderer later for efficiency. We could possibly push this functionality to the native layer. But for now we keep it here
processPick
{ "repo_name": "mwitchwilliams/GearVRf", "path": "GVRf/Framework/framework/src/main/java/org/gearvrf/SensorManager.java", "license": "apache-2.0", "size": 4939 }
[ "org.gearvrf.GVRCursorController" ]
import org.gearvrf.GVRCursorController;
import org.gearvrf.*;
[ "org.gearvrf" ]
org.gearvrf;
2,074,219
private static Frequency getFrequency(PageContext context, I18n i18n) { int frequency = HTMLUtils.parseAndCheckInteger(context, FREQUENCY_PARAMETER, 1, Integer.MAX_VALUE); HTMLUtils.forwardOnEmptyParameter(context, TIMESPAN_PARAMETER, HARVEST_TIME_PARAMETER); ...
static Frequency function(PageContext context, I18n i18n) { int frequency = HTMLUtils.parseAndCheckInteger(context, FREQUENCY_PARAMETER, 1, Integer.MAX_VALUE); HTMLUtils.forwardOnEmptyParameter(context, TIMESPAN_PARAMETER, HARVEST_TIME_PARAMETER); HTMLUtils.forwardOnIllegalParameter(context, TIMESPAN_PARAMETER, "days",...
/** * Returns a frequency object specifying whether the harvest is * to be minute, hourly, daily, weekly, or monthly and how often it is to be * run. * @param context Web context of the request * @param i18n I18N information * @return the Frequency for the harvest */
Returns a frequency object specifying whether the harvest is to be minute, hourly, daily, weekly, or monthly and how often it is to be run
getFrequency
{ "repo_name": "netarchivesuite/netarchivesuite-svngit-migration", "path": "src/dk/netarkivet/harvester/webinterface/ScheduleDefinition.java", "license": "lgpl-2.1", "size": 15670 }
[ "dk.netarkivet.common.utils.I18n", "dk.netarkivet.common.webinterface.HTMLUtils", "dk.netarkivet.harvester.datamodel.DailyFrequency", "dk.netarkivet.harvester.datamodel.Frequency", "dk.netarkivet.harvester.datamodel.HourlyFrequency", "dk.netarkivet.harvester.datamodel.MinuteFrequency", "dk.netarkivet.ha...
import dk.netarkivet.common.utils.I18n; import dk.netarkivet.common.webinterface.HTMLUtils; import dk.netarkivet.harvester.datamodel.DailyFrequency; import dk.netarkivet.harvester.datamodel.Frequency; import dk.netarkivet.harvester.datamodel.HourlyFrequency; import dk.netarkivet.harvester.datamodel.MinuteFrequency; imp...
import dk.netarkivet.common.utils.*; import dk.netarkivet.common.webinterface.*; import dk.netarkivet.harvester.datamodel.*; import javax.servlet.*; import javax.servlet.jsp.*;
[ "dk.netarkivet.common", "dk.netarkivet.harvester", "javax.servlet" ]
dk.netarkivet.common; dk.netarkivet.harvester; javax.servlet;
301,999
void startSync(AlluxioURI alluxioURI) throws IOException, InvalidPathException, AccessControlException, ConnectionFailedException;
void startSync(AlluxioURI alluxioURI) throws IOException, InvalidPathException, AccessControlException, ConnectionFailedException;
/** * starts active sync on a specified alluxioURI. * * @param alluxioURI sync point which is a valid path in Alluxio namespace * @throws UnavailableException * @throws InvalidPathException * @throws AccessControlException */
starts active sync on a specified alluxioURI
startSync
{ "repo_name": "wwjiang007/alluxio", "path": "core/server/master/src/main/java/alluxio/master/file/FileSystemMaster.java", "license": "apache-2.0", "size": 25489 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,262,697
private void matchSource(TypeInfo<?> sourceTypeInfo, Mutator destinationMutator) { sourceTypes.add(sourceTypeInfo.getType()); for (Map.Entry<String, Accessor> entry : sourceTypeInfo.getAccessors().entrySet()) { Accessor accessor = entry.getValue(); propertyNameInfo.pushSource(entry.getKey(),...
void function(TypeInfo<?> sourceTypeInfo, Mutator destinationMutator) { sourceTypes.add(sourceTypeInfo.getType()); for (Map.Entry<String, Accessor> entry : sourceTypeInfo.getAccessors().entrySet()) { Accessor accessor = entry.getValue(); propertyNameInfo.pushSource(entry.getKey(), entry.getValue()); boolean doneMatchin...
/** * Matches a source accessor hierarchy to the {@code destinationMutator}, first by checking the * {@code typeMapStore} for any existing TypeMaps and merging the mappings if one exists, else by * running the {@code matchingStrategy} against all accessors for the {@code sourceTypeInfo}. */
Matches a source accessor hierarchy to the destinationMutator, first by checking the typeMapStore for any existing TypeMaps and merging the mappings if one exists, else by running the matchingStrategy against all accessors for the sourceTypeInfo
matchSource
{ "repo_name": "scottresnik/modelmapper", "path": "core/src/main/java/org/modelmapper/internal/ImplicitMappingBuilder.java", "license": "apache-2.0", "size": 13953 }
[ "java.util.Map", "org.modelmapper.Converter", "org.modelmapper.TypeMap", "org.modelmapper.internal.PropertyInfoImpl", "org.modelmapper.spi.ConditionalConverter" ]
import java.util.Map; import org.modelmapper.Converter; import org.modelmapper.TypeMap; import org.modelmapper.internal.PropertyInfoImpl; import org.modelmapper.spi.ConditionalConverter;
import java.util.*; import org.modelmapper.*; import org.modelmapper.internal.*; import org.modelmapper.spi.*;
[ "java.util", "org.modelmapper", "org.modelmapper.internal", "org.modelmapper.spi" ]
java.util; org.modelmapper; org.modelmapper.internal; org.modelmapper.spi;
1,018,875
@Override public int read(final byte[] bts, final int off, final int len) throws IOException { try { beforeRead(len); final int n = in.read(bts, off, len); afterRead(n); return n; } catch (final IOException e) { handleIOException(e); ...
int function(final byte[] bts, final int off, final int len) throws IOException { try { beforeRead(len); final int n = in.read(bts, off, len); afterRead(n); return n; } catch (final IOException e) { handleIOException(e); return EOF; } }
/** * Invokes the delegate's <code>read(byte[], int, int)</code> method. * @param bts the buffer to read the bytes into * @param off The start offset * @param len The number of bytes to read * @return the number of bytes read or -1 if the end of stream * @throws IOException if an I/O error...
Invokes the delegate's <code>read(byte[], int, int)</code> method
read
{ "repo_name": "MuShiiii/commons-io", "path": "src/main/java/org/apache/commons/io/input/ProxyInputStream.java", "license": "apache-2.0", "size": 7825 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
531,771
public static PersistentVolumeClaim newPVC(String name, String accessMode, String quantity) { return newPVC(name, accessMode, quantity, null); }
static PersistentVolumeClaim function(String name, String accessMode, String quantity) { return newPVC(name, accessMode, quantity, null); }
/** * Returns new instance of {@link PersistentVolumeClaim} with specified name, accessMode and * quantity. */
Returns new instance of <code>PersistentVolumeClaim</code> with specified name, accessMode and quantity
newPVC
{ "repo_name": "codenvy/che", "path": "infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesObjectUtil.java", "license": "epl-1.0", "size": 9169 }
[ "io.fabric8.kubernetes.api.model.PersistentVolumeClaim" ]
import io.fabric8.kubernetes.api.model.PersistentVolumeClaim;
import io.fabric8.kubernetes.api.model.*;
[ "io.fabric8.kubernetes" ]
io.fabric8.kubernetes;
134,303
public static String getCommitDiff(Repository repository, RevCommit commit, DiffOutputType outputType) { return getDiff(repository, null, commit, null, outputType); }
static String function(Repository repository, RevCommit commit, DiffOutputType outputType) { return getDiff(repository, null, commit, null, outputType); }
/** * Returns the complete diff of the specified commit compared to its primary * parent. * * @param repository * @param commit * @param outputType * @return the diff as a string */
Returns the complete diff of the specified commit compared to its primary parent
getCommitDiff
{ "repo_name": "heavenlyhash/gitblit", "path": "src/main/java/com/gitblit/utils/DiffUtils.java", "license": "apache-2.0", "size": 8653 }
[ "org.eclipse.jgit.lib.Repository", "org.eclipse.jgit.revwalk.RevCommit" ]
import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.lib.*; import org.eclipse.jgit.revwalk.*;
[ "org.eclipse.jgit" ]
org.eclipse.jgit;
2,526,433
public static LTRTalkgroup create(int talkgroup) { return new LTRTalkgroup(talkgroup, Role.TO); }
static LTRTalkgroup function(int talkgroup) { return new LTRTalkgroup(talkgroup, Role.TO); }
/** * Creates an LTR-Net identifier from the integer value that contains both the fleet and the ident with a TO role */
Creates an LTR-Net identifier from the integer value that contains both the fleet and the ident with a TO role
create
{ "repo_name": "ImagoTrigger/sdrtrunk", "path": "src/main/java/io/github/dsheirer/identifier/talkgroup/LTRTalkgroup.java", "license": "gpl-3.0", "size": 2214 }
[ "io.github.dsheirer.identifier.Role" ]
import io.github.dsheirer.identifier.Role;
import io.github.dsheirer.identifier.*;
[ "io.github.dsheirer" ]
io.github.dsheirer;
829,112
protected boolean bottom(TextView widget, Spannable buffer) { return false; }
boolean function(TextView widget, Spannable buffer) { return false; }
/** * Performs a bottom movement action. * Moves the cursor or scrolls to the bottom of the buffer. * * @param widget The text view. * @param buffer The text buffer. * @return True if the event was handled. */
Performs a bottom movement action. Moves the cursor or scrolls to the bottom of the buffer
bottom
{ "repo_name": "JSDemos/android-sdk-20", "path": "src/android/text/method/BaseMovementMethod.java", "license": "apache-2.0", "size": 23891 }
[ "android.text.Spannable", "android.widget.TextView" ]
import android.text.Spannable; import android.widget.TextView;
import android.text.*; import android.widget.*;
[ "android.text", "android.widget" ]
android.text; android.widget;
1,923,821
@RequestMapping(value = "/contact/{id}", method = RequestMethod.GET, produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE}) public ResponseEntity<Contact> getContact(@PathVariable("id") Integer contactId) { Contact contact = phonebookService.find...
@RequestMapping(value = STR, method = RequestMethod.GET, produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE}) ResponseEntity<Contact> function(@PathVariable("id") Integer contactId) { Contact contact = phonebookService.findContactById(contactId); if (contact == null) { return new ResponseEnti...
/** * Find Contact entity by id * * @param contactId to find entity * @return ResponseEntity object */
Find Contact entity by id
getContact
{ "repo_name": "vsyso/phonebook", "path": "spring/src/java/org/syso/phonebook/controller/ContactController.java", "license": "mit", "size": 8996 }
[ "org.springframework.http.HttpStatus", "org.springframework.http.MediaType", "org.springframework.http.ResponseEntity", "org.springframework.web.bind.annotation.PathVariable", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestMethod", "org.syso.pho...
import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod;...
import org.springframework.http.*; import org.springframework.web.bind.annotation.*; import org.syso.phonebook.domain.*;
[ "org.springframework.http", "org.springframework.web", "org.syso.phonebook" ]
org.springframework.http; org.springframework.web; org.syso.phonebook;
2,363,238
public void setDefaultBehavior(Decision decision) { this.defaultBehavior = decision; }
void function(Decision decision) { this.defaultBehavior = decision; }
/** * Sets the default <code>Decision</code> that a <code>PDPEngine</code> created from this * <code>PDPEngineFactory</code> will return when there is no applicable root policy. * * @param decision the <code>Decision</code> to return */
Sets the default <code>Decision</code> that a <code>PDPEngine</code> created from this <code>PDPEngineFactory</code> will return when there is no applicable root policy
setDefaultBehavior
{ "repo_name": "phrinx/incubator-openaz", "path": "openaz-xacml/src/main/java/org/apache/openaz/xacml/api/pdp/PDPEngineFactory.java", "license": "apache-2.0", "size": 9000 }
[ "org.apache.openaz.xacml.api.Decision" ]
import org.apache.openaz.xacml.api.Decision;
import org.apache.openaz.xacml.api.*;
[ "org.apache.openaz" ]
org.apache.openaz;
1,967,043
public Set<String> getClassifications() { return iClassifications; }
Set<String> function() { return iClassifications; }
/** * Academic classifications */
Academic classifications
getClassifications
{ "repo_name": "UniTime/unitime", "path": "JavaSource/org/unitime/timetable/onlinesectioning/model/XCurriculumRestriction.java", "license": "apache-2.0", "size": 6318 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,299,847
public static Object callMethod (Object target, String name) throws ReflectionException { try { Method toCall = target.getClass().getDeclaredMethod(name, new Class[0]); return toCall.invoke(target, new Object[0]); } catch (Exception e) { throw new ReflectionExcept...
static Object function (Object target, String name) throws ReflectionException { try { Method toCall = target.getClass().getDeclaredMethod(name, new Class[0]); return toCall.invoke(target, new Object[0]); } catch (Exception e) { throw new ReflectionException(STR, name, target.getClass().getName()); } }
/** * Given a target object with a no argument method of the given name, call * the named method on that object and return the result. * * If the method's return type is void, null in returned. */
Given a target object with a no argument method of the given name, call the named method on that object and return the result. If the method's return type is void, null in returned
callMethod
{ "repo_name": "calliem/voogasalad_ProtectedTower", "path": "src/util/reflection/Reflection.java", "license": "mit", "size": 8165 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
529,662
public static BufferedImage buildDiffImage(BufferedImage ref, BufferedImage gen) { BufferedImage diff = new BufferedImage(ref.getWidth(), ref.getHeight(), BufferedImag...
static BufferedImage function(BufferedImage ref, BufferedImage gen) { BufferedImage diff = new BufferedImage(ref.getWidth(), ref.getHeight(), BufferedImage.TYPE_INT_ARGB); WritableRaster refWR = ref.getRaster(); WritableRaster genWR = gen.getRaster(); WritableRaster dstWR = diff.getRaster(); boolean refPre = ref.isAlph...
/** * Builds a new BufferedImage that is the difference between the * two input images */
Builds a new BufferedImage that is the difference between the two input images
buildDiffImage
{ "repo_name": "Uni-Sol/batik", "path": "test-sources/org/apache/batik/test/svg/AbstractRenderingAccuracyTest.java", "license": "apache-2.0", "size": 28817 }
[ "java.awt.image.BufferedImage", "java.awt.image.ColorModel", "java.awt.image.WritableRaster", "org.apache.batik.ext.awt.image.GraphicsUtil" ]
import java.awt.image.BufferedImage; import java.awt.image.ColorModel; import java.awt.image.WritableRaster; import org.apache.batik.ext.awt.image.GraphicsUtil;
import java.awt.image.*; import org.apache.batik.ext.awt.image.*;
[ "java.awt", "org.apache.batik" ]
java.awt; org.apache.batik;
257,535
@Override public String getText(Object object) { String label = ((Fixture)object).getName(); return label == null || label.length() == 0 ? getString("_UI_Fixture_type") : getString("_UI_Fixture_type") + " " + label; }
String function(Object object) { String label = ((Fixture)object).getName(); return label == null label.length() == 0 ? getString(STR) : getString(STR) + " " + label; }
/** * This returns the label text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This returns the label text for the adapted class.
getText
{ "repo_name": "KAMP-Research/KAMP4APS", "path": "edu.kit.ipd.sdq.kamp4aps.aps.edit/src/edu/kit/ipd/sdq/kamp4aps/model/aPS/ComponentRepository/provider/FixtureItemProvider.java", "license": "apache-2.0", "size": 2751 }
[ "edu.kit.ipd.sdq.kamp4aps.model.aPS.ComponentRepository" ]
import edu.kit.ipd.sdq.kamp4aps.model.aPS.ComponentRepository;
import edu.kit.ipd.sdq.kamp4aps.model.*;
[ "edu.kit.ipd" ]
edu.kit.ipd;
1,059,336
public RiskGame getGame() { return game; }
RiskGame function() { return game; }
/** * Get the present game * @return RiskGame Return the current game */
Get the present game
getGame
{ "repo_name": "hernol/ConuWar", "path": "Game/src/net/yura/domination/engine/Risk.java", "license": "gpl-3.0", "size": 123876 }
[ "net.yura.domination.engine.core.RiskGame" ]
import net.yura.domination.engine.core.RiskGame;
import net.yura.domination.engine.core.*;
[ "net.yura.domination" ]
net.yura.domination;
715,772
public List<T> parseList(String jsonString) throws IOException { JsonParser jsonParser = LoganSquare.JSON_FACTORY.createParser(jsonString); jsonParser.nextToken(); return parseList(jsonParser); }
List<T> function(String jsonString) throws IOException { JsonParser jsonParser = LoganSquare.JSON_FACTORY.createParser(jsonString); jsonParser.nextToken(); return parseList(jsonParser); }
/** * Parse a list of objects from a String. Note: parsing from an InputStream should be preferred over parsing from a String if possible. * * @param jsonString The JSON string being parsed. */
Parse a list of objects from a String. Note: parsing from an InputStream should be preferred over parsing from a String if possible
parseList
{ "repo_name": "yungfan/LoganSquare", "path": "core/src/main/java/com/bluelinelabs/logansquare/JsonMapper.java", "license": "apache-2.0", "size": 11440 }
[ "com.fasterxml.jackson.core.JsonParser", "java.io.IOException", "java.util.List" ]
import com.fasterxml.jackson.core.JsonParser; import java.io.IOException; import java.util.List;
import com.fasterxml.jackson.core.*; import java.io.*; import java.util.*;
[ "com.fasterxml.jackson", "java.io", "java.util" ]
com.fasterxml.jackson; java.io; java.util;
2,465,600
public UrlBinding getBinding(HttpServletRequest request) { return getBinding(HttpUtil.getRequestedPath(request)); }
UrlBinding function(HttpServletRequest request) { return getBinding(HttpUtil.getRequestedPath(request)); }
/** * Examines a servlet request and returns the associated binding, if any. Parameters will be * extracted from the request, and the {@link UrlBindingParameter} objects returned by * {@link UrlBinding#getParameters()} will contain the values that are present in the request. * * @param re...
Examines a servlet request and returns the associated binding, if any. Parameters will be extracted from the request, and the <code>UrlBindingParameter</code> objects returned by <code>UrlBinding#getParameters()</code> will contain the values that are present in the request
getBinding
{ "repo_name": "scarcher2/stripes", "path": "stripes/src/net/sourceforge/stripes/controller/UrlBindingFactory.java", "license": "apache-2.0", "size": 29696 }
[ "javax.servlet.http.HttpServletRequest", "net.sourceforge.stripes.util.HttpUtil" ]
import javax.servlet.http.HttpServletRequest; import net.sourceforge.stripes.util.HttpUtil;
import javax.servlet.http.*; import net.sourceforge.stripes.util.*;
[ "javax.servlet", "net.sourceforge.stripes" ]
javax.servlet; net.sourceforge.stripes;
1,728,717
public final int getValue() { return value; } OBDSupport(int val, @NonNull String saeDefinedName) { this.value = val; this.saeDefinedName = saeDefinedName; }
final int function() { return value; } OBDSupport(int val, @NonNull String saeDefinedName) { this.value = val; this.saeDefinedName = saeDefinedName; }
/** * Retrieves the SAE defined value of this <code>OBDSupport</code> * * @return the SAE defined value of this <code>OBDSupport</code> * */
Retrieves the SAE defined value of this <code>OBDSupport</code>
getValue
{ "repo_name": "LukeLeber/Scandroid", "path": "src/main/java/com/lukeleber/scandroid/sae/j1979/OBDSupport.java", "license": "unlicense", "size": 3773 }
[ "android.support.annotation.NonNull" ]
import android.support.annotation.NonNull;
import android.support.annotation.*;
[ "android.support" ]
android.support;
1,084,795
public ArrayList<V> getValues (Object key) { ArrayList<V> list = new ArrayList<V>(); // We don't have it if (!m_keys.contains(key)) return list; // go through keys int size = m_keys.size(); for (int i = 0; i < size; i++) { if (m_keys.get(i).equals(key)) if (!list.contains(m_values.get(i)))...
ArrayList<V> function (Object key) { ArrayList<V> list = new ArrayList<V>(); if (!m_keys.contains(key)) return list; int size = m_keys.size(); for (int i = 0; i < size; i++) { if (m_keys.get(i).equals(key)) if (!list.contains(m_values.get(i))) list.add(m_values.get(i)); } return list; }
/** * Return ArrayList of Values of Key * @param key key * @return array list of values */
Return ArrayList of Values of Key
getValues
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.adempiere.adempiere/base/src/main/java-legacy/org/compiere/model/MultiMap.java", "license": "gpl-2.0", "size": 6251 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,018,136
public T xstream(String encoding, String permission) { XStreamDataFormat xdf = new XStreamDataFormat(); xdf.setPermissions(permission); xdf.setEncoding(encoding); return dataFormat(xdf); }
T function(String encoding, String permission) { XStreamDataFormat xdf = new XStreamDataFormat(); xdf.setPermissions(permission); xdf.setEncoding(encoding); return dataFormat(xdf); }
/** * Uses the xstream by setting the encoding */
Uses the xstream by setting the encoding
xstream
{ "repo_name": "rmarting/camel", "path": "camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java", "license": "apache-2.0", "size": 42614 }
[ "org.apache.camel.model.dataformat.XStreamDataFormat" ]
import org.apache.camel.model.dataformat.XStreamDataFormat;
import org.apache.camel.model.dataformat.*;
[ "org.apache.camel" ]
org.apache.camel;
2,066,885
public List<TNavigatorGroupingSorting> getTNavigatorGroupingSortings(Connection con) throws TorqueException { if (collTNavigatorGroupingSortings == null) { collTNavigatorGroupingSortings = getTNavigatorGroupingSortings(new Criteria(10), con); } return collTNavigatorGr...
List<TNavigatorGroupingSorting> function(Connection con) throws TorqueException { if (collTNavigatorGroupingSortings == null) { collTNavigatorGroupingSortings = getTNavigatorGroupingSortings(new Criteria(10), con); } return collTNavigatorGroupingSortings; }
/** * If this collection has already been initialized, returns * the collection. Otherwise returns the results of * getTNavigatorGroupingSortings(new Criteria(),Connection) * This method takes in the Connection also as input so that * referenced objects can also be obtained using a Connection ...
If this collection has already been initialized, returns the collection. Otherwise returns the results of getTNavigatorGroupingSortings(new Criteria(),Connection) This method takes in the Connection also as input so that referenced objects can also be obtained using a Connection that is taken as input
getTNavigatorGroupingSortings
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTNavigatorLayout.java", "license": "gpl-3.0", "size": 71244 }
[ "java.sql.Connection", "java.util.List", "org.apache.torque.TorqueException", "org.apache.torque.util.Criteria" ]
import java.sql.Connection; import java.util.List; import org.apache.torque.TorqueException; import org.apache.torque.util.Criteria;
import java.sql.*; import java.util.*; import org.apache.torque.*; import org.apache.torque.util.*;
[ "java.sql", "java.util", "org.apache.torque" ]
java.sql; java.util; org.apache.torque;
1,431,783
public Properties getCreateHeapProperties() { Properties properties = new Properties(); // default properties for system tables: properties.put(Property.PAGE_SIZE_PARAMETER,"1024"); properties.put(RawStoreFactory.PAGE_RESERVED_SPACE_PARAMETER,"0"); properties.put(RawStoreFactory.MINIMUM_RECORD_SIZE_PARAME...
Properties function() { Properties properties = new Properties(); properties.put(Property.PAGE_SIZE_PARAMETER,"1024"); properties.put(RawStoreFactory.PAGE_RESERVED_SPACE_PARAMETER,"0"); properties.put(RawStoreFactory.MINIMUM_RECORD_SIZE_PARAMETER,"1"); return properties; }
/** * Get the Properties associated with creating the heap. * * @return The Properties associated with creating the heap. */
Get the Properties associated with creating the heap
getCreateHeapProperties
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.engine/org/apache/derby/iapi/sql/dictionary/CatalogRowFactory.java", "license": "apache-2.0", "size": 10556 }
[ "java.util.Properties", "org.apache.derby.iapi.store.raw.RawStoreFactory", "org.apache.derby.shared.common.reference.Property" ]
import java.util.Properties; import org.apache.derby.iapi.store.raw.RawStoreFactory; import org.apache.derby.shared.common.reference.Property;
import java.util.*; import org.apache.derby.iapi.store.raw.*; import org.apache.derby.shared.common.reference.*;
[ "java.util", "org.apache.derby" ]
java.util; org.apache.derby;
1,019,662
public UserPatientAssessmentFavouritesVo getFavourite(HcpRefVo hcpRefVo) { if(hcpRefVo == null) throw new CodingRuntimeException("Cannot getFavourite for null hcpRefVo"); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("from UserPatientAssessmentFavourites upaf where ");...
UserPatientAssessmentFavouritesVo function(HcpRefVo hcpRefVo) { if(hcpRefVo == null) throw new CodingRuntimeException(STR); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(STR); ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); hql.append(STR); values.add(hcpRefVo....
/** * Returns a Favourite */
Returns a Favourite
getFavourite
{ "repo_name": "open-health-hub/openMAXIMS", "path": "openmaxims_workspace/Assessment/src/ims/assessment/domain/impl/AssessmentFavouritesImpl.java", "license": "agpl-3.0", "size": 6763 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
674,748
public InetSocketAddress getSocketAddr( String name, String defaultAddress, int defaultPort) { final String address = getTrimmed(name, defaultAddress); return NetUtils.createSocketAddr(address, defaultPort, name); }
InetSocketAddress function( String name, String defaultAddress, int defaultPort) { final String address = getTrimmed(name, defaultAddress); return NetUtils.createSocketAddr(address, defaultPort, name); }
/** * Get the socket address for <code>name</code> property as a * <code>InetSocketAddress</code>. * @param name property name. * @param defaultAddress the default value * @param defaultPort the default port * @return InetSocketAddress */
Get the socket address for <code>name</code> property as a <code>InetSocketAddress</code>
getSocketAddr
{ "repo_name": "jaypatil/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java", "license": "gpl-3.0", "size": 110363 }
[ "java.net.InetSocketAddress", "org.apache.hadoop.net.NetUtils" ]
import java.net.InetSocketAddress; import org.apache.hadoop.net.NetUtils;
import java.net.*; import org.apache.hadoop.net.*;
[ "java.net", "org.apache.hadoop" ]
java.net; org.apache.hadoop;
2,043,219
@Test() public void testRedefinedMatchingRuleWithName() throws Exception { final File schemaDir = createTempDir(); final File schemaFile1 = new File(schemaDir, "01-first.ldif"); StaticUtils.writeFile(schemaFile1, minimalSchemaLines); final File schemaFile2 = new File(schemaDir, "second....
@Test() void function() throws Exception { final File schemaDir = createTempDir(); final File schemaFile1 = new File(schemaDir, STR); StaticUtils.writeFile(schemaFile1, minimalSchemaLines); final File schemaFile2 = new File(schemaDir, STR); StaticUtils.writeFile(schemaFile2, STR, STR, STR, STR, STR, STR + STR); SchemaV...
/** * Tests the behavior for a duplicate matching rule definition that has a * different name but the same OID. * * @throws Exception If an unexpected problem occurs. */
Tests the behavior for a duplicate matching rule definition that has a different name but the same OID
testRedefinedMatchingRuleWithName
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/schema/SchemaValidatorTestCase.java", "license": "gpl-2.0", "size": 262381 }
[ "com.unboundid.util.StaticUtils", "java.io.File", "java.util.ArrayList", "java.util.List", "org.testng.annotations.Test" ]
import com.unboundid.util.StaticUtils; import java.io.File; import java.util.ArrayList; import java.util.List; import org.testng.annotations.Test;
import com.unboundid.util.*; import java.io.*; import java.util.*; import org.testng.annotations.*;
[ "com.unboundid.util", "java.io", "java.util", "org.testng.annotations" ]
com.unboundid.util; java.io; java.util; org.testng.annotations;
932,280
@Test public void setPinned() throws Exception { createPath(mTree, NESTED_URI, sNestedDirectoryOptions); createPath(mTree, NESTED_FILE_URI, sNestedFileOptions); // no inodes pinned assertEquals(0, mTree.getPinIdSet().size()); // pin nested folder try ( LockedInodePath inodePath = m...
void function() throws Exception { createPath(mTree, NESTED_URI, sNestedDirectoryOptions); createPath(mTree, NESTED_FILE_URI, sNestedFileOptions); assertEquals(0, mTree.getPinIdSet().size()); try ( LockedInodePath inodePath = mTree.lockFullInodePath(NESTED_URI, InodeTree.LockMode.WRITE)) { mTree.setPinned(inodePath, tr...
/** * Tests the {@link InodeTree#setPinned(LockedInodePath, boolean)} method. */
Tests the <code>InodeTree#setPinned(LockedInodePath, boolean)</code> method
setPinned
{ "repo_name": "ChangerYoung/alluxio", "path": "core/server/master/src/test/java/alluxio/master/file/meta/InodeTreeTest.java", "license": "apache-2.0", "size": 29711 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,290,951
public void convert(final QemuImgFile srcFile, final QemuImgFile destFile, final Map<String, String> options, final String snapshotName) throws QemuImgException { Script script = new Script(_qemuImgPath, timeout); if (StringUtils.isNotBlank(snapshotName)) { String...
void function(final QemuImgFile srcFile, final QemuImgFile destFile, final Map<String, String> options, final String snapshotName) throws QemuImgException { Script script = new Script(_qemuImgPath, timeout); if (StringUtils.isNotBlank(snapshotName)) { String qemuPath = Script.runSimpleBashScript(getQemuImgPathScript); ...
/** * Convert a image from source to destination * * This method calls 'qemu-img convert' and takes two objects * as an argument. * * * @param srcFile * The source file * @param destFile * The destination file * @param options * ...
Convert a image from source to destination This method calls 'qemu-img convert' and takes two objects as an argument
convert
{ "repo_name": "GabrielBrascher/cloudstack", "path": "plugins/hypervisors/kvm/src/main/java/org/apache/cloudstack/utils/qemu/QemuImg.java", "license": "apache-2.0", "size": 15496 }
[ "com.cloud.utils.script.Script", "java.util.Map", "org.apache.commons.lang.StringUtils" ]
import com.cloud.utils.script.Script; import java.util.Map; import org.apache.commons.lang.StringUtils;
import com.cloud.utils.script.*; import java.util.*; import org.apache.commons.lang.*;
[ "com.cloud.utils", "java.util", "org.apache.commons" ]
com.cloud.utils; java.util; org.apache.commons;
855,277
public void load(InputStream in, Class<?> resourceBase) throws ParseException, IllegalArgumentException, NotImplementedException { // FIXME: Implement this correctly. }
void function(InputStream in, Class<?> resourceBase) throws ParseException, IllegalArgumentException, NotImplementedException { }
/** * Loads a set of {@link SynthStyle}s that are used for the look and feel of * the components. The <code>resourceBase</code> parameter is used to resolve * references against, like icons and other files. * * @param in the input stream from where to load the styles * @param resourceBase the base aga...
Loads a set of <code>SynthStyle</code>s that are used for the look and feel of the components. The <code>resourceBase</code> parameter is used to resolve references against, like icons and other files
load
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/javax/swing/plaf/synth/SynthLookAndFeel.java", "license": "gpl-2.0", "size": 7862 }
[ "gnu.classpath.NotImplementedException", "java.io.InputStream", "java.text.ParseException" ]
import gnu.classpath.NotImplementedException; import java.io.InputStream; import java.text.ParseException;
import gnu.classpath.*; import java.io.*; import java.text.*;
[ "gnu.classpath", "java.io", "java.text" ]
gnu.classpath; java.io; java.text;
445,652
public static ValidationResult validateInputAndOutputPath(Path inputPath, Path outputPath){ return validateInputsAndOutputPaths(Collections.singletonList(inputPath), outputPath); }
static ValidationResult function(Path inputPath, Path outputPath){ return validateInputsAndOutputPaths(Collections.singletonList(inputPath), outputPath); }
/** * <p> * This validates that the input and output options are compatible. * </p> * <p> * Examples of incompatibilities would include: * </p> * <ul> * <li>Input and Output path are the same</li> * <li>Input is a subdirectory of the output</li> * <li>Output is a subdir...
This validates that the input and output options are compatible. Examples of incompatibilities would include: Input and Output path are the same Input is a subdirectory of the output Output is a subdirectory of the input
validateInputAndOutputPath
{ "repo_name": "OndraZizka/windup", "path": "exec/api/src/main/java/org/jboss/windup/exec/configuration/options/OutputPathOption.java", "license": "epl-1.0", "size": 3207 }
[ "java.nio.file.Path", "java.util.Collections", "org.jboss.windup.config.ValidationResult" ]
import java.nio.file.Path; import java.util.Collections; import org.jboss.windup.config.ValidationResult;
import java.nio.file.*; import java.util.*; import org.jboss.windup.config.*;
[ "java.nio", "java.util", "org.jboss.windup" ]
java.nio; java.util; org.jboss.windup;
2,904,081
@Nonnull public TeamsAppInstallationRequest expand(@Nonnull final String value) { addExpandOption(value); return this; }
TeamsAppInstallationRequest function(@Nonnull final String value) { addExpandOption(value); return this; }
/** * Sets the expand clause for the request * * @param value the expand clause * @return the updated request */
Sets the expand clause for the request
expand
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/TeamsAppInstallationRequest.java", "license": "mit", "size": 7029 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
393,216