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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
private Map<IAccessRuleParticipant, IAccessRule[][]> collectRulesByParticipant(
IAccessRuleParticipant[] participants,
IVMInstallType vm,
LibraryLocation[] libraries,
IJavaProject project) {
Map<IAccessRuleParticipant, IAccessRule[][]> map =
new HashMap<IAccessRuleParticipant, IAcc... | Map<IAccessRuleParticipant, IAccessRule[][]> function( IAccessRuleParticipant[] participants, IVMInstallType vm, LibraryLocation[] libraries, IJavaProject project) { Map<IAccessRuleParticipant, IAccessRule[][]> map = new HashMap<IAccessRuleParticipant, IAccessRule[][]>(); for (int i = 0; i < participants.length; i++) {... | /**
* Returns a map of participant to the access rules for that participant for the given VM,
* libraries, and project.
*
* @param participants access rule participants
* @param vm the VM
* @param libraries the {@link LibraryLocation}s
* @param project the {@link org.eclipse.jdt.core.IJavaProject} ... | Returns a map of participant to the access rules for that participant for the given VM, libraries, and project | collectRulesByParticipant | {
"repo_name": "sleshchenko/che",
"path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/environments/ExecutionEnvironment.java",
"license": "epl-1.0",
"size": 17740
} | [
"java.util.HashMap",
"java.util.Map",
"org.eclipse.che.jdt.core.launching.IVMInstallType",
"org.eclipse.che.jdt.core.launching.LibraryLocation",
"org.eclipse.jdt.core.IAccessRule",
"org.eclipse.jdt.core.IJavaProject"
] | import java.util.HashMap; import java.util.Map; import org.eclipse.che.jdt.core.launching.IVMInstallType; import org.eclipse.che.jdt.core.launching.LibraryLocation; import org.eclipse.jdt.core.IAccessRule; import org.eclipse.jdt.core.IJavaProject; | import java.util.*; import org.eclipse.che.jdt.core.launching.*; import org.eclipse.jdt.core.*; | [
"java.util",
"org.eclipse.che",
"org.eclipse.jdt"
] | java.util; org.eclipse.che; org.eclipse.jdt; | 1,108,300 |
@POST
@Path("children")
@NoCache
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public Response addChild(GroupRepresentation rep) {
this.auth.groups().requireManage(group);
String groupName = rep.getName();
if (ObjectUtil.isBlank(groupName)) ... | @Path(STR) @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) Response function(GroupRepresentation rep) { this.auth.groups().requireManage(group); String groupName = rep.getName(); if (ObjectUtil.isBlank(groupName)) { return ErrorResponse.error(STR, Response.Status.BAD_REQUEST); } Response.Res... | /**
* Set or create child. This will just set the parent if it exists. Create it and set the parent
* if the group doesn't exist.
*
* @param rep
*/ | Set or create child. This will just set the parent if it exists. Create it and set the parent if the group doesn't exist | addChild | {
"repo_name": "vmuzikar/keycloak",
"path": "services/src/main/java/org/keycloak/services/resources/admin/GroupResource.java",
"license": "apache-2.0",
"size": 11050
} | [
"javax.ws.rs.Consumes",
"javax.ws.rs.NotFoundException",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response",
"org.keycloak.common.util.ObjectUtil",
"org.keycloak.events.admin.OperationType",
"org.keycloak.models.GroupModel",
"org.keycloak.models.u... | import javax.ws.rs.Consumes; import javax.ws.rs.NotFoundException; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.keycloak.common.util.ObjectUtil; import org.keycloak.events.admin.OperationType; import org.keycloak.models.GroupModel;... | import javax.ws.rs.*; import javax.ws.rs.core.*; import org.keycloak.common.util.*; import org.keycloak.events.admin.*; import org.keycloak.models.*; import org.keycloak.models.utils.*; import org.keycloak.representations.idm.*; import org.keycloak.services.*; | [
"javax.ws",
"org.keycloak.common",
"org.keycloak.events",
"org.keycloak.models",
"org.keycloak.representations",
"org.keycloak.services"
] | javax.ws; org.keycloak.common; org.keycloak.events; org.keycloak.models; org.keycloak.representations; org.keycloak.services; | 1,068,997 |
private static ITSAnnotation createMtConfidenceAnnotation(
GenericAnnotation annotation) {
ITSAnnotation mtAnnot = new ITSAnnotation(
GenericAnnotationType.MTCONFIDENCE);
List<ITSAnnotAttribute> attrs = new ArrayList<ITSAnnotAttribute>();
if (annotation.getDouble(GenericAnnotationType.MTCONFIDENCE_VALU... | static ITSAnnotation function( GenericAnnotation annotation) { ITSAnnotation mtAnnot = new ITSAnnotation( GenericAnnotationType.MTCONFIDENCE); List<ITSAnnotAttribute> attrs = new ArrayList<ITSAnnotAttribute>(); if (annotation.getDouble(GenericAnnotationType.MTCONFIDENCE_VALUE) != null) { ITSAnnotAttribute attr = new IT... | /**
* Creates the annotation from the "MT Confidence" ITS category.
*
* @param annotation
* the generic annotation
* @return the MT confidence annotation
*/ | Creates the annotation from the "MT Confidence" ITS category | createMtConfidenceAnnotation | {
"repo_name": "freme-project/e-Internationalization",
"path": "src/main/java/eu/freme/i18n/okapi/nif/its/ITSAnnotationsHelper.java",
"license": "apache-2.0",
"size": 26017
} | [
"java.util.ArrayList",
"java.util.List",
"net.sf.okapi.common.annotation.GenericAnnotation",
"net.sf.okapi.common.annotation.GenericAnnotationType"
] | import java.util.ArrayList; import java.util.List; import net.sf.okapi.common.annotation.GenericAnnotation; import net.sf.okapi.common.annotation.GenericAnnotationType; | import java.util.*; import net.sf.okapi.common.annotation.*; | [
"java.util",
"net.sf.okapi"
] | java.util; net.sf.okapi; | 1,910,937 |
public List<StudentAttributes> search(String queryString, List<InstructorAttributes> instructors)
throws SearchServiceException {
if (queryString.trim().isEmpty()) {
return new ArrayList<>();
}
return getSearchManager().searchStudents(queryString, instructors);
} | List<StudentAttributes> function(String queryString, List<InstructorAttributes> instructors) throws SearchServiceException { if (queryString.trim().isEmpty()) { return new ArrayList<>(); } return getSearchManager().searchStudents(queryString, instructors); } | /**
* Searches for students.
*
* @param instructors the constraint that restricts the search result
*/ | Searches for students | search | {
"repo_name": "wkurniawan07/repo",
"path": "src/main/java/teammates/storage/api/StudentsDb.java",
"license": "gpl-2.0",
"size": 14689
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 325,458 |
public static int getDbVersion(@NonNull Context context) {
if (dbVersion < 0) {
dbVersion = context.getResources().getInteger(R.integer.regina_transit_db_version);
}
return dbVersion;
}
ReginaTransitDbHelper(@NonNull Context context) {
super(context, DB_NAME, null, getDbVersion(context));
} | static int function(@NonNull Context context) { if (dbVersion < 0) { dbVersion = context.getResources().getInteger(R.integer.regina_transit_db_version); } return dbVersion; } ReginaTransitDbHelper(@NonNull Context context) { super(context, DB_NAME, null, getDbVersion(context)); } | /**
* Override if multiple {@link ReginaTransitDbHelper} in same app.
*/ | Override if multiple <code>ReginaTransitDbHelper</code> in same app | getDbVersion | {
"repo_name": "mtransitapps/commons-android",
"path": "src/main/java/org/mtransit/android/commons/provider/ReginaTransitProvider.java",
"license": "apache-2.0",
"size": 20411
} | [
"android.content.Context",
"androidx.annotation.NonNull"
] | import android.content.Context; import androidx.annotation.NonNull; | import android.content.*; import androidx.annotation.*; | [
"android.content",
"androidx.annotation"
] | android.content; androidx.annotation; | 284,381 |
public void handleResult(Object result)
{
if (viewer.getState() == TreeViewer.DISCARDED) return; //Async cancel.
viewer.setExistingObjects((List) result);
} | void function(Object result) { if (viewer.getState() == TreeViewer.DISCARDED) return; viewer.setExistingObjects((List) result); } | /**
* Feeds the result back to the viewer.
* @see DataTreeViewerLoader#handleResult(Object)
*/ | Feeds the result back to the viewer | handleResult | {
"repo_name": "rleigh-dundee/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/ExistingObjectsLoader.java",
"license": "gpl-2.0",
"size": 3920
} | [
"java.util.List",
"org.openmicroscopy.shoola.agents.treeviewer.view.TreeViewer"
] | import java.util.List; import org.openmicroscopy.shoola.agents.treeviewer.view.TreeViewer; | import java.util.*; import org.openmicroscopy.shoola.agents.treeviewer.view.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 1,418,610 |
public static List<Map<String, String>> parseJsonSchema(String group, String json, boolean parseProperties) {
List<Map<String, String>> answer = new ArrayList<>();
if (json == null) {
return answer;
}
// convert into a List<Map<String, String>> structure which is expecte... | static List<Map<String, String>> function(String group, String json, boolean parseProperties) { List<Map<String, String>> answer = new ArrayList<>(); if (json == null) { return answer; } try { JsonObject output = (JsonObject) Jsoner.deserialize(json); for (String key : output.keySet()) { Map<?, ?> row = output.getMap(k... | /**
* Parses the json schema to split it into a list or rows, where each row contains key value pairs with the metadata
*
* @param group the group to parse from such as <tt>component</tt>, <tt>componentProperties</tt>, or <tt>properties</tt>.
* @param json the json
* @return a list of all the r... | Parses the json schema to split it into a list or rows, where each row contains key value pairs with the metadata | parseJsonSchema | {
"repo_name": "akhettar/camel",
"path": "tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/JSonSchemaHelper.java",
"license": "apache-2.0",
"size": 7326
} | [
"java.util.ArrayList",
"java.util.LinkedHashMap",
"java.util.List",
"java.util.Map",
"org.json.simple.JsonObject",
"org.json.simple.Jsoner"
] | import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import org.json.simple.JsonObject; import org.json.simple.Jsoner; | import java.util.*; import org.json.simple.*; | [
"java.util",
"org.json.simple"
] | java.util; org.json.simple; | 664,042 |
protected void addStyle(final String style) {
final String cmdString =
String.format(Locale.US, "var style = document.createElement('style');\nstyle.type = 'text/css';\nstyle.appendChild(document.createTextNode(\"%s\"));\ndocument.getElementsByTagName('head')[0].appendChild(style);",
... | void function(final String style) { final String cmdString = String.format(Locale.US, STR%s\STR, style); execScript(cmdString); } | /**
* Create and add a style tag containing the passed style
*
* @param style style to add to leafletmap.html
*/ | Create and add a style tag containing the passed style | addStyle | {
"repo_name": "ThomasDaheim/GPXEditor",
"path": "src/main/java/tf/gpx/edit/leafletmap/LeafletMapView.java",
"license": "bsd-3-clause",
"size": 22558
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 2,241,319 |
final List<RestHighlightFeature> highlightfeatures = new ArrayList<RestHighlightFeature>();
for (final RestHighlightFeature highlightfeature : this) {
highlightfeatures.add(highlightfeature);
}
return highlightfeatures;
} | final List<RestHighlightFeature> highlightfeatures = new ArrayList<RestHighlightFeature>(); for (final RestHighlightFeature highlightfeature : this) { highlightfeatures.add(highlightfeature); } return highlightfeatures; } | /**
* This method is provided only to be able to represent the list as XmL
*/ | This method is provided only to be able to represent the list as XmL | getHighlightFeatures | {
"repo_name": "niavok/elveos",
"path": "main/src/main/java/com/bloatit/rest/list/RestHighlightFeatureList.java",
"license": "agpl-3.0",
"size": 2623
} | [
"com.bloatit.rest.resources.RestHighlightFeature",
"java.util.ArrayList",
"java.util.List"
] | import com.bloatit.rest.resources.RestHighlightFeature; import java.util.ArrayList; import java.util.List; | import com.bloatit.rest.resources.*; import java.util.*; | [
"com.bloatit.rest",
"java.util"
] | com.bloatit.rest; java.util; | 990,511 |
public static List getAllforEncounter(Connection conn, Long encounterId) {
List list = new ArrayList();
ArrayList values = new ArrayList();
values = new ArrayList();
String sql = "SELECT o.id, o.active, o.encounter_id AS encounterId, o.patient_id AS patientId, o.pregnancy_id AS p... | static List function(Connection conn, Long encounterId) { List list = new ArrayList(); ArrayList values = new ArrayList(); values = new ArrayList(); String sql = STR + STR + STR + STR + STR + STR; values.add(encounterId); BeanProcessor beanprocessor = new AuditInfoBeanProcessor(); RowProcessor convert = new ZEPRSRowPro... | /**
* Get all outcomes for this encounter - active or inactive.
* @param conn
* @param encounterId
* @return list of outcomes
*/ | Get all outcomes for this encounter - active or inactive | getAllforEncounter | {
"repo_name": "chrisekelley/zeprs",
"path": "src/zeprs/org/cidrz/webapp/dynasite/dao/OutcomeDAO.java",
"license": "apache-2.0",
"size": 37154
} | [
"java.sql.Connection",
"java.sql.SQLException",
"java.util.ArrayList",
"java.util.List",
"javax.servlet.ServletException",
"org.apache.commons.dbutils.BeanProcessor",
"org.apache.commons.dbutils.RowProcessor",
"org.cidrz.webapp.dynasite.rules.impl.OutcomeImpl",
"org.cidrz.webapp.dynasite.utils.Audit... | import java.sql.Connection; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import javax.servlet.ServletException; import org.apache.commons.dbutils.BeanProcessor; import org.apache.commons.dbutils.RowProcessor; import org.cidrz.webapp.dynasite.rules.impl.OutcomeImpl; import org.cidrz.w... | import java.sql.*; import java.util.*; import javax.servlet.*; import org.apache.commons.dbutils.*; import org.cidrz.webapp.dynasite.rules.impl.*; import org.cidrz.webapp.dynasite.utils.*; | [
"java.sql",
"java.util",
"javax.servlet",
"org.apache.commons",
"org.cidrz.webapp"
] | java.sql; java.util; javax.servlet; org.apache.commons; org.cidrz.webapp; | 615,846 |
private String[] getNextLine() throws IOException {
if (skipEmptyTokens() == StreamTokenizer.TT_EOF)
return null;
Vector v = new Vector();
lineno = st.lineno();
while ((token != StreamTokenizer.TT_EOL) &&
(token != StreamTokenizer.TT_EOF)) {
if (st.sval != null)
v.addEleme... | String[] function() throws IOException { if (skipEmptyTokens() == StreamTokenizer.TT_EOF) return null; Vector v = new Vector(); lineno = st.lineno(); while ((token != StreamTokenizer.TT_EOL) && (token != StreamTokenizer.TT_EOF)) { if (st.sval != null) v.addElement(st.sval); token = st.nextToken(); } if (v.size() == 0) ... | /**
* Get an array of <code>String</code>s of words in the
* next line after skipping over empty and comment lines.
*/ | Get an array of <code>String</code>s of words in the next line after skipping over empty and comment lines | getNextLine | {
"repo_name": "RoProducts/rastertheque",
"path": "JAILibrary/src/javax/media/jai/RegistryFileParser.java",
"license": "gpl-2.0",
"size": 19754
} | [
"java.io.IOException",
"java.io.StreamTokenizer",
"java.util.Vector"
] | import java.io.IOException; import java.io.StreamTokenizer; import java.util.Vector; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,159,824 |
private void updateSync(SyncState sync, SyncState.Status status, int progress, SyncUpdateCallback callback) {
try {
sync.setStatus(status);
if (progress != UNCHANGED) {
sync.setProgress(progress);
}
switch (status) {
case NEW:
... | void function(SyncState sync, SyncState.Status status, int progress, SyncUpdateCallback callback) { try { sync.setStatus(status); if (progress != UNCHANGED) { sync.setProgress(progress); } switch (status) { case NEW: break; case RUNNING: runningSyncIds.add(sync.getId()); break; case DONE: case FAILED: runningSyncIds.re... | /**
* Update sync with new status, progress, totalSize
* @param sync
* @param status
* @param progress pass -1 to keep the current value
* @param callback
*/ | Update sync with new status, progress, totalSize | updateSync | {
"repo_name": "huminzhi/SalesforceMobileSDK-Android",
"path": "libs/SmartSync/src/com/salesforce/androidsdk/smartsync/manager/SyncManager.java",
"license": "apache-2.0",
"size": 26833
} | [
"android.util.Log",
"com.salesforce.androidsdk.smartstore.store.SmartStore",
"com.salesforce.androidsdk.smartsync.util.SyncState",
"org.json.JSONException"
] | import android.util.Log; import com.salesforce.androidsdk.smartstore.store.SmartStore; import com.salesforce.androidsdk.smartsync.util.SyncState; import org.json.JSONException; | import android.util.*; import com.salesforce.androidsdk.smartstore.store.*; import com.salesforce.androidsdk.smartsync.util.*; import org.json.*; | [
"android.util",
"com.salesforce.androidsdk",
"org.json"
] | android.util; com.salesforce.androidsdk; org.json; | 2,441,947 |
protected boolean createNewInstance() {
Set<NodePortTuple> blockedPorts = new HashSet<NodePortTuple>();
if (!linksUpdated) return false;
Map<NodePortTuple, Set<Link>> openflowLinks;
openflowLinks =
new HashMap<NodePortTuple, Set<Link>>();
Set<NodePortT... | boolean function() { Set<NodePortTuple> blockedPorts = new HashSet<NodePortTuple>(); if (!linksUpdated) return false; Map<NodePortTuple, Set<Link>> openflowLinks; openflowLinks = new HashMap<NodePortTuple, Set<Link>>(); Set<NodePortTuple> nptList = switchPortLinks.keySet(); if (nptList != null) { for(NodePortTuple npt:... | /**
* This function computes a new topology instance.
* It ignores links connected to all broadcast domain ports
* and tunnel ports. The method returns if a new instance of
* topology was created or not.
*/ | This function computes a new topology instance. It ignores links connected to all broadcast domain ports and tunnel ports. The method returns if a new instance of topology was created or not | createNewInstance | {
"repo_name": "andiwundsam/floodlight-sync-proto",
"path": "src/main/java/net/floodlightcontroller/topology/TopologyManager.java",
"license": "apache-2.0",
"size": 48416
} | [
"java.util.HashMap",
"java.util.HashSet",
"java.util.Map",
"java.util.Set",
"net.floodlightcontroller.routing.Link"
] | import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import net.floodlightcontroller.routing.Link; | import java.util.*; import net.floodlightcontroller.routing.*; | [
"java.util",
"net.floodlightcontroller.routing"
] | java.util; net.floodlightcontroller.routing; | 2,592,392 |
@Override
public String getText(Object object) {
String label = ((Storyboard)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_Storyboard_type") :
getString("_UI_Storyboard_type") + " " + label;
}
| String function(Object object) { String label = ((Storyboard)object).getName(); return label == null label.length() == 0 ? getString(STR) : getString(STR) + " " + label; } | /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the label text for the adapted class. | getText | {
"repo_name": "LeonoraG/storyboard-creator",
"path": "eu.scasefp7.eclipse.storyboards.edit/src/eu/scasefp7/eclipse/storyboards/provider/StoryboardItemProvider.java",
"license": "apache-2.0",
"size": 2699
} | [
"eu.scasefp7.eclipse.storyboards.Storyboard"
] | import eu.scasefp7.eclipse.storyboards.Storyboard; | import eu.scasefp7.eclipse.storyboards.*; | [
"eu.scasefp7.eclipse"
] | eu.scasefp7.eclipse; | 2,695,932 |
private static boolean isXLargeTablet(Context context) {
return (context.getResources().getConfiguration().screenLayout
& Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;
} | static boolean function(Context context) { return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE; } | /**
* Helper method to determine if the device has an extra-large screen. For
* example, 10" tablets are extra-large.
*/ | Helper method to determine if the device has an extra-large screen. For example, 10" tablets are extra-large | isXLargeTablet | {
"repo_name": "RobbiNespu/malariapp",
"path": "app/src/main/java/org/eyeseetea/malariacare/SettingsActivity.java",
"license": "gpl-3.0",
"size": 9747
} | [
"android.content.Context",
"android.content.res.Configuration"
] | import android.content.Context; import android.content.res.Configuration; | import android.content.*; import android.content.res.*; | [
"android.content"
] | android.content; | 2,499,172 |
public void testCalendar() throws RepositoryException {
try {
property.setValue(Calendar.getInstance());
node.save();
fail("Property.setValue(Calendar) must throw a VersionException " +
"immediately or on save if the parent node of this property " +
... | void function() throws RepositoryException { try { property.setValue(Calendar.getInstance()); node.save(); fail(STR + STR + STR); } catch (VersionException e) { } } | /**
* Tests if setValue(Calendar) throws a VersionException immediately
* or on save if the parent node of this property is checked-in.
*/ | Tests if setValue(Calendar) throws a VersionException immediately or on save if the parent node of this property is checked-in | testCalendar | {
"repo_name": "jalkanen/Priha",
"path": "tests/tck/org/apache/jackrabbit/test/api/SetValueVersionExceptionTest.java",
"license": "apache-2.0",
"size": 11092
} | [
"java.util.Calendar",
"javax.jcr.RepositoryException",
"javax.jcr.version.VersionException"
] | import java.util.Calendar; import javax.jcr.RepositoryException; import javax.jcr.version.VersionException; | import java.util.*; import javax.jcr.*; import javax.jcr.version.*; | [
"java.util",
"javax.jcr"
] | java.util; javax.jcr; | 176,527 |
@Test
public void shouldGetSizeOfElement() {
openWebdriverTestPage(HtmlTestData.FORM_PAGE);
waitFor(pageTitleToBe(driver(), "We Leave From Here"), 10, TimeUnit.SECONDS);
WebElement element = driver().findElement(By.id("checky"));
Dimension size = element.getSize();
Assert.assertEquals(size.widt... | void function() { openWebdriverTestPage(HtmlTestData.FORM_PAGE); waitFor(pageTitleToBe(driver(), STR), 10, TimeUnit.SECONDS); WebElement element = driver().findElement(By.id(STR)); Dimension size = element.getSize(); Assert.assertEquals(size.width, 19); Assert.assertEquals(size.height, 19); } | /**
* Based on the default test emulator used to verify build that has a resolution of 320x480
* pixels.
*/ | Based on the default test emulator used to verify build that has a resolution of 320x480 pixels | shouldGetSizeOfElement | {
"repo_name": "0x1mason/selendroid",
"path": "selendroid-test-app/src/test/java/io/selendroid/webviewdrivertests/WebElementInteractionTest.java",
"license": "apache-2.0",
"size": 5985
} | [
"io.selendroid.client.waiter.TestWaiter",
"java.util.concurrent.TimeUnit",
"org.junit.Assert",
"org.openqa.selenium.By",
"org.openqa.selenium.Dimension",
"org.openqa.selenium.WebElement"
] | import io.selendroid.client.waiter.TestWaiter; import java.util.concurrent.TimeUnit; import org.junit.Assert; import org.openqa.selenium.By; import org.openqa.selenium.Dimension; import org.openqa.selenium.WebElement; | import io.selendroid.client.waiter.*; import java.util.concurrent.*; import org.junit.*; import org.openqa.selenium.*; | [
"io.selendroid.client",
"java.util",
"org.junit",
"org.openqa.selenium"
] | io.selendroid.client; java.util; org.junit; org.openqa.selenium; | 2,038,174 |
@Named("GetBucketAcl")
@GET
@QueryParams(keys = "acl")
@XMLResponseParser(AccessControlListHandler.class)
@Fallback(ThrowContainerNotFoundOn404.class)
@Path("/")
AccessControlList getBucketACL(@Bucket @EndpointParam(parser = AssignCorrectHostnameForBucket.class) @BinderParam(
BindAsHostPre... | @Named(STR) @QueryParams(keys = "acl") @XMLResponseParser(AccessControlListHandler.class) @Fallback(ThrowContainerNotFoundOn404.class) @Path("/") AccessControlList getBucketACL(@Bucket @EndpointParam(parser = AssignCorrectHostnameForBucket.class) @BinderParam( BindAsHostPrefixIfConfigured.class) @ParamValidators(Bucket... | /**
*
* A GET request operation directed at an object or bucket URI with the "acl" parameter retrieves
* the Access Control List (ACL) settings for that S3 item.
* <p />
* To list a bucket's ACL, you must have READ_ACP access to the item.
*
* @return access permissions of the bucket
*/ | A GET request operation directed at an object or bucket URI with the "acl" parameter retrieves the Access Control List (ACL) settings for that S3 item. To list a bucket's ACL, you must have READ_ACP access to the item | getBucketACL | {
"repo_name": "yanzhijun/jclouds-aliyun",
"path": "apis/s3/src/main/java/org/jclouds/s3/S3Client.java",
"license": "apache-2.0",
"size": 31935
} | [
"javax.inject.Named",
"javax.ws.rs.Path",
"org.jclouds.blobstore.BlobStoreFallbacks",
"org.jclouds.rest.annotations.BinderParam",
"org.jclouds.rest.annotations.EndpointParam",
"org.jclouds.rest.annotations.Fallback",
"org.jclouds.rest.annotations.ParamValidators",
"org.jclouds.rest.annotations.QueryPa... | import javax.inject.Named; import javax.ws.rs.Path; import org.jclouds.blobstore.BlobStoreFallbacks; import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.rest.annotations.Fallback; import org.jclouds.rest.annotations.ParamValidators; import org.jclouds.r... | import javax.inject.*; import javax.ws.rs.*; import org.jclouds.blobstore.*; import org.jclouds.rest.annotations.*; import org.jclouds.s3.binders.*; import org.jclouds.s3.domain.*; import org.jclouds.s3.functions.*; import org.jclouds.s3.predicates.validators.*; import org.jclouds.s3.xml.*; | [
"javax.inject",
"javax.ws",
"org.jclouds.blobstore",
"org.jclouds.rest",
"org.jclouds.s3"
] | javax.inject; javax.ws; org.jclouds.blobstore; org.jclouds.rest; org.jclouds.s3; | 2,167,825 |
public void zkMkParentPath(String path,
List<ACL> acl) throws
IOException {
// split path into elements
zkMkPath(RegistryPathUtils.parentOf(path),
CreateMode.PERSISTENT, true, acl);
} | void function(String path, List<ACL> acl) throws IOException { zkMkPath(RegistryPathUtils.parentOf(path), CreateMode.PERSISTENT, true, acl); } | /**
* Recursively make a path
* @param path path to create
* @param acl ACL for path
* @throws IOException any problem
*/ | Recursively make a path | zkMkParentPath | {
"repo_name": "bruthe/hadoop-2.6.0r",
"path": "src/yarn/registry/org/apache/hadoop/registry/client/impl/zk/CuratorService.java",
"license": "apache-2.0",
"size": 23994
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.registry.client.binding.RegistryPathUtils",
"org.apache.zookeeper.CreateMode"
] | import java.io.IOException; import java.util.List; import org.apache.hadoop.registry.client.binding.RegistryPathUtils; import org.apache.zookeeper.CreateMode; | import java.io.*; import java.util.*; import org.apache.hadoop.registry.client.binding.*; import org.apache.zookeeper.*; | [
"java.io",
"java.util",
"org.apache.hadoop",
"org.apache.zookeeper"
] | java.io; java.util; org.apache.hadoop; org.apache.zookeeper; | 1,726,085 |
private void loadStepImages() {
// imagesSteps.clear();
// imagesStepsSmall.clear();
//
// STEP IMAGES TO LOAD
//
PluginRegistry registry = PluginRegistry.getInstance();
List<PluginInterface> steps = registry.getPlugins( StepPluginType.class );
for ( int i = 0; i < steps.size(); i++ ... | void function() { List<PluginInterface> steps = registry.getPlugins( StepPluginType.class ); for ( int i = 0; i < steps.size(); i++ ) { if ( imagesSteps.get( steps.get( i ).getIds()[0] ) != null ) { continue; } SwtUniversalImage image = null; Image small_image = null; String filename = steps.get( i ).getImageFile(); tr... | /**
* Load all step images from files.
*
*/ | Load all step images from files | loadStepImages | {
"repo_name": "ma459006574/pentaho-kettle",
"path": "ui/src/org/pentaho/di/ui/core/gui/GUIResource.java",
"license": "apache-2.0",
"size": 70078
} | [
"java.util.List",
"org.eclipse.swt.graphics.Image",
"org.pentaho.di.core.SwtUniversalImage",
"org.pentaho.di.core.plugins.PluginInterface",
"org.pentaho.di.core.plugins.StepPluginType",
"org.pentaho.di.ui.core.ConstUI",
"org.pentaho.di.ui.util.SwtSvgImageUtil"
] | import java.util.List; import org.eclipse.swt.graphics.Image; import org.pentaho.di.core.SwtUniversalImage; import org.pentaho.di.core.plugins.PluginInterface; import org.pentaho.di.core.plugins.StepPluginType; import org.pentaho.di.ui.core.ConstUI; import org.pentaho.di.ui.util.SwtSvgImageUtil; | import java.util.*; import org.eclipse.swt.graphics.*; import org.pentaho.di.core.*; import org.pentaho.di.core.plugins.*; import org.pentaho.di.ui.core.*; import org.pentaho.di.ui.util.*; | [
"java.util",
"org.eclipse.swt",
"org.pentaho.di"
] | java.util; org.eclipse.swt; org.pentaho.di; | 1,772,396 |
private boolean isClick(MotionEvent upEvent, float xDown, float yDown, float xUp, float yUp) {
if (upEvent == null) return false;
long time = upEvent.getEventTime() - upEvent.getDownTime();
float distance = PointF.length( //
xDown - xUp, //
yDown - yUp);
... | boolean function(MotionEvent upEvent, float xDown, float yDown, float xUp, float yUp) { if (upEvent == null) return false; long time = upEvent.getEventTime() - upEvent.getDownTime(); float distance = PointF.length( yDown - yUp); return time < MAX_CLICK_TIME && distance < MAX_CLICK_DISTANCE; } | /**
* Test if a MotionEvent with the given start and end offsets
* can be considered as a "click".
* @param upEvent The final finger-up event.
* @param xDown The x-offset of the down event.
* @param yDown The y-offset of the down event.
* @param xUp The x-offset of the up event.
... | Test if a MotionEvent with the given start and end offsets can be considered as a "click" | isClick | {
"repo_name": "dheeraj9198/android-pdfview",
"path": "android-pdfview/src/main/java/com/joanzapata/pdfview/util/DragPinchListener.java",
"license": "gpl-3.0",
"size": 8958
} | [
"android.graphics.PointF",
"android.view.MotionEvent"
] | import android.graphics.PointF; import android.view.MotionEvent; | import android.graphics.*; import android.view.*; | [
"android.graphics",
"android.view"
] | android.graphics; android.view; | 631,042 |
private GridNearAtomicAbstractUpdateFuture createSingleUpdateFuture(
K key,
@Nullable V val,
@Nullable EntryProcessor proc,
@Nullable Object[] invokeArgs,
boolean retval,
@Nullable CacheEntryPredicate filter,
boolean waitTopFut
) {
CacheOperationCo... | GridNearAtomicAbstractUpdateFuture function( K key, @Nullable V val, @Nullable EntryProcessor proc, @Nullable Object[] invokeArgs, boolean retval, @Nullable CacheEntryPredicate filter, boolean waitTopFut ) { CacheOperationContext opCtx = ctx.operationContextPerCall(); GridCacheOperation op; Object val0; if (val != null... | /**
* Craete future for single key-val pair update.
*
* @param key Key.
* @param val Value.
* @param proc Processor.
* @param invokeArgs Invoke arguments.
* @param retval Return value flag.
* @param filter Filter.
* @param waitTopFut Whether to wait for topology future.
... | Craete future for single key-val pair update | createSingleUpdateFuture | {
"repo_name": "nivanov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java",
"license": "apache-2.0",
"size": 130370
} | [
"java.util.Collections",
"javax.cache.processor.EntryProcessor",
"org.apache.ignite.internal.processors.cache.CacheEntryPredicate",
"org.apache.ignite.internal.processors.cache.CacheOperationContext",
"org.apache.ignite.internal.processors.cache.GridCacheOperation",
"org.apache.ignite.internal.processors.... | import java.util.Collections; import javax.cache.processor.EntryProcessor; import org.apache.ignite.internal.processors.cache.CacheEntryPredicate; import org.apache.ignite.internal.processors.cache.CacheOperationContext; import org.apache.ignite.internal.processors.cache.GridCacheOperation; import org.apache.ignite.int... | import java.util.*; import javax.cache.processor.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.dr.*; import org.apache.ignite.internal.processors.cache.version.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.jetbrains.annotations.*; | [
"java.util",
"javax.cache",
"org.apache.ignite",
"org.jetbrains.annotations"
] | java.util; javax.cache; org.apache.ignite; org.jetbrains.annotations; | 2,778,967 |
@Nullable
public TargetedManagedAppProtection patch(@Nonnull final TargetedManagedAppProtection sourceTargetedManagedAppProtection) throws ClientException {
return send(HttpMethod.PATCH, sourceTargetedManagedAppProtection);
} | TargetedManagedAppProtection function(@Nonnull final TargetedManagedAppProtection sourceTargetedManagedAppProtection) throws ClientException { return send(HttpMethod.PATCH, sourceTargetedManagedAppProtection); } | /**
* Patches this TargetedManagedAppProtection with a source
*
* @param sourceTargetedManagedAppProtection the source object with updates
* @return the updated TargetedManagedAppProtection
* @throws ClientException this exception occurs if the request was unable to complete for any reason
... | Patches this TargetedManagedAppProtection with a source | patch | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/TargetedManagedAppProtectionRequest.java",
"license": "mit",
"size": 7705
} | [
"com.microsoft.graph.core.ClientException",
"com.microsoft.graph.http.HttpMethod",
"com.microsoft.graph.models.TargetedManagedAppProtection",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.core.ClientException; import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.TargetedManagedAppProtection; import javax.annotation.Nonnull; | import com.microsoft.graph.core.*; import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 2,291,386 |
private boolean isBashInterpreter(String interpreter) {
return StringUtils.isBlank(interpreter) || interpreter.endsWith("bash");
} | boolean function(String interpreter) { return StringUtils.isBlank(interpreter) interpreter.endsWith("bash"); } | /**
* Detects whether the interpreter is set to bash
* @param interpreter interpreter
* @return True if interpreter is bash
*/ | Detects whether the interpreter is set to bash | isBashInterpreter | {
"repo_name": "lhellebr/spacewalk",
"path": "java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java",
"license": "gpl-2.0",
"size": 41218
} | [
"org.apache.commons.lang.StringUtils"
] | import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 527,502 |
byte[] getBytes(JavaType type, Object value) {
switch (type) {
case INT:
return serialization.toBytes((int) value);
case LONG:
return serialization.toBytes((long) value);
case FLOAT:
return serialization.toBytes((float) value);
case DOUBLE:
return serializat... | byte[] getBytes(JavaType type, Object value) { switch (type) { case INT: return serialization.toBytes((int) value); case LONG: return serialization.toBytes((long) value); case FLOAT: return serialization.toBytes((float) value); case DOUBLE: return serialization.toBytes((double) value); case BOOLEAN: return serializatio... | /**
* Serialize the given value in a type per the implementation of {@link Serialization}.
*
* @param type The JavaType of the {@code value}.
* @param value The value, must match the {@code type}.
* @return A {@code byte[]} representation of {@code value}.
*/ | Serialize the given value in a type per the implementation of <code>Serialization</code> | getBytes | {
"repo_name": "joshelser/cereal",
"path": "core/src/main/java/cereal/impl/ProtobufMessageMapping.java",
"license": "apache-2.0",
"size": 19564
} | [
"com.google.protobuf.ByteString",
"com.google.protobuf.Descriptors"
] | import com.google.protobuf.ByteString; import com.google.protobuf.Descriptors; | import com.google.protobuf.*; | [
"com.google.protobuf"
] | com.google.protobuf; | 2,519,515 |
private void processActivityNode(Attributes attributes) {
// lets get the activity name, and add it to the list
String activityName = getAttributeValue(attributes, AndroidManifest.ATTRIBUTE_NAME,
true );
if (activityName != null) {
activity... | void function(Attributes attributes) { String activityName = getAttributeValue(attributes, AndroidManifest.ATTRIBUTE_NAME, true ); if (activityName != null) { activityName = AndroidManifest.combinePackageAndClassName(mManifestData.mPackage, activityName); String exportedStr = getAttributeValue(attributes, AndroidManife... | /**
* Processes the activity node.
* @param attributes the attributes for the activity node.
*/ | Processes the activity node | processActivityNode | {
"repo_name": "consulo/consulo-android",
"path": "tools-base/sdk-common/src/main/java/com/android/ide/common/xml/AndroidManifestParser.java",
"license": "apache-2.0",
"size": 31255
} | [
"com.android.SdkConstants",
"com.android.ide.common.xml.ManifestData",
"com.android.xml.AndroidManifest",
"java.util.Locale",
"org.xml.sax.Attributes"
] | import com.android.SdkConstants; import com.android.ide.common.xml.ManifestData; import com.android.xml.AndroidManifest; import java.util.Locale; import org.xml.sax.Attributes; | import com.android.*; import com.android.ide.common.xml.*; import com.android.xml.*; import java.util.*; import org.xml.sax.*; | [
"com.android",
"com.android.ide",
"com.android.xml",
"java.util",
"org.xml.sax"
] | com.android; com.android.ide; com.android.xml; java.util; org.xml.sax; | 1,675,717 |
public static Thing createThing(ThingType thingType, ThingUID thingUID,
Configuration configuration) {
return createThing(thingType, thingUID, configuration, null);
} | static Thing function(ThingType thingType, ThingUID thingUID, Configuration configuration) { return createThing(thingType, thingUID, configuration, null); } | /**
*
* Creates a thing based on given thing type.
*
* @param thingType
* thing type (should not be null)
* @param thingUID
* thindUID (should not be null)
* @param configuration
* (should not be null)
* @return thing
*/ | Creates a thing based on given thing type | createThing | {
"repo_name": "innoq/smarthome",
"path": "bundles/core/org.eclipse.smarthome.core.thing/src/main/java/org/eclipse/smarthome/core/thing/binding/ThingFactory.java",
"license": "epl-1.0",
"size": 3909
} | [
"org.eclipse.smarthome.config.core.Configuration",
"org.eclipse.smarthome.core.thing.Thing",
"org.eclipse.smarthome.core.thing.ThingUID",
"org.eclipse.smarthome.core.thing.type.ThingType"
] | import org.eclipse.smarthome.config.core.Configuration; import org.eclipse.smarthome.core.thing.Thing; import org.eclipse.smarthome.core.thing.ThingUID; import org.eclipse.smarthome.core.thing.type.ThingType; | import org.eclipse.smarthome.config.core.*; import org.eclipse.smarthome.core.thing.*; import org.eclipse.smarthome.core.thing.type.*; | [
"org.eclipse.smarthome"
] | org.eclipse.smarthome; | 2,370,968 |
public List getCashReceipts(String verificationUnit, String[] statii); | List function(String verificationUnit, String[] statii); | /**
* Returns a List of CashReceiptDocuments for the given verificationUnit whose status matches any of the status codes in the
* given String[].
*
* @param verificationUnit A verification unit for a cash receipt.
* @param statii A collection of potential cash receipt document statuses.
*... | Returns a List of CashReceiptDocuments for the given verificationUnit whose status matches any of the status codes in the given String[] | getCashReceipts | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/fp/document/service/CashReceiptService.java",
"license": "apache-2.0",
"size": 3568
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,091,985 |
public RangeQueryBuilder timeZone(String timeZone) {
if (timeZone == null) {
throw new IllegalArgumentException("timezone cannot be null");
}
this.timeZone = DateTimeZone.forID(timeZone);
return this;
} | RangeQueryBuilder function(String timeZone) { if (timeZone == null) { throw new IllegalArgumentException(STR); } this.timeZone = DateTimeZone.forID(timeZone); return this; } | /**
* In case of date field, we can adjust the from/to fields using a timezone
*/ | In case of date field, we can adjust the from/to fields using a timezone | timeZone | {
"repo_name": "IanvsPoplicola/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/index/query/RangeQueryBuilder.java",
"license": "apache-2.0",
"size": 21487
} | [
"org.joda.time.DateTimeZone"
] | import org.joda.time.DateTimeZone; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 2,652,607 |
private Drawable getActivityIcon(ComponentName component) {
PackageManager pm = mContext.getPackageManager();
final ActivityInfo activityInfo;
try {
activityInfo = pm.getActivityInfo(component, PackageManager.GET_META_DATA);
} catch (NameNotFoundException ex) {
... | Drawable function(ComponentName component) { PackageManager pm = mContext.getPackageManager(); final ActivityInfo activityInfo; try { activityInfo = pm.getActivityInfo(component, PackageManager.GET_META_DATA); } catch (NameNotFoundException ex) { Log.w(LOG_TAG, ex.toString()); return null; } int iconId = activityInfo.g... | /**
* Gets the activity or application icon for an activity.
*
* @param component Name of an activity.
* @return A drawable, or {@code null} if neither the acitivy or the application
* have an icon set.
*/ | Gets the activity or application icon for an activity | getActivityIcon | {
"repo_name": "CyberEagle/SupportLibraryV7AppCompatPatched",
"path": "src/main/java/android/support/v7/widget/SuggestionsAdapter.java",
"license": "apache-2.0",
"size": 28234
} | [
"android.content.ComponentName",
"android.content.pm.ActivityInfo",
"android.content.pm.PackageManager",
"android.graphics.drawable.Drawable",
"android.util.Log"
] | import android.content.ComponentName; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.graphics.drawable.Drawable; import android.util.Log; | import android.content.*; import android.content.pm.*; import android.graphics.drawable.*; import android.util.*; | [
"android.content",
"android.graphics",
"android.util"
] | android.content; android.graphics; android.util; | 119,863 |
public void setExecutable(boolean executable) throws IOException, FileNotFoundException {
fileSystem.setExecutable(this, executable);
} | void function(boolean executable) throws IOException, FileNotFoundException { fileSystem.setExecutable(this, executable); } | /**
* Sets the execute permission on the file specified by the current path,
* following symbolic links. Permissions apply to the current user.
*
* @throws FileNotFoundException if the file does not exist or a dangling
* symbolic link was encountered
* @throws IOException if the metadata chang... | Sets the execute permission on the file specified by the current path, following symbolic links. Permissions apply to the current user | setExecutable | {
"repo_name": "kidaa/bazel",
"path": "src/main/java/com/google/devtools/build/lib/vfs/Path.java",
"license": "apache-2.0",
"size": 40203
} | [
"java.io.FileNotFoundException",
"java.io.IOException"
] | import java.io.FileNotFoundException; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 844,682 |
public BaseFontFontMetrics getBaseFontFontMetrics( final String fontFamily, final double fontSize,
final boolean bold, final boolean italics, final String encoding, final boolean embedded,
final boolean antiAliasing ) throws IllegalArgumentException {
try {
final FontMetrics metrics =
... | BaseFontFontMetrics function( final String fontFamily, final double fontSize, final boolean bold, final boolean italics, final String encoding, final boolean embedded, final boolean antiAliasing ) throws IllegalArgumentException { try { final FontMetrics metrics = super.getFontMetrics( fontFamily, fontSize, bold, itali... | /**
* This method goes away as soon as we no longer rely on iText for RTF export.
*
* @param fontFamily
* @param fontSize
* @param bold
* @param italics
* @param encoding
* @param embedded
* @param antiAliasing
* @return
* @throws IllegalArgumentException
*/ | This method goes away as soon as we no longer rely on iText for RTF export | getBaseFontFontMetrics | {
"repo_name": "EgorZhuk/pentaho-reporting",
"path": "engine/core/src/main/java/org/pentaho/reporting/engine/classic/core/modules/output/table/rtf/helper/RTFOutputProcessorMetaData.java",
"license": "lgpl-2.1",
"size": 8055
} | [
"org.pentaho.reporting.engine.classic.core.layout.text.LegacyFontMetrics",
"org.pentaho.reporting.libraries.fonts.itext.BaseFontFontMetrics",
"org.pentaho.reporting.libraries.fonts.registry.FontMetrics"
] | import org.pentaho.reporting.engine.classic.core.layout.text.LegacyFontMetrics; import org.pentaho.reporting.libraries.fonts.itext.BaseFontFontMetrics; import org.pentaho.reporting.libraries.fonts.registry.FontMetrics; | import org.pentaho.reporting.engine.classic.core.layout.text.*; import org.pentaho.reporting.libraries.fonts.itext.*; import org.pentaho.reporting.libraries.fonts.registry.*; | [
"org.pentaho.reporting"
] | org.pentaho.reporting; | 1,434,235 |
EReference getContainersType_Container();
| EReference getContainersType_Container(); | /**
* Returns the meta object for the containment reference list '{@link es.itecban.deployment.model.configuration.ContainersType#getContainer <em>Container</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Container</em>'.
* @see ... | Returns the meta object for the containment reference list '<code>es.itecban.deployment.model.configuration.ContainersType#getContainer Container</code>'. | getContainersType_Container | {
"repo_name": "iLabrys/iLabrysOSGi",
"path": "es.itecban.deployment.model.configuration/src/es/itecban/deployment/model/configuration/ConfigurationPackage.java",
"license": "apache-2.0",
"size": 38571
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,241,102 |
public static Calendar getCalendarInstance(final Date date) {
Calendar instance;
if (date instanceof DateTime) {
final DateTime dateTime = (DateTime) date;
if (dateTime.getTimeZone() != null) {
instance = Calendar.getInstance(dateTime.getTimeZone());
... | static Calendar function(final Date date) { Calendar instance; if (date instanceof DateTime) { final DateTime dateTime = (DateTime) date; if (dateTime.getTimeZone() != null) { instance = Calendar.getInstance(dateTime.getTimeZone()); } else if (dateTime.isUtc()) { instance = Calendar.getInstance(TimeZones.getUtcTimeZone... | /**
* Returns an instance of <code>java.util.Calendar</code> that is suitably
* initialised for working with the specified date.
* @param date a date instance
* @return a <code>java.util.Calendar</code>
*/ | Returns an instance of <code>java.util.Calendar</code> that is suitably initialised for working with the specified date | getCalendarInstance | {
"repo_name": "ariordan/ical4j",
"path": "src/main/java/net/fortuna/ical4j/util/Dates.java",
"license": "bsd-3-clause",
"size": 12437
} | [
"java.util.Calendar",
"net.fortuna.ical4j.model.Date",
"net.fortuna.ical4j.model.DateTime"
] | import java.util.Calendar; import net.fortuna.ical4j.model.Date; import net.fortuna.ical4j.model.DateTime; | import java.util.*; import net.fortuna.ical4j.model.*; | [
"java.util",
"net.fortuna.ical4j"
] | java.util; net.fortuna.ical4j; | 714,062 |
protected void checkParameters()
{
if (sensor.getParameters() != null)
{
try
{
parserService.parse(sensor.getParameters());
}
catch (ParseException e)
{
String msg = parserService.formatParserErrorMessage... | void function() { if (sensor.getParameters() != null) { try { parserService.parse(sensor.getParameters()); } catch (ParseException e) { String msg = parserService.formatParserErrorMessage(sensor.getParameters(), messages.get(ERROR_PARSING_SYNTAX), e); form.recordError(msg); } catch (IOException e) { String msg = String... | /**
* Check the parameters of the sensor definition.
*/ | Check the parameters of the sensor definition | checkParameters | {
"repo_name": "cksystemsgroup/cpcc",
"path": "cpcc-commons-ui/src/main/java/cpcc/commons/pages/sensor/AbstractModifySensor.java",
"license": "gpl-3.0",
"size": 3203
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 796,002 |
EAttribute getCopierCallbackDefinition_Stop(); | EAttribute getCopierCallbackDefinition_Stop(); | /**
* Returns the meta object for the attribute '{@link org.eclectic.frontend.qool.facilities.CopierCallbackDefinition#isStop <em>Stop</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Stop</em>'.
* @see org.eclectic.frontend.qool.facilities.CopierCallb... | Returns the meta object for the attribute '<code>org.eclectic.frontend.qool.facilities.CopierCallbackDefinition#isStop Stop</code>'. | getCopierCallbackDefinition_Stop | {
"repo_name": "jesusc/eclectic",
"path": "plugins/org.eclectic.frontend.asm/src-gen/org/eclectic/frontend/qool/facilities/FacilitiesPackage.java",
"license": "gpl-3.0",
"size": 11222
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,263,797 |
UserRequest findByCniAndType(String cni, String type); | UserRequest findByCniAndType(String cni, String type); | /**
* Get userRequest from database using cni id
*
* @param cni
* @param type
* @return UserRequest using given cni and type
*/ | Get userRequest from database using cni id | findByCniAndType | {
"repo_name": "GFI-Informatique/cadastrapp",
"path": "cadastrapp/src/main/java/org/georchestra/cadastrapp/repository/UserRequestRepository.java",
"license": "gpl-3.0",
"size": 749
} | [
"org.georchestra.cadastrapp.model.request.UserRequest"
] | import org.georchestra.cadastrapp.model.request.UserRequest; | import org.georchestra.cadastrapp.model.request.*; | [
"org.georchestra.cadastrapp"
] | org.georchestra.cadastrapp; | 353,237 |
public static String toString( final InputStream input, final String encoding, final int bufferSize )
throws IOException
{
final StringWriter sw = new StringWriter();
copy( input, sw, encoding, bufferSize );
return sw.toString();
}
///////////////////////////////////... | static String function( final InputStream input, final String encoding, final int bufferSize ) throws IOException { final StringWriter sw = new StringWriter(); copy( input, sw, encoding, bufferSize ); return sw.toString(); } | /**
* Get the contents of an <code>InputStream</code> as a String.
*
* @param encoding The name of a supported character encoding. See the
* <a href="http://www.iana.org/assignments/character-sets">IANA Charset Registry</a> for a list of valid
* encoding types.
* @par... | Get the contents of an <code>InputStream</code> as a String | toString | {
"repo_name": "Yiiinsh/x-pipe",
"path": "core/src/main/java/com/ctrip/xpipe/utils/IOUtil.java",
"license": "apache-2.0",
"size": 28792
} | [
"java.io.IOException",
"java.io.InputStream",
"java.io.StringWriter"
] | import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; | import java.io.*; | [
"java.io"
] | java.io; | 1,316,157 |
public Map<CmsResource, CmsMediaAlbumThumbnail> getThumbnailInfo() throws CmsException {
if (m_thumbnailInfo == null) {
getImages();
}
return m_thumbnailInfo;
}
| Map<CmsResource, CmsMediaAlbumThumbnail> function() throws CmsException { if (m_thumbnailInfo == null) { getImages(); } return m_thumbnailInfo; } | /**
* Returns the thumbnail info for the given resource.<p>
*
* @return the thumbnail info for the given resource
*
* @throws CmsException if something goes wrong
*/ | Returns the thumbnail info for the given resource | getThumbnailInfo | {
"repo_name": "cernio/ocamg",
"path": "com.alkacon.opencms.mediaalbum/src/com/alkacon/opencms/mediaalbum/CmsMediaAlbumBean.java",
"license": "gpl-3.0",
"size": 31319
} | [
"java.util.Map",
"org.opencms.file.CmsResource",
"org.opencms.main.CmsException"
] | import java.util.Map; import org.opencms.file.CmsResource; import org.opencms.main.CmsException; | import java.util.*; import org.opencms.file.*; import org.opencms.main.*; | [
"java.util",
"org.opencms.file",
"org.opencms.main"
] | java.util; org.opencms.file; org.opencms.main; | 2,071,592 |
public static XmlNamespace forQName( QName qname ) {
return new XmlNamespace( qname.getNamespaceURI(), qname.getPrefix() );
} | static XmlNamespace function( QName qname ) { return new XmlNamespace( qname.getNamespaceURI(), qname.getPrefix() ); } | /**
* Returns the namespace for the specified QName.
* @param qname The QName from which to get the namespace
* @return the namespace for the specified QName
*/ | Returns the namespace for the specified QName | forQName | {
"repo_name": "pdalbora/gosu-lang",
"path": "gosu-xml/src/main/java/gw/xml/XmlNamespace.java",
"license": "apache-2.0",
"size": 2962
} | [
"javax.xml.namespace.QName"
] | import javax.xml.namespace.QName; | import javax.xml.namespace.*; | [
"javax.xml"
] | javax.xml; | 1,368,241 |
public Link getLinkObject(int troid) {
return (Link)getObject(troid);
} | Link function(int troid) { return (Link)getObject(troid); } | /**
* Retrieve the <code>Link</code>
* as a <code>Link</code>.
*
* see org.melati.poem.prepro.TableDef#generateTableBaseJava
* @param troid a Table Row Object ID
* @return the <code>Persistent</code> identified */ | Retrieve the <code>Link</code> as a <code>Link</code>. see org.melati.poem.prepro.TableDef#generateTableBaseJava | getLinkObject | {
"repo_name": "Melati/MelatiSite",
"path": "src/main/java/org/paneris/melati/site/model/generated/LinkTableBase.java",
"license": "gpl-3.0",
"size": 15213
} | [
"org.paneris.melati.site.model.Link"
] | import org.paneris.melati.site.model.Link; | import org.paneris.melati.site.model.*; | [
"org.paneris.melati"
] | org.paneris.melati; | 631,031 |
public static void setLeftCenteredCoordSystem(Graphics2D g, Component comp,
double unit) {
//int dx = comp.getWidth();
int dy = comp.getHeight();
g.translate(0, dy / 2);
g.scale(unit, -unit);
//g.translate(1,0);
} | static void function(Graphics2D g, Component comp, double unit) { int dy = comp.getHeight(); g.translate(0, dy / 2); g.scale(unit, -unit); } | /**
* sets a left centered coordinate system with given unit.
*
* @param g the Graphics2D context
* @param comp the component to be given a coordinate system
* @param unit the common unit on the axes
*/ | sets a left centered coordinate system with given unit | setLeftCenteredCoordSystem | {
"repo_name": "opencadc/caom2",
"path": "caom2-viz/src/main/java/ca/nrc/cadc/caom2/viz/CoordSystemUtil.java",
"license": "agpl-3.0",
"size": 32159
} | [
"java.awt.Component",
"java.awt.Graphics2D"
] | import java.awt.Component; import java.awt.Graphics2D; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,750,665 |
public Iterator iterator() {
return this.map.values().iterator();
} | Iterator function() { return this.map.values().iterator(); } | /**
* Return an Iterator of DialectConfigurations
* @return
*/ | Return an Iterator of DialectConfigurations | iterator | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/drools-master/drools-compiler/src/main/java/org/drools/compiler/compiler/DialectCompiletimeRegistry.java",
"license": "mit",
"size": 3405
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 802,185 |
public void addExpandPreserveFileset(FileSetType fileSet)
{
if (_expandCleanupFileSet == null)
_expandCleanupFileSet = new FileSetType();
_expandCleanupFileSet.addInverse(fileSet);
} | void function(FileSetType fileSet) { if (_expandCleanupFileSet == null) _expandCleanupFileSet = new FileSetType(); _expandCleanupFileSet.addInverse(fileSet); } | /**
* Sets the expand remove file set.
*/ | Sets the expand remove file set | addExpandPreserveFileset | {
"repo_name": "dlitz/resin",
"path": "modules/resin/src/com/caucho/env/deploy/ExpandDeployGenerator.java",
"license": "gpl-2.0",
"size": 21478
} | [
"com.caucho.config.types.FileSetType"
] | import com.caucho.config.types.FileSetType; | import com.caucho.config.types.*; | [
"com.caucho.config"
] | com.caucho.config; | 791,500 |
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
{
worldIn.setBlockState(pos.up(), this.getDefaultState().withProperty(HALF, BlockDoublePlant.EnumBlockHalf.UPPER), 2);
} | void function(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { worldIn.setBlockState(pos.up(), this.getDefaultState().withProperty(HALF, BlockDoublePlant.EnumBlockHalf.UPPER), 2); } | /**
* Called by ItemBlocks after a block is set in the world, to allow post-place logic
*/ | Called by ItemBlocks after a block is set in the world, to allow post-place logic | onBlockPlacedBy | {
"repo_name": "boredherobrine13/morefuelsmod-1.10",
"path": "build/tmp/recompileMc/sources/net/minecraft/block/BlockDoublePlant.java",
"license": "lgpl-2.1",
"size": 16398
} | [
"net.minecraft.block.state.IBlockState",
"net.minecraft.entity.EntityLivingBase",
"net.minecraft.item.ItemStack",
"net.minecraft.util.math.BlockPos",
"net.minecraft.world.World"
] | import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; | import net.minecraft.block.state.*; import net.minecraft.entity.*; import net.minecraft.item.*; import net.minecraft.util.math.*; import net.minecraft.world.*; | [
"net.minecraft.block",
"net.minecraft.entity",
"net.minecraft.item",
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.block; net.minecraft.entity; net.minecraft.item; net.minecraft.util; net.minecraft.world; | 1,466,988 |
public void test(TestHarness harness)
{
// create instance of a class Double
Object o = new NoSuchFieldError("NoSuchFieldError");
// get a runtime class of an object "o"
Class c = o.getClass();
harness.check(!c.isLocalClass());
} | void function(TestHarness harness) { Object o = new NoSuchFieldError(STR); Class c = o.getClass(); harness.check(!c.isLocalClass()); } | /**
* Runs the test using the specified harness.
*
* @param harness the test harness (<code>null</code> not permitted).
*/ | Runs the test using the specified harness | test | {
"repo_name": "niloc132/mauve-gwt",
"path": "src/main/java/gnu/testlet/java/lang/NoSuchFieldError/classInfo/isLocalClass.java",
"license": "gpl-2.0",
"size": 1597
} | [
"gnu.testlet.TestHarness",
"java.lang.NoSuchFieldError"
] | import gnu.testlet.TestHarness; import java.lang.NoSuchFieldError; | import gnu.testlet.*; import java.lang.*; | [
"gnu.testlet",
"java.lang"
] | gnu.testlet; java.lang; | 713,060 |
protected boolean scanRootElementHook()
throws IOException, XNIException {
return false;
} // scanRootElementHook():boolean
| boolean function() throws IOException, XNIException { return false; } | /**
* Scan for root element hook. This method is a hook for
* subclasses to add code that handles scanning for the root
* element. When scanning a document fragment, there is no
* "root" element. However, when scanning a full XML document,
* the scanner must handle the ... | Scan for root element hook. This method is a hook for subclasses to add code that handles scanning for the root element. When scanning a document fragment, there is no "root" element. However, when scanning a full XML document, the scanner must handle the root element specially | scanRootElementHook | {
"repo_name": "AaronZhangL/SplitCharater",
"path": "xerces-2_11_0/src/org/apache/xerces/impl/XMLDocumentFragmentScannerImpl.java",
"license": "gpl-2.0",
"size": 69839
} | [
"java.io.IOException",
"org.apache.xerces.xni.XNIException"
] | import java.io.IOException; import org.apache.xerces.xni.XNIException; | import java.io.*; import org.apache.xerces.xni.*; | [
"java.io",
"org.apache.xerces"
] | java.io; org.apache.xerces; | 673,031 |
@Test void testCaseInsensitiveTableAlias() {
final SqlValidatorFixture s = fixture()
.withCaseSensitive(false)
.withQuoting(Quoting.BRACKET);
final SqlValidatorFixture sensitive = fixture()
.withQuoting(Quoting.BRACKET);
// Table aliases should follow case-sensitivity preference.
... | @Test void testCaseInsensitiveTableAlias() { final SqlValidatorFixture s = fixture() .withCaseSensitive(false) .withQuoting(Quoting.BRACKET); final SqlValidatorFixture sensitive = fixture() .withQuoting(Quoting.BRACKET); s.withSql(STR) .fails(STR); sensitive.withSql(STR).ok(); sensitive.withSql(STR) .fails(STR); } | /** Test case for
* <a href="https://issues.apache.org/jira/browse/CALCITE-319">[CALCITE-319]
* Table aliases should follow case-sensitivity policy</a>. */ | Test case for [CALCITE-319] | testCaseInsensitiveTableAlias | {
"repo_name": "apache/calcite",
"path": "core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java",
"license": "apache-2.0",
"size": 521238
} | [
"org.apache.calcite.avatica.util.Quoting",
"org.junit.jupiter.api.Test"
] | import org.apache.calcite.avatica.util.Quoting; import org.junit.jupiter.api.Test; | import org.apache.calcite.avatica.util.*; import org.junit.jupiter.api.*; | [
"org.apache.calcite",
"org.junit.jupiter"
] | org.apache.calcite; org.junit.jupiter; | 196,460 |
public static void disposeFonts() {
// clear fonts
for (Font font : m_fontMap.values()) {
font.dispose();
}
m_fontMap.clear();
// clear bold fonts
for (Font font : m_fontToBoldFontMap.values()) {
font.dispose();
}
m_fontToBoldFontMap.clear();
} | static void function() { for (Font font : m_fontMap.values()) { font.dispose(); } m_fontMap.clear(); for (Font font : m_fontToBoldFontMap.values()) { font.dispose(); } m_fontToBoldFontMap.clear(); } | /**
* Dispose all of the cached {@link Font}'s.
*/ | Dispose all of the cached <code>Font</code>'s | disposeFonts | {
"repo_name": "HuaweiSNC/OpsDev",
"path": "src/plugins/com.huawei.networkos.opsdev.core/src/com/huawei/network/opsdev/core/utils/SWTResourceManager.java",
"license": "apache-2.0",
"size": 14558
} | [
"org.eclipse.swt.graphics.Font"
] | import org.eclipse.swt.graphics.Font; | import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 246,115 |
public void annotationsUnaligned(Annotation srcAnnotation, String srcAS,
Document srcDocument, Annotation tgtAnnotation, String tgtAS,
Document tgtDocument) {
matrix.updateUI();
}
protected class MouseActionListener extends MouseInputAdapter { | void function(Annotation srcAnnotation, String srcAS, Document srcDocument, Annotation tgtAnnotation, String tgtAS, Document tgtDocument) { matrix.updateUI(); } protected class MouseActionListener extends MouseInputAdapter { | /**
* listens to the annotationsUnAligned event and updates the GUI accordingly.
*/ | listens to the annotationsUnAligned event and updates the GUI accordingly | annotationsUnaligned | {
"repo_name": "Network-of-BioThings/GettinCRAFTy",
"path": "src/main/resources/gate/plugins/Alignment/src/gate/alignment/gui/views/MatrixView.java",
"license": "apache-2.0",
"size": 10269
} | [
"javax.swing.event.MouseInputAdapter"
] | import javax.swing.event.MouseInputAdapter; | import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 1,630,374 |
private StringWriter createStringWriter(String str)
{
return new StringWriter((int)(str.length() + (str.length() * 0.1)));
} | StringWriter function(String str) { return new StringWriter((int)(str.length() + (str.length() * 0.1))); } | /**
* Make the StringWriter 10% larger than the source String to avoid growing the writer
*
* @param str
* The source string
* @return A newly created StringWriter
*/ | Make the StringWriter 10% larger than the source String to avoid growing the writer | createStringWriter | {
"repo_name": "AlienQueen/wicket",
"path": "wicket-util/src/main/java/org/apache/wicket/util/string/Entities.java",
"license": "apache-2.0",
"size": 37170
} | [
"java.io.StringWriter"
] | import java.io.StringWriter; | import java.io.*; | [
"java.io"
] | java.io; | 1,462,167 |
@Test
public void testGetAllForTemplateWithInvalidTemplate() {
List<VmNetworkInterface> result = dao.getAllForTemplate(Guid.NewGuid());
assertNotNull(result);
assertTrue(result.isEmpty());
} | void function() { List<VmNetworkInterface> result = dao.getAllForTemplate(Guid.NewGuid()); assertNotNull(result); assertTrue(result.isEmpty()); } | /**
* Ensures that an empty collection is returned.
*/ | Ensures that an empty collection is returned | testGetAllForTemplateWithInvalidTemplate | {
"repo_name": "jbeecham/ovirt-engine",
"path": "backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VmNetworkInterfaceDAOTest.java",
"license": "apache-2.0",
"size": 8337
} | [
"java.util.List",
"org.junit.Assert",
"org.ovirt.engine.core.common.businessentities.VmNetworkInterface",
"org.ovirt.engine.core.compat.Guid"
] | import java.util.List; import org.junit.Assert; import org.ovirt.engine.core.common.businessentities.VmNetworkInterface; import org.ovirt.engine.core.compat.Guid; | import java.util.*; import org.junit.*; import org.ovirt.engine.core.common.businessentities.*; import org.ovirt.engine.core.compat.*; | [
"java.util",
"org.junit",
"org.ovirt.engine"
] | java.util; org.junit; org.ovirt.engine; | 2,778,864 |
@Test
public void testCreateResource() throws InvalidSPDXAnalysisException {
final Model model = ModelFactory.createDefaultModel();
IModelContainer modelContainer = new ModelContainerForTest(model, "http://testnamespace.com");
EmptyRdfModelObject empty = new EmptyRdfModelObject();
// Anon.
String URI = "h... | void function() throws InvalidSPDXAnalysisException { final Model model = ModelFactory.createDefaultModel(); IModelContainer modelContainer = new ModelContainerForTest(model, STRhttp: empty.setUri(URI); Resource r = empty.createResource(modelContainer); assertTrue(r.isURIResource()); Node p = model.getProperty(TEST_NAM... | /**
* Test method for {@link org.spdx.rdfparser.model.RdfModelObject#createResource(com.hp.hpl.jena.rdf.model.Model, java.lang.String)}.
* @throws InvalidSPDXAnalysisException
*/ | Test method for <code>org.spdx.rdfparser.model.RdfModelObject#createResource(com.hp.hpl.jena.rdf.model.Model, java.lang.String)</code> | testCreateResource | {
"repo_name": "romeara/spdx-tools",
"path": "Test/org/spdx/rdfparser/model/TestRdfModelObject.java",
"license": "apache-2.0",
"size": 37165
} | [
"com.hp.hpl.jena.graph.Node",
"com.hp.hpl.jena.graph.Triple",
"com.hp.hpl.jena.rdf.model.Model",
"com.hp.hpl.jena.rdf.model.ModelFactory",
"com.hp.hpl.jena.rdf.model.Resource",
"com.hp.hpl.jena.util.iterator.ExtendedIterator",
"org.junit.Assert",
"org.spdx.rdfparser.IModelContainer",
"org.spdx.rdfpa... | import com.hp.hpl.jena.graph.Node; import com.hp.hpl.jena.graph.Triple; import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.rdf.model.ModelFactory; import com.hp.hpl.jena.rdf.model.Resource; import com.hp.hpl.jena.util.iterator.ExtendedIterator; import org.junit.Assert; import org.spdx.rdfparser.IModelContai... | import com.hp.hpl.jena.graph.*; import com.hp.hpl.jena.rdf.model.*; import com.hp.hpl.jena.util.iterator.*; import org.junit.*; import org.spdx.rdfparser.*; | [
"com.hp.hpl",
"org.junit",
"org.spdx.rdfparser"
] | com.hp.hpl; org.junit; org.spdx.rdfparser; | 12,121 |
public static URL getResourceURL(String resource) throws IOException {
return getResourceURL(getClassLoader(), resource);
} | static URL function(String resource) throws IOException { return getResourceURL(getClassLoader(), resource); } | /**
* Returns the URL of the resource on the classpath
*
* @param resource The resource to find
* @return The resource
* @throws IOException If the resource cannot be found or read
*/ | Returns the URL of the resource on the classpath | getResourceURL | {
"repo_name": "lane-cn/elasticsql",
"path": "src/main/java/org/durid/support/logging/Resources.java",
"license": "apache-2.0",
"size": 10993
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,384,001 |
public void testShiftLeft4() {
byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26};
int aSign = 1;
int number = 45;
byte rBytes[] = {48, 7, 12, -97, -42, -117, 37, -85, 96, 126, 36, 99, 64, 0, 0, 0, 0, 0};
BigInteger aNumber = new BigInteger(aSign, aBytes)... | void function() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; int number = 45; byte rBytes[] = {48, 7, 12, -97, -42, -117, 37, -85, 96, 126, 36, 99, 64, 0, 0, 0, 0, 0}; BigInteger aNumber = new BigInteger(aSign, aBytes); BigInteger result = aNumber.shiftLeft(number); byte res... | /**
* shiftLeft(int n) a positive number, n > 0
*/ | shiftLeft(int n) a positive number, n > 0 | testShiftLeft4 | {
"repo_name": "JSDemos/android-sdk-20",
"path": "src/org/apache/harmony/tests/java/math/BigIntegerOperateBitsTest.java",
"license": "apache-2.0",
"size": 50548
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 1,930,565 |
public void draw(){
if(!visible) return;
winApp.pushStyle();
winApp.style(G4P.g4pStyle);
Point pos = new Point(0,0);
calcAbsPosition(pos);
// Draw button rectangle
if(border == 0){
winApp.strokeWeight(0);
winApp.noStroke();
}
else {
winApp.strokeWeight(border);
wi... | void function(){ if(!visible) return; winApp.pushStyle(); winApp.style(G4P.g4pStyle); Point pos = new Point(0,0); calcAbsPosition(pos); if(border == 0){ winApp.strokeWeight(0); winApp.noStroke(); } else { winApp.strokeWeight(border); winApp.stroke(localColor.btnBorder); } switch(status){ case 0: winApp.fill(localColor.... | /**
* Draw the button
*/ | Draw the button | draw | {
"repo_name": "dearmash/Processing",
"path": "libraries/guicomponents/src/guicomponents/GButton.java",
"license": "mit",
"size": 17249
} | [
"java.awt.Point"
] | import java.awt.Point; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,489,146 |
public void fail()
{
logger.error("Failed creating a merkle tree for {}, {} (see log for details)", desc, initiator);
// send fail message only to nodes >= version 2.0
MessagingService.instance().sendOneWay(new ValidationComplete(desc).createMessage(), initiator);
} | void function() { logger.error(STR, desc, initiator); MessagingService.instance().sendOneWay(new ValidationComplete(desc).createMessage(), initiator); } | /**
* Called when some error during the validation happened.
* This sends RepairStatus to inform the initiator that the validation has failed.
* The actual reason for failure should be looked up in the log of the host calling this function.
*/ | Called when some error during the validation happened. This sends RepairStatus to inform the initiator that the validation has failed. The actual reason for failure should be looked up in the log of the host calling this function | fail | {
"repo_name": "ollie314/cassandra",
"path": "src/java/org/apache/cassandra/repair/Validator.java",
"license": "apache-2.0",
"size": 12215
} | [
"org.apache.cassandra.net.MessagingService",
"org.apache.cassandra.repair.messages.ValidationComplete"
] | import org.apache.cassandra.net.MessagingService; import org.apache.cassandra.repair.messages.ValidationComplete; | import org.apache.cassandra.net.*; import org.apache.cassandra.repair.messages.*; | [
"org.apache.cassandra"
] | org.apache.cassandra; | 1,106,832 |
void resumeDownload(ContentId id, DownloadItem item, boolean hasUserGesture); | void resumeDownload(ContentId id, DownloadItem item, boolean hasUserGesture); | /**
* Called to resume a paused download.
* @param id The {@link ContentId} of the download to cancel.
* @param item Download item to resume.
* @param hasUserGesture Whether the resumption is triggered by user gesture.
* TODO(fgorski): Update the interface to not require download item.
*/ | Called to resume a paused download | resumeDownload | {
"repo_name": "endlessm/chromium-browser",
"path": "chrome/android/java/src/org/chromium/chrome/browser/download/DownloadServiceDelegate.java",
"license": "bsd-3-clause",
"size": 1426
} | [
"org.chromium.components.offline_items_collection.ContentId"
] | import org.chromium.components.offline_items_collection.ContentId; | import org.chromium.components.offline_items_collection.*; | [
"org.chromium.components"
] | org.chromium.components; | 1,350,179 |
public Patient createLinkPatient(Patient source) throws PatientLinkException {
// Merge a new patient record with the source to create the new link record
if (source == null || !source.hasValidId()) {
throw new PatientLinkException("This has to be a valid source record");
}
... | Patient function(Patient source) throws PatientLinkException { if (source == null !source.hasValidId()) { throw new PatientLinkException(STR); } Patient target = new Patient(); target.setNhsno(source.getNhsno()); target.setPatientLinkId(source.getId()); target.setPatientLinkUnitCode(source.getUnitcode()); target.setFor... | /**
* Method to create a Patient record linked to the original that is ready for registration
*
* @param source
* @return
* @throws PatientLinkException
*/ | Method to create a Patient record linked to the original that is ready for registration | createLinkPatient | {
"repo_name": "robworth/patientview",
"path": "patientview-parent/radar/src/main/java/org/patientview/radar/service/impl/PatientManagerImpl.java",
"license": "gpl-3.0",
"size": 7616
} | [
"org.patientview.model.Patient",
"org.patientview.radar.exception.PatientLinkException"
] | import org.patientview.model.Patient; import org.patientview.radar.exception.PatientLinkException; | import org.patientview.model.*; import org.patientview.radar.exception.*; | [
"org.patientview.model",
"org.patientview.radar"
] | org.patientview.model; org.patientview.radar; | 1,315,606 |
public static byte[] removeItemFromMap(int oid, int animation, int cid, boolean pet, int slot) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.REMOVE_ITEM_FROM_MAP.getValue());
mplew.write(animation); ... | static byte[] function(int oid, int animation, int cid, boolean pet, int slot) { final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(); mplew.writeShort(SendOpcode.REMOVE_ITEM_FROM_MAP.getValue()); mplew.write(animation); mplew.writeInt(oid); if (animation >= 2) { mplew.writeInt(cid); if (pet)... | /**
* animation: 0 - expire<br/> 1 - without animation<br/> 2 - pickup<br/> 4 -
* explode<br/> cid is ignored for 0 and 1.<br /><br />Flagging pet as true
* will make a pet pick up the item.
*
* @param oid
* @param animation
* @param cid
* @param p... | animation: 0 - expire 1 - without animation 2 - pickup 4 - explode cid is ignored for 0 and 1.Flagging pet as true will make a pet pick up the item | removeItemFromMap | {
"repo_name": "ronancpl/MapleSolaxiaV2",
"path": "src/tools/MaplePacketCreator.java",
"license": "agpl-3.0",
"size": 404136
} | [
"net.opcodes.SendOpcode",
"tools.data.output.MaplePacketLittleEndianWriter"
] | import net.opcodes.SendOpcode; import tools.data.output.MaplePacketLittleEndianWriter; | import net.opcodes.*; import tools.data.output.*; | [
"net.opcodes",
"tools.data.output"
] | net.opcodes; tools.data.output; | 2,473,047 |
public void connexion() throws UnknownHostException, IOException{
leSocket = new Socket("127.0.0.1", 50000); // @IP du serveur
fluxSortieSocket = new PrintStream(leSocket.getOutputStream());
fluxEntreeSocket = new BufferedReader(new InputStreamReader(leSocket.getInputStream()));
System.out.println(... | void function() throws UnknownHostException, IOException{ leSocket = new Socket(STR, 50000); fluxSortieSocket = new PrintStream(leSocket.getOutputStream()); fluxEntreeSocket = new BufferedReader(new InputStreamReader(leSocket.getInputStream())); System.out.println(STR); } | /**Connexion socket
* @throws UnknownHostException
* @throws IOException
*/ | Connexion socket | connexion | {
"repo_name": "Shuntor/JavaM1",
"path": "Client/src/GestionProtocoleClient.java",
"license": "gpl-2.0",
"size": 12234
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.InputStreamReader",
"java.io.PrintStream",
"java.net.Socket",
"java.net.UnknownHostException"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintStream; import java.net.Socket; import java.net.UnknownHostException; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 1,132,564 |
protected void unsetRegistryService(RegistryService registryService) {
if (log.isDebugEnabled()) {
log.debug("Unset Registry service");
}
ServiceHolder.setRegistryService(null);
} | void function(RegistryService registryService) { if (log.isDebugEnabled()) { log.debug(STR); } ServiceHolder.setRegistryService(null); } | /**
* Method to unset registry service.
*
* @param registryService service to get registry data.
*/ | Method to unset registry service | unsetRegistryService | {
"repo_name": "ruwanta/product-apim",
"path": "modules/distribution/resources/migration-1.8.0_to_1.9.0/wso2-api-migration-client/src/main/java/org/wso2/carbon/apimgt/migration/client/internal/APIMMigrationServiceComponent.java",
"license": "apache-2.0",
"size": 15559
} | [
"org.wso2.carbon.registry.core.service.RegistryService"
] | import org.wso2.carbon.registry.core.service.RegistryService; | import org.wso2.carbon.registry.core.service.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 2,340,494 |
@Override
public void pushNewData(Ref ref, ProgressListener progress) throws SynchronizationException {
pushNewData(ref, ref.getName(), progress);
} | void function(Ref ref, ProgressListener progress) throws SynchronizationException { pushNewData(ref, ref.getName(), progress); } | /**
* Push all new objects from the specified {@link Ref} to the remote.
*
* @param ref the local ref that points to new commit data
*/ | Push all new objects from the specified <code>Ref</code> to the remote | pushNewData | {
"repo_name": "marcusthebrown/geogig",
"path": "src/core/src/main/java/org/locationtech/geogig/remote/AbstractMappedRemoteRepo.java",
"license": "bsd-3-clause",
"size": 17642
} | [
"org.locationtech.geogig.api.ProgressListener",
"org.locationtech.geogig.api.Ref",
"org.locationtech.geogig.api.porcelain.SynchronizationException"
] | import org.locationtech.geogig.api.ProgressListener; import org.locationtech.geogig.api.Ref; import org.locationtech.geogig.api.porcelain.SynchronizationException; | import org.locationtech.geogig.api.*; import org.locationtech.geogig.api.porcelain.*; | [
"org.locationtech.geogig"
] | org.locationtech.geogig; | 148,971 |
Collection<Instance> instances(); | Collection<Instance> instances(); | /**
* Return a collection of running instances within the same GCE project
* @return a collection of running instances within the same GCE project
*/ | Return a collection of running instances within the same GCE project | instances | {
"repo_name": "danielmitterdorfer/elasticsearch",
"path": "plugins/discovery-gce/src/main/java/org/elasticsearch/cloud/gce/GceComputeService.java",
"license": "apache-2.0",
"size": 3812
} | [
"com.google.api.services.compute.model.Instance",
"java.util.Collection"
] | import com.google.api.services.compute.model.Instance; import java.util.Collection; | import com.google.api.services.compute.model.*; import java.util.*; | [
"com.google.api",
"java.util"
] | com.google.api; java.util; | 2,888,533 |
@Override
public Timestamp queryModifiedDate(String uuid) throws CatalogIndexException {
Timestamp tsUpdate = null;
IndexSearcher searcher = null;
TermDocs termDocs = null;
try {
uuid = Val.chkStr(uuid);
if (uuid.length() > 0) {
String[] aFields = new String[]{Storeables.FIELD_DA... | Timestamp function(String uuid) throws CatalogIndexException { Timestamp tsUpdate = null; IndexSearcher searcher = null; TermDocs termDocs = null; try { uuid = Val.chkStr(uuid); if (uuid.length() > 0) { String[] aFields = new String[]{Storeables.FIELD_DATEMODIFIED}; MapFieldSelector selector = new MapFieldSelector(aFie... | /**
* Queries the system modified date associated with an indexed document.
* @param uuid the document UUID
* @return the update date (null if none was found)
* @throws CatalogIndexException if an exception occurs
*/ | Queries the system modified date associated with an indexed document | queryModifiedDate | {
"repo_name": "GeoinformationSystems/GeoprocessingAppstore",
"path": "src/com/esri/gpt/catalog/lucene/LuceneIndexAdapter.java",
"license": "apache-2.0",
"size": 41206
} | [
"com.esri.gpt.catalog.context.CatalogIndexException",
"com.esri.gpt.framework.util.Val",
"java.io.IOException",
"java.sql.Timestamp",
"org.apache.lucene.document.Document",
"org.apache.lucene.document.MapFieldSelector",
"org.apache.lucene.index.IndexReader",
"org.apache.lucene.index.Term",
"org.apac... | import com.esri.gpt.catalog.context.CatalogIndexException; import com.esri.gpt.framework.util.Val; import java.io.IOException; import java.sql.Timestamp; import org.apache.lucene.document.Document; import org.apache.lucene.document.MapFieldSelector; import org.apache.lucene.index.IndexReader; import org.apache.lucene.i... | import com.esri.gpt.catalog.context.*; import com.esri.gpt.framework.util.*; import java.io.*; import java.sql.*; import org.apache.lucene.document.*; import org.apache.lucene.index.*; import org.apache.lucene.search.*; | [
"com.esri.gpt",
"java.io",
"java.sql",
"org.apache.lucene"
] | com.esri.gpt; java.io; java.sql; org.apache.lucene; | 950,393 |
public void setOpenStackConnection(Connection openStackConnection) {
this.openStackConnection = openStackConnection;
} | void function(Connection openStackConnection) { this.openStackConnection = openStackConnection; } | /**
* Setter for openStackConnection
*
* @param openStackConnection
*/ | Setter for openStackConnection | setOpenStackConnection | {
"repo_name": "opendaylight/vtn",
"path": "coordinator/java/vtn-javaapi/src/org/opendaylight/vtn/javaapi/resources/AbstractResource.java",
"license": "epl-1.0",
"size": 23968
} | [
"java.sql.Connection"
] | import java.sql.Connection; | import java.sql.*; | [
"java.sql"
] | java.sql; | 791,396 |
public static void main(String[] args) throws Exception{
Configuration conf = new Configuration();
inStore = DataStoreFactory.getDataStore(Long.class, Pageview.class, conf);
outStore = DataStoreFactory.getDataStore(String.class, MetricDatum.class, conf);
Query<Long, Pageview> query = inStore.newQu... | static void function(String[] args) throws Exception{ Configuration conf = new Configuration(); inStore = DataStoreFactory.getDataStore(Long.class, Pageview.class, conf); outStore = DataStoreFactory.getDataStore(String.class, MetricDatum.class, conf); Query<Long, Pageview> query = inStore.newQuery(); JetEngine<Long, Pa... | /**
* In the main method pageviews are fetched though the jet source connector.
* Then those are grouped by url and day. Then a counting aggregator is
* applied to calculate the aggregated daily pageviews. Then the result is
* output through the jet sink connector to a gora compatible data store.
*/ | In the main method pageviews are fetched though the jet source connector. Then those are grouped by url and day. Then a counting aggregator is applied to calculate the aggregated daily pageviews. Then the result is output through the jet sink connector to a gora compatible data store | main | {
"repo_name": "alfonsonishikawa/gora",
"path": "gora-tutorial/src/main/java/org/apache/gora/tutorial/log/LogAnalyticsJet.java",
"license": "apache-2.0",
"size": 4102
} | [
"com.hazelcast.jet.Jet",
"com.hazelcast.jet.JetInstance",
"com.hazelcast.jet.aggregate.AggregateOperations",
"com.hazelcast.jet.pipeline.Pipeline",
"java.util.Map",
"org.apache.gora.jet.JetEngine",
"org.apache.gora.jet.JetInputOutputFormat",
"org.apache.gora.query.Query",
"org.apache.gora.store.Data... | import com.hazelcast.jet.Jet; import com.hazelcast.jet.JetInstance; import com.hazelcast.jet.aggregate.AggregateOperations; import com.hazelcast.jet.pipeline.Pipeline; import java.util.Map; import org.apache.gora.jet.JetEngine; import org.apache.gora.jet.JetInputOutputFormat; import org.apache.gora.query.Query; import ... | import com.hazelcast.jet.*; import com.hazelcast.jet.aggregate.*; import com.hazelcast.jet.pipeline.*; import java.util.*; import org.apache.gora.jet.*; import org.apache.gora.query.*; import org.apache.gora.store.*; import org.apache.gora.tutorial.log.generated.*; import org.apache.hadoop.conf.*; | [
"com.hazelcast.jet",
"java.util",
"org.apache.gora",
"org.apache.hadoop"
] | com.hazelcast.jet; java.util; org.apache.gora; org.apache.hadoop; | 767,582 |
int updateByPrimaryKeySelective(DBVolumes record); | int updateByPrimaryKeySelective(DBVolumes record); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table volumes
*
* @mbggenerated Tue May 26 15:53:09 CST 2015
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table volumes | updateByPrimaryKeySelective | {
"repo_name": "wolabs/womano",
"path": "main/java/com/culabs/unicomportal/dao/DBVolumesMapper.java",
"license": "apache-2.0",
"size": 1774
} | [
"com.culabs.unicomportal.model.db.DBVolumes"
] | import com.culabs.unicomportal.model.db.DBVolumes; | import com.culabs.unicomportal.model.db.*; | [
"com.culabs.unicomportal"
] | com.culabs.unicomportal; | 2,791,400 |
String gtk_menu_item_get_label(GtkMenuItem menu_item); | String gtk_menu_item_get_label(GtkMenuItem menu_item); | /**
* Sets text on the menu_item label
*
* @param menu_item a GtkMenuItem
* @return The text in the menu_item label. This is the internal string used by the label, and must not be modified
*/ | Sets text on the menu_item label | gtk_menu_item_get_label | {
"repo_name": "Ccook/gtk-java-bindings",
"path": "src/main/java/com/github/ccook/gtk/library/object/widget/container/bin/GtkMenuItemLibrary.java",
"license": "apache-2.0",
"size": 6596
} | [
"com.github.ccook.gtk.model.object.widget.container.bin.GtkMenuItem"
] | import com.github.ccook.gtk.model.object.widget.container.bin.GtkMenuItem; | import com.github.ccook.gtk.model.object.widget.container.bin.*; | [
"com.github.ccook"
] | com.github.ccook; | 2,045,875 |
public static void addFolderToClassPath(final File file) throws IOException {
try {
// hack to add an url to the system classpath
final Method method = URLClassLoader.class.getDeclaredMethod("addURL", new Class[] { URL.class });
method.setAccessible(true);
... | static void function(final File file) throws IOException { try { final Method method = URLClassLoader.class.getDeclaredMethod(STR, new Class[] { URL.class }); method.setAccessible(true); method.invoke(Application.class.getClassLoader(), new Object[] { file.toURI().toURL() }); } catch (final Throwable t) { Log.exception... | /**
* Adds a folder to the System classloader classpath this might fail if there is a security manager
*
* @param file
* @throws IOException
*/ | Adds a folder to the System classloader classpath this might fail if there is a security manager | addFolderToClassPath | {
"repo_name": "friedlwo/AppWoksUtils",
"path": "src/org/appwork/utils/Application.java",
"license": "artistic-2.0",
"size": 30127
} | [
"java.io.File",
"java.io.IOException",
"java.lang.reflect.Method",
"java.net.URLClassLoader",
"org.appwork.utils.logging.Log"
] | import java.io.File; import java.io.IOException; import java.lang.reflect.Method; import java.net.URLClassLoader; import org.appwork.utils.logging.Log; | import java.io.*; import java.lang.reflect.*; import java.net.*; import org.appwork.utils.logging.*; | [
"java.io",
"java.lang",
"java.net",
"org.appwork.utils"
] | java.io; java.lang; java.net; org.appwork.utils; | 1,697,229 |
@Deprecated
public Case getCurrentCase() {
return Case.getCurrentCase();
} | Case function() { return Case.getCurrentCase(); } | /**
* Get the current open case.
*
* @return The current case.
*
* @deprecated Use getCase instead.
*/ | Get the current open case | getCurrentCase | {
"repo_name": "APriestman/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/ingest/IngestServices.java",
"license": "apache-2.0",
"size": 6765
} | [
"org.sleuthkit.autopsy.casemodule.Case"
] | import org.sleuthkit.autopsy.casemodule.Case; | import org.sleuthkit.autopsy.casemodule.*; | [
"org.sleuthkit.autopsy"
] | org.sleuthkit.autopsy; | 702,864 |
public static void write(IEclipsePreferences pluginPreferences, String prefsKey,
List<IXMLPreferencesStorable> objects) {
StringBuilder sb = new StringBuilder();
appendDelimitedString(sb, objects.toArray(new IXMLPreferencesStorable[objects.size()]));
pluginPreferences.put(prefsKey, sb.toString());
try {
... | static void function(IEclipsePreferences pluginPreferences, String prefsKey, List<IXMLPreferencesStorable> objects) { StringBuilder sb = new StringBuilder(); appendDelimitedString(sb, objects.toArray(new IXMLPreferencesStorable[objects.size()])); pluginPreferences.put(prefsKey, sb.toString()); try { pluginPreferences.f... | /**
* Writes a group of IXMLPreferencesStorables to the given plug-in
* preferences.
*
* @param pluginPreferences
* A Preferences instance
* @param prefsKey
* The key to store by.
* @param objects
* The IXMLPreferencesStorables to store.
*/ | Writes a group of IXMLPreferencesStorables to the given plug-in preferences | write | {
"repo_name": "vovagrechka/fucking-everything",
"path": "phizdets/phizdets-idea/eclipse-src/org.eclipse.php.core/src/org/eclipse/php/internal/core/util/preferences/XMLPreferencesWriter.java",
"license": "apache-2.0",
"size": 4670
} | [
"java.util.List",
"org.eclipse.core.runtime.preferences.IEclipsePreferences",
"org.eclipse.php.internal.core.Logger",
"org.osgi.service.prefs.BackingStoreException"
] | import java.util.List; import org.eclipse.core.runtime.preferences.IEclipsePreferences; import org.eclipse.php.internal.core.Logger; import org.osgi.service.prefs.BackingStoreException; | import java.util.*; import org.eclipse.core.runtime.preferences.*; import org.eclipse.php.internal.core.*; import org.osgi.service.prefs.*; | [
"java.util",
"org.eclipse.core",
"org.eclipse.php",
"org.osgi.service"
] | java.util; org.eclipse.core; org.eclipse.php; org.osgi.service; | 211,940 |
EAttribute getPortToLongMap_Value(); | EAttribute getPortToLongMap_Value(); | /**
* Returns the meta object for the attribute '{@link java.util.Map.Entry <em>Value</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Value</em>'.
* @see java.util.Map.Entry
* @see #getPortToLongMap()
* @generated
*/ | Returns the meta object for the attribute '<code>java.util.Map.Entry Value</code>'. | getPortToLongMap_Value | {
"repo_name": "turnus/turnus",
"path": "turnus.model/src/turnus/model/analysis/map/MapPackage.java",
"license": "gpl-3.0",
"size": 77072
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,533,995 |
public Path lookup(StringValue relPath)
{
return lookupInclude(getSelfDirectory(), normalizePath(relPath));
} | Path function(StringValue relPath) { return lookupInclude(getSelfDirectory(), normalizePath(relPath)); } | /**
* Looks up the path.
*/ | Looks up the path | lookup | {
"repo_name": "dwango/quercus",
"path": "src/main/java/com/caucho/quercus/env/Env.java",
"license": "gpl-2.0",
"size": 161703
} | [
"com.caucho.vfs.Path"
] | import com.caucho.vfs.Path; | import com.caucho.vfs.*; | [
"com.caucho.vfs"
] | com.caucho.vfs; | 246,752 |
private void aIonsJCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_aIonsJCheckBoxActionPerformed
Iterator<Integer> iterator = linkedSpectrumPanels.keySet().iterator();
while (iterator.hasNext()) {
Integer key = iterator.next();
SpectrumPanel curr... | void function(java.awt.event.ActionEvent evt) { Iterator<Integer> iterator = linkedSpectrumPanels.keySet().iterator(); while (iterator.hasNext()) { Integer key = iterator.next(); SpectrumPanel currentSpectrumPanel = linkedSpectrumPanels.get(key); Vector<SpectrumAnnotation> currentAnnotations = allAnnotations.get(key); ... | /**
* Updates the ion coverage annotations.
*
* @param evt
*/ | Updates the ion coverage annotations | aIonsJCheckBoxActionPerformed | {
"repo_name": "compomics/compomics-utilities",
"path": "src/main/java/com/compomics/util/examples/UtilitiesDemo.java",
"license": "apache-2.0",
"size": 193132
} | [
"com.compomics.util.gui.interfaces.SpectrumAnnotation",
"com.compomics.util.gui.spectrum.SpectrumPanel",
"java.util.Iterator",
"java.util.Vector"
] | import com.compomics.util.gui.interfaces.SpectrumAnnotation; import com.compomics.util.gui.spectrum.SpectrumPanel; import java.util.Iterator; import java.util.Vector; | import com.compomics.util.gui.interfaces.*; import com.compomics.util.gui.spectrum.*; import java.util.*; | [
"com.compomics.util",
"java.util"
] | com.compomics.util; java.util; | 2,849,889 |
public LockResult lock(final Task task, final LockRequest request, long timeoutMs) throws InterruptedException
{
long nanos = TimeUnit.MILLISECONDS.toNanos(timeoutMs);
giant.lockInterruptibly();
try {
LockResult lockResult;
while (!(lockResult = tryLock(task, request)).isOk()) {
if (... | LockResult function(final Task task, final LockRequest request, long timeoutMs) throws InterruptedException { long nanos = TimeUnit.MILLISECONDS.toNanos(timeoutMs); giant.lockInterruptibly(); try { LockResult lockResult; while (!(lockResult = tryLock(task, request)).isOk()) { if (nanos <= 0 lockResult.isRevoked()) { re... | /**
* Acquires a lock on behalf of a task, waiting up to the specified wait time if necessary.
*
* @return {@link LockResult} containing a new or an existing lock if succeeded. Otherwise, {@link LockResult} with a
* {@link LockResult#revoked} flag.
*
* @throws InterruptedException if the current threa... | Acquires a lock on behalf of a task, waiting up to the specified wait time if necessary | lock | {
"repo_name": "michaelschiff/druid",
"path": "indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskLockbox.java",
"license": "apache-2.0",
"size": 40850
} | [
"java.util.concurrent.TimeUnit",
"org.apache.druid.indexing.common.task.Task"
] | import java.util.concurrent.TimeUnit; import org.apache.druid.indexing.common.task.Task; | import java.util.concurrent.*; import org.apache.druid.indexing.common.task.*; | [
"java.util",
"org.apache.druid"
] | java.util; org.apache.druid; | 924,653 |
public ElasticsearchRule remoteElasticsearch(String server) {
return remoteElasticsearch(Collections.singleton(server));
} | ElasticsearchRule function(String server) { return remoteElasticsearch(Collections.singleton(server)); } | /**
* Build an {@link ElasticsearchRule} with the default configuration (connecting to the given Elasticsearch node).
*
* @return An {@link ElasticsearchRule} using the default configuration
*/ | Build an <code>ElasticsearchRule</code> with the default configuration (connecting to the given Elasticsearch node) | remoteElasticsearch | {
"repo_name": "joschi/nosqlunit-elasticsearch-http",
"path": "src/main/java/com/github/joschi/nosqlunit/elasticsearch/http/ElasticsearchRule.java",
"license": "apache-2.0",
"size": 4248
} | [
"java.util.Collections"
] | import java.util.Collections; | import java.util.*; | [
"java.util"
] | java.util; | 136,289 |
private boolean isGitUrlCorrect(@NotNull String url) {
if (WHITE_SPACE.test(url)) {
view.markURLInvalid();
view.setURLErrorMessage(locale.importProjectMessageStartWithWhiteSpace());
return false;
}
if (SCP_LIKE_SYNTAX.test(url)) {
view.markURLValid();
view.setURLErrorMessage... | boolean function(@NotNull String url) { if (WHITE_SPACE.test(url)) { view.markURLInvalid(); view.setURLErrorMessage(locale.importProjectMessageStartWithWhiteSpace()); return false; } if (SCP_LIKE_SYNTAX.test(url)) { view.markURLValid(); view.setURLErrorMessage(null); return true; } if (!PROTOCOL.test(url)) { view.markU... | /**
* Validate url
*
* @param url url for validate
* @return <code>true</code> if url is correct
*/ | Validate url | isGitUrlCorrect | {
"repo_name": "akervern/che",
"path": "plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/importer/page/GithubImporterPagePresenter.java",
"license": "epl-1.0",
"size": 17876
} | [
"javax.validation.constraints.NotNull"
] | import javax.validation.constraints.NotNull; | import javax.validation.constraints.*; | [
"javax.validation"
] | javax.validation; | 2,794,203 |
public boolean canCancel( final OutputStream stream )
{
if ( stream instanceof FTPSourceOutputStream )
{
FTPSourceOutputStream fsos = (FTPSourceOutputStream) stream;
if ( fsos.getSource() == this )
{
return fsos.canCancel();
}
... | boolean function( final OutputStream stream ) { if ( stream instanceof FTPSourceOutputStream ) { FTPSourceOutputStream fsos = (FTPSourceOutputStream) stream; if ( fsos.getSource() == this ) { return fsos.canCancel(); } } throw new IllegalArgumentException( STR ); } | /**
* Can the data sent to an <code>OutputStream</code> returned by
* {@link #getOutputStream()} be cancelled ?
*
* @return <code>true</code> if the stream can be cancelled
*/ | Can the data sent to an <code>OutputStream</code> returned by <code>#getOutputStream()</code> be cancelled | canCancel | {
"repo_name": "eva-xuyen/excalibur",
"path": "components/sourceresolve/impl/src/main/java/org/apache/excalibur/source/factories/FTPSource.java",
"license": "apache-2.0",
"size": 12908
} | [
"java.io.OutputStream"
] | import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,579,653 |
@Test
public void testDeletePathIfEmpty() throws IOException {
final Path basePath = new Path(hdfsURI);
final Path directory = new Path(basePath, UUID.randomUUID().toString());
final Path directoryFile = new Path(directory, UUID.randomUUID().toString());
final Path singleFile = new Path(basePath, UUID.rando... | void function() throws IOException { final Path basePath = new Path(hdfsURI); final Path directory = new Path(basePath, UUID.randomUUID().toString()); final Path directoryFile = new Path(directory, UUID.randomUUID().toString()); final Path singleFile = new Path(basePath, UUID.randomUUID().toString()); FileSystem fs = b... | /**
* Test that {@link FileUtils#deletePathIfEmpty(FileSystem, Path)} deletes the path if it is
* empty. A path can only be empty if it is a directory which does not contain any
* files/directories.
*/ | Test that <code>FileUtils#deletePathIfEmpty(FileSystem, Path)</code> deletes the path if it is empty. A path can only be empty if it is a directory which does not contain any files/directories | testDeletePathIfEmpty | {
"repo_name": "tzulitai/flink",
"path": "flink-fs-tests/src/test/java/org/apache/flink/hdfstests/HDFSTest.java",
"license": "apache-2.0",
"size": 12063
} | [
"java.io.IOException",
"java.util.Arrays",
"java.util.UUID",
"org.apache.flink.configuration.ConfigConstants",
"org.apache.flink.core.fs.FileSystem",
"org.apache.flink.core.fs.Path",
"org.apache.flink.util.FileUtils",
"org.apache.hadoop.fs.FSDataOutputStream",
"org.junit.Assert"
] | import java.io.IOException; import java.util.Arrays; import java.util.UUID; import org.apache.flink.configuration.ConfigConstants; import org.apache.flink.core.fs.FileSystem; import org.apache.flink.core.fs.Path; import org.apache.flink.util.FileUtils; import org.apache.hadoop.fs.FSDataOutputStream; import org.junit.As... | import java.io.*; import java.util.*; import org.apache.flink.configuration.*; import org.apache.flink.core.fs.*; import org.apache.flink.util.*; import org.apache.hadoop.fs.*; import org.junit.*; | [
"java.io",
"java.util",
"org.apache.flink",
"org.apache.hadoop",
"org.junit"
] | java.io; java.util; org.apache.flink; org.apache.hadoop; org.junit; | 1,551,068 |
public MamQueryResult queryArchive(Integer max) throws NoResponseException, XMPPErrorException,
NotConnectedException, InterruptedException, NotLoggedInException {
return queryArchive(null, max, null, null, null, null);
} | MamQueryResult function(Integer max) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotLoggedInException { return queryArchive(null, max, null, null, null, null); } | /**
* Query archive with a maximum amount of results.
*
* @param max
* @return the MAM query result
* @throws NoResponseException
* @throws XMPPErrorException
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotLoggedInException
*/ | Query archive with a maximum amount of results | queryArchive | {
"repo_name": "esl/Smack",
"path": "smack-experimental/src/main/java/org/jivesoftware/smackx/mam/MamManager.java",
"license": "apache-2.0",
"size": 26054
} | [
"org.jivesoftware.smack.SmackException",
"org.jivesoftware.smack.XMPPException"
] | import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException; | import org.jivesoftware.smack.*; | [
"org.jivesoftware.smack"
] | org.jivesoftware.smack; | 618,473 |
public Rectangle getInnerBounds() {
final Rectangle innerBounds = getRoot().getInnerBounds();
innerBounds.x += getRoot().getX();
innerBounds.y += getRoot().getY();
final Rectangle maxBounds = new Rectangle(0, 0, getWidth(), getHeight());
return innerBounds.intersection(maxBounds);
} | Rectangle function() { final Rectangle innerBounds = getRoot().getInnerBounds(); innerBounds.x += getRoot().getX(); innerBounds.y += getRoot().getY(); final Rectangle maxBounds = new Rectangle(0, 0, getWidth(), getHeight()); return innerBounds.intersection(maxBounds); } | /**
* Return the bounding box of all the descendants of the source view, that
* without BORDER. Should that be implemented in LayoutManager as minimum
* size?
*/ | Return the bounding box of all the descendants of the source view, that without BORDER. Should that be implemented in LayoutManager as minimum size | getInnerBounds | {
"repo_name": "Rogach/SimplyMindMap",
"path": "src/org/rogach/simplymindmap/view/MapView.java",
"license": "gpl-2.0",
"size": 34784
} | [
"java.awt.Rectangle"
] | import java.awt.Rectangle; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,645,615 |
public void finishCall(Method m, Object[] args) {
long currTime = System.currentTimeMillis();
long startTime = callInitTime.get();
long callTime = currTime - startTime;
methodTimes.put(m, callTime);
} | void function(Method m, Object[] args) { long currTime = System.currentTimeMillis(); long startTime = callInitTime.get(); long callTime = currTime - startTime; methodTimes.put(m, callTime); } | /**
* called after a call has finished by the connector
* @param m the method
* @param args the method arguments
*/ | called after a call has finished by the connector | finishCall | {
"repo_name": "ppissias/JLCF2",
"path": "src/org/jlcf/core/dynrec/ConnectorTimingBasedReconfigurationManager.java",
"license": "apache-2.0",
"size": 7087
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 812,621 |
FileInfo addRecoveredEdits(final String region, final String logfile) throws IOException {
Path rootDir = FSUtils.getRootDir(conf);
Path snapshotDir = SnapshotDescriptionUtils.getCompletedSnapshotDir(snapshot, rootDir);
Path path = SnapshotReferenceUtil.getRecoveredEdits(snapshotDir, region, logfi... | FileInfo addRecoveredEdits(final String region, final String logfile) throws IOException { Path rootDir = FSUtils.getRootDir(conf); Path snapshotDir = SnapshotDescriptionUtils.getCompletedSnapshotDir(snapshot, rootDir); Path path = SnapshotReferenceUtil.getRecoveredEdits(snapshotDir, region, logfile); long size = fs.ge... | /**
* Add the specified recovered.edits file to the stats
* @param region region encoded name
* @param logfile log file name
* @return the recovered.edits information
*/ | Add the specified recovered.edits file to the stats | addRecoveredEdits | {
"repo_name": "lilonglai/hbase-0.96.2",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotInfo.java",
"license": "apache-2.0",
"size": 16754
} | [
"java.io.IOException",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.util.FSUtils"
] | import java.io.IOException; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.util.FSUtils; | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,934,041 |
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addIdPropertyDescriptor(object);
}
return itemPropertyDescriptors;
} | List<IItemPropertyDescriptor> function(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addIdPropertyDescriptor(object); } return itemPropertyDescriptors; } | /**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the property descriptors for the adapted class. | getPropertyDescriptors | {
"repo_name": "glefur/scxml-designer",
"path": "plugins/org.w3c.scxml.edit/src-gen/org/w3/_2005/_07/scxml/provider/ScxmlParallelTypeItemProvider.java",
"license": "epl-1.0",
"size": 8280
} | [
"java.util.List",
"org.eclipse.emf.edit.provider.IItemPropertyDescriptor"
] | import java.util.List; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; | import java.util.*; import org.eclipse.emf.edit.provider.*; | [
"java.util",
"org.eclipse.emf"
] | java.util; org.eclipse.emf; | 1,901,039 |
public static boolean checkpw(String plaintext, String hashed) {
byte hashed_bytes[];
byte try_bytes[];
try {
String try_pw = hashpw(plaintext, hashed);
hashed_bytes = hashed.getBytes("UTF-8");
try_bytes = try_pw.getBytes("UTF-8");
} catch (Unsuppo... | static boolean function(String plaintext, String hashed) { byte hashed_bytes[]; byte try_bytes[]; try { String try_pw = hashpw(plaintext, hashed); hashed_bytes = hashed.getBytes("UTF-8"); try_bytes = try_pw.getBytes("UTF-8"); } catch (UnsupportedEncodingException uee) { return false; } if (hashed_bytes.length != try_by... | /**
* Check that a plaintext password matches a previously hashed
* one
* @param plaintext the plaintext password to verify
* @param hashed the previously-hashed password
* @return true if the passwords match, false otherwise
*/ | Check that a plaintext password matches a previously hashed one | checkpw | {
"repo_name": "Maxetto/AuthMeReloaded",
"path": "src/main/java/fr/xephi/authme/security/crypts/BCryptService.java",
"license": "gpl-3.0",
"size": 32228
} | [
"java.io.UnsupportedEncodingException"
] | import java.io.UnsupportedEncodingException; | import java.io.*; | [
"java.io"
] | java.io; | 1,517,577 |
public Collection<XSAttributeUse> getAttributeUses() {
// TODO: this is fairly inefficient
List<XSAttributeUse> v = new ArrayList<XSAttributeUse>();
v.addAll(attributes.values());
for( XSAttGroupDecl agd : getAttGroups() )
v.addAll(agd.getAttributeUses());
return ... | Collection<XSAttributeUse> function() { List<XSAttributeUse> v = new ArrayList<XSAttributeUse>(); v.addAll(attributes.values()); for( XSAttGroupDecl agd : getAttGroups() ) v.addAll(agd.getAttributeUses()); return v; } | /**
* Returns the attribute uses by looking at attribute groups and etc.
* Searching for the base type is done in {@link ComplexTypeImpl}.
*/ | Returns the attribute uses by looking at attribute groups and etc. Searching for the base type is done in <code>ComplexTypeImpl</code> | getAttributeUses | {
"repo_name": "samskivert/ikvm-openjdk",
"path": "build/linux-amd64/impsrc/com/sun/xml/internal/xsom/impl/AttributesHolder.java",
"license": "gpl-2.0",
"size": 4796
} | [
"com.sun.xml.internal.xsom.XSAttGroupDecl",
"com.sun.xml.internal.xsom.XSAttributeUse",
"java.util.ArrayList",
"java.util.Collection",
"java.util.List"
] | import com.sun.xml.internal.xsom.XSAttGroupDecl; import com.sun.xml.internal.xsom.XSAttributeUse; import java.util.ArrayList; import java.util.Collection; import java.util.List; | import com.sun.xml.internal.xsom.*; import java.util.*; | [
"com.sun.xml",
"java.util"
] | com.sun.xml; java.util; | 422,092 |
protected OutputStream getOut() {
return out;
} | OutputStream function() { return out; } | /**
* Get the output stream.
*
* @return <CODE>OutputStream</CODE>.
*/ | Get the output stream | getOut | {
"repo_name": "chrisipa/cloud-portal",
"path": "modules/cloud-portal-server/src/main/java/de/papke/cloud/portal/stream/AutoFlushingPumpStreamHandler.java",
"license": "mit",
"size": 8363
} | [
"java.io.OutputStream"
] | import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 905,074 |
private synchronized boolean addCall(Call call) {
if (shouldCloseConnection.get())
return false;
calls.put(call.id, call);
notify();
return true;
}
private class PingInputStream extends FilterInputStream {
protected PingInputStream(InputStream in) {
... | synchronized boolean function(Call call) { if (shouldCloseConnection.get()) return false; calls.put(call.id, call); notify(); return true; } private class PingInputStream extends FilterInputStream { protected PingInputStream(InputStream in) { super(in); } | /**
* Add a call to this connection's call queue and notify
* a listener; synchronized.
* Returns false if called during shutdown.
* @param call to add
* @return true if the call was added.
*/ | Add a call to this connection's call queue and notify a listener; synchronized. Returns false if called during shutdown | addCall | {
"repo_name": "sdw2330976/hadoop1.2.1source",
"path": "src/core/org/apache/hadoop/ipc/Client.java",
"license": "apache-2.0",
"size": 53506
} | [
"java.io.FilterInputStream",
"java.io.InputStream"
] | import java.io.FilterInputStream; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 85,598 |
static Set<FunctionProperty> bijective() {
return EnumSet.of(FunctionProperty.INJECTIVE, FunctionProperty.SURJECTIVE,
FunctionProperty.ORDER_PRESERVING, FunctionProperty.INVERTIBLE);
} | static Set<FunctionProperty> bijective() { return EnumSet.of(FunctionProperty.INJECTIVE, FunctionProperty.SURJECTIVE, FunctionProperty.ORDER_PRESERVING, FunctionProperty.INVERTIBLE); } | /**
* Convenience method for {@link #properties()} implementation of bijective converters
* between comparable objects. The converter is presumed invertible and to preserve order.
*/ | Convenience method for <code>#properties()</code> implementation of bijective converters between comparable objects. The converter is presumed invertible and to preserve order | bijective | {
"repo_name": "apache/sis",
"path": "core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemConverter.java",
"license": "apache-2.0",
"size": 7941
} | [
"java.util.EnumSet",
"java.util.Set",
"org.apache.sis.math.FunctionProperty"
] | import java.util.EnumSet; import java.util.Set; import org.apache.sis.math.FunctionProperty; | import java.util.*; import org.apache.sis.math.*; | [
"java.util",
"org.apache.sis"
] | java.util; org.apache.sis; | 1,979,785 |
public Iterator<String> keys() {
return this.keySet().iterator();
} | Iterator<String> function() { return this.keySet().iterator(); } | /**
* Get an enumeration of the keys of the JSONObject.
*
* @return An iterator of the keys.
*/ | Get an enumeration of the keys of the JSONObject | keys | {
"repo_name": "boylesoftware/tomcat8-oidcauth",
"path": "src/common/java/org/bsworks/util/json/JSONObject.java",
"license": "apache-2.0",
"size": 44144
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 141,357 |
private void updateNewColumnToDefault
(
Activation activation,
String columnName,
String defaultText,
LanguageConnectionContext lcc
// GemStone changes BEGIN
, ColumnDescriptor cd
// GemStone changes END
)
throws StandardException
{
// GemStone changes BEGIN
// calculate and store t... | void function ( Activation activation, String columnName, String defaultText, LanguageConnectionContext lcc , ColumnDescriptor cd ) throws StandardException { String defaultQuery = STR + defaultText; PreparedStatement ps = lcc.prepareInternalStatement(defaultQuery, (byte)0); ResultSet rs = ps.execute(lcc, true, 0L); Ex... | /**
* Update a new column with its default.
* We could do the scan ourself here, but
* instead we get a nested connection and
* issue the appropriate update statement.
*
* @param columnName column name
* @param defaultText default text
* @param lcc the language connection context
*
* @exception... | Update a new column with its default. We could do the scan ourself here, but instead we get a nested connection and issue the appropriate update statement | updateNewColumnToDefault | {
"repo_name": "papicella/snappy-store",
"path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/impl/sql/execute/AlterTableConstantAction.java",
"license": "apache-2.0",
"size": 140636
} | [
"com.pivotal.gemfirexd.internal.iapi.error.StandardException",
"com.pivotal.gemfirexd.internal.iapi.sql.Activation",
"com.pivotal.gemfirexd.internal.iapi.sql.PreparedStatement",
"com.pivotal.gemfirexd.internal.iapi.sql.ResultSet",
"com.pivotal.gemfirexd.internal.iapi.sql.conn.LanguageConnectionContext",
"... | import com.pivotal.gemfirexd.internal.iapi.error.StandardException; import com.pivotal.gemfirexd.internal.iapi.sql.Activation; import com.pivotal.gemfirexd.internal.iapi.sql.PreparedStatement; import com.pivotal.gemfirexd.internal.iapi.sql.ResultSet; import com.pivotal.gemfirexd.internal.iapi.sql.conn.LanguageConnectio... | import com.pivotal.gemfirexd.internal.iapi.error.*; import com.pivotal.gemfirexd.internal.iapi.sql.*; import com.pivotal.gemfirexd.internal.iapi.sql.conn.*; import com.pivotal.gemfirexd.internal.iapi.sql.dictionary.*; import com.pivotal.gemfirexd.internal.iapi.sql.execute.*; import com.pivotal.gemfirexd.internal.iapi.t... | [
"com.pivotal.gemfirexd"
] | com.pivotal.gemfirexd; | 526,421 |
@MXBeanDescription("Name of the SPI.")
public String getName(); | @MXBeanDescription(STR) String function(); | /**
* Gets name of the SPI.
*
* @return Name of the SPI.
*/ | Gets name of the SPI | getName | {
"repo_name": "pperalta/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiManagementMBean.java",
"license": "apache-2.0",
"size": 2653
} | [
"org.apache.ignite.mxbean.MXBeanDescription"
] | import org.apache.ignite.mxbean.MXBeanDescription; | import org.apache.ignite.mxbean.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 180,927 |
public ImageIcon getImage() {
File customImage = new File(this.getRootDirectory(), "instance.png");
File instancesImage = new File(App.settings.getImagesDir(), getSafePackName().toLowerCase() + ".png");
if (customImage.exists()) {
try {
BufferedImage img = ImageI... | ImageIcon function() { File customImage = new File(this.getRootDirectory(), STR); File instancesImage = new File(App.settings.getImagesDir(), getSafePackName().toLowerCase() + ".png"); if (customImage.exists()) { try { BufferedImage img = ImageIO.read(customImage); Image dimg = img.getScaledInstance(300, 150, Image.SCA... | /**
* Gets a ImageIcon object for the image file of the Pack for use in displaying in the Packs and Instances tabs.
*
* @return ImageIcon for this Instances Pack
*/ | Gets a ImageIcon object for the image file of the Pack for use in displaying in the Packs and Instances tabs | getImage | {
"repo_name": "flaw600/ATLauncher",
"path": "src/main/java/com/atlauncher/data/Instance.java",
"license": "gpl-3.0",
"size": 53272
} | [
"com.atlauncher.App",
"com.atlauncher.utils.Utils",
"java.awt.Image",
"java.awt.image.BufferedImage",
"java.io.File",
"java.io.IOException",
"javax.imageio.ImageIO",
"javax.swing.ImageIcon"
] | import com.atlauncher.App; import com.atlauncher.utils.Utils; import java.awt.Image; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; import javax.swing.ImageIcon; | import com.atlauncher.*; import com.atlauncher.utils.*; import java.awt.*; import java.awt.image.*; import java.io.*; import javax.imageio.*; import javax.swing.*; | [
"com.atlauncher",
"com.atlauncher.utils",
"java.awt",
"java.io",
"javax.imageio",
"javax.swing"
] | com.atlauncher; com.atlauncher.utils; java.awt; java.io; javax.imageio; javax.swing; | 2,650,669 |
Completable startTyping(); | Completable startTyping(); | /**
* Start typing
* @return completion
*/ | Start typing | startTyping | {
"repo_name": "chat-sdk/chat-sdk-android",
"path": "firestream/src/main/java/firestream/chat/interfaces/IChat.java",
"license": "apache-2.0",
"size": 9574
} | [
"io.reactivex.Completable"
] | import io.reactivex.Completable; | import io.reactivex.*; | [
"io.reactivex"
] | io.reactivex; | 1,262,433 |
public Matrix transpose() {
SparseVector clone = new SparseVector(this);
clone.linevector = !linevector;
return clone;
}
public SparseVector(int size, int nonzerosize) {
data = new double[nonzerosize];
index = new int[nonzerosize];
for (int i = 0; i < in... | Matrix function() { SparseVector clone = new SparseVector(this); clone.linevector = !linevector; return clone; } public SparseVector(int size, int nonzerosize) { data = new double[nonzerosize]; index = new int[nonzerosize]; for (int i = 0; i < index.length; i++) { index[i] = Integer.MAX_VALUE; } used = 0; this.size = s... | /**
* Transposes a vector
*
* @return Returns a new transposed vector
*/ | Transposes a vector | transpose | {
"repo_name": "pmar/lplibs4j",
"path": "src/main/java/org/lplibs4j/api/implementation/SparseVector.java",
"license": "gpl-3.0",
"size": 25530
} | [
"org.lplibs4j.api.util.Matrix",
"org.lplibs4j.api.util.NonZeroElementIterator"
] | import org.lplibs4j.api.util.Matrix; import org.lplibs4j.api.util.NonZeroElementIterator; | import org.lplibs4j.api.util.*; | [
"org.lplibs4j.api"
] | org.lplibs4j.api; | 1,965,409 |
private StatsConfig getStatsConfig(Object[] params) {
StatsConfig statsConfig = new StatsConfig();
if ((params != null) && (params.length > 0) && (params[0] != null)) {
Boolean clear = (Boolean) params[0];
statsConfig.setClear(clear.booleanValue());
}
if ((par... | StatsConfig function(Object[] params) { StatsConfig statsConfig = new StatsConfig(); if ((params != null) && (params.length > 0) && (params[0] != null)) { Boolean clear = (Boolean) params[0]; statsConfig.setClear(clear.booleanValue()); } if ((params != null) && (params.length > 1) && (params[1] != null)) { Boolean fast... | /**
* Helper for creating a StatsConfig object to use as an operation
* parameter.
*/ | Helper for creating a StatsConfig object to use as an operation parameter | getStatsConfig | {
"repo_name": "prat0318/dbms",
"path": "mini_dbms/je-5.0.103/src/com/sleepycat/je/jmx/JEMBeanHelper.java",
"license": "mit",
"size": 31637
} | [
"com.sleepycat.je.StatsConfig"
] | import com.sleepycat.je.StatsConfig; | import com.sleepycat.je.*; | [
"com.sleepycat.je"
] | com.sleepycat.je; | 885,172 |
Date getDate(); | Date getDate(); | /**
* Returns the value of the '<em><b>Date</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Date</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Date</em>' attribute.
* ... | Returns the value of the 'Date' attribute. If the meaning of the 'Date' attribute isn't clear, there really should be more of a description here... | getDate | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/CIM/CombinedVersion.java",
"license": "mit",
"size": 4175
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,671,597 |
public void startScan(BleScanCallback<T> callback){
request.startScan(callback, options().scanPeriod);
} | void function(BleScanCallback<T> callback){ request.startScan(callback, options().scanPeriod); } | /**
* start scanning
*/ | start scanning | startScan | {
"repo_name": "liulei-0911/BleDemo",
"path": "core/src/main/java/cn/com/heaton/blelibrary/ble/Ble.java",
"license": "apache-2.0",
"size": 19420
} | [
"cn.com.heaton.blelibrary.ble.callback.BleScanCallback"
] | import cn.com.heaton.blelibrary.ble.callback.BleScanCallback; | import cn.com.heaton.blelibrary.ble.callback.*; | [
"cn.com.heaton"
] | cn.com.heaton; | 360,529 |
ChildReference getChild( Name name,
int snsIndex ); | ChildReference getChild( Name name, int snsIndex ); | /**
* Look for the child reference that has the given name and SNS index.
*
* @param name the name for the node
* @param snsIndex the same-name-sibling index; must be positive
* @return the child reference, or null if there is no such child
*/ | Look for the child reference that has the given name and SNS index | getChild | {
"repo_name": "stemig62/modeshape",
"path": "modeshape-jcr/src/main/java/org/modeshape/jcr/cache/ChildReferences.java",
"license": "apache-2.0",
"size": 18175
} | [
"org.modeshape.jcr.value.Name"
] | import org.modeshape.jcr.value.Name; | import org.modeshape.jcr.value.*; | [
"org.modeshape.jcr"
] | org.modeshape.jcr; | 927,060 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.