method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public HighlightBuilder options(Map<String, Object> options) {
this.options = options;
return this;
} | HighlightBuilder function(Map<String, Object> options) { this.options = options; return this; } | /**
* Allows to set custom options for custom highlighters.
*/ | Allows to set custom options for custom highlighters | options | {
"repo_name": "lmenezes/elasticsearch",
"path": "src/main/java/org/elasticsearch/search/highlight/HighlightBuilder.java",
"license": "apache-2.0",
"size": 14397
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,103,644 |
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller<PollResult<VirtualNetworkGatewayInner>, VirtualNetworkGatewayInner> beginReset(
String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip, Context context); | @ServiceMethod(returns = ReturnType.SINGLE) SyncPoller<PollResult<VirtualNetworkGatewayInner>, VirtualNetworkGatewayInner> beginReset( String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip, Context context); | /**
* Resets the primary of the virtual network gateway in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayName The name of the virtual network gateway.
* @param gatewayVip Virtual network gateway vip address supplied to t... | Resets the primary of the virtual network gateway in the specified resource group | beginReset | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkGatewaysClient.java",
"license": "mit",
"size": 135947
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.Context",
"com.azure.core.util.polling.SyncPoller",
"com.azure.resourcemanager.network.fluent.models.VirtualNetworkGatewayInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.network.fluent.models.VirtualNetworkGatewayInner; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,644,701 |
protected final void reject(Runnable task) {
rejectedExecutionHandler.rejected(task, this);
}
// ScheduledExecutorService implementation
private static final long SCHEDULE_PURGE_INTERVAL = TimeUnit.SECONDS.toNanos(1); | final void function(Runnable task) { rejectedExecutionHandler.rejected(task, this); } private static final long SCHEDULE_PURGE_INTERVAL = TimeUnit.SECONDS.toNanos(1); | /**
* Offers the task to the associated {@link RejectedExecutionHandler}.
*
* @param task to reject.
*/ | Offers the task to the associated <code>RejectedExecutionHandler</code> | reject | {
"repo_name": "fenik17/netty",
"path": "common/src/main/java/io/netty/util/concurrent/SingleThreadEventExecutor.java",
"license": "apache-2.0",
"size": 40031
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 348,991 |
int getSize() throws IOException; | int getSize() throws IOException; | /***
* Returns the number of {@link Spec}s in the {@link SpecStore}.
* @throws IOException Exception in retrieving the count of {@link Spec}s.
*/ | Returns the number of <code>Spec</code>s in the <code>SpecStore</code> | getSize | {
"repo_name": "arjun4084346/gobblin",
"path": "gobblin-runtime/src/main/java/org/apache/gobblin/runtime/api/SpecStore.java",
"license": "apache-2.0",
"size": 5944
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,898,190 |
public List<Sort> getInput(){
return item.getInput();
}
//getters giving HLAPI object
| List<Sort> function(){ return item.getInput(); } | /**
* Return the encapsulate Low Level API object.
*/ | Return the encapsulate Low Level API object | getInput | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/strings/hlapi/GreaterThanHLAPI.java",
"license": "epl-1.0",
"size": 108533
} | [
"fr.lip6.move.pnml.hlpn.terms.Sort",
"java.util.List"
] | import fr.lip6.move.pnml.hlpn.terms.Sort; import java.util.List; | import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 1,394,545 |
public void waypointRemoved(int graphicUid) {
JToggleButton button = graphicIdToWaypointButton.get(graphicUid);
jPanel_waypointsList.remove(button);
buttonGroup_waypoints.remove(button);
jPanel_waypointsList.repaint();
graphicIdToWaypointButton.remove(graphicUid);
... | void function(int graphicUid) { JToggleButton button = graphicIdToWaypointButton.get(graphicUid); jPanel_waypointsList.remove(button); buttonGroup_waypoints.remove(button); jPanel_waypointsList.repaint(); graphicIdToWaypointButton.remove(graphicUid); waypointButtonToGraphicId.remove(button); } | /**
* Called when a waypoint is removed. This implementation removes the corresponding
* waypoint button.
* @param graphicUid the removed waypoint graphic's ID.
* @see RouteListener#waypointRemoved(int)
*/ | Called when a waypoint is removed. This implementation removes the corresponding waypoint button | waypointRemoved | {
"repo_name": "Esri/vehicle-commander-java",
"path": "source/VehicleCommander/src/com/esri/vehiclecommander/view/MainMenuJPanel.java",
"license": "apache-2.0",
"size": 187222
} | [
"javax.swing.JToggleButton"
] | import javax.swing.JToggleButton; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 569,883 |
public void closePath(double x0, double y0) throws IOException; | void function(double x0, double y0) throws IOException; | /**
* Closes the path by drawing a straight line to the last point which was
* argument to move.
*/ | Closes the path by drawing a straight line to the last point which was argument to move | closePath | {
"repo_name": "phuseman/r2cat",
"path": "org/freehep/graphicsio/PathConstructor.java",
"license": "gpl-3.0",
"size": 2356
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,249,606 |
private TextView styleHeaderRowElement(String text, int gravity) {
final TextView textView = new TextView(this);
textView.setText(text);
textView.setTextColor(Color.GREEN);
textView.setTypeface(null, Typeface.BOLD);
textView.setTextSize(16f);
textView.setGravity(gravity);
textView.setPadding(20, 20, 20... | TextView function(String text, int gravity) { final TextView textView = new TextView(this); textView.setText(text); textView.setTextColor(Color.GREEN); textView.setTypeface(null, Typeface.BOLD); textView.setTextSize(16f); textView.setGravity(gravity); textView.setPadding(20, 20, 20, 20); return textView; } | /**
* Adds style to a header row element.
*
* @param text Text displayed in the TextView.
* @param gravity Gravity for the text.
* @return TextView instance.
*/ | Adds style to a header row element | styleHeaderRowElement | {
"repo_name": "kchitalia/android-travis",
"path": "native/SampleApps/NativeSqlAggregator/src/com/salesforce/samples/nativesqlaggregator/ResultActivity.java",
"license": "apache-2.0",
"size": 6998
} | [
"android.graphics.Color",
"android.graphics.Typeface",
"android.widget.TextView"
] | import android.graphics.Color; import android.graphics.Typeface; import android.widget.TextView; | import android.graphics.*; import android.widget.*; | [
"android.graphics",
"android.widget"
] | android.graphics; android.widget; | 1,327,121 |
public Collection<?> getOrders(String userID) throws Exception; | Collection<?> function(String userID) throws Exception; | /**
* Get the collection of all orders for a given account
*
* @param userID the customer account to retrieve orders for
* @return Collection OrderDataBeans providing detailed order information
*/ | Get the collection of all orders for a given account | getOrders | {
"repo_name": "djmulley/daytrader3",
"path": "daytrader3-ee6-ejb/src/main/java/com/ibm/websphere/samples/daytrader/TradeServices.java",
"license": "apache-2.0",
"size": 10365
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,167,742 |
Optional<Container> allocateContainer(final ResourceRequestEvent requestEvent) {
Container container = null;
final Optional<String> nodeName = getPreferredNode(requestEvent
.getNodeNameList());
if (nodeName.isPresent()) {
container = allocateBasedOnNode(
requestEvent.getMemorySize(... | Optional<Container> allocateContainer(final ResourceRequestEvent requestEvent) { Container container = null; final Optional<String> nodeName = getPreferredNode(requestEvent .getNodeNameList()); if (nodeName.isPresent()) { container = allocateBasedOnNode( requestEvent.getMemorySize().orElse(this.defaultMemorySize), requ... | /**
* Allocates a container based on a request event. First it tries to match a
* given node, if it cannot, it tries to get a spot in a rack
*
* @param requestEvent
* the request event
* @return an optional with the container if allocated
*/ | Allocates a container based on a request event. First it tries to match a given node, if it cannot, it tries to get a spot in a rack | allocateContainer | {
"repo_name": "taegeonum/incubator-reef",
"path": "lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/driver/ContainerManager.java",
"license": "apache-2.0",
"size": 16500
} | [
"org.apache.reef.runtime.common.driver.api.ResourceRequestEvent",
"org.apache.reef.util.Optional"
] | import org.apache.reef.runtime.common.driver.api.ResourceRequestEvent; import org.apache.reef.util.Optional; | import org.apache.reef.runtime.common.driver.api.*; import org.apache.reef.util.*; | [
"org.apache.reef"
] | org.apache.reef; | 768,999 |
public String print(String format, Object... args) {
return print(String.format(format, args));
}
/**
* Can be used to access the {@link PrintStream} of this MutablePrinter
*
* @return If this MutablePrinter isn't muted or output is enforced the used {@link PrintStream} | String function(String format, Object... args) { return print(String.format(format, args)); } /** * Can be used to access the {@link PrintStream} of this MutablePrinter * * @return If this MutablePrinter isn't muted or output is enforced the used {@link PrintStream} | /**
* If this MutablePrinter isn't muted or output is enforced this prints a formatted string
*
* @param format
* A <a href="../util/Formatter.html#syntax">format string</a>
* @param args
* Arguments referenced by the format specifiers in the format
* string. If there ar... | If this MutablePrinter isn't muted or output is enforced this prints a formatted string | print | {
"repo_name": "Deletescape-Media/JTerm",
"path": "src/main/java/ch/deletescape/jterm/io/MutablePrinter.java",
"license": "mit",
"size": 4889
} | [
"java.io.PrintStream"
] | import java.io.PrintStream; | import java.io.*; | [
"java.io"
] | java.io; | 870,110 |
synchronized void clear(boolean notify) { // [EDT]
nrows = 0;
columns = null;
cacheOffset = 0;
cache.clear();
pendingFill = false;
if (notify)
Utils.invokeLater(this, "fireTableStructureChanged");
}
//---------------------------------------------------------------------
// Inter... | synchronized void clear(boolean notify) { nrows = 0; columns = null; cacheOffset = 0; cache.clear(); pendingFill = false; if (notify) Utils.invokeLater(this, STR); } | /** Clears the model. If 'notify' is true the model notifies its observers
* about the change.
*/ | Clears the model. If 'notify' is true the model notifies its observers about the change | clear | {
"repo_name": "lgulyas/MEME",
"path": "src/ai/aitia/meme/gui/ViewsBrowser.java",
"license": "gpl-3.0",
"size": 45853
} | [
"ai.aitia.meme.utils.Utils"
] | import ai.aitia.meme.utils.Utils; | import ai.aitia.meme.utils.*; | [
"ai.aitia.meme"
] | ai.aitia.meme; | 336,295 |
private static boolean rewriteMetadata()
{
boolean retval = false;
for (String uid : __clusterUidToMetadataMap.keySet())
{
// Transform "/clusters/uid/<metadata>" to
// "/clusters/uid/metadata/<metadata>"
Object metadataObj = __clusterUidToMetadataMap.get( uid);
... | static boolean function() { boolean retval = false; for (String uid : __clusterUidToMetadataMap.keySet()) { Object metadataObj = __clusterUidToMetadataMap.get( uid); System.out.printf( STR, uid); try { HashMap<String, Object> metadata = (HashMap<String, Object>) metadataObj; HashMap<String,Object> metadataMember = (Has... | /**
* Rewrite cluster metadata in {@link #__clusterUidToMetadataMap} to {@link #__rewrittenClusterUidToMetadataMap},
* returning true if rewritten data needs to actually be written out (i.e., is NOT a no-op).
*/ | Rewrite cluster metadata in <code>#__clusterUidToMetadataMap</code> to <code>#__rewrittenClusterUidToMetadataMap</code>, returning true if rewritten data needs to actually be written out (i.e., is NOT a no-op) | rewriteMetadata | {
"repo_name": "JohnL4/Diaspora",
"path": "FirebaseAdmin/src/main/java/com/how_hard_can_it_be/FirebaseAdmin/App.java",
"license": "mit",
"size": 15440
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,308,140 |
@Scheduled(initialDelay = 1 * 60 * 1000, fixedRate = 5 * 60 * 1000)
public void cleanupJobExecutions() {
runAsSystem(
() -> {
LOG.trace("Clean up Index job executions...");
Instant fiveMinutesAgo = Instant.now().minus(5, ChronoUnit.MINUTES);
boolean indexJobExecutionExists ... | @Scheduled(initialDelay = 1 * 60 * 1000, fixedRate = 5 * 60 * 1000) void function() { runAsSystem( () -> { LOG.trace(STR); Instant fiveMinutesAgo = Instant.now().minus(5, ChronoUnit.MINUTES); boolean indexJobExecutionExists = dataService.hasRepository(IndexJobExecutionMetadata.INDEX_JOB_EXECUTION); if (indexJobExecutio... | /**
* Cleans up successful IndexJobExecutions that finished longer than five minutes ago. delay for a
* minute to allow the transaction manager to become available
*/ | Cleans up successful IndexJobExecutions that finished longer than five minutes ago. delay for a minute to allow the transaction manager to become available | cleanupJobExecutions | {
"repo_name": "sidohaakma/molgenis",
"path": "molgenis-data-index/src/main/java/org/molgenis/data/index/job/IndexJobSchedulerImpl.java",
"license": "lgpl-3.0",
"size": 5235
} | [
"java.time.Instant",
"java.time.temporal.ChronoUnit",
"java.util.stream.Stream",
"org.molgenis.data.Entity",
"org.molgenis.jobs.model.JobExecution",
"org.molgenis.security.core.runas.RunAsSystemAspect",
"org.springframework.scheduling.annotation.Scheduled"
] | import java.time.Instant; import java.time.temporal.ChronoUnit; import java.util.stream.Stream; import org.molgenis.data.Entity; import org.molgenis.jobs.model.JobExecution; import org.molgenis.security.core.runas.RunAsSystemAspect; import org.springframework.scheduling.annotation.Scheduled; | import java.time.*; import java.time.temporal.*; import java.util.stream.*; import org.molgenis.data.*; import org.molgenis.jobs.model.*; import org.molgenis.security.core.runas.*; import org.springframework.scheduling.annotation.*; | [
"java.time",
"java.util",
"org.molgenis.data",
"org.molgenis.jobs",
"org.molgenis.security",
"org.springframework.scheduling"
] | java.time; java.util; org.molgenis.data; org.molgenis.jobs; org.molgenis.security; org.springframework.scheduling; | 27,698 |
public boolean setPointMouseOver(int x, int y){
Point p = SOMImageFns.getcell(new Point(x,y));
if(p.x >= 0 && p.x < SOMp.getSOMwidth() && p.y >= 0 && p.y < SOMp.getSOMheight()){
//this isn't used, I should rewrite the if statement
}else{
p = new Point(-1,-1);
}
if(p.x == cellMou... | boolean function(int x, int y){ Point p = SOMImageFns.getcell(new Point(x,y)); if(p.x >= 0 && p.x < SOMp.getSOMwidth() && p.y >= 0 && p.y < SOMp.getSOMheight()){ }else{ p = new Point(-1,-1); } if(p.x == cellMouseOver.x && p.y == cellMouseOver.y){ return false; }else{ cellMouseOver = p; return true; } } | /**
* Set the point the mouse is over (for displaying stats on that cell).
* @param x
* @param y
* @return Returns true if this is a new cell, false if same cell
*/ | Set the point the mouse is over (for displaying stats on that cell) | setPointMouseOver | {
"repo_name": "AABoyles/ifcsoft",
"path": "src/ifcSoft/view/som/SOMMediator.java",
"license": "gpl-3.0",
"size": 41157
} | [
"java.awt.Point"
] | import java.awt.Point; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,438,980 |
public JSONObject getRevisionInfo( FsModelRevision rev ) {
// Get the information handler for the revision
com.signavio.warehouse.revision.handler.InfoHandler in = new com.signavio.warehouse.revision.handler.InfoHandler(this.getServletContext());
// Get the annotation from the hander
... | JSONObject function( FsModelRevision rev ) { com.signavio.warehouse.revision.handler.InfoHandler in = new com.signavio.warehouse.revision.handler.InfoHandler(this.getServletContext()); HandlerConfiguration revConf = Platform.getInstance().getHandlerDirectory().get(in.getClass().getName()).getContextClass().getAnnotatio... | /**
* Get the whole information for a revision.
* @param dir
* @return
* @throws InvalidIdentifierException
*/ | Get the whole information for a revision | getRevisionInfo | {
"repo_name": "dryabkov/activiti-modeler-experiment",
"path": "platform/src/com/signavio/warehouse/model/handler/ModelHandler.java",
"license": "gpl-3.0",
"size": 9400
} | [
"com.signavio.platform.annotations.HandlerConfiguration",
"com.signavio.platform.core.Platform",
"com.signavio.warehouse.revision.business.FsModelRevision",
"org.json.JSONObject"
] | import com.signavio.platform.annotations.HandlerConfiguration; import com.signavio.platform.core.Platform; import com.signavio.warehouse.revision.business.FsModelRevision; import org.json.JSONObject; | import com.signavio.platform.annotations.*; import com.signavio.platform.core.*; import com.signavio.warehouse.revision.business.*; import org.json.*; | [
"com.signavio.platform",
"com.signavio.warehouse",
"org.json"
] | com.signavio.platform; com.signavio.warehouse; org.json; | 1,472,632 |
public boolean renameTo(File dest) throws IOException; | boolean function(File dest) throws IOException; | /**
* A convenience method to write an uploaded item to disk.
* If a previous one exists, it will be deleted.
* Once this method is called, if successful, the new file will be out of the cleaner
* of the factory that creates the original InterfaceHttpData object.
* @param dest destination file ... | A convenience method to write an uploaded item to disk. If a previous one exists, it will be deleted. Once this method is called, if successful, the new file will be out of the cleaner of the factory that creates the original InterfaceHttpData object | renameTo | {
"repo_name": "aperepel/netty",
"path": "src/main/java/org/jboss/netty/handler/codec/http/HttpData.java",
"license": "apache-2.0",
"size": 5475
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,455,925 |
@Override
public IExpr evaluate(final IAST ast, EvalEngine engine) {
if (ast.arg1().isList() && ast.arg2().isList()) {
try {
int[] a = Validate.checkListOfInts(ast, ast.arg1(), false, true, engine);
if (a == null) {
return chineseRemainderBigInteger(ast, engine);
... | IExpr function(final IAST ast, EvalEngine engine) { if (ast.arg1().isList() && ast.arg2().isList()) { try { int[] a = Validate.checkListOfInts(ast, ast.arg1(), false, true, engine); if (a == null) { return chineseRemainderBigInteger(ast, engine); } int[] n = Validate.checkListOfInts(ast, ast.arg2(), false, true, engine... | /**
* Calculate the chinese remainder of 2 integer lists.
*
* <p>
* See <a href="https://rosettacode.org/wiki/Chinese_remainder_theorem">Rosetta Code: Chinese
* remainder theorem</a><br>
* <a href=
* "https://github.com/PoslavskySV/rings/blob/master/rings/src/main/java/cc/redberry/rin... | Calculate the chinese remainder of 2 integer lists. See Rosetta Code: Chinese remainder theorem cc/redberry/rings/bigint/ChineseRemainders.java | evaluate | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/builtin/NumberTheory.java",
"license": "gpl-3.0",
"size": 156286
} | [
"org.matheclipse.core.eval.EvalEngine",
"org.matheclipse.core.eval.exception.Validate",
"org.matheclipse.core.expression.F",
"org.matheclipse.core.interfaces.IExpr"
] | import org.matheclipse.core.eval.EvalEngine; import org.matheclipse.core.eval.exception.Validate; import org.matheclipse.core.expression.F; import org.matheclipse.core.interfaces.IExpr; | import org.matheclipse.core.eval.*; import org.matheclipse.core.eval.exception.*; import org.matheclipse.core.expression.*; import org.matheclipse.core.interfaces.*; | [
"org.matheclipse.core"
] | org.matheclipse.core; | 804,613 |
boolean createProvider(SSOProvider provider, String idpName, String authenticationStep); | boolean createProvider(SSOProvider provider, String idpName, String authenticationStep); | /**
* Creates service provider in IS side.
* @param provider
* @param idpName
* @param authenticationStep
* @return
*/ | Creates service provider in IS side | createProvider | {
"repo_name": "lakshani/carbon-mobile-appmgt",
"path": "components/org.wso2.carbon.appmgt.api/src/main/java/org/wso2/carbon/appmgt/api/IdentityApplicationManagementAdapter.java",
"license": "apache-2.0",
"size": 1685
} | [
"org.wso2.carbon.appmgt.api.model.SSOProvider"
] | import org.wso2.carbon.appmgt.api.model.SSOProvider; | import org.wso2.carbon.appmgt.api.model.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 857,624 |
public FilePath createTempFile(final String prefix, final String suffix) throws IOException, InterruptedException {
try {
return new FilePath(this, act(new CreateTempFile(prefix, suffix)));
} catch (IOException e) {
throw new IOException("Failed to create a temp file on "+rem... | FilePath function(final String prefix, final String suffix) throws IOException, InterruptedException { try { return new FilePath(this, act(new CreateTempFile(prefix, suffix))); } catch (IOException e) { throw new IOException(STR+remote,e); } } private class CreateTempFile extends SecureFileCallable<String> { private fi... | /**
* Creates a temporary file in the directory that this {@link FilePath} object designates.
*
* @param prefix
* The prefix string to be used in generating the file's name; must be
* at least three characters long
* @param suffix
* The suffix string to be used in gener... | Creates a temporary file in the directory that this <code>FilePath</code> object designates | createTempFile | {
"repo_name": "recena/jenkins",
"path": "core/src/main/java/hudson/FilePath.java",
"license": "mit",
"size": 134702
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 556,326 |
public static User authenticate(String email, String password) {
TypedQuery<User> query = JPA.em().createQuery(//
"select u from User u where u.email = :email and u.password = :password", User.class)//
.setParameter("email", email)//
.setParameter("password", ... | static User function(String email, String password) { TypedQuery<User> query = JPA.em().createQuery( .setParameter("email", email) List<User> result = query.getResultList(); return result.isEmpty() ? null : result.get(0); } | /**
* Authentification de l'Utilisateur
*/ | Authentification de l'Utilisateur | authenticate | {
"repo_name": "fmaturel/PlayTraining",
"path": "play_tp15/app/models/User.java",
"license": "mit",
"size": 1733
} | [
"java.util.List",
"javax.persistence.TypedQuery"
] | import java.util.List; import javax.persistence.TypedQuery; | import java.util.*; import javax.persistence.*; | [
"java.util",
"javax.persistence"
] | java.util; javax.persistence; | 821,198 |
public ServiceFuture<OpenidConnectProviderContractInner> getAsync(String resourceGroupName, String serviceName, String opid, final ServiceCallback<OpenidConnectProviderContractInner> serviceCallback) {
return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, opid),... | ServiceFuture<OpenidConnectProviderContractInner> function(String resourceGroupName, String serviceName, String opid, final ServiceCallback<OpenidConnectProviderContractInner> serviceCallback) { return ServiceFuture.fromHeaderResponse(getWithServiceResponseAsync(resourceGroupName, serviceName, opid), serviceCallback); ... | /**
* Gets specific OpenID Connect Provider.
*
* @param resourceGroupName The name of the resource group.
* @param serviceName The name of the API Management service.
* @param opid Identifier of the OpenID Connect Provider.
* @param serviceCallback the async ServiceCallback to handle succe... | Gets specific OpenID Connect Provider | getAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/apimanagement/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/apimanagement/v2018_06_01_preview/implementation/OpenIdConnectProvidersInner.java",
"license": "mit",
"size": 67840
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 320,729 |
private static KeyPair newKeyPair() throws Exception {
KeyPairGenerator kpGen = KeyPairGenerator.getInstance(KEY_ALGORITHM, BC);
kpGen.initialize(KEY_LENGTH, new SecureRandom());
return kpGen.generateKeyPair();
}
| static KeyPair function() throws Exception { KeyPairGenerator kpGen = KeyPairGenerator.getInstance(KEY_ALGORITHM, BC); kpGen.initialize(KEY_LENGTH, new SecureRandom()); return kpGen.generateKeyPair(); } | /**
* Generate a new keypair.
*
* @return a keypair
* @throws Exception
*/ | Generate a new keypair | newKeyPair | {
"repo_name": "heavenlyhash/gitblit",
"path": "src/main/java/com/gitblit/utils/X509Utils.java",
"license": "apache-2.0",
"size": 41371
} | [
"java.security.KeyPair",
"java.security.KeyPairGenerator",
"java.security.SecureRandom"
] | import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.SecureRandom; | import java.security.*; | [
"java.security"
] | java.security; | 2,718,888 |
public void setColor(int start, int end, ColorRGBA color) {
letters.setColor(start, end, color);
letters.invalidate();
needRefresh = true;
} | void function(int start, int end, ColorRGBA color) { letters.setColor(start, end, color); letters.invalidate(); needRefresh = true; } | /**
* Set the color of substring.
* @param start start index to set style. inclusive.
* @param end end index to set style. EXCLUSIVE.
* @param color
*/ | Set the color of substring | setColor | {
"repo_name": "PlanetWaves/clockworkengine",
"path": "branches/3.0/engine/src/core/com/clockwork/font/BitmapText.java",
"license": "apache-2.0",
"size": 10257
} | [
"com.clockwork.math.ColorRGBA"
] | import com.clockwork.math.ColorRGBA; | import com.clockwork.math.*; | [
"com.clockwork.math"
] | com.clockwork.math; | 232,595 |
public int getViewHorizontalDragRange(View child) {
return 0;
} | int function(View child) { return 0; } | /**
* Return the magnitude of a draggable child view's horizontal range of
* motion in pixels. This method should return 0 for views that cannot
* move horizontally.
*
* @param child Child view to check
* @return range of horizontal motion in pixels
*/ | Return the magnitude of a draggable child view's horizontal range of motion in pixels. This method should return 0 for views that cannot move horizontally | getViewHorizontalDragRange | {
"repo_name": "KouChengjian/PhoneMate",
"path": "PhoneSuperviser/src/com/kcj/phonesuperviser/view/swipeback/ViewDragHelper.java",
"license": "gpl-2.0",
"size": 61280
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 2,787,669 |
public void deleteSequence(String sequenceName) throws AxisFault {
try {
if (MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
sequenceAdmin.deleteSequence(sequenceName);
} else {
sequenceAdmin.deleteSequenceForTenant(sequenceName,... | void function(String sequenceName) throws AxisFault { try { if (MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) { sequenceAdmin.deleteSequence(sequenceName); } else { sequenceAdmin.deleteSequenceForTenant(sequenceName, tenantDomain); } } catch (Exception e) { throw new AxisFault(STR, e); } } | /**
* Undeploy the sequence from gateway
*
* @param sequenceName -The sequence name, which need to be undeployed from synapse configuration
* @throws AxisFault
*/ | Undeploy the sequence from gateway | deleteSequence | {
"repo_name": "jaadds/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/utils/SequenceAdminServiceProxy.java",
"license": "apache-2.0",
"size": 3971
} | [
"org.apache.axis2.AxisFault",
"org.wso2.carbon.utils.multitenancy.MultitenantConstants"
] | import org.apache.axis2.AxisFault; import org.wso2.carbon.utils.multitenancy.MultitenantConstants; | import org.apache.axis2.*; import org.wso2.carbon.utils.multitenancy.*; | [
"org.apache.axis2",
"org.wso2.carbon"
] | org.apache.axis2; org.wso2.carbon; | 1,316,995 |
public Collection<TableName> getTableNames(String searchInSchema) {
String key = searchInSchema == null ? "" : searchInSchema;
if (!tableNames.containsKey(key)) {
tableNames.put(key, metadata().getTableNames(searchInSchema));
}
return tableNames.get(key);
} | Collection<TableName> function(String searchInSchema) { String key = searchInSchema == null ? "" : searchInSchema; if (!tableNames.containsKey(key)) { tableNames.put(key, metadata().getTableNames(searchInSchema)); } return tableNames.get(key); } | /**
* Lists available table names. Caches results.
*
* @param searchInSchema Schema to list tables from; <tt>null</tt> to list tables from all schemas
* @return A list of table names
*/ | Lists available table names. Caches results | getTableNames | {
"repo_name": "d2rq/r2rml-kit",
"path": "src/main/java/org/d2rq/db/SQLConnection.java",
"license": "apache-2.0",
"size": 15944
} | [
"java.util.Collection",
"org.d2rq.db.schema.TableName"
] | import java.util.Collection; import org.d2rq.db.schema.TableName; | import java.util.*; import org.d2rq.db.schema.*; | [
"java.util",
"org.d2rq.db"
] | java.util; org.d2rq.db; | 1,231,365 |
public void addLocalizedButton(String parameter, String textKey, String defaultText, Class windowClass) {
GenericButton button = new GenericButton(parameter, localize(textKey, defaultText));
button.setWindowToOpen(windowClass);
addButton (button);
} | void function(String parameter, String textKey, String defaultText, Class windowClass) { GenericButton button = new GenericButton(parameter, localize(textKey, defaultText)); button.setWindowToOpen(windowClass); addButton (button); } | /**
* Adds a localized and formatted button to the panel with a window to open.
* The buttoms are added from left to right.
* @param parameter the form parameter name for the button
* @param textKey the text to localize
* @param defaultText the default localized text
* @param windowClass the class of the wi... | Adds a localized and formatted button to the panel with a window to open. The buttoms are added from left to right | addLocalizedButton | {
"repo_name": "idega/platform2",
"path": "src/se/idega/idegaweb/commune/accounting/presentation/ButtonPanel.java",
"license": "gpl-3.0",
"size": 5268
} | [
"com.idega.presentation.ui.GenericButton"
] | import com.idega.presentation.ui.GenericButton; | import com.idega.presentation.ui.*; | [
"com.idega.presentation"
] | com.idega.presentation; | 964,696 |
Display display = Display.getCurrent();
return display.getSystemColor(systemColorID);
} | Display display = Display.getCurrent(); return display.getSystemColor(systemColorID); } | /**
* Returns the system {@link Color} matching the specific ID.
*
* @param systemColorID
* the ID value for the color
* @return the system {@link Color} matching the specific ID
*/ | Returns the system <code>Color</code> matching the specific ID | getColor | {
"repo_name": "css-iter/cs-studio",
"path": "core/diirt/diirt-plugins/org.csstudio.diirt.util.preferences/src/org/eclipse/wb/swt/SWTResourceManager.java",
"license": "epl-1.0",
"size": 17107
} | [
"org.eclipse.swt.widgets.Display"
] | import org.eclipse.swt.widgets.Display; | import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 2,431,141 |
public static long sizeOfReferenceArray(int length)
{
return sizeOfArray(length, MemoryLayoutSpecification.SPEC.getReferenceSize());
} | static long function(int length) { return sizeOfArray(length, MemoryLayoutSpecification.SPEC.getReferenceSize()); } | /**
* Memory a reference array consumes
* @param length the length of the reference array
* @return heap-size of the array
*/ | Memory a reference array consumes | sizeOfReferenceArray | {
"repo_name": "yonglehou/cassandra",
"path": "src/java/org/apache/cassandra/utils/ObjectSizes.java",
"license": "apache-2.0",
"size": 5321
} | [
"org.github.jamm.MemoryLayoutSpecification"
] | import org.github.jamm.MemoryLayoutSpecification; | import org.github.jamm.*; | [
"org.github.jamm"
] | org.github.jamm; | 733,019 |
private void checkVar(NodeTraversal t, Var v, List<Reference> references) {
blocksWithDeclarations.clear();
boolean isDeclaredInScope = false;
boolean isUnhoistedNamedFunction = false;
Reference hoistedFn = null;
// Look for hoisted functions.
for (Reference reference : referenc... | void function(NodeTraversal t, Var v, List<Reference> references) { blocksWithDeclarations.clear(); boolean isDeclaredInScope = false; boolean isUnhoistedNamedFunction = false; Reference hoistedFn = null; for (Reference reference : references) { if (reference.isHoistedFunction()) { blocksWithDeclarations.add(reference.... | /**
* If the variable is declared more than once in a basic block, generate a
* warning. Also check if a variable is used in a given scope before it is
* declared, which suggest a likely error. Relies on the fact that
* references is in parse-tree order.
*/ | If the variable is declared more than once in a basic block, generate a warning. Also check if a variable is used in a given scope before it is declared, which suggest a likely error. Relies on the fact that references is in parse-tree order | checkVar | {
"repo_name": "abdullah38rcc/closure-compiler",
"path": "src/com/google/javascript/jscomp/VariableReferenceCheck.java",
"license": "apache-2.0",
"size": 7718
} | [
"com.google.javascript.jscomp.ReferenceCollectingCallback",
"com.google.javascript.jscomp.Scope",
"com.google.javascript.rhino.Node",
"java.util.List"
] | import com.google.javascript.jscomp.ReferenceCollectingCallback; import com.google.javascript.jscomp.Scope; import com.google.javascript.rhino.Node; import java.util.List; | import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*; import java.util.*; | [
"com.google.javascript",
"java.util"
] | com.google.javascript; java.util; | 600,690 |
@Nonnull
public List<RMIServiceDescriptor> getDescriptors() {
return Collections.singletonList(RMIServiceDescriptor.createDescriptor(getOrCreateServiceId(), 0, null, null));
} | List<RMIServiceDescriptor> function() { return Collections.singletonList(RMIServiceDescriptor.createDescriptor(getOrCreateServiceId(), 0, null, null)); } | /**
* Returns unmodifiable list of descriptors of all the implementations of this service in the network.
* Order of descriptors is not specified.
* <b>This method must be lock-free.</b>
* @return descriptors of all the implementations of this service in the network. The list is unmodifiable.
*... | Returns unmodifiable list of descriptors of all the implementations of this service in the network. Order of descriptors is not specified. This method must be lock-free | getDescriptors | {
"repo_name": "Devexperts/QD",
"path": "qd-rmi/src/main/java/com/devexperts/rmi/task/RMIService.java",
"license": "mpl-2.0",
"size": 7732
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 698,123 |
@Test
public void test211SchemaRegistryUntouched() throws Exception {
final String TEST_NAME="test211SchemaRegistryUntouched";
TestUtil.displayTestTile(this, TEST_NAME);
assertUntouchedUserDefinition();
assertSteadyResources();
} | void function() throws Exception { final String TEST_NAME=STR; TestUtil.displayTestTile(this, TEST_NAME); assertUntouchedUserDefinition(); assertSteadyResources(); } | /**
* Check that the user definition in schema registry was not ruined
* @throws Exception
*/ | Check that the user definition in schema registry was not ruined | test211SchemaRegistryUntouched | {
"repo_name": "Pardus-Engerek/engerek",
"path": "model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/gensync/TestEditSchema.java",
"license": "apache-2.0",
"size": 80323
} | [
"com.evolveum.midpoint.test.util.TestUtil"
] | import com.evolveum.midpoint.test.util.TestUtil; | import com.evolveum.midpoint.test.util.*; | [
"com.evolveum.midpoint"
] | com.evolveum.midpoint; | 286,382 |
@Test
public void testDatasourceMetadata() throws Exception
{
supervisor = getTestableSupervisor(1, 1, true, "PT1H", null, null);
supervisorRecordSupplier.assign(EasyMock.anyObject());
EasyMock.expectLastCall().anyTimes();
EasyMock.expect(supervisorRecordSupplier.getPartitionIds(STREAM))
... | void function() throws Exception { supervisor = getTestableSupervisor(1, 1, true, "PT1H", null, null); supervisorRecordSupplier.assign(EasyMock.anyObject()); EasyMock.expectLastCall().anyTimes(); EasyMock.expect(supervisorRecordSupplier.getPartitionIds(STREAM)) .andReturn(ImmutableSet.of(SHARD_ID1, SHARD_ID0)) .anyTime... | /**
* Test generating the starting sequences from the partition data stored in druid_dataSource which contains the
* sequences of the last built segments.
*/ | Test generating the starting sequences from the partition data stored in druid_dataSource which contains the sequences of the last built segments | testDatasourceMetadata | {
"repo_name": "deltaprojects/druid",
"path": "extensions-core/kinesis-indexing-service/src/test/java/org/apache/druid/indexing/kinesis/supervisor/KinesisSupervisorTest.java",
"license": "apache-2.0",
"size": 218427
} | [
"com.google.common.base.Optional",
"com.google.common.collect.ImmutableList",
"com.google.common.collect.ImmutableMap",
"com.google.common.collect.ImmutableSet",
"org.apache.druid.indexing.kinesis.KinesisDataSourceMetadata",
"org.apache.druid.indexing.kinesis.KinesisIndexTask",
"org.apache.druid.indexin... | import com.google.common.base.Optional; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import org.apache.druid.indexing.kinesis.KinesisDataSourceMetadata; import org.apache.druid.indexing.kinesis.KinesisIndexTask; import org.... | import com.google.common.base.*; import com.google.common.collect.*; import org.apache.druid.indexing.kinesis.*; import org.apache.druid.indexing.seekablestream.*; import org.easymock.*; import org.junit.*; | [
"com.google.common",
"org.apache.druid",
"org.easymock",
"org.junit"
] | com.google.common; org.apache.druid; org.easymock; org.junit; | 1,318,455 |
public void setName(String name) {
if ((this.name == null)) {
if ((name == null)) {
return;
}
this.name = new Name();
}
this.name.setValue(name);
}
| void function(String name) { if ((this.name == null)) { if ((name == null)) { return; } this.name = new Name(); } this.name.setValue(name); } | /**
* Name of the access control object.
*
* @param name the String.
*/ | Name of the access control object | setName | {
"repo_name": "NABUCCO/org.nabucco.framework.base",
"path": "org.nabucco.framework.base.facade.datatype/src/main/gen/org/nabucco/framework/base/facade/datatype/security/acl/AccessControlEntry.java",
"license": "epl-1.0",
"size": 14446
} | [
"org.nabucco.framework.base.facade.datatype.Name"
] | import org.nabucco.framework.base.facade.datatype.Name; | import org.nabucco.framework.base.facade.datatype.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 2,228,141 |
Long getPrecisionAct() {
Integer temp = getPrecision();
if (temp == null) {
return ValuePool.getLong(Long.MAX_VALUE);
} else {
return ValuePool.getLong(temp.longValue());
}
} | Long getPrecisionAct() { Integer temp = getPrecision(); if (temp == null) { return ValuePool.getLong(Long.MAX_VALUE); } else { return ValuePool.getLong(temp.longValue()); } } | /**
* Retrieves the maximum Long.MAX_VALUE bounded length or precision for
* the type. <p>
*
* @return the maximum Long.MAX_VALUE bounded length or
* precision for the type
*/ | Retrieves the maximum Long.MAX_VALUE bounded length or precision for the type. | getPrecisionAct | {
"repo_name": "ckaestne/LEADT",
"path": "workspace/hsqldb/src/org/hsqldb/DITypeInfo.java",
"license": "gpl-3.0",
"size": 36588
} | [
"org.hsqldb.store.ValuePool"
] | import org.hsqldb.store.ValuePool; | import org.hsqldb.store.*; | [
"org.hsqldb.store"
] | org.hsqldb.store; | 1,710,375 |
public static File tmpdir() {
return TMPDIR;
} | static File function() { return TMPDIR; } | /**
* Returns the temporary directory.
*/ | Returns the temporary directory | tmpdir | {
"repo_name": "fengjiachun/netty",
"path": "common/src/main/java/io/netty/util/internal/PlatformDependent.java",
"license": "apache-2.0",
"size": 56602
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 144,230 |
protected ModelOperation createInstanceOperation_GetElementListByPage(Element element, boolean interfaceOnly) {
String elementName = ModelLayerHelper.getElementNameCapped(element);
String elementClassName = ModelLayerHelper.getElementClassName(element);
ModelOperation modelOperation = new ModelOperation();
... | ModelOperation function(Element element, boolean interfaceOnly) { String elementName = ModelLayerHelper.getElementNameCapped(element); String elementClassName = ModelLayerHelper.getElementClassName(element); ModelOperation modelOperation = new ModelOperation(); modelOperation.setName("get"+elementName+STR); modelOperat... | /**
* GetElementListByPage operation
* ------------------------------
*/ | GetElementListByPage operation ------------------------------ | createInstanceOperation_GetElementListByPage | {
"repo_name": "tfisher1226/ARIES",
"path": "nam/nam-engine/src/main/java/aries/codegen/AbstractManagementBeanBuilder.java",
"license": "apache-2.0",
"size": 61221
} | [
"java.lang.reflect.Modifier",
"java.util.List"
] | import java.lang.reflect.Modifier; import java.util.List; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 196,028 |
ModelJAXBContextFactory getModelJAXBContextFactory(); | ModelJAXBContextFactory getModelJAXBContextFactory(); | /**
* Returns the JAXB Context factory used to create Models.
*
* @return the JAXB Context factory used to create Models.
*/ | Returns the JAXB Context factory used to create Models | getModelJAXBContextFactory | {
"repo_name": "jarst/camel",
"path": "camel-core/src/main/java/org/apache/camel/CamelContext.java",
"license": "apache-2.0",
"size": 68708
} | [
"org.apache.camel.spi.ModelJAXBContextFactory"
] | import org.apache.camel.spi.ModelJAXBContextFactory; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,241,753 |
VnodeName checkName(String desc) throws RpcException {
MiscUtils.checkPresent(desc, name);
return name;
}
// Object | VnodeName checkName(String desc) throws RpcException { MiscUtils.checkPresent(desc, name); return name; } | /**
* Ensure that the name of the virtual node is present.
*
* @param desc A brief description about the virtual node.
* @return The name of the virtual node.
* @throws RpcException The name of the virtual node is not present.
*/ | Ensure that the name of the virtual node is present | checkName | {
"repo_name": "opendaylight/vtn",
"path": "manager/implementation/src/main/java/org/opendaylight/vtn/manager/internal/vnode/xml/XmlVNode.java",
"license": "epl-1.0",
"size": 5444
} | [
"org.opendaylight.vtn.manager.internal.util.MiscUtils",
"org.opendaylight.vtn.manager.internal.util.rpc.RpcException",
"org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.types.rev150209.VnodeName"
] | import org.opendaylight.vtn.manager.internal.util.MiscUtils; import org.opendaylight.vtn.manager.internal.util.rpc.RpcException; import org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.types.rev150209.VnodeName; | import org.opendaylight.vtn.manager.internal.util.*; import org.opendaylight.vtn.manager.internal.util.rpc.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.types.rev150209.*; | [
"org.opendaylight.vtn",
"org.opendaylight.yang"
] | org.opendaylight.vtn; org.opendaylight.yang; | 2,719,793 |
private void readObject(ObjectInputStream stream)
throws IOException, ClassNotFoundException {
stream.defaultReadObject();
this.artifactPaint = SerialUtilities.readPaint(stream);
} | void function(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); this.artifactPaint = SerialUtilities.readPaint(stream); } | /**
* Provides serialization support.
*
* @param stream the input stream.
*
* @throws IOException if there is an I/O error.
* @throws ClassNotFoundException if there is a classpath problem.
*/ | Provides serialization support | readObject | {
"repo_name": "NCIP/stats-application-commons",
"path": "src/gov/nih/nci/caintegrator/application/graphing/BoxAndWhiskerDotsRenderer.java",
"license": "bsd-3-clause",
"size": 34593
} | [
"java.io.IOException",
"java.io.ObjectInputStream",
"org.jfree.io.SerialUtilities"
] | import java.io.IOException; import java.io.ObjectInputStream; import org.jfree.io.SerialUtilities; | import java.io.*; import org.jfree.io.*; | [
"java.io",
"org.jfree.io"
] | java.io; org.jfree.io; | 1,572,339 |
public synchronized void send(String data, String event, String id, EventCallback callback) {
if (open == 0 || shutdown) {
if (callback != null) {
callback.failed(this, data, event, id, new ClosedChannelException());
}
return;
} | synchronized void function(String data, String event, String id, EventCallback callback) { if (open == 0 shutdown) { if (callback != null) { callback.failed(this, data, event, id, new ClosedChannelException()); } return; } | /**
* Sends an event to the remote client
*
* @param data The event data
* @param event The event name
* @param id The event ID
* @param callback A callback that is notified on Success or failure
*/ | Sends an event to the remote client | send | {
"repo_name": "rhusar/undertow",
"path": "core/src/main/java/io/undertow/server/handlers/sse/ServerSentEventConnection.java",
"license": "apache-2.0",
"size": 21761
} | [
"java.nio.channels.ClosedChannelException"
] | import java.nio.channels.ClosedChannelException; | import java.nio.channels.*; | [
"java.nio"
] | java.nio; | 1,013,142 |
private void reconcilePositions(IASTNode[] subtrees) {
List<CodeSegment> list = new ArrayList<CodeSegment>();
for (int i = 0, n = subtrees.length; i < n; i++)
list.addAll(CodeSegmentCalculator.getCodeSegments(subtrees[i],
editor.getSourceFile().getColorManager()));
// subtrees[i].accept(fCollector... | void function(IASTNode[] subtrees) { List<CodeSegment> list = new ArrayList<CodeSegment>(); for (int i = 0, n = subtrees.length; i < n; i++) list.addAll(CodeSegmentCalculator.getCodeSegments(subtrees[i], editor.getSourceFile().getColorManager())); deleteEmptySegments(list); fAddedPositions.addAll(list); List<CodeSegmen... | /**
* Reconcile positions based on the AST subtrees
*
* @param subtrees
* the AST subtrees
*/ | Reconcile positions based on the AST subtrees | reconcilePositions | {
"repo_name": "ckaestne/LEADT",
"path": "CIDE2/src/de/ovgu/cide/editor/inlineprojection/ProjectionReconcilingStrategy.java",
"license": "gpl-3.0",
"size": 5694
} | [
"de.ovgu.cide.editor.CodeSegment",
"de.ovgu.cide.editor.CodeSegmentCalculator",
"java.util.ArrayList",
"java.util.List"
] | import de.ovgu.cide.editor.CodeSegment; import de.ovgu.cide.editor.CodeSegmentCalculator; import java.util.ArrayList; import java.util.List; | import de.ovgu.cide.editor.*; import java.util.*; | [
"de.ovgu.cide",
"java.util"
] | de.ovgu.cide; java.util; | 2,614,629 |
public SymbolicObject[] arguments() {
return arguments;
} | SymbolicObject[] function() { return arguments; } | /**
* Returns the arguments of this symbolic expression.
*/ | Returns the arguments of this symbolic expression | arguments | {
"repo_name": "byu-vv-lab/sarl",
"path": "src/edu/udel/cis/vsl/sarl/expr/common/CommonSymbolicExpression.java",
"license": "gpl-3.0",
"size": 19465
} | [
"edu.udel.cis.vsl.sarl.IF"
] | import edu.udel.cis.vsl.sarl.IF; | import edu.udel.cis.vsl.sarl.*; | [
"edu.udel.cis"
] | edu.udel.cis; | 1,674,916 |
public boolean hasConflictForMy(OsmPrimitive my) {
return getConflictForMy(my) != null;
} | boolean function(OsmPrimitive my) { return getConflictForMy(my) != null; } | /**
* Replies true, if this collection includes a conflict for <code>my</code>.
*
* @param my my primitive
* @return true, if this collection includes a conflict for <code>my</code>; false, otherwise
*/ | Replies true, if this collection includes a conflict for <code>my</code> | hasConflictForMy | {
"repo_name": "jonathanrcarter/divv-amsterdam-parkingapi",
"path": "src-josm/org/openstreetmap/josm/data/conflict/ConflictCollection.java",
"license": "gpl-2.0",
"size": 9904
} | [
"org.openstreetmap.josm.data.osm.OsmPrimitive"
] | import org.openstreetmap.josm.data.osm.OsmPrimitive; | import org.openstreetmap.josm.data.osm.*; | [
"org.openstreetmap.josm"
] | org.openstreetmap.josm; | 1,978,310 |
static int getUnsignedShort(ByteBuf buf, int offset) {
return (buf.getByte(offset) & 0xFF) << 8 |
buf.getByte(offset + 1) & 0xFF;
} | static int getUnsignedShort(ByteBuf buf, int offset) { return (buf.getByte(offset) & 0xFF) << 8 buf.getByte(offset + 1) & 0xFF; } | /**
* Reads a big-endian unsigned short integer from the buffer.
*/ | Reads a big-endian unsigned short integer from the buffer | getUnsignedShort | {
"repo_name": "zer0se7en/netty",
"path": "codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyCodecUtil.java",
"license": "apache-2.0",
"size": 19064
} | [
"io.netty.buffer.ByteBuf"
] | import io.netty.buffer.ByteBuf; | import io.netty.buffer.*; | [
"io.netty.buffer"
] | io.netty.buffer; | 758,294 |
@ServiceMethod(returns = ReturnType.SINGLE)
public MicrosoftGraphDirectoryRoleInner createDirectoryRole(MicrosoftGraphDirectoryRoleInner body) {
return createDirectoryRoleAsync(body).block();
} | @ServiceMethod(returns = ReturnType.SINGLE) MicrosoftGraphDirectoryRoleInner function(MicrosoftGraphDirectoryRoleInner body) { return createDirectoryRoleAsync(body).block(); } | /**
* Add new entity to directoryRoles.
*
* @param body New entity.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws OdataErrorMainException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if... | Add new entity to directoryRoles | createDirectoryRole | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/DirectoryRolesDirectoryRolesClientImpl.java",
"license": "mit",
"size": 46009
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphDirectoryRoleInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphDirectoryRoleInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.authorization.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 118,244 |
public int getType() throws SQLException {
return this.resultSetType;
} | int function() throws SQLException { return this.resultSetType; } | /**
* JDBC 2.0 Return the type of this result set. The type is determined based
* on the statement that created the result set.
*
* @return TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, or
* TYPE_SCROLL_SENSITIVE
*
* @exception SQLException
* if a database-... | JDBC 2.0 Return the type of this result set. The type is determined based on the statement that created the result set | getType | {
"repo_name": "mwaylabs/mysql-connector-j",
"path": "src/com/mysql/jdbc/ResultSetImpl.java",
"license": "gpl-2.0",
"size": 288724
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,180,220 |
@Override
protected void onPreExecute() {
super.onPreExecute();
if (mListener instanceof Fragment) {
progressDialog = ProgressDialog.show(((Fragment) mListener).getContext(), "Loading...", "wait for it..!!");
}
} | void function() { super.onPreExecute(); if (mListener instanceof Fragment) { progressDialog = ProgressDialog.show(((Fragment) mListener).getContext(), STR, STR); } } | /**
* Runs on the UI thread before {@link #doInBackground}.
*
* @see #onPostExecute
* @see #doInBackground
*/ | Runs on the UI thread before <code>#doInBackground</code> | onPreExecute | {
"repo_name": "pablo-johnson/Build-It-Bigger",
"path": "app/src/main/java/com/udacity/gradle/builditbigger/EndpointsAsyncTask.java",
"license": "apache-2.0",
"size": 2879
} | [
"android.app.ProgressDialog",
"android.support.v4.app.Fragment"
] | import android.app.ProgressDialog; import android.support.v4.app.Fragment; | import android.app.*; import android.support.v4.app.*; | [
"android.app",
"android.support"
] | android.app; android.support; | 845,557 |
@JsonProperty( "rrules" )
public void setrRules( RRules rRules ) {
this.rRules = rRules;
} | @JsonProperty( STR ) void function( RRules rRules ) { this.rRules = rRules; } | /**
* Sets the schedule rules.
*
* @param rRules the schedule rules
*/ | Sets the schedule rules | setrRules | {
"repo_name": "tenable/Tenable.io-SDK-for-Java",
"path": "src/main/java/com/tenable/io/api/scans/models/Schedule.java",
"license": "mit",
"size": 2386
} | [
"com.fasterxml.jackson.annotation.JsonProperty"
] | import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 310,928 |
EAttribute getVar_Idname();
| EAttribute getVar_Idname(); | /**
* Returns the meta object for the attribute '{@link io.github.abelgomez.cpntools.Var#getIdname <em>Idname</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Idname</em>'.
* @see io.github.abelgomez.cpntools.Var#getIdname()
* @see #getVar()
... | Returns the meta object for the attribute '<code>io.github.abelgomez.cpntools.Var#getIdname Idname</code>'. | getVar_Idname | {
"repo_name": "abelgomez/cpntools.toolkit",
"path": "plugins/io.github.abelgomez.cpntools/src/io/github/abelgomez/cpntools/CpntoolsPackage.java",
"license": "epl-1.0",
"size": 204644
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 188,077 |
StoreRegion getStoreRegion(); | StoreRegion getStoreRegion(); | /**
* Get the stores region wrapper.
*/ | Get the stores region wrapper | getStoreRegion | {
"repo_name": "JCThePants/Storefront",
"path": "src/com/jcwhatever/storefront/stores/IStore.java",
"license": "mit",
"size": 7998
} | [
"com.jcwhatever.storefront.regions.StoreRegion"
] | import com.jcwhatever.storefront.regions.StoreRegion; | import com.jcwhatever.storefront.regions.*; | [
"com.jcwhatever.storefront"
] | com.jcwhatever.storefront; | 733,087 |
private void makeButtons() {
newPerspectiveButton = new JButton();
nameButton(newPerspectiveButton, "button.new");
newPerspectiveButton.setToolTipText(
Translator.localize("button.new.tooltip"));
removePerspectiveButton = new JButton();
nameButton(remo... | void function() { newPerspectiveButton = new JButton(); nameButton(newPerspectiveButton, STR); newPerspectiveButton.setToolTipText( Translator.localize(STR)); removePerspectiveButton = new JButton(); nameButton(removePerspectiveButton, STR); removePerspectiveButton.setToolTipText( Translator.localize(STR)); duplicatePe... | /**
* Make the buttons on the dialog box with localized strings and mnemonics.
*/ | Make the buttons on the dialog box with localized strings and mnemonics | makeButtons | {
"repo_name": "kopl/misc",
"path": "JaMoPP Performance Test/testcode/argouml-usecase-variant/src/org/argouml/ui/explorer/PerspectiveConfigurator.java",
"license": "epl-1.0",
"size": 31813
} | [
"javax.swing.JButton",
"org.argouml.i18n.Translator"
] | import javax.swing.JButton; import org.argouml.i18n.Translator; | import javax.swing.*; import org.argouml.i18n.*; | [
"javax.swing",
"org.argouml.i18n"
] | javax.swing; org.argouml.i18n; | 1,411,659 |
public static String getRetRequiredCheck(String express, Field field) {
String code = "if (CodedConstant.isNull(" + express + ")) {\n";
code += "throw new UninitializedMessageException(CodedConstant.asList(\"" + field.getName() + "\"));\n";
code += "}\n";
return code;
} | static String function(String express, Field field) { String code = STR + express + STR; code += STRSTR\"));\n"; code += "}\n"; return code; } | /**
* get return required field check java expression
*
* @param express java expression
* @param field java field
* @return full java expression
*/ | get return required field check java expression | getRetRequiredCheck | {
"repo_name": "lindzh/jprotobuf",
"path": "src/main/java/com/baidu/bjf/remoting/protobuf/CodedConstant.java",
"license": "apache-2.0",
"size": 26697
} | [
"java.lang.reflect.Field"
] | import java.lang.reflect.Field; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,835,653 |
public boolean attemptTeleport(double x, double y, double z)
{
double d0 = this.posX;
double d1 = this.posY;
double d2 = this.posZ;
this.posX = x;
this.posY = y;
this.posZ = z;
boolean flag = false;
BlockPos blockpos = new BlockPos(this);
W... | boolean function(double x, double y, double z) { double d0 = this.posX; double d1 = this.posY; double d2 = this.posZ; this.posX = x; this.posY = y; this.posZ = z; boolean flag = false; BlockPos blockpos = new BlockPos(this); World world = this.world; Random random = this.getRNG(); if (world.isBlockLoaded(blockpos)) { b... | /**
* Teleports the entity to the specified location. Used for Enderman and Chorus Fruit teleportation
*/ | Teleports the entity to the specified location. Used for Enderman and Chorus Fruit teleportation | attemptTeleport | {
"repo_name": "Severed-Infinity/technium",
"path": "build/tmp/recompileMc/sources/net/minecraft/entity/EntityLivingBase.java",
"license": "gpl-3.0",
"size": 111956
} | [
"java.util.Random",
"net.minecraft.block.state.IBlockState",
"net.minecraft.util.EnumParticleTypes",
"net.minecraft.util.math.BlockPos",
"net.minecraft.world.World"
] | import java.util.Random; import net.minecraft.block.state.IBlockState; import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; | import java.util.*; import net.minecraft.block.state.*; import net.minecraft.util.*; import net.minecraft.util.math.*; import net.minecraft.world.*; | [
"java.util",
"net.minecraft.block",
"net.minecraft.util",
"net.minecraft.world"
] | java.util; net.minecraft.block; net.minecraft.util; net.minecraft.world; | 2,508,568 |
protected Properties getChildValues( Element parent )
{
return null;
} | Properties function( Element parent ) { return null; } | /**
* NOT YET IMPLMENTED! Returns the values of all the child nodes of the
* passed nodes. Values are returned in a Property object and can be
* accessed by:<br>
* Property.getValue("[elementName]");
*
*@param parent Description of Parameter
*@return The ChildVal... | NOT YET IMPLMENTED! Returns the values of all the child nodes of the passed nodes. Values are returned in a Property object and can be accessed by: Property.getValue("[elementName]") | getChildValues | {
"repo_name": "jchoyt/mrald-lite",
"path": "src/org/mitre/mrald/util/DomParser.java",
"license": "apache-2.0",
"size": 4088
} | [
"java.util.Properties",
"org.w3c.dom.Element"
] | import java.util.Properties; import org.w3c.dom.Element; | import java.util.*; import org.w3c.dom.*; | [
"java.util",
"org.w3c.dom"
] | java.util; org.w3c.dom; | 1,330,696 |
@Around("within(org.apache.nifi.web.dao.ProcessGroupDAO+) && "
+ "execution(org.apache.nifi.groups.ProcessGroup updateProcessGroup(org.apache.nifi.web.api.dto.ProcessGroupDTO)) && "
+ "args(processGroupDTO)")
public ProcessGroup updateProcessGroupAdvice(ProceedingJoinPoint proceedingJoin... | @Around(STR + STR + STR) ProcessGroup function(ProceedingJoinPoint proceedingJoinPoint, ProcessGroupDTO processGroupDTO) throws Throwable { ProcessGroupDAO processGroupDAO = getProcessGroupDAO(); ProcessGroup processGroup = processGroupDAO.getProcessGroup(processGroupDTO.getId()); String name = processGroup.getName(); ... | /**
* Audits the update of process group configuration.
*
* @param proceedingJoinPoint join point
* @param processGroupDTO dto
* @return group
* @throws Throwable ex
*/ | Audits the update of process group configuration | updateProcessGroupAdvice | {
"repo_name": "Xsixteen/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ProcessGroupAuditor.java",
"license": "apache-2.0",
"size": 16813
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.Date",
"org.apache.nifi.action.Action",
"org.apache.nifi.action.Component",
"org.apache.nifi.action.FlowChangeAction",
"org.apache.nifi.action.Operation",
"org.apache.nifi.action.details.ActionDetails",
"org.apache.nifi.action.details.FlowCha... | import java.util.ArrayList; import java.util.Collection; import java.util.Date; import org.apache.nifi.action.Action; import org.apache.nifi.action.Component; import org.apache.nifi.action.FlowChangeAction; import org.apache.nifi.action.Operation; import org.apache.nifi.action.details.ActionDetails; import org.apache.n... | import java.util.*; import org.apache.nifi.action.*; import org.apache.nifi.action.details.*; import org.apache.nifi.authorization.user.*; import org.apache.nifi.groups.*; import org.apache.nifi.web.api.dto.*; import org.apache.nifi.web.dao.*; import org.aspectj.lang.*; import org.aspectj.lang.annotation.*; | [
"java.util",
"org.apache.nifi",
"org.aspectj.lang"
] | java.util; org.apache.nifi; org.aspectj.lang; | 2,037,985 |
public IScriptSource getScriptSource();
/**
* Returns a {@link org.apache.tapestry.engine.IPropertySource}that should be used to obtain
* configuration data. The returned source represents a search path that includes (at a
* minimum):
* <ul>
* <li>Properties of the {@link org.apache.ta... | IScriptSource function(); /** * Returns a {@link org.apache.tapestry.engine.IPropertySource}that should be used to obtain * configuration data. The returned source represents a search path that includes (at a * minimum): * <ul> * <li>Properties of the {@link org.apache.tapestry.spec.ApplicationSpecification} | /**
* Returns a source for parsed {@link org.apache.tapestry.IScript}s. The source is shared
* between all sessions.
*
* @since 1.0.2
* @deprecated To be removed in 4.1. This value can now be injected as "infrastructure:scriptSource".
*/ | Returns a source for parsed <code>org.apache.tapestry.IScript</code>s. The source is shared between all sessions | getScriptSource | {
"repo_name": "apache/tapestry4",
"path": "framework/src/java/org/apache/tapestry/IEngine.java",
"license": "apache-2.0",
"size": 6678
} | [
"org.apache.tapestry.engine.IPropertySource",
"org.apache.tapestry.engine.IScriptSource"
] | import org.apache.tapestry.engine.IPropertySource; import org.apache.tapestry.engine.IScriptSource; | import org.apache.tapestry.engine.*; | [
"org.apache.tapestry"
] | org.apache.tapestry; | 2,325,954 |
public void addOrReplacePartitionSchema(PartitionSchema partitionSchema)
{
int index = partitionSchemas.indexOf(partitionSchema);
if (index<0)
{
partitionSchemas.add(partitionSchema);
}
else
{
PartitionSchema previous = partitionSchemas.get... | void function(PartitionSchema partitionSchema) { int index = partitionSchemas.indexOf(partitionSchema); if (index<0) { partitionSchemas.add(partitionSchema); } else { PartitionSchema previous = partitionSchemas.get(index); previous.replaceMeta(partitionSchema); } setChanged(); } | /**
* Add a new partition schema to the transformation if that didn't exist yet.
* Otherwise, replace it.
*
* @param partitionSchema The partition schema to be added.
*/ | Add a new partition schema to the transformation if that didn't exist yet. Otherwise, replace it | addOrReplacePartitionSchema | {
"repo_name": "icholy/geokettle-2.0",
"path": "src/org/pentaho/di/trans/TransMeta.java",
"license": "lgpl-2.1",
"size": 230572
} | [
"org.pentaho.di.partition.PartitionSchema"
] | import org.pentaho.di.partition.PartitionSchema; | import org.pentaho.di.partition.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,554,664 |
OperationResponse unregisterResourceProvider() throws IOException, ServiceException; | OperationResponse unregisterResourceProvider() throws IOException, ServiceException; | /**
* Unregister the Scheduler resource provider with your subscription.
*
* @throws IOException Signals that an I/O exception of some sort has
* occurred. This class is the general class of exceptions produced by
* failed or interrupted I/O operations.
* @throws ServiceException Thrown if an un... | Unregister the Scheduler resource provider with your subscription | unregisterResourceProvider | {
"repo_name": "flydream2046/azure-sdk-for-java",
"path": "service-management/azure-svc-mgmt-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/SchedulerManagementClient.java",
"license": "apache-2.0",
"size": 9045
} | [
"com.microsoft.windowsazure.core.OperationResponse",
"com.microsoft.windowsazure.exception.ServiceException",
"java.io.IOException"
] | import com.microsoft.windowsazure.core.OperationResponse; import com.microsoft.windowsazure.exception.ServiceException; import java.io.IOException; | import com.microsoft.windowsazure.core.*; import com.microsoft.windowsazure.exception.*; import java.io.*; | [
"com.microsoft.windowsazure",
"java.io"
] | com.microsoft.windowsazure; java.io; | 565,882 |
@AfterAll
public static void afterTests()
{
Graphics.setFactoryGraphic(null);
}
| static void function() { Graphics.setFactoryGraphic(null); } | /**
* Clean up tests.
*/ | Clean up tests | afterTests | {
"repo_name": "b3dgs/lionengine",
"path": "lionengine-game/src/test/java/com/b3dgs/lionengine/game/background/BackgroundElementTest.java",
"license": "gpl-3.0",
"size": 2456
} | [
"com.b3dgs.lionengine.graphic.Graphics"
] | import com.b3dgs.lionengine.graphic.Graphics; | import com.b3dgs.lionengine.graphic.*; | [
"com.b3dgs.lionengine"
] | com.b3dgs.lionengine; | 2,329,744 |
public DamageModifier build() {
checkState(this.type != null, "The DamageModifierType must not be null!");
checkState(this.cause != null, "The cause for the DamageModifier must not be null!");
return new ImplementedDamageModifier(this);
} | DamageModifier function() { checkState(this.type != null, STR); checkState(this.cause != null, STR); return new ImplementedDamageModifier(this); } | /**
* Creates a new {@link DamageModifier} with this builder's provided
* {@link Cause} and {@link DamageModifierType}.
*
* @return The newly created damage modifier
*/ | Creates a new <code>DamageModifier</code> with this builder's provided <code>Cause</code> and <code>DamageModifierType</code> | build | {
"repo_name": "kashike/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/event/cause/entity/damage/DamageModifier.java",
"license": "mit",
"size": 5757
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 629,760 |
public T jacksonxml(Class<?> unmarshalType, Class<?> jsonView, String include, boolean prettyPrint) {
JacksonXMLDataFormat jacksonXMLDataFormat = new JacksonXMLDataFormat();
jacksonXMLDataFormat.setUnmarshalType(unmarshalType);
jacksonXMLDataFormat.setJsonView(jsonView);
jacksonXMLDa... | T function(Class<?> unmarshalType, Class<?> jsonView, String include, boolean prettyPrint) { JacksonXMLDataFormat jacksonXMLDataFormat = new JacksonXMLDataFormat(); jacksonXMLDataFormat.setUnmarshalType(unmarshalType); jacksonXMLDataFormat.setJsonView(jsonView); jacksonXMLDataFormat.setInclude(include); jacksonXMLDataF... | /**
* Uses the Jackson XML data format
*
* @param unmarshalType
* unmarshal type for xml jackson type
* @param jsonView
* the view type for xml jackson type
* @param include
* include such as <tt>ALWAYS</tt>, <tt>NON_NULL</tt>, etc.
* @param ... | Uses the Jackson XML data format | jacksonxml | {
"repo_name": "punkhorn/camel-upstream",
"path": "core/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java",
"license": "apache-2.0",
"size": 46443
} | [
"org.apache.camel.model.dataformat.JacksonXMLDataFormat"
] | import org.apache.camel.model.dataformat.JacksonXMLDataFormat; | import org.apache.camel.model.dataformat.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,128,440 |
public XContentBuilder utf8Value(byte[] bytes, int offset, int length) throws IOException {
generator.writeUTF8String(bytes, offset, length);
return this;
}
////////////////////////////////////////////////////////////////////////////
// Date
//////////////////////////////////
... | XContentBuilder function(byte[] bytes, int offset, int length) throws IOException { generator.writeUTF8String(bytes, offset, length); return this; } /** * Write a time-based field and value, if the passed timeValue is null a * null value is written, otherwise a date transformers lookup is performed. | /**
* Writes the binary content of the given byte array as UTF-8 bytes.
*
* Use {@link XContentParser#charBuffer()} to read the value back
*/ | Writes the binary content of the given byte array as UTF-8 bytes. Use <code>XContentParser#charBuffer()</code> to read the value back | utf8Value | {
"repo_name": "nknize/elasticsearch",
"path": "libs/x-content/src/main/java/org/elasticsearch/common/xcontent/XContentBuilder.java",
"license": "apache-2.0",
"size": 39375
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,139,629 |
public Lease write(Entry entry, Transaction txn, long lease)
throws TransactionException, RemoteException {
Lease theirLease = null;
boolean inDoubt = false;
RemoteException writeEx = null;
try {
writeAttemptCount++;
theirLease = space.write(entry... | Lease function(Entry entry, Transaction txn, long lease) throws TransactionException, RemoteException { Lease theirLease = null; boolean inDoubt = false; RemoteException writeEx = null; try { writeAttemptCount++; theirLease = space.write(entry, txn, lease); successfulWriteCount++; } catch (RemoteException e) { writeEx ... | /**
* Wrapper around <code>JavaSpace.write()</code> that logs the
* write. The returned proxy is not prepared, since the caller
* is responsible for that.
*
* @see net.jini.space.JavaSpace#write
*/ | Wrapper around <code>JavaSpace.write()</code> that logs the write. The returned proxy is not prepared, since the caller is responsible for that | write | {
"repo_name": "cdegroot/river",
"path": "qa/src/com/sun/jini/test/impl/outrigger/matching/JavaSpaceAuditor.java",
"license": "apache-2.0",
"size": 25472
} | [
"java.io.IOException",
"java.rmi.RemoteException",
"java.util.Iterator",
"java.util.LinkedList",
"java.util.List",
"net.jini.core.entry.Entry",
"net.jini.core.lease.Lease",
"net.jini.core.transaction.Transaction",
"net.jini.core.transaction.TransactionException"
] | import java.io.IOException; import java.rmi.RemoteException; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import net.jini.core.entry.Entry; import net.jini.core.lease.Lease; import net.jini.core.transaction.Transaction; import net.jini.core.transaction.TransactionException; | import java.io.*; import java.rmi.*; import java.util.*; import net.jini.core.entry.*; import net.jini.core.lease.*; import net.jini.core.transaction.*; | [
"java.io",
"java.rmi",
"java.util",
"net.jini.core"
] | java.io; java.rmi; java.util; net.jini.core; | 215,905 |
private static boolean isInHashCodeMethod(DetailAST ast) {
boolean inHashCodeMethod = false;
// if not in a code block, can't be in hashCode()
if (ScopeUtils.isInCodeBlock(ast)) {
// find the method definition AST
DetailAST methodDefAST = ast.getParent();
... | static boolean function(DetailAST ast) { boolean inHashCodeMethod = false; if (ScopeUtils.isInCodeBlock(ast)) { DetailAST methodDefAST = ast.getParent(); while (methodDefAST != null && methodDefAST.getType() != TokenTypes.METHOD_DEF) { methodDefAST = methodDefAST.getParent(); } if (methodDefAST != null) { final DetailA... | /**
* Determines whether or not the given AST is in a valid hash code method.
* A valid hash code method is considered to be a method of the signature
* {@code public int hashCode()}.
*
* @param ast the AST from which to search for an enclosing hash code
* method definition
*
... | Determines whether or not the given AST is in a valid hash code method. A valid hash code method is considered to be a method of the signature public int hashCode() | isInHashCodeMethod | {
"repo_name": "Bhavik3/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheck.java",
"license": "lgpl-2.1",
"size": 15882
} | [
"com.puppycrawl.tools.checkstyle.api.DetailAST",
"com.puppycrawl.tools.checkstyle.api.TokenTypes",
"com.puppycrawl.tools.checkstyle.utils.ScopeUtils"
] | import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.TokenTypes; import com.puppycrawl.tools.checkstyle.utils.ScopeUtils; | import com.puppycrawl.tools.checkstyle.api.*; import com.puppycrawl.tools.checkstyle.utils.*; | [
"com.puppycrawl.tools"
] | com.puppycrawl.tools; | 2,895,839 |
public void init(
boolean forEncryption,
CipherParameters params)
{
if (params instanceof KeyParameter)
{
WorkingKey = generateWorkingKey(((KeyParameter)params).getKey(), forEncryption);
this.forEncryption = forEncryption;
return;
... | void function( boolean forEncryption, CipherParameters params) { if (params instanceof KeyParameter) { WorkingKey = generateWorkingKey(((KeyParameter)params).getKey(), forEncryption); this.forEncryption = forEncryption; return; } throw new IllegalArgumentException(STR + params.getClass().getName()); } | /**
* initialise an AES cipher.
*
* @param forEncryption whether or not we are for encryption.
* @param params the parameters required to set up the cipher.
* @exception IllegalArgumentException if the params argument is
* inappropriate.
*/ | initialise an AES cipher | init | {
"repo_name": "mobilesec/openuat-platform-j2me",
"path": "thirdparty/bouncycastle-x509-deps/org/bouncycastle/crypto/engines/AESEngine.java",
"license": "lgpl-3.0",
"size": 26968
} | [
"org.bouncycastle.crypto.CipherParameters",
"org.bouncycastle.crypto.params.KeyParameter"
] | import org.bouncycastle.crypto.CipherParameters; import org.bouncycastle.crypto.params.KeyParameter; | import org.bouncycastle.crypto.*; import org.bouncycastle.crypto.params.*; | [
"org.bouncycastle.crypto"
] | org.bouncycastle.crypto; | 1,790,030 |
private void run() throws InterruptedException {
for(long lastExpiryTime = Time.monotonicNow();
!Thread.interrupted();
Thread.sleep(expiryPeriod)) {
final long elapsed = Time.monotonicNow() - lastExpiryTime;
if (elapsed >= expiryPeriod) {
evictExpired(expiryPeriod);
las... | void function() throws InterruptedException { for(long lastExpiryTime = Time.monotonicNow(); !Thread.interrupted(); Thread.sleep(expiryPeriod)) { final long elapsed = Time.monotonicNow() - lastExpiryTime; if (elapsed >= expiryPeriod) { evictExpired(expiryPeriod); lastExpiryTime = Time.monotonicNow(); } } clear(); throw... | /**
* Periodically check in the cache and expire the entries older than
* expiryPeriod minutes.
*/ | Periodically check in the cache and expire the entries older than expiryPeriod minutes | run | {
"repo_name": "apurtell/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/PeerCache.java",
"license": "apache-2.0",
"size": 8037
} | [
"org.apache.hadoop.util.Time"
] | import org.apache.hadoop.util.Time; | import org.apache.hadoop.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 787,818 |
try {
return read(dataInput, dataInput.readInt());
} catch(final IOException e) {
throw new UncheckedIOException(e);
}
}
/**
* Reads a {@link Triangle2F} instance from {@code dataInput}.
* <p>
* Returns the {@code Triangle2F} instance that was read.
* <p>
* If {@code dataInput} is {@code null}... | try { return read(dataInput, dataInput.readInt()); } catch(final IOException e) { throw new UncheckedIOException(e); } } /** * Reads a {@link Triangle2F} instance from {@code dataInput}. * <p> * Returns the {@code Triangle2F} instance that was read. * <p> * If {@code dataInput} is {@code null}, a {@code NullPointerExce... | /**
* Reads a {@link Triangle2F} instance from {@code dataInput}.
* <p>
* Returns the {@code Triangle2F} instance that was read.
* <p>
* If {@code dataInput} is {@code null}, a {@code NullPointerException} will be thrown.
* <p>
* If the ID is invalid, an {@code IllegalArgumentException} will be thrown.
... | Reads a <code>Triangle2F</code> instance from dataInput. Returns the Triangle2F instance that was read. If dataInput is null, a NullPointerException will be thrown. If the ID is invalid, an IllegalArgumentException will be thrown. If an I/O error occurs, an UncheckedIOException will be thrown | read | {
"repo_name": "macroing/Dayflower",
"path": "src/main/java/org/dayflower/geometry/shape/Triangle2FReader.java",
"license": "lgpl-3.0",
"size": 4303
} | [
"java.io.DataInput",
"java.io.IOException",
"java.io.UncheckedIOException"
] | import java.io.DataInput; import java.io.IOException; import java.io.UncheckedIOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,778,381 |
return AutomatonGraphView.create(this, inputs);
} | return AutomatonGraphView.create(this, inputs); } | /**
* Obtains a {@link Graph graph} view of the transition graph of this automaton, taking into
* account the specified input symbols. The transitions are represented as {@link TransitionEdge}s
* in the grpah.
*
* @param inputs the input symbols to consider
* @return a graph view of the transition graph of... | Obtains a <code>Graph graph</code> view of the transition graph of this automaton, taking into account the specified input symbols. The transitions are represented as <code>TransitionEdge</code>s in the grpah | transitionGraphView | {
"repo_name": "bencaldwell/automatalib",
"path": "api/src/main/java/net/automatalib/automata/Automaton.java",
"license": "apache-2.0",
"size": 1857
} | [
"net.automatalib.automata.graphs.AutomatonGraphView"
] | import net.automatalib.automata.graphs.AutomatonGraphView; | import net.automatalib.automata.graphs.*; | [
"net.automatalib.automata"
] | net.automatalib.automata; | 2,084,397 |
public void setOutlineStroke(Stroke stroke);
| void function(Stroke stroke); | /**
* Sets the outline stroke for ALL series and sends a
* {@link RendererChangeEvent} to all registered listeners.
*
* @param stroke the stroke (<code>null</code> permitted).
*
* @deprecated This method should no longer be used (as of version 1.0.6).
* It is sufficient to... | Sets the outline stroke for ALL series and sends a <code>RendererChangeEvent</code> to all registered listeners | setOutlineStroke | {
"repo_name": "sebkur/JFreeChart",
"path": "src/main/java/org/jfree/chart/renderer/xy/XYItemRenderer.java",
"license": "lgpl-3.0",
"size": 64436
} | [
"java.awt.Stroke"
] | import java.awt.Stroke; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,960,073 |
public static org.opennms.netmgt.config.httpdatacollection.Attributes unmarshal(
final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (org.opennms.netmgt.config.httpdatacollection.Attributes) Unmarshaller.unmarshal(org... | static org.opennms.netmgt.config.httpdatacollection.Attributes function( final java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (org.opennms.netmgt.config.httpdatacollection.Attributes) Unmarshaller.unmarshal(org.opennms.netmgt.config.httpdatacolle... | /**
* Method unmarshal.
*
* @param reader
* @throws org.exolab.castor.xml.MarshalException if object is
* null or if any SAXException is thrown during marshaling
* @throws org.exolab.castor.xml.ValidationException if this
* object is an invalid instance according to the schema
*... | Method unmarshal | unmarshal | {
"repo_name": "vishwaAbhinav/OpenNMS",
"path": "opennms-config/target/generated-sources/castor/org/opennms/netmgt/config/httpdatacollection/Attributes.java",
"license": "gpl-2.0",
"size": 11199
} | [
"org.exolab.castor.xml.Unmarshaller"
] | import org.exolab.castor.xml.Unmarshaller; | import org.exolab.castor.xml.*; | [
"org.exolab.castor"
] | org.exolab.castor; | 1,141,115 |
//~ Methods ----------------------------------------------------------------
//------------//
// getSystems //
//------------//
public List<SystemInfo> getSystems ()
{
return Collections.unmodifiableList(systems);
}
| List<SystemInfo> function () { return Collections.unmodifiableList(systems); } | /**
* Report an unmodifiable view on current systems.
*
* @return a view on systems list
*/ | Report an unmodifiable view on current systems | getSystems | {
"repo_name": "jlpoolen/libreveris",
"path": "src/main/omr/sheet/Sheet.java",
"license": "lgpl-3.0",
"size": 42737
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,155,682 |
public Record getRecord()
{
return super.getRecord();
} | Record function() { return super.getRecord(); } | /**
* Expose the protected function to the DefaultSheet in this package
*
* @return the raw record data
*/ | Expose the protected function to the DefaultSheet in this package | getRecord | {
"repo_name": "stefandmn/AREasy",
"path": "src/java/org/areasy/common/parser/excel/biff/drawing/MsoDrawingRecord.java",
"license": "lgpl-3.0",
"size": 2547
} | [
"org.areasy.common.parser.excel.read.biff.Record"
] | import org.areasy.common.parser.excel.read.biff.Record; | import org.areasy.common.parser.excel.read.biff.*; | [
"org.areasy.common"
] | org.areasy.common; | 2,638,299 |
public void setDeclHandler(DeclHandler declHandler) {
this.declHandler = declHandler;
} | void function(DeclHandler declHandler) { this.declHandler = declHandler; } | /**
* This will set the <code>DeclHandler</code>.
*
* @param declHandler contains declaration callback methods.
*/ | This will set the <code>DeclHandler</code> | setDeclHandler | {
"repo_name": "roboidstudio/embedded",
"path": "org.jdom/src/org/jdom/output/SAXOutputter.java",
"license": "lgpl-2.1",
"size": 51890
} | [
"org.xml.sax.ext.DeclHandler"
] | import org.xml.sax.ext.DeclHandler; | import org.xml.sax.ext.*; | [
"org.xml.sax"
] | org.xml.sax; | 1,351,197 |
long count(String cacheName, OpType opType);
| long count(String cacheName, OpType opType); | /**
* Get the number of occurrences of the given operation type,
* retrieve the number of cache hits that have happened to the cache.
*
* @param cacheName Name of the cache.
* @param opType Type of cache operation.
* @return long count
*/ | Get the number of occurrences of the given operation type, retrieve the number of cache hits that have happened to the cache | count | {
"repo_name": "Alfresco/alfresco-repository",
"path": "src/main/java/org/alfresco/repo/cache/CacheStatistics.java",
"license": "lgpl-3.0",
"size": 3463
} | [
"org.alfresco.repo.cache.TransactionStats"
] | import org.alfresco.repo.cache.TransactionStats; | import org.alfresco.repo.cache.*; | [
"org.alfresco.repo"
] | org.alfresco.repo; | 2,195,430 |
public void setDatastreams(List<Datastream> streams)
{
datastreams.clear();
if (streams != null)
{
for (Datastream stream : streams)
{
datastreams.put(stream.getStreamId(), stream);
}
}
} | void function(List<Datastream> streams) { datastreams.clear(); if (streams != null) { for (Datastream stream : streams) { datastreams.put(stream.getStreamId(), stream); } } } | /**
* Replace all datastreams in this digital object with datastreams from the given list.
*
* @param streams
* a list of datastreams
*/ | Replace all datastreams in this digital object with datastreams from the given list | setDatastreams | {
"repo_name": "DANS-KNAW/dccd-legacy-libs",
"path": "fedora/src/main/java/nl/knaw/dans/common/fedora/fox/DigitalObject.java",
"license": "apache-2.0",
"size": 21223
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 515,182 |
private Boolean isFilePage = null;
public boolean isFilePage() {
if (isFilePage == null) {
String filePageAlias = FileAliasData.valueFor(getSite().getLanguage());
isFilePage = getNamespace() != null
&& filePageAlias != null // If langcode, for some reason, is... | Boolean function = null; boolean function() { if (isFilePage == null) { String filePageAlias = FileAliasData.valueFor(getSite().getLanguage()); isFilePage = getNamespace() != null && filePageAlias != null && filePageAlias.equals(getNamespace()); } return isFilePage; } | /**
* Check if the Title represents a File:
*
* @return true if it is a File page, false if not
*/ | Check if the Title represents a File: | isFilePage | {
"repo_name": "creaITve/apps-android-tbrc-works",
"path": "wikipedia/src/main/java/org/wikipedia/PageTitle.java",
"license": "apache-2.0",
"size": 7483
} | [
"org.wikipedia.staticdata.FileAliasData"
] | import org.wikipedia.staticdata.FileAliasData; | import org.wikipedia.staticdata.*; | [
"org.wikipedia.staticdata"
] | org.wikipedia.staticdata; | 310,287 |
void validateVariableName(String name) {
if (hasVariable(name))
throw new BuildException(
name.equals(VERSION_NAME) ? "The variable \""
+ VERSION_NAME
+ "\" cannot be defined as an element if there has been an attri... | void validateVariableName(String name) { if (hasVariable(name)) throw new BuildException( name.equals(VERSION_NAME) ? STRSTR\STRversion\STR : STRSTR\STR); } | /**
* Checks if the variable with the specified name is allowed to be defined according
* to the already parsed content.
*
* @param name
* The name of the configuration variable to validate.
* @since Ant-Eclipse 1.0
*/ | Checks if the variable with the specified name is allowed to be defined according to the already parsed content | validateVariableName | {
"repo_name": "wolfgangmeyers/ant-eclipse",
"path": "src/prantl/ant/eclipse/PreferencesElement.java",
"license": "apache-2.0",
"size": 9185
} | [
"org.apache.tools.ant.BuildException"
] | import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.*; | [
"org.apache.tools"
] | org.apache.tools; | 231,195 |
public void startStateTracker(ZooKeeperWatcher zookeeper, String peerStateNode)
throws KeeperException {
ensurePeerEnabled(zookeeper, peerStateNode);
this.peerStateTracker = new PeerStateTracker(peerStateNode, zookeeper, this);
this.peerStateTracker.start();
try {
this.readPeerStateZnode()... | void function(ZooKeeperWatcher zookeeper, String peerStateNode) throws KeeperException { ensurePeerEnabled(zookeeper, peerStateNode); this.peerStateTracker = new PeerStateTracker(peerStateNode, zookeeper, this); this.peerStateTracker.start(); try { this.readPeerStateZnode(); } catch (DeserializationException e) { throw... | /**
* start a state tracker to check whether this peer is enabled or not
*
* @param zookeeper zk watcher for the local cluster
* @param peerStateNode path to zk node which stores peer state
* @throws KeeperException
*/ | start a state tracker to check whether this peer is enabled or not | startStateTracker | {
"repo_name": "grokcoder/pbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeerZKImpl.java",
"license": "apache-2.0",
"size": 9136
} | [
"org.apache.hadoop.hbase.exceptions.DeserializationException",
"org.apache.hadoop.hbase.zookeeper.ZKUtil",
"org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher",
"org.apache.zookeeper.KeeperException"
] | import org.apache.hadoop.hbase.exceptions.DeserializationException; import org.apache.hadoop.hbase.zookeeper.ZKUtil; import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher; import org.apache.zookeeper.KeeperException; | import org.apache.hadoop.hbase.exceptions.*; import org.apache.hadoop.hbase.zookeeper.*; import org.apache.zookeeper.*; | [
"org.apache.hadoop",
"org.apache.zookeeper"
] | org.apache.hadoop; org.apache.zookeeper; | 436,194 |
public void testSnapshotCanceledOnRemovedShard() throws Exception {
final int numPrimaries = 1;
final int numReplicas = 1;
final int numDocs = 100;
final String repo = "test-repo";
final String index = "test-idx";
final String snapshot = "test-snap";
assertAc... | void function() throws Exception { final int numPrimaries = 1; final int numReplicas = 1; final int numDocs = 100; final String repo = STR; final String index = STR; final String snapshot = STR; assertAcked(prepareCreate(index, 1, Settings.builder().put(STR, numPrimaries).put(STR, numReplicas))); logger.info(STR); for ... | /**
* This test ensures that when a shard is removed from a node (perhaps due to the node
* leaving the cluster, then returning), all snapshotting of that shard is aborted, so
* all Store references held onto by the snapshot are released.
*
* See https://github.com/elastic/elasticsearch/issues/... | This test ensures that when a shard is removed from a node (perhaps due to the node leaving the cluster, then returning), all snapshotting of that shard is aborted, so all Store references held onto by the snapshot are released. See HREF | testSnapshotCanceledOnRemovedShard | {
"repo_name": "yanjunh/elasticsearch",
"path": "core/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java",
"license": "apache-2.0",
"size": 159705
} | [
"org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryResponse",
"org.elasticsearch.cluster.ClusterState",
"org.elasticsearch.cluster.routing.IndexRoutingTable",
"org.elasticsearch.common.settings.Settings",
"org.elasticsearch.common.unit.TimeValue",
"org.elasticsearch.index.IndexService",... | import org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryResponse; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.routing.IndexRoutingTable; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.ind... | import org.elasticsearch.action.admin.cluster.repositories.put.*; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.common.settings.*; import org.elasticsearch.common.unit.*; import org.elasticsearch.index.*; import org.elasticsearch.indices.*; import org.elasticse... | [
"org.elasticsearch.action",
"org.elasticsearch.cluster",
"org.elasticsearch.common",
"org.elasticsearch.index",
"org.elasticsearch.indices",
"org.elasticsearch.test"
] | org.elasticsearch.action; org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.index; org.elasticsearch.indices; org.elasticsearch.test; | 169,319 |
public Collection<LFVertex> sourceView() {
return (sourceView == null) ? (sourceView = new VertexView(true)) : sourceView;
} | Collection<LFVertex> function() { return (sourceView == null) ? (sourceView = new VertexView(true)) : sourceView; } | /**
* Gets a view of this filtered edge set as a set of LF vertices that are the
* {@linkplain LFEdge#getSource() source vertices} for each edge in this set.
* @return A set containing every LF vertex that is the source vertex of some edge in this set.
* Note that the returned collection is immutable, and may c... | Gets a view of this filtered edge set as a set of LF vertices that are the LFEdge#getSource() source vertices for each edge in this set | sourceView | {
"repo_name": "bkiefer/openccg",
"path": "src/main/java/opennlp/ccg/disjunctivizer/FilteredLFEdgeSet.java",
"license": "lgpl-2.1",
"size": 4750
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,600,598 |
List<Tclob> loadAll(); | List<Tclob> loadAll(); | /**
* Load all clobs
*
* @return
*/ | Load all clobs | loadAll | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/trackplus/dao/ClobDAO.java",
"license": "gpl-3.0",
"size": 1348
} | [
"com.trackplus.model.Tclob",
"java.util.List"
] | import com.trackplus.model.Tclob; import java.util.List; | import com.trackplus.model.*; import java.util.*; | [
"com.trackplus.model",
"java.util"
] | com.trackplus.model; java.util; | 761,733 |
String findCredential(String uid, String realm) throws AccountNotFoundException; | String findCredential(String uid, String realm) throws AccountNotFoundException; | /**
* Find the MD5 hashed secret for a given user and realm.
*
* @param uid the uid
* @param realm the realm
* @return the secret
* @throws AccountNotFoundException if the account is not found
*/ | Find the MD5 hashed secret for a given user and realm | findCredential | {
"repo_name": "petracvv/cas",
"path": "support/cas-server-support-digest-authentication/src/main/java/org/apereo/cas/digest/DigestHashedCredentialRetriever.java",
"license": "apache-2.0",
"size": 573
} | [
"javax.security.auth.login.AccountNotFoundException"
] | import javax.security.auth.login.AccountNotFoundException; | import javax.security.auth.login.*; | [
"javax.security"
] | javax.security; | 2,880,585 |
@Test
public void testNoSpecificationAllowedIfNoMasquerade() {
// Just be sure that the states are reset by the end directive.
begin();
end();
// And now, let's go:
try {
willInvoke(1);
fail("called expect with no masquerade");
} catch (Sc... | void function() { begin(); end(); try { willInvoke(1); fail(STR); } catch (SchemerException e) { } try { willInvoke(atLeast(1)); fail(STR); } catch (SchemerException e) { } try { append(new Scenario()); fail(STR); } catch (SchemerException e) { } try { append(new Stubs()); fail(STR); } catch (SchemerException e) { } tr... | /**
* Verifies that we can't create new directives when no masquerade is
* ongoing.
*/ | Verifies that we can't create new directives when no masquerade is ongoing | testNoSpecificationAllowedIfNoMasquerade | {
"repo_name": "vmware/lmock",
"path": "tests/com/vmware/lmock/test/MasqueradeTest.java",
"license": "apache-2.0",
"size": 11233
} | [
"com.vmware.lmock.exception.SchemerException",
"com.vmware.lmock.impl.Scenario",
"com.vmware.lmock.impl.Stubs",
"com.vmware.lmock.masquerade.Schemer",
"org.junit.Assert"
] | import com.vmware.lmock.exception.SchemerException; import com.vmware.lmock.impl.Scenario; import com.vmware.lmock.impl.Stubs; import com.vmware.lmock.masquerade.Schemer; import org.junit.Assert; | import com.vmware.lmock.exception.*; import com.vmware.lmock.impl.*; import com.vmware.lmock.masquerade.*; import org.junit.*; | [
"com.vmware.lmock",
"org.junit"
] | com.vmware.lmock; org.junit; | 1,248,731 |
Response put(String uri, byte[] body, String contentType) throws CouchDBException; | Response put(String uri, byte[] body, String contentType) throws CouchDBException; | /**
* Send a PUT request to the given URI with
* the given byte array body
* @param uri
* @param contentType content type
* @return
*/ | Send a PUT request to the given URI with the given byte array body | put | {
"repo_name": "kylearon/jcouchdb",
"path": "src/org/jcouchdb/db/Server.java",
"license": "bsd-3-clause",
"size": 4261
} | [
"org.jcouchdb.exception.CouchDBException"
] | import org.jcouchdb.exception.CouchDBException; | import org.jcouchdb.exception.*; | [
"org.jcouchdb.exception"
] | org.jcouchdb.exception; | 980,328 |
public Map<String, String> getDetails(String id);
| Map<String, String> function(String id); | /**
* Retrieves details about the presence with the given id.
* @param id The id of the presence.
* @return A Map containing details of the presence.
*/ | Retrieves details about the presence with the given id | getDetails | {
"repo_name": "AppSecDev/appscan-sdk",
"path": "src/main/java/com/hcl/appscan/sdk/presence/IPresenceProvider.java",
"license": "apache-2.0",
"size": 1182
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,631,898 |
@Override
public void addField(FieldEditor editor) {
super.addField(editor);
} | void function(FieldEditor editor) { super.addField(editor); } | /**
* Make it available for extensions
*/ | Make it available for extensions | addField | {
"repo_name": "rgom/Pydev",
"path": "plugins/org.python.pydev.debug/src/org/python/pydev/debug/ui/DebugPrefsPage.java",
"license": "epl-1.0",
"size": 5482
} | [
"org.eclipse.jface.preference.FieldEditor"
] | import org.eclipse.jface.preference.FieldEditor; | import org.eclipse.jface.preference.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 187,110 |
public synchronized void rollLog() throws IOException {
if (logStream != null) {
this.logStream.flush();
this.logStream = null;
oa = null;
}
} | synchronized void function() throws IOException { if (logStream != null) { this.logStream.flush(); this.logStream = null; oa = null; } } | /**
* rollover the current log file to a new one.
* @throws IOException
*/ | rollover the current log file to a new one | rollLog | {
"repo_name": "joyent/zookeeper",
"path": "src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java",
"license": "apache-2.0",
"size": 24365
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,566,485 |
public Filter createFilter(FilterConfig filterConfig) {
LOGGER.entering(SecurityRealm.class.getName(), "createFilter");
Binding binding = new Binding();
SecurityComponents sc = getSecurityComponents();
binding.setVariable("securityComponents", sc);
binding.setVariabl... | Filter function(FilterConfig filterConfig) { LOGGER.entering(SecurityRealm.class.getName(), STR); Binding binding = new Binding(); SecurityComponents sc = getSecurityComponents(); binding.setVariable(STR, sc); binding.setVariable(STR,this); BeanBuilder builder = new BeanBuilder(); builder.parse(filterConfig.getServletC... | /**
* Creates {@link Filter} that all the incoming HTTP requests will go through
* for authentication.
*
* <p>
* The default implementation uses {@link #getSecurityComponents()} and builds
* a standard filter chain from /WEB-INF/security/SecurityFilters.groovy.
* But subclasses can ov... | Creates <code>Filter</code> that all the incoming HTTP requests will go through for authentication. The default implementation uses <code>#getSecurityComponents()</code> and builds a standard filter chain from /WEB-INF/security/SecurityFilters.groovy. But subclasses can override this to completely change the filter seq... | createFilter | {
"repo_name": "jtnord/jenkins",
"path": "core/src/main/java/hudson/security/SecurityRealm.java",
"license": "mit",
"size": 21905
} | [
"groovy.lang.Binding",
"hudson.util.spring.BeanBuilder",
"javax.servlet.Filter",
"javax.servlet.FilterConfig",
"org.springframework.web.context.WebApplicationContext"
] | import groovy.lang.Binding; import hudson.util.spring.BeanBuilder; import javax.servlet.Filter; import javax.servlet.FilterConfig; import org.springframework.web.context.WebApplicationContext; | import groovy.lang.*; import hudson.util.spring.*; import javax.servlet.*; import org.springframework.web.context.*; | [
"groovy.lang",
"hudson.util.spring",
"javax.servlet",
"org.springframework.web"
] | groovy.lang; hudson.util.spring; javax.servlet; org.springframework.web; | 1,710,290 |
void flushRegion(HRegionInfo regionInfo)
throws NotServingRegionException, IOException; | void flushRegion(HRegionInfo regionInfo) throws NotServingRegionException, IOException; | /**
* Flushes the MemStore of the specified region.
* <p>
* This method is synchronous.
* @param regionInfo region to flush
* @throws NotServingRegionException
* @throws IOException
*/ | Flushes the MemStore of the specified region. This method is synchronous | flushRegion | {
"repo_name": "centiteo/hbase",
"path": "src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java",
"license": "apache-2.0",
"size": 14469
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.HRegionInfo",
"org.apache.hadoop.hbase.NotServingRegionException"
] | import java.io.IOException; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.NotServingRegionException; | import java.io.*; import org.apache.hadoop.hbase.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,135,950 |
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.vertical_grid);
getWindow().setBackgroundDrawableResource(R.drawable.grid_bg);
} | void function(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.vertical_grid); getWindow().setBackgroundDrawableResource(R.drawable.grid_bg); } | /**
* Called when the activity is first created.
*/ | Called when the activity is first created | onCreate | {
"repo_name": "KazumiHARADA/TvCleanArchitecture2",
"path": "app/src/main/java/com/example/excadmin/tvcleanarchitecture/presentation/ui/activity/VerticalGridActivity.java",
"license": "apache-2.0",
"size": 1471
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 1,785,817 |
protected static String getUserFilePath(final HttpServletRequest request) {
return (userPathBuilder != null) ? userPathBuilder.getUserFilesPath(request) : null;
} | static String function(final HttpServletRequest request) { return (userPathBuilder != null) ? userPathBuilder.getUserFilesPath(request) : null; } | /**
* Getter for the user's file path.<br>
* Method is used by other handlers only!
*
* @param request
* @return {@link UserPathBuilder#getUserFilesPath(HttpServletRequest)} or null, if
* userPathBuilder is null.
*/ | Getter for the user's file path. Method is used by other handlers only | getUserFilePath | {
"repo_name": "juweiping/ocms",
"path": "src/org/openuap/cms/editor/handlers/RequestCycleHandler.java",
"license": "apache-2.0",
"size": 3987
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 794,080 |
private void parseTag() throws IOException {
if (dataPos == dataSize)
return;
if (isEOC(data[dataPos]) && (data[dataPos + 1] == 0)) {
int numOfEncapsulatedLenBytes = 0;
Object elem = null;
int index;
for (index = ndefsList.size()-1; index >... | void function() throws IOException { if (dataPos == dataSize) return; if (isEOC(data[dataPos]) && (data[dataPos + 1] == 0)) { int numOfEncapsulatedLenBytes = 0; Object elem = null; int index; for (index = ndefsList.size()-1; index >= 0; index--) { elem = ndefsList.get(index); if (elem instanceof Integer) { break; } els... | /**
* Parse the tag and if it is an end-of-contents tag then
* add the current position to the <code>eocList</code> vector.
*/ | Parse the tag and if it is an end-of-contents tag then add the current position to the <code>eocList</code> vector | parseTag | {
"repo_name": "Taichi-SHINDO/jdk9-jdk",
"path": "src/java.base/share/classes/sun/security/util/DerIndefLenConverter.java",
"license": "gpl-2.0",
"size": 11796
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 149,098 |
private void removeQueue(FSQueue queue) {
if (queue instanceof FSLeafQueue) {
leafQueues.remove(queue);
} else {
List<FSQueue> childQueues = queue.getChildQueues();
while (!childQueues.isEmpty()) {
removeQueue(childQueues.get(0));
}
}
queues.remove(queue.getName());
... | void function(FSQueue queue) { if (queue instanceof FSLeafQueue) { leafQueues.remove(queue); } else { List<FSQueue> childQueues = queue.getChildQueues(); while (!childQueues.isEmpty()) { removeQueue(childQueues.get(0)); } } queues.remove(queue.getName()); queue.getParent().getChildQueues().remove(queue); } | /**
* Remove a queue and all its descendents.
*/ | Remove a queue and all its descendents | removeQueue | {
"repo_name": "songweijia/fffs",
"path": "sources/hadoop-2.4.1-src/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/QueueManager.java",
"license": "apache-2.0",
"size": 11084
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,314,953 |
public boolean reverseCorrectIt()
{
log.info(toString());
// Before reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
if (m_processMsg != null)
return false;
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
if (!MPeri... | boolean function() { log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); if (m_processMsg != null) return false; MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); if (!MPeriod.isOpen(getCtx(), getDateAcct(), dt.getDocBaseType(), getA... | /**
* Reverse Correction - same date
* @return true if success
*/ | Reverse Correction - same date | reverseCorrectIt | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempiere_360/base/src/org/compiere/model/MInOut.java",
"license": "gpl-2.0",
"size": 68059
} | [
"org.compiere.process.DocAction"
] | import org.compiere.process.DocAction; | import org.compiere.process.*; | [
"org.compiere.process"
] | org.compiere.process; | 2,699,075 |
public static final String[] getPrincipalNames(String keytab,
Pattern pattern) throws IOException {
String[] principals = getPrincipalNames(keytab);
if (principals.length != 0) {
List<String> matchingPrincipals = new ArrayList<String>();
for (String principal : principals) {
if (patt... | static final String[] function(String keytab, Pattern pattern) throws IOException { String[] principals = getPrincipalNames(keytab); if (principals.length != 0) { List<String> matchingPrincipals = new ArrayList<String>(); for (String principal : principals) { if (pattern.matcher(principal).matches()) { matchingPrincipa... | /**
* Get all the unique principals from keytabfile which matches a pattern.
*
* @param keytab Name of the keytab file to be read.
* @param pattern pattern to be matched.
* @return list of unique principals which matches the pattern.
* @throws IOException if cannot get the principal name
*/ | Get all the unique principals from keytabfile which matches a pattern | getPrincipalNames | {
"repo_name": "aliyun-beta/aliyun-oss-hadoop-fs",
"path": "hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/KerberosUtil.java",
"license": "apache-2.0",
"size": 8843
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"java.util.regex.Pattern"
] | import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; | import java.io.*; import java.util.*; import java.util.regex.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,983,955 |
public static double getLambda0(double measureHard, double measureSoft){
double hard = measureHard;//Constants.computeMassDensity(measureHard);
double soft = measureSoft;//Constants.computeMassDensity(measureSoft);
return (hard * Constants.SoftTissue_mdensity) / (soft * Constants.Al_mdensity);
}
| static double function(double measureHard, double measureSoft){ double hard = measureHard; double soft = measureSoft; return (hard * Constants.SoftTissue_mdensity) / (soft * Constants.Al_mdensity); } | /**
* Computes the lambda_0 factor according to Joseph and Spital.
* @param measureHard as density
* @param measureSoft as density
* @return lambda_0 the lambda coefficient
*/ | Computes the lambda_0 factor according to Joseph and Spital | getLambda0 | {
"repo_name": "YixingHuang/CONRAD",
"path": "src/edu/stanford/rsl/conrad/filtering/VolumeAttenuationFactorCorrectionTool.java",
"license": "gpl-3.0",
"size": 4111
} | [
"edu.stanford.rsl.conrad.physics.Constants"
] | import edu.stanford.rsl.conrad.physics.Constants; | import edu.stanford.rsl.conrad.physics.*; | [
"edu.stanford.rsl"
] | edu.stanford.rsl; | 2,254,299 |
public ExtraLinkTimeLibraries build() {
List<ExtraLinkTimeLibrary> extraLibraries = Lists.newArrayList();
for (ExtraLinkTimeLibrary.Builder builder : libraries.values()) {
extraLibraries.add(builder.build());
}
return new ExtraLinkTimeLibraries(extraLibraries);
} | ExtraLinkTimeLibraries function() { List<ExtraLinkTimeLibrary> extraLibraries = Lists.newArrayList(); for (ExtraLinkTimeLibrary.Builder builder : libraries.values()) { extraLibraries.add(builder.build()); } return new ExtraLinkTimeLibraries(extraLibraries); } | /**
* Build a {@link ExtraLinkTimeLibraries} object.
*/ | Build a <code>ExtraLinkTimeLibraries</code> object | build | {
"repo_name": "dropbox/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/ExtraLinkTimeLibraries.java",
"license": "apache-2.0",
"size": 3443
} | [
"com.google.common.collect.Lists",
"java.util.List"
] | import com.google.common.collect.Lists; import java.util.List; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,692,754 |
void setProjectTaskListJPA(List<ProjectTask> projectTaskList) {
if ((this.projectTaskList == null)) {
this.projectTaskList = new NabuccoListImpl<ProjectTask>(NabuccoCollectionState.LAZY);
}
((NabuccoListImpl<ProjectTask>) this.projectTaskList).setDelegate(projectTaskList);
... | void setProjectTaskListJPA(List<ProjectTask> projectTaskList) { if ((this.projectTaskList == null)) { this.projectTaskList = new NabuccoListImpl<ProjectTask>(NabuccoCollectionState.LAZY); } ((NabuccoListImpl<ProjectTask>) this.projectTaskList).setDelegate(projectTaskList); } | /**
* Setter for the ProjectTaskListJPA.
*
* @param projectTaskList the List<ProjectTask>.
*/ | Setter for the ProjectTaskListJPA | setProjectTaskListJPA | {
"repo_name": "NABUCCO/org.nabucco.business.project",
"path": "org.nabucco.business.project.facade.datatype/src/main/gen/org/nabucco/business/project/facade/datatype/ProjectPosition.java",
"license": "epl-1.0",
"size": 17946
} | [
"java.util.List",
"org.nabucco.business.project.facade.datatype.ProjectTask",
"org.nabucco.framework.base.facade.datatype.collection.NabuccoCollectionState",
"org.nabucco.framework.base.facade.datatype.collection.NabuccoListImpl"
] | import java.util.List; import org.nabucco.business.project.facade.datatype.ProjectTask; import org.nabucco.framework.base.facade.datatype.collection.NabuccoCollectionState; import org.nabucco.framework.base.facade.datatype.collection.NabuccoListImpl; | import java.util.*; import org.nabucco.business.project.facade.datatype.*; import org.nabucco.framework.base.facade.datatype.collection.*; | [
"java.util",
"org.nabucco.business",
"org.nabucco.framework"
] | java.util; org.nabucco.business; org.nabucco.framework; | 1,001,993 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.