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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
@Override
public List<T> items() {
return items;
}
|
List<T> function() { return items; }
|
/**
* Gets the list of items.
*
* @return the list of items in {@link List}.
*/
|
Gets the list of items
|
items
|
{
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/eventgrid/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/eventgrid/v2020_06_01/implementation/PageImpl.java",
"license": "mit",
"size": 1759
}
|
[
"java.util.List"
] |
import java.util.List;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 220,142
|
public String[] getAsArray(String settingPrefix, String[] defaultArray, Boolean commaDelimited) throws SettingsException {
List<String> result = new ArrayList<>();
final String valueFromPrefix = get(settingPrefix);
final String valueFromPreifx0 = get(settingPrefix + ".0");
if (valueFromPrefix != null && valueFromPreifx0 != null) {
final String message = String.format(
Locale.ROOT,
"settings object contains values for [%s=%s] and [%s=%s]",
settingPrefix,
valueFromPrefix,
settingPrefix + ".0",
valueFromPreifx0);
throw new IllegalStateException(message);
}
if (get(settingPrefix) != null) {
if (commaDelimited) {
String[] strings = Strings.splitStringByCommaToArray(get(settingPrefix));
if (strings.length > 0) {
for (String string : strings) {
result.add(string.trim());
}
}
} else {
result.add(get(settingPrefix).trim());
}
}
int counter = 0;
while (true) {
String value = get(settingPrefix + '.' + (counter++));
if (value == null) {
break;
}
result.add(value.trim());
}
if (result.isEmpty()) {
return defaultArray;
}
return result.toArray(new String[result.size()]);
}
|
String[] function(String settingPrefix, String[] defaultArray, Boolean commaDelimited) throws SettingsException { List<String> result = new ArrayList<>(); final String valueFromPrefix = get(settingPrefix); final String valueFromPreifx0 = get(settingPrefix + ".0"); if (valueFromPrefix != null && valueFromPreifx0 != null) { final String message = String.format( Locale.ROOT, STR, settingPrefix, valueFromPrefix, settingPrefix + ".0", valueFromPreifx0); throw new IllegalStateException(message); } if (get(settingPrefix) != null) { if (commaDelimited) { String[] strings = Strings.splitStringByCommaToArray(get(settingPrefix)); if (strings.length > 0) { for (String string : strings) { result.add(string.trim()); } } } else { result.add(get(settingPrefix).trim()); } } int counter = 0; while (true) { String value = get(settingPrefix + '.' + (counter++)); if (value == null) { break; } result.add(value.trim()); } if (result.isEmpty()) { return defaultArray; } return result.toArray(new String[result.size()]); }
|
/**
* The values associated with a setting prefix as an array. The settings array is in the format of:
* <tt>settingPrefix.[index]</tt>.
* <p>
* It will also automatically load a comma separated list under the settingPrefix and merge with
* the numbered format.
*
* @param settingPrefix The setting prefix to load the array by
* @param defaultArray The default array to use if no value is specified
* @param commaDelimited Whether to try to parse a string as a comma-delimited value
* @return The setting array values
*/
|
The values associated with a setting prefix as an array. The settings array is in the format of: settingPrefix.[index]. It will also automatically load a comma separated list under the settingPrefix and merge with the numbered format
|
getAsArray
|
{
"repo_name": "strapdata/elassandra5-rc",
"path": "core/src/main/java/org/elasticsearch/common/settings/Settings.java",
"license": "apache-2.0",
"size": 51095
}
|
[
"java.util.ArrayList",
"java.util.List",
"java.util.Locale",
"org.elasticsearch.common.Strings"
] |
import java.util.ArrayList; import java.util.List; import java.util.Locale; import org.elasticsearch.common.Strings;
|
import java.util.*; import org.elasticsearch.common.*;
|
[
"java.util",
"org.elasticsearch.common"
] |
java.util; org.elasticsearch.common;
| 1,080,445
|
@Path("{id}/logout")
@POST
public void logout(final @PathParam("id") String id) {
auth.requireManage();
UserModel user = session.users().getUserById(id, realm);
if (user == null) {
throw new NotFoundException("User not found");
}
List<UserSessionModel> userSessions = session.sessions().getUserSessions(realm, user);
for (UserSessionModel userSession : userSessions) {
AuthenticationManager.backchannelLogout(session, realm, userSession, uriInfo, clientConnection, headers, true);
}
adminEvent.operation(OperationType.ACTION).resourcePath(uriInfo).success();
}
|
@Path(STR) void function(final @PathParam("id") String id) { auth.requireManage(); UserModel user = session.users().getUserById(id, realm); if (user == null) { throw new NotFoundException(STR); } List<UserSessionModel> userSessions = session.sessions().getUserSessions(realm, user); for (UserSessionModel userSession : userSessions) { AuthenticationManager.backchannelLogout(session, realm, userSession, uriInfo, clientConnection, headers, true); } adminEvent.operation(OperationType.ACTION).resourcePath(uriInfo).success(); }
|
/**
* Remove all user sessions associated with the user
*
* Also send notification to all clients that have an admin URL to invalidate the sessions for the particular user.
*
* @param id User id
*/
|
Remove all user sessions associated with the user Also send notification to all clients that have an admin URL to invalidate the sessions for the particular user
|
logout
|
{
"repo_name": "dylanplecki/keycloak",
"path": "services/src/main/java/org/keycloak/services/resources/admin/UsersResource.java",
"license": "apache-2.0",
"size": 42386
}
|
[
"java.util.List",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"org.jboss.resteasy.spi.NotFoundException",
"org.keycloak.events.admin.OperationType",
"org.keycloak.models.UserModel",
"org.keycloak.models.UserSessionModel",
"org.keycloak.services.managers.AuthenticationManager"
] |
import java.util.List; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import org.jboss.resteasy.spi.NotFoundException; import org.keycloak.events.admin.OperationType; import org.keycloak.models.UserModel; import org.keycloak.models.UserSessionModel; import org.keycloak.services.managers.AuthenticationManager;
|
import java.util.*; import javax.ws.rs.*; import org.jboss.resteasy.spi.*; import org.keycloak.events.admin.*; import org.keycloak.models.*; import org.keycloak.services.managers.*;
|
[
"java.util",
"javax.ws",
"org.jboss.resteasy",
"org.keycloak.events",
"org.keycloak.models",
"org.keycloak.services"
] |
java.util; javax.ws; org.jboss.resteasy; org.keycloak.events; org.keycloak.models; org.keycloak.services;
| 31,355
|
VideoModel getDownloadEntryByDmId(long dmId, DataCallback<VideoModel> callback);
|
VideoModel getDownloadEntryByDmId(long dmId, DataCallback<VideoModel> callback);
|
/**
* Returns count of videos which have given URL as their video URL.
*
* @param dmId
* @param callback
* @return
*/
|
Returns count of videos which have given URL as their video URL
|
getDownloadEntryByDmId
|
{
"repo_name": "IndonesiaX/edx-app-android",
"path": "VideoLocker/src/main/java/org/edx/mobile/module/db/IDatabase.java",
"license": "apache-2.0",
"size": 16172
}
|
[
"org.edx.mobile.model.VideoModel"
] |
import org.edx.mobile.model.VideoModel;
|
import org.edx.mobile.model.*;
|
[
"org.edx.mobile"
] |
org.edx.mobile;
| 1,106,672
|
static int innerMain(final Configuration c, final String [] args) throws Exception {
return ToolRunner.run(c, new WALPerformanceEvaluation(), args);
}
|
static int innerMain(final Configuration c, final String [] args) throws Exception { return ToolRunner.run(c, new WALPerformanceEvaluation(), args); }
|
/**
* The guts of the {@link #main} method.
* Call this method to avoid the {@link #main(String[])} System.exit.
* @param args
* @return errCode
* @throws Exception
*/
|
The guts of the <code>#main</code> method. Call this method to avoid the <code>#main(String[])</code> System.exit
|
innerMain
|
{
"repo_name": "ChinmaySKulkarni/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java",
"license": "apache-2.0",
"size": 24038
}
|
[
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.util.ToolRunner"
] |
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.util.ToolRunner;
|
import org.apache.hadoop.conf.*; import org.apache.hadoop.util.*;
|
[
"org.apache.hadoop"
] |
org.apache.hadoop;
| 588,905
|
public BigDecimal getCol_2 ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Col_2);
if (bd == null)
return Env.ZERO;
return bd;
}
|
BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Col_2); if (bd == null) return Env.ZERO; return bd; }
|
/** Get Col_2.
@return Col_2 */
|
Get Col_2
|
getCol_2
|
{
"repo_name": "itzamnamx/AdempiereFS",
"path": "base/src/org/compiere/model/X_T_Report.java",
"license": "gpl-2.0",
"size": 16089
}
|
[
"java.math.BigDecimal",
"org.compiere.util.Env"
] |
import java.math.BigDecimal; import org.compiere.util.Env;
|
import java.math.*; import org.compiere.util.*;
|
[
"java.math",
"org.compiere.util"
] |
java.math; org.compiere.util;
| 172,352
|
public ModelsRepositoryAPIImplBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
this.serializerAdapter = serializerAdapter;
return this;
}
private HttpClient httpClient;
|
ModelsRepositoryAPIImplBuilder function(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } private HttpClient httpClient;
|
/**
* Sets The serializer to serialize an object into a string.
*
* @param serializerAdapter the serializerAdapter value.
* @return the ModelsRepositoryAPIImplBuilder.
*/
|
Sets The serializer to serialize an object into a string
|
serializerAdapter
|
{
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsRepositoryAPIImplBuilder.java",
"license": "mit",
"size": 7472
}
|
[
"com.azure.core.http.HttpClient",
"com.azure.core.util.serializer.SerializerAdapter"
] |
import com.azure.core.http.HttpClient; import com.azure.core.util.serializer.SerializerAdapter;
|
import com.azure.core.http.*; import com.azure.core.util.serializer.*;
|
[
"com.azure.core"
] |
com.azure.core;
| 2,652,708
|
@Override
public LinkedHashMap<String, Graph2DRendererUpdate> getVariations() {
LinkedHashMap<String, Graph2DRendererUpdate> map = new LinkedHashMap<>();
map.put("None", null);
return map;
}
|
LinkedHashMap<String, Graph2DRendererUpdate> function() { LinkedHashMap<String, Graph2DRendererUpdate> map = new LinkedHashMap<>(); map.put("None", null); return map; }
|
/**
* Gets the updates associated with the renderer in a map, linking a
* description of the update to the update object.
* @return map with description of update paired with an update
*/
|
Gets the updates associated with the renderer in a map, linking a description of the update to the update object
|
getVariations
|
{
"repo_name": "ControlSystemStudio/diirt",
"path": "graphene/graphene-profile/src/main/java/org/diirt/graphene/profile/impl/ProfileHistogram1D.java",
"license": "mit",
"size": 3041
}
|
[
"java.util.LinkedHashMap",
"org.diirt.graphene.Graph2DRendererUpdate"
] |
import java.util.LinkedHashMap; import org.diirt.graphene.Graph2DRendererUpdate;
|
import java.util.*; import org.diirt.graphene.*;
|
[
"java.util",
"org.diirt.graphene"
] |
java.util; org.diirt.graphene;
| 1,917,090
|
public ConnectionHandler createConnectionHandler()
throws Exception
{
final ConnectionHandler handler = newHandler();
ContainerUtil.enableLogging( handler, getLogger() );
ContainerUtil.contextualize( handler, m_context );
ContainerUtil.service( handler, m_serviceManager );
ContainerUtil.compose( handler, new WrapperComponentManager( m_serviceManager ) );
ContainerUtil.configure( handler, m_configuration );
ContainerUtil.initialize( handler );
return handler;
}
|
ConnectionHandler function() throws Exception { final ConnectionHandler handler = newHandler(); ContainerUtil.enableLogging( handler, getLogger() ); ContainerUtil.contextualize( handler, m_context ); ContainerUtil.service( handler, m_serviceManager ); ContainerUtil.compose( handler, new WrapperComponentManager( m_serviceManager ) ); ContainerUtil.configure( handler, m_configuration ); ContainerUtil.initialize( handler ); return handler; }
|
/**
* Construct an appropriate ConnectionHandler.
*
* @return the new ConnectionHandler
* @exception Exception if an error occurs
*/
|
Construct an appropriate ConnectionHandler
|
createConnectionHandler
|
{
"repo_name": "eva-xuyen/excalibur",
"path": "cornerstone/connection/impl/src/main/java/org/apache/avalon/cornerstone/services/connection/AbstractHandlerFactory.java",
"license": "apache-2.0",
"size": 3515
}
|
[
"org.apache.avalon.framework.component.WrapperComponentManager",
"org.apache.avalon.framework.container.ContainerUtil"
] |
import org.apache.avalon.framework.component.WrapperComponentManager; import org.apache.avalon.framework.container.ContainerUtil;
|
import org.apache.avalon.framework.component.*; import org.apache.avalon.framework.container.*;
|
[
"org.apache.avalon"
] |
org.apache.avalon;
| 999,099
|
public static Vec getLocalAxisZ(double rotAngle)
{
Polar p = new Polar(Deg.toRad(rotAngle + 90), 1);
Coord c = p.toCoord();
return new Vec(c.x, 0, c.y);
}
|
static Vec function(double rotAngle) { Polar p = new Polar(Deg.toRad(rotAngle + 90), 1); Coord c = p.toCoord(); return new Vec(c.x, 0, c.y); }
|
/**
* Get "Z" axis vector of Cartesian coordinate system rotated by angle in
* degrees
*
* @param rotAngle angle in degrees
* @return Z axis unit vector
*/
|
Get "Z" axis vector of Cartesian coordinate system rotated by angle in degrees
|
getLocalAxisZ
|
{
"repo_name": "MightyPork/tortuga",
"path": "src/net/tortuga/util/CoordUtils.java",
"license": "bsd-2-clause",
"size": 1867
}
|
[
"com.porcupine.coord.Coord",
"com.porcupine.coord.Vec",
"com.porcupine.math.Calc",
"com.porcupine.math.Polar"
] |
import com.porcupine.coord.Coord; import com.porcupine.coord.Vec; import com.porcupine.math.Calc; import com.porcupine.math.Polar;
|
import com.porcupine.coord.*; import com.porcupine.math.*;
|
[
"com.porcupine.coord",
"com.porcupine.math"
] |
com.porcupine.coord; com.porcupine.math;
| 2,865,726
|
private Uri getUriFromMediaStore() {
ContentValues values = new ContentValues();
values.put(android.provider.MediaStore.Images.Media.MIME_TYPE, "image/jpeg");
Uri uri;
try {
uri = this.cordova.getActivity().getContentResolver().insert(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
} catch (RuntimeException e) {
LOG.d(LOG_TAG, "Can't write to external media storage.");
try {
uri = this.cordova.getActivity().getContentResolver().insert(android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI, values);
} catch (RuntimeException ex) {
LOG.d(LOG_TAG, "Can't write to internal media storage.");
return null;
}
}
return uri;
}
|
Uri function() { ContentValues values = new ContentValues(); values.put(android.provider.MediaStore.Images.Media.MIME_TYPE, STR); Uri uri; try { uri = this.cordova.getActivity().getContentResolver().insert(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); } catch (RuntimeException e) { LOG.d(LOG_TAG, STR); try { uri = this.cordova.getActivity().getContentResolver().insert(android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI, values); } catch (RuntimeException ex) { LOG.d(LOG_TAG, STR); return null; } } return uri; }
|
/**
* Create entry in media store for image
*
* @return uri
*/
|
Create entry in media store for image
|
getUriFromMediaStore
|
{
"repo_name": "remoorejr/cordova-plugin-camera-with-exif",
"path": "src/android/CameraLauncher.java",
"license": "apache-2.0",
"size": 63040
}
|
[
"android.content.ContentValues",
"android.net.Uri",
"android.provider.MediaStore",
"org.apache.cordova.LOG"
] |
import android.content.ContentValues; import android.net.Uri; import android.provider.MediaStore; import org.apache.cordova.LOG;
|
import android.content.*; import android.net.*; import android.provider.*; import org.apache.cordova.*;
|
[
"android.content",
"android.net",
"android.provider",
"org.apache.cordova"
] |
android.content; android.net; android.provider; org.apache.cordova;
| 1,168,055
|
public String mute(final String mutedEntity, final String server, final String staff,
final long expirationTimestamp, final String reason) {
PreparedStatement statement = null;
try (Connection conn = BAT.getConnection()) {
if (Utils.validIP(mutedEntity)) {
final String ip = mutedEntity;
statement = conn.prepareStatement(SQLQueries.Mute.createMuteIP);
statement.setString(1, ip);
statement.setString(2, staff);
statement.setString(3, server);
statement.setTimestamp(4, (expirationTimestamp > 0) ? new Timestamp(expirationTimestamp) : null);
statement.setString(5, (NO_REASON.equals(reason)) ? null : reason);
statement.executeUpdate();
statement.close();
if (BAT.getInstance().getRedis().isRedisEnabled()) {
for (UUID pUUID : RedisBungee.getApi().getPlayersOnline()) {
if (RedisBungee.getApi().getPlayerIp(pUUID).equals(ip)) {
// The mute task timer will add the player to the bungeecord instance's cache if needed.
if(server.equals(GLOBAL_SERVER) || RedisBungee.getApi().getServerFor(pUUID).getName().equalsIgnoreCase(server)) {
ProxiedPlayer player = ProxyServer.getInstance().getPlayer(pUUID);
if (player != null) {
player.sendMessage(__("wasMutedNotif", new String[] { reason }));
} else {
BAT.getInstance().getRedis().sendMessagePlayer(pUUID, TextComponent.toLegacyText(__("wasMutedNotif", new String[] { reason })));
}
}
}
}
} else {
for (final ProxiedPlayer player : ProxyServer.getInstance().getPlayers()) {
if (Utils.getPlayerIP(player).equals(ip)) {
if (server.equals(GLOBAL_SERVER)) {
mutedPlayers.get(player.getName()).setGlobal();
} else {
mutedPlayers.get(player.getName()).addServer(server);
}
if (server.equals(GLOBAL_SERVER) || player.getServer().getInfo().getName().equalsIgnoreCase(server)) {
player.sendMessage(__("wasMutedNotif", new String[] { reason }));
}
}
}
}
if (expirationTimestamp > 0) {
return _("muteTempBroadcast", new String[] { ip, FormatUtils.getDuration(expirationTimestamp),
staff, server, reason });
} else {
return _("muteBroadcast", new String[] { ip, staff, server, reason });
}
}
// Otherwise it's a player
else {
final String pName = mutedEntity;
final ProxiedPlayer player = ProxyServer.getInstance().getPlayer(pName);
statement = conn.prepareStatement(SQLQueries.Mute.createMute);
statement.setString(1, Core.getUUID(pName));
statement.setString(2, staff);
statement.setString(3, server);
statement.setTimestamp(4, (expirationTimestamp > 0) ? new Timestamp(expirationTimestamp) : null);
statement.setString(5, (NO_REASON.equals(reason)) ? null : reason);
statement.executeUpdate();
statement.close();
if (player != null) {
updateMuteData(player.getName());
if(server.equals(GLOBAL_SERVER) || player.getServer().getInfo().getName().equalsIgnoreCase(server)){
player.sendMessage(__("wasMutedNotif", new String[] { reason }));
}
} else if (BAT.getInstance().getRedis().isRedisEnabled()) {
//Need to implement a function to get an UUID object instead of a string one.
final UUID pUUID = Core.getUUIDfromString(Core.getUUID(pName));
BAT.getInstance().getRedis().sendMuteUpdatePlayer(pUUID, server);
BAT.getInstance().getRedis().sendMessagePlayer(pUUID, TextComponent.toLegacyText(__("wasMutedNotif", new String[] { reason })));
}
if (expirationTimestamp > 0) {
return _("muteTempBroadcast", new String[] { pName, FormatUtils.getDuration(expirationTimestamp),
staff, server, reason });
} else {
return _("muteBroadcast", new String[] { pName, staff, server, reason });
}
}
} catch (final SQLException e) {
return DataSourceHandler.handleException(e);
} finally {
DataSourceHandler.close(statement);
}
}
|
String function(final String mutedEntity, final String server, final String staff, final long expirationTimestamp, final String reason) { PreparedStatement statement = null; try (Connection conn = BAT.getConnection()) { if (Utils.validIP(mutedEntity)) { final String ip = mutedEntity; statement = conn.prepareStatement(SQLQueries.Mute.createMuteIP); statement.setString(1, ip); statement.setString(2, staff); statement.setString(3, server); statement.setTimestamp(4, (expirationTimestamp > 0) ? new Timestamp(expirationTimestamp) : null); statement.setString(5, (NO_REASON.equals(reason)) ? null : reason); statement.executeUpdate(); statement.close(); if (BAT.getInstance().getRedis().isRedisEnabled()) { for (UUID pUUID : RedisBungee.getApi().getPlayersOnline()) { if (RedisBungee.getApi().getPlayerIp(pUUID).equals(ip)) { if(server.equals(GLOBAL_SERVER) RedisBungee.getApi().getServerFor(pUUID).getName().equalsIgnoreCase(server)) { ProxiedPlayer player = ProxyServer.getInstance().getPlayer(pUUID); if (player != null) { player.sendMessage(__(STR, new String[] { reason })); } else { BAT.getInstance().getRedis().sendMessagePlayer(pUUID, TextComponent.toLegacyText(__(STR, new String[] { reason }))); } } } } } else { for (final ProxiedPlayer player : ProxyServer.getInstance().getPlayers()) { if (Utils.getPlayerIP(player).equals(ip)) { if (server.equals(GLOBAL_SERVER)) { mutedPlayers.get(player.getName()).setGlobal(); } else { mutedPlayers.get(player.getName()).addServer(server); } if (server.equals(GLOBAL_SERVER) player.getServer().getInfo().getName().equalsIgnoreCase(server)) { player.sendMessage(__(STR, new String[] { reason })); } } } } if (expirationTimestamp > 0) { return _(STR, new String[] { ip, FormatUtils.getDuration(expirationTimestamp), staff, server, reason }); } else { return _(STR, new String[] { ip, staff, server, reason }); } } else { final String pName = mutedEntity; final ProxiedPlayer player = ProxyServer.getInstance().getPlayer(pName); statement = conn.prepareStatement(SQLQueries.Mute.createMute); statement.setString(1, Core.getUUID(pName)); statement.setString(2, staff); statement.setString(3, server); statement.setTimestamp(4, (expirationTimestamp > 0) ? new Timestamp(expirationTimestamp) : null); statement.setString(5, (NO_REASON.equals(reason)) ? null : reason); statement.executeUpdate(); statement.close(); if (player != null) { updateMuteData(player.getName()); if(server.equals(GLOBAL_SERVER) player.getServer().getInfo().getName().equalsIgnoreCase(server)){ player.sendMessage(__(STR, new String[] { reason })); } } else if (BAT.getInstance().getRedis().isRedisEnabled()) { final UUID pUUID = Core.getUUIDfromString(Core.getUUID(pName)); BAT.getInstance().getRedis().sendMuteUpdatePlayer(pUUID, server); BAT.getInstance().getRedis().sendMessagePlayer(pUUID, TextComponent.toLegacyText(__(STR, new String[] { reason }))); } if (expirationTimestamp > 0) { return _(STR, new String[] { pName, FormatUtils.getDuration(expirationTimestamp), staff, server, reason }); } else { return _(STR, new String[] { pName, staff, server, reason }); } } } catch (final SQLException e) { return DataSourceHandler.handleException(e); } finally { DataSourceHandler.close(statement); } }
|
/**
* Mute this entity (player or ip) <br>
*
* @param mutedEntity
* | can be an ip or a player name
* @param server
* ; set to "(global)", to global mute
* @param staff
* @param expirationTimestamp
* ; set to 0 for mute def
* @param reason
* | optional
* @return
*/
|
Mute this entity (player or ip)
|
mute
|
{
"repo_name": "alphartdev/BungeeAdminTools",
"path": "src/main/java/fr/Alphart/BAT/Modules/Mute/Mute.java",
"license": "gpl-3.0",
"size": 29759
}
|
[
"com.imaginarycode.minecraft.redisbungee.RedisBungee",
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.SQLException",
"java.sql.Timestamp",
"net.md_5.bungee.api.ProxyServer",
"net.md_5.bungee.api.chat.TextComponent",
"net.md_5.bungee.api.connection.ProxiedPlayer"
] |
import com.imaginarycode.minecraft.redisbungee.RedisBungee; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Timestamp; import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.chat.TextComponent; import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import com.imaginarycode.minecraft.redisbungee.*; import java.sql.*; import net.md_5.bungee.api.*; import net.md_5.bungee.api.chat.*; import net.md_5.bungee.api.connection.*;
|
[
"com.imaginarycode.minecraft",
"java.sql",
"net.md_5.bungee"
] |
com.imaginarycode.minecraft; java.sql; net.md_5.bungee;
| 2,522,243
|
public static int findMaxId(Collection<? extends Identifiable> list)
{
int maxId = 0;
for (Identifiable o : list)
maxId = Math.max(maxId, o.getId());
return maxId;
}
|
static int function(Collection<? extends Identifiable> list) { int maxId = 0; for (Identifiable o : list) maxId = Math.max(maxId, o.getId()); return maxId; }
|
/**
* Get the maximum ID that exists in the given list.
*
* @param list - the list to scan for existing IDs.
* @return the maximum ID or 0 if the list is empty.
*/
|
Get the maximum ID that exists in the given list
|
findMaxId
|
{
"repo_name": "selfbus/development-tools-incubation",
"path": "sbtools-products-editor/src/main/java/org/selfbus/sbtools/prodedit/utils/IdentifiableUtils.java",
"license": "gpl-3.0",
"size": 1860
}
|
[
"java.util.Collection",
"org.selfbus.sbtools.prodedit.model.interfaces.Identifiable"
] |
import java.util.Collection; import org.selfbus.sbtools.prodedit.model.interfaces.Identifiable;
|
import java.util.*; import org.selfbus.sbtools.prodedit.model.interfaces.*;
|
[
"java.util",
"org.selfbus.sbtools"
] |
java.util; org.selfbus.sbtools;
| 1,039,717
|
// Network info
public StringType getNetworkIp(int networkIndex) throws DeviceNotFoundException;
|
StringType function(int networkIndex) throws DeviceNotFoundException;
|
/**
* Get the Host IP address of the network.
*
* @param networkIndex - the index of the network
* @return 32-bit IPv4 address
* @throws DeviceNotFoundException
*/
|
Get the Host IP address of the network
|
getNetworkIp
|
{
"repo_name": "johannrichard/openhab2-addons",
"path": "addons/binding/org.openhab.binding.systeminfo/src/main/java/org/openhab/binding/systeminfo/internal/model/SysteminfoInterface.java",
"license": "epl-1.0",
"size": 13230
}
|
[
"org.eclipse.smarthome.core.library.types.StringType"
] |
import org.eclipse.smarthome.core.library.types.StringType;
|
import org.eclipse.smarthome.core.library.types.*;
|
[
"org.eclipse.smarthome"
] |
org.eclipse.smarthome;
| 1,391,983
|
ProgramInstanceQueryParams getFromUrl( Set<String> ou, OrganisationUnitSelectionMode ouMode, Date lastUpdated, String program,
ProgramStatus programStatus, Date programStartDate, Date programEndDate, String trackedEntity, String trackedEntityInstance,
Boolean followUp, Integer page, Integer pageSize, boolean totalPages, boolean skipPaging );
|
ProgramInstanceQueryParams getFromUrl( Set<String> ou, OrganisationUnitSelectionMode ouMode, Date lastUpdated, String program, ProgramStatus programStatus, Date programStartDate, Date programEndDate, String trackedEntity, String trackedEntityInstance, Boolean followUp, Integer page, Integer pageSize, boolean totalPages, boolean skipPaging );
|
/**
* Returns a ProgramInstanceQueryParams based on the given input.
*
* @param ou the set of organisation unit identifiers.
* @param ouMode the OrganisationUnitSelectionMode.
* @param lastUpdated the last updated for PI.
* @param program the Program identifier.
* @param programStatus the ProgramStatus in the given program.
* @param programStartDate the start date for enrollment in the given
* Program.
* @param programEndDate the end date for enrollment in the given Program.
* @param trackedEntity the TrackedEntity uid.
* @param trackedEntityInstance the TrackedEntityInstance uid.
* @param followUp indicates follow up status in the given Program.
* @param page the page number.
* @param pageSize the page size.
* @param totalPages indicates whether to include the total number of pages.
* @param skipPaging whether to skip paging.
* @return a ProgramInstanceQueryParams.
*/
|
Returns a ProgramInstanceQueryParams based on the given input
|
getFromUrl
|
{
"repo_name": "troyel/dhis2-core",
"path": "dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstanceService.java",
"license": "bsd-3-clause",
"size": 10342
}
|
[
"java.util.Date",
"java.util.Set",
"org.hisp.dhis.common.OrganisationUnitSelectionMode"
] |
import java.util.Date; import java.util.Set; import org.hisp.dhis.common.OrganisationUnitSelectionMode;
|
import java.util.*; import org.hisp.dhis.common.*;
|
[
"java.util",
"org.hisp.dhis"
] |
java.util; org.hisp.dhis;
| 1,531,124
|
super.populate(request);
//
// now run through all of the accounting lines and make sure they've been uppercased and populated appropriately
// handle new accountingLine, if one is being added
final String methodToCall = this.getMethodToCall();
final Map parameterMap = request.getParameterMap();
if (StringUtils.isNotBlank(methodToCall)) {
if (methodToCall.equals(KFSConstants.INSERT_SOURCE_LINE_METHOD)) {
populateSourceAccountingLine(getNewSourceLine(), KFSPropertyConstants.NEW_SOURCE_LINE, parameterMap);
}
if (methodToCall.equals(KFSConstants.INSERT_TARGET_LINE_METHOD)) {
// This is the addition for the override: Handle multiple accounting lines ...
for (Iterator newTargetLinesIter = getNewTargetLines().iterator(); newTargetLinesIter.hasNext();) {
TargetAccountingLine targetAccountingLine = (TargetAccountingLine) newTargetLinesIter.next();
populateTargetAccountingLine(targetAccountingLine, KFSPropertyConstants.NEW_TARGET_LINE, parameterMap);
}
}
}
// don't call populateAccountingLines if you are copying or errorCorrecting a document,
// since you want the accountingLines in the copy to be "identical" to those in the original
if (!StringUtils.equals(methodToCall, KFSConstants.COPY_METHOD) && !StringUtils.equals(methodToCall, KFSConstants.ERRORCORRECT_METHOD)) {
populateAccountingLines(parameterMap);
}
setDocTypeName(discoverDocumentTypeName());
}
public ProcurementCardForm() {
super();
this.newTargetLines = new ArrayList<ProcurementCardTargetAccountingLine>();
// buildNewTargetAccountingLines();
capitalAssetInformation = new ArrayList<CapitalAssetInformation>();
}
|
super.populate(request); final String methodToCall = this.getMethodToCall(); final Map parameterMap = request.getParameterMap(); if (StringUtils.isNotBlank(methodToCall)) { if (methodToCall.equals(KFSConstants.INSERT_SOURCE_LINE_METHOD)) { populateSourceAccountingLine(getNewSourceLine(), KFSPropertyConstants.NEW_SOURCE_LINE, parameterMap); } if (methodToCall.equals(KFSConstants.INSERT_TARGET_LINE_METHOD)) { for (Iterator newTargetLinesIter = getNewTargetLines().iterator(); newTargetLinesIter.hasNext();) { TargetAccountingLine targetAccountingLine = (TargetAccountingLine) newTargetLinesIter.next(); populateTargetAccountingLine(targetAccountingLine, KFSPropertyConstants.NEW_TARGET_LINE, parameterMap); } } } if (!StringUtils.equals(methodToCall, KFSConstants.COPY_METHOD) && !StringUtils.equals(methodToCall, KFSConstants.ERRORCORRECT_METHOD)) { populateAccountingLines(parameterMap); } setDocTypeName(discoverDocumentTypeName()); } public ProcurementCardForm() { super(); this.newTargetLines = new ArrayList<ProcurementCardTargetAccountingLine>(); capitalAssetInformation = new ArrayList<CapitalAssetInformation>(); }
|
/**
* Override to accomodate multiple target lines.
*
* @see org.kuali.rice.kns.web.struts.pojo.PojoForm#populate(javax.servlet.http.HttpServletRequest)
*/
|
Override to accomodate multiple target lines
|
populate
|
{
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/fp/document/web/struts/ProcurementCardForm.java",
"license": "agpl-3.0",
"size": 10584
}
|
[
"java.util.ArrayList",
"java.util.Iterator",
"java.util.Map",
"org.apache.commons.lang.StringUtils",
"org.kuali.kfs.fp.businessobject.CapitalAssetInformation",
"org.kuali.kfs.fp.businessobject.ProcurementCardTargetAccountingLine",
"org.kuali.kfs.sys.KFSConstants",
"org.kuali.kfs.sys.KFSPropertyConstants",
"org.kuali.kfs.sys.businessobject.TargetAccountingLine"
] |
import java.util.ArrayList; import java.util.Iterator; import java.util.Map; import org.apache.commons.lang.StringUtils; import org.kuali.kfs.fp.businessobject.CapitalAssetInformation; import org.kuali.kfs.fp.businessobject.ProcurementCardTargetAccountingLine; import org.kuali.kfs.sys.KFSConstants; import org.kuali.kfs.sys.KFSPropertyConstants; import org.kuali.kfs.sys.businessobject.TargetAccountingLine;
|
import java.util.*; import org.apache.commons.lang.*; import org.kuali.kfs.fp.businessobject.*; import org.kuali.kfs.sys.*; import org.kuali.kfs.sys.businessobject.*;
|
[
"java.util",
"org.apache.commons",
"org.kuali.kfs"
] |
java.util; org.apache.commons; org.kuali.kfs;
| 1,896,932
|
public static boolean installPackageFromRepository(String packageName,
String version, PrintStream... progress) throws Exception {
useCacheOrOnlineRepository();
Package toLoad = getRepositoryPackageInfo(packageName);
// check to see if a version is already installed. If so, we
// wont load the updated version into the classpath immediately in
// order to avoid conflicts, class not found exceptions etc. The
// user is told to restart Weka for the changes to come into affect
// anyway, so there is no point in loading the updated package now.
boolean isAnUpgrade = toLoad.isInstalled();
Object specialInstallMessage =
toLoad.getPackageMetaDataElement("MessageToDisplayOnInstallation");
if (specialInstallMessage != null
&& specialInstallMessage.toString().length() > 0) {
String siM = specialInstallMessage.toString();
try {
siM = Environment.getSystemWide().substitute(siM);
} catch (Exception ex) {
// quietly ignore
}
String message = "**** Special installation message ****\n" + siM
+ "\n**** Special installation message ****";
for (PrintStream p : progress) {
p.println(message);
}
}
PACKAGE_MANAGER.installPackageFromRepository(packageName, version,
progress);
File packageDir = new File(PACKAGE_MANAGER.getPackageHome().toString()
+ File.separator + packageName);
boolean loadIt = checkForMissingClasses(toLoad, progress);
if (loadIt && !isAnUpgrade) {
File packageRoot = new File(
PACKAGE_MANAGER.getPackageHome() + File.separator + packageName);
loadIt = checkForMissingFiles(toLoad, packageRoot, progress);
if (loadIt) {
loadPackageDirectory(packageDir, false, null, false);
}
}
return isAnUpgrade;
}
|
static boolean function(String packageName, String version, PrintStream... progress) throws Exception { useCacheOrOnlineRepository(); Package toLoad = getRepositoryPackageInfo(packageName); boolean isAnUpgrade = toLoad.isInstalled(); Object specialInstallMessage = toLoad.getPackageMetaDataElement(STR); if (specialInstallMessage != null && specialInstallMessage.toString().length() > 0) { String siM = specialInstallMessage.toString(); try { siM = Environment.getSystemWide().substitute(siM); } catch (Exception ex) { } String message = STR + siM + STR; for (PrintStream p : progress) { p.println(message); } } PACKAGE_MANAGER.installPackageFromRepository(packageName, version, progress); File packageDir = new File(PACKAGE_MANAGER.getPackageHome().toString() + File.separator + packageName); boolean loadIt = checkForMissingClasses(toLoad, progress); if (loadIt && !isAnUpgrade) { File packageRoot = new File( PACKAGE_MANAGER.getPackageHome() + File.separator + packageName); loadIt = checkForMissingFiles(toLoad, packageRoot, progress); if (loadIt) { loadPackageDirectory(packageDir, false, null, false); } } return isAnUpgrade; }
|
/**
* Install a named package by retrieving the location of the archive from the
* meta data stored in the repository
*
* @param packageName the name of the package to install
* @param version the version of the package to install
* @param progress for reporting progress
* @return true if the package was installed successfully
* @throws Exception if a problem occurs
*/
|
Install a named package by retrieving the location of the archive from the meta data stored in the repository
|
installPackageFromRepository
|
{
"repo_name": "ModelWriter/Deliverables",
"path": "WP2/D2.5.2_Generation/Jeni/lib/weka-src/src/main/java/weka/core/WekaPackageManager.java",
"license": "epl-1.0",
"size": 87570
}
|
[
"java.io.File",
"java.io.PrintStream"
] |
import java.io.File; import java.io.PrintStream;
|
import java.io.*;
|
[
"java.io"
] |
java.io;
| 1,492,511
|
@Test
public void testHashIndexOnNonSequentialHashForReplicatedRegion() throws Exception {
createReplicatedRegion("portfolios");
for (int i = 0; i < 100; i++) {
Portfolio p = new Portfolio(i);
p.shortID = (short) i;
region.put("" + i, p);
}
for (int i = 200; i < 300; i++) {
Portfolio p = new Portfolio(i);
p.shortID = (short) i;
region.put("" + i, p);
}
for (int i = 500; i < 600; i++) {
Portfolio p = new Portfolio(i);
p.shortID = (short) i;
region.put("" + i, p);
}
helpTestHashIndexForQuery("Select * FROM " + SEPARATOR + "portfolios p where p.ID != 1");
}
|
void function() throws Exception { createReplicatedRegion(STR); for (int i = 0; i < 100; i++) { Portfolio p = new Portfolio(i); p.shortID = (short) i; region.put(STRSTRSTRSelect * FROM STRportfolios p where p.ID != 1"); }
|
/**
* Tests that hash index on non sequential hashes for replicated region
*/
|
Tests that hash index on non sequential hashes for replicated region
|
testHashIndexOnNonSequentialHashForReplicatedRegion
|
{
"repo_name": "davinash/geode",
"path": "geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/HashIndexQueryIntegrationTest.java",
"license": "apache-2.0",
"size": 51186
}
|
[
"org.apache.geode.cache.query.data.Portfolio"
] |
import org.apache.geode.cache.query.data.Portfolio;
|
import org.apache.geode.cache.query.data.*;
|
[
"org.apache.geode"
] |
org.apache.geode;
| 1,838,366
|
public static StringProcessChain startStringProcess(final String source) {
return StringProcessChain.getInstance(source);
}
|
static StringProcessChain function(final String source) { return StringProcessChain.getInstance(source); }
|
/**
* Start a string process chain for given source.
*
* @param source source String.
* @return return a StringProcessChain for given source.
*/
|
Start a string process chain for given source
|
startStringProcess
|
{
"repo_name": "defei/codelogger-utils",
"path": "src/main/java/org/codelogger/utils/StringUtils.java",
"license": "apache-2.0",
"size": 15424
}
|
[
"org.codelogger.utils.component.StringProcessChain"
] |
import org.codelogger.utils.component.StringProcessChain;
|
import org.codelogger.utils.component.*;
|
[
"org.codelogger.utils"
] |
org.codelogger.utils;
| 519,083
|
@Test(expected=NullPointerException.class)
public final void testGetAccessPointNotNull() throws Exception {
// Call the method under test.
wifiDevice.getAccessPoint(null);
}
|
@Test(expected=NullPointerException.class) final void function() throws Exception { wifiDevice.getAccessPoint(null); }
|
/**
* Test method for {@link com.digi.xbee.api.WiFiDevice#getAccessPoint(String)}.
*
* <p>Verify that when asked for an access point with a {@code null} SSID,
* the method throws a {@code NullPointerException}.</p>
*
* @throws Exception
*/
|
Test method for <code>com.digi.xbee.api.WiFiDevice#getAccessPoint(String)</code>. Verify that when asked for an access point with a null SSID, the method throws a NullPointerException
|
testGetAccessPointNotNull
|
{
"repo_name": "digidotcom/XBeeJavaLibrary",
"path": "library/src/test/java/com/digi/xbee/api/AccessPointsScanTest.java",
"license": "mpl-2.0",
"size": 26797
}
|
[
"org.junit.Test"
] |
import org.junit.Test;
|
import org.junit.*;
|
[
"org.junit"
] |
org.junit;
| 746,955
|
@Parameterized.Parameters(name = "{index}: {0}")
public static Iterable data() {
return Arrays.asList(new String[] {
"wcc with annotated edges and int.max iterations",
"wcc_id",
"MAX",
"true"
}, new String[] {
"wcc without annotated edges and 10 iterations",
"wcc_id",
"10",
"false"
});
}
|
@Parameterized.Parameters(name = STR) static Iterable function() { return Arrays.asList(new String[] { STR, STR, "MAX", "true" }, new String[] { STR, STR, "10", "false" }); }
|
/**
* Parameters called when running the test
*
* @return List of parameters
*/
|
Parameters called when running the test
|
data
|
{
"repo_name": "niklasteichmann/gradoop",
"path": "gradoop-flink/src/test/java/org/gradoop/flink/model/impl/operators/sampling/statistics/ConnectedComponentsDistributionTest.java",
"license": "apache-2.0",
"size": 5470
}
|
[
"java.util.Arrays",
"org.junit.runners.Parameterized"
] |
import java.util.Arrays; import org.junit.runners.Parameterized;
|
import java.util.*; import org.junit.runners.*;
|
[
"java.util",
"org.junit.runners"
] |
java.util; org.junit.runners;
| 946,874
|
public List<String> getChildren(String path) {
try{
return zkClient.getChildren().forPath(path);
}catch (Throwable e) {
throw new KafkaZKException(e);
}
}
|
List<String> function(String path) { try{ return zkClient.getChildren().forPath(path); }catch (Throwable e) { throw new KafkaZKException(e); } }
|
/**
* get children for path.
* Exception thrown based on underlying zookeeper zkClient.
*
* @param path
* @return
*/
|
get children for path. Exception thrown based on underlying zookeeper zkClient
|
getChildren
|
{
"repo_name": "pulsarIO/druid-kafka-ext",
"path": "kafka-eight-ex/src/main/java/com/ebay/pulsar/druid/firehose/kafka/support/SimpleConsumerController.java",
"license": "apache-2.0",
"size": 18261
}
|
[
"com.ebay.pulsar.druid.firehose.kafka.support.exceptions.KafkaZKException",
"java.util.List"
] |
import com.ebay.pulsar.druid.firehose.kafka.support.exceptions.KafkaZKException; import java.util.List;
|
import com.ebay.pulsar.druid.firehose.kafka.support.exceptions.*; import java.util.*;
|
[
"com.ebay.pulsar",
"java.util"
] |
com.ebay.pulsar; java.util;
| 1,684,561
|
public boolean validateDataEnterer_validateTypeCode(DataEnterer dataEnterer, DiagnosticChain diagnostics,
Map<Object, Object> context) {
return dataEnterer.validateTypeCode(diagnostics, context);
}
|
boolean function(DataEnterer dataEnterer, DiagnosticChain diagnostics, Map<Object, Object> context) { return dataEnterer.validateTypeCode(diagnostics, context); }
|
/**
* Validates the validateTypeCode constraint of '<em>Data Enterer</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
|
Validates the validateTypeCode constraint of 'Data Enterer'.
|
validateDataEnterer_validateTypeCode
|
{
"repo_name": "drbgfc/mdht",
"path": "cda/plugins/org.openhealthtools.mdht.uml.cda/src/org/openhealthtools/mdht/uml/cda/util/CDAValidator.java",
"license": "epl-1.0",
"size": 206993
}
|
[
"java.util.Map",
"org.eclipse.emf.common.util.DiagnosticChain",
"org.openhealthtools.mdht.uml.cda.DataEnterer"
] |
import java.util.Map; import org.eclipse.emf.common.util.DiagnosticChain; import org.openhealthtools.mdht.uml.cda.DataEnterer;
|
import java.util.*; import org.eclipse.emf.common.util.*; import org.openhealthtools.mdht.uml.cda.*;
|
[
"java.util",
"org.eclipse.emf",
"org.openhealthtools.mdht"
] |
java.util; org.eclipse.emf; org.openhealthtools.mdht;
| 1,728,462
|
public NodeList<ExtendedModifier> modifiers() {
return location.safeTraversal(SClassDecl.MODIFIERS);
}
|
NodeList<ExtendedModifier> function() { return location.safeTraversal(SClassDecl.MODIFIERS); }
|
/**
* Returns the modifiers of this class declaration.
*
* @return the modifiers of this class declaration.
*/
|
Returns the modifiers of this class declaration
|
modifiers
|
{
"repo_name": "ptitjes/jlato",
"path": "src/main/java/org/jlato/internal/td/decl/TDClassDecl.java",
"license": "lgpl-3.0",
"size": 9534
}
|
[
"org.jlato.internal.bu.decl.SClassDecl",
"org.jlato.tree.NodeList",
"org.jlato.tree.decl.ExtendedModifier"
] |
import org.jlato.internal.bu.decl.SClassDecl; import org.jlato.tree.NodeList; import org.jlato.tree.decl.ExtendedModifier;
|
import org.jlato.internal.bu.decl.*; import org.jlato.tree.*; import org.jlato.tree.decl.*;
|
[
"org.jlato.internal",
"org.jlato.tree"
] |
org.jlato.internal; org.jlato.tree;
| 776,463
|
@Test
public void testCloseHierarchy() throws Exception {
Connection conn = createConnection();
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageConsumer consumer = sess.createConsumer(ActiveMQServerTestCase.topic1);
MessageProducer producer = sess.createProducer(ActiveMQServerTestCase.topic1);
sess.createBrowser(queue1);
Message m = sess.createMessage();
conn.close();
// Session
try {
sess.createMessage();
ProxyAssertSupport.fail("Session is not closed");
} catch (javax.jms.IllegalStateException e) {
}
try {
sess.getAcknowledgeMode();
ProxyAssertSupport.fail("should throw IllegalStateException");
} catch (javax.jms.IllegalStateException e) {
// OK
}
try {
sess.getTransacted();
ProxyAssertSupport.fail("should throw IllegalStateException");
} catch (javax.jms.IllegalStateException e) {
// OK
}
try {
sess.getMessageListener();
ProxyAssertSupport.fail("should throw IllegalStateException");
} catch (javax.jms.IllegalStateException e) {
// OK
}
try {
sess.createProducer(queue1);
ProxyAssertSupport.fail("should throw IllegalStateException");
} catch (javax.jms.IllegalStateException e) {
// OK
}
try {
sess.createConsumer(queue1);
ProxyAssertSupport.fail("should throw IllegalStateException");
} catch (javax.jms.IllegalStateException e) {
// OK
}
// Producer
try {
producer.send(m);
ProxyAssertSupport.fail("Producer is not closed");
} catch (javax.jms.IllegalStateException e) {
}
try {
producer.getDisableMessageID();
ProxyAssertSupport.fail("should throw IllegalStateException");
} catch (javax.jms.IllegalStateException e) {
// OK
}
try {
producer.getPriority();
ProxyAssertSupport.fail("should throw IllegalStateException");
} catch (javax.jms.IllegalStateException e) {
// OK
}
try {
producer.getDestination();
ProxyAssertSupport.fail("should throw IllegalStateException");
} catch (javax.jms.IllegalStateException e) {
// OK
}
try {
producer.getTimeToLive();
ProxyAssertSupport.fail("should throw IllegalStateException");
} catch (javax.jms.IllegalStateException e) {
// OK
}
// ClientConsumer
try {
consumer.getMessageSelector();
ProxyAssertSupport.fail("should throw exception");
} catch (javax.jms.IllegalStateException e) {
// OK
}
try {
consumer.getMessageListener();
ProxyAssertSupport.fail("should throw exception");
} catch (javax.jms.IllegalStateException e) {
// OK
}
try {
consumer.receive();
ProxyAssertSupport.fail("should throw exception");
} catch (javax.jms.IllegalStateException e) {
// OK
}
// Browser
}
|
void function() throws Exception { Connection conn = createConnection(); Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageConsumer consumer = sess.createConsumer(ActiveMQServerTestCase.topic1); MessageProducer producer = sess.createProducer(ActiveMQServerTestCase.topic1); sess.createBrowser(queue1); Message m = sess.createMessage(); conn.close(); try { sess.createMessage(); ProxyAssertSupport.fail(STR); } catch (javax.jms.IllegalStateException e) { } try { sess.getAcknowledgeMode(); ProxyAssertSupport.fail(STR); } catch (javax.jms.IllegalStateException e) { } try { sess.getTransacted(); ProxyAssertSupport.fail(STR); } catch (javax.jms.IllegalStateException e) { } try { sess.getMessageListener(); ProxyAssertSupport.fail(STR); } catch (javax.jms.IllegalStateException e) { } try { sess.createProducer(queue1); ProxyAssertSupport.fail(STR); } catch (javax.jms.IllegalStateException e) { } try { sess.createConsumer(queue1); ProxyAssertSupport.fail(STR); } catch (javax.jms.IllegalStateException e) { } try { producer.send(m); ProxyAssertSupport.fail(STR); } catch (javax.jms.IllegalStateException e) { } try { producer.getDisableMessageID(); ProxyAssertSupport.fail(STR); } catch (javax.jms.IllegalStateException e) { } try { producer.getPriority(); ProxyAssertSupport.fail(STR); } catch (javax.jms.IllegalStateException e) { } try { producer.getDestination(); ProxyAssertSupport.fail(STR); } catch (javax.jms.IllegalStateException e) { } try { producer.getTimeToLive(); ProxyAssertSupport.fail(STR); } catch (javax.jms.IllegalStateException e) { } try { consumer.getMessageSelector(); ProxyAssertSupport.fail(STR); } catch (javax.jms.IllegalStateException e) { } try { consumer.getMessageListener(); ProxyAssertSupport.fail(STR); } catch (javax.jms.IllegalStateException e) { } try { consumer.receive(); ProxyAssertSupport.fail(STR); } catch (javax.jms.IllegalStateException e) { } }
|
/**
* Test that close() hierarchically closes all child objects
*/
|
Test that close() hierarchically closes all child objects
|
testCloseHierarchy
|
{
"repo_name": "tabish121/activemq-artemis",
"path": "tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ConnectionClosedTest.java",
"license": "apache-2.0",
"size": 9277
}
|
[
"javax.jms.Connection",
"javax.jms.Message",
"javax.jms.MessageConsumer",
"javax.jms.MessageProducer",
"javax.jms.Session",
"org.apache.activemq.artemis.jms.tests.util.ProxyAssertSupport"
] |
import javax.jms.Connection; import javax.jms.Message; import javax.jms.MessageConsumer; import javax.jms.MessageProducer; import javax.jms.Session; import org.apache.activemq.artemis.jms.tests.util.ProxyAssertSupport;
|
import javax.jms.*; import org.apache.activemq.artemis.jms.tests.util.*;
|
[
"javax.jms",
"org.apache.activemq"
] |
javax.jms; org.apache.activemq;
| 1,932,510
|
void setReturnCommitStats(boolean returnCommitStats) throws SQLException;
|
void setReturnCommitStats(boolean returnCommitStats) throws SQLException;
|
/**
* Sets whether this connection should request commit statistics from Cloud Spanner for read/write
* transactions and for DML statements in autocommit mode.
*/
|
Sets whether this connection should request commit statistics from Cloud Spanner for read/write transactions and for DML statements in autocommit mode
|
setReturnCommitStats
|
{
"repo_name": "googleapis/java-spanner-jdbc",
"path": "src/main/java/com/google/cloud/spanner/jdbc/CloudSpannerJdbcConnection.java",
"license": "apache-2.0",
"size": 18317
}
|
[
"java.sql.SQLException"
] |
import java.sql.SQLException;
|
import java.sql.*;
|
[
"java.sql"
] |
java.sql;
| 833,901
|
public static void validate( DefaultJAXBContextImpl jaxbCtx, ValidationContext context, ValidatableObject vo )
throws SAXException {
try {
new MSVValidator(jaxbCtx,context,vo)._validate();
} catch( RuntimeException e ) {
// sometimes when a conversion between Java object and
// lexical value fails, it may throw an exception like
// NullPointerException or NumberFormatException.
//
// catch them and report them as an error.
context.reportEvent(vo,e);
}
}
|
static void function( DefaultJAXBContextImpl jaxbCtx, ValidationContext context, ValidatableObject vo ) throws SAXException { try { new MSVValidator(jaxbCtx,context,vo)._validate(); } catch( RuntimeException e ) { context.reportEvent(vo,e); } }
|
/**
* Validates the specified object and reports any error to the context.
*/
|
Validates the specified object and reports any error to the context
|
validate
|
{
"repo_name": "NCIP/cab2b",
"path": "software/dependencies/commonpackage/HEAD_TAG_10_Jan_2007_RELEASE_BRANCH_FOR_V11/src/edu/wustl/common/cde/xml/impl/runtime/MSVValidator.java",
"license": "bsd-3-clause",
"size": 16858
}
|
[
"org.xml.sax.SAXException"
] |
import org.xml.sax.SAXException;
|
import org.xml.sax.*;
|
[
"org.xml.sax"
] |
org.xml.sax;
| 467,540
|
// --------------------------------------------------------------------------
public void drawVectors(ARGB colour)
{
DisplaySettings settings = Controller.instance.getDisplaySettings();
if (settings.areVectorsShown() && isVisible() && !_edits.isEmpty())
{
final Tessellator tess = Tessellator.getInstance();
final WorldRenderer wr = tess.getWorldRenderer();
wr.startDrawing(GL11.GL_LINES);
// TODO: Make the vector colour and thickness configurable.
wr.setColorRGBA_I(colour.getRGB(), colour.getAlpha());
GL11.glLineWidth(0.5f);
// Unit X and Y vectors used for cross products to get arrow axes.
Vec3 unitX = new Vec3(1, 0, 0);
Vec3 unitY = new Vec3(0, 1, 0);
// We only need to draw vectors if there are at least 2 edits.
Iterator<BlockEdit> it = _edits.iterator();
if (it.hasNext())
{
BlockEdit prev = it.next();
while (it.hasNext())
{
BlockEdit next = it.next();
// Work out whether to link edits with vectors.
boolean show = (next.creation && settings.isLinkedCreations()) ||
(!next.creation && settings.isLinkedDestructions());
if (show)
{
Vec3 pPos = new Vec3(0.5 + prev.x, 0.5 + prev.y, 0.5 + prev.z);
Vec3 nPos = new Vec3(0.5 + next.x, 0.5 + next.y, 0.5 + next.z);
// Vector difference, from prev to next.
Vec3 diff = nPos.subtract(pPos);
// Compute length. We want to scale the arrow heads by the length,
// so can't avoid the sqrt() here.
double length = diff.lengthVector();
if (length >= settings.getMinVectorLength())
{
// Draw the vector.
wr.addVertex(pPos.xCoord, pPos.yCoord, pPos.zCoord);
wr.addVertex(nPos.xCoord, nPos.yCoord, nPos.zCoord);
// Length from arrow tip to midpoint of vector as a fraction of
// the total vector length. Scale the arrow in proportion to the
// square root of the length up to a maximum size.
double arrowSize = UNIT_VECTOR_ARROW_SIZE * Math.sqrt(length);
if (arrowSize > MAX_ARROW_SIZE)
{
arrowSize = MAX_ARROW_SIZE;
}
double arrowScale = arrowSize / length;
// Position of the tip and tail of the arrow, sitting in the
// middle of the vector.
Vec3 tip = new Vec3(
pPos.xCoord * (0.5 - arrowScale) + nPos.xCoord
* (0.5 + arrowScale), pPos.yCoord * (0.5 - arrowScale)
+ nPos.yCoord * (0.5 + arrowScale),
pPos.zCoord * (0.5 - arrowScale) + nPos.zCoord
* (0.5 + arrowScale));
Vec3 tail = new Vec3(
pPos.xCoord * (0.5 + arrowScale) + nPos.xCoord * (0.5 - arrowScale),
pPos.yCoord * (0.5 + arrowScale) + nPos.yCoord * (0.5 - arrowScale),
pPos.zCoord * (0.5 + arrowScale) + nPos.zCoord * (0.5 - arrowScale));
// Fin axes, perpendicular to vector. Scale by vector length.
// If the vector is colinear with the Y axis, use the X axis for
// the cross products to derive the fin directions.
Vec3 fin1;
if (Math.abs(unitY.dotProduct(diff)) > 0.9 * length)
{
fin1 = unitX.crossProduct(diff).normalize();
}
else
{
fin1 = unitY.crossProduct(diff).normalize();
}
Vec3 fin2 = fin1.crossProduct(diff).normalize();
Vec3 draw1 = new Vec3(fin1.xCoord * arrowScale * length, fin1.yCoord * arrowScale * length, fin1.zCoord
* arrowScale * length);
Vec3 draw2 = new Vec3(fin2.xCoord * arrowScale * length, fin2.yCoord * arrowScale * length, fin2.zCoord
* arrowScale * length);
// Draw four fins.
wr.addVertex(tip.xCoord, tip.yCoord, tip.zCoord);
wr.addVertex(tail.xCoord + draw1.xCoord, tail.yCoord + draw1.yCoord, tail.zCoord + draw1.zCoord);
wr.addVertex(tip.xCoord, tip.yCoord, tip.zCoord);
wr.addVertex(tail.xCoord - draw1.xCoord, tail.yCoord - draw1.yCoord, tail.zCoord - draw1.zCoord);
wr.addVertex(tip.xCoord, tip.yCoord, tip.zCoord);
wr.addVertex(tail.xCoord + draw2.xCoord, tail.yCoord + draw2.yCoord, tail.zCoord + draw2.zCoord);
wr.addVertex(tip.xCoord, tip.yCoord, tip.zCoord);
wr.addVertex(tail.xCoord - draw2.xCoord, tail.yCoord - draw2.yCoord, tail.zCoord - draw2.zCoord);
} // if we are drawing this vector
prev = next;
} // if
} // while
tess.draw();
} // if
} // if drawing
} // drawVectors
|
void function(ARGB colour) { DisplaySettings settings = Controller.instance.getDisplaySettings(); if (settings.areVectorsShown() && isVisible() && !_edits.isEmpty()) { final Tessellator tess = Tessellator.getInstance(); final WorldRenderer wr = tess.getWorldRenderer(); wr.startDrawing(GL11.GL_LINES); wr.setColorRGBA_I(colour.getRGB(), colour.getAlpha()); GL11.glLineWidth(0.5f); Vec3 unitX = new Vec3(1, 0, 0); Vec3 unitY = new Vec3(0, 1, 0); Iterator<BlockEdit> it = _edits.iterator(); if (it.hasNext()) { BlockEdit prev = it.next(); while (it.hasNext()) { BlockEdit next = it.next(); boolean show = (next.creation && settings.isLinkedCreations()) (!next.creation && settings.isLinkedDestructions()); if (show) { Vec3 pPos = new Vec3(0.5 + prev.x, 0.5 + prev.y, 0.5 + prev.z); Vec3 nPos = new Vec3(0.5 + next.x, 0.5 + next.y, 0.5 + next.z); Vec3 diff = nPos.subtract(pPos); double length = diff.lengthVector(); if (length >= settings.getMinVectorLength()) { wr.addVertex(pPos.xCoord, pPos.yCoord, pPos.zCoord); wr.addVertex(nPos.xCoord, nPos.yCoord, nPos.zCoord); double arrowSize = UNIT_VECTOR_ARROW_SIZE * Math.sqrt(length); if (arrowSize > MAX_ARROW_SIZE) { arrowSize = MAX_ARROW_SIZE; } double arrowScale = arrowSize / length; Vec3 tip = new Vec3( pPos.xCoord * (0.5 - arrowScale) + nPos.xCoord * (0.5 + arrowScale), pPos.yCoord * (0.5 - arrowScale) + nPos.yCoord * (0.5 + arrowScale), pPos.zCoord * (0.5 - arrowScale) + nPos.zCoord * (0.5 + arrowScale)); Vec3 tail = new Vec3( pPos.xCoord * (0.5 + arrowScale) + nPos.xCoord * (0.5 - arrowScale), pPos.yCoord * (0.5 + arrowScale) + nPos.yCoord * (0.5 - arrowScale), pPos.zCoord * (0.5 + arrowScale) + nPos.zCoord * (0.5 - arrowScale)); Vec3 fin1; if (Math.abs(unitY.dotProduct(diff)) > 0.9 * length) { fin1 = unitX.crossProduct(diff).normalize(); } else { fin1 = unitY.crossProduct(diff).normalize(); } Vec3 fin2 = fin1.crossProduct(diff).normalize(); Vec3 draw1 = new Vec3(fin1.xCoord * arrowScale * length, fin1.yCoord * arrowScale * length, fin1.zCoord * arrowScale * length); Vec3 draw2 = new Vec3(fin2.xCoord * arrowScale * length, fin2.yCoord * arrowScale * length, fin2.zCoord * arrowScale * length); wr.addVertex(tip.xCoord, tip.yCoord, tip.zCoord); wr.addVertex(tail.xCoord + draw1.xCoord, tail.yCoord + draw1.yCoord, tail.zCoord + draw1.zCoord); wr.addVertex(tip.xCoord, tip.yCoord, tip.zCoord); wr.addVertex(tail.xCoord - draw1.xCoord, tail.yCoord - draw1.yCoord, tail.zCoord - draw1.zCoord); wr.addVertex(tip.xCoord, tip.yCoord, tip.zCoord); wr.addVertex(tail.xCoord + draw2.xCoord, tail.yCoord + draw2.yCoord, tail.zCoord + draw2.zCoord); wr.addVertex(tip.xCoord, tip.yCoord, tip.zCoord); wr.addVertex(tail.xCoord - draw2.xCoord, tail.yCoord - draw2.yCoord, tail.zCoord - draw2.zCoord); } prev = next; } } tess.draw(); } } }
|
/**
* Draw direction vectors indicating motion of the miner.
*
* @param colour the colour to draw the vectors.
*/
|
Draw direction vectors indicating motion of the miner
|
drawVectors
|
{
"repo_name": "tompreuss/watson",
"path": "src/watson/db/PlayerEditSet.java",
"license": "mit",
"size": 10970
}
|
[
"java.util.Iterator",
"net.minecraft.client.renderer.Tessellator",
"net.minecraft.client.renderer.WorldRenderer",
"net.minecraft.util.Vec3"
] |
import java.util.Iterator; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.util.Vec3;
|
import java.util.*; import net.minecraft.client.renderer.*; import net.minecraft.util.*;
|
[
"java.util",
"net.minecraft.client",
"net.minecraft.util"
] |
java.util; net.minecraft.client; net.minecraft.util;
| 863,673
|
protected void addCountPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_UsedMaterial_count_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_UsedMaterial_count_feature", "_UI_UsedMaterial_type"),
ProcessdefinitionPackage.Literals.USED_MATERIAL__COUNT,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
|
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), ProcessdefinitionPackage.Literals.USED_MATERIAL__COUNT, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); }
|
/**
* This adds a property descriptor for the Count feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
|
This adds a property descriptor for the Count feature.
|
addCountPropertyDescriptor
|
{
"repo_name": "BaSys-PC1/models",
"path": "de.dfki.iui.basys.model.domain.edit/src/de/dfki/iui/basys/model/domain/processdefinition/provider/UsedMaterialItemProvider.java",
"license": "epl-1.0",
"size": 5457
}
|
[
"de.dfki.iui.basys.model.domain.processdefinition.ProcessdefinitionPackage",
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor"
] |
import de.dfki.iui.basys.model.domain.processdefinition.ProcessdefinitionPackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
|
import de.dfki.iui.basys.model.domain.processdefinition.*; import org.eclipse.emf.edit.provider.*;
|
[
"de.dfki.iui",
"org.eclipse.emf"
] |
de.dfki.iui; org.eclipse.emf;
| 1,780,593
|
public static <K, V> Map<K, V> sortNumberMapByKeyDescending(Map<K, V> map) {
return sortNumberMapByKeyDescending(map.entrySet());
}
|
static <K, V> Map<K, V> function(Map<K, V> map) { return sortNumberMapByKeyDescending(map.entrySet()); }
|
/**
* Sorts by Key a Map in descending order.
*
* @param <K>
* @param <V>
* @param map
* @return
*/
|
Sorts by Key a Map in descending order
|
sortNumberMapByKeyDescending
|
{
"repo_name": "tomdev2008/datumbox-framework",
"path": "src/main/java/com/datumbox/common/utilities/MapFunctions.java",
"license": "apache-2.0",
"size": 9759
}
|
[
"java.util.Map"
] |
import java.util.Map;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 2,148,967
|
default void deleteDataMetadataDeletes(List<String> uris) {
}
|
default void deleteDataMetadataDeletes(List<String> uris) { }
|
/**
* Delete the delete markers for data metadata for the given uris.
*
* @param uris list of uris.
*/
|
Delete the delete markers for data metadata for the given uris
|
deleteDataMetadataDeletes
|
{
"repo_name": "tgianos/metacat",
"path": "metacat-common-server/src/main/java/com/netflix/metacat/common/server/usermetadata/UserMetadataService.java",
"license": "apache-2.0",
"size": 9008
}
|
[
"java.util.List"
] |
import java.util.List;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 2,199,117
|
private boolean updateTopologyVersionIfGreater(AffinityTopologyVersion updated, DiscoCache discoCache) {
while (true) {
Snapshot cur = topSnap.get();
if (updated.compareTo(cur.topVer) >= 0) {
if (topSnap.compareAndSet(cur, new Snapshot(updated, discoCache)))
return true;
}
else
return false;
}
}
|
boolean function(AffinityTopologyVersion updated, DiscoCache discoCache) { while (true) { Snapshot cur = topSnap.get(); if (updated.compareTo(cur.topVer) >= 0) { if (topSnap.compareAndSet(cur, new Snapshot(updated, discoCache))) return true; } else return false; } }
|
/**
* Updates topology version if current version is smaller than updated.
*
* @param updated Updated topology version.
* @param discoCache Discovery cache.
* @return {@code True} if topology was updated.
*/
|
Updates topology version if current version is smaller than updated
|
updateTopologyVersionIfGreater
|
{
"repo_name": "dmagda/incubator-ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java",
"license": "apache-2.0",
"size": 103840
}
|
[
"org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion"
] |
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
|
import org.apache.ignite.internal.processors.affinity.*;
|
[
"org.apache.ignite"
] |
org.apache.ignite;
| 143,891
|
public void test(String expected, String key, String subkey, String v)
{
assertEquals(expected, StringUtils.restoreExpression(map, key, subkey, v));
}
|
void function(String expected, String key, String subkey, String v) { assertEquals(expected, StringUtils.restoreExpression(map, key, subkey, v)); }
|
/**
*
* Test the restoreExpression method with the expression map
* @param expected result
* @param key of the map
* @param subkey of the map
* @param v resolved value
*/
|
Test the restoreExpression method with the expression map
|
test
|
{
"repo_name": "darranl/ironjacamar",
"path": "testsuite/src/test/java/org/ironjacamar/common/metadata/common/ExpressionRestoreTestCase.java",
"license": "epl-1.0",
"size": 6617
}
|
[
"org.junit.Assert"
] |
import org.junit.Assert;
|
import org.junit.*;
|
[
"org.junit"
] |
org.junit;
| 570,781
|
@Override
public List<Pair<T, V>> remove(Object key) {
List<Pair<T, V>> timesAndVals = mHashMap.remove(key);
if (null == timesAndVals) {
// If we couldn't find this key, break early.
return null;
}
// Remove all elements from the timestamp-driven map.
for (Pair<T, V> tv : timesAndVals) {
T t = tv.getLeft();
List<K> keysForTs = mTimestamps.get(t);
Iterator<K> it = keysForTs.iterator();
while (it.hasNext()) {
K someKey = it.next();
if (someKey.equals(key)) {
it.remove();
}
}
if (keysForTs.size() == 0) {
// Only key for the timestamp; remove the timestamp from the
// mapping entirely.
mTimestamps.remove(t);
}
}
return timesAndVals;
}
|
List<Pair<T, V>> function(Object key) { List<Pair<T, V>> timesAndVals = mHashMap.remove(key); if (null == timesAndVals) { return null; } for (Pair<T, V> tv : timesAndVals) { T t = tv.getLeft(); List<K> keysForTs = mTimestamps.get(t); Iterator<K> it = keysForTs.iterator(); while (it.hasNext()) { K someKey = it.next(); if (someKey.equals(key)) { it.remove(); } } if (keysForTs.size() == 0) { mTimestamps.remove(t); } } return timesAndVals; }
|
/**
* Removes the specified key from the map.
*/
|
Removes the specified key from the map
|
remove
|
{
"repo_name": "flumebase/flumebase",
"path": "src/main/java/com/odiago/flumebase/util/WindowedHashMap.java",
"license": "apache-2.0",
"size": 9461
}
|
[
"com.cloudera.util.Pair",
"java.util.Iterator",
"java.util.List"
] |
import com.cloudera.util.Pair; import java.util.Iterator; import java.util.List;
|
import com.cloudera.util.*; import java.util.*;
|
[
"com.cloudera.util",
"java.util"
] |
com.cloudera.util; java.util;
| 1,899,599
|
public void killAll(@CheckForNull Process proc, @CheckForNull Map<String, String> modelEnvVars) throws InterruptedException {
LOGGER.fine("killAll: process=" + proc + " and envs=" + modelEnvVars);
if (proc != null) {
OSProcess p = get(proc);
if (p != null) p.killRecursively();
}
if (modelEnvVars != null)
killAll(modelEnvVars);
}
|
void function(@CheckForNull Process proc, @CheckForNull Map<String, String> modelEnvVars) throws InterruptedException { LOGGER.fine(STR + proc + STR + modelEnvVars); if (proc != null) { OSProcess p = get(proc); if (p != null) p.killRecursively(); } if (modelEnvVars != null) killAll(modelEnvVars); }
|
/**
* Convenience method that does {@link #killAll(Map)} and {@link OSProcess#killRecursively()}.
* This is necessary to reliably kill the process and its descendants, as some OS
* may not implement {@link #killAll(Map)}.
*
* Either of the parameter can be null.
*/
|
Convenience method that does <code>#killAll(Map)</code> and <code>OSProcess#killRecursively()</code>. This is necessary to reliably kill the process and its descendants, as some OS may not implement <code>#killAll(Map)</code>. Either of the parameter can be null
|
killAll
|
{
"repo_name": "v1v/jenkins",
"path": "core/src/main/java/hudson/util/ProcessTree.java",
"license": "mit",
"size": 92689
}
|
[
"edu.umd.cs.findbugs.annotations.CheckForNull",
"hudson.util.ProcessTree",
"java.util.Map"
] |
import edu.umd.cs.findbugs.annotations.CheckForNull; import hudson.util.ProcessTree; import java.util.Map;
|
import edu.umd.cs.findbugs.annotations.*; import hudson.util.*; import java.util.*;
|
[
"edu.umd.cs",
"hudson.util",
"java.util"
] |
edu.umd.cs; hudson.util; java.util;
| 2,258,010
|
@Nullable public <V> V removeMeta(int key);
|
@Nullable <V> V function(int key);
|
/**
* Removes metadata by key.
*
* @param key Key of the metadata to remove.
* @param <V> Type of the value.
* @return Value of removed metadata or {@code null}.
*/
|
Removes metadata by key
|
removeMeta
|
{
"repo_name": "vadopolski/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java",
"license": "apache-2.0",
"size": 37734
}
|
[
"org.jetbrains.annotations.Nullable"
] |
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.*;
|
[
"org.jetbrains.annotations"
] |
org.jetbrains.annotations;
| 1,068,676
|
public GeoDistanceSortBuilder points(GeoPoint... points) {
this.points.addAll(Arrays.asList(points));
return this;
}
|
GeoDistanceSortBuilder function(GeoPoint... points) { this.points.addAll(Arrays.asList(points)); return this; }
|
/**
* The point to create the range distance facets from.
*
* @param points reference points.
*/
|
The point to create the range distance facets from
|
points
|
{
"repo_name": "strahanjen/strahanjen.github.io",
"path": "elasticsearch-master/core/src/main/java/org/elasticsearch/search/sort/GeoDistanceSortBuilder.java",
"license": "bsd-3-clause",
"size": 25937
}
|
[
"java.util.Arrays",
"org.elasticsearch.common.geo.GeoPoint"
] |
import java.util.Arrays; import org.elasticsearch.common.geo.GeoPoint;
|
import java.util.*; import org.elasticsearch.common.geo.*;
|
[
"java.util",
"org.elasticsearch.common"
] |
java.util; org.elasticsearch.common;
| 2,805,060
|
public static <K, V> OrderedMapIterator<K, V> emptyOrderedMapIterator() {
return EmptyOrderedMapIterator.<K, V>emptyOrderedMapIterator();
}
|
static <K, V> OrderedMapIterator<K, V> function() { return EmptyOrderedMapIterator.<K, V>emptyOrderedMapIterator(); }
|
/**
* Gets an empty ordered map iterator.
* <p>
* This iterator is a valid map iterator object that will iterate
* over nothing.
*
* @param <K> the key type
* @param <V> the value type
* @return a map iterator over nothing
*/
|
Gets an empty ordered map iterator. This iterator is a valid map iterator object that will iterate over nothing
|
emptyOrderedMapIterator
|
{
"repo_name": "krivachy/compgs03_mutation_testing",
"path": "src/main/java/org/apache/commons/collections4/IteratorUtils.java",
"license": "apache-2.0",
"size": 45184
}
|
[
"org.apache.commons.collections4.iterators.EmptyOrderedMapIterator"
] |
import org.apache.commons.collections4.iterators.EmptyOrderedMapIterator;
|
import org.apache.commons.collections4.iterators.*;
|
[
"org.apache.commons"
] |
org.apache.commons;
| 1,606,773
|
public void closeDatabases() throws Exception {
for( CustomTileDatabaseHandler customtileHandler : customtileHandlers ) {
customtileHandler.close();
}
}
|
void function() throws Exception { for( CustomTileDatabaseHandler customtileHandler : customtileHandlers ) { customtileHandler.close(); } }
|
/**
* Close all Databases that may be open
*
* <p>mbtiles 'MbtilesDatabaseHandler' database will be closed with '.close();' if active
* <p>- 'update_bounds();' will be called beforhand
*
* @throws Exception if something goes wrong.
*/
|
Close all Databases that may be open mbtiles 'MbtilesDatabaseHandler' database will be closed with '.close();' if active - 'update_bounds();' will be called beforhand
|
closeDatabases
|
{
"repo_name": "gabrielmancilla/mtisig",
"path": "geopaparazzimapsforge/src/eu/geopaparazzi/mapsforge/mapsdirmanager/maps/CustomTileDatabasesManager.java",
"license": "gpl-3.0",
"size": 7960
}
|
[
"eu.geopaparazzi.mapsforge.mapsdirmanager.maps.tiles.CustomTileDatabaseHandler"
] |
import eu.geopaparazzi.mapsforge.mapsdirmanager.maps.tiles.CustomTileDatabaseHandler;
|
import eu.geopaparazzi.mapsforge.mapsdirmanager.maps.tiles.*;
|
[
"eu.geopaparazzi.mapsforge"
] |
eu.geopaparazzi.mapsforge;
| 1,213,314
|
public FlowLogListResult withValue(List<FlowLogInner> value) {
this.value = value;
return this;
}
|
FlowLogListResult function(List<FlowLogInner> value) { this.value = value; return this; }
|
/**
* Set the value property: Information about flow log resource.
*
* @param value the value value to set.
* @return the FlowLogListResult object itself.
*/
|
Set the value property: Information about flow log resource
|
withValue
|
{
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/FlowLogListResult.java",
"license": "mit",
"size": 1934
}
|
[
"com.azure.resourcemanager.network.fluent.models.FlowLogInner",
"java.util.List"
] |
import com.azure.resourcemanager.network.fluent.models.FlowLogInner; import java.util.List;
|
import com.azure.resourcemanager.network.fluent.models.*; import java.util.*;
|
[
"com.azure.resourcemanager",
"java.util"
] |
com.azure.resourcemanager; java.util;
| 2,123,464
|
public void setRange(double lower, double upper) {
setRange(new Range(lower, upper));
}
|
void function(double lower, double upper) { setRange(new Range(lower, upper)); }
|
/**
* Sets the axis range and sends an {@link AxisChangeEvent} to all
* registered listeners. As a side-effect, the auto-range flag is set to
* <code>false</code>.
*
* @param lower the lower axis limit.
* @param upper the upper axis limit.
*/
|
Sets the axis range and sends an <code>AxisChangeEvent</code> to all registered listeners. As a side-effect, the auto-range flag is set to <code>false</code>
|
setRange
|
{
"repo_name": "raedle/univis",
"path": "lib/jfreechart-1.0.1/src/org/jfree/chart/axis/ValueAxis.java",
"license": "lgpl-2.1",
"size": 53672
}
|
[
"org.jfree.data.Range"
] |
import org.jfree.data.Range;
|
import org.jfree.data.*;
|
[
"org.jfree.data"
] |
org.jfree.data;
| 107,866
|
void setItems( List<IFeedResourceItem> listItems );
|
void setItems( List<IFeedResourceItem> listItems );
|
/**
* Sets the feed items
*
* @param listItems
* the items
*/
|
Sets the feed items
|
setItems
|
{
"repo_name": "lutece-platform/lutece-core",
"path": "src/java/fr/paris/lutece/portal/business/rss/IFeedResource.java",
"license": "bsd-3-clause",
"size": 3693
}
|
[
"java.util.List"
] |
import java.util.List;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 380,475
|
private void set(double outputValue, CANTalon talon) {
// SPEED MODE CODE
// switch(talon.getControlMode()){
// case Speed: talon.set(1500 * outputValue); break;
// default: if(outputValue != 0)
// System.out.println(talonFrontRight.getEncPosition());
// talon.set(outputValue);
// }
talon.set(outputValue);
}
|
void function(double outputValue, CANTalon talon) { talon.set(outputValue); }
|
/**
* Sets the output of a CANTalon
*
* @param outputValue
* consult talon javadocs
* @param talon
* The CANTalon to set the speed on
*
*/
|
Sets the output of a CANTalon
|
set
|
{
"repo_name": "Team2537/Cogsworth",
"path": "src/org/usfirst/frc/team2537/robot/drive/DriveSubsystem.java",
"license": "gpl-3.0",
"size": 9059
}
|
[
"com.ctre.CANTalon"
] |
import com.ctre.CANTalon;
|
import com.ctre.*;
|
[
"com.ctre"
] |
com.ctre;
| 1,474,848
|
private static void setupKeyStores() throws Exception {
keysStoresDir.mkdirs();
String sslConfsDir = KeyStoreTestUtil.getClasspathDir(TestSecureShuffle.class);
setupSSLConfig(keysStoresDir.getAbsolutePath(), sslConfsDir, conf, true, true, "");
}
|
static void function() throws Exception { keysStoresDir.mkdirs(); String sslConfsDir = KeyStoreTestUtil.getClasspathDir(TestSecureShuffle.class); setupSSLConfig(keysStoresDir.getAbsolutePath(), sslConfsDir, conf, true, true, ""); }
|
/**
* Create relevant keystores for test cluster
*
* @throws Exception
*/
|
Create relevant keystores for test cluster
|
setupKeyStores
|
{
"repo_name": "apache/tez",
"path": "tez-tests/src/test/java/org/apache/tez/test/TestSecureShuffle.java",
"license": "apache-2.0",
"size": 13127
}
|
[
"org.apache.hadoop.security.ssl.KeyStoreTestUtil"
] |
import org.apache.hadoop.security.ssl.KeyStoreTestUtil;
|
import org.apache.hadoop.security.ssl.*;
|
[
"org.apache.hadoop"
] |
org.apache.hadoop;
| 2,483,876
|
@Override
public void writeChar(char value) throws JMSException {
checkCanWrite();
try {
dataOut.writeChar(value);
} catch (IOException e) {
throw convertExceptionToJMSException(e);
}
}
|
void function(char value) throws JMSException { checkCanWrite(); try { dataOut.writeChar(value); } catch (IOException e) { throw convertExceptionToJMSException(e); } }
|
/**
* Writes a <code>char</code> to the bytes message stream
*
* @param value
* The <code>char</code> value to be written
* @throws JMSException
* If the JMS provider fails to write the message due to some
* internal error.
* @throws MessageNotWriteableException
* If the message is in read-only mode.
*/
|
Writes a <code>char</code> to the bytes message stream
|
writeChar
|
{
"repo_name": "lkb2k/amazon-sqs-java-messaging-lib",
"path": "src/main/java/com/amazon/sqs/javamessaging/message/SQSBytesMessage.java",
"license": "apache-2.0",
"size": 28703
}
|
[
"java.io.IOException",
"javax.jms.JMSException"
] |
import java.io.IOException; import javax.jms.JMSException;
|
import java.io.*; import javax.jms.*;
|
[
"java.io",
"javax.jms"
] |
java.io; javax.jms;
| 817,933
|
@Override
public EnumAction getItemUseAction(ItemStack par1ItemStack)
{
return EnumAction.drink;
}
|
EnumAction function(ItemStack par1ItemStack) { return EnumAction.drink; }
|
/**
* returns the action that specifies what animation to play when the items is being used
*/
|
returns the action that specifies what animation to play when the items is being used
|
getItemUseAction
|
{
"repo_name": "VegasGoat/TFCraft",
"path": "src/Common/com/bioxx/tfc/Items/Tools/ItemCustomBucketMilk.java",
"license": "gpl-3.0",
"size": 5459
}
|
[
"net.minecraft.item.EnumAction",
"net.minecraft.item.ItemStack"
] |
import net.minecraft.item.EnumAction; import net.minecraft.item.ItemStack;
|
import net.minecraft.item.*;
|
[
"net.minecraft.item"
] |
net.minecraft.item;
| 1,171,404
|
DatapathId getId();
|
DatapathId getId();
|
/**
* Get the datapathId of the switch
* @return
*/
|
Get the datapathId of the switch
|
getId
|
{
"repo_name": "rizard/switchvisor",
"path": "src/main/java/net/floodlightcontroller/core/IOFSwitch.java",
"license": "apache-2.0",
"size": 2367
}
|
[
"org.projectfloodlight.openflow.types.DatapathId"
] |
import org.projectfloodlight.openflow.types.DatapathId;
|
import org.projectfloodlight.openflow.types.*;
|
[
"org.projectfloodlight.openflow"
] |
org.projectfloodlight.openflow;
| 322,946
|
Configuration conf = new Configuration();
MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null);
try {
Thread.sleep(1000 * 60);
FSNamesystem ns = cluster.getNameNode().getNamesystem();
assertTrue(ns.getUpgradeTime() == 0);
} finally {
cluster.shutdown();
}
}
|
Configuration conf = new Configuration(); MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null); try { Thread.sleep(1000 * 60); FSNamesystem ns = cluster.getNameNode().getNamesystem(); assertTrue(ns.getUpgradeTime() == 0); } finally { cluster.shutdown(); } }
|
/**
* Start the NN in regular mode and the upgradeTime should be zero.
* @throws IOException
* @throws InterruptedException
*/
|
Start the NN in regular mode and the upgradeTime should be zero
|
testNnNoUpgrade
|
{
"repo_name": "shakamunyi/hadoop-20",
"path": "src/test/org/apache/hadoop/hdfs/TestNameNodeUpgrade.java",
"license": "apache-2.0",
"size": 2830
}
|
[
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hdfs.server.namenode.FSNamesystem"
] |
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.server.namenode.FSNamesystem;
|
import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.server.namenode.*;
|
[
"org.apache.hadoop"
] |
org.apache.hadoop;
| 2,644,981
|
public void internalParameterEntityDecl(String name, String value)
throws SAXException;
|
void function(String name, String value) throws SAXException;
|
/**
* Receive notification of a internal parameter entity declaration
* event.
*
* @param name The internal parameter entity name.
* @param value The value of the entity, which may include unexpanded
* entity references. Character references will have been
* expanded.
* @throws SAXException
* @see #externalParameterEntityDecl(String, String, String)
*/
|
Receive notification of a internal parameter entity declaration event
|
internalParameterEntityDecl
|
{
"repo_name": "shelan/jdk9-mirror",
"path": "jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/dtdparser/DTDEventListener.java",
"license": "gpl-2.0",
"size": 13531
}
|
[
"org.xml.sax.SAXException"
] |
import org.xml.sax.SAXException;
|
import org.xml.sax.*;
|
[
"org.xml.sax"
] |
org.xml.sax;
| 639,882
|
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<DiagnosticDetectorResponseInner> executeSiteDetectorSlotAsync(
String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot) {
final OffsetDateTime startTime = null;
final OffsetDateTime endTime = null;
final String timeGrain = null;
return executeSiteDetectorSlotWithResponseAsync(
resourceGroupName, siteName, detectorName, diagnosticCategory, slot, startTime, endTime, timeGrain)
.flatMap(
(Response<DiagnosticDetectorResponseInner> res) -> {
if (res.getValue() != null) {
return Mono.just(res.getValue());
} else {
return Mono.empty();
}
});
}
|
@ServiceMethod(returns = ReturnType.SINGLE) Mono<DiagnosticDetectorResponseInner> function( String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot) { final OffsetDateTime startTime = null; final OffsetDateTime endTime = null; final String timeGrain = null; return executeSiteDetectorSlotWithResponseAsync( resourceGroupName, siteName, detectorName, diagnosticCategory, slot, startTime, endTime, timeGrain) .flatMap( (Response<DiagnosticDetectorResponseInner> res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { return Mono.empty(); } }); }
|
/**
* Description for Execute Detector.
*
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param siteName Site Name.
* @param detectorName Detector Resource Name.
* @param diagnosticCategory Category Name.
* @param slot Slot Name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return class representing Response from Diagnostic Detectors on successful completion of {@link Mono}.
*/
|
Description for Execute Detector
|
executeSiteDetectorSlotAsync
|
{
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/DiagnosticsClientImpl.java",
"license": "mit",
"size": 288640
}
|
[
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.resourcemanager.appservice.fluent.models.DiagnosticDetectorResponseInner",
"java.time.OffsetDateTime"
] |
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.appservice.fluent.models.DiagnosticDetectorResponseInner; import java.time.OffsetDateTime;
|
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.appservice.fluent.models.*; import java.time.*;
|
[
"com.azure.core",
"com.azure.resourcemanager",
"java.time"
] |
com.azure.core; com.azure.resourcemanager; java.time;
| 393,028
|
@Test(expectedExceptions = NullPointerException.class)
public void testSpecificationsWithNull() {
new Heartbeat(Arrays.asList(SPECS.iterator().next(), null));
}
|
@Test(expectedExceptions = NullPointerException.class) void function() { new Heartbeat(Arrays.asList(SPECS.iterator().next(), null)); }
|
/**
* Tests that the specifications cannot be null.
*/
|
Tests that the specifications cannot be null
|
testSpecificationsWithNull
|
{
"repo_name": "McLeodMoores/starling",
"path": "projects/live-data/src/test/java/com/opengamma/livedata/msg/HeartbeatTest.java",
"license": "apache-2.0",
"size": 5661
}
|
[
"java.util.Arrays",
"org.testng.annotations.Test"
] |
import java.util.Arrays; import org.testng.annotations.Test;
|
import java.util.*; import org.testng.annotations.*;
|
[
"java.util",
"org.testng.annotations"
] |
java.util; org.testng.annotations;
| 2,785,712
|
BigArrays createBigArrays(Settings settings, CircuitBreakerService circuitBreakerService) {
return new BigArrays(settings, circuitBreakerService);
}
|
BigArrays createBigArrays(Settings settings, CircuitBreakerService circuitBreakerService) { return new BigArrays(settings, circuitBreakerService); }
|
/**
* Creates a new {@link BigArrays} instance used for this node.
* This method can be overwritten by subclasses to change their {@link BigArrays} implementation for instance for testing
*/
|
Creates a new <code>BigArrays</code> instance used for this node. This method can be overwritten by subclasses to change their <code>BigArrays</code> implementation for instance for testing
|
createBigArrays
|
{
"repo_name": "gmarz/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/node/Node.java",
"license": "apache-2.0",
"size": 46256
}
|
[
"org.elasticsearch.common.settings.Settings",
"org.elasticsearch.common.util.BigArrays",
"org.elasticsearch.indices.breaker.CircuitBreakerService"
] |
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.indices.breaker.CircuitBreakerService;
|
import org.elasticsearch.common.settings.*; import org.elasticsearch.common.util.*; import org.elasticsearch.indices.breaker.*;
|
[
"org.elasticsearch.common",
"org.elasticsearch.indices"
] |
org.elasticsearch.common; org.elasticsearch.indices;
| 415,103
|
public int getScreenBrightness() {
try {
return Settings.System.getInt(mContext.getContentResolver(),
Settings.System.SCREEN_BRIGHTNESS);
} catch (Settings.SettingNotFoundException e) {
e.printStackTrace();
return -1;
}
}
|
int function() { try { return Settings.System.getInt(mContext.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS); } catch (Settings.SettingNotFoundException e) { e.printStackTrace(); return -1; } }
|
/**
* get screen's brightness
*
* @return screen's brightness
*/
|
get screen's brightness
|
getScreenBrightness
|
{
"repo_name": "BaiduQA/Cafe",
"path": "testservice/src/com/baidu/cafe/remote/SystemLib.java",
"license": "apache-2.0",
"size": 87756
}
|
[
"android.provider.Settings",
"java.lang.System"
] |
import android.provider.Settings; import java.lang.System;
|
import android.provider.*; import java.lang.*;
|
[
"android.provider",
"java.lang"
] |
android.provider; java.lang;
| 2,232,045
|
public void updateModificationDate(long projectId, long date) {
Project project = getProjectManager().getProject(projectId);
if (project != null) {
project.setDateModified(date);
}
}
|
void function(long projectId, long date) { Project project = getProjectManager().getProject(projectId); if (project != null) { project.setDateModified(date); } }
|
/**
* Updates the modification date for the requested projected in the local
* cached data structure based on the date received from the server.
* @param date the date to update it to
*/
|
Updates the modification date for the requested projected in the local cached data structure based on the date received from the server
|
updateModificationDate
|
{
"repo_name": "farxinu/appinventor-sources",
"path": "appinventor/appengine/src/com/google/appinventor/client/Ode.java",
"license": "apache-2.0",
"size": 89453
}
|
[
"com.google.appinventor.client.explorer.project.Project"
] |
import com.google.appinventor.client.explorer.project.Project;
|
import com.google.appinventor.client.explorer.project.*;
|
[
"com.google.appinventor"
] |
com.google.appinventor;
| 2,585,417
|
public List<String> getClassIdsForCampaign(
final String campaignId)
throws ServiceException {
try {
return campaignClassQueries.getClassesAssociatedWithCampaign(campaignId);
}
catch(DataAccessException e) {
throw new ServiceException(e);
}
}
|
List<String> function( final String campaignId) throws ServiceException { try { return campaignClassQueries.getClassesAssociatedWithCampaign(campaignId); } catch(DataAccessException e) { throw new ServiceException(e); } }
|
/**
* Returns the list of class IDs associated with a given campaign.
*
* @param campaignId The campaign's unique identifier.
*
* @return The list of class IDs.
*
* @throws ServiceException Thrown if there is an error.
*/
|
Returns the list of class IDs associated with a given campaign
|
getClassIdsForCampaign
|
{
"repo_name": "HaiJiaoXinHeng/server-1",
"path": "src/org/ohmage/service/CampaignClassServices.java",
"license": "apache-2.0",
"size": 4364
}
|
[
"java.util.List",
"org.ohmage.exception.DataAccessException",
"org.ohmage.exception.ServiceException"
] |
import java.util.List; import org.ohmage.exception.DataAccessException; import org.ohmage.exception.ServiceException;
|
import java.util.*; import org.ohmage.exception.*;
|
[
"java.util",
"org.ohmage.exception"
] |
java.util; org.ohmage.exception;
| 2,868,526
|
public static IASTAppendable Times(final IExpr x) {
return unary(Times, x);
}
|
static IASTAppendable function(final IExpr x) { return unary(Times, x); }
|
/**
* See: <a href=
* "https://raw.githubusercontent.com/axkr/symja_android_library/master/symja_android_library/doc/functions/Times.md">Times</a>
*/
|
See: Times
|
Times
|
{
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/F.java",
"license": "gpl-3.0",
"size": 283472
}
|
[
"org.matheclipse.core.interfaces.IASTAppendable",
"org.matheclipse.core.interfaces.IExpr"
] |
import org.matheclipse.core.interfaces.IASTAppendable; import org.matheclipse.core.interfaces.IExpr;
|
import org.matheclipse.core.interfaces.*;
|
[
"org.matheclipse.core"
] |
org.matheclipse.core;
| 140,938
|
@Test
public void testRoundTrip() throws Exception {
final ReverseGeocodeRequest req = new ReverseGeocodeRequest();
final Pos pos = new Pos();
pos.setX(new Double(7.986098));
pos.setY(new Double(49.4434503));
pos.setDimension(2);
final Point p = new Point();
p.addPos(pos);
p.setSrsName("EPSG:4326");
final Position position = new Position();
position.setPoint(p);
req.setPosition(position);
final ReverseGeocodePreference pref = new ReverseGeocodePreference();
pref.setPreference("StreetAddress");
req.setReverseGeocodePreference(pref);
final String reqXML = req.toXML();
final OpenLSReverseGeocodeRequestParser rp = new OpenLSReverseGeocodeRequestParser();
final ReverseGeocodeRequest req2 = rp
.parseOpenLSReverseGeocodeRequest(reqXML);
final String reqXML2 = req2.toXML();
LOGGER.debug(reqXML);
LOGGER.debug(reqXML2);
// vergelijk xml serialisatie
assertEquals(reqXML, reqXML2);
}
|
void function() throws Exception { final ReverseGeocodeRequest req = new ReverseGeocodeRequest(); final Pos pos = new Pos(); pos.setX(new Double(7.986098)); pos.setY(new Double(49.4434503)); pos.setDimension(2); final Point p = new Point(); p.addPos(pos); p.setSrsName(STR); final Position position = new Position(); position.setPoint(p); req.setPosition(position); final ReverseGeocodePreference pref = new ReverseGeocodePreference(); pref.setPreference(STR); req.setReverseGeocodePreference(pref); final String reqXML = req.toXML(); final OpenLSReverseGeocodeRequestParser rp = new OpenLSReverseGeocodeRequestParser(); final ReverseGeocodeRequest req2 = rp .parseOpenLSReverseGeocodeRequest(reqXML); final String reqXML2 = req2.toXML(); LOGGER.debug(reqXML); LOGGER.debug(reqXML2); assertEquals(reqXML, reqXML2); }
|
/**
* round trip test parsing van een request met xml serialisatie.
*
* @throws Exception
* als er een fout optreedt tijdens de test.
*/
|
round trip test parsing van een request met xml serialisatie
|
testRoundTrip
|
{
"repo_name": "mprins/CBSviewer",
"path": "src/test/java/nl/mineleni/openls/parser/OpenLSReverseGeocodeRequestParserTest.java",
"license": "bsd-2-clause",
"size": 3199
}
|
[
"nl.mineleni.openls.databinding.gml.Point",
"nl.mineleni.openls.databinding.gml.Pos",
"nl.mineleni.openls.databinding.openls.Position",
"nl.mineleni.openls.databinding.openls.ReverseGeocodePreference",
"nl.mineleni.openls.databinding.openls.ReverseGeocodeRequest",
"org.junit.Assert"
] |
import nl.mineleni.openls.databinding.gml.Point; import nl.mineleni.openls.databinding.gml.Pos; import nl.mineleni.openls.databinding.openls.Position; import nl.mineleni.openls.databinding.openls.ReverseGeocodePreference; import nl.mineleni.openls.databinding.openls.ReverseGeocodeRequest; import org.junit.Assert;
|
import nl.mineleni.openls.databinding.gml.*; import nl.mineleni.openls.databinding.openls.*; import org.junit.*;
|
[
"nl.mineleni.openls",
"org.junit"
] |
nl.mineleni.openls; org.junit;
| 922,793
|
public void pressedRefreshButton(int view){
if (view == 1){
WebView current = (WebView)findViewById(R.id.View1);
current.reload();
}//end if
else{
WebView current = (WebView)findViewById(R.id.View2);
current.reload();
}//end else
}//end pressedRefreshedButton
|
void function(int view){ if (view == 1){ WebView current = (WebView)findViewById(R.id.View1); current.reload(); } else{ WebView current = (WebView)findViewById(R.id.View2); current.reload(); } }
|
/**
* Refreshes specific view
* @param view view being altered
*/
|
Refreshes specific view
|
pressedRefreshButton
|
{
"repo_name": "AmarBhatt/scrollME",
"path": "ScrollMEProject/ScrollME/src/main/java/com/BHATT/scrollme/MainActivity.java",
"license": "mit",
"size": 39278
}
|
[
"android.webkit.WebView"
] |
import android.webkit.WebView;
|
import android.webkit.*;
|
[
"android.webkit"
] |
android.webkit;
| 630,611
|
@Test
public void testReference()
{
assertFalse(cReference.compare(null, null));
assertTrue(cReference.compare(createRef("name1", 1, 1, null, null, null, null), createRef("name2", 0, 0, null, null, null, null)));
assertTrue(cReference.compare(createRef(null, 0, 0, "origType", null, null, null), createRef(null, 0, 0, "origType", null, null, null)));
assertFalse(cReference.compare(createRef(null, 0, 0, "origType1", null, null, null), createRef(null, 0, 0, "origType2", null, null, null)));
assertTrue(cReference.compare(createRef(null, 0, 0, null, "entity", null, null), createRef(null, 0, 0, null, "entity", null, null)));
assertFalse(cReference.compare(createRef(null, 0, 0, null, "entity1", null, null), createRef(null, 0, 0, null, "entity2", null, null)));
assertTrue(cReference.compare(createRef(null, 0, 0, null, null, createRef("name", 0, 0, null, null, null, null), null),
createRef(null, 0, 0, null, null, createRef("name", 0, 0, null, null, null, null), null)));
assertFalse(cReference.compare(createRef(null, 0, 0, null, null, createRef("name1", 0, 0, null, null, null, null), null),
createRef(null, 0, 0, null, null, createRef("name2", 0, 0, null, null, null, null), null)));
assertTrue(cReference.compare(createRef(null, 0, 0, null, null, null, 1), createRef(null, 0, 0, null, null, null, 1)));
assertFalse(cReference.compare(createRef(null, 0, 0, null, null, null, null), createRef(null, 0, 0, null, null, null, 1)));
}
|
void function() { assertFalse(cReference.compare(null, null)); assertTrue(cReference.compare(createRef("name1", 1, 1, null, null, null, null), createRef("name2", 0, 0, null, null, null, null))); assertTrue(cReference.compare(createRef(null, 0, 0, STR, null, null, null), createRef(null, 0, 0, STR, null, null, null))); assertFalse(cReference.compare(createRef(null, 0, 0, STR, null, null, null), createRef(null, 0, 0, STR, null, null, null))); assertTrue(cReference.compare(createRef(null, 0, 0, null, STR, null, null), createRef(null, 0, 0, null, STR, null, null))); assertFalse(cReference.compare(createRef(null, 0, 0, null, STR, null, null), createRef(null, 0, 0, null, STR, null, null))); assertTrue(cReference.compare(createRef(null, 0, 0, null, null, createRef("name", 0, 0, null, null, null, null), null), createRef(null, 0, 0, null, null, createRef("name", 0, 0, null, null, null, null), null))); assertFalse(cReference.compare(createRef(null, 0, 0, null, null, createRef("name1", 0, 0, null, null, null, null), null), createRef(null, 0, 0, null, null, createRef("name2", 0, 0, null, null, null, null), null))); assertTrue(cReference.compare(createRef(null, 0, 0, null, null, null, 1), createRef(null, 0, 0, null, null, null, 1))); assertFalse(cReference.compare(createRef(null, 0, 0, null, null, null, null), createRef(null, 0, 0, null, null, null, 1))); }
|
/**
* TestReference SHOULD check: OriginalType, Opposite, RefsTo, Features
* TestReference SHOULD NOT check: Name, UpperBound, LowerBound
*/
|
TestReference SHOULD check: OriginalType, Opposite, RefsTo, Features TestReference SHOULD NOT check: Name, UpperBound, LowerBound
|
testReference
|
{
"repo_name": "catedrasaes-umu/NoSQLDataEngineering",
"path": "projects/es.um.nosql.s13e/test/es/um/nosql/s13e/util/compare/ComparePropertyTest.java",
"license": "mit",
"size": 7706
}
|
[
"org.junit.Assert"
] |
import org.junit.Assert;
|
import org.junit.*;
|
[
"org.junit"
] |
org.junit;
| 2,742,595
|
public void hideActionBar() {
ActionBar actionBar = getSupportActionBar();
// actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
// actionBar.setDisplayShowTitleEnabled(true);
// actionBar.setTitle(title);
actionBar.hide();
}
/**
* {@inheritDoc}
|
void function() { ActionBar actionBar = getSupportActionBar(); actionBar.hide(); } /** * {@inheritDoc}
|
/**
* Hide the action bar
*/
|
Hide the action bar
|
hideActionBar
|
{
"repo_name": "ngageoint/geopackage-mapcache-android",
"path": "mapcache/src/main/java/mil/nga/mapcache/MainActivity.java",
"license": "mit",
"size": 7404
}
|
[
"androidx.appcompat.app.ActionBar"
] |
import androidx.appcompat.app.ActionBar;
|
import androidx.appcompat.app.*;
|
[
"androidx.appcompat"
] |
androidx.appcompat;
| 1,292,429
|
@Override
public Adapter adapt(Notifier notifier, Object type) {
return super.adapt(notifier, this);
}
|
Adapter function(Notifier notifier, Object type) { return super.adapt(notifier, this); }
|
/**
* This implementation substitutes the factory itself as the key for the adapter.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
|
This implementation substitutes the factory itself as the key for the adapter.
|
adapt
|
{
"repo_name": "deveshg/fsm",
"path": "com.example.fsm.edit/src/com/example/fsm/provider/FSMItemProviderAdapterFactory.java",
"license": "epl-1.0",
"size": 7200
}
|
[
"org.eclipse.emf.common.notify.Adapter",
"org.eclipse.emf.common.notify.Notifier"
] |
import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier;
|
import org.eclipse.emf.common.notify.*;
|
[
"org.eclipse.emf"
] |
org.eclipse.emf;
| 1,074,074
|
ExecutorService newCachedThreadPool(Object source, String name);
|
ExecutorService newCachedThreadPool(Object source, String name);
|
/**
* Creates a new cached thread pool.
* <p/>
* <b>Important:</b> Using cached thread pool is discouraged as they have no upper bound and can overload the JVM.
*
* @param source the source object, usually it should be <tt>this</tt> passed in as parameter
* @param name name which is appended to the thread name
* @return the created thread pool
*/
|
Creates a new cached thread pool. Important: Using cached thread pool is discouraged as they have no upper bound and can overload the JVM
|
newCachedThreadPool
|
{
"repo_name": "cexbrayat/camel",
"path": "camel-core/src/main/java/org/apache/camel/spi/ExecutorServiceManager.java",
"license": "apache-2.0",
"size": 10079
}
|
[
"java.util.concurrent.ExecutorService"
] |
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.*;
|
[
"java.util"
] |
java.util;
| 862,048
|
public void setScalingCoefficients() {
long start = System.currentTimeMillis();
findBoundary();
long end = System.currentTimeMillis();
double time = (double) (end - start) / 1000;
Log.i("setScalingCoefficients", "time of conversions = " + time + "seconds");
}
|
void function() { long start = System.currentTimeMillis(); findBoundary(); long end = System.currentTimeMillis(); double time = (double) (end - start) / 1000; Log.i(STR, STR + time + STR); }
|
/**
* Nastavia sa skalovacie koeficienty
*/
|
Nastavia sa skalovacie koeficienty
|
setScalingCoefficients
|
{
"repo_name": "VladimiraHezelova/WhiteBalance",
"path": "app/src/main/java/bachelorapp/fi/muni/cz/whitebalanceapp/whiteBalance/algorithms/histogramStretching/HistogramStretching.java",
"license": "bsd-3-clause",
"size": 4448
}
|
[
"android.util.Log"
] |
import android.util.Log;
|
import android.util.*;
|
[
"android.util"
] |
android.util;
| 2,486,052
|
public void setCanCreate(Boolean canCreateParam) {
this.canCreate = canCreateParam;
}
/**
* Conversion to {@code JSONObject} from Java Object.
*
* @return {@code JSONObject} representation of {@code RoleToFormDefinition}
|
void function(Boolean canCreateParam) { this.canCreate = canCreateParam; } /** * Conversion to {@code JSONObject} from Java Object. * * @return {@code JSONObject} representation of {@code RoleToFormDefinition}
|
/**
* Sets whether the {@code Role} allow for {@code Form} creation.
*
* @param canCreateParam Does the {@code Role} allow for {@code Form} creation.
*/
|
Sets whether the Role allow for Form creation
|
setCanCreate
|
{
"repo_name": "Koekiebox-PTY-LTD/Fluid",
"path": "fluid-api/src/main/java/com/fluidbpm/program/api/vo/role/FormFieldToFormDefinition.java",
"license": "gpl-3.0",
"size": 4789
}
|
[
"org.json.JSONObject"
] |
import org.json.JSONObject;
|
import org.json.*;
|
[
"org.json"
] |
org.json;
| 1,169,781
|
public void insert(SimulationEvent event);
|
void function(SimulationEvent event);
|
/**
* Insert event into event queue.
*
* @param event
* event to insert.
*/
|
Insert event into event queue
|
insert
|
{
"repo_name": "flyroom/PeerfactSimKOM_Clone",
"path": "src/org/peerfact/api/simengine/EventQueue.java",
"license": "gpl-2.0",
"size": 2467
}
|
[
"org.peerfact.impl.simengine.SimulationEvent"
] |
import org.peerfact.impl.simengine.SimulationEvent;
|
import org.peerfact.impl.simengine.*;
|
[
"org.peerfact.impl"
] |
org.peerfact.impl;
| 1,465,234
|
public ApiResponse importFile(String endurl, String file) throws ClientApiException {
Map<String, String> map = new HashMap<>();
map.put("endurl", endurl);
map.put("file", file);
return api.callApi("graphql", "action", "importFile", map);
}
|
ApiResponse function(String endurl, String file) throws ClientApiException { Map<String, String> map = new HashMap<>(); map.put(STR, endurl); map.put("file", file); return api.callApi(STR, STR, STR, map); }
|
/**
* Imports a GraphQL Schema from a File.
*
* <p>This component is optional and therefore the API will only work if it is installed
*/
|
Imports a GraphQL Schema from a File. This component is optional and therefore the API will only work if it is installed
|
importFile
|
{
"repo_name": "zaproxy/zap-api-java",
"path": "subprojects/zap-clientapi/src/main/java/org/zaproxy/clientapi/gen/Graphql.java",
"license": "apache-2.0",
"size": 8429
}
|
[
"java.util.HashMap",
"java.util.Map",
"org.zaproxy.clientapi.core.ApiResponse",
"org.zaproxy.clientapi.core.ClientApiException"
] |
import java.util.HashMap; import java.util.Map; import org.zaproxy.clientapi.core.ApiResponse; import org.zaproxy.clientapi.core.ClientApiException;
|
import java.util.*; import org.zaproxy.clientapi.core.*;
|
[
"java.util",
"org.zaproxy.clientapi"
] |
java.util; org.zaproxy.clientapi;
| 498,788
|
return existsStyle(name, Util.DEFAULT_QUIET_ON_NOT_FOUND);
}
|
return existsStyle(name, Util.DEFAULT_QUIET_ON_NOT_FOUND); }
|
/**
* Check if a Style exists in the configured GeoServer instance.
* @param name the name of the style to check for.
* @return <TT>true</TT> on HTTP 200, <TT>false</TT> on HTTP 404
* @throws RuntimeException if any other HTTP code than 200 or 404 was retrieved.
*/
|
Check if a Style exists in the configured GeoServer instance
|
existsStyle
|
{
"repo_name": "geosolutions-it/geoserver-manager",
"path": "src/main/java/it/geosolutions/geoserver/rest/manager/GeoServerRESTStyleManager.java",
"license": "mit",
"size": 30205
}
|
[
"it.geosolutions.geoserver.rest.Util"
] |
import it.geosolutions.geoserver.rest.Util;
|
import it.geosolutions.geoserver.rest.*;
|
[
"it.geosolutions.geoserver"
] |
it.geosolutions.geoserver;
| 2,825,565
|
public boolean isResolvedBy(Class<? extends IApplication> capabilityClass) {
// FIXME shouldn't it be is assignable from?
return getFieldType().equals(capabilityClass);
}
|
boolean function(Class<? extends IApplication> capabilityClass) { return getFieldType().equals(capabilityClass); }
|
/**
* Tells whether this Dependency can be resolved with given capabilityClass or not.
*
* @param capabilityClass
* @return
*/
|
Tells whether this Dependency can be resolved with given capabilityClass or not
|
isResolvedBy
|
{
"repo_name": "logoff/mqnaas",
"path": "core/src/main/java/org/mqnaas/core/impl/ApplicationInstance.java",
"license": "lgpl-3.0",
"size": 16777
}
|
[
"org.mqnaas.core.api.IApplication"
] |
import org.mqnaas.core.api.IApplication;
|
import org.mqnaas.core.api.*;
|
[
"org.mqnaas.core"
] |
org.mqnaas.core;
| 1,532,086
|
@Override
protected void cleanup(TestParameters tParam, PrintWriter log) {
log.println(" disposing xTextDoc ");
try {
XCloseable closer = UnoRuntime.queryInterface(
XCloseable.class, xTextDoc);
closer.close(true);
} catch (com.sun.star.util.CloseVetoException e) {
log.println("couldn't close document");
} catch (com.sun.star.lang.DisposedException e) {
log.println("couldn't close document");
}
}
|
void function(TestParameters tParam, PrintWriter log) { log.println(STR); try { XCloseable closer = UnoRuntime.queryInterface( XCloseable.class, xTextDoc); closer.close(true); } catch (com.sun.star.util.CloseVetoException e) { log.println(STR); } catch (com.sun.star.lang.DisposedException e) { log.println(STR); } }
|
/**
* Disposes the text document created before
*/
|
Disposes the text document created before
|
cleanup
|
{
"repo_name": "Limezero/libreoffice",
"path": "qadevOOo/tests/java/mod/_forms/ORadioButtonControl.java",
"license": "gpl-3.0",
"size": 8084
}
|
[
"com.sun.star.uno.UnoRuntime",
"com.sun.star.util.XCloseable",
"java.io.PrintWriter"
] |
import com.sun.star.uno.UnoRuntime; import com.sun.star.util.XCloseable; import java.io.PrintWriter;
|
import com.sun.star.uno.*; import com.sun.star.util.*; import java.io.*;
|
[
"com.sun.star",
"java.io"
] |
com.sun.star; java.io;
| 235,490
|
public List<IMigrationAction> process( MigratorDefinition migDef ) throws MigrationException {
//return this.processChildren( migDef ); // Old way
this.processChildren( migDef );
return ((Has.Actions) this.getStack().peek()).getActions();
}
|
List<IMigrationAction> function( MigratorDefinition migDef ) throws MigrationException { this.processChildren( migDef ); return ((Has.Actions) this.getStack().peek()).getActions(); }
|
/**
* Public method for the root class.
*/
|
Public method for the root class
|
process
|
{
"repo_name": "OndraZizka/jboss-migration",
"path": "engine/src/main/java/org/jboss/loom/migrators/_ext/process/MigratorDefinitionProcessor.java",
"license": "apache-2.0",
"size": 14475
}
|
[
"java.util.List",
"org.jboss.loom.actions.IMigrationAction",
"org.jboss.loom.ex.MigrationException",
"org.jboss.loom.migrators._ext.MigratorDefinition"
] |
import java.util.List; import org.jboss.loom.actions.IMigrationAction; import org.jboss.loom.ex.MigrationException; import org.jboss.loom.migrators._ext.MigratorDefinition;
|
import java.util.*; import org.jboss.loom.actions.*; import org.jboss.loom.ex.*; import org.jboss.loom.migrators._ext.*;
|
[
"java.util",
"org.jboss.loom"
] |
java.util; org.jboss.loom;
| 1,358,749
|
private static synchronized void createSingleton() {
if (null == singleton) {
singleton = new PlotDataSolverFactory();
}
}
/**
* Returns an implementation of {@link AbstractPlotDataSolver} which is represented by the given
* {@link EPlotDataSolver} enum.
*
* @param dataSolver
* desired {@link AbstractPlotDataSolver}
|
static synchronized void function() { if (null == singleton) { singleton = new PlotDataSolverFactory(); } } /** * Returns an implementation of {@link AbstractPlotDataSolver} which is represented by the given * {@link EPlotDataSolver} enum. * * @param dataSolver * desired {@link AbstractPlotDataSolver}
|
/**
* Creates the {@link PlotDataSolverFactory} singleton.
*/
|
Creates the <code>PlotDataSolverFactory</code> singleton
|
createSingleton
|
{
"repo_name": "inspectIT/inspectIT",
"path": "inspectit.ui.rcp/src/main/java/rocks/inspectit/ui/rcp/editor/graph/plot/datasolver/impl/PlotDataSolverFactory.java",
"license": "agpl-3.0",
"size": 2956
}
|
[
"rocks.inspectit.ui.rcp.editor.graph.plot.datasolver.AbstractPlotDataSolver"
] |
import rocks.inspectit.ui.rcp.editor.graph.plot.datasolver.AbstractPlotDataSolver;
|
import rocks.inspectit.ui.rcp.editor.graph.plot.datasolver.*;
|
[
"rocks.inspectit.ui"
] |
rocks.inspectit.ui;
| 2,267,463
|
public static void processRuleElement(ParserContext context, ConfigurationRuleBuilder rule, Element element)
{
String id = $(element).attr("id");
List<Element> children = $(element).children().get();
for (Element child : children)
{
Object result = context.processElement(child);
switch ($(child).tag())
{
case "when":
rule.when(((Condition) result));
break;
case "perform":
rule.perform(((Operation) result));
break;
case "otherwise":
rule.otherwise(((Operation) result));
break;
case "where":
break;
}
}
if (StringUtils.isNotBlank(id))
{
rule.withId(id);
}
}
|
static void function(ParserContext context, ConfigurationRuleBuilder rule, Element element) { String id = $(element).attr("id"); List<Element> children = $(element).children().get(); for (Element child : children) { Object result = context.processElement(child); switch ($(child).tag()) { case "when": rule.when(((Condition) result)); break; case STR: rule.perform(((Operation) result)); break; case STR: rule.otherwise(((Operation) result)); break; case "where": break; } } if (StringUtils.isNotBlank(id)) { rule.withId(id); } }
|
/**
* Processes all of the elements within a rule and attaches this data to the passed in rule. For example, this will process all of the "when",
* "perform", and "otherwise" elements.
*/
|
Processes all of the elements within a rule and attaches this data to the passed in rule. For example, this will process all of the "when", "perform", and "otherwise" elements
|
processRuleElement
|
{
"repo_name": "sgilda/windup",
"path": "config-xml/addon/src/main/java/org/jboss/windup/config/parser/xml/RuleHandler.java",
"license": "epl-1.0",
"size": 2115
}
|
[
"java.util.List",
"org.apache.commons.lang3.StringUtils",
"org.jboss.windup.config.parser.ParserContext",
"org.ocpsoft.rewrite.config.Condition",
"org.ocpsoft.rewrite.config.ConfigurationRuleBuilder",
"org.ocpsoft.rewrite.config.Operation",
"org.w3c.dom.Element"
] |
import java.util.List; import org.apache.commons.lang3.StringUtils; import org.jboss.windup.config.parser.ParserContext; import org.ocpsoft.rewrite.config.Condition; import org.ocpsoft.rewrite.config.ConfigurationRuleBuilder; import org.ocpsoft.rewrite.config.Operation; import org.w3c.dom.Element;
|
import java.util.*; import org.apache.commons.lang3.*; import org.jboss.windup.config.parser.*; import org.ocpsoft.rewrite.config.*; import org.w3c.dom.*;
|
[
"java.util",
"org.apache.commons",
"org.jboss.windup",
"org.ocpsoft.rewrite",
"org.w3c.dom"
] |
java.util; org.apache.commons; org.jboss.windup; org.ocpsoft.rewrite; org.w3c.dom;
| 712,924
|
public void setDataTableContents(List dataTableContents) {
this.dataTableContents = dataTableContents;
}
|
void function(List dataTableContents) { this.dataTableContents = dataTableContents; }
|
/**
* Sets the actual contents of the data table
*/
|
Sets the actual contents of the data table
|
setDataTableContents
|
{
"repo_name": "harfalm/Sakai-10.1",
"path": "podcasts/podcasts-app/src/java/org/sakaiproject/tool/podcasts/podPermBean.java",
"license": "apache-2.0",
"size": 16922
}
|
[
"java.util.List"
] |
import java.util.List;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 2,820,480
|
static PlayerAuth createPlayerAuth(Player player, HashedPassword hashedPassword, String email) {
return PlayerAuth.builder()
.name(player.getName().toLowerCase())
.realName(player.getName())
.password(hashedPassword)
.email(email)
.registrationIp(PlayerUtils.getPlayerIp(player))
.registrationDate(System.currentTimeMillis())
.uuid(player.getUniqueId())
.build();
}
|
static PlayerAuth createPlayerAuth(Player player, HashedPassword hashedPassword, String email) { return PlayerAuth.builder() .name(player.getName().toLowerCase()) .realName(player.getName()) .password(hashedPassword) .email(email) .registrationIp(PlayerUtils.getPlayerIp(player)) .registrationDate(System.currentTimeMillis()) .uuid(player.getUniqueId()) .build(); }
|
/**
* Creates a {@link PlayerAuth} object with the given data.
*
* @param player the player to create a PlayerAuth for
* @param hashedPassword the hashed password
* @param email the email address (nullable)
* @return the generated PlayerAuth object
*/
|
Creates a <code>PlayerAuth</code> object with the given data
|
createPlayerAuth
|
{
"repo_name": "AuthMe/AuthMeReloaded",
"path": "src/main/java/fr/xephi/authme/process/register/executors/PlayerAuthBuilderHelper.java",
"license": "gpl-3.0",
"size": 1140
}
|
[
"fr.xephi.authme.data.auth.PlayerAuth",
"fr.xephi.authme.security.crypts.HashedPassword",
"fr.xephi.authme.util.PlayerUtils",
"org.bukkit.entity.Player"
] |
import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.security.crypts.HashedPassword; import fr.xephi.authme.util.PlayerUtils; import org.bukkit.entity.Player;
|
import fr.xephi.authme.data.auth.*; import fr.xephi.authme.security.crypts.*; import fr.xephi.authme.util.*; import org.bukkit.entity.*;
|
[
"fr.xephi.authme",
"org.bukkit.entity"
] |
fr.xephi.authme; org.bukkit.entity;
| 2,799,020
|
private static Point wrapPoint( SeShape shape, CoordinateSystem coordinateSystem )
throws SeException {
double[][][] xyz = shape.getAllCoords( SeShape.TURN_DEFAULT );
Point point = GeometryFactory.createPoint( xyz[0][0][0], xyz[0][0][1], coordinateSystem );
return point;
}
|
static Point function( SeShape shape, CoordinateSystem coordinateSystem ) throws SeException { double[][][] xyz = shape.getAllCoords( SeShape.TURN_DEFAULT ); Point point = GeometryFactory.createPoint( xyz[0][0][0], xyz[0][0][1], coordinateSystem ); return point; }
|
/**
* creates a Point from a SeShape
*
* @param shape
* @param coordinateSystem
*/
|
creates a Point from a SeShape
|
wrapPoint
|
{
"repo_name": "lat-lon/deegree2-base",
"path": "deegree2-arcsde/src/main/java/org/deegree/io/sdeapi/SDEAdapter.java",
"license": "lgpl-2.1",
"size": 31524
}
|
[
"com.esri.sde.sdk.client.SeException",
"com.esri.sde.sdk.client.SeShape",
"org.deegree.model.crs.CoordinateSystem",
"org.deegree.model.spatialschema.GeometryFactory",
"org.deegree.model.spatialschema.Point"
] |
import com.esri.sde.sdk.client.SeException; import com.esri.sde.sdk.client.SeShape; import org.deegree.model.crs.CoordinateSystem; import org.deegree.model.spatialschema.GeometryFactory; import org.deegree.model.spatialschema.Point;
|
import com.esri.sde.sdk.client.*; import org.deegree.model.crs.*; import org.deegree.model.spatialschema.*;
|
[
"com.esri.sde",
"org.deegree.model"
] |
com.esri.sde; org.deegree.model;
| 1,812,402
|
Long georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoRadiusStoreArgs<K> geoRadiusStoreArgs);
|
Long georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoRadiusStoreArgs<K> geoRadiusStoreArgs);
|
/**
* Perform a {@link #georadius(Object, double, double, double, Unit, GeoArgs)} query and store the results in a sorted set.
*
* @param key the key of the geo set
* @param longitude the longitude coordinate according to WGS84
* @param latitude the latitude coordinate according to WGS84
* @param distance radius distance
* @param unit distance unit
* @param geoRadiusStoreArgs args to store either the resulting elements with their distance or the resulting elements with
* their locations a sorted set.
* @return Long integer-reply the number of elements in the result
*/
|
Perform a <code>#georadius(Object, double, double, double, Unit, GeoArgs)</code> query and store the results in a sorted set
|
georadius
|
{
"repo_name": "taer/lettuce",
"path": "src/main/templates/com/lambdaworks/redis/api/RedisGeoCommands.java",
"license": "apache-2.0",
"size": 5740
}
|
[
"com.lambdaworks.redis.GeoArgs",
"com.lambdaworks.redis.GeoRadiusStoreArgs"
] |
import com.lambdaworks.redis.GeoArgs; import com.lambdaworks.redis.GeoRadiusStoreArgs;
|
import com.lambdaworks.redis.*;
|
[
"com.lambdaworks.redis"
] |
com.lambdaworks.redis;
| 239,601
|
@Test public void testLongHeader() throws Exception {
URL url = new URL(baseUrl, "/longheader");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
StringBuilder sb = new StringBuilder();
for (int i = 0 ; i < 63 * 1024; i++) {
sb.append("a");
}
conn.setRequestProperty("longheader", sb.toString());
assertEquals(HttpURLConnection.HTTP_OK, conn.getResponseCode());
}
|
@Test void function() throws Exception { URL url = new URL(baseUrl, STR); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); StringBuilder sb = new StringBuilder(); for (int i = 0 ; i < 63 * 1024; i++) { sb.append("a"); } conn.setRequestProperty(STR, sb.toString()); assertEquals(HttpURLConnection.HTTP_OK, conn.getResponseCode()); }
|
/**
* Test that verifies headers can be up to 64K long.
* The test adds a 63K header leaving 1K for other headers.
* This is because the header buffer setting is for ALL headers,
* names and values included. */
|
Test that verifies headers can be up to 64K long. The test adds a 63K header leaving 1K for other headers. This is because the header buffer setting is for ALL headers
|
testLongHeader
|
{
"repo_name": "ChinmaySKulkarni/hbase",
"path": "hbase-http/src/test/java/org/apache/hadoop/hbase/http/TestHttpServer.java",
"license": "apache-2.0",
"size": 25138
}
|
[
"java.net.HttpURLConnection",
"org.junit.Test"
] |
import java.net.HttpURLConnection; import org.junit.Test;
|
import java.net.*; import org.junit.*;
|
[
"java.net",
"org.junit"
] |
java.net; org.junit;
| 1,418,811
|
public List<DisplayConstraintOption> getBagOps() {
List<DisplayConstraintOption> bagOps = new ArrayList<DisplayConstraintOption>();
for (ConstraintOp op : BagConstraint.VALID_OPS) {
bagOps.add(new DisplayConstraintOption(op.toString(), op.getIndex()));
}
return bagOps;
}
|
List<DisplayConstraintOption> function() { List<DisplayConstraintOption> bagOps = new ArrayList<DisplayConstraintOption>(); for (ConstraintOp op : BagConstraint.VALID_OPS) { bagOps.add(new DisplayConstraintOption(op.toString(), op.getIndex())); } return bagOps; }
|
/**
* Return the valid constraint ops when constraining on a bag.
* @return the possible bag constraint operations
*/
|
Return the valid constraint ops when constraining on a bag
|
getBagOps
|
{
"repo_name": "kimrutherford/intermine",
"path": "intermine/web/main/src/org/intermine/web/logic/query/DisplayConstraint.java",
"license": "lgpl-2.1",
"size": 33676
}
|
[
"java.util.ArrayList",
"java.util.List",
"org.intermine.metadata.ConstraintOp",
"org.intermine.objectstore.query.BagConstraint"
] |
import java.util.ArrayList; import java.util.List; import org.intermine.metadata.ConstraintOp; import org.intermine.objectstore.query.BagConstraint;
|
import java.util.*; import org.intermine.metadata.*; import org.intermine.objectstore.query.*;
|
[
"java.util",
"org.intermine.metadata",
"org.intermine.objectstore"
] |
java.util; org.intermine.metadata; org.intermine.objectstore;
| 349,986
|
EList<GmlFill> getGmlFIlls();
|
EList<GmlFill> getGmlFIlls();
|
/**
* Returns the value of the '<em><b>Gml FIlls</b></em>' reference list.
* The list contents are of type {@link gluemodel.CIM.IEC61970.Informative.InfGMLSupport.GmlFill}.
* It is bidirectional and its opposite is '{@link gluemodel.CIM.IEC61970.Informative.InfGMLSupport.GmlFill#getGmlMarks <em>Gml Marks</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Gml FIlls</em>' reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Gml FIlls</em>' reference list.
* @see gluemodel.CIM.IEC61970.Informative.InfGMLSupport.InfGMLSupportPackage#getGmlMark_GmlFIlls()
* @see gluemodel.CIM.IEC61970.Informative.InfGMLSupport.GmlFill#getGmlMarks
* @model opposite="GmlMarks"
* @generated
*/
|
Returns the value of the 'Gml FIlls' reference list. The list contents are of type <code>gluemodel.CIM.IEC61970.Informative.InfGMLSupport.GmlFill</code>. It is bidirectional and its opposite is '<code>gluemodel.CIM.IEC61970.Informative.InfGMLSupport.GmlFill#getGmlMarks Gml Marks</code>'. If the meaning of the 'Gml FIlls' reference list isn't clear, there really should be more of a description here...
|
getGmlFIlls
|
{
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/CIM/IEC61970/Informative/InfGMLSupport/GmlMark.java",
"license": "mit",
"size": 5620
}
|
[
"org.eclipse.emf.common.util.EList"
] |
import org.eclipse.emf.common.util.EList;
|
import org.eclipse.emf.common.util.*;
|
[
"org.eclipse.emf"
] |
org.eclipse.emf;
| 54,183
|
public SequencingServer getSequencingServer() {
return getSequencingHome().getSequencingServer();
}
|
SequencingServer function() { return getSequencingHome().getSequencingServer(); }
|
/**
* INTERNAL:
* Return SequencingServer object owned by the session.
*/
|
Return SequencingServer object owned by the session
|
getSequencingServer
|
{
"repo_name": "gameduell/eclipselink.runtime",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/server/ServerSession.java",
"license": "epl-1.0",
"size": 44522
}
|
[
"org.eclipse.persistence.internal.sequencing.SequencingServer"
] |
import org.eclipse.persistence.internal.sequencing.SequencingServer;
|
import org.eclipse.persistence.internal.sequencing.*;
|
[
"org.eclipse.persistence"
] |
org.eclipse.persistence;
| 1,004,392
|
public long getKeepCacheTime() {
String value = preferences.getString(PREF_KEEP_CACHE_TIME, null);
long fallbackValue = TimeUnit.DAYS.toMillis(1);
// the first time this was migrated, it was botched, so reset to default
switch (value) {
case "3600":
case "86400":
case "604800":
case "2592000":
case "31449600":
case "2147483647":
SharedPreferences.Editor editor = preferences.edit();
editor.remove(PREF_KEEP_CACHE_TIME);
editor.apply();
return fallbackValue;
}
if (preferences.contains(OLD_PREF_CACHE_APK)) {
if (preferences.getBoolean(OLD_PREF_CACHE_APK, false)) {
value = String.valueOf(Long.MAX_VALUE);
}
SharedPreferences.Editor editor = preferences.edit();
editor.remove(OLD_PREF_CACHE_APK);
editor.putString(PREF_KEEP_CACHE_TIME, value);
editor.apply();
}
try {
return Long.parseLong(value);
} catch (NumberFormatException e) {
return fallbackValue;
}
}
|
long function() { String value = preferences.getString(PREF_KEEP_CACHE_TIME, null); long fallbackValue = TimeUnit.DAYS.toMillis(1); switch (value) { case "3600": case "86400": case STR: case STR: case STR: case STR: SharedPreferences.Editor editor = preferences.edit(); editor.remove(PREF_KEEP_CACHE_TIME); editor.apply(); return fallbackValue; } if (preferences.contains(OLD_PREF_CACHE_APK)) { if (preferences.getBoolean(OLD_PREF_CACHE_APK, false)) { value = String.valueOf(Long.MAX_VALUE); } SharedPreferences.Editor editor = preferences.edit(); editor.remove(OLD_PREF_CACHE_APK); editor.putString(PREF_KEEP_CACHE_TIME, value); editor.apply(); } try { return Long.parseLong(value); } catch (NumberFormatException e) { return fallbackValue; } }
|
/**
* Time in millis to keep cached files. Anything that has been around longer will be deleted
*/
|
Time in millis to keep cached files. Anything that has been around longer will be deleted
|
getKeepCacheTime
|
{
"repo_name": "f-droid/fdroid-client",
"path": "app/src/main/java/org/fdroid/fdroid/Preferences.java",
"license": "gpl-3.0",
"size": 27053
}
|
[
"android.content.SharedPreferences",
"java.util.concurrent.TimeUnit"
] |
import android.content.SharedPreferences; import java.util.concurrent.TimeUnit;
|
import android.content.*; import java.util.concurrent.*;
|
[
"android.content",
"java.util"
] |
android.content; java.util;
| 2,190,597
|
public void validateAndAuthorize(HttpServletRequest req)
{
transition(State.INITIALIZED, State.AUTHORIZING);
AuthenticationResult authResult = AuthorizationUtils.authenticationResultFromRequest(req);
validate(authResult);
Access access = doAuthorize(
AuthorizationUtils.authorizeAllResourceActions(
req,
validationResult.getResourceActions(),
plannerFactory.getAuthorizerMapper()
)
);
checkAccess(access);
}
|
void function(HttpServletRequest req) { transition(State.INITIALIZED, State.AUTHORIZING); AuthenticationResult authResult = AuthorizationUtils.authenticationResultFromRequest(req); validate(authResult); Access access = doAuthorize( AuthorizationUtils.authorizeAllResourceActions( req, validationResult.getResourceActions(), plannerFactory.getAuthorizerMapper() ) ); checkAccess(access); }
|
/**
* Validate SQL query and authorize against any datasources or views which the query. Like
* {@link #validateAndAuthorize(AuthenticationResult)} but for a {@link HttpServletRequest}.
*
* If successful, the lifecycle will first transition from {@link State#INITIALIZED} first to
* {@link State#AUTHORIZING} and then to either {@link State#AUTHORIZED} or {@link State#UNAUTHORIZED}.
*/
|
Validate SQL query and authorize against any datasources or views which the query. Like <code>#validateAndAuthorize(AuthenticationResult)</code> but for a <code>HttpServletRequest</code>. If successful, the lifecycle will first transition from <code>State#INITIALIZED</code> first to <code>State#AUTHORIZING</code> and then to either <code>State#AUTHORIZED</code> or <code>State#UNAUTHORIZED</code>
|
validateAndAuthorize
|
{
"repo_name": "nishantmonu51/druid",
"path": "sql/src/main/java/org/apache/druid/sql/SqlLifecycle.java",
"license": "apache-2.0",
"size": 18672
}
|
[
"javax.servlet.http.HttpServletRequest",
"org.apache.druid.server.security.Access",
"org.apache.druid.server.security.AuthenticationResult",
"org.apache.druid.server.security.AuthorizationUtils"
] |
import javax.servlet.http.HttpServletRequest; import org.apache.druid.server.security.Access; import org.apache.druid.server.security.AuthenticationResult; import org.apache.druid.server.security.AuthorizationUtils;
|
import javax.servlet.http.*; import org.apache.druid.server.security.*;
|
[
"javax.servlet",
"org.apache.druid"
] |
javax.servlet; org.apache.druid;
| 1,966,923
|
private String encodeUri( String uri )
{
String newUri = "";
StringTokenizer st = new StringTokenizer( uri, "/ ", true );
while ( st.hasMoreTokens())
{
String tok = st.nextToken();
if ( tok.equals( "/" ))
newUri += "/";
else if ( tok.equals( " " ))
newUri += "%20";
else
{
newUri += URLEncoder.encode( tok );
// For Java 1.4 you'll want to use this instead:
// try { newUri += URLEncoder.encode( tok, "UTF-8" ); } catch ( java.io.UnsupportedEncodingException uee ) {}
}
}
return newUri;
}
private int myTcpPort;
private final ServerSocket myServerSocket;
private Thread myThread;
// ==================================================
// File server code
// ==================================================
|
String function( String uri ) { String newUri = STR/ STR/STR/STR STR%20"; else { newUri += URLEncoder.encode( tok ); } } return newUri; } private int myTcpPort; private final ServerSocket myServerSocket; private Thread myThread;
|
/**
* URL-encodes everything between "/"-characters.
* Encodes spaces as '%20' instead of '+'.
*/
|
URL-encodes everything between "/"-characters. Encodes spaces as '%20' instead of '+'
|
encodeUri
|
{
"repo_name": "s373/s373-processing-libs",
"path": "apache/src/s373/apache/NanoHTTPD.java",
"license": "lgpl-2.1",
"size": 30675
}
|
[
"java.net.ServerSocket",
"java.net.URLEncoder"
] |
import java.net.ServerSocket; import java.net.URLEncoder;
|
import java.net.*;
|
[
"java.net"
] |
java.net;
| 133,323
|
public DataElementConceptResource createDataElementConcept(
AdministrationRecordResource dataElementConceptAdministrationRecord,
ObjectClassResource dataElementConceptObjectClass,
PropertyResource dataElementConceptProperty,
String objectClassQualifier,
String propertyQualifier,
StewardshipRelationshipResource administeredBy,
SubmissionRelationshipResource submittedBy,
RegistrationAuthorityResource registeredBy,
AdministeredItemContextResource having,
ConceptualDomainResource havingDataElementConceptConceptualDomainRelationship) {
if (dataElementConceptAdministrationRecord == null) {
throw new IllegalArgumentException(
"Data Element Concept Administration Record must be specified for DataElementConcept.");
}
if (administeredBy == null) {
throw new IllegalArgumentException(
"StewardshipRelationship must be specified for Classification Scheme");
}
if (submittedBy == null) {
throw new IllegalArgumentException(
"SubmissionRelationship must be specified for ClassificationScheme");
}
if (registeredBy == null) {
throw new IllegalArgumentException(
"Registration Authority must be specified for Classification Scheme");
}
if (having == null) {
throw new IllegalArgumentException(
"Administered Item Context must be specified for Classification Scheme");
}
if (havingDataElementConceptConceptualDomainRelationship == null) {
throw new IllegalArgumentException(
"Conceptual Domain must be specified for Data Element Concept.");
}
String uniqueID = dataElementConceptAdministrationRecord
.getAdministeredItemIdentifier().getDataIdentifier();
Node node = Node.createURI(makeID(
Abbreviation.DataElementConcept.toString(), uniqueID));
DataElementConceptResource dataElementConcept = new DataElementConceptImpl(
node, (EnhGraph) ontModel,
dataElementConceptAdministrationRecord,
dataElementConceptObjectClass, dataElementConceptProperty,
objectClassQualifier, propertyQualifier, administeredBy,
submittedBy, registeredBy, having,
havingDataElementConceptConceptualDomainRelationship,
mdrDatabase);
return dataElementConcept;
}
|
DataElementConceptResource function( AdministrationRecordResource dataElementConceptAdministrationRecord, ObjectClassResource dataElementConceptObjectClass, PropertyResource dataElementConceptProperty, String objectClassQualifier, String propertyQualifier, StewardshipRelationshipResource administeredBy, SubmissionRelationshipResource submittedBy, RegistrationAuthorityResource registeredBy, AdministeredItemContextResource having, ConceptualDomainResource havingDataElementConceptConceptualDomainRelationship) { if (dataElementConceptAdministrationRecord == null) { throw new IllegalArgumentException( STR); } if (administeredBy == null) { throw new IllegalArgumentException( STR); } if (submittedBy == null) { throw new IllegalArgumentException( STR); } if (registeredBy == null) { throw new IllegalArgumentException( STR); } if (having == null) { throw new IllegalArgumentException( STR); } if (havingDataElementConceptConceptualDomainRelationship == null) { throw new IllegalArgumentException( STR); } String uniqueID = dataElementConceptAdministrationRecord .getAdministeredItemIdentifier().getDataIdentifier(); Node node = Node.createURI(makeID( Abbreviation.DataElementConcept.toString(), uniqueID)); DataElementConceptResource dataElementConcept = new DataElementConceptImpl( node, (EnhGraph) ontModel, dataElementConceptAdministrationRecord, dataElementConceptObjectClass, dataElementConceptProperty, objectClassQualifier, propertyQualifier, administeredBy, submittedBy, registeredBy, having, havingDataElementConceptConceptualDomainRelationship, mdrDatabase); return dataElementConcept; }
|
/**
* The method to create {@link DataElementConceptResource} on
* {@link Abbreviation}.
*
* @param dataElementConceptAdministrationRecord
* The Administration Record for a Data Element Concept.
* @param dataElementConceptObjectClass
* Optional. The designation of an Object Class for a Data
* Element Concept.
* @param dataElementConceptProperty
* Optional. The designation of a Property for a Data Element
* Concept.
* @param objectClassQualifier
* Optional. A qualifier of the Data Element Concept Object
* Class.
* @param propertyQualifier
* Optional. A qualifier of the Data Element Concept Property.
* @param administeredBy
* An Administered Item is administered by an
* {@link OrganizationResource} represented by the
* {@link StewardshipRelationshipResource}.
* @param submittedBy
* An Administered Item is submitted by an
* {@link OrganizationResource} represented by the
* {@link SubmissionRelationshipResource}.
* @param registeredBy
* An {@link AdministeredItemResource} is registered by a
* {@link RegistrationAuthorityResource} represented by the
* relationship registration.
* @param having
* An {@link AdministeredItemResource} has to have at least one
* {@link AdministeredItemContextResource}.
* @param havingDataElementConceptConceptualDomainRelationship
* An {@link DataElementConceptResource} has to have at least one
* {@link ConceptualDomainResource}.
* @return {@link DataElementConceptResource} on {@link Abbreviation} with a
* specific URI generated from
* {@link Abbreviation#DataElementConcept}.
*/
|
The method to create <code>DataElementConceptResource</code> on <code>Abbreviation</code>
|
createDataElementConcept
|
{
"repo_name": "srdc/semanticMDR",
"path": "core/src/main/java/tr/com/srdc/mdr/core/model/MDRResourceFactory.java",
"license": "gpl-3.0",
"size": 101565
}
|
[
"com.hp.hpl.jena.enhanced.EnhGraph",
"com.hp.hpl.jena.graph.Node",
"tr.com.srdc.mdr.core.impl.ai.DataElementConceptImpl",
"tr.com.srdc.mdr.core.model.iso11179.ConceptualDomainResource",
"tr.com.srdc.mdr.core.model.iso11179.DataElementConceptResource",
"tr.com.srdc.mdr.core.model.iso11179.ObjectClassResource",
"tr.com.srdc.mdr.core.model.iso11179.PropertyResource",
"tr.com.srdc.mdr.core.model.iso11179.composite.AdministeredItemContextResource",
"tr.com.srdc.mdr.core.model.iso11179.composite.AdministrationRecordResource",
"tr.com.srdc.mdr.core.model.iso11179.composite.RegistrationAuthorityResource",
"tr.com.srdc.mdr.core.model.iso11179.composite.StewardshipRelationshipResource",
"tr.com.srdc.mdr.core.model.iso11179.composite.SubmissionRelationshipResource"
] |
import com.hp.hpl.jena.enhanced.EnhGraph; import com.hp.hpl.jena.graph.Node; import tr.com.srdc.mdr.core.impl.ai.DataElementConceptImpl; import tr.com.srdc.mdr.core.model.iso11179.ConceptualDomainResource; import tr.com.srdc.mdr.core.model.iso11179.DataElementConceptResource; import tr.com.srdc.mdr.core.model.iso11179.ObjectClassResource; import tr.com.srdc.mdr.core.model.iso11179.PropertyResource; import tr.com.srdc.mdr.core.model.iso11179.composite.AdministeredItemContextResource; import tr.com.srdc.mdr.core.model.iso11179.composite.AdministrationRecordResource; import tr.com.srdc.mdr.core.model.iso11179.composite.RegistrationAuthorityResource; import tr.com.srdc.mdr.core.model.iso11179.composite.StewardshipRelationshipResource; import tr.com.srdc.mdr.core.model.iso11179.composite.SubmissionRelationshipResource;
|
import com.hp.hpl.jena.enhanced.*; import com.hp.hpl.jena.graph.*; import tr.com.srdc.mdr.core.impl.ai.*; import tr.com.srdc.mdr.core.model.iso11179.*; import tr.com.srdc.mdr.core.model.iso11179.composite.*;
|
[
"com.hp.hpl",
"tr.com.srdc"
] |
com.hp.hpl; tr.com.srdc;
| 1,447,130
|
private PointF transformCoordBitmapToTouch(float bx, float by) {
matrix.getValues(m);
float origW = getDrawable().getIntrinsicWidth();
float origH = getDrawable().getIntrinsicHeight();
float px = bx / origW;
float py = by / origH;
float finalX = m[Matrix.MTRANS_X] + getImageWidth() * px;
float finalY = m[Matrix.MTRANS_Y] + getImageHeight() * py;
return new PointF(finalX , finalY);
}
private class Fling implements Runnable {
CompatScroller scroller;
int currX, currY;
Fling(int velocityX, int velocityY) {
setState(State.FLING);
scroller = new CompatScroller(context);
matrix.getValues(m);
int startX = (int) m[Matrix.MTRANS_X];
int startY = (int) m[Matrix.MTRANS_Y];
int minX, maxX, minY, maxY;
if (getImageWidth() > viewWidth) {
minX = viewWidth - (int) getImageWidth();
maxX = 0;
} else {
minX = maxX = startX;
}
if (getImageHeight() > viewHeight) {
minY = viewHeight - (int) getImageHeight();
maxY = 0;
} else {
minY = maxY = startY;
}
scroller.fling(startX, startY, (int) velocityX, (int) velocityY, minX,
maxX, minY, maxY);
currX = startX;
currY = startY;
}
|
PointF function(float bx, float by) { matrix.getValues(m); float origW = getDrawable().getIntrinsicWidth(); float origH = getDrawable().getIntrinsicHeight(); float px = bx / origW; float py = by / origH; float finalX = m[Matrix.MTRANS_X] + getImageWidth() * px; float finalY = m[Matrix.MTRANS_Y] + getImageHeight() * py; return new PointF(finalX , finalY); } private class Fling implements Runnable { CompatScroller scroller; int currX, currY; Fling(int velocityX, int velocityY) { setState(State.FLING); scroller = new CompatScroller(context); matrix.getValues(m); int startX = (int) m[Matrix.MTRANS_X]; int startY = (int) m[Matrix.MTRANS_Y]; int minX, maxX, minY, maxY; if (getImageWidth() > viewWidth) { minX = viewWidth - (int) getImageWidth(); maxX = 0; } else { minX = maxX = startX; } if (getImageHeight() > viewHeight) { minY = viewHeight - (int) getImageHeight(); maxY = 0; } else { minY = maxY = startY; } scroller.fling(startX, startY, (int) velocityX, (int) velocityY, minX, maxX, minY, maxY); currX = startX; currY = startY; }
|
/**
* Inverse of transformCoordTouchToBitmap. This function will transform the coordinates in the
* drawable's coordinate system to the view's coordinate system.
* @param bx x-coordinate in original bitmap coordinate system
* @param by y-coordinate in original bitmap coordinate system
* @return Coordinates of the point in the view's coordinate system.
*/
|
Inverse of transformCoordTouchToBitmap. This function will transform the coordinates in the drawable's coordinate system to the view's coordinate system
|
transformCoordBitmapToTouch
|
{
"repo_name": "fernando-napier/FarmProfitCalculator",
"path": "touchImageView/src/main/java/com/ortiz/touch/TouchImageView.java",
"license": "mit",
"size": 40847
}
|
[
"android.graphics.Matrix",
"android.graphics.PointF"
] |
import android.graphics.Matrix; import android.graphics.PointF;
|
import android.graphics.*;
|
[
"android.graphics"
] |
android.graphics;
| 708,631
|
public CohortIndicator nutritionalAssessment() {
return cohortIndicator("Nutritional assessment Child",
map(qiCohorts.hadNutritionalAssessmentAtLastVisit(), "onOrAfter=${endDate-6m},onOrBefore=${endDate}"),
map(qiCohorts.hasHivVisitPaeds(), "onOrAfter=${startDate},onOrBefore=${endDate}")
);
}
|
CohortIndicator function() { return cohortIndicator(STR, map(qiCohorts.hadNutritionalAssessmentAtLastVisit(), STR), map(qiCohorts.hasHivVisitPaeds(), STR) ); }
|
/**
* Percentage of patients who had a nutritional assessment in their last visit
* @return the indicator
*/
|
Percentage of patients who had a nutritional assessment in their last visit
|
nutritionalAssessment
|
{
"repo_name": "hispindia/his-tb-emr",
"path": "api/src/main/java/org/openmrs/module/kenyaemr/reporting/library/shared/hiv/QiPaedsIndicatorLibrary.java",
"license": "gpl-3.0",
"size": 5142
}
|
[
"org.openmrs.module.kenyacore.report.ReportUtils",
"org.openmrs.module.kenyaemr.reporting.EmrReportingUtils",
"org.openmrs.module.reporting.indicator.CohortIndicator"
] |
import org.openmrs.module.kenyacore.report.ReportUtils; import org.openmrs.module.kenyaemr.reporting.EmrReportingUtils; import org.openmrs.module.reporting.indicator.CohortIndicator;
|
import org.openmrs.module.kenyacore.report.*; import org.openmrs.module.kenyaemr.reporting.*; import org.openmrs.module.reporting.indicator.*;
|
[
"org.openmrs.module"
] |
org.openmrs.module;
| 2,678,442
|
@Test
public void testSLRemoteEJBContext_getEJBLocalObject() throws Exception {
Object o = fejb1.context_getEJBLocalObject();
if (o instanceof Throwable) {
if (o instanceof IllegalStateException) {
svLogger.info("Caught expected " + o.getClass().getName());
} else {
fail("Caught unexpected expection : " + o);
}
} else {
fail("Unexpected return from context.getEJBLocalObject : " + o);
}
}
|
void function() throws Exception { Object o = fejb1.context_getEJBLocalObject(); if (o instanceof Throwable) { if (o instanceof IllegalStateException) { svLogger.info(STR + o.getClass().getName()); } else { fail(STR + o); } } else { fail(STR + o); } }
|
/**
* (ixc15) Test Stateless remote EJBContext.getEJBLocalObject().
*/
|
(ixc15) Test Stateless remote EJBContext.getEJBLocalObject()
|
testSLRemoteEJBContext_getEJBLocalObject
|
{
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.ejbcontainer.legacy_fat/test-applications/EJB2XRemoteSpecWeb.war/src/com/ibm/ejb2x/base/spec/slr/web/SLRemoteImplContextServlet.java",
"license": "epl-1.0",
"size": 14174
}
|
[
"org.junit.Assert"
] |
import org.junit.Assert;
|
import org.junit.*;
|
[
"org.junit"
] |
org.junit;
| 1,338,820
|
boolean hasTagsToUnlink()
{
if (tagsDocList.size() == 0) return false;
DocComponent doc;
Object object;
Iterator<DocComponent> i = tagsDocList.iterator();
while (i.hasNext()) {
doc = i.next();
object = doc.getData();
if (doc.canUnlink()) {
if (object instanceof TagAnnotationData) {
return true;
}
}
}
return false;
}
|
boolean hasTagsToUnlink() { if (tagsDocList.size() == 0) return false; DocComponent doc; Object object; Iterator<DocComponent> i = tagsDocList.iterator(); while (i.hasNext()) { doc = i.next(); object = doc.getData(); if (doc.canUnlink()) { if (object instanceof TagAnnotationData) { return true; } } } return false; }
|
/**
* Returns <code>true</code> some tags can be unlink,
* <code>false</code> otherwise.
*
* @return See above.
*/
|
Returns <code>true</code> some tags can be unlink, <code>false</code> otherwise
|
hasTagsToUnlink
|
{
"repo_name": "joshmoore/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/editor/AnnotationDataUI.java",
"license": "gpl-2.0",
"size": 44558
}
|
[
"java.util.Iterator"
] |
import java.util.Iterator;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 2,009,807
|
@Override
public Object report(Argument[] arg0, Context arg1)
throws ExtensionException, LogoException {
LogoList params = arg0[0].getList();
List<Double> finalParams = new ArrayList<Double>();
// Checks the format of the parameters and store the universe
double[] universe = SupportFunctions.LGEFormat(params, 4);
// Put the arguments in a list
finalParams.add((Double) params.first());
finalParams.add((Double) params.get(1));
finalParams.add((Double) params.get(2));
// Create and return the new set
return new ExponentialSet(finalParams, true, "Exponential", universe);
}
|
Object function(Argument[] arg0, Context arg1) throws ExtensionException, LogoException { LogoList params = arg0[0].getList(); List<Double> finalParams = new ArrayList<Double>(); double[] universe = SupportFunctions.LGEFormat(params, 4); finalParams.add((Double) params.first()); finalParams.add((Double) params.get(1)); finalParams.add((Double) params.get(2)); return new ExponentialSet(finalParams, true, STR, universe); }
|
/**
* This method respond to the call from Netlogo and returns the set.
*
* @param arg0
* Arguments from Netlogo call, in this case a list.
* @param arg1
* Context of Netlogo when the call was done.
* @return A new ExponentialSet.
*/
|
This method respond to the call from Netlogo and returns the set
|
report
|
{
"repo_name": "luis-r-izquierdo/netlogo-fuzzy-logic-extension",
"path": "fuzzy/src/tfg/fuzzy/primitives/creation/Exponential.java",
"license": "gpl-3.0",
"size": 1759
}
|
[
"java.util.ArrayList",
"java.util.List",
"org.nlogo.api.Argument",
"org.nlogo.api.Context",
"org.nlogo.api.ExtensionException",
"org.nlogo.api.LogoException",
"org.nlogo.core.LogoList"
] |
import java.util.ArrayList; import java.util.List; import org.nlogo.api.Argument; import org.nlogo.api.Context; import org.nlogo.api.ExtensionException; import org.nlogo.api.LogoException; import org.nlogo.core.LogoList;
|
import java.util.*; import org.nlogo.api.*; import org.nlogo.core.*;
|
[
"java.util",
"org.nlogo.api",
"org.nlogo.core"
] |
java.util; org.nlogo.api; org.nlogo.core;
| 556,745
|
public final Database getShipmentDatabase() {
return shipmentDb;
}
|
final Database function() { return shipmentDb; }
|
/**
* Return the shipment storage container.
*/
|
Return the shipment storage container
|
getShipmentDatabase
|
{
"repo_name": "mollstam/UnrealPy",
"path": "UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/db-4.7.25.0/examples_java/src/collections/ship/sentity/SampleDatabase.java",
"license": "mit",
"size": 11790
}
|
[
"com.sleepycat.db.Database"
] |
import com.sleepycat.db.Database;
|
import com.sleepycat.db.*;
|
[
"com.sleepycat.db"
] |
com.sleepycat.db;
| 1,396,100
|
BeanSupplier<T> otherwise(Supplier<T> beanSupplier);
|
BeanSupplier<T> otherwise(Supplier<T> beanSupplier);
|
/**
* Create the proxy bean via a given supplier when the condition fails.
*
* @param beanSupplier the bean supplier
* @return the bean supplier
*/
|
Create the proxy bean via a given supplier when the condition fails
|
otherwise
|
{
"repo_name": "apereo/cas",
"path": "core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/spring/beans/BeanSupplier.java",
"license": "apache-2.0",
"size": 8043
}
|
[
"java.util.function.Supplier"
] |
import java.util.function.Supplier;
|
import java.util.function.*;
|
[
"java.util"
] |
java.util;
| 1,393,313
|
public static IPackageFragmentRoot getFragmentRoot(IResource resource, IJavaProject project, IProgressMonitor monitor) throws JavaModelException {
if (monitor == null)
monitor= new NullProgressMonitor();
IJavaElement javaElem= null;
if (resource.getFullPath().equals(project.getPath()))
return project.getPackageFragmentRoot(resource);
IContainer container= resource.getParent();
do {
if (container instanceof IFolder)
javaElem= JavaCore.create((IFolder) container);
if (container.getFullPath().equals(project.getPath())) {
javaElem= project;
break;
}
container= container.getParent();
if (container == null)
return null;
} while (javaElem == null || !(javaElem instanceof IPackageFragmentRoot));
if (javaElem instanceof IJavaProject) {
if (!isSourceFolder((IJavaProject)javaElem))
return null;
javaElem= project.getPackageFragmentRoot(project.getResource());
}
return (IPackageFragmentRoot) javaElem;
}
|
static IPackageFragmentRoot function(IResource resource, IJavaProject project, IProgressMonitor monitor) throws JavaModelException { if (monitor == null) monitor= new NullProgressMonitor(); IJavaElement javaElem= null; if (resource.getFullPath().equals(project.getPath())) return project.getPackageFragmentRoot(resource); IContainer container= resource.getParent(); do { if (container instanceof IFolder) javaElem= JavaCore.create((IFolder) container); if (container.getFullPath().equals(project.getPath())) { javaElem= project; break; } container= container.getParent(); if (container == null) return null; } while (javaElem == null !(javaElem instanceof IPackageFragmentRoot)); if (javaElem instanceof IJavaProject) { if (!isSourceFolder((IJavaProject)javaElem)) return null; javaElem= project.getPackageFragmentRoot(project.getResource()); } return (IPackageFragmentRoot) javaElem; }
|
/**
* Get the source folder of a given <code>IResource</code> element,
* starting with the resource's parent.
*
* @param resource the resource to get the fragment root from
* @param project the Java project
* @param monitor progress monitor, can be <code>null</code>
* @return resolved fragment root, or <code>null</code> the resource is not (in) a source folder
* @throws JavaModelException
*/
|
Get the source folder of a given <code>IResource</code> element, starting with the resource's parent
|
getFragmentRoot
|
{
"repo_name": "brunyuriy/quick-fix-scout",
"path": "org.eclipse.jdt.ui_3.7.1.r371_v20110824-0800/src/org/eclipse/jdt/internal/corext/buildpath/ClasspathModifier.java",
"license": "mit",
"size": 58686
}
|
[
"org.eclipse.core.resources.IContainer",
"org.eclipse.core.resources.IFolder",
"org.eclipse.core.resources.IResource",
"org.eclipse.core.runtime.IProgressMonitor",
"org.eclipse.core.runtime.NullProgressMonitor",
"org.eclipse.jdt.core.IJavaElement",
"org.eclipse.jdt.core.IJavaProject",
"org.eclipse.jdt.core.IPackageFragmentRoot",
"org.eclipse.jdt.core.JavaCore",
"org.eclipse.jdt.core.JavaModelException"
] |
import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException;
|
import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*;
|
[
"org.eclipse.core",
"org.eclipse.jdt"
] |
org.eclipse.core; org.eclipse.jdt;
| 1,305,634
|
@Nonnull
@ReturnsMutableCopy
public static <ELEMENTTYPE extends Comparable <? super ELEMENTTYPE>> List <ELEMENTTYPE> getSorted (@Nullable final Iterable <? extends ELEMENTTYPE> aCont)
{
return getSortedInline (newList (aCont));
}
|
static <ELEMENTTYPE extends Comparable <? super ELEMENTTYPE>> List <ELEMENTTYPE> function (@Nullable final Iterable <? extends ELEMENTTYPE> aCont) { return getSortedInline (newList (aCont)); }
|
/**
* Convert the given iterable object to a sorted list.
*
* @param <ELEMENTTYPE>
* The type of element to iterate.
* @param aCont
* Iterable input object. May be <code>null</code>.
* @return A {@link ArrayList} based on the results of
* {@link Collections#sort(List)}.
*/
|
Convert the given iterable object to a sorted list
|
getSorted
|
{
"repo_name": "lsimons/phloc-schematron-standalone",
"path": "phloc-commons/src/main/java/com/phloc/commons/collections/ContainerHelper.java",
"license": "apache-2.0",
"size": 126718
}
|
[
"java.util.List",
"javax.annotation.Nullable"
] |
import java.util.List; import javax.annotation.Nullable;
|
import java.util.*; import javax.annotation.*;
|
[
"java.util",
"javax.annotation"
] |
java.util; javax.annotation;
| 2,364,915
|
// Get the logged in user
Package pkg = lookupPackage(loggedInUser, pid);
Map returnMap = PackageHelper.packageToMap(pkg, loggedInUser);
return returnMap;
}
|
Package pkg = lookupPackage(loggedInUser, pid); Map returnMap = PackageHelper.packageToMap(pkg, loggedInUser); return returnMap; }
|
/**
* Get Details - Retrieves the details for a given package
* @param loggedInUser The current user
* @param pid The id of the package you're looking for
* @return Returns a Map containing the details of the package
* @throws FaultException A FaultException is thrown if the errata corresponding to
* pid cannot be found.
*
* @xmlrpc.doc Retrieve details for the package with the ID.
* @xmlrpc.param #session_key()
* @xmlrpc.param #param("int", "packageId")
* @xmlrpc.returntype
* #struct("package")
* #prop("int", "id")
* #prop("string", "name")
* #prop("string", "epoch")
* #prop("string", "version")
* #prop("string", "release")
* #prop("string", "arch_label")
* #prop_array("providing_channels", "string",
* "Channel label providing this package.")
* #prop("string", "build_host")
* #prop("string", "description")
* #prop("string", "checksum")
* #prop("string", "checksum_type")
* #prop("string", "vendor")
* #prop("string", "summary")
* #prop("string", "cookie")
* #prop("string", "license")
* #prop("string", "file")
* #prop("string", "build_date")
* #prop("string", "last_modified_date")
* #prop("string", "size")
* #prop_desc("string", "path", "The path on the Satellite's file system that
* the package resides.")
* #prop("string", "payload_size")
* #struct_end()
*/
|
Get Details - Retrieves the details for a given package
|
getDetails
|
{
"repo_name": "xkollar/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/packages/PackagesHandler.java",
"license": "gpl-2.0",
"size": 20426
}
|
[
"com.redhat.rhn.domain.rhnpackage.Package",
"java.util.Map"
] |
import com.redhat.rhn.domain.rhnpackage.Package; import java.util.Map;
|
import com.redhat.rhn.domain.rhnpackage.*; import java.util.*;
|
[
"com.redhat.rhn",
"java.util"
] |
com.redhat.rhn; java.util;
| 2,204,669
|
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(TDeploymentArtifact.class)) {
case ToscaPackage.TDEPLOYMENT_ARTIFACT__ARTIFACT_REF:
case ToscaPackage.TDEPLOYMENT_ARTIFACT__ARTIFACT_TYPE:
case ToscaPackage.TDEPLOYMENT_ARTIFACT__NAME:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
|
void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(TDeploymentArtifact.class)) { case ToscaPackage.TDEPLOYMENT_ARTIFACT__ARTIFACT_REF: case ToscaPackage.TDEPLOYMENT_ARTIFACT__ARTIFACT_TYPE: case ToscaPackage.TDEPLOYMENT_ARTIFACT__NAME: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } super.notifyChanged(notification); }
|
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
|
This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>.
|
notifyChanged
|
{
"repo_name": "patrickneubauer/XMLIntellEdit",
"path": "use-cases/TOSCA/eu.artist.tosca.edit/src/tosca/provider/TDeploymentArtifactItemProvider.java",
"license": "mit",
"size": 5516
}
|
[
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification"
] |
import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification;
|
import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*;
|
[
"org.eclipse.emf"
] |
org.eclipse.emf;
| 94,089
|
@Test
public void testValidateWithBooleanCondition() throws Exception {
JsonSchema schema = loadSchemaFromClasspath("schemas/BooleanCondition.json");
assertNotNull(schema.getProperties());
JsonSubject subject = setupSubject();
// when isMultiSpecimen=true then assay is required.
subject.toJson().put("isMultiSpecimen", true);
subject.toJson().remove("assay");
// call under test
ValidationResults result = manager.validate(schema, subject);
assertNotNull(result);
assertFalse(result.getIsValid());
String stackTrace = buildStackTrack(result.getValidationException());
assertTrue(stackTrace.contains("input is invalid against the \"then\" schema"));
assertTrue(stackTrace.contains("required key [assay] not found"));
}
|
void function() throws Exception { JsonSchema schema = loadSchemaFromClasspath(STR); assertNotNull(schema.getProperties()); JsonSubject subject = setupSubject(); subject.toJson().put(STR, true); subject.toJson().remove("assay"); ValidationResults result = manager.validate(schema, subject); assertNotNull(result); assertFalse(result.getIsValid()); String stackTrace = buildStackTrack(result.getValidationException()); assertTrue(stackTrace.contains(STRthen\STR)); assertTrue(stackTrace.contains(STR)); }
|
/**
* This is a test for PLFM-6701.
*/
|
This is a test for PLFM-6701
|
testValidateWithBooleanCondition
|
{
"repo_name": "Sage-Bionetworks/Synapse-Repository-Services",
"path": "services/repository-managers/src/test/java/org/sagebionetworks/repo/manager/schema/JsonSchemaValidationManagerImplTest.java",
"license": "apache-2.0",
"size": 27169
}
|
[
"org.junit.jupiter.api.Assertions",
"org.sagebionetworks.repo.manager.schema.SchemaTestUtils",
"org.sagebionetworks.repo.model.schema.JsonSchema",
"org.sagebionetworks.repo.model.schema.ValidationResults"
] |
import org.junit.jupiter.api.Assertions; import org.sagebionetworks.repo.manager.schema.SchemaTestUtils; import org.sagebionetworks.repo.model.schema.JsonSchema; import org.sagebionetworks.repo.model.schema.ValidationResults;
|
import org.junit.jupiter.api.*; import org.sagebionetworks.repo.manager.schema.*; import org.sagebionetworks.repo.model.schema.*;
|
[
"org.junit.jupiter",
"org.sagebionetworks.repo"
] |
org.junit.jupiter; org.sagebionetworks.repo;
| 1,091,629
|
public JaxBeanInfo getGlobalType(QName name) {
return typeMap.get(name);
}
|
JaxBeanInfo function(QName name) { return typeMap.get(name); }
|
/**
* Gets the {@link JaxBeanInfo} for the given named XML Schema type.
*
* @return
* null if the type name is not recognized. For schema
* languages other than XML Schema, this method always
* returns null.
*/
|
Gets the <code>JaxBeanInfo</code> for the given named XML Schema type
|
getGlobalType
|
{
"repo_name": "JetBrains/jdk8u_jaxws",
"path": "src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java",
"license": "gpl-2.0",
"size": 40138
}
|
[
"javax.xml.namespace.QName"
] |
import javax.xml.namespace.QName;
|
import javax.xml.namespace.*;
|
[
"javax.xml"
] |
javax.xml;
| 1,558,778
|
public static List<Map<String, Object>> getFrequencyValueList(Map<String, Object> uiLabelMap) {
List<Map<String, Object>> result = new ArrayList<Map<String, Object>>(6);
result.add(UtilMisc.toMap("description", uiLabelMap.get("CommonSecond"), "value", Calendar.SECOND));
result.add(UtilMisc.toMap("description", uiLabelMap.get("CommonMinute"), "value", Calendar.MINUTE));
result.add(UtilMisc.toMap("description", uiLabelMap.get("CommonHour"), "value", Calendar.HOUR_OF_DAY));
result.add(UtilMisc.toMap("description", uiLabelMap.get("CommonDay"), "value", Calendar.DAY_OF_MONTH));
result.add(UtilMisc.toMap("description", uiLabelMap.get("CommonMonth"), "value", Calendar.MONTH));
result.add(UtilMisc.toMap("description", uiLabelMap.get("CommonYear"), "value", Calendar.YEAR));
return result;
}
|
static List<Map<String, Object>> function(Map<String, Object> uiLabelMap) { List<Map<String, Object>> result = new ArrayList<Map<String, Object>>(6); result.add(UtilMisc.toMap(STR, uiLabelMap.get(STR), "value", Calendar.SECOND)); result.add(UtilMisc.toMap(STR, uiLabelMap.get(STR), "value", Calendar.MINUTE)); result.add(UtilMisc.toMap(STR, uiLabelMap.get(STR), "value", Calendar.HOUR_OF_DAY)); result.add(UtilMisc.toMap(STR, uiLabelMap.get(STR), "value", Calendar.DAY_OF_MONTH)); result.add(UtilMisc.toMap(STR, uiLabelMap.get(STR), "value", Calendar.MONTH)); result.add(UtilMisc.toMap(STR, uiLabelMap.get(STR), "value", Calendar.YEAR)); return result; }
|
/** Returns a List of Maps containing valid Frequency values.
* @param uiLabelMap CommonUiLabels label Map
* @return List of Maps. Each Map has a
* <code>description</code> entry and a <code>value</code> entry.
*/
|
Returns a List of Maps containing valid Frequency values
|
getFrequencyValueList
|
{
"repo_name": "ofbizfriends/vogue",
"path": "framework/service/src/org/ofbiz/service/calendar/ExpressionUiHelper.java",
"license": "apache-2.0",
"size": 7636
}
|
[
"com.ibm.icu.util.Calendar",
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"org.ofbiz.base.util.UtilMisc"
] |
import com.ibm.icu.util.Calendar; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.ofbiz.base.util.UtilMisc;
|
import com.ibm.icu.util.*; import java.util.*; import org.ofbiz.base.util.*;
|
[
"com.ibm.icu",
"java.util",
"org.ofbiz.base"
] |
com.ibm.icu; java.util; org.ofbiz.base;
| 624,283
|
public void frem() throws IOException
{
f.trem();
}
|
void function() throws IOException { f.trem(); }
|
/**
* Remainder float
* <p>Stack: ..., value1, value2=>..., result
* @throws IOException
*/
|
Remainder float Stack: ..., value1, value2=>..., result
|
frem
|
{
"repo_name": "tvesalainen/bcc",
"path": "src/main/java/org/vesalainen/bcc/Assembler.java",
"license": "gpl-3.0",
"size": 53751
}
|
[
"java.io.IOException"
] |
import java.io.IOException;
|
import java.io.*;
|
[
"java.io"
] |
java.io;
| 713,275
|
@Deprecated
public @NonNull String[] getVolumePaths() {
StorageVolume[] volumes = getVolumeList();
int count = volumes.length;
String[] paths = new String[count];
for (int i = 0; i < count; i++) {
paths[i] = volumes[i].getPath();
}
return paths;
}
|
@NonNull String[] function() { StorageVolume[] volumes = getVolumeList(); int count = volumes.length; String[] paths = new String[count]; for (int i = 0; i < count; i++) { paths[i] = volumes[i].getPath(); } return paths; }
|
/**
* Returns list of paths for all mountable volumes.
* @hide
*/
|
Returns list of paths for all mountable volumes
|
getVolumePaths
|
{
"repo_name": "Ant-Droid/android_frameworks_base_OLD",
"path": "core/java/android/os/storage/StorageManager.java",
"license": "apache-2.0",
"size": 35197
}
|
[
"android.annotation.NonNull"
] |
import android.annotation.NonNull;
|
import android.annotation.*;
|
[
"android.annotation"
] |
android.annotation;
| 1,909,391
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.