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.SINGLE)
public void deleteMessage(String chatMessageId) {
this.client.deleteMessage(chatMessageId).block();
} | @ServiceMethod(returns = ReturnType.SINGLE) void function(String chatMessageId) { this.client.deleteMessage(chatMessageId).block(); } | /**
* Deletes a message.
*
* @param chatMessageId The message id.
* @throws ChatErrorResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/ | Deletes a message | deleteMessage | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/communication/azure-communication-chat/src/main/java/com/azure/communication/chat/ChatThreadClient.java",
"license": "mit",
"size": 21369
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; | import com.azure.core.annotation.*; | [
"com.azure.core"
] | com.azure.core; | 1,110,288 |
@Override
protected void onActivityResult(int requestCode, int responseCode, Intent intent) {
updateConnectButtonState();
if (requestCode == OUR_REQUEST_CODE && responseCode == RESULT_OK) {
// If we have a successful result, we will want to be able to resolve any further
... | void function(int requestCode, int responseCode, Intent intent) { updateConnectButtonState(); if (requestCode == OUR_REQUEST_CODE && responseCode == RESULT_OK) { mAutoResolveOnFail = true; initiatePlusClientConnect(); } else if (requestCode == OUR_REQUEST_CODE && responseCode != RESULT_OK) { setProgressBarVisible(false... | /**
* An earlier connection failed, and we're now receiving the result of the resolution attempt
* by PlusClient.
*
* @see #onConnectionFailed(ConnectionResult)
*/ | An earlier connection failed, and we're now receiving the result of the resolution attempt by PlusClient | onActivityResult | {
"repo_name": "fouchimi/WorkshopApp",
"path": "app/src/main/java/example/com/workshopapp/PlusBaseActivity.java",
"license": "unlicense",
"size": 9970
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 218,335 |
@Test
public void testDIRSERVER_1183() throws Exception
{
LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
Attributes attrs = new BasicAttributes( "objectClass", "inetOrgPerson", true );
attrs.get( "objectClass" ).add( "organizationalPerson" );
... | void function() throws Exception { LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE ); Attributes attrs = new BasicAttributes( STR, STR, true ); attrs.get( STR ).add( STR ); attrs.get( STR ).add( STR ); attrs.put( STR, "Jim" ); attrs.put( "sn", "Bean" ); attrs.put( "cn", STR ); DirConte... | /**
* Test for DIRSERVER-1183.
*
* @see https://issues.apache.org/jira/browse/DIRSERVER-1183
* @throws Exception
*/ | Test for DIRSERVER-1183 | testDIRSERVER_1183 | {
"repo_name": "lucastheisen/apache-directory-server",
"path": "server-integ/src/test/java/org/apache/directory/server/operations/ldapsdk/AddIT.java",
"license": "apache-2.0",
"size": 56338
} | [
"javax.naming.directory.Attributes",
"javax.naming.directory.BasicAttributes",
"javax.naming.directory.DirContext",
"javax.naming.ldap.LdapContext",
"org.apache.directory.server.integ.ServerIntegrationUtils",
"org.junit.Assert"
] | import javax.naming.directory.Attributes; import javax.naming.directory.BasicAttributes; import javax.naming.directory.DirContext; import javax.naming.ldap.LdapContext; import org.apache.directory.server.integ.ServerIntegrationUtils; import org.junit.Assert; | import javax.naming.directory.*; import javax.naming.ldap.*; import org.apache.directory.server.integ.*; import org.junit.*; | [
"javax.naming",
"org.apache.directory",
"org.junit"
] | javax.naming; org.apache.directory; org.junit; | 1,258,260 |
protected void merge() {
if (mParent != null && mParent.canMerge()) {
mParent.merge();
} else {
if (mSplit) {
for (int i = 0; i < CHILD_COUNT; ++i) {
//Add all the members of all the children
ArrayList<IGraphNodeMember> members = mChildren[i].getAllMembersRecursively(false);
int members_... | void function() { if (mParent != null && mParent.canMerge()) { mParent.merge(); } else { if (mSplit) { for (int i = 0; i < CHILD_COUNT; ++i) { ArrayList<IGraphNodeMember> members = mChildren[i].getAllMembersRecursively(false); int members_count = members.size(); for (int j = 0; j < members_count; ++j) { addToMembers(me... | /**
* Merges this child nodes into their parent node.
*/ | Merges this child nodes into their parent node | merge | {
"repo_name": "paoloach/zdomus",
"path": "temperature_monitor/opengl/src/main/java/it/achdjian/paolo/opengl/scenegraph/A_nAABBTree.java",
"license": "gpl-2.0",
"size": 26993
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,272,945 |
public BigInteger validate(String value, String pattern) {
return (BigInteger)parse(value, pattern, (Locale)null);
} | BigInteger function(String value, String pattern) { return (BigInteger)parse(value, pattern, (Locale)null); } | /**
* <p>Validate/convert a <code>BigInteger</code> using the
* specified <i>pattern</i>.
*
* @param value The value validation is being performed on.
* @param pattern The pattern used to validate the value against.
* @return The parsed <code>BigInteger</code> if valid or <code>null</co... | Validate/convert a <code>BigInteger</code> using the specified pattern | validate | {
"repo_name": "apache/commons-validator",
"path": "src/main/java/org/apache/commons/validator/routines/BigIntegerValidator.java",
"license": "apache-2.0",
"size": 8428
} | [
"java.math.BigInteger",
"java.util.Locale"
] | import java.math.BigInteger; import java.util.Locale; | import java.math.*; import java.util.*; | [
"java.math",
"java.util"
] | java.math; java.util; | 1,510,299 |
if (TextUtils.isEmpty(signedData) || TextUtils.isEmpty(base64PublicKey) ||
TextUtils.isEmpty(signature)) {
Log.e(TAG, "Purchase verification failed: missing data.");
return false;
}
PublicKey key = Security.generatePublicKey(base64PublicKey);
return Secur... | if (TextUtils.isEmpty(signedData) TextUtils.isEmpty(base64PublicKey) TextUtils.isEmpty(signature)) { Log.e(TAG, STR); return false; } PublicKey key = Security.generatePublicKey(base64PublicKey); return Security.verify(key, signedData, signature); } | /**
* Verifies that the data was signed with the given signature, and returns
* the verified purchase. The data is in JSON format and signed
* with a private key. The data also contains the {@link PurchaseState}
* and product ID of the purchase.
*
* @param base64PublicKey the base64-encode... | Verifies that the data was signed with the given signature, and returns the verified purchase. The data is in JSON format and signed with a private key. The data also contains the <code>PurchaseState</code> and product ID of the purchase | verifyPurchase | {
"repo_name": "0359xiaodong/turbo-editor",
"path": "libraries/sharedCode/src/main/java/sharedcode/turboeditor/iab/utils/Security.java",
"license": "gpl-3.0",
"size": 5118
} | [
"android.text.TextUtils",
"android.util.Log",
"java.security.PublicKey"
] | import android.text.TextUtils; import android.util.Log; import java.security.PublicKey; | import android.text.*; import android.util.*; import java.security.*; | [
"android.text",
"android.util",
"java.security"
] | android.text; android.util; java.security; | 2,795,295 |
public Properties toProperties() {
return ConfigurationConverter.getProperties(this);
} | Properties function() { return ConfigurationConverter.getProperties(this); } | /**
* Converts this configuration to a property map.
*
* @return this configuration as a property map
*/ | Converts this configuration to a property map | toProperties | {
"repo_name": "sprylab/webinloop",
"path": "webinloop/src/main/java/com/sprylab/webinloop/WiLConfiguration.java",
"license": "lgpl-3.0",
"size": 17924
} | [
"java.util.Properties",
"org.apache.commons.configuration.ConfigurationConverter"
] | import java.util.Properties; import org.apache.commons.configuration.ConfigurationConverter; | import java.util.*; import org.apache.commons.configuration.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 500,517 |
public static <T extends OWLAxiom> int handleAxiomCount2(
AxiomType<T> axType, Imports imports,
OWLOntology ontology, Annotation annotation) {
return FilteringHelperAxiomCount.handleAxiomCount2(axType, imports, ontology, annotation);
}
| static <T extends OWLAxiom> int function( AxiomType<T> axType, Imports imports, OWLOntology ontology, Annotation annotation) { return FilteringHelperAxiomCount.handleAxiomCount2(axType, imports, ontology, annotation); } | /**
* count axioms of this type associated with current aspects in this ontology
* optionally including axioms
*
* @param <T>
* type extending OWLAxiom
* @param axType
* Axiom type
* @param imports
* info whether to include imports
* @param ontology
* ontology to check
* @param an... | count axioms of this type associated with current aspects in this ontology optionally including axioms | handleAxiomCount2 | {
"repo_name": "ag-csw/aspect-owlapi",
"path": "src/main/java/de/fuberlin/csw/aood/owlapi/helpers/HelperFacade.java",
"license": "gpl-3.0",
"size": 14829
} | [
"java.lang.annotation.Annotation",
"org.semanticweb.owlapi.model.AxiomType",
"org.semanticweb.owlapi.model.OWLAxiom",
"org.semanticweb.owlapi.model.OWLOntology",
"org.semanticweb.owlapi.model.parameters.Imports"
] | import java.lang.annotation.Annotation; import org.semanticweb.owlapi.model.AxiomType; import org.semanticweb.owlapi.model.OWLAxiom; import org.semanticweb.owlapi.model.OWLOntology; import org.semanticweb.owlapi.model.parameters.Imports; | import java.lang.annotation.*; import org.semanticweb.owlapi.model.*; import org.semanticweb.owlapi.model.parameters.*; | [
"java.lang",
"org.semanticweb.owlapi"
] | java.lang; org.semanticweb.owlapi; | 2,371,114 |
private void showUndoCloseAllBar(List<Integer> closedTabIds) {
String content = String.format(Locale.getDefault(), "%d", closedTabIds.size());
mSnackbarManager.showSnackbar(Snackbar.make(content, this)
.setTemplateText(mContext.getString(R.string.undo_bar_close_all_message))
... | void function(List<Integer> closedTabIds) { String content = String.format(Locale.getDefault(), "%d", closedTabIds.size()); mSnackbarManager.showSnackbar(Snackbar.make(content, this) .setTemplateText(mContext.getString(R.string.undo_bar_close_all_message)) .setAction(mContext.getString(R.string.undo_bar_button_text), c... | /**
* Shows an undo close all bar. Based on user actions, this will cause a call to either
* {@link TabModel#commitTabClosure(int)} or {@link TabModel#cancelTabClosure(int)} to be called
* for each tab in {@code closedTabIds}. This will happen unless
* {@code SnackbarManager#removeFromStackForData(O... | Shows an undo close all bar. Based on user actions, this will cause a call to either <code>TabModel#commitTabClosure(int)</code> or <code>TabModel#cancelTabClosure(int)</code> to be called for each tab in closedTabIds. This will happen unless SnackbarManager#removeFromStackForData(Object) is called | showUndoCloseAllBar | {
"repo_name": "Chilledheart/chromium",
"path": "chrome/android/java/src/org/chromium/chrome/browser/snackbar/undo/UndoBarPopupController.java",
"license": "bsd-3-clause",
"size": 8548
} | [
"java.util.List",
"java.util.Locale",
"org.chromium.chrome.browser.snackbar.Snackbar"
] | import java.util.List; import java.util.Locale; import org.chromium.chrome.browser.snackbar.Snackbar; | import java.util.*; import org.chromium.chrome.browser.snackbar.*; | [
"java.util",
"org.chromium.chrome"
] | java.util; org.chromium.chrome; | 137,439 |
@Override
protected void addInputValidation() {
srcPort.setTextFormatter(Util.getNumberFilter(5));
dstPort.setTextFormatter(Util.getNumberFilter(5));
length.setTextFormatter(Util.getNumberFilter(5));
} | void function() { srcPort.setTextFormatter(Util.getNumberFilter(5)); dstPort.setTextFormatter(Util.getNumberFilter(5)); length.setTextFormatter(Util.getNumberFilter(5)); } | /**
* add input field validation
*/ | add input field validation | addInputValidation | {
"repo_name": "cisco-system-traffic-generator/trex-stateless-gui",
"path": "src/main/java/com/exalttech/trex/ui/views/streams/builder/UDPProtocolView.java",
"license": "apache-2.0",
"size": 4096
} | [
"com.exalttech.trex.util.Util"
] | import com.exalttech.trex.util.Util; | import com.exalttech.trex.util.*; | [
"com.exalttech.trex"
] | com.exalttech.trex; | 1,025,487 |
private JLabel getplayerOneScoreLabel() {
if (playerOneScoreLabel == null) {
playerOneScoreLabel = new JLabel("Choose a New Game");
playerOneScoreLabel.setFont(new Font("Lucida Grande", Font.PLAIN, 16));
playerOneScoreLabel.setBounds(54, 382, 161, 50);
}
return playerOneScoreLabel;
}
| JLabel function() { if (playerOneScoreLabel == null) { playerOneScoreLabel = new JLabel(STR); playerOneScoreLabel.setFont(new Font(STR, Font.PLAIN, 16)); playerOneScoreLabel.setBounds(54, 382, 161, 50); } return playerOneScoreLabel; } | /**
* Gets the player one score label.
*
* @return the player one score label
*/ | Gets the player one score label | getplayerOneScoreLabel | {
"repo_name": "raga007/Blackjack",
"path": "src/GameEngineTwoPlayer.java",
"license": "mit",
"size": 25752
} | [
"java.awt.Font",
"javax.swing.JLabel"
] | import java.awt.Font; import javax.swing.JLabel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,850,845 |
public Object[] listMapsForOrg(User loggedInUser) {
return ChannelFactory.listAllDistChannelMapsByOrg(loggedInUser.getOrg()).toArray();
} | Object[] function(User loggedInUser) { return ChannelFactory.listAllDistChannelMapsByOrg(loggedInUser.getOrg()).toArray(); } | /**
* Lists distribution channel maps valid for the user's organization
* @param loggedInUser The current user
* @return List of dist channel maps
*
* @xmlrpc.doc Lists distribution channel maps valid for the user's organization
* @xmlrpc.param #session_key()
* @xmlrpc.returntype
... | Lists distribution channel maps valid for the user's organization | listMapsForOrg | {
"repo_name": "xkollar/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/distchannel/DistChannelHandler.java",
"license": "gpl-2.0",
"size": 6142
} | [
"com.redhat.rhn.domain.channel.ChannelFactory",
"com.redhat.rhn.domain.user.User"
] | import com.redhat.rhn.domain.channel.ChannelFactory; import com.redhat.rhn.domain.user.User; | import com.redhat.rhn.domain.channel.*; import com.redhat.rhn.domain.user.*; | [
"com.redhat.rhn"
] | com.redhat.rhn; | 2,892,951 |
public CaptureRequest.Builder createCaptureRequest(int template) throws CameraAccessException {
CameraDevice device = mCameraDevice;
if (device == null) {
throw new IllegalStateException("Can't get requests when no camera is open");
}
return device.createCaptureRequest(te... | CaptureRequest.Builder function(int template) throws CameraAccessException { CameraDevice device = mCameraDevice; if (device == null) { throw new IllegalStateException(STR); } return device.createCaptureRequest(template); } | /**
* Get a request builder for the current camera.
*/ | Get a request builder for the current camera | createCaptureRequest | {
"repo_name": "android/camera-samples",
"path": "HdrViewfinder/Application/src/main/java/com/example/android/hdrviewfinder/CameraOps.java",
"license": "apache-2.0",
"size": 9764
} | [
"android.hardware.camera2.CameraAccessException",
"android.hardware.camera2.CameraDevice",
"android.hardware.camera2.CaptureRequest"
] | import android.hardware.camera2.CameraAccessException; import android.hardware.camera2.CameraDevice; import android.hardware.camera2.CaptureRequest; | import android.hardware.camera2.*; | [
"android.hardware"
] | android.hardware; | 1,737,653 |
public static void setDisableCachingHttpHeaders(HttpServletRequest oRequest,
HttpServletResponse oResponse)
{
if (oRequest.getProtocol().equalsIgnoreCase("HTTP/1.0"))
{
oResponse.setHeader("Pragma", "no-cache");
}
else if (oRequest.getProtocol().equalsI... | static void function(HttpServletRequest oRequest, HttpServletResponse oResponse) { if (oRequest.getProtocol().equalsIgnoreCase(STR)) { oResponse.setHeader(STR, STR); } else if (oRequest.getProtocol().equalsIgnoreCase(STR)) { oResponse.setHeader(STR, STR); } oResponse.setHeader(STR, "-1"); } | /**
* Disable the HTTP 1.0 and HTTP 1.1 caching.
*
* Sets the following headers in the response:
* <ul>
* <li>protocol 'HTTP/1.0': Pragma: no-cache</li>
* <li>protocol 'HTTP/1.1': Cache-Control: no-store, no-cache, must-revalidate</li>
* <li>protocol independant: Expires: -... | Disable the HTTP 1.0 and HTTP 1.1 caching. Sets the following headers in the response: protocol 'HTTP/1.0': Pragma: no-cache protocol 'HTTP/1.1': Cache-Control: no-store, no-cache, must-revalidate protocol independant: Expires: -1 | setDisableCachingHttpHeaders | {
"repo_name": "GluuFederation/gluu-Asimba",
"path": "asimba-utility/src/main/java/com/alfaariss/oa/util/web/HttpUtils.java",
"license": "agpl-3.0",
"size": 4297
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 2,437,793 |
SetupEncryptionDialogFragment fragment = new SetupEncryptionDialogFragment();
Bundle args = new Bundle();
args.putParcelable(ARG_ACCOUNT, account);
args.putInt(ARG_POSITION, position);
fragment.setArguments(args);
return fragment;
} | SetupEncryptionDialogFragment fragment = new SetupEncryptionDialogFragment(); Bundle args = new Bundle(); args.putParcelable(ARG_ACCOUNT, account); args.putInt(ARG_POSITION, position); fragment.setArguments(args); return fragment; } | /**
* Public factory method to create new SetupEncryptionDialogFragment instance
*
* @return Dialog ready to show.
*/ | Public factory method to create new SetupEncryptionDialogFragment instance | newInstance | {
"repo_name": "jsargent7089/android",
"path": "src/main/java/com/owncloud/android/ui/dialog/SetupEncryptionDialogFragment.java",
"license": "gpl-2.0",
"size": 18285
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 1,091,153 |
@Test
public void testWildcardKeys() {
Processor top = new Processor();
top.setProperty("a.3", "a.3");
top.setProperty("a.1", "a.1");
top.setProperty("a.2", "a.2");
top.setProperty("a.4", "a.4");
top.setProperty("aa", "${a.*}");
assertEquals("a.1,a.2,a.3,a.4", top.getProperty("a.*"));
assertEquals("... | void function() { Processor top = new Processor(); top.setProperty("a.3", "a.3"); top.setProperty("a.1", "a.1"); top.setProperty("a.2", "a.2"); top.setProperty("a.4", "a.4"); top.setProperty("aa", STR); assertEquals(STR, top.getProperty("a.*")); assertEquals(STR, top.getProperty("aa")); } | /**
* Test the combine macro that groups properties
*/ | Test the combine macro that groups properties | testWildcardKeys | {
"repo_name": "psoreide/bnd",
"path": "biz.aQute.bndlib.tests/test/test/MacroTest.java",
"license": "apache-2.0",
"size": 62632
} | [
"org.junit.jupiter.api.Assertions"
] | import org.junit.jupiter.api.Assertions; | import org.junit.jupiter.api.*; | [
"org.junit.jupiter"
] | org.junit.jupiter; | 1,811,210 |
@Test
public void testMultipleTimestampsInSingleDelete() throws Exception {
HTable primary = createSetupTables(fam1);
// do a put to the primary table
Put p = new Put(row1);
long ts1 = 10, ts2 = 11, ts3 = 12;
p.add(FAM, indexed_qualifer, ts1, value1);
// our group indexes all columns in the... | void function() throws Exception { HTable primary = createSetupTables(fam1); Put p = new Put(row1); long ts1 = 10, ts2 = 11, ts3 = 12; p.add(FAM, indexed_qualifer, ts1, value1); p.add(FAM2, regular_qualifer, ts2, value3); primary.put(p); primary.flushCommits(); HTable index1 = new HTable(UTIL.getConfiguration(), fam1.g... | /**
* Similar to the {@link #testMultipleTimestampsInSinglePut()}, this check the same with deletes
* @throws Exception on failure
*/ | Similar to the <code>#testMultipleTimestampsInSinglePut()</code>, this check the same with deletes | testMultipleTimestampsInSingleDelete | {
"repo_name": "pboado/phoenix-for-cloudera",
"path": "phoenix-core/src/it/java/org/apache/phoenix/hbase/index/covered/example/EndToEndCoveredIndexingIT.java",
"license": "apache-2.0",
"size": 36129
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"org.apache.hadoop.hbase.HConstants",
"org.apache.hadoop.hbase.KeyValue",
"org.apache.hadoop.hbase.client.Delete",
"org.apache.hadoop.hbase.client.HTable",
"org.apache.hadoop.hbase.client.Put",
"org.apache.hadoop.hbase.util.Pair",
"... | import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.client.Delete; import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.client.Put; import org.apache.ha... | import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*; import org.apache.phoenix.hbase.index.*; | [
"java.util",
"org.apache.hadoop",
"org.apache.phoenix"
] | java.util; org.apache.hadoop; org.apache.phoenix; | 735,184 |
public void setAllow(XSBooleanValue allow); | void function(XSBooleanValue allow); | /**
* Sets the wst:Renewing/@Allow attribute value.
*
* @param allow the Allow attribute value.
*/ | Sets the wst:Renewing/@Allow attribute value | setAllow | {
"repo_name": "lamsfoundation/lams",
"path": "3rdParty_sources/openws/org/opensaml/ws/wstrust/Renewing.java",
"license": "gpl-2.0",
"size": 3179
} | [
"org.opensaml.xml.schema.XSBooleanValue"
] | import org.opensaml.xml.schema.XSBooleanValue; | import org.opensaml.xml.schema.*; | [
"org.opensaml.xml"
] | org.opensaml.xml; | 2,078,248 |
public void delete(java.lang.Integer id, Session s)
throws org.hibernate.HibernateException {
delete((Object) load(id, s), s);
}
| void function(java.lang.Integer id, Session s) throws org.hibernate.HibernateException { delete((Object) load(id, s), s); } | /**
* Remove a persistent instance from the datastore. The argument may be an instance associated with the receiving
* Session or a transient instance with an identifier associated with existing persistent state.
* Use the Session given.
* @param id the instance ID to be removed
* @param s the Session
... | Remove a persistent instance from the datastore. The argument may be an instance associated with the receiving Session or a transient instance with an identifier associated with existing persistent state. Use the Session given | delete | {
"repo_name": "meyerdg/floreant",
"path": "src/com/floreantpos/model/dao/BaseUserDAO.java",
"license": "gpl-2.0",
"size": 7944
} | [
"org.hibernate.Session"
] | import org.hibernate.Session; | import org.hibernate.*; | [
"org.hibernate"
] | org.hibernate; | 501,230 |
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller<PollResult<Void>, Void> beginManualFailover(
String iotHubName, String resourceGroupName, FailoverInput failoverInput, Context context) {
return beginManualFailoverAsync(iotHubName, resourceGroupName, failoverInput, co... | @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<Void>, Void> function( String iotHubName, String resourceGroupName, FailoverInput failoverInput, Context context) { return beginManualFailoverAsync(iotHubName, resourceGroupName, failoverInput, context).getSyncPoller(); } | /**
* Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see
* https://aka.ms/manualfailover.
*
* @param iotHubName Name of the IoT hub to failover.
* @param resourceGroupName Name of the resource group containing the IoT hub resource.
* @param failoverInp... | Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see HREF | beginManualFailover | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubsClientImpl.java",
"license": "mit",
"size": 19154
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.Context",
"com.azure.core.util.polling.SyncPoller",
"com.azure.resourcemanager.iothub.models.FailoverInput"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.iothub.models.FailoverInput; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.iothub.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,362,551 |
private String chooseClientAliasForKey(String preferredAlias, String keyType, Principal[] issuers, Socket socket)
{
String[] aliases = getClientAliases(keyType, issuers);
if (aliases != null && aliases.length > 0) {
for (int i=0; i<aliases.length;i++) {
if (preferredAlias.equals(aliases[i])) {
retu... | String function(String preferredAlias, String keyType, Principal[] issuers, Socket socket) { String[] aliases = getClientAliases(keyType, issuers); if (aliases != null && aliases.length > 0) { for (int i=0; i<aliases.length;i++) { if (preferredAlias.equals(aliases[i])) { return aliases[i]; } } } return null; } | /**
* Attempts to find a keystore
* @param keyType
* @param issuers
* @param socket
* @return
*/ | Attempts to find a keystore | chooseClientAliasForKey | {
"repo_name": "oehf/ipf-oht-atna",
"path": "nodeauth/src/main/java/org/openhealthtools/ihe/atna/nodeauth/utils/AliasSensitiveX509KeyManager.java",
"license": "epl-1.0",
"size": 4637
} | [
"java.net.Socket",
"java.security.Principal"
] | import java.net.Socket; import java.security.Principal; | import java.net.*; import java.security.*; | [
"java.net",
"java.security"
] | java.net; java.security; | 740,145 |
public static double maxScale(final FeatureTypeStyle fts) {
if (fts == null || fts.rules().size() == 0) { return Double.NaN; }
final Rule r = fts.rules().get(0);
return r.getMaxScaleDenominator();
}
public static final String GENERIC_FEATURE_TYPENAME = "Feature"; | static double function(final FeatureTypeStyle fts) { if (fts == null fts.rules().size() == 0) { return Double.NaN; } final Rule r = fts.rules().get(0); return r.getMaxScaleDenominator(); } public static final String GENERIC_FEATURE_TYPENAME = STR; | /**
* Returns the max scale of the default rule, or Double#NaN if none is set
*/ | Returns the max scale of the default rule, or Double#NaN if none is set | maxScale | {
"repo_name": "gama-platform/gama",
"path": "ummisco.gama.ui.viewers/src/ummisco/gama/ui/viewers/gis/geotools/styling/SLDs.java",
"license": "gpl-3.0",
"size": 8144
} | [
"org.geotools.styling.FeatureTypeStyle",
"org.geotools.styling.Rule"
] | import org.geotools.styling.FeatureTypeStyle; import org.geotools.styling.Rule; | import org.geotools.styling.*; | [
"org.geotools.styling"
] | org.geotools.styling; | 1,132,709 |
@Test
public void testIsLocallyRenderableWithLazyLoadedFacet() throws QuickFixException {
DefDescriptor<ComponentDef> facetDesc = addSourceAutoCleanup(ComponentDef.class,
"<aura:component> <aura:text aura:load='LAZY'/></aura:component>");
T baseComponentDef = define(baseTag, "", ... | void function() throws QuickFixException { DefDescriptor<ComponentDef> facetDesc = addSourceAutoCleanup(ComponentDef.class, STR); T baseComponentDef = define(baseTag, STR<%s/>STRRendering detection logic is not on.STRWhen a component has a inner component set to lazy load, the parent should be rendered clientside.", ba... | /**
* isLocallyRenderable is false when a facet of a component has a component marked for LAZY loading, the component
* should always be rendered client side. Test method for {@link BaseComponentDef#isLocallyRenderable()}.
*/ | isLocallyRenderable is false when a facet of a component has a component marked for LAZY loading, the component should always be rendered client side. Test method for <code>BaseComponentDef#isLocallyRenderable()</code> | testIsLocallyRenderableWithLazyLoadedFacet | {
"repo_name": "madmax983/aura",
"path": "aura-impl/src/test/java/org/auraframework/impl/root/component/BaseComponentDefTest.java",
"license": "apache-2.0",
"size": 103783
} | [
"org.auraframework.def.ComponentDef",
"org.auraframework.def.DefDescriptor",
"org.auraframework.throwable.quickfix.QuickFixException"
] | import org.auraframework.def.ComponentDef; import org.auraframework.def.DefDescriptor; import org.auraframework.throwable.quickfix.QuickFixException; | import org.auraframework.def.*; import org.auraframework.throwable.quickfix.*; | [
"org.auraframework.def",
"org.auraframework.throwable"
] | org.auraframework.def; org.auraframework.throwable; | 248,251 |
public String getUnixSymlink(ZipArchiveEntry entry) throws IOException {
if (entry != null && entry.isUnixSymlink()) {
InputStream in = null;
try {
in = getInputStream(entry);
byte[] symlinkBytes = IOUtils.toByteArray(in);
return zipEnc... | String function(ZipArchiveEntry entry) throws IOException { if (entry != null && entry.isUnixSymlink()) { InputStream in = null; try { in = getInputStream(entry); byte[] symlinkBytes = IOUtils.toByteArray(in); return zipEncoding.decode(symlinkBytes); } finally { if (in != null) { in.close(); } } } else { return null; }... | /**
* <p>
* Convenience method to return the entry's content as a String if isUnixSymlink()
* returns true for it, otherwise returns null.
* </p>
*
* <p>This method assumes the symbolic link's file name uses the
* same encoding that as been specified for this ZipFile.</p>
*
... | Convenience method to return the entry's content as a String if isUnixSymlink() returns true for it, otherwise returns null. This method assumes the symbolic link's file name uses the same encoding that as been specified for this ZipFile | getUnixSymlink | {
"repo_name": "eugenegardner/tenXMEIPolisher",
"path": "src/org/apache/commons/compress/archivers/zip/ZipFile.java",
"license": "gpl-3.0",
"size": 39314
} | [
"java.io.IOException",
"java.io.InputStream",
"org.apache.commons.compress.utils.IOUtils"
] | import java.io.IOException; import java.io.InputStream; import org.apache.commons.compress.utils.IOUtils; | import java.io.*; import org.apache.commons.compress.utils.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 1,350,229 |
public static String getText(String docPath, String mimeType, String encoding, InputStream isContent)
throws IOException {
log.debug("getText({}, {}, {}, {})", new Object[] { docPath, mimeType, encoding, isContent });
long begin = System.currentTimeMillis();
String failureMessage = "Unknown error";
boole... | static String function(String docPath, String mimeType, String encoding, InputStream isContent) throws IOException { log.debug(STR, new Object[] { docPath, mimeType, encoding, isContent }); long begin = System.currentTimeMillis(); String failureMessage = STR; boolean failure = false; String text = null; try { text = ge... | /**
* Extract text to be indexed
*/ | Extract text to be indexed | getText | {
"repo_name": "papamas/DMS-KANGREG-XI-MANADO",
"path": "src/main/java/com/openkm/extractor/RegisteredExtractors.java",
"license": "gpl-3.0",
"size": 9826
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,719,991 |
private EClass getMappedEClass(Type type) {
EClass res = null;
if (type != null) {
// retrieve from currently converted kinds
res = occiKind2emfEclass.get(type);
if (res == null) {
// retrieve from installed extensions.
EPackage p = ConverterUtils.getEPackage(type);
res = (EClass) p.getEClas... | EClass function(Type type) { EClass res = null; if (type != null) { res = occiKind2emfEclass.get(type); if (res == null) { EPackage p = ConverterUtils.getEPackage(type); res = (EClass) p.getEClassifier(ConverterUtils.toU1Case(ConverterUtils.formatName(type.getTerm()))); occiKind2emfEclass.put(type, res); } } return res... | /**
* Get the EClass associated to an OCCI Kind.
*
* @param kind the given OCCI kind.
* @return the EClass.
*/ | Get the EClass associated to an OCCI Kind | getMappedEClass | {
"repo_name": "occiware/OCCI-Studio",
"path": "plugins/org.eclipse.cmf.occi.core.gen.emf/src/org/eclipse/cmf/occi/core/gen/emf/OCCIExtension2Ecore.java",
"license": "epl-1.0",
"size": 35427
} | [
"java.util.HashMap",
"java.util.Map",
"org.eclipse.cmf.occi.core.DataType",
"org.eclipse.cmf.occi.core.Type",
"org.eclipse.emf.ecore.EClass",
"org.eclipse.emf.ecore.EClassifier",
"org.eclipse.emf.ecore.EPackage"
] | import java.util.HashMap; import java.util.Map; import org.eclipse.cmf.occi.core.DataType; import org.eclipse.cmf.occi.core.Type; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EClassifier; import org.eclipse.emf.ecore.EPackage; | import java.util.*; import org.eclipse.cmf.occi.core.*; import org.eclipse.emf.ecore.*; | [
"java.util",
"org.eclipse.cmf",
"org.eclipse.emf"
] | java.util; org.eclipse.cmf; org.eclipse.emf; | 1,020,559 |
public List<JSONObject> getArticlesByArchiveDate(final String archiveDateId, final int currentPageNum,
final int pageSize) throws ServiceException {
try {
JSONObject result = archiveDateArticleDao.getByArchiveDateId(archiveDateId, currentPageNum, pageSize);
final JSONArray relations = result.getJSONArray... | List<JSONObject> function(final String archiveDateId, final int currentPageNum, final int pageSize) throws ServiceException { try { JSONObject result = archiveDateArticleDao.getByArchiveDateId(archiveDateId, currentPageNum, pageSize); final JSONArray relations = result.getJSONArray(Keys.RESULTS); if (0 == relations.len... | /**
* Gets a list of published articles with the specified archive date id,
* current page number and page size.
*
* @param archiveDateId
* the specified archive date id
* @param currentPageNum
* the specified current page number
* @param pageSize
* the specified page ... | Gets a list of published articles with the specified archive date id, current page number and page size | getArticlesByArchiveDate | {
"repo_name": "daima/solo-spring",
"path": "src/main/java/org/b3log/solo/service/ArticleQueryService.java",
"license": "apache-2.0",
"size": 41220
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.Date",
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"org.b3log.solo.Keys",
"org.b3log.solo.dao.repository.FilterOperator",
"org.b3log.solo.dao.repository.PropertyFilter",
"org.b3log.solo.dao.repository.Query",
"org.b3log.solo.... | import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.HashSet; import java.util.List; import java.util.Set; import org.b3log.solo.Keys; import org.b3log.solo.dao.repository.FilterOperator; import org.b3log.solo.dao.repository.PropertyFilter; import org.b3log.solo.dao.reposito... | import java.util.*; import org.b3log.solo.*; import org.b3log.solo.dao.repository.*; import org.b3log.solo.model.*; import org.json.*; | [
"java.util",
"org.b3log.solo",
"org.json"
] | java.util; org.b3log.solo; org.json; | 2,680,161 |
EClass getBoundingBoxType(); | EClass getBoundingBoxType(); | /**
* Returns the meta object for class '{@link net.opengis.ows11.BoundingBoxType <em>Bounding Box Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Bounding Box Type</em>'.
* @see net.opengis.ows11.BoundingBoxType
* @generated
*/ | Returns the meta object for class '<code>net.opengis.ows11.BoundingBoxType Bounding Box Type</code>'. | getBoundingBoxType | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.ows/src/net/opengis/ows11/Ows11Package.java",
"license": "lgpl-2.1",
"size": 292282
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,256,795 |
private boolean normalizeAttrValue(XMLAttributes attributes, int index) {
// vars
boolean leadingSpace = true;
boolean spaceStart = false;
boolean readingNonSpace = false;
int count = 0;
int eaten = 0;
String attrValue = attributes.getValue(index);
cha... | boolean function(XMLAttributes attributes, int index) { boolean leadingSpace = true; boolean spaceStart = false; boolean readingNonSpace = false; int count = 0; int eaten = 0; String attrValue = attributes.getValue(index); char[] attValue = new char[attrValue.length()]; fBuffer.setLength(0); attrValue.getChars(0, attrV... | /**
* Normalize the attribute value of a non CDATA attributes collapsing
* sequences of space characters (x20)
*
* @param attributes The list of attributes
* @param index The index of the attribute to normalize
*/ | Normalize the attribute value of a non CDATA attributes collapsing sequences of space characters (x20) | normalizeAttrValue | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDValidator.java",
"license": "apache-2.0",
"size": 84048
} | [
"com.sun.org.apache.xerces.internal.xni.XMLAttributes"
] | import com.sun.org.apache.xerces.internal.xni.XMLAttributes; | import com.sun.org.apache.xerces.internal.xni.*; | [
"com.sun.org"
] | com.sun.org; | 2,893,973 |
final protected String getReturnHref(BusinessObject businessObject, Map fieldConversions, String lookupImpl, List returnKeys) {
if (StringUtils.isNotBlank(backLocation)) {
return UrlFactory.parameterizeUrl(backLocation, getParameters(
businessObject, fieldConversions, look... | final String function(BusinessObject businessObject, Map fieldConversions, String lookupImpl, List returnKeys) { if (StringUtils.isNotBlank(backLocation)) { return UrlFactory.parameterizeUrl(backLocation, getParameters( businessObject, fieldConversions, lookupImpl, returnKeys)); } return ""; } | /**
* This method is for lookupable implementations
*
* @param businessObject
* @param fieldConversions
* @param lookupImpl
* @param returnKeys
* @return
*/ | This method is for lookupable implementations | getReturnHref | {
"repo_name": "kuali/kc-rice",
"path": "rice-middleware/kns/src/main/java/org/kuali/rice/kns/lookup/AbstractLookupableHelperServiceImpl.java",
"license": "apache-2.0",
"size": 71764
} | [
"java.util.List",
"java.util.Map",
"org.apache.commons.lang.StringUtils",
"org.kuali.rice.krad.bo.BusinessObject",
"org.kuali.rice.krad.util.UrlFactory"
] | import java.util.List; import java.util.Map; import org.apache.commons.lang.StringUtils; import org.kuali.rice.krad.bo.BusinessObject; import org.kuali.rice.krad.util.UrlFactory; | import java.util.*; import org.apache.commons.lang.*; import org.kuali.rice.krad.bo.*; import org.kuali.rice.krad.util.*; | [
"java.util",
"org.apache.commons",
"org.kuali.rice"
] | java.util; org.apache.commons; org.kuali.rice; | 255,668 |
public NoteItem makeAndStoreDummyItem()
throws Exception {
return makeAndStoreDummyItem(homeCollection);
} | NoteItem function() throws Exception { return makeAndStoreDummyItem(homeCollection); } | /**
* Makes and stores dummy item.
* @return The note item
* @throws Exception - if something is wrong this exception is thrown.
*/ | Makes and stores dummy item | makeAndStoreDummyItem | {
"repo_name": "Eisler/cosmo",
"path": "cosmo-core/src/test/unit/java/org/unitedinternet/cosmo/MockHelper.java",
"license": "apache-2.0",
"size": 13689
} | [
"org.unitedinternet.cosmo.model.NoteItem"
] | import org.unitedinternet.cosmo.model.NoteItem; | import org.unitedinternet.cosmo.model.*; | [
"org.unitedinternet.cosmo"
] | org.unitedinternet.cosmo; | 2,490,686 |
protected String escapeJson(final String input)
{
if (input == null)
{
return null;
}
else
{
return String.valueOf(JsonStringEncoder.getInstance().quoteAsString(input));
}
} | String function(final String input) { if (input == null) { return null; } else { return String.valueOf(JsonStringEncoder.getInstance().quoteAsString(input)); } } | /**
* JSON escapes a specified string. This method is null-safe.
*
* @param input the input string
*
* @return the XML escaped string
*/ | JSON escapes a specified string. This method is null-safe | escapeJson | {
"repo_name": "FINRAOS/herd",
"path": "herd-code/herd-service/src/main/java/org/finra/herd/service/helper/notification/AbstractNotificationMessageBuilder.java",
"license": "apache-2.0",
"size": 15664
} | [
"com.fasterxml.jackson.core.io.JsonStringEncoder"
] | import com.fasterxml.jackson.core.io.JsonStringEncoder; | import com.fasterxml.jackson.core.io.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 1,457,030 |
EList<DirectedTopoSolidPropertyType> getDirectedTopoSolid(); | EList<DirectedTopoSolidPropertyType> getDirectedTopoSolid(); | /**
* Returns the value of the '<em><b>Directed Topo Solid</b></em>' containment reference list.
* The list contents are of type {@link net.opengis.gml311.DirectedTopoSolidPropertyType}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Directed Topo Solid</em>' containment reference... | Returns the value of the 'Directed Topo Solid' containment reference list. The list contents are of type <code>net.opengis.gml311.DirectedTopoSolidPropertyType</code>. If the meaning of the 'Directed Topo Solid' containment reference list isn't clear, there really should be more of a description here... | getDirectedTopoSolid | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.wmts/src/net/opengis/gml311/TopoVolumeType.java",
"license": "lgpl-2.1",
"size": 2087
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,536,383 |
private void collectScoreNodes(MultiColumnQueryHits hits,
List<ScoreNode[]> collector,
long maxResults)
throws IOException, RepositoryException {
while (collector.size() < maxResults) {
ScoreNode[] sn = hits.nextSc... | void function(MultiColumnQueryHits hits, List<ScoreNode[]> collector, long maxResults) throws IOException, RepositoryException { while (collector.size() < maxResults) { ScoreNode[] sn = hits.nextScoreNodes(); if (sn == null) { break; } if (isAccessGranted(sn)) { collector.add(sn); } else { invalid++; } } } | /**
* Collect score nodes from <code>hits</code> into the <code>collector</code>
* list until the size of <code>collector</code> reaches <code>maxResults</code>
* or there are not more results.
*
* @param hits the raw hits.
* @param collector where the access checked score nodes are collec... | Collect score nodes from <code>hits</code> into the <code>collector</code> list until the size of <code>collector</code> reaches <code>maxResults</code> or there are not more results | collectScoreNodes | {
"repo_name": "tripodsan/jackrabbit",
"path": "jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/QueryResultImpl.java",
"license": "apache-2.0",
"size": 20336
} | [
"java.io.IOException",
"java.util.List",
"javax.jcr.RepositoryException"
] | import java.io.IOException; import java.util.List; import javax.jcr.RepositoryException; | import java.io.*; import java.util.*; import javax.jcr.*; | [
"java.io",
"java.util",
"javax.jcr"
] | java.io; java.util; javax.jcr; | 577,831 |
public static AlertLevel forName(String name) {
for (int i = 0; i < VALUES.length; i++) {
AlertLevel level = VALUES[i];
if (level.getName().equalsIgnoreCase(name)) {
return level;
}
}
throw new IllegalArgumentException(
LocalizedStrings.AlertLevel_THERE_IS_NO_ALERT_LEVEL... | static AlertLevel function(String name) { for (int i = 0; i < VALUES.length; i++) { AlertLevel level = VALUES[i]; if (level.getName().equalsIgnoreCase(name)) { return level; } } throw new IllegalArgumentException( LocalizedStrings.AlertLevel_THERE_IS_NO_ALERT_LEVEL_0.toLocalizedString(name)); } | /**
* Returns the <code>AlertLevel</code> with the given name
*
* @throws IllegalArgumentException If there is no alert level named <code>name</code>
*/ | Returns the <code>AlertLevel</code> with the given name | forName | {
"repo_name": "charliemblack/geode",
"path": "geode-core/src/main/java/org/apache/geode/admin/AlertLevel.java",
"license": "apache-2.0",
"size": 5275
} | [
"org.apache.geode.internal.i18n.LocalizedStrings"
] | import org.apache.geode.internal.i18n.LocalizedStrings; | import org.apache.geode.internal.i18n.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,265,895 |
@Override
public void run() {
int opsProcessed = 0;
Op op = null;
try {
dataXceiverServer.addPeer(peer, Thread.currentThread(), this);
peer.setWriteTimeout(datanode.getDnConf().socketWriteTimeout);
InputStream input = socketIn;
try {
IOStreamPair saslStreams = datanode.s... | void function() { int opsProcessed = 0; Op op = null; try { dataXceiverServer.addPeer(peer, Thread.currentThread(), this); peer.setWriteTimeout(datanode.getDnConf().socketWriteTimeout); InputStream input = socketIn; try { IOStreamPair saslStreams = datanode.saslServer.receive(peer, socketOut, socketIn, datanode.getXfer... | /**
* Read/write data from/to the DataXceiverServer.
*/ | Read/write data from/to the DataXceiverServer | run | {
"repo_name": "VicoWu/hadoop-2.7.3",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java",
"license": "apache-2.0",
"size": 52413
} | [
"java.io.BufferedInputStream",
"java.io.DataInputStream",
"java.io.EOFException",
"java.io.IOException",
"java.io.InputStream",
"java.io.InterruptedIOException",
"java.net.SocketTimeoutException",
"java.nio.channels.ClosedChannelException",
"org.apache.hadoop.hdfs.protocol.HdfsConstants",
"org.apa... | import java.io.BufferedInputStream; import java.io.DataInputStream; import java.io.EOFException; import java.io.IOException; import java.io.InputStream; import java.io.InterruptedIOException; import java.net.SocketTimeoutException; import java.nio.channels.ClosedChannelException; import org.apache.hadoop.hdfs.protocol.... | import java.io.*; import java.net.*; import java.nio.channels.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.protocol.datatransfer.*; import org.apache.hadoop.hdfs.protocol.datatransfer.sasl.*; import org.apache.hadoop.io.*; import org.apache.hadoop.util.*; | [
"java.io",
"java.net",
"java.nio",
"org.apache.hadoop"
] | java.io; java.net; java.nio; org.apache.hadoop; | 1,628,246 |
protected int invalidateSessions(ContextName cn, String[] sessionIds,
StringManager smClient) throws IOException {
if (null == sessionIds) {
return 0;
}
int nbAffectedSessions = 0;
for (int i = 0; i < sessionIds.length; ++i) {
String sessionId = se... | int function(ContextName cn, String[] sessionIds, StringManager smClient) throws IOException { if (null == sessionIds) { return 0; } int nbAffectedSessions = 0; for (int i = 0; i < sessionIds.length; ++i) { String sessionId = sessionIds[i]; HttpSession session = getSessionForNameAndId(cn, sessionId, smClient).getSessio... | /**
* Invalidate HttpSessions
* @param cn Name of the application for which sessions are to be
* invalidated
* @param sessionIds
* @param smClient StringManager for the client's locale
* @return number of invalidated sessions
* @throws IOException
*/ | Invalidate HttpSessions | invalidateSessions | {
"repo_name": "mayonghui2112/helloWorld",
"path": "sourceCode/apache-tomcat-7.0.82-src/java/org/apache/catalina/manager/HTMLManagerServlet.java",
"license": "apache-2.0",
"size": 53431
} | [
"java.io.IOException",
"javax.servlet.http.HttpSession",
"org.apache.catalina.util.ContextName",
"org.apache.tomcat.util.res.StringManager"
] | import java.io.IOException; import javax.servlet.http.HttpSession; import org.apache.catalina.util.ContextName; import org.apache.tomcat.util.res.StringManager; | import java.io.*; import javax.servlet.http.*; import org.apache.catalina.util.*; import org.apache.tomcat.util.res.*; | [
"java.io",
"javax.servlet",
"org.apache.catalina",
"org.apache.tomcat"
] | java.io; javax.servlet; org.apache.catalina; org.apache.tomcat; | 1,784,290 |
private void immutableSetMockDataSource(final MockDataSource mockDataSource)
{
m__MockDataSource = mockDataSource;
} | void function(final MockDataSource mockDataSource) { m__MockDataSource = mockDataSource; } | /**
* Sets the mock data source.
* @param mockDataSource the mock data source.
*/ | Sets the mock data source | immutableSetMockDataSource | {
"repo_name": "rydnr/queryj-sql",
"path": "src/main/java/org/acmsl/queryj/sql/dao/MockConnection.java",
"license": "gpl-3.0",
"size": 85579
} | [
"org.acmsl.queryj.sql.dao.MockDataSource"
] | import org.acmsl.queryj.sql.dao.MockDataSource; | import org.acmsl.queryj.sql.dao.*; | [
"org.acmsl.queryj"
] | org.acmsl.queryj; | 824,274 |
Service getService(); | Service getService(); | /**
* A LoadDriver instance can only be associated with a service at a time.
*/ | A LoadDriver instance can only be associated with a service at a time | getService | {
"repo_name": "NovaOrdis/gld",
"path": "core/api/src/main/java/io/novaordis/gld/api/LoadDriver.java",
"license": "apache-2.0",
"size": 3918
} | [
"io.novaordis.gld.api.service.Service"
] | import io.novaordis.gld.api.service.Service; | import io.novaordis.gld.api.service.*; | [
"io.novaordis.gld"
] | io.novaordis.gld; | 604,471 |
@Override
public String toString() {
byte[] entity = buffer.toByteArray();
return new HttpLogBuilder(id).responseEntity(entity, entity.length, entitySize > MAX_ENTITY_SIZE);
} | String function() { byte[] entity = buffer.toByteArray(); return new HttpLogBuilder(id).responseEntity(entity, entity.length, entitySize > MAX_ENTITY_SIZE); } | /**
* Writes entity to a string.
*
* @return A new String instance.
*/ | Writes entity to a string | toString | {
"repo_name": "elasticlib/elasticlib",
"path": "elasticlib-node/src/main/java/org/elasticlib/node/providers/LoggingFilter.java",
"license": "apache-2.0",
"size": 6422
} | [
"org.elasticlib.common.util.HttpLogBuilder"
] | import org.elasticlib.common.util.HttpLogBuilder; | import org.elasticlib.common.util.*; | [
"org.elasticlib.common"
] | org.elasticlib.common; | 1,437,167 |
static String validateAgainstAliases(SearchRequest source, IndexRequest destination,
IndexNameExpressionResolver indexNameExpressionResolver, AutoCreateIndex autoCreateIndex, ClusterState clusterState) {
String target = destination.index();
if (false == autoCreateIndex.shouldAutoCreate(t... | static String validateAgainstAliases(SearchRequest source, IndexRequest destination, IndexNameExpressionResolver indexNameExpressionResolver, AutoCreateIndex autoCreateIndex, ClusterState clusterState) { String target = destination.index(); if (false == autoCreateIndex.shouldAutoCreate(target, clusterState)) { target =... | /**
* Throws an ActionRequestValidationException if the request tries to index
* back into the same index or into an index that points to two indexes.
* This cannot be done during request validation because the cluster state
* isn't available then. Package private for testing.
*/ | Throws an ActionRequestValidationException if the request tries to index back into the same index or into an index that points to two indexes. This cannot be done during request validation because the cluster state isn't available then. Package private for testing | validateAgainstAliases | {
"repo_name": "episerver/elasticsearch",
"path": "modules/reindex/src/main/java/org/elasticsearch/index/reindex/TransportReindexAction.java",
"license": "apache-2.0",
"size": 12103
} | [
"org.elasticsearch.action.ActionListener",
"org.elasticsearch.action.ActionRequestValidationException",
"org.elasticsearch.action.index.IndexRequest",
"org.elasticsearch.action.search.SearchRequest",
"org.elasticsearch.action.support.AutoCreateIndex",
"org.elasticsearch.client.Client",
"org.elasticsearc... | import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.support.AutoCreateIndex; import org.elasticsearch.client.Client; imp... | import org.elasticsearch.action.*; import org.elasticsearch.action.index.*; import org.elasticsearch.action.search.*; import org.elasticsearch.action.support.*; import org.elasticsearch.client.*; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.common.logging.*; ... | [
"org.elasticsearch.action",
"org.elasticsearch.client",
"org.elasticsearch.cluster",
"org.elasticsearch.common",
"org.elasticsearch.script",
"org.elasticsearch.threadpool"
] | org.elasticsearch.action; org.elasticsearch.client; org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.script; org.elasticsearch.threadpool; | 2,575,979 |
void rotateVcenterPassword(Context context); | void rotateVcenterPassword(Context context); | /**
* Rotate the vCenter password.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* ... | Rotate the vCenter password | rotateVcenterPassword | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloud.java",
"license": "mit",
"size": 22797
} | [
"com.azure.core.util.Context"
] | import com.azure.core.util.Context; | import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,235,678 |
protected void preRenderCallback(EntityShulker entitylivingbaseIn, float partialTickTime)
{
float f = 0.999F;
GlStateManager.scale(0.999F, 0.999F, 0.999F);
}
@SideOnly(Side.CLIENT)
class HeadLayer implements LayerRenderer<EntityShulker>
{
private HeadLayer()
{
... | void function(EntityShulker entitylivingbaseIn, float partialTickTime) { float f = 0.999F; GlStateManager.scale(0.999F, 0.999F, 0.999F); } @SideOnly(Side.CLIENT) class HeadLayer implements LayerRenderer<EntityShulker> { private HeadLayer() { } | /**
* Allows the render to do state modifications necessary before the model is rendered.
*/ | Allows the render to do state modifications necessary before the model is rendered | preRenderCallback | {
"repo_name": "boredherobrine13/morefuelsmod-1.10",
"path": "build/tmp/recompileMc/sources/net/minecraft/client/renderer/entity/RenderShulker.java",
"license": "lgpl-2.1",
"size": 7619
} | [
"net.minecraft.client.renderer.GlStateManager",
"net.minecraft.client.renderer.entity.layers.LayerRenderer",
"net.minecraft.entity.monster.EntityShulker",
"net.minecraftforge.fml.relauncher.Side",
"net.minecraftforge.fml.relauncher.SideOnly"
] | import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.entity.layers.LayerRenderer; import net.minecraft.entity.monster.EntityShulker; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; | import net.minecraft.client.renderer.*; import net.minecraft.client.renderer.entity.layers.*; import net.minecraft.entity.monster.*; import net.minecraftforge.fml.relauncher.*; | [
"net.minecraft.client",
"net.minecraft.entity",
"net.minecraftforge.fml"
] | net.minecraft.client; net.minecraft.entity; net.minecraftforge.fml; | 2,547,392 |
private static RMIServer objectToBind(
RMIServerImpl rmiServer, Map<String, ?> env)
throws IOException {
return (RMIServer)rmiServer.toStub();
} | static RMIServer function( RMIServerImpl rmiServer, Map<String, ?> env) throws IOException { return (RMIServer)rmiServer.toStub(); } | /**
* Object that we will bind to the registry.
* This object is a stub connected to our RMIServerImpl.
**/ | Object that we will bind to the registry. This object is a stub connected to our RMIServerImpl | objectToBind | {
"repo_name": "md-5/jdk10",
"path": "src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectorServer.java",
"license": "gpl-2.0",
"size": 35062
} | [
"java.io.IOException",
"java.util.Map"
] | import java.io.IOException; import java.util.Map; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,612,321 |
@Override
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
public BuildConfigSetRecord saveBuildConfigSetRecord(BuildConfigSetRecord buildConfigSetRecord) {
return buildConfigSetRecordRepository.save(buildConfigSetRecord);
} | @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) BuildConfigSetRecord function(BuildConfigSetRecord buildConfigSetRecord) { return buildConfigSetRecordRepository.save(buildConfigSetRecord); } | /**
* Save a build config set record to the db. This requires a new transaction to ensure that the record is
* immediately committed to the database so that it's available to use by the foreign keys set in the individual
* build records.
*/ | Save a build config set record to the db. This requires a new transaction to ensure that the record is immediately committed to the database so that it's available to use by the foreign keys set in the individual build records | saveBuildConfigSetRecord | {
"repo_name": "matedo1/pnc",
"path": "datastore/src/main/java/org/jboss/pnc/datastore/DefaultDatastore.java",
"license": "apache-2.0",
"size": 24220
} | [
"javax.ejb.TransactionAttribute",
"javax.ejb.TransactionAttributeType",
"org.jboss.pnc.model.BuildConfigSetRecord"
] | import javax.ejb.TransactionAttribute; import javax.ejb.TransactionAttributeType; import org.jboss.pnc.model.BuildConfigSetRecord; | import javax.ejb.*; import org.jboss.pnc.model.*; | [
"javax.ejb",
"org.jboss.pnc"
] | javax.ejb; org.jboss.pnc; | 1,079,968 |
@Override
public void process(Exchange exchange) throws Exception {
if (log.isTraceEnabled()) {
log.trace(exchange.toString());
}
KuraGPIOAction messageAction = exchange.getIn().getHeader(KuraGPIOConstants.CAMEL_KURA_GPIO_ACTION, getAction(),
KuraGPIOAction.c... | void function(Exchange exchange) throws Exception { if (log.isTraceEnabled()) { log.trace(exchange.toString()); } KuraGPIOAction messageAction = exchange.getIn().getHeader(KuraGPIOConstants.CAMEL_KURA_GPIO_ACTION, getAction(), KuraGPIOAction.class); if (messageAction == null) { log.trace(STR); output(exchange); } else ... | /**
* Process the message
*/ | Process the message | process | {
"repo_name": "finiteloopme/rhiot",
"path": "gateway/components/camel-kura/src/main/java/io/rhiot/component/kura/gpio/KuraGPIOProducer.java",
"license": "apache-2.0",
"size": 5302
} | [
"org.apache.camel.Exchange"
] | import org.apache.camel.Exchange; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 403,540 |
@Override
public void begin() throws NotSupportedException, SystemException {
Transaction currentTransaction = getTransaction();
try {
if (currentTransaction instanceof DataSourceTransaction)
((DataSourceTransaction) currentTransaction).begin();
} catch (IllegalStateException | XAException e) {
... | void function() throws NotSupportedException, SystemException { Transaction currentTransaction = getTransaction(); try { if (currentTransaction instanceof DataSourceTransaction) ((DataSourceTransaction) currentTransaction).begin(); } catch (IllegalStateException XAException e) { throw new SystemException(e.getMessage()... | /**
* <p>Begin transaction./<p>
* Create a new instance of the transaction class injected in the constructor (or org.judal.transaction.DataSourceTransaction if the default constructor was used to create this instance).
* For the new transaction, call Transaction.begin()
* @throws NotSupportedException
* ... | Begin transaction./ Create a new instance of the transaction class injected in the constructor (or org.judal.transaction.DataSourceTransaction if the default constructor was used to create this instance). For the new transaction, call Transaction.begin() | begin | {
"repo_name": "sergiomt/judal",
"path": "core/src/main/java/org/judal/transaction/DataSourceTransactionManager.java",
"license": "apache-2.0",
"size": 8347
} | [
"javax.transaction.HeuristicMixedException",
"javax.transaction.HeuristicRollbackException",
"javax.transaction.NotSupportedException",
"javax.transaction.RollbackException",
"javax.transaction.SystemException",
"javax.transaction.Transaction",
"javax.transaction.xa.XAException"
] | import javax.transaction.HeuristicMixedException; import javax.transaction.HeuristicRollbackException; import javax.transaction.NotSupportedException; import javax.transaction.RollbackException; import javax.transaction.SystemException; import javax.transaction.Transaction; import javax.transaction.xa.XAException; | import javax.transaction.*; import javax.transaction.xa.*; | [
"javax.transaction"
] | javax.transaction; | 933,715 |
@Test
public void testGetCurrentPage() {
final int currentPage = 12;
WTable table = new WTable();
table.setLocked(true);
setActiveContext(createUIContext());
table.setCurrentPage(currentPage);
Assert.assertEquals("Too high currentPage should be set back to maxPage", 0, table.
getCurrentPag... | void function() { final int currentPage = 12; WTable table = new WTable(); table.setLocked(true); setActiveContext(createUIContext()); table.setCurrentPage(currentPage); Assert.assertEquals(STR, 0, table. getCurrentPage()); resetContext(); Assert.assertEquals(STR, 0, table.getCurrentPage()); } | /**
* Test getCurrentPage - set back to maxPage.
*/ | Test getCurrentPage - set back to maxPage | testGetCurrentPage | {
"repo_name": "Joshua-Barclay/wcomponents",
"path": "wcomponents-core/src/test/java/com/github/bordertech/wcomponents/WTable_Test.java",
"license": "gpl-3.0",
"size": 39702
} | [
"junit.framework.Assert"
] | import junit.framework.Assert; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 2,189,654 |
public HttpServletResponse getOriginalPortalResponse(PortletRequest portletRequest); | HttpServletResponse function(PortletRequest portletRequest); | /**
* Useful for container service callbacks and service portlets that are provided with
* the portlet's request but need access to the portal's HttpServletResponse.
*
* @param portletRequest The request targeted to the portlet
* @return The portal's response, not scoped to a particular portl... | Useful for container service callbacks and service portlets that are provided with the portlet's request but need access to the portal's HttpServletResponse | getOriginalPortalResponse | {
"repo_name": "apetro/uPortal",
"path": "uportal-war/src/main/java/org/apereo/portal/url/IPortalRequestUtils.java",
"license": "apache-2.0",
"size": 3198
} | [
"javax.portlet.PortletRequest",
"javax.servlet.http.HttpServletResponse"
] | import javax.portlet.PortletRequest; import javax.servlet.http.HttpServletResponse; | import javax.portlet.*; import javax.servlet.http.*; | [
"javax.portlet",
"javax.servlet"
] | javax.portlet; javax.servlet; | 690,279 |
public void dispatch(Remote obj, RemoteCall call) throws IOException {
// positive operation number in 1.1 stubs;
// negative version number in 1.2 stubs and beyond...
int num;
long op;
try {
// read remote call header
ObjectInput in;
try ... | void function(Remote obj, RemoteCall call) throws IOException { int num; long op; try { ObjectInput in; try { in = call.getInputStream(); num = in.readInt(); if (num >= 0) { if (skel != null) { oldDispatch(obj, call, num); return; } else { throw new UnmarshalException( STR + STR); } } op = in.readLong(); } catch (Excep... | /**
* Call to dispatch to the remote object (on the server side).
* The up-call to the server and the marshalling of return result
* (or exception) should be handled before returning from this
* method.
* @param obj the target remote object for the call
* @param call the "remote call" from... | Call to dispatch to the remote object (on the server side). The up-call to the server and the marshalling of return result (or exception) should be handled before returning from this method | dispatch | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jdk/src/share/classes/sun/rmi/server/UnicastServerRef.java",
"license": "gpl-2.0",
"size": 20907
} | [
"java.io.IOException",
"java.io.ObjectInput",
"java.io.ObjectOutput",
"java.lang.reflect.InvocationTargetException",
"java.lang.reflect.Method",
"java.rmi.MarshalException",
"java.rmi.Remote",
"java.rmi.RemoteException",
"java.rmi.ServerError",
"java.rmi.ServerException",
"java.rmi.UnmarshalExce... | import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.rmi.MarshalException; import java.rmi.Remote; import java.rmi.RemoteException; import java.rmi.ServerError; import java.rmi.ServerExceptio... | import java.io.*; import java.lang.reflect.*; import java.rmi.*; import java.rmi.server.*; import java.util.*; | [
"java.io",
"java.lang",
"java.rmi",
"java.util"
] | java.io; java.lang; java.rmi; java.util; | 1,072,102 |
@Override
protected void innerToNetwork(ObjectContainer container, ClientContext context) {
if(persistent()) {
container.activate(ctx, 1);
container.activate(ctx.eventProducer, 1);
}
ctx.eventProducer.produceEvent(new SendingToNetworkEvent(), container, context);
} | void function(ObjectContainer container, ClientContext context) { if(persistent()) { container.activate(ctx, 1); container.activate(ctx.eventProducer, 1); } ctx.eventProducer.produceEvent(new SendingToNetworkEvent(), container, context); } | /**
* Notify clients that some part of the request has been sent to the network i.e. we have finished
* checking the datastore for at least some part of the request. Sent once only for any given request.
*/ | Notify clients that some part of the request has been sent to the network i.e. we have finished checking the datastore for at least some part of the request. Sent once only for any given request | innerToNetwork | {
"repo_name": "spencerjackson/fred-staging",
"path": "src/freenet/client/async/ClientGetter.java",
"license": "gpl-2.0",
"size": 24456
} | [
"com.db4o.ObjectContainer"
] | import com.db4o.ObjectContainer; | import com.db4o.*; | [
"com.db4o"
] | com.db4o; | 1,791,938 |
public void stopParsing() {
timer.stop();
running = false;
}
private static class NoticeHighlightPair {
public ParserNotice notice;
public HighlightInfo highlight;
public NoticeHighlightPair(ParserNotice notice, HighlightInfo highlight) {
this.notice = notice;
this.highlight = hi... | void function() { timer.stop(); running = false; } private static class NoticeHighlightPair { public ParserNotice notice; public HighlightInfo highlight; public NoticeHighlightPair(ParserNotice notice, HighlightInfo highlight) { this.notice = notice; this.highlight = highlight; } } static { boolean debugParsing = false... | /**
* Stops parsing the document.
*
* @see #restartParsing()
*/ | Stops parsing the document | stopParsing | {
"repo_name": "curiosag/ftc",
"path": "RSyntaxTextArea/src/main/java/org/fife/ui/rsyntaxtextarea/ParserManager.java",
"license": "gpl-3.0",
"size": 22568
} | [
"java.security.AccessControlException",
"org.fife.ui.rsyntaxtextarea.parser.ParserNotice",
"org.fife.ui.rtextarea.RTextAreaHighlighter"
] | import java.security.AccessControlException; import org.fife.ui.rsyntaxtextarea.parser.ParserNotice; import org.fife.ui.rtextarea.RTextAreaHighlighter; | import java.security.*; import org.fife.ui.rsyntaxtextarea.parser.*; import org.fife.ui.rtextarea.*; | [
"java.security",
"org.fife.ui"
] | java.security; org.fife.ui; | 1,451,641 |
public void addExclusion(Zone zone) {
exclusions.add(zone);
}
public Shape(Zone zone) {
this.zone = zone;
exclusions = new LinkedHashSet<>();
}
private Shape() {
} | void function(Zone zone) { exclusions.add(zone); } public Shape(Zone zone) { this.zone = zone; exclusions = new LinkedHashSet<>(); } private Shape() { } | /**
* Add exclusion.
*
* @param zone the zone
*/ | Add exclusion | addExclusion | {
"repo_name": "jspresso/jspresso-ce",
"path": "util/src/main/java/org/jspresso/framework/util/gui/map/Shape.java",
"license": "lgpl-3.0",
"size": 3435
} | [
"java.util.LinkedHashSet"
] | import java.util.LinkedHashSet; | import java.util.*; | [
"java.util"
] | java.util; | 2,069,120 |
void sendNotification() {
if ( this.commInfo == ImAndWorkerCommunicationInfo.START ) {
this.ingest.open(this.providerDesc);
} else if ( this.commInfo == ImAndWorkerCommunicationInfo.FINISH ) {
this.ingest.close(null);
} else if ( this.commInfo == ImAndWorkerCommunicat... | void sendNotification() { if ( this.commInfo == ImAndWorkerCommunicationInfo.START ) { this.ingest.open(this.providerDesc); } else if ( this.commInfo == ImAndWorkerCommunicationInfo.FINISH ) { this.ingest.close(null); } else if ( this.commInfo == ImAndWorkerCommunicationInfo.PAUSE ) { this.ingest.pause(); } else { thro... | /**
* send a notification to the ingestor. This is either a START or a PAUSE notification.<br>
* The method is used by the worker threads.
*/ | send a notification to the ingestor. This is either a START or a PAUSE notification. The method is used by the worker threads | sendNotification | {
"repo_name": "Deutsche-Digitale-Bibliothek/ddb-backend",
"path": "IngestMultiplexerServer/src/main/java/de/fhg/iais/cortex/im/worker/ImWorkerCommData.java",
"license": "apache-2.0",
"size": 8507
} | [
"de.fhg.iais.commons.dbc.DbcException"
] | import de.fhg.iais.commons.dbc.DbcException; | import de.fhg.iais.commons.dbc.*; | [
"de.fhg.iais"
] | de.fhg.iais; | 1,554,916 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<FeatureResultInner> listAllAsync() {
return new PagedFlux<>(() -> listAllSinglePageAsync(), nextLink -> listAllNextSinglePageAsync(nextLink));
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<FeatureResultInner> function() { return new PagedFlux<>(() -> listAllSinglePageAsync(), nextLink -> listAllNextSinglePageAsync(nextLink)); } | /**
* Gets all the preview features that are available through AFEC for the subscription.
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return all the preview featu... | Gets all the preview features that are available through AFEC for the subscription | listAllAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/FeaturesClientImpl.java",
"license": "mit",
"size": 48107
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux",
"com.azure.resourcemanager.resources.fluent.models.FeatureResultInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.resources.fluent.models.FeatureResultInner; | 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; | 1,029,506 |
VendorFragment fragment = new VendorFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
} | VendorFragment fragment = new VendorFragment(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; } | /**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment VendorFragment.
*/ | Use this factory method to create a new instance of this fragment using the provided parameters | newInstance | {
"repo_name": "nh-gurunath/GESEventManager",
"path": "app/src/main/java/com/globaledgesoft/eventmanagerges/VendorFragment.java",
"license": "apache-2.0",
"size": 5728
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 552,394 |
public void setBusinessObjectService(BusinessObjectService businessObjectService) {
this.businessObjectService = businessObjectService;
} | void function(BusinessObjectService businessObjectService) { this.businessObjectService = businessObjectService; } | /**
* Set the Business Object Service.
* @param businessObjectService
*/ | Set the Business Object Service | setBusinessObjectService | {
"repo_name": "mukadder/kc",
"path": "coeus-impl/src/main/java/org/kuali/kra/iacuc/actions/submit/IacucProtocolSubmitActionServiceImpl.java",
"license": "agpl-3.0",
"size": 10603
} | [
"org.kuali.rice.krad.service.BusinessObjectService"
] | import org.kuali.rice.krad.service.BusinessObjectService; | import org.kuali.rice.krad.service.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 2,821,139 |
Document post() throws IOException; | Document post() throws IOException; | /**
* Execute the request as a POST, and parse the result.
* @return parsed Document
* @throws java.net.MalformedURLException if the request URL is not a HTTP or HTTPS URL, or is otherwise malformed
* @throws HttpStatusException if the response is not OK and HTTP response errors are not ignored
... | Execute the request as a POST, and parse the result | post | {
"repo_name": "ngocbd/jsoup",
"path": "src/main/java/org/jsoup/Connection.java",
"license": "mit",
"size": 24127
} | [
"java.io.IOException",
"org.jsoup.nodes.Document"
] | import java.io.IOException; import org.jsoup.nodes.Document; | import java.io.*; import org.jsoup.nodes.*; | [
"java.io",
"org.jsoup.nodes"
] | java.io; org.jsoup.nodes; | 513,823 |
public static TypeInformation<Boolean> BOOLEAN() {
return org.apache.flink.api.common.typeinfo.Types.BOOLEAN;
} | static TypeInformation<Boolean> function() { return org.apache.flink.api.common.typeinfo.Types.BOOLEAN; } | /**
* Returns type information for a Table API boolean or SQL BOOLEAN type.
*/ | Returns type information for a Table API boolean or SQL BOOLEAN type | BOOLEAN | {
"repo_name": "shaoxuan-wang/flink",
"path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/api/Types.java",
"license": "apache-2.0",
"size": 9167
} | [
"org.apache.flink.api.common.typeinfo.TypeInformation"
] | import org.apache.flink.api.common.typeinfo.TypeInformation; | import org.apache.flink.api.common.typeinfo.*; | [
"org.apache.flink"
] | org.apache.flink; | 218,390 |
public void selectionChanged(JavaTextSelection selection) {
try {
setEnabled(RefactoringAvailabilityTester.isInlineMethodAvailable(selection));
} catch (JavaScriptModelException e) {
setEnabled(false);
}
}
| void function(JavaTextSelection selection) { try { setEnabled(RefactoringAvailabilityTester.isInlineMethodAvailable(selection)); } catch (JavaScriptModelException e) { setEnabled(false); } } | /**
* Note: This method is for internal use only. Clients should not call this method.
* @param selection
*/ | Note: This method is for internal use only. Clients should not call this method | selectionChanged | {
"repo_name": "boniatillo-com/PhaserEditor",
"path": "source/thirdparty/jsdt/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/refactoring/actions/InlineMethodAction.java",
"license": "epl-1.0",
"size": 5921
} | [
"org.eclipse.wst.jsdt.core.JavaScriptModelException",
"org.eclipse.wst.jsdt.internal.corext.refactoring.RefactoringAvailabilityTester",
"org.eclipse.wst.jsdt.internal.ui.javaeditor.JavaTextSelection"
] | import org.eclipse.wst.jsdt.core.JavaScriptModelException; import org.eclipse.wst.jsdt.internal.corext.refactoring.RefactoringAvailabilityTester; import org.eclipse.wst.jsdt.internal.ui.javaeditor.JavaTextSelection; | import org.eclipse.wst.jsdt.core.*; import org.eclipse.wst.jsdt.internal.corext.refactoring.*; import org.eclipse.wst.jsdt.internal.ui.javaeditor.*; | [
"org.eclipse.wst"
] | org.eclipse.wst; | 1,782,044 |
@SuppressWarnings("rawtypes")
protected List getDeletionAwareUseTaxItems() {
List<PurApItemUseTax> deletionAwareUseTaxItems = new ArrayList<PurApItemUseTax>();
List<PurApItemBase> subManageList = this.getItems();
for (PurApItemBase subManage : subManageList) {
deletion... | @SuppressWarnings(STR) List function() { List<PurApItemUseTax> deletionAwareUseTaxItems = new ArrayList<PurApItemUseTax>(); List<PurApItemBase> subManageList = this.getItems(); for (PurApItemBase subManage : subManageList) { deletionAwareUseTaxItems.addAll(subManage.getUseTaxItems()); } return deletionAwareUseTaxItems;... | /**
* Build deletion list of use tax items for PurAp generic use.
*
* @return
*/ | Build deletion list of use tax items for PurAp generic use | getDeletionAwareUseTaxItems | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/purap/document/PurchasingAccountsPayableDocumentBase.java",
"license": "agpl-3.0",
"size": 53766
} | [
"java.util.ArrayList",
"java.util.List",
"org.kuali.kfs.module.purap.businessobject.PurApAccountingLine",
"org.kuali.kfs.module.purap.businessobject.PurApItem",
"org.kuali.kfs.module.purap.businessobject.PurApItemBase",
"org.kuali.kfs.module.purap.businessobject.PurApItemUseTax",
"org.kuali.kfs.sys.docu... | import java.util.ArrayList; import java.util.List; import org.kuali.kfs.module.purap.businessobject.PurApAccountingLine; import org.kuali.kfs.module.purap.businessobject.PurApItem; import org.kuali.kfs.module.purap.businessobject.PurApItemBase; import org.kuali.kfs.module.purap.businessobject.PurApItemUseTax; import or... | import java.util.*; import org.kuali.kfs.module.purap.businessobject.*; import org.kuali.kfs.sys.document.*; | [
"java.util",
"org.kuali.kfs"
] | java.util; org.kuali.kfs; | 1,018,437 |
private void cmd_archive ()
{
boolean success = false;
byte[] data = Document.getPDFAsArray(m_reportEngine.getLayout().getPageable(false)); // No Copy
if (data != null)
{
MArchive archive = new MArchive (Env.getCtx(), m_reportEngine.getPrintInfo(), null);
archive.setBinaryData(data);
succes... | void function () { boolean success = false; byte[] data = Document.getPDFAsArray(m_reportEngine.getLayout().getPageable(false)); if (data != null) { MArchive archive = new MArchive (Env.getCtx(), m_reportEngine.getPrintInfo(), null); archive.setBinaryData(data); success = archive.save(); } if (success) ADialog.info(m_W... | /**
* Archive Report directly
*/ | Archive Report directly | cmd_archive | {
"repo_name": "armenrz/adempiere",
"path": "client/src/org/compiere/print/Viewer.java",
"license": "gpl-2.0",
"size": 45716
} | [
"org.adempiere.pdf.Document",
"org.compiere.apps.ADialog",
"org.compiere.model.MArchive",
"org.compiere.util.Env"
] | import org.adempiere.pdf.Document; import org.compiere.apps.ADialog; import org.compiere.model.MArchive; import org.compiere.util.Env; | import org.adempiere.pdf.*; import org.compiere.apps.*; import org.compiere.model.*; import org.compiere.util.*; | [
"org.adempiere.pdf",
"org.compiere.apps",
"org.compiere.model",
"org.compiere.util"
] | org.adempiere.pdf; org.compiere.apps; org.compiere.model; org.compiere.util; | 199,009 |
public DataSet reverse() {
if (sort == null) {
throw new GroovyRuntimeException("reverse() only allowed immediately after a sort()");
}
return new DataSet(this);
} | DataSet function() { if (sort == null) { throw new GroovyRuntimeException(STR); } return new DataSet(this); } | /**
* Return a lazy-implemented reverse-ordered view of this DataSet.
*
* @return the view DataSet
*/ | Return a lazy-implemented reverse-ordered view of this DataSet | reverse | {
"repo_name": "avafanasiev/groovy",
"path": "subprojects/groovy-sql/src/main/java/groovy/sql/DataSet.java",
"license": "apache-2.0",
"size": 17977
} | [
"groovy.lang.GroovyRuntimeException"
] | import groovy.lang.GroovyRuntimeException; | import groovy.lang.*; | [
"groovy.lang"
] | groovy.lang; | 1,057,703 |
@Test
public void testCorruptedData() throws Exception {
LongStateStorage stateStorage = new LongStateStorage();
ZooKeeperStateHandleStore<Long> store = new ZooKeeperStateHandleStore<>(
ZooKeeper.getClient(),
stateStorage,
Executors.directExecutor());
final Collection<Long> input = new HashSet<>();... | void function() throws Exception { LongStateStorage stateStorage = new LongStateStorage(); ZooKeeperStateHandleStore<Long> store = new ZooKeeperStateHandleStore<>( ZooKeeper.getClient(), stateStorage, Executors.directExecutor()); final Collection<Long> input = new HashSet<>(); input.add(1L); input.add(2L); input.add(3L... | /**
* Tests that the ZooKeeperStateHandleStore can handle corrupted data by ignoring the respective
* ZooKeeper ZNodes.
*/ | Tests that the ZooKeeperStateHandleStore can handle corrupted data by ignoring the respective ZooKeeper ZNodes | testCorruptedData | {
"repo_name": "DieBauer/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/zookeeper/ZooKeeperStateHandleStoreITCase.java",
"license": "apache-2.0",
"size": 19399
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.HashSet",
"java.util.List",
"org.apache.flink.api.java.tuple.Tuple2",
"org.apache.flink.runtime.concurrent.Executors",
"org.apache.flink.runtime.state.RetrievableStateHandle",
"org.junit.Assert"
] | import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.List; import org.apache.flink.api.java.tuple.Tuple2; import org.apache.flink.runtime.concurrent.Executors; import org.apache.flink.runtime.state.RetrievableStateHandle; import org.junit.Assert; | import java.util.*; import org.apache.flink.api.java.tuple.*; import org.apache.flink.runtime.concurrent.*; import org.apache.flink.runtime.state.*; import org.junit.*; | [
"java.util",
"org.apache.flink",
"org.junit"
] | java.util; org.apache.flink; org.junit; | 1,357,511 |
@Override
public SubscriptionGetResponse get() throws IOException, ServiceException, ParserConfigurationException, SAXException, URISyntaxException {
// Validate
// Tracing
boolean shouldTrace = CloudTracing.getIsEnabled();
String invocationId = null;
if (shouldT... | SubscriptionGetResponse function() throws IOException, ServiceException, ParserConfigurationException, SAXException, URISyntaxException { boolean shouldTrace = CloudTracing.getIsEnabled(); String invocationId = null; if (shouldTrace) { invocationId = Long.toString(CloudTracing.getNextInvocationId()); HashMap<String, Ob... | /**
* The Get Subscription operation returns account and resource allocation
* information for the specified subscription. (see
* http://msdn.microsoft.com/en-us/library/windowsazure/hh403995.aspx for
* more information)
*
* @throws IOException Signals that an I/O exception of some sort has
... | The Get Subscription operation returns account and resource allocation information for the specified subscription. (see HREF for more information) | get | {
"repo_name": "manikandan-palaniappan/azure-sdk-for-java",
"path": "management/src/main/java/com/microsoft/windowsazure/management/SubscriptionOperationsImpl.java",
"license": "apache-2.0",
"size": 42813
} | [
"com.microsoft.windowsazure.core.utils.XmlUtility",
"com.microsoft.windowsazure.exception.ServiceException",
"com.microsoft.windowsazure.management.models.SubscriptionGetResponse",
"com.microsoft.windowsazure.tracing.CloudTracing",
"java.io.IOException",
"java.net.URISyntaxException",
"java.util.HashMap... | import com.microsoft.windowsazure.core.utils.XmlUtility; import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.models.SubscriptionGetResponse; import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.net.URISyntaxException; impo... | import com.microsoft.windowsazure.core.utils.*; import com.microsoft.windowsazure.exception.*; import com.microsoft.windowsazure.management.models.*; import com.microsoft.windowsazure.tracing.*; import java.io.*; import java.net.*; import java.util.*; import javax.xml.bind.*; import javax.xml.parsers.*; import org.w3c.... | [
"com.microsoft.windowsazure",
"java.io",
"java.net",
"java.util",
"javax.xml",
"org.w3c.dom",
"org.xml.sax"
] | com.microsoft.windowsazure; java.io; java.net; java.util; javax.xml; org.w3c.dom; org.xml.sax; | 1,413,344 |
public void scrollToRow(int rowIndex, ScrollDestination destination)
throws IllegalArgumentException {
scrollToRow(rowIndex, destination,
destination == ScrollDestination.MIDDLE ? 0
: GridConstants.DEFAULT_PADDING);
}
/**
* Scrolls to a certa... | void function(int rowIndex, ScrollDestination destination) throws IllegalArgumentException { scrollToRow(rowIndex, destination, destination == ScrollDestination.MIDDLE ? 0 : GridConstants.DEFAULT_PADDING); } /** * Scrolls to a certain row using only user-specified parameters. * <p> * If the details for that row are vis... | /**
* Scrolls to a certain row, using user-specified scroll destination.
* <p>
* If the details for that row are visible, those will be taken into account
* as well.
*
* @param rowIndex
* zero-based index of the row to scroll to.
* @param destination
* ... | Scrolls to a certain row, using user-specified scroll destination. If the details for that row are visible, those will be taken into account as well | scrollToRow | {
"repo_name": "peterl1084/framework",
"path": "client/src/main/java/com/vaadin/client/widgets/Grid.java",
"license": "apache-2.0",
"size": 332371
} | [
"com.vaadin.shared.ui.grid.GridConstants",
"com.vaadin.shared.ui.grid.ScrollDestination"
] | import com.vaadin.shared.ui.grid.GridConstants; import com.vaadin.shared.ui.grid.ScrollDestination; | import com.vaadin.shared.ui.grid.*; | [
"com.vaadin.shared"
] | com.vaadin.shared; | 1,349,306 |
@Override
protected final void renderGame(final GameContainer container, final StateBasedGame game, final Graphics g) {
g.clear();
}
| final void function(final GameContainer container, final StateBasedGame game, final Graphics g) { g.clear(); } | /**
* Rendering the GUI only requires that the display is cleared before rendering the screen.
*/ | Rendering the GUI only requires that the display is cleared before rendering the screen | renderGame | {
"repo_name": "xranby/nifty-gui",
"path": "nifty-renderer-slick/src/main/java/de/lessvoid/nifty/slick2d/NiftyGameState.java",
"license": "bsd-2-clause",
"size": 2386
} | [
"org.newdawn.slick.GameContainer",
"org.newdawn.slick.Graphics",
"org.newdawn.slick.state.StateBasedGame"
] | import org.newdawn.slick.GameContainer; import org.newdawn.slick.Graphics; import org.newdawn.slick.state.StateBasedGame; | import org.newdawn.slick.*; import org.newdawn.slick.state.*; | [
"org.newdawn.slick"
] | org.newdawn.slick; | 572,147 |
public ParticleSystem addModifier(ParticleModifier modifier) {
mModifiers.add(modifier);
return this;
} | ParticleSystem function(ParticleModifier modifier) { mModifiers.add(modifier); return this; } | /**
* Adds a modifier to the Particle system, it will be executed on each update.
*
* @param modifier modifier to be added to the ParticleSystem
*/ | Adds a modifier to the Particle system, it will be executed on each update | addModifier | {
"repo_name": "DanDits/WhatsThat",
"path": "leonidlib/src/main/java/com/plattysoft/leonids/ParticleSystem.java",
"license": "apache-2.0",
"size": 25060
} | [
"com.plattysoft.leonids.modifiers.ParticleModifier"
] | import com.plattysoft.leonids.modifiers.ParticleModifier; | import com.plattysoft.leonids.modifiers.*; | [
"com.plattysoft.leonids"
] | com.plattysoft.leonids; | 1,221,692 |
@SuppressWarnings("unchecked")
public List<Commander> listByPositionNation(final Position thisPosition, final Nation nation) {
final Session session = getSessionFactory().getCurrentSession();
final Criteria criteria = session.createCriteria(Commander.class);
criteria.add(Restrictions.eq(... | @SuppressWarnings(STR) List<Commander> function(final Position thisPosition, final Nation nation) { final Session session = getSessionFactory().getCurrentSession(); final Criteria criteria = session.createCriteria(Commander.class); criteria.add(Restrictions.eq(STR, nation)); if (thisPosition.getGame() == null) { criter... | /**
* Listing all the Commanders from the database at the specific position owned by the specific nation.
*
* @param thisPosition the position to select.
* @param nation the nation to select.
* @return a list of all the Commanders.
*/ | Listing all the Commanders from the database at the specific position owned by the specific nation | listByPositionNation | {
"repo_name": "EaW1805/data",
"path": "src/main/java/com/eaw1805/data/managers/army/CommanderManager.java",
"license": "mit",
"size": 10549
} | [
"com.eaw1805.data.model.Nation",
"com.eaw1805.data.model.army.Commander",
"com.eaw1805.data.model.map.Position",
"java.util.List",
"org.hibernate.Criteria",
"org.hibernate.Session",
"org.hibernate.criterion.Order",
"org.hibernate.criterion.Restrictions"
] | import com.eaw1805.data.model.Nation; import com.eaw1805.data.model.army.Commander; import com.eaw1805.data.model.map.Position; import java.util.List; import org.hibernate.Criteria; import org.hibernate.Session; import org.hibernate.criterion.Order; import org.hibernate.criterion.Restrictions; | import com.eaw1805.data.model.*; import com.eaw1805.data.model.army.*; import com.eaw1805.data.model.map.*; import java.util.*; import org.hibernate.*; import org.hibernate.criterion.*; | [
"com.eaw1805.data",
"java.util",
"org.hibernate",
"org.hibernate.criterion"
] | com.eaw1805.data; java.util; org.hibernate; org.hibernate.criterion; | 1,556,379 |
public NestedSet<LinkerInput> getTransitiveCcNativeLibraries() {
return transitiveCcNativeLibraries;
} | NestedSet<LinkerInput> function() { return transitiveCcNativeLibraries; } | /**
* Collects native libraries in the transitive closure of its deps that are needed for executing
* C/C++ code.
*
* <p>In effect, returns all dynamic library (.so) artifacts provided by the transitive closure.
*/ | Collects native libraries in the transitive closure of its deps that are needed for executing C/C++ code. In effect, returns all dynamic library (.so) artifacts provided by the transitive closure | getTransitiveCcNativeLibraries | {
"repo_name": "dropbox/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcNativeLibraryProvider.java",
"license": "apache-2.0",
"size": 1763
} | [
"com.google.devtools.build.lib.collect.nestedset.NestedSet"
] | import com.google.devtools.build.lib.collect.nestedset.NestedSet; | import com.google.devtools.build.lib.collect.nestedset.*; | [
"com.google.devtools"
] | com.google.devtools; | 1,911,550 |
@Test
public void updateProductTest() {
ProductEntity entity = data.get(0);
ProductEntity pojoEntity = factory.manufacturePojo(ProductEntity.class);
pojoEntity.setId(entity.getId());
productLogic.updateProduct(pojoEntity);
ProductEntity resp = em.find(ProductEntity.cla... | void function() { ProductEntity entity = data.get(0); ProductEntity pojoEntity = factory.manufacturePojo(ProductEntity.class); pojoEntity.setId(entity.getId()); productLogic.updateProduct(pojoEntity); ProductEntity resp = em.find(ProductEntity.class, entity.getId()); Assert.assertEquals(pojoEntity.getId(), resp.getId()... | /**
* Prueba para actualizar un Product
*
* @generated
*/ | Prueba para actualizar un Product | updateProductTest | {
"repo_name": "Uniandes-MISO4203/artwork-201620-2",
"path": "artwork-logic/src/test/java/co/edu/uniandes/csw/artwork/test/logic/ProductLogicTest.java",
"license": "mit",
"size": 6820
} | [
"co.edu.uniandes.csw.artwork.entities.ProductEntity",
"org.junit.Assert"
] | import co.edu.uniandes.csw.artwork.entities.ProductEntity; import org.junit.Assert; | import co.edu.uniandes.csw.artwork.entities.*; import org.junit.*; | [
"co.edu.uniandes",
"org.junit"
] | co.edu.uniandes; org.junit; | 806,868 |
Player player = Bukkit.getPlayer(uuid);
World world = ((CraftWorld) player.getWorld()).getHandle();
EnderCrystal enderCrystal = new EnderCrystal(world, EnumEntityType.BUFF);
Block b = Bukkit.getWorlds().get(0).getHighestBlockAt((int) player.getLocation().getX(), (int) player.getLocation().getZ()... | Player player = Bukkit.getPlayer(uuid); World world = ((CraftWorld) player.getWorld()).getHandle(); EnderCrystal enderCrystal = new EnderCrystal(world, EnumEntityType.BUFF); Block b = Bukkit.getWorlds().get(0).getHighestBlockAt((int) player.getLocation().getX(), (int) player.getLocation().getZ()); if (b.getLocation().d... | /**
* Adds the buff to a Endercrystal entity, takes a player UUID.
*
* @param uuid
* @since 1.0
*/ | Adds the buff to a Endercrystal entity, takes a player UUID | spawnBuff | {
"repo_name": "TheSecretLife/DR-API",
"path": "game/src/main/java/net/dungeonrealms/game/world/entity/util/BuffUtils.java",
"license": "gpl-3.0",
"size": 5766
} | [
"net.dungeonrealms.game.mastery.MetadataUtils",
"net.dungeonrealms.game.world.entity.EnumEntityType",
"net.dungeonrealms.game.world.entity.type.EnderCrystal",
"net.minecraft.server.v1_9_R2.World",
"org.bukkit.Bukkit",
"org.bukkit.Sound",
"org.bukkit.block.Block",
"org.bukkit.craftbukkit.v1_9_R2.CraftW... | import net.dungeonrealms.game.mastery.MetadataUtils; import net.dungeonrealms.game.world.entity.EnumEntityType; import net.dungeonrealms.game.world.entity.type.EnderCrystal; import net.minecraft.server.v1_9_R2.World; import org.bukkit.Bukkit; import org.bukkit.Sound; import org.bukkit.block.Block; import org.bukkit.cra... | import net.dungeonrealms.game.mastery.*; import net.dungeonrealms.game.world.entity.*; import net.dungeonrealms.game.world.entity.type.*; import net.minecraft.server.*; import org.bukkit.*; import org.bukkit.block.*; import org.bukkit.craftbukkit.*; import org.bukkit.entity.*; import org.bukkit.event.entity.*; | [
"net.dungeonrealms.game",
"net.minecraft.server",
"org.bukkit",
"org.bukkit.block",
"org.bukkit.craftbukkit",
"org.bukkit.entity",
"org.bukkit.event"
] | net.dungeonrealms.game; net.minecraft.server; org.bukkit; org.bukkit.block; org.bukkit.craftbukkit; org.bukkit.entity; org.bukkit.event; | 1,987,571 |
public PermissionsDescriptor getPermissionDescriptor(String authid, DataDictionary dd)
throws StandardException
{
return null;
} | PermissionsDescriptor function(String authid, DataDictionary dd) throws StandardException { return null; } | /**
* Schema level permission is never required as list of privileges required
* for triggers/constraints/views and hence we don't do any work here, but
* simply return null
*
* @see StatementPermission#check
*/ | Schema level permission is never required as list of privileges required for triggers/constraints/views and hence we don't do any work here, but simply return null | getPermissionDescriptor | {
"repo_name": "lpxz/grail-derby104",
"path": "java/engine/org/apache/derby/iapi/sql/dictionary/StatementSchemaPermission.java",
"license": "apache-2.0",
"size": 3662
} | [
"org.apache.derby.iapi.error.StandardException"
] | import org.apache.derby.iapi.error.StandardException; | import org.apache.derby.iapi.error.*; | [
"org.apache.derby"
] | org.apache.derby; | 442,571 |
public void update()
{
this.checkForAdjacentChests();
int i = this.pos.getX();
int j = this.pos.getY();
int k = this.pos.getZ();
++this.ticksSinceSync;
if (!this.worldObj.isRemote && this.numPlayersUsing != 0 && (this.ticksSinceSync + i + j + k) % 200 == 0)
... | void function() { this.checkForAdjacentChests(); int i = this.pos.getX(); int j = this.pos.getY(); int k = this.pos.getZ(); ++this.ticksSinceSync; if (!this.worldObj.isRemote && this.numPlayersUsing != 0 && (this.ticksSinceSync + i + j + k) % 200 == 0) { this.numPlayersUsing = 0; float f = 5.0F; for (EntityPlayer entit... | /**
* Like the old updateEntity(), except more generic.
*/ | Like the old updateEntity(), except more generic | update | {
"repo_name": "Im-Jrotica/forge_latest",
"path": "build/tmp/recompileMc/sources/net/minecraft/tileentity/TileEntityChest.java",
"license": "lgpl-2.1",
"size": 16800
} | [
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.init.SoundEvents",
"net.minecraft.inventory.ContainerChest",
"net.minecraft.inventory.IInventory",
"net.minecraft.inventory.InventoryLargeChest",
"net.minecraft.util.SoundCategory",
"net.minecraft.util.math.AxisAlignedBB"
] | import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.SoundEvents; import net.minecraft.inventory.ContainerChest; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.InventoryLargeChest; import net.minecraft.util.SoundCategory; import net.minecraft.util.math.AxisAlignedBB; | import net.minecraft.entity.player.*; import net.minecraft.init.*; import net.minecraft.inventory.*; import net.minecraft.util.*; import net.minecraft.util.math.*; | [
"net.minecraft.entity",
"net.minecraft.init",
"net.minecraft.inventory",
"net.minecraft.util"
] | net.minecraft.entity; net.minecraft.init; net.minecraft.inventory; net.minecraft.util; | 99,226 |
private long readUntilEnd(FSDataInputStream in, byte[] buffer, long size,
String fname, long pos, long visibleLen, boolean positionReadOption)
throws IOException {
if (pos >= visibleLen || visibleLen <= 0)
return 0;
int chunkNumber = 0;
long totalByteRead = 0;
long currentPosition ... | long function(FSDataInputStream in, byte[] buffer, long size, String fname, long pos, long visibleLen, boolean positionReadOption) throws IOException { if (pos >= visibleLen visibleLen <= 0) return 0; int chunkNumber = 0; long totalByteRead = 0; long currentPosition = pos; int byteRead = 0; long byteLeftToRead = visibl... | /**
* read chunks into buffer repeatedly until total of VisibleLen byte are read.
* Return total number of bytes read
*/ | read chunks into buffer repeatedly until total of VisibleLen byte are read. Return total number of bytes read | readUntilEnd | {
"repo_name": "ronny-macmaster/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestWriteRead.java",
"license": "apache-2.0",
"size": 18295
} | [
"java.io.IOException",
"org.apache.hadoop.fs.FSDataInputStream"
] | import java.io.IOException; import org.apache.hadoop.fs.FSDataInputStream; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,301,354 |
public static SSTableReader openForBatch(Descriptor descriptor, Set<Component> components, CFMetaData metadata, IPartitioner partitioner) throws IOException
{
// Minimum components without which we can't do anything
assert components.contains(Component.DATA) : "Data component is missing for ssta... | static SSTableReader function(Descriptor descriptor, Set<Component> components, CFMetaData metadata, IPartitioner partitioner) throws IOException { assert components.contains(Component.DATA) : STR + descriptor; assert components.contains(Component.PRIMARY_INDEX) : STR + descriptor; Map<MetadataType, MetadataComponent> ... | /**
* Open SSTable reader to be used in batch mode(such as sstableloader).
*
* @param descriptor
* @param components
* @param metadata
* @param partitioner
* @return opened SSTableReader
* @throws IOException
*/ | Open SSTable reader to be used in batch mode(such as sstableloader) | openForBatch | {
"repo_name": "daidong/GraphTrek",
"path": "src/java/org/apache/cassandra/io/sstable/SSTableReader.java",
"license": "apache-2.0",
"size": 78515
} | [
"java.io.File",
"java.io.IOException",
"java.util.EnumSet",
"java.util.Map",
"java.util.Set",
"org.apache.cassandra.config.CFMetaData",
"org.apache.cassandra.dht.IPartitioner",
"org.apache.cassandra.io.sstable.metadata.MetadataComponent",
"org.apache.cassandra.io.sstable.metadata.MetadataType",
"o... | import java.io.File; import java.io.IOException; import java.util.EnumSet; import java.util.Map; import java.util.Set; import org.apache.cassandra.config.CFMetaData; import org.apache.cassandra.dht.IPartitioner; import org.apache.cassandra.io.sstable.metadata.MetadataComponent; import org.apache.cassandra.io.sstable.me... | import java.io.*; import java.util.*; import org.apache.cassandra.config.*; import org.apache.cassandra.dht.*; import org.apache.cassandra.io.sstable.metadata.*; import org.apache.cassandra.io.util.*; import org.apache.cassandra.utils.*; | [
"java.io",
"java.util",
"org.apache.cassandra"
] | java.io; java.util; org.apache.cassandra; | 2,063,131 |
private static void onContextCreated(QDataContext dc) {
InterceptorFactory factory = m_interceptorFactory;
if(null != factory) {
var interceptor = factory.create((BuggyHibernateBaseContext) dc);
dc.setAttribute(Interceptor.class, interceptor);
}
} | static void function(QDataContext dc) { InterceptorFactory factory = m_interceptorFactory; if(null != factory) { var interceptor = factory.create((BuggyHibernateBaseContext) dc); dc.setAttribute(Interceptor.class, interceptor); } } | /**
* Called whenever a QDataContext is created, this adds whatever is needed to the QDataContext.
*/ | Called whenever a QDataContext is created, this adds whatever is needed to the QDataContext | onContextCreated | {
"repo_name": "fjalvingh/domui",
"path": "integrations/to.etc.domui.hibutil/src/main/java/to/etc/domui/hibernate/config/HibernateConfigurator.java",
"license": "lgpl-2.1",
"size": 19242
} | [
"org.hibernate.Interceptor",
"to.etc.domui.hibernate.generic.BuggyHibernateBaseContext",
"to.etc.webapp.query.QDataContext"
] | import org.hibernate.Interceptor; import to.etc.domui.hibernate.generic.BuggyHibernateBaseContext; import to.etc.webapp.query.QDataContext; | import org.hibernate.*; import to.etc.domui.hibernate.generic.*; import to.etc.webapp.query.*; | [
"org.hibernate",
"to.etc.domui",
"to.etc.webapp"
] | org.hibernate; to.etc.domui; to.etc.webapp; | 2,790,778 |
private void checkLine(int aLineno, String aLine, Matcher aMatcher,
int aStartPosition)
{
final boolean foundMatch = aMatcher.find(aStartPosition);
if (!foundMatch) {
return;
}
// match is found, check for intersection with comment
final ... | void function(int aLineno, String aLine, Matcher aMatcher, int aStartPosition) { final boolean foundMatch = aMatcher.find(aStartPosition); if (!foundMatch) { return; } final int startCol = aMatcher.start(0); final int endCol = aMatcher.end(0); if (mOptions.getSuppressor() .shouldSuppress(aLineno, startCol, aLineno, end... | /**
* Check a line for matches.
* @param aLineno the line number of the line to check
* @param aLine the line to check
* @param aMatcher the matcher to use
* @param aStartPosition the position to start searching from.
*/ | Check a line for matches | checkLine | {
"repo_name": "maikelsteneker/checkstyle-throwsIndent",
"path": "src/checkstyle/com/puppycrawl/tools/checkstyle/checks/regexp/SinglelineDetector.java",
"license": "lgpl-2.1",
"size": 4305
} | [
"java.util.regex.Matcher"
] | import java.util.regex.Matcher; | import java.util.regex.*; | [
"java.util"
] | java.util; | 1,209,469 |
protected void put(String key, DataProvider provider) {
if (mCombinedProviders.containsKey(key)) {
throw new IllegalArgumentException("The key[" + key + "] has been registered.");
}
mCombinedProviders.put(key, provider);
} | void function(String key, DataProvider provider) { if (mCombinedProviders.containsKey(key)) { throw new IllegalArgumentException(STR + key + STR); } mCombinedProviders.put(key, provider); } | /**
* It should only be called in your constructor.
*
* @param key
* @param provider
*/ | It should only be called in your constructor | put | {
"repo_name": "kifile/Cornerstone",
"path": "framework/src/main/java/com/kifile/android/cornerstone/impl/providers/CombinedDataProvider.java",
"license": "apache-2.0",
"size": 3282
} | [
"com.kifile.android.cornerstone.core.DataProvider"
] | import com.kifile.android.cornerstone.core.DataProvider; | import com.kifile.android.cornerstone.core.*; | [
"com.kifile.android"
] | com.kifile.android; | 2,673,400 |
String getLocaleName(Locale locale) {
String localeString = locale.toString();
String localeName = Toolkit.getProperty("AWT.InputMethodLanguage." + localeString, null);
if (localeName == null) {
localeName = locale.getDisplayName();
if (localeName == null || localeNam... | String getLocaleName(Locale locale) { String localeString = locale.toString(); String localeName = Toolkit.getProperty(STR + localeString, null); if (localeName == null) { localeName = locale.getDisplayName(); if (localeName == null localeName.length() == 0) localeName = localeString; } return localeName; } | /**
* Returns a localized locale name for input methods with the
* given locale. It falls back to Locale.getDisplayName() and
* then to Locale.toString() if no localized locale name is found.
*
* @param locale Locale for which localized locale name is obtained
*/ | Returns a localized locale name for input methods with the given locale. It falls back to Locale.getDisplayName() and then to Locale.toString() if no localized locale name is found | getLocaleName | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jdk/src/share/classes/sun/awt/im/InputMethodPopupMenu.java",
"license": "gpl-2.0",
"size": 9325
} | [
"java.awt.Toolkit",
"java.util.Locale"
] | import java.awt.Toolkit; import java.util.Locale; | import java.awt.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 2,869,303 |
int purgeCollisionMarkers(RevisionContext context) {
Map<Revision, String> valueMap = getLocalMap(COLLISIONS);
UpdateOp op = new UpdateOp(getId(), false);
int purgeCount = 0;
for (Map.Entry<Revision, String> commit : valueMap.entrySet()) {
Revision r = commit.getKey();
... | int purgeCollisionMarkers(RevisionContext context) { Map<Revision, String> valueMap = getLocalMap(COLLISIONS); UpdateOp op = new UpdateOp(getId(), false); int purgeCount = 0; for (Map.Entry<Revision, String> commit : valueMap.entrySet()) { Revision r = commit.getKey(); if (r.getClusterId() == context.getClusterId()) { ... | /**
* Purge collision markers with the local clusterId on this document. Use
* only on start when there are no ongoing or pending commits.
*
* @param context the revision context.
* @return the number of removed collision markers.
*/ | Purge collision markers with the local clusterId on this document. Use only on start when there are no ongoing or pending commits | purgeCollisionMarkers | {
"repo_name": "joansmith/jackrabbit-oak",
"path": "oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/NodeDocument.java",
"license": "apache-2.0",
"size": 87655
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,170,019 |
public static void killProcessGroup(String pgrpId, Signal signal) {
//If process tree is not alive then return immediately.
if(!ProcessTree.isProcessGroupAlive(pgrpId)) {
return;
}
String[] args = { "kill", "-" + signal.getValue() , "-"+pgrpId };
ShellCommandExecutor shexec = new ShellComm... | static void function(String pgrpId, Signal signal) { if(!ProcessTree.isProcessGroupAlive(pgrpId)) { return; } String[] args = { "kill", "-" + signal.getValue() , "-"+pgrpId }; ShellCommandExecutor shexec = new ShellCommandExecutor(args); try { shexec.execute(); } catch (IOException e) { LOG.warn(STR + signal + STR+ pgr... | /**
* Sends signal to all process belonging to same process group,
* forcefully terminating the process group.
*
* @param pgrpId process group id
* @param signal the signal number to send
*/ | Sends signal to all process belonging to same process group, forcefully terminating the process group | killProcessGroup | {
"repo_name": "gndpig/hadoop",
"path": "src/core/org/apache/hadoop/util/ProcessTree.java",
"license": "apache-2.0",
"size": 7108
} | [
"java.io.IOException",
"org.apache.hadoop.util.Shell"
] | import java.io.IOException; import org.apache.hadoop.util.Shell; | import java.io.*; import org.apache.hadoop.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 252,076 |
public void removeMessage() throws IOException
{
System.out.println("Preparing to remove a message");
String hostAddress = getApiHost() + "/chat.delete";
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType,
slackInfo.getTokenUR... | void function() throws IOException { System.out.println(STR); String hostAddress = getApiHost() + STR; MediaType mediaType = MediaType.parse(STR); RequestBody body = RequestBody.create(mediaType, slackInfo.getTokenURL() + slackInfo.getChannelURL() + slackInfo.getDeleteMessageURL()); postAPI(hostAddress, body); } | /**
* Removes a message or a group of messages from the Channel or Group
* @throws IOException
*/ | Removes a message or a group of messages from the Channel or Group | removeMessage | {
"repo_name": "Disorientedart/SlackBot",
"path": "src/main/java/slackAPI/APICalls.java",
"license": "mit",
"size": 8876
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 243,105 |
public static void unzipFileToDirectory(String fullFilePath, String directoryPath, boolean deleteAfterUnzip) {
// at this point we should have the zip downloaded and on the local filesystem
// now we want to unzip it
try {
ZipFile zf = new ZipFile(fullFilePath);
Enumeration list = zf.entries();
... | static void function(String fullFilePath, String directoryPath, boolean deleteAfterUnzip) { try { ZipFile zf = new ZipFile(fullFilePath); Enumeration list = zf.entries(); while (list.hasMoreElements()) { ZipEntry ze = (ZipEntry)list.nextElement(); if (ze.isDirectory()) { continue; } try { dumpZipEntry(directoryPath, zf... | /**
* Unzips the zip file at the specified path to the specified directory
* optionally deletes the zip afterwards
* @param fullFilePath The full path to the zip file
* @param directoryPath The path to the directory where things should be unzipped
* @param deleteAfterUnzip Whether to delete the original zip a... | Unzips the zip file at the specified path to the specified directory optionally deletes the zip afterwards | unzipFileToDirectory | {
"repo_name": "MesquiteProject/MesquiteArchive",
"path": "releases/Mesquite2.73/Mesquite Project/Source/mesquite/lib/ZipUtil.java",
"license": "lgpl-3.0",
"size": 5257
} | [
"java.io.File",
"java.io.IOException",
"java.util.Enumeration",
"java.util.zip.ZipEntry",
"java.util.zip.ZipException",
"java.util.zip.ZipFile"
] | import java.io.File; import java.io.IOException; import java.util.Enumeration; import java.util.zip.ZipEntry; import java.util.zip.ZipException; import java.util.zip.ZipFile; | import java.io.*; import java.util.*; import java.util.zip.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,165,391 |
private void writeObject(ObjectOutputStream oos) throws IOException {
oos.defaultWriteObject();
oos.writeInt(array.length);
for (int i = 0; i < array.length; i++) {
oos.writeObject(array[i]);
}
} | void function(ObjectOutputStream oos) throws IOException { oos.defaultWriteObject(); oos.writeInt(array.length); for (int i = 0; i < array.length; i++) { oos.writeObject(array[i]); } } | /**
* Writes objects to the stream from
* the transient {@code Object[] array} field.
*
* @serialData
* A nonnegative int, indicating the count of objects,
* followed by that many objects.
*
* @param oos the ObjectOutputStream to which data is written
* @throws IOException i... | Writes objects to the stream from the transient Object[] array field | writeObject | {
"repo_name": "streamsupport/streamsupport",
"path": "src/literal/java/java8/util/Unmodifiable.java",
"license": "gpl-2.0",
"size": 31964
} | [
"java.io.IOException",
"java.io.ObjectOutputStream"
] | import java.io.IOException; import java.io.ObjectOutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,211,495 |
// <editor-fold defaultstate="collapsed" desc=" Generated Code
// ">//GEN-BEGIN:initComponents
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
blackrevertedGroup = new javax.swing.ButtonGroup();
BColumnGroup = new javax.swing.ButtonGroup();
blackdeletedGroup = new ... | void function() { java.awt.GridBagConstraints gridBagConstraints; blackrevertedGroup = new javax.swing.ButtonGroup(); BColumnGroup = new javax.swing.ButtonGroup(); blackdeletedGroup = new javax.swing.ButtonGroup(); watchdeletedGroup = new javax.swing.ButtonGroup(); watchwarnedGroup = new javax.swing.ButtonGroup(); jPan... | /**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. regenerated by the Form Editor | initComponents | {
"repo_name": "fluffis/VandalFighter",
"path": "src/gui/Vf.java",
"license": "gpl-2.0",
"size": 236798
} | [
"java.awt.FlowLayout",
"java.awt.GridBagConstraints",
"javax.swing.JButton",
"javax.swing.JComboBox",
"javax.swing.JEditorPane",
"javax.swing.JLabel",
"javax.swing.JList",
"javax.swing.JMenuItem",
"javax.swing.JPanel",
"javax.swing.JPopupMenu",
"javax.swing.JScrollPane",
"javax.swing.JTextFiel... | import java.awt.FlowLayout; import java.awt.GridBagConstraints; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JEditorPane; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JMenuItem; import javax.swing.JPanel; import javax.swing.JPopupMenu; import javax.swing.JScrol... | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,385,624 |
public static Point worldToMiniMap(Client client, int x, int y, int distance)
{
int angle = client.getMapAngle() & 0x7FF;
LocalPoint localLocation = client.getLocalPlayer().getLocalLocation();
x = x / 32 - localLocation.getX() / 32;
y = y / 32 - localLocation.getY() / 32;
int dist = x * x + y * y;
if ... | static Point function(Client client, int x, int y, int distance) { int angle = client.getMapAngle() & 0x7FF; LocalPoint localLocation = client.getLocalPlayer().getLocalLocation(); x = x / 32 - localLocation.getX() / 32; y = y / 32 - localLocation.getY() / 32; int dist = x * x + y * y; if (dist < distance) { int sin = S... | /**
* Translates two-dimensional ground coordinates within the 3D world to
* their corresponding coordinates on the Minimap.
*
* @param client
* @param x ground coordinate on the x axis
* @param y ground coordinate on the y axis
* @param distance max distance from local player to minimap point
* @return... | Translates two-dimensional ground coordinates within the 3D world to their corresponding coordinates on the Minimap | worldToMiniMap | {
"repo_name": "UniquePassive/runelite",
"path": "runelite-api/src/main/java/net/runelite/api/Perspective.java",
"license": "bsd-2-clause",
"size": 20638
} | [
"net.runelite.api.coords.LocalPoint"
] | import net.runelite.api.coords.LocalPoint; | import net.runelite.api.coords.*; | [
"net.runelite.api"
] | net.runelite.api; | 2,585,107 |
public boolean assignFromViewIfValid(View child, RecyclerView.State state) {
RecyclerView.LayoutParams lp = (RecyclerView.LayoutParams) child.getLayoutParams();
if (!lp.isItemRemoved() && lp.getViewPosition() >= 0
&& lp.getViewPosition() < state.getItemCount()) {
... | boolean function(View child, RecyclerView.State state) { RecyclerView.LayoutParams lp = (RecyclerView.LayoutParams) child.getLayoutParams(); if (!lp.isItemRemoved() && lp.getViewPosition() >= 0 && lp.getViewPosition() < state.getItemCount()) { assignFromView(child); return true; } return false; } | /**
* Assign anchor position information from the provided view if it is valid as a reference
* child.
*/ | Assign anchor position information from the provided view if it is valid as a reference child | assignFromViewIfValid | {
"repo_name": "weiwenqiang/GitHub",
"path": "Subentry/vlayout-master/vlayout/src/main/java/com/alibaba/android/vlayout/ExposeLinearLayoutManagerEx.java",
"license": "apache-2.0",
"size": 79060
} | [
"android.support.v7.widget.RecyclerView",
"android.view.View"
] | import android.support.v7.widget.RecyclerView; import android.view.View; | import android.support.v7.widget.*; import android.view.*; | [
"android.support",
"android.view"
] | android.support; android.view; | 2,717,716 |
public StorageFile getParentDir()
{
return realFile.getParentDir();
} | StorageFile function() { return realFile.getParentDir(); } | /**
* Get the name of the parent directory if this name includes a parent.
*
* @return An StorageFile denoting the parent directory of this StorageFile,
* if it has a parent, null if it does not have a parent.
*/ | Get the name of the parent directory if this name includes a parent | getParentDir | {
"repo_name": "apache/derby",
"path": "java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/util/corruptio/CorruptFile.java",
"license": "apache-2.0",
"size": 12127
} | [
"org.apache.derby.io.StorageFile"
] | import org.apache.derby.io.StorageFile; | import org.apache.derby.io.*; | [
"org.apache.derby"
] | org.apache.derby; | 258,279 |
public void onNewDataReceived(T value) {
behaviorSubject.onNext(Notification.createOnNext(value));
} | void function(T value) { behaviorSubject.onNext(Notification.createOnNext(value)); } | /**
* Method is called when new data is received form firebase.
* @param value new fresh data.
*/ | Method is called when new data is received form firebase | onNewDataReceived | {
"repo_name": "Link184/Respiration",
"path": "respiration-core/src/main/java/com/link184/respiration/repository/base/Repository.java",
"license": "gpl-3.0",
"size": 2664
} | [
"io.reactivex.Notification"
] | import io.reactivex.Notification; | import io.reactivex.*; | [
"io.reactivex"
] | io.reactivex; | 2,308,668 |
protected void createBonusChest()
{
WorldGeneratorBonusChest worldgeneratorbonuschest = new WorldGeneratorBonusChest();
for (int i = 0; i < 10; ++i)
{
int j = this.worldInfo.getSpawnX() + this.rand.nextInt(6) - this.rand.nextInt(6);
int k = this.worldInfo.getSpaw... | void function() { WorldGeneratorBonusChest worldgeneratorbonuschest = new WorldGeneratorBonusChest(); for (int i = 0; i < 10; ++i) { int j = this.worldInfo.getSpawnX() + this.rand.nextInt(6) - this.rand.nextInt(6); int k = this.worldInfo.getSpawnZ() + this.rand.nextInt(6) - this.rand.nextInt(6); BlockPos blockpos = thi... | /**
* Creates the bonus chest in the world.
*/ | Creates the bonus chest in the world | createBonusChest | {
"repo_name": "SuperUnitato/UnLonely",
"path": "build/tmp/recompileMc/sources/net/minecraft/world/WorldServer.java",
"license": "lgpl-2.1",
"size": 54853
} | [
"net.minecraft.util.math.BlockPos",
"net.minecraft.world.gen.feature.WorldGeneratorBonusChest"
] | import net.minecraft.util.math.BlockPos; import net.minecraft.world.gen.feature.WorldGeneratorBonusChest; | import net.minecraft.util.math.*; import net.minecraft.world.gen.feature.*; | [
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.util; net.minecraft.world; | 1,035,221 |
public static boolean addLinks(@NonNull Spannable spannable, @NonNull Pattern pattern,
@Nullable String defaultScheme, @Nullable String[] schemes,
@Nullable MatchFilter matchFilter, @Nullable TransformFilter transformFilter) {
if (shouldAddLinksFallbackToFramework()) {
r... | static boolean function(@NonNull Spannable spannable, @NonNull Pattern pattern, @Nullable String defaultScheme, @Nullable String[] schemes, @Nullable MatchFilter matchFilter, @Nullable TransformFilter transformFilter) { if (shouldAddLinksFallbackToFramework()) { return Api24Impl.addLinks(spannable, pattern, defaultSche... | /**
* Applies a regex to a Spannable turning the matches into links.
*
* @param spannable Spannable whose text is to be marked-up with links.
* @param pattern Regex pattern to be used for finding links.
* @param defaultScheme The default scheme to be prepended to links if the link does not
... | Applies a regex to a Spannable turning the matches into links | addLinks | {
"repo_name": "AndroidX/androidx",
"path": "core/core/src/main/java/androidx/core/text/util/LinkifyCompat.java",
"license": "apache-2.0",
"size": 20796
} | [
"android.text.Spannable",
"android.text.util.Linkify",
"androidx.annotation.NonNull",
"androidx.annotation.Nullable",
"java.util.Locale",
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import android.text.Spannable; import android.text.util.Linkify; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; | import android.text.*; import android.text.util.*; import androidx.annotation.*; import java.util.*; import java.util.regex.*; | [
"android.text",
"androidx.annotation",
"java.util"
] | android.text; androidx.annotation; java.util; | 422,509 |
public static void validateOperation(StockOperation operation) {
if (operation == null) {
throw new IllegalArgumentException("The operation to submit must be defined.");
}
if (operation.getInstanceType() == null) {
throw new APIException("The operation instance type must be defined.");
}
if (operatio... | static void function(StockOperation operation) { if (operation == null) { throw new IllegalArgumentException(STR); } if (operation.getInstanceType() == null) { throw new APIException(STR); } if (operation.getStatus() == null) { throw new APIException(STR); } IStockOperationType type = operation.getInstanceType(); if (t... | /**
* Validates the stock operation.
* @param operation The stock operation to validate.
* @throws org.openmrs.api.APIException
* @should throw an APIException if the type requires a source and the source is null
* @should throw an APIException if the type requires a destination and the destination is null
... | Validates the stock operation | validateOperation | {
"repo_name": "k-joseph/openmrs-module-openhmis.inventory",
"path": "api/src/main/java/org/openmrs/module/openhmis/inventory/api/impl/StockOperationServiceImpl.java",
"license": "mpl-2.0",
"size": 37928
} | [
"org.openmrs.api.APIException",
"org.openmrs.module.openhmis.inventory.api.model.IStockOperationType",
"org.openmrs.module.openhmis.inventory.api.model.StockOperation"
] | import org.openmrs.api.APIException; import org.openmrs.module.openhmis.inventory.api.model.IStockOperationType; import org.openmrs.module.openhmis.inventory.api.model.StockOperation; | import org.openmrs.api.*; import org.openmrs.module.openhmis.inventory.api.model.*; | [
"org.openmrs.api",
"org.openmrs.module"
] | org.openmrs.api; org.openmrs.module; | 1,583,091 |
public GridData getGridData_Station(int vIdx, String stID) {
try {
GridData gData = new GridData();
gData.missingValue = this.getMissingValue();
RandomAccessFile br = new RandomAccessFile(DSET, "r");
int i, stNum, tNum;
STDataHead aSTDH = n... | GridData function(int vIdx, String stID) { try { GridData gData = new GridData(); gData.missingValue = this.getMissingValue(); RandomAccessFile br = new RandomAccessFile(DSET, "r"); int i, stNum, tNum; STDataHead aSTDH = new STDataHead(); STLevData aSTLevData = new STLevData(); STData aSTData = new STData(); Variable a... | /**
* Get GrADS station data
*
* @param vIdx Variable index
* @param stID Station identifer
* @return Grid data
*/ | Get GrADS station data | getGridData_Station | {
"repo_name": "meteoinfo/meteoinfolib",
"path": "src/org/meteoinfo/data/meteodata/grads/GrADSDataInfo.java",
"license": "lgpl-3.0",
"size": 115651
} | [
"java.io.FileNotFoundException",
"java.io.IOException",
"java.io.RandomAccessFile",
"java.util.ArrayList",
"java.util.logging.Level",
"java.util.logging.Logger",
"org.meteoinfo.data.GridData",
"org.meteoinfo.data.meteodata.Variable",
"org.meteoinfo.global.DataConvert",
"org.meteoinfo.global.util.D... | import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; import java.util.ArrayList; import java.util.logging.Level; import java.util.logging.Logger; import org.meteoinfo.data.GridData; import org.meteoinfo.data.meteodata.Variable; import org.meteoinfo.global.DataConvert; impor... | import java.io.*; import java.util.*; import java.util.logging.*; import org.meteoinfo.data.*; import org.meteoinfo.data.meteodata.*; import org.meteoinfo.global.*; import org.meteoinfo.global.util.*; | [
"java.io",
"java.util",
"org.meteoinfo.data",
"org.meteoinfo.global"
] | java.io; java.util; org.meteoinfo.data; org.meteoinfo.global; | 561,807 |
@RequestMapping(method = RequestMethod.GET, value = CONCEPT_REFERENCE_TERM_FORM_URL)
public String showForm() {
return CONCEPT_REFERENCE_TERM_FORM;
}
| @RequestMapping(method = RequestMethod.GET, value = CONCEPT_REFERENCE_TERM_FORM_URL) String function() { return CONCEPT_REFERENCE_TERM_FORM; } | /**
* Processes requests to display the form
*/ | Processes requests to display the form | showForm | {
"repo_name": "pselle/openmrs-core",
"path": "web/src/main/java/org/openmrs/web/controller/concept/ConceptReferenceTermFormController.java",
"license": "mpl-2.0",
"size": 13256
} | [
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotation.RequestMethod"
] | import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; | import org.springframework.web.bind.annotation.*; | [
"org.springframework.web"
] | org.springframework.web; | 224,855 |
public UserLocalService getUserLocalService() {
return userLocalService;
} | UserLocalService function() { return userLocalService; } | /**
* Returns the user local service.
*
* @return the user local service
*/ | Returns the user local service | getUserLocalService | {
"repo_name": "iucn-whp/world-heritage-outlook",
"path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/base/understanding_benefitsLocalServiceBaseImpl.java",
"license": "gpl-2.0",
"size": 165788
} | [
"com.liferay.portal.service.UserLocalService"
] | import com.liferay.portal.service.UserLocalService; | import com.liferay.portal.service.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 500,242 |
void performPersonMassChange(PersonMassChange personMassChange, List<IacucProtocol> iacucProtocolChangeCandidates); | void performPersonMassChange(PersonMassChange personMassChange, List<IacucProtocol> iacucProtocolChangeCandidates); | /**
* Performs the Person Mass Change on the IACUC Protocols.
*
* @param personMassChange the Person Mass Change to be performed
* @param iacucProtocolChangeCandidates the IACUC Protocols to perform a Person Mass Change on
*/ | Performs the Person Mass Change on the IACUC Protocols | performPersonMassChange | {
"repo_name": "sanjupolus/KC6.oLatest",
"path": "coeus-impl/src/main/java/org/kuali/kra/personmasschange/service/IacucProtocolPersonMassChangeService.java",
"license": "agpl-3.0",
"size": 1889
} | [
"java.util.List",
"org.kuali.kra.iacuc.IacucProtocol",
"org.kuali.kra.personmasschange.bo.PersonMassChange"
] | import java.util.List; import org.kuali.kra.iacuc.IacucProtocol; import org.kuali.kra.personmasschange.bo.PersonMassChange; | import java.util.*; import org.kuali.kra.iacuc.*; import org.kuali.kra.personmasschange.bo.*; | [
"java.util",
"org.kuali.kra"
] | java.util; org.kuali.kra; | 406,942 |
public List<VolatileJavaFile> getEmitted() {
return emitted;
} | List<VolatileJavaFile> function() { return emitted; } | /**
* Returns the emitted files.
* @return the emitted files
*/ | Returns the emitted files | getEmitted | {
"repo_name": "akirakw/asakusafw",
"path": "sandbox-project/asakusa-windgate-dmdl-ext/src/test/java/com/asakusafw/dmdl/windgate/stream/driver/VolatileEmitter.java",
"license": "apache-2.0",
"size": 2007
} | [
"com.asakusafw.utils.java.jsr199.testing.VolatileJavaFile",
"java.util.List"
] | import com.asakusafw.utils.java.jsr199.testing.VolatileJavaFile; import java.util.List; | import com.asakusafw.utils.java.jsr199.testing.*; import java.util.*; | [
"com.asakusafw.utils",
"java.util"
] | com.asakusafw.utils; java.util; | 1,920,929 |
@Test
public void testOldConverter284() {
ICodePage cp = CharMappings.getCodePage("284");
assertNotNull("At least an ASCII Codepage should be available.", cp);
for (int i = 0; i < TESTSTRING.length; i++) {
final char beginvalue = TESTSTRING[i];
final byt... | void function() { ICodePage cp = CharMappings.getCodePage("284"); assertNotNull(STR, cp); for (int i = 0; i < TESTSTRING.length; i++) { final char beginvalue = TESTSTRING[i]; final byte converted = cp.uni2ebcdic(beginvalue); final char afterall = cp.ebcdic2uni(converted & 0xFF); assertEquals(STR + i, beginvalue, aftera... | /**
* Correctness test for old implementation ....
*/ | Correctness test for old implementation ... | testOldConverter284 | {
"repo_name": "tn5250j/tn5250j",
"path": "tests/org/tn5250j/encoding/builtin/CCSID284Test.java",
"license": "gpl-2.0",
"size": 3691
} | [
"org.junit.Assert",
"org.tn5250j.encoding.CharMappings",
"org.tn5250j.encoding.ICodePage"
] | import org.junit.Assert; import org.tn5250j.encoding.CharMappings; import org.tn5250j.encoding.ICodePage; | import org.junit.*; import org.tn5250j.encoding.*; | [
"org.junit",
"org.tn5250j.encoding"
] | org.junit; org.tn5250j.encoding; | 2,080,738 |
TestSuite suite = new TestSuite ( ServerActiveHtmlAttributesTest.class );
return suite;
}
| TestSuite suite = new TestSuite ( ServerActiveHtmlAttributesTest.class ); return suite; } | /**
* A <code>TestSuite</code> is a <code>Composite</code> of Tests.
* It runs a collection of test cases.
*
* This constructor creates a suite with all the methods
* starting with "test" that take no arguments.
*/ | A <code>TestSuite</code> is a <code>Composite</code> of Tests. It runs a collection of test cases. This constructor creates a suite with all the methods starting with "test" that take no arguments | suite | {
"repo_name": "janekdb/ntropa",
"path": "presentation/wps/src/tests/org/ntropa/build/html/ServerActiveHtmlAttributesTest.java",
"license": "apache-2.0",
"size": 4291
} | [
"junit.framework.TestSuite"
] | import junit.framework.TestSuite; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 2,879,439 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.