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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
EAttribute getMeterAssetMMXUPair_Name(); | EAttribute getMeterAssetMMXUPair_Name(); | /**
* Returns the meta object for the attribute '{@link gluemodel.MeterAssetMMXUPair#getName <em>Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Name</em>'.
* @see gluemodel.MeterAssetMMXUPair#getName()
* @see #getMeterAssetMMXUPair()
* @gene... | Returns the meta object for the attribute '<code>gluemodel.MeterAssetMMXUPair#getName Name</code>'. | getMeterAssetMMXUPair_Name | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/GluemodelPackage.java",
"license": "mit",
"size": 27097
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,043,164 |
public KualiDecimal getPeriod4Depreciation1Amount() {
return period4Depreciation1Amount;
}
| KualiDecimal function() { return period4Depreciation1Amount; } | /**
* Gets the period4Depreciation1Amount attribute.
*
* @return Returns the period4Depreciation1Amount
*
*/ | Gets the period4Depreciation1Amount attribute | getPeriod4Depreciation1Amount | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/cam/businessobject/AssetPayment.java",
"license": "agpl-3.0",
"size": 41451
} | [
"org.kuali.rice.core.api.util.type.KualiDecimal"
] | import org.kuali.rice.core.api.util.type.KualiDecimal; | import org.kuali.rice.core.api.util.type.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 116,194 |
public void clone(String parentImage, String parentSnap, IoCTX childIo,
String childName, long features, int order, long stripe_unit,
long stripe_count) throws RbdException {
IntByReference orderRef = new IntByReference(order);
int r = rbd.rbd_clone2(this.... | void function(String parentImage, String parentSnap, IoCTX childIo, String childName, long features, int order, long stripe_unit, long stripe_count) throws RbdException { IntByReference orderRef = new IntByReference(order); int r = rbd.rbd_clone2(this.io, parentImage, parentSnap, childIo.getPointer(), childName, featur... | /**
* Clone a RBD image
*
* @param parentImage
* The name of the parent image
* @param parentSnap
* The snapshot of the parent image (has to be protected)
* @param childIo
* The IoCTX for the child image
* @param childName
* The name for ... | Clone a RBD image | clone | {
"repo_name": "ceph/rados-java",
"path": "src/main/java/com/ceph/rbd/Rbd.java",
"license": "apache-2.0",
"size": 11354
} | [
"com.ceph.rados.IoCTX",
"com.sun.jna.ptr.IntByReference"
] | import com.ceph.rados.IoCTX; import com.sun.jna.ptr.IntByReference; | import com.ceph.rados.*; import com.sun.jna.ptr.*; | [
"com.ceph.rados",
"com.sun.jna"
] | com.ceph.rados; com.sun.jna; | 1,484,282 |
@ServiceMethod(returns = ReturnType.SINGLE)
public AfdOriginGroupInner create(
String resourceGroupName,
String profileName,
String originGroupName,
AfdOriginGroupInner originGroup,
Context context) {
return createAsync(resourceGroupName, profileName, originGroupN... | @ServiceMethod(returns = ReturnType.SINGLE) AfdOriginGroupInner function( String resourceGroupName, String profileName, String originGroupName, AfdOriginGroupInner originGroup, Context context) { return createAsync(resourceGroupName, profileName, originGroupName, originGroup, context).block(); } | /**
* Creates a new origin group within the specified profile.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique
* within the resource group.
... | Creates a new origin group within the specified profile | create | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginGroupsClientImpl.java",
"license": "mit",
"size": 96553
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context",
"com.azure.resourcemanager.cdn.fluent.models.AfdOriginGroupInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.cdn.fluent.models.AfdOriginGroupInner; | import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.cdn.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,601,366 |
@Override
public Class<?> getType(final FacesContext arg0) throws EvaluationException, PropertyNotFoundException {
return getExpectedType();
} | Class<?> function(final FacesContext arg0) throws EvaluationException, PropertyNotFoundException { return getExpectedType(); } | /**
* returns the expected type
*/ | returns the expected type | getType | {
"repo_name": "rPraml/org.openntf.domino",
"path": "domino/xsp/src/main/java/org/openntf/domino/xsp/formula/FormulaValueBinding.java",
"license": "apache-2.0",
"size": 6907
} | [
"javax.faces.context.FacesContext",
"javax.faces.el.EvaluationException",
"javax.faces.el.PropertyNotFoundException"
] | import javax.faces.context.FacesContext; import javax.faces.el.EvaluationException; import javax.faces.el.PropertyNotFoundException; | import javax.faces.context.*; import javax.faces.el.*; | [
"javax.faces"
] | javax.faces; | 698,856 |
void harvestRegistry(RemoteRegistry remoteRegistry)
throws HarvestingException; | void harvestRegistry(RemoteRegistry remoteRegistry) throws HarvestingException; | /**
* Harvests the given registry and saves harvested data into local database.
*
* @param remoteRegistry
* harvested registry.
* @throws HarvestingException
* should any problems with harvesting occur.
*/ | Harvests the given registry and saves harvested data into local database | harvestRegistry | {
"repo_name": "psnc-dl/darceo",
"path": "wrdz/wrdz-ru/interfaces/src/main/java/pl/psnc/synat/wrdz/ru/synchronisation/RegistryHarvester.java",
"license": "gpl-3.0",
"size": 1353
} | [
"pl.psnc.synat.wrdz.ru.entity.registries.RemoteRegistry",
"pl.psnc.synat.wrdz.ru.exceptions.HarvestingException"
] | import pl.psnc.synat.wrdz.ru.entity.registries.RemoteRegistry; import pl.psnc.synat.wrdz.ru.exceptions.HarvestingException; | import pl.psnc.synat.wrdz.ru.entity.registries.*; import pl.psnc.synat.wrdz.ru.exceptions.*; | [
"pl.psnc.synat"
] | pl.psnc.synat; | 1,044,357 |
public static boolean sendMessage(Session session, String message) {
if (session.isOpen()) {
try {
session.getBasicRemote().sendText(message);
return true;
} catch (IOException ioe) {
// An IOException, on the other hand, suggests the c... | static boolean function(Session session, String message) { if (session.isOpen()) { try { session.getBasicRemote().sendText(message); return true; } catch (IOException ioe) { Log.log(Level.WARNING, session, STR, ioe); tryToClose(session, new CloseReason(CloseCodes.UNEXPECTED_CONDITION, trimReason(ioe.toString()))); } } ... | /**
* Try sending the {@link RoutedMessage} using
* {@link Session#getBasicRemote()}, {@link Basic#sendObject(Object)}.
*
* @param session
* Session to send the message on
* @param message
* {@link RoutedMessage} to send
* @return true if send was successful... | Try sending the <code>RoutedMessage</code> using <code>Session#getBasicRemote()</code>, <code>Basic#sendObject(Object)</code> | sendMessage | {
"repo_name": "gameontext/gameon-room",
"path": "room-app/src/main/java/net/wasdev/gameon/room/ConnectionUtils.java",
"license": "apache-2.0",
"size": 3602
} | [
"java.io.IOException",
"java.util.logging.Level",
"javax.websocket.CloseReason",
"javax.websocket.Session"
] | import java.io.IOException; import java.util.logging.Level; import javax.websocket.CloseReason; import javax.websocket.Session; | import java.io.*; import java.util.logging.*; import javax.websocket.*; | [
"java.io",
"java.util",
"javax.websocket"
] | java.io; java.util; javax.websocket; | 1,786,044 |
public void setStartDate(final java.util.Date startDate) {
this.startDate = startDate;
} | void function(final java.util.Date startDate) { this.startDate = startDate; } | /**
* Sets the start date.
*
* @param startDate
* the new start date
*/ | Sets the start date | setStartDate | {
"repo_name": "alarulrajan/CodeFest",
"path": "src/com/technoetic/xplanner/db/AggregateTimesheetQuery.java",
"license": "gpl-2.0",
"size": 6876
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,303,775 |
public int execADAT(byte[] data) throws IOException {
if (data != null) {
return sendCommand(CMD_ADAT, Base64.encodeBase64StringUnChunked(data));
} else {
return sendCommand(CMD_ADAT);
}
} | int function(byte[] data) throws IOException { if (data != null) { return sendCommand(CMD_ADAT, Base64.encodeBase64StringUnChunked(data)); } else { return sendCommand(CMD_ADAT); } } | /**
* Send the ADAT command with the specified authentication data.
*
* @param data The data to send with the command.
* @return server reply.
* @throws IOException If an I/O error occurs while sending
* the command.
* @since 3.0
*/ | Send the ADAT command with the specified authentication data | execADAT | {
"repo_name": "AriaLyy/Aria",
"path": "FtpComponent/src/main/java/aria/apache/commons/net/ftp/FTPSClient.java",
"license": "apache-2.0",
"size": 31017
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 767,378 |
protected String getStringValue(Map<GradoopId, Vertex> index, GradoopId id, String key) {
return index.get(id).getPropertyValue(key).getString();
} | String function(Map<GradoopId, Vertex> index, GradoopId id, String key) { return index.get(id).getPropertyValue(key).getString(); } | /**
* Convenience method to read a vertex's string property value.
*
* @param index vertex index
* @param id vertex id
* @param key property key
* @return string value
*/ | Convenience method to read a vertex's string property value | getStringValue | {
"repo_name": "smee/gradoop",
"path": "gradoop-flink/src/main/java/org/gradoop/flink/datagen/transactions/foodbroker/functions/process/AbstractProcess.java",
"license": "apache-2.0",
"size": 16344
} | [
"java.util.Map",
"org.gradoop.common.model.impl.id.GradoopId",
"org.gradoop.common.model.impl.pojo.Vertex"
] | import java.util.Map; import org.gradoop.common.model.impl.id.GradoopId; import org.gradoop.common.model.impl.pojo.Vertex; | import java.util.*; import org.gradoop.common.model.impl.id.*; import org.gradoop.common.model.impl.pojo.*; | [
"java.util",
"org.gradoop.common"
] | java.util; org.gradoop.common; | 1,425,364 |
public static Predicate<HttpServerRequest> get(String uri) {
return http(uri, null, HttpMethod.GET);
} | static Predicate<HttpServerRequest> function(String uri) { return http(uri, null, HttpMethod.GET); } | /**
* An alias for {@link HttpPredicate#http}.
* <p>
* Creates a {@link Predicate} based on a URI template filtering .
* <p>
* This will listen for GET Method.
*
* @param uri The string to compile into a URI template and use for matching
*
* @return The new {@link Predicate}.
*
* @see Predicate
... | An alias for <code>HttpPredicate#http</code>. Creates a <code>Predicate</code> based on a URI template filtering . This will listen for GET Method | get | {
"repo_name": "reactor/reactor-netty",
"path": "reactor-netty-http/src/main/java/reactor/netty/http/server/HttpPredicate.java",
"license": "apache-2.0",
"size": 10604
} | [
"io.netty.handler.codec.http.HttpMethod",
"java.util.function.Predicate"
] | import io.netty.handler.codec.http.HttpMethod; import java.util.function.Predicate; | import io.netty.handler.codec.http.*; import java.util.function.*; | [
"io.netty.handler",
"java.util"
] | io.netty.handler; java.util; | 2,111,017 |
public SubDirTestWatcher build() {
Preconditions.checkState(!subDirs.isEmpty(), "The list of subDirs is empty.");
return new SubDirTestWatcher(baseDir, createAtBeginning, deleteAtEnd, subDirs);
}
} | SubDirTestWatcher function() { Preconditions.checkState(!subDirs.isEmpty(), STR); return new SubDirTestWatcher(baseDir, createAtBeginning, deleteAtEnd, subDirs); } } | /**
* Builds a {@link SubDirTestWatcher}.
* @return A configured {@link SubDirTestWatcher}.
*/ | Builds a <code>SubDirTestWatcher</code> | build | {
"repo_name": "KulykRoman/drill",
"path": "common/src/test/java/org/apache/drill/test/SubDirTestWatcher.java",
"license": "apache-2.0",
"size": 7034
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,010,270 |
public static Class getInternalClassForType(LogicalType type) {
switch (type.getTypeRoot()) {
case BOOLEAN:
return Boolean.class;
case TINYINT:
return Byte.class;
case SMALLINT:
return Short.class;
case INTEGER:
case DATE:
case TIME_WITHOUT_TIME_ZONE:
case INTERVAL_YEAR_MONTH:
... | static Class function(LogicalType type) { switch (type.getTypeRoot()) { case BOOLEAN: return Boolean.class; case TINYINT: return Byte.class; case SMALLINT: return Short.class; case INTEGER: case DATE: case TIME_WITHOUT_TIME_ZONE: case INTERVAL_YEAR_MONTH: return Integer.class; case BIGINT: case TIMESTAMP_WITHOUT_TIME_Z... | /**
* Get internal(sql engine execution data formats) class for {@link LogicalType}.
*/ | Get internal(sql engine execution data formats) class for <code>LogicalType</code> | getInternalClassForType | {
"repo_name": "shaoxuan-wang/flink",
"path": "flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/types/ClassLogicalTypeConverter.java",
"license": "apache-2.0",
"size": 5448
} | [
"org.apache.flink.table.dataformat.BaseArray",
"org.apache.flink.table.dataformat.BaseMap",
"org.apache.flink.table.dataformat.BaseRow",
"org.apache.flink.table.dataformat.BinaryGeneric",
"org.apache.flink.table.dataformat.BinaryString",
"org.apache.flink.table.dataformat.Decimal",
"org.apache.flink.tab... | import org.apache.flink.table.dataformat.BaseArray; import org.apache.flink.table.dataformat.BaseMap; import org.apache.flink.table.dataformat.BaseRow; import org.apache.flink.table.dataformat.BinaryGeneric; import org.apache.flink.table.dataformat.BinaryString; import org.apache.flink.table.dataformat.Decimal; import ... | import org.apache.flink.table.dataformat.*; import org.apache.flink.table.types.logical.*; | [
"org.apache.flink"
] | org.apache.flink; | 2,207,978 |
@Override
public Vehicle getVehicle() {
Unit container = getContainerUnit();
if (container.getUnitType() == UnitType.VEHICLE)
return (Vehicle) container;
if (container.getContainerUnit().getUnitType() == UnitType.VEHICLE)
return (Vehicle) (container.getContainerUnit());
return null;
}
| Vehicle function() { Unit container = getContainerUnit(); if (container.getUnitType() == UnitType.VEHICLE) return (Vehicle) container; if (container.getContainerUnit().getUnitType() == UnitType.VEHICLE) return (Vehicle) (container.getContainerUnit()); return null; } | /**
* Get vehicle the equipment is in, null if not in vehicle
*
* @return {@link Vehicle} the equipment's vehicle
*/ | Get vehicle the equipment is in, null if not in vehicle | getVehicle | {
"repo_name": "mars-sim/mars-sim",
"path": "mars-sim-core/src/main/java/org/mars_sim/msp/core/equipment/Equipment.java",
"license": "gpl-3.0",
"size": 17822
} | [
"org.mars_sim.msp.core.Unit",
"org.mars_sim.msp.core.UnitType",
"org.mars_sim.msp.core.vehicle.Vehicle"
] | import org.mars_sim.msp.core.Unit; import org.mars_sim.msp.core.UnitType; import org.mars_sim.msp.core.vehicle.Vehicle; | import org.mars_sim.msp.core.*; import org.mars_sim.msp.core.vehicle.*; | [
"org.mars_sim.msp"
] | org.mars_sim.msp; | 2,173,780 |
public static synchronized void setPermitedProcessNames(String[] permitedProcessNames) {
if (sPermitedProcessNames == null) {
sPermitedProcessNames = new HashSet<String>();
} else {
sPermitedProcessNames.clear();
}
if (permitedProcessNames == null) {
... | static synchronized void function(String[] permitedProcessNames) { if (sPermitedProcessNames == null) { sPermitedProcessNames = new HashSet<String>(); } else { sPermitedProcessNames.clear(); } if (permitedProcessNames == null) { MtkLog.w(TAG, STR); } else { int length = permitedProcessNames.length; for (int i = 0; i < ... | /**
* Sets processes that can access DRM files.
*
* @param permitedProcessNames the name of processes.
*/ | Sets processes that can access DRM files | setPermitedProcessNames | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "packages/providers/MediaProvider/src/com/android/providers/media/DrmHelper.java",
"license": "gpl-2.0",
"size": 4119
} | [
"java.util.HashSet"
] | import java.util.HashSet; | import java.util.*; | [
"java.util"
] | java.util; | 463,526 |
//<editor-fold defaultstate="collapsed" desc="Hashcode Equals and Comparable">
@Override
public int hashCode() {
int hash = 7;
hash = 97 * hash + Objects.hashCode(this.value);
return hash;
} | int function() { int hash = 7; hash = 97 * hash + Objects.hashCode(this.value); return hash; } | /**
* Hash code is based upon the value.
* <p>
* @return a unique hash code from the value.
*/ | Hash code is based upon the value. | hashCode | {
"repo_name": "KeyBridge/lib-openssrf",
"path": "src/main/java/us/gov/dod/standard/ssrf/_3_1/metadata/domains/UN9_7.java",
"license": "apache-2.0",
"size": 4182
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 2,612,826 |
public void addXMLConversion(QName qname, Class javaClass) {
getUserXMLTypes().put(qname, javaClass);
} | void function(QName qname, Class javaClass) { getUserXMLTypes().put(qname, javaClass); } | /**
* Add an XML to Java Conversion pair entry
* @param qname The qualified name of the XML schema type
* @param javaClass The class to add
*/ | Add an XML to Java Conversion pair entry | addXMLConversion | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/oxm/XMLField.java",
"license": "epl-1.0",
"size": 30812
} | [
"javax.xml.namespace.QName"
] | import javax.xml.namespace.QName; | import javax.xml.namespace.*; | [
"javax.xml"
] | javax.xml; | 1,504,280 |
@GET
@Path("{foreignSource}/nodes")
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_ATOM_XML})
public RequisitionNodeCollection getNodes(@PathParam("foreignSource") final String foreignSource) throws ParseException {
RequisitionNodeCollection results = m... | @Path(STR) @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_ATOM_XML}) RequisitionNodeCollection function(@PathParam(STR) final String foreignSource) throws ParseException { RequisitionNodeCollection results = m_accessService.getNodes(foreignSource); if (results == null) { throw g... | /**
* Returns all nodes for a given requisition
*
* @param foreignSource a {@link java.lang.String} object.
* @return a {@link org.opennms.netmgt.provision.persist.requisition.RequisitionNodeCollection} object.
* @throws java.text.ParseException if any.
*/ | Returns all nodes for a given requisition | getNodes | {
"repo_name": "peternixon/opennms-mirror",
"path": "opennms-webapp/src/main/java/org/opennms/web/rest/RequisitionRestService.java",
"license": "gpl-2.0",
"size": 33150
} | [
"java.text.ParseException",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response",
"org.opennms.netmgt.provision.persist.requisition.RequisitionNodeCollection"
] | import java.text.ParseException; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.opennms.netmgt.provision.persist.requisition.RequisitionNodeCollection; | import java.text.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.opennms.netmgt.provision.persist.requisition.*; | [
"java.text",
"javax.ws",
"org.opennms.netmgt"
] | java.text; javax.ws; org.opennms.netmgt; | 1,813,376 |
HandType getHandType(); | HandType getHandType(); | /**
* Gets the {@link HandType} used for animation.
*
* @return The hand type
*/ | Gets the <code>HandType</code> used for animation | getHandType | {
"repo_name": "JBYoshi/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/event/entity/living/humanoid/AnimateHandEvent.java",
"license": "mit",
"size": 1959
} | [
"org.spongepowered.api.data.type.HandType"
] | import org.spongepowered.api.data.type.HandType; | import org.spongepowered.api.data.type.*; | [
"org.spongepowered.api"
] | org.spongepowered.api; | 2,046,930 |
private boolean useMiscHeading(SettingsItem parent) {
// Do not add Miscellaneous, if there is a sub-group with a better title
// The sub group 'Misc' should not be added twice
// Only use 'Misc', if there are other known sub-groups
return parent.getType() != Type.SUB_GROUP && !subGroupMiscUsed && useSub... | boolean function(SettingsItem parent) { return parent.getType() != Type.SUB_GROUP && !subGroupMiscUsed && useSubGroups; } | /**
* Checks, if a heading 'miscellaneous' should be added.
*
* @param parent
* The parent settings item
* @return if the heading 'misc' should be added
*/ | Checks, if a heading 'miscellaneous' should be added | useMiscHeading | {
"repo_name": "rapidminer/rapidminer-studio",
"path": "src/main/java/com/rapidminer/gui/properties/SettingsPropertyPanel.java",
"license": "agpl-3.0",
"size": 13200
} | [
"com.rapidminer.gui.properties.SettingsItem"
] | import com.rapidminer.gui.properties.SettingsItem; | import com.rapidminer.gui.properties.*; | [
"com.rapidminer.gui"
] | com.rapidminer.gui; | 647,079 |
private int bindNamedParameters(
final PreparedStatement ps,
final Map namedParams,
final int start,
final SessionImplementor session) throws SQLException {
if ( namedParams != null ) {
// assumes that types are all of span 1
Iterator iter = namedParams.entrySet().iterator();
int result = 0;
... | int function( final PreparedStatement ps, final Map namedParams, final int start, final SessionImplementor session) throws SQLException { if ( namedParams != null ) { Iterator iter = namedParams.entrySet().iterator(); int result = 0; while ( iter.hasNext() ) { Map.Entry e = (Map.Entry) iter.next(); String name = (Strin... | /**
* Perform binding of all the JDBC bind parameter values based on the user-defined
* named query parameters into the JDBC {@link PreparedStatement}.
*
* @param ps The prepared statement to which to bind the parameter values.
* @param namedParams The named query parameters specified by the application.
* ... | Perform binding of all the JDBC bind parameter values based on the user-defined named query parameters into the JDBC <code>PreparedStatement</code> | bindNamedParameters | {
"repo_name": "ControlSystemStudio/cs-studio",
"path": "thirdparty/plugins/org.csstudio.platform.libs.hibernate/project/core/src/main/java/org/hibernate/engine/query/NativeSQLQueryPlan.java",
"license": "epl-1.0",
"size": 7704
} | [
"java.sql.PreparedStatement",
"java.sql.SQLException",
"java.util.Iterator",
"java.util.Map",
"org.hibernate.engine.SessionImplementor",
"org.hibernate.engine.TypedValue"
] | import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.Iterator; import java.util.Map; import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.TypedValue; | import java.sql.*; import java.util.*; import org.hibernate.engine.*; | [
"java.sql",
"java.util",
"org.hibernate.engine"
] | java.sql; java.util; org.hibernate.engine; | 1,463,895 |
public static Collection<StaticRoute> parseRoutingTable(HierarchicalConfiguration cfg) {
Collection<StaticRoute> staticRoutes = new HashSet<>();
HierarchicalConfiguration routeInfo =
cfg.configurationAt("route-information");
List<HierarchicalConfiguration> routeTables = rout... | static Collection<StaticRoute> function(HierarchicalConfiguration cfg) { Collection<StaticRoute> staticRoutes = new HashSet<>(); HierarchicalConfiguration routeInfo = cfg.configurationAt(STR); List<HierarchicalConfiguration> routeTables = routeInfo.configurationsAt(STR); for (HierarchicalConfiguration routeTable : rout... | /**
* Parses {@literal route-information} tree.
* This implementation supports only static routes.
*
* @param cfg route-information
* @return a collection of static routes
*/ | Parses route-information tree. This implementation supports only static routes | parseRoutingTable | {
"repo_name": "LorenzReinhart/ONOSnew",
"path": "drivers/juniper/src/main/java/org/onosproject/drivers/juniper/JuniperUtils.java",
"license": "apache-2.0",
"size": 23473
} | [
"java.util.Collection",
"java.util.HashSet",
"java.util.List",
"org.apache.commons.configuration.HierarchicalConfiguration"
] | import java.util.Collection; import java.util.HashSet; import java.util.List; import org.apache.commons.configuration.HierarchicalConfiguration; | import java.util.*; import org.apache.commons.configuration.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 792,281 |
private void loadPreferences() {
boolean serverPluginInstalled = SipAccountPacket.isSoftPhonePluginInstalled(SparkManager.getConnection());
if (serverPluginInstalled) {
setupRemotePreferences(SparkManager.getConnection());
}
}
| void function() { boolean serverPluginInstalled = SipAccountPacket.isSoftPhonePluginInstalled(SparkManager.getConnection()); if (serverPluginInstalled) { setupRemotePreferences(SparkManager.getConnection()); } } | /**
* Loads Preferences, either from server or locally.
*/ | Loads Preferences, either from server or locally | loadPreferences | {
"repo_name": "joshuairl/toothchat-client",
"path": "src/plugins/sip/src/java/net/java/sipmack/softphone/SoftPhoneManager.java",
"license": "apache-2.0",
"size": 38087
} | [
"org.jivesoftware.spark.SparkManager",
"org.jivesoftware.sparkplugin.sipaccount.SipAccountPacket"
] | import org.jivesoftware.spark.SparkManager; import org.jivesoftware.sparkplugin.sipaccount.SipAccountPacket; | import org.jivesoftware.spark.*; import org.jivesoftware.sparkplugin.sipaccount.*; | [
"org.jivesoftware.spark",
"org.jivesoftware.sparkplugin"
] | org.jivesoftware.spark; org.jivesoftware.sparkplugin; | 1,139,545 |
public Calendar getFull() {
return full;
} | Calendar function() { return full; } | /**
* Returns the date of the full moon.
*/ | Returns the date of the full moon | getFull | {
"repo_name": "theoweiss/openhab2",
"path": "bundles/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/model/MoonPhase.java",
"license": "epl-1.0",
"size": 4591
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 531,879 |
private void generateLegalTimesTree() {
// Create a quick cache of numbers to their keycodes.
final int k0 = KeyEvent.KEYCODE_0;
final int k1 = KeyEvent.KEYCODE_1;
final int k2 = KeyEvent.KEYCODE_2;
final int k3 = KeyEvent.KEYCODE_3;
final int k4 = KeyEvent.KEYCODE_4;... | void function() { final int k0 = KeyEvent.KEYCODE_0; final int k1 = KeyEvent.KEYCODE_1; final int k2 = KeyEvent.KEYCODE_2; final int k3 = KeyEvent.KEYCODE_3; final int k4 = KeyEvent.KEYCODE_4; final int k5 = KeyEvent.KEYCODE_5; final int k6 = KeyEvent.KEYCODE_6; final int k7 = KeyEvent.KEYCODE_7; final int k8 = KeyEven... | /**
* Create a tree for deciding what keys can legally be typed.
*/ | Create a tree for deciding what keys can legally be typed | generateLegalTimesTree | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/widget/TimePickerClockDelegate.java",
"license": "gpl-3.0",
"size": 50858
} | [
"android.view.KeyEvent",
"java.util.ArrayList"
] | import android.view.KeyEvent; import java.util.ArrayList; | import android.view.*; import java.util.*; | [
"android.view",
"java.util"
] | android.view; java.util; | 2,870,654 |
@Override
protected void getInfo( OrcInputMeta meta, boolean preview ) {
String filePath = wPath.getText();
if ( filePath != null && !filePath.isEmpty() ) {
meta.allocateFiles( 1 );
meta.setFilename( wPath.getText().trim() );
}
meta.inputFiles.passingThruFields = wPassThruFields.getSele... | void function( OrcInputMeta meta, boolean preview ) { String filePath = wPath.getText(); if ( filePath != null && !filePath.isEmpty() ) { meta.allocateFiles( 1 ); meta.setFilename( wPath.getText().trim() ); } meta.inputFiles.passingThruFields = wPassThruFields.getSelection(); List<? extends IOrcInputField> actualOrcFil... | /**
* Fill meta object from UI options.
*/ | Fill meta object from UI options | getInfo | {
"repo_name": "SergeyTravin/big-data-plugin",
"path": "kettle-plugins/formats/src/main/java/org/pentaho/big/data/kettle/plugins/formats/impl/orc/input/OrcInputDialog.java",
"license": "apache-2.0",
"size": 15847
} | [
"java.util.List",
"org.eclipse.swt.widgets.TableItem",
"org.pentaho.big.data.kettle.plugins.formats.orc.OrcInputField",
"org.pentaho.di.core.row.value.ValueMetaFactory",
"org.pentaho.hadoop.shim.api.format.IOrcInputField"
] | import java.util.List; import org.eclipse.swt.widgets.TableItem; import org.pentaho.big.data.kettle.plugins.formats.orc.OrcInputField; import org.pentaho.di.core.row.value.ValueMetaFactory; import org.pentaho.hadoop.shim.api.format.IOrcInputField; | import java.util.*; import org.eclipse.swt.widgets.*; import org.pentaho.big.data.kettle.plugins.formats.orc.*; import org.pentaho.di.core.row.value.*; import org.pentaho.hadoop.shim.api.format.*; | [
"java.util",
"org.eclipse.swt",
"org.pentaho.big",
"org.pentaho.di",
"org.pentaho.hadoop"
] | java.util; org.eclipse.swt; org.pentaho.big; org.pentaho.di; org.pentaho.hadoop; | 2,841,300 |
@Override
public String getUsernameByEmail(final String email) {
List<UserProfileModel> userList = UserProfileModel.find("byEmail",
email).fetchAll();
if (null != userList && userList.size() > 0) {
return userList.get(0).username;
}
return null;
} | String function(final String email) { List<UserProfileModel> userList = UserProfileModel.find(STR, email).fetchAll(); if (null != userList && userList.size() > 0) { return userList.get(0).username; } return null; } | /**
* Retrieves the username corresponding to the given secretkey.
*
* @param email
* User name
* @return Username of the secrectkey, if already registered, otherwise null.
*/ | Retrieves the username corresponding to the given secretkey | getUsernameByEmail | {
"repo_name": "iiitd-ucla-pc3/SensorActVPDS-2.0",
"path": "app/edu/pc3/sensoract/vpds/profile/mongo/UserProfileImpl.java",
"license": "bsd-3-clause",
"size": 11796
} | [
"edu.pc3.sensoract.vpds.model.UserProfileModel",
"java.util.List"
] | import edu.pc3.sensoract.vpds.model.UserProfileModel; import java.util.List; | import edu.pc3.sensoract.vpds.model.*; import java.util.*; | [
"edu.pc3.sensoract",
"java.util"
] | edu.pc3.sensoract; java.util; | 2,908,794 |
public void setAll(final BlackSwaptionFlatProviderDiscount other) {
ArgumentChecker.notNull(other, "other");
getMulticurveProvider().setAll(other.getMulticurveProvider());
} | void function(final BlackSwaptionFlatProviderDiscount other) { ArgumentChecker.notNull(other, "other"); getMulticurveProvider().setAll(other.getMulticurveProvider()); } | /**
* Set all the curves contains in another provider. If a currency or index is already present in the map, the associated curve is changed.
* @param other The other provider.
*/ | Set all the curves contains in another provider. If a currency or index is already present in the map, the associated curve is changed | setAll | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/provider/description/interestrate/BlackSwaptionFlatProviderDiscount.java",
"license": "apache-2.0",
"size": 6302
} | [
"com.opengamma.util.ArgumentChecker"
] | import com.opengamma.util.ArgumentChecker; | import com.opengamma.util.*; | [
"com.opengamma.util"
] | com.opengamma.util; | 2,322,384 |
public String runOneTest(String param, String query)
throws MalformedURLException, IOException {
// System.out.println("--------------------");
// System.out.println(query);
// System.out.println("\t--------------------");
// connect to the servlet
URL servlet = ne... | String function(String param, String query) throws MalformedURLException, IOException { URL servlet = new URL(PetascopeURL); HttpURLConnection conn = (HttpURLConnection) servlet.openConnection(); conn.setDoInput(true); conn.setDoOutput(true); conn.setUseCaches(false); conn.setDefaultUseCaches(false); conn.setRequestMet... | /** Send an XML request to the WCPS server. Hopefully it will succeed.
* Returns a message on error or null otherwise.
**/ | Send an XML request to the WCPS server. Hopefully it will succeed. Returns a message on error or null otherwise | runOneTest | {
"repo_name": "miracee/rasdaman",
"path": "applications/petascope/src/main/java/petascope/wcps/server/test/GrammarTestOnline.java",
"license": "gpl-3.0",
"size": 7234
} | [
"java.io.BufferedReader",
"java.io.DataOutputStream",
"java.io.IOException",
"java.io.InputStreamReader",
"java.net.HttpURLConnection",
"java.net.MalformedURLException"
] | import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.MalformedURLException; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 1,275,725 |
public static int getUTCSecond (Date date) {
return dateToUTCCalendar(date).get(com.ibm.icu.util.Calendar.SECOND);
}
| static int function (Date date) { return dateToUTCCalendar(date).get(com.ibm.icu.util.Calendar.SECOND); } | /**
* Method getUTCSecond
*
* @param date
* @return the second number of the date, in UTC
*/ | Method getUTCSecond | getUTCSecond | {
"repo_name": "levans/Open-Quark",
"path": "src/Utilities/org/openquark/util/time/TimeUtility.java",
"license": "bsd-3-clause",
"size": 6746
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,437,579 |
@NotNull
@Override
public List<PubmedArticleFacade> extractArticlesFrom(@NotNull final String xmlString) {
final List<PubmedArticleFacade> articles = new ArrayList<>();
try {
final PubmedArticleSet set = unmarshal(xmlString);
final List<java.lang.Object> article = set... | List<PubmedArticleFacade> function(@NotNull final String xmlString) { final List<PubmedArticleFacade> articles = new ArrayList<>(); try { final PubmedArticleSet set = unmarshal(xmlString); final List<java.lang.Object> article = set.getPubmedArticleOrPubmedBookArticle(); articles.addAll(article .stream() .map(PubmedArti... | /**
* Extracts PubMed articles and PubMed book articles from the source string
* representing XML exported from PubMed.
* <p>
* The XML string could be derived e.g. from
* <ul>
* <li>via API, e.g.
* {@code https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id=25395026... | Extracts PubMed articles and PubMed book articles from the source string representing XML exported from PubMed. The XML string could be derived e.g. from via API, e.g. HREF through the Web UI (e.g. HREF) when sending to file in format XML | extractArticlesFrom | {
"repo_name": "ursjoss/sipamato",
"path": "core/core-pubmed-api/src/main/java/ch/difty/scipamato/core/pubmed/PubmedXmlService.java",
"license": "gpl-3.0",
"size": 6283
} | [
"ch.difty.scipamato.core.pubmed.api.PubmedArticleSet",
"java.util.ArrayList",
"java.util.List",
"java.util.stream.Collectors",
"org.jetbrains.annotations.NotNull",
"org.springframework.http.HttpStatus"
] | import ch.difty.scipamato.core.pubmed.api.PubmedArticleSet; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import org.jetbrains.annotations.NotNull; import org.springframework.http.HttpStatus; | import ch.difty.scipamato.core.pubmed.api.*; import java.util.*; import java.util.stream.*; import org.jetbrains.annotations.*; import org.springframework.http.*; | [
"ch.difty.scipamato",
"java.util",
"org.jetbrains.annotations",
"org.springframework.http"
] | ch.difty.scipamato; java.util; org.jetbrains.annotations; org.springframework.http; | 296,121 |
public void walkHierarchy(Pair<Long, NodeRef> nodePair, Pair<Long, ChildAssociationRef> parentAssocPair)
{
Long nodeId = nodePair.getFirst();
NodeRef nodeRef = nodePair.getSecond();
QName nodeType = nodeDAO.getNodeType(nodeId);
Long nodeAclId = nodeDAO.getNodeAclId(nodeId);
... | void function(Pair<Long, NodeRef> nodePair, Pair<Long, ChildAssociationRef> parentAssocPair) { Long nodeId = nodePair.getFirst(); NodeRef nodeRef = nodePair.getSecond(); QName nodeType = nodeDAO.getNodeType(nodeId); Long nodeAclId = nodeDAO.getNodeAclId(nodeId); VisitedNode visitedNode = new VisitedNode(nodeId, nodeRef... | /**
* Walk a hierachy
*/ | Walk a hierachy | walkHierarchy | {
"repo_name": "nguyentienlong/community-edition",
"path": "projects/repository/source/java/org/alfresco/repo/node/db/NodeHierarchyWalker.java",
"license": "lgpl-3.0",
"size": 11580
} | [
"org.alfresco.service.cmr.repository.ChildAssociationRef",
"org.alfresco.service.cmr.repository.NodeRef",
"org.alfresco.service.namespace.QName",
"org.alfresco.util.Pair"
] | import org.alfresco.service.cmr.repository.ChildAssociationRef; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; import org.alfresco.util.Pair; | import org.alfresco.service.cmr.repository.*; import org.alfresco.service.namespace.*; import org.alfresco.util.*; | [
"org.alfresco.service",
"org.alfresco.util"
] | org.alfresco.service; org.alfresco.util; | 587,356 |
public void add(String key, String value) {
if (key != null && value != null) {
Object params = urlParamsWithObjects.get(key);
if (params == null) {
// Backward compatible, which will result in "k=v1&k=v2&k=v3"
params = new HashSet<String>();
... | void function(String key, String value) { if (key != null && value != null) { Object params = urlParamsWithObjects.get(key); if (params == null) { params = new HashSet<String>(); this.put(key, params); } if (params instanceof List) { ((List<Object>) params).add(value); } else if (params instanceof Set) { ((Set<Object>)... | /**
* Adds string value to param which can have more than one value.
*
* @param key the key name for the param, either existing or new.
* @param value the value string for the new param.
*/ | Adds string value to param which can have more than one value | add | {
"repo_name": "silen85/shujutongji",
"path": "android-async-http-master/library/src/main/java/com/loopj/android/http/RequestParams.java",
"license": "gpl-2.0",
"size": 26707
} | [
"java.util.HashSet",
"java.util.List",
"java.util.Set"
] | import java.util.HashSet; import java.util.List; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 754,186 |
private HostRenderer addHostRenderer(IPPacket ipp, boolean srcFlag) {
String a = srcFlag ? ipp.getSourceAddress() : ipp.getDestinationAddress();
HostRenderer hr;
if(hostMap.keySet().contains(a))
hr = (HostRenderer)hostMap.get(a);
else {
hr = new HostRenderer(pvc, a);
hostMap.put(a, h... | HostRenderer function(IPPacket ipp, boolean srcFlag) { String a = srcFlag ? ipp.getSourceAddress() : ipp.getDestinationAddress(); HostRenderer hr; if(hostMap.keySet().contains(a)) hr = (HostRenderer)hostMap.get(a); else { hr = new HostRenderer(pvc, a); hostMap.put(a, hr); } return hr; } | /**
* If a renderer doesn't exist for a host, create a new one and add
* it to the renderer map. Otherwise, simply fetch the existing renderer.
* @param ipp the IP protocol packet
* @param srcFlag whether the desired host is the source or destination
* of the specified packet.
* @return a host render... | If a renderer doesn't exist for a host, create a new one and add it to the renderer map. Otherwise, simply fetch the existing renderer | addHostRenderer | {
"repo_name": "YingkitTse/8021x_supplicant",
"path": "jpcap/src/java/net/sourceforge/jpcap/client/CaptureViewFrame.java",
"license": "mit",
"size": 7742
} | [
"net.sourceforge.jpcap.net.IPPacket"
] | import net.sourceforge.jpcap.net.IPPacket; | import net.sourceforge.jpcap.net.*; | [
"net.sourceforge.jpcap"
] | net.sourceforge.jpcap; | 1,554,006 |
@Override public void exitConditionalAndExpression(@NotNull Java7Parser.ConditionalAndExpressionContext ctx) { } | @Override public void exitConditionalAndExpression(@NotNull Java7Parser.ConditionalAndExpressionContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | enterConditionalAndExpression | {
"repo_name": "jsteenbeeke/antlr-java-parser",
"path": "src/main/java/com/github/antlrjavaparser/Java7ParserBaseListener.java",
"license": "lgpl-3.0",
"size": 53492
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,899,390 |
@ServiceMethod(returns = ReturnType.SINGLE)
public DataPolicyManifestInner getByPolicyMode(String policyMode) {
return getByPolicyModeAsync(policyMode).block();
} | @ServiceMethod(returns = ReturnType.SINGLE) DataPolicyManifestInner function(String policyMode) { return getByPolicyModeAsync(policyMode).block(); } | /**
* This operation retrieves the data policy manifest with the given policy mode.
*
* @param policyMode The policy mode of the data policy manifest to get.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejec... | This operation retrieves the data policy manifest with the given policy mode | getByPolicyMode | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/DataPolicyManifestsClientImpl.java",
"license": "mit",
"size": 24247
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.resources.fluent.models.DataPolicyManifestInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.resources.fluent.models.DataPolicyManifestInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.resources.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 154,701 |
Widget createWidget() {
if (isTrue(m_jsonConfig, CmsDataViewConstants.CONFIG_PREVIEW)) {
return new CmsDataViewPreviewWidget(
m_config,
m_valueAccessor,
new CmsDataViewPreviewWidget.ContentImageLoader());
} else {
I_ImageProvid... | Widget createWidget() { if (isTrue(m_jsonConfig, CmsDataViewConstants.CONFIG_PREVIEW)) { return new CmsDataViewPreviewWidget( m_config, m_valueAccessor, new CmsDataViewPreviewWidget.ContentImageLoader()); } else { I_ImageProvider provider = null; CmsDataViewValue val = m_valueAccessor.getValue(); JSONValue iconVal = m_... | /**
* Creates the correct widget based on the configuration.<p>
*
* @return the new widget
*/ | Creates the correct widget based on the configuration | createWidget | {
"repo_name": "ggiudetti/opencms-core",
"path": "src-gwt/org/opencms/acacia/client/widgets/complex/CmsDataViewClientWidget.java",
"license": "lgpl-2.1",
"size": 8353
} | [
"com.google.gwt.json.client.JSONValue",
"com.google.gwt.user.client.ui.Widget",
"org.opencms.gwt.shared.CmsDataViewConstants"
] | import com.google.gwt.json.client.JSONValue; import com.google.gwt.user.client.ui.Widget; import org.opencms.gwt.shared.CmsDataViewConstants; | import com.google.gwt.json.client.*; import com.google.gwt.user.client.ui.*; import org.opencms.gwt.shared.*; | [
"com.google.gwt",
"org.opencms.gwt"
] | com.google.gwt; org.opencms.gwt; | 2,823,462 |
private AnnotatedFragment collectArgumentsForTypeInclSuperClasses(TypeElement type)
throws ProcessingException {
AnnotatedFragment fragment = new AnnotatedFragment(type);
TypeElement currentClass = type;
do {
for (Element e : currentClass.getEnclosedElements()) {
... | AnnotatedFragment function(TypeElement type) throws ProcessingException { AnnotatedFragment fragment = new AnnotatedFragment(type); TypeElement currentClass = type; do { for (Element e : currentClass.getEnclosedElements()) { if (e.getKind() != ElementKind.FIELD) { fragment.checkAndAddSetterMethod(e); continue; } Arg an... | /**
* Scans for @Arg annotations in the class itself and all super classes (complete inheritance
* hierarchy)
*/ | Scans for @Arg annotations in the class itself and all super classes (complete inheritance hierarchy) | collectArgumentsForTypeInclSuperClasses | {
"repo_name": "sockeqwe/fragmentargs",
"path": "processor/src/main/java/com/hannesdorfmann/fragmentargs/processor/ArgProcessor.java",
"license": "apache-2.0",
"size": 43479
} | [
"com.hannesdorfmann.fragmentargs.annotation.Arg",
"javax.lang.model.element.Element",
"javax.lang.model.element.ElementKind",
"javax.lang.model.element.TypeElement",
"javax.lang.model.type.TypeKind",
"javax.lang.model.type.TypeMirror"
] | import com.hannesdorfmann.fragmentargs.annotation.Arg; import javax.lang.model.element.Element; import javax.lang.model.element.ElementKind; import javax.lang.model.element.TypeElement; import javax.lang.model.type.TypeKind; import javax.lang.model.type.TypeMirror; | import com.hannesdorfmann.fragmentargs.annotation.*; import javax.lang.model.element.*; import javax.lang.model.type.*; | [
"com.hannesdorfmann.fragmentargs",
"javax.lang"
] | com.hannesdorfmann.fragmentargs; javax.lang; | 2,402,492 |
private JPanel getCommandPanel() {
if (commandPanel == null) {
FlowLayout flowLayout = new FlowLayout();
flowLayout.setAlignment(FlowLayout.RIGHT);
commandPanel = new JPanel();
commandPanel.setLayout(flowLayout);
commandPanel.add(getOkButton(), nul... | JPanel function() { if (commandPanel == null) { FlowLayout flowLayout = new FlowLayout(); flowLayout.setAlignment(FlowLayout.RIGHT); commandPanel = new JPanel(); commandPanel.setLayout(flowLayout); commandPanel.add(getOkButton(), null); commandPanel.add(getCancelButton(), null); } return commandPanel; } | /**
* This method initializes commandPanel
*
* @return javax.swing.JPanel
*/ | This method initializes commandPanel | getCommandPanel | {
"repo_name": "mknecht/profiler4j",
"path": "src/java/net/sf/profiler4j/console/OptionsDialog.java",
"license": "apache-2.0",
"size": 15079
} | [
"java.awt.FlowLayout",
"javax.swing.JPanel"
] | import java.awt.FlowLayout; import javax.swing.JPanel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 632,292 |
public void propertyChange(PropertyChangeEvent evt) {
String name = evt.getPropertyName();
if (MoveGroupSelectionDialog.TRANSFER_PROPERTY.equals(
name)) {
ChgrpObject v = (ChgrpObject) evt.getNewValue();
GroupData group = v.getGroupData();
SecurityContext ctx ... | void function(PropertyChangeEvent evt) { String name = evt.getPropertyName(); if (MoveGroupSelectionDialog.TRANSFER_PROPERTY.equals( name)) { ChgrpObject v = (ChgrpObject) evt.getNewValue(); GroupData group = v.getGroupData(); SecurityContext ctx = new SecurityContext( group.getId()); moveData(ctx, v.getTarget(), v.get... | /**
* Transfers the data.
*/ | Transfers the data | propertyChange | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerComponent.java",
"license": "gpl-2.0",
"size": 155452
} | [
"java.beans.PropertyChangeEvent",
"org.openmicroscopy.shoola.agents.treeviewer.util.ChgrpObject",
"org.openmicroscopy.shoola.agents.treeviewer.util.MoveGroupSelectionDialog",
"org.openmicroscopy.shoola.env.data.util.SecurityContext",
"org.openmicroscopy.shoola.util.ui.UIUtilities"
] | import java.beans.PropertyChangeEvent; import org.openmicroscopy.shoola.agents.treeviewer.util.ChgrpObject; import org.openmicroscopy.shoola.agents.treeviewer.util.MoveGroupSelectionDialog; import org.openmicroscopy.shoola.env.data.util.SecurityContext; import org.openmicroscopy.shoola.util.ui.UIUtilities; | import java.beans.*; import org.openmicroscopy.shoola.agents.treeviewer.util.*; import org.openmicroscopy.shoola.env.data.util.*; import org.openmicroscopy.shoola.util.ui.*; | [
"java.beans",
"org.openmicroscopy.shoola"
] | java.beans; org.openmicroscopy.shoola; | 702,652 |
public void removeCards(List<Card> cards) {
this.cards.removeAll(cards);
} | void function(List<Card> cards) { this.cards.removeAll(cards); } | /**
* Removes cards according a list of cards.
*
* @param cards assigned to remove.
*/ | Removes cards according a list of cards | removeCards | {
"repo_name": "betosiles/7wonders",
"path": "src/main/java/org/fundacionjala/sevenwonders/core/Deck.java",
"license": "mit",
"size": 1873
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,651,285 |
public String getValue(Widget w) {
String label = itemUIRegistry.getLabel(w);
int index = label.indexOf('[');
if (index != -1) {
return label.substring(index + 1, label.length() - 1);
} else {
return "";
}
} | String function(Widget w) { String label = itemUIRegistry.getLabel(w); int index = label.indexOf('['); if (index != -1) { return label.substring(index + 1, label.length() - 1); } else { return ""; } } | /**
* Returns formatted value of the item associated to widget
*
* @param w widget to get value for
* @return value to use for the widget
*/ | Returns formatted value of the item associated to widget | getValue | {
"repo_name": "vilchev/eclipse-smarthome",
"path": "extensions/ui/org.eclipse.smarthome.ui.basic/src/main/java/org/eclipse/smarthome/ui/basic/internal/render/AbstractWidgetRenderer.java",
"license": "epl-1.0",
"size": 6573
} | [
"org.eclipse.smarthome.model.sitemap.Widget"
] | import org.eclipse.smarthome.model.sitemap.Widget; | import org.eclipse.smarthome.model.sitemap.*; | [
"org.eclipse.smarthome"
] | org.eclipse.smarthome; | 2,000,815 |
// TODO(#10523): Remove this when the migration period for toolchain transitions has ended.
private static boolean shouldUseToolchainTransition(
@Nullable BuildConfiguration configuration, AspectDefinition definition) {
// Check whether the global incompatible change flag is set.
if (configuration != ... | static boolean function( @Nullable BuildConfiguration configuration, AspectDefinition definition) { if (configuration != null) { PlatformOptions platformOptions = configuration.getOptions().get(PlatformOptions.class); if (platformOptions != null && platformOptions.overrideToolchainTransition) { return true; } } return ... | /**
* Returns whether or not to use the new toolchain transition. Checks the global incompatible
* change flag and the aspect's toolchain transition readiness attribute.
*/ | Returns whether or not to use the new toolchain transition. Checks the global incompatible change flag and the aspect's toolchain transition readiness attribute | shouldUseToolchainTransition | {
"repo_name": "werkt/bazel",
"path": "src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java",
"license": "apache-2.0",
"size": 32337
} | [
"com.google.devtools.build.lib.analysis.PlatformOptions",
"com.google.devtools.build.lib.analysis.config.BuildConfiguration",
"com.google.devtools.build.lib.packages.AspectDefinition",
"javax.annotation.Nullable"
] | import com.google.devtools.build.lib.analysis.PlatformOptions; import com.google.devtools.build.lib.analysis.config.BuildConfiguration; import com.google.devtools.build.lib.packages.AspectDefinition; import javax.annotation.Nullable; | import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.analysis.config.*; import com.google.devtools.build.lib.packages.*; import javax.annotation.*; | [
"com.google.devtools",
"javax.annotation"
] | com.google.devtools; javax.annotation; | 466,485 |
public static Date parseDate(String dateString) throws ParseException {
return LOCAL_FORMAT.get().parse(dateString);
} | static Date function(String dateString) throws ParseException { return LOCAL_FORMAT.get().parse(dateString); } | /**
* Parses the string to a date.
* @param dateString The string format of a date, it's yyyymmdd.
* @return A date.
* @throws ParseException
*/ | Parses the string to a date | parseDate | {
"repo_name": "vincentpoon/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobUtils.java",
"license": "apache-2.0",
"size": 39494
} | [
"java.text.ParseException",
"java.util.Date"
] | import java.text.ParseException; import java.util.Date; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 1,035,728 |
public static boolean isInClasspath(AbstractFile file) {
StringTokenizer parser;
String path;
path = file.getAbsolutePath();
parser = new StringTokenizer(System.getProperty("java.class.path"), System.getProperty("path.separator"));
while(parser.hasMoreTokens())
... | static boolean function(AbstractFile file) { StringTokenizer parser; String path; path = file.getAbsolutePath(); parser = new StringTokenizer(System.getProperty(STR), System.getProperty(STR)); while(parser.hasMoreTokens()) if(parser.nextToken().equals(path)) return true; return false; } static boolean isAvailable(Abstr... | /**
* Returns <code>true</code> if the specified file is in the system classpath.
* @param file file whose presence in the system classpath will be checked.
* @return <code>true</code> if the specified file is in the system classpath, <code>false</code> otherwise.
*/ | Returns <code>true</code> if the specified file is in the system classpath | isInClasspath | {
"repo_name": "jorgevasquezp/mucommander",
"path": "src/main/com/mucommander/extension/ExtensionManager.java",
"license": "gpl-3.0",
"size": 14367
} | [
"com.mucommander.commons.file.AbstractFile",
"java.util.StringTokenizer"
] | import com.mucommander.commons.file.AbstractFile; import java.util.StringTokenizer; | import com.mucommander.commons.file.*; import java.util.*; | [
"com.mucommander.commons",
"java.util"
] | com.mucommander.commons; java.util; | 2,756,960 |
@Test
@SmallTest
public void testMhtmlPropertiesFromRenderer() {
String testUrl = UrlUtils.getTestFileUrl("offline_pages/hello.mhtml");
sActivityTestRule.loadUrl(testUrl);
final AtomicReference<OfflinePageItem> offlinePageItem = new AtomicReference<>();
TestThreadUtils.runOn... | void function() { String testUrl = UrlUtils.getTestFileUrl(STR); sActivityTestRule.loadUrl(testUrl); final AtomicReference<OfflinePageItem> offlinePageItem = new AtomicReference<>(); TestThreadUtils.runOnUiThreadBlocking(() -> { offlinePageItem.set(OfflinePageUtils.getOfflinePage( sActivityTestRule.getActivity().getAct... | /**
* This gets a file:// URL which should result in an untrusted offline page.
*/ | This gets a file:// URL which should result in an untrusted offline page | testMhtmlPropertiesFromRenderer | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtilsTest.java",
"license": "bsd-3-clause",
"size": 23248
} | [
"java.util.concurrent.atomic.AtomicReference",
"org.chromium.base.test.util.UrlUtils",
"org.chromium.content_public.browser.test.util.TestThreadUtils",
"org.junit.Assert"
] | import java.util.concurrent.atomic.AtomicReference; import org.chromium.base.test.util.UrlUtils; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.junit.Assert; | import java.util.concurrent.atomic.*; import org.chromium.base.test.util.*; import org.chromium.content_public.browser.test.util.*; import org.junit.*; | [
"java.util",
"org.chromium.base",
"org.chromium.content_public",
"org.junit"
] | java.util; org.chromium.base; org.chromium.content_public; org.junit; | 2,463,488 |
ServiceFuture<List<StorageAccountInfo>> listByAccountAsync(final String resourceGroupName, final String accountName, final ListOperationCallback<StorageAccountInfo> serviceCallback); | ServiceFuture<List<StorageAccountInfo>> listByAccountAsync(final String resourceGroupName, final String accountName, final ListOperationCallback<StorageAccountInfo> serviceCallback); | /**
* Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any.
*
* @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account.
* @param accountNa... | Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any | listByAccountAsync | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/StorageAccounts.java",
"license": "mit",
"size": 47488
} | [
"com.microsoft.azure.ListOperationCallback",
"com.microsoft.azure.management.datalake.analytics.models.StorageAccountInfo",
"com.microsoft.rest.ServiceFuture",
"java.util.List"
] | import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.management.datalake.analytics.models.StorageAccountInfo; import com.microsoft.rest.ServiceFuture; import java.util.List; | import com.microsoft.azure.*; import com.microsoft.azure.management.datalake.analytics.models.*; import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.azure",
"com.microsoft.rest",
"java.util"
] | com.microsoft.azure; com.microsoft.rest; java.util; | 2,006,621 |
public static DataResult retiredChannelTree(User user,
ListControl lc) {
SelectMode m = ModeFactory.getMode("Channel_queries", "retired_channel_tree");
Map params = new HashMap();
params.put("org_id", user.getOrg().getId());
params.put... | static DataResult function(User user, ListControl lc) { SelectMode m = ModeFactory.getMode(STR, STR); Map params = new HashMap(); params.put(STR, user.getOrg().getId()); params.put(STR, user.getId()); DataResult dr = makeDataResult(params, params, lc, m); return dr; } | /**
* Returns a list of ChannelTreeNodes containing end-of-life
* retired channels the user can see
* @param user who we are requesting channels for
* @param lc ListControl to use
* @return list of ChannelTreeNode's
*/ | Returns a list of ChannelTreeNodes containing end-of-life retired channels the user can see | retiredChannelTree | {
"repo_name": "dmacvicar/spacewalk",
"path": "java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java",
"license": "gpl-2.0",
"size": 105505
} | [
"com.redhat.rhn.common.db.datasource.DataResult",
"com.redhat.rhn.common.db.datasource.ModeFactory",
"com.redhat.rhn.common.db.datasource.SelectMode",
"com.redhat.rhn.domain.user.User",
"com.redhat.rhn.frontend.listview.ListControl",
"java.util.HashMap",
"java.util.Map"
] | import com.redhat.rhn.common.db.datasource.DataResult; import com.redhat.rhn.common.db.datasource.ModeFactory; import com.redhat.rhn.common.db.datasource.SelectMode; import com.redhat.rhn.domain.user.User; import com.redhat.rhn.frontend.listview.ListControl; import java.util.HashMap; import java.util.Map; | import com.redhat.rhn.common.db.datasource.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.listview.*; import java.util.*; | [
"com.redhat.rhn",
"java.util"
] | com.redhat.rhn; java.util; | 1,311,969 |
RectF getDisplayRect(); | RectF getDisplayRect(); | /**
* Gets the Display Rectangle of the currently displayed Drawable. The
* Rectangle is relative to this View and includes all scaling and
* translations.
*
* @return - RectF of Displayed Drawable
*/ | Gets the Display Rectangle of the currently displayed Drawable. The Rectangle is relative to this View and includes all scaling and translations | getDisplayRect | {
"repo_name": "xiongtiancheng/jchat-android",
"path": "JMessageDemo/src/cn/jpush/im/android/demo/view/photoview/IPhotoView.java",
"license": "mit",
"size": 4874
} | [
"android.graphics.RectF"
] | import android.graphics.RectF; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,532,514 |
public boolean removeCacheItem(@NonNullable String cacheName, @NonNullable String key)
{
File file = CacheFileUtils.inst.getCacheFile(cacheName, key);
return file.delete();
} | boolean function(@NonNullable String cacheName, @NonNullable String key) { File file = CacheFileUtils.inst.getCacheFile(cacheName, key); return file.delete(); } | /**
* Removes the specified cache item from the file system.
*
* @return true if successful; false otherwise.
*/ | Removes the specified cache item from the file system | removeCacheItem | {
"repo_name": "apache/commons-jcs",
"path": "commons-jcs-sandbox/yajcache/src/main/java/org/apache/commons/jcs/yajcache/file/CacheFileDAO.java",
"license": "apache-2.0",
"size": 5944
} | [
"java.io.File",
"org.apache.commons.jcs.yajcache.lang.annotation.NonNullable"
] | import java.io.File; import org.apache.commons.jcs.yajcache.lang.annotation.NonNullable; | import java.io.*; import org.apache.commons.jcs.yajcache.lang.annotation.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 681,436 |
public boolean pointInFrustum (Vector3 point) {
for (int i = 0; i < planes.length; i++) {
PlaneSide result = planes[i].testPoint(point);
if (result == PlaneSide.Back) return false;
}
return true;
}
| boolean function (Vector3 point) { for (int i = 0; i < planes.length; i++) { PlaneSide result = planes[i].testPoint(point); if (result == PlaneSide.Back) return false; } return true; } | /** Returns whether the point is in the frustum.
*
* @param point The point
* @return Whether the point is in the frustum. */ | Returns whether the point is in the frustum | pointInFrustum | {
"repo_name": "yuripourre/abby",
"path": "src/main/java/com/badlogic/gdx/math/Frustum.java",
"license": "lgpl-3.0",
"size": 10791
} | [
"com.badlogic.gdx.math.Plane"
] | import com.badlogic.gdx.math.Plane; | import com.badlogic.gdx.math.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 860,254 |
@Test
public void testCachingWithinBatch() throws Exception {
underTest.watermarkFuture(STATE_KEY_1, STATE_FAMILY);
underTest.watermarkFuture(STATE_KEY_1, STATE_FAMILY);
assertEquals(1, underTest.pendingLookups.size());
} | void function() throws Exception { underTest.watermarkFuture(STATE_KEY_1, STATE_FAMILY); underTest.watermarkFuture(STATE_KEY_1, STATE_FAMILY); assertEquals(1, underTest.pendingLookups.size()); } | /**
* Tests that multiple reads for the same tag in the same batch are cached. We can't compare
* the futures since we've wrapped the delegate aronud them, so we just verify there is only
* one queued lookup.
*/ | Tests that multiple reads for the same tag in the same batch are cached. We can't compare the futures since we've wrapped the delegate aronud them, so we just verify there is only one queued lookup | testCachingWithinBatch | {
"repo_name": "Test-Betta-Inc/musical-umbrella",
"path": "sdk/src/test/java/com/google/cloud/dataflow/sdk/runners/worker/WindmillStateReaderTest.java",
"license": "apache-2.0",
"size": 15984
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,460,864 |
public OpenAnswerDefinitionBuilder addValidator(ComparisonOperator comparisonOperator, String variablePath) {
element.addValidationDataSource(
new ComparingDataSource(null, comparisonOperator, checkVariablePath(new VariableDataSource(variablePath))));
return this;
} | OpenAnswerDefinitionBuilder function(ComparisonOperator comparisonOperator, String variablePath) { element.addValidationDataSource( new ComparingDataSource(null, comparisonOperator, checkVariablePath(new VariableDataSource(variablePath)))); return this; } | /**
* Add a {@link IValidator} based on a {@link VariableDataSource} to the current {@link OpenAnswerDefinition}.
*
* @param comparisonOperator
* @param variablePath
* @return
*/ | Add a <code>IValidator</code> based on a <code>VariableDataSource</code> to the current <code>OpenAnswerDefinition</code> | addValidator | {
"repo_name": "apruden/onyx",
"path": "onyx-modules/quartz/quartz-core/src/main/java/org/obiba/onyx/quartz/core/engine/questionnaire/util/builder/OpenAnswerDefinitionBuilder.java",
"license": "gpl-3.0",
"size": 17666
} | [
"org.obiba.onyx.core.data.ComparingDataSource",
"org.obiba.onyx.core.data.VariableDataSource",
"org.obiba.onyx.util.data.ComparisonOperator"
] | import org.obiba.onyx.core.data.ComparingDataSource; import org.obiba.onyx.core.data.VariableDataSource; import org.obiba.onyx.util.data.ComparisonOperator; | import org.obiba.onyx.core.data.*; import org.obiba.onyx.util.data.*; | [
"org.obiba.onyx"
] | org.obiba.onyx; | 1,646,742 |
public static void registerBlock(Block pBlock, Class<? extends ItemBlock> pItemBlock)
{
GameRegistry.registerBlock(pBlock, pItemBlock, Reference.MODID + pBlock.getUnlocalizedName().substring(5));
} | static void function(Block pBlock, Class<? extends ItemBlock> pItemBlock) { GameRegistry.registerBlock(pBlock, pItemBlock, Reference.MODID + pBlock.getUnlocalizedName().substring(5)); } | /**
* Register Block with attached itemclass
* @param pBlock
* @param pItemBlock
*/ | Register Block with attached itemclass | registerBlock | {
"repo_name": "Namikon/ODIB",
"path": "src/main/java/eu/usrv/odib/help/RegisterHelper.java",
"license": "mit",
"size": 789
} | [
"net.minecraft.block.Block",
"net.minecraft.item.ItemBlock"
] | import net.minecraft.block.Block; import net.minecraft.item.ItemBlock; | import net.minecraft.block.*; import net.minecraft.item.*; | [
"net.minecraft.block",
"net.minecraft.item"
] | net.minecraft.block; net.minecraft.item; | 2,133,729 |
public void drawRangeMarker(Graphics2D g2,
ContourPlot plot,
ValueAxis rangeAxis,
Marker marker,
Rectangle2D dataArea) {
if (marker instanceof ValueMarker) {
Va... | void function(Graphics2D g2, ContourPlot plot, ValueAxis rangeAxis, Marker marker, Rectangle2D dataArea) { if (marker instanceof ValueMarker) { ValueMarker vm = (ValueMarker) marker; double value = vm.getValue(); Range range = rangeAxis.getRange(); if (!range.contains(value)) { return; } double y = rangeAxis.valueToJav... | /**
* Draws a horizontal line across the chart to represent a 'range marker'.
*
* @param g2 the graphics device.
* @param plot the plot.
* @param rangeAxis the range axis.
* @param marker the marker line.
* @param dataArea the axis data area.
*/ | Draws a horizontal line across the chart to represent a 'range marker' | drawRangeMarker | {
"repo_name": "fluidware/Eastwood-Charts",
"path": "source/org/jfree/chart/plot/ContourPlot.java",
"license": "lgpl-2.1",
"size": 61602
} | [
"java.awt.Graphics2D",
"java.awt.Paint",
"java.awt.Stroke",
"java.awt.geom.Line2D",
"java.awt.geom.Rectangle2D",
"org.jfree.chart.axis.ValueAxis",
"org.jfree.data.Range",
"org.jfree.ui.RectangleEdge"
] | import java.awt.Graphics2D; import java.awt.Paint; import java.awt.Stroke; import java.awt.geom.Line2D; import java.awt.geom.Rectangle2D; import org.jfree.chart.axis.ValueAxis; import org.jfree.data.Range; import org.jfree.ui.RectangleEdge; | import java.awt.*; import java.awt.geom.*; import org.jfree.chart.axis.*; import org.jfree.data.*; import org.jfree.ui.*; | [
"java.awt",
"org.jfree.chart",
"org.jfree.data",
"org.jfree.ui"
] | java.awt; org.jfree.chart; org.jfree.data; org.jfree.ui; | 2,812,330 |
public static PlayersSupplier singleChunkPlayers(@Nonnull Chunk chunk) {
return multiChunkPlayers(chunk);
} | static PlayersSupplier function(@Nonnull Chunk chunk) { return multiChunkPlayers(chunk); } | /**
* Gets a new {@link PlayersSupplier} which returns all players in a {@link Chunk}.
*
* @param chunk chunk to get entities from
*
* @return entities supplier
*
* @see #multiChunkPlayers(Collection)
*/ | Gets a new <code>PlayersSupplier</code> which returns all players in a <code>Chunk</code> | singleChunkPlayers | {
"repo_name": "SupaHam/SupaCommons",
"path": "commons-bukkit/src/main/java/com/supaham/commons/bukkit/players/Players.java",
"license": "gpl-3.0",
"size": 10959
} | [
"javax.annotation.Nonnull",
"org.bukkit.Chunk"
] | import javax.annotation.Nonnull; import org.bukkit.Chunk; | import javax.annotation.*; import org.bukkit.*; | [
"javax.annotation",
"org.bukkit"
] | javax.annotation; org.bukkit; | 1,992,292 |
protected static void writeSingleEntity(final StringWriter strWriter, final TableEntity entity,
final boolean isTableEntry, final OperationContext opContext) throws StorageException, IOException {
JsonGenerator generator = jsonFactory.createGenerator(strWriter);
try {
// wri... | static void function(final StringWriter strWriter, final TableEntity entity, final boolean isTableEntry, final OperationContext opContext) throws StorageException, IOException { JsonGenerator generator = jsonFactory.createGenerator(strWriter); try { writeJsonEntity(generator, entity, isTableEntry, opContext); } finally... | /**
* Reserved for internal use. Writes an entity to the stream as an JSON resource, leaving the stream open
* for additional writing.
*
* @param strWriter
* The <code>StringWriter</code> to write the entity to.
* @param entity
* The instance implementing {@link... | Reserved for internal use. Writes an entity to the stream as an JSON resource, leaving the stream open for additional writing | writeSingleEntity | {
"repo_name": "horizon-institute/runspotrun-android-client",
"path": "src/com/microsoft/azure/storage/table/TableEntitySerializer.java",
"license": "agpl-3.0",
"size": 9003
} | [
"com.fasterxml.jackson.core.JsonGenerator",
"com.microsoft.azure.storage.OperationContext",
"com.microsoft.azure.storage.StorageException",
"java.io.IOException",
"java.io.StringWriter"
] | import com.fasterxml.jackson.core.JsonGenerator; import com.microsoft.azure.storage.OperationContext; import com.microsoft.azure.storage.StorageException; import java.io.IOException; import java.io.StringWriter; | import com.fasterxml.jackson.core.*; import com.microsoft.azure.storage.*; import java.io.*; | [
"com.fasterxml.jackson",
"com.microsoft.azure",
"java.io"
] | com.fasterxml.jackson; com.microsoft.azure; java.io; | 153,719 |
@Nullable
BigDecimal getBigDecimalValue(); | BigDecimal getBigDecimalValue(); | /**
* Returns the exact value of this literal.
*/ | Returns the exact value of this literal | getBigDecimalValue | {
"repo_name": "jwren/intellij-community",
"path": "python/python-psi-api/src/com/jetbrains/python/psi/PyNumericLiteralExpression.java",
"license": "apache-2.0",
"size": 1582
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 147,682 |
public static FixedPartitionAttributes createFixedPartition(String name, boolean isPrimary) {
return new FixedPartitionAttributesImpl().setPartitionName(name).isPrimary(isPrimary)
.setNumBuckets(DEFAULT_NUM_BUCKETS);
} | static FixedPartitionAttributes function(String name, boolean isPrimary) { return new FixedPartitionAttributesImpl().setPartitionName(name).isPrimary(isPrimary) .setNumBuckets(DEFAULT_NUM_BUCKETS); } | /**
* Creates an instance of <code>FixedPartitionAttributes</code>.
*
* @param name Name of the fixed partition.
* @param isPrimary True if this member is the primary for the partition.
*/ | Creates an instance of <code>FixedPartitionAttributes</code> | createFixedPartition | {
"repo_name": "smanvi-pivotal/geode",
"path": "geode-core/src/main/java/org/apache/geode/cache/FixedPartitionAttributes.java",
"license": "apache-2.0",
"size": 3842
} | [
"org.apache.geode.internal.cache.FixedPartitionAttributesImpl"
] | import org.apache.geode.internal.cache.FixedPartitionAttributesImpl; | import org.apache.geode.internal.cache.*; | [
"org.apache.geode"
] | org.apache.geode; | 2,768,482 |
@Path("remove")
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces({MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN})
public CLIOutputResponse remove(final RemoveRequest request) throws ApiException, IOException {
request.setProjectPath(getAbsoluteProjectPath(request.getProjectPath()));
... | @Path(STR) @Consumes(MediaType.APPLICATION_JSON) @Produces({MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN}) CLIOutputResponse function(final RemoveRequest request) throws ApiException, IOException { request.setProjectPath(getAbsoluteProjectPath(request.getProjectPath())); return this.subversionApi.remove(request); } | /**
* Remove the selected paths to version control.
*
* @param request
* the remove request
* @return the remove response
* @throws IOException
* if there is a problem executing the command
* @throws SubversionException
* if there is a Subversion issu... | Remove the selected paths to version control | remove | {
"repo_name": "gazarenkov/che-sketch",
"path": "plugins/plugin-svn/che-plugin-svn-ext-server/src/main/java/org/eclipse/che/plugin/svn/server/rest/SubversionService.java",
"license": "epl-1.0",
"size": 20504
} | [
"java.io.IOException",
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"org.eclipse.che.api.core.ApiException",
"org.eclipse.che.plugin.svn.shared.CLIOutputResponse",
"org.eclipse.che.plugin.svn.shared.RemoveRequest"
] | import java.io.IOException; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.eclipse.che.api.core.ApiException; import org.eclipse.che.plugin.svn.shared.CLIOutputResponse; import org.eclipse.che.plugin.svn.shared.RemoveRequest; | import java.io.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.eclipse.che.api.core.*; import org.eclipse.che.plugin.svn.shared.*; | [
"java.io",
"javax.ws",
"org.eclipse.che"
] | java.io; javax.ws; org.eclipse.che; | 2,399,276 |
List<Token> result = new ArrayList<Token>();
if (input == null) {
return result;
}
final int WHITESPACE = 0;
final int WORD = 1;
final int STRINGDQ = 2;
final int STRINGSQ = 3;
final int COMMENT = 4;
int state = WHITESPACE;
char ch; /... | List<Token> result = new ArrayList<Token>(); if (input == null) { return result; } final int WHITESPACE = 0; final int WORD = 1; final int STRINGDQ = 2; final int STRINGSQ = 3; final int COMMENT = 4; int state = WHITESPACE; char ch; int tokenIndex = -1; StringBuilder token = new StringBuilder(STR') { state = STRINGDQ; ... | /**
* State machine input string tokenizer.
*
* @param input String to be tokenized
* @return List of tokens
* @see asg.cliche.Shell.Token
* @see asg.cliche.Shell.escapeString
*/ | State machine input string tokenizer | tokenize | {
"repo_name": "masgari/cliche",
"path": "src/main/java/asg/cliche/Token.java",
"license": "mit",
"size": 7454
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 830,842 |
public static final TextToSpeechClient create(TextToSpeechSettings settings) throws IOException {
return new TextToSpeechClient(settings);
} | static final TextToSpeechClient function(TextToSpeechSettings settings) throws IOException { return new TextToSpeechClient(settings); } | /**
* Constructs an instance of TextToSpeechClient, using the given settings. The channels are
* created based on the settings passed in, or defaults for any settings that are not set.
*/ | Constructs an instance of TextToSpeechClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set | create | {
"repo_name": "googleapis/java-texttospeech",
"path": "google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechClient.java",
"license": "apache-2.0",
"size": 12307
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,574,449 |
private void generateDeclarations(Node.Nodes page) throws JasperException {
class DeclarationVisitor extends Node.Visitor {
private boolean getServletInfoGenerated = false; | void function(Node.Nodes page) throws JasperException { class DeclarationVisitor extends Node.Visitor { private boolean getServletInfoGenerated = false; | /**
* Generates declarations. This includes "info" of the page directive, and
* scriptlet declarations.
*/ | Generates declarations. This includes "info" of the page directive, and scriptlet declarations | generateDeclarations | {
"repo_name": "ctomc/jastow",
"path": "src/main/java/org/apache/jasper/compiler/Generator.java",
"license": "apache-2.0",
"size": 166255
} | [
"org.apache.jasper.JasperException"
] | import org.apache.jasper.JasperException; | import org.apache.jasper.*; | [
"org.apache.jasper"
] | org.apache.jasper; | 2,677,725 |
public synchronized InputStream getResourceStream( String name )
throws ResourceNotFoundException
{
InputStream result = null;
if (name == null || name.length() == 0)
{
throw new ResourceNotFoundException ("WebappLoader : No template name provided");
}
... | synchronized InputStream function( String name ) throws ResourceNotFoundException { InputStream result = null; if (name == null name.length() == 0) { throw new ResourceNotFoundException (STR); } while (name.startsWith("/")) { name = name.substring(1); } Exception exception = null; for (int i = 0; i < paths.length; i++)... | /**
* Get an InputStream so that the Runtime can build a
* template with it.
*
* @param name name of template to get
* @return InputStream containing the template
* @throws ResourceNotFoundException if template not found
* in classpath.
*/ | Get an InputStream so that the Runtime can build a template with it | getResourceStream | {
"repo_name": "harfalm/Sakai-10.1",
"path": "rwiki/rwiki-tool/tool/src/java/uk/ac/cam/caret/sakai/rwiki/tool/WebappLoader.java",
"license": "apache-2.0",
"size": 9386
} | [
"java.io.InputStream",
"org.apache.velocity.exception.ResourceNotFoundException"
] | import java.io.InputStream; import org.apache.velocity.exception.ResourceNotFoundException; | import java.io.*; import org.apache.velocity.exception.*; | [
"java.io",
"org.apache.velocity"
] | java.io; org.apache.velocity; | 1,333,486 |
@Override
public String getFormat() {
return Lists.firstEntry(format);
} | String function() { return Lists.firstEntry(format); } | /**
* Gets the DublinCore module format. Convenience method that can be used to obtain the first
* item, <b>null</b> if none.
* <p>
*
* @return the first DublinCore module format, <b>null</b> if none.
*/ | Gets the DublinCore module format. Convenience method that can be used to obtain the first item, null if none. | getFormat | {
"repo_name": "bibliolabs/rome",
"path": "rome/src/main/java/com/rometools/rome/feed/module/DCModuleImpl.java",
"license": "apache-2.0",
"size": 26632
} | [
"com.rometools.utils.Lists"
] | import com.rometools.utils.Lists; | import com.rometools.utils.*; | [
"com.rometools.utils"
] | com.rometools.utils; | 280,096 |
CompletableFuture<Void> close(); | CompletableFuture<Void> close(); | /**
* Closes the partition group.
*
* @return a future to be completed once the partition group has been closed
*/ | Closes the partition group | close | {
"repo_name": "kuujo/copycat",
"path": "primitive/src/main/java/io/atomix/primitive/partition/ManagedPartitionGroup.java",
"license": "apache-2.0",
"size": 1556
} | [
"java.util.concurrent.CompletableFuture"
] | import java.util.concurrent.CompletableFuture; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,621,597 |
public List<AutoScalingInstanceDetails> describeAutoScalingInstances(String... instanceIds) {
if (instanceIds == null || instanceIds.length == 0) {
LOGGER.info(String.format("Getting all auto-scaling instances in region %s.", region));
} else {
LOGGER.info(String.format("Gett... | List<AutoScalingInstanceDetails> function(String... instanceIds) { if (instanceIds == null instanceIds.length == 0) { LOGGER.info(String.format(STR, region)); } else { LOGGER.info(String.format(STR, instanceIds.length, region)); } List<AutoScalingInstanceDetails> instances = new LinkedList<AutoScalingInstanceDetails>()... | /**
* Describe a set of specific auto-scaling instances.
*
* @param instanceIds the instance ids
* @return the instances
*/ | Describe a set of specific auto-scaling instances | describeAutoScalingInstances | {
"repo_name": "harish143us/SimianArmy",
"path": "src/main/java/com/netflix/simianarmy/client/aws/AWSClient.java",
"license": "apache-2.0",
"size": 35989
} | [
"com.amazonaws.services.autoscaling.AmazonAutoScalingClient",
"com.amazonaws.services.autoscaling.model.AutoScalingInstanceDetails",
"com.amazonaws.services.autoscaling.model.DescribeAutoScalingInstancesRequest",
"com.amazonaws.services.autoscaling.model.DescribeAutoScalingInstancesResult",
"java.util.Array... | import com.amazonaws.services.autoscaling.AmazonAutoScalingClient; import com.amazonaws.services.autoscaling.model.AutoScalingInstanceDetails; import com.amazonaws.services.autoscaling.model.DescribeAutoScalingInstancesRequest; import com.amazonaws.services.autoscaling.model.DescribeAutoScalingInstancesResult; import j... | import com.amazonaws.services.autoscaling.*; import com.amazonaws.services.autoscaling.model.*; import java.util.*; | [
"com.amazonaws.services",
"java.util"
] | com.amazonaws.services; java.util; | 2,121,399 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
super.notifyChanged(notification);
} | void function(Notification notification) { updateChildren(notification); super.notifyChanged(notification); } | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "peterbartha/j2eecm",
"path": "edu.bme.vik.iit.j2eecm.edit/src/components/provider/strutsLinkRelationItemProvider.java",
"license": "gpl-2.0",
"size": 4438
} | [
"org.eclipse.emf.common.notify.Notification"
] | import org.eclipse.emf.common.notify.Notification; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,211,463 |
public String getPreferenceValue(String key, String defaultValue) {
IPreferencesService service = Platform.getPreferencesService();
String qualifier = getBundle().getSymbolicName();
String value = service.getString(qualifier, key, defaultValue, null);
return System.getProperty(key, value);
} | String function(String key, String defaultValue) { IPreferencesService service = Platform.getPreferencesService(); String qualifier = getBundle().getSymbolicName(); String value = service.getString(qualifier, key, defaultValue, null); return System.getProperty(key, value); } | /**
* look up a preference value.
* <p>
* will return user settings if available or default settings if not. If a
* system property with the given key is defined it will overrule any
* existing setting in the preference store. if the key is not defined, this
* method returns the given default..
*
* @pa... | look up a preference value. will return user settings if available or default settings if not. If a system property with the given key is defined it will overrule any existing setting in the preference store. if the key is not defined, this method returns the given default. | getPreferenceValue | {
"repo_name": "TeamSPoon/logicmoo_base",
"path": "prolog/logicmoo/pdt_server/pdt.editor/src/org/cs3/pdt/editor/PDTPlugin.java",
"license": "mit",
"size": 5748
} | [
"org.eclipse.core.runtime.Platform",
"org.eclipse.core.runtime.preferences.IPreferencesService"
] | import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.preferences.IPreferencesService; | import org.eclipse.core.runtime.*; import org.eclipse.core.runtime.preferences.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 1,961,450 |
public static void closeQuietly(Closeable closeable) {
if (closeable != null) {
try {
closeable.close();
} catch (RuntimeException rethrown) {
throw rethrown;
} catch (Exception ignored) {
}
}
} | static void function(Closeable closeable) { if (closeable != null) { try { closeable.close(); } catch (RuntimeException rethrown) { throw rethrown; } catch (Exception ignored) { } } } | /**
* Closes 'closeable', ignoring any checked exceptions. Does nothing if 'closeable' is null.
*/ | Closes 'closeable', ignoring any checked exceptions. Does nothing if 'closeable' is null | closeQuietly | {
"repo_name": "dgrlucky/Awesome",
"path": "library/src/main/java/com/library/common/image/DiskLruCache.java",
"license": "apache-2.0",
"size": 33896
} | [
"java.io.Closeable"
] | import java.io.Closeable; | import java.io.*; | [
"java.io"
] | java.io; | 1,704,273 |
List<RenditionDefinition> loadRenditionDefinitions();
| List<RenditionDefinition> loadRenditionDefinitions(); | /**
* This method retrieves the {@link RenditionDefinition}s that have been
* stored in the repository using the <code>save()</code> method.
* <P/>
* If there are no such {@link RenditionDefinition}s, an empty list is
* returned.
*
* @return The {@link RenditionDefinition}s.
... | This method retrieves the <code>RenditionDefinition</code>s that have been stored in the repository using the <code>save()</code> method. If there are no such <code>RenditionDefinition</code>s, an empty list is returned | loadRenditionDefinitions | {
"repo_name": "Alfresco/community-edition",
"path": "projects/repository/source/java/org/alfresco/repo/rendition/RenditionDefinitionPersister.java",
"license": "lgpl-3.0",
"size": 3704
} | [
"java.util.List",
"org.alfresco.service.cmr.rendition.RenditionDefinition"
] | import java.util.List; import org.alfresco.service.cmr.rendition.RenditionDefinition; | import java.util.*; import org.alfresco.service.cmr.rendition.*; | [
"java.util",
"org.alfresco.service"
] | java.util; org.alfresco.service; | 1,798,032 |
public static boolean markAsTemplate(VirtualMachine vm) throws RemoteException {
boolean result = false;
if (vm.getConfig().isTemplate()) {
return result;
}
vm.markAsTemplate();
result = true;
return result;
} | static boolean function(VirtualMachine vm) throws RemoteException { boolean result = false; if (vm.getConfig().isTemplate()) { return result; } vm.markAsTemplate(); result = true; return result; } | /**
* Mark a vm as a template.
*
* @param vm
*/ | Mark a vm as a template | markAsTemplate | {
"repo_name": "occiware/Multi-Cloud-Studio",
"path": "plugins/org.eclipse.cmf.occi.multicloud.vmware.connector/src/org/ecplise/cmf/occi/multicloud/vmware/connector/driver/VMHelper.java",
"license": "epl-1.0",
"size": 37896
} | [
"com.vmware.vim25.mo.VirtualMachine",
"java.rmi.RemoteException"
] | import com.vmware.vim25.mo.VirtualMachine; import java.rmi.RemoteException; | import com.vmware.vim25.mo.*; import java.rmi.*; | [
"com.vmware.vim25",
"java.rmi"
] | com.vmware.vim25; java.rmi; | 2,780,257 |
public String getProviderAddress() {
if (providerAddress!=null) {
Matcher matcher = HOST_PORT_PATTERN.matcher(providerAddress);
if (matcher.matches() && isValidPort(matcher.group(2))) {
return matcher.group(1);
}
}else if(providerId!=null){
... | String function() { if (providerAddress!=null) { Matcher matcher = HOST_PORT_PATTERN.matcher(providerAddress); if (matcher.matches() && isValidPort(matcher.group(2))) { return matcher.group(1); } }else if(providerId!=null){ Matcher matcher = HOST_PORT_PATTERN.matcher(providerId); if (matcher.matches() && isValidPort(ma... | /**
* Get the providerAddress.
*
* @return the providerAddress.
*/ | Get the providerAddress | getProviderAddress | {
"repo_name": "foundation-runtime/service-directory",
"path": "1.2/sd-core/src/main/java/com/cisco/oss/foundation/directory/entity/ServiceInstanceHeartbeat.java",
"license": "apache-2.0",
"size": 4128
} | [
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 1,280,514 |
@LifecycleStart
@Override
public void start() throws Exception
{
super.start();
synchronized (lifecycleLock) {
Preconditions.checkState(!started, "already started");
started = true;
try {
cleanupStaleAnnouncements();
registerRunListener();
pathChildrenCache.st... | void function() throws Exception { super.start(); synchronized (lifecycleLock) { Preconditions.checkState(!started, STR); started = true; try { cleanupStaleAnnouncements(); registerRunListener(); pathChildrenCache.start(); log.info(STR); started = true; } catch (InterruptedException e) { throw e; } catch (Exception e) ... | /**
* Register a monitor for new tasks. When new tasks appear, the worker node announces a status to indicate it has
* started the task. When the task is complete, the worker node updates the status.
*/ | Register a monitor for new tasks. When new tasks appear, the worker node announces a status to indicate it has started the task. When the task is complete, the worker node updates the status | start | {
"repo_name": "dkhwangbo/druid",
"path": "indexing-service/src/main/java/org/apache/druid/indexing/worker/WorkerTaskMonitor.java",
"license": "apache-2.0",
"size": 7473
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,181,030 |
protected void createUifFormManagerIfNecessary(HttpServletRequest request) {
UifFormManager uifFormManager = (UifFormManager) request.getSession().getAttribute(UifParameters.FORM_MANAGER);
if (uifFormManager == null) {
uifFormManager = new UifFormManager();
request.getSes... | void function(HttpServletRequest request) { UifFormManager uifFormManager = (UifFormManager) request.getSession().getAttribute(UifParameters.FORM_MANAGER); if (uifFormManager == null) { uifFormManager = new UifFormManager(); request.getSession().setAttribute(UifParameters.FORM_MANAGER, uifFormManager); } GlobalVariable... | /**
* Checks if a form manager is present in the session, and if not creates a form manager and adds to the
* session and global variables.
*
* @param request http request being handled
*/ | Checks if a form manager is present in the session, and if not creates a form manager and adds to the session and global variables | createUifFormManagerIfNecessary | {
"repo_name": "mztaylor/rice-git",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/web/controller/UifControllerHandlerInterceptor.java",
"license": "apache-2.0",
"size": 10266
} | [
"javax.servlet.http.HttpServletRequest",
"org.kuali.rice.krad.uif.UifParameters",
"org.kuali.rice.krad.util.GlobalVariables",
"org.kuali.rice.krad.web.form.UifFormManager"
] | import javax.servlet.http.HttpServletRequest; import org.kuali.rice.krad.uif.UifParameters; import org.kuali.rice.krad.util.GlobalVariables; import org.kuali.rice.krad.web.form.UifFormManager; | import javax.servlet.http.*; import org.kuali.rice.krad.uif.*; import org.kuali.rice.krad.util.*; import org.kuali.rice.krad.web.form.*; | [
"javax.servlet",
"org.kuali.rice"
] | javax.servlet; org.kuali.rice; | 350,032 |
public long getGlassPanePatience(TimeUnit timeUnit) {
return timeUnit.convert(glassPanePatienceNanos, TimeUnit.NANOSECONDS);
} | long function(TimeUnit timeUnit) { return timeUnit.convert(glassPanePatienceNanos, TimeUnit.NANOSECONDS); } | /**
* Returns the time to wait to use the panels created by the
* {@link #getMainGlassPane() MainGlassPane} instead of the ones created by
* the {@link #getImmediateGlassPane() ImmediateGlassPane} in the given
* time unit.
*
* @param timeUnit the time unit in which the the timeout value is... | Returns the time to wait to use the panels created by the <code>#getMainGlassPane() MainGlassPane</code> instead of the ones created by the <code>#getImmediateGlassPane() ImmediateGlassPane</code> in the given time unit | getGlassPanePatience | {
"repo_name": "kelemen/JTrim",
"path": "subprojects/jtrim-swing-property/src/main/java/org/jtrim2/property/swing/DelayedGlassPane.java",
"license": "apache-2.0",
"size": 6331
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,001,961 |
public final native CMLineHandleOverlay setGutterMarker(CMLineHandleOverlay lineHandle,
String gutterId, Element element) ; | final native CMLineHandleOverlay function(CMLineHandleOverlay lineHandle, String gutterId, Element element) ; | /**
* Sets the gutter marker for the given gutter (identified by its CSS class) to the given value.<br>
* Value can be either null, to clear the marker, or a DOM element, to set it.<br>
* The DOM element will be shown in the specified gutter next to the specified line.
* @param lineHandle the line
... | Sets the gutter marker for the given gutter (identified by its CSS class) to the given value. Value can be either null, to clear the marker, or a DOM element, to set it. The DOM element will be shown in the specified gutter next to the specified line | setGutterMarker | {
"repo_name": "riuvshin/che-plugins",
"path": "plugin-codemirror/che-plugin-codemirror-jso/src/main/java/org/eclipse/che/ide/editor/codemirrorjso/client/CMEditorOverlay.java",
"license": "epl-1.0",
"size": 20846
} | [
"org.eclipse.che.ide.editor.codemirrorjso.client.line.CMLineHandleOverlay"
] | import org.eclipse.che.ide.editor.codemirrorjso.client.line.CMLineHandleOverlay; | import org.eclipse.che.ide.editor.codemirrorjso.client.line.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 742,161 |
@Nonnull
public UserActivityCollectionRequest filter(@Nonnull final String value) {
addFilterOption(value);
return this;
} | UserActivityCollectionRequest function(@Nonnull final String value) { addFilterOption(value); return this; } | /**
* Sets the filter clause for the request
*
* @param value the filter clause
* @return the updated request
*/ | Sets the filter clause for the request | filter | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/UserActivityCollectionRequest.java",
"license": "mit",
"size": 5747
} | [
"com.microsoft.graph.requests.UserActivityCollectionRequest",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.requests.UserActivityCollectionRequest; import javax.annotation.Nonnull; | import com.microsoft.graph.requests.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 149,972 |
public List<FaultCodeV3IO> getFaultcodes() {
return faultcodes;
} | List<FaultCodeV3IO> function() { return faultcodes; } | /**
* Where to put the analysis that are linked to the message
*/ | Where to put the analysis that are linked to the message | getFaultcodes | {
"repo_name": "flightwatching/wilco-api",
"path": "java/src/main/java/com/fw/wilco/api/InputMessageV3IO.java",
"license": "apache-2.0",
"size": 6943
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,457,018 |
public static void openInBrowser(URI uri) {
String browser = System.getenv("BROWSER");
if (browser != null) {
execExternal(browser, uri.toString());
} else {
if (Desktop.isDesktopSupported()) {
try {
Desktop.getDesktop().browse(uri)... | static void function(URI uri) { String browser = System.getenv(STR); if (browser != null) { execExternal(browser, uri.toString()); } else { if (Desktop.isDesktopSupported()) { try { Desktop.getDesktop().browse(uri); } catch (Exception e) { logger.error(STR, e); } return; } logger.error(STR); } } | /**
* Open a URI in the default browser.
* By default use the Java Desktop API.
* If BROWSER env var is set, use that.
* @param uri Link to be opened in browser
*/ | Open a URI in the default browser. By default use the Java Desktop API. If BROWSER env var is set, use that | openInBrowser | {
"repo_name": "tmc-cli/tmc-cli",
"path": "src/main/java/fi/helsinki/cs/tmc/cli/io/ExternalsUtil.java",
"license": "mit",
"size": 6803
} | [
"java.awt.Desktop"
] | import java.awt.Desktop; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,031,506 |
public List<OperandTreeNode> getNodes() {
// ESCA-JAVA0259: Return of collection is OK, speed is more important
// when creating nodes.
return m_nodes;
} | List<OperandTreeNode> function() { return m_nodes; } | /**
* Returns the nodes of the operand tree.
*
* @return The nodes of the operand tree.
*/ | Returns the nodes of the operand tree | getNodes | {
"repo_name": "chubbymaggie/binnavi",
"path": "src/main/java/com/google/security/zynamics/binnavi/Database/NodeParser/OperandTree.java",
"license": "apache-2.0",
"size": 1599
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,934,328 |
return LoggerFactory.getLogger(String.format("notprivacysafe.%s", clazz.getName()));
} | return LoggerFactory.getLogger(String.format(STR, clazz.getName())); } | /**
* Creates a logger with a name indicating that the content might not be privacy safe
* eg it could contain user generated content or privacy information.
*
* @param clazz the class to make a logger for
*
* @return a new Logger
*/ | Creates a logger with a name indicating that the content might not be privacy safe eg it could contain user generated content or privacy information | getNotPrivacySafeLogger | {
"repo_name": "graphql-java/graphql-java",
"path": "src/main/java/graphql/util/LogKit.java",
"license": "mit",
"size": 578
} | [
"org.slf4j.LoggerFactory"
] | import org.slf4j.LoggerFactory; | import org.slf4j.*; | [
"org.slf4j"
] | org.slf4j; | 991,442 |
public void setSelectedCustomer(Customer selectedCustomer) {
Customer oldSelectedCustomer = this.selectedCustomer;
this.selectedCustomer = selectedCustomer;
firePropertyChange(PROP_SELECTEDCUSTOMER, oldSelectedCustomer, selectedCustomer);
}
private ObservableList<Customer> cust... | void function(Customer selectedCustomer) { Customer oldSelectedCustomer = this.selectedCustomer; this.selectedCustomer = selectedCustomer; firePropertyChange(PROP_SELECTEDCUSTOMER, oldSelectedCustomer, selectedCustomer); } private ObservableList<Customer> customerList = ObservableCollections.observableList(new ArrayLis... | /**
* Set the value of selectedCustomer
*
* @param selectedCustomer new value of selectedCustomer
*/ | Set the value of selectedCustomer | setSelectedCustomer | {
"repo_name": "alapierre/altkom_2014_06_28",
"path": "DesktopApp/src/pl/altkom/desktop/CustomerListFrame.java",
"license": "apache-2.0",
"size": 15349
} | [
"java.util.ArrayList",
"org.jdesktop.observablecollections.ObservableCollections",
"org.jdesktop.observablecollections.ObservableList",
"pl.altkom.desktop.model.Customer"
] | import java.util.ArrayList; import org.jdesktop.observablecollections.ObservableCollections; import org.jdesktop.observablecollections.ObservableList; import pl.altkom.desktop.model.Customer; | import java.util.*; import org.jdesktop.observablecollections.*; import pl.altkom.desktop.model.*; | [
"java.util",
"org.jdesktop.observablecollections",
"pl.altkom.desktop"
] | java.util; org.jdesktop.observablecollections; pl.altkom.desktop; | 1,263,086 |
public void endElement(QName element, Augmentations augs) throws XNIException {
if (fNamespaces) {
handleEndElement(element, augs, false);
}
else if (fDocumentHandler != null) {
fDocumentHandler.endElement(element, augs);
}
} // endElement(QName) | void function(QName element, Augmentations augs) throws XNIException { if (fNamespaces) { handleEndElement(element, augs, false); } else if (fDocumentHandler != null) { fDocumentHandler.endElement(element, augs); } } | /**
* The end of an element.
*
* @param element The name of the element.
* @param augs Additional information that may include infoset augmentations
*
* @throws XNIException Thrown by handler to signal an error.
*/ | The end of an element | endElement | {
"repo_name": "BIORIMP/biorimp",
"path": "BIO-RIMP/test_data/code/xerces/src/org/apache/xerces/impl/XMLNamespaceBinder.java",
"license": "gpl-2.0",
"size": 33107
} | [
"org.apache.xerces.xni.Augmentations",
"org.apache.xerces.xni.QName",
"org.apache.xerces.xni.XNIException"
] | import org.apache.xerces.xni.Augmentations; import org.apache.xerces.xni.QName; import org.apache.xerces.xni.XNIException; | import org.apache.xerces.xni.*; | [
"org.apache.xerces"
] | org.apache.xerces; | 1,973,408 |
public void classLoaderId(IgniteUuid clsLdrId) {
this.clsLdrId = clsLdrId;
} | void function(IgniteUuid clsLdrId) { this.clsLdrId = clsLdrId; } | /**
* Sets property clsLdrId.
*
* @param clsLdrId Property clsLdrId.
*/ | Sets property clsLdrId | classLoaderId | {
"repo_name": "samaitra/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMetadata.java",
"license": "apache-2.0",
"size": 6314
} | [
"org.apache.ignite.lang.IgniteUuid"
] | import org.apache.ignite.lang.IgniteUuid; | import org.apache.ignite.lang.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 458,246 |
@Test
public void testUnion4()
{
List<Integer> expected = Lists.newArrayList();
ConciseSet set1 = new ConciseSet();
for (int i = 63; i < 1001; i++) {
set1.add(i);
}
ConciseSet set2 = new ConciseSet();
for (int i = 64; i < 1002; i++) {
set2.add(i);
}
List<ImmutableConcis... | void function() { List<Integer> expected = Lists.newArrayList(); ConciseSet set1 = new ConciseSet(); for (int i = 63; i < 1001; i++) { set1.add(i); } ConciseSet set2 = new ConciseSet(); for (int i = 64; i < 1002; i++) { set2.add(i); } List<ImmutableConciseSet> sets = Arrays.asList( ImmutableConciseSet.newImmutableFromM... | /**
* Set 1: zero literal, one fill with flipped bit 62
* Set 2: zero literal, literal, one fill, literal
* <p/>
* Testing merge
*/ | Set 1: zero literal, one fill with flipped bit 62 Set 2: zero literal, literal, one fill, literal Testing merge | testUnion4 | {
"repo_name": "zhihuij/druid",
"path": "extendedset/src/test/java/io/druid/extendedset/intset/ImmutableConciseSetTest.java",
"license": "apache-2.0",
"size": 50965
} | [
"com.google.common.collect.Lists",
"java.util.Arrays",
"java.util.List"
] | import com.google.common.collect.Lists; import java.util.Arrays; import java.util.List; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 2,220,320 |
void initialize(JDBCDiskCacheAttributes config)
throws SQLException;
| void initialize(JDBCDiskCacheAttributes config) throws SQLException; | /**
* Initialize the factory.
*
* @param config the factory settings
* @throws SQLException Any exceptions caught during processing will be
* rethrown wrapped into a SQLException.
*/ | Initialize the factory | initialize | {
"repo_name": "apache/commons-jcs",
"path": "commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/dsfactory/DataSourceFactory.java",
"license": "apache-2.0",
"size": 2942
} | [
"java.sql.SQLException",
"org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheAttributes"
] | import java.sql.SQLException; import org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheAttributes; | import java.sql.*; import org.apache.commons.jcs3.auxiliary.disk.jdbc.*; | [
"java.sql",
"org.apache.commons"
] | java.sql; org.apache.commons; | 2,728,377 |
public static String getResourceThrottlingTier(OpenAPI openAPI, MessageContext synCtx) {
String throttlingTier = null;
Map<String, Object> vendorExtensions = getPathItemExtensions(synCtx, openAPI);
if (vendorExtensions != null) {
throttlingTier = (String) vendorExtensions.get(API... | static String function(OpenAPI openAPI, MessageContext synCtx) { String throttlingTier = null; Map<String, Object> vendorExtensions = getPathItemExtensions(synCtx, openAPI); if (vendorExtensions != null) { throttlingTier = (String) vendorExtensions.get(APIConstants.SWAGGER_X_THROTTLING_TIER); } if (StringUtils.isNotBla... | /**
* Return the throttling tier of the API resource.
*
* @param openAPI OpenAPI of the API
* @param synCtx The message containing resource request
* @return the resource throttling tier
*/ | Return the throttling tier of the API resource | getResourceThrottlingTier | {
"repo_name": "pubudu538/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/utils/OpenAPIUtils.java",
"license": "apache-2.0",
"size": 6602
} | [
"io.swagger.v3.oas.models.OpenAPI",
"java.util.Map",
"org.apache.commons.lang.StringUtils",
"org.apache.synapse.MessageContext",
"org.wso2.carbon.apimgt.impl.APIConstants"
] | import io.swagger.v3.oas.models.OpenAPI; import java.util.Map; import org.apache.commons.lang.StringUtils; import org.apache.synapse.MessageContext; import org.wso2.carbon.apimgt.impl.APIConstants; | import io.swagger.v3.oas.models.*; import java.util.*; import org.apache.commons.lang.*; import org.apache.synapse.*; import org.wso2.carbon.apimgt.impl.*; | [
"io.swagger.v3",
"java.util",
"org.apache.commons",
"org.apache.synapse",
"org.wso2.carbon"
] | io.swagger.v3; java.util; org.apache.commons; org.apache.synapse; org.wso2.carbon; | 2,400,537 |
public static SyncedFlushRequest syncedFlushRequest(String... indices) {
return new SyncedFlushRequest(indices);
} | static SyncedFlushRequest function(String... indices) { return new SyncedFlushRequest(indices); } | /**
* Creates a synced flush indices request.
*
* @param indices The indices to sync flush. Use <tt>null</tt> or <tt>_all</tt> to execute against all indices
* @return The synced flush request
* @see org.elasticsearch.client.IndicesAdminClient#syncedFlush(SyncedFlushRequest)
*/ | Creates a synced flush indices request | syncedFlushRequest | {
"repo_name": "jpountz/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/client/Requests.java",
"license": "apache-2.0",
"size": 19996
} | [
"org.elasticsearch.action.admin.indices.flush.SyncedFlushRequest"
] | import org.elasticsearch.action.admin.indices.flush.SyncedFlushRequest; | import org.elasticsearch.action.admin.indices.flush.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 54,707 |
public Builder addPatterns(Collection<String> patterns) {
this.patterns.addAll(patterns);
return this;
} | Builder function(Collection<String> patterns) { this.patterns.addAll(patterns); return this; } | /**
* Adds a pattern to include to the glob builder.
*
* <p>For a description of the syntax of the patterns, see {@link UnixGlob}.
*/ | Adds a pattern to include to the glob builder. For a description of the syntax of the patterns, see <code>UnixGlob</code> | addPatterns | {
"repo_name": "hhclam/bazel",
"path": "src/main/java/com/google/devtools/build/lib/vfs/UnixGlob.java",
"license": "apache-2.0",
"size": 27720
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 283,318 |
@Deprecated
public static void write(StringBuffer data, Writer output)
throws IOException {
if (data != null) {
output.write(data.toString());
}
} | static void function(StringBuffer data, Writer output) throws IOException { if (data != null) { output.write(data.toString()); } } | /**
* Writes chars from a <code>StringBuffer</code> to a <code>Writer</code>.
*
* @param data the <code>StringBuffer</code> to write, null ignored
* @param output the <code>Writer</code> to write to
* @throws NullPointerException if output is null
* @throws IOException if an I/O error o... | Writes chars from a <code>StringBuffer</code> to a <code>Writer</code> | write | {
"repo_name": "solaris0403/SeleneDemo",
"path": "common_lib/src/main/java/com/tony/selene/common/trinea/android/common/io/IOUtil.java",
"license": "gpl-2.0",
"size": 95443
} | [
"java.io.IOException",
"java.io.Writer"
] | import java.io.IOException; import java.io.Writer; | import java.io.*; | [
"java.io"
] | java.io; | 347,769 |
public boolean onChunkLoadError(Chunk chunk, boolean cancelable, IOException error) {
return cancelable && ChunkedTrackBlacklistUtil.maybeBlacklistTrack(trackSelection,
trackSelection.indexOf(trackGroup.indexOf(chunk.trackFormat)), error);
} | boolean function(Chunk chunk, boolean cancelable, IOException error) { return cancelable && ChunkedTrackBlacklistUtil.maybeBlacklistTrack(trackSelection, trackSelection.indexOf(trackGroup.indexOf(chunk.trackFormat)), error); } | /**
* Called when the {@link HlsSampleStreamWrapper} encounters an error loading a chunk obtained
* from this source.
*
* @param chunk The chunk whose load encountered the error.
* @param cancelable Whether the load can be canceled.
* @param error The error.
* @return Whether the load should be can... | Called when the <code>HlsSampleStreamWrapper</code> encounters an error loading a chunk obtained from this source | onChunkLoadError | {
"repo_name": "KiminRyu/ExoPlayer",
"path": "library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsChunkSource.java",
"license": "apache-2.0",
"size": 19206
} | [
"com.google.android.exoplayer2.source.chunk.Chunk",
"com.google.android.exoplayer2.source.chunk.ChunkedTrackBlacklistUtil",
"java.io.IOException"
] | import com.google.android.exoplayer2.source.chunk.Chunk; import com.google.android.exoplayer2.source.chunk.ChunkedTrackBlacklistUtil; import java.io.IOException; | import com.google.android.exoplayer2.source.chunk.*; import java.io.*; | [
"com.google.android",
"java.io"
] | com.google.android; java.io; | 1,853,623 |
public void testAgencyDailyStatisticsWrongTypeError()
throws MalformedURLException {
Object[] params = new Object[] { sessionId, agencyId,
TextUtils.NOT_DATE, DateUtils.MAX_DATE_VALUE };
executeAgencyDailyStatisticsWithError(params, ErrorMessage.getMessage(
ErrorMessage.INCORRECT_PARAMETERS_WANTED_DAT... | void function() throws MalformedURLException { Object[] params = new Object[] { sessionId, agencyId, TextUtils.NOT_DATE, DateUtils.MAX_DATE_VALUE }; executeAgencyDailyStatisticsWithError(params, ErrorMessage.getMessage( ErrorMessage.INCORRECT_PARAMETERS_WANTED_DATE_GOT_STRING, "3")); params = new Object[] { sessionId, ... | /**
* Test method with fields that has value of wrong type (error).
*
* @throws MalformedURLException
*/ | Test method with fields that has value of wrong type (error) | testAgencyDailyStatisticsWrongTypeError | {
"repo_name": "adqio/revive-adserver",
"path": "www/api/v1/xmlrpc/tests/unit/src/test/java/org/openx/agency/TestAgencyDailyStatistics.java",
"license": "gpl-2.0",
"size": 6638
} | [
"java.net.MalformedURLException",
"org.openx.utils.DateUtils",
"org.openx.utils.ErrorMessage",
"org.openx.utils.TextUtils"
] | import java.net.MalformedURLException; import org.openx.utils.DateUtils; import org.openx.utils.ErrorMessage; import org.openx.utils.TextUtils; | import java.net.*; import org.openx.utils.*; | [
"java.net",
"org.openx.utils"
] | java.net; org.openx.utils; | 944,265 |
@Test
public void testDefaultBootup() throws Exception {
// Test with properties object
Properties pigProps = PropertiesUtil.loadDefaultProperties();
String bootupPath = "/tmp/.temppigbootup";
pigProps.setProperty("pig.load.default.statements", bootupPath);
File bootupFi... | void function() throws Exception { Properties pigProps = PropertiesUtil.loadDefaultProperties(); String bootupPath = STR; pigProps.setProperty(STR, bootupPath); File bootupFile = new File(bootupPath); PrintWriter out = new PrintWriter(new FileWriter(bootupFile)); out.println(STR); out.close(); String[] script = { STR, ... | /**
* This is a test for default bootup. PIG-2456
* @throws Exception
*/ | This is a test for default bootup. PIG-2456 | testDefaultBootup | {
"repo_name": "kexianda/pig",
"path": "test/org/apache/pig/test/pigunit/TestPigTest.java",
"license": "apache-2.0",
"size": 19810
} | [
"java.io.File",
"java.io.FileWriter",
"java.io.PrintWriter",
"java.lang.String",
"java.util.Properties",
"org.apache.pig.impl.util.PropertiesUtil",
"org.apache.pig.pigunit.Cluster",
"org.apache.pig.pigunit.PigTest",
"org.apache.pig.pigunit.pig.PigServer",
"org.apache.pig.test.Util"
] | import java.io.File; import java.io.FileWriter; import java.io.PrintWriter; import java.lang.String; import java.util.Properties; import org.apache.pig.impl.util.PropertiesUtil; import org.apache.pig.pigunit.Cluster; import org.apache.pig.pigunit.PigTest; import org.apache.pig.pigunit.pig.PigServer; import org.apache.p... | import java.io.*; import java.lang.*; import java.util.*; import org.apache.pig.impl.util.*; import org.apache.pig.pigunit.*; import org.apache.pig.pigunit.pig.*; import org.apache.pig.test.*; | [
"java.io",
"java.lang",
"java.util",
"org.apache.pig"
] | java.io; java.lang; java.util; org.apache.pig; | 2,820,747 |
protected Element writeLongToXML(Element parent, long o, String name) throws Exception {
Element node;
// for debugging only
if (DEBUG)
trace(new Throwable(), name);
m_CurrentNode = parent;
node = addElement(parent, name, Long.TYPE.getName(), true);
node.append... | Element function(Element parent, long o, String name) throws Exception { Element node; if (DEBUG) trace(new Throwable(), name); m_CurrentNode = parent; node = addElement(parent, name, Long.TYPE.getName(), true); node.appendChild(node.getOwnerDocument().createTextNode(new Long(o).toString())); return node; } | /**
* adds the given primitive to the DOM structure.
* @param parent the parent of this object, e.g. the class this object is a member of
* @param o the primitive to describe in XML
* @param name the name of the primitive
* @return the node that was created
* @throws Exception if the DOM creatio... | adds the given primitive to the DOM structure | writeLongToXML | {
"repo_name": "williamClanton/singularity",
"path": "weka/src/main/java/weka/core/xml/XMLSerialization.java",
"license": "mit",
"size": 59593
} | [
"org.w3c.dom.Element"
] | import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 503,446 |
@Override
public EcsServerCluster getCluster(String application, String account, String name) {
Set<EcsServerCluster> ecsServerClusters = getClusters(application, account);
if (ecsServerClusters != null && ecsServerClusters.size() > 0) {
for (EcsServerCluster cluster : ecsServerClusters) {
if ... | EcsServerCluster function(String application, String account, String name) { Set<EcsServerCluster> ecsServerClusters = getClusters(application, account); if (ecsServerClusters != null && ecsServerClusters.size() > 0) { for (EcsServerCluster cluster : ecsServerClusters) { if (cluster.getName().equals(name)) { return clu... | /**
* Gets a Spinnaker clusters for a given Spinnaker application, ECS account, and the Spinnaker cluster name.
*/ | Gets a Spinnaker clusters for a given Spinnaker application, ECS account, and the Spinnaker cluster name | getCluster | {
"repo_name": "lookout/clouddriver",
"path": "clouddriver-ecs/src/main/java/com/netflix/spinnaker/clouddriver/ecs/provider/view/EcsServerClusterProvider.java",
"license": "apache-2.0",
"size": 19269
} | [
"com.netflix.spinnaker.clouddriver.ecs.model.EcsServerCluster",
"java.util.Set"
] | import com.netflix.spinnaker.clouddriver.ecs.model.EcsServerCluster; import java.util.Set; | import com.netflix.spinnaker.clouddriver.ecs.model.*; import java.util.*; | [
"com.netflix.spinnaker",
"java.util"
] | com.netflix.spinnaker; java.util; | 2,478,339 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Topic.class)) {
case SeminarPackage.TOPIC__NAME:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
s... | void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(Topic.class)) { case SeminarPackage.TOPIC__NAME: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } super.notifyChanged(notification); } | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "upohl/eloquent",
"path": "examples/seminar/plugins/de.fraunhofer.iem.seminar.edit/src/de/fraunhofer/iem/seminar/provider/TopicItemProvider.java",
"license": "epl-1.0",
"size": 4682
} | [
"de.fraunhofer.iem.seminar.SeminarPackage",
"de.fraunhofer.iem.seminar.Topic",
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification"
] | import de.fraunhofer.iem.seminar.SeminarPackage; import de.fraunhofer.iem.seminar.Topic; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; | import de.fraunhofer.iem.seminar.*; import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; | [
"de.fraunhofer.iem",
"org.eclipse.emf"
] | de.fraunhofer.iem; org.eclipse.emf; | 520,443 |
public void testHashCode() {
StandardPieSectionLabelGenerator g1
= new StandardPieSectionLabelGenerator();
StandardPieSectionLabelGenerator g2
= new StandardPieSectionLabelGenerator();
assertTrue(g1.equals(g2));
assertTrue(g1.hashCode() == g2.hashCode(... | void function() { StandardPieSectionLabelGenerator g1 = new StandardPieSectionLabelGenerator(); StandardPieSectionLabelGenerator g2 = new StandardPieSectionLabelGenerator(); assertTrue(g1.equals(g2)); assertTrue(g1.hashCode() == g2.hashCode()); } | /**
* Simple check that hashCode is implemented.
*/ | Simple check that hashCode is implemented | testHashCode | {
"repo_name": "integrated/jfreechart",
"path": "tests/org/jfree/chart/labels/junit/StandardPieSectionLabelGeneratorTests.java",
"license": "lgpl-2.1",
"size": 7175
} | [
"org.jfree.chart.labels.StandardPieSectionLabelGenerator"
] | import org.jfree.chart.labels.StandardPieSectionLabelGenerator; | import org.jfree.chart.labels.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 2,126,154 |
protected void expectedCount(String[] parameters, int records) throws Exception {
String output = getSystemOutput(parameters);
// subtract the extra newline
int numberOfRecords = output.split(System.getProperty("line.separator")).length - 1;
Assert.assertEquals(records, numberOfReco... | void function(String[] parameters, int records) throws Exception { String output = getSystemOutput(parameters); int numberOfRecords = output.split(System.getProperty(STR)).length - 1; Assert.assertEquals(records, numberOfRecords); } | /**
* Simpler variant of {@link #expectedOutput(String[], String)} that only compares the count of
* the number of records in standard output. This is intended for use for algorithms where the
* result cannot be hashed due to approximate results (typically floating point arithmetic).
*
* @param... | Simpler variant of <code>#expectedOutput(String[], String)</code> that only compares the count of the number of records in standard output. This is intended for use for algorithms where the result cannot be hashed due to approximate results (typically floating point arithmetic) | expectedCount | {
"repo_name": "wwjiang007/flink",
"path": "flink-libraries/flink-gelly-examples/src/test/java/org/apache/flink/graph/drivers/DriverBaseITCase.java",
"license": "apache-2.0",
"size": 9083
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,508,073 |
private DefaultChannelPipeline createHttpPipeline() {
DefaultChannelPipeline pipeline = new DefaultChannelPipeline();
pipeline.addLast("requestDecoder", new HttpRequestDecoder());
pipeline.addLast("responseEncoder", new HttpResponseEncoder());
return pipeline;
} | DefaultChannelPipeline function() { DefaultChannelPipeline pipeline = new DefaultChannelPipeline(); pipeline.addLast(STR, new HttpRequestDecoder()); pipeline.addLast(STR, new HttpResponseEncoder()); return pipeline; } | /**
* Returns a simple pipeline with an HttpRequestDecoder and an
* HttpResponseEncoder. No mocking, returns an actual pipeline
* @return The pipeline
*/ | Returns a simple pipeline with an HttpRequestDecoder and an HttpResponseEncoder. No mocking, returns an actual pipeline | createHttpPipeline | {
"repo_name": "pepperdata/opentsdb-deprecated",
"path": "test/tsd/NettyMocks.java",
"license": "gpl-3.0",
"size": 7645
} | [
"org.jboss.netty.channel.DefaultChannelPipeline",
"org.jboss.netty.handler.codec.http.HttpRequestDecoder",
"org.jboss.netty.handler.codec.http.HttpResponseEncoder"
] | import org.jboss.netty.channel.DefaultChannelPipeline; import org.jboss.netty.handler.codec.http.HttpRequestDecoder; import org.jboss.netty.handler.codec.http.HttpResponseEncoder; | import org.jboss.netty.channel.*; import org.jboss.netty.handler.codec.http.*; | [
"org.jboss.netty"
] | org.jboss.netty; | 1,916,149 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.