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 RequiredModulePersistence getRequiredModulePersistence() {
return requiredModulePersistence;
} | RequiredModulePersistence function() { return requiredModulePersistence; } | /**
* Returns the required module persistence.
*
* @return the required module persistence
*/ | Returns the required module persistence | getRequiredModulePersistence | {
"repo_name": "queza85/edison",
"path": "edison-portal-framework/edison-appstore-2016-portlet/docroot/WEB-INF/src/org/kisti/edison/science/service/base/CommonModuleServiceBaseImpl.java",
"license": "gpl-3.0",
"size": 52478
} | [
"org.kisti.edison.science.service.persistence.RequiredModulePersistence"
] | import org.kisti.edison.science.service.persistence.RequiredModulePersistence; | import org.kisti.edison.science.service.persistence.*; | [
"org.kisti.edison"
] | org.kisti.edison; | 2,543,306 |
public int calculateHeight(int width)
{
width-=2*borderSize;
FontMetrics met=this.getFontMetrics();
int ret=met.getHeight();
String[] words=text.split(" ");
int x=0;
for(int w=0;w<words.length;w++)
{
if((x+met.stringWidth(words[w]))>(width))
{
x=0;
ret+=met.getHeight()+spaceBetween... | int function(int width) { width-=2*borderSize; FontMetrics met=this.getFontMetrics(); int ret=met.getHeight(); String[] words=text.split(" "); int x=0; for(int w=0;w<words.length;w++) { if((x+met.stringWidth(words[w]))>(width)) { x=0; ret+=met.getHeight()+spaceBetweenLines; } x+=met.stringWidth(words[w]+" "); } return ... | /**
* Calculates the height of an annotation by using the same process that is used in the main program, and looking at the results.
* Theoretically, using LineBreakMeasurer would be possible, and allow better fits, but has the downside of being very difficult to work with for anything else.
* @param width Th... | Calculates the height of an annotation by using the same process that is used in the main program, and looking at the results. Theoretically, using LineBreakMeasurer would be possible, and allow better fits, but has the downside of being very difficult to work with for anything else | calculateHeight | {
"repo_name": "e1125755/AnnotationRouting",
"path": "Eclipse/Labeling/src/routingapp/Annotation.java",
"license": "gpl-3.0",
"size": 3190
} | [
"java.awt.FontMetrics"
] | import java.awt.FontMetrics; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,677,503 |
public void setDependencies(Set<Artifact> dependencies) {
this.dependencies = dependencies;
} | void function(Set<Artifact> dependencies) { this.dependencies = dependencies; } | /**
* Sets the dependencies.
*
* @param dependencies the new dependencies
*/ | Sets the dependencies | setDependencies | {
"repo_name": "jdcasey/pnc",
"path": "model/src/main/java/org/jboss/pnc/model/BuildRecord.java",
"license": "apache-2.0",
"size": 33507
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,616,322 |
public void addConditionsTo(CQL3CasRequest request,
Clustering<?> clustering,
QueryOptions options)
{
if (!columnConditions.isEmpty())
request.addConditions(clustering, columnConditions, options);
if (!staticConditions.i... | void function(CQL3CasRequest request, Clustering<?> clustering, QueryOptions options) { if (!columnConditions.isEmpty()) request.addConditions(clustering, columnConditions, options); if (!staticConditions.isEmpty()) request.addConditions(Clustering.STATIC_CLUSTERING, staticConditions, options); } | /**
* Adds the conditions to the specified CAS request.
*
* @param request the request
* @param clustering the clustering prefix
* @param options the query options
*/ | Adds the conditions to the specified CAS request | addConditionsTo | {
"repo_name": "belliottsmith/cassandra",
"path": "src/java/org/apache/cassandra/cql3/conditions/ColumnConditions.java",
"license": "apache-2.0",
"size": 5240
} | [
"org.apache.cassandra.cql3.QueryOptions",
"org.apache.cassandra.cql3.statements.CQL3CasRequest",
"org.apache.cassandra.db.Clustering"
] | import org.apache.cassandra.cql3.QueryOptions; import org.apache.cassandra.cql3.statements.CQL3CasRequest; import org.apache.cassandra.db.Clustering; | import org.apache.cassandra.cql3.*; import org.apache.cassandra.cql3.statements.*; import org.apache.cassandra.db.*; | [
"org.apache.cassandra"
] | org.apache.cassandra; | 1,156,945 |
private void stopAutoMove() {
List<Input> inputs = bindsConfig.getBinds(new SimpleUri("engine:forwards"));
Input forwardKey = getValidKey(inputs);
if (forwardKey != null) {
inputSystem.cancelSimulatedKeyStroke(forwardKey);
isAutoMove = false;
}
} | void function() { List<Input> inputs = bindsConfig.getBinds(new SimpleUri(STR)); Input forwardKey = getValidKey(inputs); if (forwardKey != null) { inputSystem.cancelSimulatedKeyStroke(forwardKey); isAutoMove = false; } } | /**
* Auto move is disabled when the associated key is pressed again.
* This cancels the simulated repeated key stroke for the forward input button.
*/ | Auto move is disabled when the associated key is pressed again. This cancels the simulated repeated key stroke for the forward input button | stopAutoMove | {
"repo_name": "dannyzhou98/Terasology",
"path": "engine/src/main/java/org/terasology/logic/players/LocalPlayerSystem.java",
"license": "apache-2.0",
"size": 22468
} | [
"java.util.List",
"org.terasology.engine.SimpleUri",
"org.terasology.input.Input"
] | import java.util.List; import org.terasology.engine.SimpleUri; import org.terasology.input.Input; | import java.util.*; import org.terasology.engine.*; import org.terasology.input.*; | [
"java.util",
"org.terasology.engine",
"org.terasology.input"
] | java.util; org.terasology.engine; org.terasology.input; | 2,731,799 |
public void ramlak(Grid2D sinogram) {
Grid1DComplex[] sinogramTransform = new Grid1DComplex[(sinogram.getHeight())];
Grid1D[] filteredSinogram = new Grid1D[(sinogram.getHeight())];
Grid1DComplex ramlacFilter = new Grid1DComplex(sinogram.getWidth());
int middle = (int) ramlacFilter.getSize()[0]/2;
ram... | void function(Grid2D sinogram) { Grid1DComplex[] sinogramTransform = new Grid1DComplex[(sinogram.getHeight())]; Grid1D[] filteredSinogram = new Grid1D[(sinogram.getHeight())]; Grid1DComplex ramlacFilter = new Grid1DComplex(sinogram.getWidth()); int middle = (int) ramlacFilter.getSize()[0]/2; ramlacFilter.setRealAtIndex... | /**
* RamLak filtering of the input sinogram
*
* @param sinogram
*/ | RamLak filtering of the input sinogram | ramlak | {
"repo_name": "YixingHuang/CONRAD-1",
"path": "src/edu/stanford/rsl/tutorial/truncation/PolynomialTruncationCorrectionExample.java",
"license": "gpl-3.0",
"size": 12113
} | [
"edu.stanford.rsl.conrad.data.numeric.Grid1D",
"edu.stanford.rsl.conrad.data.numeric.Grid1DComplex",
"edu.stanford.rsl.conrad.data.numeric.Grid2D"
] | import edu.stanford.rsl.conrad.data.numeric.Grid1D; import edu.stanford.rsl.conrad.data.numeric.Grid1DComplex; import edu.stanford.rsl.conrad.data.numeric.Grid2D; | import edu.stanford.rsl.conrad.data.numeric.*; | [
"edu.stanford.rsl"
] | edu.stanford.rsl; | 878,438 |
public synchronized void write(MessageType msg) throws IllegalStateException {
byte[] messageBytes = msg.toByteArray();
checkState(messageBytes.length <= maxMessageSize);
byte[] messageLength = new byte[4];
Utils.uint32ToByteArrayBE(messageBytes.length, messageLength, 0);
wri... | synchronized void function(MessageType msg) throws IllegalStateException { byte[] messageBytes = msg.toByteArray(); checkState(messageBytes.length <= maxMessageSize); byte[] messageLength = new byte[4]; Utils.uint32ToByteArrayBE(messageBytes.length, messageLength, 0); writeTarget.writeBytes(messageLength); writeTarget.... | /**
* <p>Writes the given message to the other side of the connection, prefixing it with the proper 4-byte prefix.</p>
*
* <p>Provides a write-order guarantee.</p>
*
* @throws IllegalStateException If the encoded message is larger than the maximum message size.
*/ | Writes the given message to the other side of the connection, prefixing it with the proper 4-byte prefix. Provides a write-order guarantee | write | {
"repo_name": "leafcoin/leafcoinj-alice",
"path": "core/src/main/java/com/google/leafcoin/protocols/niowrapper/ProtobufParser.java",
"license": "apache-2.0",
"size": 10834
} | [
"com.google.common.base.Preconditions",
"com.google.leafcoin.core.Utils"
] | import com.google.common.base.Preconditions; import com.google.leafcoin.core.Utils; | import com.google.common.base.*; import com.google.leafcoin.core.*; | [
"com.google.common",
"com.google.leafcoin"
] | com.google.common; com.google.leafcoin; | 1,803,869 |
public double getMaximumItemWidth() {
return getMaxItemWidth();
}
/**
* Sets the maximum item width, which is specified as a percentage of the
* available space for all items, and sends a {@link RendererChangeEvent}
| double function() { return getMaxItemWidth(); } /** * Sets the maximum item width, which is specified as a percentage of the * available space for all items, and sends a {@link RendererChangeEvent} | /**
* Returns the maximum width, as a percentage of the available drawing
* space.
*
* @return The maximum width.
*
* @see #setMaximumItemWidth(double)
*/ | Returns the maximum width, as a percentage of the available drawing space | getMaximumItemWidth | {
"repo_name": "aaronc/jfreechart",
"path": "source/org/jfree/chart/renderer/category/LevelRenderer.java",
"license": "lgpl-2.1",
"size": 17573
} | [
"org.jfree.chart.event.RendererChangeEvent"
] | import org.jfree.chart.event.RendererChangeEvent; | import org.jfree.chart.event.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,965,585 |
public PortStatistics calcDeltaStats(DeviceId deviceId, PortStatistics prvStats, PortStatistics newStats) {
// calculate time difference
long deltaStatsSec, deltaStatsNano;
if (newStats.durationNano() < prvStats.durationNano()) {
deltaStatsNano = newStats.durationNano() - prvStat... | PortStatistics function(DeviceId deviceId, PortStatistics prvStats, PortStatistics newStats) { long deltaStatsSec, deltaStatsNano; if (newStats.durationNano() < prvStats.durationNano()) { deltaStatsNano = newStats.durationNano() - prvStats.durationNano() + TimeUnit.SECONDS.toNanos(1); deltaStatsSec = newStats.durationS... | /**
* Calculate delta statistics by subtracting previous from new statistics.
*
* @param deviceId device identifier
* @param prvStats previous port statistics
* @param newStats new port statistics
* @return PortStatistics
*/ | Calculate delta statistics by subtracting previous from new statistics | calcDeltaStats | {
"repo_name": "wuwenbin2/onos_bgp_evpn",
"path": "core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java",
"license": "apache-2.0",
"size": 79923
} | [
"java.util.concurrent.TimeUnit",
"org.onosproject.net.DeviceId",
"org.onosproject.net.device.DefaultPortStatistics",
"org.onosproject.net.device.PortStatistics"
] | import java.util.concurrent.TimeUnit; import org.onosproject.net.DeviceId; import org.onosproject.net.device.DefaultPortStatistics; import org.onosproject.net.device.PortStatistics; | import java.util.concurrent.*; import org.onosproject.net.*; import org.onosproject.net.device.*; | [
"java.util",
"org.onosproject.net"
] | java.util; org.onosproject.net; | 1,840,164 |
openConnection(url);
setRequestProperty("SOAPAction", "getProjectInfo");
String response = sendQuery(emptyQuery);
closeConnection();
WSProjectInfo projectInfo = new WSProjectInfo();
projectInfo.encodeData(response);
return projectInfo;
}
| openConnection(url); setRequestProperty(STR, STR); String response = sendQuery(emptyQuery); closeConnection(); WSProjectInfo projectInfo = new WSProjectInfo(); projectInfo.encodeData(response); return projectInfo; } | /**
* Query project information from the controller.
*
* @return project information.
* @throws IhcExecption
*/ | Query project information from the controller | getProjectInfo | {
"repo_name": "taimos/openhab",
"path": "bundles/binding/org.openhab.binding.ihc/src/main/java/org/openhab/binding/ihc/ws/IhcControllerService.java",
"license": "epl-1.0",
"size": 6079
} | [
"org.openhab.binding.ihc.ws.datatypes.WSProjectInfo"
] | import org.openhab.binding.ihc.ws.datatypes.WSProjectInfo; | import org.openhab.binding.ihc.ws.datatypes.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 1,631,291 |
private String getCustomReloginErrorPage(HttpServletRequest req) {
String reLogin = CookieHelper.getCookieValue(req.getCookies(), ReferrerURLCookieHandler.CUSTOM_RELOGIN_URL_COOKIENAME);
if (reLogin != null && reLogin.length() > 0) {
if (reLogin.indexOf("?") < 0)
reLogin ... | String function(HttpServletRequest req) { String reLogin = CookieHelper.getCookieValue(req.getCookies(), ReferrerURLCookieHandler.CUSTOM_RELOGIN_URL_COOKIENAME); if (reLogin != null && reLogin.length() > 0) { if (reLogin.indexOf("?") < 0) reLogin += STR; } return reLogin; } | /**
* Get custom error page that specified in the custom login page
*
* @param req
* @return
*/ | Get custom error page that specified in the custom login page | getCustomReloginErrorPage | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/internal/FormLoginExtensionProcessor.java",
"license": "epl-1.0",
"size": 15749
} | [
"com.ibm.ws.webcontainer.security.CookieHelper",
"com.ibm.ws.webcontainer.security.ReferrerURLCookieHandler",
"javax.servlet.http.HttpServletRequest"
] | import com.ibm.ws.webcontainer.security.CookieHelper; import com.ibm.ws.webcontainer.security.ReferrerURLCookieHandler; import javax.servlet.http.HttpServletRequest; | import com.ibm.ws.webcontainer.security.*; import javax.servlet.http.*; | [
"com.ibm.ws",
"javax.servlet"
] | com.ibm.ws; javax.servlet; | 1,547,991 |
// Use the file type results
if (refreshInvalid(dataTypeReport)) {
dataTypeReport.setDataTypeState(DataTypeState.INVALID);
} else if (refreshValid(dataTypeReport)) {
dataTypeReport.setDataTypeState(DataTypeState.VALID);
}
} | if (refreshInvalid(dataTypeReport)) { dataTypeReport.setDataTypeState(DataTypeState.INVALID); } else if (refreshValid(dataTypeReport)) { dataTypeReport.setDataTypeState(DataTypeState.VALID); } } | /**
* Refreshes any dirty valid or invalid states at the data-type level.
*/ | Refreshes any dirty valid or invalid states at the data-type level | visit | {
"repo_name": "icgc-dcc/dcc-submission",
"path": "dcc-submission-core/src/main/java/org/icgc/dcc/submission/core/report/visitor/RefreshStateVisitor.java",
"license": "gpl-3.0",
"size": 7169
} | [
"org.icgc.dcc.submission.core.report.DataTypeState"
] | import org.icgc.dcc.submission.core.report.DataTypeState; | import org.icgc.dcc.submission.core.report.*; | [
"org.icgc.dcc"
] | org.icgc.dcc; | 717,764 |
@Override
public boolean export(Database db) {
Table[] tables = db.getTables();
StringBuilder dot = new StringBuilder();
dot.append("digraph \"" + db.getName() + "\"{");
for(Table table : tables) {
dot.append("\""+db.getName()+"_"+table.getName() + "\" [shape=box,la... | boolean function(Database db) { Table[] tables = db.getTables(); StringBuilder dot = new StringBuilder(); dot.append(STRSTR\"{"); for(Table table : tables) { dot.append("\"STR_STR\STR+table.getName()+"];"); Attribute[] attributes = table.getAttributes(); for(Attribute attribute : attributes) { Map<String, Object> props... | /**
* Exports the database structer as an ER-Diagram
* @see at.hackenbergerhollander.rueckwaertssalto.exporter.Exporter#export(at.hackenbergerhollander.rueckwaertssalto.dbstructure.Database)
*/ | Exports the database structer as an ER-Diagram | export | {
"repo_name": "ReneHollander/rueckwaertssalto",
"path": "src/main/java/at/hackenbergerhollander/rueckwaertssalto/exporter/ERExporter.java",
"license": "mit",
"size": 4177
} | [
"at.hackenbergerhollander.rueckwaertssalto.dbstructure.Attribute",
"at.hackenbergerhollander.rueckwaertssalto.dbstructure.Database",
"at.hackenbergerhollander.rueckwaertssalto.dbstructure.Table",
"at.hackenbergerhollander.rueckwaertssalto.dbstructure.attributeproperties.Foreign",
"java.io.FileWriter",
"ja... | import at.hackenbergerhollander.rueckwaertssalto.dbstructure.Attribute; import at.hackenbergerhollander.rueckwaertssalto.dbstructure.Database; import at.hackenbergerhollander.rueckwaertssalto.dbstructure.Table; import at.hackenbergerhollander.rueckwaertssalto.dbstructure.attributeproperties.Foreign; import java.io.File... | import at.hackenbergerhollander.rueckwaertssalto.dbstructure.*; import at.hackenbergerhollander.rueckwaertssalto.dbstructure.attributeproperties.*; import java.io.*; import java.util.*; | [
"at.hackenbergerhollander.rueckwaertssalto",
"java.io",
"java.util"
] | at.hackenbergerhollander.rueckwaertssalto; java.io; java.util; | 91,952 |
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_STRING,
defaultValue = "")
@SimpleProperty(userVisible = false,
description = "This is the display name of the installed application in the phone." +
"If the AppName is blank, it will be set to the name of the project when the project ... | @DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_STRING, defaultValue = STRThis is the display name of the installed application in the phone.STRIf the AppName is blank, it will be set to the name of the project when the project is built.") void function(String aName) { } | /**
* Specifies the App Name.
*
* @param aName the display name of the installed application in the phone
*/ | Specifies the App Name | AppName | {
"repo_name": "Mateopato/appinventor-sources",
"path": "appinventor/components/src/com/google/appinventor/components/runtime/Form.java",
"license": "apache-2.0",
"size": 59316
} | [
"com.google.appinventor.components.annotations.DesignerProperty",
"com.google.appinventor.components.common.PropertyTypeConstants"
] | import com.google.appinventor.components.annotations.DesignerProperty; import com.google.appinventor.components.common.PropertyTypeConstants; | import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.common.*; | [
"com.google.appinventor"
] | com.google.appinventor; | 884,902 |
public View getSuggest()
{
return this.suggest;
} //-- View getSuggest() | View function() { return this.suggest; } | /**
* Get links suggest list to the input<br /><br /><a
* href="http://docs.webix.com/api__link__ui.checkbox_suggest_config.html">Webix
* API Reference</a>
*
* @return View
*/ | Get links suggest list to the inputWebix API Reference | getSuggest | {
"repo_name": "zhv/webix-api",
"path": "src/main/java/com/webix/ui/model/form/Checkbox.java",
"license": "bsd-3-clause",
"size": 30762
} | [
"com.webix.ui.model.View"
] | import com.webix.ui.model.View; | import com.webix.ui.model.*; | [
"com.webix.ui"
] | com.webix.ui; | 36,123 |
private void showPlayingNotification() {
if (isActivityForeground() || mIsScanning
|| (getRecorderState() == FmRecorder.STATE_RECORDING)) {
Log.w(TAG, "showPlayingNotificatiKEYCODE_VOLUME_UPon, do not show main notification.");
return;
}
String station... | void function() { if (isActivityForeground() mIsScanning (getRecorderState() == FmRecorder.STATE_RECORDING)) { Log.w(TAG, STR); return; } String stationName = STRSTR=?STRshowPlayingNotification, cursor is nullSTRSTRSTRSTRshowPlayingNotification PS:STR, RT:" + radioText); Notification n = mNotificationBuilder.build(); n... | /**
* Show notification
*/ | Show notification | showPlayingNotification | {
"repo_name": "KobeMing/FMRadio",
"path": "src/com/android/fmradio/FmService.java",
"license": "apache-2.0",
"size": 97210
} | [
"android.app.Notification",
"android.util.Log"
] | import android.app.Notification; import android.util.Log; | import android.app.*; import android.util.*; | [
"android.app",
"android.util"
] | android.app; android.util; | 353,844 |
int updateByPrimaryKeySelective(DBJobs record); | int updateByPrimaryKeySelective(DBJobs record); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jobs
*
* @mbggenerated Tue May 26 15:53:09 CST 2015
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table jobs | updateByPrimaryKeySelective | {
"repo_name": "wolabs/womano",
"path": "main/java/com/culabs/unicomportal/dao/DBJobsMapper.java",
"license": "apache-2.0",
"size": 1729
} | [
"com.culabs.unicomportal.model.db.DBJobs"
] | import com.culabs.unicomportal.model.db.DBJobs; | import com.culabs.unicomportal.model.db.*; | [
"com.culabs.unicomportal"
] | com.culabs.unicomportal; | 1,625,608 |
public void addSideBarMiddle(StringBuilder sb, HttpServletRequest httpServletRequest){
addSideBarBridgeDb(sb, httpServletRequest);
} | void function(StringBuilder sb, HttpServletRequest httpServletRequest){ addSideBarBridgeDb(sb, httpServletRequest); } | /**
* Allows Super classes to add to the side bar
*/ | Allows Super classes to add to the side bar | addSideBarMiddle | {
"repo_name": "bridgedb/BridgeDb",
"path": "org.bridgedb.uri.ws.server/src/org/bridgedb/ws/uri/WSUriInterfaceService.java",
"license": "apache-2.0",
"size": 56261
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 1,856,552 |
public static SOCGameTextMsg parseDataStr(String s)
{
String ga;
String nn;
String tm;
StringTokenizer st = new StringTokenizer(s, sep2_alt);
try
{
ga = st.nextToken();
nn = st.nextToken();
tm = st.nextToken();
}
... | static SOCGameTextMsg function(String s) { String ga; String nn; String tm; StringTokenizer st = new StringTokenizer(s, sep2_alt); try { ga = st.nextToken(); nn = st.nextToken(); tm = st.nextToken(); } catch (Exception e) { return null; } return new SOCGameTextMsg(ga, nn, tm); } /** * Strip out the parameter/attribute ... | /**
* Parse the command String into a GameTextMsg message
*
* @param s the String to parse
* @return a GameTextMsg message, or null if the data is garbled
*/ | Parse the command String into a GameTextMsg message | parseDataStr | {
"repo_name": "jdmonin/JSettlers2",
"path": "src/main/java/soc/message/SOCGameTextMsg.java",
"license": "gpl-3.0",
"size": 9454
} | [
"java.util.StringTokenizer"
] | import java.util.StringTokenizer; | import java.util.*; | [
"java.util"
] | java.util; | 935,522 |
@SuppressWarnings("deprecation")
private Object normalize(Object value) {
if (value instanceof IData[] || value instanceof Table || value instanceof IDataCodable[] || value instanceof IDataPortable[] || value instanceof ValuesCodable[] || value instanceof IData || value instanceof IDataCodab... | @SuppressWarnings(STR) Object function(Object value) { if (value instanceof IData[] value instanceof Table value instanceof IDataCodable[] value instanceof IDataPortable[] value instanceof ValuesCodable[] value instanceof IData value instanceof IDataCodable value instanceof IDataPortable value instanceof ValuesCodable)... | /**
* Returns the given value, optionally copied if required.
*
* @param value The value to be normalized.
* @return The normalized value.
*/ | Returns the given value, optionally copied if required | normalize | {
"repo_name": "Permafrost/Tundra.java",
"path": "src/main/java/permafrost/tundra/data/CopyOnWriteIDataMap.java",
"license": "mit",
"size": 35269
} | [
"com.wm.data.IData",
"com.wm.data.IDataPortable",
"com.wm.util.Table",
"com.wm.util.coder.IDataCodable",
"com.wm.util.coder.ValuesCodable"
] | import com.wm.data.IData; import com.wm.data.IDataPortable; import com.wm.util.Table; import com.wm.util.coder.IDataCodable; import com.wm.util.coder.ValuesCodable; | import com.wm.data.*; import com.wm.util.*; import com.wm.util.coder.*; | [
"com.wm.data",
"com.wm.util"
] | com.wm.data; com.wm.util; | 1,129,695 |
List<OspfInterface> ospfInterfaceList(); | List<OspfInterface> ospfInterfaceList(); | /**
* Gets the list of interfaces attached to this area.
*
* @return list of interfaces
*/ | Gets the list of interfaces attached to this area | ospfInterfaceList | {
"repo_name": "sdnwiselab/onos",
"path": "protocols/ospf/api/src/main/java/org/onosproject/ospf/controller/OspfArea.java",
"license": "apache-2.0",
"size": 7400
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 657,704 |
protected Graphics getComponentGraphics(Graphics g)
{
Graphics g2 = g;
int options = getDebugGraphicsOptions();
if (options != DebugGraphics.NONE_OPTION)
{
if (!(g2 instanceof DebugGraphics))
g2 = new DebugGraphics(g);
DebugGraphics dg = (DebugGraphics) g2;
dg.set... | Graphics function(Graphics g) { Graphics g2 = g; int options = getDebugGraphicsOptions(); if (options != DebugGraphics.NONE_OPTION) { if (!(g2 instanceof DebugGraphics)) g2 = new DebugGraphics(g); DebugGraphics dg = (DebugGraphics) g2; dg.setDebugOptions(dg.getDebugOptions() options); } g2.setFont(this.getFont()); g2.s... | /**
* Prepares a graphics context for painting this object. If {@link
* #debugGraphicsOptions} is not equal to {@link
* DebugGraphics#NONE_OPTION}, produce a new {@link DebugGraphics} object
* wrapping the parameter. Otherwise configure the parameter with this
* component's foreground color and font.
... | Prepares a graphics context for painting this object. If <code>#debugGraphicsOptions</code> is not equal to <code>DebugGraphics#NONE_OPTION</code>, produce a new <code>DebugGraphics</code> object wrapping the parameter. Otherwise configure the parameter with this component's foreground color and font | getComponentGraphics | {
"repo_name": "rhuitl/uClinux",
"path": "lib/classpath/javax/swing/JComponent.java",
"license": "gpl-2.0",
"size": 117352
} | [
"java.awt.Graphics"
] | import java.awt.Graphics; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,705,153 |
public ZkCoreNodeProps getLeaderProps(final String collection,
final String slice, int timeoutms) throws InterruptedException {
return getLeaderProps(collection, slice, timeoutms, false);
} | ZkCoreNodeProps function(final String collection, final String slice, int timeoutms) throws InterruptedException { return getLeaderProps(collection, slice, timeoutms, false); } | /**
* Get leader props directly from zk nodes.
*/ | Get leader props directly from zk nodes | getLeaderProps | {
"repo_name": "cscorley/solr-only-mirror",
"path": "core/src/java/org/apache/solr/cloud/ZkController.java",
"license": "apache-2.0",
"size": 83135
} | [
"org.apache.solr.common.cloud.ZkCoreNodeProps"
] | import org.apache.solr.common.cloud.ZkCoreNodeProps; | import org.apache.solr.common.cloud.*; | [
"org.apache.solr"
] | org.apache.solr; | 1,438,964 |
public CDOAdminRepository createRepository(String name, String type, Map<String, Object> properties); | CDOAdminRepository function(String name, String type, Map<String, Object> properties); | /**
* Creates a new remote {@link CDOCommonRepository repository} and returns its administrative interface.
* <p>
* On the server-side the creation is delegated to an instance of <code>org.eclipse.emf.cdo.server.spi.admin.CDOAdminHandler</code>
* that is registered with the server's {@link IManagedContainer... | Creates a new remote <code>CDOCommonRepository repository</code> and returns its administrative interface. On the server-side the creation is delegated to an instance of <code>org.eclipse.emf.cdo.server.spi.admin.CDOAdminHandler</code> that is registered with the server's <code>IManagedContainer container</code> under ... | createRepository | {
"repo_name": "IHTSDO/snow-owl",
"path": "dependencies/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/admin/CDOAdmin.java",
"license": "apache-2.0",
"size": 1822
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,952,405 |
@Override
public CompletableFuture<Void> abort(MetadataTransaction txn) {
Preconditions.checkArgument(null != txn, "txn must not be null");
// Do nothing
return CompletableFuture.completedFuture(null);
} | CompletableFuture<Void> function(MetadataTransaction txn) { Preconditions.checkArgument(null != txn, STR); return CompletableFuture.completedFuture(null); } | /**
* Aborts given transaction.
*
* @param txn transaction to abort.
* throws StorageMetadataException If there are any errors.
*/ | Aborts given transaction | abort | {
"repo_name": "pravega/pravega",
"path": "segmentstore/storage/src/main/java/io/pravega/segmentstore/storage/metadata/BaseMetadataStore.java",
"license": "apache-2.0",
"size": 43734
} | [
"com.google.common.base.Preconditions",
"java.util.concurrent.CompletableFuture"
] | import com.google.common.base.Preconditions; import java.util.concurrent.CompletableFuture; | import com.google.common.base.*; import java.util.concurrent.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,942,452 |
public void setLspObject(PcepLspObject lspObject) {
this.lspObject = lspObject;
} | void function(PcepLspObject lspObject) { this.lspObject = lspObject; } | /**
* Sets the Pcep LSP Object.
*
* @param lspObject PCEP LSP Object
*/ | Sets the Pcep LSP Object | setLspObject | {
"repo_name": "sonu283304/onos",
"path": "protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/PcepLabelDownload.java",
"license": "apache-2.0",
"size": 2791
} | [
"org.onosproject.pcepio.protocol.PcepLspObject"
] | import org.onosproject.pcepio.protocol.PcepLspObject; | import org.onosproject.pcepio.protocol.*; | [
"org.onosproject.pcepio"
] | org.onosproject.pcepio; | 1,889,312 |
Collection<Object> values(); | Collection<Object> values(); | /**
* Returns a {@link Collection} view of the values contained in this map.
*
* @return a collection view of the values contained in this map
*/ | Returns a <code>Collection</code> view of the values contained in this map | values | {
"repo_name": "OnurKirkizoglu/master_thesis",
"path": "at.jku.sea.cloud/src/main/java/at/jku/sea/cloud/MapArtifact.java",
"license": "apache-2.0",
"size": 7690
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 963,708 |
@Deprecated
int medianOf3(final double[] work, final int begin, final int end) {
return new MedianOf3PivotingStrategy().pivotIndex(work, begin, end);
//throw new MathUnsupportedOperationException();
}
/**
* Returns the value of the quantile field (determines what percentile is
... | int medianOf3(final double[] work, final int begin, final int end) { return new MedianOf3PivotingStrategy().pivotIndex(work, begin, end); } /** * Returns the value of the quantile field (determines what percentile is * computed when evaluate() is called with no quantile argument). * * @return quantile set while constru... | /** Select a pivot index as the median of three
* <p>
* <b>Note:</b> With the effect of allowing {@link KthSelector} to be set on
* {@link Percentile} instances(thus indirectly {@link PivotingStrategy})
* this method wont take effect any more and hence is unsupported.
* @param work data array
... | Select a pivot index as the median of three Note: With the effect of allowing <code>KthSelector</code> to be set on <code>Percentile</code> instances(thus indirectly <code>PivotingStrategy</code>) this method wont take effect any more and hence is unsupported | medianOf3 | {
"repo_name": "happyjack27/autoredistrict",
"path": "src/org/apache/commons/math3/stat/descriptive/rank/Percentile.java",
"license": "gpl-3.0",
"size": 45576
} | [
"org.apache.commons.math3.util.MedianOf3PivotingStrategy"
] | import org.apache.commons.math3.util.MedianOf3PivotingStrategy; | import org.apache.commons.math3.util.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,371 |
public void put(String key, File file, String contentType) throws FileNotFoundException {
put(key, file, contentType, null);
} | void function(String key, File file, String contentType) throws FileNotFoundException { put(key, file, contentType, null); } | /**
* Adds a file to the request with custom provided file content-type
*
* @param key the key name for the new param.
* @param file the file to add.
* @param contentType the content type of the file, eg. application/json
* @throws FileNotFoundException throws if wrong File ... | Adds a file to the request with custom provided file content-type | put | {
"repo_name": "wawaeasybuy/jobandroid",
"path": "Job_employer/app/src/main/java/com/example/ryo/job_employer/models/Http/RequestParams.java",
"license": "mit",
"size": 26725
} | [
"java.io.File",
"java.io.FileNotFoundException"
] | import java.io.File; import java.io.FileNotFoundException; | import java.io.*; | [
"java.io"
] | java.io; | 568,695 |
private long findNextExpirationTime(InsteonDevice d, long aTime) {
long expTime = aTime;
// tailSet finds all those that expire after aTime - buffer
SortedSet<PQEntry> ts = m_pollQueue.tailSet(new PQEntry(d, aTime - MIN_MSEC_BETWEEN_POLLS));
if (ts.isEmpty()) {
// all ent... | long function(InsteonDevice d, long aTime) { long expTime = aTime; SortedSet<PQEntry> ts = m_pollQueue.tailSet(new PQEntry(d, aTime - MIN_MSEC_BETWEEN_POLLS)); if (ts.isEmpty()) { expTime = aTime; } else { Iterator<PQEntry> pqi = ts.iterator(); PQEntry prev = pqi.next(); if (prev.getExpirationTime() > aTime + MIN_MSEC_... | /**
* Finds the best expiration time for a poll queue, i.e. a time slot that is after the
* desired expiration time, but does not collide with any of the already scheduled
* polls.
*
* @param d device to poll (for logging)
* @param aTime desired time after which the device should be polled... | Finds the best expiration time for a poll queue, i.e. a time slot that is after the desired expiration time, but does not collide with any of the already scheduled polls | findNextExpirationTime | {
"repo_name": "paolodenti/openhab",
"path": "bundles/binding/org.openhab.binding.insteonplm/src/main/java/org/openhab/binding/insteonplm/internal/driver/Poller.java",
"license": "epl-1.0",
"size": 9863
} | [
"java.util.Iterator",
"java.util.SortedSet",
"org.openhab.binding.insteonplm.internal.device.InsteonDevice"
] | import java.util.Iterator; import java.util.SortedSet; import org.openhab.binding.insteonplm.internal.device.InsteonDevice; | import java.util.*; import org.openhab.binding.insteonplm.internal.device.*; | [
"java.util",
"org.openhab.binding"
] | java.util; org.openhab.binding; | 376,625 |
public void setKinematic(boolean kinematic) {
this.kinematic = kinematic;
if (kinematic) {
rBody.setCollisionFlags(rBody.getCollisionFlags() | CollisionFlags.KINEMATIC_OBJECT);
rBody.setActivationState(com.bulletphysics.collision.dispatch.CollisionObject.DISABLE_DEACTIVATION)... | void function(boolean kinematic) { this.kinematic = kinematic; if (kinematic) { rBody.setCollisionFlags(rBody.getCollisionFlags() CollisionFlags.KINEMATIC_OBJECT); rBody.setActivationState(com.bulletphysics.collision.dispatch.CollisionObject.DISABLE_DEACTIVATION); } else { rBody.setCollisionFlags(rBody.getCollisionFlag... | /**
* Sets the node to kinematic mode. in this mode the node is not affected by physics
* but affects other physics objects. Its kinetic force is calculated by the amount
* of movement it is exposed to and its weight.
* @param kinematic
*/ | Sets the node to kinematic mode. in this mode the node is not affected by physics but affects other physics objects. Its kinetic force is calculated by the amount of movement it is exposed to and its weight | setKinematic | {
"repo_name": "PlanetWaves/clockworkengine",
"path": "branches/3.0/engine/src/jbullet/com/clockwork/bullet/objects/PhysicsRigidBody.java",
"license": "apache-2.0",
"size": 22094
} | [
"com.bulletphysics.collision.dispatch.CollisionFlags"
] | import com.bulletphysics.collision.dispatch.CollisionFlags; | import com.bulletphysics.collision.dispatch.*; | [
"com.bulletphysics.collision"
] | com.bulletphysics.collision; | 1,368,070 |
public static byte[] md5(InputStream data) throws IOException {
return digest(getMd5Digest(), data);
} | static byte[] function(InputStream data) throws IOException { return digest(getMd5Digest(), data); } | /**
* Calculates the MD5 digest and returns the value as a 16 element <code>byte[]</code>.
*
* @param data
* Data to digest
* @return MD5 digest
* @throws IOException
* On error reading from the stream
* @since 1.4
*/ | Calculates the MD5 digest and returns the value as a 16 element <code>byte[]</code> | md5 | {
"repo_name": "mcomella/FirefoxAccounts-android",
"path": "thirdparty/src/main/java/org/mozilla/apache/commons/codec/digest/DigestUtils.java",
"license": "mpl-2.0",
"size": 17367
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,664,421 |
private void initialize() {
GridBagConstraints gridBagConstraints7 = new GridBagConstraints();
gridBagConstraints7.gridx = 0;
gridBagConstraints7.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints7.weightx = 1.0D;
gridBagConstraints7.weighty = 1.0D;
gridBagConstraints7.gridy = 1;
GridBagConstr... | void function() { GridBagConstraints gridBagConstraints7 = new GridBagConstraints(); gridBagConstraints7.gridx = 0; gridBagConstraints7.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints7.weightx = 1.0D; gridBagConstraints7.weighty = 1.0D; gridBagConstraints7.gridy = 1; GridBagConstraints gridBagConstraints6 =... | /**
* This method initializes this
*/ | This method initializes this | initialize | {
"repo_name": "NCIP/cagrid",
"path": "cagrid/Software/core/caGrid/projects/dataExtensions/src/java/ui/gov/nih/nci/cagrid/data/ui/browser/ClassBrowserPanel.java",
"license": "bsd-3-clause",
"size": 21071
} | [
"java.awt.GridBagConstraints",
"java.awt.GridBagLayout"
] | import java.awt.GridBagConstraints; import java.awt.GridBagLayout; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,070,021 |
private void removeComponent()
{
getTableEnvironmentModelLock().lock();
try
{
final ComponentModel componentModel = getFocusedComponentModel();
if( componentModel != null )
{
final IContainer container = componentModel.getCompon... | void function() { getTableEnvironmentModelLock().lock(); try { final ComponentModel componentModel = getFocusedComponentModel(); if( componentModel != null ) { final IContainer container = componentModel.getComponent().getContainer(); if( container != null ) { container.removeComponent( componentModel.getComponent() );... | /**
* Removes the focused component.
*/ | Removes the focused component | removeComponent | {
"repo_name": "gamegineer/dev",
"path": "main/table/org.gamegineer.table.ui.impl/src/org/gamegineer/table/internal/ui/impl/view/TableView.java",
"license": "gpl-3.0",
"size": 79375
} | [
"org.gamegineer.table.core.IContainer",
"org.gamegineer.table.internal.ui.impl.model.ComponentModel"
] | import org.gamegineer.table.core.IContainer; import org.gamegineer.table.internal.ui.impl.model.ComponentModel; | import org.gamegineer.table.core.*; import org.gamegineer.table.internal.ui.impl.model.*; | [
"org.gamegineer.table"
] | org.gamegineer.table; | 2,212,195 |
public final Observance getApplicableObservance(final Date date) {
Observance latestObservance = null;
Date latestOnset = null;
for (final Iterator i = getObservances().iterator(); i.hasNext();) {
final Observance observance = (Observance) i.next();
final Date onset =... | final Observance function(final Date date) { Observance latestObservance = null; Date latestOnset = null; for (final Iterator i = getObservances().iterator(); i.hasNext();) { final Observance observance = (Observance) i.next(); final Date onset = observance.getLatestOnset(date); if (latestOnset == null (onset != null &... | /**
* Returns the latest applicable timezone observance for the specified date.
* @param date the latest possible date for a timezone observance onset
* @return the latest applicable timezone observance for the specified date or null if there are no applicable
* observances
*/ | Returns the latest applicable timezone observance for the specified date | getApplicableObservance | {
"repo_name": "Bedework/bw-ical4j-cl",
"path": "source/net/fortuna/ical4j/model/component/VTimeZone.java",
"license": "bsd-3-clause",
"size": 13391
} | [
"java.util.Iterator",
"net.fortuna.ical4j.model.Date"
] | import java.util.Iterator; import net.fortuna.ical4j.model.Date; | import java.util.*; import net.fortuna.ical4j.model.*; | [
"java.util",
"net.fortuna.ical4j"
] | java.util; net.fortuna.ical4j; | 167,073 |
public List<DataSourceField> findByDataSource(DataSource dataSource) {
return this.findByDataSourceId(dataSource.getId());
} | List<DataSourceField> function(DataSource dataSource) { return this.findByDataSourceId(dataSource.getId()); } | /**
* Find by reference: dataSource
*/ | Find by reference: dataSource | findByDataSource | {
"repo_name": "seava/seava.mod.ad",
"path": "seava.mod.ad.business/src/main/java/seava/ad/business/impl/system/DataSourceField_Service.java",
"license": "apache-2.0",
"size": 2227
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,087,266 |
public void drawResultBitmap(Bitmap barcode) {
resultBitmap = barcode;
invalidate();
}
| void function(Bitmap barcode) { resultBitmap = barcode; invalidate(); } | /**
* Draw a bitmap with the result points highlighted instead of the live scanning display.
*
* @param barcode An image of the decoded barcode.
*/ | Draw a bitmap with the result points highlighted instead of the live scanning display | drawResultBitmap | {
"repo_name": "rusfearuth/zxing-lib-extended",
"path": "src/com/google/zxing/client/android/ViewfinderView.java",
"license": "gpl-3.0",
"size": 7045
} | [
"android.graphics.Bitmap"
] | import android.graphics.Bitmap; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 755,499 |
public boolean openAnalysis(File f, SaveType saveType){
if (!f.exists() || !f.canRead()) {
throw new IllegalArgumentException("Can't read " + f.getPath());
}
prepareForFileLoad(f, saveType);
loadAnalysis(f);
return true;
}
| boolean function(File f, SaveType saveType){ if (!f.exists() !f.canRead()) { throw new IllegalArgumentException(STR + f.getPath()); } prepareForFileLoad(f, saveType); loadAnalysis(f); return true; } | /**
* Opens the analysis. Also clears the source and summary panes. Makes comments enabled false.
* Sets the saveType and adds the file to the recent menu.
* @param f
* @return whether the operation was successful
*/ | Opens the analysis. Also clears the source and summary panes. Makes comments enabled false. Sets the saveType and adds the file to the recent menu | openAnalysis | {
"repo_name": "optivo-org/fingbugs-1.3.9-optivo",
"path": "src/java5/edu/umd/cs/findbugs/gui2/MainFrame.java",
"license": "lgpl-2.1",
"size": 100821
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,163,050 |
public boolean checkAddresses(Customer customer) {
boolean isValid = true;
boolean hasPrimaryAddress = false;
for (CustomerAddress customerAddress : customer.getCustomerAddresses()) {
if (customerAddress.getCustomerAddressTypeCode().equalsIgnoreCase(ArKeyConstants.CustomerConstan... | boolean function(Customer customer) { boolean isValid = true; boolean hasPrimaryAddress = false; for (CustomerAddress customerAddress : customer.getCustomerAddresses()) { if (customerAddress.getCustomerAddressTypeCode().equalsIgnoreCase(ArKeyConstants.CustomerConstants.CUSTOMER_ADDRESS_TYPE_CODE_PRIMARY)) { if (hasPrim... | /**
* This method checks if the customer addresses are valid: has one and only one primary address
*
* @param customer
* @return true if valid, false otherwise
*/ | This method checks if the customer addresses are valid: has one and only one primary address | checkAddresses | {
"repo_name": "kuali/kfs",
"path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/document/validation/impl/CustomerRule.java",
"license": "agpl-3.0",
"size": 24713
} | [
"org.kuali.kfs.module.ar.ArKeyConstants",
"org.kuali.kfs.module.ar.ArPropertyConstants",
"org.kuali.kfs.module.ar.businessobject.Customer",
"org.kuali.kfs.module.ar.businessobject.CustomerAddress",
"org.kuali.kfs.sys.KFSConstants",
"org.kuali.rice.krad.util.GlobalVariables"
] | import org.kuali.kfs.module.ar.ArKeyConstants; import org.kuali.kfs.module.ar.ArPropertyConstants; import org.kuali.kfs.module.ar.businessobject.Customer; import org.kuali.kfs.module.ar.businessobject.CustomerAddress; import org.kuali.kfs.sys.KFSConstants; import org.kuali.rice.krad.util.GlobalVariables; | import org.kuali.kfs.module.ar.*; import org.kuali.kfs.module.ar.businessobject.*; import org.kuali.kfs.sys.*; import org.kuali.rice.krad.util.*; | [
"org.kuali.kfs",
"org.kuali.rice"
] | org.kuali.kfs; org.kuali.rice; | 837,654 |
public static SaveResult attemptSave(Saveable saveable) {
if (saveable != null) {
Commitable.sendCommitToFocusOwner();
return attemptSaveInternal(saveable);
}
return SaveResult.SUCCESS;
} | static SaveResult function(Saveable saveable) { if (saveable != null) { Commitable.sendCommitToFocusOwner(); return attemptSaveInternal(saveable); } return SaveResult.SUCCESS; } | /**
* Makes an attempt to save the specified {@link Saveable} if it has been modified.
*
* @param saveable The {@link Saveable} to work on.
* @return The result of the save attempt.
*/ | Makes an attempt to save the specified <code>Saveable</code> if it has been modified | attemptSave | {
"repo_name": "richardwilkes/gcs",
"path": "com.trollworks.gcs/src/com/trollworks/gcs/menu/file/SaveCommand.java",
"license": "mpl-2.0",
"size": 4421
} | [
"com.trollworks.gcs.ui.widget.Commitable"
] | import com.trollworks.gcs.ui.widget.Commitable; | import com.trollworks.gcs.ui.widget.*; | [
"com.trollworks.gcs"
] | com.trollworks.gcs; | 1,654,339 |
public static double computeSemiJoinSelectivity(RelMetadataQuery mq,
SemiJoin rel) {
return computeSemiJoinSelectivity(mq, rel.getLeft(), rel.getRight(),
rel.getLeftKeys(), rel.getRightKeys());
} | static double function(RelMetadataQuery mq, SemiJoin rel) { return computeSemiJoinSelectivity(mq, rel.getLeft(), rel.getRight(), rel.getLeftKeys(), rel.getRightKeys()); } | /**
* Computes the selectivity of a semijoin filter if it is applied on a fact
* table. The computation is based on the selectivity of the dimension
* table/columns and the number of distinct values in the fact table
* columns.
*
* @param rel semijoin rel
* @return calculated selectivity
*/ | Computes the selectivity of a semijoin filter if it is applied on a fact table. The computation is based on the selectivity of the dimension table/columns and the number of distinct values in the fact table columns | computeSemiJoinSelectivity | {
"repo_name": "dindin5258/calcite",
"path": "core/src/main/java/org/apache/calcite/rel/metadata/RelMdUtil.java",
"license": "apache-2.0",
"size": 29276
} | [
"org.apache.calcite.rel.core.SemiJoin"
] | import org.apache.calcite.rel.core.SemiJoin; | import org.apache.calcite.rel.core.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 290,910 |
public static <K, V> Map<K, V> union (Map<K, V> map1, Map<K, V> map2)
{
if (map1.isEmpty ())
{
return map2;
} else if (map2.isEmpty ())
{
return map1;
} else
{
HashMap<K, V> union = new HashMap<K, V> ();
union.putAll (map1);
union.putAll (map2);
... | static <K, V> Map<K, V> function (Map<K, V> map1, Map<K, V> map2) { if (map1.isEmpty ()) { return map2; } else if (map2.isEmpty ()) { return map1; } else { HashMap<K, V> union = new HashMap<K, V> (); union.putAll (map1); union.putAll (map2); return union; } } | /**
* Compute the union of map1 and map2. This is not guaranteed to
* generate a new map instance: it will return map1 or map2 directly
* if the other map is empty. If there is a key/value overlap, map2
* wins.
*/ | Compute the union of map1 and map2. This is not guaranteed to generate a new map instance: it will return map1 or map2 directly if the other map is empty. If there is a key/value overlap, map2 wins | union | {
"repo_name": "luv/avis_zmqprx",
"path": "common/src/main/org/avis/util/Collections.java",
"license": "gpl-3.0",
"size": 3908
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,824,996 |
public void stopServer()
throws Exception {
Method method =
catalinaDaemon.getClass().getMethod("stopServer", null);
method.invoke(catalinaDaemon, null);
} | void function() throws Exception { Method method = catalinaDaemon.getClass().getMethod(STR, null); method.invoke(catalinaDaemon, null); } | /**
* Stop the standlone server.
*/ | Stop the standlone server | stopServer | {
"repo_name": "devjin24/howtomcatworks",
"path": "bookrefer/jakarta-tomcat-5.0.18-src/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Bootstrap.java",
"license": "apache-2.0",
"size": 15004
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,867,357 |
public static TextFieldSettings getSettings(PropertyDeclaration property) {
return get(property, trait -> trait.settings).orElse(EMPTY_SETTINGS);
} | static TextFieldSettings function(PropertyDeclaration property) { return get(property, trait -> trait.settings).orElse(EMPTY_SETTINGS); } | /**
* Returns the field settings of the property.
* If the field settings is not declared explicitly in the property, this returns the property settings.
* @param property target property
* @return the field settings
*/ | Returns the field settings of the property. If the field settings is not declared explicitly in the property, this returns the property settings | getSettings | {
"repo_name": "ashigeru/asakusafw",
"path": "directio-project/asakusa-directio-dmdl/src/main/java/com/asakusafw/dmdl/directio/text/TextFieldTrait.java",
"license": "apache-2.0",
"size": 6070
} | [
"com.asakusafw.dmdl.semantics.PropertyDeclaration"
] | import com.asakusafw.dmdl.semantics.PropertyDeclaration; | import com.asakusafw.dmdl.semantics.*; | [
"com.asakusafw.dmdl"
] | com.asakusafw.dmdl; | 1,786,524 |
public SiteConfigResourceInner withLimits(SiteLimits limits) {
if (this.innerProperties() == null) {
this.innerProperties = new SiteConfigInner();
}
this.innerProperties().withLimits(limits);
return this;
} | SiteConfigResourceInner function(SiteLimits limits) { if (this.innerProperties() == null) { this.innerProperties = new SiteConfigInner(); } this.innerProperties().withLimits(limits); return this; } | /**
* Set the limits property: Site limits.
*
* @param limits the limits value to set.
* @return the SiteConfigResourceInner object itself.
*/ | Set the limits property: Site limits | withLimits | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/models/SiteConfigResourceInner.java",
"license": "mit",
"size": 46376
} | [
"com.azure.resourcemanager.appservice.models.SiteLimits"
] | import com.azure.resourcemanager.appservice.models.SiteLimits; | import com.azure.resourcemanager.appservice.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 20,847 |
public boolean matches(Fluid fluid) {
return reference.equals(fluid.getName());
} | boolean function(Fluid fluid) { return reference.equals(fluid.getName()); } | /**
* Tests a fluid object to see if it qualifies as being the same as this fluid reference
* @param fluid A Fluid instance
* @return Returns true if the fluid parameter is "equal" to this reference, false otherwise
*/ | Tests a fluid object to see if it qualifies as being the same as this fluid reference | matches | {
"repo_name": "cyanobacterium/PowerAdvantageAPI",
"path": "src/main/java/cyano/poweradvantage/registry/still/recipe/RegistryNameFluidReference.java",
"license": "lgpl-3.0",
"size": 1569
} | [
"net.minecraftforge.fluids.Fluid"
] | import net.minecraftforge.fluids.Fluid; | import net.minecraftforge.fluids.*; | [
"net.minecraftforge.fluids"
] | net.minecraftforge.fluids; | 852,328 |
public boolean checkExists(TriggerKey triggerKey) throws JobPersistenceException {
synchronized(lock) {
TriggerWrapper tw = triggersByKey.get(triggerKey);
return (tw != null);
}
} | boolean function(TriggerKey triggerKey) throws JobPersistenceException { synchronized(lock) { TriggerWrapper tw = triggersByKey.get(triggerKey); return (tw != null); } } | /**
* Determine whether a {@link Trigger} with the given identifier already
* exists within the scheduler.
*
* @param triggerKey the identifier to check for
* @return true if a Trigger exists with the given identifier
* @throws JobPersistenceException
*/ | Determine whether a <code>Trigger</code> with the given identifier already exists within the scheduler | checkExists | {
"repo_name": "suthat/signal",
"path": "vendor/quartz-2.2.0/src/org/quartz/simpl/RAMJobStore.java",
"license": "apache-2.0",
"size": 60289
} | [
"org.quartz.JobPersistenceException",
"org.quartz.TriggerKey"
] | import org.quartz.JobPersistenceException; import org.quartz.TriggerKey; | import org.quartz.*; | [
"org.quartz"
] | org.quartz; | 1,300,874 |
public void deleteDocuments(Term term) throws CorruptIndexException, IOException {
ensureOpen();
try {
boolean doFlush = docWriter.bufferDeleteTerm(term);
if (doFlush)
flush(true, false, false);
} catch (OutOfMemoryError oom) {
handleOOM(oom, "deleteDocuments(Term)");
}
} | void function(Term term) throws CorruptIndexException, IOException { ensureOpen(); try { boolean doFlush = docWriter.bufferDeleteTerm(term); if (doFlush) flush(true, false, false); } catch (OutOfMemoryError oom) { handleOOM(oom, STR); } } | /**
* Deletes the document(s) containing <code>term</code>.
*
* <p><b>NOTE</b>: if this method hits an OutOfMemoryError
* you should immediately close the writer. See <a
* href="#OOME">above</a> for details.</p>
*
* @param term the term to identify the documents to be deleted
* @throws CorruptI... | Deletes the document(s) containing <code>term</code>. NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details | deleteDocuments | {
"repo_name": "sluk3r/lucene-3.0.2-src-study",
"path": "src/java/org/apache/lucene/index/IndexWriter.java",
"license": "apache-2.0",
"size": 171970
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 599,676 |
public JSONObject enableSubscription(HashMap<String, Object> queryMap) {
this.apiConnection = new ApiConnection(Definitions.PAYSTACK_SUBSCRIPTIONS_ENABLE_SUBSCRIPTION);
return this.apiConnection.connectAndQuery(queryMap);
} | JSONObject function(HashMap<String, Object> queryMap) { this.apiConnection = new ApiConnection(Definitions.PAYSTACK_SUBSCRIPTIONS_ENABLE_SUBSCRIPTION); return this.apiConnection.connectAndQuery(queryMap); } | /**
* Used to enable a subscription
*
* @param queryMap
* @return
*/ | Used to enable a subscription | enableSubscription | {
"repo_name": "SeunAdelekan/PaystackJava",
"path": "src/me/iyanuadelekan/paystackjava/core/Subscriptions.java",
"license": "mit",
"size": 4308
} | [
"java.util.HashMap",
"me.iyanuadelekan.paystackjava.constants.Definitions",
"org.json.JSONObject"
] | import java.util.HashMap; import me.iyanuadelekan.paystackjava.constants.Definitions; import org.json.JSONObject; | import java.util.*; import me.iyanuadelekan.paystackjava.constants.*; import org.json.*; | [
"java.util",
"me.iyanuadelekan.paystackjava",
"org.json"
] | java.util; me.iyanuadelekan.paystackjava; org.json; | 2,846,864 |
@OneToMany(mappedBy = "matrixRow", cascade = CascadeType.ALL)
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region = "matrixCache")
protected Set<RowSegment> getSegments() {
return mSegments;
}
| @OneToMany(mappedBy = STR, cascade = CascadeType.ALL) @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region = STR) Set<RowSegment> function() { return mSegments; } | /**
* Return the Segments field.
*
* @return Set<RowSegment>
*/ | Return the Segments field | getSegments | {
"repo_name": "TreeBASE/treebasetest",
"path": "treebase-core/src/main/java/org/cipres/treebase/domain/matrix/MatrixRow.java",
"license": "bsd-3-clause",
"size": 11378
} | [
"java.util.Set",
"javax.persistence.CascadeType",
"javax.persistence.OneToMany",
"org.hibernate.annotations.Cache",
"org.hibernate.annotations.CacheConcurrencyStrategy"
] | import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.OneToMany; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; | import java.util.*; import javax.persistence.*; import org.hibernate.annotations.*; | [
"java.util",
"javax.persistence",
"org.hibernate.annotations"
] | java.util; javax.persistence; org.hibernate.annotations; | 2,241,864 |
public void testInverseEntrySet()
throws Exception
{
try
{
SCOMapTests.checkEntrySet(pmf,
LinkedHashMap2.class,
LinkedHashMap2Item.class,
String.class);
}
finally
{
clean(LinkedHashMap... | void function() throws Exception { try { SCOMapTests.checkEntrySet(pmf, LinkedHashMap2.class, LinkedHashMap2Item.class, String.class); } finally { clean(LinkedHashMap2.class); clean(LinkedHashMap2Item.class); } } | /**
* Test case to check the use of entrySet in the Map.
**/ | Test case to check the use of entrySet in the Map | testInverseEntrySet | {
"repo_name": "datanucleus/tests",
"path": "jdo/identity/src/test/org/datanucleus/tests/types/LinkedHashMapTest.java",
"license": "apache-2.0",
"size": 11196
} | [
"org.datanucleus.samples.types.linkedhashmap.LinkedHashMap2",
"org.datanucleus.samples.types.linkedhashmap.LinkedHashMap2Item"
] | import org.datanucleus.samples.types.linkedhashmap.LinkedHashMap2; import org.datanucleus.samples.types.linkedhashmap.LinkedHashMap2Item; | import org.datanucleus.samples.types.linkedhashmap.*; | [
"org.datanucleus.samples"
] | org.datanucleus.samples; | 250,997 |
N pop(final long time, final TimeUnit unit) throws InterruptedException; | N pop(final long time, final TimeUnit unit) throws InterruptedException; | /**
* Pop an element from the stack, waiting if necessary if the stack is currently empty
*
* @param time - the maximum time to wait
* @param unit - the time unit for the waiting time
* @return N - the popped element, or null in the event of a timeout
*
* @throws InterruptedException ... | Pop an element from the stack, waiting if necessary if the stack is currently empty | pop | {
"repo_name": "conversant/disruptor",
"path": "src/main/java/com/conversantmedia/util/concurrent/BlockingStack.java",
"license": "apache-2.0",
"size": 2525
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 38,215 |
public static boolean canCollectResources(MissionMember member, Rover rover, EquipmentType containerType,
Integer resourceType) {
boolean result = false;
if (member instanceof Person) {
Person person = (Person) member;
// Check if person can exit the rover.
if (!ExitAirlock.canExitAirlock... | static boolean function(MissionMember member, Rover rover, EquipmentType containerType, Integer resourceType) { boolean result = false; if (member instanceof Person) { Person person = (Person) member; if (!ExitAirlock.canExitAirlock(person, rover.getAirlock())) return false; if (EVAOperation.isGettingDark(person)) { re... | /**
* Checks if a person can perform an CollectResources task.
*
* @param member the member to perform the task
* @param rover the rover the person will EVA from
* @param containerType the container class to collect resources in.
* @param resourceType the resource to collect.
* @ret... | Checks if a person can perform an CollectResources task | canCollectResources | {
"repo_name": "mars-sim/mars-sim",
"path": "mars-sim-core/src/main/java/org/mars_sim/msp/core/person/ai/task/CollectResources.java",
"license": "gpl-3.0",
"size": 10390
} | [
"org.mars_sim.msp.core.InventoryUtil",
"org.mars_sim.msp.core.equipment.Container",
"org.mars_sim.msp.core.equipment.ContainerUtil",
"org.mars_sim.msp.core.equipment.EVASuit",
"org.mars_sim.msp.core.equipment.EquipmentType",
"org.mars_sim.msp.core.person.Person",
"org.mars_sim.msp.core.person.ai.mission... | import org.mars_sim.msp.core.InventoryUtil; import org.mars_sim.msp.core.equipment.Container; import org.mars_sim.msp.core.equipment.ContainerUtil; import org.mars_sim.msp.core.equipment.EVASuit; import org.mars_sim.msp.core.equipment.EquipmentType; import org.mars_sim.msp.core.person.Person; import org.mars_sim.msp.co... | import org.mars_sim.msp.core.*; import org.mars_sim.msp.core.equipment.*; import org.mars_sim.msp.core.person.*; import org.mars_sim.msp.core.person.ai.mission.*; import org.mars_sim.msp.core.vehicle.*; | [
"org.mars_sim.msp"
] | org.mars_sim.msp; | 1,011,385 |
if (localeString != null && localeString.length() > 0) {
StringTokenizer st = new StringTokenizer(localeString, LOCALE_DELIMITER);
String l = st.hasMoreElements() ? st.nextToken() : defaultLocale.getLanguage();
String c = st.hasMoreElements() ? st.nextToken() : "";
String... | if (localeString != null && localeString.length() > 0) { StringTokenizer st = new StringTokenizer(localeString, LOCALE_DELIMITER); String l = st.hasMoreElements() ? st.nextToken() : defaultLocale.getLanguage(); String c = st.hasMoreElements() ? st.nextToken() : STR"; return new Locale(l, c, v); } return defaultLocale; ... | /**
* Parses given locale string to Locale object. If the string is null
* or empty then the given locale is returned.
*
* @param localeString - a string containing locale in
* <code>language_country_variant</code> format.
* @param defaultLocale - returned if localeString is <code>n... | Parses given locale string to Locale object. If the string is null or empty then the given locale is returned | parseLocale | {
"repo_name": "apache/cocoon",
"path": "core/cocoon-core/src/main/java/org/apache/cocoon/i18n/I18nUtils.java",
"license": "apache-2.0",
"size": 9784
} | [
"java.util.Locale",
"java.util.StringTokenizer"
] | import java.util.Locale; import java.util.StringTokenizer; | import java.util.*; | [
"java.util"
] | java.util; | 618,557 |
public void createEmpty() throws IOException {
metadataLock.writeLock().lock();
try (IndexWriter writer = newIndexWriter(IndexWriterConfig.OpenMode.CREATE, directory, null)) {
final Map<String, String> map = new HashMap<>();
map.put(Engine.HISTORY_UUID_KEY, UUIDs.randomBase64... | void function() throws IOException { metadataLock.writeLock().lock(); try (IndexWriter writer = newIndexWriter(IndexWriterConfig.OpenMode.CREATE, directory, null)) { final Map<String, String> map = new HashMap<>(); map.put(Engine.HISTORY_UUID_KEY, UUIDs.randomBase64UUID()); map.put(SequenceNumbers.LOCAL_CHECKPOINT_KEY,... | /**
* creates an empty lucene index and a corresponding empty translog. Any existing data will be deleted.
*/ | creates an empty lucene index and a corresponding empty translog. Any existing data will be deleted | createEmpty | {
"repo_name": "gfyoung/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/index/store/Store.java",
"license": "apache-2.0",
"size": 77503
} | [
"java.io.IOException",
"java.util.HashMap",
"java.util.Map",
"org.apache.lucene.index.IndexWriter",
"org.apache.lucene.index.IndexWriterConfig",
"org.elasticsearch.common.UUIDs",
"org.elasticsearch.index.engine.Engine",
"org.elasticsearch.index.seqno.SequenceNumbers"
] | import java.io.IOException; import java.util.HashMap; import java.util.Map; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig; import org.elasticsearch.common.UUIDs; import org.elasticsearch.index.engine.Engine; import org.elasticsearch.index.seqno.SequenceNumbers; | import java.io.*; import java.util.*; import org.apache.lucene.index.*; import org.elasticsearch.common.*; import org.elasticsearch.index.engine.*; import org.elasticsearch.index.seqno.*; | [
"java.io",
"java.util",
"org.apache.lucene",
"org.elasticsearch.common",
"org.elasticsearch.index"
] | java.io; java.util; org.apache.lucene; org.elasticsearch.common; org.elasticsearch.index; | 249,110 |
public synchronized void close() throws IOException {
if(clientRunning) {
leasechecker.close();
clientRunning = false;
try {
leasechecker.interruptAndJoin();
} catch (InterruptedException ie) {
}
// close connections to the namenode
RPC.stopProxy(rpcNamenode);
... | synchronized void function() throws IOException { if(clientRunning) { leasechecker.close(); clientRunning = false; try { leasechecker.interruptAndJoin(); } catch (InterruptedException ie) { } RPC.stopProxy(rpcNamenode); } } | /**
* Close the file system, abandoning all of the leases and files being
* created and close connections to the namenode.
*/ | Close the file system, abandoning all of the leases and files being created and close connections to the namenode | close | {
"repo_name": "cumulusyebl/cumulus",
"path": "src/java/org/apache/hadoop/hdfs/DFSClient.java",
"license": "apache-2.0",
"size": 57376
} | [
"java.io.IOException",
"org.apache.hadoop.ipc.RPC"
] | import java.io.IOException; import org.apache.hadoop.ipc.RPC; | import java.io.*; import org.apache.hadoop.ipc.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,349,758 |
public void valid(ActionRequest request, ActionResponse response) throws AxelorException {
try {
ExtraHours extraHours = request.getContext().asType(ExtraHours.class);
extraHours = extraHoursRepositoryProvider.get().find(extraHours.getId());
ExtraHoursService extraHoursService = extraHoursServi... | void function(ActionRequest request, ActionResponse response) throws AxelorException { try { ExtraHours extraHours = request.getContext().asType(ExtraHours.class); extraHours = extraHoursRepositoryProvider.get().find(extraHours.getId()); ExtraHoursService extraHoursService = extraHoursServiceProvider.get(); extraHoursS... | /**
* validating request and sending mail to applicant
*
* @param request
* @param response
* @throws AxelorException
*/ | validating request and sending mail to applicant | valid | {
"repo_name": "ama-axelor/axelor-business-suite",
"path": "axelor-human-resource/src/main/java/com/axelor/apps/hr/web/extra/hours/ExtraHoursController.java",
"license": "agpl-3.0",
"size": 11544
} | [
"com.axelor.apps.base.service.PeriodService",
"com.axelor.apps.base.service.message.MessageServiceBaseImpl",
"com.axelor.apps.hr.db.ExtraHours",
"com.axelor.apps.hr.service.extra.hours.ExtraHoursService",
"com.axelor.apps.message.db.Message",
"com.axelor.apps.message.db.repo.MessageRepository",
"com.axe... | import com.axelor.apps.base.service.PeriodService; import com.axelor.apps.base.service.message.MessageServiceBaseImpl; import com.axelor.apps.hr.db.ExtraHours; import com.axelor.apps.hr.service.extra.hours.ExtraHoursService; import com.axelor.apps.message.db.Message; import com.axelor.apps.message.db.repo.MessageReposi... | import com.axelor.apps.base.service.*; import com.axelor.apps.base.service.message.*; import com.axelor.apps.hr.db.*; import com.axelor.apps.hr.service.extra.hours.*; import com.axelor.apps.message.db.*; import com.axelor.apps.message.db.repo.*; import com.axelor.exception.*; import com.axelor.exception.service.*; impo... | [
"com.axelor.apps",
"com.axelor.exception",
"com.axelor.i18n",
"com.axelor.inject",
"com.axelor.rpc"
] | com.axelor.apps; com.axelor.exception; com.axelor.i18n; com.axelor.inject; com.axelor.rpc; | 2,803,469 |
public void prepare(GridCacheDeployable deployable) throws IgnitePeerToPeerClassLoadingException {
assert depEnabled;
// Only set deployment info if it was not set automatically.
if (deployable.deployInfo() == null) {
GridDeploymentInfoBean dep = globalDeploymentInfo();
... | void function(GridCacheDeployable deployable) throws IgnitePeerToPeerClassLoadingException { assert depEnabled; if (deployable.deployInfo() == null) { GridDeploymentInfoBean dep = globalDeploymentInfo(); if (dep == null) { GridDeployment locDep0 = locDep.get(); if (locDep0 != null) { dep = new GridDeploymentInfoBean(lo... | /**
* Prepares deployable object.
*
* @param deployable Deployable object.
*/ | Prepares deployable object | prepare | {
"repo_name": "SomeFire/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java",
"license": "apache-2.0",
"size": 35285
} | [
"org.apache.ignite.internal.managers.deployment.GridDeployment",
"org.apache.ignite.internal.managers.deployment.GridDeploymentInfoBean"
] | import org.apache.ignite.internal.managers.deployment.GridDeployment; import org.apache.ignite.internal.managers.deployment.GridDeploymentInfoBean; | import org.apache.ignite.internal.managers.deployment.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,345,071 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<ResourceUsageInner> listResourceUsageAsync(
String resourceGroupName, String profileName, String endpointName) {
return new PagedFlux<>(
() -> listResourceUsageSinglePageAsync(resourceGroupName, profileName, endpointNam... | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<ResourceUsageInner> function( String resourceGroupName, String profileName, String endpointName) { return new PagedFlux<>( () -> listResourceUsageSinglePageAsync(resourceGroupName, profileName, endpointName), nextLink -> listResourceUsageNextSinglePageAsync(next... | /**
* Checks the quota and usage of geo filters and custom domains under the given endpoint.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @param endpointName Name ... | Checks the quota and usage of geo filters and custom domains under the given endpoint | listResourceUsageAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/EndpointsClientImpl.java",
"license": "mit",
"size": 169310
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux",
"com.azure.resourcemanager.cdn.fluent.models.ResourceUsageInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.cdn.fluent.models.ResourceUsageInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.cdn.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,602,232 |
public Date getEndDate() {
return endDate;
} | Date function() { return endDate; } | /**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column deploy_agent.end_date
*
* @return the value of deploy_agent.end_date
* @mbggenerated
*/ | This method was generated by MyBatis Generator. This method returns the value of the database column deploy_agent.end_date | getEndDate | {
"repo_name": "leonindy/camel",
"path": "camel-admin/src/main/java/com/dianping/phoenix/lb/deploy/model/DeployAgent.java",
"license": "gpl-3.0",
"size": 7152
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,431,840 |
public static boolean isDocumentActivity(String className) {
return TextUtils.equals(className, IncognitoDocumentActivity.class.getName())
|| TextUtils.equals(className, DocumentActivity.class.getName())
|| TextUtils.equals(className, LEGACY_CLASS_NAME)
|| Tex... | static boolean function(String className) { return TextUtils.equals(className, IncognitoDocumentActivity.class.getName()) TextUtils.equals(className, DocumentActivity.class.getName()) TextUtils.equals(className, LEGACY_CLASS_NAME) TextUtils.equals(className, LEGACY_INCOGNITO_CLASS_NAME); } | /**
* Determines whether the given class can be classified as a DocumentActivity (this includes
* both regular document activity and incognito document activity).
* @param className The class name to inspect.
* @return Whether the className is that of a document activity.
*/ | Determines whether the given class can be classified as a DocumentActivity (this includes both regular document activity and incognito document activity) | isDocumentActivity | {
"repo_name": "axinging/chromium-crosswalk",
"path": "chrome/android/java/src/org/chromium/chrome/browser/document/DocumentActivity.java",
"license": "bsd-3-clause",
"size": 36526
} | [
"android.text.TextUtils"
] | import android.text.TextUtils; | import android.text.*; | [
"android.text"
] | android.text; | 344,479 |
public static List<EducationalBackground> parseEducationalBackgroundList (JsonReader reader) throws IOException {
List<EducationalBackground> educationalBackgroundList = new ArrayList<>(0);
reader.beginArray();
while(reader.hasNext()) {
educationalBackgroundList.add(parseEducatio... | static List<EducationalBackground> function (JsonReader reader) throws IOException { List<EducationalBackground> educationalBackgroundList = new ArrayList<>(0); reader.beginArray(); while(reader.hasNext()) { educationalBackgroundList.add(parseEducationalBackground(reader)); } reader.endArray(); return educationalBackgr... | /**
* Gets a list of contact requests
*
* @param reader A JsonReader object that contains the education backgrounds
* @return A list of EducationalBackground objects
* @throws IOException
*/ | Gets a list of contact requests | parseEducationalBackgroundList | {
"repo_name": "CiprianU/xing-android-sdk",
"path": "sdk/src/main/java/com/xing/android/sdk/json/user/EducationalBackgroundMapper.java",
"license": "mit",
"size": 4268
} | [
"android.util.JsonReader",
"com.xing.android.sdk.model.user.EducationalBackground",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List"
] | import android.util.JsonReader; import com.xing.android.sdk.model.user.EducationalBackground; import java.io.IOException; import java.util.ArrayList; import java.util.List; | import android.util.*; import com.xing.android.sdk.model.user.*; import java.io.*; import java.util.*; | [
"android.util",
"com.xing.android",
"java.io",
"java.util"
] | android.util; com.xing.android; java.io; java.util; | 1,721,805 |
private void setSelectionProject(ISelection selection) {
if (!(selection instanceof TreeSelection)) {
return;
}
Object type = ((TreeSelection) selection).getFirstElement();
// The selected object, in the case of projects that are open
if (type instanceof IProject... | void function(ISelection selection) { if (!(selection instanceof TreeSelection)) { return; } Object type = ((TreeSelection) selection).getFirstElement(); if (type instanceof IProject) { IProject tmpProject = (IProject) type; if (tmpProject.isOpen()) { selectionProject = (IProject) type; } } String project = null; if (t... | /**
* Set in the project name field.<br/>
* Gets the project name from the selection elements of the package
* Explorer, <br/>
* and set in the field.<br/>
*
* @param selection
* ISelection the selectionChanged receives
*/ | Set in the project name field. Gets the project name from the selection elements of the package Explorer, and set in the field | setSelectionProject | {
"repo_name": "azkaoru/migration-tool",
"path": "src/tubame.knowhow/src/tubame/knowhow/plugin/ui/wizard/commencement/ConfirmationPage.java",
"license": "apache-2.0",
"size": 8568
} | [
"org.eclipse.core.resources.IFile",
"org.eclipse.core.resources.IFolder",
"org.eclipse.core.resources.IProject",
"org.eclipse.jface.viewers.ISelection",
"org.eclipse.jface.viewers.TreeSelection"
] | import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.TreeSelection; | import org.eclipse.core.resources.*; import org.eclipse.jface.viewers.*; | [
"org.eclipse.core",
"org.eclipse.jface"
] | org.eclipse.core; org.eclipse.jface; | 1,503,933 |
public void finishFromChild(Activity child) {
verifyMethodCalledFromDelegate("finishFromChild(Activity)");
((CallVoid1<Activity>) mSuperListeners.pop()).call(child);
} | void function(Activity child) { verifyMethodCalledFromDelegate(STR); ((CallVoid1<Activity>) mSuperListeners.pop()).call(child); } | /**
* This is called when a child activity of this one calls its
* {@link #finish} method. The default implementation simply calls
* finish() on this activity (the parent), finishing the entire group.
*
* @param child The activity making the call.
* @see #finish
*/ | This is called when a child activity of this one calls its <code>#finish</code> method. The default implementation simply calls finish() on this activity (the parent), finishing the entire group | finishFromChild | {
"repo_name": "passsy/CompositeAndroid",
"path": "activity/src/main/java/com/pascalwelsch/compositeandroid/activity/ActivityPlugin.java",
"license": "apache-2.0",
"size": 278532
} | [
"android.app.Activity",
"com.pascalwelsch.compositeandroid.core.CallVoid1"
] | import android.app.Activity; import com.pascalwelsch.compositeandroid.core.CallVoid1; | import android.app.*; import com.pascalwelsch.compositeandroid.core.*; | [
"android.app",
"com.pascalwelsch.compositeandroid"
] | android.app; com.pascalwelsch.compositeandroid; | 1,717,928 |
private Object bootstrapSinksFromDisk()
{
Preconditions.checkState(sinks.isEmpty(), "Already bootstrapped?!");
final File baseDir = tuningConfig.getBasePersistDirectory();
if (!baseDir.exists()) {
return null;
}
final File[] files = baseDir.listFiles();
if (files == null) {
ret... | Object function() { Preconditions.checkState(sinks.isEmpty(), STR); final File baseDir = tuningConfig.getBasePersistDirectory(); if (!baseDir.exists()) { return null; } final File[] files = baseDir.listFiles(); if (files == null) { return null; } final Committed committed; File commitFile = null; try { commitLock.lock(... | /**
* Populate "sinks" and "sinkTimeline" with committed segments, and announce them with the segmentAnnouncer.
*
* @return persisted commit metadata
*/ | Populate "sinks" and "sinkTimeline" with committed segments, and announce them with the segmentAnnouncer | bootstrapSinksFromDisk | {
"repo_name": "metamx/druid",
"path": "server/src/main/java/io/druid/segment/realtime/appenderator/AppenderatorImpl.java",
"license": "apache-2.0",
"size": 43343
} | [
"com.google.common.base.Preconditions",
"java.io.File",
"org.apache.commons.io.FileUtils"
] | import com.google.common.base.Preconditions; import java.io.File; import org.apache.commons.io.FileUtils; | import com.google.common.base.*; import java.io.*; import org.apache.commons.io.*; | [
"com.google.common",
"java.io",
"org.apache.commons"
] | com.google.common; java.io; org.apache.commons; | 300,236 |
private final Query getInTimeJavaQuery() {
return entityManager.createQuery(
TimeEntityCriteriaFactory.findInTime(entityManager, date));
} | final Query function() { return entityManager.createQuery( TimeEntityCriteriaFactory.findInTime(entityManager, date)); } | /**
* Returns the query for the test.
*
* @return the query for the test
*/ | Returns the query for the test | getInTimeJavaQuery | {
"repo_name": "Bernardo-MG/jpa-example",
"path": "src/test/java/com/bernardomg/example/jpa/test/integration/temporal/time/ITTimeEntityQueryCriteriaApi.java",
"license": "mit",
"size": 9934
} | [
"com.bernardomg.example.jpa.test.config.criteria.temporal.TimeEntityCriteriaFactory",
"javax.persistence.Query"
] | import com.bernardomg.example.jpa.test.config.criteria.temporal.TimeEntityCriteriaFactory; import javax.persistence.Query; | import com.bernardomg.example.jpa.test.config.criteria.temporal.*; import javax.persistence.*; | [
"com.bernardomg.example",
"javax.persistence"
] | com.bernardomg.example; javax.persistence; | 1,544,498 |
public List<String> getMethodAnnotations() {
return methodAnnotations;
} | List<String> function() { return methodAnnotations; } | /**
* Returns the annotations (in string form) that should be applied to the property's method
* implementation.
*/ | Returns the annotations (in string form) that should be applied to the property's method implementation | getMethodAnnotations | {
"repo_name": "google/auto",
"path": "value/src/main/java/com/google/auto/value/processor/AutoValueishProcessor.java",
"license": "apache-2.0",
"size": 56030
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 780,107 |
public boolean generarDocumentos(List<PreguntaTest> resultados, int TotalTestsBloque) {
if (resultados == null)
return false;
// Genera el pdf
PdfGenerator pdfGenerator = new PdfGenerator(this);
// Para que no se aburran esperando, les ponemos un mensaje en la
// consola.
switch (tipoTest) {
case ... | boolean function(List<PreguntaTest> resultados, int TotalTestsBloque) { if (resultados == null) return false; PdfGenerator pdfGenerator = new PdfGenerator(this); switch (tipoTest) { case BLOQUE: logger.info(STR + IdLongName + STR + idTest); break; case ALEATORIO: logger.info(STR + idTest); break; case RELEVANCIA: logge... | /**
* Genera el PDF y el html asociados a este TEST.
*
* @param conexion
* @param Prefijo_Archivo
* : Es el prefijo que va a tener el nombre del archivo.
*/ | Genera el PDF y el html asociados a este TEST | generarDocumentos | {
"repo_name": "preparatic/utilidadesdetests",
"path": "src/main/java/com/preparatic/entidades/Test.java",
"license": "apache-2.0",
"size": 14832
} | [
"com.preparatic.archivos.HtmlGenerator",
"com.preparatic.archivos.PdfGenerator",
"java.util.ArrayList",
"java.util.List"
] | import com.preparatic.archivos.HtmlGenerator; import com.preparatic.archivos.PdfGenerator; import java.util.ArrayList; import java.util.List; | import com.preparatic.archivos.*; import java.util.*; | [
"com.preparatic.archivos",
"java.util"
] | com.preparatic.archivos; java.util; | 542,474 |
public Object clone() throws CloneNotSupportedException {
Series clone = (Series) super.clone();
clone.listeners = new EventListenerList();
clone.propertyChangeSupport = new PropertyChangeSupport(clone);
return clone;
}
| Object function() throws CloneNotSupportedException { Series clone = (Series) super.clone(); clone.listeners = new EventListenerList(); clone.propertyChangeSupport = new PropertyChangeSupport(clone); return clone; } | /**
* Returns a clone of the series.
* <P>
* Notes:
* <ul>
* <li>No need to clone the name or description, since String object is
* immutable.</li>
* <li>We set the listener list to empty, since the listeners did not
* register with the clone.</li>
* <li>Same applie... | Returns a clone of the series. Notes: No need to clone the name or description, since String object is immutable. We set the listener list to empty, since the listeners did not register with the clone. Same applies to the PropertyChangeSupport instance. | clone | {
"repo_name": "apetresc/JFreeChart",
"path": "src/main/java/org/jfree/data/general/Series.java",
"license": "lgpl-2.1",
"size": 11583
} | [
"java.beans.PropertyChangeSupport",
"javax.swing.event.EventListenerList"
] | import java.beans.PropertyChangeSupport; import javax.swing.event.EventListenerList; | import java.beans.*; import javax.swing.event.*; | [
"java.beans",
"javax.swing"
] | java.beans; javax.swing; | 2,590,480 |
public Iterator getBackwardIterator(IDocument document, CharSequence prefix, int firstPosition) {
return new HippieCompletionBackwardIterator(document, prefix, firstPosition);
} | Iterator function(IDocument document, CharSequence prefix, int firstPosition) { return new HippieCompletionBackwardIterator(document, prefix, firstPosition); } | /**
* Provides an iterator that will get the completions that start with the passed prefix before
* the passed position (backwards until the start of the document).
*
* @param document the document to be scanned
* @param prefix the prefix to search for
* @param firstPosition the initial position in the doc... | Provides an iterator that will get the completions that start with the passed prefix before the passed position (backwards until the start of the document) | getBackwardIterator | {
"repo_name": "xiaguangme/simon_ide_tools",
"path": "02.eclipse_enhance/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/HippieCompletionEngine.java",
"license": "apache-2.0",
"size": 26768
} | [
"java.util.Iterator",
"org.eclipse.jface.text.IDocument"
] | import java.util.Iterator; import org.eclipse.jface.text.IDocument; | import java.util.*; import org.eclipse.jface.text.*; | [
"java.util",
"org.eclipse.jface"
] | java.util; org.eclipse.jface; | 903,750 |
public void testIsClosedWithTwoStatementsOnSameConnection()
throws SQLException {
// Create a second statement on the default connection.
Statement stmt2 = createStatement();
assertFalse("Second statement must be open initially",
stmt2.isClosed());
assertFals... | void function() throws SQLException { Statement stmt2 = createStatement(); assertFalse(STR, stmt2.isClosed()); assertFalse(STR + STR, stmt.isClosed()); ResultSet rs = stmt2.executeQuery(STR); assertFalse(STR + STR, stmt2.isClosed()); assertFalse(STR + STR, stmt.isClosed()); stmt2.close(); assertTrue(STR + STR, stmt2.is... | /**
* Test that creating two statements on the same connection does not
* cause side effects on the statements.
*/ | Test that creating two statements on the same connection does not cause side effects on the statements | testIsClosedWithTwoStatementsOnSameConnection | {
"repo_name": "trejkaz/derby",
"path": "java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java",
"license": "apache-2.0",
"size": 28138
} | [
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Statement"
] | import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; | import java.sql.*; | [
"java.sql"
] | java.sql; | 601,949 |
public boolean should_haveNbTypeParameters(EObject obj, int numberOfParameters) {
int nb = 0;
if (obj instanceof XtendClass) {
final XtendClass clazz = (XtendClass) obj;
if (clazz.getTypeParameters() != null) {
nb = clazz.getTypeParameters().size();
}
} else if (obj instanceof XtendInterface) {
... | boolean function(EObject obj, int numberOfParameters) { int nb = 0; if (obj instanceof XtendClass) { final XtendClass clazz = (XtendClass) obj; if (clazz.getTypeParameters() != null) { nb = clazz.getTypeParameters().size(); } } else if (obj instanceof XtendInterface) { final XtendInterface interf = (XtendInterface) obj... | /** Ensure that the given object is a type declaration or function with the given number of type parameters.
*
* @param obj - the object.
* @param numberOfParameters - the number of type parameters defined for the type declaration or function.
* @return the validation status.
*/ | Ensure that the given object is a type declaration or function with the given number of type parameters | should_haveNbTypeParameters | {
"repo_name": "gallandarakhneorg/sarl",
"path": "docs/io.sarl.docs.suite/src/test/java/io/sarl/docs/utils/SARLParser.java",
"license": "apache-2.0",
"size": 43477
} | [
"org.eclipse.emf.ecore.EObject",
"org.eclipse.xtend.core.xtend.XtendClass",
"org.eclipse.xtend.core.xtend.XtendFunction",
"org.eclipse.xtend.core.xtend.XtendInterface"
] | import org.eclipse.emf.ecore.EObject; import org.eclipse.xtend.core.xtend.XtendClass; import org.eclipse.xtend.core.xtend.XtendFunction; import org.eclipse.xtend.core.xtend.XtendInterface; | import org.eclipse.emf.ecore.*; import org.eclipse.xtend.core.xtend.*; | [
"org.eclipse.emf",
"org.eclipse.xtend"
] | org.eclipse.emf; org.eclipse.xtend; | 2,481,167 |
protected Object invokeUnderTrace(MethodInvocation invocation, Log logger) throws Throwable {
String name = invocation.getMethod().getDeclaringClass().getName() + "." + invocation.getMethod().getName();
StopWatch stopWatch = new StopWatch(name);
Object returnValue = null;
boolean exitThroughException = false... | Object function(MethodInvocation invocation, Log logger) throws Throwable { String name = invocation.getMethod().getDeclaringClass().getName() + "." + invocation.getMethod().getName(); StopWatch stopWatch = new StopWatch(name); Object returnValue = null; boolean exitThroughException = false; try { stopWatch.start(name)... | /**
* Writes a log message before the invocation based on the value of <code>enterMessage</code>.
* If the invocation succeeds, then a log message is written on exit based on the value
* <code>exitMessage</code>. If an exception occurs during invocation, then a message is
* written based on the value of <code>e... | Writes a log message before the invocation based on the value of <code>enterMessage</code>. If the invocation succeeds, then a log message is written on exit based on the value <code>exitMessage</code>. If an exception occurs during invocation, then a message is written based on the value of <code>exceptionMessage</cod... | invokeUnderTrace | {
"repo_name": "cbeams-archive/spring-framework-2.5.x",
"path": "src/org/springframework/aop/interceptor/CustomizableTraceInterceptor.java",
"license": "apache-2.0",
"size": 17105
} | [
"org.aopalliance.intercept.MethodInvocation",
"org.apache.commons.logging.Log",
"org.springframework.util.StopWatch"
] | import org.aopalliance.intercept.MethodInvocation; import org.apache.commons.logging.Log; import org.springframework.util.StopWatch; | import org.aopalliance.intercept.*; import org.apache.commons.logging.*; import org.springframework.util.*; | [
"org.aopalliance.intercept",
"org.apache.commons",
"org.springframework.util"
] | org.aopalliance.intercept; org.apache.commons; org.springframework.util; | 1,924,957 |
public Assertion newAssertion(final List<Statement> authnStatement, final String issuer,
final ZonedDateTime issuedAt, final String id) {
val assertion = newSamlObject(Assertion.class);
assertion.setID(id);
assertion.setIssueInstant(DateTimeUtils.dateTimeOf(... | Assertion function(final List<Statement> authnStatement, final String issuer, final ZonedDateTime issuedAt, final String id) { val assertion = newSamlObject(Assertion.class); assertion.setID(id); assertion.setIssueInstant(DateTimeUtils.dateTimeOf(issuedAt)); assertion.setIssuer(newIssuer(issuer)); assertion.getStatemen... | /**
* Create a new SAML1 response object.
*
* @param authnStatement the authn statement
* @param issuer the issuer
* @param issuedAt the issued at
* @param id the id
* @return the assertion
*/ | Create a new SAML1 response object | newAssertion | {
"repo_name": "rrenomeron/cas",
"path": "support/cas-server-support-saml-core-api/src/main/java/org/apereo/cas/support/saml/util/AbstractSaml20ObjectBuilder.java",
"license": "apache-2.0",
"size": 20781
} | [
"java.time.ZonedDateTime",
"java.util.List",
"org.apereo.cas.util.DateTimeUtils",
"org.opensaml.saml.saml2.core.Assertion",
"org.opensaml.saml.saml2.core.Statement"
] | import java.time.ZonedDateTime; import java.util.List; import org.apereo.cas.util.DateTimeUtils; import org.opensaml.saml.saml2.core.Assertion; import org.opensaml.saml.saml2.core.Statement; | import java.time.*; import java.util.*; import org.apereo.cas.util.*; import org.opensaml.saml.saml2.core.*; | [
"java.time",
"java.util",
"org.apereo.cas",
"org.opensaml.saml"
] | java.time; java.util; org.apereo.cas; org.opensaml.saml; | 2,137,247 |
public void resetMetrics() {
rcvdMsgsMetric.reset();
sentMsgsMetric.reset();
sentBytesMetric.reset();
rcvdBytesMetric.reset();
for (Metric metric : mreg) {
if (metric.name().startsWith(SENT_MESSAGES_BY_TYPE_METRIC_NAME))
metric.reset();
... | void function() { rcvdMsgsMetric.reset(); sentMsgsMetric.reset(); sentBytesMetric.reset(); rcvdBytesMetric.reset(); for (Metric metric : mreg) { if (metric.name().startsWith(SENT_MESSAGES_BY_TYPE_METRIC_NAME)) metric.reset(); else if (metric.name().startsWith(RECEIVED_MESSAGES_BY_TYPE_METRIC_NAME)) metric.reset(); } fo... | /**
* Resets metrics for this instance.
*/ | Resets metrics for this instance | resetMetrics | {
"repo_name": "andrey-kuznetsov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationMetricsListener.java",
"license": "apache-2.0",
"size": 16132
} | [
"org.apache.ignite.internal.processors.metric.MetricRegistry",
"org.apache.ignite.spi.metric.Metric"
] | import org.apache.ignite.internal.processors.metric.MetricRegistry; import org.apache.ignite.spi.metric.Metric; | import org.apache.ignite.internal.processors.metric.*; import org.apache.ignite.spi.metric.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,704,246 |
public void erase(int dim){
Arrays.fill(body[dim],-1.0);
}//end-method
| void function(int dim){ Arrays.fill(body[dim],-1.0); } | /**
* Erase a row of the table
*
* @param dim Row to erase
*/ | Erase a row of the table | erase | {
"repo_name": "adofsauron/KEEL",
"path": "src/keel/GraphInterKeel/statistical/tests/Distribution2KeyTable.java",
"license": "gpl-3.0",
"size": 2881
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 2,323,236 |
public Group<E> exclude(Group<E> g) {
try {
if ((MOP.forName(this.getTypeName())).isAssignableFrom(MOP.forName(g.getTypeName()))) {
ProxyForGroup<E> result = new ProxyForGroup<E>(this.getTypeName());
E member;
Iterator<E> it = this.iterator();
... | Group<E> function(Group<E> g) { try { if ((MOP.forName(this.getTypeName())).isAssignableFrom(MOP.forName(g.getTypeName()))) { ProxyForGroup<E> result = new ProxyForGroup<E>(this.getTypeName()); E member; Iterator<E> it = this.iterator(); while (it.hasNext()) { member = it.next(); if (g.indexOf(member) < 0) { result.add... | /**
* Creates a new group with the members that belong to the group, but not to the group <code>g
* </code>.
*
* @param g
* - a group
* @return a group that contain the members of the group without the member <code>g</code>.
* <code>null<code> if the class of the g... | Creates a new group with the members that belong to the group, but not to the group <code>g </code> | exclude | {
"repo_name": "acontes/programming",
"path": "src/Core/org/objectweb/proactive/core/group/ProxyForGroup.java",
"license": "agpl-3.0",
"size": 57805
} | [
"java.util.Iterator",
"org.objectweb.proactive.core.mop.ConstructionOfReifiedObjectFailedException",
"org.objectweb.proactive.core.mop.MOP"
] | import java.util.Iterator; import org.objectweb.proactive.core.mop.ConstructionOfReifiedObjectFailedException; import org.objectweb.proactive.core.mop.MOP; | import java.util.*; import org.objectweb.proactive.core.mop.*; | [
"java.util",
"org.objectweb.proactive"
] | java.util; org.objectweb.proactive; | 2,480,458 |
public void close()
throws SQLException {
log.info("Table_Service::close()");
resultSet.getStatement().close();
resultSet.close();
resultSet = null;
tupleValid = false;
log.info("Table_Service::close()");
} | void function() throws SQLException { log.info(STR); resultSet.getStatement().close(); resultSet.close(); resultSet = null; tupleValid = false; log.info(STR); } | /**
* close current result set, discarding all items in result set and local tuple variables
* precondition:
* successful call to fetchTuple()
**/ | close current result set, discarding all items in result set and local tuple variables precondition: successful call to fetchTuple() | close | {
"repo_name": "diogo-andrade/DataHubSystem",
"path": "petascope/src/main/java/petascope/wms/commander/Table_Service.java",
"license": "agpl-3.0",
"size": 44814
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,115,283 |
return NotificationRecord.class;
}
public final TableField<NotificationRecord, Integer> ID_NOTIFICATION = createField("id_notification", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
public final TableField<NotificationRecord, String> NAME = createField("name", org.jooq.impl.SQLDataType.VARCH... | return NotificationRecord.class; } public final TableField<NotificationRecord, Integer> ID_NOTIFICATION = createField(STR, org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, STRnameSTRSTRdescriptionSTRSTRcheckPeriodSTRSTRquerySTRSTRsend_onceSTRSTRNotificationSTR"); } /** * {@inheritDoc} | /**
* The class holding records for this type
*/ | The class holding records for this type | getRecordType | {
"repo_name": "coolcrowd/ObjectService",
"path": "src/main/java/edu/kit/ipd/crowdcontrol/objectservice/database/model/tables/Notification.java",
"license": "apache-2.0",
"size": 3904
} | [
"edu.kit.ipd.crowdcontrol.objectservice.database.model.tables.records.NotificationRecord",
"org.jooq.TableField"
] | import edu.kit.ipd.crowdcontrol.objectservice.database.model.tables.records.NotificationRecord; import org.jooq.TableField; | import edu.kit.ipd.crowdcontrol.objectservice.database.model.tables.records.*; import org.jooq.*; | [
"edu.kit.ipd",
"org.jooq"
] | edu.kit.ipd; org.jooq; | 1,461,645 |
@Test
public void onInsertCassandra() throws Exception
{
Object p1 = prepareData("1", 10);
Object p2 = prepareData("2", 20);
Object p3 = prepareData("3", 15);
Query findQuery = entityManager.createQuery("Select p from PersonCassandra p", PersonCassandra.class);
List<... | void function() throws Exception { Object p1 = prepareData("1", 10); Object p2 = prepareData("2", 20); Object p3 = prepareData("3", 15); Query findQuery = entityManager.createQuery(STR, PersonCassandra.class); List<PersonCassandra> allPersons = findQuery.getResultList(); Assert.assertNotNull(allPersons); Assert.assertT... | /**
* On insert cassandra.
*
* @throws Exception
* the exception
*/ | On insert cassandra | onInsertCassandra | {
"repo_name": "ravisund/Kundera",
"path": "src/kundera-cassandra/cassandra-ds-driver/src/test/java/com/impetus/kundera/client/cassandra/crud/PersonEntityTest.java",
"license": "apache-2.0",
"size": 19948
} | [
"com.impetus.client.crud.PersonCassandra",
"java.util.List",
"javax.persistence.Query",
"junit.framework.Assert"
] | import com.impetus.client.crud.PersonCassandra; import java.util.List; import javax.persistence.Query; import junit.framework.Assert; | import com.impetus.client.crud.*; import java.util.*; import javax.persistence.*; import junit.framework.*; | [
"com.impetus.client",
"java.util",
"javax.persistence",
"junit.framework"
] | com.impetus.client; java.util; javax.persistence; junit.framework; | 1,693,003 |
public void setColours(ArrayList<Color> cols) {
m_colorList = cols;
} | void function(ArrayList<Color> cols) { m_colorList = cols; } | /**
* Sets a list of colours to use for colouring data points
*
* @param cols a list of java.awt.Color
*/ | Sets a list of colours to use for colouring data points | setColours | {
"repo_name": "mydzigear/weka.kmeanspp.silhouette_score",
"path": "src/weka/gui/visualize/AttributePanel.java",
"license": "gpl-3.0",
"size": 19795
} | [
"java.awt.Color",
"java.util.ArrayList"
] | import java.awt.Color; import java.util.ArrayList; | import java.awt.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 1,232,669 |
public final Context context (String serviceType)
{
Context ctx = null;
HLS service = null;
try
{
// ensure we are in an activity associated with the correct service type
String currentServiceType = UserActivityFactory.userActivity().serviceType();
... | final Context function (String serviceType) { Context ctx = null; HLS service = null; try { String currentServiceType = UserActivityFactory.userActivity().serviceType(); if (currentServiceType.equals(serviceType)) { service = _manager.getHighLevelService(serviceType); } } catch (NoActivityException nae) { } catch (Exce... | /**
* message com.arjuna.mw.wsas.context.ContextManager_3 [com.arjuna.mw.wsas.context.ContextManager_3] - getHighLevelServices threw:
* message com.arjuna.mw.wsas.context.ContextManager_4 [com.arjuna.mw.wsas.context.ContextManager_4] - assembling context and received:
*/ | message com.arjuna.mw.wsas.context.ContextManager_3 [com.arjuna.mw.wsas.context.ContextManager_3] - getHighLevelServices threw: message com.arjuna.mw.wsas.context.ContextManager_4 [com.arjuna.mw.wsas.context.ContextManager_4] - assembling context and received: | context | {
"repo_name": "nmcl/scratch",
"path": "graalvm/transactions/fork/narayana/XTS/WSAS/classes/com/arjuna/mw/wsas/context/ContextManager.java",
"license": "apache-2.0",
"size": 3270
} | [
"com.arjuna.mw.wsas.ActivityManager",
"com.arjuna.mw.wsas.UserActivityFactory",
"com.arjuna.mw.wsas.exceptions.NoActivityException"
] | import com.arjuna.mw.wsas.ActivityManager; import com.arjuna.mw.wsas.UserActivityFactory; import com.arjuna.mw.wsas.exceptions.NoActivityException; | import com.arjuna.mw.wsas.*; import com.arjuna.mw.wsas.exceptions.*; | [
"com.arjuna.mw"
] | com.arjuna.mw; | 2,408,436 |
static void boot(AOSOptions options) {
// create and register the dcg as a decayable object
// Give it an initial seed weight that approximates the old step
// function for edge hotness. The intent is that early on
// (until decay decreases this initial weight), we are conservative in
// marking ... | static void boot(AOSOptions options) { Controller.dcg = new PartialCallGraph(options.AI_SEED_MULTIPLIER * (1 / options.AI_HOT_CALLSITE_THRESHOLD)); RuntimeMeasurements.registerDecayableObject(Controller.dcg); RuntimeMeasurements.installTimerNullListener(callDensityListener); callDensityListener.activate(); if (options.... | /**
* Set parameters.
* Must be called after parsing command-line.
*/ | Set parameters. Must be called after parsing command-line | boot | {
"repo_name": "ut-osa/laminar",
"path": "jikesrvm-3.0.0/rvm/src/org/jikesrvm/adaptive/controller/AdaptiveInlining.java",
"license": "bsd-3-clause",
"size": 2149
} | [
"org.jikesrvm.adaptive.database.callgraph.PartialCallGraph",
"org.jikesrvm.adaptive.measurements.RuntimeMeasurements",
"org.jikesrvm.adaptive.util.AOSOptions"
] | import org.jikesrvm.adaptive.database.callgraph.PartialCallGraph; import org.jikesrvm.adaptive.measurements.RuntimeMeasurements; import org.jikesrvm.adaptive.util.AOSOptions; | import org.jikesrvm.adaptive.database.callgraph.*; import org.jikesrvm.adaptive.measurements.*; import org.jikesrvm.adaptive.util.*; | [
"org.jikesrvm.adaptive"
] | org.jikesrvm.adaptive; | 2,585,138 |
@Test
public void testSetUnits() {
BigDecimal units = new BigDecimal(25);
instance.setUnits(units);
assertEquals(units,instance.getUnits());
} | void function() { BigDecimal units = new BigDecimal(25); instance.setUnits(units); assertEquals(units,instance.getUnits()); } | /**
* Test of setUnits method, of class LayerPriceComposition.
*/ | Test of setUnits method, of class LayerPriceComposition | testSetUnits | {
"repo_name": "B3Partners/kaartenbalie",
"path": "src/test/java/nl/b3p/kaartenbalie/core/server/accounting/entity/LayerPriceCompositionTest.java",
"license": "lgpl-3.0",
"size": 9671
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 2,275,644 |
@Test
public void createPaymentTest() {
PodamFactory factory = new PodamFactoryImpl();
PaymentEntity newEntity = factory.manufacturePojo(PaymentEntity.class);
PaymentEntity result = paymentPersistence.create(newEntity);
Assert.assertNotNull(result);
PaymentEntit... | void function() { PodamFactory factory = new PodamFactoryImpl(); PaymentEntity newEntity = factory.manufacturePojo(PaymentEntity.class); PaymentEntity result = paymentPersistence.create(newEntity); Assert.assertNotNull(result); PaymentEntity entity = em.find(PaymentEntity.class, result.getId()); Assert.assertEquals(new... | /**
* Prueba para crear un Payment.
*
* @generated
*/ | Prueba para crear un Payment | createPaymentTest | {
"repo_name": "Uniandes-MISO4203/artwork-201620-1",
"path": "artwork-logic/src/test/java/co/edu/uniandes/csw/artwork/test/persistence/PaymentPersistenceTest.java",
"license": "mit",
"size": 7372
} | [
"co.edu.uniandes.csw.artwork.entities.PaymentEntity",
"org.junit.Assert",
"uk.co.jemos.podam.api.PodamFactory",
"uk.co.jemos.podam.api.PodamFactoryImpl"
] | import co.edu.uniandes.csw.artwork.entities.PaymentEntity; import org.junit.Assert; import uk.co.jemos.podam.api.PodamFactory; import uk.co.jemos.podam.api.PodamFactoryImpl; | import co.edu.uniandes.csw.artwork.entities.*; import org.junit.*; import uk.co.jemos.podam.api.*; | [
"co.edu.uniandes",
"org.junit",
"uk.co.jemos"
] | co.edu.uniandes; org.junit; uk.co.jemos; | 430,218 |
@Override
public Configuration getConf() {
return conf;
} | Configuration function() { return conf; } | /**
* Return the configuration used by this object.
*
* @return the configuration object used by this objec.
*/ | Return the configuration used by this object | getConf | {
"repo_name": "tseen/Federated-HDFS",
"path": "tseenliu/FedHDFS-hadoop-src/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/Lz4Codec.java",
"license": "apache-2.0",
"size": 7132
} | [
"org.apache.hadoop.conf.Configuration"
] | import org.apache.hadoop.conf.Configuration; | import org.apache.hadoop.conf.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 760,717 |
public String getString(String key, Object[] args) {
String iString = null;
String value = getString(key);
// this check for the runtime exception is some pre 1.1.6
// VM's don't do an automatic toString() on the passed in
// objects and barf out
try {
// ensure the arguments are not nul... | String function(String key, Object[] args) { String iString = null; String value = getString(key); try { Object nonNullArgs[] = args; for (int i=0; i<args.length; i++) { if (args[i] == null) { if (nonNullArgs==args) nonNullArgs=(Object[])args.clone(); nonNullArgs[i] = "null"; } } iString = MessageFormat.format(value, n... | /**
* Get a string from the underlying resource bundle and format
* it with the given set of arguments.
*
* @param key
* @param args
*/ | Get a string from the underlying resource bundle and format it with the given set of arguments | getString | {
"repo_name": "sguazt/dcsj-sharegrid-portal",
"path": "src/java/it/unipmn/di/dcs/sharegrid/web/management/naming/StringManager.java",
"license": "gpl-3.0",
"size": 6531
} | [
"java.text.MessageFormat"
] | import java.text.MessageFormat; | import java.text.*; | [
"java.text"
] | java.text; | 2,803,378 |
public boolean filter(Text key, CrawlDatum generateData,
CrawlDatum fetchData, CrawlDatum sigData, Content content,
ParseData parseData, ParseText parseText, Collection<CrawlDatum> linked); | boolean function(Text key, CrawlDatum generateData, CrawlDatum fetchData, CrawlDatum sigData, Content content, ParseData parseData, ParseText parseText, Collection<CrawlDatum> linked); | /**
* The filtering method which gets all information being merged for a given
* key (URL).
*
* @return <tt>true</tt> values for this <tt>key</tt> (URL) should be merged
* into the new segment.
*/ | The filtering method which gets all information being merged for a given key (URL) | filter | {
"repo_name": "code4wt/nutch-learning",
"path": "src/java/org/apache/nutch/segment/SegmentMergeFilter.java",
"license": "apache-2.0",
"size": 1885
} | [
"java.util.Collection",
"org.apache.hadoop.io.Text",
"org.apache.nutch.crawl.CrawlDatum",
"org.apache.nutch.parse.ParseData",
"org.apache.nutch.parse.ParseText",
"org.apache.nutch.protocol.Content"
] | import java.util.Collection; import org.apache.hadoop.io.Text; import org.apache.nutch.crawl.CrawlDatum; import org.apache.nutch.parse.ParseData; import org.apache.nutch.parse.ParseText; import org.apache.nutch.protocol.Content; | import java.util.*; import org.apache.hadoop.io.*; import org.apache.nutch.crawl.*; import org.apache.nutch.parse.*; import org.apache.nutch.protocol.*; | [
"java.util",
"org.apache.hadoop",
"org.apache.nutch"
] | java.util; org.apache.hadoop; org.apache.nutch; | 71,242 |
@Transient @Accessor(isInteresting = true)
public int getPrecision() {
return userDefinedSQLType.getPrecision(getPlatform());
} | @Transient @Accessor(isInteresting = true) int function() { return userDefinedSQLType.getPrecision(getPlatform()); } | /**
* Returns the precision for this column.
* The precision only makes sense together with the actual datatype.
* For character datatypes this defines the max. length of the column.
* For numeric datatypes this needs to be combined with the scale of the column
*
* @return the value of precision
* @see #g... | Returns the precision for this column. The precision only makes sense together with the actual datatype. For character datatypes this defines the max. length of the column. For numeric datatypes this needs to be combined with the scale of the column | getPrecision | {
"repo_name": "malikoski/sqlpower-library",
"path": "src/main/java/ca/sqlpower/sqlobject/SQLColumn.java",
"license": "gpl-3.0",
"size": 54478
} | [
"ca.sqlpower.object.annotation.Accessor",
"ca.sqlpower.object.annotation.Transient"
] | import ca.sqlpower.object.annotation.Accessor; import ca.sqlpower.object.annotation.Transient; | import ca.sqlpower.object.annotation.*; | [
"ca.sqlpower.object"
] | ca.sqlpower.object; | 2,665,396 |
protected boolean isBetterLocation(Location location, Location currentBestLocation) {
if (currentBestLocation == null) {
// A new location is always better than no location
return true;
}
// Check whether the new location fix is newer or older
long timeDelta = location.getTime() - currentBestLocatio... | boolean function(Location location, Location currentBestLocation) { if (currentBestLocation == null) { return true; } long timeDelta = location.getTime() - currentBestLocation.getTime(); boolean isSignificantlyNewer = timeDelta > sTwoMinutes; boolean isSignificantlyOlder = timeDelta < -sTwoMinutes; boolean isNewer = ti... | /**
* Determines whether one Location reading is better than the current Location fix
*
* @param location The new Location that you want to evaluate
* @param currentBestLocation The current Location fix, to which you want to compare the new one
*
* @rturn true if the location is better than the current... | Determines whether one Location reading is better than the current Location fix | isBetterLocation | {
"repo_name": "magdaaproject/mobile-environment-monitoring",
"path": "src/org/magdaaproject/mem/services/LocationCollector.java",
"license": "gpl-3.0",
"size": 6235
} | [
"android.location.Location"
] | import android.location.Location; | import android.location.*; | [
"android.location"
] | android.location; | 374,912 |
private interface DialogCallback {
void onPositiveClicked(@NonNull Contact contact); | interface DialogCallback { void function(@NonNull Contact contact); | /**
* Called when the positive button on the
* dialog is pressed.
*
* @param contact the contact contained by
* the dialog.
*/ | Called when the positive button on the dialog is pressed | onPositiveClicked | {
"repo_name": "anthonycr/Bonsai",
"path": "sample/src/main/java/com/anthonycr/sample/MainActivity.java",
"license": "apache-2.0",
"size": 18241
} | [
"android.support.annotation.NonNull"
] | import android.support.annotation.NonNull; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 1,447,415 |
static Injector createInjector(String msgPluginModuleName, @Nullable String pluginModuleNames) {
List<Module> guiceModules = Lists.newArrayListWithCapacity(2);
guiceModules.add(new SoyModule());
checkArgument(msgPluginModuleName != null && msgPluginModuleName.length() > 0);
guiceModules.add(instant... | static Injector createInjector(String msgPluginModuleName, @Nullable String pluginModuleNames) { List<Module> guiceModules = Lists.newArrayListWithCapacity(2); guiceModules.add(new SoyModule()); checkArgument(msgPluginModuleName != null && msgPluginModuleName.length() > 0); guiceModules.add(instantiatePluginModule(msgP... | /**
* Creates a Guice injector that includes the SoyModule, a message plugin module, and maybe
* additional plugin modules, and maybe additional modules.
*
* @param msgPluginModuleName The full class name of the message plugin module. Required.
* @param pluginModuleNames Comma-delimited list of full clas... | Creates a Guice injector that includes the SoyModule, a message plugin module, and maybe additional plugin modules, and maybe additional modules | createInjector | {
"repo_name": "viqueen/closure-templates",
"path": "java/src/com/google/template/soy/MainClassUtils.java",
"license": "apache-2.0",
"size": 12189
} | [
"com.google.common.base.Preconditions",
"com.google.common.base.Splitter",
"com.google.common.collect.Lists",
"com.google.inject.Guice",
"com.google.inject.Injector",
"com.google.inject.Module",
"java.util.List",
"javax.annotation.Nullable"
] | import com.google.common.base.Preconditions; import com.google.common.base.Splitter; import com.google.common.collect.Lists; import com.google.inject.Guice; import com.google.inject.Injector; import com.google.inject.Module; import java.util.List; import javax.annotation.Nullable; | import com.google.common.base.*; import com.google.common.collect.*; import com.google.inject.*; import java.util.*; import javax.annotation.*; | [
"com.google.common",
"com.google.inject",
"java.util",
"javax.annotation"
] | com.google.common; com.google.inject; java.util; javax.annotation; | 939,568 |
@Override
@BusSignalHandler(iface = ANNOUNCE_IFNAME, signal = SIGNAL_NAME)
public void Announce(short version, short port, BusObjectDescription[] objectDescriptions, Map<String, Variant> aboutData)
{
BusAttachment bus = getBus();
bus.enableConcurrentCallbacks();
... | @BusSignalHandler(iface = ANNOUNCE_IFNAME, signal = SIGNAL_NAME) void function(short version, short port, BusObjectDescription[] objectDescriptions, Map<String, Variant> aboutData) { BusAttachment bus = getBus(); bus.enableConcurrentCallbacks(); String sender = bus.getMessageContext().sender; Set<String> interfacesFrom... | /**
* Signal handler
* @see org.alljoyn.about.transport.AboutTransport#Announce(short, short, org.alljoyn.services.common.BusObjectDescription[], java.util.Map)
*/ | Signal handler | Announce | {
"repo_name": "octoblu/alljoyn",
"path": "alljoyn/services/about/java/src/org/alljoyn/about/AboutServiceImpl.java",
"license": "isc",
"size": 31363
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.HashSet",
"java.util.List",
"java.util.Map",
"java.util.Set",
"org.alljoyn.bus.BusAttachment",
"org.alljoyn.bus.Variant",
"org.alljoyn.bus.annotation.BusSignalHandler",
"org.alljoyn.services.common.AnnouncementHandler",
"org.alljoyn.services.... | import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.alljoyn.bus.BusAttachment; import org.alljoyn.bus.Variant; import org.alljoyn.bus.annotation.BusSignalHandler; import org.alljoyn.services.common.AnnouncementHandl... | import java.util.*; import org.alljoyn.bus.*; import org.alljoyn.bus.annotation.*; import org.alljoyn.services.common.*; | [
"java.util",
"org.alljoyn.bus",
"org.alljoyn.services"
] | java.util; org.alljoyn.bus; org.alljoyn.services; | 1,008,007 |
protected List<Storage> getStorageList() {
return storageList;
} | List<Storage> function() { return storageList; } | /**
* Gets the storage list.
*
* @return the storage list
*/ | Gets the storage list | getStorageList | {
"repo_name": "mhe504/MigSim",
"path": "src/org/cloudbus/cloudsim/Datacenter.java",
"license": "mit",
"size": 34380
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,556,390 |
public static List<Element> getElements(Element topElm, ElementsFilter filter ) {
if (topElm == null) throw new IllegalArgumentException("topElm cannot be null");
synchronized(topElm.getOwnerDocument()) {
List<Element> retVals = new ArrayList<Element>();
NodeList childNodes =... | static List<Element> function(Element topElm, ElementsFilter filter ) { if (topElm == null) throw new IllegalArgumentException(STR); synchronized(topElm.getOwnerDocument()) { List<Element> retVals = new ArrayList<Element>(); NodeList childNodes = topElm.getChildNodes(); for (int i = 0, ll = childNodes.getLength(); i < ... | /**
* Returns child elements from given top element and accepted by given filter
* @param topElm Top element
* @param filter Filter
* @return
*/ | Returns child elements from given top element and accepted by given filter | getElements | {
"repo_name": "ceskaexpedice/kramerius",
"path": "shared/common/src/main/java/cz/incad/kramerius/utils/XMLUtils.java",
"license": "gpl-3.0",
"size": 15503
} | [
"java.util.ArrayList",
"java.util.List",
"org.w3c.dom.Element",
"org.w3c.dom.Node",
"org.w3c.dom.NodeList"
] | import java.util.ArrayList; import java.util.List; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; | import java.util.*; import org.w3c.dom.*; | [
"java.util",
"org.w3c.dom"
] | java.util; org.w3c.dom; | 634,496 |
public static void setChangelogMappingDirectory(File directory) {
changelogMappingDirectory = directory;
} | static void function(File directory) { changelogMappingDirectory = directory; } | /**
* Sets the changelog mapping directory
*
* @param directory
*/ | Sets the changelog mapping directory | setChangelogMappingDirectory | {
"repo_name": "gentics/maven-changelog-plugin",
"path": "src/main/java/com/gentics/changelogmanager/ChangelogConfiguration.java",
"license": "apache-2.0",
"size": 9224
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,755,324 |
public Element getLockedElement() {
return lockedElement;
} | Element function() { return lockedElement; } | /**
* transient property to remember if this page is downloaded or
* submitted
* @return Returns the lockedElement.
*/ | transient property to remember if this page is downloaded or submitted | getLockedElement | {
"repo_name": "tolweb/tolweb-app",
"path": "TreeGrowServer/src/org/tolweb/treegrowserver/UploadPage.java",
"license": "bsd-3-clause",
"size": 4139
} | [
"org.jdom.Element"
] | import org.jdom.Element; | import org.jdom.*; | [
"org.jdom"
] | org.jdom; | 1,964,154 |
List<File> getFiles()
{
if (!isDirectory()) return null;
File[] list = file.listFiles();
List<File> files = new ArrayList<File>();
if (list == null || list.length == 0) return files;
for (int i = 0; i < list.length; i++) {
if (!list[i].isHidden() && !list[i].isDirectory())
files.add(list[i]);
}
... | List<File> getFiles() { if (!isDirectory()) return null; File[] list = file.listFiles(); List<File> files = new ArrayList<File>(); if (list == null list.length == 0) return files; for (int i = 0; i < list.length; i++) { if (!list[i].isHidden() && !list[i].isDirectory()) files.add(list[i]); } return files; } | /**
* Returns the files within the directory.
*
* @return See above.
*/ | Returns the files within the directory | getFiles | {
"repo_name": "joshmoore/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/fsimporter/chooser/FileElement.java",
"license": "gpl-2.0",
"size": 5927
} | [
"java.io.File",
"java.util.ArrayList",
"java.util.List"
] | import java.io.File; import java.util.ArrayList; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,443,751 |
public void process(Dictionaries dict, Semantics semantics) throws Exception {
setHeadString();
setType(dict);
setNERString();
List<String> mStr = getMentionString();
setNumber(dict);
setGender(dict, getGender(dict, mStr));
setAnimacy(dict);
setPerson(dict);
setDiscourse();
if(... | void function(Dictionaries dict, Semantics semantics) throws Exception { setHeadString(); setType(dict); setNERString(); List<String> mStr = getMentionString(); setNumber(dict); setGender(dict, getGender(dict, mStr)); setAnimacy(dict); setPerson(dict); setDiscourse(); if(semantics!=null) setSemantics(dict, semantics); ... | /** Set attributes of a mention:
* head string, mention type, NER label, Number, Gender, Animacy
* @throws Exception
*/ | Set attributes of a mention: head string, mention type, NER label, Number, Gender, Animacy | process | {
"repo_name": "Nacturne/CoreNLP_copy",
"path": "src/edu/stanford/nlp/hcoref/data/Mention.java",
"license": "gpl-2.0",
"size": 60527
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,822,368 |
private void installBuiltins() {
installBuiltin(SLReadlnBuiltinFactory.getInstance());
installBuiltin(SLPrintlnBuiltinFactory.getInstance());
installBuiltin(SLNanoTimeBuiltinFactory.getInstance());
installBuiltin(SLDefineFunctionBuiltinFactory.getInstance());
installBuiltin(S... | void function() { installBuiltin(SLReadlnBuiltinFactory.getInstance()); installBuiltin(SLPrintlnBuiltinFactory.getInstance()); installBuiltin(SLNanoTimeBuiltinFactory.getInstance()); installBuiltin(SLDefineFunctionBuiltinFactory.getInstance()); installBuiltin(SLStackTraceBuiltinFactory.getInstance()); installBuiltin(SL... | /**
* Adds all builtin functions to the {@link SLFunctionRegistry}. This method lists all
* {@link SLBuiltinNode builtin implementation classes}.
*/ | Adds all builtin functions to the <code>SLFunctionRegistry</code>. This method lists all <code>SLBuiltinNode builtin implementation classes</code> | installBuiltins | {
"repo_name": "smarr/Truffle",
"path": "truffle/src/com.oracle.truffle.sl/src/com/oracle/truffle/sl/runtime/SLContext.java",
"license": "gpl-2.0",
"size": 11862
} | [
"com.oracle.truffle.sl.builtins.SLAddToHostClassPathBuiltinFactory",
"com.oracle.truffle.sl.builtins.SLDefineFunctionBuiltinFactory",
"com.oracle.truffle.sl.builtins.SLEvalBuiltinFactory",
"com.oracle.truffle.sl.builtins.SLExitBuiltinFactory",
"com.oracle.truffle.sl.builtins.SLGetSizeBuiltinFactory",
"com... | import com.oracle.truffle.sl.builtins.SLAddToHostClassPathBuiltinFactory; import com.oracle.truffle.sl.builtins.SLDefineFunctionBuiltinFactory; import com.oracle.truffle.sl.builtins.SLEvalBuiltinFactory; import com.oracle.truffle.sl.builtins.SLExitBuiltinFactory; import com.oracle.truffle.sl.builtins.SLGetSizeBuiltinFa... | import com.oracle.truffle.sl.builtins.*; | [
"com.oracle.truffle"
] | com.oracle.truffle; | 1,438,413 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.