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 String[] removeEmpty(String[] arr) {
ArrayList<String> list = new ArrayList<>();
for (String s : arr) {
if (s != null && !s.isEmpty())
list.add(s);
}
return list.toArray(new String[list.size()]);
} | static String[] function(String[] arr) { ArrayList<String> list = new ArrayList<>(); for (String s : arr) { if (s != null && !s.isEmpty()) list.add(s); } return list.toArray(new String[list.size()]); } | /**
* Removes empty tokens from given array. The empty slots will be filled with
* the follow-up tokens.
*/ | Removes empty tokens from given array. The empty slots will be filled with the follow-up tokens | removeEmpty | {
"repo_name": "sourcewarehouse/thomasjungblut",
"path": "src/de/jungblut/nlp/TokenizerUtils.java",
"license": "apache-2.0",
"size": 8785
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 751,523 |
@Test
public void whenConvertListOfArraysOfIntsThenGetListOfIntegers() {
List<int[]> list = new ArrayList<>();
list.addAll(Arrays.asList(new int[]{1, 2, 3}, new int[]{4, 5, 6, 7}));
List<Integer> expected = new ArrayList<>();
expected.addAll(Arrays.asList(1, 2, 3, 4, 5, 6, 7));
... | void function() { List<int[]> list = new ArrayList<>(); list.addAll(Arrays.asList(new int[]{1, 2, 3}, new int[]{4, 5, 6, 7})); List<Integer> expected = new ArrayList<>(); expected.addAll(Arrays.asList(1, 2, 3, 4, 5, 6, 7)); assertThat(new ConvertList().convert(list), is(expected)); } | /**
* Convert List of arrays of ints to List of Integers.
*/ | Convert List of arrays of ints to List of Integers | whenConvertListOfArraysOfIntsThenGetListOfIntegers | {
"repo_name": "dimir2/vivanov",
"path": "part1/ch3/src/test/java/ru/job4j/light/collections/ConvertListTest.java",
"license": "apache-2.0",
"size": 3064
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.hamcrest.core.Is; import org.junit.Assert; | import java.util.*; import org.hamcrest.core.*; import org.junit.*; | [
"java.util",
"org.hamcrest.core",
"org.junit"
] | java.util; org.hamcrest.core; org.junit; | 1,983,807 |
@HttpTest(method = Method.POST, path = "/gautam/chang", type = MediaType.APPLICATION_JSON,
content = "{\"from_userName\":\"gautam\",\"to_userName\":\"chang\",\"message\":\"Hey! this is a private chat\",\"message_timestamp\":\" \",\"location\":\" \"}")
public void twoMembersCanPrivatelyChat(){
// Created
asser... | @HttpTest(method = Method.POST, path = STR, type = MediaType.APPLICATION_JSON, content = "{\"from_userName\":\"gautam\",\"to_userName\":\"chang\",\"message\":\"Hey! this is a chat\",\"message_timestamp\":\" \",\"location\":\" \"}") public void function(){ assertEquals(201, response.getStatus()); } | /**
* Rest 3
*/ | Rest 3 | twoMembersCanPrivatelyChat | {
"repo_name": "gautammadaan/EmergencySNRest",
"path": "src/it/java/edu/cmu/sv/ws/ssnoc/test/MessageServiceIT.java",
"license": "apache-2.0",
"size": 2484
} | [
"com.eclipsesource.restfuse.MediaType",
"com.eclipsesource.restfuse.Method",
"com.eclipsesource.restfuse.annotation.HttpTest",
"org.junit.Assert"
] | import com.eclipsesource.restfuse.MediaType; import com.eclipsesource.restfuse.Method; import com.eclipsesource.restfuse.annotation.HttpTest; import org.junit.Assert; | import com.eclipsesource.restfuse.*; import com.eclipsesource.restfuse.annotation.*; import org.junit.*; | [
"com.eclipsesource.restfuse",
"org.junit"
] | com.eclipsesource.restfuse; org.junit; | 597,334 |
// Use the application context, which will ensure that you
// don't accidentally leak an Activity's context.
if (instance == null) {
instance = new SBDbManager(context.getApplicationContext());
}
else {
Log.w(CLSS,String.format("initialize: DB manager exists, re-i... | if (instance == null) { instance = new SBDbManager(context.getApplicationContext()); } else { Log.w(CLSS,String.format(STR)); } return instance; } | /**
* Use this method in the initial activity. We need to assign the context.
* @param context main activity
* @return the Singleton instance
*/ | Use this method in the initial activity. We need to assign the context | initialize | {
"repo_name": "chuckcoughlin/sarah-bella",
"path": "android/SBAssistant/app/src/main/java/chuckcoughlin/sb/assistant/db/SBDbManager.java",
"license": "mit",
"size": 10959
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 551,275 |
private void doneLoadBitmap(Bitmap bitmap, RectF bounds, int orientation) {
final View loading = findViewById(R.id.loading);
loading.setVisibility(View.GONE);
mOriginalBitmap = bitmap;
mOriginalBounds = bounds;
mOriginalRotation = orientation;
if (bitmap != null && bi... | void function(Bitmap bitmap, RectF bounds, int orientation) { final View loading = findViewById(R.id.loading); loading.setVisibility(View.GONE); mOriginalBitmap = bitmap; mOriginalBounds = bounds; mOriginalRotation = orientation; if (bitmap != null && bitmap.getWidth() != 0 && bitmap.getHeight() != 0) { RectF imgBounds... | /**
* Method called on UI thread with loaded bitmap.
*/ | Method called on UI thread with loaded bitmap | doneLoadBitmap | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "packages/apps/Gallery2/src/com/android/gallery3d/filtershow/crop/CropActivity.java",
"license": "gpl-3.0",
"size": 31476
} | [
"android.content.Intent",
"android.graphics.Bitmap",
"android.graphics.RectF",
"android.util.Log",
"android.view.View"
] | import android.content.Intent; import android.graphics.Bitmap; import android.graphics.RectF; import android.util.Log; import android.view.View; | import android.content.*; import android.graphics.*; import android.util.*; import android.view.*; | [
"android.content",
"android.graphics",
"android.util",
"android.view"
] | android.content; android.graphics; android.util; android.view; | 428,333 |
private static void writeSpecialForms(PrintStream out) throws
MorphologicalAnalyserBuildException {
String addPath = getPath(EXTENSION_FULL_DICTIONARY_ADD);
File addFile = new File(addPath);
if (addFile.exists() && addFile.canRead()) {
try (BufferedReader reader ... | static void function(PrintStream out) throws MorphologicalAnalyserBuildException { String addPath = getPath(EXTENSION_FULL_DICTIONARY_ADD); File addFile = new File(addPath); if (addFile.exists() && addFile.canRead()) { try (BufferedReader reader = new BufferedReader(new InputStreamReader( new FileInputStream(addFile), ... | /**
* Adds forms from ..._toadd.txt file.
*
* @param out Stream where special forms should be rewritten.
*
* @throws MorphologicalAnalyserBuildException
*/ | Adds forms from ..._toadd.txt file | writeSpecialForms | {
"repo_name": "Neurpheus/manalyser",
"path": "src/main/java/org/neurpheus/nlp/morphology/builder/FullDictionaryGenerator.java",
"license": "lgpl-3.0",
"size": 8899
} | [
"java.io.BufferedReader",
"java.io.File",
"java.io.FileInputStream",
"java.io.InputStreamReader",
"java.io.PrintStream"
] | import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.InputStreamReader; import java.io.PrintStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,270,909 |
public void tankDrive(double leftValue, double rightValue, boolean squaredInputs) {
if (!kTank_Reported) {
HAL.report(31, getNumMotors(), 4);
kTank_Reported = true;
}
leftValue = limit(leftValue);
rightValue = limit(rightValue);
if (squaredInputs) {
... | void function(double leftValue, double rightValue, boolean squaredInputs) { if (!kTank_Reported) { HAL.report(31, getNumMotors(), 4); kTank_Reported = true; } leftValue = limit(leftValue); rightValue = limit(rightValue); if (squaredInputs) { if (leftValue >= 0.0D) { leftValue *= leftValue; } else { leftValue = -(leftVa... | /**
* Simple method to drive the robot like a tank
* @author Alexander Kaschta
* @param leftValue value for the left motors
* @param rightValue value for the right motors
* @param squaredInputs are the input values already squared?
*/ | Simple method to drive the robot like a tank | tankDrive | {
"repo_name": "AlexanderKaschta/AdvancedRobotDrive",
"path": "src/de/codeteddy/robotics/first/AdvancedRobotDrive.java",
"license": "apache-2.0",
"size": 23641
} | [
"edu.wpi.first.wpilibj.hal.HAL"
] | import edu.wpi.first.wpilibj.hal.HAL; | import edu.wpi.first.wpilibj.hal.*; | [
"edu.wpi.first"
] | edu.wpi.first; | 459,097 |
public static String getMandatoryExtraString(Intent intent, String key)
throws IntentParsingException {
if (!intent.hasExtra(key)) {
throw new IntentParsingException(
String.format("Intent does not contain %s extra parameter", key));
}
return intent.getStringExtra(key);
}
pub... | static String function(Intent intent, String key) throws IntentParsingException { if (!intent.hasExtra(key)) { throw new IntentParsingException( String.format(STR, key)); } return intent.getStringExtra(key); } public static class IntentParsingException extends Exception { public IntentParsingException(String message) {... | /**
* Gets a mandatory extra value from an Intent.
*
* @throws IntentParsingException if key is not found.
*/ | Gets a mandatory extra value from an Intent | getMandatoryExtraString | {
"repo_name": "google/google-authenticator-android",
"path": "java/com/google/android/apps/authenticator/util/IntentUtils.java",
"license": "apache-2.0",
"size": 2478
} | [
"android.content.Intent",
"android.os.Parcelable"
] | import android.content.Intent; import android.os.Parcelable; | import android.content.*; import android.os.*; | [
"android.content",
"android.os"
] | android.content; android.os; | 1,434,923 |
void setCapabilityAssertion(CapabilityAssertion value); | void setCapabilityAssertion(CapabilityAssertion value); | /**
* Sets the value of the '{@link de.dfki.iui.basys.model.domain.resourceinstance.CapabilityApplication#getCapabilityAssertion <em>Capability Assertion</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Capability Assertion</em>' reference.
* @see #g... | Sets the value of the '<code>de.dfki.iui.basys.model.domain.resourceinstance.CapabilityApplication#getCapabilityAssertion Capability Assertion</code>' reference. | setCapabilityAssertion | {
"repo_name": "BaSys-PC1/models",
"path": "de.dfki.iui.basys.model.domain/src/de/dfki/iui/basys/model/domain/resourceinstance/CapabilityApplication.java",
"license": "epl-1.0",
"size": 2767
} | [
"de.dfki.iui.basys.model.domain.capability.CapabilityAssertion"
] | import de.dfki.iui.basys.model.domain.capability.CapabilityAssertion; | import de.dfki.iui.basys.model.domain.capability.*; | [
"de.dfki.iui"
] | de.dfki.iui; | 2,770,872 |
ServiceCall<Void> postPathGlobalValidAsync(final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException; | ServiceCall<Void> postPathGlobalValidAsync(final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException; | /**
* POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callback is null
* @... | POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed | postPathGlobalValidAsync | {
"repo_name": "yaqiyang/autorest",
"path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/azurespecials/SubscriptionInCredentials.java",
"license": "mit",
"size": 6103
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 877,633 |
@Test
public void testUpdateContainer() throws IOException {
String containerName = OzoneUtils.getRequestID();
ContainerData data = new ContainerData(containerName, containerID++, conf);
data.addMetadata("VOLUME", "shire");
data.addMetadata("owner", "bilbo");
containerManager.createContainer(
... | void function() throws IOException { String containerName = OzoneUtils.getRequestID(); ContainerData data = new ContainerData(containerName, containerID++, conf); data.addMetadata(STR, "shire"); data.addMetadata("owner", "bilbo"); containerManager.createContainer( createSingleNodePipeline(containerName), data); File or... | /**
* Tries to update an existing and non-existing container.
* Verifies container map and persistent data both updated.
*
* @throws IOException
*/ | Tries to update an existing and non-existing container. Verifies container map and persistent data both updated | testUpdateContainer | {
"repo_name": "ChetnaChaudhari/hadoop",
"path": "hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/common/impl/TestContainerPersistence.java",
"license": "apache-2.0",
"size": 33953
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException",
"org.apache.hadoop.fs.FileUtil",
"org.apache.hadoop.hdds.protocol.proto.ContainerProtos",
"org.apache.hadoop.hdds.scm.container.common.helpers.StorageContainerException",
"org.apache.hadoop.ozone.container.common.helpers.ContainerData",
... | import java.io.File; import java.io.FileInputStream; import java.io.IOException; import org.apache.hadoop.fs.FileUtil; import org.apache.hadoop.hdds.protocol.proto.ContainerProtos; import org.apache.hadoop.hdds.scm.container.common.helpers.StorageContainerException; import org.apache.hadoop.ozone.container.common.helpe... | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdds.protocol.proto.*; import org.apache.hadoop.hdds.scm.container.common.helpers.*; import org.apache.hadoop.ozone.container.common.helpers.*; import org.apache.hadoop.ozone.web.utils.*; import org.junit.*; | [
"java.io",
"org.apache.hadoop",
"org.junit"
] | java.io; org.apache.hadoop; org.junit; | 945,292 |
public String processAddCommentToDeniedMsg()
{
if(selectedTopic == null)
{
LOG.debug("selectedTopic is null in processAddCommentToDeniedMsg");
return gotoMain();
}
if (!selectedTopic.getIsModeratedAndHasPerm())
{
setErrorMessage(getResourceBundleString(INSUFFICIENT_PRIVILEGES_TO_ADD_... | String function() { if(selectedTopic == null) { LOG.debug(STR); return gotoMain(); } if (!selectedTopic.getIsModeratedAndHasPerm()) { setErrorMessage(getResourceBundleString(INSUFFICIENT_PRIVILEGES_TO_ADD_COMMENT)); return ADD_COMMENT; } if (moderatorComments == null moderatorComments.trim().length() < 1) { setErrorMes... | /**
* Moderators may add a comment that is prepended to the text
* of the denied msg
* @return
*/ | Moderators may add a comment that is prepended to the text of the denied msg | processAddCommentToDeniedMsg | {
"repo_name": "eemirtekin/Sakai-10.6-TR",
"path": "msgcntr/messageforums-app/src/java/org/sakaiproject/tool/messageforums/DiscussionForumTool.java",
"license": "apache-2.0",
"size": 351472
} | [
"org.sakaiproject.api.app.messageforums.DiscussionTopic",
"org.sakaiproject.api.app.messageforums.Message",
"org.sakaiproject.user.cover.UserDirectoryService"
] | import org.sakaiproject.api.app.messageforums.DiscussionTopic; import org.sakaiproject.api.app.messageforums.Message; import org.sakaiproject.user.cover.UserDirectoryService; | import org.sakaiproject.api.app.messageforums.*; import org.sakaiproject.user.cover.*; | [
"org.sakaiproject.api",
"org.sakaiproject.user"
] | org.sakaiproject.api; org.sakaiproject.user; | 1,700,002 |
protected void resetDefaultPref() {
SoulissDBLauncherHelper database = new SoulissDBLauncherHelper(parent);
List<LauncherElement> po = database.getLauncherItems(parent);
List<LauncherElement> def = database.getDefaultStaticDBLauncherElements();
int cont = 0;
//contains funzio... | void function() { SoulissDBLauncherHelper database = new SoulissDBLauncherHelper(parent); List<LauncherElement> po = database.getLauncherItems(parent); List<LauncherElement> def = database.getDefaultStaticDBLauncherElements(); int cont = 0; for (LauncherElement la : def) { if (!po.contains(la)) { try { database.addElem... | /**
* Aggiunge i default mancanti
*/ | Aggiunge i default mancanti | resetDefaultPref | {
"repo_name": "souliss/soulissapp",
"path": "SoulissApp/src/main/java/it/angelic/soulissclient/preferences/LauncherRstListener.java",
"license": "mit",
"size": 2418
} | [
"android.widget.Toast",
"it.angelic.soulissclient.model.LauncherElement",
"it.angelic.soulissclient.model.SoulissModelException",
"it.angelic.soulissclient.model.db.SoulissDBLauncherHelper",
"java.util.List"
] | import android.widget.Toast; import it.angelic.soulissclient.model.LauncherElement; import it.angelic.soulissclient.model.SoulissModelException; import it.angelic.soulissclient.model.db.SoulissDBLauncherHelper; import java.util.List; | import android.widget.*; import it.angelic.soulissclient.model.*; import it.angelic.soulissclient.model.db.*; import java.util.*; | [
"android.widget",
"it.angelic.soulissclient",
"java.util"
] | android.widget; it.angelic.soulissclient; java.util; | 1,394,504 |
Set<AffectedComponentEntity> getComponentsAffectedByVariableRegistryUpdate(VariableRegistryDTO variableRegistryDto); | Set<AffectedComponentEntity> getComponentsAffectedByVariableRegistryUpdate(VariableRegistryDTO variableRegistryDto); | /**
* Determines which components will be affected by updating the given Variable Registry.
*
* @param variableRegistryDto the variable registry
* @return the components that will be affected
*/ | Determines which components will be affected by updating the given Variable Registry | getComponentsAffectedByVariableRegistryUpdate | {
"repo_name": "mans2singh/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java",
"license": "apache-2.0",
"size": 84641
} | [
"java.util.Set",
"org.apache.nifi.web.api.dto.VariableRegistryDTO",
"org.apache.nifi.web.api.entity.AffectedComponentEntity"
] | import java.util.Set; import org.apache.nifi.web.api.dto.VariableRegistryDTO; import org.apache.nifi.web.api.entity.AffectedComponentEntity; | import java.util.*; import org.apache.nifi.web.api.dto.*; import org.apache.nifi.web.api.entity.*; | [
"java.util",
"org.apache.nifi"
] | java.util; org.apache.nifi; | 1,377,093 |
public static <V> ListenableFuture<V> whenAnyComplete(Iterable<? extends ListenableFuture<? extends V>> futures)
{
requireNonNull(futures, "futures is null");
checkArgument(stream(futures).findAny().isPresent(), "futures is empty");
ExtendedSettableFuture<V> firstCompletedFuture = Exten... | static <V> ListenableFuture<V> function(Iterable<? extends ListenableFuture<? extends V>> futures) { requireNonNull(futures, STR); checkArgument(stream(futures).findAny().isPresent(), STR); ExtendedSettableFuture<V> firstCompletedFuture = ExtendedSettableFuture.create(); for (ListenableFuture<? extends V> future : futu... | /**
* Creates a future that completes when the first future completes either normally
* or exceptionally. Cancellation of the future propagates to the supplied futures.
*/ | Creates a future that completes when the first future completes either normally or exceptionally. Cancellation of the future propagates to the supplied futures | whenAnyComplete | {
"repo_name": "dain/airlift",
"path": "concurrent/src/main/java/io/airlift/concurrent/MoreFutures.java",
"license": "apache-2.0",
"size": 27140
} | [
"com.google.common.base.Preconditions",
"com.google.common.util.concurrent.ListenableFuture",
"java.util.Objects"
] | import com.google.common.base.Preconditions; import com.google.common.util.concurrent.ListenableFuture; import java.util.Objects; | import com.google.common.base.*; import com.google.common.util.concurrent.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 756,781 |
public void update(InputStream is)
throws BundleException; | void function(InputStream is) throws BundleException; | /**
* Updates the bundle from an input stream
*/ | Updates the bundle from an input stream | update | {
"repo_name": "christianchristensen/resin",
"path": "modules/osgi/src/org/osgi/framework/Bundle.java",
"license": "gpl-2.0",
"size": 4110
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,902,624 |
protected void sequence_AOPMember(ISerializationContext context, SarlRequiredCapacity semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
| void function(ISerializationContext context, SarlRequiredCapacity semanticObject) { genericSequencer.createSequence(context, semanticObject); } | /**
* Contexts:
* AOPMember returns SarlRequiredCapacity
*
* Constraint:
* (annotationInfo=AOPMember_SarlRequiredCapacity_2_2_0 capacities+=JvmParameterizedTypeReference capacities+=JvmParameterizedTypeReference*)
*/ | Contexts: AOPMember returns SarlRequiredCapacity Constraint: (annotationInfo=AOPMember_SarlRequiredCapacity_2_2_0 capacities+=JvmParameterizedTypeReference capacities+=JvmParameterizedTypeReference*) | sequence_AOPMember | {
"repo_name": "jgfoster/sarl",
"path": "main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/serializer/SARLSemanticSequencer.java",
"license": "apache-2.0",
"size": 77560
} | [
"io.sarl.lang.sarl.SarlRequiredCapacity",
"org.eclipse.xtext.serializer.ISerializationContext"
] | import io.sarl.lang.sarl.SarlRequiredCapacity; import org.eclipse.xtext.serializer.ISerializationContext; | import io.sarl.lang.sarl.*; import org.eclipse.xtext.serializer.*; | [
"io.sarl.lang",
"org.eclipse.xtext"
] | io.sarl.lang; org.eclipse.xtext; | 579,084 |
public void writeAllSenseAlignmentsToBed(String outBedFile, int minAlignLength, float minPctIdentity) throws IOException {
writeAllSenseAlignmentsToBed(outBedFile, false, minAlignLength, minPctIdentity);
}
| void function(String outBedFile, int minAlignLength, float minPctIdentity) throws IOException { writeAllSenseAlignmentsToBed(outBedFile, false, minAlignLength, minPctIdentity); } | /**
* Write all pairwise alignments (sense direction only) to bed file in genome coordinates
* @param outBedFile Output bed file
* @param minAlignLength Min alignment length to keep
* @param minPctIdentity Min percent identity to keep
* @throws IOException
*/ | Write all pairwise alignments (sense direction only) to bed file in genome coordinates | writeAllSenseAlignmentsToBed | {
"repo_name": "mgarber/scriptureV2",
"path": "src/java/nextgen/core/alignment/FeatureSequenceAlignment.java",
"license": "lgpl-3.0",
"size": 18923
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 437,403 |
@ApiModelProperty(example = "TIDlOFkpzB7WjufO3OJUhy1fsvAa", value = "Consumer secret of the application")
public String getConsumerSecret() {
return consumerSecret;
} | @ApiModelProperty(example = STR, value = STR) String function() { return consumerSecret; } | /**
* Consumer secret of the application
* @return consumerSecret
**/ | Consumer secret of the application | getConsumerSecret | {
"repo_name": "jaadds/product-apim",
"path": "modules/integration/tests-common/clients/store/src/gen/java/org/wso2/am/integration/clients/store/api/v1/dto/ApplicationKeyDTO.java",
"license": "apache-2.0",
"size": 8700
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,752,804 |
public static String escapeHtmlAttributeNospace(SoyValue value) {
value = normalizeNull(value);
if (isSanitizedContentOfKind(value, SanitizedContent.ContentKind.HTML)) {
// |escapeHtmlAttributeNospace should only be used on attribute values that cannot have tags.
return stripHtmlTags(value.coerceT... | static String function(SoyValue value) { value = normalizeNull(value); if (isSanitizedContentOfKind(value, SanitizedContent.ContentKind.HTML)) { return stripHtmlTags(value.coerceToString(), null, false); } return escapeHtmlAttributeNospace(value.coerceToString()); } | /**
* Converts plain text to HTML by entity escaping, stripping tags in sanitized content so the
* result can safely be embedded in an unquoted HTML attribute value.
*/ | Converts plain text to HTML by entity escaping, stripping tags in sanitized content so the result can safely be embedded in an unquoted HTML attribute value | escapeHtmlAttributeNospace | {
"repo_name": "Medium/closure-templates",
"path": "java/src/com/google/template/soy/shared/internal/Sanitizers.java",
"license": "apache-2.0",
"size": 49479
} | [
"com.google.template.soy.data.SanitizedContent",
"com.google.template.soy.data.SoyValue"
] | import com.google.template.soy.data.SanitizedContent; import com.google.template.soy.data.SoyValue; | import com.google.template.soy.data.*; | [
"com.google.template"
] | com.google.template; | 1,860,319 |
public interface INotificationEventDelegate {
void notificationEventDelegate(Object sender, NotificationEventArgs args);
}
private List<INotificationEventDelegate> onNotificationEvent = new ArrayList<INotificationEventDelegate>(); | interface INotificationEventDelegate { void function(Object sender, NotificationEventArgs args); } private List<INotificationEventDelegate> onNotificationEvent = new ArrayList<INotificationEventDelegate>(); | /**
* Represents a delegate that is invoked when notifications are received
* from the server
*
* @param sender
* The StreamingSubscriptionConnection instance that received
* the events.
* @param args
* The event data.
*/ | Represents a delegate that is invoked when notifications are received from the server | notificationEventDelegate | {
"repo_name": "java-goodies/ews-java-api",
"path": "src/main/java/microsoft/exchange/webservices/data/StreamingSubscriptionConnection.java",
"license": "mit",
"size": 17225
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,698,660 |
public boolean isFullyIrrelevantForReview() {
for (final Stop s : this.stops) {
if (!s.isIrrelevantForReview(this.irrelevantCategories)) {
return false;
}
}
return true;
} | boolean function() { for (final Stop s : this.stops) { if (!s.isIrrelevantForReview(this.irrelevantCategories)) { return false; } } return true; } | /**
* Returns true iff all contained stops are irrelevant for review.
*/ | Returns true iff all contained stops are irrelevant for review | isFullyIrrelevantForReview | {
"repo_name": "tobiasbaum/reviewtool",
"path": "de.setsoftware.reviewtool.core/src/de/setsoftware/reviewtool/ordering/ChangePart.java",
"license": "epl-1.0",
"size": 15095
} | [
"de.setsoftware.reviewtool.model.changestructure.Stop"
] | import de.setsoftware.reviewtool.model.changestructure.Stop; | import de.setsoftware.reviewtool.model.changestructure.*; | [
"de.setsoftware.reviewtool"
] | de.setsoftware.reviewtool; | 2,296,424 |
@Override
public void initialize() {
DSMRDeviceConfiguration deviceConfig = getConfigAs(DSMRDeviceConfiguration.class);
logger.trace("Using configuration {}", deviceConfig);
updateStatus(ThingStatus.UNKNOWN);
receivedTimeoutNanos = TimeUnit.SECONDS.toNanos(deviceConfig.receivedT... | void function() { DSMRDeviceConfiguration deviceConfig = getConfigAs(DSMRDeviceConfiguration.class); logger.trace(STR, deviceConfig); updateStatus(ThingStatus.UNKNOWN); receivedTimeoutNanos = TimeUnit.SECONDS.toNanos(deviceConfig.receivedTimeout); try { DSMRDevice dsmrDevice = createDevice(deviceConfig); resetLastRecei... | /**
* Initializes this {@link DSMRBridgeHandler}.
*
* This method will get the corresponding configuration and initialize and start the corresponding
* {@link DSMRDevice}.
*/ | Initializes this <code>DSMRBridgeHandler</code>. This method will get the corresponding configuration and initialize and start the corresponding <code>DSMRDevice</code> | initialize | {
"repo_name": "lewie/openhab2",
"path": "addons/binding/org.openhab.binding.dsmr/src/main/java/org/openhab/binding/dsmr/handler/DSMRBridgeHandler.java",
"license": "epl-1.0",
"size": 11573
} | [
"java.util.concurrent.TimeUnit",
"org.eclipse.smarthome.core.thing.ThingStatus",
"org.eclipse.smarthome.core.thing.ThingStatusDetail",
"org.openhab.binding.dsmr.internal.device.DSMRDevice",
"org.openhab.binding.dsmr.internal.device.DSMRDeviceConfiguration",
"org.openhab.binding.dsmr.internal.device.DSMRDe... | import java.util.concurrent.TimeUnit; import org.eclipse.smarthome.core.thing.ThingStatus; import org.eclipse.smarthome.core.thing.ThingStatusDetail; import org.openhab.binding.dsmr.internal.device.DSMRDevice; import org.openhab.binding.dsmr.internal.device.DSMRDeviceConfiguration; import org.openhab.binding.dsmr.inter... | import java.util.concurrent.*; import org.eclipse.smarthome.core.thing.*; import org.openhab.binding.dsmr.internal.device.*; | [
"java.util",
"org.eclipse.smarthome",
"org.openhab.binding"
] | java.util; org.eclipse.smarthome; org.openhab.binding; | 2,860,399 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Expression.class)) {
case DsPackage.EXPRESSION__VALUE:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
... | void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(Expression.class)) { case DsPackage.EXPRESSION__VALUE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } super.notifyChanged(notification); } | /**
* This handles model notifications by calling {@link #updateChildren} to
* update any cached
* children and by creating a viewer notification, which it passes to
* {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "chanakaudaya/developer-studio",
"path": "data-services/org.wso2.developerstudio.eclipse.ds.edit/src/org/wso2/developerstudio/eclipse/ds/provider/ExpressionItemProvider.java",
"license": "apache-2.0",
"size": 5636
} | [
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification",
"org.wso2.developerstudio.eclipse.ds.DsPackage",
"org.wso2.developerstudio.eclipse.ds.Expression"
] | import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; import org.wso2.developerstudio.eclipse.ds.DsPackage; import org.wso2.developerstudio.eclipse.ds.Expression; | import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; import org.wso2.developerstudio.eclipse.ds.*; | [
"org.eclipse.emf",
"org.wso2.developerstudio"
] | org.eclipse.emf; org.wso2.developerstudio; | 298,910 |
public SqlQuerySpec setParameters(List<SqlParameter> parameters) {
this.parameters = parameters;
return this;
} | SqlQuerySpec function(List<SqlParameter> parameters) { this.parameters = parameters; return this; } | /**
* Sets the container of query parameters.
*
* @param parameters the query parameters.
* @return the SqlQuerySpec.
*/ | Sets the container of query parameters | setParameters | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/SqlQuerySpec.java",
"license": "mit",
"size": 3914
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 811,547 |
public BigInteger computeFibonacci(int n) {
if (n < 0) {
throw new IllegalArgumentException("Fibonacci not defined for negative numbers: " + n);
}
if (n == 0) {
return BigInteger.ZERO;
}
Stream<BigInteger[]> fibonacci =
build... | BigInteger function(int n) { if (n < 0) { throw new IllegalArgumentException(STR + n); } if (n == 0) { return BigInteger.ZERO; } Stream<BigInteger[]> fibonacci = builder.afterIterator(Stream.iterate(ONE, i -> new BigInteger[] {i[1],i[0].add(i[1])})).limit(n); return fibonacci.max((a,b) -> a[1].compareTo(b[1])).get()[1]... | /**
* Compute the nth fibonacci number.
* @param n Which number to compute.
* @return The computed number.
*/ | Compute the nth fibonacci number | computeFibonacci | {
"repo_name": "RichardRoda/2017-CodePaLOUsa-Lambda",
"path": "sample/unit-test-stream/src/main/java/com/richardroda/example/unit/test/stream/fibonacci/builder/Fibonacci.java",
"license": "apache-2.0",
"size": 2151
} | [
"java.math.BigInteger",
"java.util.stream.Stream"
] | import java.math.BigInteger; import java.util.stream.Stream; | import java.math.*; import java.util.stream.*; | [
"java.math",
"java.util"
] | java.math; java.util; | 2,836,841 |
@ServiceMethod(returns = ReturnType.SINGLE)
Response<AutomationAccountInner> createOrUpdateWithResponse(
String resourceGroupName,
String automationAccountName,
AutomationAccountCreateOrUpdateParameters parameters,
Context context); | @ServiceMethod(returns = ReturnType.SINGLE) Response<AutomationAccountInner> createOrUpdateWithResponse( String resourceGroupName, String automationAccountName, AutomationAccountCreateOrUpdateParameters parameters, Context context); | /**
* Create or update automation account.
*
* @param resourceGroupName Name of an Azure Resource group.
* @param automationAccountName The name of the automation account.
* @param parameters Parameters supplied to the create or update automation account.
* @param context The context to as... | Create or update automation account | createOrUpdateWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/automation/azure-resourcemanager-automation/src/main/java/com/azure/resourcemanager/automation/fluent/AutomationAccountsClient.java",
"license": "mit",
"size": 9941
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.automation.fluent.models.AutomationAccountInner",
"com.azure.resourcemanager.automation.models.AutomationAccountCreateOrUpdatePa... | 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.automation.fluent.models.AutomationAccountInner; import com.azure.resourcemanager.automation.models.AutomationAccoun... | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.automation.fluent.models.*; import com.azure.resourcemanager.automation.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 233,865 |
public List<Synapse> getSynapses() {
return outgoing;
}
public Neuron() {
this.activator = new SigmoidActivator();
initVars();
} | List<Synapse> function() { return outgoing; } public Neuron() { this.activator = new SigmoidActivator(); initVars(); } | /**
* Return the List object containing the synapses
* @return
*/ | Return the List object containing the synapses | getSynapses | {
"repo_name": "admirf/tvojastara",
"path": "Neural/src/com/fusion/neural/Neuron.java",
"license": "apache-2.0",
"size": 3019
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,544,495 |
public static org.opennms.netmgt.config.syslogd.Match unmarshal(
final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (org.opennms.netmgt.config.syslogd.Match) Unmarshaller.unmarshal(org.opennms.netmgt.config.syslogd.M... | static org.opennms.netmgt.config.syslogd.Match function( final java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (org.opennms.netmgt.config.syslogd.Match) Unmarshaller.unmarshal(org.opennms.netmgt.config.syslogd.Match.class, reader); } | /**
* Method unmarshal.
*
* @param reader
* @throws org.exolab.castor.xml.MarshalException if object is
* null or if any SAXException is thrown during marshaling
* @throws org.exolab.castor.xml.ValidationException if this
* object is an invalid instance according to the schema
*... | Method unmarshal | unmarshal | {
"repo_name": "vishwaAbhinav/OpenNMS",
"path": "opennms-config/target/generated-sources/castor/org/opennms/netmgt/config/syslogd/Match.java",
"license": "gpl-2.0",
"size": 9410
} | [
"org.exolab.castor.xml.Unmarshaller"
] | import org.exolab.castor.xml.Unmarshaller; | import org.exolab.castor.xml.*; | [
"org.exolab.castor"
] | org.exolab.castor; | 2,659,734 |
void deleteIndex() throws SearchEngineException; | void deleteIndex() throws SearchEngineException; | /**
* Deletes the spell check index.
*/ | Deletes the spell check index | deleteIndex | {
"repo_name": "baboune/compass",
"path": "src/main/src/org/compass/core/engine/spellcheck/SearchEngineSpellCheckManager.java",
"license": "apache-2.0",
"size": 3665
} | [
"org.compass.core.engine.SearchEngineException"
] | import org.compass.core.engine.SearchEngineException; | import org.compass.core.engine.*; | [
"org.compass.core"
] | org.compass.core; | 2,581,647 |
public void setAttributes(List<ITSAnnotAttribute> attributes) {
this.attributes = attributes;
}
| void function(List<ITSAnnotAttribute> attributes) { this.attributes = attributes; } | /**
* Sets the attributes
* @param attributes the attributes
*/ | Sets the attributes | setAttributes | {
"repo_name": "freme-project/e-Internationalization",
"path": "src/main/java/eu/freme/i18n/okapi/nif/its/ITSAnnotation.java",
"license": "apache-2.0",
"size": 2176
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 291,632 |
private int removeExistingSignatures( File workDirectory )
throws MojoExecutionException
{
getLog().info( "-- Remove existing signatures" );
// cleanup tempDir if exists
File tempDir = new File( workDirectory, "temp_extracted_jars" );
ioUtil.removeDirectory( tempDir ... | int function( File workDirectory ) throws MojoExecutionException { getLog().info( STR ); File tempDir = new File( workDirectory, STR ); ioUtil.removeDirectory( tempDir ); ioUtil.makeDirectoryIfNecessary( tempDir ); File[] jarFiles = workDirectory.listFiles( unprocessedJarFileFilter ); for ( File jarFile : jarFiles ) { ... | /**
* Removes the signature of the files in the specified directory which satisfy the
* specified filter.
*
* @param workDirectory working directory used to unsign jars
* @return the number of unsigned jars
* @throws MojoExecutionException if could not remove signatures
*/ | Removes the signature of the files in the specified directory which satisfy the specified filter | removeExistingSignatures | {
"repo_name": "doychin/webstart",
"path": "webstart-maven-plugin/src/main/java/org/codehaus/mojo/webstart/AbstractBaseJnlpMojo.java",
"license": "mit",
"size": 33896
} | [
"java.io.File",
"org.apache.maven.plugin.MojoExecutionException"
] | import java.io.File; import org.apache.maven.plugin.MojoExecutionException; | import java.io.*; import org.apache.maven.plugin.*; | [
"java.io",
"org.apache.maven"
] | java.io; org.apache.maven; | 134,257 |
Response fallbackResponse(String route, Throwable cause); | Response fallbackResponse(String route, Throwable cause); | /**
* Provides a fallback response based on the cause of the failed execution.
*
* @param route The route the fallback is for
* @param cause cause of the main method failure, may be <code>null</code>
* @return the fallback response
*/ | Provides a fallback response based on the cause of the failed execution | fallbackResponse | {
"repo_name": "alibaba/Sentinel",
"path": "sentinel-adapter/sentinel-jax-rs-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/jaxrs/fallback/SentinelJaxRsFallback.java",
"license": "apache-2.0",
"size": 1504
} | [
"javax.ws.rs.core.Response"
] | import javax.ws.rs.core.Response; | import javax.ws.rs.core.*; | [
"javax.ws"
] | javax.ws; | 938,704 |
void addEmptyModelForJoinTable(String associatedModelName) {
Set<Long> associatedIdsM2MSet = getAssociatedModelsMapForJoinTable().get(
associatedModelName);
if (associatedIdsM2MSet == null) {
associatedIdsM2MSet = new HashSet<Long>();
associatedModelsMapForJoinTable.put(associatedModelName, associatedI... | void addEmptyModelForJoinTable(String associatedModelName) { Set<Long> associatedIdsM2MSet = getAssociatedModelsMapForJoinTable().get( associatedModelName); if (associatedIdsM2MSet == null) { associatedIdsM2MSet = new HashSet<Long>(); associatedModelsMapForJoinTable.put(associatedModelName, associatedIdsM2MSet); } } | /**
* Add an empty Set into {@link #associatedModelsMapForJoinTable} with
* associated model name as key. Might be useful when comes to update
* intermediate join table.
*
* @param associatedModelName
* The name of associated model.
*/ | Add an empty Set into <code>#associatedModelsMapForJoinTable</code> with associated model name as key. Might be useful when comes to update intermediate join table | addEmptyModelForJoinTable | {
"repo_name": "stepway/LitePal",
"path": "litepal/src/main/java/org/litepal/crud/DataSupport.java",
"license": "apache-2.0",
"size": 44405
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 997,400 |
void graphIntersection(Graph<INode, IConnection> graph); | void graphIntersection(Graph<INode, IConnection> graph); | /**
* Intersects the underlying graph of this viewport with the given graph. Meaning only common node and
* connections with the given graph will remain in the underlying graph.
* @param graph
*/ | Intersects the underlying graph of this viewport with the given graph. Meaning only common node and connections with the given graph will remain in the underlying graph | graphIntersection | {
"repo_name": "TruffleHogProject/TruffleHog",
"path": "src/main/java/edu/kit/trufflehog/model/network/INetworkViewPort.java",
"license": "gpl-2.0",
"size": 3847
} | [
"edu.kit.trufflehog.model.network.graph.IConnection",
"edu.kit.trufflehog.model.network.graph.INode",
"edu.uci.ics.jung.graph.Graph"
] | import edu.kit.trufflehog.model.network.graph.IConnection; import edu.kit.trufflehog.model.network.graph.INode; import edu.uci.ics.jung.graph.Graph; | import edu.kit.trufflehog.model.network.graph.*; import edu.uci.ics.jung.graph.*; | [
"edu.kit.trufflehog",
"edu.uci.ics"
] | edu.kit.trufflehog; edu.uci.ics; | 209,525 |
public void setAppNameStr(String appNameStr) {
this.appNameStr = appNameStr;
}
public boolean recordFunctionInformation;
boolean checksOnly;
static enum OutputJs {
// Don't output anything.
NONE,
// Output a "sentinel" file containing just a comment.
SENTINEL,
// Output the compi... | void function(String appNameStr) { this.appNameStr = appNameStr; } public boolean recordFunctionInformation; boolean checksOnly; static enum OutputJs { NONE, SENTINEL, NORMAL, } OutputJs outputJs; public boolean generateExports; boolean generateExportsAfterTypeChecking; boolean exportLocalPropertyDefinitions; public Cs... | /**
* App identifier string for use by the instrumentation template's
* app_name_setter. @see #instrumentationTemplate
*/ | App identifier string for use by the instrumentation template's app_name_setter. @see #instrumentationTemplate | setAppNameStr | {
"repo_name": "Dominator008/closure-compiler",
"path": "src/com/google/javascript/jscomp/CompilerOptions.java",
"license": "apache-2.0",
"size": 102721
} | [
"com.google.common.collect.ImmutableList",
"com.google.common.collect.ImmutableMap",
"com.google.javascript.jscomp.deps.ModuleLoader",
"java.util.List",
"java.util.Map",
"java.util.Set"
] | import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.javascript.jscomp.deps.ModuleLoader; import java.util.List; import java.util.Map; import java.util.Set; | import com.google.common.collect.*; import com.google.javascript.jscomp.deps.*; import java.util.*; | [
"com.google.common",
"com.google.javascript",
"java.util"
] | com.google.common; com.google.javascript; java.util; | 2,684,208 |
@Override
public Set<Integer> getDescriptions() {
return descriptions.keySet();
} | Set<Integer> function() { return descriptions.keySet(); } | /**
* Utility method to obtain all the descriptions stored in this case base
*
* @return a set of ids.
*/ | Utility method to obtain all the descriptions stored in this case base | getDescriptions | {
"repo_name": "Tell1/LMSRecommender",
"path": "LMSRecommenderOS/src/main/domain/collaborativeFilterRecommender/LMSMatrixCaseBase.java",
"license": "gpl-2.0",
"size": 16903
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,591,566 |
Messages getContainerMessages(); | Messages getContainerMessages(); | /**
* Returns the message catalog for the container of the {@link org.apache.tapestry5.corelib.components.BeanEditForm},
* which is the correct place to look for strings used for labels, etc.
*/ | Returns the message catalog for the container of the <code>org.apache.tapestry5.corelib.components.BeanEditForm</code>, which is the correct place to look for strings used for labels, etc | getContainerMessages | {
"repo_name": "agileowl/tapestry-5",
"path": "tapestry-core/src/main/java/org/apache/tapestry5/services/PropertyEditContext.java",
"license": "apache-2.0",
"size": 2906
} | [
"org.apache.tapestry5.ioc.Messages"
] | import org.apache.tapestry5.ioc.Messages; | import org.apache.tapestry5.ioc.*; | [
"org.apache.tapestry5"
] | org.apache.tapestry5; | 1,165,909 |
public void shutdown() {
LOG.info("Shutting down replication worker");
synchronized (this) {
if (!workerRunning) {
return;
}
workerRunning = false;
}
LOG.info("Shutting down ReplicationWorker");
this.pendingReplicationTimer... | void function() { LOG.info(STR); synchronized (this) { if (!workerRunning) { return; } workerRunning = false; } LOG.info(STR); this.pendingReplicationTimer.cancel(); try { this.workerThread.interrupt(); this.workerThread.join(); } catch (InterruptedException e) { LOG.error(STR, e); Thread.currentThread().interrupt(); }... | /**
* Stop the replication worker service
*/ | Stop the replication worker service | shutdown | {
"repo_name": "robindh/bookkeeper",
"path": "bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/ReplicationWorker.java",
"license": "apache-2.0",
"size": 20799
} | [
"org.apache.bookkeeper.client.BKException",
"org.apache.bookkeeper.replication.ReplicationException"
] | import org.apache.bookkeeper.client.BKException; import org.apache.bookkeeper.replication.ReplicationException; | import org.apache.bookkeeper.client.*; import org.apache.bookkeeper.replication.*; | [
"org.apache.bookkeeper"
] | org.apache.bookkeeper; | 585,703 |
protected void doRebind(WebdavRequest request, WebdavResponse response,
DavResource resource) throws IOException, DavException {
if (!resource.exists()) {
response.sendError(DavServletResponse.SC_NOT_FOUND);
}
RebindInfo rebindInfo = request.getRebind... | void function(WebdavRequest request, WebdavResponse response, DavResource resource) throws IOException, DavException { if (!resource.exists()) { response.sendError(DavServletResponse.SC_NOT_FOUND); } RebindInfo rebindInfo = request.getRebindInfo(); DavResource oldBinding = getResourceFactory().createResource(request.ge... | /**
* The REBIND method
*
* @param request
* @param response
* @param resource the collection resource to which a new member will be added
* @throws IOException
* @throws DavException
*/ | The REBIND method | doRebind | {
"repo_name": "apache/jackrabbit",
"path": "jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/server/AbstractWebdavServlet.java",
"license": "apache-2.0",
"size": 58436
} | [
"java.io.IOException",
"org.apache.jackrabbit.webdav.DavException",
"org.apache.jackrabbit.webdav.DavResource",
"org.apache.jackrabbit.webdav.DavServletResponse",
"org.apache.jackrabbit.webdav.WebdavRequest",
"org.apache.jackrabbit.webdav.WebdavResponse",
"org.apache.jackrabbit.webdav.bind.BindableResou... | import java.io.IOException; import org.apache.jackrabbit.webdav.DavException; import org.apache.jackrabbit.webdav.DavResource; import org.apache.jackrabbit.webdav.DavServletResponse; import org.apache.jackrabbit.webdav.WebdavRequest; import org.apache.jackrabbit.webdav.WebdavResponse; import org.apache.jackrabbit.webda... | import java.io.*; import org.apache.jackrabbit.webdav.*; import org.apache.jackrabbit.webdav.bind.*; | [
"java.io",
"org.apache.jackrabbit"
] | java.io; org.apache.jackrabbit; | 2,642,018 |
List<XSFacet> getDeclaredFacets( String name ); | List<XSFacet> getDeclaredFacets( String name ); | /**
* Gets the declared facets of the given name.
*
* This method is for those facets (such as 'pattern') that
* can be specified multiple times on a simple type.
*
* @return
* can be empty but never be null.
*/ | Gets the declared facets of the given name. This method is for those facets (such as 'pattern') that can be specified multiple times on a simple type | getDeclaredFacets | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/XSRestrictionSimpleType.java",
"license": "gpl-2.0",
"size": 2701
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,184,887 |
public void validate(Map<String, Object> context, String mode, Locale locale) throws ServiceValidationException {
Map<String, String> requiredInfo = FastMap.newInstance();
Map<String, String> optionalInfo = FastMap.newInstance();
boolean verboseOn = Debug.verboseOn();
if (verboseOn)... | void function(Map<String, Object> context, String mode, Locale locale) throws ServiceValidationException { Map<String, String> requiredInfo = FastMap.newInstance(); Map<String, String> optionalInfo = FastMap.newInstance(); boolean verboseOn = Debug.verboseOn(); if (verboseOn) Debug.logVerbose(STR + this.name + STR + co... | /**
* Validates a Map against the IN or OUT parameter information
* @param context the context
* @param mode Test either mode IN or mode OUT
* @param locale the actual locale to use
*/ | Validates a Map against the IN or OUT parameter information | validate | {
"repo_name": "zamentur/ofbiz_ynh",
"path": "sources/framework/service/src/org/ofbiz/service/ModelService.java",
"license": "apache-2.0",
"size": 95545
} | [
"java.util.List",
"java.util.Locale",
"java.util.Map",
"javolution.util.FastList",
"javolution.util.FastMap",
"org.ofbiz.base.util.Debug",
"org.ofbiz.base.util.StringUtil",
"org.ofbiz.base.util.UtilProperties"
] | import java.util.List; import java.util.Locale; import java.util.Map; import javolution.util.FastList; import javolution.util.FastMap; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilProperties; | import java.util.*; import javolution.util.*; import org.ofbiz.base.util.*; | [
"java.util",
"javolution.util",
"org.ofbiz.base"
] | java.util; javolution.util; org.ofbiz.base; | 1,017,713 |
public void fetch(Fetcher fetcher, String filterText, String channelKey,
String networkCode, String tag, String requestId, String userId) throws ServiceException {
Preconditions.checkNotNull(fetcher);
DfpSession session = getSession(channelKey, networkCode, tag, requestId, userId);
fetcher.fetch(fil... | void function(Fetcher fetcher, String filterText, String channelKey, String networkCode, String tag, String requestId, String userId) throws ServiceException { Preconditions.checkNotNull(fetcher); DfpSession session = getSession(channelKey, networkCode, tag, requestId, userId); fetcher.fetch(filterText, channelKey, tag... | /**
* Fetch API objects on the user's network.
*
* @param fetcher handles API object fetching
* @param filterText the PQL syntax filter text to filter objects by
* @param channelKey the key to send a message via the Channel AP
* @param networkCode the user's network code
* @param tag identifies tha... | Fetch API objects on the user's network | fetch | {
"repo_name": "googleads/googleads-dfp-java-dfp-playground",
"path": "src/main/java/com/google/api/ads/dfp/appengine/fetcher/FetchService.java",
"license": "apache-2.0",
"size": 3623
} | [
"com.google.api.ads.dfp.lib.client.DfpSession",
"com.google.common.base.Preconditions"
] | import com.google.api.ads.dfp.lib.client.DfpSession; import com.google.common.base.Preconditions; | import com.google.api.ads.dfp.lib.client.*; import com.google.common.base.*; | [
"com.google.api",
"com.google.common"
] | com.google.api; com.google.common; | 1,600,720 |
public Properties parse(InputStream in) throws IOException; | Properties function(InputStream in) throws IOException; | /**
* Parses the data from the supplied {@link InputStream}.
*
* @param in
* The InputStream from which to read the data.
* @throws IOException
* If an I/O error occurred while data was read from the
* InputStream.
*/ | Parses the data from the supplied <code>InputStream</code> | parse | {
"repo_name": "rac021/blazegraph_1_5_3_cluster_2_nodes",
"path": "rdf-properties/src/main/java/com/bigdata/rdf/properties/PropertiesParser.java",
"license": "gpl-2.0",
"size": 3625
} | [
"java.io.IOException",
"java.io.InputStream",
"java.util.Properties"
] | import java.io.IOException; import java.io.InputStream; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,094,693 |
public void setLocale(String locale) {
// set the language
setLocale(CmsLocaleManager.getLocale(locale));
}
| void function(String locale) { setLocale(CmsLocaleManager.getLocale(locale)); } | /**
* Sets the workplace locale.<p>
*
* @param locale the workplace language default
*/ | Sets the workplace locale | setLocale | {
"repo_name": "comundus/opencms-comundus",
"path": "src/main/java/org/opencms/configuration/CmsDefaultUserSettings.java",
"license": "lgpl-2.1",
"size": 35643
} | [
"org.opencms.i18n.CmsLocaleManager"
] | import org.opencms.i18n.CmsLocaleManager; | import org.opencms.i18n.*; | [
"org.opencms.i18n"
] | org.opencms.i18n; | 1,901,622 |
public BytesReference extraSource() {
return this.extraSource;
} | BytesReference function() { return this.extraSource; } | /**
* Additional search source to execute.
*/ | Additional search source to execute | extraSource | {
"repo_name": "weipinghe/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/action/search/SearchRequest.java",
"license": "apache-2.0",
"size": 16354
} | [
"org.elasticsearch.common.bytes.BytesReference"
] | import org.elasticsearch.common.bytes.BytesReference; | import org.elasticsearch.common.bytes.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 1,164,360 |
@SuppressWarnings("unused")
public void checkIn(Exchange exchange) throws Exception {
validateRequiredHeader(exchange, CamelCMISConstants.CMIS_OBJECT_ID);
Message message = exchange.getIn();
String objectId = message.getHeader(CamelCMISConstants.CMIS_OBJECT_ID, String.class);
S... | @SuppressWarnings(STR) void function(Exchange exchange) throws Exception { validateRequiredHeader(exchange, CamelCMISConstants.CMIS_OBJECT_ID); Message message = exchange.getIn(); String objectId = message.getHeader(CamelCMISConstants.CMIS_OBJECT_ID, String.class); String checkInComment = message.getHeader(PropertyIds.... | /**
* This method is called via reflection.
* It is not safe to delete it or rename it!
* Method's name are defined and retrieved from {@link CamelCMISActions}.
*/ | This method is called via reflection. It is not safe to delete it or rename it! Method's name are defined and retrieved from <code>CamelCMISActions</code> | checkIn | {
"repo_name": "objectiser/camel",
"path": "components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISProducer.java",
"license": "apache-2.0",
"size": 19465
} | [
"java.io.InputStream",
"java.util.Map",
"org.apache.camel.Exchange",
"org.apache.camel.Message",
"org.apache.chemistry.opencmis.client.api.Document",
"org.apache.chemistry.opencmis.commons.PropertyIds",
"org.apache.chemistry.opencmis.commons.data.ContentStream"
] | import java.io.InputStream; import java.util.Map; import org.apache.camel.Exchange; import org.apache.camel.Message; import org.apache.chemistry.opencmis.client.api.Document; import org.apache.chemistry.opencmis.commons.PropertyIds; import org.apache.chemistry.opencmis.commons.data.ContentStream; | import java.io.*; import java.util.*; import org.apache.camel.*; import org.apache.chemistry.opencmis.client.api.*; import org.apache.chemistry.opencmis.commons.*; import org.apache.chemistry.opencmis.commons.data.*; | [
"java.io",
"java.util",
"org.apache.camel",
"org.apache.chemistry"
] | java.io; java.util; org.apache.camel; org.apache.chemistry; | 2,273,410 |
public static Context getCurrentContext()
{
return __context.get();
}
protected Context _scontext;
private final AttributesMap _attributes;
private final AttributesMap _contextAttributes;
private final Map<String,String> _initParams;
private ClassLoader _classLoader;
p... | static Context function() { return __context.get(); } protected Context _scontext; private final AttributesMap _attributes; private final AttributesMap _contextAttributes; private final Map<String,String> _initParams; private ClassLoader _classLoader; private String _contextPath="/"; private String _displayName; privat... | /** Get the current ServletContext implementation.
* This call is only valid during a call to doStart and is available to
* nested handlers to access the context.
*
* @return ServletContext implementation
*/ | Get the current ServletContext implementation. This call is only valid during a call to doStart and is available to nested handlers to access the context | getCurrentContext | {
"repo_name": "mabrek/jetty",
"path": "jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java",
"license": "apache-2.0",
"size": 61919
} | [
"java.util.EventListener",
"java.util.HashMap",
"java.util.Map",
"java.util.Set",
"org.eclipse.jetty.http.MimeTypes",
"org.eclipse.jetty.server.HandlerContainer",
"org.eclipse.jetty.util.AttributesMap",
"org.eclipse.jetty.util.log.Logger",
"org.eclipse.jetty.util.resource.Resource"
] | import java.util.EventListener; import java.util.HashMap; import java.util.Map; import java.util.Set; import org.eclipse.jetty.http.MimeTypes; import org.eclipse.jetty.server.HandlerContainer; import org.eclipse.jetty.util.AttributesMap; import org.eclipse.jetty.util.log.Logger; import org.eclipse.jetty.util.resource.R... | import java.util.*; import org.eclipse.jetty.http.*; import org.eclipse.jetty.server.*; import org.eclipse.jetty.util.*; import org.eclipse.jetty.util.log.*; import org.eclipse.jetty.util.resource.*; | [
"java.util",
"org.eclipse.jetty"
] | java.util; org.eclipse.jetty; | 2,818,465 |
public RSAKeyContents generateKeys(RSAKeyMetadata metadata, int publicExp, int keyStrength, int certainty) {
lock.lock();
try {
ButtermilkRSAKeyPairGenerator kpGen = new ButtermilkRSAKeyPairGenerator(metadata);
kpGen.init(new RSAKeyGenerationParameters(BigInteger.valueOf(publicExp), rand, keyStrength, ... | RSAKeyContents function(RSAKeyMetadata metadata, int publicExp, int keyStrength, int certainty) { lock.lock(); try { ButtermilkRSAKeyPairGenerator kpGen = new ButtermilkRSAKeyPairGenerator(metadata); kpGen.init(new RSAKeyGenerationParameters(BigInteger.valueOf(publicExp), rand, keyStrength, certainty)); return kpGen.ge... | /**
* Set most parameters yourself
*
* @param metadata
* @param publicExp
* @param keyStrength
* @param certainty
* @return
*/ | Set most parameters yourself | generateKeys | {
"repo_name": "buttermilk-crypto/buttermilk",
"path": "buttermilk-core/src/main/java/com/cryptoregistry/rsa/CryptoFactory.java",
"license": "apache-2.0",
"size": 8652
} | [
"java.math.BigInteger",
"org.bouncycastle.crypto.params.RSAKeyGenerationParameters"
] | import java.math.BigInteger; import org.bouncycastle.crypto.params.RSAKeyGenerationParameters; | import java.math.*; import org.bouncycastle.crypto.params.*; | [
"java.math",
"org.bouncycastle.crypto"
] | java.math; org.bouncycastle.crypto; | 870,908 |
@Test void testWindowOnWindowDoesNotCombineProjects() {
final String query = "SELECT ROW_NUMBER() OVER (ORDER BY rn)\n"
+ "FROM (SELECT *,\n"
+ " ROW_NUMBER() OVER (ORDER BY \"product_id\") as rn\n"
+ " FROM \"foodmart\".\"product\")";
final String expected = "SELECT ROW_NUMBER() OVE... | @Test void testWindowOnWindowDoesNotCombineProjects() { final String query = STR + STR + STRproduct_id\STR + STRfoodmart\".\"product\")"; final String expected = STRRN\")\n" + STRproduct_class_id\STRproduct_id\STRbrand_name\"," + STRproduct_name\STRSKU\STRSRP\STRgross_weight\"," + STRnet_weight\STRrecyclable_package\ST... | /** Test case for
* <a href="https://issues.apache.org/jira/browse/CALCITE-3876">[CALCITE-3876]
* RelToSqlConverter should not combine Projects when top Project contains
* window function referencing window function from bottom Project</a>. */ | Test case for [CALCITE-3876] RelToSqlConverter should not combine Projects when top Project contains | testWindowOnWindowDoesNotCombineProjects | {
"repo_name": "jcamachor/calcite",
"path": "core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java",
"license": "apache-2.0",
"size": 255920
} | [
"org.junit.jupiter.api.Test"
] | import org.junit.jupiter.api.Test; | import org.junit.jupiter.api.*; | [
"org.junit.jupiter"
] | org.junit.jupiter; | 2,548,327 |
public boolean isScreenOn() {
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT_WATCH) {
DisplayManager dm = (DisplayManager) getSystemService(Context.DISPLAY_SERVICE);
boolean screenOn = false;
for (Display display : dm.getDisplays()) {
i... | boolean function() { if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT_WATCH) { DisplayManager dm = (DisplayManager) getSystemService(Context.DISPLAY_SERVICE); boolean screenOn = false; for (Display display : dm.getDisplays()) { if (display.getState() != Display.STATE_OFF) { screenOn = true; } } return... | /**
* Is the screen of the device on.
* @return true when (at least one) screen is on
* Method by userM1433372, taken from http://stackoverflow.com/a/28747907/1984350
*/ | Is the screen of the device on | isScreenOn | {
"repo_name": "AdeebNqo/Thula",
"path": "Thula/src/main/java/com/adeebnqo/Thula/ui/base/QKActivity.java",
"license": "gpl-3.0",
"size": 7678
} | [
"android.content.Context",
"android.hardware.display.DisplayManager",
"android.os.Build",
"android.os.PowerManager",
"android.view.Display"
] | import android.content.Context; import android.hardware.display.DisplayManager; import android.os.Build; import android.os.PowerManager; import android.view.Display; | import android.content.*; import android.hardware.display.*; import android.os.*; import android.view.*; | [
"android.content",
"android.hardware",
"android.os",
"android.view"
] | android.content; android.hardware; android.os; android.view; | 917,201 |
void register(Object obj, ObjectName name, boolean forceRegistration) throws JMException;
| void register(Object obj, ObjectName name, boolean forceRegistration) throws JMException; | /**
* Registers object with management infrastructure with a specific name. Object must be annotated or implement standard MBean interface.
*
* @param obj
* the object to register
* @param name
* the name
* @param forceRegistration
* if set to <tt>true</tt>, t... | Registers object with management infrastructure with a specific name. Object must be annotated or implement standard MBean interface | register | {
"repo_name": "roberthafner/flowable-engine",
"path": "modules/flowable-jmx/src/main/java/org/activiti/management/jmx/ManagementAgent.java",
"license": "apache-2.0",
"size": 2825
} | [
"javax.management.JMException",
"javax.management.ObjectName"
] | import javax.management.JMException; import javax.management.ObjectName; | import javax.management.*; | [
"javax.management"
] | javax.management; | 2,711,853 |
public SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs
(final float x_value, final float y_value,
final float x1_value, final float y1_value) {
return new SVGPathSegCurvetoQuadraticAbs(){
protected float x = x_value;
protected float y = y_v... | SVGPathSegCurvetoQuadraticAbs function (final float x_value, final float y_value, final float x1_value, final float y1_value) { return new SVGPathSegCurvetoQuadraticAbs(){ protected float x = x_value; protected float y = y_value; protected float x1 = x1_value; protected float y1 = y1_value; | /**
* <b>DOM</b>: Implements {@link
* SVGPathElement#createSVGPathSegCurvetoQuadraticAbs(float,float,float,float)}.
*/ | DOM: Implements <code>SVGPathElement#createSVGPathSegCurvetoQuadraticAbs(float,float,float,float)</code> | createSVGPathSegCurvetoQuadraticAbs | {
"repo_name": "Groostav/CMPT880-term-project",
"path": "intruder/benchs/batik/batik-1.7/sources/org/apache/batik/dom/svg/SVGOMPathElement.java",
"license": "apache-2.0",
"size": 31448
} | [
"org.w3c.dom.svg.SVGPathSegCurvetoQuadraticAbs"
] | import org.w3c.dom.svg.SVGPathSegCurvetoQuadraticAbs; | import org.w3c.dom.svg.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 351,642 |
return SsBSTemplateDetailsSsGlAccountCRecord.class;
}
public final TableField<SsBSTemplateDetailsSsGlAccountCRecord, String> ID = createField("id", org.jooq.impl.SQLDataType.VARCHAR.length(36).nullable(false), this, "");
public final TableField<SsBSTemplateDetailsSsGlAccountCRecord, Timestamp> D... | return SsBSTemplateDetailsSsGlAccountCRecord.class; } public final TableField<SsBSTemplateDetailsSsGlAccountCRecord, String> ID = createField("id", org.jooq.impl.SQLDataType.VARCHAR.length(36).nullable(false), this, STRdate_modifiedSTRSTRdeletedSTR0STRSTRss_b_s_template_details_ss_gl_accountss_b_s_template_details_idaS... | /**
* The class holding records for this type
*/ | The class holding records for this type | getRecordType | {
"repo_name": "SmartMedicalServices/SpringJOOQ",
"path": "src/main/java/com/sms/sis/db/tables/SsBSTemplateDetailsSsGlAccountC.java",
"license": "gpl-3.0",
"size": 4970
} | [
"com.sms.sis.db.tables.records.SsBSTemplateDetailsSsGlAccountCRecord",
"org.jooq.TableField"
] | import com.sms.sis.db.tables.records.SsBSTemplateDetailsSsGlAccountCRecord; import org.jooq.TableField; | import com.sms.sis.db.tables.records.*; import org.jooq.*; | [
"com.sms.sis",
"org.jooq"
] | com.sms.sis; org.jooq; | 192,792 |
public void actionEditProperties() throws IOException, JspException, ServletException {
boolean editProps = Boolean.valueOf(getParamNewResourceEditProps()).booleanValue();
String indexPageType = getParamSelectedType();
boolean createIndex = (CmsStringUtil.isNotEmptyOrWhitespaceOnly(in... | void function() throws IOException, JspException, ServletException { boolean editProps = Boolean.valueOf(getParamNewResourceEditProps()).booleanValue(); String indexPageType = getParamSelectedType(); boolean createIndex = (CmsStringUtil.isNotEmptyOrWhitespaceOnly(indexPageType)) && (!indexPageType.equals(ID_NO_INDEX_PA... | /**
* Forwards to the property dialog if the resourceeditprops parameter is true.<p>
*
* If the parameter is not true, the dialog will be closed.<p>
*
* @throws IOException if forwarding to the property dialog fails
* @throws ServletException if forwarding to the property dialog fa... | Forwards to the property dialog if the resourceeditprops parameter is true. If the parameter is not true, the dialog will be closed | actionEditProperties | {
"repo_name": "comundus/opencms-comundus",
"path": "src/main/java/org/opencms/workplace/explorer/CmsNewResourceFolder.java",
"license": "lgpl-2.1",
"size": 26569
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"javax.servlet.ServletException",
"javax.servlet.jsp.JspException",
"org.opencms.file.CmsResource",
"org.opencms.main.OpenCms",
"org.opencms.util.CmsRequestUtil",
"org.opencms.util.CmsStringUtil... | import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.jsp.JspException; import org.opencms.file.CmsResource; import org.opencms.main.OpenCms; import org.opencms.util.CmsRequestUtil; impor... | import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.jsp.*; import org.opencms.file.*; import org.opencms.main.*; import org.opencms.util.*; import org.opencms.workplace.commons.*; | [
"java.io",
"java.util",
"javax.servlet",
"org.opencms.file",
"org.opencms.main",
"org.opencms.util",
"org.opencms.workplace"
] | java.io; java.util; javax.servlet; org.opencms.file; org.opencms.main; org.opencms.util; org.opencms.workplace; | 759,164 |
public static void apply(final SharedPreferences.Editor editor) {
// Use the apply method if it exists
try {
applyMethod.invoke(editor);
return;
} catch (InvocationTargetException unused) {
// fall through
} catch (IllegalAccessException unused) {
// fall through
} | static void function(final SharedPreferences.Editor editor) { try { applyMethod.invoke(editor); return; } catch (InvocationTargetException unused) { } catch (IllegalAccessException unused) { } | /**
* Asynchronous commit of shared preferences values
*
* @param editor
*/ | Asynchronous commit of shared preferences values | apply | {
"repo_name": "chauhansaurabhb/IoTSuite-TemplateV3",
"path": "IotSuite-TemplateV3-master/AndroidDeviceDrivers/src/edu/mit/media/funf/util/AsyncSharedPrefs.java",
"license": "gpl-2.0",
"size": 10692
} | [
"android.content.SharedPreferences",
"java.lang.reflect.InvocationTargetException"
] | import android.content.SharedPreferences; import java.lang.reflect.InvocationTargetException; | import android.content.*; import java.lang.reflect.*; | [
"android.content",
"java.lang"
] | android.content; java.lang; | 2,324,588 |
private String setConfigurationParameters(Map<String,String> params, Map<String,Boolean> oldParams ){
String configuration = "";
Boolean noFirst=false;
//Get the parameters
Iterator it2 = params.keySet().iterator();
while (it2.hasNext()) {
String name = it2.next()... | String function(Map<String,String> params, Map<String,Boolean> oldParams ){ String configuration = STR , STRfalseSTR1STRtrueSTR\STR\STR + value; noFirst = true; } } Iterator itOld = oldParams.keySet().iterator(); while (itOld.hasNext()) { String name = itOld.next().toString(); if (!(params.containsKey(RubricsConstants.... | /**
* Prepare the association params in json format
* @param params the full list of rubrics params coming from the component
* @return
*/ | Prepare the association params in json format | setConfigurationParameters | {
"repo_name": "OpenCollabZA/sakai",
"path": "rubrics/impl/src/main/java/org/sakaiproject/rubrics/logic/RubricsServiceImpl.java",
"license": "apache-2.0",
"size": 62942
} | [
"java.util.Iterator",
"java.util.Map"
] | import java.util.Iterator; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 297,884 |
Keyspace getKeyspace(String keyspace) throws ConnectionException ; | Keyspace getKeyspace(String keyspace) throws ConnectionException ; | /**
* Return a keyspace client. Note that this keyspace will use the same
* connection pool as the cluster and any other keyspaces created from this
* cluster instance. As a result each keyspace operation is likely to have
* some overhead for switching keyspaces.
*/ | Return a keyspace client. Note that this keyspace will use the same connection pool as the cluster and any other keyspaces created from this cluster instance. As a result each keyspace operation is likely to have some overhead for switching keyspaces | getKeyspace | {
"repo_name": "bazaarvoice/astyanax",
"path": "astyanax-cassandra/src/main/java/com/netflix/astyanax/Cluster.java",
"license": "apache-2.0",
"size": 9281
} | [
"com.netflix.astyanax.connectionpool.exceptions.ConnectionException"
] | import com.netflix.astyanax.connectionpool.exceptions.ConnectionException; | import com.netflix.astyanax.connectionpool.exceptions.*; | [
"com.netflix.astyanax"
] | com.netflix.astyanax; | 2,510,372 |
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
{
return new TileEntityEnderChest();
} | TileEntity function(World p_149915_1_, int p_149915_2_) { return new TileEntityEnderChest(); } | /**
* Returns a new instance of a block's tile entity class. Called on placing the block.
*/ | Returns a new instance of a block's tile entity class. Called on placing the block | createNewTileEntity | {
"repo_name": "Myrninvollo/Server",
"path": "src/net/minecraft/block/BlockEnderChest.java",
"license": "gpl-2.0",
"size": 3576
} | [
"net.minecraft.tileentity.TileEntity",
"net.minecraft.tileentity.TileEntityEnderChest",
"net.minecraft.world.World"
] | import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityEnderChest; import net.minecraft.world.World; | import net.minecraft.tileentity.*; import net.minecraft.world.*; | [
"net.minecraft.tileentity",
"net.minecraft.world"
] | net.minecraft.tileentity; net.minecraft.world; | 2,746,975 |
Set<String> updateJarsForApplication(
final String id,
final Set<String> jars) throws GenieException; | Set<String> updateJarsForApplication( final String id, final Set<String> jars) throws GenieException; | /**
* Update the set of jar files associated with the application with given
* id.
*
* @param id The id of the application to update the jar files for. Not
* null/empty/blank.
* @param jars The jar files to replace existing jars with. Not null/empty.
* @return The active... | Update the set of jar files associated with the application with given id | updateJarsForApplication | {
"repo_name": "gorcz/genie",
"path": "genie-server/src/main/java/com/netflix/genie/server/services/ApplicationConfigService.java",
"license": "apache-2.0",
"size": 11071
} | [
"com.netflix.genie.common.exceptions.GenieException",
"java.util.Set"
] | import com.netflix.genie.common.exceptions.GenieException; import java.util.Set; | import com.netflix.genie.common.exceptions.*; import java.util.*; | [
"com.netflix.genie",
"java.util"
] | com.netflix.genie; java.util; | 329,513 |
public ChannelRank getFriendChatKickRank () {
return chatKickRank;
}
| ChannelRank function () { return chatKickRank; } | /**
* Gets the rank needed to kick other users from the player's friend chat channel
* @return The minimum kick rank
*/ | Gets the rank needed to kick other users from the player's friend chat channel | getFriendChatKickRank | {
"repo_name": "itsgreco/VirtueRS3",
"path": "src/org/virtue/game/content/friends/FriendsList.java",
"license": "mit",
"size": 21468
} | [
"org.virtue.game.content.friendchats.ChannelRank"
] | import org.virtue.game.content.friendchats.ChannelRank; | import org.virtue.game.content.friendchats.*; | [
"org.virtue.game"
] | org.virtue.game; | 1,637,833 |
public CourseRun closeRightsManagement() {
selenium.click("ui=rightsManagement::rightGroups_close()");
selenium.waitForPageToLoad("30000");
return new CourseRun(selenium);
} | CourseRun function() { selenium.click(STR); selenium.waitForPageToLoad("30000"); return new CourseRun(selenium); } | /**
* close the rights group and show Course run the group was inited by
*
* @return The courserun where we came from
*/ | close the rights group and show Course run the group was inited by | closeRightsManagement | {
"repo_name": "huihoo/olat",
"path": "olat7.8/src/test/java/org/olat/test/util/selenium/olatapi/group/RightsManagement.java",
"license": "apache-2.0",
"size": 1906
} | [
"org.olat.test.util.selenium.olatapi.course.run.CourseRun"
] | import org.olat.test.util.selenium.olatapi.course.run.CourseRun; | import org.olat.test.util.selenium.olatapi.course.run.*; | [
"org.olat.test"
] | org.olat.test; | 2,410,593 |
public synchronized LRValue<Short[], AppManagerResult> getAppVersion(String appIdentifier){
return appDB.getAppVersion(appIdentifier);
} | synchronized LRValue<Short[], AppManagerResult> function(String appIdentifier){ return appDB.getAppVersion(appIdentifier); } | /**
* Returns the version of a given app
* @param appIdentifier Application identifier
* @return 2 value array on success. [0] = MajorVersion [1} = MinorVersion. A value of AppManagerResult otherwise
*/ | Returns the version of a given app | getAppVersion | {
"repo_name": "Silveryard/BaseSystem",
"path": "Libraries/System/Java/BaseSystem/src/main/java/de/silveryard/basesystem/app/AppManager.java",
"license": "mit",
"size": 14255
} | [
"de.silveryard.basesystem.util.LRValue"
] | import de.silveryard.basesystem.util.LRValue; | import de.silveryard.basesystem.util.*; | [
"de.silveryard.basesystem"
] | de.silveryard.basesystem; | 1,433,690 |
public Response get(Cluster c, String path, Header[] headers)
throws IOException {
GetMethod method = new GetMethod();
try {
int code = execute(c, method, headers, path);
headers = method.getResponseHeaders();
byte[] body = method.getResponseBody();
InputStream in = method.getRe... | Response function(Cluster c, String path, Header[] headers) throws IOException { GetMethod method = new GetMethod(); try { int code = execute(c, method, headers, path); headers = method.getResponseHeaders(); byte[] body = method.getResponseBody(); InputStream in = method.getResponseBodyAsStream(); return new Response(c... | /**
* Send a GET request
* @param c the cluster definition
* @param path the path or URI
* @param headers the HTTP headers to include in the request
* @return a Response object with response detail
* @throws IOException
*/ | Send a GET request | get | {
"repo_name": "throughsky/lywebank",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java",
"license": "apache-2.0",
"size": 16111
} | [
"java.io.IOException",
"java.io.InputStream",
"org.apache.commons.httpclient.Header",
"org.apache.commons.httpclient.methods.GetMethod"
] | import java.io.IOException; import java.io.InputStream; import org.apache.commons.httpclient.Header; import org.apache.commons.httpclient.methods.GetMethod; | import java.io.*; import org.apache.commons.httpclient.*; import org.apache.commons.httpclient.methods.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 2,676,716 |
Collection<URI> getImageDirectories() throws IOException {
return getDirectories(NameNodeDirType.IMAGE);
} | Collection<URI> getImageDirectories() throws IOException { return getDirectories(NameNodeDirType.IMAGE); } | /**
* Retrieve current directories of type IMAGE
* @return Collection of URI representing image directories
* @throws IOException in case of URI processing error
*/ | Retrieve current directories of type IMAGE | getImageDirectories | {
"repo_name": "steveloughran/hadoop-hdfs",
"path": "src/java/org/apache/hadoop/hdfs/server/namenode/NNStorage.java",
"license": "apache-2.0",
"size": 33563
} | [
"java.io.IOException",
"java.util.Collection"
] | import java.io.IOException; import java.util.Collection; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,113,610 |
@Test
public void search5() {
Insertion.sortDescending(this.intArray1);
int index = BinarySearch.searchDescending(this.intArray1, 8);
Assert.assertTrue(index >= 0);
index = BinarySearch.search(this.intArray1, 75);
Assert.assertTrue(index < 0);
} | void function() { Insertion.sortDescending(this.intArray1); int index = BinarySearch.searchDescending(this.intArray1, 8); Assert.assertTrue(index >= 0); index = BinarySearch.search(this.intArray1, 75); Assert.assertTrue(index < 0); } | /**
* Test reverse search for primitives
*/ | Test reverse search for primitives | search5 | {
"repo_name": "mijecu25/dsa",
"path": "src/test/java/com/mijecu25/dsa/algorithms/search/logarithmic/TestBinarySearch.java",
"license": "mit",
"size": 2664
} | [
"com.mijecu25.dsa.algorithms.sort.quadratic.Insertion",
"org.junit.Assert"
] | import com.mijecu25.dsa.algorithms.sort.quadratic.Insertion; import org.junit.Assert; | import com.mijecu25.dsa.algorithms.sort.quadratic.*; import org.junit.*; | [
"com.mijecu25.dsa",
"org.junit"
] | com.mijecu25.dsa; org.junit; | 1,029,394 |
@Override
public void notifyChanged(Notification notification)
{
updateChildren(notification);
switch (notification.getFeatureID(Type.class)) {
case InittypesPackage.TYPE__NAME:
case InittypesPackage.TYPE__IS_TEXT:
case InittypesPackage.TYPE__IS_REFERENCE:
fireNotifyChanged(new ViewerNotif... | void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(Type.class)) { case InittypesPackage.TYPE__NAME: case InittypesPackage.TYPE__IS_TEXT: case InittypesPackage.TYPE__IS_REFERENCE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), fa... | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "pgaufillet/topcased-req",
"path": "plugins/org.topcased.typesmodel/src/org/topcased/typesmodel/model/inittypes/provider/TypeItemProvider.java",
"license": "epl-1.0",
"size": 6903
} | [
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification",
"org.topcased.typesmodel.model.inittypes.InittypesPackage",
"org.topcased.typesmodel.model.inittypes.Type"
] | import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; import org.topcased.typesmodel.model.inittypes.InittypesPackage; import org.topcased.typesmodel.model.inittypes.Type; | import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; import org.topcased.typesmodel.model.inittypes.*; | [
"org.eclipse.emf",
"org.topcased.typesmodel"
] | org.eclipse.emf; org.topcased.typesmodel; | 1,457,988 |
public void setUri(@NonNull final String uri) {
this.uri = Preconditions.checkNotNull(uri, "uri");
} | void function(@NonNull final String uri) { this.uri = Preconditions.checkNotNull(uri, "uri"); } | /**
* The document uri to show.
*/ | The document uri to show | setUri | {
"repo_name": "smarr/SOMns-vscode",
"path": "server/org.eclipse.lsp4j-gen/org/eclipse/lsp4j/ShowDocumentParams.java",
"license": "mit",
"size": 5396
} | [
"org.eclipse.lsp4j.jsonrpc.validation.NonNull",
"org.eclipse.lsp4j.util.Preconditions"
] | import org.eclipse.lsp4j.jsonrpc.validation.NonNull; import org.eclipse.lsp4j.util.Preconditions; | import org.eclipse.lsp4j.jsonrpc.validation.*; import org.eclipse.lsp4j.util.*; | [
"org.eclipse.lsp4j"
] | org.eclipse.lsp4j; | 2,893,073 |
void updateChecksum(MigrationVersion version, Integer checksum); | void updateChecksum(MigrationVersion version, Integer checksum); | /**
* Update the checksum for this version to this new value.
*
* @param version The version to update.
* @param checksum The new checksum.
*/ | Update the checksum for this version to this new value | updateChecksum | {
"repo_name": "mpage23/flyway",
"path": "flyway-core/src/main/java/org/flywaydb/core/internal/metadatatable/MetaDataTable.java",
"license": "apache-2.0",
"size": 3513
} | [
"org.flywaydb.core.api.MigrationVersion"
] | import org.flywaydb.core.api.MigrationVersion; | import org.flywaydb.core.api.*; | [
"org.flywaydb.core"
] | org.flywaydb.core; | 2,579,273 |
private TreeImageSet createGroup(GroupData group)
{
TreeImageDisplay root = getTreeRoot();
DefaultTreeModel tm = (DefaultTreeModel) treeDisplay.getModel();
//root.addChildDisplay(node);
//tm.insertNodeInto(node, root, root.getChildCount());
TreeImageSet n = new TreeImageSet(group);
... | TreeImageSet function(GroupData group) { TreeImageDisplay root = getTreeRoot(); DefaultTreeModel tm = (DefaultTreeModel) treeDisplay.getModel(); TreeImageSet n = new TreeImageSet(group); TreeViewerTranslator.formatToolTipFor(n); root.addChildDisplay(n); tm.insertNodeInto(n, root, root.getChildCount()); return n; } | /**
* Creates the group node.
*
* @param group The group to add.
* @return See above.
*/ | Creates the group node | createGroup | {
"repo_name": "simleo/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserUI.java",
"license": "gpl-2.0",
"size": 83096
} | [
"javax.swing.tree.DefaultTreeModel",
"org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay",
"org.openmicroscopy.shoola.agents.util.browser.TreeImageSet",
"org.openmicroscopy.shoola.agents.util.browser.TreeViewerTranslator"
] | import javax.swing.tree.DefaultTreeModel; import org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay; import org.openmicroscopy.shoola.agents.util.browser.TreeImageSet; import org.openmicroscopy.shoola.agents.util.browser.TreeViewerTranslator; | import javax.swing.tree.*; import org.openmicroscopy.shoola.agents.util.browser.*; | [
"javax.swing",
"org.openmicroscopy.shoola"
] | javax.swing; org.openmicroscopy.shoola; | 216,552 |
public String toString() {
StringBuffer buffer = new StringBuffer();
Iterator iter;
MibValueSymbol symbol;
buffer.append(super.toString());
if (symbols.size() > 0) {
buffer.append(" { ");
iter = symbols.values().iterator();
whil... | String function() { StringBuffer buffer = new StringBuffer(); Iterator iter; MibValueSymbol symbol; buffer.append(super.toString()); if (symbols.size() > 0) { buffer.append(STR); iter = symbols.values().iterator(); while (iter.hasNext()) { symbol = (MibValueSymbol) iter.next(); buffer.append(symbol.getName()); buffer.a... | /**
* Returns a string representation of this type.
*
* @return a string representation of this type
*/ | Returns a string representation of this type | toString | {
"repo_name": "richb-hanover/mibble-2.9.2",
"path": "src/java/net/percederberg/mibble/type/BitSetType.java",
"license": "gpl-2.0",
"size": 12848
} | [
"java.util.Iterator",
"net.percederberg.mibble.MibValueSymbol"
] | import java.util.Iterator; import net.percederberg.mibble.MibValueSymbol; | import java.util.*; import net.percederberg.mibble.*; | [
"java.util",
"net.percederberg.mibble"
] | java.util; net.percederberg.mibble; | 549,351 |
public static File getUserDirectory() {
return new File(getUserDirectoryPath());
}
//-----------------------------------------------------------------------
/**
* Opens a {@link FileInputStream} for the specified file, providing better
* error messages than simply calling <code>new F... | static File function() { return new File(getUserDirectoryPath()); } /** * Opens a {@link FileInputStream} for the specified file, providing better * error messages than simply calling <code>new FileInputStream(file)</code>. * <p/> * At the end of the method either the stream will be successfully opened, * or an excepti... | /**
* Returns a {@link File} representing the user's home directory.
*
* @return the user's home directory.
* @since 2.0
*/ | Returns a <code>File</code> representing the user's home directory | getUserDirectory | {
"repo_name": "lujianzhao/MVPArmsCopy",
"path": "arms/src/main/java/com/jess/arms/common/io/FileUtils.java",
"license": "apache-2.0",
"size": 104372
} | [
"java.io.File",
"java.io.FileInputStream"
] | import java.io.File; import java.io.FileInputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,386,074 |
protected void unlockAccept() {
Socket s = null;
try {
// Need to create a connection to unlock the accept();
if (address == null) {
s = new Socket("127.0.0.1", port);
} else {
s = new Socket(address, port);
// s... | void function() { Socket s = null; try { if (address == null) { s = new Socket(STR, port); } else { s = new Socket(address, port); s.setSoLinger(true, 0); } } catch (Exception e) { if (log.isDebugEnabled()) { log.debug(sm.getString(STR, "" + port), e); } } finally { if (s != null) { try { s.close(); } catch (Exception ... | /**
* Unlock the accept by using a local connection.
*/ | Unlock the accept by using a local connection | unlockAccept | {
"repo_name": "plumer/codana",
"path": "tomcat_files/6.0.0/JIoEndpoint.java",
"license": "mit",
"size": 21673
} | [
"java.net.Socket"
] | import java.net.Socket; | import java.net.*; | [
"java.net"
] | java.net; | 2,080,382 |
private DataSource createDataSource() throws Exception {
File customPropertiesFile = new File(System.getProperty("user.home") + "/flyway-mediumtests.properties");
Properties customProperties = new Properties();
if (customPropertiesFile.canRead()) {
customProperties.load(new FileI... | DataSource function() throws Exception { File customPropertiesFile = new File(System.getProperty(STR) + STR); Properties customProperties = new Properties(); if (customPropertiesFile.canRead()) { customProperties.load(new FileInputStream(customPropertiesFile)); } String user = customProperties.getProperty(STR, STR); St... | /**
* Creates a datasource for use in tests.
*
* @return The new datasource.
*/ | Creates a datasource for use in tests | createDataSource | {
"repo_name": "mpage23/flyway",
"path": "flyway-core/src/test/java/org/flywaydb/core/internal/dbsupport/postgresql/PostgreSQLDbSupportMediumTest.java",
"license": "apache-2.0",
"size": 2877
} | [
"java.io.File",
"java.io.FileInputStream",
"java.util.Properties",
"javax.sql.DataSource",
"org.flywaydb.core.internal.util.jdbc.DriverDataSource"
] | import java.io.File; import java.io.FileInputStream; import java.util.Properties; import javax.sql.DataSource; import org.flywaydb.core.internal.util.jdbc.DriverDataSource; | import java.io.*; import java.util.*; import javax.sql.*; import org.flywaydb.core.internal.util.jdbc.*; | [
"java.io",
"java.util",
"javax.sql",
"org.flywaydb.core"
] | java.io; java.util; javax.sql; org.flywaydb.core; | 2,406,241 |
public static LabelAndCode getLabel(String linePart) {
if (linePart.startsWith(".")) {
return null;
}
String linePart2 = Parser.replaceStrings(linePart, '_').trim();
int pos = linePart2.indexOf(" ");
if (pos != -1) {
return new LabelAndCode(linePart.substring(0, pos).replace(":", "").trim(), lineP... | static LabelAndCode function(String linePart) { if (linePart.startsWith(".")) { return null; } String linePart2 = Parser.replaceStrings(linePart, '_').trim(); int pos = linePart2.indexOf(" "); if (pos != -1) { return new LabelAndCode(linePart.substring(0, pos).replace(":", STR:STRSTR"); } } | /**
* Gets the label (and code) of a line. If a line contains a label and a
* mnemonic, getMnemonic() above will return null. This method will return the
* label and rest of the line, so that the rest can be used to call
* getMnemonic() again.
*
* @param linePart the line
* @return the label and code or ... | Gets the label (and code) of a line. If a line contains a label and a mnemonic, getMnemonic() above will return null. This method will return the label and rest of the line, so that the rest can be used to call getMnemonic() again | getLabel | {
"repo_name": "EgonOlsen71/basicv2",
"path": "src/main/java/com/sixtyfour/parser/assembly/AssemblyParser.java",
"license": "unlicense",
"size": 17009
} | [
"com.sixtyfour.parser.Parser"
] | import com.sixtyfour.parser.Parser; | import com.sixtyfour.parser.*; | [
"com.sixtyfour.parser"
] | com.sixtyfour.parser; | 685,079 |
return baseOffset;
}
/**
* Legt den Wert der baseOffset-Eigenschaft fest.
*
* @param value
* allowed object is
* {@link Duration } | return baseOffset; } /** * Legt den Wert der baseOffset-Eigenschaft fest. * * @param value * allowed object is * {@link Duration } | /**
* Ruft den Wert der baseOffset-Eigenschaft ab.
*
* @return
* possible object is
* {@link Duration }
*
*/ | Ruft den Wert der baseOffset-Eigenschaft ab | getBaseOffset | {
"repo_name": "dumischbaenger/ews-example",
"path": "src/main/java/de/dumischbaenger/ws/TimeZoneType.java",
"license": "gpl-3.0",
"size": 3761
} | [
"javax.xml.datatype.Duration"
] | import javax.xml.datatype.Duration; | import javax.xml.datatype.*; | [
"javax.xml"
] | javax.xml; | 1,091,317 |
public void removeAllOnCompletionDefinition(ProcessorDefinition<?> definition) {
for (Iterator<ProcessorDefinition<?>> it = definition.getOutputs().iterator(); it.hasNext();) {
ProcessorDefinition<?> out = it.next();
if (out instanceof OnCompletionDefinition) {
it.rem... | void function(ProcessorDefinition<?> definition) { for (Iterator<ProcessorDefinition<?>> it = definition.getOutputs().iterator(); it.hasNext();) { ProcessorDefinition<?> out = it.next(); if (out instanceof OnCompletionDefinition) { it.remove(); } } } | /**
* Removes all existing {@link org.apache.camel.model.OnCompletionDefinition} from the definition.
* <p/>
* This is used to let route scoped <tt>onCompletion</tt> overrule any global <tt>onCompletion</tt>.
* Hence we remove all existing as they are global.
*
* @param definition the pare... | Removes all existing <code>org.apache.camel.model.OnCompletionDefinition</code> from the definition. This is used to let route scoped onCompletion overrule any global onCompletion. Hence we remove all existing as they are global | removeAllOnCompletionDefinition | {
"repo_name": "shuliangtao/apache-camel-2.13.0-src",
"path": "camel-core/src/main/java/org/apache/camel/model/OnCompletionDefinition.java",
"license": "apache-2.0",
"size": 10945
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,381,982 |
@Override public void enterAccess_specifier(@NotNull FunctionParser.Access_specifierContext ctx) { } | @Override public void enterAccess_specifier(@NotNull FunctionParser.Access_specifierContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | exitPtr_operator | {
"repo_name": "octopus-platform/joern",
"path": "projects/extensions/joern-fuzzyc/src/main/java/antlr/FunctionBaseListener.java",
"license": "lgpl-3.0",
"size": 42232
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 647,260 |
@Test
public void testCreateROIWithEllipse()
throws Exception
{
ImageI image = (ImageI) iUpdate.saveAndReturnObject(
mmFactory.simpleImage(0));
RoiI roi = new RoiI();
roi.setImage(image);
RoiI serverROI = (RoiI) iUpdate.saveAndReturnObject(roi);
assertNotNul... | void function() throws Exception { ImageI image = (ImageI) iUpdate.saveAndReturnObject( mmFactory.simpleImage(0)); RoiI roi = new RoiI(); roi.setImage(image); RoiI serverROI = (RoiI) iUpdate.saveAndReturnObject(roi); assertNotNull(serverROI); double v = 10; int z = 0; int t = 0; int c = 0; EllipseI rect = new EllipseI(... | /**
* Tests the creation of ROIs whose shapes are Ellipses and converts them
* into the corresponding <code>POJO</code> objects.
* @throws Exception Thrown if an error occurred.
*/ | Tests the creation of ROIs whose shapes are Ellipses and converts them into the corresponding <code>POJO</code> objects | testCreateROIWithEllipse | {
"repo_name": "chris-allan/openmicroscopy",
"path": "components/tools/OmeroJava/test/integration/UpdateServiceTest.java",
"license": "gpl-2.0",
"size": 66787
} | [
"java.util.Iterator",
"java.util.List"
] | import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 640,769 |
public static String getCanonicalName(ItemGroup context, String path) {
String[] c = context.getFullName().split("/");
String[] p = path.split("/");
Stack name = new Stack();
for (int i=0; i<c.length;i++) {
if (i==0 && c[i].equals("")) continue;
name.push(c[i... | static String function(ItemGroup context, String path) { String[] c = context.getFullName().split("/"); String[] p = path.split("/"); Stack name = new Stack(); for (int i=0; i<c.length;i++) { if (i==0 && c[i].equals(STRSTR..STR.")) { continue; } name.push(p[i]); } return StringUtils.join(name, '/'); } | /**
* Computes the canonical full name of a relative path in an {@link ItemGroup} context, handling relative
* positions ".." and "." as absolute path starting with "/". The resulting name is the item fullName from Jenkins
* root.
*/ | Computes the canonical full name of a relative path in an <code>ItemGroup</code> context, handling relative positions ".." and "." as absolute path starting with "/". The resulting name is the item fullName from Jenkins root | getCanonicalName | {
"repo_name": "chbiel/jenkins",
"path": "core/src/main/java/hudson/model/Items.java",
"license": "mit",
"size": 17870
} | [
"java.util.Stack",
"org.apache.commons.lang.StringUtils"
] | import java.util.Stack; import org.apache.commons.lang.StringUtils; | import java.util.*; import org.apache.commons.lang.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 2,377,883 |
public static boolean isEqui(
RelNode left,
RelNode right,
RexNode condition) {
final List<Integer> leftKeys = new ArrayList<>();
final List<Integer> rightKeys = new ArrayList<>();
final List<RexNode> nonEquiList = new ArrayList<>();
splitJoinCondition(
left.getRowType().getF... | static boolean function( RelNode left, RelNode right, RexNode condition) { final List<Integer> leftKeys = new ArrayList<>(); final List<Integer> rightKeys = new ArrayList<>(); final List<RexNode> nonEquiList = new ArrayList<>(); splitJoinCondition( left.getRowType().getFieldCount(), condition, leftKeys, rightKeys, nonE... | /**
* Returns whether a join condition is an "equi-join" condition.
*
* @param left Left input of join
* @param right Right input of join
* @param condition Condition
* @return Whether condition is equi-join
*/ | Returns whether a join condition is an "equi-join" condition | isEqui | {
"repo_name": "YrAuYong/incubator-calcite",
"path": "core/src/main/java/org/apache/calcite/plan/RelOptUtil.java",
"license": "apache-2.0",
"size": 119673
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.calcite.rel.RelNode",
"org.apache.calcite.rex.RexNode"
] | import java.util.ArrayList; import java.util.List; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rex.RexNode; | import java.util.*; import org.apache.calcite.rel.*; import org.apache.calcite.rex.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 1,007,795 |
@Override
public OperationResponse delete(String serverName, String databaseName) throws IOException, ServiceException {
// Validate
if (serverName == null) {
throw new NullPointerException("serverName");
}
if (databaseName == null) {
throw new NullPointer... | OperationResponse function(String serverName, String databaseName) throws IOException, ServiceException { if (serverName == null) { throw new NullPointerException(STR); } if (databaseName == null) { throw new NullPointerException(STR); } boolean shouldTrace = CloudTracing.getIsEnabled(); String invocationId = null; if ... | /**
* Drops a database from an Azure SQL Database Server.
*
* @param serverName Required. The name of the Azure SQL Database Server on
* which the database is hosted.
* @param databaseName Required. The name of the Azure SQL Database to be
* deleted.
* @throws IOException Signals that an I/O... | Drops a database from an Azure SQL Database Server | delete | {
"repo_name": "southworkscom/azure-sdk-for-java",
"path": "service-management/azure-svc-mgmt-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseOperationsImpl.java",
"license": "apache-2.0",
"size": 112422
} | [
"com.microsoft.windowsazure.core.OperationResponse",
"com.microsoft.windowsazure.exception.ServiceException",
"com.microsoft.windowsazure.tracing.CloudTracing",
"java.io.IOException",
"java.util.HashMap"
] | import com.microsoft.windowsazure.core.OperationResponse; import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.util.HashMap; | import com.microsoft.windowsazure.core.*; import com.microsoft.windowsazure.exception.*; import com.microsoft.windowsazure.tracing.*; import java.io.*; import java.util.*; | [
"com.microsoft.windowsazure",
"java.io",
"java.util"
] | com.microsoft.windowsazure; java.io; java.util; | 2,397,928 |
public static void startApplication(final String applicationId) {
Scheduler.get().scheduleDeferred(new ScheduledCommand() { | static void function(final String applicationId) { Scheduler.get().scheduleDeferred(new ScheduledCommand() { | /**
* Starts the application with a given id by reading the configuration
* options stored by the bootstrap javascript.
*
* @param applicationId
* id of the application to load, this is also the id of the html
* element into which the application should be rendered.
... | Starts the application with a given id by reading the configuration options stored by the bootstrap javascript | startApplication | {
"repo_name": "peterl1084/framework",
"path": "client/src/main/java/com/vaadin/client/ApplicationConfiguration.java",
"license": "apache-2.0",
"size": 31090
} | [
"com.google.gwt.core.client.Scheduler"
] | import com.google.gwt.core.client.Scheduler; | import com.google.gwt.core.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 639,753 |
public DepreciationBatchDao getDepreciationBatchDao() {
return depreciationBatchDao;
} | DepreciationBatchDao function() { return depreciationBatchDao; } | /**
* Gets the depreciationBatchDao attribute.
*
* @return Returns the depreciationBatchDao.
*/ | Gets the depreciationBatchDao attribute | getDepreciationBatchDao | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/cam/document/dataaccess/impl/DepreciableAssetsDaoOjb.java",
"license": "apache-2.0",
"size": 26840
} | [
"org.kuali.kfs.module.cam.document.dataaccess.DepreciationBatchDao"
] | import org.kuali.kfs.module.cam.document.dataaccess.DepreciationBatchDao; | import org.kuali.kfs.module.cam.document.dataaccess.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 1,523,209 |
public Object getAttribute(String objectName, String attributeName)
throws JMException, IOException; | Object function(String objectName, String attributeName) throws JMException, IOException; | /**
* Returns an attribute.
*/ | Returns an attribute | getAttribute | {
"repo_name": "christianchristensen/resin",
"path": "modules/resin/src/com/caucho/jmx/remote/RemoteJMX.java",
"license": "gpl-2.0",
"size": 1507
} | [
"java.io.IOException",
"javax.management.JMException"
] | import java.io.IOException; import javax.management.JMException; | import java.io.*; import javax.management.*; | [
"java.io",
"javax.management"
] | java.io; javax.management; | 744,551 |
@Deprecated
JcrPackageRegistry getJcrPackageRegistry(Session session); | JcrPackageRegistry getJcrPackageRegistry(Session session); | /**
* Returns a JCR-based package registry using the given session.
* @param session the JCR session to use for reading/writing nodes in the repository
* @return the JCR-based package registry
* @deprecated Rather use {@link #getJcrBasedPackageRegistry(Session)} which doesn't return a private class
... | Returns a JCR-based package registry using the given session | getJcrPackageRegistry | {
"repo_name": "apache/jackrabbit-filevault",
"path": "vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/Packaging.java",
"license": "apache-2.0",
"size": 4433
} | [
"javax.jcr.Session",
"org.apache.jackrabbit.vault.packaging.registry.impl.JcrPackageRegistry"
] | import javax.jcr.Session; import org.apache.jackrabbit.vault.packaging.registry.impl.JcrPackageRegistry; | import javax.jcr.*; import org.apache.jackrabbit.vault.packaging.registry.impl.*; | [
"javax.jcr",
"org.apache.jackrabbit"
] | javax.jcr; org.apache.jackrabbit; | 2,486,189 |
private void testMessage(final LetterComposite composedMessage, final String message) {
// Test is the composed message has the correct number of words
final String[] words = message.split(" ");
assertNotNull(composedMessage);
assertEquals(words.length, composedMessage.count());
// Print the mess... | void function(final LetterComposite composedMessage, final String message) { final String[] words = message.split(" "); assertNotNull(composedMessage); assertEquals(words.length, composedMessage.count()); composedMessage.print(); assertEquals(message, new String(this.stdOutBuffer.toByteArray()).trim()); } | /**
* Test if the given composed message matches the expected message
*
* @param composedMessage The composed message, received from the messenger
* @param message The expected message
*/ | Test if the given composed message matches the expected message | testMessage | {
"repo_name": "Crossy147/java-design-patterns",
"path": "composite/src/test/java/com/iluwatar/composite/MessengerTest.java",
"license": "mit",
"size": 3480
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 132,328 |
public CompassPoint getNextWalkDirection () {
return nextWalkDirection;
}
| CompassPoint function () { return nextWalkDirection; } | /**
* Gets the direction of the entitie's next walk step
* @return The next walk direction
*/ | Gets the direction of the entitie's next walk step | getNextWalkDirection | {
"repo_name": "Sundays211/VirtueRS3",
"path": "src/main/java/org/virtue/game/map/movement/Movement.java",
"license": "mit",
"size": 19907
} | [
"org.virtue.core.constants.CompassPoint"
] | import org.virtue.core.constants.CompassPoint; | import org.virtue.core.constants.*; | [
"org.virtue.core"
] | org.virtue.core; | 1,524,440 |
protected Map<Integer, FeatureData> getFeatureMap() {
return this.featureMap;
} | Map<Integer, FeatureData> function() { return this.featureMap; } | /**
* Fetch the populated map of chado feature id to FeatureData objects.
* @return map of feature details
*/ | Fetch the populated map of chado feature id to FeatureData objects | getFeatureMap | {
"repo_name": "LegumeFederation/intermine_legfed",
"path": "legfed-chado-db/main/src/org/intermine/bio/dataconversion/SequenceProcessor.java",
"license": "lgpl-3.0",
"size": 88340
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,529,573 |
public static Collection<Column> getReadOnlyColumns(Statement catalog_stmt) {
if (debug.val)
LOG.debug("Extracting read-only columns from statement " + CatalogUtil.getDisplayName(catalog_stmt));
final CatalogUtil.Cache cache = CatalogUtil.getCatalogCache(catalog_stmt);
Collectio... | static Collection<Column> function(Statement catalog_stmt) { if (debug.val) LOG.debug(STR + CatalogUtil.getDisplayName(catalog_stmt)); final CatalogUtil.Cache cache = CatalogUtil.getCatalogCache(catalog_stmt); Collection<Column> ret = cache.STATEMENT_READONLY_COLUMNS.get(catalog_stmt); if (ret == null) { CatalogUtil.ge... | /**
* Returns all the columns that are not modified in the given Statement's
* query
*
* @param catalog_stmt
* @return
* @throws Exception
*/ | Returns all the columns that are not modified in the given Statement's query | getReadOnlyColumns | {
"repo_name": "gxyang/hstore",
"path": "src/frontend/edu/brown/catalog/CatalogUtil.java",
"license": "gpl-3.0",
"size": 121408
} | [
"java.util.Collection",
"org.voltdb.catalog.Column",
"org.voltdb.catalog.Statement"
] | import java.util.Collection; import org.voltdb.catalog.Column; import org.voltdb.catalog.Statement; | import java.util.*; import org.voltdb.catalog.*; | [
"java.util",
"org.voltdb.catalog"
] | java.util; org.voltdb.catalog; | 880,127 |
@Column(name = "reported_health", length = 255)
@Override
public String getReportedHealth() {
return (String) get(15);
} | @Column(name = STR, length = 255) String function() { return (String) get(15); } | /**
* Getter for <code>cattle.service_event.reported_health</code>.
*/ | Getter for <code>cattle.service_event.reported_health</code> | getReportedHealth | {
"repo_name": "vincent99/cattle",
"path": "code/iaas/model/src/main/java/io/cattle/platform/core/model/tables/records/ServiceEventRecord.java",
"license": "apache-2.0",
"size": 19582
} | [
"javax.persistence.Column"
] | import javax.persistence.Column; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 1,025,923 |
@SuppressWarnings("unchecked")
protected <C> C getComponent(Class<C> componentType) {
return componentType.cast(((HasComponent<C>) getActivity()).getComponent());
} | @SuppressWarnings(STR) <C> C function(Class<C> componentType) { return componentType.cast(((HasComponent<C>) getActivity()).getComponent()); } | /**
* Gets a component for dependency injection by its type.
*/ | Gets a component for dependency injection by its type | getComponent | {
"repo_name": "MikeArt91/RxArtistList",
"path": "presentation/src/main/java/com/mikeart/rxartistlist/presentation/view/fragment/BaseFragment.java",
"license": "apache-2.0",
"size": 848
} | [
"com.mikeart.rxartistlist.presentation.internal.di.HasComponent"
] | import com.mikeart.rxartistlist.presentation.internal.di.HasComponent; | import com.mikeart.rxartistlist.presentation.internal.di.*; | [
"com.mikeart.rxartistlist"
] | com.mikeart.rxartistlist; | 2,578,186 |
@Override
public java.math.BigDecimal getPercentFrom ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PercentFrom);
if (bd == null)
return Env.ZERO;
return bd;
} | java.math.BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PercentFrom); if (bd == null) return Env.ZERO; return bd; } | /** Get % ab.
@return % ab */ | Get % ab | getPercentFrom | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.materialtracking/src/main/java-gen/de/metas/materialtracking/ch/lagerkonf/model/X_M_QualityInsp_LagerKonf_ProcessingFee.java",
"license": "gpl-2.0",
"size": 6857
} | [
"java.math.BigDecimal",
"org.compiere.util.Env"
] | import java.math.BigDecimal; import org.compiere.util.Env; | import java.math.*; import org.compiere.util.*; | [
"java.math",
"org.compiere.util"
] | java.math; org.compiere.util; | 153,645 |
public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_)
{
if (p_70298_1_ >= 0 && p_70298_1_ < this.field_145945_j.length)
{
ItemStack var3 = this.field_145945_j[p_70298_1_];
this.field_145945_j[p_70298_1_] = null;
return var3;
}
else
... | ItemStack function(int p_70298_1_, int p_70298_2_) { if (p_70298_1_ >= 0 && p_70298_1_ < this.field_145945_j.length) { ItemStack var3 = this.field_145945_j[p_70298_1_]; this.field_145945_j[p_70298_1_] = null; return var3; } else { return null; } } | /**
* Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a
* new stack.
*/ | Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a new stack | decrStackSize | {
"repo_name": "Myrninvollo/Server",
"path": "src/net/minecraft/tileentity/TileEntityBrewingStand.java",
"license": "gpl-2.0",
"size": 11479
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 75,419 |
@FIXVersion(introduced = "4.0", retired = "4.3")
@TagNumRef(tagNum = TagNum.Symbol, required=true)
public void setSymbol(String symbol) {
getSafeInstrument().setSymbol(symbol);
} | @FIXVersion(introduced = "4.0", retired = "4.3") @TagNumRef(tagNum = TagNum.Symbol, required=true) void function(String symbol) { getSafeInstrument().setSymbol(symbol); } | /**
* Message field setter.
* @param symbol field value
*/ | Message field setter | setSymbol | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/OrderStatusRequestMsg.java",
"license": "gpl-3.0",
"size": 41851
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.TagNum"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum; | import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*; | [
"net.hades.fix"
] | net.hades.fix; | 1,292,843 |
public final ActionServlet getActionServlet() {
return actionServlet;
} | final ActionServlet function() { return actionServlet; } | /**
* Return the Struts ActionServlet that this PlugIn is associated with.
*/ | Return the Struts ActionServlet that this PlugIn is associated with | getActionServlet | {
"repo_name": "Gert-Jan1966/spring-struts-forwardport",
"path": "spring-struts/src/main/java/org/springframework/web/struts/ContextLoaderPlugIn.java",
"license": "apache-2.0",
"size": 15271
} | [
"org.apache.struts.action.ActionServlet"
] | import org.apache.struts.action.ActionServlet; | import org.apache.struts.action.*; | [
"org.apache.struts"
] | org.apache.struts; | 2,492,517 |
@Override
protected void doConsume(OptionManager manager, List input) {
int i;
String cmdline;
AbstractOption option;
ArrayList values;
String msg;
i = 0;
while (i < input.size()) {
if (!(input.get(i).getClass() == Line.class)) {
i++;
continue;
}
cmdline = ((Li... | void function(OptionManager manager, List input) { int i; String cmdline; AbstractOption option; ArrayList values; String msg; i = 0; while (i < input.size()) { if (!(input.get(i).getClass() == Line.class)) { i++; continue; } cmdline = ((Line) input.get(i)).getContent(); if (cmdline.length() == 0) { i++; continue; } if... | /**
* Visits the options.
*
* @param manager the manager to visit
* @param input the input data to use
*/ | Visits the options | doConsume | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/main/java/adams/core/option/NestedConsumer.java",
"license": "gpl-3.0",
"size": 14323
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.logging.Level"
] | import java.util.ArrayList; import java.util.List; import java.util.logging.Level; | import java.util.*; import java.util.logging.*; | [
"java.util"
] | java.util; | 2,122,616 |
public void writeProperties(@SuppressWarnings("hiding") IPropertyKeyProvider propertyKeyProvider, IPropertyKeyWriter writer) {
QuestionnaireWalker walker = new QuestionnaireWalker(new PropertyKeyWriterVisitor(propertyKeyProvider, writer));
walker.walk(questionnaire);
writer.end();
} | void function(@SuppressWarnings(STR) IPropertyKeyProvider propertyKeyProvider, IPropertyKeyWriter writer) { QuestionnaireWalker walker = new QuestionnaireWalker(new PropertyKeyWriterVisitor(propertyKeyProvider, writer)); walker.walk(questionnaire); writer.end(); } | /**
* Write the questionnaire properties.
* @param writer
*/ | Write the questionnaire properties | writeProperties | {
"repo_name": "apruden/onyx",
"path": "onyx-modules/quartz/quartz-core/src/main/java/org/obiba/onyx/quartz/core/engine/questionnaire/util/QuestionnaireBuilder.java",
"license": "gpl-3.0",
"size": 10984
} | [
"org.obiba.onyx.quartz.core.engine.questionnaire.util.builder.IPropertyKeyWriter",
"org.obiba.onyx.quartz.core.engine.questionnaire.util.builder.PropertyKeyWriterVisitor",
"org.obiba.onyx.quartz.core.engine.questionnaire.util.localization.IPropertyKeyProvider"
] | import org.obiba.onyx.quartz.core.engine.questionnaire.util.builder.IPropertyKeyWriter; import org.obiba.onyx.quartz.core.engine.questionnaire.util.builder.PropertyKeyWriterVisitor; import org.obiba.onyx.quartz.core.engine.questionnaire.util.localization.IPropertyKeyProvider; | import org.obiba.onyx.quartz.core.engine.questionnaire.util.builder.*; import org.obiba.onyx.quartz.core.engine.questionnaire.util.localization.*; | [
"org.obiba.onyx"
] | org.obiba.onyx; | 2,848,511 |
public boolean addVehicle(Vehicle vehicle) {
// Check if vehicle cannot be added to building.
if (vehicles.contains(vehicle)) {
logger.log(vehicle, Level.INFO, 1000,
"Already garaged in " + building + ".");
return false;
}
if (vehicles.size() >= vehicleCapacity) {
logger.log(vehi... | boolean function(Vehicle vehicle) { if (vehicles.contains(vehicle)) { logger.log(vehicle, Level.INFO, 1000, STR + building + "."); return false; } if (vehicles.size() >= vehicleCapacity) { logger.log(vehicle, Level.INFO, 1000, building + STR); return false; } if (vehicles.add(vehicle)) { if (vehicle instanceof Crewable... | /**
* Add vehicle to building if there's room.
*
* @param vehicle the vehicle to be added.
* @return true if vehicle can be added.
*/ | Add vehicle to building if there's room | addVehicle | {
"repo_name": "mars-sim/mars-sim",
"path": "mars-sim-core/src/main/java/org/mars_sim/msp/core/structure/building/function/VehicleMaintenance.java",
"license": "gpl-3.0",
"size": 9724
} | [
"java.util.ArrayList",
"java.util.logging.Level",
"org.mars_sim.msp.core.LocalAreaUtil",
"org.mars_sim.msp.core.LocalPosition",
"org.mars_sim.msp.core.location.LocationStateType",
"org.mars_sim.msp.core.person.Person",
"org.mars_sim.msp.core.robot.Robot",
"org.mars_sim.msp.core.structure.building.Buil... | import java.util.ArrayList; import java.util.logging.Level; import org.mars_sim.msp.core.LocalAreaUtil; import org.mars_sim.msp.core.LocalPosition; import org.mars_sim.msp.core.location.LocationStateType; import org.mars_sim.msp.core.person.Person; import org.mars_sim.msp.core.robot.Robot; import org.mars_sim.msp.core.... | import java.util.*; import java.util.logging.*; import org.mars_sim.msp.core.*; import org.mars_sim.msp.core.location.*; import org.mars_sim.msp.core.person.*; import org.mars_sim.msp.core.robot.*; import org.mars_sim.msp.core.structure.building.*; import org.mars_sim.msp.core.vehicle.*; | [
"java.util",
"org.mars_sim.msp"
] | java.util; org.mars_sim.msp; | 2,545,681 |
public final static int getIndexedObjectSize( Class<? extends IndexedObject> indexedObjectType ) {
BitSet indexSet = indexedObjectTypes.get( indexedObjectType );
if ( indexSet == null ) {
return 0;
}
int lastIndex = 0;
for ( int i = indexSet.nextSetBit( 0 ); i >= ... | final static int function( Class<? extends IndexedObject> indexedObjectType ) { BitSet indexSet = indexedObjectTypes.get( indexedObjectType ); if ( indexSet == null ) { return 0; } int lastIndex = 0; for ( int i = indexSet.nextSetBit( 0 ); i >= 0; i = indexSet.nextSetBit( i+1 ) ) { lastIndex = i; } return lastIndex + 1... | /** The the number of indices that are used for a specified IndexedObject type.
* @param indexedObjectType The specific type of IndexedObject
* @return the number of indices that are used for a specified IndexedObject type.
*/ | The the number of indices that are used for a specified IndexedObject type | getIndexedObjectSize | {
"repo_name": "Inari-Soft/inari-commons",
"path": "src/main/java/com/inari/commons/lang/indexed/Indexer.java",
"license": "apache-2.0",
"size": 11625
} | [
"java.util.BitSet"
] | import java.util.BitSet; | import java.util.*; | [
"java.util"
] | java.util; | 1,597,668 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.