method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public EntitlementPersistence getEntitlementPersistence() {
return entitlementPersistence;
} | EntitlementPersistence function() { return entitlementPersistence; } | /**
* Returns the entitlement persistence.
*
* @return the entitlement persistence
*/ | Returns the entitlement persistence | getEntitlementPersistence | {
"repo_name": "fraunhoferfokus/govapps",
"path": "data-portlet/src/main/java/de/fraunhofer/fokus/movepla/service/base/MultiMediaServiceBaseImpl.java",
"license": "bsd-3-clause",
"size": 32769
} | [
"de.fraunhofer.fokus.movepla.service.persistence.EntitlementPersistence"
] | import de.fraunhofer.fokus.movepla.service.persistence.EntitlementPersistence; | import de.fraunhofer.fokus.movepla.service.persistence.*; | [
"de.fraunhofer.fokus"
] | de.fraunhofer.fokus; | 119,616 |
public String[] getDirectoryNames(ObjectId id_directory) throws KettleException;
/////////////////////////////////////////////////////////////////////////////////////////////////
// Logging...
///////////////////////////////////////////////////////////////////////////////////////////////// | String[] function(ObjectId id_directory) throws KettleException; | /**
* Returns the child directory names of a parent directory
*
* @param id_directory parent directory id
* @return array of child names
* @throws KettleException
*/ | Returns the child directory names of a parent directory | getDirectoryNames | {
"repo_name": "juanmjacobs/kettle",
"path": "src/org/pentaho/di/repository/Repository.java",
"license": "lgpl-2.1",
"size": 25729
} | [
"org.pentaho.di.core.exception.KettleException"
] | import org.pentaho.di.core.exception.KettleException; | import org.pentaho.di.core.exception.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 2,220,116 |
public void resetJob(JobKey jobKey) throws SchedulerException {
Check.notNull(jobKey, "Job must not be null!");
unscheduleJob(jobKey);
cleanUpJob(jobKey);
} | void function(JobKey jobKey) throws SchedulerException { Check.notNull(jobKey, STR); unscheduleJob(jobKey); cleanUpJob(jobKey); } | /**
* Unschedules and interrupts a job. All temporary files will be deleted.
*
* @param jobKey Job to reset
* @throws SchedulerException On error while unscheduling, interrupting or cleaning up.
* @DBC JobKey must not be null!
*/ | Unschedules and interrupts a job. All temporary files will be deleted | resetJob | {
"repo_name": "Deutsche-Digitale-Bibliothek/ddb-backend",
"path": "JobSchedulerServer/src/main/java/de/fhg/iais/cortex/jobscheduler/quartz/QuartzScheduler.java",
"license": "apache-2.0",
"size": 8671
} | [
"de.fhg.iais.commons.dbc.Check",
"org.quartz.JobKey",
"org.quartz.SchedulerException"
] | import de.fhg.iais.commons.dbc.Check; import org.quartz.JobKey; import org.quartz.SchedulerException; | import de.fhg.iais.commons.dbc.*; import org.quartz.*; | [
"de.fhg.iais",
"org.quartz"
] | de.fhg.iais; org.quartz; | 926,477 |
protected void processKeyEvent(KeyEvent evt) {
MenuSelectionManager.defaultManager().processKeyEvent(evt);
if (evt.isConsumed()) {
return;
}
super.processKeyEvent(evt);
} | void function(KeyEvent evt) { MenuSelectionManager.defaultManager().processKeyEvent(evt); if (evt.isConsumed()) { return; } super.processKeyEvent(evt); } | /**
* Processes key stroke events such as mnemonics and accelerators.
*
* @param evt the key event to be processed
*/ | Processes key stroke events such as mnemonics and accelerators | processKeyEvent | {
"repo_name": "mirkosertic/Bytecoder",
"path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/javax/swing/JPopupMenu.java",
"license": "apache-2.0",
"size": 53892
} | [
"java.awt.event.KeyEvent"
] | import java.awt.event.KeyEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 2,135,127 |
GraphHeadHandler applyQuery(ElementQuery<HBaseElementFilter<EPGMGraphHead>> query); | GraphHeadHandler applyQuery(ElementQuery<HBaseElementFilter<EPGMGraphHead>> query); | /**
* Applies the given ElementQuery to the handler.
*
* @param query the element query to apply
* @return the GraphHeadHandler instance with the query applied
*/ | Applies the given ElementQuery to the handler | applyQuery | {
"repo_name": "galpha/gradoop",
"path": "gradoop-store/gradoop-hbase/src/main/java/org/gradoop/storage/hbase/impl/api/GraphHeadHandler.java",
"license": "apache-2.0",
"size": 2132
} | [
"org.gradoop.common.model.impl.pojo.EPGMGraphHead",
"org.gradoop.storage.common.predicate.query.ElementQuery",
"org.gradoop.storage.hbase.impl.predicate.filter.api.HBaseElementFilter"
] | import org.gradoop.common.model.impl.pojo.EPGMGraphHead; import org.gradoop.storage.common.predicate.query.ElementQuery; import org.gradoop.storage.hbase.impl.predicate.filter.api.HBaseElementFilter; | import org.gradoop.common.model.impl.pojo.*; import org.gradoop.storage.common.predicate.query.*; import org.gradoop.storage.hbase.impl.predicate.filter.api.*; | [
"org.gradoop.common",
"org.gradoop.storage"
] | org.gradoop.common; org.gradoop.storage; | 1,382,507 |
protected void sequence_Model(EObject context, Model semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
| void function(EObject context, Model semanticObject) { genericSequencer.createSequence(context, semanticObject); } | /**
* Constraint:
* tests+=Test*
*/ | Constraint: tests+=Test | sequence_Model | {
"repo_name": "crapo/sadlos2",
"path": "com.ge.research.sadl.testsuite/src-gen/com/ge/research/sadl/testsuite/serializer/TestSuiteSemanticSequencer.java",
"license": "epl-1.0",
"size": 2874
} | [
"com.ge.research.sadl.testsuite.testSuite.Model",
"org.eclipse.emf.ecore.EObject"
] | import com.ge.research.sadl.testsuite.testSuite.Model; import org.eclipse.emf.ecore.EObject; | import com.ge.research.sadl.testsuite.*; import org.eclipse.emf.ecore.*; | [
"com.ge.research",
"org.eclipse.emf"
] | com.ge.research; org.eclipse.emf; | 2,585,486 |
protected JavaFileObject createFile() {
JavaFileObject result = null;
Filer filer = processingEnvironment.getFiler();
try {
result = filer.createSourceFile(getModelClassName());
} catch (IOException e) {
logger.log(Diagnostic.Kind.ERROR, "create source file fa... | JavaFileObject function() { JavaFileObject result = null; Filer filer = processingEnvironment.getFiler(); try { result = filer.createSourceFile(getModelClassName()); } catch (IOException e) { logger.log(Diagnostic.Kind.ERROR, STR); e.printStackTrace(); } return result; } | /**
* create a Java source file
*
* @return
*/ | create a Java source file | createFile | {
"repo_name": "simplify20/PowerfulRecyclerViewAdapter",
"path": "holder-compiler/src/main/java/com/steve/creact/processor/core/view/BaseViewGenerator.java",
"license": "apache-2.0",
"size": 6140
} | [
"java.io.IOException",
"javax.annotation.processing.Filer",
"javax.tools.Diagnostic",
"javax.tools.JavaFileObject"
] | import java.io.IOException; import javax.annotation.processing.Filer; import javax.tools.Diagnostic; import javax.tools.JavaFileObject; | import java.io.*; import javax.annotation.processing.*; import javax.tools.*; | [
"java.io",
"javax.annotation",
"javax.tools"
] | java.io; javax.annotation; javax.tools; | 1,445,703 |
public Boolean getUsesStringBinding() {
if (!(getSession().getDatasourceLogin() instanceof DatabaseLogin)) {
return Boolean.FALSE;
}
return Boolean.valueOf(((DatabaseLogin)getSession().getDatasourceLogin()).getPlatform().usesStringBinding());
} | Boolean function() { if (!(getSession().getDatasourceLogin() instanceof DatabaseLogin)) { return Boolean.FALSE; } return Boolean.valueOf(((DatabaseLogin)getSession().getDatasourceLogin()).getPlatform().usesStringBinding()); } | /**
* This method indicates if Strings are being bound
*/ | This method indicates if Strings are being bound | getUsesStringBinding | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/services/RuntimeServices.java",
"license": "epl-1.0",
"size": 71352
} | [
"org.eclipse.persistence.sessions.DatabaseLogin"
] | import org.eclipse.persistence.sessions.DatabaseLogin; | import org.eclipse.persistence.sessions.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 627,963 |
if (input == null || input.size() == 0)
return null;
try {
Object objGeometry = input.get(0);
Geometry geometry = _geometryParser.parseGeometry(objGeometry);
Coordinate centroid = geometry.getCentroid().getCoordinate();
Coordinate[] vertices = geometry.getCoordinate... | if (input == null input.size() == 0) return null; try { Object objGeometry = input.get(0); Geometry geometry = _geometryParser.parseGeometry(objGeometry); Coordinate centroid = geometry.getCentroid().getCoordinate(); Coordinate[] vertices = geometry.getCoordinates(); double sum = 0.0; for (int v=0; v<vertices.length; v... | /**
* Method invoked on every tuple during foreach evaluation.
* @param input tuple<br>
* first column is assumed to have a geometry
* @exception java.io.IOException
* @return gyration radius of the geometry
*/ | Method invoked on every tuple during foreach evaluation | exec | {
"repo_name": "prashant003/interimage-2",
"path": "interimage-geometry/src/main/java/br/puc_rio/ele/lvc/interimage/geometry/udf/GyrationRadius.java",
"license": "apache-2.0",
"size": 2442
} | [
"com.vividsolutions.jts.geom.Coordinate",
"com.vividsolutions.jts.geom.Geometry",
"java.io.IOException"
] | import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.Geometry; import java.io.IOException; | import com.vividsolutions.jts.geom.*; import java.io.*; | [
"com.vividsolutions.jts",
"java.io"
] | com.vividsolutions.jts; java.io; | 6,208 |
public final Property<UniqueId> uniqueId() {
return metaBean().uniqueId().createProperty(this);
} | final Property<UniqueId> function() { return metaBean().uniqueId().createProperty(this); } | /**
* Gets the the {@code uniqueId} property.
* This field is managed by the master but must be set for updates.
* @return the property, not null
*/ | Gets the the uniqueId property. This field is managed by the master but must be set for updates | uniqueId | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Master/src/main/java/com/opengamma/master/legalentity/LegalEntityDocument.java",
"license": "apache-2.0",
"size": 9174
} | [
"com.opengamma.id.UniqueId",
"org.joda.beans.Property"
] | import com.opengamma.id.UniqueId; import org.joda.beans.Property; | import com.opengamma.id.*; import org.joda.beans.*; | [
"com.opengamma.id",
"org.joda.beans"
] | com.opengamma.id; org.joda.beans; | 1,265,824 |
public static void setController(ServletRequest req, CmsFlexController controller) {
req.setAttribute(CmsFlexController.ATTRIBUTE_NAME, controller);
} | static void function(ServletRequest req, CmsFlexController controller) { req.setAttribute(CmsFlexController.ATTRIBUTE_NAME, controller); } | /**
* Stores the given controller in the given request (using a request attribute).<p>
*
* @param req the request where to store the controller in
* @param controller the controller to store
*/ | Stores the given controller in the given request (using a request attribute) | setController | {
"repo_name": "it-tavis/opencms-core",
"path": "src/org/opencms/flex/CmsFlexController.java",
"license": "lgpl-2.1",
"size": 25408
} | [
"javax.servlet.ServletRequest"
] | import javax.servlet.ServletRequest; | import javax.servlet.*; | [
"javax.servlet"
] | javax.servlet; | 968,403 |
EAttribute getWMLExpression__DefinitionOffset(); | EAttribute getWMLExpression__DefinitionOffset(); | /**
* Returns the meta object for the attribute '{@link org.wesnoth.wml.WMLExpression#get_DefinitionOffset <em>Definition Offset</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Definition Offset</em>'.
* @see org.wesnoth.wml.WMLExpression#get_Def... | Returns the meta object for the attribute '<code>org.wesnoth.wml.WMLExpression#get_DefinitionOffset Definition Offset</code>'. | getWMLExpression__DefinitionOffset | {
"repo_name": "jstitch/wesnoth",
"path": "utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/wml/WmlPackage.java",
"license": "gpl-2.0",
"size": 61552
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 541,349 |
public static VariationPoint getMethodAddSameParamCase(VariabilityType variabilityType) throws Exception {
VariationPointModel vpm = initializeVariationPointModel("Method_AddSameParam");
assertVariationPointStructure(vpm);
VariationPoint variationPoint = vpm.getVariationPointGroups().get(0)... | static VariationPoint function(VariabilityType variabilityType) throws Exception { VariationPointModel vpm = initializeVariationPointModel(STR); assertVariationPointStructure(vpm); VariationPoint variationPoint = vpm.getVariationPointGroups().get(0).getVariationPoints().get(0); setUpVariationPoint(variationPoint, varia... | /**
* Generates a variation point according to the Method_AddSameParam test case.
*
* @param variabilityType
* The {@link VariabilityType} the variation point will have.
* @return The generated {@link VariationPoint}.
* @throws Exception
* In case of an unexpec... | Generates a variation point according to the Method_AddSameParam test case | getMethodAddSameParamCase | {
"repo_name": "kopl/SPLevo",
"path": "JaMoPPCartridge/org.splevo.jamopp.refactoring.java.ifelse.tests/src/org/splevo/jamopp/refactoring/java/ifelse/tests/util/RefactoringTestUtil.java",
"license": "epl-1.0",
"size": 38675
} | [
"org.splevo.vpm.variability.VariabilityType",
"org.splevo.vpm.variability.VariationPoint",
"org.splevo.vpm.variability.VariationPointModel"
] | import org.splevo.vpm.variability.VariabilityType; import org.splevo.vpm.variability.VariationPoint; import org.splevo.vpm.variability.VariationPointModel; | import org.splevo.vpm.variability.*; | [
"org.splevo.vpm"
] | org.splevo.vpm; | 2,701,408 |
public String getSwitchable() {
if (SwitchOffAbility.ON.equals(switchOffAbility)) {
return SwitchOffAbility.ON.toString().toLowerCase();
} else if (SwitchOffAbility.OFF.equals(switchOffAbility)) {
return SwitchOffAbility.OFF.toString().toLowerCase();
} else {
... | String function() { if (SwitchOffAbility.ON.equals(switchOffAbility)) { return SwitchOffAbility.ON.toString().toLowerCase(); } else if (SwitchOffAbility.OFF.equals(switchOffAbility)) { return SwitchOffAbility.OFF.toString().toLowerCase(); } else { return SwitchOffAbility.LOCKED.toString().toLowerCase(); } } | /**
* Return the value on, off, locked depending on the constraint SwitchOffAbility .
* @return switchable property (on, off, locked)
*/ | Return the value on, off, locked depending on the constraint SwitchOffAbility | getSwitchable | {
"repo_name": "kimrutherford/intermine",
"path": "intermine/web/main/src/org/intermine/web/logic/query/DisplayConstraint.java",
"license": "lgpl-2.1",
"size": 33676
} | [
"org.intermine.template.SwitchOffAbility"
] | import org.intermine.template.SwitchOffAbility; | import org.intermine.template.*; | [
"org.intermine.template"
] | org.intermine.template; | 349,991 |
private void enableEdit() {
//set unformated text
setText(original, false);
setColor(new Color(255,255,255), Color.BLACK);
area.setEditable(true);
editbutt.setEnabled(false);
resetbutt.setEnabled(true);
commitbutt.setEnabled(true);
savebutt.s... | void function() { setText(original, false); setColor(new Color(255,255,255), Color.BLACK); area.setEditable(true); editbutt.setEnabled(false); resetbutt.setEnabled(true); commitbutt.setEnabled(true); savebutt.setEnabled(false); loadbutt.setEnabled(false); if (listener != null) listener.editEnabled(); } | /**
* Sets editable mode and reports change to listener.
* As for visual effects, the background color is changed to white and
* appropriate control buttons are either enabled or disabled.
*/ | Sets editable mode and reports change to listener. As for visual effects, the background color is changed to white and appropriate control buttons are either enabled or disabled | enableEdit | {
"repo_name": "dprokopo/pi-visualizer",
"path": "pi-visualizer/src/main/java/cz/vutbr/fit/xproko26/pivis/gui/enveditor/EnvironmentEditor.java",
"license": "apache-2.0",
"size": 9117
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 862,145 |
public boolean setViewValue(final View view, final Cursor cursor, final int columnIndex) {
if (columnIndex == cursor.getColumnIndex(Schema.COL_NETWORKTYPE)) {
final int result = cursor.getInt(columnIndex);
((TextView) view).setText(CellRecord.TECHNOLOGY_MAP().get(result));
return true;
}
retu... | boolean function(final View view, final Cursor cursor, final int columnIndex) { if (columnIndex == cursor.getColumnIndex(Schema.COL_NETWORKTYPE)) { final int result = cursor.getInt(columnIndex); ((TextView) view).setText(CellRecord.TECHNOLOGY_MAP().get(result)); return true; } return false; } } | /**
* Translates network type (int) to human-readable description.
*/ | Translates network type (int) to human-readable description | setViewValue | {
"repo_name": "wish7code/openbmap",
"path": "android/app/src/main/java/org/openbmap/activities/CellsListContainer.java",
"license": "agpl-3.0",
"size": 6837
} | [
"android.database.Cursor",
"android.view.View",
"android.widget.TextView",
"org.openbmap.db.Schema",
"org.openbmap.db.models.CellRecord"
] | import android.database.Cursor; import android.view.View; import android.widget.TextView; import org.openbmap.db.Schema; import org.openbmap.db.models.CellRecord; | import android.database.*; import android.view.*; import android.widget.*; import org.openbmap.db.*; import org.openbmap.db.models.*; | [
"android.database",
"android.view",
"android.widget",
"org.openbmap.db"
] | android.database; android.view; android.widget; org.openbmap.db; | 2,046,964 |
@Test
public void testSetTestValueFieldIdString() {
boolean valueOnly = true;
FieldConfigTextArea field =
new FieldConfigTextArea(
new FieldConfigCommonData(
String.class, FieldIdEnum.NAME, "test label", valueOnly, false),
... | void function() { boolean valueOnly = true; FieldConfigTextArea field = new FieldConfigTextArea( new FieldConfigCommonData( String.class, FieldIdEnum.NAME, STR, valueOnly, false), STR); String expectedTestValue = STR; field.setTestValue(FieldIdEnum.ANCHOR_POINT_V, expectedTestValue); assertNull(field.getStringValue());... | /**
* Test method for {@link
* com.sldeditor.ui.detail.config.FieldConfigTextArea#setTestValue(com.sldeditor.ui.detail.config.FieldId,
* java.lang.String)}.
*/ | Test method for <code>com.sldeditor.ui.detail.config.FieldConfigTextArea#setTestValue(com.sldeditor.ui.detail.config.FieldId, java.lang.String)</code> | testSetTestValueFieldIdString | {
"repo_name": "robward-scisys/sldeditor",
"path": "modules/application/src/test/java/com/sldeditor/test/unit/ui/detail/config/FieldConfigTextAreaTest.java",
"license": "gpl-3.0",
"size": 16334
} | [
"com.sldeditor.common.xml.ui.FieldIdEnum",
"com.sldeditor.ui.detail.config.FieldConfigCommonData",
"com.sldeditor.ui.detail.config.FieldConfigTextArea",
"org.junit.jupiter.api.Assertions"
] | import com.sldeditor.common.xml.ui.FieldIdEnum; import com.sldeditor.ui.detail.config.FieldConfigCommonData; import com.sldeditor.ui.detail.config.FieldConfigTextArea; import org.junit.jupiter.api.Assertions; | import com.sldeditor.common.xml.ui.*; import com.sldeditor.ui.detail.config.*; import org.junit.jupiter.api.*; | [
"com.sldeditor.common",
"com.sldeditor.ui",
"org.junit.jupiter"
] | com.sldeditor.common; com.sldeditor.ui; org.junit.jupiter; | 2,361,329 |
public void PlayRouteAnimation(final Marker[] markers, final int secondsDelay, boolean drawMarkers) {
if (markers == null)
throw new RuntimeException("latlngs values are null");
else
Log.d(LOG_TAG, "latlngs " + markers.length);
currentMarkerPosition = 0;
Polyl... | void function(final Marker[] markers, final int secondsDelay, boolean drawMarkers) { if (markers == null) throw new RuntimeException(STR); else Log.d(LOG_TAG, STR + markers.length); currentMarkerPosition = 0; PolylineOptions mPolylineOptions = new PolylineOptions().width(drawRoutePath_pathWidth) .color(drawRoutePath_pa... | /**
* To play an animation of the route path drawn throug LatLng's
*
* @param markers : The markers to which lat long is provided
* @param secondsDelay: The time delay for animation from one point to anothert in
* milliseconds
* @param drawMarkers : If the mark... | To play an animation of the route path drawn throug LatLng's | PlayRouteAnimation | {
"repo_name": "gfirem/ElRosaCruz",
"path": "branches/development/android/sources/ElRosaCruz/app/src/main/java/com/gfirem/elrosacruz/utils/MapHelper.java",
"license": "apache-2.0",
"size": 23598
} | [
"android.util.Log",
"com.google.android.gms.maps.GoogleMap",
"com.google.android.gms.maps.model.CameraPosition",
"com.google.android.gms.maps.model.Marker",
"com.google.android.gms.maps.model.PolylineOptions"
] | import android.util.Log; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.model.CameraPosition; import com.google.android.gms.maps.model.Marker; import com.google.android.gms.maps.model.PolylineOptions; | import android.util.*; import com.google.android.gms.maps.*; import com.google.android.gms.maps.model.*; | [
"android.util",
"com.google.android"
] | android.util; com.google.android; | 1,631,929 |
@VisibleForTesting
static ExprNodeDesc compactExpr(ExprNodeDesc expr) {
// If this is a constant boolean expression, return the value.
if (expr == null) {
return null;
}
if (expr instanceof ExprNodeConstantDesc) {
if (((ExprNodeConstantDesc)expr).getValue() == null) return null;
if... | static ExprNodeDesc compactExpr(ExprNodeDesc expr) { if (expr == null) { return null; } if (expr instanceof ExprNodeConstantDesc) { if (((ExprNodeConstantDesc)expr).getValue() == null) return null; if (!isBooleanExpr(expr)) { throw new IllegalStateException(STR + expr.getExprString()); } return expr; } else if (expr in... | /**
* Taking a partition pruning expression, remove the null operands and non-partition columns.
* The reason why there are null operands is ExprProcFactory classes, for example
* PPRColumnExprProcessor.
* @param expr original partition pruning expression.
* @return partition pruning expression that only... | Taking a partition pruning expression, remove the null operands and non-partition columns. The reason why there are null operands is ExprProcFactory classes, for example PPRColumnExprProcessor | compactExpr | {
"repo_name": "vergilchiu/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/PartitionPruner.java",
"license": "apache-2.0",
"size": 24757
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc",
"org.apache.hadoop.hive.ql.plan.ExprNodeDesc",
"org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc",
"org.apache.hadoop.hive.ql.udf.generic.GenericUDF",
"org.apache.hadoop.hive.ql.udf.generic.GenericUDFOP... | import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc; import org.apache.hadoop.hive.ql.plan.ExprNodeDesc; import org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc; import org.apache.hadoop.hive.ql.udf.generic.GenericUDF; import org.apache.hadoop.hive.ql.udf.... | import java.util.*; import org.apache.hadoop.hive.ql.plan.*; import org.apache.hadoop.hive.ql.udf.generic.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,781,294 |
void onConnect(InetSocketAddress addr); | void onConnect(InetSocketAddress addr); | /**
* This method will be triggered when Redisson
* connects to Redis server.
*
* @param addr - Redis server network address
*/ | This method will be triggered when Redisson connects to Redis server | onConnect | {
"repo_name": "jackygurui/redisson",
"path": "redisson/src/main/java/org/redisson/connection/ConnectionListener.java",
"license": "apache-2.0",
"size": 1171
} | [
"java.net.InetSocketAddress"
] | import java.net.InetSocketAddress; | import java.net.*; | [
"java.net"
] | java.net; | 1,406,925 |
public PurchaseOrder update(HashMap<String, Object> paramMap, PurchaseOrder purchaseOrder, File file)throws Exception
{
String urlString = url+"/"+purchaseOrder.getPurchaseorderId(); //No I18N
String response = "";
if(file != null && file.exists())
{
HashMap<String, Object> requestBody = new HashM... | PurchaseOrder function(HashMap<String, Object> paramMap, PurchaseOrder purchaseOrder, File file)throws Exception { String urlString = url+"/"+purchaseOrder.getPurchaseorderId(); String response = STRJSONStringSTRattachmentSTRJSONString", purchaseOrder.toJSON().toString()); response = ZohoHTTPClient.put(urlString, reque... | /**
* Update an existing purchase order.
*
* @param paramMap It contains the query string parameters in the form of key-value pair.
*
* @param purchaseOrder PurchaseOrder object.
*
* @param file Attachment file for the purchase order.
*
* @return Returns the PurchaseOrder object.
*
* @throws ... | Update an existing purchase order | update | {
"repo_name": "zoho/books-java-wrappers",
"path": "source/com/zoho/books/api/PurchaseOrderApi.java",
"license": "mit",
"size": 16252
} | [
"com.zoho.books.model.PurchaseOrder",
"com.zoho.books.util.ZohoHTTPClient",
"java.io.File",
"java.util.HashMap"
] | import com.zoho.books.model.PurchaseOrder; import com.zoho.books.util.ZohoHTTPClient; import java.io.File; import java.util.HashMap; | import com.zoho.books.model.*; import com.zoho.books.util.*; import java.io.*; import java.util.*; | [
"com.zoho.books",
"java.io",
"java.util"
] | com.zoho.books; java.io; java.util; | 2,005,460 |
public static final void rollback(final Connection connection) {
try {
connection.rollback();
} catch (Exception e) {
if (LOG.isWarnEnabled()) LOG.warn("Error rolling back Connection: " + connection, e);
}
} | static final void function(final Connection connection) { try { connection.rollback(); } catch (Exception e) { if (LOG.isWarnEnabled()) LOG.warn(STR + connection, e); } } | /**
* rollback unwanted changes to the database
*
* @param connection
*/ | rollback unwanted changes to the database | rollback | {
"repo_name": "jhelmer-unicon/uPortal",
"path": "uPortal-rdbm/src/main/java/org/apereo/portal/jdbc/RDBMServices.java",
"license": "apache-2.0",
"size": 14584
} | [
"java.sql.Connection"
] | import java.sql.Connection; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,134,246 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<AppInner>> listByResourceGroupNextSinglePageAsync(String nextLink) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (thi... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<AppInner>> function(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } final String accept = STR; return Flux... | /**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked excepti... | Get the next page of items | listByResourceGroupNextSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/iotcentral/azure-resourcemanager-iotcentral/src/main/java/com/azure/resourcemanager/iotcentral/implementation/AppsClientImpl.java",
"license": "mit",
"size": 103959
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.iotcentral.fluent.models.AppInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.iotcentral.fluent.models.AppInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.iotcentral.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 385,781 |
ArrayList<Game> getGames()
{
return this.games;
} | ArrayList<Game> getGames() { return this.games; } | /**
* Getter for the list of games
*
* @return ArrayList<Game> The list of current games
*/ | Getter for the list of games | getGames | {
"repo_name": "bigtobster/pgn-extract-alt",
"path": "src/main/java/com/bigtobster/pgnextractalt/chess/ChessContext.java",
"license": "gpl-3.0",
"size": 7524
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,860,089 |
private void initListeners(){
final Context c = mContext; | void function(){ final Context c = mContext; | /**
* Initializes the listeners on the card action button and the items in the swipe menu
*/ | Initializes the listeners on the card action button and the items in the swipe menu | initListeners | {
"repo_name": "pylapp/Buza",
"path": "app/src/main/java/pylapp/buza/android/views/BuzaView.java",
"license": "mit",
"size": 18621
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 1,556,338 |
private void setFonts(Graphics gx) {
if (m_labelMetrics == null) {
m_labelFont = new Font("Monospaced", Font.PLAIN, 12);
m_labelMetrics = gx.getFontMetrics(m_labelFont);
int hf = m_labelMetrics.getAscent();
if (this.getHeight() < (3*hf)) {
m_labelFont = new Font("Monospaced",Font.PLAIN,11... | void function(Graphics gx) { if (m_labelMetrics == null) { m_labelFont = new Font(STR, Font.PLAIN, 12); m_labelMetrics = gx.getFontMetrics(m_labelFont); int hf = m_labelMetrics.getAscent(); if (this.getHeight() < (3*hf)) { m_labelFont = new Font(STR,Font.PLAIN,11); m_labelMetrics = gx.getFontMetrics(m_labelFont); } } g... | /**
* Set up fonts and font metrics
* @param gx the graphics context
*/ | Set up fonts and font metrics | setFonts | {
"repo_name": "paolopavan/cfr",
"path": "src/weka/gui/visualize/ClassPanel.java",
"license": "gpl-3.0",
"size": 19539
} | [
"java.awt.Font",
"java.awt.Graphics"
] | import java.awt.Font; import java.awt.Graphics; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,838,333 |
@Generated
@Selector("setDisplayOrder:")
public native void setDisplayOrder(@NInt long value); | @Selector(STR) native void function(@NInt long value); | /**
* The displayOrder is by default sorted ascending.
* <p>
* Set the displayOrder if you want your contexts to be displayed in a particular order. The sort key is used as a way to sort sibling contexts in a particular order.
*/ | The displayOrder is by default sorted ascending. Set the displayOrder if you want your contexts to be displayed in a particular order. The sort key is used as a way to sort sibling contexts in a particular order | setDisplayOrder | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/classkit/CLSContext.java",
"license": "apache-2.0",
"size": 22699
} | [
"org.moe.natj.general.ann.NInt",
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.general.ann.NInt; import org.moe.natj.objc.ann.Selector; | import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 2,466,447 |
@Beta
public B withEnvironment(Map<String, String> environment) {
this.environment = ImmutableMap.copyOf(environment);
return (B) this;
} | B function(Map<String, String> environment) { this.environment = ImmutableMap.copyOf(environment); return (B) this; } | /**
* Defines the environment for the launched driver server. These
* settings will be inherited by every browser session launched by the
* server.
*
* @param environment A map of the environment variables to launch the
* server with.
* @return A self reference.
*/ | Defines the environment for the launched driver server. These settings will be inherited by every browser session launched by the server | withEnvironment | {
"repo_name": "Jarob22/selenium",
"path": "java/client/src/org/openqa/selenium/remote/service/DriverService.java",
"license": "apache-2.0",
"size": 9976
} | [
"com.google.common.collect.ImmutableMap",
"java.util.Map"
] | import com.google.common.collect.ImmutableMap; import java.util.Map; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,874,244 |
@Override
public OMElement getWsdlElement() {
return wsdlElement;
} | OMElement function() { return wsdlElement; } | /**
* Method to obtain the WSDL element of this WSDL artifact.
*
* @return the WSDL element.
*/ | Method to obtain the WSDL element of this WSDL artifact | getWsdlElement | {
"repo_name": "laki88/carbon-governance",
"path": "components/governance/org.wso2.carbon.governance.api/src/main/java/org/wso2/carbon/governance/api/wsdls/dataobjects/WsdlImpl.java",
"license": "apache-2.0",
"size": 10809
} | [
"org.apache.axiom.om.OMElement"
] | import org.apache.axiom.om.OMElement; | import org.apache.axiom.om.*; | [
"org.apache.axiom"
] | org.apache.axiom; | 897,197 |
List<Rental> loadAllForCurrentDay(); | List<Rental> loadAllForCurrentDay(); | /**
* Get all {@link Rental}s for the current day.
*
* @return all {@link Rental}s for the current day
*/ | Get all <code>Rental</code>s for the current day | loadAllForCurrentDay | {
"repo_name": "andi-git/boatpos",
"path": "boatpos-server/boatpos-server-domain/boatpos-server-domain-api/src/main/java/org/boatpos/domain/api/repository/RentalRepository.java",
"license": "gpl-2.0",
"size": 4038
} | [
"java.util.List",
"org.boatpos.domain.api.model.Rental"
] | import java.util.List; import org.boatpos.domain.api.model.Rental; | import java.util.*; import org.boatpos.domain.api.model.*; | [
"java.util",
"org.boatpos.domain"
] | java.util; org.boatpos.domain; | 1,121,100 |
public void writeExternal(ObjectOutput out) throws IOException {
out.writeFloat(x);
out.writeFloat(y);
out.writeFloat(z);
out.writeFloat(w);
} | void function(ObjectOutput out) throws IOException { out.writeFloat(x); out.writeFloat(y); out.writeFloat(z); out.writeFloat(w); } | /**
* <code>writeExternal</code> writes this quaternion out to a
* <code>ObjectOutput</code> object. NOTE: Used with serialization. Not to
* be called manually.
*
* @param out
* the object to write to.
* @throws java.io.IOException
* if writing to the Obje... | <code>writeExternal</code> writes this quaternion out to a be called manually | writeExternal | {
"repo_name": "bubblecloud/vecmath",
"path": "src/main/java/org/bubblecloud/vecmath/Quaternion.java",
"license": "bsd-3-clause",
"size": 45792
} | [
"java.io.IOException",
"java.io.ObjectOutput"
] | import java.io.IOException; import java.io.ObjectOutput; | import java.io.*; | [
"java.io"
] | java.io; | 1,854,240 |
void process(long timecode, ShortBuffer buffer) throws InterruptedException; | void process(long timecode, ShortBuffer buffer) throws InterruptedException; | /**
* Receives chunk buffer in its final PCM format with the sample count, sample rate and channel count matching that of
* the output format.
*
* @param timecode Absolute starting timecode of the chunk in milliseconds
* @param buffer PCM buffer of samples in the chunk
* @throws InterruptedException W... | Receives chunk buffer in its final PCM format with the sample count, sample rate and channel count matching that of the output format | process | {
"repo_name": "sedmelluq/lavaplayer",
"path": "main/src/main/java/com/sedmelluq/discord/lavaplayer/filter/AudioPostProcessor.java",
"license": "apache-2.0",
"size": 708
} | [
"java.nio.ShortBuffer"
] | import java.nio.ShortBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 1,430,277 |
private String getCommandUrl(Device device, Ability ability) throws GardenaException {
return String.format(URL_COMMAND, device.getId(), ability.getName(), device.getLocation().getId());
} | String function(Device device, Ability ability) throws GardenaException { return String.format(URL_COMMAND, device.getId(), ability.getName(), device.getLocation().getId()); } | /**
* Returns the command url.
*/ | Returns the command url | getCommandUrl | {
"repo_name": "Mr-Eskildsen/openhab2-addons",
"path": "addons/binding/org.openhab.binding.gardena/src/main/java/org/openhab/binding/gardena/internal/GardenaSmartImpl.java",
"license": "epl-1.0",
"size": 22812
} | [
"org.openhab.binding.gardena.internal.exception.GardenaException",
"org.openhab.binding.gardena.internal.model.Ability",
"org.openhab.binding.gardena.internal.model.Device"
] | import org.openhab.binding.gardena.internal.exception.GardenaException; import org.openhab.binding.gardena.internal.model.Ability; import org.openhab.binding.gardena.internal.model.Device; | import org.openhab.binding.gardena.internal.exception.*; import org.openhab.binding.gardena.internal.model.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 1,525,657 |
@Test(expected = GenieNotFoundException.class)
public void testRemoveAllTagsForApplicationNoApp() throws GenieException {
this.service.removeAllTagsForApplication(UUID.randomUUID().toString());
} | @Test(expected = GenieNotFoundException.class) void function() throws GenieException { this.service.removeAllTagsForApplication(UUID.randomUUID().toString()); } | /**
* Test remove all tags for application.
*
* @throws GenieException
*/ | Test remove all tags for application | testRemoveAllTagsForApplicationNoApp | {
"repo_name": "gorcz/genie",
"path": "genie-server/src/test/java/com/netflix/genie/server/services/impl/jpa/TestApplicationConfigServiceJPAImpl.java",
"license": "apache-2.0",
"size": 43910
} | [
"com.netflix.genie.common.exceptions.GenieException",
"com.netflix.genie.common.exceptions.GenieNotFoundException",
"java.util.UUID",
"org.junit.Test"
] | import com.netflix.genie.common.exceptions.GenieException; import com.netflix.genie.common.exceptions.GenieNotFoundException; import java.util.UUID; import org.junit.Test; | import com.netflix.genie.common.exceptions.*; import java.util.*; import org.junit.*; | [
"com.netflix.genie",
"java.util",
"org.junit"
] | com.netflix.genie; java.util; org.junit; | 2,040,392 |
DimensionSelector makeDimensionSelector(
DimensionSpec spec,
TimeAndDimsHolder currEntry,
IncrementalIndex.DimensionDesc desc
); | DimensionSelector makeDimensionSelector( DimensionSpec spec, TimeAndDimsHolder currEntry, IncrementalIndex.DimensionDesc desc ); | /**
* Return an object used to read values from this indexer's column as Strings.
*
* @param spec Specifies the output name of a dimension and any extraction functions to be applied.
* @param currEntry Provides access to the current TimeAndDims object in the Cursor
* @param desc Descriptor object for thi... | Return an object used to read values from this indexer's column as Strings | makeDimensionSelector | {
"repo_name": "winval/druid",
"path": "processing/src/main/java/io/druid/segment/DimensionIndexer.java",
"license": "apache-2.0",
"size": 13894
} | [
"io.druid.query.dimension.DimensionSpec",
"io.druid.segment.incremental.IncrementalIndex",
"io.druid.segment.incremental.TimeAndDimsHolder"
] | import io.druid.query.dimension.DimensionSpec; import io.druid.segment.incremental.IncrementalIndex; import io.druid.segment.incremental.TimeAndDimsHolder; | import io.druid.query.dimension.*; import io.druid.segment.incremental.*; | [
"io.druid.query",
"io.druid.segment"
] | io.druid.query; io.druid.segment; | 1,028,125 |
@SuppressWarnings({ "rawtypes", "unchecked" })
private void filterCriteriaQuery(CriteriaBuilder cb, CriteriaQuery<?> cq, Root<T> root, Filter<?> filter, String value) {
// Remove @SupressWarnings and add the correct generic types to all operations.
// Get the model for the domain class so we can perform fi... | @SuppressWarnings({ STR, STR }) void function(CriteriaBuilder cb, CriteriaQuery<?> cq, Root<T> root, Filter<?> filter, String value) { EntityType<T> model = root.getModel(); List<Predicate> predicates = new ArrayList<Predicate>(); for (Criterion crit : filter.getCriteria()) predicates.add(createPredicate(cb, root, mode... | /**
* Applies a filter to a criteria query. Used both by buildFilteredCountCriteriaQuery() and
* buildFilteredCriteriaQuery().
*
* @param cb
* The object that builds the criteria query.
* @param cq
* The criteria query itself.
* @param root
* The root of the ... | Applies a filter to a criteria query. Used both by buildFilteredCountCriteriaQuery() and buildFilteredCriteriaQuery() | filterCriteriaQuery | {
"repo_name": "manzoli2122/Vip",
"path": "src/br/ufes/inf/nemo/jbutler/ejb/persistence/BaseJPADAO.java",
"license": "apache-2.0",
"size": 32771
} | [
"br.ufes.inf.nemo.jbutler.ejb.application.filters.Criterion",
"br.ufes.inf.nemo.jbutler.ejb.application.filters.CriterionType",
"br.ufes.inf.nemo.jbutler.ejb.application.filters.Filter",
"br.ufes.inf.nemo.jbutler.ejb.application.filters.ManyToManyFilter",
"java.util.ArrayList",
"java.util.List",
"java.u... | import br.ufes.inf.nemo.jbutler.ejb.application.filters.Criterion; import br.ufes.inf.nemo.jbutler.ejb.application.filters.CriterionType; import br.ufes.inf.nemo.jbutler.ejb.application.filters.Filter; import br.ufes.inf.nemo.jbutler.ejb.application.filters.ManyToManyFilter; import java.util.ArrayList; import java.util... | import br.ufes.inf.nemo.jbutler.ejb.application.filters.*; import java.util.*; import javax.persistence.criteria.*; import javax.persistence.metamodel.*; | [
"br.ufes.inf",
"java.util",
"javax.persistence"
] | br.ufes.inf; java.util; javax.persistence; | 908,372 |
private static Collection<MobilePhone> convertSMSRecipientsFromEmailAddressCollectionToMobilePhoneCollection(
EmailAddressCollection emailCollection) {
Collection<MobilePhone> mobilePhoneCollection =
new ArrayList<MobilePhone>();
for (EmailAddress emailAddress : emailCollection) {
mobilePh... | static Collection<MobilePhone> function( EmailAddressCollection emailCollection) { Collection<MobilePhone> mobilePhoneCollection = new ArrayList<MobilePhone>(); for (EmailAddress emailAddress : emailCollection) { mobilePhoneCollection.add(new MobilePhone(emailAddress.getName(), emailAddress.getAddress())); } return mob... | /**
* Convert the SMS recipient list from
* EmailAddressCollection type to MobilePhone collection type.
*
* @param Recipient list in EmailAddressCollection type.
* @return A MobilePhone collection object
* containing all SMS recipient in MobilePhone type.
*/ | Convert the SMS recipient list from EmailAddressCollection type to MobilePhone collection type | convertSMSRecipientsFromEmailAddressCollectionToMobilePhoneCollection | {
"repo_name": "evpaassen/ews-java-api",
"path": "src/main/java/microsoft/exchange/webservices/data/RuleActions.java",
"license": "mit",
"size": 16695
} | [
"java.util.ArrayList",
"java.util.Collection"
] | import java.util.ArrayList; import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,632,115 |
public void editRow(int rowIndex) {
// Focus the last focused column in the editor iff grid or its child
// was focused before the edit request
Cell focusedCell = grid.cellFocusHandler.getFocusedCell();
Element focusedElement = WidgetUtil.getFocusedElement();
... | void function(int rowIndex) { Cell focusedCell = grid.cellFocusHandler.getFocusedCell(); Element focusedElement = WidgetUtil.getFocusedElement(); if (focusedCell != null && focusedElement != null && grid.getElement().isOrHasChild(focusedElement)) { editRow(rowIndex, focusedCell.getColumn()); } else { editRow(rowIndex, ... | /**
* If a cell of this Grid had focus once this editRow call was
* triggered, the editor component at the previously focused column
* index will be focused.
*
* If a Grid cell was not focused prior to calling this method, it will
* be equivalent to {@code editRow(r... | If a cell of this Grid had focus once this editRow call was triggered, the editor component at the previously focused column index will be focused. If a Grid cell was not focused prior to calling this method, it will be equivalent to editRow(rowIndex, -1) | editRow | {
"repo_name": "kironapublic/vaadin",
"path": "client/src/main/java/com/vaadin/client/widgets/Grid.java",
"license": "apache-2.0",
"size": 330612
} | [
"com.google.gwt.dom.client.Element",
"com.vaadin.client.WidgetUtil",
"com.vaadin.client.widget.escalator.Cell"
] | import com.google.gwt.dom.client.Element; import com.vaadin.client.WidgetUtil; import com.vaadin.client.widget.escalator.Cell; | import com.google.gwt.dom.client.*; import com.vaadin.client.*; import com.vaadin.client.widget.escalator.*; | [
"com.google.gwt",
"com.vaadin.client"
] | com.google.gwt; com.vaadin.client; | 839,163 |
@SuppressWarnings("unchecked")
protected static Hashtable<String, Skin> load()
{
XStream xstream = new XStream();
config(xstream);
if (false)
{
Hashtable<String, Skin> skinsHash = new Hashtable<String, Skin>();
String... | @SuppressWarnings(STR) static Hashtable<String, Skin> function() { XStream xstream = new XStream(); config(xstream); if (false) { Hashtable<String, Skin> skinsHash = new Hashtable<String, Skin>(); String p = STR; Skin skin1 = new Skin("metal", STR); skin1.getItems().put("item1", new SkinItem("n1", "fn", 10, "plain", Co... | /**
* Loads the skins from XML.
*/ | Loads the skins from XML | load | {
"repo_name": "specify/specify6",
"path": "src/edu/ku/brc/ui/skin/SkinsMgr.java",
"license": "gpl-2.0",
"size": 6470
} | [
"com.thoughtworks.xstream.XStream",
"edu.ku.brc.helpers.XMLHelper",
"java.awt.Color",
"java.io.File",
"java.io.IOException",
"java.util.Hashtable",
"org.apache.commons.io.FileUtils"
] | import com.thoughtworks.xstream.XStream; import edu.ku.brc.helpers.XMLHelper; import java.awt.Color; import java.io.File; import java.io.IOException; import java.util.Hashtable; import org.apache.commons.io.FileUtils; | import com.thoughtworks.xstream.*; import edu.ku.brc.helpers.*; import java.awt.*; import java.io.*; import java.util.*; import org.apache.commons.io.*; | [
"com.thoughtworks.xstream",
"edu.ku.brc",
"java.awt",
"java.io",
"java.util",
"org.apache.commons"
] | com.thoughtworks.xstream; edu.ku.brc; java.awt; java.io; java.util; org.apache.commons; | 1,367,621 |
@JavaHandler
List<ApplicationReportModel> getApplicationReportModelsSortedByPriority(); | List<ApplicationReportModel> getApplicationReportModelsSortedByPriority(); | /**
* Get all ReportModels that should be displayed in the index in ascending order, according to priority
*/ | Get all ReportModels that should be displayed in the index in ascending order, according to priority | getApplicationReportModelsSortedByPriority | {
"repo_name": "d-s/windup",
"path": "reporting/api/src/main/java/org/jboss/windup/reporting/model/ApplicationReportIndexModel.java",
"license": "epl-1.0",
"size": 3496
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 374,663 |
@Override
public boolean getDisplayGuts() {
return ((WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid))
.getDisplayGuts();
} | boolean function() { return ((WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid)) .getDisplayGuts(); } | /**
* get whether to display the guts or not
*
* @return guts or no guts (or glory)
*/ | get whether to display the guts or not | getDisplayGuts | {
"repo_name": "lamsfoundation/lams",
"path": "3rdParty_sources/poi/org/apache/poi/hssf/usermodel/HSSFSheet.java",
"license": "gpl-2.0",
"size": 94953
} | [
"org.apache.poi.hssf.record.WSBoolRecord"
] | import org.apache.poi.hssf.record.WSBoolRecord; | import org.apache.poi.hssf.record.*; | [
"org.apache.poi"
] | org.apache.poi; | 2,619,521 |
public void setCookieProcessingEnabled (boolean enable)
{
if (enable)
mCookieJar = (null == mCookieJar) ? new Hashtable () : mCookieJar;
else
mCookieJar = null;
} | void function (boolean enable) { if (enable) mCookieJar = (null == mCookieJar) ? new Hashtable () : mCookieJar; else mCookieJar = null; } | /**
* Enables and disabled cookie processing.
* @param enable if <code>true</code> cookie processing will occur,
* else cookie processing will be turned off.
*/ | Enables and disabled cookie processing | setCookieProcessingEnabled | {
"repo_name": "patrickfav/tuwien",
"path": "master/swt workspace/HTMLParser/src/org/htmlparser/http/ConnectionManager.java",
"license": "apache-2.0",
"size": 43429
} | [
"java.util.Hashtable"
] | import java.util.Hashtable; | import java.util.*; | [
"java.util"
] | java.util; | 1,530,677 |
Mono<Void> delayAsync() {
Mono<Void> result = Mono.empty();
if (delayInMilliseconds > 0) {
result = result.delaySubscription(Duration.ofMillis(delayInMilliseconds));
}
return result;
} | Mono<Void> delayAsync() { Mono<Void> result = Mono.empty(); if (delayInMilliseconds > 0) { result = result.delaySubscription(Duration.ofMillis(delayInMilliseconds)); } return result; } | /**
* If this OperationStatus has a retryAfterSeconds value, return an Mono that is delayed by the
* number of seconds that are in the retryAfterSeconds value. If this OperationStatus doesn't have
* a retryAfterSeconds value, then return an Single with no delay.
* @return A Mono with delay if this O... | If this OperationStatus has a retryAfterSeconds value, return an Mono that is delayed by the number of seconds that are in the retryAfterSeconds value. If this OperationStatus doesn't have a retryAfterSeconds value, then return an Single with no delay | delayAsync | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/core/azure-core-management/src/main/java/com/azure/core/management/implementation/PollStrategy.java",
"license": "mit",
"size": 8177
} | [
"java.time.Duration"
] | import java.time.Duration; | import java.time.*; | [
"java.time"
] | java.time; | 1,798,361 |
private int indexOfSearchQuery(String displayName) {
if (!TextUtils.isEmpty(mSearchTerm)) {
return displayName.toLowerCase(Locale.getDefault()).indexOf(
mSearchTerm.toLowerCase(Locale.getDefault()));
}
return -1;
} | int function(String displayName) { if (!TextUtils.isEmpty(mSearchTerm)) { return displayName.toLowerCase(Locale.getDefault()).indexOf( mSearchTerm.toLowerCase(Locale.getDefault())); } return -1; } | /**
* Identifies the start of the search string in the display name column of a Cursor row.
* E.g. If displayName was "Adam" and search query (mSearchTerm) was "da" this would
* return 1.
*
* @param displayName The contact display name.
* @return The starting positi... | Identifies the start of the search string in the display name column of a Cursor row. E.g. If displayName was "Adam" and search query (mSearchTerm) was "da" this would return 1 | indexOfSearchQuery | {
"repo_name": "eladfein/facebook-android-sdk-3.22.0",
"path": "practicePartner/src/main/java/com/ifeel/mt/ui/ContactsListFragment.java",
"license": "apache-2.0",
"size": 42496
} | [
"android.text.TextUtils",
"java.util.Locale"
] | import android.text.TextUtils; import java.util.Locale; | import android.text.*; import java.util.*; | [
"android.text",
"java.util"
] | android.text; java.util; | 1,825,257 |
private void performCrop(Uri picUri, int destType, Intent cameraIntent) {
try {
Intent cropIntent = new Intent("com.android.camera.action.CROP");
// indicate image type and Uri
cropIntent.setDataAndType(picUri, "image/*");
// set crop properties
cropIntent.putExtra("crop", "true");
... | void function(Uri picUri, int destType, Intent cameraIntent) { try { Intent cropIntent = new Intent(STR); cropIntent.setDataAndType(picUri, STR); cropIntent.putExtra("crop", "true"); if (targetWidth > 0) { cropIntent.putExtra(STR, targetWidth); } if (targetHeight > 0) { cropIntent.putExtra(STR, targetHeight); } if (tar... | /**
* Brings up the UI to perform crop on passed image URI
*
* @param picUri
*/ | Brings up the UI to perform crop on passed image URI | performCrop | {
"repo_name": "circular-code/ImageStream",
"path": "www/plugins/cordova-plugin-camera/src/android/CameraLauncher.java",
"license": "mit",
"size": 49794
} | [
"android.content.Intent",
"android.net.Uri"
] | import android.content.Intent; import android.net.Uri; | import android.content.*; import android.net.*; | [
"android.content",
"android.net"
] | android.content; android.net; | 2,593,360 |
public static SwitchPoint getBuiltinFunctionApplySwitchPoint() {
return ScriptFunction.getPrototype(Global.instance().getBuiltinFunction()).getProperty("apply").getBuiltinSwitchPoint();
} | static SwitchPoint function() { return ScriptFunction.getPrototype(Global.instance().getBuiltinFunction()).getProperty("apply").getBuiltinSwitchPoint(); } | /**
* Get the switchpoint used to check property changes for Function.prototype.apply
* @return the switchpoint guarding apply (same as guarding call, and everything else in function)
*/ | Get the switchpoint used to check property changes for Function.prototype.apply | getBuiltinFunctionApplySwitchPoint | {
"repo_name": "openjdk/jdk9",
"path": "nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/Global.java",
"license": "gpl-2.0",
"size": 114840
} | [
"java.lang.invoke.SwitchPoint"
] | import java.lang.invoke.SwitchPoint; | import java.lang.invoke.*; | [
"java.lang"
] | java.lang; | 463,040 |
public void useTestNG() {
useTestNG(Actions.<TestFrameworkOptions>doNothing());
} | void function() { useTestNG(Actions.<TestFrameworkOptions>doNothing()); } | /**
* Specifies that TestNG should be used to execute the tests. <p> To configure TestNG specific options, see {@link #useTestNG(Closure)}.
*/ | Specifies that TestNG should be used to execute the tests. To configure TestNG specific options, see <code>#useTestNG(Closure)</code> | useTestNG | {
"repo_name": "robinverduijn/gradle",
"path": "subprojects/testing-jvm/src/main/java/org/gradle/api/tasks/testing/Test.java",
"license": "apache-2.0",
"size": 32637
} | [
"org.gradle.internal.Actions"
] | import org.gradle.internal.Actions; | import org.gradle.internal.*; | [
"org.gradle.internal"
] | org.gradle.internal; | 974,843 |
public void execute() {
// Assert: due to validation, a value of value type t1 is on the top of the stack.
if ((stack.peek() instanceof I32) == false) {
throw new WasmRuntimeException(UUID.fromString("47159f57-7695-42a1-b99b-255a38389aba"),
opCodeName + ": Value type is incorrect. Value should be of type... | void function() { if ((stack.peek() instanceof I32) == false) { throw new WasmRuntimeException(UUID.fromString(STR), opCodeName + STR + t1Type); } I32 c1 = (I32) stack.pop(); I32 c = c1.countTrailingZeros(); stack.push(c); } | /**
* Execute the opcode.
*/ | Execute the opcode | execute | {
"repo_name": "fishjd/HappyNewMoonWithReport",
"path": "src/main/java/happynewmoonwithreport/opcode/countingBits/I32_ctz.java",
"license": "apache-2.0",
"size": 3088
} | [
"java.util.UUID"
] | import java.util.UUID; | import java.util.*; | [
"java.util"
] | java.util; | 2,675,695 |
private void addMessageHeaderText(StringBuilder text, Message message)
throws MessagingException {
// From: <sender>
Address[] from = message.getFrom();
if (from != null && from.length > 0) {
text.append(context.getString(R.string.message_compose_quote_header_from));
... | void function(StringBuilder text, Message message) throws MessagingException { Address[] from = message.getFrom(); if (from != null && from.length > 0) { text.append(context.getString(R.string.message_compose_quote_header_from)); text.append(' '); text.append(Address.toString(from)); text.append("\r\n"); } Address[] to... | /**
* Extract important header values from a message to display inline (plain text version).
*
* @param text
* The {@link StringBuilder} that will receive the (plain text) output.
* @param message
* The message to extract the header values from.
*
* @throws com.fs... | Extract important header values from a message to display inline (plain text version) | addMessageHeaderText | {
"repo_name": "rishabhbitsg/k-9",
"path": "k9mail/src/main/java/com/fsck/k9/mailstore/MessageViewInfoExtractor.java",
"license": "apache-2.0",
"size": 20635
} | [
"com.fsck.k9.mail.Address",
"com.fsck.k9.mail.Message",
"com.fsck.k9.mail.MessagingException",
"java.util.Date"
] | import com.fsck.k9.mail.Address; import com.fsck.k9.mail.Message; import com.fsck.k9.mail.MessagingException; import java.util.Date; | import com.fsck.k9.mail.*; import java.util.*; | [
"com.fsck.k9",
"java.util"
] | com.fsck.k9; java.util; | 2,596,970 |
@Test(expectedExceptions = { IOException.class })
public void testInvalidRemoteAddressPort()
throws Exception
{
LDAPToJavaSocketFactory f =
new LDAPToJavaSocketFactory(new TestLDAPSocketFactory());
f.createSocket(InetAddress.getLocalHost(), unusedPort);
} | @Test(expectedExceptions = { IOException.class }) void function() throws Exception { LDAPToJavaSocketFactory f = new LDAPToJavaSocketFactory(new TestLDAPSocketFactory()); f.createSocket(InetAddress.getLocalHost(), unusedPort); } | /**
* Tests the behavior when trying to connect to a port on which nothing is
* listening.
*
* @throws Exception If an unexpected problem occurs.
*/ | Tests the behavior when trying to connect to a port on which nothing is listening | testInvalidRemoteAddressPort | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/sdk/migrate/ldapjdk/LDAPToJavaSocketFactoryTestCase.java",
"license": "gpl-2.0",
"size": 9428
} | [
"java.io.IOException",
"java.net.InetAddress",
"org.testng.annotations.Test"
] | import java.io.IOException; import java.net.InetAddress; import org.testng.annotations.Test; | import java.io.*; import java.net.*; import org.testng.annotations.*; | [
"java.io",
"java.net",
"org.testng.annotations"
] | java.io; java.net; org.testng.annotations; | 432,535 |
// TODO: This is bad code and should not be static.
public static ArrayList<Long> getBadSectorsList() {
return badSectorList;
} | static ArrayList<Long> function() { return badSectorList; } | /**
* Get a list of bad sectors read. This method should be replaced with one that is not static.
* @return The bad sectors.
*/ | Get a list of bad sectors read. This method should be replaced with one that is not static | getBadSectorsList | {
"repo_name": "ciphertechsolutions/IO",
"path": "src/com/ciphertechsolutions/io/processing/DriveReader.java",
"license": "bsd-3-clause",
"size": 6839
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,548,975 |
private static String createRowTemplate(List<Integer> maxColumnSizes) {
List<String> columnFormatSpecifiers = Lists.newArrayList();
for (int maxColumnSize : maxColumnSizes) {
columnFormatSpecifiers.add("%-" + maxColumnSize + "s");
}
return new StringBuilder("| ").append(Joiner.on(" | ").join(col... | static String function(List<Integer> maxColumnSizes) { List<String> columnFormatSpecifiers = Lists.newArrayList(); for (int maxColumnSize : maxColumnSizes) { columnFormatSpecifiers.add("%-" + maxColumnSize + "s"); } return new StringBuilder(" ").append(Joiner.on(" ").join(columnFormatSpecifiers)).append( STR).toString(... | /**
* Creates the row template given the maximum size for each column
*
* @param maxColumnSizes the maximum size for each column
* @return the row template to format row data into
*/ | Creates the row template given the maximum size for each column | createRowTemplate | {
"repo_name": "shyTNT/googleads-java-lib",
"path": "modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/utils/v201411/Pql.java",
"license": "apache-2.0",
"size": 18457
} | [
"com.google.common.base.Joiner",
"com.google.common.collect.Lists",
"java.util.List"
] | import com.google.common.base.Joiner; import com.google.common.collect.Lists; import java.util.List; | import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 205,314 |
@DoesServiceRequest
public boolean createIfNotExists() throws StorageException {
return this.createIfNotExists(null , null );
} | boolean function() throws StorageException { return this.createIfNotExists(null , null ); } | /**
* Creates the share if it does not exist.
*
* @return <code>true</code> if the share did not already exist and was created; otherwise, <code>false</code>.
*
* @throws StorageException
* If a storage service error occurred.
*/ | Creates the share if it does not exist | createIfNotExists | {
"repo_name": "horizon-institute/runspotrun-android-client",
"path": "src/com/microsoft/azure/storage/file/CloudFileShare.java",
"license": "agpl-3.0",
"size": 35587
} | [
"com.microsoft.azure.storage.StorageException"
] | import com.microsoft.azure.storage.StorageException; | import com.microsoft.azure.storage.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 229,332 |
public BayesianNetwork toBayesianNetworkTime0(){
DAG dagTime0 = this.getDynamicDAG().toDAGTime0();
BayesianNetwork bnTime0 = new BayesianNetwork(dagTime0);
for (Variable dynamicVar : this.getDynamicVariables()) {
Variable staticVar = dagTime0.getVariables().getVariableByName(dyna... | BayesianNetwork function(){ DAG dagTime0 = this.getDynamicDAG().toDAGTime0(); BayesianNetwork bnTime0 = new BayesianNetwork(dagTime0); for (Variable dynamicVar : this.getDynamicVariables()) { Variable staticVar = dagTime0.getVariables().getVariableByName(dynamicVar.getName()); ConditionalDistribution deepCopy = Seriali... | /**
* Returns the Bayesian network at Time 0.
* @return a {@link BayesianNetwork} object.
*/ | Returns the Bayesian network at Time 0 | toBayesianNetworkTime0 | {
"repo_name": "amidst/toolbox",
"path": "core-dynamic/src/main/java/eu/amidst/dynamic/models/DynamicBayesianNetwork.java",
"license": "apache-2.0",
"size": 15705
} | [
"eu.amidst.core.distribution.ConditionalDistribution",
"eu.amidst.core.models.BayesianNetwork",
"eu.amidst.core.utils.Serialization",
"eu.amidst.core.variables.Variable",
"java.util.List",
"java.util.stream.Collectors"
] | import eu.amidst.core.distribution.ConditionalDistribution; import eu.amidst.core.models.BayesianNetwork; import eu.amidst.core.utils.Serialization; import eu.amidst.core.variables.Variable; import java.util.List; import java.util.stream.Collectors; | import eu.amidst.core.distribution.*; import eu.amidst.core.models.*; import eu.amidst.core.utils.*; import eu.amidst.core.variables.*; import java.util.*; import java.util.stream.*; | [
"eu.amidst.core",
"java.util"
] | eu.amidst.core; java.util; | 1,938,326 |
public static void get(Context context, String id, HttpCallback callback) {
Request request = new Request.Builder()
.url(HttpUrl.parse(getApiUrl(context) + "/document/" + id))
.get()
.build();
OkHttpUtil.buildClient(context)
.newCall(re... | static void function(Context context, String id, HttpCallback callback) { Request request = new Request.Builder() .url(HttpUrl.parse(getApiUrl(context) + STR + id)) .get() .build(); OkHttpUtil.buildClient(context) .newCall(request) .enqueue(HttpCallback.buildOkHttpCallback(callback)); } | /**
* GET /document/id.
*
* @param context Context
* @param id ID
* @param callback Callback
*/ | GET /document/id | get | {
"repo_name": "sismics/docs",
"path": "docs-android/app/src/main/java/com/sismics/docs/resource/DocumentResource.java",
"license": "gpl-2.0",
"size": 4774
} | [
"android.content.Context",
"com.sismics.docs.listener.HttpCallback",
"com.sismics.docs.util.OkHttpUtil"
] | import android.content.Context; import com.sismics.docs.listener.HttpCallback; import com.sismics.docs.util.OkHttpUtil; | import android.content.*; import com.sismics.docs.listener.*; import com.sismics.docs.util.*; | [
"android.content",
"com.sismics.docs"
] | android.content; com.sismics.docs; | 1,839,819 |
public ConstantAction makeConstantAction()
{
return getGenericConstantActionFactory().getCreateSchemaConstantAction(name, aid);
} | ConstantAction function() { return getGenericConstantActionFactory().getCreateSchemaConstantAction(name, aid); } | /**
* Create the Constant information that will drive the guts of Execution.
*
* @exception StandardException Thrown on failure
*/ | Create the Constant information that will drive the guts of Execution | makeConstantAction | {
"repo_name": "lpxz/grail-derby104",
"path": "java/engine/org/apache/derby/impl/sql/compile/CreateSchemaNode.java",
"license": "apache-2.0",
"size": 3086
} | [
"org.apache.derby.iapi.sql.execute.ConstantAction"
] | import org.apache.derby.iapi.sql.execute.ConstantAction; | import org.apache.derby.iapi.sql.execute.*; | [
"org.apache.derby"
] | org.apache.derby; | 2,901,919 |
public static double regularizedGammaP(double a,
double x,
double epsilon,
int maxIterations)
throws MathException
{
double ret;
if (Double.isNaN(a) |... | static double function(double a, double x, double epsilon, int maxIterations) throws MathException { double ret; if (Double.isNaN(a) Double.isNaN(x) (a <= 0.0) (x < 0.0)) { ret = Double.NaN; } else if (x == 0.0) { ret = 0.0; } else if (a >= 1.0 && x > a) { ret = 1.0 - regularizedGammaQ(a, x, epsilon, maxIterations); } ... | /**
* Returns the regularized gamma function P(a, x).
*
* The implementation of this method is based on:
* <ul>
* <li>
* <a href="http://mathworld.wolfram.com/RegularizedGammaFunction.html">
* Regularized Gamma Function</a>, equation (1).</li>
* <li>
* <a href="http... | Returns the regularized gamma function P(a, x). The implementation of this method is based on: Regularized Gamma Function, equation (1). Incomplete Gamma Function, equation (4). Confluent Hypergeometric Function of the First Kind, equation (1). | regularizedGammaP | {
"repo_name": "SpoonLabs/astor",
"path": "examples/Math-issue-340/src/main/java/org/apache/commons/math/special/Gamma.java",
"license": "gpl-2.0",
"size": 12534
} | [
"org.apache.commons.math.MathException",
"org.apache.commons.math.MaxIterationsExceededException"
] | import org.apache.commons.math.MathException; import org.apache.commons.math.MaxIterationsExceededException; | import org.apache.commons.math.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,766,397 |
@Test
public void testGoodTypeForMethodRef() throws Exception {
SimpleFunction<Integer, String> fn =
new SimpleFunction<Integer, String>(SimpleFunctionTest::toStringThisThing) {};
assertThat(fn.getInputTypeDescriptor(), equalTo(TypeDescriptors.integers()));
assertThat(fn.getOutputTypeDescriptor... | void function() throws Exception { SimpleFunction<Integer, String> fn = new SimpleFunction<Integer, String>(SimpleFunctionTest::toStringThisThing) {}; assertThat(fn.getInputTypeDescriptor(), equalTo(TypeDescriptors.integers())); assertThat(fn.getOutputTypeDescriptor(), equalTo(TypeDescriptors.strings())); } | /**
* Basic test of {@link MapElements} with a lambda wrapped into a {@link SimpleFunction} to
* remember its type.
*/ | Basic test of <code>MapElements</code> with a lambda wrapped into a <code>SimpleFunction</code> to remember its type | testGoodTypeForMethodRef | {
"repo_name": "tgroh/incubator-beam",
"path": "sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/SimpleFunctionTest.java",
"license": "apache-2.0",
"size": 2593
} | [
"org.apache.beam.sdk.values.TypeDescriptors",
"org.hamcrest.Matchers",
"org.junit.Assert"
] | import org.apache.beam.sdk.values.TypeDescriptors; import org.hamcrest.Matchers; import org.junit.Assert; | import org.apache.beam.sdk.values.*; import org.hamcrest.*; import org.junit.*; | [
"org.apache.beam",
"org.hamcrest",
"org.junit"
] | org.apache.beam; org.hamcrest; org.junit; | 1,203,771 |
public Builder<TYPE> cfg(Transition configTransition) {
Preconditions.checkState(this.configTransition == ConfigurationTransition.NONE,
"the configuration transition is already set");
Preconditions.checkArgument(configTransition != ConfigurationTransition.SPLIT,
"split transitions mu... | Builder<TYPE> function(Transition configTransition) { Preconditions.checkState(this.configTransition == ConfigurationTransition.NONE, STR); Preconditions.checkArgument(configTransition != ConfigurationTransition.SPLIT, STR); if (configTransition instanceof SplitTransition) { return cfg((SplitTransition<?>) configTransi... | /**
* Defines the configuration transition for this attribute. Defaults to
* {@code NONE}.
*/ | Defines the configuration transition for this attribute. Defaults to NONE | cfg | {
"repo_name": "mrdomino/bazel",
"path": "src/main/java/com/google/devtools/build/lib/packages/Attribute.java",
"license": "apache-2.0",
"size": 82743
} | [
"com.google.devtools.build.lib.util.Preconditions"
] | import com.google.devtools.build.lib.util.Preconditions; | import com.google.devtools.build.lib.util.*; | [
"com.google.devtools"
] | com.google.devtools; | 2,283,743 |
public String getAllText(String patternString, Tree<XmlLite.Data> node, String delim) {
final StringBuilder result = new StringBuilder();
final List<String> texts = getText(patternString, node, true, false);
if (texts != null) {
for (String text : texts) {
if (result.length() > 0) result.ap... | String function(String patternString, Tree<XmlLite.Data> node, String delim) { final StringBuilder result = new StringBuilder(); final List<String> texts = getText(patternString, node, true, false); if (texts != null) { for (String text : texts) { if (result.length() > 0) result.append(delim); result.append(text); } } ... | /**
* Get all (deep) text under the node, concatenating using the given delim
* as a single string.
*
* @param patternString the xpath pattern to apply.
* @param node the node to which to apply the pattern.
* @param delim the delimiter to use when concatenating multiple strings.
*/ | Get all (deep) text under the node, concatenating using the given delim as a single string | getAllText | {
"repo_name": "KoehlerSB747/sd-tools",
"path": "src/main/java/org/sd/xml/XPathApplicator.java",
"license": "apache-2.0",
"size": 11414
} | [
"java.util.List",
"org.sd.util.tree.Tree"
] | import java.util.List; import org.sd.util.tree.Tree; | import java.util.*; import org.sd.util.tree.*; | [
"java.util",
"org.sd.util"
] | java.util; org.sd.util; | 2,914,916 |
public void tablaHistorico(){
tablaHistorial.setModel(p.cargarHistorial(op));
tablaHistorial.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);
tablaHistorial.getColumnModel().getColumn(0).setMaxWidth(60);
tablaHistorial.getColumnModel().getColumn(1).setMinWidth(160);
tabla... | void function(){ tablaHistorial.setModel(p.cargarHistorial(op)); tablaHistorial.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS); tablaHistorial.getColumnModel().getColumn(0).setMaxWidth(60); tablaHistorial.getColumnModel().getColumn(1).setMinWidth(160); tablaHistorial.setAutoCreateRowSorter(true); } | /**
* Se encarga de mostrar todos los pagos aplicados al registro seleccionado.
*/ | Se encarga de mostrar todos los pagos aplicados al registro seleccionado | tablaHistorico | {
"repo_name": "zavex/agrarian2",
"path": "src/vista/frmRegistrarPago.java",
"license": "gpl-3.0",
"size": 53403
} | [
"javax.swing.JTable"
] | import javax.swing.JTable; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,636,739 |
public static void waitForLatch(CountDownLatch latch) throws InterruptedException {
assertTrue("Latch has got to return within a minute", latch.await(1, TimeUnit.MINUTES));
} | static void function(CountDownLatch latch) throws InterruptedException { assertTrue(STR, latch.await(1, TimeUnit.MINUTES)); } | /**
* Asserts that latch completes within a (rather large interval).
* <p>
* Use this instead of just calling {@code latch.await()}. Otherwise your test may hang the whole
* test run if it fails to count-down the latch.
*
* @param latch
* @throws InterruptedException
*/ | Asserts that latch completes within a (rather large interval). Use this instead of just calling latch.await(). Otherwise your test may hang the whole test run if it fails to count-down the latch | waitForLatch | {
"repo_name": "tabish121/activemq-artemis",
"path": "artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java",
"license": "apache-2.0",
"size": 98832
} | [
"java.util.concurrent.CountDownLatch",
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 579,727 |
public static Locale toLocale(String langcode) {
if (langcode == null) {
return null;
}
Locale l;
String[] split = langcode.split("[_-]", 3);
if (split.length == 1) {
l = new Locale(split[0]);
} else if (split.length == 2) {
l = new Locale(split[0], split[1]);
} else {
l = new Locale(spl... | static Locale function(String langcode) { if (langcode == null) { return null; } Locale l; String[] split = langcode.split("[_-]", 3); if (split.length == 1) { l = new Locale(split[0]); } else if (split.length == 2) { l = new Locale(split[0], split[1]); } else { l = new Locale(split[0], split[1], split[2]); } return l;... | /**
* Convert a language code into a Locale.
*
* @param langcode the language code (<code>null</code> ok).
* @return the corresponding locale (or <code>null</code> if the input was <code>null</code>)
*/ | Convert a language code into a Locale | toLocale | {
"repo_name": "joebowen/landing_zone_project",
"path": "openrocket-release-15.03/core/src/net/sf/openrocket/l10n/L10N.java",
"license": "gpl-2.0",
"size": 9748
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 1,223,241 |
String getJobSubmitHostName() {
String hostname = get(MRJobConfig.JOB_SUBMITHOST);
return hostname;
} | String getJobSubmitHostName() { String hostname = get(MRJobConfig.JOB_SUBMITHOST); return hostname; } | /**
* Get the JobSubmitHostName for this job.
*
* @return the JobSubmitHostName for this job.
*/ | Get the JobSubmitHostName for this job | getJobSubmitHostName | {
"repo_name": "moreus/hadoop",
"path": "hadoop-0.23.10/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobConf.java",
"license": "apache-2.0",
"size": 67409
} | [
"org.apache.hadoop.mapreduce.MRJobConfig"
] | import org.apache.hadoop.mapreduce.MRJobConfig; | import org.apache.hadoop.mapreduce.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 685,525 |
public static <T> byte[] toByteArray(T message, Schema<T> schema, LinkedBuffer buffer)
{
if(buffer.start != buffer.offset)
throw new IllegalArgumentException("Buffer previously used and had not been reset.");
final YamlOutput output = new YamlOutput(buffer, schema);
... | static <T> byte[] function(T message, Schema<T> schema, LinkedBuffer buffer) { if(buffer.start != buffer.offset) throw new IllegalArgumentException(STR); final YamlOutput output = new YamlOutput(buffer, schema); try { output.tail = YamlOutput.writeTag( schema.messageName(), false, output.sink, output, output.sink.write... | /**
* Serializes the {@code message} into a byte array with the
* supplied buffer.
*/ | Serializes the message into a byte array with the supplied buffer | toByteArray | {
"repo_name": "svn2github/protostuff",
"path": "protostuff-yaml/src/main/java/com/dyuproject/protostuff/YamlIOUtil.java",
"license": "apache-2.0",
"size": 7142
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,317,303 |
public static ScannerSupplier allChecks() {
return ScannerSupplier.fromBugCheckerInfos(
Iterables.concat(ENABLED_ERRORS, ENABLED_WARNINGS, DISABLED_CHECKS));
} | static ScannerSupplier function() { return ScannerSupplier.fromBugCheckerInfos( Iterables.concat(ENABLED_ERRORS, ENABLED_WARNINGS, DISABLED_CHECKS)); } | /**
* Returns a {@link ScannerSupplier} with all {@link BugChecker}s in Error Prone.
*/ | Returns a <code>ScannerSupplier</code> with all <code>BugChecker</code>s in Error Prone | allChecks | {
"repo_name": "davidzchen/error-prone",
"path": "core/src/main/java/com/google/errorprone/scanner/BuiltInCheckerSuppliers.java",
"license": "apache-2.0",
"size": 14429
} | [
"com.google.common.collect.Iterables"
] | import com.google.common.collect.Iterables; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 315,706 |
void sendAccountActivationLinkEmail(PerunSession sess, Member member, String namespace, String url, String mailAttributeUrn, String language) throws PrivilegeException, MemberNotExistsException, UserNotExistsException, AttributeNotExistsException, PasswordResetMailNotExistsException; | void sendAccountActivationLinkEmail(PerunSession sess, Member member, String namespace, String url, String mailAttributeUrn, String language) throws PrivilegeException, MemberNotExistsException, UserNotExistsException, AttributeNotExistsException, PasswordResetMailNotExistsException; | /**
* Send mail to user's preferred email address with link for non-authz account activation.
* Correct authz information is stored in link's URL.
*
* @param sess PerunSession
* @param member Member to get user to send link mail to
* @param namespace namespace to activate account in (member must have login ... | Send mail to user's preferred email address with link for non-authz account activation. Correct authz information is stored in link's URL | sendAccountActivationLinkEmail | {
"repo_name": "balcirakpeter/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/MembersManager.java",
"license": "bsd-2-clause",
"size": 64459
} | [
"cz.metacentrum.perun.core.api.exceptions.AttributeNotExistsException",
"cz.metacentrum.perun.core.api.exceptions.MemberNotExistsException",
"cz.metacentrum.perun.core.api.exceptions.PasswordResetMailNotExistsException",
"cz.metacentrum.perun.core.api.exceptions.PrivilegeException",
"cz.metacentrum.perun.co... | import cz.metacentrum.perun.core.api.exceptions.AttributeNotExistsException; import cz.metacentrum.perun.core.api.exceptions.MemberNotExistsException; import cz.metacentrum.perun.core.api.exceptions.PasswordResetMailNotExistsException; import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import cz.metace... | import cz.metacentrum.perun.core.api.exceptions.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 2,691,087 |
public AccessControl createAccessControl(ConfigElement params)
throws ACLParseException {
// Get the access type
int access = parseAccessType(params);
// Check if the single IP address format has been specified
String val = params.getAttribute("ip");
if ( val != null) {
// Validate the par... | AccessControl function(ConfigElement params) throws ACLParseException { int access = parseAccessType(params); String val = params.getAttribute("ip"); if ( val != null) { if ( val.length() == 0 IPAddress.isNumericAddress(val) == false) throw new ACLParseException(STR + val); if ( params.getAttributeCount() != 2) throw n... | /**
* Validate the parameters and create an address access control
*
* @param params ConfigElement
* @return AccessControl
* @throws ACLParseException
*/ | Validate the parameters and create an address access control | createAccessControl | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/alfresco-jlan/source/java/org/alfresco/jlan/server/auth/acl/IpAddressAccessControlParser.java",
"license": "lgpl-3.0",
"size": 3011
} | [
"org.alfresco.jlan.util.IPAddress",
"org.springframework.extensions.config.ConfigElement"
] | import org.alfresco.jlan.util.IPAddress; import org.springframework.extensions.config.ConfigElement; | import org.alfresco.jlan.util.*; import org.springframework.extensions.config.*; | [
"org.alfresco.jlan",
"org.springframework.extensions"
] | org.alfresco.jlan; org.springframework.extensions; | 1,369,721 |
String stringId() throws RecognitionException {
if (input.LA(1) == DRL6Lexer.ID) {
Token id = match(input,
DRL6Lexer.ID,
null,
null,
DroolsEditorType.IDENTIFIER);
if (state.failed)
return ... | String stringId() throws RecognitionException { if (input.LA(1) == DRL6Lexer.ID) { Token id = match(input, DRL6Lexer.ID, null, null, DroolsEditorType.IDENTIFIER); if (state.failed) return null; return id.getText(); } else if (input.LA(1) == DRL6Lexer.STRING) { Token id = match(input, DRL6Lexer.STRING, null, null, Drool... | /**
* stringId := ( ID | STRING )
* @return
* @throws org.antlr.runtime.RecognitionException
*/ | stringId := ( ID | STRING ) | stringId | {
"repo_name": "wmedvede/drools",
"path": "drools-compiler/src/main/java/org/drools/compiler/lang/DRL6StrictParser.java",
"license": "apache-2.0",
"size": 172960
} | [
"org.antlr.runtime.MismatchedTokenException",
"org.antlr.runtime.RecognitionException",
"org.antlr.runtime.Token",
"org.drools.core.util.StringUtils"
] | import org.antlr.runtime.MismatchedTokenException; import org.antlr.runtime.RecognitionException; import org.antlr.runtime.Token; import org.drools.core.util.StringUtils; | import org.antlr.runtime.*; import org.drools.core.util.*; | [
"org.antlr.runtime",
"org.drools.core"
] | org.antlr.runtime; org.drools.core; | 2,362,083 |
public void assertContains(AssertionInfo info, short[] actual, short value, Index index) {
arrays.assertContains(info, failures, actual, value, index);
} | void function(AssertionInfo info, short[] actual, short value, Index index) { arrays.assertContains(info, failures, actual, value, index); } | /**
* Verifies that the given array contains the given value at the given index.
*
* @param info contains information about the assertion.
* @param actual the given array.
* @param value the value to look for.
* @param index the index where the value should be stored in the given array.
* @throws ... | Verifies that the given array contains the given value at the given index | assertContains | {
"repo_name": "mdecourci/assertj-core",
"path": "src/main/java/org/assertj/core/internal/ShortArrays.java",
"license": "apache-2.0",
"size": 14297
} | [
"org.assertj.core.api.AssertionInfo",
"org.assertj.core.data.Index"
] | import org.assertj.core.api.AssertionInfo; import org.assertj.core.data.Index; | import org.assertj.core.api.*; import org.assertj.core.data.*; | [
"org.assertj.core"
] | org.assertj.core; | 551,075 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<MicrosoftGraphLinkedResourceInner> getLinkedResourcesWithResponse(
String userId,
String todoTaskListId,
String todoTaskId,
String linkedResourceId,
List<UsersTodoListsTasksSelect> select,
List<String> ex... | @ServiceMethod(returns = ReturnType.SINGLE) Response<MicrosoftGraphLinkedResourceInner> function( String userId, String todoTaskListId, String todoTaskId, String linkedResourceId, List<UsersTodoListsTasksSelect> select, List<String> expand, Context context) { return getLinkedResourcesWithResponseAsync( userId, todoTask... | /**
* Get linkedResources from users.
*
* @param userId key: id of user.
* @param todoTaskListId key: id of todoTaskList.
* @param todoTaskId key: id of todoTask.
* @param linkedResourceId key: id of linkedResource.
* @param select Select properties to be returned.
* @param expan... | Get linkedResources from users | getLinkedResourcesWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/UsersTodoListsTasksClientImpl.java",
"license": "mit",
"size": 117318
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphLinkedResourceInner",
"com.azure.resourcemanager.authorization.fluent.models.UsersTodo... | 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.authorization.fluent.models.MicrosoftGraphLinkedResourceInner; import com.azure.resourcemanager.authorization.fluent... | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.authorization.fluent.models.*; import java.util.*; | [
"com.azure.core",
"com.azure.resourcemanager",
"java.util"
] | com.azure.core; com.azure.resourcemanager; java.util; | 252,146 |
public CodePointIterator base32Encode(final Base32Alphabet alphabet, final boolean addPadding) {
if (alphabet.isLittleEndian()) {
return new LittleEndianBase32EncodingIterator(this, addPadding, alphabet);
} else {
return new BigEndianBase32EncodingIterator(this, addPadding, a... | CodePointIterator function(final Base32Alphabet alphabet, final boolean addPadding) { if (alphabet.isLittleEndian()) { return new LittleEndianBase32EncodingIterator(this, addPadding, alphabet); } else { return new BigEndianBase32EncodingIterator(this, addPadding, alphabet); } } | /**
* Base32-encode the current stream.
*
* @param alphabet the alphabet to use
* @param addPadding {@code true} to add trailing padding, {@code false} to leave it off
* @return an iterator over the encoded characters
*/ | Base32-encode the current stream | base32Encode | {
"repo_name": "wildfly/wildfly-common",
"path": "src/main/java/org/wildfly/common/iteration/ByteIterator.java",
"license": "apache-2.0",
"size": 20524
} | [
"org.wildfly.common.codec.Base32Alphabet"
] | import org.wildfly.common.codec.Base32Alphabet; | import org.wildfly.common.codec.*; | [
"org.wildfly.common"
] | org.wildfly.common; | 2,832,895 |
@Test
public void testStatefulCallSequences() throws Throwable {
List<Callable<Integer>> tasks = Collections.nCopies(threadCount, incrementTestTask);
ExecutorService executorService = Executors.newFixedThreadPool(threadCount);
List<Future<Integer>> futures = executorService.invokeAll(tasks);
for (Future<In... | void function() throws Throwable { List<Callable<Integer>> tasks = Collections.nCopies(threadCount, incrementTestTask); ExecutorService executorService = Executors.newFixedThreadPool(threadCount); List<Future<Integer>> futures = executorService.invokeAll(tasks); for (Future<Integer> future : futures) { int incrementedV... | /**
* Tests Stateful Call sequence in concurrent threads.
*
* @throws Throwable
* Thrown in case of a test error.
*/ | Tests Stateful Call sequence in concurrent threads | testStatefulCallSequences | {
"repo_name": "punkhorn/jboss-sap-jca",
"path": "jboss-sap-jca-rar/src/test/java/org/jboss/jca/adapters/sap/integration/ITestStatefulCall.java",
"license": "lgpl-2.1",
"size": 5097
} | [
"java.util.Collections",
"java.util.List",
"java.util.concurrent.Callable",
"java.util.concurrent.ExecutorService",
"java.util.concurrent.Executors",
"java.util.concurrent.Future",
"org.junit.Assert"
] | import java.util.Collections; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import org.junit.Assert; | import java.util.*; import java.util.concurrent.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 2,103,777 |
private String getProblemIcd9Code() {
String sIcd9Code = "";
if (NullChecker.isNotNullish(this.icdCode)) {
sIcd9Code = stripIcd9CodeFromUrn(this.icdCode);
}
return sIcd9Code;
}
| String function() { String sIcd9Code = ""; if (NullChecker.isNotNullish(this.icdCode)) { sIcd9Code = stripIcd9CodeFromUrn(this.icdCode); } return sIcd9Code; } | /**
* This returns the ICD9 Code for this result if it exists. If it does not, then "" is returned.
*
* @return The ICD9 Code for the result if it exists. If it does not, then "" is returned.
*/ | This returns the ICD9 Code for this result if it exists. If it does not, then "" is returned | getProblemIcd9Code | {
"repo_name": "KRMAssociatesInc/eHMP",
"path": "ehmp/product/production/hmp-main/src/main/java/gov/va/cpe/vpr/Problem.java",
"license": "apache-2.0",
"size": 17351
} | [
"gov.va.hmp.util.NullChecker"
] | import gov.va.hmp.util.NullChecker; | import gov.va.hmp.util.*; | [
"gov.va.hmp"
] | gov.va.hmp; | 2,118,820 |
@Test
public void startWithForceOverwritesExistingPidFile() throws Exception {
givenPidFile(localPid);
startLocator(withForce());
assertThatPidIsAlive(getLocatorPid());
assertThat(getLocatorPid()).isNotEqualTo(localPid);
} | void function() throws Exception { givenPidFile(localPid); startLocator(withForce()); assertThatPidIsAlive(getLocatorPid()); assertThat(getLocatorPid()).isNotEqualTo(localPid); } | /**
* This test takes > 1 minute to run in {@link LocatorLauncherRemoteFileIntegrationTest}.
*/ | This test takes > 1 minute to run in <code>LocatorLauncherRemoteFileIntegrationTest</code> | startWithForceOverwritesExistingPidFile | {
"repo_name": "smanvi-pivotal/geode",
"path": "geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherRemoteIntegrationTest.java",
"license": "apache-2.0",
"size": 9660
} | [
"org.assertj.core.api.Assertions"
] | import org.assertj.core.api.Assertions; | import org.assertj.core.api.*; | [
"org.assertj.core"
] | org.assertj.core; | 266,847 |
public static Instituicao encontrePorId(Integer editarId) throws Exception {
Transaction trans = new Transaction();
try {
trans.begin();
InstituicaoDAO dao = new InstituicaoDAO(trans);
Instituicao obj = dao.encontrePorId(editarId);
return obj;
} catch (Exception e) {
e.printStackTrace();
th... | static Instituicao function(Integer editarId) throws Exception { Transaction trans = new Transaction(); try { trans.begin(); InstituicaoDAO dao = new InstituicaoDAO(trans); Instituicao obj = dao.encontrePorId(editarId); return obj; } catch (Exception e) { e.printStackTrace(); throw new Exception(e); } finally { trans.c... | /**
* Encontra por ID
*
* @param editarId
* @return
* @throws Exception
*/ | Encontra por ID | encontrePorId | {
"repo_name": "utfpr-dv/derdi-dv",
"path": "sigeu/src/br/edu/utfpr/dv/sigeu/service/InstituicaoService.java",
"license": "gpl-2.0",
"size": 2838
} | [
"br.edu.utfpr.dv.sigeu.dao.InstituicaoDAO",
"br.edu.utfpr.dv.sigeu.entities.Instituicao",
"br.edu.utfpr.dv.sigeu.persistence.Transaction"
] | import br.edu.utfpr.dv.sigeu.dao.InstituicaoDAO; import br.edu.utfpr.dv.sigeu.entities.Instituicao; import br.edu.utfpr.dv.sigeu.persistence.Transaction; | import br.edu.utfpr.dv.sigeu.dao.*; import br.edu.utfpr.dv.sigeu.entities.*; import br.edu.utfpr.dv.sigeu.persistence.*; | [
"br.edu.utfpr"
] | br.edu.utfpr; | 2,672,826 |
public void verify(BCParameters bcParameters, String id){
BigInteger gRootSquared = gRoot.pow(2).mod(bcParameters.getN());
BigInteger hRootSquared = hRoot.pow(2).mod(bcParameters.getN());
if(! bcParameters.getH().equals(gRootSquared) || ! bcParameters.getG().equals(hRootSquared)){
... | void function(BCParameters bcParameters, String id){ BigInteger gRootSquared = gRoot.pow(2).mod(bcParameters.getN()); BigInteger hRootSquared = hRoot.pow(2).mod(bcParameters.getN()); if(! bcParameters.getH().equals(gRootSquared) ! bcParameters.getG().equals(hRootSquared)){ throw new ProtocolException(STR + id + STR); }... | /**
* Verifies this zk proof for the given bcParameters.
* @param bcParameters
* @param id
*/ | Verifies this zk proof for the given bcParameters | verify | {
"repo_name": "ChristopherMann/2FactorWallet",
"path": "wallet_lib/src/main/java/de/uni_bonn/bit/wallet_protocol/ZKProofInit.java",
"license": "apache-2.0",
"size": 2877
} | [
"de.uni_bonn.bit.BCParameters",
"de.uni_bonn.bit.ProtocolException",
"java.math.BigInteger"
] | import de.uni_bonn.bit.BCParameters; import de.uni_bonn.bit.ProtocolException; import java.math.BigInteger; | import de.uni_bonn.bit.*; import java.math.*; | [
"de.uni_bonn.bit",
"java.math"
] | de.uni_bonn.bit; java.math; | 874,790 |
//-----------------------------------------------------------------------
public static DayOfWeek of(int dayOfWeek) {
if (dayOfWeek < 1 || dayOfWeek > 7) {
throw new DateTimeException("Invalid value for DayOfWeek: " + dayOfWeek);
}
return ENUMS[dayOfWeek - 1];
}
//-... | static DayOfWeek function(int dayOfWeek) { if (dayOfWeek < 1 dayOfWeek > 7) { throw new DateTimeException(STR + dayOfWeek); } return ENUMS[dayOfWeek - 1]; } /** * Obtains an instance of {@code DayOfWeek} from a temporal object. * <p> * This obtains a day-of-week based on the specified temporal. * A {@code TemporalAcces... | /**
* Obtains an instance of {@code DayOfWeek} from an {@code int} value.
* <p>
* {@code DayOfWeek} is an enum representing the 7 days of the week.
* This factory allows the enum to be obtained from the {@code int} value.
* The {@code int} value follows the ISO-8601 standard, from 1 (Monday) to... | Obtains an instance of DayOfWeek from an int value. DayOfWeek is an enum representing the 7 days of the week. This factory allows the enum to be obtained from the int value. The int value follows the ISO-8601 standard, from 1 (Monday) to 7 (Sunday) | of | {
"repo_name": "isaacl/openjdk-jdk",
"path": "src/share/classes/java/time/DayOfWeek.java",
"license": "gpl-2.0",
"size": 19893
} | [
"java.time.temporal.ChronoField",
"java.time.temporal.TemporalAccessor",
"java.time.temporal.TemporalQuery"
] | import java.time.temporal.ChronoField; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalQuery; | import java.time.temporal.*; | [
"java.time"
] | java.time; | 1,499,827 |
private void updatePatch()
{
for (int i=0; i<3; i++) {
_rgbLabels[i].setText("" + _rgbSliders[i].getValue());
}
final Color colour = new Color(_rgbSliders[0].getValue(),
_rgbSliders[1].getValue(),_rgbSliders[2].getValue());
_patch.setColour(colour);
} | void function() { for (int i=0; i<3; i++) { _rgbLabels[i].setText("" + _rgbSliders[i].getValue()); } final Color colour = new Color(_rgbSliders[0].getValue(), _rgbSliders[1].getValue(),_rgbSliders[2].getValue()); _patch.setColour(colour); } | /**
* Update the patch colour from the slider values
*/ | Update the patch colour from the slider values | updatePatch | {
"repo_name": "ta-apps/GpsPrune",
"path": "src/tim/prune/gui/ColourChooser.java",
"license": "gpl-2.0",
"size": 4455
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 372,287 |
// @issue if the product subclasses this page, then it should provide
// the help content
PlatformUI
.getWorkbench()
.getHelpSystem()
.setHelp(
parent,
org.eclipse.ui.internal.IWorkbenchHelpContextIds.PERSPECTIVES_PREFERENCE_PAGE);
Composite composite = createComposite(pare... | PlatformUI .getWorkbench() .getHelpSystem() .setHelp( parent, org.eclipse.ui.internal.IWorkbenchHelpContextIds.PERSPECTIVES_PREFERENCE_PAGE); Composite composite = createComposite(parent); createOpenPerspButtonGroup(composite); createProjectPerspectiveGroup(composite); createCustomizePerspective(composite); return comp... | /**
* Creates the page's UI content.
*/ | Creates the page's UI content | createContents | {
"repo_name": "elucash/eclipse-oxygen",
"path": "org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEPerspectivesPreferencePage.java",
"license": "epl-1.0",
"size": 4210
} | [
"org.eclipse.swt.widgets.Composite",
"org.eclipse.ui.PlatformUI"
] | import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.PlatformUI; | import org.eclipse.swt.widgets.*; import org.eclipse.ui.*; | [
"org.eclipse.swt",
"org.eclipse.ui"
] | org.eclipse.swt; org.eclipse.ui; | 2,672,685 |
void removeGroupAuthority(String groupName, GrantedAuthority authority); | void removeGroupAuthority(String groupName, GrantedAuthority authority); | /**
* Deletes an authority from those assigned to a group
*/ | Deletes an authority from those assigned to a group | removeGroupAuthority | {
"repo_name": "zshift/spring-security",
"path": "core/src/main/java/org/springframework/security/provisioning/GroupManager.java",
"license": "apache-2.0",
"size": 2458
} | [
"org.springframework.security.core.GrantedAuthority"
] | import org.springframework.security.core.GrantedAuthority; | import org.springframework.security.core.*; | [
"org.springframework.security"
] | org.springframework.security; | 2,209,623 |
private void performExtrusion() {
// create extrusion
Collection<Command> cmds = new LinkedList<Command>();
Way wnew = new Way(selectedSegment.way);
boolean wayWasModified = false;
boolean wayWasSingleSegment = wnew.getNodesCount() == 2;
int insertionPoint = selectedS... | void function() { Collection<Command> cmds = new LinkedList<Command>(); Way wnew = new Way(selectedSegment.way); boolean wayWasModified = false; boolean wayWasSingleSegment = wnew.getNodesCount() == 2; int insertionPoint = selectedSegment.lowerIndex + 1; Node prevNode = getPreviousNode(selectedSegment.lowerIndex); bool... | /**
* Do actual extrusion of @field selectedSegment
*/ | Do actual extrusion of @field selectedSegment | performExtrusion | {
"repo_name": "CURocketry/Ground_Station_GUI",
"path": "src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java",
"license": "gpl-3.0",
"size": 35972
} | [
"java.util.Collection",
"java.util.LinkedList",
"org.openstreetmap.josm.Main",
"org.openstreetmap.josm.command.AddCommand",
"org.openstreetmap.josm.command.ChangeCommand",
"org.openstreetmap.josm.command.Command",
"org.openstreetmap.josm.command.MoveCommand",
"org.openstreetmap.josm.command.SequenceCo... | import java.util.Collection; import java.util.LinkedList; import org.openstreetmap.josm.Main; import org.openstreetmap.josm.command.AddCommand; import org.openstreetmap.josm.command.ChangeCommand; import org.openstreetmap.josm.command.Command; import org.openstreetmap.josm.command.MoveCommand; import org.openstreetmap.... | import java.util.*; import org.openstreetmap.josm.*; import org.openstreetmap.josm.command.*; import org.openstreetmap.josm.data.osm.*; import org.openstreetmap.josm.tools.*; | [
"java.util",
"org.openstreetmap.josm"
] | java.util; org.openstreetmap.josm; | 2,495,589 |
public String getGivenName() {
return getAttribute(GlobalProps.getProperty(GlobalProps.PROP_LDAPATTR_GIVENNAME, "givenName"));
} | String function() { return getAttribute(GlobalProps.getProperty(GlobalProps.PROP_LDAPATTR_GIVENNAME, STR)); } | /**
* getGivenName
*
* Autralian National University Data Commons
*
* Convenience method that returns Display Name property of an LDAP entry. Used in JSP files:
*
* <c:out value="${user.givenName}" />
*
* <pre>
* Version Date Developer Description
* 0.1 16/03/2012 Rahul Khanna (RK) Initial... | getGivenName Autralian National University Data Commons Convenience method that returns Display Name property of an LDAP entry. Used in JSP files: <code> Version Date Developer Description 0.1 16/03/2012 Rahul Khanna (RK) Initial </code> | getGivenName | {
"repo_name": "anu-doi/anudc",
"path": "DataCommons/src/main/java/au/edu/anu/datacommons/ldap/LdapPerson.java",
"license": "gpl-3.0",
"size": 5723
} | [
"au.edu.anu.datacommons.properties.GlobalProps"
] | import au.edu.anu.datacommons.properties.GlobalProps; | import au.edu.anu.datacommons.properties.*; | [
"au.edu.anu"
] | au.edu.anu; | 2,292,134 |
public static ErrorCodes defaultErrorCodes() throws IOException, TransformerException, SAXException, ParserConfigurationException {
String loc = "/data/errors.xml";
InputStream in = ErrorCodes.class.getResourceAsStream(loc);
return builder().from(loc, in).build();
}
private ErrorCodes(Map<String, ... | static ErrorCodes function() throws IOException, TransformerException, SAXException, ParserConfigurationException { String loc = STR; InputStream in = ErrorCodes.class.getResourceAsStream(loc); return builder().from(loc, in).build(); } private ErrorCodes(Map<String, ErrorCode> list) { this.list = new HashMap<>(list); } | /**
* Build the default set of error codes.
*
* @return ErrorCodesBuilder
* @throws IOException
* @throws TransformerException
* @throws SAXException
* @throws ParserConfigurationException
*/ | Build the default set of error codes | defaultErrorCodes | {
"repo_name": "emmental/isetools",
"path": "src/main/java/ca/nines/ise/log/ErrorCodes.java",
"license": "gpl-2.0",
"size": 6387
} | [
"java.io.IOException",
"java.io.InputStream",
"java.util.HashMap",
"java.util.Map",
"javax.xml.parsers.ParserConfigurationException",
"javax.xml.transform.TransformerException",
"org.xml.sax.SAXException"
] | import java.io.IOException; import java.io.InputStream; import java.util.HashMap; import java.util.Map; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; import org.xml.sax.SAXException; | import java.io.*; import java.util.*; import javax.xml.parsers.*; import javax.xml.transform.*; import org.xml.sax.*; | [
"java.io",
"java.util",
"javax.xml",
"org.xml.sax"
] | java.io; java.util; javax.xml; org.xml.sax; | 725,446 |
TableReference getTable() {
return table;
}
| TableReference getTable() { return table; } | /**
* Gets the table to merge the data into.
*
* @return the table.
*/ | Gets the table to merge the data into | getTable | {
"repo_name": "badgerwithagun/morf",
"path": "morf-core/src/main/java/org/alfasoftware/morf/sql/MergeStatementBuilder.java",
"license": "apache-2.0",
"size": 5521
} | [
"org.alfasoftware.morf.sql.element.TableReference"
] | import org.alfasoftware.morf.sql.element.TableReference; | import org.alfasoftware.morf.sql.element.*; | [
"org.alfasoftware.morf"
] | org.alfasoftware.morf; | 1,432,067 |
@FIXVersion(introduced="5.0")
@TagNumRef(tagNum=TagNum.TransactTime)
public Date getTransactTime() {
return transactTime;
} | @FIXVersion(introduced="5.0") @TagNumRef(tagNum=TagNum.TransactTime) Date function() { return transactTime; } | /**
* Message field getter.
* @return field value
*/ | Message field getter | getTransactTime | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/TradeCaptureReportAckMsg.java",
"license": "gpl-3.0",
"size": 118717
} | [
"java.util.Date",
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.TagNum"
] | import java.util.Date; import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum; | import java.util.*; import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*; | [
"java.util",
"net.hades.fix"
] | java.util; net.hades.fix; | 544,564 |
void startIdleAnimations()
{
cleanUpAnimation();
mAnimationFocalBreathing = ValueAnimator.ofFloat(1, 1.1f, 1);
mAnimationFocalBreathing.setInterpolator(mView.mPromptOptions.getAnimationInterpolator());
mAnimationFocalBreathing.setDuration(1000);
mAnimationFocalBreathing.s... | void startIdleAnimations() { cleanUpAnimation(); mAnimationFocalBreathing = ValueAnimator.ofFloat(1, 1.1f, 1); mAnimationFocalBreathing.setInterpolator(mView.mPromptOptions.getAnimationInterpolator()); mAnimationFocalBreathing.setDuration(1000); mAnimationFocalBreathing.setStartDelay(225); mAnimationFocalBreathing.setR... | /**
* Starts the prompt idle animations.
*/ | Starts the prompt idle animations | startIdleAnimations | {
"repo_name": "WyrnCael/JotDownThatMovie",
"path": "app/src/main/java/com/wyrnlab/jotdownthatmovie/ExternalLibraries/materialtaptagetprompt/MaterialTapTargetPrompt.java",
"license": "apache-2.0",
"size": 44207
} | [
"android.animation.ValueAnimator"
] | import android.animation.ValueAnimator; | import android.animation.*; | [
"android.animation"
] | android.animation; | 492,411 |
public ServiceFuture<DigitalTwinsDescriptionInner> updateAsync(String resourceGroupName, String resourceName, Map<String, String> tags, final ServiceCallback<DigitalTwinsDescriptionInner> serviceCallback) {
return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, resourceName, tag... | ServiceFuture<DigitalTwinsDescriptionInner> function(String resourceGroupName, String resourceName, Map<String, String> tags, final ServiceCallback<DigitalTwinsDescriptionInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, resourceName, tags), serviceCallback); ... | /**
* Update metadata of DigitalTwinsInstance.
*
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
* @param resourceName The name of the DigitalTwinsInstance.
* @param tags Instance tags
* @param serviceCallback the async ServiceCallback to h... | Update metadata of DigitalTwinsInstance | updateAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/digitaltwins/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/digitaltwins/v2020_03_01_preview/implementation/DigitalTwinsInner.java",
"license": "mit",
"size": 84895
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture",
"java.util.Map"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import java.util.Map; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 2,465,695 |
public PublicIPAddressInner beginUpdateTags(String resourceGroupName, String publicIpAddressName, Map<String, String> tags) {
return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName, tags).toBlocking().single().body();
} | PublicIPAddressInner function(String resourceGroupName, String publicIpAddressName, Map<String, String> tags) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName, tags).toBlocking().single().body(); } | /**
* Updates public IP address tags.
*
* @param resourceGroupName The name of the resource group.
* @param publicIpAddressName The name of the public IP address.
* @param tags Resource tags.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudEx... | Updates public IP address tags | beginUpdateTags | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/PublicIPAddressesInner.java",
"license": "mit",
"size": 130257
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 158,348 |
private void buildComponents() {
mToolsActionGrid = new QuickActionGrid(this);
mToolsActionGrid.addQuickAction(new QuickAction(this, R.drawable.ic_btn_home,
R.string.QuickAction_Home));
mToolsActionGrid.addQuickAction(new QuickAction(this, R.drawable.ic_btn_share,
R.string.QuickAction_Share));
mTool... | void function() { mToolsActionGrid = new QuickActionGrid(this); mToolsActionGrid.addQuickAction(new QuickAction(this, R.drawable.ic_btn_home, R.string.QuickAction_Home)); mToolsActionGrid.addQuickAction(new QuickAction(this, R.drawable.ic_btn_share, R.string.QuickAction_Share)); mToolsActionGrid.addQuickAction(new Quic... | /**
* Create main UI.
*/ | Create main UI | buildComponents | {
"repo_name": "udo-tech-team/ShadowsocksProxy",
"path": "src/org/shadowsocks/zirco/ui/activities/MainActivity.java",
"license": "gpl-3.0",
"size": 55388
} | [
"android.view.Menu",
"org.greendroid.QuickAction",
"org.greendroid.QuickActionGrid"
] | import android.view.Menu; import org.greendroid.QuickAction; import org.greendroid.QuickActionGrid; | import android.view.*; import org.greendroid.*; | [
"android.view",
"org.greendroid"
] | android.view; org.greendroid; | 1,713,234 |
public List<String> getStrs(String key, List<String> def) {
Object v = null;
if (ROOT_OBJ.equals(key)) {
v = getRootPrimitive();
} else {
v = getMapVal(key);
}
if (v == null) {
return def;
} else {
if (v instanceof List) {
ArrayList<String> l = new ArrayList<>()... | List<String> function(String key, List<String> def) { Object v = null; if (ROOT_OBJ.equals(key)) { v = getRootPrimitive(); } else { v = getMapVal(key); } if (v == null) { return def; } else { if (v instanceof List) { ArrayList<String> l = new ArrayList<>(); for (Object o : (List) v) { l.add(String.valueOf(o)); } if (l.... | /**
* Get collection of values for a key. If only one val is present a
* single value collection is returned
*/ | Get collection of values for a key. If only one val is present a single value collection is returned | getStrs | {
"repo_name": "DavidGutknecht/elexis-3-base",
"path": "bundles/org.apache.solr/src/org/apache/solr/common/util/CommandOperation.java",
"license": "epl-1.0",
"size": 12050
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,235,733 |
public static org.opennms.netmgt.config.rrd.OptionBorder unmarshal(
final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (org.opennms.netmgt.config.rrd.OptionBorder) Unmarshaller.unmarshal(org.opennms.netmgt.config.rrd... | static org.opennms.netmgt.config.rrd.OptionBorder function( final java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (org.opennms.netmgt.config.rrd.OptionBorder) Unmarshaller.unmarshal(org.opennms.netmgt.config.rrd.Border.class, reader); } | /**
* Method unmarshal.
*
* @param reader
* @throws org.exolab.castor.xml.MarshalException if object is
* null or if any SAXException is thrown during marshaling
* @throws org.exolab.castor.xml.ValidationException if this
* object is an invalid instance according to the schema
*... | Method unmarshal | unmarshal | {
"repo_name": "vishwaAbhinav/OpenNMS",
"path": "opennms-webapp/target/generated-sources/castor/org/opennms/netmgt/config/rrd/Border.java",
"license": "gpl-2.0",
"size": 3336
} | [
"org.exolab.castor.xml.Unmarshaller"
] | import org.exolab.castor.xml.Unmarshaller; | import org.exolab.castor.xml.*; | [
"org.exolab.castor"
] | org.exolab.castor; | 430,464 |
g.setColor(Color.BLACK);
g.fillRect(0, 0, getWidth(), getHeight());
g.setClip(area.x, area.y, area.width, area.height);
for(int y = area.y; y < area.y + area.height; y += size * PATTERN_SIZE) {
for(int x = area.x; x < area.x + area.width; x += size * PATTERN_SIZE) {
g.drawImage(pattern, x, y, size * P... | g.setColor(Color.BLACK); g.fillRect(0, 0, getWidth(), getHeight()); g.setClip(area.x, area.y, area.width, area.height); for(int y = area.y; y < area.y + area.height; y += size * PATTERN_SIZE) { for(int x = area.x; x < area.x + area.width; x += size * PATTERN_SIZE) { g.drawImage(pattern, x, y, size * PATTERN_SIZE, size ... | /**
* Draw the BG in the specified area.
*/ | Draw the BG in the specified area | paintComponent | {
"repo_name": "w-shackleton/patchworker",
"path": "src/uk/digitalsquid/patchworker/ui/PatternPanel.java",
"license": "gpl-3.0",
"size": 2694
} | [
"java.awt.Color",
"java.awt.Rectangle"
] | import java.awt.Color; import java.awt.Rectangle; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,807,770 |
public void testParseVersion() throws Exception {
CookieSpec cookiespec = new RFC2965Spec();
Header header = new Header("Set-Cookie2", "name=value;Version=1;");
Cookie[] parsed = cookiespec.parse("www.domain.com", 80, "/", false, header);
assertNotNull(parsed);
assertEquals(1... | void function() throws Exception { CookieSpec cookiespec = new RFC2965Spec(); Header header = new Header(STR, STR); Cookie[] parsed = cookiespec.parse(STR, 80, "/", false, header); assertNotNull(parsed); assertEquals(1, parsed.length); Cookie2 cookie = (Cookie2) parsed[0]; assertEquals(1, cookie.getVersion()); assertTr... | /**
* test parsing cookie <tt>"Version"</tt> attribute.
*/ | test parsing cookie "Version" attribute | testParseVersion | {
"repo_name": "huainiu/commons-httpclient-3.1",
"path": "src/test/org/apache/commons/httpclient/cookie/TestCookieRFC2965Spec.java",
"license": "apache-2.0",
"size": 37113
} | [
"org.apache.commons.httpclient.Cookie",
"org.apache.commons.httpclient.Header"
] | import org.apache.commons.httpclient.Cookie; import org.apache.commons.httpclient.Header; | import org.apache.commons.httpclient.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,728,669 |
public ListPipelinesResponse listPipelines() {
ListPipelinesRequest request = new ListPipelinesRequest();
return listPipelines(request);
} | ListPipelinesResponse function() { ListPipelinesRequest request = new ListPipelinesRequest(); return listPipelines(request); } | /**
* List all your pipelines.
*
* @return The list of all your pipelines
*/ | List all your pipelines | listPipelines | {
"repo_name": "baidubce/bce-sdk-java",
"path": "src/main/java/com/baidubce/services/media/MediaClient.java",
"license": "apache-2.0",
"size": 91398
} | [
"com.baidubce.services.media.model.ListPipelinesRequest",
"com.baidubce.services.media.model.ListPipelinesResponse"
] | import com.baidubce.services.media.model.ListPipelinesRequest; import com.baidubce.services.media.model.ListPipelinesResponse; | import com.baidubce.services.media.model.*; | [
"com.baidubce.services"
] | com.baidubce.services; | 1,847,282 |
@Override
public int onExecute(final CommandContext<CommandSource> context)
{
// Colony
final int colonyID = IntegerArgumentType.getInteger(context, COLONYID_ARG);
final IColony colony = IColonyManager.getInstance().getColonyByDimension(colonyID, context.getSource().getWorld().getDim... | int function(final CommandContext<CommandSource> context) { final int colonyID = IntegerArgumentType.getInteger(context, COLONYID_ARG); final IColony colony = IColonyManager.getInstance().getColonyByDimension(colonyID, context.getSource().getWorld().getDimensionKey()); if (colony == null) { context.getSource().sendFeed... | /**
* What happens when the command is executed after preConditions are successful.
*
* @param context the context of the command execution
*/ | What happens when the command is executed after preConditions are successful | onExecute | {
"repo_name": "Minecolonies/minecolonies",
"path": "src/main/java/com/minecolonies/coremod/commands/citizencommands/CommandCitizenKill.java",
"license": "gpl-3.0",
"size": 4205
} | [
"com.ldtteam.structurize.util.LanguageHandler",
"com.minecolonies.api.colony.ICitizenData",
"com.minecolonies.api.colony.IColony",
"com.minecolonies.api.colony.IColonyManager",
"com.minecolonies.api.entity.citizen.AbstractEntityCitizen",
"com.minecolonies.coremod.MineColonies",
"com.mojang.brigadier.arg... | import com.ldtteam.structurize.util.LanguageHandler; import com.minecolonies.api.colony.ICitizenData; import com.minecolonies.api.colony.IColony; import com.minecolonies.api.colony.IColonyManager; import com.minecolonies.api.entity.citizen.AbstractEntityCitizen; import com.minecolonies.coremod.MineColonies; import com.... | import com.ldtteam.structurize.util.*; import com.minecolonies.api.colony.*; import com.minecolonies.api.entity.citizen.*; import com.minecolonies.coremod.*; import com.mojang.brigadier.arguments.*; import com.mojang.brigadier.context.*; import java.util.*; import net.minecraft.command.*; import net.minecraft.util.math... | [
"com.ldtteam.structurize",
"com.minecolonies.api",
"com.minecolonies.coremod",
"com.mojang.brigadier",
"java.util",
"net.minecraft.command",
"net.minecraft.util"
] | com.ldtteam.structurize; com.minecolonies.api; com.minecolonies.coremod; com.mojang.brigadier; java.util; net.minecraft.command; net.minecraft.util; | 1,072,350 |
private long trySyncDown(MergeMode mergeMode) throws JSONException {
final SyncDownTarget target = new SoqlSyncDownTarget("SELECT Id, Name, LastModifiedDate FROM Account WHERE Id IN " + makeInClause(idToNames.keySet()));
return trySyncDown(mergeMode, target, idToNames, ACCOUNTS_SOUP);
} | long function(MergeMode mergeMode) throws JSONException { final SyncDownTarget target = new SoqlSyncDownTarget(STR + makeInClause(idToNames.keySet())); return trySyncDown(mergeMode, target, idToNames, ACCOUNTS_SOUP); } | /**
* Sync down helper
* @throws JSONException
* @param mergeMode
*/ | Sync down helper | trySyncDown | {
"repo_name": "huminzhi/SalesforceMobileSDK-Android",
"path": "libs/test/SmartSyncTest/src/com/salesforce/androidsdk/smartsync/manager/SyncManagerTest.java",
"license": "apache-2.0",
"size": 57743
} | [
"com.salesforce.androidsdk.smartsync.util.SoqlSyncDownTarget",
"com.salesforce.androidsdk.smartsync.util.SyncDownTarget",
"com.salesforce.androidsdk.smartsync.util.SyncState",
"org.json.JSONException"
] | import com.salesforce.androidsdk.smartsync.util.SoqlSyncDownTarget; import com.salesforce.androidsdk.smartsync.util.SyncDownTarget; import com.salesforce.androidsdk.smartsync.util.SyncState; import org.json.JSONException; | import com.salesforce.androidsdk.smartsync.util.*; import org.json.*; | [
"com.salesforce.androidsdk",
"org.json"
] | com.salesforce.androidsdk; org.json; | 2,502,200 |
@Kroll.method
public void enableAutoRanging()
{
setAutoRange(true);
} | @Kroll.method void function() { setAutoRange(true); } | /**
* Turns on auto ranging. When auto ranging is on, upon entering a region, this
* module will automatically begin ranging for beacons within that region, and
* stop ranging for beacons when the region is exited. Note ranging requires more
* battery power so care should be taken with this setting.
*/ | Turns on auto ranging. When auto ranging is on, upon entering a region, this module will automatically begin ranging for beacons within that region, and stop ranging for beacons when the region is exited. Note ranging requires more battery power so care should be taken with this setting | enableAutoRanging | {
"repo_name": "RobQuistNL/android-altbeacon-module",
"path": "android/src/com/drtech/altbeacon/AndroidAltbeaconModuleModule.java",
"license": "apache-2.0",
"size": 18300
} | [
"org.appcelerator.kroll.annotations.Kroll"
] | import org.appcelerator.kroll.annotations.Kroll; | import org.appcelerator.kroll.annotations.*; | [
"org.appcelerator.kroll"
] | org.appcelerator.kroll; | 2,364,840 |
private void cancel() {
LogManager.getInstance().logMessage(LogMessage.INFO,
"Cancelling Administration Changes and closing admin console");
setVisible(false);
Config.getEditInstance(true);
} | void function() { LogManager.getInstance().logMessage(LogMessage.INFO, STR); setVisible(false); Config.getEditInstance(true); } | /**
* The whole administration experience is cancelled - just revert back to
* old edit instance
*/ | The whole administration experience is cancelled - just revert back to old edit instance | cancel | {
"repo_name": "doctorlard/metadata-extractor",
"path": "src/java/nz/govt/natlib/meta/ui/admin/AdminWindow.java",
"license": "apache-2.0",
"size": 11003
} | [
"nz.govt.natlib.meta.config.Config",
"nz.govt.natlib.meta.log.LogManager",
"nz.govt.natlib.meta.log.LogMessage"
] | import nz.govt.natlib.meta.config.Config; import nz.govt.natlib.meta.log.LogManager; import nz.govt.natlib.meta.log.LogMessage; | import nz.govt.natlib.meta.config.*; import nz.govt.natlib.meta.log.*; | [
"nz.govt.natlib"
] | nz.govt.natlib; | 647,510 |
@Override
public void update(@NotNull final AnActionEvent e) {
final Project project = e.getProject();
final Editor editor = e.getData(CommonDataKeys.EDITOR);
// Make sure at least one caret is available
boolean menuAllowed = false;
if (editor != null && project != null) {
// Ensure the li... | void function(@NotNull final AnActionEvent e) { final Project project = e.getProject(); final Editor editor = e.getData(CommonDataKeys.EDITOR); boolean menuAllowed = false; if (editor != null && project != null) { menuAllowed = !editor.getCaretModel().getAllCarets().isEmpty(); } e.getPresentation().setEnabledAndVisible... | /**
* Enables and sets visibility of this action menu item if:
* <ul>
* <li>a project is open</li>
* <li>an editor is active</li>
* <li>at least one caret exists</li>
* </ul>
*
* @param e Event related to this action
*/ | Enables and sets visibility of this action menu item if: a project is open an editor is active at least one caret exists | update | {
"repo_name": "JetBrains/intellij-sdk-docs",
"path": "code_samples/editor_basics/src/main/java/org/intellij/sdk/editor/EditorHandlerIllustration.java",
"license": "apache-2.0",
"size": 2422
} | [
"com.intellij.openapi.actionSystem.AnActionEvent",
"com.intellij.openapi.actionSystem.CommonDataKeys",
"com.intellij.openapi.editor.Editor",
"com.intellij.openapi.project.Project",
"org.jetbrains.annotations.NotNull"
] | import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.CommonDataKeys; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.project.Project; import org.jetbrains.annotations.NotNull; | import com.intellij.openapi.*; import com.intellij.openapi.editor.*; import com.intellij.openapi.project.*; import org.jetbrains.annotations.*; | [
"com.intellij.openapi",
"org.jetbrains.annotations"
] | com.intellij.openapi; org.jetbrains.annotations; | 657,370 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.