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 void setNewButtonStyle(CmsPushButton newButton) {
newButton.setImageClass(I_CmsButton.ADD_SMALL);
newButton.setButtonStyle(ButtonStyle.FONT_ICON, null);
}
| void function(CmsPushButton newButton) { newButton.setImageClass(I_CmsButton.ADD_SMALL); newButton.setButtonStyle(ButtonStyle.FONT_ICON, null); } | /**
* Styles a button for adding new aliases.<p>
*
* @param newButton the button to style
*/ | Styles a button for adding new aliases | setNewButtonStyle | {
"repo_name": "ggiudetti/opencms-core",
"path": "src-gwt/org/opencms/ade/sitemap/client/alias/CmsAliasView.java",
"license": "lgpl-2.1",
"size": 16963
} | [
"org.opencms.gwt.client.ui.CmsPushButton",
"org.opencms.gwt.client.ui.I_CmsButton"
] | import org.opencms.gwt.client.ui.CmsPushButton; import org.opencms.gwt.client.ui.I_CmsButton; | import org.opencms.gwt.client.ui.*; | [
"org.opencms.gwt"
] | org.opencms.gwt; | 2,772,440 |
private void evictMobFilesIfNecessary(Set<String> mobFileNames, int limit) {
if (mobFileNames.size() < limit) {
return;
}
int index = 0;
int evict = limit / 2;
Iterator<String> fileNamesItr = mobFileNames.iterator();
while (index < evict && fileNamesItr.hasNext()) {
fileNamesItr.ne... | void function(Set<String> mobFileNames, int limit) { if (mobFileNames.size() < limit) { return; } int index = 0; int evict = limit / 2; Iterator<String> fileNamesItr = mobFileNames.iterator(); while (index < evict && fileNamesItr.hasNext()) { fileNamesItr.next(); fileNamesItr.remove(); index++; } } | /**
* Evicts the cached mob files if the set is larger than the limit.
*/ | Evicts the cached mob files if the set is larger than the limit | evictMobFilesIfNecessary | {
"repo_name": "ultratendency/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePrettyPrinter.java",
"license": "apache-2.0",
"size": 29701
} | [
"java.util.Iterator",
"java.util.Set"
] | import java.util.Iterator; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 617,914 |
@Test
public void testParse_help() throws Exception {
String[] args = {"-help"};
CliParser instance = new CliParser(getSettings());
instance.parse(args);
Assert.assertFalse(instance.isGetVersion());
Assert.assertTrue(instance.isGetHelp());
Assert.assertFalse(in... | void function() throws Exception { String[] args = {"-help"}; CliParser instance = new CliParser(getSettings()); instance.parse(args); Assert.assertFalse(instance.isGetVersion()); Assert.assertTrue(instance.isGetHelp()); Assert.assertFalse(instance.isRunScan()); } | /**
* Test of parse method with help arg, of class CliParser.
*
* @throws Exception thrown when an exception occurs.
*/ | Test of parse method with help arg, of class CliParser | testParse_help | {
"repo_name": "stefanneuhaus/DependencyCheck",
"path": "cli/src/test/java/org/owasp/dependencycheck/CliParserTest.java",
"license": "apache-2.0",
"size": 12895
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,550,312 |
@Test
public void testUnrecoverableErrorCheck() {
// normal error
assertFalse(ExecutionFailureHandler.isUnrecoverableError(new Exception()));
// direct unrecoverable error
assertTrue(ExecutionFailureHandler.isUnrecoverableError(new SuppressRestartsException(new Exception())));
// nested unrecoverable er... | void function() { assertFalse(ExecutionFailureHandler.isUnrecoverableError(new Exception())); assertTrue(ExecutionFailureHandler.isUnrecoverableError(new SuppressRestartsException(new Exception()))); assertTrue(ExecutionFailureHandler.isUnrecoverableError( new Exception(new SuppressRestartsException(new Exception()))))... | /**
* Tests the check for unrecoverable error.
*/ | Tests the check for unrecoverable error | testUnrecoverableErrorCheck | {
"repo_name": "bowenli86/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/failover/flip1/ExecutionFailureHandlerTest.java",
"license": "apache-2.0",
"size": 7074
} | [
"org.apache.flink.runtime.execution.SuppressRestartsException",
"org.junit.Assert"
] | import org.apache.flink.runtime.execution.SuppressRestartsException; import org.junit.Assert; | import org.apache.flink.runtime.execution.*; import org.junit.*; | [
"org.apache.flink",
"org.junit"
] | org.apache.flink; org.junit; | 2,389,881 |
JProgressBar getProgInsertIntoDb(); | JProgressBar getProgInsertIntoDb(); | /**
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*/ | DOCUMENT ME | getProgInsertIntoDb | {
"repo_name": "cismet/data-objects",
"path": "src/main/java/de/cismet/cids/meta/IndexProgressListener.java",
"license": "lgpl-3.0",
"size": 1262
} | [
"javax.swing.JProgressBar"
] | import javax.swing.JProgressBar; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,264,638 |
@GET
@Path("transactions?book={base}_{counter}")
public QuadrigaCxTransaction[] getTransactions(@PathParam("base") String base, @PathParam("counter") String counter,
@QueryParam("time") String time) throws QuadrigaCxException, IOException; | @Path(STR) QuadrigaCxTransaction[] function(@PathParam("base") String base, @PathParam(STR) String counter, @QueryParam("time") String time) throws QuadrigaCxException, IOException; | /**
* Returns descending list of transactions.
*/ | Returns descending list of transactions | getTransactions | {
"repo_name": "stevenuray/XChange",
"path": "xchange-quadrigacx/src/main/java/org/knowm/xchange/quadrigacx/QuadrigaCx.java",
"license": "mit",
"size": 1733
} | [
"java.io.IOException",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.QueryParam",
"org.knowm.xchange.quadrigacx.dto.QuadrigaCxException",
"org.knowm.xchange.quadrigacx.dto.marketdata.QuadrigaCxTransaction"
] | import java.io.IOException; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.QueryParam; import org.knowm.xchange.quadrigacx.dto.QuadrigaCxException; import org.knowm.xchange.quadrigacx.dto.marketdata.QuadrigaCxTransaction; | import java.io.*; import javax.ws.rs.*; import org.knowm.xchange.quadrigacx.dto.*; import org.knowm.xchange.quadrigacx.dto.marketdata.*; | [
"java.io",
"javax.ws",
"org.knowm.xchange"
] | java.io; javax.ws; org.knowm.xchange; | 2,749,504 |
@Nullable
public static SongBookInfo getSongBookInfo(@NonNull SQLiteDatabase db, @NonNull final String bookName) {
final SongBookInfo info = SongDb.getSongBookInfo(db, bookName);
return fallbackSongBookInfo(bookName, info);
} | static SongBookInfo function(@NonNull SQLiteDatabase db, @NonNull final String bookName) { final SongBookInfo info = SongDb.getSongBookInfo(db, bookName); return fallbackSongBookInfo(bookName, info); } | /**
* For migration
*/ | For migration | getSongBookInfo | {
"repo_name": "infojulio/androidbible",
"path": "Alkitab/src/main/java/yuku/alkitab/songs/SongBookUtil.java",
"license": "apache-2.0",
"size": 8028
} | [
"android.database.sqlite.SQLiteDatabase",
"android.support.annotation.NonNull"
] | import android.database.sqlite.SQLiteDatabase; import android.support.annotation.NonNull; | import android.database.sqlite.*; import android.support.annotation.*; | [
"android.database",
"android.support"
] | android.database; android.support; | 2,410,015 |
public void disableBehaviour(NodeRef nodeRef);
| void function(NodeRef nodeRef); | /**
* Disable all behaviours for a given node
*
* @param nodeRef the node to disable for
*/ | Disable all behaviours for a given node | disableBehaviour | {
"repo_name": "nguyentienlong/community-edition",
"path": "projects/repository/source/java/org/alfresco/repo/policy/BehaviourFilter.java",
"license": "lgpl-3.0",
"size": 6319
} | [
"org.alfresco.service.cmr.repository.NodeRef"
] | import org.alfresco.service.cmr.repository.NodeRef; | import org.alfresco.service.cmr.repository.*; | [
"org.alfresco.service"
] | org.alfresco.service; | 2,372,635 |
public List<ColumnModel> createColumnModels(UserInfo user, List<ColumnModel> columnModels) throws DatastoreException, NotFoundException;
| List<ColumnModel> function(UserInfo user, List<ColumnModel> columnModels) throws DatastoreException, NotFoundException; | /**
* Create new immutable ColumnModel objects
*
* @param user
* @param columnModels
* @return
* @throws NotFoundException
* @throws DatastoreException
*/ | Create new immutable ColumnModel objects | createColumnModels | {
"repo_name": "xschildw/Synapse-Repository-Services",
"path": "services/repository-managers/src/main/java/org/sagebionetworks/repo/manager/table/ColumnModelManager.java",
"license": "apache-2.0",
"size": 5659
} | [
"java.util.List",
"org.sagebionetworks.repo.model.DatastoreException",
"org.sagebionetworks.repo.model.UserInfo",
"org.sagebionetworks.repo.model.table.ColumnModel",
"org.sagebionetworks.repo.web.NotFoundException"
] | import java.util.List; import org.sagebionetworks.repo.model.DatastoreException; import org.sagebionetworks.repo.model.UserInfo; import org.sagebionetworks.repo.model.table.ColumnModel; import org.sagebionetworks.repo.web.NotFoundException; | import java.util.*; import org.sagebionetworks.repo.model.*; import org.sagebionetworks.repo.model.table.*; import org.sagebionetworks.repo.web.*; | [
"java.util",
"org.sagebionetworks.repo"
] | java.util; org.sagebionetworks.repo; | 2,204,371 |
@PUT
@Path("/{idGP}/assessAndScore")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public String assessAndScore(String actionP, @PathParam("idGP") int idGP)
{
GamePlayController gpController = null;
FeedbackTriggerController feedbackTriggerController... | @Path(STR) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) String function(String actionP, @PathParam("idGP") int idGP) { GamePlayController gpController = null; FeedbackTriggerController feedbackTriggerController = null; try { JSONObject action=(JSONObject) JSONValue.parse(actionP); gpContr... | /**
* Method handling HTTP PUT requests on path "gameplay/{idGP}/assess"
*
* @param idGP = an integer id of the current gameplay
* @param actionP = a JSON object containing a String "action" and a JSON "values"
* (containg a String foreach parameter of the action)
* @return the list of f... | Method handling HTTP PUT requests on path "gameplay/{idGP}/assess" | assessAndScore | {
"repo_name": "yaelleUWS/engage_ws",
"path": "src/main/java/uws/engage/assessment/GamePlayResource.java",
"license": "gpl-2.0",
"size": 37052
} | [
"java.util.ArrayList",
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"org.json.simple.JSONObject",
"org.json.simple.JSONValue"
] | import java.util.ArrayList; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.json.simple.JSONObject; import org.json.simple.JSONValue; | import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.json.simple.*; | [
"java.util",
"javax.ws",
"org.json.simple"
] | java.util; javax.ws; org.json.simple; | 679,853 |
public static List<SiteStatistics> sortMostRecentFirst(List<SiteStatistics> siteStatisticsList)
{
return siteStatisticsList.stream().sorted(Comparator.comparing(SiteStatistics::getDate).reversed())
.collect(Collectors.toList());
} | static List<SiteStatistics> function(List<SiteStatistics> siteStatisticsList) { return siteStatisticsList.stream().sorted(Comparator.comparing(SiteStatistics::getDate).reversed()) .collect(Collectors.toList()); } | /**
* Sorts statistic records from newest to oldest.
*
* @param siteStatisticsList The list of statistic records
* @return The order list of statistic records
*/ | Sorts statistic records from newest to oldest | sortMostRecentFirst | {
"repo_name": "MTUHIDE/CoCoTemp",
"path": "src/main/java/space/hideaway/util/SortingUtils.java",
"license": "mit",
"size": 1205
} | [
"java.util.Comparator",
"java.util.List",
"java.util.stream.Collectors",
"space.hideaway.model.site.SiteStatistics"
] | import java.util.Comparator; import java.util.List; import java.util.stream.Collectors; import space.hideaway.model.site.SiteStatistics; | import java.util.*; import java.util.stream.*; import space.hideaway.model.site.*; | [
"java.util",
"space.hideaway.model"
] | java.util; space.hideaway.model; | 2,227,782 |
public static long getTotalSizeOfCells(Result result) {
long size = 0;
for (Cell c : result.rawCells()) {
size += CellUtil.estimatedHeapSizeOf(c);
}
return size;
} | static long function(Result result) { long size = 0; for (Cell c : result.rawCells()) { size += CellUtil.estimatedHeapSizeOf(c); } return size; } | /**
* Get total size of raw cells
* @param result
* @return Total size.
*/ | Get total size of raw cells | getTotalSizeOfCells | {
"repo_name": "grokcoder/pbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Result.java",
"license": "apache-2.0",
"size": 29648
} | [
"org.apache.hadoop.hbase.Cell",
"org.apache.hadoop.hbase.CellUtil"
] | import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellUtil; | import org.apache.hadoop.hbase.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,816,496 |
public void draw(Shape shape) {
Path path = toSwtPath(shape);
this.gc.drawPath(path);
path.dispose();
} | void function(Shape shape) { Path path = toSwtPath(shape); this.gc.drawPath(path); path.dispose(); } | /**
* Draws the outline of the specified shape using the current stroke and
* paint settings.
*
* @param shape
* the shape (<code>null</code> not permitted).
*
* @see #getPaint()
* @see #getStroke()
* @see #fill(Shape)
*/ | Draws the outline of the specified shape using the current stroke and paint settings | draw | {
"repo_name": "bdaum/zoraPD",
"path": "com.bdaum.zoom.jfreechart/src/org/jfree/experimental/swt/SWTGraphics2D.java",
"license": "gpl-2.0",
"size": 46494
} | [
"java.awt.Shape",
"org.eclipse.swt.graphics.Path"
] | import java.awt.Shape; import org.eclipse.swt.graphics.Path; | import java.awt.*; import org.eclipse.swt.graphics.*; | [
"java.awt",
"org.eclipse.swt"
] | java.awt; org.eclipse.swt; | 646,815 |
private JCheckBox getJcb0() {
if (jcb0 == null) {
jcb0 = new JCheckBox();
}
return jcb0;
} | JCheckBox function() { if (jcb0 == null) { jcb0 = new JCheckBox(); } return jcb0; } | /**
* This method initializes jcb0
*
* @return javax.swing.JCheckBox
*/ | This method initializes jcb0 | getJcb0 | {
"repo_name": "nblomquist/pyramid-game",
"path": "app/org/ndb/jpyramidgame/CheckPyramidPanel.java",
"license": "mit",
"size": 8333
} | [
"javax.swing.JCheckBox"
] | import javax.swing.JCheckBox; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 308,816 |
private void initializeLocationAndStartGpsThread() {
mLocationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
List<String> providers = mLocationManager.getProviders(true);
Log.i(TAG, "Enabled providers = " + providers.toString());
String provider = mLocationManager.getBestProvider(new Cri... | void function() { mLocationManager = (LocationManager) getSystemService(LOCATION_SERVICE); List<String> providers = mLocationManager.getProviders(true); Log.i(TAG, STR + providers.toString()); String provider = mLocationManager.getBestProvider(new Criteria(),true); Log.i(TAG, STR + provider); setCurrentGpsLocation(null... | /**
* Sets the Find's location to the last known location and starts
* a separate thread to update GPS location.
*/ | Sets the Find's location to the last known location and starts a separate thread to update GPS location | initializeLocationAndStartGpsThread | {
"repo_name": "google-code-export/posit-mobile",
"path": "android/src/org/hfoss/posit/sms/SahanaSMSActivity.java",
"license": "lgpl-2.1",
"size": 8079
} | [
"android.location.Criteria",
"android.location.LocationManager",
"android.util.Log",
"java.util.List"
] | import android.location.Criteria; import android.location.LocationManager; import android.util.Log; import java.util.List; | import android.location.*; import android.util.*; import java.util.*; | [
"android.location",
"android.util",
"java.util"
] | android.location; android.util; java.util; | 1,107,129 |
@Deprecated
@CheckForNull
String getName(Rule rule, Locale locale); | String getName(Rule rule, Locale locale); | /**
* Returns the localized name or the name of the rule.
* <br>
* If the name is not found in the given locale, then the default name is returned (the English one).
* It the default name is not found, then the rule name is returned.
*
* @param rule the rule
* @param locale the locale to translate ... | Returns the localized name or the name of the rule. If the name is not found in the given locale, then the default name is returned (the English one). It the default name is not found, then the rule name is returned | getName | {
"repo_name": "lbndev/sonarqube",
"path": "sonar-plugin-api/src/main/java/org/sonar/api/i18n/RuleI18n.java",
"license": "lgpl-3.0",
"size": 6114
} | [
"java.util.Locale",
"org.sonar.api.rules.Rule"
] | import java.util.Locale; import org.sonar.api.rules.Rule; | import java.util.*; import org.sonar.api.rules.*; | [
"java.util",
"org.sonar.api"
] | java.util; org.sonar.api; | 1,734,378 |
public static GeoDistanceSortBuilder fromXContent(QueryParseContext context, String elementName) throws IOException {
XContentParser parser = context.parser();
ParseFieldMatcher parseFieldMatcher = context.getParseFieldMatcher();
String fieldName = null;
List<GeoPoint> geoPoints = ne... | static GeoDistanceSortBuilder function(QueryParseContext context, String elementName) throws IOException { XContentParser parser = context.parser(); ParseFieldMatcher parseFieldMatcher = context.getParseFieldMatcher(); String fieldName = null; List<GeoPoint> geoPoints = new ArrayList<>(); DistanceUnit unit = DistanceUn... | /**
* Creates a new {@link GeoDistanceSortBuilder} from the query held by the {@link QueryParseContext} in
* {@link org.elasticsearch.common.xcontent.XContent} format.
*
* @param context the input parse context. The state on the parser contained in this context will be changed as a side effect of th... | Creates a new <code>GeoDistanceSortBuilder</code> from the query held by the <code>QueryParseContext</code> in <code>org.elasticsearch.common.xcontent.XContent</code> format | fromXContent | {
"repo_name": "mmaracic/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/search/sort/GeoDistanceSortBuilder.java",
"license": "apache-2.0",
"size": 25488
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.elasticsearch.common.ParseFieldMatcher",
"org.elasticsearch.common.ParsingException",
"org.elasticsearch.common.geo.GeoDistance",
"org.elasticsearch.common.geo.GeoPoint",
"org.elasticsearch.common.geo.GeoUtils",
"org.elasticsearch.... | import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.elasticsearch.common.ParseFieldMatcher; import org.elasticsearch.common.ParsingException; import org.elasticsearch.common.geo.GeoDistance; import org.elasticsearch.common.geo.GeoPoint; import org.elasticsearch.common.geo.GeoUtils;... | import java.io.*; import java.util.*; import org.elasticsearch.common.*; import org.elasticsearch.common.geo.*; import org.elasticsearch.common.unit.*; import org.elasticsearch.common.xcontent.*; import org.elasticsearch.index.query.*; | [
"java.io",
"java.util",
"org.elasticsearch.common",
"org.elasticsearch.index"
] | java.io; java.util; org.elasticsearch.common; org.elasticsearch.index; | 869,034 |
public static void clearUser(Context context) {
SharedPreferences prefs = context.getSharedPreferences("user", Context.MODE_PRIVATE);
prefs.edit().clear().apply();
} | static void function(Context context) { SharedPreferences prefs = context.getSharedPreferences("user", Context.MODE_PRIVATE); prefs.edit().clear().apply(); } | /**
* Deletes all user related data stored in the app preferences.
* This will also delete stored headers.
*/ | Deletes all user related data stored in the app preferences. This will also delete stored headers | clearUser | {
"repo_name": "where2help/android",
"path": "app/src/main/java/app/iamin/iamin/util/DataUtils.java",
"license": "agpl-3.0",
"size": 7372
} | [
"android.content.Context",
"android.content.SharedPreferences"
] | import android.content.Context; import android.content.SharedPreferences; | import android.content.*; | [
"android.content"
] | android.content; | 2,425,691 |
public static List<String[]> getApprovalHistory(String fromDate,
String toDate, String subscriber, String api, int applicationId,
String operator, int offset, int count) throws Exception {
BillingDAO billingDAO = new BillingDAO();
List<String[]> api_request = billingDAO
.getApprovalHistory(fromDate, to... | static List<String[]> function(String fromDate, String toDate, String subscriber, String api, int applicationId, String operator, int offset, int count) throws Exception { BillingDAO billingDAO = new BillingDAO(); List<String[]> api_request = billingDAO .getApprovalHistory(fromDate, toDate, subscriber, api, application... | /**
* Gets the approval history.
*
* @param fromDate the from date
* @param toDate the to date
* @param subscriber the subscriber
* @param api the api
* @param applicationId the application id
* @param operator the operator
* @return the approval history
* @throws Exception
*/ | Gets the approval history | getApprovalHistory | {
"repo_name": "WSO2Telco/component-dep",
"path": "components/reporting-service/src/main/java/com/wso2telco/dep/reportingservice/northbound/NbHostObjectUtils.java",
"license": "apache-2.0",
"size": 117356
} | [
"com.wso2telco.dep.reportingservice.dao.BillingDAO",
"java.util.List"
] | import com.wso2telco.dep.reportingservice.dao.BillingDAO; import java.util.List; | import com.wso2telco.dep.reportingservice.dao.*; import java.util.*; | [
"com.wso2telco.dep",
"java.util"
] | com.wso2telco.dep; java.util; | 2,051,646 |
public static Object readObject(final String fileNamePath) throws IOException,
ClassNotFoundException{
FileInputStream fis = null;
ObjectInputStream in = null;
try {
fis = new FileInputStream(fileNamePath);
in = new ObjectInputStream(fis);
return in.readObject();
} finally {
if (in != null) {
... | static Object function(final String fileNamePath) throws IOException, ClassNotFoundException{ FileInputStream fis = null; ObjectInputStream in = null; try { fis = new FileInputStream(fileNamePath); in = new ObjectInputStream(fis); return in.readObject(); } finally { if (in != null) { in.close(); } } } | /**
* Liest serialisiertes Java Objekt
*/ | Liest serialisiertes Java Objekt | readObject | {
"repo_name": "DavidGutknecht/elexis-3-base",
"path": "bundles/ch.medshare.commons/src/ch/medshare/util/UtilFile.java",
"license": "epl-1.0",
"size": 9829
} | [
"java.io.FileInputStream",
"java.io.IOException",
"java.io.ObjectInputStream"
] | import java.io.FileInputStream; import java.io.IOException; import java.io.ObjectInputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,601,573 |
@Test
public void testInstantiationFromParameterizerListListExtendMapStringDouble() throws Exception {
ParameterizedClass fluentType = ParameterizedClass.build(new Parameterizer<List<List<? extends Map<String, Double>>>>(){}.getClass().getGenericInterfaces()[0]);
assertNotNull(fluentType);
Type type = fluentT... | void function() throws Exception { ParameterizedClass fluentType = ParameterizedClass.build(new Parameterizer<List<List<? extends Map<String, Double>>>>(){}.getClass().getGenericInterfaces()[0]); assertNotNull(fluentType); Type type = fluentType.getParameterizedType(Parameterizer.class.getTypeParameters()[0]); assertTr... | /**
* Tests building a fluent type from a anonymous
* Parameterizer<List<List<? extends Map<String, Double>>>> class instance
*/ | Tests building a fluent type from a anonymous Parameterizer>>> class instance | testInstantiationFromParameterizerListListExtendMapStringDouble | {
"repo_name": "forty9/fluent-proxy",
"path": "src/test/java/com/forty9/fluent/proxy/FluentTypeTest.java",
"license": "apache-2.0",
"size": 10956
} | [
"com.forty9.reflect.ParameterizedClass",
"com.forty9.reflect.Parameterizer",
"java.lang.reflect.ParameterizedType",
"java.lang.reflect.Type",
"java.lang.reflect.WildcardType",
"java.util.Collection",
"java.util.Iterator",
"java.util.List",
"java.util.Map",
"org.testng.Assert"
] | import com.forty9.reflect.ParameterizedClass; import com.forty9.reflect.Parameterizer; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.lang.reflect.WildcardType; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Map; import org.testng.... | import com.forty9.reflect.*; import java.lang.reflect.*; import java.util.*; import org.testng.*; | [
"com.forty9.reflect",
"java.lang",
"java.util",
"org.testng"
] | com.forty9.reflect; java.lang; java.util; org.testng; | 1,404,963 |
public void addAttachments(Collection<EmailAttachment> attachments) {
for (EmailAttachment e : attachments) {
addAttachment(e);
}
} | void function(Collection<EmailAttachment> attachments) { for (EmailAttachment e : attachments) { addAttachment(e); } } | /**
* Adds a Collection of EmailAttachment to the EmailMessage
*
* @param attachments Collection of EmailAttachment
*/ | Adds a Collection of EmailAttachment to the EmailMessage | addAttachments | {
"repo_name": "vicentjp/simple-email-master",
"path": "src/main/java/com/outjected/email/api/EmailMessage.java",
"license": "apache-2.0",
"size": 10812
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,626,206 |
private Path getPathFromVfs(String path) {
return projectFilesystem.getPath(path);
} | Path function(String path) { return projectFilesystem.getPath(path); } | /**
* Return a {@link Path} from the underlying {@link java.nio.file.FileSystem} implementation. This
* allows to safely call {@link Path#resolve(Path)} and similar calls without exceptions caused by
* mis-matched underlying filesystem implementations causing grief. This is particularly useful
* for those t... | Return a <code>Path</code> from the underlying <code>java.nio.file.FileSystem</code> implementation. This allows to safely call <code>Path#resolve(Path)</code> and similar calls without exceptions caused by mis-matched underlying filesystem implementations causing grief. This is particularly useful for those times wher... | getPathFromVfs | {
"repo_name": "facebook/buck",
"path": "src/com/facebook/buck/core/config/BuckConfig.java",
"license": "apache-2.0",
"size": 15907
} | [
"java.nio.file.Path"
] | import java.nio.file.Path; | import java.nio.file.*; | [
"java.nio"
] | java.nio; | 2,899,460 |
public Node getNode(Node node) throws Exception {
Document doc = null;
try {
doc = (Document) node;
}
catch (ClassCastException cce) {
throw new Exception("Node provided must be a Document Node");
}
Element e = doc.createElement(name);
Iterator attrIterator = attributes.keySe... | Node function(Node node) throws Exception { Document doc = null; try { doc = (Document) node; } catch (ClassCastException cce) { throw new Exception(STR); } Element e = doc.createElement(name); Iterator attrIterator = attributes.keySet().iterator(); while (attrIterator.hasNext()) { String attrName = attrIterator.next()... | /** method which returns a Node of type org.w3c.dom.Element from the
* values set against the tree of NodeBuilders that is a child of the
* supplier Document Node.
* @param node the DOM Document that this Node will belong to
* @throws Exception if the supplied Node is not of type
* org.w3c.dom.Docum... | method which returns a Node of type org.w3c.dom.Element from the values set against the tree of NodeBuilders that is a child of the supplier Document Node | getNode | {
"repo_name": "mcwarman/interlok",
"path": "adapter/src/main/java/com/adaptris/util/NodeBuilder.java",
"license": "apache-2.0",
"size": 3118
} | [
"java.util.Iterator",
"org.w3c.dom.Document",
"org.w3c.dom.Element",
"org.w3c.dom.Node",
"org.w3c.dom.Text"
] | import java.util.Iterator; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.Text; | import java.util.*; import org.w3c.dom.*; | [
"java.util",
"org.w3c.dom"
] | java.util; org.w3c.dom; | 141,642 |
@Override
public Iterable<BuildTarget> findDepsForTargetFromConstructorArgs(
BuildTarget buildTarget,
Function<Optional<String>, Path> cellRoots,
ThriftConstructorArg arg) {
Optional<Map.Entry<Flavor, ThriftLanguageSpecificEnhancer>> enhancerFlavor =
enhancers.getFlavorAndValue(buildTa... | Iterable<BuildTarget> function( BuildTarget buildTarget, Function<Optional<String>, Path> cellRoots, ThriftConstructorArg arg) { Optional<Map.Entry<Flavor, ThriftLanguageSpecificEnhancer>> enhancerFlavor = enhancers.getFlavorAndValue(buildTarget); if (!enhancerFlavor.isPresent()) { return ImmutableList.of(); } List<Bui... | /**
* Collect implicit deps for the thrift compiler and language specific enhancers.
*/ | Collect implicit deps for the thrift compiler and language specific enhancers | findDepsForTargetFromConstructorArgs | {
"repo_name": "Dominator008/buck",
"path": "src/com/facebook/buck/thrift/ThriftLibraryDescription.java",
"license": "apache-2.0",
"size": 18248
} | [
"com.facebook.buck.model.BuildTarget",
"com.facebook.buck.model.BuildTargets",
"com.facebook.buck.model.Flavor",
"com.facebook.buck.model.FlavorDomain",
"com.google.common.base.Function",
"com.google.common.base.Optional",
"com.google.common.collect.ImmutableList",
"com.google.common.collect.Immutable... | import com.facebook.buck.model.BuildTarget; import com.facebook.buck.model.BuildTargets; import com.facebook.buck.model.Flavor; import com.facebook.buck.model.FlavorDomain; import com.google.common.base.Function; import com.google.common.base.Optional; import com.google.common.collect.ImmutableList; import com.google.c... | import com.facebook.buck.model.*; import com.google.common.base.*; import com.google.common.collect.*; import java.nio.file.*; import java.util.*; | [
"com.facebook.buck",
"com.google.common",
"java.nio",
"java.util"
] | com.facebook.buck; com.google.common; java.nio; java.util; | 2,832,634 |
public void removeSeries(ISeries series) {
// Searches the series map to see if it is there and removes the series
// if so
if (seriesMap.containsKey(series)) {
seriesMap.remove(series);
// See if it is an error series to a parent in the map and remove it
} else if (seriesMap.containsKey(series.getPar... | void function(ISeries series) { if (seriesMap.containsKey(series)) { seriesMap.remove(series); } else if (seriesMap.containsKey(series.getParentSeries())) { ISeries parent = series.getParentSeries(); seriesMap.get(parent).remove(series); redrawSeries((ISeries) parent); } if (existingTraces.containsKey(series)) { xyGrap... | /**
* Removes the selected series from this editor. Should remove if the series
* is
*
* @param series
*/ | Removes the selected series from this editor. Should remove if the series is | removeSeries | {
"repo_name": "jarrah42/eavp",
"path": "org.eclipse.eavp.viz.service/src/org/eclipse/eavp/viz/service/csv/CSVPlotEditor.java",
"license": "epl-1.0",
"size": 31812
} | [
"org.eclipse.eavp.viz.service.ISeries"
] | import org.eclipse.eavp.viz.service.ISeries; | import org.eclipse.eavp.viz.service.*; | [
"org.eclipse.eavp"
] | org.eclipse.eavp; | 1,196,690 |
private void finish(IProject project) {
importOrganizer.manipulate(project);
rebuild(project, properties);
notifyUser(project);
} | void function(IProject project) { importOrganizer.manipulate(project); rebuild(project, properties); notifyUser(project); } | /**
* 6. Finishes the ecorification: Organizes all imports, rebuilds the project
* and notifies the user.
*/ | 6. Finishes the ecorification: Organizes all imports, rebuilds the project and notifies the user | finish | {
"repo_name": "tsaglam/JavaCodeEcorification",
"path": "src/main/java/jce/JavaCodeEcorification.java",
"license": "epl-1.0",
"size": 7979
} | [
"org.eclipse.core.resources.IProject"
] | import org.eclipse.core.resources.IProject; | import org.eclipse.core.resources.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 1,088,993 |
public static String findOrCreateBlock(String title, String type, long startTime, long endTime,
ArrayList<ContentProviderOperation> batch, ContentResolver resolver) {
// TODO: check for existence instead of always blindly creating. it's
// okay for now since the database replaces on conf... | static String function(String title, String type, long startTime, long endTime, ArrayList<ContentProviderOperation> batch, ContentResolver resolver) { final ContentProviderOperation.Builder builder = ContentProviderOperation .newInsert(Blocks.CONTENT_URI); final String blockId = Blocks.generateBlockId(startTime, endTim... | /**
* Return a {@link Blocks#BLOCK_ID} matching the requested arguments,
* inserting a new {@link Blocks} entry as a
* {@link ContentProviderOperation} when none already exists.
*/ | Return a <code>Blocks#BLOCK_ID</code> matching the requested arguments, inserting a new <code>Blocks</code> entry as a <code>ContentProviderOperation</code> when none already exists | findOrCreateBlock | {
"repo_name": "underhilllabs/dccsched",
"path": "src/com/underhilllabs/dccsched/util/ParserUtils.java",
"license": "apache-2.0",
"size": 7843
} | [
"android.content.ContentProviderOperation",
"android.content.ContentResolver",
"com.underhilllabs.dccsched.provider.ScheduleContract",
"java.util.ArrayList"
] | import android.content.ContentProviderOperation; import android.content.ContentResolver; import com.underhilllabs.dccsched.provider.ScheduleContract; import java.util.ArrayList; | import android.content.*; import com.underhilllabs.dccsched.provider.*; import java.util.*; | [
"android.content",
"com.underhilllabs.dccsched",
"java.util"
] | android.content; com.underhilllabs.dccsched; java.util; | 188,533 |
// todo engl. javadoc der Parameter
public String blattnummer(String pTKBez, VgPoint pt) throws T3dException, T3dSRSException
{
if (! (pt.getSRS().equalsIgnoreCase("EPSG:4326")))
throw new T3dSRSException( "TKBlattLocator can not process SRS \"" + pt.getSRS() + "\"." );
if (pTKBez.equalsIg... | String function(String pTKBez, VgPoint pt) throws T3dException, T3dSRSException { if (! (pt.getSRS().equalsIgnoreCase(STR))) throw new T3dSRSException( STRSTR\"." ); if (pTKBez.equalsIgnoreCase(STR) pTKBez.equalsIgnoreCase("TK25")) return this.tk25(pt); if (pTKBez.equalsIgnoreCase(STR) pTKBez.equalsIgnoreCase("TK50")) ... | /**
* returns the TK-identifier for a given point.
* <br /><br />
* <i>German:</i> liefert die Nummer des TK-Blattes für den
* angegebenen Punkt.
*
* @param pTKBez TK-Werk, z. B. <tt>"TK 25"</tt>, <tt>"TK 50"</tt> oder <tt>"TK 100"</tt>
* @param pt Position gegeben in geografischen Koordinate... | returns the TK-identifier for a given point. German: liefert die Nummer des TK-Blattes für den angegebenen Punkt | blattnummer | {
"repo_name": "52North/triturus",
"path": "src/main/java/org/n52/v3d/triturus/survey/TKBlattLocator.java",
"license": "gpl-2.0",
"size": 6559
} | [
"org.n52.v3d.triturus.core.T3dException",
"org.n52.v3d.triturus.vgis.T3dSRSException",
"org.n52.v3d.triturus.vgis.VgPoint"
] | import org.n52.v3d.triturus.core.T3dException; import org.n52.v3d.triturus.vgis.T3dSRSException; import org.n52.v3d.triturus.vgis.VgPoint; | import org.n52.v3d.triturus.core.*; import org.n52.v3d.triturus.vgis.*; | [
"org.n52.v3d"
] | org.n52.v3d; | 2,590,000 |
if (instance == null) {
instance = new ModelBuilder();
}
return instance;
}
private Properties handlerMapping;
private ModelBuilder() {
this.handlerMapping = new Properties();
}
| if (instance == null) { instance = new ModelBuilder(); } return instance; } private Properties handlerMapping; private ModelBuilder() { this.handlerMapping = new Properties(); } | /**
* Returns the single instance of this class.
*
* @return the single instance of this class.
*/ | Returns the single instance of this class | getInstance | {
"repo_name": "jfree/jcommon",
"path": "src/main/java/org/jfree/xml/generator/ModelBuilder.java",
"license": "lgpl-2.1",
"size": 17492
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 2,214,413 |
public Iterator<Heap.Entry<TKey, TValue>> iterator()
{
return new EntryIterator();
} | Iterator<Heap.Entry<TKey, TValue>> function() { return new EntryIterator(); } | /**
* Get an iterator over this heap entry set.
*
* @return an iterator over the entry set.
*/ | Get an iterator over this heap entry set | iterator | {
"repo_name": "hwellmann/omadac",
"path": "platform/heap/src/main/java/org/teneighty/heap/BinomialHeap.java",
"license": "lgpl-2.1",
"size": 29291
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,425,175 |
private void tbtnIsPreviewImageActionPerformed(final java.awt.event.ActionEvent evt) { //GEN-FIRST:event_tbtnIsPreviewImageActionPerformed
if (tbtnIsPreviewImage.isSelected()) {
stadtbildserieProvider.newPreviewImageSelected();
tbtnIsPreviewImage.setEnabled(false);
}
} ... | void function(final java.awt.event.ActionEvent evt) { if (tbtnIsPreviewImage.isSelected()) { stadtbildserieProvider.newPreviewImageSelected(); tbtnIsPreviewImage.setEnabled(false); } } | /**
* DOCUMENT ME!
*
* @param evt DOCUMENT ME!
*/ | DOCUMENT ME | tbtnIsPreviewImageActionPerformed | {
"repo_name": "cismet/cids-custom-wuppertal",
"path": "src/main/java/de/cismet/cids/custom/objecteditors/utils/Sb_StadtbildPreviewImage.java",
"license": "lgpl-3.0",
"size": 33015
} | [
"java.awt.event.ActionEvent"
] | import java.awt.event.ActionEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 856,971 |
public static boolean isEquivalent( final List<Point2D_I32> contourA,
final List<Point2D_I32> contourB ) {
if (contourA.size() != contourB.size())
return false;
if (contourA.size() == 0)
return true;
final int N = contourA.size();
Point2D_I32 first = contourA.get(0);
for (int i = 0; i < N;... | static boolean function( final List<Point2D_I32> contourA, final List<Point2D_I32> contourB ) { if (contourA.size() != contourB.size()) return false; if (contourA.size() == 0) return true; final int N = contourA.size(); Point2D_I32 first = contourA.get(0); for (int i = 0; i < N; i++) { if (!contourB.get(i).equals(first... | /**
* Checks to see if the two contours are equivalent up to a shift in order.
*
* @param contourA First contour
* @param contourB Second contour
* @return true if equivalent
*/ | Checks to see if the two contours are equivalent up to a shift in order | isEquivalent | {
"repo_name": "lessthanoptimal/BoofCV",
"path": "main/boofcv-ip/src/main/java/boofcv/alg/filter/binary/ContourOps.java",
"license": "apache-2.0",
"size": 2268
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 423,736 |
public static int estimateAffine3D(Mat src, Mat dst, Mat out, Mat inliers, double ransacThreshold, double confidence)
{
int retVal = estimateAffine3D_0(src.nativeObj, dst.nativeObj, out.nativeObj, inliers.nativeObj, ransacThreshold, confidence);
return retVal;
} | static int function(Mat src, Mat dst, Mat out, Mat inliers, double ransacThreshold, double confidence) { int retVal = estimateAffine3D_0(src.nativeObj, dst.nativeObj, out.nativeObj, inliers.nativeObj, ransacThreshold, confidence); return retVal; } | /**
* <p>Computes an optimal affine transformation between two 3D point sets.</p>
*
* <p>The function estimates an optimal 3D affine transformation between two 3D
* point sets using the RANSAC algorithm.</p>
*
* @param src First input 3D point set.
* @param dst Second input 3D point set.
* @param out Output 3D ... | Computes an optimal affine transformation between two 3D point sets. The function estimates an optimal 3D affine transformation between two 3D point sets using the RANSAC algorithm | estimateAffine3D | {
"repo_name": "TechBooster/effective_android_sample",
"path": "chapter23/OpenCV Library - 2.4.6/src/org/opencv/calib3d/Calib3d.java",
"license": "apache-2.0",
"size": 163620
} | [
"org.opencv.core.Mat"
] | import org.opencv.core.Mat; | import org.opencv.core.*; | [
"org.opencv.core"
] | org.opencv.core; | 2,141,851 |
EAttribute getAngleAxis_MinVal(); | EAttribute getAngleAxis_MinVal(); | /**
* Returns the meta object for the attribute '{@link info.limpet.stackedcharts.model.AngleAxis#getMinVal <em>Min Val</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Min Val</em>'.
* @see info.limpet.stackedcharts.model.AngleAxis#getMinVal()
... | Returns the meta object for the attribute '<code>info.limpet.stackedcharts.model.AngleAxis#getMinVal Min Val</code>'. | getAngleAxis_MinVal | {
"repo_name": "pecko/limpet",
"path": "info.limpet.stackedcharts.model/src/info/limpet/stackedcharts/model/StackedchartsPackage.java",
"license": "epl-1.0",
"size": 92511
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,004,361 |
public void valueChanged (ListSelectionEvent e)
{
if (e.getValueIsAdjusting())
return;
enableButtons();
} // valueChanged
| void function (ListSelectionEvent e) { if (e.getValueIsAdjusting()) return; enableButtons(); } | /**
* Table selection changed
* @param e event
*/ | Table selection changed | valueChanged | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempiere_360/client/src/org/compiere/pos/QueryBPartner.java",
"license": "gpl-2.0",
"size": 11642
} | [
"javax.swing.event.ListSelectionEvent"
] | import javax.swing.event.ListSelectionEvent; | import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 1,474,795 |
double tryReceiveDouble() throws AbnormalCloseException, NormalCloseException; | double tryReceiveDouble() throws AbnormalCloseException, NormalCloseException; | /**
* Trys to receive a single {@link Double} value from the client.
*
* @return the received double
* @throws NormalCloseException
* When receiving was not possible because the connection the the client was closed in a normal way.
* @throws AbnormalCloseException
* ... | Trys to receive a single <code>Double</code> value from the client | tryReceiveDouble | {
"repo_name": "rbi/trading4j",
"path": "server/src/main/java/de/voidnode/trading4j/server/protocol/ClientConnection.java",
"license": "gpl-3.0",
"size": 5532
} | [
"de.voidnode.trading4j.server.protocol.exceptions.AbnormalCloseException",
"de.voidnode.trading4j.server.protocol.exceptions.NormalCloseException"
] | import de.voidnode.trading4j.server.protocol.exceptions.AbnormalCloseException; import de.voidnode.trading4j.server.protocol.exceptions.NormalCloseException; | import de.voidnode.trading4j.server.protocol.exceptions.*; | [
"de.voidnode.trading4j"
] | de.voidnode.trading4j; | 1,706,136 |
private String renderContent(String content, LinkType linkType) {
return call(() -> client().resolveLinks(content, new NodeParametersImpl().setResolveLinks(linkType)));
} | String function(String content, LinkType linkType) { return call(() -> client().resolveLinks(content, new NodeParametersImpl().setResolveLinks(linkType))); } | /**
* Render the given content, assert success and return the result
*
* @param content
* content to render
* @param linkType
* link type
* @return rendered result
*/ | Render the given content, assert success and return the result | renderContent | {
"repo_name": "gentics/mesh",
"path": "tests/tests-core/src/main/java/com/gentics/mesh/linkrenderer/LinkRendererEndpointTest.java",
"license": "apache-2.0",
"size": 5208
} | [
"com.gentics.mesh.parameter.LinkType",
"com.gentics.mesh.parameter.impl.NodeParametersImpl",
"com.gentics.mesh.test.ClientHelper"
] | import com.gentics.mesh.parameter.LinkType; import com.gentics.mesh.parameter.impl.NodeParametersImpl; import com.gentics.mesh.test.ClientHelper; | import com.gentics.mesh.parameter.*; import com.gentics.mesh.parameter.impl.*; import com.gentics.mesh.test.*; | [
"com.gentics.mesh"
] | com.gentics.mesh; | 936,257 |
private void processPackets(final Comms comms, final Timer timer, final JTextField balanceField) {
try {
if (comms == null || !comms.recvReady())
return;
} catch (final IOException e) {
System.err.println("The host appears to be down.");
msgTextBox.append("[*ERR*] The host appears to be down.\n");
... | void function(final Comms comms, final Timer timer, final JTextField balanceField) { try { if (comms == null !comms.recvReady()) return; } catch (final IOException e) { System.err.println(STR); msgTextBox.append(STR); if (DEBUG_ERROR_TRACE) e.printStackTrace(); return; } timer.stop(); try { while (comms.recvReady()) { ... | /**
* Process incoming packets.
*
* @param comms The {@link Comms} class on which to receive a packet.
* @param timer The {@link Timer} that activated the function call.
* @param balanceField The {@link JTextField} to be updated if a
* <code>CMD_GETBALANCE</code> packet is received.
*/ | Process incoming packets | processPackets | {
"repo_name": "joshuaspence/StealthNet",
"path": "src/StealthNet/Client.java",
"license": "mit",
"size": 72896
} | [
"java.awt.FileDialog",
"java.io.IOException",
"java.net.Socket",
"java.security.PublicKey",
"javax.swing.JOptionPane",
"javax.swing.JTextField",
"javax.swing.Timer",
"org.apache.commons.codec.binary.Base64"
] | import java.awt.FileDialog; import java.io.IOException; import java.net.Socket; import java.security.PublicKey; import javax.swing.JOptionPane; import javax.swing.JTextField; import javax.swing.Timer; import org.apache.commons.codec.binary.Base64; | import java.awt.*; import java.io.*; import java.net.*; import java.security.*; import javax.swing.*; import org.apache.commons.codec.binary.*; | [
"java.awt",
"java.io",
"java.net",
"java.security",
"javax.swing",
"org.apache.commons"
] | java.awt; java.io; java.net; java.security; javax.swing; org.apache.commons; | 1,201,967 |
private void scanGroups(MetaData onTmp, MetaData onDisk) {
final GroupTreeNode groupsTmp = onTmp.getGroups();
final GroupTreeNode groupsDisk = onDisk.getGroups();
if ((groupsTmp == null) && (groupsDisk == null)) {
return;
}
if (((groupsTmp != null) && (groupsDisk ... | void function(MetaData onTmp, MetaData onDisk) { final GroupTreeNode groupsTmp = onTmp.getGroups(); final GroupTreeNode groupsDisk = onDisk.getGroups(); if ((groupsTmp == null) && (groupsDisk == null)) { return; } if (((groupsTmp != null) && (groupsDisk == null)) (groupsTmp == null)) { changes.add(new GroupChange(group... | /**
* This method only detects whether a change took place or not. It does not determine the type of change. This would
* be possible, but difficult to do properly, so I rather only report the change.
*/ | This method only detects whether a change took place or not. It does not determine the type of change. This would be possible, but difficult to do properly, so I rather only report the change | scanGroups | {
"repo_name": "motokito/jabref",
"path": "src/main/java/net/sf/jabref/collab/ChangeScanner.java",
"license": "mit",
"size": 21432
} | [
"net.sf.jabref.MetaData",
"net.sf.jabref.logic.groups.GroupTreeNode"
] | import net.sf.jabref.MetaData; import net.sf.jabref.logic.groups.GroupTreeNode; | import net.sf.jabref.*; import net.sf.jabref.logic.groups.*; | [
"net.sf.jabref"
] | net.sf.jabref; | 2,812,780 |
private void checkForFailure(List<Dependency> dependencies) throws ScanAgentException {
final StringBuilder ids = new StringBuilder();
for (Dependency d : dependencies) {
boolean addName = true;
for (Vulnerability v : d.getVulnerabilities()) {
if (v.getCvssSco... | void function(List<Dependency> dependencies) throws ScanAgentException { final StringBuilder ids = new StringBuilder(); for (Dependency d : dependencies) { boolean addName = true; for (Vulnerability v : d.getVulnerabilities()) { if (v.getCvssScore() >= failBuildOnCVSS) { if (addName) { addName = false; ids.append(NEW_L... | /**
* Checks to see if a vulnerability has been identified with a CVSS score that is above the threshold set in the
* configuration.
*
* @param dependencies the list of dependency objects
* @throws org.owasp.dependencycheck.exception.ScanAgentException thrown if there is an exception executing ... | Checks to see if a vulnerability has been identified with a CVSS score that is above the threshold set in the configuration | checkForFailure | {
"repo_name": "sirkkalap/DependencyCheck",
"path": "dependency-check-core/src/main/java/org/owasp/dependencycheck/agent/DependencyCheckScanAgent.java",
"license": "apache-2.0",
"size": 31283
} | [
"java.util.List",
"org.owasp.dependencycheck.dependency.Dependency",
"org.owasp.dependencycheck.dependency.Vulnerability",
"org.owasp.dependencycheck.exception.ScanAgentException"
] | import java.util.List; import org.owasp.dependencycheck.dependency.Dependency; import org.owasp.dependencycheck.dependency.Vulnerability; import org.owasp.dependencycheck.exception.ScanAgentException; | import java.util.*; import org.owasp.dependencycheck.dependency.*; import org.owasp.dependencycheck.exception.*; | [
"java.util",
"org.owasp.dependencycheck"
] | java.util; org.owasp.dependencycheck; | 631,775 |
public PendingIntent getNotificationIntent() {
return null;
} | PendingIntent function() { return null; } | /**
* Returns the intent which is to be started by pushing the notification
* entry
*
* @return the peneding intent
*/ | Returns the intent which is to be started by pushing the notification entry | getNotificationIntent | {
"repo_name": "z7z8th/yaacc",
"path": "yaacc/src/de/yaacc/player/AbstractPlayer.java",
"license": "gpl-3.0",
"size": 19876
} | [
"android.app.PendingIntent"
] | import android.app.PendingIntent; | import android.app.*; | [
"android.app"
] | android.app; | 1,466,448 |
@edu.umd.cs.findbugs.annotations.SuppressWarnings("DM_DEFAULT_ENCODING")
public static byte[] decode(String s, int options) throws IOException {
if(s == null) {
throw new NullPointerException("Input string was null.");
} // end if
byte[] bytes;
try {
bytes = s.getBytes(PREFERRED_ENCODI... | @edu.umd.cs.findbugs.annotations.SuppressWarnings(STR) static byte[] function(String s, int options) throws IOException { if(s == null) { throw new NullPointerException(STR); } byte[] bytes; try { bytes = s.getBytes(PREFERRED_ENCODING); } catch(UnsupportedEncodingException uee) { bytes = s.getBytes(); } bytes = decode(... | /**
* Decodes data from Base64 notation, automatically detecting gzip-compressed data and decompressing it.
*
* @param s the string to decode
* @param options encode options such as URL_SAFE
* @return the decoded data
* @throws IOException if there is an error
* @throws NullPointerException if <tt>... | Decodes data from Base64 notation, automatically detecting gzip-compressed data and decompressing it | decode | {
"repo_name": "apruden/magma",
"path": "magma-api/src/main/java/org/obiba/magma/type/Base64.java",
"license": "gpl-3.0",
"size": 74368
} | [
"java.io.ByteArrayInputStream",
"java.io.ByteArrayOutputStream",
"java.io.IOException",
"java.io.UnsupportedEncodingException",
"java.util.zip.GZIPInputStream"
] | import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.zip.GZIPInputStream; | import java.io.*; import java.util.zip.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,815,566 |
public void signDetached(File inFile, File outFile, TSAClient tsaClient) throws IOException {
if (inFile == null || !inFile.exists()) {
throw new FileNotFoundException("Document for signing does not exist");
}
FileOutputStream fos = new FileOutputStream(outFile);
// sig... | void function(File inFile, File outFile, TSAClient tsaClient) throws IOException { if (inFile == null !inFile.exists()) { throw new FileNotFoundException(STR); } FileOutputStream fos = new FileOutputStream(outFile); PDDocument doc = PDDocument.load(inFile); signDetached(doc, fos, tsaClient); doc.close(); } | /**
* Signs the given PDF file.
*
* @param inFile input PDF file
* @param outFile output PDF file
* @param tsaClient optional TSA client
* @throws IOException if the input file could not be read
*/ | Signs the given PDF file | signDetached | {
"repo_name": "gavanx/pdflearn",
"path": "examples/src/main/java/org/apache/pdfbox/examples/signature/CreateSignature.java",
"license": "apache-2.0",
"size": 8062
} | [
"java.io.File",
"java.io.FileNotFoundException",
"java.io.FileOutputStream",
"java.io.IOException",
"org.apache.pdfbox.pdmodel.PDDocument"
] | import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import org.apache.pdfbox.pdmodel.PDDocument; | import java.io.*; import org.apache.pdfbox.pdmodel.*; | [
"java.io",
"org.apache.pdfbox"
] | java.io; org.apache.pdfbox; | 1,148,776 |
public static Table<Integer,Integer,String> transformToStringTable(Table<Integer, Integer, Double> table) {
// Umwandlung von Double zu String
DoubleToStringTransformer doubleToStringTransformer = new DoubleToStringTransformer();
// die transformierte Tabelle ist unveränderlich!
Ta... | static Table<Integer,Integer,String> function(Table<Integer, Integer, Double> table) { DoubleToStringTransformer doubleToStringTransformer = new DoubleToStringTransformer(); Table<Integer,Integer,String> transformedTable = Tables.transformValues(table, doubleToStringTransformer); return ArrayTable.create(transformedTab... | /**
* Wandelte eine Double Tabelle in eine String Tabelle um
*
* @param table die umzuwandelnde Double Tabelle
* @return die entsprechende String Tabelle
*/ | Wandelte eine Double Tabelle in eine String Tabelle um | transformToStringTable | {
"repo_name": "Hans-PeterHafner/Tool_Geheimhaltung",
"path": "Tool/Quelltext/statistische-geheimhaltung/src/main/java/de/htw/pim/sg/table/TableUtil.java",
"license": "mit",
"size": 7173
} | [
"com.google.common.collect.ArrayTable",
"com.google.common.collect.Table",
"com.google.common.collect.Tables",
"de.htw.pim.sg.table.transformer.DoubleToStringTransformer"
] | import com.google.common.collect.ArrayTable; import com.google.common.collect.Table; import com.google.common.collect.Tables; import de.htw.pim.sg.table.transformer.DoubleToStringTransformer; | import com.google.common.collect.*; import de.htw.pim.sg.table.transformer.*; | [
"com.google.common",
"de.htw.pim"
] | com.google.common; de.htw.pim; | 815,931 |
public ItemStack getCraftingResult(InventoryCrafting p_77572_1_)
{
int i = 0;
ItemStack itemstack = null;
for (int j = 0; j < p_77572_1_.getSizeInventory(); ++j)
{
ItemStack itemstack1 = p_77572_1_.getStackInSlot(j);
if (itemstack1 != null)
{... | ItemStack function(InventoryCrafting p_77572_1_) { int i = 0; ItemStack itemstack = null; for (int j = 0; j < p_77572_1_.getSizeInventory(); ++j) { ItemStack itemstack1 = p_77572_1_.getStackInSlot(j); if (itemstack1 != null) { if (itemstack1.getItem() == Items.filled_map) { if (itemstack != null) { return null; } items... | /**
* Returns an Item that is the result of this recipe
*/ | Returns an Item that is the result of this recipe | getCraftingResult | {
"repo_name": "trixmot/mod1",
"path": "build/tmp/recompileMc/sources/net/minecraft/item/crafting/RecipesMapCloning.java",
"license": "lgpl-2.1",
"size": 3213
} | [
"net.minecraft.init.Items",
"net.minecraft.inventory.InventoryCrafting",
"net.minecraft.item.ItemStack"
] | import net.minecraft.init.Items; import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.ItemStack; | import net.minecraft.init.*; import net.minecraft.inventory.*; import net.minecraft.item.*; | [
"net.minecraft.init",
"net.minecraft.inventory",
"net.minecraft.item"
] | net.minecraft.init; net.minecraft.inventory; net.minecraft.item; | 2,744,929 |
public Observable<ServiceResponse<Void>> deleteVnetRouteWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String routeName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
... | Observable<ServiceResponse<Void>> function(String resourceGroupName, String name, String vnetName, String routeName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (name == null) { throw new IllegalArgumentException(STR); } if (vnetName == null) { throw new IllegalArgumentException(STR... | /**
* Delete a Virtual Network route in an App Service plan.
* Delete a Virtual Network route in an App Service plan.
*
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the App Service plan.
* @param vnetName Name of the Virtual Net... | Delete a Virtual Network route in an App Service plan. Delete a Virtual Network route in an App Service plan | deleteVnetRouteWithServiceResponseAsync | {
"repo_name": "jianghaolu/azure-sdk-for-java",
"path": "azure-mgmt-appservice/src/main/java/com/microsoft/azure/management/appservice/implementation/AppServicePlansInner.java",
"license": "mit",
"size": 260114
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 130,192 |
public int getNumTexCoordIndex() {
if ( texCoordIndex == null ) {
texCoordIndex = (MFInt32)getField( "texCoordIndex" );
}
return( texCoordIndex.getSize( ) );
} | int function() { if ( texCoordIndex == null ) { texCoordIndex = (MFInt32)getField( STR ); } return( texCoordIndex.getSize( ) ); } | /** Return the number of MFInt32 items in the texCoordIndex field.
* @return the number of MFInt32 items in the texCoordIndex field. */ | Return the number of MFInt32 items in the texCoordIndex field | getNumTexCoordIndex | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/xj3d/sai/internal/node/geometry3d/SAIIndexedFaceSet.java",
"license": "gpl-2.0",
"size": 13900
} | [
"org.web3d.x3d.sai.MFInt32"
] | import org.web3d.x3d.sai.MFInt32; | import org.web3d.x3d.sai.*; | [
"org.web3d.x3d"
] | org.web3d.x3d; | 1,240,248 |
public Observable<ServiceResponse<Void>> beginResetVpnClientSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
... | Observable<ServiceResponse<Void>> function(String resourceGroupName, String virtualNetworkGatewayName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (virtualNetworkGatewayName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null) { throw new I... | /**
* Resets the VPN client shared key of the virtual network gateway in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayName The name of the virtual network gateway.
* @throws IllegalArgumentException thrown if parameters... | Resets the VPN client shared key of the virtual network gateway in the specified resource group | beginResetVpnClientSharedKeyWithServiceResponseAsync | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/network/v2019_08_01/implementation/VirtualNetworkGatewaysInner.java",
"license": "mit",
"size": 283551
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,139,975 |
@Override
public MpnProfile get( String mpnId )
{
IPartnerServiceProxy<MpnProfile, MpnProfile> partnerServiceProxy =
new PartnerServiceProxy<MpnProfile, MpnProfile>( new TypeReference<MpnProfile>()
{
}, this.getPartner(), MessageFormat.format( PartnerService.getIn... | MpnProfile function( String mpnId ) { IPartnerServiceProxy<MpnProfile, MpnProfile> partnerServiceProxy = new PartnerServiceProxy<MpnProfile, MpnProfile>( new TypeReference<MpnProfile>() { }, this.getPartner(), MessageFormat.format( PartnerService.getInstance().getConfiguration().getApis().get( STR ).getPath(), Locale.U... | /**
* Retrieves a MpnProfile by MPN Id.
*
* @param mpnId The MPN Id.
* @return The partner network profile.
*/ | Retrieves a MpnProfile by MPN Id | get | {
"repo_name": "iogav/Partner-Center-Java-SDK",
"path": "PartnerSdk/src/main/java/com/microsoft/store/partnercenter/profiles/MpnProfileOperations.java",
"license": "mit",
"size": 2965
} | [
"com.fasterxml.jackson.core.type.TypeReference",
"com.microsoft.store.partnercenter.PartnerService",
"com.microsoft.store.partnercenter.models.partners.MpnProfile",
"com.microsoft.store.partnercenter.models.utils.KeyValuePair",
"com.microsoft.store.partnercenter.network.IPartnerServiceProxy",
"com.microso... | import com.fasterxml.jackson.core.type.TypeReference; import com.microsoft.store.partnercenter.PartnerService; import com.microsoft.store.partnercenter.models.partners.MpnProfile; import com.microsoft.store.partnercenter.models.utils.KeyValuePair; import com.microsoft.store.partnercenter.network.IPartnerServiceProxy; i... | import com.fasterxml.jackson.core.type.*; import com.microsoft.store.partnercenter.*; import com.microsoft.store.partnercenter.models.partners.*; import com.microsoft.store.partnercenter.models.utils.*; import com.microsoft.store.partnercenter.network.*; import java.text.*; import java.util.*; | [
"com.fasterxml.jackson",
"com.microsoft.store",
"java.text",
"java.util"
] | com.fasterxml.jackson; com.microsoft.store; java.text; java.util; | 2,668,005 |
protected static boolean isDebuggerAttached() {
return Debug.isDebuggerConnected();
} | static boolean function() { return Debug.isDebuggerConnected(); } | /**
* Determines whether a debugger is attached while running the app.
*
* @return YES the debugger is attached, otherwise NO
*/ | Determines whether a debugger is attached while running the app | isDebuggerAttached | {
"repo_name": "tsdl2013/ApplicationInsights-Android",
"path": "applicationinsights-android/src/main/java/com/microsoft/applicationinsights/library/Util.java",
"license": "mit",
"size": 4210
} | [
"android.os.Debug"
] | import android.os.Debug; | import android.os.*; | [
"android.os"
] | android.os; | 1,022,645 |
public static String getTaskName(Class<? extends ComputeTask<?, ?>> taskCls) {
ComputeTaskName nameAnn = getAnnotation(taskCls, ComputeTaskName.class);
return nameAnn == null ? taskCls.getName() : nameAnn.value();
} | static String function(Class<? extends ComputeTask<?, ?>> taskCls) { ComputeTaskName nameAnn = getAnnotation(taskCls, ComputeTaskName.class); return nameAnn == null ? taskCls.getName() : nameAnn.value(); } | /**
* Gets task name for the given task class.
*
* @param taskCls Task class.
* @return Either task name from class annotation (see {@link org.apache.ignite.compute.ComputeTaskName}})
* or task class name if there is no annotation.
*/ | Gets task name for the given task class | getTaskName | {
"repo_name": "shurun19851206/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 289056
} | [
"org.apache.ignite.compute.ComputeTask",
"org.apache.ignite.compute.ComputeTaskName"
] | import org.apache.ignite.compute.ComputeTask; import org.apache.ignite.compute.ComputeTaskName; | import org.apache.ignite.compute.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,743,034 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<StepResourceInner>> createOrUpdateWithResponseAsync(
String resourceGroupName, String stepName, StepResourceInner stepInfo, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<StepResourceInner>> function( String resourceGroupName, String stepName, StepResourceInner stepInfo, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == nul... | /**
* Synchronously creates a new step or updates an existing step.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param stepName The name of the deployment step.
* @param stepInfo The step object.
* @param context The context to associate wit... | Synchronously creates a new step or updates an existing step | createOrUpdateWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/StepsClientImpl.java",
"license": "mit",
"size": 33672
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.deploymentmanager.fluent.models.StepResourceInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.deploymentmanager.fluent.models.StepResourceInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.deploymentmanager.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,389,764 |
public static int compareVarLenBytes(DrillBuf left, int leftStart, int leftEnd, int leftScale, DrillBuf right, int rightStart, int rightEnd, int rightScale, boolean absCompare) {
byte[] rightBytes = new byte[rightEnd - rightStart];
right.getBytes(rightStart, rightBytes, 0, rightEnd - rightStart);
return ... | static int function(DrillBuf left, int leftStart, int leftEnd, int leftScale, DrillBuf right, int rightStart, int rightEnd, int rightScale, boolean absCompare) { byte[] rightBytes = new byte[rightEnd - rightStart]; right.getBytes(rightStart, rightBytes, 0, rightEnd - rightStart); return compareVarLenBytes(left, leftSta... | /**
* Compares two VarDecimal values, still stored in their respective Drill buffers
*
* @param left left value Drill buffer
* @param leftStart start offset of left value
* @param leftEnd end offset of left value
* @param leftScale scale of left value
* @param right right value Dril... | Compares two VarDecimal values, still stored in their respective Drill buffers | compareVarLenBytes | {
"repo_name": "parthchandra/drill",
"path": "exec/vector/src/main/java/org/apache/drill/exec/util/DecimalUtility.java",
"license": "apache-2.0",
"size": 32477
} | [
"io.netty.buffer.DrillBuf"
] | import io.netty.buffer.DrillBuf; | import io.netty.buffer.*; | [
"io.netty.buffer"
] | io.netty.buffer; | 2,018,147 |
private void giveUpMasterFlag() {
Member localMember = localMember();
if (isMaster(localMember)) {
localMember.setBooleanAttribute(MASTER, false);
}
} | void function() { Member localMember = localMember(); if (isMaster(localMember)) { localMember.setBooleanAttribute(MASTER, false); } } | /**
* Give up the master flag
*/ | Give up the master flag | giveUpMasterFlag | {
"repo_name": "gentics/mesh",
"path": "distributed-coordinator/src/main/java/com/gentics/mesh/distributed/coordinator/MasterElector.java",
"license": "apache-2.0",
"size": 11207
} | [
"com.hazelcast.core.Member"
] | import com.hazelcast.core.Member; | import com.hazelcast.core.*; | [
"com.hazelcast.core"
] | com.hazelcast.core; | 1,687,088 |
public static String getRandomArticle() throws IOException {
String url = URLFetch.getRandomURL();
String json = URLFetch.getData(url);
String title = DataParse.parseRandomArticle(json);
return title;
}
| static String function() throws IOException { String url = URLFetch.getRandomURL(); String json = URLFetch.getData(url); String title = DataParse.parseRandomArticle(json); return title; } | /**
* Returns the title of a random Wikipedia article.
* @return The article title.
* @throws IOException If the random article title could not be fetched.
*/ | Returns the title of a random Wikipedia article | getRandomArticle | {
"repo_name": "antverdovsky/Wiki-Degrees",
"path": "src/com/antverdovsky/wikideg/util/Utilities.java",
"license": "mit",
"size": 1591
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 607,935 |
@Basic
public final int getRecordCount() {
return $recordCount;
}
@Invars({
@Expression("$recordCount >= 0")
})
private int $recordCount;
//------------------------------------------------------------------ | final int function() { return $recordCount; } @Invars({ @Expression(STR) }) private int $recordCount; | /**
* This must be the same on the next DB access,
* or we give a {@link java.util.ConcurrentModificationException}.
*/ | This must be the same on the next DB access, or we give a <code>java.util.ConcurrentModificationException</code> | getRecordCount | {
"repo_name": "jandppw/ppwcode-recovered-from-google-code",
"path": "java/vernacular/persistence/trunk/src/main/java/org/ppwcode/vernacular/persistence_III/dao/PagingList.java",
"license": "apache-2.0",
"size": 14572
} | [
"org.toryt.annotations_I.Expression",
"org.toryt.annotations_I.Invars"
] | import org.toryt.annotations_I.Expression; import org.toryt.annotations_I.Invars; | import org.toryt.*; | [
"org.toryt"
] | org.toryt; | 2,775,408 |
public Map<String, String> getOtherConfig(Connection c) throws
BadServerResponse,
XenAPIException,
XmlRpcException {
String method_call = "host_cpu.get_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marsh... | Map<String, String> function(Connection c) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Obj... | /**
* Get the other_config field of the given host_cpu.
*
* @return value of the field
*/ | Get the other_config field of the given host_cpu | getOtherConfig | {
"repo_name": "guzy/OnceCenter",
"path": "src/com/once/xenapi/HostCpu.java",
"license": "apache-2.0",
"size": 19088
} | [
"com.once.xenapi.Types",
"java.util.Map",
"org.apache.xmlrpc.XmlRpcException"
] | import com.once.xenapi.Types; import java.util.Map; import org.apache.xmlrpc.XmlRpcException; | import com.once.xenapi.*; import java.util.*; import org.apache.xmlrpc.*; | [
"com.once.xenapi",
"java.util",
"org.apache.xmlrpc"
] | com.once.xenapi; java.util; org.apache.xmlrpc; | 1,958,528 |
EAttribute getImage_Height(); | EAttribute getImage_Height(); | /**
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.sensor_datatypes.Image#getHeight <em>Height</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Height</em>'.
* @see org.ec... | Returns the meta object for the attribute '<code>org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.sensor_datatypes.Image#getHeight Height</code>'. | getImage_Height | {
"repo_name": "RobotML/RobotML-SDK-Juno",
"path": "plugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotMLLibraries/RobotML_ModelLibrary/RobotML_DataTypes/sensor_datatypes/Sensor_datatypesPackage.java",
"license": "epl-1.0",
"size": 152447
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 640,608 |
public String readLine() throws IOException {
while (lines.peek() == null) {
cbuf.clear();
// The default implementation of Reader#read(CharBuffer) allocates a
// temporary char[], so we call Reader#read(char[], int, int) instead.
int read = (reader != null)
? reader.read(buf, 0,... | String function() throws IOException { while (lines.peek() == null) { cbuf.clear(); int read = (reader != null) ? reader.read(buf, 0, buf.length) : readable.read(cbuf); if (read == -1) { lineBuf.finish(); break; } lineBuf.add(buf, 0, read); } return lines.poll(); } | /**
* Reads a line of text. A line is considered to be terminated by any
* one of a line feed ({@code '\n'}), a carriage return
* ({@code '\r'}), or a carriage return followed immediately by a linefeed
* ({@code "\r\n"}).
*
* @return a {@code String} containing the contents of the line, not
* i... | Reads a line of text. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), or a carriage return followed immediately by a linefeed ("\r\n") | readLine | {
"repo_name": "lshain-android-source/external-guava",
"path": "guava/src/com/google/common/io/LineReader.java",
"license": "apache-2.0",
"size": 2834
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,200,316 |
@Operation(desc = "Destroy a JMS Queue", impact = MBeanOperationInfo.ACTION)
boolean destroyQueue(@Parameter(name = "name", desc = "Name of the queue to destroy") String name,
@Parameter(name = "removeConsumers", desc = "disconnect any consumers connected to this queue") boolean removeCons... | @Operation(desc = STR, impact = MBeanOperationInfo.ACTION) boolean destroyQueue(@Parameter(name = "name", desc = STR) String name, @Parameter(name = STR, desc = STR) boolean removeConsumers) throws Exception; | /**
* Destroys a JMS Queue with the specified name.
*
* @return {@code true} if the queue was destroyed, {@code false} else
*/ | Destroys a JMS Queue with the specified name | destroyQueue | {
"repo_name": "paulgallagher75/activemq-artemis",
"path": "artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/management/JMSServerControl.java",
"license": "apache-2.0",
"size": 24627
} | [
"javax.management.MBeanOperationInfo",
"org.apache.activemq.artemis.api.core.management.Operation",
"org.apache.activemq.artemis.api.core.management.Parameter"
] | import javax.management.MBeanOperationInfo; import org.apache.activemq.artemis.api.core.management.Operation; import org.apache.activemq.artemis.api.core.management.Parameter; | import javax.management.*; import org.apache.activemq.artemis.api.core.management.*; | [
"javax.management",
"org.apache.activemq"
] | javax.management; org.apache.activemq; | 2,482,075 |
protected Set<String> getColumnNames() {
return row.keySet();
}
| Set<String> function() { return row.keySet(); } | /**
* Returns all the column names associated with this row.
* @return
*/ | Returns all the column names associated with this row | getColumnNames | {
"repo_name": "lmu-bioinformatics/xmlpipedb",
"path": "gmbuilder/src/edu/lmu/xmlpipedb/gmbuilder/databasetoolkit/tables/TableManager.java",
"license": "lgpl-3.0",
"size": 9860
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,315,931 |
public static boolean copy(FileSystem srcFS, Path src,
FileSystem dstFS, Path dst,
boolean deleteSource,
boolean overwrite,
HiveConf conf) throws IOException {
return copy(srcFS, src, dstFS, dst, deleteSource, overwrite, conf, ShimLoader.getHadoopShims());
} | static boolean function(FileSystem srcFS, Path src, FileSystem dstFS, Path dst, boolean deleteSource, boolean overwrite, HiveConf conf) throws IOException { return copy(srcFS, src, dstFS, dst, deleteSource, overwrite, conf, ShimLoader.getHadoopShims()); } | /**
* Copies files between filesystems.
*/ | Copies files between filesystems | copy | {
"repo_name": "b-slim/hive",
"path": "common/src/java/org/apache/hadoop/hive/common/FileUtils.java",
"license": "apache-2.0",
"size": 38403
} | [
"java.io.IOException",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hive.conf.HiveConf",
"org.apache.hadoop.hive.shims.ShimLoader"
] | import java.io.IOException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.shims.ShimLoader; | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hive.conf.*; import org.apache.hadoop.hive.shims.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,952,552 |
@OperationMeta(returnGenerics = JavaClass.class)
public Set<JavaClass> classes() {
if (null == classList) {
initialize();
}
return new ArraySet<JavaClass>(classList.toArray(new JavaClass[classList.size()]), JavaClass.class);
} | @OperationMeta(returnGenerics = JavaClass.class) Set<JavaClass> function() { if (null == classList) { initialize(); } return new ArraySet<JavaClass>(classList.toArray(new JavaClass[classList.size()]), JavaClass.class); } | /**
* Returns the classes of this java file.
*
* @return the annotations
*/ | Returns the classes of this java file | classes | {
"repo_name": "SSEHUB/EASyProducer",
"path": "Plugins/Instantiation/Instantiator.Java/src/net/ssehub/easy/instantiation/java/artifacts/JavaFileArtifact.java",
"license": "apache-2.0",
"size": 27862
} | [
"net.ssehub.easy.instantiation.core.model.vilTypes.ArraySet",
"net.ssehub.easy.instantiation.core.model.vilTypes.OperationMeta",
"net.ssehub.easy.instantiation.core.model.vilTypes.Set"
] | import net.ssehub.easy.instantiation.core.model.vilTypes.ArraySet; import net.ssehub.easy.instantiation.core.model.vilTypes.OperationMeta; import net.ssehub.easy.instantiation.core.model.vilTypes.Set; | import net.ssehub.easy.instantiation.core.model.*; | [
"net.ssehub.easy"
] | net.ssehub.easy; | 2,072,250 |
public @NonNull ItemHolderInfo recordPostLayoutInformation(@NonNull State state,
@NonNull ViewHolder viewHolder) {
return obtainHolderInfo().setFrom(viewHolder);
} | @NonNull ItemHolderInfo function(@NonNull State state, @NonNull ViewHolder viewHolder) { return obtainHolderInfo().setFrom(viewHolder); } | /**
* Called by the RecyclerView after the layout is complete. Item animator should record
* necessary information about the View's final state.
* <p>
* The data returned from this method will be passed to the related <code>animate**</code>
* methods.
* <p>
... | Called by the RecyclerView after the layout is complete. Item animator should record necessary information about the View's final state. The data returned from this method will be passed to the related <code>animate**</code> methods. The default implementation returns an <code>ItemHolderInfo</code> which holds the boun... | recordPostLayoutInformation | {
"repo_name": "amirlotfi/Nikagram",
"path": "app/src/main/java/ir/nikagram/messenger/support/widget/RecyclerView.java",
"license": "gpl-2.0",
"size": 482314
} | [
"android.support.annotation.NonNull",
"ir.nikagram.messenger.support.widget.RecyclerView"
] | import android.support.annotation.NonNull; import ir.nikagram.messenger.support.widget.RecyclerView; | import android.support.annotation.*; import ir.nikagram.messenger.support.widget.*; | [
"android.support",
"ir.nikagram.messenger"
] | android.support; ir.nikagram.messenger; | 23,326 |
void writeCheckpoint(PrintWriter out, int indent) {
if (getCheckpoint() != null) {
ServletUtil.writeXMLElement(out, indent,
ServletUtil.XMLTAG_CONNECTOR_CHECKPOINT, getCheckpoint());
}
} | void writeCheckpoint(PrintWriter out, int indent) { if (getCheckpoint() != null) { ServletUtil.writeXMLElement(out, indent, ServletUtil.XMLTAG_CONNECTOR_CHECKPOINT, getCheckpoint()); } } | /**
* Write out the Checkpoint to the XML stream.
*
* @param out PrintWriter to write XML output.
* @param indent indent for the XML tag.
*/ | Write out the Checkpoint to the XML stream | writeCheckpoint | {
"repo_name": "googlegsa/manager.v3",
"path": "projects/connector-manager/source/java/com/google/enterprise/connector/importexport/ImportExportConnector.java",
"license": "apache-2.0",
"size": 14081
} | [
"com.google.enterprise.connector.servlet.ServletUtil",
"java.io.PrintWriter"
] | import com.google.enterprise.connector.servlet.ServletUtil; import java.io.PrintWriter; | import com.google.enterprise.connector.servlet.*; import java.io.*; | [
"com.google.enterprise",
"java.io"
] | com.google.enterprise; java.io; | 642,870 |
public static String generateActivationKey() {
return RandomStringUtils.randomNumeric(DEF_COUNT);
} | static String function() { return RandomStringUtils.randomNumeric(DEF_COUNT); } | /**
* Generates an activation key.
*
* @return the generated activation key
*/ | Generates an activation key | generateActivationKey | {
"repo_name": "PierreBtz/build-chain-demo",
"path": "src/main/java/fr/beitz/buildchaindemo/service/util/RandomUtil.java",
"license": "mit",
"size": 896
} | [
"org.apache.commons.lang3.RandomStringUtils"
] | import org.apache.commons.lang3.RandomStringUtils; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 662,986 |
public static IBridge[] getBridges() {
ArrayList<Object> l = new ArrayList<Object>();
synchronized (bridges) {
for (Iterator<java.lang.ref.WeakReference<IBridge>> i = bridges.values().iterator(); i.hasNext();) {
IBridge o = WeakMap.getValue(i.next());
if (... | static IBridge[] function() { ArrayList<Object> l = new ArrayList<Object>(); synchronized (bridges) { for (Iterator<java.lang.ref.WeakReference<IBridge>> i = bridges.values().iterator(); i.hasNext();) { IBridge o = WeakMap.getValue(i.next()); if (o != null) { l.add(o); } } } return l.toArray(new IBridge[l.size()]); } | /**
* Returns an array of all active bridges.
*
* @return an array of <code>IBridge</code> objects
* @see com.sun.star.uno.IBridge
*
* @deprecated As of UDK 3.2.0, this method is deprecated, without
* offering a replacement.
*/ | Returns an array of all active bridges | getBridges | {
"repo_name": "qt-haiku/LibreOffice",
"path": "ridljar/com/sun/star/uno/UnoRuntime.java",
"license": "gpl-3.0",
"size": 27095
} | [
"com.sun.star.lib.util.WeakMap",
"java.util.ArrayList",
"java.util.Iterator"
] | import com.sun.star.lib.util.WeakMap; import java.util.ArrayList; import java.util.Iterator; | import com.sun.star.lib.util.*; import java.util.*; | [
"com.sun.star",
"java.util"
] | com.sun.star; java.util; | 603,678 |
public User findUser(String username) {
synchronized (users) {
return ((User) users.get(username));
}
} | User function(String username) { synchronized (users) { return ((User) users.get(username)); } } | /**
* <p>Return the existing {@link User} with the specified username,
* if any; otherwise return <code>null</code>.</p>
*
* @param username Username of the user to retrieve
*/ | Return the existing <code>User</code> with the specified username, if any; otherwise return <code>null</code> | findUser | {
"repo_name": "shuliangtao/struts-1.3.10",
"path": "src/apps/faces-example2/src/main/java/org/apache/struts/webapp/example2/memory/MemoryUserDatabase.java",
"license": "apache-2.0",
"size": 11909
} | [
"org.apache.struts.webapp.example2.User"
] | import org.apache.struts.webapp.example2.User; | import org.apache.struts.webapp.example2.*; | [
"org.apache.struts"
] | org.apache.struts; | 1,148,257 |
@Override
public void run() throws Exception
{
Map<Task, Double> rank = HEFTPlanningAlgorithm.taskRank;
cloudlet2Rank = new HashMap<Job, Double>();
List<Cloudlet> cloudletList = new ArrayList<Cloudlet>();
cloudletList = getCloudletList();
System.out.println(CloudSim.clock());
for (int i = 0; i < ... | void function() throws Exception { Map<Task, Double> rank = HEFTPlanningAlgorithm.taskRank; cloudlet2Rank = new HashMap<Job, Double>(); List<Cloudlet> cloudletList = new ArrayList<Cloudlet>(); cloudletList = getCloudletList(); System.out.println(CloudSim.clock()); for (int i = 0; i < cloudletList.size(); i++) { Cloudle... | /**
* The main function
*/ | The main function | run | {
"repo_name": "wuhanqing/WorkflowSim-1.0",
"path": "sources/org/workflowsim/scheduling/HMPCnew最近修改之前20150510.java",
"license": "lgpl-3.0",
"size": 9256
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.cloudbus.cloudsim.Cloudlet",
"org.cloudbus.cloudsim.Host",
"org.cloudbus.cloudsim.Log",
"org.cloudbus.cloudsim.core.CloudSim",
"org.workflowsim.CondorVM",
"org.workflowsim.Job",
"org.wo... | import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import org.cloudbus.cloudsim.Cloudlet; import org.cloudbus.cloudsim.Host; import org.cloudbus.cloudsim.Log; import org.cloudbus.cloudsim.core.CloudSim; import org.workflowsim.CondorVM; import... | import java.util.*; import org.cloudbus.cloudsim.*; import org.cloudbus.cloudsim.core.*; import org.workflowsim.*; import org.workflowsim.planning.*; | [
"java.util",
"org.cloudbus.cloudsim",
"org.workflowsim",
"org.workflowsim.planning"
] | java.util; org.cloudbus.cloudsim; org.workflowsim; org.workflowsim.planning; | 340,908 |
@Test
public void testAuthnRequestCreationWithSignature() throws Exception
{
SAML2Request saml2Request = new SAML2Request();
String id = IDGenerator.create("_");
String assertionConsumerURL = "http://sp";
String destination = "http://idp";
String issuerValue = "http://sp";
A... | void function() throws Exception { SAML2Request saml2Request = new SAML2Request(); String id = IDGenerator.create("_"); String assertionConsumerURL = STRhttp: String issuerValue = STRDSASTRSigned Doc:" + DocumentUtil.asString(signedDoc)); boolean isValid = XMLSignatureUtil.validate(signedDoc, kp.getPublic()); assertTru... | /**
* Test the creation of AuthnRequestType with signature creation with a private key and then validate the signature
* with a public key
*
* @throws Exception
*/ | Test the creation of AuthnRequestType with signature creation with a private key and then validate the signature with a public key | testAuthnRequestCreationWithSignature | {
"repo_name": "taylor-project/taylor-picketlink-2.0.3",
"path": "federation/picketlink-fed-api/src/test/java/org/picketlink/test/identity/federation/api/saml/v2/SignatureValidationUnitTestCase.java",
"license": "gpl-2.0",
"size": 9589
} | [
"org.junit.Assert",
"org.picketlink.identity.federation.api.saml.v2.request.SAML2Request",
"org.picketlink.identity.federation.core.saml.v2.common.IDGenerator",
"org.picketlink.identity.federation.core.saml.v2.util.DocumentUtil",
"org.picketlink.identity.federation.core.util.XMLSignatureUtil"
] | import org.junit.Assert; import org.picketlink.identity.federation.api.saml.v2.request.SAML2Request; import org.picketlink.identity.federation.core.saml.v2.common.IDGenerator; import org.picketlink.identity.federation.core.saml.v2.util.DocumentUtil; import org.picketlink.identity.federation.core.util.XMLSignatureUtil; | import org.junit.*; import org.picketlink.identity.federation.api.saml.v2.request.*; import org.picketlink.identity.federation.core.saml.v2.common.*; import org.picketlink.identity.federation.core.saml.v2.util.*; import org.picketlink.identity.federation.core.util.*; | [
"org.junit",
"org.picketlink.identity"
] | org.junit; org.picketlink.identity; | 140,477 |
public static long runMultiThreaded(Iterable<Callable<?>> calls, GridTestSafeThreadFactory threadFactory)
throws Exception {
if (!busyLock.enterBusy())
throw new IllegalStateException("Failed to start new threads (test is being stopped).");
Collection<Thread> threads = new Array... | static long function(Iterable<Callable<?>> calls, GridTestSafeThreadFactory threadFactory) throws Exception { if (!busyLock.enterBusy()) throw new IllegalStateException(STR); Collection<Thread> threads = new ArrayList<>(); long time; try { for (Callable<?> call : calls) threads.add(threadFactory.newThread(call)); time ... | /**
* Runs callable tasks each in separate threads.
*
* @param calls Callable tasks.
* @param threadFactory Thread factory.
* @return Execution time in milliseconds.
* @throws Exception If failed.
*/ | Runs callable tasks each in separate threads | runMultiThreaded | {
"repo_name": "andrey-kuznetsov/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java",
"license": "apache-2.0",
"size": 76631
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.concurrent.Callable"
] | import java.util.ArrayList; import java.util.Collection; import java.util.concurrent.Callable; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,221,841 |
void setResult(@NotNull String value); | void setResult(@NotNull String value); | /**
* Set result field value.
*
* @param value result field value
*/ | Set result field value | setResult | {
"repo_name": "akervern/che",
"path": "plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/expression/EvaluateExpressionView.java",
"license": "epl-1.0",
"size": 1973
} | [
"javax.validation.constraints.NotNull"
] | import javax.validation.constraints.NotNull; | import javax.validation.constraints.*; | [
"javax.validation"
] | javax.validation; | 2,564,881 |
default ListValue<Text> pages() {
return getListValue();
} | default ListValue<Text> pages() { return getListValue(); } | /**
* Gets the {@link ListValue} for the {@link Text} pages.
*
* @return The list value of text pages
*/ | Gets the <code>ListValue</code> for the <code>Text</code> pages | pages | {
"repo_name": "AlphaModder/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/data/manipulator/mutable/item/PagedData.java",
"license": "mit",
"size": 2242
} | [
"org.spongepowered.api.data.value.mutable.ListValue",
"org.spongepowered.api.text.Text"
] | import org.spongepowered.api.data.value.mutable.ListValue; import org.spongepowered.api.text.Text; | import org.spongepowered.api.data.value.mutable.*; import org.spongepowered.api.text.*; | [
"org.spongepowered.api"
] | org.spongepowered.api; | 519,879 |
public Set<String> getModifiedFields(); | Set<String> function(); | /**
* returns a set of modified fields in this document. (all names are lowercase)
*
* @return set of fields
*/ | returns a set of modified fields in this document. (all names are lowercase) | getModifiedFields | {
"repo_name": "mariusj/org.openntf.domino",
"path": "domino/formula/src/main/java/org/openntf/formula/ASTNode.java",
"license": "apache-2.0",
"size": 2041
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,398,606 |
private void generateMapReduceInstructions(ArrayList<Lop> execNodes,
ArrayList<Instruction> inst, ArrayList<Instruction> writeinst, ArrayList<Instruction> deleteinst, ArrayList<Instruction> rmvarinst,
JobType jt) throws LopsException, DMLRuntimeException
{
ArrayList<Byte> resultIndices = new ArrayList<Byte... | void function(ArrayList<Lop> execNodes, ArrayList<Instruction> inst, ArrayList<Instruction> writeinst, ArrayList<Instruction> deleteinst, ArrayList<Instruction> rmvarinst, JobType jt) throws LopsException, DMLRuntimeException { ArrayList<Byte> resultIndices = new ArrayList<Byte>(); ArrayList<String> inputs = new ArrayL... | /**
* Method to generate MapReduce job instructions from a given set of nodes.
*
* @param execNodes list of exec nodes
* @param inst list of instructions
* @param writeinst list of write instructions
* @param deleteinst list of delete instructions
* @param rmvarinst list of rmvar instructions
* @param ... | Method to generate MapReduce job instructions from a given set of nodes | generateMapReduceInstructions | {
"repo_name": "akchinSTC/systemml",
"path": "src/main/java/org/apache/sysml/lops/compile/Dag.java",
"license": "apache-2.0",
"size": 140926
} | [
"java.util.ArrayList",
"java.util.HashMap",
"org.apache.sysml.api.DMLScript",
"org.apache.sysml.lops.Data",
"org.apache.sysml.lops.Lop",
"org.apache.sysml.lops.LopProperties",
"org.apache.sysml.lops.LopsException",
"org.apache.sysml.parser.Expression",
"org.apache.sysml.runtime.DMLRuntimeException",... | import java.util.ArrayList; import java.util.HashMap; import org.apache.sysml.api.DMLScript; import org.apache.sysml.lops.Data; import org.apache.sysml.lops.Lop; import org.apache.sysml.lops.LopProperties; import org.apache.sysml.lops.LopsException; import org.apache.sysml.parser.Expression; import org.apache.sysml.run... | import java.util.*; import org.apache.sysml.api.*; import org.apache.sysml.lops.*; import org.apache.sysml.parser.*; import org.apache.sysml.runtime.*; import org.apache.sysml.runtime.instructions.*; import org.apache.sysml.runtime.matrix.data.*; | [
"java.util",
"org.apache.sysml"
] | java.util; org.apache.sysml; | 2,419,401 |
public static String getWindowURLWithParameter(Class windowClass, IWApplicationContext iwc, String parameterName,
String parameterValue) {
StringBuffer buffer = new StringBuffer(getWindowURL(windowClass, iwc));
if (buffer.indexOf("?") < 0) {
buffer.append('?');
}
else {
buffer.append('&');
}
buf... | static String function(Class windowClass, IWApplicationContext iwc, String parameterName, String parameterValue) { StringBuffer buffer = new StringBuffer(getWindowURL(windowClass, iwc)); if (buffer.indexOf("?") < 0) { buffer.append('?'); } else { buffer.append('&'); } buffer.append(parameterName).append('=').append(par... | /**
* Gets the URL to a (popup) Window class of class windowClass with added
* extra parameters to send to the window.
*
* @param windowClass
* the Class of the Window to instanciate
* @param iwc
* @param parameterName
* name of parameter to send
* @param parameterValue
* ... | Gets the URL to a (popup) Window class of class windowClass with added extra parameters to send to the window | getWindowURLWithParameter | {
"repo_name": "idega/com.idega.core",
"path": "src/java/com/idega/presentation/ui/Window.java",
"license": "gpl-3.0",
"size": 34050
} | [
"com.idega.idegaweb.IWApplicationContext"
] | import com.idega.idegaweb.IWApplicationContext; | import com.idega.idegaweb.*; | [
"com.idega.idegaweb"
] | com.idega.idegaweb; | 2,585,241 |
@Override
public boolean isStaticTypingFeatureSupported() throws XQException {
isClosedXQException();
return false;
} | boolean function() throws XQException { isClosedXQException(); return false; } | /** \brief Query if XQuery static typing feature is supported in this data source.
*
* @return true if so; otherwise false
* @throw XQException - if the connection is no longer valid
*/ | \brief Query if XQuery static typing feature is supported in this data source | isStaticTypingFeatureSupported | {
"repo_name": "cezarfx/zorba",
"path": "swig/xqj/ZorbaXQMetaData.java",
"license": "apache-2.0",
"size": 12891
} | [
"javax.xml.xquery.XQException"
] | import javax.xml.xquery.XQException; | import javax.xml.xquery.*; | [
"javax.xml"
] | javax.xml; | 467,301 |
@Test
public void testMoveBufferToStream() {
final int arrayOffset = 7;
final int initialPosition = 10;
final int endPadding = 5;
byte[] arrayWrapper =
new byte[arrayOffset + initialPosition + array.length + endPadding];
System.arraycopy(array, 0, arrayWrapper,
arrayOffset + init... | void function() { final int arrayOffset = 7; final int initialPosition = 10; final int endPadding = 5; byte[] arrayWrapper = new byte[arrayOffset + initialPosition + array.length + endPadding]; System.arraycopy(array, 0, arrayWrapper, arrayOffset + initialPosition, array.length); ByteBuffer buffer = ByteBuffer.wrap(arr... | /**
* Test copying to stream from buffer.
*/ | Test copying to stream from buffer | testMoveBufferToStream | {
"repo_name": "amyvmiwei/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestByteBufferUtils.java",
"license": "apache-2.0",
"size": 10188
} | [
"java.io.ByteArrayOutputStream",
"java.io.IOException",
"java.nio.ByteBuffer",
"org.junit.Assert"
] | import java.io.ByteArrayOutputStream; import java.io.IOException; import java.nio.ByteBuffer; import org.junit.Assert; | import java.io.*; import java.nio.*; import org.junit.*; | [
"java.io",
"java.nio",
"org.junit"
] | java.io; java.nio; org.junit; | 1,015,356 |
public void findPatterns() {
int n = 0;
Multimap<TripPatternKey, String> tripsForPattern = HashMultimap.create();
for (String trip_id : trips.keySet()) {
if (++n % 100000 == 0) {
LOG.info("trip {}", human(n));
}
Trip trip = trips.get(tri... | void function() { int n = 0; Multimap<TripPatternKey, String> tripsForPattern = HashMultimap.create(); for (String trip_id : trips.keySet()) { if (++n % 100000 == 0) { LOG.info(STR, human(n)); } Trip trip = trips.get(trip_id); TripPatternKey key = new TripPatternKey(trip.route_id); StreamSupport.stream(getOrderedStopTi... | /**
* Bin all trips by stop sequence and pick/drop sequences.
* @return A map from a list of stop IDs to a list of Trip IDs that visit those stops in that sequence.
*/ | Bin all trips by stop sequence and pick/drop sequences | findPatterns | {
"repo_name": "conveyal/analysis-backend",
"path": "src/main/java/com/conveyal/gtfs/GTFSFeed.java",
"license": "mit",
"size": 37582
} | [
"com.conveyal.gtfs.model.Pattern",
"com.conveyal.gtfs.model.Trip",
"com.conveyal.gtfs.util.Util",
"com.google.common.collect.HashMultimap",
"com.google.common.collect.Multimap",
"java.util.ArrayList",
"java.util.List",
"java.util.stream.Collectors",
"java.util.stream.StreamSupport"
] | import com.conveyal.gtfs.model.Pattern; import com.conveyal.gtfs.model.Trip; import com.conveyal.gtfs.util.Util; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream... | import com.conveyal.gtfs.model.*; import com.conveyal.gtfs.util.*; import com.google.common.collect.*; import java.util.*; import java.util.stream.*; | [
"com.conveyal.gtfs",
"com.google.common",
"java.util"
] | com.conveyal.gtfs; com.google.common; java.util; | 2,131,510 |
static <K, V> Set<Entry<K, V>> unmodifiableEntrySet(
Set<Entry<K, V>> entrySet) {
return new UnmodifiableEntrySet<K, V>(
Collections.unmodifiableSet(entrySet));
} | static <K, V> Set<Entry<K, V>> unmodifiableEntrySet( Set<Entry<K, V>> entrySet) { return new UnmodifiableEntrySet<K, V>( Collections.unmodifiableSet(entrySet)); } | /**
* Returns an unmodifiable view of the specified set of entries. The {@link
* Entry#setValue} operation throws an {@link UnsupportedOperationException},
* as do any operations that would modify the returned set.
*
* @param entrySet the entries for which to return an unmodifiable view
* @return an u... | Returns an unmodifiable view of the specified set of entries. The <code>Entry#setValue</code> operation throws an <code>UnsupportedOperationException</code>, as do any operations that would modify the returned set | unmodifiableEntrySet | {
"repo_name": "DaveAKing/guava-libraries",
"path": "guava/src/com/google/common/collect/Maps.java",
"license": "apache-2.0",
"size": 137526
} | [
"java.util.Collections",
"java.util.Map",
"java.util.Set"
] | import java.util.Collections; import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,784,745 |
String getterNameFromBuilderMethod(Method method) {
final String getterPrefix;
if (Arrays.stream(method.getParameterTypes())
.anyMatch(clazz -> clazz == Boolean.class || clazz == boolean.class)) {
getterPrefix = "is";
} else {
getterPrefix = "get";
... | String getterNameFromBuilderMethod(Method method) { final String getterPrefix; if (Arrays.stream(method.getParameterTypes()) .anyMatch(clazz -> clazz == Boolean.class clazz == boolean.class)) { getterPrefix = "is"; } else { getterPrefix = "get"; } return getterPrefix + toCamelCase(method.getName().replace("with", ""));... | /**
* Given a builder method having a name starting by "with"
* returns the name of a corresponding getter
* @param method The method
* @return The name of a corresponding getter
*/ | Given a builder method having a name starting by "with" returns the name of a corresponding getter | getterNameFromBuilderMethod | {
"repo_name": "plata/POL-POM-5",
"path": "phoenicis-configuration/src/main/java/org/phoenicis/configuration/localisation/LocalisationHelper.java",
"license": "gpl-3.0",
"size": 2200
} | [
"java.lang.reflect.Method",
"java.util.Arrays"
] | import java.lang.reflect.Method; import java.util.Arrays; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 2,422,577 |
public void createModel() {
URI resourceURI = EditUIUtil.getURI(getEditorInput());
Exception exception = null;
Resource resource = null;
try {
// Load the resource through the editing domain.
//
resource = editingDomain.getResourceSet().getResource(resourceURI, true);
}
catch (Exception e) {
... | void function() { URI resourceURI = EditUIUtil.getURI(getEditorInput()); Exception exception = null; Resource resource = null; try { } catch (Exception e) { exception = e; resource = editingDomain.getResourceSet().getResource(resourceURI, false); } Diagnostic diagnostic = analyzeResourceProblems(resource, exception); i... | /**
* This is the method called to load a resource into the editing domain's resource set based on the editor's input.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This is the method called to load a resource into the editing domain's resource set based on the editor's input. | createModel | {
"repo_name": "andyed2003/teamwork",
"path": "other/ac.soton.compositionmodel.emf.editor/src/ComposedMachine/presentation/ComposedMachineEditor.java",
"license": "epl-1.0",
"size": 54449
} | [
"org.eclipse.emf.common.util.Diagnostic",
"org.eclipse.emf.ecore.resource.Resource",
"org.eclipse.emf.edit.ui.util.EditUIUtil"
] | import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.edit.ui.util.EditUIUtil; | import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.resource.*; import org.eclipse.emf.edit.ui.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,401,744 |
private synchronized void updateLabelsOnNode(NodeId nodeId,
Set<String> newLabels) {
FiCaSchedulerNode node = nodes.get(nodeId);
if (null == node) {
return;
}
// labels is same, we don't need do update
if (node.getLabels().size() == newLabels.size()
&& node.getLabels().con... | synchronized void function(NodeId nodeId, Set<String> newLabels) { FiCaSchedulerNode node = nodes.get(nodeId); if (null == node) { return; } if (node.getLabels().size() == newLabels.size() && node.getLabels().containsAll(newLabels)) { return; } for (RMContainer rmContainer : node.getRunningContainers()) { ContainerId c... | /**
* Process node labels update on a node.
*
* TODO: Currently capacity scheduler will kill containers on a node when
* labels on the node changed. It is a simply solution to ensure guaranteed
* capacity on labels of queues. When YARN-2498 completed, we can let
* preemption policy to decide if such ... | Process node labels update on a node. labels on the node changed. It is a simply solution to ensure guaranteed capacity on labels of queues. When YARN-2498 completed, we can let preemption policy to decide if such containers need to be killed or just keep them running | updateLabelsOnNode | {
"repo_name": "skinzer/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java",
"license": "apache-2.0",
"size": 68711
} | [
"java.util.Set",
"org.apache.hadoop.yarn.api.records.ContainerExitStatus",
"org.apache.hadoop.yarn.api.records.ContainerId",
"org.apache.hadoop.yarn.api.records.ContainerState",
"org.apache.hadoop.yarn.api.records.ContainerStatus",
"org.apache.hadoop.yarn.api.records.NodeId",
"org.apache.hadoop.yarn.ser... | import java.util.Set; import org.apache.hadoop.yarn.api.records.ContainerExitStatus; import org.apache.hadoop.yarn.api.records.ContainerId; import org.apache.hadoop.yarn.api.records.ContainerState; import org.apache.hadoop.yarn.api.records.ContainerStatus; import org.apache.hadoop.yarn.api.records.NodeId; import org.ap... | import java.util.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.*; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,054,826 |
@Override
protected Map<String, Object> transform(final FileAsset fileAsset,
final Map<String, Object> map,
final Set<TransformOptions> options, final User user) throws DotDataException {
if(isNotSet(fileAsset.getTitle())) {
final Identifier identifier = toolBox.iden... | Map<String, Object> function(final FileAsset fileAsset, final Map<String, Object> map, final Set<TransformOptions> options, final User user) throws DotDataException { if(isNotSet(fileAsset.getTitle())) { final Identifier identifier = toolBox.identifierAPI.find(fileAsset.getIdentifier()); map.put(TITLE_FIELD, identifier... | /**
* Transform entry point
* @param fileAsset
* @param map
* @param options
* @param user
* @return
* @throws DotDataException
*/ | Transform entry point | transform | {
"repo_name": "dotCMS/core",
"path": "dotCMS/src/main/java/com/dotmarketing/portlets/contentlet/transform/strategy/FileAssetViewStrategy.java",
"license": "gpl-3.0",
"size": 5035
} | [
"com.dotmarketing.beans.Identifier",
"com.dotmarketing.exception.DotDataException",
"com.dotmarketing.portlets.fileassets.business.FileAsset",
"com.dotmarketing.util.Logger",
"com.dotmarketing.util.UtilHTML",
"com.dotmarketing.util.UtilMethods",
"com.liferay.portal.model.User",
"java.util.Map",
"jav... | import com.dotmarketing.beans.Identifier; import com.dotmarketing.exception.DotDataException; import com.dotmarketing.portlets.fileassets.business.FileAsset; import com.dotmarketing.util.Logger; import com.dotmarketing.util.UtilHTML; import com.dotmarketing.util.UtilMethods; import com.liferay.portal.model.User; import... | import com.dotmarketing.beans.*; import com.dotmarketing.exception.*; import com.dotmarketing.portlets.fileassets.business.*; import com.dotmarketing.util.*; import com.liferay.portal.model.*; import java.util.*; | [
"com.dotmarketing.beans",
"com.dotmarketing.exception",
"com.dotmarketing.portlets",
"com.dotmarketing.util",
"com.liferay.portal",
"java.util"
] | com.dotmarketing.beans; com.dotmarketing.exception; com.dotmarketing.portlets; com.dotmarketing.util; com.liferay.portal; java.util; | 2,334,216 |
private void processAssociation(CQLAssociatedObject association, StringBuilder hql, List<java.lang.Object> parameters,
Stack<CQLAssociatedObject> associationStack, List<CqlDataBucket> typesProcessingList,
CQLObject sourceQueryObject, String sourceAlias) throws QueryTranslationException {
LOG... | void function(CQLAssociatedObject association, StringBuilder hql, List<java.lang.Object> parameters, Stack<CQLAssociatedObject> associationStack, List<CqlDataBucket> typesProcessingList, CQLObject sourceQueryObject, String sourceAlias) throws QueryTranslationException { LOG.debug(STR + sourceQueryObject.getClassName() ... | /**
* Processes CQL associations into HQL
*
* @param association
* The CQL association
* @param hql
* The HQL fragment which will be edited
* @param parameters
* The positional HQL query parameters
* @param associationTrace
* The trace of associations
* @param sourceClassName
*... | Processes CQL associations into HQL | processAssociation | {
"repo_name": "NCIP/cagrid-core",
"path": "caGrid/projects/sdkQuery44/src/java/translator/org/cagrid/data/sdkquery44/translator/cql2/CQL2ToParameterizedHQL.java",
"license": "bsd-3-clause",
"size": 48447
} | [
"java.util.List",
"java.util.Stack",
"org.cagrid.cql2.CQLAssociatedObject",
"org.cagrid.cql2.CQLObject",
"org.cagrid.data.sdkquery44.translator.CqlDataBucket",
"org.cagrid.data.sdkquery44.translator.DatatypeFlavor",
"org.cagrid.data.sdkquery44.translator.QueryTranslationException",
"org.cagrid.data.sd... | import java.util.List; import java.util.Stack; import org.cagrid.cql2.CQLAssociatedObject; import org.cagrid.cql2.CQLObject; import org.cagrid.data.sdkquery44.translator.CqlDataBucket; import org.cagrid.data.sdkquery44.translator.DatatypeFlavor; import org.cagrid.data.sdkquery44.translator.QueryTranslationException; im... | import java.util.*; import org.cagrid.cql2.*; import org.cagrid.data.sdkquery44.translator.*; | [
"java.util",
"org.cagrid.cql2",
"org.cagrid.data"
] | java.util; org.cagrid.cql2; org.cagrid.data; | 2,674,069 |
protected boolean checkEmptyValue(Object valueToTest) {
boolean success = true;
// if its not a string, only fail if its a null object
if (valueToTest == null) {
success = false;
} else {
// test for null, empty-string, or whitespace if its a string
... | boolean function(Object valueToTest) { boolean success = true; if (valueToTest == null) { success = false; } else { if (valueToTest instanceof String) { if (StringUtils.isBlank((String) valueToTest)) { success = false; } } } return success; } | /**
* This method accepts document field (such as , and attempts to determine whether it is empty by this method's
* definition.
*
* OBJECT RESULT null false empty-string false whitespace false otherwise true
*
* It will the result as a boolean
*
* @param valueToTest - an... | This method accepts document field (such as , and attempts to determine whether it is empty by this method's definition. OBJECT RESULT null false empty-string false whitespace false otherwise true It will the result as a boolean | checkEmptyValue | {
"repo_name": "sbower/kuali-rice-1",
"path": "krad/krad-web-framework/src/main/java/org/kuali/rice/krad/rules/MaintenanceDocumentRuleBase.java",
"license": "apache-2.0",
"size": 61237
} | [
"org.apache.commons.lang.StringUtils"
] | import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 956,606 |
@Test
public void testNextSimStepGoesToOne() throws IOException {
conn.nextSimStep();
assertEquals(1000, conn.getCurrentSimTime());
}
| void function() throws IOException { conn.nextSimStep(); assertEquals(1000, conn.getCurrentSimTime()); } | /**
* Calling {@link SumoTraciConnection#nextSimStep()} should move to
* simulation step one.
*
* @throws IOException
*/ | Calling <code>SumoTraciConnection#nextSimStep()</code> should move to simulation step one | testNextSimStepGoesToOne | {
"repo_name": "702nADOS/sumo",
"path": "tools/contributed/traci4j/test/java/it/polito/appeal/traci/test/TraCITest.java",
"license": "gpl-3.0",
"size": 32242
} | [
"java.io.IOException",
"org.junit.Assert"
] | import java.io.IOException; import org.junit.Assert; | import java.io.*; import org.junit.*; | [
"java.io",
"org.junit"
] | java.io; org.junit; | 1,797,868 |
public int readAll(final byte[] data, final int offset, final int len) throws IOException {
checkOpened();
int count = 0;
while (count < len) {
int n = dis.read(data, count + offset, len - count);
if (n < 0) break;
else count += n;
}
return count;
} | int function(final byte[] data, final int offset, final int len) throws IOException { checkOpened(); int count = 0; while (count < len) { int n = dis.read(data, count + offset, len - count); if (n < 0) break; else count += n; } return count; } | /**
* Read <code>len</code> bytes from a TCP connection into a byte array, starting
* at position <code>offset</code> in that array.
* This method blocks until at least one byte of data is received.
* @param data an array of bytes into which the data is stored.
* @param offset the position where to start... | Read <code>len</code> bytes from a TCP connection into a byte array, starting at position <code>offset</code> in that array. This method blocks until at least one byte of data is received | readAll | {
"repo_name": "lolocohen/forwarder4j",
"path": "forwarder4j/src/main/java/org/forwarder4j/SocketWrapper.java",
"license": "apache-2.0",
"size": 8859
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 69,978 |
ClientOverrideConfiguration overrideConfiguration(); | ClientOverrideConfiguration overrideConfiguration(); | /**
* Retrieve the current override configuration. This allows further overrides across calls. Can be modified by first
* converting to a builder with {@link ClientOverrideConfiguration#toBuilder()}.
* @return The existing override configuration for the builder.
*/ | Retrieve the current override configuration. This allows further overrides across calls. Can be modified by first converting to a builder with <code>ClientOverrideConfiguration#toBuilder()</code> | overrideConfiguration | {
"repo_name": "aws/aws-sdk-java-v2",
"path": "core/sdk-core/src/main/java/software/amazon/awssdk/core/client/builder/SdkClientBuilder.java",
"license": "apache-2.0",
"size": 2711
} | [
"software.amazon.awssdk.core.client.config.ClientOverrideConfiguration"
] | import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration; | import software.amazon.awssdk.core.client.config.*; | [
"software.amazon.awssdk"
] | software.amazon.awssdk; | 1,904,201 |
Element recreate(Element original, Element oldRoot, Element newRoot) {
Element parent = original.getParentElement() == oldRoot ? newRoot : recreate(original.getParentElement(), oldRoot, newRoot);
Element clone = document.createElement(original.getLocalName());
// TODO: copy attributes;
parent.insertBefore... | Element recreate(Element original, Element oldRoot, Element newRoot) { Element parent = original.getParentElement() == oldRoot ? newRoot : recreate(original.getParentElement(), oldRoot, newRoot); Element clone = document.createElement(original.getLocalName()); parent.insertBefore(clone, null); return clone; } | /**
* Re-creates the given descendant of oldRoot as a new descendant of newRoot. Used when text elements are interrupted by
* components.
*/ | Re-creates the given descendant of oldRoot as a new descendant of newRoot. Used when text elements are interrupted by components | recreate | {
"repo_name": "stefanhaustein/nativehtml",
"path": "shared/src/main/java/org/kobjects/nativehtml/io/HtmlParser.java",
"license": "apache-2.0",
"size": 9299
} | [
"org.kobjects.nativehtml.dom.Element"
] | import org.kobjects.nativehtml.dom.Element; | import org.kobjects.nativehtml.dom.*; | [
"org.kobjects.nativehtml"
] | org.kobjects.nativehtml; | 28,786 |
public void addCredentials(HomeServerConnectionConfig config) {
if (null != config && config.getCredentials() != null) {
SharedPreferences prefs = mContext.getSharedPreferences(PREFS_LOGIN, Context.MODE_PRIVATE);
SharedPreferences.Editor editor = prefs.edit();
List<HomeS... | void function(HomeServerConnectionConfig config) { if (null != config && config.getCredentials() != null) { SharedPreferences prefs = mContext.getSharedPreferences(PREFS_LOGIN, Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); List<HomeServerConnectionConfig> configs = getCredentialsList(); configs... | /**
* Add a credentials to the credentials list
*
* @param config the home server config to add.
*/ | Add a credentials to the credentials list | addCredentials | {
"repo_name": "vector-im/vector-android",
"path": "vector/src/main/java/im/vector/store/LoginStorage.java",
"license": "apache-2.0",
"size": 7239
} | [
"android.content.Context",
"android.content.SharedPreferences",
"java.util.ArrayList",
"java.util.List",
"org.json.JSONArray",
"org.json.JSONException",
"org.json.JSONObject",
"org.matrix.androidsdk.HomeServerConnectionConfig",
"org.matrix.androidsdk.core.Log"
] | import android.content.Context; import android.content.SharedPreferences; import java.util.ArrayList; import java.util.List; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.matrix.androidsdk.HomeServerConnectionConfig; import org.matrix.androidsdk.core.Log; | import android.content.*; import java.util.*; import org.json.*; import org.matrix.androidsdk.*; import org.matrix.androidsdk.core.*; | [
"android.content",
"java.util",
"org.json",
"org.matrix.androidsdk"
] | android.content; java.util; org.json; org.matrix.androidsdk; | 1,078,441 |
public Object getValue()
{
NamePair p = (NamePair)getSelectedItem();
if (p == null)
return null;
//
if (p instanceof KeyNamePair)
{
if (p.getID() == null) // -1 return null
return null;
return new Integer(((KeyNamePair)p).getID());
}
return p.getID();
} // getValue
| Object function() { NamePair p = (NamePair)getSelectedItem(); if (p == null) return null; if (p instanceof KeyNamePair) { if (p.getID() == null) return null; return new Integer(((KeyNamePair)p).getID()); } return p.getID(); } | /**
* Get Value
* @return key as Integer or String value
*/ | Get Value | getValue | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempiere_360/client/src/org/compiere/grid/ed/VComboBox.java",
"license": "gpl-2.0",
"size": 4635
} | [
"org.compiere.util.KeyNamePair",
"org.compiere.util.NamePair"
] | import org.compiere.util.KeyNamePair; import org.compiere.util.NamePair; | import org.compiere.util.*; | [
"org.compiere.util"
] | org.compiere.util; | 422,096 |
public static HttpURLConnection deleteMessage(final URI uri, final QueueRequestOptions queueOptions,
final OperationContext opContext, final String popReceipt) throws URISyntaxException, IOException,
StorageException {
final UriQueryBuilder builder = new UriQueryBuilder();
b... | static HttpURLConnection function(final URI uri, final QueueRequestOptions queueOptions, final OperationContext opContext, final String popReceipt) throws URISyntaxException, IOException, StorageException { final UriQueryBuilder builder = new UriQueryBuilder(); builder.add(POP_RECEIPT, popReceipt); final HttpURLConnect... | /**
* Constructs a web request to delete a message from the queue. Sign the web
* request with a length of -1L.
*
* @param uri
* A <code>URI</code> object that specifies the absolute URI to
* the queue.
* @param queueOptions
* A {@link QueueReque... | Constructs a web request to delete a message from the queue. Sign the web request with a length of -1L | deleteMessage | {
"repo_name": "horizon-institute/runspotrun-android-client",
"path": "src/com/microsoft/azure/storage/queue/QueueRequest.java",
"license": "agpl-3.0",
"size": 29973
} | [
"com.microsoft.azure.storage.Constants",
"com.microsoft.azure.storage.OperationContext",
"com.microsoft.azure.storage.StorageException",
"com.microsoft.azure.storage.core.BaseRequest",
"com.microsoft.azure.storage.core.UriQueryBuilder",
"java.io.IOException",
"java.net.HttpURLConnection",
"java.net.UR... | import com.microsoft.azure.storage.Constants; import com.microsoft.azure.storage.OperationContext; import com.microsoft.azure.storage.StorageException; import com.microsoft.azure.storage.core.BaseRequest; import com.microsoft.azure.storage.core.UriQueryBuilder; import java.io.IOException; import java.net.HttpURLConnect... | import com.microsoft.azure.storage.*; import com.microsoft.azure.storage.core.*; import java.io.*; import java.net.*; | [
"com.microsoft.azure",
"java.io",
"java.net"
] | com.microsoft.azure; java.io; java.net; | 639,623 |
public static void copyTextResourceToWriter(String resourceId,
PrintWriter out)
throws IOException
{
copyReaderToWriter(new LineNumberReader(new InputStreamReader(
ClassLoader.getSystemResourceAsStream(
... | static void function(String resourceId, PrintWriter out) throws IOException { copyReaderToWriter(new LineNumberReader(new InputStreamReader( ClassLoader.getSystemResourceAsStream( resourceId))), out); } | /**
* Copy the contents of the specified resource, which should be plain
* text in the local system's default encoding, to the given PrintWriter,
* using local system appropriate line termination.
*
* @throws NullPointerException if either argument is null.
* @throws IOException
*/ | Copy the contents of the specified resource, which should be plain text in the local system's default encoding, to the given PrintWriter, using local system appropriate line termination | copyTextResourceToWriter | {
"repo_name": "cogtool/cogtool",
"path": "java/edu/cmu/cs/hcii/cogtool/util/FileUtil.java",
"license": "lgpl-2.1",
"size": 14514
} | [
"java.io.IOException",
"java.io.InputStreamReader",
"java.io.LineNumberReader",
"java.io.PrintWriter"
] | import java.io.IOException; import java.io.InputStreamReader; import java.io.LineNumberReader; import java.io.PrintWriter; | import java.io.*; | [
"java.io"
] | java.io; | 1,226,022 |
public static BufferedReader reader(InputStream in) {
return new BufferedReader(
new InputStreamReader(in, StandardCharsets.UTF_8));
} | static BufferedReader function(InputStream in) { return new BufferedReader( new InputStreamReader(in, StandardCharsets.UTF_8)); } | /** Creates a {@link BufferedReader} to a given input stream using UTF-8
* character set.
*
* <p>Does not use the default character set. */ | Creates a <code>BufferedReader</code> to a given input stream using UTF-8 character set | reader | {
"repo_name": "julianhyde/calcite",
"path": "core/src/main/java/org/apache/calcite/util/Util.java",
"license": "apache-2.0",
"size": 86163
} | [
"java.io.BufferedReader",
"java.io.InputStream",
"java.io.InputStreamReader",
"java.nio.charset.StandardCharsets"
] | import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; | import java.io.*; import java.nio.charset.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 2,675,799 |
public PortConfig getPortConfig(short portId){
if(this.sw == null){
throw new IllegalStateException("Switch not connected so we don't know the port id");
}
ImmutablePort thisPort = this.sw.getPort(portId);
if(thisPort == null){
log.info("Port: " + portId + " was not found on this switch.");
retu... | PortConfig function(short portId){ if(this.sw == null){ throw new IllegalStateException(STR); } ImmutablePort thisPort = this.sw.getPort(portId); if(thisPort == null){ log.info(STR + portId + STR); return null; } log.debug(STR + thisPort.getName()); if(portList.containsKey(thisPort.getName())){ return portList.get(this... | /**
* returns the <PortConfig> object for a given port
* based on the portId specified where portId is the
* openflow identifier for the port
* If the switch is null (not connected) or the port is
* not found, the return result will be null
* @param portId the openflow port id
**/ | returns the object for a given port based on the portId specified where portId is the openflow identifier for the port If the switch is null (not connected) or the port is not found, the return result will be null | getPortConfig | {
"repo_name": "ajragusa/FlowSpaceFirewall",
"path": "src/main/java/edu/iu/grnoc/flowspace_firewall/VLANSlicer.java",
"license": "apache-2.0",
"size": 37059
} | [
"net.floodlightcontroller.core.ImmutablePort"
] | import net.floodlightcontroller.core.ImmutablePort; | import net.floodlightcontroller.core.*; | [
"net.floodlightcontroller.core"
] | net.floodlightcontroller.core; | 171,141 |
public void setFontSize(int fontSize) {
m_FontSize = fontSize;
StyleConstants.setFontSize(DEFAULT_NORMAL, fontSize);
StyleConstants.setFontSize(DEFAULT_STRING, fontSize);
StyleConstants.setFontSize(DEFAULT_COMMENT, fontSize);
} | void function(int fontSize) { m_FontSize = fontSize; StyleConstants.setFontSize(DEFAULT_NORMAL, fontSize); StyleConstants.setFontSize(DEFAULT_STRING, fontSize); StyleConstants.setFontSize(DEFAULT_COMMENT, fontSize); } | /**
* sets the current font size (affects all built-in styles).
*
* @param fontSize
* the size
*/ | sets the current font size (affects all built-in styles) | setFontSize | {
"repo_name": "automenta/adams-core",
"path": "src/main/java/adams/gui/scripting/SyntaxDocument.java",
"license": "gpl-3.0",
"size": 36185
} | [
"javax.swing.text.StyleConstants"
] | import javax.swing.text.StyleConstants; | import javax.swing.text.*; | [
"javax.swing"
] | javax.swing; | 2,007,947 |
public static Observable<Project> byId(Credential _credentials, String _id) {
return new RequestBuilder("/cloud/project/" + _id, Method.GET, _credentials)
.build()
.flatMap((SafeResponse arg0) -> arg0.validateResponse(JSONObject.class))
.map((JSONObject projec... | static Observable<Project> function(Credential _credentials, String _id) { return new RequestBuilder(STR + _id, Method.GET, _credentials) .build() .flatMap((SafeResponse arg0) -> arg0.validateResponse(JSONObject.class)) .map((JSONObject project) -> new Project(_credentials, project.getString(STR), project.getString(STR... | /**
* Loads a Project by its id
*
* @param _credentials The credentials to use to load the project
* @param _id the Project id
*
* @return an observable project object
*/ | Loads a Project by its id | byId | {
"repo_name": "cambierr/OvhApi",
"path": "src/main/java/com/github/cambierr/ovhapi/cloud/Project.java",
"license": "mit",
"size": 9987
} | [
"com.github.cambierr.ovhapi.auth.Credential",
"com.github.cambierr.ovhapi.common.Method",
"com.github.cambierr.ovhapi.common.OvhApi",
"com.github.cambierr.ovhapi.common.RequestBuilder",
"com.github.cambierr.ovhapi.common.SafeResponse",
"org.json.JSONObject"
] | import com.github.cambierr.ovhapi.auth.Credential; import com.github.cambierr.ovhapi.common.Method; import com.github.cambierr.ovhapi.common.OvhApi; import com.github.cambierr.ovhapi.common.RequestBuilder; import com.github.cambierr.ovhapi.common.SafeResponse; import org.json.JSONObject; | import com.github.cambierr.ovhapi.auth.*; import com.github.cambierr.ovhapi.common.*; import org.json.*; | [
"com.github.cambierr",
"org.json"
] | com.github.cambierr; org.json; | 2,840,267 |
public Frame getFrame() {
return frame;
}
} | Frame function() { return frame; } } | /**
* Gets a frame.
*
* @return Frame.
*/ | Gets a frame | getFrame | {
"repo_name": "INDExOS/media-for-mobile",
"path": "domain/src/main/java/org/m4m/IRecognitionPlugin.java",
"license": "apache-2.0",
"size": 2649
} | [
"org.m4m.domain.Frame"
] | import org.m4m.domain.Frame; | import org.m4m.domain.*; | [
"org.m4m.domain"
] | org.m4m.domain; | 1,597,593 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.