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_ACTIVITY_CLEAR_TOP);
// Add new Flag to start new Activity
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// Staring Login Activity
_context.startActivity(i);
}
|
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) {
e.printStackTrace();
}
}
|
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.getLocation().getName());
world.setLocation(location);
gameRaw(context, location.describe());
if (location instanceof Town) {
// Restore hp and mp once we get to town.
context.getPlayer().restore();
}
return true;
}
|
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(location); gameRaw(context, location.describe()); if (location instanceof Town) { context.getPlayer().restore(); } return true; }
|
/**
* 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" + "Precision: " + precision + " (" + precisionStr + " seconds)\n" + "Root delay: " + new DecimalFormat("0.00").format(rootDelay * 1000) + " ms\n" + "Root dispersion: " + new DecimalFormat("0.00").format(rootDispersion * 1000) + " ms\n" + "Reference identifier: " + referenceIdentifierToString(referenceIdentifier, stratum, version) + "\n" + "Reference timestamp: " + timestampToString(referenceTimestamp) + "\n" + "Originate timestamp: " + timestampToString(originateTimestamp) + "\n" + "Receive timestamp: " + timestampToString(receiveTimestamp) + "\n" + "Transmit timestamp: " + timestampToString(transmitTimestamp);
}
|
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(rootDelay * 1000) + STR + STR + new DecimalFormat("0.00").format(rootDispersion * 1000) + STR + STR + referenceIdentifierToString(referenceIdentifier, stratum, version) + "\n" + STR + timestampToString(referenceTimestamp) + "\n" + STR + timestampToString(originateTimestamp) + "\n" + STR + timestampToString(receiveTimestamp) + "\n" + STR + timestampToString(transmitTimestamp); }
|
/**
* 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.ELLIPSIS, parseTypeExpression(next()));
hasVarArgs = true;
} else {
arg = parseTypeExpression(token);
}
if (arg == null) {
return null;
}
array.addChildToBack(arg);
if (hasVarArgs) {
break;
}
skipEOLs();
} while (match(JsDocToken.COMMA));
if (!match(JsDocToken.RB)) {
return reportTypeSyntaxWarning("msg.jsdoc.missing.rb");
}
next();
return array;
}
|
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 = parseTypeExpression(token); } if (arg == null) { return null; } array.addChildToBack(arg); if (hasVarArgs) { break; } skipEOLs(); } while (match(JsDocToken.COMMA)); if (!match(JsDocToken.RB)) { return reportTypeSyntaxWarning(STR); } next(); return array; }
|
/**
* 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 SDK.", e);
}
String jwtAssertion = this.constructJWTAssertion();
String urlParameters = String.format(JWT_GRANT_TYPE, this.getClientID(), this.getClientSecret(), jwtAssertion);
BoxAPIRequest request = new BoxAPIRequest(this, url, "POST");
request.shouldAuthenticate(false);
request.setBody(urlParameters);
String json;
try {
BoxJSONResponse response = (BoxJSONResponse) request.send();
json = response.getJSON();
} catch (BoxAPIException ex) {
// Use the Date advertised by the Box server as the current time to synchronize clocks
List<String> responseDates = ex.getHeaders().get("Date");
NumericDate currentTime;
if (responseDates != null) {
String responseDate = responseDates.get(0);
SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss zzz");
try {
Date date = dateFormat.parse(responseDate);
currentTime = NumericDate.fromMilliseconds(date.getTime());
} catch (ParseException e) {
currentTime = NumericDate.now();
}
} else {
currentTime = NumericDate.now();
}
// Reconstruct the JWT assertion, which regenerates the jti claim, with the new "current" time
jwtAssertion = this.constructJWTAssertion(currentTime);
urlParameters = String.format(JWT_GRANT_TYPE, this.getClientID(), this.getClientSecret(), jwtAssertion);
// Re-send the updated request
request = new BoxAPIRequest(this, url, "POST");
request.shouldAuthenticate(false);
request.setBody(urlParameters);
BoxJSONResponse response = (BoxJSONResponse) request.send();
json = response.getJSON();
}
JsonObject jsonObject = JsonObject.readFrom(json);
this.setAccessToken(jsonObject.get("access_token").asString());
this.setLastRefresh(System.currentTimeMillis());
this.setExpires(jsonObject.get("expires_in").asLong() * 1000);
//if token cache is specified, save to cache
if (this.accessTokenCache != null) {
String key = this.getAccessTokenCacheKey();
JsonObject accessTokenCacheInfo = new JsonObject()
.add("accessToken", this.getAccessToken())
.add("lastRefresh", this.getLastRefresh())
.add("expires", this.getExpires());
this.accessTokenCache.put(key, accessTokenCacheInfo.toString());
}
}
|
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(), jwtAssertion); BoxAPIRequest request = new BoxAPIRequest(this, url, "POST"); request.shouldAuthenticate(false); request.setBody(urlParameters); String json; try { BoxJSONResponse response = (BoxJSONResponse) request.send(); json = response.getJSON(); } catch (BoxAPIException ex) { List<String> responseDates = ex.getHeaders().get("Date"); NumericDate currentTime; if (responseDates != null) { String responseDate = responseDates.get(0); SimpleDateFormat dateFormat = new SimpleDateFormat(STR); try { Date date = dateFormat.parse(responseDate); currentTime = NumericDate.fromMilliseconds(date.getTime()); } catch (ParseException e) { currentTime = NumericDate.now(); } } else { currentTime = NumericDate.now(); } jwtAssertion = this.constructJWTAssertion(currentTime); urlParameters = String.format(JWT_GRANT_TYPE, this.getClientID(), this.getClientSecret(), jwtAssertion); request = new BoxAPIRequest(this, url, "POST"); request.shouldAuthenticate(false); request.setBody(urlParameters); BoxJSONResponse response = (BoxJSONResponse) request.send(); json = response.getJSON(); } JsonObject jsonObject = JsonObject.readFrom(json); this.setAccessToken(jsonObject.get(STR).asString()); this.setLastRefresh(System.currentTimeMillis()); this.setExpires(jsonObject.get(STR).asLong() * 1000); if (this.accessTokenCache != null) { String key = this.getAccessTokenCacheKey(); JsonObject accessTokenCacheInfo = new JsonObject() .add(STR, this.getAccessToken()) .add(STR, this.getLastRefresh()) .add(STR, this.getExpires()); this.accessTokenCache.put(key, accessTokenCacheInfo.toString()); } }
|
/**
* 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 + " = '" + statusName + "'", null);
List<Long> result = new ArrayList<>();
while (c.moveToNext()) {
result.add(c.getLong(0));
}
c.close();
return result;
}
|
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.getLong(0)); } c.close(); return result; }
|
/**
* 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 = getHeight() - getPaddingBottom()
- getPaddingTop();
final int bottom = getChildAt(0).getHeight();
final int maxY = Math.max(0, bottom - height);
final int scrollY = getScrollY();
dy = Math.max(0, Math.min(scrollY + dy, maxY)) - scrollY;
mScroller.startScroll(getScrollX(), scrollY, 0, dy);
ViewCompat.postInvalidateOnAnimation(this);
}else if (scrollDirection == DIRECTION_HORIZONTAL){
final int width = getWidth() - getPaddingLeft()
- getPaddingRight();
final int right = getChildAt(0).getHeight();
final int maxX = Math.max(0, right - width);
final int scrollX = getScrollX();
dx = Math.max(Math.min(scrollX + dx, maxX),0) - scrollX;
mScroller.startScroll(scrollX, getScrollY(), dx, 0);
ViewCompat.postInvalidateOnAnimation(this);
}
} else {
if (!mScroller.isFinished()) {
mScroller.abortAnimation();
}
scrollBy(dx, dy);
}
mLastScroll = AnimationUtils.currentAnimationTimeMillis();
}
|
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 bottom = getChildAt(0).getHeight(); final int maxY = Math.max(0, bottom - height); final int scrollY = getScrollY(); dy = Math.max(0, Math.min(scrollY + dy, maxY)) - scrollY; mScroller.startScroll(getScrollX(), scrollY, 0, dy); ViewCompat.postInvalidateOnAnimation(this); }else if (scrollDirection == DIRECTION_HORIZONTAL){ final int width = getWidth() - getPaddingLeft() - getPaddingRight(); final int right = getChildAt(0).getHeight(); final int maxX = Math.max(0, right - width); final int scrollX = getScrollX(); dx = Math.max(Math.min(scrollX + dx, maxX),0) - scrollX; mScroller.startScroll(scrollX, getScrollY(), dx, 0); ViewCompat.postInvalidateOnAnimation(this); } } else { if (!mScroller.isFinished()) { mScroller.abortAnimation(); } scrollBy(dx, dy); } mLastScroll = AnimationUtils.currentAnimationTimeMillis(); }
|
/**
* 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), it is located in Drive:\RECYCLED. In the NTFS filesystem
// (Windows 2000, XP, NT) it can be found in Drive:\RECYCLER, with the exception of Windows Vista which stores
// it in the Drive:\$Recycle.Bin folder."
// => for the test to be accurate, we'd have to go thru the trouble of testing the kind of filesystem
// (FAT or NTFS) and the Windows version. It's a lot of work for little added value.
return false;
}
|
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.request() + "]";
if (primaryResponse.isFailed()) {
return primaryResponse.getFailure().getSeqNo() != SequenceNumbersService.UNASSIGNED_SEQ_NO
? ReplicaItemExecutionMode.FAILURE // we have a seq no generated with the failure, replicate as no-op
: ReplicaItemExecutionMode.NOOP; // no seq no generated, ignore replication
} else {
// TODO: once we know for sure that every operation that has been processed on the primary is assigned a seq#
// (i.e., all nodes on the cluster are on v6.0.0 or higher) we can use the existence of a seq# to indicate whether
// an operation should be processed or be treated as a noop. This means we could remove this method and the
// ReplicaItemExecutionMode enum and have a simple boolean check for seq != UNASSIGNED_SEQ_NO which will work for
// both failures and indexing operations.
return primaryResponse.getResponse().getResult() != DocWriteResponse.Result.NOOP
? ReplicaItemExecutionMode.NORMAL // execution successful on primary
: ReplicaItemExecutionMode.NOOP; // ignore replication
}
}
|
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.getFailure().getSeqNo() != SequenceNumbersService.UNASSIGNED_SEQ_NO ? ReplicaItemExecutionMode.FAILURE : ReplicaItemExecutionMode.NOOP; } else { return primaryResponse.getResponse().getResult() != DocWriteResponse.Result.NOOP ? ReplicaItemExecutionMode.NORMAL : ReplicaItemExecutionMode.NOOP; } }
|
/**
* 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 ReplicaItemExecutionMode#NOOP} upon primary execution failure before sequence no generation or
* when primary execution resulted in noop (only possible for write requests from pre-6.0 nodes)
*/
|
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.executeQuery();
if (result.next())
{
if (!result.getBoolean(1))
{ // (status = 0 = false) implies that the bot is not logged in.
// We can login it safely.
bot = new Bot(com, result.getString(2), mode, result.getDouble(3),
this);
// UPDATE bots SET status = 1, lastLoginDate = NOW(), lastIP = ?
// WHERE token = ? LIMIT 1;
loginUpdateStmt.setString(1, ip);
loginUpdateStmt.setString(2, token);
loginUpdateStmt.executeUpdate();
}
else
{ // The bot is already logged in on another client.
throw new BotLoginException(102);
}
}
else
{ // No result therefore no bot is associated with the given token.
throw new BotLoginException(101);
}
}
catch (SQLException e)
{
logSQLException("Cannot execute the SQL statements for logging a bot", e);
return null;
}
finally
{
if (result != null)
{ // Release ResultSet.
try
{
result.close();
}
catch (SQLException e)
{
logSQLException("Error closing a ResultSet", e);
}
result = null;
}
}
return bot;
}
|
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.getString(2), mode, result.getDouble(3), this); loginUpdateStmt.setString(1, ip); loginUpdateStmt.setString(2, token); loginUpdateStmt.executeUpdate(); } else { throw new BotLoginException(102); } } else { throw new BotLoginException(101); } } catch (SQLException e) { logSQLException(STR, e); return null; } finally { if (result != null) { try { result.close(); } catch (SQLException e) { logSQLException(STR, e); } result = null; } } return bot; }
|
/**
* 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.
* @return a new bot if the login succeed.
* @throws BotLoginException if the login failed.
*/
|
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, searchShardTarget.getNodeId());
sendReleaseSearchContext(entry.getRequestId(), connection, searchShardTarget.getOriginalIndices());
} catch (Exception inner) {
inner.addSuppressed(exception);
logger.trace("failed to release context", inner);
}
});
listener.onFailure(exception);
}
|
void function(SearchPhaseExecutionException exception) { results.getSuccessfulResults().forEach((entry) -> { try { SearchShardTarget searchShardTarget = entry.getSearchShardTarget(); Transport.Connection connection = getConnection(null, searchShardTarget.getNodeId()); sendReleaseSearchContext(entry.getRequestId(), connection, searchShardTarget.getOriginalIndices()); } catch (Exception inner) { inner.addSuppressed(exception); logger.trace(STR, inner); } }); listener.onFailure(exception); }
|
/**
* 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) {
answer += text.substring(1, length);
}
return answer;
}
|
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.setDuration(duration);
inFromLeft.setInterpolator(interpolator==null?new AccelerateInterpolator():interpolator); //AccelerateInterpolator
return inFromLeft;
}
|
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.setInterpolator(interpolator==null?new AccelerateInterpolator():interpolator); return inFromLeft; }
|
/**
* 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 IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link SyncPoller} for polling of long-running operation.
*/
|
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.AFFECTS_OUTPUTS},
help = "The fdo_profile representing the profile to be used for optimization."
)
public Label fdoProfileLabel;
@Option(
name = "cs_fdo_profile",
defaultValue = "null",
category = "flags",
converter = LabelConverter.class,
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
help =
"The cs_fdo_profile representing the context sensitive profile to be used for"
+ " optimization.")
public Label csFdoProfileLabel;
@Option(
name = "enable_fdo_profile_absolute_path",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
help = "If set, use of fdo_absolute_profile_path will raise an error.")
public boolean enableFdoProfileAbsolutePath;
@Option(
name = "save_temps",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.OUTPUT_SELECTION,
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
help =
"If set, temporary outputs from gcc will be saved. "
+ "These include .s files (assembler code), .i files (preprocessed C) and "
+ ".ii files (preprocessed C++)."
)
public boolean saveTemps;
@Option(
name = "per_file_copt",
allowMultiple = true,
converter = PerLabelOptions.PerLabelOptionsConverter.class,
defaultValue = "null",
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
help =
"Additional options to selectively pass to gcc when compiling certain files. "
+ "This option can be passed multiple times. "
+ "Syntax: regex_filter@option_1,option_2,...,option_n. Where regex_filter stands "
+ "for a list of include and exclude regular expression patterns (Also see "
+ "--instrumentation_filter). option_1 to option_n stand for "
+ "arbitrary command line options. If an option contains a comma it has to be "
+ "quoted with a backslash. Options can contain @. Only the first @ is used to "
+ "split the string. Example: "
+ "--per_file_copt=//foo/.*\\.cc,-//foo/bar\\.cc@-O0 adds the -O0 "
+ "command line option to the gcc command line of all cc files in //foo/ "
+ "except bar.cc.")
public List<PerLabelOptions> perFileCopts;
@Option(
name = "per_file_ltobackendopt",
allowMultiple = true,
converter = PerLabelOptions.PerLabelOptionsConverter.class,
defaultValue = "null",
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
help =
"Additional options to selectively pass to LTO backend (under --features=thin_lto) when "
+ "compiling certain backend objects. This option can be passed multiple times. "
+ "Syntax: regex_filter@option_1,option_2,...,option_n. Where regex_filter stands "
+ "for a list of include and exclude regular expression patterns. "
+ "option_1 to option_n stand for arbitrary command line options. "
+ "If an option contains a comma it has to be quoted with a backslash. "
+ "Options can contain @. Only the first @ is used to split the string. Example: "
+ "--per_file_ltobackendopt=//foo/.*\\.o,-//foo/bar\\.o@-O0 adds the -O0 "
+ "command line option to the LTO backend command line of all o files in //foo/ "
+ "except bar.o.")
public List<PerLabelOptions> perFileLtoBackendOpts;
@Option(
name = "host_crosstool_top",
defaultValue = "null",
converter = LabelConverter.class,
documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
effectTags = {
OptionEffectTag.LOADING_AND_ANALYSIS,
OptionEffectTag.CHANGES_INPUTS,
OptionEffectTag.AFFECTS_OUTPUTS
},
help =
"By default, the --crosstool_top and --compiler options are also used "
+ "for the host configuration. If this flag is provided, Bazel uses the default libc "
+ "and compiler for the given crosstool_top."
)
public Label hostCrosstoolTop;
@Option(
name = "host_copt",
allowMultiple = true,
defaultValue = "null",
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
help = "Additional options to pass to gcc for host tools.")
public List<String> hostCoptList;
@Option(
name = "host_cxxopt",
allowMultiple = true,
defaultValue = "null",
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
help = "Additional options to pass to gcc for host tools.")
public List<String> hostCxxoptList;
@Option(
name = "host_conlyopt",
allowMultiple = true,
defaultValue = "null",
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
help = "Additional option to pass to gcc when compiling C source files for host tools.")
public List<String> hostConlyoptList;
@Option(
name = "host_linkopt",
defaultValue = "null",
allowMultiple = true,
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
help = "Additional option to pass to gcc when linking host tools.")
public List<String> hostLinkoptList;
@Option(
name = "grte_top",
defaultValue = "null", // The default value is chosen by the toolchain.
converter = LibcTopLabelConverter.class,
documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
help =
"A label to a checked-in libc library. The default value is selected by the crosstool "
+ "toolchain, and you almost never need to override it."
)
public Label libcTopLabel;
@Option(
name = "host_grte_top",
defaultValue = "null", // The default value is chosen by the toolchain.
converter = LibcTopLabelConverter.class,
documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
help =
"If specified, this setting overrides the libc top-level directory (--grte_top) "
+ "for the host configuration."
)
public Label hostLibcTopLabel;
private static final String TARGET_LIBC_TOP_NOT_YET_SET = "TARGET LIBC TOP NOT YET SET";
// TODO(b/129045294): Remove once toolchain-transitions are implemented.
@Option(
name = "target libcTop label",
defaultValue = TARGET_LIBC_TOP_NOT_YET_SET,
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
converter = LibcTopLabelConverter.class,
effectTags = {
OptionEffectTag.LOSES_INCREMENTAL_STATE,
OptionEffectTag.AFFECTS_OUTPUTS,
OptionEffectTag.LOADING_AND_ANALYSIS
},
metadataTags = {OptionMetadataTag.INTERNAL})
public Label targetLibcTopLabel;
@Option(
name = "experimental_inmemory_dotd_files",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.BUILD_TIME_OPTIMIZATION,
effectTags = {
OptionEffectTag.LOADING_AND_ANALYSIS,
OptionEffectTag.EXECUTION,
OptionEffectTag.AFFECTS_OUTPUTS
},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"If enabled, C++ .d files will be passed through in memory directly from the remote "
+ "build nodes instead of being written to disk."
)
public boolean inmemoryDotdFiles;
@Option(
name = "parse_headers_verifies_modules",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.BUILD_TIME_OPTIMIZATION,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS, OptionEffectTag.CHANGES_INPUTS},
help =
"If enabled, the parse_headers feature verifies that a header module can be built for the "
+ "target in question instead of doing a separate compile of the header."
)
public boolean parseHeadersVerifiesModules;
@Option(
name = "experimental_omitfp",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"If true, use libunwind for stack unwinding, and compile with "
+ "-fomit-frame-pointer and -fasynchronous-unwind-tables."
)
public boolean experimentalOmitfp;
@Option(
name = "share_native_deps",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS, OptionEffectTag.AFFECTS_OUTPUTS},
help =
"If true, native libraries that contain identical functionality "
+ "will be shared among different targets"
)
public boolean shareNativeDeps;
@Option(
name = "strict_system_includes",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.INPUT_STRICTNESS,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS, OptionEffectTag.EAGERNESS_TO_EXIT},
help =
"If true, headers found through system include paths (-isystem) are also required to be "
+ "declared."
)
public boolean strictSystemIncludes;
@Option(
name = "experimental_use_llvm_covmap",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
effectTags = {
OptionEffectTag.CHANGES_INPUTS,
OptionEffectTag.AFFECTS_OUTPUTS,
OptionEffectTag.LOADING_AND_ANALYSIS
},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"If specified, Bazel will generate llvm-cov coverage map information rather than "
+ "gcov when collect_code_coverage is enabled."
)
public boolean useLLVMCoverageMapFormat;
@Option(
name = "incompatible_dont_enable_host_nonhost_crosstool_features",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
},
help =
"If true, Bazel will not enable 'host' and 'nonhost' features in the c++ toolchain "
+ "(see https://github.com/bazelbuild/bazel/issues/7407 for more information).")
public boolean dontEnableHostNonhost;
@Option(
name = "incompatible_make_thinlto_command_lines_standalone",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
},
help =
"If true, Bazel will not reuse C++ link action command lines for lto indexing command "
+ "lines (see https://github.com/bazelbuild/bazel/issues/6791 for more information).")
public boolean useStandaloneLtoIndexingCommandLines;
@Option(
name = "incompatible_require_ctx_in_configure_features",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
},
help =
"If true, Bazel will require 'ctx' parameter in to cc_common.configure_features "
+ "(see https://github.com/bazelbuild/bazel/issues/7793 for more information).")
public boolean requireCtxInConfigureFeatures;
@Option(
name = "incompatible_validate_top_level_header_inclusions",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.INPUT_STRICTNESS,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
},
help =
"If true, Bazel will also validate top level directory header inclusions "
+ "(see https://github.com/bazelbuild/bazel/issues/10047 for more information).")
public boolean validateTopLevelHeaderInclusions;
@Option(
name = "incompatible_remove_legacy_whole_archive",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
},
help =
"If true, Bazel will not link library dependencies as whole archive by default "
+ "(see https://github.com/bazelbuild/bazel/issues/7362 for migration instructions).")
public boolean removeLegacyWholeArchive;
@Option(
name = "incompatible_remove_cpu_and_compiler_attributes_from_cc_toolchain",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
},
help =
"If true, Bazel will complain when cc_toolchain.cpu and cc_toolchain.compiler attribtues "
+ "are set "
+ "(see https://github.com/bazelbuild/bazel/issues/7075 for migration instructions).")
public boolean removeCpuCompilerCcToolchainAttributes;
@Option(
name = "incompatible_disable_expand_if_all_available_in_flag_set",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
},
help =
"If true, Bazel will not allow specifying expand_if_all_available in flag_sets"
+ "(see https://github.com/bazelbuild/bazel/issues/7008 for migration instructions).")
public boolean disableExpandIfAllAvailableInFlagSet;
@Option(
name = "experimental_includes_attribute_subpackage_traversal",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.EXECUTION},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help =
"If a cc target has loose headers checking, disabled layering check and an "
+ "includes attribute set, it is allowed to include anything under its folder, even "
+ "across subpackage boundaries.")
public boolean experimentalIncludesAttributeSubpackageTraversal;
@Option(
name = "experimental_do_not_use_cpu_transformer",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.EXECUTION},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help = "If enabled, cpu transformer is not used for CppConfiguration")
public boolean doNotUseCpuTransformer;
@Option(
name = "incompatible_disable_legacy_cc_provider",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
},
help = "If true, the legacy provider accessible by 'dep.cc.' is removed. See #7036.")
// TODO(b/122328491): Document migration steps. See #7036.
public boolean disableLegacyCcProvider;
@Option(
name = "incompatible_enable_cc_toolchain_resolution",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
},
help = "If true, cc rules use toolchain resolution to find the cc_toolchain.")
public boolean enableCcToolchainResolution;
@Option(
name = "experimental_save_feature_state",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.OUTPUT_SELECTION,
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help = "Save the state of enabled and requested feautres as an output of compilation.")
public boolean saveFeatureState;
@Option(
name = "incompatible_use_specific_tool_files",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
},
help =
"Use cc toolchain's compiler_files, as_files, and ar_files as inputs to appropriate "
+ "actions. See https://github.com/bazelbuild/bazel/issues/8531")
public boolean useSpecificToolFiles;
@Option(
name = "incompatible_disable_static_cc_toolchains",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
},
help =
"@bazel_tools//tools/cpp:default-toolchain target was removed."
+ "See https://github.com/bazelbuild/bazel/issues/8546.")
public boolean disableStaticCcToolchains;
@Option(
name = "incompatible_disable_nocopts",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.ACTION_COMMAND_LINES},
metadataTags = {
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES,
},
help =
"When enabled, it removes nocopts attribute from C++ rules. See"
+ " https://github.com/bazelbuild/bazel/issues/8706 for details.")
public boolean disableNoCopts;
@Option(
name = "incompatible_load_cc_rules_from_bzl",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
},
help =
"If enabled, direct usage of the native C++ and some Objc rules is disabled. Please use "
+ "the Starlark rules instead https://github.com/bazelbuild/rules_cc")
public boolean loadCcRulesFromBzl;
|
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( name = STR, defaultValue = "null", category = "flags", converter = LabelConverter.class, documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, effectTags = {OptionEffectTag.AFFECTS_OUTPUTS}, help = STR + STR) public Label csFdoProfileLabel; @Option( name = STR, defaultValue = "true", documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, effectTags = {OptionEffectTag.AFFECTS_OUTPUTS}, help = STR) public boolean enableFdoProfileAbsolutePath; @Option( name = STR, defaultValue = "false", documentationCategory = OptionDocumentationCategory.OUTPUT_SELECTION, effectTags = {OptionEffectTag.AFFECTS_OUTPUTS}, help = STR + STR + STR ) public boolean saveTemps; @Option( name = STR, allowMultiple = true, converter = PerLabelOptions.PerLabelOptionsConverter.class, defaultValue = "null", documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS}, help = STR + STR + STR + STR + STR + STR + STR + STR + STRcommand line option to the gcc command line of all cc files in + STR) public List<PerLabelOptions> perFileCopts; @Option( name = STR, allowMultiple = true, converter = PerLabelOptions.PerLabelOptionsConverter.class, defaultValue = "null", documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS}, help = STR + STR + STR + STR + STR + STR + STR + STRcommand line option to the LTO backend command line of all o files in + STR) public List<PerLabelOptions> perFileLtoBackendOpts; @Option( name = STR, defaultValue = "null", converter = LabelConverter.class, documentationCategory = OptionDocumentationCategory.TOOLCHAIN, effectTags = { OptionEffectTag.LOADING_AND_ANALYSIS, OptionEffectTag.CHANGES_INPUTS, OptionEffectTag.AFFECTS_OUTPUTS }, help = STR + STR + STR ) public Label hostCrosstoolTop; @Option( name = STR, allowMultiple = true, defaultValue = "null", documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS}, help = STR) public List<String> hostCoptList; @Option( name = STR, allowMultiple = true, defaultValue = "null", documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS}, help = STR) public List<String> hostCxxoptList; @Option( name = STR, allowMultiple = true, defaultValue = "null", documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS}, help = STR) public List<String> hostConlyoptList; @Option( name = STR, defaultValue = "null", allowMultiple = true, documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS}, help = STR) public List<String> hostLinkoptList; @Option( name = STR, defaultValue = "null", converter = LibcTopLabelConverter.class, documentationCategory = OptionDocumentationCategory.TOOLCHAIN, effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS}, help = STR + STR ) public Label libcTopLabel; @Option( name = STR, defaultValue = "null", converter = LibcTopLabelConverter.class, documentationCategory = OptionDocumentationCategory.TOOLCHAIN, effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS}, help = STR + STR ) public Label hostLibcTopLabel; private static final String TARGET_LIBC_TOP_NOT_YET_SET = STR; @Option( name = STR, defaultValue = TARGET_LIBC_TOP_NOT_YET_SET, documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, converter = LibcTopLabelConverter.class, effectTags = { OptionEffectTag.LOSES_INCREMENTAL_STATE, OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.LOADING_AND_ANALYSIS }, metadataTags = {OptionMetadataTag.INTERNAL}) public Label targetLibcTopLabel; @Option( name = STR, defaultValue = "false", documentationCategory = OptionDocumentationCategory.BUILD_TIME_OPTIMIZATION, effectTags = { OptionEffectTag.LOADING_AND_ANALYSIS, OptionEffectTag.EXECUTION, OptionEffectTag.AFFECTS_OUTPUTS }, metadataTags = {OptionMetadataTag.EXPERIMENTAL}, help = STR + STR ) public boolean inmemoryDotdFiles; @Option( name = STR, defaultValue = "false", documentationCategory = OptionDocumentationCategory.BUILD_TIME_OPTIMIZATION, effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS, OptionEffectTag.CHANGES_INPUTS}, help = STR + STR ) public boolean parseHeadersVerifiesModules; @Option( name = STR, defaultValue = "false", documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, effectTags = {OptionEffectTag.ACTION_COMMAND_LINES, OptionEffectTag.AFFECTS_OUTPUTS}, metadataTags = {OptionMetadataTag.EXPERIMENTAL}, help = STR + STR ) public boolean experimentalOmitfp; @Option( name = STR, defaultValue = "true", documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS, OptionEffectTag.AFFECTS_OUTPUTS}, help = STR + STR ) public boolean shareNativeDeps; @Option( name = STR, defaultValue = "false", documentationCategory = OptionDocumentationCategory.INPUT_STRICTNESS, effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS, OptionEffectTag.EAGERNESS_TO_EXIT}, help = STR + STR ) public boolean strictSystemIncludes; @Option( name = STR, defaultValue = "false", documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, effectTags = { OptionEffectTag.CHANGES_INPUTS, OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.LOADING_AND_ANALYSIS }, metadataTags = {OptionMetadataTag.EXPERIMENTAL}, help = STR + STR ) public boolean useLLVMCoverageMapFormat; @Option( name = STR, defaultValue = "true", documentationCategory = OptionDocumentationCategory.TOOLCHAIN, effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS}, metadataTags = { OptionMetadataTag.INCOMPATIBLE_CHANGE, OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES }, help = STR + STRincompatible_make_thinlto_command_lines_standaloneSTRtrueSTRIf true, Bazel will not reuse C++ link action command lines for lto indexing command STRlines (see https: public boolean useStandaloneLtoIndexingCommandLines; @Option( name = "incompatible_require_ctx_in_configure_featuresSTRtrueSTRIf true, Bazel will require 'ctx' parameter in to cc_common.configure_features STR(see https: public boolean requireCtxInConfigureFeatures; @Option( name = "incompatible_validate_top_level_header_inclusionsSTRtrueSTRIf true, Bazel will also validate top level directory header inclusions STR(see https: public boolean validateTopLevelHeaderInclusions; @Option( name = "incompatible_remove_legacy_whole_archiveSTRtrueSTRIf true, Bazel will not link library dependencies as whole archive by default STR(see https: public boolean removeLegacyWholeArchive; @Option( name = "incompatible_remove_cpu_and_compiler_attributes_from_cc_toolchainSTRtrueSTRIf true, Bazel will complain when cc_toolchain.cpu and cc_toolchain.compiler attribtues STRare set STR(see https: public boolean removeCpuCompilerCcToolchainAttributes; @Option( name = "incompatible_disable_expand_if_all_available_in_flag_setSTRtrueSTRIf true, Bazel will not allow specifying expand_if_all_available in flag_setsSTR(see https: public boolean disableExpandIfAllAvailableInFlagSet; @Option( name = "experimental_includes_attribute_subpackage_traversalSTRtrueSTRIf a cc target has loose headers checking, disabled layering check and an STRincludes attribute set, it is allowed to include anything under its folder, even STRacross subpackage boundaries.STRexperimental_do_not_use_cpu_transformerSTRfalseSTRIf enabled, cpu transformer is not used for CppConfigurationSTRincompatible_disable_legacy_cc_providerSTRtrueSTRIf true, the legacy provider accessible by 'dep.cc.' is removed. See #7036.STRincompatible_enable_cc_toolchain_resolutionSTRfalseSTRIf true, cc rules use toolchain resolution to find the cc_toolchain.STRexperimental_save_feature_stateSTRfalseSTRSave the state of enabled and requested feautres as an output of compilation.STRincompatible_use_specific_tool_filesSTRtrueSTRUse cc toolchain's compiler_files, as_files, and ar_files as inputs to appropriate STRactions. See https: public boolean useSpecificToolFiles; @Option( name = "incompatible_disable_static_cc_toolchainsSTRtrueSTR@bazel_tools + "See https: public boolean disableStaticCcToolchains; @Option( name = "incompatible_disable_nocoptsSTRtrue", documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, effectTags = {OptionEffectTag.ACTION_COMMAND_LINES}, metadataTags = { OptionMetadataTag.INCOMPATIBLE_CHANGE, OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES, }, help = "When enabled, it removes nocopts attribute from C++ rules. SeeSTR https: public boolean disableNoCopts; @Option( name = "incompatible_load_cc_rules_from_bzlSTRfalseSTRIf enabled, direct usage of the native C++ and some Objc rules is disabled. Please use STRthe Starlark rules instead https: public boolean loadCcRulesFromBzl;
|
/**
* 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.devtools.common.options.OptionEffectTag",
"com.google.devtools.common.options.OptionMetadataTag",
"java.util.List"
] |
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; import com.google.devtools.common.options.OptionEffectTag; import com.google.devtools.common.options.OptionMetadataTag; import java.util.List;
|
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(lvalue)) {
// Limit to EXPR_RESULT because it is not
// safe to eliminate assignment in complex expressions,
// e.g. in ((x = 7) + 8)
if (parent.isExprResult()) {
Node grandparent = parent.getParent();
replaceWithEmpty(parent, grandparent);
compiler.reportChangeToEnclosingScope(grandparent);
} else {
t.report(n, STRIP_ASSIGNMENT_ERROR, lvalue.getQualifiedName());
}
}
}
|
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.reportChangeToEnclosingScope(grandparent); } else { t.report(n, STRIP_ASSIGNMENT_ERROR, lvalue.getQualifiedName()); } } }
|
/**
* 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.addArgument("message", "" + message);
if (slider != null) {
SliderBridge.bindProgress(con, slider);
}
for (int i = 0; i < responseCodeListeners.size(); i++) {
con.addResponseCodeListener((ActionListener) responseCodeListeners.elementAt(i));
}
current = con;
NetworkManager.getInstance().addToQueueAndWait(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 != null) { SliderBridge.bindProgress(con, slider); } for (int i = 0; i < responseCodeListeners.size(); i++) { con.addResponseCodeListener((ActionListener) responseCodeListeners.elementAt(i)); } current = con; NetworkManager.getInstance().addToQueueAndWait(con); }
|
/**
* 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);
result = 37 * result + (int) (temp ^ (temp >>> 32));
temp = Double.doubleToLongBits(this.viewY);
result = 37 * result + (int) (temp ^ (temp >>> 32));
temp = Double.doubleToLongBits(this.viewW);
result = 37 * result + (int) (temp ^ (temp >>> 32));
temp = Double.doubleToLongBits(this.viewH);
result = 37 * result + (int) (temp ^ (temp >>> 32));
return result;
}
|
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 = Double.doubleToLongBits(this.viewY); result = 37 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.viewW); result = 37 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.viewH); result = 37 * result + (int) (temp ^ (temp >>> 32)); return result; }
|
/**
* 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) continue; // outside Hudson
if(bp.is(build)) continue; // we are the owner
try {
Job job = bp.getJob();
if (job==null) continue; // project no longer exists
if (!(job instanceof AbstractProject)) {
// Ignoring this for now. In the future we may want a dependency map function not limited to AbstractProject.
// (Could be used by getDependencyChanges if pulled up from AbstractBuild into Run, for example.)
continue;
}
if (job.getParent()==build.getParent())
continue; // we are the parent of the build owner, that is almost like we are the owner
if(!includeMissing && job.getBuildByNumber(bp.getNumber())==null)
continue; // build no longer exists
Integer existing = r.get(job);
if(existing!=null && existing>bp.getNumber())
continue; // the record in the map is already up to date
r.put((AbstractProject) job, bp.getNumber());
} catch (AccessDeniedException e) {
// Need to log in to access this job, so ignore
continue;
}
}
return r;
}
}
private static final Logger logger = Logger.getLogger(Fingerprinter.class.getName());
private static final long serialVersionUID = 1L;
|
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) continue; if (!(job instanceof AbstractProject)) { continue; } if (job.getParent()==build.getParent()) continue; if(!includeMissing && job.getBuildByNumber(bp.getNumber())==null) continue; Integer existing = r.get(job); if(existing!=null && existing>bp.getNumber()) continue; r.put((AbstractProject) job, bp.getNumber()); } catch (AccessDeniedException e) { continue; } } return r; } } private static final Logger logger = Logger.getLogger(Fingerprinter.class.getName()); private static final long serialVersionUID = 1L;
|
/**
* 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:"))) {
String rootEntry = roots[a].toString();
if (rootEntry.endsWith("\\")) rootEntry = rootEntry.substring(0, rootEntry.length() - 1);
TreeItem root = new TreeItem(this.directoryTree, 0);
root.setText(rootEntry);
root.setData(roots[a]);
new TreeItem(root, 0);
}
}
}
|
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("\\")) rootEntry = rootEntry.substring(0, rootEntry.length() - 1); TreeItem root = new TreeItem(this.directoryTree, 0); root.setText(rootEntry); root.setData(roots[a]); new TreeItem(root, 0); } } }
|
/**
* 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);
double Armpossicion = myArmpossicion.getVoltage();
SmartDashboard.putNumber("Armpossicion",Armpossicion );
Frontmotor2.set(ballcontrolStick.getTwist());
Frontmotor1.set(ballcontrolStick.getTwist());
if (Armpossicion<=1.25 && ballcontrolStick.getRawButton(1))
{
Backmotor1.set(-1);
Backmotor2.set(-1);
}
else if (Armpossicion<=1.25 && ballcontrolStick.getRawButton(4))
{
Backmotor1.set(-.75);
Backmotor2.set(-.75);
}
else if (Armpossicion<=1.25 && ballcontrolStick.getRawButton(3))
{
Backmotor1.set(-.5);
Backmotor2.set(-.5);
}
else if (Armpossicion>=0.29 && ballcontrolStick.getRawButton(2))
{
Backmotor1.set(.2);
Backmotor2.set(.2);
}
else
{
Backmotor1.set(0);
Backmotor2.set(0);
}
}
}
|
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.putNumber(STR,Armpossicion ); Frontmotor2.set(ballcontrolStick.getTwist()); Frontmotor1.set(ballcontrolStick.getTwist()); if (Armpossicion<=1.25 && ballcontrolStick.getRawButton(1)) { Backmotor1.set(-1); Backmotor2.set(-1); } else if (Armpossicion<=1.25 && ballcontrolStick.getRawButton(4)) { Backmotor1.set(-.75); Backmotor2.set(-.75); } else if (Armpossicion<=1.25 && ballcontrolStick.getRawButton(3)) { Backmotor1.set(-.5); Backmotor2.set(-.5); } else if (Armpossicion>=0.29 && ballcontrolStick.getRawButton(2)) { Backmotor1.set(.2); Backmotor2.set(.2); } else { Backmotor1.set(0); Backmotor2.set(0); } } }
|
/**
* 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) {
e.printStackTrace();
}
}
return updateSiteTextField;
}
|
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.isClosed()) {
Socket clientSocket = null;
try {
clientSocket = serverSocket.accept();
} catch (SocketTimeoutException timeoutEx) {
if (raiseExceptionOnAcceptTimeout) {
throw new MllpJUnitResourceTimeoutException("Timeout Accepting client connection", timeoutEx);
}
log.warn("Timeout waiting for client connection");
} catch (SocketException socketEx) {
log.debug("SocketException encountered accepting client connection - ignoring", socketEx);
if (null == clientSocket) {
continue;
} else if (!clientSocket.isClosed()) {
resetConnection(clientSocket);
continue;
} else {
throw new MllpJUnitResourceException("Unexpected SocketException encountered accepting client connection", socketEx);
}
} catch (Exception ex) {
throw new MllpJUnitResourceException("Unexpected exception encountered accepting client connection", ex);
}
if (null != clientSocket) {
try {
clientSocket.setKeepAlive(true);
clientSocket.setTcpNoDelay(false);
clientSocket.setSoLinger(false, -1);
clientSocket.setSoTimeout(5000);
ClientSocketThread clientSocketThread = new ClientSocketThread(clientSocket);
clientSocketThread.setDaemon(true);
clientSocketThread.start();
clientSocketThreads.add(clientSocketThread);
} catch (Exception unexpectedEx) {
log.warn("Unexpected exception encountered configuring client socket");
try {
clientSocket.close();
} catch (IOException ingoreEx) {
log.warn("Exceptiong encountered closing client socket after attempting to accept connection", ingoreEx);
}
throw new MllpJUnitResourceException("Unexpected exception encountered configuring client socket", unexpectedEx);
}
}
}
log.info("No longer accepting connections - closing TCP Listener on port {}", serverSocket.getLocalPort());
try {
serverSocket.close();
} catch (IOException e) {
e.printStackTrace();
}
log.info("Closed TCP Listener on port {}", serverSocket.getLocalPort());
}
|
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 timeoutEx) { if (raiseExceptionOnAcceptTimeout) { throw new MllpJUnitResourceTimeoutException(STR, timeoutEx); } log.warn(STR); } catch (SocketException socketEx) { log.debug(STR, socketEx); if (null == clientSocket) { continue; } else if (!clientSocket.isClosed()) { resetConnection(clientSocket); continue; } else { throw new MllpJUnitResourceException(STR, socketEx); } } catch (Exception ex) { throw new MllpJUnitResourceException(STR, ex); } if (null != clientSocket) { try { clientSocket.setKeepAlive(true); clientSocket.setTcpNoDelay(false); clientSocket.setSoLinger(false, -1); clientSocket.setSoTimeout(5000); ClientSocketThread clientSocketThread = new ClientSocketThread(clientSocket); clientSocketThread.setDaemon(true); clientSocketThread.start(); clientSocketThreads.add(clientSocketThread); } catch (Exception unexpectedEx) { log.warn(STR); try { clientSocket.close(); } catch (IOException ingoreEx) { log.warn(STR, ingoreEx); } throw new MllpJUnitResourceException(STR, unexpectedEx); } } } log.info(STR, serverSocket.getLocalPort()); try { serverSocket.close(); } catch (IOException e) { e.printStackTrace(); } log.info(STR, serverSocket.getLocalPort()); }
|
/**
* 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", "00000000000" },
{ 0, "%-#9o", "00 " },
{ (byte) 0xff, "%o", "377" },
{ (byte) 0xff, "%-6o", "377 " },
{ (byte) 0xff, "%08o", "00000377" },
{ (byte) 0xff, "%#o", "0377" },
{ (byte) 0xff, "%0#11o", "00000000377" },
{ (byte) 0xff, "%-#9o", "0377 " },
{ (short) 0xf123, "%o", "170443" },
{ (short) 0xf123, "%-6o", "170443" },
{ (short) 0xf123, "%08o", "00170443" },
{ (short) 0xf123, "%#o", "0170443" },
{ (short) 0xf123, "%0#11o", "00000170443" },
{ (short) 0xf123, "%-#9o", "0170443 " },
{ 0x123456, "%o", "4432126" },
{ 0x123456, "%-6o", "4432126" },
{ 0x123456, "%08o", "04432126" },
{ 0x123456, "%#o", "04432126" },
{ 0x123456, "%0#11o", "00004432126" },
{ 0x123456, "%-#9o", "04432126 " },
{ -3, "%o", "37777777775" },
{ -3, "%-6o", "37777777775" },
{ -3, "%08o", "37777777775" },
{ -3, "%#o", "037777777775" },
{ -3, "%0#11o", "037777777775" },
{ -3, "%-#9o", "037777777775" },
{ 0x7654321L, "%o", "731241441" },
{ 0x7654321L, "%-6o", "731241441" },
{ 0x7654321L, "%08o", "731241441" },
{ 0x7654321L, "%#o", "0731241441" },
{ 0x7654321L, "%0#11o", "00731241441" },
{ 0x7654321L, "%-#9o", "0731241441" },
{ -1L, "%o", "1777777777777777777777" },
{ -1L, "%-6o", "1777777777777777777777" },
{ -1L, "%08o", "1777777777777777777777" },
{ -1L, "%#o", "01777777777777777777777" },
{ -1L, "%0#11o", "01777777777777777777777" },
{ -1L, "%-#9o", "01777777777777777777777" },
};
final int input = 0;
final int pattern = 1;
final int output = 2;
Formatter f;
for (int i = 0; i < triple.length; i++) {
f = new Formatter(Locale.ITALY);
f.format((String) triple[i][pattern],
triple[i][input]);
assertEquals("triple[" + i + "]:" + triple[i][input] + ",pattern["
+ i + "]:" + triple[i][pattern], triple[i][output], f
.toString());
}
}
|
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", STR }, { (byte) 0xff, "%#o", "0377" }, { (byte) 0xff, STR, STR }, { (byte) 0xff, "%-#9o", STR }, { (short) 0xf123, "%o", STR }, { (short) 0xf123, "%-6o", STR }, { (short) 0xf123, "%08o", STR }, { (short) 0xf123, "%#o", STR }, { (short) 0xf123, STR, STR }, { (short) 0xf123, "%-#9o", STR }, { 0x123456, "%o", STR }, { 0x123456, "%-6o", STR }, { 0x123456, "%08o", STR }, { 0x123456, "%#o", STR }, { 0x123456, STR, STR }, { 0x123456, "%-#9o", STR }, { -3, "%o", STR }, { -3, "%-6o", STR }, { -3, "%08o", STR }, { -3, "%#o", STR }, { -3, STR, STR }, { -3, "%-#9o", STR }, { 0x7654321L, "%o", STR }, { 0x7654321L, "%-6o", STR }, { 0x7654321L, "%08o", STR }, { 0x7654321L, "%#o", STR }, { 0x7654321L, STR, STR }, { 0x7654321L, "%-#9o", STR }, { -1L, "%o", STR }, { -1L, "%-6o", STR }, { -1L, "%08o", STR }, { -1L, "%#o", STR }, { -1L, STR, STR }, { -1L, "%-#9o", STR }, }; final int input = 0; final int pattern = 1; final int output = 2; Formatter f; for (int i = 0; i < triple.length; i++) { f = new Formatter(Locale.ITALY); f.format((String) triple[i][pattern], triple[i][input]); assertEquals(STR + i + "]:" + triple[i][input] + STR + i + "]:" + triple[i][pattern], triple[i][output], f .toString()); } }
|
/**
* 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 ) {
Geometry lineGeom = (Geometry) line.getDefaultGeometry();
int numGeometries = lineGeom.getNumGeometries();
for( int i = 0; i < numGeometries; i++ ) {
Geometry subGeom = lineGeom.getGeometryN(i);
Coordinate[] lineCoordinates = subGeom.getCoordinates();
if (lineCoordinates.length < 2) {
continue;
} else {
Coordinate tmpFirst = lineCoordinates[0];
Coordinate tmpLast = lineCoordinates[lineCoordinates.length - 1];
if (tmpFirst.distance(first) < SAMEPOINTTHRESHOLD || tmpFirst.distance(last) < SAMEPOINTTHRESHOLD
|| tmpLast.distance(first) < SAMEPOINTTHRESHOLD || tmpLast.distance(last) < SAMEPOINTTHRESHOLD) {
return false;
}
}
}
}
}
// 1 point line or no connection, mark it as alone for removal
return true;
}
|
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 numGeometries = lineGeom.getNumGeometries(); for( int i = 0; i < numGeometries; i++ ) { Geometry subGeom = lineGeom.getGeometryN(i); Coordinate[] lineCoordinates = subGeom.getCoordinates(); if (lineCoordinates.length < 2) { continue; } else { Coordinate tmpFirst = lineCoordinates[0]; Coordinate tmpLast = lineCoordinates[lineCoordinates.length - 1]; if (tmpFirst.distance(first) < SAMEPOINTTHRESHOLD tmpFirst.distance(last) < SAMEPOINTTHRESHOLD tmpLast.distance(first) < SAMEPOINTTHRESHOLD tmpLast.distance(last) < SAMEPOINTTHRESHOLD) { return false; } } } } } return true; }
|
/**
* 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, TAG + "setChecked" + getKey());
mCheckboxButton.setChecked(true);
sCurrentChecked = mCheckboxButton;
}
} else {
Log.d("@M_" + XLOGTAG, TAG + "mCheckboxButton is null");
}
}
|
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("@M_" + XLOGTAG, TAG + STR); } }
|
/**
* 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 == null ) {
return null;
}
// If either the "from" or "to" step is excluded, skip this hop.
//
if ( exclude != null && ( exclude.equals( fs ) || exclude.equals( ts ) ) ) {
continue;
}
int[] line = getLine( fs, ts );
if ( pointOnLine( x, y, line ) ) {
online = hi;
}
}
return online;
}
|
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 = getLine( fs, ts ); if ( pointOnLine( x, y, line ) ) { online = hi; } } return online; }
|
/**
* 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()[i],
in.getRequiredFilesDesc(in.getFileRequired()[i]),
in.getRequiredFilesDesc(in.getIncludeSubFolders()[i])} );
}
wdoNotFailIfNoFile.setSelection(in.isdoNotFailIfNoFile());
wFilenameList.removeEmptyRows();
wFilenameList.setRowNums();
wFilenameList.optWidth(true);
if (in.getFileTypeFilter() != null)
{
wFilterFileType.select(in.getFileTypeFilter().ordinal());
} else
{
wFilterFileType.select(0);
}
wInclRownum.setSelection(in.includeRowNumber());
wAddResult.setSelection(in.isAddResultFile());
wFileField.setSelection(in.isFileField());
if (in.getRowNumberField()!=null) wInclRownumField.setText(in.getRowNumberField());
if (in.getDynamicFilenameField()!=null) wFilenameField.setText(in.getDynamicFilenameField());
if (in.getDynamicWildcardField()!=null) wWildcardField.setText(in.getDynamicWildcardField());
wLimit.setText(""+in.getRowLimit());
wIncludeSubFolder.setSelection(in.isDynamicIncludeSubFolders());
}
wStepname.selectAll();
}
|
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.getFileRequired()[i]), in.getRequiredFilesDesc(in.getIncludeSubFolders()[i])} ); } wdoNotFailIfNoFile.setSelection(in.isdoNotFailIfNoFile()); wFilenameList.removeEmptyRows(); wFilenameList.setRowNums(); wFilenameList.optWidth(true); if (in.getFileTypeFilter() != null) { wFilterFileType.select(in.getFileTypeFilter().ordinal()); } else { wFilterFileType.select(0); } wInclRownum.setSelection(in.includeRowNumber()); wAddResult.setSelection(in.isAddResultFile()); wFileField.setSelection(in.isFileField()); if (in.getRowNumberField()!=null) wInclRownumField.setText(in.getRowNumberField()); if (in.getDynamicFilenameField()!=null) wFilenameField.setText(in.getDynamicFilenameField()); if (in.getDynamicWildcardField()!=null) wWildcardField.setText(in.getDynamicWildcardField()); wLimit.setText(""+in.getRowLimit()); wIncludeSubFolder.setSelection(in.isDynamicIncludeSubFolders()); } wStepname.selectAll(); }
|
/**
* 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 of the test key.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return test keys payload.
*/
|
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. E.g., {@link AdministrableDataService#getServiceName()}.
*/
|
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>AdministrableDataService#getServiceName()</code>
|
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);
}
return relParam;
}
|
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.createFile(hdfs, sub1file2, BLOCKSIZE, REPLICATION, seed);
// 1. create snapshot s0
hdfs.allowSnapshot(dir);
hdfs.createSnapshot(dir, "s0");
// 2. create snapshot s1 before appending sub1file1 finishes
HdfsDataOutputStream out = appendFileWithoutClosing(sub1file1, BLOCKSIZE);
out.hsync(EnumSet.of(SyncFlag.UPDATE_LENGTH));
// also append sub1file2
DFSTestUtil.appendFile(hdfs, sub1file2, BLOCKSIZE);
hdfs.createSnapshot(dir, "s1");
out.close();
// 3. create snapshot s2 before appending finishes
out = appendFileWithoutClosing(sub1file1, BLOCKSIZE);
out.hsync(EnumSet.of(SyncFlag.UPDATE_LENGTH));
hdfs.createSnapshot(dir, "s2");
out.close();
// 4. save fsimage before appending finishes
out = appendFileWithoutClosing(sub1file1, BLOCKSIZE);
out.hsync(EnumSet.of(SyncFlag.UPDATE_LENGTH));
// dump fsdir
File fsnBefore = dumpTree2File("before");
// save the namesystem to a temp file
File imageFile = saveFSImageToTempFile();
// 5. load fsimage and compare
// first restart the cluster, and format the cluster
out.close();
cluster.shutdown();
cluster = new MiniDFSCluster.Builder(conf).format(true)
.numDataNodes(REPLICATION).build();
cluster.waitActive();
fsn = cluster.getNamesystem();
hdfs = cluster.getFileSystem();
// then load the fsimage
loadFSImageFromTempFile(imageFile);
// dump the fsdir tree again
File fsnAfter = dumpTree2File("after");
// compare two dumped tree
SnapshotTestHelper.compareDumpedTreeInFile(fsnBefore, fsnAfter, true);
}
|
@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.allowSnapshot(dir); hdfs.createSnapshot(dir, "s0"); HdfsDataOutputStream out = appendFileWithoutClosing(sub1file1, BLOCKSIZE); out.hsync(EnumSet.of(SyncFlag.UPDATE_LENGTH)); DFSTestUtil.appendFile(hdfs, sub1file2, BLOCKSIZE); hdfs.createSnapshot(dir, "s1"); out.close(); out = appendFileWithoutClosing(sub1file1, BLOCKSIZE); out.hsync(EnumSet.of(SyncFlag.UPDATE_LENGTH)); hdfs.createSnapshot(dir, "s2"); out.close(); out = appendFileWithoutClosing(sub1file1, BLOCKSIZE); out.hsync(EnumSet.of(SyncFlag.UPDATE_LENGTH)); File fsnBefore = dumpTree2File(STR); File imageFile = saveFSImageToTempFile(); out.close(); cluster.shutdown(); cluster = new MiniDFSCluster.Builder(conf).format(true) .numDataNodes(REPLICATION).build(); cluster.waitActive(); fsn = cluster.getNamesystem(); hdfs = cluster.getFileSystem(); loadFSImageFromTempFile(imageFile); File fsnAfter = dumpTree2File("after"); SnapshotTestHelper.compareDumpedTreeInFile(fsnBefore, fsnAfter, true); }
|
/**
* 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.Test;
|
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 (JsonMarshallingException ex) {
}
return ((Class) type).getSimpleName().toLowerCase(Locale.ENGLISH);
}
|
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 (JsonMarshallingException ex) { } return ((Class) type).getSimpleName().toLowerCase(Locale.ENGLISH); }
|
/**
* 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 the startTime value to set
* @return the UploadBatchServiceLogsConfiguration object itself.
*/
|
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 IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
|
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> sequentialClasses = Sets.newHashSet();
for (ITestNGMethod m : methods) {
Class<? extends ITestClass> cls = m.getRealClass();
org.testng.annotations.ITestAnnotation test =
m_annotationFinder.findAnnotation(cls, org.testng.annotations.ITestAnnotation.class);
// If either sequential=true or parallel=classes, mark this class sequential
if (test != null && (test.getSequential() || test.getSingleThreaded()) ||
XmlSuite.ParallelMode.CLASSES.equals(m_xmlTest.getParallel())) {
sequentialClasses.add(cls);
}
}
List<IMethodInstance> methodInstances = Lists.newArrayList();
for (ITestNGMethod tm : methods) {
methodInstances.addAll(methodsToMultipleMethodInstances(tm));
}
Map<String, String> params = m_xmlTest.getAllParameters();
Set<Class<?>> processedClasses = Sets.newHashSet();
for (IMethodInstance im : methodInstances) {
Class<?> c = im.getMethod().getTestClass().getRealClass();
if (sequentialClasses.contains(c)) {
if (!processedClasses.contains(c)) {
processedClasses.add(c);
if (System.getProperty("experimental") != null) {
List<List<IMethodInstance>> instances = createInstances(methodInstances);
for (List<IMethodInstance> inst : instances) {
TestMethodWorker worker = createTestMethodWorker(inst, params, c);
result.add(worker);
}
}
else {
// Sequential class: all methods in one worker
TestMethodWorker worker = createTestMethodWorker(methodInstances, params, c);
result.add(worker);
}
}
}
else {
// Parallel class: each method in its own worker
TestMethodWorker worker = createTestMethodWorker(Arrays.asList(im), params, c);
result.add(worker);
}
}
// Sort by priorities
Collections.sort(result);
return result;
}
|
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_annotationFinder.findAnnotation(cls, org.testng.annotations.ITestAnnotation.class); if (test != null && (test.getSequential() test.getSingleThreaded()) XmlSuite.ParallelMode.CLASSES.equals(m_xmlTest.getParallel())) { sequentialClasses.add(cls); } } List<IMethodInstance> methodInstances = Lists.newArrayList(); for (ITestNGMethod tm : methods) { methodInstances.addAll(methodsToMultipleMethodInstances(tm)); } Map<String, String> params = m_xmlTest.getAllParameters(); Set<Class<?>> processedClasses = Sets.newHashSet(); for (IMethodInstance im : methodInstances) { Class<?> c = im.getMethod().getTestClass().getRealClass(); if (sequentialClasses.contains(c)) { if (!processedClasses.contains(c)) { processedClasses.add(c); if (System.getProperty(STR) != null) { List<List<IMethodInstance>> instances = createInstances(methodInstances); for (List<IMethodInstance> inst : instances) { TestMethodWorker worker = createTestMethodWorker(inst, params, c); result.add(worker); } } else { TestMethodWorker worker = createTestMethodWorker(methodInstances, params, c); result.add(worker); } } } else { TestMethodWorker worker = createTestMethodWorker(Arrays.asList(im), params, c); result.add(worker); } } Collections.sort(result); return result; }
|
/**
* 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> topicToUseAnon = new HashMap<>();
for (Message message : messages)
{
Topic topic = message.getTopic();
Boolean useAnon = topicToUseAnon.get(topic);
if (useAnon == null)
{
useAnon = Boolean.valueOf(isUseAnonymousId(topic));
topicToUseAnon.put(topic, useAnon);
}
if (!useAnon)
{
// User can see IDs for this topic; add it to the result set
filtered.add(message);
}
}
return filtered;
}
|
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.get(topic); if (useAnon == null) { useAnon = Boolean.valueOf(isUseAnonymousId(topic)); topicToUseAnon.put(topic, useAnon); } if (!useAnon) { filtered.add(message); } } return filtered; }
|
/**
* 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().getChildrenOf(child)));
}
}
return tmp;
}
|
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))); } } return tmp; }
|
/**
* 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});
TestTrackerDistributedCacheManager.checkPublicFileOwnership(localFS,
new Path[] {dirPath}, owner, group);
if (dir.isDirectory()) {
File[] files = dir.listFiles();
for (File file : files) {
checkPublicFilePermissions(localFS, file, owner, group);
}
}
}
|
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[] {dirPath}, owner, group); if (dir.isDirectory()) { File[] files = dir.listFiles(); for (File file : files) { checkPublicFilePermissions(localFS, file, owner, group); } } }
|
/**
* 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, openBalance);
AccountDataBean accountData;
accountData = trade.register(userID, password, fullname, address, email, creditCard, openBalance);
return accountData;
}
|
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 = trade.register(userID, password, fullname, address, email, creditCard, openBalance); return accountData; }
|
/**
* 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 fullname
* @param address the customers street address
* @param email the customers email address
* @param creditCard the customers creditcard number
* @param openBalance the amount to charge to the customers credit to open the
* account and set the initial balance
* @return the userID if successful, null otherwise
*/
|
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.AT :
return putAT(tag, values);
case VRs.CS :
return putCS(tag, values);
case VRs.DA :
return putDA(tag, values);
case VRs.DS :
return putDS(tag, values);
case VRs.DT :
return putDT(tag, values);
case VRs.FL :
return putFL(tag, values);
case VRs.FD :
return putFD(tag, values);
case VRs.IS :
return putIS(tag, values);
case VRs.LO :
return putLO(tag, values);
case VRs.LT :
return putLT(tag, values);
case VRs.OB:
case VRs.OF:
case VRs.OW:
throw new IllegalArgumentException(
Tags.toString(tag) + " " + VRs.toString(vr));
case VRs.PN :
return putPN(tag, values);
case VRs.SH :
return putSH(tag, values);
case VRs.SL :
return putSL(tag, values);
case VRs.SS :
return putSS(tag, values);
case VRs.ST :
return putST(tag, values);
case VRs.TM :
return putTM(tag, values);
case VRs.UI :
return putUI(tag, values);
case VRs.UN:
throw new IllegalArgumentException(
Tags.toString(tag) + " " + VRs.toString(vr));
case VRs.UL :
return putUL(tag, values);
case VRs.US :
return putUS(tag, values);
case VRs.UT :
return putUT(tag, values);
default :
log.warn(Tags.toString(tag) + " with illegal VR Code: "
+ Integer.toHexString(vr) + "H");
return putXX(tag, VRMap.DEFAULT.lookup(tag), values);
}
}
|
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); case VRs.DS : return putDS(tag, values); case VRs.DT : return putDT(tag, values); case VRs.FL : return putFL(tag, values); case VRs.FD : return putFD(tag, values); case VRs.IS : return putIS(tag, values); case VRs.LO : return putLO(tag, values); case VRs.LT : return putLT(tag, values); case VRs.OB: case VRs.OF: case VRs.OW: throw new IllegalArgumentException( Tags.toString(tag) + " " + VRs.toString(vr)); case VRs.PN : return putPN(tag, values); case VRs.SH : return putSH(tag, values); case VRs.SL : return putSL(tag, values); case VRs.SS : return putSS(tag, values); case VRs.ST : return putST(tag, values); case VRs.TM : return putTM(tag, values); case VRs.UI : return putUI(tag, values); case VRs.UN: throw new IllegalArgumentException( Tags.toString(tag) + " " + VRs.toString(vr)); case VRs.UL : return putUL(tag, values); case VRs.US : return putUS(tag, values); case VRs.UT : return putUT(tag, values); default : log.warn(Tags.toString(tag) + STR + Integer.toHexString(vr) + "H"); return putXX(tag, VRMap.DEFAULT.lookup(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], roiStart[0] + roiLength[0], step);
slices[1] = new Slice(roiStart[1], roiStart[1] + roiLength[1], step);
return slices;
}
|
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] = new Slice(roiStart[1], roiStart[1] + roiLength[1], step); return slices; }
|
/**
* 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 the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link SyncPoller} for polling of long-running operation.
*/
|
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.sin(bank);
Matrix m = new Matrix(3, 3);
m.set(0, 0, ch * ca);
m.set(0, 1, sh * sb - ch * sa * cb);
m.set(0, 2, ch * sa * sb + sh * cb);
m.set(1, 0, sa);
m.set(1, 1, ca * cb);
m.set(1, 2, -ca * sb);
m.set(2, 0, -sh * ca);
m.set(2, 1, sh * sa * cb + ch * sb);
m.set(2, 2, -sh * sa * sb + ch * cb);
return m;
}
|
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, sh * sb - ch * sa * cb); m.set(0, 2, ch * sa * sb + sh * cb); m.set(1, 0, sa); m.set(1, 1, ca * cb); m.set(1, 2, -ca * sb); m.set(2, 0, -sh * ca); m.set(2, 1, sh * sa * cb + ch * sb); m.set(2, 2, -sh * sa * sb + ch * cb); return m; }
|
/**
* 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
* ordering: [m00 m01 m02] [m10 m11 m12] [m20 m21 m22]
*
* @param heading
* in radians
* @param attitude
* in radians
* @param bank
* in radians
* @return the rotation matrix
*/
|
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.createSymmetricKeyGenerator(encryptionOID, provider);
keyGen.init(keySize, rand);
return open(out, encryptionOID, -1, keyGen.getProvider(), provider);
}
|
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, -1, keyGen.getProvider(), provider); }
|
/**
* 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 = this.questionDescription;
faq.questionNumber = this.questionNumber;
faq.giverType = this.giverType;
faq.recipientType = this.recipientType;
faq.numberOfEntitiesToGiveFeedbackTo = this.numberOfEntitiesToGiveFeedbackTo;
faq.showResponsesTo = new ArrayList<>(this.showResponsesTo);
faq.showGiverNameTo = new ArrayList<>(this.showGiverNameTo);
faq.showRecipientNameTo = new ArrayList<>(this.showRecipientNameTo);
faq.createdAt = this.createdAt;
faq.updatedAt = this.updatedAt;
faq.feedbackQuestionId = this.feedbackQuestionId;
return faq;
}
|
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.questionNumber; faq.giverType = this.giverType; faq.recipientType = this.recipientType; faq.numberOfEntitiesToGiveFeedbackTo = this.numberOfEntitiesToGiveFeedbackTo; faq.showResponsesTo = new ArrayList<>(this.showResponsesTo); faq.showGiverNameTo = new ArrayList<>(this.showGiverNameTo); faq.showRecipientNameTo = new ArrayList<>(this.showRecipientNameTo); faq.createdAt = this.createdAt; faq.updatedAt = this.updatedAt; faq.feedbackQuestionId = this.feedbackQuestionId; return faq; }
|
/**
* 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(OozieClient.COORDINATOR_APP_PATH));
coordJob.setCreatedTime(new Date());
coordJob.setUser(conf.get(OozieClient.USER_NAME));
coordJob.setGroup(conf.get(OozieClient.GROUP_NAME));
coordJob.setConf(XmlUtils.prettyPrint(conf).toString());
coordJob.setJobXml(XmlUtils.prettyPrint(eJob).toString());
coordJob.setLastActionNumber(0);
coordJob.setLastModifiedTime(new Date());
if (!dryrun) {
coordJob.setLastModifiedTime(new Date());
try {
jpaService.execute(new CoordJobInsertJPAExecutor(coordJob));
}
catch (JPAExecutorException je) {
throw new CommandException(je);
}
}
return jobId;
}
|
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.setCreatedTime(new Date()); coordJob.setUser(conf.get(OozieClient.USER_NAME)); coordJob.setGroup(conf.get(OozieClient.GROUP_NAME)); coordJob.setConf(XmlUtils.prettyPrint(conf).toString()); coordJob.setJobXml(XmlUtils.prettyPrint(eJob).toString()); coordJob.setLastActionNumber(0); coordJob.setLastModifiedTime(new Date()); if (!dryrun) { coordJob.setLastModifiedTime(new Date()); try { jpaService.execute(new CoordJobInsertJPAExecutor(coordJob)); } catch (JPAExecutorException je) { throw new CommandException(je); } } return jobId; }
|
/**
* 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.oozie.service.UUIDService",
"org.apache.oozie.util.XmlUtils",
"org.jdom.Element"
] |
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.Services; import org.apache.oozie.service.UUIDService; import org.apache.oozie.util.XmlUtils; import org.jdom.Element;
|
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);
// Iterate over any media level source-filter attribute records
Vector<?> attributes = this.inputMediaDescription.getAttributes(false);
if (attributes != null) {
// Iterate over all of the media level attributes looking for source-filter records
for (int j=0; j<attributes.size(); j++) {
Object o = attributes.elementAt(j);
if (o instanceof AttributeField) {
AttributeField field = (AttributeField)o;
String name = field.getName();
if (name != null) {
if (name.equals(MulticastReflectorFactory.SOURCE_FILTER_SDP_ATTRIBUTE)) {
String value;
value = field.getValue();
if (value != null) {
applySourceFilterAttribute(filter, value, false);
}
}
}
}
}
}
attributes = this.inputSessionDescription.getAttributes(false);
if (attributes != null) {
// Iterate over all of the session level attributes looking for source-filter records
for (int j=0; j<attributes.size(); j++) {
Object o = attributes.elementAt(j);
if (o instanceof AttributeField) {
AttributeField field = (AttributeField)o;
String name = field.getName();
if (name != null) {
if (name.equals(MulticastReflectorFactory.SOURCE_FILTER_SDP_ATTRIBUTE)) {
String value;
value = field.getValue();
if (value != null) {
applySourceFilterAttribute(filter, value, true);
}
}
}
}
}
}
return filter;
}
|
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 != null) { for (int j=0; j<attributes.size(); j++) { Object o = attributes.elementAt(j); if (o instanceof AttributeField) { AttributeField field = (AttributeField)o; String name = field.getName(); if (name != null) { if (name.equals(MulticastReflectorFactory.SOURCE_FILTER_SDP_ATTRIBUTE)) { String value; value = field.getValue(); if (value != null) { applySourceFilterAttribute(filter, value, false); } } } } } } attributes = this.inputSessionDescription.getAttributes(false); if (attributes != null) { for (int j=0; j<attributes.size(); j++) { Object o = attributes.elementAt(j); if (o instanceof AttributeField) { AttributeField field = (AttributeField)o; String name = field.getName(); if (name != null) { if (name.equals(MulticastReflectorFactory.SOURCE_FILTER_SDP_ATTRIBUTE)) { String value; value = field.getValue(); if (value != null) { applySourceFilterAttribute(filter, value, true); } } } } } } return filter; }
|
/**
* 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.getValue()),
(HashMap::putAll));
}
private MessageUtils() {
}
|
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 not implement [" + type.getName() + "]");
}
} catch (Exception e) {
log.warning("class [" + className + "] could not be instantiated (" + e.toString() + ")");
}
return null;
}
|
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 + className + STR + e.toString() + ")"); } return null; }
|
/**
* 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 (shouldExist)
{
Iterator it = list.iterator();
Iterator elIt = element.getChildren(childTag, element.getNamespace()).iterator();
if (!elIt.hasNext())
{
elIt = null;
}
Counter innerCount = new Counter(counter.getDepth() + 1);
while (it.hasNext())
{
Resource value = (Resource) it.next();
Element el;
if ((elIt != null) && elIt.hasNext())
{
el = (Element) elIt.next();
if (!elIt.hasNext())
{
elIt = null;
}
}
else
{
el = factory.element(childTag, element.getNamespace());
insertAtPreferredLocation(element, el, innerCount);
}
updateResource(value, childTag, innerCount, el);
innerCount.increaseCount();
}
if (elIt != null)
{
while (elIt.hasNext())
{
elIt.next();
elIt.remove();
}
}
}
} // -- void iterateResource(Counter, Element, java.util.Collection,
// java.lang.String,
// java.lang.String)
|
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(); Iterator elIt = element.getChildren(childTag, element.getNamespace()).iterator(); if (!elIt.hasNext()) { elIt = null; } Counter innerCount = new Counter(counter.getDepth() + 1); while (it.hasNext()) { Resource value = (Resource) it.next(); Element el; if ((elIt != null) && elIt.hasNext()) { el = (Element) elIt.next(); if (!elIt.hasNext()) { elIt = null; } } else { el = factory.element(childTag, element.getNamespace()); insertAtPreferredLocation(element, el, innerCount); } updateResource(value, childTag, innerCount, el); innerCount.increaseCount(); } if (elIt != null) { while (elIt.hasNext()) { elIt.next(); elIt.remove(); } } } }
|
/**
* 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.