method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public void logoutUser(){
// Clearing all data from Shared Preferences
editor.clear();
editor.commit();
// After logout redirect user to Loing Activity
Intent i = new Intent(_context, LoginActivity.class);
// Closing all the Activities
i.addFlags(Intent.FLAG_... | void function(){ editor.clear(); editor.commit(); Intent i = new Intent(_context, LoginActivity.class); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); _context.startActivity(i); } | /**
* Clear session details
* */ | Clear session details | logoutUser | {
"repo_name": "xstreamcl/liftplease",
"path": "app/src/main/java/in/co/liftplease/myapplication/SessionManager.java",
"license": "mit",
"size": 4114
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 587,622 |
public static void reset(File directory, int processNumber) {
try (DefaultProcessCommands processCommands = new DefaultProcessCommands(directory, processNumber, true)) {
// nothing else to do than open file and reset the space of specified process
}
} | static void function(File directory, int processNumber) { try (DefaultProcessCommands processCommands = new DefaultProcessCommands(directory, processNumber, true)) { } } | /**
* Clears the shared memory space of the specified process number.
*/ | Clears the shared memory space of the specified process number | reset | {
"repo_name": "Godin/sonar",
"path": "server/sonar-process/src/main/java/org/sonar/process/sharedmemoryfile/DefaultProcessCommands.java",
"license": "lgpl-3.0",
"size": 4000
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 498,412 |
void setRequest(HttpServletRequest request); | void setRequest(HttpServletRequest request); | /**
* INTERNAL: Callback method handing over the current servlet
* request. This method will be called once per HTTP request.
*/ | request. This method will be called once per HTTP request | setRequest | {
"repo_name": "ontopia/ontopia",
"path": "ontopia-classify/src/main/java/net/ontopia/topicmaps/classify/HttpServletRequestAwareIF.java",
"license": "apache-2.0",
"size": 1124
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 820,147 |
private static void deleteAllSystemStatus(Connection con, Long userId) {
try {
PreparedStatement stmt = con.prepareStatement("delete from status where user_id=?");
stmt.setLong(1,userId);
stmt.execute();
DBUtils.closeStmt(stmt);
} catch (Exception e... | static void function(Connection con, Long userId) { try { PreparedStatement stmt = con.prepareStatement(STR); stmt.setLong(1,userId); stmt.execute(); DBUtils.closeStmt(stmt); } catch (Exception e) { e.printStackTrace(); } } | /**
* deletes all records from status table for user
*
* @param con DB connection object
* @param userId user id
*/ | deletes all records from status table for user | deleteAllSystemStatus | {
"repo_name": "skavanagh/KeyBox-OpenShift",
"path": "src/main/java/com/keybox/manage/db/SystemStatusDB.java",
"license": "apache-2.0",
"size": 9247
} | [
"com.keybox.manage.util.DBUtils",
"java.sql.Connection",
"java.sql.PreparedStatement"
] | import com.keybox.manage.util.DBUtils; import java.sql.Connection; import java.sql.PreparedStatement; | import com.keybox.manage.util.*; import java.sql.*; | [
"com.keybox.manage",
"java.sql"
] | com.keybox.manage; java.sql; | 1,562,342 |
protected boolean goTo(final Context context, final Location location) {
if (location == null) {
game(context, GAME_ACTIONS_GOTO_ERROR_NOWAY);
return false;
}
final World world = context.getWorld();
repopulateLocations(world);
game(context, GAME_ACTIONS_GOTO_LEFT_LOCATION, world.getLoc... | boolean function(final Context context, final Location location) { if (location == null) { game(context, GAME_ACTIONS_GOTO_ERROR_NOWAY); return false; } final World world = context.getWorld(); repopulateLocations(world); game(context, GAME_ACTIONS_GOTO_LEFT_LOCATION, world.getLocation().getName()); world.setLocation(lo... | /**
* Move character to specified location if there is a path.
*
* @param context
* @param location
* @return
*/ | Move character to specified location if there is a path | goTo | {
"repo_name": "marc-/got",
"path": "src/main/java/org/github/got/commands/CombatCommands.java",
"license": "apache-2.0",
"size": 7817
} | [
"org.github.got.Context",
"org.github.got.Location",
"org.github.got.World",
"org.github.got.location.Town"
] | import org.github.got.Context; import org.github.got.Location; import org.github.got.World; import org.github.got.location.Town; | import org.github.got.*; import org.github.got.location.*; | [
"org.github.got"
] | org.github.got; | 2,840,980 |
public PaintBuilder setColorFilter(ColorFilter filter) {
paint.setColorFilter(filter);
return this;
}
| PaintBuilder function(ColorFilter filter) { paint.setColorFilter(filter); return this; } | /**
* Set or clear the paint's colorfilter.
*
* @param filter May be null. The new filter to be installed in the paint
*/ | Set or clear the paint's colorfilter | setColorFilter | {
"repo_name": "Floern/android",
"path": "src/com/floern/android/util/PaintBuilder.java",
"license": "mit",
"size": 14340
} | [
"android.graphics.ColorFilter"
] | import android.graphics.ColorFilter; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,039,120 |
@Override
public String toString() {
final String precisionStr = new DecimalFormat("0.#E0").format(Math.pow(2, precision));
return "Leap indicator: " + leapIndicator + "\n" + "Version: " + version + "\n" + "Mode: " + mode + "\n" + "Stratum: " + stratum + "\n" + "Poll: " + pollInterval + "\n" + "... | String function() { final String precisionStr = new DecimalFormat("0.#E0").format(Math.pow(2, precision)); return STR + leapIndicator + "\n" + STR + version + "\n" + STR + mode + "\n" + STR + stratum + "\n" + STR + pollInterval + "\n" + STR + precision + STR + precisionStr + STR + STR + new DecimalFormat("0.00").format... | /**
* Returns a string representation of a NtpMessage
*
* @return a {@link java.lang.String} object.
*/ | Returns a string representation of a NtpMessage | toString | {
"repo_name": "rfdrake/opennms",
"path": "opennms-provision/opennms-detector-datagram/src/main/java/org/opennms/netmgt/provision/support/ntp/NtpMessage.java",
"license": "gpl-2.0",
"size": 19415
} | [
"java.text.DecimalFormat"
] | import java.text.DecimalFormat; | import java.text.*; | [
"java.text"
] | java.text; | 1,258,447 |
public static Test suite()
{
TestSuite suite = new TestSuite();
tests1(suite);
return suite;
}
| static Test function() { TestSuite suite = new TestSuite(); tests1(suite); return suite; } | /**
* Creates the test suite
*
* @return the test suite
*/ | Creates the test suite | suite | {
"repo_name": "nguyentienlong/community-edition",
"path": "projects/remote-api/source/test-java/org/alfresco/RemoteApi01TestSuite.java",
"license": "lgpl-3.0",
"size": 3893
} | [
"junit.framework.Test",
"junit.framework.TestSuite"
] | import junit.framework.Test; import junit.framework.TestSuite; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 1,546,160 |
private Node parseArrayType(JsDocToken token) {
Node array = newNode(Token.LB);
Node arg = null;
boolean hasVarArgs = false;
do {
if (arg != null) {
next();
skipEOLs();
token = next();
}
if (token == JsDocToken.ELLIPSIS) {
arg = wrapNode(Token.ELLIPSI... | Node function(JsDocToken token) { Node array = newNode(Token.LB); Node arg = null; boolean hasVarArgs = false; do { if (arg != null) { next(); skipEOLs(); token = next(); } if (token == JsDocToken.ELLIPSIS) { arg = wrapNode(Token.ELLIPSIS, parseTypeExpression(next())); hasVarArgs = true; } else { arg = parseTypeExpress... | /**
* ArrayType := '[' ElementTypeList ']'
* ElementTypeList := <empty> | TypeExpression | '...' TypeExpression
* | TypeExpression ',' ElementTypeList
*/ | ArrayType := '[' ElementTypeList ']' ElementTypeList := | TypeExpression | '...' TypeExpression | TypeExpression ',' ElementTypeList | parseArrayType | {
"repo_name": "nuxleus/closure-compiler",
"path": "src/com/google/javascript/jscomp/parsing/JsDocInfoParser.java",
"license": "apache-2.0",
"size": 72918
} | [
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.Token"
] | import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 647,709 |
public void authenticate() {
URL url;
try {
url = new URL(this.getTokenURL());
} catch (MalformedURLException e) {
assert false : "An invalid token URL indicates a bug in the SDK.";
throw new RuntimeException("An invalid token URL indicates a bug in the SD... | void function() { URL url; try { url = new URL(this.getTokenURL()); } catch (MalformedURLException e) { assert false : STR; throw new RuntimeException(STR, e); } String jwtAssertion = this.constructJWTAssertion(); String urlParameters = String.format(JWT_GRANT_TYPE, this.getClientID(), this.getClientSecret(), jwtAssert... | /**
* Authenticates the API connection for Box Developer Edition.
*/ | Authenticates the API connection for Box Developer Edition | authenticate | {
"repo_name": "itsmanishagarwal/box-java-sdk",
"path": "src/main/java/com/box/sdk/BoxDeveloperEditionAPIConnection.java",
"license": "apache-2.0",
"size": 24466
} | [
"com.eclipsesource.json.JsonObject",
"java.net.MalformedURLException",
"java.text.ParseException",
"java.text.SimpleDateFormat",
"java.util.Date",
"java.util.List",
"org.jose4j.jwt.NumericDate"
] | import com.eclipsesource.json.JsonObject; import java.net.MalformedURLException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import org.jose4j.jwt.NumericDate; | import com.eclipsesource.json.*; import java.net.*; import java.text.*; import java.util.*; import org.jose4j.jwt.*; | [
"com.eclipsesource.json",
"java.net",
"java.text",
"java.util",
"org.jose4j.jwt"
] | com.eclipsesource.json; java.net; java.text; java.util; org.jose4j.jwt; | 2,280,744 |
private List getUserRoles(DirContext dirContext, String username) throws LoginException, NamingException
{
String userDn = _userRdnAttribute + "=" + username + "," + _userBaseDn;
return getUserRolesByDn(dirContext, userDn);
}
| List function(DirContext dirContext, String username) throws LoginException, NamingException { String userDn = _userRdnAttribute + "=" + username + "," + _userBaseDn; return getUserRolesByDn(dirContext, userDn); } | /**
* attempts to get the users roles from the root context
* <p/>
* NOTE: this is not an user authenticated operation
*
* @param dirContext
* @param username
* @return
* @throws LoginException
*/ | attempts to get the users roles from the root context | getUserRoles | {
"repo_name": "wang88/jetty",
"path": "jetty-plus/src/main/java/org/eclipse/jetty/plus/jaas/spi/LdapLoginModule.java",
"license": "apache-2.0",
"size": 21217
} | [
"java.util.List",
"javax.naming.NamingException",
"javax.naming.directory.DirContext",
"javax.security.auth.login.LoginException"
] | import java.util.List; import javax.naming.NamingException; import javax.naming.directory.DirContext; import javax.security.auth.login.LoginException; | import java.util.*; import javax.naming.*; import javax.naming.directory.*; import javax.security.auth.login.*; | [
"java.util",
"javax.naming",
"javax.security"
] | java.util; javax.naming; javax.security; | 435,055 |
public List<Long> getCallTimestampsForType(Outcome.Status status) {
String statusName = status.toString();
Cursor c = getReadableDatabase().rawQuery(
"SELECT " + CallsColumns.TIMESTAMP + " FROM " + CALLS_TABLE_NAME + " WHERE " +
CallsColumns.RESULT + " = '" + statusN... | List<Long> function(Outcome.Status status) { String statusName = status.toString(); Cursor c = getReadableDatabase().rawQuery( STR + CallsColumns.TIMESTAMP + STR + CALLS_TABLE_NAME + STR + CallsColumns.RESULT + STR + statusName + "'", null); List<Long> result = new ArrayList<>(); while (c.moveToNext()) { result.add(c.g... | /**
* Gets the list of timestamps of calls of a particular type (voicemail, unavailable, contacted)
* that this user has made
*/ | Gets the list of timestamps of calls of a particular type (voicemail, unavailable, contacted) that this user has made | getCallTimestampsForType | {
"repo_name": "5calls/android",
"path": "5calls/app/src/main/java/org/a5calls/android/a5calls/model/DatabaseHelper.java",
"license": "mit",
"size": 13134
} | [
"android.database.Cursor",
"java.util.ArrayList",
"java.util.List"
] | import android.database.Cursor; import java.util.ArrayList; import java.util.List; | import android.database.*; import java.util.*; | [
"android.database",
"java.util"
] | android.database; java.util; | 1,427,051 |
int insert(Bill record); | int insert(Bill record); | /**
* This method was generated by MyBatis Generator. This method corresponds to the database table bill
* @mbggenerated Mon Dec 07 22:17:15 CST 2015
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table bill | insert | {
"repo_name": "smartgear/timeholder",
"path": "trymvc/src/main/java/com/toy/data/generate/BillMapper.java",
"license": "mit",
"size": 2537
} | [
"com.toy.model.generate.Bill"
] | import com.toy.model.generate.Bill; | import com.toy.model.generate.*; | [
"com.toy.model"
] | com.toy.model; | 1,974,571 |
public final void smoothScrollBy(int dx, int dy) {
if (getChildCount() == 0) {
// Nothing to do.
return;
}
long duration = AnimationUtils.currentAnimationTimeMillis()
- mLastScroll;
if (duration > ANIMATED_SCROLL_GAP) {
if (scrollDirection == DIRECTION_VERTICAL) {
final int height =... | final void function(int dx, int dy) { if (getChildCount() == 0) { return; } long duration = AnimationUtils.currentAnimationTimeMillis() - mLastScroll; if (duration > ANIMATED_SCROLL_GAP) { if (scrollDirection == DIRECTION_VERTICAL) { final int height = getHeight() - getPaddingBottom() - getPaddingTop(); final int botto... | /**
* Like {@link View#scrollBy}, but scroll smoothly instead of immediately.
*
* @param dx
* the number of pixels to scroll by on the X axis
* @param dy
* the number of pixels to scroll by on the Y axis
*/ | Like <code>View#scrollBy</code>, but scroll smoothly instead of immediately | smoothScrollBy | {
"repo_name": "zodsoft/TwoWayNestedScrollView",
"path": "src/com/peerless2012/twowaynestedscrollview/TwoWayNestedScrollView.java",
"license": "apache-2.0",
"size": 72087
} | [
"android.support.v4.view.ViewCompat",
"android.view.animation.AnimationUtils"
] | import android.support.v4.view.ViewCompat; import android.view.animation.AnimationUtils; | import android.support.v4.view.*; import android.view.animation.*; | [
"android.support",
"android.view"
] | android.support; android.view; | 2,745,019 |
VersionComparator getVersionComparator(); | VersionComparator getVersionComparator(); | /**
* Gets the rule for version comparison of this artifact.
*
* @return the rule for version comparison of this artifact.
* @since 1.0-beta-1
*/ | Gets the rule for version comparison of this artifact | getVersionComparator | {
"repo_name": "prostagma/versions-maven-plugin",
"path": "src/main/java/org/codehaus/mojo/versions/api/VersionDetails.java",
"license": "apache-2.0",
"size": 28383
} | [
"org.codehaus.mojo.versions.ordering.VersionComparator"
] | import org.codehaus.mojo.versions.ordering.VersionComparator; | import org.codehaus.mojo.versions.ordering.*; | [
"org.codehaus.mojo"
] | org.codehaus.mojo; | 878,159 |
@Override
public boolean isTrashFile(AbstractFile file) {
// Quote from http://en.wikipedia.org/wiki/Recycle_Bin_(Windows):
// "The actual location of the Recycle Bin varies depending on the operating system and filesystem. On the older
// FAT filesystems (typically Windows 98 and prior)... | boolean function(AbstractFile file) { return false; } | /**
* Implementation notes: always returns <code>false</code>.
*/ | Implementation notes: always returns <code>false</code> | isTrashFile | {
"repo_name": "trol73/mucommander",
"path": "src/main/com/mucommander/desktop/windows/WindowsTrash.java",
"license": "gpl-3.0",
"size": 5563
} | [
"com.mucommander.commons.file.AbstractFile"
] | import com.mucommander.commons.file.AbstractFile; | import com.mucommander.commons.file.*; | [
"com.mucommander.commons"
] | com.mucommander.commons; | 2,489,449 |
@Test(groups = {"readLocalFiles"})
public void testCheckXPathExpression29() throws Exception {
try (InputStream is = Files.newInputStream(XML_PATH)) {
assertEquals(xpath.compile(EXPRESSION_NAME_A).
evaluate(new InputSource(is), NUMBER), 6d);
}
} | @Test(groups = {STR}) void function() throws Exception { try (InputStream is = Files.newInputStream(XML_PATH)) { assertEquals(xpath.compile(EXPRESSION_NAME_A). evaluate(new InputSource(is), NUMBER), 6d); } } | /**
* evaluate(InputSource source,QName returnType) return a correct number
* value if returnType is Number.
*
* @throws Exception If any errors occur.
*/ | evaluate(InputSource source,QName returnType) return a correct number value if returnType is Number | testCheckXPathExpression29 | {
"repo_name": "lostdj/Jaklin-OpenJDK-JAXP",
"path": "test/javax/xml/jaxp/functional/javax/xml/xpath/ptests/XPathExpressionTest.java",
"license": "gpl-2.0",
"size": 17755
} | [
"java.io.InputStream",
"java.nio.file.Files",
"org.testng.Assert",
"org.testng.annotations.Test",
"org.xml.sax.InputSource"
] | import java.io.InputStream; import java.nio.file.Files; import org.testng.Assert; import org.testng.annotations.Test; import org.xml.sax.InputSource; | import java.io.*; import java.nio.file.*; import org.testng.*; import org.testng.annotations.*; import org.xml.sax.*; | [
"java.io",
"java.nio",
"org.testng",
"org.testng.annotations",
"org.xml.sax"
] | java.io; java.nio; org.testng; org.testng.annotations; org.xml.sax; | 1,272,840 |
public Class<? extends Attribute> getCategory()
{
return OperationsSupported.class;
} | Class<? extends Attribute> function() { return OperationsSupported.class; } | /**
* Returns category of this class.
*
* @return The class <code>OperationsSupported</code> itself.
*/ | Returns category of this class | getCategory | {
"repo_name": "SanDisk-Open-Source/SSD_Dashboard",
"path": "uefi/gcc/gcc-4.6.3/libjava/classpath/gnu/javax/print/ipp/attribute/supported/OperationsSupported.java",
"license": "gpl-2.0",
"size": 8012
} | [
"javax.print.attribute.Attribute"
] | import javax.print.attribute.Attribute; | import javax.print.attribute.*; | [
"javax.print"
] | javax.print; | 2,253,741 |
static ReplicaItemExecutionMode replicaItemExecutionMode(final BulkItemRequest request, final int index) {
final BulkItemResponse primaryResponse = request.getPrimaryResponse();
assert primaryResponse != null : "expected primary response to be set for item [" + index + "] request [" + request.reques... | static ReplicaItemExecutionMode replicaItemExecutionMode(final BulkItemRequest request, final int index) { final BulkItemResponse primaryResponse = request.getPrimaryResponse(); assert primaryResponse != null : STR + index + STR + request.request() + "]"; if (primaryResponse.isFailed()) { return primaryResponse.getFail... | /**
* Determines whether a bulk item request should be executed on the replica.
* @return {@link ReplicaItemExecutionMode#NORMAL} upon normal primary execution with no failures
* {@link ReplicaItemExecutionMode#FAILURE} upon primary execution failure after sequence no generation
* {@link ReplicaItem... | Determines whether a bulk item request should be executed on the replica | replicaItemExecutionMode | {
"repo_name": "nezirus/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/action/bulk/TransportShardBulkAction.java",
"license": "apache-2.0",
"size": 41038
} | [
"org.elasticsearch.action.DocWriteResponse",
"org.elasticsearch.index.seqno.SequenceNumbersService"
] | import org.elasticsearch.action.DocWriteResponse; import org.elasticsearch.index.seqno.SequenceNumbersService; | import org.elasticsearch.action.*; import org.elasticsearch.index.seqno.*; | [
"org.elasticsearch.action",
"org.elasticsearch.index"
] | org.elasticsearch.action; org.elasticsearch.index; | 2,508,837 |
public synchronized Bot login(String token, TCPClientCommunicator com, BotMode mode,
String ip) throws BotLoginException
{
Bot bot = null;
ResultSet result = null;
try
{ // SELECT status, nick, score FROM bots WHERE token = ? LIMIT 1;
loginSelectStmt.setString(1, token);
result = loginSelectStmt.ex... | synchronized Bot function(String token, TCPClientCommunicator com, BotMode mode, String ip) throws BotLoginException { Bot bot = null; ResultSet result = null; try { loginSelectStmt.setString(1, token); result = loginSelectStmt.executeQuery(); if (result.next()) { if (!result.getBoolean(1)) { bot = new Bot(com, result.... | /**
* Attempts to login bot on the database.
* @see Documentation/protocol/login.html for error codes.
* @param token the token generated for the bot.
* @param com the communicator used to communicate with the bot.
* @param mode the desired gaming mode of the bot.
* @param ip the IP address of the client.
... | Attempts to login bot on the database | login | {
"repo_name": "neeh/HelloAnt",
"path": "GameServer/src/main/java/basis/DBManager.java",
"license": "gpl-3.0",
"size": 12676
} | [
"java.sql.ResultSet",
"java.sql.SQLException"
] | import java.sql.ResultSet; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,177,841 |
@Source("com/google/appinventor/images/phonebar.png")
ImageResource phonebar(); | @Source(STR) ImageResource phonebar(); | /**
* Phone status bar shown above the form in the visual designer
*/ | Phone status bar shown above the form in the visual designer | phonebar | {
"repo_name": "mintingle/appinventor-sources",
"path": "appinventor/appengine/src/com/google/appinventor/client/Images.java",
"license": "apache-2.0",
"size": 13759
} | [
"com.google.gwt.resources.client.ImageResource"
] | import com.google.gwt.resources.client.ImageResource; | import com.google.gwt.resources.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 353,741 |
@javax.annotation.Nullable
@ApiModelProperty(value = "What ship was the attacker flying ")
public Integer getShipTypeId() {
return shipTypeId;
} | @javax.annotation.Nullable @ApiModelProperty(value = STR) Integer function() { return shipTypeId; } | /**
* What ship was the attacker flying
*
* @return shipTypeId
**/ | What ship was the attacker flying | getShipTypeId | {
"repo_name": "burberius/eve-esi",
"path": "src/main/java/net/troja/eve/esi/model/KillmailAttacker.java",
"license": "apache-2.0",
"size": 9274
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 14,665 |
private void raisePhaseFailure(SearchPhaseExecutionException exception) {
results.getSuccessfulResults().forEach((entry) -> {
try {
SearchShardTarget searchShardTarget = entry.getSearchShardTarget();
Transport.Connection connection = getConnection(null, searchShar... | void function(SearchPhaseExecutionException exception) { results.getSuccessfulResults().forEach((entry) -> { try { SearchShardTarget searchShardTarget = entry.getSearchShardTarget(); Transport.Connection connection = getConnection(null, searchShardTarget.getNodeId()); sendReleaseSearchContext(entry.getRequestId(), conn... | /**
* This method should be called if a search phase failed to ensure all relevant search contexts and resources are released.
* this method will also notify the listener and sends back a failure to the user.
*
* @param exception the exception explaining or causing the phase failure
*/ | This method should be called if a search phase failed to ensure all relevant search contexts and resources are released. this method will also notify the listener and sends back a failure to the user | raisePhaseFailure | {
"repo_name": "maddin2016/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/action/search/AbstractSearchAsyncAction.java",
"license": "apache-2.0",
"size": 14892
} | [
"org.elasticsearch.search.SearchShardTarget",
"org.elasticsearch.transport.Transport"
] | import org.elasticsearch.search.SearchShardTarget; import org.elasticsearch.transport.Transport; | import org.elasticsearch.search.*; import org.elasticsearch.transport.*; | [
"org.elasticsearch.search",
"org.elasticsearch.transport"
] | org.elasticsearch.search; org.elasticsearch.transport; | 1,778,817 |
@FIXVersion(introduced = "5.0")
@TagNumRef(tagNum = TagNum.PegSecurityIDSource)
public String getPegSecurityIDSource() {
return pegSecurityIDSource;
} | @FIXVersion(introduced = "5.0") @TagNumRef(tagNum = TagNum.PegSecurityIDSource) String function() { return pegSecurityIDSource; } | /**
* Message field getter.
* @return field value
*/ | Message field getter | getPegSecurityIDSource | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/comp/PegInstructions.java",
"license": "gpl-3.0",
"size": 16711
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.TagNum"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum; | import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*; | [
"net.hades.fix"
] | net.hades.fix; | 2,557,228 |
@Test
public void testValidator() throws ApplicationException, FrameworkException {
testModel.setField1("some other value");
executeValidator(target, testModel, "[Field1]", InListException.class);
} | void function() throws ApplicationException, FrameworkException { testModel.setField1(STR); executeValidator(target, testModel, STR, InListException.class); } | /**
* If the field is not set correctly, the validator should throw a in list field exception with the field label.
*/ | If the field is not set correctly, the validator should throw a in list field exception with the field label | testValidator | {
"repo_name": "snavaneethan1/jaffa-framework",
"path": "jaffa-rules/source/test/java/org/jaffa/rules/validators/InListValidatorTest.java",
"license": "gpl-3.0",
"size": 4707
} | [
"org.jaffa.datatypes.exceptions.InListException",
"org.jaffa.exceptions.ApplicationException",
"org.jaffa.exceptions.FrameworkException"
] | import org.jaffa.datatypes.exceptions.InListException; import org.jaffa.exceptions.ApplicationException; import org.jaffa.exceptions.FrameworkException; | import org.jaffa.datatypes.exceptions.*; import org.jaffa.exceptions.*; | [
"org.jaffa.datatypes",
"org.jaffa.exceptions"
] | org.jaffa.datatypes; org.jaffa.exceptions; | 479,251 |
public static String capitalize(String text) {
if (text == null) {
return null;
}
int length = text.length();
if (length == 0) {
return text;
}
String answer = text.substring(0, 1).toUpperCase(Locale.ENGLISH);
if (length > 1) {
... | static String function(String text) { if (text == null) { return null; } int length = text.length(); if (length == 0) { return text; } String answer = text.substring(0, 1).toUpperCase(Locale.ENGLISH); if (length > 1) { answer += text.substring(1, length); } return answer; } | /**
* Capitalize the string (upper case first character)
*
* @param text the string
* @return the string capitalized (upper case first character)
*/ | Capitalize the string (upper case first character) | capitalize | {
"repo_name": "jamesnetherton/camel",
"path": "camel-core/src/main/java/org/apache/camel/util/StringHelper.java",
"license": "apache-2.0",
"size": 24585
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 1,291,779 |
@Path("{id}")
public HostResource getHostSubResource(@PathParam("id") String id); | @Path("{id}") HostResource function(@PathParam("id") String id); | /**
* Sub-resource locator method, returns individual HostResource on which the
* remainder of the URI is dispatched.
*
* @param id the Host ID
* @return matching subresource if found
*/ | Sub-resource locator method, returns individual HostResource on which the remainder of the URI is dispatched | getHostSubResource | {
"repo_name": "markmc/rhevm-api",
"path": "api/src/main/java/com/redhat/rhevm/api/resource/HostsResource.java",
"license": "lgpl-2.1",
"size": 2369
} | [
"javax.ws.rs.Path",
"javax.ws.rs.PathParam"
] | import javax.ws.rs.Path; import javax.ws.rs.PathParam; | import javax.ws.rs.*; | [
"javax.ws"
] | javax.ws; | 2,226,183 |
public static Animation inFromLeftAnimation(long duration, Interpolator interpolator) {
Animation inFromLeft = new TranslateAnimation(
Animation.RELATIVE_TO_PARENT, -1.0f, Animation.RELATIVE_TO_PARENT, 0.0f,
Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f
);
inFromLeft.setDu... | static Animation function(long duration, Interpolator interpolator) { Animation inFromLeft = new TranslateAnimation( Animation.RELATIVE_TO_PARENT, -1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f ); inFromLeft.setDuration(duration); inFromLeft.setInterpol... | /**
* Slide animations to enter a view from left.
*
* @param duration the animation duration in milliseconds
* @param interpolator the interpolator to use (pass {@code null} to use the {@link AccelerateInterpolator} interpolator)
* @return a slide transition animation
*/ | Slide animations to enter a view from left | inFromLeftAnimation | {
"repo_name": "javocsoft/JavocsoftToolboxAS",
"path": "toolbox/src/main/java/es/javocsoft/android/lib/toolbox/animation/AnimationFactory.java",
"license": "gpl-3.0",
"size": 28360
} | [
"android.view.animation.AccelerateInterpolator",
"android.view.animation.Animation",
"android.view.animation.Interpolator",
"android.view.animation.TranslateAnimation"
] | import android.view.animation.AccelerateInterpolator; import android.view.animation.Animation; import android.view.animation.Interpolator; import android.view.animation.TranslateAnimation; | import android.view.animation.*; | [
"android.view"
] | android.view; | 2,778,212 |
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String vmName, String runCommandName); | @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String vmName, String runCommandName); | /**
* The operation to delete the run command.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine where the run command should be deleted.
* @param runCommandName The name of the virtual machine run command.
* @throws IllegalArgumen... | The operation to delete the run command | beginDelete | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineRunCommandsClient.java",
"license": "mit",
"size": 35801
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.polling.SyncPoller"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; | [
"com.azure.core"
] | com.azure.core; | 2,775,647 |
@Test
public void testModelCopy() throws Exception {
Logger.getLogger(getClass()).debug("TEST " + name.getMethodName());
CopyConstructorTester tester = new CopyConstructorTester(object);
assertTrue(tester.testCopyConstructor(GeneralMetadataEntry.class));
} | void function() throws Exception { Logger.getLogger(getClass()).debug(STR + name.getMethodName()); CopyConstructorTester tester = new CopyConstructorTester(object); assertTrue(tester.testCopyConstructor(GeneralMetadataEntry.class)); } | /**
* Test copy constructor.
*
* @throws Exception the exception
*/ | Test copy constructor | testModelCopy | {
"repo_name": "WestCoastInformatics/UMLS-Terminology-Server",
"path": "jpa-model/src/test/java/com/wci/umls/server/jpa/test/meta/GeneralMetadataEntryJpaUnitTest.java",
"license": "apache-2.0",
"size": 4009
} | [
"com.wci.umls.server.helpers.CopyConstructorTester",
"com.wci.umls.server.model.meta.GeneralMetadataEntry",
"org.apache.log4j.Logger",
"org.junit.Assert"
] | import com.wci.umls.server.helpers.CopyConstructorTester; import com.wci.umls.server.model.meta.GeneralMetadataEntry; import org.apache.log4j.Logger; import org.junit.Assert; | import com.wci.umls.server.helpers.*; import com.wci.umls.server.model.meta.*; import org.apache.log4j.*; import org.junit.*; | [
"com.wci.umls",
"org.apache.log4j",
"org.junit"
] | com.wci.umls; org.apache.log4j; org.junit; | 131,168 |
public Label getFdoPrefetchHintsLabel() {
return fdoPrefetchHintsLabel;
}
@Option(
name = "fdo_profile",
defaultValue = "null",
category = "flags",
converter = LabelConverter.class,
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {OptionEffectTag.AF... | Label function() { return fdoPrefetchHintsLabel; } @Option( name = STR, defaultValue = "null", category = "flags", converter = LabelConverter.class, documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, effectTags = {OptionEffectTag.AFFECTS_OUTPUTS}, help = STR ) public Label fdoProfileLabel; @Option( ... | /**
* Returns the --fdo_prefetch_hints value.
*/ | Returns the --fdo_prefetch_hints value | getFdoPrefetchHintsLabel | {
"repo_name": "dslomov/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java",
"license": "apache-2.0",
"size": 44802
} | [
"com.google.devtools.build.lib.analysis.config.CoreOptionConverters",
"com.google.devtools.build.lib.analysis.config.PerLabelOptions",
"com.google.devtools.build.lib.cmdline.Label",
"com.google.devtools.common.options.Option",
"com.google.devtools.common.options.OptionDocumentationCategory",
"com.google.d... | import com.google.devtools.build.lib.analysis.config.CoreOptionConverters; import com.google.devtools.build.lib.analysis.config.PerLabelOptions; import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.common.options.Option; import com.google.devtools.common.options.OptionDocumentationCategory; im... | import com.google.devtools.build.lib.analysis.config.*; import com.google.devtools.build.lib.cmdline.*; import com.google.devtools.common.options.*; import java.util.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 415,107 |
void maybeEliminateAssignmentByLvalueName(NodeTraversal t, Node n,
Node parent) {
// ASSIGN
// l-value
// r-value
Node lvalue = n.getFirstChild();
if (nameIncludesFieldNameToStrip(lvalue) ||
qualifiedNameBeginsWithStripType(lv... | void maybeEliminateAssignmentByLvalueName(NodeTraversal t, Node n, Node parent) { Node lvalue = n.getFirstChild(); if (nameIncludesFieldNameToStrip(lvalue) qualifiedNameBeginsWithStripType(lvalue)) { if (parent.isExprResult()) { Node grandparent = parent.getParent(); replaceWithEmpty(parent, grandparent); compiler.repo... | /**
* Eliminates an assignment if the l-value is:
* - A field name that's a strip name
* - A qualified name that begins with a strip type
*
* @param t The traversal
* @param n An ASSIGN node
* @param parent {@code n}'s parent
*/ | Eliminates an assignment if the l-value is: - A field name that's a strip name - A qualified name that begins with a strip type | maybeEliminateAssignmentByLvalueName | {
"repo_name": "Yannic/closure-compiler",
"path": "src/com/google/javascript/jscomp/StripCode.java",
"license": "apache-2.0",
"size": 23145
} | [
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 322,996 |
@Override
public synchronized boolean isCancelled() {
return exception instanceof CancellationException;
} | synchronized boolean function() { return exception instanceof CancellationException; } | /**
* Returns true if this CompletableFuture was cancelled before it completed normally.
*/ | Returns true if this CompletableFuture was cancelled before it completed normally | isCancelled | {
"repo_name": "KevinLiLu/kafka",
"path": "clients/src/main/java/org/apache/kafka/common/internals/KafkaFutureImpl.java",
"license": "apache-2.0",
"size": 10797
} | [
"java.util.concurrent.CancellationException"
] | import java.util.concurrent.CancellationException; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,930,364 |
public void postComment(String postId, String message, ActionListener callback) throws IOException {
checkAuthentication();
FacebookRESTService con = new FacebookRESTService(token, postId, FacebookRESTService.COMMENTS, true);
con.addResponseListener(new Listener(con, callback));
con... | void function(String postId, String message, ActionListener callback) throws IOException { checkAuthentication(); FacebookRESTService con = new FacebookRESTService(token, postId, FacebookRESTService.COMMENTS, true); con.addResponseListener(new Listener(con, callback)); con.addArgument(STR, "" + message); if (slider != ... | /**
* Post a comment on a given post
*
* @param postId the post id
* @param message the message to post
*/ | Post a comment on a given post | postComment | {
"repo_name": "sannysanoff/CodenameOne",
"path": "CodenameOne/src/com/codename1/facebook/FaceBookAccess.java",
"license": "gpl-2.0",
"size": 55326
} | [
"com.codename1.components.SliderBridge",
"com.codename1.io.NetworkManager",
"com.codename1.ui.events.ActionListener",
"java.io.IOException"
] | import com.codename1.components.SliderBridge; import com.codename1.io.NetworkManager; import com.codename1.ui.events.ActionListener; import java.io.IOException; | import com.codename1.components.*; import com.codename1.io.*; import com.codename1.ui.events.*; import java.io.*; | [
"com.codename1.components",
"com.codename1.io",
"com.codename1.ui",
"java.io"
] | com.codename1.components; com.codename1.io; com.codename1.ui; java.io; | 2,813,352 |
Collection<AsteriskAgent> getAgents() throws ManagerCommunicationException; | Collection<AsteriskAgent> getAgents() throws ManagerCommunicationException; | /**
* Return the agents, registered at Asterisk server. (Consider remarks for
* {@link AsteriskAgent})
*
* @return a Collection of agents
* @throws ManagerCommunicationException if there is a problem communication
* with Asterisk
*/ | Return the agents, registered at Asterisk server. (Consider remarks for <code>AsteriskAgent</code>) | getAgents | {
"repo_name": "pk1057/asterisk-java",
"path": "src/main/java/org/asteriskjava/live/AsteriskServer.java",
"license": "apache-2.0",
"size": 24290
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,078,670 |
public int hashCode() {
int result = 193;
result = 37 * result + ObjectUtilities.hashCode(this.background);
result = 37 * result + ObjectUtilities.hashCode(this.cap);
result = 37 * result + this.dialFrame.hashCode();
long temp = Double.doubleToLongBits(this.viewX);
re... | int function() { int result = 193; result = 37 * result + ObjectUtilities.hashCode(this.background); result = 37 * result + ObjectUtilities.hashCode(this.cap); result = 37 * result + this.dialFrame.hashCode(); long temp = Double.doubleToLongBits(this.viewX); result = 37 * result + (int) (temp ^ (temp >>> 32)); temp = D... | /**
* Returns a hash code for this instance.
*
* @return The hash code.
*/ | Returns a hash code for this instance | hashCode | {
"repo_name": "JSansalone/JFreeChart",
"path": "source/org/jfree/chart/plot/dial/DialPlot.java",
"license": "lgpl-2.1",
"size": 25005
} | [
"org.jfree.util.ObjectUtilities"
] | import org.jfree.util.ObjectUtilities; | import org.jfree.util.*; | [
"org.jfree.util"
] | org.jfree.util; | 2,554,183 |
public Map<AbstractProject,Integer> getDependencies(boolean includeMissing) {
Map<AbstractProject,Integer> r = new HashMap<AbstractProject,Integer>();
for (Fingerprint fp : getFingerprints().values()) {
BuildPtr bp = fp.getOriginal();
if(bp==null) cont... | Map<AbstractProject,Integer> function(boolean includeMissing) { Map<AbstractProject,Integer> r = new HashMap<AbstractProject,Integer>(); for (Fingerprint fp : getFingerprints().values()) { BuildPtr bp = fp.getOriginal(); if(bp==null) continue; if(bp.is(build)) continue; try { Job job = bp.getJob(); if (job==null) conti... | /**
* Gets the dependency to other builds in a map.
*
* @param includeMissing true if the original build should be included in
* the result, even if it doesn't exist
* @since 1.430
*/ | Gets the dependency to other builds in a map | getDependencies | {
"repo_name": "pselle/jenkins",
"path": "core/src/main/java/hudson/tasks/Fingerprinter.java",
"license": "mit",
"size": 16546
} | [
"hudson.model.AbstractProject",
"hudson.model.Fingerprint",
"hudson.model.Job",
"java.util.HashMap",
"java.util.Map",
"java.util.logging.Logger",
"org.acegisecurity.AccessDeniedException"
] | import hudson.model.AbstractProject; import hudson.model.Fingerprint; import hudson.model.Job; import java.util.HashMap; import java.util.Map; import java.util.logging.Logger; import org.acegisecurity.AccessDeniedException; | import hudson.model.*; import java.util.*; import java.util.logging.*; import org.acegisecurity.*; | [
"hudson.model",
"java.util",
"org.acegisecurity"
] | hudson.model; java.util; org.acegisecurity; | 2,356,109 |
public void loadRootsIntoDirectoryTree() {
this.directoryTree.removeAll();
File[] roots = File.listRoots();
for (int a = 0; a < roots.length; a++) {
if (!Options.getInst().hideDrivesAB
|| (!roots[a].getPath().startsWith("A:") && !roots[a].getPath()
.startsWith("B:"))) {
St... | void function() { this.directoryTree.removeAll(); File[] roots = File.listRoots(); for (int a = 0; a < roots.length; a++) { if (!Options.getInst().hideDrivesAB (!roots[a].getPath().startsWith("A:") && !roots[a].getPath() .startsWith("B:"))) { String rootEntry = roots[a].toString(); if (rootEntry.endsWith("\\")) rootEnt... | /**
* Load the root directories of the file system into the directory tree,
* priorly removing any entries.
*/ | Load the root directories of the file system into the directory tree, priorly removing any entries | loadRootsIntoDirectoryTree | {
"repo_name": "wwu-pi/muggl",
"path": "muggl-swt/src/de/wwu/muggl/ui/gui/components/FileSelectionComposite.java",
"license": "gpl-3.0",
"size": 78933
} | [
"de.wwu.muggl.configuration.Options",
"java.io.File",
"org.eclipse.swt.widgets.TreeItem"
] | import de.wwu.muggl.configuration.Options; import java.io.File; import org.eclipse.swt.widgets.TreeItem; | import de.wwu.muggl.configuration.*; import java.io.*; import org.eclipse.swt.widgets.*; | [
"de.wwu.muggl",
"java.io",
"org.eclipse.swt"
] | de.wwu.muggl; java.io; org.eclipse.swt; | 2,129,621 |
public void operatorControl() {
while (isOperatorControl() && isEnabled()) {
double angle = gyro.getAngle();
myDrive.mecanumDrive_Cartesian(moveStick.getX(), moveStick.getY(),moveStick.getTwist(),0);
Timer.delay(0.01);
SmartDashboard.putNumber("angle", angle)... | void function() { while (isOperatorControl() && isEnabled()) { double angle = gyro.getAngle(); myDrive.mecanumDrive_Cartesian(moveStick.getX(), moveStick.getY(),moveStick.getTwist(),0); Timer.delay(0.01); SmartDashboard.putNumber("angle", angle); double Armpossicion = myArmpossicion.getVoltage(); SmartDashboard.putNumb... | /**
* This function is called once each time the robot enters operator control.
*/ | This function is called once each time the robot enters operator control | operatorControl | {
"repo_name": "FRC4475/FRC2014",
"path": "src/edu/wpi/first/wpilibj/templates/RobotTemplate4475.java",
"license": "bsd-3-clause",
"size": 5219
} | [
"edu.wpi.first.wpilibj.Timer",
"edu.wpi.first.wpilibj.smartdashboard.SmartDashboard"
] | import edu.wpi.first.wpilibj.Timer; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; | import edu.wpi.first.wpilibj.*; import edu.wpi.first.wpilibj.smartdashboard.*; | [
"edu.wpi.first"
] | edu.wpi.first; | 2,711,249 |
public void mousePressed(MouseEvent e)
{
xOffset = e.getX();
yOffset = e.getY();
pane = frame.getDesktopPane();
if (pane != null)
pane.getDesktopManager().beginDraggingFrame(desktopIcon);
} | void function(MouseEvent e) { xOffset = e.getX(); yOffset = e.getY(); pane = frame.getDesktopPane(); if (pane != null) pane.getDesktopManager().beginDraggingFrame(desktopIcon); } | /**
* This method is called when the mouse is pressed in the JDesktopIcon.
*
* @param e The MouseEvent.
*/ | This method is called when the mouse is pressed in the JDesktopIcon | mousePressed | {
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/javax/swing/plaf/basic/BasicDesktopIconUI.java",
"license": "bsd-3-clause",
"size": 15822
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,008,463 |
public Date getCreationDate() {
return creationDate;
}
| Date function() { return creationDate; } | /**
* Returns the creation date of this task.
*
* @return the creation date of this task.
*/ | Returns the creation date of this task | getCreationDate | {
"repo_name": "muczy/libjtodotxt",
"path": "libjtodotxt/src/org/libjtodotxt/Task.java",
"license": "apache-2.0",
"size": 6155
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,724,546 |
public ObjectType getFinancialObjectType() {
return financialObjectType;
} | ObjectType function() { return financialObjectType; } | /**
* Gets the financialObjectType attribute.
*
* @return Returns the financialObjectType.
*/ | Gets the financialObjectType attribute | getFinancialObjectType | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/bc/businessobject/BudgetConstructionBalanceByAccount.java",
"license": "apache-2.0",
"size": 16165
} | [
"org.kuali.kfs.coa.businessobject.ObjectType"
] | import org.kuali.kfs.coa.businessobject.ObjectType; | import org.kuali.kfs.coa.businessobject.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 426,318 |
@Override public void exitEveryRule(ParserRuleContext ctx) { } | @Override public void exitEveryRule(ParserRuleContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | enterEveryRule | {
"repo_name": "google/polymorphicDSL",
"path": "src/test/java/com/pdsl/grammars/PolymorphicDslBetaParserBaseListener.java",
"license": "apache-2.0",
"size": 1864
} | [
"org.antlr.v4.runtime.ParserRuleContext"
] | import org.antlr.v4.runtime.ParserRuleContext; | import org.antlr.v4.runtime.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 39,891 |
private JTextField getUpdateSiteTextField() {
if (updateSiteTextField == null) {
updateSiteTextField = new JTextField();
try {
updateSiteTextField.setText(ConfigurationUtil.getIntroducePortalConfiguration().getUpdateSiteURL());
} catch (Exception e) {
... | JTextField function() { if (updateSiteTextField == null) { updateSiteTextField = new JTextField(); try { updateSiteTextField.setText(ConfigurationUtil.getIntroducePortalConfiguration().getUpdateSiteURL()); } catch (Exception e) { e.printStackTrace(); } } return updateSiteTextField; } | /**
* This method initializes updateSiteTextField
*
* @return javax.swing.JTextField
*/ | This method initializes updateSiteTextField | getUpdateSiteTextField | {
"repo_name": "NCIP/cagrid",
"path": "cagrid/Software/core/caGrid/projects/introduce/src/java/Portal/gov/nih/nci/cagrid/introduce/portal/updater/steps/CheckForUpdatesStep.java",
"license": "bsd-3-clause",
"size": 11496
} | [
"gov.nih.nci.cagrid.introduce.common.ConfigurationUtil",
"javax.swing.JTextField"
] | import gov.nih.nci.cagrid.introduce.common.ConfigurationUtil; import javax.swing.JTextField; | import gov.nih.nci.cagrid.introduce.common.*; import javax.swing.*; | [
"gov.nih.nci",
"javax.swing"
] | gov.nih.nci; javax.swing; | 2,359,833 |
@Override
public int getScale(int column) throws SQLException {
tsColumn col = tsql.columnAtIndex(column-1);
return col.decimalPlaces;
} | int function(int column) throws SQLException { tsColumn col = tsql.columnAtIndex(column-1); return col.decimalPlaces; } | /**
*
* What's a column's number of digits to right of decimal?
*
*/ | What's a column's number of digits to right of decimal | getScale | {
"repo_name": "ryangoodrich/GT_CS4420_Spring_2013_TinySQL",
"path": "com/sqlmagic/tinysql/tinySQLResultSetMetaData.java",
"license": "lgpl-2.1",
"size": 9810
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 933,593 |
private static Integer getEarliestTimestampLineIndex(List<LineAndTime> lines) {
Integer i = 0;
for (LineAndTime line : lines) {
if (isExactEarthTimestamp(line.getLine()))
return i;
else
i++;
}
return null;
} | static Integer function(List<LineAndTime> lines) { Integer i = 0; for (LineAndTime line : lines) { if (isExactEarthTimestamp(line.getLine())) return i; else i++; } return null; } | /**
* Returns the index of the earliest timestamp (PGHP) line. If none found
* returns null.
*
* @param lines
* @return
*/ | Returns the index of the earliest timestamp (PGHP) line. If none found returns null | getEarliestTimestampLineIndex | {
"repo_name": "amsa-code/risky",
"path": "ais/src/main/java/au/gov/amsa/ais/NmeaStreamProcessor.java",
"license": "apache-2.0",
"size": 10591
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,509,327 |
public void run() {
log.info("Accepting connections on port {}", serverSocket.getLocalPort());
this.setName("MllpServerResource$ServerSocketThread - " + serverSocket.getLocalSocketAddress().toString());
while (!isInterrupted() && serverSocket.isBound() && !serverSocket.isClos... | void function() { log.info(STR, serverSocket.getLocalPort()); this.setName(STR + serverSocket.getLocalSocketAddress().toString()); while (!isInterrupted() && serverSocket.isBound() && !serverSocket.isClosed()) { Socket clientSocket = null; try { clientSocket = serverSocket.accept(); } catch (SocketTimeoutException time... | /**
* Accept TCP connections and create ClientSocketThreads for them
*/ | Accept TCP connections and create ClientSocketThreads for them | run | {
"repo_name": "atoulme/camel",
"path": "components/camel-mllp/src/test/java/org/apache/camel/test/junit/rule/mllp/MllpServerResource.java",
"license": "apache-2.0",
"size": 38889
} | [
"java.io.IOException",
"java.net.Socket",
"java.net.SocketException",
"java.net.SocketTimeoutException"
] | import java.io.IOException; import java.net.Socket; import java.net.SocketException; import java.net.SocketTimeoutException; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 849,068 |
public ZonedDateTime getTimestamp()
{
return timestamp;
} | ZonedDateTime function() { return timestamp; } | /**
* The timestamp of the entry.
*
* @return A (zoned) timestamp (never null).
*/ | The timestamp of the entry | getTimestamp | {
"repo_name": "igniterealtime/Spark",
"path": "core/src/main/java/org/jivesoftware/spark/ui/TranscriptWindowEntry.java",
"license": "apache-2.0",
"size": 3575
} | [
"java.time.ZonedDateTime"
] | import java.time.ZonedDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 695,117 |
public static void initHybrid(Context context, KeyInterface keyImpl, Class<? extends Activity> loginActivity) {
SalesforceSDKManager.init(context, keyImpl, SalesforceDroidGapActivity.class, loginActivity);
} | static void function(Context context, KeyInterface keyImpl, Class<? extends Activity> loginActivity) { SalesforceSDKManager.init(context, keyImpl, SalesforceDroidGapActivity.class, loginActivity); } | /**
* Initializes components required for this class
* to properly function. This method should be called
* by hybrid apps using the Salesforce Mobile SDK.
*
* @param context Application context.
* @param keyImpl Implementation of KeyInterface.
* @param loginActivity Login activity.
*/ | Initializes components required for this class to properly function. This method should be called by hybrid apps using the Salesforce Mobile SDK | initHybrid | {
"repo_name": "seethaa/force_analytics_example",
"path": "native/SalesforceSDK/src/com/salesforce/androidsdk/app/SalesforceSDKManager.java",
"license": "apache-2.0",
"size": 38136
} | [
"android.app.Activity",
"android.content.Context",
"com.salesforce.androidsdk.ui.sfhybrid.SalesforceDroidGapActivity"
] | import android.app.Activity; import android.content.Context; import com.salesforce.androidsdk.ui.sfhybrid.SalesforceDroidGapActivity; | import android.app.*; import android.content.*; import com.salesforce.androidsdk.ui.sfhybrid.*; | [
"android.app",
"android.content",
"com.salesforce.androidsdk"
] | android.app; android.content; com.salesforce.androidsdk; | 244,310 |
protected void setOptions(ClientOptions clientOptions) {
LettuceAssert.notNull(clientOptions, "ClientOptions must not be null");
this.clientOptions = clientOptions;
} | void function(ClientOptions clientOptions) { LettuceAssert.notNull(clientOptions, STR); this.clientOptions = clientOptions; } | /**
* Set the {@link ClientOptions} for the client.
*
* @param clientOptions client options for the client and connections that are created after setting the options
*/ | Set the <code>ClientOptions</code> for the client | setOptions | {
"repo_name": "CiNC0/Cartier",
"path": "cartier-redis/src/main/java/com/lambdaworks/redis/AbstractRedisClient.java",
"license": "apache-2.0",
"size": 22075
} | [
"com.lambdaworks.redis.internal.LettuceAssert"
] | import com.lambdaworks.redis.internal.LettuceAssert; | import com.lambdaworks.redis.internal.*; | [
"com.lambdaworks.redis"
] | com.lambdaworks.redis; | 1,342,053 |
public void read(StorableInput dr) throws IOException {
super.read(dr);
} | void function(StorableInput dr) throws IOException { super.read(dr); } | /**
* Writes the storable
*
* @param dr the storable input
* @exception IOException thrown by called methods
*/ | Writes the storable | read | {
"repo_name": "mmohan01/ReFactory",
"path": "data/jhotdraw/jhotdraw-5.4b2/CH/ifa/draw/contrib/html/AttributeFigureContentProducer.java",
"license": "mit",
"size": 2080
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,201,836 |
public void test_formatLjava_lang_String$Ljava_lang_Object_ByteShortIntegerLongConversionO() {
final Object[][] triple = {
{ 0, "%o", "0" },
{ 0, "%-6o", "0 " },
{ 0, "%08o", "00000000" },
{ 0, "%#o", "00" },
{ 0, "%0#11o", ... | public void test_formatLjava_lang_String$Ljava_lang_Object_ByteShortIntegerLongConversionO() { final Object[][] triple = { { 0, "%o", "0" }, { 0, "%-6o", STR }, { 0, "%08o", STR }, { 0, "%#o", "00" }, { 0, STR, STR }, { 0, "%-#9o", STR }, { (byte) 0xff, "%o", "377" }, { (byte) 0xff, "%-6o", STR }, { (byte) 0xff, "%08o"... | /**
* java.util.Formatter#format(String, Object...) for legal
* Byte/Short/Integer/Long conversion type 'o'
*/ | java.util.Formatter#format(String, Object...) for legal Byte/Short/Integer/Long conversion type 'o' | test_formatLjava_lang_String$Ljava_lang_Object_ByteShortIntegerLongConversionO | {
"repo_name": "AdmireTheDistance/android_libcore",
"path": "harmony-tests/src/test/java/org/apache/harmony/tests/java/util/FormatterTest.java",
"license": "gpl-2.0",
"size": 189226
} | [
"java.util.Formatter",
"java.util.Locale"
] | import java.util.Formatter; import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 2,387,207 |
public Map<String, String> getProperties() {
return this.properties;
} | Map<String, String> function() { return this.properties; } | /**
* Get the properties property: Collection of custom properties.
*
* @return the properties value.
*/ | Get the properties property: Collection of custom properties | getProperties | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/monitor/opentelemetry-exporters-azuremonitor/src/main/java/com/azure/opentelemetry/exporters/azuremonitor/implementation/models/RemoteDependencyData.java",
"license": "mit",
"size": 8767
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 123,348 |
private boolean isAlone( Geometry geometryN ) {
Coordinate[] coordinates = geometryN.getCoordinates();
if (coordinates.length > 1) {
Coordinate first = coordinates[0];
Coordinate last = coordinates[coordinates.length - 1];
for( SimpleFeature line : linesList ) {
... | boolean function( Geometry geometryN ) { Coordinate[] coordinates = geometryN.getCoordinates(); if (coordinates.length > 1) { Coordinate first = coordinates[0]; Coordinate last = coordinates[coordinates.length - 1]; for( SimpleFeature line : linesList ) { Geometry lineGeom = (Geometry) line.getDefaultGeometry(); int nu... | /**
* Checks if the given geometry is connected to any other line.
*
* @param geometryN the geometry to test.
* @return true if the geometry is alone in the space, i.e. not connected at
* one of the ends to any other geometry.
*/ | Checks if the given geometry is connected to any other line | isAlone | {
"repo_name": "moovida/jgrasstools",
"path": "gears/src/main/java/org/hortonmachine/gears/modules/v/smoothing/OmsLineSmootherMcMaster.java",
"license": "gpl-3.0",
"size": 11467
} | [
"org.locationtech.jts.geom.Coordinate",
"org.locationtech.jts.geom.Geometry",
"org.opengis.feature.simple.SimpleFeature"
] | import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Geometry; import org.opengis.feature.simple.SimpleFeature; | import org.locationtech.jts.geom.*; import org.opengis.feature.simple.*; | [
"org.locationtech.jts",
"org.opengis.feature"
] | org.locationtech.jts; org.opengis.feature; | 1,328,900 |
public void setChecked() {
sActiveKey = getKey();
if (mCheckboxButton != null) {
if (!mCheckboxButton.equals(sCurrentChecked)) {
if (sCurrentChecked != null) {
sCurrentChecked.setChecked(false);
}
Log.d("@M_" + XLOGTAG, ... | void function() { sActiveKey = getKey(); if (mCheckboxButton != null) { if (!mCheckboxButton.equals(sCurrentChecked)) { if (sCurrentChecked != null) { sCurrentChecked.setChecked(false); } Log.d("@M_" + XLOGTAG, TAG + STR + getKey()); mCheckboxButton.setChecked(true); sCurrentChecked = mCheckboxButton; } } else { Log.d(... | /**
* When delete/add some profile, set it checked Called in AudioProfileSettings.java.
*/ | When delete/add some profile, set it checked Called in AudioProfileSettings.java | setChecked | {
"repo_name": "miswenwen/My_bird_work",
"path": "Bird_work/我的项目/Settings/src/com/mediatek/audioprofile/AudioProfilePreference.java",
"license": "apache-2.0",
"size": 12517
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 456,761 |
@ReportableProperty(order=4, value="Count of profile descriptions.",
ref="ICC.1:2004-10, Table 50")
public List<Long> getOffsets() {
return this.offsets;
}
| @ReportableProperty(order=4, value=STR, ref=STR) List<Long> function() { return this.offsets; } | /** Get count of descriptions.
* @return Count of descriptions
*/ | Get count of descriptions | getOffsets | {
"repo_name": "opf-labs/jhove2",
"path": "src/main/java/org/jhove2/module/format/icc/type/ResponseCurveSet16Type.java",
"license": "bsd-2-clause",
"size": 8200
} | [
"java.util.List",
"org.jhove2.annotation.ReportableProperty"
] | import java.util.List; import org.jhove2.annotation.ReportableProperty; | import java.util.*; import org.jhove2.annotation.*; | [
"java.util",
"org.jhove2.annotation"
] | java.util; org.jhove2.annotation; | 1,858,561 |
@Test(expected = NullPointerException.class)
public void testNullConfigService() {
new InstituteRateRateTypeRateClassRuleImpl(this.context.mock(BusinessObjectService.class), null);
} | @Test(expected = NullPointerException.class) void function() { new InstituteRateRateTypeRateClassRuleImpl(this.context.mock(BusinessObjectService.class), null); } | /**
* Tests that a NullPointerException occurs with a null ConfigService.
*/ | Tests that a NullPointerException occurs with a null ConfigService | testNullConfigService | {
"repo_name": "blackcathacker/kc.preclean",
"path": "coeus-code/src/test/java/org/kuali/kra/budget/rules/InstituteRateRateTypeRateClassRuleTest.java",
"license": "apache-2.0",
"size": 17731
} | [
"org.junit.Test",
"org.kuali.coeus.common.budget.impl.rate.InstituteRateRateTypeRateClassRuleImpl",
"org.kuali.rice.krad.service.BusinessObjectService"
] | import org.junit.Test; import org.kuali.coeus.common.budget.impl.rate.InstituteRateRateTypeRateClassRuleImpl; import org.kuali.rice.krad.service.BusinessObjectService; | import org.junit.*; import org.kuali.coeus.common.budget.impl.rate.*; import org.kuali.rice.krad.service.*; | [
"org.junit",
"org.kuali.coeus",
"org.kuali.rice"
] | org.junit; org.kuali.coeus; org.kuali.rice; | 2,257,273 |
private Set<String> getOldProcessEventTypes() {
final Set<String> resultSet = new HashSet<String>(1);
resultSet.add("test");
return resultSet;
} | Set<String> function() { final Set<String> resultSet = new HashSet<String>(1); resultSet.add("test"); return resultSet; } | /**
* Return default process event types.
* @return Default process event types.
*/ | Return default process event types | getOldProcessEventTypes | {
"repo_name": "jakubschwan/jbpm",
"path": "jbpm-installer/src/test/java/org/jbpm/persistence/scripts/TestPersistenceContext.java",
"license": "apache-2.0",
"size": 16221
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,948,766 |
private JobHopMeta findHop( int x, int y, JobEntryCopy exclude ) {
int i;
JobHopMeta online = null;
for ( i = 0; i < jobMeta.nrJobHops(); i++ ) {
JobHopMeta hi = jobMeta.getJobHop( i );
JobEntryCopy fs = hi.getFromEntry();
JobEntryCopy ts = hi.getToEntry();
if ( fs == null || ts =... | JobHopMeta function( int x, int y, JobEntryCopy exclude ) { int i; JobHopMeta online = null; for ( i = 0; i < jobMeta.nrJobHops(); i++ ) { JobHopMeta hi = jobMeta.getJobHop( i ); JobEntryCopy fs = hi.getFromEntry(); JobEntryCopy ts = hi.getToEntry(); if ( fs == null ts == null ) { return null; } continue; } int[] line ... | /**
* See if location (x,y) is on a line between two steps: the hop!
*
* @param x
* @param y
* @param exclude
* the step to exclude from the hops (from or to location). Specify null if no step is to be excluded.
* @return the transformation hop on the specified location, otherwise: null
... | See if location (x,y) is on a line between two steps: the hop | findHop | {
"repo_name": "andrei-viaryshka/pentaho-kettle",
"path": "ui/src/org/pentaho/di/ui/spoon/job/JobGraph.java",
"license": "apache-2.0",
"size": 132086
} | [
"org.pentaho.di.job.JobHopMeta",
"org.pentaho.di.job.entry.JobEntryCopy"
] | import org.pentaho.di.job.JobHopMeta; import org.pentaho.di.job.entry.JobEntryCopy; | import org.pentaho.di.job.*; import org.pentaho.di.job.entry.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 56,146 |
TestBase.createCaller().init().test();
} | TestBase.createCaller().init().test(); } | /**
* Run just this test.
*
* @param a ignored
*/ | Run just this test | main | {
"repo_name": "paulnguyen/data",
"path": "sqldbs/h2java/src/test/org/h2/test/db/TestView.java",
"license": "apache-2.0",
"size": 14723
} | [
"org.h2.test.TestBase"
] | import org.h2.test.TestBase; | import org.h2.test.*; | [
"org.h2.test"
] | org.h2.test; | 2,233,966 |
public void getData(GetFileNamesMeta meta)
{
final GetFileNamesMeta in = meta;
if (in.getFileName() != null)
{
wFilenameList.removeAll();
for (int i=0;i<meta.getFileName().length;i++)
{
wFilenameList.add(new String[] { in.getFileName()[i], in.getFileMask()[i] ,
in.getExludeFileMask()... | void function(GetFileNamesMeta meta) { final GetFileNamesMeta in = meta; if (in.getFileName() != null) { wFilenameList.removeAll(); for (int i=0;i<meta.getFileName().length;i++) { wFilenameList.add(new String[] { in.getFileName()[i], in.getFileMask()[i] , in.getExludeFileMask()[i], in.getRequiredFilesDesc(in.getFileReq... | /**
* Read the data from the TextFileInputMeta object and show it in this
* dialog.
*
* @param meta
* The TextFileInputMeta object to obtain the data from.
*/ | Read the data from the TextFileInputMeta object and show it in this dialog | getData | {
"repo_name": "bsspirit/kettle-4.4.0-stable",
"path": "src-ui/org/pentaho/di/ui/trans/steps/getfilenames/GetFileNamesDialog.java",
"license": "apache-2.0",
"size": 43751
} | [
"org.pentaho.di.trans.steps.getfilenames.GetFileNamesMeta"
] | import org.pentaho.di.trans.steps.getfilenames.GetFileNamesMeta; | import org.pentaho.di.trans.steps.getfilenames.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 945,898 |
@ServiceMethod(returns = ReturnType.SINGLE)
Response<TestKeys> regenerateTestKeyWithResponse(
String resourceGroupName, String serviceName, TestKeyType keyType, Context context); | @ServiceMethod(returns = ReturnType.SINGLE) Response<TestKeys> regenerateTestKeyWithResponse( String resourceGroupName, String serviceName, TestKeyType keyType, Context context); | /**
* Regenerate a test key for a Service.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
* @param keyType Type... | Regenerate a test key for a Service | regenerateTestKeyWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/ServicesClient.java",
"license": "mit",
"size": 43901
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.appplatform.models.TestKeyType",
"com.azure.resourcemanager.appplatform.models.TestKeys"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.appplatform.models.TestKeyType; import com.azure.resourcemanager.appplatform.models.TestKeys; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appplatform.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,107,809 |
final public String getServiceName() {
return serviceName;
}
private Exporter exporter;
protected Remote impl;
protected Remote proxy; | final String function() { return serviceName; } private Exporter exporter; protected Remote impl; protected Remote proxy; | /**
* The configured name for the service a generated service name if no
* {@link Name} was found in the {@link Configuration}.
* <p>
* Note: Concrete implementations MUST prefer to report this name in the
* {@link AbstractService#getServiceName()} of their service implementation
* class. ... | The configured name for the service a generated service name if no <code>Name</code> was found in the <code>Configuration</code>. Note: Concrete implementations MUST prefer to report this name in the <code>AbstractService#getServiceName()</code> of their service implementation class. E.g., <code>AdministrableDataServic... | getServiceName | {
"repo_name": "rac021/blazegraph_1_5_3_cluster_2_nodes",
"path": "bigdata-jini/src/main/java/com/bigdata/service/jini/AbstractServer.java",
"license": "gpl-2.0",
"size": 73599
} | [
"java.rmi.Remote",
"net.jini.export.Exporter"
] | import java.rmi.Remote; import net.jini.export.Exporter; | import java.rmi.*; import net.jini.export.*; | [
"java.rmi",
"net.jini.export"
] | java.rmi; net.jini.export; | 709,928 |
Collection<MeetMeRoom> getMeetMeRooms()
throws ManagerCommunicationException; | Collection<MeetMeRoom> getMeetMeRooms() throws ManagerCommunicationException; | /**
* Returns the acitve MeetMe rooms on the Asterisk server.
*
* @return a Collection of MeetMeRooms
* @throws ManagerCommunicationException if there is a problem communication
* with Asterisk
*/ | Returns the acitve MeetMe rooms on the Asterisk server | getMeetMeRooms | {
"repo_name": "thuliumcc/asterisk-java",
"path": "src/main/java/org/asteriskjava/live/AsteriskServer.java",
"license": "apache-2.0",
"size": 21216
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 154,290 |
public short invokeShort(String operationName, StubStrategy stubStrategy, Object[] params) throws Throwable {
return ((Number) invoke(operationName,
stubStrategy, params)).shortValue();
} | short function(String operationName, StubStrategy stubStrategy, Object[] params) throws Throwable { return ((Number) invoke(operationName, stubStrategy, params)).shortValue(); } | /**
* Sends a request message to the server, receives the reply from the
* server, and returns a <code>short</code> result to the caller.
*/ | Sends a request message to the server, receives the reply from the server, and returns a <code>short</code> result to the caller | invokeShort | {
"repo_name": "xasx/wildfly",
"path": "ejb3/src/main/java/org/jboss/as/ejb3/iiop/stub/DynamicIIOPStub.java",
"license": "lgpl-2.1",
"size": 10206
} | [
"org.wildfly.iiop.openjdk.rmi.marshal.strategy.StubStrategy"
] | import org.wildfly.iiop.openjdk.rmi.marshal.strategy.StubStrategy; | import org.wildfly.iiop.openjdk.rmi.marshal.strategy.*; | [
"org.wildfly.iiop"
] | org.wildfly.iiop; | 1,149,632 |
protected ArrayList<Double> getRelParam(ArrayList<Double> piParam) {
ArrayList<Double> relParam = new ArrayList<>();
for (int i = 0; i < piParam.size(); i++) {
double param = piParam.get(i) - centerParameters.get(i);
if (param == 0) // convert possible -0 to +0
param = 0.0d;
relParam.add(param... | ArrayList<Double> function(ArrayList<Double> piParam) { ArrayList<Double> relParam = new ArrayList<>(); for (int i = 0; i < piParam.size(); i++) { double param = piParam.get(i) - centerParameters.get(i); if (param == 0) param = 0.0d; relParam.add(param); } return relParam; } | /**
* Convert the input parameters to a list of contextual parameters relative
* to the center parameters.
*
* @param piParam
* @return
*/ | Convert the input parameters to a list of contextual parameters relative to the center parameters | getRelParam | {
"repo_name": "xiaozhuchacha/OpenBottle",
"path": "open_bottle_common/jAOG/src/aog/app/image/CompositionalDistContext.java",
"license": "mit",
"size": 3170
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,089,450 |
public Long getDeletedInstitutionalItemCountForUser(Long userId) {
return (Long)
HbHelper.getUnique(hbCrudDAO.getHibernateTemplate().findByNamedQuery("getDeletedInstitutionalItemCountForUser", userId));
}
| Long function(Long userId) { return (Long) HbHelper.getUnique(hbCrudDAO.getHibernateTemplate().findByNamedQuery(STR, userId)); } | /**
* Get number of deleted institutional items for user
*
*/ | Get number of deleted institutional items for user | getDeletedInstitutionalItemCountForUser | {
"repo_name": "nate-rcl/irplus",
"path": "ir_hibernate/src/edu/ur/hibernate/ir/institution/db/HbDeletedInstitutionalItemDAO.java",
"license": "apache-2.0",
"size": 3203
} | [
"edu.ur.hibernate.HbHelper"
] | import edu.ur.hibernate.HbHelper; | import edu.ur.hibernate.*; | [
"edu.ur.hibernate"
] | edu.ur.hibernate; | 1,860,774 |
@Test (timeout=60000)
public void testSaveLoadImageWithAppending() throws Exception {
Path sub1 = new Path(dir, "sub1");
Path sub1file1 = new Path(sub1, "sub1file1");
Path sub1file2 = new Path(sub1, "sub1file2");
DFSTestUtil.createFile(hdfs, sub1file1, BLOCKSIZE, REPLICATION, seed);
DFSTestUtil.... | @Test (timeout=60000) void function() throws Exception { Path sub1 = new Path(dir, "sub1"); Path sub1file1 = new Path(sub1, STR); Path sub1file2 = new Path(sub1, STR); DFSTestUtil.createFile(hdfs, sub1file1, BLOCKSIZE, REPLICATION, seed); DFSTestUtil.createFile(hdfs, sub1file2, BLOCKSIZE, REPLICATION, seed); hdfs.allow... | /**
* Test the fsimage saving/loading while file appending.
*/ | Test the fsimage saving/loading while file appending | testSaveLoadImageWithAppending | {
"repo_name": "bysslord/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFSImageWithSnapshot.java",
"license": "apache-2.0",
"size": 18025
} | [
"java.io.File",
"java.util.EnumSet",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hdfs.DFSTestUtil",
"org.apache.hadoop.hdfs.MiniDFSCluster",
"org.apache.hadoop.hdfs.client.HdfsDataOutputStream",
"org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotTestHelper",
"org.junit.Test"
] | import java.io.File; import java.util.EnumSet; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.DFSTestUtil; import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.hadoop.hdfs.client.HdfsDataOutputStream; import org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotTestHelper; import org.junit... | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.client.*; import org.apache.hadoop.hdfs.server.namenode.snapshot.*; import org.junit.*; | [
"java.io",
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.io; java.util; org.apache.hadoop; org.junit; | 451,210 |
String _getTemplateOfType(Type type, IJsonMarshaller jsonMarshaller) {
if (ParameterizedType.class.isAssignableFrom(type.getClass())) {
return getTemplateOfParameterizedType((ParameterizedType) type, jsonMarshaller);
}
try {
return jsonMarshaller.toJson(getInstanceOfClass((Class) type));
} catch ... | String _getTemplateOfType(Type type, IJsonMarshaller jsonMarshaller) { if (ParameterizedType.class.isAssignableFrom(type.getClass())) { return getTemplateOfParameterizedType((ParameterizedType) type, jsonMarshaller); } try { return jsonMarshaller.toJson(getInstanceOfClass((Class) type)); } catch (JsonMarshallingExcepti... | /**
* Get template for unknown type (class or parameterizedType)
*
* @param type
* @param jsonUnmarshaller
* @return
*/ | Get template for unknown type (class or parameterizedType) | _getTemplateOfType | {
"repo_name": "hhdevelopment/ocelot",
"path": "ocelot-dashboard/src/main/java/org/ocelotds/dashboard/services/ServiceTools.java",
"license": "mpl-2.0",
"size": 9189
} | [
"java.lang.reflect.ParameterizedType",
"java.lang.reflect.Type",
"java.util.Locale",
"org.ocelotds.marshalling.IJsonMarshaller",
"org.ocelotds.marshalling.exceptions.JsonMarshallingException"
] | import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.Locale; import org.ocelotds.marshalling.IJsonMarshaller; import org.ocelotds.marshalling.exceptions.JsonMarshallingException; | import java.lang.reflect.*; import java.util.*; import org.ocelotds.marshalling.*; import org.ocelotds.marshalling.exceptions.*; | [
"java.lang",
"java.util",
"org.ocelotds.marshalling"
] | java.lang; java.util; org.ocelotds.marshalling; | 142,090 |
private Map<String, String> loadDeviceKeys() throws IOException {
final Map<String, String> deviceKeys = new TreeMap<String, String>();
new UrlLoader(CCU_URL + DEVICE_KEYS) { | Map<String, String> function() throws IOException { final Map<String, String> deviceKeys = new TreeMap<String, String>(); new UrlLoader(CCU_URL + DEVICE_KEYS) { | /**
* Loads all description keys.
*/ | Loads all description keys | loadDeviceKeys | {
"repo_name": "ebisso/openhab2",
"path": "addons/binding/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/type/generator/CcuMetadataExtractor.java",
"license": "epl-1.0",
"size": 8833
} | [
"java.io.IOException",
"java.util.Map",
"java.util.TreeMap"
] | import java.io.IOException; import java.util.Map; import java.util.TreeMap; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,448,692 |
public UploadBatchServiceLogsConfiguration withStartTime(DateTime startTime) {
this.startTime = startTime;
return this;
} | UploadBatchServiceLogsConfiguration function(DateTime startTime) { this.startTime = startTime; return this; } | /**
* Set any log file containing a log message in the time range will be uploaded. This means that the operation might retrieve more logs than have been requested since the entire log file is always uploaded, but the operation should not retrieve fewer logs than have been requested.
*
* @param startTime... | Set any log file containing a log message in the time range will be uploaded. This means that the operation might retrieve more logs than have been requested since the entire log file is always uploaded, but the operation should not retrieve fewer logs than have been requested | withStartTime | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/batch/microsoft-azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/UploadBatchServiceLogsConfiguration.java",
"license": "mit",
"size": 5121
} | [
"org.joda.time.DateTime"
] | import org.joda.time.DateTime; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 709,879 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Void> deleteAsync(String resourceGroupName, String accountName, String accessPolicyName) {
return deleteWithResponseAsync(resourceGroupName, accountName, accessPolicyName)
.flatMap((Response<Void> res) -> Mono.empty());
} | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> function(String resourceGroupName, String accountName, String accessPolicyName) { return deleteWithResponseAsync(resourceGroupName, accountName, accessPolicyName) .flatMap((Response<Void> res) -> Mono.empty()); } | /**
* Deletes an existing access policy resource with the given name.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The Azure Video Analyzer account name.
* @param accessPolicyName The Access Policy name.
* @throws IllegalAr... | Deletes an existing access policy resource with the given name | deleteAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/AccessPoliciesClientImpl.java",
"license": "mit",
"size": 57579
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; | [
"com.azure.core"
] | com.azure.core; | 2,600,146 |
private List<IWorker<ITestNGMethod>> createClassBasedParallelWorkers(List<ITestNGMethod> methods) {
List<IWorker<ITestNGMethod>> result = Lists.newArrayList();
// Methods that belong to classes with a sequential=true or parallel=classes
// attribute must all be run in the same worker
Set<Class> sequen... | List<IWorker<ITestNGMethod>> function(List<ITestNGMethod> methods) { List<IWorker<ITestNGMethod>> result = Lists.newArrayList(); Set<Class> sequentialClasses = Sets.newHashSet(); for (ITestNGMethod m : methods) { Class<? extends ITestClass> cls = m.getRealClass(); org.testng.annotations.ITestAnnotation test = m_annotat... | /**
* Create workers for parallel="classes" and similar cases.
*/ | Create workers for parallel="classes" and similar cases | createClassBasedParallelWorkers | {
"repo_name": "raindev/testng",
"path": "src/main/java/org/testng/TestRunner.java",
"license": "apache-2.0",
"size": 56796
} | [
"java.util.Arrays",
"java.util.Collections",
"java.util.List",
"java.util.Map",
"java.util.Set",
"org.testng.collections.Lists",
"org.testng.collections.Sets",
"org.testng.internal.TestMethodWorker",
"org.testng.internal.thread.graph.IWorker",
"org.testng.xml.XmlSuite"
] | import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Set; import org.testng.collections.Lists; import org.testng.collections.Sets; import org.testng.internal.TestMethodWorker; import org.testng.internal.thread.graph.IWorker; import org.testng.xml.XmlSuite; | import java.util.*; import org.testng.collections.*; import org.testng.internal.*; import org.testng.internal.thread.graph.*; import org.testng.xml.*; | [
"java.util",
"org.testng.collections",
"org.testng.internal",
"org.testng.xml"
] | java.util; org.testng.collections; org.testng.internal; org.testng.xml; | 796,794 |
void addSession(ConnectionContext context, SessionInfo info) throws Exception; | void addSession(ConnectionContext context, SessionInfo info) throws Exception; | /**
* Adds a session.
*
* @param context
* @param info
* @throws Exception TODO
*/ | Adds a session | addSession | {
"repo_name": "chirino/activemq",
"path": "activemq-broker/src/main/java/org/apache/activemq/broker/Broker.java",
"license": "apache-2.0",
"size": 11639
} | [
"org.apache.activemq.command.SessionInfo"
] | import org.apache.activemq.command.SessionInfo; | import org.apache.activemq.command.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 1,192,229 |
private List<Message> filterToAnonAwareMessages(List<Message> messages)
{
if (!isAnonymousEnabled() || m_displayAnonIds)
{
return messages;
}
List<Message> filtered = new ArrayList<Message>();
// Map topics to value of 'isUseAnonymousId(Topic)' to prevent redundant queries
Map<Topic, Boolean> topicT... | List<Message> function(List<Message> messages) { if (!isAnonymousEnabled() m_displayAnonIds) { return messages; } List<Message> filtered = new ArrayList<Message>(); Map<Topic, Boolean> topicToUseAnon = new HashMap<>(); for (Message message : messages) { Topic topic = message.getTopic(); Boolean useAnon = topicToUseAnon... | /**
* Filters out messages associated with anonymous topics for which the user is not permitted to see IDs
*/ | Filters out messages associated with anonymous topics for which the user is not permitted to see IDs | filterToAnonAwareMessages | {
"repo_name": "ouit0408/sakai",
"path": "msgcntr/messageforums-app/src/java/org/sakaiproject/tool/messageforums/ui/MessageForumStatisticsBean.java",
"license": "apache-2.0",
"size": 103912
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.sakaiproject.api.app.messageforums.Message",
"org.sakaiproject.api.app.messageforums.Topic"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.sakaiproject.api.app.messageforums.Message; import org.sakaiproject.api.app.messageforums.Topic; | import java.util.*; import org.sakaiproject.api.app.messageforums.*; | [
"java.util",
"org.sakaiproject.api"
] | java.util; org.sakaiproject.api; | 946,142 |
private List<CatalogEntry> fetchChildren(final List<CatalogEntry> parents) {
final List<CatalogEntry> tmp = new ArrayList<CatalogEntry>();
for (final CatalogEntry child : parents) {
tmp.add(child);
if (child.getType() == CatalogEntry.TYPE_NODE) {
tmp.addAll(fetchChildren(CatalogManager.getInstance().ge... | List<CatalogEntry> function(final List<CatalogEntry> parents) { final List<CatalogEntry> tmp = new ArrayList<CatalogEntry>(); for (final CatalogEntry child : parents) { tmp.add(child); if (child.getType() == CatalogEntry.TYPE_NODE) { tmp.addAll(fetchChildren(CatalogManager.getInstance().getChildrenOf(child))); } } retu... | /**
* Internal helper to get all children for a given list of parent category items
*
* @param parents
* @return
*/ | Internal helper to get all children for a given list of parent category items | fetchChildren | {
"repo_name": "RLDevOps/Demo",
"path": "src/main/java/org/olat/catalog/ui/CatalogEntryMoveController.java",
"license": "apache-2.0",
"size": 4681
} | [
"java.util.ArrayList",
"java.util.List",
"org.olat.catalog.CatalogEntry",
"org.olat.catalog.CatalogManager"
] | import java.util.ArrayList; import java.util.List; import org.olat.catalog.CatalogEntry; import org.olat.catalog.CatalogManager; | import java.util.*; import org.olat.catalog.*; | [
"java.util",
"org.olat.catalog"
] | java.util; org.olat.catalog; | 2,272,153 |
@Override public void exitClassHeader(@NotNull Java7Parser.ClassHeaderContext ctx) { } | @Override public void exitClassHeader(@NotNull Java7Parser.ClassHeaderContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | enterClassHeader | {
"repo_name": "jsteenbeeke/antlr-java-parser",
"path": "src/main/java/com/github/antlrjavaparser/Java7ParserBaseListener.java",
"license": "lgpl-3.0",
"size": 53492
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,899,368 |
private static void checkPublicFilePermissions(FileSystem localFS, File dir,
String owner, String group)
throws IOException {
Path dirPath = new Path(dir.getAbsolutePath());
TestTrackerDistributedCacheManager.checkPublicFilePermissions(localFS,
new Path[] {dirPath});
TestTrackerDistri... | static void function(FileSystem localFS, File dir, String owner, String group) throws IOException { Path dirPath = new Path(dir.getAbsolutePath()); TestTrackerDistributedCacheManager.checkPublicFilePermissions(localFS, new Path[] {dirPath}); TestTrackerDistributedCacheManager.checkPublicFileOwnership(localFS, new Path[... | /**
* Validates permissions and ownership on the public distributed cache files
*/ | Validates permissions and ownership on the public distributed cache files | checkPublicFilePermissions | {
"repo_name": "pombredanne/brisk-hadoop-common",
"path": "src/test/org/apache/hadoop/mapred/ClusterWithLinuxTaskController.java",
"license": "apache-2.0",
"size": 16701
} | [
"java.io.File",
"java.io.IOException",
"org.apache.hadoop.filecache.TestTrackerDistributedCacheManager",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path"
] | import java.io.File; import java.io.IOException; import org.apache.hadoop.filecache.TestTrackerDistributedCacheManager; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; | import java.io.*; import org.apache.hadoop.filecache.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 400,050 |
public Timestamp getDateResponse();
public static final String COLUMNNAME_DateWorkComplete = "DateWorkComplete"; | Timestamp function(); public static final String COLUMNNAME_DateWorkComplete = STR; | /** Get Response Date.
* Date of the Response
*/ | Get Response Date. Date of the Response | getDateResponse | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempiere_360/base/src/org/compiere/model/I_C_RfQ.java",
"license": "gpl-2.0",
"size": 13593
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 692,587 |
public void setAuthToken(AuthToken authToken) {
this.authToken = authToken;
} | void function(AuthToken authToken) { this.authToken = authToken; } | /**
* Initialize the session with an authentication token
* @param authToken the authentication token
*/ | Initialize the session with an authentication token | setAuthToken | {
"repo_name": "zhanqq2010/adv_manger",
"path": "src/main/java/com/adv/manager/xmpp/session/ClientSession.java",
"license": "apache-2.0",
"size": 8458
} | [
"com.adv.manager.xmpp.auth.AuthToken"
] | import com.adv.manager.xmpp.auth.AuthToken; | import com.adv.manager.xmpp.auth.*; | [
"com.adv.manager"
] | com.adv.manager; | 1,182,067 |
public AccountDataBean register(String userID, String password, String fullname, String address, String email, String creditCard, BigDecimal openBalance) throws Exception {
if (Log.doActionTrace())
Log.trace("TradeAction:register", userID, password, fullname, address, email, creditCard, openBa... | AccountDataBean function(String userID, String password, String fullname, String address, String email, String creditCard, BigDecimal openBalance) throws Exception { if (Log.doActionTrace()) Log.trace(STR, userID, password, fullname, address, email, creditCard, openBalance); AccountDataBean accountData; accountData = t... | /**
* Register a new Trade customer. Create a new user profile, user registry
* entry, account with initial balance, and empty portfolio.
*
* @param userID the new customer to register
* @param password the customers password
* @param fullname the customers fullna... | Register a new Trade customer. Create a new user profile, user registry entry, account with initial balance, and empty portfolio | register | {
"repo_name": "jmilliro/daytrader",
"path": "javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/TradeAction.java",
"license": "apache-2.0",
"size": 25191
} | [
"java.math.BigDecimal",
"org.apache.geronimo.daytrader.javaee6.entities.AccountDataBean",
"org.apache.geronimo.daytrader.javaee6.utils.Log"
] | import java.math.BigDecimal; import org.apache.geronimo.daytrader.javaee6.entities.AccountDataBean; import org.apache.geronimo.daytrader.javaee6.utils.Log; | import java.math.*; import org.apache.geronimo.daytrader.javaee6.entities.*; import org.apache.geronimo.daytrader.javaee6.utils.*; | [
"java.math",
"org.apache.geronimo"
] | java.math; org.apache.geronimo; | 194,097 |
public DcmElement putXX(int tag, int vr, String[] values) {
if (values == null) {
return putXX(tag, vr);
}
switch (vr) {
case VRs.AE :
return putAE(tag, values);
case VRs.AS :
return putAS(tag, values);
case VRs.... | DcmElement function(int tag, int vr, String[] values) { if (values == null) { return putXX(tag, vr); } switch (vr) { case VRs.AE : return putAE(tag, values); case VRs.AS : return putAS(tag, values); case VRs.AT : return putAT(tag, values); case VRs.CS : return putCS(tag, values); case VRs.DA : return putDA(tag, values)... | /**
* Description of the Method
*
* @param tag Description of the Parameter
* @param vr Description of the Parameter
* @param values Description of the Parameter
* @return Description of the Return Value
*/ | Description of the Method | putXX | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4che14/tags/DCM4CHE_1_4_14/src/java/org/dcm4cheri/data/DcmObjectImpl.java",
"license": "apache-2.0",
"size": 84001
} | [
"org.dcm4che.data.DcmElement",
"org.dcm4che.dict.Tags",
"org.dcm4che.dict.VRMap",
"org.dcm4che.dict.VRs"
] | import org.dcm4che.data.DcmElement; import org.dcm4che.dict.Tags; import org.dcm4che.dict.VRMap; import org.dcm4che.dict.VRs; | import org.dcm4che.data.*; import org.dcm4che.dict.*; | [
"org.dcm4che.data",
"org.dcm4che.dict"
] | org.dcm4che.data; org.dcm4che.dict; | 1,078,981 |
@ApiModelProperty(value = "")
public SettingsMetadata getCanManageAdminsMetadata() {
return canManageAdminsMetadata;
} | @ApiModelProperty(value = "") SettingsMetadata function() { return canManageAdminsMetadata; } | /**
* Get canManageAdminsMetadata.
* @return canManageAdminsMetadata
**/ | Get canManageAdminsMetadata | getCanManageAdminsMetadata | {
"repo_name": "docusign/docusign-java-client",
"path": "src/main/java/com/docusign/esign/model/UserAccountManagementGranularInformation.java",
"license": "mit",
"size": 26315
} | [
"com.docusign.esign.model.SettingsMetadata",
"io.swagger.annotations.ApiModelProperty"
] | import com.docusign.esign.model.SettingsMetadata; import io.swagger.annotations.ApiModelProperty; | import com.docusign.esign.model.*; import io.swagger.annotations.*; | [
"com.docusign.esign",
"io.swagger.annotations"
] | com.docusign.esign; io.swagger.annotations; | 778,346 |
@Test
public void testGetSupportedExtensions() {
Set<String> result = instance.getSupportedExtensions();
assertNull(result);
} | void function() { Set<String> result = instance.getSupportedExtensions(); assertNull(result); } | /**
* Test of getSupportedExtensions method, of class
* AbstractSuppressionAnalyzer.
*/ | Test of getSupportedExtensions method, of class AbstractSuppressionAnalyzer | testGetSupportedExtensions | {
"repo_name": "Prakhash/security-tools",
"path": "external/dependency-check-core-3.1.1/src/test/java/org/owasp/dependencycheck/analyzer/AbstractSuppressionAnalyzerTest.java",
"license": "apache-2.0",
"size": 6918
} | [
"java.util.Set",
"org.junit.Assert"
] | import java.util.Set; import org.junit.Assert; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 1,669,915 |
public static Slice[] getSlicesFromRectangularROI(RectangularROI roi, int step) {
Slice[] slices = new Slice[2];
int[] roiStart = roi.getIntPoint();
int[] roiLength = roi.getIntLengths();
if (roiLength[0] < 1) roiLength[0] = 1;
if (roiLength[1] < 1) roiLength[1] = 1;
slices[0] = new Slice(roiStart[0]... | static Slice[] function(RectangularROI roi, int step) { Slice[] slices = new Slice[2]; int[] roiStart = roi.getIntPoint(); int[] roiLength = roi.getIntLengths(); if (roiLength[0] < 1) roiLength[0] = 1; if (roiLength[1] < 1) roiLength[1] = 1; slices[0] = new Slice(roiStart[0], roiStart[0] + roiLength[0], step); slices[1... | /**
* Method to get x,y slices from a rectangular roi<br>
*
* If length of roi is less than 1, slice of width 1 is returned<br>
*
* @param roi
* @param step
* @return slices
*/ | Method to get x,y slices from a rectangular roi If length of roi is less than 1, slice of width 1 is returned | getSlicesFromRectangularROI | {
"repo_name": "xen-0/dawnsci",
"path": "org.eclipse.dawnsci.analysis.dataset/src/org/eclipse/dawnsci/analysis/dataset/roi/ROISliceUtils.java",
"license": "epl-1.0",
"size": 10835
} | [
"org.eclipse.january.dataset.Slice"
] | import org.eclipse.january.dataset.Slice; | import org.eclipse.january.dataset.*; | [
"org.eclipse.january"
] | org.eclipse.january; | 2,161,458 |
protected ColorSpace createColorSpace() throws IOException
{
throw new IOException( "Not implemented" );
} | ColorSpace function() throws IOException { throw new IOException( STR ); } | /**
* Create a Java colorspace for this colorspace.
*
* @return A color space that can be used for Java AWT operations.
*
* @throws IOException If there is an error creating the color space.
*/ | Create a Java colorspace for this colorspace | createColorSpace | {
"repo_name": "myrridin/qz-print",
"path": "pdfbox_1.8.4_qz/src/org/apache/pdfbox/pdmodel/graphics/color/PDPattern.java",
"license": "lgpl-2.1",
"size": 2990
} | [
"java.awt.color.ColorSpace",
"java.io.IOException"
] | import java.awt.color.ColorSpace; import java.io.IOException; | import java.awt.color.*; import java.io.*; | [
"java.awt",
"java.io"
] | java.awt; java.io; | 2,891,502 |
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(
String resourceGroupName, String publicIpPrefixName, Context context); | @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<Void>, Void> beginDelete( String resourceGroupName, String publicIpPrefixName, Context context); | /**
* Deletes the specified public IP prefix.
*
* @param resourceGroupName The name of the resource group.
* @param publicIpPrefixName The name of the PublicIpPrefix.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail... | Deletes the specified public IP prefix | beginDelete | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PublicIpPrefixesClient.java",
"license": "mit",
"size": 24606
} | [
"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"
] | 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.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; | [
"com.azure.core"
] | com.azure.core; | 2,452,620 |
public static final Matrix matrixFromEuler(double heading, double attitude,
double bank) {
// Assuming the angles are in radians.
double ch = Math.cos(heading);
double sh = Math.sin(heading);
double ca = Math.cos(attitude);
double sa = Math.sin(attitude);
double cb = Math.cos(bank);
double sb = Math... | static final Matrix function(double heading, double attitude, double bank) { double ch = Math.cos(heading); double sh = Math.sin(heading); double ca = Math.cos(attitude); double sa = Math.sin(attitude); double cb = Math.cos(bank); double sb = Math.sin(bank); Matrix m = new Matrix(3, 3); m.set(0, 0, ch * ca); m.set(0, 1... | /**
* This conversion uses NASA standard aeroplane conventions as described on
* page:
* http://www.euclideanspace.com/maths/geometry/rotations/euler/index.htm
* Coordinate System: right hand Positive angle: right hand Order of euler
* angles: heading first, then attitude, then bank. matrix row column
* ord... | This conversion uses NASA standard aeroplane conventions as described on page: HREF Coordinate System: right hand Positive angle: right hand Order of euler angles: heading first, then attitude, then bank. matrix row column ordering: [m00 m01 m02] [m10 m11 m12] [m20 m21 m22] | matrixFromEuler | {
"repo_name": "pwrose/biojava",
"path": "biojava-structure/src/main/java/org/biojava/nbio/structure/Calc.java",
"license": "lgpl-2.1",
"size": 33877
} | [
"org.biojava.nbio.structure.jama.Matrix"
] | import org.biojava.nbio.structure.jama.Matrix; | import org.biojava.nbio.structure.jama.*; | [
"org.biojava.nbio"
] | org.biojava.nbio; | 2,715,304 |
public OutputStream open(
OutputStream out,
String encryptionOID,
int keySize,
Provider provider)
throws NoSuchAlgorithmException, CMSException, IOException
{
KeyGenerator keyGen = CMSEnvelopedHelper.INSTANCE.createSymmetricKeyGenera... | OutputStream function( OutputStream out, String encryptionOID, int keySize, Provider provider) throws NoSuchAlgorithmException, CMSException, IOException { KeyGenerator keyGen = CMSEnvelopedHelper.INSTANCE.createSymmetricKeyGenerator(encryptionOID, provider); keyGen.init(keySize, rand); return open(out, encryptionOID, ... | /**
* generate an enveloped object that contains an CMS Enveloped Data
* object using the given provider.
* @deprecated
*/ | generate an enveloped object that contains an CMS Enveloped Data object using the given provider | open | {
"repo_name": "sake/bouncycastle-java",
"path": "src/org/bouncycastle/cms/CMSEnvelopedDataStreamGenerator.java",
"license": "mit",
"size": 12756
} | [
"java.io.IOException",
"java.io.OutputStream",
"java.security.NoSuchAlgorithmException",
"java.security.Provider",
"javax.crypto.KeyGenerator"
] | import java.io.IOException; import java.io.OutputStream; import java.security.NoSuchAlgorithmException; import java.security.Provider; import javax.crypto.KeyGenerator; | import java.io.*; import java.security.*; import javax.crypto.*; | [
"java.io",
"java.security",
"javax.crypto"
] | java.io; java.security; javax.crypto; | 198,249 |
@Override
public Set<Currency> getCurrencies() {
return totalEconomy.getCurrencies();
} | Set<Currency> function() { return totalEconomy.getCurrencies(); } | /**
* Gets a set containing all of the currencies.
*
* @return Set Set of all currencies
*/ | Gets a set containing all of the currencies | getCurrencies | {
"repo_name": "Erigitic/TotalEconomy",
"path": "src/main/java/com/erigitic/config/AccountManager.java",
"license": "mit",
"size": 22387
} | [
"java.util.Set",
"org.spongepowered.api.service.economy.Currency"
] | import java.util.Set; import org.spongepowered.api.service.economy.Currency; | import java.util.*; import org.spongepowered.api.service.economy.*; | [
"java.util",
"org.spongepowered.api"
] | java.util; org.spongepowered.api; | 1,448,287 |
public boolean isValid() {
return StringUtils.isNotBlank(getMarkup());
} | boolean function() { return StringUtils.isNotBlank(getMarkup()); } | /**
* Returns true if multi-line text is present and valid.
* @return Text is valid
*/ | Returns true if multi-line text is present and valid | isValid | {
"repo_name": "cnagel/wcm-io-handler",
"path": "richtext/src/main/java/io/wcm/handler/richtext/ui/ResourceMultilineText.java",
"license": "apache-2.0",
"size": 2587
} | [
"org.apache.commons.lang3.StringUtils"
] | import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 476,648 |
@GET("calendars/my/shows/new/{startdate}/{days}")
Call<List<CalendarShowEntry>> myNewShows(
@Path("startdate") String startDate,
@Path("days") int days
); | @GET(STR) Call<List<CalendarShowEntry>> myNewShows( @Path(STR) String startDate, @Path("days") int days ); | /**
* <b>OAuth Required</b>
*
* @see #newShows(String, int)
*/ | OAuth Required | myNewShows | {
"repo_name": "rhespanhol/RxTraktJava",
"path": "app/src/main/java/me/rhespanhol/rxtraktjava/services/Calendars.java",
"license": "apache-2.0",
"size": 3171
} | [
"java.util.List",
"me.rhespanhol.rxtraktjava.entities.CalendarShowEntry"
] | import java.util.List; import me.rhespanhol.rxtraktjava.entities.CalendarShowEntry; | import java.util.*; import me.rhespanhol.rxtraktjava.entities.*; | [
"java.util",
"me.rhespanhol.rxtraktjava"
] | java.util; me.rhespanhol.rxtraktjava; | 2,285,533 |
public FeedbackQuestionAttributes getCopy() {
FeedbackQuestionAttributes faq = new FeedbackQuestionAttributes();
faq.feedbackSessionName = this.feedbackSessionName;
faq.courseId = this.courseId;
faq.questionDetails = this.getQuestionDetailsCopy();
faq.questionDescription = t... | FeedbackQuestionAttributes function() { FeedbackQuestionAttributes faq = new FeedbackQuestionAttributes(); faq.feedbackSessionName = this.feedbackSessionName; faq.courseId = this.courseId; faq.questionDetails = this.getQuestionDetailsCopy(); faq.questionDescription = this.questionDescription; faq.questionNumber = this.... | /**
* Gets a deep copy of this object.
*/ | Gets a deep copy of this object | getCopy | {
"repo_name": "wkurniawan07/repo",
"path": "src/main/java/teammates/common/datatransfer/attributes/FeedbackQuestionAttributes.java",
"license": "gpl-2.0",
"size": 24524
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 80,042 |
private String storeToDB(Element eJob, CoordinatorJobBean coordJob) throws CommandException {
String jobId = Services.get().get(UUIDService.class).generateId(ApplicationType.COORDINATOR);
coordJob.setId(jobId);
coordJob.setAuthToken(this.authToken);
coordJob.setAppPath(conf.get(Oozi... | String function(Element eJob, CoordinatorJobBean coordJob) throws CommandException { String jobId = Services.get().get(UUIDService.class).generateId(ApplicationType.COORDINATOR); coordJob.setId(jobId); coordJob.setAuthToken(this.authToken); coordJob.setAppPath(conf.get(OozieClient.COORDINATOR_APP_PATH)); coordJob.setCr... | /**
* Write a coordinator job into database
*
* @param eJob : XML element of job
* @param coordJob : Coordinator job bean
* @return Job id
* @throws CommandException thrown if unable to save coordinator job to db
*/ | Write a coordinator job into database | storeToDB | {
"repo_name": "sunmeng007/oozie",
"path": "core/src/main/java/org/apache/oozie/command/coord/CoordSubmitXCommand.java",
"license": "apache-2.0",
"size": 44340
} | [
"java.util.Date",
"org.apache.oozie.CoordinatorJobBean",
"org.apache.oozie.client.OozieClient",
"org.apache.oozie.command.CommandException",
"org.apache.oozie.executor.jpa.CoordJobInsertJPAExecutor",
"org.apache.oozie.executor.jpa.JPAExecutorException",
"org.apache.oozie.service.Services",
"org.apache... | import java.util.Date; import org.apache.oozie.CoordinatorJobBean; import org.apache.oozie.client.OozieClient; import org.apache.oozie.command.CommandException; import org.apache.oozie.executor.jpa.CoordJobInsertJPAExecutor; import org.apache.oozie.executor.jpa.JPAExecutorException; import org.apache.oozie.service.Serv... | import java.util.*; import org.apache.oozie.*; import org.apache.oozie.client.*; import org.apache.oozie.command.*; import org.apache.oozie.executor.jpa.*; import org.apache.oozie.service.*; import org.apache.oozie.util.*; import org.jdom.*; | [
"java.util",
"org.apache.oozie",
"org.jdom"
] | java.util; org.apache.oozie; org.jdom; | 2,075,206 |
private SourceFilter constructSourceFilter(final InetAddress groupAddress) throws SdpException {
if (logger.isLoggable(Level.FINER)) {
logger.finer(log.entry("constructSourceFilter", Logging.address(groupAddress)));
}
SourceFilter filter = new SourceFilter(groupAddress);
... | SourceFilter function(final InetAddress groupAddress) throws SdpException { if (logger.isLoggable(Level.FINER)) { logger.finer(log.entry(STR, Logging.address(groupAddress))); } SourceFilter filter = new SourceFilter(groupAddress); Vector<?> attributes = this.inputMediaDescription.getAttributes(false); if (attributes !=... | /**
* Constructs a {@link SourceFilter} instance for a group address.
* @throws SdpException
*/ | Constructs a <code>SourceFilter</code> instance for a group address | constructSourceFilter | {
"repo_name": "chenxiuheng/js4ms",
"path": "js4ms-jsdk/reflector/src/main/java/org/js4ms/reflector/MulticastReflectorStream.java",
"license": "apache-2.0",
"size": 19000
} | [
"gov.nist.javax.sdp.fields.AttributeField",
"java.net.InetAddress",
"java.util.Vector",
"java.util.logging.Level",
"javax.sdp.SdpException",
"org.js4ms.amt.proxy.SourceFilter",
"org.js4ms.common.util.logging.Logging"
] | import gov.nist.javax.sdp.fields.AttributeField; import java.net.InetAddress; import java.util.Vector; import java.util.logging.Level; import javax.sdp.SdpException; import org.js4ms.amt.proxy.SourceFilter; import org.js4ms.common.util.logging.Logging; | import gov.nist.javax.sdp.fields.*; import java.net.*; import java.util.*; import java.util.logging.*; import javax.sdp.*; import org.js4ms.amt.proxy.*; import org.js4ms.common.util.logging.*; | [
"gov.nist.javax",
"java.net",
"java.util",
"javax.sdp",
"org.js4ms.amt",
"org.js4ms.common"
] | gov.nist.javax; java.net; java.util; javax.sdp; org.js4ms.amt; org.js4ms.common; | 2,170,441 |
protected String getModifiersLabel() {
return NewWizardMessages.NewTypeWizardPage_modifiers_acc_label;
} | String function() { return NewWizardMessages.NewTypeWizardPage_modifiers_acc_label; } | /**
* Returns the label that is used for the modifiers input field.
*
* @return the label that is used for the modifiers input field
* @since 3.2
*/ | Returns the label that is used for the modifiers input field | getModifiersLabel | {
"repo_name": "psoreide/bnd",
"path": "bndtools.core/src/org/bndtools/core/ui/wizards/ds/NewTypeWizardPage.java",
"license": "apache-2.0",
"size": 94393
} | [
"org.eclipse.jdt.internal.ui.wizards.NewWizardMessages"
] | import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages; | import org.eclipse.jdt.internal.ui.wizards.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 2,512,789 |
@Source("com/google/appinventor/images/form.png")
ImageResource form(); | @Source(STR) ImageResource form(); | /**
* Designer palette item: form component
*/ | Designer palette item: form component | form | {
"repo_name": "jisqyv/appinventor-sources",
"path": "appinventor/appengine/src/com/google/appinventor/client/Images.java",
"license": "apache-2.0",
"size": 19490
} | [
"com.google.gwt.resources.client.ImageResource"
] | import com.google.gwt.resources.client.ImageResource; | import com.google.gwt.resources.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,697,589 |
private static Map<Symbol, Object> convert(Map<String, Object> sourceMap) {
if (sourceMap == null) {
return null;
}
return sourceMap.entrySet().stream()
.collect(HashMap::new,
(existing, entry) -> existing.put(Symbol.valueOf(entry.getKey()), entry.get... | static Map<Symbol, Object> function(Map<String, Object> sourceMap) { if (sourceMap == null) { return null; } return sourceMap.entrySet().stream() .collect(HashMap::new, (existing, entry) -> existing.put(Symbol.valueOf(entry.getKey()), entry.getValue()), (HashMap::putAll)); } private MessageUtils() { } | /**
* Converts a map from it's string keys to use {@link Symbol}.
*
* @param sourceMap Source map.
*
* @return A map with corresponding keys as symbols.
*/ | Converts a map from it's string keys to use <code>Symbol</code> | convert | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/MessageUtils.java",
"license": "mit",
"size": 25682
} | [
"java.util.HashMap",
"java.util.Map",
"org.apache.qpid.proton.amqp.Symbol"
] | import java.util.HashMap; import java.util.Map; import org.apache.qpid.proton.amqp.Symbol; | import java.util.*; import org.apache.qpid.proton.amqp.*; | [
"java.util",
"org.apache.qpid"
] | java.util; org.apache.qpid; | 946,325 |
@Nullable
public static <T> T getInstance(@Nonnull final String className, @Nonnull final Class<T> type) {
try {
Class<?> cls = Class.forName(className);
if (type.isAssignableFrom(cls)) {
return type.cast(cls.newInstance());
} else {
log.warning("given class [" + className + "] does no... | static <T> T function(@Nonnull final String className, @Nonnull final Class<T> type) { try { Class<?> cls = Class.forName(className); if (type.isAssignableFrom(cls)) { return type.cast(cls.newInstance()); } else { log.warning(STR + className + STR + type.getName() + "]"); } } catch (Exception e) { log.warning(STR + cla... | /**
* dynamically load the given class, create and return a new instance.
* @param className className
* @param type type
* @param <T> class
* @return new ScreenController instance or null
*/ | dynamically load the given class, create and return a new instance | getInstance | {
"repo_name": "atomixnmc/nifty-gui",
"path": "nifty-core/src/main/java/de/lessvoid/xml/tools/ClassHelper.java",
"license": "bsd-2-clause",
"size": 1897
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 926,975 |
protected void iterateResource(Counter counter, Element parent, java.util.Collection list,
java.lang.String parentTag, java.lang.String childTag)
{
boolean shouldExist = (list != null) && (list.size() > 0);
Element element = updateElement(counter, parent, parentTag, shouldExist);
if ... | void function(Counter counter, Element parent, java.util.Collection list, java.lang.String parentTag, java.lang.String childTag) { boolean shouldExist = (list != null) && (list.size() > 0); Element element = updateElement(counter, parent, parentTag, shouldExist); if (shouldExist) { Iterator it = list.iterator(); Iterat... | /**
* Method iterateResource.
*
* @param counter
* @param childTag
* @param parentTag
* @param list
* @param parent
*/ | Method iterateResource | iterateResource | {
"repo_name": "jerr/jbossforge-core",
"path": "maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java",
"license": "epl-1.0",
"size": 84577
} | [
"java.util.Collection",
"java.util.Iterator",
"org.apache.maven.model.Resource",
"org.jdom.Element"
] | import java.util.Collection; import java.util.Iterator; import org.apache.maven.model.Resource; import org.jdom.Element; | import java.util.*; import org.apache.maven.model.*; import org.jdom.*; | [
"java.util",
"org.apache.maven",
"org.jdom"
] | java.util; org.apache.maven; org.jdom; | 1,669,314 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.