method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public void open() throws IOException, InterruptedException, ExecutionException { running = true; pollThread.start(); }
void function() throws IOException, InterruptedException, ExecutionException { running = true; pollThread.start(); }
/** * Attempts to create a connection to the MiOS host and begin listening for updates over the async HTTP connection. * * @throws ExecutionException * @throws InterruptedException * @throws IOException */
Attempts to create a connection to the MiOS host and begin listening for updates over the async HTTP connection
open
{ "repo_name": "druciak/openhab", "path": "bundles/binding/org.openhab.binding.mios/src/main/java/org/openhab/binding/mios/internal/MiosUnitConnector.java", "license": "epl-1.0", "size": 36055 }
[ "java.io.IOException", "java.util.concurrent.ExecutionException" ]
import java.io.IOException; import java.util.concurrent.ExecutionException;
import java.io.*; import java.util.concurrent.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,762,363
public JavaField getField(String name) { ArrayList<JavaField> fieldList = getFieldList(); for (int i = 0; i < fieldList.size(); i++) { JavaField field = fieldList.get(i); if (field.getName().equals(name)) return field; } return null; }
JavaField function(String name) { ArrayList<JavaField> fieldList = getFieldList(); for (int i = 0; i < fieldList.size(); i++) { JavaField field = fieldList.get(i); if (field.getName().equals(name)) return field; } return null; }
/** * Returns a fields. */
Returns a fields
getField
{ "repo_name": "dwango/quercus", "path": "src/main/java/com/caucho/bytecode/JavaClass.java", "license": "gpl-2.0", "size": 16398 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
739,763
@Test void testHexStringToString() { assertThat("parse ABC as string", ParseUtil.hexStringToString("414243"), is("ABC")); assertThat("parse ab00cd as string", ParseUtil.hexStringToString("ab00cd"), is("ab00cd")); assertThat("parse ab88cd as string", ParseUtil.hexStringToString("ab88cd"),...
void testHexStringToString() { assertThat(STR, ParseUtil.hexStringToString(STR), is("ABC")); assertThat(STR, ParseUtil.hexStringToString(STR), is(STR)); assertThat(STR, ParseUtil.hexStringToString(STR), is(STR)); assertThat(STR, ParseUtil.hexStringToString(STR), is(STR)); assertThat(STR, ParseUtil.hexStringToString("32...
/** * Test hex string to string */
Test hex string to string
testHexStringToString
{ "repo_name": "dbwiddis/oshi", "path": "oshi-core/src/test/java/oshi/util/ParseUtilTest.java", "license": "mit", "size": 34815 }
[ "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers" ]
import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers;
import org.hamcrest.*;
[ "org.hamcrest" ]
org.hamcrest;
290,243
public int removeRole(User loggedInUser, String login, String role) throws FaultException { validateRoleInputs(role, loggedInUser); if (RoleFactory.SAT_ADMIN.getLabel().equals(role)) { return modifySatAdminRole(loggedInUser, login, false); } ensureOrgAdmin(logge...
int function(User loggedInUser, String login, String role) throws FaultException { validateRoleInputs(role, loggedInUser); if (RoleFactory.SAT_ADMIN.getLabel().equals(role)) { return modifySatAdminRole(loggedInUser, login, false); } ensureOrgAdmin(loggedInUser); User target = XmlRpcUserHelper.getInstance().lookupTarget...
/** * Removes a role from the given user * @param loggedInUser The current user * @param login The login for the user you would like to remove the role from * @param role The role you would like to remove from the user * @return Returns 1 if successful (exception otherwise) * @throws Fault...
Removes a role from the given user
removeRole
{ "repo_name": "mcalmer/spacewalk", "path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/user/UserHandler.java", "license": "gpl-2.0", "size": 51237 }
[ "com.redhat.rhn.FaultException", "com.redhat.rhn.domain.role.Role", "com.redhat.rhn.domain.role.RoleFactory", "com.redhat.rhn.domain.user.User", "com.redhat.rhn.frontend.xmlrpc.PermissionCheckFailureException", "com.redhat.rhn.manager.user.UserManager" ]
import com.redhat.rhn.FaultException; import com.redhat.rhn.domain.role.Role; import com.redhat.rhn.domain.role.RoleFactory; import com.redhat.rhn.domain.user.User; import com.redhat.rhn.frontend.xmlrpc.PermissionCheckFailureException; import com.redhat.rhn.manager.user.UserManager;
import com.redhat.rhn.*; import com.redhat.rhn.domain.role.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.xmlrpc.*; import com.redhat.rhn.manager.user.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
1,227,471
public Person getAuthor() { return commit.getAuthor(); } /** * {@inheritDoc}
Person function() { return commit.getAuthor(); } /** * {@inheritDoc}
/** * Returns the author of the commit. * * @return the author of the commit. */
Returns the author of the commit
getAuthor
{ "repo_name": "sealuzh/Permo", "path": "Permo/src/ch/uzh/ifi/seal/permo/history/git/ui/viewmodel/CommitViewModel.java", "license": "apache-2.0", "size": 3252 }
[ "ch.uzh.ifi.seal.permo.history.git.core.model.Person" ]
import ch.uzh.ifi.seal.permo.history.git.core.model.Person;
import ch.uzh.ifi.seal.permo.history.git.core.model.*;
[ "ch.uzh.ifi" ]
ch.uzh.ifi;
958,444
public static long getDirectorySize(String filePath) throws IOException { FileType fileType = getFileType(filePath); switch (fileType) { case HDFS: case ALLUXIO: case VIEWFS: case S3: Path path = new Path(filePath); FileSystem fs = path.getFileSystem(getConfiguration())...
static long function(String filePath) throws IOException { FileType fileType = getFileType(filePath); switch (fileType) { case HDFS: case ALLUXIO: case VIEWFS: case S3: Path path = new Path(filePath); FileSystem fs = path.getFileSystem(getConfiguration()); return fs.getContentSummary(path).getLength(); case LOCAL: defa...
/** * It computes size of directory * * @param filePath * @return size in bytes * @throws IOException */
It computes size of directory
getDirectorySize
{ "repo_name": "sgururajshetty/carbondata", "path": "core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java", "license": "apache-2.0", "size": 18279 }
[ "java.io.File", "java.io.IOException", "org.apache.commons.io.FileUtils", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path" ]
import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
import java.io.*; import org.apache.commons.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.commons", "org.apache.hadoop" ]
java.io; org.apache.commons; org.apache.hadoop;
2,015,299
public Role.Record getRecord(Connection c) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = "role.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.re...
Role.Record function(Connection c) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object resu...
/** * Get a record containing the current state of the given role. * * @return all fields from the object */
Get a record containing the current state of the given role
getRecord
{ "repo_name": "guzy/OnceCenter", "path": "src/com/once/xenapi/Role.java", "license": "apache-2.0", "size": 12771 }
[ "com.once.xenapi.Types", "java.util.Map", "org.apache.xmlrpc.XmlRpcException" ]
import com.once.xenapi.Types; import java.util.Map; import org.apache.xmlrpc.XmlRpcException;
import com.once.xenapi.*; import java.util.*; import org.apache.xmlrpc.*;
[ "com.once.xenapi", "java.util", "org.apache.xmlrpc" ]
com.once.xenapi; java.util; org.apache.xmlrpc;
2,541,436
Set<ConfigurationSourceKey> getExternalConfigurations();
Set<ConfigurationSourceKey> getExternalConfigurations();
/** * Get set of external configurations * * @return set with external configuration */
Get set of external configurations
getExternalConfigurations
{ "repo_name": "anotheria/configureme", "path": "src/main/java/org/configureme/Configuration.java", "license": "mit", "size": 1609 }
[ "java.util.Set", "org.configureme.sources.ConfigurationSourceKey" ]
import java.util.Set; import org.configureme.sources.ConfigurationSourceKey;
import java.util.*; import org.configureme.sources.*;
[ "java.util", "org.configureme.sources" ]
java.util; org.configureme.sources;
231,771
public static synchronized boolean syncModules(Context context, String account, String sessionId) throws SugarCrmException { if (databaseHelper == null) databaseHelper = new DatabaseHelper(context); List<String> userModules = ContentUtils.getU...
static synchronized boolean function(Context context, String account, String sessionId) throws SugarCrmException { if (databaseHelper == null) databaseHelper = new DatabaseHelper(context); List<String> userModules = ContentUtils.getUserModules(context); SharedPreferences pref = PreferenceManager.getDefaultSharedPrefere...
/** * syncModules, syncs the changes to any modules that are associated with the user * * @param context * a {@link android.content.Context} object. * @param account * a {@link java.lang.String} object. * @param sessionId * a {@link java.lang.Str...
syncModules, syncs the changes to any modules that are associated with the user
syncModules
{ "repo_name": "Imaginea/pancake-android", "path": "src/com/imaginea/android/sugarcrm/sync/SugarSyncManager.java", "license": "apache-2.0", "size": 50197 }
[ "android.content.Context", "android.content.SharedPreferences", "android.preference.PreferenceManager", "android.util.Log", "com.imaginea.android.sugarcrm.provider.ContentUtils", "com.imaginea.android.sugarcrm.provider.DatabaseHelper", "com.imaginea.android.sugarcrm.util.Module", "com.imaginea.android...
import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; import android.util.Log; import com.imaginea.android.sugarcrm.provider.ContentUtils; import com.imaginea.android.sugarcrm.provider.DatabaseHelper; import com.imaginea.android.sugarcrm.util.Module; impo...
import android.content.*; import android.preference.*; import android.util.*; import com.imaginea.android.sugarcrm.provider.*; import com.imaginea.android.sugarcrm.util.*; import java.util.*;
[ "android.content", "android.preference", "android.util", "com.imaginea.android", "java.util" ]
android.content; android.preference; android.util; com.imaginea.android; java.util;
1,280,740
private void deleteWithMaskEnabled() throws IOException { if(consoleBuffer.getBuffer().getLineNoMask().length() > 0) { consoleBuffer.getBuffer().delete(consoleBuffer.getBuffer().getLineNoMask().length() - 1, consoleBuffer.getBuffer().getLineNoMask().length()); consoleBuffer.moveCurso...
void function() throws IOException { if(consoleBuffer.getBuffer().getLineNoMask().length() > 0) { consoleBuffer.getBuffer().delete(consoleBuffer.getBuffer().getLineNoMask().length() - 1, consoleBuffer.getBuffer().getLineNoMask().length()); consoleBuffer.moveCursor(consoleBuffer.getBuffer().getLineNoMask().length()); } ...
/** * A simple hack to ensure that delete works when masking is enabled and * the mask character is set to null (empty). * The only operation that will work when the mask character is set to 0 is * delete. * * @throws IOException */
A simple hack to ensure that delete works when masking is enabled and the mask character is set to null (empty). The only operation that will work when the mask character is set to 0 is delete
deleteWithMaskEnabled
{ "repo_name": "brmeyer/aesh", "path": "src/main/java/org/jboss/aesh/console/AeshInputProcessor.java", "license": "apache-2.0", "size": 20240 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
230,782
public static BigInteger getHash(Board b) { BigInteger result = BigInteger.ZERO; for (int r = 0; r < 8; r++) { for (int f = 0; f < 8; f++) { char pc = b.pieceAt(r, f); if (pc == '.') { continue; } int pcI...
static BigInteger function(Board b) { BigInteger result = BigInteger.ZERO; for (int r = 0; r < 8; r++) { for (int f = 0; f < 8; f++) { char pc = b.pieceAt(r, f); if (pc == '.') { continue; } int pcIx = PieceIndex.get(pc); assert pcIx >= 0 && pcIx <= 12; int sq = squareIndex(r, f); assert sq >= 0 && sq <= 63; result = r...
/** * Calculates hash code for board b * * @param b Board object * @return hash code */
Calculates hash code for board b
getHash
{ "repo_name": "hof/jdrone", "path": "src/main/java/org/maximachess/chess/HashCode.java", "license": "gpl-2.0", "size": 41795 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
1,367,625
private boolean isTileVisible(final ReferencedEnvelope tileBounds) { if (FloatingPointUtil.equals(this.transformer.getRotation(), 0.0)) { return true; } final GeometryFactory gfac = new GeometryFactory(); final Optional<Geometry> rotatedMapBounds = getRotatedMapBounds(gf...
boolean function(final ReferencedEnvelope tileBounds) { if (FloatingPointUtil.equals(this.transformer.getRotation(), 0.0)) { return true; } final GeometryFactory gfac = new GeometryFactory(); final Optional<Geometry> rotatedMapBounds = getRotatedMapBounds(gfac); if (rotatedMapBounds.isPresent()) { return rotatedMapBoun...
/** * When using a map rotation, there might be tiles that are outside the rotated map area. To avoid to load * these tiles, this method checks if a tile is really required to draw the map. */
When using a map rotation, there might be tiles that are outside the rotated map area. To avoid to load these tiles, this method checks if a tile is really required to draw the map
isTileVisible
{ "repo_name": "mapfish/mapfish-print", "path": "core/src/main/java/org/mapfish/print/map/tiled/TilePreparationTask.java", "license": "bsd-2-clause", "size": 10699 }
[ "java.util.Optional", "org.geotools.geometry.jts.ReferencedEnvelope", "org.locationtech.jts.geom.Geometry", "org.locationtech.jts.geom.GeometryFactory", "org.mapfish.print.FloatingPointUtil" ]
import java.util.Optional; import org.geotools.geometry.jts.ReferencedEnvelope; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.GeometryFactory; import org.mapfish.print.FloatingPointUtil;
import java.util.*; import org.geotools.geometry.jts.*; import org.locationtech.jts.geom.*; import org.mapfish.print.*;
[ "java.util", "org.geotools.geometry", "org.locationtech.jts", "org.mapfish.print" ]
java.util; org.geotools.geometry; org.locationtech.jts; org.mapfish.print;
655,155
public void disableTable(final FullyQualifiedTableName tableName) throws IOException;
void function(final FullyQualifiedTableName tableName) throws IOException;
/** * Disable an existing table * @param tableName The table name * @throws IOException */
Disable an existing table
disableTable
{ "repo_name": "francisliu/hbase_namespace", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterServices.java", "license": "apache-2.0", "size": 7709 }
[ "java.io.IOException", "org.apache.hadoop.hbase.FullyQualifiedTableName" ]
import java.io.IOException; import org.apache.hadoop.hbase.FullyQualifiedTableName;
import java.io.*; import org.apache.hadoop.hbase.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
452,577
@ApiOperation(value = URI_ADMIN + "/{username}/enable", notes = "Enables accounts by the given name.") void enable(String username);
@ApiOperation(value = URI_ADMIN + STR, notes = STR) void enable(String username);
/** * Enables accounts by the given name. * * @param username the username to enable accounts. */
Enables accounts by the given name
enable
{ "repo_name": "kparoth/my-modules", "path": "my-modules-core/src/main/java/my/modules/web/user/controller/UserRestController.java", "license": "apache-2.0", "size": 1640 }
[ "io.swagger.annotations.ApiOperation" ]
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,146,119
@MainThread public void showSnackbar(@StringRes int message) { Snackbar.make(mRootView, message, Snackbar.LENGTH_LONG).show(); }
void function(@StringRes int message) { Snackbar.make(mRootView, message, Snackbar.LENGTH_LONG).show(); }
/** * Show a little message on the Snackbar * * @param message A resource ID for a message to display */
Show a little message on the Snackbar
showSnackbar
{ "repo_name": "AEFeinstein/MiniScoreboard", "path": "app/src/main/java/com/gelakinetic/miniscoreboard/activity/MainActivity.java", "license": "gpl-3.0", "size": 25404 }
[ "android.support.annotation.StringRes", "android.support.design.widget.Snackbar" ]
import android.support.annotation.StringRes; import android.support.design.widget.Snackbar;
import android.support.annotation.*; import android.support.design.widget.*;
[ "android.support" ]
android.support;
613,085
public int readInt() throws IOException { if (read(bb, 0, 4) < 4) { throw new EOFException(); } int i = bb[0] << 24 | (bb[1] & 0xFF) << 16 | (bb[2] & 0xFF) << 8 | (bb[3] & 0xFF); return i; }
int function() throws IOException { if (read(bb, 0, 4) < 4) { throw new EOFException(); } int i = bb[0] << 24 (bb[1] & 0xFF) << 16 (bb[2] & 0xFF) << 8 (bb[3] & 0xFF); return i; }
/** Read an integer. * @return The integer value. */
Read an integer
readInt
{ "repo_name": "jankotek/asterope", "path": "skyview/nom/tam/util/BufferedDataInputStream.java", "license": "agpl-3.0", "size": 23604 }
[ "java.io.EOFException", "java.io.IOException" ]
import java.io.EOFException; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,409,242
@NonNull Dimension getDimension();
Dimension getDimension();
/** * Returns the dimension of the component. * * While the component is a member of a container, this should always yield * the same value. As a sole exception to this rule can be seen dimension * changes in response to a parent update. * * @return the component dimension. May <i>never</i> be null */
Returns the dimension of the component. While the component is a member of a container, this should always yield the same value. As a sole exception to this rule can be seen dimension changes in response to a parent update
getDimension
{ "repo_name": "ksmonkey123/WaDosUtil", "path": "waan/ch/waan/game/ui/UIComponent.java", "license": "gpl-3.0", "size": 6142 }
[ "ch.waan.game.Dimension" ]
import ch.waan.game.Dimension;
import ch.waan.game.*;
[ "ch.waan.game" ]
ch.waan.game;
2,361,393
protected JMenu createTemplatesMenu(String name) { NodeTemplates templates = new NodeTemplates(); JMenu submenu = new JMenu(name); // Create submenus HashMap menuMap = new HashMap(); ArrayList categoriesList = templates.getCategories(); in...
JMenu function(String name) { NodeTemplates templates = new NodeTemplates(); JMenu submenu = new JMenu(name); HashMap menuMap = new HashMap(); ArrayList categoriesList = templates.getCategories(); int n = categoriesList.size(); for (int i = 0; i < n; i++) { String category = categoriesList.get(i).toString(); JMenu curr...
/** * Creates JMenu menu using {@link NodeTemplates}. * * @param name * The name of the submenu * @return The JMenu submenu */
Creates JMenu menu using <code>NodeTemplates</code>
createTemplatesMenu
{ "repo_name": "git-moss/Push2Display", "path": "lib/batik-1.8/sources/org/apache/batik/apps/svgbrowser/DOMViewer.java", "license": "lgpl-3.0", "size": 79527 }
[ "java.util.ArrayList", "java.util.HashMap", "javax.swing.JMenu" ]
import java.util.ArrayList; import java.util.HashMap; import javax.swing.JMenu;
import java.util.*; import javax.swing.*;
[ "java.util", "javax.swing" ]
java.util; javax.swing;
1,607,634
public static List<String> getParameterList(DataModel model) { Vector<String> parameterList = new Vector<String>(); parameterList.add(WSDL_LOCATION_OPTION); parameterList.add(model.getWsdlURI()); parameterList.add(GENERATED_CODE_LOCATION); parameterList.add(model.getGeneratedCodeLocation()); if (model....
static List<String> function(DataModel model) { Vector<String> parameterList = new Vector<String>(); parameterList.add(WSDL_LOCATION_OPTION); parameterList.add(model.getWsdlURI()); parameterList.add(GENERATED_CODE_LOCATION); parameterList.add(model.getGeneratedCodeLocation()); if (model.isGenerateServiceDescriptor()) {...
/** * Gets the parameter list. * * @return the parameter list */
Gets the parameter list
getParameterList
{ "repo_name": "chanakaudaya/developer-studio", "path": "app-server/org.wso2.developerstudio.eclipse.artifact.axis2/src/org/wso2/developerstudio/eclipse/artifact/axis2/utils/Axis2ParametersUtils.java", "license": "apache-2.0", "size": 8899 }
[ "java.util.List", "java.util.Vector", "org.wso2.developerstudio.eclipse.artifact.axis2.model.DataModel" ]
import java.util.List; import java.util.Vector; import org.wso2.developerstudio.eclipse.artifact.axis2.model.DataModel;
import java.util.*; import org.wso2.developerstudio.eclipse.artifact.axis2.model.*;
[ "java.util", "org.wso2.developerstudio" ]
java.util; org.wso2.developerstudio;
199,044
EAttribute getCameraInfo_D();
EAttribute getCameraInfo_D();
/** * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.sensor_datatypes.CameraInfo#getD <em>D</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute list '<em>D</em>'. * @see org.ec...
Returns the meta object for the attribute list '<code>org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.sensor_datatypes.CameraInfo#getD D</code>'.
getCameraInfo_D
{ "repo_name": "RobotML/RobotML-SDK-Juno", "path": "plugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotMLLibraries/RobotML_ModelLibrary/RobotML_DataTypes/sensor_datatypes/Sensor_datatypesPackage.java", "license": "epl-1.0", "size": 152447 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
640,580
void onCorruption() { EventLog.writeEvent(EVENT_DB_CORRUPT, getLabel()); mErrorHandler.onCorruption(this); }
void onCorruption() { EventLog.writeEvent(EVENT_DB_CORRUPT, getLabel()); mErrorHandler.onCorruption(this); }
/** * Sends a corruption message to the database error handler. */
Sends a corruption message to the database error handler
onCorruption
{ "repo_name": "szpaddy/android-4.1.2_r2-core", "path": "java/android/database/sqlite/SQLiteDatabase.java", "license": "apache-2.0", "size": 94045 }
[ "android.util.EventLog" ]
import android.util.EventLog;
import android.util.*;
[ "android.util" ]
android.util;
2,449,928
public CollectionFuture<Long> asyncBopIncr(String key, byte[] subkey, int by);
CollectionFuture<Long> function(String key, byte[] subkey, int by);
/** * Increment the element's value in b+tree. * * @param key b+tree item's key * @param subkey element's key (byte-array type key) * @param by increment amount * @return future holding the incremented value */
Increment the element's value in b+tree
asyncBopIncr
{ "repo_name": "jam2in/arcus-java-client", "path": "src/main/java/net/spy/memcached/ArcusClientIF.java", "license": "apache-2.0", "size": 66899 }
[ "net.spy.memcached.internal.CollectionFuture" ]
import net.spy.memcached.internal.CollectionFuture;
import net.spy.memcached.internal.*;
[ "net.spy.memcached" ]
net.spy.memcached;
2,774,845
public static boolean isHoneycomb() { return getSdkVersion() >= Build.VERSION_CODES.HONEYCOMB; }
static boolean function() { return getSdkVersion() >= Build.VERSION_CODES.HONEYCOMB; }
/** * Determine if the device is running API level 11 or higher. */
Determine if the device is running API level 11 or higher
isHoneycomb
{ "repo_name": "BeAlive75/OnePlusAR", "path": "android/OnePlusAR_Framework/src/com/oneplusar/android/util/CompatibilityUtils.java", "license": "apache-2.0", "size": 2399 }
[ "android.os.Build" ]
import android.os.Build;
import android.os.*;
[ "android.os" ]
android.os;
1,126,346
public void testSetNewNestedAttribute() throws Exception { open("/attributesTest/caseSensitivity.app", Mode.DEV); String expected = "Possible Case Sensitivity Issue: Expression 'map.Fruit.blah' on segment 'Fruit'. Possible you meant 'fruit'"; Object actual = getAuraUITestingUtil().getEval("t...
void function() throws Exception { open(STR, Mode.DEV); String expected = STR; Object actual = getAuraUITestingUtil().getEval(STR); Assert.assertEquals(expected, actual); }
/** * Verify Aura error pops up suggesting the proper case when trying to set a nested map attribute with the wrong * case. */
Verify Aura error pops up suggesting the proper case when trying to set a nested map attribute with the wrong case
testSetNewNestedAttribute
{ "repo_name": "badlogicmanpreet/aura", "path": "aura-integration-test/src/test/java/org/auraframework/integration/test/ExpressionServiceCaseSensitivityUITest.java", "license": "apache-2.0", "size": 4274 }
[ "org.auraframework.system.AuraContext", "org.junit.Assert" ]
import org.auraframework.system.AuraContext; import org.junit.Assert;
import org.auraframework.system.*; import org.junit.*;
[ "org.auraframework.system", "org.junit" ]
org.auraframework.system; org.junit;
2,132,681
public void addValue(Float x, Float y, Float radius, String label) { bubbleData.addValue(new BubbleItem(x, y, radius, label)); }
void function(Float x, Float y, Float radius, String label) { bubbleData.addValue(new BubbleItem(x, y, radius, label)); }
/** * Add a value * @param x x * @param y y * @param radius radius * @param label label */
Add a value
addValue
{ "repo_name": "inaiat/jqplot4java", "path": "src/main/java/br/com/digilabs/jqplot/chart/BubbleChart.java", "license": "apache-2.0", "size": 2633 }
[ "br.com.digilabs.jqplot.data.item.BubbleItem" ]
import br.com.digilabs.jqplot.data.item.BubbleItem;
import br.com.digilabs.jqplot.data.item.*;
[ "br.com.digilabs" ]
br.com.digilabs;
2,489,870
void deleteExtSource(PerunSession perunSession, ExtSource extSource) throws InternalErrorException, ExtSourceNotExistsException, PrivilegeException, ExtSourceAlreadyRemovedException;
void deleteExtSource(PerunSession perunSession, ExtSource extSource) throws InternalErrorException, ExtSourceNotExistsException, PrivilegeException, ExtSourceAlreadyRemovedException;
/** * Deletes an external source. * * @param perunSession * @param extSource * * @throws InternalErrorException * @throws ExtSourceExistsException * @throws PrivilegeException * @throws ExtSourceAlreadyRemovedException when 0 rows are affected by deleting from DB */
Deletes an external source
deleteExtSource
{ "repo_name": "ondrocks/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/ExtSourcesManager.java", "license": "bsd-2-clause", "size": 10176 }
[ "cz.metacentrum.perun.core.api.exceptions.ExtSourceAlreadyRemovedException", "cz.metacentrum.perun.core.api.exceptions.ExtSourceNotExistsException", "cz.metacentrum.perun.core.api.exceptions.InternalErrorException", "cz.metacentrum.perun.core.api.exceptions.PrivilegeException" ]
import cz.metacentrum.perun.core.api.exceptions.ExtSourceAlreadyRemovedException; import cz.metacentrum.perun.core.api.exceptions.ExtSourceNotExistsException; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import cz.metacentrum.perun.core.api.exceptions.PrivilegeException;
import cz.metacentrum.perun.core.api.exceptions.*;
[ "cz.metacentrum.perun" ]
cz.metacentrum.perun;
1,239,062
private GrantorInfo becomeGrantor(InternalDistributedMember predecessor) { return GrantorRequestProcessor.becomeGrantor(this, getSerialNumber(), predecessor, ds); } // ------------------------------------------------------------------------- // New external API methods // --------------------------------...
GrantorInfo function(InternalDistributedMember predecessor) { return GrantorRequestProcessor.becomeGrantor(this, getSerialNumber(), predecessor, ds); }
/** * All calls to GrantorRequestProcessor.becomeGrantor must come through this synchronization * point. * <p> * This fixes a deadlock between this.becomeGrantorMonitor and DistributionManager.elderLock * <p> * All calls to the elder may result in elder recovery which may call back into dlock and acqu...
All calls to GrantorRequestProcessor.becomeGrantor must come through this synchronization point. This fixes a deadlock between this.becomeGrantorMonitor and DistributionManager.elderLock All calls to the elder may result in elder recovery which may call back into dlock and acquire synchronization on this.becomeGrantorM...
becomeGrantor
{ "repo_name": "smgoller/geode", "path": "geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockService.java", "license": "apache-2.0", "size": 109338 }
[ "org.apache.geode.distributed.internal.membership.InternalDistributedMember" ]
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.distributed.internal.membership.*;
[ "org.apache.geode" ]
org.apache.geode;
2,555,910
public OneResponse info() { OneResponse response = info(client, id); super.processInfo(response); return response; }
OneResponse function() { OneResponse response = info(client, id); super.processInfo(response); return response; }
/** * Loads the xml representation of the host. * The info is also stored internally. * * @see Host#info(Client, int) */
Loads the xml representation of the host. The info is also stored internally
info
{ "repo_name": "baby-gnu/one", "path": "src/oca/java/src/org/opennebula/client/host/Host.java", "license": "apache-2.0", "size": 10971 }
[ "org.opennebula.client.OneResponse" ]
import org.opennebula.client.OneResponse;
import org.opennebula.client.*;
[ "org.opennebula.client" ]
org.opennebula.client;
2,504,364
List<GameCharacter> findAllByAccountName(String accountName); /** * Hits before {@link GameCharacterRepository#save(Object)}
List<GameCharacter> findAllByAccountName(String accountName); /** * Hits before {@link GameCharacterRepository#save(Object)}
/** * Find characters for given account name * * @param accountName - name of player account * @return - {@code List} with characters for given account name */
Find characters for given account name
findAllByAccountName
{ "repo_name": "Camelion/JTS-V3", "path": "gameserver/src/main/java/ru/jts_dev/gameserver/repository/GameCharacterRepository.java", "license": "gpl-3.0", "size": 3608 }
[ "java.util.List", "ru.jts_dev.gameserver.model.GameCharacter" ]
import java.util.List; import ru.jts_dev.gameserver.model.GameCharacter;
import java.util.*; import ru.jts_dev.gameserver.model.*;
[ "java.util", "ru.jts_dev.gameserver" ]
java.util; ru.jts_dev.gameserver;
1,590,559
public static byte[] jsonStringToByteArray(String string) { List<Byte> bytes = new ArrayList<>(); for (int i = 0; i < string.length(); ) { char c = string.charAt(i); Byte b; if (c == '%') { // Escaped. Expect '%xx' format. try { b = (byte) Integer.parseInt(string.s...
static byte[] function(String string) { List<Byte> bytes = new ArrayList<>(); for (int i = 0; i < string.length(); ) { char c = string.charAt(i); Byte b; if (c == '%') { try { b = (byte) Integer.parseInt(string.substring(i + 1, i + 3), 16); } catch (IndexOutOfBoundsException NumberFormatException exn) { throw new Illeg...
/** * Converts the given string, encoded using {@link #byteArrayToJsonString}, * into a byte array. * * @throws IllegalArgumentException if the argument string is not legal */
Converts the given string, encoded using <code>#byteArrayToJsonString</code>, into a byte array
jsonStringToByteArray
{ "repo_name": "haonaturel/DataflowJavaSDK", "path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/util/StringUtils.java", "license": "apache-2.0", "size": 4921 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
319,044
@Test public void testConnectStringErrors() throws Throwable { // force some parsing errors try { ConnectStringParser.parse("key='can't parse'"); fail("quoted value ended too soon"); } catch (SQLException e) { assertExceptionMatches(e, ".*quoted value ended.*position 9.*"); } tr...
@Test void function() throws Throwable { try { ConnectStringParser.parse(STR); fail(STR); } catch (SQLException e) { assertExceptionMatches(e, STR); } try { ConnectStringParser.parse(STRcan''t parse\STRunterminated quoted valueSTR.*unterminated quoted value.*"); } }
/** * Tests for specific errors thrown by the parser. */
Tests for specific errors thrown by the parser
testConnectStringErrors
{ "repo_name": "joshelser/calcite-avatica", "path": "core/src/test/java/org/apache/calcite/avatica/test/ConnectStringParserTest.java", "license": "apache-2.0", "size": 8994 }
[ "java.sql.SQLException", "org.apache.calcite.avatica.ConnectStringParser", "org.junit.Assert", "org.junit.Test" ]
import java.sql.SQLException; import org.apache.calcite.avatica.ConnectStringParser; import org.junit.Assert; import org.junit.Test;
import java.sql.*; import org.apache.calcite.avatica.*; import org.junit.*;
[ "java.sql", "org.apache.calcite", "org.junit" ]
java.sql; org.apache.calcite; org.junit;
1,870,858
Map<OrganisationUnit, Integer> getUserReadApprovalLevels( DataApprovalLevel approvalLevel );
Map<OrganisationUnit, Integer> getUserReadApprovalLevels( DataApprovalLevel approvalLevel );
/** * Gets a map of organisation units by the given approval level. The organisation * units are the data view organisation units of the current user, or if user * has no data view organisation units then the hierarchy root organisation units. * * @param approvalLevel the approval level. ...
Gets a map of organisation units by the given approval level. The organisation units are the data view organisation units of the current user, or if user has no data view organisation units then the hierarchy root organisation units
getUserReadApprovalLevels
{ "repo_name": "minagri-rwanda/DHIS2-Agriculture", "path": "dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalLevelService.java", "license": "bsd-3-clause", "size": 9792 }
[ "java.util.Map", "org.hisp.dhis.organisationunit.OrganisationUnit" ]
import java.util.Map; import org.hisp.dhis.organisationunit.OrganisationUnit;
import java.util.*; import org.hisp.dhis.organisationunit.*;
[ "java.util", "org.hisp.dhis" ]
java.util; org.hisp.dhis;
442,625
public long getRemaining(StorageType t, long minSize) { long remaining = 0; for (DatanodeStorageInfo s : getStorageInfos()) { if (s.getState() == State.NORMAL && (t == null || s.getStorageType() == t)) { long r = s.getRemaining(); if (r >= minSize) { remaining += r; ...
long function(StorageType t, long minSize) { long remaining = 0; for (DatanodeStorageInfo s : getStorageInfos()) { if (s.getState() == State.NORMAL && (t == null s.getStorageType() == t)) { long r = s.getRemaining(); if (r >= minSize) { remaining += r; } } } return remaining; }
/** * Return the sum of remaining spaces of the specified type. If the remaining * space of a storage is less than minSize, it won't be counted toward the * sum. * * @param t The storage type. If null, the type is ignored. * @param minSize The minimum free space required. * @return the sum of remai...
Return the sum of remaining spaces of the specified type. If the remaining space of a storage is less than minSize, it won't be counted toward the sum
getRemaining
{ "repo_name": "VicoWu/hadoop-2.7.3", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeDescriptor.java", "license": "apache-2.0", "size": 30319 }
[ "org.apache.hadoop.fs.StorageType", "org.apache.hadoop.hdfs.server.protocol.DatanodeStorage" ]
import org.apache.hadoop.fs.StorageType; import org.apache.hadoop.hdfs.server.protocol.DatanodeStorage;
import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.server.protocol.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,163,985
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<AzureADOnlyAuthenticationInner>> getWithResponseAsync( String resourceGroupName, String workspaceName, AzureADOnlyAuthenticationName azureADOnlyAuthenticationName) { if (this.client.getEndpoint() == null) { return Mono...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<AzureADOnlyAuthenticationInner>> function( String resourceGroupName, String workspaceName, AzureADOnlyAuthenticationName azureADOnlyAuthenticationName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this...
/** * Gets a Azure Active Directory only authentication property. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param azureADOnlyAuthenticationName name of the property. * @throws IllegalArgum...
Gets a Azure Active Directory only authentication property
getWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AzureADOnlyAuthenticationsClientImpl.java", "license": "mit", "size": 46909 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.synapse.fluent.models.AzureADOnlyAuthenticationInner", "com.azure.resourcemanager.synapse.models.AzureADOnlyAuthenticationName"...
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.synapse.fluent.models.AzureADOnlyAuthenticationInner; import com.azure.resourcemanager.synapse.models.AzureADOnlyAu...
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.synapse.fluent.models.*; import com.azure.resourcemanager.synapse.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,762,211
public void setCssText(String cssText) throws DOMException { if (handler == null) { throw new DOMException (DOMException.NO_MODIFICATION_ALLOWED_ERR, ""); } else { getValue(); handler.blueTextChanged(cssText); ...
void function(String cssText) throws DOMException { if (handler == null) { throw new DOMException (DOMException.NO_MODIFICATION_ALLOWED_ERR, ""); } else { getValue(); handler.blueTextChanged(cssText); } }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.css.CSSValue#setCssText(String)}. */
DOM: Implements <code>org.w3c.dom.css.CSSValue#setCssText(String)</code>
setCssText
{ "repo_name": "apache/batik", "path": "batik-css/src/main/java/org/apache/batik/css/dom/CSSOMValue.java", "license": "apache-2.0", "size": 46315 }
[ "org.w3c.dom.DOMException" ]
import org.w3c.dom.DOMException;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,823,920
ImmutableList<? extends RuntimeConnection> getInConnections();
ImmutableList<? extends RuntimeConnection> getInConnections();
/** * Returns all incoming connections. */
Returns all incoming connections
getInConnections
{ "repo_name": "priimak/cloudkeeper", "path": "cloudkeeper-core/cloudkeeper-model/src/main/java/com/svbio/cloudkeeper/model/runtime/element/module/RuntimePort.java", "license": "apache-2.0", "size": 2257 }
[ "com.svbio.cloudkeeper.model.util.ImmutableList" ]
import com.svbio.cloudkeeper.model.util.ImmutableList;
import com.svbio.cloudkeeper.model.util.*;
[ "com.svbio.cloudkeeper" ]
com.svbio.cloudkeeper;
1,720,070
public boolean isPropertyTestFunction(Node call);
boolean function(Node call);
/** * Whether this CALL function is testing for the existence of a property. */
Whether this CALL function is testing for the existence of a property
isPropertyTestFunction
{ "repo_name": "vobruba-martin/closure-compiler", "path": "src/com/google/javascript/jscomp/CodingConvention.java", "license": "apache-2.0", "size": 20420 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
1,253,129
public ServiceCall<CertificateOperation> updateCertificateOperationAsync(UpdateCertificateOperationRequest updateCertificateOperationRequest, final ServiceCallback<CertificateOperation> serviceCallback) { return innerKeyVaultClient.updateCertificateOperationAsync( updateCertificateOperationR...
ServiceCall<CertificateOperation> function(UpdateCertificateOperationRequest updateCertificateOperationRequest, final ServiceCallback<CertificateOperation> serviceCallback) { return innerKeyVaultClient.updateCertificateOperationAsync( updateCertificateOperationRequest.vaultBaseUrl(), updateCertificateOperationRequest.c...
/** * Updates a certificate operation. * * @param updateCertificateOperationRequest the grouped properties for updating a certificate operation request * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object ...
Updates a certificate operation
updateCertificateOperationAsync
{ "repo_name": "pomortaz/azure-sdk-for-java", "path": "azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClient.java", "license": "mit", "size": 85271 }
[ "com.microsoft.azure.keyvault.models.CertificateOperation", "com.microsoft.azure.keyvault.requests.UpdateCertificateOperationRequest", "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.azure.keyvault.models.CertificateOperation; import com.microsoft.azure.keyvault.requests.UpdateCertificateOperationRequest; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.azure.keyvault.models.*; import com.microsoft.azure.keyvault.requests.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
1,164,539
EDataType getDecimal();
EDataType getDecimal();
/** * Returns the meta object for data type '{@link java.math.BigDecimal <em>Decimal</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for data type '<em>Decimal</em>'. * @see java.math.BigDecimal * @model instanceClass="java.math.BigDecimal" * extendedMetaD...
Returns the meta object for data type '<code>java.math.BigDecimal Decimal</code>'.
getDecimal
{ "repo_name": "markus1978/clickwatch", "path": "external/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/xml/type/XMLTypePackage.java", "license": "apache-2.0", "size": 81795 }
[ "org.eclipse.emf.ecore.EDataType" ]
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,176,556
public EntityPlayer getPlayerEntity( MessageContext ctx ) { return ctx.getServerHandler().playerEntity; }
EntityPlayer function( MessageContext ctx ) { return ctx.getServerHandler().playerEntity; }
/** * Returns a side-appropriate EntityPlayer for use during message handling */
Returns a side-appropriate EntityPlayer for use during message handling
getPlayerEntity
{ "repo_name": "GTNewHorizons/Yamcl", "path": "src/main/java/eu/usrv/yamcore/proxy/CommonProxy.java", "license": "gpl-2.0", "size": 382 }
[ "net.minecraft.entity.player.EntityPlayer" ]
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
1,063,253
public static void setTaskDescriptionInDocumentMode(Activity activity, String description) { if (FeatureUtilities.isDocumentMode(activity)) { // Setting icon to be null and color to be 0 will means "take no effect". ApiCompatibilityUtils.setTaskDescription(activity, description, null...
static void function(Activity activity, String description) { if (FeatureUtilities.isDocumentMode(activity)) { ApiCompatibilityUtils.setTaskDescription(activity, description, null, 0); } }
/** * Updates the title of chrome shown in recent tasks. It only takes effect in document mode. */
Updates the title of chrome shown in recent tasks. It only takes effect in document mode
setTaskDescriptionInDocumentMode
{ "repo_name": "SaschaMester/delicium", "path": "chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkUtils.java", "license": "bsd-3-clause", "size": 7990 }
[ "android.app.Activity", "org.chromium.base.ApiCompatibilityUtils", "org.chromium.chrome.browser.util.FeatureUtilities" ]
import android.app.Activity; import org.chromium.base.ApiCompatibilityUtils; import org.chromium.chrome.browser.util.FeatureUtilities;
import android.app.*; import org.chromium.base.*; import org.chromium.chrome.browser.util.*;
[ "android.app", "org.chromium.base", "org.chromium.chrome" ]
android.app; org.chromium.base; org.chromium.chrome;
2,821,022
public TCostCenter copy(boolean deepcopy, Connection con) throws TorqueException { return copyInto(new TCostCenter(), deepcopy, con); }
TCostCenter function(boolean deepcopy, Connection con) throws TorqueException { return copyInto(new TCostCenter(), deepcopy, con); }
/** * Makes a copy of this object using connection. * It creates a new object filling in the simple attributes. * If the parameter deepcopy is true, it then fills all the * association collections and sets the related objects to * isNew=true. * * @param deepcopy whether to copy the as...
Makes a copy of this object using connection. It creates a new object filling in the simple attributes. If the parameter deepcopy is true, it then fills all the association collections and sets the related objects to isNew=true
copy
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTCostCenter.java", "license": "gpl-3.0", "size": 46924 }
[ "java.sql.Connection", "org.apache.torque.TorqueException" ]
import java.sql.Connection; import org.apache.torque.TorqueException;
import java.sql.*; import org.apache.torque.*;
[ "java.sql", "org.apache.torque" ]
java.sql; org.apache.torque;
556,812
public void render(ReportData reportData, String argument, OutputStream out) throws IOException, ReportRenderingException;
void function(ReportData reportData, String argument, OutputStream out) throws IOException, ReportRenderingException;
/** * Render the report's data to a stream * * @param reportData Data that was calculated by the Reporting API and service * @param argument Argument from the RenderingMode that the user selected * @param out * @throws ReportRenderingException */
Render the report's data to a stream
render
{ "repo_name": "Bhamni/openmrs-core", "path": "api/src/main/java/org/openmrs/report/ReportRenderer.java", "license": "mpl-2.0", "size": 3167 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
946,758
public synchronized static boolean writeUser(UserEntry u, String source_type, boolean bulk) { try { // record user into search index users.writeEntry(u.getScreenName(), source_type, u, bulk); } catch (IOException e) { e.printStackTrace(); } return ...
synchronized static boolean function(UserEntry u, String source_type, boolean bulk) { try { users.writeEntry(u.getScreenName(), source_type, u, bulk); } catch (IOException e) { e.printStackTrace(); } return true; }
/** * Store an user into the search index * This method is synchronized to prevent concurrent IO caused by this call. * @param a an account * @param u a user * @return true if the record was stored because it did not exist, false if it was not stored because the record existed already */
Store an user into the search index This method is synchronized to prevent concurrent IO caused by this call
writeUser
{ "repo_name": "gopalmeena/loklak_server", "path": "src/org/loklak/data/DAO.java", "license": "lgpl-2.1", "size": 54377 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,304,210
public DrawActiveElementsOnTopCallback getDrawActiveElementsOnTopCallback() { return drawActiveElementsOnTopCallback; }
DrawActiveElementsOnTopCallback function() { return drawActiveElementsOnTopCallback; }
/** * Returns the callback, if draws the active points of a dataset over the other points of the dataset. * * @return the callback, if draws the active points of a dataset over the other points of the dataset */
Returns the callback, if draws the active points of a dataset over the other points of the dataset
getDrawActiveElementsOnTopCallback
{ "repo_name": "pepstock-org/Charba", "path": "src/org/pepstock/charba/client/data/LiningDataset.java", "license": "apache-2.0", "size": 98572 }
[ "org.pepstock.charba.client.callbacks.DrawActiveElementsOnTopCallback" ]
import org.pepstock.charba.client.callbacks.DrawActiveElementsOnTopCallback;
import org.pepstock.charba.client.callbacks.*;
[ "org.pepstock.charba" ]
org.pepstock.charba;
1,512,028
@RolesAllowed("user") public void setDefaultZ(int z) { StopWatch t0 = new Slf4JStopWatch("omero.rendering_bean.setDefaultZ"); rwl.writeLock().lock(); try { errorIfInvalidState(); renderer.setDefaultZ(z); } finally { rwl.writeLock().unlock(); ...
@RolesAllowed("user") void function(int z) { StopWatch t0 = new Slf4JStopWatch(STR); rwl.writeLock().lock(); try { errorIfInvalidState(); renderer.setDefaultZ(z); } finally { rwl.writeLock().unlock(); t0.stop(); } }
/** * Implemented as specified by the {@link RenderingEngine} interface. * * @see RenderingEngine#setDefaultZ(int) */
Implemented as specified by the <code>RenderingEngine</code> interface
setDefaultZ
{ "repo_name": "knabar/openmicroscopy", "path": "components/server/src/ome/services/RenderingBean.java", "license": "gpl-2.0", "size": 80792 }
[ "org.perf4j.StopWatch", "org.perf4j.slf4j.Slf4JStopWatch" ]
import org.perf4j.StopWatch; import org.perf4j.slf4j.Slf4JStopWatch;
import org.perf4j.*; import org.perf4j.slf4j.*;
[ "org.perf4j", "org.perf4j.slf4j" ]
org.perf4j; org.perf4j.slf4j;
1,116,372
private Double[] integrateSmog() { if (!BTService.getBluetoothAdapter()){ return null; } Double[] integrated = new Double[N]; SimpleDateFormat sdfDate = new SimpleDateFormat("yyMMdd.HHmmss"); //dd/MM/yyyy Date date = new Date(); String dateTime = sdfDa...
Double[] function() { if (!BTService.getBluetoothAdapter()){ return null; } Double[] integrated = new Double[N]; SimpleDateFormat sdfDate = new SimpleDateFormat(STR); Date date = new Date(); String dateTime = sdfDate.format(date); try { if(value_count == 0) { sensor.authenticate(STR, STR); sensor.enableSensors(); } Str...
/** * Integrates Smog with GPS and time values. * arg: None * exception: IOException * return: Double array containing date&time, * longitude, latitude, altitude, smog and normalized * (in order) */
Integrates Smog with GPS and time values. arg: None exception: IOException return: Double array containing date&time, longitude, latitude, altitude, smog and normalized (in order)
integrateSmog
{ "repo_name": "msaadq/AerO2", "path": "AerO2_Android/app/src/main/java/com/aero2/android/DefaultClasses/Integrator.java", "license": "gpl-2.0", "size": 10198 }
[ "com.aero2.android.DefaultClasses", "java.io.IOException", "java.text.SimpleDateFormat", "java.util.Date" ]
import com.aero2.android.DefaultClasses; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Date;
import com.aero2.android.*; import java.io.*; import java.text.*; import java.util.*;
[ "com.aero2.android", "java.io", "java.text", "java.util" ]
com.aero2.android; java.io; java.text; java.util;
821,862
@Test public void testStep2Partial() { ParserStatus expectedStatus = ParserStatus.PARTIAL; int expectedStep = 2; BufferedInputStream testInputStream = new BufferedInputStream( new ByteArrayInputStream(new byte[] { (byte)0x6f, (byte)0x75, (byte)0x4d, (byte)0x19, //0 lat...
void function() { ParserStatus expectedStatus = ParserStatus.PARTIAL; int expectedStep = 2; BufferedInputStream testInputStream = new BufferedInputStream( new ByteArrayInputStream(new byte[] { (byte)0x6f, (byte)0x75, (byte)0x4d, (byte)0x19, (byte)0xa4, (byte)0xa1, (byte)0x5c, (byte)0xce, (byte)0x67, (byte)0x06 })); try...
/** * Step 3 test without enough bytes. Should return PARTIAL. */
Step 3 test without enough bytes. Should return PARTIAL
testStep2Partial
{ "repo_name": "usdot-jpo-ode/jpo-ode", "path": "jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/importer/parser/LocationParserTest.java", "license": "apache-2.0", "size": 8044 }
[ "java.io.BufferedInputStream", "java.io.ByteArrayInputStream", "org.junit.Assert", "us.dot.its.jpo.ode.importer.parser.FileParser" ]
import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import org.junit.Assert; import us.dot.its.jpo.ode.importer.parser.FileParser;
import java.io.*; import org.junit.*; import us.dot.its.jpo.ode.importer.parser.*;
[ "java.io", "org.junit", "us.dot.its" ]
java.io; org.junit; us.dot.its;
1,271,991
public void requestRemoveNodesStart() { this.enqueue(new RemoveNodeMessageClass().doRequestStart(true)); }
void function() { this.enqueue(new RemoveNodeMessageClass().doRequestStart(true)); }
/** * Puts the controller into exclusion mode to remove new nodes */
Puts the controller into exclusion mode to remove new nodes
requestRemoveNodesStart
{ "repo_name": "openhab/openhab", "path": "bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/ZWaveController.java", "license": "epl-1.0", "size": 71347 }
[ "org.openhab.binding.zwave.internal.protocol.serialmessage.RemoveNodeMessageClass" ]
import org.openhab.binding.zwave.internal.protocol.serialmessage.RemoveNodeMessageClass;
import org.openhab.binding.zwave.internal.protocol.serialmessage.*;
[ "org.openhab.binding" ]
org.openhab.binding;
1,486,637
@Test public void whenTurnArrayWithOddAmountOfElementsThenTurnedArray() { //напишите здесь тест, проверяющий переворот массива с нечётным числом элементов, например {1, 2, 3, 4, 5}. Turn turn = new Turn(); int[] array = {1, 2, 3, 4, 5 }; int[] result = turn.back(array); i...
void function() { Turn turn = new Turn(); int[] array = {1, 2, 3, 4, 5 }; int[] result = turn.back(array); int[] expected = {5, 4, 3, 2, 1 }; assertThat(result, is(expected)); }
/** * Test back. */
Test back
whenTurnArrayWithOddAmountOfElementsThenTurnedArray
{ "repo_name": "valerylabunets/vlabunets", "path": "chapter_001/src/test/java/ru/job4j/array/TurnTest.java", "license": "apache-2.0", "size": 1275 }
[ "org.hamcrest.core.Is", "org.junit.Assert" ]
import org.hamcrest.core.Is; import org.junit.Assert;
import org.hamcrest.core.*; import org.junit.*;
[ "org.hamcrest.core", "org.junit" ]
org.hamcrest.core; org.junit;
2,532,131
@Override public String getDocumentInfo() { return Msg.getElement(getCtx(), "M_MovementConfirm_ID") + " " + getDocumentNo(); } // getDocumentInfo
String function() { return Msg.getElement(getCtx(), STR) + " " + getDocumentNo(); }
/** * Get Document Info * @return document info (untranslated) */
Get Document Info
getDocumentInfo
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.business/src/main/java-legacy/org/compiere/model/MMovementConfirm.java", "license": "gpl-2.0", "size": 19011 }
[ "de.metas.i18n.Msg" ]
import de.metas.i18n.Msg;
import de.metas.i18n.*;
[ "de.metas.i18n" ]
de.metas.i18n;
1,810,024
@Override protected void preparePaintComponent(final Request request) { super.preparePaintComponent(request); if (!isInitialised()) { updateRecentMenu(); setInitialised(true); } boolean hasRecentMenu = menu.getMenuItems().size() > 0; menu.setVisible(hasRecentMenu); recentMenuHeading.setVisible(h...
void function(final Request request) { super.preparePaintComponent(request); if (!isInitialised()) { updateRecentMenu(); setInitialised(true); } boolean hasRecentMenu = menu.getMenuItems().size() > 0; menu.setVisible(hasRecentMenu); recentMenuHeading.setVisible(hasRecentMenu); if (hasRecentMenu) { WComponent selectedIt...
/** * Override preparePaintComponent in order to populate the recently accessed menu when a user accesses this panel * for the first time. * * @param request the request being responded to. */
Override preparePaintComponent in order to populate the recently accessed menu when a user accesses this panel for the first time
preparePaintComponent
{ "repo_name": "marksreeves/wcomponents", "path": "wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/MenuPanel.java", "license": "gpl-3.0", "size": 9542 }
[ "com.github.bordertech.wcomponents.Request", "com.github.bordertech.wcomponents.UIContextHolder", "com.github.bordertech.wcomponents.WComponent" ]
import com.github.bordertech.wcomponents.Request; import com.github.bordertech.wcomponents.UIContextHolder; import com.github.bordertech.wcomponents.WComponent;
import com.github.bordertech.wcomponents.*;
[ "com.github.bordertech" ]
com.github.bordertech;
2,699,327
public void setVisible(boolean visible) { for (JMenuItem item : items) item.setVisible(visible); }
void function(boolean visible) { for (JMenuItem item : items) item.setVisible(visible); }
/** * Convenience method for controlling all items' visibilities. * * @param visible whether items should be visible or not */
Convenience method for controlling all items' visibilities
setVisible
{ "repo_name": "aroelke/deck-editor-java", "path": "src/main/java/editor/gui/generic/CardMenuItems.java", "license": "mit", "size": 6718 }
[ "javax.swing.JMenuItem" ]
import javax.swing.JMenuItem;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,032,435
@JsonProperty("station_name") public String getStationName() { return this.stationName; }
@JsonProperty(STR) String function() { return this.stationName; }
/** * "station_name": "Station" */
"station_name": "Station"
getStationName
{ "repo_name": "dbadia/openhab", "path": "bundles/binding/org.openhab.binding.netatmo/src/main/java/org/openhab/binding/netatmo/internal/weather/GetStationsDataResponse.java", "license": "epl-1.0", "size": 23138 }
[ "org.codehaus.jackson.annotate.JsonProperty" ]
import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.annotate.*;
[ "org.codehaus.jackson" ]
org.codehaus.jackson;
2,237,653
Value naryOperation(AbstractInsnNode insn, List values) throws AnalyzerException;
Value naryOperation(AbstractInsnNode insn, List values) throws AnalyzerException;
/** * Interprets a bytecode instruction with a variable number of arguments. * This method is called for the following opcodes: * * INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC, INVOKEINTERFACE, * MULTIANEWARRAY * * @param insn the bytecode instruction to be interpreted. * @param...
Interprets a bytecode instruction with a variable number of arguments. This method is called for the following opcodes: INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC, INVOKEINTERFACE, MULTIANEWARRAY
naryOperation
{ "repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs", "path": "plugins/org.eclipse.persistence.asm/src/org/eclipse/persistence/internal/libraries/asm/tree/analysis/Interpreter.java", "license": "epl-1.0", "size": 9099 }
[ "java.util.List", "org.eclipse.persistence.internal.libraries.asm.tree.AbstractInsnNode" ]
import java.util.List; import org.eclipse.persistence.internal.libraries.asm.tree.AbstractInsnNode;
import java.util.*; import org.eclipse.persistence.internal.libraries.asm.tree.*;
[ "java.util", "org.eclipse.persistence" ]
java.util; org.eclipse.persistence;
1,504,668
private Template findCachedTemplate(String key, File file) { Template template = null; if (verbose) { log("Looking for cached template by key \"" + key + "\""); } TemplateCacheEntry entry = (TemplateCacheEntry) cache.get(key); if (entry != null)...
Template function(String key, File file) { Template template = null; if (verbose) { log(STRSTR\STRCache hit! STRCached template STR needs recompilation! STRCache miss for " + key); } } return template; }
/** * Find a cached template for a given key. If a <code>File</code> is passed then * any cached object is validated against the File to determine if it is out of * date * @param key a unique key for the template, such as a file's absolutePath or a URL. * @param file a file to be used to determ...
Find a cached template for a given key. If a <code>File</code> is passed then any cached object is validated against the File to determine if it is out of date
findCachedTemplate
{ "repo_name": "avafanasiev/groovy", "path": "subprojects/groovy-servlet/src/main/java/groovy/servlet/TemplateServlet.java", "license": "apache-2.0", "size": 18088 }
[ "groovy.text.Template", "java.io.File" ]
import groovy.text.Template; import java.io.File;
import groovy.text.*; import java.io.*;
[ "groovy.text", "java.io" ]
groovy.text; java.io;
1,908,667
public ArrayList<Byte> getFrame() { int length = (in != null) ? in.length : 0; ArrayList<Byte> frame = new ArrayList<>(LNG_HEADER + length); frame.add((byte) (LNG_HEADER + length)); frame.add(information.getByte()); frame.add(getTypeMessage().getByte()); frame.add(get...
ArrayList<Byte> function() { int length = (in != null) ? in.length : 0; ArrayList<Byte> frame = new ArrayList<>(LNG_HEADER + length); frame.add((byte) (LNG_HEADER + length)); frame.add(information.getByte()); frame.add(getTypeMessage().getByte()); frame.add(getCommand().getByte()); if (information == Information.DATA) ...
/** * Build a Frame to add in Packet. In order add: 1) Length of packet; 2) * Information about packet: request, data, ack, nack. 3) Type of message; * 4) Command; 5) Optional byte data. * * @return list with all bytes. */
Build a Frame to add in Packet. In order add: 1) Length of packet; 2) Information about packet: request, data, ack, nack. 3) Type of message; 4) Command; 5) Optional byte data
getFrame
{ "repo_name": "officinerobotiche/orblibjar", "path": "src/it/officinerobotiche/serial/frame/AbstractFrame.java", "license": "gpl-2.0", "size": 13305 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
486,982
public TimeUnit getIdleTimeoutUnit() { return unit; }
TimeUnit function() { return unit; }
/** * The unit for {@linkgetIdleTimeout}. */
The unit for
getIdleTimeoutUnit
{ "repo_name": "jameswald/skinny-latte", "path": "espresso/src/main/java/com/google/android/apps/common/testing/ui/espresso/IdlingPolicy.java", "license": "apache-2.0", "size": 2974 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,718,332
public T decodeJson(byte[] data) throws IOException { return decodeJson(new String(data, UTF8), null); }
T function(byte[] data) throws IOException { return decodeJson(new String(data, UTF8), null); }
/** * Decode json data. * * @param data the data * @return the decoded object * @throws IOException Signals that an I/O exception has occurred. */
Decode json data
decodeJson
{ "repo_name": "Oleh-Kravchenko/kaa", "path": "common/endpoint-shared/src/main/java/org/kaaproject/kaa/common/avro/AvroJsonConverter.java", "license": "apache-2.0", "size": 4032 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
497,320
private void printTxInfoHistoricalResult(Map<ClusterNode, VisorTxTaskResult> res) { if (F.isEmpty(res)) logger.info("Transaction was not found in history across the cluster."); else { logger.info("Transaction was found in completed versions history of the following nodes:"); ...
void function(Map<ClusterNode, VisorTxTaskResult> res) { if (F.isEmpty(res)) logger.info(STR); else { logger.info(STR); for (Map.Entry<ClusterNode, VisorTxTaskResult> entry : res.entrySet()) { logger.info(DOUBLE_INDENT + nodeDescription(entry.getKey()) + ':'); logger.info(DOUBLE_INDENT + DOUBLE_INDENT + STR + entry.get...
/** * Prints results of --tx --info to output in case requested transaction is not active. * * @param res Response. */
Prints results of --tx --info to output in case requested transaction is not active
printTxInfoHistoricalResult
{ "repo_name": "ascherbakoff/ignite", "path": "modules/control-utility/src/main/java/org/apache/ignite/internal/commandline/TxCommands.java", "license": "apache-2.0", "size": 20366 }
[ "java.util.Map", "org.apache.ignite.cluster.ClusterNode", "org.apache.ignite.internal.util.typedef.F", "org.apache.ignite.internal.visor.tx.VisorTxTaskResult" ]
import java.util.Map; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.visor.tx.VisorTxTaskResult;
import java.util.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.visor.tx.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,584,597
private TessellatorVertex addNeighbor(int index) { double cosShapeAngle = Math.cos(2 * Math.PI / shapeType); double cosJoinAngle = Math.cos(2 * Math.PI / joinType); double coshLength = (1 + 2*cosShapeAngle + cosJoinAngle) / (1 - cosJoinAngle); Transform translation = Transform.translation(new Vecto...
TessellatorVertex function(int index) { double cosShapeAngle = Math.cos(2 * Math.PI / shapeType); double cosJoinAngle = Math.cos(2 * Math.PI / joinType); double coshLength = (1 + 2*cosShapeAngle + cosJoinAngle) / (1 - cosJoinAngle); Transform translation = Transform.translation(new Vector31(Math.sqrt(coshLength*coshLen...
/** * Adds a vertex to the specified array index of the neighbors array * in the proper location for a pentagonal tessellation * @param index the location of the vertex in the neighbors array * @return the newly-added vertex */
Adds a vertex to the specified array index of the neighbors array in the proper location for a pentagonal tessellation
addNeighbor
{ "repo_name": "patowen/hyperbolic-space", "path": "HyperbolicSpace/src/net/patowen/hyperbolicspace/model/Plane.java", "license": "mit", "size": 10314 }
[ "net.patowen.hyperbolicspace.math.Transform", "net.patowen.hyperbolicspace.math.Vector3", "net.patowen.hyperbolicspace.math.Vector31" ]
import net.patowen.hyperbolicspace.math.Transform; import net.patowen.hyperbolicspace.math.Vector3; import net.patowen.hyperbolicspace.math.Vector31;
import net.patowen.hyperbolicspace.math.*;
[ "net.patowen.hyperbolicspace" ]
net.patowen.hyperbolicspace;
1,027,059
@Override public Adapter createDataFlowAdapter() { if (dataFlowItemProvider == null) { dataFlowItemProvider = new DataFlowItemProvider(this); } return dataFlowItemProvider; } protected ViewComponentPartItemProvider viewComponentPartItemProvider;
Adapter function() { if (dataFlowItemProvider == null) { dataFlowItemProvider = new DataFlowItemProvider(this); } return dataFlowItemProvider; } protected ViewComponentPartItemProvider viewComponentPartItemProvider;
/** * This creates an adapter for a {@link IFML.Core.DataFlow}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>IFML.Core.DataFlow</code>.
createDataFlowAdapter
{ "repo_name": "ifml/ifml-editor", "path": "plugins/IFMLEditor.edit/src/IFML/Core/provider/CoreItemProviderAdapterFactory.java", "license": "mit", "size": 40586 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,614,284
public static byte[] startRowInclusiveOrLargestRow(RangeRequest rangeRequest) { Preconditions.checkArgument(rangeRequest.isReverse()); if (rangeRequest.getStartInclusive().length == 0) { return getLastRowName(); } return rangeRequest.getStartInclusive(); }
static byte[] function(RangeRequest rangeRequest) { Preconditions.checkArgument(rangeRequest.isReverse()); if (rangeRequest.getStartInclusive().length == 0) { return getLastRowName(); } return rangeRequest.getStartInclusive(); }
/** * This is a replacement for startRow when doing reverse range request. */
This is a replacement for startRow when doing reverse range request
startRowInclusiveOrLargestRow
{ "repo_name": "palantir/atlasdb", "path": "atlasdb-api/src/main/java/com/palantir/atlasdb/keyvalue/api/RangeRequests.java", "license": "apache-2.0", "size": 8404 }
[ "com.palantir.logsafe.Preconditions" ]
import com.palantir.logsafe.Preconditions;
import com.palantir.logsafe.*;
[ "com.palantir.logsafe" ]
com.palantir.logsafe;
2,433,222
Future<WebSiteCreateResponse> createOrUpdateAsync(String resourceGroupName, String webSiteName, String slotName, WebSiteCreateOrUpdateParameters parameters);
Future<WebSiteCreateResponse> createOrUpdateAsync(String resourceGroupName, String webSiteName, String slotName, WebSiteCreateOrUpdateParameters parameters);
/** * You can create a web site by using a POST request that includes the name * of the web site and other information in the request body. (see * http://msdn.microsoft.com/en-us/library/windowsazure/dn166986.aspx for * more information) * * @param resourceGroupName Required. The name of the re...
You can create a web site by using a POST request that includes the name of the web site and other information in the request body. (see HREF for more information)
createOrUpdateAsync
{ "repo_name": "southworkscom/azure-sdk-for-java", "path": "resource-management/azure-mgmt-websites/src/main/java/com/microsoft/azure/management/websites/WebSiteOperations.java", "license": "apache-2.0", "size": 60715 }
[ "com.microsoft.azure.management.websites.models.WebSiteCreateOrUpdateParameters", "com.microsoft.azure.management.websites.models.WebSiteCreateResponse", "java.util.concurrent.Future" ]
import com.microsoft.azure.management.websites.models.WebSiteCreateOrUpdateParameters; import com.microsoft.azure.management.websites.models.WebSiteCreateResponse; import java.util.concurrent.Future;
import com.microsoft.azure.management.websites.models.*; import java.util.concurrent.*;
[ "com.microsoft.azure", "java.util" ]
com.microsoft.azure; java.util;
1,280,634
new DepthFirstSearch<T>(graph).search(); Transposer<T, U> transposer = new Transposer<T, U>(graph, vertexFactory, graphFactory); AbstractGraph<U> transposeGraph = transposer.getTransposeGraph(); Map<T, U> vertexMap = transposer.getVertexMap(); // set searchOrder field in transpose graph to finish time in dept...
new DepthFirstSearch<T>(graph).search(); Transposer<T, U> transposer = new Transposer<T, U>(graph, vertexFactory, graphFactory); AbstractGraph<U> transposeGraph = transposer.getTransposeGraph(); Map<T, U> vertexMap = transposer.getVertexMap(); Iterator<T> it = graph.vertexIterator(); T v; while (it.hasNext()) { v = it....
/** * Marks the strongly connected components in the graph by setting * the treeNumber field of each vertex accordingly. Vertices in the * same strongly connected component will have the same tree number, * and vertices belonging to different components will have different * tree numbers * @return the Tran...
Marks the strongly connected components in the graph by setting the treeNumber field of each vertex accordingly. Vertices in the same strongly connected component will have the same tree number, and vertices belonging to different components will have different tree numbers
run
{ "repo_name": "aisthesis/java-graph2013", "path": "src/com/codemelon/graph/algorithm/search/StronglyConnectedComponents.java", "license": "mit", "size": 3272 }
[ "com.codemelon.graph.algorithm.search.OrderedDepthFirstSearch", "com.codemelon.graph.graph.AbstractGraph", "com.codemelon.graph.graph.Transposer", "com.codemelon.graph.vertex.ReverseSearchOrderComparator", "java.util.Iterator", "java.util.Map" ]
import com.codemelon.graph.algorithm.search.OrderedDepthFirstSearch; import com.codemelon.graph.graph.AbstractGraph; import com.codemelon.graph.graph.Transposer; import com.codemelon.graph.vertex.ReverseSearchOrderComparator; import java.util.Iterator; import java.util.Map;
import com.codemelon.graph.algorithm.search.*; import com.codemelon.graph.graph.*; import com.codemelon.graph.vertex.*; import java.util.*;
[ "com.codemelon.graph", "java.util" ]
com.codemelon.graph; java.util;
478,023
@Override protected void onPostExecute(Integer result) { // First thing to do is to release the sync lock, so we are sure to // do it if (syncLockId != SyncLock.FORBIDDEN) { AppInitializer appInitializer = App.i().getAppInitializer(); ...
void function(Integer result) { if (syncLockId != SyncLock.FORBIDDEN) { AppInitializer appInitializer = App.i().getAppInitializer(); SyncLock syncLock = appInitializer.getSyncLock(); syncLock.releaseLock(syncLockId); displayManager.dismissProgressDialog(getScreen(), dialogId); String text = null; if(result == 0) { text...
/** * Dismiss the progress dialog and shows import results * @param result */
Dismiss the progress dialog and shows import results
onPostExecute
{ "repo_name": "zhangdakun/funasyn", "path": "src/com/funambol/android/ContactsImporter.java", "license": "agpl-3.0", "size": 18483 }
[ "android.accounts.Account", "android.content.DialogInterface", "com.funambol.android.source.pim.contact.ContactAppSyncSourceConfig", "com.funambol.client.source.AppSyncSource", "com.funambol.client.source.AppSyncSourceManager", "java.util.Vector" ]
import android.accounts.Account; import android.content.DialogInterface; import com.funambol.android.source.pim.contact.ContactAppSyncSourceConfig; import com.funambol.client.source.AppSyncSource; import com.funambol.client.source.AppSyncSourceManager; import java.util.Vector;
import android.accounts.*; import android.content.*; import com.funambol.android.source.pim.contact.*; import com.funambol.client.source.*; import java.util.*;
[ "android.accounts", "android.content", "com.funambol.android", "com.funambol.client", "java.util" ]
android.accounts; android.content; com.funambol.android; com.funambol.client; java.util;
1,273,687
public void setElse(Instruction insn) { this.else_ = checkNotNull(insn, "else"); }
void function(Instruction insn) { this.else_ = checkNotNull(insn, "else"); }
/** * Sets the value if the arg is null or zero. */
Sets the value if the arg is null or zero
setElse
{ "repo_name": "Despector/Despector", "path": "src/main/java/org/spongepowered/despector/ast/kotlin/Elvis.java", "license": "mit", "size": 3003 }
[ "com.google.common.base.Preconditions", "org.spongepowered.despector.ast.insn.Instruction" ]
import com.google.common.base.Preconditions; import org.spongepowered.despector.ast.insn.Instruction;
import com.google.common.base.*; import org.spongepowered.despector.ast.insn.*;
[ "com.google.common", "org.spongepowered.despector" ]
com.google.common; org.spongepowered.despector;
1,894,020
int insertSelective(Menu record);
int insertSelective(Menu record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table p_menu * * @mbg.generated Tue Jun 13 20:24:59 CST 2017 */
This method was generated by MyBatis Generator. This method corresponds to the database table p_menu
insertSelective
{ "repo_name": "freeman0432/ssmfw", "path": "src/main/java/com/freeman/project/sm/dao/MenuMapper.java", "license": "apache-2.0", "size": 3707 }
[ "com.freeman.project.sm.po.Menu" ]
import com.freeman.project.sm.po.Menu;
import com.freeman.project.sm.po.*;
[ "com.freeman.project" ]
com.freeman.project;
1,892,392
public ExpressRouteGatewayInner withVirtualHub(VirtualHubId virtualHub) { this.virtualHub = virtualHub; return this; }
ExpressRouteGatewayInner function(VirtualHubId virtualHub) { this.virtualHub = virtualHub; return this; }
/** * Set the Virtual Hub where the ExpressRoute gateway is or will be deployed. * * @param virtualHub the virtualHub value to set * @return the ExpressRouteGatewayInner object itself. */
Set the Virtual Hub where the ExpressRoute gateway is or will be deployed
withVirtualHub
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteGatewayInner.java", "license": "mit", "size": 4611 }
[ "com.microsoft.azure.management.network.v2019_09_01.VirtualHubId" ]
import com.microsoft.azure.management.network.v2019_09_01.VirtualHubId;
import com.microsoft.azure.management.network.v2019_09_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
774,799
public ChangePasswordReply decode( ByteBuffer buf ) throws IOException { short messageLength = buf.getShort(); short protocolVersion = buf.getShort(); short encodedAppReplyLength = buf.getShort(); byte[] encodedAppReply = new byte[encodedAppReplyLength]; buf.get( encoded...
ChangePasswordReply function( ByteBuffer buf ) throws IOException { short messageLength = buf.getShort(); short protocolVersion = buf.getShort(); short encodedAppReplyLength = buf.getShort(); byte[] encodedAppReply = new byte[encodedAppReplyLength]; buf.get( encodedAppReply ); ApRep applicationReply = KerberosDecoder.d...
/** * Decodes a {@link ByteBuffer} into a {@link ChangePasswordReply}. * * @param buf * @return The {@link ChangePasswordReply}. * @throws IOException */
Decodes a <code>ByteBuffer</code> into a <code>ChangePasswordReply</code>
decode
{ "repo_name": "lucastheisen/apache-directory-server", "path": "protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordReplyDecoder.java", "license": "apache-2.0", "size": 2512 }
[ "java.io.IOException", "java.nio.ByteBuffer", "org.apache.directory.server.changepw.messages.ChangePasswordReply", "org.apache.directory.server.kerberos.protocol.KerberosDecoder", "org.apache.directory.server.kerberos.shared.messages.application.PrivateMessage", "org.apache.directory.shared.kerberos.messa...
import java.io.IOException; import java.nio.ByteBuffer; import org.apache.directory.server.changepw.messages.ChangePasswordReply; import org.apache.directory.server.kerberos.protocol.KerberosDecoder; import org.apache.directory.server.kerberos.shared.messages.application.PrivateMessage; import org.apache.directory.shar...
import java.io.*; import java.nio.*; import org.apache.directory.server.changepw.messages.*; import org.apache.directory.server.kerberos.protocol.*; import org.apache.directory.server.kerberos.shared.messages.application.*; import org.apache.directory.shared.kerberos.messages.*;
[ "java.io", "java.nio", "org.apache.directory" ]
java.io; java.nio; org.apache.directory;
2,105,131
void getAliases(GetAliasesRequest request, ActionListener<GetAliasesResponse> listener);
void getAliases(GetAliasesRequest request, ActionListener<GetAliasesResponse> listener);
/** * Get specific index aliases that exists in particular indices and / or by name. * * @param request The index aliases request * @param listener A listener to be notified with a result */
Get specific index aliases that exists in particular indices and / or by name
getAliases
{ "repo_name": "ern/elasticsearch", "path": "server/src/main/java/org/elasticsearch/client/IndicesAdminClient.java", "license": "apache-2.0", "size": 26477 }
[ "org.elasticsearch.action.ActionListener", "org.elasticsearch.action.admin.indices.alias.get.GetAliasesRequest", "org.elasticsearch.action.admin.indices.alias.get.GetAliasesResponse" ]
import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.admin.indices.alias.get.GetAliasesRequest; import org.elasticsearch.action.admin.indices.alias.get.GetAliasesResponse;
import org.elasticsearch.action.*; import org.elasticsearch.action.admin.indices.alias.get.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
587,205
public static FunctionTable defaultFunctionTable() { FunctionTable table = new FunctionTable(); table.register(new ColorBlendingFunctions()); table.register(new ColorChannelFunctions()); table.register(new ColorDefinitionFunctions()); table.register(new ColorOperationsFunctions()); table.regis...
static FunctionTable function() { FunctionTable table = new FunctionTable(); table.register(new ColorBlendingFunctions()); table.register(new ColorChannelFunctions()); table.register(new ColorDefinitionFunctions()); table.register(new ColorOperationsFunctions()); table.register(new ListFunctions()); table.register(new ...
/** * Builds the default function table. Functions are stateless so this table * can be shared among many instances of the compiler. This method provides * a convenient starting point which can be extended by registering additional * function packages. */
Builds the default function table. Functions are stateless so this table can be shared among many instances of the compiler. This method provides a convenient starting point which can be extended by registering additional function packages
defaultFunctionTable
{ "repo_name": "phensley/less-compiler", "path": "less-core/src/main/java/com/squarespace/less/LessCompiler.java", "license": "apache-2.0", "size": 4265 }
[ "com.squarespace.less.exec.FunctionTable", "com.squarespace.less.plugins.ColorBlendingFunctions", "com.squarespace.less.plugins.ColorChannelFunctions", "com.squarespace.less.plugins.ColorDefinitionFunctions", "com.squarespace.less.plugins.ColorOperationsFunctions", "com.squarespace.less.plugins.ListFuncti...
import com.squarespace.less.exec.FunctionTable; import com.squarespace.less.plugins.ColorBlendingFunctions; import com.squarespace.less.plugins.ColorChannelFunctions; import com.squarespace.less.plugins.ColorDefinitionFunctions; import com.squarespace.less.plugins.ColorOperationsFunctions; import com.squarespace.less.p...
import com.squarespace.less.exec.*; import com.squarespace.less.plugins.*;
[ "com.squarespace.less" ]
com.squarespace.less;
1,269,891
private void setToolTip(ARXProcessStatistics stats) { // Prepare double prunedPercentage = new BigDecimal(stats.getTransformationsAvailable()) .subtract(BigDecimal.valueOf(stats.getTransformationsChecked())) .divide(new B...
void function(ARXProcessStatistics stats) { double prunedPercentage = new BigDecimal(stats.getTransformationsAvailable()) .subtract(BigDecimal.valueOf(stats.getTransformationsChecked())) .divide(new BigDecimal(stats.getTransformationsAvailable()), 1000, RoundingMode.HALF_UP) .multiply(BigDecimal.valueOf(100)).doubleVal...
/** * Sets the tool tip * * @param stats */
Sets the tool tip
setToolTip
{ "repo_name": "RaffaelBild/arx", "path": "src/gui/org/deidentifier/arx/gui/view/impl/MainToolBar.java", "license": "apache-2.0", "size": 18163 }
[ "java.math.BigDecimal", "java.math.BigInteger", "java.math.RoundingMode", "org.deidentifier.arx.ARXProcessStatistics", "org.deidentifier.arx.gui.resources.Resources", "org.deidentifier.arx.gui.view.SWTUtil", "org.deidentifier.arx.metric.v2.QualityMetadata" ]
import java.math.BigDecimal; import java.math.BigInteger; import java.math.RoundingMode; import org.deidentifier.arx.ARXProcessStatistics; import org.deidentifier.arx.gui.resources.Resources; import org.deidentifier.arx.gui.view.SWTUtil; import org.deidentifier.arx.metric.v2.QualityMetadata;
import java.math.*; import org.deidentifier.arx.*; import org.deidentifier.arx.gui.resources.*; import org.deidentifier.arx.gui.view.*; import org.deidentifier.arx.metric.v2.*;
[ "java.math", "org.deidentifier.arx" ]
java.math; org.deidentifier.arx;
2,628,176
private String prepareGetInstancesSql(CorrelationAttributeInstance.Type aType, List<String> values) throws CorrelationAttributeNormalizationException { String tableName = CentralRepoDbUtil.correlationTypeToInstanceTableName(aType); String sql = "SELECT " + tableName ...
String function(CorrelationAttributeInstance.Type aType, List<String> values) throws CorrelationAttributeNormalizationException { String tableName = CentralRepoDbUtil.correlationTypeToInstanceTableName(aType); String sql = STR + tableName + STR + tableName + STR + tableName + STR + STR + tableName + STR + tableName + S...
/** * Get the select statement for retrieving correlation attribute instances * from the CR for a given type with values matching the specified values * * @param aType The type of the artifact * @param values The list of correlation values to get * CorrelationAttributeInstan...
Get the select statement for retrieving correlation attribute instances from the CR for a given type with values matching the specified values
prepareGetInstancesSql
{ "repo_name": "wschaeferB/autopsy", "path": "Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java", "license": "apache-2.0", "size": 168393 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,047,253
protected void unhookListeners() { RequirementUtils.getAdapterFactory().removeListener(modelListener); }
void function() { RequirementUtils.getAdapterFactory().removeListener(modelListener); }
/** * Removes listener listening to model changes. */
Removes listener listening to model changes
unhookListeners
{ "repo_name": "pgaufillet/topcased-req", "path": "plugins/org.topcased.requirement.core/src/org/topcased/requirement/core/properties/sections/RequirementPropertySection.java", "license": "epl-1.0", "size": 12463 }
[ "org.topcased.requirement.core.utils.RequirementUtils" ]
import org.topcased.requirement.core.utils.RequirementUtils;
import org.topcased.requirement.core.utils.*;
[ "org.topcased.requirement" ]
org.topcased.requirement;
1,736,115
private void initialize() { try { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); // Center frame on the screen // Shrink if needbe //pack(); // Get size, enforce maximum Dimension fra...
void function() { try { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = new Dimension((int) (screenSize.width * 0.5), (int) (screenSize.height * 0.5)); setSize(frameSize); setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); setVisi...
/** * Initialize the class. */
Initialize the class
initialize
{ "repo_name": "levans/Open-Quark", "path": "src/CAL_Samples/src/org/openquark/cal/samples/plotter/Plotter.java", "license": "bsd-3-clause", "size": 68230 }
[ "java.awt.Dimension", "java.awt.Toolkit" ]
import java.awt.Dimension; import java.awt.Toolkit;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,879,789
public RenderedImage create(ParameterBlock args, RenderingHints renderHints) { // Get ImageLayout from renderHints if any. ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints); // Derive breakpoints from the histogram and specified CDF. Rend...
RenderedImage function(ParameterBlock args, RenderingHints renderHints) { ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints); RenderedImage src = args.getRenderedSource(0); Histogram hist = (Histogram)src.getProperty(STR); float[][] CDF = (float[][])args.getObjectParameter(0); float[][][] bp = createSpecifica...
/** * Creates a new instance of <code>PiecewiseOpImage</code> in the * rendered layer. * * @param args The source image and the breakpoints. * @param hints Optionally contains destination image layout. */
Creates a new instance of <code>PiecewiseOpImage</code> in the rendered layer
create
{ "repo_name": "MarinnaCole/LightZone", "path": "lightcrafts/extsrc/com/lightcrafts/media/jai/opimage/MatchCDFCRIF.java", "license": "bsd-3-clause", "size": 5201 }
[ "com.lightcrafts.mediax.jai.Histogram", "com.lightcrafts.mediax.jai.ImageLayout", "java.awt.RenderingHints", "java.awt.image.RenderedImage", "java.awt.image.renderable.ParameterBlock" ]
import com.lightcrafts.mediax.jai.Histogram; import com.lightcrafts.mediax.jai.ImageLayout; import java.awt.RenderingHints; import java.awt.image.RenderedImage; import java.awt.image.renderable.ParameterBlock;
import com.lightcrafts.mediax.jai.*; import java.awt.*; import java.awt.image.*; import java.awt.image.renderable.*;
[ "com.lightcrafts.mediax", "java.awt" ]
com.lightcrafts.mediax; java.awt;
2,060,680
public static void checkPathNotRelative(String path) throws RelativeFileAccessException { String unixPath = FilenameUtils.separatorsToUnix(path); if (unixPath != null && (unixPath.contains("../") || unixPath.contains("/.."))) { throw new RelativeFileAccessException(); } }
static void function(String path) throws RelativeFileAccessException { String unixPath = FilenameUtils.separatorsToUnix(path); if (unixPath != null && (unixPath.contains("../") unixPath.contains("/.."))) { throw new RelativeFileAccessException(); } }
/** * Checking that the path doesn't contain relative navigation between pathes. * * @param path * @throws RelativeFileAccessException */
Checking that the path doesn't contain relative navigation between pathes
checkPathNotRelative
{ "repo_name": "CecileBONIN/Silverpeas-Core", "path": "lib-core/src/main/java/com/silverpeas/util/FileUtil.java", "license": "agpl-3.0", "size": 17656 }
[ "com.silverpeas.util.exception.RelativeFileAccessException", "org.apache.commons.io.FilenameUtils" ]
import com.silverpeas.util.exception.RelativeFileAccessException; import org.apache.commons.io.FilenameUtils;
import com.silverpeas.util.exception.*; import org.apache.commons.io.*;
[ "com.silverpeas.util", "org.apache.commons" ]
com.silverpeas.util; org.apache.commons;
409,858
@SuppressWarnings("static-method") protected String getCheckboxMessage(ILoggingEvent event) { return "Do not show further messages of this kind"; }
@SuppressWarnings(STR) String function(ILoggingEvent event) { return STR; }
/** * Generate the additional check box message specific to the given event * * @param event * the event for which the check box message should be generated * @return the generated check box message */
Generate the additional check box message specific to the given event
getCheckboxMessage
{ "repo_name": "aifargonos/elk-reasoner", "path": "elk-protege/src/main/java/org/semanticweb/elk/protege/ui/MessageDialogAppender.java", "license": "apache-2.0", "size": 7259 }
[ "ch.qos.logback.classic.spi.ILoggingEvent" ]
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.classic.spi.*;
[ "ch.qos.logback" ]
ch.qos.logback;
211,773
private void initializeFollowingControlNodeIds() { LinkedList<Integer> ids = this.dbControlFlow.getFollowingControlNodes(controlNode_id); for (int i = 0; i < ids.size(); i++) { followingControlNodes.add(new LinkedList<Integer>()); this.addFollowingControlNode(i, ids.get(i...
void function() { LinkedList<Integer> ids = this.dbControlFlow.getFollowingControlNodes(controlNode_id); for (int i = 0; i < ids.size(); i++) { followingControlNodes.add(new LinkedList<Integer>()); this.addFollowingControlNode(i, ids.get(i)); } }
/** * Adds the ids of the following control nodes to the list. * Creates for every control node a bucket. */
Adds the ids of the following control nodes to the list. Creates for every control node a bucket
initializeFollowingControlNodeIds
{ "repo_name": "BP2014W1/JEngine", "path": "src/main/java/de/uni_potsdam/hpi/bpt/bp2014/jcore/ExclusiveGatewaySplitBehavior.java", "license": "mit", "size": 10068 }
[ "java.util.LinkedList" ]
import java.util.LinkedList;
import java.util.*;
[ "java.util" ]
java.util;
2,545,338
EClass getStringValueEquals();
EClass getStringValueEquals();
/** * Returns the meta object for class '{@link com.b2international.snowowl.snomed.ecl.ecl.StringValueEquals <em>String Value Equals</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>String Value Equals</em>'. * @see com.b2international.snowowl.snomed.ecl....
Returns the meta object for class '<code>com.b2international.snowowl.snomed.ecl.ecl.StringValueEquals String Value Equals</code>'.
getStringValueEquals
{ "repo_name": "IHTSDO/snow-owl", "path": "snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclPackage.java", "license": "apache-2.0", "size": 121411 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
578,943
private int buildDropDown() { int otherHeights = 0; if (mDropDownList == null) { ViewGroup dropDownView; Context context = mContext;
int function() { int otherHeights = 0; if (mDropDownList == null) { ViewGroup dropDownView; Context context = mContext;
/** * <p>Builds the popup window's content and returns the height the popup * should have. Returns -1 when the content already exists.</p> * * @return the content's height or -1 if content already exists */
Builds the popup window's content and returns the height the popup should have. Returns -1 when the content already exists
buildDropDown
{ "repo_name": "rey5137/material", "path": "material/src/main/java/com/rey/material/widget/ListPopupWindow.java", "license": "apache-2.0", "size": 68088 }
[ "android.content.Context", "android.view.ViewGroup" ]
import android.content.Context; import android.view.ViewGroup;
import android.content.*; import android.view.*;
[ "android.content", "android.view" ]
android.content; android.view;
433,251
public String getFriendlyName() { return Utils.capFirst(this.friendlyName == null ? this.name.replaceAll("_", " ") : this.friendlyName); }
String function() { return Utils.capFirst(this.friendlyName == null ? this.name.replaceAll("_", " ") : this.friendlyName); }
/** * Retrieves the friendly name for this material. * * @return The friendly name of this Material. */
Retrieves the friendly name for this material
getFriendlyName
{ "repo_name": "pupnewfster/Necessities", "path": "src/main/java/gg/galaxygaming/necessities/Material/Material.java", "license": "apache-2.0", "size": 134805 }
[ "gg.galaxygaming.necessities.Utils" ]
import gg.galaxygaming.necessities.Utils;
import gg.galaxygaming.necessities.*;
[ "gg.galaxygaming.necessities" ]
gg.galaxygaming.necessities;
2,697,752
private void processForLoop(ForLoop loop) { AstNode initializer = loop.getInitializer(); if (initializer instanceof Assignment){ processAssignment((Assignment)initializer); } AstNode condition = loop.getCondition(); processExpression(condition); AstNode incrementExp = loop.getIncrement(); processExp...
void function(ForLoop loop) { AstNode initializer = loop.getInitializer(); if (initializer instanceof Assignment){ processAssignment((Assignment)initializer); } AstNode condition = loop.getCondition(); processExpression(condition); AstNode incrementExp = loop.getIncrement(); processExpression(incrementExp); }
/** * generate constraints for a for-loop */
generate constraints for a for-loop
processForLoop
{ "repo_name": "csgordon/SJS", "path": "sjsc/src/main/java/com/samsung/sjs/constraintgenerator/ConstraintVisitor.java", "license": "apache-2.0", "size": 70132 }
[ "org.mozilla.javascript.ast.Assignment", "org.mozilla.javascript.ast.AstNode", "org.mozilla.javascript.ast.ForLoop" ]
import org.mozilla.javascript.ast.Assignment; import org.mozilla.javascript.ast.AstNode; import org.mozilla.javascript.ast.ForLoop;
import org.mozilla.javascript.ast.*;
[ "org.mozilla.javascript" ]
org.mozilla.javascript;
1,509,593
@Test(expected = BusinessRuleException.class) public void pageSizeMustBePositive2() { @SuppressWarnings("unused") final Iterator<List<? extends PersistentEntity<Long>>> iterator = newPagerFromTestList(-1); } // ========================= PRIVATE METHODS ===========================
@Test(expected = BusinessRuleException.class) void function() { @SuppressWarnings(STR) final Iterator<List<? extends PersistentEntity<Long>>> iterator = newPagerFromTestList(-1); }
/** * Test iterating over a list with an invalid page size. */
Test iterating over a list with an invalid page size
pageSizeMustBePositive2
{ "repo_name": "openfurther/further-open-core", "path": "core/core-data/src/test/java/edu/utah/further/core/data/hibernate/page/ScrollableResultsPagerFixture.java", "license": "apache-2.0", "size": 8166 }
[ "edu.utah.further.core.api.data.PersistentEntity", "edu.utah.further.core.api.exception.BusinessRuleException", "java.util.Iterator", "java.util.List", "org.junit.Test" ]
import edu.utah.further.core.api.data.PersistentEntity; import edu.utah.further.core.api.exception.BusinessRuleException; import java.util.Iterator; import java.util.List; import org.junit.Test;
import edu.utah.further.core.api.data.*; import edu.utah.further.core.api.exception.*; import java.util.*; import org.junit.*;
[ "edu.utah.further", "java.util", "org.junit" ]
edu.utah.further; java.util; org.junit;
1,581,122
private String findAPIType(String ResourceURL) { String paymentKeyString = "transactions"; String sendSMSkeyString = "outbound"; String sendSMSkeyStringRequest = "requests"; String retriveSMSString = "inbound"; String subscriptionKeyString = "subscriptions"; String r...
String function(String ResourceURL) { String paymentKeyString = STR; String sendSMSkeyString = STR; String sendSMSkeyStringRequest = STR; String retriveSMSString = STR; String subscriptionKeyString = STR; String regKeyString = STR; String delivaryInfoKeyString = STR; String delivaryNotifyString = STR; String locationSt...
/** * Find api type. * * @param ResourceURL the resource url * @return the string */
Find api type
findAPIType
{ "repo_name": "WSO2Telco/component-dep", "path": "components/mediator/src/main/java/com/wso2telco/dep/mediator/internal/ResourceURLUtil.java", "license": "apache-2.0", "size": 7043 }
[ "com.wso2telco.dep.oneapivalidation.exceptions.CustomException" ]
import com.wso2telco.dep.oneapivalidation.exceptions.CustomException;
import com.wso2telco.dep.oneapivalidation.exceptions.*;
[ "com.wso2telco.dep" ]
com.wso2telco.dep;
117,863
public void setJdbcExceptionTranslator(SQLExceptionTranslator jdbcExceptionTranslator) { this.jdbcExceptionTranslator = jdbcExceptionTranslator; }
void function(SQLExceptionTranslator jdbcExceptionTranslator) { this.jdbcExceptionTranslator = jdbcExceptionTranslator; }
/** * Set the JDBC exception translator for this instance. * <p>Applied to any SQLException root cause of a Hibernate JDBCException, * overriding Hibernate's default SQLException translation (which is * based on Hibernate's Dialect for a specific target database). * @param jdbcExceptionTranslator the exceptio...
Set the JDBC exception translator for this instance. Applied to any SQLException root cause of a Hibernate JDBCException, overriding Hibernate's default SQLException translation (which is based on Hibernate's Dialect for a specific target database)
setJdbcExceptionTranslator
{ "repo_name": "ryanwli/guzz", "path": "src/main/java/org/guzz/web/context/spring/SpringWriteTemplate.java", "license": "apache-2.0", "size": 9220 }
[ "org.springframework.jdbc.support.SQLExceptionTranslator" ]
import org.springframework.jdbc.support.SQLExceptionTranslator;
import org.springframework.jdbc.support.*;
[ "org.springframework.jdbc" ]
org.springframework.jdbc;
377,543
public static Map<String, String> convertToString( Map<CharSequence, CharSequence> env) { Map<String, String> stringMap = new HashMap<String, String>(); for (Entry<CharSequence, CharSequence> entry: env.entrySet()) { stringMap.put(entry.getKey().toString(), entry.getValue().toString()); }...
static Map<String, String> function( Map<CharSequence, CharSequence> env) { Map<String, String> stringMap = new HashMap<String, String>(); for (Entry<CharSequence, CharSequence> entry: env.entrySet()) { stringMap.put(entry.getKey().toString(), entry.getValue().toString()); } return stringMap; }
/** * change from CharSequence to string for map key and value * @param env map for converting * @return string,string map */
change from CharSequence to string for map key and value
convertToString
{ "repo_name": "ict-carch/hadoop-plus", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ConverterUtils.java", "license": "apache-2.0", "size": 7976 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,337,997
public void testLogException() { String msg = "A darn NPE occured, see stack trace"; LogRecord logRecord = new LogRecord(Level.WARNING, msg); logRecord.setThrown(new NullPointerException("test NPE")); String logXML = acsLogFormatter.format(logRecord); // System.out.println(logXML); assertTrue(logXML.i...
void function() { String msg = STR; LogRecord logRecord = new LogRecord(Level.WARNING, msg); logRecord.setThrown(new NullPointerException(STR)); String logXML = acsLogFormatter.format(logRecord); assertTrue(logXML.indexOf(STRLoggedException\STR) > 0); }
/** * Assures that an exception which gets passed to the log method will show up as a <code>&lt;Data&gt;</code> element in the XML. */
Assures that an exception which gets passed to the log method will show up as a <code>&lt;Data&gt;</code> element in the XML
testLogException
{ "repo_name": "jbarriosc/ACSUFRO", "path": "LGPL/CommonSoftware/acsjlog/test/alma/acs/logging/formatters/AcsLogFormatterTest.java", "license": "lgpl-2.1", "size": 6588 }
[ "java.util.logging.Level", "java.util.logging.LogRecord" ]
import java.util.logging.Level; import java.util.logging.LogRecord;
import java.util.logging.*;
[ "java.util" ]
java.util;
884,865
public ServiceCall<Void> putStringValidAsync(Map<String, String> arrayBody, final ServiceCallback<Void> serviceCallback) { return ServiceCall.create(putStringValidAsync(arrayBody), serviceCallback); }
ServiceCall<Void> function(Map<String, String> arrayBody, final ServiceCallback<Void> serviceCallback) { return ServiceCall.create(putStringValidAsync(arrayBody), serviceCallback); }
/** * Set dictionary value {"0": "foo1", "1": "foo2", "2": "foo3"}. * * @param arrayBody the Map&lt;String, String&gt; value * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */
Set dictionary value {"0": "foo1", "1": "foo2", "2": "foo3"}
putStringValidAsync
{ "repo_name": "haocs/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydictionary/implementation/DictionarysImpl.java", "license": "mit", "size": 176746 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback", "java.util.Map" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import java.util.Map;
import com.microsoft.rest.*; import java.util.*;
[ "com.microsoft.rest", "java.util" ]
com.microsoft.rest; java.util;
1,873,486
@ExternalFunction public static double theta(final double forward, final double strike, final double timeToExpiry, final double lognormalVol, final boolean isCall, final double interestRate) { ArgumentChecker.isTrue(forward >= 0.0, "negative/NaN forward; have {}", forward); ArgumentCheck...
static double function(final double forward, final double strike, final double timeToExpiry, final double lognormalVol, final boolean isCall, final double interestRate) { ArgumentChecker.isTrue(forward >= 0.0, STR, forward); ArgumentChecker.isTrue(strike >= 0.0, STR, strike); ArgumentChecker.isTrue(timeToExpiry >= 0.0,...
/** * The theta (non-forward), the sensitivity of the present value to a change * in time to maturity, $\-frac{\partial V}{\partial T}$. * * @param forward * The forward value of the underlying * @param strike * The Strike * @param timeToExpiry * The time-to-expiry ...
The theta (non-forward), the sensitivity of the present value to a change in time to maturity, $\-frac{\partial V}{\partial T}$
theta
{ "repo_name": "McLeodMoores/starling", "path": "projects/analytics/src/main/java/com/opengamma/analytics/financial/model/volatility/BlackFormulaRepository.java", "license": "apache-2.0", "size": 52618 }
[ "com.opengamma.util.ArgumentChecker" ]
import com.opengamma.util.ArgumentChecker;
import com.opengamma.util.*;
[ "com.opengamma.util" ]
com.opengamma.util;
1,844,851
T visitUnaryExpression(@NotNull MuteParser.UnaryExpressionContext ctx);
T visitUnaryExpression(@NotNull MuteParser.UnaryExpressionContext ctx);
/** * Visit a parse tree produced by {@link MuteParser#unaryExpression}. * @param ctx the parse tree * @return the visitor result */
Visit a parse tree produced by <code>MuteParser#unaryExpression</code>
visitUnaryExpression
{ "repo_name": "renaudbedard/MuteGrammar", "path": "src/com/xxiivv/mute/MuteVisitor.java", "license": "mit", "size": 4969 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,670,386
public String getSubType() { if (subtype == null) { subtype = font.getNameAsString( COSName.SUBTYPE ); type1Font = "Type1".equals(subtype); trueTypeFont = "TrueType".equals(subtype); type0Font = "Type0".equals(subtype); type3Font = "Typ...
String function() { if (subtype == null) { subtype = font.getNameAsString( COSName.SUBTYPE ); type1Font = "Type1".equals(subtype); trueTypeFont = STR.equals(subtype); type0Font = "Type0".equals(subtype); type3Font = "Type3".equals(subtype); } return subtype; }
/** * This will get the subtype of font, Type1, Type3, ... * * @return The type of font that this is. */
This will get the subtype of font, Type1, Type3, ..
getSubType
{ "repo_name": "myrridin/qz-print", "path": "pdfbox_1.8.4_qz/src/org/apache/pdfbox/pdmodel/font/PDFont.java", "license": "lgpl-2.1", "size": 26890 }
[ "org.apache.pdfbox.cos.COSName" ]
import org.apache.pdfbox.cos.COSName;
import org.apache.pdfbox.cos.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
41,973
public Facility getFacility() { return facility; }
Facility function() { return facility; }
/** * Getter for the facility * @return facility whose contact already exists */
Getter for the facility
getFacility
{ "repo_name": "stavamichal/perun", "path": "perun-base/src/main/java/cz/metacentrum/perun/core/api/exceptions/FacilityContactExistsException.java", "license": "bsd-2-clause", "size": 2090 }
[ "cz.metacentrum.perun.core.api.Facility" ]
import cz.metacentrum.perun.core.api.Facility;
import cz.metacentrum.perun.core.api.*;
[ "cz.metacentrum.perun" ]
cz.metacentrum.perun;
2,784,628
public void exitTrim_specification(SQLParser.Trim_specificationContext ctx) { }
public void exitTrim_specification(SQLParser.Trim_specificationContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
enterTrim_specification
{ "repo_name": "HEIG-GAPS/slasher", "path": "slasher.corrector/src/main/java/ch/gaps/slasher/corrector/SQLParserBaseListener.java", "license": "mit", "size": 73849 }
[ "ch.gaps.slasher.corrector.SQLParser" ]
import ch.gaps.slasher.corrector.SQLParser;
import ch.gaps.slasher.corrector.*;
[ "ch.gaps.slasher" ]
ch.gaps.slasher;
761,193
@Test() public void testConstructor5() throws Exception { Control[] controls = { new Control("1.2.3.4"), new Control("1.2.3.5", true, null) }; CompareRequest compareRequest = new CompareRequest("dc=example,dc=com", "description", "foo", co...
@Test() void function() throws Exception { Control[] controls = { new Control(STR), new Control(STR, true, null) }; CompareRequest compareRequest = new CompareRequest(STR, STR, "foo", controls); compareRequest = compareRequest.duplicate(); assertNotNull(compareRequest.getDN()); assertEquals(compareRequest.getDN(), STR)...
/** * Tests the fifth constructor, which takes string arguments and set of * controls. * * @throws Exception If an unexpected problem occurs. */
Tests the fifth constructor, which takes string arguments and set of controls
testConstructor5
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/CompareRequestTestCase.java", "license": "gpl-2.0", "size": 23284 }
[ "java.util.ArrayList", "java.util.Arrays", "org.testng.annotations.Test" ]
import java.util.ArrayList; import java.util.Arrays; import org.testng.annotations.Test;
import java.util.*; import org.testng.annotations.*;
[ "java.util", "org.testng.annotations" ]
java.util; org.testng.annotations;
2,373,533
public Map<String, String> getParameters() { return parameters; }
Map<String, String> function() { return parameters; }
/** * Returns a map which contains parameter name/value pairs as key/value * pairs. Changes to this map will affect the parameters stored within * this configuration. * * @return * A map which contains all parameter name/value pairs as key/value * pairs. */
Returns a map which contains parameter name/value pairs as key/value pairs. Changes to this map will affect the parameters stored within this configuration
getParameters
{ "repo_name": "glyptodon/guacamole-client", "path": "guacamole-common/src/main/java/org/apache/guacamole/protocol/GuacamoleConfiguration.java", "license": "apache-2.0", "size": 6762 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,737,473
@Override public final Map<String, Object> referenceData() { return super.referenceData(); }
final Map<String, Object> function() { return super.referenceData(); }
/** * Tabs should not override this anymore. */
Tabs should not override this anymore
referenceData
{ "repo_name": "CBIIT/caaers", "path": "caAERS/software/web/src/main/java/gov/nih/nci/cabig/caaers/web/fields/TabWithFields.java", "license": "bsd-3-clause", "size": 6590 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,515,061
private boolean drainDecoderToFeedSonic() { MediaCodecAdapterWrapper decoder = checkNotNull(this.decoder); if (drainingSonicForSpeedChange) { if (sonicAudioProcessor.isEnded() && !sonicOutputBuffer.hasRemaining()) { flushSonicAndSetSpeed(currentSpeed); drainingSonicForSpeedChange = fals...
boolean function() { MediaCodecAdapterWrapper decoder = checkNotNull(this.decoder); if (drainingSonicForSpeedChange) { if (sonicAudioProcessor.isEnded() && !sonicOutputBuffer.hasRemaining()) { flushSonicAndSetSpeed(currentSpeed); drainingSonicForSpeedChange = false; } return false; } if (sonicOutputBuffer.hasRemaining(...
/** * Attempts to process decoder output audio, and returns whether it may be possible to process * more data immediately by calling this method again. */
Attempts to process decoder output audio, and returns whether it may be possible to process more data immediately by calling this method again
drainDecoderToFeedSonic
{ "repo_name": "amzn/exoplayer-amazon-port", "path": "library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformerAudioRenderer.java", "license": "apache-2.0", "size": 14757 }
[ "androidx.annotation.Nullable", "com.google.android.exoplayer2.util.Assertions", "java.nio.ByteBuffer" ]
import androidx.annotation.Nullable; import com.google.android.exoplayer2.util.Assertions; import java.nio.ByteBuffer;
import androidx.annotation.*; import com.google.android.exoplayer2.util.*; import java.nio.*;
[ "androidx.annotation", "com.google.android", "java.nio" ]
androidx.annotation; com.google.android; java.nio;
1,799,147
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); JournalTransaction info = (JournalTransaction)o; info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalNestedObject(wi...
void function(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); JournalTransaction info = (JournalTransaction)o; info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setType(dataIn.re...
/** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */
Un-marshal an object instance from the data input stream
looseUnmarshal
{ "repo_name": "Mark-Booth/daq-eclipse", "path": "uk.ac.diamond.org.apache.activemq/org/apache/activemq/openwire/v2/JournalTransactionMarshaller.java", "license": "epl-1.0", "size": 4905 }
[ "java.io.DataInput", "java.io.IOException", "org.apache.activemq.command.JournalTransaction", "org.apache.activemq.openwire.OpenWireFormat" ]
import java.io.DataInput; import java.io.IOException; import org.apache.activemq.command.JournalTransaction; import org.apache.activemq.openwire.OpenWireFormat;
import java.io.*; import org.apache.activemq.command.*; import org.apache.activemq.openwire.*;
[ "java.io", "org.apache.activemq" ]
java.io; org.apache.activemq;
529,159