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 int allocateDO_PWM() { try { return DO_PWMGenerators[m_moduleNumber - 1].allocate(); } catch (CheckedAllocationException e) { throw new AllocationException( "No Digital Output PWM Generators on module " + m_moduleNumber + " remaining"); } }
int function() { try { return DO_PWMGenerators[m_moduleNumber - 1].allocate(); } catch (CheckedAllocationException e) { throw new AllocationException( STR + m_moduleNumber + STR); } }
/** * Allocate a DO PWM Generator. * Allocate PWM generators so that they are not accidently reused. */
Allocate a DO PWM Generator. Allocate PWM generators so that they are not accidently reused
allocateDO_PWM
{ "repo_name": "SkylineSpartabots/Kit-Bot-1", "path": "src/edu/wpi/first/wpilibj/KickBot1/templates/wpilib/DigitalModule.java", "license": "bsd-3-clause", "size": 16720 }
[ "edu.wpi.first.wpilibj.util.AllocationException", "edu.wpi.first.wpilibj.util.CheckedAllocationException" ]
import edu.wpi.first.wpilibj.util.AllocationException; import edu.wpi.first.wpilibj.util.CheckedAllocationException;
import edu.wpi.first.wpilibj.util.*;
[ "edu.wpi.first" ]
edu.wpi.first;
1,510,571
public int findLastCompletelyVisibleItemPosition() { final View child = findOneVisibleChild(layoutManager.getChildCount() - 1, -1, true, false); return child == null ? RecyclerView.NO_POSITION : recyclerView.getChildAdapterPosition(child); }
int function() { final View child = findOneVisibleChild(layoutManager.getChildCount() - 1, -1, true, false); return child == null ? RecyclerView.NO_POSITION : recyclerView.getChildAdapterPosition(child); }
/** * Returns the adapter position of the last fully visible view. This position does not include * adapter changes that were dispatched after the last layout pass. * * @return The adapter position of the last fully visible view or * {@link RecyclerView#NO_POSITION} if there aren't any visible items. ...
Returns the adapter position of the last fully visible view. This position does not include adapter changes that were dispatched after the last layout pass
findLastCompletelyVisibleItemPosition
{ "repo_name": "Aptoide/aptoide-client-v8", "path": "app/src/main/java/cm/aptoide/pt/view/recycler/RecyclerViewPositionHelper.java", "license": "gpl-3.0", "size": 4579 }
[ "android.view.View", "androidx.recyclerview.widget.RecyclerView" ]
import android.view.View; import androidx.recyclerview.widget.RecyclerView;
import android.view.*; import androidx.recyclerview.widget.*;
[ "android.view", "androidx.recyclerview" ]
android.view; androidx.recyclerview;
1,032,691
public static void closeQuietly(Socket sock){ try { if (sock!= null) { sock.close(); } } catch (IOException ignored) { // NOOP } }
static void function(Socket sock){ try { if (sock!= null) { sock.close(); } } catch (IOException ignored) { } }
/** * close a Socket with no error thrown * @param sock - Socket (may be null) */
close a Socket with no error thrown
closeQuietly
{ "repo_name": "aksivaram2k2/jmeter-trunk", "path": "src/jorphan/org/apache/jorphan/util/JOrphanUtils.java", "license": "apache-2.0", "size": 18915 }
[ "java.io.IOException", "java.net.Socket" ]
import java.io.IOException; import java.net.Socket;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
1,867,869
protected TPerson copyInto(TPerson copyObj, Connection con) throws TorqueException { return copyInto(copyObj, true, con); }
TPerson function(TPerson copyObj, Connection con) throws TorqueException { return copyInto(copyObj, true, con); }
/** * Fills the copyObj with the contents of this object using connection. * The associated objects are also copied and treated as new objects. * * @param copyObj the object to fill. * @param con the database connection to read associated objects. */
Fills the copyObj with the contents of this object using connection. The associated objects are also copied and treated as new objects
copyInto
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTPerson.java", "license": "gpl-3.0", "size": 1013508 }
[ "com.aurel.track.persist.TPerson", "java.sql.Connection", "org.apache.torque.TorqueException" ]
import com.aurel.track.persist.TPerson; import java.sql.Connection; import org.apache.torque.TorqueException;
import com.aurel.track.persist.*; import java.sql.*; import org.apache.torque.*;
[ "com.aurel.track", "java.sql", "org.apache.torque" ]
com.aurel.track; java.sql; org.apache.torque;
1,207,107
public ServiceFuture<Void> prepareNetworkPoliciesAsync(String resourceGroupName, String virtualNetworkName, String subnetName, PrepareNetworkPoliciesRequest prepareNetworkPoliciesRequestParameters, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(prepareNetworkPoliciesWithSer...
ServiceFuture<Void> function(String resourceGroupName, String virtualNetworkName, String subnetName, PrepareNetworkPoliciesRequest prepareNetworkPoliciesRequestParameters, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(prepareNetworkPoliciesWithServiceResponseAsync(resourceGroupName, v...
/** * Prepares a subnet by applying network intent policies. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @param prepareNetworkPoliciesRequestParameters Parameters sup...
Prepares a subnet by applying network intent policies
prepareNetworkPoliciesAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/network/v2020_03_01/implementation/SubnetsInner.java", "license": "mit", "size": 84300 }
[ "com.microsoft.azure.management.network.v2020_03_01.PrepareNetworkPoliciesRequest", "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.azure.management.network.v2020_03_01.PrepareNetworkPoliciesRequest; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.azure.management.network.v2020_03_01.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,286,736
public synchronized void open() throws IOException { open(defaultMaxIO, true); }
synchronized void function() throws IOException { open(defaultMaxIO, true); }
/** * this.maxIO represents the default maxIO. * Some operations while initializing files on the journal may require a different maxIO */
this.maxIO represents the default maxIO. Some operations while initializing files on the journal may require a different maxIO
open
{ "repo_name": "thiagokronig/activemq-artemis", "path": "artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/nio/NIOSequentialFile.java", "license": "apache-2.0", "size": 10183 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
448,253
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync( String resourceGroupName, String loadBalancerName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new Ill...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function( String resourceGroupName, String loadBalancerName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new Illegal...
/** * Deletes the specified load balancer. * * @param resourceGroupName The name of the resource group. * @param loadBalancerName The name of the load balancer. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the v...
Deletes the specified load balancer
deleteWithResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancersClientImpl.java", "license": "mit", "size": 67687 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "java.nio.ByteBuffer" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import java.nio.ByteBuffer;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import java.nio.*;
[ "com.azure.core", "java.nio" ]
com.azure.core; java.nio;
2,782,590
public Object buildObject(final IExpressionContext context, final String expressionObjectName);
Object function(final IExpressionContext context, final String expressionObjectName);
/** * <p> * Build the requested object. * </p> * * @param context the context being used for processing the template. * @param expressionObjectName the name of the expression object to be built. * @return the built object, or {@code null} if the object could not be built. */
Build the requested object.
buildObject
{ "repo_name": "thymeleaf/thymeleaf", "path": "src/main/java/org/thymeleaf/expression/IExpressionObjectFactory.java", "license": "apache-2.0", "size": 2907 }
[ "org.thymeleaf.context.IExpressionContext" ]
import org.thymeleaf.context.IExpressionContext;
import org.thymeleaf.context.*;
[ "org.thymeleaf.context" ]
org.thymeleaf.context;
1,744,617
public List<GraphNode<Tile, T>> findPathAvoidZones(GraphSearchPath<Tile, T> searchPath, Vector2f start, Vector2f destination, final List<Zone> zonesToAvoid) { GraphNode<Tile, T> startNode = getNearestNodeByWorld(start); GraphNode<Tile, T> destNode = getNearestNodeByWorld(dest...
List<GraphNode<Tile, T>> function(GraphSearchPath<Tile, T> searchPath, Vector2f start, Vector2f destination, final List<Zone> zonesToAvoid) { GraphNode<Tile, T> startNode = getNearestNodeByWorld(start); GraphNode<Tile, T> destNode = getNearestNodeByWorld(destination); List<GraphNode<Tile, T>> resultPath = searchPath.se...
/** * Finds a path, avoiding the supplied {@link Zone}s * * * @param start * @param destination * @param zonesToAvoid * @return the list of node to travel to reach the destination */
Finds a path, avoiding the supplied <code>Zone</code>s
findPathAvoidZones
{ "repo_name": "skaghzz/seventh", "path": "src/seventh/map/MapGraph.java", "license": "gpl-2.0", "size": 5450 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,749,043
public void roleUseTool(SessionKey userSessionKey, BceRoleUseTool tool) { BattleUser battleUser = this.battleUserMap.get(userSessionKey); if ( battleUser == null ) return; int slotId = tool.getSlot(); BuffToolIndex usedTool = BuffToolIndex.fromSlot(slotId); if ( usedTool == null ) { logger.debug("Invali...
void function(SessionKey userSessionKey, BceRoleUseTool tool) { BattleUser battleUser = this.battleUserMap.get(userSessionKey); if ( battleUser == null ) return; int slotId = tool.getSlot(); BuffToolIndex usedTool = BuffToolIndex.fromSlot(slotId); if ( usedTool == null ) { logger.debug(STR, slotId); } else { User user ...
/** * An user is using a extra buff or tool * @param userSessionKey * @param tool */
An user is using a extra buff or tool
roleUseTool
{ "repo_name": "wangqi/gameserver", "path": "server/src/main/java/com/xinqihd/sns/gameserver/battle/Battle.java", "license": "apache-2.0", "size": 88331 }
[ "com.xinqihd.sns.gameserver.GameContext", "com.xinqihd.sns.gameserver.db.UserManager", "com.xinqihd.sns.gameserver.db.mongo.TaskManager", "com.xinqihd.sns.gameserver.entity.user.User", "com.xinqihd.sns.gameserver.proto.XinqiBceRoleUseTool", "com.xinqihd.sns.gameserver.proto.XinqiBceUserRefresh", "com.xi...
import com.xinqihd.sns.gameserver.GameContext; import com.xinqihd.sns.gameserver.db.UserManager; import com.xinqihd.sns.gameserver.db.mongo.TaskManager; import com.xinqihd.sns.gameserver.entity.user.User; import com.xinqihd.sns.gameserver.proto.XinqiBceRoleUseTool; import com.xinqihd.sns.gameserver.proto.XinqiBceUserRe...
import com.xinqihd.sns.gameserver.*; import com.xinqihd.sns.gameserver.db.*; import com.xinqihd.sns.gameserver.db.mongo.*; import com.xinqihd.sns.gameserver.entity.user.*; import com.xinqihd.sns.gameserver.proto.*; import com.xinqihd.sns.gameserver.script.*; import com.xinqihd.sns.gameserver.session.*; import com.xinqi...
[ "com.xinqihd.sns", "java.util" ]
com.xinqihd.sns; java.util;
542,112
void enterPostDecrementExpression(@NotNull Java8Parser.PostDecrementExpressionContext ctx);
void enterPostDecrementExpression(@NotNull Java8Parser.PostDecrementExpressionContext ctx);
/** * Enter a parse tree produced by {@link Java8Parser#postDecrementExpression}. * * @param ctx the parse tree */
Enter a parse tree produced by <code>Java8Parser#postDecrementExpression</code>
enterPostDecrementExpression
{ "repo_name": "BigDaddy-Germany/WHOAMI", "path": "WHOAMI/src/de/aima13/whoami/modules/syntaxcheck/languages/antlrgen/Java8Listener.java", "license": "mit", "size": 97945 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
100,548
public void mouseReleased(MouseEvent e) { ; }
void function(MouseEvent e) { ; }
/** * DOCUMENT ME! * * @param e DOCUMENT ME! */
DOCUMENT ME
mouseReleased
{ "repo_name": "jdmonin/JSettlers2", "path": "src/main/java/soc/client/ColorSquare.java", "license": "gpl-3.0", "size": 41824 }
[ "java.awt.event.MouseEvent" ]
import java.awt.event.MouseEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
2,110,517
public void mediaChanged(MediaItem mediaItem);
void function(MediaItem mediaItem);
/** * Used to notify listeners of a change in the underlying media. * @param mediaItem - The MediaItem corresponding to media that changed. */
Used to notify listeners of a change in the underlying media
mediaChanged
{ "repo_name": "h6w/flywire", "path": "src/org/bentokit/flywire/event/MediaListener.java", "license": "gpl-3.0", "size": 2013 }
[ "org.bentokit.flywire.media.MediaItem" ]
import org.bentokit.flywire.media.MediaItem;
import org.bentokit.flywire.media.*;
[ "org.bentokit.flywire" ]
org.bentokit.flywire;
2,645,805
public void setClassLoader(File[] files) { URL[] urls = new URL[files.length+1]; try { urls[0] = new File(projet, "class").toURI().toURL(); for (int i = 0 ; i < files.length ; i++) urls[i+1] = files[i].toURI().toURL(); classLoader = URLClassLoader.newInstance(urls); } catch (MalformedURLException e) { ...
void function(File[] files) { URL[] urls = new URL[files.length+1]; try { urls[0] = new File(projet, "class").toURI().toURL(); for (int i = 0 ; i < files.length ; i++) urls[i+1] = files[i].toURI().toURL(); classLoader = URLClassLoader.newInstance(urls); } catch (MalformedURLException e) { e.printStackTrace(); } }
/** * Set the classLoader of the projet with all files + classes of the project * @param files directory or jarfile which contains classes */
Set the classLoader of the projet with all files + classes of the project
setClassLoader
{ "repo_name": "cybemos/Gestion_Projet_JAVA", "path": "src/projet/datas/Projet.java", "license": "gpl-2.0", "size": 15175 }
[ "java.io.File", "java.net.MalformedURLException", "java.net.URLClassLoader" ]
import java.io.File; import java.net.MalformedURLException; import java.net.URLClassLoader;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
2,344,947
public void menuAboutToShow(IMenuManager menuManager) { menuManager.add(new Separator("edit")); // Add the edit menu actions. if (addPackageAction.isEnabled()) { menuManager.add(new ActionContributionItem(addPackageAction)); menuManager.add(new Separator()); } menuManager.add(new ActionContributi...
void function(IMenuManager menuManager) { menuManager.add(new Separator("edit")); if (addPackageAction.isEnabled()) { menuManager.add(new ActionContributionItem(addPackageAction)); menuManager.add(new Separator()); } menuManager.add(new ActionContributionItem(undoAction)); menuManager.add(new ActionContributionItem(red...
/** * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu. */
This implements <code>org.eclipse.jface.action.IMenuListener</code> to help fill the context menus with contributions from the Edit menu
menuAboutToShow
{ "repo_name": "parraman/micobs", "path": "common/es.uah.aut.srg.micobs/src/es/uah/aut/srg/micobs/library/ui/MICOBSLibraryEditorActionBarContributor.java", "license": "epl-1.0", "size": 16081 }
[ "org.eclipse.jface.action.ActionContributionItem", "org.eclipse.jface.action.IMenuManager", "org.eclipse.jface.action.Separator" ]
import org.eclipse.jface.action.ActionContributionItem; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.Separator;
import org.eclipse.jface.action.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
1,937,223
public void addFolder(TreeItem actualItem, TreeItem newItem) { int i = 0; boolean found = false; int count = actualItem.getChildCount(); GWTFolder folder; GWTFolder newFolder = (GWTFolder) newItem.getUserObject(); String folderPath = newFolder.getPath(); for (i = 0; i < count; i++) { folder = (GWTF...
void function(TreeItem actualItem, TreeItem newItem) { int i = 0; boolean found = false; int count = actualItem.getChildCount(); GWTFolder folder; GWTFolder newFolder = (GWTFolder) newItem.getUserObject(); String folderPath = newFolder.getPath(); for (i = 0; i < count; i++) { folder = (GWTFolder) actualItem.getChild(i)...
/** * Adds folders to actual item if not exists or refreshes it values * * @param actualItem The actual item active * @param newItem New item to be added, or refreshed */
Adds folders to actual item if not exists or refreshes it values
addFolder
{ "repo_name": "Beau-M/document-management-system", "path": "src/main/java/com/openkm/frontend/client/widget/foldertree/FolderSelectTree.java", "license": "gpl-2.0", "size": 15774 }
[ "com.google.gwt.user.client.ui.TreeItem", "com.openkm.frontend.client.bean.GWTFolder" ]
import com.google.gwt.user.client.ui.TreeItem; import com.openkm.frontend.client.bean.GWTFolder;
import com.google.gwt.user.client.ui.*; import com.openkm.frontend.client.bean.*;
[ "com.google.gwt", "com.openkm.frontend" ]
com.google.gwt; com.openkm.frontend;
2,586,339
public void setApiKeyPrefix(String apiKeyPrefix) { for (Authentication auth : authentications.values()) { if (auth instanceof ApiKeyAuth) { ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); return; } } throw new RuntimeException("No AP...
void function(String apiKeyPrefix) { for (Authentication auth : authentications.values()) { if (auth instanceof ApiKeyAuth) { ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); return; } } throw new RuntimeException(STR); }
/** * Helper method to set API key prefix for the first API key authentication. * * @param apiKeyPrefix API key prefix */
Helper method to set API key prefix for the first API key authentication
setApiKeyPrefix
{ "repo_name": "ScsApiTribe/payments-api-java-sdk", "path": "src/main/java/com/swisscom/api/sdk/payments/ApiClient.java", "license": "apache-2.0", "size": 46277 }
[ "com.swisscom.api.sdk.payments.auth.ApiKeyAuth", "com.swisscom.api.sdk.payments.auth.Authentication" ]
import com.swisscom.api.sdk.payments.auth.ApiKeyAuth; import com.swisscom.api.sdk.payments.auth.Authentication;
import com.swisscom.api.sdk.payments.auth.*;
[ "com.swisscom.api" ]
com.swisscom.api;
65,252
public static void setAgent(State s, int x, int y){ ObjectInstance o = s.getObjectsOfTrueClass(CLASSAGENT).get(0); o.setValue(ATTX, x); o.setValue(ATTY, y); }
static void function(State s, int x, int y){ ObjectInstance o = s.getObjectsOfTrueClass(CLASSAGENT).get(0); o.setValue(ATTX, x); o.setValue(ATTY, y); }
/** * Sets the first agent object in s to the specified x and y position. * @param s the state with the agent whose position to set * @param x the x position of the agent * @param y the y position of the agent */
Sets the first agent object in s to the specified x and y position
setAgent
{ "repo_name": "jmacglashan/affordances_code", "path": "src/burlap/domain/singleagent/gridworld/GridWorldDomain.java", "license": "lgpl-3.0", "size": 28689 }
[ "burlap.oomdp.core.ObjectInstance", "burlap.oomdp.core.State" ]
import burlap.oomdp.core.ObjectInstance; import burlap.oomdp.core.State;
import burlap.oomdp.core.*;
[ "burlap.oomdp.core" ]
burlap.oomdp.core;
512,028
public Map<MultiChunkId, MultiChunkEntry> getMultiChunks(VectorClock vectorClock) { try (PreparedStatement preparedStatement = getStatement("multichunk.select.all.getMultiChunksWithChunksForDatabaseVersion.sql")) { preparedStatement.setString(1, vectorClock.toString()); try (ResultSet resultSet = preparedSt...
Map<MultiChunkId, MultiChunkEntry> function(VectorClock vectorClock) { try (PreparedStatement preparedStatement = getStatement(STR)) { preparedStatement.setString(1, vectorClock.toString()); try (ResultSet resultSet = preparedStatement.executeQuery()) { return createMultiChunkEntriesWithChunks(resultSet); } } catch (SQ...
/** * Note: This method selects also {@link DatabaseVersionStatus#DIRTY DIRTY}. */
Note: This method selects also <code>DatabaseVersionStatus#DIRTY DIRTY</code>
getMultiChunks
{ "repo_name": "syncany/syncany-plugin-dropbox", "path": "core/syncany-lib/src/main/java/org/syncany/database/dao/MultiChunkSqlDao.java", "license": "gpl-3.0", "size": 11974 }
[ "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "java.util.Map", "org.syncany.database.MultiChunkEntry", "org.syncany.database.VectorClock" ]
import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Map; import org.syncany.database.MultiChunkEntry; import org.syncany.database.VectorClock;
import java.sql.*; import java.util.*; import org.syncany.database.*;
[ "java.sql", "java.util", "org.syncany.database" ]
java.sql; java.util; org.syncany.database;
132,099
public SectionFacade getSection(Long secId, String agentId) { SectionFacade section = null; try { section = PersistenceService.getInstance().getSectionFacadeQueries().get(secId); } catch(Exception e) { log.error(e.getMessage(), e); throw new RuntimeException(e); } ...
SectionFacade function(Long secId, String agentId) { SectionFacade section = null; try { section = PersistenceService.getInstance().getSectionFacadeQueries().get(secId); } catch(Exception e) { log.error(e.getMessage(), e); throw new RuntimeException(e); } return section; }
/** * Get a particular item from the backend, with all questions. */
Get a particular item from the backend, with all questions
getSection
{ "repo_name": "zqian/sakai", "path": "samigo/samigo-services/src/java/org/sakaiproject/tool/assessment/services/SectionService.java", "license": "apache-2.0", "size": 1804 }
[ "org.sakaiproject.tool.assessment.facade.SectionFacade" ]
import org.sakaiproject.tool.assessment.facade.SectionFacade;
import org.sakaiproject.tool.assessment.facade.*;
[ "org.sakaiproject.tool" ]
org.sakaiproject.tool;
2,096,458
private void createProject(String projectName) { JavaProjectWizard dialog = new JavaProjectWizard(); dialog.open(); new NewJavaProjectWizardPageOne(dialog).setProjectName(projectName); dialog.finish(); }
void function(String projectName) { JavaProjectWizard dialog = new JavaProjectWizard(); dialog.open(); new NewJavaProjectWizardPageOne(dialog).setProjectName(projectName); dialog.finish(); }
/** * Create project with given name * @param projectName */
Create project with given name
createProject
{ "repo_name": "jboss-reddeer/reddeer", "path": "tests/org.eclipse.reddeer.eclipse.test/src/org/eclipse/reddeer/eclipse/test/ui/views/ResourceNavigatorTest.java", "license": "epl-1.0", "size": 3723 }
[ "org.eclipse.reddeer.eclipse.jdt.ui.wizards.JavaProjectWizard", "org.eclipse.reddeer.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageOne" ]
import org.eclipse.reddeer.eclipse.jdt.ui.wizards.JavaProjectWizard; import org.eclipse.reddeer.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageOne;
import org.eclipse.reddeer.eclipse.jdt.ui.wizards.*;
[ "org.eclipse.reddeer" ]
org.eclipse.reddeer;
1,386,755
List<QueryContext> findFailedChildren(QueryContext parent);
List<QueryContext> findFailedChildren(QueryContext parent);
/** * Find all {@link QueryContext}s in {@link QueryState#FAILED} whose parent is the * passed argument. * * @param parent * the parent QueryContext * @return all completed children */
Find all <code>QueryContext</code>s in <code>QueryState#FAILED</code> whose parent is the passed argument
findFailedChildren
{ "repo_name": "openfurther/further-open-core", "path": "fqe/fqe-api/src/main/java/edu/utah/further/fqe/api/service/query/QueryContextService.java", "license": "apache-2.0", "size": 6557 }
[ "edu.utah.further.fqe.ds.api.domain.QueryContext", "java.util.List" ]
import edu.utah.further.fqe.ds.api.domain.QueryContext; import java.util.List;
import edu.utah.further.fqe.ds.api.domain.*; import java.util.*;
[ "edu.utah.further", "java.util" ]
edu.utah.further; java.util;
595,405
private void sendPreface(ChannelHandlerContext ctx) { if (prefaceSent || !ctx.channel().isActive()) { return; } prefaceSent = true; if (!connection().isServer()) { // Clients must send the preface string as the first bytes on the ...
void function(ChannelHandlerContext ctx) { if (prefaceSent !ctx.channel().isActive()) { return; } prefaceSent = true; if (!connection().isServer()) { ctx.write(connectionPrefaceBuf()).addListener(ChannelFutureListener.CLOSE_ON_FAILURE); } encoder.writeSettings(ctx, initialSettings, ctx.newPromise()).addListener( Channe...
/** * Sends the HTTP/2 connection preface upon establishment of the connection, if not already sent. */
Sends the HTTP/2 connection preface upon establishment of the connection, if not already sent
sendPreface
{ "repo_name": "castomer/netty", "path": "codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java", "license": "apache-2.0", "size": 37466 }
[ "io.netty.channel.ChannelFutureListener", "io.netty.channel.ChannelHandlerContext" ]
import io.netty.channel.ChannelFutureListener; import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.*;
[ "io.netty.channel" ]
io.netty.channel;
1,352,276
CamelEvent createCamelContextSuspendedEvent(CamelContext context);
CamelEvent createCamelContextSuspendedEvent(CamelContext context);
/** * Creates an {@link CamelEvent} for Camel has been suspended successfully. * * @param context camel context * @return the created event */
Creates an <code>CamelEvent</code> for Camel has been suspended successfully
createCamelContextSuspendedEvent
{ "repo_name": "adessaigne/camel", "path": "core/camel-api/src/main/java/org/apache/camel/spi/EventFactory.java", "license": "apache-2.0", "size": 11875 }
[ "org.apache.camel.CamelContext" ]
import org.apache.camel.CamelContext;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
1,653,541
static boolean removeAllImpl( Multiset<?> self, Collection<?> elementsToRemove) { Collection<?> collection = (elementsToRemove instanceof Multiset) ? ((Multiset<?>) elementsToRemove).elementSet() : elementsToRemove; return self.elementSet().removeAll(collection); }
static boolean removeAllImpl( Multiset<?> self, Collection<?> elementsToRemove) { Collection<?> collection = (elementsToRemove instanceof Multiset) ? ((Multiset<?>) elementsToRemove).elementSet() : elementsToRemove; return self.elementSet().removeAll(collection); }
/** * An implementation of {@link Multiset#removeAll}. */
An implementation of <code>Multiset#removeAll</code>
removeAllImpl
{ "repo_name": "user234/setyon-guava-libraries-clone", "path": "guava/src/com/google/common/collect/Multisets.java", "license": "apache-2.0", "size": 37074 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,338,428
public void test020DisconnectCnf3() { printDebugLog("[API:test20DisconnectCnf3]: run testDisconnectInd"); String jniLogs[] = { "Req;0;false;initServiceNative;1;0", "Req;0;false;serverActivateReqNative;void;0", "Cb;1;true;callback_pan_handle_activate_cn...
void function() { printDebugLog(STR); String jniLogs[] = { STR, STR, STR, STR, STR, STR, STR, STR }; ArrayList<String> checkLog = new ArrayList<String>(); checkLog.add("true"); checkLog.add("1:0"); checkLog.add("2:0"); checkLog.add("false"); mJniManager.setCaseLog(jniLogs, ";"); mJniManager.setCleanUpInterface(this); i...
/** * Test disconnect_cnf callback. * The disconnect_cnf first param is false * The BluetoothDevice is not null * The PAN role is NAP */
Test disconnect_cnf callback. The disconnect_cnf first param is false The BluetoothDevice is not null The PAN role is NAP
test020DisconnectCnf3
{ "repo_name": "rex-xxx/mt6572_x201", "path": "mediatek/packages/apps/Bluetooth/tests/profiles/pan/src/com/mediatek/bluetooth/pan/PanServiceTestCase.java", "license": "gpl-2.0", "size": 69799 }
[ "android.bluetooth.IBluetoothPan", "android.os.IBinder", "java.util.ArrayList", "junit.framework.Assert" ]
import android.bluetooth.IBluetoothPan; import android.os.IBinder; import java.util.ArrayList; import junit.framework.Assert;
import android.bluetooth.*; import android.os.*; import java.util.*; import junit.framework.*;
[ "android.bluetooth", "android.os", "java.util", "junit.framework" ]
android.bluetooth; android.os; java.util; junit.framework;
2,607,212
if (properties != null && !properties.isEmpty()) { BeanWrapper beanWrapper = PropertyAccessorFactory.forBeanPropertyAccess(instance); // configure bean wrapper (using method from Spring 2.5.6) if (beanFactory != null) { beanFactory.copyRegisteredEditorsTo(beanWrapper); } for (Iterator<?> iter...
if (properties != null && !properties.isEmpty()) { BeanWrapper beanWrapper = PropertyAccessorFactory.forBeanPropertyAccess(instance); if (beanFactory != null) { beanFactory.copyRegisteredEditorsTo(beanWrapper); } for (Iterator<?> iterator = properties.entrySet().iterator(); iterator.hasNext();) { Map.Entry<String, ?> e...
/** * Injects the properties from the given Map to the given object. * Additionally, a bean factory can be passed in for copying property * editors inside the injector. * * @param instance bean instance to configure * @param properties * @param beanFactory */
Injects the properties from the given Map to the given object. Additionally, a bean factory can be passed in for copying property editors inside the injector
applyMapOntoInstance
{ "repo_name": "mscg82/spring-dm", "path": "core/src/main/java/org/springframework/osgi/compendium/internal/cm/CMUtils.java", "license": "apache-2.0", "size": 4528 }
[ "java.util.Iterator", "java.util.Map", "org.springframework.beans.BeanWrapper", "org.springframework.beans.PropertyAccessorFactory" ]
import java.util.Iterator; import java.util.Map; import org.springframework.beans.BeanWrapper; import org.springframework.beans.PropertyAccessorFactory;
import java.util.*; import org.springframework.beans.*;
[ "java.util", "org.springframework.beans" ]
java.util; org.springframework.beans;
1,711,426
public static ComplexNumber[][] outerProduct(Qubit q1, Qubit q2) { return calculateOuterProduct(q1.getQubit(), q2.getQubit()); }
static ComplexNumber[][] function(Qubit q1, Qubit q2) { return calculateOuterProduct(q1.getQubit(), q2.getQubit()); }
/** * Performs the outer product of two qubits |q1><q2| * * @param q1 first qubit * @param q2 second qubit * @return ComplexNumber the outer product of the two qubits. */
Performs the outer product of two qubits |q1><q2|
outerProduct
{ "repo_name": "ardeleanasm/quantum_computing", "path": "quantum/src/main/java/com/ars/quantum/utils/QuantumOperations.java", "license": "gpl-3.0", "size": 5212 }
[ "com.ars.complexnumbers.ComplexNumber", "com.ars.qubits.Qubit" ]
import com.ars.complexnumbers.ComplexNumber; import com.ars.qubits.Qubit;
import com.ars.complexnumbers.*; import com.ars.qubits.*;
[ "com.ars.complexnumbers", "com.ars.qubits" ]
com.ars.complexnumbers; com.ars.qubits;
1,188,828
public void setResponseEntityList(Vector responseEntityList) { this.responseEntityList = responseEntityList; }
void function(Vector responseEntityList) { this.responseEntityList = responseEntityList; }
/** * Sets the new value for responseEntityList. * * @param responseEntityList * The new value for responseEntityList */
Sets the new value for responseEntityList
setResponseEntityList
{ "repo_name": "fraunhoferfokus/fokus-upnp", "path": "upnp-core/src/main/java/de/fraunhofer/fokus/lsf/core/device/BinaryDeviceMessageParserResult.java", "license": "gpl-3.0", "size": 5629 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,332,058
@Test public void aConverterBindingCanBeCreated() { assertThat(cut, instanceOf(ConverterBinding.class)); assertSame(x, getParent(cut).get()); }
void function() { assertThat(cut, instanceOf(ConverterBinding.class)); assertSame(x, getParent(cut).get()); }
/** * Providing a {@link javafx.beans.value.ObservableValue} allows for a {@link ConverterBinding} to be created. */
Providing a <code>javafx.beans.value.ObservableValue</code> allows for a <code>ConverterBinding</code> to be created
aConverterBindingCanBeCreated
{ "repo_name": "Xyanid/bindableFX", "path": "src/test/java/de/saxsys/bindablefx/ConverterBindingTest.java", "license": "apache-2.0", "size": 2978 }
[ "de.saxsys.bindablefx.TestUtil", "org.hamcrest.core.IsInstanceOf", "org.junit.Assert" ]
import de.saxsys.bindablefx.TestUtil; import org.hamcrest.core.IsInstanceOf; import org.junit.Assert;
import de.saxsys.bindablefx.*; import org.hamcrest.core.*; import org.junit.*;
[ "de.saxsys.bindablefx", "org.hamcrest.core", "org.junit" ]
de.saxsys.bindablefx; org.hamcrest.core; org.junit;
1,795,023
public String validate(Source source) { try { final StringWriter writer = new StringWriter(); templates.newTransformer().transform(source, new StreamResult(writer)); return writer.toString(); } catch (TransformerException e) { logger.error(e.getMessage...
String function(Source source) { try { final StringWriter writer = new StringWriter(); templates.newTransformer().transform(source, new StreamResult(writer)); return writer.toString(); } catch (TransformerException e) { logger.error(e.getMessage()); throw new SchematronValidationException(STR, e); } }
/** * Validates the given XML for given Rules. * * @param source * @return */
Validates the given XML for given Rules
validate
{ "repo_name": "apache/camel", "path": "components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/SchematronProcessor.java", "license": "apache-2.0", "size": 2852 }
[ "java.io.StringWriter", "javax.xml.transform.Source", "javax.xml.transform.TransformerException", "javax.xml.transform.stream.StreamResult", "org.apache.camel.component.schematron.exception.SchematronValidationException" ]
import java.io.StringWriter; import javax.xml.transform.Source; import javax.xml.transform.TransformerException; import javax.xml.transform.stream.StreamResult; import org.apache.camel.component.schematron.exception.SchematronValidationException;
import java.io.*; import javax.xml.transform.*; import javax.xml.transform.stream.*; import org.apache.camel.component.schematron.exception.*;
[ "java.io", "javax.xml", "org.apache.camel" ]
java.io; javax.xml; org.apache.camel;
2,433,776
public static void setMinInputSplitSize(Job job, long size) { job.getConfiguration().setLong(SPLIT_MINSIZE, size); }
static void function(Job job, long size) { job.getConfiguration().setLong(SPLIT_MINSIZE, size); }
/** * Set the minimum input split size * @param job the job to modify * @param size the minimum size */
Set the minimum input split size
setMinInputSplitSize
{ "repo_name": "jayantgolhar/Hadoop-0.21.0", "path": "mapred/src/java/org/apache/hadoop/mapreduce/lib/input/FileInputFormat.java", "license": "apache-2.0", "size": 16197 }
[ "org.apache.hadoop.mapreduce.Job" ]
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,566,176
public void setPortTypeEditorLinkPersistence( PortTypeEditorLinkPersistence portTypeEditorLinkPersistence) { this.portTypeEditorLinkPersistence = portTypeEditorLinkPersistence; }
void function( PortTypeEditorLinkPersistence portTypeEditorLinkPersistence) { this.portTypeEditorLinkPersistence = portTypeEditorLinkPersistence; }
/** * Sets the port type editor link persistence. * * @param portTypeEditorLinkPersistence the port type editor link persistence */
Sets the port type editor link persistence
setPortTypeEditorLinkPersistence
{ "repo_name": "queza85/edison", "path": "edison-portal-framework/edison-appstore-2016-portlet/docroot/WEB-INF/src/org/kisti/edison/science/service/base/DeveloperInfoServiceBaseImpl.java", "license": "gpl-3.0", "size": 52493 }
[ "org.kisti.edison.science.service.persistence.PortTypeEditorLinkPersistence" ]
import org.kisti.edison.science.service.persistence.PortTypeEditorLinkPersistence;
import org.kisti.edison.science.service.persistence.*;
[ "org.kisti.edison" ]
org.kisti.edison;
1,968,326
public NagiosConfiguration copy() { try { NagiosConfiguration copy = (NagiosConfiguration) clone(); return copy; } catch (CloneNotSupportedException e) { throw new RuntimeCamelException(e); } }
NagiosConfiguration function() { try { NagiosConfiguration copy = (NagiosConfiguration) clone(); return copy; } catch (CloneNotSupportedException e) { throw new RuntimeCamelException(e); } }
/** * Returns a copy of this configuration */
Returns a copy of this configuration
copy
{ "repo_name": "CodeSmell/camel", "path": "components/camel-nagios/src/main/java/org/apache/camel/component/nagios/NagiosConfiguration.java", "license": "apache-2.0", "size": 4572 }
[ "org.apache.camel.RuntimeCamelException" ]
import org.apache.camel.RuntimeCamelException;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
2,722,596
public RafTaskInstance mergeRafTaskInstance(RafTaskInstance rafTaskInstance);
RafTaskInstance function(RafTaskInstance rafTaskInstance);
/** * mergeRafTaskInstance - merges a RafTaskInstance * * @param rafTaskInstance * @return the merged RafTaskInstance */
mergeRafTaskInstance - merges a RafTaskInstance
mergeRafTaskInstance
{ "repo_name": "yauritux/venice-legacy", "path": "Venice/Venice-Interface-Model/src/main/java/com/gdn/venice/facade/RafTaskInstanceSessionEJBRemote.java", "license": "apache-2.0", "size": 2594 }
[ "com.gdn.venice.persistence.RafTaskInstance" ]
import com.gdn.venice.persistence.RafTaskInstance;
import com.gdn.venice.persistence.*;
[ "com.gdn.venice" ]
com.gdn.venice;
2,836,888
protected ExtensionDescriptor[] buildExtensions() { Method[] m = getClass().getMethods(); ExtensionDescriptor[] desc = new ExtensionDescriptor[m.length]; for (int i=0; i<m.length; i++) { Class<?>[] c = m[i].getParameterTypes(); int[] types = new int[c.length]; for (int j=0; j<c.length; j...
ExtensionDescriptor[] function() { Method[] m = getClass().getMethods(); ExtensionDescriptor[] desc = new ExtensionDescriptor[m.length]; for (int i=0; i<m.length; i++) { Class<?>[] c = m[i].getParameterTypes(); int[] types = new int[c.length]; for (int j=0; j<c.length; j++) { if (c[j] == String.class) types[j] = ARG_ST...
/** * Builds the list of extensions, using reflection, * from public methods of this class. */
Builds the list of extensions, using reflection, from public methods of this class
buildExtensions
{ "repo_name": "ctrueden/bioformats", "path": "components/bio-formats-plugins/src/loci/plugins/macro/MacroFunctions.java", "license": "gpl-2.0", "size": 4160 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,687,781
public static Type newType(AST ast, VariableDeclaration declaration) { return newType(ast, declaration, null, null); }
static Type function(AST ast, VariableDeclaration declaration) { return newType(ast, declaration, null, null); }
/** * Returns the new type node corresponding to the type of the given declaration * including the extra dimensions. * @param ast The AST to create the resulting type with. * @param declaration The variable declaration to get the type from * @return a new type node created with the given AST. */
Returns the new type node corresponding to the type of the given declaration including the extra dimensions
newType
{ "repo_name": "eclipse/flux", "path": "org.eclipse.flux.jdt.service/jdt ui/org/eclipse/jdt/internal/corext/dom/ASTNodeFactory.java", "license": "bsd-3-clause", "size": 15939 }
[ "org.eclipse.jdt.core.dom.Type", "org.eclipse.jdt.core.dom.VariableDeclaration" ]
import org.eclipse.jdt.core.dom.Type; import org.eclipse.jdt.core.dom.VariableDeclaration;
import org.eclipse.jdt.core.dom.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
2,431,086
public AtCommandResult handleTestCommand() { return new AtCommandResult(AtCommandResult.OK); }
AtCommandResult function() { return new AtCommandResult(AtCommandResult.OK); }
/** * Handle Test command "AT+FOO=?".<p> * Test commands are part of the Extended command syntax, and are typically * used to request an indication of the range of legal values that "FOO" * can take.<p> * By default we return an OK result, to indicate that this command is at * least recogn...
Handle Test command "AT+FOO=?". Test commands are part of the Extended command syntax, and are typically used to request an indication of the range of legal values that "FOO" can take. By default we return an OK result, to indicate that this command is at least recognized
handleTestCommand
{ "repo_name": "rex-xxx/mt6572_x201", "path": "mediatek/frameworks-ext/base/core/java/android/bluetooth/AtCommandHandler.java", "license": "gpl-2.0", "size": 3441 }
[ "android.bluetooth.AtCommandResult" ]
import android.bluetooth.AtCommandResult;
import android.bluetooth.*;
[ "android.bluetooth" ]
android.bluetooth;
182,423
protected void checkModifyProjectGroupAuthorization( String resource ) throws AuthorizationRequiredException { checkAuthorization( ContinuumRoleConstants.CONTINUUM_MODIFY_GROUP_OPERATION, resource ); }
void function( String resource ) throws AuthorizationRequiredException { checkAuthorization( ContinuumRoleConstants.CONTINUUM_MODIFY_GROUP_OPERATION, resource ); }
/** * Check if the current user is authorized to modify the specified project group * * @param resource the operation resource * @throws AuthorizationRequiredException if the user isn't authorized if the user isn't authorized */
Check if the current user is authorized to modify the specified project group
checkModifyProjectGroupAuthorization
{ "repo_name": "apache/continuum", "path": "continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java", "license": "apache-2.0", "size": 21240 }
[ "org.apache.maven.continuum.security.ContinuumRoleConstants", "org.apache.maven.continuum.web.exception.AuthorizationRequiredException" ]
import org.apache.maven.continuum.security.ContinuumRoleConstants; import org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
import org.apache.maven.continuum.security.*; import org.apache.maven.continuum.web.exception.*;
[ "org.apache.maven" ]
org.apache.maven;
1,552,914
public static ActionConfig imports(Configurer configurer) { Check.notNull(configurer); return imports(configurer.getRoot()); }
static ActionConfig function(Configurer configurer) { Check.notNull(configurer); return imports(configurer.getRoot()); }
/** * Import the action data from setup. * * @param configurer The configurer reference (must not be <code>null</code>). * @return The action data. * @throws LionEngineException If unable to read node. */
Import the action data from setup
imports
{ "repo_name": "b3dgs/lionengine", "path": "lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/ActionConfig.java", "license": "gpl-3.0", "size": 8222 }
[ "com.b3dgs.lionengine.Check", "com.b3dgs.lionengine.game.Configurer" ]
import com.b3dgs.lionengine.Check; import com.b3dgs.lionengine.game.Configurer;
import com.b3dgs.lionengine.*; import com.b3dgs.lionengine.game.*;
[ "com.b3dgs.lionengine" ]
com.b3dgs.lionengine;
1,839,993
EEnum getGroupRule();
EEnum getGroupRule();
/** * Returns the meta object for enum '{@link com.b2international.snowowl.snomed.mrcm.GroupRule <em>Group Rule</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for enum '<em>Group Rule</em>'. * @see com.b2international.snowowl.snomed.mrcm.GroupRule * @generated */
Returns the meta object for enum '<code>com.b2international.snowowl.snomed.mrcm.GroupRule Group Rule</code>'.
getGroupRule
{ "repo_name": "IHTSDO/snow-owl", "path": "snomed/com.b2international.snowowl.snomed.mrcm.model/src/com/b2international/snowowl/snomed/mrcm/MrcmPackage.java", "license": "apache-2.0", "size": 82769 }
[ "org.eclipse.emf.ecore.EEnum" ]
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,566,723
public List<Integer> getTopLevelTlvList ();
List<Integer> function ();
/** * Method getTopLevelTlvList. * @return List<Integer> */
Method getTopLevelTlvList
getTopLevelTlvList
{ "repo_name": "Comcast/Oscar", "path": "src/com/comcast/oscar/tlv/TlvBuild.java", "license": "apache-2.0", "size": 2018 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
713,795
public void killAll(boolean close) { if (mConfiguration.mRestrictedMode){ return; } final ActivityManager am = (ActivityManager) mContext .getSystemService(Context.ACTIVITY_SERVICE); if (mLoadedTasks.size() == 0) { if(close){ h...
void function(boolean close) { if (mConfiguration.mRestrictedMode){ return; } final ActivityManager am = (ActivityManager) mContext .getSystemService(Context.ACTIVITY_SERVICE); if (mLoadedTasks.size() == 0) { if(close){ hide(true); } return; } Iterator<TaskDescription> nextTask = mLoadedTasks.iterator(); while (nextTas...
/** * killall will always remove all tasks - also those that are * filtered out (not active) * @param close */
killall will always remove all tasks - also those that are filtered out (not active)
killAll
{ "repo_name": "AICP/packages_apps_OmniSwitch", "path": "src/org/omnirom/omniswitch/SwitchManager.java", "license": "gpl-3.0", "size": 19537 }
[ "android.app.ActivityManager", "android.content.Context", "android.util.Log", "java.util.Iterator" ]
import android.app.ActivityManager; import android.content.Context; import android.util.Log; import java.util.Iterator;
import android.app.*; import android.content.*; import android.util.*; import java.util.*;
[ "android.app", "android.content", "android.util", "java.util" ]
android.app; android.content; android.util; java.util;
698,092
@Override public void printMemoryStats() { X.println(">>> "); X.println(">>> Transaction manager memory stats [igniteInstanceName=" + cctx.igniteInstanceName() + ']'); X.println(">>> threadMapSize: " + threadMap.size()); X.println(">>> idMap [size=" + idMap.size() + ']'); ...
@Override void function() { X.println(STR); X.println(STR + cctx.igniteInstanceName() + ']'); X.println(STR + threadMap.size()); X.println(STR + idMap.size() + ']'); X.println(STR + completedVersSorted.size()); X.println(STR + completedVersHashMap.sizex()); }
/** * Prints out memory stats to standard out. * <p> * USE ONLY FOR MEMORY PROFILING DURING TESTS. */
Prints out memory stats to standard out. USE ONLY FOR MEMORY PROFILING DURING TESTS
printMemoryStats
{ "repo_name": "pperalta/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java", "license": "apache-2.0", "size": 89721 }
[ "org.apache.ignite.internal.util.typedef.X" ]
import org.apache.ignite.internal.util.typedef.X;
import org.apache.ignite.internal.util.typedef.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,457,595
public static MozuClient deleteAttributeVocabularyValueLocalizedContentClient(String attributeFQN, String value, String localeCode) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.attributedefinition.attributes.AttributeVocabularyValueUrl.deleteAttributeVocabularyValueLocalizedContentUrl...
static MozuClient function(String attributeFQN, String value, String localeCode) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.attributedefinition.attributes.AttributeVocabularyValueUrl.deleteAttributeVocabularyValueLocalizedContentUrl(attributeFQN, localeCode, value); String verb = STR; Moz...
/** * Removes localized content for a vocabulary value attribute. * <p><pre><code> * MozuClient mozuClient=DeleteAttributeVocabularyValueLocalizedContentClient( attributeFQN, value, localeCode); * client.setBaseAddress(url); * client.executeRequest(); * </code></pre></p> * @param attributeFQN Fully qua...
Removes localized content for a vocabulary value attribute. <code><code> MozuClient mozuClient=DeleteAttributeVocabularyValueLocalizedContentClient( attributeFQN, value, localeCode); client.setBaseAddress(url); client.executeRequest(); </code></code>
deleteAttributeVocabularyValueLocalizedContentClient
{ "repo_name": "sanjaymandadi/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/attributedefinition/attributes/AttributeVocabularyValueClient.java", "license": "mit", "size": 30265 }
[ "com.mozu.api.MozuClient", "com.mozu.api.MozuClientFactory", "com.mozu.api.MozuUrl" ]
import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
697,660
@Override public T visitKey(@NotNull GolangParser.KeyContext ctx) { return visitChildren(ctx); }
@Override public T visitKey(@NotNull GolangParser.KeyContext ctx) { return visitChildren(ctx); }
/** * {@inheritDoc} * * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */
The default implementation returns the result of calling <code>#visitChildren</code> on ctx
visitFunctionType
{ "repo_name": "IsThisThePayneResidence/intellidots", "path": "src/main/java/ua/edu/hneu/ast/parsers/GolangBaseVisitor.java", "license": "gpl-3.0", "size": 26234 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
1,174,313
public void submitApplicationAttempt(FiCaSchedulerApp application, String userName);
void function(FiCaSchedulerApp application, String userName);
/** * Submit an application attempt to the queue. */
Submit an application attempt to the queue
submitApplicationAttempt
{ "repo_name": "dennishuo/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CSQueue.java", "license": "apache-2.0", "size": 15066 }
[ "org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.FiCaSchedulerApp" ]
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.FiCaSchedulerApp;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,265,289
public Deposit removeDeposit(int index) { extendDeposits(index + 1); return (Deposit) deposits.remove(index); }
Deposit function(int index) { extendDeposits(index + 1); return (Deposit) deposits.remove(index); }
/** * Removes and returns the Deposit at the given index. * * @param index * @return Deposit at the given index */
Removes and returns the Deposit at the given index
removeDeposit
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/fp/document/CashManagementDocument.java", "license": "apache-2.0", "size": 30456 }
[ "org.kuali.kfs.fp.businessobject.Deposit" ]
import org.kuali.kfs.fp.businessobject.Deposit;
import org.kuali.kfs.fp.businessobject.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
2,786,168
if (context == null) { Log.w("The Context is null."); return null; } if (TextUtils.isEmpty(fieldName)) { Log.w("The fileName is null or empty."); return null; } try { Class<?> clazz = Class.forName(context.getPackageName() + "...
if (context == null) { Log.w(STR); return null; } if (TextUtils.isEmpty(fieldName)) { Log.w(STR); return null; } try { Class<?> clazz = Class.forName(context.getPackageName() + STR); Field field = clazz.getField(fieldName); return (T) field.get(null); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (N...
/** * Gets a field from the project's BuildConfig. This is useful when, for example, flavors * are used at the project level to set custom fields. * * @param context Used to find the correct file * @param fieldName The name of the field-to-access * @return The value of the field, or {@co...
Gets a field from the project's BuildConfig. This is useful when, for example, flavors are used at the project level to set custom fields
getBuildConfigValue
{ "repo_name": "snowdream/SnowdreamFramework", "path": "modules/util/src/main/java/com/github/snowdream/android/util/BuildConfigUtil.java", "license": "apache-2.0", "size": 4273 }
[ "android.text.TextUtils", "com.github.snowdream.android.util.log.Log", "java.lang.reflect.Field" ]
import android.text.TextUtils; import com.github.snowdream.android.util.log.Log; import java.lang.reflect.Field;
import android.text.*; import com.github.snowdream.android.util.log.*; import java.lang.reflect.*;
[ "android.text", "com.github.snowdream", "java.lang" ]
android.text; com.github.snowdream; java.lang;
2,448,797
EList<PathNameCS> getTypeRefs();
EList<PathNameCS> getTypeRefs();
/** * Returns the value of the '<em><b>Type Refs</b></em>' containment reference list. * The list contents are of type {@link org.eclipse.ocl.xtext.basecs.PathNameCS}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Type Refs</em>' containment reference list isn't clear, * there really sh...
Returns the value of the 'Type Refs' containment reference list. The list contents are of type <code>org.eclipse.ocl.xtext.basecs.PathNameCS</code>. If the meaning of the 'Type Refs' containment reference list isn't clear, there really should be more of a description here...
getTypeRefs
{ "repo_name": "adolfosbh/cs2as", "path": "uk.ac.york.cs.cs2as.dsl/src-gen/uk/ac/york/cs/cs2as/cs2as_dsl/Contribution.java", "license": "epl-1.0", "size": 6346 }
[ "org.eclipse.emf.common.util.EList", "org.eclipse.ocl.xtext.basecs.PathNameCS" ]
import org.eclipse.emf.common.util.EList; import org.eclipse.ocl.xtext.basecs.PathNameCS;
import org.eclipse.emf.common.util.*; import org.eclipse.ocl.xtext.basecs.*;
[ "org.eclipse.emf", "org.eclipse.ocl" ]
org.eclipse.emf; org.eclipse.ocl;
1,008,634
private List<TenantInfoBean> getAllTenants() throws Exception { TenantManager tenantManager = TenantMgtServiceComponent.getTenantManager(); Tenant[] tenants; try { tenants = (Tenant[]) tenantManager.getAllTenants(); } catch (UserStoreException e) { String msg ...
List<TenantInfoBean> function() throws Exception { TenantManager tenantManager = TenantMgtServiceComponent.getTenantManager(); Tenant[] tenants; try { tenants = (Tenant[]) tenantManager.getAllTenants(); } catch (UserStoreException e) { String msg = STR; log.error(msg, e); throw new Exception(msg, e); } List<TenantInfoB...
/** * Get the list of the tenants * * @return List<TenantInfoBean> * @throws Exception UserStorException */
Get the list of the tenants
getAllTenants
{ "repo_name": "panelion/incubator-stratos", "path": "components/org.apache.stratos.tenant.mgt/src/main/java/org/apache/stratos/tenant/mgt/services/TenantMgtAdminService.java", "license": "apache-2.0", "size": 20125 }
[ "java.util.ArrayList", "java.util.List", "org.apache.stratos.common.beans.TenantInfoBean", "org.apache.stratos.tenant.mgt.internal.TenantMgtServiceComponent", "org.apache.stratos.tenant.mgt.util.TenantMgtUtil", "org.wso2.carbon.user.core.UserStoreException", "org.wso2.carbon.user.core.tenant.Tenant", ...
import java.util.ArrayList; import java.util.List; import org.apache.stratos.common.beans.TenantInfoBean; import org.apache.stratos.tenant.mgt.internal.TenantMgtServiceComponent; import org.apache.stratos.tenant.mgt.util.TenantMgtUtil; import org.wso2.carbon.user.core.UserStoreException; import org.wso2.carbon.user.cor...
import java.util.*; import org.apache.stratos.common.beans.*; import org.apache.stratos.tenant.mgt.internal.*; import org.apache.stratos.tenant.mgt.util.*; import org.wso2.carbon.user.core.*; import org.wso2.carbon.user.core.tenant.*;
[ "java.util", "org.apache.stratos", "org.wso2.carbon" ]
java.util; org.apache.stratos; org.wso2.carbon;
2,437,160
public Map<String, String> getSysConfigure(){ if(contextHolder.get() == null){ synchronized(this){ if(configure == null){ configure = new Hashtable<String, String>() ; // put default value. configure.put(EmailDictionaryKey.EMAIL_DOMAIN, configuration.getProperty(EmailDictionaryKey.EMAIL_DOMAI...
Map<String, String> function(){ if(contextHolder.get() == null){ synchronized(this){ if(configure == null){ configure = new Hashtable<String, String>() ; configure.put(EmailDictionaryKey.EMAIL_DOMAIN, configuration.getProperty(EmailDictionaryKey.EMAIL_DOMAIN, STR)) ; configure.put(EmailDictionaryKey.EMAIL_SERVER, confi...
/** * Return System configuration. */
Return System configuration
getSysConfigure
{ "repo_name": "inetcloud/iMail", "path": "source/com.inet.mail/src/com/inet/mail/conf/beans/ConfigurationBeanDefinition.java", "license": "gpl-2.0", "size": 4286 }
[ "com.inet.mail.data.EmailDictionaryKey", "java.util.Collections", "java.util.Hashtable", "java.util.Map" ]
import com.inet.mail.data.EmailDictionaryKey; import java.util.Collections; import java.util.Hashtable; import java.util.Map;
import com.inet.mail.data.*; import java.util.*;
[ "com.inet.mail", "java.util" ]
com.inet.mail; java.util;
1,921,965
protected void cleanup( TestParameters tParam, PrintWriter log ) { log.println( " disposing xTextDoc " ); DesktopTools.closeDoc(xTextDoc); }
void function( TestParameters tParam, PrintWriter log ) { log.println( STR ); DesktopTools.closeDoc(xTextDoc); }
/** * Disposes text document. */
Disposes text document
cleanup
{ "repo_name": "qt-haiku/LibreOffice", "path": "qadevOOo/tests/java/mod/_sw/PageStyle.java", "license": "gpl-3.0", "size": 7807 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
1,483,624
public static boolean areThereUnrecycledWindows(boolean printUnrecycledWindowsToSystemErr) { if (printUnrecycledWindowsToSystemErr) { for (final StrictEqualityWindowWrapper wrapper : obtainedInstances.keySet()) { final ShadowAccessibilityWindowInfo shadow = Shadow.extract(wrapper.mInfo); Sy...
static boolean function(boolean printUnrecycledWindowsToSystemErr) { if (printUnrecycledWindowsToSystemErr) { for (final StrictEqualityWindowWrapper wrapper : obtainedInstances.keySet()) { final ShadowAccessibilityWindowInfo shadow = Shadow.extract(wrapper.mInfo); System.err.println(String.format( STR, shadow.getType()...
/** * Check for leaked objects that were {@code obtain}ed but never * {@code recycle}d. * * @param printUnrecycledWindowsToSystemErr - if true, stack traces of calls * to {@code obtain} that lack matching calls to {@code recycle} are * dumped to System.err. * @return {@code true} if t...
Check for leaked objects that were obtained but never recycled
areThereUnrecycledWindows
{ "repo_name": "ChengCorp/robolectric", "path": "shadows/framework/src/main/java/org/robolectric/shadows/ShadowAccessibilityWindowInfo.java", "license": "mit", "size": 8310 }
[ "org.robolectric.shadow.api.Shadow" ]
import org.robolectric.shadow.api.Shadow;
import org.robolectric.shadow.api.*;
[ "org.robolectric.shadow" ]
org.robolectric.shadow;
1,987,360
EClass getInteractionOperand();
EClass getInteractionOperand();
/** * Returns the meta object for class '{@link ca.mcgill.cs.sel.ram.InteractionOperand <em>Interaction Operand</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Interaction Operand</em>'. * @see ca.mcgill.cs.sel.ram.InteractionOperand * @ge...
Returns the meta object for class '<code>ca.mcgill.cs.sel.ram.InteractionOperand Interaction Operand</code>'.
getInteractionOperand
{ "repo_name": "mjorod/textram", "path": "tool/ca.mcgill.sel.ram/src/ca/mcgill/cs/sel/ram/RamPackage.java", "license": "mit", "size": 271132 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,065,348
ExecutionEnvironmentIF environment = CompilerContext.getExecutionEnvironment(); return environment.getTypeSize(this); }
ExecutionEnvironmentIF environment = CompilerContext.getExecutionEnvironment(); return environment.getTypeSize(this); }
/** * Returns the size of the type. * * @return the size of the type. */
Returns the size of the type
getSize
{ "repo_name": "colymore/Uned", "path": "PL2/src/compiler/semantic/type/TypeSimple.java", "license": "apache-2.0", "size": 805 }
[ "es.uned.lsi.compiler.code.ExecutionEnvironmentIF" ]
import es.uned.lsi.compiler.code.ExecutionEnvironmentIF;
import es.uned.lsi.compiler.code.*;
[ "es.uned.lsi" ]
es.uned.lsi;
2,053,146
// Go through the available schematics for this player int slot = 0; List<SPItem> items = new ArrayList<SPItem>(); List<Schematic> availableSchems = plugin.getIslandCmd().getSchematics(player, false); // Add an info icon //items.add(new SPItem(Material.MAP,"Choose your island", "...
int slot = 0; List<SPItem> items = new ArrayList<SPItem>(); List<Schematic> availableSchems = plugin.getIslandCmd().getSchematics(player, false); for (Schematic schematic : availableSchems) { if (schematic.isVisible()) { items.add(new SPItem(schematic, slot++)); } } if (items.size() > 0) { schematicItems.put(player.get...
/** * Returns a customized panel of available Schematics for the player * * @param player * @return custom Inventory object or null if there are no valid schematics for this player */
Returns a customized panel of available Schematics for the player
getPanel
{ "repo_name": "tastybento/acidisland", "path": "src/com/wasteofplastic/acidisland/panels/SchematicsPanel.java", "license": "gpl-2.0", "size": 6595 }
[ "com.wasteofplastic.acidisland.schematics.Schematic", "com.wasteofplastic.acidisland.util.Util", "java.util.ArrayList", "java.util.List", "org.bukkit.Bukkit", "org.bukkit.ChatColor", "org.bukkit.inventory.Inventory" ]
import com.wasteofplastic.acidisland.schematics.Schematic; import com.wasteofplastic.acidisland.util.Util; import java.util.ArrayList; import java.util.List; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.inventory.Inventory;
import com.wasteofplastic.acidisland.schematics.*; import com.wasteofplastic.acidisland.util.*; import java.util.*; import org.bukkit.*; import org.bukkit.inventory.*;
[ "com.wasteofplastic.acidisland", "java.util", "org.bukkit", "org.bukkit.inventory" ]
com.wasteofplastic.acidisland; java.util; org.bukkit; org.bukkit.inventory;
1,677,271
private String populateAboutQuery(String oaiIdentifier) throws OAIInternalServerError { StringTokenizer tokenizer = new StringTokenizer(aboutQuery, "\\"); StringBuffer sb = new StringBuffer(); if (tokenizer.hasMoreTokens()) sb.append(tokenizer.nextToken()); else ...
String function(String oaiIdentifier) throws OAIInternalServerError { StringTokenizer tokenizer = new StringTokenizer(aboutQuery, "\\"); StringBuffer sb = new StringBuffer(); if (tokenizer.hasMoreTokens()) sb.append(tokenizer.nextToken()); else throw new OAIInternalServerError(STR); while (tokenizer.hasMoreTokens()) { ...
/** * insert actual from, until, and set parameters into the identifierQuery String * * @param from the OAI from parameter * @param until the OAI until paramter * @param set the OAI set parameter * @return a String containing an SQL query */
insert actual from, until, and set parameters into the identifierQuery String
populateAboutQuery
{ "repo_name": "openpreserve/oaicat", "path": "src/main/java/ORG/oclc/oai/server/catalog/JDBCLimitedOAICatalog.java", "license": "apache-2.0", "size": 59816 }
[ "java.util.StringTokenizer" ]
import java.util.StringTokenizer;
import java.util.*;
[ "java.util" ]
java.util;
664,463
@Test public void createEquilateralTriangle() { Triangle t = Geometry.createEquilateralTriangle(2.0); // test that the center is the origin Vector2 center = t.getCenter(); TestCase.assertEquals(0.000, center.x, 1.0e-3); TestCase.assertEquals(0.000, center.y, 1.0e-3); // compute the first ...
void function() { Triangle t = Geometry.createEquilateralTriangle(2.0); Vector2 center = t.getCenter(); TestCase.assertEquals(0.000, center.x, 1.0e-3); TestCase.assertEquals(0.000, center.y, 1.0e-3); double previousA = t.vertices[0].getAngleBetween(t.vertices[1]); previousA = Math.abs(Math.PI - Math.abs(previousA)); do...
/** * Tests the successful creation of an equilateral angle triangle. */
Tests the successful creation of an equilateral angle triangle
createEquilateralTriangle
{ "repo_name": "satishbabusee/dyn4j", "path": "junit/org/dyn4j/geometry/GeometryTest.java", "license": "bsd-3-clause", "size": 54121 }
[ "junit.framework.TestCase", "org.dyn4j.geometry.Geometry", "org.dyn4j.geometry.Triangle", "org.dyn4j.geometry.Vector2" ]
import junit.framework.TestCase; import org.dyn4j.geometry.Geometry; import org.dyn4j.geometry.Triangle; import org.dyn4j.geometry.Vector2;
import junit.framework.*; import org.dyn4j.geometry.*;
[ "junit.framework", "org.dyn4j.geometry" ]
junit.framework; org.dyn4j.geometry;
2,796,620
EList<Aura> getAuras();
EList<Aura> getAuras();
/** * Returns the value of the '<em><b>Auras</b></em>' containment reference list. * The list contents are of type {@link Leveleditor.Aura}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Auras</em>' reference list isn't clear, * there really should be more of a description here... * ...
Returns the value of the 'Auras' containment reference list. The list contents are of type <code>Leveleditor.Aura</code>. If the meaning of the 'Auras' reference list isn't clear, there really should be more of a description here...
getAuras
{ "repo_name": "sarquah/Gelamen", "path": "TowerOfZaldagor.leveleditor/src/Leveleditor/Enemy.java", "license": "apache-2.0", "size": 7691 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
459,234
@ServiceMethod(returns = ReturnType.SINGLE) SnapshotInner create( String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, SnapshotInner body);
@ServiceMethod(returns = ReturnType.SINGLE) SnapshotInner create( String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, SnapshotInner body);
/** * Create the specified snapshot within the given volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. * @param snapshot...
Create the specified snapshot within the given volume
create
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotsClient.java", "license": "mit", "size": 21515 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.netapp.fluent.models.SnapshotInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.netapp.fluent.models.SnapshotInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.netapp.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,073,377
public void updateShort (String columnName, short columnValue) throws SQLException { validateResultSet(); resultSet_.updateShort(columnName, columnValue); eventSupport_.fireRowChanged(new RowSetEvent(this)); }
void function (String columnName, short columnValue) throws SQLException { validateResultSet(); resultSet_.updateShort(columnName, columnValue); eventSupport_.fireRowChanged(new RowSetEvent(this)); }
/** * Updates a column in the current row using a Java short value. * The driver converts this to an SQL SMALLINT value. * * <p>This does not update the database directly. Instead, it updates * a copy of the data in memory. Call updateRow() or insertRow() to * update the database. * ...
Updates a column in the current row using a Java short value. The driver converts this to an SQL SMALLINT value. This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database
updateShort
{ "repo_name": "piguangming/jt400", "path": "cvsroot/src/com/ibm/as400/access/AS400JDBCRowSet.java", "license": "epl-1.0", "size": 311708 }
[ "java.sql.SQLException", "javax.sql.RowSetEvent" ]
import java.sql.SQLException; import javax.sql.RowSetEvent;
import java.sql.*; import javax.sql.*;
[ "java.sql", "javax.sql" ]
java.sql; javax.sql;
2,810,462
public double getAmountByHour() { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); return Double.parseDouble(prefs.getString(SettingsActivity.PREFS_KEY_AMOUNT_BY_HOUR, SettingsActivity.PREFS_DEFVAL_AMOUNT_BY_HOUR).replaceAll(",", ".")); }
double function() { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); return Double.parseDouble(prefs.getString(SettingsActivity.PREFS_KEY_AMOUNT_BY_HOUR, SettingsActivity.PREFS_DEFVAL_AMOUNT_BY_HOUR).replaceAll(",", ".")); }
/** * Returns the default amount by hour. * @return double */
Returns the default amount by hour
getAmountByHour
{ "repo_name": "Keidan/WorkTime", "path": "app/src/main/java/fr/ralala/worktime/MainApplication.java", "license": "gpl-3.0", "size": 16310 }
[ "android.content.SharedPreferences", "android.preference.PreferenceManager", "fr.ralala.worktime.ui.activities.settings.SettingsActivity" ]
import android.content.SharedPreferences; import android.preference.PreferenceManager; import fr.ralala.worktime.ui.activities.settings.SettingsActivity;
import android.content.*; import android.preference.*; import fr.ralala.worktime.ui.activities.settings.*;
[ "android.content", "android.preference", "fr.ralala.worktime" ]
android.content; android.preference; fr.ralala.worktime;
525,290
public BufferedImage createAvatar(final String hash, final int size) { final boolean[][] array = new boolean[6][5]; for (int i = 0; i < 6; i++) { for (int j = 0; j < 5; j++) { array[i][j] = false; } } for (int i = 0; i < hash.length(); i += 2...
BufferedImage function(final String hash, final int size) { final boolean[][] array = new boolean[6][5]; for (int i = 0; i < 6; i++) { for (int j = 0; j < 5; j++) { array[i][j] = false; } } for (int i = 0; i < hash.length(); i += 2) { final int s = i / 2; final boolean v = Math.random() > 0.5; if (s % 3 == 0) { array[s...
/** * Creates a avatar image with the specified hash string and size. * * <p> * Refers to: https://github.com/superhj1987/awesome-identicon * </p> * * @param hash the specified hash string * @param size the specified size * @return buffered image */
Creates a avatar image with the specified hash string and size. Refers to: HREF
createAvatar
{ "repo_name": "qiangber/symphony", "path": "src/main/java/org/b3log/symphony/service/AvatarQueryService.java", "license": "apache-2.0", "size": 6710 }
[ "java.awt.Color", "java.awt.Graphics", "java.awt.image.BufferedImage" ]
import java.awt.Color; import java.awt.Graphics; import java.awt.image.BufferedImage;
import java.awt.*; import java.awt.image.*;
[ "java.awt" ]
java.awt;
302,574
@Test public void booleanMarshal() throws Exception { Element legacy0Elem = JSONElement.mFactory.createElement(MailConstants.NO_OP_RESPONSE); legacy0Elem.addAttribute(MailConstants.A_WAIT_DISALLOWED, false); logInfo("NoOpResponse JSONElement ---> prettyPrint\n%1$s", legacy0Elem.prettyPri...
void function() throws Exception { Element legacy0Elem = JSONElement.mFactory.createElement(MailConstants.NO_OP_RESPONSE); legacy0Elem.addAttribute(MailConstants.A_WAIT_DISALLOWED, false); logInfo(STR, legacy0Elem.prettyPrint()); Element legacy1Elem = JSONElement.mFactory.createElement(MailConstants.NO_OP_RESPONSE); le...
/** * By default JAXB renders true and false in XML as "true" and "false" * For Zimbra SOAP the XML flavor uses "1" and "0" * The JSON flavor uses "true" and "false" * @throws Exception */
By default JAXB renders true and false in XML as "true" and "false" For Zimbra SOAP the XML flavor uses "1" and "0" The JSON flavor uses "true" and "false"
booleanMarshal
{ "repo_name": "nico01f/z-pec", "path": "ZimbraSoap/src/java-test/com/zimbra/soap/JaxbToJsonTest.java", "license": "mit", "size": 99629 }
[ "com.zimbra.common.soap.Element", "com.zimbra.common.soap.MailConstants", "com.zimbra.soap.JaxbUtil", "com.zimbra.soap.json.JacksonUtil", "com.zimbra.soap.mail.message.NoOpResponse", "junit.framework.Assert" ]
import com.zimbra.common.soap.Element; import com.zimbra.common.soap.MailConstants; import com.zimbra.soap.JaxbUtil; import com.zimbra.soap.json.JacksonUtil; import com.zimbra.soap.mail.message.NoOpResponse; import junit.framework.Assert;
import com.zimbra.common.soap.*; import com.zimbra.soap.*; import com.zimbra.soap.json.*; import com.zimbra.soap.mail.message.*; import junit.framework.*;
[ "com.zimbra.common", "com.zimbra.soap", "junit.framework" ]
com.zimbra.common; com.zimbra.soap; junit.framework;
821,717
@Nullable public static <T> T getOnlyElement(Iterator<? extends T> iterator, @Nullable T defaultValue) { return iterator.hasNext() ? getOnlyElement(iterator) : defaultValue; }
static <T> T function(Iterator<? extends T> iterator, @Nullable T defaultValue) { return iterator.hasNext() ? getOnlyElement(iterator) : defaultValue; }
/** * Returns the single element contained in {@code iterator}, or {@code * defaultValue} if the iterator is empty. * * @throws IllegalArgumentException if the iterator contains multiple * elements. The state of the iterator is unspecified. */
Returns the single element contained in iterator, or defaultValue if the iterator is empty
getOnlyElement
{ "repo_name": "npvincent/guava", "path": "guava/src/com/google/common/collect/Iterators.java", "license": "apache-2.0", "size": 45470 }
[ "java.util.Iterator", "javax.annotation.Nullable" ]
import java.util.Iterator; import javax.annotation.Nullable;
import java.util.*; import javax.annotation.*;
[ "java.util", "javax.annotation" ]
java.util; javax.annotation;
1,669,803
public Collection<? extends BusinessObject> performLookup(LookupForm lookupForm, List<ResultRow> resultTable, boolean bounded);
Collection<? extends BusinessObject> function(LookupForm lookupForm, List<ResultRow> resultTable, boolean bounded);
/** * * This method performs the lookup and returns a collection of lookup items * @param lookupForm * @param resultTable * @param bounded * @return results of lookup */
This method performs the lookup and returns a collection of lookup items
performLookup
{ "repo_name": "ua-eas/ksd-kc5.2.1-rice2.3.6-ua", "path": "rice-middleware/kns/src/main/java/org/kuali/rice/kns/lookup/Lookupable.java", "license": "apache-2.0", "size": 8275 }
[ "java.util.Collection", "java.util.List", "org.kuali.rice.kns.web.struts.form.LookupForm", "org.kuali.rice.kns.web.ui.ResultRow", "org.kuali.rice.krad.bo.BusinessObject" ]
import java.util.Collection; import java.util.List; import org.kuali.rice.kns.web.struts.form.LookupForm; import org.kuali.rice.kns.web.ui.ResultRow; import org.kuali.rice.krad.bo.BusinessObject;
import java.util.*; import org.kuali.rice.kns.web.struts.form.*; import org.kuali.rice.kns.web.ui.*; import org.kuali.rice.krad.bo.*;
[ "java.util", "org.kuali.rice" ]
java.util; org.kuali.rice;
2,079,672
Helper.checkState(auditService == null, "'auditService' can't be null."); Helper.checkState(Helper.isNullOrEmpty(usernameHeader), "'usernameHeader' can't be null or empty."); Helper.checkState(Helper.isNullOrEmpty(passwordHeader), "'passwordHeader' can't be null or empty....
Helper.checkState(auditService == null, STR); Helper.checkState(Helper.isNullOrEmpty(usernameHeader), STR); Helper.checkState(Helper.isNullOrEmpty(passwordHeader), STR); Helper.checkState(authenticationService == null, STR); Helper.checkState(authorizationService == null, STR); Helper.checkState(velocityEngine == null,...
/** * Check if all required fields are initialized properly. * * @throws ConfigurationException * if any required field is not initialized properly * @since 1.1 */
Check if all required fields are initialized properly
checkConfiguration
{ "repo_name": "NASA-Tournament-Lab/CoECI-CMS-Healthcare-Fraud-Prevention", "path": "hub/src/java/main/com/hfpp/network/hub/messaging/BaseMessageListener.java", "license": "apache-2.0", "size": 25096 }
[ "com.hfpp.network.hub.services.impl.Helper", "java.util.Map" ]
import com.hfpp.network.hub.services.impl.Helper; import java.util.Map;
import com.hfpp.network.hub.services.impl.*; import java.util.*;
[ "com.hfpp.network", "java.util" ]
com.hfpp.network; java.util;
2,779,556
public void unscheduleAll(final Project project) throws SchedulerException { for (final Flow flow : project.getFlows()) { logger.info("unscheduling flow" + flow.getProjectId() + "." + flow.getId() + " if it has " + " schedule"); if (!flow.isEmbeddedFlow()) { try { this.sche...
void function(final Project project) throws SchedulerException { for (final Flow flow : project.getFlows()) { logger.info(STR + flow.getProjectId() + "." + flow.getId() + STR + STR); if (!flow.isEmbeddedFlow()) { try { this.scheduler.unregisterJob(FlowTriggerQuartzJob.JOB_NAME, generateGroupName(flow)); } catch (final ...
/** * Unschedule all possible flows in a project */
Unschedule all possible flows in a project
unscheduleAll
{ "repo_name": "erwa/azkaban", "path": "azkaban-web-server/src/main/java/azkaban/flowtrigger/quartz/FlowTriggerScheduler.java", "license": "apache-2.0", "size": 9493 }
[ "org.quartz.SchedulerException" ]
import org.quartz.SchedulerException;
import org.quartz.*;
[ "org.quartz" ]
org.quartz;
597,404
void pushGroupMetrics(DeviceId deviceId, Collection<Group> groupEntries);
void pushGroupMetrics(DeviceId deviceId, Collection<Group> groupEntries);
/** * Submits the group metrics to store for a given device ID. * * @param deviceId the device ID * @param groupEntries the group entries as received from southbound */
Submits the group metrics to store for a given device ID
pushGroupMetrics
{ "repo_name": "maxkondr/onos-porta", "path": "core/api/src/main/java/org/onosproject/net/group/GroupStore.java", "license": "apache-2.0", "size": 5074 }
[ "java.util.Collection", "org.onosproject.net.DeviceId" ]
import java.util.Collection; import org.onosproject.net.DeviceId;
import java.util.*; import org.onosproject.net.*;
[ "java.util", "org.onosproject.net" ]
java.util; org.onosproject.net;
1,208,743
public final int update(Uri uri, ContentValues values, String where, String[] selectionArgs) { IContentProvider provider = acquireProvider(uri); if (provider == null) { throw new IllegalArgumentException("Unknown URI " + uri); } try { long startTim...
final int function(Uri uri, ContentValues values, String where, String[] selectionArgs) { IContentProvider provider = acquireProvider(uri); if (provider == null) { throw new IllegalArgumentException(STR + uri); } try { long startTime = SystemClock.uptimeMillis(); int rowsUpdated = provider.update(uri, values, where, se...
/** * Update row(s) in a content URI. * * If the content provider supports transactions the update will be atomic. * * @param uri The URI to modify. * @param values The new field values. The key is the column name for the field. A null value will remove an existing fie...
Update row(s) in a content URI. If the content provider supports transactions the update will be atomic
update
{ "repo_name": "mateor/PDroidHistory", "path": "frameworks/base/core/java/android/content/ContentResolver.java", "license": "gpl-3.0", "size": 59819 }
[ "android.net.Uri", "android.os.RemoteException", "android.os.SystemClock" ]
import android.net.Uri; import android.os.RemoteException; import android.os.SystemClock;
import android.net.*; import android.os.*;
[ "android.net", "android.os" ]
android.net; android.os;
1,038,524
public INDArray sruCell(INDArray x, INDArray cLast, SRUWeights SRUWeights) { NDValidation.validateNumerical("sruCell", "x", x); NDValidation.validateNumerical("sruCell", "cLast", cLast); return Nd4j.exec(new org.nd4j.linalg.api.ops.impl.layers.recurrent.SRUCell(x, cLast, SRUWeights))[0]; }
INDArray function(INDArray x, INDArray cLast, SRUWeights SRUWeights) { NDValidation.validateNumerical(STR, "x", x); NDValidation.validateNumerical(STR, "cLast", cLast); return Nd4j.exec(new org.nd4j.linalg.api.ops.impl.layers.recurrent.SRUCell(x, cLast, SRUWeights))[0]; }
/** * The SRU layer. Does a single time step operation.<br> * * @param x Input, with shape [batchSize, inSize] (NUMERIC type) * @param cLast Previous cell state, with shape [batchSize, inSize] (NUMERIC type) * @param SRUWeights Configuration Object * @return output The cell's outputs. (NUMERIC type) ...
The SRU layer. Does a single time step operation
sruCell
{ "repo_name": "deeplearning4j/deeplearning4j", "path": "nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/ops/NDRNN.java", "license": "apache-2.0", "size": 11538 }
[ "org.nd4j.linalg.api.ndarray.INDArray", "org.nd4j.linalg.api.ops.impl.layers.recurrent.weights.SRUWeights", "org.nd4j.linalg.factory.NDValidation", "org.nd4j.linalg.factory.Nd4j" ]
import org.nd4j.linalg.api.ndarray.INDArray; import org.nd4j.linalg.api.ops.impl.layers.recurrent.weights.SRUWeights; import org.nd4j.linalg.factory.NDValidation; import org.nd4j.linalg.factory.Nd4j;
import org.nd4j.linalg.api.ndarray.*; import org.nd4j.linalg.api.ops.impl.layers.recurrent.weights.*; import org.nd4j.linalg.factory.*;
[ "org.nd4j.linalg" ]
org.nd4j.linalg;
2,631,663
protected boolean readt(int n, boolean useAvailableData) throws IOException { if (useAvailableData && inputBuffer.remaining() == 0) { return false; } if (inputBuffer.capacity() - inputBuffer.limit() <= n - inputBuffer.remaining()) { in...
boolean function(int n, boolean useAvailableData) throws IOException { if (useAvailableData && inputBuffer.remaining() == 0) { return false; } if (inputBuffer.capacity() - inputBuffer.limit() <= n - inputBuffer.remaining()) { inputBuffer.compact(); inputBuffer.limit(inputBuffer.position()); inputBuffer.position(0); } i...
/** * Read at least the specified amount of bytes, and place them * in the input buffer. */
Read at least the specified amount of bytes, and place them in the input buffer
readt
{ "repo_name": "pistolove/sourcecode4junit", "path": "Source4Tomcat/src/org/apache/coyote/ajp/AjpAprProcessor.java", "license": "apache-2.0", "size": 15264 }
[ "java.io.IOException", "org.apache.tomcat.jni.Socket", "org.apache.tomcat.jni.Status" ]
import java.io.IOException; import org.apache.tomcat.jni.Socket; import org.apache.tomcat.jni.Status;
import java.io.*; import org.apache.tomcat.jni.*;
[ "java.io", "org.apache.tomcat" ]
java.io; org.apache.tomcat;
1,664,226
public VirtualMachineScaleSetPublicIpAddressConfigurationProperties withDnsSettings( VirtualMachineScaleSetPublicIpAddressConfigurationDnsSettings dnsSettings) { this.dnsSettings = dnsSettings; return this; }
VirtualMachineScaleSetPublicIpAddressConfigurationProperties function( VirtualMachineScaleSetPublicIpAddressConfigurationDnsSettings dnsSettings) { this.dnsSettings = dnsSettings; return this; }
/** * Set the dnsSettings property: The dns settings to be applied on the publicIP addresses . * * @param dnsSettings the dnsSettings value to set. * @return the VirtualMachineScaleSetPublicIpAddressConfigurationProperties object itself. */
Set the dnsSettings property: The dns settings to be applied on the publicIP addresses
withDnsSettings
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetPublicIpAddressConfigurationProperties.java", "license": "mit", "size": 7164 }
[ "com.azure.resourcemanager.compute.models.VirtualMachineScaleSetPublicIpAddressConfigurationDnsSettings" ]
import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetPublicIpAddressConfigurationDnsSettings;
import com.azure.resourcemanager.compute.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
2,807,379
public static String[] split(String text, boolean replaceMeta) { List<String> tempWords = new ArrayList<String>(); int index = 0; boolean inMeta = false; boolean inWord = false; String word = ""; while (index < text.length()) { char currentChar = Character.toLowerCase(t...
static String[] function(String text, boolean replaceMeta) { List<String> tempWords = new ArrayList<String>(); int index = 0; boolean inMeta = false; boolean inWord = false; String word = STRSTR<$#$>STR<$@$>STRSTR<$STR$>STRSTR"; inWord = false; } } index++; } if (word.length() > 0) { addWord(tempWords, word, replaceMet...
/** * Split a string into an array of Strings. * No Stemming will occur, but all non-alpha characters will * be taken out. * Preserve words inside unescaped "<$$>". * * @param text The String to split up. This will be modified. * * @return The list of words in text. */
Split a string into an array of Strings. No Stemming will occur, but all non-alpha characters will be taken out. Preserve words inside unescaped ""
split
{ "repo_name": "eriq-augustine/cpcp", "path": "src/com/cpcp/filter/SmartSplitString.java", "license": "apache-2.0", "size": 4336 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,724,554
private boolean hasAnyParticipant(SharedDeployment dep, Map<UUID, IgniteUuid> participants) { assert Thread.holdsLock(mux); for (Map.Entry<UUID, IgniteUuid> entry : participants.entrySet()) { if (dep.hasParticipant(entry.getKey(), entry.getValue())) return true; ...
boolean function(SharedDeployment dep, Map<UUID, IgniteUuid> participants) { assert Thread.holdsLock(mux); for (Map.Entry<UUID, IgniteUuid> entry : participants.entrySet()) { if (dep.hasParticipant(entry.getKey(), entry.getValue())) return true; } return false; }
/** * Checks if given deployment contains any of given participants. * * @param dep Deployment to check. * @param participants Participants to check. * @return {@code True} if deployment contains any of given participants. */
Checks if given deployment contains any of given participants
hasAnyParticipant
{ "repo_name": "ascherbakoff/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentPerVersionStore.java", "license": "apache-2.0", "size": 50195 }
[ "java.util.Map", "org.apache.ignite.lang.IgniteUuid" ]
import java.util.Map; import org.apache.ignite.lang.IgniteUuid;
import java.util.*; import org.apache.ignite.lang.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,038,395
public void load(String fileName) throws Exception { File fileStream = new File(fileName); try { this.loadToStream = new FileOutputStream(fileStream); this.load(); this.loadToStream.flush(); } finally { IOUtils.closeQuietly(this.loadToStream); this.loadToStream = null; }...
void function(String fileName) throws Exception { File fileStream = new File(fileName); try { this.loadToStream = new FileOutputStream(fileStream); this.load(); this.loadToStream.flush(); } finally { IOUtils.closeQuietly(this.loadToStream); this.loadToStream = null; } this.fileName = fileName; this.contentStream = null...
/** * Loads the content of the file attachment into the specified file. * Calling this method results in a call to EWS. * * @param fileName the file name * @throws Exception the exception */
Loads the content of the file attachment into the specified file. Calling this method results in a call to EWS
load
{ "repo_name": "SpanningCloudApps/ews-java-api", "path": "src/main/java/microsoft/exchange/webservices/data/property/complex/FileAttachment.java", "license": "mit", "size": 19237 }
[ "java.io.File", "java.io.FileOutputStream", "org.apache.commons.io.IOUtils" ]
import java.io.File; import java.io.FileOutputStream; import org.apache.commons.io.IOUtils;
import java.io.*; import org.apache.commons.io.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
1,346,123
public static boolean exists(FileObject fileObject) { if (fileObject == null) { return false; } try { return fileObject.exists(); } catch (FileSystemException ex) { return false; } }
static boolean function(FileObject fileObject) { if (fileObject == null) { return false; } try { return fileObject.exists(); } catch (FileSystemException ex) { return false; } }
/** * Tells whether a file exists * @param fileObject A file representation * @return whether a file exists */
Tells whether a file exists
exists
{ "repo_name": "fracpete/vfsjfilechooser2", "path": "src/main/java/com/googlecode/vfsjfilechooser2/utils/VFSUtils.java", "license": "apache-2.0", "size": 15992 }
[ "org.apache.commons.vfs2.FileObject", "org.apache.commons.vfs2.FileSystemException" ]
import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException;
import org.apache.commons.vfs2.*;
[ "org.apache.commons" ]
org.apache.commons;
452,455
public void setTextPadding(Insets textPadding) { this.textPadding = textPadding; invalidate(); }
void function(Insets textPadding) { this.textPadding = textPadding; invalidate(); }
/** * Sets the padding around the text. * * @param textPadding * the text padding to set */
Sets the padding around the text
setTextPadding
{ "repo_name": "nickmain/xmind", "path": "bundles/org.xmind.gef.ui/src/org/xmind/ui/gallery/TitleBorder.java", "license": "epl-1.0", "size": 8212 }
[ "org.eclipse.draw2d.geometry.Insets" ]
import org.eclipse.draw2d.geometry.Insets;
import org.eclipse.draw2d.geometry.*;
[ "org.eclipse.draw2d" ]
org.eclipse.draw2d;
2,668,072
public String getReason() { if (payload.length <= 2) { return ""; } return new String(payload, 2, payload.length-2, StandardCharsets.UTF_8); }
String function() { if (payload.length <= 2) { return ""; } return new String(payload, 2, payload.length-2, StandardCharsets.UTF_8); }
/** * Returns the closing reason text in this frame. * * @return the reason text or an empty text if the reason is not present */
Returns the closing reason text in this frame
getReason
{ "repo_name": "snf4j/snf4j", "path": "snf4j-websocket/src/main/java/org/snf4j/websocket/frame/CloseFrame.java", "license": "mit", "size": 9259 }
[ "java.nio.charset.StandardCharsets" ]
import java.nio.charset.StandardCharsets;
import java.nio.charset.*;
[ "java.nio" ]
java.nio;
2,719,697
@NotNull public List<Geo> getMap() { return map; }
List<Geo> function() { return map; }
/** * Get the map data. * @return the map data */
Get the map data
getMap
{ "repo_name": "bensmith87/risk", "path": "player/src/main/java/ben/risk/player/game/map/model/MapModel.java", "license": "gpl-2.0", "size": 2188 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
78,765
IWorkPackageQueue getQueueForPackageProcessing(I_C_Queue_Processor processor);
IWorkPackageQueue getQueueForPackageProcessing(I_C_Queue_Processor processor);
/** * Return a queue for a <b>queue processor</b>, in order to poll and lock and process work-packages that were enqueued earlier. * * @param processor * @return */
Return a queue for a queue processor, in order to poll and lock and process work-packages that were enqueued earlier
getQueueForPackageProcessing
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.async/src/main/java/de/metas/async/processor/IWorkPackageQueueFactory.java", "license": "gpl-2.0", "size": 2090 }
[ "de.metas.async.api.IWorkPackageQueue" ]
import de.metas.async.api.IWorkPackageQueue;
import de.metas.async.api.*;
[ "de.metas.async" ]
de.metas.async;
7,776
protected boolean flush(ByteBuffer buf) throws IOException { int remaining = buf.remaining(); if ( remaining > 0 ) { int written = sc.write(buf); return written >= remaining; }else { return true; } }
boolean function(ByteBuffer buf) throws IOException { int remaining = buf.remaining(); if ( remaining > 0 ) { int written = sc.write(buf); return written >= remaining; }else { return true; } }
/** * Flushes the buffer to the network, non blocking * @param buf ByteBuffer * @return boolean true if the buffer has been emptied out, false otherwise * @throws IOException */
Flushes the buffer to the network, non blocking
flush
{ "repo_name": "plumer/codana", "path": "tomcat_files/7.0.0/SecureNioChannel.java", "license": "mit", "size": 19825 }
[ "java.io.IOException", "java.nio.ByteBuffer" ]
import java.io.IOException; import java.nio.ByteBuffer;
import java.io.*; import java.nio.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
1,945,721
public void delete() { mBaseName.delete(); mBackupName.delete(); } /** * Start a new write operation on the file. This returns a FileOutputStream * to which you can write the new file data. The existing file is replaced * with the new data. You <em>must not</em> directly c...
void function() { mBaseName.delete(); mBackupName.delete(); } /** * Start a new write operation on the file. This returns a FileOutputStream * to which you can write the new file data. The existing file is replaced * with the new data. You <em>must not</em> directly close the given * FileOutputStream; instead call eith...
/** * Delete the atomic file. This deletes both the base and backup files. */
Delete the atomic file. This deletes both the base and backup files
delete
{ "repo_name": "Gracker/Android-Framework-Tools-Utils", "path": "util/AtomicFile.java", "license": "apache-2.0", "size": 8930 }
[ "java.io.FileOutputStream" ]
import java.io.FileOutputStream;
import java.io.*;
[ "java.io" ]
java.io;
73,327
private static boolean isNameCompatibleLastType( final Expression lastExpr, final String typeString) { final ExpressionType lastType = lastExpr.getType(); if (lastType.getTypeString().startsWith(typeString)) { return true; } if (typeString.startsWith(lastType.getTypeString())) { return true; } ...
static boolean function( final Expression lastExpr, final String typeString) { final ExpressionType lastType = lastExpr.getType(); if (lastType.getTypeString().startsWith(typeString)) { return true; } if (typeString.startsWith(lastType.getTypeString())) { return true; } if (lastType.isNumeral()) { return true; } if (la...
/** * Check for compatible types. * * @param lastExpr last word in an expression * @param typeString expected type string * @return <code>true</code> if the expression is of compatible type, * otherwise <code>false</code> */
Check for compatible types
isNameCompatibleLastType
{ "repo_name": "AntumDeluge/arianne-stendhal", "path": "src/games/stendhal/common/parser/WordList.java", "license": "gpl-2.0", "size": 19969 }
[ "games.stendhal.common.grammar.Grammar" ]
import games.stendhal.common.grammar.Grammar;
import games.stendhal.common.grammar.*;
[ "games.stendhal.common" ]
games.stendhal.common;
570,509
public final void setSplitPoint(Instances allInstances) { double newSplitPoint = -Double.MAX_VALUE; double tempValue; Instance instance; if ((!allInstances.attribute(m_attIndex).isNominal()) && (m_numSubsets > 1)) { Enumeration<Instance> enu = allInstances.enumerateInstances(); while (en...
final void function(Instances allInstances) { double newSplitPoint = -Double.MAX_VALUE; double tempValue; Instance instance; if ((!allInstances.attribute(m_attIndex).isNominal()) && (m_numSubsets > 1)) { Enumeration<Instance> enu = allInstances.enumerateInstances(); while (enu.hasMoreElements()) { instance = enu.nextEl...
/** * Sets split point to greatest value in given data smaller or equal to old * split point. (C4.5 does this for some strange reason). */
Sets split point to greatest value in given data smaller or equal to old split point. (C4.5 does this for some strange reason)
setSplitPoint
{ "repo_name": "mydzigear/weka.kmeanspp.silhouette_score", "path": "src/weka/classifiers/trees/j48/BinC45Split.java", "license": "gpl-3.0", "size": 14604 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
1,034,310
SchemaObject unregisterMatchingRuleUse( String matchingRuleUseOid ) throws LdapException;
SchemaObject unregisterMatchingRuleUse( String matchingRuleUseOid ) throws LdapException;
/** * Removes the registered MatchingRuleUse from the MatchingRuleUseRegistry * * @param matchingRuleUseOid the MatchingRuleUse OID to unregister * @throws LdapException if the MatchingRuleUse is invalid */
Removes the registered MatchingRuleUse from the MatchingRuleUseRegistry
unregisterMatchingRuleUse
{ "repo_name": "darranl/directory-shared", "path": "ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaManager.java", "license": "apache-2.0", "size": 27568 }
[ "org.apache.directory.api.ldap.model.exception.LdapException" ]
import org.apache.directory.api.ldap.model.exception.LdapException;
import org.apache.directory.api.ldap.model.exception.*;
[ "org.apache.directory" ]
org.apache.directory;
731,921
@Override public void actionDialog() throws JspException, ServletException, IOException { if (getAction() == ACTION_CONTINUE) { sendForward(nextUrl(), paramsAsParameterMap()); return; } super.actionDialog(); }
void function() throws JspException, ServletException, IOException { if (getAction() == ACTION_CONTINUE) { sendForward(nextUrl(), paramsAsParameterMap()); return; } super.actionDialog(); }
/** * Override this to set additional parameters before forwarding or to change the forward target.<p> * * Usually you have to set the "action" parameter to another value before forwarding.<p> * * @see org.opencms.workplace.list.A_CmsListDialog#actionDialog() */
Override this to set additional parameters before forwarding or to change the forward target. Usually you have to set the "action" parameter to another value before forwarding
actionDialog
{ "repo_name": "sbonoc/opencms-core", "path": "src/org/opencms/workplace/list/A_CmsSelectResourceList.java", "license": "lgpl-2.1", "size": 12942 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.jsp.JspException" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.jsp.JspException;
import java.io.*; import javax.servlet.*; import javax.servlet.jsp.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
2,048,200
protected String getResourceStringInternal(final String key) { try { //log.error("["+key+"]["+resourceBundle.getString(key)+"]"); if (StringUtils.isEmpty(key)) { log.warn("The key ["+key+"] was null/empty for localization"); re...
String function(final String key) { try { if (StringUtils.isEmpty(key)) { log.warn(STR+key+STR); return STRCouldn't find key["+key+"] in resource bundle [STR]"); } for (int i=resBundleStack.size()-1;i>-1;i--) { ResBundleInfo ri = resBundleStack.elementAt(i); try { return ri.getResBundle().getString(key); } catch (Missi...
/** * Returns a localized string from the resource bundle (masks the thrown exception). * @param key the key to look up * @return Returns a localized string from the resource bundle */
Returns a localized string from the resource bundle (masks the thrown exception)
getResourceStringInternal
{ "repo_name": "specify/specify6", "path": "src/edu/ku/brc/ui/UIRegistry.java", "license": "gpl-2.0", "size": 98859 }
[ "java.util.MissingResourceException", "org.apache.commons.lang.StringUtils" ]
import java.util.MissingResourceException; import org.apache.commons.lang.StringUtils;
import java.util.*; import org.apache.commons.lang.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
1,424,938
interface MacLibrary extends Library { int sandbox_init(String profile, long flags, PointerByReference errorbuf);
interface MacLibrary extends Library { int sandbox_init(String profile, long flags, PointerByReference errorbuf);
/** * maps to sandbox_init(3), since Leopard */
maps to sandbox_init(3), since Leopard
sandbox_init
{ "repo_name": "qwerty4030/elasticsearch", "path": "server/src/main/java/org/elasticsearch/bootstrap/SystemCallFilter.java", "license": "apache-2.0", "size": 28355 }
[ "com.sun.jna.Library", "com.sun.jna.ptr.PointerByReference" ]
import com.sun.jna.Library; import com.sun.jna.ptr.PointerByReference;
import com.sun.jna.*; import com.sun.jna.ptr.*;
[ "com.sun.jna" ]
com.sun.jna;
2,479,758
public static List<IJavaProject> getJavaProjects(List<IProject> projects) throws CoreException { ArrayList<IJavaProject> list = new ArrayList<IJavaProject>(); for (IProject p : projects) { if (p.isOpen() && p.hasNature(JavaCore.NATURE_ID)) { list.add(JavaCore.create(p))...
static List<IJavaProject> function(List<IProject> projects) throws CoreException { ArrayList<IJavaProject> list = new ArrayList<IJavaProject>(); for (IProject p : projects) { if (p.isOpen() && p.hasNature(JavaCore.NATURE_ID)) { list.add(JavaCore.create(p)); } } return list; }
/** * Returns a list of {@link IJavaProject} matching the provided {@link IProject} objects. * @param projects the IProject objects. * @return a new list object containing the IJavaProject object for the given IProject objects. * @throws CoreException */
Returns a list of <code>IJavaProject</code> matching the provided <code>IProject</code> objects
getJavaProjects
{ "repo_name": "rex-xxx/mt6572_x201", "path": "sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/BuildHelper.java", "license": "gpl-2.0", "size": 48389 }
[ "java.util.ArrayList", "java.util.List", "org.eclipse.core.resources.IProject", "org.eclipse.core.runtime.CoreException", "org.eclipse.jdt.core.IJavaProject", "org.eclipse.jdt.core.JavaCore" ]
import java.util.ArrayList; import java.util.List; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaCore;
import java.util.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*;
[ "java.util", "org.eclipse.core", "org.eclipse.jdt" ]
java.util; org.eclipse.core; org.eclipse.jdt;
69,321
@Test public void setupPathTest5() { build4RouterTopo(true, true, false, false, 0); List<Constraint> constraints = new LinkedList<Constraint>(); CostConstraint costConstraint = new CostConstraint(COST); constraints.add(costConstraint); PathErr result = pceManager.setupP...
void function() { build4RouterTopo(true, true, false, false, 0); List<Constraint> constraints = new LinkedList<Constraint>(); CostConstraint costConstraint = new CostConstraint(COST); constraints.add(costConstraint); PathErr result = pceManager.setupPath(D1.deviceId(), D2.deviceId(), "T123", constraints, WITHOUT_SIGNAL...
/** * Tests path success with (IGP) cost constraint for non-SR non-signalled LSP. */
Tests path success with (IGP) cost constraint for non-SR non-signalled LSP
setupPathTest5
{ "repo_name": "maheshraju-Huawei/actn", "path": "apps/pce/app/src/test/java/org/onosproject/pce/pceservice/PceManagerTest.java", "license": "apache-2.0", "size": 66481 }
[ "java.util.LinkedList", "java.util.List", "org.hamcrest.MatcherAssert", "org.hamcrest.core.Is", "org.onosproject.net.intent.Constraint", "org.onosproject.pce.pceservice.api.PceService", "org.onosproject.pce.pceservice.constraint.CostConstraint" ]
import java.util.LinkedList; import java.util.List; import org.hamcrest.MatcherAssert; import org.hamcrest.core.Is; import org.onosproject.net.intent.Constraint; import org.onosproject.pce.pceservice.api.PceService; import org.onosproject.pce.pceservice.constraint.CostConstraint;
import java.util.*; import org.hamcrest.*; import org.hamcrest.core.*; import org.onosproject.net.intent.*; import org.onosproject.pce.pceservice.api.*; import org.onosproject.pce.pceservice.constraint.*;
[ "java.util", "org.hamcrest", "org.hamcrest.core", "org.onosproject.net", "org.onosproject.pce" ]
java.util; org.hamcrest; org.hamcrest.core; org.onosproject.net; org.onosproject.pce;
1,374,945
public void onAfterConnectionClose(ConnectionInformation connectionInformation, SQLException e) { }
void function(ConnectionInformation connectionInformation, SQLException e) { }
/** * This callback method is executed after the {@link Connection#close()} method is invoked. * * @param connectionInformation The meta information about the {@link Connection} being invoked * @param e The {@link SQLException} which may be triggered by the call (<code>null</code> if ...
This callback method is executed after the <code>Connection#close()</code> method is invoked
onAfterConnectionClose
{ "repo_name": "p6spy/p6spy", "path": "src/main/java/com/p6spy/engine/event/JdbcEventListener.java", "license": "apache-2.0", "size": 22874 }
[ "com.p6spy.engine.common.ConnectionInformation", "java.sql.SQLException" ]
import com.p6spy.engine.common.ConnectionInformation; import java.sql.SQLException;
import com.p6spy.engine.common.*; import java.sql.*;
[ "com.p6spy.engine", "java.sql" ]
com.p6spy.engine; java.sql;
1,673,337
@Nonnull @Required GenericAttributeValue<String> getName();
GenericAttributeValue<String> getName();
/** * Returns the value of the name child. * Attribute name * @return the value of the name child. */
Returns the value of the name child. Attribute name
getName
{ "repo_name": "consulo-trash/consulo-hibernate", "path": "plugin/src/main/java/com/intellij/hibernate/model/xml/mapping/HbmReturnProperty.java", "license": "apache-2.0", "size": 1126 }
[ "com.intellij.util.xml.GenericAttributeValue" ]
import com.intellij.util.xml.GenericAttributeValue;
import com.intellij.util.xml.*;
[ "com.intellij.util" ]
com.intellij.util;
47,268
public Widget getEditorWidget() { return editorWidget; }
Widget function() { return editorWidget; }
/** * Returns the currently focused editor widget. * * @return the focused editor widget or {@code null} if not editable */
Returns the currently focused editor widget
getEditorWidget
{ "repo_name": "peterl1084/framework", "path": "client/src/main/java/com/vaadin/client/widgets/Grid.java", "license": "apache-2.0", "size": 332371 }
[ "com.google.gwt.user.client.ui.Widget" ]
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
1,349,257
private int getBookedRowCount() { Cursor cur = context.getContentResolver().query(DatabaseProvider.BOOKING_CONTENT_URI, new String[] { "COUNT(" + SQLiteHelper.KEY_ID + ")" }, null, null, null); int value = -1; if (cur.moveToFirst()) { value = cur.get...
int function() { Cursor cur = context.getContentResolver().query(DatabaseProvider.BOOKING_CONTENT_URI, new String[] { STR + SQLiteHelper.KEY_ID + ")" }, null, null, null); int value = -1; if (cur.moveToFirst()) { value = cur.getInt(0); } cur.close(); return value; }
/** * getBookedRowCount Get the current number of bookings from the local database. * * @return value The current number of bookings stored in the database. */
getBookedRowCount Get the current number of bookings from the local database
getBookedRowCount
{ "repo_name": "gnu-user/free-room-finder", "path": "MobileApp/src/com/uoit/freeroomfinder/DatabaseInterface.java", "license": "agpl-3.0", "size": 8331 }
[ "android.database.Cursor" ]
import android.database.Cursor;
import android.database.*;
[ "android.database" ]
android.database;
2,900,446
private void shareBarcode(Activity activity, String text) { IntentIntegrator zxingIntegrator = new IntentIntegrator(activity); zxingIntegrator.shareText(text); }
void function(Activity activity, String text) { IntentIntegrator zxingIntegrator = new IntentIntegrator(activity); zxingIntegrator.shareText(text); }
/** * Shares the given text with a barcode. * */
Shares the given text with a barcode
shareBarcode
{ "repo_name": "thomas-bornschlegel/AndroidMultiChannelMiddleware", "path": "Code/MultiChannelMiddleware/src/de/lmu/mcm/network/barcode/BarcodeCommunicator.java", "license": "apache-2.0", "size": 5734 }
[ "android.app.Activity", "com.google.zxing.client.android.integration.IntentIntegrator" ]
import android.app.Activity; import com.google.zxing.client.android.integration.IntentIntegrator;
import android.app.*; import com.google.zxing.client.android.integration.*;
[ "android.app", "com.google.zxing" ]
android.app; com.google.zxing;
1,133,046
ViewHolder getScrapViewForPosition(int position, int type, boolean dryRun) { final int scrapCount = mAttachedScrap.size(); // Try first for an exact, non-invalid match from scrap. for (int i = 0; i < scrapCount; i++) { final ViewHolder holder = mAttachedScrap...
ViewHolder getScrapViewForPosition(int position, int type, boolean dryRun) { final int scrapCount = mAttachedScrap.size(); for (int i = 0; i < scrapCount; i++) { final ViewHolder holder = mAttachedScrap.get(i); if (!holder.wasReturnedFromScrap() && holder.getLayoutPosition() == position && !holder.isInvalid() && (mStat...
/** * Returns a scrap view for the position. If type is not INVALID_TYPE, it also checks if * ViewHolder's type matches the provided type. * * @param position Item position * @param type View type * @param dryRun Does a dry run, finds the ViewHolder but does not re...
Returns a scrap view for the position. If type is not INVALID_TYPE, it also checks if ViewHolder's type matches the provided type
getScrapViewForPosition
{ "repo_name": "rugram/RuGram", "path": "TMessagesProj/src/main/java/org/telegram/android/support/widget/RecyclerView.java", "license": "gpl-2.0", "size": 416898 }
[ "android.util.Log", "android.view.View" ]
import android.util.Log; import android.view.View;
import android.util.*; import android.view.*;
[ "android.util", "android.view" ]
android.util; android.view;
434,609
public ScalarModel getPropertyModel(final PropertyMemento pm) { ScalarModel scalarModel = propertyScalarModels.get(pm); if (scalarModel == null) { scalarModel = new ScalarModel(getObjectAdapterMemento(), pm); if (isViewMode()) { scalarModel.toViewMode(); ...
ScalarModel function(final PropertyMemento pm) { ScalarModel scalarModel = propertyScalarModels.get(pm); if (scalarModel == null) { scalarModel = new ScalarModel(getObjectAdapterMemento(), pm); if (isViewMode()) { scalarModel.toViewMode(); } else { scalarModel.toEditMode(); } propertyScalarModels.put(pm, scalarModel); ...
/** * Lazily populates with the current value of each property. */
Lazily populates with the current value of each property
getPropertyModel
{ "repo_name": "kidaa/isis", "path": "core/viewer-wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java", "license": "apache-2.0", "size": 24107 }
[ "org.apache.isis.viewer.wicket.model.mementos.PropertyMemento" ]
import org.apache.isis.viewer.wicket.model.mementos.PropertyMemento;
import org.apache.isis.viewer.wicket.model.mementos.*;
[ "org.apache.isis" ]
org.apache.isis;
1,426,261
@Override public Class<SSDate> getReturnType() { return SSDate.class; }
Class<SSDate> function() { return SSDate.class; }
/** * Getter for the return type of DateLabel * * @author Ruan Naude <ruan.naude@a24group.com> * @since 03 Dec 2012 * * @return The return type of DateLabel */
Getter for the return type of DateLabel
getReturnType
{ "repo_name": "A24Group/ssGWT-lib", "path": "src/org/ssgwt/client/ui/radioBox/DateLabel.java", "license": "apache-2.0", "size": 4604 }
[ "org.ssgwt.client.i18n.SSDate" ]
import org.ssgwt.client.i18n.SSDate;
import org.ssgwt.client.i18n.*;
[ "org.ssgwt.client" ]
org.ssgwt.client;
1,056,870