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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ManagementLockObjectInner> listByResourceGroup(String resourceGroupName); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<ManagementLockObjectInner> listByResourceGroup(String resourceGroupName); | /**
* Gets all the management locks for a resource group.
*
* @param resourceGroupName The name of the resource group containing the locks to get.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException throw... | Gets all the management locks for a resource group | listByResourceGroup | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ManagementLocksClient.java",
"license": "mit",
"size": 66646
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.resources.fluent.models.ManagementLockObjectInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.resources.fluent.models.ManagementLockObjectInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.resources.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 231,873 |
protected RegisterApplicationMasterResponse registerApplicationMaster(
final int testAppId) throws Exception, YarnException, IOException {
final ApplicationUserInfo ugi = getApplicationUserInfo(testAppId); | RegisterApplicationMasterResponse function( final int testAppId) throws Exception, YarnException, IOException { final ApplicationUserInfo ugi = getApplicationUserInfo(testAppId); | /**
* Helper method to register an application master using specified testAppId
* as the application identifier and return the response
*
* @param testAppId
* @return
* @throws Exception
* @throws YarnException
* @throws IOException
*/ | Helper method to register an application master using specified testAppId as the application identifier and return the response | registerApplicationMaster | {
"repo_name": "dennishuo/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/BaseAMRMProxyTest.java",
"license": "apache-2.0",
"size": 27696
} | [
"java.io.IOException",
"org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse",
"org.apache.hadoop.yarn.exceptions.YarnException"
] | import java.io.IOException; import org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse; import org.apache.hadoop.yarn.exceptions.YarnException; | import java.io.*; import org.apache.hadoop.yarn.api.protocolrecords.*; import org.apache.hadoop.yarn.exceptions.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,245,613 |
public static AnimatablePaintValue createCurrentColorPaintValue
(AnimationTarget target) {
AnimatablePaintValue v = new AnimatablePaintValue(target);
v.paintType = PAINT_CURRENT_COLOR;
return v;
} | static AnimatablePaintValue function (AnimationTarget target) { AnimatablePaintValue v = new AnimatablePaintValue(target); v.paintType = PAINT_CURRENT_COLOR; return v; } | /**
* Creates a new AnimatablePaintValue for a 'currentColor' value.
*/ | Creates a new AnimatablePaintValue for a 'currentColor' value | createCurrentColorPaintValue | {
"repo_name": "Squeegee/batik",
"path": "sources/org/apache/batik/anim/values/AnimatablePaintValue.java",
"license": "apache-2.0",
"size": 8932
} | [
"org.apache.batik.dom.anim.AnimationTarget"
] | import org.apache.batik.dom.anim.AnimationTarget; | import org.apache.batik.dom.anim.*; | [
"org.apache.batik"
] | org.apache.batik; | 448,080 |
public void removeSelectionChangedListener(ISelectionChangedListener listener)
{
selectionChangedListeners.remove(listener);
} | void function(ISelectionChangedListener listener) { selectionChangedListeners.remove(listener); } | /**
* This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This implements <code>org.eclipse.jface.viewers.ISelectionProvider</code>. | removeSelectionChangedListener | {
"repo_name": "ohaegi/emfshell",
"path": "tests/org.eclipse.emf.examples.library.editor/src/org/eclipse/emf/examples/extlibrary/presentation/EXTLibraryEditor.java",
"license": "epl-1.0",
"size": 60131
} | [
"org.eclipse.jface.viewers.ISelectionChangedListener"
] | import org.eclipse.jface.viewers.ISelectionChangedListener; | import org.eclipse.jface.viewers.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 1,978,258 |
@Override
public JSDocInfo getJSDocInfo() {
return docInfo;
} | JSDocInfo function() { return docInfo; } | /**
* Gets the docInfo for this type.
*/ | Gets the docInfo for this type | getJSDocInfo | {
"repo_name": "MatrixFrog/closure-compiler",
"path": "src/com/google/javascript/rhino/jstype/ObjectType.java",
"license": "apache-2.0",
"size": 26839
} | [
"com.google.javascript.rhino.JSDocInfo"
] | import com.google.javascript.rhino.JSDocInfo; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 1,797,367 |
public static String wildcardToRegex(String str) {
return StringUtils.isEmpty(str) ? str : str.replace("?", ".?").replace("*", ".*?"); // NON-NLS
} | static String function(String str) { return StringUtils.isEmpty(str) ? str : str.replace("?", ".?").replace("*", ".*?"); } | /**
* Transforms wildcard mask string to regex ready string.
*
* @param str
* wildcard string
* @return regex ready string
*/ | Transforms wildcard mask string to regex ready string | wildcardToRegex | {
"repo_name": "Nastel/tnt4j-stream-jmx",
"path": "tnt4j-stream-jmx-core/src/main/java/com/jkoolcloud/tnt4j/stream/jmx/utils/Utils.java",
"license": "apache-2.0",
"size": 10093
} | [
"org.apache.commons.lang3.StringUtils"
] | import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 487,668 |
public ObjectIdentifierValue findOid(String oid) {
MibValue value = ((MibValueSymbol) symbols.get(ISO)).getValue();
ObjectIdentifierValue match = ((ObjectIdentifierValue) value).find(oid);
if (match == null) {
value = ((MibValueSymbol) symbols.get(CCITT)).getValue();
... | ObjectIdentifierValue function(String oid) { MibValue value = ((MibValueSymbol) symbols.get(ISO)).getValue(); ObjectIdentifierValue match = ((ObjectIdentifierValue) value).find(oid); if (match == null) { value = ((MibValueSymbol) symbols.get(CCITT)).getValue(); match = ((ObjectIdentifierValue) value).find(oid); } if (m... | /**
* Searches the OID tree for the best matching value. The
* returned OID value will be the longest matching OID value, but
* doesn't have to be an exact match. The search requires the
* full numeric OID value (from the root).
*
* @param oid the numeric OID string to search fo... | Searches the OID tree for the best matching value. The returned OID value will be the longest matching OID value, but doesn't have to be an exact match. The search requires the full numeric OID value (from the root) | findOid | {
"repo_name": "runner-mei/mibble",
"path": "src/main/java/net/percederberg/mibble/DefaultContext.java",
"license": "gpl-2.0",
"size": 5025
} | [
"net.percederberg.mibble.value.ObjectIdentifierValue"
] | import net.percederberg.mibble.value.ObjectIdentifierValue; | import net.percederberg.mibble.value.*; | [
"net.percederberg.mibble"
] | net.percederberg.mibble; | 2,614,620 |
public static boolean isEnabled() {
return CachedFeatureFlags.isEnabled(ChromeFeatureList.PAINT_PREVIEW_SHOW_ON_STARTUP);
} | static boolean function() { return CachedFeatureFlags.isEnabled(ChromeFeatureList.PAINT_PREVIEW_SHOW_ON_STARTUP); } | /**
* Checks whether the paint preview feature is enabled
* @return the feature availability
*/ | Checks whether the paint preview feature is enabled | isEnabled | {
"repo_name": "chromium/chromium",
"path": "chrome/android/java/src/org/chromium/chrome/browser/paint_preview/StartupPaintPreviewHelper.java",
"license": "bsd-3-clause",
"size": 9071
} | [
"org.chromium.chrome.browser.flags.CachedFeatureFlags",
"org.chromium.chrome.browser.flags.ChromeFeatureList"
] | import org.chromium.chrome.browser.flags.CachedFeatureFlags; import org.chromium.chrome.browser.flags.ChromeFeatureList; | import org.chromium.chrome.browser.flags.*; | [
"org.chromium.chrome"
] | org.chromium.chrome; | 303,327 |
@Override
public Point2D setToolSize(Point2D size) {
Point2D newSize = this.setResolvedToolSize(size);
this.onResize();
return newSize;
}
| Point2D function(Point2D size) { Point2D newSize = this.setResolvedToolSize(size); this.onResize(); return newSize; } | /**
* Note: make sure the size here does NOT include padding/margin/border of the tool, otherwise
* getToolSize and setToolSize will not be compatible (will be using different values.)
*/ | Note: make sure the size here does NOT include padding/margin/border of the tool, otherwise getToolSize and setToolSize will not be compatible (will be using different values.) | setToolSize | {
"repo_name": "popsimple/popsimple",
"path": "website/src/com/project/website/canvas/client/canvastools/base/CanvasToolFrameImpl.java",
"license": "gpl-3.0",
"size": 21315
} | [
"com.project.shared.data.Point2D"
] | import com.project.shared.data.Point2D; | import com.project.shared.data.*; | [
"com.project.shared"
] | com.project.shared; | 1,931,153 |
public void testExtendsEmpty() {
DefDescriptor<T> cmp = addSourceAutoCleanup(getDefClass(),
String.format(baseTag, "extends=''", ""));
DefType defType = DefType.getDefType(this.getDefClass());
try {
definitionService.getDefinition(cmp);
fail(defType + " ... | void function() { DefDescriptor<T> cmp = addSourceAutoCleanup(getDefClass(), String.format(baseTag, STR, STR should throw Exception when extends is emptySTRQualifiedName is required for descriptors"); } } | /**
* Verify extending a non-existent component throws correct Exception
*/ | Verify extending a non-existent component throws correct Exception | testExtendsEmpty | {
"repo_name": "badlogicmanpreet/aura",
"path": "aura-impl/src/test/java/org/auraframework/impl/root/component/BaseComponentDefTest.java",
"license": "apache-2.0",
"size": 99025
} | [
"org.auraframework.def.DefDescriptor"
] | import org.auraframework.def.DefDescriptor; | import org.auraframework.def.*; | [
"org.auraframework.def"
] | org.auraframework.def; | 1,618,638 |
public ApiResponse<DevicePricingTiersEnvelope> getPricingTiersWithHttpInfo(String did, Boolean active) throws ApiException {
com.squareup.okhttp.Call call = getPricingTiersValidateBeforeCall(did, active, null, null);
Type localVarReturnType = new TypeToken<DevicePricingTiersEnvelope>(){}.getType();
... | ApiResponse<DevicePricingTiersEnvelope> function(String did, Boolean active) throws ApiException { com.squareup.okhttp.Call call = getPricingTiersValidateBeforeCall(did, active, null, null); Type localVarReturnType = new TypeToken<DevicePricingTiersEnvelope>(){}.getType(); return apiClient.execute(call, localVarReturnT... | /**
* Get a device's pricing tiers
* Get a device's pricing tiers
* @param did Device ID (required)
* @param active Filter by active (optional)
* @return ApiResponse<DevicePricingTiersEnvelope>
* @throws ApiException If fail to call the API, e.g. server error or cannot deseri... | Get a device's pricing tiers Get a device's pricing tiers | getPricingTiersWithHttpInfo | {
"repo_name": "artikcloud/artikcloud-java",
"path": "src/main/java/cloud/artik/api/MonetizationApi.java",
"license": "apache-2.0",
"size": 32854
} | [
"cloud.artik.client.ApiException",
"cloud.artik.client.ApiResponse",
"cloud.artik.model.DevicePricingTiersEnvelope",
"com.google.gson.reflect.TypeToken",
"java.lang.reflect.Type"
] | import cloud.artik.client.ApiException; import cloud.artik.client.ApiResponse; import cloud.artik.model.DevicePricingTiersEnvelope; import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; | import cloud.artik.client.*; import cloud.artik.model.*; import com.google.gson.reflect.*; import java.lang.reflect.*; | [
"cloud.artik.client",
"cloud.artik.model",
"com.google.gson",
"java.lang"
] | cloud.artik.client; cloud.artik.model; com.google.gson; java.lang; | 796,573 |
boolean setSuppressions(Set<String> suppressions) {
lazyInitInfo();
if (info.suppressions != null) {
return false;
}
info.suppressions = suppressions;
return true;
} | boolean setSuppressions(Set<String> suppressions) { lazyInitInfo(); if (info.suppressions != null) { return false; } info.suppressions = suppressions; return true; } | /**
* Sets suppressed warnings.
* @param suppressions A list of suppressed warning types.
*/ | Sets suppressed warnings | setSuppressions | {
"repo_name": "ehsan/js-symbolic-executor",
"path": "closure-compiler/src/com/google/javascript/rhino/JSDocInfo.java",
"license": "apache-2.0",
"size": 31979
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,059,928 |
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller<PollResult<WorkloadNetworkPortMirroringInner>, WorkloadNetworkPortMirroringInner>
beginUpdatePortMirroring(
String resourceGroupName,
String privateCloudName,
String portMirroringId,
... | @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<WorkloadNetworkPortMirroringInner>, WorkloadNetworkPortMirroringInner> function( String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { return beginUpda... | /**
* Create or update a port mirroring profile by id in a private cloud workload network.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param privateCloudName Name of the private cloud.
* @param portMirroringId NSX Port Mirroring identifier. Gene... | Create or update a port mirroring profile by id in a private cloud workload network | beginUpdatePortMirroring | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksClientImpl.java",
"license": "mit",
"size": 538828
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.polling.SyncPoller",
"com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.avs.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,416,434 |
private Cursor getContactByAddress(final String address) {
final Uri uri = Uri.withAppendedPath(ContactsContract.CommonDataKinds.Email.CONTENT_LOOKUP_URI, Uri.encode(address));
final Cursor c = mContentResolver.query(
uri,
PROJECTION,
null,
... | Cursor function(final String address) { final Uri uri = Uri.withAppendedPath(ContactsContract.CommonDataKinds.Email.CONTENT_LOOKUP_URI, Uri.encode(address)); final Cursor c = mContentResolver.query( uri, PROJECTION, null, null, SORT_ORDER); return c; } | /**
* Return a {@link Cursor} instance that can be used to fetch information
* about the contact with the given email address.
*
* @param address The email address to search for.
* @return A {@link Cursor} instance that can be used to fetch information
* about the contact with the ... | Return a <code>Cursor</code> instance that can be used to fetch information about the contact with the given email address | getContactByAddress | {
"repo_name": "rtreffer/openpgp-k-9",
"path": "src/com/fsck/k9/helper/Contacts.java",
"license": "bsd-3-clause",
"size": 14137
} | [
"android.database.Cursor",
"android.net.Uri",
"android.provider.ContactsContract"
] | import android.database.Cursor; import android.net.Uri; import android.provider.ContactsContract; | import android.database.*; import android.net.*; import android.provider.*; | [
"android.database",
"android.net",
"android.provider"
] | android.database; android.net; android.provider; | 540,887 |
@Test
void onInvoke() {
Assumptions.assumeFalse(isTravisEnvironment(), () -> "Aborting test: Travis CI detected");
Assumptions.assumeTrue(initialized);
String[] args = {"10", "10"};
//test the connection if one was specified
String jdbcUrl = Config.CONFIG.getJdbcUrl();
... | void onInvoke() { Assumptions.assumeFalse(isTravisEnvironment(), () -> STR); Assumptions.assumeTrue(initialized); String[] args = {"10", "10"}; String jdbcUrl = Config.CONFIG.getJdbcUrl(); if (jdbcUrl != null && !STRSTR2STR").invoke(dbm, new FakeContext(testChannel, testSelfMember, testGuild), args)); } finally { dbm.s... | /**
* Run a small db test
*/ | Run a small db test | onInvoke | {
"repo_name": "napstr/FredBoat",
"path": "FredBoat/src/test/java/fredboat/command/admin/TestCommandTest.java",
"license": "mit",
"size": 1704
} | [
"org.junit.jupiter.api.Assumptions"
] | import org.junit.jupiter.api.Assumptions; | import org.junit.jupiter.api.*; | [
"org.junit.jupiter"
] | org.junit.jupiter; | 1,244,820 |
private final Parameter KEYZ_COMMON[] = {Parameter.EVERID};
@Override
public String getPValue(TrackingParameter trackingParameter) {
SortedMap<Parameter, String> tp = trackingParameter.getDefaultParameter();
return "p=" + Webtrekk.mTrackingLibraryVersion + ",0";
... | final Parameter KEYZ_COMMON[] = {Parameter.EVERID}; public String function(TrackingParameter trackingParameter) { SortedMap<Parameter, String> tp = trackingParameter.getDefaultParameter(); return "p=" + Webtrekk.mTrackingLibraryVersion + ",0"; } | /**
* this method is generated p parameter for URL for specific implementation
* @param trackingParameter
* @return
*/ | this method is generated p parameter for URL for specific implementation | getPValue | {
"repo_name": "Webtrekk/webtrekk-android-sdk",
"path": "webtrekk_sdk/src/main/java/com/webtrekk/webtrekksdk/Request/TrackingRequest.java",
"license": "mit",
"size": 23583
} | [
"com.webtrekk.webtrekksdk.TrackingParameter",
"com.webtrekk.webtrekksdk.Webtrekk",
"java.util.SortedMap"
] | import com.webtrekk.webtrekksdk.TrackingParameter; import com.webtrekk.webtrekksdk.Webtrekk; import java.util.SortedMap; | import com.webtrekk.webtrekksdk.*; import java.util.*; | [
"com.webtrekk.webtrekksdk",
"java.util"
] | com.webtrekk.webtrekksdk; java.util; | 2,149,288 |
@Override
InputStream getBodyInputStream(); | InputStream getBodyInputStream(); | /**
* Return the bodyInputStream for large messages
* @return
*/ | Return the bodyInputStream for large messages | getBodyInputStream | {
"repo_name": "cshannon/activemq-artemis",
"path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientMessage.java",
"license": "apache-2.0",
"size": 8719
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 145,276 |
public static List<Element> getData(final Packet packet) {
Element iq = packet.getElement();
Element command = iq.getChild(COMMAND_EL);
return command.getChildren();
} | static List<Element> function(final Packet packet) { Element iq = packet.getElement(); Element command = iq.getChild(COMMAND_EL); return command.getChildren(); } | /**
* Method description
*
*
* @param packet
*
* @return
*/ | Method description | getData | {
"repo_name": "Smartupz/tigase-server",
"path": "src/main/java/tigase/server/Command.java",
"license": "agpl-3.0",
"size": 29104
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,140,106 |
void replCommitTxn(CommitTxnRequest rqst) throws LockException; | void replCommitTxn(CommitTxnRequest rqst) throws LockException; | /**
* Commit the transaction in target cluster.
*
* @param rqst Commit transaction request having information related to commit txn and write events.
* @throws LockException in case of failure to commit the transaction.
*/ | Commit the transaction in target cluster | replCommitTxn | {
"repo_name": "vineetgarg02/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveTxnManager.java",
"license": "apache-2.0",
"size": 14014
} | [
"org.apache.hadoop.hive.metastore.api.CommitTxnRequest"
] | import org.apache.hadoop.hive.metastore.api.CommitTxnRequest; | import org.apache.hadoop.hive.metastore.api.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,316,088 |
public static void registerDataEntryForms(EHRService es, Module module)
{
// register the generic singular, edit forms
Stream.of(Arrays.asList(BREEDING_ENCOUNTER_LABEL, BREEDING_ENCOUNTER_QUERY)
, Arrays.asList(PREGNANCY_LABEL, PREGNANCY_QUERY)
, Arrays.asList(ULT... | static void function(EHRService es, Module module) { Stream.of(Arrays.asList(BREEDING_ENCOUNTER_LABEL, BREEDING_ENCOUNTER_QUERY) , Arrays.asList(PREGNANCY_LABEL, PREGNANCY_QUERY) , Arrays.asList(ULTRASOUND_LABEL, ULTRASOUND_QUERY) , Arrays.asList(PREGNANCY_OUTCOME_LABEL, PREGNANCY_OUTCOME_QUERY) ).map(e -> Breeding.edi... | /**
* Registers the breeding data entry forms in the passed EHR service for the passed module.
*
* @param es EHR service instance to register in
* @param module Parent module instance for the forms
*/ | Registers the breeding data entry forms in the passed EHR service for the passed module | registerDataEntryForms | {
"repo_name": "WNPRC-EHR-Services/wnprc-modules",
"path": "WNPRC_EHR/src/org/labkey/wnprc_ehr/dataentry/forms/Breeding.java",
"license": "apache-2.0",
"size": 8321
} | [
"java.util.Arrays",
"java.util.stream.Stream",
"org.labkey.api.ehr.EHRService",
"org.labkey.api.module.Module"
] | import java.util.Arrays; import java.util.stream.Stream; import org.labkey.api.ehr.EHRService; import org.labkey.api.module.Module; | import java.util.*; import java.util.stream.*; import org.labkey.api.ehr.*; import org.labkey.api.module.*; | [
"java.util",
"org.labkey.api"
] | java.util; org.labkey.api; | 2,566,529 |
protected void loadFile()
{
//if target file is not null
if(targetFile!=null)
{
//if target file is readable
if(targetFile.canRead())
{
try
{
//initialize string builder
stringBuilder=new StringBuilder();
//initialize readers
fileIn=new FileReader(targetFile);
... | void function() { if(targetFile!=null) { if(targetFile.canRead()) { try { stringBuilder=new StringBuilder(); fileIn=new FileReader(targetFile); readIn=new BufferedReader(fileIn); String temp; while((temp = readIn.readLine()) !=null) { stringBuilder.append(temp); } this.setText(stringBuilder.toString()); readIn.close();... | /**
* loadFile: Loads currently selected target into text area
*/ | loadFile: Loads currently selected target into text area | loadFile | {
"repo_name": "gmcgibbon/Agilitext-Text-Editor",
"path": "SOURCE/src1.1 Ostrich/AgilitextTextArea.java",
"license": "gpl-3.0",
"size": 10914
} | [
"java.io.BufferedReader",
"java.io.FileReader",
"java.io.IOException",
"javax.swing.JOptionPane"
] | import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import javax.swing.JOptionPane; | import java.io.*; import javax.swing.*; | [
"java.io",
"javax.swing"
] | java.io; javax.swing; | 1,839,925 |
protected static SAXBuilder createSAXBuilder() throws Exception{
SAXBuilder sb=new SAXBuilder(false);
sb.setValidation(false);
sb.setExpandEntities(false);
return sb;
}
| static SAXBuilder function() throws Exception{ SAXBuilder sb=new SAXBuilder(false); sb.setValidation(false); sb.setExpandEntities(false); return sb; } | /**
* Crea un SAXBuilder
* @return
* @throws Exception
*/ | Crea un SAXBuilder | createSAXBuilder | {
"repo_name": "projectestac/qv",
"path": "qv_applets/src/local/edu/xtec/qv/player/CorrectQVApplet.java",
"license": "gpl-2.0",
"size": 15648
} | [
"org.jdom.input.SAXBuilder"
] | import org.jdom.input.SAXBuilder; | import org.jdom.input.*; | [
"org.jdom.input"
] | org.jdom.input; | 2,211,961 |
public static void paintScilentPoint(final BufferedImage _bi,
final int _x, final int _y, final int _rgb) {
//create integer values
int x = _x;
int y = _y;
//transform x coordinate.
if (x <= 0) {
x = 0;
} else if (x >= _bi.getWidth()... | static void function(final BufferedImage _bi, final int _x, final int _y, final int _rgb) { int x = _x; int y = _y; if (x <= 0) { x = 0; } else if (x >= _bi.getWidth()) { x = _bi.getWidth() - 1; } if (y <= 0) { y = 0; } else if (y >= _bi.getHeight()) { y = _bi.getHeight() - 1; } _bi.setRGB(x, y, _rgb); } | /**
* Paint point.
* @param _bi the bufferedImage
* @param _x the x coordinate of point
* @param _y the y coordinate of point
* @param _rgb the color
*/ | Paint point | paintScilentPoint | {
"repo_name": "juliusHuelsmann/paint",
"path": "PaintNotes/src/main/java/model/objects/painting/PaintBI.java",
"license": "apache-2.0",
"size": 27123
} | [
"java.awt.image.BufferedImage"
] | import java.awt.image.BufferedImage; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 2,048,441 |
// TODO: Remove? A little dangerous due to ownership
Map<Class<? extends Component>, Component> copyComponents(EntityRef original); | Map<Class<? extends Component>, Component> copyComponents(EntityRef original); | /**
* Creates a copy of the components of an entity.
*
* @param original
* @return A map of components types to components copied from the target entity.
*/ | Creates a copy of the components of an entity | copyComponents | {
"repo_name": "immortius/Terasology",
"path": "engine/src/main/java/org/terasology/entitySystem/entity/EntityManager.java",
"license": "apache-2.0",
"size": 4584
} | [
"java.util.Map",
"org.terasology.entitySystem.Component"
] | import java.util.Map; import org.terasology.entitySystem.Component; | import java.util.*; import org.terasology.*; | [
"java.util",
"org.terasology"
] | java.util; org.terasology; | 1,737,877 |
public TBLOB getTBLOB()
throws TorqueException
{
if (aTBLOB == null && (!ObjectUtils.equals(this.iconKey, null)))
{
aTBLOB = TBLOBPeer.retrieveByPK(SimpleKey.keyFor(this.iconKey));
}
return aTBLOB;
} | TBLOB function() throws TorqueException { if (aTBLOB == null && (!ObjectUtils.equals(this.iconKey, null))) { aTBLOB = TBLOBPeer.retrieveByPK(SimpleKey.keyFor(this.iconKey)); } return aTBLOB; } | /**
* Returns the associated TBLOB object.
* If it was not retrieved before, the object is retrieved from
* the database
*
* @return the associated TBLOB object
* @throws TorqueException
*/ | Returns the associated TBLOB object. If it was not retrieved before, the object is retrieved from the database | getTBLOB | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/persist/BaseTPerson.java",
"license": "gpl-3.0",
"size": 1013508
} | [
"com.aurel.track.persist.TBLOBPeer",
"org.apache.commons.lang.ObjectUtils",
"org.apache.torque.TorqueException",
"org.apache.torque.om.SimpleKey"
] | import com.aurel.track.persist.TBLOBPeer; import org.apache.commons.lang.ObjectUtils; import org.apache.torque.TorqueException; import org.apache.torque.om.SimpleKey; | import com.aurel.track.persist.*; import org.apache.commons.lang.*; import org.apache.torque.*; import org.apache.torque.om.*; | [
"com.aurel.track",
"org.apache.commons",
"org.apache.torque"
] | com.aurel.track; org.apache.commons; org.apache.torque; | 1,206,769 |
public void flush() throws IOException {
getMiniHBaseCluster().flushcache();
} | void function() throws IOException { getMiniHBaseCluster().flushcache(); } | /**
* Flushes all caches in the mini hbase cluster
* @throws IOException
*/ | Flushes all caches in the mini hbase cluster | flush | {
"repo_name": "HubSpot/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java",
"license": "apache-2.0",
"size": 173926
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,069,393 |
public List<Integer> execute() throws IOException{
StringBuilder sb = new StringBuilder();
double[][] sh = new double[maxC-minC+1][numBootstraps];
double[][] ssd = new double[maxC-minC+1][numBootstraps];
HashMap<Integer,Vector<VectorClusterElement>> bestClusterMeans = new HashMap<Integer,Vector<VectorCluster... | List<Integer> function() throws IOException{ StringBuilder sb = new StringBuilder(); double[][] sh = new double[maxC-minC+1][numBootstraps]; double[][] ssd = new double[maxC-minC+1][numBootstraps]; HashMap<Integer,Vector<VectorClusterElement>> bestClusterMeans = new HashMap<Integer,Vector<VectorClusterElement>>(); for(... | /**
* The method that should be executed after initiating the class object
* @throws IOException
*/ | The method that should be executed after initiating the class object | execute | {
"repo_name": "seqcode/sequnwinder",
"path": "src/org/seqcode/projects/sequnwinder/clusterkmerprofile/ClusterProfiles.java",
"license": "mit",
"size": 11260
} | [
"java.io.BufferedWriter",
"java.io.File",
"java.io.FileWriter",
"java.io.IOException",
"java.util.ArrayList",
"java.util.Arrays",
"java.util.HashMap",
"java.util.List",
"java.util.Vector",
"org.seqcode.gseutils.Pair",
"org.seqcode.ml.clustering.vectorcluster.VectorClusterElement"
] | import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Vector; import org.seqcode.gseutils.Pair; import org.seqcode.ml.clustering.vectorcluster.Vecto... | import java.io.*; import java.util.*; import org.seqcode.gseutils.*; import org.seqcode.ml.clustering.vectorcluster.*; | [
"java.io",
"java.util",
"org.seqcode.gseutils",
"org.seqcode.ml"
] | java.io; java.util; org.seqcode.gseutils; org.seqcode.ml; | 2,187,090 |
private GeneratorSetDocWriter createWriter( File file)
{
try
{
return new GeneratorSetDocWriter( new FileWriter( file));
}
catch( Exception e)
{
throw new RuntimeException( "Can't open file=" + file, e);
}
} | GeneratorSetDocWriter function( File file) { try { return new GeneratorSetDocWriter( new FileWriter( file)); } catch( Exception e) { throw new RuntimeException( STR + file, e); } } | /**
* Creates a {@link GeneratorSetDocWriter} for the given file.
*/ | Creates a <code>GeneratorSetDocWriter</code> for the given file | createWriter | {
"repo_name": "Cornutum/tcases",
"path": "tcases-io/src/test/java/org/cornutum/tcases/generator/io/GeneratorSetResources.java",
"license": "mit",
"size": 4520
} | [
"java.io.File",
"java.io.FileWriter"
] | import java.io.File; import java.io.FileWriter; | import java.io.*; | [
"java.io"
] | java.io; | 2,535,968 |
public static String escapeAssignmentFeedback(String value)
{
if (value == null || value.length() == 0) return value;
value = fixAssignmentFeedback(value);
StringBuilder buf = new StringBuilder(value);
int pos = -1;
while ((pos = buf.indexOf("{{")) != -1)
{
buf.replace(pos, pos + "{{".length(), "<... | static String function(String value) { if (value == null value.length() == 0) return value; value = fixAssignmentFeedback(value); StringBuilder buf = new StringBuilder(value); int pos = -1; while ((pos = buf.indexOf("{{")) != -1) { buf.replace(pos, pos + "{{".length(), STR); } while ((pos = buf.indexOf("}}")) != -1) { ... | /**
* Called to deal with old Chef-style assignment feedback annotation, {{like this}}.
*
* @param value
* A formatted text string that may contain {{}} style markup
* @return HTML ready to for display on a browser
*/ | Called to deal with old Chef-style assignment feedback annotation, {{like this}} | escapeAssignmentFeedback | {
"repo_name": "udayg/sakai",
"path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java",
"license": "apache-2.0",
"size": 672322
} | [
"org.sakaiproject.util.FormattedText"
] | import org.sakaiproject.util.FormattedText; | import org.sakaiproject.util.*; | [
"org.sakaiproject.util"
] | org.sakaiproject.util; | 1,838,744 |
public void setOverrideProperties(Properties overrideProperties) {
this.overrideProperties = overrideProperties;
} | void function(Properties overrideProperties) { this.overrideProperties = overrideProperties; } | /**
* Sets a special list of override properties that take precedence and will use first, if a property exist.
*/ | Sets a special list of override properties that take precedence and will use first, if a property exist | setOverrideProperties | {
"repo_name": "tadayosi/camel",
"path": "core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java",
"license": "apache-2.0",
"size": 65677
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 2,139,510 |
private static Collection<TypeQualifierAnnotation> getApplicableScopedApplications(XMethod o, int parameter) {
Set<TypeQualifierAnnotation> result = new HashSet<TypeQualifierAnnotation>();
ElementType e = ElementType.PARAMETER;
getApplicableScopedApplications(result, o, e);
getDirect... | static Collection<TypeQualifierAnnotation> function(XMethod o, int parameter) { Set<TypeQualifierAnnotation> result = new HashSet<TypeQualifierAnnotation>(); ElementType e = ElementType.PARAMETER; getApplicableScopedApplications(result, o, e); getDirectApplications(result, o, parameter); return result; } | /**
* Get the collection of resolved TypeQualifierAnnotations for a given
* parameter, taking into account annotations applied to outer scopes (e.g.,
* enclosing classes and packages.)
*
* @param o
* a method
* @param parameter
* a parameter (0 == first para... | Get the collection of resolved TypeQualifierAnnotations for a given parameter, taking into account annotations applied to outer scopes (e.g., enclosing classes and packages.) | getApplicableScopedApplications | {
"repo_name": "OpenNTF/FindBug-for-Domino-Designer",
"path": "findBugsEclipsePlugin/src/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java",
"license": "lgpl-3.0",
"size": 44560
} | [
"edu.umd.cs.findbugs.ba.XMethod",
"java.lang.annotation.ElementType",
"java.util.Collection",
"java.util.HashSet",
"java.util.Set"
] | import edu.umd.cs.findbugs.ba.XMethod; import java.lang.annotation.ElementType; import java.util.Collection; import java.util.HashSet; import java.util.Set; | import edu.umd.cs.findbugs.ba.*; import java.lang.annotation.*; import java.util.*; | [
"edu.umd.cs",
"java.lang",
"java.util"
] | edu.umd.cs; java.lang; java.util; | 2,289,760 |
public static List<File> sortInBatch(final BufferedReader fbr,
final long datalength, final Comparator<String> cmp,
final boolean distinct) throws IOException {
return sortInBatch(fbr, datalength, cmp, DEFAULTMAXTEMPFILES,
estimateAvailableMemory(), Charset.defaultCharset(),
null, distinct, 0, f... | static List<File> function(final BufferedReader fbr, final long datalength, final Comparator<String> cmp, final boolean distinct) throws IOException { return sortInBatch(fbr, datalength, cmp, DEFAULTMAXTEMPFILES, estimateAvailableMemory(), Charset.defaultCharset(), null, distinct, 0, false); } | /**
* This will simply load the file by blocks of lines, then sort them
* in-memory, and write the result to temporary files that have to be
* merged later.
*
* @param fbr
* data source
* @param datalength
* estimated data volume (in bytes)
* @param cmp
* ... | This will simply load the file by blocks of lines, then sort them in-memory, and write the result to temporary files that have to be merged later | sortInBatch | {
"repo_name": "wkapil/distributedexternalsort",
"path": "src/main/java/com/google/code/externalsorting/ExternalSortParallelStreamSort.java",
"license": "apache-2.0",
"size": 25354
} | [
"java.io.BufferedReader",
"java.io.File",
"java.io.IOException",
"java.nio.charset.Charset",
"java.util.Comparator",
"java.util.List"
] | import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.nio.charset.Charset; import java.util.Comparator; 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; | 1,121,928 |
@Test(groups= {"ut"})
public void testCompareStepInErrorWithReferenceNoReferenceSnapshot() throws Exception {
stepFailed.getSnapshots().removeAll(stepFailed.getSnapshots());
ITestResult testResult = Reporter.getCurrentTestResult();
TestNGResultUtils.setSeleniumRobotTestContext(testResult, SeleniumTestsC... | @Test(groups= {"ut"}) void function() throws Exception { stepFailed.getSnapshots().removeAll(stepFailed.getSnapshots()); ITestResult testResult = Reporter.getCurrentTestResult(); TestNGResultUtils.setSeleniumRobotTestContext(testResult, SeleniumTestsContextManager.getThreadContext()); SeleniumTestsContextManager.getThr... | /**
* Failed test step does not contain a "reference snapshot" so there is no way to compare it to the one stored on server
* No error should be raised
* @throws Exception
*/ | Failed test step does not contain a "reference snapshot" so there is no way to compare it to the one stored on server No error should be raised | testCompareStepInErrorWithReferenceNoReferenceSnapshot | {
"repo_name": "bhecquet/seleniumRobot",
"path": "core/src/test/java/com/seleniumtests/ut/core/testanalysis/TestErrorCauseFinder.java",
"license": "apache-2.0",
"size": 39669
} | [
"com.seleniumtests.core.SeleniumTestsContextManager",
"com.seleniumtests.core.testanalysis.ErrorCause",
"com.seleniumtests.core.testanalysis.ErrorCauseFinder",
"com.seleniumtests.core.utils.TestNGResultUtils",
"com.seleniumtests.util.imaging.StepReferenceComparator",
"java.io.File",
"java.util.Arrays",
... | import com.seleniumtests.core.SeleniumTestsContextManager; import com.seleniumtests.core.testanalysis.ErrorCause; import com.seleniumtests.core.testanalysis.ErrorCauseFinder; import com.seleniumtests.core.utils.TestNGResultUtils; import com.seleniumtests.util.imaging.StepReferenceComparator; import java.io.File; import... | import com.seleniumtests.core.*; import com.seleniumtests.core.testanalysis.*; import com.seleniumtests.core.utils.*; import com.seleniumtests.util.imaging.*; import java.io.*; import java.util.*; import org.mockito.*; import org.powermock.api.mockito.*; import org.testng.*; import org.testng.annotations.*; | [
"com.seleniumtests.core",
"com.seleniumtests.util",
"java.io",
"java.util",
"org.mockito",
"org.powermock.api",
"org.testng",
"org.testng.annotations"
] | com.seleniumtests.core; com.seleniumtests.util; java.io; java.util; org.mockito; org.powermock.api; org.testng; org.testng.annotations; | 1,079,916 |
protected boolean requiresAuthentication(HttpServletRequest request, HttpServletResponse response) {
boolean bSesnValid = this.isSesnValid();
if (!bSesnValid) {
if (this.getDST() != null) {
logger.debug("session invalid, setting dead authentication, and push... | boolean function(HttpServletRequest request, HttpServletResponse response) { boolean bSesnValid = this.isSesnValid(); if (!bSesnValid) { if (this.getDST() != null) { logger.debug(STR); SecurityContextHolder.getContext().setAuthentication(new KualiDistributedSessionExpiredAuthentication()); return true; } } return super... | /**
* This overridden method checks if the DST is valid. If it's not, the
* authentication is set to a new, non-authenticated,
* {@link KualiDistributedSessionExpiredAuthentication} which is the
* indication for {@link attemptAuthentication} that the session has
* expired
*
... | This overridden method checks if the DST is valid. If it's not, the authentication is set to a new, non-authenticated, <code>KualiDistributedSessionExpiredAuthentication</code> which is the indication for <code>attemptAuthentication</code> that the session has expired | requiresAuthentication | {
"repo_name": "ewestfal/rice",
"path": "rice-middleware/client-contrib/src/main/java/org/kuali/rice/kim/client/acegi/KualiDistributedSessionFilter.java",
"license": "apache-2.0",
"size": 6205
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.acegisecurity.context.SecurityContextHolder"
] | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.acegisecurity.context.SecurityContextHolder; | import javax.servlet.http.*; import org.acegisecurity.context.*; | [
"javax.servlet",
"org.acegisecurity.context"
] | javax.servlet; org.acegisecurity.context; | 1,834,042 |
public void updateUserLocales(IPerson person, Locale[] locales); | void function(IPerson person, Locale[] locales); | /**
* Persists the locale preferences for a particular user.
* @param person the user
* @param locales the user's new locale preferences
* @throws Exception
*/ | Persists the locale preferences for a particular user | updateUserLocales | {
"repo_name": "kole9273/uPortal",
"path": "uportal-war/src/main/java/org/jasig/portal/i18n/ILocaleStore.java",
"license": "apache-2.0",
"size": 1582
} | [
"java.util.Locale",
"org.jasig.portal.security.IPerson"
] | import java.util.Locale; import org.jasig.portal.security.IPerson; | import java.util.*; import org.jasig.portal.security.*; | [
"java.util",
"org.jasig.portal"
] | java.util; org.jasig.portal; | 909,799 |
@SuppressWarnings("unchecked")
public static <E extends Comparable<? super E>> ImmutableSortedMultiset<E> of(
E e1, E e2, E e3, E e4, E e5, E e6, E... remaining) {
int size = remaining.length + 6;
List<E> all = Lists.newArrayListWithCapacity(size);
Collections.addAll(all, e1, e2, e3, e4, e5, e6);
... | @SuppressWarnings(STR) static <E extends Comparable<? super E>> ImmutableSortedMultiset<E> function( E e1, E e2, E e3, E e4, E e5, E e6, E... remaining) { int size = remaining.length + 6; List<E> all = Lists.newArrayListWithCapacity(size); Collections.addAll(all, e1, e2, e3, e4, e5, e6); Collections.addAll(all, remaini... | /**
* Returns an immutable sorted multiset containing the given elements sorted by their natural
* ordering.
*
* @throws NullPointerException if any element is null
*/ | Returns an immutable sorted multiset containing the given elements sorted by their natural ordering | of | {
"repo_name": "rgoldberg/guava",
"path": "guava/src/com/google/common/collect/ImmutableSortedMultiset.java",
"license": "apache-2.0",
"size": 22778
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 680,599 |
@Nullable
protected com.google.gson.JsonElement cumulative;
@Nonnull
public WorkbookFunctionsBeta_DistParameterSetBuilder withCumulative(@Nullable final com.google.gson.JsonElement val) {
this.cumulative = val;
return this;
} | com.google.gson.JsonElement cumulative; public WorkbookFunctionsBeta_DistParameterSetBuilder function(@Nullable final com.google.gson.JsonElement val) { this.cumulative = val; return this; } | /**
* Sets the Cumulative
* @param val the value to set it to
* @return the current builder object
*/ | Sets the Cumulative | withCumulative | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/models/WorkbookFunctionsBeta_DistParameterSet.java",
"license": "mit",
"size": 7435
} | [
"javax.annotation.Nullable"
] | import javax.annotation.Nullable; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 630,665 |
@Override
public void setCluster(Cluster cluster) {
Cluster oldCluster = null;
Lock writeLock = clusterLock.writeLock();
writeLock.lock();
try {
// Change components if necessary
oldCluster = this.cluster;
if (oldCluster == cluster)
... | void function(Cluster cluster) { Cluster oldCluster = null; Lock writeLock = clusterLock.writeLock(); writeLock.lock(); try { oldCluster = this.cluster; if (oldCluster == cluster) return; this.cluster = cluster; if (getState().isAvailable() && (oldCluster != null) && (oldCluster instanceof Lifecycle)) { try { ((Lifecyc... | /**
* Set the Cluster with which this Container is associated.
*
* @param cluster The newly associated Cluster
*/ | Set the Cluster with which this Container is associated | setCluster | {
"repo_name": "Nickname0806/Test_Q4",
"path": "java/org/apache/catalina/core/ContainerBase.java",
"license": "apache-2.0",
"size": 45391
} | [
"java.util.concurrent.locks.Lock",
"org.apache.catalina.Cluster",
"org.apache.catalina.Lifecycle",
"org.apache.catalina.LifecycleException"
] | import java.util.concurrent.locks.Lock; import org.apache.catalina.Cluster; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleException; | import java.util.concurrent.locks.*; import org.apache.catalina.*; | [
"java.util",
"org.apache.catalina"
] | java.util; org.apache.catalina; | 1,409,620 |
public void resendCreditCreatedEmail(String code) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.customer.CreditClient.resendCreditCreatedEmailClient( code);
client.setContext(_apiContext);
client.executeRequest();
client.cleanupHttpConnection();
} | void function(String code) throws Exception { MozuClient client = com.mozu.api.clients.commerce.customer.CreditClient.resendCreditCreatedEmailClient( code); client.setContext(_apiContext); client.executeRequest(); client.cleanupHttpConnection(); } | /**
* customer-credits Put ResendCreditCreatedEmail description DOCUMENT_HERE
* <p><pre><code>
* Credit credit = new Credit();
* credit.resendCreditCreatedEmail( code);
* </code></pre></p>
* @param code User-defined code that uniqely identifies the channel group.
* @return
*/ | customer-credits Put ResendCreditCreatedEmail description DOCUMENT_HERE <code><code> Credit credit = new Credit(); credit.resendCreditCreatedEmail( code); </code></code> | resendCreditCreatedEmail | {
"repo_name": "lakshmi-nair/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/resources/commerce/customer/CreditResource.java",
"license": "mit",
"size": 11729
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,312,814 |
public void addSentenceListener(SentenceListener sl, SentenceId type) {
registerListener(type.toString(), sl);
} | void function(SentenceListener sl, SentenceId type) { registerListener(type.toString(), sl); } | /**
* Adds a {@link SentenceListener} that is interested in receiving only
* sentences of certain type.
*
* @param sl SentenceListener to add
* @param type Sentence type for which the listener is registered.
* @see net.sf.marineapi.nmea.event.SentenceListener
*/ | Adds a <code>SentenceListener</code> that is interested in receiving only sentences of certain type | addSentenceListener | {
"repo_name": "SignalK/signalk-core-java",
"path": "src/main/java/nz/co/fortytwo/signalk/handler/NMEAHandler.java",
"license": "apache-2.0",
"size": 20012
} | [
"net.sf.marineapi.nmea.event.SentenceListener",
"net.sf.marineapi.nmea.sentence.SentenceId"
] | import net.sf.marineapi.nmea.event.SentenceListener; import net.sf.marineapi.nmea.sentence.SentenceId; | import net.sf.marineapi.nmea.event.*; import net.sf.marineapi.nmea.sentence.*; | [
"net.sf.marineapi"
] | net.sf.marineapi; | 1,247,628 |
public static String getAsterixDBURL(Configuration conf) {
return conf.get(PregelixJob.ASTERIXDB_URL);
} | static String function(Configuration conf) { return conf.get(PregelixJob.ASTERIXDB_URL); } | /**
* Gets AsterixDB URL
*/ | Gets AsterixDB URL | getAsterixDBURL | {
"repo_name": "sigmod/asterixdb-analytics",
"path": "pregelix/pregelix-api/src/main/java/edu/uci/ics/pregelix/api/util/BspUtils.java",
"license": "apache-2.0",
"size": 39926
} | [
"edu.uci.ics.pregelix.api.job.PregelixJob",
"org.apache.hadoop.conf.Configuration"
] | import edu.uci.ics.pregelix.api.job.PregelixJob; import org.apache.hadoop.conf.Configuration; | import edu.uci.ics.pregelix.api.job.*; import org.apache.hadoop.conf.*; | [
"edu.uci.ics",
"org.apache.hadoop"
] | edu.uci.ics; org.apache.hadoop; | 1,979,128 |
public static <T> List<T> readNullableCollection(BinaryRawReaderEx reader) {
return readNullableCollection(reader, null);
} | static <T> List<T> function(BinaryRawReaderEx reader) { return readNullableCollection(reader, null); } | /**
* Read nullable collection.
*
* @param reader Reader.
* @return List.
*/ | Read nullable collection | readNullableCollection | {
"repo_name": "andrey-kuznetsov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java",
"license": "apache-2.0",
"size": 39937
} | [
"java.util.List",
"org.apache.ignite.internal.binary.BinaryRawReaderEx"
] | import java.util.List; import org.apache.ignite.internal.binary.BinaryRawReaderEx; | import java.util.*; import org.apache.ignite.internal.binary.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 1,781,572 |
protected boolean release(InternalDistributedMember grantor,
String serviceName,
boolean lockBatch,
int lockId) {
DM dm = getDistributionManager();
DLockReleaseMessage msg = new DLockReleaseMessage();
msg.processorId = g... | boolean function(InternalDistributedMember grantor, String serviceName, boolean lockBatch, int lockId) { DM dm = getDistributionManager(); DLockReleaseMessage msg = new DLockReleaseMessage(); msg.processorId = getProcessorId(); msg.serviceName = serviceName; msg.objectName = this.objectName; msg.lockBatch = lockBatch; ... | /** Returns true if release was acknowledged by the grantor; false means
* we targeted someone who is not the grantor */ | Returns true if release was acknowledged by the grantor; false means | release | {
"repo_name": "robertgeiger/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockReleaseProcessor.java",
"license": "apache-2.0",
"size": 15484
} | [
"com.gemstone.gemfire.distributed.internal.ReplyException",
"com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember"
] | import com.gemstone.gemfire.distributed.internal.ReplyException; import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember; | import com.gemstone.gemfire.distributed.internal.*; import com.gemstone.gemfire.distributed.internal.membership.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 1,718,660 |
private void testJournaledMethod(String methodName, Object... arguments)
throws ServerException {
buildExpectedCall(methodName, arguments);
setupLeader();
executeManagmentMethod(creator, methodName, arguments);
closeLeader();
setupFollower();
letFollower... | void function(String methodName, Object... arguments) throws ServerException { buildExpectedCall(methodName, arguments); setupLeader(); executeManagmentMethod(creator, methodName, arguments); closeLeader(); setupFollower(); letFollowerCatchUp(); assertExpectedCall(STR, leadingDelegate); assertExpectedCall(STR, followin... | /**
* <p>
* Test a Journaled method.
* </p>
* <p>
* Call the selected method on the JournalCreator. Then tell the
* JournalConsumer to process the journal. Compare the calls received by
* both Management delegates to the call we expected them to see.
* </p>
* <p>
* Call... | Test a Journaled method. Call the selected method on the JournalCreator. Then tell the JournalConsumer to process the journal. Compare the calls received by both Management delegates to the call we expected them to see. Calling the method directly on the JournalConsumer should produce an exception. | testJournaledMethod | {
"repo_name": "FLVC/fcrepo-src-3.4.2",
"path": "fcrepo-server/src/test/java/org/fcrepo/server/journal/TestJournalRoundTrip.java",
"license": "apache-2.0",
"size": 22132
} | [
"junit.framework.Assert",
"org.fcrepo.server.errors.InvalidStateException",
"org.fcrepo.server.errors.ServerException"
] | import junit.framework.Assert; import org.fcrepo.server.errors.InvalidStateException; import org.fcrepo.server.errors.ServerException; | import junit.framework.*; import org.fcrepo.server.errors.*; | [
"junit.framework",
"org.fcrepo.server"
] | junit.framework; org.fcrepo.server; | 1,229,912 |
void reorder(@NotNull Comparator pComparator, @NotNull Set<Object> pAttributes); | void reorder(@NotNull Comparator pComparator, @NotNull Set<Object> pAttributes); | /**
* Reorders the child nodes using the given comparator.
*
* @param pComparator the comparator used to order the children.
* @param pAttributes additional attributes describing this change.
*/ | Reorders the child nodes using the given comparator | reorder | {
"repo_name": "aditosoftware/propertly",
"path": "propertly.core/src/main/java/de/adito/propertly/core/api/INode.java",
"license": "mit",
"size": 5738
} | [
"java.util.Comparator",
"java.util.Set",
"org.jetbrains.annotations.NotNull"
] | import java.util.Comparator; import java.util.Set; import org.jetbrains.annotations.NotNull; | import java.util.*; import org.jetbrains.annotations.*; | [
"java.util",
"org.jetbrains.annotations"
] | java.util; org.jetbrains.annotations; | 2,324,019 |
public boolean isPickingPass() {
return GLGraphicsUtils.isPickingPass(gl);
}
// ############# | boolean function() { return GLGraphicsUtils.isPickingPass(gl); } | /**
* returns whether we are currently in the picking pass
*
* @return
*/ | returns whether we are currently in the picking pass | isPickingPass | {
"repo_name": "Caleydo/caleydo",
"path": "org.caleydo.ui/src/org/caleydo/core/view/opengl/layout2/GLGraphics.java",
"license": "bsd-3-clause",
"size": 22476
} | [
"org.caleydo.core.view.opengl.layout2.util.GLGraphicsUtils"
] | import org.caleydo.core.view.opengl.layout2.util.GLGraphicsUtils; | import org.caleydo.core.view.opengl.layout2.util.*; | [
"org.caleydo.core"
] | org.caleydo.core; | 307,744 |
default Collection<PropertySource> getPropertySources(Predicate<PropertySource> selector){
return getPropertySources().stream().filter(selector).collect(Collectors.toList());
}
/**
* <p>
* This method returns the Map of registered PropertyConverters
* per type.
* The List for ea... | default Collection<PropertySource> getPropertySources(Predicate<PropertySource> selector){ return getPropertySources().stream().filter(selector).collect(Collectors.toList()); } /** * <p> * This method returns the Map of registered PropertyConverters * per type. * The List for each type is ordered via their {@link javax... | /**
* This method returns a subset ot the currently registered PropertySources.
*
* @param selector the selector query, not null.
* @return a collectino of selected PropertySources.
*/ | This method returns a subset ot the currently registered PropertySources | getPropertySources | {
"repo_name": "syzer/incubator-tamaya",
"path": "java8/api/src/main/java/org/apache/tamaya/spi/ConfigurationContext.java",
"license": "apache-2.0",
"size": 6116
} | [
"java.util.Collection",
"java.util.List",
"java.util.Map",
"java.util.function.Predicate",
"java.util.stream.Collectors"
] | import java.util.Collection; import java.util.List; import java.util.Map; import java.util.function.Predicate; import java.util.stream.Collectors; | import java.util.*; import java.util.function.*; import java.util.stream.*; | [
"java.util"
] | java.util; | 52,477 |
Properties properties = new Properties();
if (host == null)
throw new ConnectionException("[" + HbaseConfig.ZOOKEEPER_QUORUM_PROPERTY + "] is required !");
properties.setProperty(HbaseConfig.ZOOKEEPER_QUORUM_PROPERTY, host);
if (port == null)
throw new Connectio... | Properties properties = new Properties(); if (host == null) throw new ConnectionException("[" + HbaseConfig.ZOOKEEPER_QUORUM_PROPERTY + STR); properties.setProperty(HbaseConfig.ZOOKEEPER_QUORUM_PROPERTY, host); if (port == null) throw new ConnectionException("[" + HbaseConfig.ZOOKEEPER_CLIENTPORT_PROPERTY + STR); prope... | /**
* Gets instance.
*
* @param host the host
* @param port the port
* @param master the master
* @param rootdir the rootdir
* @return the instance
*/ | Gets instance | getInstance | {
"repo_name": "DarkPhoenixs/connection-pool-client",
"path": "src/main/java/org/darkphoenixs/pool/hbase/HbaseSharedConnPool.java",
"license": "apache-2.0",
"size": 3678
} | [
"java.util.Properties",
"org.darkphoenixs.pool.ConnectionException"
] | import java.util.Properties; import org.darkphoenixs.pool.ConnectionException; | import java.util.*; import org.darkphoenixs.pool.*; | [
"java.util",
"org.darkphoenixs.pool"
] | java.util; org.darkphoenixs.pool; | 619,848 |
public void generateBitmapUsingJava2D(File outputFile, String format)
throws IOException {
//String compression = "CCITT T.6";
String compression = "PackBits";
OutputStream out = FileOutputStream(outputFile);
out = BufferedOutputStream(out);
try {
... | void function(File outputFile, String format) throws IOException { String compression = STR; OutputStream out = FileOutputStream(outputFile); out = BufferedOutputStream(out); try { ImageWriter writer = ImageWriterRegistry.getInstance().getWriterFor(format); ImageWriterParams params = new ImageWriterParams(); params.set... | /**
* Creates a bitmap file. We paint a few things on a bitmap and then save the bitmap using
* an ImageWriter.
* @param outputFile the target file
* @param format the target format (a MIME type, ex. "image/png")
* @throws IOException In case of an I/O error
*/ | Creates a bitmap file. We paint a few things on a bitmap and then save the bitmap using an ImageWriter | generateBitmapUsingJava2D | {
"repo_name": "Guronzan/Apache-XmlGraphics",
"path": "examples/java/image/writer/ImageWriterExample2.java",
"license": "apache-2.0",
"size": 4325
} | [
"java.io.File",
"java.io.IOException",
"java.io.OutputStream",
"org.apache.commons.io.IOUtils",
"org.apache.xmlgraphics.image.writer.ImageWriter",
"org.apache.xmlgraphics.image.writer.ImageWriterParams",
"org.apache.xmlgraphics.image.writer.ImageWriterRegistry",
"org.apache.xmlgraphics.image.writer.Mu... | import java.io.File; import java.io.IOException; import java.io.OutputStream; import org.apache.commons.io.IOUtils; import org.apache.xmlgraphics.image.writer.ImageWriter; import org.apache.xmlgraphics.image.writer.ImageWriterParams; import org.apache.xmlgraphics.image.writer.ImageWriterRegistry; import org.apache.xmlg... | import java.io.*; import org.apache.commons.io.*; import org.apache.xmlgraphics.image.writer.*; | [
"java.io",
"org.apache.commons",
"org.apache.xmlgraphics"
] | java.io; org.apache.commons; org.apache.xmlgraphics; | 129,189 |
synchronized void dropAll(boolean doSave) throws IOException {
Throwable priorE = null;
final Iterator<Map.Entry<SegmentCommitInfo,ReadersAndUpdates>> it = readerMap.entrySet().iterator();
while(it.hasNext()) {
final ReadersAndUpdates rld = it.next().getValue();
try {
if... | synchronized void dropAll(boolean doSave) throws IOException { Throwable priorE = null; final Iterator<Map.Entry<SegmentCommitInfo,ReadersAndUpdates>> it = readerMap.entrySet().iterator(); while(it.hasNext()) { final ReadersAndUpdates rld = it.next().getValue(); try { if (doSave && rld.writeLiveDocs(directory)) { asser... | /** Remove all our references to readers, and commits
* any pending changes. */ | Remove all our references to readers, and commits | dropAll | {
"repo_name": "zhangdian/solr4.6.0",
"path": "lucene/core/src/java/org/apache/lucene/index/IndexWriter.java",
"license": "apache-2.0",
"size": 173047
} | [
"java.io.IOException",
"java.util.Iterator",
"java.util.Map",
"org.apache.lucene.util.IOUtils"
] | import java.io.IOException; import java.util.Iterator; import java.util.Map; import org.apache.lucene.util.IOUtils; | import java.io.*; import java.util.*; import org.apache.lucene.util.*; | [
"java.io",
"java.util",
"org.apache.lucene"
] | java.io; java.util; org.apache.lucene; | 1,201,258 |
@Override
protected boolean isVisibleGhost() {
if (User.isAdmin()) {
return true;
}
return false;
}
//
// Entity2DView
// | boolean function() { if (User.isAdmin()) { return true; } return false; } // | /**
* Determine is the user can see this entity while in ghostmode.
*
* @return <code>true</code> if the client user can see this entity while in
* ghostmode.
*/ | Determine is the user can see this entity while in ghostmode | isVisibleGhost | {
"repo_name": "sourceress-project/archestica",
"path": "src/games/stendhal/client/gui/j2d/entity/Player2DView.java",
"license": "gpl-2.0",
"size": 7675
} | [
"games.stendhal.client.entity.User"
] | import games.stendhal.client.entity.User; | import games.stendhal.client.entity.*; | [
"games.stendhal.client"
] | games.stendhal.client; | 2,289,204 |
public void loadExtensions() {
File extensionDir = new File(EXTENSIONS_FOLDER);
if (!extensionDir.isDirectory()) {
Log.warn("Invalid extension directory '" + ExtensionManager.EXTENSIONS_FOLDER + "'");
return;
}
// initialize helper
this.error = new PrintWriter(System.err);
ModelFactory modelFact... | void function() { File extensionDir = new File(EXTENSIONS_FOLDER); if (!extensionDir.isDirectory()) { Log.warn(STR + ExtensionManager.EXTENSIONS_FOLDER + "'"); return; } this.error = new PrintWriter(System.err); ModelFactory modelFactory = new ModelFactory(); this.emptyModel = modelFactory.createModel(STR); | /***
* Loads the extensions specified in EXTENSION_FOLDER
*/ | Loads the extensions specified in EXTENSION_FOLDER | loadExtensions | {
"repo_name": "anonymous100001/maxuse",
"path": "src/main/org/tzi/use/uml/ocl/extension/ExtensionManager.java",
"license": "gpl-2.0",
"size": 5252
} | [
"java.io.File",
"java.io.PrintWriter",
"org.tzi.use.uml.mm.ModelFactory",
"org.tzi.use.util.Log"
] | import java.io.File; import java.io.PrintWriter; import org.tzi.use.uml.mm.ModelFactory; import org.tzi.use.util.Log; | import java.io.*; import org.tzi.use.uml.mm.*; import org.tzi.use.util.*; | [
"java.io",
"org.tzi.use"
] | java.io; org.tzi.use; | 2,140,556 |
public void runJob(Properties jobProps, JobListener jobListener)
throws JobException {
Preconditions.checkArgument(jobProps.containsKey(ConfigurationKeys.JOB_NAME_KEY),
"A job must have a job name specified by job.name");
String jobName = jobProps.getProperty(ConfigurationKeys.JOB_NAME_KEY);
... | void function(Properties jobProps, JobListener jobListener) throws JobException { Preconditions.checkArgument(jobProps.containsKey(ConfigurationKeys.JOB_NAME_KEY), STR); String jobName = jobProps.getProperty(ConfigurationKeys.JOB_NAME_KEY); boolean disabled = Boolean.valueOf(jobProps.getProperty(ConfigurationKeys.JOB_D... | /**
* Run a job.
*
* <p>
* This method runs the job immediately without going through the Quartz scheduler.
* This is particularly useful for testing.
* </p>
*
* @param jobProps Job configuration properties
* @param jobListener {@link JobListener} used for callback,
* ... | Run a job. This method runs the job immediately without going through the Quartz scheduler. This is particularly useful for testing. | runJob | {
"repo_name": "rayortigas/gobblin",
"path": "gobblin-scheduler/src/main/java/gobblin/scheduler/JobScheduler.java",
"license": "apache-2.0",
"size": 18701
} | [
"com.google.common.base.Preconditions",
"com.google.common.io.Closer",
"java.io.IOException",
"java.util.Properties"
] | import com.google.common.base.Preconditions; import com.google.common.io.Closer; import java.io.IOException; import java.util.Properties; | import com.google.common.base.*; import com.google.common.io.*; import java.io.*; import java.util.*; | [
"com.google.common",
"java.io",
"java.util"
] | com.google.common; java.io; java.util; | 2,642,676 |
private void deleteReferencedObjects(List<LinkedObject> referencedObjects, Set<ObjectIdentifier> parentObjects) throws SQLException, NamingException, DataErrorException, NoSuchColumnException {
int numberOfDeletedObjects = Integer.MAX_VALUE;
List<LinkedObject> deletedObjects = new LinkedList<LinkedObject>();
w... | void function(List<LinkedObject> referencedObjects, Set<ObjectIdentifier> parentObjects) throws SQLException, NamingException, DataErrorException, NoSuchColumnException { int numberOfDeletedObjects = Integer.MAX_VALUE; List<LinkedObject> deletedObjects = new LinkedList<LinkedObject>(); while (numberOfDeletedObjects > 0... | /**
* Intenta borrar los objetos apuntados por estructurales recursivamente.
*
* @param referencedObjects
* Lista de los objetos que son refernciados mediante una
* propiedad estructural y que deben ser borrados.
* @param parentObjects TODO
* @throws DataErrorException
* ... | Intenta borrar los objetos apuntados por estructurales recursivamente | deleteReferencedObjects | {
"repo_name": "semantic-web-software/dynagent",
"path": "Server/src/dynagent/server/services/DeletableObject.java",
"license": "agpl-3.0",
"size": 78584
} | [
"java.sql.SQLException",
"java.util.HashSet",
"java.util.LinkedList",
"java.util.List",
"java.util.Set",
"javax.naming.NamingException"
] | import java.sql.SQLException; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; import javax.naming.NamingException; | import java.sql.*; import java.util.*; import javax.naming.*; | [
"java.sql",
"java.util",
"javax.naming"
] | java.sql; java.util; javax.naming; | 150,399 |
//-----------------------------------------------------------------------
public PutCall getPutCall() {
return putCall;
} | PutCall function() { return putCall; } | /**
* Gets whether the option is put or call.
* <p>
* A call gives the owner the right, but not obligation, to buy the underlying at
* an agreed price in the future. A put gives a similar option to sell.
* @return the value of the property
*/ | Gets whether the option is put or call. A call gives the owner the right, but not obligation, to buy the underlying at an agreed price in the future. A put gives a similar option to sell | getPutCall | {
"repo_name": "nssales/Strata",
"path": "modules/finance/src/main/java/com/opengamma/strata/finance/future/GenericFutureOption.java",
"license": "apache-2.0",
"size": 36115
} | [
"com.opengamma.strata.basics.PutCall"
] | import com.opengamma.strata.basics.PutCall; | import com.opengamma.strata.basics.*; | [
"com.opengamma.strata"
] | com.opengamma.strata; | 2,035,805 |
public void writeToJPG(File file, float quality) throws IOException {
FileOutputStream out = new FileOutputStream(file);
// Encodes image as a JPEG data stream
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(img);
par... | void function(File file, float quality) throws IOException { FileOutputStream out = new FileOutputStream(file); JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out); JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(img); param.setQuality(quality, true); encoder.setJPEGEncodeParam(param); encoder.encode(... | /**
* Writes to JPG using Sun's JPEGCodec
* @param file File to write image to
* @param quality The image quality
* @throws IOException
*/ | Writes to JPG using Sun's JPEGCodec | writeToJPG | {
"repo_name": "thiagoramos23/java_mock_project",
"path": "thramos-core/src/main/java/com/thramos/framework/util/image/Image.java",
"license": "apache-2.0",
"size": 10847
} | [
"com.sun.image.codec.jpeg.JPEGCodec",
"com.sun.image.codec.jpeg.JPEGEncodeParam",
"com.sun.image.codec.jpeg.JPEGImageEncoder",
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException"
] | import com.sun.image.codec.jpeg.JPEGCodec; import com.sun.image.codec.jpeg.JPEGEncodeParam; import com.sun.image.codec.jpeg.JPEGImageEncoder; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; | import com.sun.image.codec.jpeg.*; import java.io.*; | [
"com.sun.image",
"java.io"
] | com.sun.image; java.io; | 2,660,480 |
public Optional<Boolean> getEnabled() {
return enabled;
} | Optional<Boolean> function() { return enabled; } | /** Get whether the provider should be enabled or not, or no change should be made.
* @return whether the provider should be enabled.
*/ | Get whether the provider should be enabled or not, or no change should be made | getEnabled | {
"repo_name": "MrCreosote/auth2",
"path": "src/us/kbase/auth2/lib/config/AuthConfigUpdate.java",
"license": "mit",
"size": 12814
} | [
"com.google.common.base.Optional"
] | import com.google.common.base.Optional; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,055,632 |
public void addDependency(PersistentDependency depend)
{
if (! _dependList.contains(depend))
_dependList.add(depend);
} | void function(PersistentDependency depend) { if (! _dependList.contains(depend)) _dependList.add(depend); } | /**
* Add a dependency.
*/ | Add a dependency | addDependency | {
"repo_name": "christianchristensen/resin",
"path": "modules/resin/src/com/caucho/ejb/cfg/EjbBeanConfigProxy.java",
"license": "gpl-2.0",
"size": 3776
} | [
"com.caucho.vfs.PersistentDependency"
] | import com.caucho.vfs.PersistentDependency; | import com.caucho.vfs.*; | [
"com.caucho.vfs"
] | com.caucho.vfs; | 1,698,547 |
ServiceFuture<Void> putOptionalQueryAsync(String queryParameter, final ServiceCallback<Void> serviceCallback); | ServiceFuture<Void> putOptionalQueryAsync(String queryParameter, final ServiceCallback<Void> serviceCallback); | /**
* Test implicitly optional query parameter.
*
* @param queryParameter the String value
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceF... | Test implicitly optional query parameter | putOptionalQueryAsync | {
"repo_name": "vishrutshah/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/requiredoptional/Implicits.java",
"license": "mit",
"size": 15143
} | [
"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; | 529,542 |
@Override
public Adapter createFastXSLTMediatorOutputConnectorAdapter() {
if (fastXSLTMediatorOutputConnectorItemProvider == null) {
fastXSLTMediatorOutputConnectorItemProvider = new FastXSLTMediatorOutputConnectorItemProvider(this);
}
return fastXSLTMediatorOutputConnectorItemProvider;
}
protected S... | Adapter function() { if (fastXSLTMediatorOutputConnectorItemProvider == null) { fastXSLTMediatorOutputConnectorItemProvider = new FastXSLTMediatorOutputConnectorItemProvider(this); } return fastXSLTMediatorOutputConnectorItemProvider; } protected ScriptMediatorItemProvider scriptMediatorItemProvider; | /**
* This creates an adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.FastXSLTMediatorOutputConnector}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>org.wso2.developerstudio.eclipse.gmf.esb.FastXSLTMediatorOutputConnector</code>. | createFastXSLTMediatorOutputConnectorAdapter | {
"repo_name": "rajeevanv89/developer-studio",
"path": "esb/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EsbItemProviderAdapterFactory.java",
"license": "apache-2.0",
"size": 286852
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,344,767 |
public void addNewItems(List<M> newItems) {
if (this.items == null) {
this.items = createEmptyList();
}
this.items.addAll(newItems);
} | void function(List<M> newItems) { if (this.items == null) { this.items = createEmptyList(); } this.items.addAll(newItems); } | /**
* <p>
* Add items.
* </p>
*
* <p>
* If {@link #items} is null an empty list of {@link M} will be created first.
* </p>
*
* @param newItems items
*/ | Add items. If <code>#items</code> is null an empty list of <code>M</code> will be created first. | addNewItems | {
"repo_name": "Bodo1981/appkit",
"path": "core/src/main/java/com/christianbahl/appkit/core/adapter/CBAdapterRecyclerView.java",
"license": "apache-2.0",
"size": 3511
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,788,294 |
protected void writeParagraphEnd() throws IOException
{
if (!inParagraph)
{
writeParagraphStart();
}
output.write(getParagraphEnd());
inParagraph = false;
} | void function() throws IOException { if (!inParagraph) { writeParagraphStart(); } output.write(getParagraphEnd()); inParagraph = false; } | /**
* Write something (if defined) at the end of a paragraph.
* @throws IOException if something went wrong
*/ | Write something (if defined) at the end of a paragraph | writeParagraphEnd | {
"repo_name": "ChunghwaTelecom/pdfbox",
"path": "pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java",
"license": "apache-2.0",
"size": 72634
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,387,430 |
public void createViews(ArrayList<LayoutElement> bitmap, boolean back, String path,
final OpenMode openMode, boolean results, boolean grid) {
if (bitmap != null && isAdded()) {
synchronized (bitmap) {
boolean isOtg = path.equals(OTGUtil.PREFIX_OTG + "/... | void function(ArrayList<LayoutElement> bitmap, boolean back, String path, final OpenMode openMode, boolean results, boolean grid) { if (bitmap != null && isAdded()) { synchronized (bitmap) { boolean isOtg = path.equals(OTGUtil.PREFIX_OTG + "/"), isOnTheCloud = path.equals(CloudHandler.CLOUD_PREFIX_GOOGLE_DRIVE + "/") p... | /**
* Loading adapter after getting a list of elements
*
* @param bitmap the list of objects for the adapter
* @param back if we're coming back from any directory and want the scroll to be restored
* @param path the path for the adapter
* @param openMode the type of file being cr... | Loading adapter after getting a list of elements | createViews | {
"repo_name": "MoKee/android_packages_apps_AmazeFileManager",
"path": "app/src/main/java/com/amaze/filemanager/fragments/MainFragment.java",
"license": "gpl-3.0",
"size": 77379
} | [
"android.graphics.Bitmap",
"android.graphics.BitmapFactory",
"android.graphics.drawable.BitmapDrawable",
"com.amaze.filemanager.database.CloudHandler",
"com.amaze.filemanager.ui.LayoutElement",
"com.amaze.filemanager.utils.OTGUtil",
"com.amaze.filemanager.utils.OpenMode",
"java.util.ArrayList"
] | import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.drawable.BitmapDrawable; import com.amaze.filemanager.database.CloudHandler; import com.amaze.filemanager.ui.LayoutElement; import com.amaze.filemanager.utils.OTGUtil; import com.amaze.filemanager.utils.OpenMode; import java.... | import android.graphics.*; import android.graphics.drawable.*; import com.amaze.filemanager.database.*; import com.amaze.filemanager.ui.*; import com.amaze.filemanager.utils.*; import java.util.*; | [
"android.graphics",
"com.amaze.filemanager",
"java.util"
] | android.graphics; com.amaze.filemanager; java.util; | 1,029,946 |
public void doDelete(HttpServletRequest request, HttpServletResponse response)
{
String sesId = request.getParameter("session");
String reason = request.getParameter("reason");
if (sesId == null || reason == null)
{
this.logger.warn("Bad session delete reques... | void function(HttpServletRequest request, HttpServletResponse response) { String sesId = request.getParameter(STR); String reason = request.getParameter(STR); if (sesId == null reason == null) { this.logger.warn(STR); response.setStatus(HttpServletResponse.SC_BAD_REQUEST); return; } SessionDao dao = null; try { dao = n... | /**
* The DELETE method finishes a session.
*/ | The DELETE method finishes a session | doDelete | {
"repo_name": "sahara-labs/scheduling-server",
"path": "NodeProvider/src/io/rln/node/ss/service/AccessApi.java",
"license": "bsd-3-clause",
"size": 19521
} | [
"au.edu.uts.eng.remotelabs.schedserver.dataaccess.dao.SessionDao",
"au.edu.uts.eng.remotelabs.schedserver.dataaccess.entities.Session",
"au.edu.uts.eng.remotelabs.schedserver.session.pojo.SessionService",
"io.rln.node.ss.NodeProviderActivator",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.... | import au.edu.uts.eng.remotelabs.schedserver.dataaccess.dao.SessionDao; import au.edu.uts.eng.remotelabs.schedserver.dataaccess.entities.Session; import au.edu.uts.eng.remotelabs.schedserver.session.pojo.SessionService; import io.rln.node.ss.NodeProviderActivator; import javax.servlet.http.HttpServletRequest; import ja... | import au.edu.uts.eng.remotelabs.schedserver.dataaccess.dao.*; import au.edu.uts.eng.remotelabs.schedserver.dataaccess.entities.*; import au.edu.uts.eng.remotelabs.schedserver.session.pojo.*; import io.rln.node.ss.*; import javax.servlet.http.*; | [
"au.edu.uts",
"io.rln.node",
"javax.servlet"
] | au.edu.uts; io.rln.node; javax.servlet; | 1,742,377 |
protected synchronized void handleMatch(EventBean newEvent) {
UpdateHandlerThread handler = new UpdateHandlerThread(this, newEvent);
//handle match in its own thread using a ThreadPool
ThreadPool tp = ThreadPool.getInstance();
tp.execute(handler);
}
//
// public synchronized void doOutput(M... | synchronized void function(EventBean newEvent) { UpdateHandlerThread handler = new UpdateHandlerThread(this, newEvent); ThreadPool tp = ThreadPool.getInstance(); tp.execute(handler); } | /**
* handles a single pattern match
*
* @param newEvent the EventBean representing the match
*/ | handles a single pattern match | handleMatch | {
"repo_name": "52North/SES",
"path": "52n-ses-eml-002/src/main/java/org/n52/ses/eml/v002/filterlogic/esper/StatementListener.java",
"license": "gpl-2.0",
"size": 11280
} | [
"com.espertech.esper.client.EventBean",
"org.n52.ses.eml.v002.util.ThreadPool"
] | import com.espertech.esper.client.EventBean; import org.n52.ses.eml.v002.util.ThreadPool; | import com.espertech.esper.client.*; import org.n52.ses.eml.v002.util.*; | [
"com.espertech.esper",
"org.n52.ses"
] | com.espertech.esper; org.n52.ses; | 336,190 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ManagedInstanceLongTermRetentionBackupInner>> listByDatabaseSinglePageAsync(
String locationName,
String managedInstanceName,
String databaseName,
Boolean onlyLatestPerDatabase,
DatabaseState databaseS... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<ManagedInstanceLongTermRetentionBackupInner>> function( String locationName, String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { if (this.client.getEndpoint() == null) { return Mono... | /**
* Lists all long term retention backups for a managed database.
*
* @param locationName The location of the database.
* @param managedInstanceName The name of the managed instance.
* @param databaseName The name of the managed database.
* @param onlyLatestPerDatabase Whether or not to ... | Lists all long term retention backups for a managed database | listByDatabaseSinglePageAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionManagedInstanceBackupsClientImpl.java",
"license": "mit",
"size": 162168
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.Context",
"com.azure.resourcemanager.sql.fluent.models.ManagedInstanceLongTermRetentionBackupInner",
"com.azure.... | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceLongTermRetentionBackupInne... | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.sql.fluent.models.*; import com.azure.resourcemanager.sql.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,812,869 |
public GenericTextFieldAssert hasTextContaining(String textFragment) {
String errorMessage = "Expected text field's text to contain <%s>, but it didn't.";
String actualText = actual.getText();
assertThat(actualText).overridingErrorMessage(errorMessage, textFragment).contains(textFragment);
... | GenericTextFieldAssert function(String textFragment) { String errorMessage = STR; String actualText = actual.getText(); assertThat(actualText).overridingErrorMessage(errorMessage, textFragment).contains(textFragment); return this; } | /**
* Asserts that the {@link GenericTextField text field's} text contains a certain text fragment.
*
* @param textFragment the expected text fragment
* @return same assertion instance for fluent API
* @see GenericTextField#getText()
* @since 2.0
*/ | Asserts that the <code>GenericTextField text field's</code> text contains a certain text fragment | hasTextContaining | {
"repo_name": "testIT-WebTester/webtester2-core",
"path": "webtester-support-assertj3/src/main/java/info/novatec/testit/webtester/support/assertj/assertions/pagefragments/GenericTextFieldAssert.java",
"license": "apache-2.0",
"size": 3153
} | [
"org.assertj.core.api.Assertions"
] | import org.assertj.core.api.Assertions; | import org.assertj.core.api.*; | [
"org.assertj.core"
] | org.assertj.core; | 1,375,908 |
@Override
public void enterIncluding_specifier(WindowParser.Including_specifierContext ctx) {
if(checkForException(ctx)) {
return;
}
enterList();
} | void function(WindowParser.Including_specifierContext ctx) { if(checkForException(ctx)) { return; } enterList(); } | /**
* When we're beginning an inclusion specifier list, then we push the list token so we
* know when we're done processing
* @param ctx
*/ | When we're beginning an inclusion specifier list, then we push the list token so we know when we're done processing | enterIncluding_specifier | {
"repo_name": "JonZeolla/metron",
"path": "metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/window/WindowProcessor.java",
"license": "apache-2.0",
"size": 14220
} | [
"org.apache.metron.profiler.client.window.generated.WindowParser"
] | import org.apache.metron.profiler.client.window.generated.WindowParser; | import org.apache.metron.profiler.client.window.generated.*; | [
"org.apache.metron"
] | org.apache.metron; | 2,685,818 |
protected HttpURLConnection getOpenHttpURLConnection(String url)
throws IOException {
return getOpenHttpURLConnection(url, false, 0, "");
} | HttpURLConnection function(String url) throws IOException { return getOpenHttpURLConnection(url, false, 0, ""); } | /**
* By default do not use a proxy.
* @param url url
* @return HttpURLConnection
* @throws IOException If encountered.
*/ | By default do not use a proxy | getOpenHttpURLConnection | {
"repo_name": "agdturner/agdt-web",
"path": "src/main/java/uk/ac/leeds/ccg/web/io/Web_Scraper.java",
"license": "bsd-3-clause",
"size": 8390
} | [
"java.io.IOException",
"java.net.HttpURLConnection"
] | import java.io.IOException; import java.net.HttpURLConnection; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 117,172 |
public void testSimpleChoiceSchemaValidation() throws Exception {
CmsObject cms = getCmsObject();
echo("Testing a simple XML file validation for a schema that contains xsd:choice");
CmsXmlEntityResolver resolver = new CmsXmlEntityResolver(cms);
cacheXmlSchema(
"org/ope... | void function() throws Exception { CmsObject cms = getCmsObject(); echo(STR); CmsXmlEntityResolver resolver = new CmsXmlEntityResolver(cms); cacheXmlSchema( STR, STRorg/opencms/xml/content/xmlcontent-choice-definition-1-subA.xsd", STRorg/opencms/xml/content/xmlcontent-choice-definition-1-subB.xsd", STRorg/opencms/xml/c... | /**
* Tests a simple XML file validation for a schema that contains xsd:choice.<p>
*
* @throws Exception in case something goes wrong
*/ | Tests a simple XML file validation for a schema that contains xsd:choice | testSimpleChoiceSchemaValidation | {
"repo_name": "ggiudetti/opencms-core",
"path": "test/org/opencms/xml/content/TestCmsXmlContentChoice.java",
"license": "lgpl-2.1",
"size": 17462
} | [
"org.opencms.file.CmsObject",
"org.opencms.util.CmsFileUtil",
"org.opencms.xml.CmsXmlEntityResolver",
"org.opencms.xml.CmsXmlUtils"
] | import org.opencms.file.CmsObject; import org.opencms.util.CmsFileUtil; import org.opencms.xml.CmsXmlEntityResolver; import org.opencms.xml.CmsXmlUtils; | import org.opencms.file.*; import org.opencms.util.*; import org.opencms.xml.*; | [
"org.opencms.file",
"org.opencms.util",
"org.opencms.xml"
] | org.opencms.file; org.opencms.util; org.opencms.xml; | 2,093,974 |
@Deprecated
public IndexReader getReader(int termInfosIndexDivisor) throws IOException {
return getReader(termInfosIndexDivisor, true);
} | IndexReader function(int termInfosIndexDivisor) throws IOException { return getReader(termInfosIndexDivisor, true); } | /** Expert: like {@link #getReader}, except you can
* specify which termInfosIndexDivisor should be used for
* any newly opened readers.
* @param termInfosIndexDivisor Subsamples which indexed
* terms are loaded into RAM. This has the same effect as {@link
* IndexWriter#setTermIndexInterval} except t... | Expert: like <code>#getReader</code>, except you can specify which termInfosIndexDivisor should be used for any newly opened readers | getReader | {
"repo_name": "bighaidao/lucene",
"path": "lucene-core/src/main/java/org/apache/lucene/index/IndexWriter.java",
"license": "apache-2.0",
"size": 174024
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 525,912 |
static synchronized void storeAppIstance(UiApplication istance) {
try{
Log.trace(">>> storeAppIstance");
//Open the RuntimeStore.
RuntimeStore store = RuntimeStore.getRuntimeStore();
//Obtain the reference of WordPress for BlackBerry.
Object obj = store.get(WordPressInfo.APPLICATION_ID);
... | static synchronized void storeAppIstance(UiApplication istance) { try{ Log.trace(STR); RuntimeStore store = RuntimeStore.getRuntimeStore(); Object obj = store.get(WordPressInfo.APPLICATION_ID); if (obj == null) { store.put(WordPressInfo.APPLICATION_ID, istance); Log.trace(STR); } else { Log.trace(STR); store.replace(Wo... | /**
* Called at startup to store the app references onto runtime store
* @param istance
*/ | Called at startup to store the app references onto runtime store | storeAppIstance | {
"repo_name": "wordpress-mobile/WordPress-BlackBerry-Legacy",
"path": "src/com/wordpress/bb/SharingHelperOldDevices.java",
"license": "gpl-2.0",
"size": 10370
} | [
"com.wordpress.utils.log.Log",
"net.rim.device.api.system.ControlledAccessException",
"net.rim.device.api.system.RuntimeStore",
"net.rim.device.api.ui.UiApplication"
] | import com.wordpress.utils.log.Log; import net.rim.device.api.system.ControlledAccessException; import net.rim.device.api.system.RuntimeStore; import net.rim.device.api.ui.UiApplication; | import com.wordpress.utils.log.*; import net.rim.device.api.system.*; import net.rim.device.api.ui.*; | [
"com.wordpress.utils",
"net.rim.device"
] | com.wordpress.utils; net.rim.device; | 722,208 |
@RequestMapping(value = BUSINESS_OBJECT_DATA_ATTRIBUTES_URI_PREFIX + "/namespaces/{namespace}" +
"/businessObjectDefinitionNames/{businessObjectDefinitionName}" +
"/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}" +
"/busine... | @RequestMapping(value = BUSINESS_OBJECT_DATA_ATTRIBUTES_URI_PREFIX + STR + STR + STR + STR + STR + STR, method = RequestMethod.PUT, consumes = {STR, STR}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DATA_ATTRIBUTES_PUT) BusinessObjectDataAttribute function(@PathVariable(STR) String namespace, @PathVariable(STR) Strin... | /**
* Updates an existing attribute for the business object data with 4 subpartition values.
*
* @param namespace the namespace
* @param businessObjectDefinitionName the business object definition name
* @param businessObjectFormatUsage the business object format usage
* @param businessObj... | Updates an existing attribute for the business object data with 4 subpartition values | updateBusinessObjectDataAttribute | {
"repo_name": "seoj/herd",
"path": "herd-code/herd-rest/src/main/java/org/finra/herd/rest/BusinessObjectDataAttributeRestController.java",
"license": "apache-2.0",
"size": 62227
} | [
"java.util.Arrays",
"org.finra.herd.model.api.xml.BusinessObjectDataAttribute",
"org.finra.herd.model.api.xml.BusinessObjectDataAttributeKey",
"org.finra.herd.model.api.xml.BusinessObjectDataAttributeUpdateRequest",
"org.finra.herd.model.dto.SecurityFunctions",
"org.springframework.security.access.annotat... | import java.util.Arrays; import org.finra.herd.model.api.xml.BusinessObjectDataAttribute; import org.finra.herd.model.api.xml.BusinessObjectDataAttributeKey; import org.finra.herd.model.api.xml.BusinessObjectDataAttributeUpdateRequest; import org.finra.herd.model.dto.SecurityFunctions; import org.springframework.securi... | import java.util.*; import org.finra.herd.model.api.xml.*; import org.finra.herd.model.dto.*; import org.springframework.security.access.annotation.*; import org.springframework.web.bind.annotation.*; | [
"java.util",
"org.finra.herd",
"org.springframework.security",
"org.springframework.web"
] | java.util; org.finra.herd; org.springframework.security; org.springframework.web; | 2,648,369 |
public ArrayList<SelectTableMap> getSelect() {
return select;
}
| ArrayList<SelectTableMap> function() { return select; } | /**
* Gets the select.
*
* @return the select
*/ | Gets the select | getSelect | {
"repo_name": "termMed/sct-descriptive-statistics-generator",
"path": "src/main/java/com/termmed/statistics/model/OutputFileTableMap.java",
"license": "apache-2.0",
"size": 1745
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,407,231 |
public void start_resource_list(final Attributes meta) throws SAXException;
| void function(final Attributes meta) throws SAXException; | /**
*
* A container element start event handling method.
*
* @param meta attributes
*/ | A container element start event handling method | start_resource_list | {
"repo_name": "3-mode/lumens",
"path": "lumens-engine/src/main/java/com/lumens/engine/serializer/parser/ProjectHandler.java",
"license": "lgpl-3.0",
"size": 6858
} | [
"org.xml.sax.Attributes",
"org.xml.sax.SAXException"
] | import org.xml.sax.Attributes; import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 1,278,964 |
public void setErrorMessage(Image image, String message) {
fErrorText = trim(message);
fErrorImage = image;
updateMessageLabel();
} | void function(Image image, String message) { fErrorText = trim(message); fErrorImage = image; updateMessageLabel(); } | /**
* Sets an image and error message text to be displayed on the status line.
*
* @param image
* the image to use, or <code>null</code> for no image
* @param message
* the error message, or <code>null</code> for no error message
*/ | Sets an image and error message text to be displayed on the status line | setErrorMessage | {
"repo_name": "ghillairet/gef-gwt",
"path": "src/main/java/org/eclipse/jface/action/StatusLine.java",
"license": "epl-1.0",
"size": 20015
} | [
"org.eclipse.swt.graphics.Image"
] | import org.eclipse.swt.graphics.Image; | import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 1,585,243 |
public final Addresses deliveredAndWithoutBlindCarbonCopies() {
return new Addresses(this.address.stream().map(Address::delivered).filter(address -> address.getType() != Address.Type.BCC).collect(Collectors.toList()));
}
| final Addresses function() { return new Addresses(this.address.stream().map(Address::delivered).filter(address -> address.getType() != Address.Type.BCC).collect(Collectors.toList())); } | /**
* Creates a copy of this addresses extension, but without any BCC addresses.
* This is useful for server processing (multicast usage).
*
* @return A new addresses extension.
* @see <a href="http://xmpp.org/extensions/xep-0033.html#multicast">6. Multicast Usage</a>
*/ | Creates a copy of this addresses extension, but without any BCC addresses. This is useful for server processing (multicast usage) | deliveredAndWithoutBlindCarbonCopies | {
"repo_name": "jeozey/XmppServerTester",
"path": "xmpp-extensions/src/main/java/rocks/xmpp/extensions/address/model/Addresses.java",
"license": "mit",
"size": 7369
} | [
"java.util.stream.Collectors"
] | import java.util.stream.Collectors; | import java.util.stream.*; | [
"java.util"
] | java.util; | 2,640,143 |
public void addBindings(Map bindings) {
log.info("Adding bindings {}", bindings);
getBindings().putAll(bindings);
} | void function(Map bindings) { log.info(STR, bindings); getBindings().putAll(bindings); } | /**
* adds additional bindings (global variables to use in child pipes expressions)
* @param bindings key/values bindings to add to the existing bindings
*/ | adds additional bindings (global variables to use in child pipes expressions) | addBindings | {
"repo_name": "vladbailescu/sling",
"path": "contrib/extensions/sling-pipes/src/main/java/org/apache/sling/pipes/PipeBindings.java",
"license": "apache-2.0",
"size": 11150
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 153,799 |
@Parameters(name = "{0}")
public static Collection<Object[]> retrieveTestFolders() {
return retrieveTestFolders("resources/paginationServices");
} | @Parameters(name = "{0}") static Collection<Object[]> function() { return retrieveTestFolders(STR); } | /**
* Gets test folders from resources/feature.
*
* @return test folders from resources/feature
*/ | Gets test folders from resources/feature | retrieveTestFolders | {
"repo_name": "ylussaud/M2Doc",
"path": "tests/org.obeonetwork.m2doc.tests/src/org/obeonetwork/m2doc/tests/services/PaginationServicesTests.java",
"license": "epl-1.0",
"size": 1760
} | [
"java.util.Collection",
"org.junit.runners.Parameterized"
] | import java.util.Collection; import org.junit.runners.Parameterized; | import java.util.*; import org.junit.runners.*; | [
"java.util",
"org.junit.runners"
] | java.util; org.junit.runners; | 758,756 |
public Date getBirthday() {
return (Date) get(3);
} | Date function() { return (Date) get(3); } | /**
* Getter for <code>staypaldb.users.birthday</code>.
*/ | Getter for <code>staypaldb.users.birthday</code> | getBirthday | {
"repo_name": "bajohn/staypal_java",
"path": "src/com/staypal/db/tables/records/UsersRecord.java",
"license": "mit",
"size": 11625
} | [
"java.sql.Date"
] | import java.sql.Date; | import java.sql.*; | [
"java.sql"
] | java.sql; | 598,580 |
public TroubleshootingResultInner withStartTime(DateTime startTime) {
this.startTime = startTime;
return this;
} | TroubleshootingResultInner function(DateTime startTime) { this.startTime = startTime; return this; } | /**
* Set the start time of the troubleshooting.
*
* @param startTime the startTime value to set
* @return the TroubleshootingResultInner object itself.
*/ | Set the start time of the troubleshooting | withStartTime | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/TroubleshootingResultInner.java",
"license": "mit",
"size": 3099
} | [
"org.joda.time.DateTime"
] | import org.joda.time.DateTime; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 2,241,368 |
public static String adaptExpression( ScriptExpression expression )
{
if ( expression == null )
{
return IConstants.EMPTY_STRING;
}
ExpressionCodec exprCodec = ChartModelHelper.instance( )
.createExpressionCodec( );
exprCodec.setType( expression.getType( ) );
exprCodec.setExpression( expression.g... | static String function( ScriptExpression expression ) { if ( expression == null ) { return IConstants.EMPTY_STRING; } ExpressionCodec exprCodec = ChartModelHelper.instance( ) .createExpressionCodec( ); exprCodec.setType( expression.getType( ) ); exprCodec.setExpression( expression.getValue( ) ); return exprCodec.encode... | /**
* Encode script expression into a string
*
* @param expression
* script expression
* @return encoded expression string
*/ | Encode script expression into a string | adaptExpression | {
"repo_name": "sguan-actuate/birt",
"path": "chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/util/ChartUtil.java",
"license": "epl-1.0",
"size": 74337
} | [
"org.eclipse.birt.chart.computation.IConstants",
"org.eclipse.birt.chart.model.data.ScriptExpression",
"org.eclipse.birt.chart.model.impl.ChartModelHelper",
"org.eclipse.birt.chart.util.ChartExpressionUtil"
] | import org.eclipse.birt.chart.computation.IConstants; import org.eclipse.birt.chart.model.data.ScriptExpression; import org.eclipse.birt.chart.model.impl.ChartModelHelper; import org.eclipse.birt.chart.util.ChartExpressionUtil; | import org.eclipse.birt.chart.computation.*; import org.eclipse.birt.chart.model.data.*; import org.eclipse.birt.chart.model.impl.*; import org.eclipse.birt.chart.util.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 952,190 |
@Test(timeout=60000)
public void testIpcWithReaderQueuing() throws Exception {
// 1 reader, 1 connectionQ slot, 1 callq
for (int i=0; i < 10; i++) {
checkBlocking(1, 1, 1);
}
// 4 readers, 5 connectionQ slots, 2 callq
for (int i=0; i < 10; i++) {
checkBlocking(4, 5, 2);
}
} | @Test(timeout=60000) void function() throws Exception { for (int i=0; i < 10; i++) { checkBlocking(1, 1, 1); } for (int i=0; i < 10; i++) { checkBlocking(4, 5, 2); } } | /**
* Check that reader queueing works
* @throws BrokenBarrierException
* @throws InterruptedException
*/ | Check that reader queueing works | testIpcWithReaderQueuing | {
"repo_name": "steveloughran/hadoop",
"path": "hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIPC.java",
"license": "apache-2.0",
"size": 64299
} | [
"org.junit.Test"
] | import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 469,246 |
public static void suspendTaskInstance(long taskInstanceId) throws WorkflowException {
log.debug("suspendTaskInstance({})", taskInstanceId);
JbpmContext jbpmContext = JBPMUtils.getConfig().createJbpmContext();
try {
TaskMgmtSession taskMgmtSession = jbpmContext.getTaskMgmtSessio... | static void function(long taskInstanceId) throws WorkflowException { log.debug(STR, taskInstanceId); JbpmContext jbpmContext = JBPMUtils.getConfig().createJbpmContext(); try { TaskMgmtSession taskMgmtSession = jbpmContext.getTaskMgmtSession(); org.jbpm.taskmgmt.exe.TaskInstance ti = taskMgmtSession.getTaskInstance(task... | /**
* Suspend (pause) Task Instance
*/ | Suspend (pause) Task Instance | suspendTaskInstance | {
"repo_name": "codelibs/n2dms",
"path": "src/main/java/com/openkm/module/common/CommonWorkflowModule.java",
"license": "gpl-2.0",
"size": 39627
} | [
"com.openkm.bean.workflow.TaskInstance",
"com.openkm.core.WorkflowException",
"com.openkm.util.JBPMUtils",
"org.jbpm.JbpmContext",
"org.jbpm.JbpmException",
"org.jbpm.db.TaskMgmtSession"
] | import com.openkm.bean.workflow.TaskInstance; import com.openkm.core.WorkflowException; import com.openkm.util.JBPMUtils; import org.jbpm.JbpmContext; import org.jbpm.JbpmException; import org.jbpm.db.TaskMgmtSession; | import com.openkm.bean.workflow.*; import com.openkm.core.*; import com.openkm.util.*; import org.jbpm.*; import org.jbpm.db.*; | [
"com.openkm.bean",
"com.openkm.core",
"com.openkm.util",
"org.jbpm",
"org.jbpm.db"
] | com.openkm.bean; com.openkm.core; com.openkm.util; org.jbpm; org.jbpm.db; | 1,885,291 |
public String getSortAlbumArtist() {
return Dispatch.get(this, "SortAlbumArtist").toString();
} | String function() { return Dispatch.get(this, STR).toString(); } | /**
* Wrapper for calling the ActiveX-Method with input-parameter(s).
*
* @return the result is of type String
*/ | Wrapper for calling the ActiveX-Method with input-parameter(s) | getSortAlbumArtist | {
"repo_name": "cpesch/MetaMusic",
"path": "itunes-com-library/src/main/java/slash/metamusic/itunes/com/binding/IITFileOrCDTrack.java",
"license": "gpl-2.0",
"size": 32709
} | [
"com.jacob.com.Dispatch"
] | import com.jacob.com.Dispatch; | import com.jacob.com.*; | [
"com.jacob.com"
] | com.jacob.com; | 1,588,006 |
EList<EPoint> getPath(); | EList<EPoint> getPath(); | /**
* Returns the value of the '<em><b>Path</b></em>' containment reference list.
* The list contents are of type {@link com.paxelerate.model.EPoint}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Path</em>' containment reference list.
* @see com.paxelerate.model.monument... | Returns the value of the 'Path' containment reference list. The list contents are of type <code>com.paxelerate.model.EPoint</code>. | getPath | {
"repo_name": "BauhausLuftfahrt/PAXelerate",
"path": "com.paxelerate.model/src/com/paxelerate/model/monuments/Aisle.java",
"license": "epl-1.0",
"size": 4157
} | [
"com.paxelerate.model.EPoint",
"org.eclipse.emf.common.util.EList"
] | import com.paxelerate.model.EPoint; import org.eclipse.emf.common.util.EList; | import com.paxelerate.model.*; import org.eclipse.emf.common.util.*; | [
"com.paxelerate.model",
"org.eclipse.emf"
] | com.paxelerate.model; org.eclipse.emf; | 1,275,527 |
protected MainDesktopPane getDesktop() {
return desktop;
}
| MainDesktopPane function() { return desktop; } | /**
* Gets the main desktop.
*
* @return desktop.
*/ | Gets the main desktop | getDesktop | {
"repo_name": "mars-sim/mars-sim",
"path": "mars-sim-ui/src/main/java/org/mars_sim/msp/ui/swing/unit_window/TabPanel.java",
"license": "gpl-3.0",
"size": 8983
} | [
"org.mars_sim.msp.ui.swing.MainDesktopPane"
] | import org.mars_sim.msp.ui.swing.MainDesktopPane; | import org.mars_sim.msp.ui.swing.*; | [
"org.mars_sim.msp"
] | org.mars_sim.msp; | 432,658 |
public boolean isValidNumber(PhoneNumber number) {
String regionCode = getRegionCodeForNumber(number);
return isValidNumberForRegion(number, regionCode);
} | boolean function(PhoneNumber number) { String regionCode = getRegionCodeForNumber(number); return isValidNumberForRegion(number, regionCode); } | /**
* Tests whether a phone number matches a valid pattern. Note this doesn't verify the number
* is actually in use, which is impossible to tell by just looking at a number itself.
*
* @param number the phone number that we want to validate
* @return a boolean that indicates whether the number is... | Tests whether a phone number matches a valid pattern. Note this doesn't verify the number is actually in use, which is impossible to tell by just looking at a number itself | isValidNumber | {
"repo_name": "xtremelabs/libphonenumber",
"path": "java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java",
"license": "apache-2.0",
"size": 160935
} | [
"com.google.i18n.phonenumbers.Phonenumber"
] | import com.google.i18n.phonenumbers.Phonenumber; | import com.google.i18n.phonenumbers.*; | [
"com.google.i18n"
] | com.google.i18n; | 2,445,196 |
protected boolean validateBlockChecksum(HFileBlock block, byte[] data, int hdrSize)
throws IOException {
return ChecksumUtil.validateBlockChecksum(path, block, data, hdrSize);
} | boolean function(HFileBlock block, byte[] data, int hdrSize) throws IOException { return ChecksumUtil.validateBlockChecksum(path, block, data, hdrSize); } | /**
* Generates the checksum for the header as well as the data and
* then validates that it matches the value stored in the header.
* If there is a checksum mismatch, then return false. Otherwise
* return true.
*/ | Generates the checksum for the header as well as the data and then validates that it matches the value stored in the header. If there is a checksum mismatch, then return false. Otherwise return true | validateBlockChecksum | {
"repo_name": "amyvmiwei/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java",
"license": "apache-2.0",
"size": 75136
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,138,436 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<VpnGatewayInner> listByResourceGroup(String resourceGroupName); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<VpnGatewayInner> listByResourceGroup(String resourceGroupName); | /**
* Lists all the VpnGateways in a resource group.
*
* @param resourceGroupName The resource group name of the VpnGateway.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.network.models.ErrorException thrown if the request is re... | Lists all the VpnGateways in a resource group | listByResourceGroup | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnGatewaysClient.java",
"license": "mit",
"size": 24769
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.network.fluent.models.VpnGatewayInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.network.fluent.models.VpnGatewayInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,836,371 |
protected void generateColumns(Metadata metadata){
for(MetadataColumn metadataColumn : metadata.getColumns()){
//skip current_datetime
if(metadata.getSourceType() == Metadata.SourceType.ENGINE
&& COLUMN_NAME_CURRENT_DATETIME.equals(metadataColumn.getPhysicalName())
&& metadataColum... | void function(Metadata metadata){ for(MetadataColumn metadataColumn : metadata.getColumns()){ if(metadata.getSourceType() == Metadata.SourceType.ENGINE && COLUMN_NAME_CURRENT_DATETIME.equals(metadataColumn.getPhysicalName()) && metadataColumn.getRole() == Field.FieldRole.TIMESTAMP){ continue; } columnNames.add(metadata... | /**
* Generate columns.
*
* @param metadata the metadata
*/ | Generate columns | generateColumns | {
"repo_name": "metatron-app/metatron-discovery",
"path": "discovery-server/src/main/java/app/metatron/discovery/domain/mdm/preview/MetadataDataPreview.java",
"license": "apache-2.0",
"size": 5435
} | [
"app.metatron.discovery.common.GlobalObjectMapper",
"app.metatron.discovery.common.data.projection.ColumnDescription",
"app.metatron.discovery.common.datasource.DataType",
"app.metatron.discovery.domain.datasource.Field",
"app.metatron.discovery.domain.mdm.Metadata",
"app.metatron.discovery.domain.mdm.Met... | import app.metatron.discovery.common.GlobalObjectMapper; import app.metatron.discovery.common.data.projection.ColumnDescription; import app.metatron.discovery.common.datasource.DataType; import app.metatron.discovery.domain.datasource.Field; import app.metatron.discovery.domain.mdm.Metadata; import app.metatron.discove... | import app.metatron.discovery.common.*; import app.metatron.discovery.common.data.projection.*; import app.metatron.discovery.common.datasource.*; import app.metatron.discovery.domain.datasource.*; import app.metatron.discovery.domain.mdm.*; import java.util.*; | [
"app.metatron.discovery",
"java.util"
] | app.metatron.discovery; java.util; | 532,799 |
@Test
public void whenSetEmailThenItChanges() {
this.client.setEmail("test@test.ru");
assertThat(this.client.getEmail(), is("test@test.ru"));
} | void function() { this.client.setEmail(STR); assertThat(this.client.getEmail(), is(STR)); } | /**
* Test correctness of <code>setEmail</code> and <code>getEmail</code> method.
*/ | Test correctness of <code>setEmail</code> and <code>getEmail</code> method | whenSetEmailThenItChanges | {
"repo_name": "lightstar/job4j-clinic",
"path": "src/test/java/ru/lightstar/clinic/model/ClientTest.java",
"license": "gpl-3.0",
"size": 6010
} | [
"org.hamcrest.CoreMatchers",
"org.junit.Assert"
] | import org.hamcrest.CoreMatchers; import org.junit.Assert; | import org.hamcrest.*; import org.junit.*; | [
"org.hamcrest",
"org.junit"
] | org.hamcrest; org.junit; | 2,904,826 |
protected Group createGroup(
Composite textArea
, String name
, Control t_previous
, Control l_previous
, boolean toRight
, int height
, int width
, boolean toBottom) {
Group groupBody = new Group(textArea, SWT.NONE);
groupBody.setBackground(textArea.getBackground());
groupBody.setLayout(new ... | Group function( Composite textArea , String name , Control t_previous , Control l_previous , boolean toRight , int height , int width , boolean toBottom) { Group groupBody = new Group(textArea, SWT.NONE); groupBody.setBackground(textArea.getBackground()); groupBody.setLayout(new FormLayout()); groupBody.setText(" " + n... | /**
* Create a group for a text area
*
* @param textArea
* parent composite
* @param name
* of the group
* @param t_previous
* attached to top border
* @param l_previous
* attached to left border
* @param toRight
* should group reach right border of parent
*... | Create a group for a text area | createGroup | {
"repo_name": "RobotML/RobotML-SDK-Juno",
"path": "plugins/robotml/com.cea.papyrus.views.cpp/src/com/cea/papyrus/views/panels/CppAbstractPanel.java",
"license": "epl-1.0",
"size": 13556
} | [
"com.cea.papyrus.views.cpp.Activator",
"org.eclipse.swt.layout.FormAttachment",
"org.eclipse.swt.layout.FormData",
"org.eclipse.swt.layout.FormLayout",
"org.eclipse.swt.widgets.Composite",
"org.eclipse.swt.widgets.Control",
"org.eclipse.swt.widgets.Group"
] | import com.cea.papyrus.views.cpp.Activator; import org.eclipse.swt.layout.FormAttachment; import org.eclipse.swt.layout.FormData; import org.eclipse.swt.layout.FormLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Group; | import com.cea.papyrus.views.cpp.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; | [
"com.cea.papyrus",
"org.eclipse.swt"
] | com.cea.papyrus; org.eclipse.swt; | 449,002 |
private void notifySampleListeners(SampleEvent event) {
JMeterTreeModel treeModel = GuiPackage.getInstance().getTreeModel();
JMeterTreeNode myNode = treeModel.getNodeOf(this);
Enumeration<JMeterTreeNode> kids = myNode.children();
while (kids.hasMoreElements()) {
JMeterTre... | void function(SampleEvent event) { JMeterTreeModel treeModel = GuiPackage.getInstance().getTreeModel(); JMeterTreeNode myNode = treeModel.getNodeOf(this); Enumeration<JMeterTreeNode> kids = myNode.children(); while (kids.hasMoreElements()) { JMeterTreeNode subNode = kids.nextElement(); if (subNode.isEnabled()) { TestEl... | /**
* This will notify sample listeners directly within the Proxy of the
* sampling that just occured -- so that we have a means to record the
* server's responses as we go.
*
* @param event
* sampling event to be delivered
*/ | This will notify sample listeners directly within the Proxy of the sampling that just occured -- so that we have a means to record the server's responses as we go | notifySampleListeners | {
"repo_name": "DoctorQ/jmeter",
"path": "src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java",
"license": "apache-2.0",
"size": 64808
} | [
"java.util.Enumeration",
"org.apache.jmeter.gui.GuiPackage",
"org.apache.jmeter.gui.tree.JMeterTreeModel",
"org.apache.jmeter.gui.tree.JMeterTreeNode",
"org.apache.jmeter.samplers.SampleEvent",
"org.apache.jmeter.samplers.SampleListener",
"org.apache.jmeter.testelement.TestElement"
] | import java.util.Enumeration; import org.apache.jmeter.gui.GuiPackage; import org.apache.jmeter.gui.tree.JMeterTreeModel; import org.apache.jmeter.gui.tree.JMeterTreeNode; import org.apache.jmeter.samplers.SampleEvent; import org.apache.jmeter.samplers.SampleListener; import org.apache.jmeter.testelement.TestElement; | import java.util.*; import org.apache.jmeter.gui.*; import org.apache.jmeter.gui.tree.*; import org.apache.jmeter.samplers.*; import org.apache.jmeter.testelement.*; | [
"java.util",
"org.apache.jmeter"
] | java.util; org.apache.jmeter; | 2,328,257 |
private FileSystem createFileSystem(Principal user, String doAs)
throws IOException, FileSystemAccessException {
String hadoopUser = getEffectiveUser(user, doAs);
FileSystemAccess fsAccess =
HttpFSServerWebApp.get().get(FileSystemAccess.class);
Configuration conf = HttpFSServerWebApp.get().g... | FileSystem function(Principal user, String doAs) throws IOException, FileSystemAccessException { String hadoopUser = getEffectiveUser(user, doAs); FileSystemAccess fsAccess = HttpFSServerWebApp.get().get(FileSystemAccess.class); Configuration conf = HttpFSServerWebApp.get().get(FileSystemAccess.class) .getFileSystemCon... | /**
* Returns a filesystem instance. The fileystem instance is wired for release
* at the completion of
* the current Servlet request via the {@link FileSystemReleaseFilter}.
* <p/>
* If a do-as user is specified, the current user must be a valid proxyuser,
* otherwise an
* <code>AccessControlExcep... | Returns a filesystem instance. The fileystem instance is wired for release at the completion of the current Servlet request via the <code>FileSystemReleaseFilter</code>. If a do-as user is specified, the current user must be a valid proxyuser, otherwise an <code>AccessControlException</code> will be thrown | createFileSystem | {
"repo_name": "robzor92/hops",
"path": "hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSServer.java",
"license": "apache-2.0",
"size": 24367
} | [
"java.io.IOException",
"java.security.Principal",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.lib.service.FileSystemAccess",
"org.apache.hadoop.lib.service.FileSystemAccessException",
"org.apache.hadoop.lib.servlet.FileSystemReleaseFilter"
] | import java.io.IOException; import java.security.Principal; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.lib.service.FileSystemAccess; import org.apache.hadoop.lib.service.FileSystemAccessException; import org.apache.hadoop.lib.servlet.FileSystemReleaseFi... | import java.io.*; import java.security.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.lib.service.*; import org.apache.hadoop.lib.servlet.*; | [
"java.io",
"java.security",
"org.apache.hadoop"
] | java.io; java.security; org.apache.hadoop; | 397,063 |
public Point3 getCenter() {
Check.state(!isEmpty(),"bounding sphere is not empty");
Check.state(!isInfinite(),"bounding sphere is not infinite");
return new Point3(_x,_y,_z);
} | Point3 function() { Check.state(!isEmpty(),STR); Check.state(!isInfinite(),STR); return new Point3(_x,_y,_z); } | /**
* Gets the sphere center.
* @return the center.
*/ | Gets the sphere center | getCenter | {
"repo_name": "ctrueden/jtk",
"path": "src/main/java/edu/mines/jtk/sgl/BoundingSphere.java",
"license": "epl-1.0",
"size": 11899
} | [
"edu.mines.jtk.util.Check"
] | import edu.mines.jtk.util.Check; | import edu.mines.jtk.util.*; | [
"edu.mines.jtk"
] | edu.mines.jtk; | 2,688,013 |
public Layout.Alignment getTextAlign() {
return mTextAlignment;
} | Layout.Alignment function() { return mTextAlignment; } | /**
* Return the current text alignment setting
*/ | Return the current text alignment setting | getTextAlign | {
"repo_name": "wangkang0627/WordPress-Android",
"path": "WordPress/src/main/java/org/wordpress/android/widgets/TextDrawable.java",
"license": "gpl-2.0",
"size": 13698
} | [
"android.text.Layout"
] | import android.text.Layout; | import android.text.*; | [
"android.text"
] | android.text; | 2,556,795 |
public @Nonnull TopologyFilterOptions withTags(@Nonnull Map<String, String> tags) {
this.tags = tags;
return this;
} | @Nonnull TopologyFilterOptions function(@Nonnull Map<String, String> tags) { this.tags = tags; return this; } | /**
* Sets the tags to filter against.
* @param tags the tags to filter against
* @return this
*/ | Sets the tags to filter against | withTags | {
"repo_name": "OSS-TheWeatherCompany/dasein-cloud-core",
"path": "src/main/java/org/dasein/cloud/ci/TopologyFilterOptions.java",
"license": "apache-2.0",
"size": 5468
} | [
"java.util.Map",
"javax.annotation.Nonnull"
] | import java.util.Map; import javax.annotation.Nonnull; | import java.util.*; import javax.annotation.*; | [
"java.util",
"javax.annotation"
] | java.util; javax.annotation; | 636,998 |
EReference getExecutionRegion_Nodes(); | EReference getExecutionRegion_Nodes(); | /**
* Returns the meta object for the reference list '{@link org.yakindu.sct.model.sexec.ExecutionRegion#getNodes <em>Nodes</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Nodes</em>'.
* @see org.yakindu.sct.model.sexec.ExecutionRegion#getNodes()... | Returns the meta object for the reference list '<code>org.yakindu.sct.model.sexec.ExecutionRegion#getNodes Nodes</code>'. | getExecutionRegion_Nodes | {
"repo_name": "Yakindu/statecharts",
"path": "plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/SexecPackage.java",
"license": "epl-1.0",
"size": 168724
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 456,159 |
private static boolean isKeyValueArrayMethod(JSONObject mapJSON) {
if (mapJSON.has(RelevanceJSONConstants.KW_KEY) && mapJSON.has(RelevanceJSONConstants.KW_VALUE)) {
JSONArray keysList = mapJSON.optJSONArray(RelevanceJSONConstants.KW_KEY);
JSONArray valuesList = mapJSON.optJSONArray(RelevanceJSONConsta... | static boolean function(JSONObject mapJSON) { if (mapJSON.has(RelevanceJSONConstants.KW_KEY) && mapJSON.has(RelevanceJSONConstants.KW_VALUE)) { JSONArray keysList = mapJSON.optJSONArray(RelevanceJSONConstants.KW_KEY); JSONArray valuesList = mapJSON.optJSONArray(RelevanceJSONConstants.KW_VALUE); if (keysList != null && ... | /**
* check if in the JSON values part the map variable is represented in a json map way or two key and value json array;
* "JsonMapway":{"1":2.3, "2":3.4, "3":2.9} // A user input hashmap;
* "KeyValueJsonArrayPairWay":{"key":[1,2,3], "value":[2.3, 3.4, 2.9]} // It also supports this met... | check if in the JSON values part the map variable is represented in a json map way or two key and value json array; "JsonMapway":{"1":2.3, "2":3.4, "3":2.9} // A user input hashmap; "KeyValueJsonArrayPairWay":{"key":[1,2,3], "value":[2.3, 3.4, 2.9]} // It also supports this method to pass in a map | isKeyValueArrayMethod | {
"repo_name": "senseidb/sensei",
"path": "sensei-core/src/main/java/com/senseidb/search/relevance/impl/CompilationHelper.java",
"license": "apache-2.0",
"size": 49877
} | [
"org.json.JSONArray",
"org.json.JSONObject"
] | import org.json.JSONArray; import org.json.JSONObject; | import org.json.*; | [
"org.json"
] | org.json; | 122,092 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.