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 CreateBookingResponse createBooking(CreateBooking createBooking) throws RemoteException; | CreateBookingResponse function(CreateBooking createBooking) throws RemoteException; | /**
* Creates a booking for a user.
*
* @param createBooking request
* @return response
*/ | Creates a booking for a user | createBooking | {
"repo_name": "jeking3/scheduling-server",
"path": "MultiSiteProvider/src/au/edu/uts/eng/remotelabs/schedserver/multisite/provider/intf/MultiSite.java",
"license": "bsd-3-clause",
"size": 6022
} | [
"au.edu.uts.eng.remotelabs.schedserver.multisite.provider.intf.types.CreateBooking",
"au.edu.uts.eng.remotelabs.schedserver.multisite.provider.intf.types.CreateBookingResponse",
"java.rmi.RemoteException"
] | import au.edu.uts.eng.remotelabs.schedserver.multisite.provider.intf.types.CreateBooking; import au.edu.uts.eng.remotelabs.schedserver.multisite.provider.intf.types.CreateBookingResponse; import java.rmi.RemoteException; | import au.edu.uts.eng.remotelabs.schedserver.multisite.provider.intf.types.*; import java.rmi.*; | [
"au.edu.uts",
"java.rmi"
] | au.edu.uts; java.rmi; | 2,002,415 |
void saveConfiguration(WikiUserConfiguration configuration, String wikiId) throws WikiUserManagerException; | void saveConfiguration(WikiUserConfiguration configuration, String wikiId) throws WikiUserManagerException; | /**
* Save the configuration of the specified wiki.
* @param configuration configuration to save
* @param wikiId id of the wiki concerned by this configuration
* @throws WikiUserManagerException if problems occur
*/ | Save the configuration of the specified wiki | saveConfiguration | {
"repo_name": "xwiki/xwiki-platform",
"path": "xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-user/xwiki-platform-wiki-user-default/src/main/java/org/xwiki/wiki/user/internal/WikiUserConfigurationHelper.java",
"license": "lgpl-2.1",
"size": 1902
} | [
"org.xwiki.wiki.user.WikiUserConfiguration",
"org.xwiki.wiki.user.WikiUserManagerException"
] | import org.xwiki.wiki.user.WikiUserConfiguration; import org.xwiki.wiki.user.WikiUserManagerException; | import org.xwiki.wiki.user.*; | [
"org.xwiki.wiki"
] | org.xwiki.wiki; | 1,054,533 |
public People findPeopleByUsername(String username) throws IOException {
String _url = Uri.parse(END_POINT).buildUpon()
.appendQueryParameter("method", SEARCH_PEOPLE_METHOD)
.appendQueryParameter("api_key", API_KEY)
.appendQueryParameter("username", username)... | People function(String username) throws IOException { String _url = Uri.parse(END_POINT).buildUpon() .appendQueryParameter(STR, SEARCH_PEOPLE_METHOD) .appendQueryParameter(STR, API_KEY) .appendQueryParameter(STR, username) .appendQueryParameter(STR, OUTPUT_FORMAT) .build().toString(); return findPeopleByUserId(FlickrUt... | /**
* Find a people by user name
* @param username user name
* @return a people
*/ | Find a people by user name | findPeopleByUsername | {
"repo_name": "TwentySevenC/Flickr-Photos",
"path": "FlichrPhotos/app/src/main/java/com/android/liujian/flichrphotos/control/Flickr.java",
"license": "lgpl-3.0",
"size": 15960
} | [
"android.net.Uri",
"com.android.liujian.flichrphotos.model.People",
"java.io.IOException"
] | import android.net.Uri; import com.android.liujian.flichrphotos.model.People; import java.io.IOException; | import android.net.*; import com.android.liujian.flichrphotos.model.*; import java.io.*; | [
"android.net",
"com.android.liujian",
"java.io"
] | android.net; com.android.liujian; java.io; | 279,850 |
EList<ChargeProfileData> getChargeProfileData(); | EList<ChargeProfileData> getChargeProfileData(); | /**
* Returns the value of the '<em><b>Charge Profile Data</b></em>' reference list.
* The list contents are of type {@link CIM.IEC61970.Informative.MarketOperations.ChargeProfileData}.
* It is bidirectional and its opposite is '{@link CIM.IEC61970.Informative.MarketOperations.ChargeProfileData#getChargeProfile <... | Returns the value of the 'Charge Profile Data' reference list. The list contents are of type <code>CIM.IEC61970.Informative.MarketOperations.ChargeProfileData</code>. It is bidirectional and its opposite is '<code>CIM.IEC61970.Informative.MarketOperations.ChargeProfileData#getChargeProfile Charge Profile</code>'. If th... | getChargeProfileData | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Informative/MarketOperations/ChargeProfile.java",
"license": "mit",
"size": 9876
} | [
"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,651,595 |
public CellData setValueOfACellInAWorksheet(String cellName, String cellValue, String type) throws InvalidKeyException, NoSuchAlgorithmException, IOException {
CellData cell = null;
if(fileName == null || fileName.length() == 0) {
throw new IllegalArgumentException("File name cannot be null or empty");
... | CellData function(String cellName, String cellValue, String type) throws InvalidKeyException, NoSuchAlgorithmException, IOException { CellData cell = null; if(fileName == null fileName.length() == 0) { throw new IllegalArgumentException(STR); } if(worksheetName == null worksheetName.length() == 0) { throw new IllegalAr... | /**
* Set value of a cell in a worksheet
* @param cellName Cell name
* @param cellValue Cell value
* @param type Cell value type
* @throws java.security.InvalidKeyException If initialization fails because the provided key is null.
* @throws java.security.NoSuchAlgorithmException If the specified algorithm (... | Set value of a cell in a worksheet | setValueOfACellInAWorksheet | {
"repo_name": "asposeforcloud/Aspose_Cloud_SDK_For_Android",
"path": "asposecloudsdk/src/main/java/com/aspose/cloud/sdk/cells/api/Cell.java",
"license": "mit",
"size": 34616
} | [
"android.net.Uri",
"com.aspose.cloud.sdk.cells.model.CellsResponse",
"com.aspose.cloud.sdk.common.Utils",
"com.google.gson.Gson",
"java.io.IOException",
"java.io.InputStream",
"java.security.InvalidKeyException",
"java.security.NoSuchAlgorithmException"
] | import android.net.Uri; import com.aspose.cloud.sdk.cells.model.CellsResponse; import com.aspose.cloud.sdk.common.Utils; import com.google.gson.Gson; import java.io.IOException; import java.io.InputStream; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; | import android.net.*; import com.aspose.cloud.sdk.cells.model.*; import com.aspose.cloud.sdk.common.*; import com.google.gson.*; import java.io.*; import java.security.*; | [
"android.net",
"com.aspose.cloud",
"com.google.gson",
"java.io",
"java.security"
] | android.net; com.aspose.cloud; com.google.gson; java.io; java.security; | 34,784 |
public ServiceFuture<Object> upgradeFirmwareAsync(String resourceGroupName, String cacheName, final ServiceCallback<Object> serviceCallback) {
return ServiceFuture.fromResponse(upgradeFirmwareWithServiceResponseAsync(resourceGroupName, cacheName), serviceCallback);
} | ServiceFuture<Object> function(String resourceGroupName, String cacheName, final ServiceCallback<Object> serviceCallback) { return ServiceFuture.fromResponse(upgradeFirmwareWithServiceResponseAsync(resourceGroupName, cacheName), serviceCallback); } | /**
* Tells a cache to upgrade its firmware.
*
* @param resourceGroupName Target resource group.
* @param cacheName Name of cache.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the ... | Tells a cache to upgrade its firmware | upgradeFirmwareAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/storagecache/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/storagecache/v2019_08_01/implementation/CachesInner.java",
"license": "mit",
"size": 107334
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,116,367 |
protected final DifferenceSinkFactory toDifferenceSinkFactory(File path) {
return getTestTools().getDifferenceSinkFactory(path.toURI());
} | final DifferenceSinkFactory function(File path) { return getTestTools().getDifferenceSinkFactory(path.toURI()); } | /**
* Converts an output path to {@link DifferenceSinkFactory} to write to the path.
* @param path the output path
* @return the target sink factory
* @since 0.6.0
*/ | Converts an output path to <code>DifferenceSinkFactory</code> to write to the path | toDifferenceSinkFactory | {
"repo_name": "cocoatomo/asakusafw",
"path": "testing-project/asakusa-test-driver/src/main/java/com/asakusafw/testdriver/DriverOutputBase.java",
"license": "apache-2.0",
"size": 9503
} | [
"com.asakusafw.testdriver.core.DifferenceSinkFactory",
"java.io.File"
] | import com.asakusafw.testdriver.core.DifferenceSinkFactory; import java.io.File; | import com.asakusafw.testdriver.core.*; import java.io.*; | [
"com.asakusafw.testdriver",
"java.io"
] | com.asakusafw.testdriver; java.io; | 136,343 |
private Map<String, List<String>> getAllContentsOfEachCell(List<Feature> listFeatures) {
// Cette méthode servira pour l'auto-completion en javascript
String currentContent = "";
Map<String, List<String>> feat_content = new LinkedHashMap<String, List<String>>();
// Parcours de la map bestTypeForEachFeatur... | Map<String, List<String>> function(List<Feature> listFeatures) { String currentContent = STRtextSTR\nSTRSTRSTRtextSTR\nSTRSTR'STR`"); if(!listContents.contains(currentContent)) { listContents.add(currentContent); } } feat_content.put(featName, listContents); } } } } } return feat_content; } | /**
* function for find all content in cell for each feature
* @param listFeatures
* @return Map<String, List<String>>
*/ | function for find all content in cell for each feature | getAllContentsOfEachCell | {
"repo_name": "Ophelle/PDL",
"path": "src/main/java/org/opencompare/TraitementPcm.java",
"license": "apache-2.0",
"size": 14312
} | [
"java.util.List",
"java.util.Map",
"org.opencompare.api.java.Feature"
] | import java.util.List; import java.util.Map; import org.opencompare.api.java.Feature; | import java.util.*; import org.opencompare.api.java.*; | [
"java.util",
"org.opencompare.api"
] | java.util; org.opencompare.api; | 1,611,563 |
public ComposeableAdapterFactory getRootAdapterFactory() {
return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
} | ComposeableAdapterFactory function() { return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); } | /**
* This returns the root adapter factory that contains this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the root adapter factory that contains this factory. | getRootAdapterFactory | {
"repo_name": "CloudScale-Project/Environment",
"path": "plugins/org.scaledl.overview.edit/src/org/scaledl/overview/core/provider/CoreItemProviderAdapterFactory.java",
"license": "epl-1.0",
"size": 6368
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; | import org.eclipse.emf.edit.provider.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,081,752 |
static void addToRecentConnectionSettings(Hashtable settings,
ConnectionSetting newSetting) throws IOException {
settings.put(newSetting.getName(), newSetting);
ConnectionDialogCommon.storeRecentConnectionSettings(settings);
} | static void addToRecentConnectionSettings(Hashtable settings, ConnectionSetting newSetting) throws IOException { settings.put(newSetting.getName(), newSetting); ConnectionDialogCommon.storeRecentConnectionSettings(settings); } | /**
* Adds the new settings name if it does not nexist, or overwrites the old one.
*/ | Adds the new settings name if it does not nexist, or overwrites the old one | addToRecentConnectionSettings | {
"repo_name": "simeshev/parabuild-ci",
"path": "3rdparty/hsqldb1733/src/org/hsqldb/util/ConnectionDialogCommon.java",
"license": "lgpl-3.0",
"size": 12678
} | [
"java.io.IOException",
"java.util.Hashtable"
] | import java.io.IOException; import java.util.Hashtable; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,804,314 |
void rememberSyncState() {
if (getChildCount() > 0) {
mNeedSync = true;
mSyncHeight = mLayoutHeight;
if (mSelectedPosition >= 0) {
// Sync the selection state
View v = getChildAt(mSelectedPosition - mFirstPosition);
mSyncRowId = mNextSelectedRowId;
mSyncPosition = mNextSelectedPosi... | void rememberSyncState() { if (getChildCount() > 0) { mNeedSync = true; mSyncHeight = mLayoutHeight; if (mSelectedPosition >= 0) { View v = getChildAt(mSelectedPosition - mFirstPosition); mSyncRowId = mNextSelectedRowId; mSyncPosition = mNextSelectedPosition; if (v != null) { mSpecificTop = v.getTop(); } mSyncMode = SY... | /**
* Remember enough information to restore the screen state when the data has
* changed.
*
*/ | Remember enough information to restore the screen state when the data has changed | rememberSyncState | {
"repo_name": "Git-tl/appcan-plugin-timemachine-android",
"path": "uexTimeMachine/src/org/zywx/wbpalmstar/plugin/uextimemachine/CarouselAdapter.java",
"license": "lgpl-3.0",
"size": 33927
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 214,305 |
private boolean isPageMounted(Class<? extends Page> pageClass)
{
RequestCycle.get();
CharSequence path = getRequestCodingStrategy().pathForTarget(
new BookmarkablePageRequestTarget(pageClass));
return path != null;
} | boolean function(Class<? extends Page> pageClass) { RequestCycle.get(); CharSequence path = getRequestCodingStrategy().pathForTarget( new BookmarkablePageRequestTarget(pageClass)); return path != null; } | /**
* Checks whether the given <code>pageClass</code> is mounted.
*
* @param pageClass
* the <code>Class</code> of the <code>Page</code> to be checked
* @return true if the given <code>pageClass</code> is mounted, false otherwise
*/ | Checks whether the given <code>pageClass</code> is mounted | isPageMounted | {
"repo_name": "Servoy/wicket",
"path": "wicket/src/main/java/org/apache/wicket/request/AbstractRequestCycleProcessor.java",
"license": "apache-2.0",
"size": 17144
} | [
"org.apache.wicket.Page",
"org.apache.wicket.RequestCycle",
"org.apache.wicket.request.target.component.BookmarkablePageRequestTarget"
] | import org.apache.wicket.Page; import org.apache.wicket.RequestCycle; import org.apache.wicket.request.target.component.BookmarkablePageRequestTarget; | import org.apache.wicket.*; import org.apache.wicket.request.target.component.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 1,685,004 |
@Deprecated
public void finish() throws IOException
{
close();
} | void function() throws IOException { close(); } | /**
* Call this method to indicate end of data stream
* and to append any padding characters if necessary. This method should be
* called only if there will be no subsequent calls to a write method.
* Subsequent calls to the write method will result in incorrect encoding.
*
* @deprecated use the... | Call this method to indicate end of data stream and to append any padding characters if necessary. This method should be called only if there will be no subsequent calls to a write method. Subsequent calls to the write method will result in incorrect encoding | finish | {
"repo_name": "adamrduffy/trinidad-1.0.x",
"path": "trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/Base64OutputStream.java",
"license": "apache-2.0",
"size": 10959
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 698,655 |
public void runWithoutPermissions(Runnable r) {
runWithPermissions(r);
}
public static class AdjustablePolicy extends java.security.Policy {
Permissions perms = new Permissions();
AdjustablePolicy(Permission... permissions) {
for (Permission permission : permissions... | void function(Runnable r) { runWithPermissions(r); } public static class AdjustablePolicy extends java.security.Policy { Permissions perms = new Permissions(); AdjustablePolicy(Permission... permissions) { for (Permission permission : permissions) perms.add(permission); } void addPermission(Permission perm) { perms.add... | /**
* Runs a runnable without any permissions.
*/ | Runs a runnable without any permissions | runWithoutPermissions | {
"repo_name": "YouDiSN/OpenJDK-Research",
"path": "jdk9/jdk/test/java/util/concurrent/tck/JSR166TestCase.java",
"license": "gpl-2.0",
"size": 71963
} | [
"java.security.Permission",
"java.security.Permissions",
"java.security.Policy"
] | import java.security.Permission; import java.security.Permissions; import java.security.Policy; | import java.security.*; | [
"java.security"
] | java.security; | 1,152,428 |
public void removeRole(String role) {
checkHandle();
if (!role.startsWith("[")) {
role = "[" + role;
}
if (!role.endsWith("]")) {
role = role + "]";
}
Map<Integer,String> rolesByIndex = getRolesByIndex();
int roleIndex = -1;
for (int i=5; i<NotesConstants.ACL_PRIVCOUNT; i++) {
if (rol... | void function(String role) { checkHandle(); if (!role.startsWith("[")) { role = "[" + role; } if (!role.endsWith("]")) { role = role + "]"; } Map<Integer,String> rolesByIndex = getRolesByIndex(); int roleIndex = -1; for (int i=5; i<NotesConstants.ACL_PRIVCOUNT; i++) { if (role.equals(rolesByIndex.get(i))) { roleIndex =... | /**
* Removes a role from the ACL
*
* @param role role to remove
*/ | Removes a role from the ACL | removeRole | {
"repo_name": "klehmann/domino-jna",
"path": "domino-jna/src/main/java/com/mindoo/domino/jna/NotesACL.java",
"license": "apache-2.0",
"size": 31430
} | [
"com.mindoo.domino.jna.errors.NotesErrorUtils",
"com.mindoo.domino.jna.internal.DisposableMemory",
"com.mindoo.domino.jna.internal.NotesConstants",
"com.mindoo.domino.jna.internal.NotesNativeAPI",
"com.mindoo.domino.jna.utils.NotesStringUtils",
"com.sun.jna.Memory",
"java.util.LinkedHashMap",
"java.ut... | import com.mindoo.domino.jna.errors.NotesErrorUtils; import com.mindoo.domino.jna.internal.DisposableMemory; import com.mindoo.domino.jna.internal.NotesConstants; import com.mindoo.domino.jna.internal.NotesNativeAPI; import com.mindoo.domino.jna.utils.NotesStringUtils; import com.sun.jna.Memory; import java.util.Linked... | import com.mindoo.domino.jna.errors.*; import com.mindoo.domino.jna.internal.*; import com.mindoo.domino.jna.utils.*; import com.sun.jna.*; import java.util.*; | [
"com.mindoo.domino",
"com.sun.jna",
"java.util"
] | com.mindoo.domino; com.sun.jna; java.util; | 2,478,470 |
private void addTransitionToActiveCliOpts(Options transitionToActiveCliOpts) {
transitionToActiveCliOpts.addOption(FORCEACTIVE, false, "force active");
} | void function(Options transitionToActiveCliOpts) { transitionToActiveCliOpts.addOption(FORCEACTIVE, false, STR); } | /**
* Add CLI options which are specific to the transitionToActive command and
* no others.
*/ | Add CLI options which are specific to the transitionToActive command and no others | addTransitionToActiveCliOpts | {
"repo_name": "steveloughran/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java",
"license": "apache-2.0",
"size": 18207
} | [
"org.apache.commons.cli.Options"
] | import org.apache.commons.cli.Options; | import org.apache.commons.cli.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,009,517 |
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
SecurityContext sc = SecurityContextHolder.getContext();
if (sc.getAuthentication()!=null && sc.getAuthentication() inst... | void function(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { SecurityContext sc = SecurityContextHolder.getContext(); if (sc.getAuthentication()!=null && sc.getAuthentication() instanceof TicketAuthenticationToken) { if (LOG.isDebugEnabled()) { LOG.debug(STR)... | /**
* Detects if a ticket is associated with
* the current context and clears the context.
* @param request The servlet request.
* @param response The servlet response.
* @param chain The filter chain.
* @throws IOException - if something is wrong this exception is thrown.
* @t... | Detects if a ticket is associated with the current context and clears the context | doFilter | {
"repo_name": "Eisler/cosmo",
"path": "cosmo-core/src/main/java/org/unitedinternet/cosmo/acegisecurity/providers/ticket/TicketAuthenticationClearingFilter.java",
"license": "apache-2.0",
"size": 3020
} | [
"java.io.IOException",
"javax.servlet.FilterChain",
"javax.servlet.ServletException",
"javax.servlet.ServletRequest",
"javax.servlet.ServletResponse",
"org.springframework.security.core.context.SecurityContext",
"org.springframework.security.core.context.SecurityContextHolder",
"org.springframework.se... | import java.io.IOException; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; import... | import java.io.*; import javax.servlet.*; import org.springframework.security.core.context.*; | [
"java.io",
"javax.servlet",
"org.springframework.security"
] | java.io; javax.servlet; org.springframework.security; | 1,886,397 |
void readFully(byte[] target, int offset, int length) throws IOException, InterruptedException; | void readFully(byte[] target, int offset, int length) throws IOException, InterruptedException; | /**
* Equivalent to {@code readFully(target, offset, length, false)}.
*
* @param target A target array into which data should be written.
* @param offset The offset into the target array at which to write.
* @param length The number of bytes to read from the input.
* @throws EOFException If the end of... | Equivalent to readFully(target, offset, length, false) | readFully | {
"repo_name": "Menziess/Telegram-ASV",
"path": "TMessagesProj/src/main/java/org/telegram/messenger/exoplayer2/extractor/ExtractorInput.java",
"license": "gpl-2.0",
"size": 11538
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 187,770 |
public synchronized boolean persistRows(Vector<HashMap<String, Column>> columnsValuesMapVector, String tableName) {
boolean insertedRowFlag = false;
for (int k = 0; k < columnsValuesMapVector.size(); k++) {
HashMap<String, Column> messageColumnMap = columnsValuesMapVector.get(k);
StringBuffer columnsClau... | synchronized boolean function(Vector<HashMap<String, Column>> columnsValuesMapVector, String tableName) { boolean insertedRowFlag = false; for (int k = 0; k < columnsValuesMapVector.size(); k++) { HashMap<String, Column> messageColumnMap = columnsValuesMapVector.get(k); StringBuffer columnsClause = new StringBuffer(); ... | /**
* Insert a new row into the staging table using the contents of the inbound
* message hash map
*
* @param messageColumnMap
* contains the column (key) and the value from the inbound
* message
*/ | Insert a new row into the staging table using the contents of the inbound message hash map | persistRows | {
"repo_name": "IoanaSingureanu/mdia",
"path": "iexhub.adapter/src/main/java/org/iexhub/connectors/database/DatabaseMap.java",
"license": "apache-2.0",
"size": 8922
} | [
"java.util.HashMap",
"java.util.Iterator",
"java.util.Vector"
] | import java.util.HashMap; import java.util.Iterator; import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 1,144,328 |
public Color getUnitBarColor()
{
if (model.getState() == DISCARDED) return null;
if (model.getBrowser() == null) return null;
return model.getBrowser().getUnitBarColor();
} | Color function() { if (model.getState() == DISCARDED) return null; if (model.getBrowser() == null) return null; return model.getBrowser().getUnitBarColor(); } | /**
* Implemented as specified by the {@link ImViewer} interface.
* @see ImViewer#getUnitBarColor()
*/ | Implemented as specified by the <code>ImViewer</code> interface | getUnitBarColor | {
"repo_name": "tp81/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerComponent.java",
"license": "gpl-2.0",
"size": 96726
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,103,318 |
void removeSubregistry(MeterRegistry subregistry); | void removeSubregistry(MeterRegistry subregistry); | /**
* Removes the given registry from the cache's composite registry.
*
* <p>
* <strong>Caution:</strong> This method deletes from the sub-registry each meter that corresponds
* to a meter in the cache's composite registry.
*
* @param subregistry the registry to remove
*/ | Removes the given registry from the cache's composite registry. Caution: This method deletes from the sub-registry each meter that corresponds to a meter in the cache's composite registry | removeSubregistry | {
"repo_name": "PurelyApplied/geode",
"path": "geode-core/src/main/java/org/apache/geode/metrics/MetricsSession.java",
"license": "apache-2.0",
"size": 1963
} | [
"io.micrometer.core.instrument.MeterRegistry"
] | import io.micrometer.core.instrument.MeterRegistry; | import io.micrometer.core.instrument.*; | [
"io.micrometer.core"
] | io.micrometer.core; | 1,216,679 |
public void previous1()
{
if(CAFConfig.isEnableDebugging())
{
Log.d(TAG,"previous1 Method");
}
try
{
if(mAudioManager!=null)
{
mAudioManager = (AudioManager)localContext.getSystemService(Context.AUDIO_SERVICE);
if (mAudioManager.isMusicActive()) {
Intent mediaIntent = new Intent... | void function() { if(CAFConfig.isEnableDebugging()) { Log.d(TAG,STR); } try { if(mAudioManager!=null) { mAudioManager = (AudioManager)localContext.getSystemService(Context.AUDIO_SERVICE); if (mAudioManager.isMusicActive()) { Intent mediaIntent = new Intent(STR); mediaIntent.putExtra(STR, STR); localContext.sendBroadcas... | /**
* Description : Another way to play previous song
*/ | Description : Another way to play previous song | previous1 | {
"repo_name": "AndroidLearnerchn/contextawareframework",
"path": "ContextAwareFramework/src/com/contextawareframework/contextawarefunctions/ContextAwareFunction.java",
"license": "apache-2.0",
"size": 12322
} | [
"android.content.Context",
"android.content.Intent",
"android.media.AudioManager",
"android.util.Log",
"com.contextawareframework.globalvariable.CAFConfig"
] | import android.content.Context; import android.content.Intent; import android.media.AudioManager; import android.util.Log; import com.contextawareframework.globalvariable.CAFConfig; | import android.content.*; import android.media.*; import android.util.*; import com.contextawareframework.globalvariable.*; | [
"android.content",
"android.media",
"android.util",
"com.contextawareframework.globalvariable"
] | android.content; android.media; android.util; com.contextawareframework.globalvariable; | 2,426,873 |
public void getBoundsInParent(Rect outBounds) {
IMPL.getBoundsInParent(mInfo, outBounds);
} | void function(Rect outBounds) { IMPL.getBoundsInParent(mInfo, outBounds); } | /**
* Gets the node bounds in parent coordinates.
*
* @param outBounds The output node bounds.
*/ | Gets the node bounds in parent coordinates | getBoundsInParent | {
"repo_name": "masconsult/android-recipes-app",
"path": "vendors/android-support-v7-appcompat/libs-src/android-support-v4/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.java",
"license": "apache-2.0",
"size": 66994
} | [
"android.graphics.Rect"
] | import android.graphics.Rect; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 772,898 |
@Deprecated
void saveSource(Resource reference, String source);
// ----------- LINKS -------------- | void saveSource(Resource reference, String source); | /**
* Save the source code of a file. The file must be have been indexed before.
*
* @throws org.sonar.api.resources.DuplicatedSourceException if the source has already been set on this resource
* @since 1.10. Returns a boolean since 2.6.
* @deprecated since 4.2 Source import is done by the platform
*... | Save the source code of a file. The file must be have been indexed before | saveSource | {
"repo_name": "xinghuangxu/xinghuangxu.sonarqube",
"path": "sonar-plugin-api/src/main/java/org/sonar/api/batch/SensorContext.java",
"license": "lgpl-3.0",
"size": 7342
} | [
"org.sonar.api.resources.Resource"
] | import org.sonar.api.resources.Resource; | import org.sonar.api.resources.*; | [
"org.sonar.api"
] | org.sonar.api; | 1,663,578 |
public void addBuild(Build build) throws NameNotUniqueException {
addOrReplaceBuild(build, -1);
} | void function(Build build) throws NameNotUniqueException { addOrReplaceBuild(build, -1); } | /**
* Add a build to the database
*
* @param build
*/ | Add a build to the database | addBuild | {
"repo_name": "kiwiandroiddev/starcraft-2-build-player",
"path": "app/src/main/java/com/kiwiandroiddev/sc2buildassistant/database/DbAdapter.java",
"license": "mit",
"size": 43451
} | [
"com.kiwiandroiddev.sc2buildassistant.domain.entity.Build"
] | import com.kiwiandroiddev.sc2buildassistant.domain.entity.Build; | import com.kiwiandroiddev.sc2buildassistant.domain.entity.*; | [
"com.kiwiandroiddev.sc2buildassistant"
] | com.kiwiandroiddev.sc2buildassistant; | 1,046,552 |
IntSet getFirstSet(); | IntSet getFirstSet(); | /**
* Returns the <code>IntSet</code> of <code>Intervals</code> which
* are visible at the logical beginning of the the expression.
*/ | Returns the <code>IntSet</code> of <code>Intervals</code> which are visible at the logical beginning of the the expression | getFirstSet | {
"repo_name": "inxar/syntacs",
"path": "src/org/inxar/syntacs/grammar/regular/RegularExpression.java",
"license": "gpl-2.0",
"size": 2639
} | [
"org.inxar.syntacs.util.IntSet"
] | import org.inxar.syntacs.util.IntSet; | import org.inxar.syntacs.util.*; | [
"org.inxar.syntacs"
] | org.inxar.syntacs; | 561,402 |
int port = 5000;
try {
ServerSocket serverSocket = new ServerSocket(port);
System.out.println("Ждём подключения к серверу");
Socket socket = serverSocket.accept();
System.out.println("Подключение состоялось");
InputStream socketInStr = socket.getInput... | int port = 5000; try { ServerSocket serverSocket = new ServerSocket(port); System.out.println(STR); Socket socket = serverSocket.accept(); System.out.println(STR); InputStream socketInStr = socket.getInputStream(); OutputStream socketOutStr = socket.getOutputStream(); DataInputStream in = new DataInputStream(socketInSt... | /**
* Start Server.
* @param args args.
*/ | Start Server | main | {
"repo_name": "Apeksi1990/asemenov",
"path": "chapter_003/src/main/java/ru/asemenov/TestSocket/Server/Server.java",
"license": "apache-2.0",
"size": 1441
} | [
"java.io.DataInputStream",
"java.io.DataOutputStream",
"java.io.InputStream",
"java.io.OutputStream",
"java.net.ServerSocket",
"java.net.Socket"
] | import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.net.ServerSocket; import java.net.Socket; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 2,755,058 |
@Procedure
@Description("apoc.couchbase.insert(hostOrKey, bucket, documentId, jsonDocument) yield id, expiry, cas, mutationToken, content - insert a couchbase json document with its unique ID.")
public Stream<CouchbaseJsonDocument> insert(@Name("hostOrKey") String hostOrKey, @Name("bucket") String bucket,
... | @Description(STR) Stream<CouchbaseJsonDocument> function(@Name(STR) String hostOrKey, @Name(STR) String bucket, @Name(STR) String documentId, @Name("json") String json, @Name(value = STR, defaultValue = "{}") Map<String, Object> config) { try (CouchbaseConnection couchbaseConnection = getCouchbaseConnection(hostOrKey, ... | /**
* Insert a document if it does not exist already.
* <p/>
* Example:
* <code>CALL apoc.couchbase.insert('localhost', 'default', 'artist:vincent_van_gogh', '{"firstName":"Vincent","secondName":"Willem","lastName":"Van Gogh","notableWorks":["Starry Night","Sunflowers","Bedroom in Arles","Portrait o... | Insert a document if it does not exist already. Example: <code>CALL apoc.couchbase.insert('localhost', 'default', 'artist:vincent_van_gogh', '{"firstName":"Vincent","secondName":"Willem","lastName":"Van Gogh","notableWorks":["Starry Night","Sunflowers","Bedroom in Arles","Portrait of Dr Gachet","Sorrow"]}') yield id, e... | insert | {
"repo_name": "neo4j-contrib/neo4j-apoc-procedures",
"path": "full/src/main/java/apoc/couchbase/Couchbase.java",
"license": "apache-2.0",
"size": 23303
} | [
"com.couchbase.client.java.kv.GetResult",
"com.couchbase.client.java.kv.MutationResult",
"java.util.Map",
"java.util.stream.Stream",
"org.neo4j.procedure.Description",
"org.neo4j.procedure.Name"
] | import com.couchbase.client.java.kv.GetResult; import com.couchbase.client.java.kv.MutationResult; import java.util.Map; import java.util.stream.Stream; import org.neo4j.procedure.Description; import org.neo4j.procedure.Name; | import com.couchbase.client.java.kv.*; import java.util.*; import java.util.stream.*; import org.neo4j.procedure.*; | [
"com.couchbase.client",
"java.util",
"org.neo4j.procedure"
] | com.couchbase.client; java.util; org.neo4j.procedure; | 2,660,295 |
User setSpecificUser(PerunSession sess, User specificUser, SpecificUserType specificUserType, User owner) throws RelationExistsException, UserNotExistsException, PrivilegeException; | User setSpecificUser(PerunSession sess, User specificUser, SpecificUserType specificUserType, User owner) throws RelationExistsException, UserNotExistsException, PrivilegeException; | /**
* Set specific user type for specific user and set ownership of this user for the owner.
*
* @param sess perun session
* @param specificUser specific user
* @param specificUserType specific type of user
* @param owner user, who will be owner of the specific user
*
* @return specific user with specif... | Set specific user type for specific user and set ownership of this user for the owner | setSpecificUser | {
"repo_name": "balcirakpeter/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/UsersManager.java",
"license": "bsd-2-clause",
"size": 50685
} | [
"cz.metacentrum.perun.core.api.exceptions.PrivilegeException",
"cz.metacentrum.perun.core.api.exceptions.RelationExistsException",
"cz.metacentrum.perun.core.api.exceptions.UserNotExistsException"
] | import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import cz.metacentrum.perun.core.api.exceptions.RelationExistsException; import cz.metacentrum.perun.core.api.exceptions.UserNotExistsException; | import cz.metacentrum.perun.core.api.exceptions.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 257,844 |
@Test
public void testPacketSizeTooBig() throws Exception {
SecurityProtocol securityProtocol = SecurityProtocol.SASL_PLAINTEXT;
configureMechanisms("PLAIN", Arrays.asList("PLAIN"));
server = NetworkTestUtils.createEchoServer(securityProtocol, saslServerConfigs);
// Send SASL pa... | void function() throws Exception { SecurityProtocol securityProtocol = SecurityProtocol.SASL_PLAINTEXT; configureMechanisms("PLAIN", Arrays.asList("PLAIN")); server = NetworkTestUtils.createEchoServer(securityProtocol, saslServerConfigs); String node1 = STR; createClientConnection(SecurityProtocol.PLAINTEXT, node1); se... | /**
* Tests that packets that are too big during Kafka SASL handshake request flow
* or the actual SASL authentication flow result in authentication failure
* and do not cause any failures in the server.
*/ | Tests that packets that are too big during Kafka SASL handshake request flow or the actual SASL authentication flow result in authentication failure and do not cause any failures in the server | testPacketSizeTooBig | {
"repo_name": "geeag/kafka",
"path": "clients/src/test/java/org/apache/kafka/common/security/authenticator/SaslAuthenticatorTest.java",
"license": "apache-2.0",
"size": 29573
} | [
"java.nio.ByteBuffer",
"java.util.Arrays",
"org.apache.kafka.common.network.NetworkSend",
"org.apache.kafka.common.network.NetworkTestUtils",
"org.apache.kafka.common.protocol.SecurityProtocol"
] | import java.nio.ByteBuffer; import java.util.Arrays; import org.apache.kafka.common.network.NetworkSend; import org.apache.kafka.common.network.NetworkTestUtils; import org.apache.kafka.common.protocol.SecurityProtocol; | import java.nio.*; import java.util.*; import org.apache.kafka.common.network.*; import org.apache.kafka.common.protocol.*; | [
"java.nio",
"java.util",
"org.apache.kafka"
] | java.nio; java.util; org.apache.kafka; | 2,234,615 |
public Element handle(FreeColServer server, Player player,
Connection connection) {
final ServerPlayer serverPlayer = server.getPlayer(connection);
if (nationName == null || nationName.isEmpty()
|| countryName == null || countryName.isEmpty()) {
ret... | Element function(FreeColServer server, Player player, Connection connection) { final ServerPlayer serverPlayer = server.getPlayer(connection); if (nationName == null nationName.isEmpty() countryName == null countryName.isEmpty()) { return DOMMessage.clientError(STR); } StringTemplate problem = player.checkDeclareIndepe... | /**
* Handle a "declareIndependence"-message.
*
* @param server The <code>FreeColServer</code> handling the message.
* @param player The <code>Player</code> the message applies to.
* @param connection The <code>Connection</code> the message is from.
*
* @return An update <code>Element... | Handle a "declareIndependence"-message | handle | {
"repo_name": "edijman/SOEN_6431_Colonization_Game",
"path": "src/net/sf/freecol/common/networking/DeclareIndependenceMessage.java",
"license": "gpl-2.0",
"size": 3989
} | [
"net.sf.freecol.common.model.Player",
"net.sf.freecol.common.model.StringTemplate",
"net.sf.freecol.server.FreeColServer",
"net.sf.freecol.server.model.ServerPlayer",
"org.w3c.dom.Element"
] | import net.sf.freecol.common.model.Player; import net.sf.freecol.common.model.StringTemplate; import net.sf.freecol.server.FreeColServer; import net.sf.freecol.server.model.ServerPlayer; import org.w3c.dom.Element; | import net.sf.freecol.common.model.*; import net.sf.freecol.server.*; import net.sf.freecol.server.model.*; import org.w3c.dom.*; | [
"net.sf.freecol",
"org.w3c.dom"
] | net.sf.freecol; org.w3c.dom; | 1,930,949 |
public static String deleteTag(String tagName, String tagged, String type) {
LOG.info("Called deleteTag(). tagName:" + tagName + " taggedObject:"
+ tagged + " type: " + type);
try {
HttpServletRequest request = getRequest();
HttpSession session = request.getSe... | static String function(String tagName, String tagged, String type) { LOG.info(STR + tagName + STR + tagged + STR + type); try { HttpServletRequest request = getRequest(); HttpSession session = request.getSession(); final InterMineAPI im = SessionMethods.getInterMineAPI(session); Profile profile = getProfile(request); T... | /**
* Deletes tag.
* @param tagName tag name
* @param tagged id of tagged object
* @param type tag type
* @return 'ok' string if succeeded else error string
*/ | Deletes tag | deleteTag | {
"repo_name": "joshkh/intermine",
"path": "intermine/web/main/src/org/intermine/dwr/AjaxServices.java",
"license": "lgpl-2.1",
"size": 62567
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpSession",
"org.intermine.api.InterMineAPI",
"org.intermine.api.bag.BagManager",
"org.intermine.api.profile.Profile",
"org.intermine.api.profile.TagManager",
"org.intermine.api.search.WebSearchable",
"org.intermine.api.tag.TagTypes",
"o... | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.intermine.api.InterMineAPI; import org.intermine.api.bag.BagManager; import org.intermine.api.profile.Profile; import org.intermine.api.profile.TagManager; import org.intermine.api.search.WebSearchable; import org.intermine.... | import javax.servlet.http.*; import org.intermine.api.*; import org.intermine.api.bag.*; import org.intermine.api.profile.*; import org.intermine.api.search.*; import org.intermine.api.tag.*; import org.intermine.api.template.*; import org.intermine.metadata.*; import org.intermine.web.logic.session.*; | [
"javax.servlet",
"org.intermine.api",
"org.intermine.metadata",
"org.intermine.web"
] | javax.servlet; org.intermine.api; org.intermine.metadata; org.intermine.web; | 1,519,833 |
Map<K, V> master(K key); | Map<K, V> master(K key); | /**
* Show the state and info of the specified master.
*
* @param key the key.
* @return Map<K, V>.
*/ | Show the state and info of the specified master | master | {
"repo_name": "mp911de/lettuce",
"path": "src/main/templates/io/lettuce/core/api/RedisSentinelCommands.java",
"license": "apache-2.0",
"size": 6230
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 663,959 |
private void callLifecycleMethodsIfNecessary(Object bean, String name, RootBeanDefinition rbd, BeanWrapper bw)
throws BeansException {
if (bean instanceof InitializingBean) {
logger.debug("Calling afterPropertiesSet() on bean with name '" + name + "'");
try {
((InitializingBean) bean).afterPr... | void function(Object bean, String name, RootBeanDefinition rbd, BeanWrapper bw) throws BeansException { if (bean instanceof InitializingBean) { logger.debug(STR + name + "'"); try { ((InitializingBean) bean).afterPropertiesSet(); } catch (Exception ex) { throw new FatalBeanException(STR + name + STR, ex); } } if (rbd.g... | /**
* Give a bean a chance to react now all its properties are set,
* and a chance to know about its owning bean factory (this object).
* This means checking whether the bean implements InitializingBean
* and/or BeanFactoryAware, and invoking the necessary callback(s) if it does.
* @param bean new bean i... | Give a bean a chance to react now all its properties are set, and a chance to know about its owning bean factory (this object). This means checking whether the bean implements InitializingBean and/or BeanFactoryAware, and invoking the necessary callback(s) if it does | callLifecycleMethodsIfNecessary | {
"repo_name": "Will1229/LearnSpring",
"path": "spring-framework-0.9.1/src/com/interface21/beans/factory/support/AbstractBeanFactory.java",
"license": "apache-2.0",
"size": 22876
} | [
"com.interface21.beans.BeanWrapper",
"com.interface21.beans.BeansException",
"com.interface21.beans.FatalBeanException",
"com.interface21.beans.factory.BeanFactoryAware",
"com.interface21.beans.factory.InitializingBean"
] | import com.interface21.beans.BeanWrapper; import com.interface21.beans.BeansException; import com.interface21.beans.FatalBeanException; import com.interface21.beans.factory.BeanFactoryAware; import com.interface21.beans.factory.InitializingBean; | import com.interface21.beans.*; import com.interface21.beans.factory.*; | [
"com.interface21.beans"
] | com.interface21.beans; | 1,699,325 |
public void actionPerformed(ActionEvent e) {
if (connectedPort == -1) {
if (!(c.connect(ip.getText(), port.getText())))
fail.setText("Failed to connect to the Server. Please check for correct spelling.");
else {
fail.setText("Connected to "+ip.getText());
jFrame.setTitle("JukePi - "+ip.getText()+... | void function(ActionEvent e) { if (connectedPort == -1) { if (!(c.connect(ip.getText(), port.getText()))) fail.setText(STR); else { fail.setText(STR+ip.getText()); jFrame.setTitle(STR+ip.getText()+":"+port.getText()); jFrame.getContentPane().removeAll(); jFrame.repaint(); jFrame.setContentPane(getJFrame().getContentPan... | /**
* Performs the Action.
* @param e Just a stub.
*/ | Performs the Action | actionPerformed | {
"repo_name": "Haeldeus/JukePi",
"path": "Client/src/gui/ConnectButtonListener.java",
"license": "mit",
"size": 9549
} | [
"java.awt.event.ActionEvent"
] | import java.awt.event.ActionEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 860,994 |
public static org.morozko.java.mod.dbsrc.config.xml.DataOperationList unmarshal(
final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (org.morozko.java.mod.dbsrc.config.xml.DataOperationList) Unmarshaller.unmarshal(... | static org.morozko.java.mod.dbsrc.config.xml.DataOperationList function( final java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (org.morozko.java.mod.dbsrc.config.xml.DataOperationList) Unmarshaller.unmarshal(org.morozko.java.mod.dbsrc.config.xml.D... | /**
* Method unmarshal.
*
* @param reader
* @throws org.exolab.castor.xml.MarshalException if object is
* null or if any SAXException is thrown during marshaling
* @throws org.exolab.castor.xml.ValidationException if this
* object is an invalid instance according to the schema... | Method unmarshal | unmarshal | {
"repo_name": "fugeritaetas/morozko-lib",
"path": "java14-morozko/org.morozko.java.mod.dbsrc/src/org/morozko/java/mod/dbsrc/config/xml/DataOperationList.java",
"license": "apache-2.0",
"size": 9056
} | [
"org.exolab.castor.xml.Unmarshaller"
] | import org.exolab.castor.xml.Unmarshaller; | import org.exolab.castor.xml.*; | [
"org.exolab.castor"
] | org.exolab.castor; | 435,427 |
public static List<Record> find(DataSource dataSource, String sql, Object... paras) {
Connection conn = null;
try {
conn = dataSource.getConnection();
return find(conn, sql, paras);
} catch (Exception e) {
throw new ActiveRecordException(e);
} finally {
DbKit.closeIgnoreThreadLocal(conn);
}
}
... | static List<Record> function(DataSource dataSource, String sql, Object... paras) { Connection conn = null; try { conn = dataSource.getConnection(); return find(conn, sql, paras); } catch (Exception e) { throw new ActiveRecordException(e); } finally { DbKit.closeIgnoreThreadLocal(conn); } } | /**
* Find Record.
* @param dataSource the DataSource for this query
* @param sql an SQL statement that may contain one or more '?' IN parameter placeholders
* @param paras the parameters of sql
* @return the list of Record
*/ | Find Record | find | {
"repo_name": "handong106324/sqLogWeb",
"path": "src/com/jfinal/plugin/activerecord/Db.java",
"license": "lgpl-2.1",
"size": 34758
} | [
"java.sql.Connection",
"java.util.List",
"javax.sql.DataSource"
] | import java.sql.Connection; import java.util.List; import javax.sql.DataSource; | import java.sql.*; import java.util.*; import javax.sql.*; | [
"java.sql",
"java.util",
"javax.sql"
] | java.sql; java.util; javax.sql; | 1,557,175 |
SearchResult getUserPermission(String user, TreeNode.Permission permission, SearchResult sr,
TreeNode node, List<String> pathParts) {
read.lock();
try {
if (node == null) {
node = root;
}
if (sr == null) {
sr = new Searc... | SearchResult getUserPermission(String user, TreeNode.Permission permission, SearchResult sr, TreeNode node, List<String> pathParts) { read.lock(); try { if (node == null) { node = root; } if (sr == null) { sr = new SearchResult(); } Boolean currentNodeAllows = node.isUserAuthorized(user, permission); if (currentNodeAll... | /**
* Find permission for given 'user' starting from the TreeNode 'node' and
* using the path segments given in the List as pathParts
*
* @param user
* the user for which the permissions are searched
* @param permission
* the permission checked
* @param sr
... | Find permission for given 'user' starting from the TreeNode 'node' and using the path segments given in the List as pathParts | getUserPermission | {
"repo_name": "maheshika/carbon4-kernel",
"path": "core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/authorization/PermissionTree.java",
"license": "apache-2.0",
"size": 38581
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 417,077 |
private void addShunnedMember(ID m) {
long deathTime = System.currentTimeMillis() - SHUNNED_SUNSET * 1000L;
surpriseMembers.remove(m); // for safety
// Update the shunned set.
if (!isShunned(m)) {
shunnedMembers.put(m, Long.valueOf(System.currentTimeMillis()));
}
// Remove really real... | void function(ID m) { long deathTime = System.currentTimeMillis() - SHUNNED_SUNSET * 1000L; surpriseMembers.remove(m); if (!isShunned(m)) { shunnedMembers.put(m, Long.valueOf(System.currentTimeMillis())); } Set<Map.Entry<ID, Long>> oldMembers = new HashSet<>(shunnedMembers.entrySet()); Set<ID> removedMembers = new Hash... | /**
* Add the given member to the shunned list. Also, purge any shunned members that are really
* really old.
* <p>
* Must be called with {@link #latestViewLock} held and the view stable.
*
* @param m the member to add
*/ | Add the given member to the shunned list. Also, purge any shunned members that are really really old. Must be called with <code>#latestViewLock</code> held and the view stable | addShunnedMember | {
"repo_name": "davebarnes97/geode",
"path": "geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/GMSMembership.java",
"license": "apache-2.0",
"size": 65377
} | [
"java.util.HashSet",
"java.util.Map",
"java.util.Set"
] | import java.util.HashSet; import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 567,315 |
public void unsetDmxService(DmxService dmxService) {
this.service = null;
} | void function(DmxService dmxService) { this.service = null; } | /**
* DmxService unloaded via DS.
*/ | DmxService unloaded via DS | unsetDmxService | {
"repo_name": "TheNetStriker/openhab",
"path": "bundles/binding/org.openhab.binding.dmx/src/main/java/org/openhab/binding/dmx/internal/DmxCommandProvider.java",
"license": "epl-1.0",
"size": 3947
} | [
"org.openhab.binding.dmx.DmxService"
] | import org.openhab.binding.dmx.DmxService; | import org.openhab.binding.dmx.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 2,841,953 |
void saveUserSetting( UserSettingKey key, Serializable value, User user );
| void saveUserSetting( UserSettingKey key, Serializable value, User user ); | /**
* Saves the name/value pair as a user setting connected to user.
*
* @param key the user setting key.
* @param value the setting value.
* @param username the username of user.
*/ | Saves the name/value pair as a user setting connected to user | saveUserSetting | {
"repo_name": "jason-p-pickering/dhis2-core",
"path": "dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserSettingService.java",
"license": "bsd-3-clause",
"size": 5489
} | [
"java.io.Serializable"
] | import java.io.Serializable; | import java.io.*; | [
"java.io"
] | java.io; | 1,335,563 |
Collection<SelectorType> getSelectorTypes(); | Collection<SelectorType> getSelectorTypes(); | /**
* Gets a {@link Collection} of all possible {@link SelectorType}s.
*
* @return The list of all available {@link SelectorType}s
*/ | Gets a <code>Collection</code> of all possible <code>SelectorType</code>s | getSelectorTypes | {
"repo_name": "SpongeHistory/SpongeAPI-History",
"path": "src/main/java/org/spongepowered/api/GameRegistry.java",
"license": "mit",
"size": 37085
} | [
"java.util.Collection",
"org.spongepowered.api.text.selector.SelectorType"
] | import java.util.Collection; import org.spongepowered.api.text.selector.SelectorType; | import java.util.*; import org.spongepowered.api.text.selector.*; | [
"java.util",
"org.spongepowered.api"
] | java.util; org.spongepowered.api; | 1,218,144 |
protected void addCodePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BashJob_code_feature"),
getString("_UI_PropertyDescriptor_description"... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), ModelPackage.Literals.BASH_JOB__CODE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IM... | /**
* This adds a property descriptor for the Code feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Code feature. | addCodePropertyDescriptor | {
"repo_name": "alexlenk/CloudStandby",
"path": "org/cloudstandby/model.edit/src/model/provider/BashJobItemProvider.java",
"license": "agpl-3.0",
"size": 3932
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; | import org.eclipse.emf.edit.provider.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 964,832 |
public static void deleteFileInDirectory(File directory){
File[] files = directory.listFiles();
for(File f : files){
deleteFile(f);
}
} | static void function(File directory){ File[] files = directory.listFiles(); for(File f : files){ deleteFile(f); } } | /**
* Deletes every file inside the given directory
* @param directory Directory containing the files to delete
*/ | Deletes every file inside the given directory | deleteFileInDirectory | {
"repo_name": "illbexyz/latex-it",
"path": "app/src/main/java/me/albertonicoletti/utils/FilesUtils.java",
"license": "mit",
"size": 9845
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,728,020 |
public void setBase( Dn base )
{
this.base = base;
} | void function( Dn base ) { this.base = base; } | /**
* Sets the subtree base relative to the administration point.
*
* @param base
* subtree base relative to the administration point
*/ | Sets the subtree base relative to the administration point | setBase | {
"repo_name": "darranl/directory-shared",
"path": "ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/SubtreeSpecificationModifier.java",
"license": "apache-2.0",
"size": 5522
} | [
"org.apache.directory.api.ldap.model.name.Dn"
] | import org.apache.directory.api.ldap.model.name.Dn; | import org.apache.directory.api.ldap.model.name.*; | [
"org.apache.directory"
] | org.apache.directory; | 676,056 |
public void writeHeader(int rowCount) throws IOException {
mWriter.write("<datawarrior-fileinfo>");
mWriter.newLine();
mWriter.write("<version=\"3.1\">");
mWriter.newLine();
if (rowCount > 0) {
mWriter.write("<rowcount=\""+rowCount+"\">");
mWriter.newLine();
}
mWriter.write("</datawarrior-fileinf... | void function(int rowCount) throws IOException { mWriter.write(STR); mWriter.newLine(); mWriter.write(STR3.1\">"); mWriter.newLine(); if (rowCount > 0) { mWriter.write(STRSTR\">"); mWriter.newLine(); } mWriter.write(STR); mWriter.newLine(); if (mColumnPropertiesMap != null) { mWriter.write(STR); mWriter.newLine(); for ... | /**
* Call this after defining columns and specifying column properties
* @param rowCount -1 if row count is not known
* @throws IOException
*/ | Call this after defining columns and specifying column properties | writeHeader | {
"repo_name": "cheminfo/openchemlib-js",
"path": "src/com/actelion/research/gwt/chemlib/com/actelion/research/chem/io/DWARFileCreator.java",
"license": "bsd-3-clause",
"size": 11210
} | [
"java.io.IOException",
"java.util.Properties"
] | import java.io.IOException; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,977,076 |
public Observable<ServiceResponse<GetPersonalPreferencesResponseInner>> getPersonalPreferencesWithServiceResponseAsync(String userName, PersonalPreferencesOperationsPayload personalPreferencesOperationsPayload) {
if (userName == null) {
throw new IllegalArgumentException("Parameter userName is r... | Observable<ServiceResponse<GetPersonalPreferencesResponseInner>> function(String userName, PersonalPreferencesOperationsPayload personalPreferencesOperationsPayload) { if (userName == null) { throw new IllegalArgumentException(STR); } if (personalPreferencesOperationsPayload == null) { throw new IllegalArgumentExceptio... | /**
* Get personal preferences for a user.
*
* @param userName The name of the user.
* @param personalPreferencesOperationsPayload Represents payload for any Environment operations like get, start, stop, connect
* @throws IllegalArgumentException thrown if parameters fail the validation
* ... | Get personal preferences for a user | getPersonalPreferencesWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/labservices/mgmt-v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GlobalUsersInner.java",
"license": "mit",
"size": 77728
} | [
"com.microsoft.azure.management.labservices.v2018_10_15.PersonalPreferencesOperationsPayload",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.management.labservices.v2018_10_15.PersonalPreferencesOperationsPayload; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.management.labservices.v2018_10_15.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 2,744,723 |
ServiceCall<Void> putBigDoublePositiveDecimalAsync(double numberBody, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException; | ServiceCall<Void> putBigDoublePositiveDecimalAsync(double numberBody, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException; | /**
* Put big double value 99999999.99.
*
* @param numberBody the double value
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callback is null
* @return the {@link ServiceCall} object
*/ | Put big double value 99999999.99 | putBigDoublePositiveDecimalAsync | {
"repo_name": "yaqiyang/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodynumber/Numbers.java",
"license": "mit",
"size": 20998
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 139,045 |
public interface ExternalStore<V extends Serializable>{ | public interface ExternalStore<V extends Serializable>{ | /**
* A function to add a key value pair
* @param key
* @param value
* @throws Exception Any implementation dependent exception
*/ | A function to add a key value pair | put | {
"repo_name": "sranasir/SPADE",
"path": "src/spade/utility/ExternalStore.java",
"license": "gpl-3.0",
"size": 2590
} | [
"java.io.Serializable"
] | import java.io.Serializable; | import java.io.*; | [
"java.io"
] | java.io; | 2,430,833 |
public JvmParameterizedTypeReference newTypeRef(Notifier context, String typeName) {
return this.builder.newTypeRef(context, typeName);
} | JvmParameterizedTypeReference function(Notifier context, String typeName) { return this.builder.newTypeRef(context, typeName); } | /** Find the reference to the type with the given name.
* @param context the context for the type reference use
* @param typeName the fully qualified name of the type
* @return the type reference.
*/ | Find the reference to the type with the given name | newTypeRef | {
"repo_name": "sarl/sarl",
"path": "main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/appenders/SarlActionSourceAppender.java",
"license": "apache-2.0",
"size": 5121
} | [
"org.eclipse.emf.common.notify.Notifier",
"org.eclipse.xtext.common.types.JvmParameterizedTypeReference"
] | import org.eclipse.emf.common.notify.Notifier; import org.eclipse.xtext.common.types.JvmParameterizedTypeReference; | import org.eclipse.emf.common.notify.*; import org.eclipse.xtext.common.types.*; | [
"org.eclipse.emf",
"org.eclipse.xtext"
] | org.eclipse.emf; org.eclipse.xtext; | 724,779 |
public void testGetInstance02() throws NoSuchAlgorithmException,
NoSuchProviderException, IllegalArgumentException,
InvalidAlgorithmParameterException, CertStoreException {
CertStoreParameters p = new MyCertStoreParameters();
mPar mp = new mPar("CertStore");
try ... | void function() throws NoSuchAlgorithmException, NoSuchProviderException, IllegalArgumentException, InvalidAlgorithmParameterException, CertStoreException { CertStoreParameters p = new MyCertStoreParameters(); mPar mp = new mPar(STR); try { CertStore.getInstance(null, p, mProv.getName()); fail(STR); } catch (NullPointe... | /**
* Test for method
* <code>getInstance(String type, CertStoreParameters params, String provider)</code>
* Assertions:
* throws NullPointerException when type is null
* throws NoSuchAlgorithmException when type is incorrect;
* throws IllegalArgumentException when provider is null... | Test for method <code>getInstance(String type, CertStoreParameters params, String provider)</code> Assertions: throws NullPointerException when type is null throws NoSuchAlgorithmException when type is incorrect; throws IllegalArgumentException when provider is null or empty; throws NoSuchProviderException when provide... | testGetInstance02 | {
"repo_name": "skyHALud/codenameone",
"path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/cert/CertStore_ImplTest.java",
"license": "gpl-2.0",
"size": 13090
} | [
"java.security.InvalidAlgorithmParameterException",
"java.security.NoSuchAlgorithmException",
"java.security.NoSuchProviderException",
"java.security.cert.CertStore",
"java.security.cert.CertStoreException",
"java.security.cert.CertStoreParameters",
"org.apache.harmony.security.tests.support.cert.MyCert... | import java.security.InvalidAlgorithmParameterException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.cert.CertStore; import java.security.cert.CertStoreException; import java.security.cert.CertStoreParameters; import org.apache.harmony.security.tests... | import java.security.*; import java.security.cert.*; import org.apache.harmony.security.tests.support.cert.*; | [
"java.security",
"org.apache.harmony"
] | java.security; org.apache.harmony; | 2,440,232 |
@Override
protected void done()
{
try
{
get();
}
catch (InterruptedException e)
{
di... | void function() { try { get(); } catch (InterruptedException e) { displayErrorMessage(STR); } catch (ExecutionException e) { displayErrorMessage(STR); } try { String translatedText = retrieveFromFile(JULIA_TEMP_FILE); juliaField.setText(translatedText); } catch(FileNotFoundException ex) { displayErrorMessage(STR); } ca... | /**
* Blocks until the backend translator Perl script is done running, then
* retrieves and displays the translation from the temp file created by
* the Perl scipt and deletes all temp files.
*/ | Blocks until the backend translator Perl script is done running, then retrieves and displays the translation from the temp file created by the Perl scipt and deletes all temp files | done | {
"repo_name": "lakras/matlab-to-julia",
"path": "old_version_(perl_and_java)/TranslatorGUI.java",
"license": "mit",
"size": 19774
} | [
"java.io.FileNotFoundException",
"java.io.IOException",
"java.util.concurrent.ExecutionException"
] | import java.io.FileNotFoundException; import java.io.IOException; import java.util.concurrent.ExecutionException; | import java.io.*; import java.util.concurrent.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 427,785 |
BigInteger bigInteger = BigInteger.valueOf(number);
return bigInteger.isProbablePrime((int) Math.log(number));
} | BigInteger bigInteger = BigInteger.valueOf(number); return bigInteger.isProbablePrime((int) Math.log(number)); } | /**
* Returns true if number is prime and false else.
* @param number - number to test
* @return true or false
*/ | Returns true if number is prime and false else | isPrime | {
"repo_name": "helycopternicht/elazarev",
"path": "chapter_004/src/main/java/ru/elazarev/iterator/PrimeNumbersIterator.java",
"license": "apache-2.0",
"size": 1712
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 1,976,792 |
public Launcher userDirectory(String userDirectory) {
System.setProperty("org.freeplane.userfpdir", userDirectory);
System.setProperty("org.freeplane.old_userfpdir", userDirectory);
return this;
}
private Launcher(final File freeplaneInstallationDirectory) {
ensureSingleInstance();
this.freepl... | Launcher function(String userDirectory) { System.setProperty(STR, userDirectory); System.setProperty(STR, userDirectory); return this; } private Launcher(final File freeplaneInstallationDirectory) { ensureSingleInstance(); this.freeplaneInstallationDirectory = freeplaneInstallationDirectory; loadJavaSystemProperties();... | /**
* Sets user configuration directory (without the version).
*/ | Sets user configuration directory (without the version) | userDirectory | {
"repo_name": "fnatter/freeplane-debian-dev",
"path": "freeplane_framework/src/main/java/org/freeplane/launcher/Launcher.java",
"license": "gpl-2.0",
"size": 11479
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,039,852 |
@Test(expected = RuntimeException.class)
public void requireTaskExecutor() throws Exception {
// setup
commandExecutor = new CommandExecutor(null);
// act
commandExecutor.executeScript(null, null);
} | @Test(expected = RuntimeException.class) void function() throws Exception { commandExecutor = new CommandExecutor(null); commandExecutor.executeScript(null, null); } | /**
* Require task executor
*/ | Require task executor | requireTaskExecutor | {
"repo_name": "barnyard/pi",
"path": "testuugghh/src/test/com/ragstorooks/testrr/cli/CommandExecutorTest.java",
"license": "apache-2.0",
"size": 3226
} | [
"org.junit.Test"
] | import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 548,343 |
public void removeDatatype(String pluralDatatype) {
if (!StringUtils.isBlank(pluralDatatype)) {
getDatatypes().remove(pluralDatatype);
}
} | void function(String pluralDatatype) { if (!StringUtils.isBlank(pluralDatatype)) { getDatatypes().remove(pluralDatatype); } } | /**
* Removes a datatype from the types map.
* @param pluralDatatype a datatype, must not be null or empty
*/ | Removes a datatype from the types map | removeDatatype | {
"repo_name": "Erudika/para",
"path": "para-core/src/main/java/com/erudika/para/core/App.java",
"license": "apache-2.0",
"size": 42818
} | [
"org.apache.commons.lang3.StringUtils"
] | import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 234,854 |
static String getAverageRuntimeString(List<Integer> runtimesInMinutes) {
Integer minuteAvg = computeAvgOfIntegerList(runtimesInMinutes);
if (minuteAvg == null) {
return null;
}
if (minuteAvg < 60) {
return minuteAvg + "min";
}
int hours = minuteAvg / 60;
int minutesLeft = minuteAvg - hou... | static String getAverageRuntimeString(List<Integer> runtimesInMinutes) { Integer minuteAvg = computeAvgOfIntegerList(runtimesInMinutes); if (minuteAvg == null) { return null; } if (minuteAvg < 60) { return minuteAvg + "min"; } int hours = minuteAvg / 60; int minutesLeft = minuteAvg - hours * 60; if (minutesLeft > 0) { ... | /**
* Calculate the average of a list of runtimes
* @param runtimesInMinutes
* @return Average runtime, in the format '1h 55min', '30min', or '2h'
*/ | Calculate the average of a list of runtimes | getAverageRuntimeString | {
"repo_name": "BramVanRensbergen/imdb-scraper-prototype",
"path": "src/main/java/com/bramvanrensbergen/imdb_demo/domain/statistics/MathUtil.java",
"license": "gpl-3.0",
"size": 2750
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,883,213 |
public Builder setDisappearanceDecayFactor(double disappearanceDecayFactor) {
ValidationUtils.checkStrictlyPositive(disappearanceDecayFactor);
this.disappearanceDecayFactor = disappearanceDecayFactor;
return this;
} | Builder function(double disappearanceDecayFactor) { ValidationUtils.checkStrictlyPositive(disappearanceDecayFactor); this.disappearanceDecayFactor = disappearanceDecayFactor; return this; } | /**
* Sets the disappearance decay factor.
*
* <p>The factor {@code r_off} used to compute the exponential decay for the probability of
* disappearance:
*
* <pre>
* p_off(t) = exp(-(t - t_off) / r_off)
* </pre>
*
* <p>for blinking, previously detecte... | Sets the disappearance decay factor. The factor r_off used to compute the exponential decay for the probability of disappearance: <code> p_off(t) = exp(-(t - t_off) / r_off) </code> for blinking, previously detected particles (thus in the full off state since time t_off) | setDisappearanceDecayFactor | {
"repo_name": "aherbert/GDSC-SMLM",
"path": "src/main/java/uk/ac/sussex/gdsc/smlm/results/DynamicMultipleTargetTracing.java",
"license": "gpl-3.0",
"size": 41248
} | [
"uk.ac.sussex.gdsc.core.utils.ValidationUtils"
] | import uk.ac.sussex.gdsc.core.utils.ValidationUtils; | import uk.ac.sussex.gdsc.core.utils.*; | [
"uk.ac.sussex"
] | uk.ac.sussex; | 744,623 |
public void deleteBotDetectionAlertSubscription(String uuid) throws APIManagementException {
String query = SQLConstants.BotDataConstants.DELETE_EMAIL_BY_UUID;
try (Connection connection = APIMgtDBUtil.getConnection();
PreparedStatement ps = connection.prepareStatement(query)) {
... | void function(String uuid) throws APIManagementException { String query = SQLConstants.BotDataConstants.DELETE_EMAIL_BY_UUID; try (Connection connection = APIMgtDBUtil.getConnection(); PreparedStatement ps = connection.prepareStatement(query)) { connection.setAutoCommit(false); ps.setString(1, uuid); ps.execute(); conn... | /**
* Delete a bot detection alert subscription
*
* @param uuid uuid of the subscription
* @throws APIManagementException if an error occurs when deleting a bot detection alert subscription
*/ | Delete a bot detection alert subscription | deleteBotDetectionAlertSubscription | {
"repo_name": "fazlan-nazeem/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java",
"license": "apache-2.0",
"size": 821235
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.SQLException",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.impl.dao.constants.SQLConstants",
"org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.impl.dao.constants.SQLConstants; import org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil; | import java.sql.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.dao.constants.*; import org.wso2.carbon.apimgt.impl.utils.*; | [
"java.sql",
"org.wso2.carbon"
] | java.sql; org.wso2.carbon; | 1,115,936 |
@Test public void
whenAdd_given2PositiveNumbers_shouldGiveCorrectResult() {
Calculator calculator = new Calculator();
int sum = calculator.add(5, 6);
assertThat(sum, is(equalTo(12)));
} | @Test void function() { Calculator calculator = new Calculator(); int sum = calculator.add(5, 6); assertThat(sum, is(equalTo(12))); } | /**
* Matchers along with assert VS assert only (works better with containsString example)
*/ | Matchers along with assert VS assert only (works better with containsString example) | whenAdd_given2PositiveNumbers_shouldGiveCorrectResult | {
"repo_name": "deepakab03/java-ks",
"path": "unittesting/src/test/java/com/unittesting/CalculatorSimpleTest.java",
"license": "apache-2.0",
"size": 1708
} | [
"org.hamcrest.Matchers",
"org.junit.Assert",
"org.junit.Test"
] | import org.hamcrest.Matchers; import org.junit.Assert; import org.junit.Test; | import org.hamcrest.*; import org.junit.*; | [
"org.hamcrest",
"org.junit"
] | org.hamcrest; org.junit; | 711,383 |
public boolean removePermission(Player player, String permission)
{
if (perm == null)
return false;
return perm.playerRemove(player, permission);
}
| boolean function(Player player, String permission) { if (perm == null) return false; return perm.playerRemove(player, permission); } | /**
* Removes a permission from a player
*
* @param player Player to remove permission from
* @param permission Permission to remove
* @return True if successful, false if not
*/ | Removes a permission from a player | removePermission | {
"repo_name": "dmulloy2/SwornAPI",
"path": "src/main/java/net/dmulloy2/integration/VaultHandler.java",
"license": "gpl-3.0",
"size": 9505
} | [
"org.bukkit.entity.Player"
] | import org.bukkit.entity.Player; | import org.bukkit.entity.*; | [
"org.bukkit.entity"
] | org.bukkit.entity; | 1,311,121 |
public EntityType getNodeType(UserInfo userInfo, String entityId) throws NotFoundException, DatastoreException, UnauthorizedException;
| EntityType function(UserInfo userInfo, String entityId) throws NotFoundException, DatastoreException, UnauthorizedException; | /**
* Get the node type of an entity
* @param userInfo
* @param entityId
* @return
* @throws UnauthorizedException
* @throws DatastoreException
* @throws NotFoundException
*/ | Get the node type of an entity | getNodeType | {
"repo_name": "Sage-Bionetworks/Synapse-Repository-Services",
"path": "services/repository-managers/src/main/java/org/sagebionetworks/repo/manager/NodeManager.java",
"license": "apache-2.0",
"size": 15277
} | [
"org.sagebionetworks.repo.model.DatastoreException",
"org.sagebionetworks.repo.model.EntityType",
"org.sagebionetworks.repo.model.UnauthorizedException",
"org.sagebionetworks.repo.model.UserInfo",
"org.sagebionetworks.repo.web.NotFoundException"
] | import org.sagebionetworks.repo.model.DatastoreException; import org.sagebionetworks.repo.model.EntityType; import org.sagebionetworks.repo.model.UnauthorizedException; import org.sagebionetworks.repo.model.UserInfo; import org.sagebionetworks.repo.web.NotFoundException; | import org.sagebionetworks.repo.model.*; import org.sagebionetworks.repo.web.*; | [
"org.sagebionetworks.repo"
] | org.sagebionetworks.repo; | 2,865,319 |
public static String getAndSetCorrelationID(org.apache.synapse.MessageContext messageContext) {
Object correlationObj = messageContext.getProperty(APIMgtGatewayConstants.AM_CORRELATION_ID);
String correlationID;
if (correlationObj != null) {
correlationID = (String) correlationO... | static String function(org.apache.synapse.MessageContext messageContext) { Object correlationObj = messageContext.getProperty(APIMgtGatewayConstants.AM_CORRELATION_ID); String correlationID; if (correlationObj != null) { correlationID = (String) correlationObj; } else { correlationID = UUID.randomUUID().toString(); mes... | /**
* return existing correlation ID in the message context or set new correlation ID to the message context.
*
* @param messageContext synapse message context
* @return correlation ID
*/ | return existing correlation ID in the message context or set new correlation ID to the message context | getAndSetCorrelationID | {
"repo_name": "harsha89/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/utils/GatewayUtils.java",
"license": "apache-2.0",
"size": 38195
} | [
"java.util.UUID",
"org.apache.axis2.context.MessageContext",
"org.wso2.carbon.apimgt.gateway.APIMgtGatewayConstants"
] | import java.util.UUID; import org.apache.axis2.context.MessageContext; import org.wso2.carbon.apimgt.gateway.APIMgtGatewayConstants; | import java.util.*; import org.apache.axis2.context.*; import org.wso2.carbon.apimgt.gateway.*; | [
"java.util",
"org.apache.axis2",
"org.wso2.carbon"
] | java.util; org.apache.axis2; org.wso2.carbon; | 1,668,642 |
private boolean handleRemoveAllExternalIdentitiesCase(SitePatchResourceInner siteUpdate) {
SiteInner siteInner = this.webAppBase.innerModel();
if (!this.userAssignedIdentities.isEmpty()) {
int rmCount = 0;
for (UserAssignedIdentity v : this.userAssignedIdentities.values()) {
... | boolean function(SitePatchResourceInner siteUpdate) { SiteInner siteInner = this.webAppBase.innerModel(); if (!this.userAssignedIdentities.isEmpty()) { int rmCount = 0; for (UserAssignedIdentity v : this.userAssignedIdentities.values()) { if (v == null) { rmCount++; } else { break; } } boolean containsRemoveOnly = rmCo... | /**
* Method that handle the case where user request indicates all it want to do is remove all identities associated
* with the virtual machine.
*
* @param siteUpdate the vm update payload model
* @return true if user indented to remove all the identities.
*/ | Method that handle the case where user request indicates all it want to do is remove all identities associated with the virtual machine | handleRemoveAllExternalIdentitiesCase | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/WebAppMsiHandler.java",
"license": "mit",
"size": 13616
} | [
"com.azure.resourcemanager.appservice.fluent.models.SiteInner",
"com.azure.resourcemanager.appservice.fluent.models.SitePatchResourceInner",
"com.azure.resourcemanager.appservice.models.ManagedServiceIdentity",
"com.azure.resourcemanager.appservice.models.ManagedServiceIdentityType",
"com.azure.resourcemana... | import com.azure.resourcemanager.appservice.fluent.models.SiteInner; import com.azure.resourcemanager.appservice.fluent.models.SitePatchResourceInner; import com.azure.resourcemanager.appservice.models.ManagedServiceIdentity; import com.azure.resourcemanager.appservice.models.ManagedServiceIdentityType; import com.azur... | import com.azure.resourcemanager.appservice.fluent.models.*; import com.azure.resourcemanager.appservice.models.*; import java.util.*; | [
"com.azure.resourcemanager",
"java.util"
] | com.azure.resourcemanager; java.util; | 104,090 |
public void clearInvadingElements() {
TransparencyUtil.clear(invadingElements);
} | void function() { TransparencyUtil.clear(invadingElements); } | /**
* Clear out any dodgy browser-inserted elements
*/ | Clear out any dodgy browser-inserted elements | clearInvadingElements | {
"repo_name": "gburd/wave",
"path": "src/org/waveprotocol/wave/client/editor/content/ContentDocument.java",
"license": "apache-2.0",
"size": 61597
} | [
"org.waveprotocol.wave.client.editor.impl.TransparencyUtil"
] | import org.waveprotocol.wave.client.editor.impl.TransparencyUtil; | import org.waveprotocol.wave.client.editor.impl.*; | [
"org.waveprotocol.wave"
] | org.waveprotocol.wave; | 2,705,107 |
public void unregisterDynamicRegionListener(DynamicRegionListener listener) {
synchronized (regionListenerLock) {
List oldListeners = regionListeners;
if (oldListeners.contains(listener)) {
List newListeners = new ArrayList(oldListeners);
if (newListeners.remove(listener)) {
... | void function(DynamicRegionListener listener) { synchronized (regionListenerLock) { List oldListeners = regionListeners; if (oldListeners.contains(listener)) { List newListeners = new ArrayList(oldListeners); if (newListeners.remove(listener)) { regionListeners = newListeners; } } } } | /**
* Unregisters a {@code DynamicRegionListener} for callbacks.
*
* @param listener The {@code DynamicRegionListener} to be unregistered
*/ | Unregisters a DynamicRegionListener for callbacks | unregisterDynamicRegionListener | {
"repo_name": "jdeppe-pivotal/geode",
"path": "geode-core/src/main/java/org/apache/geode/cache/DynamicRegionFactory.java",
"license": "apache-2.0",
"size": 41211
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 265,221 |
private static Object getNativeValue(Object apiValue) {
if (apiValue == null) {
return null;
} else if (apiValue instanceof DateTime) {
return DateTimes.toDateTime((DateTime) apiValue);
} else if (apiValue instanceof Date) {
return DateTimes.toString((Date) apiValue);
} else if (apiV... | static Object function(Object apiValue) { if (apiValue == null) { return null; } else if (apiValue instanceof DateTime) { return DateTimes.toDateTime((DateTime) apiValue); } else if (apiValue instanceof Date) { return DateTimes.toString((Date) apiValue); } else if (apiValue instanceof Set<?>) { Set<Object> nativeValues... | /**
* Gets the underlying value of the api value object that's considered native to Java (i.e.
* DateTimeValue will return a Joda DateTime, not an API DateTime and DateValue will return a
* string in the form of "yyyy-MM-dd").
*
* @param apiValue the api value to convert
* @return the native value or ... | Gets the underlying value of the api value object that's considered native to Java (i.e. DateTimeValue will return a Joda DateTime, not an API DateTime and DateValue will return a string in the form of "yyyy-MM-dd") | getNativeValue | {
"repo_name": "googleads/googleads-java-lib",
"path": "modules/dfp_appengine/src/main/java/com/google/api/ads/admanager/jaxws/utils/v202105/Pql.java",
"license": "apache-2.0",
"size": 18561
} | [
"com.google.api.ads.admanager.jaxws.v202105.Date",
"com.google.api.ads.admanager.jaxws.v202105.DateTime",
"java.util.LinkedHashSet",
"java.util.Set"
] | import com.google.api.ads.admanager.jaxws.v202105.Date; import com.google.api.ads.admanager.jaxws.v202105.DateTime; import java.util.LinkedHashSet; import java.util.Set; | import com.google.api.ads.admanager.jaxws.v202105.*; import java.util.*; | [
"com.google.api",
"java.util"
] | com.google.api; java.util; | 2,318,805 |
private int getPoints(ServletParams param) throws SQLException
{
String pts = param.getParameter("points");
if (pts == null)
{
throw new SQLException("No points to transfer");
}
int points = 0;
try
{
points = Integer.parseInt(pts);
}
catch (NumberFormatException ne)
{
throw new SQLExcep... | int function(ServletParams param) throws SQLException { String pts = param.getParameter(STR); if (pts == null) { throw new SQLException(STR); } int points = 0; try { points = Integer.parseInt(pts); } catch (NumberFormatException ne) { throw new SQLException(STR); } if (points <= 0) { throw new SQLException(STR); } retu... | /**
* Find out the points from request parameter 'points'.
*/ | Find out the points from request parameter 'points' | getPoints | {
"repo_name": "tedwen/transmem",
"path": "src/com/transmem/action/GroupAction.java",
"license": "apache-2.0",
"size": 17447
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 588,469 |
public void showInjectionView(ArrayList<Defect> dl){
setTitle("Defects by Injection");
int i = 0;
// Load pie data sets and set to empty
for(Injection inj : Defect.Injection.values()){
insertNewData(inj.toString(), STARTVAL);
setColor(inj.toString(), colors[i]);
i++;
}
// Load values
fo... | void function(ArrayList<Defect> dl){ setTitle(STR); int i = 0; for(Injection inj : Defect.Injection.values()){ insertNewData(inj.toString(), STARTVAL); setColor(inj.toString(), colors[i]); i++; } for(Defect d : dl){ Defect.Injection inj = d.getInj(); addValue(inj.toString(), 1); } } | /**
* Show the Injection pie chart.
*
* @param dl
*/ | Show the Injection pie chart | showInjectionView | {
"repo_name": "cst316/spring16project-NewtonScript",
"path": "src/net/sf/memoranda/ui/DefectPieChart.java",
"license": "gpl-2.0",
"size": 5573
} | [
"java.util.ArrayList",
"net.sf.memoranda.Defect"
] | import java.util.ArrayList; import net.sf.memoranda.Defect; | import java.util.*; import net.sf.memoranda.*; | [
"java.util",
"net.sf.memoranda"
] | java.util; net.sf.memoranda; | 1,046,688 |
@SuppressWarnings("unchecked")
protected T unmarshalChild(HierarchicalStreamReader reader,
UnmarshallingContext context) {
String childName = reader.getNodeName();
Class<?> childClass = mapper.realClass(childName);
if (elementType.isAssignableFrom(childClass)) {
return (T) context.convertAno... | @SuppressWarnings(STR) T function(HierarchicalStreamReader reader, UnmarshallingContext context) { String childName = reader.getNodeName(); Class<?> childClass = mapper.realClass(childName); if (elementType.isAssignableFrom(childClass)) { return (T) context.convertAnother(null, childClass); } return null; } | /**
* Utility method to read a single child object from the input stream.
*/ | Utility method to read a single child object from the input stream | unmarshalChild | {
"repo_name": "google/depan",
"path": "DepanPersistence/prod/src/com/google/devtools/depan/persistence/AbstractCollectionConverter.java",
"license": "apache-2.0",
"size": 4320
} | [
"com.thoughtworks.xstream.converters.UnmarshallingContext",
"com.thoughtworks.xstream.io.HierarchicalStreamReader"
] | import com.thoughtworks.xstream.converters.UnmarshallingContext; import com.thoughtworks.xstream.io.HierarchicalStreamReader; | import com.thoughtworks.xstream.converters.*; import com.thoughtworks.xstream.io.*; | [
"com.thoughtworks.xstream"
] | com.thoughtworks.xstream; | 564,243 |
public void setDossierDoc2TemplateService(
org.oep.core.dossiermgt.service.DossierDoc2TemplateService dossierDoc2TemplateService) {
this.dossierDoc2TemplateService = dossierDoc2TemplateService;
} | void function( org.oep.core.dossiermgt.service.DossierDoc2TemplateService dossierDoc2TemplateService) { this.dossierDoc2TemplateService = dossierDoc2TemplateService; } | /**
* Sets the dossier doc2 template remote service.
*
* @param dossierDoc2TemplateService the dossier doc2 template remote service
*/ | Sets the dossier doc2 template remote service | setDossierDoc2TemplateService | {
"repo_name": "thongdv/OEPv2",
"path": "portlets/oep-core-dossiermgt-portlet/docroot/WEB-INF/src/org/oep/core/dossiermgt/service/base/DossierDoc2TemplateServiceBaseImpl.java",
"license": "apache-2.0",
"size": 36774
} | [
"org.oep.core.dossiermgt.service.DossierDoc2TemplateService"
] | import org.oep.core.dossiermgt.service.DossierDoc2TemplateService; | import org.oep.core.dossiermgt.service.*; | [
"org.oep.core"
] | org.oep.core; | 1,618,546 |
public ArrayList<User> getChatRoomUsers(final int roomId) {
final UUID locationId = UUID.fromString("01408881-1a9a-4cc9-981d-9333e354e9d9"); //$NON-NLS-1$
final ApiResourceVersion apiVersion = new ApiResourceVersion("3.1-preview.1"); //$NON-NLS-1$
final Map<String, Object> routeValues = n... | ArrayList<User> function(final int roomId) { final UUID locationId = UUID.fromString(STR); final ApiResourceVersion apiVersion = new ApiResourceVersion(STR); final Map<String, Object> routeValues = new HashMap<String, Object>(); routeValues.put(STR, roomId); final VssRestRequest httpRequest = super.createRequest(HttpMe... | /**
* [Preview API 3.1-preview.1] Retrieve a listing of all chat users
*
* @param roomId
* Id of the room
* @return ArrayList<User>
*/ | [Preview API 3.1-preview.1] Retrieve a listing of all chat users | getChatRoomUsers | {
"repo_name": "Microsoft/vso-httpclient-java",
"path": "Rest/alm-tfs-client/src/main/generated/com/microsoft/alm/teamfoundation/chat/webapi/ChatHttpClientBase.java",
"license": "mit",
"size": 18876
} | [
"com.fasterxml.jackson.core.type.TypeReference",
"com.microsoft.alm.client.HttpMethod",
"com.microsoft.alm.client.VssMediaTypes",
"com.microsoft.alm.client.VssRestRequest",
"com.microsoft.alm.teamfoundation.chat.webapi.User",
"com.microsoft.alm.visualstudio.services.webapi.ApiResourceVersion",
"java.uti... | import com.fasterxml.jackson.core.type.TypeReference; import com.microsoft.alm.client.HttpMethod; import com.microsoft.alm.client.VssMediaTypes; import com.microsoft.alm.client.VssRestRequest; import com.microsoft.alm.teamfoundation.chat.webapi.User; import com.microsoft.alm.visualstudio.services.webapi.ApiResourceVers... | import com.fasterxml.jackson.core.type.*; import com.microsoft.alm.client.*; import com.microsoft.alm.teamfoundation.chat.webapi.*; import com.microsoft.alm.visualstudio.services.webapi.*; import java.util.*; | [
"com.fasterxml.jackson",
"com.microsoft.alm",
"java.util"
] | com.fasterxml.jackson; com.microsoft.alm; java.util; | 2,835,694 |
Map<String,Long> getOpTypeCounters() {
return opTypeCounters;
} | Map<String,Long> getOpTypeCounters() { return opTypeCounters; } | /**
* The FATE transaction stores the transaction type as a debug string in the transaction zknode.
* This method returns a map of counters of the current occurrences of each operation type that is
* IN_PROGRESS.
*
* @return a map of operation type counters.
*/ | The FATE transaction stores the transaction type as a debug string in the transaction zknode. This method returns a map of counters of the current occurrences of each operation type that is IN_PROGRESS | getOpTypeCounters | {
"repo_name": "phrocker/accumulo-1",
"path": "server/manager/src/main/java/org/apache/accumulo/manager/metrics/fate/FateMetricValues.java",
"license": "apache-2.0",
"size": 7687
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,664,602 |
public static boolean checkSyntax(ParserInputSource input,
EventHandler eventHandler, boolean parsePython) {
return !parseBuildFile(input, eventHandler, null, parsePython).containsErrors();
} | static boolean function(ParserInputSource input, EventHandler eventHandler, boolean parsePython) { return !parseBuildFile(input, eventHandler, null, parsePython).containsErrors(); } | /**
* Parse the specified build file, without building the AST.
*
* @return true if the input file is syntactically valid
*/ | Parse the specified build file, without building the AST | checkSyntax | {
"repo_name": "kidaa/bazel",
"path": "src/main/java/com/google/devtools/build/lib/syntax/BuildFileAST.java",
"license": "apache-2.0",
"size": 11694
} | [
"com.google.devtools.build.lib.events.EventHandler"
] | import com.google.devtools.build.lib.events.EventHandler; | import com.google.devtools.build.lib.events.*; | [
"com.google.devtools"
] | com.google.devtools; | 1,735,666 |
private String getLocalEndPointFromConnectionManager(String sServiceName) throws ConnectionManagerException {
String url = ConnectionManagerCache.getInstance().getInternalEndpointURLByServiceName(sServiceName);
return url;
} | String function(String sServiceName) throws ConnectionManagerException { String url = ConnectionManagerCache.getInstance().getInternalEndpointURLByServiceName(sServiceName); return url; } | /**
* This method returns the endpoint url of the passed in service name in the local gateway (hcid)
*
* @param sServiceName The name of the service to locate.
* @return The endpoint URL.
* @throws Exception An exception if one occurs.
*/ | This method returns the endpoint url of the passed in service name in the local gateway (hcid) | getLocalEndPointFromConnectionManager | {
"repo_name": "healthreveal/CONNECT",
"path": "Product/Production/Common/CONNECTCoreLib/src/main/java/gov/hhs/fha/nhinc/webserviceproxy/WebServiceProxyHelper.java",
"license": "bsd-3-clause",
"size": 22571
} | [
"gov.hhs.fha.nhinc.connectmgr.ConnectionManagerCache",
"gov.hhs.fha.nhinc.connectmgr.ConnectionManagerException"
] | import gov.hhs.fha.nhinc.connectmgr.ConnectionManagerCache; import gov.hhs.fha.nhinc.connectmgr.ConnectionManagerException; | import gov.hhs.fha.nhinc.connectmgr.*; | [
"gov.hhs.fha"
] | gov.hhs.fha; | 2,753,464 |
private void modifyRequestHeadersToReflectProxying(HttpRequest httpRequest) {
if (!proxyServer.isTransparent()) {
LOG.debug("Modifying request headers for proxying");
if (!currentServerConnection.hasUpstreamChainedProxy()) {
LOG.debug("Modifying request for proxy cha... | void function(HttpRequest httpRequest) { if (!proxyServer.isTransparent()) { LOG.debug(STR); if (!currentServerConnection.hasUpstreamChainedProxy()) { LOG.debug(STR); String uri = httpRequest.getUri(); String adjustedUri = ProxyUtils.stripHost(uri); LOG.debug(STR, uri, adjustedUri); httpRequest.setUri(adjustedUri); } H... | /**
* If and only if our proxy is not running in transparent mode, modify the
* request headers to reflect that it was proxied.
*
* @param httpRequest
*/ | If and only if our proxy is not running in transparent mode, modify the request headers to reflect that it was proxied | modifyRequestHeadersToReflectProxying | {
"repo_name": "Banno/LittleProxy",
"path": "src/main/java/org/littleshoot/proxy/impl/ClientToProxyConnection.java",
"license": "apache-2.0",
"size": 49847
} | [
"io.netty.handler.codec.http.HttpHeaders",
"io.netty.handler.codec.http.HttpRequest"
] | import io.netty.handler.codec.http.HttpHeaders; import io.netty.handler.codec.http.HttpRequest; | import io.netty.handler.codec.http.*; | [
"io.netty.handler"
] | io.netty.handler; | 1,734,606 |
public boolean printDialog() throws HeadlessException {
if (GraphicsEnvironment.isHeadless()) {
throw new HeadlessException();
}
PrintRequestAttributeSet attributes =
new HashPrintRequestAttributeSet();
attributes.add(new Copies(getCopies()));
attribut... | boolean function() throws HeadlessException { if (GraphicsEnvironment.isHeadless()) { throw new HeadlessException(); } PrintRequestAttributeSet attributes = new HashPrintRequestAttributeSet(); attributes.add(new Copies(getCopies())); attributes.add(new JobName(getJobName(), null)); boolean doPrint = printDialog(attribu... | /**
* Presents the user a dialog for changing properties of the
* print job interactively.
* @returns false if the user cancels the dialog and
* true otherwise.
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true.
* @see java.awt.GraphicsEnvironm... | Presents the user a dialog for changing properties of the print job interactively | printDialog | {
"repo_name": "MeFisto94/openjdk",
"path": "jdk/src/share/classes/sun/print/RasterPrinterJob.java",
"license": "gpl-2.0",
"size": 91545
} | [
"java.awt.GraphicsEnvironment",
"java.awt.HeadlessException",
"java.io.File",
"javax.print.PrintService",
"javax.print.attribute.HashPrintRequestAttributeSet",
"javax.print.attribute.PrintRequestAttributeSet",
"javax.print.attribute.standard.Copies",
"javax.print.attribute.standard.Destination",
"ja... | import java.awt.GraphicsEnvironment; import java.awt.HeadlessException; import java.io.File; import javax.print.PrintService; import javax.print.attribute.HashPrintRequestAttributeSet; import javax.print.attribute.PrintRequestAttributeSet; import javax.print.attribute.standard.Copies; import javax.print.attribute.stand... | import java.awt.*; import java.io.*; import javax.print.*; import javax.print.attribute.*; import javax.print.attribute.standard.*; | [
"java.awt",
"java.io",
"javax.print"
] | java.awt; java.io; javax.print; | 1,910,253 |
private boolean cloneSelectedCertificateEntry()
{
assert m_keyStoreWrap != null;
assert m_keyStoreWrap.getKeyStore() != null;
// Not valid for non-certificate entries
if (!KeyStoreTableModel.TRUST_CERT_ENTRY.equals(m_jtKeyStore.getSelectedType()))
{
return false;
}
String sAlias = m_jtKeyStore.ge... | boolean function() { assert m_keyStoreWrap != null; assert m_keyStoreWrap.getKeyStore() != null; if (!KeyStoreTableModel.TRUST_CERT_ENTRY.equals(m_jtKeyStore.getSelectedType())) { return false; } String sAlias = m_jtKeyStore.getSelectedAlias(); KeyStore keyStore = m_keyStoreWrap.getKeyStore(); try { sAlias = getNewEntr... | /**
* Let the user clone the selected certificate entry.
*
* @return True if the clone is successful, false otherwise
*/ | Let the user clone the selected certificate entry | cloneSelectedCertificateEntry | {
"repo_name": "scop/portecle",
"path": "src/main/net/sf/portecle/FPortecle.java",
"license": "gpl-2.0",
"size": 189435
} | [
"java.security.KeyStore",
"java.security.cert.Certificate",
"javax.swing.JOptionPane",
"net.sf.portecle.gui.error.DThrowable"
] | import java.security.KeyStore; import java.security.cert.Certificate; import javax.swing.JOptionPane; import net.sf.portecle.gui.error.DThrowable; | import java.security.*; import java.security.cert.*; import javax.swing.*; import net.sf.portecle.gui.error.*; | [
"java.security",
"javax.swing",
"net.sf.portecle"
] | java.security; javax.swing; net.sf.portecle; | 2,862,671 |
@Override
public List<? extends Artifact> getArtifacts( ItemSelector selector ) throws ContentAccessException
{
try ( Stream<? extends Artifact> stream = newArtifactStream( selector ) )
{
return stream.collect( Collectors.toList( ) );
}
} | List<? extends Artifact> function( ItemSelector selector ) throws ContentAccessException { try ( Stream<? extends Artifact> stream = newArtifactStream( selector ) ) { return stream.collect( Collectors.toList( ) ); } } | /**
* See {@link #newArtifactStream(ItemSelector)}. This method collects the stream into a list.
*
* @param selector the selector for the artifacts
* @return the list of artifacts
* @throws ContentAccessException if the access to the underlying filesystem failed
*/ | See <code>#newArtifactStream(ItemSelector)</code>. This method collects the stream into a list | getArtifacts | {
"repo_name": "sadlil/archiva",
"path": "archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/maven/repository/content/ManagedDefaultRepositoryContent.java",
"license": "apache-2.0",
"size": 63068
} | [
"java.util.List",
"java.util.stream.Collectors",
"java.util.stream.Stream",
"org.apache.archiva.repository.content.Artifact",
"org.apache.archiva.repository.content.ContentAccessException",
"org.apache.archiva.repository.content.ItemSelector"
] | import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.archiva.repository.content.Artifact; import org.apache.archiva.repository.content.ContentAccessException; import org.apache.archiva.repository.content.ItemSelector; | import java.util.*; import java.util.stream.*; import org.apache.archiva.repository.content.*; | [
"java.util",
"org.apache.archiva"
] | java.util; org.apache.archiva; | 620,888 |
public void init(
boolean forEncryption,
CipherParameters params) {
if (params instanceof KeyParameter) {
WorkingKey = generateWorkingKey(((KeyParameter) params).getKey(), forEncryption);
this.forEncryption = forEncryption;
return;
}
... | void function( boolean forEncryption, CipherParameters params) { if (params instanceof KeyParameter) { WorkingKey = generateWorkingKey(((KeyParameter) params).getKey(), forEncryption); this.forEncryption = forEncryption; return; } throw new IllegalArgumentException(STR + params.getClass().getName()); } | /**
* initialise an AES cipher.
*
* @param forEncryption whether or not we are for encryption.
* @param params the parameters required to set up the cipher.
* @throws IllegalArgumentException if the params argument is
* inappropriate.
*/ | initialise an AES cipher | init | {
"repo_name": "pburlov/ultracipher",
"path": "core/src/main/java/de/burlov/ultracipher/core/bouncycastle/crypto/engines/AESFastEngine.java",
"license": "gpl-2.0",
"size": 53556
} | [
"de.burlov.ultracipher.core.bouncycastle.crypto.CipherParameters",
"de.burlov.ultracipher.core.bouncycastle.crypto.params.KeyParameter"
] | import de.burlov.ultracipher.core.bouncycastle.crypto.CipherParameters; import de.burlov.ultracipher.core.bouncycastle.crypto.params.KeyParameter; | import de.burlov.ultracipher.core.bouncycastle.crypto.*; import de.burlov.ultracipher.core.bouncycastle.crypto.params.*; | [
"de.burlov.ultracipher"
] | de.burlov.ultracipher; | 493,799 |
@Override
public void createEvent(String type, @NonNull TGRequestCallback<TGEvent> returnMethod) {
if (TextUtils.isEmpty(type)) {
returnMethod.onRequestError(new TGRequestErrorType(TGRequestErrorType.ErrorType.NULL_INPUT));
return;
}
else if (tapglue.getUserManage... | void function(String type, @NonNull TGRequestCallback<TGEvent> returnMethod) { if (TextUtils.isEmpty(type)) { returnMethod.onRequestError(new TGRequestErrorType(TGRequestErrorType.ErrorType.NULL_INPUT)); return; } else if (tapglue.getUserManager().getCurrentUser() == null) { returnMethod.onRequestError(new TGRequestErr... | /**
* Create event with selected type
*
* @param type
* @param returnMethod
*/ | Create event with selected type | createEvent | {
"repo_name": "AutomatedPlayground/android_sdk",
"path": "tapglue-android-sdk/src/main/java/com/tapglue/managers/TGEventManager.java",
"license": "apache-2.0",
"size": 4836
} | [
"android.support.annotation.NonNull",
"android.text.TextUtils",
"com.tapglue.model.TGEvent",
"com.tapglue.networking.requests.TGRequestCallback",
"com.tapglue.networking.requests.TGRequestErrorType"
] | import android.support.annotation.NonNull; import android.text.TextUtils; import com.tapglue.model.TGEvent; import com.tapglue.networking.requests.TGRequestCallback; import com.tapglue.networking.requests.TGRequestErrorType; | import android.support.annotation.*; import android.text.*; import com.tapglue.model.*; import com.tapglue.networking.requests.*; | [
"android.support",
"android.text",
"com.tapglue.model",
"com.tapglue.networking"
] | android.support; android.text; com.tapglue.model; com.tapglue.networking; | 507,812 |
@Test
public void testLoadAppRelease() throws Exception {
ApplicationRelease applicationRelease = new ApplicationRelease("product1", "version");
applicationRelease = applicationReleaseDao.create(applicationRelease);
applicationRelease = applicationReleaseDao.load("product1");
a... | void function() throws Exception { ApplicationRelease applicationRelease = new ApplicationRelease(STR, STR); applicationRelease = applicationReleaseDao.create(applicationRelease); applicationRelease = applicationReleaseDao.load(STR); assertEquals(applicationRelease.getName(), STR); assertEquals(applicationRelease.getVe... | /**
* Test the loading of an application release.
* @throws Exception
*/ | Test the loading of an application release | testLoadAppRelease | {
"repo_name": "Fiware/cloud.PaaS",
"path": "core/src/test/java/com/telefonica/euro_iaas/paasmanager/dao/ApplicationReleaseDaoJpaImplTest.java",
"license": "apache-2.0",
"size": 8372
} | [
"com.telefonica.euro_iaas.paasmanager.model.ApplicationRelease",
"org.junit.Assert"
] | import com.telefonica.euro_iaas.paasmanager.model.ApplicationRelease; import org.junit.Assert; | import com.telefonica.euro_iaas.paasmanager.model.*; import org.junit.*; | [
"com.telefonica.euro_iaas",
"org.junit"
] | com.telefonica.euro_iaas; org.junit; | 151,398 |
public void init(ServletContext context, IConfigurationManager configurationManager
, Element eConfig) throws OAException;
| void function(ServletContext context, IConfigurationManager configurationManager , Element eConfig) throws OAException; | /**
* Start the helper.
*
* @param context The servlet context.
* @param configurationManager the configuration manager.
* @param eConfig The configuration section for this helper.
* @throws OAException If starting fails
*/ | Start the helper | init | {
"repo_name": "GluuFederation/gluu-Asimba",
"path": "asimba-api/src/main/java/com/alfaariss/oa/api/helper/IHelper.java",
"license": "agpl-3.0",
"size": 1901
} | [
"com.alfaariss.oa.OAException",
"com.alfaariss.oa.api.configuration.IConfigurationManager",
"javax.servlet.ServletContext",
"org.w3c.dom.Element"
] | import com.alfaariss.oa.OAException; import com.alfaariss.oa.api.configuration.IConfigurationManager; import javax.servlet.ServletContext; import org.w3c.dom.Element; | import com.alfaariss.oa.*; import com.alfaariss.oa.api.configuration.*; import javax.servlet.*; import org.w3c.dom.*; | [
"com.alfaariss.oa",
"javax.servlet",
"org.w3c.dom"
] | com.alfaariss.oa; javax.servlet; org.w3c.dom; | 721,271 |
protected final void complete() throws TransactionException
{
final List<TransactionRunnable> runPath = this.getRunPath();
final ListIterator<TransactionRunnable> runPathReverseIterator =
runPath.listIterator(runPath.size());
completeAll(runPathReverseIterator);
} | final void function() throws TransactionException { final List<TransactionRunnable> runPath = this.getRunPath(); final ListIterator<TransactionRunnable> runPathReverseIterator = runPath.listIterator(runPath.size()); completeAll(runPathReverseIterator); } | /**
* Run onComplete() on this and each of the chained runnables.
* Run in the opposite order as they were registered, child before parent.
*
* @throws TransactionException if one or more of the runnables throw any exception.
*/ | Run onComplete() on this and each of the chained runnables. Run in the opposite order as they were registered, child before parent | complete | {
"repo_name": "xwiki/xwiki-platform",
"path": "xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-transaction/src/main/java/org/xwiki/store/TransactionRunnable.java",
"license": "lgpl-2.1",
"size": 22301
} | [
"java.util.List",
"java.util.ListIterator"
] | import java.util.List; import java.util.ListIterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,952,139 |
// $$fb 2002-04-12: fix for 4662082: behavior of AudioSystem.getTargetEncodings() methods doesn't match the spec
public static AudioFormat.Encoding[] getTargetEncodings(AudioFormat sourceFormat) {
List codecs = getFormatConversionProviders();
Vector encodings = new Vector();
int size... | static AudioFormat.Encoding[] function(AudioFormat sourceFormat) { List codecs = getFormatConversionProviders(); Vector encodings = new Vector(); int size = 0; int index = 0; AudioFormat.Encoding encs[] = null; for(int i=0; i<codecs.size(); i++ ) { encs = ((FormatConversionProvider) codecs.get(i)).getTargetEncodings(so... | /**
* Obtains the encodings that the system can obtain from an
* audio input stream with the specified format using the set
* of installed format converters.
* @param sourceFormat the audio format for which conversion
* is queried
* @return array of encodings. If <code>sourceFormat</code>i... | Obtains the encodings that the system can obtain from an audio input stream with the specified format using the set of installed format converters | getTargetEncodings | {
"repo_name": "openjdk/jdk7u",
"path": "jdk/src/share/classes/javax/sound/sampled/AudioSystem.java",
"license": "gpl-2.0",
"size": 64594
} | [
"java.util.List",
"java.util.Vector",
"javax.sound.sampled.spi.FormatConversionProvider"
] | import java.util.List; import java.util.Vector; import javax.sound.sampled.spi.FormatConversionProvider; | import java.util.*; import javax.sound.sampled.spi.*; | [
"java.util",
"javax.sound"
] | java.util; javax.sound; | 839,470 |
public ArrayList <Question> getQuestionList() {
return questionList;
}
| ArrayList <Question> function() { return questionList; } | /**
* Gets the question list.
*
* @return the question list
*/ | Gets the question list | getQuestionList | {
"repo_name": "CMPUT-301F14T10/project",
"path": "Doc/Testing/src/model_classes/QuestionList.java",
"license": "gpl-3.0",
"size": 6421
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,569,593 |
void enterExpressionWithTime(@NotNull EsperEPL2GrammarParser.ExpressionWithTimeContext ctx);
void exitExpressionWithTime(@NotNull EsperEPL2GrammarParser.ExpressionWithTimeContext ctx); | void enterExpressionWithTime(@NotNull EsperEPL2GrammarParser.ExpressionWithTimeContext ctx); void exitExpressionWithTime(@NotNull EsperEPL2GrammarParser.ExpressionWithTimeContext ctx); | /**
* Exit a parse tree produced by {@link EsperEPL2GrammarParser#expressionWithTime}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>EsperEPL2GrammarParser#expressionWithTime</code> | exitExpressionWithTime | {
"repo_name": "georgenicoll/esper",
"path": "esper/src/main/java/com/espertech/esper/epl/generated/EsperEPL2GrammarListener.java",
"license": "gpl-2.0",
"size": 114105
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,636,948 |
@Test
@SuppressWarnings("deprecation")
public void testIncludedFileRecursive() throws SetUpException {
Configuration config = new Configuration(new File("testdata/configs/including_file_recursive.properties"));
assertThat(config.getProperty("a"), is("b")); // from including_file_sim... | @SuppressWarnings(STR) void function() throws SetUpException { Configuration config = new Configuration(new File(STR)); assertThat(config.getProperty("a"), is("b")); assertThat(config.getProperty("c"), is("d")); assertThat(config.getProperty("e"), is("f")); } | /**
* Tests that included config files work correctly when loading recursively.
*
* @throws SetUpException unwanted.
*/ | Tests that included config files work correctly when loading recursively | testIncludedFileRecursive | {
"repo_name": "KernelHaven/KernelHaven",
"path": "test/net/ssehub/kernel_haven/config/ConfigurationTest.java",
"license": "apache-2.0",
"size": 31348
} | [
"java.io.File",
"net.ssehub.kernel_haven.SetUpException",
"org.hamcrest.CoreMatchers",
"org.junit.Assert"
] | import java.io.File; import net.ssehub.kernel_haven.SetUpException; import org.hamcrest.CoreMatchers; import org.junit.Assert; | import java.io.*; import net.ssehub.kernel_haven.*; import org.hamcrest.*; import org.junit.*; | [
"java.io",
"net.ssehub.kernel_haven",
"org.hamcrest",
"org.junit"
] | java.io; net.ssehub.kernel_haven; org.hamcrest; org.junit; | 951,736 |
public void gmlCoordinates(double x, double y) throws SAXException {
currentHandler.addCoordinate(new com.vividsolutions.jts.geom.Coordinate(
x, y));
} | void function(double x, double y) throws SAXException { currentHandler.addCoordinate(new com.vividsolutions.jts.geom.Coordinate( x, y)); } | /**
* Gets a coordinate from the child and passes it to the current handler as
* an add request.
*
* @param x The X coordinate of the received coordinate.
* @param y The Y coordinate of the received coordinate.
*
* @throws SAXException parser error.
*/ | Gets a coordinate from the child and passes it to the current handler as an add request | gmlCoordinates | {
"repo_name": "opengeospatial/Java-OpenMobility",
"path": "AugTech_GeoAPI_Impl/com/augtech/geoapi/geotools/gml/GMLFilterGeometry.java",
"license": "apache-2.0",
"size": 8248
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 2,211,356 |
@Override
public void unbind(String name)
throws NamingException {
dirContext.unbind(parseName(name));
cacheUnload(name);
} | void function(String name) throws NamingException { dirContext.unbind(parseName(name)); cacheUnload(name); } | /**
* Unbinds the named object.
*
* @param name the name to bind; may not be empty
* @exception NameNotFoundException if an intermediate context does not
* exist
* @exception NamingException if a naming exception is encountered
*/ | Unbinds the named object | unbind | {
"repo_name": "GazeboHub/ghub-portal-doc",
"path": "doc/modelio/GHub Portal/mda/JavaDesigner/res/java/tomcat/java/org/apache/naming/resources/ProxyDirContext.java",
"license": "epl-1.0",
"size": 62986
} | [
"javax.naming.NamingException"
] | import javax.naming.NamingException; | import javax.naming.*; | [
"javax.naming"
] | javax.naming; | 2,333,860 |
public void setFilterId(BigInteger filterId) {
this.filterId = filterId;
} | void function(BigInteger filterId) { this.filterId = filterId; } | /**
* The filter id to use.
*/ | The filter id to use | setFilterId | {
"repo_name": "objectiser/camel",
"path": "components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jConfiguration.java",
"license": "apache-2.0",
"size": 14166
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 774,575 |
public String getRealClientIpAddr(final Map<String, String> httpHeaders,
final String remoteAddr) {
// If some upstream device added an X-Forwarded-For header
// use it for the client ip
// This will support scenarios where load balancers or gateways
// front the Azkaban web server and a changi... | String function(final Map<String, String> httpHeaders, final String remoteAddr) { String clientIp = httpHeaders.getOrDefault(X_FORWARDED_FOR_HEADER, null); if (clientIp == null) { clientIp = remoteAddr; } else { final String[] ips = clientIp.split(","); clientIp = ips[0]; } final String[] parts = clientIp.split(":"); c... | /**
* Gets the actual client IP address inspecting the X-Forwarded-For HTTP header or using the
* provided 'remote IP address' from the low level TCP connection from the client.
*
* If multiple IP addresses are provided in the X-Forwarded-For header then the first one (first
* hop) is used
*
* @par... | Gets the actual client IP address inspecting the X-Forwarded-For HTTP header or using the provided 'remote IP address' from the low level TCP connection from the client. If multiple IP addresses are provided in the X-Forwarded-For header then the first one (first hop) is used | getRealClientIpAddr | {
"repo_name": "reallocf/azkaban",
"path": "azkaban-common/src/main/java/azkaban/utils/WebUtils.java",
"license": "apache-2.0",
"size": 6603
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,888,744 |
public static void copyInputStreamToFile(final InputStream source, final File destination) throws IOException {
boolean success = false;
try {
FileUtils.copyInputStreamToFile(source, destination);
success = true;
} finally {
if (!success) {
... | static void function(final InputStream source, final File destination) throws IOException { boolean success = false; try { FileUtils.copyInputStreamToFile(source, destination); success = true; } finally { if (!success) { forceDelete(destination); } } } public static class TransformingComparator implements Comparator<St... | /**
*
* Copy the input stream to the given file. Delete the file in case of exception.
*
* @param source the input stream source
* @param destination the file to write to
* @throws IOException
*/ | Copy the input stream to the given file. Delete the file in case of exception | copyInputStreamToFile | {
"repo_name": "FlakyTestDetection/jackrabbit-oak",
"path": "oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/FileIOUtils.java",
"license": "apache-2.0",
"size": 18556
} | [
"com.google.common.base.Function",
"java.io.File",
"java.io.IOException",
"java.io.InputStream",
"java.util.Comparator",
"org.apache.commons.io.FileUtils"
] | import com.google.common.base.Function; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.util.Comparator; import org.apache.commons.io.FileUtils; | import com.google.common.base.*; import java.io.*; import java.util.*; import org.apache.commons.io.*; | [
"com.google.common",
"java.io",
"java.util",
"org.apache.commons"
] | com.google.common; java.io; java.util; org.apache.commons; | 862,830 |
public Clip setMinimum(UGen minimumUGen) {
if (minimumUGen == null) {
setMinimum(min);
} else {
minUGen = minimumUGen;
minUGen.update();
min = minUGen.getValue();
isMinStatic = false;
}
return this;
}
| Clip function(UGen minimumUGen) { if (minimumUGen == null) { setMinimum(min); } else { minUGen = minimumUGen; minUGen.update(); min = minUGen.getValue(); isMinStatic = false; } return this; } | /**
* Sets a UGen to control the minimum value.
*
* @param minimumUGen
* The minimum value controller UGen.
* @return This Clip instance.
*/ | Sets a UGen to control the minimum value | setMinimum | {
"repo_name": "nhochberger/WavFragmentation",
"path": "lib/beads/src/beads_main/net/beadsproject/beads/ugens/Clip.java",
"license": "mit",
"size": 6208
} | [
"net.beadsproject.beads.core.UGen"
] | import net.beadsproject.beads.core.UGen; | import net.beadsproject.beads.core.*; | [
"net.beadsproject.beads"
] | net.beadsproject.beads; | 2,538,340 |
public List<String> getNestedPrefixes() {
return nestedPrefixes;
} | List<String> function() { return nestedPrefixes; } | /**
* Gets all the nested children prefixes for this entity type (if there are any)
*
* @return the list of nested (children) prefixes for this entity type OR null if there are none (will not be empty list)
*/ | Gets all the nested children prefixes for this entity type (if there are any) | getNestedPrefixes | {
"repo_name": "pushyamig/sakai",
"path": "entitybroker/api/src/java/org/sakaiproject/entitybroker/entityprovider/extension/BrowseEntity.java",
"license": "apache-2.0",
"size": 7182
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 506,383 |
public Module getObjectMapperModule() {
return binder ->
binder
.bind(ObjectMapper.class)
.toProvider(DropwizardObjectMapperProvider.class)
.in(Scopes.SINGLETON);
} | Module function() { return binder -> binder .bind(ObjectMapper.class) .toProvider(DropwizardObjectMapperProvider.class) .in(Scopes.SINGLETON); } | /**
* Ability to override the default object mapper used when embedding Singularity
*/ | Ability to override the default object mapper used when embedding Singularity | getObjectMapperModule | {
"repo_name": "hs-jenkins-bot/Singularity",
"path": "SingularityService/src/main/java/com/hubspot/singularity/SingularityService.java",
"license": "apache-2.0",
"size": 6893
} | [
"com.fasterxml.jackson.databind.ObjectMapper",
"com.google.inject.Module",
"com.google.inject.Scopes",
"com.hubspot.singularity.guice.DropwizardObjectMapperProvider"
] | import com.fasterxml.jackson.databind.ObjectMapper; import com.google.inject.Module; import com.google.inject.Scopes; import com.hubspot.singularity.guice.DropwizardObjectMapperProvider; | import com.fasterxml.jackson.databind.*; import com.google.inject.*; import com.hubspot.singularity.guice.*; | [
"com.fasterxml.jackson",
"com.google.inject",
"com.hubspot.singularity"
] | com.fasterxml.jackson; com.google.inject; com.hubspot.singularity; | 764,399 |
public static void sendIdeaEmail(Context context) {
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_EMAIL, new String[]
{ context.getString(R.string.feedback_email) });
intent.putExtra(Intent.EXTRA_SUBJECT, co... | static void function(Context context) { Intent intent = new Intent(Intent.ACTION_SEND); intent.setType(STR); intent.putExtra(Intent.EXTRA_EMAIL, new String[] { context.getString(R.string.feedback_email) }); intent.putExtra(Intent.EXTRA_SUBJECT, context.getString(R.string.feedback_idea_subject)); intent.putExtra(Intent.... | /**
* Sends a suggestion or idea in an email
* @param context
*/ | Sends a suggestion or idea in an email | sendIdeaEmail | {
"repo_name": "emuneee/premofm",
"path": "app/src/main/java/com/mainmethod/premofm/helper/IntentHelper.java",
"license": "apache-2.0",
"size": 7488
} | [
"android.content.Context",
"android.content.Intent"
] | import android.content.Context; import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 933,004 |
protected MethodVisitor createMethodRemapper(final MethodVisitor methodVisitor) {
return new MethodRemapper(api, methodVisitor, remapper);
} | MethodVisitor function(final MethodVisitor methodVisitor) { return new MethodRemapper(api, methodVisitor, remapper); } | /**
* Constructs a new remapper for methods. The default implementation of this method returns a new
* {@link MethodRemapper}.
*
* @param methodVisitor the MethodVisitor the remapper must delegate to.
* @return the newly created remapper.
*/ | Constructs a new remapper for methods. The default implementation of this method returns a new <code>MethodRemapper</code> | createMethodRemapper | {
"repo_name": "apache/tapestry-5",
"path": "plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/commons/ClassRemapper.java",
"license": "apache-2.0",
"size": 12400
} | [
"org.apache.tapestry5.internal.plastic.asm.MethodVisitor"
] | import org.apache.tapestry5.internal.plastic.asm.MethodVisitor; | import org.apache.tapestry5.internal.plastic.asm.*; | [
"org.apache.tapestry5"
] | org.apache.tapestry5; | 2,213,885 |
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
// String guardar = request.getParameter("btnQaw1Guardar");
String continuar = request.getParamete... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(STR); String continuar = request.getParameter(STR); String anterior = request.getParameter(STR); String canc = request.getParameter(STR); if (canc != null) { response.sendRedirect(STR);... | /**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code>
* methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods | processRequest | {
"repo_name": "LordODG/archassistantV2.0",
"path": "Cliente/ClienteArchAssistant/src/java/Servlets/QAW1.java",
"license": "agpl-3.0",
"size": 7553
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 2,180,503 |
public static boolean isValidEmail(String email) {
final String emailPattern = "^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";
Matcher matcher;
Pattern pattern = Pattern.compile(emailPattern);
matcher = pattern.matcher(email);
if (mat... | static boolean function(String email) { final String emailPattern = STR; Matcher matcher; Pattern pattern = Pattern.compile(emailPattern); matcher = pattern.matcher(email); if (matcher != null) return matcher.matches(); else return false; } | /**
* Checks if the input parameter is a valid email.
**/ | Checks if the input parameter is a valid email | isValidEmail | {
"repo_name": "aldefy/LocationTracker",
"path": "app/src/main/java/com/blueninjas/aditlal/trackingapp/utils/Utils.java",
"license": "apache-2.0",
"size": 65293
} | [
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 345,635 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.