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 static List<Path> getMissingFields(Path fieldMetadataPath,
JsonDoc doc) {
LOGGER.debug("Checking {}",fieldMetadataPath);
int nAnys = fieldMetadataPath.nAnys();
List<Path> errors = new ArrayList<Path>();
if (nAnys == 0) {
... | static List<Path> function(Path fieldMetadataPath, JsonDoc doc) { LOGGER.debug(STR,fieldMetadataPath); int nAnys = fieldMetadataPath.nAnys(); List<Path> errors = new ArrayList<Path>(); if (nAnys == 0) { JsonNode fieldNode=doc.get(fieldMetadataPath); if (fieldNode == null) { if(fieldMetadataPath.numSegments()>1) { JsonN... | /**
* Returns the list of fields that are missing in the doc
*
* @param fieldMetadataPath Path of the required field
* @param doc The document
*
* @return List of field instances that are not present in the doc.
*/ | Returns the list of fields that are missing in the doc | getMissingFields | {
"repo_name": "BVulaj/lightblue-core",
"path": "crud/src/main/java/com/redhat/lightblue/crud/validator/RequiredChecker.java",
"license": "gpl-3.0",
"size": 4692
} | [
"com.fasterxml.jackson.databind.JsonNode",
"com.fasterxml.jackson.databind.node.NullNode",
"com.redhat.lightblue.util.JsonDoc",
"com.redhat.lightblue.util.KeyValueCursor",
"com.redhat.lightblue.util.Path",
"java.util.ArrayList",
"java.util.List"
] | import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.NullNode; import com.redhat.lightblue.util.JsonDoc; import com.redhat.lightblue.util.KeyValueCursor; import com.redhat.lightblue.util.Path; import java.util.ArrayList; import java.util.List; | import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.node.*; import com.redhat.lightblue.util.*; import java.util.*; | [
"com.fasterxml.jackson",
"com.redhat.lightblue",
"java.util"
] | com.fasterxml.jackson; com.redhat.lightblue; java.util; | 978,881 |
protected synchronized R newBuild() throws IOException {
// make sure we don't start two builds in the same second
// so the build directories will be different too
long timeSinceLast = System.currentTimeMillis() - lastBuildStartTime;
if (timeSinceLast < 1000) {
try {
Thread.sleep(1000... | synchronized R function() throws IOException { long timeSinceLast = System.currentTimeMillis() - lastBuildStartTime; if (timeSinceLast < 1000) { try { Thread.sleep(1000 - timeSinceLast); } catch (InterruptedException e) { } } lastBuildStartTime = System.currentTimeMillis(); try { R lastBuild = getBuildClass().getConstr... | /**
* Creates a new build of this project for immediate execution.
*/ | Creates a new build of this project for immediate execution | newBuild | {
"repo_name": "fujibee/hudson",
"path": "core/src/main/java/hudson/model/AbstractProject.java",
"license": "mit",
"size": 52449
} | [
"java.io.IOException",
"java.lang.reflect.InvocationTargetException"
] | import java.io.IOException; import java.lang.reflect.InvocationTargetException; | import java.io.*; import java.lang.reflect.*; | [
"java.io",
"java.lang"
] | java.io; java.lang; | 1,563,638 |
public void _setFolded(MindMapNode node, boolean folded) {
if (node == null) {
throw new IllegalArgumentException("setFolded was called with a null node.");
}
// no root folding, fc, 16.5.2004
if (node.isRoot() && folded) {
return;
}
if (node.isFolded() != folded) {
node.setF... | void function(MindMapNode node, boolean folded) { if (node == null) { throw new IllegalArgumentException(STR); } if (node.isRoot() && folded) { return; } if (node.isFolded() != folded) { node.setFolded(folded); nodeStructureChanged(node); } } | /**
* Don't call me directly!!! The basic folding method. Without undo.
*/ | Don't call me directly!!! The basic folding method. Without undo | _setFolded | {
"repo_name": "Rogach/SimplyMindMap",
"path": "src/org/rogach/simplymindmap/controller/MindMapController.java",
"license": "gpl-2.0",
"size": 35967
} | [
"org.rogach.simplymindmap.model.MindMapNode"
] | import org.rogach.simplymindmap.model.MindMapNode; | import org.rogach.simplymindmap.model.*; | [
"org.rogach.simplymindmap"
] | org.rogach.simplymindmap; | 509,019 |
private void createJigsaw(int which) {
drawView.setDrawingCacheEnabled(true);
Bitmap bitmap = drawView.getDrawingCache();
JigsawGenerator task = new JigsawGenerator(getApplicationContext(),
Difficulty.fromValue(which));
shortToast(getApplicationContext(), "Loading..... | void function(int which) { drawView.setDrawingCacheEnabled(true); Bitmap bitmap = drawView.getDrawingCache(); JigsawGenerator task = new JigsawGenerator(getApplicationContext(), Difficulty.fromValue(which)); shortToast(getApplicationContext(), STR); task.execute(bitmap.copy(bitmap.getConfig(), true)); drawView.destroyD... | /**
* Create jigsaw and give user feedback
*
* @param which the selected option in dialog
*/ | Create jigsaw and give user feedback | createJigsaw | {
"repo_name": "RudraNilBasu/Android-Jigsaw-Puzzle",
"path": "app/src/main/java/com/jigdraw/draw/activity/DrawActivity.java",
"license": "apache-2.0",
"size": 9031
} | [
"android.graphics.Bitmap",
"com.jigdraw.draw.model.enums.Difficulty",
"com.jigdraw.draw.tasks.JigsawGenerator",
"com.jigdraw.draw.util.ToastUtil"
] | import android.graphics.Bitmap; import com.jigdraw.draw.model.enums.Difficulty; import com.jigdraw.draw.tasks.JigsawGenerator; import com.jigdraw.draw.util.ToastUtil; | import android.graphics.*; import com.jigdraw.draw.model.enums.*; import com.jigdraw.draw.tasks.*; import com.jigdraw.draw.util.*; | [
"android.graphics",
"com.jigdraw.draw"
] | android.graphics; com.jigdraw.draw; | 69,932 |
public void sendMail() {
Iterator<InternetAddress> i = getRecipients().iterator();
int errLogCount = 0;
while (i.hasNext()) {
InternetAddress to = i.next();
List<InternetAddress> toList = new ArrayList<InternetAddress>(1);
toList.add(to);
try ... | void function() { Iterator<InternetAddress> i = getRecipients().iterator(); int errLogCount = 0; while (i.hasNext()) { InternetAddress to = i.next(); List<InternetAddress> toList = new ArrayList<InternetAddress>(1); toList.add(to); try { Email mail = getMailData().getEmail(); mail.setTo(toList); mail.send(); } catch (E... | /**
* Sends the newsletter mails to the recipients.<p>
*/ | Sends the newsletter mails to the recipients | sendMail | {
"repo_name": "gallardo/alkacon-oamp",
"path": "com.alkacon.opencms.newsletter/src/com/alkacon/opencms/newsletter/CmsNewsletterMail.java",
"license": "gpl-3.0",
"size": 8744
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"javax.mail.internet.InternetAddress",
"org.apache.commons.mail.Email"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; import javax.mail.internet.InternetAddress; import org.apache.commons.mail.Email; | import java.util.*; import javax.mail.internet.*; import org.apache.commons.mail.*; | [
"java.util",
"javax.mail",
"org.apache.commons"
] | java.util; javax.mail; org.apache.commons; | 825,557 |
public boolean awaitQuiescence(long timeout, TimeUnit unit) {
long nanos = unit.toNanos(timeout);
ForkJoinWorkerThread wt;
Thread thread = Thread.currentThread();
if ((thread instanceof ForkJoinWorkerThread) &&
(wt = (ForkJoinWorkerThread)thread).pool == this) {
... | boolean function(long timeout, TimeUnit unit) { long nanos = unit.toNanos(timeout); ForkJoinWorkerThread wt; Thread thread = Thread.currentThread(); if ((thread instanceof ForkJoinWorkerThread) && (wt = (ForkJoinWorkerThread)thread).pool == this) { helpQuiescePool(wt.workQueue); return true; } long startTime = System.n... | /**
* If called by a ForkJoinTask operating in this pool, equivalent
* in effect to {@link ForkJoinTask#helpQuiesce}. Otherwise,
* waits and/or attempts to assist performing tasks until this
* pool {@link #isQuiescent} or the indicated timeout elapses.
*
* @param timeout the maximum time t... | If called by a ForkJoinTask operating in this pool, equivalent in effect to <code>ForkJoinTask#helpQuiesce</code>. Otherwise, waits and/or attempts to assist performing tasks until this pool <code>#isQuiescent</code> or the indicated timeout elapses | awaitQuiescence | {
"repo_name": "twitter/jsr166e",
"path": "src/main/java/com/twitter/jsr166e/ForkJoinPool.java",
"license": "cc0-1.0",
"size": 144905
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 722,042 |
Response getResponse();
interface Response extends StatusResponse { | Response getResponse(); interface Response extends StatusResponse { | /**
* Gets the response that is about to be sent to the client.
*
* @return The response to the status request
*/ | Gets the response that is about to be sent to the client | getResponse | {
"repo_name": "AlphaModder/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/event/server/ClientPingServerEvent.java",
"license": "mit",
"size": 4635
} | [
"org.spongepowered.api.network.status.StatusResponse"
] | import org.spongepowered.api.network.status.StatusResponse; | import org.spongepowered.api.network.status.*; | [
"org.spongepowered.api"
] | org.spongepowered.api; | 2,283,846 |
public SFReactor readHDF5(URI uri) {
// The SFReactor that will receive the data from the file.
SFReactor reactor = null;
// Check the parameters.
if (uri == null) {
return reactor;
}
// Check the file associated with the URI. We need to be able to read
// from it.
File file = new File(uri);
S... | SFReactor function(URI uri) { SFReactor reactor = null; if (uri == null) { return reactor; } File file = new File(uri); String path = file.getPath(); if (!file.canRead()) { System.err.println(STRSTR\STR); return reactor; } int H5P_DEFAULT = HDF5Constants.H5P_DEFAULT; int H5F_ACC_RDONLY = HDF5Constants.H5F_ACC_RDONLY; i... | /**
* Reads data from an input HDF5 file into a SFReactor.
*
* @return A valid {@link SFReactor} if the file could be completely read,
* {@code null} if the file could not be opened.
*/ | Reads data from an input HDF5 file into a SFReactor | readHDF5 | {
"repo_name": "gorindn/ice",
"path": "src/org.eclipse.ice.reactor.sfr/src/org/eclipse/ice/reactor/sfr/base/SFReactorIOHandler.java",
"license": "epl-1.0",
"size": 64613
} | [
"java.io.File",
"java.util.Stack",
"org.eclipse.ice.reactor.sfr.core.SFReactor"
] | import java.io.File; import java.util.Stack; import org.eclipse.ice.reactor.sfr.core.SFReactor; | import java.io.*; import java.util.*; import org.eclipse.ice.reactor.sfr.core.*; | [
"java.io",
"java.util",
"org.eclipse.ice"
] | java.io; java.util; org.eclipse.ice; | 688,583 |
default AdvancedIgniteCacheEndpointConsumerBuilder exchangePattern(
ExchangePattern exchangePattern) {
doSetProperty("exchangePattern", exchangePattern);
return this;
} | default AdvancedIgniteCacheEndpointConsumerBuilder exchangePattern( ExchangePattern exchangePattern) { doSetProperty(STR, exchangePattern); return this; } | /**
* Sets the exchange pattern when the consumer creates an exchange.
*
* The option is a: <code>org.apache.camel.ExchangePattern</code> type.
*
* Group: consumer (advanced)
*/ | Sets the exchange pattern when the consumer creates an exchange. The option is a: <code>org.apache.camel.ExchangePattern</code> type. Group: consumer (advanced) | exchangePattern | {
"repo_name": "adessaigne/camel",
"path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/IgniteCacheEndpointBuilderFactory.java",
"license": "apache-2.0",
"size": 35830
} | [
"org.apache.camel.ExchangePattern"
] | import org.apache.camel.ExchangePattern; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,490,999 |
@ceylon.language.StaticAnnotation$annotation$
@ceylon.language.SharedAnnotation$annotation$
@org.eclipse.ceylon.common.NonNull
public static boolean[] booleanArray(
@Name("array")
@TypeInfo("ceylon.language::Array<ceylon.language::Boolean>")
@org.eclipse.ceylon.common... | @ceylon.language.StaticAnnotation$annotation$ @ceylon.language.SharedAnnotation$annotation$ @org.eclipse.ceylon.common.NonNull static boolean[] function( @Name("array") @TypeInfo(STR) @org.eclipse.ceylon.common.NonNull final Array<ceylon.language.Boolean> array) { return (boolean[]) array.toArray(); } | /**
* The <code>boolean[]</code> array underlying the
* given Ceylon <code>Array<Boolean></code>.
*/ | The <code>boolean[]</code> array underlying the given Ceylon <code>Array<Boolean></code> | booleanArray | {
"repo_name": "ceylon/ceylon",
"path": "language/runtime/org/eclipse/ceylon/compiler/java/language/Types.java",
"license": "apache-2.0",
"size": 11862
} | [
"org.eclipse.ceylon.compiler.java.metadata.Name",
"org.eclipse.ceylon.compiler.java.metadata.TypeInfo"
] | import org.eclipse.ceylon.compiler.java.metadata.Name; import org.eclipse.ceylon.compiler.java.metadata.TypeInfo; | import org.eclipse.ceylon.compiler.java.metadata.*; | [
"org.eclipse.ceylon"
] | org.eclipse.ceylon; | 1,221,279 |
public void removeChangeListener(RendererChangeListener listener) {
ParamChecks.nullNotPermitted(listener, "listener");
this.listenerList.remove(RendererChangeListener.class, listener);
}
| void function(RendererChangeListener listener) { ParamChecks.nullNotPermitted(listener, STR); this.listenerList.remove(RendererChangeListener.class, listener); } | /**
* Deregisters an object so that it no longer receives
* notification of changes to the renderer.
*
* @param listener the object (<code>null</code> not permitted).
*
* @see #addChangeListener(RendererChangeListener)
*/ | Deregisters an object so that it no longer receives notification of changes to the renderer | removeChangeListener | {
"repo_name": "aaronc/jfreechart",
"path": "source/org/jfree/chart/renderer/AbstractRenderer.java",
"license": "lgpl-2.1",
"size": 143969
} | [
"org.jfree.chart.event.RendererChangeListener",
"org.jfree.chart.util.ParamChecks"
] | import org.jfree.chart.event.RendererChangeListener; import org.jfree.chart.util.ParamChecks; | import org.jfree.chart.event.*; import org.jfree.chart.util.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 110,123 |
@Test
public void testGetAllConceptsInScheme() throws IOException, URISyntaxException, PortalServiceException {
final InputStream rs1 = new HttpClientInputStream(ResourceUtil.loadResourceAsStream(
"org/auscope/portal/core/test/responses/sissvoc/SISSVoc3_ConceptsRDF_MoreData.xml"), null);... | void function() throws IOException, URISyntaxException, PortalServiceException { final InputStream rs1 = new HttpClientInputStream(ResourceUtil.loadResourceAsStream( STR), null); final InputStream rs2 = new HttpClientInputStream(ResourceUtil.loadResourceAsStream( STR), null); context.checking(new Expectations() { { one... | /**
* Tests that iterating a repository using a schemeUrl works as expected
*
* @throws URISyntaxException
* @throws PortalServiceException
* @throws IOException
*/ | Tests that iterating a repository using a schemeUrl works as expected | testGetAllConceptsInScheme | {
"repo_name": "victortey/portal-core",
"path": "src/test/java/org/auscope/portal/core/services/TestSISSVoc3Service.java",
"license": "lgpl-3.0",
"size": 12447
} | [
"com.google.common.collect.Lists",
"com.hp.hpl.jena.rdf.model.Model",
"com.hp.hpl.jena.rdf.model.Resource",
"java.io.IOException",
"java.io.InputStream",
"java.net.URISyntaxException",
"java.util.List",
"org.auscope.portal.core.server.http.HttpClientInputStream",
"org.auscope.portal.core.services.me... | import com.google.common.collect.Lists; import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.rdf.model.Resource; import java.io.IOException; import java.io.InputStream; import java.net.URISyntaxException; import java.util.List; import org.auscope.portal.core.server.http.HttpClientInputStream; import org.ausco... | import com.google.common.collect.*; import com.hp.hpl.jena.rdf.model.*; import java.io.*; import java.net.*; import java.util.*; import org.auscope.portal.core.server.http.*; import org.auscope.portal.core.services.methodmakers.sissvoc.*; import org.auscope.portal.core.test.*; import org.jmock.*; import org.junit.*; | [
"com.google.common",
"com.hp.hpl",
"java.io",
"java.net",
"java.util",
"org.auscope.portal",
"org.jmock",
"org.junit"
] | com.google.common; com.hp.hpl; java.io; java.net; java.util; org.auscope.portal; org.jmock; org.junit; | 188,476 |
@Test
public void testMissingMaxResultsParameter() {
int firstResult = 10;
given()
.queryParam("firstResult", firstResult)
.then()
.expect()
.statusCode(Status.OK.getStatusCode())
.when()
.get(CASE_EXECUTION_QUERY_URL);
verify(mockedQuery).listPage(firstResult, Intege... | void function() { int firstResult = 10; given() .queryParam(STR, firstResult) .then() .expect() .statusCode(Status.OK.getStatusCode()) .when() .get(CASE_EXECUTION_QUERY_URL); verify(mockedQuery).listPage(firstResult, Integer.MAX_VALUE); } | /**
* If parameter "maxResults" is missing, we expect Integer.MAX_VALUE as default.
*/ | If parameter "maxResults" is missing, we expect Integer.MAX_VALUE as default | testMissingMaxResultsParameter | {
"repo_name": "LuisePufahl/camunda-bpm-platform_batchProcessing",
"path": "engine-rest/src/test/java/org/camunda/bpm/engine/rest/AbstractCaseExecutionRestServiceQueryTest.java",
"license": "apache-2.0",
"size": 33562
} | [
"com.jayway.restassured.RestAssured",
"javax.ws.rs.core.Response",
"org.mockito.Mockito"
] | import com.jayway.restassured.RestAssured; import javax.ws.rs.core.Response; import org.mockito.Mockito; | import com.jayway.restassured.*; import javax.ws.rs.core.*; import org.mockito.*; | [
"com.jayway.restassured",
"javax.ws",
"org.mockito"
] | com.jayway.restassured; javax.ws; org.mockito; | 2,906,078 |
public Collection<T> getOperations() {
return this.operations;
} | Collection<T> function() { return this.operations; } | /**
* Returns the operations of the endpoint.
* @return the operations
*/ | Returns the operations of the endpoint | getOperations | {
"repo_name": "bbrouwer/spring-boot",
"path": "spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/EndpointInfo.java",
"license": "apache-2.0",
"size": 1965
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 712,423 |
public static void setNodeIcon(Image nodeIcon) {
nodeImage = nodeIcon;
} | static void function(Image nodeIcon) { nodeImage = nodeIcon; } | /**
* Sets the icon for a tree node
*
* @param nodeIcon the icon for a node within the tree
*/ | Sets the icon for a tree node | setNodeIcon | {
"repo_name": "skyHALud/codenameone",
"path": "CodenameOne/src/com/codename1/ui/tree/Tree.java",
"license": "gpl-2.0",
"size": 18876
} | [
"com.codename1.ui.Image"
] | import com.codename1.ui.Image; | import com.codename1.ui.*; | [
"com.codename1.ui"
] | com.codename1.ui; | 928,994 |
@ApiModelProperty(example = "60", value = "A number of all jobs.")
public Integer getTotalCount() {
return totalCount;
} | @ApiModelProperty(example = "60", value = STR) Integer function() { return totalCount; } | /**
* A number of all jobs.
* @return totalCount
**/ | A number of all jobs | getTotalCount | {
"repo_name": "Telestream/telestream-cloud-java-sdk",
"path": "telestream-cloud-tts-sdk/src/main/java/net/telestream/cloud/tts/JobsCollection.java",
"license": "mit",
"size": 4640
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,994,268 |
boolean removeEnchant(Enchantment ench); | boolean removeEnchant(Enchantment ench); | /**
* Removes the specified enchantment from this item meta.
*
* @param ench Enchantment to remove
* @return true if the item meta changed as a result of this call, false
* otherwise
*/ | Removes the specified enchantment from this item meta | removeEnchant | {
"repo_name": "dentmaged/Bukkit",
"path": "src/main/java/org/bukkit/inventory/meta/ItemMeta.java",
"license": "gpl-3.0",
"size": 4497
} | [
"org.bukkit.enchantments.Enchantment"
] | import org.bukkit.enchantments.Enchantment; | import org.bukkit.enchantments.*; | [
"org.bukkit.enchantments"
] | org.bukkit.enchantments; | 165,192 |
@Deprecated
default void registerFunction(String tenant,
String namespace,
String functionName,
InputStream uploadedInputStream,
FormDataContentDisposition fileDetail,
String functio... | default void registerFunction(String tenant, String namespace, String functionName, InputStream uploadedInputStream, FormDataContentDisposition fileDetail, String functionPkgUrl, FunctionConfig functionConfig, String clientRole, AuthenticationDataHttps clientAuthenticationDataHttps) { registerFunction( tenant, namespac... | /**
* This method uses an incorrect signature 'AuthenticationDataHttps' that prevents the extension of auth status,
* so it is marked as deprecated and kept here only for backward compatibility. Please use the method that accepts
* the signature of the AuthenticationDataSource.
*/ | This method uses an incorrect signature 'AuthenticationDataHttps' that prevents the extension of auth status, so it is marked as deprecated and kept here only for backward compatibility. Please use the method that accepts the signature of the AuthenticationDataSource | registerFunction | {
"repo_name": "massakam/pulsar",
"path": "pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/service/api/Functions.java",
"license": "apache-2.0",
"size": 7743
} | [
"java.io.InputStream",
"org.apache.pulsar.broker.authentication.AuthenticationDataHttps",
"org.apache.pulsar.broker.authentication.AuthenticationDataSource",
"org.apache.pulsar.common.functions.FunctionConfig",
"org.glassfish.jersey.media.multipart.FormDataContentDisposition"
] | import java.io.InputStream; import org.apache.pulsar.broker.authentication.AuthenticationDataHttps; import org.apache.pulsar.broker.authentication.AuthenticationDataSource; import org.apache.pulsar.common.functions.FunctionConfig; import org.glassfish.jersey.media.multipart.FormDataContentDisposition; | import java.io.*; import org.apache.pulsar.broker.authentication.*; import org.apache.pulsar.common.functions.*; import org.glassfish.jersey.media.multipart.*; | [
"java.io",
"org.apache.pulsar",
"org.glassfish.jersey"
] | java.io; org.apache.pulsar; org.glassfish.jersey; | 2,389,442 |
public static SimpleDateFormat getDateTimeFormat() {
return OpenmrsUtil.getDateTimeFormat(getLocale());
}
| static SimpleDateFormat function() { return OpenmrsUtil.getDateTimeFormat(getLocale()); } | /**
* Gets the simple datetime format for the current user's locale. The format will be similar to
* mm/dd/yyyy hh:mm a
*
* @return SimpleDateFormat for the user's current locale
* @see org.openmrs.util.OpenmrsUtil#getDateTimeFormat(Locale)
* @should return a pattern with four y characters and two h charac... | Gets the simple datetime format for the current user's locale. The format will be similar to mm/dd/yyyy hh:mm a | getDateTimeFormat | {
"repo_name": "jamesfeshner/openmrs-module",
"path": "api/src/main/java/org/openmrs/api/context/Context.java",
"license": "mpl-2.0",
"size": 41469
} | [
"java.text.SimpleDateFormat",
"org.openmrs.util.OpenmrsUtil"
] | import java.text.SimpleDateFormat; import org.openmrs.util.OpenmrsUtil; | import java.text.*; import org.openmrs.util.*; | [
"java.text",
"org.openmrs.util"
] | java.text; org.openmrs.util; | 2,354,191 |
public ArrayList<CaldroidGridAdapter> getDatePagerAdapters() {
return datePagerAdapters;
} | ArrayList<CaldroidGridAdapter> function() { return datePagerAdapters; } | /**
* Get 4 adapters of the date grid views. Useful to set custom data and
* refresh date grid view
*
* @return
*/ | Get 4 adapters of the date grid views. Useful to set custom data and refresh date grid view | getDatePagerAdapters | {
"repo_name": "javake/Caldroid",
"path": "library/src/com/roomorama/caldroid/CaldroidFragment.java",
"license": "mit",
"size": 36856
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,214,624 |
public static Long getLongSystemThenEnvProperty(String name, Long defaultValue, Properties...properties) {
String tmp = getSystemThenEnvProperty(name, null, properties);
try {
return Long.parseLong(tmp);
} catch (Exception e) {
return defaultValue;
}
}
| static Long function(String name, Long defaultValue, Properties...properties) { String tmp = getSystemThenEnvProperty(name, null, properties); try { return Long.parseLong(tmp); } catch (Exception e) { return defaultValue; } } | /**
* Returns the value defined as a Long looked up from the Environment, then System properties.
* @param name The name of the key to lookup.
* @param defaultValue The default value to return if the name is not defined or the value is not a valid long.
* @param properties An array of properties to search i... | Returns the value defined as a Long looked up from the Environment, then System properties | getLongSystemThenEnvProperty | {
"repo_name": "nickman/shorthand",
"path": "agent/src/main/java/com/heliosapm/shorthand/util/ConfigurationHelper.java",
"license": "apache-2.0",
"size": 11629
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 1,410,155 |
protected void sequence_NameSpace(EObject context, NameSpace semanticObject) {
if(errorAcceptor != null) {
if(transientValues.isValueTransient(semanticObject, TupiPackage.Literals.NAME_SPACE__NAME) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TupiP... | void function(EObject context, NameSpace semanticObject) { if(errorAcceptor != null) { if(transientValues.isValueTransient(semanticObject, TupiPackage.Literals.NAME_SPACE__NAME) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TupiPackage.Literals.NAME_SPACE__NAME... | /**
* Constraint:
* name=QualifiedName
*/ | Constraint: name=QualifiedName | sequence_NameSpace | {
"repo_name": "fmca/Tupi",
"path": "projects/br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/serializer/TupiSemanticSequencer.java",
"license": "mit",
"size": 28114
} | [
"br.ufpe.cin.tupi.NameSpace",
"br.ufpe.cin.tupi.TupiPackage",
"org.eclipse.emf.ecore.EObject",
"org.eclipse.xtext.serializer.acceptor.SequenceFeeder",
"org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider",
"org.eclipse.xtext.serializer.sequencer.ITransientValueService"
] | import br.ufpe.cin.tupi.NameSpace; import br.ufpe.cin.tupi.TupiPackage; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.serializer.acceptor.SequenceFeeder; import org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider; import org.eclipse.xtext.serializer.sequencer.ITransientValueService; | import br.ufpe.cin.tupi.*; import org.eclipse.emf.ecore.*; import org.eclipse.xtext.serializer.acceptor.*; import org.eclipse.xtext.serializer.sequencer.*; | [
"br.ufpe.cin",
"org.eclipse.emf",
"org.eclipse.xtext"
] | br.ufpe.cin; org.eclipse.emf; org.eclipse.xtext; | 2,385,354 |
public void addFeature(int bioStart, int bioEnd, FeatureInterface<AbstractSequence<C>, C> feature) {
SequenceLocation<AbstractSequence<C>, C> sequenceLocation =
new SequenceLocation<AbstractSequence<C>, C>(bioStart, bioEnd, this);
feature.setLocation(sequenceLocation);
addFea... | void function(int bioStart, int bioEnd, FeatureInterface<AbstractSequence<C>, C> feature) { SequenceLocation<AbstractSequence<C>, C> sequenceLocation = new SequenceLocation<AbstractSequence<C>, C>(bioStart, bioEnd, this); feature.setLocation(sequenceLocation); addFeature(feature); } | /**
* Method to help set the proper details for a feature as it relates to a sequence
* where the feature needs to have a location on the sequence
* @param bioStart
* @param bioEnd
* @param feature
*/ | Method to help set the proper details for a feature as it relates to a sequence where the feature needs to have a location on the sequence | addFeature | {
"repo_name": "sbliven/biojava",
"path": "biojava3-core/src/main/java/org/biojava3/core/sequence/template/AbstractSequence.java",
"license": "lgpl-2.1",
"size": 17661
} | [
"org.biojava3.core.sequence.features.FeatureInterface",
"org.biojava3.core.sequence.location.SequenceLocation"
] | import org.biojava3.core.sequence.features.FeatureInterface; import org.biojava3.core.sequence.location.SequenceLocation; | import org.biojava3.core.sequence.features.*; import org.biojava3.core.sequence.location.*; | [
"org.biojava3.core"
] | org.biojava3.core; | 650,486 |
public byte[][] compile(String name, InputSource input) {
return compile(name, input, BYTEARRAY_OUTPUT);
} | byte[][] function(String name, InputSource input) { return compile(name, input, BYTEARRAY_OUTPUT); } | /**
* Compiles a stylesheet pointed to by a URL. The result is put in a
* set of byte arrays. One byte array for each generated class.
* @param name The name of the translet class to generate
* @param input An InputSource that will pass in the stylesheet contents
* @return JVM bytecodes that re... | Compiles a stylesheet pointed to by a URL. The result is put in a set of byte arrays. One byte array for each generated class | compile | {
"repo_name": "FauxFaux/jdk9-jaxp",
"path": "src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java",
"license": "gpl-2.0",
"size": 35830
} | [
"org.xml.sax.InputSource"
] | import org.xml.sax.InputSource; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 1,960,420 |
private boolean isSameProjectionParam()
{
ProjectionParam ref = model.getLastProjRef();
if (ref == null) return true;
if (ref.getStartZ() != view.getProjectionStartZ()) return false;
if (ref.getEndZ() != view.getProjectionEndZ()) return false;
if (ref.getAlgorithm() != view.getProjectionType()) return fal... | boolean function() { ProjectionParam ref = model.getLastProjRef(); if (ref == null) return true; if (ref.getStartZ() != view.getProjectionStartZ()) return false; if (ref.getEndZ() != view.getProjectionEndZ()) return false; if (ref.getAlgorithm() != view.getProjectionType()) return false; if (ref.getStepping() != view.g... | /**
* Returns <code>true</code> if it is the same projection parameters,
* <code>false</code> otherwise.
*
* @return See above.
*/ | Returns <code>true</code> if it is the same projection parameters, <code>false</code> otherwise | isSameProjectionParam | {
"repo_name": "tp81/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerComponent.java",
"license": "gpl-2.0",
"size": 96726
} | [
"org.openmicroscopy.shoola.env.data.model.ProjectionParam"
] | import org.openmicroscopy.shoola.env.data.model.ProjectionParam; | import org.openmicroscopy.shoola.env.data.model.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 2,103,294 |
public void threadAssertSame(Object x, Object y) {
try {
assertSame(x, y);
} catch (AssertionFailedError fail) {
threadRecordFailure(fail);
throw fail;
}
} | void function(Object x, Object y) { try { assertSame(x, y); } catch (AssertionFailedError fail) { threadRecordFailure(fail); throw fail; } } | /**
* Just like assertSame(x, y), but additionally recording (using
* threadRecordFailure) any AssertionFailedError thrown, so that
* the current testcase will fail.
*/ | Just like assertSame(x, y), but additionally recording (using threadRecordFailure) any AssertionFailedError thrown, so that the current testcase will fail | threadAssertSame | {
"repo_name": "madvay/j2objc",
"path": "jre_emul/android/libcore/jsr166-tests/src/test/java/jsr166/JSR166TestCase.java",
"license": "apache-2.0",
"size": 40137
} | [
"junit.framework.AssertionFailedError"
] | import junit.framework.AssertionFailedError; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 389,628 |
public String[] getIsimImpu() {
try {
return getSubscriberInfo().getIsimImpu();
} catch (RemoteException ex) {
return null;
} catch (NullPointerException ex) {
// This could happen before phone restarts due to crashing
return null;
}
... | String[] function() { try { return getSubscriberInfo().getIsimImpu(); } catch (RemoteException ex) { return null; } catch (NullPointerException ex) { return null; } } | /**
* Returns the IMS public user identities (IMPU) that were loaded from the ISIM.
* @return an array of IMPU strings, with one IMPU per string, or null if
* not present or not loaded
* @hide
*/ | Returns the IMS public user identities (IMPU) that were loaded from the ISIM | getIsimImpu | {
"repo_name": "mateor/pdroid",
"path": "android-4.0.3_r1/trunk/frameworks/base/telephony/java/android/telephony/TelephonyManager.java",
"license": "gpl-3.0",
"size": 38219
} | [
"android.os.RemoteException"
] | import android.os.RemoteException; | import android.os.*; | [
"android.os"
] | android.os; | 1,674,934 |
private void fillingResultItem(T user, O userResource) {
userResource.setAlias(user.getAlias());
if (user.getProfile() != null) {
userResource.setFirstName(user.getProfile().getFirstName());
userResource.setLastName(user.getProfile().getLastName());
userResou... | void function(T user, O userResource) { userResource.setAlias(user.getAlias()); if (user.getProfile() != null) { userResource.setFirstName(user.getProfile().getFirstName()); userResource.setLastName(user.getProfile().getLastName()); userResource.setLastModificationDate(user.getProfile().getLastModificationDate()); user... | /**
* Filling the PostListItem
*
* @param user
* The blogListItem with tags.
* @param userResource
* The resource of an blog.
*/ | Filling the PostListItem | fillingResultItem | {
"repo_name": "Communote/communote-server",
"path": "communote/plugins/rest-api/2.2/implementation/src/main/java/com/communote/plugins/api/rest/v22/resource/user/UserResourceConverter.java",
"license": "apache-2.0",
"size": 2806
} | [
"com.communote.plugins.api.rest.v22.resource.tag.TagHelper",
"com.communote.server.api.ServiceLocator",
"com.communote.server.core.follow.FollowManagement",
"com.communote.server.model.user.UserProfile"
] | import com.communote.plugins.api.rest.v22.resource.tag.TagHelper; import com.communote.server.api.ServiceLocator; import com.communote.server.core.follow.FollowManagement; import com.communote.server.model.user.UserProfile; | import com.communote.plugins.api.rest.v22.resource.tag.*; import com.communote.server.api.*; import com.communote.server.core.follow.*; import com.communote.server.model.user.*; | [
"com.communote.plugins",
"com.communote.server"
] | com.communote.plugins; com.communote.server; | 1,918,060 |
public static TableWrapLayout createSectionClientTableWrapLayout( boolean makeColumnsEqualWidth, int numColumns ) {
TableWrapLayout layout = new TableWrapLayout();
layout.topMargin = 5;
layout.bottomMargin = 5;
layout.leftMargin = 2;
layout.rightMargin = 2;
layout.h... | static TableWrapLayout function( boolean makeColumnsEqualWidth, int numColumns ) { TableWrapLayout layout = new TableWrapLayout(); layout.topMargin = 5; layout.bottomMargin = 5; layout.leftMargin = 2; layout.rightMargin = 2; layout.horizontalSpacing = 5; layout.verticalSpacing = 5; layout.makeColumnsEqualWidth = makeCo... | /**
* Creates the TableWrapLayout used within the general section of the descriptor editor
*
* @param makeColumnsEqualWidth
* @param numColumns
* @return
*/ | Creates the TableWrapLayout used within the general section of the descriptor editor | createSectionClientTableWrapLayout | {
"repo_name": "blackberry/Eclipse-JDE",
"path": "net.rim.ejde/src/net/rim/ejde/internal/ui/editors/model/factories/LayoutFactory.java",
"license": "epl-1.0",
"size": 9048
} | [
"org.eclipse.ui.forms.widgets.TableWrapLayout"
] | import org.eclipse.ui.forms.widgets.TableWrapLayout; | import org.eclipse.ui.forms.widgets.*; | [
"org.eclipse.ui"
] | org.eclipse.ui; | 41,575 |
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case OSGiInfrastructurePackage.PROJECT: {
Project project = (Project)theEObject;
T result = caseProject(project);
if (result == null) result = defaultCase(theEObject);
return result;
}
case OSGi... | T function(int classifierID, EObject theEObject) { switch (classifierID) { case OSGiInfrastructurePackage.PROJECT: { Project project = (Project)theEObject; T result = caseProject(project); if (result == null) result = defaultCase(theEObject); return result; } case OSGiInfrastructurePackage.BUNDLE: { Bundle bundle = (Bu... | /**
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/ | Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. | doSwitch | {
"repo_name": "glefur/osgitools",
"path": "plugins/org.eclipselabs.osgitools/src-gen/org/eclipselabs/osgitools/OSGiInfrastructure/util/OSGiInfrastructureSwitch.java",
"license": "epl-1.0",
"size": 6797
} | [
"org.eclipse.emf.ecore.EObject",
"org.eclipselabs.osgitools.OSGiInfrastructure"
] | import org.eclipse.emf.ecore.EObject; import org.eclipselabs.osgitools.OSGiInfrastructure; | import org.eclipse.emf.ecore.*; import org.eclipselabs.osgitools.*; | [
"org.eclipse.emf",
"org.eclipselabs.osgitools"
] | org.eclipse.emf; org.eclipselabs.osgitools; | 2,520,852 |
public static <T> void writeArray(ObjectOutput out, T[] arr) throws IOException {
int len = arr == null ? 0 : arr.length;
out.writeInt(len);
if (arr != null && arr.length > 0)
for (T t : arr)
out.writeObject(t);
} | static <T> void function(ObjectOutput out, T[] arr) throws IOException { int len = arr == null ? 0 : arr.length; out.writeInt(len); if (arr != null && arr.length > 0) for (T t : arr) out.writeObject(t); } | /**
* Writes array to output stream.
*
* @param out Output stream.
* @param arr Array to write.
* @param <T> Array type.
* @throws IOException If failed.
*/ | Writes array to output stream | writeArray | {
"repo_name": "agoncharuk/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 289549
} | [
"java.io.IOException",
"java.io.ObjectOutput"
] | import java.io.IOException; import java.io.ObjectOutput; | import java.io.*; | [
"java.io"
] | java.io; | 1,222,195 |
public Observable<ServiceResponse<LabelExampleResponse>> addWithServiceResponseAsync(UUID appId, String versionId, ExampleLabelObject exampleLabelObject) {
if (this.client.endpoint() == null) {
throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.")... | Observable<ServiceResponse<LabelExampleResponse>> function(UUID appId, String versionId, ExampleLabelObject exampleLabelObject) { if (this.client.endpoint() == null) { throw new IllegalArgumentException(STR); } if (appId == null) { throw new IllegalArgumentException(STR); } if (versionId == null) { throw new IllegalArg... | /**
* Adds a labeled example to the application.
*
* @param appId The application ID.
* @param versionId The version ID.
* @param exampleLabelObject An example label with the expected intent and entities.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @r... | Adds a labeled example to the application | addWithServiceResponseAsync | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/cognitiveservices/ms-azure-cs-luis-authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ExamplesImpl.java",
"license": "mit",
"size": 27756
} | [
"com.microsoft.azure.cognitiveservices.language.luis.authoring.models.ExampleLabelObject",
"com.microsoft.azure.cognitiveservices.language.luis.authoring.models.LabelExampleResponse",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.ExampleLabelObject; import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.LabelExampleResponse; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 254,549 |
Calendar counter(Calendar request); | Calendar counter(Calendar request); | /**
* Counter a calendar request.
*
* @param request a calendar request to counter
* @return a calendar object validated to conform to iTIP method COUNTER
*/ | Counter a calendar request | counter | {
"repo_name": "ical4j/ical4j",
"path": "src/main/java/net/fortuna/ical4j/agent/UserAgent.java",
"license": "bsd-3-clause",
"size": 7605
} | [
"net.fortuna.ical4j.model.Calendar"
] | import net.fortuna.ical4j.model.Calendar; | import net.fortuna.ical4j.model.*; | [
"net.fortuna.ical4j"
] | net.fortuna.ical4j; | 2,702,743 |
private static Format getJdomFormat(boolean indent) {
return indent ? Format.getPrettyFormat() : Format.getRawFormat();
}
| static Format function(boolean indent) { return indent ? Format.getPrettyFormat() : Format.getRawFormat(); } | /**
* Internal function to choose a format based on a boolean flag.
*
* @param indent whether to use indented or raw format
* @return The format
*/ | Internal function to choose a format based on a boolean flag | getJdomFormat | {
"repo_name": "ewestfal/rice",
"path": "rice-middleware/core/api/src/main/java/org/kuali/rice/core/api/util/xml/XmlJotter.java",
"license": "apache-2.0",
"size": 6079
} | [
"org.jdom.output.Format"
] | import org.jdom.output.Format; | import org.jdom.output.*; | [
"org.jdom.output"
] | org.jdom.output; | 233,751 |
private String readScheduleJobReports(String scheduledJobLoc) throws JumbuneException {
// File scheduleJobLoc
String reportFolderPath = new StringBuilder(scheduledJobLoc).append(ExtendedConstants.SCHEDULING_REPORT_FOLDER).toString();
File reportFolder = new File(reportFolderPath);
Map<String, String> repor... | String function(String scheduledJobLoc) throws JumbuneException { String reportFolderPath = new StringBuilder(scheduledJobLoc).append(ExtendedConstants.SCHEDULING_REPORT_FOLDER).toString(); File reportFolder = new File(reportFolderPath); Map<String, String> reportMap = new LinkedHashMap<String, String>(); if (reportFol... | /**
* Read schedule job reports.
*
* @param scheduledJobLoc the scheduled job loc
* @return the string
* @throws JumbuneException the Jumbune exception
*/ | Read schedule job reports | readScheduleJobReports | {
"repo_name": "impetus-opensource/jumbune",
"path": "web/src/main/java/org/jumbune/web/services/ResultService.java",
"license": "lgpl-3.0",
"size": 9244
} | [
"com.google.gson.Gson",
"java.io.File",
"java.io.FileNotFoundException",
"java.io.IOException",
"java.util.LinkedHashMap",
"java.util.Map",
"org.jumbune.common.utils.ConfigurationUtil",
"org.jumbune.common.utils.ExtendedConstants",
"org.jumbune.utils.exception.ExtendedErrorCodesAndMessages",
"org.... | import com.google.gson.Gson; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.util.LinkedHashMap; import java.util.Map; import org.jumbune.common.utils.ConfigurationUtil; import org.jumbune.common.utils.ExtendedConstants; import org.jumbune.utils.exception.ExtendedError... | import com.google.gson.*; import java.io.*; import java.util.*; import org.jumbune.common.utils.*; import org.jumbune.utils.exception.*; import org.jumbune.web.utils.*; | [
"com.google.gson",
"java.io",
"java.util",
"org.jumbune.common",
"org.jumbune.utils",
"org.jumbune.web"
] | com.google.gson; java.io; java.util; org.jumbune.common; org.jumbune.utils; org.jumbune.web; | 1,119,471 |
public YangString getRefSubentityInfoValue() throws JNCException {
return (YangString)getValue("ref-subentity-info");
} | YangString function() throws JNCException { return (YangString)getValue(STR); } | /**
* Gets the value for child leaf "ref-subentity-info".
* @return The value of the leaf.
*/ | Gets the value for child leaf "ref-subentity-info" | getRefSubentityInfoValue | {
"repo_name": "jnpr-shinma/yangfile",
"path": "hitel/src/hctaEpc/mmeSgsn/statistics/slg/Sc.java",
"license": "apache-2.0",
"size": 11276
} | [
"com.tailf.jnc.YangString"
] | import com.tailf.jnc.YangString; | import com.tailf.jnc.*; | [
"com.tailf.jnc"
] | com.tailf.jnc; | 1,250,147 |
protected ICacheEvent<ICacheElement<K, V>> createICacheEvent( ICacheElement<K, V> item, long requesterId, String eventName )
{
if ( cacheEventLogger == null )
{
return new CacheEvent<ICacheElement<K, V>>();
}
String ipAddress = getExtraInfoForRequesterId( reques... | ICacheEvent<ICacheElement<K, V>> function( ICacheElement<K, V> item, long requesterId, String eventName ) { if ( cacheEventLogger == null ) { return new CacheEvent<ICacheElement<K, V>>(); } String ipAddress = getExtraInfoForRequesterId( requesterId ); return cacheEventLogger.createICacheEvent( getEventLogSourceName(), ... | /**
* Logs an event if an event logger is configured.
* <p>
* @param item
* @param requesterId
* @param eventName
* @return ICacheEvent
*/ | Logs an event if an event logger is configured. | createICacheEvent | {
"repo_name": "tikue/jcs2-snapshot",
"path": "src/java/org/apache/commons/jcs/auxiliary/remote/http/server/AbstractRemoteCacheService.java",
"license": "apache-2.0",
"size": 17602
} | [
"org.apache.commons.jcs.engine.behavior.ICacheElement",
"org.apache.commons.jcs.engine.logging.CacheEvent",
"org.apache.commons.jcs.engine.logging.behavior.ICacheEvent"
] | import org.apache.commons.jcs.engine.behavior.ICacheElement; import org.apache.commons.jcs.engine.logging.CacheEvent; import org.apache.commons.jcs.engine.logging.behavior.ICacheEvent; | import org.apache.commons.jcs.engine.behavior.*; import org.apache.commons.jcs.engine.logging.*; import org.apache.commons.jcs.engine.logging.behavior.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,730,527 |
@Override
default void buildVarSymbolic(XVarSymbolic x, String[] values) {
unimplementedCase(x.id);
} | default void buildVarSymbolic(XVarSymbolic x, String[] values) { unimplementedCase(x.id); } | /**********************************************************************************************
* Methods to be implemented on symbolic variables/constraints
*********************************************************************************************/ | Methods to be implemented on symbolic variables/constraints | buildVarSymbolic | {
"repo_name": "xcsp3team/XCSP3-Java-Parser",
"path": "src/main/java/org/xcsp/parser/callbacks/XCallbacks2.java",
"license": "mit",
"size": 22164
} | [
"org.xcsp.parser.entries.XVariables"
] | import org.xcsp.parser.entries.XVariables; | import org.xcsp.parser.entries.*; | [
"org.xcsp.parser"
] | org.xcsp.parser; | 2,844,498 |
public Map<Object,Long> getActionCostsOfSequentialState( Map<Term,List<Term>> sSeq ) {
Map<Object,Long> cost = new HashMap<Object, Long>();
for ( Map<Term,Term> s : SequentialStateFunctions.getAllStateCombos(sSeq) ) {
StopWatch.start("Action Costs");
Map<Object,Long> s_cost = this.getActionCosts(s);
... | Map<Object,Long> function( Map<Term,List<Term>> sSeq ) { Map<Object,Long> cost = new HashMap<Object, Long>(); for ( Map<Term,Term> s : SequentialStateFunctions.getAllStateCombos(sSeq) ) { StopWatch.start(STR); Map<Object,Long> s_cost = this.getActionCosts(s); for ( Object key : s_cost.keySet() ) { Long c = s_cost.get(k... | /**
* Get cost map of a sequential state by taking the minimal costs of all combinations
* of regular states.
* @param sSeq A sequential state.
* @return A map from {@link Object}s ({@link Term} action names or Entry<Atomic,Term> state value pairs) to {@link Long} costs
*/ | Get cost map of a sequential state by taking the minimal costs of all combinations of regular states | getActionCostsOfSequentialState | {
"repo_name": "Ewulution/SpiderPlan",
"path": "src/main/java/org/spiderplan/causal/forwardPlanning/CommonDataStructures.java",
"license": "mit",
"size": 6072
} | [
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.spiderplan.representation.logic.Term",
"org.spiderplan.tools.stopWatch.StopWatch"
] | import java.util.HashMap; import java.util.List; import java.util.Map; import org.spiderplan.representation.logic.Term; import org.spiderplan.tools.stopWatch.StopWatch; | import java.util.*; import org.spiderplan.representation.logic.*; import org.spiderplan.tools.*; | [
"java.util",
"org.spiderplan.representation",
"org.spiderplan.tools"
] | java.util; org.spiderplan.representation; org.spiderplan.tools; | 665,614 |
public RoleDescriptor getRoleGrantDescriptor(String roleName,
String grantee,
String grantor)
throws StandardException; | RoleDescriptor function(String roleName, String grantee, String grantor) throws StandardException; | /**
* Get a role descriptor for a role grant
*
* @param roleName The name of the role whose definition we seek
* @param grantee The grantee
* @param grantor The grantor
*
* @throws StandardException error
*/ | Get a role descriptor for a role grant | getRoleGrantDescriptor | {
"repo_name": "SnappyDataInc/snappy-store",
"path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/iapi/sql/dictionary/DataDictionary.java",
"license": "apache-2.0",
"size": 74186
} | [
"com.pivotal.gemfirexd.internal.iapi.error.StandardException"
] | import com.pivotal.gemfirexd.internal.iapi.error.StandardException; | import com.pivotal.gemfirexd.internal.iapi.error.*; | [
"com.pivotal.gemfirexd"
] | com.pivotal.gemfirexd; | 307,336 |
public String processPermissions() {
ExternalContext context = FacesContext.getCurrentInstance().getExternalContext();
ToolSession toolSession = SessionManager.getCurrentToolSession();
try {
String url = "sakai.permissions.helper.helper/tool?session." +
PermissionsHelper.DESCRIPTION + "="... | String function() { ExternalContext context = FacesContext.getCurrentInstance().getExternalContext(); ToolSession toolSession = SessionManager.getCurrentToolSession(); try { String url = STR + PermissionsHelper.DESCRIPTION + "=" + getPermissionsMessage() + STR + PermissionsHelper.TARGET_REF + "=" + podcastService.getPo... | /**
* Constructs call to permissions helper and redirects to it to display
* Podcasts folder permissions page.
*/ | Constructs call to permissions helper and redirects to it to display Podcasts folder permissions page | processPermissions | {
"repo_name": "eemirtekin/Sakai-10.6-TR",
"path": "podcasts/podcasts-app/src/java/org/sakaiproject/tool/podcasts/podHomeBean.java",
"license": "apache-2.0",
"size": 60234
} | [
"java.io.IOException",
"java.util.HashMap",
"java.util.Iterator",
"java.util.Map",
"javax.faces.context.ExternalContext",
"javax.faces.context.FacesContext",
"org.sakaiproject.authz.api.PermissionsHelper",
"org.sakaiproject.tool.api.ToolSession",
"org.sakaiproject.tool.cover.SessionManager",
"org.... | import java.io.IOException; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import javax.faces.context.ExternalContext; import javax.faces.context.FacesContext; import org.sakaiproject.authz.api.PermissionsHelper; import org.sakaiproject.tool.api.ToolSession; import org.sakaiproject.tool.cove... | import java.io.*; import java.util.*; import javax.faces.context.*; import org.sakaiproject.authz.api.*; import org.sakaiproject.tool.api.*; import org.sakaiproject.tool.cover.*; import org.sakaiproject.util.*; | [
"java.io",
"java.util",
"javax.faces",
"org.sakaiproject.authz",
"org.sakaiproject.tool",
"org.sakaiproject.util"
] | java.io; java.util; javax.faces; org.sakaiproject.authz; org.sakaiproject.tool; org.sakaiproject.util; | 51,838 |
protected void createMBeans() {
try {
MBeanFactory factory = new MBeanFactory();
createMBeans(factory);
createMBeans(ServerFactory.getServer());
} catch (MBeanException t) {
Exception e = t.getTargetException();
if (e == null)
... | void function() { try { MBeanFactory factory = new MBeanFactory(); createMBeans(factory); createMBeans(ServerFactory.getServer()); } catch (MBeanException t) { Exception e = t.getTargetException(); if (e == null) e = t; log.error(STR, e); } catch (Throwable t) { log.error(STR, t); } } | /**
* Create the MBeans that correspond to every existing node of our tree.
*/ | Create the MBeans that correspond to every existing node of our tree | createMBeans | {
"repo_name": "plumer/codana",
"path": "tomcat_files/6.0.0/ServerLifecycleListener.java",
"license": "mit",
"size": 49088
} | [
"javax.management.MBeanException",
"org.apache.catalina.ServerFactory"
] | import javax.management.MBeanException; import org.apache.catalina.ServerFactory; | import javax.management.*; import org.apache.catalina.*; | [
"javax.management",
"org.apache.catalina"
] | javax.management; org.apache.catalina; | 2,563,184 |
public void createImage(OutputStream stream, int format) {
SWTGraphics g = null;
GC gc = null;
Image image = null;
LayerManager layerManager = (LayerManager)
getGraphicalViewer().getEditPartRegistry().get(LayerManager.ID);
IFigure figure = layerManager.getLayer(La... | void function(OutputStream stream, int format) { SWTGraphics g = null; GC gc = null; Image image = null; LayerManager layerManager = (LayerManager) getGraphicalViewer().getEditPartRegistry().get(LayerManager.ID); IFigure figure = layerManager.getLayer(LayerConstants.PRINTABLE_LAYERS); Rectangle r = figure.getBounds(); ... | /**
* Writes the content of this editor to the given stream.
* Possible formats are for example SWT.IMAGE_BMP, IMAGE_GIF,
* IMAGE_JPEG, IMAGE_PNG.
* @param stream
* @param format
*/ | Writes the content of this editor to the given stream. Possible formats are for example SWT.IMAGE_BMP, IMAGE_GIF, IMAGE_JPEG, IMAGE_PNG | createImage | {
"repo_name": "droolsjbpm/droolsjbpm-tools",
"path": "drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/flow/common/editor/GenericModelEditor.java",
"license": "apache-2.0",
"size": 14172
} | [
"java.io.OutputStream",
"org.drools.eclipse.DroolsEclipsePlugin",
"org.eclipse.draw2d.IFigure",
"org.eclipse.draw2d.SWTGraphics",
"org.eclipse.draw2d.geometry.Rectangle",
"org.eclipse.gef.LayerConstants",
"org.eclipse.gef.editparts.LayerManager",
"org.eclipse.swt.graphics.Image",
"org.eclipse.swt.gr... | import java.io.OutputStream; import org.drools.eclipse.DroolsEclipsePlugin; import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.SWTGraphics; import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.gef.LayerConstants; import org.eclipse.gef.editparts.LayerManager; import org.eclipse.swt.graphics.Image;... | import java.io.*; import org.drools.eclipse.*; import org.eclipse.draw2d.*; import org.eclipse.draw2d.geometry.*; import org.eclipse.gef.*; import org.eclipse.gef.editparts.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*; | [
"java.io",
"org.drools.eclipse",
"org.eclipse.draw2d",
"org.eclipse.gef",
"org.eclipse.swt"
] | java.io; org.drools.eclipse; org.eclipse.draw2d; org.eclipse.gef; org.eclipse.swt; | 2,440,750 |
@Override
public Condition createCondition(IXMLElement condition)
{
String id = condition.getAttribute("id");
String type = condition.getAttribute("type");
Condition result = null;
if (type != null)
{
String className = getClassName(type);
Clas... | Condition function(IXMLElement condition) { String id = condition.getAttribute("id"); String type = condition.getAttribute("type"); Condition result = null; if (type != null) { String className = getClassName(type); Class<Condition> conditionClass = container.getClass(className, Condition.class); try { if (id == null i... | /**
* Creates a condition given its XML specification.
*
* @param condition the condition XML specification
* @return a new condition
*/ | Creates a condition given its XML specification | createCondition | {
"repo_name": "mtjandra/izpack",
"path": "izpack-core/src/main/java/com/izforge/izpack/core/rules/RulesEngineImpl.java",
"license": "apache-2.0",
"size": 33690
} | [
"com.izforge.izpack.api.adaptator.IXMLElement",
"com.izforge.izpack.api.exception.IzPackException",
"com.izforge.izpack.api.rules.Condition",
"com.izforge.izpack.api.rules.ConditionReference",
"java.util.UUID"
] | import com.izforge.izpack.api.adaptator.IXMLElement; import com.izforge.izpack.api.exception.IzPackException; import com.izforge.izpack.api.rules.Condition; import com.izforge.izpack.api.rules.ConditionReference; import java.util.UUID; | import com.izforge.izpack.api.adaptator.*; import com.izforge.izpack.api.exception.*; import com.izforge.izpack.api.rules.*; import java.util.*; | [
"com.izforge.izpack",
"java.util"
] | com.izforge.izpack; java.util; | 272,032 |
public static void truncateBlocking(String keyspace, String cfname) throws UnavailableException, TimeoutException, IOException
{
logger.debug("Starting a blocking truncate operation on keyspace {}, CF {}", keyspace, cfname);
if (isAnyStorageHostDown())
{
logger.info("Cannot p... | static void function(String keyspace, String cfname) throws UnavailableException, TimeoutException, IOException { logger.debug(STR, keyspace, cfname); if (isAnyStorageHostDown()) { logger.info(STR); int liveMembers = Gossiper.instance.getLiveMembers().size(); throw new UnavailableException(ConsistencyLevel.ALL, liveMem... | /**
* Performs the truncate operatoin, which effectively deletes all data from
* the column family cfname
* @param keyspace
* @param cfname
* @throws UnavailableException If some of the hosts in the ring are down.
* @throws TimeoutException
* @throws IOException
*/ | Performs the truncate operatoin, which effectively deletes all data from the column family cfname | truncateBlocking | {
"repo_name": "guanxi55nba/key-value-store",
"path": "src/java/org/apache/cassandra/service/StorageProxy.java",
"license": "apache-2.0",
"size": 106025
} | [
"java.io.IOException",
"java.net.InetAddress",
"java.util.Set",
"java.util.concurrent.TimeoutException",
"org.apache.cassandra.db.ConsistencyLevel",
"org.apache.cassandra.db.Truncation",
"org.apache.cassandra.exceptions.UnavailableException",
"org.apache.cassandra.gms.Gossiper",
"org.apache.cassandr... | import java.io.IOException; import java.net.InetAddress; import java.util.Set; import java.util.concurrent.TimeoutException; import org.apache.cassandra.db.ConsistencyLevel; import org.apache.cassandra.db.Truncation; import org.apache.cassandra.exceptions.UnavailableException; import org.apache.cassandra.gms.Gossiper; ... | import java.io.*; import java.net.*; import java.util.*; import java.util.concurrent.*; import org.apache.cassandra.db.*; import org.apache.cassandra.exceptions.*; import org.apache.cassandra.gms.*; import org.apache.cassandra.net.*; import org.apache.cassandra.tracing.*; | [
"java.io",
"java.net",
"java.util",
"org.apache.cassandra"
] | java.io; java.net; java.util; org.apache.cassandra; | 2,116,249 |
public void testCompileFailuresNotInCache() throws SQLException
{
String schema = this.getTestConfiguration().getUserName();
// Parse error
String sql = "TO BE OR NOT TO BE";
assertCompileError("42X01", sql);
assertFalse(sql, isPlanInCache(schema, sql));
... | void function() throws SQLException { String schema = this.getTestConfiguration().getUserName(); String sql = STR; assertCompileError("42X01", sql); assertFalse(sql, isPlanInCache(schema, sql)); sql = STR; assertCompileError("42X01", sql); assertFalse(sql, isPlanInCache(schema, sql)); sql = STR; assertCompileError("42X... | /**
* Test that statements that fail to compile do not end up in the cache.
*/ | Test that statements that fail to compile do not end up in the cache | testCompileFailuresNotInCache | {
"repo_name": "apache/derby",
"path": "java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/lang/StatementPlanCacheTest.java",
"license": "apache-2.0",
"size": 11805
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,953,048 |
public List<byte[]> getMetaTableRows() throws IOException {
// TODO: Redo using MetaReader class
HTable t = new HTable(new Configuration(this.conf), HConstants.META_TABLE_NAME);
List<byte[]> rows = new ArrayList<byte[]>();
ResultScanner s = t.getScanner(new Scan());
for (Result result : s) {
... | List<byte[]> function() throws IOException { HTable t = new HTable(new Configuration(this.conf), HConstants.META_TABLE_NAME); List<byte[]> rows = new ArrayList<byte[]>(); ResultScanner s = t.getScanner(new Scan()); for (Result result : s) { LOG.info(STR + Bytes.toStringBinary(result.getRow())); rows.add(result.getRow()... | /**
* Returns all rows from the .META. table.
*
* @throws IOException When reading the rows fails.
*/ | Returns all rows from the .META. table | getMetaTableRows | {
"repo_name": "ay65535/hbase-0.94.0",
"path": "src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java",
"license": "apache-2.0",
"size": 65900
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.client.HTable",
"org.apache.hadoop.hbase.client.Result",
"org.apache.hadoop.hbase.client.ResultScanner",
"org.apache.hadoop.hbase.client.Scan",
"org.apache.hadoop.hbase.ut... | import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.ResultScanner; import org.apache.hadoop.hbase.client.Scan; import ... | import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,359,100 |
@Test
public void testSuggestUnfavoredChecksumAlgorithm() {
final List<ChecksumAlgorithm> configured = this.tmri.listChecksumAlgorithms(curr);
final ChecksumAlgorithm unfavored = configured.get(configured.size() - 1);
final String unfavoredName = ChecksumAlgorithmMapper.CHECKSUM_ALGORITH... | void function() { final List<ChecksumAlgorithm> configured = this.tmri.listChecksumAlgorithms(curr); final ChecksumAlgorithm unfavored = configured.get(configured.size() - 1); final String unfavoredName = ChecksumAlgorithmMapper.CHECKSUM_ALGORITHM_NAMER.apply(unfavored); ChecksumAlgorithm suggestion; String suggestionN... | /**
* Test that the server does suggest a less-preferred checksum algorithm if the client does not support the preferred.
*/ | Test that the server does suggest a less-preferred checksum algorithm if the client does not support the preferred | testSuggestUnfavoredChecksumAlgorithm | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/blitz/test/ome/services/blitz/test/utests/ManagedRepositoryITest.java",
"license": "gpl-2.0",
"size": 12596
} | [
"java.util.Collections",
"java.util.List",
"junit.framework.Assert"
] | import java.util.Collections; import java.util.List; import junit.framework.Assert; | import java.util.*; import junit.framework.*; | [
"java.util",
"junit.framework"
] | java.util; junit.framework; | 2,053,710 |
@Override
public void uploadJobFiles(CloudFileOwner job, File[] files) throws PortalServiceException {
String arn = job.getProperty(CloudJob.PROPERTY_STS_ARN);
String clientSecret = job.getProperty(CloudJob.PROPERTY_CLIENT_SECRET);
try {
BlobStore bs = getBlobStore(arn, clie... | void function(CloudFileOwner job, File[] files) throws PortalServiceException { String arn = job.getProperty(CloudJob.PROPERTY_STS_ARN); String clientSecret = job.getProperty(CloudJob.PROPERTY_CLIENT_SECRET); try { BlobStore bs = getBlobStore(arn, clientSecret); String bucketName = getBucket(job); bs.createContainerInL... | /**
* Uploads an array of local files into the specified job's storage space
*
* @param job
* The job whose storage space will be used
* @param files
* The local files to upload
* @throws PortalServiceException
*/ | Uploads an array of local files into the specified job's storage space | uploadJobFiles | {
"repo_name": "joshvote/portal-core",
"path": "src/main/java/org/auscope/portal/core/services/cloud/CloudStorageServiceJClouds.java",
"license": "gpl-3.0",
"size": 21242
} | [
"com.google.common.io.Files",
"java.io.File",
"org.auscope.portal.core.cloud.CloudFileOwner",
"org.auscope.portal.core.cloud.CloudJob",
"org.auscope.portal.core.services.PortalServiceException",
"org.jclouds.blobstore.BlobStore",
"org.jclouds.blobstore.KeyNotFoundException",
"org.jclouds.blobstore.dom... | import com.google.common.io.Files; import java.io.File; import org.auscope.portal.core.cloud.CloudFileOwner; import org.auscope.portal.core.cloud.CloudJob; import org.auscope.portal.core.services.PortalServiceException; import org.jclouds.blobstore.BlobStore; import org.jclouds.blobstore.KeyNotFoundException; import or... | import com.google.common.io.*; import java.io.*; import org.auscope.portal.core.cloud.*; import org.auscope.portal.core.services.*; import org.jclouds.blobstore.*; import org.jclouds.blobstore.domain.*; import org.jclouds.rest.*; | [
"com.google.common",
"java.io",
"org.auscope.portal",
"org.jclouds.blobstore",
"org.jclouds.rest"
] | com.google.common; java.io; org.auscope.portal; org.jclouds.blobstore; org.jclouds.rest; | 2,655,482 |
private BigDecimal mean(List<BigDecimal> list, MathContext mc) {
BigDecimal sum = new BigDecimal(0.0);
for(BigDecimal bd : list) {
sum = sum.add(bd);
}
return sum.divide(new BigDecimal(list.size()), mc);
} | BigDecimal function(List<BigDecimal> list, MathContext mc) { BigDecimal sum = new BigDecimal(0.0); for(BigDecimal bd : list) { sum = sum.add(bd); } return sum.divide(new BigDecimal(list.size()), mc); } | /**
* Calculates the mean.
* @param List<BigDecimal> the list
* @param MathContext the math context
* @return the result
*/ | Calculates the mean | mean | {
"repo_name": "jessemull/MicroFlex",
"path": "src/main/java/com/github/jessemull/microflex/bigdecimalflex/stat/SampleStandardDeviationBigDecimal.java",
"license": "apache-2.0",
"size": 6330
} | [
"java.math.BigDecimal",
"java.math.MathContext",
"java.util.List"
] | import java.math.BigDecimal; import java.math.MathContext; import java.util.List; | import java.math.*; import java.util.*; | [
"java.math",
"java.util"
] | java.math; java.util; | 2,841,068 |
@Override
protected Chunk handleEmptyWrite(ChunkKey key) {
return getEmptyChunk(key);
} | Chunk function(ChunkKey key) { return getEmptyChunk(key); } | /**
* {@inheritDoc} This cache style actually provides an empty chunk.
*/ | This cache style actually provides an empty chunk | handleEmptyWrite | {
"repo_name": "NBJack/Infinimapper",
"path": "src/org/rpl/infinimapper/data/management/ChunkCache.java",
"license": "gpl-2.0",
"size": 1558
} | [
"org.rpl.infinimapper.data.Chunk",
"org.rpl.infinimapper.data.ChunkKey"
] | import org.rpl.infinimapper.data.Chunk; import org.rpl.infinimapper.data.ChunkKey; | import org.rpl.infinimapper.data.*; | [
"org.rpl.infinimapper"
] | org.rpl.infinimapper; | 407,561 |
public static boolean validateReadParams(final int flags, final List<CigarElement> cigarList, final int end,
final int start) {
return !checkFlag(flags, SAMFlag.READ_UNMAPPED.intValue()) && !cigarList.isEmpty() && end > start;
} | static boolean function(final int flags, final List<CigarElement> cigarList, final int end, final int start) { return !checkFlag(flags, SAMFlag.READ_UNMAPPED.intValue()) && !cigarList.isEmpty() && end > start; } | /**
* Checks if Read parameters are valid
* @param flags flags to check
* @param cigarList List of {@link CigarElement} to check
* @param end end of the Read
* @param start start of the Read
* @return true if read parameters are valid
*/ | Checks if Read parameters are valid | validateReadParams | {
"repo_name": "epam/NGB",
"path": "server/catgenome/src/main/java/com/epam/catgenome/util/BamUtil.java",
"license": "mit",
"size": 10506
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,256,149 |
public Map<Integer, Map<I, VertexMutations<I, V, E, M>>>
removeAllPartitionMutations() {
Map<Integer, Map<I, VertexMutations<I, V, E, M>>> allMutations =
mutationCache;
mutationCache =
new HashMap<Integer, Map<I, VertexMutations<I, V, E, M>>>();
mutationCountMap.clear();
return allMu... | Map<Integer, Map<I, VertexMutations<I, V, E, M>>> function() { Map<Integer, Map<I, VertexMutations<I, V, E, M>>> allMutations = mutationCache; mutationCache = new HashMap<Integer, Map<I, VertexMutations<I, V, E, M>>>(); mutationCountMap.clear(); return allMutations; } | /**
* Gets all the mutations and removes them from the cache.
*
* @return All vertex mutations for all partitions
*/ | Gets all the mutations and removes them from the cache | removeAllPartitionMutations | {
"repo_name": "LiuJianan/giraphpp-1",
"path": "target/munged/main/org/apache/giraph/comm/SendMutationsCache.java",
"license": "apache-2.0",
"size": 6646
} | [
"java.util.HashMap",
"java.util.Map",
"org.apache.giraph.graph.VertexMutations"
] | import java.util.HashMap; import java.util.Map; import org.apache.giraph.graph.VertexMutations; | import java.util.*; import org.apache.giraph.graph.*; | [
"java.util",
"org.apache.giraph"
] | java.util; org.apache.giraph; | 1,671,584 |
public static TRSRTransformation blockCenterToCorner(TRSRTransformation transform)
{
Matrix4f ret = new Matrix4f(transform.getMatrix()), tmp = new Matrix4f();
tmp.setIdentity();
tmp.m03 = tmp.m13 = tmp.m23 = .5f;
ret.mul(tmp, ret);
tmp.m03 = tmp.m13 = tmp.m23 = -.5f;
... | static TRSRTransformation function(TRSRTransformation transform) { Matrix4f ret = new Matrix4f(transform.getMatrix()), tmp = new Matrix4f(); tmp.setIdentity(); tmp.m03 = tmp.m13 = tmp.m23 = .5f; ret.mul(tmp, ret); tmp.m03 = tmp.m13 = tmp.m23 = -.5f; ret.mul(tmp); return new TRSRTransformation(ret); } | /**
* convert transformation from assuming center-block system to corner-block system
*/ | convert transformation from assuming center-block system to corner-block system | blockCenterToCorner | {
"repo_name": "karlthepagan/MinecraftForge",
"path": "src/main/java/net/minecraftforge/client/model/TRSRTransformation.java",
"license": "lgpl-2.1",
"size": 16590
} | [
"javax.vecmath.Matrix4f"
] | import javax.vecmath.Matrix4f; | import javax.vecmath.*; | [
"javax.vecmath"
] | javax.vecmath; | 2,178,929 |
public void test_005_builtinAggregators()
throws Exception
{
Connection dboConnection = openUserConnection( TEST_DBO );
Connection ruthConnection = openUserConnection( RUTH );
createSchema_005( ruthConnection );
vetStatsBuiltins_005( dboConnection );
vetSt... | void function() throws Exception { Connection dboConnection = openUserConnection( TEST_DBO ); Connection ruthConnection = openUserConnection( RUTH ); createSchema_005( ruthConnection ); vetStatsBuiltins_005( dboConnection ); vetStatsBuiltins_005( ruthConnection ); dropSchema_005( ruthConnection ); } | /**
* <p>
* Test that anyone can run the modern, builtin system aggregates
* which implement org.apache.derby.agg.Aggregator.
* </p>
*/ | Test that anyone can run the modern, builtin system aggregates which implement org.apache.derby.agg.Aggregator. | test_005_builtinAggregators | {
"repo_name": "apache/derby",
"path": "java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/lang/UDAPermsTest.java",
"license": "apache-2.0",
"size": 21346
} | [
"java.sql.Connection"
] | import java.sql.Connection; | import java.sql.*; | [
"java.sql"
] | java.sql; | 207,641 |
Repository repository = new DictionaryRepository();
IndexingConnector connector = new FullTraversalConnector(repository);
IndexingApplication application = new IndexingApplication.Builder(connector, args).build();
application.start();
}
public static class DictionaryRepository implements Repository ... | Repository repository = new DictionaryRepository(); IndexingConnector connector = new FullTraversalConnector(repository); IndexingApplication application = new IndexingApplication.Builder(connector, args).build(); application.start(); } public static class DictionaryRepository implements Repository { private static fin... | /**
* This sample connector uses the Cloud Search SDK template class for a full
* traversal connector.
*
* @param args program command line arguments
* @throws InterruptedException thrown if an abort is issued during initialization
*/ | This sample connector uses the Cloud Search SDK template class for a full traversal connector | main | {
"repo_name": "gsuitedevs/cloud-search-samples",
"path": "indexing/connector/sdk/dictionary-connector/src/main/java/com/google/cloudsearch/samples/DictionaryConnector.java",
"license": "apache-2.0",
"size": 9961
} | [
"com.google.common.collect.ImmutableList",
"com.google.enterprise.cloudsearch.sdk.indexing.Acl",
"com.google.enterprise.cloudsearch.sdk.indexing.IndexingApplication",
"com.google.enterprise.cloudsearch.sdk.indexing.IndexingConnector",
"com.google.enterprise.cloudsearch.sdk.indexing.template.FullTraversalCon... | import com.google.common.collect.ImmutableList; import com.google.enterprise.cloudsearch.sdk.indexing.Acl; import com.google.enterprise.cloudsearch.sdk.indexing.IndexingApplication; import com.google.enterprise.cloudsearch.sdk.indexing.IndexingConnector; import com.google.enterprise.cloudsearch.sdk.indexing.template.Fu... | import com.google.common.collect.*; import com.google.enterprise.cloudsearch.sdk.indexing.*; import com.google.enterprise.cloudsearch.sdk.indexing.template.*; import java.util.logging.*; | [
"com.google.common",
"com.google.enterprise",
"java.util"
] | com.google.common; com.google.enterprise; java.util; | 2,197,266 |
public Path getApplicationWorkdir() {
return applicationWorkdir;
} | Path function() { return applicationWorkdir; } | /**
* Returns the main application working directory in which all mirror working directories are contained.
*/ | Returns the main application working directory in which all mirror working directories are contained | getApplicationWorkdir | {
"repo_name": "reflectoring/gitanizer",
"path": "src/main/java/org/wickedsource/gitanizer/core/WorkdirConfiguration.java",
"license": "mit",
"size": 2734
} | [
"java.nio.file.Path"
] | import java.nio.file.Path; | import java.nio.file.*; | [
"java.nio"
] | java.nio; | 1,647,354 |
public static Class[] excludeClassesWithModifier(Class[] classes, int modifier) {
if (ObjectUtils.isEmpty(classes))
return new Class[0];
Set clazzes = new LinkedHashSet(classes.length);
for (int i = 0; i < classes.length; i++) {
if ((modifier & classes[i].getModifiers()) == 0)
clazzes.add(c... | static Class[] function(Class[] classes, int modifier) { if (ObjectUtils.isEmpty(classes)) return new Class[0]; Set clazzes = new LinkedHashSet(classes.length); for (int i = 0; i < classes.length; i++) { if ((modifier & classes[i].getModifiers()) == 0) clazzes.add(classes[i]); } return (Class[]) clazzes.toArray(new Cla... | /**
* Exclude classes from the given array, which match the given modifier.
*
* @see Modifier
*
* @param classes array of classes (can be null)
* @param modifier class modifier
* @return array of classes (w/o duplicates) which does not have the given
* modifier
*/ | Exclude classes from the given array, which match the given modifier | excludeClassesWithModifier | {
"repo_name": "BeamFoundry/spring-osgi",
"path": "spring-dm/core/src/main/java/org/springframework/osgi/util/internal/ClassUtils.java",
"license": "apache-2.0",
"size": 19005
} | [
"java.util.LinkedHashSet",
"java.util.Set",
"org.springframework.util.ObjectUtils"
] | import java.util.LinkedHashSet; import java.util.Set; import org.springframework.util.ObjectUtils; | import java.util.*; import org.springframework.util.*; | [
"java.util",
"org.springframework.util"
] | java.util; org.springframework.util; | 2,607,840 |
public ReleaseApproval getApproval(
final UUID project,
final int approvalId,
final Boolean includeHistory) {
final UUID locationId = UUID.fromString("9328e074-59fb-465a-89d9-b09c82ee5109"); //$NON-NLS-1$
final ApiResourceVersion apiVersion = new ApiResourceVersion("3.1-p... | ReleaseApproval function( final UUID project, final int approvalId, final Boolean includeHistory) { final UUID locationId = UUID.fromString(STR); final ApiResourceVersion apiVersion = new ApiResourceVersion(STR); final Map<String, Object> routeValues = new HashMap<String, Object>(); routeValues.put(STR, project); route... | /**
* [Preview API 3.1-preview.1]
*
* @param project
* Project ID
* @param approvalId
*
* @param includeHistory
*
* @return ReleaseApproval
*/ | [Preview API 3.1-preview.1] | getApproval | {
"repo_name": "Microsoft/vso-httpclient-java",
"path": "Rest/alm-releasemanagement-client/src/main/generated/com/microsoft/alm/visualstudio/services/releasemanagement/webapi/ReleaseHttpClientBase.java",
"license": "mit",
"size": 186198
} | [
"com.microsoft.alm.client.HttpMethod",
"com.microsoft.alm.client.VssMediaTypes",
"com.microsoft.alm.client.VssRestRequest",
"com.microsoft.alm.client.model.NameValueCollection",
"com.microsoft.alm.visualstudio.services.releasemanagement.webapi.ReleaseApproval",
"com.microsoft.alm.visualstudio.services.web... | import com.microsoft.alm.client.HttpMethod; import com.microsoft.alm.client.VssMediaTypes; import com.microsoft.alm.client.VssRestRequest; import com.microsoft.alm.client.model.NameValueCollection; import com.microsoft.alm.visualstudio.services.releasemanagement.webapi.ReleaseApproval; import com.microsoft.alm.visualst... | import com.microsoft.alm.client.*; import com.microsoft.alm.client.model.*; import com.microsoft.alm.visualstudio.services.releasemanagement.webapi.*; import com.microsoft.alm.visualstudio.services.webapi.*; import java.util.*; | [
"com.microsoft.alm",
"java.util"
] | com.microsoft.alm; java.util; | 321,800 |
//-------------------------------------------------------------------------
public IborCapletFloorletPeriodAmounts impliedVolatilities(
ResolvedIborCapFloor capFloor,
RatesProvider ratesProvider,
IborCapletFloorletVolatilities volatilities) {
return capFloorLegPricer.impliedVolatilities(capF... | IborCapletFloorletPeriodAmounts function( ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities) { return capFloorLegPricer.impliedVolatilities(capFloor.getCapFloorLeg(), ratesProvider, volatilities); } | /**
* Calculates the implied volatilities for each caplet/floorlet of the Ibor cap/floor.
*
* @param capFloor the Ibor cap/floor
* @param ratesProvider the rates provider
* @param volatilities the volatilities
* @return the implied volatilities
*/ | Calculates the implied volatilities for each caplet/floorlet of the Ibor cap/floor | impliedVolatilities | {
"repo_name": "OpenGamma/Strata",
"path": "modules/pricer/src/main/java/com/opengamma/strata/pricer/capfloor/VolatilityIborCapFloorProductPricer.java",
"license": "apache-2.0",
"size": 12155
} | [
"com.opengamma.strata.pricer.rate.RatesProvider",
"com.opengamma.strata.product.capfloor.ResolvedIborCapFloor"
] | import com.opengamma.strata.pricer.rate.RatesProvider; import com.opengamma.strata.product.capfloor.ResolvedIborCapFloor; | import com.opengamma.strata.pricer.rate.*; import com.opengamma.strata.product.capfloor.*; | [
"com.opengamma.strata"
] | com.opengamma.strata; | 2,492,046 |
public void addJarfileset(FileSet fs) {
mJarFileSets.add(fs);
} | void function(FileSet fs) { mJarFileSets.add(fs); } | /***************************************************************************
* Nested tasks - derived from FileList and FileSet
**************************************************************************/ | Nested tasks - derived from FileList and FileSet | addJarfileset | {
"repo_name": "humandoing/JarIndexer",
"path": "resources/jarbundler-1.9/src/net/sourceforge/jarbundler/JarBundler.java",
"license": "bsd-3-clause",
"size": 44012
} | [
"org.apache.tools.ant.types.FileSet"
] | import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.*; | [
"org.apache.tools"
] | org.apache.tools; | 79,979 |
Builder mapOfEnumToMapOfStringToEnumWithStrings(Map<String, ? extends Map<String, String>> mapOfEnumToMapOfStringToEnum); | Builder mapOfEnumToMapOfStringToEnumWithStrings(Map<String, ? extends Map<String, String>> mapOfEnumToMapOfStringToEnum); | /**
* Sets the value of the MapOfEnumToMapOfStringToEnum property for this object.
*
* @param mapOfEnumToMapOfStringToEnum
* The new value for the MapOfEnumToMapOfStringToEnum property for this object.
* @return Returns a reference to this object so that method calls ... | Sets the value of the MapOfEnumToMapOfStringToEnum property for this object | mapOfEnumToMapOfStringToEnumWithStrings | {
"repo_name": "aws/aws-sdk-java-v2",
"path": "codegen/src/test/resources/software/amazon/awssdk/codegen/poet/model/alltypesresponse.java",
"license": "apache-2.0",
"size": 146810
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 525,540 |
private void checkSchemaStateAfterNodeRestart(boolean aliveCluster) throws Exception {
IgniteEx node = startGrid(0);
node.active(true);
if (aliveCluster)
startGrid(1);
CountDownLatch cnt = checkpointLatch(node);
node.context().query().querySqlFields(
... | void function(boolean aliveCluster) throws Exception { IgniteEx node = startGrid(0); node.active(true); if (aliveCluster) startGrid(1); CountDownLatch cnt = checkpointLatch(node); node.context().query().querySqlFields( new SqlFieldsQuery(STRPerson\STRid\STRname\STR), false); assertEquals(0, indexCnt(node, SQL_CACHE_NAM... | /**
* Perform test with cache created with {@code CREATE TABLE}.
* @param aliveCluster Whether there should remain an alive node when tested node is restarted.
* @throws Exception if failed.
*/ | Perform test with cache created with CREATE TABLE | checkSchemaStateAfterNodeRestart | {
"repo_name": "NSAmelchev/ignite",
"path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgnitePersistentStoreSchemaLoadTest.java",
"license": "apache-2.0",
"size": 11002
} | [
"java.util.concurrent.CountDownLatch",
"org.apache.ignite.cache.query.SqlFieldsQuery",
"org.apache.ignite.internal.IgniteEx",
"org.apache.ignite.internal.processors.query.QueryUtils"
] | import java.util.concurrent.CountDownLatch; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.query.QueryUtils; | import java.util.concurrent.*; import org.apache.ignite.cache.query.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.query.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 162,984 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<TagValueInner>> createOrUpdateValueWithResponseAsync(
String tagName, String tagValue, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgu... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<TagValueInner>> function( String tagName, String tagValue, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (tagName == null) { return Mono.error(new IllegalArgumentException(STR)); } if (t... | /**
* This operation allows adding a value to the list of predefined values for an existing predefined tag name. A tag
* value can have a maximum of 256 characters.
*
* @param tagName The name of the tag.
* @param tagValue The value of the tag to create.
* @param context The context to ass... | This operation allows adding a value to the list of predefined values for an existing predefined tag name. A tag value can have a maximum of 256 characters | createOrUpdateValueWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/TagOperationsClientImpl.java",
"license": "mit",
"size": 71642
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.resources.fluent.models.TagValueInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.resources.fluent.models.TagValueInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.resources.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,714,812 |
void cacheName(INode inode) {
// Name is cached only for files
if (!inode.isFile()) {
return;
}
ByteArray name = new ByteArray(inode.getLocalNameBytes());
name = nameCache.put(name);
if (name != null) {
inode.setLocalName(name.getBytes());
}
} | void cacheName(INode inode) { if (!inode.isFile()) { return; } ByteArray name = new ByteArray(inode.getLocalNameBytes()); name = nameCache.put(name); if (name != null) { inode.setLocalName(name.getBytes()); } } | /**
* Caches frequently used file names to reuse file name objects and
* reduce heap size.
*/ | Caches frequently used file names to reuse file name objects and reduce heap size | cacheName | {
"repo_name": "mix/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java",
"license": "apache-2.0",
"size": 63942
} | [
"org.apache.hadoop.hdfs.util.ByteArray"
] | import org.apache.hadoop.hdfs.util.ByteArray; | import org.apache.hadoop.hdfs.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,804,700 |
@Nonnull
public AccessReviewInstanceBatchRecordDecisionsRequest buildRequest(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
final AccessReviewInstanceBatchRecordDecisionsRequest request = new AccessReviewInstanceBatchRecordDecisionsRequest(
... | AccessReviewInstanceBatchRecordDecisionsRequest function(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) { final AccessReviewInstanceBatchRecordDecisionsRequest request = new AccessReviewInstanceBatchRecordDecisionsRequest( getRequestUrl(), getClient(), requestOptions); reque... | /**
* Creates the AccessReviewInstanceBatchRecordDecisionsRequest with specific requestOptions instead of the existing requestOptions
*
* @param requestOptions the options for the request
* @return the AccessReviewInstanceBatchRecordDecisionsRequest instance
*/ | Creates the AccessReviewInstanceBatchRecordDecisionsRequest with specific requestOptions instead of the existing requestOptions | buildRequest | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/AccessReviewInstanceBatchRecordDecisionsRequestBuilder.java",
"license": "mit",
"size": 3681
} | [
"com.microsoft.graph.requests.AccessReviewInstanceBatchRecordDecisionsRequest",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.requests.AccessReviewInstanceBatchRecordDecisionsRequest; import javax.annotation.Nonnull; | import com.microsoft.graph.requests.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 1,859,558 |
public void testBytesToBits_byteBitSetInt() {
byte[] methodByteArray = new byte[1];
BitSet methodBitSet = new BitSet(8);
for (int i = 0; i < 255; i++) {
methodByteArray[0] = (byte)i;
HexUtil.bytesToBits(methodByteArray,methodBitSet,7);
assertTrue(Arrays.equals(methodByteArray,HexUtil.bitsToBytes(metho... | void function() { byte[] methodByteArray = new byte[1]; BitSet methodBitSet = new BitSet(8); for (int i = 0; i < 255; i++) { methodByteArray[0] = (byte)i; HexUtil.bytesToBits(methodByteArray,methodBitSet,7); assertTrue(Arrays.equals(methodByteArray,HexUtil.bitsToBytes(methodBitSet,8)));} } | /**
* Test bytesToBits(byte[],BitSet,int) method
* against all possible single byte value.
* It uses HexUtil.bitsToBytes() method for the check,
* so be sure that method works correctly!
*/ | Test bytesToBits(byte[],BitSet,int) method against all possible single byte value. It uses HexUtil.bitsToBytes() method for the check, so be sure that method works correctly | testBytesToBits_byteBitSetInt | {
"repo_name": "uprasad/fred",
"path": "test/freenet/support/HexUtilTest.java",
"license": "gpl-2.0",
"size": 13266
} | [
"java.util.Arrays",
"java.util.BitSet"
] | import java.util.Arrays; import java.util.BitSet; | import java.util.*; | [
"java.util"
] | java.util; | 191,999 |
@POST
@Path("{subscription:\\d+}/tag")
@Consumes(MediaType.APPLICATION_JSON)
public int create(@PathParam("subscription") final int subscription, final TagEditionVo vo) {
return saveOrUpdate(subscription, new ProvTag(), vo);
} | @Path(STR) @Consumes(MediaType.APPLICATION_JSON) int function(@PathParam(STR) final int subscription, final TagEditionVo vo) { return saveOrUpdate(subscription, new ProvTag(), vo); } | /**
* Create the tags inside a quote.
*
* @param subscription The subscription identifier, will be used to filter the tags from the associated provider.
* @param vo The quote tag.
* @return The created tag identifier.
*/ | Create the tags inside a quote | create | {
"repo_name": "ligoj/plugin-prov",
"path": "src/main/java/org/ligoj/app/plugin/prov/ProvTagResource.java",
"license": "mit",
"size": 5761
} | [
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.core.MediaType",
"org.ligoj.app.plugin.prov.model.ProvTag"
] | import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.core.MediaType; import org.ligoj.app.plugin.prov.model.ProvTag; | import javax.ws.rs.*; import javax.ws.rs.core.*; import org.ligoj.app.plugin.prov.model.*; | [
"javax.ws",
"org.ligoj.app"
] | javax.ws; org.ligoj.app; | 1,209,044 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedFlux<PolicyAssignmentInner> listAsync(String filter); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<PolicyAssignmentInner> listAsync(String filter); | /**
* Gets all the policy assignments for a subscription.
*
* @param filter The filter to apply on the operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by s... | Gets all the policy assignments for a subscription | listAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyAssignmentsClient.java",
"license": "mit",
"size": 34200
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux",
"com.azure.resourcemanager.resources.fluent.models.PolicyAssignmentInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.resources.fluent.models.PolicyAssignmentInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.resources.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,436,587 |
public void setPathMatcher(@Nullable PathMatcher pathMatcher) {
this.pathMatcher = pathMatcher;
initPathMatcherToUse();
} | void function(@Nullable PathMatcher pathMatcher) { this.pathMatcher = pathMatcher; initPathMatcherToUse(); } | /**
* When configured, the given PathMatcher is passed down to the underlying
* SubscriptionRegistry to use for matching destination to subscriptions.
* <p>Default is a standard {@link org.springframework.util.AntPathMatcher}.
* @since 4.1
* @see #setSubscriptionRegistry
* @see DefaultSubscriptionRegistry#s... | When configured, the given PathMatcher is passed down to the underlying SubscriptionRegistry to use for matching destination to subscriptions. Default is a standard <code>org.springframework.util.AntPathMatcher</code> | setPathMatcher | {
"repo_name": "spring-projects/spring-framework",
"path": "spring-messaging/src/main/java/org/springframework/messaging/simp/broker/SimpleBrokerMessageHandler.java",
"license": "apache-2.0",
"size": 17807
} | [
"org.springframework.lang.Nullable",
"org.springframework.util.PathMatcher"
] | import org.springframework.lang.Nullable; import org.springframework.util.PathMatcher; | import org.springframework.lang.*; import org.springframework.util.*; | [
"org.springframework.lang",
"org.springframework.util"
] | org.springframework.lang; org.springframework.util; | 2,823,029 |
@NonNull PlayerResource create();
} | @NonNull PlayerResource create(); } | /**
* Create a new {@link PlayerResource} with the specified
* properties.
*
* @return the new player resource
*/ | Create a new <code>PlayerResource</code> with the specified properties | create | {
"repo_name": "ichorpowered/guardianapi",
"path": "src/main/java/com/ichorpowered/guardian/api/game/resource/PlayerResource.java",
"license": "mit",
"size": 2155
} | [
"org.checkerframework.checker.nullness.qual.NonNull"
] | import org.checkerframework.checker.nullness.qual.NonNull; | import org.checkerframework.checker.nullness.qual.*; | [
"org.checkerframework.checker"
] | org.checkerframework.checker; | 2,572,330 |
@XmlElement(name = "parameters")
public LinkedList<String> getParameters() {
initParameters(false);
return parameters;
} | @XmlElement(name = STR) LinkedList<String> function() { initParameters(false); return parameters; } | /**
* Gets the parameters of the function.
*
* @return the parameters of the function
*/ | Gets the parameters of the function | getParameters | {
"repo_name": "dswarm/dswarm",
"path": "persistence/src/main/java/org/dswarm/persistence/model/job/Function.java",
"license": "apache-2.0",
"size": 11170
} | [
"java.util.LinkedList",
"javax.xml.bind.annotation.XmlElement"
] | import java.util.LinkedList; import javax.xml.bind.annotation.XmlElement; | import java.util.*; import javax.xml.bind.annotation.*; | [
"java.util",
"javax.xml"
] | java.util; javax.xml; | 2,827,983 |
public synchronized JSONObject bet1A0001(final String userId, final int amount, final int smallOrLarge) {
final JSONObject ret = Results.falseResult();
if (activityQueryService.is1A0001Today(userId)) {
ret.put(Keys.MSG, langPropsService.get("activityParticipatedLabel"));
re... | synchronized JSONObject function(final String userId, final int amount, final int smallOrLarge) { final JSONObject ret = Results.falseResult(); if (activityQueryService.is1A0001Today(userId)) { ret.put(Keys.MSG, langPropsService.get(STR)); return ret; } final String date = DateFormatUtils.format(new Date(), STR); final... | /**
* Bets 1A0001.
*
* @param userId the specified user id
* @param amount the specified amount
* @param smallOrLarge the specified small or large
* @return result
*/ | Bets 1A0001 | bet1A0001 | {
"repo_name": "jekkro/symphony",
"path": "src/main/java/org/b3log/symphony/service/ActivityMgmtService.java",
"license": "apache-2.0",
"size": 14605
} | [
"java.util.Date",
"org.apache.commons.lang.time.DateFormatUtils",
"org.b3log.latke.Keys",
"org.b3log.latke.Latkes",
"org.b3log.latke.logging.Level",
"org.b3log.latke.model.User",
"org.b3log.latke.service.ServiceException",
"org.b3log.symphony.model.Common",
"org.b3log.symphony.model.Pointtransfer",
... | import java.util.Date; import org.apache.commons.lang.time.DateFormatUtils; import org.b3log.latke.Keys; import org.b3log.latke.Latkes; import org.b3log.latke.logging.Level; import org.b3log.latke.model.User; import org.b3log.latke.service.ServiceException; import org.b3log.symphony.model.Common; import org.b3log.symph... | import java.util.*; import org.apache.commons.lang.time.*; import org.b3log.latke.*; import org.b3log.latke.logging.*; import org.b3log.latke.model.*; import org.b3log.latke.service.*; import org.b3log.symphony.model.*; import org.b3log.symphony.util.*; import org.json.*; | [
"java.util",
"org.apache.commons",
"org.b3log.latke",
"org.b3log.symphony",
"org.json"
] | java.util; org.apache.commons; org.b3log.latke; org.b3log.symphony; org.json; | 2,396,558 |
public LocalClientSession createClientSession(Connection conn, StreamID id) {
return createClientSession( conn, id, null);
}
| LocalClientSession function(Connection conn, StreamID id) { return createClientSession( conn, id, null); } | /**
* Creates a new <tt>ClientSession</tt> with the specified streamID.
*
* @param conn the connection to create the session from.
* @param id the streamID to use for the new session.
* @return a newly created session.
*/ | Creates a new ClientSession with the specified streamID | createClientSession | {
"repo_name": "zhouluoyang/openfire",
"path": "src/java/org/jivesoftware/openfire/SessionManager.java",
"license": "apache-2.0",
"size": 72875
} | [
"org.jivesoftware.openfire.session.LocalClientSession"
] | import org.jivesoftware.openfire.session.LocalClientSession; | import org.jivesoftware.openfire.session.*; | [
"org.jivesoftware.openfire"
] | org.jivesoftware.openfire; | 769,776 |
ListenableFuture<DatabaseSchema> getOvsdbSchema(String dbName); | ListenableFuture<DatabaseSchema> getOvsdbSchema(String dbName); | /**
* Gets the OVSDB database schema.
*
* @param dbName database name
* @return database schema
*/ | Gets the OVSDB database schema | getOvsdbSchema | {
"repo_name": "donNewtonAlpha/onos",
"path": "protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/OvsdbClientService.java",
"license": "apache-2.0",
"size": 10878
} | [
"com.google.common.util.concurrent.ListenableFuture",
"org.onosproject.ovsdb.rfc.schema.DatabaseSchema"
] | import com.google.common.util.concurrent.ListenableFuture; import org.onosproject.ovsdb.rfc.schema.DatabaseSchema; | import com.google.common.util.concurrent.*; import org.onosproject.ovsdb.rfc.schema.*; | [
"com.google.common",
"org.onosproject.ovsdb"
] | com.google.common; org.onosproject.ovsdb; | 1,393,121 |
final public String getVar()
{
return ComponentUtils.resolveString(getProperty(VAR_KEY));
} | final String function() { return ComponentUtils.resolveString(getProperty(VAR_KEY)); } | /**
* Gets the name of the EL variable used to reference each element of
* this collection. Once this component has completed rendering, this
* variable is removed (or reverted back to its previous value).
*/ | Gets the name of the EL variable used to reference each element of this collection. Once this component has completed rendering, this variable is removed (or reverted back to its previous value) | getVar | {
"repo_name": "adamrduffy/trinidad-1.0.x",
"path": "trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java",
"license": "apache-2.0",
"size": 45191
} | [
"org.apache.myfaces.trinidad.util.ComponentUtils"
] | import org.apache.myfaces.trinidad.util.ComponentUtils; | import org.apache.myfaces.trinidad.util.*; | [
"org.apache.myfaces"
] | org.apache.myfaces; | 729,638 |
public boolean disconnect() {
try {
return mService.disconnect();
} catch (RemoteException e) {
return false;
}
} | boolean function() { try { return mService.disconnect(); } catch (RemoteException e) { return false; } } | /**
* Disassociate from the currently active access point. This may result
* in the asynchronous delivery of state change events.
* @return {@code true} if the operation succeeded
*/ | Disassociate from the currently active access point. This may result in the asynchronous delivery of state change events | disconnect | {
"repo_name": "mateor/pdroid",
"path": "android-2.3.4_r1/tags/1.32/frameworks/base/wifi/java/android/net/wifi/WifiManager.java",
"license": "gpl-3.0",
"size": 46337
} | [
"android.os.RemoteException"
] | import android.os.RemoteException; | import android.os.*; | [
"android.os"
] | android.os; | 1,017,681 |
public static InfoStruct queryBusLine(String lineName) {
return selectLine.query(lineName.trim());
} | static InfoStruct function(String lineName) { return selectLine.query(lineName.trim()); } | /**
* query line information
* @param lineName
* @return
*/ | query line information | queryBusLine | {
"repo_name": "SnailTraffic/SnailTraffic-web",
"path": "src/com/snail/traffic/control/query/QueryBusAPI.java",
"license": "apache-2.0",
"size": 1710
} | [
"com.snail.traffic.container.info.InfoStruct"
] | import com.snail.traffic.container.info.InfoStruct; | import com.snail.traffic.container.info.*; | [
"com.snail.traffic"
] | com.snail.traffic; | 2,883,569 |
Person createPerson(String configName, String firstName, String lastName, DateTime dateOfBirth, String gender,
String address, List<Attribute> attributes);
| Person createPerson(String configName, String firstName, String lastName, DateTime dateOfBirth, String gender, String address, List<Attribute> attributes); | /**
* Creates a person on the OpenMRS server based on the given information. Configuration with the given
* {@code configName} will be used while performing this action.
*
* @param configName the name of the configuration
* @param firstName the person's first name
* @param lastName... | Creates a person on the OpenMRS server based on the given information. Configuration with the given configName will be used while performing this action | createPerson | {
"repo_name": "koshalt/modules",
"path": "openmrs/src/main/java/org/motechproject/openmrs/service/OpenMRSPersonService.java",
"license": "bsd-3-clause",
"size": 2775
} | [
"java.util.List",
"org.joda.time.DateTime",
"org.motechproject.openmrs.domain.Attribute",
"org.motechproject.openmrs.domain.Person"
] | import java.util.List; import org.joda.time.DateTime; import org.motechproject.openmrs.domain.Attribute; import org.motechproject.openmrs.domain.Person; | import java.util.*; import org.joda.time.*; import org.motechproject.openmrs.domain.*; | [
"java.util",
"org.joda.time",
"org.motechproject.openmrs"
] | java.util; org.joda.time; org.motechproject.openmrs; | 1,354,993 |
@Test
public void spawnSuspendedThreadEventDebugTargetTerminated() {
final EObject context = DebugPackage.eINSTANCE.getDebugFactory().createVariable();
final EObject instruction = DebugPackage.eINSTANCE.getDebugFactory().createVariable();
final DebugTarget target = DebugPackage.eINSTANCE.getDebugFactory().cre... | void function() { final EObject context = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); final EObject instruction = DebugPackage.eINSTANCE.getDebugFactory().createVariable(); final DebugTarget target = DebugPackage.eINSTANCE.getDebugFactory().createDebugTarget(); target.setContext(DebugPackage.eINSTANCE.ge... | /**
* Tests {@link DebugTargetUtils#spawnSuspendedThreadEvent(DebugTarget)} in
* {@link DebugTargetState#TERMINATED}.
*/ | Tests <code>DebugTargetUtils#spawnSuspendedThreadEvent(DebugTarget)</code> in <code>DebugTargetState#TERMINATED</code> | spawnSuspendedThreadEventDebugTargetTerminated | {
"repo_name": "SiriusLab/SiriusAnimator",
"path": "simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/src/org/eclipse/gemoc/dsl/debug/tests/DebugTargetUtilsTests.java",
"license": "epl-1.0",
"size": 40694
} | [
"org.eclipse.emf.ecore.EObject",
"org.eclipse.gemoc.dsl.debug.DebugPackage",
"org.eclipse.gemoc.dsl.debug.DebugTarget",
"org.eclipse.gemoc.dsl.debug.DebugTargetState",
"org.eclipse.gemoc.dsl.debug.DebugTargetUtils",
"org.junit.Assert"
] | import org.eclipse.emf.ecore.EObject; import org.eclipse.gemoc.dsl.debug.DebugPackage; import org.eclipse.gemoc.dsl.debug.DebugTarget; import org.eclipse.gemoc.dsl.debug.DebugTargetState; import org.eclipse.gemoc.dsl.debug.DebugTargetUtils; import org.junit.Assert; | import org.eclipse.emf.ecore.*; import org.eclipse.gemoc.dsl.debug.*; import org.junit.*; | [
"org.eclipse.emf",
"org.eclipse.gemoc",
"org.junit"
] | org.eclipse.emf; org.eclipse.gemoc; org.junit; | 1,911,322 |
return tryDecode(versionedInternalSchemaMetadata)
.orElseThrow(() -> new SafeIllegalStateException(
"Could not decode persisted internal schema metadata - unrecognized version. This may occur"
+ " transiently during upgrades, but if it persists ple... | return tryDecode(versionedInternalSchemaMetadata) .orElseThrow(() -> new SafeIllegalStateException( STR + STR, SafeArg.of(STR, versionedInternalSchemaMetadata), SafeArg.of(STR, SUPPORTED_DECODERS.keySet()))); } | /**
* Decodes a {@link VersionedInternalSchemaMetadata} object into a common {@link InternalSchemaMetadata} object,
* provided this instance of the codec knows how to decode the relevant
* {@link VersionedInternalSchemaMetadata#version()}. This method throws if the version is not recognised.
*
... | Decodes a <code>VersionedInternalSchemaMetadata</code> object into a common <code>InternalSchemaMetadata</code> object, provided this instance of the codec knows how to decode the relevant <code>VersionedInternalSchemaMetadata#version()</code>. This method throws if the version is not recognised | decode | {
"repo_name": "EvilMcJerkface/atlasdb",
"path": "atlasdb-impl-shared/src/main/java/com/palantir/atlasdb/internalschema/persistence/InternalSchemaMetadataPayloadCodec.java",
"license": "apache-2.0",
"size": 4829
} | [
"com.palantir.logsafe.SafeArg",
"com.palantir.logsafe.exceptions.SafeIllegalStateException"
] | import com.palantir.logsafe.SafeArg; import com.palantir.logsafe.exceptions.SafeIllegalStateException; | import com.palantir.logsafe.*; import com.palantir.logsafe.exceptions.*; | [
"com.palantir.logsafe"
] | com.palantir.logsafe; | 403,534 |
public Map<String, OMElement> getParams() {
return paramNameToValue;
} | Map<String, OMElement> function() { return paramNameToValue; } | /**
* Returns the parameter name to value mapping.
*
* @return parameter name to value mapping, never <code>null</code>
*/ | Returns the parameter name to value mapping | getParams | {
"repo_name": "deegree/deegree3",
"path": "deegree-core/deegree-core-protocol/deegree-protocol-wfs/src/main/java/org/deegree/protocol/wfs/query/StoredQuery.java",
"license": "lgpl-2.1",
"size": 2895
} | [
"java.util.Map",
"org.apache.axiom.om.OMElement"
] | import java.util.Map; import org.apache.axiom.om.OMElement; | import java.util.*; import org.apache.axiom.om.*; | [
"java.util",
"org.apache.axiom"
] | java.util; org.apache.axiom; | 1,524,907 |
public static Version parse(String stringVersion)
throws ParseException {
try {
return new Version(stringVersion);
} catch (RuntimeException re) {
if (re.getCause() instanceof ParseException) {
throw (ParseException)re.getCause();
} else {
throw re;
}
}
} | static Version function(String stringVersion) throws ParseException { try { return new Version(stringVersion); } catch (RuntimeException re) { if (re.getCause() instanceof ParseException) { throw (ParseException)re.getCause(); } else { throw re; } } } | /**
* Parses a Version literal.
*
* @param stringVersion Version literal.
* @return Version.
* @throws ParseException If parsing fails.
*/ | Parses a Version literal | parse | {
"repo_name": "azyva/dragom-api",
"path": "src/main/java/org/azyva/dragom/model/Version.java",
"license": "agpl-3.0",
"size": 6502
} | [
"java.text.ParseException"
] | import java.text.ParseException; | import java.text.*; | [
"java.text"
] | java.text; | 163,724 |
private void handleRefresh(String id) {
if (getThing().getStatus() != ThingStatus.ONLINE) {
return;
}
if (id.equals(PrgConstants.CHANNEL_SCENE)) {
getProtocolHandler().refreshScene();
} else if (id.equals(PrgConstants.CHANNEL_ZONEINTENSITY)) {
ge... | void function(String id) { if (getThing().getStatus() != ThingStatus.ONLINE) { return; } if (id.equals(PrgConstants.CHANNEL_SCENE)) { getProtocolHandler().refreshScene(); } else if (id.equals(PrgConstants.CHANNEL_ZONEINTENSITY)) { getProtocolHandler().refreshZoneIntensity(_config.getControlUnit()); } else if (id.equals... | /**
* Method that handles the {@link RefreshType} command specifically. Calls the {@link PrgProtocolHandler} to
* handle the actual refresh based on the channel id.
*
* @param id a non-null, possibly empty channel id to refresh
*/ | Method that handles the <code>RefreshType</code> command specifically. Calls the <code>PrgProtocolHandler</code> to handle the actual refresh based on the channel id | handleRefresh | {
"repo_name": "Mr-Eskildsen/openhab2-addons",
"path": "addons/binding/org.openhab.binding.lutron/src/main/java/org/openhab/binding/lutron/internal/grxprg/GrafikEyeHandler.java",
"license": "epl-1.0",
"size": 14908
} | [
"org.eclipse.smarthome.core.library.types.DecimalType",
"org.eclipse.smarthome.core.thing.ThingStatus"
] | import org.eclipse.smarthome.core.library.types.DecimalType; import org.eclipse.smarthome.core.thing.ThingStatus; | import org.eclipse.smarthome.core.library.types.*; import org.eclipse.smarthome.core.thing.*; | [
"org.eclipse.smarthome"
] | org.eclipse.smarthome; | 1,985,036 |
static <S, O extends TypeProxy<S>> Object make(Type type, Class<O> proxyClass) {
return new ProxyTypeAdapter<S, O>(proxyClass,
getConstructor(proxyClass, $Gson$Types.getRawType(type)));
} | static <S, O extends TypeProxy<S>> Object make(Type type, Class<O> proxyClass) { return new ProxyTypeAdapter<S, O>(proxyClass, getConstructor(proxyClass, $Gson$Types.getRawType(type))); } | /**
* Gets a type adapter for a given type that uses a proxy class for
* serialization.
*
* @param <S> A type to get an adapter for.
* @param <O> A proxy type to use.
* @param type The type corresponding to {@code <S>}.
* @param proxyClass A proxy class for {@code <S>}, corresponding to {@code <O>}... | Gets a type adapter for a given type that uses a proxy class for serialization | make | {
"repo_name": "joesoc/plexi",
"path": "src/com/google/enterprise/adaptor/secmgr/json/ProxyTypeAdapter.java",
"license": "apache-2.0",
"size": 4604
} | [
"java.lang.reflect.Type"
] | import java.lang.reflect.Type; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,129,374 |
void readMemberAttr(Symbol sym, Name attrName, int attrLen) {
if (attrName == names.Code) {
((MethodSymbol) sym).code = readCode(sym);
} else {
super.readMemberAttr(sym, attrName, attrLen);
}
} | void readMemberAttr(Symbol sym, Name attrName, int attrLen) { if (attrName == names.Code) { ((MethodSymbol) sym).code = readCode(sym); } else { super.readMemberAttr(sym, attrName, attrLen); } } | /**
* As in ClassReader except that code is read in and entered into method
* symbol.
*/ | As in ClassReader except that code is read in and entered into method symbol | readMemberAttr | {
"repo_name": "nileshpatelksy/hello-pod-cast",
"path": "archive/FILE/Compiler/java_GJC1.42_src/src/com/sun/tools/javac/v8/code/CompleteClassReader.java",
"license": "apache-2.0",
"size": 2775
} | [
"com.sun.tools.javac.v8.code.Symbol",
"com.sun.tools.javac.v8.util.Name"
] | import com.sun.tools.javac.v8.code.Symbol; import com.sun.tools.javac.v8.util.Name; | import com.sun.tools.javac.v8.code.*; import com.sun.tools.javac.v8.util.*; | [
"com.sun.tools"
] | com.sun.tools; | 2,859,801 |
void sendAction(String action, Object... args) throws IOException {
StringBuilder sb = new StringBuilder();
sb.append(action);
for (Object arg :args) {
sb.append(" ");
sb.append(arg);
}
String cmd = sb.toString();
synchronized (this) {
... | void sendAction(String action, Object... args) throws IOException { StringBuilder sb = new StringBuilder(); sb.append(action); for (Object arg :args) { sb.append(" "); sb.append(arg); } String cmd = sb.toString(); synchronized (this) { inputWriter.println(cmd); } } | /**
* Send an action and arguments to the child via stdin.
* @param action the action
* @param args additional arguments
* @throws IOException if something goes wrong writing to the child
*/ | Send an action and arguments to the child via stdin | sendAction | {
"repo_name": "universsky/openjdk",
"path": "jdk/test/java/lang/ProcessHandle/JavaChild.java",
"license": "gpl-2.0",
"size": 20755
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 475,884 |
public static void stream(String uuid, HashMap<String, Object> response) {
send(uuid, "response", response, false);
} | static void function(String uuid, HashMap<String, Object> response) { send(uuid, STR, response, false); } | /**
* Sends a single response to the client and keeps the request alive for future use
* @param uuid The request UUID
* @param response The response object
*/ | Sends a single response to the client and keeps the request alive for future use | stream | {
"repo_name": "kgston/Lumitron",
"path": "Lumitron/src/main/java/com/lumitron/network/RequestHandler.java",
"license": "gpl-3.0",
"size": 18540
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,296,626 |
public Path getWorkspaceFile() {
AtomicReference<? extends UnixGlob.FilesystemCalls> cache = UnixGlob.DEFAULT_SYSCALLS_REF;
// TODO(bazel-team): correctness in the presence of changes to the location of the WORKSPACE
// file.
return getFilePath(new PathFragment("WORKSPACE"), cache);
} | Path function() { AtomicReference<? extends UnixGlob.FilesystemCalls> cache = UnixGlob.DEFAULT_SYSCALLS_REF; return getFilePath(new PathFragment(STR), cache); } | /**
* Returns the path to the WORKSPACE file for this build.
*
* <p>If there are WORKSPACE files beneath multiple package path entries, the first one always
* wins.
*/ | Returns the path to the WORKSPACE file for this build. If there are WORKSPACE files beneath multiple package path entries, the first one always wins | getWorkspaceFile | {
"repo_name": "kamalmarhubi/bazel",
"path": "src/main/java/com/google/devtools/build/lib/pkgcache/PathPackageLocator.java",
"license": "apache-2.0",
"size": 10782
} | [
"com.google.devtools.build.lib.vfs.Path",
"com.google.devtools.build.lib.vfs.PathFragment",
"com.google.devtools.build.lib.vfs.UnixGlob",
"java.util.concurrent.atomic.AtomicReference"
] | import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.PathFragment; import com.google.devtools.build.lib.vfs.UnixGlob; import java.util.concurrent.atomic.AtomicReference; | import com.google.devtools.build.lib.vfs.*; import java.util.concurrent.atomic.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 2,268,857 |
@Test
public void testDefaultExplanationBuilderNoPropertyFilesDefaultLocale() {
Locale stateAndLang = new Locale(new String(), new String());
explanation = new Explanation("owner 1", stateAndLang, null);
try {
instance = getInstance(explanation, getFactory());
fail("Exception should have been thrown, b... | void function() { Locale stateAndLang = new Locale(new String(), new String()); explanation = new Explanation(STR, stateAndLang, null); try { instance = getInstance(explanation, getFactory()); fail(STR); } catch (Exception e) { String result = e.getMessage(); String expResult = STR; assertTrue(e instanceof org.goodolda... | /**
* Test of two argument constructor, of class DefaultExplanationBuilder.
* Test case: unsuccesfull initialization because property files for the
* default locale not exist
*/ | Test of two argument constructor, of class DefaultExplanationBuilder. Test case: unsuccesfull initialization because property files for the default locale not exist | testDefaultExplanationBuilderNoPropertyFilesDefaultLocale | {
"repo_name": "mladensavic94/jeff",
"path": "src/test/java/org/goodoldai/jeff/explanation/builder/DefaultExplanationBuilderTest.java",
"license": "lgpl-3.0",
"size": 14912
} | [
"java.util.Locale",
"org.goodoldai.jeff.explanation.Explanation",
"org.junit.Assert"
] | import java.util.Locale; import org.goodoldai.jeff.explanation.Explanation; import org.junit.Assert; | import java.util.*; import org.goodoldai.jeff.explanation.*; import org.junit.*; | [
"java.util",
"org.goodoldai.jeff",
"org.junit"
] | java.util; org.goodoldai.jeff; org.junit; | 2,381,078 |
private int getScrollRange() {
int scrollRange = 0;
if (getChildCount() > 0) {
View child = getChildAt(0);
scrollRange = Math.max(0, child.getWidth() - (getWidth() - getPaddingLeft() - getPaddingRight()));
}
return scrollRange;
}
} | int function() { int scrollRange = 0; if (getChildCount() > 0) { View child = getChildAt(0); scrollRange = Math.max(0, child.getWidth() - (getWidth() - getPaddingLeft() - getPaddingRight())); } return scrollRange; } } | /**
* Taken from the AOSP ScrollView source
*/ | Taken from the AOSP ScrollView source | getScrollRange | {
"repo_name": "GolvenH/PocketCampus",
"path": "app/src/main/java/com/handmark/pulltorefresh/library/PullToRefreshHorizontalScrollView.java",
"license": "apache-2.0",
"size": 3560
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 661,609 |
@Override
public void close() throws IOException {
synchronized (lock) {
if (encoder != null) {
if (encoderFlush) {
CoderResult result = encoder.flush(bytes);
while (!result.isUnderflow()) {
if (result.isOverflow... | void function() throws IOException { synchronized (lock) { if (encoder != null) { if (encoderFlush) { CoderResult result = encoder.flush(bytes); while (!result.isUnderflow()) { if (result.isOverflow()) { flush(); result = encoder.flush(bytes); } else { result.throwException(); } } } flush(); out.flush(); out.close(); e... | /**
* Closes this writer. This implementation flushes the buffer as well as the
* target stream. The target stream is then closed and the resources for the
* buffer and converter are released.
* <p>
* Only the first invocation of this method has any effect. Subsequent calls
* do nothing.
... | Closes this writer. This implementation flushes the buffer as well as the target stream. The target stream is then closed and the resources for the buffer and converter are released. Only the first invocation of this method has any effect. Subsequent calls do nothing | close | {
"repo_name": "larrytin/j2objc",
"path": "jre_emul/apache_harmony/classlib/modules/luni/src/main/java/java/io/OutputStreamWriter.java",
"license": "apache-2.0",
"size": 11325
} | [
"java.nio.charset.CoderResult"
] | import java.nio.charset.CoderResult; | import java.nio.charset.*; | [
"java.nio"
] | java.nio; | 2,508,926 |
public T xquery(String text, Namespaces namespaces) {
return delegate.xquery(text, namespaces);
} | T function(String text, Namespaces namespaces) { return delegate.xquery(text, namespaces); } | /**
* Evaluates an <a
* href="http://camel.apache.org/xquery.html">XQuery expression</a>
* with the specified set of namespace prefixes and URIs
*
* @param text the expression to be evaluated
* @param namespaces the namespace prefix and URIs to use
* @return the builder to continue p... | Evaluates an XQuery expression with the specified set of namespace prefixes and URIs | xquery | {
"repo_name": "kingargyle/turmeric-bot",
"path": "camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java",
"license": "apache-2.0",
"size": 17436
} | [
"org.apache.camel.builder.xml.Namespaces"
] | import org.apache.camel.builder.xml.Namespaces; | import org.apache.camel.builder.xml.*; | [
"org.apache.camel"
] | org.apache.camel; | 917,562 |
public static Timestamp getTimestamp(BigDecimal bd) {
return DateUtil.getTimestamp(bd.longValue(), ((bd.remainder(BigDecimal.ONE).multiply(BigDecimal.valueOf(QueryConstants.MILLIS_TO_NANOS_CONVERTOR))).intValue()));
} | static Timestamp function(BigDecimal bd) { return DateUtil.getTimestamp(bd.longValue(), ((bd.remainder(BigDecimal.ONE).multiply(BigDecimal.valueOf(QueryConstants.MILLIS_TO_NANOS_CONVERTOR))).intValue())); } | /**
* Utility function to convert a {@link BigDecimal} value to {@link Timestamp}.
*/ | Utility function to convert a <code>BigDecimal</code> value to <code>Timestamp</code> | getTimestamp | {
"repo_name": "forcedotcom/phoenix",
"path": "phoenix-core/src/main/java/com/salesforce/phoenix/util/DateUtil.java",
"license": "bsd-3-clause",
"size": 6723
} | [
"com.salesforce.phoenix.query.QueryConstants",
"java.math.BigDecimal",
"java.sql.Timestamp"
] | import com.salesforce.phoenix.query.QueryConstants; import java.math.BigDecimal; import java.sql.Timestamp; | import com.salesforce.phoenix.query.*; import java.math.*; import java.sql.*; | [
"com.salesforce.phoenix",
"java.math",
"java.sql"
] | com.salesforce.phoenix; java.math; java.sql; | 67,754 |
void file(NodeRef record);
| void file(NodeRef record); | /**
* 'File' a new document that arrived in the file plan structure.
*
* @param nodeRef record
*/ | 'File' a new document that arrived in the file plan structure | file | {
"repo_name": "dnacreative/records-management",
"path": "rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/record/RecordService.java",
"license": "lgpl-3.0",
"size": 8886
} | [
"org.alfresco.service.cmr.repository.NodeRef"
] | import org.alfresco.service.cmr.repository.NodeRef; | import org.alfresco.service.cmr.repository.*; | [
"org.alfresco.service"
] | org.alfresco.service; | 262,002 |
void firePasteRenderingSettings(TimeRefObject ref)
{
state = TreeViewer.SETTINGS_RND;
SecurityContext ctx = getSecurityContext();
currentLoader = new RndSettingsSaver(component, ctx, ref,
refImage.getDefaultPixels().getId());
currentLoader.load();
}
| void firePasteRenderingSettings(TimeRefObject ref) { state = TreeViewer.SETTINGS_RND; SecurityContext ctx = getSecurityContext(); currentLoader = new RndSettingsSaver(component, ctx, ref, refImage.getDefaultPixels().getId()); currentLoader.load(); } | /**
* Fires an asynchronous call to paste the rendering settings.
*
* @param ref The time reference object.
*/ | Fires an asynchronous call to paste the rendering settings | firePasteRenderingSettings | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerModel.java",
"license": "gpl-2.0",
"size": 44194
} | [
"org.openmicroscopy.shoola.agents.treeviewer.RndSettingsSaver",
"org.openmicroscopy.shoola.env.data.model.TimeRefObject",
"org.openmicroscopy.shoola.env.data.util.SecurityContext"
] | import org.openmicroscopy.shoola.agents.treeviewer.RndSettingsSaver; import org.openmicroscopy.shoola.env.data.model.TimeRefObject; import org.openmicroscopy.shoola.env.data.util.SecurityContext; | import org.openmicroscopy.shoola.agents.treeviewer.*; import org.openmicroscopy.shoola.env.data.model.*; import org.openmicroscopy.shoola.env.data.util.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 2,357,994 |
private boolean unpersistAlarm(int id) {
final CordovaInterface cordova = this.cordova;
final Editor alarmSettingsEditor = cordova.getActivity().getBaseContext().getSharedPreferences(
PLUGIN_NAME, Context.MODE_PRIVATE).edit();
alarmSettingsEditor.remove(PLUGIN_PREFIX + id);
return alarmSettingsEdito... | boolean function(int id) { final CordovaInterface cordova = this.cordova; final Editor alarmSettingsEditor = cordova.getActivity().getBaseContext().getSharedPreferences( PLUGIN_NAME, Context.MODE_PRIVATE).edit(); alarmSettingsEditor.remove(PLUGIN_PREFIX + id); return alarmSettingsEditor.commit(); } | /**
* Remove a specific alarm from the Android shared Preferences
*
* @param alarmId
* The Id of the notification that must be removed.
*
* @return true when successfull, otherwise false
*/ | Remove a specific alarm from the Android shared Preferences | unpersistAlarm | {
"repo_name": "tiagojoao/cte",
"path": "src/com/bicrement/plugins/localNotification/LocalNotification.java",
"license": "gpl-2.0",
"size": 5807
} | [
"android.content.Context",
"android.content.SharedPreferences",
"org.apache.cordova.api.CordovaInterface"
] | import android.content.Context; import android.content.SharedPreferences; import org.apache.cordova.api.CordovaInterface; | import android.content.*; import org.apache.cordova.api.*; | [
"android.content",
"org.apache.cordova"
] | android.content; org.apache.cordova; | 2,670,538 |
private String getSubscriptionsPath(String topicName) {
if (!topicName.endsWith("/")) {
topicName = topicName + "/";
}
topicName = topicName + EventBrokerConstants.EB_CONF_WS_SUBSCRIPTION_COLLECTION_NAME;
return topicName;
} | String function(String topicName) { if (!topicName.endsWith("/")) { topicName = topicName + "/"; } topicName = topicName + EventBrokerConstants.EB_CONF_WS_SUBSCRIPTION_COLLECTION_NAME; return topicName; } | /**
* Gets the subscription path for a topic
*
* @param topicName topic name
* @return the subscription path as string
*/ | Gets the subscription path for a topic | getSubscriptionsPath | {
"repo_name": "wattale/carbon-commons",
"path": "components/event/org.wso2.carbon.event.core/src/main/java/org/wso2/carbon/event/core/internal/topic/registry/RegistryTopicManager.java",
"license": "apache-2.0",
"size": 26421
} | [
"org.wso2.carbon.event.core.util.EventBrokerConstants"
] | import org.wso2.carbon.event.core.util.EventBrokerConstants; | import org.wso2.carbon.event.core.util.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 2,610,603 |
private static void showPopoverHelp(final Node owner, final String headerText, final Image headerImage, final Node content) {
Pane borderPane = new BorderPane(null, null, new ImageView(headerImage),
content,
new Label(headerText));
borderPane.setPadding(new Insets(10)... | static void function(final Node owner, final String headerText, final Image headerImage, final Node content) { Pane borderPane = new BorderPane(null, null, new ImageView(headerImage), content, new Label(headerText)); borderPane.setPadding(new Insets(10)); borderPane.setPrefWidth(500); PopOver popOver = new PopOver(bord... | /**
*
* Static utility to to show a Popover with the given Node as owner.
*
* @param owner The owner of the Popover
* @param headerText A short String that will be shown in the top-left
* corner of the Popover.
* @param headerImage An Image that will be shown... | Static utility to to show a Popover with the given Node as owner | showPopoverHelp | {
"repo_name": "millmanorama/autopsy",
"path": "ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/Toolbar.java",
"license": "apache-2.0",
"size": 19466
} | [
"org.controlsfx.control.PopOver"
] | import org.controlsfx.control.PopOver; | import org.controlsfx.control.*; | [
"org.controlsfx.control"
] | org.controlsfx.control; | 2,262,316 |
public ProxyLogicHandler getHandler() {
return handler;
} | ProxyLogicHandler function() { return handler; } | /**
* Returns the {@link ProxyLogicHandler} currently in use.
*/ | Returns the <code>ProxyLogicHandler</code> currently in use | getHandler | {
"repo_name": "chao-sun-kaazing/gateway",
"path": "mina.core/core/src/main/java/org/apache/mina/proxy/session/ProxyIoSession.java",
"license": "apache-2.0",
"size": 8736
} | [
"org.apache.mina.proxy.ProxyLogicHandler"
] | import org.apache.mina.proxy.ProxyLogicHandler; | import org.apache.mina.proxy.*; | [
"org.apache.mina"
] | org.apache.mina; | 2,393,145 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.