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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
EntityTypeDescriptor resolveEntityReference(String reference); | EntityTypeDescriptor resolveEntityReference(String reference); | /**
* Resolve an entity reference by name,
*
* @param reference The referenced entity name.
*
* @return The corresponding descriptor, or {@code null} if none.
*/ | Resolve an entity reference by name | resolveEntityReference | {
"repo_name": "gunnarmorling/hibernate-semantic-query",
"path": "hibernate-query-interpreter/src/main/java/org/hibernate/query/parser/ConsumerContext.java",
"license": "apache-2.0",
"size": 1507
} | [
"org.hibernate.sqm.domain.EntityTypeDescriptor"
] | import org.hibernate.sqm.domain.EntityTypeDescriptor; | import org.hibernate.sqm.domain.*; | [
"org.hibernate.sqm"
] | org.hibernate.sqm; | 2,238,521 |
private void buildElements()
{
Table tableContainer = new Table();
// ---------------------------------------------------------------
// ---------------------------------------------------------------
// Table
// ---------------------------------------------------------------
// ---------... | void function() { Table tableContainer = new Table(); Table tableTop = new Table(); final Label titleLabelA = new Label("Noiz2", skin, URL_LABEL_FONT, Color.YELLOW); final TextButton startButton = new TextButton("Start", skin.get("large", TextButtonStyle.class)); tableTop.add(titleLabelA); tableTop.row(); tableTop.add(... | /**
* Build view elements.
*
*/ | Build view elements | buildElements | {
"repo_name": "alistairrutherford/noiz2-gdx",
"path": "core/src/main/java/com/netthreads/gdx/app/layer/MenuLayer.java",
"license": "apache-2.0",
"size": 5028
} | [
"com.badlogic.gdx.graphics.Color",
"com.badlogic.gdx.scenes.scene2d.ui.Label",
"com.badlogic.gdx.scenes.scene2d.ui.Table",
"com.badlogic.gdx.scenes.scene2d.ui.TextButton"
] | import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.scenes.scene2d.ui.Label; import com.badlogic.gdx.scenes.scene2d.ui.Table; import com.badlogic.gdx.scenes.scene2d.ui.TextButton; | import com.badlogic.gdx.graphics.*; import com.badlogic.gdx.scenes.scene2d.ui.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 250,817 |
public Double getBankContaminationRating(final int wbTypeId,
final double stationLength,
final CidsBean kaBean,
final boolean left) {
Double ratingBankContamination = null;
for (final BankContaminationType type : BankContaminationType.values()) {
fina... | Double function(final int wbTypeId, final double stationLength, final CidsBean kaBean, final boolean left) { Double ratingBankContamination = null; for (final BankContaminationType type : BankContaminationType.values()) { final Double count = (Double)kaBean.getProperty(fieldFromCode( STR, type.getCode(), left)); if ((c... | /**
* DOCUMENT ME!
*
* @param wbTypeId DOCUMENT ME!
* @param stationLength DOCUMENT ME!
* @param kaBean DOCUMENT ME!
* @param left DOCUMENT ME!
*
* @return DOCUMENT ME!
*/ | DOCUMENT ME | getBankContaminationRating | {
"repo_name": "cismet/cids-custom-wrrl-db-mv",
"path": "src/main/java/de/cismet/cids/custom/wrrl_db_mv/fgsk/Calc.java",
"license": "lgpl-3.0",
"size": 78568
} | [
"de.cismet.cids.custom.wrrl_db_mv.fgsk.CalcCache",
"de.cismet.cids.dynamics.CidsBean"
] | import de.cismet.cids.custom.wrrl_db_mv.fgsk.CalcCache; import de.cismet.cids.dynamics.CidsBean; | import de.cismet.cids.custom.wrrl_db_mv.fgsk.*; import de.cismet.cids.dynamics.*; | [
"de.cismet.cids"
] | de.cismet.cids; | 211,016 |
private void invalidate (IntNode node) {
for (int i = 0, n = node.parts.size; i < n; ++i) {
IntNodePart part = node.parts.get(i);
ArrayMap<IntNode, Matrix4> bindPose = part.invBoneBindTransforms;
if (bindPose != null) {
for (int j = 0; j < bindPose.size; ++j) {
bindPose.keys[j] = getNode(bi... | void function (IntNode node) { for (int i = 0, n = node.parts.size; i < n; ++i) { IntNodePart part = node.parts.get(i); ArrayMap<IntNode, Matrix4> bindPose = part.invBoneBindTransforms; if (bindPose != null) { for (int j = 0; j < bindPose.size; ++j) { bindPose.keys[j] = getNode(bindPose.keys[j].id); } } if (!materials.... | /** Makes sure that each {@link IntNodePart} of the {@link IntNode} and its sub-nodes, doesn't reference a node outside this node
* tree and that all materials are listed in the {@link #materials} array. */ | Makes sure that each <code>IntNodePart</code> of the <code>IntNode</code> and its sub-nodes, doesn't reference a node outside this node | invalidate | {
"repo_name": "langurmonkey/gaiasky",
"path": "core/src/gaiasky/util/gdx/model/IntModelInstance.java",
"license": "mpl-2.0",
"size": 22160
} | [
"com.badlogic.gdx.math.Matrix4",
"com.badlogic.gdx.utils.ArrayMap"
] | import com.badlogic.gdx.math.Matrix4; import com.badlogic.gdx.utils.ArrayMap; | import com.badlogic.gdx.math.*; import com.badlogic.gdx.utils.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 2,654,453 |
public ClusterHealthStatus ensureYellow(String... indices) {
return ensureColor(ClusterHealthStatus.YELLOW, TimeValue.timeValueSeconds(30), indices);
} | ClusterHealthStatus function(String... indices) { return ensureColor(ClusterHealthStatus.YELLOW, TimeValue.timeValueSeconds(30), indices); } | /**
* Ensures the cluster has a yellow state via the cluster health API.
*/ | Ensures the cluster has a yellow state via the cluster health API | ensureYellow | {
"repo_name": "LeoYao/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java",
"license": "apache-2.0",
"size": 105264
} | [
"org.elasticsearch.cluster.health.ClusterHealthStatus",
"org.elasticsearch.common.unit.TimeValue"
] | import org.elasticsearch.cluster.health.ClusterHealthStatus; import org.elasticsearch.common.unit.TimeValue; | import org.elasticsearch.cluster.health.*; import org.elasticsearch.common.unit.*; | [
"org.elasticsearch.cluster",
"org.elasticsearch.common"
] | org.elasticsearch.cluster; org.elasticsearch.common; | 95,632 |
TextFile importMedia(String sessionId, long projectId, String url, boolean save)
throws InvalidSessionException, IOException; | TextFile importMedia(String sessionId, long projectId, String url, boolean save) throws InvalidSessionException, IOException; | /**
* Imports a media file from a URL and returns the contents.
*
* @param sessionId session id
* @param projectId project id
* @param url url of the source file
* @param save if true, the object will be saved in the project assets
* @return content at url as an array of bytes
*/ | Imports a media file from a URL and returns the contents | importMedia | {
"repo_name": "farxinu/appinventor-sources",
"path": "appinventor/appengine/src/com/google/appinventor/shared/rpc/project/ProjectService.java",
"license": "apache-2.0",
"size": 11660
} | [
"com.google.appinventor.shared.rpc.InvalidSessionException",
"java.io.IOException"
] | import com.google.appinventor.shared.rpc.InvalidSessionException; import java.io.IOException; | import com.google.appinventor.shared.rpc.*; import java.io.*; | [
"com.google.appinventor",
"java.io"
] | com.google.appinventor; java.io; | 1,740,051 |
public void setValue(int size, float[] newValue) {
if ( ((newValue.length%3) == 0) && ((newValue.length/3) == size) ) {
try {
for (int i = 0; i < size; i++) {
value.set(i, new SFVec3f(newValue[i*3], newValue[i*3+1], newValue[i*3+2]));
}
... | void function(int size, float[] newValue) { if ( ((newValue.length%3) == 0) && ((newValue.length/3) == size) ) { try { for (int i = 0; i < size; i++) { value.set(i, new SFVec3f(newValue[i*3], newValue[i*3+1], newValue[i*3+2])); } } catch (IndexOutOfBoundsException e) { Log.e(TAG, STR + e); } catch (Exception e) { Log.e... | /**
* Assign an array subset to this field.
* @param size - number of new values
* @param newValue - array of the new x,y,z values, must be divisible by 3,
* in a single dimensional array
*/ | Assign an array subset to this field | setValue | {
"repo_name": "NolaDonato/GearVRf",
"path": "GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/data_types/MFVec3f.java",
"license": "apache-2.0",
"size": 8078
} | [
"org.gearvrf.utility.Log"
] | import org.gearvrf.utility.Log; | import org.gearvrf.utility.*; | [
"org.gearvrf.utility"
] | org.gearvrf.utility; | 2,749,585 |
public GridDiscoveryManager discovery(); | GridDiscoveryManager function(); | /**
* Gets discovery manager.
*
* @return Discovery manager.
*/ | Gets discovery manager | discovery | {
"repo_name": "vldpyatkov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java",
"license": "apache-2.0",
"size": 17217
} | [
"org.apache.ignite.internal.managers.discovery.GridDiscoveryManager"
] | import org.apache.ignite.internal.managers.discovery.GridDiscoveryManager; | import org.apache.ignite.internal.managers.discovery.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 271,316 |
public static Bitmap getThumbnail(ContentResolver cr, long origId, int kind,
BitmapFactory.Options options) {
return InternalThumbnails.getThumbnail(cr, origId,
InternalThumbnails.DEFAULT_GROUP_ID, kind, options,
EXTERNAL_CO... | static Bitmap function(ContentResolver cr, long origId, int kind, BitmapFactory.Options options) { return InternalThumbnails.getThumbnail(cr, origId, InternalThumbnails.DEFAULT_GROUP_ID, kind, options, EXTERNAL_CONTENT_URI, false); } | /**
* This method checks if the thumbnails of the specified image (origId) has been created.
* It will be blocked until the thumbnails are generated.
*
* @param cr ContentResolver used to dispatch queries to MediaProvider.
* @param origId Original image i... | This method checks if the thumbnails of the specified image (origId) has been created. It will be blocked until the thumbnails are generated | getThumbnail | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/base/core/java/android/provider/MediaStore.java",
"license": "gpl-3.0",
"size": 90776
} | [
"android.content.ContentResolver",
"android.graphics.Bitmap",
"android.graphics.BitmapFactory"
] | import android.content.ContentResolver; import android.graphics.Bitmap; import android.graphics.BitmapFactory; | import android.content.*; import android.graphics.*; | [
"android.content",
"android.graphics"
] | android.content; android.graphics; | 661,316 |
public KillApplicationResponse forceKillApplication()
throws IOException, YarnException {
KillApplicationRequest request =
KillApplicationRequest.newInstance(this.attemptId.getApplicationId());
this.handlerThread.shutdown();
if (this.rmClient == null) {
this.rmClient = createRMProxy(... | KillApplicationResponse function() throws IOException, YarnException { KillApplicationRequest request = KillApplicationRequest.newInstance(this.attemptId.getApplicationId()); this.handlerThread.shutdown(); if (this.rmClient == null) { this.rmClient = createRMProxy(ApplicationClientProtocol.class, this.conf, UserGroupIn... | /**
* Force kill the UAM.
*
* @return kill response
* @throws IOException if fails to create rmProxy
* @throws YarnException if force kill fails
*/ | Force kill the UAM | forceKillApplication | {
"repo_name": "ronny-macmaster/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/uam/UnmanagedApplicationManager.java",
"license": "apache-2.0",
"size": 23646
} | [
"java.io.IOException",
"org.apache.hadoop.security.UserGroupInformation",
"org.apache.hadoop.yarn.api.ApplicationClientProtocol",
"org.apache.hadoop.yarn.api.protocolrecords.KillApplicationRequest",
"org.apache.hadoop.yarn.api.protocolrecords.KillApplicationResponse",
"org.apache.hadoop.yarn.exceptions.Ya... | import java.io.IOException; import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.yarn.api.ApplicationClientProtocol; import org.apache.hadoop.yarn.api.protocolrecords.KillApplicationRequest; import org.apache.hadoop.yarn.api.protocolrecords.KillApplicationResponse; import org.apache.hadoop.y... | import java.io.*; import org.apache.hadoop.security.*; import org.apache.hadoop.yarn.api.*; import org.apache.hadoop.yarn.api.protocolrecords.*; import org.apache.hadoop.yarn.exceptions.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,119,972 |
private String getSoapAction(HttpServletRequest req) throws AxisFault {
String soapAction = req.getHeader(HTTPConstants.HEADER_SOAP_ACTION);
if (soapAction == null) {
String contentType = req.getHeader(HTTPConstants.HEADER_CONTENT_TYPE);
if(contentType != null) {
... | String function(HttpServletRequest req) throws AxisFault { String soapAction = req.getHeader(HTTPConstants.HEADER_SOAP_ACTION); if (soapAction == null) { String contentType = req.getHeader(HTTPConstants.HEADER_CONTENT_TYPE); if(contentType != null) { int index = contentType.indexOf(STR); if(index != -1){ soapAction = c... | /**
* Extract the SOAPAction header.
* if SOAPAction is null then we'll we be forced to scan the body for it.
* if SOAPAction is "" then use the URL
* @param req incoming request
* @return the action
* @throws AxisFault
*/ | Extract the SOAPAction header. if SOAPAction is null then we'll we be forced to scan the body for it. if SOAPAction is "" then use the URL | getSoapAction | {
"repo_name": "apache/axis1-java",
"path": "axis-rt-core/src/main/java/org/apache/axis/transport/http/AxisServlet.java",
"license": "apache-2.0",
"size": 51099
} | [
"javax.servlet.http.HttpServletRequest",
"org.apache.axis.AxisFault",
"org.apache.axis.utils.Messages"
] | import javax.servlet.http.HttpServletRequest; import org.apache.axis.AxisFault; import org.apache.axis.utils.Messages; | import javax.servlet.http.*; import org.apache.axis.*; import org.apache.axis.utils.*; | [
"javax.servlet",
"org.apache.axis"
] | javax.servlet; org.apache.axis; | 2,431,048 |
void replicateNewProject(Project.NameKey project, String head); | void replicateNewProject(Project.NameKey project, String head); | /**
* Create new empty project at the remote sites.
* <p>
* When a new project has been created locally call this method to make sure
* that the project will be created at the remote sites as well.
*
* @param project of the project to be created.
* @param head name HEAD should point at (must be {@c... | Create new empty project at the remote sites. When a new project has been created locally call this method to make sure that the project will be created at the remote sites as well | replicateNewProject | {
"repo_name": "austinchic/Gerrit",
"path": "gerrit-server/src/main/java/com/google/gerrit/server/git/ReplicationQueue.java",
"license": "apache-2.0",
"size": 2305
} | [
"com.google.gerrit.reviewdb.Project"
] | import com.google.gerrit.reviewdb.Project; | import com.google.gerrit.reviewdb.*; | [
"com.google.gerrit"
] | com.google.gerrit; | 1,566,424 |
public ArrayList<Story> getStories() {
return this.stories;
} | ArrayList<Story> function() { return this.stories; } | /**
* Returns the list of all stories.
* @return the list of all stories.
*/ | Returns the list of all stories | getStories | {
"repo_name": "CMPUT301F13T02/ChooseYourAdventure",
"path": "src/ca/ualberta/CMPUT301F13T02/chooseyouradventure/ApplicationController.java",
"license": "bsd-3-clause",
"size": 9748
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,075,515 |
public Vector getROTVector(String type, String user_id, String subject, String current_dir)
{
// from LoginAction.loginUser method
log.add("FileUserOptions.getUserOptions user_name "+user_id);
Hashtable options = new Hashtable();
String file_folder = createPathToR... | Vector function(String type, String user_id, String subject, String current_dir) { log.add(STR+user_id); Hashtable options = new Hashtable(); String file_folder = createPathToROTOptionsFolder(user_id, subject, type, current_dir); log.add(STR+file_folder); String file_name = createROTOPtionsFileName(file_folder); log.ad... | /**
* String type, String user_id, String subject, String current_dir
*/ | String type, String user_id, String subject, String current_dir | getROTVector | {
"repo_name": "timofeysie/catechis",
"path": "src/org/catechis/file/ROTFileStorage.java",
"license": "apache-2.0",
"size": 18344
} | [
"java.io.File",
"java.util.Hashtable",
"java.util.Vector"
] | import java.io.File; import java.util.Hashtable; import java.util.Vector; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,000,557 |
public static AbstractRefreshableApplicationContext refreshApplicationContext(AbstractRefreshableApplicationContext ctx,
boolean isOpenmrsStartup, Module startedModule) {
//notify all started modules that we are about to refresh the context
Set<Module> startedModules = new LinkedHashSet<Module>(ModuleFa... | static AbstractRefreshableApplicationContext function(AbstractRefreshableApplicationContext ctx, boolean isOpenmrsStartup, Module startedModule) { Set<Module> startedModules = new LinkedHashSet<Module>(ModuleFactory.getStartedModulesInOrder()); for (Module module : startedModules) { try { if (module.getModuleActivator(... | /**
* Refreshes the given application context "properly" in OpenMRS. Will first shut down the
* Context and destroy the classloader, then will refresh and set everything back up again.
*
* @param ctx Spring application context that needs refreshing.
* @param isOpenmrsStartup if this refresh is being done at a... | Refreshes the given application context "properly" in OpenMRS. Will first shut down the Context and destroy the classloader, then will refresh and set everything back up again | refreshApplicationContext | {
"repo_name": "koskedk/openmrs-core",
"path": "api/src/main/java/org/openmrs/module/ModuleUtil.java",
"license": "mpl-2.0",
"size": 43773
} | [
"java.util.LinkedHashSet",
"java.util.Set",
"org.openmrs.api.context.Context",
"org.openmrs.api.context.ServiceContext",
"org.openmrs.scheduler.SchedulerUtil",
"org.openmrs.util.OpenmrsClassLoader",
"org.springframework.context.support.AbstractRefreshableApplicationContext"
] | import java.util.LinkedHashSet; import java.util.Set; import org.openmrs.api.context.Context; import org.openmrs.api.context.ServiceContext; import org.openmrs.scheduler.SchedulerUtil; import org.openmrs.util.OpenmrsClassLoader; import org.springframework.context.support.AbstractRefreshableApplicationContext; | import java.util.*; import org.openmrs.api.context.*; import org.openmrs.scheduler.*; import org.openmrs.util.*; import org.springframework.context.support.*; | [
"java.util",
"org.openmrs.api",
"org.openmrs.scheduler",
"org.openmrs.util",
"org.springframework.context"
] | java.util; org.openmrs.api; org.openmrs.scheduler; org.openmrs.util; org.springframework.context; | 632,130 |
protected void cleanup( TestParameters Param, PrintWriter log) {
log.println("disposing impress documents");
util.DesktopTools.closeDoc(xDrawDoc);
util.DesktopTools.closeDoc(xSecondDrawDoc);
} | void function( TestParameters Param, PrintWriter log) { log.println(STR); util.DesktopTools.closeDoc(xDrawDoc); util.DesktopTools.closeDoc(xSecondDrawDoc); } | /**
* Called while disposing a <code>TestEnvironment</code>.
* Disposes Impress documents.
* @param Param test parameters
* @param log writer to log information while testing
*/ | Called while disposing a <code>TestEnvironment</code>. Disposes Impress documents | cleanup | {
"repo_name": "qt-haiku/LibreOffice",
"path": "qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java",
"license": "gpl-3.0",
"size": 11938
} | [
"java.io.PrintWriter"
] | import java.io.PrintWriter; | import java.io.*; | [
"java.io"
] | java.io; | 881,202 |
public static String getImplicitColumnValue(ImplicitFileColumn column, Path filePath, FileSystem fs) {
return getImplicitColumnValue(column, filePath, fs, null, null, null);
} | static String function(ImplicitFileColumn column, Path filePath, FileSystem fs) { return getImplicitColumnValue(column, filePath, fs, null, null, null); } | /**
* Returns implicit column value for specified implicit file column.
*
* @param column implicit file column
* @param filePath file path
* @param fs file system
* @return implicit column value for specified implicit file column
*/ | Returns implicit column value for specified implicit file column | getImplicitColumnValue | {
"repo_name": "vdiravka/drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/store/ColumnExplorer.java",
"license": "apache-2.0",
"size": 22993
} | [
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path"
] | import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; | import org.apache.hadoop.fs.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 741,757 |
@VisibleForTesting
Set<ObjectId> readRegistrationsFromPrefs() {
return joinRegistrations(readSyncRegistrationsFromPrefs(),
readNonSyncRegistrationsFromPrefs());
} | Set<ObjectId> readRegistrationsFromPrefs() { return joinRegistrations(readSyncRegistrationsFromPrefs(), readNonSyncRegistrationsFromPrefs()); } | /**
* Reads the object registrations from storage (if any) and returns a set containing the
* corresponding object ids.
*/ | Reads the object registrations from storage (if any) and returns a set containing the corresponding object ids | readRegistrationsFromPrefs | {
"repo_name": "mogoweb/chromium-crosswalk",
"path": "sync/android/java/src/org/chromium/sync/notifier/InvalidationService.java",
"license": "bsd-3-clause",
"size": 21986
} | [
"com.google.ipc.invalidation.external.client.types.ObjectId",
"java.util.Set"
] | import com.google.ipc.invalidation.external.client.types.ObjectId; import java.util.Set; | import com.google.ipc.invalidation.external.client.types.*; import java.util.*; | [
"com.google.ipc",
"java.util"
] | com.google.ipc; java.util; | 2,051,091 |
List<String> findDataFormatNames(); | List<String> findDataFormatNames(); | /**
* Find all the data format names from the Camel catalog
*/ | Find all the data format names from the Camel catalog | findDataFormatNames | {
"repo_name": "grgrzybek/camel",
"path": "platforms/catalog/src/main/java/org/apache/camel/catalog/CamelCatalog.java",
"license": "apache-2.0",
"size": 6355
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,642,721 |
private void xcmdOvertureResponse(DBGPXCmdOvertureCommandType overtureCmd,
StringBuilder hdr, StringBuilder body) throws IOException
{
StringBuilder sb = new StringBuilder();
sb.append("<xcmd_overture_response command=\"");
sb.append(command);
sb.append("\"");
sb.append(" overtureCmd=\"");
sb.appen... | void function(DBGPXCmdOvertureCommandType overtureCmd, StringBuilder hdr, StringBuilder body) throws IOException { StringBuilder sb = new StringBuilder(); sb.append(STRSTR\STR overtureCmd=\STR\STR STR transaction_id=\STR\STR>STR</xcmd_overture_response>\nSTR/>\n"); } write(sb); } | /**
* Send a xcmd Overture Response
*
* @param overtureCmd
* The overture command which this is a response to
* @param hdr
* The header
* @param body
* The body
* @throws IOException
*/ | Send a xcmd Overture Response | xcmdOvertureResponse | {
"repo_name": "jmcPereira/overture",
"path": "core/interpreter/src/main/java/org/overture/interpreter/debug/DBGPReaderV2.java",
"license": "gpl-3.0",
"size": 52421
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,489,307 |
static double[] toDoubleArray(Array a) throws SQLException {
if (a == null) {
return null;
}
Double[] tmp = (Double[]) a.getArray();
double[] result = new double[tmp.length];
for (int i = 0; i < tmp.length; i++) {
result[i] = tmp[i];
}
return result;
} | static double[] toDoubleArray(Array a) throws SQLException { if (a == null) { return null; } Double[] tmp = (Double[]) a.getArray(); double[] result = new double[tmp.length]; for (int i = 0; i < tmp.length; i++) { result[i] = tmp[i]; } return result; } | /**
* Extracts a primitive double array out of an sql array.
*
* @param a
* the sql array must contain an array of type Double[].
* @return primitive double array, same order.
* @throws SQLException
* on error accessing the array.
*/ | Extracts a primitive double array out of an sql array | toDoubleArray | {
"repo_name": "biafra23/mapsforge",
"path": "src/org/mapsforge/preprocessing/routing/highwayHierarchies/HHDbReader.java",
"license": "gpl-3.0",
"size": 18505
} | [
"java.sql.Array",
"java.sql.SQLException"
] | import java.sql.Array; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,622,492 |
public int setKickstartTree(User loggedInUser, String kslabel,
String kstreeLabel) {
KickstartData ksdata = KickstartFactory
.lookupKickstartDataByLabelAndOrgId(kslabel, loggedInUser
.getOrg().getId());
if (ksdata == null) {
throw new ... | int function(User loggedInUser, String kslabel, String kstreeLabel) { KickstartData ksdata = KickstartFactory .lookupKickstartDataByLabelAndOrgId(kslabel, loggedInUser .getOrg().getId()); if (ksdata == null) { throw new FaultException(-3, STR, STR + kslabel); } KickstartableTree tree = KickstartFactory.lookupKickstartT... | /**
* Set the kickstart tree for a kickstart profile.
* @param loggedInUser The current user
* @param kslabel label of the kickstart profile to be changed.
* @param kstreeLabel label of the new kickstart tree.
* @return 1 if successful, exception otherwise.
*
* @xmlrpc.doc Set the kic... | Set the kickstart tree for a kickstart profile | setKickstartTree | {
"repo_name": "xkollar/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/ProfileHandler.java",
"license": "gpl-2.0",
"size": 65686
} | [
"com.redhat.rhn.FaultException",
"com.redhat.rhn.domain.kickstart.KickstartData",
"com.redhat.rhn.domain.kickstart.KickstartDefaults",
"com.redhat.rhn.domain.kickstart.KickstartFactory",
"com.redhat.rhn.domain.kickstart.KickstartableTree",
"com.redhat.rhn.domain.user.User",
"com.redhat.rhn.frontend.xmlr... | import com.redhat.rhn.FaultException; import com.redhat.rhn.domain.kickstart.KickstartData; import com.redhat.rhn.domain.kickstart.KickstartDefaults; import com.redhat.rhn.domain.kickstart.KickstartFactory; import com.redhat.rhn.domain.kickstart.KickstartableTree; import com.redhat.rhn.domain.user.User; import com.redh... | import com.redhat.rhn.*; import com.redhat.rhn.domain.kickstart.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.xmlrpc.kickstart.*; import com.redhat.rhn.manager.kickstart.cobbler.*; | [
"com.redhat.rhn"
] | com.redhat.rhn; | 2,355,764 |
@Nullable
public Message put(@Nonnull final byte[] fileContents) throws ClientException {
return send(fileContents);
} | Message function(@Nonnull final byte[] fileContents) throws ClientException { return send(fileContents); } | /**
* Uploads to the stream
*
* @param fileContents the contents of the stream to upload
* @return the result of the upload
* @throws ClientException an exception occurs if there was an error while the request was sent
*/ | Uploads to the stream | put | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/MessageStreamRequest.java",
"license": "mit",
"size": 3410
} | [
"com.microsoft.graph.core.ClientException",
"com.microsoft.graph.models.Message",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.core.ClientException; import com.microsoft.graph.models.Message; import javax.annotation.Nonnull; | import com.microsoft.graph.core.*; import com.microsoft.graph.models.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 1,880,259 |
public Observable<ServiceResponse<CertificatePolicy>> updateCertificatePolicyWithServiceResponseAsync(String vaultBaseUrl, String certificateName, CertificatePolicy certificatePolicy) {
if (vaultBaseUrl == null) {
throw new IllegalArgumentException("Parameter vaultBaseUrl is required and cannot ... | Observable<ServiceResponse<CertificatePolicy>> function(String vaultBaseUrl, String certificateName, CertificatePolicy certificatePolicy) { if (vaultBaseUrl == null) { throw new IllegalArgumentException(STR); } if (certificateName == null) { throw new IllegalArgumentException(STR); } if (certificatePolicy == null) { th... | /**
* Updates the policy for a certificate.
* Set specified members in the certificate policy. Leave others as null. This operation requires the certificates/update permission.
*
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
* @param certificateName The name... | Updates the policy for a certificate. Set specified members in the certificate policy. Leave others as null. This operation requires the certificates/update permission | updateCertificatePolicyWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/keyvault/microsoft-azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java",
"license": "mit",
"size": 884227
} | [
"com.microsoft.azure.keyvault.models.CertificatePolicy",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.keyvault.models.CertificatePolicy; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.keyvault.models.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 1,553,122 |
public void updateSessionType(String type) throws SecurityException {
checkWriteAccess();
boolean hasAccess=ConfigWebUtil.hasAccess(config,SecurityManager.TYPE_SETTING);
if(!hasAccess) throw new SecurityException("no access to update scope setting");
type=type.toLowerCase().tri... | void function(String type) throws SecurityException { checkWriteAccess(); boolean hasAccess=ConfigWebUtil.hasAccess(config,SecurityManager.TYPE_SETTING); if(!hasAccess) throw new SecurityException(STR); type=type.toLowerCase().trim(); Element scope=_getRootElement("scope"); scope.setAttribute(STR,type); } | /**
* session type update
* @param type
* @throws SecurityException
*/ | session type update | updateSessionType | {
"repo_name": "lucee/unoffical-Lucee-no-jre",
"path": "source/java/core/src/lucee/runtime/config/XMLConfigAdmin.java",
"license": "lgpl-2.1",
"size": 224955
} | [
"org.w3c.dom.Element"
] | import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,361,058 |
@Generated
@StructureField(order = 1, isGetter = true)
public native int reserved(); | @StructureField(order = 1, isGetter = true) native int function(); | /**
* (to maintain 8-byte alignment)
*/ | (to maintain 8-byte alignment) | reserved | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/struct/fpunchhole.java",
"license": "apache-2.0",
"size": 2047
} | [
"org.moe.natj.c.ann.StructureField"
] | import org.moe.natj.c.ann.StructureField; | import org.moe.natj.c.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 873,057 |
public boolean awaitSchemaRequests(long waitMillis)
{
if (!FBUtilities.getBroadcastAddressAndPort().equals(InetAddressAndPort.getLoopbackAddress()))
Gossiper.waitToSettle();
if (versionInfo.isEmpty())
{
logger.debug("Nothing in versionInfo - so no schemas to wait... | boolean function(long waitMillis) { if (!FBUtilities.getBroadcastAddressAndPort().equals(InetAddressAndPort.getLoopbackAddress())) Gossiper.waitToSettle(); if (versionInfo.isEmpty()) { logger.debug(STR); } List<WaitQueue.Signal> signalList = null; try { synchronized (this) { signalList = new ArrayList<>(versionInfo.siz... | /**
* Wait until we've received schema responses for all versions we're aware of
* @param waitMillis
* @return true if response for all schemas were received, false if we timed out waiting
*/ | Wait until we've received schema responses for all versions we're aware of | awaitSchemaRequests | {
"repo_name": "belliottsmith/cassandra",
"path": "src/java/org/apache/cassandra/schema/MigrationCoordinator.java",
"license": "apache-2.0",
"size": 19937
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.concurrent.TimeUnit",
"org.apache.cassandra.gms.Gossiper",
"org.apache.cassandra.locator.InetAddressAndPort",
"org.apache.cassandra.utils.Clock",
"org.apache.cassandra.utils.FBUtilities",
"org.apache.cassandra.utils.concurrent.WaitQueue"
] | import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; import org.apache.cassandra.gms.Gossiper; import org.apache.cassandra.locator.InetAddressAndPort; import org.apache.cassandra.utils.Clock; import org.apache.cassandra.utils.FBUtilities; import org.apache.cassandra.utils.concurrent.... | import java.util.*; import java.util.concurrent.*; import org.apache.cassandra.gms.*; import org.apache.cassandra.locator.*; import org.apache.cassandra.utils.*; import org.apache.cassandra.utils.concurrent.*; | [
"java.util",
"org.apache.cassandra"
] | java.util; org.apache.cassandra; | 283,364 |
InternalFactHandle insert(Object object) ; | InternalFactHandle insert(Object object) ; | /**
* Asserts an object
*
* @param object -
* the object to be asserted
*/ | Asserts an object | insert | {
"repo_name": "sutaakar/drools",
"path": "drools-core/src/main/java/org/drools/core/spi/KnowledgeHelper.java",
"license": "apache-2.0",
"size": 5205
} | [
"org.drools.core.common.InternalFactHandle"
] | import org.drools.core.common.InternalFactHandle; | import org.drools.core.common.*; | [
"org.drools.core"
] | org.drools.core; | 2,022,874 |
public void send(final byte[] theBytes,
final InetAddress theAddress,
final int thePort) {
if (isRunning) {
try {
DatagramPacket myPacket = new DatagramPacket(theBytes,theBytes.length, theAddress, thePort);
send(myPacket);
}
catch (NullPointe... | void function(final byte[] theBytes, final InetAddress theAddress, final int thePort) { if (isRunning) { try { DatagramPacket myPacket = new DatagramPacket(theBytes,theBytes.length, theAddress, thePort); send(myPacket); } catch (NullPointerException npe) { Logger.printError(STR, STR + npe); } } else { Logger.printWarni... | /**
* send a byte array to the dedicated remoteAddress.
* @param theBytes byte[]
* @param theAddress InetAddress
* @param thePort int
*/ | send a byte array to the dedicated remoteAddress | send | {
"repo_name": "mnok/Sinaptopias-evolutivas",
"path": "libraries/oscP5/src/netP5/AbstractUdpClient.java",
"license": "gpl-2.0",
"size": 4933
} | [
"java.net.DatagramPacket",
"java.net.InetAddress"
] | import java.net.DatagramPacket; import java.net.InetAddress; | import java.net.*; | [
"java.net"
] | java.net; | 386,080 |
@Override
public String resolveManagementName(String pattern, String name, boolean invalidCheck) {
StringHelper.notEmpty(pattern, "pattern");
StringHelper.notEmpty(name, "name");
// must quote the names to have it work as literal replacement
name = Matcher.quoteReplacement(name)... | String function(String pattern, String name, boolean invalidCheck) { StringHelper.notEmpty(pattern, STR); StringHelper.notEmpty(name, "name"); name = Matcher.quoteReplacement(name); String answer = pattern; if (pattern.contains(STR)) { answer = pattern.replaceFirst(STR, STR#camelId#STR#name#STRPattern is invalid: " + p... | /**
* Creates a new management name with the given pattern
*
* @param pattern the pattern
* @param name the name
* @return the management name
* @throws IllegalArgumentException if the pattern or name is invalid or empty
*/ | Creates a new management name with the given pattern | resolveManagementName | {
"repo_name": "objectiser/camel",
"path": "core/camel-base/src/main/java/org/apache/camel/impl/engine/DefaultManagementNameStrategy.java",
"license": "apache-2.0",
"size": 5985
} | [
"java.util.regex.Matcher",
"org.apache.camel.util.StringHelper"
] | import java.util.regex.Matcher; import org.apache.camel.util.StringHelper; | import java.util.regex.*; import org.apache.camel.util.*; | [
"java.util",
"org.apache.camel"
] | java.util; org.apache.camel; | 1,936,401 |
public static HttpServletRequest getHttpServletRequestFromExternalWebflowContext() {
final ServletExternalContext servletExternalContext = (ServletExternalContext) ExternalContextHolder.getExternalContext();
if (servletExternalContext != null) {
return (HttpServletRequest) servletExterna... | static HttpServletRequest function() { final ServletExternalContext servletExternalContext = (ServletExternalContext) ExternalContextHolder.getExternalContext(); if (servletExternalContext != null) { return (HttpServletRequest) servletExternalContext.getNativeRequest(); } return null; } | /**
* Gets the http servlet request from the current servlet context.
*
* @return the http servlet request
*/ | Gets the http servlet request from the current servlet context | getHttpServletRequestFromExternalWebflowContext | {
"repo_name": "Unicon/cas",
"path": "core/cas-server-core-web/src/main/java/org/apereo/cas/web/support/WebUtils.java",
"license": "apache-2.0",
"size": 33997
} | [
"javax.servlet.http.HttpServletRequest",
"org.springframework.webflow.context.ExternalContextHolder",
"org.springframework.webflow.context.servlet.ServletExternalContext"
] | import javax.servlet.http.HttpServletRequest; import org.springframework.webflow.context.ExternalContextHolder; import org.springframework.webflow.context.servlet.ServletExternalContext; | import javax.servlet.http.*; import org.springframework.webflow.context.*; import org.springframework.webflow.context.servlet.*; | [
"javax.servlet",
"org.springframework.webflow"
] | javax.servlet; org.springframework.webflow; | 1,085,290 |
public void installUI(JComponent a) {
for (int i = 0; i < uis.size(); i++) {
((ComponentUI) (uis.elementAt(i))).installUI(a);
}
} | void function(JComponent a) { for (int i = 0; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).installUI(a); } } | /**
* Invokes the <code>installUI</code> method on each UI handled by this object.
*/ | Invokes the <code>installUI</code> method on each UI handled by this object | installUI | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jdk/src/share/classes/javax/swing/plaf/multi/MultiMenuItemUI.java",
"license": "mit",
"size": 7526
} | [
"javax.swing.JComponent",
"javax.swing.plaf.ComponentUI"
] | import javax.swing.JComponent; import javax.swing.plaf.ComponentUI; | import javax.swing.*; import javax.swing.plaf.*; | [
"javax.swing"
] | javax.swing; | 361,501 |
private List<KeyValueScanner> getScannersNoCompaction() throws IOException {
final boolean isCompaction = false;
return selectScannersFrom(store.getScanners(cacheBlocks, isGet,
isCompaction, matcher));
} | List<KeyValueScanner> function() throws IOException { final boolean isCompaction = false; return selectScannersFrom(store.getScanners(cacheBlocks, isGet, isCompaction, matcher)); } | /**
* Get a filtered list of scanners. Assumes we are not in a compaction.
* @return list of scanners to seek
*/ | Get a filtered list of scanners. Assumes we are not in a compaction | getScannersNoCompaction | {
"repo_name": "indi60/hbase-pmc",
"path": "target/hbase-0.94.1/hbase-0.94.1/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java",
"license": "apache-2.0",
"size": 18430
} | [
"java.io.IOException",
"java.util.List"
] | import java.io.IOException; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,988,988 |
public void merge(Metadata other, Set<Key<?>> keys) {
Preconditions.checkNotNull(other, "other");
// Use ByteBuffer for equals and hashCode.
Map<ByteBuffer, Key<?>> asciiKeys = new HashMap<>(keys.size());
for (Key<?> key : keys) {
asciiKeys.put(ByteBuffer.wrap(key.asciiName()), key);
}
f... | void function(Metadata other, Set<Key<?>> keys) { Preconditions.checkNotNull(other, "other"); Map<ByteBuffer, Key<?>> asciiKeys = new HashMap<>(keys.size()); for (Key<?> key : keys) { asciiKeys.put(ByteBuffer.wrap(key.asciiName()), key); } for (int i = 0; i < other.size; i++) { ByteBuffer wrappedNamed = ByteBuffer.wrap... | /**
* Merge values from the given set of keys into this set of metadata. If a key is present in keys,
* then all of the associated values will be copied over.
*
* @param other The source of the new key values.
* @param keys The subset of matching key we want to copy, if they exist in the source.
*/ | Merge values from the given set of keys into this set of metadata. If a key is present in keys, then all of the associated values will be copied over | merge | {
"repo_name": "carl-mastrangelo/grpc-java",
"path": "api/src/main/java/io/grpc/Metadata.java",
"license": "apache-2.0",
"size": 25174
} | [
"com.google.common.base.Preconditions",
"java.nio.ByteBuffer",
"java.util.HashMap",
"java.util.Map",
"java.util.Set"
] | import com.google.common.base.Preconditions; import java.nio.ByteBuffer; import java.util.HashMap; import java.util.Map; import java.util.Set; | import com.google.common.base.*; import java.nio.*; import java.util.*; | [
"com.google.common",
"java.nio",
"java.util"
] | com.google.common; java.nio; java.util; | 696,399 |
//ODE_API
public static void dWorldSetContactSurfaceLayer (DWorld w, double depth) {
w.setContactSurfaceLayer(depth);
} | static void function (DWorld w, double depth) { w.setContactSurfaceLayer(depth); } | /**
* Set the depth of the surface layer around all geometry objects.
* <p>REMARK:
* Contacts are allowed to sink into the surface layer up to the given
* depth before coming to rest.
* @param depth The default value is zero.
* Increasing this to some small value (e.g. 0.001) can help prevent
* jittering ... | Set the depth of the surface layer around all geometry objects. Contacts are allowed to sink into the surface layer up to the given depth before coming to rest | dWorldSetContactSurfaceLayer | {
"repo_name": "billhj/Etoile-java",
"path": "Ode4j/src/org/ode4j/cpp/internal/ApiCppWorld.java",
"license": "mit",
"size": 19846
} | [
"org.ode4j.ode.DWorld"
] | import org.ode4j.ode.DWorld; | import org.ode4j.ode.*; | [
"org.ode4j.ode"
] | org.ode4j.ode; | 2,438,685 |
public static String toString(String str,
String name0, @Nullable Object val0, boolean sens0,
String name1, @Nullable Object val1, boolean sens1,
String name2, @Nullable Object val2, boolean sens2) {
assert name0 != null;
assert name1 != null;
assert name2 != null;
... | static String function(String str, String name0, @Nullable Object val0, boolean sens0, String name1, @Nullable Object val1, boolean sens1, String name2, @Nullable Object val2, boolean sens2) { assert name0 != null; assert name1 != null; assert name2 != null; Queue<GridToStringThreadLocal> queue = threadCache.get(); ass... | /**
* Produces uniformed output of string with context properties
*
* @param str Output prefix or {@code null} if empty.
* @param name0 Property name.
* @param val0 Property value.
* @param sens0 Property sensitive flag.
* @param name1 Property name.
* @param val1 Property value.... | Produces uniformed output of string with context properties | toString | {
"repo_name": "irudyak/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/tostring/GridToStringBuilder.java",
"license": "apache-2.0",
"size": 64606
} | [
"java.util.Queue",
"org.jetbrains.annotations.Nullable"
] | import java.util.Queue; import org.jetbrains.annotations.Nullable; | import java.util.*; import org.jetbrains.annotations.*; | [
"java.util",
"org.jetbrains.annotations"
] | java.util; org.jetbrains.annotations; | 2,027,350 |
long unsubscribe(byte[] channel, Client client); | long unsubscribe(byte[] channel, Client client); | /**
* Unsubscribe a client from a channel
*
* @param channel the channel to unsubscribe from
* @param client the Client which is to be unsubscribed
* @return the number of channels still subscribed to by the client
*/ | Unsubscribe a client from a channel | unsubscribe | {
"repo_name": "davinash/geode",
"path": "geode-redis/src/main/java/org/apache/geode/redis/internal/pubsub/PubSub.java",
"license": "apache-2.0",
"size": 3166
} | [
"org.apache.geode.redis.internal.netty.Client"
] | import org.apache.geode.redis.internal.netty.Client; | import org.apache.geode.redis.internal.netty.*; | [
"org.apache.geode"
] | org.apache.geode; | 62,965 |
String generateComment(Comment comment); | String generateComment(Comment comment); | /**
* generateComment method
*
* @param comment
* org.w3c.dom.Comment
* @return String - the string generated
*/ | generateComment method | generateComment | {
"repo_name": "ttimbul/eclipse.wst",
"path": "bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/ISourceGenerator.java",
"license": "epl-1.0",
"size": 4425
} | [
"org.w3c.dom.Comment"
] | import org.w3c.dom.Comment; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,042,988 |
@GET
@Path(WEBUI_METRICS)
public Response getWebUIMetrics() {
return RestUtils.call(() -> {
WorkerWebUIMetrics response = new WorkerWebUIMetrics();
MetricRegistry mr = MetricsSystem.METRIC_REGISTRY;
SortedMap<String, Gauge> gauges = mr.getGauges();
Long workerCapacityTotal = (Long) g... | @Path(WEBUI_METRICS) Response function() { return RestUtils.call(() -> { WorkerWebUIMetrics response = new WorkerWebUIMetrics(); MetricRegistry mr = MetricsSystem.METRIC_REGISTRY; SortedMap<String, Gauge> gauges = mr.getGauges(); Long workerCapacityTotal = (Long) gauges.get(MetricsSystem .getMetricName(MetricKey.WORKER... | /**
* Gets web ui metrics page data.
*
* @return the response object
*/ | Gets web ui metrics page data | getWebUIMetrics | {
"repo_name": "wwjiang007/alluxio",
"path": "core/server/worker/src/main/java/alluxio/worker/AlluxioWorkerRestServiceHandler.java",
"license": "apache-2.0",
"size": 26510
} | [
"com.codahale.metrics.Counter",
"com.codahale.metrics.Gauge",
"com.codahale.metrics.Metric",
"com.codahale.metrics.MetricRegistry",
"java.util.Map",
"java.util.SortedMap",
"java.util.TreeMap",
"javax.ws.rs.Path",
"javax.ws.rs.core.Response"
] | import com.codahale.metrics.Counter; import com.codahale.metrics.Gauge; import com.codahale.metrics.Metric; import com.codahale.metrics.MetricRegistry; import java.util.Map; import java.util.SortedMap; import java.util.TreeMap; import javax.ws.rs.Path; import javax.ws.rs.core.Response; | import com.codahale.metrics.*; import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"com.codahale.metrics",
"java.util",
"javax.ws"
] | com.codahale.metrics; java.util; javax.ws; | 1,138,264 |
public double rate(TimeUnit rateUnit) {
return rate * (double) rateUnit.toNanos(1);
} | double function(TimeUnit rateUnit) { return rate * (double) rateUnit.toNanos(1); } | /**
* Returns the rate in the given units of time.
*
* @param rateUnit the unit of time
* @return the rate
*/ | Returns the rate in the given units of time | rate | {
"repo_name": "weipinghe/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/common/metrics/EWMA.java",
"license": "apache-2.0",
"size": 3840
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,828,650 |
@EventHandler
public void onJockeyKick(PlayerKickEvent event) {
Player player = event.getPlayer();
Jockey jockey = MineKart.getInstance().getJockey(player);
if (jockey == null) {
return;
}
jockey.getRace().removeJockey(jockey);
LangUtils.sendMessage(player, "command.leave.success"... | void function(PlayerKickEvent event) { Player player = event.getPlayer(); Jockey jockey = MineKart.getInstance().getJockey(player); if (jockey == null) { return; } jockey.getRace().removeJockey(jockey); LangUtils.sendMessage(player, STR); } | /**
* Handle jockeys being kicked from the game
*
* @param event The player kicked event
*/ | Handle jockeys being kicked from the game | onJockeyKick | {
"repo_name": "CodingBadgers/MineKart",
"path": "minekart/src/main/java/uk/thecodingbadgers/minekart/listener/JockeyListener.java",
"license": "gpl-2.0",
"size": 15564
} | [
"org.bukkit.entity.Player",
"org.bukkit.event.player.PlayerKickEvent",
"uk.thecodingbadgers.minekart.MineKart",
"uk.thecodingbadgers.minekart.jockey.Jockey",
"uk.thecodingbadgers.minekart.lang.LangUtils"
] | import org.bukkit.entity.Player; import org.bukkit.event.player.PlayerKickEvent; import uk.thecodingbadgers.minekart.MineKart; import uk.thecodingbadgers.minekart.jockey.Jockey; import uk.thecodingbadgers.minekart.lang.LangUtils; | import org.bukkit.entity.*; import org.bukkit.event.player.*; import uk.thecodingbadgers.minekart.*; import uk.thecodingbadgers.minekart.jockey.*; import uk.thecodingbadgers.minekart.lang.*; | [
"org.bukkit.entity",
"org.bukkit.event",
"uk.thecodingbadgers.minekart"
] | org.bukkit.entity; org.bukkit.event; uk.thecodingbadgers.minekart; | 468,712 |
@Override
public Iterator<String> iterator() {
return engine.iterator();
} | Iterator<String> function() { return engine.iterator(); } | /**
* Returns an iterator over bound properties' ids.
*
* @return an Iterator of ids.
*/ | Returns an iterator over bound properties' ids | iterator | {
"repo_name": "growbit/turbogwt-databind",
"path": "src/main/java/org/turbogwt/mvp/databind/client/BindingImpl.java",
"license": "apache-2.0",
"size": 13059
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 391,249 |
static public SecureJDKXercesSAXFactory getSAXParserFactory()
throws ParserConfigurationException, SAXException {
return new SecureJDKXercesSAXFactory();
} | static SecureJDKXercesSAXFactory function() throws ParserConfigurationException, SAXException { return new SecureJDKXercesSAXFactory(); } | /**
* Returns a SAX XML parser factory which is secured against XXE attacks.
* The type of parsers returned by this method are always JDK built-in Xerces
* parsers.
*
* @return a secure SAX XML parser factory.
*/ | Returns a SAX XML parser factory which is secured against XXE attacks. The type of parsers returned by this method are always JDK built-in Xerces parsers | getSAXParserFactory | {
"repo_name": "elhoim/gdata-client-java",
"path": "java/src/com/google/gdata/util/common/xml/parsing/SecureXMLParsing.java",
"license": "apache-2.0",
"size": 2515
} | [
"javax.xml.parsers.ParserConfigurationException",
"org.xml.sax.SAXException"
] | import javax.xml.parsers.ParserConfigurationException; import org.xml.sax.SAXException; | import javax.xml.parsers.*; import org.xml.sax.*; | [
"javax.xml",
"org.xml.sax"
] | javax.xml; org.xml.sax; | 2,074,390 |
private int getCountGeschlAbschn(final String owner) {
int count = 0;
for (final KatasterGewObj tmp : parts) {
if (tmp.getOwner().equals(owner)) {
if (tmp.getArt().equals("g")) {
++count;
}
}
}
return count... | int function(final String owner) { int count = 0; for (final KatasterGewObj tmp : parts) { if (tmp.getOwner().equals(owner)) { if (tmp.getArt().equals("g")) { ++count; } } } return count; } | /**
* DOCUMENT ME!
*
* @param owner DOCUMENT ME!
*
* @return DOCUMENT ME!
*/ | DOCUMENT ME | getCountGeschlAbschn | {
"repo_name": "cismet/watergis-client",
"path": "src/main/java/de/cismet/watergis/reports/KatasterGewaesserReport.java",
"license": "lgpl-3.0",
"size": 87202
} | [
"de.cismet.watergis.reports.types.KatasterGewObj"
] | import de.cismet.watergis.reports.types.KatasterGewObj; | import de.cismet.watergis.reports.types.*; | [
"de.cismet.watergis"
] | de.cismet.watergis; | 1,760,182 |
public void cacheSchemaOntologyInternal(final RepositoryConnection conn, final OWLOntologyID ontologyID,
final OWLOntologyManager cachedManager) throws OpenRDFException, OWLException, IOException, PoddException
{
if(!this.isCachedInternal(ontologyID, cachedManager))
{
thi... | void function(final RepositoryConnection conn, final OWLOntologyID ontologyID, final OWLOntologyManager cachedManager) throws OpenRDFException, OWLException, IOException, PoddException { if(!this.isCachedInternal(ontologyID, cachedManager)) { this.log.debug(STR, ontologyID); this.parseRDFStatements(cachedManager, conn,... | /**
* Internal implementation checking for caching of both ontologies and their inferred ontologies
*
* @param conn
* @param ontologyID
* @throws OpenRDFException
* @throws OWLException
* @throws IOException
* @throws PoddException
*/ | Internal implementation checking for caching of both ontologies and their inferred ontologies | cacheSchemaOntologyInternal | {
"repo_name": "podd/podd-redesign",
"path": "webapp/lib/src/main/java/com/github/podd/impl/PoddOWLManagerImpl.java",
"license": "agpl-3.0",
"size": 48184
} | [
"com.github.podd.exception.PoddException",
"com.github.podd.utils.InferredOWLOntologyID",
"java.io.IOException",
"org.openrdf.OpenRDFException",
"org.openrdf.repository.RepositoryConnection",
"org.semanticweb.owlapi.model.OWLException",
"org.semanticweb.owlapi.model.OWLOntologyID",
"org.semanticweb.ow... | import com.github.podd.exception.PoddException; import com.github.podd.utils.InferredOWLOntologyID; import java.io.IOException; import org.openrdf.OpenRDFException; import org.openrdf.repository.RepositoryConnection; import org.semanticweb.owlapi.model.OWLException; import org.semanticweb.owlapi.model.OWLOntologyID; im... | import com.github.podd.exception.*; import com.github.podd.utils.*; import java.io.*; import org.openrdf.*; import org.openrdf.repository.*; import org.semanticweb.owlapi.model.*; | [
"com.github.podd",
"java.io",
"org.openrdf",
"org.openrdf.repository",
"org.semanticweb.owlapi"
] | com.github.podd; java.io; org.openrdf; org.openrdf.repository; org.semanticweb.owlapi; | 2,468,440 |
@Nullable MARRIAGE_PLAYER getPartner(UUID uuid); | @Nullable MARRIAGE_PLAYER getPartner(UUID uuid); | /**
* Gets the partner of the player from his uuid.
*
* @param uuid The UUID of the partner to be retrieved.
* @return The partner of the player. null if not married.
*/ | Gets the partner of the player from his uuid | getPartner | {
"repo_name": "GeorgH93/Bukkit_MarriageMaster",
"path": "MarriageMaster-API/src/at/pcgamingfreaks/MarriageMaster/API/MarriagePlayer.java",
"license": "gpl-3.0",
"size": 7766
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 1,290,472 |
public void onUpdate()
{
this.lastTickPosX = this.posX;
this.lastTickPosY = this.posY;
this.lastTickPosZ = this.posZ;
super.onUpdate();
this.posX += this.motionX;
this.posY += this.motionY;
this.posZ += this.motionZ;
float f = MathHelper.sqrt(this.... | void function() { this.lastTickPosX = this.posX; this.lastTickPosY = this.posY; this.lastTickPosZ = this.posZ; super.onUpdate(); this.posX += this.motionX; this.posY += this.motionY; this.posZ += this.motionZ; float f = MathHelper.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ); this.rotationYaw = (floa... | /**
* Called to update the entity's position/logic.
*/ | Called to update the entity's position/logic | onUpdate | {
"repo_name": "Severed-Infinity/technium",
"path": "build/tmp/recompileMc/sources/net/minecraft/entity/item/EntityEnderEye.java",
"license": "gpl-3.0",
"size": 7368
} | [
"net.minecraft.init.Items",
"net.minecraft.init.SoundEvents",
"net.minecraft.item.ItemStack",
"net.minecraft.util.EnumParticleTypes",
"net.minecraft.util.math.BlockPos",
"net.minecraft.util.math.MathHelper"
] | import net.minecraft.init.Items; import net.minecraft.init.SoundEvents; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; | import net.minecraft.init.*; import net.minecraft.item.*; import net.minecraft.util.*; import net.minecraft.util.math.*; | [
"net.minecraft.init",
"net.minecraft.item",
"net.minecraft.util"
] | net.minecraft.init; net.minecraft.item; net.minecraft.util; | 2,067,789 |
private static Transformer transformer(final TransformerFactory factory,
final Source stylesheet) throws TransformerConfigurationException {
final Transformer tnfr = factory.newTransformer(stylesheet);
if (tnfr == null) {
throw new TransformerConfigurationException(
... | static Transformer function(final TransformerFactory factory, final Source stylesheet) throws TransformerConfigurationException { final Transformer tnfr = factory.newTransformer(stylesheet); if (tnfr == null) { throw new TransformerConfigurationException( String.format( STR, factory.getClass(), stylesheet.getSystemId()... | /**
* Make a transformer from this stylesheet.
* @param factory Transformer factory
* @param stylesheet The stylesheet
* @return Transformer
* @throws TransformerConfigurationException If fails
*/ | Make a transformer from this stylesheet | transformer | {
"repo_name": "ekondrashev/takes",
"path": "src/main/java/org/takes/rs/RsXSLT.java",
"license": "mit",
"size": 7913
} | [
"javax.xml.transform.Source",
"javax.xml.transform.Transformer",
"javax.xml.transform.TransformerConfigurationException",
"javax.xml.transform.TransformerFactory"
] | import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerFactory; | import javax.xml.transform.*; | [
"javax.xml"
] | javax.xml; | 1,050,574 |
EReference getContingencyConstraintLimit_SecurityConstraintSum(); | EReference getContingencyConstraintLimit_SecurityConstraintSum(); | /**
* Returns the meta object for the reference '{@link CIM.IEC61970.Informative.MarketOperations.ContingencyConstraintLimit#getSecurityConstraintSum <em>Security Constraint Sum</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Security Constraint Sum</em... | Returns the meta object for the reference '<code>CIM.IEC61970.Informative.MarketOperations.ContingencyConstraintLimit#getSecurityConstraintSum Security Constraint Sum</code>'. | getContingencyConstraintLimit_SecurityConstraintSum | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Informative/MarketOperations/MarketOperationsPackage.java",
"license": "mit",
"size": 688294
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,431,676 |
@Test(timeout=60000)
public void testAcquireMultiTasksByAvgTasksPerRS() throws Exception {
LOG.info("testAcquireMultiTasks");
SplitLogCounters.resetCounters();
final String TATAS = "tatas";
final ServerName RS = ServerName.valueOf("rs,1,1");
final ServerName RS2 = ServerName.valueOf("rs,1,2");
... | @Test(timeout=60000) void function() throws Exception { LOG.info(STR); SplitLogCounters.resetCounters(); final String TATAS = "tatas"; final ServerName RS = ServerName.valueOf(STR); final ServerName RS2 = ServerName.valueOf(STR); final int maxTasks = 3; Configuration testConf = HBaseConfiguration.create(TEST_UTIL.getCo... | /**
* The test checks SplitLogWorker should not spawn more splitters than expected num of tasks per
* RS
* @throws Exception
*/ | The test checks SplitLogWorker should not spawn more splitters than expected num of tasks per RS | testAcquireMultiTasksByAvgTasksPerRS | {
"repo_name": "drewpope/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitLogWorker.java",
"license": "apache-2.0",
"size": 19581
} | [
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.HBaseConfiguration",
"org.apache.hadoop.hbase.ServerName",
"org.apache.hadoop.hbase.SplitLogCounters",
"org.apache.hadoop.hbase.SplitLogTask",
"org.apache.hadoop.hbase.zookeeper.ZKSplitLog",
"org.apache.hadoop.hbase.zookeeper.ZKUtil",
"o... | import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.SplitLogCounters; import org.apache.hadoop.hbase.SplitLogTask; import org.apache.hadoop.hbase.zookeeper.ZKSplitLog; import org.apache.hadoop.hbase.zoo... | import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.zookeeper.*; import org.apache.zookeeper.*; import org.junit.*; | [
"org.apache.hadoop",
"org.apache.zookeeper",
"org.junit"
] | org.apache.hadoop; org.apache.zookeeper; org.junit; | 2,231,935 |
private StyleRange[] getStyleRangesForDiffText(String diffText) {
List<StyleRange> ranges = new ArrayList<>();
if (diffText != null) {
String[] lines = diffText.split("\n");
// Read the first line.
DiffLineType curLineType = getDiffLineType(lines[0]);
StyleRange currentRange = initDif... | StyleRange[] function(String diffText) { List<StyleRange> ranges = new ArrayList<>(); if (diffText != null) { String[] lines = diffText.split("\n"); DiffLineType curLineType = getDiffLineType(lines[0]); StyleRange currentRange = initDiffStyleRangeForLineType(curLineType, 0); int charsRead = lines[0].length() + 1; curre... | /**
* Figures out all the combined {@link StyleRange}s for the given unified-diff text.
*/ | Figures out all the combined <code>StyleRange</code>s for the given unified-diff text | getStyleRangesForDiffText | {
"repo_name": "google/git-appraise-eclipse",
"path": "ui/src/com/google/appraise/eclipse/ui/editor/DiffAttributeEditor.java",
"license": "epl-1.0",
"size": 7213
} | [
"java.util.ArrayList",
"java.util.List",
"org.eclipse.swt.custom.StyleRange"
] | import java.util.ArrayList; import java.util.List; import org.eclipse.swt.custom.StyleRange; | import java.util.*; import org.eclipse.swt.custom.*; | [
"java.util",
"org.eclipse.swt"
] | java.util; org.eclipse.swt; | 785,855 |
@Test(expectedExceptions = IllegalStateException.class)
public void testInterpolatedOnYieldCurveState1() {
new DiscountingMethodCurveTypeSetUp()
.forDiscounting(DISCOUNTING_ID)
.functionalForm(CurveFunction.NELSON_SIEGEL)
.continuousInterpolationOnYield();
} | @Test(expectedExceptions = IllegalStateException.class) void function() { new DiscountingMethodCurveTypeSetUp() .forDiscounting(DISCOUNTING_ID) .functionalForm(CurveFunction.NELSON_SIEGEL) .continuousInterpolationOnYield(); } | /**
* Tests that an interpolated on yield curve type cannot be created if a functional form has already been set.
*/ | Tests that an interpolated on yield curve type cannot be created if a functional form has already been set | testInterpolatedOnYieldCurveState1 | {
"repo_name": "McLeodMoores/starling",
"path": "projects/analytics/src/test/java/com/mcleodmoores/analytics/financial/curve/interestrate/curvebuilder/DiscountingMethodCurveTypeSetUpTest.java",
"license": "apache-2.0",
"size": 33324
} | [
"com.mcleodmoores.analytics.financial.curve.interestrate.curvebuilder.CurveTypeSetUpInterface",
"org.testng.annotations.Test"
] | import com.mcleodmoores.analytics.financial.curve.interestrate.curvebuilder.CurveTypeSetUpInterface; import org.testng.annotations.Test; | import com.mcleodmoores.analytics.financial.curve.interestrate.curvebuilder.*; import org.testng.annotations.*; | [
"com.mcleodmoores.analytics",
"org.testng.annotations"
] | com.mcleodmoores.analytics; org.testng.annotations; | 838,790 |
public void clearAttachment() {
mAttachment.setImageBitmap(null);
mAttachmentLayout.setVisibility(View.GONE);
updateButtonState();
} | void function() { mAttachment.setImageBitmap(null); mAttachmentLayout.setVisibility(View.GONE); updateButtonState(); } | /**
* Clears the image from the attachment view.
*/ | Clears the image from the attachment view | clearAttachment | {
"repo_name": "AdeebNqo/Thula",
"path": "Thula/src/main/java/com/adeebnqo/Thula/ui/view/ComposeView.java",
"license": "gpl-3.0",
"size": 37825
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 955,827 |
@Override
public void onUIRefreshBegin(PtrFrameLayout frame) {
mDrawable.setAlpha(255);
mDrawable.start();
} | void function(PtrFrameLayout frame) { mDrawable.setAlpha(255); mDrawable.start(); } | /**
* perform refreshing UI
*
* @param frame
*/ | perform refreshing UI | onUIRefreshBegin | {
"repo_name": "heinika/android-Ultra-Pull-To-Refresh",
"path": "ptr-lib/src/in/srain/cube/views/ptr/header/MaterialHeader.java",
"license": "mit",
"size": 5335
} | [
"in.srain.cube.views.ptr.PtrFrameLayout"
] | import in.srain.cube.views.ptr.PtrFrameLayout; | import in.srain.cube.views.ptr.*; | [
"in.srain.cube"
] | in.srain.cube; | 2,438,514 |
public Object newInstance(Object... args) throws ReflectiveOperationException {
Object[] cargs = new Object[args.length + 1];
cargs[0] = adapterDefinition;
System.arraycopy(args, 0, cargs, 1, args.length);
for (Constructor constructor : adapterClass.getConstructors()) {
Class[] param... | Object function(Object... args) throws ReflectiveOperationException { Object[] cargs = new Object[args.length + 1]; cargs[0] = adapterDefinition; System.arraycopy(args, 0, cargs, 1, args.length); for (Constructor constructor : adapterClass.getConstructors()) { Class[] parameterTypes = constructor.getParameterTypes(); i... | /**
* Creates a new instance, calling the right constructor based on the adapter super class.
*
* @param args the constructor arguments.
* @return an adapter instance.
* @throws ReflectiveOperationException thrown when no constructor can be found based on the argument types.
*/ | Creates a new instance, calling the right constructor based on the adapter super class | newInstance | {
"repo_name": "smarr/golo-lang",
"path": "src/main/java/gololang/AdapterFabric.java",
"license": "apache-2.0",
"size": 7167
} | [
"fr.insalyon.citi.golo.runtime.TypeMatching",
"fr.insalyon.citi.golo.runtime.adapters.JavaBytecodeAdapterGenerator",
"java.lang.reflect.Constructor",
"java.util.Arrays",
"java.util.concurrent.atomic.AtomicLong"
] | import fr.insalyon.citi.golo.runtime.TypeMatching; import fr.insalyon.citi.golo.runtime.adapters.JavaBytecodeAdapterGenerator; import java.lang.reflect.Constructor; import java.util.Arrays; import java.util.concurrent.atomic.AtomicLong; | import fr.insalyon.citi.golo.runtime.*; import fr.insalyon.citi.golo.runtime.adapters.*; import java.lang.reflect.*; import java.util.*; import java.util.concurrent.atomic.*; | [
"fr.insalyon.citi",
"java.lang",
"java.util"
] | fr.insalyon.citi; java.lang; java.util; | 2,476,900 |
@Override public void visitErrorNode(ErrorNode node) { } | @Override public void visitErrorNode(ErrorNode node) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | visitTerminal | {
"repo_name": "google/polymorphicDSL",
"path": "src/test/java/com/pdsl/grammars/PolymorphicDslMinimalParserBaseListener.java",
"license": "apache-2.0",
"size": 1876
} | [
"org.antlr.v4.runtime.tree.ErrorNode"
] | import org.antlr.v4.runtime.tree.ErrorNode; | import org.antlr.v4.runtime.tree.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 295,693 |
public Iterator<Pair<ByteArray, Versioned<byte[]>>> fetchOrphanedEntries(int nodeId,
String storeName) {
Node node = AdminClient.this.getAdminClientCluster().getNodeById(nodeId);
final SocketDestination des... | Iterator<Pair<ByteArray, Versioned<byte[]>>> function(int nodeId, String storeName) { Node node = AdminClient.this.getAdminClientCluster().getNodeById(nodeId); final SocketDestination destination = new SocketDestination(node.getHost(), node.getAdminPort(), RequestFormatType.ADMIN_PROTOCOL_BUFFERS); final SocketAndStrea... | /**
* Fetches entries that don't belong to the node, based on current
* metadata and yet persisted on the node
*
* @param nodeId Id of the node to fetch from
* @param storeName Name of the store
* @return An iterator which allows entries to be streamed as they're
... | Fetches entries that don't belong to the node, based on current metadata and yet persisted on the node | fetchOrphanedEntries | {
"repo_name": "bitti/voldemort",
"path": "src/java/voldemort/client/protocol/admin/AdminClient.java",
"license": "apache-2.0",
"size": 288293
} | [
"com.google.common.collect.AbstractIterator",
"java.io.DataInputStream",
"java.io.DataOutputStream",
"java.io.IOException",
"java.util.Iterator"
] | import com.google.common.collect.AbstractIterator; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.util.Iterator; | import com.google.common.collect.*; import java.io.*; import java.util.*; | [
"com.google.common",
"java.io",
"java.util"
] | com.google.common; java.io; java.util; | 229,157 |
@Test
public void testCalculateColumnTotal2() {
DefaultKeyedValues2D<String, String> table = new DefaultKeyedValues2D<>();
table.addValue(1.0, "R0", "C0");
table.addValue(2.0, "R0", "C1");
table.addValue(3.0, "R1", "C0");
table.addValue(4.0, "R1", "C1");
assertEqu... | void function() { DefaultKeyedValues2D<String, String> table = new DefaultKeyedValues2D<>(); table.addValue(1.0, "R0", "C0"); table.addValue(2.0, "R0", "C1"); table.addValue(3.0, "R1", "C0"); table.addValue(4.0, "R1", "C1"); assertEquals(4.0, DataUtils.calculateColumnTotal(table, 0, new int[] {0, 1}), EPSILON); assertE... | /**
* Some checks for the calculateColumnTotal() method.
*/ | Some checks for the calculateColumnTotal() method | testCalculateColumnTotal2 | {
"repo_name": "jfree/jfreechart",
"path": "src/test/java/org/jfree/data/DataUtilsTest.java",
"license": "lgpl-2.1",
"size": 8641
} | [
"org.junit.jupiter.api.Assertions"
] | import org.junit.jupiter.api.Assertions; | import org.junit.jupiter.api.*; | [
"org.junit.jupiter"
] | org.junit.jupiter; | 2,673,153 |
@Override
protected void rescaleImage(int width, int height, int hint) {
Image master = getMasterImage();
if (master!=null) {
Map<RenderingHints.Key, Object> hints =
new HashMap<RenderingHints.Key, Object>();
switch (hint) {
default:
case Image.SCALE_AREA_AVERAGING:
case Image.SCALE_SMO... | void function(int width, int height, int hint) { Image master = getMasterImage(); if (master!=null) { Map<RenderingHints.Key, Object> hints = new HashMap<RenderingHints.Key, Object>(); switch (hint) { default: case Image.SCALE_AREA_AVERAGING: case Image.SCALE_SMOOTH: hints.put(RenderingHints.KEY_INTERPOLATION, Renderin... | /**
* Rescales the displayed image to be the specified size.
*
* @param width The new width of the image.
* @param height The new height of the image.
* @param hint The scaling hint to use.
*/ | Rescales the displayed image to be the specified size | rescaleImage | {
"repo_name": "reqT/reqT-syntax",
"path": "src/org/fife/ui/rtextarea/BufferedImageBackgroundPainterStrategy.java",
"license": "bsd-3-clause",
"size": 3577
} | [
"java.awt.Graphics2D",
"java.awt.Image",
"java.awt.RenderingHints",
"java.util.HashMap",
"java.util.Map"
] | import java.awt.Graphics2D; import java.awt.Image; import java.awt.RenderingHints; import java.util.HashMap; import java.util.Map; | import java.awt.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 2,007,192 |
public static boolean isGraphicalUserAuthenticationEnabled(final RequestContext requestContext) {
return BooleanUtils.isTrue(requestContext.getFlowScope().get("guaEnabled", Boolean.class));
} | static boolean function(final RequestContext requestContext) { return BooleanUtils.isTrue(requestContext.getFlowScope().get(STR, Boolean.class)); } | /**
* Put graphical user authentication enabled.
*
* @param requestContext the request context
* @return true /false
*/ | Put graphical user authentication enabled | isGraphicalUserAuthenticationEnabled | {
"repo_name": "apereo/cas",
"path": "core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java",
"license": "apache-2.0",
"size": 71894
} | [
"org.apache.commons.lang3.BooleanUtils",
"org.springframework.webflow.execution.RequestContext"
] | import org.apache.commons.lang3.BooleanUtils; import org.springframework.webflow.execution.RequestContext; | import org.apache.commons.lang3.*; import org.springframework.webflow.execution.*; | [
"org.apache.commons",
"org.springframework.webflow"
] | org.apache.commons; org.springframework.webflow; | 325,106 |
public int getMaxItemUseDuration(ItemStack par1ItemStack)
{
return 72000;
} | int function(ItemStack par1ItemStack) { return 72000; } | /**
* How long it takes to use or consume an item
*/ | How long it takes to use or consume an item | getMaxItemUseDuration | {
"repo_name": "GhostMonk3408/MidgarCrusade",
"path": "src/main/java/fr/toss/FF7Weapons/Partisan.java",
"license": "lgpl-2.1",
"size": 3470
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 1,356,244 |
Observable<PrivateAccess> putPrivateAccessVnetSlotAsync(String resourceGroupName, String name, String slot, PrivateAccessInner access); | Observable<PrivateAccess> putPrivateAccessVnetSlotAsync(String resourceGroupName, String name, String slot, PrivateAccessInner access); | /**
* Sets data around private site access enablement and authorized Virtual Networks that can access the site.
* Sets data around private site access enablement and authorized Virtual Networks that can access the site.
*
* @param resourceGroupName Name of the resource group to which the resource be... | Sets data around private site access enablement and authorized Virtual Networks that can access the site. Sets data around private site access enablement and authorized Virtual Networks that can access the site | putPrivateAccessVnetSlotAsync | {
"repo_name": "hovsepm/azure-sdk-for-java",
"path": "appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/WebApps.java",
"license": "mit",
"size": 204730
} | [
"com.microsoft.azure.management.appservice.v2018_02_01.implementation.PrivateAccessInner"
] | import com.microsoft.azure.management.appservice.v2018_02_01.implementation.PrivateAccessInner; | import com.microsoft.azure.management.appservice.v2018_02_01.implementation.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 1,027,004 |
@Test
public void testExpectedResultsForSearchField() throws ModelNotFoundException, IOException, InvalidMetamodelVersionException, XpathException, SAXException, JDOMException {
String expectedXml = readFileFromClasspath("/com/odcgroup/page/transformmodel/tests/widget/tabletree/ExpectedDS4884_TableColumnSearchFi... | void function() throws ModelNotFoundException, IOException, InvalidMetamodelVersionException, XpathException, SAXException, JDOMException { String expectedXml = readFileFromClasspath(STR); assertFDS7_1TableTree(expectedXml); assertFDS7_3ColumnHeaderSimplified(expectedXml); Map<String, String> context = new HashMap<Stri... | /**
* Test expected results file for text area
*/ | Test expected results file for text area | testExpectedResultsForSearchField | {
"repo_name": "debabratahazra/DS",
"path": "designstudio/components/page/tests/com.odcgroup.page.transformmodel.tests/src/test/java/com/odcgroup/page/transformmodel/tests/widget/tabletree/TableTreeOnlineCellModification.java",
"license": "epl-1.0",
"size": 37299
} | [
"com.odcgroup.workbench.core.InvalidMetamodelVersionException",
"com.odcgroup.workbench.core.repository.ModelNotFoundException",
"java.io.IOException",
"java.util.HashMap",
"java.util.Map",
"org.custommonkey.xmlunit.exceptions.XpathException",
"org.jdom.JDOMException",
"org.xml.sax.SAXException"
] | import com.odcgroup.workbench.core.InvalidMetamodelVersionException; import com.odcgroup.workbench.core.repository.ModelNotFoundException; import java.io.IOException; import java.util.HashMap; import java.util.Map; import org.custommonkey.xmlunit.exceptions.XpathException; import org.jdom.JDOMException; import org.xml.... | import com.odcgroup.workbench.core.*; import com.odcgroup.workbench.core.repository.*; import java.io.*; import java.util.*; import org.custommonkey.xmlunit.exceptions.*; import org.jdom.*; import org.xml.sax.*; | [
"com.odcgroup.workbench",
"java.io",
"java.util",
"org.custommonkey.xmlunit",
"org.jdom",
"org.xml.sax"
] | com.odcgroup.workbench; java.io; java.util; org.custommonkey.xmlunit; org.jdom; org.xml.sax; | 1,951,812 |
private static String getProfileVersion(ObjectStore os) {
Database database = ((ObjectStoreInterMineImpl) os).getDatabase();
try {
String ret = MetadataManager.retrieve(database, MetadataManager.PROFILE_FORMAT_VERSION);
LOG.info("Userprofile database has version \"" + ret + "... | static String function(ObjectStore os) { Database database = ((ObjectStoreInterMineImpl) os).getDatabase(); try { String ret = MetadataManager.retrieve(database, MetadataManager.PROFILE_FORMAT_VERSION); LOG.info(STRSTR\STRError during retrieving profile version from database.", e); } } | /** Returns profile format version from database. Version 0 corresponds to
* situation when constraint values are saved in the internal format. Internal
* format is format where '*' are replaced with % and other changes.
* @see #Util.wildcardSqlToUser()
* @return saved format version or "0" if not s... | Returns profile format version from database. Version 0 corresponds to situation when constraint values are saved in the internal format. Internal format is format where '*' are replaced with % and other changes | getProfileVersion | {
"repo_name": "JoeCarlson/intermine",
"path": "intermine/api/main/src/org/intermine/api/xml/ProfileManagerBinding.java",
"license": "lgpl-2.1",
"size": 13752
} | [
"org.intermine.modelproduction.MetadataManager",
"org.intermine.objectstore.ObjectStore",
"org.intermine.objectstore.intermine.ObjectStoreInterMineImpl",
"org.intermine.sql.Database"
] | import org.intermine.modelproduction.MetadataManager; import org.intermine.objectstore.ObjectStore; import org.intermine.objectstore.intermine.ObjectStoreInterMineImpl; import org.intermine.sql.Database; | import org.intermine.modelproduction.*; import org.intermine.objectstore.*; import org.intermine.objectstore.intermine.*; import org.intermine.sql.*; | [
"org.intermine.modelproduction",
"org.intermine.objectstore",
"org.intermine.sql"
] | org.intermine.modelproduction; org.intermine.objectstore; org.intermine.sql; | 1,222,698 |
private static void loadModules(Configuration cf,
Function<String, ClassLoader> clf) {
for (ResolvedModule resolvedModule : cf.modules()) {
ModuleReference mref = resolvedModule.reference();
String name = resolvedModule.name();
ClassLoa... | static void function(Configuration cf, Function<String, ClassLoader> clf) { for (ResolvedModule resolvedModule : cf.modules()) { ModuleReference mref = resolvedModule.reference(); String name = resolvedModule.name(); ClassLoader loader = clf.apply(name); if (loader == null) { if (!name.equals(JAVA_BASE)) { BootLoader.l... | /**
* Load/register the modules to the built-in class loaders.
*/ | Load/register the modules to the built-in class loaders | loadModules | {
"repo_name": "google/desugar_jdk_libs",
"path": "jdk11/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java",
"license": "gpl-2.0",
"size": 39992
} | [
"java.lang.module.Configuration",
"java.lang.module.ModuleReference",
"java.lang.module.ResolvedModule",
"java.util.function.Function"
] | import java.lang.module.Configuration; import java.lang.module.ModuleReference; import java.lang.module.ResolvedModule; import java.util.function.Function; | import java.lang.module.*; import java.util.function.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 2,410,813 |
public ListenableFuture<StompSession> connect(String url, WebSocketHttpHeaders handshakeHeaders,
StompSessionHandler handler, Object... uriVariables) {
return connect(url, handshakeHeaders, null, handler, uriVariables);
} | ListenableFuture<StompSession> function(String url, WebSocketHttpHeaders handshakeHeaders, StompSessionHandler handler, Object... uriVariables) { return connect(url, handshakeHeaders, null, handler, uriVariables); } | /**
* An overloaded version of
* {@link #connect(String, StompSessionHandler, Object...)} that also
* accepts {@link WebSocketHttpHeaders} to use for the WebSocket handshake.
* @param url the url to connect to
* @param handshakeHeaders the headers for the WebSocket handshake
* @param handler the session han... | An overloaded version of <code>#connect(String, StompSessionHandler, Object...)</code> that also accepts <code>WebSocketHttpHeaders</code> to use for the WebSocket handshake | connect | {
"repo_name": "boggad/jdk9-sample",
"path": "sample-catalog/spring-jdk9/src/spring.websocket/org/springframework/web/socket/messaging/WebSocketStompClient.java",
"license": "mit",
"size": 16783
} | [
"org.springframework.messaging.simp.stomp.StompSession",
"org.springframework.messaging.simp.stomp.StompSessionHandler",
"org.springframework.util.concurrent.ListenableFuture",
"org.springframework.web.socket.WebSocketHttpHeaders"
] | import org.springframework.messaging.simp.stomp.StompSession; import org.springframework.messaging.simp.stomp.StompSessionHandler; import org.springframework.util.concurrent.ListenableFuture; import org.springframework.web.socket.WebSocketHttpHeaders; | import org.springframework.messaging.simp.stomp.*; import org.springframework.util.concurrent.*; import org.springframework.web.socket.*; | [
"org.springframework.messaging",
"org.springframework.util",
"org.springframework.web"
] | org.springframework.messaging; org.springframework.util; org.springframework.web; | 1,108,188 |
@Override
public String getInitParameter(String name) {
ServletContext delegatee = getServletContext();
if (delegatee != null) {
return delegatee.getInitParameter(name);
}
return null;
} | String function(String name) { ServletContext delegatee = getServletContext(); if (delegatee != null) { return delegatee.getInitParameter(name); } return null; } | /**
* Returns the init-param of the servlet context in which Sling is
* configured. This method calls on the <code>ServletContext</code> in
* which the {@link SlingMainServlet} is running.
*/ | Returns the init-param of the servlet context in which Sling is configured. This method calls on the <code>ServletContext</code> in which the <code>SlingMainServlet</code> is running | getInitParameter | {
"repo_name": "plutext/sling",
"path": "bundles/engine/src/main/java/org/apache/sling/engine/impl/helper/SlingServletContext.java",
"license": "apache-2.0",
"size": 22558
} | [
"javax.servlet.ServletContext"
] | import javax.servlet.ServletContext; | import javax.servlet.*; | [
"javax.servlet"
] | javax.servlet; | 2,868,796 |
protected void sequence_LibraryType(EObject context, LibraryType semanticObject) {
genericSequencer.createSequence(context, semanticObject);
} | void function(EObject context, LibraryType semanticObject) { genericSequencer.createSequence(context, semanticObject); } | /**
* Constraint:
* ((book+=BookType book+=BookType*)? (customer+=CustomerType customer+=CustomerType*)?)
*/ | Constraint: ((book+=BookType book+=BookType*)? (customer+=CustomerType customer+=CustomerType*)?) | sequence_LibraryType | {
"repo_name": "patrickneubauer/XMLIntellEdit",
"path": "use-cases/AME_2016/at.ac.tuwien.big.xmltext.library3/src-gen/at/ac/tuwien/big/xmltext/library3/serializer/AbstractLibrary3SemanticSequencer.java",
"license": "mit",
"size": 6133
} | [
"org.eclipse.emf.ecore.EObject"
] | import org.eclipse.emf.ecore.EObject; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,695,733 |
@SuppressWarnings("unchecked")
private HashMap<String, String>[] createWMSRequestModel( RPCStruct struct ) {
RPCMember[] member = struct.getMembers();
String request = "";
List<Map<String, String>> list = new ArrayList<Map<String, String>>( member.length - 1 );
for ( int i = 0; i... | @SuppressWarnings(STR) HashMap<String, String>[] function( RPCStruct struct ) { RPCMember[] member = struct.getMembers(); String request = STRbgColorSTRsessionIDSTRrequest = STR?STRIDSTR=STRbase URL = STRURL", sb.toString() ); list.add( map ); } catch ( Throwable e ) { e.printStackTrace(); } } } HashMap<String, String>... | /**
* Receives an RPCStruct(WMSRequest) and extracts all its properties to a HashMap
*
* @param struct
* @return a HashMap contains the WMSRequest properties
*/ | Receives an RPCStruct(WMSRequest) and extracts all its properties to a HashMap | createWMSRequestModel | {
"repo_name": "lat-lon/deegree2-base",
"path": "deegree2-core/src/main/java/org/deegree/portal/standard/wms/control/DynLegendListener.java",
"license": "lgpl-2.1",
"size": 33078
} | [
"java.util.HashMap",
"org.deegree.enterprise.control.RPCMember",
"org.deegree.enterprise.control.RPCStruct"
] | import java.util.HashMap; import org.deegree.enterprise.control.RPCMember; import org.deegree.enterprise.control.RPCStruct; | import java.util.*; import org.deegree.enterprise.control.*; | [
"java.util",
"org.deegree.enterprise"
] | java.util; org.deegree.enterprise; | 55,804 |
void onMarkerDragStart(MarkerInfo markerInfo);
}
class VisibleMapArea implements Parcelable {
public final LatLong nearLeft;
public final LatLong nearRight;
public final LatLong farLeft;
public final LatLong farRight;
public VisibleMapArea(LatLong farLeft, LatLong nearLeft, LatLong nearRight, LatLon... | void onMarkerDragStart(MarkerInfo markerInfo); } class VisibleMapArea implements Parcelable { public final LatLong nearLeft; public final LatLong nearRight; public final LatLong farLeft; public final LatLong farRight; public VisibleMapArea(LatLong farLeft, LatLong nearLeft, LatLong nearRight, LatLong farRight) { this.f... | /**
* Called when a marker starts being dragged. The marker's location can
* be accessed via {@link MarkerInfo#getPosition()}; this position may
* be different to the position prior to the start of the drag because
* the marker is popped up above the touch point.
*
* @param markerInfo
* ... | Called when a marker starts being dragged. The marker's location can be accessed via <code>MarkerInfo#getPosition()</code>; this position may be different to the position prior to the start of the drag because the marker is popped up above the touch point | onMarkerDragStart | {
"repo_name": "vuyaniShabangu/now.next",
"path": "Research/Tower-develop/Tower-develop/Android/src/org/droidplanner/android/maps/DPMap.java",
"license": "mit",
"size": 11471
} | [
"android.os.Parcelable",
"com.o3dr.services.android.lib.coordinate.LatLong"
] | import android.os.Parcelable; import com.o3dr.services.android.lib.coordinate.LatLong; | import android.os.*; import com.o3dr.services.android.lib.coordinate.*; | [
"android.os",
"com.o3dr.services"
] | android.os; com.o3dr.services; | 581,628 |
JSTypeExpression createJSTypeExpression(Node n) {
return n == null ? null :
new JSTypeExpression(n, getSourceName());
}
private static class ExtractionInfo {
private final String string;
private final JsDocToken token;
public ExtractionInfo(String string, JsDocToken token) {
thi... | JSTypeExpression createJSTypeExpression(Node n) { return n == null ? null : new JSTypeExpression(n, getSourceName()); } private static class ExtractionInfo { private final String string; private final JsDocToken token; public ExtractionInfo(String string, JsDocToken token) { this.string = string; this.token = token; } ... | /**
* Constructs a new {@code JSTypeExpression}.
* @param n A node. May be null.
*/ | Constructs a new JSTypeExpression | createJSTypeExpression | {
"repo_name": "MatrixFrog/closure-compiler",
"path": "src/com/google/javascript/jscomp/parsing/JsDocInfoParser.java",
"license": "apache-2.0",
"size": 87660
} | [
"com.google.javascript.rhino.JSTypeExpression",
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.JSTypeExpression; import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 893,649 |
public float snapOffset(Rect imageRect) {
final float oldCoordinate = mCoordinate;
float newCoordinate = oldCoordinate;
switch (this) {
case LEFT:
newCoordinate = imageRect.left;
break;
case TOP:
newCoordinate = imageR... | float function(Rect imageRect) { final float oldCoordinate = mCoordinate; float newCoordinate = oldCoordinate; switch (this) { case LEFT: newCoordinate = imageRect.left; break; case TOP: newCoordinate = imageRect.top; break; case RIGHT: newCoordinate = imageRect.right; break; case BOTTOM: newCoordinate = imageRect.bott... | /**
* Returns the potential snap offset of snaptoRect, without changing the coordinate.
*
* @param imageRect the bounding rectangle of the image to snap to
* @return the amount (in pixels) that this coordinate was changed (i.e. the
* new coordinate minus the old coordinate value)
... | Returns the potential snap offset of snaptoRect, without changing the coordinate | snapOffset | {
"repo_name": "ex3ndr/telegram",
"path": "ui/cropping/src/com/edmodo/cropper/cropwindow/edge/Edge.java",
"license": "mit",
"size": 19807
} | [
"android.graphics.Rect"
] | import android.graphics.Rect; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 921,156 |
public void add(String name, String description) {
PreparedStatement ps = null;
try {
ps = connector().prepareStatement("INSERT INTO item(name, description, create_date) VALUES (?,?,?)");
ps.setString(1, name);
ps.setString(2, description);
ps.setTimes... | void function(String name, String description) { PreparedStatement ps = null; try { ps = connector().prepareStatement(STR); ps.setString(1, name); ps.setString(2, description); ps.setTimestamp(3, new Timestamp(System.currentTimeMillis())); ps.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); } finally { ... | /**
* Add item.
* @param name String.
* @param description String.
*/ | Add item | add | {
"repo_name": "Apeksi1990/asemenov",
"path": "chapter_008/src/main/java/ru/asemenov/jdbc/TrackerSQL.java",
"license": "apache-2.0",
"size": 6594
} | [
"java.sql.PreparedStatement",
"java.sql.SQLException",
"java.sql.Timestamp"
] | import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,278,605 |
//#ifdef JAVA4
public int getResultSetHoldability() throws SQLException {
return jdbcResultSet.HOLD_CURSORS_OVER_COMMIT;
}
//#endif JAVA4
// -------------------- Internal Implementation ----------------------------
jdbcStatement(jdbcConnection c, int type) {
// PRE: assume connec... | int function() throws SQLException { return jdbcResultSet.HOLD_CURSORS_OVER_COMMIT; } jdbcStatement(jdbcConnection c, int type) { connection = c; rsType = type; } | /**
* <!-- start generic documentation -->
* Retrieves the result set holdability for <code>ResultSet</code> objects
* generated by this <code>Statement</code> object. <p>
* <!-- end generic documentation -->
*
* <!-- start release-specific documentation -->
* <div class="ReleaseSpeci... | Retrieves the result set holdability for <code>ResultSet</code> objects generated by this <code>Statement</code> object. HSQLDB-Specific Information: Starting with 1.7.2, this method returns HOLD_CURSORS_OVER_COMMIT | getResultSetHoldability | {
"repo_name": "minghao7896321/canyin",
"path": "hsqldb/src/org/hsqldb/jdbc/jdbcStatement.java",
"license": "apache-2.0",
"size": 63434
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 634,886 |
public static String getString(String key) {
try {
// return bundle.getString(key);
return null;
} catch (MissingResourceException e) {
return key;
}
} | static String function(String key) { try { return null; } catch (MissingResourceException e) { return key; } } | /**
* Returns the resource object with the given key in JFace's resource
* bundle. If there isn't any value under the given key, the key is
* returned.
*
* @param key
* the resource name
* @return the string
*/ | Returns the resource object with the given key in JFace's resource bundle. If there isn't any value under the given key, the key is returned | getString | {
"repo_name": "ghillairet/gef-gwt",
"path": "src/main/java/org/eclipse/jface/resource/JFaceResources.java",
"license": "epl-1.0",
"size": 16894
} | [
"java.util.MissingResourceException"
] | import java.util.MissingResourceException; | import java.util.*; | [
"java.util"
] | java.util; | 2,303,708 |
@Test
public void testContinuedRecord() throws IOException {
byte[] origData;
SSTRecord record;
byte[] ser_output;
origData = concatHexDumps("BigSSTRecord", "BigSSTRecordCR");
record = createSSTFromRawData(origData);
assertEquals( 1464, record.getNumStrings() );
... | void function() throws IOException { byte[] origData; SSTRecord record; byte[] ser_output; origData = concatHexDumps(STR, STR); record = createSSTFromRawData(origData); assertEquals( 1464, record.getNumStrings() ); assertEquals( 688, record.getNumUniqueStrings() ); assertEquals( 688, record.countStrings() ); ser_output... | /**
* SST is often split over several {@link ContinueRecord}s
* @throws IOException
*/ | SST is often split over several <code>ContinueRecord</code>s | testContinuedRecord | {
"repo_name": "lvweiwolf/poi-3.16",
"path": "src/testcases/org/apache/poi/hssf/record/TestSSTRecord.java",
"license": "apache-2.0",
"size": 85542
} | [
"java.io.IOException",
"junit.framework.AssertionFailedError",
"org.junit.Assert"
] | import java.io.IOException; import junit.framework.AssertionFailedError; import org.junit.Assert; | import java.io.*; import junit.framework.*; import org.junit.*; | [
"java.io",
"junit.framework",
"org.junit"
] | java.io; junit.framework; org.junit; | 994,512 |
@Override
public void setActiveEditor(IEditorPart part) {
super.setActiveEditor(part);
activeEditorPart = part;
// Switch to the new selection provider.
//
if (selectionProvider != null) {
selectionProvider.removeSelectionChangedListener(this);
}
if (part == null) {
selectionProvider = null;
... | void function(IEditorPart part) { super.setActiveEditor(part); activeEditorPart = part; selectionProvider.removeSelectionChangedListener(this); } if (part == null) { selectionProvider = null; } else { selectionProvider = part.getSite().getSelectionProvider(); selectionProvider.addSelectionChangedListener(this); selecti... | /**
* When the active editor changes, this remembers the change and registers with it as a selection provider.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | When the active editor changes, this remembers the change and registers with it as a selection provider. | setActiveEditor | {
"repo_name": "aciancone/klapersuite",
"path": "klapersuite.metamodel.simjava.editor/src/simulator/base/presentation/BaseActionBarContributor.java",
"license": "epl-1.0",
"size": 13978
} | [
"org.eclipse.jface.viewers.SelectionChangedEvent",
"org.eclipse.ui.IEditorPart"
] | import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.ui.IEditorPart; | import org.eclipse.jface.viewers.*; import org.eclipse.ui.*; | [
"org.eclipse.jface",
"org.eclipse.ui"
] | org.eclipse.jface; org.eclipse.ui; | 402,817 |
public Date getAccountHolderBirthdate() {
return accountHolderBirthdate;
} | Date function() { return accountHolderBirthdate; } | /**
* Gets the birth date of account holder with this payment.
*
* @return the birth date of account holder with this payment.
*/ | Gets the birth date of account holder with this payment | getAccountHolderBirthdate | {
"repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application",
"path": "Code/SCRD_BRE/src/java/core/gov/opm/scrd/entities/application/Payment.java",
"license": "apache-2.0",
"size": 36712
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 709,411 |
public void activateFrame(JInternalFrame frame)
{
JDesktopPane p = frame.getDesktopPane();
if (p != null)
p.setSelectedFrame(frame);
else
{
try
{
frame.setSelected(true);
}
catch (PropertyVetoException e)
{
}
}
frame.toFront();
} | void function(JInternalFrame frame) { JDesktopPane p = frame.getDesktopPane(); if (p != null) p.setSelectedFrame(frame); else { try { frame.setSelected(true); } catch (PropertyVetoException e) { } } frame.toFront(); } | /**
* This method activates the JInternalFrame by moving it to the front and
* selecting it.
*
* @param frame The JInternalFrame to activate.
*/ | This method activates the JInternalFrame by moving it to the front and selecting it | activateFrame | {
"repo_name": "unofficial-opensource-apple/gcc_40",
"path": "libjava/javax/swing/DefaultDesktopManager.java",
"license": "gpl-2.0",
"size": 17553
} | [
"java.beans.PropertyVetoException"
] | import java.beans.PropertyVetoException; | import java.beans.*; | [
"java.beans"
] | java.beans; | 1,904,827 |
public static void assertProperties(final GlueConfig _config,
final String[][] properties) {
for (int index = 0; index < properties.length; index++) {
String key = properties[index][0];
assertEquals(properties[index][1], _config.getProperty(key));
}
} | static void function(final GlueConfig _config, final String[][] properties) { for (int index = 0; index < properties.length; index++) { String key = properties[index][0]; assertEquals(properties[index][1], _config.getProperty(key)); } } | /**
* Vergleicht die {@link GlueConfig} mit der erwarteten Menge an
* Eigenschaften.
*
* @param _config Die zu prüfende Konfiguration.
* @param properties Die erwarteten Eigenschaften.
*/ | Vergleicht die <code>GlueConfig</code> mit der erwarteten Menge an Eigenschaften | assertProperties | {
"repo_name": "gluehloch/awtools-config",
"path": "src/test/java/de/awtools/config/GlueConfigTestUtils.java",
"license": "lgpl-2.1",
"size": 2626
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 628,808 |
public CompatibilityMap getCompatibility(JSchema access) throws JMFSchemaViolationException {
CompatibilityMap ans = null;
if (compMaps == null)
compMaps = new HashedArray(COMP_MAP_BUCKETS, 2);
else
ans = (CompatibilityMap)compMaps.get(access.getID());
if (ans != null)
return ans;
... | CompatibilityMap function(JSchema access) throws JMFSchemaViolationException { CompatibilityMap ans = null; if (compMaps == null) compMaps = new HashedArray(COMP_MAP_BUCKETS, 2); else ans = (CompatibilityMap)compMaps.get(access.getID()); if (ans != null) return ans; ans = new CompatibilityMap(access, this); compMaps.se... | /**
* Find the CompatibilityMap from a given access JSchema to this JSchema
*
* @param access the JSchema that is intended to be used as the access schema
* @return the desired CompatibilityMap if the schemas are compatible. This method
* never returns null.
* @exception SchemaViolationException if t... | Find the CompatibilityMap from a given access JSchema to this JSchema | getCompatibility | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/jmf/impl/JSchema.java",
"license": "epl-1.0",
"size": 27045
} | [
"com.ibm.ws.sib.mfp.jmf.JMFSchemaViolationException",
"com.ibm.ws.sib.mfp.util.HashedArray"
] | import com.ibm.ws.sib.mfp.jmf.JMFSchemaViolationException; import com.ibm.ws.sib.mfp.util.HashedArray; | import com.ibm.ws.sib.mfp.jmf.*; import com.ibm.ws.sib.mfp.util.*; | [
"com.ibm.ws"
] | com.ibm.ws; | 2,644,453 |
private void addChildren(Tags tag) {
log.info("Tag '{}' added to tree", tag.gettag_name());
List<Tags> children = getTagDao().getAllForParent(tag.gettag_id());
for (Tags child : children) {
addChildren(child);
log.info("Tag '{}' added as child to parent '{}'", child.g... | void function(Tags tag) { log.info(STR, tag.gettag_name()); List<Tags> children = getTagDao().getAllForParent(tag.gettag_id()); for (Tags child : children) { addChildren(child); log.info(STR, child.gettag_name(), tag.gettag_name()); tag.getChildren().add(child); addTagToHash(tag); addTagToHash(child); } } | /**
* Recursive tree initialization call
*
* @param tag
*/ | Recursive tree initialization call | addChildren | {
"repo_name": "jtux270/translate",
"path": "ovirt/3.6_source/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/TagsDirector.java",
"license": "gpl-3.0",
"size": 14200
} | [
"java.util.List",
"org.ovirt.engine.core.common.businessentities.Tags"
] | import java.util.List; import org.ovirt.engine.core.common.businessentities.Tags; | import java.util.*; import org.ovirt.engine.core.common.businessentities.*; | [
"java.util",
"org.ovirt.engine"
] | java.util; org.ovirt.engine; | 2,253,579 |
public static Animator createIndeterminate(Object target) {
ObjectAnimator trimPathStartAnimator = ObjectAnimator.ofFloat(target, "trimPathStart", 0,
0.75f);
trimPathStartAnimator.setDuration(1333);
trimPathStartAnimator.setInterpolator(Interpolators.TRIM_PATH_START.INSTANCE... | static Animator function(Object target) { ObjectAnimator trimPathStartAnimator = ObjectAnimator.ofFloat(target, STR, 0, 0.75f); trimPathStartAnimator.setDuration(1333); trimPathStartAnimator.setInterpolator(Interpolators.TRIM_PATH_START.INSTANCE); trimPathStartAnimator.setRepeatCount(ValueAnimator.INFINITE); ObjectAnim... | /**
* Create a backported Animator for {@code @android:anim/progress_indeterminate_material}.
*
* @param target The object whose properties are to be animated.
* @return An Animator object that is set up to behave the same as the its native counterpart.
*/ | Create a backported Animator for @android:anim/progress_indeterminate_material | createIndeterminate | {
"repo_name": "susong0618/EasyFrame",
"path": "material-dialogs/src/main/java/com/afollestad/materialdialogs/internal/progress/Animators.java",
"license": "apache-2.0",
"size": 7821
} | [
"android.animation.Animator",
"android.animation.AnimatorSet",
"android.animation.ObjectAnimator",
"android.animation.ValueAnimator"
] | import android.animation.Animator; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; | import android.animation.*; | [
"android.animation"
] | android.animation; | 2,164,463 |
private StringBuilder typeAncestors(String type, ClassReader info) {
final StringBuilder b = new StringBuilder();
while (!"java/lang/Object".equals(type)) {
b.append(';').append(type);
type = info.getSuperName();
info = typeInfo(type);
}
return b;
} | StringBuilder function(String type, ClassReader info) { final StringBuilder b = new StringBuilder(); while (!STR.equals(type)) { b.append(';').append(type); type = info.getSuperName(); info = typeInfo(type); } return b; } | /**
* Returns the internal names of the ancestor classes of the given type.
*
* @param type
* the internal name of a class or interface.
* @param info
* the ClassReader corresponding to 'type'.
* @return a StringBuilder containing the ancestor classes of 'type',
* sepa... | Returns the internal names of the ancestor classes of the given type | typeAncestors | {
"repo_name": "UrsMetz/pitest",
"path": "pitest/src/main/java/org/pitest/classinfo/ComputeClassWriter.java",
"license": "apache-2.0",
"size": 6442
} | [
"org.objectweb.asm.ClassReader"
] | import org.objectweb.asm.ClassReader; | import org.objectweb.asm.*; | [
"org.objectweb.asm"
] | org.objectweb.asm; | 2,747,205 |
@Test(expectedExceptions = Exception.class)
public final void testParse_XSD_Empty() {
final Parser<Reader, Document> parser; // Tested parser
parser = new ValidatedXMLFileParser(XMLValidationType.XSD,
IOUtils.toBufferedReader(
new InputStreamReader(IOU... | @Test(expectedExceptions = Exception.class) final void function() { final Parser<Reader, Document> parser; parser = new ValidatedXMLFileParser(XMLValidationType.XSD, IOUtils.toBufferedReader( new InputStreamReader(IOUtils.toInputStream("")))); parser.parse(new BufferedReader(new InputStreamReader( ResourceUtils.getClas... | /**
* Tests that an {@code Exception} is thrown when reading a XML file using
* an empty validation file, when using XSD validation.
*/ | Tests that an Exception is thrown when reading a XML file using an empty validation file, when using XSD validation | testParse_XSD_Empty | {
"repo_name": "Bernardo-MG/java-patterns-files",
"path": "src/test/java/com/wandrell/pattern/testing/test/integration/parser/xml/exception/ITExceptionBadValidationFileValidatedXMLFileParser.java",
"license": "mit",
"size": 4063
} | [
"com.wandrell.pattern.conf.XMLValidationType",
"com.wandrell.pattern.parser.Parser",
"com.wandrell.pattern.parser.xml.ValidatedXMLFileParser",
"com.wandrell.pattern.testing.util.ResourceUtils",
"java.io.BufferedReader",
"java.io.InputStreamReader",
"java.io.Reader",
"org.apache.commons.io.IOUtils",
... | import com.wandrell.pattern.conf.XMLValidationType; import com.wandrell.pattern.parser.Parser; import com.wandrell.pattern.parser.xml.ValidatedXMLFileParser; import com.wandrell.pattern.testing.util.ResourceUtils; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.Reader; import org.apache.... | import com.wandrell.pattern.conf.*; import com.wandrell.pattern.parser.*; import com.wandrell.pattern.parser.xml.*; import com.wandrell.pattern.testing.util.*; import java.io.*; import org.apache.commons.io.*; import org.jdom2.*; import org.testng.annotations.*; | [
"com.wandrell.pattern",
"java.io",
"org.apache.commons",
"org.jdom2",
"org.testng.annotations"
] | com.wandrell.pattern; java.io; org.apache.commons; org.jdom2; org.testng.annotations; | 1,923,990 |
private static String getClassFromDeclarationName(String specName) {
String[] parts = specName.split("\\.prototype\\.");
checkState(parts.length == 1 || parts.length == 2);
if (parts.length == 2) {
return parts[0];
}
return null;
}
}
private static class ConformanceUti... | static String function(String specName) { String[] parts = specName.split(STR); checkState(parts.length == 1 parts.length == 2); if (parts.length == 2) { return parts[0]; } return null; } } private static class ConformanceUtil { | /**
* From a provide name extract the class name.
*/ | From a provide name extract the class name | getClassFromDeclarationName | {
"repo_name": "shantanusharma/closure-compiler",
"path": "src/com/google/javascript/jscomp/ConformanceRules.java",
"license": "apache-2.0",
"size": 68137
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,825,885 |
public static void addAppSettingAddedListener(AppSettingAddedListener listener) {
if (listener != null) {
ADD_SETTING_LISTENERS.add(listener);
}
} | static void function(AppSettingAddedListener listener) { if (listener != null) { ADD_SETTING_LISTENERS.add(listener); } } | /**
* Registers a new app setting added listener.
* @param listener the listener
*/ | Registers a new app setting added listener | addAppSettingAddedListener | {
"repo_name": "Erudika/para",
"path": "para-core/src/main/java/com/erudika/para/core/App.java",
"license": "apache-2.0",
"size": 42818
} | [
"com.erudika.para.core.listeners.AppSettingAddedListener"
] | import com.erudika.para.core.listeners.AppSettingAddedListener; | import com.erudika.para.core.listeners.*; | [
"com.erudika.para"
] | com.erudika.para; | 234,859 |
public void loadMoreComplete(final List<T> newData) {
appendData(newData);
loadMoreComplete();
} | void function(final List<T> newData) { appendData(newData); loadMoreComplete(); } | /**
* load complete
*/ | load complete | loadMoreComplete | {
"repo_name": "anatagadaisukidesu/leadcom.isp",
"path": "uikit/src/com/netease/nim/uikit/common/ui/recyclerview/adapter/BaseFetchLoadAdapter.java",
"license": "apache-2.0",
"size": 31558
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,789,218 |
@Test
public void processYangFileExitNonEmptyStack() {
TreeWalkListener listener = new TreeWalkListener();
GeneratedYangParser.YangfileContext ctx = null;
BaseFileListener.processYangFileEntry(listener, ctx);
} | void function() { TreeWalkListener listener = new TreeWalkListener(); GeneratedYangParser.YangfileContext ctx = null; BaseFileListener.processYangFileEntry(listener, ctx); } | /**
* Checks that exception shouldn't be generated if stack of parsable data is
* empty at the exit of yang base rule.
*/ | Checks that exception shouldn't be generated if stack of parsable data is empty at the exit of yang base rule | processYangFileExitNonEmptyStack | {
"repo_name": "sonu283304/onos",
"path": "utils/yangutils/src/test/java/org/onosproject/yangutils/parser/impl/listeners/BaseFileListenerTest.java",
"license": "apache-2.0",
"size": 3889
} | [
"org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser",
"org.onosproject.yangutils.parser.impl.TreeWalkListener"
] | import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; import org.onosproject.yangutils.parser.impl.TreeWalkListener; | import org.onosproject.yangutils.parser.antlrgencode.*; import org.onosproject.yangutils.parser.impl.*; | [
"org.onosproject.yangutils"
] | org.onosproject.yangutils; | 2,423,815 |
private ArrayList<RawQueryNode> readQueryFromHDFS() {
ArrayList<RawQueryNode> res = new ArrayList<RawQueryNode>();
String rawQueryPath = GiraphConstants.INPUT_RAW_QUERY_PATH.get(getConfiguration());
Path qPath = new Path(rawQueryPath);
//read the partition file to build the vid2pid map.
FileSystem fs = null;
... | ArrayList<RawQueryNode> function() { ArrayList<RawQueryNode> res = new ArrayList<RawQueryNode>(); String rawQueryPath = GiraphConstants.INPUT_RAW_QUERY_PATH.get(getConfiguration()); Path qPath = new Path(rawQueryPath); FileSystem fs = null; FSDataInputStream fileIn = null; BufferedReader reader = null; try { fs = qPath... | /**
* Assume the input raw query is organized in sequence.
*
* @return
*/ | Assume the input raw query is organized in sequence | readQueryFromHDFS | {
"repo_name": "simon0227/dgraph",
"path": "giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java",
"license": "apache-2.0",
"size": 80668
} | [
"com.google.common.base.Charsets",
"com.google.common.io.Closeables",
"java.io.BufferedReader",
"java.io.IOException",
"java.io.InputStreamReader",
"java.util.ArrayList",
"java.util.concurrent.Callable",
"java.util.regex.Pattern",
"org.apache.giraph.conf.GiraphConstants",
"org.apache.giraph.plan.E... | import com.google.common.base.Charsets; import com.google.common.io.Closeables; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.concurrent.Callable; import java.util.regex.Pattern; import org.apache.giraph.conf.GiraphConstants; im... | import com.google.common.base.*; import com.google.common.io.*; import java.io.*; import java.util.*; import java.util.concurrent.*; import java.util.regex.*; import org.apache.giraph.conf.*; import org.apache.giraph.plan.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.mapreduce.*; | [
"com.google.common",
"java.io",
"java.util",
"org.apache.giraph",
"org.apache.hadoop"
] | com.google.common; java.io; java.util; org.apache.giraph; org.apache.hadoop; | 2,700,093 |
public void setTransformation(AffineTransform x) {
this.transform = x;
}
| void function(AffineTransform x) { this.transform = x; } | /**
* Sets the AffineTransform used to convert a GPSPosition to an
* OnScreenBoundingBox
*
* @param x
* the AffineTransform that should be used
*/ | Sets the AffineTransform used to convert a GPSPosition to an OnScreenBoundingBox | setTransformation | {
"repo_name": "shinnya/morgans-raid-mirror",
"path": "src/edu/bsu/jhm/es/GPSToScreenSystem.java",
"license": "gpl-3.0",
"size": 6679
} | [
"java.awt.geom.AffineTransform"
] | import java.awt.geom.AffineTransform; | import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 2,198,681 |
public ValidationReport validateJing(InputStream stream, String grammarUrl) {
final ValidationReport report = new ValidationReport();
try {
report.start();
// Setup validation properties. see Jing interface
final PropertyMapBuilder properties = new PropertyMapBu... | ValidationReport function(InputStream stream, String grammarUrl) { final ValidationReport report = new ValidationReport(); try { report.start(); final PropertyMapBuilder properties = new PropertyMapBuilder(); ValidateProperty.ERROR_HANDLER.put(properties, report); final SchemaReader schemaReader = grammarUrl.endsWith("... | /**
* Validate XML data from reader using specified grammar with Jing.
*
* @param stream XML input document.
* @param grammarUrl User supplied path to grammar.
* @return Validation report containing all validation info.
*/ | Validate XML data from reader using specified grammar with Jing | validateJing | {
"repo_name": "ambs/exist",
"path": "exist-core/src/main/java/org/exist/validation/Validator.java",
"license": "lgpl-2.1",
"size": 10755
} | [
"com.thaiopensource.util.PropertyMapBuilder",
"com.thaiopensource.validate.SchemaReader",
"com.thaiopensource.validate.ValidateProperty",
"com.thaiopensource.validate.ValidationDriver",
"com.thaiopensource.validate.rng.CompactSchemaReader",
"java.io.IOException",
"java.io.InputStream",
"org.xml.sax.In... | import com.thaiopensource.util.PropertyMapBuilder; import com.thaiopensource.validate.SchemaReader; import com.thaiopensource.validate.ValidateProperty; import com.thaiopensource.validate.ValidationDriver; import com.thaiopensource.validate.rng.CompactSchemaReader; import java.io.IOException; import java.io.InputStream... | import com.thaiopensource.util.*; import com.thaiopensource.validate.*; import com.thaiopensource.validate.rng.*; import java.io.*; import org.xml.sax.*; | [
"com.thaiopensource.util",
"com.thaiopensource.validate",
"java.io",
"org.xml.sax"
] | com.thaiopensource.util; com.thaiopensource.validate; java.io; org.xml.sax; | 1,414,525 |
public void toastError(final String msg) {
final Activity thisActivity = this;
| void function(final String msg) { final Activity thisActivity = this; | /**
* Show an error using a toast. (Only makes sense from non-UI
* threads.)
*/ | Show an error using a toast. (Only makes sense from non-UI threads.) | toastError | {
"repo_name": "pymo/pymo",
"path": "android/pgs4a/src/org/renpy/android/PythonActivity.java",
"license": "mit",
"size": 10537
} | [
"android.app.Activity"
] | import android.app.Activity; | import android.app.*; | [
"android.app"
] | android.app; | 1,896,087 |
public static <T> T createProxy(Class<T> clazz, String url)
{
ResteasyWebTarget target = (ResteasyWebTarget) ResteasyClientBuilder.newClient().target(url);
return target.proxy(clazz);
} | static <T> T function(Class<T> clazz, String url) { ResteasyWebTarget target = (ResteasyWebTarget) ResteasyClientBuilder.newClient().target(url); return target.proxy(clazz); } | /**
* Create a Resteasy client proxy.
*
* @param clazz the client interface class
* @return the proxy object
* @path the base request path
*/ | Create a Resteasy client proxy | createProxy | {
"repo_name": "awhitford/Resteasy",
"path": "resteasy-client/src/main/java/org/jboss/resteasy/test/TestPortProvider.java",
"license": "apache-2.0",
"size": 3100
} | [
"org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder",
"org.jboss.resteasy.client.jaxrs.ResteasyWebTarget"
] | import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder; import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget; | import org.jboss.resteasy.client.jaxrs.*; | [
"org.jboss.resteasy"
] | org.jboss.resteasy; | 1,285,190 |
public static UUID GetUUID(String subject, Target t) {
try {
if (subject.length() == 36) {
return UUID.fromString(subject);
}
if (subject.length() == 32) {
Matcher matcher = DASHLESS_PATTERN.matcher(subject);
if (!matcher.matches()) {
throw new IllegalArgumentException("Invalid UUID forma... | static UUID function(String subject, Target t) { try { if (subject.length() == 36) { return UUID.fromString(subject); } if (subject.length() == 32) { Matcher matcher = DASHLESS_PATTERN.matcher(subject); if (!matcher.matches()) { throw new IllegalArgumentException(STR); } return UUID.fromString(matcher.replaceAll(STR));... | /**
* Based on https://github.com/sk89q/SquirrelID
*
* @param subject
* @param t
* @return
*/ | Based on HREF | GetUUID | {
"repo_name": "Murreey/CommandHelper",
"path": "src/main/java/com/laytonsmith/core/Static.java",
"license": "gpl-3.0",
"size": 51833
} | [
"com.laytonsmith.core.constructs.Target",
"com.laytonsmith.core.exceptions.CRE",
"java.util.UUID",
"java.util.regex.Matcher"
] | import com.laytonsmith.core.constructs.Target; import com.laytonsmith.core.exceptions.CRE; import java.util.UUID; import java.util.regex.Matcher; | import com.laytonsmith.core.constructs.*; import com.laytonsmith.core.exceptions.*; import java.util.*; import java.util.regex.*; | [
"com.laytonsmith.core",
"java.util"
] | com.laytonsmith.core; java.util; | 1,868,533 |
public String readMeaningfulLine(BufferedReader br) throws IOException {
String str = "";
boolean found = false;
while (!found) {
str = br.readLine();
if (str == null)
return null;
str = str.trim();
found = !(str.length() == 0 |... | String function(BufferedReader br) throws IOException { String str = STR#")); } return str; } | /**
* Parses one meaningful line from a FAME output buffer. Returns null at the end of the file (as would br.readLine()
* )
*/ | Parses one meaningful line from a FAME output buffer. Returns null at the end of the file (as would br.readLine() ) | readMeaningfulLine | {
"repo_name": "enochd/RMG-Java",
"path": "source/RMG/jing/rxn/FastMasterEqn.java",
"license": "mit",
"size": 66968
} | [
"java.io.BufferedReader",
"java.io.IOException"
] | import java.io.BufferedReader; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,707,929 |
public PlatformTransactionManager getTransactionManager() {
return this.transactionManager;
} | PlatformTransactionManager function() { return this.transactionManager; } | /**
* Return the transaction management strategy to be used.
*/ | Return the transaction management strategy to be used | getTransactionManager | {
"repo_name": "kingtang/spring-learn",
"path": "spring-tx/src/main/java/org/springframework/transaction/support/TransactionTemplate.java",
"license": "gpl-3.0",
"size": 6647
} | [
"org.springframework.transaction.PlatformTransactionManager"
] | import org.springframework.transaction.PlatformTransactionManager; | import org.springframework.transaction.*; | [
"org.springframework.transaction"
] | org.springframework.transaction; | 767,311 |
@Override
public void onModuleLoad() {
Tracking.trackPageview(); | void function() { Tracking.trackPageview(); | /**
* Main entry point for Ode. Setting up the UI and the web service
* connections.
*/ | Main entry point for Ode. Setting up the UI and the web service connections | onModuleLoad | {
"repo_name": "nmcalabroso/appinventor-sources",
"path": "appinventor/appengine/src/com/google/appinventor/client/Ode.java",
"license": "apache-2.0",
"size": 66854
} | [
"com.google.appinventor.client.tracking.Tracking"
] | import com.google.appinventor.client.tracking.Tracking; | import com.google.appinventor.client.tracking.*; | [
"com.google.appinventor"
] | com.google.appinventor; | 2,448,867 |
public void run() {
if (suspendCollection) {
LogUtils.debugf(this, "run: address: %s Suspended!",
str(m_address));
} else {
runCollection();
}
} | void function() { if (suspendCollection) { LogUtils.debugf(this, STR, str(m_address)); } else { runCollection(); } } | /**
* <p>
* Performs the collection for the targeted IP address. The success or
* failure of the collection should be tested via the <code>failed</code>
* method.
* </p>
* <p>
* No synchronization is performed, so if this is used in a separate
* thread context synchronization mus... | Performs the collection for the targeted IP address. The success or failure of the collection should be tested via the <code>failed</code> method. No synchronization is performed, so if this is used in a separate thread context synchronization must be added. | run | {
"repo_name": "qoswork/opennmszh",
"path": "opennms-services/src/main/java/org/opennms/netmgt/linkd/SnmpCollection.java",
"license": "gpl-2.0",
"size": 34877
} | [
"org.opennms.core.utils.InetAddressUtils",
"org.opennms.core.utils.LogUtils"
] | import org.opennms.core.utils.InetAddressUtils; import org.opennms.core.utils.LogUtils; | import org.opennms.core.utils.*; | [
"org.opennms.core"
] | org.opennms.core; | 74,038 |
public MapReduceToCollectionOperation action(final String action) {
notNull("action", action);
isTrue("action must be one of: \"replace\", \"merge\", \"reduce\"", VALID_ACTIONS.contains(action));
this.action = action;
return this;
} | MapReduceToCollectionOperation function(final String action) { notNull(STR, action); isTrue(STRreplace\STRmerge\STRreduce\"", VALID_ACTIONS.contains(action)); this.action = action; return this; } | /**
* Sets the output action one of: "replace", "merge", "reduce"
*
* @param action the output action
* @return this
* @mongodb.driver.manual reference/command/mapReduce/#output-to-a-collection-with-an-action output with an action
*/ | Sets the output action one of: "replace", "merge", "reduce" | action | {
"repo_name": "jsonking/mongo-java-driver",
"path": "driver-core/src/main/com/mongodb/operation/MapReduceToCollectionOperation.java",
"license": "apache-2.0",
"size": 24399
} | [
"com.mongodb.assertions.Assertions"
] | import com.mongodb.assertions.Assertions; | import com.mongodb.assertions.*; | [
"com.mongodb.assertions"
] | com.mongodb.assertions; | 737,140 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.