method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static Locale toLocale(Locale locale) {
if (locale != null) {
String code = localeToLanguageCode(locale);
if (code != null && isValid(code)) {
return Locale.forLanguageTag(code);
}
}
return null;
} | static Locale function(Locale locale) { if (locale != null) { String code = localeToLanguageCode(locale); if (code != null && isValid(code)) { return Locale.forLanguageTag(code); } } return null; } | /**
* Returns a UMS supported {@link java.util.Locale} from the given
* <code>Local</code> if it can be found (<code>en</code> is translated to
* <code>en-US</code>, <code>zh</code> to <code>zh-Hant</code> etc.).
* Returns <code>null</code> if a valid <code>Locale</code> cannot be found.
* @param locale Sourc... | Returns a UMS supported <code>java.util.Locale</code> from the given <code>Local</code> if it can be found (<code>en</code> is translated to <code>en-US</code>, <code>zh</code> to <code>zh-Hant</code> etc.). Returns <code>null</code> if a valid <code>Locale</code> cannot be found | toLocale | {
"repo_name": "mindwarper/UniversalMediaServer",
"path": "src/main/java/net/pms/util/Languages.java",
"license": "gpl-2.0",
"size": 8858
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 1,296,144 |
public List<T> list() {
List<T> list = new ArrayList<T>();
SQLiteDatabase db = dbHelper.getReadableDatabase();
Cursor cursor = null;
try {
cursor = db.query(table, null, null, null, null, null, null);
while (cursor.moveToNext()) {
list.add(newInstance(cursor));
}
} catch (SQLiteExce... | List<T> function() { List<T> list = new ArrayList<T>(); SQLiteDatabase db = dbHelper.getReadableDatabase(); Cursor cursor = null; try { cursor = db.query(table, null, null, null, null, null, null); while (cursor.moveToNext()) { list.add(newInstance(cursor)); } } catch (SQLiteException e) { e.printStackTrace(); } finall... | /**
* List all of the objects in the table.
*
* @return A {@link java.util.List} of objects typed T. If there is no
* records in the table, a List of size 0 will be returned.
*/ | List all of the objects in the table | list | {
"repo_name": "Steven-Luo/AnnotationDao",
"path": "AnnotationDao_src/src/com/cn/naive/library/dao/AbstractDao.java",
"license": "apache-2.0",
"size": 12940
} | [
"android.database.Cursor",
"android.database.sqlite.SQLiteDatabase",
"android.database.sqlite.SQLiteException",
"java.util.ArrayList",
"java.util.List"
] | import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteException; import java.util.ArrayList; import java.util.List; | import android.database.*; import android.database.sqlite.*; import java.util.*; | [
"android.database",
"java.util"
] | android.database; java.util; | 1,058,802 |
private void awaitStopped(long time, TimeUnit unit) throws InterruptedException {
assertTrue(terminalLatch.await(time, unit));
} | void function(long time, TimeUnit unit) throws InterruptedException { assertTrue(terminalLatch.await(time, unit)); } | /**
* Wait for the service to reach a terminal state without calling stop.
*/ | Wait for the service to reach a terminal state without calling stop | awaitStopped | {
"repo_name": "cmelchior/caliper",
"path": "old/caliper/test/java/com/google/caliper/runner/StreamServiceTest.java",
"license": "apache-2.0",
"size": 9475
} | [
"java.util.concurrent.TimeUnit",
"org.junit.Assert"
] | import java.util.concurrent.TimeUnit; import org.junit.Assert; | import java.util.concurrent.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 413,370 |
public void commitTransaction() throws DatabaseException;
| void function() throws DatabaseException; | /**
* Commits all the database operation since {@link #beginTransaction()} is invoked.
* @throws DatabaseException
*/ | Commits all the database operation since <code>#beginTransaction()</code> is invoked | commitTransaction | {
"repo_name": "ivanceras/orm",
"path": "src/main/java/com/ivanceras/db/api/IDatabase.java",
"license": "apache-2.0",
"size": 7952
} | [
"com.ivanceras.db.shared.exception.DatabaseException"
] | import com.ivanceras.db.shared.exception.DatabaseException; | import com.ivanceras.db.shared.exception.*; | [
"com.ivanceras.db"
] | com.ivanceras.db; | 2,278,275 |
public void startEntity(String name,
XMLResourceIdentifier identifier,
String encoding, Augmentations augs) throws XNIException {
// keep track of this entity before fEntityDepth is increased
if (fEntityDepth == fEntityStack.length) {
... | void function(String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs) throws XNIException { if (fEntityDepth == fEntityStack.length) { int[] entityarray = new int[fEntityStack.length * 2]; System.arraycopy(fEntityStack, 0, entityarray, 0, fEntityStack.length); fEntityStack = entityarray; } f... | /**
* This method notifies of the start of an entity. The DTD has the
* pseudo-name of "[dtd]" parameter entity names start with '%'; and
* general entities are just specified by their name.
*
* @param name The name of the entity.
* @param identifier The resource identifier.
* @p... | This method notifies of the start of an entity. The DTD has the pseudo-name of "[dtd]" parameter entity names start with '%'; and general entities are just specified by their name | startEntity | {
"repo_name": "ronsigal/xerces",
"path": "src/org/apache/xerces/impl/XMLDocumentFragmentScannerImpl.java",
"license": "apache-2.0",
"size": 69892
} | [
"org.apache.xerces.xni.Augmentations",
"org.apache.xerces.xni.XMLResourceIdentifier",
"org.apache.xerces.xni.XNIException"
] | import org.apache.xerces.xni.Augmentations; import org.apache.xerces.xni.XMLResourceIdentifier; import org.apache.xerces.xni.XNIException; | import org.apache.xerces.xni.*; | [
"org.apache.xerces"
] | org.apache.xerces; | 1,309,502 |
public boolean isModified() {
String oldValue = PreferenceManager.getString(key, defaultValue);
String newValue = (String) combo.getSelectedItem();
return !oldValue.equals(newValue);
} | boolean function() { String oldValue = PreferenceManager.getString(key, defaultValue); String newValue = (String) combo.getSelectedItem(); return !oldValue.equals(newValue); } | /**
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*/ | DOCUMENT ME | isModified | {
"repo_name": "tonivade/tedit",
"path": "src/tk/tomby/tedit/gui/editors/FontEditor.java",
"license": "gpl-2.0",
"size": 4396
} | [
"tk.tomby.tedit.services.PreferenceManager"
] | import tk.tomby.tedit.services.PreferenceManager; | import tk.tomby.tedit.services.*; | [
"tk.tomby.tedit"
] | tk.tomby.tedit; | 256,767 |
//@Test
public void dateString() {
try {
Expression expression = getExpressionWithFunctionContext("date_str(date_parse(123456789), DATE_MEDIUM, DATE_SHOW_DATE_AND_TIME)");
assertEquals(ExpressionType.STRING, expression.getExpressionType());
assertEquals("Jan 2, 1970 11:17:36 AM", expression.evaluateNomin... | try { Expression expression = getExpressionWithFunctionContext(STR); assertEquals(ExpressionType.STRING, expression.getExpressionType()); assertEquals(STR, expression.evaluateNominal()); } catch (ExpressionException e) { fail(e.getMessage()); } } | /**
* DateString tests
*/ | DateString tests | dateString | {
"repo_name": "transwarpio/rapidminer",
"path": "rapidMiner/rapidminer-studio-core/src/test/java/com/rapidminer/tools/expression/internal/function/AntlrParserConversionTest.java",
"license": "gpl-3.0",
"size": 34902
} | [
"com.rapidminer.tools.expression.Expression",
"com.rapidminer.tools.expression.ExpressionException",
"com.rapidminer.tools.expression.ExpressionType",
"org.junit.Assert"
] | import com.rapidminer.tools.expression.Expression; import com.rapidminer.tools.expression.ExpressionException; import com.rapidminer.tools.expression.ExpressionType; import org.junit.Assert; | import com.rapidminer.tools.expression.*; import org.junit.*; | [
"com.rapidminer.tools",
"org.junit"
] | com.rapidminer.tools; org.junit; | 2,746,077 |
public static Map<String, List<String>> getSupervisorHostIdMapping(ClusterSummary summary) {
Map<String, List<String>> result = new HashMap<String, List<String>>();
List<SupervisorSummary> supervisors = summary.get_supervisors();
for (int s = 0; s < summary.get_supervisors_size(); s++) {
... | static Map<String, List<String>> function(ClusterSummary summary) { Map<String, List<String>> result = new HashMap<String, List<String>>(); List<SupervisorSummary> supervisors = summary.get_supervisors(); for (int s = 0; s < summary.get_supervisors_size(); s++) { SupervisorSummary supervisor = supervisors.get(s); Strin... | /**
* Returns the mapping of supervisor host names to supervisor ids.
*
* @param summary the cluster summary
* @return the mapping (a host may run multiple supervisors and then we return them in the sequence given
* by thrift)
*/ | Returns the mapping of supervisor host names to supervisor ids | getSupervisorHostIdMapping | {
"repo_name": "QualiMaster/Infrastructure",
"path": "StormCommons/src/eu/qualimaster/common/signal/ThriftConnection.java",
"license": "apache-2.0",
"size": 14564
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 487,817 |
@Test(expected = NumberFormatException.class)
public void testConvertWithText() throws Exception {
getConverter().convert("foo");
} | @Test(expected = NumberFormatException.class) void function() throws Exception { getConverter().convert("foo"); } | /**
* Tests that converting an arbitrary text throws a NumberFormatException.
* @throws NumberFormatException Expected exception that's thrown if the test case is successful.
* @throws Exception In case of unexpected errors.
*/ | Tests that converting an arbitrary text throws a NumberFormatException | testConvertWithText | {
"repo_name": "christianhujer/japi",
"path": "historic2/src/test/net/sf/japi/io/args/converter/IntegerConverterTest.java",
"license": "lgpl-3.0",
"size": 3855
} | [
"org.junit.Test"
] | import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,571,552 |
public Date getLastModified(); | Date function(); | /**
* Returns the last modified.
*
* @return the last modified
*/ | Returns the last modified | getLastModified | {
"repo_name": "WestCoastInformatics/ihtsdo-refset-tool",
"path": "model/src/main/java/org/ihtsdo/otf/refset/helpers/HasLastModified.java",
"license": "apache-2.0",
"size": 769
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,753,406 |
public Any get_any()
throws TypeMismatch, InvalidValue
{
return focused().get_any();
} | Any function() throws TypeMismatch, InvalidValue { return focused().get_any(); } | /**
* Return the second (enclosed any) that is stored in the wrapped Any.
*/ | Return the second (enclosed any) that is stored in the wrapped Any | get_any | {
"repo_name": "SanDisk-Open-Source/SSD_Dashboard",
"path": "uefi/gcc/gcc-4.6.3/libjava/classpath/gnu/CORBA/DynAn/DivideableAny.java",
"license": "gpl-2.0",
"size": 12656
} | [
"org.omg.CORBA",
"org.omg.DynamicAny"
] | import org.omg.CORBA; import org.omg.DynamicAny; | import org.omg.*; | [
"org.omg"
] | org.omg; | 959,671 |
@SuppressWarnings("unchecked")
private Map<String, Object> fromJson(String json)
{
Map<String, Object> map = (HashMap<String, Object>) gson.fromJson(json, HashMap.class);
return map;
} | @SuppressWarnings(STR) Map<String, Object> function(String json) { Map<String, Object> map = (HashMap<String, Object>) gson.fromJson(json, HashMap.class); return map; } | /**
* Helper to convert Json to map for quick testing of values
*/ | Helper to convert Json to map for quick testing of values | fromJson | {
"repo_name": "AlfrescoBenchmark/alfresco-benchmark",
"path": "server/src/test/java/org/alfresco/bm/api/v1/RestAPITest.java",
"license": "lgpl-3.0",
"size": 52929
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,203,296 |
public BufferedImage getImage()
{
return getImage(false);
} | BufferedImage function() { return getImage(false); } | /**
* Returns an image of this Sprite.
*
* @param trans Whether color 0 should be transparent
* @return A BufferedImage of what this Sprite looks like.
* @see #setImage(BufferedImage)
*/ | Returns an image of this Sprite | getImage | {
"repo_name": "dperelman/jhack",
"path": "src/net/starmen/pkhack/eb/SpriteEditor.java",
"license": "gpl-3.0",
"size": 53554
} | [
"java.awt.image.BufferedImage"
] | import java.awt.image.BufferedImage; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 710,935 |
private boolean skipCellVersion(Cell cell) {
return skipColumn != null
&& CellUtil.matchingRow(cell, skipColumn.getRowArray(), skipColumn.getRowOffset(),
skipColumn.getRowLength())
&& CellUtil.matchingFamily(cell, skipColumn.getFamilyArray(), skipColumn.getFamilyOffset(),... | boolean function(Cell cell) { return skipColumn != null && CellUtil.matchingRow(cell, skipColumn.getRowArray(), skipColumn.getRowOffset(), skipColumn.getRowLength()) && CellUtil.matchingFamily(cell, skipColumn.getFamilyArray(), skipColumn.getFamilyOffset(), skipColumn.getFamilyLength()) && CellUtil.matchingQualifier(ce... | /**
* Determines whether the current cell should be skipped. The cell will be skipped
* if the previous keyvalue had the same key as the current cell. This means filter already responded
* for the previous keyvalue with ReturnCode.NEXT_COL or ReturnCode.INCLUDE_AND_NEXT_COL.
* @param cell the {@link Cell} t... | Determines whether the current cell should be skipped. The cell will be skipped if the previous keyvalue had the same key as the current cell. This means filter already responded for the previous keyvalue with ReturnCode.NEXT_COL or ReturnCode.INCLUDE_AND_NEXT_COL | skipCellVersion | {
"repo_name": "cdapio/tephra",
"path": "tephra-hbase-compat-1.0-cdh/src/main/java/co/cask/tephra/hbase10cdh/coprocessor/CellSkipFilter.java",
"license": "apache-2.0",
"size": 4910
} | [
"org.apache.hadoop.hbase.Cell",
"org.apache.hadoop.hbase.CellUtil"
] | import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellUtil; | import org.apache.hadoop.hbase.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,293,664 |
@Override
protected void init() {
super.init();
setPreferredSize(new Dimension(JSS_HANDLE_SIZE, JSS_HANDLE_SIZE));
// Initialize the color only once
if (JSS_OVERLAP_COLOR == null) {
float baseColor = new Float(Math.tan(Math.toRadians(120.0)));
JSS_OVERLAP_COLOR = CreateColor(baseColor);
baseColor =... | void function() { super.init(); setPreferredSize(new Dimension(JSS_HANDLE_SIZE, JSS_HANDLE_SIZE)); if (JSS_OVERLAP_COLOR == null) { float baseColor = new Float(Math.tan(Math.toRadians(120.0))); JSS_OVERLAP_COLOR = CreateColor(baseColor); baseColor = new Float(Math.tan(Math.toRadians(0.0))); JSS_COVER_COLOR = CreateColo... | /**
* Initializes the handle.
*/ | Initializes the handle | init | {
"repo_name": "OpenSoftwareSolutions/PDFReporter-Studio",
"path": "com.jaspersoft.studio/src/com/jaspersoft/studio/editor/gef/selection/ColoredSquareHandles.java",
"license": "lgpl-3.0",
"size": 7433
} | [
"java.awt.Color",
"org.eclipse.draw2d.geometry.Dimension"
] | import java.awt.Color; import org.eclipse.draw2d.geometry.Dimension; | import java.awt.*; import org.eclipse.draw2d.geometry.*; | [
"java.awt",
"org.eclipse.draw2d"
] | java.awt; org.eclipse.draw2d; | 1,520,802 |
public void collect(Collection<T> collection) {
Collector visitor = new Collector(collection);
visitFwd(visitor);
}
| void function(Collection<T> collection) { Collector visitor = new Collector(collection); visitFwd(visitor); } | /**
* Add all elements to collection.
* @param collection target
*/ | Add all elements to collection | collect | {
"repo_name": "bobfoster/keyedset",
"path": "src/main/java/org/genantics/set/KeyedSet.java",
"license": "mit",
"size": 30729
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,167,101 |
public Point getAnalogDisplacement( int xLocation, int yLocation )
{
if( analogBackImage == null )
return new Point( 0, 0 );
// Distance from center along x-axis
int dX = xLocation - ( analogBackImage.x + (int) ( analogBackImage.hWidth * scale ) );
/... | Point function( int xLocation, int yLocation ) { if( analogBackImage == null ) return new Point( 0, 0 ); int dX = xLocation - ( analogBackImage.x + (int) ( analogBackImage.hWidth * scale ) ); int dY = yLocation - ( analogBackImage.y + (int) ( analogBackImage.hHeight * scale ) ); return new Point( dX, dY ); } | /**
* Gets the N64 analog stick displacement.
*
* @param xLocation The x-coordinate of the touch, in pixels.
* @param yLocation The y-coordinate of the touch, in pixels.
*
* @return The analog displacement, in pixels.
*/ | Gets the N64 analog stick displacement | getAnalogDisplacement | {
"repo_name": "paulscode/mupen64plus-ae",
"path": "src/paulscode/android/mupen64plusae/input/map/TouchMap.java",
"license": "gpl-3.0",
"size": 18631
} | [
"android.graphics.Point"
] | import android.graphics.Point; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 847,444 |
public void updateClusterGroupsFromGossiper() {
long highestVersionSeen = this.clusterService.state().metaData().version();
for (Entry<InetAddress, EndpointState> entry : Gossiper.instance.getEndpointStates()) {
EndpointState state = entry.getValue();
InetAddress e... | void function() { long highestVersionSeen = this.clusterService.state().metaData().version(); for (Entry<InetAddress, EndpointState> entry : Gossiper.instance.getEndpointStates()) { EndpointState state = entry.getValue(); InetAddress endpoint = entry.getKey(); if (!state.getStatus().equals(VersionedValue.STATUS_NORMAL)... | /**
* Update cluster group members from cassandra topology (should only be triggered by IEndpointStateChangeSubscriber events).
* This should trigger re-sharding of index for new nodes (when token distribution change).
*/ | Update cluster group members from cassandra topology (should only be triggered by IEndpointStateChangeSubscriber events). This should trigger re-sharding of index for new nodes (when token distribution change) | updateClusterGroupsFromGossiper | {
"repo_name": "strapdata/elassandra5-rc",
"path": "core/src/main/java/org/elassandra/discovery/CassandraDiscovery.java",
"license": "apache-2.0",
"size": 44177
} | [
"java.io.IOException",
"java.net.InetAddress",
"java.util.Map",
"org.apache.cassandra.concurrent.Stage",
"org.apache.cassandra.concurrent.StageManager",
"org.apache.cassandra.db.SystemKeyspace",
"org.apache.cassandra.gms.ApplicationState",
"org.apache.cassandra.gms.EndpointState",
"org.apache.cassan... | import java.io.IOException; import java.net.InetAddress; import java.util.Map; import org.apache.cassandra.concurrent.Stage; import org.apache.cassandra.concurrent.StageManager; import org.apache.cassandra.db.SystemKeyspace; import org.apache.cassandra.gms.ApplicationState; import org.apache.cassandra.gms.EndpointState... | import java.io.*; import java.net.*; import java.util.*; import org.apache.cassandra.concurrent.*; import org.apache.cassandra.db.*; import org.apache.cassandra.gms.*; import org.apache.cassandra.service.*; import org.elasticsearch.cluster.node.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.com... | [
"java.io",
"java.net",
"java.util",
"org.apache.cassandra",
"org.elasticsearch.cluster",
"org.elasticsearch.common"
] | java.io; java.net; java.util; org.apache.cassandra; org.elasticsearch.cluster; org.elasticsearch.common; | 552,389 |
public static void enable() {
manager = new PermissionsDependency();
final PluginManager pluginManager = Mythr.plugin().getServer().getPluginManager();
Plugin plugin = null;
// Commands map:
manager.commandMap = new CommandsManager<Player>() { | static void function() { manager = new PermissionsDependency(); final PluginManager pluginManager = Mythr.plugin().getServer().getPluginManager(); Plugin plugin = null; manager.commandMap = new CommandsManager<Player>() { | /**
* Enables the manager.
*
*/ | Enables the manager | enable | {
"repo_name": "andfRa/Mythr",
"path": "src/org/andfRa/mythr/dependencies/PermissionsDependency.java",
"license": "gpl-3.0",
"size": 4034
} | [
"org.bukkit.entity.Player",
"org.bukkit.plugin.Plugin",
"org.bukkit.plugin.PluginManager",
"org.sk89q.CommandsManager"
] | import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.PluginManager; import org.sk89q.CommandsManager; | import org.bukkit.entity.*; import org.bukkit.plugin.*; import org.sk89q.*; | [
"org.bukkit.entity",
"org.bukkit.plugin",
"org.sk89q"
] | org.bukkit.entity; org.bukkit.plugin; org.sk89q; | 967,120 |
EReference getODExposedEntityType_EntityType();
| EReference getODExposedEntityType_EntityType(); | /**
* Returns the meta object for the reference '{@link edm.ODExposedEntityType#getEntityType <em>Entity Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Entity Type</em>'.
* @see edm.ODExposedEntityType#getEntityType()
* @see #getODExpose... | Returns the meta object for the reference '<code>edm.ODExposedEntityType#getEntityType Entity Type</code>'. | getODExposedEntityType_EntityType | {
"repo_name": "SOM-Research/odata-generator",
"path": "metamodel/som.odata.metamodel/src/edm/EdmPackage.java",
"license": "epl-1.0",
"size": 93631
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,599,372 |
@Override
protected void onPostExecute(BitmapDrawable value) {
//BEGIN_INCLUDE(complete_background_work)
// if cancel was called on this task or the "exit early" flag is set then we're done
if (isCancelled() || mExitTasksEarly) {
value = null;
... | void function(BitmapDrawable value) { if (isCancelled() mExitTasksEarly) { value = null; } final ImageView imageView = getAttachedImageView(); if (value != null && imageView != null) { if (BuildConfig.DEBUG) { Log.d(TAG, STR); } setImageDrawable(imageView, value); } } | /**
* Once the image is processed, associates it to the imageView
*/ | Once the image is processed, associates it to the imageView | onPostExecute | {
"repo_name": "cf0566/CarMarket",
"path": "src/com/easemob/chatuidemo/video/util/ImageWorker.java",
"license": "apache-2.0",
"size": 16946
} | [
"android.graphics.drawable.BitmapDrawable",
"android.util.Log",
"android.widget.ImageView",
"com.cpic.carmarket.BuildConfig"
] | import android.graphics.drawable.BitmapDrawable; import android.util.Log; import android.widget.ImageView; import com.cpic.carmarket.BuildConfig; | import android.graphics.drawable.*; import android.util.*; import android.widget.*; import com.cpic.carmarket.*; | [
"android.graphics",
"android.util",
"android.widget",
"com.cpic.carmarket"
] | android.graphics; android.util; android.widget; com.cpic.carmarket; | 583,630 |
public void init(Object arg1,
Object arg2,
Object arg3,
Object arg4,
Object arg5,
Object arg6,
Object arg7,
Object arg8,
Object arg9,
Object arg10,
Object arg11,
Object arg12) throws StandardException
{
if (SanityManager.DEBUG)
{
SanityManager... | void function(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12) throws StandardException { if (SanityManager.DEBUG) { SanityManager.THROWASSERT(STR + getClass().getName()); } } | /**
* Initialize a query tree node.
*
* @exception StandardException Thrown on error
*/ | Initialize a query tree node | init | {
"repo_name": "kavin256/Derby",
"path": "java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java",
"license": "apache-2.0",
"size": 52644
} | [
"org.apache.derby.iapi.error.StandardException",
"org.apache.derby.iapi.services.sanity.SanityManager"
] | import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.services.sanity.SanityManager; | import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.services.sanity.*; | [
"org.apache.derby"
] | org.apache.derby; | 984,123 |
void setPersistenceSnapshotWeight(float weight) throws RemoteException;
| void setPersistenceSnapshotWeight(float weight) throws RemoteException; | /**
* Change the weight factor applied by the lookup discovery service
* to the snapshot size during the test to determine whether or not
* to take a "snapshot" of the system state.
*
* @param weight weight factor for snapshot size
*
* @throws java.rmi.RemoteException typicall... | Change the weight factor applied by the lookup discovery service to the snapshot size during the test to determine whether or not to take a "snapshot" of the system state | setPersistenceSnapshotWeight | {
"repo_name": "pfirmstone/river-internet",
"path": "JGDMS/jgdms-lib-dl/src/main/java/org/apache/river/admin/FiddlerAdmin.java",
"license": "apache-2.0",
"size": 11654
} | [
"java.rmi.RemoteException"
] | import java.rmi.RemoteException; | import java.rmi.*; | [
"java.rmi"
] | java.rmi; | 698,484 |
static public String getDateToString(Date date) {
if (date == null)
return "";
else {
SimpleDateFormat f = new SimpleDateFormat();
f.setLenient(false);
return f.format(date);
}
}
| static String function(Date date) { if (date == null) return ""; else { SimpleDateFormat f = new SimpleDateFormat(); f.setLenient(false); return f.format(date); } } | /**
* Devuelve la fecha en formato dd/MM/yyyy.
* @return String
*/ | Devuelve la fecha en formato dd/MM/yyyy | getDateToString | {
"repo_name": "rranz/meccano4j_vaadin",
"path": "javalego/javalego_util/src/main/java/com/javalego/util/DateUtils.java",
"license": "gpl-3.0",
"size": 47778
} | [
"java.text.SimpleDateFormat",
"java.util.Date"
] | import java.text.SimpleDateFormat; import java.util.Date; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 2,546,803 |
public Set<Group> memberships(String memberId) {
ImmutableSet.Builder<Group> set = ImmutableSet.<Group>builder();
try {
Authorizable a = session.getUserManager().getAuthorizable(memberId);
Iterator<Group> iter = a.declaredMemberOf();
while (iter.hasNext()) {
set.add(iter.next());
... | Set<Group> function(String memberId) { ImmutableSet.Builder<Group> set = ImmutableSet.<Group>builder(); try { Authorizable a = session.getUserManager().getAuthorizable(memberId); Iterator<Group> iter = a.declaredMemberOf(); while (iter.hasNext()) { set.add(iter.next()); } } catch (RepositoryException e) { throw new Run... | /**
* Get groups to which this authorizable ID belongs. Most often used to find
* groups for a particular user.
*
* @param memberId
* @return Set of Groups
*/ | Get groups to which this authorizable ID belongs. Most often used to find groups for a particular user | memberships | {
"repo_name": "uq-eresearch/aorra",
"path": "app/models/GroupManager.java",
"license": "mit",
"size": 4452
} | [
"com.google.common.collect.ImmutableSet",
"java.util.Iterator",
"java.util.Set",
"javax.jcr.RepositoryException",
"org.apache.jackrabbit.api.security.user.Authorizable",
"org.apache.jackrabbit.api.security.user.Group"
] | import com.google.common.collect.ImmutableSet; import java.util.Iterator; import java.util.Set; import javax.jcr.RepositoryException; import org.apache.jackrabbit.api.security.user.Authorizable; import org.apache.jackrabbit.api.security.user.Group; | import com.google.common.collect.*; import java.util.*; import javax.jcr.*; import org.apache.jackrabbit.api.security.user.*; | [
"com.google.common",
"java.util",
"javax.jcr",
"org.apache.jackrabbit"
] | com.google.common; java.util; javax.jcr; org.apache.jackrabbit; | 2,593,413 |
public void setIdentityEventService(IdentityEventService identityEventService) {
this.identityEventService = identityEventService;
} | void function(IdentityEventService identityEventService) { this.identityEventService = identityEventService; } | /**
* Set instance of IdentityEventService.
*
* @param identityEventService Instance of IdentityEventService.
*/ | Set instance of IdentityEventService | setIdentityEventService | {
"repo_name": "wso2/carbon-identity-framework",
"path": "components/role-mgt/org.wso2.carbon.identity.role.mgt.core/src/main/java/org/wso2/carbon/identity/role/mgt/core/internal/RoleManagementServiceComponentHolder.java",
"license": "apache-2.0",
"size": 2108
} | [
"org.wso2.carbon.identity.event.services.IdentityEventService"
] | import org.wso2.carbon.identity.event.services.IdentityEventService; | import org.wso2.carbon.identity.event.services.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 786,902 |
public static IntValuedEnum<LiblasLibrary.LASError > LASVLR_SetRecordLength(LiblasLibrary.LASVLRH hVLR, short value) {
return FlagSet.fromValue(LASVLR_SetRecordLength(Pointer.getPeer(hVLR), value), LiblasLibrary.LASError.class);
} | static IntValuedEnum<LiblasLibrary.LASError > function(LiblasLibrary.LASVLRH hVLR, short value) { return FlagSet.fromValue(LASVLR_SetRecordLength(Pointer.getPeer(hVLR), value), LiblasLibrary.LASError.class); } | /**
* Sets the record length of the data stored in the VLR<br>
* @param hVLR the LASVLRH instance<br>
* @param value the length to set for the VLR data length<br>
* @return LASErrorEnum<br>
* Original signature : <code>LASError LASVLR_SetRecordLength(LASVLRH, unsigned short)</code><br>
* <i>native declar... | Sets the record length of the data stored in the VLR | LASVLR_SetRecordLength | {
"repo_name": "petvana/las-bridj",
"path": "src/main/java/com/github/petvana/liblas/jna/LiblasLibrary.java",
"license": "bsd-3-clause",
"size": 116212
} | [
"org.bridj.FlagSet",
"org.bridj.IntValuedEnum",
"org.bridj.Pointer"
] | import org.bridj.FlagSet; import org.bridj.IntValuedEnum; import org.bridj.Pointer; | import org.bridj.*; | [
"org.bridj"
] | org.bridj; | 1,558,149 |
public Replicant createReplicant(DSBitSet prefix,
DSBitSet owner)
throws AuraException, RemoteException; | Replicant function(DSBitSet prefix, DSBitSet owner) throws AuraException, RemoteException; | /**
* Creates a fully functional new replicant. The replicant will be
* returned once the process has started and is ready. It will be for
* use within a cluster with the given prefix.
*
* @param prefix the prefix of the cluster this replicant will be used with
* @param owner prefix of ... | Creates a fully functional new replicant. The replicant will be returned once the process has started and is ready. It will be for use within a cluster with the given prefix | createReplicant | {
"repo_name": "SunLabsAST/AURA",
"path": "aura/src/com/sun/labs/aura/datastore/impl/ProcessManager.java",
"license": "gpl-2.0",
"size": 3815
} | [
"com.sun.labs.aura.util.AuraException",
"java.rmi.RemoteException"
] | import com.sun.labs.aura.util.AuraException; import java.rmi.RemoteException; | import com.sun.labs.aura.util.*; import java.rmi.*; | [
"com.sun.labs",
"java.rmi"
] | com.sun.labs; java.rmi; | 1,100,548 |
InputStream inputStream;
Path pathUserProperties;
Path pathToolProperties;
Path pathModel;
try {
IntegrationTestSuite.printTestCategoryHeader("ExecContextManagerTool");
IntegrationTestSuite.resetTestWorkspace();
// ####################################################################... | InputStream inputStream; Path pathUserProperties; Path pathToolProperties; Path pathModel; try { IntegrationTestSuite.printTestCategoryHeader(STR); IntegrationTestSuite.resetTestWorkspace(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {}); } catch (Exception e) { Integratio... | /*********************************************************************************
* Tests ExecContextManagerTool.
*********************************************************************************/ | Tests ExecContextManagerTool | testExecContextManagerTool | {
"repo_name": "azyva/dragom-cli-tools",
"path": "dragom-cli-tools/src/test/java/org/azyva/dragom/test/integration/IntegrationTestSuiteExecContextManagerTool.java",
"license": "agpl-3.0",
"size": 23711
} | [
"java.io.IOException",
"java.io.InputStream",
"java.nio.file.Files",
"java.nio.file.Path",
"java.nio.file.StandardCopyOption",
"org.azyva.dragom.tool.ExecContextManagerTool"
] | import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.StandardCopyOption; import org.azyva.dragom.tool.ExecContextManagerTool; | import java.io.*; import java.nio.file.*; import org.azyva.dragom.tool.*; | [
"java.io",
"java.nio",
"org.azyva.dragom"
] | java.io; java.nio; org.azyva.dragom; | 1,311,216 |
public KpiResourceFormatInner withEntityType(EntityTypes entityType) {
this.entityType = entityType;
return this;
} | KpiResourceFormatInner function(EntityTypes entityType) { this.entityType = entityType; return this; } | /**
* Set the entityType value.
*
* @param entityType the entityType value to set
* @return the KpiResourceFormatInner object itself.
*/ | Set the entityType value | withEntityType | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/KpiResourceFormatInner.java",
"license": "mit",
"size": 12464
} | [
"com.microsoft.azure.management.customerinsights.EntityTypes"
] | import com.microsoft.azure.management.customerinsights.EntityTypes; | import com.microsoft.azure.management.customerinsights.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 1,028,377 |
public char[] getCharValues() throws TypeMismatchException; | char[] function() throws TypeMismatchException; | /**
* Gets the values of this object as a {@code char} value.
*
* @return the values of this object as a {@code char} array; or an empty
* array if this object has no value.
* @throws TypeMismatchException
* if the type of this object is not {@link Type#CHAR}.
*/ | Gets the values of this object as a char value | getCharValues | {
"repo_name": "Haixing-Hu/commons",
"path": "src/main/java/com/github/haixing_hu/util/value/MultiValues.java",
"license": "apache-2.0",
"size": 81305
} | [
"com.github.haixing_hu.lang.TypeMismatchException"
] | import com.github.haixing_hu.lang.TypeMismatchException; | import com.github.haixing_hu.lang.*; | [
"com.github.haixing_hu"
] | com.github.haixing_hu; | 2,409,755 |
public synchronized Instant getSynchronizedProcessingOutputTime() {
latestSynchronizedOutputWm = INSTANT_ORDERING.max(
latestSynchronizedOutputWm,
INSTANT_ORDERING.min(clock.now(), synchronizedProcessingOutputWatermark.get()));
return latestSynchronizedOutputWm;
} | synchronized Instant function() { latestSynchronizedOutputWm = INSTANT_ORDERING.max( latestSynchronizedOutputWm, INSTANT_ORDERING.min(clock.now(), synchronizedProcessingOutputWatermark.get())); return latestSynchronizedOutputWm; } | /**
* Returns the synchronized processing output time of the {@link AppliedPTransform}.
*
* <p>The returned value is guaranteed to be monotonically increasing, and outside of the
* presence of holds, will increase as the system time progresses.
*/ | Returns the synchronized processing output time of the <code>AppliedPTransform</code>. The returned value is guaranteed to be monotonically increasing, and outside of the presence of holds, will increase as the system time progresses | getSynchronizedProcessingOutputTime | {
"repo_name": "shakamunyi/beam",
"path": "runners/direct-java/src/main/java/org/apache/beam/runners/direct/InMemoryWatermarkManager.java",
"license": "apache-2.0",
"size": 55449
} | [
"org.joda.time.Instant"
] | import org.joda.time.Instant; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 2,605,321 |
public static double calcAccurateMonthAge(Date birthDate) {
Calendar cur = GregorianCalendar.getInstance();
double curTime = (double) cur.get(Calendar.YEAR) * 12d + (double) cur.get(Calendar.MONTH) + (double) (cur.get(Calendar.DAY_OF_MONTH) - 1) / (double) cur.getActualMaximum(Calendar.DAY_OF_MONTH)... | static double function(Date birthDate) { Calendar cur = GregorianCalendar.getInstance(); double curTime = (double) cur.get(Calendar.YEAR) * 12d + (double) cur.get(Calendar.MONTH) + (double) (cur.get(Calendar.DAY_OF_MONTH) - 1) / (double) cur.getActualMaximum(Calendar.DAY_OF_MONTH); Calendar birth = GregorianCalendar.ge... | /**
* Wylicza dokladny wiek w miesiacach, od urodzenia do teraz
*
* @param birthDate data narodzin
* @return wiek podany w double
*/ | Wylicza dokladny wiek w miesiacach, od urodzenia do teraz | calcAccurateMonthAge | {
"repo_name": "Semantive/hiqual",
"path": "src/main/java/com/semantive/commons/SemantiveDateTimeUtils.java",
"license": "apache-2.0",
"size": 3710
} | [
"java.util.Calendar",
"java.util.Date",
"java.util.GregorianCalendar"
] | import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; | import java.util.*; | [
"java.util"
] | java.util; | 99,986 |
private static void handleEvent(Object listener, Object event) {
RxAnnotatedHandlerFinder.handleEvent(listener, event);
}
/**
* It will retrieve an {@link ObserverWrapper} of the object passed by parameter
* This method store the wrapper inside an internal cache.
* It should be used ... | static void function(Object listener, Object event) { RxAnnotatedHandlerFinder.handleEvent(listener, event); } /** * It will retrieve an {@link ObserverWrapper} of the object passed by parameter * This method store the wrapper inside an internal cache. * It should be used in pair with {@code RxEventProcessor.removeWrap... | /**
* This method is used to call the event on listener, it use reflection to know what method call on listener object.
*
* @param listener
* @param event
*/ | This method is used to call the event on listener, it use reflection to know what method call on listener object | handleEvent | {
"repo_name": "SysdataItaliaSpA/EventDispatcher",
"path": "baseandroid-rxeventdispatcher/src/main/java/com/baseandroid/events/rx/RxEventProcessor.java",
"license": "apache-2.0",
"size": 11155
} | [
"com.baseandroid.events.rx.annotations.RxAnnotatedHandlerFinder"
] | import com.baseandroid.events.rx.annotations.RxAnnotatedHandlerFinder; | import com.baseandroid.events.rx.annotations.*; | [
"com.baseandroid.events"
] | com.baseandroid.events; | 1,323,465 |
@Column(name = "description", length = 1024)
public String getDescription(); | @Column(name = STR, length = 1024) String function(); | /**
* Getter for <code>cattle.user_preference.description</code>.
*/ | Getter for <code>cattle.user_preference.description</code> | getDescription | {
"repo_name": "vincent99/cattle",
"path": "code/iaas/model/src/main/java/io/cattle/platform/core/model/UserPreference.java",
"license": "apache-2.0",
"size": 4782
} | [
"javax.persistence.Column"
] | import javax.persistence.Column; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 814,948 |
public void setTransactionTimeout(Period timeout)
{
_transactionTimeout = timeout.getPeriod();
} | void function(Period timeout) { _transactionTimeout = timeout.getPeriod(); } | /**
* Sets the transaction timeout.
*/ | Sets the transaction timeout | setTransactionTimeout | {
"repo_name": "WelcomeHUME/svn-caucho-com-resin",
"path": "modules/resin/src/com/caucho/ejb/cfg/EjbBean.java",
"license": "gpl-2.0",
"size": 47328
} | [
"com.caucho.config.types.Period"
] | import com.caucho.config.types.Period; | import com.caucho.config.types.*; | [
"com.caucho.config"
] | com.caucho.config; | 1,407,716 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Void> reapplyAsync(String resourceGroupName, String vmName, Context context) {
return beginReapplyAsync(resourceGroupName, vmName, context)
.last()
.flatMap(this.client::getLroFinalResultOrError);
} | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> function(String resourceGroupName, String vmName, Context context) { return beginReapplyAsync(resourceGroupName, vmName, context) .last() .flatMap(this.client::getLroFinalResultOrError); } | /**
* The operation to reapply a virtual machine's state.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fai... | The operation to reapply a virtual machine's state | reapplyAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachinesClientImpl.java",
"license": "mit",
"size": 333925
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; | import com.azure.core.annotation.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 902,675 |
@EventHandler(priority = EventPriority.LOW, ignoreCancelled=true)
public void onWorldExit(final PlayerChangedWorldEvent event) {
// Exiting Beaconz world
if (event.getFrom().equals((getBeaconzWorld()))) {
// Remove player from map and remove his scoreboard
BeaconProtectio... | @EventHandler(priority = EventPriority.LOW, ignoreCancelled=true) void function(final PlayerChangedWorldEvent event) { if (event.getFrom().equals((getBeaconzWorld()))) { BeaconProtectionListener.getStandingOn().remove(event.getPlayer().getUniqueId()); event.getPlayer().setScoreboard(Bukkit.getServer().getScoreboardMana... | /**
* Removes the scoreboard from the player, resets other world-specific items
* @param event
*/ | Removes the scoreboard from the player, resets other world-specific items | onWorldExit | {
"repo_name": "ebaldino/beaconz",
"path": "src/main/java/com/wasteofplastic/beaconz/listeners/PlayerTeleportListener.java",
"license": "mit",
"size": 12373
} | [
"org.bukkit.Bukkit",
"org.bukkit.event.EventHandler",
"org.bukkit.event.EventPriority",
"org.bukkit.event.player.PlayerChangedWorldEvent",
"org.bukkit.potion.PotionEffect"
] | import org.bukkit.Bukkit; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.player.PlayerChangedWorldEvent; import org.bukkit.potion.PotionEffect; | import org.bukkit.*; import org.bukkit.event.*; import org.bukkit.event.player.*; import org.bukkit.potion.*; | [
"org.bukkit",
"org.bukkit.event",
"org.bukkit.potion"
] | org.bukkit; org.bukkit.event; org.bukkit.potion; | 1,562,611 |
public BytecodeNode generateCall(String name, ScalarFunctionImplementation function, List<BytecodeNode> arguments)
{
Optional<BytecodeNode> instance = Optional.empty();
if (function.getInstanceFactory().isPresent()) {
FieldDefinition field = cachedInstanceBinder.getCachedInstance(fun... | BytecodeNode function(String name, ScalarFunctionImplementation function, List<BytecodeNode> arguments) { Optional<BytecodeNode> instance = Optional.empty(); if (function.getInstanceFactory().isPresent()) { FieldDefinition field = cachedInstanceBinder.getCachedInstance(function.getInstanceFactory().get()); instance = O... | /**
* Generates a function call with null handling, automatic binding of session parameter, etc.
*/ | Generates a function call with null handling, automatic binding of session parameter, etc | generateCall | {
"repo_name": "youngwookim/presto",
"path": "presto-main/src/main/java/io/prestosql/sql/gen/BytecodeGeneratorContext.java",
"license": "apache-2.0",
"size": 3544
} | [
"io.airlift.bytecode.BytecodeNode",
"io.airlift.bytecode.FieldDefinition",
"io.prestosql.operator.scalar.ScalarFunctionImplementation",
"io.prestosql.sql.gen.BytecodeUtils",
"java.util.List",
"java.util.Optional"
] | import io.airlift.bytecode.BytecodeNode; import io.airlift.bytecode.FieldDefinition; import io.prestosql.operator.scalar.ScalarFunctionImplementation; import io.prestosql.sql.gen.BytecodeUtils; import java.util.List; import java.util.Optional; | import io.airlift.bytecode.*; import io.prestosql.operator.scalar.*; import io.prestosql.sql.gen.*; import java.util.*; | [
"io.airlift.bytecode",
"io.prestosql.operator",
"io.prestosql.sql",
"java.util"
] | io.airlift.bytecode; io.prestosql.operator; io.prestosql.sql; java.util; | 2,517,830 |
public void setWith(@Nonnull List<BaseComponent> components) {
Checks.notNull(components, "components");
Checks.noNullElements(components, "components");
for(BaseComponent component : components){
component.parent = this;
}
with = components;
} | void function(@Nonnull List<BaseComponent> components) { Checks.notNull(components, STR); Checks.noNullElements(components, STR); for(BaseComponent component : components){ component.parent = this; } with = components; } | /**
* Sets the translation substitutions to be used in this component. Removes
* any previously set substitutions
*
* @param components the components to substitute
*/ | Sets the translation substitutions to be used in this component. Removes any previously set substitutions | setWith | {
"repo_name": "nailed/nailed-api",
"path": "src/main/java/jk_5/nailed/api/chat/TranslatableComponent.java",
"license": "mit",
"size": 7353
} | [
"java.util.List",
"javax.annotation.Nonnull"
] | import java.util.List; import javax.annotation.Nonnull; | import java.util.*; import javax.annotation.*; | [
"java.util",
"javax.annotation"
] | java.util; javax.annotation; | 1,046,350 |
public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderNote> createOrderNoteClient(com.mozu.api.contracts.commerceruntime.orders.OrderNote orderNote, String orderId, String responseFields) throws Exception
{
MozuUrl url = com.mozu.api.urls.commerce.orders.OrderNoteUrl.createOrderNoteUrl(order... | static MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderNote> function(com.mozu.api.contracts.commerceruntime.orders.OrderNote orderNote, String orderId, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.orders.OrderNoteUrl.createOrderNoteUrl(orderId, responseFields); Strin... | /**
* Creates a new merchant note for the specified order.
* <p><pre><code>
* MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderNote> mozuClient=CreateOrderNoteClient( orderNote, orderId, responseFields);
* client.setBaseAddress(url);
* client.executeRequest();
* OrderNote orderNote = client.R... | Creates a new merchant note for the specified order. <code><code> MozuClient mozuClient=CreateOrderNoteClient( orderNote, orderId, responseFields); client.setBaseAddress(url); client.executeRequest(); OrderNote orderNote = client.Result(); </code></code> | createOrderNoteClient | {
"repo_name": "sanjaymandadi/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/orders/OrderNoteClient.java",
"license": "mit",
"size": 10313
} | [
"com.mozu.api.MozuClient",
"com.mozu.api.MozuClientFactory",
"com.mozu.api.MozuUrl"
] | import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,112,676 |
public void ifNonNull(final Label label) {
mv.visitJumpInsn(Opcodes.IFNONNULL, label);
} | void function(final Label label) { mv.visitJumpInsn(Opcodes.IFNONNULL, label); } | /**
* Generates the instruction to jump to the given label if the top stack
* value is not null.
*
* @param label
* where to jump if the condition is <tt>true</tt>.
*/ | Generates the instruction to jump to the given label if the top stack value is not null | ifNonNull | {
"repo_name": "Omnicrola/EssenJava",
"path": "test.lib/asm-4.2/asm-4.2/src/org/objectweb/asm/commons/GeneratorAdapter.java",
"license": "apache-2.0",
"size": 50570
} | [
"org.objectweb.asm.Label",
"org.objectweb.asm.Opcodes"
] | import org.objectweb.asm.Label; import org.objectweb.asm.Opcodes; | import org.objectweb.asm.*; | [
"org.objectweb.asm"
] | org.objectweb.asm; | 1,674,110 |
public static <T> void equalsVerifier(Class<T> clazz) throws Exception {
T domainObject1 = clazz.getConstructor().newInstance();
assertThat(domainObject1.toString()).isNotNull();
assertThat(domainObject1).isEqualTo(domainObject1);
assertThat(domainObject1.hashCode()).isEqualTo(domain... | static <T> void function(Class<T> clazz) throws Exception { T domainObject1 = clazz.getConstructor().newInstance(); assertThat(domainObject1.toString()).isNotNull(); assertThat(domainObject1).isEqualTo(domainObject1); assertThat(domainObject1.hashCode()).isEqualTo(domainObject1.hashCode()); Object testOtherObject = new... | /**
* Verifies the equals/hashcode contract on the domain object.
*/ | Verifies the equals/hashcode contract on the domain object | equalsVerifier | {
"repo_name": "Niky4000/UsefulUtils",
"path": "projects/tutorials-master/tutorials-master/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/web/rest/TestUtil.java",
"license": "gpl-3.0",
"size": 5158
} | [
"org.assertj.core.api.Assertions"
] | import org.assertj.core.api.Assertions; | import org.assertj.core.api.*; | [
"org.assertj.core"
] | org.assertj.core; | 2,504,030 |
public void processRecord(final Record record) {
switch (record.getSid()) {
// the BOFRecord can represent either the beginning of a sheet or the workbook
case BOFRecord.sid:
final BOFRecord bof = (BOFRecord) record;
if (bof.getType() == BOFRecord... | void function(final Record record) { switch (record.getSid()) { case BOFRecord.sid: final BOFRecord bof = (BOFRecord) record; if (bof.getType() == BOFRecord.TYPE_WORKBOOK) { LOG.debug(STR); } else if (bof.getType() == BOFRecord.TYPE_WORKSHEET) { LOG.debug(STR); } break; case BoundSheetRecord.sid: final BoundSheetRecord... | /**
* This method listens for incoming records and handles them as required.
*
* @param record
*/ | This method listens for incoming records and handles them as required | processRecord | {
"repo_name": "gbv/doctor-doc",
"path": "source/util/XLSReader.java",
"license": "gpl-2.0",
"size": 8878
} | [
"java.util.ArrayList",
"org.apache.poi.hssf.record.BOFRecord",
"org.apache.poi.hssf.record.BoundSheetRecord",
"org.apache.poi.hssf.record.LabelSSTRecord",
"org.apache.poi.hssf.record.NumberRecord",
"org.apache.poi.hssf.record.Record",
"org.apache.poi.hssf.record.RowRecord",
"org.apache.poi.hssf.record... | import java.util.ArrayList; import org.apache.poi.hssf.record.BOFRecord; import org.apache.poi.hssf.record.BoundSheetRecord; import org.apache.poi.hssf.record.LabelSSTRecord; import org.apache.poi.hssf.record.NumberRecord; import org.apache.poi.hssf.record.Record; import org.apache.poi.hssf.record.RowRecord; import org... | import java.util.*; import org.apache.poi.hssf.record.*; | [
"java.util",
"org.apache.poi"
] | java.util; org.apache.poi; | 326,587 |
static void markCompleted(JobID id) throws IOException {
fileManager.moveToDone(id);
} | static void markCompleted(JobID id) throws IOException { fileManager.moveToDone(id); } | /**
* Move the completed job into the completed folder.
* This assumes that the jobhistory file is closed and all operations on the
* jobhistory file is complete.
* This *should* be the last call to jobhistory for a given job.
*/ | Move the completed job into the completed folder. This assumes that the jobhistory file is closed and all operations on the jobhistory file is complete. This *should* be the last call to jobhistory for a given job | markCompleted | {
"repo_name": "leonhong/hadoop-20-warehouse",
"path": "src/mapred/org/apache/hadoop/mapred/JobHistory.java",
"license": "apache-2.0",
"size": 81651
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,349,966 |
public MultiValueMap<String, String> getTargetRequestParams() {
return this.targetRequestParams;
} | MultiValueMap<String, String> function() { return this.targetRequestParams; } | /**
* Return the parameters identifying the target request, or an empty map.
*/ | Return the parameters identifying the target request, or an empty map | getTargetRequestParams | {
"repo_name": "leogoing/spring_jeesite",
"path": "spring-webmvc-4.0/org/springframework/web/servlet/FlashMap.java",
"license": "apache-2.0",
"size": 5234
} | [
"org.springframework.util.MultiValueMap"
] | import org.springframework.util.MultiValueMap; | import org.springframework.util.*; | [
"org.springframework.util"
] | org.springframework.util; | 2,201,233 |
public List getAllMatches(PointerTargetTreeNodeList.Operation opr) {
List list = new ArrayList();
if (opr.execute(getRootNode()) != null)
list.add(getRootNode());
if (getRootNode().hasValidChildTreeList())
getRootNode().getChildTreeList().getAllMatches(opr, list);
return list;
} | List function(PointerTargetTreeNodeList.Operation opr) { List list = new ArrayList(); if (opr.execute(getRootNode()) != null) list.add(getRootNode()); if (getRootNode().hasValidChildTreeList()) getRootNode().getChildTreeList().getAllMatches(opr, list); return list; } | /**
* Walk the tree and perform the operation <code>opr</code> on each node.
* Searchs the tree exhaustively and returns a List containing all nodes that
* are returned by <code>opr</code>.
*/ | Walk the tree and perform the operation <code>opr</code> on each node. Searchs the tree exhaustively and returns a List containing all nodes that are returned by <code>opr</code> | getAllMatches | {
"repo_name": "cqx931/RiTa",
"path": "java/rita/wordnet/jwnl/wndata/list/PointerTargetTree.java",
"license": "gpl-3.0",
"size": 4758
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 378,122 |
public void setFilterConfig(FilterConfig filterConfig) {
this.filterConfig = filterConfig;
} | void function(FilterConfig filterConfig) { this.filterConfig = filterConfig; } | /**
* Set the filter configuration object for this filter.
*
* @param filterConfig The filter configuration object
*/ | Set the filter configuration object for this filter | setFilterConfig | {
"repo_name": "engcardso/TinyAgenda",
"path": "src/java/com/tinyagenda/filters/SavingEvt.java",
"license": "gpl-3.0",
"size": 7092
} | [
"javax.servlet.FilterConfig"
] | import javax.servlet.FilterConfig; | import javax.servlet.*; | [
"javax.servlet"
] | javax.servlet; | 1,894,418 |
@Override
public User getUserInformation(String sessionId) {
// This is a little evil here. We are fetching the User object
// *and* side effecting it by storing the sessionId
// A more pedagotically correct way would be to do the store
// in a separate RPC. But that would add another round trip.
... | User function(String sessionId) { User user = userInfoProvider.getUser(); user.setSessionId(sessionId); storageIo.setUserSessionId(userInfoProvider.getUserId(), sessionId); return user; } | /**
* Returns user information.
*
* (obsoleted by getSystemConfig())
*
* @return user information record
*/ | Returns user information. (obsoleted by getSystemConfig()) | getUserInformation | {
"repo_name": "codimeo/codi-studio",
"path": "appinventor/appengine/src/com/google/appinventor/server/UserInfoServiceImpl.java",
"license": "apache-2.0",
"size": 5481
} | [
"com.google.appinventor.shared.rpc.user.User"
] | import com.google.appinventor.shared.rpc.user.User; | import com.google.appinventor.shared.rpc.user.*; | [
"com.google.appinventor"
] | com.google.appinventor; | 2,517,986 |
public void queueJob(ObdCommandJob job) {
queueCounter++;
Log.d(TAG, "Adding job[" + queueCounter + "] to queue..");
job.setId(queueCounter);
try {
jobsQueue.put(job);
Log.d(TAG, "Job queued successfully.");
} catch (InterruptedException e) {
... | void function(ObdCommandJob job) { queueCounter++; Log.d(TAG, STR + queueCounter + STR); job.setId(queueCounter); try { jobsQueue.put(job); Log.d(TAG, STR); } catch (InterruptedException e) { job.setState(ObdCommandJob.ObdCommandJobState.QUEUE_ERROR); Log.e(TAG, STR); } } | /**
* This method will add a job to the queue while setting its ID to the
* internal queue counter.
*
* @param job the job to queue.
*/ | This method will add a job to the queue while setting its ID to the internal queue counter | queueJob | {
"repo_name": "Mohammad2416/android-obd-reader-master",
"path": "src/main/java/com/ahmadi/android/obd/reader/io/AbstractGatewayService.java",
"license": "apache-2.0",
"size": 4249
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 1,536,453 |
public MapList getMapResult() {
return mapResult;
} | MapList function() { return mapResult; } | /**
*
* Get a map of annotations
*
**/ | Get a map of annotations | getMapResult | {
"repo_name": "TsangLab/Proxiris",
"path": "java/src/csfg/TextMiningPipeline.java",
"license": "mit",
"size": 4939
} | [
"org.wikifier.MapList"
] | import org.wikifier.MapList; | import org.wikifier.*; | [
"org.wikifier"
] | org.wikifier; | 1,237,807 |
private Network buildScaleFreeNetwork() {
// Object to build the graph in the Barabasi algorithm implementation.
Factory<Graph<User, Link>> graphFactory = new Factory<Graph<User, Link>>() { | Network function() { Factory<Graph<User, Link>> graphFactory = new Factory<Graph<User, Link>>() { | /**
* Build a scale free network using simulation parameters.
*
* @return
*/ | Build a scale free network using simulation parameters | buildScaleFreeNetwork | {
"repo_name": "gsi-upm/TwitterSimulator",
"path": "src/es/upm/dit/gsi/sim/twitter/TwitterSimulation.java",
"license": "gpl-2.0",
"size": 22901
} | [
"edu.uci.ics.jung.graph.Graph",
"es.upm.dit.gsi.sim.twitter.model.user.Link",
"es.upm.dit.gsi.sim.twitter.model.user.User",
"org.apache.commons.collections15.Factory"
] | import edu.uci.ics.jung.graph.Graph; import es.upm.dit.gsi.sim.twitter.model.user.Link; import es.upm.dit.gsi.sim.twitter.model.user.User; import org.apache.commons.collections15.Factory; | import edu.uci.ics.jung.graph.*; import es.upm.dit.gsi.sim.twitter.model.user.*; import org.apache.commons.collections15.*; | [
"edu.uci.ics",
"es.upm.dit",
"org.apache.commons"
] | edu.uci.ics; es.upm.dit; org.apache.commons; | 30,721 |
@Override
public boolean isUsernameIndex(String[] args, int index)
{
if(index > 0 && args.length > 1)
{
ICommand cmd = getCommandMap().get(args[0]);
if(cmd != null)
{
return cmd.isUsernameIndex(shiftArgs(args), index - 1);
}
... | boolean function(String[] args, int index) { if(index > 0 && args.length > 1) { ICommand cmd = getCommandMap().get(args[0]); if(cmd != null) { return cmd.isUsernameIndex(shiftArgs(args), index - 1); } } return false; } | /**
* Return whether the specified command parameter index is a username parameter.
*/ | Return whether the specified command parameter index is a username parameter | isUsernameIndex | {
"repo_name": "F1r3w477/CustomWorldGen",
"path": "build/tmp/recompileMc/sources/net/minecraftforge/server/command/CommandTreeBase.java",
"license": "lgpl-3.0",
"size": 4586
} | [
"net.minecraft.command.ICommand"
] | import net.minecraft.command.ICommand; | import net.minecraft.command.*; | [
"net.minecraft.command"
] | net.minecraft.command; | 1,731,790 |
public String getClassName() {
return ansField.getClass().getName();
}
private class SaveDefaultAction extends AbstractAction {
public SaveDefaultAction() {
super("set as default");
} | String function() { return ansField.getClass().getName(); } private class SaveDefaultAction extends AbstractAction { public SaveDefaultAction() { super(STR); } | /**
* Gets the class name for the answer field that this entry describes.
* @return the class name for the answer field that this entry describes.
*/ | Gets the class name for the answer field that this entry describes | getClassName | {
"repo_name": "tectronics/ingatan",
"path": "src/org/ingatan/component/librarymanager/EditAnswerFieldsDialog.java",
"license": "gpl-3.0",
"size": 29304
} | [
"javax.swing.AbstractAction"
] | import javax.swing.AbstractAction; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 873,321 |
public boolean checkNoSpoofing(ProtocolSubmitAction submitAction) {
boolean isValid = true;
List<ProtocolReviewerBean> submittedReviewers = (List) submitAction.getReviewers();
if (null != submittedReviewers && submittedReviewers.size() > 0) {
if (StringUtils.isBlank(submitAction.... | boolean function(ProtocolSubmitAction submitAction) { boolean isValid = true; List<ProtocolReviewerBean> submittedReviewers = (List) submitAction.getReviewers(); if (null != submittedReviewers && submittedReviewers.size() > 0) { if (StringUtils.isBlank(submitAction.getCommitteeId())) { isValid = false; } else { List<Co... | /**
*
* This method checks to make sure that the reviewers list submitted is actually the same as that made available for that
* protocol, committee and schedule, i.e. no spoofing of hidden input fields has taken place.
*
* @param submitAction
* @return
*/ | This method checks to make sure that the reviewers list submitted is actually the same as that made available for that protocol, committee and schedule, i.e. no spoofing of hidden input fields has taken place | checkNoSpoofing | {
"repo_name": "blackcathacker/kc.preclean",
"path": "coeus-code/src/main/java/org/kuali/kra/irb/actions/submit/ProtocolSubmitActionRule.java",
"license": "apache-2.0",
"size": 18580
} | [
"java.util.List",
"org.apache.commons.lang3.StringUtils",
"org.kuali.kra.committee.bo.CommitteeMembership"
] | import java.util.List; import org.apache.commons.lang3.StringUtils; import org.kuali.kra.committee.bo.CommitteeMembership; | import java.util.*; import org.apache.commons.lang3.*; import org.kuali.kra.committee.bo.*; | [
"java.util",
"org.apache.commons",
"org.kuali.kra"
] | java.util; org.apache.commons; org.kuali.kra; | 1,569,934 |
void defineSlot(Node n, Node parent, JSType type, boolean inferred) {
Preconditions.checkArgument(inferred || type != null);
// Only allow declarations of NAMEs and qualfied names.
boolean shouldDeclareOnGlobalThis = false;
if (n.getType() == Token.NAME) {
Preconditions.checkArgumen... | void defineSlot(Node n, Node parent, JSType type, boolean inferred) { Preconditions.checkArgument(inferred type != null); boolean shouldDeclareOnGlobalThis = false; if (n.getType() == Token.NAME) { Preconditions.checkArgument( parent.getType() == Token.FUNCTION parent.getType() == Token.VAR parent.getType() == Token.LP... | /**
* Defines a typed variable. The defining node will be annotated with the
* variable's type of {@link JSTypeNative#UNKNOWN_TYPE} if its type is
* inferred.
*
* Slots may be any variable or any qualified name in the global scope.
*
* @param n the defining NAME or GETPROP node.
... | Defines a typed variable. The defining node will be annotated with the variable's type of <code>JSTypeNative#UNKNOWN_TYPE</code> if its type is inferred. Slots may be any variable or any qualified name in the global scope | defineSlot | {
"repo_name": "jayli/kissy",
"path": "tools/module-compiler/src/com/google/javascript/jscomp/TypedScopeCreator.java",
"license": "mit",
"size": 59987
} | [
"com.google.common.base.Preconditions",
"com.google.javascript.jscomp.Scope",
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.Token",
"com.google.javascript.rhino.jstype.FunctionType",
"com.google.javascript.rhino.jstype.JSType",
"com.google.javascript.rhino.jstype.JSTypeNative",
"com... | import com.google.common.base.Preconditions; import com.google.javascript.jscomp.Scope; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token; import com.google.javascript.rhino.jstype.FunctionType; import com.google.javascript.rhino.jstype.JSType; import com.google.javascript.rhino.jstype.J... | import com.google.common.base.*; import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*; | [
"com.google.common",
"com.google.javascript"
] | com.google.common; com.google.javascript; | 2,054,204 |
@Override
public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
ConnectionControl info = (ConnectionControl) o;
super.looseMarshal(wireFormat, o, dataOut);
dataOut.writeBoolean(info.isClose());
dataOut.writeBoolean(info.isExit())... | void function(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ConnectionControl info = (ConnectionControl) o; super.looseMarshal(wireFormat, o, dataOut); dataOut.writeBoolean(info.isClose()); dataOut.writeBoolean(info.isExit()); dataOut.writeBoolean(info.isFaultTolerant()); dataOut.writeBo... | /**
* Write the booleans that this object uses to a BooleanStream
*/ | Write the booleans that this object uses to a BooleanStream | looseMarshal | {
"repo_name": "tabish121/OpenWire",
"path": "openwire-core/src/main/java/io/openwire/codec/v1/ConnectionControlMarshaller.java",
"license": "apache-2.0",
"size": 4740
} | [
"io.openwire.codec.OpenWireFormat",
"io.openwire.commands.ConnectionControl",
"java.io.DataOutput",
"java.io.IOException"
] | import io.openwire.codec.OpenWireFormat; import io.openwire.commands.ConnectionControl; import java.io.DataOutput; import java.io.IOException; | import io.openwire.codec.*; import io.openwire.commands.*; import java.io.*; | [
"io.openwire.codec",
"io.openwire.commands",
"java.io"
] | io.openwire.codec; io.openwire.commands; java.io; | 2,613,256 |
private double findUpperBound(final UnivariateFunction f,
final double a, final double h) {
final double yA = f.value(a);
double yB = yA;
for (double step = h; step < Double.MAX_VALUE; step *= FastMath.max(2, yA / yB)) {
final double b = a + step... | double function(final UnivariateFunction f, final double a, final double h) { final double yA = f.value(a); double yB = yA; for (double step = h; step < Double.MAX_VALUE; step *= FastMath.max(2, yA / yB)) { final double b = a + step; yB = f.value(b); if (yA * yB <= 0) { return b; } } throw new MathIllegalStateException... | /**
* Find the upper bound b ensuring bracketing of a root between a and b.
*
* @param f function whose root must be bracketed.
* @param a lower bound of the interval.
* @param h initial step to try.
* @return b such that f(a) and f(b) have opposite signs.
* @throws MathIllegalStateEx... | Find the upper bound b ensuring bracketing of a root between a and b | findUpperBound | {
"repo_name": "happyjack27/autoredistrict",
"path": "src/org/apache/commons/math3/optimization/general/NonLinearConjugateGradientOptimizer.java",
"license": "gpl-3.0",
"size": 12220
} | [
"org.apache.commons.math3.analysis.UnivariateFunction",
"org.apache.commons.math3.exception.MathIllegalStateException",
"org.apache.commons.math3.exception.util.LocalizedFormats",
"org.apache.commons.math3.util.FastMath"
] | import org.apache.commons.math3.analysis.UnivariateFunction; import org.apache.commons.math3.exception.MathIllegalStateException; import org.apache.commons.math3.exception.util.LocalizedFormats; import org.apache.commons.math3.util.FastMath; | import org.apache.commons.math3.analysis.*; import org.apache.commons.math3.exception.*; import org.apache.commons.math3.exception.util.*; import org.apache.commons.math3.util.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,340,738 |
public List<String> disabledAlerts() {
return this.disabledAlerts;
} | List<String> function() { return this.disabledAlerts; } | /**
* Get the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are:
* Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly.
*
* @return the disabledAlerts value.
*/ | Get the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly | disabledAlerts | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/postgresql/azure-resourcemanager-postgresql/src/main/java/com/azure/resourcemanager/postgresql/fluent/models/SecurityAlertPolicyProperties.java",
"license": "mit",
"size": 7715
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,909,452 |
@Converter(allowNull = true)
public Node toDOMNode(Source source) throws TransformerException, ParserConfigurationException, IOException, SAXException {
DOMSource domSrc = toDOMSource(source);
return domSrc != null ? domSrc.getNode() : null;
} | @Converter(allowNull = true) Node function(Source source) throws TransformerException, ParserConfigurationException, IOException, SAXException { DOMSource domSrc = toDOMSource(source); return domSrc != null ? domSrc.getNode() : null; } | /**
* Converts the given TRaX Source into a W3C DOM node
*/ | Converts the given TRaX Source into a W3C DOM node | toDOMNode | {
"repo_name": "FingolfinTEK/camel",
"path": "camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java",
"license": "apache-2.0",
"size": 48386
} | [
"java.io.IOException",
"javax.xml.parsers.ParserConfigurationException",
"javax.xml.transform.Source",
"javax.xml.transform.TransformerException",
"javax.xml.transform.dom.DOMSource",
"org.apache.camel.Converter",
"org.w3c.dom.Node",
"org.xml.sax.SAXException"
] | import java.io.IOException; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.Source; import javax.xml.transform.TransformerException; import javax.xml.transform.dom.DOMSource; import org.apache.camel.Converter; import org.w3c.dom.Node; import org.xml.sax.SAXException; | import java.io.*; import javax.xml.parsers.*; import javax.xml.transform.*; import javax.xml.transform.dom.*; import org.apache.camel.*; import org.w3c.dom.*; import org.xml.sax.*; | [
"java.io",
"javax.xml",
"org.apache.camel",
"org.w3c.dom",
"org.xml.sax"
] | java.io; javax.xml; org.apache.camel; org.w3c.dom; org.xml.sax; | 2,408,557 |
public void testPasteNonMergedCells2MergedCells( ) throws Exception
{
openDesign( fileName );
TableHandle copyTable = (TableHandle) designHandle
.findElement( "CopyTable1" ); //$NON-NLS-1$
assertNotNull( copyTable );
TableHandle pasteTable = (TableHandle) designHandle
.findElement( "PasteTable1" )... | void function( ) throws Exception { openDesign( fileName ); TableHandle copyTable = (TableHandle) designHandle .findElement( STR ); assertNotNull( copyTable ); TableHandle pasteTable = (TableHandle) designHandle .findElement( STR ); assertNotNull( pasteTable ); SlotHandle detail = pasteTable.getDetail( ); RowHandle row... | /**
* Copies non-merged cells in the source table to another table with merged
* cells.
*
* @throws Exception
*/ | Copies non-merged cells in the source table to another table with merged cells | testPasteNonMergedCells2MergedCells | {
"repo_name": "rrimmana/birt-1",
"path": "model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/api/TableColumnBandTest.java",
"license": "epl-1.0",
"size": 48243
} | [
"org.eclipse.birt.report.model.api.activity.SemanticException",
"org.eclipse.birt.report.model.api.elements.SemanticError",
"org.eclipse.birt.report.model.api.metadata.IColorConstants",
"org.eclipse.birt.report.model.elements.Style"
] | import org.eclipse.birt.report.model.api.activity.SemanticException; import org.eclipse.birt.report.model.api.elements.SemanticError; import org.eclipse.birt.report.model.api.metadata.IColorConstants; import org.eclipse.birt.report.model.elements.Style; | import org.eclipse.birt.report.model.api.activity.*; import org.eclipse.birt.report.model.api.elements.*; import org.eclipse.birt.report.model.api.metadata.*; import org.eclipse.birt.report.model.elements.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 1,489,106 |
private void generateKeys() {
entries.getReadWriteLock().writeLock().lock();
try {
BibDatabase database;
MetaData localMetaData;
// Relate to existing database, if any:
if (panel == null) {
database = new BibDatabase();
... | void function() { entries.getReadWriteLock().writeLock().lock(); try { BibDatabase database; MetaData localMetaData; if (panel == null) { database = new BibDatabase(); localMetaData = new MetaData(); } else { database = panel.getDatabase(); localMetaData = panel.getBibDatabaseContext().getMetaData(); } List<Optional<St... | /**
* Generate keys for all entries. All keys will be unique with respect to
* one another, and, if they are destined for an existing database, with
* respect to existing keys in the database.
*/ | Generate keys for all entries. All keys will be unique with respect to one another, and, if they are destined for an existing database, with respect to existing keys in the database | generateKeys | {
"repo_name": "prepilef/DC-UFSCar-ES2-201701-Grupo595136",
"path": "src/main/java/org/jabref/gui/importer/ImportInspectionDialog.java",
"license": "mit",
"size": 60059
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Optional",
"org.jabref.Globals",
"org.jabref.logic.bibtexkeypattern.BibtexKeyPatternUtil",
"org.jabref.model.database.BibDatabase",
"org.jabref.model.entry.BibEntry",
"org.jabref.model.entry.IdGenerator",
"org.jabref.model.metadata.MetaData"
] | import java.util.ArrayList; import java.util.List; import java.util.Optional; import org.jabref.Globals; import org.jabref.logic.bibtexkeypattern.BibtexKeyPatternUtil; import org.jabref.model.database.BibDatabase; import org.jabref.model.entry.BibEntry; import org.jabref.model.entry.IdGenerator; import org.jabref.model... | import java.util.*; import org.jabref.*; import org.jabref.logic.bibtexkeypattern.*; import org.jabref.model.database.*; import org.jabref.model.entry.*; import org.jabref.model.metadata.*; | [
"java.util",
"org.jabref",
"org.jabref.logic",
"org.jabref.model"
] | java.util; org.jabref; org.jabref.logic; org.jabref.model; | 989,895 |
public void setFunctionalId(String functionalId) {
if ((this.functionalId == null)) {
if ((functionalId == null)) {
return;
}
this.functionalId = new FunctionalIdentifier();
}
this.functionalId.setValue(functionalId);
}
| void function(String functionalId) { if ((this.functionalId == null)) { if ((functionalId == null)) { return; } this.functionalId = new FunctionalIdentifier(); } this.functionalId.setValue(functionalId); } | /**
* Functional ID of the Code
*
* @param functionalId the String.
*/ | Functional ID of the Code | setFunctionalId | {
"repo_name": "NABUCCO/org.nabucco.framework.base",
"path": "org.nabucco.framework.base.facade.datatype/src/main/gen/org/nabucco/framework/base/facade/datatype/code/Code.java",
"license": "epl-1.0",
"size": 11619
} | [
"org.nabucco.framework.base.facade.datatype.FunctionalIdentifier"
] | import org.nabucco.framework.base.facade.datatype.FunctionalIdentifier; | import org.nabucco.framework.base.facade.datatype.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 2,012,043 |
StackSize getStackSize(); | StackSize getStackSize(); | /**
* Returns the size of the type described by this instance.
*
* @return The size of the type described by this instance.
*/ | Returns the size of the type described by this instance | getStackSize | {
"repo_name": "PascalSchumacher/byte-buddy",
"path": "byte-buddy-dep/src/main/java/net/bytebuddy/description/type/TypeDescription.java",
"license": "apache-2.0",
"size": 44988
} | [
"net.bytebuddy.implementation.bytecode.StackSize"
] | import net.bytebuddy.implementation.bytecode.StackSize; | import net.bytebuddy.implementation.bytecode.*; | [
"net.bytebuddy.implementation"
] | net.bytebuddy.implementation; | 2,651,073 |
@WebMethod(operationName = "registerRfidEvent")
@WebResult(name = "rfidEventInfo")
public RfidEventInfo registerRfidEvent(
@WebParam(name = "rfid") final String rfid,
@WebParam(name = "stationMac") final String stationMac,
@WebParam(name = "deviceIndex") final Integer deviceIndex) {
return masterE... | @WebMethod(operationName = STR) @WebResult(name = STR) RfidEventInfo function( @WebParam(name = "rfid") final String rfid, @WebParam(name = STR) final String stationMac, @WebParam(name = STR) final Integer deviceIndex) { return masterEventRegisterManager.registerRfidEvent(rfid, stationMac, deviceIndex); } | /**
* Registers a RFID event.
*/ | Registers a RFID event | registerRfidEvent | {
"repo_name": "bitzware/2m",
"path": "exm/mserver/src/main/java/com/bitzware/exm/ws/MasterServer.java",
"license": "gpl-2.0",
"size": 5575
} | [
"com.bitzware.exm.model.RfidEventInfo",
"javax.jws.WebMethod",
"javax.jws.WebParam",
"javax.jws.WebResult"
] | import com.bitzware.exm.model.RfidEventInfo; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; | import com.bitzware.exm.model.*; import javax.jws.*; | [
"com.bitzware.exm",
"javax.jws"
] | com.bitzware.exm; javax.jws; | 2,028,274 |
public PacketType getPacketType(String itemName); | PacketType function(String itemName); | /**
* Returns item packet type to the given <code>itemName</code>.
*
* @param itemName
* the item for which to find a packet type.
*
* @return the corresponding packet type to the given <code>itemName</code>.
*/ | Returns item packet type to the given <code>itemName</code> | getPacketType | {
"repo_name": "watou/openhab",
"path": "bundles/binding/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/RFXComBindingProvider.java",
"license": "epl-1.0",
"size": 2559
} | [
"org.openhab.binding.rfxcom.internal.messages.RFXComBaseMessage"
] | import org.openhab.binding.rfxcom.internal.messages.RFXComBaseMessage; | import org.openhab.binding.rfxcom.internal.messages.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 819,008 |
public SearchSourceBuilder scriptField(String name, Script script) {
if (scriptFields == null) {
scriptFields = new ArrayList<>();
}
scriptFields.add(new ScriptField(name, script));
return this;
} | SearchSourceBuilder function(String name, Script script) { if (scriptFields == null) { scriptFields = new ArrayList<>(); } scriptFields.add(new ScriptField(name, script)); return this; } | /**
* Adds a script field under the given name with the provided script.
*
* @param name
* The name of the field
* @param script
* The script
*/ | Adds a script field under the given name with the provided script | scriptField | {
"repo_name": "vingupta3/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java",
"license": "apache-2.0",
"size": 27060
} | [
"java.util.ArrayList",
"org.elasticsearch.script.Script"
] | import java.util.ArrayList; import org.elasticsearch.script.Script; | import java.util.*; import org.elasticsearch.script.*; | [
"java.util",
"org.elasticsearch.script"
] | java.util; org.elasticsearch.script; | 1,020,077 |
public void setValueExpression(String name, ValueExpression binding) {
name = BsfUtils.snakeCaseToCamelCase(name);
super.setValueExpression(name, binding);
}
protected enum PropertyKeys {
accesskey,
binding,
colLg,
colMd,
colSm,
colXs,
dir,
disabled,
dismiss,
display,
fragment,
hidden,... | void function(String name, ValueExpression binding) { name = BsfUtils.snakeCaseToCamelCase(name); super.setValueExpression(name, binding); } protected enum PropertyKeys { accesskey, binding, colLg, colMd, colSm, colXs, dir, disabled, dismiss, display, fragment, hidden, icon, iconAlign, iconAwesome, iconFlip, iconRotate... | /**
* Manage EL-expression for snake-case attributes
*/ | Manage EL-expression for snake-case attributes | setValueExpression | {
"repo_name": "asterd/BootsFaces-OSP",
"path": "src/main/java/net/bootsfaces/component/button/Button.java",
"license": "apache-2.0",
"size": 40275
} | [
"javax.el.ValueExpression",
"net.bootsfaces.utils.BsfUtils"
] | import javax.el.ValueExpression; import net.bootsfaces.utils.BsfUtils; | import javax.el.*; import net.bootsfaces.utils.*; | [
"javax.el",
"net.bootsfaces.utils"
] | javax.el; net.bootsfaces.utils; | 2,842,983 |
public void runInBackground(ISchedulingRule rule, Object jobFamily) {
if (jobFamily == null) {
runInBackground(rule, (Object[]) null);
} else {
runInBackground(rule, new Object[] { jobFamily });
}
} | void function(ISchedulingRule rule, Object jobFamily) { if (jobFamily == null) { runInBackground(rule, (Object[]) null); } else { runInBackground(rule, new Object[] { jobFamily }); } } | /**
* Run the action in the background rather than with the progress dialog.
*
* @param rule
* The rule to apply to the background job or <code>null</code>
* if there isn't one.
* @param jobFamily
* a single family that the job should belong to or
* <c... | Run the action in the background rather than with the progress dialog | runInBackground | {
"repo_name": "gama-platform/gama.cloud",
"path": "cict.gama.web.wrapper/src/org/eclipse/ui/actions/WorkspaceAction.java",
"license": "agpl-3.0",
"size": 15473
} | [
"org.eclipse.core.runtime.jobs.ISchedulingRule"
] | import org.eclipse.core.runtime.jobs.ISchedulingRule; | import org.eclipse.core.runtime.jobs.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 19,143 |
return tileColors.get(tile.getType());
}
static {
tileColors = new HashMap<TileType, QColor>();
tileColors.put(TileType.BBSTERM, QColor.darkGray);
tileColors.put(TileType.BBTERM, QColor.darkGray);
tileColors.put(TileType.BCLKTERM012, QColor.darkGray);
tileColors.put(Til... | return tileColors.get(tile.getType()); } static { tileColors = new HashMap<TileType, QColor>(); tileColors.put(TileType.BBSTERM, QColor.darkGray); tileColors.put(TileType.BBTERM, QColor.darkGray); tileColors.put(TileType.BCLKTERM012, QColor.darkGray); tileColors.put(TileType.BCLKTERM123, QColor.darkGray); tileColors.pu... | /**
* Gets a suggested color based on the tile's tileType.
*
* @param tile The tile for which to get the color suggestion.
* @return A suggested color, or null if none exists.
*/ | Gets a suggested color based on the tile's tileType | getSuggestedTileColor | {
"repo_name": "ComputerArchitectureGroupPWr/JGenerilo",
"path": "src/main/java/edu/byu/ece/rapidSmith/gui/TileColors.java",
"license": "mit",
"size": 66881
} | [
"com.trolltech.qt.gui.QColor",
"edu.byu.ece.rapidSmith.device.TileType",
"java.util.HashMap"
] | import com.trolltech.qt.gui.QColor; import edu.byu.ece.rapidSmith.device.TileType; import java.util.HashMap; | import com.trolltech.qt.gui.*; import edu.byu.ece.*; import java.util.*; | [
"com.trolltech.qt",
"edu.byu.ece",
"java.util"
] | com.trolltech.qt; edu.byu.ece; java.util; | 1,155,079 |
public static PyObject newInstance(String className) {
PyObject pyClass = JythonUtils.getInterpreter().get(className);
PyObject pyObject = pyClass.__call__();
return pyObject;
} | static PyObject function(String className) { PyObject pyClass = JythonUtils.getInterpreter().get(className); PyObject pyObject = pyClass.__call__(); return pyObject; } | /**
* Instantiate new instance of the Jython class
*
* @param className Jython class name
* @return new instance of class
*/ | Instantiate new instance of the Jython class | newInstance | {
"repo_name": "basio/graph",
"path": "giraph-core/src/main/java/org/apache/giraph/jython/JythonUtils.java",
"license": "apache-2.0",
"size": 3227
} | [
"org.python.core.PyObject"
] | import org.python.core.PyObject; | import org.python.core.*; | [
"org.python.core"
] | org.python.core; | 2,452,330 |
public int getSettlementIndex(Settlement settlement) {
if (containsSettlement(settlement))
return settlements.indexOf(settlement);
else
return -1;
}
| int function(Settlement settlement) { if (containsSettlement(settlement)) return settlements.indexOf(settlement); else return -1; } | /**
* Gets the index a given settlement is at.
*
* @param settlement the settlement to check for.
* @return the index for the settlement or -1 if not in list.
*/ | Gets the index a given settlement is at | getSettlementIndex | {
"repo_name": "mars-sim/mars-sim",
"path": "mars-sim-ui/src/main/java/org/mars_sim/msp/ui/swing/tool/mission/SettlementListModel.java",
"license": "gpl-3.0",
"size": 5056
} | [
"org.mars_sim.msp.core.structure.Settlement"
] | import org.mars_sim.msp.core.structure.Settlement; | import org.mars_sim.msp.core.structure.*; | [
"org.mars_sim.msp"
] | org.mars_sim.msp; | 175,601 |
public final Iterator<InstructionHandle[]> search( String pattern, InstructionHandle from ) {
return search(pattern, from, null);
} | final Iterator<InstructionHandle[]> function( String pattern, InstructionHandle from ) { return search(pattern, from, null); } | /**
* Start search beginning from `from'.
*
* @param pattern
* the instruction pattern to search for, where case is ignored
* @param from
* where to start the search in the instruction list
* @return iterator of matches where e.nextElement() returns an array of
... | Start search beginning from `from' | search | {
"repo_name": "Maccimo/commons-bcel",
"path": "src/main/java/org/apache/bcel/util/InstructionFinder.java",
"license": "apache-2.0",
"size": 20554
} | [
"java.util.Iterator",
"org.apache.bcel.generic.InstructionHandle"
] | import java.util.Iterator; import org.apache.bcel.generic.InstructionHandle; | import java.util.*; import org.apache.bcel.generic.*; | [
"java.util",
"org.apache.bcel"
] | java.util; org.apache.bcel; | 1,139,663 |
FieldMap putAll(Map<String, Field> fieldMap); | FieldMap putAll(Map<String, Field> fieldMap); | /**
* Add or update all fields in the given map.
*
* @param fieldMap
* @return
*/ | Add or update all fields in the given map | putAll | {
"repo_name": "gentics/mesh",
"path": "rest-model/src/main/java/com/gentics/mesh/core/rest/node/FieldMap.java",
"license": "apache-2.0",
"size": 7605
} | [
"com.gentics.mesh.core.rest.node.field.Field",
"java.util.Map"
] | import com.gentics.mesh.core.rest.node.field.Field; import java.util.Map; | import com.gentics.mesh.core.rest.node.field.*; import java.util.*; | [
"com.gentics.mesh",
"java.util"
] | com.gentics.mesh; java.util; | 2,278,851 |
protected Cluster findCluster(String name) {
Cluster cluster = null;
try {
cluster = name == null ? null : getCluster(name);
} catch (AmbariException e) {
// do nothing
}
return cluster;
} | Cluster function(String name) { Cluster cluster = null; try { cluster = name == null ? null : getCluster(name); } catch (AmbariException e) { } return cluster; } | /**
* Find the cluster for the given name.
*
* @param name the cluster name
*
* @return the cluster for the given name; null if the cluster can not be found
*/ | Find the cluster for the given name | findCluster | {
"repo_name": "zouzhberk/ambaridemo",
"path": "demo-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java",
"license": "apache-2.0",
"size": 29800
} | [
"org.apache.ambari.server.AmbariException",
"org.apache.ambari.server.state.Cluster"
] | import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.state.Cluster; | import org.apache.ambari.server.*; import org.apache.ambari.server.state.*; | [
"org.apache.ambari"
] | org.apache.ambari; | 341,264 |
static ByteBuffer stashIntN(ByteBuffer target, @N int value) {
if (value < 0)
throw new IllegalArgumentException("@N int value must be positive, but it is " + value);
while (value > Byte.MAX_VALUE) {
target.put((byte) (0x80 | (value & 0x7F)));
value >>>= 7;
}
return t... | static ByteBuffer stashIntN(ByteBuffer target, @N int value) { if (value < 0) throw new IllegalArgumentException(STR + value); while (value > Byte.MAX_VALUE) { target.put((byte) (0x80 (value & 0x7F))); value >>>= 7; } return target.put((byte) value); } | /**
* Write a positive (and small) int value.
*
* @param target buffer to write to
* @param value int >= 0 to be written
*/ | Write a positive (and small) int value | stashIntN | {
"repo_name": "sormuras/stash",
"path": "com.github.sormuras.stash/main/java/com/github/sormuras/stash/Stashable.java",
"license": "apache-2.0",
"size": 11354
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,052,821 |
@Override protected void failed() {
final Locale locale = getLocale();
setErrorMessage(Resources.forLocale(locale).getString(Resources.Keys.CanNotUseRefSys_1,
IdentifiedObjects.getDisplayName(crs, locale)), getException());
... | @Override void function() { final Locale locale = getLocale(); setErrorMessage(Resources.forLocale(locale).getString(Resources.Keys.CanNotUseRefSys_1, IdentifiedObjects.getDisplayName(crs, locale)), getException()); selectedSystem.set(format.getDefaultCRS()); resetPositionCRS(Styles.ERROR_TEXT); } @Override protected C... | /**
* Invoked in JavaFX thread on failure. The previous CRS is kept unchanged but
* the coordinates will appear in red for telling user that there is a problem.
*/ | Invoked in JavaFX thread on failure. The previous CRS is kept unchanged but the coordinates will appear in red for telling user that there is a problem | failed | {
"repo_name": "apache/sis",
"path": "application/sis-javafx/src/main/java/org/apache/sis/gui/map/StatusBar.java",
"license": "apache-2.0",
"size": 63362
} | [
"java.util.Locale",
"org.apache.sis.internal.gui.Resources",
"org.apache.sis.internal.gui.Styles",
"org.apache.sis.referencing.IdentifiedObjects"
] | import java.util.Locale; import org.apache.sis.internal.gui.Resources; import org.apache.sis.internal.gui.Styles; import org.apache.sis.referencing.IdentifiedObjects; | import java.util.*; import org.apache.sis.internal.gui.*; import org.apache.sis.referencing.*; | [
"java.util",
"org.apache.sis"
] | java.util; org.apache.sis; | 237,748 |
@ServiceMethod(returns = ReturnType.SINGLE)
EventSourceResourceInner update(
String resourceGroupName,
String environmentName,
String eventSourceName,
EventSourceUpdateParameters eventSourceUpdateParameters); | @ServiceMethod(returns = ReturnType.SINGLE) EventSourceResourceInner update( String resourceGroupName, String environmentName, String eventSourceName, EventSourceUpdateParameters eventSourceUpdateParameters); | /**
* Updates the event source with the specified name in the specified subscription, resource group, and environment.
*
* @param resourceGroupName Name of an Azure Resource group.
* @param environmentName The name of the Time Series Insights environment associated with the specified resource
*... | Updates the event source with the specified name in the specified subscription, resource group, and environment | update | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/timeseriesinsights/azure-resourcemanager-timeseriesinsights/src/main/java/com/azure/resourcemanager/timeseriesinsights/fluent/EventSourcesClient.java",
"license": "mit",
"size": 11625
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.timeseriesinsights.fluent.models.EventSourceResourceInner",
"com.azure.resourcemanager.timeseriesinsights.models.EventSourceUpdateParameters"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.timeseriesinsights.fluent.models.EventSourceResourceInner; import com.azure.resourcemanager.timeseriesinsights.models.EventSourceUpdateParameters; | import com.azure.core.annotation.*; import com.azure.resourcemanager.timeseriesinsights.fluent.models.*; import com.azure.resourcemanager.timeseriesinsights.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 925,329 |
public Iterator<IGroupMember> getAllMembers() throws GroupsException; | Iterator<IGroupMember> function() throws GroupsException; | /**
* Returns an <code>Iterator</code> over the <code>Set</code> of recursively-retrieved
* <code>IGroupMembers</code> that are members of <code>this</code>.
* @return java.util.Iterator
*/ | Returns an <code>Iterator</code> over the <code>Set</code> of recursively-retrieved <code>IGroupMembers</code> that are members of <code>this</code> | getAllMembers | {
"repo_name": "UW-Madison-DoIT/portal-abstraction-api",
"path": "src/main/java/edu/wisc/my/apilayer/groups/IGroupMember.java",
"license": "bsd-3-clause",
"size": 9462
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 943,221 |
protected StructuredDocumentEvent checkForComments() {
StructuredDocumentEvent result = checkForCriticalKey(""); //$NON-NLS-1$
}
return result != null ? result : super.checkForComments();
}
| StructuredDocumentEvent function() { StructuredDocumentEvent result = checkForCriticalKey(""); } return result != null ? result : super.checkForComments(); } | /**
* Adding the support to php comments
*/ | Adding the support to php comments | checkForComments | {
"repo_name": "angelozerr/eclipse-wtp-freemarker",
"path": "org.eclipse.freemarker.core/src/org/eclipse/freemarker/internal/core/documentModel/parser/FMStructuredDocumentReParser.java",
"license": "mit",
"size": 3102
} | [
"org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentEvent"
] | import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentEvent; | import org.eclipse.wst.sse.core.internal.provisional.events.*; | [
"org.eclipse.wst"
] | org.eclipse.wst; | 1,440,316 |
public void freeSlots(Collection<WorkerSlot> slots) {
if (slots != null) {
for (WorkerSlot slot : slots) {
freeSlot(slot);
}
}
} | void function(Collection<WorkerSlot> slots) { if (slots != null) { for (WorkerSlot slot : slots) { freeSlot(slot); } } } | /**
* free the slots.
*
* @param slots multiple slots to free
*/ | free the slots | freeSlots | {
"repo_name": "ujfjhz/storm",
"path": "storm-server/src/main/java/org/apache/storm/scheduler/Cluster.java",
"license": "apache-2.0",
"size": 39397
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 820,084 |
public void execute() {
if (postRequest != null) {
postRequest.execute();
} else {
openLoginDialog();
}
}
private PostRequestCallback loginDialogPostRequestListener = new PostRequestCallback() { | void function() { if (postRequest != null) { postRequest.execute(); } else { openLoginDialog(); } } private PostRequestCallback loginDialogPostRequestListener = new PostRequestCallback() { | /**
* Tries to execute the post request with the given authentication token. If
* it wasn't given in the constructor, the login dialog is opened immediately.
*/ | Tries to execute the post request with the given authentication token. If it wasn't given in the constructor, the login dialog is opened immediately | execute | {
"repo_name": "nilewapp/BokBytarAppen",
"path": "src/com/mooo/nilewapps/bokbytarappen/server/LoginPostRequest.java",
"license": "apache-2.0",
"size": 4371
} | [
"com.mooo.nilewapps.bokbytarappen.server.PostRequest"
] | import com.mooo.nilewapps.bokbytarappen.server.PostRequest; | import com.mooo.nilewapps.bokbytarappen.server.*; | [
"com.mooo.nilewapps"
] | com.mooo.nilewapps; | 2,259,887 |
public List<ShardRouting> assignedShards() {
return this.assignedShards;
} | List<ShardRouting> function() { return this.assignedShards; } | /**
* Returns a {@link List} of assigned shards
*
* @return a {@link List} of shards
*/ | Returns a <code>List</code> of assigned shards | assignedShards | {
"repo_name": "strapdata/elassandra-test",
"path": "core/src/main/java/org/elasticsearch/cluster/routing/IndexShardRoutingTable.java",
"license": "apache-2.0",
"size": 25832
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,445,756 |
public IndicatorData getIndicatorData() {
return new IndicatorData();
} | IndicatorData function() { return new IndicatorData(); } | /** Get indicator data INDICATOR exporter
*
* @return indicator data for INDICATOR exporter
*/ | Get indicator data INDICATOR exporter | getIndicatorData | {
"repo_name": "nextreports/nextreports-engine",
"path": "src/ro/nextreports/engine/chart/ChartRunner.java",
"license": "apache-2.0",
"size": 14930
} | [
"ro.nextreports.engine.exporter.util.IndicatorData"
] | import ro.nextreports.engine.exporter.util.IndicatorData; | import ro.nextreports.engine.exporter.util.*; | [
"ro.nextreports.engine"
] | ro.nextreports.engine; | 67,344 |
public static void info(Object msg) {
log(msg, Level.INFO);
} | static void function(Object msg) { log(msg, Level.INFO); } | /**
* Indicates a certain point has been reached successfully and may <br />
* print state information. <br />
* <br />
* This is the Level that should be generally used in normal cases. <br />
*
* @param msg
*/ | Indicates a certain point has been reached successfully and may print state information. This is the Level that should be generally used in normal cases. | info | {
"repo_name": "Matt529/Argus-Installer2",
"path": "src/com/mattc/argus2/util/Console.java",
"license": "gpl-3.0",
"size": 14327
} | [
"org.apache.log4j.Level"
] | import org.apache.log4j.Level; | import org.apache.log4j.*; | [
"org.apache.log4j"
] | org.apache.log4j; | 1,029,921 |
public static <T> T getBean(ServletContext servletContext,Class<T> requiredType){
WebApplicationContext webApplicationContext = getWebApplicationContext(servletContext);
return getBean(webApplicationContext, requiredType);
}
//--------------------------------------------------------------- | static <T> T function(ServletContext servletContext,Class<T> requiredType){ WebApplicationContext webApplicationContext = getWebApplicationContext(servletContext); return getBean(webApplicationContext, requiredType); } | /**
* Gets the bean.
*
* @param <T>
* the generic type
* @param servletContext
* the servlet context
* @param requiredType
* the required type
* @return the bean
*/ | Gets the bean | getBean | {
"repo_name": "venusdrogon/feilong-spring",
"path": "feilong-spring-web/src/main/java/com/feilong/spring/web/util/WebSpringUtil.java",
"license": "apache-2.0",
"size": 14600
} | [
"javax.servlet.ServletContext",
"org.springframework.web.context.WebApplicationContext"
] | import javax.servlet.ServletContext; import org.springframework.web.context.WebApplicationContext; | import javax.servlet.*; import org.springframework.web.context.*; | [
"javax.servlet",
"org.springframework.web"
] | javax.servlet; org.springframework.web; | 2,236,433 |
@Test
public void testExpiredRenewableTicket() throws Exception
{
// Get the mutable ticket part.
KerberosPrincipal clientPrincipal = new KerberosPrincipal( "hnelson@EXAMPLE.COM" );
EncTicketPart encTicketPart = getTicketArchetype( clientPrincipal );
// Make changes to test.... | void function() throws Exception { KerberosPrincipal clientPrincipal = new KerberosPrincipal( STR ); EncTicketPart encTicketPart = getTicketArchetype( clientPrincipal ); encTicketPart.setFlag( TicketFlag.RENEWABLE ); encTicketPart.setRenewTill( new KerberosTime( 0 ) ); KerberosPrincipal serverPrincipal = new KerberosPr... | /**
* As is the case for all application servers, expired tickets are not accepted
* by the TGS, so once a renewable or TGT expires, the client must use a separate
* exchange to obtain valid tickets.
*
* @throws Exception
*/ | As is the case for all application servers, expired tickets are not accepted by the TGS, so once a renewable or TGT expires, the client must use a separate exchange to obtain valid tickets | testExpiredRenewableTicket | {
"repo_name": "drankye/directory-server",
"path": "protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingServiceTest.java",
"license": "apache-2.0",
"size": 81600
} | [
"javax.security.auth.kerberos.KerberosPrincipal",
"org.apache.directory.shared.kerberos.KerberosTime",
"org.apache.directory.shared.kerberos.codec.options.KdcOptions",
"org.apache.directory.shared.kerberos.components.EncTicketPart",
"org.apache.directory.shared.kerberos.components.EncryptionKey",
"org.apa... | import javax.security.auth.kerberos.KerberosPrincipal; import org.apache.directory.shared.kerberos.KerberosTime; import org.apache.directory.shared.kerberos.codec.options.KdcOptions; import org.apache.directory.shared.kerberos.components.EncTicketPart; import org.apache.directory.shared.kerberos.components.EncryptionKe... | import javax.security.auth.kerberos.*; import org.apache.directory.shared.kerberos.*; import org.apache.directory.shared.kerberos.codec.options.*; import org.apache.directory.shared.kerberos.components.*; import org.apache.directory.shared.kerberos.exceptions.*; import org.apache.directory.shared.kerberos.flags.*; impo... | [
"javax.security",
"org.apache.directory",
"org.junit"
] | javax.security; org.apache.directory; org.junit; | 894,498 |
void checkOutputSpecs(FileSystem ignored, JobConf job) throws IOException; | void checkOutputSpecs(FileSystem ignored, JobConf job) throws IOException; | /**
* Check for validity of the output-specification for the job.
*
* <p>This is to validate the output specification for the job when it is
* a job is submitted. Typically checks that it does not already exist,
* throwing an exception when it already exists, so that output is not
* overwritten.</... | Check for validity of the output-specification for the job. This is to validate the output specification for the job when it is a job is submitted. Typically checks that it does not already exist, throwing an exception when it already exists, so that output is not overwritten | checkOutputSpecs | {
"repo_name": "mammothcm/mammoth",
"path": "src/org/apache/hadoop/mapred/OutputFormat.java",
"license": "apache-2.0",
"size": 2662
} | [
"java.io.IOException",
"org.apache.hadoop.fs.FileSystem"
] | import java.io.IOException; import org.apache.hadoop.fs.FileSystem; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 357,135 |
@Override
public int read() throws IOException {
if (closed) {
throw new FileItemStream.ItemSkippedException();
}
if (available() == 0) {
if (makeAvailable() == 0) {
return -1;
}
}
... | int function() throws IOException { if (closed) { throw new FileItemStream.ItemSkippedException(); } if (available() == 0) { if (makeAvailable() == 0) { return -1; } } ++total; int b = buffer[head++]; if (b >= 0) { return b; } return b + BYTE_POSITIVE_OFFSET; } | /**
* Returns the next byte in the stream.
* @return The next byte in the stream, as a non-negative
* integer, or -1 for EOF.
* @throws IOException An I/O error occurred.
*/ | Returns the next byte in the stream | read | {
"repo_name": "chvrga/outdoor-explorer",
"path": "java/play-1.4.4/framework/src/play/data/parsing/MultipartStream.java",
"license": "mit",
"size": 32498
} | [
"java.io.IOException",
"org.apache.commons.fileupload.FileItemStream"
] | import java.io.IOException; import org.apache.commons.fileupload.FileItemStream; | import java.io.*; import org.apache.commons.fileupload.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 177,828 |
public static String gensalt(int log_rounds) {
return gensalt(log_rounds, new SecureRandom());
} | static String function(int log_rounds) { return gensalt(log_rounds, new SecureRandom()); } | /**
* Generate a salt for use with the BCrypt.hashpw() method
* @param log_rounds the log2 of the number of rounds of
* hashing to apply - the work factor therefore increases as
* 2**log_rounds.
* @return an encoded salt value
*/ | Generate a salt for use with the BCrypt.hashpw() method | gensalt | {
"repo_name": "paylogic/ScanwareLitev2",
"path": "src/com/paylogic/scanwarelite/security/BCrypt.java",
"license": "mit",
"size": 27246
} | [
"java.security.SecureRandom"
] | import java.security.SecureRandom; | import java.security.*; | [
"java.security"
] | java.security; | 675,036 |
public void setOperationAttributeDefaults()
{
if (operationAttributes == null)
operationAttributes = new HashAttributeSet();
operationAttributes.add(AttributesCharset.UTF8);
operationAttributes.add(AttributesNaturalLanguage.EN);
} | void function() { if (operationAttributes == null) operationAttributes = new HashAttributeSet(); operationAttributes.add(AttributesCharset.UTF8); operationAttributes.add(AttributesNaturalLanguage.EN); } | /**
* Adds the default values for the operation
* attributes "attributes-charset" and
* "attributes-natural-language"
*/ | Adds the default values for the operation attributes "attributes-charset" and "attributes-natural-language" | setOperationAttributeDefaults | {
"repo_name": "embecosm/avr32-gcc",
"path": "libjava/classpath/gnu/javax/print/ipp/IppRequest.java",
"license": "gpl-2.0",
"size": 30898
} | [
"gnu.javax.print.ipp.attribute.job.AttributesCharset",
"gnu.javax.print.ipp.attribute.job.AttributesNaturalLanguage",
"javax.print.attribute.HashAttributeSet"
] | import gnu.javax.print.ipp.attribute.job.AttributesCharset; import gnu.javax.print.ipp.attribute.job.AttributesNaturalLanguage; import javax.print.attribute.HashAttributeSet; | import gnu.javax.print.ipp.attribute.job.*; import javax.print.attribute.*; | [
"gnu.javax.print",
"javax.print"
] | gnu.javax.print; javax.print; | 1,977,698 |
public static void addColumn(Database database, String tableName, String columnName,
Type type)
throws SQLException {
Connection connection = database.getConnection();
if (DatabaseUtil.tableExists(connection, tableName)) {
try {
add... | static void function(Database database, String tableName, String columnName, Type type) throws SQLException { Connection connection = database.getConnection(); if (DatabaseUtil.tableExists(connection, tableName)) { try { addColumn(connection, tableName, columnName, type); } finally { connection.close(); } } } | /**
* Add a column in the table specified in input. A connection is obtained to the database
* and automatically released after the addition of the column.
* @param database the database to use
* @param tableName the table where to add the column
* @param columnName the column to add
* @pa... | Add a column in the table specified in input. A connection is obtained to the database and automatically released after the addition of the column | addColumn | {
"repo_name": "JoeCarlson/intermine",
"path": "intermine/objectstore/main/src/org/intermine/sql/DatabaseUtil.java",
"license": "lgpl-2.1",
"size": 34017
} | [
"java.sql.Connection",
"java.sql.SQLException"
] | import java.sql.Connection; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 889,835 |
public Resource nextResource() throws XMLDBException {
return getResource(pos++);
}
}
| Resource function() throws XMLDBException { return getResource(pos++); } } | /**
* Description of the Method
*
*@return Description of the Return Value
*@exception XMLDBException Description of the Exception
*/ | Description of the Method | nextResource | {
"repo_name": "NCIP/cadsr-cgmdr-nci-uk",
"path": "src/org/exist/xmldb/LocalResourceSet.java",
"license": "bsd-3-clause",
"size": 8860
} | [
"org.xmldb.api.base.Resource",
"org.xmldb.api.base.XMLDBException"
] | import org.xmldb.api.base.Resource; import org.xmldb.api.base.XMLDBException; | import org.xmldb.api.base.*; | [
"org.xmldb.api"
] | org.xmldb.api; | 2,043,903 |
private RealModeAddress getMode2Address() throws MemoryException {
switch (m_memIndex) {
case 0:
return new RealModeAddress(m_state.getDS(),
(short)(m_state.getBX() + m_state.getSI() + m_fetcher.nextWord()));
case 1:
return ne... | RealModeAddress function() throws MemoryException { switch (m_memIndex) { case 0: return new RealModeAddress(m_state.getDS(), (short)(m_state.getBX() + m_state.getSI() + m_fetcher.nextWord())); case 1: return new RealModeAddress(m_state.getDS(), (short)(m_state.getBX() + m_state.getDI() + m_fetcher.nextWord())); case 2... | /**
* Decodes the indirect-memory operand corresponding to mode #2.
* @return the real-mode address to which the indirect-memory operand
* refers to.
* @throws MemoryException on any error while reading from memory.
*/ | Decodes the indirect-memory operand corresponding to mode #2 | getMode2Address | {
"repo_name": "codeguru-il/corewars8086",
"path": "src/main/java/il/co/codeguru/corewars8086/cpu/IndirectAddressingDecoder.java",
"license": "apache-2.0",
"size": 12047
} | [
"il.co.codeguru.corewars8086.memory.MemoryException",
"il.co.codeguru.corewars8086.memory.RealModeAddress"
] | import il.co.codeguru.corewars8086.memory.MemoryException; import il.co.codeguru.corewars8086.memory.RealModeAddress; | import il.co.codeguru.corewars8086.memory.*; | [
"il.co.codeguru"
] | il.co.codeguru; | 1,041,074 |
@SideOnly(Side.CLIENT)
public ResourceLocation getBossBarTexture(); | @SideOnly(Side.CLIENT) ResourceLocation function(); | /**
* The ResourceLocation to bind for this boss's boss bar.
* You can use BotaniaAPI.internalMethodHandler.getDefaultBossBarTexture() to get
* the one used by botania bosses.
*/ | The ResourceLocation to bind for this boss's boss bar. You can use BotaniaAPI.internalMethodHandler.getDefaultBossBarTexture() to get the one used by botania bosses | getBossBarTexture | {
"repo_name": "Tombenpotter/Icarus",
"path": "src/main/java/vazkii/botania/api/boss/IBotaniaBoss.java",
"license": "gpl-3.0",
"size": 2155
} | [
"net.minecraft.util.ResourceLocation"
] | import net.minecraft.util.ResourceLocation; | import net.minecraft.util.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 1,371,332 |
public MouseHandlerFX getMouseHandler(String id) {
for (MouseHandlerFX h: this.availableMouseHandlers) {
if (h.getID().equals(id)) {
return h;
}
}
for (MouseHandlerFX h: this.auxiliaryMouseHandlers) {
if (h.getID().equals(id)) {
... | MouseHandlerFX function(String id) { for (MouseHandlerFX h: this.availableMouseHandlers) { if (h.getID().equals(id)) { return h; } } for (MouseHandlerFX h: this.auxiliaryMouseHandlers) { if (h.getID().equals(id)) { return h; } } return null; } | /**
* Returns the mouse handler with the specified ID, or {@code null} if
* there is no handler with that ID. This method will look for handlers
* in both the regular and auxiliary handler lists.
*
* @param id the ID ({@code null} not permitted).
*
* @return The handler with the s... | Returns the mouse handler with the specified ID, or null if there is no handler with that ID. This method will look for handlers in both the regular and auxiliary handler lists | getMouseHandler | {
"repo_name": "jfree/jfreechart-fse",
"path": "src/main/java/org/jfree/chart/fx/ChartCanvas.java",
"license": "lgpl-2.1",
"size": 23025
} | [
"org.jfree.chart.fx.interaction.MouseHandlerFX"
] | import org.jfree.chart.fx.interaction.MouseHandlerFX; | import org.jfree.chart.fx.interaction.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,987,842 |
public final SQLName getSQLName(DBStructureItem ancestor, boolean includeAncestor) {
final List<String> res = new ArrayList<String>();
SQLIdentifier current = this;
while (current != null && !current.isAlterEgoOf(ancestor)) {
res.add(0, current.getName());
curren... | final SQLName function(DBStructureItem ancestor, boolean includeAncestor) { final List<String> res = new ArrayList<String>(); SQLIdentifier current = this; while (current != null && !current.isAlterEgoOf(ancestor)) { res.add(0, current.getName()); current = current.getParent() instanceof SQLIdentifier ? (SQLIdentifier)... | /**
* The name from <code>ancestor</code>.
*
* @param ancestor an ancestor of this, <code>null</code> meaning the root, eg base.
* @param includeAncestor whether to include <code>ancestor</code> in the name (if it's not
* <code>null</code>), eg <code>false</code>.
* @return t... | The name from <code>ancestor</code> | getSQLName | {
"repo_name": "mbshopM/openconcerto",
"path": "OpenConcerto/src/org/openconcerto/sql/model/SQLIdentifier.java",
"license": "gpl-3.0",
"size": 5369
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,970,887 |
TScreenFieldBean loadByParentAndIndex(Integer parentID,Integer row,Integer col);
| TScreenFieldBean loadByParentAndIndex(Integer parentID,Integer row,Integer col); | /**
* Loads field from parent on given position
* @param parentID
* @return
*/ | Loads field from parent on given position | loadByParentAndIndex | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/dao/ScreenFieldDAO.java",
"license": "gpl-3.0",
"size": 2060
} | [
"com.aurel.track.beans.TScreenFieldBean"
] | import com.aurel.track.beans.TScreenFieldBean; | import com.aurel.track.beans.*; | [
"com.aurel.track"
] | com.aurel.track; | 541,834 |
private void deallocate(final ResourceContainer container)
throws ServerNotAllocatedException {
if (this.allocatedServers.contains(container)) {
this.notAllocatedServers.add(container);
this.allocatedServers.remove(container);
LOG.info("Deallocate-Operation successfull");
} else {
throw new Server... | void function(final ResourceContainer container) throws ServerNotAllocatedException { if (this.allocatedServers.contains(container)) { this.notAllocatedServers.add(container); this.allocatedServers.remove(container); LOG.info(STR); } else { throw new ServerNotAllocatedException(); } } | /**
* Method that represents the deallocation-operation of the
* ReconfigurationPlanMetaMode.
*
* @param container
* ResourceContainer which is after the execution of this method
* not longer available.
* @throws ServerNotAllocatedException
*/ | Method that represents the deallocation-operation of the ReconfigurationPlanMetaMode | deallocate | {
"repo_name": "SLAsticSPE/slastic",
"path": "src/plugins/kieker/tools/slastic/plugins/pcm/control/modelManager/ModelManager.java",
"license": "apache-2.0",
"size": 22462
} | [
"de.uka.ipd.sdq.pcm.resourceenvironment.ResourceContainer"
] | import de.uka.ipd.sdq.pcm.resourceenvironment.ResourceContainer; | import de.uka.ipd.sdq.pcm.resourceenvironment.*; | [
"de.uka.ipd"
] | de.uka.ipd; | 2,907,789 |
@Test
public void testExpressionTemplateWithSimpleExpression()
{
ExpressionTemplate t = new ExpressionTemplate("${simple}");
assertEquals(StringUtils.createKey(0), t.getTemplate());
assertEquals(1, t.getEntities().size());
assertEquals("simple", t.getEntities().get(StringUtils.createKey... | void function() { ExpressionTemplate t = new ExpressionTemplate(STR); assertEquals(StringUtils.createKey(0), t.getTemplate()); assertEquals(1, t.getEntities().size()); assertEquals(STR, t.getEntities().get(StringUtils.createKey(0)).getKey()); assertEquals(STR, t.getSubstitution()); assertEquals("", t.getValue()); } | /**
* Checks ExpressionTemplate for a text with simple expression
*/ | Checks ExpressionTemplate for a text with simple expression | testExpressionTemplateWithSimpleExpression | {
"repo_name": "jandsu/ironjacamar",
"path": "testsuite/src/test/java/org/ironjacamar/common/metadata/common/ExpressionTemplateTestCase.java",
"license": "epl-1.0",
"size": 33024
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,959,544 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.