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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
// Create a handler for the sendButton and nameField
class MyHandler implements ClickHandler, KeyUpHandler {
public void onClick(ClickEvent event) {
sendNameToServer();
} | class MyHandler implements ClickHandler, KeyUpHandler { void function(ClickEvent event) { sendNameToServer(); } | /**
* Fired when the user clicks on the sendButton.
*/ | Fired when the user clicks on the sendButton | onClick | {
"repo_name": "masterdany88/gwt_2.7.0_maven_eclipse",
"path": "gwt_2.7.0_maven_eclipse/web/src/main/java/pl/derp/web/parent.java",
"license": "gpl-2.0",
"size": 5606
} | [
"com.google.gwt.event.dom.client.ClickEvent",
"com.google.gwt.event.dom.client.ClickHandler",
"com.google.gwt.event.dom.client.KeyUpHandler"
] | import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.dom.client.KeyUpHandler; | import com.google.gwt.event.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,578,375 |
EClass getProxyWsdlResource(); | EClass getProxyWsdlResource(); | /**
* Returns the meta object for class '{@link org.wso2.developerstudio.eclipse.esb.ProxyWsdlResource <em>Proxy Wsdl Resource</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Proxy Wsdl Resource</em>'.
* @see org.wso2.developerstudio.eclipse.esb.ProxyWsdlReso... | Returns the meta object for class '<code>org.wso2.developerstudio.eclipse.esb.ProxyWsdlResource Proxy Wsdl Resource</code>'. | getProxyWsdlResource | {
"repo_name": "chanakaudaya/developer-studio",
"path": "esb/org.wso2.developerstudio.eclipse.esb/src/org/wso2/developerstudio/eclipse/esb/EsbPackage.java",
"license": "apache-2.0",
"size": 373548
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,235,195 |
byte[] marshall(final Serializable that) throws Exception; | byte[] marshall(final Serializable that) throws Exception; | /**
* <p>Write the value to a byte array.</p>
*
* @param that The value to write.
* @return The serialized data.
* @throws Exception
*/ | Write the value to a byte array | marshall | {
"repo_name": "BrentDouglas/chainlink",
"path": "spi/src/main/java/io/machinecode/chainlink/spi/marshalling/Marshalling.java",
"license": "apache-2.0",
"size": 3177
} | [
"java.io.Serializable"
] | import java.io.Serializable; | import java.io.*; | [
"java.io"
] | java.io; | 2,455,632 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> breakLeaseWithResponse(Duration timeout, Context context) {
return breakLeaseWithResponse(new ShareBreakLeaseOptions(), timeout, context);
}
/**
* Breaks the previously acquired lease, if it exists. Leases will break immedia... | @ServiceMethod(returns = ReturnType.SINGLE) Response<Void> function(Duration timeout, Context context) { return breakLeaseWithResponse(new ShareBreakLeaseOptions(), timeout, context); } /** * Breaks the previously acquired lease, if it exists. Leases will break immediately. * * <p><strong>Code Samples</strong></p> * * ... | /**
* Breaks the previously acquired lease, if it exists. Leases will break immediately.
*
* <p><strong>Code Samples</strong></p>
*
* <!-- src_embed com.azure.storage.file.share.specialized.ShareLeaseClient.breakLeaseWithResponse#Duration-Context -->
* <pre>
* client.breakLeaseWithRes... | Breaks the previously acquired lease, if it exists. Leases will break immediately. Code Samples <code> client.breakLeaseWithResponse(timeout, new Context(key, value)); System.out.println("The lease has been successfully broken"); </code> | breakLeaseWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/specialized/ShareLeaseClient.java",
"license": "mit",
"size": 14530
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.storage.file.share.options.ShareBreakLeaseOptions",
"java.time.Duration"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.storage.file.share.options.ShareBreakLeaseOptions; import java.time.Duration; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.storage.file.share.options.*; import java.time.*; | [
"com.azure.core",
"com.azure.storage",
"java.time"
] | com.azure.core; com.azure.storage; java.time; | 2,094,498 |
public Builder addInputs(final Path... inputs)
{
for (final Path input : inputs)
{
this.inputs.add(input);
}
return this;
} | Builder function(final Path... inputs) { for (final Path input : inputs) { this.inputs.add(input); } return this; } | /**
* Add one or more input paths to be scanned for importable artifacts
*
* @param inputs
* input paths to be scanned
* @return <code>this</code> for fluent programming
*/ | Add one or more input paths to be scanned for importable artifacts | addInputs | {
"repo_name": "hamstercommunity/openfasttrack",
"path": "api/src/main/java/org/itsallcode/openfasttrace/api/importer/ImportSettings.java",
"license": "gpl-3.0",
"size": 4599
} | [
"java.nio.file.Path"
] | import java.nio.file.Path; | import java.nio.file.*; | [
"java.nio"
] | java.nio; | 613,113 |
public MulticurveSensitivity getMulticurveSensitivities() {
return _multicurveSensitivity;
} | MulticurveSensitivity function() { return _multicurveSensitivity; } | /**
* Gets the multicurve sensitivities
* @return The multicurve sensitivities
*/ | Gets the multicurve sensitivities | getMulticurveSensitivities | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/provider/sensitivity/inflation/InflationSensitivity.java",
"license": "apache-2.0",
"size": 10231
} | [
"com.opengamma.analytics.financial.provider.sensitivity.multicurve.MulticurveSensitivity"
] | import com.opengamma.analytics.financial.provider.sensitivity.multicurve.MulticurveSensitivity; | import com.opengamma.analytics.financial.provider.sensitivity.multicurve.*; | [
"com.opengamma.analytics"
] | com.opengamma.analytics; | 2,886,558 |
public XWikiPatch setFullVersion(XWikiDocument version, XWikiContext context)
throws XWikiException
{
return setFullVersion(version.toXML(context));
} | XWikiPatch function(XWikiDocument version, XWikiContext context) throws XWikiException { return setFullVersion(version.toXML(context)); } | /**
* Store the XML export of the document as the history patch; this will be a history milestone.
*
* @param version Document version to store in the history patch.
* @param context Needed for serializing documents to xml.
* @return Self, with the patch content set to the XML export of the doc... | Store the XML export of the document as the history patch; this will be a history milestone | setFullVersion | {
"repo_name": "pbondoer/xwiki-platform",
"path": "xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/rcs/XWikiPatch.java",
"license": "lgpl-2.1",
"size": 8185
} | [
"com.xpn.xwiki.XWikiContext",
"com.xpn.xwiki.XWikiException",
"com.xpn.xwiki.doc.XWikiDocument"
] | import com.xpn.xwiki.XWikiContext; import com.xpn.xwiki.XWikiException; import com.xpn.xwiki.doc.XWikiDocument; | import com.xpn.xwiki.*; import com.xpn.xwiki.doc.*; | [
"com.xpn.xwiki"
] | com.xpn.xwiki; | 1,099,346 |
public static File makeFile(String rootFilename) {
File file = new File(MBHD_BRIT_PREFIX + File.separator + rootFilename);
if (!file.exists()) {
file = new File("." + File.separator + rootFilename);
}
return file;
} | static File function(String rootFilename) { File file = new File(MBHD_BRIT_PREFIX + File.separator + rootFilename); if (!file.exists()) { file = new File("." + File.separator + rootFilename); } return file; } | /**
* Make a file reference - a file can be referenced as, say,
* brit-mbhd/src/test/resources/redeemer1/gpg/pubring.gpg
* or
* ./src/test/resources/redeemer1/gpg/pubring.gpg
* depending on whether you are running via an IDE or in Maven
* @param rootFilename The root filename (relative to the ... | Make a file reference - a file can be referenced as, say, brit-mbhd/src/test/resources/redeemer1/gpg/pubring.gpg or ./src/test/resources/redeemer1/gpg/pubring.gpg depending on whether you are running via an IDE or in Maven | makeFile | {
"repo_name": "oscarguindzberg/multibit-hd",
"path": "mbhd-core/src/test/java/org/multibit/hd/core/crypto/PGPUtilsTest.java",
"license": "mit",
"size": 3275
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,401,689 |
void perform( String releaseId, String workingDirectory, File buildDirectory, String goals, String arguments,
boolean useReleaseProfile, ContinuumReleaseManagerListener listener )
throws ContinuumReleaseException; | void perform( String releaseId, String workingDirectory, File buildDirectory, String goals, String arguments, boolean useReleaseProfile, ContinuumReleaseManagerListener listener ) throws ContinuumReleaseException; | /**
* Perform a release based on a release descriptor received by the Maven Release Plugin.
*
* @param releaseId
* @param workingDirectory
* @param buildDirectory
* @param goals
* @param useReleaseProfile
* @param listener
* @throws ContinuumReleaseException
* @deprecat... | Perform a release based on a release descriptor received by the Maven Release Plugin | perform | {
"repo_name": "apache/continuum",
"path": "continuum-api/src/main/java/org/apache/maven/continuum/release/ContinuumReleaseManager.java",
"license": "apache-2.0",
"size": 6850
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 176,758 |
@Type(type = "com.servinglynk.hmis.warehouse.enums.IncomeandsourcesSsiEnumType")
@Basic( optional = true )
@Column
public IncomeandsourcesSsiEnum getSsi() {
return this.ssi;
} | @Type(type = STR) @Basic( optional = true ) IncomeandsourcesSsiEnum function() { return this.ssi; } | /**
* Return the value associated with the column: ssi.
* @return A IncomeandsourcesSsiEnum object (this.ssi)
*/ | Return the value associated with the column: ssi | getSsi | {
"repo_name": "servinglynk/hmis-lynk-open-source",
"path": "hmis-model-v2016/src/main/java/com/servinglynk/hmis/warehouse/model/v2016/Incomeandsources.java",
"license": "mpl-2.0",
"size": 41587
} | [
"com.servinglynk.hmis.warehouse.enums.IncomeandsourcesSsiEnum",
"javax.persistence.Basic",
"org.hibernate.annotations.Type"
] | import com.servinglynk.hmis.warehouse.enums.IncomeandsourcesSsiEnum; import javax.persistence.Basic; import org.hibernate.annotations.Type; | import com.servinglynk.hmis.warehouse.enums.*; import javax.persistence.*; import org.hibernate.annotations.*; | [
"com.servinglynk.hmis",
"javax.persistence",
"org.hibernate.annotations"
] | com.servinglynk.hmis; javax.persistence; org.hibernate.annotations; | 485,014 |
protected Set getSubclassEntityNames() {
return entityMetamodel.getSubclassEntityNames();
} | Set function() { return entityMetamodel.getSubclassEntityNames(); } | /**
* Retrieves the defined entity-names for any subclasses defined for this
* entity.
*
* @return Any subclass entity-names.
*/ | Retrieves the defined entity-names for any subclasses defined for this entity | getSubclassEntityNames | {
"repo_name": "kevin-chen-hw/LDAE",
"path": "com.huawei.soa.ldae/src/main/java/org/hibernate/tuple/entity/AbstractEntityTuplizer.java",
"license": "lgpl-2.1",
"size": 28619
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 104,901 |
public CcLibraryHelper addPrivateHeaders(Iterable<Artifact> privateHeaders) {
Iterables.addAll(this.privateHeaders, privateHeaders);
return this;
} | CcLibraryHelper function(Iterable<Artifact> privateHeaders) { Iterables.addAll(this.privateHeaders, privateHeaders); return this; } | /**
* Add the corresponding files as private header files, i.e., these files will not be compiled,
* but are not made visible as includes to dependent rules in module maps.
*/ | Add the corresponding files as private header files, i.e., these files will not be compiled, but are not made visible as includes to dependent rules in module maps | addPrivateHeaders | {
"repo_name": "dinowernli/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java",
"license": "apache-2.0",
"size": 41137
} | [
"com.google.common.collect.Iterables",
"com.google.devtools.build.lib.actions.Artifact"
] | import com.google.common.collect.Iterables; import com.google.devtools.build.lib.actions.Artifact; | import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; | [
"com.google.common",
"com.google.devtools"
] | com.google.common; com.google.devtools; | 1,678,019 |
@VisibleForTesting
public void afterCommand(CommandEnvironment env, int exitCode) {
// Remove any filters that the command might have added to the reporter.
env.getReporter().setOutputFilter(OutputFilter.OUTPUT_EVERYTHING);
notifyCommandComplete(exitCode);
for (BlazeModule module : blazeModules) {... | void function(CommandEnvironment env, int exitCode) { env.getReporter().setOutputFilter(OutputFilter.OUTPUT_EVERYTHING); notifyCommandComplete(exitCode); for (BlazeModule module : blazeModules) { module.afterCommand(); } clearEventBus(); try { Profiler.instance().stop(); MemoryProfiler.instance().stop(); } catch (IOExc... | /**
* Hook method called by the BlazeCommandDispatcher after the dispatch of each
* command.
*/ | Hook method called by the BlazeCommandDispatcher after the dispatch of each command | afterCommand | {
"repo_name": "kamalmarhubi/bazel",
"path": "src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java",
"license": "apache-2.0",
"size": 57929
} | [
"com.google.devtools.build.lib.events.Event",
"com.google.devtools.build.lib.events.OutputFilter",
"com.google.devtools.build.lib.profiler.MemoryProfiler",
"com.google.devtools.build.lib.profiler.Profiler",
"java.io.IOException",
"java.util.logging.Logger"
] | import com.google.devtools.build.lib.events.Event; import com.google.devtools.build.lib.events.OutputFilter; import com.google.devtools.build.lib.profiler.MemoryProfiler; import com.google.devtools.build.lib.profiler.Profiler; import java.io.IOException; import java.util.logging.Logger; | import com.google.devtools.build.lib.events.*; import com.google.devtools.build.lib.profiler.*; import java.io.*; import java.util.logging.*; | [
"com.google.devtools",
"java.io",
"java.util"
] | com.google.devtools; java.io; java.util; | 547,573 |
public List<FeedItem> getFeedItems(Long feedId) throws RemoteException {
return delegateLocator.getFeedItemDelegate().getByFeedId(feedId);
} | List<FeedItem> function(Long feedId) throws RemoteException { return delegateLocator.getFeedItemDelegate().getByFeedId(feedId); } | /**
* Gets the FeedItems for the ExtendedManagedCustomer's ManagedCustomer by feedId.
*
* @param feedId
* @return all the FeedItems for the ExtendedManagedCustomer's ManagedCustomer
* @throws RemoteException for communication-related exceptions
*/ | Gets the FeedItems for the ExtendedManagedCustomer's ManagedCustomer by feedId | getFeedItems | {
"repo_name": "andyj24/googleads-java-lib",
"path": "modules/adwords_axis_utility_extension/src/main/java/com/google/api/ads/adwords/axis/utility/extension/ExtendedManagedCustomer.java",
"license": "apache-2.0",
"size": 39892
} | [
"com.google.api.ads.adwords.axis.v201506.cm.FeedItem",
"java.rmi.RemoteException",
"java.util.List"
] | import com.google.api.ads.adwords.axis.v201506.cm.FeedItem; import java.rmi.RemoteException; import java.util.List; | import com.google.api.ads.adwords.axis.v201506.cm.*; import java.rmi.*; import java.util.*; | [
"com.google.api",
"java.rmi",
"java.util"
] | com.google.api; java.rmi; java.util; | 2,758,797 |
@Private
public static Path getTezConfStagingPath(Path tezSysStagingPath) {
return new Path(tezSysStagingPath, TezConstants.TEZ_PB_BINARY_CONF_NAME);
} | static Path function(Path tezSysStagingPath) { return new Path(tezSysStagingPath, TezConstants.TEZ_PB_BINARY_CONF_NAME); } | /**
* <p>
* Returns a path to store binary configuration
* </p>
*
* @param tezSysStagingPath
* TEZ system level staging directory used for Tez internals
* @return path to configuration
*/ | Returns a path to store binary configuration | getTezConfStagingPath | {
"repo_name": "ChetnaChaudhari/tez",
"path": "tez-api/src/main/java/org/apache/tez/common/TezCommonUtils.java",
"license": "apache-2.0",
"size": 20031
} | [
"org.apache.hadoop.fs.Path",
"org.apache.tez.dag.api.TezConstants"
] | import org.apache.hadoop.fs.Path; import org.apache.tez.dag.api.TezConstants; | import org.apache.hadoop.fs.*; import org.apache.tez.dag.api.*; | [
"org.apache.hadoop",
"org.apache.tez"
] | org.apache.hadoop; org.apache.tez; | 676,064 |
@Override
public void onError(WebSocket webSocket, Exception e) {
if (e.toString().indexOf("WebsocketNotConnectedException") == -1) {
com.gmt2001.Console.err.printStackTrace(e);
}
} | void function(WebSocket webSocket, Exception e) { if (e.toString().indexOf(STR) == -1) { com.gmt2001.Console.err.printStackTrace(e); } } | /**
* Override for the WebSocketServer class which is called upon an error condition.
*
* @param webSocket The WebSocket which generated the error.
* @param e The exception object.
*/ | Override for the WebSocketServer class which is called upon an error condition | onError | {
"repo_name": "ScaniaTV/PhantomBot",
"path": "source/tv/phantombot/panel/PanelSocketServer.java",
"license": "gpl-3.0",
"size": 41032
} | [
"org.java_websocket.WebSocket"
] | import org.java_websocket.WebSocket; | import org.java_websocket.*; | [
"org.java_websocket"
] | org.java_websocket; | 840,765 |
public void loadVariables() throws CcuClientException {
logger.info("Loading CCU variables");
context.getTclRegaScriptClient().iterateAllVariables(new TclIteratorCallback() { | void function() throws CcuClientException { logger.info(STR); context.getTclRegaScriptClient().iterateAllVariables(new TclIteratorCallback() { | /**
* Loads all variables from the CCU, only executed at startup.
*/ | Loads all variables from the CCU, only executed at startup | loadVariables | {
"repo_name": "gregfinley/openhab",
"path": "bundles/binding/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/communicator/CcuStateHolder.java",
"license": "epl-1.0",
"size": 7485
} | [
"org.openhab.binding.homematic.internal.communicator.client.CcuClientException",
"org.openhab.binding.homematic.internal.communicator.client.TclRegaScriptClient"
] | import org.openhab.binding.homematic.internal.communicator.client.CcuClientException; import org.openhab.binding.homematic.internal.communicator.client.TclRegaScriptClient; | import org.openhab.binding.homematic.internal.communicator.client.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 873,473 |
public void setTemporalOperands(Collection<QName> temporalOperands) {
this.temporalOperands.clear();
if (temporalOperands != null) {
this.temporalOperands.addAll(temporalOperands);
}
} | void function(Collection<QName> temporalOperands) { this.temporalOperands.clear(); if (temporalOperands != null) { this.temporalOperands.addAll(temporalOperands); } } | /**
* Set temporal operands
*
* @param temporalOperands
* temporal operands
*/ | Set temporal operands | setTemporalOperands | {
"repo_name": "ahuarte47/SOS",
"path": "core/api/src/main/java/org/n52/sos/ogc/filter/FilterCapabilities.java",
"license": "gpl-2.0",
"size": 7162
} | [
"java.util.Collection",
"javax.xml.namespace.QName"
] | import java.util.Collection; import javax.xml.namespace.QName; | import java.util.*; import javax.xml.namespace.*; | [
"java.util",
"javax.xml"
] | java.util; javax.xml; | 2,131,806 |
public Iterable<Attribute> getLookupAttributes() {
Iterable<Attribute> lookupAttributes = getOwnLookupAttributes();
EntityType extend = getExtends();
if (extend != null) {
lookupAttributes = concat(lookupAttributes, extend.getLookupAttributes());
}
return lookupAttributes;
} | Iterable<Attribute> function() { Iterable<Attribute> lookupAttributes = getOwnLookupAttributes(); EntityType extend = getExtends(); if (extend != null) { lookupAttributes = concat(lookupAttributes, extend.getLookupAttributes()); } return lookupAttributes; } | /**
* Returns attributes that must be searched in case of xref/mref search
*
* @return lookup attributes
*/ | Returns attributes that must be searched in case of xref/mref search | getLookupAttributes | {
"repo_name": "marikaris/molgenis",
"path": "molgenis-data/src/main/java/org/molgenis/data/meta/model/EntityType.java",
"license": "lgpl-3.0",
"size": 23358
} | [
"com.google.common.collect.Iterables"
] | import com.google.common.collect.Iterables; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 85,578 |
@Test void testPivot2() {
final String sql = "SELECT *\n"
+ "FROM (SELECT deptno, job, sal\n"
+ " FROM emp)\n"
+ "PIVOT (SUM(sal) AS sum_sal, COUNT(*) AS \"COUNT\"\n"
+ " FOR (job, deptno)\n"
+ " IN (('CLERK', 10),\n"
+ " ('MANAGER', 20) mgr20,\n"
... | @Test void testPivot2() { final String sql = STR + STR + STR + STRCOUNT\"\n" + STR + STR + STR + STRa10\"))\n" + STR; final String expected = STR + STR + STR + STR + STR + STR + STR + STR; sql(sql).ok(expected); } | /** More complex PIVOT case (multiple aggregates, composite FOR, multiple
* values with and without aliases). */ | More complex PIVOT case (multiple aggregates, composite FOR, multiple | testPivot2 | {
"repo_name": "jcamachor/calcite",
"path": "core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java",
"license": "apache-2.0",
"size": 391238
} | [
"org.junit.jupiter.api.Test"
] | import org.junit.jupiter.api.Test; | import org.junit.jupiter.api.*; | [
"org.junit.jupiter"
] | org.junit.jupiter; | 2,476,409 |
public SnmpV3TrapBuilder createV3Inform(String trapOid, String sysUpTime) throws SnmpTrapHelperException {
SnmpV3TrapBuilder packet = SnmpUtils.getV3InformBuilder();
addVarBinding(packet, SNMP_SYSUPTIME_OID, EventConstants.TYPE_SNMP_TIMETICKS, sysUpTime);
addVarBinding(packet, SNMP_TRAP_OI... | SnmpV3TrapBuilder function(String trapOid, String sysUpTime) throws SnmpTrapHelperException { SnmpV3TrapBuilder packet = SnmpUtils.getV3InformBuilder(); addVarBinding(packet, SNMP_SYSUPTIME_OID, EventConstants.TYPE_SNMP_TIMETICKS, sysUpTime); addVarBinding(packet, SNMP_TRAP_OID, EventConstants.TYPE_SNMP_OBJECT_IDENTIFI... | /**
* Create an SNMP V3 trap with the specified trap object ID, and sysUpTime
* value.
*
* @param trapOid
* The trap object id.
* @param sysUpTime
* The system up time.
* @return The newly-created trap.
* @exception Throws
* SnmpTrap... | Create an SNMP V3 trap with the specified trap object ID, and sysUpTime value | createV3Inform | {
"repo_name": "tdefilip/opennms",
"path": "opennms-services/src/main/java/org/opennms/netmgt/scriptd/helper/SnmpTrapHelper.java",
"license": "agpl-3.0",
"size": 49383
} | [
"org.opennms.netmgt.EventConstants",
"org.opennms.netmgt.snmp.SnmpUtils",
"org.opennms.netmgt.snmp.SnmpV3TrapBuilder"
] | import org.opennms.netmgt.EventConstants; import org.opennms.netmgt.snmp.SnmpUtils; import org.opennms.netmgt.snmp.SnmpV3TrapBuilder; | import org.opennms.netmgt.*; import org.opennms.netmgt.snmp.*; | [
"org.opennms.netmgt"
] | org.opennms.netmgt; | 1,748,553 |
private AMFMessage processMessage(HttpServlet servlet, HttpServletRequest req, HttpServletResponse rsp, AMFMessage message) {
AMFMessage responseMessage = new AMFMessage();
for (Iterator bodies = message.getBodies(); bodies.hasNext();) {
AMFBody requestBody = (AMFBody) bodies.next();... | AMFMessage function(HttpServlet servlet, HttpServletRequest req, HttpServletResponse rsp, AMFMessage message) { AMFMessage responseMessage = new AMFMessage(); for (Iterator bodies = message.getBodies(); bodies.hasNext();) { AMFBody requestBody = (AMFBody) bodies.next(); Object serviceResult = invokeBody(servlet,req, rs... | /**
* Iterates through the request message's bodies, invokes each body and
* then, builds a message to send as the results
* @param req
* @param rsp
* @param message
* @return AMFMessage
* @throws IOException
* @throws ServletException
*/ | Iterates through the request message's bodies, invokes each body and then, builds a message to send as the results | processMessage | {
"repo_name": "paulklinkenberg/Lucee4",
"path": "lucee-java/lucee-core/src/lucee/runtime/engine/AMFEngine.java",
"license": "lgpl-2.1",
"size": 5434
} | [
"java.util.Iterator",
"javax.servlet.http.HttpServlet",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.openamf.AMFBody",
"org.openamf.AMFMessage"
] | import java.util.Iterator; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.openamf.AMFBody; import org.openamf.AMFMessage; | import java.util.*; import javax.servlet.http.*; import org.openamf.*; | [
"java.util",
"javax.servlet",
"org.openamf"
] | java.util; javax.servlet; org.openamf; | 1,389,412 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<SiteInner>> suspendSinglePageAsync(
String resourceGroupName, String name, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentExc... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<SiteInner>> function( String resourceGroupName, String name, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentExcept... | /**
* Suspend an App Service Environment.
*
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the App Service Environment.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if pa... | Suspend an App Service Environment | suspendSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/AppServiceEnvironmentsClientImpl.java",
"license": "mit",
"size": 563770
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.appservice.fluent.models.SiteInner",
... | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.appservice.fluent.... | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appservice.fluent.models.*; import com.azure.resourcemanager.appservice.models.*; import java.nio.*; | [
"com.azure.core",
"com.azure.resourcemanager",
"java.nio"
] | com.azure.core; com.azure.resourcemanager; java.nio; | 2,642,998 |
public ConstraintDescriptorList getConstraintDescriptors(TableDescriptor td)
throws StandardException; | ConstraintDescriptorList function(TableDescriptor td) throws StandardException; | /**
* Load up the constraint descriptor list for this table
* descriptor and return it. If the descriptor list
* is already loaded up, it is retuned without further
* ado.
*
* @param td The table descriptor.
*
* @return The ConstraintDescriptorList for the table
*
* @exception StandardException ... | Load up the constraint descriptor list for this table descriptor and return it. If the descriptor list is already loaded up, it is retuned without further ado | getConstraintDescriptors | {
"repo_name": "kavin256/Derby",
"path": "java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java",
"license": "apache-2.0",
"size": 79425
} | [
"org.apache.derby.iapi.error.StandardException"
] | import org.apache.derby.iapi.error.StandardException; | import org.apache.derby.iapi.error.*; | [
"org.apache.derby"
] | org.apache.derby; | 2,336,087 |
public ArrayList<String> parseTags(String tags, String delimiter)
{
String[] tokens = tags.split(delimiter);
ArrayList<String> parsed = new ArrayList<String>(Arrays.asList(tokens));
return parsed;
}
| ArrayList<String> function(String tags, String delimiter) { String[] tokens = tags.split(delimiter); ArrayList<String> parsed = new ArrayList<String>(Arrays.asList(tokens)); return parsed; } | /**
* Create an ArrayList of tokens from a string of words
* @param tags the string of tokens to be parsed
* @param delimiter the character sequence between tokens
* @return A formatted ArrayList of tags
*/ | Create an ArrayList of tokens from a string of words | parseTags | {
"repo_name": "CMPUT301W14T07/Team7Project",
"path": "Team7Project/src/ca/ualberta/team7project/models/ThreadTagModel.java",
"license": "apache-2.0",
"size": 3992
} | [
"java.util.ArrayList",
"java.util.Arrays"
] | import java.util.ArrayList; import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,944,984 |
public int read() throws IOException
{
int nread = read(onebytebuffer, 0, 1);
if (nread > 0)
return onebytebuffer[0] & 0xff;
return -1;
} | int function() throws IOException { int nread = read(onebytebuffer, 0, 1); if (nread > 0) return onebytebuffer[0] & 0xff; return -1; } | /**
* Reads one byte of decompressed data.
*
* The byte is in the lower 8 bits of the int.
*/ | Reads one byte of decompressed data. The byte is in the lower 8 bits of the int | read | {
"repo_name": "penberg/classpath",
"path": "java/util/zip/InflaterInputStream.java",
"license": "gpl-2.0",
"size": 6864
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,105,210 |
@Override
public BuildInfoCollection create(BuildInfoContext context, BuildConfiguration config,
Artifact buildInfo, Artifact buildChangelist, RepositoryName repositoryName) {
return new BuildInfoCollection(
ImmutableList.<Action>of(),
ImmutableList.of(buildInfo),
ImmutableList.of(... | BuildInfoCollection function(BuildInfoContext context, BuildConfiguration config, Artifact buildInfo, Artifact buildChangelist, RepositoryName repositoryName) { return new BuildInfoCollection( ImmutableList.<Action>of(), ImmutableList.of(buildInfo), ImmutableList.of(buildInfo)); } | /**
* Returns no actions, exactly the one BuildInfo artifact, and no buildChangelist artifacts.
*/ | Returns no actions, exactly the one BuildInfo artifact, and no buildChangelist artifacts | create | {
"repo_name": "davidzchen/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBuildInfoFactory.java",
"license": "apache-2.0",
"size": 2183
} | [
"com.google.common.collect.ImmutableList",
"com.google.devtools.build.lib.actions.Action",
"com.google.devtools.build.lib.actions.Artifact",
"com.google.devtools.build.lib.analysis.buildinfo.BuildInfoCollection",
"com.google.devtools.build.lib.analysis.config.BuildConfiguration",
"com.google.devtools.buil... | import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.actions.Action; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.analysis.buildinfo.BuildInfoCollection; import com.google.devtools.build.lib.analysis.config.BuildConfiguration; import com.goo... | import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.analysis.buildinfo.*; import com.google.devtools.build.lib.analysis.config.*; import com.google.devtools.build.lib.cmdline.*; | [
"com.google.common",
"com.google.devtools"
] | com.google.common; com.google.devtools; | 909,686 |
public Location getSpawn()
{
return new Location(_spawnLoc[0], _spawnLoc[1], _spawnLoc[2]);
}
| Location function() { return new Location(_spawnLoc[0], _spawnLoc[1], _spawnLoc[2]); } | /**
* Get the clan hall's spawn
* @return
*/ | Get the clan hall's spawn | getSpawn | {
"repo_name": "oonym/l2InterludeServer",
"path": "L2J_Server/java/net/sf/l2j/gameserver/model/zone/type/L2ClanHallZone.java",
"license": "gpl-2.0",
"size": 4111
} | [
"net.sf.l2j.gameserver.model.Location"
] | import net.sf.l2j.gameserver.model.Location; | import net.sf.l2j.gameserver.model.*; | [
"net.sf.l2j"
] | net.sf.l2j; | 1,853,109 |
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
(createChildParameter
(pdlPackage.Literals.MPARAMETER_OSSP_SWITCH__CASES,
pdlFactory.eINSTANCE.createMB... | void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (pdlPackage.Literals.MPARAMETER_OSSP_SWITCH__CASES, pdlFactory.eINSTANCE.createMBooleanParamOSSPSwitchCase())); newChildDescriptors.add (cre... | /**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* @generated
*/ | This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object | collectNewChildDescriptors | {
"repo_name": "parraman/micobs",
"path": "common/es.uah.aut.srg.micobs.pdl/src/es/uah/aut/srg/micobs/pdl/provider/MBooleanParamOSSPSwitchItemProvider.java",
"license": "epl-1.0",
"size": 5901
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,570,105 |
private static void createAll() {
if (_configs != null) {
synchronized (_configs) {
_servers = new Vector();
for (int i = 0; i < _configs.size(); i++) {
try {
Server server = new Server((String) _configs.get(i));
_servers.add(server);
} catch (Exception e) {
log.warn(_confi... | static void function() { if (_configs != null) { synchronized (_configs) { _servers = new Vector(); for (int i = 0; i < _configs.size(); i++) { try { Server server = new Server((String) _configs.get(i)); _servers.add(server); } catch (Exception e) { log.warn(_configs.get(i) + STR, e); } } } } } | /**
* Creates the all.
*/ | Creates the all | createAll | {
"repo_name": "confluxtoo/finflux_automation_test",
"path": "browsermob-proxy/src/main/java/org/browsermob/proxy/jetty/jetty/win32/Service.java",
"license": "mpl-2.0",
"size": 6655
} | [
"java.util.Vector",
"org.browsermob.proxy.jetty.jetty.Server"
] | import java.util.Vector; import org.browsermob.proxy.jetty.jetty.Server; | import java.util.*; import org.browsermob.proxy.jetty.jetty.*; | [
"java.util",
"org.browsermob.proxy"
] | java.util; org.browsermob.proxy; | 1,359,411 |
@Override @DefinedBy(Api.COMPILER)
public boolean isSameFile(FileObject a, FileObject b) {
return stdFileManager.isSameFile(b, b);
} | @Override @DefinedBy(Api.COMPILER) boolean function(FileObject a, FileObject b) { return stdFileManager.isSameFile(b, b); } | /**
* Compares two file objects and return true if they represent the
* same underlying object.
*
* @param a a file object
* @param b a file object
* @return true if the given file objects represent the same
* underlying object
*
* @throws IllegalArgumentException if either ... | Compares two file objects and return true if they represent the same underlying object | isSameFile | {
"repo_name": "FauxFaux/jdk9-langtools",
"path": "src/jdk.jshell/share/classes/jdk/jshell/MemoryFileManager.java",
"license": "gpl-2.0",
"size": 26224
} | [
"com.sun.tools.javac.util.DefinedBy",
"javax.tools.FileObject"
] | import com.sun.tools.javac.util.DefinedBy; import javax.tools.FileObject; | import com.sun.tools.javac.util.*; import javax.tools.*; | [
"com.sun.tools",
"javax.tools"
] | com.sun.tools; javax.tools; | 522,939 |
@Inject
public void setContextService(ContextService contextService) {
this.contextService = contextService;
} | void function(ContextService contextService) { this.contextService = contextService; } | /**
* Injection override.
*/ | Injection override | setContextService | {
"repo_name": "forcedotcom/aura",
"path": "aura-impl/src/main/java/org/auraframework/impl/adapter/ServerErrorUtilAdapterImpl.java",
"license": "apache-2.0",
"size": 7607
} | [
"org.auraframework.service.ContextService"
] | import org.auraframework.service.ContextService; | import org.auraframework.service.*; | [
"org.auraframework.service"
] | org.auraframework.service; | 1,364,180 |
private void buildNames() {
List<String> names = CollectionUtils.newArrayList();
String nameWithoutDomain = id.getAddress().split("@")[0];
if (nameWithoutDomain != null && !nameWithoutDomain.isEmpty()) {
// Include empty names from fragment, so split with a -ve.
for (String fragment : nameWith... | void function() { List<String> names = CollectionUtils.newArrayList(); String nameWithoutDomain = id.getAddress().split("@")[0]; if (nameWithoutDomain != null && !nameWithoutDomain.isEmpty()) { for (String fragment : nameWithoutDomain.split("[._]", -1)) { if (!fragment.isEmpty()) { names.add(capitalize(fragment)); } } ... | /**
* Attempts to create the fragments of the participant's name from their
* address, for example "john.smith@example.com" into ["John", "Smith"].
*/ | Attempts to create the fragments of the participant's name from their address, for example "john.smith@example.com" into ["John", "Smith"] | buildNames | {
"repo_name": "vega113/WaveInCloud",
"path": "src/org/waveprotocol/box/server/rpc/render/account/impl/ProfileImpl.java",
"license": "apache-2.0",
"size": 3639
} | [
"java.util.List",
"org.waveprotocol.wave.model.util.CollectionUtils"
] | import java.util.List; import org.waveprotocol.wave.model.util.CollectionUtils; | import java.util.*; import org.waveprotocol.wave.model.util.*; | [
"java.util",
"org.waveprotocol.wave"
] | java.util; org.waveprotocol.wave; | 1,929,563 |
void newDataSerializer(DataSerializer ds);
}
public static class SerializerAttributesHolder {
private String className = "";
private EventID eventId = null;
private ClientProxyMembershipID proxyId = null;
private int id = 0;
SerializerAttributesHolder() {}
SerializerAttributesHolde... | void newDataSerializer(DataSerializer ds); } public static class SerializerAttributesHolder { private String className = ""; private EventID eventId = null; private ClientProxyMembershipID proxyId = null; private int id = 0; SerializerAttributesHolder() {} SerializerAttributesHolder(String name, EventID event, ClientPr... | /**
* Invoked when a new {@code DataSerializer} is {@linkplain DataSerializer#register(Class)
* registered}.
*/ | Invoked when a new DataSerializer is DataSerializer#register(Class) registered | newDataSerializer | {
"repo_name": "masaki-yamakawa/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java",
"license": "apache-2.0",
"size": 132544
} | [
"org.apache.geode.DataSerializer",
"org.apache.geode.internal.cache.EventID",
"org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID"
] | import org.apache.geode.DataSerializer; import org.apache.geode.internal.cache.EventID; import org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID; | import org.apache.geode.*; import org.apache.geode.internal.cache.*; import org.apache.geode.internal.cache.tier.sockets.*; | [
"org.apache.geode"
] | org.apache.geode; | 2,852,594 |
@GET
@Path("stats/myaccount")
@Produces("application/json")
Map<String, String> getStatisticsOnMyAccount(@HeaderParam("sessionid")
final String sessionId) throws NotConnectedRestException, PermissionRestException; | @Path(STR) @Produces(STR) Map<String, String> getStatisticsOnMyAccount(@HeaderParam(STR) final String sessionId) throws NotConnectedRestException, PermissionRestException; | /**
* returns a string containing some data regarding the user's account
*
* @param sessionId
* the session id associated to this new connection
* @return a string containing some data regarding the user's account
* @throws NotConnectedRestException
* @throws PermissionRes... | returns a string containing some data regarding the user's account | getStatisticsOnMyAccount | {
"repo_name": "tobwiens/scheduling",
"path": "rest/rest-api/src/main/java/org/ow2/proactive_grid_cloud_portal/common/SchedulerRestInterface.java",
"license": "agpl-3.0",
"size": 80291
} | [
"java.util.Map",
"javax.ws.rs.HeaderParam",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"org.ow2.proactive_grid_cloud_portal.scheduler.exception.NotConnectedRestException",
"org.ow2.proactive_grid_cloud_portal.scheduler.exception.PermissionRestException"
] | import java.util.Map; import javax.ws.rs.HeaderParam; import javax.ws.rs.Path; import javax.ws.rs.Produces; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.NotConnectedRestException; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.PermissionRestException; | import java.util.*; import javax.ws.rs.*; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.*; | [
"java.util",
"javax.ws",
"org.ow2.proactive_grid_cloud_portal"
] | java.util; javax.ws; org.ow2.proactive_grid_cloud_portal; | 443,798 |
public List<Object> nodeProperties() {
return info().properties();
} | List<Object> function() { return info().properties(); } | /**
* The values of all the properties that are important
* to this {@link Node}.
*/ | The values of all the properties that are important to this <code>Node</code> | nodeProperties | {
"repo_name": "gingerwizard/elasticsearch",
"path": "x-pack/plugin/ql/src/main/java/org/elasticsearch/xpack/ql/tree/Node.java",
"license": "apache-2.0",
"size": 13927
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,505,608 |
public void setFilteredNodes(List<DataObject> objects, List<String> names); | void function(List<DataObject> objects, List<String> names); | /**
* Sets the collection of filtered nodes.
*
* @param objects The nodes to filter.
* @param names The collection of terms to filter by.
*/ | Sets the collection of filtered nodes | setFilteredNodes | {
"repo_name": "chris-allan/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/view/DataBrowser.java",
"license": "gpl-2.0",
"size": 24081
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 950,918 |
public Scan setFamilyMap(Map<byte [], NavigableSet<byte []>> familyMap) {
this.familyMap = familyMap;
return this;
} | Scan function(Map<byte [], NavigableSet<byte []>> familyMap) { this.familyMap = familyMap; return this; } | /**
* Setting the familyMap
* @param familyMap map of family to qualifier
* @return this
*/ | Setting the familyMap | setFamilyMap | {
"repo_name": "ibmsoe/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java",
"license": "apache-2.0",
"size": 32288
} | [
"java.util.Map",
"java.util.NavigableSet"
] | import java.util.Map; import java.util.NavigableSet; | import java.util.*; | [
"java.util"
] | java.util; | 1,204,981 |
public static Set<Class<? extends AbstractSimplification>> getStartSet()
{
HashSet<Class<? extends AbstractSimplification>> set = new HashSet();
set.add( EndSimplification.class );
return set;
} | static Set<Class<? extends AbstractSimplification>> function() { HashSet<Class<? extends AbstractSimplification>> set = new HashSet(); set.add( EndSimplification.class ); return set; } | /**
* Builds a singleton start set containing this class.
*/ | Builds a singleton start set containing this class | getStartSet | {
"repo_name": "Sable/mclab-core",
"path": "languages/Natlab/src/natlab/toolkits/rewrite/simplification/EndSimplification.java",
"license": "apache-2.0",
"size": 8038
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 364,765 |
private static Image loadImage() {
System.out.println("Select the map");
final String mapName = new FileOpen("Select The Map", s_mapFolderLocation, ".gif", ".png").getPathString();
if (mapName != null) {
final Image img = Toolkit.getDefaultToolkit().createImage(mapName);
final MediaTracker tra... | static Image function() { System.out.println(STR); final String mapName = new FileOpen(STR, s_mapFolderLocation, ".gif", ".png").getPathString(); if (mapName != null) { final Image img = Toolkit.getDefaultToolkit().createImage(mapName); final MediaTracker tracker = new MediaTracker(new Panel()); tracker.addImage(img, 1... | /**
* Asks the user to select an image and then it loads it up into an Image
* object and returns it to the calling class.
*
* @return java.awt.Image img the loaded image
*/ | Asks the user to select an image and then it loads it up into an Image object and returns it to the calling class | loadImage | {
"repo_name": "simon33-2/triplea",
"path": "src/tools/image/ReliefImageBreaker.java",
"license": "gpl-2.0",
"size": 9684
} | [
"games.strategy.debug.ClientLogger",
"java.awt.Image",
"java.awt.MediaTracker",
"java.awt.Panel",
"java.awt.Toolkit"
] | import games.strategy.debug.ClientLogger; import java.awt.Image; import java.awt.MediaTracker; import java.awt.Panel; import java.awt.Toolkit; | import games.strategy.debug.*; import java.awt.*; | [
"games.strategy.debug",
"java.awt"
] | games.strategy.debug; java.awt; | 2,897,819 |
protected boolean checkUniqueAccountNumber(MaintenanceDocument maintenanceDocument) {
boolean success = true;
String accountNumber = newAccount.getAccountNumber();
if (maintenanceDocument.isNew() && // if adding a new account
// while account is not allowed to cross chart
... | boolean function(MaintenanceDocument maintenanceDocument) { boolean success = true; String accountNumber = newAccount.getAccountNumber(); if (maintenanceDocument.isNew() && !accountService.accountsCanCrossCharts() && !accountService.getAccountsForAccountNumber(accountNumber).isEmpty()) { success = false; putFieldError(... | /**
* This method checks to see if account is allowed to cross chart;
* and if not makes sure that the account number is unique in the whole system.
* This checking is only needed when adding a new account,
* since users are not allowed to change account numbers on editing.
*
* @param main... | This method checks to see if account is allowed to cross chart; and if not makes sure that the account number is unique in the whole system. This checking is only needed when adding a new account, since users are not allowed to change account numbers on editing | checkUniqueAccountNumber | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/coa/document/validation/impl/AccountRule.java",
"license": "apache-2.0",
"size": 65081
} | [
"org.kuali.kfs.sys.KFSKeyConstants",
"org.kuali.rice.kns.document.MaintenanceDocument"
] | import org.kuali.kfs.sys.KFSKeyConstants; import org.kuali.rice.kns.document.MaintenanceDocument; | import org.kuali.kfs.sys.*; import org.kuali.rice.kns.document.*; | [
"org.kuali.kfs",
"org.kuali.rice"
] | org.kuali.kfs; org.kuali.rice; | 1,818,390 |
public void setContainerPartitionHLAPI(
PartitionHLAPI elem) {
if (elem != null)
item.setContainerPartition((Partition) elem.getContainedItem());
}
// setters/remover for lists. | void function( PartitionHLAPI elem) { if (elem != null) item.setContainerPartition((Partition) elem.getContainedItem()); } | /**
* set ContainerPartition
*/ | set ContainerPartition | setContainerPartitionHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-PT-HLPNG/src/fr/lip6/move/pnml/pthlpng/booleans/hlapi/BoolHLAPI.java",
"license": "epl-1.0",
"size": 13213
} | [
"fr.lip6.move.pnml.pthlpng.partitions.Partition",
"fr.lip6.move.pnml.pthlpng.partitions.hlapi.PartitionHLAPI"
] | import fr.lip6.move.pnml.pthlpng.partitions.Partition; import fr.lip6.move.pnml.pthlpng.partitions.hlapi.PartitionHLAPI; | import fr.lip6.move.pnml.pthlpng.partitions.*; import fr.lip6.move.pnml.pthlpng.partitions.hlapi.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 522,815 |
@ApiModelProperty(value = "")
public Integer getNumberOfElements() {
return numberOfElements;
} | @ApiModelProperty(value = "") Integer function() { return numberOfElements; } | /**
* Get numberOfElements
* @return numberOfElements
**/ | Get numberOfElements | getNumberOfElements | {
"repo_name": "knetikmedia/knetikcloud-java-client",
"path": "src/main/java/com/knetikcloud/model/PageResourcestring.java",
"license": "apache-2.0",
"size": 7178
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 2,026,170 |
public void serialize(String contextFile) throws FalconException {
LOG.info("Saving context to: [{}]", contextFile);
OutputStream out = null;
Path file = new Path(contextFile);
try {
FileSystem fs =
actionJobConf == null ? HadoopClientFactory.get().cre... | void function(String contextFile) throws FalconException { LOG.info(STR, contextFile); OutputStream out = null; Path file = new Path(contextFile); try { FileSystem fs = actionJobConf == null ? HadoopClientFactory.get().createProxiedFileSystem(file.toUri()) : HadoopClientFactory.get().createProxiedFileSystem(file.toUri(... | /**
* this method is invoked from with in the workflow.
*
* @param contextFile file to serialize the workflow execution metadata
* @throws org.apache.falcon.FalconException
*/ | this method is invoked from with in the workflow | serialize | {
"repo_name": "sriksun/falcon",
"path": "common/src/main/java/org/apache/falcon/workflow/WorkflowExecutionContext.java",
"license": "apache-2.0",
"size": 18180
} | [
"java.io.IOException",
"java.io.OutputStream",
"org.apache.falcon.FalconException",
"org.apache.falcon.hadoop.HadoopClientFactory",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.json.simple.JSONValue"
] | import java.io.IOException; import java.io.OutputStream; import org.apache.falcon.FalconException; import org.apache.falcon.hadoop.HadoopClientFactory; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.json.simple.JSONValue; | import java.io.*; import org.apache.falcon.*; import org.apache.falcon.hadoop.*; import org.apache.hadoop.fs.*; import org.json.simple.*; | [
"java.io",
"org.apache.falcon",
"org.apache.hadoop",
"org.json.simple"
] | java.io; org.apache.falcon; org.apache.hadoop; org.json.simple; | 2,465,053 |
@Id
@Column(name="nodeId", nullable=false)
@SequenceGenerator(name="nodeSequence", sequenceName="nodeNxtId")
@GeneratedValue(generator="nodeSequence")
@XmlTransient
public Integer getId() {
return m_id;
} | @Column(name=STR, nullable=false) @SequenceGenerator(name=STR, sequenceName=STR) @GeneratedValue(generator=STR) Integer function() { return m_id; } | /**
* Unique identifier for node.
*
* @return a {@link java.lang.Integer} object.
*/ | Unique identifier for node | getId | {
"repo_name": "qoswork/opennmszh",
"path": "opennms-model/src/main/java/org/opennms/netmgt/model/OnmsNode.java",
"license": "gpl-2.0",
"size": 37463
} | [
"javax.persistence.Column",
"javax.persistence.GeneratedValue",
"javax.persistence.SequenceGenerator"
] | import javax.persistence.Column; import javax.persistence.GeneratedValue; import javax.persistence.SequenceGenerator; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 2,869,183 |
@Override
public Collection<? extends PortrayalCatalogueReference> getPortrayalCatalogueInfo() {
return null;
} | Collection<? extends PortrayalCatalogueReference> function() { return null; } | /**
* Undefined property.
* @return {@code null}.
*/ | Undefined property | getPortrayalCatalogueInfo | {
"repo_name": "desruisseaux/sis",
"path": "core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java",
"license": "apache-2.0",
"size": 9844
} | [
"java.util.Collection",
"org.opengis.metadata.PortrayalCatalogueReference"
] | import java.util.Collection; import org.opengis.metadata.PortrayalCatalogueReference; | import java.util.*; import org.opengis.metadata.*; | [
"java.util",
"org.opengis.metadata"
] | java.util; org.opengis.metadata; | 2,250,199 |
public String removeMeetings() {
Set<SignupMeeting> meetingsSet = new HashSet<SignupMeeting>();
try {
for (SignupMeetingWrapper mWrapper : getSignupMeetings()) {
if (mWrapper.isSelected()) {
//SIGNUP-139
//if this meeting wrapper is the first one in a set of recurring meetings
... | String function() { Set<SignupMeeting> meetingsSet = new HashSet<SignupMeeting>(); try { for (SignupMeetingWrapper mWrapper : getSignupMeetings()) { if (mWrapper.isSelected()) { if(mWrapper.isFirstOneRecurMeeting() && mWrapper.getRecurEventsSize() > 1) { SignupMeeting topLevel = mWrapper.getMeeting(); List<SignupMeetin... | /**
* This is a JSF action call method by UI to remove the selected
* events/meetings.
*
* @return an action outcome string.
*/ | This is a JSF action call method by UI to remove the selected events/meetings | removeMeetings | {
"repo_name": "noondaysun/sakai",
"path": "signup/tool/src/java/org/sakaiproject/signup/tool/jsf/SignupMeetingsBean.java",
"license": "apache-2.0",
"size": 34804
} | [
"java.util.ArrayList",
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"org.sakaiproject.signup.logic.SignupEventTypes",
"org.sakaiproject.signup.model.SignupAttachment",
"org.sakaiproject.signup.model.SignupMeeting",
"org.sakaiproject.signup.tool.util.Utilities",
"org.sakaiproject.tool.cove... | import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.sakaiproject.signup.logic.SignupEventTypes; import org.sakaiproject.signup.model.SignupAttachment; import org.sakaiproject.signup.model.SignupMeeting; import org.sakaiproject.signup.tool.util.Utilities; import ... | import java.util.*; import org.sakaiproject.signup.logic.*; import org.sakaiproject.signup.model.*; import org.sakaiproject.signup.tool.util.*; import org.sakaiproject.tool.cover.*; | [
"java.util",
"org.sakaiproject.signup",
"org.sakaiproject.tool"
] | java.util; org.sakaiproject.signup; org.sakaiproject.tool; | 827,359 |
public static Props loadPropsInDirs(List<File> dirs, String... suffixes) {
Props props = new Props();
for(File dir: dirs) {
props.putLocal(loadPropsInDir(dir, suffixes));
}
return props;
} | static Props function(List<File> dirs, String... suffixes) { Props props = new Props(); for(File dir: dirs) { props.putLocal(loadPropsInDir(dir, suffixes)); } return props; } | /**
* Load job schedules from the given directories
*
* @param dirs The directories to check for properties
* @param suffixes The suffixes to load
* @return The properties
*/ | Load job schedules from the given directories | loadPropsInDirs | {
"repo_name": "sukritmohan/qfAzkaban",
"path": "azkaban/src/java/azkaban/app/PropsUtils.java",
"license": "apache-2.0",
"size": 5387
} | [
"java.io.File",
"java.util.List"
] | import java.io.File; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 302,386 |
@Test
public void testToStringAndDate( )
{
//the follow objects represent the same date Jan 25th, 1998
//the same object use toString() and toDate() several times it won't bring any error
Date date = new GregorianCalendar( 1998, 1 - 1, 25 ).getTime( );
String str = "1/25/1998";
try
{
assertEqual... | void function( ) { Date date = new GregorianCalendar( 1998, 1 - 1, 25 ).getTime( ); String str = STR; try { assertEquals( DataTypeUtil.toDate( str ), date ); assertEquals( DataTypeUtil.toString( DataTypeUtil.toDate( str ) ), DataTypeUtil.toString( date ) ); } catch ( BirtException e ) { fail( STR ); } } | /**
* test convertion between String and Date
*/ | test convertion between String and Date | testToStringAndDate | {
"repo_name": "Charling-Huang/birt",
"path": "core/org.eclipse.birt.core.tests/test/org/eclipse/birt/core/data/DataTypeUtilTest.java",
"license": "epl-1.0",
"size": 31033
} | [
"java.util.Date",
"java.util.GregorianCalendar",
"org.eclipse.birt.core.exception.BirtException"
] | import java.util.Date; import java.util.GregorianCalendar; import org.eclipse.birt.core.exception.BirtException; | import java.util.*; import org.eclipse.birt.core.exception.*; | [
"java.util",
"org.eclipse.birt"
] | java.util; org.eclipse.birt; | 1,001,257 |
@Override
public PVWriterConfiguration<T> timeout(Duration timeout) {
super.timeout(timeout);
return this;
} | PVWriterConfiguration<T> function(Duration timeout) { super.timeout(timeout); return this; } | /**
* Sets a timeout for write operation.
* <p>
* For more details, consult {@link #timeout(org.diirt.util.time.Duration, java.lang.String) }.
*
* @param timeout
* the duration of the timeout; can't be null
* @return this expression
*/ | Sets a timeout for write operation. For more details, consult <code>#timeout(org.diirt.util.time.Duration, java.lang.String) </code> | timeout | {
"repo_name": "fqqb/yamcs-studio",
"path": "bundles/org.diirt/src/main/java/org/diirt/datasource/PVWriterConfiguration.java",
"license": "epl-1.0",
"size": 6364
} | [
"java.time.Duration"
] | import java.time.Duration; | import java.time.*; | [
"java.time"
] | java.time; | 2,151,648 |
private Appearance createPlaneteAppareance(int index) {
Appearance planeteAppareance = new Appearance();
float red = 0.0f;
float green = 0.0f;
float blue = 0.0f;
switch (index % 8) {
case 0: //red
red = 1.0f;
green = 0.0f;
... | Appearance function(int index) { Appearance planeteAppareance = new Appearance(); float red = 0.0f; float green = 0.0f; float blue = 0.0f; switch (index % 8) { case 0: red = 1.0f; green = 0.0f; blue = 0.0f; break; case 1: red = 0.0f; green = 1.0f; blue = 0.0f; break; case 3: red = 0.0f; green = 0.0f; blue = 1.0f; break... | /**
* Create a new random appearance
* (INCOMPLETE: missing texture)
* @return return a random appearance for a 3d shape
*/ | Create a new random appearance | createPlaneteAppareance | {
"repo_name": "moliva/proactive",
"path": "src/Examples/org/objectweb/proactive/examples/nbody/common/NBody3DFrame.java",
"license": "agpl-3.0",
"size": 37196
} | [
"javax.media.j3d.Appearance",
"javax.media.j3d.Material",
"javax.vecmath.Color3f"
] | import javax.media.j3d.Appearance; import javax.media.j3d.Material; import javax.vecmath.Color3f; | import javax.media.j3d.*; import javax.vecmath.*; | [
"javax.media",
"javax.vecmath"
] | javax.media; javax.vecmath; | 283,349 |
public List<ApplicationKeyMapping> loadAllKeyMappings(String tenantDomain) throws DataLoadingException;
/**
* Load all {@link API} objects owned by all Tenants.
*
* @return A list of {@link API} | List<ApplicationKeyMapping> function(String tenantDomain) throws DataLoadingException; /** * Load all {@link API} objects owned by all Tenants. * * @return A list of {@link API} | /**
* Load all Key Mappings (Mapping between the Consumer Key and Application) from the Database
* owned by all tenants
*
* @return A list of {@link ApplicationKeyMapping}s
* @throws DataLoadingException If any error
*/ | Load all Key Mappings (Mapping between the Consumer Key and Application) from the Database owned by all tenants | loadAllKeyMappings | {
"repo_name": "jaadds/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.keymgt/src/main/java/org/wso2/carbon/apimgt/keymgt/model/SubscriptionDataLoader.java",
"license": "apache-2.0",
"size": 5737
} | [
"java.util.List",
"org.wso2.carbon.apimgt.keymgt.model.entity.ApplicationKeyMapping",
"org.wso2.carbon.apimgt.keymgt.model.exception.DataLoadingException"
] | import java.util.List; import org.wso2.carbon.apimgt.keymgt.model.entity.ApplicationKeyMapping; import org.wso2.carbon.apimgt.keymgt.model.exception.DataLoadingException; | import java.util.*; import org.wso2.carbon.apimgt.keymgt.model.entity.*; import org.wso2.carbon.apimgt.keymgt.model.exception.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 881,841 |
public static Color pointFill(PointSymbolizer symbolizer) {
if (symbolizer == null) {
return null;
}
Graphic graphic = symbolizer.getGraphic();
if (graphic == null) {
return null;
}
for (GraphicalSymbol gs : graphic.graphicalSymbols()) {
... | static Color function(PointSymbolizer symbolizer) { if (symbolizer == null) { return null; } Graphic graphic = symbolizer.getGraphic(); if (graphic == null) { return null; } for (GraphicalSymbol gs : graphic.graphicalSymbols()) { if (gs != null && gs instanceof Mark) { Mark mark = (Mark) gs; Fill fill = mark.getFill();... | /**
* Retrieves the fill from the first Mark defined in a PointSymbolizer.
*
* <p>If you are using something fun like symbols you will need to do your own thing.
*
* @param symbolizer Point symbolizer information.
* @return Color of the point's fill, or null if unavailable.
*/ | Retrieves the fill from the first Mark defined in a PointSymbolizer. If you are using something fun like symbols you will need to do your own thing | pointFill | {
"repo_name": "geotools/geotools",
"path": "modules/library/main/src/main/java/org/geotools/styling/SLD.java",
"license": "lgpl-2.1",
"size": 67749
} | [
"java.awt.Color",
"org.opengis.style.GraphicalSymbol"
] | import java.awt.Color; import org.opengis.style.GraphicalSymbol; | import java.awt.*; import org.opengis.style.*; | [
"java.awt",
"org.opengis.style"
] | java.awt; org.opengis.style; | 2,664,254 |
public boolean isColliding(FlyingSaucer saucer) {
if ( isMortal() ) {
Polygon2D shipPolygon = new Polygon2D(polygon);
shipPolygon.translate(getPosition());
Polygon2D saucerPolygon = new Polygon2D(saucer.getPolygon());
saucerPolygon.translate(saucer.getPositio... | boolean function(FlyingSaucer saucer) { if ( isMortal() ) { Polygon2D shipPolygon = new Polygon2D(polygon); shipPolygon.translate(getPosition()); Polygon2D saucerPolygon = new Polygon2D(saucer.getPolygon()); saucerPolygon.translate(saucer.getPosition()); return (shipPolygon.intersects(saucerPolygon)); } else { return f... | /**
* Check if the SpaceShip is colliding with a FlyingSaucer
*
* @param missile
*
* @return True if colliding, false otherwise
*/ | Check if the SpaceShip is colliding with a FlyingSaucer | isColliding | {
"repo_name": "wjsrobertson/j2menace",
"path": "AsteroidBelt/src/com/rattat/micro/game/aster/elements/SpaceShip.java",
"license": "apache-2.0",
"size": 6379
} | [
"com.rattat.math.geometry.vectored2D.Polygon2D"
] | import com.rattat.math.geometry.vectored2D.Polygon2D; | import com.rattat.math.geometry.*; | [
"com.rattat.math"
] | com.rattat.math; | 1,559,643 |
public static int locToBlock(double loc) {
return NumberConversions.floor(loc);
} | static int function(double loc) { return NumberConversions.floor(loc); } | /**
* Safely converts a double (location coordinate) to an int (block
* coordinate)
*
* @param loc Precise coordinate
* @return Block coordinate
*/ | Safely converts a double (location coordinate) to an int (block coordinate) | locToBlock | {
"repo_name": "GlowstonePlusPlus/Glowkit",
"path": "src/main/java/org/bukkit/Location.java",
"license": "gpl-3.0",
"size": 17067
} | [
"org.bukkit.util.NumberConversions"
] | import org.bukkit.util.NumberConversions; | import org.bukkit.util.*; | [
"org.bukkit.util"
] | org.bukkit.util; | 1,242,015 |
public static void setup() throws Throwable {
HbaseTestProperties.addStandardHBaseProperties(CONF);
CONF.set(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY,
HBaseCulvertCoprocessorEndpoint.class.getName());
HBASE_TEST_UTIL.startMiniCluster(2);
HBASE_TEST_UTIL.getMiniHBaseCluster();
} | static void function() throws Throwable { HbaseTestProperties.addStandardHBaseProperties(CONF); CONF.set(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, HBaseCulvertCoprocessorEndpoint.class.getName()); HBASE_TEST_UTIL.startMiniCluster(2); HBASE_TEST_UTIL.getMiniHBaseCluster(); } | /**
* Creates a utility and adapter for the test class
*
* @throws Throwable
*/ | Creates a utility and adapter for the test class | setup | {
"repo_name": "booz-allen-hamilton/culvert",
"path": "culvert-hbase/src/test/java/com/bah/culvert/databaseadapter/HBaseDatabaseAdapterIT.java",
"license": "apache-2.0",
"size": 2492
} | [
"com.bah.culvert.tableadapters.HBaseCulvertCoprocessorEndpoint",
"com.bah.culvert.utils.HbaseTestProperties",
"org.apache.hadoop.hbase.coprocessor.CoprocessorHost"
] | import com.bah.culvert.tableadapters.HBaseCulvertCoprocessorEndpoint; import com.bah.culvert.utils.HbaseTestProperties; import org.apache.hadoop.hbase.coprocessor.CoprocessorHost; | import com.bah.culvert.tableadapters.*; import com.bah.culvert.utils.*; import org.apache.hadoop.hbase.coprocessor.*; | [
"com.bah.culvert",
"org.apache.hadoop"
] | com.bah.culvert; org.apache.hadoop; | 2,271,263 |
public static <T> Function<T, T> it() {
return Function.identity();
} | static <T> Function<T, T> function() { return Function.identity(); } | /**
* Returns a function that always returns the supplied value.
* <p>
* Use this to test the target object in a SpecDefinition:
* <p>
* <code>.expect(it(), to().be(myTest))</code>
*
* @return a function that always returns the supplied value.
* @see Function#identity()
* @since 3.0
*/ | Returns a function that always returns the supplied value. Use this to test the target object in a SpecDefinition: <code>.expect(it(), to().be(myTest))</code> | it | {
"repo_name": "devnull-tools/kodo",
"path": "src/main/java/io/backpackcloud/kodo/Expectation.java",
"license": "mit",
"size": 7370
} | [
"java.util.function.Function"
] | import java.util.function.Function; | import java.util.function.*; | [
"java.util"
] | java.util; | 1,566,702 |
@Test
public void renameRealmTest() throws Exception {
RealmRepresentation realm1 = new RealmRepresentation();
realm1.setRealm("test-immutable");
adminClient.realms().create(realm1);
realm1 = adminClient.realms().realm("test-immutable").toRepresentation();
realm1.setRealm... | void function() throws Exception { RealmRepresentation realm1 = new RealmRepresentation(); realm1.setRealm(STR); adminClient.realms().create(realm1); realm1 = adminClient.realms().realm(STR).toRepresentation(); realm1.setRealm(STR); adminClient.realms().realm(STR).update(realm1); realm1 = adminClient.realms().realm(STR... | /**
* KEYCLOAK-1990 1991
* @throws Exception
*/ | KEYCLOAK-1990 1991 | renameRealmTest | {
"repo_name": "chameleon82/keycloak",
"path": "testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/realm/RealmTest.java",
"license": "apache-2.0",
"size": 29140
} | [
"org.keycloak.representations.idm.RealmRepresentation"
] | import org.keycloak.representations.idm.RealmRepresentation; | import org.keycloak.representations.idm.*; | [
"org.keycloak.representations"
] | org.keycloak.representations; | 2,874,788 |
// ensure that the form data is stored in the session
FormData form = (FormData) session.getAttribute(FORM_ATTRIBUTE);
if (form == null)
return new ModelAndView("redirect:./");
List<RouteSummary> routeList;
routeList = routeFinder.findRoutes(form);
DisplayModel model = new DisplayModel(form, routeList);... | FormData form = (FormData) session.getAttribute(FORM_ATTRIBUTE); if (form == null) return new ModelAndView(STR); List<RouteSummary> routeList; routeList = routeFinder.findRoutes(form); DisplayModel model = new DisplayModel(form, routeList); ModelAndView mav = new ModelAndView(STR, "model", model); return mav; } | /**
* Computes route information and display the results
* @throws BadRequestException
*/ | Computes route information and display the results | display | {
"repo_name": "MassTroy/iit_ipro307",
"path": "WebApplication/src/main/java/iit/ipro307/thermal/controller/pages/DisplayController.java",
"license": "gpl-3.0",
"size": 1414
} | [
"java.util.List",
"org.springframework.web.servlet.ModelAndView"
] | import java.util.List; import org.springframework.web.servlet.ModelAndView; | import java.util.*; import org.springframework.web.servlet.*; | [
"java.util",
"org.springframework.web"
] | java.util; org.springframework.web; | 2,416,999 |
public static synchronized KeyPairGenerator getKeyPairGenerator(String algorithm)
throws NoSuchAlgorithmException, NoSuchProviderException {
register();
if (getSecurityProvider() == null)
return KeyPairGenerator.getInstance(algorithm);
else
return KeyPairG... | static synchronized KeyPairGenerator function(String algorithm) throws NoSuchAlgorithmException, NoSuchProviderException { register(); if (getSecurityProvider() == null) return KeyPairGenerator.getInstance(algorithm); else return KeyPairGenerator.getInstance(algorithm, getSecurityProvider()); } | /**
* Creates a new instance of {@link KeyPairGenerator} with the given algorithm.
*
* @param algorithm key pair generator algorithm
*
* @return new instance
*
* @throws NoSuchAlgorithmException
* @throws NoSuchProviderException
*/ | Creates a new instance of <code>KeyPairGenerator</code> with the given algorithm | getKeyPairGenerator | {
"repo_name": "ashwanthkumar/sshj",
"path": "src/main/java/net/schmizz/sshj/common/SecurityUtils.java",
"license": "apache-2.0",
"size": 10388
} | [
"java.security.KeyPairGenerator",
"java.security.NoSuchAlgorithmException",
"java.security.NoSuchProviderException"
] | import java.security.KeyPairGenerator; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; | import java.security.*; | [
"java.security"
] | java.security; | 934,127 |
public static SyncItemInfo[] mergeArray(SyncItemInfo[] i,
SyncItemInfo[] o,
SyncItemInfo[] d,
SyncItemInfo[] s,
SyncItemInfo[] t) {
... | static SyncItemInfo[] function(SyncItemInfo[] i, SyncItemInfo[] o, SyncItemInfo[] d, SyncItemInfo[] s, SyncItemInfo[] t) { SyncItemInfo[] syncItemInfo; int length = 0; int ilength = 0; int olength = 0; int dlength = 0; int slength = 0; int tlength = 0; if (i != null) { ilength = i.length; length = ilength; } if (o != n... | /**
* merge arrays
*
* @param i CrcSyncItemInfo[]
* @param o CrcSyncItemInfo[]
* @param d CrcSyncItemInfo[]
* @param s CrcSyncItemInfo[]
* @param t CrcSyncItemInfo[]
* @return CrcSyncItemInfo[]
*/ | merge arrays | mergeArray | {
"repo_name": "accesstest3/cfunambol",
"path": "modules/email/email-core/src/main/java/com/funambol/email/util/Utility.java",
"license": "agpl-3.0",
"size": 53607
} | [
"com.funambol.email.model.SyncItemInfo"
] | import com.funambol.email.model.SyncItemInfo; | import com.funambol.email.model.*; | [
"com.funambol.email"
] | com.funambol.email; | 1,496,446 |
protected void setFixedRangeAxisSpaceForSubplots(AxisSpace space) {
Iterator iterator = this.subplots.iterator();
while (iterator.hasNext()) {
XYPlot plot = (XYPlot) iterator.next();
plot.setFixedRangeAxisSpace(space, false);
}
}
| void function(AxisSpace space) { Iterator iterator = this.subplots.iterator(); while (iterator.hasNext()) { XYPlot plot = (XYPlot) iterator.next(); plot.setFixedRangeAxisSpace(space, false); } } | /**
* Sets the size (width or height, depending on the orientation of the
* plot) for the domain axis of each subplot.
*
* @param space the space.
*/ | Sets the size (width or height, depending on the orientation of the plot) for the domain axis of each subplot | setFixedRangeAxisSpaceForSubplots | {
"repo_name": "sternze/CurrentTopics_JFreeChart",
"path": "source/org/jfree/chart/plot/CombinedDomainXYPlot.java",
"license": "lgpl-2.1",
"size": 28015
} | [
"java.util.Iterator",
"org.jfree.chart.axis.AxisSpace"
] | import java.util.Iterator; import org.jfree.chart.axis.AxisSpace; | import java.util.*; import org.jfree.chart.axis.*; | [
"java.util",
"org.jfree.chart"
] | java.util; org.jfree.chart; | 101,381 |
private String authenticateToServer(Intent intent) throws IOException {
String email = intent.getStringExtra(Endpoint.EMAIL);
String password = intent.getStringExtra(Endpoint.PASSWORD);
String repeatPassword = intent.getStringExtra(Endpoint.REPEAT_PASSWORD);
String name = intent.get... | String function(Intent intent) throws IOException { String email = intent.getStringExtra(Endpoint.EMAIL); String password = intent.getStringExtra(Endpoint.PASSWORD); String repeatPassword = intent.getStringExtra(Endpoint.REPEAT_PASSWORD); String name = intent.getStringExtra(Endpoint.NAME); String url = PropertiesHelper... | /**
* Wrap the parameter into a json object and proceed a POST.
* @param intent
* @return
* @throws IOException
*/ | Wrap the parameter into a json object and proceed a POST | authenticateToServer | {
"repo_name": "heitornascimento/doe-recife",
"path": "doe-recife/app/src/main/java/br/com/doe/endpoints/RegisterEndpoint.java",
"license": "apache-2.0",
"size": 2657
} | [
"android.content.Intent",
"android.util.Log",
"br.com.doe.utils.PropertiesHelper",
"com.google.gson.Gson",
"com.google.gson.JsonElement",
"com.google.gson.JsonObject",
"java.io.IOException"
] | import android.content.Intent; import android.util.Log; import br.com.doe.utils.PropertiesHelper; import com.google.gson.Gson; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import java.io.IOException; | import android.content.*; import android.util.*; import br.com.doe.utils.*; import com.google.gson.*; import java.io.*; | [
"android.content",
"android.util",
"br.com.doe",
"com.google.gson",
"java.io"
] | android.content; android.util; br.com.doe; com.google.gson; java.io; | 1,818,023 |
@XmlElement(name = "bizLocation")
public Entry getBizLocationEntry() {
return bizLocationEntry;
} | @XmlElement(name = STR) Entry function() { return bizLocationEntry; } | /**
* Method description
*
*
* @return
*/ | Method description | getBizLocationEntry | {
"repo_name": "Fosstrak/fosstrak-webadapters",
"path": "src/main/java/org/fosstrak/webadapters/epcis/model/events/EPCISEvent.java",
"license": "gpl-3.0",
"size": 28712
} | [
"javax.xml.bind.annotation.XmlElement",
"org.fosstrak.webadapters.epcis.model.Entry"
] | import javax.xml.bind.annotation.XmlElement; import org.fosstrak.webadapters.epcis.model.Entry; | import javax.xml.bind.annotation.*; import org.fosstrak.webadapters.epcis.model.*; | [
"javax.xml",
"org.fosstrak.webadapters"
] | javax.xml; org.fosstrak.webadapters; | 1,947,303 |
private void runFailTest(int month, String tz) throws Exception {
Month oMonth = null;
try {
oMonth = new Month(month, tz);
}
catch (Exception e) { // catch the validation exception
}
// object is not instantiated on bad data value
assertNull("vali... | void function(int month, String tz) throws Exception { Month oMonth = null; try { oMonth = new Month(month, tz); } catch (Exception e) { } assertNull(STR + String.valueOf(month) + ",tz=" + tz + STR, oMonth); } | /**
* Run a failure test. values should be invalid.
*/ | Run a failure test. values should be invalid | runFailTest | {
"repo_name": "hugosato/apache-axis",
"path": "test/types/TestMonth.java",
"license": "apache-2.0",
"size": 4571
} | [
"org.apache.axis.types.Month"
] | import org.apache.axis.types.Month; | import org.apache.axis.types.*; | [
"org.apache.axis"
] | org.apache.axis; | 657,609 |
private void addResource( Resource resource ) {
SpineEntry newEntry = new SpineEntry();
newEntry.title = resource.getTitle();
newEntry.resource = resource;
newEntry.href = resource.getHref();
newEntry.size = (int) resource.getSize();
entries.add(newEntry);
}
| void function( Resource resource ) { SpineEntry newEntry = new SpineEntry(); newEntry.title = resource.getTitle(); newEntry.resource = resource; newEntry.href = resource.getHref(); newEntry.size = (int) resource.getSize(); entries.add(newEntry); } | /**
* Adds a new resource.
* @param resource
*/ | Adds a new resource | addResource | {
"repo_name": "b100w11/PageTurner",
"path": "src/net/nightwhistler/pageturner/epub/PageTurnerSpine.java",
"license": "gpl-3.0",
"size": 11729
} | [
"nl.siegmann.epublib.domain.Resource"
] | import nl.siegmann.epublib.domain.Resource; | import nl.siegmann.epublib.domain.*; | [
"nl.siegmann.epublib"
] | nl.siegmann.epublib; | 2,862,062 |
return new BlocksGroup();
}
protected final List<Block> blocks;
private BlocksGroup() {
this.blocks = new ArrayList<>();
} | return new BlocksGroup(); } protected final List<Block> blocks; private BlocksGroup() { this.blocks = new ArrayList<>(); } | /**
* Factory method.
*
* @return new empty group
*/ | Factory method | empty | {
"repo_name": "Godin/sonar",
"path": "sonar-duplications/src/main/java/org/sonar/duplications/detector/original/BlocksGroup.java",
"license": "lgpl-3.0",
"size": 6113
} | [
"java.util.ArrayList",
"java.util.List",
"org.sonar.duplications.block.Block"
] | import java.util.ArrayList; import java.util.List; import org.sonar.duplications.block.Block; | import java.util.*; import org.sonar.duplications.block.*; | [
"java.util",
"org.sonar.duplications"
] | java.util; org.sonar.duplications; | 624,194 |
private void checkFkOnUniqueKeyColumns(EntryEventImpl event,
GemFireContainer refContainer, GemFireContainer refIndex,
ForeignKeyConstraintDescriptor fkCD, int[] refColsPartColsMap,
ExecRow row, GemFireTransaction tc, final TXStateInterface tx,
final Object callbackArg) throws StandardExceptio... | void function(EntryEventImpl event, GemFireContainer refContainer, GemFireContainer refIndex, ForeignKeyConstraintDescriptor fkCD, int[] refColsPartColsMap, ExecRow row, GemFireTransaction tc, final TXStateInterface tx, final Object callbackArg) throws StandardException { boolean localIndexLookup = false; final LocalRe... | /**
* Checks constraint for given FK on unique key Constraint Descriptor.
*/ | Checks constraint for given FK on unique key Constraint Descriptor | checkFkOnUniqueKeyColumns | {
"repo_name": "gemxd/gemfirexd-oss",
"path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/engine/access/index/GfxdIndexManager.java",
"license": "apache-2.0",
"size": 201646
} | [
"com.gemstone.gemfire.internal.cache.EntryEventImpl",
"com.gemstone.gemfire.internal.cache.LocalRegion",
"com.gemstone.gemfire.internal.cache.TXStateInterface",
"com.pivotal.gemfirexd.internal.engine.GfxdConstants",
"com.pivotal.gemfirexd.internal.engine.access.GemFireTransaction",
"com.pivotal.gemfirexd.... | import com.gemstone.gemfire.internal.cache.EntryEventImpl; import com.gemstone.gemfire.internal.cache.LocalRegion; import com.gemstone.gemfire.internal.cache.TXStateInterface; import com.pivotal.gemfirexd.internal.engine.GfxdConstants; import com.pivotal.gemfirexd.internal.engine.access.GemFireTransaction; import com.p... | import com.gemstone.gemfire.internal.cache.*; import com.pivotal.gemfirexd.internal.engine.*; import com.pivotal.gemfirexd.internal.engine.access.*; import com.pivotal.gemfirexd.internal.engine.ddl.resolver.*; import com.pivotal.gemfirexd.internal.engine.distributed.*; import com.pivotal.gemfirexd.internal.engine.distr... | [
"com.gemstone.gemfire",
"com.pivotal.gemfirexd"
] | com.gemstone.gemfire; com.pivotal.gemfirexd; | 1,229,133 |
private JPanel getJPanel() {
if (jPanel == null) {
jPanel = new JPanel();
jPanel.setLayout(new BorderLayout());
jPanel.setBounds(0, 0, 363, 240);
jPanel.add(getJPanelLabels(), java.awt.BorderLayout.WEST);
jPanel.add(getJPanelTexts(), java.awt.BorderLayout.EAST);
}
return... | JPanel function() { if (jPanel == null) { jPanel = new JPanel(); jPanel.setLayout(new BorderLayout()); jPanel.setBounds(0, 0, 363, 240); jPanel.add(getJPanelLabels(), java.awt.BorderLayout.WEST); jPanel.add(getJPanelTexts(), java.awt.BorderLayout.EAST); } return jPanel; } | /**
* This method initializes jPanel
*
* @return javax.swing.JPanel
*/ | This method initializes jPanel | getJPanel | {
"repo_name": "iCarto/siga",
"path": "appgvSIG/src/com/iver/cit/gvsig/vectorialdb/ConnectionPanel.java",
"license": "gpl-3.0",
"size": 23674
} | [
"java.awt.BorderLayout",
"javax.swing.JPanel"
] | import java.awt.BorderLayout; import javax.swing.JPanel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 520,723 |
public Image getActiveImage()
{
if(imageIndex.size()==0) return null;
return imageStore.get(imageIndex.lastElement());
}
| Image function() { if(imageIndex.size()==0) return null; return imageStore.get(imageIndex.lastElement()); } | /**
* Returns the active image of this layer, or null if there is no active image at this moment
* @return the active image, or null if this layer is empty
*/ | Returns the active image of this layer, or null if there is no active image at this moment | getActiveImage | {
"repo_name": "ArticulatedSocialAgentsPlatform/AsapRealizer",
"path": "Engines/AsapPictureEngine/src/asap/picture/swing/ImageLayer.java",
"license": "lgpl-3.0",
"size": 2995
} | [
"java.awt.Image"
] | import java.awt.Image; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,308,995 |
public void setMessageTask(MessageTask messageTask) {
if (this.messageTask != null) {
this.messageTask.cancel();
}
this.messageTask = messageTask;
} | void function(MessageTask messageTask) { if (this.messageTask != null) { this.messageTask.cancel(); } this.messageTask = messageTask; } | /**
* Set the messages task responsible for telling the player to log in or register.
*
* @param messageTask The message task to set
*/ | Set the messages task responsible for telling the player to log in or register | setMessageTask | {
"repo_name": "AuthMe/AuthMeReloaded",
"path": "src/main/java/fr/xephi/authme/data/limbo/LimboPlayer.java",
"license": "gpl-3.0",
"size": 3739
} | [
"fr.xephi.authme.task.MessageTask"
] | import fr.xephi.authme.task.MessageTask; | import fr.xephi.authme.task.*; | [
"fr.xephi.authme"
] | fr.xephi.authme; | 1,949,465 |
Pair<T, T> key = new Pair<>(i,j);
if (map.containsKey(key))
return map.get(key);
key = new Pair<>(j, i); // the two nodes are exchanged
if (map.containsKey(key))
return map.get(key);
return null; // same node or insistent node
} | Pair<T, T> key = new Pair<>(i,j); if (map.containsKey(key)) return map.get(key); key = new Pair<>(j, i); if (map.containsKey(key)) return map.get(key); return null; } | /**
* Given a map with a pair of elements as key, return the unique value, in other word
* it does not matter if the pair is in [i,j] or [j,i] format.
* @param map map where to extract the element
* @param i first element of the pair
* @param j second element of the pair
* @param <T> type ... | Given a map with a pair of elements as key, return the unique value, in other word it does not matter if the pair is in [i,j] or [j,i] format | getUniqueValue | {
"repo_name": "cbonesana/AlgorithmLibrary",
"path": "Algorithms/src/main/java/ch/zeyger/algorithms/utils/PairMapUtils.java",
"license": "lgpl-2.1",
"size": 2618
} | [
"org.apache.commons.math3.util.Pair"
] | import org.apache.commons.math3.util.Pair; | import org.apache.commons.math3.util.*; | [
"org.apache.commons"
] | org.apache.commons; | 30,985 |
@Override
public void print(String v)
throws IOException {
if (_os != null) {
_os.print(v);
}
} | void function(String v) throws IOException { if (_os != null) { _os.print(v); } } | /**
* Prints a string to a file.
*/ | Prints a string to a file | print | {
"repo_name": "CleverCloud/Bianca",
"path": "bianca/src/main/java/com/clevercloud/bianca/lib/file/FileOutput.java",
"license": "gpl-2.0",
"size": 4989
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 137,991 |
public void execute(TransformerImpl transformer) throws TransformerException
{
int sourceNode = transformer.getXPathContext().getCurrentNode();
XObject var = getValue(transformer, sourceNode);
// transformer.getXPathContext().getVarStack().pushVariable(m_qname, var);
transformer.getXPathContext... | void function(TransformerImpl transformer) throws TransformerException { int sourceNode = transformer.getXPathContext().getCurrentNode(); XObject var = getValue(transformer, sourceNode); transformer.getXPathContext().getVarStack().setLocalVariable(m_index, var); } | /**
* Execute a variable declaration and push it onto the variable stack.
* @see <a href="http://www.w3.org/TR/xslt#variables">variables in XSLT Specification</a>
*
* @param transformer non-null reference to the the current transform-time state.
*
* @throws TransformerException
*/ | Execute a variable declaration and push it onto the variable stack | execute | {
"repo_name": "google/j2objc",
"path": "xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemVariable.java",
"license": "apache-2.0",
"size": 15267
} | [
"javax.xml.transform.TransformerException",
"org.apache.xalan.transformer.TransformerImpl",
"org.apache.xpath.objects.XObject"
] | import javax.xml.transform.TransformerException; import org.apache.xalan.transformer.TransformerImpl; import org.apache.xpath.objects.XObject; | import javax.xml.transform.*; import org.apache.xalan.transformer.*; import org.apache.xpath.objects.*; | [
"javax.xml",
"org.apache.xalan",
"org.apache.xpath"
] | javax.xml; org.apache.xalan; org.apache.xpath; | 2,556,787 |
public static String splitBySeparator(String str) {
String ret = str.replace(File.pathSeparator, "<br/>");
ret = ret.replace(",", "<br/>");
return ret;
} | static String function(String str) { String ret = str.replace(File.pathSeparator, "<br/>"); ret = ret.replace(",", "<br/>"); return ret; } | /**
* Split by separator
*/ | Split by separator | splitBySeparator | {
"repo_name": "papamas/DMS-KANGREG-XI-MANADO",
"path": "src/main/java/com/openkm/util/FormatUtil.java",
"license": "gpl-3.0",
"size": 10523
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,153,201 |
@Override
protected void add(TxContext ctx, ReadWriteTransaction tx, SalNode snode,
InstanceIdentifier<FlowCapableNode> path,
FlowCapableNode fcn) throws VTNException {
// Read MD-SAL node.
InstanceIdentifier<Node> npath = snode.getNodeIdentifier();
... | void function(TxContext ctx, ReadWriteTransaction tx, SalNode snode, InstanceIdentifier<FlowCapableNode> path, FlowCapableNode fcn) throws VTNException { InstanceIdentifier<Node> npath = snode.getNodeIdentifier(); LogicalDatastoreType oper = LogicalDatastoreType.OPERATIONAL; Optional<Node> opt = DataStoreUtils.read(tx,... | /**
* Add a VTN node information corresponding to the given MD-SAL node.
*
* @param ctx A {@link TxContext} instance.
* @param tx A {@link ReadWriteTransaction} instance.
* @param snode A {@link SalNode} instance which indicates the location
* of the node.
* @par... | Add a VTN node information corresponding to the given MD-SAL node | add | {
"repo_name": "opendaylight/vtn",
"path": "manager/implementation/src/main/java/org/opendaylight/vtn/manager/internal/inventory/NodeUpdateTask.java",
"license": "epl-1.0",
"size": 4443
} | [
"com.google.common.base.Optional",
"org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction",
"org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType",
"org.opendaylight.vtn.manager.VTNException",
"org.opendaylight.vtn.manager.internal.TxContext",
"org.opendaylight.vtn.manager... | import com.google.common.base.Optional; import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction; import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; import org.opendaylight.vtn.manager.VTNException; import org.opendaylight.vtn.manager.internal.TxContext; import org.openday... | import com.google.common.base.*; import org.opendaylight.controller.md.sal.binding.api.*; import org.opendaylight.controller.md.sal.common.api.data.*; import org.opendaylight.vtn.manager.*; import org.opendaylight.vtn.manager.internal.*; import org.opendaylight.vtn.manager.internal.util.*; import org.opendaylight.vtn.m... | [
"com.google.common",
"org.opendaylight.controller",
"org.opendaylight.vtn",
"org.opendaylight.yang",
"org.opendaylight.yangtools"
] | com.google.common; org.opendaylight.controller; org.opendaylight.vtn; org.opendaylight.yang; org.opendaylight.yangtools; | 1,065,505 |
public static AbstractMessage.QOSType getMQTTQOSTypeFromInteger(int qos) {
AbstractMessage.QOSType message = null;
switch (qos) {
case 0:
message = AbstractMessage.QOSType.MOST_ONE;
break;
case 1:
message = AbstractMessage.QOSTy... | static AbstractMessage.QOSType function(int qos) { AbstractMessage.QOSType message = null; switch (qos) { case 0: message = AbstractMessage.QOSType.MOST_ONE; break; case 1: message = AbstractMessage.QOSType.LEAST_ONE; break; case 2: message = AbstractMessage.QOSType.EXACTLY_ONCE; break; } return message; } | /**
* Will conver between the types of the QOS to adhere to the conversion of both andes and mqtt protocol
*
* @param qos the quality of service level the message should be published/subscribed
* @return the level which is complient by the mqtt library
*/ | Will conver between the types of the QOS to adhere to the conversion of both andes and mqtt protocol | getMQTTQOSTypeFromInteger | {
"repo_name": "Niranjan-K/andes",
"path": "modules/andes-core/broker/src/main/java/org/wso2/andes/mqtt/MQTTUtils.java",
"license": "apache-2.0",
"size": 8659
} | [
"org.dna.mqtt.moquette.proto.messages.AbstractMessage"
] | import org.dna.mqtt.moquette.proto.messages.AbstractMessage; | import org.dna.mqtt.moquette.proto.messages.*; | [
"org.dna.mqtt"
] | org.dna.mqtt; | 2,166,481 |
@Test
public void receive() {
final CodeSection codeSection = CODE_SECTION_FACTORY.getOne();
final MeasurementEventVisitor mockVisitor = mock(MeasurementEventVisitor.class);
final ParameterValueCapturedEvent event = new ParameterValueCapturedEvent(codeSection);
assertThat(() -> event.receive(null), throwsEx... | void function() { final CodeSection codeSection = CODE_SECTION_FACTORY.getOne(); final MeasurementEventVisitor mockVisitor = mock(MeasurementEventVisitor.class); final ParameterValueCapturedEvent event = new ParameterValueCapturedEvent(codeSection); assertThat(() -> event.receive(null), throwsException(NullPointerExcep... | /**
* Test method for
* {@link ParameterValueCapturedEvent#receive(MeasurementEventVisitor)} .
*/ | Test method for <code>ParameterValueCapturedEvent#receive(MeasurementEventVisitor)</code> | receive | {
"repo_name": "Beagle-PSE/Beagle",
"path": "Core/src/test/java/de/uka/ipd/sdq/beagle/core/measurement/order/ParameterValueCapturedEventTest.java",
"license": "epl-1.0",
"size": 1869
} | [
"de.uka.ipd.sdq.beagle.core.CodeSection",
"de.uka.ipd.sdq.beagle.core.testutil.ExceptionThrownMatcher",
"org.hamcrest.MatcherAssert",
"org.mockito.BDDMockito",
"org.mockito.Mockito"
] | import de.uka.ipd.sdq.beagle.core.CodeSection; import de.uka.ipd.sdq.beagle.core.testutil.ExceptionThrownMatcher; import org.hamcrest.MatcherAssert; import org.mockito.BDDMockito; import org.mockito.Mockito; | import de.uka.ipd.sdq.beagle.core.*; import de.uka.ipd.sdq.beagle.core.testutil.*; import org.hamcrest.*; import org.mockito.*; | [
"de.uka.ipd",
"org.hamcrest",
"org.mockito"
] | de.uka.ipd; org.hamcrest; org.mockito; | 82,974 |
public void setEscapedValue(String value) {
// check setInternalEscapedValue(String) if this method is changed
if (value == null) {
throw new IllegalArgumentException();
}
Scanner scanner = this.ast.scanner;
char[] source = value.toCharArray();
scanner.setSource(source);
scanner.resetTo(0, source.le... | void function(String value) { if (value == null) { throw new IllegalArgumentException(); } Scanner scanner = this.ast.scanner; char[] source = value.toCharArray(); scanner.setSource(source); scanner.resetTo(0, source.length); try { int tokenType = scanner.getNextToken(); switch(tokenType) { case TerminalTokens.TokenNam... | /**
* Sets the string value of this literal node. The value is the sequence
* of characters that would appear in the source program, including
* enclosing single quotes and embedded escapes. For example,
* <ul>
* <li><code>'a'</code> <code>setEscapedValue("\'a\'")</code></li>
* <li><code>'\n'</code> <code>s... | Sets the string value of this literal node. The value is the sequence of characters that would appear in the source program, including enclosing single quotes and embedded escapes. For example, <code>'a'</code> <code>setEscapedValue("\'a\'")</code> <code>'\n'</code> <code>setEscapedValue("\'\\n\'")</code> | setEscapedValue | {
"repo_name": "boniatillo-com/PhaserEditor",
"path": "source/thirdparty/jsdt/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/core/dom/CharacterLiteral.java",
"license": "epl-1.0",
"size": 11126
} | [
"org.eclipse.wst.jsdt.core.compiler.InvalidInputException",
"org.eclipse.wst.jsdt.internal.compiler.parser.Scanner",
"org.eclipse.wst.jsdt.internal.compiler.parser.TerminalTokens"
] | import org.eclipse.wst.jsdt.core.compiler.InvalidInputException; import org.eclipse.wst.jsdt.internal.compiler.parser.Scanner; import org.eclipse.wst.jsdt.internal.compiler.parser.TerminalTokens; | import org.eclipse.wst.jsdt.core.compiler.*; import org.eclipse.wst.jsdt.internal.compiler.parser.*; | [
"org.eclipse.wst"
] | org.eclipse.wst; | 1,570,624 |
private void updateRequestMetadata() {
// Take event level metadata, merge with top level metadata
// event level metadata takes precedence
try {
JSONObject metadata = new JSONObject();
Iterator<String> i = prefHelper_.getRequestMetadata().keys();
while (i... | void function() { try { JSONObject metadata = new JSONObject(); Iterator<String> i = prefHelper_.getRequestMetadata().keys(); while (i.hasNext()) { String k = i.next(); metadata.put(k, prefHelper_.getRequestMetadata().get(k)); } JSONObject originalMetadata = params_.optJSONObject(Defines.Jsonkey.Metadata.getKey()); if ... | /**
* Update the additional metadata provided using {@link Branch#setRequestMetadata(String, String)} to the requests.
*/ | Update the additional metadata provided using <code>Branch#setRequestMetadata(String, String)</code> to the requests | updateRequestMetadata | {
"repo_name": "BranchMetrics/Android-Deferred-Deep-Linking-SDK",
"path": "Branch-SDK/src/main/java/io/branch/referral/ServerRequest.java",
"license": "mit",
"size": 27891
} | [
"java.util.Iterator",
"org.json.JSONException",
"org.json.JSONObject"
] | import java.util.Iterator; import org.json.JSONException; import org.json.JSONObject; | import java.util.*; import org.json.*; | [
"java.util",
"org.json"
] | java.util; org.json; | 1,921,725 |
@Override
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);
if (scanResult != null) {
String deviceId = scanResult.getContents();
if (!isBlank(dev... | void function(int requestCode, int resultCode, Intent intent) { IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent); if (scanResult != null) { String deviceId = scanResult.getContents(); if (!isBlank(deviceId)) { Log.i("Main", STR + deviceId); importDeviceId(deviceId); return... | /**
* Receives value of scanned QR code and sets it as device ID.
*/ | Receives value of scanned QR code and sets it as device ID | onActivityResult | {
"repo_name": "davide-imbriaco/a-sync-browser",
"path": "app/src/main/java/it/anyplace/syncbrowser/MainActivity.java",
"license": "mpl-2.0",
"size": 59187
} | [
"android.app.Activity",
"android.content.Intent",
"android.net.Uri",
"android.util.Log",
"com.google.zxing.integration.android.IntentIntegrator",
"com.google.zxing.integration.android.IntentResult",
"java.util.Arrays"
] | import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.util.Log; import com.google.zxing.integration.android.IntentIntegrator; import com.google.zxing.integration.android.IntentResult; import java.util.Arrays; | import android.app.*; import android.content.*; import android.net.*; import android.util.*; import com.google.zxing.integration.android.*; import java.util.*; | [
"android.app",
"android.content",
"android.net",
"android.util",
"com.google.zxing",
"java.util"
] | android.app; android.content; android.net; android.util; com.google.zxing; java.util; | 2,552,493 |
public static void setHomeDirForCurrentThread(String homeDir) {
HOME_DIR_TL.set(homeDir);
}
protected ServerWebApp(String name, String homeDir, String configDir,
String logDir, String tempDir, Configuration config) {
super(name, homeDir, configDir, logDir, tempDir, config);
... | static void function(String homeDir) { HOME_DIR_TL.set(homeDir); } protected ServerWebApp(String name, String homeDir, String configDir, String logDir, String tempDir, Configuration config) { super(name, homeDir, configDir, logDir, tempDir, config); } protected ServerWebApp(String name, String homeDir, Configuration co... | /**
* Method for testing purposes.
*/ | Method for testing purposes | setHomeDirForCurrentThread | {
"repo_name": "dennishuo/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/lib/servlet/ServerWebApp.java",
"license": "apache-2.0",
"size": 8046
} | [
"org.apache.hadoop.conf.Configuration"
] | import org.apache.hadoop.conf.Configuration; | import org.apache.hadoop.conf.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,793,774 |
public void updateDatabase(String updateScript, Map<String, String> replacers, boolean abortOnError) {
StringReader reader = new StringReader(updateScript);
executeSql(reader, replacers, abortOnError);
} | void function(String updateScript, Map<String, String> replacers, boolean abortOnError) { StringReader reader = new StringReader(updateScript); executeSql(reader, replacers, abortOnError); } | /**
* Calls an update script.<p>
*
* @param updateScript the update script code
* @param replacers the replacers to use in the script code
* @param abortOnError indicates if the script is aborted if an error occurs
*/ | Calls an update script | updateDatabase | {
"repo_name": "ggiudetti/opencms-core",
"path": "src-setup/org/opencms/setup/CmsSetupDb.java",
"license": "lgpl-2.1",
"size": 27006
} | [
"java.io.StringReader",
"java.util.Map"
] | import java.io.StringReader; import java.util.Map; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,908,572 |
public TrustManager getTrustManager()
{
return trustManager;
} | TrustManager function() { return trustManager; } | /**
* Get the currently configured {@link TrustManager}.
* @return A TrustManager instance.
*/ | Get the currently configured <code>TrustManager</code> | getTrustManager | {
"repo_name": "codolutions/commons-net",
"path": "src/main/java/org/apache/commons/net/imap/IMAPSClient.java",
"license": "apache-2.0",
"size": 10590
} | [
"javax.net.ssl.TrustManager"
] | import javax.net.ssl.TrustManager; | import javax.net.ssl.*; | [
"javax.net"
] | javax.net; | 2,697,486 |
public List<GenericClass> getParameterClasses() {
if (type instanceof ParameterizedType) {
List<GenericClass> parameters = new ArrayList<GenericClass>();
for (Type parameterType : ((ParameterizedType) type).getActualTypeArguments()) {
parameters.add(new GenericClass(parameterType));
}
return parame... | List<GenericClass> function() { if (type instanceof ParameterizedType) { List<GenericClass> parameters = new ArrayList<GenericClass>(); for (Type parameterType : ((ParameterizedType) type).getActualTypeArguments()) { parameters.add(new GenericClass(parameterType)); } return parameters; } return new ArrayList<GenericCla... | /**
* Retrieve list of parameter classes
*
* @return
*/ | Retrieve list of parameter classes | getParameterClasses | {
"repo_name": "claudejin/evosuite",
"path": "client/src/main/java/org/evosuite/utils/generic/GenericClass.java",
"license": "lgpl-3.0",
"size": 54610
} | [
"java.lang.reflect.ParameterizedType",
"java.lang.reflect.Type",
"java.util.ArrayList",
"java.util.List"
] | import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 2,354,344 |
@Override
public RefactoringStatus checkInitialConditions(IProgressMonitor pm) throws CoreException {
RefactoringStatus result= new RefactoringStatus();
pm.beginTask("", 100); //$NON-NLS-1$
if (fSelectionStart < 0 || fSelectionLength == 0)
return mergeTextSelectionStatus(result);
IFile[] changedFiles= ... | RefactoringStatus function(IProgressMonitor pm) throws CoreException { RefactoringStatus result= new RefactoringStatus(); pm.beginTask("", 100); if (fSelectionStart < 0 fSelectionLength == 0) return mergeTextSelectionStatus(result); IFile[] changedFiles= ResourceUtil.getFiles(new ICompilationUnit[]{fCUnit}); result.mer... | /**
* Checks if the refactoring can be activated. Activation typically means, if a
* corresponding menu entry can be added to the UI.
*
* @param pm a progress monitor to report progress during activation checking.
* @return the refactoring status describing the result of the activation check.
* @throws Core... | Checks if the refactoring can be activated. Activation typically means, if a corresponding menu entry can be added to the UI | checkInitialConditions | {
"repo_name": "trylimits/Eclipse-Postfix-Code-Completion-Juno38",
"path": "juno38/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractMethodRefactoring.java",
"license": "epl-1.0",
"size": 49334
} | [
"org.eclipse.core.resources.IFile",
"org.eclipse.core.runtime.CoreException",
"org.eclipse.core.runtime.IProgressMonitor",
"org.eclipse.core.runtime.SubProgressMonitor",
"org.eclipse.jdt.core.ICompilationUnit",
"org.eclipse.jdt.core.dom.Modifier",
"org.eclipse.jdt.internal.corext.codemanipulation.StubUt... | import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.dom.Modifier; import org.eclipse.jdt.internal.corext.cod... | import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*; import org.eclipse.jdt.core.dom.*; import org.eclipse.jdt.internal.corext.codemanipulation.*; import org.eclipse.jdt.internal.corext.refactoring.*; import org.eclipse.jdt.internal.corext.refactoring.util.*; import org... | [
"org.eclipse.core",
"org.eclipse.jdt",
"org.eclipse.ltk"
] | org.eclipse.core; org.eclipse.jdt; org.eclipse.ltk; | 439,079 |
public void applyOptions(CommandLine in, SqoopOptions out)
throws InvalidOptionsException {
// Default implementation does nothing.
} | void function(CommandLine in, SqoopOptions out) throws InvalidOptionsException { } | /** Generate the SqoopOptions containing actual argument values from
* the extracted CommandLine arguments.
* @param in the CLI CommandLine that contain the user's set Options.
* @param out the SqoopOptions with all fields applied.
* @throws InvalidOptionsException if there's a problem.
*/ | Generate the SqoopOptions containing actual argument values from the extracted CommandLine arguments | applyOptions | {
"repo_name": "apache/sqoop",
"path": "src/java/org/apache/sqoop/tool/SqoopTool.java",
"license": "apache-2.0",
"size": 17645
} | [
"org.apache.commons.cli.CommandLine",
"org.apache.sqoop.SqoopOptions"
] | import org.apache.commons.cli.CommandLine; import org.apache.sqoop.SqoopOptions; | import org.apache.commons.cli.*; import org.apache.sqoop.*; | [
"org.apache.commons",
"org.apache.sqoop"
] | org.apache.commons; org.apache.sqoop; | 2,146,532 |
@Test(expected = IllegalArgumentException.class)
public void createSpatialReferenceSystemBadDefinition() throws ClassNotFoundException, ConformanceException, IOException, SQLException
{
final File testFile = TestUtility.getRandomFile();
try(final GeoPackage gpkg = new GeoPackage(testFile))
... | @Test(expected = IllegalArgumentException.class) void function() throws ClassNotFoundException, ConformanceException, IOException, SQLException { final File testFile = TestUtility.getRandomFile(); try(final GeoPackage gpkg = new GeoPackage(testFile)) { gpkg.core().addSpatialReferenceSystem(STR, STR, 123, null, STR); fa... | /**
* Tests if a GeoPackage throws an IllegalArgumentException when
* creating a SRS with a null parameter for definition.
*/ | Tests if a GeoPackage throws an IllegalArgumentException when creating a SRS with a null parameter for definition | createSpatialReferenceSystemBadDefinition | {
"repo_name": "GitHubRGI/swagd",
"path": "GeoPackage/src/test/java/com/rgi/geopackage/GeoPackageCoreAPITest.java",
"license": "mit",
"size": 51865
} | [
"com.rgi.geopackage.verification.ConformanceException",
"java.io.File",
"java.io.IOException",
"java.sql.SQLException",
"org.junit.Assert",
"org.junit.Test"
] | import com.rgi.geopackage.verification.ConformanceException; import java.io.File; import java.io.IOException; import java.sql.SQLException; import org.junit.Assert; import org.junit.Test; | import com.rgi.geopackage.verification.*; import java.io.*; import java.sql.*; import org.junit.*; | [
"com.rgi.geopackage",
"java.io",
"java.sql",
"org.junit"
] | com.rgi.geopackage; java.io; java.sql; org.junit; | 2,182,189 |
EAttribute getHandler_Value(); | EAttribute getHandler_Value(); | /**
* Returns the meta object for the attribute '{@link de.hub.clickwatch.model.Handler#getValue <em>Value</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Value</em>'.
* @see de.hub.clickwatch.model.Handler#getValue()
* @see #getHandl... | Returns the meta object for the attribute '<code>de.hub.clickwatch.model.Handler#getValue Value</code>'. | getHandler_Value | {
"repo_name": "markus1978/clickwatch",
"path": "core/de.hub.clickwatch.core/src/de/hub/clickwatch/model/ClickWatchModelPackage.java",
"license": "apache-2.0",
"size": 56229
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,033,513 |
void launch() throws GenieException; | void launch() throws GenieException; | /**
* Launch the job.
*
* @throws GenieException On issue
*/ | Launch the job | launch | {
"repo_name": "ZhangboFrank/genie",
"path": "genie-server/src/main/java/com/netflix/genie/server/jobmanager/JobManager.java",
"license": "apache-2.0",
"size": 1579
} | [
"com.netflix.genie.common.exceptions.GenieException"
] | import com.netflix.genie.common.exceptions.GenieException; | import com.netflix.genie.common.exceptions.*; | [
"com.netflix.genie"
] | com.netflix.genie; | 1,807,480 |
public void seedWeights(double[] minimums, double[] maximums) {
if(minimums.length != weights.length
|| maximums.length != weights.length) {
throw new ArrayIndexOutOfBoundsException("Illegal number of boundaries!");
}
final Random rand = new Random();
for(int ... | void function(double[] minimums, double[] maximums) { if(minimums.length != weights.length maximums.length != weights.length) { throw new ArrayIndexOutOfBoundsException(STR); } final Random rand = new Random(); for(int i=0; i<weights.length; i++) { weights[i].rand(rand, minimums[i], maximums[i]); } } | /**
* Seeds the weights within the given boundaries for each layer
* @param minimums Minimum values for each layer
* @param maximums Maximum values for each layer
* @throws ArrayIndexOutOfBoundsException If the number of boundaries
* does not equal the number of layers
*/ | Seeds the weights within the given boundaries for each layer | seedWeights | {
"repo_name": "sebig3000/MachineLearning",
"path": "src/neural/Network.java",
"license": "mit",
"size": 25529
} | [
"java.util.Random"
] | import java.util.Random; | import java.util.*; | [
"java.util"
] | java.util; | 2,577,103 |
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
reloadButton = new javax.swing.JButton();
itemDataAutoFiltering = new BOAutoFilter... | @SuppressWarnings(STR) void function() { java.awt.GridBagConstraints gridBagConstraints; reloadButton = new javax.swing.JButton(); itemDataAutoFiltering = new BOAutoFilteringComboBox(ItemData.class); storageLocationComboBox = new BOAutoFilteringComboBox(LOSStorageLocation.class); lotComboBox = new BOAutoFilteringComboB... | /** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. always regenerated by the Form Editor | initComponents | {
"repo_name": "Jacksson/mywms",
"path": "rich.client/los.clientsuite/LOS Inventory Browser/src/de/linogistix/inventory/report/querystockunits/gui/gui_builder/AbstractCenterPanel.java",
"license": "gpl-2.0",
"size": 7277
} | [
"de.linogistix.common.gui.component.controls.BOAutoFilteringComboBox",
"de.linogistix.los.location.model.LOSStorageLocation",
"org.mywms.model.ItemData",
"org.mywms.model.Lot"
] | import de.linogistix.common.gui.component.controls.BOAutoFilteringComboBox; import de.linogistix.los.location.model.LOSStorageLocation; import org.mywms.model.ItemData; import org.mywms.model.Lot; | import de.linogistix.common.gui.component.controls.*; import de.linogistix.los.location.model.*; import org.mywms.model.*; | [
"de.linogistix.common",
"de.linogistix.los",
"org.mywms.model"
] | de.linogistix.common; de.linogistix.los; org.mywms.model; | 1,524,685 |
@Override
public String toScript() {
StringBuilder s = new StringBuilder();
switch (Scripting.getLang()) {
case Ruby:
s.append("PolyRing.new(");
break;
case Python:
default:
s.append("PolyRing(");
}
// if (coFac instanceof RingElem) {
// s.append(coFac.t... | String function() { StringBuilder s = new StringBuilder(); switch (Scripting.getLang()) { case Ruby: s.append(STR); break; case Python: default: s.append(STR); } s.append(coFac.toScript().trim()); s.append(",\"STR\STR,PolyRing.lexSTR,PolyRing.gradSTR)"); return s.toString(); } | /**
* Get a scripting compatible string representation.
*
* @return script compatible representation for this Element.
* @see edu.jas.structure.Element#toScript()
*/ | Get a scripting compatible string representation | toScript | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/polynomials/symbolicexponent/SymbolicPolynomialRing.java",
"license": "gpl-3.0",
"size": 45623
} | [
"edu.jas.kern.Scripting"
] | import edu.jas.kern.Scripting; | import edu.jas.kern.*; | [
"edu.jas.kern"
] | edu.jas.kern; | 1,065,777 |
default void onRight(@Nonnull Consumer<? super R> rConsumer) {
onBoth(Either::nop, requireNonNull(rConsumer));
} | default void onRight(@Nonnull Consumer<? super R> rConsumer) { onBoth(Either::nop, requireNonNull(rConsumer)); } | /**
* consumes right value only
*
* @param rConsumer to accept right value
*/ | consumes right value only | onRight | {
"repo_name": "gorttar/fs_test_task",
"path": "src/main/java/data/either/Either.java",
"license": "mit",
"size": 8051
} | [
"java.util.Objects",
"java.util.function.Consumer",
"javax.annotation.Nonnull"
] | import java.util.Objects; import java.util.function.Consumer; import javax.annotation.Nonnull; | import java.util.*; import java.util.function.*; import javax.annotation.*; | [
"java.util",
"javax.annotation"
] | java.util; javax.annotation; | 1,055,306 |
private void installMetaClassCreationHandle() {
try {
final Class customMetaClassHandle = Class.forName("groovy.runtime.metaclass.CustomMetaClassCreationHandle");
final Constructor customMetaClassHandleConstructor = customMetaClassHandle.getConstructor(new Class[]{});
... | void function() { try { final Class customMetaClassHandle = Class.forName(STR); final Constructor customMetaClassHandleConstructor = customMetaClassHandle.getConstructor(new Class[]{}); this.metaClassCreationHandle = (MetaClassCreationHandle)customMetaClassHandleConstructor.newInstance(); } catch (final ClassNotFoundEx... | /**
* Looks for a class called 'groovy.runtime.metaclass.CustomMetaClassCreationHandle' and if it exists uses it as the MetaClassCreationHandle
* otherwise uses the default
*
* @see groovy.lang.MetaClassRegistry.MetaClassCreationHandle
*/ | Looks for a class called 'groovy.runtime.metaclass.CustomMetaClassCreationHandle' and if it exists uses it as the MetaClassCreationHandle otherwise uses the default | installMetaClassCreationHandle | {
"repo_name": "avafanasiev/groovy",
"path": "src/main/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java",
"license": "apache-2.0",
"size": 22853
} | [
"groovy.lang.GroovyRuntimeException",
"java.lang.reflect.Constructor"
] | import groovy.lang.GroovyRuntimeException; import java.lang.reflect.Constructor; | import groovy.lang.*; import java.lang.reflect.*; | [
"groovy.lang",
"java.lang"
] | groovy.lang; java.lang; | 1,273,908 |
public boolean isText (Object object)
{
if (object instanceof Node) {
switch (((Node)object).getNodeType()) {
case Node.TEXT_NODE:
case Node.CDATA_SECTION_NODE:
return true;
default:
return false;
... | boolean function (Object object) { if (object instanceof Node) { switch (((Node)object).getNodeType()) { case Node.TEXT_NODE: case Node.CDATA_SECTION_NODE: return true; default: return false; } } else { return false; } } | /**
* Test if a node is plain text.
*
* @param object the target node
* @return true if the node is a text node, false otherwise
*/ | Test if a node is plain text | isText | {
"repo_name": "srnsw/xena",
"path": "xena/src/org/jaxen/dom/DocumentNavigator.java",
"license": "gpl-3.0",
"size": 34182
} | [
"org.w3c.dom.Node"
] | import org.w3c.dom.Node; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 748,832 |
public static void applySneakingRotation() {
GlStateManager.translate(0F, 0.2F, 0F);
GlStateManager.rotate(90F / (float) Math.PI, 1.0F, 0.0F, 0.0F);
} | static void function() { GlStateManager.translate(0F, 0.2F, 0F); GlStateManager.rotate(90F / (float) Math.PI, 1.0F, 0.0F, 0.0F); } | /**
* Rotates the render for a bauble correctly for a sneaking player.
* Use for renders under {@link RenderType#BODY}.
*/ | Rotates the render for a bauble correctly for a sneaking player. Use for renders under <code>RenderType#BODY</code> | applySneakingRotation | {
"repo_name": "rolandoislas/PeripheralsPlusPlus",
"path": "src/api/java/vazkii/botania/api/item/IBaubleRender.java",
"license": "gpl-2.0",
"size": 3800
} | [
"net.minecraft.client.renderer.GlStateManager"
] | import net.minecraft.client.renderer.GlStateManager; | import net.minecraft.client.renderer.*; | [
"net.minecraft.client"
] | net.minecraft.client; | 978,697 |
@Override
public OperationResponse registerResource(String resourceName) throws IOException, ServiceException {
// Validate
if (resourceName == null) {
throw new NullPointerException("resourceName");
}
// Tracing
boolean shouldTrace = CloudTracing.get... | OperationResponse function(String resourceName) throws IOException, ServiceException { if (resourceName == null) { throw new NullPointerException(STR); } boolean shouldTrace = CloudTracing.getIsEnabled(); String invocationId = null; if (shouldTrace) { invocationId = Long.toString(CloudTracing.getNextInvocationId()); Ha... | /**
* Register a resource with your subscription.
*
* @param resourceName Required. Name of the resource to register.
* @throws IOException Signals that an I/O exception of some sort has
* occurred. This class is the general class of exceptions produced by
* failed or interrupted I/O operations.... | Register a resource with your subscription | registerResource | {
"repo_name": "southworkscom/azure-sdk-for-java",
"path": "service-management/azure-svc-mgmt/src/main/java/com/microsoft/windowsazure/management/SubscriptionOperationsImpl.java",
"license": "apache-2.0",
"size": 45087
} | [
"com.microsoft.windowsazure.core.OperationResponse",
"com.microsoft.windowsazure.exception.ServiceException",
"com.microsoft.windowsazure.tracing.CloudTracing",
"java.io.IOException",
"java.util.HashMap"
] | import com.microsoft.windowsazure.core.OperationResponse; import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.util.HashMap; | import com.microsoft.windowsazure.core.*; import com.microsoft.windowsazure.exception.*; import com.microsoft.windowsazure.tracing.*; import java.io.*; import java.util.*; | [
"com.microsoft.windowsazure",
"java.io",
"java.util"
] | com.microsoft.windowsazure; java.io; java.util; | 35,663 |
public GridWrapper getChildWrapper(Widget child) {
if (getChildren().contains(child)) {
return widgetGridWrappers.get(child);
}
return null;
}
| GridWrapper function(Widget child) { if (getChildren().contains(child)) { return widgetGridWrappers.get(child); } return null; } | /**
* Get the wrapper for a widget
*
* @param child
* The child to get the wrapper for
* @return
*/ | Get the wrapper for a widget | getChildWrapper | {
"repo_name": "tilioteo/vmaps",
"path": "src/main/java/org/vaadin/maps/client/ui/VGridLayout.java",
"license": "apache-2.0",
"size": 8793
} | [
"com.google.gwt.user.client.ui.Widget"
] | import com.google.gwt.user.client.ui.Widget; | import com.google.gwt.user.client.ui.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,019,731 |
@OnClassLoadEvent(classNameRegexp = "org.jboss.as.weld.deployment.BeanDeploymentArchiveImpl")
public static void transformJbossBda(CtClass clazz, ClassPool classPool) throws NotFoundException, CannotCompileException {
StringBuilder src = new StringBuilder("{");
src.append("if (beanArchiveType!=... | @OnClassLoadEvent(classNameRegexp = STR) static void function(CtClass clazz, ClassPool classPool) throws NotFoundException, CannotCompileException { StringBuilder src = new StringBuilder("{"); src.append(STREXPLICIT\STR); src.append(STRMETA-INF/beans.xml\";"); src.append(STR); src.append(STR); src.append(PluginManagerI... | /**
* Jboss BeanDeploymentArchiveImpl transformation.
*
* @param clazz
* @param classPool
* @throws NotFoundException
* @throws CannotCompileException
*/ | Jboss BeanDeploymentArchiveImpl transformation | transformJbossBda | {
"repo_name": "knoppixmeister/HotswapAgent",
"path": "plugin/hotswap-agent-weld-plugin/src/main/java/org/hotswap/agent/plugin/weld/WeldPlugin.java",
"license": "gpl-2.0",
"size": 10558
} | [
"org.hotswap.agent.annotation.OnClassLoadEvent",
"org.hotswap.agent.javassist.CannotCompileException",
"org.hotswap.agent.javassist.ClassPool",
"org.hotswap.agent.javassist.CtClass",
"org.hotswap.agent.javassist.CtConstructor",
"org.hotswap.agent.javassist.NotFoundException",
"org.hotswap.agent.util.Plu... | import org.hotswap.agent.annotation.OnClassLoadEvent; import org.hotswap.agent.javassist.CannotCompileException; import org.hotswap.agent.javassist.ClassPool; import org.hotswap.agent.javassist.CtClass; import org.hotswap.agent.javassist.CtConstructor; import org.hotswap.agent.javassist.NotFoundException; import org.ho... | import org.hotswap.agent.annotation.*; import org.hotswap.agent.javassist.*; import org.hotswap.agent.util.*; | [
"org.hotswap.agent"
] | org.hotswap.agent; | 416,529 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.