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 static double[] log(final double[] a) { checkDimsPermitEmpty(a); final double[] b = new double[a.length]; for(int i = 0; i < a.length; i++) b[i] = FastMath.log(a[i]); return b; }
static double[] function(final double[] a) { checkDimsPermitEmpty(a); final double[] b = new double[a.length]; for(int i = 0; i < a.length; i++) b[i] = FastMath.log(a[i]); return b; }
/** * Calculate the log of the vector. * @param a * @return the log of the vector */
Calculate the log of the vector
log
{ "repo_name": "tgsmith61591/clust4j", "path": "src/main/java/com/clust4j/utils/VecUtils.java", "license": "apache-2.0", "size": 45939 }
[ "org.apache.commons.math3.util.FastMath" ]
import org.apache.commons.math3.util.FastMath;
import org.apache.commons.math3.util.*;
[ "org.apache.commons" ]
org.apache.commons;
300,411
public ListContainerItemsInner withValue(List<ListContainerItem> value) { this.value = value; return this; }
ListContainerItemsInner function(List<ListContainerItem> value) { this.value = value; return this; }
/** * Set the list of blob containers. * * @param value the value value to set * @return the ListContainerItemsInner object itself. */
Set the list of blob containers
withValue
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/storage/mgmt-v2018_07_01/src/main/java/com/microsoft/azure/management/storage/v2018_07_01/implementation/ListContainerItemsInner.java", "license": "mit", "size": 1146 }
[ "com.microsoft.azure.management.storage.v2018_07_01.ListContainerItem", "java.util.List" ]
import com.microsoft.azure.management.storage.v2018_07_01.ListContainerItem; import java.util.List;
import com.microsoft.azure.management.storage.v2018_07_01.*; import java.util.*;
[ "com.microsoft.azure", "java.util" ]
com.microsoft.azure; java.util;
1,187,826
public ActionForward recalculateTripDetailTotal(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { KNSGlobalVariables.getMessageList().remove(new ErrorMessage(TemKeyConstants.MESSAGE_RECALCULATE_SUCCESSFUL)); // check to make sure...
ActionForward function(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { KNSGlobalVariables.getMessageList().remove(new ErrorMessage(TemKeyConstants.MESSAGE_RECALCULATE_SUCCESSFUL)); TravelFormBase travelReqForm = (TravelFormBase) form; TravelDocumentBa...
/** * This method calculates trip detail total for both TA and TR * * @param mapping * @param form * @param request * @param response * @return * @throws Exception */
This method calculates trip detail total for both TA and TR
recalculateTripDetailTotal
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/module/tem/document/web/struts/TravelActionBase.java", "license": "agpl-3.0", "size": 87755 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.struts.action.ActionForm", "org.apache.struts.action.ActionForward", "org.apache.struts.action.ActionMapping", "org.kuali.kfs.module.tem.TemKeyConstants", "org.kuali.kfs.module.tem.document.TravelDocumentBase"...
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.kuali.kfs.module.tem.TemKeyConstants; import org.kuali.kfs.module.tem.document...
import javax.servlet.http.*; import org.apache.struts.action.*; import org.kuali.kfs.module.tem.*; import org.kuali.kfs.module.tem.document.*; import org.kuali.kfs.module.tem.document.validation.event.*; import org.kuali.kfs.sys.*; import org.kuali.kfs.sys.context.*; import org.kuali.rice.kns.util.*; import org.kuali.r...
[ "javax.servlet", "org.apache.struts", "org.kuali.kfs", "org.kuali.rice" ]
javax.servlet; org.apache.struts; org.kuali.kfs; org.kuali.rice;
1,178,873
public boolean replay(T val) throws IOException;
boolean function(T val) throws IOException;
/** * Assign last value returned to actual. */
Assign last value returned to actual
replay
{ "repo_name": "gndpig/hadoop", "path": "src/mapred/org/apache/hadoop/mapred/join/ResetableIterator.java", "license": "apache-2.0", "size": 2999 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,911,567
OidcUserInfo getUserInfo();
OidcUserInfo getUserInfo();
/** * Returns the {@link OidcUserInfo UserInfo} containing claims about the user. * * @return the {@link OidcUserInfo} containing claims about the user. */
Returns the <code>OidcUserInfo UserInfo</code> containing claims about the user
getUserInfo
{ "repo_name": "eddumelendez/spring-security", "path": "oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/oidc/user/OidcUser.java", "license": "apache-2.0", "size": 2835 }
[ "org.springframework.security.oauth2.core.oidc.OidcUserInfo" ]
import org.springframework.security.oauth2.core.oidc.OidcUserInfo;
import org.springframework.security.oauth2.core.oidc.*;
[ "org.springframework.security" ]
org.springframework.security;
19,979
public void cancelQueries() throws KettleDatabaseException { // // Cancel all defined queries... // if ( databases != null ) { for ( int i = 0; i < databases.length; i++ ) { if ( databases[ i ] != null ) { databases[ i ].cancelQuery(); } } } }
void function() throws KettleDatabaseException { for ( int i = 0; i < databases.length; i++ ) { if ( databases[ i ] != null ) { databases[ i ].cancelQuery(); } } } }
/** * Call this to cancel trailing database queries (too long running, etc) */
Call this to cancel trailing database queries (too long running, etc)
cancelQueries
{ "repo_name": "tkafalas/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/trans/step/BaseStepMeta.java", "license": "apache-2.0", "size": 37553 }
[ "org.pentaho.di.core.exception.KettleDatabaseException" ]
import org.pentaho.di.core.exception.KettleDatabaseException;
import org.pentaho.di.core.exception.*;
[ "org.pentaho.di" ]
org.pentaho.di;
837,797
public static java.sql.Date convertToSqlDate(java.util.Date date) { return new java.sql.Date(date.getTime()); }
static java.sql.Date function(java.util.Date date) { return new java.sql.Date(date.getTime()); }
/** * Converts the given java.util.Date into an equivalent java.sql.Date * * @param date * @return java.sql.Date constructed from the given java.util.Date */
Converts the given java.util.Date into an equivalent java.sql.Date
convertToSqlDate
{ "repo_name": "jwillia/kc-old1", "path": "coeus-impl/src/main/java/org/kuali/coeus/sys/framework/util/DateUtils.java", "license": "agpl-3.0", "size": 9549 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,125,297
private static List<String> validateCli(CommandLine cmdLine) { final List<String> result = new ArrayList<>(); // validate optional parameters if (cmdLine.hasOption("f")) { final String format = cmdLine.getOptionValue("f"); if (!"plain".equals(format) && !"xml".equals(...
static List<String> function(CommandLine cmdLine) { final List<String> result = new ArrayList<>(); if (cmdLine.hasOption("f")) { final String format = cmdLine.getOptionValue("f"); if (!"plain".equals(format) && !"xml".equals(format)) { result.add(String.format(STR + STR, format)); } } if (cmdLine.hasOption("p")) { fina...
/** * Do validation of Command line options * @param cmdLine command line object * @return list of violations */
Do validation of Command line options
validateCli
{ "repo_name": "cs1331/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/Main.java", "license": "apache-2.0", "size": 15441 }
[ "java.io.File", "java.util.ArrayList", "java.util.List", "org.apache.commons.cli.CommandLine" ]
import java.io.File; import java.util.ArrayList; import java.util.List; import org.apache.commons.cli.CommandLine;
import java.io.*; import java.util.*; import org.apache.commons.cli.*;
[ "java.io", "java.util", "org.apache.commons" ]
java.io; java.util; org.apache.commons;
401,039
public void testTasksCumulativelyExceedingTTLimits() throws Exception { // Run the test only if memory management is enabled if (!isProcfsBasedTreeAvailable()) { return; } // Large enough for SleepJob Tasks. long PER_TASK_LIMIT = 100 * 1024L; // Start cluster with proper configu...
void function() throws Exception { if (!isProcfsBasedTreeAvailable()) { return; } long PER_TASK_LIMIT = 100 * 1024L; JobConf fConf = new JobConf(); fConf.setLong(JobTracker.MAPRED_CLUSTER_MAP_MEMORY_MB_PROPERTY, 1L); fConf.setLong( JobTracker.MAPRED_CLUSTER_REDUCE_MEMORY_MB_PROPERTY, 1L); long TASK_TRACKER_LIMIT = 2 * ...
/** * Test for verifying that tasks causing cumulative usage to go beyond TT's * limit get killed even though they all are under individual limits. Memory * management for tasks with disabled task-limits also traverses the same * code-path, so we don't need a separate testTaskLimitsDisabled. * * @thr...
Test for verifying that tasks causing cumulative usage to go beyond TT's limit get killed even though they all are under individual limits. Memory management for tasks with disabled task-limits also traverses the same code-path, so we don't need a separate testTaskLimitsDisabled
testTasksCumulativelyExceedingTTLimits
{ "repo_name": "InMobi/hadoop", "path": "src/test/org/apache/hadoop/mapred/TestTaskTrackerMemoryManager.java", "license": "apache-2.0", "size": 17345 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.List", "java.util.regex.Matcher", "java.util.regex.Pattern", "org.apache.hadoop.examples.SleepJob" ]
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.hadoop.examples.SleepJob;
import java.util.*; import java.util.regex.*; import org.apache.hadoop.examples.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
1,849,903
@Test public void testUpdateUser() throws Exception { UserDto user = createUser(KaaAuthorityDto.TENANT_DEVELOPER); user.setFirstName(generateString("NewFirst")); user.setLastName(generateString("NewLast")); UserDto updatedUser = client.editUser(user); ...
void function() throws Exception { UserDto user = createUser(KaaAuthorityDto.TENANT_DEVELOPER); user.setFirstName(generateString(STR)); user.setLastName(generateString(STR)); UserDto updatedUser = client.editUser(user); assertUsersEquals(updatedUser, user); }
/** * Test update user. * * @throws Exception the exception */
Test update user
testUpdateUser
{ "repo_name": "Deepnekroz/kaa", "path": "server/node/src/test/java/org/kaaproject/kaa/server/control/ControlServerUserIT.java", "license": "apache-2.0", "size": 4567 }
[ "org.kaaproject.kaa.common.dto.KaaAuthorityDto", "org.kaaproject.kaa.common.dto.admin.UserDto" ]
import org.kaaproject.kaa.common.dto.KaaAuthorityDto; import org.kaaproject.kaa.common.dto.admin.UserDto;
import org.kaaproject.kaa.common.dto.*; import org.kaaproject.kaa.common.dto.admin.*;
[ "org.kaaproject.kaa" ]
org.kaaproject.kaa;
303,149
@ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable<PrivateEndpointConnectionInner> listByService( String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) { return new PagedIterable<>(listByServiceAsync(resourceGroupName, searchServiceName, cli...
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<PrivateEndpointConnectionInner> function( String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) { return new PagedIterable<>(listByServiceAsync(resourceGroupName, searchServiceName, clientRequestId, context)); }
/** * Gets a list of all private endpoint connections in the given service. * * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this * value from the Azure Resource Manager API or the portal. * @param searchServiceName The name of the ...
Gets a list of all private endpoint connections in the given service
listByService
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateEndpointConnectionsClientImpl.java", "license": "mit", "size": 65744 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.core.util.Context", "com.azure.resourcemanager.search.fluent.models.PrivateEndpointConnectionInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.search.fluent.models.PrivateEndpointConnectionInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.search.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
679,656
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { activity.getCastDetailsFragment().showInstantToolbar(); activity.setCastDetailsFragment(null); activity.setRestoreMovieDetailsAdapterState(true); activity.setR...
void function(AdapterView<?> parent, View view, int position, long id) { activity.getCastDetailsFragment().showInstantToolbar(); activity.setCastDetailsFragment(null); activity.setRestoreMovieDetailsAdapterState(true); activity.setRestoreMovieDetailsState(false); if (moviesList.get(position).getMediaType().equals("movi...
/** * Callback method to be invoked when an item in this AdapterView has been clicked. * * @param parent The AdapterView where the click happened. * @param view The view within the AdapterView that was clicked (this will be a view provided by the adapter) * @param position The position of...
Callback method to be invoked when an item in this AdapterView has been clicked
onItemClick
{ "repo_name": "fridaysyckness/MovieDB", "path": "app/src/main/java/de/sourcestream/movieDB/controller/CastDetailsCredits.java", "license": "apache-2.0", "size": 9663 }
[ "android.app.FragmentManager", "android.app.FragmentTransaction", "android.os.Bundle", "android.view.View", "android.widget.AdapterView" ]
import android.app.FragmentManager; import android.app.FragmentTransaction; import android.os.Bundle; import android.view.View; import android.widget.AdapterView;
import android.app.*; import android.os.*; import android.view.*; import android.widget.*;
[ "android.app", "android.os", "android.view", "android.widget" ]
android.app; android.os; android.view; android.widget;
636,991
public void setCreated_at(Date created_at) { this.created_at = created_at; }
void function(Date created_at) { this.created_at = created_at; }
/** * This method was generated by MyBatis Generator. * This method sets the value of the database column vpns.created_at * * @param created_at the value for vpns.created_at * * @mbggenerated Tue May 26 15:53:09 CST 2015 */
This method was generated by MyBatis Generator. This method sets the value of the database column vpns.created_at
setCreated_at
{ "repo_name": "wolabs/womano", "path": "main/java/com/culabs/unicomportal/model/db/DBVpns.java", "license": "apache-2.0", "size": 11509 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
250,617
@Test @SmallTest @MinAndroidSdkLevel(Build.VERSION_CODES.M) public void testNodeInfo_Actions_OverflowScroll() throws Throwable { // Build a simple web page with a div and overflow:scroll setupTestWithHTML("<div title='1234' style='overflow:scroll; width: 200px; height:50px'>\n" ...
@MinAndroidSdkLevel(Build.VERSION_CODES.M) void function() throws Throwable { setupTestWithHTML(STR + STR + STR + STR); int vvIdDiv = waitForNodeMatching(sTextMatcher, "1234"); int vvIdP1 = waitForNodeMatching(sTextMatcher, STR); int vvIdP2 = waitForNodeMatching(sTextMatcher, STR); AccessibilityNodeInfo nodeInfoDiv = c...
/** * Test |AccessibilityNodeInfo| object actions for node is user scrollable. */
Test |AccessibilityNodeInfo| object actions for node is user scrollable
testNodeInfo_Actions_OverflowScroll
{ "repo_name": "ric2b/Vivaldi-browser", "path": "chromium/content/public/android/javatests/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityTest.java", "license": "bsd-3-clause", "size": 108058 }
[ "android.os.Build", "android.os.Bundle", "android.view.accessibility.AccessibilityNodeInfo", "org.chromium.base.test.util.MinAndroidSdkLevel", "org.junit.Assert" ]
import android.os.Build; import android.os.Bundle; import android.view.accessibility.AccessibilityNodeInfo; import org.chromium.base.test.util.MinAndroidSdkLevel; import org.junit.Assert;
import android.os.*; import android.view.accessibility.*; import org.chromium.base.test.util.*; import org.junit.*;
[ "android.os", "android.view", "org.chromium.base", "org.junit" ]
android.os; android.view; org.chromium.base; org.junit;
346,148
@Override public void onWindowFocusChanged(boolean hasWindowFocus) { super.onWindowFocusChanged(hasWindowFocus); if (hasWindowFocus && mSearchView.hasFocus() && getVisibility() == VISIBLE) { InputMethodManager inputManager = (InputMethodManager) getContext() ...
void function(boolean hasWindowFocus) { super.onWindowFocusChanged(hasWindowFocus); if (hasWindowFocus && mSearchView.hasFocus() && getVisibility() == VISIBLE) { InputMethodManager inputManager = (InputMethodManager) getContext() .getSystemService(Context.INPUT_METHOD_SERVICE); inputManager.showSoftInput(this, 0); if (...
/** * We override this method to be sure and show the soft keyboard if * appropriate when the TextView has focus. */
We override this method to be sure and show the soft keyboard if appropriate when the TextView has focus
onWindowFocusChanged
{ "repo_name": "syslover33/ctank", "path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/widget/SearchView.java", "license": "gpl-3.0", "size": 71165 }
[ "android.content.Context", "android.view.inputmethod.InputMethodManager" ]
import android.content.Context; import android.view.inputmethod.InputMethodManager;
import android.content.*; import android.view.inputmethod.*;
[ "android.content", "android.view" ]
android.content; android.view;
598,005
EntityReference perform(PersistentResourceDateReminder dateReminder) throws NotificationException;
EntityReference perform(PersistentResourceDateReminder dateReminder) throws NotificationException;
/** * Perform the date reminder * @param dateReminder * @return the resource */
Perform the date reminder
perform
{ "repo_name": "SilverDav/Silverpeas-Core", "path": "core-library/src/main/java/org/silverpeas/core/datereminder/provider/DateReminderProcess.java", "license": "agpl-3.0", "size": 1665 }
[ "org.silverpeas.core.datereminder.persistence.PersistentResourceDateReminder", "org.silverpeas.core.notification.NotificationException", "org.silverpeas.core.persistence.EntityReference" ]
import org.silverpeas.core.datereminder.persistence.PersistentResourceDateReminder; import org.silverpeas.core.notification.NotificationException; import org.silverpeas.core.persistence.EntityReference;
import org.silverpeas.core.datereminder.persistence.*; import org.silverpeas.core.notification.*; import org.silverpeas.core.persistence.*;
[ "org.silverpeas.core" ]
org.silverpeas.core;
2,005,937
void toBufferedImage(BufferedImage img) throws IllegalArgumentException;
void toBufferedImage(BufferedImage img) throws IllegalArgumentException;
/** * Writes the contents of the sprite to the given BufferedImage. * * @param img the passsed buffered image * @throws IllegalArgumentException if the width or height do not match */
Writes the contents of the sprite to the given BufferedImage
toBufferedImage
{ "repo_name": "abelbriggs1/runelite", "path": "runelite-api/src/main/java/net/runelite/api/SpritePixels.java", "license": "bsd-2-clause", "size": 2911 }
[ "java.awt.image.BufferedImage" ]
import java.awt.image.BufferedImage;
import java.awt.image.*;
[ "java.awt" ]
java.awt;
2,848,625
public void addHeader( String name, String value ) { header.put( name, value ); } public String status; public String mimeType; public InputStream data; public Properties header = new Properties(); } ...
void function( String name, String value ) { header.put( name, value ); } public String status; public String mimeType; public InputStream data; public Properties header = new Properties(); } public static final String HTTP_OK = STR, HTTP_PARTIALCONTENT = STR, HTTP_RANGE_NOT_SATISFIABLE = STR, HTTP_REDIRECT = STR, HTTP...
/** * Adds given line to the header. */
Adds given line to the header
addHeader
{ "repo_name": "EHJ-52n/OX-Framework", "path": "52n-oxf-third-party/oxf-third-party-nanohttpd/src/main/java/org/n52/oxf/ses/adapter/client/httplistener/NanoHTTPD.java", "license": "gpl-2.0", "size": 45727 }
[ "java.io.InputStream", "java.util.Properties" ]
import java.io.InputStream; import java.util.Properties;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,217,097
public BigDecimal getCostFuture () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CostFuture); if (bd == null) return Env.ZERO; return bd; }
BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CostFuture); if (bd == null) return Env.ZERO; return bd; }
/** Get Future Cost. @return Cost information */
Get Future Cost
getCostFuture
{ "repo_name": "neuroidss/adempiere", "path": "base/src/org/compiere/model/X_T_BOM_Indented.java", "license": "gpl-2.0", "size": 11523 }
[ "java.math.BigDecimal", "org.compiere.util.Env" ]
import java.math.BigDecimal; import org.compiere.util.Env;
import java.math.*; import org.compiere.util.*;
[ "java.math", "org.compiere.util" ]
java.math; org.compiere.util;
2,830,951
protected String getSqlForInsertInto(@SuppressWarnings("unused") InsertStatement insertStatement) { return "INSERT INTO "; } public static final class IdTable implements Table { private final String tableName; private final boolean isTemporary;
String function(@SuppressWarnings(STR) InsertStatement insertStatement) { return STR; } public static final class IdTable implements Table { private final String tableName; private final boolean isTemporary;
/** * Returns the INSERT INTO statement. * * @param insertStatement he {@linkplain InsertStatement} object which can be used by the overriding methods to customize the INSERT statement. * @return the INSERT INTO statement. */
Returns the INSERT INTO statement
getSqlForInsertInto
{ "repo_name": "alfasoftware/morf", "path": "morf-core/src/main/java/org/alfasoftware/morf/jdbc/SqlDialect.java", "license": "apache-2.0", "size": 144949 }
[ "org.alfasoftware.morf.metadata.Table", "org.alfasoftware.morf.sql.InsertStatement" ]
import org.alfasoftware.morf.metadata.Table; import org.alfasoftware.morf.sql.InsertStatement;
import org.alfasoftware.morf.metadata.*; import org.alfasoftware.morf.sql.*;
[ "org.alfasoftware.morf" ]
org.alfasoftware.morf;
1,483,935
protected boolean isCollection(String path) { return WebdavUtils.isCollection(token, slideToken, path); }
boolean function(String path) { return WebdavUtils.isCollection(token, slideToken, path); }
/** * Test if a resource given by a path is a collection */
Test if a resource given by a path is a collection
isCollection
{ "repo_name": "integrated/jakarta-slide-server", "path": "maven/jakarta-slide-webdavservlet/src/main/java/org/apache/slide/webdav/method/AbstractWebdavMethod.java", "license": "apache-2.0", "size": 60462 }
[ "org.apache.slide.webdav.util.WebdavUtils" ]
import org.apache.slide.webdav.util.WebdavUtils;
import org.apache.slide.webdav.util.*;
[ "org.apache.slide" ]
org.apache.slide;
1,820,825
public int expand(@IntRange(from = 0) int position, boolean animate, boolean shouldNotify) { position -= getHeaderLayoutCount(); IExpandable expandable = getExpandableItem(position); if (expandable == null) { return 0; } if (!hasSubItems(expandable)) { ...
int function(@IntRange(from = 0) int position, boolean animate, boolean shouldNotify) { position -= getHeaderLayoutCount(); IExpandable expandable = getExpandableItem(position); if (expandable == null) { return 0; } if (!hasSubItems(expandable)) { expandable.setExpanded(false); return 0; } int subItemCount = 0; if (!ex...
/** * Expand an expandable item * * @param position position of the item * @param animate expand items with animation * @param shouldNotify notify the RecyclerView to rebind items, <strong>false</strong> if you want to do it yourself. * @return the number of items that have been a...
Expand an expandable item
expand
{ "repo_name": "AFinalStone/adstar", "path": "uikit/src/com/netease/nim/uikit/common/ui/recyclerview/adapter/BaseQuickAdapter.java", "license": "apache-2.0", "size": 45166 }
[ "android.support.annotation.IntRange", "com.netease.nim.uikit.common.ui.recyclerview.entity.IExpandable", "java.util.List" ]
import android.support.annotation.IntRange; import com.netease.nim.uikit.common.ui.recyclerview.entity.IExpandable; import java.util.List;
import android.support.annotation.*; import com.netease.nim.uikit.common.ui.recyclerview.entity.*; import java.util.*;
[ "android.support", "com.netease.nim", "java.util" ]
android.support; com.netease.nim; java.util;
482,193
@Test public void testConvertBinarySidToString() throws Exception { byte[] sid = {(byte) 0x01, (byte) 0x05, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x05, (byte) 0x15, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0xe9, (byte...
void function() throws Exception { byte[] sid = {(byte) 0x01, (byte) 0x05, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x05, (byte) 0x15, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0xe9, (byte) 0x67, (byte) 0xbb, (byte) 0x98, (byte) 0xd6, (byte) 0xb7, (byte) 0xd7, (byte) 0xbf, (byte) 0x82...
/** * Example SID from "https://www.pcreview.co.uk/forums/thread-1458615.php". */
Example SID from "HREF"
testConvertBinarySidToString
{ "repo_name": "spring-projects/spring-ldap", "path": "core/src/test/java/org/springframework/ldap/support/LdapUtilsTest.java", "license": "apache-2.0", "size": 28075 }
[ "org.assertj.core.api.Assertions" ]
import org.assertj.core.api.Assertions;
import org.assertj.core.api.*;
[ "org.assertj.core" ]
org.assertj.core;
2,031,068
void attachChild(final FileName childName) { this.children.add(childName.getBaseName()); }
void attachChild(final FileName childName) { this.children.add(childName.getBaseName()); }
/** * Attaches a child to this file. The parent IsoFileSystem calls this method when building the file index. */
Attaches a child to this file. The parent IsoFileSystem calls this method when building the file index
attachChild
{ "repo_name": "Pennine-View-Harrogate/java-iso-tools", "path": "iso9660-vfs-impl/src/main/java/com/github/stephenc/javaisotools/vfs/provider/iso/IsoFileObject.java", "license": "lgpl-2.1", "size": 3661 }
[ "org.apache.commons.vfs.FileName" ]
import org.apache.commons.vfs.FileName;
import org.apache.commons.vfs.*;
[ "org.apache.commons" ]
org.apache.commons;
1,811,642
public CoapObserveRelation startObserve(CoapCallback callback) { return observe(new TradfriCoapHandler(callback)); }
CoapObserveRelation function(CoapCallback callback) { return observe(new TradfriCoapHandler(callback)); }
/** * Starts observation of the resource and uses the given callback to provide updates. * * @param callback the callback to use for updates */
Starts observation of the resource and uses the given callback to provide updates
startObserve
{ "repo_name": "paulianttila/openhab2", "path": "bundles/org.openhab.binding.tradfri/src/main/java/org/openhab/binding/tradfri/internal/TradfriCoapClient.java", "license": "epl-1.0", "size": 5407 }
[ "org.eclipse.californium.core.CoapObserveRelation" ]
import org.eclipse.californium.core.CoapObserveRelation;
import org.eclipse.californium.core.*;
[ "org.eclipse.californium" ]
org.eclipse.californium;
1,948,297
@Test public void testReducingState() throws Exception { final Deadline deadline = Deadline.now().plus(TEST_TIMEOUT); final long numElements = 1024L; StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); env.setStateBackend(stateBackend); env.setParallelism(maxParallelism...
void function() throws Exception { final Deadline deadline = Deadline.now().plus(TEST_TIMEOUT); final long numElements = 1024L; StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); env.setStateBackend(stateBackend); env.setParallelism(maxParallelism); env.setRestartStrategy(RestartStra...
/** * Tests simple reducing state queryable state instance. Each source emits * (subtaskIndex, 0)..(subtaskIndex, numElements) tuples, which are then * queried. The reducing state instance sums these up. The test succeeds * after each subtask index is queried with result n*(n+1)/2. */
Tests simple reducing state queryable state instance. Each source emits (subtaskIndex, 0)..(subtaskIndex, numElements) tuples, which are then queried. The reducing state instance sums these up. The test succeeds after each subtask index is queried with result n*(n+1)/2
testReducingState
{ "repo_name": "mylog00/flink", "path": "flink-queryable-state/flink-queryable-state-runtime/src/test/java/org/apache/flink/queryablestate/itcases/AbstractQueryableStateTestBase.java", "license": "apache-2.0", "size": 48289 }
[ "org.apache.flink.api.common.restartstrategy.RestartStrategies", "org.apache.flink.api.common.state.ReducingStateDescriptor", "org.apache.flink.api.common.time.Deadline", "org.apache.flink.api.java.functions.KeySelector", "org.apache.flink.api.java.tuple.Tuple2", "org.apache.flink.streaming.api.datastream...
import org.apache.flink.api.common.restartstrategy.RestartStrategies; import org.apache.flink.api.common.state.ReducingStateDescriptor; import org.apache.flink.api.common.time.Deadline; import org.apache.flink.api.java.functions.KeySelector; import org.apache.flink.api.java.tuple.Tuple2; import org.apache.flink.streami...
import org.apache.flink.api.common.restartstrategy.*; import org.apache.flink.api.common.state.*; import org.apache.flink.api.common.time.*; import org.apache.flink.api.java.functions.*; import org.apache.flink.api.java.tuple.*; import org.apache.flink.streaming.api.datastream.*; import org.apache.flink.streaming.api.e...
[ "org.apache.flink" ]
org.apache.flink;
2,243,874
@Override public void onGoToFullscreen() { videoListView.setVisibility(View.INVISIBLE); }
void function() { videoListView.setVisibility(View.INVISIBLE); }
/** * When the video player goes into fullscreen, hide the video list so that the video player can * occupy the entire screen. */
When the video player goes into fullscreen, hide the video list so that the video player can occupy the entire screen
onGoToFullscreen
{ "repo_name": "phpeng-ms/google-media-framework-android", "path": "demo/src/main/java/com/google/googlemediaframeworkdemo/demo/MainActivity.java", "license": "apache-2.0", "size": 12693 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
451,064
public static void deleteAllFilesAndFolderInFolderOlderThan(String folderPath, long timeInMillis) { FileUtil.deleteAllFilesAndFolderInFolderOlderThan(new File(folderPath), timeInMillis); }
static void function(String folderPath, long timeInMillis) { FileUtil.deleteAllFilesAndFolderInFolderOlderThan(new File(folderPath), timeInMillis); }
/** Deletes all files and folders in the specified folder that are older than the * specified time in milliseconds. Only the time of the files and folders in the specified folder * are checked not the time of files or folders that belong to subfolders. * !! Be careful !! * @param folderPath * @param time...
Deletes all files and folders in the specified folder that are older than the specified time in milliseconds. Only the time of the files and folders in the specified folder are checked not the time of files or folders that belong to subfolders. !! Be careful !
deleteAllFilesAndFolderInFolderOlderThan
{ "repo_name": "idega/com.idega.core", "path": "src/java/com/idega/util/FileUtil.java", "license": "gpl-3.0", "size": 36128 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,762,136
private static void prepareDataObject(final String dataset, final Data data, int columns) throws IOException {
static void function(final String dataset, final Data data, int columns) throws IOException {
/** * Loads hierarchies * @param dataset * @param data * @param columns * @return * @throws IOException */
Loads hierarchies
prepareDataObject
{ "repo_name": "arx-deidentifier/uniqueness-benchmark", "path": "src/org/deidentifier/arx/benchmark/ExperimentImpactPolygamma.java", "license": "apache-2.0", "size": 7796 }
[ "java.io.IOException", "org.deidentifier.arx.Data" ]
import java.io.IOException; import org.deidentifier.arx.Data;
import java.io.*; import org.deidentifier.arx.*;
[ "java.io", "org.deidentifier.arx" ]
java.io; org.deidentifier.arx;
86,138
public Clob getClob(int columnIndex) throws SQLException { return _rs.getClob(columnIndex - 1); }
Clob function(int columnIndex) throws SQLException { return _rs.getClob(columnIndex - 1); }
/** * Returns the clob value for the column. */
Returns the clob value for the column
getClob
{ "repo_name": "dlitz/resin", "path": "modules/resin/src/com/caucho/db/jdbc/ResultSetImpl.java", "license": "gpl-2.0", "size": 13797 }
[ "java.sql.Clob", "java.sql.SQLException" ]
import java.sql.Clob; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
243,281
public Collection<Object> getActualTypeArguments() { throw new UnsupportedOperationException("getActualTypeArguments"); }
Collection<Object> function() { throw new UnsupportedOperationException(STR); }
/** * Not supported. */
Not supported
getActualTypeArguments
{ "repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs", "path": "moxy/org.eclipse.persistence.moxy.dynamicxjc/src/org/eclipse/persistence/jaxb/javamodel/xjc/XJCJavaMethodImpl.java", "license": "epl-1.0", "size": 13423 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,156,381
public static native AceCommandDescription fromJavaScript(JavaScriptObject obj) ;
static native AceCommandDescription function(JavaScriptObject obj) ;
/** * Create Ace command from javascript object. * @param obj javascript object describing Ace command * @return Ace command description object */
Create Ace command from javascript object
fromJavaScript
{ "repo_name": "MeasureAuthoringTool/MeasureAuthoringTool_Release", "path": "mat/src/main/java/edu/ycp/cs/dh/acegwt/client/ace/AceCommandDescription.java", "license": "cc0-1.0", "size": 13707 }
[ "com.google.gwt.core.client.JavaScriptObject" ]
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.*;
[ "com.google.gwt" ]
com.google.gwt;
73,013
public TaskTO getNextScheduledTask(Date upperBound);
TaskTO function(Date upperBound);
/** * Return the next task to be scheduled. * * @param upperBound * The upper bound of the task's next execution (exclusive). * @return TaskTO or null if there is none. */
Return the next task to be scheduled
getNextScheduledTask
{ "repo_name": "Communote/communote-server", "path": "communote/api/src/main/java/com/communote/server/api/core/task/TaskManagement.java", "license": "apache-2.0", "size": 12886 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
126,996
public Map<String, DateTime> getDateTimeInvalidChars() { return getDateTimeInvalidCharsWithServiceResponseAsync().toBlocking().single().body(); }
Map<String, DateTime> function() { return getDateTimeInvalidCharsWithServiceResponseAsync().toBlocking().single().body(); }
/** * Get date dictionary value {"0": "2000-12-01t00:00:01z", "1": "date-time"}. * * @return the Map&lt;String, DateTime&gt; object if successful. */
Get date dictionary value {"0": "2000-12-01t00:00:01z", "1": "date-time"}
getDateTimeInvalidChars
{ "repo_name": "matthchr/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydictionary/implementation/DictionarysImpl.java", "license": "mit", "size": 210563 }
[ "java.util.Map", "org.joda.time.DateTime" ]
import java.util.Map; import org.joda.time.DateTime;
import java.util.*; import org.joda.time.*;
[ "java.util", "org.joda.time" ]
java.util; org.joda.time;
2,119,912
public static final AlertPolicyServiceClient create(AlertPolicyServiceSettings settings) throws IOException { return new AlertPolicyServiceClient(settings); }
static final AlertPolicyServiceClient function(AlertPolicyServiceSettings settings) throws IOException { return new AlertPolicyServiceClient(settings); }
/** * Constructs an instance of AlertPolicyServiceClient, using the given settings. The channels are * created based on the settings passed in, or defaults for any settings that are not set. */
Constructs an instance of AlertPolicyServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set
create
{ "repo_name": "vam-google/google-cloud-java", "path": "google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/AlertPolicyServiceClient.java", "license": "apache-2.0", "size": 33230 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,189,936
private boolean isLeadingDigitZero(Map<Character, Integer> letterToDigit) { return letterToDigit.keySet().stream() .filter(key -> letterToDigit.get(key) == 0) // Find the character that is mapped to digit 0 .filter(charMappedToZero -> wordResult.charAt(0) == c...
boolean function(Map<Character, Integer> letterToDigit) { return letterToDigit.keySet().stream() .filter(key -> letterToDigit.get(key) == 0) .filter(charMappedToZero -> wordResult.charAt(0) == charMappedToZero wordsToSum.stream() .map(word -> word.charAt(0)) .anyMatch(character -> character == charMappedToZero)) .count...
/** * Returns true if the mapping letters to digits using {@code letterToDigit} will result in having zero as a * leading digit. */
Returns true if the mapping letters to digits using letterToDigit will result in having zero as a leading digit
isLeadingDigitZero
{ "repo_name": "FridaTveit/xjava", "path": "exercises/alphametics/.meta/src/reference/java/Alphametics.java", "license": "mit", "size": 4910 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
363,923
public Drawable insertDrawable(final Drawable drawable, final int index) { if (!mComponentDrawables.contains(drawable)) { mComponentDrawables.add(index, drawable); return drawable; } return null; }
Drawable function(final Drawable drawable, final int index) { if (!mComponentDrawables.contains(drawable)) { mComponentDrawables.add(index, drawable); return drawable; } return null; }
/** * Inserts the given {@code Drawable} as a component painter to this {@code CompositeDrawable}. * * @param drawable The {@code Drawable} to be inserted. * @param index The specified index. * @return The inserted {@code Drawable}. May return {@code null} if inserting fails. */
Inserts the given Drawable as a component painter to this CompositeDrawable
insertDrawable
{ "repo_name": "Fuusio/fuusio-app", "path": "fuusio.api/src/main/java/org/fuusio/api/graphics/CompositeDrawable.java", "license": "apache-2.0", "size": 6977 }
[ "android.graphics.drawable.Drawable" ]
import android.graphics.drawable.Drawable;
import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
1,365,854
private final ConnectionPolicyConfig policyConfig() { return ( ConnectionPolicyConfig)this.getModel(); }
final ConnectionPolicyConfig function() { return ( ConnectionPolicyConfig)this.getModel(); }
/** * Returns this Config Model Object. */
Returns this Config Model Object
policyConfig
{ "repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs", "path": "utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/adapter/ConnectionPolicyAdapter.java", "license": "epl-1.0", "size": 2721 }
[ "org.eclipse.persistence.internal.sessions.factories.model.pool.ConnectionPolicyConfig" ]
import org.eclipse.persistence.internal.sessions.factories.model.pool.ConnectionPolicyConfig;
import org.eclipse.persistence.internal.sessions.factories.model.pool.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
2,452,795
private static List<ErrorInfo> getChildrenErrorsForCycleChecking( Iterable<SkyKey> children, SkyKey unfinishedChild, ParallelEvaluatorContext evaluatorContext) throws InterruptedException { List<ErrorInfo> allErrors = new ArrayList<>(); Set<? extends Map.Entry<SkyKey, ? extends NodeEntry>> childEn...
static List<ErrorInfo> function( Iterable<SkyKey> children, SkyKey unfinishedChild, ParallelEvaluatorContext evaluatorContext) throws InterruptedException { List<ErrorInfo> allErrors = new ArrayList<>(); Set<? extends Map.Entry<SkyKey, ? extends NodeEntry>> childEntries = evaluatorContext.getBatchValues(null, Reason.CY...
/** * Get all the errors of child nodes. * * @param children child nodes to query for errors. * @param unfinishedChild child which is allowed to not be done. * @return List of ErrorInfos from all children that had errors. */
Get all the errors of child nodes
getChildrenErrorsForCycleChecking
{ "repo_name": "aehlig/bazel", "path": "src/main/java/com/google/devtools/build/skyframe/SimpleCycleDetector.java", "license": "apache-2.0", "size": 25175 }
[ "com.google.devtools.build.skyframe.QueryableGraph", "java.util.ArrayList", "java.util.List", "java.util.Map", "java.util.Set" ]
import com.google.devtools.build.skyframe.QueryableGraph; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set;
import com.google.devtools.build.skyframe.*; import java.util.*;
[ "com.google.devtools", "java.util" ]
com.google.devtools; java.util;
1,591,120
public List<Object> toList() { List<Object> results = new ArrayList<Object>(this.myArrayList.size()); for (Object element : this.myArrayList) { if (element == null || JSONObject.NULL.equals(element)) { results.add(null); } else if (element instanceof JSONArray...
List<Object> function() { List<Object> results = new ArrayList<Object>(this.myArrayList.size()); for (Object element : this.myArrayList) { if (element == null JSONObject.NULL.equals(element)) { results.add(null); } else if (element instanceof JSONArray) { results.add(((JSONArray) element).toList()); } else if (element ...
/** * Returns a java.util.List containing all of the elements in this array. * If an element in the array is a JSONArray or JSONObject it will also * be converted. * <p> * Warning: This method assumes that the data structure is acyclical. * * @return a java.util.List containing the el...
Returns a java.util.List containing all of the elements in this array. If an element in the array is a JSONArray or JSONObject it will also be converted. Warning: This method assumes that the data structure is acyclical
toList
{ "repo_name": "videogreg93/AnglicismeWordEntryTool", "path": "src/org/json/JSONArray.java", "license": "mit", "size": 49085 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,648,962
public void addValueToIn(Object value, String name, Map<String, Object> map) { Object val = getValue(map, name); if (val instanceof Collection) { Object cleanValue = getCleanValue(value); ((Collection) val).add(cleanValue); } else if (val == null) { s...
void function(Object value, String name, Map<String, Object> map) { Object val = getValue(map, name); if (val instanceof Collection) { Object cleanValue = getCleanValue(value); ((Collection) val).add(cleanValue); } else if (val == null) { setValueForIn(value, name + "[0]", map); } else { throw new SlimFixtureException(...
/** * Adds a value to the end of a list. * @param value value to be passed. * @param name name to use this value for. * @param map map to store value in. */
Adds a value to the end of a list
addValueToIn
{ "repo_name": "GDasai/hsac-fitnesse-fixtures", "path": "src/main/java/nl/hsac/fitnesse/fixture/util/MapHelper.java", "license": "apache-2.0", "size": 9837 }
[ "java.util.Collection", "java.util.Map", "nl.hsac.fitnesse.fixture.slim.SlimFixtureException" ]
import java.util.Collection; import java.util.Map; import nl.hsac.fitnesse.fixture.slim.SlimFixtureException;
import java.util.*; import nl.hsac.fitnesse.fixture.slim.*;
[ "java.util", "nl.hsac.fitnesse" ]
java.util; nl.hsac.fitnesse;
136,380
public static final void plus(Structure s, Matrix matrix){ AtomIterator iter = new AtomIterator(s) ; Atom oldAtom = null; Atom rotOldAtom = null; while (iter.hasNext()) { Atom atom = null ; atom = (Atom) iter.next() ; try { if ( oldAtom != null){ //System.out.println("before " +getDistance...
static final void function(Structure s, Matrix matrix){ AtomIterator iter = new AtomIterator(s) ; Atom oldAtom = null; Atom rotOldAtom = null; while (iter.hasNext()) { Atom atom = null ; atom = (Atom) iter.next() ; try { if ( oldAtom != null){ } } catch (Exception e){ e.printStackTrace(); } oldAtom = (Atom)atom.clone()...
/** calculate structure + Matrix coodinates ... * * @param s the structure to operate on * @param matrix a Matrix object */
calculate structure + Matrix coodinates ..
plus
{ "repo_name": "sbliven/biojava", "path": "biojava3-structure/src/main/java/org/biojava/bio/structure/Calc.java", "license": "lgpl-2.1", "size": 21311 }
[ "org.biojava.bio.structure.jama.Matrix" ]
import org.biojava.bio.structure.jama.Matrix;
import org.biojava.bio.structure.jama.*;
[ "org.biojava.bio" ]
org.biojava.bio;
2,059,622
@Override public void onPassphraseTypeSelected(PassphraseType type) { if (!mProfileSyncService.isBackendInitialized()) { // If the backend was shut down since the dialog was opened, do nothing. return; } boolean isAllDataEncrypted = mProfileSyncService.isEncryptE...
void function(PassphraseType type) { if (!mProfileSyncService.isBackendInitialized()) { return; } boolean isAllDataEncrypted = mProfileSyncService.isEncryptEverythingEnabled(); boolean isUsingSecondaryPassphrase = mProfileSyncService.isUsingSecondaryPassphrase(); assert !isAllDataEncrypted; assert !isUsingSecondaryPass...
/** * Callback for PassphraseTypeDialogFragment.Listener */
Callback for PassphraseTypeDialogFragment.Listener
onPassphraseTypeSelected
{ "repo_name": "highweb-project/highweb-webcl-html5spec", "path": "chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java", "license": "bsd-3-clause", "size": 26836 }
[ "org.chromium.sync.PassphraseType" ]
import org.chromium.sync.PassphraseType;
import org.chromium.sync.*;
[ "org.chromium.sync" ]
org.chromium.sync;
79,986
public static Interest firstSegmentInterest(ContentName name, PublisherPublicKeyDigest publisher){ return segmentInterest(name, baseSegment(), publisher); }
static Interest function(ContentName name, PublisherPublicKeyDigest publisher){ return segmentInterest(name, baseSegment(), publisher); }
/** * Creates an Interest for the first segment. * * @param name ContentName for the desired ContentObject * @param publisher can be null * * @return interest **/
Creates an Interest for the first segment
firstSegmentInterest
{ "repo_name": "MobileCloudNetworking/icnaas", "path": "mcn-ccn-router/ccnx-0.8.2/javasrc/src/main/org/ccnx/ccn/profiles/SegmentationProfile.java", "license": "apache-2.0", "size": 23176 }
[ "org.ccnx.ccn.protocol.ContentName", "org.ccnx.ccn.protocol.Interest", "org.ccnx.ccn.protocol.PublisherPublicKeyDigest" ]
import org.ccnx.ccn.protocol.ContentName; import org.ccnx.ccn.protocol.Interest; import org.ccnx.ccn.protocol.PublisherPublicKeyDigest;
import org.ccnx.ccn.protocol.*;
[ "org.ccnx.ccn" ]
org.ccnx.ccn;
1,299,007
public void setLineItemReceivingDocument(LineItemReceivingDocument lineItemReceivingDocument) { this.lineItemReceivingDocument = lineItemReceivingDocument; }
void function(LineItemReceivingDocument lineItemReceivingDocument) { this.lineItemReceivingDocument = lineItemReceivingDocument; }
/** * Sets the LineItemReceivingDocument attribute value. * * @param LineItemReceivingDocument The LineItemReceivingDocument to set. * @deprecated */
Sets the LineItemReceivingDocument attribute value
setLineItemReceivingDocument
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/module/purap/businessobject/LineItemReceivingItem.java", "license": "agpl-3.0", "size": 8243 }
[ "org.kuali.kfs.module.purap.document.LineItemReceivingDocument" ]
import org.kuali.kfs.module.purap.document.LineItemReceivingDocument;
import org.kuali.kfs.module.purap.document.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,108,613
private void parseTzType(String group, String value, String paramTypes, VCardImpl vcard) throws VCardBuildException { try { TimeZoneFeature timeZoneFeature = new TimeZoneType(); if(paramTypes != null) { //VALUE=TEXT //-05:00; EST; Raleigh/North America String paramValue = paramTypes.substri...
void function(String group, String value, String paramTypes, VCardImpl vcard) throws VCardBuildException { try { TimeZoneFeature timeZoneFeature = new TimeZoneType(); if(paramTypes != null) { String paramValue = paramTypes.substring(paramTypes.indexOf('=')+1); if(paramValue.compareToIgnoreCase("TEXT") == 0) { timeZoneF...
/** * <p>Parses the TZ type.</p> * * @param group * @param value * @param paramTypes * @param vcard * @throws VCardBuildException */
Parses the TZ type
parseTzType
{ "repo_name": "FullMetal210/milton2", "path": "external/cardme/src/main/java/info/ineighborhood/cardme/engine/VCardEngine.java", "license": "agpl-3.0", "size": 85305 }
[ "info.ineighborhood.cardme.util.ISOUtils", "info.ineighborhood.cardme.vcard.VCardImpl", "info.ineighborhood.cardme.vcard.VCardType", "info.ineighborhood.cardme.vcard.errors.VCardBuildException", "info.ineighborhood.cardme.vcard.features.TimeZoneFeature", "info.ineighborhood.cardme.vcard.types.TimeZoneType...
import info.ineighborhood.cardme.util.ISOUtils; import info.ineighborhood.cardme.vcard.VCardImpl; import info.ineighborhood.cardme.vcard.VCardType; import info.ineighborhood.cardme.vcard.errors.VCardBuildException; import info.ineighborhood.cardme.vcard.features.TimeZoneFeature; import info.ineighborhood.cardme.vcard.t...
import info.ineighborhood.cardme.util.*; import info.ineighborhood.cardme.vcard.*; import info.ineighborhood.cardme.vcard.errors.*; import info.ineighborhood.cardme.vcard.features.*; import info.ineighborhood.cardme.vcard.types.*; import java.util.*;
[ "info.ineighborhood.cardme", "java.util" ]
info.ineighborhood.cardme; java.util;
654,362
static ScheduledCommand<LightCommand> getNextLightCommand() { ScheduledCommand<LightCommand> scheduledCommand = new ScheduledCommand<>(); Calendar currentTime = Calendar.getInstance(); Calendar onTime = sunriseSunsetCalculator.getCivilSunriseCalendarForDate(currentTime); if (curren...
static ScheduledCommand<LightCommand> getNextLightCommand() { ScheduledCommand<LightCommand> scheduledCommand = new ScheduledCommand<>(); Calendar currentTime = Calendar.getInstance(); Calendar onTime = sunriseSunsetCalculator.getCivilSunriseCalendarForDate(currentTime); if (currentTime.compareTo(onTime) <= 0) { schedu...
/** * Gets the next light command to schedule. * * @return next light command to schedule */
Gets the next light command to schedule
getNextLightCommand
{ "repo_name": "seanano/coop-webapp", "path": "CoopControl/src/main/java/org/seanano/coop/hardware/CoopScheduler.java", "license": "unlicense", "size": 4296 }
[ "java.util.Calendar", "org.seanano.coop.model.LightCommand", "org.seanano.coop.model.ScheduledCommand" ]
import java.util.Calendar; import org.seanano.coop.model.LightCommand; import org.seanano.coop.model.ScheduledCommand;
import java.util.*; import org.seanano.coop.model.*;
[ "java.util", "org.seanano.coop" ]
java.util; org.seanano.coop;
243,533
public static void createHomeAndStagingDirectory(String user, Configuration conf) { try { FileSystem fs = dfsCluster.getFileSystem(); String path = "/user/" + user; Path homeDirectory = new Path(path); if (!fs.exists(homeDirectory)) { LOG.info("Creating Home directory : " + h...
static void function(String user, Configuration conf) { try { FileSystem fs = dfsCluster.getFileSystem(); String path = STR + user; Path homeDirectory = new Path(path); if (!fs.exists(homeDirectory)) { LOG.info(STR + homeDirectory); fs.mkdirs(homeDirectory); changePermission(user, homeDirectory, fs); } changePermission...
/** * Methods to generate the home directory for dummy users. * * @param conf */
Methods to generate the home directory for dummy users
createHomeAndStagingDirectory
{ "repo_name": "gigaroby/hops", "path": "hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/GridmixTestUtils.java", "license": "apache-2.0", "size": 4336 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.fs.permission.FsPermission" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
972,319
private void populateRemainingFlowStructure(FlowDTO flowStructure) { processorResource.populateRemainingProcessorEntitiesContent(flowStructure.getProcessors()); connectionResource.populateRemainingConnectionEntitiesContent(flowStructure.getConnections()); inputPortResource.populateRemainingI...
void function(FlowDTO flowStructure) { processorResource.populateRemainingProcessorEntitiesContent(flowStructure.getProcessors()); connectionResource.populateRemainingConnectionEntitiesContent(flowStructure.getConnections()); inputPortResource.populateRemainingInputPortEntitiesContent(flowStructure.getInputPorts()); ou...
/** * Populates the remaining content of the specified snippet. */
Populates the remaining content of the specified snippet
populateRemainingFlowStructure
{ "repo_name": "MikeThomsen/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java", "license": "apache-2.0", "size": 133821 }
[ "org.apache.nifi.web.api.dto.ProcessGroupDTO", "org.apache.nifi.web.api.dto.flow.FlowDTO", "org.apache.nifi.web.api.entity.ProcessGroupEntity" ]
import org.apache.nifi.web.api.dto.ProcessGroupDTO; import org.apache.nifi.web.api.dto.flow.FlowDTO; import org.apache.nifi.web.api.entity.ProcessGroupEntity;
import org.apache.nifi.web.api.dto.*; import org.apache.nifi.web.api.dto.flow.*; import org.apache.nifi.web.api.entity.*;
[ "org.apache.nifi" ]
org.apache.nifi;
2,159,211
public void insertString(int offset, String text, AttributeSet attributeSet) throws BadLocationException { if (this.isNumber(text)) { super.insertString(offset, text, attributeSet); } }
void function(int offset, String text, AttributeSet attributeSet) throws BadLocationException { if (this.isNumber(text)) { super.insertString(offset, text, attributeSet); } }
/** * Inserts a String in the Document. * * @param offset * position on which the string should be added * @param text * the Text taht should be added * @param attributeSet * the formatting of the text * @...
Inserts a String in the Document
insertString
{ "repo_name": "vnu-dse/rtl", "path": "src/gui/org/tzi/use/gui/views/seqDiag/PropertiesWindow.java", "license": "gpl-2.0", "size": 35280 }
[ "javax.swing.text.AttributeSet", "javax.swing.text.BadLocationException" ]
import javax.swing.text.AttributeSet; import javax.swing.text.BadLocationException;
import javax.swing.text.*;
[ "javax.swing" ]
javax.swing;
402,967
public PropostaSumario adicionaProposta(long propostaId, String identificador, String ementa, int votosProposta, List<VotoSumario> votos) { PropostaSumario propostaSumario = new PropostaSumario(propostaId, this, identificador, ementa, votosProposta, votos); propostas.add(propostaSumario); totalVotos...
PropostaSumario function(long propostaId, String identificador, String ementa, int votosProposta, List<VotoSumario> votos) { PropostaSumario propostaSumario = new PropostaSumario(propostaId, this, identificador, ementa, votosProposta, votos); propostas.add(propostaSumario); totalVotos += votosProposta; return propostaS...
/** * Adiciona uma proposta a este eixo * * @param propostaId * @param identificador * @param ementa * @param votosProposta * @return */
Adiciona uma proposta a este eixo
adicionaProposta
{ "repo_name": "camaradosdeputadosoficial/edemocracia", "path": "cd-priorizacao-portlet/src/main/java/br/gov/camara/edemocracia/portlets/priorizacao/EixoSumario.java", "license": "lgpl-2.1", "size": 2700 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,425,721
public Deferred<Object> shutdown() { // This is part of step 3. We need to execute this in its own thread // because Netty gets stuck in an infinite loop if you try to shut it // down from within a thread of its own thread pool. They don't want // to fix this so as a workaround we always shut Netty'...
Deferred<Object> function() { final class ShutdownThread extends Thread { ShutdownThread() { super(STR + HBaseClient.super.hashCode() + STR); }
/** * Performs a graceful shutdown of this instance. * <p> * <ul> * <li>{@link #flush Flushes} all buffered edits.</li> * <li>Completes all outstanding requests.</li> * <li>Terminates all connections.</li> * <li>Releases all other resources.</li> * </ul> * <strong>Not calling this met...
Performs a graceful shutdown of this instance. <code>#flush Flushes</code> all buffered edits. Completes all outstanding requests. Terminates all connections. Releases all other resources. Not calling this method before losing the last reference to this instance may result in data loss and other unwanted side effects
shutdown
{ "repo_name": "mapr/asynchbase", "path": "src/HBaseClient.java", "license": "bsd-3-clause", "size": 150355 }
[ "com.stumbleupon.async.Deferred" ]
import com.stumbleupon.async.Deferred;
import com.stumbleupon.async.*;
[ "com.stumbleupon.async" ]
com.stumbleupon.async;
1,828,224
public static Object executeScript(String filePath, String functionName, ScriptContext scriptContext, Object[] args) throws ScriptException, NoSuchMethodException, IOException { Assert.notNull("filePath", filePath, "scriptContext", scriptContext); scriptContext.setAttribute(ScriptEngine.FILENAME, fi...
static Object function(String filePath, String functionName, ScriptContext scriptContext, Object[] args) throws ScriptException, NoSuchMethodException, IOException { Assert.notNull(STR, filePath, STR, scriptContext); scriptContext.setAttribute(ScriptEngine.FILENAME, filePath, ScriptContext.ENGINE_SCOPE); if (functionNa...
/** * Executes the script at the specified location and returns the result. * * @param filePath Script path and file name. * @param functionName Optional function or method to invoke. * @param scriptContext Script execution context. * @param args Function/method arguments. * @return ...
Executes the script at the specified location and returns the result
executeScript
{ "repo_name": "zamentur/ofbiz_ynh", "path": "sources/framework/base/src/org/ofbiz/base/util/ScriptUtil.java", "license": "apache-2.0", "size": 21971 }
[ "java.io.File", "java.io.FileReader", "java.io.IOException", "javax.script.CompiledScript", "javax.script.Invocable", "javax.script.ScriptContext", "javax.script.ScriptEngine", "javax.script.ScriptEngineManager", "javax.script.ScriptException", "org.ofbiz.base.location.FlexibleLocation" ]
import java.io.File; import java.io.FileReader; import java.io.IOException; import javax.script.CompiledScript; import javax.script.Invocable; import javax.script.ScriptContext; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; import javax.script.ScriptException; import org.ofbiz.base.location...
import java.io.*; import javax.script.*; import org.ofbiz.base.location.*;
[ "java.io", "javax.script", "org.ofbiz.base" ]
java.io; javax.script; org.ofbiz.base;
625,726
public void showProgressDialog() { if (mProgressDialog == null) { mProgressDialog = new ProgressDialog(this); mProgressDialog.setMessage(getString(R.string.sign_in_loading)); mProgressDialog.setIndeterminate(true); } mProgressDialog.show(); }
void function() { if (mProgressDialog == null) { mProgressDialog = new ProgressDialog(this); mProgressDialog.setMessage(getString(R.string.sign_in_loading)); mProgressDialog.setIndeterminate(true); } mProgressDialog.show(); }
/** * Helper method to show progress dialog */
Helper method to show progress dialog
showProgressDialog
{ "repo_name": "Ahmed-Abdelmeged/ADAS", "path": "app/src/main/java/com/example/mego/adas/auth/SignInActivity.java", "license": "apache-2.0", "size": 10737 }
[ "android.app.ProgressDialog" ]
import android.app.ProgressDialog;
import android.app.*;
[ "android.app" ]
android.app;
1,525,246
@CalledByNativeJavaTest public void testMultipleInstalledRelatedApps() throws Exception { RelatedApplication[] manifestRelatedApps = new RelatedApplication[] { createRelatedApplication(PLATFORM_ANDROID, PACKAGE_NAME_1, null), createRelatedApplication(PLATFORM_ANDROID, PAC...
void function() throws Exception { RelatedApplication[] manifestRelatedApps = new RelatedApplication[] { createRelatedApplication(PLATFORM_ANDROID, PACKAGE_NAME_1, null), createRelatedApplication(PLATFORM_ANDROID, PACKAGE_NAME_2, null), createRelatedApplication(PLATFORM_ANDROID, PACKAGE_NAME_3, null)}; setAssetStatemen...
/** * Two related Android apps; Android apps both installed and mutually related. * * <p>Web app also related to an app with the same name on another platform, and another Android * app which is not installed. */
Two related Android apps; Android apps both installed and mutually related. Web app also related to an app with the same name on another platform, and another Android app which is not installed
testMultipleInstalledRelatedApps
{ "repo_name": "endlessm/chromium-browser", "path": "chrome/android/native_java_unittests/src/org/chromium/chrome/browser/installedapp/InstalledAppProviderTest.java", "license": "bsd-3-clause", "size": 45922 }
[ "org.chromium.installedapp.mojom.RelatedApplication" ]
import org.chromium.installedapp.mojom.RelatedApplication;
import org.chromium.installedapp.mojom.*;
[ "org.chromium.installedapp" ]
org.chromium.installedapp;
1,019,300
public void lookup(final String[] domains, final String interfaceName, final DiscoveryQos discoveryQos, String[] gbids, final CapabilitiesCallback capabilitiesCallback) { DiscoveryScope discoveryScope = discoveryQos....
void function(final String[] domains, final String interfaceName, final DiscoveryQos discoveryQos, String[] gbids, final CapabilitiesCallback capabilitiesCallback) { DiscoveryScope discoveryScope = discoveryQos.getDiscoveryScope(); Set<DiscoveryEntryWithMetaInfo> localEntries = getLocalEntries(discoveryScope, gbids, do...
/** * Searches for capabilities by domain and interface name and gbids. * * @param domains The Domains for which the search is to be done. * @param interfaceName The interface for which the search is to be done. * @param discoveryQos The discovery quality of service for the search. * @para...
Searches for capabilities by domain and interface name and gbids
lookup
{ "repo_name": "bmwcarit/joynr", "path": "java/core/clustercontroller/src/main/java/io/joynr/capabilities/LocalCapabilitiesDirectoryImpl.java", "license": "apache-2.0", "size": 85287 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,238,913
public void addBranch(BranchNode node) throws InvalidVersionNumberException { if (node.version.isLessThan(this.version) || node.version.size() != (this.version.size()+2)) { throw new InvalidVersionNumberException("version must be grater"); } i...
void function(BranchNode node) throws InvalidVersionNumberException { if (node.version.isLessThan(this.version) node.version.size() != (this.version.size()+2)) { throw new InvalidVersionNumberException(STR); } int branchno = node.version.at(this.version.size()); if (branches == null) { branches = new TreeMap(); } branc...
/** * Adds a branch node to the current node. * @param node The branch node. * @throws InvalidVersionNumberException if the version number * is not a valid branch version number for the current node */
Adds a branch node to the current node
addBranch
{ "repo_name": "ouit0408/sakai", "path": "rwiki/rwiki-util/jrcs/src/completejava/org/apache/commons/jrcs/rcs/Node.java", "license": "apache-2.0", "size": 24048 }
[ "java.util.TreeMap" ]
import java.util.TreeMap;
import java.util.*;
[ "java.util" ]
java.util;
1,453,570
public Span findIdentifier(Name name, int startOffset) { List<Span> spans = identTable.get(name); if (spans != null) { startOffset = charToByteOffset(startOffset); for (Span span : spans) { if (span.getStart() >= startOffset) { return span; } } ...
Span function(Name name, int startOffset) { List<Span> spans = identTable.get(name); if (spans != null) { startOffset = charToByteOffset(startOffset); for (Span span : spans) { if (span.getStart() >= startOffset) { return span; } } } return null; }
/** * Returns the {@link Span} for the first known occurrence of the specified {@link Name}d * identifier, starting at or after the specified starting offset. Returns {@code null} if no * occurrences are found. */
Returns the <code>Span</code> for the first known occurrence of the specified <code>Name</code>d identifier, starting at or after the specified starting offset. Returns null if no occurrences are found
findIdentifier
{ "repo_name": "benjyw/kythe", "path": "kythe/java/com/google/devtools/kythe/analyzers/java/SourceText.java", "license": "apache-2.0", "size": 8597 }
[ "com.google.devtools.kythe.util.Span", "java.util.List", "javax.lang.model.element.Name" ]
import com.google.devtools.kythe.util.Span; import java.util.List; import javax.lang.model.element.Name;
import com.google.devtools.kythe.util.*; import java.util.*; import javax.lang.model.element.*;
[ "com.google.devtools", "java.util", "javax.lang" ]
com.google.devtools; java.util; javax.lang;
1,576,659
void setContext(Context context);
void setContext(Context context);
/** * Puzzles will receive the system Context some time between the initializaiton and onSurfaceCreated. * @param context An Android Context. */
Puzzles will receive the system Context some time between the initializaiton and onSurfaceCreated
setContext
{ "repo_name": "LightningDevStudios/CircuitCrawler", "path": "src/com/ltdev/cc/puzzle/IPuzzle.java", "license": "mit", "size": 1860 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
919,081
public void cacheResource(String key, CmsResource resource) { if (m_disabled.get(CacheType.RESOURCE) != null) { return; } m_cacheResource.put(key, resource); }
void function(String key, CmsResource resource) { if (m_disabled.get(CacheType.RESOURCE) != null) { return; } m_cacheResource.put(key, resource); }
/** * Caches the given resource under the given cache key.<p> * * @param key the cache key * @param resource the resource to cache */
Caches the given resource under the given cache key
cacheResource
{ "repo_name": "it-tavis/opencms-core", "path": "src/org/opencms/monitor/CmsMemoryMonitor.java", "license": "lgpl-2.1", "size": 86968 }
[ "org.opencms.file.CmsResource" ]
import org.opencms.file.CmsResource;
import org.opencms.file.*;
[ "org.opencms.file" ]
org.opencms.file;
139,583
private static void saveImage(ByteBuffer parentPrefix, int prefixLength, INodeDirectory current, DataOutputStream out) throws IOException { int newPrefixLength = prefixLength; if (current.getChildrenRaw() == null) ...
static void function(ByteBuffer parentPrefix, int prefixLength, INodeDirectory current, DataOutputStream out) throws IOException { int newPrefixLength = prefixLength; if (current.getChildrenRaw() == null) return; for(INode child : current.getChildren()) { parentPrefix.position(prefixLength); parentPrefix.put(PATH_SEPAR...
/** * Save file tree image starting from the given root. * This is a recursive procedure, which first saves all children of * a current directory and then moves inside the sub-directories. */
Save file tree image starting from the given root. This is a recursive procedure, which first saves all children of a current directory and then moves inside the sub-directories
saveImage
{ "repo_name": "wzhuo918/release-1.1.2-MDP", "path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java", "license": "apache-2.0", "size": 66702 }
[ "java.io.DataOutputStream", "java.io.IOException", "java.nio.ByteBuffer" ]
import java.io.DataOutputStream; import java.io.IOException; import java.nio.ByteBuffer;
import java.io.*; import java.nio.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
904,885
EList<SoftwareService> getServices();
EList<SoftwareService> getServices();
/** * Returns the value of the '<em><b>Services</b></em>' containment reference list. * The list contents are of type {@link org.scaledl.overview.architecture.SoftwareService}. * It is bidirectional and its opposite is '{@link org.scaledl.overview.architecture.SoftwareService#getSoftwareLayer <em>Software Layer</...
Returns the value of the 'Services' containment reference list. The list contents are of type <code>org.scaledl.overview.architecture.SoftwareService</code>. It is bidirectional and its opposite is '<code>org.scaledl.overview.architecture.SoftwareService#getSoftwareLayer Software Layer</code>'. If the meaning of the 'S...
getServices
{ "repo_name": "CloudScale-Project/Environment", "path": "plugins/org.scaledl.overview/src/org/scaledl/overview/architecture/SoftwareLayer.java", "license": "epl-1.0", "size": 2829 }
[ "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;
1,754,514
@SuppressWarnings({"CatchGenericClass"}) private void notifyLifecycleBeansEx(LifecycleEventType evt) { try { notifyLifecycleBeans(evt); } // Catch generic throwable to secure against user assertions. catch (Throwable e) { U.error(log, "Failed to notify lif...
@SuppressWarnings({STR}) void function(LifecycleEventType evt) { try { notifyLifecycleBeans(evt); } catch (Throwable e) { U.error(log, STR + evt + (gridName == null ? STR, gridName=" + gridName) + ']', e); if (e instanceof Error) throw (Error)e; } }
/** * Notifies life-cycle beans of grid event. * * @param evt Grid event. */
Notifies life-cycle beans of grid event
notifyLifecycleBeansEx
{ "repo_name": "tkpanther/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java", "license": "apache-2.0", "size": 116471 }
[ "org.apache.ignite.internal.util.typedef.internal.U", "org.apache.ignite.lifecycle.LifecycleEventType" ]
import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lifecycle.LifecycleEventType;
import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.lifecycle.*;
[ "org.apache.ignite" ]
org.apache.ignite;
523,821
public void disableBehaviour(NodeRef nodeRef, QName className);
void function(NodeRef nodeRef, QName className);
/** * Disable behaviour for specific node and class * <p> * The change applies <b>ONLY</b> to the current transaction. * * @param nodeRef the node to disable for * @param className the type/aspect behaviour to disable */
Disable behaviour for specific node and class The change applies ONLY to the current transaction
disableBehaviour
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/policy/BehaviourFilter.java", "license": "lgpl-3.0", "size": 6319 }
[ "org.alfresco.service.cmr.repository.NodeRef", "org.alfresco.service.namespace.QName" ]
import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName;
import org.alfresco.service.cmr.repository.*; import org.alfresco.service.namespace.*;
[ "org.alfresco.service" ]
org.alfresco.service;
2,372,634
public void runGame(Controller<MOVE> pacManController, Controller<EnumMap<GHOST, MOVE>> ghostController, boolean visual, int delay) { Game game = new Game(0); GameView gv = null; if (visual) gv = new GameView(game).showGame(); while (!game.gameOver()) { ...
void function(Controller<MOVE> pacManController, Controller<EnumMap<GHOST, MOVE>> ghostController, boolean visual, int delay) { Game game = new Game(0); GameView gv = null; if (visual) gv = new GameView(game).showGame(); while (!game.gameOver()) { game.advanceGame(pacManController.getMove(game.copy(), -1), ghostControl...
/** * Run a game in asynchronous mode: the game waits until a move is returned. In order to slow thing down in case the controllers * return very quickly, a time limit can be used. If fasted gameplay is required, this delay should be put as 0. * * @param pacManController * The Pac-Ma...
Run a game in asynchronous mode: the game waits until a move is returned. In order to slow thing down in case the controllers return very quickly, a time limit can be used. If fasted gameplay is required, this delay should be put as 0
runGame
{ "repo_name": "lrusnac/maig-2016", "path": "src/pacman/Executor.java", "license": "gpl-3.0", "size": 12934 }
[ "java.util.EnumMap" ]
import java.util.EnumMap;
import java.util.*;
[ "java.util" ]
java.util;
1,892,169
Role getRole(String module,String name) throws IllegalArgumentException;
Role getRole(String module,String name) throws IllegalArgumentException;
/** * Retrieve Role linked to User * @param module Admin Role's name * @param name Role's name * @return role linked * @throws IllegalArgumentException if role does not exist */
Retrieve Role linked to User
getRole
{ "repo_name": "aalquaiti/Castle", "path": "src/main/java/me/aymen/castle/user/User.java", "license": "apache-2.0", "size": 6646 }
[ "me.aymen.castle.role.Role" ]
import me.aymen.castle.role.Role;
import me.aymen.castle.role.*;
[ "me.aymen.castle" ]
me.aymen.castle;
291,525
void delete(String resourceGroupName, String profileName, String experimentName, Context context);
void delete(String resourceGroupName, String profileName, String experimentName, Context context);
/** * Deletes an Experiment. * * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param...
Deletes an Experiment
delete
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Experiments.java", "license": "mit", "size": 7245 }
[ "com.azure.core.util.Context" ]
import com.azure.core.util.Context;
import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
210,374
public UserPersistence getUserPersistence() { return userPersistence; }
UserPersistence function() { return userPersistence; }
/** * Returns the user persistence. * * @return the user persistence */
Returns the user persistence
getUserPersistence
{ "repo_name": "iucn-whp/world-heritage-outlook", "path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/base/understanding_benefitsLocalServiceBaseImpl.java", "license": "gpl-2.0", "size": 165788 }
[ "com.liferay.portal.service.persistence.UserPersistence" ]
import com.liferay.portal.service.persistence.UserPersistence;
import com.liferay.portal.service.persistence.*;
[ "com.liferay.portal" ]
com.liferay.portal;
500,246
@ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serviceName, String productId, PolicyIdName policyId, String ifMatch);
@ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serviceName, String productId, PolicyIdName policyId, String ifMatch);
/** * Deletes the policy configuration at the Product. * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the API Management service. * @param productId Product identifier. Must be unique in the current API Management service instance. * @param po...
Deletes the policy configuration at the Product
delete
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/fluent/ProductPoliciesClient.java", "license": "mit", "size": 11341 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.apimanagement.models.PolicyIdName" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.apimanagement.models.PolicyIdName;
import com.azure.core.annotation.*; import com.azure.resourcemanager.apimanagement.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,352,884
void execute(Tuple input, BasicOutputCollector collector);
void execute(Tuple input, BasicOutputCollector collector);
/** * Process the input tuple and optionally emit new tuples based on the input tuple. * <p> * All acking is managed for you. Throw a FailedException if you want to fail the tuple. */
Process the input tuple and optionally emit new tuples based on the input tuple. All acking is managed for you. Throw a FailedException if you want to fail the tuple
execute
{ "repo_name": "objmagic/heron", "path": "heron/api/src/java/com/twitter/heron/api/bolt/IBasicBolt.java", "license": "apache-2.0", "size": 1216 }
[ "com.twitter.heron.api.tuple.Tuple" ]
import com.twitter.heron.api.tuple.Tuple;
import com.twitter.heron.api.tuple.*;
[ "com.twitter.heron" ]
com.twitter.heron;
534,451
Type getItemType() { try { this.data = (ItemDataIfc) item.getData(); } catch (AssessmentException ex) { throw new DataFacadeException(ex.getMessage()); } TypeFacadeQueriesAPI typeFacadeQueries = PersistenceService.getInstance().getTypeFacadeQueries(); return typeFacadeQueries.getTy...
Type getItemType() { try { this.data = (ItemDataIfc) item.getData(); } catch (AssessmentException ex) { throw new DataFacadeException(ex.getMessage()); } TypeFacadeQueriesAPI typeFacadeQueries = PersistenceService.getInstance().getTypeFacadeQueries(); return typeFacadeQueries.getTypeById(this.data.getTypeId()); }
/** * Get the Type for this ItemFacade. * @return org.osid.shared.Type */
Get the Type for this ItemFacade
getItemType
{ "repo_name": "eemirtekin/Sakai-10.6-TR", "path": "samigo/samigo-services/src/java/org/sakaiproject/tool/assessment/facade/ItemFacade.java", "license": "apache-2.0", "size": 32871 }
[ "org.osid.assessment.AssessmentException", "org.osid.shared.Type", "org.sakaiproject.tool.assessment.data.ifc.assessment.ItemDataIfc", "org.sakaiproject.tool.assessment.services.PersistenceService" ]
import org.osid.assessment.AssessmentException; import org.osid.shared.Type; import org.sakaiproject.tool.assessment.data.ifc.assessment.ItemDataIfc; import org.sakaiproject.tool.assessment.services.PersistenceService;
import org.osid.assessment.*; import org.osid.shared.*; import org.sakaiproject.tool.assessment.data.ifc.assessment.*; import org.sakaiproject.tool.assessment.services.*;
[ "org.osid.assessment", "org.osid.shared", "org.sakaiproject.tool" ]
org.osid.assessment; org.osid.shared; org.sakaiproject.tool;
827,496
public void testSerialization() throws IOException { AB testAgg = createTestAggregatorBuilder(); try (BytesStreamOutput output = new BytesStreamOutput()) { output.writeNamedWriteable(testAgg); try (StreamInput in = new NamedWriteableAwareStreamInput(StreamInput.wrap(output.by...
void function() throws IOException { AB testAgg = createTestAggregatorBuilder(); try (BytesStreamOutput output = new BytesStreamOutput()) { output.writeNamedWriteable(testAgg); try (StreamInput in = new NamedWriteableAwareStreamInput(StreamInput.wrap(output.bytes()), namedWriteableRegistry)) { AggregationBuilder deseri...
/** * Test serialization and deserialization of the test AggregatorFactory. */
Test serialization and deserialization of the test AggregatorFactory
testSerialization
{ "repo_name": "palecur/elasticsearch", "path": "core/src/test/java/org/elasticsearch/search/aggregations/BaseAggregationTestCase.java", "license": "apache-2.0", "size": 14361 }
[ "java.io.IOException", "org.elasticsearch.common.io.stream.BytesStreamOutput", "org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput", "org.elasticsearch.common.io.stream.StreamInput" ]
import java.io.IOException; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput; import org.elasticsearch.common.io.stream.StreamInput;
import java.io.*; import org.elasticsearch.common.io.stream.*;
[ "java.io", "org.elasticsearch.common" ]
java.io; org.elasticsearch.common;
2,290,006
CreateExternalDataSource ds = new CreateExternalDataSource(); List<DataSourceInfo> dataSourceInfoList = ds.connect(null, null, null); DataSourceInfo dsInfo = dataSourceInfoList.get(0); assertTrue(dsInfo != null); assertNull(dsInfo.getDataStore()); assertNull(dsInfo.getTypeName...
CreateExternalDataSource ds = new CreateExternalDataSource(); List<DataSourceInfo> dataSourceInfoList = ds.connect(null, null, null); DataSourceInfo dsInfo = dataSourceInfoList.get(0); assertTrue(dsInfo != null); assertNull(dsInfo.getDataStore()); assertNull(dsInfo.getTypeName()); DummyExternalSLDFile dummyExternalSLDF...
/** * Test method for {@link * com.sldeditor.datasource.impl.CreateExternalDataSource#connect(com.sldeditor.datasource.SLDEditorFileInterface)}. */
Test method for <code>com.sldeditor.datasource.impl.CreateExternalDataSource#connect(com.sldeditor.datasource.SLDEditorFileInterface)</code>
testConnect
{ "repo_name": "robward-scisys/sldeditor", "path": "modules/application/src/test/java/com/sldeditor/test/unit/datasource/impl/CreateExternalDataSourceTest.java", "license": "gpl-3.0", "size": 2324 }
[ "com.sldeditor.datasource.SLDEditorFileInterface", "com.sldeditor.datasource.impl.CreateExternalDataSource", "com.sldeditor.datasource.impl.DataSourceInfo", "java.util.List", "org.junit.jupiter.api.Assertions" ]
import com.sldeditor.datasource.SLDEditorFileInterface; import com.sldeditor.datasource.impl.CreateExternalDataSource; import com.sldeditor.datasource.impl.DataSourceInfo; import java.util.List; import org.junit.jupiter.api.Assertions;
import com.sldeditor.datasource.*; import com.sldeditor.datasource.impl.*; import java.util.*; import org.junit.jupiter.api.*;
[ "com.sldeditor.datasource", "java.util", "org.junit.jupiter" ]
com.sldeditor.datasource; java.util; org.junit.jupiter;
259,710
public void setAnimationMode(AnimationIn animationIn, AnimationOut animationOut) { mAnimationInMode = animationIn; mAnimationOutMode = animationOut; }
void function(AnimationIn animationIn, AnimationOut animationOut) { mAnimationInMode = animationIn; mAnimationOutMode = animationOut; }
/** * Animation mode to play for new data coming in as well as the stale data that should be * animated out. * @param animationIn The animation to play to introduce new or updated data into view * @param animationOut The animation to play to transition stale data out of view. */
Animation mode to play for new data coming in as well as the stale data that should be animated out
setAnimationMode
{ "repo_name": "miswenwen/My_bird_work", "path": "Bird_work/我的项目/AliDeskClock/AliDeskClock_liuqipeng_11_11_drawaniamtion/src/com/android/deskclock/widget/sgv/StaggeredGridView.java", "license": "apache-2.0", "size": 168047 }
[ "com.android.deskclock.widget.sgv.SgvAnimationHelper" ]
import com.android.deskclock.widget.sgv.SgvAnimationHelper;
import com.android.deskclock.widget.sgv.*;
[ "com.android.deskclock" ]
com.android.deskclock;
228,450
@Override public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(LqnPackage.Literals.OR_LIST__ACTIVITY); } return childrenFeatures; }
Collection<? extends EStructuralFeature> function(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(LqnPackage.Literals.OR_LIST__ACTIVITY); } return childrenFeatures; }
/** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * <!-- begin-user-...
This specifies how to implement <code>#getChildren</code> and is used to deduce an appropriate feature for an <code>org.eclipse.emf.edit.command.AddCommand</code>, <code>org.eclipse.emf.edit.command.RemoveCommand</code> or <code>org.eclipse.emf.edit.command.MoveCommand</code> in <code>#createCommand</code>.
getChildrenFeatures
{ "repo_name": "aciancone/klapersuite", "path": "klapersuite.metamodel.lqn.edit/src/lqn/provider/OrListItemProvider.java", "license": "epl-1.0", "size": 4719 }
[ "java.util.Collection", "org.eclipse.emf.ecore.EStructuralFeature" ]
import java.util.Collection; import org.eclipse.emf.ecore.EStructuralFeature;
import java.util.*; import org.eclipse.emf.ecore.*;
[ "java.util", "org.eclipse.emf" ]
java.util; org.eclipse.emf;
222,963
@Override public void onArticleSelected(String articleTitle, String articleBody) { Fragment fragment = NewsBodyFragment.newInstance(articleTitle, articleBody); displayFragment(fragment, Constants.NEWS_BODY, true); }
void function(String articleTitle, String articleBody) { Fragment fragment = NewsBodyFragment.newInstance(articleTitle, articleBody); displayFragment(fragment, Constants.NEWS_BODY, true); }
/** * Callback from NewsFragment when a news article has been selected * * @param articleTitle article title * @param articleBody article text */
Callback from NewsFragment when a news article has been selected
onArticleSelected
{ "repo_name": "klinster/School-Work", "path": "490/smartmirror/app/src/main/java/org/main/smartmirror/smartmirror/MainActivity.java", "license": "mit", "size": 51084 }
[ "android.support.v4.app.Fragment" ]
import android.support.v4.app.Fragment;
import android.support.v4.app.*;
[ "android.support" ]
android.support;
1,831,593
//------------------------- AUTOGENERATED START ------------------------- ///CLOVER:OFF public static GlobalCycleOptions.Meta meta() { return GlobalCycleOptions.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(GlobalCycleOptions.Meta.INSTANCE); }
static GlobalCycleOptions.Meta function() { return GlobalCycleOptions.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(GlobalCycleOptions.Meta.INSTANCE); }
/** * The meta-bean for {@code GlobalCycleOptions}. * @return the meta-bean, not null */
The meta-bean for GlobalCycleOptions
meta
{ "repo_name": "jeorme/OG-Platform", "path": "sesame/sesame-engine/src/main/java/com/opengamma/sesame/server/GlobalCycleOptions.java", "license": "apache-2.0", "size": 21749 }
[ "org.joda.beans.JodaBeanUtils" ]
import org.joda.beans.JodaBeanUtils;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
2,846,451
@IgniteSpiConfiguration(optional = true) public void setDirectBuffer(boolean directBuf) { this.directBuf = directBuf; }
@IgniteSpiConfiguration(optional = true) void function(boolean directBuf) { this.directBuf = directBuf; }
/** * Sets flag to allocate direct or heap buffer in SPI. * If value is {@code true}, then SPI will use {@link ByteBuffer#allocateDirect(int)} call. * Otherwise, SPI will use {@link ByteBuffer#allocate(int)} call. * <p> * If not provided, default value is {@code true}. * * @param dire...
Sets flag to allocate direct or heap buffer in SPI. If value is true, then SPI will use <code>ByteBuffer#allocateDirect(int)</code> call. Otherwise, SPI will use <code>ByteBuffer#allocate(int)</code> call. If not provided, default value is true
setDirectBuffer
{ "repo_name": "gargvish/ignite", "path": "modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java", "license": "apache-2.0", "size": 130342 }
[ "org.apache.ignite.spi.IgniteSpiConfiguration" ]
import org.apache.ignite.spi.IgniteSpiConfiguration;
import org.apache.ignite.spi.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,712,564
public SocketAddress getRemoteAddress() { return this.socketAddress; }
SocketAddress function() { return this.socketAddress; }
/** * Returns the socket address of the remote side. Server-only. */
Returns the socket address of the remote side. Server-only
getRemoteAddress
{ "repo_name": "SuperUnitato/UnLonely", "path": "build/tmp/recompileMc/sources/net/minecraft/network/NetworkManager.java", "license": "lgpl-2.1", "size": 19949 }
[ "java.net.SocketAddress" ]
import java.net.SocketAddress;
import java.net.*;
[ "java.net" ]
java.net;
918,652
public Map<String, String> getOtherConfig(Connection c) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = "VM.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling...
Map<String, String> function(Connection c) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Obj...
/** * Get the other_config field of the given VM. * * @return value of the field */
Get the other_config field of the given VM
getOtherConfig
{ "repo_name": "cinderella/incubator-cloudstack", "path": "deps/XenServerJava/com/xensource/xenapi/VM.java", "license": "apache-2.0", "size": 169722 }
[ "com.xensource.xenapi.Types", "java.util.Map", "org.apache.xmlrpc.XmlRpcException" ]
import com.xensource.xenapi.Types; import java.util.Map; import org.apache.xmlrpc.XmlRpcException;
import com.xensource.xenapi.*; import java.util.*; import org.apache.xmlrpc.*;
[ "com.xensource.xenapi", "java.util", "org.apache.xmlrpc" ]
com.xensource.xenapi; java.util; org.apache.xmlrpc;
1,830,715
@WebMethod @WebResult(name = "rval", targetNamespace = "https://adwords.google.com/api/adwords/cm/v201409") @RequestWrapper(localName = "get", targetNamespace = "https://adwords.google.com/api/adwords/cm/v201409", className = "com.google.api.ads.adwords.jaxws.v201409.cm.MediaServiceInterfaceget") @Respo...
@WebResult(name = "rval", targetNamespace = STRgetSTRhttps: @ResponseWrapper(localName = "getResponseSTRhttps: MediaPage function( @WebParam(name = "serviceSelectorSTRhttps: Selector serviceSelector) throws ApiException_Exception ;
/** * * Returns a list of media that meet the criteria specified by the selector. * <p class="note"><b>Note:</b> {@code MediaService} will not return any * {@link ImageAd} image files.</p> * * @param serviceSelector Selects which media objects to r...
Returns a list of media that meet the criteria specified by the selector. Note: MediaService will not return any <code>ImageAd</code> image files
get
{ "repo_name": "nafae/developer", "path": "modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201409/cm/MediaServiceInterface.java", "license": "apache-2.0", "size": 4792 }
[ "javax.jws.WebParam", "javax.jws.WebResult", "javax.xml.ws.ResponseWrapper" ]
import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.ResponseWrapper;
import javax.jws.*; import javax.xml.ws.*;
[ "javax.jws", "javax.xml" ]
javax.jws; javax.xml;
649,706
@ApiModelProperty(value = "Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. ") public String getPrevious() { return previous; }
@ApiModelProperty(value = STR) String function() { return previous; }
/** * Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. * @return previous **/
Link to the previous subset of resources qualified. Empty if current subset is the first subset returned
getPrevious
{ "repo_name": "Minoli/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.store/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/dto/RatingListDTO.java", "license": "apache-2.0", "size": 4961 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,163,928
@Test public void testConversionCompressedTiff () { TiffConversionStrategy cs = new TiffConversionStrategy(); cs.setCLIConnector(new CommandLineConnector()); cs.setObject(o); ConversionInstruction ci = new ConversionInstruction(); ConversionRoutine cr = new ConversionRoutine(); ci.setConversion_routine...
void function () { TiffConversionStrategy cs = new TiffConversionStrategy(); cs.setCLIConnector(new CommandLineConnector()); cs.setObject(o); ConversionInstruction ci = new ConversionInstruction(); ConversionRoutine cr = new ConversionRoutine(); ci.setConversion_routine(cr); ci.setSource_file(new DAFile("rep+a",STR)); ...
/** * Test conversion compressed tiff. */
Test conversion compressed tiff
testConversionCompressedTiff
{ "repo_name": "da-nrw/DNSCore", "path": "ContentBroker/src/test/java/de/uzk/hki/da/convert/TiffConversionStrategyTests.java", "license": "gpl-3.0", "size": 6322 }
[ "de.uzk.hki.da.model.ConversionInstruction", "de.uzk.hki.da.model.ConversionRoutine", "de.uzk.hki.da.model.DAFile", "de.uzk.hki.da.utils.CommandLineConnector" ]
import de.uzk.hki.da.model.ConversionInstruction; import de.uzk.hki.da.model.ConversionRoutine; import de.uzk.hki.da.model.DAFile; import de.uzk.hki.da.utils.CommandLineConnector;
import de.uzk.hki.da.model.*; import de.uzk.hki.da.utils.*;
[ "de.uzk.hki" ]
de.uzk.hki;
1,339,037
@Override public void onStart() { super.onStart(); mGoogleApiClient = new GoogleApiClient.Builder(getActivity()) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(LocationServices.API) .build(); }
void function() { super.onStart(); mGoogleApiClient = new GoogleApiClient.Builder(getActivity()) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(LocationServices.API) .build(); }
/** * Called when the Fragment is visible to the user. This is generally * tied to {@link android.app.Activity#onStart() Activity.onStart} of the containing * Activity's lifecycle. */
Called when the Fragment is visible to the user. This is generally tied to <code>android.app.Activity#onStart() Activity.onStart</code> of the containing Activity's lifecycle
onStart
{ "repo_name": "coderaashir/android-client", "path": "mifosng-android/src/main/java/com/mifos/mifosxdroid/online/clientdetails/ClientDetailsFragment.java", "license": "mpl-2.0", "size": 32088 }
[ "com.google.android.gms.common.api.GoogleApiClient", "com.google.android.gms.location.LocationServices" ]
import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms.location.LocationServices;
import com.google.android.gms.common.api.*; import com.google.android.gms.location.*;
[ "com.google.android" ]
com.google.android;
1,334,742
@NotNull T randomIn(@NotNull Random random);
T randomIn(@NotNull Random random);
/** * Returns a randomly-selected value this is in this range. All values in this range have an * equal chance of being selected. * * @param random the {@link Random} instance to use * @return a randomly-selected value in this range */
Returns a randomly-selected value this is in this range. All values in this range have an equal chance of being selected
randomIn
{ "repo_name": "LucasPickering/LP-utils", "path": "src/main/java/me/lucaspickering/utils/range/Range.java", "license": "gpl-3.0", "size": 5631 }
[ "java.util.Random", "org.jetbrains.annotations.NotNull" ]
import java.util.Random; import org.jetbrains.annotations.NotNull;
import java.util.*; import org.jetbrains.annotations.*;
[ "java.util", "org.jetbrains.annotations" ]
java.util; org.jetbrains.annotations;
2,048,044
BasicPattern pattern = opBGP.getPattern(); BasicPattern pattern2 = this.reorder.reorder(pattern); return new OpBGP(pattern2); }
BasicPattern pattern = opBGP.getPattern(); BasicPattern pattern2 = this.reorder.reorder(pattern); return new OpBGP(pattern2); }
/** * Transforms BGPs with the reordering */
Transforms BGPs with the reordering
transform
{ "repo_name": "hdadler/sensetrace-src", "path": "com.ipv.sensetrace.RDFDatamanager/jena-2.11.0/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/optimize/TransformReorder.java", "license": "gpl-2.0", "size": 2697 }
[ "com.hp.hpl.jena.sparql.algebra.op.OpBGP", "com.hp.hpl.jena.sparql.core.BasicPattern" ]
import com.hp.hpl.jena.sparql.algebra.op.OpBGP; import com.hp.hpl.jena.sparql.core.BasicPattern;
import com.hp.hpl.jena.sparql.algebra.op.*; import com.hp.hpl.jena.sparql.core.*;
[ "com.hp.hpl" ]
com.hp.hpl;
1,209,211
public static Rights getRights(int value) { if(value == 1) { return MODERATOR; } else if(value == 2) { return ADMINISTRATOR; } else { return PLAYER; } } } private final IoSession session; private final ISAACCipher inCipher; private final ISAACCipher outCipher; pri...
static Rights function(int value) { if(value == 1) { return MODERATOR; } else if(value == 2) { return ADMINISTRATOR; } else { return PLAYER; } } } private final IoSession session; private final ISAACCipher inCipher; private final ISAACCipher outCipher; private final ActionSender actionSender = new ActionSender(this); p...
/** * Gets rights by a specific integer. * @param value The integer returned by {@link #toInteger()}. * @return The rights level. */
Gets rights by a specific integer
getRights
{ "repo_name": "nikkiii/unnamed-server", "path": "src/org/hyperion/rs2/model/Player.java", "license": "mit", "size": 15109 }
[ "java.util.LinkedList", "java.util.Queue", "org.apache.mina.core.session.IoSession", "org.hyperion.rs2.action.ActionQueue", "org.hyperion.rs2.content.chat.FriendsList", "org.hyperion.rs2.content.chat.IgnoreList", "org.hyperion.rs2.model.UpdateFlags", "org.hyperion.rs2.model.container.Bank", "org.hyp...
import java.util.LinkedList; import java.util.Queue; import org.apache.mina.core.session.IoSession; import org.hyperion.rs2.action.ActionQueue; import org.hyperion.rs2.content.chat.FriendsList; import org.hyperion.rs2.content.chat.IgnoreList; import org.hyperion.rs2.model.UpdateFlags; import org.hyperion.rs2.model.cont...
import java.util.*; import org.apache.mina.core.session.*; import org.hyperion.rs2.action.*; import org.hyperion.rs2.content.chat.*; import org.hyperion.rs2.model.*; import org.hyperion.rs2.model.container.*; import org.hyperion.rs2.net.*; import org.hyperion.rs2.util.*;
[ "java.util", "org.apache.mina", "org.hyperion.rs2" ]
java.util; org.apache.mina; org.hyperion.rs2;
997,744
List<ROIFigure> removeAllROI(long ownerID, int level) throws NoSuchROIException { Collection<ROI> rois = roiComponent.getROIMap().values(); Iterator<ROI> i = rois.iterator(); List<ROI> ownedRois = new ArrayList<ROI>(); ROI roi; List<ROIFigure> figures = new ArrayList<ROIFigure>(); switch (level) { ...
List<ROIFigure> removeAllROI(long ownerID, int level) throws NoSuchROIException { Collection<ROI> rois = roiComponent.getROIMap().values(); Iterator<ROI> i = rois.iterator(); List<ROI> ownedRois = new ArrayList<ROI>(); ROI roi; List<ROIFigure> figures = new ArrayList<ROIFigure>(); switch (level) { case MeasurementViewe...
/** * Removes all the <code>ROI</code> in the system. * Returns the collection of figures. * * @return See above. * @throws NoSuchROIException If the ROI does not exist. */
Removes all the <code>ROI</code> in the system. Returns the collection of figures
removeAllROI
{ "repo_name": "dominikl/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/measurement/view/MeasurementViewerModel.java", "license": "gpl-2.0", "size": 49600 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.Iterator", "java.util.List", "org.openmicroscopy.shoola.util.roi.exception.NoSuchROIException", "org.openmicroscopy.shoola.util.roi.figures.ROIFigure" ]
import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import org.openmicroscopy.shoola.util.roi.exception.NoSuchROIException; import org.openmicroscopy.shoola.util.roi.figures.ROIFigure;
import java.util.*; import org.openmicroscopy.shoola.util.roi.exception.*; import org.openmicroscopy.shoola.util.roi.figures.*;
[ "java.util", "org.openmicroscopy.shoola" ]
java.util; org.openmicroscopy.shoola;
1,800,258
public void setSyllabusDataEmailNotification(String emailNotification) { DecoratedSyllabusEntry entry = getEntry(); if (entry != null) { SyllabusData syllabusData = entry.getEntry(); if (syllabusData != null) { syllabusData.setEmailNo...
void function(String emailNotification) { DecoratedSyllabusEntry entry = getEntry(); if (entry != null) { SyllabusData syllabusData = entry.getEntry(); if (syllabusData != null) { syllabusData.setEmailNotification(emailNotification); } } }
/** * set the email notification setting for saving * @param emailNotification */
set the email notification setting for saving
setSyllabusDataEmailNotification
{ "repo_name": "hackbuteer59/sakai", "path": "syllabus/syllabus-app/src/java/org/sakaiproject/tool/syllabus/SyllabusTool.java", "license": "apache-2.0", "size": 91701 }
[ "org.sakaiproject.api.app.syllabus.SyllabusData" ]
import org.sakaiproject.api.app.syllabus.SyllabusData;
import org.sakaiproject.api.app.syllabus.*;
[ "org.sakaiproject.api" ]
org.sakaiproject.api;
2,044,984
public String query(String path, String query) throws IOException{ // TODO: Validate input strings MediaType JSON = MediaType.parse("application/json; charset=utf-8"); OkHttpClient client = new OkHttpClient(); RequestBody requestBody = RequestBody.create(JSON, query); Reques...
String function(String path, String query) throws IOException{ MediaType JSON = MediaType.parse(STR); OkHttpClient client = new OkHttpClient(); RequestBody requestBody = RequestBody.create(JSON, query); Request request = new Request.Builder() .url(connstr + path + STR) .post(requestBody) .build(); Response response = c...
/** * Searches the given location based on the given query. * @param path Location on the server to be searched. * @param query Json query to be sent to the server. * @return Returns a string containing the result of the operation. * @throws IOException Thrown if an error occured during the tra...
Searches the given location based on the given query
query
{ "repo_name": "Jacobchar/CMPUT301F15T12", "path": "Mybrary/app/src/main/java/com/example/jacob/mybrary/ConnectionManager.java", "license": "gpl-3.0", "size": 6668 }
[ "com.squareup.okhttp.MediaType", "com.squareup.okhttp.OkHttpClient", "com.squareup.okhttp.Request", "com.squareup.okhttp.RequestBody", "com.squareup.okhttp.Response", "java.io.IOException" ]
import com.squareup.okhttp.MediaType; import com.squareup.okhttp.OkHttpClient; import com.squareup.okhttp.Request; import com.squareup.okhttp.RequestBody; import com.squareup.okhttp.Response; import java.io.IOException;
import com.squareup.okhttp.*; import java.io.*;
[ "com.squareup.okhttp", "java.io" ]
com.squareup.okhttp; java.io;
1,917,415
public void removeWhereConstraint(DBCompareExpr cmpExpr) { if (where == null) return; removeConstraint(where, cmpExpr); }
void function(DBCompareExpr cmpExpr) { if (where == null) return; removeConstraint(where, cmpExpr); }
/** * removes a constraint on a particular column from the where clause * @param col the column expression for which to remove the constraint */
removes a constraint on a particular column from the where clause
removeWhereConstraint
{ "repo_name": "apache/empire-db", "path": "empire-db/src/main/java/org/apache/empire/db/DBCommand.java", "license": "apache-2.0", "size": 61286 }
[ "org.apache.empire.db.expr.compare.DBCompareExpr" ]
import org.apache.empire.db.expr.compare.DBCompareExpr;
import org.apache.empire.db.expr.compare.*;
[ "org.apache.empire" ]
org.apache.empire;
420,099
protected Mono<ServerResponse> renderErrorView(ServerRequest request) { boolean includeStackTrace = isIncludeStackTrace(request, MediaType.TEXT_HTML); Map<String, Object> error = getErrorAttributes(request, includeStackTrace); HttpStatus errorStatus = getHttpStatus(error); ServerResponse.BodyBuilder response...
Mono<ServerResponse> function(ServerRequest request) { boolean includeStackTrace = isIncludeStackTrace(request, MediaType.TEXT_HTML); Map<String, Object> error = getErrorAttributes(request, includeStackTrace); HttpStatus errorStatus = getHttpStatus(error); ServerResponse.BodyBuilder responseBody = ServerResponse.status...
/** * Render the error information as an HTML view. * @param request the current request * @return a {@code Publisher} of the HTTP response */
Render the error information as an HTML view
renderErrorView
{ "repo_name": "bclozel/spring-boot", "path": "spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandler.java", "license": "apache-2.0", "size": 8873 }
[ "java.util.Map", "org.springframework.http.HttpStatus", "org.springframework.http.MediaType", "org.springframework.web.reactive.function.server.ServerRequest", "org.springframework.web.reactive.function.server.ServerResponse" ]
import java.util.Map; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.web.reactive.function.server.ServerRequest; import org.springframework.web.reactive.function.server.ServerResponse;
import java.util.*; import org.springframework.http.*; import org.springframework.web.reactive.function.server.*;
[ "java.util", "org.springframework.http", "org.springframework.web" ]
java.util; org.springframework.http; org.springframework.web;
1,272,010
@Test public void testParameters() throws Exception { try { // bad input array length double a[] = { 1.0 }; double c[] = { 2.0 }; new PolynomialFunctionNewtonForm(a, c); Assert.fail("Expecting MathIllegalArgumentException - bad input array len...
void function() throws Exception { try { double a[] = { 1.0 }; double c[] = { 2.0 }; new PolynomialFunctionNewtonForm(a, c); Assert.fail(STR); } catch (MathIllegalArgumentException ex) { } try { double a[] = { 1.0, 2.0, 3.0, 4.0 }; double c[] = { 4.0, 3.0, 2.0, 1.0 }; new PolynomialFunctionNewtonForm(a, c); Assert.fail...
/** * Test of parameters for the polynomial. */
Test of parameters for the polynomial
testParameters
{ "repo_name": "SpoonLabs/astor", "path": "examples/math_50v2/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonFormTest.java", "license": "gpl-2.0", "size": 5540 }
[ "org.apache.commons.math.exception.MathIllegalArgumentException", "org.junit.Assert" ]
import org.apache.commons.math.exception.MathIllegalArgumentException; import org.junit.Assert;
import org.apache.commons.math.exception.*; import org.junit.*;
[ "org.apache.commons", "org.junit" ]
org.apache.commons; org.junit;
2,507,830
public Map<WellSetDouble, List<Double>> setsAggregated( Collection<WellSetDouble> collection, double[] weights, int begin, int length) { Preconditions.checkNotNull(collection, "The well set collection cannot be null."); Map<WellSetDouble, List<Double>> results = new Tre...
Map<WellSetDouble, List<Double>> function( Collection<WellSetDouble> collection, double[] weights, int begin, int length) { Preconditions.checkNotNull(collection, STR); Map<WellSetDouble, List<Double>> results = new TreeMap<WellSetDouble, List<Double>>(); for(WellSetDouble set : collection) { List<Double> aggregated = ...
/** * Returns the aggregated weighted statistic for each well set using the values * between the indices. * @param Collection<WellSetDouble> collection of well sets * @param double[] weights for the data set * @param int beginning index o...
Returns the aggregated weighted statistic for each well set using the values between the indices
setsAggregated
{ "repo_name": "jessemull/MicroFlex", "path": "src/main/java/com/github/jessemull/microflex/doubleflex/stat/DescriptiveStatisticListDoubleWeights.java", "license": "apache-2.0", "size": 26697 }
[ "com.github.jessemull.microflex.doubleflex.plate.WellDouble", "com.github.jessemull.microflex.doubleflex.plate.WellSetDouble", "com.google.common.base.Preconditions", "java.util.ArrayList", "java.util.Collection", "java.util.List", "java.util.Map", "java.util.TreeMap" ]
import com.github.jessemull.microflex.doubleflex.plate.WellDouble; import com.github.jessemull.microflex.doubleflex.plate.WellSetDouble; import com.google.common.base.Preconditions; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.TreeMap;
import com.github.jessemull.microflex.doubleflex.plate.*; import com.google.common.base.*; import java.util.*;
[ "com.github.jessemull", "com.google.common", "java.util" ]
com.github.jessemull; com.google.common; java.util;
2,276,090
public static <K, V> ArrayListMultimap<K, V> create(Multimap<? extends K, ? extends V> multimap) { return new ArrayListMultimap<>(multimap); } private ArrayListMultimap() { this(12, DEFAULT_VALUES_PER_KEY); } private ArrayListMultimap(int expectedKeys, int expectedValuesPerKey) { super(Platform....
static <K, V> ArrayListMultimap<K, V> function(Multimap<? extends K, ? extends V> multimap) { return new ArrayListMultimap<>(multimap); } private ArrayListMultimap() { this(12, DEFAULT_VALUES_PER_KEY); } private ArrayListMultimap(int expectedKeys, int expectedValuesPerKey) { super(Platform.<K, Collection<V>>newHashMapW...
/** * Constructs an {@code ArrayListMultimap} with the same mappings as the specified multimap. * * <p>This method will soon be deprecated in favor of {@code * MultimapBuilder.hashKeys().arrayListValues().build(multimap)}. * * @param multimap the multimap whose contents are copied to this multimap ...
Constructs an ArrayListMultimap with the same mappings as the specified multimap. This method will soon be deprecated in favor of MultimapBuilder.hashKeys().arrayListValues().build(multimap)
create
{ "repo_name": "rgoldberg/guava", "path": "android/guava/src/com/google/common/collect/ArrayListMultimap.java", "license": "apache-2.0", "size": 6621 }
[ "com.google.common.collect.CollectPreconditions", "java.util.Collection" ]
import com.google.common.collect.CollectPreconditions; import java.util.Collection;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,026,697
public String loginPageTitle(Context context) { return "org.dspace.eperson.LDAPAuthentication.title"; }
String function(Context context) { return STR; }
/** * Returns message key for title of the "login" page, to use * in a menu showing the choice of multiple login methods. * * @param context * DSpace context, will be modified (ePerson set) upon success. * * @return Message key to look up in i18n message catalog. */
Returns message key for title of the "login" page, to use in a menu showing the choice of multiple login methods
loginPageTitle
{ "repo_name": "rnathanday/dryad-repo", "path": "dspace-api/src/main/java/org/dspace/authenticate/LDAPAuthentication.java", "license": "bsd-3-clause", "size": 17159 }
[ "org.dspace.core.Context" ]
import org.dspace.core.Context;
import org.dspace.core.*;
[ "org.dspace.core" ]
org.dspace.core;
1,967,103
@Test public void pcepUpdateMsgTest22() throws PcepParseException, PcepOutOfBoundMessageException { byte[] updateMsg = new byte[] {0x20, 0x0b, 0x00, (byte) 0x48, 0x21, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, //SRP object 0x20, 0x10, 0x00, 0x10, 0...
void function() throws PcepParseException, PcepOutOfBoundMessageException { byte[] updateMsg = new byte[] {0x20, 0x0b, 0x00, (byte) 0x48, 0x21, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x10, 0x03, 0x00, 0x14, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x07, 0x10, 0x...
/** * This test case is for SRP object, LSP object(StatefulLspErrorCodeTlv), ERO object, * Bandwidth , metric object in PcepUpdate message. */
This test case is for SRP object, LSP object(StatefulLspErrorCodeTlv), ERO object, Bandwidth , metric object in PcepUpdate message
pcepUpdateMsgTest22
{ "repo_name": "maheshraju-Huawei/actn", "path": "apps/pcep-api/src/test/java/org/onosproject/pcep/pcepio/protocol/PcepUpdateMsgExtTest.java", "license": "apache-2.0", "size": 57967 }
[ "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers", "org.hamcrest.core.Is", "org.jboss.netty.buffer.ChannelBuffer", "org.jboss.netty.buffer.ChannelBuffers", "org.onosproject.pcep.pcepio.exceptions.PcepOutOfBoundMessageException", "org.onosproject.pcep.pcepio.exceptions.PcepParseException" ]
import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.hamcrest.core.Is; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.onosproject.pcep.pcepio.exceptions.PcepOutOfBoundMessageException; import org.onosproject.pcep.pcepio.exceptions.PcepParseEx...
import org.hamcrest.*; import org.hamcrest.core.*; import org.jboss.netty.buffer.*; import org.onosproject.pcep.pcepio.exceptions.*;
[ "org.hamcrest", "org.hamcrest.core", "org.jboss.netty", "org.onosproject.pcep" ]
org.hamcrest; org.hamcrest.core; org.jboss.netty; org.onosproject.pcep;
1,845,170
public void setData(int ordernr, int klantnr, String datum, ArrayList bestelLijst){ this.ordernr = ordernr; this.klantnr = klantnr; this.datum = datum; this.bestelLijst = bestelLijst; }
void function(int ordernr, int klantnr, String datum, ArrayList bestelLijst){ this.ordernr = ordernr; this.klantnr = klantnr; this.datum = datum; this.bestelLijst = bestelLijst; }
/** * Sets the ordernr, klantnr and bestelLijst. * * @param ordernr * @param klantnr * @param bestelLijst */
Sets the ordernr, klantnr and bestelLijst
setData
{ "repo_name": "WTJ01/ASRS-Controle", "path": "src/model/Pakbon.java", "license": "gpl-2.0", "size": 10475 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,833,821
@Test public void testOpen() { Assert.fail("Not yet implemented"); }
void function() { Assert.fail(STR); }
/** * Test method for {@link Percolation#open(int, int)}. */
Test method for <code>Percolation#open(int, int)</code>
testOpen
{ "repo_name": "esloho/coursera-algorithmsI", "path": "PercolationAssignment/Percolation/test/PercolationTest.java", "license": "gpl-3.0", "size": 1762 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,288,341
private void writeResultLine(BufferedWriter bw, ControlResultLine crl) throws IOException { bw.append(gson.toJson(crl).toString()); bw.append(sep); if (sample.size()<10){ sample.add(crl); } resultCount++; }
void function(BufferedWriter bw, ControlResultLine crl) throws IOException { bw.append(gson.toJson(crl).toString()); bw.append(sep); if (sample.size()<10){ sample.add(crl); } resultCount++; }
/** * Write result line. * * @param bw the bw * @param crl the crl * @throws IOException Signals that an I/O exception has occurred. */
Write result line
writeResultLine
{ "repo_name": "termMed/sct-descriptive-statistics-generator", "path": "src/main/java/com/termmed/control/patterns/SufficientlyDefinedWithSameCanonicalAsParent.java", "license": "apache-2.0", "size": 5842 }
[ "com.termmed.control.model.ControlResultLine", "java.io.BufferedWriter", "java.io.IOException" ]
import com.termmed.control.model.ControlResultLine; import java.io.BufferedWriter; import java.io.IOException;
import com.termmed.control.model.*; import java.io.*;
[ "com.termmed.control", "java.io" ]
com.termmed.control; java.io;
588,273