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 Item getLastCritiquedItem() {
if (mCurrentCritique != null) {
return mCurrentCritique.item();
}
return null;
} | Item function() { if (mCurrentCritique != null) { return mCurrentCritique.item(); } return null; } | /**
* Returns the last critiqued item. May be {@code null}.
*/ | Returns the last critiqued item. May be null | getLastCritiquedItem | {
"repo_name": "Nicksteal/ShopR",
"path": "Android/Shopr/src/main/java/com/uwetrottmann/shopr/algorithm/AdaptiveSelection.java",
"license": "apache-2.0",
"size": 8074
} | [
"com.uwetrottmann.shopr.algorithm.model.Item"
] | import com.uwetrottmann.shopr.algorithm.model.Item; | import com.uwetrottmann.shopr.algorithm.model.*; | [
"com.uwetrottmann.shopr"
] | com.uwetrottmann.shopr; | 92,826 |
@Override
protected List getModelChildren() {
return Collections.emptyList();
}
| List function() { return Collections.emptyList(); } | /**
* Returns a <code>List</code> containing the children
* model objects. If this EditPart's model is a container, this method should be
* overridden to returns its children. This is what causes children EditParts to be
* created.
* <P>
* Callers must not modify the returned List. Must not return <code>nul... | Returns a <code>List</code> containing the children model objects. If this EditPart's model is a container, this method should be overridden to returns its children. This is what causes children EditParts to be created. Callers must not modify the returned List. Must not return <code>null</code> | getModelChildren | {
"repo_name": "nasa/OpenSPIFe",
"path": "gov.nasa.arc.spife.ui.timeline/src/gov/nasa/arc/spife/ui/timeline/part/TreeTimelineNodeEditPart.java",
"license": "apache-2.0",
"size": 8281
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,247,911 |
private static void setImageViewScaleTypeMatrix(ImageView imageView) {
if (null != imageView) {
if (imageView instanceof EasePhotoView) {
} else {
imageView.setScaleType(ScaleType.MATRIX);
}
}
}
private WeakReference<ImageView> mImageView;
private ViewTreeObserver mViewTreeObserver;
// Ge... | static void function(ImageView imageView) { if (null != imageView) { if (imageView instanceof EasePhotoView) { } else { imageView.setScaleType(ScaleType.MATRIX); } } } WeakReference<ImageView> mImageView; private ViewTreeObserver mViewTreeObserver; private GestureDetector mGestureDetector; private VersionedGestureDetec... | /**
* Set's the ImageView's ScaleType to Matrix.
*/ | Set's the ImageView's ScaleType to Matrix | setImageViewScaleTypeMatrix | {
"repo_name": "HyphenateInc/Hyphenate-Demo-Android",
"path": "app/src/main/java/io/agora/easeui/widget/photoview/PhotoViewAttacher.java",
"license": "apache-2.0",
"size": 27631
} | [
"android.graphics.Matrix",
"android.graphics.RectF",
"android.view.GestureDetector",
"android.view.View",
"android.view.ViewTreeObserver",
"android.widget.ImageView",
"java.lang.ref.WeakReference"
] | import android.graphics.Matrix; import android.graphics.RectF; import android.view.GestureDetector; import android.view.View; import android.view.ViewTreeObserver; import android.widget.ImageView; import java.lang.ref.WeakReference; | import android.graphics.*; import android.view.*; import android.widget.*; import java.lang.ref.*; | [
"android.graphics",
"android.view",
"android.widget",
"java.lang"
] | android.graphics; android.view; android.widget; java.lang; | 2,816,260 |
private boolean exposed(Block block) {
return !blocks.contains(new Block(block.x - 1, block.y, block.z)) ||
!blocks.contains(new Block(block.x + 1, block.y, block.z)) ||
!blocks.contains(new Block(block.x, block.y - 1, block.z)) ||
!blocks.contains(new Block(block.x, block.y + 1, block.z))... | boolean function(Block block) { return !blocks.contains(new Block(block.x - 1, block.y, block.z)) !blocks.contains(new Block(block.x + 1, block.y, block.z)) !blocks.contains(new Block(block.x, block.y - 1, block.z)) !blocks.contains(new Block(block.x, block.y + 1, block.z)) !blocks.contains(new Block(block.x, block.y, ... | /**
* Checks all 6 faces of the given block and returns true if at least one face is not covered
* by another block in {@code blocks}.
*/ | Checks all 6 faces of the given block and returns true if at least one face is not covered by another block in blocks | exposed | {
"repo_name": "skligys/cardboard-creeper",
"path": "app/src/main/java/com/skligys/cardboardcreeper/World.java",
"license": "mit",
"size": 12199
} | [
"com.skligys.cardboardcreeper.model.Block"
] | import com.skligys.cardboardcreeper.model.Block; | import com.skligys.cardboardcreeper.model.*; | [
"com.skligys.cardboardcreeper"
] | com.skligys.cardboardcreeper; | 41,488 |
protected void report(Request request, Response response,
Throwable throwable) {
// Do nothing on non-HTTP responses
int statusCode = response.getStatus();
// Do nothing on a 1xx, 2xx and 3xx status
// Do nothing if anything has been written already
... | void function(Request request, Response response, Throwable throwable) { int statusCode = response.getStatus(); if (statusCode < 400 response.getContentWritten() > 0 !response.isError()) { return; } String message = RequestUtil.filter(response.getMessage()); if (message == null) { if (throwable != null) { String except... | /**
* Prints out an error report.
*
* @param request The request being processed
* @param response The response being generated
* @param throwable The exception that occurred (which possibly wraps
* a root cause exception
*/ | Prints out an error report | report | {
"repo_name": "GazeboHub/ghub-portal-doc",
"path": "doc/modelio/GHub Portal/mda/JavaDesigner/res/java/tomcat/java/org/apache/catalina/valves/ErrorReportValve.java",
"license": "epl-1.0",
"size": 10634
} | [
"java.io.IOException",
"java.io.Writer",
"java.util.Scanner",
"org.apache.catalina.connector.Request",
"org.apache.catalina.connector.Response",
"org.apache.catalina.util.RequestUtil"
] | import java.io.IOException; import java.io.Writer; import java.util.Scanner; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; import org.apache.catalina.util.RequestUtil; | import java.io.*; import java.util.*; import org.apache.catalina.connector.*; import org.apache.catalina.util.*; | [
"java.io",
"java.util",
"org.apache.catalina"
] | java.io; java.util; org.apache.catalina; | 2,164,775 |
public Mesh setInstanceData (float[] instanceData) {
if (instances != null) {
this.instances.setInstanceData(instanceData, 0, instanceData.length);
} else {
throw new GdxRuntimeException("An InstanceBufferObject must be set before setting instance data!");
}
return this;
}
| Mesh function (float[] instanceData) { if (instances != null) { this.instances.setInstanceData(instanceData, 0, instanceData.length); } else { throw new GdxRuntimeException(STR); } return this; } | /** Sets the instance data of this Mesh. The attributes are assumed to be given in float format.
*
* @param instanceData the instance data.
* @return the mesh for invocation chaining. */ | Sets the instance data of this Mesh. The attributes are assumed to be given in float format | setInstanceData | {
"repo_name": "alex-dorokhov/libgdx",
"path": "gdx/src/com/badlogic/gdx/graphics/Mesh.java",
"license": "apache-2.0",
"size": 52689
} | [
"com.badlogic.gdx.utils.GdxRuntimeException"
] | import com.badlogic.gdx.utils.GdxRuntimeException; | import com.badlogic.gdx.utils.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 1,162,935 |
public JFrame getFrame() {
return frame;
} | JFrame function() { return frame; } | /**
* Describe <code>getFrame</code> method here.
*
* @return a <code>JFrame</code> value
*/ | Describe <code>getFrame</code> method here | getFrame | {
"repo_name": "tectronics/reformationofeurope",
"path": "src/net/sf/freecol/client/ReformationClient.java",
"license": "gpl-2.0",
"size": 28591
} | [
"javax.swing.JFrame"
] | import javax.swing.JFrame; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,012,179 |
public static void postInvalidateOnAnimation(View view) {
IMPL.postInvalidateOnAnimation(view);
} | static void function(View view) { IMPL.postInvalidateOnAnimation(view); } | /**
* <p>Cause an invalidate to happen on the next animation time step, typically the
* next display frame.</p>
*
* <p>This method can be invoked from outside of the UI thread
* only when this View is attached to a window.</p>
*
* @param view View to invalidate
*/ | Cause an invalidate to happen on the next animation time step, typically the next display frame. This method can be invoked from outside of the UI thread only when this View is attached to a window | postInvalidateOnAnimation | {
"repo_name": "rytina/dukecon_appsgenerator",
"path": "org.applause.lang.generator.android/sdk/extras/android/support/v4/src/java/android/support/v4/view/ViewCompat.java",
"license": "epl-1.0",
"size": 120271
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,471,426 |
@ResponseStatus(HttpStatus.OK)
@RequestMapping(value = "/changePassword/{user_id}", method = RequestMethod.PUT)
public Message changePassword(@RequestBody final UserInfo userInfo, @PathVariable("user_id") final Long userId) {
userService.changePassword(userInfo, userId);
return new Messa... | @ResponseStatus(HttpStatus.OK) @RequestMapping(value = STR, method = RequestMethod.PUT) Message function(@RequestBody final UserInfo userInfo, @PathVariable(STR) final Long userId) { userService.changePassword(userInfo, userId); return new Message(STR); } | /**
* Change password.
*
* @param userInfo the request
* @param userId the user id
* @return the reset password
*/ | Change password | changePassword | {
"repo_name": "jonvestal/open-kilda",
"path": "src-gui/src/main/java/org/usermanagement/controller/UserController.java",
"license": "apache-2.0",
"size": 9475
} | [
"org.springframework.http.HttpStatus",
"org.springframework.web.bind.annotation.PathVariable",
"org.springframework.web.bind.annotation.RequestBody",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotation.RequestMethod",
"org.springframework.web.bind.annotation.... | import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web... | import org.springframework.http.*; import org.springframework.web.bind.annotation.*; import org.usermanagement.model.*; | [
"org.springframework.http",
"org.springframework.web",
"org.usermanagement.model"
] | org.springframework.http; org.springframework.web; org.usermanagement.model; | 818,294 |
protected Sector getByPosition(final Position entity) {
final Session session = getSessionFactory().getCurrentSession();
final Criteria criteria = session.createCriteria(Sector.class);
criteria.add(Restrictions.eq("position", entity));
return (Sector) criteria.uniqueResult();
} | Sector function(final Position entity) { final Session session = getSessionFactory().getCurrentSession(); final Criteria criteria = session.createCriteria(Sector.class); criteria.add(Restrictions.eq(STR, entity)); return (Sector) criteria.uniqueResult(); } | /**
* Get the sector from the database that corresponds to the input entity.
*
* @param entity the coordinates.
* @return an Entity object.
*/ | Get the sector from the database that corresponds to the input entity | getByPosition | {
"repo_name": "EaW1805/data",
"path": "src/main/java/com/eaw1805/data/managers/army/BrigadeManager.java",
"license": "mit",
"size": 19730
} | [
"com.eaw1805.data.model.map.Position",
"com.eaw1805.data.model.map.Sector",
"org.hibernate.Criteria",
"org.hibernate.Session",
"org.hibernate.criterion.Restrictions"
] | import com.eaw1805.data.model.map.Position; import com.eaw1805.data.model.map.Sector; import org.hibernate.Criteria; import org.hibernate.Session; import org.hibernate.criterion.Restrictions; | import com.eaw1805.data.model.map.*; import org.hibernate.*; import org.hibernate.criterion.*; | [
"com.eaw1805.data",
"org.hibernate",
"org.hibernate.criterion"
] | com.eaw1805.data; org.hibernate; org.hibernate.criterion; | 2,747,782 |
public static SpatialRange decodeHash(String geoHash) {
ArrayList<Boolean> bits = getBits(geoHash);
float[] longitude = decodeBits(bits, false);
float[] latitude = decodeBits(bits, true);
return new SpatialRange(latitude[0], latitude[1],
longitu... | static SpatialRange function(String geoHash) { ArrayList<Boolean> bits = getBits(geoHash); float[] longitude = decodeBits(bits, false); float[] latitude = decodeBits(bits, true); return new SpatialRange(latitude[0], latitude[1], longitude[0], longitude[1]); } | /**
* Decode a GeoHash to an approximate bounding box that contains the
* original GeoHashed point.
*
* @param geoHash
* GeoHash string
*
* @return Spatial Range (bounding box) of the GeoHash.
*/ | Decode a GeoHash to an approximate bounding box that contains the original GeoHashed point | decodeHash | {
"repo_name": "CameronTolooee/galileo",
"path": "src/galileo/util/GeoHash.java",
"license": "bsd-2-clause",
"size": 8591
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 494,662 |
EList<Document> getDocuments(); | EList<Document> getDocuments(); | /**
* Returns the value of the '<em><b>Documents</b></em>' reference list.
* The list contents are of type {@link gluemodel.CIM.IEC61968.Common.Document}.
* It is bidirectional and its opposite is '{@link gluemodel.CIM.IEC61968.Common.Document#getNetworkDataSets <em>Network Data Sets</em>}'.
* <!-- begin-user-d... | Returns the value of the 'Documents' reference list. The list contents are of type <code>gluemodel.CIM.IEC61968.Common.Document</code>. It is bidirectional and its opposite is '<code>gluemodel.CIM.IEC61968.Common.Document#getNetworkDataSets Network Data Sets</code>'. If the meaning of the 'Documents' reference list isn... | getDocuments | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/CIM/IEC61970/Informative/InfOperations/NetworkDataSet.java",
"license": "mit",
"size": 10428
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,713,831 |
public static Long datestr2Long(String timestampstr)
{
Long result = null;
String date = timestampstr;
String[] dateFields = date.split(DATE_REGULAR_EXPRESSION);
if (dateFields.length != 3)
{
throw new IllegalArgumentException("DateFormat not supported " + tim... | static Long function(String timestampstr) { Long result = null; String date = timestampstr; String[] dateFields = date.split(DATE_REGULAR_EXPRESSION); if (dateFields.length != 3) { throw new IllegalArgumentException(STR + timestampstr); } else { String day = dateFields[0]; String mounth = dateFields[1]; String year = d... | /**
* Converts Timestamp as String to long (milliseconds).
*
* @param timestampstr the minimum or maximum of a date.
* @return the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this date.
*
*/ | Converts Timestamp as String to long (milliseconds) | datestr2Long | {
"repo_name": "prowim/prowim",
"path": "prowim-server/src/org/prowim/utils/StringConverter.java",
"license": "gpl-3.0",
"size": 11298
} | [
"org.joda.time.DateTime"
] | import org.joda.time.DateTime; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 2,600,472 |
@Override
public void check(final CompilationTimeStamp timestamp) {
if (lastTimeChecked != null && !lastTimeChecked.isLess(timestamp)) {
return;
}
parseAttributes(timestamp);
nameMap = new HashMap<String, EnumItem>(items.getItems().size());
Map<Long, EnumItem> valueMap = new HashMap<Long, EnumItem>(i... | void function(final CompilationTimeStamp timestamp) { if (lastTimeChecked != null && !lastTimeChecked.isLess(timestamp)) { return; } parseAttributes(timestamp); nameMap = new HashMap<String, EnumItem>(items.getItems().size()); Map<Long, EnumItem> valueMap = new HashMap<Long, EnumItem>(items.getItems().size()); List<Enu... | /**
* Does the semantic checking of the enumerations.
*
* @param timestamp the timestamp of the actual semantic check cycle.
* */ | Does the semantic checking of the enumerations | check | {
"repo_name": "alovassy/titan.EclipsePlug-ins",
"path": "org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/types/TTCN3_Enumerated_Type.java",
"license": "epl-1.0",
"size": 17476
} | [
"java.text.MessageFormat",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.eclipse.titan.designer.AST",
"org.eclipse.titan.designer.parsers.CompilationTimeStamp"
] | import java.text.MessageFormat; import java.util.HashMap; import java.util.List; import java.util.Map; import org.eclipse.titan.designer.AST; import org.eclipse.titan.designer.parsers.CompilationTimeStamp; | import java.text.*; import java.util.*; import org.eclipse.titan.designer.*; import org.eclipse.titan.designer.parsers.*; | [
"java.text",
"java.util",
"org.eclipse.titan"
] | java.text; java.util; org.eclipse.titan; | 263,758 |
@Override
public List<User> getNoGroups() throws SystemException {
return userFinder.findByNoGroups();
} | List<User> function() throws SystemException { return userFinder.findByNoGroups(); } | /**
* Returns all the users who do not belong to any groups, excluding the
* default user.
*
* @return the users who do not belong to any groups
* @throws SystemException if a system exception occurred
*/ | Returns all the users who do not belong to any groups, excluding the default user | getNoGroups | {
"repo_name": "jtydhr88/blade.tools",
"path": "blade.migrate.liferay70/projects/filetests/ContactNameExceptionImport.java",
"license": "apache-2.0",
"size": 193517
} | [
"com.liferay.portal.kernel.exception.SystemException",
"com.liferay.portal.model.User",
"java.util.List"
] | import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.model.User; import java.util.List; | import com.liferay.portal.kernel.exception.*; import com.liferay.portal.model.*; import java.util.*; | [
"com.liferay.portal",
"java.util"
] | com.liferay.portal; java.util; | 1,568,560 |
public void setSettlementDate(ZonedDateTimeBean settlementDate) {
this._settlementDate = settlementDate;
} | void function(ZonedDateTimeBean settlementDate) { this._settlementDate = settlementDate; } | /**
* Sets the settlementDate.
* @param settlementDate the new value of the property
*/ | Sets the settlementDate | setSettlementDate | {
"repo_name": "McLeodMoores/starling",
"path": "projects/master-db/src/main/java/com/opengamma/masterdb/security/hibernate/equity/EquityVarianceSwapSecurityBean.java",
"license": "apache-2.0",
"size": 23690
} | [
"com.opengamma.masterdb.security.hibernate.ZonedDateTimeBean"
] | import com.opengamma.masterdb.security.hibernate.ZonedDateTimeBean; | import com.opengamma.masterdb.security.hibernate.*; | [
"com.opengamma.masterdb"
] | com.opengamma.masterdb; | 747,285 |
public JSONWriter key(String string) throws JSONException {
if (string == null) {
throw new JSONException("Null key.");
}
if (this.mode == 'k') {
try {
this.stack[this.top - 1].putOnce(string, Boolean.TRUE);
if (this.comma) {
... | JSONWriter function(String string) throws JSONException { if (string == null) { throw new JSONException(STR); } if (this.mode == 'k') { try { this.stack[this.top - 1].putOnce(string, Boolean.TRUE); if (this.comma) { this.writer.write(','); } this.writer.write(JSONObject.quote(string)); this.writer.write(':'); this.comm... | /**
* Append a key. The key will be associated with the next value. In an
* object, every value must be preceded by a key.
* @param string A key string.
* @return this
* @throws JSONException If the key is out of place. For example, keys
* do not belong in arrays or if the key is nu... | Append a key. The key will be associated with the next value. In an object, every value must be preceded by a key | key | {
"repo_name": "adammfrank/Bridge",
"path": "AmazonDynamoDB/JSONWriter.java",
"license": "mit",
"size": 10659
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,825,564 |
T visitInterpolationMethodLabel(@NotNull wcpsParser.InterpolationMethodLabelContext ctx); | T visitInterpolationMethodLabel(@NotNull wcpsParser.InterpolationMethodLabelContext ctx); | /**
* Visit a parse tree produced by {@link wcpsParser#InterpolationMethodLabel}.
*
* @param ctx the parse tree
* @return the visitor result
*/ | Visit a parse tree produced by <code>wcpsParser#InterpolationMethodLabel</code> | visitInterpolationMethodLabel | {
"repo_name": "diogo-andrade/DataHubSystem",
"path": "petascope/src/main/java/petascope/wcps2/parser/wcpsVisitor.java",
"license": "agpl-3.0",
"size": 28497
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,329,929 |
public String save() {
doBeforeSave();
if (requestHoliday.getId() == null) {
manager.insertEntity(requestHoliday);
} else {
manager.updateEntity(requestHoliday);
}
// Calls an after save action
String result = doAfterSave(NavigationResults.L... | String function() { doBeforeSave(); if (requestHoliday.getId() == null) { manager.insertEntity(requestHoliday); } else { manager.updateEntity(requestHoliday); } String result = doAfterSave(NavigationResults.LIST); requestHoliday = null; return result; } | /**
* Save bean and stay on it
*
* @return forward to list page
*/ | Save bean and stay on it | save | {
"repo_name": "terrex/tntconcept-materials-testing",
"path": "src/main/java/com/autentia/intra/bean/holiday/RequestHolidayBean.java",
"license": "gpl-2.0",
"size": 19883
} | [
"com.autentia.intra.bean.NavigationResults"
] | import com.autentia.intra.bean.NavigationResults; | import com.autentia.intra.bean.*; | [
"com.autentia.intra"
] | com.autentia.intra; | 326,624 |
int getSummaryResourceForDevice(BluetoothDevice device);
| int getSummaryResourceForDevice(BluetoothDevice device); | /**
* Returns the string resource ID for the summary text for this profile
* for the specified device, e.g. "Use for media audio" or
* "Connected to media audio".
* @param device the device to query for profile connection status
* @return a string resource ID for the profile summary text
... | Returns the string resource ID for the summary text for this profile for the specified device, e.g. "Use for media audio" or "Connected to media audio" | getSummaryResourceForDevice | {
"repo_name": "risingsunm/Settings",
"path": "src/com/android/settings/bluetooth/LocalBluetoothProfile.java",
"license": "gpl-2.0",
"size": 2304
} | [
"android.bluetooth.BluetoothDevice"
] | import android.bluetooth.BluetoothDevice; | import android.bluetooth.*; | [
"android.bluetooth"
] | android.bluetooth; | 738,139 |
HashMap<Long, VmStatsEntry> getVirtualMachineStatistics(long hostId, String hostName, List<Long> vmIds); | HashMap<Long, VmStatsEntry> getVirtualMachineStatistics(long hostId, String hostName, List<Long> vmIds); | /**
* Obtains statistics for a list of host or VMs; CPU and network utilization
* @param host ID
* @param host name
* @param list of VM IDs or host id
* @return GetVmStatsAnswer
*/ | Obtains statistics for a list of host or VMs; CPU and network utilization | getVirtualMachineStatistics | {
"repo_name": "GabrielBrascher/cloudstack",
"path": "server/src/main/java/com/cloud/vm/UserVmManager.java",
"license": "apache-2.0",
"size": 6144
} | [
"com.cloud.agent.api.VmStatsEntry",
"java.util.HashMap",
"java.util.List"
] | import com.cloud.agent.api.VmStatsEntry; import java.util.HashMap; import java.util.List; | import com.cloud.agent.api.*; import java.util.*; | [
"com.cloud.agent",
"java.util"
] | com.cloud.agent; java.util; | 2,108,435 |
private void addTcpClNeighborVariations(String[] words) {
// At this point, we're guaranteed length >= 3
// add tcpcl neighbor <nName> <eid>
// 0 1 2 3 4
// OR
// add tcpcl neighbor <nName> -link <lName> <ipAddress>
// 0 1 2 3 4 5 6
if (words.length < 5)... | void function(String[] words) { if (words.length < 5) { System.err.println(STR); return; } String neighborName = words[3]; if (!words[4].equalsIgnoreCase("-link")) { if (words.length != 5) { System.err.println( STR + STR); } try { EndPointId eid = EndPointId.createEndPointId(words[4]); System.out.println( STR + neighbo... | /**
* Execute the 'add tcpcl neighbor ..." command
* @param words arguments
*/ | Execute the 'add tcpcl neighbor ..." command | addTcpClNeighborVariations | {
"repo_name": "KritikalFabric/corefabric.io",
"path": "src/contrib/java/com/cisco/qte/jdtn/Shell.java",
"license": "apache-2.0",
"size": 123060
} | [
"com.cisco.qte.jdtn.bp.BPException",
"com.cisco.qte.jdtn.bp.EndPointId",
"com.cisco.qte.jdtn.general.JDtnException",
"com.cisco.qte.jdtn.general.Link",
"com.cisco.qte.jdtn.general.LinkAddress",
"com.cisco.qte.jdtn.general.LinksList",
"com.cisco.qte.jdtn.general.Neighbor",
"com.cisco.qte.jdtn.general.N... | import com.cisco.qte.jdtn.bp.BPException; import com.cisco.qte.jdtn.bp.EndPointId; import com.cisco.qte.jdtn.general.JDtnException; import com.cisco.qte.jdtn.general.Link; import com.cisco.qte.jdtn.general.LinkAddress; import com.cisco.qte.jdtn.general.LinksList; import com.cisco.qte.jdtn.general.Neighbor; import com.c... | import com.cisco.qte.jdtn.bp.*; import com.cisco.qte.jdtn.general.*; import com.cisco.qte.jdtn.ltp.*; import com.cisco.qte.jdtn.tcpcl.*; import java.net.*; | [
"com.cisco.qte",
"java.net"
] | com.cisco.qte; java.net; | 225,908 |
@Override
public Object getField(String objname, String fieldname) {
if (row == null) {
return null;
}
IDataRow obj = DataInfo.getObjFk(row, objname);
if (obj == null) {
return null;
}
return obj.getValue(fieldname);
} | Object function(String objname, String fieldname) { if (row == null) { return null; } IDataRow obj = DataInfo.getObjFk(row, objname); if (obj == null) { return null; } return obj.getValue(fieldname); } | /**
* Devuelve un valor de un campo dado, del registro actual, de un miembro
* relacionado.
*
* @param objname nombre del miembro relacionado.
* @param fieldname nombre del campo
* @return valor de un campo solicitado.
*/ | Devuelve un valor de un campo dado, del registro actual, de un miembro relacionado | getField | {
"repo_name": "jencisopy/JavaBeanStack",
"path": "business/src/main/java/org/javabeanstack/datactrl/AbstractDataObject.java",
"license": "lgpl-3.0",
"size": 65909
} | [
"org.javabeanstack.data.DataInfo",
"org.javabeanstack.data.IDataRow"
] | import org.javabeanstack.data.DataInfo; import org.javabeanstack.data.IDataRow; | import org.javabeanstack.data.*; | [
"org.javabeanstack.data"
] | org.javabeanstack.data; | 1,339,311 |
public long reduceEntriesToLong(long parallelismThreshold,
ToLongFunction<Map.Entry<K,V>> transformer,
long basis,
LongBinaryOperator reducer) {
if (transformer == null || reducer == null)
... | long function(long parallelismThreshold, ToLongFunction<Map.Entry<K,V>> transformer, long basis, LongBinaryOperator reducer) { if (transformer == null reducer == null) throw new NullPointerException(); return new MapReduceEntriesToLongTask<K,V> (null, batchFor(parallelismThreshold), 0, 0, table, null, transformer, basi... | /**
* Returns the result of accumulating the given transformation
* of all entries using the given reducer to combine values,
* and the given basis as an identity value.
*
* @param parallelismThreshold the (estimated) number of elements
* needed for this operation to be executed in paralle... | Returns the result of accumulating the given transformation of all entries using the given reducer to combine values, and the given basis as an identity value | reduceEntriesToLong | {
"repo_name": "flyzsd/java-code-snippets",
"path": "ibm.jdk8/src/java/util/concurrent/ConcurrentHashMap.java",
"license": "mit",
"size": 263097
} | [
"java.util.Map",
"java.util.function.LongBinaryOperator",
"java.util.function.ToLongFunction"
] | import java.util.Map; import java.util.function.LongBinaryOperator; import java.util.function.ToLongFunction; | import java.util.*; import java.util.function.*; | [
"java.util"
] | java.util; | 978,356 |
@Override
public int getOrganizationUsersCount(long organizationId, int status)
throws PortalException, SystemException {
Organization organization = organizationPersistence.findByPrimaryKey(
organizationId);
LinkedHashMap<String, Object> params =
new LinkedHashMap<String, Object>();
params.put("us... | int function(long organizationId, int status) throws PortalException, SystemException { Organization organization = organizationPersistence.findByPrimaryKey( organizationId); LinkedHashMap<String, Object> params = new LinkedHashMap<String, Object>(); params.put(STR, new Long(organizationId)); return searchCount(organiz... | /**
* Returns the number of users with the status belonging to the
* organization.
*
* @param organizationId the primary key of the organization
* @param status the workflow status
* @return the number of users with the status belonging to the organization
* @throws PortalException if an organization wi... | Returns the number of users with the status belonging to the organization | getOrganizationUsersCount | {
"repo_name": "jtydhr88/blade.tools",
"path": "blade.migrate.liferay70/projects/filetests/ContactNameExceptionImport.java",
"license": "apache-2.0",
"size": 193517
} | [
"com.liferay.portal.kernel.exception.PortalException",
"com.liferay.portal.kernel.exception.SystemException",
"com.liferay.portal.model.Organization",
"java.util.LinkedHashMap"
] | import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.model.Organization; import java.util.LinkedHashMap; | import com.liferay.portal.kernel.exception.*; import com.liferay.portal.model.*; import java.util.*; | [
"com.liferay.portal",
"java.util"
] | com.liferay.portal; java.util; | 1,568,562 |
public InstanceKind getKind() {
final JsonElement value = json.get("kind");
try {
return value == null ? InstanceKind.Unknown : InstanceKind.valueOf(value.getAsString());
} catch (IllegalArgumentException e) {
return InstanceKind.Unknown;
}
} | InstanceKind function() { final JsonElement value = json.get("kind"); try { return value == null ? InstanceKind.Unknown : InstanceKind.valueOf(value.getAsString()); } catch (IllegalArgumentException e) { return InstanceKind.Unknown; } } | /**
* What kind of instance is this?
*/ | What kind of instance is this | getKind | {
"repo_name": "dart-archive/vm_service_drivers",
"path": "java/src/org/dartlang/vm/service/element/InstanceRef.java",
"license": "bsd-3-clause",
"size": 4915
} | [
"com.google.gson.JsonElement"
] | import com.google.gson.JsonElement; | import com.google.gson.*; | [
"com.google.gson"
] | com.google.gson; | 2,684,713 |
public void test_fromString() {
aNumericDataField1.fromString("123.43");
assertEquals(aNumericDataField1.getDouble(),123.43);
aNumericDataField1.fromString(null);
assertTrue(aNumericDataField1.isNull());
assertEquals("", aNumericDataField1.toString());
aNumericDataField1.fromString("");
assertT... | void function() { aNumericDataField1.fromString(STR); assertEquals(aNumericDataField1.getDouble(),123.43); aNumericDataField1.fromString(null); assertTrue(aNumericDataField1.isNull()); assertEquals(STRSTRSTRSTRShould raise an BadDataFormatExceptionSTRr123STRShould raise an BadDataFormatExceptionSTR123.45.67STRShould ra... | /**
* Test for @link org.jetel.data.NumericDataField.fromString(String valueStr)
*
*/ | Test for @link org.jetel.data.NumericDataField.fromString(String valueStr) | test_fromString | {
"repo_name": "CloverETL/CloverETL-Engine",
"path": "cloveretl.engine/test/org/jetel/data/NumericDataFieldTest.java",
"license": "lgpl-2.1",
"size": 16291
} | [
"org.jetel.exception.BadDataFormatException"
] | import org.jetel.exception.BadDataFormatException; | import org.jetel.exception.*; | [
"org.jetel.exception"
] | org.jetel.exception; | 284,175 |
public Set<Edge> findEdges(Node node)
{
Set<Edge> fromedges = new HashSet<Edge>();
for (Edge edge : this._edges)
{
if ((edge.getFrom() == node) || (edge.getTo() == node))
{
fromedges.add(edge);
}
}
return fromedges;
... | Set<Edge> function(Node node) { Set<Edge> fromedges = new HashSet<Edge>(); for (Edge edge : this._edges) { if ((edge.getFrom() == node) (edge.getTo() == node)) { fromedges.add(edge); } } return fromedges; } | /**
* Find all edges that are connected to the specific node, both as an outgoing {@link Edge#getFrom()} or incoming
* {@link Edge#getTo()} end point.
*
* @param node
* the node with potential end points
* @return the set of edges connected to the node
*/ | Find all edges that are connected to the specific node, both as an outgoing <code>Edge#getFrom()</code> or incoming <code>Edge#getTo()</code> end point | findEdges | {
"repo_name": "sdw2330976/Research-jetty-9.2.5",
"path": "jetty-deploy/src/main/java/org/eclipse/jetty/deploy/graph/Graph.java",
"license": "apache-2.0",
"size": 8053
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 375,453 |
byte peek() throws NoSuchElementException;
| byte peek() throws NoSuchElementException; | /**
* This method gets the current byte in the iteration. Unlike {@link #next()} this method does NOT modify the state of
* this {@link ByteIterator}. Therefore the peeked byte does NOT get consumed and repetitive calls will return the
* same value. <br>
* <b>ATTENTION:</b><br>
* You should only cal... | This method gets the current byte in the iteration. Unlike <code>#next()</code> this method does NOT modify the state of this <code>ByteIterator</code>. Therefore the peeked byte does NOT get consumed and repetitive calls will return the same value. You should only call this method if <code>#hasNext()</code> returns tr... | peek | {
"repo_name": "m-m-m/util",
"path": "io/src/main/java/net/sf/mmm/util/io/api/ByteIterator.java",
"license": "apache-2.0",
"size": 2489
} | [
"java.util.NoSuchElementException"
] | import java.util.NoSuchElementException; | import java.util.*; | [
"java.util"
] | java.util; | 421,822 |
public void testApp() {
assertTrue( true );
} | void function() { assertTrue( true ); } | /**
* Rigourous Test :-)
*/ | Rigourous Test :-) | testApp | {
"repo_name": "HelmsDave/confusion-matrix-demo",
"path": "src/test/java/org/harmonograph/confusion/DemoTest.java",
"license": "gpl-3.0",
"size": 682
} | [
"junit.framework.Assert"
] | import junit.framework.Assert; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 2,218,686 |
void finish() throws IOException; | void finish() throws IOException; | /**
* This method will be used to close all the streams currently present in the cache
*/ | This method will be used to close all the streams currently present in the cache | finish | {
"repo_name": "manishgupta88/carbondata",
"path": "core/src/main/java/org/apache/carbondata/core/datastore/FileReader.java",
"license": "apache-2.0",
"size": 3871
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,911,674 |
public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6) {
this.bipedHead.rotateAngleY = par4 / (180F / (float) Math.PI);
this.bipedHead.rotateAngleX = par5 / (180F / (float) Math.PI);
this.bipedRightArm.rotateAngleX = MathHelper.cos(par1 * 0.6662... | void function(float par1, float par2, float par3, float par4, float par5, float par6) { this.bipedHead.rotateAngleY = par4 / (180F / (float) Math.PI); this.bipedHead.rotateAngleX = par5 / (180F / (float) Math.PI); this.bipedRightArm.rotateAngleX = MathHelper.cos(par1 * 0.6662F + (float) Math.PI) * 2 * par2 * 0.5F; this... | /**
* Sets the model's various rotation angles. For bipeds, par1 and par2 are
* used for animating the movement of arms and legs, where par1 represents
* the time(so that arms and legs swing back and forth) and par2 represents
* how "far" arms and legs can swing at most.
*/ | Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how "far" arms and legs can swing at most | setRotationAngles | {
"repo_name": "NightKosh/Gravestone-mod-Extended",
"path": "src/main/java/nightkosh/gravestone_extended/models/block/memorials/ModelSteveStatueMemorial.java",
"license": "lgpl-3.0",
"size": 5901
} | [
"net.minecraft.util.math.MathHelper"
] | import net.minecraft.util.math.MathHelper; | import net.minecraft.util.math.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 476,273 |
default <T> CompletionStage<T> executeCompletionStageSupplier(Supplier<CompletionStage<T>> supplier){
return decorateCompletionStageSupplier(this, supplier).get();
}
/**
* Creates a timed checked supplier. | default <T> CompletionStage<T> executeCompletionStageSupplier(Supplier<CompletionStage<T>> supplier){ return decorateCompletionStageSupplier(this, supplier).get(); } /** * Creates a timed checked supplier. | /**
* Decorates and executes the decorated CompletionStage Supplier.
*
* @param supplier the CompletionStage Supplier
* @param <T> the type of results supplied by this supplier
* @return the result of the decorated Supplier.
*/ | Decorates and executes the decorated CompletionStage Supplier | executeCompletionStageSupplier | {
"repo_name": "goldobin/resilience4j",
"path": "resilience4j-metrics/src/main/java/io/github/resilience4j/metrics/Timer.java",
"license": "apache-2.0",
"size": 10951
} | [
"java.util.concurrent.CompletionStage",
"java.util.function.Supplier"
] | import java.util.concurrent.CompletionStage; import java.util.function.Supplier; | import java.util.concurrent.*; import java.util.function.*; | [
"java.util"
] | java.util; | 1,115,671 |
EReference getHintTypeExpression_RightType(); | EReference getHintTypeExpression_RightType(); | /**
* Returns the meta object for the containment reference '{@link com.euclideanspace.spad.editor.HintTypeExpression#getRightType <em>Right Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Right Type</em>'.
* @see com.euclideansp... | Returns the meta object for the containment reference '<code>com.euclideanspace.spad.editor.HintTypeExpression#getRightType Right Type</code>'. | getHintTypeExpression_RightType | {
"repo_name": "martinbaker/euclideanspace",
"path": "com.euclideanspace.spad/src-gen/com/euclideanspace/spad/editor/EditorPackage.java",
"license": "agpl-3.0",
"size": 593321
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,228,913 |
protected void verifyFinished(byte[] data) {
if (!Arrays.equals(verify_data, data)) {
fatalAlert(AlertProtocol.HANDSHAKE_FAILURE, "Incorrect FINISED");
}
} | void function(byte[] data) { if (!Arrays.equals(verify_data, data)) { fatalAlert(AlertProtocol.HANDSHAKE_FAILURE, STR); } } | /**
* Verifies finished data
*
* @param data
* @param isServer
*/ | Verifies finished data | verifyFinished | {
"repo_name": "indashnet/InDashNet.Open.UN2000",
"path": "android/libcore/crypto/src/main/java/org/conscrypt/HandshakeProtocol.java",
"license": "apache-2.0",
"size": 15853
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 2,757,558 |
public void setAccountStatus(UserAccountStatus accountStatus) {
this.accountStatus = accountStatus;
} | void function(UserAccountStatus accountStatus) { this.accountStatus = accountStatus; } | /**
* Set current user account status.
* @param accountStatus User account status.
*/ | Set current user account status | setAccountStatus | {
"repo_name": "lime-company/lime-security-powerauth-webauth",
"path": "powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/UpdateOperationUserRequest.java",
"license": "apache-2.0",
"size": 3116
} | [
"io.getlime.security.powerauth.lib.nextstep.model.entity.enumeration.UserAccountStatus"
] | import io.getlime.security.powerauth.lib.nextstep.model.entity.enumeration.UserAccountStatus; | import io.getlime.security.powerauth.lib.nextstep.model.entity.enumeration.*; | [
"io.getlime.security"
] | io.getlime.security; | 2,313,951 |
public SqoopTool getSqoopTool() {
return this.tool;
} | SqoopTool function() { return this.tool; } | /**
* Gets the SqoopTool.
*/ | Gets the SqoopTool | getSqoopTool | {
"repo_name": "dlanza1/sqoop",
"path": "src/java/org/apache/sqoop/metastore/JobData.java",
"license": "apache-2.0",
"size": 1695
} | [
"com.cloudera.sqoop.tool.SqoopTool"
] | import com.cloudera.sqoop.tool.SqoopTool; | import com.cloudera.sqoop.tool.*; | [
"com.cloudera.sqoop"
] | com.cloudera.sqoop; | 1,764,167 |
private Collection<ProfileFieldConverter> getProfileFields(
final PropertyWrapper properties,
final String fieldPrefix) throws PropertyException {
final String typeLabel = "type";
final String multipleLabel = "multiple";
final String ldapNameLabel = "ldapName";
... | Collection<ProfileFieldConverter> function( final PropertyWrapper properties, final String fieldPrefix) throws PropertyException { final String typeLabel = "type"; final String multipleLabel = STR; final String ldapNameLabel = STR; final String alfrescoNameLabel = STR; Collection<ProfileFieldConverter> fields = new Lin... | /**
* Return a list of profile fields from the properties file.
* @param properties Properties to look in
* @param fieldPrefix Prefix for all properties which represent a profile field
* @return List of profile field converters
* @throws PropertyException if profile fields are not defined corre... | Return a list of profile fields from the properties file | getProfileFields | {
"repo_name": "surevine/ldap2alfresco",
"path": "src/main/java/com/surevine/ldap2alfresco/ProfileUpdater.java",
"license": "gpl-2.0",
"size": 9341
} | [
"com.surevine.alfresco.PropertyException",
"com.surevine.alfresco.PropertyWrapper",
"java.util.Collection",
"java.util.Iterator",
"java.util.LinkedList"
] | import com.surevine.alfresco.PropertyException; import com.surevine.alfresco.PropertyWrapper; import java.util.Collection; import java.util.Iterator; import java.util.LinkedList; | import com.surevine.alfresco.*; import java.util.*; | [
"com.surevine.alfresco",
"java.util"
] | com.surevine.alfresco; java.util; | 1,802,781 |
public static Profile[] getProfiles(FabricService fabricService, String version, List<String> names) {
ProfileService profileService = fabricService.adapt(ProfileService.class);
return getProfiles(fabricService, profileService.getVersion(version), names);
} | static Profile[] function(FabricService fabricService, String version, List<String> names) { ProfileService profileService = fabricService.adapt(ProfileService.class); return getProfiles(fabricService, profileService.getVersion(version), names); } | /**
* Gets all the profiles for the given names.
* <p/>
* <b>Important:</b> If a profile does not already exists with the given name, then a new {@link Profile} is
* created and returned in the list.
*
* @see #getExistingProfiles(io.fabric8.api.FabricService, String, java.util.List)
*... | Gets all the profiles for the given names. Important: If a profile does not already exists with the given name, then a new <code>Profile</code> is created and returned in the list | getProfiles | {
"repo_name": "jonathanchristison/fabric8",
"path": "fabric/fabric-boot-commands/src/main/java/io/fabric8/boot/commands/support/FabricCommand.java",
"license": "apache-2.0",
"size": 8750
} | [
"io.fabric8.api.FabricService",
"io.fabric8.api.Profile",
"io.fabric8.api.ProfileService",
"java.util.List"
] | import io.fabric8.api.FabricService; import io.fabric8.api.Profile; import io.fabric8.api.ProfileService; import java.util.List; | import io.fabric8.api.*; import java.util.*; | [
"io.fabric8.api",
"java.util"
] | io.fabric8.api; java.util; | 2,784,468 |
public void
categoryAdded(
Category category );
| void function( Category category ); | /**
* A category has been added to the CategoryManager
* @param category the category that was added
*/ | A category has been added to the CategoryManager | categoryAdded | {
"repo_name": "AcademicTorrents/AcademicTorrents-Downloader",
"path": "vuze/org/gudy/azureus2/core3/category/CategoryManagerListener.java",
"license": "gpl-2.0",
"size": 1438
} | [
"org.gudy.azureus2.core3.category.Category"
] | import org.gudy.azureus2.core3.category.Category; | import org.gudy.azureus2.core3.category.*; | [
"org.gudy.azureus2"
] | org.gudy.azureus2; | 1,876,902 |
public void setOrientationEulerXYZ(final double alpha, final double beta, final double gamma) {
if (invOrientation == null)
invOrientation = new Matrix3d();
Matrix3d ta = new Matrix3d();
Matrix3d tb = new Matrix3d();
ta.rotZ(gamma);
tb.rotY(beta);
tb.mul(ta);
invOrientation.rotX(alpha);
invOrienta... | void function(final double alpha, final double beta, final double gamma) { if (invOrientation == null) invOrientation = new Matrix3d(); Matrix3d ta = new Matrix3d(); Matrix3d tb = new Matrix3d(); ta.rotZ(gamma); tb.rotY(beta); tb.mul(ta); invOrientation.rotX(alpha); invOrientation.mul(tb); calcNormal(false); } | /**
* Set detector orientation using a set of (proper) Euler angles (in radians) in ZYZ order
*
* @param alpha first angle about global x
* @param beta second angle about local y
* @param gamma third angle about local z
*/ | Set detector orientation using a set of (proper) Euler angles (in radians) in ZYZ order | setOrientationEulerXYZ | {
"repo_name": "willrogers/dawnsci",
"path": "org.eclipse.dawnsci.analysis.api/src/org/eclipse/dawnsci/analysis/api/diffraction/DetectorProperties.java",
"license": "epl-1.0",
"size": 35253
} | [
"javax.vecmath.Matrix3d"
] | import javax.vecmath.Matrix3d; | import javax.vecmath.*; | [
"javax.vecmath"
] | javax.vecmath; | 2,659,058 |
public DcmElement putSS(int tag) {
return put(ValueElement.createSS(tag));
} | DcmElement function(int tag) { return put(ValueElement.createSS(tag)); } | /**
* Description of the Method
*
* @param tag Description of the Parameter
* @return Description of the Return Value
*/ | Description of the Method | putSS | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4che14/tags/DCM4CHE_1_4_14/src/java/org/dcm4cheri/data/DcmObjectImpl.java",
"license": "apache-2.0",
"size": 84001
} | [
"org.dcm4che.data.DcmElement"
] | import org.dcm4che.data.DcmElement; | import org.dcm4che.data.*; | [
"org.dcm4che.data"
] | org.dcm4che.data; | 1,078,938 |
public boolean checkUniqueParticleAttribution(SubstitutionGroupHandler subGroupHandler) throws XMLSchemaException {
// Unique Particle Attribution
// store the conflict results between any two elements in fElemMap
// 0: not compared; -1: no conflict; 1: conflict
// initialize the con... | boolean function(SubstitutionGroupHandler subGroupHandler) throws XMLSchemaException { byte conflictTable[][] = new byte[fElemMapSize][fElemMapSize]; for (int i = 0; i < fTransTable.length && fTransTable[i] != null; i++) { for (int j = 0; j < fElemMapSize; j++) { for (int k = j+1; k < fElemMapSize; k++) { if (fTransTab... | /**
* check whether this content violates UPA constraint.
*
* @param subGroupHandler the substitution group handler
* @return true if this content model contains other or list wildcard
*/ | check whether this content violates UPA constraint | checkUniqueParticleAttribution | {
"repo_name": "PrincetonUniversity/NVJVM",
"path": "build/linux-amd64/jaxp/drop/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/models/XSDFACM.java",
"license": "gpl-2.0",
"size": 49740
} | [
"com.sun.org.apache.xerces.internal.impl.xs.SubstitutionGroupHandler",
"com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaException",
"com.sun.org.apache.xerces.internal.impl.xs.XSConstraints",
"com.sun.org.apache.xerces.internal.impl.xs.XSParticleDecl",
"com.sun.org.apache.xerces.internal.impl.xs.XSWildc... | import com.sun.org.apache.xerces.internal.impl.xs.SubstitutionGroupHandler; import com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaException; import com.sun.org.apache.xerces.internal.impl.xs.XSConstraints; import com.sun.org.apache.xerces.internal.impl.xs.XSParticleDecl; import com.sun.org.apache.xerces.internal.i... | import com.sun.org.apache.xerces.internal.impl.xs.*; | [
"com.sun.org"
] | com.sun.org; | 1,591,719 |
public static void unbindIdGenerator(IdGenerator oldIdGenerator) {
if (Objects.equals(idGenerator, oldIdGenerator)) {
idGenerator = null;
}
} | static void function(IdGenerator oldIdGenerator) { if (Objects.equals(idGenerator, oldIdGenerator)) { idGenerator = null; } } | /**
* Unbinds an id generator.
*
* Note: The caller must provide the old id generator to succeed.
*
* @param oldIdGenerator the current id generator
*/ | Unbinds an id generator. Note: The caller must provide the old id generator to succeed | unbindIdGenerator | {
"repo_name": "jinlongliu/onos",
"path": "core/api/src/main/java/org/onosproject/net/intent/Intent.java",
"license": "apache-2.0",
"size": 6049
} | [
"java.util.Objects",
"org.onosproject.core.IdGenerator"
] | import java.util.Objects; import org.onosproject.core.IdGenerator; | import java.util.*; import org.onosproject.core.*; | [
"java.util",
"org.onosproject.core"
] | java.util; org.onosproject.core; | 61,496 |
private List<Set<Long>> createFolds(int nFolds, int nMinPerClass, Random r,
SortedMap<Long, String> mapInstanceIdToClass) {
// invert the mapInstanceIdToClass
Map<String, List<Long>> mapClassToInstanceId = new TreeMap<String, List<Long>>();
for (Map.Entry<Long, String> instance : mapInstanceIdToClass.entryS... | List<Set<Long>> function(int nFolds, int nMinPerClass, Random r, SortedMap<Long, String> mapInstanceIdToClass) { Map<String, List<Long>> mapClassToInstanceId = new TreeMap<String, List<Long>>(); for (Map.Entry<Long, String> instance : mapInstanceIdToClass.entrySet()) { String className = instance.getValue(); long insta... | /**
* inver the map of instance id to class, call createFolds
*
* @param nFolds
* @param nMinPerClass
* @param r
* @param mapInstanceIdToClass
* @return
*/ | inver the map of instance id to class, call createFolds | createFolds | {
"repo_name": "TCU-MI/ctakes",
"path": "ctakes-ytex/src/main/java/org/apache/ctakes/ytex/kernel/FoldGeneratorImpl.java",
"license": "apache-2.0",
"size": 16567
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"java.util.Random",
"java.util.Set",
"java.util.SortedMap",
"java.util.TreeMap"
] | import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Random; import java.util.Set; import java.util.SortedMap; import java.util.TreeMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,412,039 |
@Override
public void validateConditionValuePair(
final ConditionValuePair pair)
throws DomainException {
try {
int key = Integer.decode(pair.getValue());
if(! choices.containsKey(key)) {
throw new DomainException(
"The value for a condition is not a valid key for this choice prompt: ... | void function( final ConditionValuePair pair) throws DomainException { try { int key = Integer.decode(pair.getValue()); if(! choices.containsKey(key)) { throw new DomainException( STR + key); } } catch(NumberFormatException e) { throw new DomainException( STR + pair.getValue(), e); } } | /**
* Validates that a given condition-value pair's value is a valid key for
* this prompt.
*
* @param pair The condition-value pair to validate.
*
* @throws DomainException The value of the condition-value pair is not
* valid.
*/ | Validates that a given condition-value pair's value is a valid key for this prompt | validateConditionValuePair | {
"repo_name": "HaiJiaoXinHeng/server-1",
"path": "src/org/ohmage/domain/campaign/prompt/ChoicePrompt.java",
"license": "apache-2.0",
"size": 6848
} | [
"org.ohmage.config.grammar.custom.ConditionValuePair",
"org.ohmage.exception.DomainException"
] | import org.ohmage.config.grammar.custom.ConditionValuePair; import org.ohmage.exception.DomainException; | import org.ohmage.config.grammar.custom.*; import org.ohmage.exception.*; | [
"org.ohmage.config",
"org.ohmage.exception"
] | org.ohmage.config; org.ohmage.exception; | 207,766 |
int size = input.readUnsignedShort();
if (size == 0) {
return ""; //$NON-NLS-1$
}
StringBuilder buf = STRING_BUFFER_POOL.get();
buf.setLength(0);
while (size > 0) {
int b0 = read(input);
if (b0 < MASK_HEAD1) {
// 1-byte (7-bits)... | int size = input.readUnsignedShort(); if (size == 0) { return ""; } StringBuilder buf = STRING_BUFFER_POOL.get(); buf.setLength(0); while (size > 0) { int b0 = read(input); if (b0 < MASK_HEAD1) { assert (b0 & MASK_HEAD1) == 0; size -= 1; buf.append((char) b0); } else if (b0 < MASK_HEAD3) { assert (b0 & MASK_HEAD3) == M... | /**
* Emulates {@link DataInput#readUTF()} without using it method.
* @param input the target {@link DataInput}
* @return the result
* @throws IOException if failed to read String from the {@link DataInput}
*/ | Emulates <code>DataInput#readUTF()</code> without using it method | readUTF | {
"repo_name": "cocoatomo/asakusafw",
"path": "core-project/asakusa-runtime/src/main/java/com/asakusafw/runtime/io/util/DataIoUtils.java",
"license": "apache-2.0",
"size": 5619
} | [
"java.io.UTFDataFormatException"
] | import java.io.UTFDataFormatException; | import java.io.*; | [
"java.io"
] | java.io; | 1,281,184 |
@Override
protected BeanFactory getBeanFactory(ELContext elContext) {
return getWebApplicationContext(elContext);
}
| BeanFactory function(ELContext elContext) { return getWebApplicationContext(elContext); } | /**
* This implementation delegates to {@link #getWebApplicationContext}.
* Can be overridden to provide an arbitrary BeanFactory reference to resolve
* against; usually, this will be a full Spring ApplicationContext.
* @param elContext the current JSF ELContext
* @return the Spring BeanFactory (never {@... | This implementation delegates to <code>#getWebApplicationContext</code>. Can be overridden to provide an arbitrary BeanFactory reference to resolve against; usually, this will be a full Spring ApplicationContext | getBeanFactory | {
"repo_name": "tylerchen/springmvc-mybatis-modules-project",
"path": "web-primefaces/src/main/java/com/foreveross/modules/jsf/SpringBeanFacesELResolver.java",
"license": "apache-2.0",
"size": 3567
} | [
"javax.el.ELContext",
"org.springframework.beans.factory.BeanFactory"
] | import javax.el.ELContext; import org.springframework.beans.factory.BeanFactory; | import javax.el.*; import org.springframework.beans.factory.*; | [
"javax.el",
"org.springframework.beans"
] | javax.el; org.springframework.beans; | 357,911 |
public static <T> List<T> safeList(List<T> other)
{
return other == null ? Collections.<T>emptyList() : other;
}
| static <T> List<T> function(List<T> other) { return other == null ? Collections.<T>emptyList() : other; } | /**
* Checks if the list is null, return an empty list
* @param other
* @return
*/ | Checks if the list is null, return an empty list | safeList | {
"repo_name": "jed204/ustackserver",
"path": "src/main/java/com/untzuntz/ustackserverapi/util/DataUtil.java",
"license": "mit",
"size": 874
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 971,594 |
static void appendBytes(String content, Mode mode, BitArray bits, String encoding) throws WriterException {
switch (mode) {
case NUMERIC:
appendNumericBytes(content, bits);
break;
case ALPHANUMERIC:
appendAlphanumericBytes(content, bits);
break... | static void appendBytes(String content, Mode mode, BitArray bits, String encoding) throws WriterException { switch (mode) { case NUMERIC: appendNumericBytes(content, bits); break; case ALPHANUMERIC: appendAlphanumericBytes(content, bits); break; case BYTE: append8BitBytes(content, bits, encoding); break; case KANJI: ap... | /**
* Append "bytes" in "mode" mode (encoding) into "bits". On success, store
* the result in "bits".
*/ | Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits" | appendBytes | {
"repo_name": "idunnololz/Swapp",
"path": "app/src/main/java/com/jwetherell/quick_response_code/qrcode/encoder/Encoder.java",
"license": "apache-2.0",
"size": 23425
} | [
"com.google.zxing.WriterException",
"com.google.zxing.common.BitArray",
"com.jwetherell.quick_response_code.qrcode.decoder.Mode"
] | import com.google.zxing.WriterException; import com.google.zxing.common.BitArray; import com.jwetherell.quick_response_code.qrcode.decoder.Mode; | import com.google.zxing.*; import com.google.zxing.common.*; import com.jwetherell.quick_response_code.qrcode.decoder.*; | [
"com.google.zxing",
"com.jwetherell.quick_response_code"
] | com.google.zxing; com.jwetherell.quick_response_code; | 2,118,308 |
@Test
public void testFileIdMismatch() throws IOException {
Configuration conf = new HdfsConfiguration();
MiniDFSCluster cluster =
new MiniDFSCluster.Builder(conf).numDataNodes(3).build();
DistributedFileSystem dfs = null;
try {
cluster.waitActive();
dfs = cluster.getFileSystem()... | void function() throws IOException { Configuration conf = new HdfsConfiguration(); MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(3).build(); DistributedFileSystem dfs = null; try { cluster.waitActive(); dfs = cluster.getFileSystem(); DFSClient client = dfs.dfs; final Path f = new Path(STR); cre... | /**
* Test complete(..) - verifies that the fileId in the request
* matches that of the Inode.
* This test checks that FileNotFoundException exception is thrown in case
* the fileId does not match.
*/ | Test complete(..) - verifies that the fileId in the request matches that of the Inode. This test checks that FileNotFoundException exception is thrown in case the fileId does not match | testFileIdMismatch | {
"repo_name": "likaiwalkman/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileCreation.java",
"license": "apache-2.0",
"size": 49089
} | [
"java.io.FileNotFoundException",
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.io.IOUtils",
"org.junit.Assert"
] | import java.io.FileNotFoundException; import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.IOUtils; import org.junit.Assert; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.io.*; import org.junit.*; | [
"java.io",
"org.apache.hadoop",
"org.junit"
] | java.io; org.apache.hadoop; org.junit; | 401,881 |
public void doEdit_tool_down(RunData data, Context context)
{
SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid());
String id = data.getParameters().getString("id");
// get the tool
Site site = (Site) state.getAttribute("site");
SitePage page = (Sit... | void function(RunData data, Context context) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); String id = data.getParameters().getString("id"); Site site = (Site) state.getAttribute("site"); SitePage page = (SitePage) state.getAttribute("page"); ToolConfigur... | /**
* Move the tool down in the order.
*/ | Move the tool down in the order | doEdit_tool_down | {
"repo_name": "ouit0408/sakai",
"path": "site/site-tool/tool/src/java/org/sakaiproject/site/tool/AdminSitesAction.java",
"license": "apache-2.0",
"size": 76844
} | [
"org.sakaiproject.cheftool.Context",
"org.sakaiproject.cheftool.JetspeedRunData",
"org.sakaiproject.cheftool.RunData",
"org.sakaiproject.event.api.SessionState",
"org.sakaiproject.site.api.Site",
"org.sakaiproject.site.api.SitePage",
"org.sakaiproject.site.api.ToolConfiguration"
] | import org.sakaiproject.cheftool.Context; import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.event.api.SessionState; import org.sakaiproject.site.api.Site; import org.sakaiproject.site.api.SitePage; import org.sakaiproject.site.api.ToolConfiguration; | import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*; import org.sakaiproject.site.api.*; | [
"org.sakaiproject.cheftool",
"org.sakaiproject.event",
"org.sakaiproject.site"
] | org.sakaiproject.cheftool; org.sakaiproject.event; org.sakaiproject.site; | 2,739,828 |
public List<DimensionalItemObject> getFilterIndicators()
{
return ImmutableList.copyOf( AnalyticsUtils.getByDataDimensionItemType( DataDimensionItemType.INDICATOR,
getFilterOptions( DATA_X_DIM_ID ) ) );
} | List<DimensionalItemObject> function() { return ImmutableList.copyOf( AnalyticsUtils.getByDataDimensionItemType( DataDimensionItemType.INDICATOR, getFilterOptions( DATA_X_DIM_ID ) ) ); } | /**
* Returns all indicators part of the data filter.
*/ | Returns all indicators part of the data filter | getFilterIndicators | {
"repo_name": "hispindia/dhis2-Core",
"path": "dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java",
"license": "bsd-3-clause",
"size": 105104
} | [
"com.google.common.collect.ImmutableList",
"java.util.List",
"org.hisp.dhis.analytics.util.AnalyticsUtils",
"org.hisp.dhis.common.DataDimensionItemType",
"org.hisp.dhis.common.DimensionalItemObject"
] | import com.google.common.collect.ImmutableList; import java.util.List; import org.hisp.dhis.analytics.util.AnalyticsUtils; import org.hisp.dhis.common.DataDimensionItemType; import org.hisp.dhis.common.DimensionalItemObject; | import com.google.common.collect.*; import java.util.*; import org.hisp.dhis.analytics.util.*; import org.hisp.dhis.common.*; | [
"com.google.common",
"java.util",
"org.hisp.dhis"
] | com.google.common; java.util; org.hisp.dhis; | 775,202 |
public void serve() throws IOException {
SpecificResponder res = new SpecificResponder(AvroFlumeReportServer.class,
this);
this.http = new HttpServer(res, port);
this.http.start();
} | void function() throws IOException { SpecificResponder res = new SpecificResponder(AvroFlumeReportServer.class, this); this.http = new HttpServer(res, port); this.http.start(); } | /**
* Starts the Avro Report Server
*/ | Starts the Avro Report Server | serve | {
"repo_name": "yongkun/flume-0.9.3-cdh3u0-rakuten",
"path": "src/java/com/cloudera/flume/reporter/server/AvroReportServer.java",
"license": "apache-2.0",
"size": 5483
} | [
"com.cloudera.flume.reporter.server.avro.AvroFlumeReportServer",
"java.io.IOException",
"org.apache.avro.ipc.HttpServer",
"org.apache.avro.specific.SpecificResponder"
] | import com.cloudera.flume.reporter.server.avro.AvroFlumeReportServer; import java.io.IOException; import org.apache.avro.ipc.HttpServer; import org.apache.avro.specific.SpecificResponder; | import com.cloudera.flume.reporter.server.avro.*; import java.io.*; import org.apache.avro.ipc.*; import org.apache.avro.specific.*; | [
"com.cloudera.flume",
"java.io",
"org.apache.avro"
] | com.cloudera.flume; java.io; org.apache.avro; | 2,820,646 |
EAttribute getServer_TotalMemory(); | EAttribute getServer_TotalMemory(); | /**
* Returns the meta object for the attribute '{@link datacenter.core.Server#getTotalMemory <em>Total Memory</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Total Memory</em>'.
* @see datacenter.core.Server#getTotalMemory()
* @see #getServer()
*... | Returns the meta object for the attribute '<code>datacenter.core.Server#getTotalMemory Total Memory</code>'. | getServer_TotalMemory | {
"repo_name": "diverse-project/flink-datacenter",
"path": "datacenter/src/datacenter/core/CorePackage.java",
"license": "mit",
"size": 36104
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,413,954 |
@Override
public boolean retainAll(Collection<?> c) {
throw new UnsupportedOperationException();
}
| boolean function(Collection<?> c) { throw new UnsupportedOperationException(); } | /**
* This operation is not supported.
*
* @throws UnsupportedOperationException immediately on invocation.
*/ | This operation is not supported | retainAll | {
"repo_name": "CERN-BE/Entwined-STM",
"path": "src/main/java/cern/entwined/TransactionalQueue.java",
"license": "apache-2.0",
"size": 13326
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 155,706 |
public ServiceResponse<List<Period>> getDurationValid() throws ErrorException, IOException {
Call<ResponseBody> call = service.getDurationValid();
return getDurationValidDelegate(call.execute(), null);
} | ServiceResponse<List<Period>> function() throws ErrorException, IOException { Call<ResponseBody> call = service.getDurationValid(); return getDurationValidDelegate(call.execute(), null); } | /**
* Get duration array value ['P123DT22H14M12.011S', 'P5DT1H0M0S'].
*
* @throws ErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @return the List<Period> object wrapped in {@link ServiceResponse} if successful.
... | Get duration array value ['P123DT22H14M12.011S', 'P5DT1H0M0S'] | getDurationValid | {
"repo_name": "matt-gibbs/AutoRest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodyarray/ArrayImpl.java",
"license": "mit",
"size": 127337
} | [
"com.microsoft.rest.ServiceResponse",
"com.squareup.okhttp.ResponseBody",
"java.io.IOException",
"java.util.List",
"org.joda.time.Period"
] | import com.microsoft.rest.ServiceResponse; import com.squareup.okhttp.ResponseBody; import java.io.IOException; import java.util.List; import org.joda.time.Period; | import com.microsoft.rest.*; import com.squareup.okhttp.*; import java.io.*; import java.util.*; import org.joda.time.*; | [
"com.microsoft.rest",
"com.squareup.okhttp",
"java.io",
"java.util",
"org.joda.time"
] | com.microsoft.rest; com.squareup.okhttp; java.io; java.util; org.joda.time; | 2,205,057 |
public BigDecimal toBigDecimal(Object value) {
return (BigDecimal) typeConverters[31].convert(value);
} | BigDecimal function(Object value) { return (BigDecimal) typeConverters[31].convert(value); } | /**
* Converts value to <code>BigDecimal</code>.
*/ | Converts value to <code>BigDecimal</code> | toBigDecimal | {
"repo_name": "wsldl123292/jodd",
"path": "jodd-bean/src/main/java/jodd/typeconverter/ConvertBean.java",
"license": "bsd-3-clause",
"size": 13806
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 2,517,324 |
public void displayNode(MindMapNode node, ArrayList nodesUnfoldedByDisplay) {
// Unfold the path to the node
Object[] path = controller.getMap().getPathToRoot(node);
// Iterate the path with the exception of the last node
for (int i = 0; i < path.length - 1; i++) {
MindMapNode nodeOnPath = (MindMapNode) p... | void function(MindMapNode node, ArrayList nodesUnfoldedByDisplay) { Object[] path = controller.getMap().getPathToRoot(node); for (int i = 0; i < path.length - 1; i++) { MindMapNode nodeOnPath = (MindMapNode) path[i]; if (nodeOnPath.isFolded()) { if (nodesUnfoldedByDisplay != null) nodesUnfoldedByDisplay.add(nodeOnPath)... | /**
* Display a node in the display (used by find and the goto action by arrow
* link actions).
*/ | Display a node in the display (used by find and the goto action by arrow link actions) | displayNode | {
"repo_name": "zeroghj/FreeMind",
"path": "freemind/modes/common/actions/FindAction.java",
"license": "gpl-2.0",
"size": 14477
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,838,804 |
public void registerConflictCheck(String param, XContentBuilder init, XContentBuilder update) {
conflictChecks.put(param, new ConflictCheck(init, update));
} | void function(String param, XContentBuilder init, XContentBuilder update) { conflictChecks.put(param, new ConflictCheck(init, update)); } | /**
* Register a check that a parameter update will cause a conflict
*
* @param param the parameter name, expected to appear in the error message
* @param init the initial mapping
* @param update the updated mapping
*/ | Register a check that a parameter update will cause a conflict | registerConflictCheck | {
"repo_name": "GlenRSmith/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/index/mapper/MetadataMapperTestCase.java",
"license": "apache-2.0",
"size": 4515
} | [
"org.elasticsearch.xcontent.XContentBuilder"
] | import org.elasticsearch.xcontent.XContentBuilder; | import org.elasticsearch.xcontent.*; | [
"org.elasticsearch.xcontent"
] | org.elasticsearch.xcontent; | 2,094,385 |
File directory = workspaceCreator.createWorkspace(message);
commandExecutor.executeCommand(command, directory);
//TODO: update tests
directoryListenerService.createDirectoryListener(directory);
} | File directory = workspaceCreator.createWorkspace(message); commandExecutor.executeCommand(command, directory); directoryListenerService.createDirectoryListener(directory); } | /**
* Listens to reactant queue in order to start new jobs
*
* @param message message from reaktor-web containing info needed to run
* calculation
*/ | Listens to reactant queue in order to start new jobs | runSimulator | {
"repo_name": "wallerlab/reaktor",
"path": "reaktor-cluster/src/main/java/cluster/services/listener/JMSMessageListenerService.java",
"license": "apache-2.0",
"size": 1900
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,395,796 |
void recordDisapprovedInRoutingActionAndUpdateStatuses(ProtocolBase protocol, ActionTakenValue latestCurrentActionTakenVal); | void recordDisapprovedInRoutingActionAndUpdateStatuses(ProtocolBase protocol, ActionTakenValue latestCurrentActionTakenVal); | /**
* This method will insert the disapproved action into the given protocol's action list using the
* annotation and date data from the actionTakenVal argument. It will then update the protocol's
* status and its submission status to 'disapproved' and save the protocol.
* @param protocol
* ... | This method will insert the disapproved action into the given protocol's action list using the annotation and date data from the actionTakenVal argument. It will then update the protocol's status and its submission status to 'disapproved' and save the protocol | recordDisapprovedInRoutingActionAndUpdateStatuses | {
"repo_name": "sanjupolus/KC6.oLatest",
"path": "coeus-impl/src/main/java/org/kuali/kra/protocol/actions/genericactions/ProtocolGenericActionService.java",
"license": "agpl-3.0",
"size": 4939
} | [
"org.kuali.kra.protocol.ProtocolBase",
"org.kuali.rice.kew.actiontaken.ActionTakenValue"
] | import org.kuali.kra.protocol.ProtocolBase; import org.kuali.rice.kew.actiontaken.ActionTakenValue; | import org.kuali.kra.protocol.*; import org.kuali.rice.kew.actiontaken.*; | [
"org.kuali.kra",
"org.kuali.rice"
] | org.kuali.kra; org.kuali.rice; | 158,875 |
public String newPost(String appkey, String blogid, String userid,
String password, String content, boolean publish)
throws Exception {
mLogger.debug("newPost() Called ===========[ SUPPORTED ]=====");
mLogger.debug(" Appkey: " + appkey);
mLogger.debug(" ... | String function(String appkey, String blogid, String userid, String password, String content, boolean publish) throws Exception { mLogger.debug(STR); mLogger.debug(STR + appkey); mLogger.debug(STR + blogid); mLogger.debug(STR + userid); mLogger.debug(STR + publish); mLogger.debug(STR + content); WebsiteData website = v... | /**
* Makes a new post to a designated blog. Optionally, will publish the blog after making the post
*
* @param appkey Unique identifier/passcode of the application sending the post
* @param blogid Unique identifier of the blog the post will be added to
* @param userid Login for a Blogger user ... | Makes a new post to a designated blog. Optionally, will publish the blog after making the post | newPost | {
"repo_name": "paulnguyen/cmpe279",
"path": "eclipse/Roller/src/org/apache/roller/webservices/xmlrpc/BloggerAPIHandler.java",
"license": "apache-2.0",
"size": 19736
} | [
"org.apache.roller.pojos.WebsiteData",
"org.apache.xmlrpc.XmlRpcException"
] | import org.apache.roller.pojos.WebsiteData; import org.apache.xmlrpc.XmlRpcException; | import org.apache.roller.pojos.*; import org.apache.xmlrpc.*; | [
"org.apache.roller",
"org.apache.xmlrpc"
] | org.apache.roller; org.apache.xmlrpc; | 2,748,637 |
Tworkitemlock loadByPrimaryKey(Integer objectID); | Tworkitemlock loadByPrimaryKey(Integer objectID); | /**
* Gets a Tworkitemlock by primary key
*
* @param objectID
* @return
*/ | Gets a Tworkitemlock by primary key | loadByPrimaryKey | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/trackplus/dao/WorkItemLockDAO.java",
"license": "gpl-3.0",
"size": 2042
} | [
"com.trackplus.model.Tworkitemlock"
] | import com.trackplus.model.Tworkitemlock; | import com.trackplus.model.*; | [
"com.trackplus.model"
] | com.trackplus.model; | 2,294,339 |
public void intersect(Rectangle rect) {
if (isDisposed())
SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (rect == null)
SWT.error(SWT.ERROR_NULL_ARGUMENT);
intersect(rect.x, rect.y, rect.width, rect.height);
} | void function(Rectangle rect) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (rect == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); intersect(rect.x, rect.y, rect.width, rect.height); } | /**
* Intersects the given rectangle to the collection of polygons the receiver
* maintains to describe its area.
*
* @param rect
* the rectangle to intersect with the receiver
*
* @exception IllegalArgumentException
* <ul>
* <li>ERROR_NULL_ARGUMENT - if the ... | Intersects the given rectangle to the collection of polygons the receiver maintains to describe its area | intersect | {
"repo_name": "ghillairet/gef-gwt",
"path": "src/main/java/org/eclipse/swt/graphics/Region.java",
"license": "epl-1.0",
"size": 19137
} | [
"org.eclipse.swt.SWT"
] | import org.eclipse.swt.SWT; | import org.eclipse.swt.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 2,743,483 |
public static Object invokeExactStaticMethod(final Class<?> cls, final String methodName,
Object[] args, Class<?>[] parameterTypes)
throws NoSuchMethodException, IllegalAccessException,
InvocationTargetException {
args = ArrayUtils.nullToEmpty(args);
parameterType... | static Object function(final Class<?> cls, final String methodName, Object[] args, Class<?>[] parameterTypes) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { args = ArrayUtils.nullToEmpty(args); parameterTypes = ArrayUtils.nullToEmpty(parameterTypes); final Method method = getAccessibl... | /**
* <p>Invokes a {@code static} method whose parameter types match exactly the parameter
* types given.</p>
*
* <p>This uses reflection to invoke the method obtained from a call to
* {@link #getAccessibleMethod(Class, String, Class[])}.</p>
*
* @param cls invoke static method on thi... | Invokes a static method whose parameter types match exactly the parameter types given. This uses reflection to invoke the method obtained from a call to <code>#getAccessibleMethod(Class, String, Class[])</code> | invokeExactStaticMethod | {
"repo_name": "chaoyi66/commons-lang",
"path": "src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java",
"license": "apache-2.0",
"size": 28700
} | [
"java.lang.reflect.InvocationTargetException",
"java.lang.reflect.Method",
"org.apache.commons.lang3.ArrayUtils"
] | import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import org.apache.commons.lang3.ArrayUtils; | import java.lang.reflect.*; import org.apache.commons.lang3.*; | [
"java.lang",
"org.apache.commons"
] | java.lang; org.apache.commons; | 2,162,245 |
public void addTooltipLines(ItemStack stack, EntityPlayer player, List<String> list, boolean verbose)
{
} | void function(ItemStack stack, EntityPlayer player, List<String> list, boolean verbose) { } | /**
* Custom addInformation() method, which allows selecting a subset of the tooltip strings.
*/ | Custom addInformation() method, which allows selecting a subset of the tooltip strings | addTooltipLines | {
"repo_name": "maruohon/enderutilities",
"path": "src/main/java/fi/dy/masa/enderutilities/item/base/ItemEnderUtilities.java",
"license": "gpl-3.0",
"size": 6241
} | [
"java.util.List",
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.item.ItemStack"
] | import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; | import java.util.*; import net.minecraft.entity.player.*; import net.minecraft.item.*; | [
"java.util",
"net.minecraft.entity",
"net.minecraft.item"
] | java.util; net.minecraft.entity; net.minecraft.item; | 1,684,349 |
public boolean canDeleteIndexContents(Index index, IndexSettings indexSettings, boolean closed) {
final IndexService indexService = this.indices.get(index.name());
// Closed indices may be deleted, even if they are on a shared
// filesystem. Since it is closed we aren't deleting it for reloc... | boolean function(Index index, IndexSettings indexSettings, boolean closed) { final IndexService indexService = this.indices.get(index.name()); if (indexSettings.isOnSharedFilesystem() == false closed) { if (indexService == null && nodeEnv.hasNodeFile()) { return true; } } else { logger.trace(STR, index); } return false... | /**
* This method returns true if the current node is allowed to delete the
* given index. If the index uses a shared filesystem this method always
* returns false.
* @param index {@code Index} to check whether deletion is allowed
* @param indexSettings {@code IndexSettings} for the given index... | This method returns true if the current node is allowed to delete the given index. If the index uses a shared filesystem this method always returns false | canDeleteIndexContents | {
"repo_name": "jpountz/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/indices/IndicesService.java",
"license": "apache-2.0",
"size": 34964
} | [
"org.elasticsearch.index.Index",
"org.elasticsearch.index.IndexService",
"org.elasticsearch.index.IndexSettings"
] | import org.elasticsearch.index.Index; import org.elasticsearch.index.IndexService; import org.elasticsearch.index.IndexSettings; | import org.elasticsearch.index.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 823,364 |
public void testRemoveAll() {
for (int i = 1; i < SIZE; ++i) {
PriorityQueue q = populatedQueue(SIZE);
PriorityQueue p = populatedQueue(i);
assertTrue(q.removeAll(p));
assertEquals(SIZE - i, q.size());
for (int j = 0; j < i; ++j) {
... | void function() { for (int i = 1; i < SIZE; ++i) { PriorityQueue q = populatedQueue(SIZE); PriorityQueue p = populatedQueue(i); assertTrue(q.removeAll(p)); assertEquals(SIZE - i, q.size()); for (int j = 0; j < i; ++j) { Integer x = (Integer)(p.remove()); assertFalse(q.contains(x)); } } } | /**
* removeAll(c) removes only those elements of c and reports true if changed
*/ | removeAll(c) removes only those elements of c and reports true if changed | testRemoveAll | {
"repo_name": "life-beam/j2objc",
"path": "jre_emul/android/platform/libcore/jsr166-tests/src/test/java/jsr166/PriorityQueueTest.java",
"license": "apache-2.0",
"size": 14477
} | [
"java.util.PriorityQueue"
] | import java.util.PriorityQueue; | import java.util.*; | [
"java.util"
] | java.util; | 1,792,697 |
private final void __url(final IOJob job, final S data, final URL url,
final StreamEncoding<?, ?> encoding, final EArchiveType archiveType)
throws Throwable {
final Object oldCur;
oldCur = job.m_current;
try {
job.m_current = url;
try (final InputStream stream = url.openStre... | final void function(final IOJob job, final S data, final URL url, final StreamEncoding<?, ?> encoding, final EArchiveType archiveType) throws Throwable { final Object oldCur; oldCur = job.m_current; try { job.m_current = url; try (final InputStream stream = url.openStream()) { this._stream(job, data, stream, encoding, ... | /**
* Handle an URL
*
* @param job
* the job where logging info can be written
* @param data
* the data to be read
* @param url
* the url
* @param encoding
* the encoding
* @param archiveType
* the archive type
* @throws Th... | Handle an URL | __url | {
"repo_name": "optimizationBenchmarking/utils-base",
"path": "src/main/java/org/optimizationBenchmarking/utils/io/structured/impl/abstr/FileInputTool.java",
"license": "gpl-3.0",
"size": 22273
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 563,858 |
@Deprecated
public void setSubObjectCode(SubObjectCode subObjectCode) {
this.subObjectCode = subObjectCode;
} | void function(SubObjectCode subObjectCode) { this.subObjectCode = subObjectCode; } | /**
* Sets the subObjectCode attribute.
*
* @param subObjectCode The subObjectCode to set.
* @deprecated
*/ | Sets the subObjectCode attribute | setSubObjectCode | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-core/src/main/java/org/kuali/kfs/fp/businessobject/ProcurementCardDefault.java",
"license": "agpl-3.0",
"size": 15525
} | [
"org.kuali.kfs.coa.businessobject.SubObjectCode"
] | import org.kuali.kfs.coa.businessobject.SubObjectCode; | import org.kuali.kfs.coa.businessobject.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 2,325,319 |
@Generated
@Selector("rate")
public native double rate(); | @Selector("rate") native double function(); | /**
* [@property] rate
* <p>
* Linear rate scalar.
*/ | [@property] rate Linear rate scalar | rate | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/phase/PHASEGroupPresetSetting.java",
"license": "apache-2.0",
"size": 6346
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 2,194,311 |
public static synchronized PlatformLogger getLogger(String name) {
PlatformLogger log = null;
WeakReference<PlatformLogger> ref = loggers.get(name);
if (ref != null) {
log = ref.get();
}
if (log == null) {
log = new PlatformLogger(PlatformLogger.Bridge... | static synchronized PlatformLogger function(String name) { PlatformLogger log = null; WeakReference<PlatformLogger> ref = loggers.get(name); if (ref != null) { log = ref.get(); } if (log == null) { log = new PlatformLogger(PlatformLogger.Bridge.convert( LazyLoggers.getLazyLogger(name, PlatformLogger.class.getModule()))... | /**
* Returns a PlatformLogger of a given name.
* @param name the name of the logger
* @return a PlatformLogger
*/ | Returns a PlatformLogger of a given name | getLogger | {
"repo_name": "FauxFaux/jdk9-jdk",
"path": "src/java.base/share/classes/sun/util/logging/PlatformLogger.java",
"license": "gpl-2.0",
"size": 19755
} | [
"java.lang.ref.WeakReference"
] | import java.lang.ref.WeakReference; | import java.lang.ref.*; | [
"java.lang"
] | java.lang; | 2,683,328 |
private void forwardFeedMessageToNode(String node,
HashMap<IFeedMessage, ArrayList<SubscriptionRecord>> messageTable, FeedHandlingMetaData fhmd)
throws Exception {
for (Iterator<IFeedMessage> m = messageTable.keySet().iterator(); m.hasNext();) {
IFeedM... | void function(String node, HashMap<IFeedMessage, ArrayList<SubscriptionRecord>> messageTable, FeedHandlingMetaData fhmd) throws Exception { for (Iterator<IFeedMessage> m = messageTable.keySet().iterator(); m.hasNext();) { IFeedMessage message = m.next(); if (fhmd.messageModified fhmd.messageIsTargetted) { ArrayList<Sub... | /**
* Forwards a table of messages to the specified node.
*
* @param node
* the node ID.
*
* @param messageTable
* the message table.
*
* @param fhmd
* feed handling meta-data for this message.
*
* @throws Exception
* ... | Forwards a table of messages to the specified node | forwardFeedMessageToNode | {
"repo_name": "acshea/edgware",
"path": "fabric.lib/src/fabric/bus/feeds/impl/SubscriptionManager.java",
"license": "epl-1.0",
"size": 61985
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.Iterator",
"java.util.logging.Level"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.logging.Level; | import java.util.*; import java.util.logging.*; | [
"java.util"
] | java.util; | 1,560,176 |
private static void write(OutputStream out, int requestId, int type, byte[] payload) throws IOException {
int bodyLength = RconPacket.getBodyLength(payload.length);
int packetLength = RconPacket.getPacketLength(bodyLength);
ByteBuffer buffer = ByteBuffer.allocate(packetLength);
buffer.order(ByteOrder.LITT... | static void function(OutputStream out, int requestId, int type, byte[] payload) throws IOException { int bodyLength = RconPacket.getBodyLength(payload.length); int packetLength = RconPacket.getPacketLength(bodyLength); ByteBuffer buffer = ByteBuffer.allocate(packetLength); buffer.order(ByteOrder.LITTLE_ENDIAN); buffer.... | /**
* Write a rcon packet on an outputstream
*
* @param out The OutputStream to write on
* @param requestId The request id
* @param type The packet type
* @param payload The payload
*
* @throws IOException
*/ | Write a rcon packet on an outputstream | write | {
"repo_name": "Kronos666/rkon-core",
"path": "src/net/kronos/rkon/core/RconPacket.java",
"license": "mit",
"size": 3826
} | [
"java.io.IOException",
"java.io.OutputStream",
"java.nio.ByteBuffer",
"java.nio.ByteOrder"
] | import java.io.IOException; import java.io.OutputStream; import java.nio.ByteBuffer; import java.nio.ByteOrder; | import java.io.*; import java.nio.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 1,000,993 |
public void testEvaluateEpochDataEntryStatusInComplete3() throws Exception {
// remove the mock scheduled epoch first so that we don't have to expect on equals of the mock epoch object
ScheduledEpoch scheduledEpochFirst = new ScheduledEpoch();
scheduledEpochFirst.setEpoch(studySubjectCreator... | void function() throws Exception { ScheduledEpoch scheduledEpochFirst = new ScheduledEpoch(); scheduledEpochFirst.setEpoch(studySubjectCreatorHelper.createTestTreatmentEpoch(false)); studySubject.addScheduledEpoch(scheduledEpochFirst); studySubjectCreatorHelper.buildCommandObject(studySubject); studySubjectCreatorHelpe... | /**
* Epoch Data Entry Status test Non Randomized Treatment Epoch with Arms Eligibility Done
* Stratification Done Arm not assigned.
*
* @throws Exception the exception
*/ | Epoch Data Entry Status test Non Randomized Treatment Epoch with Arms Eligibility Done Stratification Done Arm not assigned | testEvaluateEpochDataEntryStatusInComplete3 | {
"repo_name": "NCIP/c3pr",
"path": "codebase/projects/core/test/src/java/edu/duke/cabig/c3pr/domain/StudySubjectTest.java",
"license": "bsd-3-clause",
"size": 170087
} | [
"edu.duke.cabig.c3pr.constants.ScheduledEpochDataEntryStatus",
"java.util.ArrayList",
"java.util.List"
] | import edu.duke.cabig.c3pr.constants.ScheduledEpochDataEntryStatus; import java.util.ArrayList; import java.util.List; | import edu.duke.cabig.c3pr.constants.*; import java.util.*; | [
"edu.duke.cabig",
"java.util"
] | edu.duke.cabig; java.util; | 2,022,572 |
EClass getAssertStatement(); | EClass getAssertStatement(); | /**
* Returns the meta object for class '{@link com.rockwellcollins.atc.agree.agree.AssertStatement <em>Assert Statement</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Assert Statement</em>'.
* @see com.rockwellcollins.atc.agree.agree.AssertStatement
* @ge... | Returns the meta object for class '<code>com.rockwellcollins.atc.agree.agree.AssertStatement Assert Statement</code>'. | getAssertStatement | {
"repo_name": "smaccm/smaccm",
"path": "fm-workbench/agree/com.rockwellcollins.atc.agree/src-gen/com/rockwellcollins/atc/agree/agree/AgreePackage.java",
"license": "bsd-3-clause",
"size": 292940
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,185,865 |
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationId, String version) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
... | Observable<ServiceResponse<Void>> function(String resourceGroupName, String accountName, String applicationId, String version) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (accountName == null) { throw new IllegalArgumentException(STR); } if (applicationId == null) { throw new Illega... | /**
* Deletes an application package record and its associated binary file.
*
* @param resourceGroupName The name of the resource group that contains the Batch account.
* @param accountName The name of the Batch account.
* @param applicationId The ID of the application.
* @param version Th... | Deletes an application package record and its associated binary file | deleteWithServiceResponseAsync | {
"repo_name": "anudeepsharma/azure-sdk-for-java",
"path": "azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/implementation/ApplicationPackagesInner.java",
"license": "mit",
"size": 28496
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,448,793 |
protected void write (byte[] b, int off, int len)
throws IOException {
if (isClosed ()) {
throw new SocketException ("Socket is closed");
}
if (isOutputShutdown ()) {
throw new IOException ("Socket output is shutdown");
}
if (!isConnected... | void function (byte[] b, int off, int len) throws IOException { if (isClosed ()) { throw new SocketException (STR); } if (isOutputShutdown ()) { throw new IOException (STR); } if (!isConnected ()) { throw new SocketException (STR); } int totalBytes = 0; while (totalBytes < len) { synchronized (_resetLock) { while (_res... | /**
* Writes <code>len</code> bytes from the specified byte array starting at
* offset <code>off</code> as data segments and queues them for immediate
* transmission.
*
* @param b the data.
* @param off the start offset in the data.
* @param len the number of bytes to write.
*
... | Writes <code>len</code> bytes from the specified byte array starting at offset <code>off</code> as data segments and queues them for immediate transmission | write | {
"repo_name": "CodeBrig/Beam",
"path": "src/net/rudp/ReliableSocket.java",
"license": "mit",
"size": 66080
} | [
"java.io.IOException",
"java.net.SocketException",
"net.rudp.impl.DATSegment",
"net.rudp.impl.Segment"
] | import java.io.IOException; import java.net.SocketException; import net.rudp.impl.DATSegment; import net.rudp.impl.Segment; | import java.io.*; import java.net.*; import net.rudp.impl.*; | [
"java.io",
"java.net",
"net.rudp.impl"
] | java.io; java.net; net.rudp.impl; | 1,905,734 |
private void documentLocator(Document document) {
locator = new JDOMLocator();
String publicID = null;
String systemID = null;
if (document != null) {
DocType docType = document.getDocType();
if (docType != null) {
publicID = docType.getPublic... | void function(Document document) { locator = new JDOMLocator(); String publicID = null; String systemID = null; if (document != null) { DocType docType = document.getDocType(); if (docType != null) { publicID = docType.getPublicID(); systemID = docType.getSystemID(); } } locator.setPublicId(publicID); locator.setSystem... | /**
* <p>
* This method tells you the line of the XML file being parsed.
* For an in-memory document, it's meaningless. The location
* is only valid for the current parsing lifecycle, but
* the document has already been parsed. Therefore, it returns
* -1 for both line and column numbers.
... | This method tells you the line of the XML file being parsed. For an in-memory document, it's meaningless. The location is only valid for the current parsing lifecycle, but the document has already been parsed. Therefore, it returns -1 for both line and column numbers. | documentLocator | {
"repo_name": "roboidstudio/embedded",
"path": "org.jdom/src/org/jdom/output/SAXOutputter.java",
"license": "lgpl-2.1",
"size": 51890
} | [
"org.jdom.DocType",
"org.jdom.Document"
] | import org.jdom.DocType; import org.jdom.Document; | import org.jdom.*; | [
"org.jdom"
] | org.jdom; | 1,351,204 |
private static CRL getCRL(byte[] encoding)
throws CRLException, IOException {
if (encoding.length < CRL_CACHE_SEED_LENGTH) {
throw new CRLException(
Messages.getString("security.152")); //$NON-NLS-1$
}
synchronized ... | static CRL function(byte[] encoding) throws CRLException, IOException { if (encoding.length < CRL_CACHE_SEED_LENGTH) { throw new CRLException( Messages.getString(STR)); } synchronized (CRL_CACHE) { long hash = CRL_CACHE.getHash(encoding); if (CRL_CACHE.contains(hash)) { X509CRL res = (X509CRL) CRL_CACHE.get(hash, encod... | /**
* Returns the CRL object corresponding to the provided encoding.
* Resulting object is retrieved from the cache
* if it contains such correspondence
* and is constructed on the base of encoding
* and stored in the cache otherwise.
* @throws IOException if some decoding errors occur
... | Returns the CRL object corresponding to the provided encoding. Resulting object is retrieved from the cache if it contains such correspondence and is constructed on the base of encoding and stored in the cache otherwise | getCRL | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/archive/classlib/java6/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CertFactoryImpl.java",
"license": "apache-2.0",
"size": 37972
} | [
"java.io.IOException",
"java.security.cert.CRLException",
"org.apache.harmony.security.internal.nls.Messages"
] | import java.io.IOException; import java.security.cert.CRLException; import org.apache.harmony.security.internal.nls.Messages; | import java.io.*; import java.security.cert.*; import org.apache.harmony.security.internal.nls.*; | [
"java.io",
"java.security",
"org.apache.harmony"
] | java.io; java.security; org.apache.harmony; | 2,154,925 |
public Iterable<VirtualPort> createOrUpdateByInputStream(JsonNode vPortNode) {
checkNotNull(vPortNode, JSON_NOT_NULL);
JsonNode vPortNodes = vPortNode.get("ports");
if (vPortNodes == null) {
vPortNodes = vPortNode.get("port");
}
if (vPortNodes.isArray()) {
... | Iterable<VirtualPort> function(JsonNode vPortNode) { checkNotNull(vPortNode, JSON_NOT_NULL); JsonNode vPortNodes = vPortNode.get("ports"); if (vPortNodes == null) { vPortNodes = vPortNode.get("port"); } if (vPortNodes.isArray()) { return changeJsonToPorts(vPortNodes); } else { return changeJsonToPort(vPortNodes); } } | /**
* Returns a Object of the currently known infrastructure virtualPort.
*
* @param vPortNode the virtualPort json node
* @return a collection of virtualPorts
*/ | Returns a Object of the currently known infrastructure virtualPort | createOrUpdateByInputStream | {
"repo_name": "LorenzReinhart/ONOSnew",
"path": "apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/resources/VirtualPortWebResource.java",
"license": "apache-2.0",
"size": 17922
} | [
"com.fasterxml.jackson.databind.JsonNode",
"com.google.common.base.Preconditions",
"org.onosproject.vtnrsc.VirtualPort"
] | import com.fasterxml.jackson.databind.JsonNode; import com.google.common.base.Preconditions; import org.onosproject.vtnrsc.VirtualPort; | import com.fasterxml.jackson.databind.*; import com.google.common.base.*; import org.onosproject.vtnrsc.*; | [
"com.fasterxml.jackson",
"com.google.common",
"org.onosproject.vtnrsc"
] | com.fasterxml.jackson; com.google.common; org.onosproject.vtnrsc; | 1,100,988 |
@Deprecated
void executeTrainingMDS(SparkComputationGraph network, JavaPairRDD<String, PortableDataStream> trainingData); | void executeTrainingMDS(SparkComputationGraph network, JavaPairRDD<String, PortableDataStream> trainingData); | /**
* Train the SparkComputationGraph with the specified <i>serialized MultiDataSet objects</i>. The assumption
* here is that the PortableDataStreams are for MultiDataSet objects, one per file.
*
* @param network Current network state
* @param trainingData Data to train on
* @depreca... | Train the SparkComputationGraph with the specified serialized MultiDataSet objects. The assumption here is that the PortableDataStreams are for MultiDataSet objects, one per file | executeTrainingMDS | {
"repo_name": "shuodata/deeplearning4j",
"path": "deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/api/TrainingMaster.java",
"license": "apache-2.0",
"size": 8588
} | [
"org.apache.spark.api.java.JavaPairRDD",
"org.apache.spark.input.PortableDataStream",
"org.deeplearning4j.spark.impl.graph.SparkComputationGraph"
] | import org.apache.spark.api.java.JavaPairRDD; import org.apache.spark.input.PortableDataStream; import org.deeplearning4j.spark.impl.graph.SparkComputationGraph; | import org.apache.spark.api.java.*; import org.apache.spark.input.*; import org.deeplearning4j.spark.impl.graph.*; | [
"org.apache.spark",
"org.deeplearning4j.spark"
] | org.apache.spark; org.deeplearning4j.spark; | 2,005,160 |
@Override
protected void dispatchRestoreInstanceState(SparseArray<Parcelable> container) {
System.out.println("resp1onse AdapterView2: protected void dispatchRestoreInstanceState(SparseArray<Parcelable> container) { start void ");
dispatchThawSelfOnly(container);
System.out.println("resp1onse Ad... | void function(SparseArray<Parcelable> container) { System.out.println(STR); dispatchThawSelfOnly(container); System.out.println(STR); } class AdapterDataSetObserver extends DataSetObserver { private Parcelable mInstanceState = null; | /**
* Override to prevent thawing of any views created by the adapter.
*/ | Override to prevent thawing of any views created by the adapter | dispatchRestoreInstanceState | {
"repo_name": "dzl1444825431/dzl_experience",
"path": "android_ep/src/com/dzl/test/gallery/AdapterView2.java",
"license": "epl-1.0",
"size": 55247
} | [
"android.database.DataSetObserver",
"android.os.Parcelable",
"android.util.SparseArray"
] | import android.database.DataSetObserver; import android.os.Parcelable; import android.util.SparseArray; | import android.database.*; import android.os.*; import android.util.*; | [
"android.database",
"android.os",
"android.util"
] | android.database; android.os; android.util; | 2,327,186 |
public static DataNode createDataNode(String args[],
Configuration conf, SecureResources resources) throws IOException {
DataNode dn = instantiateDataNode(args, conf, resources);
runDatanodeDaemon(dn);
return dn;
} | static DataNode function(String args[], Configuration conf, SecureResources resources) throws IOException { DataNode dn = instantiateDataNode(args, conf, resources); runDatanodeDaemon(dn); return dn; } | /** Instantiate & Start a single datanode daemon and wait for it to finish.
* If this thread is specifically interrupted, it will stop waiting.
* LimitedPrivate for creating secure datanodes
*/ | Instantiate & Start a single datanode daemon and wait for it to finish. If this thread is specifically interrupted, it will stop waiting. LimitedPrivate for creating secure datanodes | createDataNode | {
"repo_name": "kl0u/visco",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNode.java",
"license": "apache-2.0",
"size": 80668
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hdfs.server.datanode.SecureDataNodeStarter"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.server.datanode.SecureDataNodeStarter; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.server.datanode.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,668,792 |
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Position)) {
return false;
}
Position oPosition = (Position) o;
List<Integer> thisMoves = this.getMoves();
List<Integer> oMoves = oPosition.getMoves();
if (oMoves.size() != thisMoves.size()) {
... | boolean function(Object o) { if (this == o) { return true; } if (!(o instanceof Position)) { return false; } Position oPosition = (Position) o; List<Integer> thisMoves = this.getMoves(); List<Integer> oMoves = oPosition.getMoves(); if (oMoves.size() != thisMoves.size()) { return false; } Iterator<Integer> thisIt = this... | /**
* Returns true if <code>o</code> is a Position object that contains the
* same sequence of moves as that of this. Returns false otherwise.
*
* @see java.lang.Object#equals(java.lang.Object)
*/ | Returns true if <code>o</code> is a Position object that contains the same sequence of moves as that of this. Returns false otherwise | equals | {
"repo_name": "lanen/jbt",
"path": "JBTCore/src/jbt/model/core/ModelTask.java",
"license": "apache-2.0",
"size": 13699
} | [
"java.util.Iterator",
"java.util.List"
] | import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,309,050 |
private JPanel getButtonPanel() {
if (buttonPanel == null) {
buttonPanel = new JPanel();
buttonPanel.setLayout(new FlowLayout());
buttonPanel.add(getAddButton(), null);
}
return buttonPanel;
} | JPanel function() { if (buttonPanel == null) { buttonPanel = new JPanel(); buttonPanel.setLayout(new FlowLayout()); buttonPanel.add(getAddButton(), null); } return buttonPanel; } | /**
* This method initializes buttonPanel
*
* @return javax.swing.JPanel
*/ | This method initializes buttonPanel | getButtonPanel | {
"repo_name": "NCIP/cagrid-core",
"path": "caGrid/projects/gaards-ui/src/org/cagrid/grape/TargetGridBaseEditor.java",
"license": "bsd-3-clause",
"size": 21438
} | [
"java.awt.FlowLayout",
"javax.swing.JPanel"
] | import java.awt.FlowLayout; import javax.swing.JPanel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,662,891 |
return result;
}
/**
* Sets the value of the result property.
*
* @param value
* allowed object is
* {@link MethodResult }
| return result; } /** * Sets the value of the result property. * * @param value * allowed object is * {@link MethodResult } | /**
* Gets the value of the result property.
*
* @return
* possible object is
* {@link MethodResult }
*
*/ | Gets the value of the result property | getResult | {
"repo_name": "dushmis/Oracle-Cloud",
"path": "PaaS_SaaS_Accelerator_RESTFulFacade/XJC_Beans/src/com/oracle/xmlns/apps/cdm/foundation/parties/personservice/applicationmodule/types/DeletePersonAsyncResponse.java",
"license": "bsd-3-clause",
"size": 2052
} | [
"com.oracle.xmlns.adf.svc.types.MethodResult"
] | import com.oracle.xmlns.adf.svc.types.MethodResult; | import com.oracle.xmlns.adf.svc.types.*; | [
"com.oracle.xmlns"
] | com.oracle.xmlns; | 356,667 |
@Test
public void testShowCurrentRole() throws Exception {
//TODO: Add more test cases once we fix SENTRY-268
Connection connection = context.createConnection(ADMIN1);
Statement statement = context.createStatement(connection);
statement.execute("CREATE ROLE role1");
statement.execute("GRANT ROLE... | void function() throws Exception { Connection connection = context.createConnection(ADMIN1); Statement statement = context.createStatement(connection); statement.execute(STR); statement.execute(STR + ADMINGROUP); statement.execute(STR); ResultSet resultSet = statement.executeQuery(STR); ResultSetMetaData resultSetMetaD... | /**
* SHOW CURRENT ROLE
* @throws Exception
*/ | SHOW CURRENT ROLE | testShowCurrentRole | {
"repo_name": "apache/incubator-sentry",
"path": "sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDatabaseProvider.java",
"license": "apache-2.0",
"size": 91506
} | [
"java.sql.Connection",
"java.sql.ResultSet",
"java.sql.ResultSetMetaData",
"java.sql.Statement",
"org.hamcrest.Matchers",
"org.junit.Assert"
] | import java.sql.Connection; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.Statement; import org.hamcrest.Matchers; import org.junit.Assert; | import java.sql.*; import org.hamcrest.*; import org.junit.*; | [
"java.sql",
"org.hamcrest",
"org.junit"
] | java.sql; org.hamcrest; org.junit; | 486,274 |
public void testTask1BlockedByTask2LongRunningCanceled(String execSvcJNDIName, PrintWriter out) throws Exception {
@SuppressWarnings("unchecked")
Future<Integer> future1 = (Future<Integer>) futures.remove("testTask1BlockedByTask2LongRunning-future1-" + execSvcJNDIName);
@SuppressWarnings("un... | void function(String execSvcJNDIName, PrintWriter out) throws Exception { @SuppressWarnings(STR) Future<Integer> future1 = (Future<Integer>) futures.remove(STR + execSvcJNDIName); @SuppressWarnings(STR) Future<Integer> future2 = (Future<Integer>) futures.remove(STR + execSvcJNDIName); assertTrue(future1.isDone()); asse... | /**
* Verify that futures for long running tasks previously submitted are canceled now.
*/ | Verify that futures for long running tasks previously submitted are canceled now | testTask1BlockedByTask2LongRunningCanceled | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.concurrent_fat_config/test-applications/concurrent/src/fat/concurrent/web/EEConcurrencyUtilsFATServlet.java",
"license": "epl-1.0",
"size": 30273
} | [
"java.io.PrintWriter",
"java.util.concurrent.CancellationException",
"java.util.concurrent.Future",
"java.util.concurrent.TimeUnit",
"org.junit.Assert"
] | import java.io.PrintWriter; import java.util.concurrent.CancellationException; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import org.junit.Assert; | import java.io.*; import java.util.concurrent.*; import org.junit.*; | [
"java.io",
"java.util",
"org.junit"
] | java.io; java.util; org.junit; | 1,763,463 |
ServiceResponse<Void> enumValid() throws ErrorException, IOException; | ServiceResponse<Void> enumValid() throws ErrorException, IOException; | /**
* Get using uri with query parameter 'green color'.
*
* @throws ErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @return the {@link ServiceResponse} object if successful.
*/ | Get using uri with query parameter 'green color' | enumValid | {
"repo_name": "sharadagarwal/autorest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/url/QueriesOperations.java",
"license": "mit",
"size": 45468
} | [
"com.microsoft.rest.ServiceResponse",
"java.io.IOException"
] | import com.microsoft.rest.ServiceResponse; import java.io.IOException; | import com.microsoft.rest.*; import java.io.*; | [
"com.microsoft.rest",
"java.io"
] | com.microsoft.rest; java.io; | 2,899,654 |
public List<Entry> readEntriesOrWait(int numberOfEntriesToRead) throws InterruptedException, ManagedLedgerException; | List<Entry> function(int numberOfEntriesToRead) throws InterruptedException, ManagedLedgerException; | /**
* Read entries from the ManagedLedger, up to the specified number. The returned list can be smaller.
*
* If no entries are available, the method will block until at least a new message will be persisted.
*
* @param numberOfEntriesToRead
* maximum number of entries to return
... | Read entries from the ManagedLedger, up to the specified number. The returned list can be smaller. If no entries are available, the method will block until at least a new message will be persisted | readEntriesOrWait | {
"repo_name": "yush1ga/pulsar",
"path": "managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursor.java",
"license": "apache-2.0",
"size": 14478
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,614,928 |
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(GmlPackage.eINSTANCE.getTemporalDatumRefType_TemporalDatum());
}
return childrenFeatures;
} | Collection<? extends EStructuralFeature> function(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(GmlPackage.eINSTANCE.getTemporalDatumRefType_TemporalDatum()); } return childrenFeatures; } | /**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-... | This specifies how to implement <code>#getChildren</code> and is used to deduce an appropriate feature for an <code>org.eclipse.emf.edit.command.AddCommand</code>, <code>org.eclipse.emf.edit.command.RemoveCommand</code> or <code>org.eclipse.emf.edit.command.MoveCommand</code> in <code>#createCommand</code>. | getChildrenFeatures | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.edit/src/net/opengis/gml/provider/TemporalDatumRefTypeItemProvider.java",
"license": "apache-2.0",
"size": 12089
} | [
"java.util.Collection",
"net.opengis.gml.GmlPackage",
"org.eclipse.emf.ecore.EStructuralFeature"
] | import java.util.Collection; import net.opengis.gml.GmlPackage; import org.eclipse.emf.ecore.EStructuralFeature; | import java.util.*; import net.opengis.gml.*; import org.eclipse.emf.ecore.*; | [
"java.util",
"net.opengis.gml",
"org.eclipse.emf"
] | java.util; net.opengis.gml; org.eclipse.emf; | 2,190,365 |
public static boolean constantTimeEquals(byte[] a, byte[] b) {
return MessageDigest.isEqual(a, b);
} | static boolean function(byte[] a, byte[] b) { return MessageDigest.isEqual(a, b); } | /**
* Returns true if the two parameters are equal. This method is null-safe and evaluates the
* equality in constant-time rather than "short-circuiting" on the first inequality. This
* prevents timing attacks (side channel attacks) when comparing passwords or hash values.
*
* @param a a byte[]... | Returns true if the two parameters are equal. This method is null-safe and evaluates the equality in constant-time rather than "short-circuiting" on the first inequality. This prevents timing attacks (side channel attacks) when comparing passwords or hash values | constantTimeEquals | {
"repo_name": "mcgilman/nifi",
"path": "nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/security/kms/CryptoUtils.java",
"license": "apache-2.0",
"size": 21346
} | [
"java.security.MessageDigest"
] | import java.security.MessageDigest; | import java.security.*; | [
"java.security"
] | java.security; | 142,713 |
if (TextUtils.isEmpty(signedData) || TextUtils.isEmpty(base64PublicKey) ||
TextUtils.isEmpty(signature)) {
Log.e(TAG, "Purchase verification failed: missing data.");
return false;
}
PublicKey key = Security.generatePublicKey(base64PublicKey);
return Secur... | if (TextUtils.isEmpty(signedData) TextUtils.isEmpty(base64PublicKey) TextUtils.isEmpty(signature)) { Log.e(TAG, STR); return false; } PublicKey key = Security.generatePublicKey(base64PublicKey); return Security.verify(key, signedData, signature); } | /**
* Verifies that the data was signed with the given signature, and returns
* the verified purchase. The data is in JSON format and signed
* with a private key. The data also contains the {@link PurchaseState}
* and product ID of the purchase.
* @param base64PublicKey the base64-encoded publi... | Verifies that the data was signed with the given signature, and returns the verified purchase. The data is in JSON format and signed with a private key. The data also contains the <code>PurchaseState</code> and product ID of the purchase | verifyPurchase | {
"repo_name": "adarshahd/SimpleAppLock",
"path": "Simple AppLock/src/main/java/com/gigathinking/simpleapplock/Security.java",
"license": "gpl-3.0",
"size": 5026
} | [
"android.text.TextUtils",
"android.util.Log",
"java.security.PublicKey"
] | import android.text.TextUtils; import android.util.Log; import java.security.PublicKey; | import android.text.*; import android.util.*; import java.security.*; | [
"android.text",
"android.util",
"java.security"
] | android.text; android.util; java.security; | 771,106 |
public UserInfo createdBy() {
return this.createdBy;
} | UserInfo function() { return this.createdBy; } | /**
* Get the createdBy property: Describes a user that created the watchlist.
*
* @return the createdBy value.
*/ | Get the createdBy property: Describes a user that created the watchlist | createdBy | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistProperties.java",
"license": "mit",
"size": 18514
} | [
"com.azure.resourcemanager.securityinsights.models.UserInfo"
] | import com.azure.resourcemanager.securityinsights.models.UserInfo; | import com.azure.resourcemanager.securityinsights.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 448,899 |
protected View buildAuthorizationForRequest(final OAuthRegisteredService registeredService,
final J2EContext context,
final String clientId, final Service service,
final Au... | View function(final OAuthRegisteredService registeredService, final J2EContext context, final String clientId, final Service service, final Authentication authentication) { final OAuth20AuthorizationResponseBuilder builder = this.oauthAuthorizationResponseBuilders .stream() .filter(b -> b.supports(context)) .findFirst(... | /**
* Build callback url for request string.
*
* @param registeredService the registered service
* @param context the context
* @param clientId the client id
* @param service the service
* @param authentication the authentication
* @return the stri... | Build callback url for request string | buildAuthorizationForRequest | {
"repo_name": "doodelicious/cas",
"path": "support/cas-server-support-oauth/src/main/java/org/apereo/cas/support/oauth/web/endpoints/OAuth20AuthorizeEndpointController.java",
"license": "apache-2.0",
"size": 12252
} | [
"org.apache.commons.lang3.StringUtils",
"org.apereo.cas.authentication.Authentication",
"org.apereo.cas.authentication.principal.Service",
"org.apereo.cas.support.oauth.OAuth20Constants",
"org.apereo.cas.support.oauth.OAuth20GrantTypes",
"org.apereo.cas.support.oauth.services.OAuthRegisteredService",
"o... | import org.apache.commons.lang3.StringUtils; import org.apereo.cas.authentication.Authentication; import org.apereo.cas.authentication.principal.Service; import org.apereo.cas.support.oauth.OAuth20Constants; import org.apereo.cas.support.oauth.OAuth20GrantTypes; import org.apereo.cas.support.oauth.services.OAuthRegiste... | import org.apache.commons.lang3.*; import org.apereo.cas.authentication.*; import org.apereo.cas.authentication.principal.*; import org.apereo.cas.support.oauth.*; import org.apereo.cas.support.oauth.services.*; import org.apereo.cas.support.oauth.web.response.accesstoken.ext.*; import org.apereo.cas.support.oauth.web.... | [
"org.apache.commons",
"org.apereo.cas",
"org.pac4j.core",
"org.springframework.web"
] | org.apache.commons; org.apereo.cas; org.pac4j.core; org.springframework.web; | 2,615,551 |
@Test(timeout = 360000)
public void testFileBlockReplicationAffectingMaintenance()
throws Exception {
int defaultReplication = getConf().getInt(DFSConfigKeys
.DFS_REPLICATION_KEY, DFSConfigKeys.DFS_REPLICATION_DEFAULT);
int defaultMaintenanceMinRepl = getConf().getInt(DFSConfigKeys
.DF... | @Test(timeout = 360000) void function() throws Exception { int defaultReplication = getConf().getInt(DFSConfigKeys .DFS_REPLICATION_KEY, DFSConfigKeys.DFS_REPLICATION_DEFAULT); int defaultMaintenanceMinRepl = getConf().getInt(DFSConfigKeys .DFS_NAMENODE_MAINTENANCE_REPLICATION_MIN_KEY, DFSConfigKeys.DFS_NAMENODE_MAINTE... | /**
* Test file block replication lesser than maintenance minimum.
*/ | Test file block replication lesser than maintenance minimum | testFileBlockReplicationAffectingMaintenance | {
"repo_name": "steveloughran/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestMaintenanceState.java",
"license": "apache-2.0",
"size": 45334
} | [
"org.junit.Assert",
"org.junit.Test"
] | import org.junit.Assert; import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,927,523 |
public Stream<Path> getKShortestPaths(DeviceId src, DeviceId dst) {
return getKShortestPaths(src, dst, linkWeight());
} | Stream<Path> function(DeviceId src, DeviceId dst) { return getKShortestPaths(src, dst, linkWeight()); } | /**
* Lazily computes on-demand the k-shortest paths between source and
* destination devices.
*
*
* @param src source device
* @param dst destination device
* @return stream of k-shortest paths
*/ | Lazily computes on-demand the k-shortest paths between source and destination devices | getKShortestPaths | {
"repo_name": "osinstom/onos",
"path": "core/common/src/main/java/org/onosproject/common/DefaultTopology.java",
"license": "apache-2.0",
"size": 31273
} | [
"java.util.stream.Stream",
"org.onosproject.net.DeviceId",
"org.onosproject.net.Path"
] | import java.util.stream.Stream; import org.onosproject.net.DeviceId; import org.onosproject.net.Path; | import java.util.stream.*; import org.onosproject.net.*; | [
"java.util",
"org.onosproject.net"
] | java.util; org.onosproject.net; | 1,812,988 |
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == SELECT_IMAGE_CODE && resultCode == Activity.RESULT_OK && data != null) {
try {
InputStream inputStream = getContentResolver().openInputStream(data.getD... | void function(int requestCode, int resultCode, Intent data) { if (requestCode == SELECT_IMAGE_CODE && resultCode == Activity.RESULT_OK && data != null) { try { InputStream inputStream = getContentResolver().openInputStream(data.getData()); Bitmap chosenImage = BitmapFactory.decodeStream(inputStream); chosenImage = Imag... | /**
* Handle the results of the image selection activity
* @param requestCode id of the finished activity
* @param resultCode code representing whether that activity was successful or not
* @param data the data returned from that activity
*/ | Handle the results of the image selection activity | onActivityResult | {
"repo_name": "CMPUT301F17T15/CIA",
"path": "app/src/main/java/com/cmput301/cia/activities/events/HabitEventViewActivity.java",
"license": "mit",
"size": 9533
} | [
"android.app.Activity",
"android.content.Intent",
"android.graphics.Bitmap",
"android.graphics.BitmapFactory",
"com.cmput301.cia.utilities.ImageUtilities",
"java.io.IOException",
"java.io.InputStream"
] | import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import com.cmput301.cia.utilities.ImageUtilities; import java.io.IOException; import java.io.InputStream; | import android.app.*; import android.content.*; import android.graphics.*; import com.cmput301.cia.utilities.*; import java.io.*; | [
"android.app",
"android.content",
"android.graphics",
"com.cmput301.cia",
"java.io"
] | android.app; android.content; android.graphics; com.cmput301.cia; java.io; | 1,394,443 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.