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 Function getFunction() {
return getRoot().evaluate();
} | Function function() { return getRoot().evaluate(); } | /**
* Gets the root function after it has been built. The function is
* automatically evaluated first, to put it into its simplest form.
*
* It should be fine if additional nodes are added after this function is
* called.
*
* @return The root function.
*/ | Gets the root function after it has been built. The function is automatically evaluated first, to put it into its simplest form. It should be fine if additional nodes are added after this function is called | getFunction | {
"repo_name": "adamheins/dervish",
"path": "src/com/adamheins/dervish/builder/FunctionBuilder.java",
"license": "mit",
"size": 1822
} | [
"com.adamheins.dervish.function.Function"
] | import com.adamheins.dervish.function.Function; | import com.adamheins.dervish.function.*; | [
"com.adamheins.dervish"
] | com.adamheins.dervish; | 717,301 |
public void setCfmMpid(Set<Long> cfmMpid) {
ColumnDescription columndesc = new ColumnDescription(
InterfaceColumn.CFMMPID
.columnName(),
... | void function(Set<Long> cfmMpid) { ColumnDescription columndesc = new ColumnDescription( InterfaceColumn.CFMMPID .columnName(), STR, VersionNum.VERSION400); super.setDataHandler(columndesc, cfmMpid); } | /**
* Add a Column entity which column name is "cfm_mpid" to the Row entity of
* attributes.
* @param cfmMpid the column data which column name is "cfm_mpid"
*/ | Add a Column entity which column name is "cfm_mpid" to the Row entity of attributes | setCfmMpid | {
"repo_name": "kuangrewawa/OnosFw",
"path": "ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Interface.java",
"license": "apache-2.0",
"size": 51208
} | [
"java.util.Set",
"org.onosproject.ovsdb.rfc.tableservice.ColumnDescription"
] | import java.util.Set; import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription; | import java.util.*; import org.onosproject.ovsdb.rfc.tableservice.*; | [
"java.util",
"org.onosproject.ovsdb"
] | java.util; org.onosproject.ovsdb; | 820,586 |
Set<PreferenceId> getPreferenceIds(); | Set<PreferenceId> getPreferenceIds(); | /**
* Returns all needed preference IDs.
*
* @return A {@link Set} containing all {@link PreferenceId}. Returning <code>null</code> is not
* permitted here. At least a {@link java.util.Collections#EMPTY_SET} should be
* returned.
*/ | Returns all needed preference IDs | getPreferenceIds | {
"repo_name": "kugelr/inspectIT",
"path": "inspectIT/src/info/novatec/inspectit/rcp/editor/table/input/TableInputController.java",
"license": "agpl-3.0",
"size": 6282
} | [
"info.novatec.inspectit.rcp.editor.preferences.PreferenceId",
"java.util.Set"
] | import info.novatec.inspectit.rcp.editor.preferences.PreferenceId; import java.util.Set; | import info.novatec.inspectit.rcp.editor.preferences.*; import java.util.*; | [
"info.novatec.inspectit",
"java.util"
] | info.novatec.inspectit; java.util; | 1,667,747 |
@Override public T visitDataAttribute(@NotNull SQLANNParser.DataAttributeContext ctx) { return visitChildren(ctx); } | @Override public T visitDataAttribute(@NotNull SQLANNParser.DataAttributeContext ctx) { return visitChildren(ctx); } | /**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/ | The default implementation returns the result of calling <code>#visitChildren</code> on ctx | visitValues | {
"repo_name": "wfcreations/ANNMS",
"path": "src/br/com/wfcreations/annms/core/sqlann/SQLANNBaseVisitor.java",
"license": "bsd-3-clause",
"size": 10911
} | [
"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; | 2,330,740 |
private static Bitmap createScaledBitmap(Bitmap source, int width, int height)
{
int sourceWidth = source.getWidth();
int sourceHeight = source.getHeight();
float scale = Math.min((float)width / sourceWidth, (float)height / sourceHeight);
sourceWidth *= scale;
sourceHeight *= scale;
return Bitmap.create... | static Bitmap function(Bitmap source, int width, int height) { int sourceWidth = source.getWidth(); int sourceHeight = source.getHeight(); float scale = Math.min((float)width / sourceWidth, (float)height / sourceHeight); sourceWidth *= scale; sourceHeight *= scale; return Bitmap.createScaledBitmap(source, sourceWidth, ... | /**
* Scales a bitmap to fit in a rectangle of the given size. Aspect ratio is
* preserved. At least one dimension of the result will match the provided
* dimension exactly.
*
* @param source The bitmap to be scaled
* @param width Maximum width of image
* @param height Maximum height of image
* @return ... | Scales a bitmap to fit in a rectangle of the given size. Aspect ratio is preserved. At least one dimension of the result will match the provided dimension exactly | createScaledBitmap | {
"repo_name": "alex73/vanilla",
"path": "src/ch/blinkenlights/android/vanilla/CoverBitmap.java",
"license": "gpl-3.0",
"size": 12703
} | [
"android.graphics.Bitmap"
] | import android.graphics.Bitmap; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,441,566 |
public void testPutRmvFindSizeMultithreaded() throws Exception {
MAX_PER_PAGE = 5;
CNT = 60_000;
final int SLIDING_WINDOW_SIZE = 100;
final TestTree tree = createTestTree(false);
final AtomicLong curPutKey = new AtomicLong(0);
final BlockingQueue<Long> rowsToRemove... | void function() throws Exception { MAX_PER_PAGE = 5; CNT = 60_000; final int SLIDING_WINDOW_SIZE = 100; final TestTree tree = createTestTree(false); final AtomicLong curPutKey = new AtomicLong(0); final BlockingQueue<Long> rowsToRemove = new ArrayBlockingQueue<>(SLIDING_WINDOW_SIZE); final int hwThreadCnt = Runtime.get... | /**
* The test verifies that {@link BPlusTree#put}, {@link BPlusTree#remove}, {@link BPlusTree#find}, and
* {@link BPlusTree#size} run concurrently, perform correctly and report correct values.
*
* A sliding window of numbers is maintainted in the tests.
*
* NB: This test has to be changed... | The test verifies that <code>BPlusTree#put</code>, <code>BPlusTree#remove</code>, <code>BPlusTree#find</code>, and <code>BPlusTree#size</code> run concurrently, perform correctly and report correct values. A sliding window of numbers is maintainted in the tests | testPutRmvFindSizeMultithreaded | {
"repo_name": "alexzaitzev/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java",
"license": "apache-2.0",
"size": 81175
} | [
"java.util.concurrent.ArrayBlockingQueue",
"java.util.concurrent.BlockingQueue",
"java.util.concurrent.atomic.AtomicInteger",
"java.util.concurrent.atomic.AtomicLong"
] | import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; | import java.util.concurrent.*; import java.util.concurrent.atomic.*; | [
"java.util"
] | java.util; | 1,648,592 |
public CcLibraryHelper addDynamicLibraries(Iterable<LibraryToLink> libraries) {
Iterables.addAll(dynamicLibraries, libraries);
return this;
} | CcLibraryHelper function(Iterable<LibraryToLink> libraries) { Iterables.addAll(dynamicLibraries, libraries); return this; } | /**
* Add the corresponding files as dynamic libraries into the linker outputs (i.e., after the
* linker action) - this makes them available for linking to binary rules that depend on this
* rule.
*/ | Add the corresponding files as dynamic libraries into the linker outputs (i.e., after the linker action) - this makes them available for linking to binary rules that depend on this rule | addDynamicLibraries | {
"repo_name": "dinowernli/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java",
"license": "apache-2.0",
"size": 41137
} | [
"com.google.common.collect.Iterables",
"com.google.devtools.build.lib.rules.cpp.LinkerInputs"
] | import com.google.common.collect.Iterables; import com.google.devtools.build.lib.rules.cpp.LinkerInputs; | import com.google.common.collect.*; import com.google.devtools.build.lib.rules.cpp.*; | [
"com.google.common",
"com.google.devtools"
] | com.google.common; com.google.devtools; | 1,678,029 |
@Override
public StorageAccountGetResponse get(String accountName) throws IOException, ServiceException, ParserConfigurationException, SAXException, URISyntaxException {
// Validate
if (accountName == null) {
throw new NullPointerException("accountName");
}
/... | StorageAccountGetResponse function(String accountName) throws IOException, ServiceException, ParserConfigurationException, SAXException, URISyntaxException { if (accountName == null) { throw new NullPointerException(STR); } boolean shouldTrace = CloudTracing.getIsEnabled(); String invocationId = null; if (shouldTrace) ... | /**
* The Get Storage Account Properties operation returns system properties
* for the specified storage account. (see
* http://msdn.microsoft.com/en-us/library/windowsazure/ee460802.aspx for
* more information)
*
* @param accountName Required. Name of the storage account to get
* propertie... | The Get Storage Account Properties operation returns system properties for the specified storage account. (see HREF for more information) | get | {
"repo_name": "southworkscom/azure-sdk-for-java",
"path": "service-management/azure-svc-mgmt-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageAccountOperationsImpl.java",
"license": "apache-2.0",
"size": 97233
} | [
"com.microsoft.windowsazure.core.utils.Base64",
"com.microsoft.windowsazure.core.utils.XmlUtility",
"com.microsoft.windowsazure.exception.ServiceException",
"com.microsoft.windowsazure.management.storage.models.GeoRegionStatus",
"com.microsoft.windowsazure.management.storage.models.StorageAccount",
"com.m... | import com.microsoft.windowsazure.core.utils.Base64; import com.microsoft.windowsazure.core.utils.XmlUtility; import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.storage.models.GeoRegionStatus; import com.microsoft.windowsazure.management.storage.models.StorageAcco... | import com.microsoft.windowsazure.core.utils.*; import com.microsoft.windowsazure.exception.*; import com.microsoft.windowsazure.management.storage.models.*; import com.microsoft.windowsazure.tracing.*; import java.io.*; import java.net.*; import java.util.*; import javax.xml.parsers.*; import org.w3c.dom.*; import org... | [
"com.microsoft.windowsazure",
"java.io",
"java.net",
"java.util",
"javax.xml",
"org.w3c.dom",
"org.xml.sax"
] | com.microsoft.windowsazure; java.io; java.net; java.util; javax.xml; org.w3c.dom; org.xml.sax; | 850,166 |
MockitoAnnotations.initMocks(this);
} | MockitoAnnotations.initMocks(this); } | /**
* Init the annotations before each test.
*/ | Init the annotations before each test | init | {
"repo_name": "SirmaITT/conservation-space-1.7.0",
"path": "docker/sirma-platform/platform/seip-parent/extensions/emf-solr-parent/emf-solr-impl/src/test/java/com/sirma/itt/emf/label/retrieve/HeaderFieldValueRetrieverTest.java",
"license": "lgpl-3.0",
"size": 9138
} | [
"org.mockito.MockitoAnnotations"
] | import org.mockito.MockitoAnnotations; | import org.mockito.*; | [
"org.mockito"
] | org.mockito; | 666,199 |
public ServiceFuture<StorageBundle> getStorageAccountAsync(String vaultBaseUrl, String storageAccountName, final ServiceCallback<StorageBundle> serviceCallback) {
return ServiceFuture.fromResponse(getStorageAccountWithServiceResponseAsync(vaultBaseUrl, storageAccountName), serviceCallback);
} | ServiceFuture<StorageBundle> function(String vaultBaseUrl, String storageAccountName, final ServiceCallback<StorageBundle> serviceCallback) { return ServiceFuture.fromResponse(getStorageAccountWithServiceResponseAsync(vaultBaseUrl, storageAccountName), serviceCallback); } | /**
* Gets information about a specified storage account. This operation requires the storage/get permission.
*
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
* @param storageAccountName The name of the storage account.
* @param serviceCallback the async Serv... | Gets information about a specified storage account. This operation requires the storage/get permission | getStorageAccountAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/keyvault/microsoft-azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java",
"license": "mit",
"size": 884227
} | [
"com.microsoft.azure.keyvault.models.StorageBundle",
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.azure.keyvault.models.StorageBundle; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.azure.keyvault.models.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 1,553,180 |
@Test
public final void whenBishopCorrectWayDownThenResultIs() {
final int localStartCol = 3;
final int localStartRow = 1;
final int colEnd = 2;
final int rowEnd = 0;
Cell startCell = new Cell(localStartCol, localStartRow);
Cell endCell = new Cell(colEnd, rowEnd... | final void function() { final int localStartCol = 3; final int localStartRow = 1; final int colEnd = 2; final int rowEnd = 0; Cell startCell = new Cell(localStartCol, localStartRow); Cell endCell = new Cell(colEnd, rowEnd); Bishop bishop = new Bishop(startCell); Cell[] arr = bishop.way(endCell); int resCol = arr[0].get... | /**
* Test correct move Bishop figure.
*/ | Test correct move Bishop figure | whenBishopCorrectWayDownThenResultIs | {
"repo_name": "MorpG/Java-course",
"path": "package_1/chapter_002/Chess/src/test/java/ru/agolovin/models/BishopTest.java",
"license": "apache-2.0",
"size": 2128
} | [
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import org.hamcrest.core.Is; import org.junit.Assert; | import org.hamcrest.core.*; import org.junit.*; | [
"org.hamcrest.core",
"org.junit"
] | org.hamcrest.core; org.junit; | 2,763,042 |
public static String getServerURL(HttpServletRequest request) {
StringBuffer url = new StringBuffer();
String scheme = request.getScheme();
url.append(scheme);
url.append("://");
url.append(request.getServerName());
if ((scheme.equals("http") &&
request.getServerPort() != 80
)... | static String function(HttpServletRequest request) { StringBuffer url = new StringBuffer(); String scheme = request.getScheme(); url.append(scheme); url.append(STRhttpSTRhttps") && request.getServerPort() != 443)) { url.append(':'); url.append(request.getServerPort()); } return url.toString(); } | /**
* Return the server URL.
*
* @param request the request to interrogate
*/ | Return the server URL | getServerURL | {
"repo_name": "timp21337/melati-old",
"path": "melati/src/main/java/org/melati/util/HttpUtil.java",
"license": "gpl-2.0",
"size": 5776
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 934,742 |
public void removeSizeListener(final SizeListener listener) {
checkWidget();
if (listener == null) {
SWT.error(SWT.ERROR_NULL_ARGUMENT);
}
sizeListeners.remove(listener);
} | void function(final SizeListener listener) { checkWidget(); if (listener == null) { SWT.error(SWT.ERROR_NULL_ARGUMENT); } sizeListeners.remove(listener); } | /**
* Removes the listener from the collection of listeners who will be notified when the embedded swing control has
* changed its size preferences.
*
* @param listener
* the listener which should no longer be notified
*
* @exception IllegalArgumentException
* <ul>
* ... | Removes the listener from the collection of listeners who will be notified when the embedded swing control has changed its size preferences | removeSizeListener | {
"repo_name": "gama-platform/gama.cloud",
"path": "ummisco.gama.java2d_web/internal_src/ummisco/gama/java2d/swing/SwingControl.java",
"license": "agpl-3.0",
"size": 63023
} | [
"org.eclipse.swt.SWT"
] | import org.eclipse.swt.SWT; | import org.eclipse.swt.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 2,455,180 |
public static boolean setPrefs(Context ctx, ArrayList<String> argv
, int... numArgv) {
SharedPreferences prefs
= ctx.getSharedPreferences("pwgen", Context.MODE_PRIVATE);
SharedPreferences.Editor editor = prefs.edit();
for (char option : pwOptions.toCharArray()) {... | static boolean function(Context ctx, ArrayList<String> argv , int... numArgv) { SharedPreferences prefs = ctx.getSharedPreferences("pwgen", Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); for (char option : pwOptions.toCharArray()) { if (argv.contains(String.valueOf(option))) { editor.putBoolean(... | /**
* Sets password generation preferences.
*
* @param ctx context from which to retrieve SharedPreferences from
* preferences file 'pwgen'
* @param argv options for password generation
* <table summary="options for password generation">
* ... | Sets password generation preferences | setPrefs | {
"repo_name": "svetlemodry/Android-Password-Store",
"path": "app/src/main/java/com/zeapo/pwdstore/pwgen/pwgen.java",
"license": "gpl-3.0",
"size": 5130
} | [
"android.content.Context",
"android.content.SharedPreferences",
"java.util.ArrayList"
] | import android.content.Context; import android.content.SharedPreferences; import java.util.ArrayList; | import android.content.*; import java.util.*; | [
"android.content",
"java.util"
] | android.content; java.util; | 2,458,411 |
public Importer getPmi() {
return pmi;
} | Importer function() { return pmi; } | /**
* <p>Getter for the field <code>pmi</code>.</p>
*
* @return a {@link net.sourceforge.seqware.queryengine.tools.importers.Importer} object.
*/ | Getter for the field <code>pmi</code> | getPmi | {
"repo_name": "SeqWare/queryengine",
"path": "seqware-queryengine-legacy/src/main/java/net/sourceforge/seqware/queryengine/tools/importers/workers/ImportWorker.java",
"license": "gpl-3.0",
"size": 7506
} | [
"net.sourceforge.seqware.queryengine.tools.importers.Importer"
] | import net.sourceforge.seqware.queryengine.tools.importers.Importer; | import net.sourceforge.seqware.queryengine.tools.importers.*; | [
"net.sourceforge.seqware"
] | net.sourceforge.seqware; | 478,250 |
private ArrayList<HashMap<String, String>> createTestList(int colCount, int rowCount,
String prefix) {
ArrayList<HashMap<String, String>> list = new ArrayList<HashMap<String, String>>();
String[] columns = new String[colCount];
for (int i = 0; i < colCount; i++) {
col... | ArrayList<HashMap<String, String>> function(int colCount, int rowCount, String prefix) { ArrayList<HashMap<String, String>> list = new ArrayList<HashMap<String, String>>(); String[] columns = new String[colCount]; for (int i = 0; i < colCount; i++) { columns[i] = STR + i; } for (int i = 0; i < rowCount; i++) { HashMap<... | /**
* Creates the test list.
*
* @param colCount the column count
* @param rowCount the row count
* @param prefix the prefix
* @return the array list< hash map< string, string>>
*/ | Creates the test list | createTestList | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "cts/tests/tests/widget/src/android/widget/cts/SimpleExpandableListAdapterTest.java",
"license": "gpl-3.0",
"size": 18123
} | [
"java.util.ArrayList",
"java.util.HashMap"
] | import java.util.ArrayList; import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,146,827 |
@Override
public void Close()
throws IOException {
try {
// set any possible bias to zero
setSpotBias(0.0);
} catch (DataFormatException ex) {
;
}
} | void function() throws IOException { try { setSpotBias(0.0); } catch (DataFormatException ex) { ; } } | /**
* "Cleans-up" the Instrument after processing the script has been finished.
* It sets the Spot-Bias to 0.
*
* @throws IOException
*/ | "Cleans-up" the Instrument after processing the script has been finished. It sets the Spot-Bias to 0 | Close | {
"repo_name": "amadeobellotti/Microwave-Analyzer",
"path": "Microwave Analyzer/icontrol~subversion/Icontrol_PrologixEthernetBranch/Icontrol/src/icontrol/instruments/HP4192.java",
"license": "gpl-2.0",
"size": 30078
} | [
"java.io.IOException",
"java.util.zip.DataFormatException"
] | import java.io.IOException; import java.util.zip.DataFormatException; | import java.io.*; import java.util.zip.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,259,201 |
public List<MountTargetProperties> mountTargets() {
return this.mountTargets;
} | List<MountTargetProperties> function() { return this.mountTargets; } | /**
* Get list of mount targets.
*
* @return the mountTargets value
*/ | Get list of mount targets | mountTargets | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/netapp/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/netapp/v2019_11_01/implementation/VolumeInner.java",
"license": "mit",
"size": 10435
} | [
"com.microsoft.azure.management.netapp.v2019_11_01.MountTargetProperties",
"java.util.List"
] | import com.microsoft.azure.management.netapp.v2019_11_01.MountTargetProperties; import java.util.List; | import com.microsoft.azure.management.netapp.v2019_11_01.*; import java.util.*; | [
"com.microsoft.azure",
"java.util"
] | com.microsoft.azure; java.util; | 1,782,675 |
if (rand == null) {
rand = new Random();
}
return rand.nextInt(n) + 1;
}
| if (rand == null) { rand = new Random(); } return rand.nextInt(n) + 1; } | /**
* Returns a random number between 1 and the number of sides
* of the dice n
*
* @param n The number of sides of the dice
* @return The randomly rolled value
*/ | Returns a random number between 1 and the number of sides of the dice n | roll | {
"repo_name": "chock-mostlyharmless/mostlyharmless",
"path": "eclipse/Bravery Run/src/de/badlegrunners/braveryrun/util/Dice.java",
"license": "bsd-3-clause",
"size": 694
} | [
"java.util.Random"
] | import java.util.Random; | import java.util.*; | [
"java.util"
] | java.util; | 1,707,170 |
public long getOptionLongValue(CommandLine cmd) {
return Long.parseLong(getOptionValue(cmd));
} | long function(CommandLine cmd) { return Long.parseLong(getOptionValue(cmd)); } | /**
* Retrieve the argument of this option as long value
*
* @param cmd CommandLine
* @return Value of the argument as long value
*/ | Retrieve the argument of this option as long value | getOptionLongValue | {
"repo_name": "basio/graph",
"path": "giraph-core/src/main/java/org/apache/giraph/benchmark/BenchmarkOption.java",
"license": "apache-2.0",
"size": 7455
} | [
"org.apache.commons.cli.CommandLine"
] | import org.apache.commons.cli.CommandLine; | import org.apache.commons.cli.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,237,588 |
@Deprecated
List<User> getDirectAdmins(PerunSession perunSession, Vo vo); | List<User> getDirectAdmins(PerunSession perunSession, Vo vo); | /**
* Gets list of direct user administrators of the VO.
* 'Direct' means, there aren't included users, who are members of group administrators, in the returned list.
*
* @param perunSession
* @param vo
*
* @throws InternalErrorException
*/ | Gets list of direct user administrators of the VO. 'Direct' means, there aren't included users, who are members of group administrators, in the returned list | getDirectAdmins | {
"repo_name": "balcirakpeter/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/implApi/VosManagerImplApi.java",
"license": "bsd-2-clause",
"size": 8479
} | [
"cz.metacentrum.perun.core.api.PerunSession",
"cz.metacentrum.perun.core.api.User",
"cz.metacentrum.perun.core.api.Vo",
"java.util.List"
] | import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.User; import cz.metacentrum.perun.core.api.Vo; import java.util.List; | import cz.metacentrum.perun.core.api.*; import java.util.*; | [
"cz.metacentrum.perun",
"java.util"
] | cz.metacentrum.perun; java.util; | 1,625,666 |
public void setImageResize(boolean val) {
Element el = settingsFile.getRootElement().getChild(SETTING_IMGRESIZE);
if (null == el) {
el = new Element(SETTING_IMGRESIZE);
settingsFile.getRootElement().addContent(el);
}
el.setText((val) ? "1" : "0");
} | void function(boolean val) { Element el = settingsFile.getRootElement().getChild(SETTING_IMGRESIZE); if (null == el) { el = new Element(SETTING_IMGRESIZE); settingsFile.getRootElement().addContent(el); } el.setText((val) ? "1" : "0"); } | /**
* Sets the setting for the thumbnail activation. This value indicates whether iamges should
* always be display in original size, or whether large images should be resized
*
* @param val whether thumbnail-display is enabled or not
*/ | Sets the setting for the thumbnail activation. This value indicates whether iamges should always be display in original size, or whether large images should be resized | setImageResize | {
"repo_name": "sjPlot/Zettelkasten",
"path": "src/main/java/de/danielluedecke/zettelkasten/database/Settings.java",
"license": "gpl-3.0",
"size": 218287
} | [
"org.jdom2.Element"
] | import org.jdom2.Element; | import org.jdom2.*; | [
"org.jdom2"
] | org.jdom2; | 1,759,795 |
public void removeSensor(String name) {
Sensor sensor = sensors.get(name);
if (sensor != null) {
List<Sensor> childSensors = null;
synchronized (sensor) {
synchronized (this) {
if (sensors.remove(name, sensor)) {
for... | void function(String name) { Sensor sensor = sensors.get(name); if (sensor != null) { List<Sensor> childSensors = null; synchronized (sensor) { synchronized (this) { if (sensors.remove(name, sensor)) { for (KafkaMetric metric : sensor.metrics()) removeMetric(metric.metricName()); log.debug(STR, name); childSensors = ch... | /**
* Remove a sensor (if it exists), associated metrics and its children.
*
* @param name The name of the sensor to be removed
*/ | Remove a sensor (if it exists), associated metrics and its children | removeSensor | {
"repo_name": "lemonJun/Jkafka",
"path": "jkafka-core/src/main/java/kafka/metrics/Metrics.java",
"license": "apache-2.0",
"size": 18614
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,501,984 |
@Override
public int compareTo(AbstractPageTranscript<T> pt){
return this.getMd().compareTo(pt.getMd());
}
public void build() throws IOException {} | int function(AbstractPageTranscript<T> pt){ return this.getMd().compareTo(pt.getMd()); } public void build() throws IOException {} | /**
* Uses the timestamp in the metadata object for comparison
* @see java.lang.Comparable#compareTo(java.lang.Object)
*/ | Uses the timestamp in the metadata object for comparison | compareTo | {
"repo_name": "Transkribus/TranskribusCore",
"path": "src/main/java/eu/transkribus/core/model/beans/AbstractPageTranscript.java",
"license": "gpl-3.0",
"size": 861
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,134,054 |
private static int countTextPatterns(String text) {
StringTokenizer stok = new StringTokenizer(text, "\n \t[]");
return stok.countTokens();
}
| static int function(String text) { StringTokenizer stok = new StringTokenizer(text, STR); return stok.countTokens(); } | /**
* Method countTextPatterns.
*
* @param text
* String
*
* @return int
*/ | Method countTextPatterns | countTextPatterns | {
"repo_name": "laynos/GLPOO_ESIEA_1415_Eternity_Souhel",
"path": "eternity/src/main/java/fr/esiea/glpoo/création_pièces_terrain/Terrain.java",
"license": "apache-2.0",
"size": 18602
} | [
"java.util.StringTokenizer"
] | import java.util.StringTokenizer; | import java.util.*; | [
"java.util"
] | java.util; | 1,600,191 |
@Override
public Response readContact(String parentcsid,
String itemcsid, String csid) {
return getProxy().readContact(parentcsid, itemcsid, csid);
} | Response function(String parentcsid, String itemcsid, String csid) { return getProxy().readContact(parentcsid, itemcsid, csid); } | /**
* Read contact.
*
* @param parentcsid the parentcsid
* @param itemcsid the itemcsid
* @param csid the csid
* @return the client response
*/ | Read contact | readContact | {
"repo_name": "cherryhill/collectionspace-services",
"path": "services/contact/client/src/main/java/org/collectionspace/services/client/AuthorityWithContactsClientImpl.java",
"license": "apache-2.0",
"size": 8924
} | [
"javax.ws.rs.core.Response"
] | import javax.ws.rs.core.Response; | import javax.ws.rs.core.*; | [
"javax.ws"
] | javax.ws; | 2,432,894 |
void addToClasspath(IJavaProject javaProject,
boolean autobuild,
Iterable<IClasspathEntry> newClassPathEntry) throws JavaModelException;
} | void addToClasspath(IJavaProject javaProject, boolean autobuild, Iterable<IClasspathEntry> newClassPathEntry) throws JavaModelException; } | /** Add libraries to the class path.
*
* @param javaProject the proejct to update.
* @param autobuild indicates if the function should wait for end of autobuild.
* @param newClassPathEntry the entry to add.
* @throws JavaModelException
*/ | Add libraries to the class path | addToClasspath | {
"repo_name": "jgfoster/sarl",
"path": "tests/io.sarl.tests.api.ui/src/io/sarl/tests/api/WorkbenchTestHelper.java",
"license": "apache-2.0",
"size": 41142
} | [
"org.eclipse.jdt.core.IClasspathEntry",
"org.eclipse.jdt.core.IJavaProject",
"org.eclipse.jdt.core.JavaModelException"
] | import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaModelException; | import org.eclipse.jdt.core.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 329,598 |
public Enumeration listOptions() {
Vector newVector = new Vector(3);
newVector.addElement(new Option(
"\tFull class name of attribute evaluator, followed\n"
+ "\tby its options.\n"
+ "\teg: \"weka.attributeSelection.CfsSubsetEval -L\"\n"
+ "\t(default weka.attributeSelection.... | Enumeration function() { Vector newVector = new Vector(3); newVector.addElement(new Option( STR + STR + STRweka.attributeSelection.CfsSubsetEval -L\"\n" + STR, "E", 1, STR)); newVector.addElement(new Option( STR + STR + STRweka.attributeSelection.BestFirst -D 1\"\n" + STR, "S", 1, STR)); Enumeration enu = super.listOpt... | /**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/ | Returns an enumeration describing the available options | listOptions | {
"repo_name": "williamClanton/jbossBA",
"path": "weka/src/main/java/weka/classifiers/meta/AttributeSelectedClassifier.java",
"license": "gpl-2.0",
"size": 20441
} | [
"java.util.Enumeration",
"java.util.Vector"
] | import java.util.Enumeration; import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 2,220,583 |
@Beta
ServiceFuture<Void> activateAsync(String format, ServiceCallback<Void> callback); | ServiceFuture<Void> activateAsync(String format, ServiceCallback<Void> callback); | /**
* Activates the application package asynchronously.
*
* @param format the format of the uploaded Batch application package, either "zip" or "tar"
* @param callback the callback to call on success or failure
* @return a handle to cancel the request
*/ | Activates the application package asynchronously | activateAsync | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/ApplicationPackage.java",
"license": "mit",
"size": 2666
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,300,720 |
public static String getHostPortString(InetSocketAddress addr) {
return addr.getHostName() + ":" + addr.getPort();
} | static String function(InetSocketAddress addr) { return addr.getHostName() + ":" + addr.getPort(); } | /**
* Compose a "host:port" string from the address.
*/ | Compose a "host:port" string from the address | getHostPortString | {
"repo_name": "gabrielborgesmagalhaes/hadoop-hdfs",
"path": "src/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java",
"license": "apache-2.0",
"size": 42484
} | [
"java.net.InetSocketAddress"
] | import java.net.InetSocketAddress; | import java.net.*; | [
"java.net"
] | java.net; | 1,279,421 |
@Test
public void test19GivenNByUserDate() throws LibrecException {
conf.set("data.model.splitter", "net.librec.data.splitter.GivenNDataSplitter");
conf.set("data.splitter.givenn", "userdate");
conf.set("data.splitter.givenn.n", "1");
conf.set(Configured.CONF_DATA_COLUMN_FORMAT, "UIRT");
conf.set(Co... | void function() throws LibrecException { conf.set(STR, STR); conf.set(STR, STR); conf.set(STR, "1"); conf.set(Configured.CONF_DATA_COLUMN_FORMAT, "UIRT"); conf.set(Configured.CONF_DATA_INPUT_PATH, STR); TextDataModel dataModel = new TextDataModel(conf); dataModel.buildDataModel(); assertEquals(getTrainSize(dataModel), ... | /**
* Test the function of splitter part.
* {@link net.librec.data.splitter.GivenNDataSplitter} each user split out N
* ratings with biggest value of date for test set,the rest for training
* set.
*
* @throws LibrecException
*/ | Test the function of splitter part. <code>net.librec.data.splitter.GivenNDataSplitter</code> each user split out N ratings with biggest value of date for test set,the rest for training set | test19GivenNByUserDate | {
"repo_name": "SunYatong/librec",
"path": "core/src/test/java/net/librec/data/model/TextDataModelTestCase.java",
"license": "gpl-3.0",
"size": 17733
} | [
"net.librec.common.LibrecException",
"net.librec.conf.Configured",
"org.junit.Assert"
] | import net.librec.common.LibrecException; import net.librec.conf.Configured; import org.junit.Assert; | import net.librec.common.*; import net.librec.conf.*; import org.junit.*; | [
"net.librec.common",
"net.librec.conf",
"org.junit"
] | net.librec.common; net.librec.conf; org.junit; | 1,971,931 |
public @Nonnull Iterable<InternetGateway> listInternetGateways(@Nullable String vlanId) throws CloudException, InternalException; | @Nonnull Iterable<InternetGateway> function(@Nullable String vlanId) throws CloudException, InternalException; | /**
* Lists all Internet Gateways for an account or optionally all Internet Gateways for a VLAN.
* @param vlanId the VLAN ID to search for internet gateways
* @return a list of internet gateways
* @throws CloudException an error occurred fetching the internet gatewayss from the cloud provider
*... | Lists all Internet Gateways for an account or optionally all Internet Gateways for a VLAN | listInternetGateways | {
"repo_name": "maksimov/dasein-cloud-core",
"path": "src/main/java/org/dasein/cloud/network/VLANSupport.java",
"license": "apache-2.0",
"size": 44522
} | [
"javax.annotation.Nonnull",
"javax.annotation.Nullable",
"org.dasein.cloud.CloudException",
"org.dasein.cloud.InternalException"
] | import javax.annotation.Nonnull; import javax.annotation.Nullable; import org.dasein.cloud.CloudException; import org.dasein.cloud.InternalException; | import javax.annotation.*; import org.dasein.cloud.*; | [
"javax.annotation",
"org.dasein.cloud"
] | javax.annotation; org.dasein.cloud; | 1,575,149 |
private void initCollapsedLayout(final String trackName, final String artistName,
final Bitmap albumArt) {
// Track name (line one)
mNotificationTemplate.setTextViewText(R.id.notification_base_line_one, trackName);
// Artist name (line two)
mNotificationTemplate.setTextVi... | void function(final String trackName, final String artistName, final Bitmap albumArt) { mNotificationTemplate.setTextViewText(R.id.notification_base_line_one, trackName); mNotificationTemplate.setTextViewText(R.id.notification_base_line_two, artistName); mNotificationTemplate.setImageViewBitmap(R.id.notification_base_i... | /**
* Sets the track name, artist name, and album art in the normal layout
*/ | Sets the track name, artist name, and album art in the normal layout | initCollapsedLayout | {
"repo_name": "OpenSilk/Orpheus",
"path": "app/src/main/java/com/andrew/apollo/NotificationHelper.java",
"license": "gpl-3.0",
"size": 10584
} | [
"android.graphics.Bitmap"
] | import android.graphics.Bitmap; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 459,783 |
public Object sendEvent(EventRef event, Object [] args)
throws IllegalAccessException,IllegalArgumentException,InvocationTargetException; | Object function(EventRef event, Object [] args) throws IllegalAccessException,IllegalArgumentException,InvocationTargetException; | /**
* Delivers the specified event to the target control referenced by this handle.
*/ | Delivers the specified event to the target control referenced by this handle | sendEvent | {
"repo_name": "moparisthebest/beehive",
"path": "beehive-controls/src/main/java/org/apache/beehive/controls/api/context/ControlHandle.java",
"license": "apache-2.0",
"size": 1982
} | [
"java.lang.reflect.InvocationTargetException",
"org.apache.beehive.controls.api.events.EventRef"
] | import java.lang.reflect.InvocationTargetException; import org.apache.beehive.controls.api.events.EventRef; | import java.lang.reflect.*; import org.apache.beehive.controls.api.events.*; | [
"java.lang",
"org.apache.beehive"
] | java.lang; org.apache.beehive; | 716,320 |
@Test
public void testDuplicateShapeProperties() throws Exception {
newUserAndGroup("rwra--");
Image originalImage = mmFactory.simpleImage();
Roi originalRoi = new RoiI();
Rectangle originalRectangle = new RectangleI();
originalRoi.addShape(originalRectangle);
... | void function() throws Exception { newUserAndGroup(STR); Image originalImage = mmFactory.simpleImage(); Roi originalRoi = new RoiI(); Rectangle originalRectangle = new RectangleI(); originalRoi.addShape(originalRectangle); Ellipse originalEllipse = new EllipseI(); originalRoi.addShape(originalEllipse); Line originalLin... | /**
* Test preservation of shapes and their properties when duplicating an image with an ROI.
* @throws Exception unexpected
*/ | Test preservation of shapes and their properties when duplicating an image with an ROI | testDuplicateShapeProperties | {
"repo_name": "joansmith/openmicroscopy",
"path": "components/tools/OmeroJava/test/integration/DuplicationTest.java",
"license": "gpl-2.0",
"size": 63822
} | [
"com.google.common.collect.ImmutableMap",
"java.util.Arrays",
"java.util.HashSet",
"java.util.Iterator",
"java.util.Set",
"org.testng.Assert"
] | import com.google.common.collect.ImmutableMap; import java.util.Arrays; import java.util.HashSet; import java.util.Iterator; import java.util.Set; import org.testng.Assert; | import com.google.common.collect.*; import java.util.*; import org.testng.*; | [
"com.google.common",
"java.util",
"org.testng"
] | com.google.common; java.util; org.testng; | 1,171,172 |
private void cacheExpandedObjects(PlatformIdent platformIdent, RepositoryDefinition repositoryDefinition) {
Object[] allExpanded = treeViewer.getExpandedElements();
if (allExpanded.length > 0) {
Set<Object> parents = new HashSet<Object>();
for (Object expanded : allExpanded) {
Object parent = ((ITreeCo... | void function(PlatformIdent platformIdent, RepositoryDefinition repositoryDefinition) { Object[] allExpanded = treeViewer.getExpandedElements(); if (allExpanded.length > 0) { Set<Object> parents = new HashSet<Object>(); for (Object expanded : allExpanded) { Object parent = ((ITreeContentProvider) treeViewer.getContentP... | /**
* Caches the current expanded objects in the tree viewer with the given platform
* ident/repository combination. Note that this method will filter out the elements given by
* {@link org.eclipse.jface.viewers.TreeViewer#getExpandedElements()}, so that only the last
* expanded element in the tree is saved.
... | Caches the current expanded objects in the tree viewer with the given platform ident/repository combination. Note that this method will filter out the elements given by <code>org.eclipse.jface.viewers.TreeViewer#getExpandedElements()</code>, so that only the last expanded element in the tree is saved | cacheExpandedObjects | {
"repo_name": "kugelr/inspectIT",
"path": "inspectIT/src/info/novatec/inspectit/rcp/view/impl/DataExplorerView.java",
"license": "agpl-3.0",
"size": 32788
} | [
"info.novatec.inspectit.cmr.model.PlatformIdent",
"info.novatec.inspectit.rcp.repository.RepositoryDefinition",
"java.util.ArrayList",
"java.util.Arrays",
"java.util.Collections",
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"org.eclipse.jface.viewers.ITreeContentProvider"
] | import info.novatec.inspectit.cmr.model.PlatformIdent; import info.novatec.inspectit.rcp.repository.RepositoryDefinition; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import org.eclipse.jface.viewers.ITreeConten... | import info.novatec.inspectit.cmr.model.*; import info.novatec.inspectit.rcp.repository.*; import java.util.*; import org.eclipse.jface.viewers.*; | [
"info.novatec.inspectit",
"java.util",
"org.eclipse.jface"
] | info.novatec.inspectit; java.util; org.eclipse.jface; | 1,159,057 |
@Override
public Request<CreateRouteTableRequest> getDryRunRequest() {
Request<CreateRouteTableRequest> request = new CreateRouteTableRequestMarshaller().marshall(this);
request.addParameter("DryRun", Boolean.toString(true));
return request;
} | Request<CreateRouteTableRequest> function() { Request<CreateRouteTableRequest> request = new CreateRouteTableRequestMarshaller().marshall(this); request.addParameter(STR, Boolean.toString(true)); return request; } | /**
* This method is intended for internal use only. Returns the marshaled request configured with additional
* parameters to enable operation dry-run.
*/ | This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run | getDryRunRequest | {
"repo_name": "dagnir/aws-sdk-java",
"path": "aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/CreateRouteTableRequest.java",
"license": "apache-2.0",
"size": 3765
} | [
"com.amazonaws.Request",
"com.amazonaws.services.ec2.model.transform.CreateRouteTableRequestMarshaller"
] | import com.amazonaws.Request; import com.amazonaws.services.ec2.model.transform.CreateRouteTableRequestMarshaller; | import com.amazonaws.*; import com.amazonaws.services.ec2.model.transform.*; | [
"com.amazonaws",
"com.amazonaws.services"
] | com.amazonaws; com.amazonaws.services; | 262,137 |
@Override
public void sampleOccurred(SampleEvent e) {
processSample(e.getResult(), new Counter());
} | void function(SampleEvent e) { processSample(e.getResult(), new Counter()); } | /**
* Saves the sample result (and any sub results) in files
*
* @see org.apache.jmeter.samplers.SampleListener#sampleOccurred(org.apache.jmeter.samplers.SampleEvent)
*/ | Saves the sample result (and any sub results) in files | sampleOccurred | {
"repo_name": "johrstrom/cloud-meter",
"path": "cloud-meter-core/src/main/java/org/apache/jmeter/reporters/ResultSaver.java",
"license": "apache-2.0",
"size": 9261
} | [
"org.apache.jmeter.samplers.SampleEvent"
] | import org.apache.jmeter.samplers.SampleEvent; | import org.apache.jmeter.samplers.*; | [
"org.apache.jmeter"
] | org.apache.jmeter; | 613,949 |
public static <T> boolean filter(final Iterable<T> collection, final Predicate<? super T> predicate) {
boolean result = false;
if (collection != null && predicate != null) {
for (final Iterator<T> it = collection.iterator(); it.hasNext();) {
if (!predicate.evaluate(it.nex... | static <T> boolean function(final Iterable<T> collection, final Predicate<? super T> predicate) { boolean result = false; if (collection != null && predicate != null) { for (final Iterator<T> it = collection.iterator(); it.hasNext();) { if (!predicate.evaluate(it.next())) { it.remove(); result = true; } } } return resu... | /**
* Filter the collection by applying a Predicate to each element. If the
* predicate returns false, remove the element.
* <p>
* If the input collection or predicate is null, there is no change made.
*
* @param <T> the type of object the {@link Iterable} contains
* @param collectio... | Filter the collection by applying a Predicate to each element. If the predicate returns false, remove the element. If the input collection or predicate is null, there is no change made | filter | {
"repo_name": "gonmarques/commons-collections",
"path": "src/main/java/org/apache/commons/collections4/CollectionUtils.java",
"license": "apache-2.0",
"size": 92921
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,546,386 |
public void finishRequest()
throws IOException
{
try {
HttpServletRequestImpl requestFacade = _requestFacade;
_requestFacade = null;
_responseFacade = null;
if (requestFacade != null)
requestFacade.finishRequest();
// server/0219, but must be freed for GC
_respo... | void function() throws IOException { try { HttpServletRequestImpl requestFacade = _requestFacade; _requestFacade = null; _responseFacade = null; if (requestFacade != null) requestFacade.finishRequest(); _response.finishRequest(); cleanup(); } catch (Exception e) { log.log(Level.WARNING, e.toString(), e); } finally { _r... | /**
* Cleans up at the end of the request
*/ | Cleans up at the end of the request | finishRequest | {
"repo_name": "gruppo4/quercus-upstream",
"path": "modules/resin/src/com/caucho/server/http/AbstractHttpRequest.java",
"license": "gpl-2.0",
"size": 43371
} | [
"java.io.IOException",
"java.util.logging.Level"
] | import java.io.IOException; import java.util.logging.Level; | import java.io.*; import java.util.logging.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 400,655 |
public Scan getScan() {
return serializableScan.scan;
} | Scan function() { return serializableScan.scan; } | /**
* Gets the {@link Scan} used to filter the table.
* @return The {@link Scan}.
*/ | Gets the <code>Scan</code> used to filter the table | getScan | {
"repo_name": "waprin/cloud-bigtable-client",
"path": "bigtable-hbase-dataflow/src/main/java/com/google/cloud/bigtable/dataflow/CloudBigtableScanConfiguration.java",
"license": "apache-2.0",
"size": 6804
} | [
"org.apache.hadoop.hbase.client.Scan"
] | import org.apache.hadoop.hbase.client.Scan; | import org.apache.hadoop.hbase.client.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,254,689 |
public final BulkRequest timeout(TimeValue timeout) {
this.timeout = timeout;
return this;
}
/**
* Note for internal callers (NOT high level rest client),
* the global parameter setting is ignored when used with:
*
* - {@link BulkRequest#add(IndexRequest)}
* - {@lin... | final BulkRequest function(TimeValue timeout) { this.timeout = timeout; return this; } /** * Note for internal callers (NOT high level rest client), * the global parameter setting is ignored when used with: * * - {@link BulkRequest#add(IndexRequest)} * - {@link BulkRequest#add(UpdateRequest)} * - {@link BulkRequest#add... | /**
* A timeout to wait if the index operation can't be performed immediately. Defaults to {@code 1m}.
*/ | A timeout to wait if the index operation can't be performed immediately. Defaults to 1m | timeout | {
"repo_name": "ern/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/action/bulk/BulkRequest.java",
"license": "apache-2.0",
"size": 16310
} | [
"org.elasticsearch.action.DocWriteRequest",
"org.elasticsearch.action.index.IndexRequest",
"org.elasticsearch.action.update.UpdateRequest",
"org.elasticsearch.core.TimeValue"
] | import org.elasticsearch.action.DocWriteRequest; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.update.UpdateRequest; import org.elasticsearch.core.TimeValue; | import org.elasticsearch.action.*; import org.elasticsearch.action.index.*; import org.elasticsearch.action.update.*; import org.elasticsearch.core.*; | [
"org.elasticsearch.action",
"org.elasticsearch.core"
] | org.elasticsearch.action; org.elasticsearch.core; | 2,839,744 |
if (index < sensors.size()) {
ExtSensor sensor = sensors.get(index);
// prepare request properties
final UrlBuilder urlBuilder = new UrlBuilder().setProtocol(
CommonSenseClient.Urls.PROTOCOL).setHost(CommonSenseClient.Urls.HOST);
urlBuilder.setPath(Urls.PATH_SENSORS + "/" + sensor.getId() + ".json")... | if (index < sensors.size()) { ExtSensor sensor = sensors.get(index); final UrlBuilder urlBuilder = new UrlBuilder().setProtocol( CommonSenseClient.Urls.PROTOCOL).setHost(CommonSenseClient.Urls.HOST); urlBuilder.setPath(Urls.PATH_SENSORS + "/" + sensor.getId() + ".json"); final String url = urlBuilder.buildString(); fin... | /**
* Deletes a list of sensors, using Ajax requests to CommonSense.
*
* @param sensors
* The list of sensors that have to be deleted.
* @param index
* List index of the current sensor to be deleted.
* @param retryCount
* Counter for failed requests that were retried.
... | Deletes a list of sensors, using Ajax requests to CommonSense | delete | {
"repo_name": "senseobservationsystems/commonsense-frontend",
"path": "src/nl/sense_os/commonsense/main/client/sensors/delete/SensorDeleteController.java",
"license": "apache-2.0",
"size": 5278
} | [
"com.google.gwt.http.client.RequestBuilder",
"com.google.gwt.http.client.RequestCallback",
"com.google.gwt.http.client.UrlBuilder",
"nl.sense_os.commonsense.common.client.communication.SessionManager",
"nl.sense_os.commonsense.lib.client.communication.CommonSenseClient",
"nl.sense_os.commonsense.main.clie... | import com.google.gwt.http.client.RequestBuilder; import com.google.gwt.http.client.RequestCallback; import com.google.gwt.http.client.UrlBuilder; import nl.sense_os.commonsense.common.client.communication.SessionManager; import nl.sense_os.commonsense.lib.client.communication.CommonSenseClient; import nl.sense_os.comm... | import com.google.gwt.http.client.*; import nl.sense_os.commonsense.common.client.communication.*; import nl.sense_os.commonsense.lib.client.communication.*; import nl.sense_os.commonsense.main.client.ext.model.*; | [
"com.google.gwt",
"nl.sense_os.commonsense"
] | com.google.gwt; nl.sense_os.commonsense; | 476,645 |
static void checkMethodIdentifier(int version, final String name,
final String msg) {
if (name == null || name.length() == 0) {
throw new IllegalArgumentException("Invalid " + msg
+ " (must not be null or empty)");
}
if ((version & 0xFFFF) >= Opcod... | static void checkMethodIdentifier(int version, final String name, final String msg) { if (name == null name.length() == 0) { throw new IllegalArgumentException(STR + msg + STR); } if ((version & 0xFFFF) >= Opcodes.V1_5) { for (int i = 0; i < name.length(); ++i) { if (STR.indexOf(name.charAt(i)) != -1) { throw new Illeg... | /**
* Checks that the given string is a valid Java identifier.
*
* @param version
* the class version.
* @param name
* the string to be checked.
* @param msg
* a message to be used in case of error.
*/ | Checks that the given string is a valid Java identifier | checkMethodIdentifier | {
"repo_name": "FFY00/deobfuscator",
"path": "src/main/java/com/javadeobfuscator/deobfuscator/org/objectweb/asm/util/CheckMethodAdapter.java",
"license": "apache-2.0",
"size": 53196
} | [
"com.javadeobfuscator.deobfuscator.org.objectweb.asm.Opcodes"
] | import com.javadeobfuscator.deobfuscator.org.objectweb.asm.Opcodes; | import com.javadeobfuscator.deobfuscator.org.objectweb.asm.*; | [
"com.javadeobfuscator.deobfuscator"
] | com.javadeobfuscator.deobfuscator; | 743,364 |
public void closeRegionByRow(byte[] row, RegionLocator table) throws IOException {
HRegionLocation hrl = table.getRegionLocation(row);
closeRegion(hrl.getRegionInfo().getRegionName());
} | void function(byte[] row, RegionLocator table) throws IOException { HRegionLocation hrl = table.getRegionLocation(row); closeRegion(hrl.getRegionInfo().getRegionName()); } | /**
* Closes the region containing the given row.
*
* @param row The row to find the containing region.
* @param table The table to find the region.
* @throws IOException
*/ | Closes the region containing the given row | closeRegionByRow | {
"repo_name": "joshelser/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java",
"license": "apache-2.0",
"size": 143118
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.client.RegionLocator"
] | import java.io.IOException; import org.apache.hadoop.hbase.client.RegionLocator; | import java.io.*; import org.apache.hadoop.hbase.client.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,915,597 |
public static ImageReader getImageReader (ImageWriter writer)
{
if (writer == null)
throw new IllegalArgumentException ("null argument");
ImageWriterSpi spi = writer.getOriginatingProvider();
String[] readerSpiNames = spi.getImageReaderSpiNames();
ImageReader r = null;
if (readerSpiNam... | static ImageReader function (ImageWriter writer) { if (writer == null) throw new IllegalArgumentException (STR); ImageWriterSpi spi = writer.getOriginatingProvider(); String[] readerSpiNames = spi.getImageReaderSpiNames(); ImageReader r = null; if (readerSpiNames != null) { try { Class readerClass = Class.forName (read... | /**
* Retrieve an image reader corresponding to an image writer, or
* null if writer is not registered or if no corresponding reader is
* registered.
*
* @param writer a registered image writer
*
* @return an image reader corresponding to writer, or null
*
* @exception IllegalArgumentExceptio... | Retrieve an image reader corresponding to an image writer, or null if writer is not registered or if no corresponding reader is registered | getImageReader | {
"repo_name": "nmacs/lm3s-uclinux",
"path": "lib/classpath/javax/imageio/ImageIO.java",
"license": "gpl-2.0",
"size": 36051
} | [
"javax.imageio.spi.ImageWriterSpi"
] | import javax.imageio.spi.ImageWriterSpi; | import javax.imageio.spi.*; | [
"javax.imageio"
] | javax.imageio; | 1,939,016 |
CommandLineConfig setWarningGuardSpec(WarningGuardSpec spec) {
this.warningGuards = spec;
return this;
}
private final List<String> define = Lists.newArrayList(); | CommandLineConfig setWarningGuardSpec(WarningGuardSpec spec) { this.warningGuards = spec; return this; } private final List<String> define = Lists.newArrayList(); | /**
* Add warning guards.
*/ | Add warning guards | setWarningGuardSpec | {
"repo_name": "h4ck3rm1k3/javascript-closure-compiler-git",
"path": "src/com/google/javascript/jscomp/AbstractCommandLineRunner.java",
"license": "apache-2.0",
"size": 67882
} | [
"com.google.common.collect.Lists",
"java.util.List"
] | import com.google.common.collect.Lists; import java.util.List; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,564,653 |
public ServerInner withIdentity(ResourceIdentity identity) {
this.identity = identity;
return this;
} | ServerInner function(ResourceIdentity identity) { this.identity = identity; return this; } | /**
* Set the identity property: The Azure Active Directory identity of the server.
*
* @param identity the identity value to set.
* @return the ServerInner object itself.
*/ | Set the identity property: The Azure Active Directory identity of the server | withIdentity | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/postgresql/azure-resourcemanager-postgresql/src/main/java/com/azure/resourcemanager/postgresql/fluent/models/ServerInner.java",
"license": "mit",
"size": 15590
} | [
"com.azure.resourcemanager.postgresql.models.ResourceIdentity"
] | import com.azure.resourcemanager.postgresql.models.ResourceIdentity; | import com.azure.resourcemanager.postgresql.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,301,447 |
public synchronized void remove(int index) {
List<T> copy = new ArrayList<T>(list);
copy.remove(index);
list = copy;
} | synchronized void function(int index) { List<T> copy = new ArrayList<T>(list); copy.remove(index); list = copy; } | /**
* Removes from the list by making a copy of every element except the one with the given index.
* @param index - index of the element to remove.
*/ | Removes from the list by making a copy of every element except the one with the given index | remove | {
"repo_name": "aadnk/ProtocolLib",
"path": "src/main/java/com/comphenix/protocol/concurrency/SortedCopyOnWriteArray.java",
"license": "gpl-2.0",
"size": 6439
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 289,775 |
@Test
public void testGetNullCacheValue() throws IOException {
Path targetDirectory = scratch.dir("/external");
Path targetPath = targetDirectory.getChild(downloadedFile.getBaseName());
Path actualTargetPath = repositoryCache.get(downloadedFileSha256, targetPath, KeyType.SHA256);
assertThat(actualT... | void function() throws IOException { Path targetDirectory = scratch.dir(STR); Path targetPath = targetDirectory.getChild(downloadedFile.getBaseName()); Path actualTargetPath = repositoryCache.get(downloadedFileSha256, targetPath, KeyType.SHA256); assertThat(actualTargetPath).isNull(); } | /**
* Test that the get method retrieves a null if the value is not cached.
*/ | Test that the get method retrieves a null if the value is not cached | testGetNullCacheValue | {
"repo_name": "damienmg/bazel",
"path": "src/test/java/com/google/devtools/build/lib/bazel/repository/cache/RepositoryCacheTest.java",
"license": "apache-2.0",
"size": 6881
} | [
"com.google.common.truth.Truth",
"com.google.devtools.build.lib.bazel.repository.cache.RepositoryCache",
"com.google.devtools.build.lib.vfs.Path",
"java.io.IOException"
] | import com.google.common.truth.Truth; import com.google.devtools.build.lib.bazel.repository.cache.RepositoryCache; import com.google.devtools.build.lib.vfs.Path; import java.io.IOException; | import com.google.common.truth.*; import com.google.devtools.build.lib.bazel.repository.cache.*; import com.google.devtools.build.lib.vfs.*; import java.io.*; | [
"com.google.common",
"com.google.devtools",
"java.io"
] | com.google.common; com.google.devtools; java.io; | 1,171,447 |
Call call = new Call();
call.request = request;
call.method = request.getMethod();
call.authorization = request.getAuthorization();
call.uri = request.getRequestURI();
call.contentType = request.getContentType();
call.url = request.getRequestURL().toString();
fo... | Call call = new Call(); call.request = request; call.method = request.getMethod(); call.authorization = request.getAuthorization(); call.uri = request.getRequestURI(); call.contentType = request.getContentType(); call.url = request.getRequestURL().toString(); for (String headerName : request.getHeaderNames()) { List<St... | /**
* Factory method
*/ | Factory method | fromRequest | {
"repo_name": "mkotsur/restito",
"path": "src/main/java/com/xebialabs/restito/semantics/Call.java",
"license": "mit",
"size": 2829
} | [
"java.io.IOException",
"java.nio.charset.Charset",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List"
] | import java.io.IOException; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.HashMap; import java.util.List; | import java.io.*; import java.nio.charset.*; import java.util.*; | [
"java.io",
"java.nio",
"java.util"
] | java.io; java.nio; java.util; | 319,268 |
public static void generateCustomPlots(ArrayList<PlotConfig> plotConfigs,
ArrayList<Plot> customPlots, String dstDir,
SeriesData[] seriesData, int[] indizes, IBatch[] initBatches,
PlotStyle style, PlotType type, ValueSortMode valueSortMode,
String[] valueSortList, HashMap<Long, Long> timestampMap)
thr... | static void function(ArrayList<PlotConfig> plotConfigs, ArrayList<Plot> customPlots, String dstDir, SeriesData[] seriesData, int[] indizes, IBatch[] initBatches, PlotStyle style, PlotType type, ValueSortMode valueSortMode, String[] valueSortList, HashMap<Long, Long> timestampMap) throws IOException { boolean aggregated... | /**
* Generates custom plots from the given PlotConfig list and adds them to
* the Plot list.
*
* @param plotConfigs
* Input plot config list from which the plots will be created.
* @param customPlots
* List of Plot-Objects to which the new generated plots will be
* add... | Generates custom plots from the given PlotConfig list and adds them to the Plot list | generateCustomPlots | {
"repo_name": "BenjaminSchiller/DNA",
"path": "src/dna/plot/PlottingUtils.java",
"license": "gpl-3.0",
"size": 117803
} | [
"dna.plot.PlottingConfig",
"dna.plot.data.PlotData",
"dna.series.aggdata.AggregatedBatch",
"dna.series.data.IBatch",
"dna.series.data.SeriesData",
"dna.util.Log",
"java.io.IOException",
"java.util.ArrayList",
"java.util.HashMap"
] | import dna.plot.PlottingConfig; import dna.plot.data.PlotData; import dna.series.aggdata.AggregatedBatch; import dna.series.data.IBatch; import dna.series.data.SeriesData; import dna.util.Log; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; | import dna.plot.*; import dna.plot.data.*; import dna.series.aggdata.*; import dna.series.data.*; import dna.util.*; import java.io.*; import java.util.*; | [
"dna.plot",
"dna.plot.data",
"dna.series.aggdata",
"dna.series.data",
"dna.util",
"java.io",
"java.util"
] | dna.plot; dna.plot.data; dna.series.aggdata; dna.series.data; dna.util; java.io; java.util; | 1,052,516 |
public static Interface createInterface(JavaPackage javaPackage, String interfaceName, VisibilityKind visibility,
boolean isAbstract, InheritanceKind inheritance, boolean proxyState, String... interfacesNames) {
return InterfaceHelper.builder(javaPackage, interfaceName).setVisibility(visibility).setAbstract(isA... | static Interface function(JavaPackage javaPackage, String interfaceName, VisibilityKind visibility, boolean isAbstract, InheritanceKind inheritance, boolean proxyState, String... interfacesNames) { return InterfaceHelper.builder(javaPackage, interfaceName).setVisibility(visibility).setAbstract(isAbstract) .setProxy(pro... | /**
* Create an interface in a stand alone compilation unit
*
* @param javaPackage
* the package of the created interface.
* @param interfaceName
* the name of the created interface without .java extension.
* @param visibility
* the visibility of the created interface.
... | Create an interface in a stand alone compilation unit | createInterface | {
"repo_name": "awltech/eclipse-optimus",
"path": "net.atos.optimus.m2m.javaxmi.parent/net.atos.optimus.m2m.javaxmi.operation/src/main/java/net/atos/optimus/m2m/javaxmi/operation/interfaces/InterfaceHelper.java",
"license": "lgpl-3.0",
"size": 8159
} | [
"net.atos.optimus.m2m.javaxmi.operation.packages.JavaPackage",
"org.eclipse.gmt.modisco.java.InheritanceKind",
"org.eclipse.gmt.modisco.java.VisibilityKind"
] | import net.atos.optimus.m2m.javaxmi.operation.packages.JavaPackage; import org.eclipse.gmt.modisco.java.InheritanceKind; import org.eclipse.gmt.modisco.java.VisibilityKind; | import net.atos.optimus.m2m.javaxmi.operation.packages.*; import org.eclipse.gmt.modisco.java.*; | [
"net.atos.optimus",
"org.eclipse.gmt"
] | net.atos.optimus; org.eclipse.gmt; | 2,392,525 |
public void onActivatorRailPass(int x, int y, int z, boolean receivingPower)
{
if (receivingPower)
{
if (this.riddenByEntity != null)
{
this.riddenByEntity.mountEntity((Entity)null);
}
if (this.getRollingAmplitude() == 0)
... | void function(int x, int y, int z, boolean receivingPower) { if (receivingPower) { if (this.riddenByEntity != null) { this.riddenByEntity.mountEntity((Entity)null); } if (this.getRollingAmplitude() == 0) { this.setRollingDirection(-this.getRollingDirection()); this.setRollingAmplitude(10); this.setDamage(50.0F); this.s... | /**
* Called every tick the minecart is on an activator rail. Args: x, y, z, is the rail receiving power
*/ | Called every tick the minecart is on an activator rail. Args: x, y, z, is the rail receiving power | onActivatorRailPass | {
"repo_name": "TorchPowered/Thallium",
"path": "src/main/java/net/minecraft/entity/item/EntityMinecartEmpty.java",
"license": "mit",
"size": 1854
} | [
"net.minecraft.entity.Entity"
] | import net.minecraft.entity.Entity; | import net.minecraft.entity.*; | [
"net.minecraft.entity"
] | net.minecraft.entity; | 675,050 |
private void checkJournal(String[] allowed, String[] denied) throws RepositoryException {
Set<String> allowedSet = new HashSet<String>(Arrays.asList(allowed));
Set<String> deniedSet = new HashSet<String>(Arrays.asList(denied));
while (journal.hasNext()) {
String path = journal.ne... | void function(String[] allowed, String[] denied) throws RepositoryException { Set<String> allowedSet = new HashSet<String>(Arrays.asList(allowed)); Set<String> deniedSet = new HashSet<String>(Arrays.asList(denied)); while (journal.hasNext()) { String path = journal.nextEvent().getPath(); allowedSet.remove(path); if (de... | /**
* Checks the journal for events.
*
* @param allowed allowed paths for the returned events.
* @param denied denied paths for the returned events.
* @throws RepositoryException if an error occurs while reading the event
* journal.
*/ | Checks the journal for events | checkJournal | {
"repo_name": "tripodsan/jackrabbit",
"path": "jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/EventJournalTest.java",
"license": "apache-2.0",
"size": 8746
} | [
"java.util.Arrays",
"java.util.HashSet",
"java.util.Set",
"javax.jcr.RepositoryException"
] | import java.util.Arrays; import java.util.HashSet; import java.util.Set; import javax.jcr.RepositoryException; | import java.util.*; import javax.jcr.*; | [
"java.util",
"javax.jcr"
] | java.util; javax.jcr; | 927,394 |
public void testTempFileWithDir() throws Exception
{
File tempDir = TempFileProvider.getTempDir();
File tempFile = TempFileProvider.createTempFile("AAAA", ".tmp", tempDir);
File tempFileParent = tempFile.getParentFile();
assertEquals("Temp file not located in our temp direct... | void function() throws Exception { File tempDir = TempFileProvider.getTempDir(); File tempFile = TempFileProvider.createTempFile("AAAA", ".tmp", tempDir); File tempFileParent = tempFile.getParentFile(); assertEquals(STR, tempDir, tempFileParent); File tempFile2 = TempFileProvider.createTempFile("AAAA", ".tmp", tempDir)... | /**
* test create a temporary file with a directory
*
* create another file with the same prefix and suffix.
* @throws Exception
*/ | test create a temporary file with a directory create another file with the same prefix and suffix | testTempFileWithDir | {
"repo_name": "Alfresco/gytheio",
"path": "gytheio-commons/src/test/java/org/gytheio/content/file/TempFileProviderTest.java",
"license": "lgpl-3.0",
"size": 3172
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 930,386 |
private static String flowModActionsToString(List<OFAction> fmActions) {
StringBuilder sb = new StringBuilder();
for (OFAction a : fmActions) {
if (sb.length() > 0) {
sb.append(',');
}
switch(a.getType()) {
case OUTPUT:
... | static String function(List<OFAction> fmActions) { StringBuilder sb = new StringBuilder(); for (OFAction a : fmActions) { if (sb.length() > 0) { sb.append(','); } switch(a.getType()) { case OUTPUT: sb.append(STR + Short.toString(((OFActionOutput)a).getPort())); break; case OPAQUE_ENQUEUE: int queue = ((OFActionEnqueue)... | /**
* Returns a String representation of all the openflow actions.
* @param fmActions A list of OFActions to encode into one string
* @return A string of the actions encoded for our database
*/ | Returns a String representation of all the openflow actions | flowModActionsToString | {
"repo_name": "schuza/odin-master",
"path": "src/main/java/net/floodlightcontroller/staticflowentry/StaticFlowEntries.java",
"license": "apache-2.0",
"size": 32405
} | [
"java.util.List",
"net.floodlightcontroller.packet.IPv4",
"org.openflow.protocol.action.OFAction",
"org.openflow.protocol.action.OFActionDataLayerDestination",
"org.openflow.protocol.action.OFActionDataLayerSource",
"org.openflow.protocol.action.OFActionEnqueue",
"org.openflow.protocol.action.OFActionNe... | import java.util.List; import net.floodlightcontroller.packet.IPv4; import org.openflow.protocol.action.OFAction; import org.openflow.protocol.action.OFActionDataLayerDestination; import org.openflow.protocol.action.OFActionDataLayerSource; import org.openflow.protocol.action.OFActionEnqueue; import org.openflow.protoc... | import java.util.*; import net.floodlightcontroller.packet.*; import org.openflow.protocol.action.*; import org.openflow.util.*; | [
"java.util",
"net.floodlightcontroller.packet",
"org.openflow.protocol",
"org.openflow.util"
] | java.util; net.floodlightcontroller.packet; org.openflow.protocol; org.openflow.util; | 125,793 |
public void checkTotals(Document document) {
boolean proceed = true;
KualiDecimal total = newPerDiem.getBreakfast();
total = total.add(newPerDiem.getLunch());
total = total.add(newPerDiem.getDinner());
total = total.add(newPerDiem.getIncidentals());
if(!total.equals... | void function(Document document) { boolean proceed = true; KualiDecimal total = newPerDiem.getBreakfast(); total = total.add(newPerDiem.getLunch()); total = total.add(newPerDiem.getDinner()); total = total.add(newPerDiem.getIncidentals()); if(!total.equals(newPerDiem.getMealsAndIncidentals())) { proceed = askOrAnalyzeY... | /**
* Checks if the B+L+D+IE total does not match Meal+Incidentals total
*
* @param document - per diem document
*/ | Checks if the B+L+D+IE total does not match Meal+Incidentals total | checkTotals | {
"repo_name": "ua-eas/kfs-devops-automation-fork",
"path": "kfs-tem/src/main/java/org/kuali/kfs/module/tem/document/validation/impl/PerDiemDocumentPreRules.java",
"license": "agpl-3.0",
"size": 3426
} | [
"org.kuali.rice.core.api.util.type.KualiDecimal",
"org.kuali.rice.krad.document.Document"
] | import org.kuali.rice.core.api.util.type.KualiDecimal; import org.kuali.rice.krad.document.Document; | import org.kuali.rice.core.api.util.type.*; import org.kuali.rice.krad.document.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 1,903,122 |
public boolean arrowScroll(int direction, boolean horizontal) {
View currentFocused = findFocus();
if (currentFocused == this) currentFocused = null;
View nextFocused = FocusFinder.getInstance().findNextFocus(this, currentFocused, direction);
final int maxJump = horizontal ? getMaxSc... | boolean function(int direction, boolean horizontal) { View currentFocused = findFocus(); if (currentFocused == this) currentFocused = null; View nextFocused = FocusFinder.getInstance().findNextFocus(this, currentFocused, direction); final int maxJump = horizontal ? getMaxScrollAmountHorizontal() : getMaxScrollAmountVer... | /**
* Handle scrolling in response to an up or down arrow click.
*
* @param direction The direction corresponding to the arrow key that was
* pressed
* @return True if we consumed the event, false otherwise
*/ | Handle scrolling in response to an up or down arrow click | arrowScroll | {
"repo_name": "yehe01/AndroidTreeView",
"path": "library/src/main/java/com/unnamed/b/atv/view/TwoDScrollView.java",
"license": "apache-2.0",
"size": 45405
} | [
"android.view.FocusFinder",
"android.view.View"
] | import android.view.FocusFinder; import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,863,094 |
@Override
public Doi getEntityDoi(String entityId) throws SynapseException {
return getEntityDoi(entityId, null);
} | Doi function(String entityId) throws SynapseException { return getEntityDoi(entityId, null); } | /**
* Gets the DOI for the specified entity version. The DOI is for the current
* version of the entity.
*/ | Gets the DOI for the specified entity version. The DOI is for the current version of the entity | getEntityDoi | {
"repo_name": "hhu94/Synapse-Repository-Services",
"path": "client/synapseJavaClient/src/main/java/org/sagebionetworks/client/SynapseClientImpl.java",
"license": "apache-2.0",
"size": 187988
} | [
"org.sagebionetworks.client.exceptions.SynapseException",
"org.sagebionetworks.repo.model.doi.Doi"
] | import org.sagebionetworks.client.exceptions.SynapseException; import org.sagebionetworks.repo.model.doi.Doi; | import org.sagebionetworks.client.exceptions.*; import org.sagebionetworks.repo.model.doi.*; | [
"org.sagebionetworks.client",
"org.sagebionetworks.repo"
] | org.sagebionetworks.client; org.sagebionetworks.repo; | 2,608,191 |
private byte[] getMultipartDivider() throws IOException {
return (DASH_DASH + getBoundary()).getBytes(ENCODING);
} | byte[] function() throws IOException { return (DASH_DASH + getBoundary()).getBytes(ENCODING); } | /**
* Get the bytes used to separate multiparts
* Encoded using ENCODING
*
* @return the bytes used to separate multiparts
* @throws IOException
*/ | Get the bytes used to separate multiparts Encoded using ENCODING | getMultipartDivider | {
"repo_name": "d0k1/jmeter",
"path": "src/protocol/http/org/apache/jmeter/protocol/http/sampler/PostWriter.java",
"license": "apache-2.0",
"size": 19818
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 113,355 |
void patchGlobalScope(Scope globalScope, Node scriptRoot) {
// Preconditions: This is supposed to be called only on (named) SCRIPT nodes
// and a global typed scope should have been generated already.
Preconditions.checkState(scriptRoot.isScript());
Preconditions.checkNotNull(globalScope);
Precond... | void patchGlobalScope(Scope globalScope, Node scriptRoot) { Preconditions.checkState(scriptRoot.isScript()); Preconditions.checkNotNull(globalScope); Preconditions.checkState(globalScope.isGlobal()); String scriptName = NodeUtil.getSourceName(scriptRoot); Preconditions.checkNotNull(scriptName); for (Node node : Immutab... | /**
* Patches a given global scope by removing variables previously declared in
* a script and re-traversing a new version of that script.
*
* @param globalScope The global scope generated by {@code createScope}.
* @param scriptRoot The script that is modified.
*/ | Patches a given global scope by removing variables previously declared in a script and re-traversing a new version of that script | patchGlobalScope | {
"repo_name": "robbert/closure-compiler",
"path": "src/com/google/javascript/jscomp/TypedScopeCreator.java",
"license": "apache-2.0",
"size": 81522
} | [
"com.google.common.base.Preconditions",
"com.google.common.collect.ImmutableList",
"com.google.common.collect.Lists",
"com.google.javascript.jscomp.Scope",
"com.google.javascript.rhino.Node",
"java.util.Iterator",
"java.util.List"
] | import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.javascript.jscomp.Scope; import com.google.javascript.rhino.Node; import java.util.Iterator; import java.util.List; | import com.google.common.base.*; import com.google.common.collect.*; import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*; import java.util.*; | [
"com.google.common",
"com.google.javascript",
"java.util"
] | com.google.common; com.google.javascript; java.util; | 2,795,666 |
public void testIgnoreMalformedParsing() throws IOException {
DocumentMapper mapper = createDocumentMapper(fieldMapping(b -> b.field("type", "geo_shape").field("ignore_malformed", true)));
Mapper fieldMapper = mapper.mappers().getMapper("field");
assertThat(fieldMapper, instanceOf(GeoShapeFi... | void function() throws IOException { DocumentMapper mapper = createDocumentMapper(fieldMapping(b -> b.field("type", STR).field(STR, true))); Mapper fieldMapper = mapper.mappers().getMapper("field"); assertThat(fieldMapper, instanceOf(GeoShapeFieldMapper.class)); Explicit<Boolean> ignoreMalformed = ((GeoShapeFieldMapper... | /**
* Test that ignore_malformed parameter correctly parses
*/ | Test that ignore_malformed parameter correctly parses | testIgnoreMalformedParsing | {
"repo_name": "scorpionvicky/elasticsearch",
"path": "server/src/test/java/org/elasticsearch/index/mapper/GeoShapeFieldMapperTests.java",
"license": "apache-2.0",
"size": 13244
} | [
"java.io.IOException",
"org.elasticsearch.common.Explicit",
"org.hamcrest.Matchers"
] | import java.io.IOException; import org.elasticsearch.common.Explicit; import org.hamcrest.Matchers; | import java.io.*; import org.elasticsearch.common.*; import org.hamcrest.*; | [
"java.io",
"org.elasticsearch.common",
"org.hamcrest"
] | java.io; org.elasticsearch.common; org.hamcrest; | 1,238,493 |
@AtMostOnce
void removeCachePool(String pool) throws IOException; | void removeCachePool(String pool) throws IOException; | /**
* Remove a cache pool.
*
* @param pool name of the cache pool to remove.
* @throws IOException if the cache pool did not exist, or could not be
* removed.
*/ | Remove a cache pool | removeCachePool | {
"repo_name": "GeLiXin/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java",
"license": "apache-2.0",
"size": 68207
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 597,861 |
private void updateList(int id, Set<String> filters, Consumer<String> filtersRemove) {
((LinearLayout) findViewById(id)).removeAllViews();
for (String s : filters) {
final View t = getLayoutInflater().inflate(R.layout.account_textview, (LinearLayout) findViewById(id), false);
... | void function(int id, Set<String> filters, Consumer<String> filtersRemove) { ((LinearLayout) findViewById(id)).removeAllViews(); for (String s : filters) { final View t = getLayoutInflater().inflate(R.layout.account_textview, (LinearLayout) findViewById(id), false); ((TextView) t.findViewById(R.id.name)).setText(s); t.... | /**
* Iterate through filters and add an item for each to the layout with id, with a remove button calling filtersRemoved
*
* @param id ID of linearlayout containing items
* @param filters Set of filters to iterate through
* @param filtersRemove Method to call on remove button ... | Iterate through filters and add an item for each to the layout with id, with a remove button calling filtersRemoved | updateList | {
"repo_name": "ccrama/Slide",
"path": "app/src/main/java/me/ccrama/redditslide/ui/settings/SettingsFilter.java",
"license": "gpl-3.0",
"size": 6972
} | [
"android.view.View",
"android.widget.LinearLayout",
"android.widget.TextView",
"androidx.core.util.Consumer",
"java.util.Set"
] | import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; import androidx.core.util.Consumer; import java.util.Set; | import android.view.*; import android.widget.*; import androidx.core.util.*; import java.util.*; | [
"android.view",
"android.widget",
"androidx.core",
"java.util"
] | android.view; android.widget; androidx.core; java.util; | 2,261,473 |
void named(String name, Action<? super T> configAction); | void named(String name, Action<? super T> configAction); | /**
* Applies the given action to the given item, when the item is required.
*
* <p>The given action is invoked to configure the item when the item is required. It is called after any actions provided to {@link #beforeEach(org.gradle.api.Action)} and {@link #create(String,
* org.gradle.api.Action)}.... | Applies the given action to the given item, when the item is required. The given action is invoked to configure the item when the item is required. It is called after any actions provided to <code>#beforeEach(org.gradle.api.Action)</code> and <code>#create(String, org.gradle.api.Action)</code> | named | {
"repo_name": "cams7/gradle-samples",
"path": "plugin/model-core/src/main/java/org/gradle/model/collection/CollectionBuilder.java",
"license": "gpl-2.0",
"size": 9013
} | [
"org.gradle.api.Action"
] | import org.gradle.api.Action; | import org.gradle.api.*; | [
"org.gradle.api"
] | org.gradle.api; | 558,992 |
EList<MLanguage> getLanguages(); | EList<MLanguage> getLanguages(); | /**
* Returns the list of languages supported by the domain. The different
* components defined within the domain can be implemented in one of this
* programming languages.
* @return the list of supported languages.
* @see es.uah.aut.srg.micobs.mclev.mclevdom.mclevdomPackage#getMIODomain_Languages()
* @mode... | Returns the list of languages supported by the domain. The different components defined within the domain can be implemented in one of this programming languages | getLanguages | {
"repo_name": "parraman/micobs",
"path": "mclev/es.uah.aut.srg.micobs.mclev/src/es/uah/aut/srg/micobs/mclev/mclevdom/MIODomain.java",
"license": "epl-1.0",
"size": 4270
} | [
"es.uah.aut.srg.micobs.system.MLanguage",
"org.eclipse.emf.common.util.EList"
] | import es.uah.aut.srg.micobs.system.MLanguage; import org.eclipse.emf.common.util.EList; | import es.uah.aut.srg.micobs.system.*; import org.eclipse.emf.common.util.*; | [
"es.uah.aut",
"org.eclipse.emf"
] | es.uah.aut; org.eclipse.emf; | 1,041,985 |
public void loadLights(List<Light> lights) {
for (int i = 0; i < MAX_LIGHT_SOURCES; i++) {
if (i < lights.size()) {
super.loadVector(locationLightPosition[i], lights.get(i).getPosition());
super.loadVector(locationLightColour[i], lights.get(i).getColour());
... | void function(List<Light> lights) { for (int i = 0; i < MAX_LIGHT_SOURCES; i++) { if (i < lights.size()) { super.loadVector(locationLightPosition[i], lights.get(i).getPosition()); super.loadVector(locationLightColour[i], lights.get(i).getColour()); super.loadVector(locationAttenuation[i], lights.get(i).getAttenuation()... | /**
* Load lights.
*
* @param lights the lights
*/ | Load lights | loadLights | {
"repo_name": "Recursively/redmf",
"path": "src/model/shaders/entity/EntityShader.java",
"license": "mit",
"size": 5953
} | [
"java.util.List",
"org.lwjgl.util.vector.Vector3f"
] | import java.util.List; import org.lwjgl.util.vector.Vector3f; | import java.util.*; import org.lwjgl.util.vector.*; | [
"java.util",
"org.lwjgl.util"
] | java.util; org.lwjgl.util; | 2,438,558 |
public void lshr() throws IOException
{
l.tshr();
} | void function() throws IOException { l.tshr(); } | /**
* Arithmetic shift right long
* <p>Stack: ..., value1, value2=>..., result
* @throws IOException
*/ | Arithmetic shift right long Stack: ..., value1, value2=>..., result | lshr | {
"repo_name": "tvesalainen/bcc",
"path": "src/main/java/org/vesalainen/bcc/Assembler.java",
"license": "gpl-3.0",
"size": 53751
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 713,280 |
Rectangle one = new Rectangle(0, 0, 4, 4);
Rectangle two = new Rectangle(2, 2, 4, 4);
assertThat(one.intersects(two)).isEqualTo(true);
assertThat(two.intersects(one)).isEqualTo(true);
} | Rectangle one = new Rectangle(0, 0, 4, 4); Rectangle two = new Rectangle(2, 2, 4, 4); assertThat(one.intersects(two)).isEqualTo(true); assertThat(two.intersects(one)).isEqualTo(true); } | /**
* <pre>
* ____
* |1 |
* | __|__
* |_|__| |
* | 2 |
* |_____|
*
* </pre>
*/ | <code> ____ |1 | | __|__ |_|__| | | 2 | |_____| </code> | intersects_topLeft$bottomRight_true | {
"repo_name": "TickleThePanda/location-history",
"path": "core/mapper/src/test/java/uk/co/ticklethepanda/carto/core/RectangleTest.java",
"license": "mit",
"size": 6750
} | [
"org.assertj.core.api.Assertions",
"uk.co.ticklethepanda.carto.core.model.Rectangle"
] | import org.assertj.core.api.Assertions; import uk.co.ticklethepanda.carto.core.model.Rectangle; | import org.assertj.core.api.*; import uk.co.ticklethepanda.carto.core.model.*; | [
"org.assertj.core",
"uk.co.ticklethepanda"
] | org.assertj.core; uk.co.ticklethepanda; | 1,829,240 |
@Nullable
public static Rational valueOf(@Nullable String value, @Nullable Locale locale) {
return valueOf(value, locale == null ? null : NumberFormat.getInstance(locale));
} | static Rational function(@Nullable String value, @Nullable Locale locale) { return valueOf(value, locale == null ? null : NumberFormat.getInstance(locale)); } | /**
* Returns an instance by parsing the specified {@link String}. The format
* must be either {@code number/number}, {@code number:number} or
* {@code number}. Signs are understood for both numerator and denominator.
* If {@code value} is blank or {@code null}, {@code null} is returned. If
* {@code value} ca... | Returns an instance by parsing the specified <code>String</code>. The format must be either number/number, number:number or number. Signs are understood for both numerator and denominator. If value is blank or null, null is returned. If value can't be parsed, a <code>NumberFormatException</code> is thrown | valueOf | {
"repo_name": "UniversalMediaServer/UniversalMediaServer",
"path": "src/main/java/net/pms/util/Rational.java",
"license": "gpl-2.0",
"size": 72265
} | [
"java.text.NumberFormat",
"java.util.Locale",
"javax.annotation.Nullable"
] | import java.text.NumberFormat; import java.util.Locale; import javax.annotation.Nullable; | import java.text.*; import java.util.*; import javax.annotation.*; | [
"java.text",
"java.util",
"javax.annotation"
] | java.text; java.util; javax.annotation; | 1,369,408 |
private static Set<String> getRoles(User user) {
Set<String> allRoles = Sets.newHashSet();
String[] userRoles = user.getRoles();
Set<String> groupRoles = user.getGroupRoles();
if (userRoles != null && userRoles.length > 0) {
allRoles.addAll(Sets.newHashSet(userRoles));
... | static Set<String> function(User user) { Set<String> allRoles = Sets.newHashSet(); String[] userRoles = user.getRoles(); Set<String> groupRoles = user.getGroupRoles(); if (userRoles != null && userRoles.length > 0) { allRoles.addAll(Sets.newHashSet(userRoles)); } if (groupRoles != null && !groupRoles.isEmpty()) { allRo... | /**
* Return all the roles of an user (Alien 4 Cloud's roles)
*
* @param user
* @return all user's A4C roles
*/ | Return all the roles of an user (Alien 4 Cloud's roles) | getRoles | {
"repo_name": "alien4cloud/alien4cloud",
"path": "alien4cloud-security/src/main/java/alien4cloud/security/AuthorizationUtil.java",
"license": "apache-2.0",
"size": 19983
} | [
"com.google.common.collect.Sets",
"java.util.Set"
] | import com.google.common.collect.Sets; import java.util.Set; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,434,515 |
protected static ArrayList<BigInteger> genC()
{
BigInteger biaa = BigInteger.valueOf( 3225 );
BigInteger biab = BigInteger.valueOf( 3237 );
BigInteger biac = BigInteger.valueOf( 3264 );
ArrayList<BigInteger> ret = new ArrayList<BigInteger>();
ret.add( biaa );
ret.add( biab );
ret.add( biac );
... | static ArrayList<BigInteger> function() { BigInteger biaa = BigInteger.valueOf( 3225 ); BigInteger biab = BigInteger.valueOf( 3237 ); BigInteger biac = BigInteger.valueOf( 3264 ); ArrayList<BigInteger> ret = new ArrayList<BigInteger>(); ret.add( biaa ); ret.add( biab ); ret.add( biac ); return( ret ); } | /**
* Generates a 3-D index for use with the test.
*
* @return The 3-D index.
*/ | Generates a 3-D index for use with the test | genC | {
"repo_name": "viridian1138/SimpleAlgebra_V2",
"path": "src/test_simplealgebra/TestBaseDbArrayBasics.java",
"license": "gpl-3.0",
"size": 10314
} | [
"java.math.BigInteger",
"java.util.ArrayList"
] | import java.math.BigInteger; import java.util.ArrayList; | import java.math.*; import java.util.*; | [
"java.math",
"java.util"
] | java.math; java.util; | 2,521,065 |
public void startFlow(Flow fl) {
} | void function(Flow fl) { } | /**
* This method is called to indicate the start of a new fo:flow
* or fo:static-content.
* This method also handles fo:static-content tags, because the
* StaticContent class is derived from the Flow class.
*
* @param fl Flow that is starting.
*/ | This method is called to indicate the start of a new fo:flow or fo:static-content. This method also handles fo:static-content tags, because the StaticContent class is derived from the Flow class | startFlow | {
"repo_name": "pellcorp/fop",
"path": "src/java/org/apache/fop/fo/FOEventHandler.java",
"license": "apache-2.0",
"size": 13537
} | [
"org.apache.fop.fo.pagination.Flow"
] | import org.apache.fop.fo.pagination.Flow; | import org.apache.fop.fo.pagination.*; | [
"org.apache.fop"
] | org.apache.fop; | 1,659,955 |
@ThreadConfined(type = ThreadConfined.ThreadType.JFX)
private void promptForRebuild(AbstractFile file, BlackboardArtifact artifact) {
//if there is an existing prompt or progressdialog, just show that
if (promptDialogManager.bringCurrentDialogToFront()) {
return;
}
/... | @ThreadConfined(type = ThreadConfined.ThreadType.JFX) void function(AbstractFile file, BlackboardArtifact artifact) { if (promptDialogManager.bringCurrentDialogToFront()) { return; } if (eventsRepository.countAllEvents() == 0) { rebuildRepo(file, artifact); return; } List<String> rebuildReasons = getRebuildReasons(); i... | /**
* Prompt the user to confirm rebuilding the db. Checks if a database
* rebuild is necessary and includes the reasons in the prompt. If the user
* confirms, rebuilds the database. Shows the timeline window when the
* rebuild is done, or immediately if the rebuild is not confirmed.
*
* @... | Prompt the user to confirm rebuilding the db. Checks if a database rebuild is necessary and includes the reasons in the prompt. If the user confirms, rebuilds the database. Shows the timeline window when the rebuild is done, or immediately if the rebuild is not confirmed | promptForRebuild | {
"repo_name": "millmanorama/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/timeline/TimeLineController.java",
"license": "apache-2.0",
"size": 43142
} | [
"java.util.List",
"org.sleuthkit.autopsy.coreutils.ThreadConfined",
"org.sleuthkit.datamodel.AbstractFile",
"org.sleuthkit.datamodel.BlackboardArtifact"
] | import java.util.List; import org.sleuthkit.autopsy.coreutils.ThreadConfined; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.BlackboardArtifact; | import java.util.*; import org.sleuthkit.autopsy.coreutils.*; import org.sleuthkit.datamodel.*; | [
"java.util",
"org.sleuthkit.autopsy",
"org.sleuthkit.datamodel"
] | java.util; org.sleuthkit.autopsy; org.sleuthkit.datamodel; | 562,634 |
ReadRequest directCounterCells(Iterable<PiTableId> tableIds); | ReadRequest directCounterCells(Iterable<PiTableId> tableIds); | /**
* Requests to read all direct counter cells from the given tables.
*
* @param tableIds table IDs
* @return this
*/ | Requests to read all direct counter cells from the given tables | directCounterCells | {
"repo_name": "oplinkoms/onos",
"path": "protocols/p4runtime/api/src/main/java/org/onosproject/p4runtime/api/P4RuntimeReadClient.java",
"license": "apache-2.0",
"size": 8962
} | [
"org.onosproject.net.pi.model.PiTableId"
] | import org.onosproject.net.pi.model.PiTableId; | import org.onosproject.net.pi.model.*; | [
"org.onosproject.net"
] | org.onosproject.net; | 1,269,717 |
public Observable<ServiceResponse<Page<ProfileInner>>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
} | Observable<ServiceResponse<Page<ProfileInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); } | /**
* Lists all of the CDN profiles within a resource group.
*
ServiceResponse<PageImpl<ProfileInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @return the PagedList<ProfileInner> object wrapped in {@link ServiceResponse} if successful.
*/ | Lists all of the CDN profiles within a resource group | listByResourceGroupNextSinglePageAsync | {
"repo_name": "pomortaz/azure-sdk-for-java",
"path": "azure-mgmt-cdn/src/main/java/com/microsoft/azure/management/cdn/implementation/ProfilesInner.java",
"license": "mit",
"size": 82272
} | [
"com.microsoft.azure.Page",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 969,273 |
return AutoStartViewDefinition.Meta.INSTANCE;
}
static {
JodaBeanUtils.registerMetaBean(AutoStartViewDefinition.Meta.INSTANCE);
} | return AutoStartViewDefinition.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(AutoStartViewDefinition.Meta.INSTANCE); } | /**
* The meta-bean for {@code AutoStartViewDefinition}.
* @return the meta-bean, not null
*/ | The meta-bean for AutoStartViewDefinition | meta | {
"repo_name": "ChinaQuants/OG-Platform",
"path": "projects/OG-Engine/src/main/java/com/opengamma/engine/view/impl/AutoStartViewDefinition.java",
"license": "apache-2.0",
"size": 11869
} | [
"org.joda.beans.JodaBeanUtils"
] | import org.joda.beans.JodaBeanUtils; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 346,773 |
ProjectNativeComponent getComponent(); | ProjectNativeComponent getComponent(); | /**
* The component that this project represents.
*/ | The component that this project represents | getComponent | {
"repo_name": "VolitionEos/DungFactory",
"path": ".gradlew/wrapper/dists/gradle-2.0-all/7rd4e4rcg4riqi0j6j508m2lbk/gradle-2.0/src/cpp/org/gradle/ide/visualstudio/VisualStudioProject.java",
"license": "gpl-3.0",
"size": 1925
} | [
"org.gradle.nativebinaries.ProjectNativeComponent"
] | import org.gradle.nativebinaries.ProjectNativeComponent; | import org.gradle.nativebinaries.*; | [
"org.gradle.nativebinaries"
] | org.gradle.nativebinaries; | 1,209,246 |
public void setVar(String var) {
this.var = Static.trim3(getProject(), var, this.var);
} | void function(String var) { this.var = Static.trim3(getProject(), var, this.var); } | /**
* Set the var attribute. This is the name of the macrodef attribute that gets
* set for each iterator of the sequential element.
*/ | Set the var attribute. This is the name of the macrodef attribute that gets set for each iterator of the sequential element | setVar | {
"repo_name": "greg2001/ant-flaka",
"path": "src/it/haefelinger/flaka/For.java",
"license": "apache-2.0",
"size": 4262
} | [
"it.haefelinger.flaka.util.Static"
] | import it.haefelinger.flaka.util.Static; | import it.haefelinger.flaka.util.*; | [
"it.haefelinger.flaka"
] | it.haefelinger.flaka; | 2,896,333 |
@Override
public AuthenticationManager getAuthenticationManager(String connectorName)
throws ConnectorNotFoundException, InstantiatorException {
return getConnectorCoordinator(connectorName).getAuthenticationManager();
} | AuthenticationManager function(String connectorName) throws ConnectorNotFoundException, InstantiatorException { return getConnectorCoordinator(connectorName).getAuthenticationManager(); } | /**
* Returns an {@Link AuthenticationManager}.
*/ | Returns an AuthenticationManager | getAuthenticationManager | {
"repo_name": "googlegsa/manager.v3",
"path": "projects/connector-manager/source/javatests/com/google/enterprise/connector/instantiator/MockInstantiator.java",
"license": "apache-2.0",
"size": 13790
} | [
"com.google.enterprise.connector.persist.ConnectorNotFoundException",
"com.google.enterprise.connector.spi.AuthenticationManager"
] | import com.google.enterprise.connector.persist.ConnectorNotFoundException; import com.google.enterprise.connector.spi.AuthenticationManager; | import com.google.enterprise.connector.persist.*; import com.google.enterprise.connector.spi.*; | [
"com.google.enterprise"
] | com.google.enterprise; | 289,071 |
public static void generateStatementBody
(PrintWriter pw, SimpleFlowStatement stmt, TaskDeclaration task)
{
pw.println("private SinkIF nextSink;");
Vector<String> args = stmt.getArguments();
pw.println("public void init(ConfigDataIF config) throws Exception {"+
"mgr = config.getManager();"+
"next... | static void function (PrintWriter pw, SimpleFlowStatement stmt, TaskDeclaration task) { pw.println(STR); Vector<String> args = stmt.getArguments(); pw.println(STR+ STR+ STRSTR\STR+ STR+ "}"); pw.println(STR+ STR+ STR+ STR+ task.getName()+ STR+task.getName()+STR); generateHandlerBody(pw, stmt, task); pw.println("}"); pw... | /**
* Generate a simple flow statement body
* @param pw Where to write
* @param stmt The statement to translate
* @param task The parent task definition for this statement (left-side)
**/ | Generate a simple flow statement body | generateStatementBody | {
"repo_name": "emeryberger/flux",
"path": "src/edu/umass/cs/flux/JavaSedaGenerator.java",
"license": "gpl-2.0",
"size": 15283
} | [
"java.io.PrintWriter",
"java.util.Vector"
] | import java.io.PrintWriter; import java.util.Vector; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,434,620 |
public void setForeground(Drawable drawable) {
if (mForeground != drawable) {
if (mForeground != null) {
mForeground.setCallback(null);
unscheduleDrawable(mForeground);
}
mForeground = drawable;
if (drawable != null) {
... | void function(Drawable drawable) { if (mForeground != drawable) { if (mForeground != null) { mForeground.setCallback(null); unscheduleDrawable(mForeground); } mForeground = drawable; if (drawable != null) { setWillNotDraw(false); drawable.setCallback(this); if (drawable.isStateful()) { drawable.setState(getDrawableStat... | /**
* Supply a Drawable that is to be rendered on top of all of the child
* views in the frame layout. Any padding in the Drawable will be taken
* into account by ensuring that the children are inset to be placed
* inside of the padding area.
*
* @param drawable The Drawable to be drawn o... | Supply a Drawable that is to be rendered on top of all of the child views in the frame layout. Any padding in the Drawable will be taken into account by ensuring that the children are inset to be placed inside of the padding area | setForeground | {
"repo_name": "xunboo/JJCamera",
"path": "android/src/main/java/com/jjcamera/apps/iosched/ui/widget/ForegroundLinearLayout.java",
"license": "apache-2.0",
"size": 7231
} | [
"android.graphics.Rect",
"android.graphics.drawable.Drawable",
"android.view.Gravity"
] | import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.view.Gravity; | import android.graphics.*; import android.graphics.drawable.*; import android.view.*; | [
"android.graphics",
"android.view"
] | android.graphics; android.view; | 2,847,642 |
TestCaseExecutionInQueue findByKey(long id) throws CerberusException; | TestCaseExecutionInQueue findByKey(long id) throws CerberusException; | /**
* Fing a {@link TestCaseExecutionInQueue} record from the database knowing the key
* @param id
* @return
* @throws CerberusException
*/ | Fing a <code>TestCaseExecutionInQueue</code> record from the database knowing the key | findByKey | {
"repo_name": "afnogueira/Cerberus",
"path": "source/src/main/java/org/cerberus/dao/ITestCaseExecutionInQueueDAO.java",
"license": "gpl-3.0",
"size": 3870
} | [
"org.cerberus.entity.TestCaseExecutionInQueue",
"org.cerberus.exception.CerberusException"
] | import org.cerberus.entity.TestCaseExecutionInQueue; import org.cerberus.exception.CerberusException; | import org.cerberus.entity.*; import org.cerberus.exception.*; | [
"org.cerberus.entity",
"org.cerberus.exception"
] | org.cerberus.entity; org.cerberus.exception; | 14,030 |
public double getDomainUpperBound(boolean includeInterval) {
double result = Double.NaN;
Range r = getDomainBounds(includeInterval);
if (r != null) {
result = r.getUpperBound();
}
return result;
}
| double function(boolean includeInterval) { double result = Double.NaN; Range r = getDomainBounds(includeInterval); if (r != null) { result = r.getUpperBound(); } return result; } | /**
* Returns the maximum x-value in the dataset.
*
* @param includeInterval a flag that determines whether or not the
* x-interval is taken into account.
*
* @return The maximum value.
*/ | Returns the maximum x-value in the dataset | getDomainUpperBound | {
"repo_name": "Mr-Steve/LTSpice_Library_Manager",
"path": "libs/jfreechart-1.0.16/source/org/jfree/data/time/TimePeriodValuesCollection.java",
"license": "gpl-2.0",
"size": 16612
} | [
"org.jfree.data.Range"
] | import org.jfree.data.Range; | import org.jfree.data.*; | [
"org.jfree.data"
] | org.jfree.data; | 1,775,116 |
public void onCombineSetup() throws IOException, InterruptedException {
// no-op
} | void function() throws IOException, InterruptedException { } | /**
* Invoked on the named stage.
*/ | Invoked on the named stage | onCombineSetup | {
"repo_name": "tkpanther/ignite",
"path": "modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopErrorSimulator.java",
"license": "apache-2.0",
"size": 8627
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,635,015 |
public static boolean arraySearch(Object[] search, String methodName, Object key) {
boolean found = false;
for (int i = 0; i < search.length; i++) {
Object value = MethodUtil.callMethod(search[i], methodName, new Object[0]);
if (value.equals(key)) {
found = tr... | static boolean function(Object[] search, String methodName, Object key) { boolean found = false; for (int i = 0; i < search.length; i++) { Object value = MethodUtil.callMethod(search[i], methodName, new Object[0]); if (value.equals(key)) { found = true; } } return found; } | /**
* Search an array by calling the passsed in method name with the key as the checker
* @param search array
* @param methodName to call on each object in the array (can be toString())
* @param key to compare to
* @return boolean if found or not
*/ | Search an array by calling the passsed in method name with the key as the checker | arraySearch | {
"repo_name": "colloquium/spacewalk",
"path": "java/code/src/com/redhat/rhn/testing/TestUtils.java",
"license": "gpl-2.0",
"size": 17925
} | [
"com.redhat.rhn.common.util.MethodUtil"
] | import com.redhat.rhn.common.util.MethodUtil; | import com.redhat.rhn.common.util.*; | [
"com.redhat.rhn"
] | com.redhat.rhn; | 201,483 |
public static BundleContext getContext() {
return context;
} | static BundleContext function() { return context; } | /**
* Returns the bundle context of this bundle
*
* @return the bundle context
*/ | Returns the bundle context of this bundle | getContext | {
"repo_name": "openhab/openhab",
"path": "bundles/action/org.openhab.action.astro/src/main/java/org/openhab/action/astro/internal/AstroActivator.java",
"license": "epl-1.0",
"size": 1515
} | [
"org.osgi.framework.BundleContext"
] | import org.osgi.framework.BundleContext; | import org.osgi.framework.*; | [
"org.osgi.framework"
] | org.osgi.framework; | 2,229,363 |
private void parseMessage(ModuleDescriptionMessage descriptionMsg) {
// get descriptions from ModuleDescriptionMessage
List<Category> categories = descriptionMsg.getCategories();
logger.debug("generating operations from " + categories.size() + " categories");
ToolModule modu... | void function(ModuleDescriptionMessage descriptionMsg) { List<Category> categories = descriptionMsg.getCategories(); logger.debug(STR + categories.size() + STR); ToolModule module = new ToolModule(descriptionMsg.getModuleName()); for (Category category : categories) { ToolCategory toolCategory = new ToolCategory(catego... | /**
* Prepare operation category lists.
*
* @param descriptionMsg
* @throws ParseException
*/ | Prepare operation category lists | parseMessage | {
"repo_name": "ilarischeinin/chipster",
"path": "src/main/java/fi/csc/microarray/messaging/DescriptionMessageListener.java",
"license": "gpl-3.0",
"size": 6380
} | [
"fi.csc.microarray.client.operation.OperationDefinition",
"fi.csc.microarray.client.operation.ToolCategory",
"fi.csc.microarray.client.operation.ToolModule",
"fi.csc.microarray.description.SADLDescription",
"fi.csc.microarray.messaging.message.ModuleDescriptionMessage",
"fi.csc.microarray.module.chipster.... | import fi.csc.microarray.client.operation.OperationDefinition; import fi.csc.microarray.client.operation.ToolCategory; import fi.csc.microarray.client.operation.ToolModule; import fi.csc.microarray.description.SADLDescription; import fi.csc.microarray.messaging.message.ModuleDescriptionMessage; import fi.csc.microarray... | import fi.csc.microarray.client.operation.*; import fi.csc.microarray.description.*; import fi.csc.microarray.messaging.message.*; import fi.csc.microarray.module.chipster.*; import fi.csc.microarray.util.*; import java.util.*; | [
"fi.csc.microarray",
"java.util"
] | fi.csc.microarray; java.util; | 599,065 |
assert action >= 0;
assert action < NUM_ACTIONS;
String histogramName;
if (params.isVideo()) {
histogramName = "ContextMenu.SelectedOption.Video";
} else if (params.isImage()) {
histogramName = params.isAnchor()
? "C... | assert action >= 0; assert action < NUM_ACTIONS; String histogramName; if (params.isVideo()) { histogramName = STR; } else if (params.isImage()) { histogramName = params.isAnchor() ? STR : STR; } else { assert params.isAnchor(); histogramName = STR; } RecordHistogram.recordEnumeratedHistogram(histogramName, action, NUM... | /**
* Records a histogram entry when the user selects an item from a context menu.
* @param params The ContextMenuParams describing the current context menu.
* @param action The action that the user selected (e.g. ACTION_SAVE_IMAGE).
*/ | Records a histogram entry when the user selects an item from a context menu | record | {
"repo_name": "was4444/chromium.src",
"path": "chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java",
"license": "bsd-3-clause",
"size": 19571
} | [
"org.chromium.base.metrics.RecordHistogram"
] | import org.chromium.base.metrics.RecordHistogram; | import org.chromium.base.metrics.*; | [
"org.chromium.base"
] | org.chromium.base; | 93,278 |
public void finalizeCreation(Product oldProduct) {
if (oldProduct != null) {
finalizeCreationWithOldProduct(oldProduct);
} else {
if (getProductMetaData() != null && getProductMetaData().getTimeCoverage() != null) {
Interval timeCoverage = getProductMetaData()... | void function(Product oldProduct) { if (oldProduct != null) { finalizeCreationWithOldProduct(oldProduct); } else { if (getProductMetaData() != null && getProductMetaData().getTimeCoverage() != null) { Interval timeCoverage = getProductMetaData().getTimeCoverage(); ReadableInstant today = DateTime.now(DateTimeZone.UTC).... | /**
* Some post computing on the fields once fully created for the first time, or with previous Product
* version.
*/ | Some post computing on the fields once fully created for the first time, or with previous Product version | finalizeCreation | {
"repo_name": "clstoulouse/motu",
"path": "motu-web/src/main/java/fr/cls/atoll/motu/web/dal/request/netcdf/data/Product.java",
"license": "lgpl-3.0",
"size": 46814
} | [
"fr.cls.atoll.motu.web.common.utils.DateUtils",
"org.joda.time.DateTime",
"org.joda.time.DateTimeZone",
"org.joda.time.Interval",
"org.joda.time.ReadableInstant"
] | import fr.cls.atoll.motu.web.common.utils.DateUtils; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.Interval; import org.joda.time.ReadableInstant; | import fr.cls.atoll.motu.web.common.utils.*; import org.joda.time.*; | [
"fr.cls.atoll",
"org.joda.time"
] | fr.cls.atoll; org.joda.time; | 2,178,176 |
@Override
public boolean handle(@NotNull final QueryJCommand parameters)
throws QueryJBuildException
{
final boolean result;
@NotNull final MetadataManager t_MetadataManager =
retrieveMetadataManager(parameters);
buildTemplates(
parameters,
... | boolean function(@NotNull final QueryJCommand parameters) throws QueryJBuildException { final boolean result; @NotNull final MetadataManager t_MetadataManager = retrieveMetadataManager(parameters); buildTemplates( parameters, t_MetadataManager, retrieveTemplateFactory()); result = false; return result; } | /**
* Handles given information.
* @param parameters the parameters.
* @return {@code true} if the chain should be stopped.
*/ | Handles given information | handle | {
"repo_name": "rydnr/queryj-rt",
"path": "queryj-core/src/main/java/org/acmsl/queryj/api/handlers/BasePerForeignKeyTemplateBuildHandler.java",
"license": "gpl-2.0",
"size": 9737
} | [
"org.acmsl.queryj.QueryJCommand",
"org.acmsl.queryj.api.exceptions.QueryJBuildException",
"org.acmsl.queryj.metadata.MetadataManager",
"org.jetbrains.annotations.NotNull"
] | import org.acmsl.queryj.QueryJCommand; import org.acmsl.queryj.api.exceptions.QueryJBuildException; import org.acmsl.queryj.metadata.MetadataManager; import org.jetbrains.annotations.NotNull; | import org.acmsl.queryj.*; import org.acmsl.queryj.api.exceptions.*; import org.acmsl.queryj.metadata.*; import org.jetbrains.annotations.*; | [
"org.acmsl.queryj",
"org.jetbrains.annotations"
] | org.acmsl.queryj; org.jetbrains.annotations; | 1,391,244 |
protected CommandProcessor createCommandProcessor(OctetString engineID) {
CommandProcessor cp = new KaazingCommandProcessor(engineID);
return cp;
} | CommandProcessor function(OctetString engineID) { CommandProcessor cp = new KaazingCommandProcessor(engineID); return cp; } | /**
* Creates the command processor. We implement our own so that we can provide new PDUs and still invoke some of the
* default CommandProcessor methods.
*
* @param engineID the engine ID of the agent.
* @return a new CommandProcessor instance.
*/ | Creates the command processor. We implement our own so that we can provide new PDUs and still invoke some of the default CommandProcessor methods | createCommandProcessor | {
"repo_name": "EArdeleanu/gateway",
"path": "management/src/main/java/org/kaazing/gateway/management/snmp/SnmpManagementServiceHandler.java",
"license": "apache-2.0",
"size": 128455
} | [
"org.snmp4j.agent.CommandProcessor",
"org.snmp4j.smi.OctetString"
] | import org.snmp4j.agent.CommandProcessor; import org.snmp4j.smi.OctetString; | import org.snmp4j.agent.*; import org.snmp4j.smi.*; | [
"org.snmp4j.agent",
"org.snmp4j.smi"
] | org.snmp4j.agent; org.snmp4j.smi; | 2,094,227 |
protected final void visitTokenHook(DetailAST ast) {
if (switchBlockAsSingleDecisionPoint) {
if (ast.getType() != TokenTypes.LITERAL_CASE) {
incrementCurrentValue(BigInteger.ONE);
}
}
else if (ast.getType() != TokenTypes.LITERAL_SWITCH) {
i... | final void function(DetailAST ast) { if (switchBlockAsSingleDecisionPoint) { if (ast.getType() != TokenTypes.LITERAL_CASE) { incrementCurrentValue(BigInteger.ONE); } } else if (ast.getType() != TokenTypes.LITERAL_SWITCH) { incrementCurrentValue(BigInteger.ONE); } } | /**
* Hook called when visiting a token. Will not be called the method
* definition tokens.
*
* @param ast the token being visited
*/ | Hook called when visiting a token. Will not be called the method definition tokens | visitTokenHook | {
"repo_name": "Bhavik3/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/CyclomaticComplexityCheck.java",
"license": "lgpl-2.1",
"size": 7614
} | [
"com.puppycrawl.tools.checkstyle.api.DetailAST",
"com.puppycrawl.tools.checkstyle.api.TokenTypes",
"java.math.BigInteger"
] | import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.TokenTypes; import java.math.BigInteger; | import com.puppycrawl.tools.checkstyle.api.*; import java.math.*; | [
"com.puppycrawl.tools",
"java.math"
] | com.puppycrawl.tools; java.math; | 1,956,098 |
private void updateAppLinkData(AppLinkData linkData, boolean add, J2EEName j2eeName, BeanMetaData bmd) // F743-26072
{
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(tc, "updateAppLinkData: " + j2eeName + ", add=" + add)... | void function(AppLinkData linkData, boolean add, J2EEName j2eeName, BeanMetaData bmd) { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isEntryEnabled()) Tr.entry(tc, STR + j2eeName + STR + add); int numBeans; synchronized (linkData) { linkData.ivNumBeans += add ? 1 : -1; numBeans = ... | /**
* Updates the EJB-link and auto-link data for a bean.
*
* @param linkData
* @param add <tt>true</tt> if data for the bean should be added, or
* <tt>false</tt> if data should be removed
* @param bmd
*/ | Updates the EJB-link and auto-link data for a bean | updateAppLinkData | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/HomeOfHomes.java",
"license": "epl-1.0",
"size": 66288
} | [
"com.ibm.websphere.csi.J2EEName",
"com.ibm.websphere.ras.Tr",
"com.ibm.websphere.ras.TraceComponent"
] | import com.ibm.websphere.csi.J2EEName; import com.ibm.websphere.ras.Tr; import com.ibm.websphere.ras.TraceComponent; | import com.ibm.websphere.csi.*; import com.ibm.websphere.ras.*; | [
"com.ibm.websphere"
] | com.ibm.websphere; | 1,732,645 |
public void updateTask()
{
--this.playTime;
if (this.targetVillager != null)
{
if (this.villagerObj.getDistanceSqToEntity(this.targetVillager) > 4.0D)
{
this.villagerObj.getNavigator().tryMoveToEntityLiving(this.targetVillager, this.field_75261_c)... | void function() { --this.playTime; if (this.targetVillager != null) { if (this.villagerObj.getDistanceSqToEntity(this.targetVillager) > 4.0D) { this.villagerObj.getNavigator().tryMoveToEntityLiving(this.targetVillager, this.field_75261_c); } } else if (this.villagerObj.getNavigator().noPath()) { Vec3 var1 = RandomPosit... | /**
* Updates the task
*/ | Updates the task | updateTask | {
"repo_name": "TheHecticByte/BananaJ1.7.10Beta",
"path": "src/net/minecraft/Server1_7_10/entity/ai/EntityAIPlay.java",
"license": "gpl-3.0",
"size": 3506
} | [
"net.minecraft.Server1_7_10"
] | import net.minecraft.Server1_7_10; | import net.minecraft.*; | [
"net.minecraft"
] | net.minecraft; | 726,980 |
public final String dumpConfiguration() {
if (this.properties.isEmpty())
return "No configuration settings stored";
StringBuilder response = new StringBuilder("TSD Configuration:\n");
response.append("File [" + this.config_location + "]\n");
int line = 0;
for (Map.Entry<String, String> entr... | final String function() { if (this.properties.isEmpty()) return STR; StringBuilder response = new StringBuilder(STR); response.append(STR + this.config_location + "]\n"); int line = 0; for (Map.Entry<String, String> entry : this.properties.entrySet()) { if (line > 0) { response.append("\n"); } response.append(STR + ent... | /**
* Returns a simple string with the configured properties for debugging
* @return A string with information about the config
*/ | Returns a simple string with the configured properties for debugging | dumpConfiguration | {
"repo_name": "pepperdata/opentsdb-deprecated",
"path": "src/utils/Config.java",
"license": "gpl-3.0",
"size": 20577
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,672,618 |
public void addUserToServer(User user) throws Exception {
boolean isNew = true;
Index.Builder builder = new Index.Builder(user).index(ServerCommandManager.INDEX).type(ServerCommandManager.USER_TYPE);
if (user.getUserID() != null && !user.getUserID().isEmpty()){
builder.id(user... | void function(User user) throws Exception { boolean isNew = true; Index.Builder builder = new Index.Builder(user).index(ServerCommandManager.INDEX).type(ServerCommandManager.USER_TYPE); if (user.getUserID() != null && !user.getUserID().isEmpty()){ builder.id(user.getUserID()); isNew = false; } Index index = builder.bui... | /**
* Add the user to the server for the first time when they install the application
*
* @param user the user to be added to storage
* @see User
* @see ServerCommandManager
*/ | Add the user to the server for the first time when they install the application | addUserToServer | {
"repo_name": "CMPUT301F17T07/inGroove",
"path": "inGroove/app/src/main/java/com/cmput301f17t07/ingroove/DataManagers/DataManager.java",
"license": "mit",
"size": 23858
} | [
"android.util.Log",
"com.cmput301f17t07.ingroove.DataManagers",
"com.cmput301f17t07.ingroove.Model",
"io.searchbox.core.DocumentResult",
"io.searchbox.core.Index"
] | import android.util.Log; import com.cmput301f17t07.ingroove.DataManagers; import com.cmput301f17t07.ingroove.Model; import io.searchbox.core.DocumentResult; import io.searchbox.core.Index; | import android.util.*; import com.cmput301f17t07.ingroove.*; import io.searchbox.core.*; | [
"android.util",
"com.cmput301f17t07.ingroove",
"io.searchbox.core"
] | android.util; com.cmput301f17t07.ingroove; io.searchbox.core; | 1,578,183 |
HibernateServiceRegistryFactory factory = new
HibernateServiceRegistryFactory();
ServiceRegistry serviceRegistry = factory.provide();
Dialect d = new MetadataSources(serviceRegistry)
.buildMetadata().getDatabase().getDialect();
Assert.assertTrue(d instanceof H2D... | HibernateServiceRegistryFactory factory = new HibernateServiceRegistryFactory(); ServiceRegistry serviceRegistry = factory.provide(); Dialect d = new MetadataSources(serviceRegistry) .buildMetadata().getDatabase().getDialect(); Assert.assertTrue(d instanceof H2Dialect); factory.dispose(serviceRegistry); } | /**
* Test provide and dispose.
*/ | Test provide and dispose | testProvideDispose | {
"repo_name": "krotscheck/jersey2-toolkit",
"path": "jersey2-hibernate/src/test/java/net/krotscheck/jersey2/hibernate/factory/HibernateServiceRegistryFactoryTest.java",
"license": "apache-2.0",
"size": 3271
} | [
"org.hibernate.boot.MetadataSources",
"org.hibernate.dialect.Dialect",
"org.hibernate.dialect.H2Dialect",
"org.hibernate.service.ServiceRegistry",
"org.junit.Assert"
] | import org.hibernate.boot.MetadataSources; import org.hibernate.dialect.Dialect; import org.hibernate.dialect.H2Dialect; import org.hibernate.service.ServiceRegistry; import org.junit.Assert; | import org.hibernate.boot.*; import org.hibernate.dialect.*; import org.hibernate.service.*; import org.junit.*; | [
"org.hibernate.boot",
"org.hibernate.dialect",
"org.hibernate.service",
"org.junit"
] | org.hibernate.boot; org.hibernate.dialect; org.hibernate.service; org.junit; | 1,158,294 |
public Date getModifiedAt() {
return getPropertyAsDate(FIELD_MODIFIED_AT);
} | Date function() { return getPropertyAsDate(FIELD_MODIFIED_AT); } | /**
* Gets the date that the collaborator was modified.
*
* @return the date that the collaborator was modified.
*/ | Gets the date that the collaborator was modified | getModifiedAt | {
"repo_name": "seema-at-box/box-android-sdk",
"path": "box-content-sdk/src/main/java/com/box/androidsdk/content/models/BoxCollaborator.java",
"license": "apache-2.0",
"size": 1639
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 448,009 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.