method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public Map<String, Map<String, String>> getPropertyAttributes() {
return propertyAttributes;
} | Map<String, Map<String, String>> function() { return propertyAttributes; } | /**
* Get property attributes.
*
* @return map of property attributes
*/ | Get property attributes | getPropertyAttributes | {
"repo_name": "zouzhberk/ambaridemo",
"path": "demo-server/src/main/java/org/apache/ambari/server/controller/internal/ExportBlueprintRequest.java",
"license": "apache-2.0",
"size": 17880
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 947,246 |
protected void toggleQuickMode( boolean quickMode ) {
XulDeck deck = getModeDeck();
deck.setSelectedIndex( quickMode ? 0 : 1 );
// Swap the label on the button
setModeToggleLabel( BaseMessages
.getString( AbstractSqoopJobEntry.class, MODE_I18N_STRINGS[deck.getSelectedIndex()] ) );
// We ... | void function( boolean quickMode ) { XulDeck deck = getModeDeck(); deck.setSelectedIndex( quickMode ? 0 : 1 ); setModeToggleLabel( BaseMessages .getString( AbstractSqoopJobEntry.class, MODE_I18N_STRINGS[deck.getSelectedIndex()] ) ); JobEntryMode oldMode = deck.getSelectedIndex() == 0 ? selectedAdvancedButton.getMode() ... | /**
* Toggles between Quick Setup and Advanced Options mode. This assumes there exists a deck by id
* {@link #getModeDeckElementId()} and it contains two panels.
*
* @param quickMode
* Should quick mode be visible/selected?
*/ | Toggles between Quick Setup and Advanced Options mode. This assumes there exists a deck by id <code>#getModeDeckElementId()</code> and it contains two panels | toggleQuickMode | {
"repo_name": "CapeSepias/big-data-plugin",
"path": "legacy/src/main/java/org/pentaho/di/ui/job/entries/sqoop/AbstractSqoopJobEntryController.java",
"license": "apache-2.0",
"size": 38371
} | [
"org.pentaho.di.i18n.BaseMessages",
"org.pentaho.di.job.JobEntryMode",
"org.pentaho.di.job.entries.sqoop.AbstractSqoopJobEntry",
"org.pentaho.ui.xul.containers.XulDeck"
] | import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.job.JobEntryMode; import org.pentaho.di.job.entries.sqoop.AbstractSqoopJobEntry; import org.pentaho.ui.xul.containers.XulDeck; | import org.pentaho.di.i18n.*; import org.pentaho.di.job.*; import org.pentaho.di.job.entries.sqoop.*; import org.pentaho.ui.xul.containers.*; | [
"org.pentaho.di",
"org.pentaho.ui"
] | org.pentaho.di; org.pentaho.ui; | 481,043 |
public static void center(JFrame frame) {
Dimension frameSize = frame.getSize();
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
frame.setLocation((screenSize.width - frameSize.width) >> 1, (screenSize.height - frameSize.height) >> 1);
}
| static void function(JFrame frame) { Dimension frameSize = frame.getSize(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); frame.setLocation((screenSize.width - frameSize.width) >> 1, (screenSize.height - frameSize.height) >> 1); } | /**
* Center JFrame.
*/ | Center JFrame | center | {
"repo_name": "wsldl123292/jodd",
"path": "jodd-swingspy/src/main/java/jodd/swingspy/SwingUtil.java",
"license": "bsd-3-clause",
"size": 2390
} | [
"java.awt.Dimension",
"java.awt.Toolkit",
"javax.swing.JFrame"
] | import java.awt.Dimension; import java.awt.Toolkit; import javax.swing.JFrame; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,730,366 |
public ValidatedInfo validateWithInfo(String content, ValidationContext context, ValidatedInfo validatedInfo) throws InvalidDatatypeValueException {
if (context == null)
context = fEmptyContext;
if (validatedInfo == null)
validatedInfo = new ValidatedInfo();
else
... | ValidatedInfo function(String content, ValidationContext context, ValidatedInfo validatedInfo) throws InvalidDatatypeValueException { if (context == null) context = fEmptyContext; if (validatedInfo == null) validatedInfo = new ValidatedInfo(); else validatedInfo.memberType = null; boolean needNormalize = context==null ... | /**
* validate a value, and return the compiled form
*/ | validate a value, and return the compiled form | validateWithInfo | {
"repo_name": "shun634501730/java_source_cn",
"path": "src_en/com/sun/org/apache/xerces/internal/impl/dv/xs/XSSimpleTypeDecl.java",
"license": "apache-2.0",
"size": 141442
} | [
"com.sun.org.apache.xerces.internal.impl.dv.InvalidDatatypeValueException",
"com.sun.org.apache.xerces.internal.impl.dv.ValidatedInfo",
"com.sun.org.apache.xerces.internal.impl.dv.ValidationContext"
] | import com.sun.org.apache.xerces.internal.impl.dv.InvalidDatatypeValueException; import com.sun.org.apache.xerces.internal.impl.dv.ValidatedInfo; import com.sun.org.apache.xerces.internal.impl.dv.ValidationContext; | import com.sun.org.apache.xerces.internal.impl.dv.*; | [
"com.sun.org"
] | com.sun.org; | 17,930 |
@Test
public void testExpandRangeByTicksInterval() {
TimeZone zone = TimeZone.getTimeZone("UTC");
Locale locale = Locale.US;
TAIMicrosCalendar start = new TAIMicrosCalendar(zone, locale);
TAIMicrosCalendar end = new TAIMicrosCalendar(zone, locale);
start.set(1975, 4, 19, ... | void function() { TimeZone zone = TimeZone.getTimeZone("UTC"); Locale locale = Locale.US; TAIMicrosCalendar start = new TAIMicrosCalendar(zone, locale); TAIMicrosCalendar end = new TAIMicrosCalendar(zone, locale); start.set(1975, 4, 19, 7, 30, 0); start.set(Calendar.MILLISECOND, 0); end.set(1975, 4, 19, 7, 30, 1); end.... | /**
* expand range to major date ticks
*/ | expand range to major date ticks | testExpandRangeByTicksInterval | {
"repo_name": "jplot2d/jplot2d",
"path": "jplot2d-core/src/test/java/org/jplot2d/axtick/TAIMicrosTickCalculatorTest.java",
"license": "lgpl-3.0",
"size": 20232
} | [
"java.util.Calendar",
"java.util.Locale",
"java.util.TimeZone",
"org.jplot2d.util.TestUtils"
] | import java.util.Calendar; import java.util.Locale; import java.util.TimeZone; import org.jplot2d.util.TestUtils; | import java.util.*; import org.jplot2d.util.*; | [
"java.util",
"org.jplot2d.util"
] | java.util; org.jplot2d.util; | 2,361,548 |
@POST
@Consumes(MediaType.APPLICATION_JSON)
public void addClientScopeMapping(List<RoleRepresentation> roles) {
auth.requireManage();
if (scopeContainer == null) {
throw new NotFoundException("Could not find client");
}
for (RoleRepresentation role : roles) {
... | @Consumes(MediaType.APPLICATION_JSON) void function(List<RoleRepresentation> roles) { auth.requireManage(); if (scopeContainer == null) { throw new NotFoundException(STR); } for (RoleRepresentation role : roles) { RoleModel roleModel = scopedClient.getRole(role.getName()); if (roleModel == null) { throw new NotFoundExc... | /**
* Add client-level roles to the client's scope
*
* @param roles
*/ | Add client-level roles to the client's scope | addClientScopeMapping | {
"repo_name": "ewjmulder/keycloak",
"path": "services/src/main/java/org/keycloak/services/resources/admin/ScopeMappedClientResource.java",
"license": "apache-2.0",
"size": 6460
} | [
"java.util.List",
"javax.ws.rs.Consumes",
"javax.ws.rs.core.MediaType",
"org.jboss.resteasy.spi.NotFoundException",
"org.keycloak.events.admin.OperationType",
"org.keycloak.models.RoleModel",
"org.keycloak.representations.idm.RoleRepresentation"
] | import java.util.List; import javax.ws.rs.Consumes; import javax.ws.rs.core.MediaType; import org.jboss.resteasy.spi.NotFoundException; import org.keycloak.events.admin.OperationType; import org.keycloak.models.RoleModel; import org.keycloak.representations.idm.RoleRepresentation; | import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.jboss.resteasy.spi.*; import org.keycloak.events.admin.*; import org.keycloak.models.*; import org.keycloak.representations.idm.*; | [
"java.util",
"javax.ws",
"org.jboss.resteasy",
"org.keycloak.events",
"org.keycloak.models",
"org.keycloak.representations"
] | java.util; javax.ws; org.jboss.resteasy; org.keycloak.events; org.keycloak.models; org.keycloak.representations; | 27,608 |
public boolean isDeleted(final KeyValue kv, final NavigableSet<KeyValue> ds) {
if (deletes == null || deletes.isEmpty()) return false;
for (KeyValue d: ds) {
long kvts = kv.getTimestamp();
long dts = d.getTimestamp();
if (d.isDeleteFamily()) {
if (kvts <= dts) return true;
co... | boolean function(final KeyValue kv, final NavigableSet<KeyValue> ds) { if (deletes == null deletes.isEmpty()) return false; for (KeyValue d: ds) { long kvts = kv.getTimestamp(); long dts = d.getTimestamp(); if (d.isDeleteFamily()) { if (kvts <= dts) return true; continue; } int ret = Bytes.compareTo(kv.getBuffer(), kv.... | /**
* Check if the specified KeyValue buffer has been deleted by a previously
* seen delete.
* @param kv
* @param ds
* @return True is the specified KeyValue is deleted, false if not
*/ | Check if the specified KeyValue buffer has been deleted by a previously seen delete | isDeleted | {
"repo_name": "throughsky/lywebank",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/GetClosestRowBeforeTracker.java",
"license": "apache-2.0",
"size": 7835
} | [
"java.util.NavigableSet",
"org.apache.hadoop.hbase.KeyValue",
"org.apache.hadoop.hbase.util.Bytes"
] | import java.util.NavigableSet; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.util.Bytes; | import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 333,394 |
public static boolean isJarResource(final Resource resource) {
try {
return "jar".equals(resource.getURI().getScheme());
} catch (final IOException e) {
LOGGER.trace(e.getMessage(), e);
}
return false;
} | static boolean function(final Resource resource) { try { return "jar".equals(resource.getURI().getScheme()); } catch (final IOException e) { LOGGER.trace(e.getMessage(), e); } return false; } | /**
* Is jar resource ?.
*
* @param resource the resource
* @return true/false
*/ | Is jar resource ? | isJarResource | {
"repo_name": "fogbeam/cas_mirror",
"path": "core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/ResourceUtils.java",
"license": "apache-2.0",
"size": 10899
} | [
"java.io.IOException",
"org.springframework.core.io.Resource"
] | import java.io.IOException; import org.springframework.core.io.Resource; | import java.io.*; import org.springframework.core.io.*; | [
"java.io",
"org.springframework.core"
] | java.io; org.springframework.core; | 1,199,253 |
private void fixUserManagerMemoryLeak() {
try {
// invoke UserManager.get() via reflection
final Method m = UserManager.class.getMethod("get", Context.class);
m.setAccessible(true);
m.invoke(null, this);
} catch (final Throwable e) {
if (Bu... | void function() { try { final Method m = UserManager.class.getMethod("get", Context.class); m.setAccessible(true); m.invoke(null, this); } catch (final Throwable e) { if (BuildConfig.DEBUG) { throw new IllegalStateException(STR, e); } } } | /**
* https://code.google.com/p/android/issues/detail?id=173789
* introduced with JELLY_BEAN_MR2 / fixed in October 2016
*/ | HREF introduced with JELLY_BEAN_MR2 / fixed in October 2016 | fixUserManagerMemoryLeak | {
"repo_name": "S-Bartfast/cgeo",
"path": "main/src/cgeo/geocaching/CgeoApplication.java",
"license": "apache-2.0",
"size": 3557
} | [
"android.content.Context",
"android.os.UserManager",
"java.lang.reflect.Method"
] | import android.content.Context; import android.os.UserManager; import java.lang.reflect.Method; | import android.content.*; import android.os.*; import java.lang.reflect.*; | [
"android.content",
"android.os",
"java.lang"
] | android.content; android.os; java.lang; | 1,213,158 |
public void setFocus(Class<? extends JPanel> key) {
if(null == this.managedPane) {
throw new IllegalStateException("The managed pane is not registered.");
}
DesktopItem di = this.keyItems.get(key);
if(null == di) {
this.createItem(key);
} else {
this.managedPane.setSelectedIndex(this.managedPane.i... | void function(Class<? extends JPanel> key) { if(null == this.managedPane) { throw new IllegalStateException(STR); } DesktopItem di = this.keyItems.get(key); if(null == di) { this.createItem(key); } else { this.managedPane.setSelectedIndex(this.managedPane.indexOfComponent(di.getContent())); } } | /**
* Sets the focus on the tab identified by the given key. If it does not exist,
* it is created.
*
* @param key Unique tab key.
*/ | Sets the focus on the tab identified by the given key. If it does not exist, it is created | setFocus | {
"repo_name": "zyxist/opentrans",
"path": "opentrans-lightweight/src/main/java/org/invenzzia/opentrans/lightweight/ui/workspace/DesktopManager.java",
"license": "gpl-3.0",
"size": 6936
} | [
"javax.swing.JPanel"
] | import javax.swing.JPanel; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,527,422 |
public boolean filter(NodeRef nodeRef)
{
return objectFilter.filter(nodeRef);
}
| boolean function(NodeRef nodeRef) { return objectFilter.filter(nodeRef); } | /**
* Should the node be filtered?
*/ | Should the node be filtered | filter | {
"repo_name": "loftuxab/alfresco-community-loftux",
"path": "projects/repository/source/java/org/alfresco/opencmis/CMISConnector.java",
"license": "lgpl-3.0",
"size": 153672
} | [
"org.alfresco.service.cmr.repository.NodeRef"
] | import org.alfresco.service.cmr.repository.NodeRef; | import org.alfresco.service.cmr.repository.*; | [
"org.alfresco.service"
] | org.alfresco.service; | 599,246 |
public void writeXML(XMLOutput xmlOutput) throws IOException; | void function(XMLOutput xmlOutput) throws IOException; | /**
* Write this object to given XMLOutput.
*
* @param xmlOutput
* the XMLOutput for the document
*/ | Write this object to given XMLOutput | writeXML | {
"repo_name": "spotbugs/spotbugs",
"path": "spotbugs/src/main/java/edu/umd/cs/findbugs/xml/XMLWriteable.java",
"license": "lgpl-2.1",
"size": 1270
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,677,605 |
@Path("/{containerName}/{nodeType}/{nodeId}/{name}")
@GET
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@TypeHint(FlowConfig.class)
@StatusCodes({
@ResponseCode(code = 200, condition = "Operation successful"),
@ResponseCode(code = 404, condition = "The ... | @Path(STR) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @TypeHint(FlowConfig.class) @StatusCodes({ @ResponseCode(code = 200, condition = STR), @ResponseCode(code = 404, condition = STR), @ResponseCode(code = 503, condition = STR) }) FlowConfig function( @PathParam(STR) String containerName, @Pat... | /**
* Returns the flow configuration matching a human-readable name and nodeId
* on a given Container.
*
* @param containerName
* Name of the Container. The Container name for the base
* controller is "default".
* @param nodeType
* Type of the nod... | Returns the flow configuration matching a human-readable name and nodeId on a given Container | getStaticFlow | {
"repo_name": "lbchen/odl-mod",
"path": "opendaylight/northbound/flowprogrammer/src/main/java/org/opendaylight/controller/flowprogrammer/northbound/FlowProgrammerNorthbound.java",
"license": "epl-1.0",
"size": 20377
} | [
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"org.codehaus.enunciate.jaxrs.ResponseCode",
"org.codehaus.enunciate.jaxrs.StatusCodes",
"org.codehaus.enunciate.jaxrs.TypeHint",
"org.opendaylight.controller.forwardingrulesmanager.FlowConfig",
"org.o... | import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.codehaus.enunciate.jaxrs.ResponseCode; import org.codehaus.enunciate.jaxrs.StatusCodes; import org.codehaus.enunciate.jaxrs.TypeHint; import org.opendaylight.controller.forwardingrulesmanage... | import javax.ws.rs.*; import javax.ws.rs.core.*; import org.codehaus.enunciate.jaxrs.*; import org.opendaylight.controller.forwardingrulesmanager.*; import org.opendaylight.controller.northbound.commons.*; import org.opendaylight.controller.northbound.commons.exception.*; import org.opendaylight.controller.northbound.c... | [
"javax.ws",
"org.codehaus.enunciate",
"org.opendaylight.controller"
] | javax.ws; org.codehaus.enunciate; org.opendaylight.controller; | 1,798,647 |
@Override
public void serviceResolved(ServiceEvent event) {
synchronized (this) {
_infos.put(event.getName(), event.getInfo());
_events.remove(event.getName());
}
} | void function(ServiceEvent event) { synchronized (this) { _infos.put(event.getName(), event.getInfo()); _events.remove(event.getName()); } } | /**
* A service has been resolved. Its details are now available in the ServiceInfo record.
*
* @param event
* service event
*/ | A service has been resolved. Its details are now available in the ServiceInfo record | serviceResolved | {
"repo_name": "josephw/jmdns",
"path": "src/main/java/javax/jmdns/impl/JmDNSImpl.java",
"license": "apache-2.0",
"size": 79938
} | [
"javax.jmdns.ServiceEvent"
] | import javax.jmdns.ServiceEvent; | import javax.jmdns.*; | [
"javax.jmdns"
] | javax.jmdns; | 2,197,881 |
void sendNotification(URL resetUrl, ILocalAccountPerson account, Locale locale); | void sendNotification(URL resetUrl, ILocalAccountPerson account, Locale locale); | /**
* Notify the user of the password reset request.
*
* @param resetUrl URL to use to reset the users password
* @param account The account associated with the URL
* @param locale the locale of the user making the reset request
*/ | Notify the user of the password reset request | sendNotification | {
"repo_name": "apetro/uPortal",
"path": "uportal-war/src/main/java/org/apereo/portal/portlets/account/IPasswordResetNotification.java",
"license": "apache-2.0",
"size": 1578
} | [
"java.util.Locale",
"org.apereo.portal.persondir.ILocalAccountPerson"
] | import java.util.Locale; import org.apereo.portal.persondir.ILocalAccountPerson; | import java.util.*; import org.apereo.portal.persondir.*; | [
"java.util",
"org.apereo.portal"
] | java.util; org.apereo.portal; | 712,229 |
public static final JobEntryCopy createDummyEntry() {
JobEntrySpecial jobEntrySpecial = new JobEntrySpecial( STRING_SPECIAL_DUMMY, false, true );
JobEntryCopy jobEntry = new JobEntryCopy();
jobEntry.setObjectId( null );
jobEntry.setEntry( jobEntrySpecial );
jobEntry.setLocation( 50, 50 );
jobE... | static final JobEntryCopy function() { JobEntrySpecial jobEntrySpecial = new JobEntrySpecial( STRING_SPECIAL_DUMMY, false, true ); JobEntryCopy jobEntry = new JobEntryCopy(); jobEntry.setObjectId( null ); jobEntry.setEntry( jobEntrySpecial ); jobEntry.setLocation( 50, 50 ); jobEntry.setDrawn( false ); jobEntry.setDescr... | /**
* Creates the dummy entry.
*
* @return the job entry copy
*/ | Creates the dummy entry | createDummyEntry | {
"repo_name": "AlexanderBuloichik/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/job/JobMeta.java",
"license": "apache-2.0",
"size": 88100
} | [
"org.pentaho.di.i18n.BaseMessages",
"org.pentaho.di.job.entries.special.JobEntrySpecial",
"org.pentaho.di.job.entry.JobEntryCopy"
] | import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.job.entries.special.JobEntrySpecial; import org.pentaho.di.job.entry.JobEntryCopy; | import org.pentaho.di.i18n.*; import org.pentaho.di.job.entries.special.*; import org.pentaho.di.job.entry.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 27,102 |
return new ScaledResolution(getMinecraft());
} | return new ScaledResolution(getMinecraft()); } | /**
* Returns a new scaled resolution from Minecraft.<br>
* This method exists to easier backport of the mod.<br>
* Between versions, the constructor was changed and
*
* @return A new scaled resolution object
*/ | Returns a new scaled resolution from Minecraft. This method exists to easier backport of the mod. Between versions, the constructor was changed and | getScaledResolution | {
"repo_name": "NickAcPT/Lithium-Forge",
"path": "src/main/java/net/nickac/lithium/frontend/mod/utils/ModCoderPackUtils.java",
"license": "mit",
"size": 4355
} | [
"net.minecraft.client.gui.ScaledResolution"
] | import net.minecraft.client.gui.ScaledResolution; | import net.minecraft.client.gui.*; | [
"net.minecraft.client"
] | net.minecraft.client; | 2,681,345 |
@Test
public void testGetRowCount() {
final int numRow = 8;
assertEquals(numRow, table.getRowCount());
}
| void function() { final int numRow = 8; assertEquals(numRow, table.getRowCount()); } | /**
* Test method for obvious.data.Table.getRowCount() method.
*/ | Test method for obvious.data.Table.getRowCount() method | testGetRowCount | {
"repo_name": "jdfekete/obvious",
"path": "obviousx-weka/src/test/java/test/obvious/weka/data/WekaTableTest.java",
"license": "bsd-3-clause",
"size": 6143
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,278,728 |
private void send50LoginPkt(final String serverName,
final String user,
final String password,
final String charset,
final String appName,
final String prog... | void function(final String serverName, final String user, final String password, final String charset, final String appName, final String progName, final String wsid, final String language, final int packetSize) throws IOException { final byte[] empty = new byte[0]; out.setPacketType(LOGIN_PKT); putLoginString(wsid, 30... | /**
* TDS 5.0 Login Packet.
* <P>
* @param serverName server host name
* @param user user name
* @param password user password
* @param charset required server character set
* @param appName application name
* @param progName library name
* @param wsid ... | TDS 5.0 Login Packet. | send50LoginPkt | {
"repo_name": "milesibastos/jTDS",
"path": "src/main/net/sourceforge/jtds/jdbc/TdsCore.java",
"license": "lgpl-2.1",
"size": 168782
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,294,533 |
@Test
public void testThreadIsolatedObserveTimeoutWithFailureAndFallback() {
testObserveFailureWithTimeoutAndFallback(ExecutionIsolationStrategy.THREAD, TestCommandWithTimeout.RESULT_EXCEPTION);
} | void function() { testObserveFailureWithTimeoutAndFallback(ExecutionIsolationStrategy.THREAD, TestCommandWithTimeout.RESULT_EXCEPTION); } | /**
* Test a thread command execution that times out with a fallback and eventually fails.
*/ | Test a thread command execution that times out with a fallback and eventually fails | testThreadIsolatedObserveTimeoutWithFailureAndFallback | {
"repo_name": "sasrin/Hystrix",
"path": "hystrix-core/src/test/java/com/netflix/hystrix/HystrixObservableCommandTest.java",
"license": "apache-2.0",
"size": 272384
} | [
"com.netflix.hystrix.HystrixCommandProperties"
] | import com.netflix.hystrix.HystrixCommandProperties; | import com.netflix.hystrix.*; | [
"com.netflix.hystrix"
] | com.netflix.hystrix; | 2,069,746 |
public PhotosRestoreCommentQuery restoreComment(UserActor actor, int commentId) {
return new PhotosRestoreCommentQuery(getClient(), actor, commentId);
} | PhotosRestoreCommentQuery function(UserActor actor, int commentId) { return new PhotosRestoreCommentQuery(getClient(), actor, commentId); } | /**
* Restores a deleted comment on a photo.
*/ | Restores a deleted comment on a photo | restoreComment | {
"repo_name": "kokorin/vk-java-sdk",
"path": "sdk/src/main/java/com/vk/api/sdk/actions/Photos.java",
"license": "mit",
"size": 16647
} | [
"com.vk.api.sdk.client.actors.UserActor",
"com.vk.api.sdk.queries.photos.PhotosRestoreCommentQuery"
] | import com.vk.api.sdk.client.actors.UserActor; import com.vk.api.sdk.queries.photos.PhotosRestoreCommentQuery; | import com.vk.api.sdk.client.actors.*; import com.vk.api.sdk.queries.photos.*; | [
"com.vk.api"
] | com.vk.api; | 1,957,955 |
public static List<String> readAllLines(Files files, Path source, Charset cs) throws XenonException {
InputStream in = null;
try {
in = files.newInputStream(source);
return readLines(in, cs);
} catch (IOException e) {
throw new XenonException(NAME, "Faile... | static List<String> function(Files files, Path source, Charset cs) throws XenonException { InputStream in = null; try { in = files.newInputStream(source); return readLines(in, cs); } catch (IOException e) { throw new XenonException(NAME, STR, e); } finally { close(in); } } | /**
* Read all lines from a file and return them in a {@link java.util.List}.
*
* @param files
* the files interface to use for file access.
* @param source
* the file to read from.
* @param cs
* the Charset to use.
*
* @return a <code>... | Read all lines from a file and return them in a <code>java.util.List</code> | readAllLines | {
"repo_name": "benvanwerkhoven/Xenon",
"path": "src/main/java/nl/esciencecenter/xenon/util/Utils.java",
"license": "apache-2.0",
"size": 43661
} | [
"java.io.IOException",
"java.io.InputStream",
"java.nio.charset.Charset",
"java.util.List",
"nl.esciencecenter.xenon.XenonException",
"nl.esciencecenter.xenon.files.Files",
"nl.esciencecenter.xenon.files.Path"
] | import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; import java.util.List; import nl.esciencecenter.xenon.XenonException; import nl.esciencecenter.xenon.files.Files; import nl.esciencecenter.xenon.files.Path; | import java.io.*; import java.nio.charset.*; import java.util.*; import nl.esciencecenter.xenon.*; import nl.esciencecenter.xenon.files.*; | [
"java.io",
"java.nio",
"java.util",
"nl.esciencecenter.xenon"
] | java.io; java.nio; java.util; nl.esciencecenter.xenon; | 1,925,080 |
@GwtIncompatible // java.lang.reflect
@Nullable
private static Method getSizeMethod() {
return getJlaMethod("getStackTraceDepth", Throwable.class);
} | @GwtIncompatible static Method function() { return getJlaMethod(STR, Throwable.class); } | /**
* Returns the Method that can be used to return the size of a stack, or null if that method
* cannot be found (it is only to be found in fairly recent JDKs).
*/ | Returns the Method that can be used to return the size of a stack, or null if that method cannot be found (it is only to be found in fairly recent JDKs) | getSizeMethod | {
"repo_name": "DavesMan/guava",
"path": "guava/src/com/google/common/base/Throwables.java",
"license": "apache-2.0",
"size": 18479
} | [
"com.google.common.annotations.GwtIncompatible",
"java.lang.reflect.Method"
] | import com.google.common.annotations.GwtIncompatible; import java.lang.reflect.Method; | import com.google.common.annotations.*; import java.lang.reflect.*; | [
"com.google.common",
"java.lang"
] | com.google.common; java.lang; | 739,346 |
static public void tip(@NonNull FragmentManager manager, final String text)
{
Tip tip = new Tip();
tip.setText(text);
tip.show(manager, STATE_TEXT);
} | static void function(@NonNull FragmentManager manager, final String text) { Tip tip = new Tip(); tip.setText(text); tip.show(manager, STATE_TEXT); } | /**
* Convenience method to display tip
*
* @param manager fragment manager
* @param text text to display
*/ | Convenience method to display tip | tip | {
"repo_name": "1313ou/TreebolicLib",
"path": "treebolicGlue/src/main/java/treebolic/glue/component/Tip.java",
"license": "gpl-3.0",
"size": 3398
} | [
"androidx.annotation.NonNull",
"androidx.fragment.app.FragmentManager"
] | import androidx.annotation.NonNull; import androidx.fragment.app.FragmentManager; | import androidx.annotation.*; import androidx.fragment.app.*; | [
"androidx.annotation",
"androidx.fragment"
] | androidx.annotation; androidx.fragment; | 646,942 |
@ExportConstructor
public static Geometry constructor(String geometryType, int srid, int precision) {
return new Geometry(geometryType, srid, precision);
}
// -------------------------------------------------------------------------
// General getters and setters
// ------------------------------------------... | static Geometry function(String geometryType, int srid, int precision) { return new Geometry(geometryType, srid, precision); } | /**
* Create geometry.
*
* @param geometryType
* geometry type
* @param srid
* srid
* @param precision
* precision
*/ | Create geometry | constructor | {
"repo_name": "geomajas/geomajas-project-javascript",
"path": "api/src/main/java/org/geomajas/javascript/api/client/spatial/JsGeometry.java",
"license": "agpl-3.0",
"size": 3189
} | [
"org.geomajas.geometry.Geometry"
] | import org.geomajas.geometry.Geometry; | import org.geomajas.geometry.*; | [
"org.geomajas.geometry"
] | org.geomajas.geometry; | 1,518,572 |
protected void runSQL(String sql) {
try {
DataSource dataSource = InfrastructureUtil.getDataSource();
DB db = DBManagerUtil.getDB();
sql = db.buildSQL(sql);
sql = PortalUtil.transformSQL(sql);
SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
sql);
sqlUpdate.update();
... | void function(String sql) { try { DataSource dataSource = InfrastructureUtil.getDataSource(); DB db = DBManagerUtil.getDB(); sql = db.buildSQL(sql); sql = PortalUtil.transformSQL(sql); SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, sql); sqlUpdate.update(); } catch (Exception e) { throw new SystemE... | /**
* Performs a SQL query.
*
* @param sql the sql query
*/ | Performs a SQL query | runSQL | {
"repo_name": "rivetlogic/liferay-birthday-calendar",
"path": "modules/birthday-service/birthday-service-service/src/main/java/com/rivetlogic/birthday/service/base/CustomContactLocalServiceBaseImpl.java",
"license": "gpl-3.0",
"size": 9340
} | [
"com.liferay.portal.kernel.bean.BeanReference",
"com.liferay.portal.kernel.dao.db.DBManagerUtil",
"com.liferay.portal.kernel.dao.jdbc.SqlUpdate",
"com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil",
"com.liferay.portal.kernel.exception.SystemException",
"com.liferay.portal.kernel.service.persistence... | import com.liferay.portal.kernel.bean.BeanReference; import com.liferay.portal.kernel.dao.db.DBManagerUtil; import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.se... | import com.liferay.portal.kernel.bean.*; import com.liferay.portal.kernel.dao.db.*; import com.liferay.portal.kernel.dao.jdbc.*; import com.liferay.portal.kernel.exception.*; import com.liferay.portal.kernel.service.persistence.*; import com.liferay.portal.kernel.util.*; import com.liferay.portal.spring.extender.servic... | [
"com.liferay.portal",
"com.rivetlogic.birthday",
"javax.sql"
] | com.liferay.portal; com.rivetlogic.birthday; javax.sql; | 45,102 |
public void processUpdated() {
Operator hoveredOp = model.getHoveringOperator();
boolean hoveredOperatorFound = hoveredOp == null ? true : false;
List<Operator> movedOperators = new LinkedList<Operator>();
List<Operator> portChangedOperators = new LinkedList<Operator>();
// make sure location of every opt... | void function() { Operator hoveredOp = model.getHoveringOperator(); boolean hoveredOperatorFound = hoveredOp == null ? true : false; List<Operator> movedOperators = new LinkedList<Operator>(); List<Operator> portChangedOperators = new LinkedList<Operator>(); for (ExecutionUnit unit : model.getProcesses()) { movedOperat... | /**
* Call when the process has been updated, i.e. an operator has been added. Will update operator
* locations and then repaint.
*/ | Call when the process has been updated, i.e. an operator has been added. Will update operator locations and then repaint | processUpdated | {
"repo_name": "brtonnies/rapidminer-studio",
"path": "src/main/java/com/rapidminer/gui/flow/processrendering/view/ProcessRendererView.java",
"license": "agpl-3.0",
"size": 57606
} | [
"com.rapidminer.operator.ExecutionUnit",
"com.rapidminer.operator.Operator",
"java.util.LinkedList",
"java.util.List"
] | import com.rapidminer.operator.ExecutionUnit; import com.rapidminer.operator.Operator; import java.util.LinkedList; import java.util.List; | import com.rapidminer.operator.*; import java.util.*; | [
"com.rapidminer.operator",
"java.util"
] | com.rapidminer.operator; java.util; | 416,754 |
public JobStatus status() {
return this.status;
} | JobStatus function() { return this.status; } | /**
* Get the status of the job. Possible values include: 'unknown', 'enqueued', 'running', 'completed', 'failed', 'cancelled'.
*
* @return the status value
*/ | Get the status of the job. Possible values include: 'unknown', 'enqueued', 'running', 'completed', 'failed', 'cancelled' | status | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/JobResponseInner.java",
"license": "mit",
"size": 4252
} | [
"com.microsoft.azure.management.iothub.v2019_03_22_preview.JobStatus"
] | import com.microsoft.azure.management.iothub.v2019_03_22_preview.JobStatus; | import com.microsoft.azure.management.iothub.v2019_03_22_preview.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,758,300 |
public ConnectionMetaData getMetaData()
{
if (ActiveMQRAManagedConnectionFactory.trace)
{
ActiveMQRALogger.LOGGER.trace("getMetadata()");
}
return new ActiveMQRAConnectionMetaData();
} | ConnectionMetaData function() { if (ActiveMQRAManagedConnectionFactory.trace) { ActiveMQRALogger.LOGGER.trace(STR); } return new ActiveMQRAConnectionMetaData(); } | /**
* Get the connection metadata
*
* @return The metadata
*/ | Get the connection metadata | getMetaData | {
"repo_name": "jbertram/activemq-artemis-old",
"path": "artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAManagedConnectionFactory.java",
"license": "apache-2.0",
"size": 22043
} | [
"javax.jms.ConnectionMetaData"
] | import javax.jms.ConnectionMetaData; | import javax.jms.*; | [
"javax.jms"
] | javax.jms; | 2,808,229 |
private void updateSimpleDeclaration(String alias, Name refName, Ref ref) {
Node rvalue = ref.node.getNext();
Node parent = ref.node.getParent();
Node grandparent = parent.getParent();
Node greatGrandparent = grandparent.getParent();
if (rvalue != null && rvalue.isFunction()) {
checkForHose... | void function(String alias, Name refName, Ref ref) { Node rvalue = ref.node.getNext(); Node parent = ref.node.getParent(); Node grandparent = parent.getParent(); Node greatGrandparent = grandparent.getParent(); if (rvalue != null && rvalue.isFunction()) { checkForHosedThisReferences(rvalue, refName.docInfo, refName); }... | /**
* Updates the initial assignment to a collapsible property at global scope
* by changing it to a variable declaration (e.g. a.b = 1 -> var a$b = 1).
* The property's value may either be a primitive or an object literal or
* function whose properties aren't collapsible.
*
* @param alias The flatten... | Updates the initial assignment to a collapsible property at global scope by changing it to a variable declaration (e.g. a.b = 1 -> var a$b = 1). The property's value may either be a primitive or an object literal or function whose properties aren't collapsible | updateSimpleDeclaration | {
"repo_name": "LorenzoDV/closure-compiler",
"path": "src/com/google/javascript/jscomp/CollapseProperties.java",
"license": "apache-2.0",
"size": 41504
} | [
"com.google.common.base.Preconditions",
"com.google.javascript.jscomp.GlobalNamespace",
"com.google.javascript.rhino.IR",
"com.google.javascript.rhino.Node"
] | import com.google.common.base.Preconditions; import com.google.javascript.jscomp.GlobalNamespace; import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node; | import com.google.common.base.*; import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*; | [
"com.google.common",
"com.google.javascript"
] | com.google.common; com.google.javascript; | 2,268,753 |
@Pure
@Inline(value = "(long) (($1) * 1000)")
public static long seconds(float secs) {
return (long) (secs * MILLIS_IN_SECOND);
} | @Inline(value = STR) static long function(float secs) { return (long) (secs * MILLIS_IN_SECOND); } | /** Convert seconds to milliseconds.
*
* @param secs - number of seconds to convert.
* @return the number of milliseconds in seconds.
*/ | Convert seconds to milliseconds | seconds | {
"repo_name": "jgfoster/sarl",
"path": "main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/scoping/batch/SARLTimeExtensions.java",
"license": "apache-2.0",
"size": 15335
} | [
"org.eclipse.xtext.xbase.lib.Inline"
] | import org.eclipse.xtext.xbase.lib.Inline; | import org.eclipse.xtext.xbase.lib.*; | [
"org.eclipse.xtext"
] | org.eclipse.xtext; | 1,739,234 |
public boolean usesDarkCheckmark(@ColorInt int color) {
return ColorUtil.isColorDark(color);
} | boolean function(@ColorInt int color) { return ColorUtil.isColorDark(color); } | /**
* Returns true if for the given color a dark checkmark is used.
*
* @return true if color is "dark"
*/ | Returns true if for the given color a dark checkmark is used | usesDarkCheckmark | {
"repo_name": "phil-lopreiato/the-blue-alliance-android",
"path": "spectrum/src/main/java/com/thebluealliance/spectrum/SpectrumPalette.java",
"license": "mit",
"size": 11915
} | [
"android.support.annotation.ColorInt",
"com.thebluealliance.spectrum.internal.ColorUtil"
] | import android.support.annotation.ColorInt; import com.thebluealliance.spectrum.internal.ColorUtil; | import android.support.annotation.*; import com.thebluealliance.spectrum.internal.*; | [
"android.support",
"com.thebluealliance.spectrum"
] | android.support; com.thebluealliance.spectrum; | 2,539,717 |
public void timing(final Marker marker, final String message, final Throwable t) {
logger.logIfEnabled(FQCN, TIMING, marker, message, t);
} | void function(final Marker marker, final String message, final Throwable t) { logger.logIfEnabled(FQCN, TIMING, marker, message, t); } | /**
* Logs a message at the {@code TIMING} level including the stack trace of
* the {@link Throwable} {@code t} passed as parameter.
*
* @param marker the marker data specific to this log statement
* @param message the message to log.
* @param t the exception to log, including its stack t... | Logs a message at the TIMING level including the stack trace of the <code>Throwable</code> t passed as parameter | timing | {
"repo_name": "calypso15/GowBot",
"path": "src/net/ryanogrady/gowbot/ExtLogger.java",
"license": "mit",
"size": 33022
} | [
"org.apache.logging.log4j.Marker"
] | import org.apache.logging.log4j.Marker; | import org.apache.logging.log4j.*; | [
"org.apache.logging"
] | org.apache.logging; | 1,004,159 |
private void removeElementOutsideWindowER(
LinkedHashMap<Integer, Integer> mapMostRightfromI,
final int firstElementOfWindow) {
// iterate over elements of the map
Iterator<Entry<Integer, Integer>> iter = mapMostRightfromI.entrySet().iterator();
while(iter.hasNext()){
Entry<Integer, Integer> entry = i... | void function( LinkedHashMap<Integer, Integer> mapMostRightfromI, final int firstElementOfWindow) { Iterator<Entry<Integer, Integer>> iter = mapMostRightfromI.entrySet().iterator(); while(iter.hasNext()){ Entry<Integer, Integer> entry = iter.next(); if(entry.getValue() < firstElementOfWindow){ iter.remove(); }else{ bre... | /**
* This method removes elements out of the current window from a hashmap containing
* the position of items at the right of an itemset.
* key: item value : a itemset position
* @param mapMostLeftFromItemset the map
* @param lastElementOfWindow the last itemset of the window in terms of itemset positi... | This method removes elements out of the current window from a hashmap containing the position of items at the right of an itemset. key: item value : a itemset position | removeElementOutsideWindowER | {
"repo_name": "dragonzhou/humor",
"path": "src/ca/pfv/spmf/algorithms/sequential_rules/trulegrowth/AlgoTRuleGrowth.java",
"license": "apache-2.0",
"size": 35125
} | [
"java.util.Iterator",
"java.util.LinkedHashMap",
"java.util.Map"
] | import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,309,253 |
protected void setType(Production p, Type t) {
if (t.isError()) {
p.type = t;
} else if (AST.isGenericNode(p.type)) {
p.type = t.annotate().attribute(Constants.ATT_GENERIC);
} else {
p.type = t;
}
if (2 <= DEBUG) {
runtime.console().p(p.qName.name).p(" : ");
... | void function(Production p, Type t) { if (t.isError()) { p.type = t; } else if (AST.isGenericNode(p.type)) { p.type = t.annotate().attribute(Constants.ATT_GENERIC); } else { p.type = t; } if (2 <= DEBUG) { runtime.console().p(p.qName.name).p(STR); ast.print(p.type, runtime.console(), false, true, null); runtime.console... | /**
* Set the specified production's type to the specified type. This
* method preserves the original type's generic attribute, unless
* the specified type is the error type.
*
* @param p The production.
* @param t The type.
*/ | Set the specified production's type to the specified type. This method preserves the original type's generic attribute, unless the specified type is the error type | setType | {
"repo_name": "wandoulabs/xtc-rats",
"path": "xtc-core/src/main/java/xtc/parser/VariantSorter.java",
"license": "lgpl-2.1",
"size": 28452
} | [
"xtc.type.AST",
"xtc.type.Type"
] | import xtc.type.AST; import xtc.type.Type; | import xtc.type.*; | [
"xtc.type"
] | xtc.type; | 1,157,676 |
public void markStoreCorrupted(IOException exception) throws IOException {
ensureOpen();
if (!isMarkedCorrupted()) {
String uuid = CORRUPTED + UUIDs.randomBase64UUID();
try (IndexOutput output = this.directory().createOutput(uuid, IOContext.DEFAULT)) {
CodecUt... | void function(IOException exception) throws IOException { ensureOpen(); if (!isMarkedCorrupted()) { String uuid = CORRUPTED + UUIDs.randomBase64UUID(); try (IndexOutput output = this.directory().createOutput(uuid, IOContext.DEFAULT)) { CodecUtil.writeHeader(output, CODEC, VERSION); BytesStreamOutput out = new BytesStre... | /**
* Marks this store as corrupted. This method writes a <tt>corrupted_${uuid}</tt> file containing the given exception
* message. If a store contains a <tt>corrupted_${uuid}</tt> file {@link #isMarkedCorrupted()} will return <code>true</code>.
*/ | Marks this store as corrupted. This method writes a corrupted_${uuid} file containing the given exception message. If a store contains a corrupted_${uuid} file <code>#isMarkedCorrupted()</code> will return <code>true</code> | markStoreCorrupted | {
"repo_name": "yanjunh/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/index/store/Store.java",
"license": "apache-2.0",
"size": 64125
} | [
"java.io.IOException",
"java.util.Collections",
"org.apache.lucene.codecs.CodecUtil",
"org.apache.lucene.store.IOContext",
"org.apache.lucene.store.IndexOutput",
"org.apache.lucene.util.BytesRef",
"org.elasticsearch.common.UUIDs",
"org.elasticsearch.common.bytes.BytesReference",
"org.elasticsearch.c... | import java.io.IOException; import java.util.Collections; import org.apache.lucene.codecs.CodecUtil; import org.apache.lucene.store.IOContext; import org.apache.lucene.store.IndexOutput; import org.apache.lucene.util.BytesRef; import org.elasticsearch.common.UUIDs; import org.elasticsearch.common.bytes.BytesReference; ... | import java.io.*; import java.util.*; import org.apache.lucene.codecs.*; import org.apache.lucene.store.*; import org.apache.lucene.util.*; import org.elasticsearch.common.*; import org.elasticsearch.common.bytes.*; import org.elasticsearch.common.io.stream.*; | [
"java.io",
"java.util",
"org.apache.lucene",
"org.elasticsearch.common"
] | java.io; java.util; org.apache.lucene; org.elasticsearch.common; | 2,364,022 |
@Override public void exitEveryRule(ParserRuleContext ctx) { } | @Override public void exitEveryRule(ParserRuleContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | enterEveryRule | {
"repo_name": "SPLA/VARIAMOS",
"path": "com.variamos.componentparser/src/main/java/com/variamos/componentparser/lexer/mysql/MySqlParserBaseListener.java",
"license": "gpl-2.0",
"size": 183601
} | [
"org.antlr.v4.runtime.ParserRuleContext"
] | import org.antlr.v4.runtime.ParserRuleContext; | import org.antlr.v4.runtime.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,865,334 |
@NotNull()
public LDAPExtendedOperation extendedOperation(
@NotNull final LDAPExtendedOperation extendedOperation)
throws LDAPException
{
return extendedOperation(extendedOperation, null);
} | @NotNull() LDAPExtendedOperation function( @NotNull final LDAPExtendedOperation extendedOperation) throws LDAPException { return extendedOperation(extendedOperation, null); } | /**
* Processes an extended operation in the directory.
*
* @param extendedOperation The extended operation to process.
*
* @return The result returned from the extended operation.
*
* @throws LDAPException If a problem occurs while processing the operation.
*/ | Processes an extended operation in the directory | extendedOperation | {
"repo_name": "UnboundID/ldapsdk",
"path": "src/com/unboundid/ldap/sdk/migrate/ldapjdk/LDAPConnection.java",
"license": "gpl-2.0",
"size": 46875
} | [
"com.unboundid.util.NotNull"
] | import com.unboundid.util.NotNull; | import com.unboundid.util.*; | [
"com.unboundid.util"
] | com.unboundid.util; | 1,592,557 |
@GET
@Path("/s/{slug:[a-z][a-z]*}")
@Produces(MediaType.APPLICATION_JSON)
public Page lookupPageBySlug(@PathParam("slug") String slug) {
Page page = repository.findBySlug(slug);
if (page == null) {
throw new WebApplicationException(Response.Status.NOT_FOUND);
}
return page;
}
| @Path(STR) @Produces(MediaType.APPLICATION_JSON) Page function(@PathParam("slug") String slug) { Page page = repository.findBySlug(slug); if (page == null) { throw new WebApplicationException(Response.Status.NOT_FOUND); } return page; } | /**
* Lookup page by slug.
*
* @param slug the slug
* @return the page
*/ | Lookup page by slug | lookupPageBySlug | {
"repo_name": "uaijug/chronos",
"path": "src/main/java/br/com/uaijug/chronos/blog/resources/PageResource.java",
"license": "gpl-3.0",
"size": 6614
} | [
"br.com.uaijug.chronos.blog.model.Page",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.WebApplicationException",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response"
] | import br.com.uaijug.chronos.blog.model.Page; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; | import br.com.uaijug.chronos.blog.model.*; import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"br.com.uaijug",
"javax.ws"
] | br.com.uaijug; javax.ws; | 2,790,546 |
@Override
public void putAll(final Map<? extends String, ? extends Object> m) {
for (Map.Entry<? extends String, ? extends Object> entry : m.entrySet()) {
this.removeItem(entry.getKey());
this.replaceItemValue(entry.getKey(), entry.getValue());
}
// this.save();
} | void function(final Map<? extends String, ? extends Object> m) { for (Map.Entry<? extends String, ? extends Object> entry : m.entrySet()) { this.removeItem(entry.getKey()); this.replaceItemValue(entry.getKey(), entry.getValue()); } } | /**
* Replaces items specified in the map with new values.
*
* @param m
* map with item names to change as keys and new values as values
*/ | Replaces items specified in the map with new values | putAll | {
"repo_name": "OpenNTF/org.openntf.domino",
"path": "domino/core/src/main/java/org/openntf/domino/impl/Document.java",
"license": "apache-2.0",
"size": 132271
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 320,179 |
RequestSpecification queryParam(String parameterName, Collection<?> parameterValues);
/**
* Specify the form parameters that'll be sent with the request. Note that this method is the same as {@link #parameters(String, Object, Object...)} | RequestSpecification queryParam(String parameterName, Collection<?> parameterValues); /** * Specify the form parameters that'll be sent with the request. Note that this method is the same as {@link #parameters(String, Object, Object...)} | /**
* A slightly shorter version of {@link #queryParameter(String, java.util.Collection)}.
*
* @param parameterName The parameter name
* @param parameterValues The parameter values
* @return The request specification
* @see #queryParam(String, java.util.Collection)
*/ | A slightly shorter version of <code>#queryParameter(String, java.util.Collection)</code> | queryParam | {
"repo_name": "lanwen/rest-assured",
"path": "rest-assured/src/main/java/com/jayway/restassured/specification/RequestSpecification.java",
"license": "apache-2.0",
"size": 65114
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,906,036 |
@ModelChange(timings = ModelValidator.TYPE_AFTER_DELETE)
public void onModelChange(final I_AD_Note note)
{
final IContextAware context = InterfaceWrapperHelper.getContextAware(note);
final List<I_C_OLCand> olCands = new Query(context.getCtx(), I_C_OLCand.Table_Name, I_C_OLCand.COLUMNNAME_AD_Note_ID + "=?", co... | @ModelChange(timings = ModelValidator.TYPE_AFTER_DELETE) void function(final I_AD_Note note) { final IContextAware context = InterfaceWrapperHelper.getContextAware(note); final List<I_C_OLCand> olCands = new Query(context.getCtx(), I_C_OLCand.Table_Name, I_C_OLCand.COLUMNNAME_AD_Note_ID + "=?", context.getTrxName()) .s... | /**
* if the error message is deleted, then unset the candidates' error status
*
* @param note
*/ | if the error message is deleted, then unset the candidates' error status | onModelChange | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.swat/de.metas.swat.base/src/main/java/de/metas/ordercandidate/modelvalidator/AD_Note.java",
"license": "gpl-2.0",
"size": 1897
} | [
"java.util.List",
"org.adempiere.ad.modelvalidator.annotations.ModelChange",
"org.adempiere.model.IContextAware",
"org.adempiere.model.InterfaceWrapperHelper",
"org.compiere.model.ModelValidator",
"org.compiere.model.Query"
] | import java.util.List; import org.adempiere.ad.modelvalidator.annotations.ModelChange; import org.adempiere.model.IContextAware; import org.adempiere.model.InterfaceWrapperHelper; import org.compiere.model.ModelValidator; import org.compiere.model.Query; | import java.util.*; import org.adempiere.ad.modelvalidator.annotations.*; import org.adempiere.model.*; import org.compiere.model.*; | [
"java.util",
"org.adempiere.ad",
"org.adempiere.model",
"org.compiere.model"
] | java.util; org.adempiere.ad; org.adempiere.model; org.compiere.model; | 154,886 |
public List<SocialInformationEvent> getLastEventsForMyContacts(Connection con, String day,
String myId, List<String> myContactsIds, Date begin, Date end) throws SQLException,
ParseException {
String selectNextEvents =
"select distinct " + JournalDAO.JOURNALCOLUMNNAMES + " from CalendarJournal ... | List<SocialInformationEvent> function(Connection con, String day, String myId, List<String> myContactsIds, Date begin, Date end) throws SQLException, ParseException { String selectNextEvents = STR + JournalDAO.JOURNALCOLUMNNAMES + STR + STR + toSqlString(myContactsIds) + STR + STR + STR; PreparedStatement prepStmt = nu... | /**
* get Last Social Events for a given list of my Contacts accordint to the type of data base
* used(PostgreSQL,Oracle,MMS) . This includes all kinds of events
* @param con
* @param day
* @param myId
* @param myContactsIds
* @param begin
* @param end
* @return List<SocialInformationEvent>
... | get Last Social Events for a given list of my Contacts accordint to the type of data base used(PostgreSQL,Oracle,MMS) . This includes all kinds of events | getLastEventsForMyContacts | {
"repo_name": "NicolasEYSSERIC/Silverpeas-Core",
"path": "ejb-core/calendar/src/main/java/com/stratelia/webactiv/calendar/model/JournalDAO.java",
"license": "agpl-3.0",
"size": 30326
} | [
"com.stratelia.webactiv.calendar.socialnetwork.SocialInformationEvent",
"com.stratelia.webactiv.util.DBUtil",
"com.stratelia.webactiv.util.DateUtil",
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.text.ParseException",
"java.util.ArrayList",... | import com.stratelia.webactiv.calendar.socialnetwork.SocialInformationEvent; import com.stratelia.webactiv.util.DBUtil; import com.stratelia.webactiv.util.DateUtil; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.text.ParseException; im... | import com.stratelia.webactiv.calendar.socialnetwork.*; import com.stratelia.webactiv.util.*; import java.sql.*; import java.text.*; import java.util.*; | [
"com.stratelia.webactiv",
"java.sql",
"java.text",
"java.util"
] | com.stratelia.webactiv; java.sql; java.text; java.util; | 687,334 |
public void setClickCmd(UiBox box, ClickCommand command) {
leftCommands.put(box, command);
rightCommands.put(box, command);
} | void function(UiBox box, ClickCommand command) { leftCommands.put(box, command); rightCommands.put(box, command); } | /**
* Sets the click command for a box.
*
* @param box
* @param command
*/ | Sets the click command for a box | setClickCmd | {
"repo_name": "captainsoft/terminal-angel-disease",
"path": "src/com/captainsoft/spark/ui/mouse/BoxCommandList.java",
"license": "gpl-2.0",
"size": 3735
} | [
"com.captainsoft.spark.ui.box.UiBox"
] | import com.captainsoft.spark.ui.box.UiBox; | import com.captainsoft.spark.ui.box.*; | [
"com.captainsoft.spark"
] | com.captainsoft.spark; | 729,177 |
@JsonProperty("conhecimentosApropriados")
public List<ChaveConhecimento> getConhecimentosApropriados() {
return conhecimentosApropriados;
} | @JsonProperty(STR) List<ChaveConhecimento> function() { return conhecimentosApropriados; } | /**
* Lista contendo os conhecimentos apropriados a este Dsic<br/>
* @return conhecimentosApropriados
**/ | Lista contendo os conhecimentos apropriados a este Dsic<br/> | getConhecimentosApropriados | {
"repo_name": "samuelfac/portalunico.siscomex.gov.br",
"path": "src/main/java/br/gov/siscomex/portalunico/ccta/model/DsicConsultaDetalhada.java",
"license": "mit",
"size": 49401
} | [
"com.fasterxml.jackson.annotation.JsonProperty",
"java.util.List"
] | import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; | import com.fasterxml.jackson.annotation.*; import java.util.*; | [
"com.fasterxml.jackson",
"java.util"
] | com.fasterxml.jackson; java.util; | 1,635,533 |
public ApplicationValue updateApplication(AuthzSubject subject, ApplicationValue newValue)
throws ApplicationNotFoundException, PermissionException, UpdateException,
org.hyperic.hq.appdef.shared.AppdefDuplicateNameException; | ApplicationValue function(AuthzSubject subject, ApplicationValue newValue) throws ApplicationNotFoundException, PermissionException, UpdateException, org.hyperic.hq.appdef.shared.AppdefDuplicateNameException; | /**
* Update the basic properties of an application. Will NOT update service
* dependencies, etc.
*/ | Update the basic properties of an application. Will NOT update service dependencies, etc | updateApplication | {
"repo_name": "cc14514/hq6",
"path": "hq-server/src/main/java/org/hyperic/hq/appdef/shared/ApplicationManager.java",
"license": "unlicense",
"size": 8029
} | [
"org.hyperic.hq.authz.server.session.AuthzSubject",
"org.hyperic.hq.authz.shared.PermissionException"
] | import org.hyperic.hq.authz.server.session.AuthzSubject; import org.hyperic.hq.authz.shared.PermissionException; | import org.hyperic.hq.authz.server.session.*; import org.hyperic.hq.authz.shared.*; | [
"org.hyperic.hq"
] | org.hyperic.hq; | 2,586,694 |
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
// Use the current time as the default values for the picker
final Calendar c = Calendar.getInstance();
int hour = c.get(Calendar.HOUR);
int minute = c.get(Calendar.MINUTE);
am... | Dialog function(Bundle savedInstanceState) { final Calendar c = Calendar.getInstance(); int hour = c.get(Calendar.HOUR); int minute = c.get(Calendar.MINUTE); amPm = c.get(Calendar.AM_PM); return new TimePickerDialog(getActivity(), AlertDialog.THEME_HOLO_LIGHT, this, hour, minute, DateFormat.is24HourFormat(getActivity()... | /**
* Overridden onCreateDialog method.
* @param savedInstanceState: Bundle passed by android
* @return Time picker dialog
*/ | Overridden onCreateDialog method | onCreateDialog | {
"repo_name": "TechnoCube/cs3354group6-",
"path": "ahora/src/main/java/com/alamkanak/weekview/sample/Info.java",
"license": "apache-2.0",
"size": 20305
} | [
"android.app.AlertDialog",
"android.app.Dialog",
"android.app.TimePickerDialog",
"android.os.Bundle",
"android.text.format.DateFormat",
"java.util.Calendar"
] | import android.app.AlertDialog; import android.app.Dialog; import android.app.TimePickerDialog; import android.os.Bundle; import android.text.format.DateFormat; import java.util.Calendar; | import android.app.*; import android.os.*; import android.text.format.*; import java.util.*; | [
"android.app",
"android.os",
"android.text",
"java.util"
] | android.app; android.os; android.text; java.util; | 1,363,612 |
@Override
public ItemStack getStackInSlotOnClosing(int par1)
{
if (chestContents[par1] != null)
{
final ItemStack var2 = chestContents[par1];
chestContents[par1] = null;
return var2;
}
else
{
return null;
}
} | ItemStack function(int par1) { if (chestContents[par1] != null) { final ItemStack var2 = chestContents[par1]; chestContents[par1] = null; return var2; } else { return null; } } | /**
* When some containers are closed they call this on each slot, then drop
* whatever it returns as an EntityItem - like when you close a workbench
* GUI.
*/ | When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem - like when you close a workbench GUI | getStackInSlotOnClosing | {
"repo_name": "TeamMetallurgy/Metallurgy",
"path": "src/main/java/rebelkeithy/mods/metallurgy/machines/mint/TileEntityMintStorage.java",
"license": "lgpl-3.0",
"size": 7106
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 1,542,824 |
private void veryfy(StringItem x, int xPrefixLengths, StringItem[] dataSet,
int[] A, int[] prefixLengths, int[] alpha, Collection<StringItem> S) {
String wx_lastPrefix = x.get(xPrefixLengths - 1);
for (int yDataSetID = 0; yDataSetID < A.length; yDataSetID++) {
if (A[yDataSetID] <= 0)
continue;
... | void function(StringItem x, int xPrefixLengths, StringItem[] dataSet, int[] A, int[] prefixLengths, int[] alpha, Collection<StringItem> S) { String wx_lastPrefix = x.get(xPrefixLengths - 1); for (int yDataSetID = 0; yDataSetID < A.length; yDataSetID++) { if (A[yDataSetID] <= 0) continue; int overlapValue = A[yDataSetID... | /**
* veryfy whether similarity between query:x and candidate data is over a
* threshold or not.</br> The similarity equals to Jaccard Similarity.</br>
* And This is used by "search"</br>
*
* @param x
* @param xPrefixLengths
* @param dataSet
* @param A
* @param prefixLengths
* @param alpha... | veryfy whether similarity between query:x and candidate data is over a threshold or not. The similarity equals to Jaccard Similarity. And This is used by "search" | veryfy | {
"repo_name": "mommi84/ppjoin-handler",
"path": "src/main/java/jp/ndca/similarity/join/PPJoin.java",
"license": "gpl-3.0",
"size": 47577
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,019,160 |
JEVisOption opt = new BasicOption();
opt.setDescription(description);
opt.setValue(value);
opt.setKey(key);
if (parent != null) {
parent.addOption(opt, true);
}
return opt;
} | JEVisOption opt = new BasicOption(); opt.setDescription(description); opt.setValue(value); opt.setKey(key); if (parent != null) { parent.addOption(opt, true); } return opt; } | /**
* Build a new JEVisOption with the given parameters.
*
* @param parent Option group, null if the option has no parent
* @param key Option key
* @param value value
* @param description short description for user interactions
* @param required true if the parameter has to be set
... | Build a new JEVisOption with the given parameters | BuildOption | {
"repo_name": "AIT-JEVis/JECommons",
"path": "src/main/java/org/jevis/commons/config/OptionFactory.java",
"license": "gpl-3.0",
"size": 1702
} | [
"org.jevis.api.JEVisOption"
] | import org.jevis.api.JEVisOption; | import org.jevis.api.*; | [
"org.jevis.api"
] | org.jevis.api; | 501,278 |
public void setPdpAuthorizationService(PdpAuthorizationService pdpAuthorizationService) {
this.pdpAuthorizationService = pdpAuthorizationService;
}
| void function(PdpAuthorizationService pdpAuthorizationService) { this.pdpAuthorizationService = pdpAuthorizationService; } | /**
* This method sets the pdpAuthorizationService.
* @param pdpAuthorizationService The pdpAuthorizationService to be set.
*/ | This method sets the pdpAuthorizationService | setPdpAuthorizationService | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/pdp/businessobject/lookup/BatchLookupableHelperService.java",
"license": "agpl-3.0",
"size": 15213
} | [
"org.kuali.kfs.pdp.service.PdpAuthorizationService"
] | import org.kuali.kfs.pdp.service.PdpAuthorizationService; | import org.kuali.kfs.pdp.service.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 1,694,056 |
public void testCopyConstructor() throws Exception {
List<PropertyDescriptor> settableProperties = Arrays.asList(PropertyUtils.getPropertyDescriptors(pp.getClass()));
Set<String> copyIgnoreProperties = new HashSet<String>();
copyIgnoreProperties.add("UI");
copyIgnoreProperties.a... | void function() throws Exception { List<PropertyDescriptor> settableProperties = Arrays.asList(PropertyUtils.getPropertyDescriptors(pp.getClass())); Set<String> copyIgnoreProperties = new HashSet<String>(); copyIgnoreProperties.add("UI"); copyIgnoreProperties.add(STR); copyIgnoreProperties.add(STR); copyIgnorePropertie... | /**
* Checks that the properties of an instance from the copy constructor are equal to the original.
* In the case of a mutable property, it also checks that they don't share the same instance.
*
* @throws Exception
*/ | Checks that the properties of an instance from the copy constructor are equal to the original. In the case of a mutable property, it also checks that they don't share the same instance | testCopyConstructor | {
"repo_name": "amitkr/power-architect",
"path": "regress/ca/sqlpower/architect/swingui/TestPlayPen.java",
"license": "gpl-3.0",
"size": 29344
} | [
"java.beans.PropertyDescriptor",
"java.util.Arrays",
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"org.apache.commons.beanutils.BeanUtils",
"org.apache.commons.beanutils.PropertyUtils"
] | import java.beans.PropertyDescriptor; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.PropertyUtils; | import java.beans.*; import java.util.*; import org.apache.commons.beanutils.*; | [
"java.beans",
"java.util",
"org.apache.commons"
] | java.beans; java.util; org.apache.commons; | 524,290 |
private void processingInstruction(final ProcessingInstruction pi)
throws JDOMException {
if (pi != null) {
final String target = pi.getTarget();
final String data = pi.getData();
try {
this.contentHandler.processingInstruction(target, data);
} catch (final SAXException se) {
throw n... | void function(final ProcessingInstruction pi) throws JDOMException { if (pi != null) { final String target = pi.getTarget(); final String data = pi.getData(); try { this.contentHandler.processingInstruction(target, data); } catch (final SAXException se) { throw new JDOMException(STR, se); } } } | /**
* <p>
* This will invoke the <code>ContentHandler.processingInstruction</code>
* callback when a processing instruction is encountered.
* </p>
*
* @param pi
* <code>ProcessingInstruction</code> containing target and
* data.
* @throws JDOMException
*/ | This will invoke the <code>ContentHandler.processingInstruction</code> callback when a processing instruction is encountered. | processingInstruction | {
"repo_name": "autermann/geosoftware",
"path": "src/test/java/jdom/output/SAXOutputter.java",
"license": "gpl-3.0",
"size": 46959
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 752,994 |
public String getSeckey(StreamVariable variable) {
if (streamVariableToSeckey == null) {
return null;
}
return streamVariableToSeckey.get(variable);
} | String function(StreamVariable variable) { if (streamVariableToSeckey == null) { return null; } return streamVariableToSeckey.get(variable); } | /**
* Returns the security key associated with the given StreamVariable.
*
* @param variable
* @return matching security key if one exists, null otherwise
*/ | Returns the security key associated with the given StreamVariable | getSeckey | {
"repo_name": "carrchang/vaadin",
"path": "server/src/com/vaadin/ui/ConnectorTracker.java",
"license": "apache-2.0",
"size": 33758
} | [
"com.vaadin.server.StreamVariable"
] | import com.vaadin.server.StreamVariable; | import com.vaadin.server.*; | [
"com.vaadin.server"
] | com.vaadin.server; | 2,632,918 |
private void updateListeners() {
DialogPane oldPane = dialogPaneRef.get();
if (oldPane != null) {
oldPane.headerTextProperty().removeListener(headerTextListener);
oldPane.getButtonTypes().removeListener(buttonsListener);
}
// listen to changes to... | void function() { DialogPane oldPane = dialogPaneRef.get(); if (oldPane != null) { oldPane.headerTextProperty().removeListener(headerTextListener); oldPane.getButtonTypes().removeListener(buttonsListener); } DialogPane newPane = getDialogPane(); if (newPane != null) { newPane.headerTextProperty().addListener(headerText... | /**************************************************************************
*
* Private Implementation
*
**************************************************************************/ | Private Implementation | updateListeners | {
"repo_name": "loveyoupeng/rt",
"path": "modules/controls/src/main/java/javafx/scene/control/Alert.java",
"license": "gpl-2.0",
"size": 17462
} | [
"java.lang.ref.WeakReference"
] | import java.lang.ref.WeakReference; | import java.lang.ref.*; | [
"java.lang"
] | java.lang; | 2,139,799 |
public static DefaultMutableTreeNode getNodeSeparatorInstance(DefaultMutableTreeNode selectedNode){
if(selectedNode.getUserObject() instanceof BiochamModel){
return (DefaultMutableTreeNode)selectedNode.getLastChild();
}else if(selectedNode.getUserObject() instanceof BiochamModelElement){
return... | static DefaultMutableTreeNode function(DefaultMutableTreeNode selectedNode){ if(selectedNode.getUserObject() instanceof BiochamModel){ return (DefaultMutableTreeNode)selectedNode.getLastChild(); }else if(selectedNode.getUserObject() instanceof BiochamModelElement){ return (DefaultMutableTreeNode)((DefaultMutableTreeNod... | /**
* Gets a handle of the node separator node in the main explorer tree.
*
*/ | Gets a handle of the node separator node in the main explorer tree | getNodeSeparatorInstance | {
"repo_name": "Thomashuet/Biocham",
"path": "gui/BiochamDynamicTreeActionListener.java",
"license": "gpl-2.0",
"size": 59681
} | [
"fr.inria.contraintes.biocham.commandLine.SimpleCommandLine",
"javax.swing.tree.DefaultMutableTreeNode"
] | import fr.inria.contraintes.biocham.commandLine.SimpleCommandLine; import javax.swing.tree.DefaultMutableTreeNode; | import fr.inria.contraintes.biocham.*; import javax.swing.tree.*; | [
"fr.inria.contraintes",
"javax.swing"
] | fr.inria.contraintes; javax.swing; | 1,032,503 |
@SuppressWarnings("try")
public void materializeBefore(FixedNode fixed, VirtualObjectNode virtual, GraphEffectList materializeEffects) {
PartialEscapeClosure.COUNTER_MATERIALIZATIONS.increment(fixed.getDebug());
List<AllocatedObjectNode> objects = new ArrayList<>(2);
List<ValueNode> valu... | @SuppressWarnings("try") void function(FixedNode fixed, VirtualObjectNode virtual, GraphEffectList materializeEffects) { PartialEscapeClosure.COUNTER_MATERIALIZATIONS.increment(fixed.getDebug()); List<AllocatedObjectNode> objects = new ArrayList<>(2); List<ValueNode> values = new ArrayList<>(8); List<List<MonitorIdNode... | /**
* Materializes the given virtual object and produces the necessary effects in the effects list.
* This transitively also materializes all other virtual objects that are reachable from the
* entries.
*/ | Materializes the given virtual object and produces the necessary effects in the effects list. This transitively also materializes all other virtual objects that are reachable from the entries | materializeBefore | {
"repo_name": "md-5/jdk10",
"path": "src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapeBlockState.java",
"license": "gpl-2.0",
"size": 14898
} | [
"java.util.ArrayList",
"java.util.List",
"org.graalvm.compiler.nodes.FixedNode",
"org.graalvm.compiler.nodes.ValueNode",
"org.graalvm.compiler.nodes.java.MonitorIdNode",
"org.graalvm.compiler.nodes.virtual.AllocatedObjectNode",
"org.graalvm.compiler.nodes.virtual.VirtualObjectNode"
] | import java.util.ArrayList; import java.util.List; import org.graalvm.compiler.nodes.FixedNode; import org.graalvm.compiler.nodes.ValueNode; import org.graalvm.compiler.nodes.java.MonitorIdNode; import org.graalvm.compiler.nodes.virtual.AllocatedObjectNode; import org.graalvm.compiler.nodes.virtual.VirtualObjectNode; | import java.util.*; import org.graalvm.compiler.nodes.*; import org.graalvm.compiler.nodes.java.*; import org.graalvm.compiler.nodes.virtual.*; | [
"java.util",
"org.graalvm.compiler"
] | java.util; org.graalvm.compiler; | 2,623,955 |
public Collection<IgfsFile> listFiles(IgfsPath path) throws IgniteException; | Collection<IgfsFile> function(IgfsPath path) throws IgniteException; | /**
* Lists files under the specified path.
*
* @param path Path to list files under.
* @return List of files under the specified path.
* @throws IgniteException In case of error.
* @throws org.apache.ignite.igfs.IgfsPathNotFoundException If path doesn't exist.
*/ | Lists files under the specified path | listFiles | {
"repo_name": "dlnufox/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/igfs/secondary/IgfsSecondaryFileSystem.java",
"license": "apache-2.0",
"size": 8438
} | [
"java.util.Collection",
"org.apache.ignite.IgniteException",
"org.apache.ignite.igfs.IgfsFile",
"org.apache.ignite.igfs.IgfsPath"
] | import java.util.Collection; import org.apache.ignite.IgniteException; import org.apache.ignite.igfs.IgfsFile; import org.apache.ignite.igfs.IgfsPath; | import java.util.*; import org.apache.ignite.*; import org.apache.ignite.igfs.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 308,563 |
public Date getDateTimeSent() throws ServiceLocalException {
return (Date) this.getPropertyBag().getObjectFromPropertyDefinition(
ItemSchema.DateTimeSent);
} | Date function() throws ServiceLocalException { return (Date) this.getPropertyBag().getObjectFromPropertyDefinition( ItemSchema.DateTimeSent); } | /**
* Gets the date and time this item was sent.
*
* @return the date time sent
* @throws ServiceLocalException the service local exception
*/ | Gets the date and time this item was sent | getDateTimeSent | {
"repo_name": "evpaassen/ews-java-api",
"path": "src/main/java/microsoft/exchange/webservices/data/Item.java",
"license": "mit",
"size": 37466
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,612,216 |
EAttribute getClock_Daylight_savings_end(); | EAttribute getClock_Daylight_savings_end(); | /**
* Returns the meta object for the attribute '{@link gluemodel.COSEM.InterfaceClasses.Clock#getDaylight_savings_end <em>Daylight savings end</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Daylight savings end</em>'.
* @see gluemodel.COSEM.Interfac... | Returns the meta object for the attribute '<code>gluemodel.COSEM.InterfaceClasses.Clock#getDaylight_savings_end Daylight savings end</code>'. | getClock_Daylight_savings_end | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/COSEM/InterfaceClasses/InterfaceClassesPackage.java",
"license": "mit",
"size": 201104
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,804,437 |
public static Map<String, EffectPattern> getEffectsMap(String basePath)
throws SAXException, IOException, ParserConfigurationException {
Map<String, EffectPattern> effectsMap = new HashMap<>();
if (!basePath.endsWith(".base")) {
basePath += ".base";
}
DocumentBuilderFactory dbf = Documen... | static Map<String, EffectPattern> function(String basePath) throws SAXException, IOException, ParserConfigurationException { Map<String, EffectPattern> effectsMap = new HashMap<>(); if (!basePath.endsWith(".base")) { basePath += ".base"; } DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuild... | /**
* Parses XML base file content to list with Effect objects
*
* @param baseFile
* @return ArrayList with all effects from base
* @throws SAXException
* @throws IOException
* @throws ParserConfigurationException
*/ | Parses XML base file content to list with Effect objects | getEffectsMap | {
"repo_name": "Isangeles/Senlin",
"path": "src/main/java/pl/isangeles/senlin/util/DConnector.java",
"license": "gpl-2.0",
"size": 25872
} | [
"java.io.IOException",
"java.util.HashMap",
"java.util.Map",
"javax.xml.parsers.DocumentBuilder",
"javax.xml.parsers.DocumentBuilderFactory",
"javax.xml.parsers.ParserConfigurationException",
"org.w3c.dom.Document",
"org.w3c.dom.Node",
"org.w3c.dom.NodeList",
"org.xml.sax.SAXException",
"pl.isan... | import java.io.IOException; import java.util.HashMap; import java.util.Map; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.... | import java.io.*; import java.util.*; import javax.xml.parsers.*; import org.w3c.dom.*; import org.xml.sax.*; import pl.isangeles.senlin.data.pattern.*; import pl.isangeles.senlin.util.parser.*; | [
"java.io",
"java.util",
"javax.xml",
"org.w3c.dom",
"org.xml.sax",
"pl.isangeles.senlin"
] | java.io; java.util; javax.xml; org.w3c.dom; org.xml.sax; pl.isangeles.senlin; | 2,273,064 |
public InputStream getInputStream(InputStream in) throws IOException {
if (useWrap()) {
in = new WrappedInputStream(in);
}
return in;
} | InputStream function(InputStream in) throws IOException { if (useWrap()) { in = new WrappedInputStream(in); } return in; } | /**
* Get SASL wrapped InputStream if SASL QoP requires unwrapping,
* otherwise return original stream. Can be called only after
* saslConnect() has been called.
*
* @param in - InputStream used to make the connection
* @return InputStream that may be using SASL unwrap
* @throws IOException
*/ | Get SASL wrapped InputStream if SASL QoP requires unwrapping, otherwise return original stream. Can be called only after saslConnect() has been called | getInputStream | {
"repo_name": "GeLiXin/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslRpcClient.java",
"license": "apache-2.0",
"size": 26580
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,592,148 |
private void loadPropertiesInto( Properties props, String prefix ) {
Iterator<Object> iterator = testProperties.keySet().iterator();
while ( iterator.hasNext() ) {
String propertyKey = (String) iterator.next();
if ( propertyKey.startsWith( prefix ) ) {
props.setProperty( propertyKey, testProperties.ge... | void function( Properties props, String prefix ) { Iterator<Object> iterator = testProperties.keySet().iterator(); while ( iterator.hasNext() ) { String propertyKey = (String) iterator.next(); if ( propertyKey.startsWith( prefix ) ) { props.setProperty( propertyKey, testProperties.getProperty( propertyKey ) ); } } } | /**
* Loads the properties referring to MG.properties from the
* <code>TestUtils#DEFAULT_TEST_PROPERTIES_FILENAME</code>.
*
* @param props Where the properties will be loaded into.
* @param prefix The prefix of the properties that will be loaded into.
*/ | Loads the properties referring to MG.properties from the <code>TestUtils#DEFAULT_TEST_PROPERTIES_FILENAME</code> | loadPropertiesInto | {
"repo_name": "OurGrid/OurGrid",
"path": "src/test/java/org/ourgrid/TestUtils.java",
"license": "lgpl-3.0",
"size": 6852
} | [
"java.util.Iterator",
"java.util.Properties"
] | import java.util.Iterator; import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 2,743,979 |
public Observable<ServiceResponse<IPAddressAvailabilityResultInner>> checkIPAddressAvailabilityWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot b... | Observable<ServiceResponse<IPAddressAvailabilityResultInner>> function(String resourceGroupName, String virtualNetworkName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (virtualNetworkName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null)... | /**
* Checks whether a private IP address is available for use.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkName The name of the virtual network.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to ... | Checks whether a private IP address is available for use | checkIPAddressAvailabilityWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworksInner.java",
"license": "mit",
"size": 103125
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,993,630 |
@Override
public int countAll() {
Long count = (Long)finderCache.getResult(
_finderPathCountAll, FINDER_ARGS_EMPTY, this);
if (count == null) {
Session session = null;
try {
session = openSession();
Query q = session.createQuery(_SQL_COUNT_QUX);
count = (Long)q.uniqueResult();
find... | int function() { Long count = (Long)finderCache.getResult( _finderPathCountAll, FINDER_ARGS_EMPTY, this); if (count == null) { Session session = null; try { session = openSession(); Query q = session.createQuery(_SQL_COUNT_QUX); count = (Long)q.uniqueResult(); finderCache.putResult( _finderPathCountAll, FINDER_ARGS_EMP... | /**
* Returns the number of quxs.
*
* @return the number of quxs
*/ | Returns the number of quxs | countAll | {
"repo_name": "gamerson/liferay-blade-samples",
"path": "maven/apps/workflow/asset/asset-service/src/main/java/com/liferay/blade/workflow/asset/service/persistence/impl/QuxPersistenceImpl.java",
"license": "apache-2.0",
"size": 63872
} | [
"com.liferay.portal.kernel.dao.orm.Query",
"com.liferay.portal.kernel.dao.orm.Session"
] | import com.liferay.portal.kernel.dao.orm.Query; import com.liferay.portal.kernel.dao.orm.Session; | import com.liferay.portal.kernel.dao.orm.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 300,970 |
public static ArrayList<Attribute> tupleDescToAttributeList(TupleDesc td, List<Integer> fields){
ArrayList<Attribute> attrs = new ArrayList<>(fields.size());
for (int i : fields){
Attribute attr = fieldToAttribute(td, i);
attrs.add(attr);
}
ret... | static ArrayList<Attribute> function(TupleDesc td, List<Integer> fields){ ArrayList<Attribute> attrs = new ArrayList<>(fields.size()); for (int i : fields){ Attribute attr = fieldToAttribute(td, i); attrs.add(attr); } return attrs; } | /**
* Create a list of Weka Attributes from a TupleDesc. The resulting list is
* suitable to pass to an Instances object. This does no validation on `fields`.
* @param td the TupleDesc
* @param fields indices identifying which fields should be included
* @return the list of Attributes
... | Create a list of Weka Attributes from a TupleDesc. The resulting list is suitable to pass to an Instances object. This does no validation on `fields` | tupleDescToAttributeList | {
"repo_name": "jfeser/ImputeDB",
"path": "simpledb/src/java/simpledb/WekaUtil.java",
"license": "mit",
"size": 7867
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,263,306 |
public void setBuilderRefs(List<RouteBuilderDefinition> builderRefs) {
this.builderRefs = builderRefs;
} | void function(List<RouteBuilderDefinition> builderRefs) { this.builderRefs = builderRefs; } | /**
* Refers to Java {@link RouteBuilder} instances to include as routes in this CamelContext.
*/ | Refers to Java <code>RouteBuilder</code> instances to include as routes in this CamelContext | setBuilderRefs | {
"repo_name": "anoordover/camel",
"path": "components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java",
"license": "apache-2.0",
"size": 42988
} | [
"java.util.List",
"org.apache.camel.model.RouteBuilderDefinition"
] | import java.util.List; import org.apache.camel.model.RouteBuilderDefinition; | import java.util.*; import org.apache.camel.model.*; | [
"java.util",
"org.apache.camel"
] | java.util; org.apache.camel; | 1,306,799 |
public void addSimpleType(Map<String, Object> targetMap, String key, SimpleType value) {
if (targetMap == null) {
throw new NullPointerException("The target Map argument cannot be null");
}
if (value == null) {
if (includeNullAttributes) {
targetMap.pu... | void function(Map<String, Object> targetMap, String key, SimpleType value) { if (targetMap == null) { throw new NullPointerException(STR); } if (value == null) { if (includeNullAttributes) { targetMap.put(key, value); } } else { String valueString = value.toString(); if (valueString.isEmpty() && includeEmptyAttributes)... | /**
* Add a JSON representation of a JMX OpenMBean SimpleType instance to an existing JSON Object.
*
* @param targetMap the target Map
* @param key the key to use for the value of the SimpleType
* @param value the SimpleType value
*/ | Add a JSON representation of a JMX OpenMBean SimpleType instance to an existing JSON Object | addSimpleType | {
"repo_name": "hqstevenson/splunk-jmx",
"path": "src/main/java/com/pronoia/splunk/jmx/eventcollector/eventbuilder/JmxEventBuilderSupport.java",
"license": "apache-2.0",
"size": 14664
} | [
"java.util.Map",
"javax.management.openmbean.SimpleType"
] | import java.util.Map; import javax.management.openmbean.SimpleType; | import java.util.*; import javax.management.openmbean.*; | [
"java.util",
"javax.management"
] | java.util; javax.management; | 1,175,052 |
private String getNewVerrechnetSideOrIncrement(IBillable code, List<IBilled> lst){
int countSideLeft = 0;
IBilled leftVerrechnet = null;
int countSideRight = 0;
IBilled rightVerrechnet = null;
for (IBilled v : lst) {
if (isInstance(v, code)) {
String side = (String) v.getExtInfo(Constants.FLD_EXT... | String function(IBillable code, List<IBilled> lst){ int countSideLeft = 0; IBilled leftVerrechnet = null; int countSideRight = 0; IBilled rightVerrechnet = null; for (IBilled v : lst) { if (isInstance(v, code)) { String side = (String) v.getExtInfo(Constants.FLD_EXT_SIDE); if (side.equals(Constants.SIDE_L)) { countSide... | /**
* Always toggle the side of a specific code. Starts with left, then right, then add to the
* respective side.
*
* @param code
* @param lst
* @return
*/ | Always toggle the side of a specific code. Starts with left, then right, then add to the respective side | getNewVerrechnetSideOrIncrement | {
"repo_name": "DavidGutknecht/elexis-3-base",
"path": "bundles/ch.elexis.base.ch.arzttarife.model/src/ch/elexis/base/ch/arzttarife/tarmed/model/TarmedOptifier.java",
"license": "epl-1.0",
"size": 39820
} | [
"ch.elexis.core.model.IBillable",
"ch.elexis.core.model.IBilled",
"ch.elexis.core.model.verrechnet.Constants",
"java.util.List"
] | import ch.elexis.core.model.IBillable; import ch.elexis.core.model.IBilled; import ch.elexis.core.model.verrechnet.Constants; import java.util.List; | import ch.elexis.core.model.*; import ch.elexis.core.model.verrechnet.*; import java.util.*; | [
"ch.elexis.core",
"java.util"
] | ch.elexis.core; java.util; | 2,448,175 |
Single<Installation> getOrInitialize(); | Single<Installation> getOrInitialize(); | /**
* Get or initialize the installation. A new installation will be created only if none exists.
*
* @return the created or already existing installation.
*/ | Get or initialize the installation. A new installation will be created only if none exists | getOrInitialize | {
"repo_name": "gravitee-io/graviteeio-access-management",
"path": "gravitee-am-service/src/main/java/io/gravitee/am/service/InstallationService.java",
"license": "apache-2.0",
"size": 2215
} | [
"io.gravitee.am.model.Installation",
"io.reactivex.Single"
] | import io.gravitee.am.model.Installation; import io.reactivex.Single; | import io.gravitee.am.model.*; import io.reactivex.*; | [
"io.gravitee.am",
"io.reactivex"
] | io.gravitee.am; io.reactivex; | 2,631,867 |
private String getModuleImportName(NodeTraversal t, Node n) {
Node rValue = null;
String propSuffix = "";
if (n.isStringKey()
&& n.getParent().isObjectPattern()
&& n.getParent().getParent().isDestructuringLhs()) {
rValue = n.getParent().getNext();
propSuffix = "... | String function(NodeTraversal t, Node n) { Node rValue = null; String propSuffix = STR.STRrequireSTR." + n.getSecondChild().getString() + propSuffix; } } return null; } | /**
* Determine if the given Node n is an alias created by a module import.
*
* @return null if it's not an alias or the imported module name
*/ | Determine if the given Node n is an alias created by a module import | getModuleImportName | {
"repo_name": "GerHobbelt/closure-compiler",
"path": "src/com/google/javascript/jscomp/ProcessCommonJSModules.java",
"license": "apache-2.0",
"size": 50963
} | [
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 2,704,018 |
public static void setRuntimeProperties(Properties props) {
runtimeProperties = props;
} | static void function(Properties props) { runtimeProperties = props; } | /**
* Set the runtime properties to be used by this OpenMRS instance
*
* @param props runtime properties
*/ | Set the runtime properties to be used by this OpenMRS instance | setRuntimeProperties | {
"repo_name": "macorrales/openmrs-core",
"path": "api/src/main/java/org/openmrs/api/context/Context.java",
"license": "mpl-2.0",
"size": 41330
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 1,664,447 |
public List<TipoAtaud> buscarTipoAtaudPorCriterios(BusquedasRequestDTO request) throws FmBusinessException;
| List<TipoAtaud> function(BusquedasRequestDTO request) throws FmBusinessException; | /**
* Metodo para buscar Ataud dependiendo del criterio de busqueda ingresado
* @param request: Objeto de tipo BusquedaAtaudRequestDTO con el criterio de
* busqueda
* @return List<TipoAtaud>: Lista de ataudes encontrados
* @throws FmBusinessException
*/ | Metodo para buscar Ataud dependiendo del criterio de busqueda ingresado | buscarTipoAtaudPorCriterios | {
"repo_name": "jorgegalvez/funeralesmodernos",
"path": "FunerariaEAR/FunerariaEJB/src/java/sv/com/fm/business/ejb/GestorCatalogosBeanLocal.java",
"license": "gpl-2.0",
"size": 27723
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 449,089 |
public void testCreateDependency() {
PackageElement source = (PackageElement)
factory.createNode(ElementType.PACKAGE);
PackageElement target = (PackageElement)
factory.createNode(ElementType.PACKAGE);
Dependency conn = (Dependency) factory.createConnection(
RelationType.DEPEN... | void function() { PackageElement source = (PackageElement) factory.createNode(ElementType.PACKAGE); PackageElement target = (PackageElement) factory.createNode(ElementType.PACKAGE); Dependency conn = (Dependency) factory.createConnection( RelationType.DEPENDENCY, source, target); assertStdConnectionConditions(conn, sou... | /**
* Tests the creation of a Dependency given two Nodes.
*/ | Tests the creation of a Dependency given two Nodes | testCreateDependency | {
"repo_name": "ligenzatomas/firebird-vizualization-tool",
"path": "src/test/java/test/tinyuml/umldraw/structure/DiagramElementFactoryImplTest.java",
"license": "gpl-2.0",
"size": 7185
} | [
"org.tinyuml.model.ElementType",
"org.tinyuml.model.Relation",
"org.tinyuml.model.RelationType",
"org.tinyuml.umldraw.structure.Dependency",
"org.tinyuml.umldraw.structure.PackageElement"
] | import org.tinyuml.model.ElementType; import org.tinyuml.model.Relation; import org.tinyuml.model.RelationType; import org.tinyuml.umldraw.structure.Dependency; import org.tinyuml.umldraw.structure.PackageElement; | import org.tinyuml.model.*; import org.tinyuml.umldraw.structure.*; | [
"org.tinyuml.model",
"org.tinyuml.umldraw"
] | org.tinyuml.model; org.tinyuml.umldraw; | 1,079,410 |
public void sendEmail(final String theTo, final String theFrom, final String theSubject,
final String theContent) {
if (null == smtpServerSetup) {
throw new IllegalStateException("Can not send mail, no SMTP or SMTPS setup found");
}
GreenMailUtil.sendTex... | void function(final String theTo, final String theFrom, final String theSubject, final String theContent) { if (null == smtpServerSetup) { throw new IllegalStateException(STR); } GreenMailUtil.sendTextEmail(theTo, theFrom, theSubject, theContent, smtpServerSetup); } | /**
* Sends a mail message to the GreenMail server.
* <p/>
* Note: SMTP or SMTPS must be configured.
*
* @param theTo the <em>TO</em> field.
* @param theFrom the <em>FROM</em>field.
* @param theSubject the subject.
* @param theContent the message content.
*/ | Sends a mail message to the GreenMail server. Note: SMTP or SMTPS must be configured | sendEmail | {
"repo_name": "Chessray/greenmail",
"path": "greenmail-spring/src/main/java/com/icegreen/greenmail/spring/GreenMailBean.java",
"license": "apache-2.0",
"size": 11272
} | [
"com.icegreen.greenmail.util.GreenMailUtil"
] | import com.icegreen.greenmail.util.GreenMailUtil; | import com.icegreen.greenmail.util.*; | [
"com.icegreen.greenmail"
] | com.icegreen.greenmail; | 66,070 |
@GwtIncompatible("Unnecessary")
@VisibleForTesting
void writeOutput(
Appendable out,
Compiler compiler,
String code,
String wrapper,
String codePlaceholder,
@Nullable Function<String, String> escaper)
throws IOException {
int pos = wrapper.indexOf(codePlaceholder);
... | @GwtIncompatible(STR) void writeOutput( Appendable out, Compiler compiler, String code, String wrapper, String codePlaceholder, @Nullable Function<String, String> escaper) throws IOException { int pos = wrapper.indexOf(codePlaceholder); if (pos != -1) { String prefix = ""; if (pos > 0) { prefix = wrapper.substring(0, p... | /**
* Writes code to an output stream, optionally wrapping it in an arbitrary wrapper that contains a
* placeholder where the code should be inserted.
*/ | Writes code to an output stream, optionally wrapping it in an arbitrary wrapper that contains a placeholder where the code should be inserted | writeOutput | {
"repo_name": "Yannic/closure-compiler",
"path": "src/com/google/javascript/jscomp/AbstractCommandLineRunner.java",
"license": "apache-2.0",
"size": 101505
} | [
"com.google.common.annotations.GwtIncompatible",
"com.google.common.base.Function",
"java.io.IOException",
"javax.annotation.Nullable"
] | import com.google.common.annotations.GwtIncompatible; import com.google.common.base.Function; import java.io.IOException; import javax.annotation.Nullable; | import com.google.common.annotations.*; import com.google.common.base.*; import java.io.*; import javax.annotation.*; | [
"com.google.common",
"java.io",
"javax.annotation"
] | com.google.common; java.io; javax.annotation; | 1,984,199 |
@Override
protected AutoCloseable configureSaslMechanismOnServer(String mechanism, boolean withSsl) throws Exception {
String patternFilter = mechanism + "\\$";
try (CLIWrapper cli = new CLIWrapper(true)) {
cli.sendLine(String.format(
"/subsystem=elytron/configura... | AutoCloseable function(String mechanism, boolean withSsl) throws Exception { String patternFilter = mechanism + "\\$"; try (CLIWrapper cli = new CLIWrapper(true)) { cli.sendLine(String.format( STR, NAME, patternFilter)); String sslContextCli = withSsl ? String.format( STR, NAME) : STR; cli.sendLine(sslContextCli); } Se... | /**
* Configures test sasl-server-factory to use given mechanism. It also enables/disables SSL based on provided flag.
*/ | Configures test sasl-server-factory to use given mechanism. It also enables/disables SSL based on provided flag | configureSaslMechanismOnServer | {
"repo_name": "yersan/wildfly-core",
"path": "testsuite/elytron/src/test/java/org/wildfly/test/integration/elytron/sasl/mgmt/KerberosNativeMgmtSaslTestCase.java",
"license": "lgpl-2.1",
"size": 10234
} | [
"org.jboss.as.test.integration.management.util.CLIWrapper",
"org.jboss.as.test.integration.management.util.ServerReload",
"org.jboss.as.test.shared.TestSuiteEnvironment"
] | import org.jboss.as.test.integration.management.util.CLIWrapper; import org.jboss.as.test.integration.management.util.ServerReload; import org.jboss.as.test.shared.TestSuiteEnvironment; | import org.jboss.as.test.integration.management.util.*; import org.jboss.as.test.shared.*; | [
"org.jboss.as"
] | org.jboss.as; | 378,683 |
@ServiceMethod(returns = ReturnType.SINGLE)
public AppInner getByResourceGroup(String resourceGroupName, String resourceName) {
return getByResourceGroupAsync(resourceGroupName, resourceName).block();
} | @ServiceMethod(returns = ReturnType.SINGLE) AppInner function(String resourceGroupName, String resourceName) { return getByResourceGroupAsync(resourceGroupName, resourceName).block(); } | /**
* Get the metadata of an IoT Central application.
*
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
* @param resourceName The ARM resource name of the IoT Central application.
* @throws IllegalArgumentException thrown if parameters fail t... | Get the metadata of an IoT Central application | getByResourceGroup | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/iotcentral/azure-resourcemanager-iotcentral/src/main/java/com/azure/resourcemanager/iotcentral/implementation/AppsClientImpl.java",
"license": "mit",
"size": 103959
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.iotcentral.fluent.models.AppInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.iotcentral.fluent.models.AppInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.iotcentral.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 385,719 |
@RequestMapping(value = "/task/watchersCount", method = RequestMethod.GET)
public int watchersCount(@RequestParam(value = "id") String id) {
WatchedTask watched = watchSrv.getByTask(id);
return watched != null ? watched.getWatchers().size() : 0;
} | @RequestMapping(value = STR, method = RequestMethod.GET) int function(@RequestParam(value = "id") String id) { WatchedTask watched = watchSrv.getByTask(id); return watched != null ? watched.getWatchers().size() : 0; } | /**
* Returns int how many accounts is currently watching task with id
*
* @param id
* @return
*/ | Returns int how many accounts is currently watching task with id | watchersCount | {
"repo_name": "q-programming/tasq",
"path": "src/main/java/com/qprogramming/tasq/task/TaskRestController.java",
"license": "gpl-2.0",
"size": 4584
} | [
"com.qprogramming.tasq.task.watched.WatchedTask",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotation.RequestMethod",
"org.springframework.web.bind.annotation.RequestParam"
] | import com.qprogramming.tasq.task.watched.WatchedTask; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; | import com.qprogramming.tasq.task.watched.*; import org.springframework.web.bind.annotation.*; | [
"com.qprogramming.tasq",
"org.springframework.web"
] | com.qprogramming.tasq; org.springframework.web; | 2,907,278 |
@Override
public int getMetaFromState(IBlockState state)
{
int i;
switch ((EnumFacing)state.getValue(FACING))
{
case EAST:
i = 1;
break;
case WEST:
i = 2;
break;
case SOUTH:
... | int function(IBlockState state) { int i; switch ((EnumFacing)state.getValue(FACING)) { case EAST: i = 1; break; case WEST: i = 2; break; case SOUTH: i = 3; break; case NORTH: i = 4; break; case UP: default: i = 5; break; case DOWN: i = 0; } return i; } | /**
* Convert the BlockState into the correct metadata value
*/ | Convert the BlockState into the correct metadata value | getMetaFromState | {
"repo_name": "BigBastardPhony/Valkyrien-Warfare-Revamped",
"path": "src/main/java/ValkyrienWarfareControl/Block/BlockThrustRelay.java",
"license": "lgpl-2.1",
"size": 6380
} | [
"net.minecraft.block.state.IBlockState",
"net.minecraft.util.EnumFacing"
] | import net.minecraft.block.state.IBlockState; import net.minecraft.util.EnumFacing; | import net.minecraft.block.state.*; import net.minecraft.util.*; | [
"net.minecraft.block",
"net.minecraft.util"
] | net.minecraft.block; net.minecraft.util; | 2,909,919 |
@Test
public void shouldWriteDEFAULTClassicGraphAsGryoV3d0() throws IOException {
final OutputStream os = new FileOutputStream(new File(tempPath, "tinkerpop-classic.kryo"));
GryoWriter.build().mapper(GryoMapper.build().version(GryoVersion.V3_0).create()).create().writeGraph(os, TinkerFactory.cre... | void function() throws IOException { final OutputStream os = new FileOutputStream(new File(tempPath, STR)); GryoWriter.build().mapper(GryoMapper.build().version(GryoVersion.V3_0).create()).create().writeGraph(os, TinkerFactory.createClassic()); os.close(); } | /**
* No assertions. Just write out the graph for convenience.
*/ | No assertions. Just write out the graph for convenience | shouldWriteDEFAULTClassicGraphAsGryoV3d0 | {
"repo_name": "robertdale/tinkerpop",
"path": "tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/IoDataGenerationTest.java",
"license": "apache-2.0",
"size": 30327
} | [
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.OutputStream",
"org.apache.tinkerpop.gremlin.structure.io.gryo.GryoMapper",
"org.apache.tinkerpop.gremlin.structure.io.gryo.GryoVersion",
"org.apache.tinkerpop.gremlin.structure.io.gryo.GryoWriter"
] | import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoMapper; import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoVersion; import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoWriter; | import java.io.*; import org.apache.tinkerpop.gremlin.structure.io.gryo.*; | [
"java.io",
"org.apache.tinkerpop"
] | java.io; org.apache.tinkerpop; | 777,907 |
public VersionTag getVersionTag(Object key) {
Region.Entry entry = getEntry(key, true);
VersionTag tag = null;
if (entry != null && entry instanceof EntrySnapshot) {
tag = ((EntrySnapshot) entry).getVersionTag();
} else if (entry != null && entry instanceof NonTXEntry) {
tag = ((NonTXEntry... | VersionTag function(Object key) { Region.Entry entry = getEntry(key, true); VersionTag tag = null; if (entry != null && entry instanceof EntrySnapshot) { tag = ((EntrySnapshot) entry).getVersionTag(); } else if (entry != null && entry instanceof NonTXEntry) { tag = ((NonTXEntry) entry).getRegionEntry().getVersionStamp(... | /**
* Test hook - returns the version stamp for an entry in the form of a version tag
*
* @return the entry version information
*/ | Test hook - returns the version stamp for an entry in the form of a version tag | getVersionTag | {
"repo_name": "charliemblack/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java",
"license": "apache-2.0",
"size": 428144
} | [
"org.apache.geode.cache.Region",
"org.apache.geode.internal.cache.versions.VersionTag"
] | import org.apache.geode.cache.Region; import org.apache.geode.internal.cache.versions.VersionTag; | import org.apache.geode.cache.*; import org.apache.geode.internal.cache.versions.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,883,651 |
public void setOnCompletions(List<OnCompletionDefinition> onCompletions) {
this.onCompletions = onCompletions;
} | void function(List<OnCompletionDefinition> onCompletions) { this.onCompletions = onCompletions; } | /**
* Configuration of sub routes to run at the completion of routing.
*/ | Configuration of sub routes to run at the completion of routing | setOnCompletions | {
"repo_name": "adessaigne/camel",
"path": "components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java",
"license": "apache-2.0",
"size": 49808
} | [
"java.util.List",
"org.apache.camel.model.OnCompletionDefinition"
] | import java.util.List; import org.apache.camel.model.OnCompletionDefinition; | import java.util.*; import org.apache.camel.model.*; | [
"java.util",
"org.apache.camel"
] | java.util; org.apache.camel; | 2,695,799 |
@SuppressWarnings("unchecked")
public VehicleDataResult getRpm() {
Object obj = parameters.get(KEY_RPM);
if (obj instanceof VehicleDataResult) {
return (VehicleDataResult) obj;
} else if (obj instanceof Hashtable) {
try {
return new VehicleDataResult((H... | @SuppressWarnings(STR) VehicleDataResult function() { Object obj = parameters.get(KEY_RPM); if (obj instanceof VehicleDataResult) { return (VehicleDataResult) obj; } else if (obj instanceof Hashtable) { try { return new VehicleDataResult((Hashtable<String, Object>) obj); } catch (Exception e) { DebugTool.logError(STR +... | /**
* Gets rpm
* @return VehicleDataResult
*/ | Gets rpm | getRpm | {
"repo_name": "mrapitis/sdl_android",
"path": "sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java",
"license": "bsd-3-clause",
"size": 25197
} | [
"com.smartdevicelink.util.DebugTool",
"java.util.Hashtable"
] | import com.smartdevicelink.util.DebugTool; import java.util.Hashtable; | import com.smartdevicelink.util.*; import java.util.*; | [
"com.smartdevicelink.util",
"java.util"
] | com.smartdevicelink.util; java.util; | 1,567,928 |
Builder addRuntimeDeps(List<? extends TransitiveInfoCollection> runtimeDeps) {
if (compileInfoMigration) {
return addRuntimeDepsPostMigration(runtimeDeps);
} else {
return addRuntimeDepsPreMigration(runtimeDeps);
}
} | Builder addRuntimeDeps(List<? extends TransitiveInfoCollection> runtimeDeps) { if (compileInfoMigration) { return addRuntimeDepsPostMigration(runtimeDeps); } else { return addRuntimeDepsPreMigration(runtimeDeps); } } | /**
* Adds providers for runtime frameworks included in the final app bundle but not linked with
* at build time.
*/ | Adds providers for runtime frameworks included in the final app bundle but not linked with at build time | addRuntimeDeps | {
"repo_name": "davidzchen/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/objc/ObjcCommon.java",
"license": "apache-2.0",
"size": 26880
} | [
"com.google.devtools.build.lib.analysis.TransitiveInfoCollection",
"java.util.List"
] | import com.google.devtools.build.lib.analysis.TransitiveInfoCollection; import java.util.List; | import com.google.devtools.build.lib.analysis.*; import java.util.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 416,944 |
@GET
@Produces("application/pdf")
@Path("/{reportname}")
public final Response run (@PathParam("reportname") final String reportName, @Context final UriInfo uriInfo) {
final Optional<JasperPrint> filledReport = reportService.run(reportName, extractReportParams(uriInfo));
if (!filledRepo... | @Produces(STR) @Path(STR) final Response function (@PathParam(STR) final String reportName, @Context final UriInfo uriInfo) { final Optional<JasperPrint> filledReport = reportService.run(reportName, extractReportParams(uriInfo)); if (!filledReport.isPresent()) { return Response.status(Status.NOT_FOUND).build(); } retur... | /**
* Run (fill) a report.
*
* @param reportName report name to run
* @param uriInfo uri info needed to obtain query parameters
* @return {@link Response} with PDF of report output
*/ | Run (fill) a report | run | {
"repo_name": "jonmbake/reports-micro-service",
"path": "src/main/java/com/jonbake/report/rest/ReportRunnerResource.java",
"license": "mit",
"size": 2865
} | [
"com.jonbake.report.exception.ReportRunningException",
"java.io.OutputStream",
"java.util.Optional",
"java.util.logging.Level",
"java.util.logging.Logger",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.core.Context",
"javax.ws.rs.core.Response",
"javax.ws.rs.c... | import com.jonbake.report.exception.ReportRunningException; import java.io.OutputStream; import java.util.Optional; import java.util.logging.Level; import java.util.logging.Logger; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.cor... | import com.jonbake.report.exception.*; import java.io.*; import java.util.*; import java.util.logging.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import net.sf.jasperreports.engine.*; | [
"com.jonbake.report",
"java.io",
"java.util",
"javax.ws",
"net.sf.jasperreports"
] | com.jonbake.report; java.io; java.util; javax.ws; net.sf.jasperreports; | 2,842,216 |
Object createField(VRMLNodeType node, String field, boolean checkEventIn); | Object createField(VRMLNodeType node, String field, boolean checkEventIn); | /**
* Create a field given a name from the node.
*
* @param node The node to create the field from
* @param field The name of the field to fetch
* @param checkEventIn true if we should check for an event in
* @return An instance of the field class representing the field
* @throws Inva... | Create a field given a name from the node | createField | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/web3d/vrml/scripting/ecmascript/builtin/FieldFactory.java",
"license": "gpl-2.0",
"size": 2148
} | [
"org.web3d.vrml.nodes.VRMLNodeType"
] | import org.web3d.vrml.nodes.VRMLNodeType; | import org.web3d.vrml.nodes.*; | [
"org.web3d.vrml"
] | org.web3d.vrml; | 524,821 |
public com.actiontech.dble.alarm.UcoreInterface.Empty updateConfigCommit(com.actiontech.dble.alarm.UcoreInterface.UpdateConfigCommitInput request) {
return blockingUnaryCall(
getChannel(), METHOD_UPDATE_CONFIG_COMMIT, getCallOptions(), request);
} | com.actiontech.dble.alarm.UcoreInterface.Empty function(com.actiontech.dble.alarm.UcoreInterface.UpdateConfigCommitInput request) { return blockingUnaryCall( getChannel(), METHOD_UPDATE_CONFIG_COMMIT, getCallOptions(), request); } | /**
* <pre>
* UpdateConfigCommit is of 3-phase commit.
* </pre>
*/ | <code> UpdateConfigCommit is of 3-phase commit. </code> | updateConfigCommit | {
"repo_name": "actiontech/dble",
"path": "src/main/java/com/actiontech/dble/alarm/UcoreGrpc.java",
"license": "gpl-2.0",
"size": 134635
} | [
"io.grpc.stub.ClientCalls"
] | import io.grpc.stub.ClientCalls; | import io.grpc.stub.*; | [
"io.grpc.stub"
] | io.grpc.stub; | 1,859,899 |
public static boolean containsOver(RexNode expr) {
try {
expr.accept(FINDER);
return false;
} catch (OverFound e) {
Util.swallow(e, null);
return true;
}
} | static boolean function(RexNode expr) { try { expr.accept(FINDER); return false; } catch (OverFound e) { Util.swallow(e, null); return true; } } | /**
* Returns whether an expression contains an OVER clause.
*/ | Returns whether an expression contains an OVER clause | containsOver | {
"repo_name": "arina-ielchiieva/calcite",
"path": "core/src/main/java/org/apache/calcite/rex/RexOver.java",
"license": "apache-2.0",
"size": 5291
} | [
"org.apache.calcite.util.Util"
] | import org.apache.calcite.util.Util; | import org.apache.calcite.util.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 694,540 |
private String generateFolder(String mission, String source, String id) {
String rel_path = getGeoCollectPath(GC_MEDIA_DIR,mission, source, id);
String path = getFilePath("",rel_path);
new File(path).mkdirs();
return rel_path;
} | String function(String mission, String source, String id) { String rel_path = getGeoCollectPath(GC_MEDIA_DIR,mission, source, id); String path = getFilePath("",rel_path); new File(path).mkdirs(); return rel_path; } | /**
* Generate the folder for the file to upload (in the runtimedir under geocollect directory
* @param mission the mission
* @param source
* @param id
* @return
*/ | Generate the folder for the file to upload (in the runtimedir under geocollect directory | generateFolder | {
"repo_name": "offtherailz/OpenSDI-Manager2",
"path": "src/modules/geocollect/src/main/java/it/geosolutions/opensdi2/mvc/GeoCollectDataController.java",
"license": "gpl-3.0",
"size": 8926
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,184,122 |
@SuppressWarnings("PMD.UselessParentheses")
@VisibleForTesting
void tagSpotInstances(DateTime timeout) throws InterruptedException {
// Pre-compute user-defined tags for efficiency
List<Tag> userDefinedTags = ec2TagHelper.getUserDefinedTags(template);
for (SpotAllocationRecord spotAllocationRecord :
... | @SuppressWarnings(STR) void tagSpotInstances(DateTime timeout) throws InterruptedException { List<Tag> userDefinedTags = ec2TagHelper.getUserDefinedTags(template); for (SpotAllocationRecord spotAllocationRecord : spotAllocationRecordsByVirtualInstanceId.values()) { if ((spotAllocationRecord.ec2InstanceId != null) && !s... | /**
* Tags provisioned Spot instances. Expects that the instances already exists or are in the
* process of being created. Instances that are not started before the timeout expires are
* not tagged.
*
* @param timeout the time point of timeout
* @throws InterruptedException if the operation is interru... | Tags provisioned Spot instances. Expects that the instances already exists or are in the process of being created. Instances that are not started before the timeout expires are not tagged | tagSpotInstances | {
"repo_name": "cloudera/director-aws-plugin",
"path": "provider/src/main/java/com/cloudera/director/aws/ec2/allocation/spot/SpotGroupAllocator.java",
"license": "apache-2.0",
"size": 39051
} | [
"com.amazonaws.services.ec2.model.Tag",
"java.util.List",
"org.joda.time.DateTime"
] | import com.amazonaws.services.ec2.model.Tag; import java.util.List; import org.joda.time.DateTime; | import com.amazonaws.services.ec2.model.*; import java.util.*; import org.joda.time.*; | [
"com.amazonaws.services",
"java.util",
"org.joda.time"
] | com.amazonaws.services; java.util; org.joda.time; | 2,441,897 |
public static BoundingBoxE6 getBoundingBoxFromPointInMapTile(final Point aMapTile,
final int aZoom) {
return new BoundingBoxE6(tile2lat(aMapTile.y, aZoom), tile2lon(aMapTile.x + 1, aZoom),
tile2lat(aMapTile.y + 1, aZoom), tile2lon(aMapTile.x, aZoom));
}
| static BoundingBoxE6 function(final Point aMapTile, final int aZoom) { return new BoundingBoxE6(tile2lat(aMapTile.y, aZoom), tile2lon(aMapTile.x + 1, aZoom), tile2lat(aMapTile.y + 1, aZoom), tile2lon(aMapTile.x, aZoom)); } | /**
* Get bounding box from reverse Mercator projection.
*
* @param aMapTile
* @param aZoom
* @return
*/ | Get bounding box from reverse Mercator projection | getBoundingBoxFromPointInMapTile | {
"repo_name": "dimy93/sports-cubed-android",
"path": "osmdroid-android/src/main/java/org/osmdroid/views/util/Mercator.java",
"license": "mpl-2.0",
"size": 5106
} | [
"android.graphics.Point",
"org.osmdroid.util.BoundingBoxE6"
] | import android.graphics.Point; import org.osmdroid.util.BoundingBoxE6; | import android.graphics.*; import org.osmdroid.util.*; | [
"android.graphics",
"org.osmdroid.util"
] | android.graphics; org.osmdroid.util; | 1,079,681 |
@Test
public void overrideDefaultMethodInInterfaceToProvideUserEnteredSongRatings() {
MusicLibrary library = new UserRatedLocalFilesystemMusicLibrary();
assertThat(library.ratingOf(new Song("Desolation Row", "Bob Dylan")), is(new Rating(60)));
assertThat(UserRatedMusicLibrary.class, Has... | void function() { MusicLibrary library = new UserRatedLocalFilesystemMusicLibrary(); assertThat(library.ratingOf(new Song(STR, STR)), is(new Rating(60))); assertThat(UserRatedMusicLibrary.class, HasConcreteMethod.called(STR)); } | /**
* Override the default method {@link MusicLibrary#ratingOf(Song)} in {@link UserRatedMusicLibrary} to return
* a {@link Rating} based on the {@link StarRating} entered by the user.
* <br/>
* The method {@link UserRatedMusicLibrary#userRatingOf(Song)} provides a user-entered rating that can be co... | Override the default method <code>MusicLibrary#ratingOf(Song)</code> in <code>UserRatedMusicLibrary</code> to return a <code>Rating</code> based on the <code>StarRating</code> entered by the user. The method <code>UserRatedMusicLibrary#userRatingOf(Song)</code> provides a user-entered rating that can be converted to a ... | overrideDefaultMethodInInterfaceToProvideUserEnteredSongRatings | {
"repo_name": "jasonwee/lambda-tutorial",
"path": "src/test/java/org/adoptopenjdk/lambda/tutorial/Exercise_5_Test.java",
"license": "gpl-2.0",
"size": 14823
} | [
"org.adoptopenjdk.lambda.tutorial.exercise5.musicplayer.MusicLibrary",
"org.adoptopenjdk.lambda.tutorial.exercise5.musicplayer.Rating",
"org.adoptopenjdk.lambda.tutorial.exercise5.musicplayer.Song",
"org.adoptopenjdk.lambda.tutorial.exercise5.musicplayer.UserRatedMusicLibrary",
"org.adoptopenjdk.lambda.tuto... | import org.adoptopenjdk.lambda.tutorial.exercise5.musicplayer.MusicLibrary; import org.adoptopenjdk.lambda.tutorial.exercise5.musicplayer.Rating; import org.adoptopenjdk.lambda.tutorial.exercise5.musicplayer.Song; import org.adoptopenjdk.lambda.tutorial.exercise5.musicplayer.UserRatedMusicLibrary; import org.adoptopenj... | import org.adoptopenjdk.lambda.tutorial.exercise5.musicplayer.*; import org.adoptopenjdk.lambda.tutorial.exercise5.thirdpartyplugin.*; import org.adoptopenjdk.lambda.tutorial.util.*; import org.hamcrest.*; | [
"org.adoptopenjdk.lambda",
"org.hamcrest"
] | org.adoptopenjdk.lambda; org.hamcrest; | 96,735 |
@Test
public void testEncrypt256Cbc() {
byte[] key = Base16.decode(KEY256);
byte[] have = Base16.decode(CLEAR256X2);
byte[] want = Base16.decode(CBC256X2);
byte[] iv = new byte[32];
Rijndael r = new Rijndael(32, 32);
r.setKey(key);
r.encryptCbc(have, iv);... | void function() { byte[] key = Base16.decode(KEY256); byte[] have = Base16.decode(CLEAR256X2); byte[] want = Base16.decode(CBC256X2); byte[] iv = new byte[32]; Rijndael r = new Rijndael(32, 32); r.setKey(key); r.encryptCbc(have, iv); assertArrayEquals(want, have); } | /**
* encrypt two 256 bit blocks with a 256 bit key, CBC mode
*/ | encrypt two 256 bit blocks with a 256 bit key, CBC mode | testEncrypt256Cbc | {
"repo_name": "sarah-happy/happy-archive",
"path": "archive/src/main/java/org/yi/happy/crypt/RijndaelTest.java",
"license": "apache-2.0",
"size": 7088
} | [
"org.yi.happy.archive.Base16"
] | import org.yi.happy.archive.Base16; | import org.yi.happy.archive.*; | [
"org.yi.happy"
] | org.yi.happy; | 2,717,731 |
public void testEviction_maxWeight_entryTooBig() {
CountingRemovalListener<Integer, Integer> removalListener = countingRemovalListener();
IdentityLoader<Integer> loader = identityLoader();
LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder()
.concurrencyLevel(1)
.maximumWeight... | void function() { CountingRemovalListener<Integer, Integer> removalListener = countingRemovalListener(); IdentityLoader<Integer> loader = identityLoader(); LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() .concurrencyLevel(1) .maximumWeight(4) .weigher(intValueWeigher()) .removalListener(removalListener... | /**
* Tests that when a single entry exceeds the segment's max weight, the new entry is
* immediately evicted and nothing else.
*/ | Tests that when a single entry exceeds the segment's max weight, the new entry is immediately evicted and nothing else | testEviction_maxWeight_entryTooBig | {
"repo_name": "DavesMan/guava",
"path": "guava-tests/test/com/google/common/cache/CacheEvictionTest.java",
"license": "apache-2.0",
"size": 15214
} | [
"com.google.common.cache.TestingCacheLoaders",
"com.google.common.cache.TestingRemovalListeners",
"com.google.common.truth.Truth"
] | import com.google.common.cache.TestingCacheLoaders; import com.google.common.cache.TestingRemovalListeners; import com.google.common.truth.Truth; | import com.google.common.cache.*; import com.google.common.truth.*; | [
"com.google.common"
] | com.google.common; | 1,201,310 |
public FancyMessage itemTooltip(final ItemStack itemStack) {
try {
final Object nmsItem = Reflection.getMethod(Reflection.getOBCClass("inventory.CraftItemStack"), "asNMSCopy", ItemStack.class).invoke(null, itemStack);
return itemTooltip(Reflection.getMethod(Reflection.getNMSClass("It... | FancyMessage function(final ItemStack itemStack) { try { final Object nmsItem = Reflection.getMethod(Reflection.getOBCClass(STR), STR, ItemStack.class).invoke(null, itemStack); return itemTooltip(Reflection.getMethod(Reflection.getNMSClass(STR), "save", Reflection.getNMSClass(STR)) .invoke(nmsItem, Reflection.getNMSCla... | /**
* Set the behavior of the current editing component to display information about an item when the client hovers over the text.
* <p>Tooltips do not inherit display characteristics, such as color and styles, from the message component on which they are applied.</p>
* @param itemStack The stack for whi... | Set the behavior of the current editing component to display information about an item when the client hovers over the text. Tooltips do not inherit display characteristics, such as color and styles, from the message component on which they are applied | itemTooltip | {
"repo_name": "SilverCory/PlotSquared",
"path": "Bukkit/src/main/java/com/plotsquared/bukkit/chat/FancyMessage.java",
"license": "gpl-3.0",
"size": 41847
} | [
"org.bukkit.inventory.ItemStack"
] | import org.bukkit.inventory.ItemStack; | import org.bukkit.inventory.*; | [
"org.bukkit.inventory"
] | org.bukkit.inventory; | 958,120 |
void endASTProbing(RootNode rootNode); | void endASTProbing(RootNode rootNode); | /**
* Notifies that the application of all registered {@link ASTProber}s to a newly constructed AST
* has completed.
*
* @param rootNode parent of the newly created AST
* @since 0.8 or earlier
*/ | Notifies that the application of all registered <code>ASTProber</code>s to a newly constructed AST has completed | endASTProbing | {
"repo_name": "chumer/truffle",
"path": "truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/ProbeListener.java",
"license": "gpl-2.0",
"size": 3732
} | [
"com.oracle.truffle.api.nodes.RootNode"
] | import com.oracle.truffle.api.nodes.RootNode; | import com.oracle.truffle.api.nodes.*; | [
"com.oracle.truffle"
] | com.oracle.truffle; | 665,142 |
private ArrayList<Pipeline> getPipelines(int policyId) throws APIManagementException {
Connection connection = null;
PreparedStatement pipelinesStatement = null;
ResultSet resultSet = null;
ArrayList<Pipeline> pipelines = new ArrayList<Pipeline>();
try {
connect... | ArrayList<Pipeline> function(int policyId) throws APIManagementException { Connection connection = null; PreparedStatement pipelinesStatement = null; ResultSet resultSet = null; ArrayList<Pipeline> pipelines = new ArrayList<Pipeline>(); try { connection = APIMgtDBUtil.getConnection(); pipelinesStatement = connection.pr... | /**
* Retrieves list of pipelines for the policy with policy Id: <code>policyId</code>
*
* @param policyId policy id of the pipelines
* @return list of pipelines
* @throws APIManagementException
*/ | Retrieves list of pipelines for the policy with policy Id: <code>policyId</code> | getPipelines | {
"repo_name": "tharikaGitHub/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java",
"license": "apache-2.0",
"size": 805423
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.util.ArrayList",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.model.policy.BandwidthLimit",
"org.wso2.carbon.apimgt.api.model.policy.Condition",
"org.wso2.car... | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.policy.BandwidthLimit; import org.wso2.carbon.apimgt.api.model.policy.Cond... | import java.sql.*; import java.util.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.policy.*; import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.apimgt.impl.dao.constants.*; import org.wso2.carbon.apimgt.impl.utils.*; | [
"java.sql",
"java.util",
"org.wso2.carbon"
] | java.sql; java.util; org.wso2.carbon; | 1,410,325 |
public static void main(String[] args) {
if (args.length <= 0) {
System.err.println("No parameters file");
System.exit(1);
}
SetupParameters global = new SetupParameters();
global.LoadParameters(args[0]);
OpenDataset train = new OpenDataset();
OpenDataset test = null;
Ope... | static void function(String[] args) { if (args.length <= 0) { System.err.println(STR); System.exit(1); } SetupParameters global = new SetupParameters(); global.LoadParameters(args[0]); OpenDataset train = new OpenDataset(); OpenDataset test = null; OpenDataset validation = null; boolean isTrain; train.processClassifier... | /**
* <p>
* Main function
* </p>
* @param args to the main method
* @throws FileNotFoundException
* @throws IOException
*/ | Main function | main | {
"repo_name": "adofsauron/KEEL",
"path": "src/keel/Algorithms/Neural_Networks/gmdh/Genesis.java",
"license": "gpl-3.0",
"size": 10115
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 2,159,022 |
public void setFinishDate(final Date finishDate) {
this.finishDate = finishDate;
} | void function(final Date finishDate) { this.finishDate = finishDate; } | /**
* The end date of the iteration
*/ | The end date of the iteration | setFinishDate | {
"repo_name": "Microsoft/vso-httpclient-java",
"path": "Rest/alm-tfs-client/src/main/generated/com/microsoft/alm/teamfoundation/work/webapi/TimelineTeamIteration.java",
"license": "mit",
"size": 3365
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 308,864 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.